Author: The Khronos® Vulkan Working Group

# Vulkan® 1.4.357 - A Specification (with all registered extensions)

The Khronos® Vulkan Working Group
version 1.4.357, 2026-08-01 13:44:28Z
from git branch: makepkg commit: d184375dcc5da2b06ca375a8d7d1f9d21ca64a76

## 1. Preamble

Copyright 2014-2026 The Khronos Group Inc.

This Specification is protected by copyright laws and contains material proprietary to Khronos. Except as described by these terms, it or any components may not be reproduced, republished, distributed, transmitted, displayed, broadcast or otherwise exploited in any manner without the express prior written permission of Khronos.

Khronos grants a conditional copyright license to use and reproduce the unmodified Specification for any purpose, without fee or royalty, EXCEPT no licenses to any patent, trademark or other intellectual property rights are granted under these terms.

Khronos makes no, and expressly disclaims any, representations or warranties, express or implied, regarding this Specification, including, without limitation: merchantability, fitness for a particular purpose, non-infringement of any intellectual property, correctness, accuracy, completeness, timeliness, and reliability. Under no circumstances will Khronos, or any of its Promoters, Contributors or Members, or their respective partners, officers, directors, employees, agents or representatives be liable for any damages, whether direct, indirect, special or consequential damages for lost revenues, lost profits, or otherwise, arising from or in connection with these materials.

This document contains extensions which are not ratified by Khronos, and as such is not a ratified Specification, though it contains text from (and is a superset of) the ratified Specification.

The ratified version of the Vulkan Specification can be found at https://registry.khronos.org/vulkan/specs/latest-ratified/pdf/vkspec.pdf (core with all ratified extensions).

This Specification contains substantially unmodified functionality from, and is a successor to, Khronos specifications including OpenGL, OpenGL ES and OpenCL.

The Khronos Intellectual Property Rights Policy defines the terms 'Scope', 'Compliant Portion', and 'Necessary Patent Claims'.

Some parts of this Specification are purely informative and so are EXCLUDED the Scope of this Specification. The Document Conventions section of the Introduction defines how these parts of the Specification are identified.

Where this Specification uses technical terminology, defined in the Glossary or otherwise, that refer to enabling technologies that are not expressly set forth in this Specification, those enabling technologies are EXCLUDED from the Scope of this Specification. For clarity, enabling technologies not disclosed with particularity in this Specification (e.g. semiconductor manufacturing technology, hardware architecture, processor architecture or microarchitecture, memory architecture, compiler technology, object oriented technology, basic operating system technology, compression technology, algorithms, and so on) are NOT to be considered expressly set forth; only those application program interfaces and data structures disclosed with particularity are included in the Scope of this Specification.

For purposes of the Khronos Intellectual Property Rights Policy as it relates to the definition of Necessary Patent Claims, all recommended or optional features, behaviors and functionality set forth in this Specification, if implemented, are considered to be included as Compliant Portions.

Where this Specification identifies specific sections of external references, only those specifically identified sections define normative functionality. The Khronos Intellectual Property Rights Policy excludes external references to materials and associated enabling technology not created by Khronos from the Scope of this Specification, and any licenses that may be required to implement such referenced materials and associated technologies must be obtained separately and may involve royalty payments.

Khronos and Vulkan are registered trademarks, and SPIR-V is a trademark of The Khronos Group Inc. OpenCL is a trademark of Apple Inc., used under license by Khronos. OpenGL is a registered trademark and the OpenGL ES logo is a trademark of Hewlett Packard Enterprise, used under license by Khronos. ASTC is a trademark of ARM Holdings PLC. All other product names, trademarks, and/or company names are used solely for identification and belong to their respective owners.

## 2. Introduction

This document, referred to as the “Vulkan Specification” or just the “Specification” hereafter, describes the Vulkan Application Programming Interface (API). Vulkan is a C99 API designed for explicit control of low-level graphics and compute functionality.

The canonical version of the Specification is available in the official Vulkan Registry (https://registry.khronos.org/vulkan/). The source files used to generate the Vulkan specification are stored in the Vulkan Documentation Repository (https://github.com/KhronosGroup/Vulkan-Docs).

The source repository additionally has a public issue tracker and allows the submission of pull requests that improve the specification.

### 2.1. Document Conventions

The Vulkan specification is intended for use by both implementors of the API and application developers seeking to make use of the API, forming a contract between these parties. Specification text may address either party; typically the intended audience can be inferred from context, though some sections are defined to address only one of these parties. (For example, Valid Usage sections only address application developers). Any requirements, prohibitions, recommendations, or options defined in specification text are imposed only on the audience of that text.

#### 2.1.1. Normative Requirements

The Vulkan Specification uses a combination of normative terminology and normative descriptions to express the requirements that it imposes on applications and implementations. An application which complies with all normative requirements imposed on applications is said to make valid use of the API; failing to comply with such requirements results in undefined behavior, as discussed in the Valid Usage section below. In the context of this document, an implementation which complies with all normative requirements imposed on implementations is said to be conformant.

Note | The Khronos Group imposes additional requirements on implementors who wish to make public statements describing their Vulkan implementations as conformant. These include signing the Vulkan Adopter’s Agreement, paying the associated fee, and making a successful conformance test submission to the Khronos Conformance Process. For details see the Khronos Trademark Guidelines (https://www.khronos.org/legal/khronos-trademark-guidelines).

##### Normative Terminology

Within this specification, the key words must, required, should, may, and optional are to be interpreted as described in RFC 2119 - Key words for use in RFCs to Indicate Requirement Levels (https://www.ietf.org/rfc/rfc2119.txt). The additional key word optionally is an alternate form of optional, for use where grammatically appropriate. These key words are highlighted in the specification to indicate that they are being used in a specific technical sense.

The additional key words can and cannot are to be interpreted as describing the capabilities of an application, as follows:

can

  This word means that the application is able to perform the action described.

cannot

  This word means that the API and/or the execution environment provide no mechanism through which the application can express or accomplish the action described.

These key words are never used in text addressing implementors.

Note | There is an important distinction between cannot and must not, as used in this Specification. Cannot refers to something the API provides no way for the application to express or accomplish. Must not describes something that the application is able to express, but that is not valid use of the API, and will have undefined and potentially unrecoverable consequences.

##### Normative Descriptions

In the Vulkan Specification, the normative term must is primarily used to describe application behavior, and in particular to constrain what inputs or commands issued by the application to the implementation are considered valid.

To constrain implementation behavior, the specification sometimes uses must, but more often simply describes the behavior of the implementation in response to specified commands and inputs. Unless explicitly stated otherwise, such references to implementation behavior describe the behavior of conformant implementations, and express normative requirements which an implementation must satisfy in order to conform to the specification. For example, if the specification says “Under specified condition, the error code VK_ERROR_FEATURE_NOT_PRESENT is returned”, that behavior is a requirement of the specification, and an implementation which does not return that error code under that condition is not conformant.

When the normative terms may, should, or optional are used to describe implementation behavior, they define alternative or optional behaviors which a conformant implementation may or may not exhibit. Such statements are also normative. For example, if the specification says “Under specified condition, the implementation should return A but may instead return B”, then an implementation that returns either A or B under that condition is conformant (assuming it does not violate other normative requirements), while an implementation that returns anything else is not.

#### 2.1.2. Normative References

References to external documents are considered normative references if the Specification uses normative terminology or normative descriptions to refer to them or their requirements, either as a whole or in part.

The following documents are referenced by normative sections of the specification:

IEEE. August, 2008. IEEE Standard for Floating-Point Arithmetic. IEEE Std 754-2008. https://dx.doi.org/10.1109/IEEESTD.2008.4610935 .

Andrew Garrard. Khronos Data Format Specification, version 1.3. https://registry.khronos.org/DataFormat/specs/1.3/dataformat.1.3.html .

John Kessenich. SPIR-V Extended Instructions for GLSL, Version 1.00 (February 10, 2016). https://registry.khronos.org/spir-v/ .

John Kessenich, Boaz Ouriel, Raun Krisch, and Diego Novillo. SPIR-V Specification, Version 1.6.7, Revision 1, Unified (March, 2026). https://registry.khronos.org/spir-v/ .

ITU-T. H.264 Advanced Video Coding for Generic Audiovisual Services (August, 2021). https://www.itu.int/rec/T-REC-H.264-202108-I/ .

ITU-T. H.265 High Efficiency Video Coding (August, 2021). https://www.itu.int/rec/T-REC-H.265-202108-S/ .

Google. VP9 Bitstream & Decoding Process Specification (February 22, 2017). https://storage.googleapis.com/downloads.webmproject.org/docs/vp9/vp9-bitstream-specification-v0.7-20170222-draft.pdf .

Alliance for Open Media. AV1 Bitstream & Decoding Process Specification (January 8, 2019). https://aomediacodec.github.io/av1-spec/av1-spec.pdf .

Jon Leech. The Khronos Vulkan API Registry (February 26, 2023). https://registry.khronos.org/vulkan/specs/latest/registry.html .

Jon Leech and Tobias Hector. Vulkan Documentation and Extensions: Procedures and Conventions (February 26, 2023). https://registry.khronos.org/vulkan/specs/latest/styleguide.html .

Architecture of the Vulkan Loader Interfaces (October, 2021). https://github.com/KhronosGroup/Vulkan-Loader/blob/main/docs/LoaderInterfaceArchitecture.md .

#### 2.1.3. Informative Language

Some language in the specification is purely informative, intended to provide background information or make suggestions to implementors or developers. Such language does not impose normative requirements on implementations or applications.

All NOTEs are implicitly informative.

If an entire chapter, section, or appendix contains only informative language, its title will be suffixed with “(Informative)”. Unless so noted in the title, all chapters, sections, and appendices in this document are normative.

#### 2.1.4. Technical Terminology

The Vulkan Specification makes use of common engineering and graphics terms such as Pipeline, Shader, and Host to identify and describe Vulkan API constructs and their attributes, states, and behaviors. The Glossary defines the basic meanings of these terms in the context of the Specification. The Specification text provides fuller definitions of the terms and may elaborate, extend, or clarify the Glossary definitions. When a term defined in the Glossary is used in normative language within the Specification, the definitions within the Specification govern and supersede any meanings the terms may have in other technical contexts (i.e. outside the Specification).

#### 2.1.5. Ratification

Ratification of a Vulkan core version or extension is a status conferred by vote of the Khronos Board of Promoters, bringing that core version or extension under the umbrella of the Khronos IP Rights Policy.

All Vulkan core versions and `KHR` extensions (including provisional specifications) are ratified, as are some multi-vendor `EXT` extensions. Ratification status of extensions is described in the Layers & Extensions (Informative) appendix.

Note | Ratification status is primarily of interest to IHVs developing GPU hardware and Vulkan implementations. For developers, ratification does not necessarily mean that an extension is “better”, has a more stable API, or is more widely supported than alternative ways of achieving that functionality. Interactions between ratified and non-ratified extensions are not themselves ratified.

## 3. Fundamentals

This chapter introduces fundamental concepts including the Vulkan architecture and execution model, API syntax, queues, pipeline configurations, numeric representation, state and state queries, and the different types of objects and shaders. It provides a framework for interpreting more specific descriptions of commands and behavior in the remainder of the Specification.

### 3.1. Host and Device Environment

The Vulkan Specification assumes and requires: the following properties of the host environment with respect to Vulkan implementations:

- The host must have runtime support for 8-, 16-, 32-, and 64-bit signed and unsigned twos-complement integers, all addressable at the granularity of their size in bytes.

- The host must have runtime support for 32- and 64-bit floating-point types satisfying the range and precision constraints in the Floating-Point Computation section.

- The representation and endianness of these types on the host must match the representation and endianness of the same types on every physical device supported.

Note | Since a variety of data types and structures in Vulkan may be accessible by both host and physical device operations, the implementation should be able to access such data efficiently in both paths in order to facilitate writing portable and performant applications.

### 3.2. Execution Model

This section outlines the execution model of a Vulkan system.

Vulkan exposes one or more devices, each of which exposes one or more queues which may process work asynchronously to one another. The set of queues supported by a device is partitioned into families. Each family supports one or more types of functionality and may contain multiple queues with similar characteristics. Queues within a single family are considered compatible with one another, and work produced for a family of queues can be executed on any queue within that family. This specification defines the following types of functionality that queues may support: graphics, compute, video decode, video encode, protected memory management, sparse memory management, and transfer.

Note | A single device may report multiple similar queue families rather than, or as well as, reporting multiple members of one or more of those families. This indicates that while members of those families have similar capabilities, they are not directly compatible with one another.

Device memory is explicitly managed by the application. Each device may advertise one or more heaps, representing different areas of memory. Memory heaps are either device-local or host-local, but are always visible to the device. Further detail about memory heaps is exposed via memory types available on that heap. Examples of memory areas that may be available on an implementation include:

- device-local is memory that is physically connected to the device.

- device-local, host visible is device-local memory that is visible to the host.

- host-local, host visible is memory that is local to the host and visible to the device and host.

On other architectures, there may only be a single heap that can be used for any purpose.

#### 3.2.1. Queue Operation

Each device supports a number of queues, which provide an interface for submitting work for execution on the device.

Queue submission commands are used to submit work, along with a set of synchronization primitives used to constrain the order of submitted operations. Queues are intended for asynchronous execution of submitted workloads, and queue submission commands should return as soon as the work has been submitted, without waiting for the work to complete. Once submitted to a queue, work will begin and complete execution without further application intervention.

There are no implicit ordering constraints between queue operations on different queues, or between queues and the host, so these may operate in any order with respect to each other. Explicit ordering constraints between different queues or with the host can be expressed with semaphores and fences.

Many commands for queues are recorded into command buffers first, before the command buffers are then submitted to a queue for execution. Command buffer submissions to a single queue respect submission order and other implicit ordering guarantees, but otherwise may overlap or execute out of order. Other types of batches and queue submissions against a single queue (e.g. sparse memory binding) have no implicit ordering constraints with any other queue submission or batch. Additional explicit ordering constraints between queue submissions and individual batches can be expressed with semaphores and fences.

Before a fence or semaphore is signaled, it is guaranteed that any previously submitted queue operations have completed execution, and that memory writes from those queue operations are available to future queue operations. Waiting on a signaled semaphore or fence guarantees that previous writes that are available are also visible to subsequent commands.

Command buffer boundaries, both between primary command buffers of the same or different batches or submissions as well as between primary and secondary command buffers, do not introduce any additional ordering constraints. In other words, submitting the set of command buffers (which can include executing secondary command buffers) between any semaphore or fence operations execute the recorded commands as if they had all been recorded into a single primary command buffer, except that the current state is reset on each boundary. Explicit ordering constraints can be expressed with explicit synchronization primitives.

There are a few implicit ordering guarantees between commands within a command buffer, but only covering a subset of execution. Additional explicit ordering constraints can be expressed with the various explicit synchronization primitives.

Note | Implementations have significant freedom to overlap execution of work submitted to a queue, and this is common due to deep pipelining and parallelism in Vulkan devices.

Commands recorded in command buffers can perform actions, set state that persists across commands, synchronize other commands, or indirectly launch other commands, with some commands fulfilling several of these roles. The “Command Properties” section for each such command lists which of these roles the command takes:

Action

  Action commands perform operations that can update values in memory. E.g. draw commands, dispatch commands.

State

  State setting commands update the current state of a command buffer, affecting the operation of future action commands.

Synchronization

  Synchronization commands impose ordering constraints on action commands, by introducing explicit execution and memory dependencies.

Indirection

  Indirection commands execute other commands which were not directly recorded in the same command buffer.

Note | In the absence of explicit synchronization or implicit ordering guarantees, action commands may overlap execution or execute out of order, potentially leading to data races. However, such reordering does not affect the current state observed by any action command. Each action command uses the state in effect at the point where the command occurs in the command buffer, regardless of when it is executed.

### 3.3. Object Model

The devices, queues, and other entities in Vulkan are represented by Vulkan objects. At the API level, all objects are referred to by handles. There are two classes of handles: dispatchable and non-dispatchable. Dispatchable handle types are a pointer to an opaque type. This pointer may be used by layers as part of intercepting API commands, and thus each API command takes a dispatchable type as its first parameter. Each object of a dispatchable type must have a unique handle value during its lifetime.

Non-dispatchable handle types are a 64-bit integer type whose meaning is implementation-dependent. If the `privateData` feature is enabled for a VkDevice, each object of a non-dispatchable type created on that device must have a handle value that is unique among objects created on that device, for the duration of the object’s lifetime. Otherwise, non-dispatchable handles may encode object information directly in the handle rather than acting as a reference to an underlying object, and thus may not have unique handle values. If handle values are not unique, then destroying one such handle must not cause identical handles of other types to become invalid, and must not cause identical handles of the same type to become invalid if that handle value has been created more times than it has been destroyed.

All objects created or allocated from a `VkDevice` (i.e. with a `VkDevice` as the first parameter) are private to that device, and must not be used on other devices.

#### 3.3.1. Object Lifetime

Objects are created or allocated by `vkCreate*` and `vkAllocate*` commands, respectively. Once an object is created or allocated, its “structure” is considered to be immutable, though the content of certain object types is still free to change. When an object is passed to another command, it may be accessed by the implementation, which may include both read and write access unless explicitly stated otherwise. Objects are destroyed or freed by `vkDestroy*` and `vkFree*` commands, respectively.

Objects that are allocated (rather than created) take resources from an existing pool object or memory heap, and when freed return resources to that pool or heap. While object creation and destruction are generally expected to be low-frequency occurrences during runtime, allocating and freeing objects can occur at high frequency. Pool objects help accommodate improved performance of the allocations and frees.

Applications are responsible for managing the lifetimes of Vulkan objects and memory passed into the Vulkan API. The access semantics of different functions in the API follow a typical pattern as laid out below, with any exceptions listed with the commands or objects that have them.

Application-owned memory and Vulkan objects may be accessed at any time during the execution of a command they are passed to. Vulkan objects that device addresses are retrieved from may be accessed by the implementation any time that memory backing the device address is accessed. Device addresses and Vulkan objects passed in during the creation or allocation of another object may be accessed by the implementation any time that the created/allocated object is accessed unless explicitly stated otherwise. Device addresses and Vulkan objects passed to a recording command (`vkCmd*`) may be accessed at any time during the execution of the command, when the command buffer is subsequently recorded into another command buffer, during any subsequent command that is recorded to either the command buffer or one it is recorded into, or while the command buffer is in the pending state, unless explicitly stated otherwise. If an application is using deferred host operations in a command, and that operation is successfully deferred, objects and memory passed to that command may be accessed at any time until the deferred operation is complete. Some additional operations hold references to other objects or application-owned memory beyond the duration of the command; in which case the access semantics and lifetime of those references are described by that command.

When destroying or freeing an object, implementations must not access any memory or other objects that may otherwise be accessed when the object is accessed. Applications can free or destroy objects in any order, except that parent objects must be freed only after all child objects are freed. An object is the parent of another child object if the parent was used as the first object parameter in the creation of the child. Once an object is freed or destroyed it must not be accessed again, either directly or via access through another object. Applications must not free or destroy any object while it is being accessed.

#### 3.3.2. External Object Handles

As defined above, the scope of object handles created or allocated from a `VkDevice` is limited to that logical device. Objects which are not in scope are said to be external. To bring an external object into scope, an external handle must be exported from the object in the source scope and imported into the destination scope.

Note | The scope of external handles and their associated resources may vary according to their type, but they can generally be shared across process and API boundaries.

### 3.4. Application Binary Interface

The mechanism by which Vulkan is made available to applications is platform- or implementation- defined. On many platforms the C interface described in this Specification is provided by a shared library. Since shared libraries can be changed independently of the applications that use them, they present particular compatibility challenges, and this Specification places some requirements on them.

Shared library implementations must use the default Application Binary Interface (ABI) of the standard C compiler for the platform, or provide customized API headers that cause application code to use the implementation’s non-default ABI. An ABI in this context means the size, alignment, and layout of C data types; the procedure calling convention; and the naming convention for shared library symbols corresponding to C functions. Customizing the calling convention for a platform is usually accomplished by defining calling convention macros appropriately in `vk_platform.h`.

On platforms where Vulkan is provided as a shared library, library symbols beginning with “vk” and followed by a digit or uppercase letter are reserved for use by the implementation. Applications which use Vulkan must not provide definitions of these symbols. This allows the Vulkan shared library to be updated with additional symbols for new API versions or extensions without causing symbol conflicts with existing applications.

Shared library implementations should provide library symbols for commands in the highest version of this Specification they support, and for Window System Integration extensions relevant to the platform. They may also provide library symbols for commands defined by additional extensions.

Note | These requirements and recommendations are intended to allow implementors to take advantage of platform-specific conventions for SDKs, ABIs, library versioning mechanisms, etc. while still minimizing the code changes necessary to port applications or libraries between platforms. Platform vendors, or providers of the de facto standard Vulkan shared library for a platform, are encouraged to document what symbols the shared library provides and how it will be versioned when new symbols are added. Applications should only rely on shared library symbols for commands in the minimum core version required by the application. vkGetInstanceProcAddr and vkGetDeviceProcAddr should be used to obtain function pointers for commands in core versions beyond the application’s minimum required version.

### 3.5. Command Syntax and Duration

The Specification describes Vulkan commands as functions or procedures using C99 syntax. Language bindings for other languages such as C++ and JavaScript may allow for stricter parameter passing, or object-oriented interfaces.

Vulkan uses the standard C types for the base type of scalar parameters (e.g. types from `<stdint.h>`), with exceptions described below, or elsewhere in the text when appropriate:

VkBool32 represents boolean `True` and `False` values, since C does not have a sufficiently portable built-in boolean type:

    // Provided by VK_VERSION_1_0
    typedef uint32_t VkBool32;

VK_TRUE represents a boolean True (unsigned integer 1) value, and VK_FALSE a boolean False (unsigned integer 0) value.

All values returned from a Vulkan implementation in a VkBool32 will be either VK_TRUE or VK_FALSE.

Applications must not pass any other values than VK_TRUE or VK_FALSE into a Vulkan implementation where a VkBool32 is expected.

VK_TRUE is a constant representing a VkBool32 True value.

    #define VK_TRUE                           1U

VK_FALSE is a constant representing a VkBool32 False value.

    #define VK_FALSE                          0U

VkDeviceSize represents device memory size and offset values:

    // Provided by VK_VERSION_1_0
    typedef uint64_t VkDeviceSize;

VkDeviceAddress represents device buffer address values:

    // Provided by VK_VERSION_1_0
    typedef uint64_t VkDeviceAddress;

Valid Usage

- VUID-VkDeviceAddress-size-11364
  A valid VkDeviceAddress must be equal to the sum of an address retrieved from a VkBuffer via vkGetBufferDeviceAddress, and any offset in the range [0, `size`), where `size` is the value of VkBufferCreateInfo::`size` used to create that VkBuffer

- VUID-VkDeviceAddress-None-10894
  If a VkDeviceAddress was retrieved from a non-sparse buffer, that buffer must be bound completely and contiguously to a single `VkDeviceMemory` object

Commands that create Vulkan objects are of the form `vkCreate*` and take `Vk*CreateInfo` structures with the parameters needed to create the object. These Vulkan objects are destroyed with commands of the form `vkDestroy*`.

The last in-parameter to each command that creates or destroys a Vulkan object is `pAllocator`. The `pAllocator` parameter can be a non-`NULL` value, in which case allocations for the given object are delegated to an application provided callback. Refer to the Memory Allocation chapter for further details.

Commands that allocate Vulkan objects owned by pool objects are of the form `vkAllocate*`, and take `Vk*AllocateInfo` structures. These Vulkan objects are freed with commands of the form `vkFree*`. These objects do not take allocators; if host memory is needed, they will use the allocator that was specified when their parent pool was created.

Commands are recorded into a command buffer by calling API commands of the form `vkCmd*`. Each such command may have different restrictions on where it can be used: in a primary and/or secondary command buffer, inside and/or outside a render pass, and in one or more of the supported queue types. These restrictions are documented together with the definition of each such command.

The duration of a Vulkan command refers to the interval between calling the command and its return to the caller.

#### 3.5.1. Lifetime of Retrieved Results

Information is retrieved from the implementation with commands of the form `vkGet*` and `vkEnumerate*`.

Unless otherwise specified for an individual command, the results are invariant; that is, they will remain unchanged when retrieved again by calling the same command with the same parameters, so long as those parameters themselves all remain valid.

#### 3.5.2. Array Results

Some query commands of the form `vkGet*` and `vkEnumerate*` enable retrieving multiple results in the form of a return array. Such commands typically have two pointer arguments as follows:

- An element count pointer pointing to an integer variable, conventionally named as `p*Count` where `*` is the capitalized singular form of the name of the retrieved values.

- A pointer to an array where the result array is retrieved, conventionally named as `p*` where `*` is the capitalized plural form of the name of the retrieved values.

If such commands are called with the array pointer set to `NULL`, then the number of retrievable elements is returned in the variable pointed to by the element count pointer. Otherwise, the element count pointer must point to a variable set by the application to the number of elements in the return array, and on return the variable is overwritten with the number of elements actually written to the return array. If the input element count is less than the number of retrievable array elements, the query will write only as many elements to the return array as specified by the element count variable set by the application, and the command will return VK_INCOMPLETE instead of VK_SUCCESS, to indicate that not all retrievable array elements were returned.

Note | In practice, this means that applications will typically call such query commands twice: First, with the array pointer set to `NULL`, to retrieve the number of retrievable elements. Second, with the array pointer pointing to an application allocated storage for at least as many elements as indicated by the variable pointed to by the element count pointer, to retrieve at most as many of the retrievable elements.

Query commands that return one or more structures, regardless of whether they return a single or an array of structures with or without a `pNext` chain, may also contain arrays within those structures. Such return arrays are typically defined in the form of two members as follows:

- An integer value specifying the element count, conventionally named as `*Count` where `*` is the singular form of the name of the retrieved values.

- A pointer to an array where the result array is retrieved, conventionally named as `p*` where `*` is the capitalized plural form of the name of the retrieved values.

Analogously to query commands that return multiple results, if the command is called with the array pointer member of the output structure in question set to `NULL`, then the number of retrievable elements is returned in the element count member of that output structure. Otherwise, the element count must specify the number of elements in the return array, and on return the element count member is overwritten with the number of elements actually written to the return array. If the input element count is less than the number of retrievable array elements, the query will write only as many elements to the return array as specified by the input element count, and the command will return VK_INCOMPLETE instead of VK_SUCCESS, if the query command has a VkResult return type, to indicate that not all retrievable array elements were returned.

Note | Applications need to separately track the value they provided as the input element count member for such arrays and compare those with the returned element counts in order to determine whether the actually returned element count is smaller than the size of the return array. Another side effect of this is that it is impossible for the application to determine if the number of retrievable elements has increased beyond the provided input element count so using return arrays in output structures should be limited to invariant array results. In practice, this means that applications will typically call such query commands multiple times: First, with the array pointer member(s) set to `NULL`, to retrieve the number(s) of retrievable elements. Second, with the array pointer(s) pointing to an application allocated storage for at least as many elements as indicated by the element count member(s), to retrieve at most as many of the retrievable elements. Then the process may need to be repeated for all other newly introduced return arrays in any nested output structures indirectly specified through the previously retrieved result arrays.

Regardless of the type of query command, any array pointer member of an output structure must either be `NULL`, or point to an application-allocated array. Query commands must not return a pointer to implementation allocated storage in any output structure.

#### 3.5.3. Opaque Binary Data Results

Some query commands of the form `vkGet*` retrieve opaque binary data in the form of a byte array and have a possible result code of VK_ERROR_NOT_ENOUGH_SPACE_KHR. Such commands always have two pointer arguments as follows:

- A binary data size pointer pointing to a `size_t` variable, conventionally named as `p*Size` where `*` is the capitalized form of the name of the retrieved binary data.

- A pointer to a byte array where the binary data is retrieved, conventionally named as `p*` where `*` is the capitalized form of the name of the retrieved binary data.

If such commands are called with the binary pointer not set to `NULL`, the binary size pointer must point to a variable set by the application to the allocated size of the binary pointer. These arguments may also be placed in an extensible structure, in which case the binary data size argument is not a pointer.

If the input binary size is less than the total retrievable binary size, the query will not write any data to the location pointed to the binary pointer, and the command will return VK_ERROR_NOT_ENOUGH_SPACE_KHR instead of VK_SUCCESS.

If the return code is VK_SUCCESS or VK_ERROR_NOT_ENOUGH_SPACE_KHR, the total size of the binary data that can be retrieved is returned in the variable pointed to by the binary size pointer.

If multiple binaries are being retrieved, VK_ERROR_NOT_ENOUGH_SPACE_KHR will be returned if any input binary sizes are less than their respective total retrievable binary sizes. Unless otherwise specified, this command will determine writing data to each binary individually based on if their input binary sizes are sufficiently sized, following the behavior for single binary retrieval.

For all other error codes, the contents of the return structures are undefined.

Note | If VK_ERROR_NOT_ENOUGH_SPACE_KHR is returned with a command that returns multiple binaries, the application can determine which binaries are undersized by comparing the total binary size that is returned for each binary against the allocated size that was provided to the command.

Note | Some binary queries do not behave consistently with this pattern for historical reasons, primarily that the VK_ERROR_NOT_ENOUGH_SPACE_KHR error code was not defined until after those queries were written. A NOTE is added to each such query, describing such inconsistent behavior.

### 3.6. Threading Behavior

Vulkan is intended to provide scalable performance when used on multiple host threads. All commands support being called concurrently from multiple threads, but certain parameters, or components of parameters are defined to be externally synchronized. This means that the caller must guarantee that no more than one thread is using such a parameter at a given time.

More precisely, Vulkan commands use simple stores to update the state of Vulkan objects. The implementation may not synchronize accesses to memory parameters or object parameters declared as externally synchronized with other accesses. If two commands access the same object or memory and at least one of the commands declares the object to be externally synchronized, then the caller must guarantee not only that the commands do not execute simultaneously, but also that the two commands are separated by an appropriate memory barrier (if needed). Similarly, if a Vulkan command accesses a non-const memory parameter and the application also accesses that memory, or if the application writes to that memory and the command accesses it as a const memory parameter, the application must ensure the accesses are properly synchronized with a memory barrier if needed.

Note | Memory barriers are particularly relevant for hosts based on the ARM CPU architecture, which is more weakly ordered than many developers are accustomed to from x86/x64 programming. Fortunately, most higher-level synchronization primitives (like the pthread library) perform memory barriers as a part of mutual exclusion, so mutexing Vulkan objects via these primitives will have the desired effect.

Any object parameters that are not labeled as externally synchronized are either not mutated by the command or are internally synchronized. Additionally, certain objects related to a command’s parameters (e.g. command pools and descriptor pools) may be affected by a command, and must also be externally synchronized. These implicit parameters are documented as described below.

Parameters of commands that are externally synchronized are listed below.

Externally Synchronized Parameters and Members

- The `instance` parameter in vkDestroyInstance

- The `device` parameter in vkDestroyDevice

- The `queue` parameter in vkQueueSubmit, if it was not created with VK_DEVICE_QUEUE_CREATE_INTERNALLY_SYNCHRONIZED_BIT_KHR

- The `fence` parameter in vkQueueSubmit

- The `queue` parameter in vkQueueWaitIdle, if it was not created with VK_DEVICE_QUEUE_CREATE_INTERNALLY_SYNCHRONIZED_BIT_KHR

- The `memory` parameter in vkFreeMemory

- The `memory` parameter in vkMapMemory

- The `memory` parameter in vkUnmapMemory

- The `buffer` parameter in vkBindBufferMemory

- The `image` parameter in vkBindImageMemory

- The `queue` parameter in vkQueueBindSparse, if it was not created with VK_DEVICE_QUEUE_CREATE_INTERNALLY_SYNCHRONIZED_BIT_KHR

- The `fence` parameter in vkQueueBindSparse

- The `fence` parameter in vkDestroyFence

- The `semaphore` parameter in vkDestroySemaphore

- The `queryPool` parameter in vkDestroyQueryPool

- The `buffer` parameter in vkDestroyBuffer

- The `image` parameter in vkDestroyImage

- The `imageView` parameter in vkDestroyImageView

- The `commandPool` parameter in vkDestroyCommandPool

- The `commandPool` parameter in vkResetCommandPool

- The `commandPool` parameter in vkFreeCommandBuffers

- The `commandBuffer` parameter in vkBeginCommandBuffer

- The `commandBuffer` parameter in vkEndCommandBuffer

- The `commandBuffer` parameter in vkResetCommandBuffer

- The `commandBuffer` parameter in vkCmdCopyBuffer

- The `commandBuffer` parameter in vkCmdCopyImage

- The `commandBuffer` parameter in vkCmdCopyBufferToImage

- The `commandBuffer` parameter in vkCmdCopyImageToBuffer

- The `commandBuffer` parameter in vkCmdUpdateBuffer

- The `commandBuffer` parameter in vkCmdFillBuffer

- The `commandBuffer` parameter in vkCmdPipelineBarrier

- The `commandBuffer` parameter in vkCmdBeginQuery

- The `commandBuffer` parameter in vkCmdEndQuery

- The `commandBuffer` parameter in vkCmdResetQueryPool

- The `commandBuffer` parameter in vkCmdWriteTimestamp

- The `commandBuffer` parameter in vkCmdCopyQueryPoolResults

- The `commandBuffer` parameter in vkCmdExecuteCommands

- The `event` parameter in vkDestroyEvent

- The `event` parameter in vkSetEvent

- The `event` parameter in vkResetEvent

- The `bufferView` parameter in vkDestroyBufferView

- The `shaderModule` parameter in vkDestroyShaderModule

- The `pipelineCache` parameter in vkDestroyPipelineCache

- The `dstCache` parameter in vkMergePipelineCaches, conditionally1

- The `pipelineCache` parameter in vkCreateComputePipelines, conditionally1

- The `pipeline` parameter in vkDestroyPipeline

- The `pipelineLayout` parameter in vkDestroyPipelineLayout

- The `sampler` parameter in vkDestroySampler

- The `descriptorSetLayout` parameter in vkDestroyDescriptorSetLayout

- The `descriptorPool` parameter in vkDestroyDescriptorPool

- The `descriptorPool` parameter in vkResetDescriptorPool

- The `descriptorPool` parameter in vkFreeDescriptorSets

- The `commandBuffer` parameter in vkCmdBindPipeline

- The `commandBuffer` parameter in vkCmdBindDescriptorSets

- The `commandBuffer` parameter in vkCmdClearColorImage

- The `commandBuffer` parameter in vkCmdDispatch

- The `commandBuffer` parameter in vkCmdDispatchIndirect

- The `commandBuffer` parameter in vkCmdSetEvent

- The `commandBuffer` parameter in vkCmdResetEvent

- The `commandBuffer` parameter in vkCmdWaitEvents

- The `commandBuffer` parameter in vkCmdPushConstants

- The `pipelineCache` parameter in vkCreateGraphicsPipelines, conditionally1

- The `framebuffer` parameter in vkDestroyFramebuffer

- The `renderPass` parameter in vkDestroyRenderPass

- The `commandBuffer` parameter in vkCmdSetViewport

- The `commandBuffer` parameter in vkCmdSetScissor

- The `commandBuffer` parameter in vkCmdSetLineWidth

- The `commandBuffer` parameter in vkCmdSetDepthBias

- The `commandBuffer` parameter in vkCmdSetBlendConstants

- The `commandBuffer` parameter in vkCmdSetDepthBounds

- The `commandBuffer` parameter in vkCmdSetStencilCompareMask

- The `commandBuffer` parameter in vkCmdSetStencilWriteMask

- The `commandBuffer` parameter in vkCmdSetStencilReference

- The `commandBuffer` parameter in vkCmdBindIndexBuffer

- The `commandBuffer` parameter in vkCmdBindVertexBuffers

- The `commandBuffer` parameter in vkCmdDraw

- The `commandBuffer` parameter in vkCmdDrawIndexed

- The `commandBuffer` parameter in vkCmdDrawIndirect

- The `commandBuffer` parameter in vkCmdDrawIndexedIndirect

- The `commandBuffer` parameter in vkCmdBlitImage

- The `commandBuffer` parameter in vkCmdClearDepthStencilImage

- The `commandBuffer` parameter in vkCmdClearAttachments

- The `commandBuffer` parameter in vkCmdResolveImage

- The `commandBuffer` parameter in vkCmdBeginRenderPass

- The `commandBuffer` parameter in vkCmdNextSubpass

- The `commandBuffer` parameter in vkCmdEndRenderPass

- The `commandBuffer` parameter in vkCmdSetDeviceMask

- The `commandPool` parameter in vkTrimCommandPool

- The `commandBuffer` parameter in vkCmdDispatchBase

- The `descriptorUpdateTemplate` parameter in vkDestroyDescriptorUpdateTemplate

- The `descriptorSet` parameter in vkUpdateDescriptorSetWithTemplate, conditionally1

- The `ycbcrConversion` parameter in vkDestroySamplerYcbcrConversion

- The `commandBuffer` parameter in vkCmdDrawIndirectCount

- The `commandBuffer` parameter in vkCmdDrawIndexedIndirectCount

- The `commandBuffer` parameter in vkCmdBeginRenderPass2

- The `commandBuffer` parameter in vkCmdNextSubpass2

- The `commandBuffer` parameter in vkCmdEndRenderPass2

- The `privateDataSlot` parameter in vkDestroyPrivateDataSlot

- The `commandBuffer` parameter in vkCmdPipelineBarrier2

- The `commandBuffer` parameter in vkCmdWriteTimestamp2

- The `queue` parameter in vkQueueSubmit2, if it was not created with VK_DEVICE_QUEUE_CREATE_INTERNALLY_SYNCHRONIZED_BIT_KHR

- The `fence` parameter in vkQueueSubmit2

- The `commandBuffer` parameter in vkCmdCopyBuffer2

- The `commandBuffer` parameter in vkCmdCopyImage2

- The `commandBuffer` parameter in vkCmdCopyBufferToImage2

- The `commandBuffer` parameter in vkCmdCopyImageToBuffer2

- The `commandBuffer` parameter in vkCmdSetEvent2

- The `commandBuffer` parameter in vkCmdResetEvent2

- The `commandBuffer` parameter in vkCmdWaitEvents2

- The `commandBuffer` parameter in vkCmdBlitImage2

- The `commandBuffer` parameter in vkCmdResolveImage2

- The `commandBuffer` parameter in vkCmdBeginRendering

- The `commandBuffer` parameter in vkCmdEndRendering

- The `commandBuffer` parameter in vkCmdSetCullMode

- The `commandBuffer` parameter in vkCmdSetFrontFace

- The `commandBuffer` parameter in vkCmdSetPrimitiveTopology

- The `commandBuffer` parameter in vkCmdSetViewportWithCount

- The `commandBuffer` parameter in vkCmdSetScissorWithCount

- The `commandBuffer` parameter in vkCmdBindVertexBuffers2

- The `commandBuffer` parameter in vkCmdSetDepthTestEnable

- The `commandBuffer` parameter in vkCmdSetDepthWriteEnable

- The `commandBuffer` parameter in vkCmdSetDepthCompareOp

- The `commandBuffer` parameter in vkCmdSetDepthBoundsTestEnable

- The `commandBuffer` parameter in vkCmdSetStencilTestEnable

- The `commandBuffer` parameter in vkCmdSetStencilOp

- The `commandBuffer` parameter in vkCmdSetRasterizerDiscardEnable

- The `commandBuffer` parameter in vkCmdSetDepthBiasEnable

- The `commandBuffer` parameter in vkCmdSetPrimitiveRestartEnable

- The `commandBuffer` parameter in vkCmdPushDescriptorSet

- The `commandBuffer` parameter in vkCmdPushDescriptorSetWithTemplate

- The `commandBuffer` parameter in vkCmdBindDescriptorSets2

- The `commandBuffer` parameter in vkCmdPushConstants2

- The `commandBuffer` parameter in vkCmdPushDescriptorSet2

- The `commandBuffer` parameter in vkCmdPushDescriptorSetWithTemplate2

- The `commandBuffer` parameter in vkCmdSetLineStipple

- The `commandBuffer` parameter in vkCmdBindIndexBuffer2

- The `commandBuffer` parameter in vkCmdSetRenderingAttachmentLocations

- The `commandBuffer` parameter in vkCmdSetRenderingInputAttachmentIndices

- The `surface` parameter in vkDestroySurfaceKHR

- The `swapchain` parameter in vkDestroySwapchainKHR

- The `swapchain` parameter in vkAcquireNextImageKHR

- The `semaphore` parameter in vkAcquireNextImageKHR

- The `fence` parameter in vkAcquireNextImageKHR

- The `queue` parameter in vkQueuePresentKHR, if it was not created with VK_DEVICE_QUEUE_CREATE_INTERNALLY_SYNCHRONIZED_BIT_KHR

- The `surface` parameter in vkGetDeviceGroupSurfacePresentModesKHR

- The `surface` parameter in vkGetPhysicalDevicePresentRectanglesKHR

- The `display` parameter in vkCreateDisplayModeKHR

- The `mode` parameter in vkGetDisplayPlaneCapabilitiesKHR

- The `videoSession` parameter in vkDestroyVideoSessionKHR

- The `videoSession` parameter in vkBindVideoSessionMemoryKHR

- The `videoSessionParameters` parameter in vkDestroyVideoSessionParametersKHR

- The `commandBuffer` parameter in vkCmdBeginVideoCodingKHR

- The `commandBuffer` parameter in vkCmdEndVideoCodingKHR

- The `commandBuffer` parameter in vkCmdControlVideoCodingKHR

- The `commandBuffer` parameter in vkCmdDecodeVideoKHR

- The `commandBuffer` parameter in vkCmdBeginRenderingKHR

- The `commandBuffer` parameter in vkCmdEndRenderingKHR

- The `commandBuffer` parameter in vkCmdSetDeviceMaskKHR

- The `commandBuffer` parameter in vkCmdDispatchBaseKHR

- The `commandPool` parameter in vkTrimCommandPoolKHR

- The `commandBuffer` parameter in vkCmdPushDescriptorSetKHR

- The `commandBuffer` parameter in vkCmdPushDescriptorSetWithTemplateKHR

- The `descriptorUpdateTemplate` parameter in vkDestroyDescriptorUpdateTemplateKHR

- The `descriptorSet` parameter in vkUpdateDescriptorSetWithTemplateKHR, conditionally1

- The `commandBuffer` parameter in vkCmdBeginRenderPass2KHR

- The `commandBuffer` parameter in vkCmdNextSubpass2KHR

- The `commandBuffer` parameter in vkCmdEndRenderPass2KHR

- The `swapchain` parameter in vkGetSwapchainStatusKHR

- The `ycbcrConversion` parameter in vkDestroySamplerYcbcrConversionKHR

- The `commandBuffer` parameter in vkCmdDrawIndirectCountKHR

- The `commandBuffer` parameter in vkCmdDrawIndexedIndirectCountKHR

- The `commandBuffer` parameter in vkCmdSetFragmentShadingRateKHR

- The `commandBuffer` parameter in vkCmdSetRenderingAttachmentLocationsKHR

- The `commandBuffer` parameter in vkCmdSetRenderingInputAttachmentIndicesKHR

- The `swapchain` parameter in vkWaitForPresentKHR

- The `operation` parameter in vkDestroyDeferredOperationKHR

- The `commandBuffer` parameter in vkCmdEncodeVideoKHR

- The `commandBuffer` parameter in vkCmdSetEvent2KHR

- The `commandBuffer` parameter in vkCmdResetEvent2KHR

- The `commandBuffer` parameter in vkCmdWaitEvents2KHR

- The `commandBuffer` parameter in vkCmdPipelineBarrier2KHR

- The `commandBuffer` parameter in vkCmdWriteTimestamp2KHR

- The `queue` parameter in vkQueueSubmit2KHR, if it was not created with VK_DEVICE_QUEUE_CREATE_INTERNALLY_SYNCHRONIZED_BIT_KHR

- The `fence` parameter in vkQueueSubmit2KHR

- The `commandBuffer` parameter in vkCmdBindIndexBuffer3KHR

- The `commandBuffer` parameter in vkCmdBindVertexBuffers3KHR

- The `commandBuffer` parameter in vkCmdDrawIndirect2KHR

- The `commandBuffer` parameter in vkCmdDrawIndexedIndirect2KHR

- The `commandBuffer` parameter in vkCmdDispatchIndirect2KHR

- The `commandBuffer` parameter in vkCmdCopyMemoryKHR

- The `commandBuffer` parameter in vkCmdCopyMemoryToImageKHR

- The `commandBuffer` parameter in vkCmdCopyImageToMemoryKHR

- The `commandBuffer` parameter in vkCmdUpdateMemoryKHR

- The `commandBuffer` parameter in vkCmdFillMemoryKHR

- The `commandBuffer` parameter in vkCmdCopyQueryPoolResultsToMemoryKHR

- The `commandBuffer` parameter in vkCmdDrawIndirectCount2KHR

- The `commandBuffer` parameter in vkCmdDrawIndexedIndirectCount2KHR

- The `commandBuffer` parameter in vkCmdBeginConditionalRendering2EXT

- The `commandBuffer` parameter in vkCmdBindTransformFeedbackBuffers2EXT

- The `commandBuffer` parameter in vkCmdBeginTransformFeedback2EXT

- The `commandBuffer` parameter in vkCmdEndTransformFeedback2EXT

- The `commandBuffer` parameter in vkCmdDrawIndirectByteCount2EXT

- The `commandBuffer` parameter in vkCmdDrawMeshTasksIndirect2EXT

- The `commandBuffer` parameter in vkCmdDrawMeshTasksIndirectCount2EXT

- The `commandBuffer` parameter in vkCmdWriteMarkerToMemoryAMD

- The `commandBuffer` parameter in vkCmdCopyBuffer2KHR

- The `commandBuffer` parameter in vkCmdCopyImage2KHR

- The `commandBuffer` parameter in vkCmdCopyBufferToImage2KHR

- The `commandBuffer` parameter in vkCmdCopyImageToBuffer2KHR

- The `commandBuffer` parameter in vkCmdBlitImage2KHR

- The `commandBuffer` parameter in vkCmdResolveImage2KHR

- The `commandBuffer` parameter in vkCmdTraceRaysIndirect2KHR

- The `commandBuffer` parameter in vkCmdBindIndexBuffer2KHR

- The `swapchain` parameter in vkWaitForPresent2KHR

- The `pipelineBinary` parameter in vkDestroyPipelineBinaryKHR

- The `commandBuffer` parameter in vkCmdSetLineStippleKHR

- The `commandBuffer` parameter in vkCmdBindDescriptorSets2KHR

- The `commandBuffer` parameter in vkCmdPushConstants2KHR

- The `commandBuffer` parameter in vkCmdPushDescriptorSet2KHR

- The `commandBuffer` parameter in vkCmdPushDescriptorSetWithTemplate2KHR

- The `commandBuffer` parameter in vkCmdSetDescriptorBufferOffsets2EXT

- The `commandBuffer` parameter in vkCmdBindDescriptorBufferEmbeddedSamplers2EXT

- The `commandBuffer` parameter in vkCmdCopyMemoryIndirectKHR

- The `commandBuffer` parameter in vkCmdCopyMemoryToImageIndirectKHR

- The `commandBuffer` parameter in vkCmdEndRendering2KHR

- The `callback` parameter in vkDestroyDebugReportCallbackEXT

- The `commandBuffer` parameter in vkCmdDebugMarkerBeginEXT

- The `commandBuffer` parameter in vkCmdDebugMarkerEndEXT

- The `commandBuffer` parameter in vkCmdDebugMarkerInsertEXT

- The `commandBuffer` parameter in vkCmdBindTransformFeedbackBuffersEXT

- The `commandBuffer` parameter in vkCmdBeginTransformFeedbackEXT

- The `commandBuffer` parameter in vkCmdEndTransformFeedbackEXT

- The `commandBuffer` parameter in vkCmdBeginQueryIndexedEXT

- The `commandBuffer` parameter in vkCmdEndQueryIndexedEXT

- The `commandBuffer` parameter in vkCmdDrawIndirectByteCountEXT

- The `commandBuffer` parameter in vkCmdDrawIndirectCountAMD

- The `commandBuffer` parameter in vkCmdDrawIndexedIndirectCountAMD

- The `commandBuffer` parameter in vkCmdBeginConditionalRenderingEXT

- The `commandBuffer` parameter in vkCmdEndConditionalRenderingEXT

- The `commandBuffer` parameter in vkCmdSetViewportWScalingNV

- The `swapchain` parameter in vkGetRefreshCycleDurationGOOGLE

- The `swapchain` parameter in vkGetPastPresentationTimingGOOGLE

- The `commandBuffer` parameter in vkCmdSetDiscardRectangleEXT

- The `commandBuffer` parameter in vkCmdSetDiscardRectangleEnableEXT

- The `commandBuffer` parameter in vkCmdSetDiscardRectangleModeEXT

- The `objectHandle` member of the `pNameInfo` parameter in vkSetDebugUtilsObjectNameEXT

- The `queue` parameter in vkQueueBeginDebugUtilsLabelEXT, if it was not created with VK_DEVICE_QUEUE_CREATE_INTERNALLY_SYNCHRONIZED_BIT_KHR

- The `queue` parameter in vkQueueEndDebugUtilsLabelEXT, if it was not created with VK_DEVICE_QUEUE_CREATE_INTERNALLY_SYNCHRONIZED_BIT_KHR

- The `queue` parameter in vkQueueInsertDebugUtilsLabelEXT, if it was not created with VK_DEVICE_QUEUE_CREATE_INTERNALLY_SYNCHRONIZED_BIT_KHR

- The `commandBuffer` parameter in vkCmdBeginDebugUtilsLabelEXT

- The `commandBuffer` parameter in vkCmdEndDebugUtilsLabelEXT

- The `commandBuffer` parameter in vkCmdInsertDebugUtilsLabelEXT

- The `messenger` parameter in vkDestroyDebugUtilsMessengerEXT

- The `gpaSession` parameter in vkDestroyGpaSessionAMD

- The `commandBuffer` parameter in vkCmdBeginGpaSessionAMD

- The `commandBuffer` parameter in vkCmdEndGpaSessionAMD

- The `commandBuffer` parameter in vkCmdBeginGpaSampleAMD

- The `commandBuffer` parameter in vkCmdEndGpaSampleAMD

- The `commandBuffer` parameter in vkCmdCopyGpaSessionResultsAMD

- The `pipelineCache` parameter in vkCreateExecutionGraphPipelinesAMDX, conditionally1

- The `commandBuffer` parameter in vkCmdBindSamplerHeapEXT

- The `commandBuffer` parameter in vkCmdBindResourceHeapEXT

- The `commandBuffer` parameter in vkCmdPushDataEXT

- The `commandBuffer` parameter in vkCmdSetSampleLocationsEXT

- The `validationCache` parameter in vkDestroyValidationCacheEXT

- The `dstCache` parameter in vkMergeValidationCachesEXT

- The `commandBuffer` parameter in vkCmdBindShadingRateImageNV

- The `commandBuffer` parameter in vkCmdSetViewportShadingRatePaletteNV

- The `commandBuffer` parameter in vkCmdSetCoarseSampleOrderNV

- The `accelerationStructure` parameter in vkDestroyAccelerationStructureNV

- The `commandBuffer` parameter in vkCmdBuildAccelerationStructureNV

- The `commandBuffer` parameter in vkCmdCopyAccelerationStructureNV

- The `commandBuffer` parameter in vkCmdTraceRaysNV

- The `pipelineCache` parameter in vkCreateRayTracingPipelinesNV, conditionally1

- The `commandBuffer` parameter in vkCmdWriteAccelerationStructuresPropertiesNV

- The `commandBuffer` parameter in vkCmdWriteBufferMarkerAMD

- The `commandBuffer` parameter in vkCmdWriteBufferMarker2AMD

- The `commandBuffer` parameter in vkCmdDrawMeshTasksNV

- The `commandBuffer` parameter in vkCmdDrawMeshTasksIndirectNV

- The `commandBuffer` parameter in vkCmdDrawMeshTasksIndirectCountNV

- The `commandBuffer` parameter in vkCmdSetExclusiveScissorEnableNV

- The `commandBuffer` parameter in vkCmdSetExclusiveScissorNV

- The `commandBuffer` parameter in vkCmdSetCheckpointNV

- The `swapchain` parameter in vkSetSwapchainPresentTimingQueueSizeEXT

- The `swapchain` parameter in vkGetSwapchainTimingPropertiesEXT

- The `swapchain` parameter in vkGetSwapchainTimeDomainPropertiesEXT

- The `commandBuffer` parameter in vkCmdSetPerformanceMarkerINTEL

- The `commandBuffer` parameter in vkCmdSetPerformanceStreamMarkerINTEL

- The `commandBuffer` parameter in vkCmdSetPerformanceOverrideINTEL

- The `configuration` parameter in vkReleasePerformanceConfigurationINTEL

- The `queue` parameter in vkQueueSetPerformanceConfigurationINTEL, if it was not created with VK_DEVICE_QUEUE_CREATE_INTERNALLY_SYNCHRONIZED_BIT_KHR

- The `commandBuffer` parameter in vkCmdSetLineStippleEXT

- The `commandBuffer` parameter in vkCmdSetCullModeEXT

- The `commandBuffer` parameter in vkCmdSetFrontFaceEXT

- The `commandBuffer` parameter in vkCmdSetPrimitiveTopologyEXT

- The `commandBuffer` parameter in vkCmdSetViewportWithCountEXT

- The `commandBuffer` parameter in vkCmdSetScissorWithCountEXT

- The `commandBuffer` parameter in vkCmdBindVertexBuffers2EXT

- The `commandBuffer` parameter in vkCmdSetDepthTestEnableEXT

- The `commandBuffer` parameter in vkCmdSetDepthWriteEnableEXT

- The `commandBuffer` parameter in vkCmdSetDepthCompareOpEXT

- The `commandBuffer` parameter in vkCmdSetDepthBoundsTestEnableEXT

- The `commandBuffer` parameter in vkCmdSetStencilTestEnableEXT

- The `commandBuffer` parameter in vkCmdSetStencilOpEXT

- The `commandBuffer` parameter in vkCmdPreprocessGeneratedCommandsNV

- The `commandBuffer` parameter in vkCmdExecuteGeneratedCommandsNV

- The `commandBuffer` parameter in vkCmdBindPipelineShaderGroupNV

- The `indirectCommandsLayout` parameter in vkDestroyIndirectCommandsLayoutNV

- The `commandBuffer` parameter in vkCmdSetDepthBias2EXT

- The `privateDataSlot` parameter in vkDestroyPrivateDataSlotEXT

- The `queue` parameter in vkQueueSetPerfHintQCOM, if it was not created with VK_DEVICE_QUEUE_CREATE_INTERNALLY_SYNCHRONIZED_BIT_KHR

- The `commandBuffer` parameter in vkCmdBindDescriptorBuffersEXT

- The `commandBuffer` parameter in vkCmdSetDescriptorBufferOffsetsEXT

- The `commandBuffer` parameter in vkCmdBindDescriptorBufferEmbeddedSamplersEXT

- The `commandBuffer` parameter in vkCmdSetFragmentShadingRateEnumNV

- The `commandBuffer` parameter in vkCmdSetVertexInputEXT

- The `commandBuffer` parameter in vkCmdSubpassShadingHUAWEI

- The `commandBuffer` parameter in vkCmdBindInvocationMaskHUAWEI

- The `commandBuffer` parameter in vkCmdSetPatchControlPointsEXT

- The `commandBuffer` parameter in vkCmdSetRasterizerDiscardEnableEXT

- The `commandBuffer` parameter in vkCmdSetDepthBiasEnableEXT

- The `commandBuffer` parameter in vkCmdSetLogicOpEXT

- The `commandBuffer` parameter in vkCmdSetPrimitiveRestartEnableEXT

- The `commandBuffer` parameter in vkCmdSetColorWriteEnableEXT

- The `commandBuffer` parameter in vkCmdDrawMultiEXT

- The `commandBuffer` parameter in vkCmdDrawMultiIndexedEXT

- The `micromap` parameter in vkDestroyMicromapEXT

- The `commandBuffer` parameter in vkCmdBuildMicromapsEXT

- The `commandBuffer` parameter in vkCmdCopyMicromapEXT

- The `commandBuffer` parameter in vkCmdCopyMicromapToMemoryEXT

- The `commandBuffer` parameter in vkCmdCopyMemoryToMicromapEXT

- The `commandBuffer` parameter in vkCmdWriteMicromapsPropertiesEXT

- The `commandBuffer` parameter in vkCmdDrawClusterHUAWEI

- The `commandBuffer` parameter in vkCmdDrawClusterIndirectHUAWEI

- The `commandBuffer` parameter in vkCmdSetDispatchParametersARM

- The `commandBuffer` parameter in vkCmdCopyMemoryIndirectNV

- The `commandBuffer` parameter in vkCmdCopyMemoryToImageIndirectNV

- The `commandBuffer` parameter in vkCmdDecompressMemoryNV

- The `commandBuffer` parameter in vkCmdDecompressMemoryIndirectCountNV

- The `commandBuffer` parameter in vkCmdUpdatePipelineIndirectBufferNV

- The `commandBuffer` parameter in vkCmdSetDepthClampEnableEXT

- The `commandBuffer` parameter in vkCmdSetPolygonModeEXT

- The `commandBuffer` parameter in vkCmdSetRasterizationSamplesEXT

- The `commandBuffer` parameter in vkCmdSetSampleMaskEXT

- The `commandBuffer` parameter in vkCmdSetAlphaToCoverageEnableEXT

- The `commandBuffer` parameter in vkCmdSetAlphaToOneEnableEXT

- The `commandBuffer` parameter in vkCmdSetLogicOpEnableEXT

- The `commandBuffer` parameter in vkCmdSetColorBlendEnableEXT

- The `commandBuffer` parameter in vkCmdSetColorBlendEquationEXT

- The `commandBuffer` parameter in vkCmdSetColorWriteMaskEXT

- The `commandBuffer` parameter in vkCmdSetTessellationDomainOriginEXT

- The `commandBuffer` parameter in vkCmdSetRasterizationStreamEXT

- The `commandBuffer` parameter in vkCmdSetConservativeRasterizationModeEXT

- The `commandBuffer` parameter in vkCmdSetExtraPrimitiveOverestimationSizeEXT

- The `commandBuffer` parameter in vkCmdSetDepthClipEnableEXT

- The `commandBuffer` parameter in vkCmdSetSampleLocationsEnableEXT

- The `commandBuffer` parameter in vkCmdSetColorBlendAdvancedEXT

- The `commandBuffer` parameter in vkCmdSetProvokingVertexModeEXT

- The `commandBuffer` parameter in vkCmdSetLineRasterizationModeEXT

- The `commandBuffer` parameter in vkCmdSetLineStippleEnableEXT

- The `commandBuffer` parameter in vkCmdSetDepthClipNegativeOneToOneEXT

- The `commandBuffer` parameter in vkCmdSetViewportWScalingEnableNV

- The `commandBuffer` parameter in vkCmdSetViewportSwizzleNV

- The `commandBuffer` parameter in vkCmdSetCoverageToColorEnableNV

- The `commandBuffer` parameter in vkCmdSetCoverageToColorLocationNV

- The `commandBuffer` parameter in vkCmdSetCoverageModulationModeNV

- The `commandBuffer` parameter in vkCmdSetCoverageModulationTableEnableNV

- The `commandBuffer` parameter in vkCmdSetCoverageModulationTableNV

- The `commandBuffer` parameter in vkCmdSetShadingRateImageEnableNV

- The `commandBuffer` parameter in vkCmdSetRepresentativeFragmentTestEnableNV

- The `commandBuffer` parameter in vkCmdSetCoverageReductionModeNV

- The `tensor` parameter in vkDestroyTensorARM

- The `tensorView` parameter in vkDestroyTensorViewARM

- The `commandBuffer` parameter in vkCmdCopyTensorARM

- The `shader` parameter in vkDestroyShaderEXT

- The `commandBuffer` parameter in vkCmdBindShadersEXT

- The `commandBuffer` parameter in vkCmdSetDepthClampRangeEXT

- The `commandBuffer` parameter in vkCmdConvertCooperativeVectorMatrixNV

- The `session` parameter in vkDestroyDataGraphPipelineSessionARM

- The `commandBuffer` parameter in vkCmdDispatchDataGraphARM

- The `commandBuffer` parameter in vkCmdSetAttachmentFeedbackLoopEnableEXT

- The `commandBuffer` parameter in vkCmdBindTileMemoryQCOM

- The `commandBuffer` parameter in vkCmdDecompressMemoryEXT

- The `commandBuffer` parameter in vkCmdDecompressMemoryIndirectCountEXT

- The `commandBuffer` parameter in vkCmdBuildClusterAccelerationStructureIndirectNV

- The `commandBuffer` parameter in vkCmdBuildPartitionedAccelerationStructuresNV

- The `commandBuffer` parameter in vkCmdPreprocessGeneratedCommandsEXT

- The `stateCommandBuffer` parameter in vkCmdPreprocessGeneratedCommandsEXT

- The `commandBuffer` parameter in vkCmdExecuteGeneratedCommandsEXT

- The `indirectCommandsLayout` parameter in vkDestroyIndirectCommandsLayoutEXT

- The `indirectExecutionSet` parameter in vkDestroyIndirectExecutionSetEXT

- The `indirectExecutionSet` parameter in vkUpdateIndirectExecutionSetPipelineEXT

- The `indirectExecutionSet` parameter in vkUpdateIndirectExecutionSetShaderEXT

- The `instrumentation` parameter in vkDestroyShaderInstrumentationARM

- The `commandBuffer` parameter in vkCmdBeginShaderInstrumentationARM

- The `instrumentation` parameter in vkCmdBeginShaderInstrumentationARM

- The `commandBuffer` parameter in vkCmdEndShaderInstrumentationARM

- The `commandBuffer` parameter in vkCmdEndRendering2EXT

- The `commandBuffer` parameter in vkCmdBeginCustomResolveEXT

- The `commandBuffer` parameter in vkCmdSetPrimitiveRestartIndexEXT

- The `accelerationStructure` parameter in vkDestroyAccelerationStructureKHR

- The `commandBuffer` parameter in vkCmdBuildAccelerationStructuresKHR

- The `commandBuffer` parameter in vkCmdBuildAccelerationStructuresIndirectKHR

- The `commandBuffer` parameter in vkCmdCopyAccelerationStructureKHR

- The `commandBuffer` parameter in vkCmdCopyAccelerationStructureToMemoryKHR

- The `commandBuffer` parameter in vkCmdCopyMemoryToAccelerationStructureKHR

- The `commandBuffer` parameter in vkCmdWriteAccelerationStructuresPropertiesKHR

- The `commandBuffer` parameter in vkCmdTraceRaysKHR

- The `pipelineCache` parameter in vkCreateRayTracingPipelinesKHR, conditionally1

- The `commandBuffer` parameter in vkCmdTraceRaysIndirectKHR

- The `commandBuffer` parameter in vkCmdSetRayTracingPipelineStackSizeKHR

- The `commandBuffer` parameter in vkCmdDrawMeshTasksEXT

- The `commandBuffer` parameter in vkCmdDrawMeshTasksIndirectEXT

- The `commandBuffer` parameter in vkCmdDrawMeshTasksIndirectCountEXT

- The `commandPool` member of VkCommandBufferAllocateInfo

- The `dstSet` member of VkCopyDescriptorSet, conditionally1

- The `descriptorPool` member of VkDescriptorSetAllocateInfo

- The `buffer` member of VkBindBufferMemoryInfo

- The `image` member of VkBindImageMemoryInfo

- The `memory` member of VkMemoryMapInfo

- The `memory` member of VkMemoryUnmapInfo

- The `surface` member of VkSwapchainCreateInfoKHR

- The `oldSwapchain` member of VkSwapchainCreateInfoKHR

- The `swapchain` member of VkBindImageMemorySwapchainInfoKHR

- The `swapchain` member of VkAcquireNextImageInfoKHR

- The `semaphore` member of VkAcquireNextImageInfoKHR

- The `fence` member of VkAcquireNextImageInfoKHR

- The `semaphore` member of VkImportSemaphoreWin32HandleInfoKHR

- The `semaphore` member of VkImportSemaphoreFdInfoKHR

- The `fence` member of VkImportFenceWin32HandleInfoKHR

- The `fence` member of VkImportFenceFdInfoKHR

- The `mode` member of VkDisplayPlaneInfo2KHR

- The `pipeline` member of VkReleaseCapturedPipelineDataInfoKHR

- The `swapchain` member of VkReleaseSwapchainImagesInfoKHR

- The `object` member of VkDebugMarkerObjectNameInfoEXT

- The `object` member of VkDebugMarkerObjectTagInfoEXT

- The `objectHandle` member of VkDebugUtilsObjectTagInfoEXT

- The `swapchain` member of VkPastPresentationTimingInfoEXT

- The `semaphore` member of VkImportSemaphoreZirconHandleInfoFUCHSIA

- The `tensor` member of VkBindTensorMemoryInfoARM

1 See Valid Usage language for this token for details.

There are also a few instances where a command can take in an application-allocated list whose contents are externally synchronized parameters. In these cases, the caller must guarantee that at most one thread is using a given element within the list at a given time. These parameters are listed below.

Externally Synchronized Parameter and Member Lists

- Each element of the `pFences` parameter in vkResetFences

- Each element of the `pCommandBuffers` parameter in vkFreeCommandBuffers

- Each element of the `pDescriptorSets` parameter in vkFreeDescriptorSets

- The `dstSet` member of each element of the `pDescriptorWrites` parameter in vkUpdateDescriptorSets, conditionally1

- Each element of the `pSwapchains` parameter in vkSetHdrMetadataEXT

- Each element of the `pWaitSemaphores` member of VkPresentInfoKHR

- Each element of the `pSwapchains` member of VkPresentInfoKHR

1 See Valid Usage language for this token for details.

In addition, there are some implicit parameters that need to be externally synchronized. For example, when a `commandBuffer` parameter needs to be externally synchronized, it implies that the `commandPool` from which that command buffer was allocated also needs to be externally synchronized. The implicit parameters and their associated object are listed below.

Implicit Externally Synchronized Parameters

- All `VkPhysicalDevice` objects enumerated from `instance` in vkDestroyInstance

- All `VkQueue` objects created from `device` in vkDestroyDevice

- All `VkQueue` objects created from `device` that are not created with VK_DEVICE_QUEUE_CREATE_INTERNALLY_SYNCHRONIZED_BIT_KHR in vkDeviceWaitIdle

- The `VkCommandPool` that `commandBuffer` was allocated from in vkBeginCommandBuffer

- The `VkCommandPool` that `commandBuffer` was allocated from in vkEndCommandBuffer

- The `VkCommandPool` that `commandBuffer` was allocated from in vkResetCommandBuffer

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdCopyBuffer

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdCopyImage

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdCopyBufferToImage

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdCopyImageToBuffer

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdUpdateBuffer

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdFillBuffer

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdPipelineBarrier

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdBeginQuery

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdEndQuery

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdResetQueryPool

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdWriteTimestamp

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdCopyQueryPoolResults

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdExecuteCommands

- Any `VkDescriptorSet` objects allocated from `descriptorPool` in vkResetDescriptorPool

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdBindPipeline

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdBindDescriptorSets

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdClearColorImage

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdDispatch

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdDispatchIndirect

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetEvent

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdResetEvent

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdWaitEvents

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdPushConstants

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetViewport

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetScissor

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetLineWidth

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetDepthBias

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetBlendConstants

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetDepthBounds

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetStencilCompareMask

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetStencilWriteMask

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetStencilReference

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdBindIndexBuffer

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdBindVertexBuffers

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdDraw

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdDrawIndexed

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdDrawIndirect

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdDrawIndexedIndirect

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdBlitImage

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdClearDepthStencilImage

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdClearAttachments

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdResolveImage

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdBeginRenderPass

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdNextSubpass

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdEndRenderPass

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetDeviceMask

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdDispatchBase

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdDrawIndirectCount

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdDrawIndexedIndirectCount

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdBeginRenderPass2

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdNextSubpass2

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdEndRenderPass2

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdPipelineBarrier2

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdWriteTimestamp2

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdCopyBuffer2

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdCopyImage2

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdCopyBufferToImage2

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdCopyImageToBuffer2

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetEvent2

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdResetEvent2

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdWaitEvents2

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdBlitImage2

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdResolveImage2

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdBeginRendering

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdEndRendering

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetCullMode

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetFrontFace

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetPrimitiveTopology

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetViewportWithCount

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetScissorWithCount

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdBindVertexBuffers2

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetDepthTestEnable

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetDepthWriteEnable

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetDepthCompareOp

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetDepthBoundsTestEnable

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetStencilTestEnable

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetStencilOp

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetRasterizerDiscardEnable

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetDepthBiasEnable

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetPrimitiveRestartEnable

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdPushDescriptorSet

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdPushDescriptorSetWithTemplate

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdBindDescriptorSets2

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdPushConstants2

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdPushDescriptorSet2

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdPushDescriptorSetWithTemplate2

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetLineStipple

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdBindIndexBuffer2

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetRenderingAttachmentLocations

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetRenderingInputAttachmentIndices

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdBeginVideoCodingKHR

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdEndVideoCodingKHR

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdControlVideoCodingKHR

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdDecodeVideoKHR

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdBeginRenderingKHR

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdEndRenderingKHR

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetDeviceMaskKHR

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdDispatchBaseKHR

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdPushDescriptorSetKHR

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdPushDescriptorSetWithTemplateKHR

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdBeginRenderPass2KHR

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdNextSubpass2KHR

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdEndRenderPass2KHR

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdDrawIndirectCountKHR

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdDrawIndexedIndirectCountKHR

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetFragmentShadingRateKHR

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetRenderingAttachmentLocationsKHR

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetRenderingInputAttachmentIndicesKHR

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdEncodeVideoKHR

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetEvent2KHR

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdResetEvent2KHR

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdWaitEvents2KHR

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdPipelineBarrier2KHR

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdWriteTimestamp2KHR

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdBindIndexBuffer3KHR

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdBindVertexBuffers3KHR

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdDrawIndirect2KHR

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdDrawIndexedIndirect2KHR

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdDispatchIndirect2KHR

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdCopyMemoryKHR

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdCopyMemoryToImageKHR

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdCopyImageToMemoryKHR

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdUpdateMemoryKHR

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdFillMemoryKHR

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdCopyQueryPoolResultsToMemoryKHR

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdDrawIndirectCount2KHR

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdDrawIndexedIndirectCount2KHR

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdBeginConditionalRendering2EXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdBindTransformFeedbackBuffers2EXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdBeginTransformFeedback2EXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdEndTransformFeedback2EXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdDrawIndirectByteCount2EXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdDrawMeshTasksIndirect2EXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdDrawMeshTasksIndirectCount2EXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdWriteMarkerToMemoryAMD

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdCopyBuffer2KHR

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdCopyImage2KHR

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdCopyBufferToImage2KHR

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdCopyImageToBuffer2KHR

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdBlitImage2KHR

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdResolveImage2KHR

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdTraceRaysIndirect2KHR

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdBindIndexBuffer2KHR

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetLineStippleKHR

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdBindDescriptorSets2KHR

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdPushConstants2KHR

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdPushDescriptorSet2KHR

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdPushDescriptorSetWithTemplate2KHR

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetDescriptorBufferOffsets2EXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdBindDescriptorBufferEmbeddedSamplers2EXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdCopyMemoryIndirectKHR

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdCopyMemoryToImageIndirectKHR

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdEndRendering2KHR

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdDebugMarkerBeginEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdDebugMarkerEndEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdDebugMarkerInsertEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdBindTransformFeedbackBuffersEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdBeginTransformFeedbackEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdEndTransformFeedbackEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdBeginQueryIndexedEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdEndQueryIndexedEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdDrawIndirectByteCountEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdCuLaunchKernelNVX

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdDrawIndirectCountAMD

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdDrawIndexedIndirectCountAMD

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdBeginConditionalRenderingEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdEndConditionalRenderingEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetViewportWScalingNV

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetDiscardRectangleEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetDiscardRectangleEnableEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetDiscardRectangleModeEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdBeginDebugUtilsLabelEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdEndDebugUtilsLabelEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdInsertDebugUtilsLabelEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdBeginGpaSessionAMD

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdEndGpaSessionAMD

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdBeginGpaSampleAMD

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdEndGpaSampleAMD

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdCopyGpaSessionResultsAMD

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdInitializeGraphScratchMemoryAMDX

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdDispatchGraphAMDX

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdDispatchGraphIndirectAMDX

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdDispatchGraphIndirectCountAMDX

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdBindSamplerHeapEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdBindResourceHeapEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdPushDataEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetSampleLocationsEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdBindShadingRateImageNV

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetViewportShadingRatePaletteNV

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetCoarseSampleOrderNV

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdBuildAccelerationStructureNV

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdCopyAccelerationStructureNV

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdTraceRaysNV

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdWriteAccelerationStructuresPropertiesNV

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdWriteBufferMarkerAMD

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdWriteBufferMarker2AMD

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdDrawMeshTasksNV

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdDrawMeshTasksIndirectNV

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdDrawMeshTasksIndirectCountNV

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetExclusiveScissorEnableNV

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetExclusiveScissorNV

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetCheckpointNV

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetPerformanceMarkerINTEL

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetPerformanceStreamMarkerINTEL

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetPerformanceOverrideINTEL

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetLineStippleEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetCullModeEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetFrontFaceEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetPrimitiveTopologyEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetViewportWithCountEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetScissorWithCountEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdBindVertexBuffers2EXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetDepthTestEnableEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetDepthWriteEnableEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetDepthCompareOpEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetDepthBoundsTestEnableEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetStencilTestEnableEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetStencilOpEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdPreprocessGeneratedCommandsNV

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdExecuteGeneratedCommandsNV

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdBindPipelineShaderGroupNV

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetDepthBias2EXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdCudaLaunchKernelNV

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdDispatchTileQCOM

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdBeginPerTileExecutionQCOM

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdEndPerTileExecutionQCOM

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdBindDescriptorBuffersEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetDescriptorBufferOffsetsEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdBindDescriptorBufferEmbeddedSamplersEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetFragmentShadingRateEnumNV

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetVertexInputEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSubpassShadingHUAWEI

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdBindInvocationMaskHUAWEI

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetPatchControlPointsEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetRasterizerDiscardEnableEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetDepthBiasEnableEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetLogicOpEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetPrimitiveRestartEnableEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetColorWriteEnableEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdDrawMultiEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdDrawMultiIndexedEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdBuildMicromapsEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdCopyMicromapEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdCopyMicromapToMemoryEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdCopyMemoryToMicromapEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdWriteMicromapsPropertiesEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdDrawClusterHUAWEI

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdDrawClusterIndirectHUAWEI

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetDispatchParametersARM

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdCopyMemoryIndirectNV

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdCopyMemoryToImageIndirectNV

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdDecompressMemoryNV

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdDecompressMemoryIndirectCountNV

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdUpdatePipelineIndirectBufferNV

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetDepthClampEnableEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetPolygonModeEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetRasterizationSamplesEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetSampleMaskEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetAlphaToCoverageEnableEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetAlphaToOneEnableEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetLogicOpEnableEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetColorBlendEnableEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetColorBlendEquationEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetColorWriteMaskEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetTessellationDomainOriginEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetRasterizationStreamEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetConservativeRasterizationModeEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetExtraPrimitiveOverestimationSizeEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetDepthClipEnableEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetSampleLocationsEnableEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetColorBlendAdvancedEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetProvokingVertexModeEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetLineRasterizationModeEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetLineStippleEnableEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetDepthClipNegativeOneToOneEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetViewportWScalingEnableNV

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetViewportSwizzleNV

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetCoverageToColorEnableNV

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetCoverageToColorLocationNV

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetCoverageModulationModeNV

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetCoverageModulationTableEnableNV

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetCoverageModulationTableNV

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetShadingRateImageEnableNV

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetRepresentativeFragmentTestEnableNV

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetCoverageReductionModeNV

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdCopyTensorARM

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdOpticalFlowExecuteNV

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdBindShadersEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetDepthClampRangeEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdConvertCooperativeVectorMatrixNV

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdDispatchDataGraphARM

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetAttachmentFeedbackLoopEnableEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdBindTileMemoryQCOM

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdDecompressMemoryEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdDecompressMemoryIndirectCountEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdBuildClusterAccelerationStructureIndirectNV

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdBuildPartitionedAccelerationStructuresNV

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdPreprocessGeneratedCommandsEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdExecuteGeneratedCommandsEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdBeginShaderInstrumentationARM

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdEndShaderInstrumentationARM

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdEndRendering2EXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdBeginCustomResolveEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetComputeOccupancyPriorityNV

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetPrimitiveRestartIndexEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdBuildAccelerationStructuresKHR

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdBuildAccelerationStructuresIndirectKHR

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdCopyAccelerationStructureKHR

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdCopyAccelerationStructureToMemoryKHR

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdCopyMemoryToAccelerationStructureKHR

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdWriteAccelerationStructuresPropertiesKHR

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdTraceRaysKHR

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdTraceRaysIndirectKHR

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdSetRayTracingPipelineStackSizeKHR

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdDrawMeshTasksEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdDrawMeshTasksIndirectEXT

- The `VkCommandPool` that `commandBuffer` was allocated from, in vkCmdDrawMeshTasksIndirectCountEXT

### 3.7. Valid Usage

Valid usage defines a set of conditions which must be met in order to achieve well-defined runtime behavior in an application. These conditions depend only on Vulkan state, and the parameters or objects whose usage is constrained by the condition.

The core layer assumes applications are using the API correctly. Except as documented elsewhere in the Specification, the behavior of the core layer to an application using the API incorrectly is undefined, and may include program termination. However, implementations must ensure that incorrect usage by an application does not affect the integrity of the operating system, the Vulkan implementation, or other applications in the system using Vulkan. In particular, any guarantees made by an operating system about whether memory from one process can be visible to another process or not must not be violated by a Vulkan implementation for any memory allocation. Vulkan implementations are not required to make additional security or integrity guarantees beyond those provided by the OS unless explicitly directed by the application’s use of a particular feature or extension.

Note | For instance, if an operating system guarantees that data in all its memory allocations are set to zero when newly allocated, the Vulkan implementation must make the same guarantees for any allocations it controls (e.g. VkDeviceMemory). Similarly, if an operating system guarantees that use-after-free of host allocations will not result in values written by another process becoming visible, the same guarantees must be made by the Vulkan implementation for device memory.

If the `protectedMemory` feature is supported, the implementation provides additional guarantees when invalid usage occurs to prevent values in protected memory from being accessed or inferred outside of protected operations, as described in Protected Memory Access Rules.

Some valid usage conditions have dependencies on runtime limits or feature availability. It is possible to validate these conditions against Vulkan’s minimum supported values for these limits and features, or some subset of other known values.

Valid usage conditions do not cover conditions where well-defined behavior (including returning an error code) exists.

Valid usage conditions should apply to the command or structure where complete information about the condition would be known during execution of an application. This is such that a validation layer or linter can be written directly against these statements at the point they are specified.

Note | This does lead to some non-obvious places for valid usage statements. For instance, the valid values for a structure might depend on a separate value in the calling command. In this case, the structure itself will not reference this valid usage as it is impossible to determine validity from the structure that it is invalid - instead this valid usage would be attached to the calling command. Another example is draw state - the state setters are independent, and can cause a legitimately invalid state configuration between draw calls; so the valid usage statements are attached to the place where all state needs to be valid - at the drawing command.

Valid usage conditions are described in a block labeled “Valid Usage” following each command or structure they apply to.

#### 3.7.1. Usage Validation

Vulkan is a layered API. The lowest layer is the core Vulkan layer, as defined by this Specification. The application can use additional layers above the core for debugging, validation, and other purposes.

One of the core principles of Vulkan is that building and submitting command buffers should be highly efficient. Thus error checking and validation of state in the core layer is minimal, although more rigorous validation can be enabled through the use of layers.

Validation of correct API usage is left to validation layers. Applications should be developed with validation layers enabled, to help catch and eliminate errors. Once validated, released applications should not enable validation layers by default.

#### 3.7.2. Implicit Valid Usage

Some valid usage conditions apply to all commands and structures in the API, unless explicitly denoted otherwise for a specific command or structure. These conditions are considered implicit, and are described in a block labeled “Valid Usage (Implicit)” following each command or structure they apply to. Implicit valid usage conditions are described in detail below.

##### Valid Usage for Object Handles

Any input parameter to a command that is an object handle must be a valid object handle, unless otherwise specified. An object handle is valid if:

- It has been created or allocated by a previous, successful call to the API. Such calls are noted in the Specification.

- It has not been deleted or freed by a previous call to the API. Such calls are noted in the Specification.

- Any objects used by that object, either as part of creation or execution, must also be valid.

The reserved values VK_NULL_HANDLE and `NULL` can be used in place of valid non-dispatchable handles and dispatchable handles, respectively, when explicitly called out in the Specification. Any command that creates an object successfully must not return these values. It is valid to pass these values to `vkDestroy*` or `vkFree*` commands, which will silently ignore these values.

##### Valid Usage for Pointers

Any parameter that is a pointer must be a valid pointer only if it is explicitly called out by a Valid Usage statement.

A pointer is “valid” if it points at memory containing values of the number and type(s) expected by the command, and all fundamental types accessed through the pointer (e.g. as elements of an array or as members of a structure) satisfy the alignment requirements of the host processor.

##### Valid Usage for Strings

Any parameter that is a pointer to `char` must be a finite sequence of values terminated by a null character, or if explicitly called out in the Specification, can be `NULL`.

Strings specified as UTF-8 encoded must not contain invalid UTF-8 sequences. See String Representation for additional information about strings.

##### Valid Usage for Enumerated Types

Any parameter of an enumerated type must be a valid enumerant for that type. Use of an enumerant is valid if the following conditions are true:

- The enumerant is defined as part of the enumerated type.

- The enumerant is not a value suffixed with `_MAX_ENUM`.

  - This value exists only to ensure that C `enum` types are 32 bits in size and must not be used by applications.

- If the enumerant is used in a function that has a VkInstance as its first parameter and either:

  - it was added by a core version that is supported (as reported by vkEnumerateInstanceVersion) and the value of VkApplicationInfo::`apiVersion` is greater than or equal to the version that added it; or

  - it was added by an instance extension that was enabled for the instance.

- If the enumerant is used in a function that has a VkPhysicalDevice object as its first parameter and either:

  - it was added by a core version that is supported by that device (as reported by VkPhysicalDeviceProperties::`apiVersion`);

  - it was added by an instance extension that was enabled for the instance; or

  - it was added by a device extension that is supported by that device.

- If the enumerant is used in a function that has any other dispatchable object as its first parameter and either:

  - it was added by a core version that is supported for the device (as reported by VkPhysicalDeviceProperties::`apiVersion`); or

  - it was added by a device extension that was enabled for the device.

Additionally, if the `maintenance5` feature is supported, any integer value representable in the range valid for the defined type is valid when used in a function that has a VkPhysicalDevice object as its first parameter. Physical device queries will either return results indicating lack of support, or ignore unsupported values when used as a bit flag in a `Vk*Flags*` parameter.

Any enumerated type returned from a query command or otherwise output from Vulkan to the application must not have a reserved value. Reserved values are values not defined by any extension for that enumerated type.

Note | In some special cases, an enumerant is only meaningful if a feature defined by an extension is also enabled, as well as the extension itself. The global “valid enumerant” rule described here does not address such cases.

Note | This language is intended to accommodate cases such as “hidden” extensions known only to driver internals, or layers enabling extensions without knowledge of the application, without allowing return of values not defined by any extension.

Note | Application developers are encouraged to be careful when using `switch` statements with Vulkan API enums. This is because new extensions can add new values to existing enums. Using a `default:` statement within a `switch` may avoid future compilation issues. This is particularly true for enums such as VkDriverId, which may have values added that do not belong to a corresponding new extension.

##### Valid Usage for Flags

A collection of flags is represented by a bitmask using the type VkFlags:

    // Provided by VK_VERSION_1_0
    typedef uint32_t VkFlags;

Bitmasks are passed to many commands and structures to compactly represent options, but VkFlags is not used directly in the API. Instead, a `Vk*Flags` type which is an alias of VkFlags, and whose name matches the corresponding `Vk*FlagBits` that are valid for that type, is used.

Any `Vk*Flags` member or parameter used in the API as an input must be a valid combination of bit flags. A valid combination is either zero or the bitwise OR of valid bit flags.

An individual bit flag is valid for a `Vk*Flags` type if it would be a valid enumerant when used with the equivalent `Vk*FlagBits` type, where the bits type is obtained by taking the flag type and replacing the trailing `Flags` with `FlagBits`. For example, a flag value of type VkColorComponentFlags must contain only bit flags defined by VkColorComponentFlagBits.

Any `Vk*Flags` member or parameter returned from a query command or otherwise output from Vulkan to the application may contain bit flags undefined in its corresponding `Vk*FlagBits` type. An application cannot rely on the state of these unspecified bits.

Only the low-order 31 bits (bit positions zero through 30) are available for use as flag bits.

Note | This restriction is due to poorly defined behavior by C compilers given a C enumerant value of `0x80000000`. In some cases adding this enumerant value may increase the size of the underlying `Vk*FlagBits` type, breaking the ABI.

A collection of 64-bit flags is represented by a bitmask using the type VkFlags64:

    // Provided by VK_VERSION_1_3, VK_KHR_synchronization2
    typedef uint64_t VkFlags64;

When the 31 bits available in VkFlags are insufficient, the VkFlags64 type can be passed to commands and structures to represent up to 64 options. VkFlags64 is not used directly in the API. Instead, a `Vk*Flags2` type which is an alias of VkFlags64, and whose name matches the corresponding `Vk*FlagBits2` that are valid for that type, is used.

Any `Vk*Flags2` member or parameter used in the API as an input must be a valid combination of bit flags. A valid combination is either zero or the bitwise OR of valid bit flags.

An individual bit flag is valid for a `Vk*Flags2` type if it would be a valid enumerant when used with the equivalent `Vk*FlagBits2` type, where the bits type is obtained by taking the flag type and replacing the trailing `Flags2` with `FlagBits2`. For example, a flag value of type VkAccessFlags2 must contain only bit flags defined by VkAccessFlagBits2.

Any `Vk*Flags2` member or parameter returned from a query command or otherwise output from Vulkan to the application may contain bit flags undefined in its corresponding `Vk*FlagBits2` type. An application cannot rely on the state of these unspecified bits.

Note | Both the `Vk*FlagBits2` type, and the individual bits defined for that type, are defined as `uint64_t` integers in the C API. This is in contrast to the 32-bit types, where the `Vk*FlagBits` type is defined as a C `enum` and the individual bits as enumerants belonging to that `enum`. As a result, there is less compile time type checking possible for the 64-bit types. This is unavoidable since there is no sufficiently portable way to define a 64-bit `enum` type in C99.

###### Effective Flags

When the effective value of a bitmask command parameter or structure member is determined by an extending structure providing a 64-bit version of the bitflags, that effective value is used in all specification language, including valid usage statements, referring to the original parameter.

Examples of such extending structures include (this list is not complete):

- VkBufferUsageFlags2CreateInfo

- VkImageUsageFlags2CreateInfoKHR

Note | When a 64-bit version of a flags type is defined, the implementation must always represent those flags internally as 64 bits, whether they are specified through the 32-bit or 64-bit APIs.

##### Valid Usage for Structure Types

Any parameter that is a structure containing a `sType` member must have a value of `sType` which is a valid VkStructureType value matching the type of the structure.

##### Valid Usage for Structure Pointer Chains

Any parameter that is a structure containing a `void*` `pNext` member must have a value of `pNext` that is either `NULL`, or is a pointer to a valid extending structure, containing `sType` and `pNext` members as described in the Vulkan Documentation and Extensions document in the section “Extending Structures”. The set of structures connected by `pNext` pointers is referred to as a `pNext` chain.

Each structure included in the `pNext` chain must be defined at runtime by either:

- a core version which is supported

- an extension which is enabled

- a supported device extension in the case of physical-device-level functionality added by the device extension

Each type of extending structure must not appear more than once in a `pNext` chain, including any aliases. This general rule may be explicitly overridden for specific structures.

Any component of the implementation (the loader, any enabled layers, and drivers) must skip over, without processing (other than reading the `sType` and `pNext` members) any extending structures in the chain not defined by core versions or extensions supported by that component.

As a convenience to implementations and layers needing to iterate through a structure pointer chain, the Vulkan API provides two base structures. These structures allow for some type safety, and can be used by Vulkan API functions that operate on generic inputs and outputs.

The `VkBaseInStructure` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkBaseInStructure {
        VkStructureType                    sType;
        const struct VkBaseInStructure*    pNext;
    } VkBaseInStructure;

- `sType` is the structure type of the structure being iterated through.

- `pNext` is `NULL` or a pointer to the next structure in a structure chain.

`VkBaseInStructure` can be used to facilitate iterating through a read-only structure pointer chain.

The `VkBaseOutStructure` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkBaseOutStructure {
        VkStructureType               sType;
        struct VkBaseOutStructure*    pNext;
    } VkBaseOutStructure;

- `sType` is the structure type of the structure being iterated through.

- `pNext` is `NULL` or a pointer to the next structure in a structure chain.

`VkBaseOutStructure` can be used to facilitate iterating through a structure pointer chain that returns data back to the application.

##### Valid Usage for Nested Structures

The above conditions also apply recursively to members of structures provided as input to a command, either as a direct argument to the command, or themselves a member of another structure.

Specifics on valid usage of each command are covered in their individual sections.

##### Valid Usage for Extensions

Instance-level functionality or behavior added by an instance extension to the API must not be used unless that extension is supported by the instance as determined by vkEnumerateInstanceExtensionProperties, and that extension is enabled in VkInstanceCreateInfo.

Physical-device-level functionality or behavior added by an instance extension to the API must not be used unless that extension is supported by the instance as determined by vkEnumerateInstanceExtensionProperties, and that extension is enabled in VkInstanceCreateInfo.

Physical-device-level functionality or behavior added by a device extension to the API must not be used unless the conditions described in Extending Physical Device From Device Extensions are met.

Device-level functionality added by a device extension that is dispatched from a VkDevice, or from a child object of a VkDevice must not be used unless that extension is supported by the device as determined by vkEnumerateDeviceExtensionProperties, and that extension is enabled in VkDeviceCreateInfo.

##### Valid Usage for Newer Core Versions

Instance-level functionality or behavior added by a new core version of the API must not be used unless it is supported by the instance as determined by vkEnumerateInstanceVersion and the specified version of VkApplicationInfo::`apiVersion`.

Physical-device-level functionality or behavior added by a new core version of the API must not be used unless it is supported by the physical device as determined by VkPhysicalDeviceProperties::`apiVersion` and the specified version of VkApplicationInfo::`apiVersion`.

Device-level functionality or behavior added by a new core version of the API must not be used unless it is supported by the device as determined by VkPhysicalDeviceProperties::`apiVersion` and the specified version of VkApplicationInfo::`apiVersion`.

### 3.8. `VkResult` Return Codes

While the core Vulkan API is not designed to capture incorrect usage, some circumstances still require return codes. Commands in Vulkan return their status via return codes that are in one of two categories:

- Successful completion codes are returned when a command needs to communicate success or status information. All successful completion codes are non-negative values.

- Runtime error codes are returned when a command needs to communicate a failure that could only be detected at runtime. All runtime error codes are negative values.

All return codes in Vulkan are reported via VkResult return values. The possible codes are:

    // Provided by VK_VERSION_1_0
    typedef enum VkResult {
        VK_SUCCESS = 0,
        VK_NOT_READY = 1,
        VK_TIMEOUT = 2,
        VK_EVENT_SET = 3,
        VK_EVENT_RESET = 4,
        VK_INCOMPLETE = 5,
        VK_ERROR_OUT_OF_HOST_MEMORY = -1,
        VK_ERROR_OUT_OF_DEVICE_MEMORY = -2,
        VK_ERROR_INITIALIZATION_FAILED = -3,
        VK_ERROR_DEVICE_LOST = -4,
        VK_ERROR_MEMORY_MAP_FAILED = -5,
        VK_ERROR_LAYER_NOT_PRESENT = -6,
        VK_ERROR_EXTENSION_NOT_PRESENT = -7,
        VK_ERROR_FEATURE_NOT_PRESENT = -8,
        VK_ERROR_INCOMPATIBLE_DRIVER = -9,
        VK_ERROR_TOO_MANY_OBJECTS = -10,
        VK_ERROR_FORMAT_NOT_SUPPORTED = -11,
        VK_ERROR_FRAGMENTED_POOL = -12,
        VK_ERROR_UNKNOWN = -13,
      // Provided by VK_VERSION_1_0
        VK_ERROR_VALIDATION_FAILED = -1000011001,
      // Provided by VK_VERSION_1_1
        VK_ERROR_OUT_OF_POOL_MEMORY = -1000069000,
      // Provided by VK_VERSION_1_1
        VK_ERROR_INVALID_EXTERNAL_HANDLE = -1000072003,
      // Provided by VK_VERSION_1_2
        VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS = -1000257000,
      // Provided by VK_VERSION_1_2
        VK_ERROR_FRAGMENTATION = -1000161000,
      // Provided by VK_VERSION_1_3
        VK_PIPELINE_COMPILE_REQUIRED = 1000297000,
      // Provided by VK_VERSION_1_4
        VK_ERROR_NOT_PERMITTED = -1000174001,
      // Provided by VK_KHR_surface
        VK_ERROR_SURFACE_LOST_KHR = -1000000000,
      // Provided by VK_KHR_surface
        VK_ERROR_NATIVE_WINDOW_IN_USE_KHR = -1000000001,
      // Provided by VK_KHR_swapchain
        VK_SUBOPTIMAL_KHR = 1000001003,
      // Provided by VK_KHR_swapchain
        VK_ERROR_OUT_OF_DATE_KHR = -1000001004,
      // Provided by VK_KHR_display_swapchain
        VK_ERROR_INCOMPATIBLE_DISPLAY_KHR = -1000003001,
      // Provided by VK_NV_glsl_shader
        VK_ERROR_INVALID_SHADER_NV = -1000012000,
      // Provided by VK_KHR_video_queue
        VK_ERROR_IMAGE_USAGE_NOT_SUPPORTED_KHR = -1000023000,
      // Provided by VK_KHR_video_queue
        VK_ERROR_VIDEO_PICTURE_LAYOUT_NOT_SUPPORTED_KHR = -1000023001,
      // Provided by VK_KHR_video_queue
        VK_ERROR_VIDEO_PROFILE_OPERATION_NOT_SUPPORTED_KHR = -1000023002,
      // Provided by VK_KHR_video_queue
        VK_ERROR_VIDEO_PROFILE_FORMAT_NOT_SUPPORTED_KHR = -1000023003,
      // Provided by VK_KHR_video_queue
        VK_ERROR_VIDEO_PROFILE_CODEC_NOT_SUPPORTED_KHR = -1000023004,
      // Provided by VK_KHR_video_queue
        VK_ERROR_VIDEO_STD_VERSION_NOT_SUPPORTED_KHR = -1000023005,
      // Provided by VK_EXT_image_drm_format_modifier
        VK_ERROR_INVALID_DRM_FORMAT_MODIFIER_PLANE_LAYOUT_EXT = -1000158000,
      // Provided by VK_EXT_present_timing
        VK_ERROR_PRESENT_TIMING_QUEUE_FULL_EXT = -1000208000,
      // Provided by VK_EXT_full_screen_exclusive
        VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT = -1000255000,
      // Provided by VK_KHR_deferred_host_operations
        VK_THREAD_IDLE_KHR = 1000268000,
      // Provided by VK_KHR_deferred_host_operations
        VK_THREAD_DONE_KHR = 1000268001,
      // Provided by VK_KHR_deferred_host_operations
        VK_OPERATION_DEFERRED_KHR = 1000268002,
      // Provided by VK_KHR_deferred_host_operations
        VK_OPERATION_NOT_DEFERRED_KHR = 1000268003,
      // Provided by VK_KHR_video_encode_queue
        VK_ERROR_INVALID_VIDEO_STD_PARAMETERS_KHR = -1000299000,
      // Provided by VK_EXT_image_compression_control
        VK_ERROR_COMPRESSION_EXHAUSTED_EXT = -1000338000,
      // Provided by VK_EXT_shader_object
        VK_INCOMPATIBLE_SHADER_BINARY_EXT = 1000482000,
      // Provided by VK_KHR_pipeline_binary
        VK_PIPELINE_BINARY_MISSING_KHR = 1000483000,
      // Provided by VK_KHR_pipeline_binary
        VK_ERROR_NOT_ENOUGH_SPACE_KHR = -1000483000,
      // Provided by VK_EXT_debug_report
        VK_ERROR_VALIDATION_FAILED_EXT = VK_ERROR_VALIDATION_FAILED,
      // Provided by VK_KHR_maintenance1
        VK_ERROR_OUT_OF_POOL_MEMORY_KHR = VK_ERROR_OUT_OF_POOL_MEMORY,
      // Provided by VK_KHR_external_memory
        VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR = VK_ERROR_INVALID_EXTERNAL_HANDLE,
      // Provided by VK_EXT_descriptor_indexing
        VK_ERROR_FRAGMENTATION_EXT = VK_ERROR_FRAGMENTATION,
      // Provided by VK_EXT_global_priority
        VK_ERROR_NOT_PERMITTED_EXT = VK_ERROR_NOT_PERMITTED,
      // Provided by VK_KHR_global_priority
        VK_ERROR_NOT_PERMITTED_KHR = VK_ERROR_NOT_PERMITTED,
      // Provided by VK_EXT_buffer_device_address
        VK_ERROR_INVALID_DEVICE_ADDRESS_EXT = VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS,
      // Provided by VK_KHR_buffer_device_address
        VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR = VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS,
      // Provided by VK_EXT_pipeline_creation_cache_control
        VK_PIPELINE_COMPILE_REQUIRED_EXT = VK_PIPELINE_COMPILE_REQUIRED,
      // Provided by VK_EXT_pipeline_creation_cache_control
        VK_ERROR_PIPELINE_COMPILE_REQUIRED_EXT = VK_PIPELINE_COMPILE_REQUIRED,
      // Provided by VK_EXT_shader_object
      // VK_ERROR_INCOMPATIBLE_SHADER_BINARY_EXT is a legacy alias
        VK_ERROR_INCOMPATIBLE_SHADER_BINARY_EXT = VK_INCOMPATIBLE_SHADER_BINARY_EXT,
    } VkResult;

#### Success Codes

- VK_SUCCESS Command successfully completed

- VK_NOT_READY A fence or query has not yet completed

- VK_TIMEOUT A wait operation has not completed in the specified time

- VK_EVENT_SET An event is signaled

- VK_EVENT_RESET An event is unsignaled

- VK_INCOMPLETE A return array was too small for the result

- VK_SUBOPTIMAL_KHR A swapchain no longer matches the surface properties exactly, but can still be used to present to the surface successfully.

- VK_THREAD_IDLE_KHR A deferred operation is not complete but there is currently no work for this thread to do at the time of this call.

- VK_THREAD_DONE_KHR A deferred operation is not complete but there is no work remaining to assign to additional threads.

- VK_OPERATION_DEFERRED_KHR A deferred operation was requested and at least some of the work was deferred.

- VK_OPERATION_NOT_DEFERRED_KHR A deferred operation was requested and no operations were deferred.

- VK_PIPELINE_COMPILE_REQUIRED A requested pipeline creation would have required compilation, but the application requested compilation to not be performed.

- VK_PIPELINE_BINARY_MISSING_KHR The application attempted to create a pipeline binary by querying an internal cache, but the internal cache entry did not exist.

- VK_INCOMPATIBLE_SHADER_BINARY_EXT The provided binary shader code is not compatible with this device.

  Note | In the initial version of the `VK_EXT_shader_object` extension, this return code was named VK_ERROR_INCOMPATIBLE_SHADER_BINARY_EXT and improperly described as an error code. The name has been changed, but the old name is retained as an alias for compatibility with old code.

#### Error Codes

- VK_ERROR_OUT_OF_HOST_MEMORY A host memory allocation has failed.

- VK_ERROR_OUT_OF_DEVICE_MEMORY A device memory allocation has failed.

- VK_ERROR_INITIALIZATION_FAILED Initialization of an object could not be completed for implementation-specific reasons.

- VK_ERROR_DEVICE_LOST The logical or physical device has been lost. See Lost Device

- VK_ERROR_MEMORY_MAP_FAILED Mapping of a memory object has failed.

- VK_ERROR_LAYER_NOT_PRESENT A requested layer is not present or could not be loaded.

- VK_ERROR_EXTENSION_NOT_PRESENT A requested extension is not supported.

- VK_ERROR_FEATURE_NOT_PRESENT A requested feature is not supported.

- VK_ERROR_INCOMPATIBLE_DRIVER The requested version of Vulkan is not supported by the driver or is otherwise incompatible for implementation-specific reasons.

- VK_ERROR_TOO_MANY_OBJECTS Too many objects of the type have already been created.

- VK_ERROR_FORMAT_NOT_SUPPORTED A requested format is not supported on this device.

- VK_ERROR_FRAGMENTED_POOL A pool allocation has failed due to fragmentation of the pool’s memory. This must only be returned if no attempt to allocate host or device memory was made to accommodate the new allocation. This should be returned in preference to VK_ERROR_OUT_OF_POOL_MEMORY, but only if the implementation is certain that the pool allocation failure was due to fragmentation.

- VK_ERROR_SURFACE_LOST_KHR A surface is no longer available.

- VK_ERROR_NATIVE_WINDOW_IN_USE_KHR The requested window is already in use by Vulkan or another API in a manner which prevents it from being used again.

- VK_ERROR_OUT_OF_DATE_KHR A surface has changed in such a way that it is no longer compatible with the swapchain, and further presentation requests using the swapchain will fail. Applications must query the new surface properties and recreate their swapchain if they wish to continue presenting to the surface.

- VK_ERROR_INCOMPATIBLE_DISPLAY_KHR The display used by a swapchain does not use the same presentable image layout, or is incompatible in a way that prevents sharing an image.

- VK_ERROR_INVALID_SHADER_NV One or more shaders failed to compile or link. More details are reported back to the application via `VK_EXT_debug_report` if enabled.

- VK_ERROR_OUT_OF_POOL_MEMORY A pool memory allocation has failed. This must only be returned if no attempt to allocate host or device memory was made to accommodate the new allocation. If the failure was definitely due to fragmentation of the pool, VK_ERROR_FRAGMENTED_POOL should be returned instead.

- VK_ERROR_INVALID_EXTERNAL_HANDLE An external handle is not a valid handle of the specified type.

- VK_ERROR_FRAGMENTATION A descriptor pool creation has failed due to fragmentation.

- VK_ERROR_INVALID_DEVICE_ADDRESS_EXT A buffer creation failed because the requested address is not available.

- VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS A buffer creation or memory allocation failed because the requested address is not available. A shader group handle assignment failed because the requested shader group handle information is no longer valid.

- VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT An operation on a swapchain created with VK_FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT failed as it did not have exclusive full-screen access. This may occur due to implementation-dependent reasons, outside of the application’s control.

- VK_ERROR_PRESENT_TIMING_QUEUE_FULL_EXT A present operation on a swapchain created with VK_SWAPCHAIN_CREATE_PRESENT_TIMING_BIT_EXT failed due to insufficient space in the swapchain’s internal results queue to hold requested present timing data.

- VK_ERROR_VALIDATION_FAILED A command failed because invalid usage was detected by the implementation or a validation layer. This may result in the command not being dispatched to the ICD.

- VK_ERROR_COMPRESSION_EXHAUSTED_EXT An image creation failed because internal resources required for compression are exhausted. This must only be returned when fixed-rate compression is requested.

- VK_ERROR_IMAGE_USAGE_NOT_SUPPORTED_KHR The requested VkImageUsageFlags are not supported.

- VK_ERROR_VIDEO_PICTURE_LAYOUT_NOT_SUPPORTED_KHR The requested video picture layout is not supported.

- VK_ERROR_VIDEO_PROFILE_OPERATION_NOT_SUPPORTED_KHR A video profile operation specified via VkVideoProfileInfoKHR::`videoCodecOperation` is not supported.

- VK_ERROR_VIDEO_PROFILE_FORMAT_NOT_SUPPORTED_KHR Format parameters in a requested VkVideoProfileInfoKHR chain are not supported.

- VK_ERROR_VIDEO_PROFILE_CODEC_NOT_SUPPORTED_KHR Codec-specific parameters in a requested VkVideoProfileInfoKHR chain are not supported.

- VK_ERROR_VIDEO_STD_VERSION_NOT_SUPPORTED_KHR The specified video Std header version is not supported.

- VK_ERROR_INVALID_VIDEO_STD_PARAMETERS_KHR The specified Video Std parameters do not adhere to the syntactic or semantic requirements of the used video compression standard, or values derived from parameters according to the rules defined by the used video compression standard do not adhere to the capabilities of the video compression standard or the implementation.

- VK_ERROR_NOT_PERMITTED The driver implementation has denied a request to acquire a priority above the default priority (VK_QUEUE_GLOBAL_PRIORITY_MEDIUM_EXT) because the application does not have sufficient privileges.

- VK_ERROR_NOT_ENOUGH_SPACE_KHR The application did not provide enough space to return all the required data.

- VK_ERROR_UNKNOWN An unknown error has occurred; either the application has provided invalid input, or an implementation failure has occurred.

If a command returns a runtime error, unless otherwise specified any output parameters will have undefined contents, except that if the output parameter is a structure with `sType` and `pNext` fields, those fields will be unmodified. Any structures chained from `pNext` will also have undefined contents, except that `sType` and `pNext` will be unmodified.

`VK_ERROR_OUT_OF_*_MEMORY` errors do not modify any currently existing Vulkan objects. Objects that have already been successfully created can still be used by the application.

Note | As a general rule, `Free`, `Release`, and `Reset` commands do not return VK_ERROR_OUT_OF_HOST_MEMORY, while any other command with a return code may return it. Any exceptions from this rule are described for those commands.

VK_ERROR_UNKNOWN will be returned by an implementation when an unexpected error occurs that cannot be attributed to valid behavior of the application and implementation. Under these conditions, it may be returned from any command returning a VkResult.

Note | VK_ERROR_UNKNOWN is not expected to ever be returned if the application behavior is valid, and if the implementation is bug-free. If VK_ERROR_UNKNOWN is returned, the application should be checked against the latest validation layers to verify correct behavior as much as possible. If no issues are identified it could be an implementation issue, and the implementor should be contacted for support.

Any command returning a VkResult may return VK_ERROR_VALIDATION_FAILED if a violation of valid usage is detected.

Performance-critical commands generally do not have return codes. If a runtime error occurs in such commands, the implementation will defer reporting the error until a specified point. For commands that record into command buffers (`vkCmd*`) runtime errors are reported by `vkEndCommandBuffer`.

### 3.9. Numeric Representation and Computation

Implementations normally perform computations in floating-point, and must meet the range and precision requirements defined under “Floating-Point Computation” below.

These requirements only apply to computations performed in Vulkan operations outside of shader execution, such as texture image specification and sampling, and per-fragment operations. Range and precision requirements during shader execution differ, and are specified by the Precision and Operation of SPIR-V Instructions section.

In some cases, the representation and/or precision of operations is implicitly limited by the specified format of vertex or texel data consumed by Vulkan. Specific floating-point formats are described later in this section.

#### 3.9.1. Floating-Point Computation

Most floating-point computation is performed in SPIR-V shader modules. The properties of computation within shaders are constrained as defined by the Precision and Operation of SPIR-V Instructions section.

Some floating-point computation is performed outside of shaders, such as viewport and depth range calculations. For these computations, we do not specify how floating-point numbers are to be represented, or the details of how operations on them are performed, but only place minimal requirements on representation and precision as described in the remainder of this section.

We require simply that numbers' floating-point parts contain enough bits and that their exponent fields are large enough so that individual results of floating-point operations are accurate to about 1 part in 105. The maximum representable magnitude for all floating-point values must be at least 232.

  x × 0 = 0 × x = 0 for any non-infinite and non-NaN x.

  1 × x = x × 1 = x.

  x + 0 = 0 + x = x.

  00 = 1.

Occasionally, further requirements will be specified. Most single-precision floating-point formats meet these requirements.

The special values Inf and -Inf encode values with magnitudes too large to be represented; the special value NaN encodes “Not A Number” values resulting from undefined arithmetic operations such as 0 / 0. Implementations may support Inf and NaN in their floating-point computations. Any computation which does not support either Inf or NaN, for which that value is an input or output will yield an undefined value.

#### 3.9.2. Floating-Point Format Conversions

When a value is converted to a defined floating-point representation, finite values falling between two representable finite values are rounded to one or the other. The rounding mode is not defined. Finite values whose magnitude is larger than that of any representable finite value may be rounded either to the closest representable finite value or to the appropriately signed infinity. For unsigned destination formats any negative values are converted to zero. Positive infinity is converted to positive infinity; negative infinity is converted to negative infinity in signed formats and to zero in unsigned formats; and any NaN is converted to a NaN.

#### 3.9.3. 16-Bit Floating-Point Numbers

16-bit floating-point numbers are defined in the “16-bit floating-point numbers” section of the Khronos Data Format Specification.

#### 3.9.4. Unsigned 11-Bit Floating-Point Numbers

Unsigned 11-bit floating-point numbers are defined in the “Unsigned 11-bit floating-point numbers” section of the Khronos Data Format Specification.

#### 3.9.5. Unsigned 10-Bit Floating-Point Numbers

Unsigned 10-bit floating-point numbers are defined in the “Unsigned 10-bit floating-point numbers” section of the Khronos Data Format Specification.

#### 3.9.6. 8-bit booleans

An 8-bit boolean uses the following representation for `true` and `false`:

- Zero to represent `false`

- Any non-zero value to represent `true`

#### 3.9.7. General Requirements

Any representable floating-point value in the appropriate format is legal as input to a Vulkan command that requires floating-point data. The result of providing a value that is not a floating-point number to such a command is unspecified, but must not lead to Vulkan interruption or termination. For example, providing a negative zero (where applicable) or a denormalized number to a Vulkan command must yield deterministic results, while providing a NaN or Inf yields unspecified results.

Some calculations require division. In such cases (including implied divisions performed by vector normalization), division by zero produces an unspecified result but must not lead to Vulkan interruption or termination.

### 3.10. Fixed-Point Data Conversions

When generic vertex attributes and pixel color or depth components are represented as integers, they are often (but not always) considered to be normalized. Normalized integer values are treated specially when being converted to and from floating-point values, and are usually referred to as normalized fixed-point.

In the remainder of this section, b denotes the bit width of the fixed-point integer representation. When the integer is one of the types defined by the API, b is the bit width of that type. When the integer comes from an image containing color or depth component texels, b is the number of bits allocated to that component in its specified image format.

The signed and unsigned fixed-point representations are assumed to be b-bit binary two’s-complement integers and binary unsigned integers, respectively.

#### 3.10.1. Conversion From Normalized Fixed-Point to Floating-Point

Unsigned normalized fixed-point integers represent numbers in the range [0,1]. The conversion from an unsigned normalized fixed-point value c to the corresponding floating-point value f is defined as

f=2 b−1 c​

Signed normalized fixed-point integers represent numbers in the range [-1,1]. The conversion from a signed normalized fixed-point value c to the corresponding floating-point value f is performed using

f=max(2 b−1−1 c​,−1.0)

Only the range [-2b-1 + 1, 2b-1 - 1] is used to represent signed fixed-point values in the range [-1,1]. For example, if b = 8, then the integer value -127 corresponds to -1.0 and the value 127 corresponds to 1.0. This equation is used everywhere that signed normalized fixed-point values are converted to floating-point.

Note that while zero is exactly expressible in this representation, one value (-128 in the example) is outside the representable range, and implementations must clamp it to -1.0. Where the value is subject to further processing by the implementation, e.g. during texture filtering, values less than -1.0 may be used but the result must be clamped before the value is returned to shaders.

#### 3.10.2. Conversion From Floating-Point to Normalized Fixed-Point

The conversion from a floating-point value f to the corresponding unsigned normalized fixed-point value c is defined by first clamping f to the range [0,1], then computing

  c = convertFloatToUint(f × (2b - 1), b)

where convertFloatToUint(r,b) returns one of the two unsigned binary integer values with exactly b bits which are closest to the floating-point value r. Implementations should round to nearest. If r is equal to an integer, then that integer value must be returned. In particular, if f is equal to 0.0 or 1.0, then c must be assigned 0 or 2b - 1, respectively.

The conversion from a floating-point value f to the corresponding signed normalized fixed-point value c is performed by clamping f to the range [-1,1], then computing

  c = convertFloatToInt(f × (2b-1 - 1), b)

where convertFloatToInt(r,b) returns one of the two signed two’s-complement binary integer values with exactly b bits which are closest to the floating-point value r. Implementations should round to nearest. If r is equal to an integer, then that integer value must be returned. In particular, if f is equal to -1.0, 0.0, or 1.0, then c must be assigned -(2b-1 - 1), 0, or 2b-1 - 1, respectively.

This equation is used everywhere that floating-point values are converted to signed normalized fixed-point.

### 3.11. String Representation

Strings passed into and returned from Vulkan API commands are usually defined to be null-terminated and UTF-8 encoded.

Note | Exceptions to this rule exist only when strings are defined or used by operating system APIs where that OS has a different convention. For example, VkExportMemoryWin32HandleInfoKHR::`name` is a null-terminated UTF-16 encoded string used in conjunction with Windows handles.

When a UTF-8 string is returned from a Vulkan API query, it is returned in a fixed-length buffer of C `char`. For example, a string returned in VkPhysicalDeviceProperties::`deviceName` has maximum length VK_MAX_PHYSICAL_DEVICE_NAME_SIZE, and a string returned in VkExtensionProperties::`extensionName` has maximum length VK_MAX_EXTENSION_NAME_SIZE. The string, including its null terminator, will always fit completely within this buffer. If the string is shorter than the buffer size, the contents of `char` in the buffer following the null terminator are undefined.

When a UTF-8 string is passed into a Vulkan API, such as VkDeviceCreateInfo::`ppEnabledExtensionNames`, there is no explicit limit on the length of that string. However, the string must contain a valid UTF-8 encoded string and must be null-terminated.

### 3.12. Common Object Types

Some types of Vulkan objects are used in many different structures and command parameters, and are described here. These types include offsets, extents, and rectangles.

#### 3.12.1. Offsets

Offsets are used to describe a pixel location within an image or framebuffer, as an (x,y) location for two-dimensional images, or an (x,y,z) location for three-dimensional images.

A two-dimensional offset is defined by the structure:

    // Provided by VK_VERSION_1_0
    typedef struct VkOffset2D {
        int32_t    x;
        int32_t    y;
    } VkOffset2D;

- `x` is the x offset.

- `y` is the y offset.

A three-dimensional offset is defined by the structure:

    // Provided by VK_VERSION_1_0
    typedef struct VkOffset3D {
        int32_t    x;
        int32_t    y;
        int32_t    z;
    } VkOffset3D;

- `x` is the x offset.

- `y` is the y offset.

- `z` is the z offset.

#### 3.12.2. Extents

Extents are used to describe the size of a rectangular region of pixels within an image or framebuffer, as (width,height) for two-dimensional images, or as (width,height,depth) for three-dimensional images.

A two-dimensional extent is defined by the structure:

    // Provided by VK_VERSION_1_0
    typedef struct VkExtent2D {
        uint32_t    width;
        uint32_t    height;
    } VkExtent2D;

- `width` is the width of the extent.

- `height` is the height of the extent.

A three-dimensional extent is defined by the structure:

    // Provided by VK_VERSION_1_0
    typedef struct VkExtent3D {
        uint32_t    width;
        uint32_t    height;
        uint32_t    depth;
    } VkExtent3D;

- `width` is the width of the extent.

- `height` is the height of the extent.

- `depth` is the depth of the extent.

#### 3.12.3. Rectangles

Rectangles are used to describe a specified rectangular region of pixels within an image or framebuffer. Rectangles include both an offset and an extent of the same dimensionality, as described above. Two-dimensional rectangles are defined by the structure

    // Provided by VK_VERSION_1_0
    typedef struct VkRect2D {
        VkOffset2D    offset;
        VkExtent2D    extent;
    } VkRect2D;

- `offset` is a VkOffset2D specifying the rectangle offset.

- `extent` is a VkExtent2D specifying the rectangle extent.

#### 3.12.4. Host Address Ranges

A host address range indicates a range of host memory.

    // Provided by VK_EXT_descriptor_heap
    typedef struct VkHostAddressRangeEXT {
        void*     address;
        size_t    size;
    } VkHostAddressRangeEXT;

- `address` is a host memory address.

- `size` is the size of the range.

Valid Usage (Implicit)

- VUID-VkHostAddressRangeEXT-address-parameter
  `address` must be a valid pointer to an array of `size` bytes

- VUID-VkHostAddressRangeEXT-size-arraylength
  `size` must be greater than `0`

A constant host address range indicates a range of host memory that cannot be altered.

    // Provided by VK_EXT_descriptor_heap
    typedef struct VkHostAddressRangeConstEXT {
        const void*    address;
        size_t         size;
    } VkHostAddressRangeConstEXT;

- `address` is a read-only host memory address.

- `size` is the size of the range.

Valid Usage (Implicit)

- VUID-VkHostAddressRangeConstEXT-address-parameter
  `address` must be a valid pointer to an array of `size` bytes

- VUID-VkHostAddressRangeConstEXT-size-arraylength
  `size` must be greater than `0`

#### 3.12.5. Device Address Ranges

A device address range indicates a sized range of device memory.

    // Provided by VK_KHR_device_address_commands
    typedef struct VkDeviceAddressRangeKHR {
        VkDeviceAddress    address;
        VkDeviceSize       size;
    } VkDeviceAddressRangeKHR;

    // Provided by VK_EXT_descriptor_heap
    // Equivalent to VkDeviceAddressRangeKHR
    typedef VkDeviceAddressRangeKHR VkDeviceAddressRangeEXT;

- `address` is 0 or a VkDeviceAddress specifying the start of the range.

- `size` is a VkDeviceSize specifying the size of the range.

Valid Usage

- VUID-VkDeviceAddressRangeKHR-size-11411
  If `size` is not 0, `address` must not be 0

- VUID-VkDeviceAddressRangeKHR-address-11365
  The sum of `address` and `size` must be less than or equal to the sum of an address retrieved from a VkBuffer and the value of VkBufferCreateInfo::`size` used to create that VkBuffer

Valid Usage (Implicit)

- VUID-VkDeviceAddressRangeKHR-address-parameter
  If `address` is not `0`, `address` must be a valid VkDeviceAddress value

A strided device address range is defined by the structure:

    // Provided by VK_KHR_copy_memory_indirect, VK_KHR_device_address_commands
    typedef struct VkStridedDeviceAddressRangeKHR {
        VkDeviceAddress    address;
        VkDeviceSize       size;
        VkDeviceSize       stride;
    } VkStridedDeviceAddressRangeKHR;

- `address` is a VkDeviceAddress specifying the start of the range.

- `size` is a VkDeviceSize specifying the size of the range.

- `stride` is a VkDeviceSize specifying the stride of elements over the range.

Valid Usage

- VUID-VkStridedDeviceAddressRangeKHR-size-11411
  If `size` is not 0, `address` must not be 0

- VUID-VkStridedDeviceAddressRangeKHR-address-11365
  The sum of `address` and `size` must be less than or equal to the sum of an address retrieved from a VkBuffer and the value of VkBufferCreateInfo::`size` used to create that VkBuffer

- VUID-VkStridedDeviceAddressRangeKHR-stride-10957
  `stride` must be less than or equal to `size`

Valid Usage (Implicit)

- VUID-VkStridedDeviceAddressRangeKHR-address-parameter
  If `address` is not `0`, `address` must be a valid VkDeviceAddress value

Many Vulkan commands need additional information about an address range; this may be provided by the following flags.

Bits which can be set in a VkAddressCommandFlagsKHR mask are:

    // Provided by VK_KHR_device_address_commands
    typedef enum VkAddressCommandFlagBitsKHR {
        VK_ADDRESS_COMMAND_PROTECTED_BIT_KHR = 0x00000001,
        VK_ADDRESS_COMMAND_FULLY_BOUND_BIT_KHR = 0x00000002,
        VK_ADDRESS_COMMAND_STORAGE_BUFFER_USAGE_BIT_KHR = 0x00000004,
        VK_ADDRESS_COMMAND_UNKNOWN_STORAGE_BUFFER_USAGE_BIT_KHR = 0x00000008,
      // Provided by VK_KHR_device_address_commands with VK_EXT_transform_feedback
        VK_ADDRESS_COMMAND_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR = 0x00000010,
      // Provided by VK_KHR_device_address_commands with VK_EXT_transform_feedback
        VK_ADDRESS_COMMAND_UNKNOWN_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR = 0x00000020,
    } VkAddressCommandFlagBitsKHR;

- VK_ADDRESS_COMMAND_PROTECTED_BIT_KHR specifies that an address range is allocated from protected memory.

- VK_ADDRESS_COMMAND_FULLY_BOUND_BIT_KHR specifies that an address range will be fully bound to physical memory when accessed.

- VK_ADDRESS_COMMAND_STORAGE_BUFFER_USAGE_BIT_KHR specifies that all buffers containing any part of an address range were created with the VK_BUFFER_USAGE_STORAGE_BUFFER_BIT usage.

- VK_ADDRESS_COMMAND_UNKNOWN_STORAGE_BUFFER_USAGE_BIT_KHR specifies that whether buffers containing an any part of an address range were created with VK_BUFFER_USAGE_STORAGE_BUFFER_BIT usage or not is unknown.

- VK_ADDRESS_COMMAND_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR specifies that all buffers containing any part of an address range are allocated with the VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT usage.

- VK_ADDRESS_COMMAND_UNKNOWN_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR specifies that whether buffers containing an any part of an address range were created with VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT usage or not is unknown.

If neither VK_ADDRESS_COMMAND_STORAGE_BUFFER_USAGE_BIT_KHR nor VK_ADDRESS_COMMAND_UNKNOWN_STORAGE_BUFFER_USAGE_BIT_KHR are specified, the address range must not be aliased with any buffer allocated with the VK_BUFFER_USAGE_STORAGE_BUFFER_BIT. If neither VK_ADDRESS_COMMAND_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR nor VK_ADDRESS_COMMAND_UNKNOWN_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR are specified, the address range must not be aliased with any buffer allocated with the VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT.

Note | Buffers can return overlapping address ranges if they are bound to overlapping ranges of a VkDeviceMemory object. Applications should ensure that if they do this kind of aliasing, that they consistently either include or do not include VK_BUFFER_USAGE_STORAGE_BUFFER_BIT and VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT on aliased buffers when considering these flags.

    // Provided by VK_KHR_device_address_commands
    typedef VkFlags VkAddressCommandFlagsKHR;

`VkAddressCommandFlagsKHR` is a bitmask type for setting a mask of zero or more VkAddressCommandFlagBitsKHR.

#### 3.12.6. Structure Types

Each value corresponds to a particular structure with a `sType` member with a matching name. As a general rule, the name of each VkStructureType value is obtained by taking the name of the structure, stripping the leading `Vk`, prefixing each capital letter except the first with `_`, converting the entire resulting string to upper case, and prefixing it with `VK_STRUCTURE_TYPE_`. For example, structures of type VkImageCreateInfo correspond to a VkStructureType value of VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO, and thus a structure of this type must have its `sType` member set to this value before it is passed to the API.

The values VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO and VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO are reserved for internal use by the loader, and do not have corresponding Vulkan structures in this Specification.

Structure types supported by the Vulkan API include:

    // Provided by VK_VERSION_1_0
    typedef enum VkStructureType {
        VK_STRUCTURE_TYPE_APPLICATION_INFO = 0,
        VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO = 1,
        VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO = 2,
        VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO = 3,
        VK_STRUCTURE_TYPE_SUBMIT_INFO = 4,
        VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO = 5,
        VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE = 6,
        VK_STRUCTURE_TYPE_BIND_SPARSE_INFO = 7,
        VK_STRUCTURE_TYPE_FENCE_CREATE_INFO = 8,
        VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO = 9,
        VK_STRUCTURE_TYPE_EVENT_CREATE_INFO = 10,
        VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO = 11,
        VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO = 12,
        VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO = 13,
        VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO = 14,
        VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO = 15,
        VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO = 16,
        VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO = 17,
        VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO = 18,
        VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO = 19,
        VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO = 20,
        VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO = 21,
        VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO = 22,
        VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO = 23,
        VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO = 24,
        VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO = 25,
        VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO = 26,
        VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO = 27,
        VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO = 28,
        VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO = 29,
        VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO = 30,
        VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO = 31,
        VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO = 32,
        VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO = 33,
        VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO = 34,
        VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET = 35,
        VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET = 36,
        VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO = 37,
        VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO = 38,
        VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO = 39,
        VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO = 40,
        VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO = 41,
        VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO = 42,
        VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO = 43,
        VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER = 44,
        VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER = 45,
        VK_STRUCTURE_TYPE_MEMORY_BARRIER = 46,
        VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO = 47,
        VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO = 48,
      // Provided by VK_VERSION_1_1
        VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO = 1000157000,
      // Provided by VK_VERSION_1_1
        VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO = 1000157001,
      // Provided by VK_VERSION_1_1
        VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS = 1000127000,
      // Provided by VK_VERSION_1_1
        VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO = 1000127001,
      // Provided by VK_VERSION_1_1
        VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO = 1000060000,
      // Provided by VK_VERSION_1_1
        VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO = 1000060004,
      // Provided by VK_VERSION_1_1
        VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO = 1000060005,
      // Provided by VK_VERSION_1_1
        VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO = 1000060006,
      // Provided by VK_VERSION_1_1
        VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO = 1000060013,
      // Provided by VK_VERSION_1_1
        VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO = 1000060014,
      // Provided by VK_VERSION_1_1
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES = 1000070000,
      // Provided by VK_VERSION_1_1
        VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO = 1000070001,
      // Provided by VK_VERSION_1_1
        VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2 = 1000146000,
      // Provided by VK_VERSION_1_1
        VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2 = 1000146001,
      // Provided by VK_VERSION_1_1
        VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2 = 1000146002,
      // Provided by VK_VERSION_1_1
        VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2 = 1000146003,
      // Provided by VK_VERSION_1_1
        VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2 = 1000146004,
      // Provided by VK_VERSION_1_1
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2 = 1000059000,
      // Provided by VK_VERSION_1_1
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2 = 1000059001,
      // Provided by VK_VERSION_1_1
        VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2 = 1000059002,
      // Provided by VK_VERSION_1_1
        VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2 = 1000059003,
      // Provided by VK_VERSION_1_1
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2 = 1000059004,
      // Provided by VK_VERSION_1_1
        VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2 = 1000059005,
      // Provided by VK_VERSION_1_1
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2 = 1000059006,
      // Provided by VK_VERSION_1_1
        VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2 = 1000059007,
      // Provided by VK_VERSION_1_1
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2 = 1000059008,
      // Provided by VK_VERSION_1_1
        VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO = 1000117002,
      // Provided by VK_VERSION_1_1
        VK_STRUCTURE_TYPE_PROTECTED_SUBMIT_INFO = 1000145000,
      // Provided by VK_VERSION_1_1
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES = 1000145001,
      // Provided by VK_VERSION_1_1
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_PROPERTIES = 1000145002,
      // Provided by VK_VERSION_1_1
        VK_STRUCTURE_TYPE_DEVICE_QUEUE_INFO_2 = 1000145003,
      // Provided by VK_VERSION_1_1
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO = 1000071000,
      // Provided by VK_VERSION_1_1
        VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES = 1000071001,
      // Provided by VK_VERSION_1_1
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO = 1000071002,
      // Provided by VK_VERSION_1_1
        VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES = 1000071003,
      // Provided by VK_VERSION_1_1
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES = 1000071004,
      // Provided by VK_VERSION_1_1
        VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO = 1000072000,
      // Provided by VK_VERSION_1_1
        VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO = 1000072001,
      // Provided by VK_VERSION_1_1
        VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO = 1000072002,
      // Provided by VK_VERSION_1_1
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO = 1000112000,
      // Provided by VK_VERSION_1_1
        VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES = 1000112001,
      // Provided by VK_VERSION_1_1
        VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO = 1000113000,
      // Provided by VK_VERSION_1_1
        VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO = 1000077000,
      // Provided by VK_VERSION_1_1
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO = 1000076000,
      // Provided by VK_VERSION_1_1
        VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES = 1000076001,
      // Provided by VK_VERSION_1_1
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES = 1000094000,
      // Provided by VK_VERSION_1_1
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES = 1000083000,
      // Provided by VK_VERSION_1_1
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES = 1000120000,
      // Provided by VK_VERSION_1_1
        VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO = 1000085000,
      // Provided by VK_VERSION_1_1
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES = 1000168000,
      // Provided by VK_VERSION_1_1
        VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_SUPPORT = 1000168001,
      // Provided by VK_VERSION_1_1
        VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFO = 1000156000,
      // Provided by VK_VERSION_1_1
        VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO = 1000156001,
      // Provided by VK_VERSION_1_1
        VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO = 1000156002,
      // Provided by VK_VERSION_1_1
        VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO = 1000156003,
      // Provided by VK_VERSION_1_1
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES = 1000156004,
      // Provided by VK_VERSION_1_1
        VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES = 1000156005,
      // Provided by VK_VERSION_1_1
        VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO = 1000060003,
      // Provided by VK_VERSION_1_1
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES = 1000117000,
      // Provided by VK_VERSION_1_1
        VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO = 1000117001,
      // Provided by VK_VERSION_1_1
        VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO = 1000117003,
      // Provided by VK_VERSION_1_1
        VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO = 1000053000,
      // Provided by VK_VERSION_1_1
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES = 1000053001,
      // Provided by VK_VERSION_1_1
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES = 1000053002,
      // Provided by VK_VERSION_1_1
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES = 1000063000,
      // Provided by VK_VERSION_1_2
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES = 1000196000,
      // Provided by VK_VERSION_1_2
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_FEATURES = 49,
      // Provided by VK_VERSION_1_2
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_PROPERTIES = 50,
      // Provided by VK_VERSION_1_2
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES = 51,
      // Provided by VK_VERSION_1_2
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_PROPERTIES = 52,
      // Provided by VK_VERSION_1_2
        VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO = 1000147000,
      // Provided by VK_VERSION_1_2
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES = 1000211000,
      // Provided by VK_VERSION_1_2
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES = 1000261000,
      // Provided by VK_VERSION_1_2
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES = 1000207000,
      // Provided by VK_VERSION_1_2
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_PROPERTIES = 1000207001,
      // Provided by VK_VERSION_1_2
        VK_STRUCTURE_TYPE_SEMAPHORE_TYPE_CREATE_INFO = 1000207002,
      // Provided by VK_VERSION_1_2
        VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO = 1000207003,
      // Provided by VK_VERSION_1_2
        VK_STRUCTURE_TYPE_SEMAPHORE_WAIT_INFO = 1000207004,
      // Provided by VK_VERSION_1_2
        VK_STRUCTURE_TYPE_SEMAPHORE_SIGNAL_INFO = 1000207005,
      // Provided by VK_VERSION_1_2
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES = 1000257000,
      // Provided by VK_VERSION_1_2
        VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO = 1000244001,
      // Provided by VK_VERSION_1_2
        VK_STRUCTURE_TYPE_BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO = 1000257002,
      // Provided by VK_VERSION_1_2
        VK_STRUCTURE_TYPE_MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO = 1000257003,
      // Provided by VK_VERSION_1_2
        VK_STRUCTURE_TYPE_DEVICE_MEMORY_OPAQUE_CAPTURE_ADDRESS_INFO = 1000257004,
      // Provided by VK_VERSION_1_2
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES = 1000177000,
      // Provided by VK_VERSION_1_2
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES = 1000180000,
      // Provided by VK_VERSION_1_2
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES = 1000082000,
      // Provided by VK_VERSION_1_2
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES = 1000197000,
      // Provided by VK_VERSION_1_2
        VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO = 1000161000,
      // Provided by VK_VERSION_1_2
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES = 1000161001,
      // Provided by VK_VERSION_1_2
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES = 1000161002,
      // Provided by VK_VERSION_1_2
        VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO = 1000161003,
      // Provided by VK_VERSION_1_2
        VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT = 1000161004,
      // Provided by VK_VERSION_1_2
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES = 1000221000,
      // Provided by VK_VERSION_1_2
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES = 1000130000,
      // Provided by VK_VERSION_1_2
        VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO = 1000130001,
      // Provided by VK_VERSION_1_2
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES = 1000253000,
      // Provided by VK_VERSION_1_2
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES = 1000175000,
      // Provided by VK_VERSION_1_2
        VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_2 = 1000109000,
      // Provided by VK_VERSION_1_2
        VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2 = 1000109001,
      // Provided by VK_VERSION_1_2
        VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_2 = 1000109002,
      // Provided by VK_VERSION_1_2
        VK_STRUCTURE_TYPE_SUBPASS_DEPENDENCY_2 = 1000109003,
      // Provided by VK_VERSION_1_2
        VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO_2 = 1000109004,
      // Provided by VK_VERSION_1_2
        VK_STRUCTURE_TYPE_SUBPASS_BEGIN_INFO = 1000109005,
      // Provided by VK_VERSION_1_2
        VK_STRUCTURE_TYPE_SUBPASS_END_INFO = 1000109006,
      // Provided by VK_VERSION_1_2
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES = 1000199000,
      // Provided by VK_VERSION_1_2
        VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE = 1000199001,
      // Provided by VK_VERSION_1_2
        VK_STRUCTURE_TYPE_IMAGE_STENCIL_USAGE_CREATE_INFO = 1000246000,
      // Provided by VK_VERSION_1_2
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGELESS_FRAMEBUFFER_FEATURES = 1000108000,
      // Provided by VK_VERSION_1_2
        VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENTS_CREATE_INFO = 1000108001,
      // Provided by VK_VERSION_1_2
        VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENT_IMAGE_INFO = 1000108002,
      // Provided by VK_VERSION_1_2
        VK_STRUCTURE_TYPE_RENDER_PASS_ATTACHMENT_BEGIN_INFO = 1000108003,
      // Provided by VK_VERSION_1_2
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES = 1000241000,
      // Provided by VK_VERSION_1_2
        VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_STENCIL_LAYOUT = 1000241001,
      // Provided by VK_VERSION_1_2
        VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_STENCIL_LAYOUT = 1000241002,
      // Provided by VK_VERSION_1_3
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_FEATURES = 53,
      // Provided by VK_VERSION_1_3
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_PROPERTIES = 54,
      // Provided by VK_VERSION_1_3
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TOOL_PROPERTIES = 1000245000,
      // Provided by VK_VERSION_1_3
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES = 1000295000,
      // Provided by VK_VERSION_1_3
        VK_STRUCTURE_TYPE_DEVICE_PRIVATE_DATA_CREATE_INFO = 1000295001,
      // Provided by VK_VERSION_1_3
        VK_STRUCTURE_TYPE_PRIVATE_DATA_SLOT_CREATE_INFO = 1000295002,
      // Provided by VK_VERSION_1_3
        VK_STRUCTURE_TYPE_MEMORY_BARRIER_2 = 1000314000,
      // Provided by VK_VERSION_1_3
        VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER_2 = 1000314001,
      // Provided by VK_VERSION_1_3
        VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER_2 = 1000314002,
      // Provided by VK_VERSION_1_3
        VK_STRUCTURE_TYPE_DEPENDENCY_INFO = 1000314003,
      // Provided by VK_VERSION_1_3
        VK_STRUCTURE_TYPE_SUBMIT_INFO_2 = 1000314004,
      // Provided by VK_VERSION_1_3
        VK_STRUCTURE_TYPE_SEMAPHORE_SUBMIT_INFO = 1000314005,
      // Provided by VK_VERSION_1_3
        VK_STRUCTURE_TYPE_COMMAND_BUFFER_SUBMIT_INFO = 1000314006,
      // Provided by VK_VERSION_1_3
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES = 1000314007,
      // Provided by VK_VERSION_1_3
        VK_STRUCTURE_TYPE_COPY_BUFFER_INFO_2 = 1000337000,
      // Provided by VK_VERSION_1_3
        VK_STRUCTURE_TYPE_COPY_IMAGE_INFO_2 = 1000337001,
      // Provided by VK_VERSION_1_3
        VK_STRUCTURE_TYPE_COPY_BUFFER_TO_IMAGE_INFO_2 = 1000337002,
      // Provided by VK_VERSION_1_3
        VK_STRUCTURE_TYPE_COPY_IMAGE_TO_BUFFER_INFO_2 = 1000337003,
      // Provided by VK_VERSION_1_3
        VK_STRUCTURE_TYPE_BUFFER_COPY_2 = 1000337006,
      // Provided by VK_VERSION_1_3
        VK_STRUCTURE_TYPE_IMAGE_COPY_2 = 1000337007,
      // Provided by VK_VERSION_1_3
        VK_STRUCTURE_TYPE_BUFFER_IMAGE_COPY_2 = 1000337009,
      // Provided by VK_VERSION_1_3
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_HDR_FEATURES = 1000066000,
      // Provided by VK_VERSION_1_3
        VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_3 = 1000360000,
      // Provided by VK_VERSION_1_3
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_FEATURES = 1000413000,
      // Provided by VK_VERSION_1_3
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_PROPERTIES = 1000413001,
      // Provided by VK_VERSION_1_3
        VK_STRUCTURE_TYPE_DEVICE_BUFFER_MEMORY_REQUIREMENTS = 1000413002,
      // Provided by VK_VERSION_1_3
        VK_STRUCTURE_TYPE_DEVICE_IMAGE_MEMORY_REQUIREMENTS = 1000413003,
      // Provided by VK_VERSION_1_3
        VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO = 1000192000,
      // Provided by VK_VERSION_1_3
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TERMINATE_INVOCATION_FEATURES = 1000215000,
      // Provided by VK_VERSION_1_3
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES = 1000276000,
      // Provided by VK_VERSION_1_3
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES = 1000297000,
      // Provided by VK_VERSION_1_3
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ZERO_INITIALIZE_WORKGROUP_MEMORY_FEATURES = 1000325000,
      // Provided by VK_VERSION_1_3
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_ROBUSTNESS_FEATURES = 1000335000,
      // Provided by VK_VERSION_1_3
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_PROPERTIES = 1000225000,
      // Provided by VK_VERSION_1_3
        VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_REQUIRED_SUBGROUP_SIZE_CREATE_INFO = 1000225001,
      // Provided by VK_VERSION_1_3
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES = 1000225002,
      // Provided by VK_VERSION_1_3
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES = 1000138000,
      // Provided by VK_VERSION_1_3
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_PROPERTIES = 1000138001,
      // Provided by VK_VERSION_1_3
        VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_INLINE_UNIFORM_BLOCK = 1000138002,
      // Provided by VK_VERSION_1_3
        VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_INLINE_UNIFORM_BLOCK_CREATE_INFO = 1000138003,
      // Provided by VK_VERSION_1_3
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_FEATURES = 1000280000,
      // Provided by VK_VERSION_1_3
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_PROPERTIES = 1000280001,
      // Provided by VK_VERSION_1_3
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_PROPERTIES = 1000281001,
      // Provided by VK_VERSION_1_3
        VK_STRUCTURE_TYPE_BLIT_IMAGE_INFO_2 = 1000337004,
      // Provided by VK_VERSION_1_3
        VK_STRUCTURE_TYPE_RESOLVE_IMAGE_INFO_2 = 1000337005,
      // Provided by VK_VERSION_1_3
        VK_STRUCTURE_TYPE_IMAGE_BLIT_2 = 1000337008,
      // Provided by VK_VERSION_1_3
        VK_STRUCTURE_TYPE_IMAGE_RESOLVE_2 = 1000337010,
      // Provided by VK_VERSION_1_3
        VK_STRUCTURE_TYPE_RENDERING_INFO = 1000044000,
      // Provided by VK_VERSION_1_3
        VK_STRUCTURE_TYPE_RENDERING_ATTACHMENT_INFO = 1000044001,
      // Provided by VK_VERSION_1_3
        VK_STRUCTURE_TYPE_PIPELINE_RENDERING_CREATE_INFO = 1000044002,
      // Provided by VK_VERSION_1_3
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_FEATURES = 1000044003,
      // Provided by VK_VERSION_1_3
        VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_RENDERING_INFO = 1000044004,
      // Provided by VK_VERSION_1_4
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_4_FEATURES = 55,
      // Provided by VK_VERSION_1_4
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_4_PROPERTIES = 56,
      // Provided by VK_VERSION_1_4
        VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO = 1000174000,
      // Provided by VK_VERSION_1_4
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES = 1000388000,
      // Provided by VK_VERSION_1_4
        VK_STRUCTURE_TYPE_QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES = 1000388001,
      // Provided by VK_VERSION_1_4
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES = 1000265000,
      // Provided by VK_VERSION_1_4
        VK_STRUCTURE_TYPE_MEMORY_MAP_INFO = 1000271000,
      // Provided by VK_VERSION_1_4
        VK_STRUCTURE_TYPE_MEMORY_UNMAP_INFO = 1000271001,
      // Provided by VK_VERSION_1_4
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_FEATURES = 1000470000,
      // Provided by VK_VERSION_1_4
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_PROPERTIES = 1000470001,
      // Provided by VK_VERSION_1_4
        VK_STRUCTURE_TYPE_DEVICE_IMAGE_SUBRESOURCE_INFO = 1000470004,
      // Provided by VK_VERSION_1_4
        VK_STRUCTURE_TYPE_SUBRESOURCE_LAYOUT_2 = 1000338002,
      // Provided by VK_VERSION_1_4
        VK_STRUCTURE_TYPE_IMAGE_SUBRESOURCE_2 = 1000338003,
      // Provided by VK_VERSION_1_4
        VK_STRUCTURE_TYPE_BUFFER_USAGE_FLAGS_2_CREATE_INFO = 1000470006,
      // Provided by VK_VERSION_1_4
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_FEATURES = 1000545000,
      // Provided by VK_VERSION_1_4
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_PROPERTIES = 1000545001,
      // Provided by VK_VERSION_1_4
        VK_STRUCTURE_TYPE_BIND_MEMORY_STATUS = 1000545002,
      // Provided by VK_VERSION_1_4
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_FEATURES = 1000270000,
      // Provided by VK_VERSION_1_4
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_PROPERTIES = 1000270001,
      // Provided by VK_VERSION_1_4
        VK_STRUCTURE_TYPE_MEMORY_TO_IMAGE_COPY = 1000270002,
      // Provided by VK_VERSION_1_4
        VK_STRUCTURE_TYPE_IMAGE_TO_MEMORY_COPY = 1000270003,
      // Provided by VK_VERSION_1_4
        VK_STRUCTURE_TYPE_COPY_IMAGE_TO_MEMORY_INFO = 1000270004,
      // Provided by VK_VERSION_1_4
        VK_STRUCTURE_TYPE_COPY_MEMORY_TO_IMAGE_INFO = 1000270005,
      // Provided by VK_VERSION_1_4
        VK_STRUCTURE_TYPE_HOST_IMAGE_LAYOUT_TRANSITION_INFO = 1000270006,
      // Provided by VK_VERSION_1_4
        VK_STRUCTURE_TYPE_COPY_IMAGE_TO_IMAGE_INFO = 1000270007,
      // Provided by VK_VERSION_1_4
        VK_STRUCTURE_TYPE_SUBRESOURCE_HOST_MEMCPY_SIZE = 1000270008,
      // Provided by VK_VERSION_1_4
        VK_STRUCTURE_TYPE_HOST_IMAGE_COPY_DEVICE_PERFORMANCE_QUERY = 1000270009,
      // Provided by VK_VERSION_1_4
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_ROTATE_FEATURES = 1000416000,
      // Provided by VK_VERSION_1_4
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT_CONTROLS_2_FEATURES = 1000528000,
      // Provided by VK_VERSION_1_4
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_EXPECT_ASSUME_FEATURES = 1000544000,
      // Provided by VK_VERSION_1_4
        VK_STRUCTURE_TYPE_PIPELINE_CREATE_FLAGS_2_CREATE_INFO = 1000470005,
      // Provided by VK_VERSION_1_4
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES = 1000080000,
      // Provided by VK_VERSION_1_4
        VK_STRUCTURE_TYPE_BIND_DESCRIPTOR_SETS_INFO = 1000545003,
      // Provided by VK_VERSION_1_4
        VK_STRUCTURE_TYPE_PUSH_CONSTANTS_INFO = 1000545004,
      // Provided by VK_VERSION_1_4
        VK_STRUCTURE_TYPE_PUSH_DESCRIPTOR_SET_INFO = 1000545005,
      // Provided by VK_VERSION_1_4
        VK_STRUCTURE_TYPE_PUSH_DESCRIPTOR_SET_WITH_TEMPLATE_INFO = 1000545006,
      // Provided by VK_VERSION_1_4
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_PROTECTED_ACCESS_FEATURES = 1000466000,
      // Provided by VK_VERSION_1_4
        VK_STRUCTURE_TYPE_PIPELINE_ROBUSTNESS_CREATE_INFO = 1000068000,
      // Provided by VK_VERSION_1_4
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_FEATURES = 1000068001,
      // Provided by VK_VERSION_1_4
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_PROPERTIES = 1000068002,
      // Provided by VK_VERSION_1_4
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES = 1000259000,
      // Provided by VK_VERSION_1_4
        VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO = 1000259001,
      // Provided by VK_VERSION_1_4
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES = 1000259002,
      // Provided by VK_VERSION_1_4
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES = 1000525000,
      // Provided by VK_VERSION_1_4
        VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO = 1000190001,
      // Provided by VK_VERSION_1_4
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES = 1000190002,
      // Provided by VK_VERSION_1_4
        VK_STRUCTURE_TYPE_RENDERING_AREA_INFO = 1000470003,
      // Provided by VK_VERSION_1_4
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_LOCAL_READ_FEATURES = 1000232000,
      // Provided by VK_VERSION_1_4
        VK_STRUCTURE_TYPE_RENDERING_ATTACHMENT_LOCATION_INFO = 1000232001,
      // Provided by VK_VERSION_1_4
        VK_STRUCTURE_TYPE_RENDERING_INPUT_ATTACHMENT_INDEX_INFO = 1000232002,
      // Provided by VK_KHR_swapchain
        VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR = 1000001000,
      // Provided by VK_KHR_swapchain
        VK_STRUCTURE_TYPE_PRESENT_INFO_KHR = 1000001001,
      // Provided by VK_VERSION_1_1 with VK_KHR_swapchain, VK_KHR_device_group with VK_KHR_surface
        VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHR = 1000060007,
      // Provided by VK_VERSION_1_1 with VK_KHR_swapchain, VK_KHR_device_group with VK_KHR_swapchain
        VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHR = 1000060008,
      // Provided by VK_VERSION_1_1 with VK_KHR_swapchain, VK_KHR_device_group with VK_KHR_swapchain
        VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR = 1000060009,
      // Provided by VK_VERSION_1_1 with VK_KHR_swapchain, VK_KHR_device_group with VK_KHR_swapchain
        VK_STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHR = 1000060010,
      // Provided by VK_VERSION_1_1 with VK_KHR_swapchain, VK_KHR_device_group with VK_KHR_swapchain
        VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHR = 1000060011,
      // Provided by VK_VERSION_1_1 with VK_KHR_swapchain, VK_KHR_device_group with VK_KHR_swapchain
        VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHR = 1000060012,
      // Provided by VK_KHR_display
        VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR = 1000002000,
      // Provided by VK_KHR_display
        VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR = 1000002001,
      // Provided by VK_KHR_display_swapchain
        VK_STRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHR = 1000003000,
      // Provided by VK_KHR_xlib_surface
        VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR = 1000004000,
      // Provided by VK_KHR_xcb_surface
        VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR = 1000005000,
      // Provided by VK_KHR_wayland_surface
        VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR = 1000006000,
      // Provided by VK_KHR_android_surface
        VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR = 1000008000,
      // Provided by VK_KHR_win32_surface
        VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR = 1000009000,
      // Provided by VK_EXT_debug_report
        VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT = 1000011000,
      // Provided by VK_AMD_rasterization_order
        VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD = 1000018000,
      // Provided by VK_EXT_debug_marker
        VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT = 1000022000,
      // Provided by VK_EXT_debug_marker
        VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_TAG_INFO_EXT = 1000022001,
      // Provided by VK_EXT_debug_marker
        VK_STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT = 1000022002,
      // Provided by VK_KHR_video_queue
        VK_STRUCTURE_TYPE_VIDEO_PROFILE_INFO_KHR = 1000023000,
      // Provided by VK_KHR_video_queue
        VK_STRUCTURE_TYPE_VIDEO_CAPABILITIES_KHR = 1000023001,
      // Provided by VK_KHR_video_queue
        VK_STRUCTURE_TYPE_VIDEO_PICTURE_RESOURCE_INFO_KHR = 1000023002,
      // Provided by VK_KHR_video_queue
        VK_STRUCTURE_TYPE_VIDEO_SESSION_MEMORY_REQUIREMENTS_KHR = 1000023003,
      // Provided by VK_KHR_video_queue
        VK_STRUCTURE_TYPE_BIND_VIDEO_SESSION_MEMORY_INFO_KHR = 1000023004,
      // Provided by VK_KHR_video_queue
        VK_STRUCTURE_TYPE_VIDEO_SESSION_CREATE_INFO_KHR = 1000023005,
      // Provided by VK_KHR_video_queue
        VK_STRUCTURE_TYPE_VIDEO_SESSION_PARAMETERS_CREATE_INFO_KHR = 1000023006,
      // Provided by VK_KHR_video_queue
        VK_STRUCTURE_TYPE_VIDEO_SESSION_PARAMETERS_UPDATE_INFO_KHR = 1000023007,
      // Provided by VK_KHR_video_queue
        VK_STRUCTURE_TYPE_VIDEO_BEGIN_CODING_INFO_KHR = 1000023008,
      // Provided by VK_KHR_video_queue
        VK_STRUCTURE_TYPE_VIDEO_END_CODING_INFO_KHR = 1000023009,
      // Provided by VK_KHR_video_queue
        VK_STRUCTURE_TYPE_VIDEO_CODING_CONTROL_INFO_KHR = 1000023010,
      // Provided by VK_KHR_video_queue
        VK_STRUCTURE_TYPE_VIDEO_REFERENCE_SLOT_INFO_KHR = 1000023011,
      // Provided by VK_KHR_video_queue
        VK_STRUCTURE_TYPE_QUEUE_FAMILY_VIDEO_PROPERTIES_KHR = 1000023012,
      // Provided by VK_KHR_video_queue
        VK_STRUCTURE_TYPE_VIDEO_PROFILE_LIST_INFO_KHR = 1000023013,
      // Provided by VK_KHR_video_queue
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_FORMAT_INFO_KHR = 1000023014,
      // Provided by VK_KHR_video_queue
        VK_STRUCTURE_TYPE_VIDEO_FORMAT_PROPERTIES_KHR = 1000023015,
      // Provided by VK_KHR_video_queue
        VK_STRUCTURE_TYPE_QUEUE_FAMILY_QUERY_RESULT_STATUS_PROPERTIES_KHR = 1000023016,
      // Provided by VK_KHR_video_decode_queue
        VK_STRUCTURE_TYPE_VIDEO_DECODE_INFO_KHR = 1000024000,
      // Provided by VK_KHR_video_decode_queue
        VK_STRUCTURE_TYPE_VIDEO_DECODE_CAPABILITIES_KHR = 1000024001,
      // Provided by VK_KHR_video_decode_queue
        VK_STRUCTURE_TYPE_VIDEO_DECODE_USAGE_INFO_KHR = 1000024002,
      // Provided by VK_NV_dedicated_allocation
        VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV = 1000026000,
      // Provided by VK_NV_dedicated_allocation
        VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV = 1000026001,
      // Provided by VK_NV_dedicated_allocation
        VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV = 1000026002,
      // Provided by VK_EXT_transform_feedback
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT = 1000028000,
      // Provided by VK_EXT_transform_feedback
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_PROPERTIES_EXT = 1000028001,
      // Provided by VK_EXT_transform_feedback
        VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_STREAM_CREATE_INFO_EXT = 1000028002,
      // Provided by VK_NVX_binary_import
        VK_STRUCTURE_TYPE_CU_MODULE_CREATE_INFO_NVX = 1000029000,
      // Provided by VK_NVX_binary_import
        VK_STRUCTURE_TYPE_CU_FUNCTION_CREATE_INFO_NVX = 1000029001,
      // Provided by VK_NVX_binary_import
        VK_STRUCTURE_TYPE_CU_LAUNCH_INFO_NVX = 1000029002,
      // Provided by VK_NVX_binary_import
        VK_STRUCTURE_TYPE_CU_MODULE_TEXTURING_MODE_CREATE_INFO_NVX = 1000029004,
      // Provided by VK_NVX_image_view_handle
        VK_STRUCTURE_TYPE_IMAGE_VIEW_HANDLE_INFO_NVX = 1000030000,
      // Provided by VK_NVX_image_view_handle
        VK_STRUCTURE_TYPE_IMAGE_VIEW_ADDRESS_PROPERTIES_NVX = 1000030001,
      // Provided by VK_KHR_video_encode_h264
        VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_CAPABILITIES_KHR = 1000038000,
      // Provided by VK_KHR_video_encode_h264
        VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_PARAMETERS_CREATE_INFO_KHR = 1000038001,
      // Provided by VK_KHR_video_encode_h264
        VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_PARAMETERS_ADD_INFO_KHR = 1000038002,
      // Provided by VK_KHR_video_encode_h264
        VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_PICTURE_INFO_KHR = 1000038003,
      // Provided by VK_KHR_video_encode_h264
        VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_DPB_SLOT_INFO_KHR = 1000038004,
      // Provided by VK_KHR_video_encode_h264
        VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_NALU_SLICE_INFO_KHR = 1000038005,
      // Provided by VK_KHR_video_encode_h264
        VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_GOP_REMAINING_FRAME_INFO_KHR = 1000038006,
      // Provided by VK_KHR_video_encode_h264
        VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_PROFILE_INFO_KHR = 1000038007,
      // Provided by VK_KHR_video_encode_h264
        VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_RATE_CONTROL_INFO_KHR = 1000038008,
      // Provided by VK_KHR_video_encode_h264
        VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_RATE_CONTROL_LAYER_INFO_KHR = 1000038009,
      // Provided by VK_KHR_video_encode_h264
        VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_CREATE_INFO_KHR = 1000038010,
      // Provided by VK_KHR_video_encode_h264
        VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_QUALITY_LEVEL_PROPERTIES_KHR = 1000038011,
      // Provided by VK_KHR_video_encode_h264
        VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_PARAMETERS_GET_INFO_KHR = 1000038012,
      // Provided by VK_KHR_video_encode_h264
        VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_PARAMETERS_FEEDBACK_INFO_KHR = 1000038013,
      // Provided by VK_KHR_video_encode_h265
        VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_CAPABILITIES_KHR = 1000039000,
      // Provided by VK_KHR_video_encode_h265
        VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_SESSION_PARAMETERS_CREATE_INFO_KHR = 1000039001,
      // Provided by VK_KHR_video_encode_h265
        VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_SESSION_PARAMETERS_ADD_INFO_KHR = 1000039002,
      // Provided by VK_KHR_video_encode_h265
        VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_PICTURE_INFO_KHR = 1000039003,
      // Provided by VK_KHR_video_encode_h265
        VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_DPB_SLOT_INFO_KHR = 1000039004,
      // Provided by VK_KHR_video_encode_h265
        VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_NALU_SLICE_SEGMENT_INFO_KHR = 1000039005,
      // Provided by VK_KHR_video_encode_h265
        VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_GOP_REMAINING_FRAME_INFO_KHR = 1000039006,
      // Provided by VK_KHR_video_encode_h265
        VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_PROFILE_INFO_KHR = 1000039007,
      // Provided by VK_KHR_video_encode_h265
        VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_RATE_CONTROL_INFO_KHR = 1000039009,
      // Provided by VK_KHR_video_encode_h265
        VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_RATE_CONTROL_LAYER_INFO_KHR = 1000039010,
      // Provided by VK_KHR_video_encode_h265
        VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_SESSION_CREATE_INFO_KHR = 1000039011,
      // Provided by VK_KHR_video_encode_h265
        VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_QUALITY_LEVEL_PROPERTIES_KHR = 1000039012,
      // Provided by VK_KHR_video_encode_h265
        VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_SESSION_PARAMETERS_GET_INFO_KHR = 1000039013,
      // Provided by VK_KHR_video_encode_h265
        VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_SESSION_PARAMETERS_FEEDBACK_INFO_KHR = 1000039014,
      // Provided by VK_KHR_video_decode_h264
        VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_CAPABILITIES_KHR = 1000040000,
      // Provided by VK_KHR_video_decode_h264
        VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_PICTURE_INFO_KHR = 1000040001,
      // Provided by VK_KHR_video_decode_h264
        VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_PROFILE_INFO_KHR = 1000040003,
      // Provided by VK_KHR_video_decode_h264
        VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_SESSION_PARAMETERS_CREATE_INFO_KHR = 1000040004,
      // Provided by VK_KHR_video_decode_h264
        VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_SESSION_PARAMETERS_ADD_INFO_KHR = 1000040005,
      // Provided by VK_KHR_video_decode_h264
        VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_DPB_SLOT_INFO_KHR = 1000040006,
      // Provided by VK_AMD_texture_gather_bias_lod
        VK_STRUCTURE_TYPE_TEXTURE_LOD_GATHER_FORMAT_PROPERTIES_AMD = 1000041000,
      // Provided by VK_GGP_stream_descriptor_surface
        VK_STRUCTURE_TYPE_STREAM_DESCRIPTOR_SURFACE_CREATE_INFO_GGP = 1000049000,
      // Provided by VK_NV_corner_sampled_image
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CORNER_SAMPLED_IMAGE_FEATURES_NV = 1000050000,
      // Provided by VK_NV_external_memory
        VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV = 1000056000,
      // Provided by VK_NV_external_memory
        VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV = 1000056001,
      // Provided by VK_NV_external_memory_win32
        VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV = 1000057000,
      // Provided by VK_NV_external_memory_win32
        VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV = 1000057001,
      // Provided by VK_NV_win32_keyed_mutex
        VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV = 1000058000,
      // Provided by VK_EXT_validation_flags
        VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT = 1000061000,
      // Provided by VK_NN_vi_surface
        VK_STRUCTURE_TYPE_VI_SURFACE_CREATE_INFO_NN = 1000062000,
      // Provided by VK_EXT_astc_decode_mode
        VK_STRUCTURE_TYPE_IMAGE_VIEW_ASTC_DECODE_MODE_EXT = 1000067000,
      // Provided by VK_EXT_astc_decode_mode
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ASTC_DECODE_FEATURES_EXT = 1000067001,
      // Provided by VK_KHR_external_memory_win32
        VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR = 1000073000,
      // Provided by VK_KHR_external_memory_win32
        VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR = 1000073001,
      // Provided by VK_KHR_external_memory_win32
        VK_STRUCTURE_TYPE_MEMORY_WIN32_HANDLE_PROPERTIES_KHR = 1000073002,
      // Provided by VK_KHR_external_memory_win32
        VK_STRUCTURE_TYPE_MEMORY_GET_WIN32_HANDLE_INFO_KHR = 1000073003,
      // Provided by VK_KHR_external_memory_fd
        VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR = 1000074000,
      // Provided by VK_KHR_external_memory_fd
        VK_STRUCTURE_TYPE_MEMORY_FD_PROPERTIES_KHR = 1000074001,
      // Provided by VK_KHR_external_memory_fd
        VK_STRUCTURE_TYPE_MEMORY_GET_FD_INFO_KHR = 1000074002,
      // Provided by VK_KHR_win32_keyed_mutex
        VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHR = 1000075000,
      // Provided by VK_KHR_external_semaphore_win32
        VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR = 1000078000,
      // Provided by VK_KHR_external_semaphore_win32
        VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR = 1000078001,
      // Provided by VK_KHR_external_semaphore_win32
        VK_STRUCTURE_TYPE_D3D12_FENCE_SUBMIT_INFO_KHR = 1000078002,
      // Provided by VK_KHR_external_semaphore_win32
        VK_STRUCTURE_TYPE_SEMAPHORE_GET_WIN32_HANDLE_INFO_KHR = 1000078003,
      // Provided by VK_KHR_external_semaphore_fd
        VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_FD_INFO_KHR = 1000079000,
      // Provided by VK_KHR_external_semaphore_fd
        VK_STRUCTURE_TYPE_SEMAPHORE_GET_FD_INFO_KHR = 1000079001,
      // Provided by VK_EXT_conditional_rendering
        VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_CONDITIONAL_RENDERING_INFO_EXT = 1000081000,
      // Provided by VK_EXT_conditional_rendering
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT = 1000081001,
      // Provided by VK_EXT_conditional_rendering
        VK_STRUCTURE_TYPE_CONDITIONAL_RENDERING_BEGIN_INFO_EXT = 1000081002,
      // Provided by VK_KHR_incremental_present
        VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR = 1000084000,
      // Provided by VK_NV_clip_space_w_scaling
        VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV = 1000087000,
      // Provided by VK_EXT_display_surface_counter
        VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_EXT = 1000090000,
      // Provided by VK_EXT_display_control
        VK_STRUCTURE_TYPE_DISPLAY_POWER_INFO_EXT = 1000091000,
      // Provided by VK_EXT_display_control
        VK_STRUCTURE_TYPE_DEVICE_EVENT_INFO_EXT = 1000091001,
      // Provided by VK_EXT_display_control
        VK_STRUCTURE_TYPE_DISPLAY_EVENT_INFO_EXT = 1000091002,
      // Provided by VK_EXT_display_control
        VK_STRUCTURE_TYPE_SWAPCHAIN_COUNTER_CREATE_INFO_EXT = 1000091003,
      // Provided by VK_GOOGLE_display_timing
        VK_STRUCTURE_TYPE_PRESENT_TIMES_INFO_GOOGLE = 1000092000,
      // Provided by VK_NVX_multiview_per_view_attributes
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_ATTRIBUTES_PROPERTIES_NVX = 1000097000,
      // Provided by VK_NVX_multiview_per_view_attributes with VK_VERSION_1_3 or VK_KHR_dynamic_rendering
        VK_STRUCTURE_TYPE_MULTIVIEW_PER_VIEW_ATTRIBUTES_INFO_NVX = 1000044009,
      // Provided by VK_NV_viewport_swizzle
        VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV = 1000098000,
      // Provided by VK_EXT_discard_rectangles
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT = 1000099000,
      // Provided by VK_EXT_discard_rectangles
        VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT = 1000099001,
      // Provided by VK_EXT_conservative_rasterization
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONSERVATIVE_RASTERIZATION_PROPERTIES_EXT = 1000101000,
      // Provided by VK_EXT_conservative_rasterization
        VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_CONSERVATIVE_STATE_CREATE_INFO_EXT = 1000101001,
      // Provided by VK_EXT_depth_clip_enable
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_ENABLE_FEATURES_EXT = 1000102000,
      // Provided by VK_EXT_depth_clip_enable
        VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_DEPTH_CLIP_STATE_CREATE_INFO_EXT = 1000102001,
      // Provided by VK_EXT_hdr_metadata
        VK_STRUCTURE_TYPE_HDR_METADATA_EXT = 1000105000,
      // Provided by VK_IMG_relaxed_line_rasterization
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RELAXED_LINE_RASTERIZATION_FEATURES_IMG = 1000110000,
      // Provided by VK_KHR_shared_presentable_image
        VK_STRUCTURE_TYPE_SHARED_PRESENT_SURFACE_CAPABILITIES_KHR = 1000111000,
      // Provided by VK_KHR_external_fence_win32
        VK_STRUCTURE_TYPE_IMPORT_FENCE_WIN32_HANDLE_INFO_KHR = 1000114000,
      // Provided by VK_KHR_external_fence_win32
        VK_STRUCTURE_TYPE_EXPORT_FENCE_WIN32_HANDLE_INFO_KHR = 1000114001,
      // Provided by VK_KHR_external_fence_win32
        VK_STRUCTURE_TYPE_FENCE_GET_WIN32_HANDLE_INFO_KHR = 1000114002,
      // Provided by VK_KHR_external_fence_fd
        VK_STRUCTURE_TYPE_IMPORT_FENCE_FD_INFO_KHR = 1000115000,
      // Provided by VK_KHR_external_fence_fd
        VK_STRUCTURE_TYPE_FENCE_GET_FD_INFO_KHR = 1000115001,
      // Provided by VK_KHR_performance_query
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PERFORMANCE_QUERY_FEATURES_KHR = 1000116000,
      // Provided by VK_KHR_performance_query
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PERFORMANCE_QUERY_PROPERTIES_KHR = 1000116001,
      // Provided by VK_KHR_performance_query
        VK_STRUCTURE_TYPE_QUERY_POOL_PERFORMANCE_CREATE_INFO_KHR = 1000116002,
      // Provided by VK_KHR_performance_query
        VK_STRUCTURE_TYPE_PERFORMANCE_QUERY_SUBMIT_INFO_KHR = 1000116003,
      // Provided by VK_KHR_performance_query
        VK_STRUCTURE_TYPE_ACQUIRE_PROFILING_LOCK_INFO_KHR = 1000116004,
      // Provided by VK_KHR_performance_query
        VK_STRUCTURE_TYPE_PERFORMANCE_COUNTER_KHR = 1000116005,
      // Provided by VK_KHR_performance_query
        VK_STRUCTURE_TYPE_PERFORMANCE_COUNTER_DESCRIPTION_KHR = 1000116006,
      // Provided by VK_KHR_get_surface_capabilities2
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SURFACE_INFO_2_KHR = 1000119000,
      // Provided by VK_KHR_get_surface_capabilities2
        VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_KHR = 1000119001,
      // Provided by VK_KHR_get_surface_capabilities2
        VK_STRUCTURE_TYPE_SURFACE_FORMAT_2_KHR = 1000119002,
      // Provided by VK_KHR_get_display_properties2
        VK_STRUCTURE_TYPE_DISPLAY_PROPERTIES_2_KHR = 1000121000,
      // Provided by VK_KHR_get_display_properties2
        VK_STRUCTURE_TYPE_DISPLAY_PLANE_PROPERTIES_2_KHR = 1000121001,
      // Provided by VK_KHR_get_display_properties2
        VK_STRUCTURE_TYPE_DISPLAY_MODE_PROPERTIES_2_KHR = 1000121002,
      // Provided by VK_KHR_get_display_properties2
        VK_STRUCTURE_TYPE_DISPLAY_PLANE_INFO_2_KHR = 1000121003,
      // Provided by VK_KHR_get_display_properties2
        VK_STRUCTURE_TYPE_DISPLAY_PLANE_CAPABILITIES_2_KHR = 1000121004,
      // Provided by VK_MVK_ios_surface
        VK_STRUCTURE_TYPE_IOS_SURFACE_CREATE_INFO_MVK = 1000122000,
      // Provided by VK_MVK_macos_surface
        VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK = 1000123000,
      // Provided by VK_EXT_debug_utils
        VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT = 1000128000,
      // Provided by VK_EXT_debug_utils
        VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_TAG_INFO_EXT = 1000128001,
      // Provided by VK_EXT_debug_utils
        VK_STRUCTURE_TYPE_DEBUG_UTILS_LABEL_EXT = 1000128002,
      // Provided by VK_EXT_debug_utils
        VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CALLBACK_DATA_EXT = 1000128003,
      // Provided by VK_EXT_debug_utils
        VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT = 1000128004,
      // Provided by VK_ANDROID_external_memory_android_hardware_buffer
        VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_USAGE_ANDROID = 1000129000,
      // Provided by VK_ANDROID_external_memory_android_hardware_buffer
        VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_PROPERTIES_ANDROID = 1000129001,
      // Provided by VK_ANDROID_external_memory_android_hardware_buffer
        VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_FORMAT_PROPERTIES_ANDROID = 1000129002,
      // Provided by VK_ANDROID_external_memory_android_hardware_buffer
        VK_STRUCTURE_TYPE_IMPORT_ANDROID_HARDWARE_BUFFER_INFO_ANDROID = 1000129003,
      // Provided by VK_ANDROID_external_memory_android_hardware_buffer
        VK_STRUCTURE_TYPE_MEMORY_GET_ANDROID_HARDWARE_BUFFER_INFO_ANDROID = 1000129004,
      // Provided by VK_ANDROID_external_memory_android_hardware_buffer
        VK_STRUCTURE_TYPE_EXTERNAL_FORMAT_ANDROID = 1000129005,
      // Provided by VK_ANDROID_external_memory_android_hardware_buffer with VK_KHR_format_feature_flags2 or VK_VERSION_1_3
        VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_FORMAT_PROPERTIES_2_ANDROID = 1000129006,
      // Provided by VK_AMD_gpa_interface
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GPA_FEATURES_AMD = 1000133000,
      // Provided by VK_AMD_gpa_interface
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GPA_PROPERTIES_AMD = 1000133001,
      // Provided by VK_AMD_gpa_interface
        VK_STRUCTURE_TYPE_GPA_SAMPLE_BEGIN_INFO_AMD = 1000133002,
      // Provided by VK_AMD_gpa_interface
        VK_STRUCTURE_TYPE_GPA_SESSION_CREATE_INFO_AMD = 1000133003,
      // Provided by VK_AMD_gpa_interface
        VK_STRUCTURE_TYPE_GPA_DEVICE_CLOCK_MODE_INFO_AMD = 1000133004,
      // Provided by VK_AMD_gpa_interface
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GPA_PROPERTIES_2_AMD = 1000133005,
      // Provided by VK_AMD_gpa_interface
        VK_STRUCTURE_TYPE_GPA_DEVICE_GET_CLOCK_INFO_AMD = 1000133006,
    #ifdef VK_ENABLE_BETA_EXTENSIONS
      // Provided by VK_AMDX_shader_enqueue
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ENQUEUE_FEATURES_AMDX = 1000134000,
    #endif
    #ifdef VK_ENABLE_BETA_EXTENSIONS
      // Provided by VK_AMDX_shader_enqueue
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ENQUEUE_PROPERTIES_AMDX = 1000134001,
    #endif
    #ifdef VK_ENABLE_BETA_EXTENSIONS
      // Provided by VK_AMDX_shader_enqueue
        VK_STRUCTURE_TYPE_EXECUTION_GRAPH_PIPELINE_SCRATCH_SIZE_AMDX = 1000134002,
    #endif
    #ifdef VK_ENABLE_BETA_EXTENSIONS
      // Provided by VK_AMDX_shader_enqueue
        VK_STRUCTURE_TYPE_EXECUTION_GRAPH_PIPELINE_CREATE_INFO_AMDX = 1000134003,
    #endif
    #ifdef VK_ENABLE_BETA_EXTENSIONS
      // Provided by VK_AMDX_shader_enqueue
        VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_NODE_CREATE_INFO_AMDX = 1000134004,
    #endif
      // Provided by VK_EXT_descriptor_heap
        VK_STRUCTURE_TYPE_TEXEL_BUFFER_DESCRIPTOR_INFO_EXT = 1000135000,
      // Provided by VK_EXT_descriptor_heap
        VK_STRUCTURE_TYPE_IMAGE_DESCRIPTOR_INFO_EXT = 1000135001,
      // Provided by VK_EXT_descriptor_heap
        VK_STRUCTURE_TYPE_RESOURCE_DESCRIPTOR_INFO_EXT = 1000135002,
      // Provided by VK_EXT_descriptor_heap
        VK_STRUCTURE_TYPE_BIND_HEAP_INFO_EXT = 1000135003,
      // Provided by VK_EXT_descriptor_heap
        VK_STRUCTURE_TYPE_PUSH_DATA_INFO_EXT = 1000135004,
      // Provided by VK_EXT_descriptor_heap
        VK_STRUCTURE_TYPE_DESCRIPTOR_SET_AND_BINDING_MAPPING_EXT = 1000135005,
      // Provided by VK_EXT_descriptor_heap
        VK_STRUCTURE_TYPE_SHADER_DESCRIPTOR_SET_AND_BINDING_MAPPING_INFO_EXT = 1000135006,
      // Provided by VK_EXT_descriptor_heap
        VK_STRUCTURE_TYPE_OPAQUE_CAPTURE_DATA_CREATE_INFO_EXT = 1000135007,
      // Provided by VK_EXT_descriptor_heap
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_HEAP_PROPERTIES_EXT = 1000135008,
      // Provided by VK_EXT_descriptor_heap
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_HEAP_FEATURES_EXT = 1000135009,
      // Provided by VK_EXT_descriptor_heap
        VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_DESCRIPTOR_HEAP_INFO_EXT = 1000135010,
      // Provided by VK_EXT_custom_border_color with VK_EXT_descriptor_heap
        VK_STRUCTURE_TYPE_SAMPLER_CUSTOM_BORDER_COLOR_INDEX_CREATE_INFO_EXT = 1000135011,
      // Provided by VK_EXT_descriptor_heap with VK_NV_device_generated_commands
        VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_PUSH_DATA_TOKEN_NV = 1000135012,
      // Provided by VK_EXT_descriptor_heap with VK_EXT_fragment_density_map
        VK_STRUCTURE_TYPE_SUBSAMPLED_IMAGE_FORMAT_PROPERTIES_EXT = 1000135013,
      // Provided by VK_EXT_descriptor_heap with VK_ARM_tensors
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_HEAP_TENSOR_PROPERTIES_ARM = 1000135014,
      // Provided by VK_AMD_mixed_attachment_samples with VK_VERSION_1_3 or VK_KHR_dynamic_rendering
        VK_STRUCTURE_TYPE_ATTACHMENT_SAMPLE_COUNT_INFO_AMD = 1000044008,
      // Provided by VK_KHR_shader_bfloat16
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_BFLOAT16_FEATURES_KHR = 1000141000,
      // Provided by VK_EXT_sample_locations
        VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT = 1000143000,
      // Provided by VK_EXT_sample_locations
        VK_STRUCTURE_TYPE_RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT = 1000143001,
      // Provided by VK_EXT_sample_locations
        VK_STRUCTURE_TYPE_PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT = 1000143002,
      // Provided by VK_EXT_sample_locations
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT = 1000143003,
      // Provided by VK_EXT_sample_locations
        VK_STRUCTURE_TYPE_MULTISAMPLE_PROPERTIES_EXT = 1000143004,
      // Provided by VK_EXT_blend_operation_advanced
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT = 1000148000,
      // Provided by VK_EXT_blend_operation_advanced
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_PROPERTIES_EXT = 1000148001,
      // Provided by VK_EXT_blend_operation_advanced
        VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_ADVANCED_STATE_CREATE_INFO_EXT = 1000148002,
      // Provided by VK_NV_fragment_coverage_to_color
        VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_TO_COLOR_STATE_CREATE_INFO_NV = 1000149000,
      // Provided by VK_KHR_acceleration_structure
        VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_KHR = 1000150007,
      // Provided by VK_KHR_acceleration_structure
        VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_BUILD_GEOMETRY_INFO_KHR = 1000150000,
      // Provided by VK_KHR_acceleration_structure
        VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_DEVICE_ADDRESS_INFO_KHR = 1000150002,
      // Provided by VK_KHR_acceleration_structure
        VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_AABBS_DATA_KHR = 1000150003,
      // Provided by VK_KHR_acceleration_structure
        VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_INSTANCES_DATA_KHR = 1000150004,
      // Provided by VK_KHR_acceleration_structure
        VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_TRIANGLES_DATA_KHR = 1000150005,
      // Provided by VK_KHR_acceleration_structure
        VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_KHR = 1000150006,
      // Provided by VK_KHR_acceleration_structure
        VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_VERSION_INFO_KHR = 1000150009,
      // Provided by VK_KHR_acceleration_structure
        VK_STRUCTURE_TYPE_COPY_ACCELERATION_STRUCTURE_INFO_KHR = 1000150010,
      // Provided by VK_KHR_acceleration_structure
        VK_STRUCTURE_TYPE_COPY_ACCELERATION_STRUCTURE_TO_MEMORY_INFO_KHR = 1000150011,
      // Provided by VK_KHR_acceleration_structure
        VK_STRUCTURE_TYPE_COPY_MEMORY_TO_ACCELERATION_STRUCTURE_INFO_KHR = 1000150012,
      // Provided by VK_KHR_acceleration_structure
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_FEATURES_KHR = 1000150013,
      // Provided by VK_KHR_acceleration_structure
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_PROPERTIES_KHR = 1000150014,
      // Provided by VK_KHR_acceleration_structure
        VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_INFO_KHR = 1000150017,
      // Provided by VK_KHR_acceleration_structure
        VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_BUILD_SIZES_INFO_KHR = 1000150020,
      // Provided by VK_KHR_ray_tracing_pipeline
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_FEATURES_KHR = 1000347000,
      // Provided by VK_KHR_ray_tracing_pipeline
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_PROPERTIES_KHR = 1000347001,
      // Provided by VK_KHR_ray_tracing_pipeline
        VK_STRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_KHR = 1000150015,
      // Provided by VK_KHR_ray_tracing_pipeline
        VK_STRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_KHR = 1000150016,
      // Provided by VK_KHR_ray_tracing_pipeline
        VK_STRUCTURE_TYPE_RAY_TRACING_PIPELINE_INTERFACE_CREATE_INFO_KHR = 1000150018,
      // Provided by VK_KHR_ray_query
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_QUERY_FEATURES_KHR = 1000348013,
      // Provided by VK_NV_framebuffer_mixed_samples
        VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NV = 1000152000,
      // Provided by VK_NV_shader_sm_builtins
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SM_BUILTINS_FEATURES_NV = 1000154000,
      // Provided by VK_NV_shader_sm_builtins
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SM_BUILTINS_PROPERTIES_NV = 1000154001,
      // Provided by VK_EXT_image_drm_format_modifier
        VK_STRUCTURE_TYPE_DRM_FORMAT_MODIFIER_PROPERTIES_LIST_EXT = 1000158000,
      // Provided by VK_EXT_image_drm_format_modifier
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_DRM_FORMAT_MODIFIER_INFO_EXT = 1000158002,
      // Provided by VK_EXT_image_drm_format_modifier
        VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_LIST_CREATE_INFO_EXT = 1000158003,
      // Provided by VK_EXT_image_drm_format_modifier
        VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_EXPLICIT_CREATE_INFO_EXT = 1000158004,
      // Provided by VK_EXT_image_drm_format_modifier
        VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_PROPERTIES_EXT = 1000158005,
      // Provided by VK_EXT_image_drm_format_modifier with VK_KHR_format_feature_flags2 or VK_VERSION_1_3
        VK_STRUCTURE_TYPE_DRM_FORMAT_MODIFIER_PROPERTIES_LIST_2_EXT = 1000158006,
      // Provided by VK_EXT_validation_cache
        VK_STRUCTURE_TYPE_VALIDATION_CACHE_CREATE_INFO_EXT = 1000160000,
      // Provided by VK_EXT_validation_cache
        VK_STRUCTURE_TYPE_SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT = 1000160001,
    #ifdef VK_ENABLE_BETA_EXTENSIONS
      // Provided by VK_KHR_portability_subset
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PORTABILITY_SUBSET_FEATURES_KHR = 1000163000,
    #endif
    #ifdef VK_ENABLE_BETA_EXTENSIONS
      // Provided by VK_KHR_portability_subset
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PORTABILITY_SUBSET_PROPERTIES_KHR = 1000163001,
    #endif
      // Provided by VK_NV_shading_rate_image
        VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SHADING_RATE_IMAGE_STATE_CREATE_INFO_NV = 1000164000,
      // Provided by VK_NV_shading_rate_image
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADING_RATE_IMAGE_FEATURES_NV = 1000164001,
      // Provided by VK_NV_shading_rate_image
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADING_RATE_IMAGE_PROPERTIES_NV = 1000164002,
      // Provided by VK_NV_shading_rate_image
        VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_COARSE_SAMPLE_ORDER_STATE_CREATE_INFO_NV = 1000164005,
      // Provided by VK_NV_ray_tracing
        VK_STRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_NV = 1000165000,
      // Provided by VK_NV_ray_tracing
        VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_INFO_NV = 1000165001,
      // Provided by VK_NV_ray_tracing
        VK_STRUCTURE_TYPE_GEOMETRY_NV = 1000165003,
      // Provided by VK_NV_ray_tracing
        VK_STRUCTURE_TYPE_GEOMETRY_TRIANGLES_NV = 1000165004,
      // Provided by VK_NV_ray_tracing
        VK_STRUCTURE_TYPE_GEOMETRY_AABB_NV = 1000165005,
      // Provided by VK_NV_ray_tracing
        VK_STRUCTURE_TYPE_BIND_ACCELERATION_STRUCTURE_MEMORY_INFO_NV = 1000165006,
      // Provided by VK_NV_ray_tracing
        VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_NV = 1000165007,
      // Provided by VK_NV_ray_tracing
        VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_INFO_NV = 1000165008,
      // Provided by VK_NV_ray_tracing
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PROPERTIES_NV = 1000165009,
      // Provided by VK_NV_ray_tracing
        VK_STRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_NV = 1000165011,
      // Provided by VK_NV_ray_tracing
        VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_INFO_NV = 1000165012,
      // Provided by VK_NV_representative_fragment_test
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_REPRESENTATIVE_FRAGMENT_TEST_FEATURES_NV = 1000166000,
      // Provided by VK_NV_representative_fragment_test
        VK_STRUCTURE_TYPE_PIPELINE_REPRESENTATIVE_FRAGMENT_TEST_STATE_CREATE_INFO_NV = 1000166001,
      // Provided by VK_EXT_filter_cubic
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_VIEW_IMAGE_FORMAT_INFO_EXT = 1000170000,
      // Provided by VK_EXT_filter_cubic
        VK_STRUCTURE_TYPE_FILTER_CUBIC_IMAGE_VIEW_IMAGE_FORMAT_PROPERTIES_EXT = 1000170001,
      // Provided by VK_QCOM_cooperative_matrix_conversion
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_CONVERSION_FEATURES_QCOM = 1000172000,
      // Provided by VK_QCOM_elapsed_timer_query
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ELAPSED_TIMER_QUERY_FEATURES_QCOM = 1000173000,
      // Provided by VK_EXT_external_memory_host
        VK_STRUCTURE_TYPE_IMPORT_MEMORY_HOST_POINTER_INFO_EXT = 1000178000,
      // Provided by VK_EXT_external_memory_host
        VK_STRUCTURE_TYPE_MEMORY_HOST_POINTER_PROPERTIES_EXT = 1000178001,
      // Provided by VK_EXT_external_memory_host
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_HOST_PROPERTIES_EXT = 1000178002,
      // Provided by VK_KHR_shader_clock
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CLOCK_FEATURES_KHR = 1000181000,
      // Provided by VK_AMD_pipeline_compiler_control
        VK_STRUCTURE_TYPE_PIPELINE_COMPILER_CONTROL_CREATE_INFO_AMD = 1000183000,
      // Provided by VK_AMD_shader_core_properties
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_AMD = 1000185000,
      // Provided by VK_KHR_video_decode_h265
        VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_CAPABILITIES_KHR = 1000187000,
      // Provided by VK_KHR_video_decode_h265
        VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_SESSION_PARAMETERS_CREATE_INFO_KHR = 1000187001,
      // Provided by VK_KHR_video_decode_h265
        VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_SESSION_PARAMETERS_ADD_INFO_KHR = 1000187002,
      // Provided by VK_KHR_video_decode_h265
        VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_PROFILE_INFO_KHR = 1000187003,
      // Provided by VK_KHR_video_decode_h265
        VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_PICTURE_INFO_KHR = 1000187004,
      // Provided by VK_KHR_video_decode_h265
        VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_DPB_SLOT_INFO_KHR = 1000187005,
      // Provided by VK_AMD_memory_overallocation_behavior
        VK_STRUCTURE_TYPE_DEVICE_MEMORY_OVERALLOCATION_CREATE_INFO_AMD = 1000189000,
      // Provided by VK_EXT_vertex_attribute_divisor
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT = 1000190000,
      // Provided by VK_GGP_frame_token
        VK_STRUCTURE_TYPE_PRESENT_FRAME_TOKEN_GGP = 1000191000,
      // Provided by VK_NV_mesh_shader
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_NV = 1000202000,
      // Provided by VK_NV_mesh_shader
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_NV = 1000202001,
      // Provided by VK_NV_shader_image_footprint
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_IMAGE_FOOTPRINT_FEATURES_NV = 1000204000,
      // Provided by VK_NV_scissor_exclusive
        VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_EXCLUSIVE_SCISSOR_STATE_CREATE_INFO_NV = 1000205000,
      // Provided by VK_NV_scissor_exclusive
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXCLUSIVE_SCISSOR_FEATURES_NV = 1000205002,
      // Provided by VK_NV_device_diagnostic_checkpoints
        VK_STRUCTURE_TYPE_CHECKPOINT_DATA_NV = 1000206000,
      // Provided by VK_NV_device_diagnostic_checkpoints
        VK_STRUCTURE_TYPE_QUEUE_FAMILY_CHECKPOINT_PROPERTIES_NV = 1000206001,
      // Provided by VK_NV_device_diagnostic_checkpoints with VK_VERSION_1_3 or VK_KHR_synchronization2
        VK_STRUCTURE_TYPE_QUEUE_FAMILY_CHECKPOINT_PROPERTIES_2_NV = 1000314008,
      // Provided by VK_NV_device_diagnostic_checkpoints with VK_VERSION_1_3 or VK_KHR_synchronization2
        VK_STRUCTURE_TYPE_CHECKPOINT_DATA_2_NV = 1000314009,
      // Provided by VK_EXT_present_timing
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_TIMING_FEATURES_EXT = 1000208000,
      // Provided by VK_EXT_present_timing
        VK_STRUCTURE_TYPE_SWAPCHAIN_TIMING_PROPERTIES_EXT = 1000208001,
      // Provided by VK_EXT_present_timing
        VK_STRUCTURE_TYPE_SWAPCHAIN_TIME_DOMAIN_PROPERTIES_EXT = 1000208002,
      // Provided by VK_EXT_present_timing
        VK_STRUCTURE_TYPE_PRESENT_TIMINGS_INFO_EXT = 1000208003,
      // Provided by VK_EXT_present_timing
        VK_STRUCTURE_TYPE_PRESENT_TIMING_INFO_EXT = 1000208004,
      // Provided by VK_EXT_present_timing
        VK_STRUCTURE_TYPE_PAST_PRESENTATION_TIMING_INFO_EXT = 1000208005,
      // Provided by VK_EXT_present_timing
        VK_STRUCTURE_TYPE_PAST_PRESENTATION_TIMING_PROPERTIES_EXT = 1000208006,
      // Provided by VK_EXT_present_timing
        VK_STRUCTURE_TYPE_PAST_PRESENTATION_TIMING_EXT = 1000208007,
      // Provided by VK_EXT_present_timing
        VK_STRUCTURE_TYPE_PRESENT_TIMING_SURFACE_CAPABILITIES_EXT = 1000208008,
      // Provided by VK_EXT_present_timing
        VK_STRUCTURE_TYPE_SWAPCHAIN_CALIBRATED_TIMESTAMP_INFO_EXT = 1000208009,
      // Provided by VK_INTEL_shader_integer_functions2
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_FUNCTIONS_2_FEATURES_INTEL = 1000209000,
      // Provided by VK_INTEL_performance_query
        VK_STRUCTURE_TYPE_QUERY_POOL_PERFORMANCE_QUERY_CREATE_INFO_INTEL = 1000210000,
      // Provided by VK_INTEL_performance_query
        VK_STRUCTURE_TYPE_INITIALIZE_PERFORMANCE_API_INFO_INTEL = 1000210001,
      // Provided by VK_INTEL_performance_query
        VK_STRUCTURE_TYPE_PERFORMANCE_MARKER_INFO_INTEL = 1000210002,
      // Provided by VK_INTEL_performance_query
        VK_STRUCTURE_TYPE_PERFORMANCE_STREAM_MARKER_INFO_INTEL = 1000210003,
      // Provided by VK_INTEL_performance_query
        VK_STRUCTURE_TYPE_PERFORMANCE_OVERRIDE_INFO_INTEL = 1000210004,
      // Provided by VK_INTEL_performance_query
        VK_STRUCTURE_TYPE_PERFORMANCE_CONFIGURATION_ACQUIRE_INFO_INTEL = 1000210005,
      // Provided by VK_EXT_pci_bus_info
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PCI_BUS_INFO_PROPERTIES_EXT = 1000212000,
      // Provided by VK_AMD_display_native_hdr
        VK_STRUCTURE_TYPE_DISPLAY_NATIVE_HDR_SURFACE_CAPABILITIES_AMD = 1000213000,
      // Provided by VK_AMD_display_native_hdr
        VK_STRUCTURE_TYPE_SWAPCHAIN_DISPLAY_NATIVE_HDR_CREATE_INFO_AMD = 1000213001,
      // Provided by VK_FUCHSIA_imagepipe_surface
        VK_STRUCTURE_TYPE_IMAGEPIPE_SURFACE_CREATE_INFO_FUCHSIA = 1000214000,
      // Provided by VK_EXT_metal_surface
        VK_STRUCTURE_TYPE_METAL_SURFACE_CREATE_INFO_EXT = 1000217000,
      // Provided by VK_EXT_fragment_density_map
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_FEATURES_EXT = 1000218000,
      // Provided by VK_EXT_fragment_density_map
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_PROPERTIES_EXT = 1000218001,
      // Provided by VK_EXT_fragment_density_map
        VK_STRUCTURE_TYPE_RENDER_PASS_FRAGMENT_DENSITY_MAP_CREATE_INFO_EXT = 1000218002,
      // Provided by VK_EXT_fragment_density_map with VK_VERSION_1_3 or VK_KHR_dynamic_rendering
        VK_STRUCTURE_TYPE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_INFO_EXT = 1000044007,
      // Provided by VK_KHR_fragment_shading_rate
        VK_STRUCTURE_TYPE_FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR = 1000226000,
      // Provided by VK_KHR_fragment_shading_rate
        VK_STRUCTURE_TYPE_PIPELINE_FRAGMENT_SHADING_RATE_STATE_CREATE_INFO_KHR = 1000226001,
      // Provided by VK_KHR_fragment_shading_rate
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_PROPERTIES_KHR = 1000226002,
      // Provided by VK_KHR_fragment_shading_rate
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_FEATURES_KHR = 1000226003,
      // Provided by VK_KHR_fragment_shading_rate
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_KHR = 1000226004,
      // Provided by VK_KHR_fragment_shading_rate with VK_VERSION_1_3 or VK_KHR_dynamic_rendering
        VK_STRUCTURE_TYPE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR = 1000044006,
      // Provided by VK_AMD_shader_core_properties2
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_2_AMD = 1000227000,
      // Provided by VK_AMD_device_coherent_memory
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COHERENT_MEMORY_FEATURES_AMD = 1000229000,
      // Provided by VK_KHR_shader_constant_data
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CONSTANT_DATA_FEATURES_KHR = 1000231000,
      // Provided by VK_KHR_shader_abort
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ABORT_FEATURES_KHR = 1000233000,
      // Provided by VK_KHR_shader_abort
        VK_STRUCTURE_TYPE_DEVICE_FAULT_SHADER_ABORT_MESSAGE_INFO_KHR = 1000233001,
      // Provided by VK_KHR_shader_abort
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ABORT_PROPERTIES_KHR = 1000233002,
      // Provided by VK_EXT_shader_image_atomic_int64
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_IMAGE_ATOMIC_INT64_FEATURES_EXT = 1000234000,
      // Provided by VK_KHR_shader_quad_control
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_QUAD_CONTROL_FEATURES_KHR = 1000235000,
      // Provided by VK_EXT_memory_budget
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_BUDGET_PROPERTIES_EXT = 1000237000,
      // Provided by VK_EXT_memory_priority
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PRIORITY_FEATURES_EXT = 1000238000,
      // Provided by VK_EXT_memory_priority
        VK_STRUCTURE_TYPE_MEMORY_PRIORITY_ALLOCATE_INFO_EXT = 1000238001,
      // Provided by VK_KHR_surface_protected_capabilities
        VK_STRUCTURE_TYPE_SURFACE_PROTECTED_CAPABILITIES_KHR = 1000239000,
      // Provided by VK_NV_dedicated_allocation_image_aliasing
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEDICATED_ALLOCATION_IMAGE_ALIASING_FEATURES_NV = 1000240000,
      // Provided by VK_EXT_buffer_device_address
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT = 1000244000,
      // Provided by VK_EXT_buffer_device_address
        VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_CREATE_INFO_EXT = 1000244002,
      // Provided by VK_EXT_validation_features
        VK_STRUCTURE_TYPE_VALIDATION_FEATURES_EXT = 1000247000,
      // Provided by VK_KHR_present_wait
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_WAIT_FEATURES_KHR = 1000248000,
      // Provided by VK_NV_cooperative_matrix
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_NV = 1000249000,
      // Provided by VK_NV_cooperative_matrix
        VK_STRUCTURE_TYPE_COOPERATIVE_MATRIX_PROPERTIES_NV = 1000249001,
      // Provided by VK_NV_cooperative_matrix
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_PROPERTIES_NV = 1000249002,
      // Provided by VK_NV_coverage_reduction_mode
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COVERAGE_REDUCTION_MODE_FEATURES_NV = 1000250000,
      // Provided by VK_NV_coverage_reduction_mode
        VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_REDUCTION_STATE_CREATE_INFO_NV = 1000250001,
      // Provided by VK_NV_coverage_reduction_mode
        VK_STRUCTURE_TYPE_FRAMEBUFFER_MIXED_SAMPLES_COMBINATION_NV = 1000250002,
      // Provided by VK_EXT_fragment_shader_interlock
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_INTERLOCK_FEATURES_EXT = 1000251000,
      // Provided by VK_EXT_ycbcr_image_arrays
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_IMAGE_ARRAYS_FEATURES_EXT = 1000252000,
      // Provided by VK_EXT_provoking_vertex
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROVOKING_VERTEX_FEATURES_EXT = 1000254000,
      // Provided by VK_EXT_provoking_vertex
        VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_PROVOKING_VERTEX_STATE_CREATE_INFO_EXT = 1000254001,
      // Provided by VK_EXT_provoking_vertex
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROVOKING_VERTEX_PROPERTIES_EXT = 1000254002,
      // Provided by VK_EXT_full_screen_exclusive
        VK_STRUCTURE_TYPE_SURFACE_FULL_SCREEN_EXCLUSIVE_INFO_EXT = 1000255000,
      // Provided by VK_EXT_full_screen_exclusive
        VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_FULL_SCREEN_EXCLUSIVE_EXT = 1000255002,
      // Provided by VK_KHR_win32_surface with VK_EXT_full_screen_exclusive
        VK_STRUCTURE_TYPE_SURFACE_FULL_SCREEN_EXCLUSIVE_WIN32_INFO_EXT = 1000255001,
      // Provided by VK_EXT_headless_surface
        VK_STRUCTURE_TYPE_HEADLESS_SURFACE_CREATE_INFO_EXT = 1000256000,
      // Provided by VK_EXT_shader_atomic_float
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_FEATURES_EXT = 1000260000,
      // Provided by VK_EXT_extended_dynamic_state
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_FEATURES_EXT = 1000267000,
      // Provided by VK_KHR_pipeline_executable_properties
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_EXECUTABLE_PROPERTIES_FEATURES_KHR = 1000269000,
      // Provided by VK_KHR_pipeline_executable_properties
        VK_STRUCTURE_TYPE_PIPELINE_INFO_KHR = 1000269001,
      // Provided by VK_KHR_pipeline_executable_properties
        VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_PROPERTIES_KHR = 1000269002,
      // Provided by VK_KHR_pipeline_executable_properties
        VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_INFO_KHR = 1000269003,
      // Provided by VK_KHR_pipeline_executable_properties
        VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_STATISTIC_KHR = 1000269004,
      // Provided by VK_KHR_pipeline_executable_properties
        VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_INTERNAL_REPRESENTATION_KHR = 1000269005,
      // Provided by VK_EXT_map_memory_placed
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAP_MEMORY_PLACED_FEATURES_EXT = 1000272000,
      // Provided by VK_EXT_map_memory_placed
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAP_MEMORY_PLACED_PROPERTIES_EXT = 1000272001,
      // Provided by VK_EXT_map_memory_placed
        VK_STRUCTURE_TYPE_MEMORY_MAP_PLACED_INFO_EXT = 1000272002,
      // Provided by VK_EXT_shader_atomic_float2
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_2_FEATURES_EXT = 1000273000,
      // Provided by VK_NV_device_generated_commands
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_PROPERTIES_NV = 1000277000,
      // Provided by VK_NV_device_generated_commands
        VK_STRUCTURE_TYPE_GRAPHICS_SHADER_GROUP_CREATE_INFO_NV = 1000277001,
      // Provided by VK_NV_device_generated_commands
        VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_SHADER_GROUPS_CREATE_INFO_NV = 1000277002,
      // Provided by VK_NV_device_generated_commands
        VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_TOKEN_NV = 1000277003,
      // Provided by VK_NV_device_generated_commands
        VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NV = 1000277004,
      // Provided by VK_NV_device_generated_commands
        VK_STRUCTURE_TYPE_GENERATED_COMMANDS_INFO_NV = 1000277005,
      // Provided by VK_NV_device_generated_commands
        VK_STRUCTURE_TYPE_GENERATED_COMMANDS_MEMORY_REQUIREMENTS_INFO_NV = 1000277006,
      // Provided by VK_NV_device_generated_commands
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_FEATURES_NV = 1000277007,
      // Provided by VK_NV_inherited_viewport_scissor
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INHERITED_VIEWPORT_SCISSOR_FEATURES_NV = 1000278000,
      // Provided by VK_NV_inherited_viewport_scissor
        VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_VIEWPORT_SCISSOR_INFO_NV = 1000278001,
      // Provided by VK_EXT_texel_buffer_alignment
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_FEATURES_EXT = 1000281000,
      // Provided by VK_QCOM_render_pass_transform
        VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_RENDER_PASS_TRANSFORM_INFO_QCOM = 1000282000,
      // Provided by VK_QCOM_render_pass_transform
        VK_STRUCTURE_TYPE_RENDER_PASS_TRANSFORM_BEGIN_INFO_QCOM = 1000282001,
      // Provided by VK_EXT_depth_bias_control
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_BIAS_CONTROL_FEATURES_EXT = 1000283000,
      // Provided by VK_EXT_depth_bias_control
        VK_STRUCTURE_TYPE_DEPTH_BIAS_INFO_EXT = 1000283001,
      // Provided by VK_EXT_depth_bias_control
        VK_STRUCTURE_TYPE_DEPTH_BIAS_REPRESENTATION_INFO_EXT = 1000283002,
      // Provided by VK_EXT_device_memory_report
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_MEMORY_REPORT_FEATURES_EXT = 1000284000,
      // Provided by VK_EXT_device_memory_report
        VK_STRUCTURE_TYPE_DEVICE_DEVICE_MEMORY_REPORT_CREATE_INFO_EXT = 1000284001,
      // Provided by VK_EXT_device_memory_report
        VK_STRUCTURE_TYPE_DEVICE_MEMORY_REPORT_CALLBACK_DATA_EXT = 1000284002,
      // Provided by VK_EXT_custom_border_color
        VK_STRUCTURE_TYPE_SAMPLER_CUSTOM_BORDER_COLOR_CREATE_INFO_EXT = 1000287000,
      // Provided by VK_EXT_custom_border_color
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_PROPERTIES_EXT = 1000287001,
      // Provided by VK_EXT_custom_border_color
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_FEATURES_EXT = 1000287002,
      // Provided by VK_EXT_texture_compression_astc_3d
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_3D_FEATURES_EXT = 1000288000,
      // Provided by VK_KHR_pipeline_library
        VK_STRUCTURE_TYPE_PIPELINE_LIBRARY_CREATE_INFO_KHR = 1000290000,
      // Provided by VK_NV_present_barrier
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_BARRIER_FEATURES_NV = 1000292000,
      // Provided by VK_NV_present_barrier
        VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_PRESENT_BARRIER_NV = 1000292001,
      // Provided by VK_NV_present_barrier
        VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_BARRIER_CREATE_INFO_NV = 1000292002,
      // Provided by VK_KHR_present_id
        VK_STRUCTURE_TYPE_PRESENT_ID_KHR = 1000294000,
      // Provided by VK_KHR_present_id
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_ID_FEATURES_KHR = 1000294001,
      // Provided by VK_KHR_video_encode_queue
        VK_STRUCTURE_TYPE_VIDEO_ENCODE_INFO_KHR = 1000299000,
      // Provided by VK_KHR_video_encode_queue
        VK_STRUCTURE_TYPE_VIDEO_ENCODE_RATE_CONTROL_INFO_KHR = 1000299001,
      // Provided by VK_KHR_video_encode_queue
        VK_STRUCTURE_TYPE_VIDEO_ENCODE_RATE_CONTROL_LAYER_INFO_KHR = 1000299002,
      // Provided by VK_KHR_video_encode_queue
        VK_STRUCTURE_TYPE_VIDEO_ENCODE_CAPABILITIES_KHR = 1000299003,
      // Provided by VK_KHR_video_encode_queue
        VK_STRUCTURE_TYPE_VIDEO_ENCODE_USAGE_INFO_KHR = 1000299004,
      // Provided by VK_KHR_video_encode_queue
        VK_STRUCTURE_TYPE_QUERY_POOL_VIDEO_ENCODE_FEEDBACK_CREATE_INFO_KHR = 1000299005,
      // Provided by VK_KHR_video_encode_queue
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_ENCODE_QUALITY_LEVEL_INFO_KHR = 1000299006,
      // Provided by VK_KHR_video_encode_queue
        VK_STRUCTURE_TYPE_VIDEO_ENCODE_QUALITY_LEVEL_PROPERTIES_KHR = 1000299007,
      // Provided by VK_KHR_video_encode_queue
        VK_STRUCTURE_TYPE_VIDEO_ENCODE_QUALITY_LEVEL_INFO_KHR = 1000299008,
      // Provided by VK_KHR_video_encode_queue
        VK_STRUCTURE_TYPE_VIDEO_ENCODE_SESSION_PARAMETERS_GET_INFO_KHR = 1000299009,
      // Provided by VK_KHR_video_encode_queue
        VK_STRUCTURE_TYPE_VIDEO_ENCODE_SESSION_PARAMETERS_FEEDBACK_INFO_KHR = 1000299010,
      // Provided by VK_NV_device_diagnostics_config
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DIAGNOSTICS_CONFIG_FEATURES_NV = 1000300000,
      // Provided by VK_NV_device_diagnostics_config
        VK_STRUCTURE_TYPE_DEVICE_DIAGNOSTICS_CONFIG_CREATE_INFO_NV = 1000300001,
      // Provided by VK_QCOM_queue_perf_hint
        VK_STRUCTURE_TYPE_PERF_HINT_INFO_QCOM = 1000302000,
      // Provided by VK_QCOM_queue_perf_hint
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_QUEUE_PERF_HINT_FEATURES_QCOM = 1000302001,
      // Provided by VK_QCOM_queue_perf_hint
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_QUEUE_PERF_HINT_PROPERTIES_QCOM = 1000302002,
      // Provided by VK_QCOM_image_processing3
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_PROCESSING_3_FEATURES_QCOM = 1000303000,
      // Provided by VK_QCOM_shader_multiple_wait_queues
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_MULTIPLE_WAIT_QUEUES_FEATURES_QCOM = 1000304000,
      // Provided by VK_QCOM_shader_multiple_wait_queues
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_MULTIPLE_WAIT_QUEUES_PROPERTIES_QCOM = 1000304001,
      // Provided by VK_EXT_shader_split_barrier
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SPLIT_BARRIER_FEATURES_EXT = 1000305000,
      // Provided by VK_EXT_shader_split_barrier
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SPLIT_BARRIER_PROPERTIES_EXT = 1000305001,
    #ifdef VK_ENABLE_BETA_EXTENSIONS
      // Provided by VK_NV_cuda_kernel_launch
        VK_STRUCTURE_TYPE_CUDA_MODULE_CREATE_INFO_NV = 1000307000,
    #endif
    #ifdef VK_ENABLE_BETA_EXTENSIONS
      // Provided by VK_NV_cuda_kernel_launch
        VK_STRUCTURE_TYPE_CUDA_FUNCTION_CREATE_INFO_NV = 1000307001,
    #endif
    #ifdef VK_ENABLE_BETA_EXTENSIONS
      // Provided by VK_NV_cuda_kernel_launch
        VK_STRUCTURE_TYPE_CUDA_LAUNCH_INFO_NV = 1000307002,
    #endif
    #ifdef VK_ENABLE_BETA_EXTENSIONS
      // Provided by VK_NV_cuda_kernel_launch
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUDA_KERNEL_LAUNCH_FEATURES_NV = 1000307003,
    #endif
    #ifdef VK_ENABLE_BETA_EXTENSIONS
      // Provided by VK_NV_cuda_kernel_launch
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUDA_KERNEL_LAUNCH_PROPERTIES_NV = 1000307004,
    #endif
      // Provided by VK_QCOM_tile_shading
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TILE_SHADING_FEATURES_QCOM = 1000309000,
      // Provided by VK_QCOM_tile_shading
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TILE_SHADING_PROPERTIES_QCOM = 1000309001,
      // Provided by VK_QCOM_tile_shading
        VK_STRUCTURE_TYPE_RENDER_PASS_TILE_SHADING_CREATE_INFO_QCOM = 1000309002,
      // Provided by VK_QCOM_tile_shading
        VK_STRUCTURE_TYPE_PER_TILE_BEGIN_INFO_QCOM = 1000309003,
      // Provided by VK_QCOM_tile_shading
        VK_STRUCTURE_TYPE_PER_TILE_END_INFO_QCOM = 1000309004,
      // Provided by VK_QCOM_tile_shading
        VK_STRUCTURE_TYPE_DISPATCH_TILE_INFO_QCOM = 1000309005,
      // Provided by VK_NV_low_latency
        VK_STRUCTURE_TYPE_QUERY_LOW_LATENCY_SUPPORT_NV = 1000310000,
      // Provided by VK_EXT_metal_objects
        VK_STRUCTURE_TYPE_EXPORT_METAL_OBJECT_CREATE_INFO_EXT = 1000311000,
      // Provided by VK_EXT_metal_objects
        VK_STRUCTURE_TYPE_EXPORT_METAL_OBJECTS_INFO_EXT = 1000311001,
      // Provided by VK_EXT_metal_objects
        VK_STRUCTURE_TYPE_EXPORT_METAL_DEVICE_INFO_EXT = 1000311002,
      // Provided by VK_EXT_metal_objects
        VK_STRUCTURE_TYPE_EXPORT_METAL_COMMAND_QUEUE_INFO_EXT = 1000311003,
      // Provided by VK_EXT_metal_objects
        VK_STRUCTURE_TYPE_EXPORT_METAL_BUFFER_INFO_EXT = 1000311004,
      // Provided by VK_EXT_metal_objects
        VK_STRUCTURE_TYPE_IMPORT_METAL_BUFFER_INFO_EXT = 1000311005,
      // Provided by VK_EXT_metal_objects
        VK_STRUCTURE_TYPE_EXPORT_METAL_TEXTURE_INFO_EXT = 1000311006,
      // Provided by VK_EXT_metal_objects
        VK_STRUCTURE_TYPE_IMPORT_METAL_TEXTURE_INFO_EXT = 1000311007,
      // Provided by VK_EXT_metal_objects
        VK_STRUCTURE_TYPE_EXPORT_METAL_IO_SURFACE_INFO_EXT = 1000311008,
      // Provided by VK_EXT_metal_objects
        VK_STRUCTURE_TYPE_IMPORT_METAL_IO_SURFACE_INFO_EXT = 1000311009,
      // Provided by VK_EXT_metal_objects
        VK_STRUCTURE_TYPE_EXPORT_METAL_SHARED_EVENT_INFO_EXT = 1000311010,
      // Provided by VK_EXT_metal_objects
        VK_STRUCTURE_TYPE_IMPORT_METAL_SHARED_EVENT_INFO_EXT = 1000311011,
      // Provided by VK_EXT_descriptor_buffer
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_PROPERTIES_EXT = 1000316000,
      // Provided by VK_EXT_descriptor_buffer
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_DENSITY_MAP_PROPERTIES_EXT = 1000316001,
      // Provided by VK_EXT_descriptor_buffer
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_FEATURES_EXT = 1000316002,
      // Provided by VK_EXT_descriptor_buffer
        VK_STRUCTURE_TYPE_DESCRIPTOR_ADDRESS_INFO_EXT = 1000316003,
      // Provided by VK_EXT_descriptor_buffer
        VK_STRUCTURE_TYPE_DESCRIPTOR_GET_INFO_EXT = 1000316004,
      // Provided by VK_EXT_descriptor_buffer
        VK_STRUCTURE_TYPE_BUFFER_CAPTURE_DESCRIPTOR_DATA_INFO_EXT = 1000316005,
      // Provided by VK_EXT_descriptor_buffer
        VK_STRUCTURE_TYPE_IMAGE_CAPTURE_DESCRIPTOR_DATA_INFO_EXT = 1000316006,
      // Provided by VK_EXT_descriptor_buffer
        VK_STRUCTURE_TYPE_IMAGE_VIEW_CAPTURE_DESCRIPTOR_DATA_INFO_EXT = 1000316007,
      // Provided by VK_EXT_descriptor_buffer
        VK_STRUCTURE_TYPE_SAMPLER_CAPTURE_DESCRIPTOR_DATA_INFO_EXT = 1000316008,
      // Provided by VK_EXT_descriptor_buffer
        VK_STRUCTURE_TYPE_OPAQUE_CAPTURE_DESCRIPTOR_DATA_CREATE_INFO_EXT = 1000316010,
      // Provided by VK_EXT_descriptor_buffer
        VK_STRUCTURE_TYPE_DESCRIPTOR_BUFFER_BINDING_INFO_EXT = 1000316011,
      // Provided by VK_EXT_descriptor_buffer
        VK_STRUCTURE_TYPE_DESCRIPTOR_BUFFER_BINDING_PUSH_DESCRIPTOR_BUFFER_HANDLE_EXT = 1000316012,
      // Provided by VK_EXT_descriptor_buffer with VK_KHR_acceleration_structure or VK_NV_ray_tracing
        VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CAPTURE_DESCRIPTOR_DATA_INFO_EXT = 1000316009,
      // Provided by VK_KHR_device_address_commands
        VK_STRUCTURE_TYPE_DEVICE_MEMORY_COPY_KHR = 1000318000,
      // Provided by VK_KHR_device_address_commands
        VK_STRUCTURE_TYPE_COPY_DEVICE_MEMORY_INFO_KHR = 1000318001,
      // Provided by VK_KHR_device_address_commands
        VK_STRUCTURE_TYPE_DEVICE_MEMORY_IMAGE_COPY_KHR = 1000318002,
      // Provided by VK_KHR_device_address_commands
        VK_STRUCTURE_TYPE_COPY_DEVICE_MEMORY_IMAGE_INFO_KHR = 1000318003,
      // Provided by VK_KHR_device_address_commands
        VK_STRUCTURE_TYPE_MEMORY_RANGE_BARRIERS_INFO_KHR = 1000318004,
      // Provided by VK_KHR_device_address_commands
        VK_STRUCTURE_TYPE_MEMORY_RANGE_BARRIER_KHR = 1000318005,
      // Provided by VK_KHR_device_address_commands
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_ADDRESS_COMMANDS_FEATURES_KHR = 1000318006,
      // Provided by VK_KHR_device_address_commands
        VK_STRUCTURE_TYPE_BIND_INDEX_BUFFER_3_INFO_KHR = 1000318007,
      // Provided by VK_KHR_device_address_commands
        VK_STRUCTURE_TYPE_BIND_VERTEX_BUFFER_3_INFO_KHR = 1000318008,
      // Provided by VK_KHR_device_address_commands
        VK_STRUCTURE_TYPE_DRAW_INDIRECT_2_INFO_KHR = 1000318009,
      // Provided by VK_KHR_device_address_commands
        VK_STRUCTURE_TYPE_DRAW_INDIRECT_COUNT_2_INFO_KHR = 1000318010,
      // Provided by VK_KHR_device_address_commands
        VK_STRUCTURE_TYPE_DISPATCH_INDIRECT_2_INFO_KHR = 1000318011,
      // Provided by VK_KHR_device_address_commands with VK_EXT_conditional_rendering
        VK_STRUCTURE_TYPE_CONDITIONAL_RENDERING_BEGIN_INFO_2_EXT = 1000318012,
      // Provided by VK_KHR_device_address_commands with VK_EXT_transform_feedback
        VK_STRUCTURE_TYPE_BIND_TRANSFORM_FEEDBACK_BUFFER_2_INFO_EXT = 1000318013,
      // Provided by VK_KHR_device_address_commands with VK_AMD_buffer_marker
        VK_STRUCTURE_TYPE_MEMORY_MARKER_INFO_AMD = 1000318014,
      // Provided by VK_KHR_acceleration_structure with VK_KHR_device_address_commands
        VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_INFO_2_KHR = 1000318015,
      // Provided by VK_EXT_graphics_pipeline_library
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_FEATURES_EXT = 1000320000,
      // Provided by VK_EXT_graphics_pipeline_library
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_PROPERTIES_EXT = 1000320001,
      // Provided by VK_EXT_graphics_pipeline_library
        VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_LIBRARY_CREATE_INFO_EXT = 1000320002,
      // Provided by VK_AMD_shader_early_and_late_fragment_tests
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_EARLY_AND_LATE_FRAGMENT_TESTS_FEATURES_AMD = 1000321000,
      // Provided by VK_KHR_fragment_shader_barycentric
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_KHR = 1000203000,
      // Provided by VK_KHR_fragment_shader_barycentric with VK_EXT_provoking_vertex
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_PROPERTIES_KHR = 1000322000,
      // Provided by VK_KHR_shader_subgroup_uniform_control_flow
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_UNIFORM_CONTROL_FLOW_FEATURES_KHR = 1000323000,
      // Provided by VK_NV_fragment_shading_rate_enums
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_ENUMS_PROPERTIES_NV = 1000326000,
      // Provided by VK_NV_fragment_shading_rate_enums
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_ENUMS_FEATURES_NV = 1000326001,
      // Provided by VK_NV_fragment_shading_rate_enums
        VK_STRUCTURE_TYPE_PIPELINE_FRAGMENT_SHADING_RATE_ENUM_STATE_CREATE_INFO_NV = 1000326002,
      // Provided by VK_NV_ray_tracing_motion_blur
        VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_MOTION_TRIANGLES_DATA_NV = 1000327000,
      // Provided by VK_NV_ray_tracing_motion_blur
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_MOTION_BLUR_FEATURES_NV = 1000327001,
      // Provided by VK_NV_ray_tracing_motion_blur
        VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_MOTION_INFO_NV = 1000327002,
      // Provided by VK_EXT_mesh_shader
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_EXT = 1000328000,
      // Provided by VK_EXT_mesh_shader
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_EXT = 1000328001,
      // Provided by VK_EXT_ycbcr_2plane_444_formats
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_2_PLANE_444_FORMATS_FEATURES_EXT = 1000330000,
      // Provided by VK_EXT_fragment_density_map2
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_2_FEATURES_EXT = 1000332000,
      // Provided by VK_EXT_fragment_density_map2
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_2_PROPERTIES_EXT = 1000332001,
      // Provided by VK_QCOM_rotated_copy_commands
        VK_STRUCTURE_TYPE_COPY_COMMAND_TRANSFORM_INFO_QCOM = 1000333000,
      // Provided by VK_KHR_workgroup_memory_explicit_layout
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_WORKGROUP_MEMORY_EXPLICIT_LAYOUT_FEATURES_KHR = 1000336000,
      // Provided by VK_EXT_image_compression_control
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_COMPRESSION_CONTROL_FEATURES_EXT = 1000338000,
      // Provided by VK_EXT_image_compression_control
        VK_STRUCTURE_TYPE_IMAGE_COMPRESSION_CONTROL_EXT = 1000338001,
      // Provided by VK_EXT_image_compression_control
        VK_STRUCTURE_TYPE_IMAGE_COMPRESSION_PROPERTIES_EXT = 1000338004,
      // Provided by VK_EXT_attachment_feedback_loop_layout
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ATTACHMENT_FEEDBACK_LOOP_LAYOUT_FEATURES_EXT = 1000339000,
      // Provided by VK_EXT_4444_formats
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_4444_FORMATS_FEATURES_EXT = 1000340000,
      // Provided by VK_EXT_device_fault
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FAULT_FEATURES_EXT = 1000341000,
      // Provided by VK_EXT_device_fault
        VK_STRUCTURE_TYPE_DEVICE_FAULT_COUNTS_EXT = 1000341001,
      // Provided by VK_EXT_device_fault
        VK_STRUCTURE_TYPE_DEVICE_FAULT_INFO_EXT = 1000341002,
      // Provided by VK_EXT_rgba10x6_formats
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RGBA10X6_FORMATS_FEATURES_EXT = 1000344000,
      // Provided by VK_EXT_directfb_surface
        VK_STRUCTURE_TYPE_DIRECTFB_SURFACE_CREATE_INFO_EXT = 1000346000,
      // Provided by VK_EXT_vertex_input_dynamic_state
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_INPUT_DYNAMIC_STATE_FEATURES_EXT = 1000352000,
      // Provided by VK_EXT_shader_object, VK_EXT_vertex_input_dynamic_state
        VK_STRUCTURE_TYPE_VERTEX_INPUT_BINDING_DESCRIPTION_2_EXT = 1000352001,
      // Provided by VK_EXT_shader_object, VK_EXT_vertex_input_dynamic_state
        VK_STRUCTURE_TYPE_VERTEX_INPUT_ATTRIBUTE_DESCRIPTION_2_EXT = 1000352002,
      // Provided by VK_EXT_physical_device_drm
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRM_PROPERTIES_EXT = 1000353000,
      // Provided by VK_EXT_device_address_binding_report
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ADDRESS_BINDING_REPORT_FEATURES_EXT = 1000354000,
      // Provided by VK_EXT_device_address_binding_report
        VK_STRUCTURE_TYPE_DEVICE_ADDRESS_BINDING_CALLBACK_DATA_EXT = 1000354001,
      // Provided by VK_EXT_depth_clip_control
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_CONTROL_FEATURES_EXT = 1000355000,
      // Provided by VK_EXT_depth_clip_control
        VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_DEPTH_CLIP_CONTROL_CREATE_INFO_EXT = 1000355001,
      // Provided by VK_EXT_primitive_topology_list_restart
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIMITIVE_TOPOLOGY_LIST_RESTART_FEATURES_EXT = 1000356000,
      // Provided by VK_FUCHSIA_external_memory
        VK_STRUCTURE_TYPE_IMPORT_MEMORY_ZIRCON_HANDLE_INFO_FUCHSIA = 1000364000,
      // Provided by VK_FUCHSIA_external_memory
        VK_STRUCTURE_TYPE_MEMORY_ZIRCON_HANDLE_PROPERTIES_FUCHSIA = 1000364001,
      // Provided by VK_FUCHSIA_external_memory
        VK_STRUCTURE_TYPE_MEMORY_GET_ZIRCON_HANDLE_INFO_FUCHSIA = 1000364002,
      // Provided by VK_FUCHSIA_external_semaphore
        VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_ZIRCON_HANDLE_INFO_FUCHSIA = 1000365000,
      // Provided by VK_FUCHSIA_external_semaphore
        VK_STRUCTURE_TYPE_SEMAPHORE_GET_ZIRCON_HANDLE_INFO_FUCHSIA = 1000365001,
      // Provided by VK_FUCHSIA_buffer_collection
        VK_STRUCTURE_TYPE_BUFFER_COLLECTION_CREATE_INFO_FUCHSIA = 1000366000,
      // Provided by VK_FUCHSIA_buffer_collection
        VK_STRUCTURE_TYPE_IMPORT_MEMORY_BUFFER_COLLECTION_FUCHSIA = 1000366001,
      // Provided by VK_FUCHSIA_buffer_collection
        VK_STRUCTURE_TYPE_BUFFER_COLLECTION_IMAGE_CREATE_INFO_FUCHSIA = 1000366002,
      // Provided by VK_FUCHSIA_buffer_collection
        VK_STRUCTURE_TYPE_BUFFER_COLLECTION_PROPERTIES_FUCHSIA = 1000366003,
      // Provided by VK_FUCHSIA_buffer_collection
        VK_STRUCTURE_TYPE_BUFFER_CONSTRAINTS_INFO_FUCHSIA = 1000366004,
      // Provided by VK_FUCHSIA_buffer_collection
        VK_STRUCTURE_TYPE_BUFFER_COLLECTION_BUFFER_CREATE_INFO_FUCHSIA = 1000366005,
      // Provided by VK_FUCHSIA_buffer_collection
        VK_STRUCTURE_TYPE_IMAGE_CONSTRAINTS_INFO_FUCHSIA = 1000366006,
      // Provided by VK_FUCHSIA_buffer_collection
        VK_STRUCTURE_TYPE_IMAGE_FORMAT_CONSTRAINTS_INFO_FUCHSIA = 1000366007,
      // Provided by VK_FUCHSIA_buffer_collection
        VK_STRUCTURE_TYPE_SYSMEM_COLOR_SPACE_FUCHSIA = 1000366008,
      // Provided by VK_FUCHSIA_buffer_collection
        VK_STRUCTURE_TYPE_BUFFER_COLLECTION_CONSTRAINTS_INFO_FUCHSIA = 1000366009,
      // Provided by VK_HUAWEI_subpass_shading
        VK_STRUCTURE_TYPE_SUBPASS_SHADING_PIPELINE_CREATE_INFO_HUAWEI = 1000369000,
      // Provided by VK_HUAWEI_subpass_shading
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBPASS_SHADING_FEATURES_HUAWEI = 1000369001,
      // Provided by VK_HUAWEI_subpass_shading
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBPASS_SHADING_PROPERTIES_HUAWEI = 1000369002,
      // Provided by VK_HUAWEI_invocation_mask
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INVOCATION_MASK_FEATURES_HUAWEI = 1000370000,
      // Provided by VK_NV_external_memory_rdma
        VK_STRUCTURE_TYPE_MEMORY_GET_REMOTE_ADDRESS_INFO_NV = 1000371000,
      // Provided by VK_NV_external_memory_rdma
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_RDMA_FEATURES_NV = 1000371001,
      // Provided by VK_EXT_pipeline_properties
        VK_STRUCTURE_TYPE_PIPELINE_PROPERTIES_IDENTIFIER_EXT = 1000372000,
      // Provided by VK_EXT_pipeline_properties
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_PROPERTIES_FEATURES_EXT = 1000372001,
      // Provided by VK_EXT_frame_boundary
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAME_BOUNDARY_FEATURES_EXT = 1000375000,
      // Provided by VK_EXT_frame_boundary
        VK_STRUCTURE_TYPE_FRAME_BOUNDARY_EXT = 1000375001,
      // Provided by VK_EXT_multisampled_render_to_single_sampled
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_FEATURES_EXT = 1000376000,
      // Provided by VK_EXT_multisampled_render_to_single_sampled
        VK_STRUCTURE_TYPE_SUBPASS_RESOLVE_PERFORMANCE_QUERY_EXT = 1000376001,
      // Provided by VK_EXT_multisampled_render_to_single_sampled
        VK_STRUCTURE_TYPE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_INFO_EXT = 1000376002,
      // Provided by VK_EXT_extended_dynamic_state2
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_2_FEATURES_EXT = 1000377000,
      // Provided by VK_QNX_screen_surface
        VK_STRUCTURE_TYPE_SCREEN_SURFACE_CREATE_INFO_QNX = 1000378000,
      // Provided by VK_EXT_color_write_enable
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COLOR_WRITE_ENABLE_FEATURES_EXT = 1000381000,
      // Provided by VK_EXT_color_write_enable
        VK_STRUCTURE_TYPE_PIPELINE_COLOR_WRITE_CREATE_INFO_EXT = 1000381001,
      // Provided by VK_EXT_primitives_generated_query
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIMITIVES_GENERATED_QUERY_FEATURES_EXT = 1000382000,
      // Provided by VK_KHR_ray_tracing_maintenance1
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_MAINTENANCE_1_FEATURES_KHR = 1000386000,
      // Provided by VK_KHR_shader_untyped_pointers
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_UNTYPED_POINTERS_FEATURES_KHR = 1000387000,
      // Provided by VK_VALVE_video_encode_rgb_conversion
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_ENCODE_RGB_CONVERSION_FEATURES_VALVE = 1000390000,
      // Provided by VK_VALVE_video_encode_rgb_conversion
        VK_STRUCTURE_TYPE_VIDEO_ENCODE_RGB_CONVERSION_CAPABILITIES_VALVE = 1000390001,
      // Provided by VK_VALVE_video_encode_rgb_conversion
        VK_STRUCTURE_TYPE_VIDEO_ENCODE_PROFILE_RGB_CONVERSION_INFO_VALVE = 1000390002,
      // Provided by VK_VALVE_video_encode_rgb_conversion
        VK_STRUCTURE_TYPE_VIDEO_ENCODE_SESSION_RGB_CONVERSION_CREATE_INFO_VALVE = 1000390003,
      // Provided by VK_EXT_image_view_min_lod
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_VIEW_MIN_LOD_FEATURES_EXT = 1000391000,
      // Provided by VK_EXT_image_view_min_lod
        VK_STRUCTURE_TYPE_IMAGE_VIEW_MIN_LOD_CREATE_INFO_EXT = 1000391001,
      // Provided by VK_EXT_multi_draw
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTI_DRAW_FEATURES_EXT = 1000392000,
      // Provided by VK_EXT_multi_draw
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTI_DRAW_PROPERTIES_EXT = 1000392001,
      // Provided by VK_EXT_image_2d_view_of_3d
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_2D_VIEW_OF_3D_FEATURES_EXT = 1000393000,
      // Provided by VK_EXT_shader_tile_image
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TILE_IMAGE_FEATURES_EXT = 1000395000,
      // Provided by VK_EXT_shader_tile_image
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TILE_IMAGE_PROPERTIES_EXT = 1000395001,
      // Provided by VK_EXT_opacity_micromap
        VK_STRUCTURE_TYPE_MICROMAP_BUILD_INFO_EXT = 1000396000,
      // Provided by VK_EXT_opacity_micromap
        VK_STRUCTURE_TYPE_MICROMAP_VERSION_INFO_EXT = 1000396001,
      // Provided by VK_EXT_opacity_micromap
        VK_STRUCTURE_TYPE_COPY_MICROMAP_INFO_EXT = 1000396002,
      // Provided by VK_EXT_opacity_micromap
        VK_STRUCTURE_TYPE_COPY_MICROMAP_TO_MEMORY_INFO_EXT = 1000396003,
      // Provided by VK_EXT_opacity_micromap
        VK_STRUCTURE_TYPE_COPY_MEMORY_TO_MICROMAP_INFO_EXT = 1000396004,
      // Provided by VK_EXT_opacity_micromap
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_OPACITY_MICROMAP_FEATURES_EXT = 1000396005,
      // Provided by VK_EXT_opacity_micromap
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_OPACITY_MICROMAP_PROPERTIES_EXT = 1000396006,
      // Provided by VK_EXT_opacity_micromap
        VK_STRUCTURE_TYPE_MICROMAP_CREATE_INFO_EXT = 1000396007,
      // Provided by VK_EXT_opacity_micromap
        VK_STRUCTURE_TYPE_MICROMAP_BUILD_SIZES_INFO_EXT = 1000396008,
      // Provided by VK_EXT_opacity_micromap
        VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_TRIANGLES_OPACITY_MICROMAP_EXT = 1000396009,
    #ifdef VK_ENABLE_BETA_EXTENSIONS
      // Provided by VK_NV_displacement_micromap
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISPLACEMENT_MICROMAP_FEATURES_NV = 1000397000,
    #endif
    #ifdef VK_ENABLE_BETA_EXTENSIONS
      // Provided by VK_NV_displacement_micromap
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISPLACEMENT_MICROMAP_PROPERTIES_NV = 1000397001,
    #endif
    #ifdef VK_ENABLE_BETA_EXTENSIONS
      // Provided by VK_NV_displacement_micromap
        VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_TRIANGLES_DISPLACEMENT_MICROMAP_NV = 1000397002,
    #endif
      // Provided by VK_HUAWEI_cluster_culling_shader
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CLUSTER_CULLING_SHADER_FEATURES_HUAWEI = 1000404000,
      // Provided by VK_HUAWEI_cluster_culling_shader
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CLUSTER_CULLING_SHADER_PROPERTIES_HUAWEI = 1000404001,
      // Provided by VK_HUAWEI_cluster_culling_shader
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CLUSTER_CULLING_SHADER_VRS_FEATURES_HUAWEI = 1000404002,
      // Provided by VK_EXT_border_color_swizzle
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BORDER_COLOR_SWIZZLE_FEATURES_EXT = 1000411000,
      // Provided by VK_EXT_border_color_swizzle
        VK_STRUCTURE_TYPE_SAMPLER_BORDER_COLOR_COMPONENT_MAPPING_CREATE_INFO_EXT = 1000411001,
      // Provided by VK_EXT_pageable_device_local_memory
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PAGEABLE_DEVICE_LOCAL_MEMORY_FEATURES_EXT = 1000412000,
      // Provided by VK_ARM_shader_core_properties
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_ARM = 1000415000,
      // Provided by VK_ARM_scheduling_controls
        VK_STRUCTURE_TYPE_DEVICE_QUEUE_SHADER_CORE_CONTROL_CREATE_INFO_ARM = 1000417000,
      // Provided by VK_ARM_scheduling_controls
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCHEDULING_CONTROLS_FEATURES_ARM = 1000417001,
      // Provided by VK_ARM_scheduling_controls
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCHEDULING_CONTROLS_PROPERTIES_ARM = 1000417002,
      // Provided by VK_ARM_scheduling_controls
        VK_STRUCTURE_TYPE_DISPATCH_PARAMETERS_ARM = 1000417003,
      // Provided by VK_ARM_scheduling_controls
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCHEDULING_CONTROLS_DISPATCH_PARAMETERS_PROPERTIES_ARM = 1000417004,
      // Provided by VK_EXT_image_sliced_view_of_3d
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_SLICED_VIEW_OF_3D_FEATURES_EXT = 1000418000,
      // Provided by VK_EXT_image_sliced_view_of_3d
        VK_STRUCTURE_TYPE_IMAGE_VIEW_SLICED_CREATE_INFO_EXT = 1000418001,
      // Provided by VK_VALVE_descriptor_set_host_mapping
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_SET_HOST_MAPPING_FEATURES_VALVE = 1000420000,
      // Provided by VK_VALVE_descriptor_set_host_mapping
        VK_STRUCTURE_TYPE_DESCRIPTOR_SET_BINDING_REFERENCE_VALVE = 1000420001,
      // Provided by VK_VALVE_descriptor_set_host_mapping
        VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_HOST_MAPPING_INFO_VALVE = 1000420002,
      // Provided by VK_EXT_non_seamless_cube_map
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_NON_SEAMLESS_CUBE_MAP_FEATURES_EXT = 1000422000,
      // Provided by VK_ARM_render_pass_striped
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RENDER_PASS_STRIPED_FEATURES_ARM = 1000424000,
      // Provided by VK_ARM_render_pass_striped
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RENDER_PASS_STRIPED_PROPERTIES_ARM = 1000424001,
      // Provided by VK_ARM_render_pass_striped
        VK_STRUCTURE_TYPE_RENDER_PASS_STRIPE_BEGIN_INFO_ARM = 1000424002,
      // Provided by VK_ARM_render_pass_striped
        VK_STRUCTURE_TYPE_RENDER_PASS_STRIPE_INFO_ARM = 1000424003,
      // Provided by VK_ARM_render_pass_striped
        VK_STRUCTURE_TYPE_RENDER_PASS_STRIPE_SUBMIT_INFO_ARM = 1000424004,
      // Provided by VK_NV_copy_memory_indirect
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COPY_MEMORY_INDIRECT_FEATURES_NV = 1000426000,
      // Provided by VK_NV_device_generated_commands_compute
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_COMPUTE_FEATURES_NV = 1000428000,
      // Provided by VK_NV_device_generated_commands_compute
        VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_INDIRECT_BUFFER_INFO_NV = 1000428001,
      // Provided by VK_NV_device_generated_commands_compute
        VK_STRUCTURE_TYPE_PIPELINE_INDIRECT_DEVICE_ADDRESS_INFO_NV = 1000428002,
      // Provided by VK_NV_ray_tracing_linear_swept_spheres
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_LINEAR_SWEPT_SPHERES_FEATURES_NV = 1000429008,
      // Provided by VK_NV_ray_tracing_linear_swept_spheres
        VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_LINEAR_SWEPT_SPHERES_DATA_NV = 1000429009,
      // Provided by VK_NV_ray_tracing_linear_swept_spheres
        VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_SPHERES_DATA_NV = 1000429010,
      // Provided by VK_NV_linear_color_attachment
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINEAR_COLOR_ATTACHMENT_FEATURES_NV = 1000430000,
      // Provided by VK_KHR_shader_maximal_reconvergence
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_MAXIMAL_RECONVERGENCE_FEATURES_KHR = 1000434000,
      // Provided by VK_EXT_image_compression_control_swapchain
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_COMPRESSION_CONTROL_SWAPCHAIN_FEATURES_EXT = 1000437000,
      // Provided by VK_QCOM_image_processing
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_PROCESSING_FEATURES_QCOM = 1000440000,
      // Provided by VK_QCOM_image_processing
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_PROCESSING_PROPERTIES_QCOM = 1000440001,
      // Provided by VK_QCOM_image_processing
        VK_STRUCTURE_TYPE_IMAGE_VIEW_SAMPLE_WEIGHT_CREATE_INFO_QCOM = 1000440002,
      // Provided by VK_EXT_nested_command_buffer
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_NESTED_COMMAND_BUFFER_FEATURES_EXT = 1000451000,
      // Provided by VK_EXT_nested_command_buffer
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_NESTED_COMMAND_BUFFER_PROPERTIES_EXT = 1000451001,
      // Provided by VK_OHOS_external_memory
        VK_STRUCTURE_TYPE_NATIVE_BUFFER_USAGE_OHOS = 1000452000,
      // Provided by VK_OHOS_external_memory
        VK_STRUCTURE_TYPE_NATIVE_BUFFER_PROPERTIES_OHOS = 1000452001,
      // Provided by VK_OHOS_external_memory
        VK_STRUCTURE_TYPE_NATIVE_BUFFER_FORMAT_PROPERTIES_OHOS = 1000452002,
      // Provided by VK_OHOS_external_memory
        VK_STRUCTURE_TYPE_IMPORT_NATIVE_BUFFER_INFO_OHOS = 1000452003,
      // Provided by VK_OHOS_external_memory
        VK_STRUCTURE_TYPE_MEMORY_GET_NATIVE_BUFFER_INFO_OHOS = 1000452004,
      // Provided by VK_OHOS_external_memory
        VK_STRUCTURE_TYPE_EXTERNAL_FORMAT_OHOS = 1000452005,
      // Provided by VK_EXT_external_memory_acquire_unmodified
        VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_ACQUIRE_UNMODIFIED_EXT = 1000453000,
      // Provided by VK_EXT_extended_dynamic_state3
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_3_FEATURES_EXT = 1000455000,
      // Provided by VK_EXT_extended_dynamic_state3
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_3_PROPERTIES_EXT = 1000455001,
      // Provided by VK_EXT_subpass_merge_feedback
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBPASS_MERGE_FEEDBACK_FEATURES_EXT = 1000458000,
      // Provided by VK_EXT_subpass_merge_feedback
        VK_STRUCTURE_TYPE_RENDER_PASS_CREATION_CONTROL_EXT = 1000458001,
      // Provided by VK_EXT_subpass_merge_feedback
        VK_STRUCTURE_TYPE_RENDER_PASS_CREATION_FEEDBACK_CREATE_INFO_EXT = 1000458002,
      // Provided by VK_EXT_subpass_merge_feedback
        VK_STRUCTURE_TYPE_RENDER_PASS_SUBPASS_FEEDBACK_CREATE_INFO_EXT = 1000458003,
      // Provided by VK_LUNARG_direct_driver_loading
        VK_STRUCTURE_TYPE_DIRECT_DRIVER_LOADING_INFO_LUNARG = 1000459000,
      // Provided by VK_LUNARG_direct_driver_loading
        VK_STRUCTURE_TYPE_DIRECT_DRIVER_LOADING_LIST_LUNARG = 1000459001,
      // Provided by VK_ARM_tensors
        VK_STRUCTURE_TYPE_TENSOR_CREATE_INFO_ARM = 1000460000,
      // Provided by VK_ARM_tensors
        VK_STRUCTURE_TYPE_TENSOR_VIEW_CREATE_INFO_ARM = 1000460001,
      // Provided by VK_ARM_tensors
        VK_STRUCTURE_TYPE_BIND_TENSOR_MEMORY_INFO_ARM = 1000460002,
      // Provided by VK_ARM_tensors
        VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_TENSOR_ARM = 1000460003,
      // Provided by VK_ARM_tensors
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TENSOR_PROPERTIES_ARM = 1000460004,
      // Provided by VK_ARM_tensors
        VK_STRUCTURE_TYPE_TENSOR_FORMAT_PROPERTIES_ARM = 1000460005,
      // Provided by VK_ARM_tensors
        VK_STRUCTURE_TYPE_TENSOR_DESCRIPTION_ARM = 1000460006,
      // Provided by VK_ARM_tensors
        VK_STRUCTURE_TYPE_TENSOR_MEMORY_REQUIREMENTS_INFO_ARM = 1000460007,
      // Provided by VK_ARM_tensors
        VK_STRUCTURE_TYPE_TENSOR_MEMORY_BARRIER_ARM = 1000460008,
      // Provided by VK_ARM_tensors
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TENSOR_FEATURES_ARM = 1000460009,
      // Provided by VK_ARM_tensors
        VK_STRUCTURE_TYPE_DEVICE_TENSOR_MEMORY_REQUIREMENTS_ARM = 1000460010,
      // Provided by VK_ARM_tensors
        VK_STRUCTURE_TYPE_COPY_TENSOR_INFO_ARM = 1000460011,
      // Provided by VK_ARM_tensors
        VK_STRUCTURE_TYPE_TENSOR_COPY_ARM = 1000460012,
      // Provided by VK_ARM_tensors
        VK_STRUCTURE_TYPE_TENSOR_DEPENDENCY_INFO_ARM = 1000460013,
      // Provided by VK_ARM_tensors
        VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO_TENSOR_ARM = 1000460014,
      // Provided by VK_ARM_tensors
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_TENSOR_INFO_ARM = 1000460015,
      // Provided by VK_ARM_tensors
        VK_STRUCTURE_TYPE_EXTERNAL_TENSOR_PROPERTIES_ARM = 1000460016,
      // Provided by VK_ARM_tensors
        VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_TENSOR_CREATE_INFO_ARM = 1000460017,
      // Provided by VK_EXT_descriptor_buffer with VK_ARM_tensors
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_TENSOR_FEATURES_ARM = 1000460018,
      // Provided by VK_EXT_descriptor_buffer with VK_ARM_tensors
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_TENSOR_PROPERTIES_ARM = 1000460019,
      // Provided by VK_EXT_descriptor_buffer with VK_ARM_tensors
        VK_STRUCTURE_TYPE_DESCRIPTOR_GET_TENSOR_INFO_ARM = 1000460020,
      // Provided by VK_EXT_descriptor_buffer with VK_ARM_tensors
        VK_STRUCTURE_TYPE_TENSOR_CAPTURE_DESCRIPTOR_DATA_INFO_ARM = 1000460021,
      // Provided by VK_EXT_descriptor_buffer with VK_ARM_tensors
        VK_STRUCTURE_TYPE_TENSOR_VIEW_CAPTURE_DESCRIPTOR_DATA_INFO_ARM = 1000460022,
      // Provided by VK_EXT_frame_boundary with VK_ARM_tensors
        VK_STRUCTURE_TYPE_FRAME_BOUNDARY_TENSORS_ARM = 1000460023,
      // Provided by VK_EXT_shader_module_identifier
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_MODULE_IDENTIFIER_FEATURES_EXT = 1000462000,
      // Provided by VK_EXT_shader_module_identifier
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_MODULE_IDENTIFIER_PROPERTIES_EXT = 1000462001,
      // Provided by VK_EXT_shader_module_identifier
        VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_MODULE_IDENTIFIER_CREATE_INFO_EXT = 1000462002,
      // Provided by VK_EXT_shader_module_identifier
        VK_STRUCTURE_TYPE_SHADER_MODULE_IDENTIFIER_EXT = 1000462003,
      // Provided by VK_EXT_rasterization_order_attachment_access
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_FEATURES_EXT = 1000342000,
      // Provided by VK_NV_optical_flow
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_OPTICAL_FLOW_FEATURES_NV = 1000464000,
      // Provided by VK_NV_optical_flow
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_OPTICAL_FLOW_PROPERTIES_NV = 1000464001,
      // Provided by VK_NV_optical_flow
        VK_STRUCTURE_TYPE_OPTICAL_FLOW_IMAGE_FORMAT_INFO_NV = 1000464002,
      // Provided by VK_NV_optical_flow
        VK_STRUCTURE_TYPE_OPTICAL_FLOW_IMAGE_FORMAT_PROPERTIES_NV = 1000464003,
      // Provided by VK_NV_optical_flow
        VK_STRUCTURE_TYPE_OPTICAL_FLOW_SESSION_CREATE_INFO_NV = 1000464004,
      // Provided by VK_NV_optical_flow
        VK_STRUCTURE_TYPE_OPTICAL_FLOW_EXECUTE_INFO_NV = 1000464005,
      // Provided by VK_NV_optical_flow
        VK_STRUCTURE_TYPE_OPTICAL_FLOW_SESSION_CREATE_PRIVATE_DATA_INFO_NV = 1000464010,
      // Provided by VK_EXT_legacy_dithering
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LEGACY_DITHERING_FEATURES_EXT = 1000465000,
      // Provided by VK_ANDROID_external_format_resolve
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FORMAT_RESOLVE_FEATURES_ANDROID = 1000468000,
      // Provided by VK_ANDROID_external_format_resolve
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FORMAT_RESOLVE_PROPERTIES_ANDROID = 1000468001,
      // Provided by VK_ANDROID_external_format_resolve
        VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_FORMAT_RESOLVE_PROPERTIES_ANDROID = 1000468002,
      // Provided by VK_AMD_anti_lag
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ANTI_LAG_FEATURES_AMD = 1000476000,
      // Provided by VK_AMD_anti_lag
        VK_STRUCTURE_TYPE_ANTI_LAG_DATA_AMD = 1000476001,
      // Provided by VK_AMD_anti_lag
        VK_STRUCTURE_TYPE_ANTI_LAG_PRESENTATION_INFO_AMD = 1000476002,
    #ifdef VK_ENABLE_BETA_EXTENSIONS
      // Provided by VK_AMDX_dense_geometry_format
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DENSE_GEOMETRY_FORMAT_FEATURES_AMDX = 1000478000,
    #endif
    #ifdef VK_ENABLE_BETA_EXTENSIONS
      // Provided by VK_AMDX_dense_geometry_format
        VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_DENSE_GEOMETRY_FORMAT_TRIANGLES_DATA_AMDX = 1000478001,
    #endif
      // Provided by VK_KHR_present_id2
        VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_PRESENT_ID_2_KHR = 1000479000,
      // Provided by VK_KHR_present_id2
        VK_STRUCTURE_TYPE_PRESENT_ID_2_KHR = 1000479001,
      // Provided by VK_KHR_present_id2
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_ID_2_FEATURES_KHR = 1000479002,
      // Provided by VK_KHR_present_wait2
        VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_PRESENT_WAIT_2_KHR = 1000480000,
      // Provided by VK_KHR_present_wait2
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_WAIT_2_FEATURES_KHR = 1000480001,
      // Provided by VK_KHR_present_wait2
        VK_STRUCTURE_TYPE_PRESENT_WAIT_2_INFO_KHR = 1000480002,
      // Provided by VK_KHR_ray_tracing_position_fetch
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_POSITION_FETCH_FEATURES_KHR = 1000481000,
      // Provided by VK_EXT_shader_object
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_OBJECT_FEATURES_EXT = 1000482000,
      // Provided by VK_EXT_shader_object
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_OBJECT_PROPERTIES_EXT = 1000482001,
      // Provided by VK_EXT_shader_object
        VK_STRUCTURE_TYPE_SHADER_CREATE_INFO_EXT = 1000482002,
      // Provided by VK_KHR_pipeline_binary
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_BINARY_FEATURES_KHR = 1000483000,
      // Provided by VK_KHR_pipeline_binary
        VK_STRUCTURE_TYPE_PIPELINE_BINARY_CREATE_INFO_KHR = 1000483001,
      // Provided by VK_KHR_pipeline_binary
        VK_STRUCTURE_TYPE_PIPELINE_BINARY_INFO_KHR = 1000483002,
      // Provided by VK_KHR_pipeline_binary
        VK_STRUCTURE_TYPE_PIPELINE_BINARY_KEY_KHR = 1000483003,
      // Provided by VK_KHR_pipeline_binary
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_BINARY_PROPERTIES_KHR = 1000483004,
      // Provided by VK_KHR_pipeline_binary
        VK_STRUCTURE_TYPE_RELEASE_CAPTURED_PIPELINE_DATA_INFO_KHR = 1000483005,
      // Provided by VK_KHR_pipeline_binary
        VK_STRUCTURE_TYPE_PIPELINE_BINARY_DATA_INFO_KHR = 1000483006,
      // Provided by VK_KHR_pipeline_binary
        VK_STRUCTURE_TYPE_PIPELINE_CREATE_INFO_KHR = 1000483007,
      // Provided by VK_KHR_pipeline_binary
        VK_STRUCTURE_TYPE_DEVICE_PIPELINE_BINARY_INTERNAL_CACHE_CONTROL_KHR = 1000483008,
      // Provided by VK_KHR_pipeline_binary
        VK_STRUCTURE_TYPE_PIPELINE_BINARY_HANDLES_INFO_KHR = 1000483009,
      // Provided by VK_QCOM_tile_properties
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TILE_PROPERTIES_FEATURES_QCOM = 1000484000,
      // Provided by VK_QCOM_tile_properties
        VK_STRUCTURE_TYPE_TILE_PROPERTIES_QCOM = 1000484001,
      // Provided by VK_SEC_amigo_profiling
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_AMIGO_PROFILING_FEATURES_SEC = 1000485000,
      // Provided by VK_SEC_amigo_profiling
        VK_STRUCTURE_TYPE_AMIGO_PROFILING_SUBMIT_INFO_SEC = 1000485001,
      // Provided by VK_KHR_surface_maintenance1
        VK_STRUCTURE_TYPE_SURFACE_PRESENT_MODE_KHR = 1000274000,
      // Provided by VK_KHR_surface_maintenance1
        VK_STRUCTURE_TYPE_SURFACE_PRESENT_SCALING_CAPABILITIES_KHR = 1000274001,
      // Provided by VK_KHR_surface_maintenance1
        VK_STRUCTURE_TYPE_SURFACE_PRESENT_MODE_COMPATIBILITY_KHR = 1000274002,
      // Provided by VK_KHR_swapchain_maintenance1
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SWAPCHAIN_MAINTENANCE_1_FEATURES_KHR = 1000275000,
      // Provided by VK_KHR_swapchain_maintenance1
        VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_FENCE_INFO_KHR = 1000275001,
      // Provided by VK_KHR_swapchain_maintenance1
        VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_MODES_CREATE_INFO_KHR = 1000275002,
      // Provided by VK_KHR_swapchain_maintenance1
        VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_MODE_INFO_KHR = 1000275003,
      // Provided by VK_KHR_swapchain_maintenance1
        VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_SCALING_CREATE_INFO_KHR = 1000275004,
      // Provided by VK_KHR_swapchain_maintenance1
        VK_STRUCTURE_TYPE_RELEASE_SWAPCHAIN_IMAGES_INFO_KHR = 1000275005,
      // Provided by VK_QCOM_multiview_per_view_viewports
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_VIEWPORTS_FEATURES_QCOM = 1000488000,
      // Provided by VK_NV_ray_tracing_invocation_reorder
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_INVOCATION_REORDER_FEATURES_NV = 1000490000,
      // Provided by VK_NV_ray_tracing_invocation_reorder
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_INVOCATION_REORDER_PROPERTIES_NV = 1000490001,
      // Provided by VK_NV_cooperative_vector
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_VECTOR_FEATURES_NV = 1000491000,
      // Provided by VK_NV_cooperative_vector
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_VECTOR_PROPERTIES_NV = 1000491001,
      // Provided by VK_NV_cooperative_vector
        VK_STRUCTURE_TYPE_COOPERATIVE_VECTOR_PROPERTIES_NV = 1000491002,
      // Provided by VK_NV_cooperative_vector
        VK_STRUCTURE_TYPE_CONVERT_COOPERATIVE_VECTOR_MATRIX_INFO_NV = 1000491004,
      // Provided by VK_NV_extended_sparse_address_space
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_SPARSE_ADDRESS_SPACE_FEATURES_NV = 1000492000,
      // Provided by VK_NV_extended_sparse_address_space
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_SPARSE_ADDRESS_SPACE_PROPERTIES_NV = 1000492001,
      // Provided by VK_EXT_mutable_descriptor_type
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_EXT = 1000351000,
      // Provided by VK_EXT_mutable_descriptor_type
        VK_STRUCTURE_TYPE_MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_EXT = 1000351002,
      // Provided by VK_EXT_legacy_vertex_attributes
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LEGACY_VERTEX_ATTRIBUTES_FEATURES_EXT = 1000495000,
      // Provided by VK_EXT_legacy_vertex_attributes
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LEGACY_VERTEX_ATTRIBUTES_PROPERTIES_EXT = 1000495001,
      // Provided by VK_EXT_layer_settings
        VK_STRUCTURE_TYPE_LAYER_SETTINGS_CREATE_INFO_EXT = 1000496000,
      // Provided by VK_ARM_shader_core_builtins
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_BUILTINS_FEATURES_ARM = 1000497000,
      // Provided by VK_ARM_shader_core_builtins
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_BUILTINS_PROPERTIES_ARM = 1000497001,
      // Provided by VK_EXT_pipeline_library_group_handles
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_LIBRARY_GROUP_HANDLES_FEATURES_EXT = 1000498000,
      // Provided by VK_EXT_dynamic_rendering_unused_attachments
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_UNUSED_ATTACHMENTS_FEATURES_EXT = 1000499000,
      // Provided by VK_KHR_internally_synchronized_queues
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INTERNALLY_SYNCHRONIZED_QUEUES_FEATURES_KHR = 1000504000,
      // Provided by VK_NV_low_latency2
        VK_STRUCTURE_TYPE_LATENCY_SLEEP_MODE_INFO_NV = 1000505000,
      // Provided by VK_NV_low_latency2
        VK_STRUCTURE_TYPE_LATENCY_SLEEP_INFO_NV = 1000505001,
      // Provided by VK_NV_low_latency2
        VK_STRUCTURE_TYPE_SET_LATENCY_MARKER_INFO_NV = 1000505002,
      // Provided by VK_NV_low_latency2
        VK_STRUCTURE_TYPE_GET_LATENCY_MARKER_INFO_NV = 1000505003,
      // Provided by VK_NV_low_latency2
        VK_STRUCTURE_TYPE_LATENCY_TIMINGS_FRAME_REPORT_NV = 1000505004,
      // Provided by VK_NV_low_latency2
        VK_STRUCTURE_TYPE_LATENCY_SUBMISSION_PRESENT_ID_NV = 1000505005,
      // Provided by VK_NV_low_latency2
        VK_STRUCTURE_TYPE_OUT_OF_BAND_QUEUE_TYPE_INFO_NV = 1000505006,
      // Provided by VK_NV_low_latency2
        VK_STRUCTURE_TYPE_SWAPCHAIN_LATENCY_CREATE_INFO_NV = 1000505007,
      // Provided by VK_NV_low_latency2
        VK_STRUCTURE_TYPE_LATENCY_SURFACE_CAPABILITIES_NV = 1000505008,
      // Provided by VK_KHR_cooperative_matrix
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_KHR = 1000506000,
      // Provided by VK_KHR_cooperative_matrix
        VK_STRUCTURE_TYPE_COOPERATIVE_MATRIX_PROPERTIES_KHR = 1000506001,
      // Provided by VK_KHR_cooperative_matrix
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_PROPERTIES_KHR = 1000506002,
      // Provided by VK_ARM_data_graph
        VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_CREATE_INFO_ARM = 1000507000,
      // Provided by VK_ARM_data_graph
        VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_SESSION_CREATE_INFO_ARM = 1000507001,
      // Provided by VK_ARM_data_graph
        VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_RESOURCE_INFO_ARM = 1000507002,
      // Provided by VK_ARM_data_graph
        VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_CONSTANT_ARM = 1000507003,
      // Provided by VK_ARM_data_graph
        VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_SESSION_MEMORY_REQUIREMENTS_INFO_ARM = 1000507004,
      // Provided by VK_ARM_data_graph
        VK_STRUCTURE_TYPE_BIND_DATA_GRAPH_PIPELINE_SESSION_MEMORY_INFO_ARM = 1000507005,
      // Provided by VK_ARM_data_graph
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DATA_GRAPH_FEATURES_ARM = 1000507006,
      // Provided by VK_ARM_data_graph
        VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_SHADER_MODULE_CREATE_INFO_ARM = 1000507007,
      // Provided by VK_ARM_data_graph
        VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_PROPERTY_QUERY_RESULT_ARM = 1000507008,
      // Provided by VK_ARM_data_graph
        VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_INFO_ARM = 1000507009,
      // Provided by VK_ARM_data_graph
        VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_COMPILER_CONTROL_CREATE_INFO_ARM = 1000507010,
      // Provided by VK_ARM_data_graph
        VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_SESSION_BIND_POINT_REQUIREMENTS_INFO_ARM = 1000507011,
      // Provided by VK_ARM_data_graph
        VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_SESSION_BIND_POINT_REQUIREMENT_ARM = 1000507012,
      // Provided by VK_ARM_data_graph
        VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_IDENTIFIER_CREATE_INFO_ARM = 1000507013,
      // Provided by VK_ARM_data_graph
        VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_DISPATCH_INFO_ARM = 1000507014,
      // Provided by VK_ARM_data_graph
        VK_STRUCTURE_TYPE_DATA_GRAPH_PROCESSING_ENGINE_CREATE_INFO_ARM = 1000507016,
      // Provided by VK_ARM_data_graph
        VK_STRUCTURE_TYPE_QUEUE_FAMILY_DATA_GRAPH_PROCESSING_ENGINE_PROPERTIES_ARM = 1000507017,
      // Provided by VK_ARM_data_graph
        VK_STRUCTURE_TYPE_QUEUE_FAMILY_DATA_GRAPH_PROPERTIES_ARM = 1000507018,
      // Provided by VK_ARM_data_graph
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_QUEUE_FAMILY_DATA_GRAPH_PROCESSING_ENGINE_INFO_ARM = 1000507019,
      // Provided by VK_ARM_data_graph with VK_ARM_tensors
        VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_CONSTANT_TENSOR_SEMI_STRUCTURED_SPARSITY_INFO_ARM = 1000507015,
      // Provided by VK_ARM_data_graph_instruction_set_tosa
        VK_STRUCTURE_TYPE_QUEUE_FAMILY_DATA_GRAPH_TOSA_PROPERTIES_ARM = 1000508000,
      // Provided by VK_QCOM_multiview_per_view_render_areas
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_RENDER_AREAS_FEATURES_QCOM = 1000510000,
      // Provided by VK_QCOM_multiview_per_view_render_areas
        VK_STRUCTURE_TYPE_MULTIVIEW_PER_VIEW_RENDER_AREAS_RENDER_PASS_BEGIN_INFO_QCOM = 1000510001,
      // Provided by VK_KHR_compute_shader_derivatives
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_KHR = 1000201000,
      // Provided by VK_KHR_compute_shader_derivatives
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_PROPERTIES_KHR = 1000511000,
      // Provided by VK_KHR_video_decode_av1
        VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_CAPABILITIES_KHR = 1000512000,
      // Provided by VK_KHR_video_decode_av1
        VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_PICTURE_INFO_KHR = 1000512001,
      // Provided by VK_KHR_video_decode_av1
        VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_PROFILE_INFO_KHR = 1000512003,
      // Provided by VK_KHR_video_decode_av1
        VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_SESSION_PARAMETERS_CREATE_INFO_KHR = 1000512004,
      // Provided by VK_KHR_video_decode_av1
        VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_DPB_SLOT_INFO_KHR = 1000512005,
      // Provided by VK_KHR_video_encode_av1
        VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_CAPABILITIES_KHR = 1000513000,
      // Provided by VK_KHR_video_encode_av1
        VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_SESSION_PARAMETERS_CREATE_INFO_KHR = 1000513001,
      // Provided by VK_KHR_video_encode_av1
        VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_PICTURE_INFO_KHR = 1000513002,
      // Provided by VK_KHR_video_encode_av1
        VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_DPB_SLOT_INFO_KHR = 1000513003,
      // Provided by VK_KHR_video_encode_av1
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_ENCODE_AV1_FEATURES_KHR = 1000513004,
      // Provided by VK_KHR_video_encode_av1
        VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_PROFILE_INFO_KHR = 1000513005,
      // Provided by VK_KHR_video_encode_av1
        VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_RATE_CONTROL_INFO_KHR = 1000513006,
      // Provided by VK_KHR_video_encode_av1
        VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_RATE_CONTROL_LAYER_INFO_KHR = 1000513007,
      // Provided by VK_KHR_video_encode_av1
        VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_QUALITY_LEVEL_PROPERTIES_KHR = 1000513008,
      // Provided by VK_KHR_video_encode_av1
        VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_SESSION_CREATE_INFO_KHR = 1000513009,
      // Provided by VK_KHR_video_encode_av1
        VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_GOP_REMAINING_FRAME_INFO_KHR = 1000513010,
      // Provided by VK_KHR_video_decode_vp9
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_DECODE_VP9_FEATURES_KHR = 1000514000,
      // Provided by VK_KHR_video_decode_vp9
        VK_STRUCTURE_TYPE_VIDEO_DECODE_VP9_CAPABILITIES_KHR = 1000514001,
      // Provided by VK_KHR_video_decode_vp9
        VK_STRUCTURE_TYPE_VIDEO_DECODE_VP9_PICTURE_INFO_KHR = 1000514002,
      // Provided by VK_KHR_video_decode_vp9
        VK_STRUCTURE_TYPE_VIDEO_DECODE_VP9_PROFILE_INFO_KHR = 1000514003,
      // Provided by VK_KHR_video_maintenance1
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_MAINTENANCE_1_FEATURES_KHR = 1000515000,
      // Provided by VK_KHR_video_maintenance1
        VK_STRUCTURE_TYPE_VIDEO_INLINE_QUERY_INFO_KHR = 1000515001,
      // Provided by VK_NV_per_stage_descriptor_set
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PER_STAGE_DESCRIPTOR_SET_FEATURES_NV = 1000516000,
      // Provided by VK_QCOM_image_processing2
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_PROCESSING_2_FEATURES_QCOM = 1000518000,
      // Provided by VK_QCOM_image_processing2
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_PROCESSING_2_PROPERTIES_QCOM = 1000518001,
      // Provided by VK_QCOM_image_processing2
        VK_STRUCTURE_TYPE_SAMPLER_BLOCK_MATCH_WINDOW_CREATE_INFO_QCOM = 1000518002,
      // Provided by VK_QCOM_filter_cubic_weights
        VK_STRUCTURE_TYPE_SAMPLER_CUBIC_WEIGHTS_CREATE_INFO_QCOM = 1000519000,
      // Provided by VK_QCOM_filter_cubic_weights
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUBIC_WEIGHTS_FEATURES_QCOM = 1000519001,
      // Provided by VK_QCOM_filter_cubic_weights
        VK_STRUCTURE_TYPE_BLIT_IMAGE_CUBIC_WEIGHTS_INFO_QCOM = 1000519002,
      // Provided by VK_QCOM_ycbcr_degamma
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_DEGAMMA_FEATURES_QCOM = 1000520000,
      // Provided by VK_QCOM_ycbcr_degamma
        VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_YCBCR_DEGAMMA_CREATE_INFO_QCOM = 1000520001,
      // Provided by VK_QCOM_filter_cubic_clamp
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUBIC_CLAMP_FEATURES_QCOM = 1000521000,
      // Provided by VK_EXT_attachment_feedback_loop_dynamic_state
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ATTACHMENT_FEEDBACK_LOOP_DYNAMIC_STATE_FEATURES_EXT = 1000524000,
      // Provided by VK_KHR_unified_image_layouts
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_UNIFIED_IMAGE_LAYOUTS_FEATURES_KHR = 1000527000,
      // Provided by VK_KHR_unified_image_layouts with VK_EXT_attachment_feedback_loop_layout and (VK_VERSION_1_3 or VK_KHR_dynamic_rendering)
        VK_STRUCTURE_TYPE_ATTACHMENT_FEEDBACK_LOOP_INFO_EXT = 1000527001,
      // Provided by VK_QNX_external_memory_screen_buffer
        VK_STRUCTURE_TYPE_SCREEN_BUFFER_PROPERTIES_QNX = 1000529000,
      // Provided by VK_QNX_external_memory_screen_buffer
        VK_STRUCTURE_TYPE_SCREEN_BUFFER_FORMAT_PROPERTIES_QNX = 1000529001,
      // Provided by VK_QNX_external_memory_screen_buffer
        VK_STRUCTURE_TYPE_IMPORT_SCREEN_BUFFER_INFO_QNX = 1000529002,
      // Provided by VK_QNX_external_memory_screen_buffer
        VK_STRUCTURE_TYPE_EXTERNAL_FORMAT_QNX = 1000529003,
      // Provided by VK_QNX_external_memory_screen_buffer
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_SCREEN_BUFFER_FEATURES_QNX = 1000529004,
      // Provided by VK_MSFT_layered_driver
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LAYERED_DRIVER_PROPERTIES_MSFT = 1000530000,
      // Provided by VK_KHR_calibrated_timestamps
        VK_STRUCTURE_TYPE_CALIBRATED_TIMESTAMP_INFO_KHR = 1000184000,
      // Provided by VK_KHR_maintenance6 with VK_EXT_descriptor_buffer
        VK_STRUCTURE_TYPE_SET_DESCRIPTOR_BUFFER_OFFSETS_INFO_EXT = 1000545007,
      // Provided by VK_KHR_maintenance6 with VK_EXT_descriptor_buffer
        VK_STRUCTURE_TYPE_BIND_DESCRIPTOR_BUFFER_EMBEDDED_SAMPLERS_INFO_EXT = 1000545008,
      // Provided by VK_NV_descriptor_pool_overallocation
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_POOL_OVERALLOCATION_FEATURES_NV = 1000546000,
      // Provided by VK_QCOM_tile_memory_heap
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TILE_MEMORY_HEAP_FEATURES_QCOM = 1000547000,
      // Provided by VK_QCOM_tile_memory_heap
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TILE_MEMORY_HEAP_PROPERTIES_QCOM = 1000547001,
      // Provided by VK_QCOM_tile_memory_heap
        VK_STRUCTURE_TYPE_TILE_MEMORY_REQUIREMENTS_QCOM = 1000547002,
      // Provided by VK_QCOM_tile_memory_heap
        VK_STRUCTURE_TYPE_TILE_MEMORY_BIND_INFO_QCOM = 1000547003,
      // Provided by VK_QCOM_tile_memory_heap with VK_QCOM_tile_properties
        VK_STRUCTURE_TYPE_TILE_MEMORY_SIZE_INFO_QCOM = 1000547004,
      // Provided by VK_KHR_copy_memory_indirect
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COPY_MEMORY_INDIRECT_FEATURES_KHR = 1000549000,
      // Provided by VK_KHR_copy_memory_indirect
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COPY_MEMORY_INDIRECT_PROPERTIES_KHR = 1000426001,
      // Provided by VK_KHR_copy_memory_indirect
        VK_STRUCTURE_TYPE_COPY_MEMORY_INDIRECT_INFO_KHR = 1000549002,
      // Provided by VK_KHR_copy_memory_indirect
        VK_STRUCTURE_TYPE_COPY_MEMORY_TO_IMAGE_INDIRECT_INFO_KHR = 1000549003,
      // Provided by VK_EXT_memory_decompression
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_DECOMPRESSION_FEATURES_EXT = 1000427000,
      // Provided by VK_EXT_memory_decompression
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_DECOMPRESSION_PROPERTIES_EXT = 1000427001,
      // Provided by VK_EXT_memory_decompression
        VK_STRUCTURE_TYPE_DECOMPRESS_MEMORY_INFO_EXT = 1000550002,
      // Provided by VK_NV_display_stereo
        VK_STRUCTURE_TYPE_DISPLAY_SURFACE_STEREO_CREATE_INFO_NV = 1000551000,
      // Provided by VK_NV_display_stereo
        VK_STRUCTURE_TYPE_DISPLAY_MODE_STEREO_PROPERTIES_NV = 1000551001,
      // Provided by VK_KHR_video_encode_intra_refresh
        VK_STRUCTURE_TYPE_VIDEO_ENCODE_INTRA_REFRESH_CAPABILITIES_KHR = 1000552000,
      // Provided by VK_KHR_video_encode_intra_refresh
        VK_STRUCTURE_TYPE_VIDEO_ENCODE_SESSION_INTRA_REFRESH_CREATE_INFO_KHR = 1000552001,
      // Provided by VK_KHR_video_encode_intra_refresh
        VK_STRUCTURE_TYPE_VIDEO_ENCODE_INTRA_REFRESH_INFO_KHR = 1000552002,
      // Provided by VK_KHR_video_encode_intra_refresh
        VK_STRUCTURE_TYPE_VIDEO_REFERENCE_INTRA_REFRESH_INFO_KHR = 1000552003,
      // Provided by VK_KHR_video_encode_intra_refresh
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_ENCODE_INTRA_REFRESH_FEATURES_KHR = 1000552004,
      // Provided by VK_KHR_video_encode_quantization_map
        VK_STRUCTURE_TYPE_VIDEO_ENCODE_QUANTIZATION_MAP_CAPABILITIES_KHR = 1000553000,
      // Provided by VK_KHR_video_encode_quantization_map
        VK_STRUCTURE_TYPE_VIDEO_FORMAT_QUANTIZATION_MAP_PROPERTIES_KHR = 1000553001,
      // Provided by VK_KHR_video_encode_quantization_map
        VK_STRUCTURE_TYPE_VIDEO_ENCODE_QUANTIZATION_MAP_INFO_KHR = 1000553002,
      // Provided by VK_KHR_video_encode_quantization_map
        VK_STRUCTURE_TYPE_VIDEO_ENCODE_QUANTIZATION_MAP_SESSION_PARAMETERS_CREATE_INFO_KHR = 1000553005,
      // Provided by VK_KHR_video_encode_quantization_map
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_ENCODE_QUANTIZATION_MAP_FEATURES_KHR = 1000553009,
      // Provided by VK_KHR_video_encode_h264 with VK_KHR_video_encode_quantization_map
        VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_QUANTIZATION_MAP_CAPABILITIES_KHR = 1000553003,
      // Provided by VK_KHR_video_encode_h265 with VK_KHR_video_encode_quantization_map
        VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_QUANTIZATION_MAP_CAPABILITIES_KHR = 1000553004,
      // Provided by VK_KHR_video_encode_h265 with VK_KHR_video_encode_quantization_map
        VK_STRUCTURE_TYPE_VIDEO_FORMAT_H265_QUANTIZATION_MAP_PROPERTIES_KHR = 1000553006,
      // Provided by VK_KHR_video_encode_av1 with VK_KHR_video_encode_quantization_map
        VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_QUANTIZATION_MAP_CAPABILITIES_KHR = 1000553007,
      // Provided by VK_KHR_video_encode_av1 with VK_KHR_video_encode_quantization_map
        VK_STRUCTURE_TYPE_VIDEO_FORMAT_AV1_QUANTIZATION_MAP_PROPERTIES_KHR = 1000553008,
      // Provided by VK_NV_raw_access_chains
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAW_ACCESS_CHAINS_FEATURES_NV = 1000555000,
      // Provided by VK_NV_external_compute_queue
        VK_STRUCTURE_TYPE_EXTERNAL_COMPUTE_QUEUE_DEVICE_CREATE_INFO_NV = 1000556000,
      // Provided by VK_NV_external_compute_queue
        VK_STRUCTURE_TYPE_EXTERNAL_COMPUTE_QUEUE_CREATE_INFO_NV = 1000556001,
      // Provided by VK_NV_external_compute_queue
        VK_STRUCTURE_TYPE_EXTERNAL_COMPUTE_QUEUE_DATA_PARAMS_NV = 1000556002,
      // Provided by VK_NV_external_compute_queue
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_COMPUTE_QUEUE_PROPERTIES_NV = 1000556003,
      // Provided by VK_KHR_shader_relaxed_extended_instruction
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_RELAXED_EXTENDED_INSTRUCTION_FEATURES_KHR = 1000558000,
      // Provided by VK_NV_command_buffer_inheritance
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMMAND_BUFFER_INHERITANCE_FEATURES_NV = 1000559000,
      // Provided by VK_KHR_maintenance7
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_7_FEATURES_KHR = 1000562000,
      // Provided by VK_KHR_maintenance7
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_7_PROPERTIES_KHR = 1000562001,
      // Provided by VK_KHR_maintenance7
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LAYERED_API_PROPERTIES_LIST_KHR = 1000562002,
      // Provided by VK_KHR_maintenance7
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LAYERED_API_PROPERTIES_KHR = 1000562003,
      // Provided by VK_KHR_maintenance7
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LAYERED_API_VULKAN_PROPERTIES_KHR = 1000562004,
      // Provided by VK_NV_shader_atomic_float16_vector
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT16_VECTOR_FEATURES_NV = 1000563000,
      // Provided by VK_EXT_shader_replicated_composites
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_REPLICATED_COMPOSITES_FEATURES_EXT = 1000564000,
      // Provided by VK_ARM_tensor_controls
        VK_STRUCTURE_TYPE_TENSOR_EXPLICIT_TILING_FORMAT_PROPERTIES_ARM = 1000565000,
      // Provided by VK_ARM_tensor_controls
        VK_STRUCTURE_TYPE_TENSOR_ROLLING_BACKING_CREATE_INFO_ARM = 1000565001,
      // Provided by VK_EXT_shader_float8
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT8_FEATURES_EXT = 1000567000,
      // Provided by VK_NV_ray_tracing_validation
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_VALIDATION_FEATURES_NV = 1000568000,
      // Provided by VK_NV_cluster_acceleration_structure
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CLUSTER_ACCELERATION_STRUCTURE_FEATURES_NV = 1000569000,
      // Provided by VK_NV_cluster_acceleration_structure
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CLUSTER_ACCELERATION_STRUCTURE_PROPERTIES_NV = 1000569001,
      // Provided by VK_NV_cluster_acceleration_structure
        VK_STRUCTURE_TYPE_CLUSTER_ACCELERATION_STRUCTURE_CLUSTERS_BOTTOM_LEVEL_INPUT_NV = 1000569002,
      // Provided by VK_NV_cluster_acceleration_structure
        VK_STRUCTURE_TYPE_CLUSTER_ACCELERATION_STRUCTURE_TRIANGLE_CLUSTER_INPUT_NV = 1000569003,
      // Provided by VK_NV_cluster_acceleration_structure
        VK_STRUCTURE_TYPE_CLUSTER_ACCELERATION_STRUCTURE_MOVE_OBJECTS_INPUT_NV = 1000569004,
      // Provided by VK_NV_cluster_acceleration_structure
        VK_STRUCTURE_TYPE_CLUSTER_ACCELERATION_STRUCTURE_INPUT_INFO_NV = 1000569005,
      // Provided by VK_NV_cluster_acceleration_structure
        VK_STRUCTURE_TYPE_CLUSTER_ACCELERATION_STRUCTURE_COMMANDS_INFO_NV = 1000569006,
      // Provided by VK_NV_cluster_acceleration_structure
        VK_STRUCTURE_TYPE_RAY_TRACING_PIPELINE_CLUSTER_ACCELERATION_STRUCTURE_CREATE_INFO_NV = 1000569007,
      // Provided by VK_NV_partitioned_acceleration_structure
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PARTITIONED_ACCELERATION_STRUCTURE_FEATURES_NV = 1000570000,
      // Provided by VK_NV_partitioned_acceleration_structure
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PARTITIONED_ACCELERATION_STRUCTURE_PROPERTIES_NV = 1000570001,
      // Provided by VK_NV_partitioned_acceleration_structure
        VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_PARTITIONED_ACCELERATION_STRUCTURE_NV = 1000570002,
      // Provided by VK_NV_partitioned_acceleration_structure
        VK_STRUCTURE_TYPE_PARTITIONED_ACCELERATION_STRUCTURE_INSTANCES_INPUT_NV = 1000570003,
      // Provided by VK_NV_partitioned_acceleration_structure
        VK_STRUCTURE_TYPE_BUILD_PARTITIONED_ACCELERATION_STRUCTURE_INFO_NV = 1000570004,
      // Provided by VK_NV_partitioned_acceleration_structure
        VK_STRUCTURE_TYPE_PARTITIONED_ACCELERATION_STRUCTURE_FLAGS_NV = 1000570005,
      // Provided by VK_EXT_device_generated_commands
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_FEATURES_EXT = 1000572000,
      // Provided by VK_EXT_device_generated_commands
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_PROPERTIES_EXT = 1000572001,
      // Provided by VK_EXT_device_generated_commands
        VK_STRUCTURE_TYPE_GENERATED_COMMANDS_MEMORY_REQUIREMENTS_INFO_EXT = 1000572002,
      // Provided by VK_EXT_device_generated_commands
        VK_STRUCTURE_TYPE_INDIRECT_EXECUTION_SET_CREATE_INFO_EXT = 1000572003,
      // Provided by VK_EXT_device_generated_commands
        VK_STRUCTURE_TYPE_GENERATED_COMMANDS_INFO_EXT = 1000572004,
      // Provided by VK_EXT_device_generated_commands
        VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_EXT = 1000572006,
      // Provided by VK_EXT_device_generated_commands
        VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_TOKEN_EXT = 1000572007,
      // Provided by VK_EXT_device_generated_commands
        VK_STRUCTURE_TYPE_WRITE_INDIRECT_EXECUTION_SET_PIPELINE_EXT = 1000572008,
      // Provided by VK_EXT_device_generated_commands
        VK_STRUCTURE_TYPE_WRITE_INDIRECT_EXECUTION_SET_SHADER_EXT = 1000572009,
      // Provided by VK_EXT_device_generated_commands
        VK_STRUCTURE_TYPE_INDIRECT_EXECUTION_SET_PIPELINE_INFO_EXT = 1000572010,
      // Provided by VK_EXT_device_generated_commands
        VK_STRUCTURE_TYPE_INDIRECT_EXECUTION_SET_SHADER_INFO_EXT = 1000572011,
      // Provided by VK_EXT_device_generated_commands
        VK_STRUCTURE_TYPE_INDIRECT_EXECUTION_SET_SHADER_LAYOUT_INFO_EXT = 1000572012,
      // Provided by VK_EXT_device_generated_commands
        VK_STRUCTURE_TYPE_GENERATED_COMMANDS_PIPELINE_INFO_EXT = 1000572013,
      // Provided by VK_EXT_device_generated_commands
        VK_STRUCTURE_TYPE_GENERATED_COMMANDS_SHADER_INFO_EXT = 1000572014,
      // Provided by VK_KHR_device_fault
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FAULT_FEATURES_KHR = 1000573000,
      // Provided by VK_KHR_device_fault
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FAULT_PROPERTIES_KHR = 1000573001,
      // Provided by VK_KHR_device_fault
        VK_STRUCTURE_TYPE_DEVICE_FAULT_INFO_KHR = 1000573002,
      // Provided by VK_KHR_device_fault
        VK_STRUCTURE_TYPE_DEVICE_FAULT_DEBUG_INFO_KHR = 1000573003,
      // Provided by VK_KHR_maintenance8
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_8_FEATURES_KHR = 1000574000,
      // Provided by VK_KHR_maintenance8
        VK_STRUCTURE_TYPE_MEMORY_BARRIER_ACCESS_FLAGS_3_KHR = 1000574002,
      // Provided by VK_MESA_image_alignment_control
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_ALIGNMENT_CONTROL_FEATURES_MESA = 1000575000,
      // Provided by VK_MESA_image_alignment_control
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_ALIGNMENT_CONTROL_PROPERTIES_MESA = 1000575001,
      // Provided by VK_MESA_image_alignment_control
        VK_STRUCTURE_TYPE_IMAGE_ALIGNMENT_CONTROL_CREATE_INFO_MESA = 1000575002,
      // Provided by VK_KHR_shader_fma
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FMA_FEATURES_KHR = 1000579000,
      // Provided by VK_NV_push_constant_bank
        VK_STRUCTURE_TYPE_PUSH_CONSTANT_BANK_INFO_NV = 1000580000,
      // Provided by VK_NV_push_constant_bank
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_CONSTANT_BANK_FEATURES_NV = 1000580001,
      // Provided by VK_NV_push_constant_bank
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_CONSTANT_BANK_PROPERTIES_NV = 1000580002,
      // Provided by VK_EXT_ray_tracing_invocation_reorder
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_INVOCATION_REORDER_FEATURES_EXT = 1000581000,
      // Provided by VK_EXT_ray_tracing_invocation_reorder
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_INVOCATION_REORDER_PROPERTIES_EXT = 1000581001,
      // Provided by VK_EXT_depth_clamp_control
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLAMP_CONTROL_FEATURES_EXT = 1000582000,
      // Provided by VK_EXT_depth_clamp_control
        VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_DEPTH_CLAMP_CONTROL_CREATE_INFO_EXT = 1000582001,
      // Provided by VK_KHR_maintenance9
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_9_FEATURES_KHR = 1000584000,
      // Provided by VK_KHR_maintenance9
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_9_PROPERTIES_KHR = 1000584001,
      // Provided by VK_KHR_maintenance9
        VK_STRUCTURE_TYPE_QUEUE_FAMILY_OWNERSHIP_TRANSFER_PROPERTIES_KHR = 1000584002,
      // Provided by VK_KHR_video_maintenance2
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_MAINTENANCE_2_FEATURES_KHR = 1000586000,
      // Provided by VK_KHR_video_decode_h264 with VK_KHR_video_maintenance2
        VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_INLINE_SESSION_PARAMETERS_INFO_KHR = 1000586001,
      // Provided by VK_KHR_video_decode_h265 with VK_KHR_video_maintenance2
        VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_INLINE_SESSION_PARAMETERS_INFO_KHR = 1000586002,
      // Provided by VK_KHR_video_decode_av1 with VK_KHR_video_maintenance2
        VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_INLINE_SESSION_PARAMETERS_INFO_KHR = 1000586003,
      // Provided by VK_OHOS_surface
        VK_STRUCTURE_TYPE_SURFACE_CREATE_INFO_OHOS = 1000685000,
      // Provided by VK_HUAWEI_hdr_vivid
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HDR_VIVID_FEATURES_HUAWEI = 1000590000,
      // Provided by VK_HUAWEI_hdr_vivid
        VK_STRUCTURE_TYPE_HDR_VIVID_DYNAMIC_METADATA_HUAWEI = 1000590001,
      // Provided by VK_NV_cooperative_matrix2
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_2_FEATURES_NV = 1000593000,
      // Provided by VK_NV_cooperative_matrix2
        VK_STRUCTURE_TYPE_COOPERATIVE_MATRIX_FLEXIBLE_DIMENSIONS_PROPERTIES_NV = 1000593001,
      // Provided by VK_NV_cooperative_matrix2
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_2_PROPERTIES_NV = 1000593002,
      // Provided by VK_ARM_pipeline_opacity_micromap
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_OPACITY_MICROMAP_FEATURES_ARM = 1000596000,
      // Provided by VK_KHR_video_encode_feedback2
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_ENCODE_FEEDBACK_2_FEATURES_KHR = 1000598000,
      // Provided by VK_KHR_video_encode_feedback2
        VK_STRUCTURE_TYPE_VIDEO_ENCODE_FEEDBACK_2_CAPABILITIES_KHR = 1000598001,
      // Provided by VK_KHR_video_encode_feedback2
        VK_STRUCTURE_TYPE_QUERY_POOL_VIDEO_ENCODE_PER_PARTITION_FEEDBACK_CREATE_INFO_KHR = 1000598002,
      // Provided by VK_EXT_external_memory_metal
        VK_STRUCTURE_TYPE_IMPORT_MEMORY_METAL_HANDLE_INFO_EXT = 1000602000,
      // Provided by VK_EXT_external_memory_metal
        VK_STRUCTURE_TYPE_MEMORY_METAL_HANDLE_PROPERTIES_EXT = 1000602001,
      // Provided by VK_EXT_external_memory_metal
        VK_STRUCTURE_TYPE_MEMORY_GET_METAL_HANDLE_INFO_EXT = 1000602002,
      // Provided by VK_KHR_depth_clamp_zero_one
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLAMP_ZERO_ONE_FEATURES_KHR = 1000421000,
      // Provided by VK_ARM_performance_counters_by_region
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PERFORMANCE_COUNTERS_BY_REGION_FEATURES_ARM = 1000605000,
      // Provided by VK_ARM_performance_counters_by_region
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PERFORMANCE_COUNTERS_BY_REGION_PROPERTIES_ARM = 1000605001,
      // Provided by VK_ARM_performance_counters_by_region
        VK_STRUCTURE_TYPE_PERFORMANCE_COUNTER_ARM = 1000605002,
      // Provided by VK_ARM_performance_counters_by_region
        VK_STRUCTURE_TYPE_PERFORMANCE_COUNTER_DESCRIPTION_ARM = 1000605003,
      // Provided by VK_ARM_performance_counters_by_region
        VK_STRUCTURE_TYPE_RENDER_PASS_PERFORMANCE_COUNTERS_BY_REGION_BEGIN_INFO_ARM = 1000605004,
      // Provided by VK_ARM_shader_instrumentation
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INSTRUMENTATION_FEATURES_ARM = 1000607000,
      // Provided by VK_ARM_shader_instrumentation
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INSTRUMENTATION_PROPERTIES_ARM = 1000607001,
      // Provided by VK_ARM_shader_instrumentation
        VK_STRUCTURE_TYPE_SHADER_INSTRUMENTATION_CREATE_INFO_ARM = 1000607002,
      // Provided by VK_ARM_shader_instrumentation
        VK_STRUCTURE_TYPE_SHADER_INSTRUMENTATION_METRIC_DESCRIPTION_ARM = 1000607003,
      // Provided by VK_EXT_vertex_attribute_robustness
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_ROBUSTNESS_FEATURES_EXT = 1000608000,
      // Provided by VK_ARM_format_pack
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FORMAT_PACK_FEATURES_ARM = 1000609000,
      // Provided by VK_VALVE_fragment_density_map_layered
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_LAYERED_FEATURES_VALVE = 1000611000,
      // Provided by VK_VALVE_fragment_density_map_layered
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_LAYERED_PROPERTIES_VALVE = 1000611001,
      // Provided by VK_VALVE_fragment_density_map_layered
        VK_STRUCTURE_TYPE_PIPELINE_FRAGMENT_DENSITY_MAP_LAYERED_CREATE_INFO_VALVE = 1000611002,
      // Provided by VK_KHR_robustness2
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_FEATURES_KHR = 1000286000,
      // Provided by VK_KHR_robustness2
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_PROPERTIES_KHR = 1000286001,
      // Provided by VK_NV_present_metering
        VK_STRUCTURE_TYPE_SET_PRESENT_CONFIG_NV = 1000613000,
      // Provided by VK_NV_present_metering
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_METERING_FEATURES_NV = 1000613001,
      // Provided by VK_EXT_multisampled_render_to_swapchain
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTISAMPLED_RENDER_TO_SWAPCHAIN_FEATURES_EXT = 1000616000,
      // Provided by VK_EXT_multisampled_render_to_swapchain
        VK_STRUCTURE_TYPE_SWAPCHAIN_FLAGS_SURFACE_CAPABILITIES_EXT = 1000616001,
      // Provided by VK_EXT_fragment_density_map_offset
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_OFFSET_FEATURES_EXT = 1000425000,
      // Provided by VK_EXT_fragment_density_map_offset
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_OFFSET_PROPERTIES_EXT = 1000425001,
      // Provided by VK_EXT_fragment_density_map_offset
        VK_STRUCTURE_TYPE_RENDER_PASS_FRAGMENT_DENSITY_MAP_OFFSET_END_INFO_EXT = 1000425002,
      // Provided by VK_EXT_zero_initialize_device_memory
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ZERO_INITIALIZE_DEVICE_MEMORY_FEATURES_EXT = 1000620000,
      // Provided by VK_KHR_present_mode_fifo_latest_ready
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_MODE_FIFO_LATEST_READY_FEATURES_KHR = 1000361000,
      // Provided by VK_KHR_opacity_micromap
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_OPACITY_MICROMAP_FEATURES_KHR = 1000623000,
      // Provided by VK_KHR_opacity_micromap
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_OPACITY_MICROMAP_PROPERTIES_KHR = 1000623001,
      // Provided by VK_KHR_opacity_micromap
        VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_MICROMAP_DATA_KHR = 1000623002,
      // Provided by VK_KHR_opacity_micromap
        VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_TRIANGLES_OPACITY_MICROMAP_KHR = 1000623003,
      // Provided by VK_EXT_shader_64bit_indexing
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_64_BIT_INDEXING_FEATURES_EXT = 1000627000,
      // Provided by VK_EXT_custom_resolve
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_RESOLVE_FEATURES_EXT = 1000628000,
      // Provided by VK_EXT_custom_resolve with VK_KHR_dynamic_rendering or VK_VERSION_1_3
        VK_STRUCTURE_TYPE_BEGIN_CUSTOM_RESOLVE_INFO_EXT = 1000628001,
      // Provided by VK_EXT_custom_resolve with VK_KHR_dynamic_rendering or VK_VERSION_1_3
        VK_STRUCTURE_TYPE_CUSTOM_RESOLVE_CREATE_INFO_EXT = 1000628002,
      // Provided by VK_QCOM_data_graph_model
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DATA_GRAPH_MODEL_FEATURES_QCOM = 1000629000,
      // Provided by VK_QCOM_data_graph_model
        VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_BUILTIN_MODEL_CREATE_INFO_QCOM = 1000629001,
      // Provided by VK_KHR_maintenance10
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_10_FEATURES_KHR = 1000630000,
      // Provided by VK_KHR_maintenance10
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_10_PROPERTIES_KHR = 1000630001,
      // Provided by VK_KHR_maintenance10
        VK_STRUCTURE_TYPE_RENDERING_ATTACHMENT_FLAGS_INFO_KHR = 1000630002,
      // Provided by VK_KHR_maintenance10
        VK_STRUCTURE_TYPE_RENDERING_END_INFO_KHR = 1000619003,
      // Provided by VK_KHR_maintenance10
        VK_STRUCTURE_TYPE_RESOLVE_IMAGE_MODE_INFO_KHR = 1000630004,
      // Provided by VK_ARM_data_graph_optical_flow
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DATA_GRAPH_OPTICAL_FLOW_FEATURES_ARM = 1000631000,
      // Provided by VK_ARM_data_graph_optical_flow
        VK_STRUCTURE_TYPE_QUEUE_FAMILY_DATA_GRAPH_OPTICAL_FLOW_PROPERTIES_ARM = 1000631001,
      // Provided by VK_ARM_data_graph_optical_flow
        VK_STRUCTURE_TYPE_DATA_GRAPH_OPTICAL_FLOW_IMAGE_FORMAT_INFO_ARM = 1000631003,
      // Provided by VK_ARM_data_graph_optical_flow
        VK_STRUCTURE_TYPE_DATA_GRAPH_OPTICAL_FLOW_IMAGE_FORMAT_PROPERTIES_ARM = 1000631004,
      // Provided by VK_ARM_data_graph_optical_flow
        VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_OPTICAL_FLOW_DISPATCH_INFO_ARM = 1000631005,
      // Provided by VK_ARM_data_graph_optical_flow
        VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_OPTICAL_FLOW_CREATE_INFO_ARM = 1000631002,
      // Provided by VK_ARM_data_graph_optical_flow
        VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_RESOURCE_INFO_IMAGE_LAYOUT_ARM = 1000631006,
      // Provided by VK_ARM_data_graph_optical_flow
        VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_SINGLE_NODE_CREATE_INFO_ARM = 1000631007,
      // Provided by VK_ARM_data_graph_optical_flow
        VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_SINGLE_NODE_CONNECTION_ARM = 1000631008,
      // Provided by VK_EXT_shader_long_vector
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_LONG_VECTOR_FEATURES_EXT = 1000635000,
      // Provided by VK_EXT_shader_long_vector
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_LONG_VECTOR_PROPERTIES_EXT = 1000635001,
      // Provided by VK_SEC_pipeline_cache_incremental_mode
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_CACHE_INCREMENTAL_MODE_FEATURES_SEC = 1000637000,
      // Provided by VK_EXT_shader_uniform_buffer_unsized_array
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_UNIFORM_BUFFER_UNSIZED_ARRAY_FEATURES_EXT = 1000642000,
      // Provided by VK_NV_compute_occupancy_priority
        VK_STRUCTURE_TYPE_COMPUTE_OCCUPANCY_PRIORITY_PARAMETERS_NV = 1000645000,
      // Provided by VK_NV_compute_occupancy_priority
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_OCCUPANCY_PRIORITY_FEATURES_NV = 1000645001,
      // Provided by VK_KHR_maintenance11
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_11_FEATURES_KHR = 1000657000,
      // Provided by VK_KHR_maintenance11
        VK_STRUCTURE_TYPE_QUEUE_FAMILY_OPTIMAL_IMAGE_TRANSFER_GRANULARITY_PROPERTIES_KHR = 1000657001,
      // Provided by VK_EXT_shader_subgroup_partitioned
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_PARTITIONED_FEATURES_EXT = 1000662000,
      // Provided by VK_SEC_ubm_surface
        VK_STRUCTURE_TYPE_UBM_SURFACE_CREATE_INFO_SEC = 1000664000,
      // Provided by VK_KHR_extended_flags
        VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_4_KHR = 1000668000,
      // Provided by VK_KHR_extended_flags
        VK_STRUCTURE_TYPE_IMAGE_CREATE_FLAGS_2_CREATE_INFO_KHR = 1000668001,
      // Provided by VK_KHR_extended_flags
        VK_STRUCTURE_TYPE_IMAGE_USAGE_FLAGS_2_CREATE_INFO_KHR = 1000668002,
      // Provided by VK_KHR_extended_flags
        VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_2_CREATE_INFO_KHR = 1000668003,
      // Provided by VK_KHR_extended_flags
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_FLAGS_FEATURES_KHR = 1000668004,
      // Provided by VK_KHR_extended_flags with VK_VERSION_1_2 or VK_EXT_separate_stencil_usage
        VK_STRUCTURE_TYPE_IMAGE_STENCIL_USAGE_2_CREATE_INFO_KHR = 1000668005,
      // Provided by VK_KHR_extended_flags with VK_KHR_shared_presentable_image
        VK_STRUCTURE_TYPE_SHARED_PRESENT_SURFACE_CAPABILITIES_2_KHR = 1000668006,
      // Provided by VK_EXT_shader_ocp_microscaling_types
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_OCP_MICROSCALING_TYPES_FEATURES_EXT = 1000672000,
      // Provided by VK_VALVE_shader_mixed_float_dot_product
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_MIXED_FLOAT_DOT_PRODUCT_FEATURES_VALVE = 1000673000,
      // Provided by VK_SEC_throttle_hint
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_THROTTLE_HINT_FEATURES_SEC = 1000674000,
      // Provided by VK_SEC_throttle_hint
        VK_STRUCTURE_TYPE_THROTTLE_HINT_SUBMIT_INFO_SEC = 1000674001,
      // Provided by VK_ARM_data_graph_neural_accelerator_statistics
        VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_NEURAL_STATISTICS_CREATE_INFO_ARM = 1000676000,
      // Provided by VK_ARM_data_graph_neural_accelerator_statistics
        VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_SESSION_NEURAL_STATISTICS_CREATE_INFO_ARM = 1000676001,
      // Provided by VK_ARM_data_graph_neural_accelerator_statistics
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DATA_GRAPH_NEURAL_ACCELERATOR_STATISTICS_FEATURES_ARM = 1000676002,
      // Provided by VK_EXT_primitive_restart_index
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIMITIVE_RESTART_INDEX_FEATURES_EXT = 1000678000,
      // Provided by VK_NV_cooperative_matrix_decode_vector
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_DECODE_VECTOR_FEATURES_NV = 1000689000,
      // Provided by VK_VERSION_1_1
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES,
      // Provided by VK_VERSION_1_1
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETER_FEATURES = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES,
      // Provided by VK_EXT_debug_report
      // VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT is a legacy alias
        VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT,
      // Provided by VK_KHR_dynamic_rendering
        VK_STRUCTURE_TYPE_RENDERING_INFO_KHR = VK_STRUCTURE_TYPE_RENDERING_INFO,
      // Provided by VK_KHR_dynamic_rendering
        VK_STRUCTURE_TYPE_RENDERING_ATTACHMENT_INFO_KHR = VK_STRUCTURE_TYPE_RENDERING_ATTACHMENT_INFO,
      // Provided by VK_KHR_dynamic_rendering
        VK_STRUCTURE_TYPE_PIPELINE_RENDERING_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_PIPELINE_RENDERING_CREATE_INFO,
      // Provided by VK_KHR_dynamic_rendering
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_FEATURES,
      // Provided by VK_KHR_dynamic_rendering
        VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_RENDERING_INFO_KHR = VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_RENDERING_INFO,
      // Provided by VK_KHR_multiview
        VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO,
      // Provided by VK_KHR_multiview
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES,
      // Provided by VK_KHR_multiview
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES,
      // Provided by VK_KHR_get_physical_device_properties2
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2,
      // Provided by VK_KHR_get_physical_device_properties2
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2,
      // Provided by VK_KHR_get_physical_device_properties2
        VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2_KHR = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2,
      // Provided by VK_KHR_get_physical_device_properties2
        VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2_KHR = VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2,
      // Provided by VK_KHR_get_physical_device_properties2
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2,
      // Provided by VK_KHR_get_physical_device_properties2
        VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2_KHR = VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2,
      // Provided by VK_KHR_get_physical_device_properties2
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2,
      // Provided by VK_KHR_get_physical_device_properties2
        VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2_KHR = VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2,
      // Provided by VK_KHR_get_physical_device_properties2
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2,
      // Provided by VK_KHR_device_group
        VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO_KHR = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO,
      // Provided by VK_KHR_device_group
        VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO_KHR = VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO,
      // Provided by VK_KHR_device_group
        VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO_KHR = VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO,
      // Provided by VK_KHR_device_group
        VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO_KHR = VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO,
      // Provided by VK_KHR_device_group
        VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO_KHR = VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO,
      // Provided by VK_KHR_bind_memory2 with VK_KHR_device_group
        VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO_KHR = VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO,
      // Provided by VK_KHR_bind_memory2 with VK_KHR_device_group
        VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO_KHR = VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO,
      // Provided by VK_EXT_texture_compression_astc_hdr
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_HDR_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_HDR_FEATURES,
      // Provided by VK_EXT_pipeline_robustness
        VK_STRUCTURE_TYPE_PIPELINE_ROBUSTNESS_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_PIPELINE_ROBUSTNESS_CREATE_INFO,
      // Provided by VK_EXT_pipeline_robustness
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_FEATURES,
      // Provided by VK_EXT_pipeline_robustness
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_PROPERTIES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_PROPERTIES,
      // Provided by VK_KHR_device_group_creation
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES,
      // Provided by VK_KHR_device_group_creation
        VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO,
      // Provided by VK_KHR_external_memory_capabilities
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO,
      // Provided by VK_KHR_external_memory_capabilities
        VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES_KHR = VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES,
      // Provided by VK_KHR_external_memory_capabilities
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO,
      // Provided by VK_KHR_external_memory_capabilities
        VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES_KHR = VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES,
      // Provided by VK_KHR_external_fence_capabilities, VK_KHR_external_memory_capabilities, VK_KHR_external_semaphore_capabilities
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES,
      // Provided by VK_KHR_external_memory
        VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO,
      // Provided by VK_KHR_external_memory
        VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO,
      // Provided by VK_KHR_external_memory
        VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_KHR = VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO,
      // Provided by VK_KHR_external_semaphore_capabilities
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO,
      // Provided by VK_KHR_external_semaphore_capabilities
        VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES_KHR = VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES,
      // Provided by VK_KHR_external_semaphore
        VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO,
      // Provided by VK_KHR_push_descriptor
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES,
      // Provided by VK_KHR_shader_float16_int8
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES,
      // Provided by VK_KHR_shader_float16_int8
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT16_INT8_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES,
      // Provided by VK_KHR_16bit_storage
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES,
      // Provided by VK_KHR_descriptor_update_template
        VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO,
      // Provided by VK_EXT_display_surface_counter
      // VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES2_EXT is a legacy alias
        VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES2_EXT = VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_EXT,
      // Provided by VK_KHR_imageless_framebuffer
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGELESS_FRAMEBUFFER_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGELESS_FRAMEBUFFER_FEATURES,
      // Provided by VK_KHR_imageless_framebuffer
        VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENTS_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENTS_CREATE_INFO,
      // Provided by VK_KHR_imageless_framebuffer
        VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENT_IMAGE_INFO_KHR = VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENT_IMAGE_INFO,
      // Provided by VK_KHR_imageless_framebuffer
        VK_STRUCTURE_TYPE_RENDER_PASS_ATTACHMENT_BEGIN_INFO_KHR = VK_STRUCTURE_TYPE_RENDER_PASS_ATTACHMENT_BEGIN_INFO,
      // Provided by VK_KHR_create_renderpass2
        VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_2_KHR = VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_2,
      // Provided by VK_KHR_create_renderpass2
        VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2_KHR = VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2,
      // Provided by VK_KHR_create_renderpass2
        VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_2_KHR = VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_2,
      // Provided by VK_KHR_create_renderpass2
        VK_STRUCTURE_TYPE_SUBPASS_DEPENDENCY_2_KHR = VK_STRUCTURE_TYPE_SUBPASS_DEPENDENCY_2,
      // Provided by VK_KHR_create_renderpass2
        VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO_2_KHR = VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO_2,
      // Provided by VK_KHR_create_renderpass2
        VK_STRUCTURE_TYPE_SUBPASS_BEGIN_INFO_KHR = VK_STRUCTURE_TYPE_SUBPASS_BEGIN_INFO,
      // Provided by VK_KHR_create_renderpass2
        VK_STRUCTURE_TYPE_SUBPASS_END_INFO_KHR = VK_STRUCTURE_TYPE_SUBPASS_END_INFO,
      // Provided by VK_KHR_external_fence_capabilities
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO,
      // Provided by VK_KHR_external_fence_capabilities
        VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES_KHR = VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES,
      // Provided by VK_KHR_external_fence
        VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO,
      // Provided by VK_KHR_maintenance2
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES,
      // Provided by VK_KHR_maintenance2
        VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO,
      // Provided by VK_KHR_maintenance2
        VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO,
      // Provided by VK_KHR_maintenance2
        VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO,
      // Provided by VK_KHR_variable_pointers
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES,
      // Provided by VK_KHR_variable_pointers
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES_KHR,
      // Provided by VK_KHR_dedicated_allocation
        VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS_KHR = VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS,
      // Provided by VK_KHR_dedicated_allocation
        VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO_KHR = VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO,
      // Provided by VK_EXT_sampler_filter_minmax
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES,
      // Provided by VK_EXT_sampler_filter_minmax
        VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO,
      // Provided by VK_EXT_inline_uniform_block
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES,
      // Provided by VK_EXT_inline_uniform_block
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_PROPERTIES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_PROPERTIES,
      // Provided by VK_EXT_inline_uniform_block
        VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_INLINE_UNIFORM_BLOCK_EXT = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_INLINE_UNIFORM_BLOCK,
      // Provided by VK_EXT_inline_uniform_block
        VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_INLINE_UNIFORM_BLOCK_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_INLINE_UNIFORM_BLOCK_CREATE_INFO,
      // Provided by VK_KHR_get_memory_requirements2
        VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2_KHR = VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2,
      // Provided by VK_KHR_get_memory_requirements2
        VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2_KHR = VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2,
      // Provided by VK_KHR_get_memory_requirements2
        VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2_KHR = VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2,
      // Provided by VK_KHR_get_memory_requirements2
        VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2_KHR = VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2,
      // Provided by VK_KHR_get_memory_requirements2
        VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2_KHR = VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2,
      // Provided by VK_KHR_image_format_list
        VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO,
      // Provided by VK_NV_framebuffer_mixed_samples with VK_VERSION_1_3 or VK_KHR_dynamic_rendering
        VK_STRUCTURE_TYPE_ATTACHMENT_SAMPLE_COUNT_INFO_NV = VK_STRUCTURE_TYPE_ATTACHMENT_SAMPLE_COUNT_INFO_AMD,
      // Provided by VK_KHR_sampler_ycbcr_conversion
        VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFO,
      // Provided by VK_KHR_sampler_ycbcr_conversion
        VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO_KHR = VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO,
      // Provided by VK_KHR_sampler_ycbcr_conversion
        VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO_KHR = VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO,
      // Provided by VK_KHR_sampler_ycbcr_conversion
        VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO_KHR = VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO,
      // Provided by VK_KHR_sampler_ycbcr_conversion
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES,
      // Provided by VK_KHR_sampler_ycbcr_conversion
        VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES_KHR = VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES,
      // Provided by VK_KHR_bind_memory2
        VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO_KHR = VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO,
      // Provided by VK_KHR_bind_memory2
        VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO_KHR = VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO,
      // Provided by VK_EXT_descriptor_indexing
        VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO,
      // Provided by VK_EXT_descriptor_indexing
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES,
      // Provided by VK_EXT_descriptor_indexing
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES,
      // Provided by VK_EXT_descriptor_indexing
        VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO_EXT = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO,
      // Provided by VK_EXT_descriptor_indexing
        VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT_EXT = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT,
      // Provided by VK_KHR_maintenance3
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES,
      // Provided by VK_KHR_maintenance3
        VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_SUPPORT_KHR = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_SUPPORT,
      // Provided by VK_EXT_global_priority
        VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO,
      // Provided by VK_KHR_shader_subgroup_extended_types
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES,
      // Provided by VK_KHR_8bit_storage
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES,
      // Provided by VK_KHR_shader_atomic_int64
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES,
      // Provided by VK_EXT_calibrated_timestamps
        VK_STRUCTURE_TYPE_CALIBRATED_TIMESTAMP_INFO_EXT = VK_STRUCTURE_TYPE_CALIBRATED_TIMESTAMP_INFO_KHR,
      // Provided by VK_KHR_global_priority
        VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO,
      // Provided by VK_KHR_global_priority
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES,
      // Provided by VK_KHR_global_priority
        VK_STRUCTURE_TYPE_QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES_KHR = VK_STRUCTURE_TYPE_QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES,
      // Provided by VK_EXT_vertex_attribute_divisor
        VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO,
      // Provided by VK_EXT_vertex_attribute_divisor
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES,
      // Provided by VK_EXT_pipeline_creation_feedback
        VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO,
      // Provided by VK_KHR_driver_properties
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES,
      // Provided by VK_KHR_shader_float_controls
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES,
      // Provided by VK_KHR_depth_stencil_resolve
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES,
      // Provided by VK_KHR_depth_stencil_resolve
        VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE_KHR = VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE,
      // Provided by VK_NV_compute_shader_derivatives
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_NV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_KHR,
      // Provided by VK_NV_fragment_shader_barycentric
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_NV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_KHR,
      // Provided by VK_KHR_timeline_semaphore
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES,
      // Provided by VK_KHR_timeline_semaphore
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_PROPERTIES,
      // Provided by VK_KHR_timeline_semaphore
        VK_STRUCTURE_TYPE_SEMAPHORE_TYPE_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_SEMAPHORE_TYPE_CREATE_INFO,
      // Provided by VK_KHR_timeline_semaphore
        VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO_KHR = VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO,
      // Provided by VK_KHR_timeline_semaphore
        VK_STRUCTURE_TYPE_SEMAPHORE_WAIT_INFO_KHR = VK_STRUCTURE_TYPE_SEMAPHORE_WAIT_INFO,
      // Provided by VK_KHR_timeline_semaphore
        VK_STRUCTURE_TYPE_SEMAPHORE_SIGNAL_INFO_KHR = VK_STRUCTURE_TYPE_SEMAPHORE_SIGNAL_INFO,
      // Provided by VK_INTEL_performance_query
      // VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO_INTEL is a legacy alias
        VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO_INTEL = VK_STRUCTURE_TYPE_QUERY_POOL_PERFORMANCE_QUERY_CREATE_INFO_INTEL,
      // Provided by VK_KHR_vulkan_memory_model
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES,
      // Provided by VK_KHR_shader_terminate_invocation
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TERMINATE_INVOCATION_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TERMINATE_INVOCATION_FEATURES,
      // Provided by VK_EXT_scalar_block_layout
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES,
      // Provided by VK_EXT_subgroup_size_control
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_PROPERTIES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_PROPERTIES,
      // Provided by VK_EXT_subgroup_size_control
        VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_REQUIRED_SUBGROUP_SIZE_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_REQUIRED_SUBGROUP_SIZE_CREATE_INFO,
      // Provided by VK_EXT_subgroup_size_control
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES,
      // Provided by VK_KHR_dynamic_rendering_local_read
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_LOCAL_READ_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_LOCAL_READ_FEATURES,
      // Provided by VK_KHR_dynamic_rendering_local_read
        VK_STRUCTURE_TYPE_RENDERING_ATTACHMENT_LOCATION_INFO_KHR = VK_STRUCTURE_TYPE_RENDERING_ATTACHMENT_LOCATION_INFO,
      // Provided by VK_KHR_dynamic_rendering_local_read
        VK_STRUCTURE_TYPE_RENDERING_INPUT_ATTACHMENT_INDEX_INFO_KHR = VK_STRUCTURE_TYPE_RENDERING_INPUT_ATTACHMENT_INDEX_INFO,
      // Provided by VK_KHR_separate_depth_stencil_layouts
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES,
      // Provided by VK_KHR_separate_depth_stencil_layouts
        VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_STENCIL_LAYOUT_KHR = VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_STENCIL_LAYOUT,
      // Provided by VK_KHR_separate_depth_stencil_layouts
        VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_STENCIL_LAYOUT_KHR = VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_STENCIL_LAYOUT,
      // Provided by VK_EXT_buffer_device_address
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_ADDRESS_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT,
      // Provided by VK_EXT_buffer_device_address
        VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO_EXT = VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO,
      // Provided by VK_EXT_tooling_info
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TOOL_PROPERTIES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TOOL_PROPERTIES,
      // Provided by VK_EXT_separate_stencil_usage
        VK_STRUCTURE_TYPE_IMAGE_STENCIL_USAGE_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_IMAGE_STENCIL_USAGE_CREATE_INFO,
      // Provided by VK_KHR_uniform_buffer_standard_layout
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES,
      // Provided by VK_KHR_buffer_device_address
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES,
      // Provided by VK_KHR_buffer_device_address
        VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO_KHR = VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO,
      // Provided by VK_KHR_buffer_device_address
        VK_STRUCTURE_TYPE_BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO,
      // Provided by VK_KHR_buffer_device_address
        VK_STRUCTURE_TYPE_MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO_KHR = VK_STRUCTURE_TYPE_MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO,
      // Provided by VK_KHR_buffer_device_address
        VK_STRUCTURE_TYPE_DEVICE_MEMORY_OPAQUE_CAPTURE_ADDRESS_INFO_KHR = VK_STRUCTURE_TYPE_DEVICE_MEMORY_OPAQUE_CAPTURE_ADDRESS_INFO,
      // Provided by VK_EXT_line_rasterization
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES,
      // Provided by VK_EXT_line_rasterization
        VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO,
      // Provided by VK_EXT_line_rasterization
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES,
      // Provided by VK_EXT_host_query_reset
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES,
      // Provided by VK_EXT_index_type_uint8
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES,
      // Provided by VK_EXT_host_image_copy
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_FEATURES,
      // Provided by VK_EXT_host_image_copy
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_PROPERTIES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_PROPERTIES,
      // Provided by VK_EXT_host_image_copy
        VK_STRUCTURE_TYPE_MEMORY_TO_IMAGE_COPY_EXT = VK_STRUCTURE_TYPE_MEMORY_TO_IMAGE_COPY,
      // Provided by VK_EXT_host_image_copy
        VK_STRUCTURE_TYPE_IMAGE_TO_MEMORY_COPY_EXT = VK_STRUCTURE_TYPE_IMAGE_TO_MEMORY_COPY,
      // Provided by VK_EXT_host_image_copy
        VK_STRUCTURE_TYPE_COPY_IMAGE_TO_MEMORY_INFO_EXT = VK_STRUCTURE_TYPE_COPY_IMAGE_TO_MEMORY_INFO,
      // Provided by VK_EXT_host_image_copy
        VK_STRUCTURE_TYPE_COPY_MEMORY_TO_IMAGE_INFO_EXT = VK_STRUCTURE_TYPE_COPY_MEMORY_TO_IMAGE_INFO,
      // Provided by VK_EXT_host_image_copy
        VK_STRUCTURE_TYPE_HOST_IMAGE_LAYOUT_TRANSITION_INFO_EXT = VK_STRUCTURE_TYPE_HOST_IMAGE_LAYOUT_TRANSITION_INFO,
      // Provided by VK_EXT_host_image_copy
        VK_STRUCTURE_TYPE_COPY_IMAGE_TO_IMAGE_INFO_EXT = VK_STRUCTURE_TYPE_COPY_IMAGE_TO_IMAGE_INFO,
      // Provided by VK_EXT_host_image_copy
        VK_STRUCTURE_TYPE_SUBRESOURCE_HOST_MEMCPY_SIZE_EXT = VK_STRUCTURE_TYPE_SUBRESOURCE_HOST_MEMCPY_SIZE,
      // Provided by VK_EXT_host_image_copy
        VK_STRUCTURE_TYPE_HOST_IMAGE_COPY_DEVICE_PERFORMANCE_QUERY_EXT = VK_STRUCTURE_TYPE_HOST_IMAGE_COPY_DEVICE_PERFORMANCE_QUERY,
      // Provided by VK_KHR_map_memory2
        VK_STRUCTURE_TYPE_MEMORY_MAP_INFO_KHR = VK_STRUCTURE_TYPE_MEMORY_MAP_INFO,
      // Provided by VK_KHR_map_memory2
        VK_STRUCTURE_TYPE_MEMORY_UNMAP_INFO_KHR = VK_STRUCTURE_TYPE_MEMORY_UNMAP_INFO,
      // Provided by VK_EXT_surface_maintenance1
        VK_STRUCTURE_TYPE_SURFACE_PRESENT_MODE_EXT = VK_STRUCTURE_TYPE_SURFACE_PRESENT_MODE_KHR,
      // Provided by VK_EXT_surface_maintenance1
        VK_STRUCTURE_TYPE_SURFACE_PRESENT_SCALING_CAPABILITIES_EXT = VK_STRUCTURE_TYPE_SURFACE_PRESENT_SCALING_CAPABILITIES_KHR,
      // Provided by VK_EXT_surface_maintenance1
        VK_STRUCTURE_TYPE_SURFACE_PRESENT_MODE_COMPATIBILITY_EXT = VK_STRUCTURE_TYPE_SURFACE_PRESENT_MODE_COMPATIBILITY_KHR,
      // Provided by VK_EXT_swapchain_maintenance1
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SWAPCHAIN_MAINTENANCE_1_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SWAPCHAIN_MAINTENANCE_1_FEATURES_KHR,
      // Provided by VK_EXT_swapchain_maintenance1
        VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_FENCE_INFO_EXT = VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_FENCE_INFO_KHR,
      // Provided by VK_EXT_swapchain_maintenance1
        VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_MODES_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_MODES_CREATE_INFO_KHR,
      // Provided by VK_EXT_swapchain_maintenance1
        VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_MODE_INFO_EXT = VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_MODE_INFO_KHR,
      // Provided by VK_EXT_swapchain_maintenance1
        VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_SCALING_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_SCALING_CREATE_INFO_KHR,
      // Provided by VK_EXT_swapchain_maintenance1
        VK_STRUCTURE_TYPE_RELEASE_SWAPCHAIN_IMAGES_INFO_EXT = VK_STRUCTURE_TYPE_RELEASE_SWAPCHAIN_IMAGES_INFO_KHR,
      // Provided by VK_EXT_shader_demote_to_helper_invocation
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES,
      // Provided by VK_KHR_shader_integer_dot_product
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_FEATURES,
      // Provided by VK_KHR_shader_integer_dot_product
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_PROPERTIES,
      // Provided by VK_EXT_texel_buffer_alignment
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_PROPERTIES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_PROPERTIES,
      // Provided by VK_EXT_robustness2
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_FEATURES_KHR,
      // Provided by VK_EXT_robustness2
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_PROPERTIES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_PROPERTIES_KHR,
      // Provided by VK_EXT_private_data
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES,
      // Provided by VK_EXT_private_data
        VK_STRUCTURE_TYPE_DEVICE_PRIVATE_DATA_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_DEVICE_PRIVATE_DATA_CREATE_INFO,
      // Provided by VK_EXT_private_data
        VK_STRUCTURE_TYPE_PRIVATE_DATA_SLOT_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_PRIVATE_DATA_SLOT_CREATE_INFO,
      // Provided by VK_EXT_pipeline_creation_cache_control
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES,
      // Provided by VK_KHR_synchronization2
        VK_STRUCTURE_TYPE_MEMORY_BARRIER_2_KHR = VK_STRUCTURE_TYPE_MEMORY_BARRIER_2,
      // Provided by VK_KHR_synchronization2
        VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER_2_KHR = VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER_2,
      // Provided by VK_KHR_synchronization2
        VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER_2_KHR = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER_2,
      // Provided by VK_KHR_synchronization2
        VK_STRUCTURE_TYPE_DEPENDENCY_INFO_KHR = VK_STRUCTURE_TYPE_DEPENDENCY_INFO,
      // Provided by VK_KHR_synchronization2
        VK_STRUCTURE_TYPE_SUBMIT_INFO_2_KHR = VK_STRUCTURE_TYPE_SUBMIT_INFO_2,
      // Provided by VK_KHR_synchronization2
        VK_STRUCTURE_TYPE_SEMAPHORE_SUBMIT_INFO_KHR = VK_STRUCTURE_TYPE_SEMAPHORE_SUBMIT_INFO,
      // Provided by VK_KHR_synchronization2
        VK_STRUCTURE_TYPE_COMMAND_BUFFER_SUBMIT_INFO_KHR = VK_STRUCTURE_TYPE_COMMAND_BUFFER_SUBMIT_INFO,
      // Provided by VK_KHR_synchronization2
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES,
      // Provided by VK_KHR_zero_initialize_workgroup_memory
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ZERO_INITIALIZE_WORKGROUP_MEMORY_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ZERO_INITIALIZE_WORKGROUP_MEMORY_FEATURES,
      // Provided by VK_EXT_image_robustness
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_ROBUSTNESS_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_ROBUSTNESS_FEATURES,
      // Provided by VK_KHR_copy_commands2
        VK_STRUCTURE_TYPE_COPY_BUFFER_INFO_2_KHR = VK_STRUCTURE_TYPE_COPY_BUFFER_INFO_2,
      // Provided by VK_KHR_copy_commands2
        VK_STRUCTURE_TYPE_COPY_IMAGE_INFO_2_KHR = VK_STRUCTURE_TYPE_COPY_IMAGE_INFO_2,
      // Provided by VK_KHR_copy_commands2
        VK_STRUCTURE_TYPE_COPY_BUFFER_TO_IMAGE_INFO_2_KHR = VK_STRUCTURE_TYPE_COPY_BUFFER_TO_IMAGE_INFO_2,
      // Provided by VK_KHR_copy_commands2
        VK_STRUCTURE_TYPE_COPY_IMAGE_TO_BUFFER_INFO_2_KHR = VK_STRUCTURE_TYPE_COPY_IMAGE_TO_BUFFER_INFO_2,
      // Provided by VK_KHR_copy_commands2
        VK_STRUCTURE_TYPE_BLIT_IMAGE_INFO_2_KHR = VK_STRUCTURE_TYPE_BLIT_IMAGE_INFO_2,
      // Provided by VK_KHR_copy_commands2
        VK_STRUCTURE_TYPE_RESOLVE_IMAGE_INFO_2_KHR = VK_STRUCTURE_TYPE_RESOLVE_IMAGE_INFO_2,
      // Provided by VK_KHR_copy_commands2
        VK_STRUCTURE_TYPE_BUFFER_COPY_2_KHR = VK_STRUCTURE_TYPE_BUFFER_COPY_2,
      // Provided by VK_KHR_copy_commands2
        VK_STRUCTURE_TYPE_IMAGE_COPY_2_KHR = VK_STRUCTURE_TYPE_IMAGE_COPY_2,
      // Provided by VK_KHR_copy_commands2
        VK_STRUCTURE_TYPE_IMAGE_BLIT_2_KHR = VK_STRUCTURE_TYPE_IMAGE_BLIT_2,
      // Provided by VK_KHR_copy_commands2
        VK_STRUCTURE_TYPE_BUFFER_IMAGE_COPY_2_KHR = VK_STRUCTURE_TYPE_BUFFER_IMAGE_COPY_2,
      // Provided by VK_KHR_copy_commands2
        VK_STRUCTURE_TYPE_IMAGE_RESOLVE_2_KHR = VK_STRUCTURE_TYPE_IMAGE_RESOLVE_2,
      // Provided by VK_EXT_image_compression_control
        VK_STRUCTURE_TYPE_SUBRESOURCE_LAYOUT_2_EXT = VK_STRUCTURE_TYPE_SUBRESOURCE_LAYOUT_2,
      // Provided by VK_EXT_image_compression_control
        VK_STRUCTURE_TYPE_IMAGE_SUBRESOURCE_2_EXT = VK_STRUCTURE_TYPE_IMAGE_SUBRESOURCE_2,
      // Provided by VK_ARM_rasterization_order_attachment_access
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_FEATURES_ARM = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_FEATURES_EXT,
      // Provided by VK_VALVE_mutable_descriptor_type
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_VALVE = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_EXT,
      // Provided by VK_VALVE_mutable_descriptor_type
        VK_STRUCTURE_TYPE_MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_VALVE = VK_STRUCTURE_TYPE_MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_EXT,
      // Provided by VK_KHR_format_feature_flags2
        VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_3_KHR = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_3,
      // Provided by VK_EXT_present_mode_fifo_latest_ready
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_MODE_FIFO_LATEST_READY_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_MODE_FIFO_LATEST_READY_FEATURES_KHR,
      // Provided by VK_EXT_pipeline_properties
        VK_STRUCTURE_TYPE_PIPELINE_INFO_EXT = VK_STRUCTURE_TYPE_PIPELINE_INFO_KHR,
      // Provided by VK_EXT_global_priority_query
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES,
      // Provided by VK_EXT_global_priority_query
        VK_STRUCTURE_TYPE_QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES_EXT = VK_STRUCTURE_TYPE_QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES,
      // Provided by VK_KHR_maintenance4
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_FEATURES,
      // Provided by VK_KHR_maintenance4
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_PROPERTIES,
      // Provided by VK_KHR_maintenance4
        VK_STRUCTURE_TYPE_DEVICE_BUFFER_MEMORY_REQUIREMENTS_KHR = VK_STRUCTURE_TYPE_DEVICE_BUFFER_MEMORY_REQUIREMENTS,
      // Provided by VK_KHR_maintenance4
        VK_STRUCTURE_TYPE_DEVICE_IMAGE_MEMORY_REQUIREMENTS_KHR = VK_STRUCTURE_TYPE_DEVICE_IMAGE_MEMORY_REQUIREMENTS,
      // Provided by VK_KHR_shader_subgroup_rotate
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_ROTATE_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_ROTATE_FEATURES,
      // Provided by VK_EXT_depth_clamp_zero_one
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLAMP_ZERO_ONE_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLAMP_ZERO_ONE_FEATURES_KHR,
      // Provided by VK_QCOM_fragment_density_map_offset
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_OFFSET_FEATURES_QCOM = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_OFFSET_FEATURES_EXT,
      // Provided by VK_QCOM_fragment_density_map_offset
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_OFFSET_PROPERTIES_QCOM = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_OFFSET_PROPERTIES_EXT,
      // Provided by VK_QCOM_fragment_density_map_offset
        VK_STRUCTURE_TYPE_SUBPASS_FRAGMENT_DENSITY_MAP_OFFSET_END_INFO_QCOM = VK_STRUCTURE_TYPE_RENDER_PASS_FRAGMENT_DENSITY_MAP_OFFSET_END_INFO_EXT,
      // Provided by VK_NV_copy_memory_indirect
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COPY_MEMORY_INDIRECT_PROPERTIES_NV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COPY_MEMORY_INDIRECT_PROPERTIES_KHR,
      // Provided by VK_NV_memory_decompression
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_DECOMPRESSION_FEATURES_NV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_DECOMPRESSION_FEATURES_EXT,
      // Provided by VK_NV_memory_decompression
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_DECOMPRESSION_PROPERTIES_NV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_DECOMPRESSION_PROPERTIES_EXT,
      // Provided by VK_EXT_pipeline_protected_access
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_PROTECTED_ACCESS_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_PROTECTED_ACCESS_FEATURES,
      // Provided by VK_KHR_maintenance5
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_FEATURES,
      // Provided by VK_KHR_maintenance5
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_PROPERTIES,
      // Provided by VK_KHR_maintenance5
        VK_STRUCTURE_TYPE_RENDERING_AREA_INFO_KHR = VK_STRUCTURE_TYPE_RENDERING_AREA_INFO,
      // Provided by VK_KHR_maintenance5
        VK_STRUCTURE_TYPE_DEVICE_IMAGE_SUBRESOURCE_INFO_KHR = VK_STRUCTURE_TYPE_DEVICE_IMAGE_SUBRESOURCE_INFO,
      // Provided by VK_KHR_maintenance5
        VK_STRUCTURE_TYPE_SUBRESOURCE_LAYOUT_2_KHR = VK_STRUCTURE_TYPE_SUBRESOURCE_LAYOUT_2,
      // Provided by VK_KHR_maintenance5
        VK_STRUCTURE_TYPE_IMAGE_SUBRESOURCE_2_KHR = VK_STRUCTURE_TYPE_IMAGE_SUBRESOURCE_2,
      // Provided by VK_KHR_extended_flags, VK_KHR_maintenance5
        VK_STRUCTURE_TYPE_PIPELINE_CREATE_FLAGS_2_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_PIPELINE_CREATE_FLAGS_2_CREATE_INFO,
      // Provided by VK_KHR_extended_flags, VK_KHR_maintenance5
        VK_STRUCTURE_TYPE_BUFFER_USAGE_FLAGS_2_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_BUFFER_USAGE_FLAGS_2_CREATE_INFO,
      // Provided by VK_EXT_shader_object
        VK_STRUCTURE_TYPE_SHADER_REQUIRED_SUBGROUP_SIZE_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_REQUIRED_SUBGROUP_SIZE_CREATE_INFO,
      // Provided by VK_KHR_vertex_attribute_divisor
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES,
      // Provided by VK_KHR_vertex_attribute_divisor
        VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO,
      // Provided by VK_KHR_vertex_attribute_divisor
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES,
      // Provided by VK_KHR_shader_float_controls2
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT_CONTROLS_2_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT_CONTROLS_2_FEATURES,
      // Provided by VK_KHR_index_type_uint8
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES,
      // Provided by VK_KHR_line_rasterization
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES,
      // Provided by VK_KHR_line_rasterization
        VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO,
      // Provided by VK_KHR_line_rasterization
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES,
      // Provided by VK_KHR_shader_expect_assume
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_EXPECT_ASSUME_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_EXPECT_ASSUME_FEATURES,
      // Provided by VK_KHR_maintenance6
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_FEATURES,
      // Provided by VK_KHR_maintenance6
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_PROPERTIES,
      // Provided by VK_KHR_maintenance6
        VK_STRUCTURE_TYPE_BIND_MEMORY_STATUS_KHR = VK_STRUCTURE_TYPE_BIND_MEMORY_STATUS,
      // Provided by VK_KHR_maintenance6
        VK_STRUCTURE_TYPE_BIND_DESCRIPTOR_SETS_INFO_KHR = VK_STRUCTURE_TYPE_BIND_DESCRIPTOR_SETS_INFO,
      // Provided by VK_KHR_maintenance6
        VK_STRUCTURE_TYPE_PUSH_CONSTANTS_INFO_KHR = VK_STRUCTURE_TYPE_PUSH_CONSTANTS_INFO,
      // Provided by VK_KHR_maintenance6 with VK_KHR_push_descriptor
        VK_STRUCTURE_TYPE_PUSH_DESCRIPTOR_SET_INFO_KHR = VK_STRUCTURE_TYPE_PUSH_DESCRIPTOR_SET_INFO,
      // Provided by VK_KHR_maintenance6 with VK_KHR_push_descriptor
        VK_STRUCTURE_TYPE_PUSH_DESCRIPTOR_SET_WITH_TEMPLATE_INFO_KHR = VK_STRUCTURE_TYPE_PUSH_DESCRIPTOR_SET_WITH_TEMPLATE_INFO,
      // Provided by VK_EXT_fragment_density_map_offset
        VK_STRUCTURE_TYPE_RENDERING_END_INFO_EXT = VK_STRUCTURE_TYPE_RENDERING_END_INFO_KHR,
    } VkStructureType;

### 3.13. API Name Aliases

A small number of APIs did not follow the naming conventions when initially defined. For consistency, when we discover an API name that violates the naming conventions, we rename it in the Specification, XML, and header files. For backwards compatibility, the original (incorrect) name is retained as a “typo alias”. The alias is legacy and should not be used, but will be retained indefinitely.

Note | `VK_STENCIL_FRONT_AND_BACK` is an example of a typo alias. It was initially defined as part of VkStencilFaceFlagBits. Once the naming inconsistency was noticed, it was renamed to VK_STENCIL_FACE_FRONT_AND_BACK, and the old name was aliased to the correct name.

## 4. Initialization

Before using Vulkan, an application must initialize it by loading the Vulkan commands, and creating a `VkInstance` object.

### 4.1. Command Function Pointers

Vulkan commands are not necessarily exposed by static linking on a platform. Commands to query function pointers for Vulkan commands are described below.

Note | When extensions are promoted or otherwise incorporated into another extension or Vulkan core version, command aliases may be included. Whilst the behavior of each command alias is identical, the behavior of retrieving each alias’s function pointer is not. A function pointer for a given alias can only be retrieved if the extension or version that introduced that alias is supported and enabled, irrespective of whether any other alias is available.

Function pointers for all Vulkan commands can be obtained by calling:

    // Provided by VK_VERSION_1_0
    PFN_vkVoidFunction vkGetInstanceProcAddr(
        VkInstance                                  instance,
        const char*                                 pName);

- `instance` is the instance that the function pointer will be compatible with, or `NULL` for commands not dependent on any instance.

- `pName` is the name of the command to obtain.

`vkGetInstanceProcAddr` itself is obtained in a platform- and loader- specific manner. Typically, the loader library will export this command as a function symbol, so applications can link against the loader library, or load it dynamically and look up the symbol using platform-specific APIs.

The table below defines the various use cases for `vkGetInstanceProcAddr` and expected return value (“fp” is “function pointer”) for each case. A valid returned function pointer (“fp”) must not be `NULL`.

The returned function pointer is of type PFN_vkVoidFunction, and must be cast to the type of the command being queried before use.

Table 1. `vkGetInstanceProcAddr` behavior
`instance` | `pName` | return value
--- | --- | ---
*1 | `NULL` | undefined
invalid non-`NULL` instance | *1 | undefined
`NULL` | global command2 | fp
`NULL` | vkGetInstanceProcAddr | fp5
instance | vkGetInstanceProcAddr | fp
instance | core dispatchable command | fp3
instance | enabled instance extension dispatchable command for `instance` | fp3
instance | available device extension4 dispatchable command for `instance` | fp3
any other case, not covered above | `NULL`

1

  "*" means any representable value for the parameter (including valid values, invalid values, and `NULL`).

2

  The global commands are: vkEnumerateInstanceVersion, vkEnumerateInstanceExtensionProperties, vkEnumerateInstanceLayerProperties, and vkCreateInstance. Dispatchable commands are all other commands which are not global.

3

  The returned function pointer must only be called with a dispatchable object (the first parameter) that is `instance` or a child of `instance`, e.g. VkInstance, VkPhysicalDevice, VkDevice, VkQueue, or VkCommandBuffer.

4

  An “available device extension” is a device extension supported by any physical device enumerated by `instance`.

5

  Starting with Vulkan 1.2, `vkGetInstanceProcAddr` can resolve itself with a `NULL` instance pointer.

Valid Usage (Implicit)

- VUID-vkGetInstanceProcAddr-instance-parameter
  If `instance` is not `NULL`, `instance` must be a valid VkInstance handle

- VUID-vkGetInstanceProcAddr-pName-parameter
  `pName` must be a null-terminated UTF-8 string

In order to support systems with multiple Vulkan implementations, the function pointers returned by vkGetInstanceProcAddr may point to dispatch code that calls a different real implementation for different VkDevice objects or their child objects. The overhead of the internal dispatch for VkDevice objects can be avoided by obtaining device-specific function pointers for any commands that use a device or device-child object as their dispatchable object. Such function pointers can be obtained by calling:

    // Provided by VK_VERSION_1_0
    PFN_vkVoidFunction vkGetDeviceProcAddr(
        VkDevice                                    device,
        const char*                                 pName);

The table below defines the various use cases for `vkGetDeviceProcAddr` and expected return value (“fp” is “function pointer”) for each case. A valid returned function pointer (“fp”) must not be `NULL`.

The returned function pointer is of type PFN_vkVoidFunction, and must be cast to the type of the command being queried before use. The function pointer must only be called with a dispatchable object (the first parameter) that is `device` or a child of `device`.

Table 2. `vkGetDeviceProcAddr` behavior
`device` | `pName` | return value
--- | --- | ---
`NULL` | *1 | undefined
invalid device | *1 | undefined
device | `NULL` | undefined
device | requested core version2 device-level dispatchable command3 | fp4
device | enabled extension device-level dispatchable command3 | fp4
any other case, not covered above | `NULL`

1

  "*" means any representable value for the parameter (including valid values, invalid values, and `NULL`).

2

  Device-level commands which are part of the core version specified by VkApplicationInfo::`apiVersion` when creating the instance will always return a valid function pointer. If the `maintenance5` feature is enabled, core commands beyond that version which are supported by the implementation will return `NULL`, otherwise the implementation may either return `NULL` or a function pointer. If a function pointer is returned, it must not be called.

3

  In this function, device-level excludes all physical-device-level commands.

4

  The returned function pointer must only be called with a dispatchable object (the first parameter) that is `device` or a child of `device` e.g. VkDevice, VkQueue, or VkCommandBuffer.

Valid Usage (Implicit)

- VUID-vkGetDeviceProcAddr-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetDeviceProcAddr-pName-parameter
  `pName` must be a null-terminated UTF-8 string

The definition of PFN_vkVoidFunction is:

    // Provided by VK_VERSION_1_0
    typedef void (*PFN_vkVoidFunction)(void);

This type is returned from command function pointer queries, and must be cast to an actual command function pointer before use.

#### 4.1.1. Extending Physical Device Core Functionality

New core physical-device-level functionality can be used when both VkPhysicalDeviceProperties::`apiVersion` and VkApplicationInfo::`apiVersion` are greater than or equal to the version of Vulkan that added the new functionality. The Vulkan version supported by a physical device can be obtained by calling vkGetPhysicalDeviceProperties.

#### 4.1.2. Extending Physical Device From Device Extensions

When the `VK_KHR_get_physical_device_properties2` extension is enabled, or when both the instance and the physical-device versions are at least 1.1, physical-device-level functionality of a device extension can be used with a physical device if the corresponding extension is enumerated by vkEnumerateDeviceExtensionProperties for that physical device, even before a logical device has been created.

To obtain a function pointer for a physical-device-level command from a device extension, an application can use vkGetInstanceProcAddr. This function pointer may point to dispatch code, which calls a different real implementation for different `VkPhysicalDevice` objects. Applications must not use a VkPhysicalDevice in any command added by an extension or core version that is not supported by that physical device.

Device extensions may define structures that can be added to the `pNext` chain of physical-device-level commands.

### 4.2. Instances

There is no global state in Vulkan and all per-application state is stored in a `VkInstance` object. Creating a `VkInstance` object initializes the Vulkan library and allows the application to pass information about itself to the implementation.

Instances are represented by `VkInstance` handles:

    // Provided by VK_VERSION_1_0
    VK_DEFINE_HANDLE(VkInstance)

To query the version of instance-level functionality supported by the implementation, call:

    // Provided by VK_VERSION_1_1
    VkResult vkEnumerateInstanceVersion(
        uint32_t*                                   pApiVersion);

- `pApiVersion` is a pointer to a `uint32_t`, which is the version of Vulkan supported by instance-level functionality, encoded as described in Version Numbers.

Note | The intended behavior of vkEnumerateInstanceVersion is that an implementation should not need to perform memory allocations and should unconditionally return VK_SUCCESS. The loader, and any enabled layers, may return VK_ERROR_OUT_OF_HOST_MEMORY in the case of a failed memory allocation.

Valid Usage (Implicit)

- VUID-vkEnumerateInstanceVersion-pApiVersion-parameter
  `pApiVersion` must be a valid pointer to a `uint32_t` value

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

To create an instance object, call:

    // Provided by VK_VERSION_1_0
    VkResult vkCreateInstance(
        const VkInstanceCreateInfo*                 pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkInstance*                                 pInstance);

- `pCreateInfo` is a pointer to a VkInstanceCreateInfo structure controlling creation of the instance.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

- `pInstance` points a VkInstance handle in which the resulting instance is returned.

`vkCreateInstance` verifies that the requested layers exist. If not, `vkCreateInstance` will return VK_ERROR_LAYER_NOT_PRESENT. Next `vkCreateInstance` verifies that the requested extensions are supported (e.g. in the implementation or in any enabled instance layer) and if any requested extension is not supported, `vkCreateInstance` must return VK_ERROR_EXTENSION_NOT_PRESENT. After verifying and enabling the instance layers and extensions the `VkInstance` object is created and returned to the application. If a requested extension is only supported by a layer, both the layer and the extension need to be specified at `vkCreateInstance` time for the creation to succeed.

Valid Usage

- VUID-vkCreateInstance-ppEnabledExtensionNames-01388
  All required extensions for each extension in the VkInstanceCreateInfo::`ppEnabledExtensionNames` list must also be present in that list

Valid Usage (Implicit)

- VUID-vkCreateInstance-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkInstanceCreateInfo structure

- VUID-vkCreateInstance-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateInstance-pInstance-parameter
  `pInstance` must be a valid pointer to a VkInstance handle

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_EXTENSION_NOT_PRESENT

  - VK_ERROR_INCOMPATIBLE_DRIVER

  - VK_ERROR_INITIALIZATION_FAILED

  - VK_ERROR_LAYER_NOT_PRESENT

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkInstanceCreateInfo` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkInstanceCreateInfo {
        VkStructureType             sType;
        const void*                 pNext;
        VkInstanceCreateFlags       flags;
        const VkApplicationInfo*    pApplicationInfo;
        uint32_t                    enabledLayerCount;
        const char* const*          ppEnabledLayerNames;
        uint32_t                    enabledExtensionCount;
        const char* const*          ppEnabledExtensionNames;
    } VkInstanceCreateInfo;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask of VkInstanceCreateFlagBits indicating the behavior of the instance.

- `pApplicationInfo` is `NULL` or a pointer to a `VkApplicationInfo` structure. If not `NULL`, this information helps implementations recognize behavior inherent to classes of applications. VkApplicationInfo is defined in detail below.

- `enabledLayerCount` is the number of global layers to enable.

- `ppEnabledLayerNames` is a pointer to an array of `enabledLayerCount` null-terminated UTF-8 strings containing the names of layers to enable for the created instance. The layers are loaded in the order they are listed in this array, with the first array element being the closest to the application, and the last array element being the closest to the driver. See the Layers section for further details.

- `enabledExtensionCount` is the number of global extensions to enable.

- `ppEnabledExtensionNames` is a pointer to an array of `enabledExtensionCount` null-terminated UTF-8 strings containing the names of extensions to enable.

To capture events that occur while creating or destroying an instance, an application can link a VkDebugReportCallbackCreateInfoEXT structure or a VkDebugUtilsMessengerCreateInfoEXT structure to the `pNext` chain of the `VkInstanceCreateInfo` structure passed to `vkCreateInstance`. This callback is only valid for the duration of the vkCreateInstance and the vkDestroyInstance call. Use vkCreateDebugReportCallbackEXT or vkCreateDebugUtilsMessengerEXT to create persistent callback objects.

An application can add additional drivers by including the VkDirectDriverLoadingListLUNARG structure in the `pNext` chain of the `VkInstanceCreateInfo` structure passed to `vkCreateInstance`.

Note | VkDirectDriverLoadingListLUNARG allows applications to ship drivers with themselves. Only drivers that are designed to work with it should be used, such as drivers that implement Vulkan in software or that implement Vulkan by translating it to a different API. Any driver that requires installation should not be used, such as hardware drivers.

Valid Usage

- VUID-VkInstanceCreateInfo-pNext-04925
  If the `pNext` chain of `VkInstanceCreateInfo` includes a VkDebugReportCallbackCreateInfoEXT structure, the list of enabled extensions in `ppEnabledExtensionNames` must contain `VK_EXT_debug_report`

- VUID-VkInstanceCreateInfo-pNext-04926
  If the `pNext` chain of `VkInstanceCreateInfo` includes a VkDebugUtilsMessengerCreateInfoEXT structure, the list of enabled extensions in `ppEnabledExtensionNames` must contain `VK_EXT_debug_utils`

- VUID-VkInstanceCreateInfo-pNext-06779
  If the `pNext` chain includes a VkExportMetalObjectCreateInfoEXT structure, its `exportObjectType` member must be either VK_EXPORT_METAL_OBJECT_TYPE_METAL_DEVICE_BIT_EXT or VK_EXPORT_METAL_OBJECT_TYPE_METAL_COMMAND_QUEUE_BIT_EXT

- VUID-VkInstanceCreateInfo-flags-06559
  If `flags` has the VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR bit set, the list of enabled extensions in `ppEnabledExtensionNames` must contain `VK_KHR_portability_enumeration`

- VUID-VkInstanceCreateInfo-pNext-09400
  If the `pNext` chain of `VkInstanceCreateInfo` includes a VkDirectDriverLoadingListLUNARG structure, the list of enabled extensions in `ppEnabledExtensionNames` must contain VK_LUNARG_direct_driver_loading

- VUID-VkInstanceCreateInfo-pNext-10242
  If the `pNext` chain of `VkInstanceCreateInfo` includes a VkLayerSettingsCreateInfoEXT structure, the list of enabled extensions in `ppEnabledExtensionNames` must contain VK_EXT_layer_settings

- VUID-VkInstanceCreateInfo-pNext-10243
  If the `pNext` chain of `VkInstanceCreateInfo` includes a VkValidationFeaturesEXT structure, the list of enabled extensions in `ppEnabledExtensionNames` must contain VK_EXT_validation_features

- VUID-VkInstanceCreateInfo-pNext-10244
  If the `pNext` chain of `VkInstanceCreateInfo` includes a VkValidationFlagsEXT structure, the list of enabled extensions in `ppEnabledExtensionNames` must contain VK_EXT_validation_flags

Valid Usage (Implicit)

- VUID-VkInstanceCreateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO

- VUID-VkInstanceCreateInfo-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkDebugReportCallbackCreateInfoEXT, VkDebugUtilsMessengerCreateInfoEXT, VkDirectDriverLoadingListLUNARG, VkExportMetalObjectCreateInfoEXT, VkLayerSettingsCreateInfoEXT, VkValidationFeaturesEXT, or VkValidationFlagsEXT

- VUID-VkInstanceCreateInfo-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique, with the exception of structures of type VkDebugUtilsMessengerCreateInfoEXT, VkExportMetalObjectCreateInfoEXT, or VkLayerSettingsCreateInfoEXT

- VUID-VkInstanceCreateInfo-flags-parameter
  `flags` must be a valid combination of VkInstanceCreateFlagBits values

- VUID-VkInstanceCreateInfo-pApplicationInfo-parameter
  If `pApplicationInfo` is not `NULL`, `pApplicationInfo` must be a valid pointer to a valid VkApplicationInfo structure

- VUID-VkInstanceCreateInfo-ppEnabledLayerNames-parameter
  If `enabledLayerCount` is not `0`, `ppEnabledLayerNames` must be a valid pointer to an array of `enabledLayerCount` null-terminated UTF-8 strings

- VUID-VkInstanceCreateInfo-ppEnabledExtensionNames-parameter
  If `enabledExtensionCount` is not `0`, `ppEnabledExtensionNames` must be a valid pointer to an array of `enabledExtensionCount` null-terminated UTF-8 strings

    // Provided by VK_VERSION_1_0
    typedef enum VkInstanceCreateFlagBits {
      // Provided by VK_KHR_portability_enumeration
        VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR = 0x00000001,
    } VkInstanceCreateFlagBits;

- VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR specifies that the instance will enumerate available Vulkan Portability-compliant physical devices and groups in addition to the Vulkan physical devices and groups that are enumerated by default.

    // Provided by VK_VERSION_1_0
    typedef VkFlags VkInstanceCreateFlags;

`VkInstanceCreateFlags` is a bitmask type for setting a mask of zero or more VkInstanceCreateFlagBits.

When creating a Vulkan instance for which you wish to disable validation checks, add a VkValidationFlagsEXT structure to the `pNext` chain of the VkInstanceCreateInfo structure, specifying the checks to be disabled.

    // Provided by VK_EXT_validation_flags
    typedef struct VkValidationFlagsEXT {
        VkStructureType                sType;
        const void*                    pNext;
        uint32_t                       disabledValidationCheckCount;
        const VkValidationCheckEXT*    pDisabledValidationChecks;
    } VkValidationFlagsEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `disabledValidationCheckCount` is the number of checks to disable.

- `pDisabledValidationChecks` is a pointer to an array of VkValidationCheckEXT values specifying the validation checks to be disabled.

Valid Usage (Implicit)

- VUID-VkValidationFlagsEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT

- VUID-VkValidationFlagsEXT-pDisabledValidationChecks-parameter
  `pDisabledValidationChecks` must be a valid pointer to an array of `disabledValidationCheckCount` valid VkValidationCheckEXT values

- VUID-VkValidationFlagsEXT-disabledValidationCheckCount-arraylength
  `disabledValidationCheckCount` must be greater than `0`

Structure Chaining

Extends the structure

  - VkInstanceCreateInfo

Possible values of elements of the VkValidationFlagsEXT::`pDisabledValidationChecks` array, specifying validation checks to be disabled, are:

    // Provided by VK_EXT_validation_flags
    typedef enum VkValidationCheckEXT {
        VK_VALIDATION_CHECK_ALL_EXT = 0,
        VK_VALIDATION_CHECK_SHADERS_EXT = 1,
    } VkValidationCheckEXT;

- VK_VALIDATION_CHECK_ALL_EXT specifies that all validation checks are disabled.

- VK_VALIDATION_CHECK_SHADERS_EXT specifies that shader validation is disabled.

When creating a Vulkan instance for which you wish to enable or disable specific validation features, add a VkValidationFeaturesEXT structure to the `pNext` chain of the VkInstanceCreateInfo structure, specifying the features to be enabled or disabled.

    // Provided by VK_EXT_validation_features
    typedef struct VkValidationFeaturesEXT {
        VkStructureType                         sType;
        const void*                             pNext;
        uint32_t                                enabledValidationFeatureCount;
        const VkValidationFeatureEnableEXT*     pEnabledValidationFeatures;
        uint32_t                                disabledValidationFeatureCount;
        const VkValidationFeatureDisableEXT*    pDisabledValidationFeatures;
    } VkValidationFeaturesEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `enabledValidationFeatureCount` is the number of features to enable.

- `pEnabledValidationFeatures` is a pointer to an array of VkValidationFeatureEnableEXT values specifying the validation features to be enabled.

- `disabledValidationFeatureCount` is the number of features to disable.

- `pDisabledValidationFeatures` is a pointer to an array of VkValidationFeatureDisableEXT values specifying the validation features to be disabled.

Valid Usage

- VUID-VkValidationFeaturesEXT-pEnabledValidationFeatures-02967
  If the `pEnabledValidationFeatures` array contains VK_VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_RESERVE_BINDING_SLOT_EXT, then it must also contain VK_VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_EXT or VK_VALIDATION_FEATURE_ENABLE_DEBUG_PRINTF_EXT

Valid Usage (Implicit)

- VUID-VkValidationFeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VALIDATION_FEATURES_EXT

- VUID-VkValidationFeaturesEXT-pEnabledValidationFeatures-parameter
  If `enabledValidationFeatureCount` is not `0`, `pEnabledValidationFeatures` must be a valid pointer to an array of `enabledValidationFeatureCount` valid VkValidationFeatureEnableEXT values

- VUID-VkValidationFeaturesEXT-pDisabledValidationFeatures-parameter
  If `disabledValidationFeatureCount` is not `0`, `pDisabledValidationFeatures` must be a valid pointer to an array of `disabledValidationFeatureCount` valid VkValidationFeatureDisableEXT values

Structure Chaining

Extends the structures

  - VkComputePipelineCreateInfo

  - VkGraphicsPipelineCreateInfo

  - VkInstanceCreateInfo

  - VkPipelineShaderStageCreateInfo

  - VkRayTracingPipelineCreateInfoKHR

  - VkShaderCreateInfoEXT

  - VkShaderModuleCreateInfo

Possible values of elements of the VkValidationFeaturesEXT::`pEnabledValidationFeatures` array, specifying validation features to be enabled, are:

    // Provided by VK_EXT_validation_features
    typedef enum VkValidationFeatureEnableEXT {
        VK_VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_EXT = 0,
        VK_VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_RESERVE_BINDING_SLOT_EXT = 1,
        VK_VALIDATION_FEATURE_ENABLE_BEST_PRACTICES_EXT = 2,
        VK_VALIDATION_FEATURE_ENABLE_DEBUG_PRINTF_EXT = 3,
        VK_VALIDATION_FEATURE_ENABLE_SYNCHRONIZATION_VALIDATION_EXT = 4,
    } VkValidationFeatureEnableEXT;

- VK_VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_EXT specifies that GPU-assisted validation is enabled. Activating this feature instruments shader programs to generate additional diagnostic data. This feature is disabled by default.

- VK_VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_RESERVE_BINDING_SLOT_EXT specifies that the validation layers reserve a descriptor set binding slot for their own use. The layer reports a value for VkPhysicalDeviceLimits::`maxBoundDescriptorSets` that is one less than the value reported by the device. If the device supports the binding of only one descriptor set, the validation layer does not perform GPU-assisted validation. This feature is disabled by default.

- VK_VALIDATION_FEATURE_ENABLE_BEST_PRACTICES_EXT specifies that Vulkan best-practices validation is enabled. Activating this feature enables the output of warnings related to common misuse of the API, but which are not explicitly prohibited by the specification. This feature is disabled by default.

- VK_VALIDATION_FEATURE_ENABLE_DEBUG_PRINTF_EXT specifies that the layers will process `debugPrintfEXT` operations in shaders and send the resulting output to the debug callback. This feature is disabled by default.

- VK_VALIDATION_FEATURE_ENABLE_SYNCHRONIZATION_VALIDATION_EXT specifies that Vulkan synchronization validation is enabled. This feature reports resource access conflicts due to missing or incorrect synchronization operations between actions (Draw, Copy, Dispatch, Blit) reading or writing the same regions of memory. This feature is disabled by default.

Possible values of elements of the VkValidationFeaturesEXT::`pDisabledValidationFeatures` array, specifying validation features to be disabled, are:

    // Provided by VK_EXT_validation_features
    typedef enum VkValidationFeatureDisableEXT {
        VK_VALIDATION_FEATURE_DISABLE_ALL_EXT = 0,
        VK_VALIDATION_FEATURE_DISABLE_SHADERS_EXT = 1,
        VK_VALIDATION_FEATURE_DISABLE_THREAD_SAFETY_EXT = 2,
        VK_VALIDATION_FEATURE_DISABLE_API_PARAMETERS_EXT = 3,
        VK_VALIDATION_FEATURE_DISABLE_OBJECT_LIFETIMES_EXT = 4,
        VK_VALIDATION_FEATURE_DISABLE_CORE_CHECKS_EXT = 5,
        VK_VALIDATION_FEATURE_DISABLE_UNIQUE_HANDLES_EXT = 6,
        VK_VALIDATION_FEATURE_DISABLE_SHADER_VALIDATION_CACHE_EXT = 7,
    } VkValidationFeatureDisableEXT;

- VK_VALIDATION_FEATURE_DISABLE_ALL_EXT specifies that all validation checks are disabled.

- VK_VALIDATION_FEATURE_DISABLE_SHADERS_EXT specifies that shader validation, both runtime and standalone, is disabled. This validation occurs inside VkShaderCreateInfoEXT and VkShaderModuleCreateInfo. This feature is enabled by default.

- VK_VALIDATION_FEATURE_DISABLE_THREAD_SAFETY_EXT specifies that thread safety validation is disabled. This feature is enabled by default.

- VK_VALIDATION_FEATURE_DISABLE_API_PARAMETERS_EXT specifies that stateless parameter validation is disabled. This feature is enabled by default.

- VK_VALIDATION_FEATURE_DISABLE_OBJECT_LIFETIMES_EXT specifies that object lifetime validation is disabled. This feature is enabled by default.

- VK_VALIDATION_FEATURE_DISABLE_CORE_CHECKS_EXT specifies that core validation checks are disabled. This feature is enabled by default. If this feature is disabled, VK_VALIDATION_FEATURE_DISABLE_SHADERS_EXT is implied.

- VK_VALIDATION_FEATURE_DISABLE_UNIQUE_HANDLES_EXT specifies that protection against duplicate non-dispatchable object handles is disabled. This feature is enabled by default.

- VK_VALIDATION_FEATURE_DISABLE_SHADER_VALIDATION_CACHE_EXT specifies that there will be no caching of shader validation results and every shader will be validated on every application execution. Shader validation caching is enabled by default.

Note | Disabling checks such as parameter validation and object lifetime validation prevents the reporting of error conditions that can cause other validation checks to behave incorrectly or crash. Some validation checks assume that their inputs are already valid and do not always revalidate them.

Note | The `VK_EXT_validation_features` extension subsumes all the functionality provided in the `VK_EXT_validation_flags` extension.

To create a Vulkan instance with a specific configuration of layer settings, add VkLayerSettingsCreateInfoEXT structures to the `pNext` chain of the VkInstanceCreateInfo structure, specifying the settings to be configured.

    // Provided by VK_EXT_layer_settings
    typedef struct VkLayerSettingsCreateInfoEXT {
        VkStructureType             sType;
        const void*                 pNext;
        uint32_t                    settingCount;
        const VkLayerSettingEXT*    pSettings;
    } VkLayerSettingsCreateInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `settingCount` is the number of settings to configure.

- `pSettings` is a pointer to an array of `settingCount` VkLayerSettingEXT values specifying the settings to be configured.

Valid Usage (Implicit)

- VUID-VkLayerSettingsCreateInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_LAYER_SETTINGS_CREATE_INFO_EXT

- VUID-VkLayerSettingsCreateInfoEXT-pSettings-parameter
  If `settingCount` is not `0`, `pSettings` must be a valid pointer to an array of `settingCount` valid VkLayerSettingEXT structures

Structure Chaining

Extends the structure

  - VkInstanceCreateInfo

The values of elements of the VkLayerSettingsCreateInfoEXT::`pSettings` array, specifying layer settings to be configured, are:

    // Provided by VK_EXT_layer_settings
    typedef struct VkLayerSettingEXT {
        const char*              pLayerName;
        const char*              pSettingName;
        VkLayerSettingTypeEXT    type;
        uint32_t                 valueCount;
        const void*              pValues;
    } VkLayerSettingEXT;

- `pLayerName` is a pointer to a null-terminated UTF-8 string naming the layer to configure the setting from.

- `pSettingName` is a pointer to a null-terminated UTF-8 string naming the setting to configure. Values of `pSettingName` that are unknown to the layer are ignored.

- `type` is a VkLayerSettingTypeEXT value specifying the type of the `pValues` values.

- `valueCount` is the number of values used to configure the layer setting.

- `pValues` is a pointer to an array of `valueCount` values of the type indicated by `type` to configure the layer setting.

When multiple VkLayerSettingsCreateInfoEXT structures are chained and the same `pSettingName` is referenced for the same `pLayerName`, the value of the first reference of the layer setting is used.

Valid Usage

- VUID-VkLayerSettingEXT-valueCount-10070
  If `valueCount` is not `0`, `pValues` must be a valid pointer to an array of `valueCount` values of the type indicated by `type`

Valid Usage (Implicit)

- VUID-VkLayerSettingEXT-pLayerName-parameter
  `pLayerName` must be a null-terminated UTF-8 string

- VUID-VkLayerSettingEXT-pSettingName-parameter
  `pSettingName` must be a null-terminated UTF-8 string

- VUID-VkLayerSettingEXT-type-parameter
  `type` must be a valid VkLayerSettingTypeEXT value

Possible values of VkLayerSettingEXT::`type`, specifying the type of the data returned in VkLayerSettingEXT::`pValues`, are:

    // Provided by VK_EXT_layer_settings
    typedef enum VkLayerSettingTypeEXT {
        VK_LAYER_SETTING_TYPE_BOOL32_EXT = 0,
        VK_LAYER_SETTING_TYPE_INT32_EXT = 1,
        VK_LAYER_SETTING_TYPE_INT64_EXT = 2,
        VK_LAYER_SETTING_TYPE_UINT32_EXT = 3,
        VK_LAYER_SETTING_TYPE_UINT64_EXT = 4,
        VK_LAYER_SETTING_TYPE_FLOAT32_EXT = 5,
        VK_LAYER_SETTING_TYPE_FLOAT64_EXT = 6,
        VK_LAYER_SETTING_TYPE_STRING_EXT = 7,
    } VkLayerSettingTypeEXT;

- VK_LAYER_SETTING_TYPE_BOOL32_EXT specifies that the layer setting’s type is VkBool32.

- VK_LAYER_SETTING_TYPE_INT32_EXT specifies that the layer setting’s type is signed 32-bit integer.

- VK_LAYER_SETTING_TYPE_INT64_EXT specifies that the layer setting’s type is signed 64-bit integer.

- VK_LAYER_SETTING_TYPE_UINT32_EXT specifies that the layer setting’s type is unsigned 32-bit integer.

- VK_LAYER_SETTING_TYPE_UINT64_EXT specifies that the layer setting’s type is unsigned 64-bit integer.

- VK_LAYER_SETTING_TYPE_FLOAT32_EXT specifies that the layer setting’s type is 32-bit floating-point.

- VK_LAYER_SETTING_TYPE_FLOAT64_EXT specifies that the layer setting’s type is 64-bit floating-point.

- VK_LAYER_SETTING_TYPE_STRING_EXT specifies that the layer setting’s type is a pointer to a null-terminated UTF-8 string.

The `VkDirectDriverLoadingListLUNARG` structure is defined as:

    // Provided by VK_LUNARG_direct_driver_loading
    typedef struct VkDirectDriverLoadingListLUNARG {
        VkStructureType                           sType;
        const void*                               pNext;
        VkDirectDriverLoadingModeLUNARG           mode;
        uint32_t                                  driverCount;
        const VkDirectDriverLoadingInfoLUNARG*    pDrivers;
    } VkDirectDriverLoadingListLUNARG;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `mode` controls the mode in which to load the provided drivers.

- `driverCount` is the number of driver manifest paths.

- `pDrivers` is a pointer to an array of `driverCount` VkDirectDriverLoadingInfoLUNARG structures.

When creating a Vulkan instance for which additional drivers are to be included, add a `VkDirectDriverLoadingListLUNARG` structure to the pNext chain of the VkInstanceCreateInfo structure, and include in it the list of `VkDirectDriverLoadingInfoLUNARG` structures which contain the information necessary to load additional drivers.

Valid Usage (Implicit)

- VUID-VkDirectDriverLoadingListLUNARG-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DIRECT_DRIVER_LOADING_LIST_LUNARG

- VUID-VkDirectDriverLoadingListLUNARG-mode-parameter
  `mode` must be a valid VkDirectDriverLoadingModeLUNARG value

- VUID-VkDirectDriverLoadingListLUNARG-pDrivers-parameter
  `pDrivers` must be a valid pointer to an array of `driverCount` valid VkDirectDriverLoadingInfoLUNARG structures

- VUID-VkDirectDriverLoadingListLUNARG-driverCount-arraylength
  `driverCount` must be greater than `0`

Structure Chaining

Extends the structure

  - VkInstanceCreateInfo

The `VkDirectDriverLoadingInfoLUNARG` structure is defined as:

    // Provided by VK_LUNARG_direct_driver_loading
    typedef struct VkDirectDriverLoadingInfoLUNARG {
        VkStructureType                     sType;
        void*                               pNext;
        VkDirectDriverLoadingFlagsLUNARG    flags;
        PFN_vkGetInstanceProcAddrLUNARG     pfnGetInstanceProcAddr;
    } VkDirectDriverLoadingInfoLUNARG;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is reserved for future use.

- `pfnGetInstanceProcAddr` is a PFN_vkGetInstanceProcAddrLUNARG pointer to the driver vkGetInstanceProcAddr function.

Valid Usage (Implicit)

- VUID-VkDirectDriverLoadingInfoLUNARG-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DIRECT_DRIVER_LOADING_INFO_LUNARG

- VUID-VkDirectDriverLoadingInfoLUNARG-flags-zerobitmask
  `flags` must be `0`

Possible values of VkDirectDriverLoadingListLUNARG::`mode`, specifying the mode in which drivers are used, are:

    // Provided by VK_LUNARG_direct_driver_loading
    typedef enum VkDirectDriverLoadingModeLUNARG {
        VK_DIRECT_DRIVER_LOADING_MODE_EXCLUSIVE_LUNARG = 0,
        VK_DIRECT_DRIVER_LOADING_MODE_INCLUSIVE_LUNARG = 1,
    } VkDirectDriverLoadingModeLUNARG;

- VK_DIRECT_DRIVER_LOADING_MODE_EXCLUSIVE_LUNARG specifies that the provided drivers are used instead of the system-loaded drivers.

- VK_DIRECT_DRIVER_LOADING_MODE_INCLUSIVE_LUNARG specifies that the provided drivers are used in addition to the system-loaded drivers.

    // Provided by VK_LUNARG_direct_driver_loading
    typedef VkFlags VkDirectDriverLoadingFlagsLUNARG;

`VkDirectDriverLoadingFlagsLUNARG` is a bitmask type for setting a mask, but is currently reserved for future use.

The type of PFN_vkGetInstanceProcAddrLUNARG is:

    // Provided by VK_LUNARG_direct_driver_loading
    typedef PFN_vkVoidFunction (*PFN_vkGetInstanceProcAddrLUNARG)(
        VkInstance                                  instance,
        const char*                                 pName);

- `instance` is a VkInstance handle.

- `pName` is the name of a Vulkan command.

This type is compatible with the type of a pointer to the vkGetInstanceProcAddr command, but is used only to specify device driver addresses in VkDirectDriverLoadingInfoLUNARG::`pfnGetInstanceProcAddr`.

Note | This type exists only because of limitations in the XML schema and processing scripts, and its name may change in the future. Ideally we would use the `PFN_vkGetInstanceProcAddr` type generated in the `vulkan_core.h` header.

The `VkApplicationInfo` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkApplicationInfo {
        VkStructureType    sType;
        const void*        pNext;
        const char*        pApplicationName;
        uint32_t           applicationVersion;
        const char*        pEngineName;
        uint32_t           engineVersion;
        uint32_t           apiVersion;
    } VkApplicationInfo;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `pApplicationName` is `NULL` or is a pointer to a null-terminated UTF-8 string containing the name of the application.

- `applicationVersion` is an unsigned integer variable containing the developer-supplied version number of the application.

- `pEngineName` is `NULL` or is a pointer to a null-terminated UTF-8 string containing the name of the engine (if any) used to create the application.

- `engineVersion` is an unsigned integer variable containing the developer-supplied version number of the engine used to create the application.

- `apiVersion` must be the highest version of Vulkan that the application is designed to use, encoded as described in Version Numbers. The patch version number specified in `apiVersion` is ignored when creating an instance object. The variant version of the instance must match that requested in `apiVersion`.

Vulkan 1.0 implementations were required to return VK_ERROR_INCOMPATIBLE_DRIVER if `apiVersion` was larger than 1.0. Implementations that support Vulkan 1.1 or later must not return VK_ERROR_INCOMPATIBLE_DRIVER for any value of `apiVersion` .

Note | Because Vulkan 1.0 implementations may fail with VK_ERROR_INCOMPATIBLE_DRIVER, applications should determine the version of Vulkan available before calling vkCreateInstance. If the vkGetInstanceProcAddr returns `NULL` for vkEnumerateInstanceVersion, it is a Vulkan 1.0 implementation. Otherwise, the application can call vkEnumerateInstanceVersion to determine the version of Vulkan.

As long as the instance supports at least Vulkan 1.1, an application can use different versions of Vulkan with an instance than it does with a device or physical device.

Note | The Khronos validation layers will treat `apiVersion` as the highest API version the application targets, and will validate API usage against the minimum of that version and the implementation version (instance or device, depending on context). If an application tries to use functionality from a greater version than this, a validation error will be triggered. For example, if the instance supports Vulkan 1.1 and three physical devices support Vulkan 1.0, Vulkan 1.1, and Vulkan 1.2, respectively, and if the application sets `apiVersion` to 1.2, the application can use the following versions of Vulkan: Vulkan 1.0 can be used with the instance and with all physical devices. Vulkan 1.1 can be used with the instance and with the physical devices that support Vulkan 1.1 and Vulkan 1.2. Vulkan 1.2 can be used with the physical device that supports Vulkan 1.2. If we modify the above example so that the application sets `apiVersion` to 1.1, then the application must not use Vulkan 1.2 functionality on the physical device that supports Vulkan 1.2.

Note | Providing a `NULL` VkInstanceCreateInfo::`pApplicationInfo` or providing an `apiVersion` of 0 is equivalent to providing an `apiVersion` of `VK_MAKE_API_VERSION(0,1,0,0)`.

Valid Usage

- VUID-VkApplicationInfo-apiVersion-04010
  If `apiVersion` is not `0`, then it must be greater than or equal to VK_API_VERSION_1_0

Valid Usage (Implicit)

- VUID-VkApplicationInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_APPLICATION_INFO

- VUID-VkApplicationInfo-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkApplicationInfo-pApplicationName-parameter
  If `pApplicationName` is not `NULL`, `pApplicationName` must be a null-terminated UTF-8 string

- VUID-VkApplicationInfo-pEngineName-parameter
  If `pEngineName` is not `NULL`, `pEngineName` must be a null-terminated UTF-8 string

To destroy an instance, call:

    // Provided by VK_VERSION_1_0
    void vkDestroyInstance(
        VkInstance                                  instance,
        const VkAllocationCallbacks*                pAllocator);

- `instance` is the handle of the instance to destroy.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

Prior to destroying an instance, an application is responsible for destroying/freeing any Vulkan objects with explicit `vkDestroy*` or `vkFree*` commands that were created using that instance, or any VkPhysicalDevice object retrieved from it, as the first parameter of the corresponding `vkCreate*` or `vkAllocate*` command.

Valid Usage

- VUID-vkDestroyInstance-instance-00629
  All child objects that were created with `instance` or with a VkPhysicalDevice retrieved from it, and that can be destroyed or freed, must have been destroyed or freed prior to destroying `instance`

- VUID-vkDestroyInstance-instance-00630
  If `VkAllocationCallbacks` were provided when `instance` was created, a compatible set of callbacks must be provided here

- VUID-vkDestroyInstance-instance-00631
  If no `VkAllocationCallbacks` were provided when `instance` was created, `pAllocator` must be `NULL`

Valid Usage (Implicit)

- VUID-vkDestroyInstance-instance-parameter
  If `instance` is not `NULL`, `instance` must be a valid VkInstance handle

- VUID-vkDestroyInstance-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

Host Synchronization

- Host access to `instance` must be externally synchronized

- Host access to all `VkPhysicalDevice` objects enumerated from `instance` must be externally synchronized

## 5. Devices and Queues

Once Vulkan is initialized, devices and queues are the primary objects used to interact with a Vulkan implementation.

Vulkan separates the concept of physical and logical devices. A physical device usually represents a single complete implementation of Vulkan (excluding instance-level functionality) available to the host, of which there are a finite number. A logical device represents an instance of that implementation with its own state and resources independent of other logical devices.

Physical devices cannot be independently destroyed, and are instead destroyed with the VkInstance that they were retrieved from.

Physical devices are represented by `VkPhysicalDevice` handles:

    // Provided by VK_VERSION_1_0
    VK_DEFINE_HANDLE(VkPhysicalDevice)

### 5.1. Physical Devices

To retrieve a list of physical device objects representing the physical devices installed in the system, call:

    // Provided by VK_VERSION_1_0
    VkResult vkEnumeratePhysicalDevices(
        VkInstance                                  instance,
        uint32_t*                                   pPhysicalDeviceCount,
        VkPhysicalDevice*                           pPhysicalDevices);

- `instance` is a handle to a Vulkan instance previously created with vkCreateInstance.

- `pPhysicalDeviceCount` is a pointer to an integer related to the number of physical devices available or queried, as described below.

- `pPhysicalDevices` is either `NULL` or a pointer to an array of `VkPhysicalDevice` handles.

If `pPhysicalDevices` is `NULL`, then the number of physical devices available is returned in `pPhysicalDeviceCount`. Otherwise, `pPhysicalDeviceCount` must point to a variable set by the application to the number of elements in the `pPhysicalDevices` array, and on return the variable is overwritten with the number of handles actually written to `pPhysicalDevices`. If `pPhysicalDeviceCount` is less than the number of physical devices available, at most `pPhysicalDeviceCount` structures will be written, and VK_INCOMPLETE will be returned instead of VK_SUCCESS, to indicate that not all the available physical devices were returned.

Valid Usage (Implicit)

- VUID-vkEnumeratePhysicalDevices-instance-parameter
  `instance` must be a valid VkInstance handle

- VUID-vkEnumeratePhysicalDevices-pPhysicalDeviceCount-parameter
  `pPhysicalDeviceCount` must be a valid pointer to a `uint32_t` value

- VUID-vkEnumeratePhysicalDevices-pPhysicalDevices-parameter
  If the value referenced by `pPhysicalDeviceCount` is not `0`, and `pPhysicalDevices` is not `NULL`, `pPhysicalDevices` must be a valid pointer to an array of `pPhysicalDeviceCount` VkPhysicalDevice handles

Return Codes

Success

  - VK_INCOMPLETE

  - VK_SUCCESS

Failure

  - VK_ERROR_INITIALIZATION_FAILED

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

To query general properties of physical devices once enumerated, call:

Warning | This functionality is superseded by vkGetPhysicalDeviceProperties2. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_0
    void vkGetPhysicalDeviceProperties(
        VkPhysicalDevice                            physicalDevice,
        VkPhysicalDeviceProperties*                 pProperties);

- `physicalDevice` is the handle to the physical device whose properties will be queried.

- `pProperties` is a pointer to a VkPhysicalDeviceProperties structure in which properties are returned.

Valid Usage (Implicit)

- VUID-vkGetPhysicalDeviceProperties-physicalDevice-parameter
  `physicalDevice` must be a valid VkPhysicalDevice handle

- VUID-vkGetPhysicalDeviceProperties-pProperties-parameter
  `pProperties` must be a valid pointer to a VkPhysicalDeviceProperties structure

The `VkPhysicalDeviceProperties` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkPhysicalDeviceProperties {
        uint32_t                            apiVersion;
        uint32_t                            driverVersion;
        uint32_t                            vendorID;
        uint32_t                            deviceID;
        VkPhysicalDeviceType                deviceType;
        char                                deviceName[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE];
        uint8_t                             pipelineCacheUUID[VK_UUID_SIZE];
        VkPhysicalDeviceLimits              limits;
        VkPhysicalDeviceSparseProperties    sparseProperties;
    } VkPhysicalDeviceProperties;

- `apiVersion` is the version of Vulkan supported by the device, encoded as described in Version Numbers.

- `driverVersion` is the vendor-specified version of the driver.

- `vendorID` is a unique identifier for the vendor (see below) of the physical device.

- `deviceID` is a unique identifier for the physical device among devices available from the vendor.

- `deviceType` is a VkPhysicalDeviceType specifying the type of device.

- `deviceName` is an array of VK_MAX_PHYSICAL_DEVICE_NAME_SIZE `char` containing a null-terminated UTF-8 string which is the name of the device.

- `pipelineCacheUUID` is an array of VK_UUID_SIZE `uint8_t` values representing a universally unique identifier for the device.

- `limits` is the VkPhysicalDeviceLimits structure specifying device-specific limits of the physical device. See Limits for details.

- `sparseProperties` is the VkPhysicalDeviceSparseProperties structure specifying various sparse related properties of the physical device. See Sparse Properties for details.

Note | The value of `apiVersion` may be different than the version returned by vkEnumerateInstanceVersion; either higher or lower. In such cases, the application must not use functionality that exceeds the version of Vulkan associated with a given object. The `pApiVersion` parameter returned by vkEnumerateInstanceVersion is the version associated with a VkInstance and its children, except for a VkPhysicalDevice and its children. `VkPhysicalDeviceProperties`::`apiVersion` is the version associated with a VkPhysicalDevice and its children.

Note | The encoding of `driverVersion` is implementation-defined. It may not use the same encoding as `apiVersion`. Applications should follow information from the vendor on how to extract the version information from `driverVersion`.

On implementations that claim support for the Roadmap 2022 profile, the major and minor version expressed by `apiVersion` must be at least Vulkan 1.3.

The `vendorID` and `deviceID` fields are provided to allow applications to adapt to device characteristics that are not adequately exposed by other Vulkan queries.

Note | These may include performance profiles, hardware errata, or other characteristics.

The vendor identified by `vendorID` is the entity responsible for the most salient characteristics of the underlying implementation of the VkPhysicalDevice being queried.

Note | For example, in the case of a discrete GPU implementation, this should be the GPU chipset vendor. In the case of a hardware accelerator integrated into a system-on-chip (SoC), this should be the supplier of the silicon IP used to create the accelerator.

If the vendor has a PCI vendor ID, the low 16 bits of `vendorID` must contain that PCI vendor ID, and the remaining bits must be zero. Otherwise, the value returned must be a valid Khronos vendor ID, obtained as described in the Vulkan Documentation and Extensions: Procedures and Conventions document in the section “Registering a Vendor ID with Khronos”. Khronos vendor IDs are allocated starting at 0x10000, to distinguish them from the PCI vendor ID namespace. Khronos vendor IDs are symbolically defined in the VkVendorId type.

The vendor is also responsible for the value returned in `deviceID`. If the implementation is driven primarily by a PCI device with a PCI device ID, the low 16 bits of `deviceID` must contain that PCI device ID, and the remaining bits must be zero. Otherwise, the choice of what values to return may be dictated by operating system or platform policies - but should uniquely identify both the device version and any major configuration options (for example, core count in the case of multicore devices).

Note | The same device ID should be used for all physical implementations of that device version and configuration. For example, all uses of a specific silicon IP GPU version and configuration should use the same device ID, even if those uses occur in different SoCs.

Khronos vendor IDs which may be returned in VkPhysicalDeviceProperties::`vendorID` are:

    // Provided by VK_VERSION_1_0
    typedef enum VkVendorId {
        VK_VENDOR_ID_KHRONOS = 0x10000,
        VK_VENDOR_ID_VIV = 0x10001,
        VK_VENDOR_ID_VSI = 0x10002,
        VK_VENDOR_ID_KAZAN = 0x10003,
        VK_VENDOR_ID_CODEPLAY = 0x10004,
        VK_VENDOR_ID_MESA = 0x10005,
        VK_VENDOR_ID_POCL = 0x10006,
        VK_VENDOR_ID_MOBILEYE = 0x10007,
        VK_VENDOR_ID_APE = 0x10008,
    } VkVendorId;

Note | Khronos vendor IDs may be allocated by vendors at any time. Only the latest canonical versions of this Specification, of the corresponding `vk.xml` API Registry, and of the corresponding `vulkan_core.h` header file must contain all reserved Khronos vendor IDs. Only Khronos vendor IDs are given symbolic names at present. PCI vendor IDs returned by the implementation can be looked up in the PCI-SIG database.

VK_MAX_PHYSICAL_DEVICE_NAME_SIZE is the length in `char` values of an array containing a physical device name string, as returned in VkPhysicalDeviceProperties::`deviceName`.

    #define VK_MAX_PHYSICAL_DEVICE_NAME_SIZE  256U

The physical device types which may be returned in VkPhysicalDeviceProperties::`deviceType` are:

    // Provided by VK_VERSION_1_0
    typedef enum VkPhysicalDeviceType {
        VK_PHYSICAL_DEVICE_TYPE_OTHER = 0,
        VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU = 1,
        VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU = 2,
        VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU = 3,
        VK_PHYSICAL_DEVICE_TYPE_CPU = 4,
    } VkPhysicalDeviceType;

- VK_PHYSICAL_DEVICE_TYPE_OTHER - the device does not match any other available types.

- VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU - the device is typically one embedded in or tightly coupled with the host.

- VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU - the device is typically a separate processor connected to the host via an interlink.

- VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU - the device is typically a virtual node in a virtualization environment.

- VK_PHYSICAL_DEVICE_TYPE_CPU - the device is typically running on the same processors as the host.

The physical device type is advertised for informational purposes only, and does not directly affect the operation of the system. However, the device type may correlate with other advertised properties or capabilities of the system, such as how many memory heaps there are.

To query general properties of physical devices once enumerated, call:

    // Provided by VK_VERSION_1_1
    void vkGetPhysicalDeviceProperties2(
        VkPhysicalDevice                            physicalDevice,
        VkPhysicalDeviceProperties2*                pProperties);

    // Provided by VK_KHR_get_physical_device_properties2
    // Equivalent to vkGetPhysicalDeviceProperties2
    void vkGetPhysicalDeviceProperties2KHR(
        VkPhysicalDevice                            physicalDevice,
        VkPhysicalDeviceProperties2*                pProperties);

- `physicalDevice` is the handle to the physical device whose properties will be queried.

- `pProperties` is a pointer to a VkPhysicalDeviceProperties2 structure in which properties are returned.

Each structure in `pProperties` and its `pNext` chain contains members corresponding to implementation-dependent properties, behaviors, or limits. `vkGetPhysicalDeviceProperties2` fills in each member to specify the corresponding value for the implementation.

Valid Usage (Implicit)

- VUID-vkGetPhysicalDeviceProperties2-physicalDevice-parameter
  `physicalDevice` must be a valid VkPhysicalDevice handle

- VUID-vkGetPhysicalDeviceProperties2-pProperties-parameter
  `pProperties` must be a valid pointer to a VkPhysicalDeviceProperties2 structure

The `VkPhysicalDeviceProperties2` structure is defined as:

    // Provided by VK_VERSION_1_1
    typedef struct VkPhysicalDeviceProperties2 {
        VkStructureType               sType;
        void*                         pNext;
        VkPhysicalDeviceProperties    properties;
    } VkPhysicalDeviceProperties2;

    // Provided by VK_KHR_get_physical_device_properties2
    // Equivalent to VkPhysicalDeviceProperties2
    typedef VkPhysicalDeviceProperties2 VkPhysicalDeviceProperties2KHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `properties` is a VkPhysicalDeviceProperties structure describing properties of the physical device. This structure is written with the same values as if it were written by vkGetPhysicalDeviceProperties.

The `pNext` chain of this structure is used to extend the structure with properties defined by extensions.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceProperties2-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2

- VUID-VkPhysicalDeviceProperties2-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkPhysicalDeviceAccelerationStructurePropertiesKHR, VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT, VkPhysicalDeviceClusterAccelerationStructurePropertiesNV, VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI, VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR, VkPhysicalDeviceConservativeRasterizationPropertiesEXT, VkPhysicalDeviceCooperativeMatrix2PropertiesNV, VkPhysicalDeviceCooperativeMatrixPropertiesKHR, VkPhysicalDeviceCooperativeMatrixPropertiesNV, VkPhysicalDeviceCooperativeVectorPropertiesNV, VkPhysicalDeviceCopyMemoryIndirectPropertiesKHR, VkPhysicalDeviceCudaKernelLaunchPropertiesNV, VkPhysicalDeviceCustomBorderColorPropertiesEXT, VkPhysicalDeviceDepthStencilResolveProperties, VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT, VkPhysicalDeviceDescriptorBufferPropertiesEXT, VkPhysicalDeviceDescriptorBufferTensorPropertiesARM, VkPhysicalDeviceDescriptorHeapPropertiesEXT, VkPhysicalDeviceDescriptorHeapTensorPropertiesARM, VkPhysicalDeviceDescriptorIndexingProperties, VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT, VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV, VkPhysicalDeviceDiscardRectanglePropertiesEXT, VkPhysicalDeviceDisplacementMicromapPropertiesNV, VkPhysicalDeviceDriverProperties, VkPhysicalDeviceDrmPropertiesEXT, VkPhysicalDeviceExtendedDynamicState3PropertiesEXT, VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV, VkPhysicalDeviceExternalComputeQueuePropertiesNV, VkPhysicalDeviceExternalFormatResolvePropertiesANDROID, VkPhysicalDeviceExternalMemoryHostPropertiesEXT, VkPhysicalDeviceFaultPropertiesKHR, VkPhysicalDeviceFloatControlsProperties, VkPhysicalDeviceFragmentDensityMap2PropertiesEXT, VkPhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE, VkPhysicalDeviceFragmentDensityMapOffsetPropertiesEXT, VkPhysicalDeviceFragmentDensityMapPropertiesEXT, VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR, VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV, VkPhysicalDeviceFragmentShadingRatePropertiesKHR, VkPhysicalDeviceGpaProperties2AMD, VkPhysicalDeviceGpaPropertiesAMD, VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT, VkPhysicalDeviceHostImageCopyProperties, VkPhysicalDeviceIDProperties, VkPhysicalDeviceImageAlignmentControlPropertiesMESA, VkPhysicalDeviceImageProcessing2PropertiesQCOM, VkPhysicalDeviceImageProcessingPropertiesQCOM, VkPhysicalDeviceInlineUniformBlockProperties, VkPhysicalDeviceLayeredApiPropertiesListKHR, VkPhysicalDeviceLayeredDriverPropertiesMSFT, VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT, VkPhysicalDeviceLineRasterizationProperties, VkPhysicalDeviceMaintenance10PropertiesKHR, VkPhysicalDeviceMaintenance3Properties, VkPhysicalDeviceMaintenance4Properties, VkPhysicalDeviceMaintenance5Properties, VkPhysicalDeviceMaintenance6Properties, VkPhysicalDeviceMaintenance7PropertiesKHR, VkPhysicalDeviceMaintenance9PropertiesKHR, VkPhysicalDeviceMapMemoryPlacedPropertiesEXT, VkPhysicalDeviceMemoryDecompressionPropertiesEXT, VkPhysicalDeviceMeshShaderPropertiesEXT, VkPhysicalDeviceMeshShaderPropertiesNV, VkPhysicalDeviceMultiDrawPropertiesEXT, VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX, VkPhysicalDeviceMultiviewProperties, VkPhysicalDeviceNestedCommandBufferPropertiesEXT, VkPhysicalDeviceOpacityMicromapPropertiesEXT, VkPhysicalDeviceOpacityMicromapPropertiesKHR, VkPhysicalDeviceOpticalFlowPropertiesNV, VkPhysicalDevicePCIBusInfoPropertiesEXT, VkPhysicalDevicePartitionedAccelerationStructurePropertiesNV, VkPhysicalDevicePerformanceCountersByRegionPropertiesARM, VkPhysicalDevicePerformanceQueryPropertiesKHR, VkPhysicalDevicePipelineBinaryPropertiesKHR, VkPhysicalDevicePipelineRobustnessProperties, VkPhysicalDevicePointClippingProperties, VkPhysicalDevicePortabilitySubsetPropertiesKHR, VkPhysicalDeviceProtectedMemoryProperties, VkPhysicalDeviceProvokingVertexPropertiesEXT, VkPhysicalDevicePushConstantBankPropertiesNV, VkPhysicalDevicePushDescriptorProperties, VkPhysicalDeviceQueuePerfHintPropertiesQCOM, VkPhysicalDeviceRayTracingInvocationReorderPropertiesEXT, VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV, VkPhysicalDeviceRayTracingPipelinePropertiesKHR, VkPhysicalDeviceRayTracingPropertiesNV, VkPhysicalDeviceRenderPassStripedPropertiesARM, VkPhysicalDeviceRobustness2PropertiesKHR, VkPhysicalDeviceSampleLocationsPropertiesEXT, VkPhysicalDeviceSamplerFilterMinmaxProperties, VkPhysicalDeviceSchedulingControlsDispatchParametersPropertiesARM, VkPhysicalDeviceSchedulingControlsPropertiesARM, VkPhysicalDeviceShaderAbortPropertiesKHR, VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM, VkPhysicalDeviceShaderCoreProperties2AMD, VkPhysicalDeviceShaderCorePropertiesAMD, VkPhysicalDeviceShaderCorePropertiesARM, VkPhysicalDeviceShaderEnqueuePropertiesAMDX, VkPhysicalDeviceShaderInstrumentationPropertiesARM, VkPhysicalDeviceShaderIntegerDotProductProperties, VkPhysicalDeviceShaderLongVectorPropertiesEXT, VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT, VkPhysicalDeviceShaderMultipleWaitQueuesPropertiesQCOM, VkPhysicalDeviceShaderObjectPropertiesEXT, VkPhysicalDeviceShaderSMBuiltinsPropertiesNV, VkPhysicalDeviceShaderSplitBarrierPropertiesEXT, VkPhysicalDeviceShaderTileImagePropertiesEXT, VkPhysicalDeviceShadingRateImagePropertiesNV, VkPhysicalDeviceSubgroupProperties, VkPhysicalDeviceSubgroupSizeControlProperties, VkPhysicalDeviceSubpassShadingPropertiesHUAWEI, VkPhysicalDeviceTensorPropertiesARM, VkPhysicalDeviceTexelBufferAlignmentProperties, VkPhysicalDeviceTileMemoryHeapPropertiesQCOM, VkPhysicalDeviceTileShadingPropertiesQCOM, VkPhysicalDeviceTimelineSemaphoreProperties, VkPhysicalDeviceTransformFeedbackPropertiesEXT, VkPhysicalDeviceVertexAttributeDivisorProperties, VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT, VkPhysicalDeviceVulkan11Properties, VkPhysicalDeviceVulkan12Properties, VkPhysicalDeviceVulkan13Properties, or VkPhysicalDeviceVulkan14Properties

- VUID-VkPhysicalDeviceProperties2-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

The `VkPhysicalDeviceVulkan11Properties` structure is defined as:

    // Provided by VK_VERSION_1_2
    typedef struct VkPhysicalDeviceVulkan11Properties {
        VkStructureType            sType;
        void*                      pNext;
        uint8_t                    deviceUUID[VK_UUID_SIZE];
        uint8_t                    driverUUID[VK_UUID_SIZE];
        uint8_t                    deviceLUID[VK_LUID_SIZE];
        uint32_t                   deviceNodeMask;
        VkBool32                   deviceLUIDValid;
        uint32_t                   subgroupSize;
        VkShaderStageFlags         subgroupSupportedStages;
        VkSubgroupFeatureFlags     subgroupSupportedOperations;
        VkBool32                   subgroupQuadOperationsInAllStages;
        VkPointClippingBehavior    pointClippingBehavior;
        uint32_t                   maxMultiviewViewCount;
        uint32_t                   maxMultiviewInstanceIndex;
        VkBool32                   protectedNoFault;
        uint32_t                   maxPerSetDescriptors;
        VkDeviceSize               maxMemoryAllocationSize;
    } VkPhysicalDeviceVulkan11Properties;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `deviceUUID` is an array of VK_UUID_SIZE `uint8_t` values representing a universally unique identifier for the device.

- `driverUUID` is an array of VK_UUID_SIZE `uint8_t` values representing a universally unique identifier for the driver build in use by the device.

- `deviceLUID` is an array of VK_LUID_SIZE `uint8_t` values representing a locally unique identifier for the device.

- `deviceNodeMask` is a `uint32_t` bitfield identifying the node within a linked device adapter corresponding to the device.

- `deviceLUIDValid` is a boolean value that will be VK_TRUE if `deviceLUID` contains a valid LUID and `deviceNodeMask` contains a valid node mask, and VK_FALSE if they do not.

- `subgroupSize` is the default number of invocations in each subgroup. `subgroupSize` is at least 1 if any of the physical device’s queues support VK_QUEUE_GRAPHICS_BIT or VK_QUEUE_COMPUTE_BIT. `subgroupSize` is a power-of-two.

- `subgroupSupportedStages` is a bitfield of VkShaderStageFlagBits describing the shader stages that group operations with subgroup scope are supported in. `subgroupSupportedStages` will have the VK_SHADER_STAGE_COMPUTE_BIT bit set if any of the physical device’s queues support VK_QUEUE_COMPUTE_BIT.

- `subgroupSupportedOperations` is a bitmask of VkSubgroupFeatureFlagBits specifying the sets of group operations with subgroup scope supported on this device. `subgroupSupportedOperations` will have the VK_SUBGROUP_FEATURE_BASIC_BIT bit set if any of the physical device’s queues support VK_QUEUE_GRAPHICS_BIT or VK_QUEUE_COMPUTE_BIT.

- `subgroupQuadOperationsInAllStages` is a boolean specifying whether quad group operations are available in all stages, or are restricted to fragment and compute stages.

- `pointClippingBehavior` is a VkPointClippingBehavior value specifying the point clipping behavior supported by the implementation.

- `maxMultiviewViewCount` is one greater than the maximum view index that can be used in a subpass.

- `maxMultiviewInstanceIndex` is the maximum valid value of instance index allowed to be generated by a drawing command recorded within a subpass of a multiview render pass instance.

- `protectedNoFault` specifies how an implementation behaves when an application attempts to write to unprotected memory in a protected queue operation, read from protected memory in an unprotected queue operation, or perform a query in a protected queue operation. If this limit is VK_TRUE, such writes will be discarded or have undefined values written; reads and queries will return poison. If this limit is VK_FALSE, applications must not perform these operations. See Protected Memory Access Rules for more information.

- `maxPerSetDescriptors` is a maximum number of descriptors (summed over all descriptor types) in a single descriptor set that is guaranteed to satisfy any implementation-dependent constraints on the size of a descriptor set itself. Applications can query whether a descriptor set that goes beyond this limit is supported using vkGetDescriptorSetLayoutSupport.

- `maxMemoryAllocationSize` is the maximum size of a memory allocation that can be created, even if there is more space available in the heap. If VkMemoryAllocateInfo::`allocationSize` is larger the error VK_ERROR_OUT_OF_DEVICE_MEMORY may be returned.

If the `VkPhysicalDeviceVulkan11Properties` structure is included in the `pNext` chain of the VkPhysicalDeviceProperties2 structure passed to vkGetPhysicalDeviceProperties2, it is filled in with each corresponding implementation-dependent property.

These properties correspond to Vulkan 1.1 functionality.

The members of `VkPhysicalDeviceVulkan11Properties` have the same values as the corresponding members of VkPhysicalDeviceIDProperties, VkPhysicalDeviceSubgroupProperties, VkPhysicalDevicePointClippingProperties, VkPhysicalDeviceMultiviewProperties, VkPhysicalDeviceProtectedMemoryProperties, and VkPhysicalDeviceMaintenance3Properties.

Note | The `subgroupSupportedStages`, `subgroupSupportedOperations`, and `subgroupQuadOperationsInAllStages` members of this structure correspond respectively to the VkPhysicalDeviceSubgroupProperties::`supportedStages`, VkPhysicalDeviceSubgroupProperties::`supportedOperations`, and VkPhysicalDeviceSubgroupProperties::`quadOperationsInAllStages` members, but add the `subgroup` prefix to the member name.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceVulkan11Properties-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_PROPERTIES

Structure Chaining

Extends the structure

  - VkPhysicalDeviceProperties2

The `VkPhysicalDeviceVulkan12Properties` structure is defined as:

    // Provided by VK_VERSION_1_2
    typedef struct VkPhysicalDeviceVulkan12Properties {
        VkStructureType                      sType;
        void*                                pNext;
        VkDriverId                           driverID;
        char                                 driverName[VK_MAX_DRIVER_NAME_SIZE];
        char                                 driverInfo[VK_MAX_DRIVER_INFO_SIZE];
        VkConformanceVersion                 conformanceVersion;
        VkShaderFloatControlsIndependence    denormBehaviorIndependence;
        VkShaderFloatControlsIndependence    roundingModeIndependence;
        VkBool32                             shaderSignedZeroInfNanPreserveFloat16;
        VkBool32                             shaderSignedZeroInfNanPreserveFloat32;
        VkBool32                             shaderSignedZeroInfNanPreserveFloat64;
        VkBool32                             shaderDenormPreserveFloat16;
        VkBool32                             shaderDenormPreserveFloat32;
        VkBool32                             shaderDenormPreserveFloat64;
        VkBool32                             shaderDenormFlushToZeroFloat16;
        VkBool32                             shaderDenormFlushToZeroFloat32;
        VkBool32                             shaderDenormFlushToZeroFloat64;
        VkBool32                             shaderRoundingModeRTEFloat16;
        VkBool32                             shaderRoundingModeRTEFloat32;
        VkBool32                             shaderRoundingModeRTEFloat64;
        VkBool32                             shaderRoundingModeRTZFloat16;
        VkBool32                             shaderRoundingModeRTZFloat32;
        VkBool32                             shaderRoundingModeRTZFloat64;
        uint32_t                             maxUpdateAfterBindDescriptorsInAllPools;
        VkBool32                             shaderUniformBufferArrayNonUniformIndexingNative;
        VkBool32                             shaderSampledImageArrayNonUniformIndexingNative;
        VkBool32                             shaderStorageBufferArrayNonUniformIndexingNative;
        VkBool32                             shaderStorageImageArrayNonUniformIndexingNative;
        VkBool32                             shaderInputAttachmentArrayNonUniformIndexingNative;
        VkBool32                             robustBufferAccessUpdateAfterBind;
        VkBool32                             quadDivergentImplicitLod;
        uint32_t                             maxPerStageDescriptorUpdateAfterBindSamplers;
        uint32_t                             maxPerStageDescriptorUpdateAfterBindUniformBuffers;
        uint32_t                             maxPerStageDescriptorUpdateAfterBindStorageBuffers;
        uint32_t                             maxPerStageDescriptorUpdateAfterBindSampledImages;
        uint32_t                             maxPerStageDescriptorUpdateAfterBindStorageImages;
        uint32_t                             maxPerStageDescriptorUpdateAfterBindInputAttachments;
        uint32_t                             maxPerStageUpdateAfterBindResources;
        uint32_t                             maxDescriptorSetUpdateAfterBindSamplers;
        uint32_t                             maxDescriptorSetUpdateAfterBindUniformBuffers;
        uint32_t                             maxDescriptorSetUpdateAfterBindUniformBuffersDynamic;
        uint32_t                             maxDescriptorSetUpdateAfterBindStorageBuffers;
        uint32_t                             maxDescriptorSetUpdateAfterBindStorageBuffersDynamic;
        uint32_t                             maxDescriptorSetUpdateAfterBindSampledImages;
        uint32_t                             maxDescriptorSetUpdateAfterBindStorageImages;
        uint32_t                             maxDescriptorSetUpdateAfterBindInputAttachments;
        VkResolveModeFlags                   supportedDepthResolveModes;
        VkResolveModeFlags                   supportedStencilResolveModes;
        VkBool32                             independentResolveNone;
        VkBool32                             independentResolve;
        VkBool32                             filterMinmaxSingleComponentFormats;
        VkBool32                             filterMinmaxImageComponentMapping;
        uint64_t                             maxTimelineSemaphoreValueDifference;
        VkSampleCountFlags                   framebufferIntegerColorSampleCounts;
    } VkPhysicalDeviceVulkan12Properties;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `driverID` is a unique identifier for the driver of the physical device.

- `driverName` is an array of VK_MAX_DRIVER_NAME_SIZE `char` containing a null-terminated UTF-8 string which is the name of the driver.

- `driverInfo` is an array of VK_MAX_DRIVER_INFO_SIZE `char` containing a null-terminated UTF-8 string with additional information about the driver.

- `conformanceVersion` is the latest version of the Vulkan conformance test that the implementor has successfully tested this driver against prior to release (see VkConformanceVersion).

- `denormBehaviorIndependence` is a VkShaderFloatControlsIndependence value indicating whether, and how, denorm behavior can be set independently for different bit widths.

- `roundingModeIndependence` is a VkShaderFloatControlsIndependence value indicating whether, and how, rounding modes can be set independently for different bit widths.

- `shaderSignedZeroInfNanPreserveFloat16` is a boolean value indicating whether sign of a zero, Nans and ±∞ can be preserved in 16-bit floating-point computations. It also indicates whether the `SignedZeroInfNanPreserve` execution mode can be used for 16-bit floating-point types.

- `shaderSignedZeroInfNanPreserveFloat32` is a boolean value indicating whether sign of a zero, Nans and ±∞ can be preserved in 32-bit floating-point computations. It also indicates whether the `SignedZeroInfNanPreserve` execution mode can be used for 32-bit floating-point types.

- `shaderSignedZeroInfNanPreserveFloat64` is a boolean value indicating whether sign of a zero, Nans and ±∞ can be preserved in 64-bit floating-point computations. It also indicates whether the `SignedZeroInfNanPreserve` execution mode can be used for 64-bit floating-point types.

- `shaderDenormPreserveFloat16` is a boolean value indicating whether denormals can be preserved in 16-bit floating-point computations. It also indicates whether the `DenormPreserve` execution mode can be used for 16-bit floating-point types.

- `shaderDenormPreserveFloat32` is a boolean value indicating whether denormals can be preserved in 32-bit floating-point computations. It also indicates whether the `DenormPreserve` execution mode can be used for 32-bit floating-point types.

- `shaderDenormPreserveFloat64` is a boolean value indicating whether denormals can be preserved in 64-bit floating-point computations. It also indicates whether the `DenormPreserve` execution mode can be used for 64-bit floating-point types.

- `shaderDenormFlushToZeroFloat16` is a boolean value indicating whether denormals can be flushed to zero in 16-bit floating-point computations. It also indicates whether the `DenormFlushToZero` execution mode can be used for 16-bit floating-point types.

- `shaderDenormFlushToZeroFloat32` is a boolean value indicating whether denormals can be flushed to zero in 32-bit floating-point computations. It also indicates whether the `DenormFlushToZero` execution mode can be used for 32-bit floating-point types.

- `shaderDenormFlushToZeroFloat64` is a boolean value indicating whether denormals can be flushed to zero in 64-bit floating-point computations. It also indicates whether the `DenormFlushToZero` execution mode can be used for 64-bit floating-point types.

- `shaderRoundingModeRTEFloat16` is a boolean value indicating whether an implementation supports the round-to-nearest-even rounding mode for 16-bit floating-point arithmetic and conversion instructions. It also indicates whether the `RoundingModeRTE` execution mode can be used for 16-bit floating-point types.

- `shaderRoundingModeRTEFloat32` is a boolean value indicating whether an implementation supports the round-to-nearest-even rounding mode for 32-bit floating-point arithmetic and conversion instructions. It also indicates whether the `RoundingModeRTE` execution mode can be used for 32-bit floating-point types.

- `shaderRoundingModeRTEFloat64` is a boolean value indicating whether an implementation supports the round-to-nearest-even rounding mode for 64-bit floating-point arithmetic and conversion instructions. It also indicates whether the `RoundingModeRTE` execution mode can be used for 64-bit floating-point types.

- `shaderRoundingModeRTZFloat16` is a boolean value indicating whether an implementation supports the round-towards-zero rounding mode for 16-bit floating-point arithmetic and conversion instructions. It also indicates whether the `RoundingModeRTZ` execution mode can be used for 16-bit floating-point types.

- `shaderRoundingModeRTZFloat32` is a boolean value indicating whether an implementation supports the round-towards-zero rounding mode for 32-bit floating-point arithmetic and conversion instructions. It also indicates whether the `RoundingModeRTZ` execution mode can be used for 32-bit floating-point types.

- `shaderRoundingModeRTZFloat64` is a boolean value indicating whether an implementation supports the round-towards-zero rounding mode for 64-bit floating-point arithmetic and conversion instructions. It also indicates whether the `RoundingModeRTZ` execution mode can be used for 64-bit floating-point types.

- `maxUpdateAfterBindDescriptorsInAllPools` is the maximum number of descriptors (summed over all descriptor types) that can be created across all pools that are created with the VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT bit set. Pool creation may fail when this limit is exceeded, or when the space this limit represents is unable to satisfy a pool creation due to fragmentation.

- `shaderUniformBufferArrayNonUniformIndexingNative` is a boolean value indicating whether uniform buffer descriptors natively support non-uniform indexing. If this is VK_FALSE, then a single dynamic instance of an instruction that non-uniformly indexes an array of uniform buffers may execute multiple times in order to access all the descriptors.

- `shaderSampledImageArrayNonUniformIndexingNative` is a boolean value indicating whether sampler and image descriptors natively support non-uniform indexing. If this is VK_FALSE, then a single dynamic instance of an instruction that non-uniformly indexes an array of samplers or images may execute multiple times in order to access all the descriptors.

- `shaderStorageBufferArrayNonUniformIndexingNative` is a boolean value indicating whether storage buffer descriptors natively support non-uniform indexing. If this is VK_FALSE, then a single dynamic instance of an instruction that non-uniformly indexes an array of storage buffers may execute multiple times in order to access all the descriptors.

- `shaderStorageImageArrayNonUniformIndexingNative` is a boolean value indicating whether storage image descriptors natively support non-uniform indexing. If this is VK_FALSE, then a single dynamic instance of an instruction that non-uniformly indexes an array of storage images may execute multiple times in order to access all the descriptors.

- `shaderInputAttachmentArrayNonUniformIndexingNative` is a boolean value indicating whether input attachment descriptors natively support non-uniform indexing. If this is VK_FALSE, then a single dynamic instance of an instruction that non-uniformly indexes an array of input attachments may execute multiple times in order to access all the descriptors.

- `robustBufferAccessUpdateAfterBind` is a boolean value indicating whether `robustBufferAccess` can be enabled on a device simultaneously with `descriptorBindingUniformBufferUpdateAfterBind`, `descriptorBindingStorageBufferUpdateAfterBind`, `descriptorBindingUniformTexelBufferUpdateAfterBind`, and/or `descriptorBindingStorageTexelBufferUpdateAfterBind`. If this is VK_FALSE, then either `robustBufferAccess` must be disabled or all of these update-after-bind features must be disabled. Similarly, if this property is VK_FALSE, robustness must not be enabled through the VkPipelineRobustnessCreateInfo mechanism.

- `quadDivergentImplicitLod` is a boolean value indicating whether implicit LOD calculations for image operations have well-defined results when the image and/or sampler objects used for the instruction are not uniform within a quad. See Derivative Image Operations.

- `maxPerStageDescriptorUpdateAfterBindSamplers` is similar to `maxPerStageDescriptorSamplers` but counts descriptors from descriptor sets created with or without the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set.

- `maxPerStageDescriptorUpdateAfterBindUniformBuffers` is similar to `maxPerStageDescriptorUniformBuffers` but counts descriptors from descriptor sets created with or without the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set.

- `maxPerStageDescriptorUpdateAfterBindStorageBuffers` is similar to `maxPerStageDescriptorStorageBuffers` but counts descriptors from descriptor sets created with or without the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set.

- `maxPerStageDescriptorUpdateAfterBindSampledImages` is similar to `maxPerStageDescriptorSampledImages` but counts descriptors from descriptor sets created with or without the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set.

- `maxPerStageDescriptorUpdateAfterBindStorageImages` is similar to `maxPerStageDescriptorStorageImages` but counts descriptors from descriptor sets created with or without the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set.

- `maxPerStageDescriptorUpdateAfterBindInputAttachments` is similar to `maxPerStageDescriptorInputAttachments` but counts descriptors from descriptor sets created with or without the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set.

- `maxPerStageUpdateAfterBindResources` is similar to `maxPerStageResources` but counts descriptors from descriptor sets created with or without the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set.

- `maxDescriptorSetUpdateAfterBindSamplers` is similar to `maxDescriptorSetSamplers` but counts descriptors from descriptor sets created with or without the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set.

- `maxDescriptorSetUpdateAfterBindUniformBuffers` is similar to `maxDescriptorSetUniformBuffers` but counts descriptors from descriptor sets created with or without the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set.

- `maxDescriptorSetUpdateAfterBindUniformBuffersDynamic` is similar to `maxDescriptorSetUniformBuffersDynamic` but counts descriptors from descriptor sets created with or without the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set. While an application can allocate dynamic uniform buffer descriptors from a pool created with the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT, bindings for these descriptors must not be present in any descriptor set layout that includes bindings created with VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT.

- `maxDescriptorSetUpdateAfterBindStorageBuffers` is similar to `maxDescriptorSetStorageBuffers` but counts descriptors from descriptor sets created with or without the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set.

- `maxDescriptorSetUpdateAfterBindStorageBuffersDynamic` is similar to `maxDescriptorSetStorageBuffersDynamic` but counts descriptors from descriptor sets created with or without the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set. While an application can allocate dynamic storage buffer descriptors from a pool created with the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT, bindings for these descriptors must not be present in any descriptor set layout that includes bindings created with VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT.

- `maxDescriptorSetUpdateAfterBindSampledImages` is similar to `maxDescriptorSetSampledImages` but counts descriptors from descriptor sets created with or without the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set.

- `maxDescriptorSetUpdateAfterBindStorageImages` is similar to `maxDescriptorSetStorageImages` but counts descriptors from descriptor sets created with or without the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set.

- `maxDescriptorSetUpdateAfterBindInputAttachments` is similar to `maxDescriptorSetInputAttachments` but counts descriptors from descriptor sets created with or without the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set.

- `supportedDepthResolveModes` is a bitmask of VkResolveModeFlagBits indicating the set of supported depth resolve modes. VK_RESOLVE_MODE_SAMPLE_ZERO_BIT must be included in the set but implementations may support additional modes.

- `supportedStencilResolveModes` is a bitmask of VkResolveModeFlagBits indicating the set of supported stencil resolve modes. VK_RESOLVE_MODE_SAMPLE_ZERO_BIT must be included in the set but implementations may support additional modes. VK_RESOLVE_MODE_AVERAGE_BIT must not be included in the set.

- `independentResolveNone` is VK_TRUE if the implementation supports setting the depth and stencil resolve modes to different values when one of those modes is VK_RESOLVE_MODE_NONE. Otherwise the implementation only supports setting both modes to the same value.

- `independentResolve` is VK_TRUE if the implementation supports all combinations of the supported depth and stencil resolve modes, including setting either depth or stencil resolve mode to VK_RESOLVE_MODE_NONE. An implementation that supports `independentResolve` must also support `independentResolveNone`.

- `filterMinmaxSingleComponentFormats` is a boolean value indicating whether a minimum set of required formats support min/max filtering.

- `filterMinmaxImageComponentMapping` is a boolean value indicating whether the implementation supports non-identity component mapping of the image when doing min/max filtering.

- `maxTimelineSemaphoreValueDifference` indicates the maximum difference allowed by the implementation between the current value of a timeline semaphore and any pending signal or wait operations.

- `framebufferIntegerColorSampleCounts` is a bitmask of VkSampleCountFlagBits indicating the color sample counts that are supported for all framebuffer color attachments with integer formats.

If the `VkPhysicalDeviceVulkan12Properties` structure is included in the `pNext` chain of the VkPhysicalDeviceProperties2 structure passed to vkGetPhysicalDeviceProperties2, it is filled in with each corresponding implementation-dependent property.

These properties correspond to Vulkan 1.2 functionality.

The members of `VkPhysicalDeviceVulkan12Properties` must have the same values as the corresponding members of VkPhysicalDeviceDriverProperties, VkPhysicalDeviceFloatControlsProperties, VkPhysicalDeviceDescriptorIndexingProperties, VkPhysicalDeviceDepthStencilResolveProperties, VkPhysicalDeviceSamplerFilterMinmaxProperties, and VkPhysicalDeviceTimelineSemaphoreProperties.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceVulkan12Properties-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_PROPERTIES

Structure Chaining

Extends the structure

  - VkPhysicalDeviceProperties2

The `VkPhysicalDeviceVulkan13Properties` structure is defined as:

    // Provided by VK_VERSION_1_3
    typedef struct VkPhysicalDeviceVulkan13Properties {
        VkStructureType       sType;
        void*                 pNext;
        uint32_t              minSubgroupSize;
        uint32_t              maxSubgroupSize;
        uint32_t              maxComputeWorkgroupSubgroups;
        VkShaderStageFlags    requiredSubgroupSizeStages;
        uint32_t              maxInlineUniformBlockSize;
        uint32_t              maxPerStageDescriptorInlineUniformBlocks;
        uint32_t              maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks;
        uint32_t              maxDescriptorSetInlineUniformBlocks;
        uint32_t              maxDescriptorSetUpdateAfterBindInlineUniformBlocks;
        uint32_t              maxInlineUniformTotalSize;
        VkBool32              integerDotProduct8BitUnsignedAccelerated;
        VkBool32              integerDotProduct8BitSignedAccelerated;
        VkBool32              integerDotProduct8BitMixedSignednessAccelerated;
        VkBool32              integerDotProduct4x8BitPackedUnsignedAccelerated;
        VkBool32              integerDotProduct4x8BitPackedSignedAccelerated;
        VkBool32              integerDotProduct4x8BitPackedMixedSignednessAccelerated;
        VkBool32              integerDotProduct16BitUnsignedAccelerated;
        VkBool32              integerDotProduct16BitSignedAccelerated;
        VkBool32              integerDotProduct16BitMixedSignednessAccelerated;
        VkBool32              integerDotProduct32BitUnsignedAccelerated;
        VkBool32              integerDotProduct32BitSignedAccelerated;
        VkBool32              integerDotProduct32BitMixedSignednessAccelerated;
        VkBool32              integerDotProduct64BitUnsignedAccelerated;
        VkBool32              integerDotProduct64BitSignedAccelerated;
        VkBool32              integerDotProduct64BitMixedSignednessAccelerated;
        VkBool32              integerDotProductAccumulatingSaturating8BitUnsignedAccelerated;
        VkBool32              integerDotProductAccumulatingSaturating8BitSignedAccelerated;
        VkBool32              integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated;
        VkBool32              integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated;
        VkBool32              integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated;
        VkBool32              integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated;
        VkBool32              integerDotProductAccumulatingSaturating16BitUnsignedAccelerated;
        VkBool32              integerDotProductAccumulatingSaturating16BitSignedAccelerated;
        VkBool32              integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated;
        VkBool32              integerDotProductAccumulatingSaturating32BitUnsignedAccelerated;
        VkBool32              integerDotProductAccumulatingSaturating32BitSignedAccelerated;
        VkBool32              integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated;
        VkBool32              integerDotProductAccumulatingSaturating64BitUnsignedAccelerated;
        VkBool32              integerDotProductAccumulatingSaturating64BitSignedAccelerated;
        VkBool32              integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated;
        VkDeviceSize          storageTexelBufferOffsetAlignmentBytes;
        VkBool32              storageTexelBufferOffsetSingleTexelAlignment;
        VkDeviceSize          uniformTexelBufferOffsetAlignmentBytes;
        VkBool32              uniformTexelBufferOffsetSingleTexelAlignment;
        VkDeviceSize          maxBufferSize;
    } VkPhysicalDeviceVulkan13Properties;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `minSubgroupSize` is the minimum subgroup size supported by this device. `minSubgroupSize` is at least one if any of the physical device’s queues support VK_QUEUE_GRAPHICS_BIT or VK_QUEUE_COMPUTE_BIT. `minSubgroupSize` is a power-of-two. `minSubgroupSize` is less than or equal to `maxSubgroupSize`. `minSubgroupSize` is less than or equal to `subgroupSize`.

- `maxSubgroupSize` is the maximum subgroup size supported by this device. `maxSubgroupSize` is at least one if any of the physical device’s queues support VK_QUEUE_GRAPHICS_BIT or VK_QUEUE_COMPUTE_BIT. `maxSubgroupSize` is a power-of-two. `maxSubgroupSize` is greater than or equal to `minSubgroupSize`. `maxSubgroupSize` is greater than or equal to `subgroupSize`.

- `maxComputeWorkgroupSubgroups` is the maximum number of subgroups supported by the implementation within a workgroup.

- `requiredSubgroupSizeStages` is a bitfield of what shader stages support having a required subgroup size specified.

- `maxInlineUniformBlockSize` is the maximum size in bytes of an inline uniform block binding.

- `maxPerStageDescriptorInlineUniformBlocks` is the maximum number of inline uniform block bindings that can be accessible to a single shader stage in a pipeline layout. Descriptor bindings with a descriptor type of VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK count against this limit. Only descriptor bindings in descriptor set layouts created without the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set count against this limit.

- `maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks` is similar to `maxPerStageDescriptorInlineUniformBlocks` but counts descriptor bindings from descriptor sets created with or without the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set.

- `maxDescriptorSetInlineUniformBlocks` is the maximum number of inline uniform block bindings that can be included in descriptor bindings in a pipeline layout across all pipeline shader stages and descriptor set numbers. Descriptor bindings with a descriptor type of VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK count against this limit. Only descriptor bindings in descriptor set layouts created without the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set count against this limit.

- `maxDescriptorSetUpdateAfterBindInlineUniformBlocks` is similar to `maxDescriptorSetInlineUniformBlocks` but counts descriptor bindings from descriptor sets created with or without the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set.

- `maxInlineUniformTotalSize` is the maximum total size in bytes of all inline uniform block bindings, across all pipeline shader stages and descriptor set numbers, that can be included in a pipeline layout. Descriptor bindings with a descriptor type of VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK count against this limit.

- `integerDotProduct8BitUnsignedAccelerated` is a boolean that will be VK_TRUE if the support for 8-bit unsigned dot product operations using the `OpUDotKHR` SPIR-V instruction is accelerated as defined below.

- `integerDotProduct8BitSignedAccelerated` is a boolean that will be VK_TRUE if the support for 8-bit signed dot product operations using the `OpSDotKHR` SPIR-V instruction is accelerated as defined below.

- `integerDotProduct8BitMixedSignednessAccelerated` is a boolean that will be VK_TRUE if the support for 8-bit mixed signedness dot product operations using the `OpSUDotKHR` SPIR-V instruction is accelerated as defined below.

- `integerDotProduct4x8BitPackedUnsignedAccelerated` is a boolean that will be VK_TRUE if the support for 8-bit unsigned dot product operations from operands packed into 32-bit integers using the `OpUDotKHR` SPIR-V instruction is accelerated as defined below.

- `integerDotProduct4x8BitPackedSignedAccelerated` is a boolean that will be VK_TRUE if the support for 8-bit signed dot product operations from operands packed into 32-bit integers using the `OpSDotKHR` SPIR-V instruction is accelerated as defined below.

- `integerDotProduct4x8BitPackedMixedSignednessAccelerated` is a boolean that will be VK_TRUE if the support for 8-bit mixed signedness dot product operations from operands packed into 32-bit integers using the `OpSUDotKHR` SPIR-V instruction is accelerated as defined below.

- `integerDotProduct16BitUnsignedAccelerated` is a boolean that will be VK_TRUE if the support for 16-bit unsigned dot product operations using the `OpUDotKHR` SPIR-V instruction is accelerated as defined below.

- `integerDotProduct16BitSignedAccelerated` is a boolean that will be VK_TRUE if the support for 16-bit signed dot product operations using the `OpSDotKHR` SPIR-V instruction is accelerated as defined below.

- `integerDotProduct16BitMixedSignednessAccelerated` is a boolean that will be VK_TRUE if the support for 16-bit mixed signedness dot product operations using the `OpSUDotKHR` SPIR-V instruction is accelerated as defined below.

- `integerDotProduct32BitUnsignedAccelerated` is a boolean that will be VK_TRUE if the support for 32-bit unsigned dot product operations using the `OpUDotKHR` SPIR-V instruction is accelerated as defined below.

- `integerDotProduct32BitSignedAccelerated` is a boolean that will be VK_TRUE if the support for 32-bit signed dot product operations using the `OpSDotKHR` SPIR-V instruction is accelerated as defined below.

- `integerDotProduct32BitMixedSignednessAccelerated` is a boolean that will be VK_TRUE if the support for 32-bit mixed signedness dot product operations using the `OpSUDotKHR` SPIR-V instruction is accelerated as defined below.

- `integerDotProduct64BitUnsignedAccelerated` is a boolean that will be VK_TRUE if the support for 64-bit unsigned dot product operations using the `OpUDotKHR` SPIR-V instruction is accelerated as defined below.

- `integerDotProduct64BitSignedAccelerated` is a boolean that will be VK_TRUE if the support for 64-bit signed dot product operations using the `OpSDotKHR` SPIR-V instruction is accelerated as defined below.

- `integerDotProduct64BitMixedSignednessAccelerated` is a boolean that will be VK_TRUE if the support for 64-bit mixed signedness dot product operations using the `OpSUDotKHR` SPIR-V instruction is accelerated as defined below.

- `integerDotProductAccumulatingSaturating8BitUnsignedAccelerated` is a boolean that will be VK_TRUE if the support for 8-bit unsigned accumulating saturating dot product operations using the `OpUDotAccSatKHR` SPIR-V instruction is accelerated as defined below.

- `integerDotProductAccumulatingSaturating8BitSignedAccelerated` is a boolean that will be VK_TRUE if the support for 8-bit signed accumulating saturating dot product operations using the `OpSDotAccSatKHR` SPIR-V instruction is accelerated as defined below.

- `integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated` is a boolean that will be VK_TRUE if the support for 8-bit mixed signedness accumulating saturating dot product operations using the `OpSUDotAccSatKHR` SPIR-V instruction is accelerated as defined below.

- `integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated` is a boolean that will be VK_TRUE if the support for 8-bit unsigned accumulating saturating dot product operations from operands packed into 32-bit integers using the `OpUDotAccSatKHR` SPIR-V instruction is accelerated as defined below.

- `integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated` is a boolean that will be VK_TRUE if the support for 8-bit signed accumulating saturating dot product operations from operands packed into 32-bit integers using the `OpSDotAccSatKHR` SPIR-V instruction is accelerated as defined below.

- `integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated` is a boolean that will be VK_TRUE if the support for 8-bit mixed signedness accumulating saturating dot product operations from operands packed into 32-bit integers using the `OpSUDotAccSatKHR` SPIR-V instruction is accelerated as defined below.

- `integerDotProductAccumulatingSaturating16BitUnsignedAccelerated` is a boolean that will be VK_TRUE if the support for 16-bit unsigned accumulating saturating dot product operations using the `OpUDotAccSatKHR` SPIR-V instruction is accelerated as defined below.

- `integerDotProductAccumulatingSaturating16BitSignedAccelerated` is a boolean that will be VK_TRUE if the support for 16-bit signed accumulating saturating dot product operations using the `OpSDotAccSatKHR` SPIR-V instruction is accelerated as defined below.

- `integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated` is a boolean that will be VK_TRUE if the support for 16-bit mixed signedness accumulating saturating dot product operations using the `OpSUDotAccSatKHR` SPIR-V instruction is accelerated as defined below.

- `integerDotProductAccumulatingSaturating32BitUnsignedAccelerated` is a boolean that will be VK_TRUE if the support for 32-bit unsigned accumulating saturating dot product operations using the `OpUDotAccSatKHR` SPIR-V instruction is accelerated as defined below.

- `integerDotProductAccumulatingSaturating32BitSignedAccelerated` is a boolean that will be VK_TRUE if the support for 32-bit signed accumulating saturating dot product operations using the `OpSDotAccSatKHR` SPIR-V instruction is accelerated as defined below.

- `integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated` is a boolean that will be VK_TRUE if the support for 32-bit mixed signedness accumulating saturating dot product operations using the `OpSUDotAccSatKHR` SPIR-V instruction is accelerated as defined below.

- `integerDotProductAccumulatingSaturating64BitUnsignedAccelerated` is a boolean that will be VK_TRUE if the support for 64-bit unsigned accumulating saturating dot product operations using the `OpUDotAccSatKHR` SPIR-V instruction is accelerated as defined below.

- `integerDotProductAccumulatingSaturating64BitSignedAccelerated` is a boolean that will be VK_TRUE if the support for 64-bit signed accumulating saturating dot product operations using the `OpSDotAccSatKHR` SPIR-V instruction is accelerated as defined below.

- `integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated` is a boolean that will be VK_TRUE if the support for 64-bit mixed signedness accumulating saturating dot product operations using the `OpSUDotAccSatKHR` SPIR-V instruction is accelerated as defined below.

- `storageTexelBufferOffsetAlignmentBytes` is a byte alignment that is sufficient for a storage texel buffer of any format. The value must be a power of two.

- `storageTexelBufferOffsetSingleTexelAlignment` indicates whether single texel alignment is sufficient for a storage texel buffer of any format.

- `uniformTexelBufferOffsetAlignmentBytes` is a byte alignment that is sufficient for a uniform texel buffer of any format. The value must be a power of two.

- `uniformTexelBufferOffsetSingleTexelAlignment` indicates whether single texel alignment is sufficient for a uniform texel buffer of any format.

- `maxBufferSize` is the maximum size `VkBuffer` that can be created.

If the `VkPhysicalDeviceVulkan13Properties` structure is included in the `pNext` chain of the VkPhysicalDeviceProperties2 structure passed to vkGetPhysicalDeviceProperties2, it is filled in with each corresponding implementation-dependent property.

These properties correspond to Vulkan 1.3 functionality.

The members of `VkPhysicalDeviceVulkan13Properties` must have the same values as the corresponding members of VkPhysicalDeviceInlineUniformBlockProperties and VkPhysicalDeviceSubgroupSizeControlProperties.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceVulkan13Properties-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_PROPERTIES

Structure Chaining

Extends the structure

  - VkPhysicalDeviceProperties2

The `VkPhysicalDeviceVulkan14Properties` structure is defined as:

    // Provided by VK_VERSION_1_4
    typedef struct VkPhysicalDeviceVulkan14Properties {
        VkStructureType                       sType;
        void*                                 pNext;
        uint32_t                              lineSubPixelPrecisionBits;
        uint32_t                              maxVertexAttribDivisor;
        VkBool32                              supportsNonZeroFirstInstance;
        uint32_t                              maxPushDescriptors;
        VkBool32                              dynamicRenderingLocalReadDepthStencilAttachments;
        VkBool32                              dynamicRenderingLocalReadMultisampledAttachments;
        VkBool32                              earlyFragmentMultisampleCoverageAfterSampleCounting;
        VkBool32                              earlyFragmentSampleMaskTestBeforeSampleCounting;
        VkBool32                              depthStencilSwizzleOneSupport;
        VkBool32                              polygonModePointSize;
        VkBool32                              nonStrictSinglePixelWideLinesUseParallelogram;
        VkBool32                              nonStrictWideLinesUseParallelogram;
        VkBool32                              blockTexelViewCompatibleMultipleLayers;
        uint32_t                              maxCombinedImageSamplerDescriptorCount;
        VkBool32                              fragmentShadingRateClampCombinerInputs;
        VkPipelineRobustnessBufferBehavior    defaultRobustnessStorageBuffers;
        VkPipelineRobustnessBufferBehavior    defaultRobustnessUniformBuffers;
        VkPipelineRobustnessBufferBehavior    defaultRobustnessVertexInputs;
        VkPipelineRobustnessImageBehavior     defaultRobustnessImages;
        uint32_t                              copySrcLayoutCount;
        VkImageLayout*                        pCopySrcLayouts;
        uint32_t                              copyDstLayoutCount;
        VkImageLayout*                        pCopyDstLayouts;
        uint8_t                               optimalTilingLayoutUUID[VK_UUID_SIZE];
        VkBool32                              identicalMemoryTypeRequirements;
    } VkPhysicalDeviceVulkan14Properties;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `lineSubPixelPrecisionBits` is the number of bits of subpixel precision in framebuffer coordinates xf and yf when rasterizing line segments.

- `maxVertexAttribDivisor` is the maximum value of the number of instances that will repeat the value of vertex attribute data when instanced rendering is enabled.

- `supportsNonZeroFirstInstance` specifies whether a non-zero value for the `firstInstance` parameter of drawing commands is supported when VkVertexInputBindingDivisorDescription::`divisor` is not `1`.

- `maxPushDescriptors` is the maximum number of descriptors that can be used in a descriptor set layout created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT set.

- `dynamicRenderingLocalReadDepthStencilAttachments` is VK_TRUE if the implementation supports local reads of depth/stencil attachments, VK_FALSE otherwise.

- `dynamicRenderingLocalReadMultisampledAttachments` is VK_TRUE if the implementation supports local reads of multisampled attachments, VK_FALSE otherwise.

- `earlyFragmentMultisampleCoverageAfterSampleCounting` is a boolean value indicating whether the fragment shading and multisample coverage operations are performed after sample counting for fragment shaders with `EarlyFragmentTests` execution mode.

- `earlyFragmentSampleMaskTestBeforeSampleCounting` is a boolean value indicating whether the sample mask test operation is performed before sample counting for fragment shaders using the `EarlyFragmentTests` execution mode.

- `depthStencilSwizzleOneSupport` is a boolean indicating that depth/stencil texturing operations with VK_COMPONENT_SWIZZLE_ONE have defined behavior.

- `polygonModePointSize` is a boolean value indicating whether the point size of the final rasterization of polygons with VK_POLYGON_MODE_POINT is controlled by `PointSize`.

- `nonStrictSinglePixelWideLinesUseParallelogram` is a boolean value indicating whether non-strict lines with a width of 1.0 are rasterized as parallelograms or using Bresenham’s algorithm.

- `nonStrictWideLinesUseParallelogram` is a boolean value indicating whether non-strict lines with a width greater than 1.0 are rasterized as parallelograms or using Bresenham’s algorithm.

- `blockTexelViewCompatibleMultipleLayers` is a boolean value indicating that an implementation supports creating image views with VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT where the `layerCount` member of `subresourceRange` is greater than `1`.

- `maxCombinedImageSamplerDescriptorCount` is the maximum number of combined image sampler descriptors that the implementation uses to access any of the formats that require a sampler Y′CBCR conversion supported by the implementation.

- `fragmentShadingRateClampCombinerInputs` is a boolean value indicating that an implementation clamps the inputs to combiner operations.

- `defaultRobustnessStorageBuffers` describes the behavior of out of bounds accesses made to storage buffers when no robustness features are enabled

- `defaultRobustnessUniformBuffers` describes the behavior of out of bounds accesses made to uniform buffers when no robustness features are enabled

- `defaultRobustnessVertexInputs` describes the behavior of out of bounds accesses made to vertex input attributes when no robustness features are enabled

- `defaultRobustnessImages` describes the behavior of out of bounds accesses made to images when no robustness features are enabled

- `copySrcLayoutCount` is an integer related to the number of image layouts for host copies from images available or queried, as described below.

- `pCopySrcLayouts` is a pointer to an array of VkImageLayout in which supported image layouts for use with host copy operations from images are returned.

- `copyDstLayoutCount` is an integer related to the number of image layouts for host copies to images available or queried, as described below.

- `pCopyDstLayouts` is a pointer to an array of VkImageLayout in which supported image layouts for use with host copy operations to images are returned.

- `optimalTilingLayoutUUID` is an array of VK_UUID_SIZE `uint8_t` values representing a universally unique identifier for the implementation’s swizzling layout of images created with VK_IMAGE_TILING_OPTIMAL.

- `identicalMemoryTypeRequirements` indicates that specifying the VK_IMAGE_USAGE_HOST_TRANSFER_BIT flag in VkImageCreateInfo::`usage` does not affect the memory type requirements of the image.

If the `VkPhysicalDeviceVulkan14Properties` structure is included in the `pNext` chain of the VkPhysicalDeviceProperties2 structure passed to vkGetPhysicalDeviceProperties2, it is filled in with each corresponding implementation-dependent property.

These properties correspond to Vulkan 1.4 functionality.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceVulkan14Properties-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_4_PROPERTIES

Structure Chaining

Extends the structure

  - VkPhysicalDeviceProperties2

The `VkPhysicalDeviceIDProperties` structure is defined as:

    // Provided by VK_VERSION_1_1
    typedef struct VkPhysicalDeviceIDProperties {
        VkStructureType    sType;
        void*              pNext;
        uint8_t            deviceUUID[VK_UUID_SIZE];
        uint8_t            driverUUID[VK_UUID_SIZE];
        uint8_t            deviceLUID[VK_LUID_SIZE];
        uint32_t           deviceNodeMask;
        VkBool32           deviceLUIDValid;
    } VkPhysicalDeviceIDProperties;

    // Provided by VK_KHR_external_fence_capabilities, VK_KHR_external_memory_capabilities, VK_KHR_external_semaphore_capabilities
    // Equivalent to VkPhysicalDeviceIDProperties
    typedef VkPhysicalDeviceIDProperties VkPhysicalDeviceIDPropertiesKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `deviceUUID` is an array of VK_UUID_SIZE `uint8_t` values representing a universally unique identifier for the device.

- `driverUUID` is an array of VK_UUID_SIZE `uint8_t` values representing a universally unique identifier for the driver build in use by the device.

- `deviceLUID` is an array of VK_LUID_SIZE `uint8_t` values representing a locally unique identifier for the device.

- `deviceNodeMask` is a `uint32_t` bitfield identifying the node within a linked device adapter corresponding to the device.

- `deviceLUIDValid` is a boolean value that will be VK_TRUE if `deviceLUID` contains a valid LUID and `deviceNodeMask` contains a valid node mask, and VK_FALSE if they do not.

If the `VkPhysicalDeviceIDProperties` structure is included in the `pNext` chain of the VkPhysicalDeviceProperties2 structure passed to vkGetPhysicalDeviceProperties2, it is filled in with each corresponding implementation-dependent property.

`deviceUUID` must be immutable for a given device across instances, processes, driver APIs, driver versions, and system reboots.

Applications can compare the `driverUUID` value across instance and process boundaries, and can make similar queries in external APIs to determine whether they are capable of sharing memory objects and resources using them with the device.

`deviceUUID` and/or `driverUUID` must be used to determine whether a particular external object can be shared between driver components, where such a restriction exists as defined in the compatibility table for the particular object type:

- External memory handle types compatibility

- External semaphore handle types compatibility

- External fence handle types compatibility

If `deviceLUIDValid` is VK_FALSE, the values of `deviceLUID` and `deviceNodeMask` are undefined. If `deviceLUIDValid` is VK_TRUE and Vulkan is running on the Windows operating system, the contents of `deviceLUID` can be cast to an `LUID` object and must be equal to the locally unique identifier of a `IDXGIAdapter1` object that corresponds to `physicalDevice`. If `deviceLUIDValid` is VK_TRUE, `deviceNodeMask` must contain exactly one bit. If Vulkan is running on an operating system that supports the Direct3D 12 API and `physicalDevice` corresponds to an individual device in a linked device adapter, `deviceNodeMask` identifies the Direct3D 12 node corresponding to `physicalDevice`. Otherwise, `deviceNodeMask` must be `1`.

Note | Although they have identical descriptions, VkPhysicalDeviceIDProperties::`deviceUUID` may differ from VkPhysicalDeviceProperties2::`properties.pipelineCacheUUID`. The former is intended to identify and correlate devices across API and driver boundaries, while the latter is used to identify a compatible device and driver combination to use when serializing and de-serializing pipeline state. Implementations should return `deviceUUID` values which are likely to be unique even in the presence of multiple Vulkan implementations (such as a GPU driver and a software renderer; two drivers for different GPUs; or the same Vulkan driver running on two logically different devices). Khronos' conformance testing is unable to guarantee that `deviceUUID` values are actually unique, so implementors should make their own best efforts to ensure this. In particular, hard-coded `deviceUUID` values, especially all-`0` bits, should never be used. A combination of values unique to the vendor, the driver, and the hardware environment can be used to provide a `deviceUUID` which is unique to a high degree of certainty. Some possible inputs to such a computation are: Information reported by vkGetPhysicalDeviceProperties PCI device ID (if defined) PCI bus ID, or similar system configuration information. Driver binary checksums.

Note | While VkPhysicalDeviceIDProperties::`deviceUUID` is specified to remain consistent across driver versions and system reboots, it is not intended to be usable as a serializable persistent identifier for a device. It may change when a device is physically added to, removed from, or moved to a different connector in a system while that system is powered down. Further, there is no reasonable way to verify with conformance testing that a given device retains the same UUID in a given system across all driver versions supported in that system. While implementations should make every effort to report consistent device UUIDs across driver versions, applications should avoid relying on the persistence of this value for uses other than identifying compatible devices for external object sharing purposes.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceIDProperties-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES

Structure Chaining

Extends the structure

  - VkPhysicalDeviceProperties2

VK_UUID_SIZE is the length in `uint8_t` values of an array containing a universally unique device or driver build identifier, as returned in VkPhysicalDeviceIDProperties::`deviceUUID` and VkPhysicalDeviceIDProperties::`driverUUID`.

    #define VK_UUID_SIZE                      16U

VK_LUID_SIZE is the length in `uint8_t` values of an array containing a locally unique device identifier, as returned in VkPhysicalDeviceIDProperties::`deviceLUID`.

    #define VK_LUID_SIZE                      8U

    #define VK_LUID_SIZE_KHR                  VK_LUID_SIZE

The `VkPhysicalDeviceDriverProperties` structure is defined as:

    // Provided by VK_VERSION_1_2
    typedef struct VkPhysicalDeviceDriverProperties {
        VkStructureType         sType;
        void*                   pNext;
        VkDriverId              driverID;
        char                    driverName[VK_MAX_DRIVER_NAME_SIZE];
        char                    driverInfo[VK_MAX_DRIVER_INFO_SIZE];
        VkConformanceVersion    conformanceVersion;
    } VkPhysicalDeviceDriverProperties;

    // Provided by VK_KHR_driver_properties
    // Equivalent to VkPhysicalDeviceDriverProperties
    typedef VkPhysicalDeviceDriverProperties VkPhysicalDeviceDriverPropertiesKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `driverID` is a unique identifier for the driver of the physical device.

- `driverName` is an array of VK_MAX_DRIVER_NAME_SIZE `char` containing a null-terminated UTF-8 string which is the name of the driver.

- `driverInfo` is an array of VK_MAX_DRIVER_INFO_SIZE `char` containing a null-terminated UTF-8 string with additional information about the driver.

- `conformanceVersion` is the latest version of the Vulkan conformance test that the implementor has successfully tested this driver against prior to release (see VkConformanceVersion).

If the `VkPhysicalDeviceDriverProperties` structure is included in the `pNext` chain of the VkPhysicalDeviceProperties2 structure passed to vkGetPhysicalDeviceProperties2, it is filled in with each corresponding implementation-dependent property.

These are properties of the driver corresponding to a physical device.

`driverID` must be immutable for a given driver across instances, processes, driver versions, and system reboots.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceDriverProperties-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES

Structure Chaining

Extends the structure

  - VkPhysicalDeviceProperties2

Khronos driver IDs which may be returned in VkPhysicalDeviceDriverProperties::`driverID` are:

    // Provided by VK_VERSION_1_2
    typedef enum VkDriverId {
        VK_DRIVER_ID_AMD_PROPRIETARY = 1,
        VK_DRIVER_ID_AMD_OPEN_SOURCE = 2,
        VK_DRIVER_ID_MESA_RADV = 3,
        VK_DRIVER_ID_NVIDIA_PROPRIETARY = 4,
        VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS = 5,
        VK_DRIVER_ID_INTEL_OPEN_SOURCE_MESA = 6,
        VK_DRIVER_ID_IMAGINATION_PROPRIETARY = 7,
        VK_DRIVER_ID_QUALCOMM_PROPRIETARY = 8,
        VK_DRIVER_ID_ARM_PROPRIETARY = 9,
        VK_DRIVER_ID_GOOGLE_SWIFTSHADER = 10,
        VK_DRIVER_ID_GGP_PROPRIETARY = 11,
        VK_DRIVER_ID_BROADCOM_PROPRIETARY = 12,
        VK_DRIVER_ID_MESA_LLVMPIPE = 13,
        VK_DRIVER_ID_MOLTENVK = 14,
        VK_DRIVER_ID_COREAVI_PROPRIETARY = 15,
        VK_DRIVER_ID_JUICE_PROPRIETARY = 16,
        VK_DRIVER_ID_VERISILICON_PROPRIETARY = 17,
        VK_DRIVER_ID_MESA_TURNIP = 18,
        VK_DRIVER_ID_MESA_V3DV = 19,
        VK_DRIVER_ID_MESA_PANVK = 20,
        VK_DRIVER_ID_SAMSUNG_PROPRIETARY = 21,
        VK_DRIVER_ID_MESA_VENUS = 22,
        VK_DRIVER_ID_MESA_DOZEN = 23,
        VK_DRIVER_ID_MESA_NVK = 24,
        VK_DRIVER_ID_IMAGINATION_OPEN_SOURCE_MESA = 25,
        VK_DRIVER_ID_MESA_HONEYKRISP = 26,
        VK_DRIVER_ID_VULKAN_SC_EMULATION_ON_VULKAN = 27,
        VK_DRIVER_ID_MESA_KOSMICKRISP = 28,
        VK_DRIVER_ID_MESA_GFXSTREAM = 29,
        VK_DRIVER_ID_APE_SOFT = 30,
      // Provided by VK_KHR_driver_properties
        VK_DRIVER_ID_AMD_PROPRIETARY_KHR = VK_DRIVER_ID_AMD_PROPRIETARY,
      // Provided by VK_KHR_driver_properties
        VK_DRIVER_ID_AMD_OPEN_SOURCE_KHR = VK_DRIVER_ID_AMD_OPEN_SOURCE,
      // Provided by VK_KHR_driver_properties
        VK_DRIVER_ID_MESA_RADV_KHR = VK_DRIVER_ID_MESA_RADV,
      // Provided by VK_KHR_driver_properties
        VK_DRIVER_ID_NVIDIA_PROPRIETARY_KHR = VK_DRIVER_ID_NVIDIA_PROPRIETARY,
      // Provided by VK_KHR_driver_properties
        VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS_KHR = VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS,
      // Provided by VK_KHR_driver_properties
        VK_DRIVER_ID_INTEL_OPEN_SOURCE_MESA_KHR = VK_DRIVER_ID_INTEL_OPEN_SOURCE_MESA,
      // Provided by VK_KHR_driver_properties
        VK_DRIVER_ID_IMAGINATION_PROPRIETARY_KHR = VK_DRIVER_ID_IMAGINATION_PROPRIETARY,
      // Provided by VK_KHR_driver_properties
        VK_DRIVER_ID_QUALCOMM_PROPRIETARY_KHR = VK_DRIVER_ID_QUALCOMM_PROPRIETARY,
      // Provided by VK_KHR_driver_properties
        VK_DRIVER_ID_ARM_PROPRIETARY_KHR = VK_DRIVER_ID_ARM_PROPRIETARY,
      // Provided by VK_KHR_driver_properties
        VK_DRIVER_ID_GOOGLE_SWIFTSHADER_KHR = VK_DRIVER_ID_GOOGLE_SWIFTSHADER,
      // Provided by VK_KHR_driver_properties
        VK_DRIVER_ID_GGP_PROPRIETARY_KHR = VK_DRIVER_ID_GGP_PROPRIETARY,
      // Provided by VK_KHR_driver_properties
        VK_DRIVER_ID_BROADCOM_PROPRIETARY_KHR = VK_DRIVER_ID_BROADCOM_PROPRIETARY,
    } VkDriverId;

    // Provided by VK_KHR_driver_properties
    // Equivalent to VkDriverId
    typedef VkDriverId VkDriverIdKHR;

Note | Khronos driver IDs may be allocated by vendors at any time. There may be multiple driver IDs for the same vendor, representing different drivers (for e.g. different platforms, proprietary or open source, etc.). Only the latest canonical versions of this Specification, of the corresponding `vk.xml` API Registry, and of the corresponding `vulkan_core.h` header file must contain all reserved Khronos driver IDs. Only driver IDs registered with Khronos are given symbolic names. There may be unregistered driver IDs returned.

VK_MAX_DRIVER_NAME_SIZE is the length in `char` values of an array containing a driver name string, as returned in VkPhysicalDeviceDriverProperties::`driverName`.

    #define VK_MAX_DRIVER_NAME_SIZE           256U

    #define VK_MAX_DRIVER_NAME_SIZE_KHR       VK_MAX_DRIVER_NAME_SIZE

VK_MAX_DRIVER_INFO_SIZE is the length in `char` values of an array containing a driver information string, as returned in VkPhysicalDeviceDriverProperties::`driverInfo`.

    #define VK_MAX_DRIVER_INFO_SIZE           256U

    #define VK_MAX_DRIVER_INFO_SIZE_KHR       VK_MAX_DRIVER_INFO_SIZE

The conformance test suite version an implementation is compliant with is described with the `VkConformanceVersion` structure:

    // Provided by VK_VERSION_1_2
    typedef struct VkConformanceVersion {
        uint8_t    major;
        uint8_t    minor;
        uint8_t    subminor;
        uint8_t    patch;
    } VkConformanceVersion;

    // Provided by VK_KHR_driver_properties
    // Equivalent to VkConformanceVersion
    typedef VkConformanceVersion VkConformanceVersionKHR;

- `major` is the major version number of the conformance test suite.

- `minor` is the minor version number of the conformance test suite.

- `subminor` is the subminor version number of the conformance test suite.

- `patch` is the patch version number of the conformance test suite.

The `VkPhysicalDevicePCIBusInfoPropertiesEXT` structure is defined as:

    // Provided by VK_EXT_pci_bus_info
    typedef struct VkPhysicalDevicePCIBusInfoPropertiesEXT {
        VkStructureType    sType;
        void*              pNext;
        uint32_t           pciDomain;
        uint32_t           pciBus;
        uint32_t           pciDevice;
        uint32_t           pciFunction;
    } VkPhysicalDevicePCIBusInfoPropertiesEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `pciDomain` is the PCI bus domain.

- `pciBus` is the PCI bus identifier.

- `pciDevice` is the PCI device identifier.

- `pciFunction` is the PCI device function identifier.

If the `VkPhysicalDevicePCIBusInfoPropertiesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceProperties2 structure passed to vkGetPhysicalDeviceProperties2, it is filled in with each corresponding implementation-dependent property.

These are properties of the PCI bus information of a physical device.

Valid Usage (Implicit)

- VUID-VkPhysicalDevicePCIBusInfoPropertiesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PCI_BUS_INFO_PROPERTIES_EXT

Structure Chaining

Extends the structure

  - VkPhysicalDeviceProperties2

The `VkPhysicalDeviceDrmPropertiesEXT` structure is defined as:

    // Provided by VK_EXT_physical_device_drm
    typedef struct VkPhysicalDeviceDrmPropertiesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           hasPrimary;
        VkBool32           hasRender;
        int64_t            primaryMajor;
        int64_t            primaryMinor;
        int64_t            renderMajor;
        int64_t            renderMinor;
    } VkPhysicalDeviceDrmPropertiesEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `hasPrimary` is a boolean indicating whether the physical device has a DRM primary node.

- `hasRender` is a boolean indicating whether the physical device has a DRM render node.

- `primaryMajor` is the DRM primary node major number, if any.

- `primaryMinor` is the DRM primary node minor number, if any.

- `renderMajor` is the DRM render node major number, if any.

- `renderMinor` is the DRM render node minor number, if any.

If the `VkPhysicalDeviceDrmPropertiesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceProperties2 structure passed to vkGetPhysicalDeviceProperties2, it is filled in with each corresponding implementation-dependent property.

These are properties of the DRM information of a physical device.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceDrmPropertiesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRM_PROPERTIES_EXT

Structure Chaining

Extends the structure

  - VkPhysicalDeviceProperties2

The `VkPhysicalDeviceShaderIntegerDotProductProperties` structure is defined as:

    // Provided by VK_VERSION_1_3
    typedef struct VkPhysicalDeviceShaderIntegerDotProductProperties {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           integerDotProduct8BitUnsignedAccelerated;
        VkBool32           integerDotProduct8BitSignedAccelerated;
        VkBool32           integerDotProduct8BitMixedSignednessAccelerated;
        VkBool32           integerDotProduct4x8BitPackedUnsignedAccelerated;
        VkBool32           integerDotProduct4x8BitPackedSignedAccelerated;
        VkBool32           integerDotProduct4x8BitPackedMixedSignednessAccelerated;
        VkBool32           integerDotProduct16BitUnsignedAccelerated;
        VkBool32           integerDotProduct16BitSignedAccelerated;
        VkBool32           integerDotProduct16BitMixedSignednessAccelerated;
        VkBool32           integerDotProduct32BitUnsignedAccelerated;
        VkBool32           integerDotProduct32BitSignedAccelerated;
        VkBool32           integerDotProduct32BitMixedSignednessAccelerated;
        VkBool32           integerDotProduct64BitUnsignedAccelerated;
        VkBool32           integerDotProduct64BitSignedAccelerated;
        VkBool32           integerDotProduct64BitMixedSignednessAccelerated;
        VkBool32           integerDotProductAccumulatingSaturating8BitUnsignedAccelerated;
        VkBool32           integerDotProductAccumulatingSaturating8BitSignedAccelerated;
        VkBool32           integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated;
        VkBool32           integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated;
        VkBool32           integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated;
        VkBool32           integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated;
        VkBool32           integerDotProductAccumulatingSaturating16BitUnsignedAccelerated;
        VkBool32           integerDotProductAccumulatingSaturating16BitSignedAccelerated;
        VkBool32           integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated;
        VkBool32           integerDotProductAccumulatingSaturating32BitUnsignedAccelerated;
        VkBool32           integerDotProductAccumulatingSaturating32BitSignedAccelerated;
        VkBool32           integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated;
        VkBool32           integerDotProductAccumulatingSaturating64BitUnsignedAccelerated;
        VkBool32           integerDotProductAccumulatingSaturating64BitSignedAccelerated;
        VkBool32           integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated;
    } VkPhysicalDeviceShaderIntegerDotProductProperties;

    // Provided by VK_KHR_shader_integer_dot_product
    // Equivalent to VkPhysicalDeviceShaderIntegerDotProductProperties
    typedef VkPhysicalDeviceShaderIntegerDotProductProperties VkPhysicalDeviceShaderIntegerDotProductPropertiesKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `integerDotProduct8BitUnsignedAccelerated` is a boolean that will be VK_TRUE if the support for 8-bit unsigned dot product operations using the `OpUDotKHR` SPIR-V instruction is accelerated as defined below.

- `integerDotProduct8BitSignedAccelerated` is a boolean that will be VK_TRUE if the support for 8-bit signed dot product operations using the `OpSDotKHR` SPIR-V instruction is accelerated as defined below.

- `integerDotProduct8BitMixedSignednessAccelerated` is a boolean that will be VK_TRUE if the support for 8-bit mixed signedness dot product operations using the `OpSUDotKHR` SPIR-V instruction is accelerated as defined below.

- `integerDotProduct4x8BitPackedUnsignedAccelerated` is a boolean that will be VK_TRUE if the support for 8-bit unsigned dot product operations from operands packed into 32-bit integers using the `OpUDotKHR` SPIR-V instruction is accelerated as defined below.

- `integerDotProduct4x8BitPackedSignedAccelerated` is a boolean that will be VK_TRUE if the support for 8-bit signed dot product operations from operands packed into 32-bit integers using the `OpSDotKHR` SPIR-V instruction is accelerated as defined below.

- `integerDotProduct4x8BitPackedMixedSignednessAccelerated` is a boolean that will be VK_TRUE if the support for 8-bit mixed signedness dot product operations from operands packed into 32-bit integers using the `OpSUDotKHR` SPIR-V instruction is accelerated as defined below.

- `integerDotProduct16BitUnsignedAccelerated` is a boolean that will be VK_TRUE if the support for 16-bit unsigned dot product operations using the `OpUDotKHR` SPIR-V instruction is accelerated as defined below.

- `integerDotProduct16BitSignedAccelerated` is a boolean that will be VK_TRUE if the support for 16-bit signed dot product operations using the `OpSDotKHR` SPIR-V instruction is accelerated as defined below.

- `integerDotProduct16BitMixedSignednessAccelerated` is a boolean that will be VK_TRUE if the support for 16-bit mixed signedness dot product operations using the `OpSUDotKHR` SPIR-V instruction is accelerated as defined below.

- `integerDotProduct32BitUnsignedAccelerated` is a boolean that will be VK_TRUE if the support for 32-bit unsigned dot product operations using the `OpUDotKHR` SPIR-V instruction is accelerated as defined below.

- `integerDotProduct32BitSignedAccelerated` is a boolean that will be VK_TRUE if the support for 32-bit signed dot product operations using the `OpSDotKHR` SPIR-V instruction is accelerated as defined below.

- `integerDotProduct32BitMixedSignednessAccelerated` is a boolean that will be VK_TRUE if the support for 32-bit mixed signedness dot product operations using the `OpSUDotKHR` SPIR-V instruction is accelerated as defined below.

- `integerDotProduct64BitUnsignedAccelerated` is a boolean that will be VK_TRUE if the support for 64-bit unsigned dot product operations using the `OpUDotKHR` SPIR-V instruction is accelerated as defined below.

- `integerDotProduct64BitSignedAccelerated` is a boolean that will be VK_TRUE if the support for 64-bit signed dot product operations using the `OpSDotKHR` SPIR-V instruction is accelerated as defined below.

- `integerDotProduct64BitMixedSignednessAccelerated` is a boolean that will be VK_TRUE if the support for 64-bit mixed signedness dot product operations using the `OpSUDotKHR` SPIR-V instruction is accelerated as defined below.

- `integerDotProductAccumulatingSaturating8BitUnsignedAccelerated` is a boolean that will be VK_TRUE if the support for 8-bit unsigned accumulating saturating dot product operations using the `OpUDotAccSatKHR` SPIR-V instruction is accelerated as defined below.

- `integerDotProductAccumulatingSaturating8BitSignedAccelerated` is a boolean that will be VK_TRUE if the support for 8-bit signed accumulating saturating dot product operations using the `OpSDotAccSatKHR` SPIR-V instruction is accelerated as defined below.

- `integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated` is a boolean that will be VK_TRUE if the support for 8-bit mixed signedness accumulating saturating dot product operations using the `OpSUDotAccSatKHR` SPIR-V instruction is accelerated as defined below.

- `integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated` is a boolean that will be VK_TRUE if the support for 8-bit unsigned accumulating saturating dot product operations from operands packed into 32-bit integers using the `OpUDotAccSatKHR` SPIR-V instruction is accelerated as defined below.

- `integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated` is a boolean that will be VK_TRUE if the support for 8-bit signed accumulating saturating dot product operations from operands packed into 32-bit integers using the `OpSDotAccSatKHR` SPIR-V instruction is accelerated as defined below.

- `integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated` is a boolean that will be VK_TRUE if the support for 8-bit mixed signedness accumulating saturating dot product operations from operands packed into 32-bit integers using the `OpSUDotAccSatKHR` SPIR-V instruction is accelerated as defined below.

- `integerDotProductAccumulatingSaturating16BitUnsignedAccelerated` is a boolean that will be VK_TRUE if the support for 16-bit unsigned accumulating saturating dot product operations using the `OpUDotAccSatKHR` SPIR-V instruction is accelerated as defined below.

- `integerDotProductAccumulatingSaturating16BitSignedAccelerated` is a boolean that will be VK_TRUE if the support for 16-bit signed accumulating saturating dot product operations using the `OpSDotAccSatKHR` SPIR-V instruction is accelerated as defined below.

- `integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated` is a boolean that will be VK_TRUE if the support for 16-bit mixed signedness accumulating saturating dot product operations using the `OpSUDotAccSatKHR` SPIR-V instruction is accelerated as defined below.

- `integerDotProductAccumulatingSaturating32BitUnsignedAccelerated` is a boolean that will be VK_TRUE if the support for 32-bit unsigned accumulating saturating dot product operations using the `OpUDotAccSatKHR` SPIR-V instruction is accelerated as defined below.

- `integerDotProductAccumulatingSaturating32BitSignedAccelerated` is a boolean that will be VK_TRUE if the support for 32-bit signed accumulating saturating dot product operations using the `OpSDotAccSatKHR` SPIR-V instruction is accelerated as defined below.

- `integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated` is a boolean that will be VK_TRUE if the support for 32-bit mixed signedness accumulating saturating dot product operations using the `OpSUDotAccSatKHR` SPIR-V instruction is accelerated as defined below.

- `integerDotProductAccumulatingSaturating64BitUnsignedAccelerated` is a boolean that will be VK_TRUE if the support for 64-bit unsigned accumulating saturating dot product operations using the `OpUDotAccSatKHR` SPIR-V instruction is accelerated as defined below.

- `integerDotProductAccumulatingSaturating64BitSignedAccelerated` is a boolean that will be VK_TRUE if the support for 64-bit signed accumulating saturating dot product operations using the `OpSDotAccSatKHR` SPIR-V instruction is accelerated as defined below.

- `integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated` is a boolean that will be VK_TRUE if the support for 64-bit mixed signedness accumulating saturating dot product operations using the `OpSUDotAccSatKHR` SPIR-V instruction is accelerated as defined below.

If the `VkPhysicalDeviceShaderIntegerDotProductProperties` structure is included in the `pNext` chain of the VkPhysicalDeviceProperties2 structure passed to vkGetPhysicalDeviceProperties2, it is filled in with each corresponding implementation-dependent property.

These are properties of the integer dot product acceleration information of a physical device.

Note | A dot product operation is deemed accelerated if its implementation provides a performance advantage over application-provided code composed from elementary instructions and/or other dot product instructions, either because the implementation uses optimized machine code sequences whose generation from application-provided code cannot be guaranteed or because it uses hardware features that cannot otherwise be targeted from application-provided code.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceShaderIntegerDotProductProperties-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_PROPERTIES

Structure Chaining

Extends the structure

  - VkPhysicalDeviceProperties2

The `VkPhysicalDeviceImageProcessingPropertiesQCOM` structure is defined as:

    // Provided by VK_QCOM_image_processing
    typedef struct VkPhysicalDeviceImageProcessingPropertiesQCOM {
        VkStructureType    sType;
        void*              pNext;
        uint32_t           maxWeightFilterPhases;
        VkExtent2D         maxWeightFilterDimension;
        VkExtent2D         maxBlockMatchRegion;
        VkExtent2D         maxBoxFilterBlockSize;
    } VkPhysicalDeviceImageProcessingPropertiesQCOM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `maxWeightFilterPhases` is the maximum value that can be specified for VkImageViewSampleWeightCreateInfoQCOM::`numPhases` in weight image sampling operations.

- `maxWeightFilterDimension` is a VkExtent2D describing the largest dimensions (`width` and `height`) that can be specified for VkImageViewSampleWeightCreateInfoQCOM::`filterSize`.

- `maxBlockMatchRegion` is a VkExtent2D describing the largest dimensions (`width` and `height`) that can be specified for `blockSize` in block matching operations.

- `maxBoxFilterBlockSize` is a VkExtent2D describing the maximum dimensions (`width` and `height`) that can be specified for `blocksize` in box filter sampling operations.

If the `VkPhysicalDeviceImageProcessingPropertiesQCOM` structure is included in the `pNext` chain of the VkPhysicalDeviceProperties2 structure passed to vkGetPhysicalDeviceProperties2, it is filled in with each corresponding implementation-dependent property.

These are properties of the image processing information of a physical device.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceImageProcessingPropertiesQCOM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_PROCESSING_PROPERTIES_QCOM

Structure Chaining

Extends the structure

  - VkPhysicalDeviceProperties2

The `VkPhysicalDeviceShaderTileImagePropertiesEXT` structure is defined as:

    // Provided by VK_EXT_shader_tile_image
    typedef struct VkPhysicalDeviceShaderTileImagePropertiesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           shaderTileImageCoherentReadAccelerated;
        VkBool32           shaderTileImageReadSampleFromPixelRateInvocation;
        VkBool32           shaderTileImageReadFromHelperInvocation;
    } VkPhysicalDeviceShaderTileImagePropertiesEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `shaderTileImageCoherentReadAccelerated` is a boolean that will be VK_TRUE if coherent reads of tile image data is accelerated.

- `shaderTileImageReadSampleFromPixelRateInvocation` is a boolean that will be VK_TRUE if reading from samples from a pixel rate fragment invocation is supported when VkPipelineMultisampleStateCreateInfo::`rasterizationSamples` > 1.

- `shaderTileImageReadFromHelperInvocation` is a boolean that will be VK_TRUE if reads of tile image data from helper fragment invocations result in valid values.

If the `VkPhysicalDeviceShaderTileImagePropertiesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceProperties2 structure passed to vkGetPhysicalDeviceProperties2, it is filled in with each corresponding implementation-dependent property.

These are properties of the tile image information of a physical device.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceShaderTileImagePropertiesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TILE_IMAGE_PROPERTIES_EXT

Structure Chaining

Extends the structure

  - VkPhysicalDeviceProperties2

The `VkPhysicalDeviceImageProcessing2PropertiesQCOM` structure is defined as:

    // Provided by VK_QCOM_image_processing2
    typedef struct VkPhysicalDeviceImageProcessing2PropertiesQCOM {
        VkStructureType    sType;
        void*              pNext;
        VkExtent2D         maxBlockMatchWindow;
    } VkPhysicalDeviceImageProcessing2PropertiesQCOM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `maxBlockMatchWindow` is a VkExtent2D describing the largest dimensions (`width` and `height`) that can be specified for the block match window.

If the `VkPhysicalDeviceImageProcessing2PropertiesQCOM` structure is included in the `pNext` chain of the VkPhysicalDeviceProperties2 structure passed to vkGetPhysicalDeviceProperties2, it is filled in with each corresponding implementation-dependent property.

These are properties of the image processing2 information of a physical device.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceImageProcessing2PropertiesQCOM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_PROCESSING_2_PROPERTIES_QCOM

Structure Chaining

Extends the structure

  - VkPhysicalDeviceProperties2

The `VkPhysicalDeviceLayeredDriverPropertiesMSFT` structure is defined as:

    // Provided by VK_MSFT_layered_driver
    typedef struct VkPhysicalDeviceLayeredDriverPropertiesMSFT {
        VkStructureType                     sType;
        void*                               pNext;
        VkLayeredDriverUnderlyingApiMSFT    underlyingAPI;
    } VkPhysicalDeviceLayeredDriverPropertiesMSFT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `underlyingAPI` is a VkLayeredDriverUnderlyingApiMSFT value indicating which underlying API is used to implement the layered driver, or VK_LAYERED_DRIVER_UNDERLYING_API_NONE_MSFT if the driver is not layered.

These are properties of the driver layering information of a physical device.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceLayeredDriverPropertiesMSFT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LAYERED_DRIVER_PROPERTIES_MSFT

Structure Chaining

Extends the structure

  - VkPhysicalDeviceProperties2

Underlying APIs which may be returned in VkPhysicalDeviceLayeredDriverPropertiesMSFT::`underlyingAPI` are:

    // Provided by VK_MSFT_layered_driver
    typedef enum VkLayeredDriverUnderlyingApiMSFT {
        VK_LAYERED_DRIVER_UNDERLYING_API_NONE_MSFT = 0,
        VK_LAYERED_DRIVER_UNDERLYING_API_D3D12_MSFT = 1,
    } VkLayeredDriverUnderlyingApiMSFT;

The `VkPhysicalDeviceSchedulingControlsPropertiesARM` structure is defined as:

    // Provided by VK_ARM_scheduling_controls
    typedef struct VkPhysicalDeviceSchedulingControlsPropertiesARM {
        VkStructureType                               sType;
        void*                                         pNext;
        VkPhysicalDeviceSchedulingControlsFlagsARM    schedulingControlsFlags;
    } VkPhysicalDeviceSchedulingControlsPropertiesARM;

- `schedulingControlsFlags` specifies the specific scheduling controls that a physical device supports.

If the `VkPhysicalDeviceSchedulingControlsPropertiesARM` structure is included in the `pNext` chain of the VkPhysicalDeviceProperties2 structure passed to vkGetPhysicalDeviceProperties2, it is filled in with each corresponding implementation-dependent property.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceSchedulingControlsPropertiesARM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCHEDULING_CONTROLS_PROPERTIES_ARM

Structure Chaining

Extends the structure

  - VkPhysicalDeviceProperties2

Bits which can be set in VkPhysicalDeviceSchedulingControlsPropertiesARM::`schedulingControlsFlags`, specifying supported scheduling controls, are:

    // Provided by VK_ARM_scheduling_controls
    // Flag bits for VkPhysicalDeviceSchedulingControlsFlagBitsARM
    typedef VkFlags64 VkPhysicalDeviceSchedulingControlsFlagBitsARM;
    static const VkPhysicalDeviceSchedulingControlsFlagBitsARM VK_PHYSICAL_DEVICE_SCHEDULING_CONTROLS_SHADER_CORE_COUNT_ARM = 0x00000001ULL;
    static const VkPhysicalDeviceSchedulingControlsFlagBitsARM VK_PHYSICAL_DEVICE_SCHEDULING_CONTROLS_DISPATCH_PARAMETERS_ARM = 0x00000002ULL;

- VK_PHYSICAL_DEVICE_SCHEDULING_CONTROLS_SHADER_CORE_COUNT_ARM specifies that a VkDeviceQueueShaderCoreControlCreateInfoARM structure may be included in the `pNext` chain of a VkDeviceQueueCreateInfo or VkDeviceCreateInfo structure.

- VK_PHYSICAL_DEVICE_SCHEDULING_CONTROLS_DISPATCH_PARAMETERS_ARM specifies that a vkCmdSetDispatchParametersARM command may be recorded in a command buffer and that properties returned in VkPhysicalDeviceSchedulingControlsDispatchParametersPropertiesARM are valid.

    // Provided by VK_ARM_scheduling_controls
    typedef VkFlags64 VkPhysicalDeviceSchedulingControlsFlagsARM;

`VkPhysicalDeviceSchedulingControlsFlagsARM` is a bitmask type for setting a mask of zero or more VkPhysicalDeviceSchedulingControlsFlagBitsARM.

The `VkPhysicalDeviceSchedulingControlsDispatchParametersPropertiesARM` structure is defined as:

    // Provided by VK_ARM_scheduling_controls
    typedef struct VkPhysicalDeviceSchedulingControlsDispatchParametersPropertiesARM {
        VkStructureType    sType;
        void*              pNext;
        uint32_t           schedulingControlsMaxWarpsCount;
        uint32_t           schedulingControlsMaxQueuedBatchesCount;
        uint32_t           schedulingControlsMaxWorkGroupBatchSize;
    } VkPhysicalDeviceSchedulingControlsDispatchParametersPropertiesARM;

- `schedulingControlsMaxWarpsCount` specifies the maximum number of warps that a shader core can run concurrently.

- `schedulingControlsMaxQueuedWorkgroupBatchesCount` specifies the maximum number of workgroup batches that a shader core can queue.

- `schedulingControlsMaxWorkGroupBatchSize` specifies the maximum size of workgroup batches that can be requested using VkDispatchParametersARM::`workGroupBatchSize`.

If the `VkPhysicalDeviceSchedulingControlsDispatchParametersPropertiesARM` structure is included in the `pNext` chain of the VkPhysicalDeviceProperties2 structure passed to vkGetPhysicalDeviceProperties2, it is filled in with each corresponding implementation-dependent property.

If VkPhysicalDeviceSchedulingControlsPropertiesARM::`schedulingControlsFlags` does not contain VK_PHYSICAL_DEVICE_SCHEDULING_CONTROLS_DISPATCH_PARAMETERS_ARM then `schedulingControlsMaxWarpCount` and `schedulingControlsMaxQueuedBatchesCount` are undefined.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceSchedulingControlsDispatchParametersPropertiesARM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCHEDULING_CONTROLS_DISPATCH_PARAMETERS_PROPERTIES_ARM

Structure Chaining

Extends the structure

  - VkPhysicalDeviceProperties2

To query properties of queues available on a physical device, call:

Warning | This functionality is superseded by vkGetPhysicalDeviceQueueFamilyProperties2. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_0
    void vkGetPhysicalDeviceQueueFamilyProperties(
        VkPhysicalDevice                            physicalDevice,
        uint32_t*                                   pQueueFamilyPropertyCount,
        VkQueueFamilyProperties*                    pQueueFamilyProperties);

- `physicalDevice` is the handle to the physical device whose properties will be queried.

- `pQueueFamilyPropertyCount` is a pointer to an integer related to the number of queue families available or queried, as described below.

- `pQueueFamilyProperties` is either `NULL` or a pointer to an array of VkQueueFamilyProperties structures.

If `pQueueFamilyProperties` is `NULL`, then the number of queue families available is returned in `pQueueFamilyPropertyCount`. Implementations must support at least one queue family. Otherwise, `pQueueFamilyPropertyCount` must point to a variable set by the application to the number of elements in the `pQueueFamilyProperties` array, and on return the variable is overwritten with the number of structures actually written to `pQueueFamilyProperties`. If `pQueueFamilyPropertyCount` is less than the number of queue families available, at most `pQueueFamilyPropertyCount` structures will be written.

Valid Usage (Implicit)

- VUID-vkGetPhysicalDeviceQueueFamilyProperties-physicalDevice-parameter
  `physicalDevice` must be a valid VkPhysicalDevice handle

- VUID-vkGetPhysicalDeviceQueueFamilyProperties-pQueueFamilyPropertyCount-parameter
  `pQueueFamilyPropertyCount` must be a valid pointer to a `uint32_t` value

- VUID-vkGetPhysicalDeviceQueueFamilyProperties-pQueueFamilyProperties-parameter
  If the value referenced by `pQueueFamilyPropertyCount` is not `0`, and `pQueueFamilyProperties` is not `NULL`, `pQueueFamilyProperties` must be a valid pointer to an array of `pQueueFamilyPropertyCount` VkQueueFamilyProperties structures

The `VkQueueFamilyProperties` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkQueueFamilyProperties {
        VkQueueFlags    queueFlags;
        uint32_t        queueCount;
        uint32_t        timestampValidBits;
        VkExtent3D      minImageTransferGranularity;
    } VkQueueFamilyProperties;

- `queueFlags` is a bitmask of VkQueueFlagBits indicating capabilities of the queues in this queue family.

- `queueCount` is the unsigned integer count of queues in this queue family. Each queue family must support at least one queue.

- `timestampValidBits` is the unsigned integer count of meaningful bits in the timestamps written via vkCmdWriteTimestamp2 or vkCmdWriteTimestamp. The valid range for the count is 36 to 64 bits, or a value of 0, indicating no support for timestamps. Bits outside the valid range are guaranteed to be zeros.

- `minImageTransferGranularity` is the minimum granularity supported for image transfer operations on the queues in this queue family.

The value returned in `minImageTransferGranularity` has a unit of compressed texel blocks for images having a block-compressed format, and a unit of texels otherwise.

Possible values of `minImageTransferGranularity` are:

- (0,0,0) specifies that only whole mip levels must be transferred using the image transfer operations on the corresponding queues. In this case, the following restrictions apply to all offset and extent parameters of image transfer operations:

  - The `x`, `y`, and `z` members of a VkOffset3D parameter must always be zero.

  - The `width`, `height`, and `depth` members of a VkExtent3D parameter must always match the width, height, and depth of the image subresource corresponding to the parameter, respectively.

- (Ax, Ay, Az) where Ax, Ay, and Az are all integer powers of two. In this case the following restrictions apply to all image transfer operations:

  - `x`, `y`, and `z` of a VkOffset3D parameter must be integer multiples of Ax, Ay, and Az, respectively.

  - `width` of a VkExtent3D parameter must be an integer multiple of Ax, or else `x` + `width` must equal the width of the image subresource corresponding to the parameter.

  - `height` of a VkExtent3D parameter must be an integer multiple of Ay, or else `y` + `height` must equal the height of the image subresource corresponding to the parameter.

  - `depth` of a VkExtent3D parameter must be an integer multiple of Az, or else `z` + `depth` must equal the depth of the image subresource corresponding to the parameter.

  - If the format of the image corresponding to the parameters is one of the block-compressed formats then for the purposes of the above calculations the granularity must be scaled up by the compressed texel block dimensions.

Queues supporting graphics and/or compute and/or, if the `maintenance11` feature is supported, transfer operations, must report (1,1,1) in `minImageTransferGranularity`, meaning that there are no additional restrictions on the granularity of image transfer operations for these queues. Other queues supporting image transfer operations are only required to support whole mip level transfers, thus `minImageTransferGranularity` for queues belonging to such queue families may be (0,0,0).

If the `maintenance11` feature is supported, VkQueueFamilyOptimalImageTransferGranularityPropertiesKHR::`optimalImageTransferGranularity` can be used to determine the optimal image transfer granularity for a particular queue family.

The Device Memory section describes memory properties queried from the physical device.

For physical device feature queries see the Features chapter.

Bits which may be set in VkQueueFamilyProperties::`queueFlags`, indicating capabilities of queues in a queue family are:

    // Provided by VK_VERSION_1_0
    typedef enum VkQueueFlagBits {
        VK_QUEUE_GRAPHICS_BIT = 0x00000001,
        VK_QUEUE_COMPUTE_BIT = 0x00000002,
        VK_QUEUE_TRANSFER_BIT = 0x00000004,
        VK_QUEUE_SPARSE_BINDING_BIT = 0x00000008,
      // Provided by VK_VERSION_1_1
        VK_QUEUE_PROTECTED_BIT = 0x00000010,
      // Provided by VK_KHR_video_decode_queue
        VK_QUEUE_VIDEO_DECODE_BIT_KHR = 0x00000020,
      // Provided by VK_KHR_video_encode_queue
        VK_QUEUE_VIDEO_ENCODE_BIT_KHR = 0x00000040,
      // Provided by VK_NV_optical_flow
        VK_QUEUE_OPTICAL_FLOW_BIT_NV = 0x00000100,
      // Provided by VK_ARM_data_graph
        VK_QUEUE_DATA_GRAPH_BIT_ARM = 0x00000400,
    } VkQueueFlagBits;

- VK_QUEUE_GRAPHICS_BIT specifies that queues in this queue family support graphics operations.

- VK_QUEUE_COMPUTE_BIT specifies that queues in this queue family support compute operations.

- VK_QUEUE_TRANSFER_BIT specifies that queues in this queue family support transfer operations.

- VK_QUEUE_SPARSE_BINDING_BIT specifies that queues in this queue family support sparse memory management operations (see Sparse Resources). If any of the sparse resource features are supported, then at least one queue family must support this bit.

- VK_QUEUE_VIDEO_DECODE_BIT_KHR specifies that queues in this queue family support video decode operations.

- VK_QUEUE_VIDEO_ENCODE_BIT_KHR specifies that queues in this queue family support video encode operations.

- VK_QUEUE_OPTICAL_FLOW_BIT_NV specifies that queues in this queue family support optical flow operations.

- VK_QUEUE_DATA_GRAPH_BIT_ARM specifies that queues in this queue family support data graph operations.

- VK_QUEUE_PROTECTED_BIT specifies that queues in this queue family support the VK_DEVICE_QUEUE_CREATE_PROTECTED_BIT bit. (see Protected Memory). If the physical device supports the `protectedMemory` feature, at least one of its queue families must support this bit.

At least one queue family of at least one physical device exposed by the implementation must support at least one of the following sets of operations:

- graphics operations

- compute operations

- video encode operations

- video decode operations

If an implementation exposes any queue family that supports graphics operations, at least one queue family of at least one physical device exposed by the implementation must support both graphics and compute operations.

Furthermore, if the `protectedMemory` physical device feature is supported, then at least one queue family of at least one physical device exposed by the implementation must support graphics operations, compute operations, and protected memory operations.

Note | All commands that are allowed on a queue that supports transfer operations are also allowed on a queue that supports either graphics or compute operations. Thus, if the capabilities of a queue family include VK_QUEUE_GRAPHICS_BIT or VK_QUEUE_COMPUTE_BIT, then reporting the VK_QUEUE_TRANSFER_BIT capability separately for that queue family is optional.

For further details see Queues.

    // Provided by VK_VERSION_1_0
    typedef VkFlags VkQueueFlags;

`VkQueueFlags` is a bitmask type for setting a mask of zero or more VkQueueFlagBits.

To query properties of queues available on a physical device, call:

    // Provided by VK_VERSION_1_1
    void vkGetPhysicalDeviceQueueFamilyProperties2(
        VkPhysicalDevice                            physicalDevice,
        uint32_t*                                   pQueueFamilyPropertyCount,
        VkQueueFamilyProperties2*                   pQueueFamilyProperties);

    // Provided by VK_KHR_get_physical_device_properties2
    // Equivalent to vkGetPhysicalDeviceQueueFamilyProperties2
    void vkGetPhysicalDeviceQueueFamilyProperties2KHR(
        VkPhysicalDevice                            physicalDevice,
        uint32_t*                                   pQueueFamilyPropertyCount,
        VkQueueFamilyProperties2*                   pQueueFamilyProperties);

- `physicalDevice` is the handle to the physical device whose properties will be queried.

- `pQueueFamilyPropertyCount` is a pointer to an integer related to the number of queue families available or queried, as described in vkGetPhysicalDeviceQueueFamilyProperties.

- `pQueueFamilyProperties` is either `NULL` or a pointer to an array of VkQueueFamilyProperties2 structures.

`vkGetPhysicalDeviceQueueFamilyProperties2` behaves similarly to vkGetPhysicalDeviceQueueFamilyProperties, with the ability to return extended information in a `pNext` chain of output structures.

Valid Usage (Implicit)

- VUID-vkGetPhysicalDeviceQueueFamilyProperties2-physicalDevice-parameter
  `physicalDevice` must be a valid VkPhysicalDevice handle

- VUID-vkGetPhysicalDeviceQueueFamilyProperties2-pQueueFamilyPropertyCount-parameter
  `pQueueFamilyPropertyCount` must be a valid pointer to a `uint32_t` value

- VUID-vkGetPhysicalDeviceQueueFamilyProperties2-pQueueFamilyProperties-parameter
  If the value referenced by `pQueueFamilyPropertyCount` is not `0`, and `pQueueFamilyProperties` is not `NULL`, `pQueueFamilyProperties` must be a valid pointer to an array of `pQueueFamilyPropertyCount` VkQueueFamilyProperties2 structures

The `VkQueueFamilyProperties2` structure is defined as:

    // Provided by VK_VERSION_1_1
    typedef struct VkQueueFamilyProperties2 {
        VkStructureType            sType;
        void*                      pNext;
        VkQueueFamilyProperties    queueFamilyProperties;
    } VkQueueFamilyProperties2;

    // Provided by VK_KHR_get_physical_device_properties2
    // Equivalent to VkQueueFamilyProperties2
    typedef VkQueueFamilyProperties2 VkQueueFamilyProperties2KHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `queueFamilyProperties` is a VkQueueFamilyProperties structure which is populated with the same values as in vkGetPhysicalDeviceQueueFamilyProperties.

Valid Usage (Implicit)

- VUID-VkQueueFamilyProperties2-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2

- VUID-VkQueueFamilyProperties2-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkQueueFamilyCheckpointProperties2NV, VkQueueFamilyCheckpointPropertiesNV, VkQueueFamilyGlobalPriorityProperties, VkQueueFamilyOptimalImageTransferGranularityPropertiesKHR, VkQueueFamilyOwnershipTransferPropertiesKHR, VkQueueFamilyQueryResultStatusPropertiesKHR, or VkQueueFamilyVideoPropertiesKHR

- VUID-VkQueueFamilyProperties2-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

The VkQueueFamilyGlobalPriorityProperties structure is defined as:

    // Provided by VK_VERSION_1_4
    typedef struct VkQueueFamilyGlobalPriorityProperties {
        VkStructureType          sType;
        void*                    pNext;
        uint32_t                 priorityCount;
        VkQueueGlobalPriority    priorities[VK_MAX_GLOBAL_PRIORITY_SIZE];
    } VkQueueFamilyGlobalPriorityProperties;

    // Provided by VK_KHR_global_priority
    // Equivalent to VkQueueFamilyGlobalPriorityProperties
    typedef VkQueueFamilyGlobalPriorityProperties VkQueueFamilyGlobalPriorityPropertiesKHR;

    // Provided by VK_EXT_global_priority_query
    // Equivalent to VkQueueFamilyGlobalPriorityProperties
    typedef VkQueueFamilyGlobalPriorityProperties VkQueueFamilyGlobalPriorityPropertiesEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `priorityCount` is the number of supported global queue priorities in this queue family, and it must be greater than 0.

- `priorities` is an array of VK_MAX_GLOBAL_PRIORITY_SIZE VkQueueGlobalPriority enums representing all supported global queue priorities in this queue family. The first `priorityCount` elements of the array will be valid.

If the `VkQueueFamilyGlobalPriorityProperties` structure is included in the `pNext` chain of the VkQueueFamilyProperties2 structure passed to vkGetPhysicalDeviceQueueFamilyProperties2, it is filled in with the list of supported global queue priorities for the indicated family.

The valid elements of `priorities` must not contain any duplicate values.

The valid elements of `priorities` must be a continuous sequence of VkQueueGlobalPriority enums in ascending order.

Note | For example, returning `priorityCount` as 3 with supported `priorities` as VK_QUEUE_GLOBAL_PRIORITY_LOW, VK_QUEUE_GLOBAL_PRIORITY_MEDIUM and VK_QUEUE_GLOBAL_PRIORITY_REALTIME is not allowed.

Valid Usage (Implicit)

- VUID-VkQueueFamilyGlobalPriorityProperties-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES

Structure Chaining

Extends the structure

  - VkQueueFamilyProperties2

VK_MAX_GLOBAL_PRIORITY_SIZE is the length of an array of VkQueueGlobalPriority enumerants representing supported queue priorities, as returned in VkQueueFamilyGlobalPriorityProperties::`priorities`.

    #define VK_MAX_GLOBAL_PRIORITY_SIZE       16U

    #define VK_MAX_GLOBAL_PRIORITY_SIZE_KHR   VK_MAX_GLOBAL_PRIORITY_SIZE

    #define VK_MAX_GLOBAL_PRIORITY_SIZE_EXT   VK_MAX_GLOBAL_PRIORITY_SIZE

The VkQueueFamilyCheckpointProperties2NV structure is defined as:

    // Provided by VK_NV_device_diagnostic_checkpoints with VK_VERSION_1_3 or VK_KHR_synchronization2
    typedef struct VkQueueFamilyCheckpointProperties2NV {
        VkStructureType          sType;
        void*                    pNext;
        VkPipelineStageFlags2    checkpointExecutionStageMask;
    } VkQueueFamilyCheckpointProperties2NV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `checkpointExecutionStageMask` is a mask indicating which pipeline stages the implementation can execute checkpoint markers in.

Additional queue family information can be queried by setting VkQueueFamilyProperties2::`pNext` to point to a `VkQueueFamilyCheckpointProperties2NV` structure.

Valid Usage (Implicit)

- VUID-VkQueueFamilyCheckpointProperties2NV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_QUEUE_FAMILY_CHECKPOINT_PROPERTIES_2_NV

Structure Chaining

Extends the structure

  - VkQueueFamilyProperties2

The VkQueueFamilyCheckpointPropertiesNV structure is defined as:

    // Provided by VK_NV_device_diagnostic_checkpoints
    typedef struct VkQueueFamilyCheckpointPropertiesNV {
        VkStructureType         sType;
        void*                   pNext;
        VkPipelineStageFlags    checkpointExecutionStageMask;
    } VkQueueFamilyCheckpointPropertiesNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `checkpointExecutionStageMask` is a mask indicating which pipeline stages the implementation can execute checkpoint markers in.

Additional queue family information can be queried by setting VkQueueFamilyProperties2::`pNext` to point to a `VkQueueFamilyCheckpointPropertiesNV` structure.

Valid Usage (Implicit)

- VUID-VkQueueFamilyCheckpointPropertiesNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_QUEUE_FAMILY_CHECKPOINT_PROPERTIES_NV

Structure Chaining

Extends the structure

  - VkQueueFamilyProperties2

The VkQueueFamilyVideoPropertiesKHR structure is defined as:

    // Provided by VK_KHR_video_queue
    typedef struct VkQueueFamilyVideoPropertiesKHR {
        VkStructureType                  sType;
        void*                            pNext;
        VkVideoCodecOperationFlagsKHR    videoCodecOperations;
    } VkQueueFamilyVideoPropertiesKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `videoCodecOperations` is a bitmask of VkVideoCodecOperationFlagBitsKHR that indicates the set of video codec operations supported by the queue family.

If this structure is included in the `pNext` chain of the VkQueueFamilyProperties2 structure passed to vkGetPhysicalDeviceQueueFamilyProperties2, then it is filled with the set of video codec operations supported by the specified queue family.

Valid Usage (Implicit)

- VUID-VkQueueFamilyVideoPropertiesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_QUEUE_FAMILY_VIDEO_PROPERTIES_KHR

Structure Chaining

Extends the structure

  - VkQueueFamilyProperties2

The VkQueueFamilyQueryResultStatusPropertiesKHR structure is defined as:

    // Provided by VK_KHR_video_queue
    typedef struct VkQueueFamilyQueryResultStatusPropertiesKHR {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           queryResultStatusSupport;
    } VkQueueFamilyQueryResultStatusPropertiesKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `queryResultStatusSupport` reports VK_TRUE if query type VK_QUERY_TYPE_RESULT_STATUS_ONLY_KHR and use of VK_QUERY_RESULT_WITH_STATUS_BIT_KHR are supported.

If this structure is included in the `pNext` chain of the VkQueueFamilyProperties2 structure passed to vkGetPhysicalDeviceQueueFamilyProperties2, then it is filled with information about whether result status queries are supported by the specified queue family.

Valid Usage (Implicit)

- VUID-VkQueueFamilyQueryResultStatusPropertiesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_QUEUE_FAMILY_QUERY_RESULT_STATUS_PROPERTIES_KHR

Structure Chaining

Extends the structure

  - VkQueueFamilyProperties2

To enumerate the performance query counters available on a queue family of a physical device, call:

    // Provided by VK_KHR_performance_query
    VkResult vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR(
        VkPhysicalDevice                            physicalDevice,
        uint32_t                                    queueFamilyIndex,
        uint32_t*                                   pCounterCount,
        VkPerformanceCounterKHR*                    pCounters,
        VkPerformanceCounterDescriptionKHR*         pCounterDescriptions);

- `physicalDevice` is the handle to the physical device whose queue family performance query counter properties will be queried.

- `queueFamilyIndex` is the index into the queue family of the physical device we want to get properties for.

- `pCounterCount` is a pointer to an integer related to the number of counters available or queried, as described below.

- `pCounters` is either `NULL` or a pointer to an array of VkPerformanceCounterKHR structures.

- `pCounterDescriptions` is either `NULL` or a pointer to an array of VkPerformanceCounterDescriptionKHR structures.

If `pCounters` is `NULL` and `pCounterDescriptions` is `NULL`, then the number of counters available is returned in `pCounterCount`. Otherwise, `pCounterCount` must point to a variable set by the application to the number of elements in the `pCounters`, `pCounterDescriptions`, or both arrays and on return the variable is overwritten with the number of structures actually written out. If `pCounterCount` is less than the number of counters available, at most `pCounterCount` structures will be written, and VK_INCOMPLETE will be returned instead of VK_SUCCESS, to indicate that not all the available counters were returned.

Valid Usage (Implicit)

- VUID-vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR-physicalDevice-parameter
  `physicalDevice` must be a valid VkPhysicalDevice handle

- VUID-vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR-pCounterCount-parameter
  `pCounterCount` must be a valid pointer to a `uint32_t` value

- VUID-vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR-pCounters-parameter
  If the value referenced by `pCounterCount` is not `0`, and `pCounters` is not `NULL`, `pCounters` must be a valid pointer to an array of `pCounterCount` VkPerformanceCounterKHR structures

- VUID-vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR-pCounterDescriptions-parameter
  If the value referenced by `pCounterCount` is not `0`, and `pCounterDescriptions` is not `NULL`, `pCounterDescriptions` must be a valid pointer to an array of `pCounterCount` VkPerformanceCounterDescriptionKHR structures

Return Codes

Success

  - VK_INCOMPLETE

  - VK_SUCCESS

Failure

  - VK_ERROR_INITIALIZATION_FAILED

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkPerformanceCounterKHR` structure is defined as:

    // Provided by VK_KHR_performance_query
    typedef struct VkPerformanceCounterKHR {
        VkStructureType                   sType;
        void*                             pNext;
        VkPerformanceCounterUnitKHR       unit;
        VkPerformanceCounterScopeKHR      scope;
        VkPerformanceCounterStorageKHR    storage;
        uint8_t                           uuid[VK_UUID_SIZE];
    } VkPerformanceCounterKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `unit` is a VkPerformanceCounterUnitKHR specifying the unit that the counter data will record.

- `scope` is a VkPerformanceCounterScopeKHR specifying the scope that the counter belongs to.

- `storage` is a VkPerformanceCounterStorageKHR specifying the storage type that the counter’s data uses.

- `uuid` is an array of size VK_UUID_SIZE, containing 8-bit values that represent a universally unique identifier for the counter of the physical device.

Valid Usage (Implicit)

- VUID-VkPerformanceCounterKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PERFORMANCE_COUNTER_KHR

- VUID-VkPerformanceCounterKHR-pNext-pNext
  `pNext` must be `NULL`

Performance counters have an associated unit. This unit describes how to interpret the performance counter result.

The performance counter unit types which may be returned in VkPerformanceCounterKHR::`unit` are:

    // Provided by VK_KHR_performance_query
    typedef enum VkPerformanceCounterUnitKHR {
        VK_PERFORMANCE_COUNTER_UNIT_GENERIC_KHR = 0,
        VK_PERFORMANCE_COUNTER_UNIT_PERCENTAGE_KHR = 1,
        VK_PERFORMANCE_COUNTER_UNIT_NANOSECONDS_KHR = 2,
        VK_PERFORMANCE_COUNTER_UNIT_BYTES_KHR = 3,
        VK_PERFORMANCE_COUNTER_UNIT_BYTES_PER_SECOND_KHR = 4,
        VK_PERFORMANCE_COUNTER_UNIT_KELVIN_KHR = 5,
        VK_PERFORMANCE_COUNTER_UNIT_WATTS_KHR = 6,
        VK_PERFORMANCE_COUNTER_UNIT_VOLTS_KHR = 7,
        VK_PERFORMANCE_COUNTER_UNIT_AMPS_KHR = 8,
        VK_PERFORMANCE_COUNTER_UNIT_HERTZ_KHR = 9,
        VK_PERFORMANCE_COUNTER_UNIT_CYCLES_KHR = 10,
    } VkPerformanceCounterUnitKHR;

- VK_PERFORMANCE_COUNTER_UNIT_GENERIC_KHR - the performance counter unit is a generic data point.

- VK_PERFORMANCE_COUNTER_UNIT_PERCENTAGE_KHR - the performance counter unit is a percentage (%).

- VK_PERFORMANCE_COUNTER_UNIT_NANOSECONDS_KHR - the performance counter unit is a value of nanoseconds (ns).

- VK_PERFORMANCE_COUNTER_UNIT_BYTES_KHR - the performance counter unit is a value of bytes.

- VK_PERFORMANCE_COUNTER_UNIT_BYTES_PER_SECOND_KHR - the performance counter unit is a value of bytes/s.

- VK_PERFORMANCE_COUNTER_UNIT_KELVIN_KHR - the performance counter unit is a temperature reported in Kelvin.

- VK_PERFORMANCE_COUNTER_UNIT_WATTS_KHR - the performance counter unit is a value of watts (W).

- VK_PERFORMANCE_COUNTER_UNIT_VOLTS_KHR - the performance counter unit is a value of volts (V).

- VK_PERFORMANCE_COUNTER_UNIT_AMPS_KHR - the performance counter unit is a value of amps (A).

- VK_PERFORMANCE_COUNTER_UNIT_HERTZ_KHR - the performance counter unit is a value of hertz (Hz).

- VK_PERFORMANCE_COUNTER_UNIT_CYCLES_KHR - the performance counter unit is a value of cycles.

Performance counters have an associated scope. This scope describes the granularity of a performance counter.

The performance counter scope types which may be returned in VkPerformanceCounterKHR::`scope` are:

    // Provided by VK_KHR_performance_query
    typedef enum VkPerformanceCounterScopeKHR {
        VK_PERFORMANCE_COUNTER_SCOPE_COMMAND_BUFFER_KHR = 0,
        VK_PERFORMANCE_COUNTER_SCOPE_RENDER_PASS_KHR = 1,
        VK_PERFORMANCE_COUNTER_SCOPE_COMMAND_KHR = 2,
      // VK_QUERY_SCOPE_COMMAND_BUFFER_KHR is a legacy alias
        VK_QUERY_SCOPE_COMMAND_BUFFER_KHR = VK_PERFORMANCE_COUNTER_SCOPE_COMMAND_BUFFER_KHR,
      // VK_QUERY_SCOPE_RENDER_PASS_KHR is a legacy alias
        VK_QUERY_SCOPE_RENDER_PASS_KHR = VK_PERFORMANCE_COUNTER_SCOPE_RENDER_PASS_KHR,
      // VK_QUERY_SCOPE_COMMAND_KHR is a legacy alias
        VK_QUERY_SCOPE_COMMAND_KHR = VK_PERFORMANCE_COUNTER_SCOPE_COMMAND_KHR,
    } VkPerformanceCounterScopeKHR;

- VK_PERFORMANCE_COUNTER_SCOPE_COMMAND_BUFFER_KHR - the performance counter scope is a single complete command buffer.

- VK_PERFORMANCE_COUNTER_SCOPE_RENDER_PASS_KHR - the performance counter scope is zero or more complete render passes. The performance query containing the performance counter must begin and end outside a render pass instance.

- VK_PERFORMANCE_COUNTER_SCOPE_COMMAND_KHR - the performance counter scope is zero or more commands.

Performance counters have an associated storage. This storage describes the payload of a counter result.

The performance counter storage types which may be returned in VkPerformanceCounterKHR::`storage` are:

    // Provided by VK_KHR_performance_query
    typedef enum VkPerformanceCounterStorageKHR {
        VK_PERFORMANCE_COUNTER_STORAGE_INT32_KHR = 0,
        VK_PERFORMANCE_COUNTER_STORAGE_INT64_KHR = 1,
        VK_PERFORMANCE_COUNTER_STORAGE_UINT32_KHR = 2,
        VK_PERFORMANCE_COUNTER_STORAGE_UINT64_KHR = 3,
        VK_PERFORMANCE_COUNTER_STORAGE_FLOAT32_KHR = 4,
        VK_PERFORMANCE_COUNTER_STORAGE_FLOAT64_KHR = 5,
    } VkPerformanceCounterStorageKHR;

- VK_PERFORMANCE_COUNTER_STORAGE_INT32_KHR - the performance counter storage is a 32-bit signed integer.

- VK_PERFORMANCE_COUNTER_STORAGE_INT64_KHR - the performance counter storage is a 64-bit signed integer.

- VK_PERFORMANCE_COUNTER_STORAGE_UINT32_KHR - the performance counter storage is a 32-bit unsigned integer.

- VK_PERFORMANCE_COUNTER_STORAGE_UINT64_KHR - the performance counter storage is a 64-bit unsigned integer.

- VK_PERFORMANCE_COUNTER_STORAGE_FLOAT32_KHR - the performance counter storage is a 32-bit floating-point.

- VK_PERFORMANCE_COUNTER_STORAGE_FLOAT64_KHR - the performance counter storage is a 64-bit floating-point.

The `VkPerformanceCounterDescriptionKHR` structure is defined as:

    // Provided by VK_KHR_performance_query
    typedef struct VkPerformanceCounterDescriptionKHR {
        VkStructureType                            sType;
        void*                                      pNext;
        VkPerformanceCounterDescriptionFlagsKHR    flags;
        char                                       name[VK_MAX_DESCRIPTION_SIZE];
        char                                       category[VK_MAX_DESCRIPTION_SIZE];
        char                                       description[VK_MAX_DESCRIPTION_SIZE];
    } VkPerformanceCounterDescriptionKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask of VkPerformanceCounterDescriptionFlagBitsKHR indicating the usage behavior for the counter.

- `name` is an array of size VK_MAX_DESCRIPTION_SIZE, containing a null-terminated UTF-8 string specifying the name of the counter.

- `category` is an array of size VK_MAX_DESCRIPTION_SIZE, containing a null-terminated UTF-8 string specifying the category of the counter.

- `description` is an array of size VK_MAX_DESCRIPTION_SIZE, containing a null-terminated UTF-8 string specifying the description of the counter.

Valid Usage (Implicit)

- VUID-VkPerformanceCounterDescriptionKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PERFORMANCE_COUNTER_DESCRIPTION_KHR

- VUID-VkPerformanceCounterDescriptionKHR-pNext-pNext
  `pNext` must be `NULL`

Bits which can be set in VkPerformanceCounterDescriptionKHR::`flags`, specifying usage behavior of a performance counter, are:

    // Provided by VK_KHR_performance_query
    typedef enum VkPerformanceCounterDescriptionFlagBitsKHR {
        VK_PERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_BIT_KHR = 0x00000001,
        VK_PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_BIT_KHR = 0x00000002,
      // VK_PERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_KHR is a legacy alias
        VK_PERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_KHR = VK_PERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_BIT_KHR,
      // VK_PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_KHR is a legacy alias
        VK_PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_KHR = VK_PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_BIT_KHR,
    } VkPerformanceCounterDescriptionFlagBitsKHR;

- VK_PERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_BIT_KHR specifies that recording the counter may have a noticeable performance impact.

- VK_PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_BIT_KHR specifies that concurrently recording the counter while other submitted command buffers are running may impact the accuracy of the recording.

    // Provided by VK_KHR_performance_query
    typedef VkFlags VkPerformanceCounterDescriptionFlagsKHR;

VkPerformanceCounterDescriptionFlagsKHR is a bitmask type for setting a mask of zero or more VkPerformanceCounterDescriptionFlagBitsKHR.

The VkQueueFamilyOwnershipTransferPropertiesKHR structure is defined as:

    // Provided by VK_KHR_maintenance9
    typedef struct VkQueueFamilyOwnershipTransferPropertiesKHR {
        VkStructureType    sType;
        void*              pNext;
        uint32_t           optimalImageTransferToQueueFamilies;
    } VkQueueFamilyOwnershipTransferPropertiesKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `optimalImageTransferToQueueFamilies` is a bitmask of queue family indices that indicates which queue families belonging to the same logical device support implicitly acquiring optimal image resources owned by this queue family, without the resources' contents becoming undefined.

If this structure is included in the `pNext` chain of the VkQueueFamilyProperties2 structure passed to vkGetPhysicalDeviceQueueFamilyProperties2, then it is filled with the queue family ownership properties for the specified queue family.

Valid Usage (Implicit)

- VUID-VkQueueFamilyOwnershipTransferPropertiesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_QUEUE_FAMILY_OWNERSHIP_TRANSFER_PROPERTIES_KHR

Structure Chaining

Extends the structure

  - VkQueueFamilyProperties2

The VkQueueFamilyOptimalImageTransferGranularityPropertiesKHR structure is defined as:

    // Provided by VK_KHR_maintenance11
    typedef struct VkQueueFamilyOptimalImageTransferGranularityPropertiesKHR {
        VkStructureType    sType;
        void*              pNext;
        VkExtent3D         optimalImageTransferGranularity;
    } VkQueueFamilyOptimalImageTransferGranularityPropertiesKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `optimalImageTransferGranularity` is the optimal granularity for image copy operations in this queue family.

If this structure is included in the `pNext` chain of the VkQueueFamilyProperties2 structure passed to vkGetPhysicalDeviceQueueFamilyProperties2, then it is filled with the optimal image transfer granularity for the specified queue family.

The value returned in `optimalImageTransferGranularity` has a unit of compressed texel blocks for images having a block-compressed format, and a unit of texels otherwise.

Possible values of `optimalImageTransferGranularity` are:

- (0,0,0) specifies that an image copy operation is optimal only when copying whole mip levels, i.e. all of the following conditions are met:

  - The `x`, `y`, and `z` members of a VkOffset3D are zero.

  - The `width`, `height`, and `depth` members of a VkExtent3D parameter match the width, height, and depth of the image subresource corresponding to the parameter, respectively.

- (Ax, Ay, Az) where Ax, Ay, and Az are all integer powers of two. An image copy operation is optimal when all of the following conditions are met:

  - `width` of a VkExtent3D parameter is an integer multiple of Ax, or else `x` + `width` equals the width of the image subresource corresponding to the parameter.

  - `height` of a VkExtent3D parameter is an integer multiple of Ay, or else `y` + `height` equals the height of the image subresource corresponding to the parameter.

  - `depth` of a VkExtent3D parameter is an integer multiple of Az, or else `z` + `depth` equals the depth of the image subresource corresponding to the parameter.

  - If the format of the image corresponding to the parameters is one of the block-compressed formats then for the purposes of the above calculations the granularity must be scaled up by the compressed texel block dimensions.

Note | While it is not required that copies are optimal, there may be a performance cost for copies not aligned to `optimalImageTransferGranularity`.

Valid Usage (Implicit)

- VUID-VkQueueFamilyOptimalImageTransferGranularityPropertiesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_QUEUE_FAMILY_OPTIMAL_IMAGE_TRANSFER_GRANULARITY_PROPERTIES_KHR

Structure Chaining

Extends the structure

  - VkQueueFamilyProperties2

To enumerate the by region performance counters available on a queue family of a physical device, call:

    // Provided by VK_ARM_performance_counters_by_region
    VkResult vkEnumeratePhysicalDeviceQueueFamilyPerformanceCountersByRegionARM(
        VkPhysicalDevice                            physicalDevice,
        uint32_t                                    queueFamilyIndex,
        uint32_t*                                   pCounterCount,
        VkPerformanceCounterARM*                    pCounters,
        VkPerformanceCounterDescriptionARM*         pCounterDescriptions);

- `physicalDevice` is the handle to the physical device whose queue family by region performance counter properties will be queried.

- `queueFamilyIndex` is the index into the queue family of the physical device we want to get properties for.

- `pCounterCount` is a pointer to an integer related to the number of counters available or queried, as described below.

- `pCounters` is either `NULL` or a pointer to an array of VkPerformanceCounterARM structures.

- `pCounterDescriptions` is either `NULL` or a pointer to an array of VkPerformanceCounterDescriptionARM structures.

If `pCounters` is `NULL` and `pCounterDescriptions` is `NULL`, then the number of counters available is returned in `pCounterCount`. Otherwise, `pCounterCount` must point to a variable set by the application to the number of elements in the `pCounters`, `pCounterDescriptions`, or both arrays and on return the variable is overwritten with the number of structures actually written out. If `pCounterCount` is less than the number of counters available, at most `pCounterCount` structures will be written, and VK_INCOMPLETE will be returned instead of VK_SUCCESS, to indicate that not all the available counters were returned.

Valid Usage (Implicit)

- VUID-vkEnumeratePhysicalDeviceQueueFamilyPerformanceCountersByRegionARM-physicalDevice-parameter
  `physicalDevice` must be a valid VkPhysicalDevice handle

- VUID-vkEnumeratePhysicalDeviceQueueFamilyPerformanceCountersByRegionARM-pCounterCount-parameter
  `pCounterCount` must be a valid pointer to a `uint32_t` value

- VUID-vkEnumeratePhysicalDeviceQueueFamilyPerformanceCountersByRegionARM-pCounters-parameter
  If the value referenced by `pCounterCount` is not `0`, and `pCounters` is not `NULL`, `pCounters` must be a valid pointer to an array of `pCounterCount` VkPerformanceCounterARM structures

- VUID-vkEnumeratePhysicalDeviceQueueFamilyPerformanceCountersByRegionARM-pCounterDescriptions-parameter
  If the value referenced by `pCounterCount` is not `0`, and `pCounterDescriptions` is not `NULL`, `pCounterDescriptions` must be a valid pointer to an array of `pCounterCount` VkPerformanceCounterDescriptionARM structures

Return Codes

Success

  - VK_INCOMPLETE

  - VK_SUCCESS

Failure

  - VK_ERROR_INITIALIZATION_FAILED

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkPerformanceCounterARM` structure is defined as:

    // Provided by VK_ARM_performance_counters_by_region
    typedef struct VkPerformanceCounterARM {
        VkStructureType    sType;
        void*              pNext;
        uint32_t           counterID;
    } VkPerformanceCounterARM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `counterID` is an identifier for the counter of the physical device.

Valid Usage (Implicit)

- VUID-VkPerformanceCounterARM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PERFORMANCE_COUNTER_ARM

- VUID-VkPerformanceCounterARM-pNext-pNext
  `pNext` must be `NULL`

The `VkPerformanceCounterDescriptionARM` structure is defined as:

    // Provided by VK_ARM_performance_counters_by_region
    typedef struct VkPerformanceCounterDescriptionARM {
        VkStructureType                            sType;
        void*                                      pNext;
        VkPerformanceCounterDescriptionFlagsARM    flags;
        char                                       name[VK_MAX_DESCRIPTION_SIZE];
    } VkPerformanceCounterDescriptionARM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is reserved for future use.

- `name` is an array of size VK_MAX_DESCRIPTION_SIZE, containing a null-terminated UTF-8 string specifying the name of the counter.

Valid Usage (Implicit)

- VUID-VkPerformanceCounterDescriptionARM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PERFORMANCE_COUNTER_DESCRIPTION_ARM

- VUID-VkPerformanceCounterDescriptionARM-pNext-pNext
  `pNext` must be `NULL`

    // Provided by VK_ARM_performance_counters_by_region
    typedef VkFlags VkPerformanceCounterDescriptionFlagsARM;

`VkPerformanceCounterDescriptionFlagsARM` is a bitmask type for setting a mask, but is currently reserved for future use.

### 5.2. Devices

Device objects represent logical connections to physical devices. Each device exposes a number of queue families each having one or more queues. All queues in a queue family support the same operations.

As described in Physical Devices, a Vulkan application will first query for all physical devices in a system. Each physical device can then be queried for its capabilities, including its queue and queue family properties. Once an acceptable physical device is identified, an application will create a corresponding logical device. The created logical device is then the primary interface to the physical device.

How to enumerate the physical devices in a system and query those physical devices for their queue family properties is described in the Physical Device Enumeration section above.

A single logical device can be created from multiple physical devices, if those physical devices belong to the same device group. A device group is a set of physical devices that support accessing each other’s memory and recording a single command buffer that can be executed on all the physical devices. Device groups are enumerated by calling vkEnumeratePhysicalDeviceGroups, and a logical device is created from a subset of the physical devices in a device group by passing the physical devices through VkDeviceGroupDeviceCreateInfo. For two physical devices to be in the same device group, they must support identical extensions, features, and properties.

Note | Physical devices in the same device group must be so similar because there are no rules for how different features/properties would interact. They must return the same values for nearly every invariant `vkGetPhysicalDevice*` feature, property, capability, etc., but could potentially differ for certain queries based on things like having a different display connected, or a different compositor. The specification does not attempt to enumerate which state is in each category, because such a list would quickly become out of date.

To retrieve a list of the device groups present in the system, call:

    // Provided by VK_VERSION_1_1
    VkResult vkEnumeratePhysicalDeviceGroups(
        VkInstance                                  instance,
        uint32_t*                                   pPhysicalDeviceGroupCount,
        VkPhysicalDeviceGroupProperties*            pPhysicalDeviceGroupProperties);

    // Provided by VK_KHR_device_group_creation
    // Equivalent to vkEnumeratePhysicalDeviceGroups
    VkResult vkEnumeratePhysicalDeviceGroupsKHR(
        VkInstance                                  instance,
        uint32_t*                                   pPhysicalDeviceGroupCount,
        VkPhysicalDeviceGroupProperties*            pPhysicalDeviceGroupProperties);

- `instance` is a handle to a Vulkan instance previously created with vkCreateInstance.

- `pPhysicalDeviceGroupCount` is a pointer to an integer related to the number of device groups available or queried, as described below.

- `pPhysicalDeviceGroupProperties` is either `NULL` or a pointer to an array of VkPhysicalDeviceGroupProperties structures.

If `pPhysicalDeviceGroupProperties` is `NULL`, then the number of device groups available is returned in `pPhysicalDeviceGroupCount`. Otherwise, `pPhysicalDeviceGroupCount` must point to a variable set by the application to the number of elements in the `pPhysicalDeviceGroupProperties` array, and on return the variable is overwritten with the number of structures actually written to `pPhysicalDeviceGroupProperties`. If `pPhysicalDeviceGroupCount` is less than the number of device groups available, at most `pPhysicalDeviceGroupCount` structures will be written, and VK_INCOMPLETE will be returned instead of VK_SUCCESS, to indicate that not all the available device groups were returned.

Every physical device must be in exactly one device group.

Valid Usage (Implicit)

- VUID-vkEnumeratePhysicalDeviceGroups-instance-parameter
  `instance` must be a valid VkInstance handle

- VUID-vkEnumeratePhysicalDeviceGroups-pPhysicalDeviceGroupCount-parameter
  `pPhysicalDeviceGroupCount` must be a valid pointer to a `uint32_t` value

- VUID-vkEnumeratePhysicalDeviceGroups-pPhysicalDeviceGroupProperties-parameter
  If the value referenced by `pPhysicalDeviceGroupCount` is not `0`, and `pPhysicalDeviceGroupProperties` is not `NULL`, `pPhysicalDeviceGroupProperties` must be a valid pointer to an array of `pPhysicalDeviceGroupCount` VkPhysicalDeviceGroupProperties structures

Return Codes

Success

  - VK_INCOMPLETE

  - VK_SUCCESS

Failure

  - VK_ERROR_INITIALIZATION_FAILED

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkPhysicalDeviceGroupProperties` structure is defined as:

    // Provided by VK_VERSION_1_1
    typedef struct VkPhysicalDeviceGroupProperties {
        VkStructureType     sType;
        void*               pNext;
        uint32_t            physicalDeviceCount;
        VkPhysicalDevice    physicalDevices[VK_MAX_DEVICE_GROUP_SIZE];
        VkBool32            subsetAllocation;
    } VkPhysicalDeviceGroupProperties;

    // Provided by VK_KHR_device_group_creation
    // Equivalent to VkPhysicalDeviceGroupProperties
    typedef VkPhysicalDeviceGroupProperties VkPhysicalDeviceGroupPropertiesKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `physicalDeviceCount` is the number of physical devices in the group.

- `physicalDevices` is an array of VK_MAX_DEVICE_GROUP_SIZE VkPhysicalDevice handles representing all physical devices in the group. The first `physicalDeviceCount` elements of the array will be valid.

- `subsetAllocation` specifies whether logical devices created from the group support allocating device memory on a subset of devices, via the `deviceMask` member of the VkMemoryAllocateFlagsInfo. If this is VK_FALSE, then all device memory allocations are made across all physical devices in the group. If `physicalDeviceCount` is `1`, then `subsetAllocation` must be VK_FALSE.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceGroupProperties-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES

- VUID-VkPhysicalDeviceGroupProperties-pNext-pNext
  `pNext` must be `NULL`

VK_MAX_DEVICE_GROUP_SIZE is the length of an array containing VkPhysicalDevice handle values representing all physical devices in a group, as returned in VkPhysicalDeviceGroupProperties::`physicalDevices`.

    #define VK_MAX_DEVICE_GROUP_SIZE          32U

    #define VK_MAX_DEVICE_GROUP_SIZE_KHR      VK_MAX_DEVICE_GROUP_SIZE

#### 5.2.1. Device Creation

Logical devices are represented by `VkDevice` handles:

    // Provided by VK_VERSION_1_0
    VK_DEFINE_HANDLE(VkDevice)

A logical device is created as a connection to a physical device. To create a logical device, call:

    // Provided by VK_VERSION_1_0
    VkResult vkCreateDevice(
        VkPhysicalDevice                            physicalDevice,
        const VkDeviceCreateInfo*                   pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkDevice*                                   pDevice);

- `physicalDevice` must be one of the device handles returned from a call to `vkEnumeratePhysicalDevices` (see Physical Device Enumeration).

- `pCreateInfo` is a pointer to a VkDeviceCreateInfo structure containing information about how to create the device.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

- `pDevice` is a pointer to a handle in which the created VkDevice is returned.

`vkCreateDevice` verifies that extensions and features requested in the `ppEnabledExtensionNames` and `pEnabledFeatures` members of `pCreateInfo`, respectively, are supported by the implementation. If any requested extension is not supported, `vkCreateDevice` must return VK_ERROR_EXTENSION_NOT_PRESENT. If any requested feature is not supported, `vkCreateDevice` must return VK_ERROR_FEATURE_NOT_PRESENT. Support for extensions can be checked before creating a device by querying vkEnumerateDeviceExtensionProperties. Support for features can similarly be checked by querying vkGetPhysicalDeviceFeatures.

After verifying and enabling the extensions the `VkDevice` object is created and returned to the application.

Multiple logical devices can be created from the same physical device. Logical device creation may fail due to lack of device-specific resources (in addition to other errors). If that occurs, `vkCreateDevice` will return VK_ERROR_TOO_MANY_OBJECTS.

Valid Usage

- VUID-vkCreateDevice-ppEnabledExtensionNames-01387
  All required device extensions for each extension in the VkDeviceCreateInfo::`ppEnabledExtensionNames` list must also be present in that list

Valid Usage (Implicit)

- VUID-vkCreateDevice-physicalDevice-parameter
  `physicalDevice` must be a valid VkPhysicalDevice handle

- VUID-vkCreateDevice-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkDeviceCreateInfo structure

- VUID-vkCreateDevice-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateDevice-pDevice-parameter
  `pDevice` must be a valid pointer to a VkDevice handle

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_DEVICE_LOST

  - VK_ERROR_EXTENSION_NOT_PRESENT

  - VK_ERROR_FEATURE_NOT_PRESENT

  - VK_ERROR_INITIALIZATION_FAILED

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_TOO_MANY_OBJECTS

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkDeviceCreateInfo` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkDeviceCreateInfo {
        VkStructureType                    sType;
        const void*                        pNext;
        VkDeviceCreateFlags                flags;
        uint32_t                           queueCreateInfoCount;
        const VkDeviceQueueCreateInfo*     pQueueCreateInfos;
        // enabledLayerCount is legacy and not used
        uint32_t                           enabledLayerCount;
        // ppEnabledLayerNames is legacy and not used
        const char* const*                 ppEnabledLayerNames;
        uint32_t                           enabledExtensionCount;
        const char* const*                 ppEnabledExtensionNames;
        const VkPhysicalDeviceFeatures*    pEnabledFeatures;
    } VkDeviceCreateInfo;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is reserved for future use.

- `queueCreateInfoCount` is the unsigned integer size of the `pQueueCreateInfos` array. Refer to the Queue Creation section below for further details.

- `pQueueCreateInfos` is a pointer to an array of VkDeviceQueueCreateInfo structures describing the queues that are requested to be created along with the logical device. Refer to the Queue Creation section below for further details.

- `enabledLayerCount` is legacy and not used. Implementations must not access this parameter. It must be 0. See Device Layers: Superseded via instance layers.

- `ppEnabledLayerNames` is legacy and not used. Implementations must not access this parameter. It must be `NULL`. See Device Layers: Superseded via instance layers.

- `enabledExtensionCount` is the number of device extensions to enable.

- `ppEnabledExtensionNames` is a pointer to an array of `enabledExtensionCount` null-terminated UTF-8 strings containing the names of extensions to enable for the created device. See the Extensions section for further details.

- `pEnabledFeatures` is `NULL` or a pointer to a VkPhysicalDeviceFeatures structure containing boolean indicators of all the features to be enabled. Refer to the Features section for further details. This field is legacy. See Physical Device Queries: Superseded via version 2.

Valid Usage

- VUID-VkDeviceCreateInfo-queueFamilyIndex-02802
  The combination of the values in the `queueFamilyIndex` and `flags` members of each element of `pQueueCreateInfos` must be unique within `pQueueCreateInfos`

- VUID-VkDeviceCreateInfo-pQueueCreateInfos-06755
  If multiple elements of `pQueueCreateInfos` share the same `queueFamilyIndex`, the sum of their `queueCount` members must be less than or equal to the `queueCount` member of the `VkQueueFamilyProperties` structure, as returned by `vkGetPhysicalDeviceQueueFamilyProperties` in the `pQueueFamilyProperties`[queueFamilyIndex]

- VUID-VkDeviceCreateInfo-pQueueCreateInfos-06654
  If multiple elements of `pQueueCreateInfos` share the same `queueFamilyIndex`, then all of such elements must have the same global priority level, which can be specified explicitly by the including a VkDeviceQueueGlobalPriorityCreateInfo structure in the `pNext` chain, or by the implicit default value

- VUID-VkDeviceCreateInfo-pNext-00373
  If the `pNext` chain includes a VkPhysicalDeviceFeatures2 structure, then `pEnabledFeatures` must be `NULL`

- VUID-VkDeviceCreateInfo-ppEnabledExtensionNames-01840
  If VkPhysicalDeviceProperties::`apiVersion` advertises Vulkan 1.1 or later, `ppEnabledExtensionNames` must not contain `VK_AMD_negative_viewport_height`

- VUID-VkDeviceCreateInfo-ppEnabledExtensionNames-00374
  `ppEnabledExtensionNames` must not contain both `VK_KHR_maintenance1` and `VK_AMD_negative_viewport_height`

- VUID-VkDeviceCreateInfo-ppEnabledExtensionNames-03328
  `ppEnabledExtensionNames` must not contain both `VK_KHR_buffer_device_address` and `VK_EXT_buffer_device_address`

- VUID-VkDeviceCreateInfo-pNext-04748
  If the `pNext` chain includes a VkPhysicalDeviceVulkan12Features structure and VkPhysicalDeviceVulkan12Features::`bufferDeviceAddress` is VK_TRUE, `ppEnabledExtensionNames` must not contain `VK_EXT_buffer_device_address`

- VUID-VkDeviceCreateInfo-pNext-02829
  If the `pNext` chain includes a VkPhysicalDeviceVulkan11Features structure, then it must not include a VkPhysicalDevice16BitStorageFeatures, VkPhysicalDeviceMultiviewFeatures, VkPhysicalDeviceVariablePointersFeatures, VkPhysicalDeviceProtectedMemoryFeatures, VkPhysicalDeviceSamplerYcbcrConversionFeatures, or VkPhysicalDeviceShaderDrawParametersFeatures structure

- VUID-VkDeviceCreateInfo-pNext-02830
  If the `pNext` chain includes a VkPhysicalDeviceVulkan12Features structure, then it must not include a VkPhysicalDevice8BitStorageFeatures, VkPhysicalDeviceShaderAtomicInt64Features, VkPhysicalDeviceShaderFloat16Int8Features, VkPhysicalDeviceDescriptorIndexingFeatures, VkPhysicalDeviceScalarBlockLayoutFeatures, VkPhysicalDeviceImagelessFramebufferFeatures, VkPhysicalDeviceUniformBufferStandardLayoutFeatures, VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures, VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures, VkPhysicalDeviceHostQueryResetFeatures, VkPhysicalDeviceTimelineSemaphoreFeatures, VkPhysicalDeviceBufferDeviceAddressFeatures, or VkPhysicalDeviceVulkanMemoryModelFeatures structure

- VUID-VkDeviceCreateInfo-ppEnabledExtensionNames-04476
  If `ppEnabledExtensionNames` contains `"VK_KHR_shader_draw_parameters"` and the `pNext` chain includes a VkPhysicalDeviceVulkan11Features structure, then `VkPhysicalDeviceVulkan11Features`::`shaderDrawParameters` must be VK_TRUE

- VUID-VkDeviceCreateInfo-ppEnabledExtensionNames-02831
  If `ppEnabledExtensionNames` contains `"VK_KHR_draw_indirect_count"` and the `pNext` chain includes a VkPhysicalDeviceVulkan12Features structure, then `VkPhysicalDeviceVulkan12Features`::`drawIndirectCount` must be VK_TRUE

- VUID-VkDeviceCreateInfo-ppEnabledExtensionNames-02832
  If `ppEnabledExtensionNames` contains `"VK_KHR_sampler_mirror_clamp_to_edge"` and the `pNext` chain includes a VkPhysicalDeviceVulkan12Features structure, then `VkPhysicalDeviceVulkan12Features`::`samplerMirrorClampToEdge` must be VK_TRUE

- VUID-VkDeviceCreateInfo-ppEnabledExtensionNames-02833
  If `ppEnabledExtensionNames` contains `"VK_EXT_descriptor_indexing"` and the `pNext` chain includes a VkPhysicalDeviceVulkan12Features structure, then `VkPhysicalDeviceVulkan12Features`::`descriptorIndexing` must be VK_TRUE

- VUID-VkDeviceCreateInfo-ppEnabledExtensionNames-02834
  If `ppEnabledExtensionNames` contains `"VK_EXT_sampler_filter_minmax"` and the `pNext` chain includes a VkPhysicalDeviceVulkan12Features structure, then `VkPhysicalDeviceVulkan12Features`::`samplerFilterMinmax` must be VK_TRUE

- VUID-VkDeviceCreateInfo-ppEnabledExtensionNames-02835
  If `ppEnabledExtensionNames` contains `"VK_EXT_shader_viewport_index_layer"` and the `pNext` chain includes a VkPhysicalDeviceVulkan12Features structure, then `VkPhysicalDeviceVulkan12Features`::`shaderOutputViewportIndex` and `VkPhysicalDeviceVulkan12Features`::`shaderOutputLayer` must both be VK_TRUE

- VUID-VkDeviceCreateInfo-pNext-06532
  If the `pNext` chain includes a VkPhysicalDeviceVulkan13Features structure, then it must not include a VkPhysicalDeviceDynamicRenderingFeatures, VkPhysicalDeviceImageRobustnessFeatures, VkPhysicalDeviceInlineUniformBlockFeatures, VkPhysicalDeviceMaintenance4Features, VkPhysicalDevicePipelineCreationCacheControlFeatures, VkPhysicalDevicePrivateDataFeatures, VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures, VkPhysicalDeviceShaderIntegerDotProductFeatures, VkPhysicalDeviceShaderTerminateInvocationFeatures, VkPhysicalDeviceSubgroupSizeControlFeatures, VkPhysicalDeviceSynchronization2Features, VkPhysicalDeviceTextureCompressionASTCHDRFeatures, or VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures structure

- VUID-VkDeviceCreateInfo-pNext-10360
  If the `pNext` chain includes a VkPhysicalDeviceVulkan14Features structure, then it must not include a VkPhysicalDeviceGlobalPriorityQueryFeatures, VkPhysicalDeviceShaderSubgroupRotateFeatures, VkPhysicalDeviceShaderFloatControls2Features, VkPhysicalDeviceShaderExpectAssumeFeatures, VkPhysicalDeviceLineRasterizationFeatures, VkPhysicalDeviceVertexAttributeDivisorFeatures, VkPhysicalDeviceIndexTypeUint8Features, VkPhysicalDeviceDynamicRenderingLocalReadFeatures, VkPhysicalDeviceMaintenance5Features, VkPhysicalDeviceMaintenance6Features, VkPhysicalDevicePipelineProtectedAccessFeatures, VkPhysicalDevicePipelineRobustnessFeatures, or VkPhysicalDeviceHostImageCopyFeatures structure

- VUID-VkDeviceCreateInfo-ppEnabledExtensionNames-10858
  If `ppEnabledExtensionNames` contains `"VK_KHR_push_descriptor"` and the `pNext` chain includes a VkPhysicalDeviceVulkan14Features structure, then `VkPhysicalDeviceVulkan14Features`::`pushDescriptor` must be VK_TRUE

- VUID-VkDeviceCreateInfo-pProperties-04451
  If the `VK_KHR_portability_subset` extension is included in `pProperties` of vkEnumerateDeviceExtensionProperties, `ppEnabledExtensionNames` must include `"VK_KHR_portability_subset"`

- VUID-VkDeviceCreateInfo-shadingRateImage-04478
  If the `shadingRateImage` feature is enabled, the `pipelineFragmentShadingRate` feature must not be enabled

- VUID-VkDeviceCreateInfo-shadingRateImage-04479
  If the `shadingRateImage` feature is enabled, the `primitiveFragmentShadingRate` feature must not be enabled

- VUID-VkDeviceCreateInfo-shadingRateImage-04480
  If the `shadingRateImage` feature is enabled, the `attachmentFragmentShadingRate` feature must not be enabled

- VUID-VkDeviceCreateInfo-fragmentDensityMap-04481
  If the `fragmentDensityMap` feature is enabled, the `pipelineFragmentShadingRate` feature must not be enabled

- VUID-VkDeviceCreateInfo-fragmentDensityMap-04482
  If the `fragmentDensityMap` feature is enabled, the `primitiveFragmentShadingRate` feature must not be enabled

- VUID-VkDeviceCreateInfo-fragmentDensityMap-04483
  If the `fragmentDensityMap` feature is enabled, the `attachmentFragmentShadingRate` feature must not be enabled

- VUID-VkDeviceCreateInfo-None-04896
  If the `sparseImageInt64Atomics` feature is enabled, `shaderImageInt64Atomics` must be enabled

- VUID-VkDeviceCreateInfo-None-04897
  If the `sparseImageFloat32Atomics` feature is enabled, `shaderImageFloat32Atomics` must be enabled

- VUID-VkDeviceCreateInfo-None-04898
  If the `sparseImageFloat32AtomicAdd` feature is enabled, `shaderImageFloat32AtomicAdd` must be enabled

- VUID-VkDeviceCreateInfo-sparseImageFloat32AtomicMinMax-04975
  If the `sparseImageFloat32AtomicMinMax` feature is enabled, `shaderImageFloat32AtomicMinMax` must be enabled

- VUID-VkDeviceCreateInfo-robustBufferAccess-10247
  If the `robustBufferAccess` feature is enabled, and `robustBufferAccessUpdateAfterBind` is VK_FALSE, then `descriptorBindingUniformBufferUpdateAfterBind`, `descriptorBindingStorageBufferUpdateAfterBind`, `descriptorBindingUniformTexelBufferUpdateAfterBind`, and `descriptorBindingStorageTexelBufferUpdateAfterBind` must not be enabled

- VUID-VkDeviceCreateInfo-None-08095
  If the `descriptorBuffer` feature is enabled, `ppEnabledExtensionNames` must not contain `VK_AMD_shader_fragment_mask`

- VUID-VkDeviceCreateInfo-pNext-09396
  If the `pNext` chain includes a VkDeviceQueueShaderCoreControlCreateInfoARM structure, then it must not be included in the `pNext` chain of any of the VkDeviceQueueCreateInfo structures in `pQueueCreateInfos`

- VUID-VkDeviceCreateInfo-pNext-09397
  If the `pNext` chain includes a VkDeviceQueueShaderCoreControlCreateInfoARM structure then VkPhysicalDeviceSchedulingControlsPropertiesARM::`schedulingControlsFlags` must contain VK_PHYSICAL_DEVICE_SCHEDULING_CONTROLS_SHADER_CORE_COUNT_ARM

- VUID-VkDeviceCreateInfo-None-10778
  If the maintenance9 feature is not supported, `queueCreateInfoCount` must be greater than `0`

- VUID-VkDeviceCreateInfo-queueFamilyIndex-11831
  If any element of pQueueCreateInfos specifies a `queueFamilyIndex` that supports VK_QUEUE_DATA_GRAPH_BIT_ARM and that `queueFamilyIndex` enumerates an engine through vkGetPhysicalDeviceQueueFamilyDataGraphPropertiesARM with `type` VK_PHYSICAL_DEVICE_DATA_GRAPH_PROCESSING_ENGINE_TYPE_NEURAL_QCOM or VK_PHYSICAL_DEVICE_DATA_GRAPH_PROCESSING_ENGINE_TYPE_COMPUTE_QCOM, a VkPhysicalDeviceDataGraphModelFeaturesQCOM structure must be included in `pNext` with dataGraphModel set to VK_TRUE

- VUID-VkDeviceCreateInfo-enabledLayerCount-12384
  `enabledLayerCount` must be 0

- VUID-VkDeviceCreateInfo-ppEnabledLayerNames-12385
  `ppEnabledLayerNames` must be `NULL`

Valid Usage (Implicit)

- VUID-VkDeviceCreateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO

- VUID-VkDeviceCreateInfo-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkDeviceDeviceMemoryReportCreateInfoEXT, VkDeviceDiagnosticsConfigCreateInfoNV, VkDeviceGroupDeviceCreateInfo, VkDeviceMemoryOverallocationCreateInfoAMD, VkDevicePipelineBinaryInternalCacheControlKHR, VkDevicePrivateDataCreateInfo, VkDeviceQueueShaderCoreControlCreateInfoARM, VkExternalComputeQueueDeviceCreateInfoNV, VkPhysicalDevice16BitStorageFeatures, VkPhysicalDevice4444FormatsFeaturesEXT, VkPhysicalDevice8BitStorageFeatures, VkPhysicalDeviceASTCDecodeFeaturesEXT, VkPhysicalDeviceAccelerationStructureFeaturesKHR, VkPhysicalDeviceAddressBindingReportFeaturesEXT, VkPhysicalDeviceAmigoProfilingFeaturesSEC, VkPhysicalDeviceAntiLagFeaturesAMD, VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT, VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT, VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT, VkPhysicalDeviceBorderColorSwizzleFeaturesEXT, VkPhysicalDeviceBufferDeviceAddressFeatures, VkPhysicalDeviceBufferDeviceAddressFeaturesEXT, VkPhysicalDeviceClusterAccelerationStructureFeaturesNV, VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI, VkPhysicalDeviceCoherentMemoryFeaturesAMD, VkPhysicalDeviceColorWriteEnableFeaturesEXT, VkPhysicalDeviceCommandBufferInheritanceFeaturesNV, VkPhysicalDeviceComputeOccupancyPriorityFeaturesNV, VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR, VkPhysicalDeviceConditionalRenderingFeaturesEXT, VkPhysicalDeviceCooperativeMatrix2FeaturesNV, VkPhysicalDeviceCooperativeMatrixConversionFeaturesQCOM, VkPhysicalDeviceCooperativeMatrixDecodeVectorFeaturesNV, VkPhysicalDeviceCooperativeMatrixFeaturesKHR, VkPhysicalDeviceCooperativeMatrixFeaturesNV, VkPhysicalDeviceCooperativeVectorFeaturesNV, VkPhysicalDeviceCopyMemoryIndirectFeaturesKHR, VkPhysicalDeviceCopyMemoryIndirectFeaturesNV, VkPhysicalDeviceCornerSampledImageFeaturesNV, VkPhysicalDeviceCoverageReductionModeFeaturesNV, VkPhysicalDeviceCubicClampFeaturesQCOM, VkPhysicalDeviceCubicWeightsFeaturesQCOM, VkPhysicalDeviceCudaKernelLaunchFeaturesNV, VkPhysicalDeviceCustomBorderColorFeaturesEXT, VkPhysicalDeviceCustomResolveFeaturesEXT, VkPhysicalDeviceDataGraphFeaturesARM, VkPhysicalDeviceDataGraphModelFeaturesQCOM, VkPhysicalDeviceDataGraphNeuralAcceleratorStatisticsFeaturesARM, VkPhysicalDeviceDataGraphOpticalFlowFeaturesARM, VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV, VkPhysicalDeviceDenseGeometryFormatFeaturesAMDX, VkPhysicalDeviceDepthBiasControlFeaturesEXT, VkPhysicalDeviceDepthClampControlFeaturesEXT, VkPhysicalDeviceDepthClampZeroOneFeaturesKHR, VkPhysicalDeviceDepthClipControlFeaturesEXT, VkPhysicalDeviceDepthClipEnableFeaturesEXT, VkPhysicalDeviceDescriptorBufferFeaturesEXT, VkPhysicalDeviceDescriptorBufferTensorFeaturesARM, VkPhysicalDeviceDescriptorHeapFeaturesEXT, VkPhysicalDeviceDescriptorIndexingFeatures, VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV, VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE, VkPhysicalDeviceDeviceAddressCommandsFeaturesKHR, VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV, VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT, VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV, VkPhysicalDeviceDeviceMemoryReportFeaturesEXT, VkPhysicalDeviceDiagnosticsConfigFeaturesNV, VkPhysicalDeviceDisplacementMicromapFeaturesNV, VkPhysicalDeviceDynamicRenderingFeatures, VkPhysicalDeviceDynamicRenderingLocalReadFeatures, VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT, VkPhysicalDeviceElapsedTimerQueryFeaturesQCOM, VkPhysicalDeviceExclusiveScissorFeaturesNV, VkPhysicalDeviceExtendedDynamicState2FeaturesEXT, VkPhysicalDeviceExtendedDynamicState3FeaturesEXT, VkPhysicalDeviceExtendedDynamicStateFeaturesEXT, VkPhysicalDeviceExtendedFlagsFeaturesKHR, VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV, VkPhysicalDeviceExternalFormatResolveFeaturesANDROID, VkPhysicalDeviceExternalMemoryRDMAFeaturesNV, VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX, VkPhysicalDeviceFaultFeaturesEXT, VkPhysicalDeviceFaultFeaturesKHR, VkPhysicalDeviceFeatures2, VkPhysicalDeviceFormatPackFeaturesARM, VkPhysicalDeviceFragmentDensityMap2FeaturesEXT, VkPhysicalDeviceFragmentDensityMapFeaturesEXT, VkPhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE, VkPhysicalDeviceFragmentDensityMapOffsetFeaturesEXT, VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR, VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT, VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV, VkPhysicalDeviceFragmentShadingRateFeaturesKHR, VkPhysicalDeviceFrameBoundaryFeaturesEXT, VkPhysicalDeviceGlobalPriorityQueryFeatures, VkPhysicalDeviceGpaFeaturesAMD, VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT, VkPhysicalDeviceHdrVividFeaturesHUAWEI, VkPhysicalDeviceHostImageCopyFeatures, VkPhysicalDeviceHostQueryResetFeatures, VkPhysicalDeviceImage2DViewOf3DFeaturesEXT, VkPhysicalDeviceImageAlignmentControlFeaturesMESA, VkPhysicalDeviceImageCompressionControlFeaturesEXT, VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT, VkPhysicalDeviceImageProcessing2FeaturesQCOM, VkPhysicalDeviceImageProcessing3FeaturesQCOM, VkPhysicalDeviceImageProcessingFeaturesQCOM, VkPhysicalDeviceImageRobustnessFeatures, VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT, VkPhysicalDeviceImageViewMinLodFeaturesEXT, VkPhysicalDeviceImagelessFramebufferFeatures, VkPhysicalDeviceIndexTypeUint8Features, VkPhysicalDeviceInheritedViewportScissorFeaturesNV, VkPhysicalDeviceInlineUniformBlockFeatures, VkPhysicalDeviceInternallySynchronizedQueuesFeaturesKHR, VkPhysicalDeviceInvocationMaskFeaturesHUAWEI, VkPhysicalDeviceLegacyDitheringFeaturesEXT, VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT, VkPhysicalDeviceLineRasterizationFeatures, VkPhysicalDeviceLinearColorAttachmentFeaturesNV, VkPhysicalDeviceMaintenance10FeaturesKHR, VkPhysicalDeviceMaintenance11FeaturesKHR, VkPhysicalDeviceMaintenance4Features, VkPhysicalDeviceMaintenance5Features, VkPhysicalDeviceMaintenance6Features, VkPhysicalDeviceMaintenance7FeaturesKHR, VkPhysicalDeviceMaintenance8FeaturesKHR, VkPhysicalDeviceMaintenance9FeaturesKHR, VkPhysicalDeviceMapMemoryPlacedFeaturesEXT, VkPhysicalDeviceMemoryDecompressionFeaturesEXT, VkPhysicalDeviceMemoryPriorityFeaturesEXT, VkPhysicalDeviceMeshShaderFeaturesEXT, VkPhysicalDeviceMeshShaderFeaturesNV, VkPhysicalDeviceMultiDrawFeaturesEXT, VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT, VkPhysicalDeviceMultisampledRenderToSwapchainFeaturesEXT, VkPhysicalDeviceMultiviewFeatures, VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM, VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM, VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT, VkPhysicalDeviceNestedCommandBufferFeaturesEXT, VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT, VkPhysicalDeviceOpacityMicromapFeaturesEXT, VkPhysicalDeviceOpacityMicromapFeaturesKHR, VkPhysicalDeviceOpticalFlowFeaturesNV, VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT, VkPhysicalDevicePartitionedAccelerationStructureFeaturesNV, VkPhysicalDevicePerStageDescriptorSetFeaturesNV, VkPhysicalDevicePerformanceCountersByRegionFeaturesARM, VkPhysicalDevicePerformanceQueryFeaturesKHR, VkPhysicalDevicePipelineBinaryFeaturesKHR, VkPhysicalDevicePipelineCacheIncrementalModeFeaturesSEC, VkPhysicalDevicePipelineCreationCacheControlFeatures, VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR, VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT, VkPhysicalDevicePipelineOpacityMicromapFeaturesARM, VkPhysicalDevicePipelinePropertiesFeaturesEXT, VkPhysicalDevicePipelineProtectedAccessFeatures, VkPhysicalDevicePipelineRobustnessFeatures, VkPhysicalDevicePortabilitySubsetFeaturesKHR, VkPhysicalDevicePresentBarrierFeaturesNV, VkPhysicalDevicePresentId2FeaturesKHR, VkPhysicalDevicePresentIdFeaturesKHR, VkPhysicalDevicePresentMeteringFeaturesNV, VkPhysicalDevicePresentModeFifoLatestReadyFeaturesKHR, VkPhysicalDevicePresentTimingFeaturesEXT, VkPhysicalDevicePresentWait2FeaturesKHR, VkPhysicalDevicePresentWaitFeaturesKHR, VkPhysicalDevicePrimitiveRestartIndexFeaturesEXT, VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT, VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT, VkPhysicalDevicePrivateDataFeatures, VkPhysicalDeviceProtectedMemoryFeatures, VkPhysicalDeviceProvokingVertexFeaturesEXT, VkPhysicalDevicePushConstantBankFeaturesNV, VkPhysicalDeviceQueuePerfHintFeaturesQCOM, VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT, VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT, VkPhysicalDeviceRawAccessChainsFeaturesNV, VkPhysicalDeviceRayQueryFeaturesKHR, VkPhysicalDeviceRayTracingInvocationReorderFeaturesEXT, VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV, VkPhysicalDeviceRayTracingLinearSweptSpheresFeaturesNV, VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR, VkPhysicalDeviceRayTracingMotionBlurFeaturesNV, VkPhysicalDeviceRayTracingPipelineFeaturesKHR, VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR, VkPhysicalDeviceRayTracingValidationFeaturesNV, VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG, VkPhysicalDeviceRenderPassStripedFeaturesARM, VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV, VkPhysicalDeviceRobustness2FeaturesKHR, VkPhysicalDeviceSamplerYcbcrConversionFeatures, VkPhysicalDeviceScalarBlockLayoutFeatures, VkPhysicalDeviceSchedulingControlsFeaturesARM, VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures, VkPhysicalDeviceShader64BitIndexingFeaturesEXT, VkPhysicalDeviceShaderAbortFeaturesKHR, VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV, VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT, VkPhysicalDeviceShaderAtomicFloatFeaturesEXT, VkPhysicalDeviceShaderAtomicInt64Features, VkPhysicalDeviceShaderBfloat16FeaturesKHR, VkPhysicalDeviceShaderClockFeaturesKHR, VkPhysicalDeviceShaderConstantDataFeaturesKHR, VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM, VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures, VkPhysicalDeviceShaderDrawParametersFeatures, VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD, VkPhysicalDeviceShaderEnqueueFeaturesAMDX, VkPhysicalDeviceShaderExpectAssumeFeatures, VkPhysicalDeviceShaderFloat16Int8Features, VkPhysicalDeviceShaderFloat8FeaturesEXT, VkPhysicalDeviceShaderFloatControls2Features, VkPhysicalDeviceShaderFmaFeaturesKHR, VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT, VkPhysicalDeviceShaderImageFootprintFeaturesNV, VkPhysicalDeviceShaderInstrumentationFeaturesARM, VkPhysicalDeviceShaderIntegerDotProductFeatures, VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL, VkPhysicalDeviceShaderLongVectorFeaturesEXT, VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR, VkPhysicalDeviceShaderMixedFloatDotProductFeaturesVALVE, VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT, VkPhysicalDeviceShaderMultipleWaitQueuesFeaturesQCOM, VkPhysicalDeviceShaderOCPMicroscalingTypesFeaturesEXT, VkPhysicalDeviceShaderObjectFeaturesEXT, VkPhysicalDeviceShaderQuadControlFeaturesKHR, VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR, VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT, VkPhysicalDeviceShaderSMBuiltinsFeaturesNV, VkPhysicalDeviceShaderSplitBarrierFeaturesEXT, VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures, VkPhysicalDeviceShaderSubgroupPartitionedFeaturesEXT, VkPhysicalDeviceShaderSubgroupRotateFeatures, VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR, VkPhysicalDeviceShaderTerminateInvocationFeatures, VkPhysicalDeviceShaderTileImageFeaturesEXT, VkPhysicalDeviceShaderUniformBufferUnsizedArrayFeaturesEXT, VkPhysicalDeviceShaderUntypedPointersFeaturesKHR, VkPhysicalDeviceShadingRateImageFeaturesNV, VkPhysicalDeviceSubgroupSizeControlFeatures, VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT, VkPhysicalDeviceSubpassShadingFeaturesHUAWEI, VkPhysicalDeviceSwapchainMaintenance1FeaturesKHR, VkPhysicalDeviceSynchronization2Features, VkPhysicalDeviceTensorFeaturesARM, VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT, VkPhysicalDeviceTextureCompressionASTC3DFeaturesEXT, VkPhysicalDeviceTextureCompressionASTCHDRFeatures, VkPhysicalDeviceThrottleHintFeaturesSEC, VkPhysicalDeviceTileMemoryHeapFeaturesQCOM, VkPhysicalDeviceTilePropertiesFeaturesQCOM, VkPhysicalDeviceTileShadingFeaturesQCOM, VkPhysicalDeviceTimelineSemaphoreFeatures, VkPhysicalDeviceTransformFeedbackFeaturesEXT, VkPhysicalDeviceUnifiedImageLayoutsFeaturesKHR, VkPhysicalDeviceUniformBufferStandardLayoutFeatures, VkPhysicalDeviceVariablePointersFeatures, VkPhysicalDeviceVertexAttributeDivisorFeatures, VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT, VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT, VkPhysicalDeviceVideoDecodeVP9FeaturesKHR, VkPhysicalDeviceVideoEncodeAV1FeaturesKHR, VkPhysicalDeviceVideoEncodeFeedback2FeaturesKHR, VkPhysicalDeviceVideoEncodeIntraRefreshFeaturesKHR, VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR, VkPhysicalDeviceVideoEncodeRgbConversionFeaturesVALVE, VkPhysicalDeviceVideoMaintenance1FeaturesKHR, VkPhysicalDeviceVideoMaintenance2FeaturesKHR, VkPhysicalDeviceVulkan11Features, VkPhysicalDeviceVulkan12Features, VkPhysicalDeviceVulkan13Features, VkPhysicalDeviceVulkan14Features, VkPhysicalDeviceVulkanMemoryModelFeatures, VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR, VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT, VkPhysicalDeviceYcbcrDegammaFeaturesQCOM, VkPhysicalDeviceYcbcrImageArraysFeaturesEXT, VkPhysicalDeviceZeroInitializeDeviceMemoryFeaturesEXT, or VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures

- VUID-VkDeviceCreateInfo-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique, with the exception of structures of type VkDeviceDeviceMemoryReportCreateInfoEXT or VkDevicePrivateDataCreateInfo

- VUID-VkDeviceCreateInfo-flags-zerobitmask
  `flags` must be `0`

- VUID-VkDeviceCreateInfo-pQueueCreateInfos-parameter
  If `queueCreateInfoCount` is not `0`, `pQueueCreateInfos` must be a valid pointer to an array of `queueCreateInfoCount` valid VkDeviceQueueCreateInfo structures

- VUID-VkDeviceCreateInfo-ppEnabledExtensionNames-parameter
  If `enabledExtensionCount` is not `0`, `ppEnabledExtensionNames` must be a valid pointer to an array of `enabledExtensionCount` null-terminated UTF-8 strings

- VUID-VkDeviceCreateInfo-pEnabledFeatures-parameter
  If `pEnabledFeatures` is not `NULL`, `pEnabledFeatures` must be a valid pointer to a valid VkPhysicalDeviceFeatures structure

    // Provided by VK_VERSION_1_0
    typedef VkFlags VkDeviceCreateFlags;

`VkDeviceCreateFlags` is a bitmask type for setting a mask, but is currently reserved for future use.

A logical device can be created that connects to one or more physical devices by adding a `VkDeviceGroupDeviceCreateInfo` structure to the `pNext` chain of VkDeviceCreateInfo. The `VkDeviceGroupDeviceCreateInfo` structure is defined as:

    // Provided by VK_VERSION_1_1
    typedef struct VkDeviceGroupDeviceCreateInfo {
        VkStructureType            sType;
        const void*                pNext;
        uint32_t                   physicalDeviceCount;
        const VkPhysicalDevice*    pPhysicalDevices;
    } VkDeviceGroupDeviceCreateInfo;

    // Provided by VK_KHR_device_group_creation
    // Equivalent to VkDeviceGroupDeviceCreateInfo
    typedef VkDeviceGroupDeviceCreateInfo VkDeviceGroupDeviceCreateInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `physicalDeviceCount` is the number of elements in the `pPhysicalDevices` array.

- `pPhysicalDevices` is a pointer to an array of physical device handles belonging to the same device group.

The elements of the `pPhysicalDevices` array are an ordered list of the physical devices that the logical device represents. These must be a subset of a single device group, and need not be in the same order as they were enumerated. The order of the physical devices in the `pPhysicalDevices` array determines the device index of each physical device, with element i being assigned a device index of i. Certain commands and structures refer to one or more physical devices by using device indices or device masks formed using device indices.

A logical device created without using `VkDeviceGroupDeviceCreateInfo`, or with `physicalDeviceCount` equal to zero, is equivalent to a `physicalDeviceCount` of one and `pPhysicalDevices` pointing to the `physicalDevice` parameter to vkCreateDevice. In particular, the device index of that physical device is zero.

Valid Usage

- VUID-VkDeviceGroupDeviceCreateInfo-pPhysicalDevices-00375
  Each element of `pPhysicalDevices` must be unique

- VUID-VkDeviceGroupDeviceCreateInfo-pPhysicalDevices-00376
  All elements of `pPhysicalDevices` must be in the same device group as enumerated by vkEnumeratePhysicalDeviceGroups

- VUID-VkDeviceGroupDeviceCreateInfo-physicalDeviceCount-00377
  If `physicalDeviceCount` is not `0`, the `physicalDevice` parameter of vkCreateDevice must be an element of `pPhysicalDevices`

Valid Usage (Implicit)

- VUID-VkDeviceGroupDeviceCreateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO

- VUID-VkDeviceGroupDeviceCreateInfo-pPhysicalDevices-parameter
  If `physicalDeviceCount` is not `0`, `pPhysicalDevices` must be a valid pointer to an array of `physicalDeviceCount` valid VkPhysicalDevice handles

Structure Chaining

Extends the structure

  - VkDeviceCreateInfo

To specify whether device memory allocation is allowed beyond the size reported by VkPhysicalDeviceMemoryProperties, add a VkDeviceMemoryOverallocationCreateInfoAMD structure to the `pNext` chain of the VkDeviceCreateInfo structure. If this structure is not specified, it is as if the VK_MEMORY_OVERALLOCATION_BEHAVIOR_DEFAULT_AMD value is used.

    // Provided by VK_AMD_memory_overallocation_behavior
    typedef struct VkDeviceMemoryOverallocationCreateInfoAMD {
        VkStructureType                      sType;
        const void*                          pNext;
        VkMemoryOverallocationBehaviorAMD    overallocationBehavior;
    } VkDeviceMemoryOverallocationCreateInfoAMD;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `overallocationBehavior` is the desired overallocation behavior.

Valid Usage (Implicit)

- VUID-VkDeviceMemoryOverallocationCreateInfoAMD-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DEVICE_MEMORY_OVERALLOCATION_CREATE_INFO_AMD

- VUID-VkDeviceMemoryOverallocationCreateInfoAMD-overallocationBehavior-parameter
  `overallocationBehavior` must be a valid VkMemoryOverallocationBehaviorAMD value

Structure Chaining

Extends the structure

  - VkDeviceCreateInfo

Possible values for VkDeviceMemoryOverallocationCreateInfoAMD::`overallocationBehavior` include:

    // Provided by VK_AMD_memory_overallocation_behavior
    typedef enum VkMemoryOverallocationBehaviorAMD {
        VK_MEMORY_OVERALLOCATION_BEHAVIOR_DEFAULT_AMD = 0,
        VK_MEMORY_OVERALLOCATION_BEHAVIOR_ALLOWED_AMD = 1,
        VK_MEMORY_OVERALLOCATION_BEHAVIOR_DISALLOWED_AMD = 2,
    } VkMemoryOverallocationBehaviorAMD;

- VK_MEMORY_OVERALLOCATION_BEHAVIOR_DEFAULT_AMD lets the implementation decide if overallocation is allowed.

- VK_MEMORY_OVERALLOCATION_BEHAVIOR_ALLOWED_AMD specifies overallocation is allowed if platform permits.

- VK_MEMORY_OVERALLOCATION_BEHAVIOR_DISALLOWED_AMD specifies the application is not allowed to allocate device memory beyond the heap sizes reported by VkPhysicalDeviceMemoryProperties. Allocations that are not explicitly made by the application within the scope of the Vulkan instance are not accounted for.

When using the Nsight™ Aftermath SDK, to configure how device crash dumps are created, add a VkDeviceDiagnosticsConfigCreateInfoNV structure to the `pNext` chain of the VkDeviceCreateInfo structure.

    // Provided by VK_NV_device_diagnostics_config
    typedef struct VkDeviceDiagnosticsConfigCreateInfoNV {
        VkStructureType                     sType;
        const void*                         pNext;
        VkDeviceDiagnosticsConfigFlagsNV    flags;
    } VkDeviceDiagnosticsConfigCreateInfoNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask of VkDeviceDiagnosticsConfigFlagBitsNV specifying additional parameters for configuring diagnostic tools.

Valid Usage (Implicit)

- VUID-VkDeviceDiagnosticsConfigCreateInfoNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DEVICE_DIAGNOSTICS_CONFIG_CREATE_INFO_NV

- VUID-VkDeviceDiagnosticsConfigCreateInfoNV-flags-parameter
  `flags` must be a valid combination of VkDeviceDiagnosticsConfigFlagBitsNV values

Structure Chaining

Extends the structure

  - VkDeviceCreateInfo

Bits which can be set in VkDeviceDiagnosticsConfigCreateInfoNV::`flags` include:

    // Provided by VK_NV_device_diagnostics_config
    typedef enum VkDeviceDiagnosticsConfigFlagBitsNV {
        VK_DEVICE_DIAGNOSTICS_CONFIG_ENABLE_SHADER_DEBUG_INFO_BIT_NV = 0x00000001,
        VK_DEVICE_DIAGNOSTICS_CONFIG_ENABLE_RESOURCE_TRACKING_BIT_NV = 0x00000002,
        VK_DEVICE_DIAGNOSTICS_CONFIG_ENABLE_AUTOMATIC_CHECKPOINTS_BIT_NV = 0x00000004,
        VK_DEVICE_DIAGNOSTICS_CONFIG_ENABLE_SHADER_ERROR_REPORTING_BIT_NV = 0x00000008,
    } VkDeviceDiagnosticsConfigFlagBitsNV;

- VK_DEVICE_DIAGNOSTICS_CONFIG_ENABLE_SHADER_DEBUG_INFO_BIT_NV enables the generation of debug information for shaders.

- VK_DEVICE_DIAGNOSTICS_CONFIG_ENABLE_RESOURCE_TRACKING_BIT_NV enables driver side tracking of resources (images, buffers, etc.) used to augment the device fault information.

- VK_DEVICE_DIAGNOSTICS_CONFIG_ENABLE_AUTOMATIC_CHECKPOINTS_BIT_NV enables automatic insertion of diagnostic checkpoints for draw calls, dispatches, trace rays, and copies. The CPU call stack at the time of the command will be associated as the marker data for the automatically inserted checkpoints.

- VK_DEVICE_DIAGNOSTICS_CONFIG_ENABLE_SHADER_ERROR_REPORTING_BIT_NV enables shader error reporting.

    // Provided by VK_NV_device_diagnostics_config
    typedef VkFlags VkDeviceDiagnosticsConfigFlagsNV;

`VkDeviceDiagnosticsConfigFlagsNV` is a bitmask type for setting a mask of zero or more VkDeviceDiagnosticsConfigFlagBitsNV.

To register callbacks for underlying device memory events of type VkDeviceMemoryReportEventTypeEXT, add one or multiple VkDeviceDeviceMemoryReportCreateInfoEXT structures to the `pNext` chain of the VkDeviceCreateInfo structure.

    // Provided by VK_EXT_device_memory_report
    typedef struct VkDeviceDeviceMemoryReportCreateInfoEXT {
        VkStructureType                        sType;
        const void*                            pNext;
        VkDeviceMemoryReportFlagsEXT           flags;
        PFN_vkDeviceMemoryReportCallbackEXT    pfnUserCallback;
        void*                                  pUserData;
    } VkDeviceDeviceMemoryReportCreateInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is 0 and reserved for future use.

- `pfnUserCallback` is the application callback function to call.

- `pUserData` is NULL or an application-defined user data pointer to be passed to the callback.

The callback may be called from multiple threads simultaneously.

The callback must be called only once by the implementation when a VkDeviceMemoryReportEventTypeEXT event occurs.

Note | The callback could be called from a background thread other than the thread calling the Vulkan commands.

Valid Usage (Implicit)

- VUID-VkDeviceDeviceMemoryReportCreateInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DEVICE_DEVICE_MEMORY_REPORT_CREATE_INFO_EXT

- VUID-VkDeviceDeviceMemoryReportCreateInfoEXT-flags-zerobitmask
  `flags` must be `0`

- VUID-VkDeviceDeviceMemoryReportCreateInfoEXT-pfnUserCallback-parameter
  `pfnUserCallback` must be a valid PFN_vkDeviceMemoryReportCallbackEXT value

Structure Chaining

Extends the structure

  - VkDeviceCreateInfo

The prototype for the VkDeviceDeviceMemoryReportCreateInfoEXT::`pfnUserCallback` function implemented by the application is:

    // Provided by VK_EXT_device_memory_report
    typedef void (*PFN_vkDeviceMemoryReportCallbackEXT)(
        const VkDeviceMemoryReportCallbackDataEXT*  pCallbackData,
        void*                                       pUserData);

- `pCallbackData` contains all the callback related data in the VkDeviceMemoryReportCallbackDataEXT structure.

- `pUserData` is the application-defined user data pointer, equal to the value of VkDeviceDeviceMemoryReportCreateInfoEXT::`pUserData` specified when the VkDevice object was created.

The callback must not make calls to any Vulkan commands.

The definition of `VkDeviceMemoryReportCallbackDataEXT` is:

    // Provided by VK_EXT_device_memory_report
    typedef struct VkDeviceMemoryReportCallbackDataEXT {
        VkStructureType                     sType;
        void*                               pNext;
        VkDeviceMemoryReportFlagsEXT        flags;
        VkDeviceMemoryReportEventTypeEXT    type;
        uint64_t                            memoryObjectId;
        VkDeviceSize                        size;
        VkObjectType                        objectType;
        uint64_t                            objectHandle;
        uint32_t                            heapIndex;
    } VkDeviceMemoryReportCallbackDataEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is 0 and reserved for future use.

- `type` is a VkDeviceMemoryReportEventTypeEXT type specifying the type of event reported in this `VkDeviceMemoryReportCallbackDataEXT` structure.

- `memoryObjectId` is the unique id for the underlying memory object as described below.

- `size` is the size of the memory object in bytes. If `type` is VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATE_EXT, VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_IMPORT_EXT or VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATION_FAILED_EXT, `size` is a valid VkDeviceSize value. Otherwise, `size` is undefined.

- `objectType` is a VkObjectType value specifying the type of the object associated with this device memory report event. If `type` is VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATE_EXT, VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_FREE_EXT, VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_IMPORT_EXT, VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_UNIMPORT_EXT or VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATION_FAILED_EXT, `objectType` is a valid VkObjectType enum. Otherwise, `objectType` is undefined.

- `objectHandle` is the object this device memory report event is attributed to. If `type` is VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATE_EXT, VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_FREE_EXT, VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_IMPORT_EXT or VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_UNIMPORT_EXT, `objectHandle` is a valid Vulkan handle of the type associated with `objectType` as defined in the `VkObjectType` and Vulkan Handle Relationship table. Otherwise, `objectHandle` is undefined.

- `heapIndex` describes which memory heap this device memory allocation is made from. If `type` is VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATE_EXT or VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATION_FAILED_EXT, `heapIndex` corresponds to one of the valid heaps from the VkPhysicalDeviceMemoryProperties structure. Otherwise, `heapIndex` is undefined.

`memoryObjectId` is used to avoid double-counting on the same memory object.

If an internally-allocated device memory object or a VkDeviceMemory cannot be exported, `memoryObjectId` must be unique in the VkDevice.

If an internally-allocated device memory object or a VkDeviceMemory supports being exported, `memoryObjectId` must be unique system wide.

If an internal device memory object or a VkDeviceMemory is backed by an imported external memory object, `memoryObjectId` must be unique system wide.

Implementor’s Note

If the heap backing an internally-allocated device memory cannot be used to back VkDeviceMemory, implementations can advertise that heap with no types.

Note | This structure should only be considered valid during the lifetime of the triggered callback. For VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATE_EXT and VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_IMPORT_EXT events, `objectHandle` usually will not yet exist when the application or tool receives the callback. `objectHandle` will only exist when the create or allocate call that triggered the event returns, and if the allocation or import ends up failing `objectHandle` will not ever exist.

Valid Usage (Implicit)

- VUID-VkDeviceMemoryReportCallbackDataEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DEVICE_MEMORY_REPORT_CALLBACK_DATA_EXT

- VUID-VkDeviceMemoryReportCallbackDataEXT-pNext-pNext
  `pNext` must be `NULL`

    // Provided by VK_EXT_device_memory_report
    typedef VkFlags VkDeviceMemoryReportFlagsEXT;

`VkDeviceMemoryReportFlagsEXT` is a bitmask type for setting a mask, but is currently reserved for future use.

Possible values of VkDeviceMemoryReportCallbackDataEXT::`type`, specifying event types which cause the device driver to call the callback, are:

    // Provided by VK_EXT_device_memory_report
    typedef enum VkDeviceMemoryReportEventTypeEXT {
        VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATE_EXT = 0,
        VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_FREE_EXT = 1,
        VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_IMPORT_EXT = 2,
        VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_UNIMPORT_EXT = 3,
        VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATION_FAILED_EXT = 4,
    } VkDeviceMemoryReportEventTypeEXT;

- VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATE_EXT specifies this event corresponds to the allocation of an internal device memory object or a VkDeviceMemory.

- VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_FREE_EXT specifies this event corresponds to the deallocation of an internally-allocated device memory object or a VkDeviceMemory.

- VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_IMPORT_EXT specifies this event corresponds to the import of an external memory object.

- VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_UNIMPORT_EXT specifies this event is the release of an imported external memory object.

- VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATION_FAILED_EXT specifies this event corresponds to the failed allocation of an internal device memory object or a VkDeviceMemory.

To reserve private data storage slots, add a VkDevicePrivateDataCreateInfo structure to the `pNext` chain of the VkDeviceCreateInfo structure. Reserving slots in this manner is not strictly necessary, but doing so may improve performance.

    // Provided by VK_VERSION_1_3
    typedef struct VkDevicePrivateDataCreateInfo {
        VkStructureType    sType;
        const void*        pNext;
        uint32_t           privateDataSlotRequestCount;
    } VkDevicePrivateDataCreateInfo;

    // Provided by VK_EXT_private_data
    // Equivalent to VkDevicePrivateDataCreateInfo
    typedef VkDevicePrivateDataCreateInfo VkDevicePrivateDataCreateInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `privateDataSlotRequestCount` is the amount of slots to reserve.

Valid Usage (Implicit)

- VUID-VkDevicePrivateDataCreateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DEVICE_PRIVATE_DATA_CREATE_INFO

Structure Chaining

Extends the structure

  - VkDeviceCreateInfo

To disable the implementation’s internal pipeline cache, add a VkDevicePipelineBinaryInternalCacheControlKHR structure to the `pNext` chain of the VkDeviceCreateInfo structure.

    // Provided by VK_KHR_pipeline_binary
    typedef struct VkDevicePipelineBinaryInternalCacheControlKHR {
        VkStructureType    sType;
        const void*        pNext;
        VkBool32           disableInternalCache;
    } VkDevicePipelineBinaryInternalCacheControlKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `disableInternalCache` specifies whether or not to disable the implementation’s internal pipeline cache.

If the `VkDeviceCreateInfo`::`pNext` chain does not include this structure, then `disableInternalCache` defaults to VK_FALSE.

Valid Usage

- VUID-VkDevicePipelineBinaryInternalCacheControlKHR-disableInternalCache-09602
  If VkPhysicalDevicePipelineBinaryPropertiesKHR::`pipelineBinaryInternalCacheControl` is VK_FALSE, `disableInternalCache` must be VK_FALSE

Valid Usage (Implicit)

- VUID-VkDevicePipelineBinaryInternalCacheControlKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DEVICE_PIPELINE_BINARY_INTERNAL_CACHE_CONTROL_KHR

Structure Chaining

Extends the structure

  - VkDeviceCreateInfo

The number of shader cores used by all the queues of a device can be controlled by adding a `VkDeviceQueueShaderCoreControlCreateInfoARM` structure to the `pNext` chain of the VkDeviceCreateInfo structure.

#### 5.2.2. Device Use

The following is a high-level list of `VkDevice` uses along with references on where to find more information:

- Creation of queues. See the Queues section below for further details.

- Creation and tracking of various synchronization constructs. See Synchronization and Cache Control for further details.

- Allocating, freeing, and managing memory. See Memory Allocation and Resource Creation for further details.

- Creation and destruction of command buffers and command buffer pools. See Command Buffers for further details.

- Creation, destruction, and management of graphics state. See Pipelines and Resource Descriptors, among others, for further details.

#### 5.2.3. Lost Device

A logical device may become lost for a number of implementation-specific reasons, indicating that pending and future command execution may fail and cause resources and backing memory to become undefined.

Note | Typical reasons for device loss will include things like execution timing out (to prevent denial of service), power management events, platform resource management, implementation errors. Applications not adhering to valid usage may also result in device loss being reported, however this is not guaranteed. Even if device loss is reported, the system may be in an unrecoverable state, and further usage of the API is still considered invalid.

When this happens, certain commands will return VK_ERROR_DEVICE_LOST. After any such event, the logical device is considered lost. It is not possible to reset the logical device to a non-lost state, however the lost state is specific to a logical device (`VkDevice`), and the corresponding physical device (`VkPhysicalDevice`) may be otherwise unaffected.

In some cases, the physical device may also be lost, and attempting to create a new logical device will fail, returning VK_ERROR_DEVICE_LOST. This is usually indicative of a problem with the underlying implementation, or its connection to the host. If the physical device has not been lost, and a new logical device is successfully created from that physical device, it must be in the non-lost state.

Note | Whilst logical device loss may be recoverable, in the case of physical device loss, it is unlikely that an application will be able to recover unless additional, unaffected physical devices exist on the system. The error is largely informational and intended only to inform the application that a platform issue has occurred, and should be investigated further. For example, underlying hardware may have developed a fault or become physically disconnected from the rest of the system. In many cases, physical device loss may cause other more serious issues such as the operating system crashing; in which case it may not be reported via the Vulkan API.

When a device is lost, its child objects are not implicitly destroyed and their handles are still valid. Those objects must still be destroyed before their parents or the device can be destroyed (see the Object Lifetime section). The host address space corresponding to device memory mapped using vkMapMemory is still valid, and host memory accesses to these mapped regions are still valid, but the contents are undefined. It is still legal to call any API command on the device and child objects.

Once a device is lost, command execution may fail, and certain commands that return a VkResult may return VK_ERROR_DEVICE_LOST. These commands can be identified by the inclusion of VK_ERROR_DEVICE_LOST in the Return Codes section for each command. Commands that do not allow runtime errors must still operate correctly for valid usage and, if applicable, return valid data.

Commands that wait indefinitely for device execution (namely vkDeviceWaitIdle, vkQueueWaitIdle, vkWaitForFences or vkAcquireNextImageKHR with a maximum `timeout`, and vkGetQueryPoolResults with the VK_QUERY_RESULT_WAIT_BIT bit set in `flags`) must return in finite time even in the case of a lost device, and return either VK_SUCCESS or VK_ERROR_DEVICE_LOST. For any command that may return VK_ERROR_DEVICE_LOST, for the purpose of determining whether a command buffer is in the pending state, or whether resources are considered in-use by the device, a return value of VK_ERROR_DEVICE_LOST is equivalent to VK_SUCCESS.

If a device was created with the `maintenance5` feature enabled, and any device command returns VK_ERROR_DEVICE_LOST, then all device commands for which VK_ERROR_DEVICE_LOST is a valid return value and which happen-after it on the same host thread must return VK_ERROR_DEVICE_LOST.

Device commands executing on other threads must begin returning VK_ERROR_DEVICE_LOST within finite time.

The content of any external memory objects that have been exported from or imported to a lost device become undefined. Objects on other logical devices or in other APIs which are associated with the same underlying memory resource as the external memory objects on the lost device are unaffected other than their content becoming undefined. The layout of subresources of images on other logical devices that are bound to `VkDeviceMemory` objects associated with the same underlying memory resources as external memory objects on the lost device becomes VK_IMAGE_LAYOUT_UNDEFINED.

The state of `VkSemaphore` objects on other logical devices created by importing a semaphore payload with temporary permanence which was exported from the lost device is undefined. The state of `VkSemaphore` objects on other logical devices that permanently share a semaphore payload with a `VkSemaphore` object on the lost device is undefined, and remains undefined following any subsequent signal operations. Implementations must ensure pending and subsequently submitted wait operations on such semaphores behave as defined in Semaphore State Requirements For Wait Operations for external semaphores not in a valid state for a wait operation.

#### 5.2.4. Device Destruction

To destroy a device, call:

    // Provided by VK_VERSION_1_0
    void vkDestroyDevice(
        VkDevice                                    device,
        const VkAllocationCallbacks*                pAllocator);

- `device` is the logical device to destroy.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

To ensure that no work is active on the device, vkDeviceWaitIdle can be used to gate the destruction of the device. Prior to destroying a device, an application is responsible for destroying/freeing any Vulkan objects with explicit `vkDestroy*` or `vkFree*` commands that were created using that device as the first parameter of the corresponding `vkCreate*` or `vkAllocate*` command.

Note | The lifetime of each of these objects is bound by the lifetime of the `VkDevice` object. Therefore, to avoid resource leaks, it is critical that an application explicitly free all of these resources prior to calling `vkDestroyDevice`.

Valid Usage

- VUID-vkDestroyDevice-device-05137
  All child objects created on `device` that can be destroyed or freed must have been destroyed or freed prior to destroying `device`

- VUID-vkDestroyDevice-device-00379
  If `VkAllocationCallbacks` were provided when `device` was created, a compatible set of callbacks must be provided here

- VUID-vkDestroyDevice-device-00380
  If no `VkAllocationCallbacks` were provided when `device` was created, `pAllocator` must be `NULL`

Valid Usage (Implicit)

- VUID-vkDestroyDevice-device-parameter
  If `device` is not `NULL`, `device` must be a valid VkDevice handle

- VUID-vkDestroyDevice-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

Host Synchronization

- Host access to `device` must be externally synchronized

- Host access to all `VkQueue` objects created from `device` must be externally synchronized

### 5.3. Queues

#### 5.3.1. Queue Family Properties

As discussed in the Physical Device Enumeration section above, the vkGetPhysicalDeviceQueueFamilyProperties command is used to retrieve details about the queue families and queues supported by a device.

Each index in the `pQueueFamilyProperties` array returned by vkGetPhysicalDeviceQueueFamilyProperties describes a unique queue family on that physical device. These indices are used when creating queues, and they correspond directly with the `queueFamilyIndex` that is passed to the vkCreateDevice command via the VkDeviceQueueCreateInfo structure as described in the Queue Creation section below.

Grouping of queue families within a physical device is implementation-dependent.

Note | The general expectation is that a physical device groups all queues of matching capabilities into a single family. However, while implementations should do this, it is possible that a physical device may return two separate queue families with the same capabilities.

Once an application has identified a physical device with the queue(s) that it desires to use, it will create those queues in conjunction with a logical device. This is described in the following section.

#### 5.3.2. Queue Creation

Creating a logical device also creates the queues associated with that device. The queues to create are described by a set of VkDeviceQueueCreateInfo structures that are passed to vkCreateDevice in `pQueueCreateInfos`. Queues cannot be independently destroyed, and are instead destroyed with the VkDevice that they were created from.

Queues are represented by `VkQueue` handles:

    // Provided by VK_VERSION_1_0
    VK_DEFINE_HANDLE(VkQueue)

The `VkDeviceQueueCreateInfo` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkDeviceQueueCreateInfo {
        VkStructureType             sType;
        const void*                 pNext;
        VkDeviceQueueCreateFlags    flags;
        uint32_t                    queueFamilyIndex;
        uint32_t                    queueCount;
        const float*                pQueuePriorities;
    } VkDeviceQueueCreateInfo;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask indicating behavior of the queues.

- `queueFamilyIndex` is an unsigned integer indicating the index of the queue family in which to create the queues on this device. This index corresponds to the index of an element of the `pQueueFamilyProperties` array that was returned by `vkGetPhysicalDeviceQueueFamilyProperties`.

- `queueCount` is an unsigned integer specifying the number of queues to create in the queue family indicated by `queueFamilyIndex`, and with the behavior specified by `flags`.

- `pQueuePriorities` is a pointer to an array of `queueCount` normalized floating-point values, specifying priorities of work that will be submitted to each created queue. See Queue Priority for more information.

Some queue families support functionality which requires a device feature or extension to be enabled, as indicated by the VkQueueFamilyProperties::`queueFlags` member. Applications may create such queues and submit queue submission commands to them without enabling the corresponding feature or extension, but must not utilize the specific functionality that they did not enable.

For example, sparse memory management operations can be performed on queues from queue families exposing the VK_QUEUE_SPARSE_BINDING_BIT bit, provided the sparseBinding feature is enabled. If a queue family supports both the VK_QUEUE_SPARSE_BINDING_BIT and VK_QUEUE_TRANSFER_BIT bits, applications may create a queue from this family and issue transfer operations without enabling the sparseBinding feature.

Valid Usage

- VUID-VkDeviceQueueCreateInfo-queueFamilyIndex-00381
  `queueFamilyIndex` must be less than `pQueueFamilyPropertyCount` returned by `vkGetPhysicalDeviceQueueFamilyProperties`

- VUID-VkDeviceQueueCreateInfo-queueCount-00382
  `queueCount` must be less than or equal to the `queueCount` member of the `VkQueueFamilyProperties` structure, as returned by `vkGetPhysicalDeviceQueueFamilyProperties` in the `pQueueFamilyProperties`[queueFamilyIndex]

- VUID-VkDeviceQueueCreateInfo-pQueuePriorities-00383
  Each element of `pQueuePriorities` must be between `0.0` and `1.0` inclusive

- VUID-VkDeviceQueueCreateInfo-flags-02861
  If the `protectedMemory` feature is not enabled, the VK_DEVICE_QUEUE_CREATE_PROTECTED_BIT bit of `flags` must not be set

- VUID-VkDeviceQueueCreateInfo-flags-06449
  If `flags` includes VK_DEVICE_QUEUE_CREATE_PROTECTED_BIT, `queueFamilyIndex` must be the index of a queue family that includes the VK_QUEUE_PROTECTED_BIT capability

- VUID-VkDeviceQueueCreateInfo-pNext-09398
  If the `pNext` chain includes a VkDeviceQueueShaderCoreControlCreateInfoARM structure then VkPhysicalDeviceSchedulingControlsPropertiesARM::`schedulingControlsFlags` must contain VK_PHYSICAL_DEVICE_SCHEDULING_CONTROLS_SHADER_CORE_COUNT_ARM

- VUID-VkDeviceQueueCreateInfo-internallySynchronizedQueues-12348
  If the `internallySynchronizedQueues` feature is not enabled, `flags` must not include VK_DEVICE_QUEUE_CREATE_INTERNALLY_SYNCHRONIZED_BIT_KHR

Valid Usage (Implicit)

- VUID-VkDeviceQueueCreateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO

- VUID-VkDeviceQueueCreateInfo-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkDeviceQueueGlobalPriorityCreateInfo or VkDeviceQueueShaderCoreControlCreateInfoARM

- VUID-VkDeviceQueueCreateInfo-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkDeviceQueueCreateInfo-flags-parameter
  `flags` must be a valid combination of VkDeviceQueueCreateFlagBits values

- VUID-VkDeviceQueueCreateInfo-pQueuePriorities-parameter
  `pQueuePriorities` must be a valid pointer to an array of `queueCount` `float` values

- VUID-VkDeviceQueueCreateInfo-queueCount-arraylength
  `queueCount` must be greater than `0`

Bits which can be set in VkDeviceQueueCreateInfo::`flags`, specifying usage behavior of a queue, are:

    // Provided by VK_VERSION_1_1
    typedef enum VkDeviceQueueCreateFlagBits {
      // Provided by VK_VERSION_1_1
        VK_DEVICE_QUEUE_CREATE_PROTECTED_BIT = 0x00000001,
      // Provided by VK_KHR_internally_synchronized_queues
        VK_DEVICE_QUEUE_CREATE_INTERNALLY_SYNCHRONIZED_BIT_KHR = 0x00000004,
    } VkDeviceQueueCreateFlagBits;

- VK_DEVICE_QUEUE_CREATE_PROTECTED_BIT specifies that the device queue is a protected-capable queue.

- VK_DEVICE_QUEUE_CREATE_INTERNALLY_SYNCHRONIZED_BIT_KHR specifies that the device queue is internally synchronized and does not require external synchronization.

    // Provided by VK_VERSION_1_0
    typedef VkFlags VkDeviceQueueCreateFlags;

`VkDeviceQueueCreateFlags` is a bitmask type for setting a mask of zero or more VkDeviceQueueCreateFlagBits.

Queues can be created with a system-wide priority by adding a `VkDeviceQueueGlobalPriorityCreateInfo` structure to the `pNext` chain of VkDeviceQueueCreateInfo.

The `VkDeviceQueueGlobalPriorityCreateInfo` structure is defined as:

    // Provided by VK_VERSION_1_4
    typedef struct VkDeviceQueueGlobalPriorityCreateInfo {
        VkStructureType          sType;
        const void*              pNext;
        VkQueueGlobalPriority    globalPriority;
    } VkDeviceQueueGlobalPriorityCreateInfo;

    // Provided by VK_KHR_global_priority
    // Equivalent to VkDeviceQueueGlobalPriorityCreateInfo
    typedef VkDeviceQueueGlobalPriorityCreateInfo VkDeviceQueueGlobalPriorityCreateInfoKHR;

    // Provided by VK_EXT_global_priority
    // Equivalent to VkDeviceQueueGlobalPriorityCreateInfo
    typedef VkDeviceQueueGlobalPriorityCreateInfo VkDeviceQueueGlobalPriorityCreateInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `globalPriority` is the system-wide priority associated to these queues as specified by VkQueueGlobalPriority

Queues created without specifying `VkDeviceQueueGlobalPriorityCreateInfo` will default to VK_QUEUE_GLOBAL_PRIORITY_MEDIUM.

Valid Usage (Implicit)

- VUID-VkDeviceQueueGlobalPriorityCreateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO

- VUID-VkDeviceQueueGlobalPriorityCreateInfo-globalPriority-parameter
  `globalPriority` must be a valid VkQueueGlobalPriority value

Structure Chaining

Extends the structure

  - VkDeviceQueueCreateInfo

Possible values of VkDeviceQueueGlobalPriorityCreateInfo::`globalPriority`, specifying a system-wide priority level are:

    // Provided by VK_VERSION_1_4
    typedef enum VkQueueGlobalPriority {
        VK_QUEUE_GLOBAL_PRIORITY_LOW = 128,
        VK_QUEUE_GLOBAL_PRIORITY_MEDIUM = 256,
        VK_QUEUE_GLOBAL_PRIORITY_HIGH = 512,
        VK_QUEUE_GLOBAL_PRIORITY_REALTIME = 1024,
      // Provided by VK_EXT_global_priority
        VK_QUEUE_GLOBAL_PRIORITY_LOW_EXT = VK_QUEUE_GLOBAL_PRIORITY_LOW,
      // Provided by VK_EXT_global_priority
        VK_QUEUE_GLOBAL_PRIORITY_MEDIUM_EXT = VK_QUEUE_GLOBAL_PRIORITY_MEDIUM,
      // Provided by VK_EXT_global_priority
        VK_QUEUE_GLOBAL_PRIORITY_HIGH_EXT = VK_QUEUE_GLOBAL_PRIORITY_HIGH,
      // Provided by VK_EXT_global_priority
        VK_QUEUE_GLOBAL_PRIORITY_REALTIME_EXT = VK_QUEUE_GLOBAL_PRIORITY_REALTIME,
      // Provided by VK_KHR_global_priority
        VK_QUEUE_GLOBAL_PRIORITY_LOW_KHR = VK_QUEUE_GLOBAL_PRIORITY_LOW,
      // Provided by VK_KHR_global_priority
        VK_QUEUE_GLOBAL_PRIORITY_MEDIUM_KHR = VK_QUEUE_GLOBAL_PRIORITY_MEDIUM,
      // Provided by VK_KHR_global_priority
        VK_QUEUE_GLOBAL_PRIORITY_HIGH_KHR = VK_QUEUE_GLOBAL_PRIORITY_HIGH,
      // Provided by VK_KHR_global_priority
        VK_QUEUE_GLOBAL_PRIORITY_REALTIME_KHR = VK_QUEUE_GLOBAL_PRIORITY_REALTIME,
    } VkQueueGlobalPriority;

    // Provided by VK_KHR_global_priority
    // Equivalent to VkQueueGlobalPriority
    typedef VkQueueGlobalPriority VkQueueGlobalPriorityKHR;

    // Provided by VK_EXT_global_priority
    // Equivalent to VkQueueGlobalPriority
    typedef VkQueueGlobalPriority VkQueueGlobalPriorityEXT;

Priority values are sorted in ascending order. A comparison operation on the enum values can be used to determine the priority order.

- VK_QUEUE_GLOBAL_PRIORITY_LOW is below the system default. Useful for non-interactive tasks.

- VK_QUEUE_GLOBAL_PRIORITY_MEDIUM is the system default priority.

- VK_QUEUE_GLOBAL_PRIORITY_HIGH is above the system default.

- VK_QUEUE_GLOBAL_PRIORITY_REALTIME is the highest priority. Useful for critical tasks.

Queues with higher system priority may be allotted more processing time than queues with lower priority. An implementation may allow a higher-priority queue to starve a lower-priority queue until the higher-priority queue has no further commands to execute.

Priorities imply no ordering or scheduling constraints.

No specific guarantees are made about higher priority queues receiving more processing time or better quality of service than lower priority queues.

The global priority level of a queue takes precedence over the per-process queue priority (VkDeviceQueueCreateInfo::`pQueuePriorities`).

Abuse of this feature may result in starving the rest of the system of implementation resources. Therefore, the driver implementation may deny requests to acquire a priority above the default priority (VK_QUEUE_GLOBAL_PRIORITY_MEDIUM) if the caller does not have sufficient privileges. In this scenario VK_ERROR_NOT_PERMITTED is returned.

The driver implementation may fail the queue allocation request if resources required to complete the operation have been exhausted (either by the same process or a different process). In this scenario VK_ERROR_INITIALIZATION_FAILED is returned.

If the `globalPriorityQuery` feature is enabled and the requested global priority is not reported via VkQueueFamilyGlobalPriorityProperties, the driver implementation must fail the queue creation. In this scenario, VK_ERROR_INITIALIZATION_FAILED is returned.

The number of shader cores used by a queue can be controlled by adding a `VkDeviceQueueShaderCoreControlCreateInfoARM` structure to the `pNext` chain of VkDeviceQueueCreateInfo structures.

The `VkDeviceQueueShaderCoreControlCreateInfoARM` structure is defined as:

    // Provided by VK_ARM_scheduling_controls
    typedef struct VkDeviceQueueShaderCoreControlCreateInfoARM {
        VkStructureType    sType;
        void*              pNext;
        uint32_t           shaderCoreCount;
    } VkDeviceQueueShaderCoreControlCreateInfoARM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `shaderCoreCount` is the number of shader cores this queue uses.

Queues created without specifying `VkDeviceQueueShaderCoreControlCreateInfoARM` will default to using all the shader cores available.

Valid Usage

- VUID-VkDeviceQueueShaderCoreControlCreateInfoARM-shaderCoreCount-09399
  `shaderCoreCount` must be greater than 0 and less than or equal to the total number of shader cores as reported via VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM::`shaderCoreCount`

Valid Usage (Implicit)

- VUID-VkDeviceQueueShaderCoreControlCreateInfoARM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DEVICE_QUEUE_SHADER_CORE_CONTROL_CREATE_INFO_ARM

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkDeviceQueueCreateInfo

To retrieve a handle to a VkQueue object, call:

    // Provided by VK_VERSION_1_0
    void vkGetDeviceQueue(
        VkDevice                                    device,
        uint32_t                                    queueFamilyIndex,
        uint32_t                                    queueIndex,
        VkQueue*                                    pQueue);

- `device` is the logical device that owns the queue.

- `queueFamilyIndex` is the index of the queue family to which the queue belongs.

- `queueIndex` is the index within this queue family of the queue to retrieve.

- `pQueue` is a pointer to a VkQueue object that will be filled with the handle for the requested queue.

`vkGetDeviceQueue` must only be used to get queues that were created with the `flags` parameter of VkDeviceQueueCreateInfo set to zero. To get queues that were created with a non-zero `flags` parameter use vkGetDeviceQueue2.

Valid Usage

- VUID-vkGetDeviceQueue-queueFamilyIndex-00384
  `queueFamilyIndex` must be one of the queue family indices specified when `device` was created, via the VkDeviceQueueCreateInfo structure

- VUID-vkGetDeviceQueue-queueIndex-00385
  `queueIndex` must be less than the value of VkDeviceQueueCreateInfo::`queueCount` for the queue family indicated by `queueFamilyIndex` when `device` was created

- VUID-vkGetDeviceQueue-flags-01841
  VkDeviceQueueCreateInfo::`flags` must have been zero when `device` was created

Valid Usage (Implicit)

- VUID-vkGetDeviceQueue-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetDeviceQueue-pQueue-parameter
  `pQueue` must be a valid pointer to a VkQueue handle

To retrieve a handle to a VkQueue object with specific VkDeviceQueueCreateFlags creation flags, call:

    // Provided by VK_VERSION_1_1
    void vkGetDeviceQueue2(
        VkDevice                                    device,
        const VkDeviceQueueInfo2*                   pQueueInfo,
        VkQueue*                                    pQueue);

- `device` is the logical device that owns the queue.

- `pQueueInfo` is a pointer to a VkDeviceQueueInfo2 structure, describing parameters of the device queue to be retrieved.

- `pQueue` is a pointer to a VkQueue object that will be filled with the handle for the requested queue.

Valid Usage (Implicit)

- VUID-vkGetDeviceQueue2-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetDeviceQueue2-pQueueInfo-parameter
  `pQueueInfo` must be a valid pointer to a valid VkDeviceQueueInfo2 structure

- VUID-vkGetDeviceQueue2-pQueue-parameter
  `pQueue` must be a valid pointer to a VkQueue handle

The `VkDeviceQueueInfo2` structure is defined as:

    // Provided by VK_VERSION_1_1
    typedef struct VkDeviceQueueInfo2 {
        VkStructureType             sType;
        const void*                 pNext;
        VkDeviceQueueCreateFlags    flags;
        uint32_t                    queueFamilyIndex;
        uint32_t                    queueIndex;
    } VkDeviceQueueInfo2;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure. The `pNext` chain of `VkDeviceQueueInfo2` can be used to provide additional device queue parameters to `vkGetDeviceQueue2`.

- `flags` is a VkDeviceQueueCreateFlags value indicating the flags used to create the device queue.

- `queueFamilyIndex` is the index of the queue family to which the queue belongs.

- `queueIndex` is the index of the queue to retrieve from within the set of queues that share both the queue family and flags specified.

The queue returned by `vkGetDeviceQueue2` must have the same `flags` value from this structure as that used at device creation time in a VkDeviceQueueCreateInfo structure.

Note | Normally, if you create both protected-capable and non-protected-capable queues with the same family, they are treated as separate lists of queues and `queueIndex` is relative to the start of the list of queues specified by both `queueFamilyIndex` and `flags`. However, for historical reasons, some implementations may exhibit different behavior. These divergent implementations instead concatenate the lists of queues and treat `queueIndex` as relative to the start of the first list of queues with the given `queueFamilyIndex`. This only matters in cases where an application has created both protected-capable and non-protected-capable queues from the same queue family. For such divergent implementations, the maximum value of `queueIndex` is equal to the sum of VkDeviceQueueCreateInfo::`queueCount` minus one, for all VkDeviceQueueCreateInfo structures that share a common `queueFamilyIndex`. Such implementations will return `NULL` for either the protected or unprotected queues when calling `vkGetDeviceQueue2` with `queueIndex` in the range zero to VkDeviceQueueCreateInfo::`queueCount` minus one. In cases where these implementations returned `NULL`, the corresponding queues are instead located in the extended range described in the preceding two paragraphs. This behavior will not be observed on any driver that has passed Vulkan conformance test suite version 1.3.3.0, or any subsequent version. This information can be found by querying `VkPhysicalDeviceDriverProperties`::`conformanceVersion`.

Valid Usage

- VUID-VkDeviceQueueInfo2-queueFamilyIndex-01842
  `queueFamilyIndex` must be one of the queue family indices specified when `device` was created, via the VkDeviceQueueCreateInfo structure

- VUID-VkDeviceQueueInfo2-flags-06225
  `flags` must be equal to VkDeviceQueueCreateInfo::`flags` for a VkDeviceQueueCreateInfo structure for the queue family indicated by `queueFamilyIndex` when `device` was created

- VUID-VkDeviceQueueInfo2-queueIndex-01843
  `queueIndex` must be less than VkDeviceQueueCreateInfo::`queueCount` for the corresponding queue family and flags indicated by `queueFamilyIndex` and `flags` when `device` was created

Valid Usage (Implicit)

- VUID-VkDeviceQueueInfo2-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DEVICE_QUEUE_INFO_2

- VUID-VkDeviceQueueInfo2-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkDeviceQueueInfo2-flags-parameter
  `flags` must be a valid combination of VkDeviceQueueCreateFlagBits values

#### 5.3.3. Queue Family Index

The queue family index is used in multiple places in Vulkan in order to tie operations to a specific family of queues.

When retrieving a handle to the queue via `vkGetDeviceQueue`, the queue family index is used to select which queue family to retrieve the `VkQueue` handle from as described in the previous section.

When creating a `VkCommandPool` object (see Command Pools), a queue family index is specified in the VkCommandPoolCreateInfo structure. Command buffers from this pool can only be submitted on queues corresponding to this queue family.

When creating `VkImage` (see Images) and `VkBuffer` (see Buffers) resources, a set of queue families is included in the VkImageCreateInfo and VkBufferCreateInfo structures to specify the queue families that can access the resource.

When inserting a VkBufferMemoryBarrier or VkImageMemoryBarrier (see Pipeline Barriers), a source and destination queue family index is specified to allow the ownership of a buffer or image to be transferred from one queue family to another. See the Resource Sharing section for details.

#### 5.3.4. Queue Priority

Each queue is assigned a priority, as set in the VkDeviceQueueCreateInfo structures when creating the device. The priority of each queue is a normalized floating-point value between 0.0 and 1.0, which is then translated to a discrete priority level by the implementation. Higher values indicate a higher priority, with 0.0 being the lowest priority and 1.0 being the highest.

Within the same device, queues with higher priority may be allotted more processing time than queues with lower priority. The implementation makes no guarantees with regards to ordering or scheduling among queues with the same priority, other than the constraints defined by any explicit synchronization primitives. The implementation makes no guarantees with regards to queues across different devices.

An implementation may allow a higher-priority queue to starve a lower-priority queue on the same `VkDevice` until the higher-priority queue has no further commands to execute. The relationship of queue priorities must not cause queues on one `VkDevice` to starve queues on another `VkDevice`.

No specific guarantees are made about higher priority queues receiving more processing time or better quality of service than lower priority queues.

##### Queue Performance Hints

Each queue has performance hint state, which defaults to VK_PERF_HINT_TYPE_DEFAULT_QCOM when creating them with device.

Applications can set a performance hint on the queue to influence the power and performance settings for the operation of the device while the queue is active. This state persists for the lifetime of the queue object and resets when the queue is destroyed or replaced when another performance hint is set on queue.

Determination of whether or not a queue is active is implementation-dependent. Submitting commands to an inactive queue reapplies the queue’s current performance hint state to device.

To set a performance hint on a VkQueue object, call:

    // Provided by VK_QCOM_queue_perf_hint
    VkResult                   vkQueueSetPerfHintQCOM(
        VkQueue                                     queue,
        const VkPerfHintInfoQCOM*                   pPerfHintInfo);

- `queue` is the queue to set the performance hint on.

- `pPerfHintInfo` is a pointer to a VkPerfHintInfoQCOM structure, describing the performance hint to set.

Valid Usage

- VUID-vkQueueSetPerfHintQCOM-queuePerfHint-12387
  The `queuePerfHint` feature must be enabled

- VUID-vkQueueSetPerfHintQCOM-queue-12388
  `queue` must support at least one of the queue types specified in VkPhysicalDeviceQueuePerfHintPropertiesQCOM::`supportedQueues`

Valid Usage (Implicit)

- VUID-vkQueueSetPerfHintQCOM-queue-parameter
  `queue` must be a valid VkQueue handle

- VUID-vkQueueSetPerfHintQCOM-pPerfHintInfo-parameter
  `pPerfHintInfo` must be a valid pointer to a valid VkPerfHintInfoQCOM structure

Host Synchronization

- Host access to `queue` must be externally synchronized if it was not created with VK_DEVICE_QUEUE_CREATE_INTERNALLY_SYNCHRONIZED_BIT_KHR

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
- | - | - | Any | -

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_DEVICE_LOST

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkPerfHintInfoQCOM` structure is defined as:

    // Provided by VK_QCOM_queue_perf_hint
    typedef struct VkPerfHintInfoQCOM {
        VkStructureType       sType;
        void*                 pNext;
        VkPerfHintTypeQCOM    type;
        uint32_t              scale;
    } VkPerfHintInfoQCOM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `type` is a VkPerfHintTypeQCOM value indicating the type of performance hint to apply.

- `scale` is a normalized fixed-point scale factor.

The device has two global frequency constraints, `fmin` and `fmax`, that can be influenced by the VK_PERF_HINT_TYPE_FREQUENCY_MIN_QCOM, VK_PERF_HINT_TYPE_FREQUENCY_MAX_QCOM, and VK_PERF_HINT_TYPE_FREQUENCY_SCALED_QCOM performance hints. These constraints determine the range of clock frequencies that the platform performance algorithms may select from. If no constraints are set, `fmin` and `fmax` are set to the minimum and maximum frequencies the device can support, `Fmin` and `Fmax` respectively.

The `fmin` constraint applied by VK_PERF_HINT_TYPE_FREQUENCY_SCALED_QCOM is calculated with the following:

  f min​=⌊100 sca l e​×F max​⌋

The implementation rounds `fmin` down to the next available lower frequency the device supports, clamped to `Fmin`.

The global frequency constraints are determined by combining the performance hints from all of the device’s active queues of all processes on the host. Performance hints that influence device frequency are ranked, where a higher ranked hint supersedes all lower ranked hints. These are listed in order of highest rank to lowest:

- VK_PERF_HINT_TYPE_FREQUENCY_MAX_QCOM

- VK_PERF_HINT_TYPE_FREQUENCY_SCALED_QCOM and `scale` equal to `100`

- VK_PERF_HINT_TYPE_FREQUENCY_SCALED_QCOM and `scale` equal to `99`

- VK_PERF_HINT_TYPE_FREQUENCY_SCALED_QCOM and `scale` equal to `98`

- …​

- VK_PERF_HINT_TYPE_FREQUENCY_SCALED_QCOM and `scale` equal to `0`

- VK_PERF_HINT_TYPE_DEFAULT_QCOM

- VK_PERF_HINT_TYPE_FREQUENCY_MIN_QCOM

Note | This means that VK_PERF_HINT_TYPE_FREQUENCY_MIN_QCOM only takes effect if all of the device’s other active queues running on the host also have the VK_PERF_HINT_TYPE_FREQUENCY_MIN_QCOM hint applied. If any queue is active that never had a performance hint applied and therefore is in the VK_PERF_HINT_TYPE_DEFAULT_QCOM state, it will supersede in setting the constraints over VK_PERF_HINT_TYPE_FREQUENCY_MIN_QCOM. This is necessary to avoid negatively impacting performance for normal queues while a low power queue is active.

Valid Usage

- VUID-VkPerfHintInfoQCOM-type-12389
  If `type` is not VK_PERF_HINT_TYPE_FREQUENCY_SCALED_QCOM, `scale` must equal `0`

- VUID-VkPerfHintInfoQCOM-scale-12390
  `scale` must be less than or equal to `100`

Valid Usage (Implicit)

- VUID-VkPerfHintInfoQCOM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PERF_HINT_INFO_QCOM

- VUID-VkPerfHintInfoQCOM-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkPerfHintInfoQCOM-type-parameter
  `type` must be a valid VkPerfHintTypeQCOM value

Possible values of VkPerfHintInfoQCOM::`type`, specifying the type of performance hint to apply, are:

    // Provided by VK_QCOM_queue_perf_hint
    typedef enum VkPerfHintTypeQCOM {
        VK_PERF_HINT_TYPE_DEFAULT_QCOM = 0,
        VK_PERF_HINT_TYPE_FREQUENCY_MIN_QCOM = 1,
        VK_PERF_HINT_TYPE_FREQUENCY_MAX_QCOM = 2,
        VK_PERF_HINT_TYPE_FREQUENCY_SCALED_QCOM = 3,
    } VkPerfHintTypeQCOM;

- VK_PERF_HINT_TYPE_DEFAULT_QCOM resets the performance hint state back to default for the queue.

- VK_PERF_HINT_TYPE_FREQUENCY_MIN_QCOM specifies the queue should prioritize power and sets the frequency constraints `fmin` and `fmax` to `Fmin`.

- VK_PERF_HINT_TYPE_FREQUENCY_MAX_QCOM specifies the queue should prioritize performance and sets the frequency constraints `fmin` and `fmax` to `Fmax`.

- VK_PERF_HINT_TYPE_FREQUENCY_SCALED_QCOM specifies the queue should be balanced between performance and power and sets the frequency constraint `fmin` by applying a scale factor to `Fmax`. No constraint is applied to `fmax`.

#### 5.3.5. Queue Submission

Work is submitted to a queue via queue submission commands such as vkQueueSubmit2 or vkQueuePresentKHR or vkQueueSubmit. Queue submission commands define a set of queue operations to be executed by the underlying physical device, including synchronization with semaphores and fences.

Submission commands take as parameters a target queue, zero or more batches of work, and an optional fence to signal upon completion. Each batch consists of three distinct parts:

1. Zero or more semaphores to wait on before execution of the rest of the batch.

   - If present, these describe a semaphore wait operation.

2. Zero or more work items to execute.

   - If present, these describe a queue operation matching the work described.

3. Zero or more semaphores to signal upon completion of the work items.

   - If present, these describe a semaphore signal operation.

If a fence is present in a queue submission, it describes a fence signal operation.

All work described by a queue submission command must be submitted to the queue before the command returns.

##### Sparse Memory Binding

In Vulkan it is possible to sparsely bind memory to buffers and images as described in the Sparse Resource chapter. Sparse memory binding is a queue operation. A queue whose flags include the VK_QUEUE_SPARSE_BINDING_BIT must be able to support the mapping of a virtual address to a physical address on the device. This causes an update to the page table mappings on the device. This update must be synchronized on a queue to avoid corrupting page table mappings during execution of graphics commands. By binding the sparse memory resources on queues, all commands that are dependent on the updated bindings are synchronized to only execute after the binding is updated. See the Synchronization and Cache Control chapter for how this synchronization is accomplished.

#### 5.3.6. Queue Destruction

Queues are created along with a logical device during `vkCreateDevice`. All queues associated with a logical device are destroyed when `vkDestroyDevice` is called on that device.

## 6. Command Buffers

Command buffers are objects used to record commands which can be subsequently submitted to a device queue for execution. There are two levels of command buffers - primary command buffers, which can execute secondary command buffers, and which are submitted to queues, and secondary command buffers, which can be executed by primary command buffers, and which are not directly submitted to queues.

Command buffers are represented by `VkCommandBuffer` handles:

    // Provided by VK_VERSION_1_0
    VK_DEFINE_HANDLE(VkCommandBuffer)

Recorded commands include commands to bind pipelines and descriptor sets to the command buffer, commands to modify dynamic state, commands to draw (for graphics rendering), commands to dispatch (for compute), commands to execute secondary command buffers (for primary command buffers only), commands to copy buffers and images, and other commands.

Each command buffer manages state independently of other command buffers. There is no inheritance of state across primary and secondary command buffers, or between secondary command buffers. When a command buffer begins recording, all state in that command buffer is undefined. When secondary command buffer(s) are recorded to execute on a primary command buffer, the secondary command buffer inherits no state from the primary command buffer, and all state of the primary command buffer is undefined after an execute secondary command buffer command is recorded, with the following exception(s):

- If the primary command buffer is inside a render pass instance, then the render pass and subpass state is not disturbed by executing secondary command buffers.

- If the primary command buffer has a descriptor heap bound, and the address of that descriptor heap is specified in VkCommandBufferInheritanceDescriptorHeapInfoEXT for every secondary command buffer, that heap binding is not disturbed by executing secondary command buffers.

For state dependent commands (such as draws and dispatches), any state consumed by those commands must not be undefined.

VkCommandBufferInheritanceViewportScissorInfoNV defines an exception allowing limited inheritance of dynamic viewport and scissor state.

Unless otherwise specified, and without explicit synchronization, the various commands submitted to a queue via command buffers may execute in arbitrary order relative to each other, and/or concurrently. Also, the memory side effects of those commands may not be directly visible to other commands without explicit memory dependencies. This is true within a command buffer, and across command buffers submitted to a given queue. See the synchronization chapter for information on implicit and explicit synchronization between commands.

### 6.1. Command Buffer Lifecycle

Each command buffer is always in one of the following states:

Initial

  Command buffers in the initial state can only be transitioned to the recording state, or freed. When a command buffer is allocated, it is in the initial state. Command buffers in any state other than the pending state can be transitioned to the initial state by calling vkResetCommandPool on the pool they were allocated from. Command buffers allocated from a command pool created with VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT and in any state other than the pending state can also be transitioned to the initial state by calling vkResetCommandBuffer.

Recording

  Command buffers in the recording state can be used to record commands via `vkCmd*` commands, be reset, or be freed. Command buffers in the initial state can be transitioned to the recording state by vkBeginCommandBuffer. Command buffers allocated from a command pool created with VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT in the invalid, recording, or executable state can also be transitioned to the recording state by vkBeginCommandBuffer.

Executable

  A command buffer in the executable state can be submitted for execution, reset, freed, or recorded to another command buffer. Command buffers in the recording state are transitioned to the executable state by vkEndCommandBuffer. Command buffers in the pending state that were recorded without the VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT flag immediately return to the executable state as the final command in the command buffer completes all execution, which can be observed via synchronization commands.

Pending

  A command buffer in the pending state must not be modified by the application, as it may be executing on the device. Command buffers in the pending state that were recorded without the VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT flag, or with the VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT flag, must not be submitted to the device for execution. Command buffers in the executable state can be transitioned to the pending state by queue submission commands. Once commands in the command buffer have completed all execution, the command buffer is immediately in either the executable state, or in the invalid state if it was recorded with the VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT flag. A synchronization command can be used to detect when command execution is complete.

Invalid

  A command buffer in the invalid state can be reset or freed. Command buffers in any state other than the pending state will transition to the invalid state if any memory or object, other than VkCommandPool, that may be accessed when the command buffer is accessed (e.g. an object bound to the command buffer) is destroyed or freed. Command buffers in any state other than the pending state will transition to the invalid state if any command buffer executed within it via vkCmdExecuteCommands transitions to any state other than the pending or executable state. Command buffers in the pending state that were recorded with the VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT flag are immediately invalid as the final command in the command buffer completes all execution, which can be observed via synchronization commands.

Figure 1. Lifecycle of a command buffer

Note | The pending state is tied entirely to the status of execution of a command buffer’s commands; once all commands are finished executing, the command buffer is in the subsequent state (executable or invalid) with no further intervention. Detection of the final command in a command buffer completing all stages of execution (i.e. VK_PIPELINE_STAGE_ALL_COMMANDS_BIT) with a synchronization command is sufficient to ensure the command buffer is in the expected state.

Secondary command buffers can be recorded to a primary command buffer via vkCmdExecuteCommands. This partially ties the lifecycle of the two command buffers together - if the primary is submitted to a queue, both the primary and any secondaries recorded to it move to the pending state. Similarly, once execution of the primary completes, it completes for any command buffer recorded within it.

Note | Resetting or freeing a primary command buffer removes the lifecycle linkage to all secondary command buffers that were recorded into it.

### 6.2. Command Pools

Command pools are opaque objects that command buffer memory is allocated from, and which allow the implementation to amortize the cost of resource creation across multiple command buffers. Command pools are externally synchronized, meaning that a command pool must not be used concurrently in multiple threads. That includes use via recording commands on any command buffers allocated from the pool, as well as operations that allocate, free, and reset command buffers or the pool itself.

Command pools are represented by `VkCommandPool` handles:

    // Provided by VK_VERSION_1_0
    VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkCommandPool)

To create a command pool, call:

    // Provided by VK_VERSION_1_0
    VkResult vkCreateCommandPool(
        VkDevice                                    device,
        const VkCommandPoolCreateInfo*              pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkCommandPool*                              pCommandPool);

- `device` is the logical device that creates the command pool.

- `pCreateInfo` is a pointer to a VkCommandPoolCreateInfo structure specifying the state of the command pool object.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

- `pCommandPool` is a pointer to a VkCommandPool handle in which the created pool is returned.

Valid Usage

- VUID-vkCreateCommandPool-queueFamilyIndex-01937
  `pCreateInfo->queueFamilyIndex` must be the index of a queue family available in the logical device `device`

Valid Usage (Implicit)

- VUID-vkCreateCommandPool-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkCreateCommandPool-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkCommandPoolCreateInfo structure

- VUID-vkCreateCommandPool-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateCommandPool-pCommandPool-parameter
  `pCommandPool` must be a valid pointer to a VkCommandPool handle

- VUID-vkCreateCommandPool-device-queuecount
  The device must have been created with at least `1` queue

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkCommandPoolCreateInfo` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkCommandPoolCreateInfo {
        VkStructureType             sType;
        const void*                 pNext;
        VkCommandPoolCreateFlags    flags;
        uint32_t                    queueFamilyIndex;
    } VkCommandPoolCreateInfo;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask of VkCommandPoolCreateFlagBits indicating usage behavior for the pool and command buffers allocated from it.

- `queueFamilyIndex` designates a queue family as described in section Queue Family Properties. All command buffers allocated from this command pool must be submitted on queues from the same queue family.

Valid Usage

- VUID-VkCommandPoolCreateInfo-flags-02860
  If the `protectedMemory` feature is not enabled, the VK_COMMAND_POOL_CREATE_PROTECTED_BIT bit of `flags` must not be set

- VUID-VkCommandPoolCreateInfo-pNext-09908
  If the `pNext` chain includes a VkDataGraphProcessingEngineCreateInfoARM structure, then `queueFamilyIndex` must designate a queue family that supports VK_QUEUE_DATA_GRAPH_BIT_ARM

- VUID-VkCommandPoolCreateInfo-pNext-09909
  If the `pNext` chain includes a VkDataGraphProcessingEngineCreateInfoARM structure, each member of `pProcessingEngines` must be identical to VkQueueFamilyDataGraphPropertiesARM::`engine` retrieved from vkGetPhysicalDeviceQueueFamilyDataGraphPropertiesARM with `queueFamilyIndex` and the `physicalDevice` that was used to create `device`

- VUID-VkCommandPoolCreateInfo-queueFamilyIndex-11830
  If `queueFamilyIndex` designates a queue family that supports VK_QUEUE_DATA_GRAPH_BIT_ARM and enumerates a foreign engine through vkGetPhysicalDeviceQueueFamilyDataGraphPropertiesARM with type VK_PHYSICAL_DEVICE_DATA_GRAPH_PROCESSING_ENGINE_TYPE_NEURAL_QCOM or VK_PHYSICAL_DEVICE_DATA_GRAPH_PROCESSING_ENGINE_TYPE_COMPUTE_QCOM, the `pNext` chain must include VkDataGraphProcessingEngineCreateInfoARM with VkPhysicalDeviceDataGraphProcessingEngineARM::`isForeign` set to VK_TRUE for all elements of `pProcessingEngines`

Valid Usage (Implicit)

- VUID-VkCommandPoolCreateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO

- VUID-VkCommandPoolCreateInfo-pNext-pNext
  `pNext` must be `NULL` or a pointer to a valid instance of VkDataGraphProcessingEngineCreateInfoARM

- VUID-VkCommandPoolCreateInfo-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkCommandPoolCreateInfo-flags-parameter
  `flags` must be a valid combination of VkCommandPoolCreateFlagBits values

Bits which can be set in VkCommandPoolCreateInfo::`flags`, specifying usage behavior for a command pool, are:

    // Provided by VK_VERSION_1_0
    typedef enum VkCommandPoolCreateFlagBits {
        VK_COMMAND_POOL_CREATE_TRANSIENT_BIT = 0x00000001,
        VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT = 0x00000002,
      // Provided by VK_VERSION_1_1
        VK_COMMAND_POOL_CREATE_PROTECTED_BIT = 0x00000004,
    } VkCommandPoolCreateFlagBits;

- VK_COMMAND_POOL_CREATE_TRANSIENT_BIT specifies that command buffers allocated from the pool will be short-lived, meaning that they will be reset or freed in a relatively short timeframe. This flag may be used by the implementation to control memory allocation behavior within the pool.

- VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT allows any command buffer allocated from a pool to be individually reset to the initial state; either by calling vkResetCommandBuffer, or via the implicit reset when calling vkBeginCommandBuffer. If this flag is not set on a pool, then `vkResetCommandBuffer` must not be called for any command buffer allocated from that pool.

- VK_COMMAND_POOL_CREATE_PROTECTED_BIT specifies that command buffers allocated from the pool are protected command buffers.

    // Provided by VK_VERSION_1_0
    typedef VkFlags VkCommandPoolCreateFlags;

`VkCommandPoolCreateFlags` is a bitmask type for setting a mask of zero or more VkCommandPoolCreateFlagBits.

To trim a command pool, call:

    // Provided by VK_VERSION_1_1
    void vkTrimCommandPool(
        VkDevice                                    device,
        VkCommandPool                               commandPool,
        VkCommandPoolTrimFlags                      flags);

    // Provided by VK_KHR_maintenance1
    // Equivalent to vkTrimCommandPool
    void vkTrimCommandPoolKHR(
        VkDevice                                    device,
        VkCommandPool                               commandPool,
        VkCommandPoolTrimFlags                      flags);

- `device` is the logical device that owns the command pool.

- `commandPool` is the command pool to trim.

- `flags` is reserved for future use.

Trimming a command pool recycles unused memory from the command pool back to the system. Command buffers allocated from the pool are not affected by the command.

Note | This command provides applications with some control over the internal memory allocations used by command pools. Unused memory normally arises from command buffers that have been recorded and later reset, such that they are no longer using the memory. On reset, a command buffer can return memory to its command pool, but the only way to release memory from a command pool to the system requires calling vkResetCommandPool, which cannot be executed while any command buffers from that pool are still in use. Subsequent recording operations into command buffers will reuse this memory but since total memory requirements fluctuate over time, unused memory can accumulate. In this situation, trimming a command pool may be useful to return unused memory back to the system, returning the total outstanding memory allocated by the pool back to a more “average” value. Implementations utilize many internal allocation strategies that make it impossible to guarantee that all unused memory is released back to the system. For instance, an implementation of a command pool may involve allocating memory in bulk from the system and sub-allocating from that memory. In such an implementation any live command buffer that holds a reference to a bulk allocation would prevent that allocation from being freed, even if only a small proportion of the bulk allocation is in use. In most cases trimming will result in a reduction in allocated but unused memory, but it does not guarantee the “ideal” behavior. Trimming may be an expensive operation, and should not be called frequently. Trimming should be treated as a way to relieve memory pressure after application-known points when there exists enough unused memory that the cost of trimming is “worth” it.

Valid Usage (Implicit)

- VUID-vkTrimCommandPool-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkTrimCommandPool-commandPool-parameter
  `commandPool` must be a valid VkCommandPool handle

- VUID-vkTrimCommandPool-flags-zerobitmask
  `flags` must be `0`

- VUID-vkTrimCommandPool-commandPool-parent
  `commandPool` must have been created, allocated, or retrieved from `device`

Host Synchronization

- Host access to `commandPool` must be externally synchronized

    // Provided by VK_VERSION_1_1
    typedef VkFlags VkCommandPoolTrimFlags;

    // Provided by VK_KHR_maintenance1
    // Equivalent to VkCommandPoolTrimFlags
    typedef VkCommandPoolTrimFlags VkCommandPoolTrimFlagsKHR;

`VkCommandPoolTrimFlags` is a bitmask type for setting a mask, but is currently reserved for future use.

To reset a command pool, call:

    // Provided by VK_VERSION_1_0
    VkResult vkResetCommandPool(
        VkDevice                                    device,
        VkCommandPool                               commandPool,
        VkCommandPoolResetFlags                     flags);

- `device` is the logical device that owns the command pool.

- `commandPool` is the command pool to reset.

- `flags` is a bitmask of VkCommandPoolResetFlagBits controlling the reset operation.

Resetting a command pool recycles all of the resources from all of the command buffers allocated from the command pool back to the command pool. All command buffers that have been allocated from the command pool are put in the initial state.

Any primary command buffer allocated from another VkCommandPool that is in the recording or executable state and has a secondary command buffer allocated from `commandPool` recorded into it, becomes invalid.

Valid Usage

- VUID-vkResetCommandPool-commandPool-00040
  All `VkCommandBuffer` objects allocated from `commandPool` must not be in the pending state

Valid Usage (Implicit)

- VUID-vkResetCommandPool-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkResetCommandPool-commandPool-parameter
  `commandPool` must be a valid VkCommandPool handle

- VUID-vkResetCommandPool-flags-parameter
  `flags` must be a valid combination of VkCommandPoolResetFlagBits values

- VUID-vkResetCommandPool-commandPool-parent
  `commandPool` must have been created, allocated, or retrieved from `device`

Host Synchronization

- Host access to `commandPool` must be externally synchronized

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

Bits which can be set in vkResetCommandPool::`flags`, controlling the reset operation, are:

    // Provided by VK_VERSION_1_0
    typedef enum VkCommandPoolResetFlagBits {
        VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT = 0x00000001,
    } VkCommandPoolResetFlagBits;

- VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT specifies that resetting a command pool recycles all of the resources from the command pool back to the system.

    // Provided by VK_VERSION_1_0
    typedef VkFlags VkCommandPoolResetFlags;

`VkCommandPoolResetFlags` is a bitmask type for setting a mask of zero or more VkCommandPoolResetFlagBits.

To destroy a command pool, call:

    // Provided by VK_VERSION_1_0
    void vkDestroyCommandPool(
        VkDevice                                    device,
        VkCommandPool                               commandPool,
        const VkAllocationCallbacks*                pAllocator);

- `device` is the logical device that destroys the command pool.

- `commandPool` is the handle of the command pool to destroy.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

When a pool is destroyed, all command buffers allocated from the pool are freed.

Any primary command buffer allocated from another VkCommandPool that is in the recording or executable state and has a secondary command buffer allocated from `commandPool` recorded into it, becomes invalid.

Valid Usage

- VUID-vkDestroyCommandPool-commandPool-00041
  All `VkCommandBuffer` objects allocated from `commandPool` must not be in the pending state

- VUID-vkDestroyCommandPool-commandPool-00042
  If `VkAllocationCallbacks` were provided when `commandPool` was created, a compatible set of callbacks must be provided here

- VUID-vkDestroyCommandPool-commandPool-00043
  If no `VkAllocationCallbacks` were provided when `commandPool` was created, `pAllocator` must be `NULL`

Valid Usage (Implicit)

- VUID-vkDestroyCommandPool-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkDestroyCommandPool-commandPool-parameter
  If `commandPool` is not VK_NULL_HANDLE, `commandPool` must be a valid VkCommandPool handle

- VUID-vkDestroyCommandPool-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkDestroyCommandPool-commandPool-parent
  If `commandPool` is a valid handle, it must have been created, allocated, or retrieved from `device`

Host Synchronization

- Host access to `commandPool` must be externally synchronized

### 6.3. Command Buffer Allocation and Management

To allocate command buffers, call:

    // Provided by VK_VERSION_1_0
    VkResult vkAllocateCommandBuffers(
        VkDevice                                    device,
        const VkCommandBufferAllocateInfo*          pAllocateInfo,
        VkCommandBuffer*                            pCommandBuffers);

- `device` is the logical device that owns the command pool.

- `pAllocateInfo` is a pointer to a VkCommandBufferAllocateInfo structure describing parameters of the allocation. `commandPool` may be accessed any time one of the resulting command buffers is accessed.

- `pCommandBuffers` is a pointer to an array of VkCommandBuffer handles in which the resulting command buffer objects are returned. The array must be at least the length specified by the `commandBufferCount` member of `pAllocateInfo`. Each allocated command buffer begins in the initial state.

`vkAllocateCommandBuffers` can be used to allocate multiple command buffers. If the allocation of any of those command buffers fails, the implementation must free all successfully allocated command buffer objects from this command, set all entries of the `pCommandBuffers` array to `NULL` and return the error.

Note | Filling `pCommandBuffers` with `NULL` values on failure is an exception to the default error behavior that output parameters will have undefined contents.

When command buffers are first allocated, they are in the initial state.

Valid Usage (Implicit)

- VUID-vkAllocateCommandBuffers-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkAllocateCommandBuffers-pAllocateInfo-parameter
  `pAllocateInfo` must be a valid pointer to a valid VkCommandBufferAllocateInfo structure

- VUID-vkAllocateCommandBuffers-pCommandBuffers-parameter
  `pCommandBuffers` must be a valid pointer to an array of `pAllocateInfo->commandBufferCount` VkCommandBuffer handles

- VUID-vkAllocateCommandBuffers-device-queuecount
  The device must have been created with at least `1` queue

- VUID-vkAllocateCommandBuffers-pAllocateInfo::commandBufferCount-arraylength
  `pAllocateInfo->commandBufferCount` must be greater than `0`

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkCommandBufferAllocateInfo` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkCommandBufferAllocateInfo {
        VkStructureType         sType;
        const void*             pNext;
        VkCommandPool           commandPool;
        VkCommandBufferLevel    level;
        uint32_t                commandBufferCount;
    } VkCommandBufferAllocateInfo;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `commandPool` is the command pool from which the command buffers are allocated.

- `level` is a VkCommandBufferLevel value specifying the command buffer level.

- `commandBufferCount` is the number of command buffers to allocate from the pool.

Valid Usage (Implicit)

- VUID-VkCommandBufferAllocateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO

- VUID-VkCommandBufferAllocateInfo-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkCommandBufferAllocateInfo-commandPool-parameter
  `commandPool` must be a valid VkCommandPool handle

- VUID-VkCommandBufferAllocateInfo-level-parameter
  `level` must be a valid VkCommandBufferLevel value

Host Synchronization

- Host access to `commandPool` must be externally synchronized

Possible values of VkCommandBufferAllocateInfo::`level`, specifying the command buffer level, are:

    // Provided by VK_VERSION_1_0
    typedef enum VkCommandBufferLevel {
        VK_COMMAND_BUFFER_LEVEL_PRIMARY = 0,
        VK_COMMAND_BUFFER_LEVEL_SECONDARY = 1,
    } VkCommandBufferLevel;

- VK_COMMAND_BUFFER_LEVEL_PRIMARY specifies a primary command buffer.

- VK_COMMAND_BUFFER_LEVEL_SECONDARY specifies a secondary command buffer.

To reset a command buffer, call:

    // Provided by VK_VERSION_1_0
    VkResult vkResetCommandBuffer(
        VkCommandBuffer                             commandBuffer,
        VkCommandBufferResetFlags                   flags);

- `commandBuffer` is the command buffer to reset. The command buffer can be in any state other than pending, and is moved into the initial state.

- `flags` is a bitmask of VkCommandBufferResetFlagBits controlling the reset operation.

Any primary command buffer that is in the recording or executable state and has `commandBuffer` recorded into it, becomes invalid.

After a command buffer is reset, any objects or memory specified by commands recorded into the command buffer must no longer be accessed when the command buffer is accessed by the implementation.

Valid Usage

- VUID-vkResetCommandBuffer-commandBuffer-00045
  `commandBuffer` must not be in the pending state

- VUID-vkResetCommandBuffer-commandBuffer-00046
  `commandBuffer` must have been allocated from a pool that was created with the VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT

Valid Usage (Implicit)

- VUID-vkResetCommandBuffer-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkResetCommandBuffer-flags-parameter
  `flags` must be a valid combination of VkCommandBufferResetFlagBits values

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

Bits which can be set in vkResetCommandBuffer::`flags`, controlling the reset operation, are:

    // Provided by VK_VERSION_1_0
    typedef enum VkCommandBufferResetFlagBits {
        VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT = 0x00000001,
    } VkCommandBufferResetFlagBits;

- VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT specifies that most or all memory resources currently owned by the command buffer should be returned to the parent command pool. If this flag is not set, then the command buffer may hold onto memory resources and reuse them when recording commands. `commandBuffer` is moved to the initial state.

    // Provided by VK_VERSION_1_0
    typedef VkFlags VkCommandBufferResetFlags;

`VkCommandBufferResetFlags` is a bitmask type for setting a mask of zero or more VkCommandBufferResetFlagBits.

To free command buffers, call:

    // Provided by VK_VERSION_1_0
    void vkFreeCommandBuffers(
        VkDevice                                    device,
        VkCommandPool                               commandPool,
        uint32_t                                    commandBufferCount,
        const VkCommandBuffer*                      pCommandBuffers);

- `device` is the logical device that owns the command pool.

- `commandPool` is the command pool from which the command buffers were allocated.

- `commandBufferCount` is the length of the `pCommandBuffers` array.

- `pCommandBuffers` is a pointer to an array of handles of command buffers to free.

Any primary command buffer that is in the recording or executable state and has any element of `pCommandBuffers` recorded into it, becomes invalid.

Valid Usage

- VUID-vkFreeCommandBuffers-pCommandBuffers-00047
  All elements of `pCommandBuffers` must not be in the pending state

- VUID-vkFreeCommandBuffers-pCommandBuffers-00048
  `pCommandBuffers` must be a valid pointer to an array of `commandBufferCount` `VkCommandBuffer` handles, each element of which must either be a valid handle or `NULL`

Valid Usage (Implicit)

- VUID-vkFreeCommandBuffers-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkFreeCommandBuffers-commandPool-parameter
  `commandPool` must be a valid VkCommandPool handle

- VUID-vkFreeCommandBuffers-commandBufferCount-arraylength
  `commandBufferCount` must be greater than `0`

- VUID-vkFreeCommandBuffers-commandPool-parent
  `commandPool` must have been created, allocated, or retrieved from `device`

- VUID-vkFreeCommandBuffers-pCommandBuffers-parent
  Each element of `pCommandBuffers` that is a valid handle must have been created, allocated, or retrieved from `commandPool`

Host Synchronization

- Host access to `commandPool` must be externally synchronized

- Host access to each member of `pCommandBuffers` must be externally synchronized

### 6.4. Command Buffer Recording

To begin recording a command buffer, call:

    // Provided by VK_VERSION_1_0
    VkResult vkBeginCommandBuffer(
        VkCommandBuffer                             commandBuffer,
        const VkCommandBufferBeginInfo*             pBeginInfo);

- `commandBuffer` is the handle of the command buffer which is to be put in the recording state.

- `pBeginInfo` is a pointer to a VkCommandBufferBeginInfo structure defining additional information about how the command buffer begins recording.

Valid Usage

- VUID-vkBeginCommandBuffer-commandBuffer-00049
  `commandBuffer` must not be in the recording or pending state

- VUID-vkBeginCommandBuffer-commandBuffer-00050
  If `commandBuffer` was allocated from a VkCommandPool which did not have the VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT flag set, `commandBuffer` must be in the initial state

- VUID-vkBeginCommandBuffer-commandBuffer-00051
  If `commandBuffer` is a secondary command buffer, the `pInheritanceInfo` member of `pBeginInfo` must be a valid `VkCommandBufferInheritanceInfo` structure

- VUID-vkBeginCommandBuffer-commandBuffer-00052
  If `commandBuffer` is a secondary command buffer and either the `occlusionQueryEnable` member of the `pInheritanceInfo` member of `pBeginInfo` is VK_FALSE, or the `occlusionQueryPrecise` feature is not enabled, then `pBeginInfo->pInheritanceInfo->queryFlags` must not contain VK_QUERY_CONTROL_PRECISE_BIT

- VUID-vkBeginCommandBuffer-commandBuffer-02840
  If `commandBuffer` is a primary command buffer, then `pBeginInfo->flags` must not set both the VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT and the VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT flags

Valid Usage (Implicit)

- VUID-vkBeginCommandBuffer-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkBeginCommandBuffer-pBeginInfo-parameter
  `pBeginInfo` must be a valid pointer to a valid VkCommandBufferBeginInfo structure

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkCommandBufferBeginInfo` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkCommandBufferBeginInfo {
        VkStructureType                          sType;
        const void*                              pNext;
        VkCommandBufferUsageFlags                flags;
        const VkCommandBufferInheritanceInfo*    pInheritanceInfo;
    } VkCommandBufferBeginInfo;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask of VkCommandBufferUsageFlagBits specifying usage behavior for the command buffer.

- `pInheritanceInfo` is a pointer to a VkCommandBufferInheritanceInfo structure, used if `commandBuffer` is a secondary command buffer. If this is a primary command buffer, then this value is ignored.

Valid Usage

- VUID-VkCommandBufferBeginInfo-flags-09123
  If `flags` contains VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT, the VkCommandPool that `commandBuffer` was allocated from must support graphics operations

- VUID-VkCommandBufferBeginInfo-flags-00055
  If `flags` contains VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT, the `framebuffer` member of `pInheritanceInfo` must be either VK_NULL_HANDLE, or a valid `VkFramebuffer` that is compatible with the `renderPass` member of `pInheritanceInfo`

- VUID-VkCommandBufferBeginInfo-flags-09240
  If `flags` contains VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT and the `dynamicRendering` feature is not enabled, the `renderPass` member of `pInheritanceInfo` must not be VK_NULL_HANDLE

- VUID-VkCommandBufferBeginInfo-flags-06002
  If `flags` contains VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT and the `renderPass` member of `pInheritanceInfo` is VK_NULL_HANDLE, the `pNext` chain of `pInheritanceInfo` must include a VkCommandBufferInheritanceRenderingInfo structure

- VUID-VkCommandBufferBeginInfo-flags-06003
  If `flags` contains VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT, the `renderPass` member of `pInheritanceInfo` is VK_NULL_HANDLE, and the `pNext` chain of `pInheritanceInfo` includes a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, the `colorAttachmentCount` member of that structure must be equal to the value of VkCommandBufferInheritanceRenderingInfo::`colorAttachmentCount`

- VUID-VkCommandBufferBeginInfo-flags-06000
  If `flags` contains VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT and the `renderPass` member of `pInheritanceInfo` is not VK_NULL_HANDLE, the `renderPass` member of `pInheritanceInfo` must be a valid `VkRenderPass`

- VUID-VkCommandBufferBeginInfo-flags-06001
  If `flags` contains VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT and the `renderPass` member of `pInheritanceInfo` is not VK_NULL_HANDLE, the `subpass` member of `pInheritanceInfo` must be a valid subpass index within the `renderPass` member of `pInheritanceInfo`

- VUID-VkCommandBufferBeginInfo-flags-10617
  If `flags` contains VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT , the `renderPass` member of `pInheritanceInfo` is not VK_NULL_HANDLE, and `renderPass` was created with tile shading enabled, VK_TILE_SHADING_RENDER_PASS_ENABLE_BIT_QCOM must be included in VkRenderPassTileShadingCreateInfoQCOM::`flags`

- VUID-VkCommandBufferBeginInfo-flags-10618
  If `flags` does not contain VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT , the `renderPass` member of `pInheritanceInfo` is VK_NULL_HANDLE, or `renderPass` was not created with tile shading enabled, VK_TILE_SHADING_RENDER_PASS_ENABLE_BIT_QCOM must not be included in VkRenderPassTileShadingCreateInfoQCOM::`flags`

- VUID-VkCommandBufferBeginInfo-flags-10619
  If VK_TILE_SHADING_RENDER_PASS_ENABLE_BIT_QCOM is included in VkRenderPassTileShadingCreateInfoQCOM::`flags`, VkRenderPassTileShadingCreateInfoQCOM::`tileApronSize` must be equal to the `tileApronSize` used to create `renderPass`

Valid Usage (Implicit)

- VUID-VkCommandBufferBeginInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO

- VUID-VkCommandBufferBeginInfo-pNext-pNext
  `pNext` must be `NULL` or a pointer to a valid instance of VkDeviceGroupCommandBufferBeginInfo

- VUID-VkCommandBufferBeginInfo-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkCommandBufferBeginInfo-flags-parameter
  `flags` must be a valid combination of VkCommandBufferUsageFlagBits values

Bits which can be set in VkCommandBufferBeginInfo::`flags`, specifying usage behavior for a command buffer, are:

    // Provided by VK_VERSION_1_0
    typedef enum VkCommandBufferUsageFlagBits {
        VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT = 0x00000001,
        VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT = 0x00000002,
        VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT = 0x00000004,
    } VkCommandBufferUsageFlagBits;

- VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT specifies that each recording of the command buffer will only be submitted once, and the command buffer will be reset and recorded again between each submission.

- VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT specifies that a secondary command buffer is considered to be entirely inside a render pass. If this is a primary command buffer, then this bit is ignored.

- VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT specifies that a command buffer can be resubmitted to any queue of the same queue family while it is in the pending state, and recorded into multiple primary command buffers.

    // Provided by VK_VERSION_1_0
    typedef VkFlags VkCommandBufferUsageFlags;

`VkCommandBufferUsageFlags` is a bitmask type for setting a mask of zero or more VkCommandBufferUsageFlagBits.

If the command buffer is a secondary command buffer, then the `VkCommandBufferInheritanceInfo` structure defines any state that will be inherited from the primary command buffer:

    // Provided by VK_VERSION_1_0
    typedef struct VkCommandBufferInheritanceInfo {
        VkStructureType                  sType;
        const void*                      pNext;
        VkRenderPass                     renderPass;
        uint32_t                         subpass;
        VkFramebuffer                    framebuffer;
        VkBool32                         occlusionQueryEnable;
        VkQueryControlFlags              queryFlags;
        VkQueryPipelineStatisticFlags    pipelineStatistics;
    } VkCommandBufferInheritanceInfo;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `renderPass` is a VkRenderPass object defining which render passes the `VkCommandBuffer` will be compatible with and can be executed within.

- `subpass` is the index of the subpass within the render pass instance that the `VkCommandBuffer` will be executed within.

- `framebuffer` can refer to the VkFramebuffer object that the `VkCommandBuffer` will be rendering to if it is executed within a render pass instance. It can be VK_NULL_HANDLE if the framebuffer is not known.

  Note | Specifying the exact framebuffer that the secondary command buffer will be executed with may result in better performance at command buffer execution time.

- `occlusionQueryEnable` specifies whether the command buffer can be executed while an occlusion query is active in the primary command buffer. If this is VK_TRUE, then this command buffer can be executed whether the primary command buffer has an occlusion query active or not. If this is VK_FALSE, then the primary command buffer must not have an occlusion query active.

- `queryFlags` specifies the query flags that can be used by an active occlusion query in the primary command buffer when this secondary command buffer is executed. If this value includes the VK_QUERY_CONTROL_PRECISE_BIT bit, then the active query can return boolean results or actual sample counts. If this bit is not set, then the active query must not use the VK_QUERY_CONTROL_PRECISE_BIT bit.

- `pipelineStatistics` is a bitmask of VkQueryPipelineStatisticFlagBits specifying the set of pipeline statistics that can be counted by an active query in the primary command buffer when this secondary command buffer is executed. If this value includes a given bit, then this command buffer can be executed whether the primary command buffer has a pipeline statistics query active that includes this bit or not. If this value excludes a given bit, then the active pipeline statistics query must not be from a query pool that counts that statistic.

If the VkCommandBuffer will not be executed within a render pass instance, or if the render pass instance was begun with vkCmdBeginRendering, `renderPass`, `subpass`, and `framebuffer` are ignored.

Valid Usage

- VUID-VkCommandBufferInheritanceInfo-occlusionQueryEnable-00056
  If the `inheritedQueries` feature is not enabled, `occlusionQueryEnable` must be VK_FALSE

- VUID-VkCommandBufferInheritanceInfo-queryFlags-00057
  If the `inheritedQueries` feature is enabled, `queryFlags` must be a valid combination of VkQueryControlFlagBits values

- VUID-VkCommandBufferInheritanceInfo-queryFlags-02788
  If the `inheritedQueries` feature is not enabled, `queryFlags` must be `0`

- VUID-VkCommandBufferInheritanceInfo-pipelineStatistics-02789
  If the `pipelineStatisticsQuery` feature is enabled, `pipelineStatistics` must be a valid combination of VkQueryPipelineStatisticFlagBits values

- VUID-VkCommandBufferInheritanceInfo-pipelineStatistics-00058
  If the `pipelineStatisticsQuery` feature is not enabled, `pipelineStatistics` must be `0`

Valid Usage (Implicit)

- VUID-VkCommandBufferInheritanceInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO

- VUID-VkCommandBufferInheritanceInfo-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkAttachmentSampleCountInfoAMD, VkCommandBufferInheritanceConditionalRenderingInfoEXT, VkCommandBufferInheritanceDescriptorHeapInfoEXT, VkCommandBufferInheritanceRenderPassTransformInfoQCOM, VkCommandBufferInheritanceRenderingInfo, VkCommandBufferInheritanceViewportScissorInfoNV, VkCustomResolveCreateInfoEXT, VkExternalFormatANDROID, VkExternalFormatOHOS, VkMultiviewPerViewAttributesInfoNVX, VkRenderPassTileShadingCreateInfoQCOM, VkRenderingAttachmentLocationInfo, VkRenderingInputAttachmentIndexInfo, or VkTileMemoryBindInfoQCOM

- VUID-VkCommandBufferInheritanceInfo-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkCommandBufferInheritanceInfo-commonparent
  Both of `framebuffer`, and `renderPass` that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevice

Note | On some implementations, not using the VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT bit enables command buffers to be patched in-place if needed, rather than creating a copy of the command buffer.

If a command buffer is in the invalid, or executable state, and the command buffer was allocated from a command pool with the VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT flag set, then `vkBeginCommandBuffer` implicitly resets the command buffer, behaving as if `vkResetCommandBuffer` had been called with VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT not set. After the implicit reset, `commandBuffer` is moved to the recording state.

If the `commandBufferInheritance` feature is enabled, all graphics and compute state including bound pipeline state, bound shader objects, bound vertex and index buffers, bound descriptor sets and push constants, descriptor heaps and push data, and all previously set dynamic state is inherited by the secondary command buffer from the primary or secondary command buffer that executes it. Furthermore, all of the state set by this secondary command buffer is inherited back to the primary or secondard command buffer that executes it. If the `commandBufferInheritance` feature is not enabled there is a limited amount of inheritance of state into the secondary command buffer as specified below.

If the `pNext` chain of VkCommandBufferInheritanceInfo includes a `VkCommandBufferInheritanceConditionalRenderingInfoEXT` structure, then that structure controls whether a command buffer can be executed while conditional rendering is active in the primary command buffer.

The `VkCommandBufferInheritanceConditionalRenderingInfoEXT` structure is defined as:

    // Provided by VK_EXT_conditional_rendering
    typedef struct VkCommandBufferInheritanceConditionalRenderingInfoEXT {
        VkStructureType    sType;
        const void*        pNext;
        VkBool32           conditionalRenderingEnable;
    } VkCommandBufferInheritanceConditionalRenderingInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `conditionalRenderingEnable` specifies whether the command buffer can be executed while conditional rendering is active in the primary command buffer. If this is VK_TRUE, then this command buffer can be executed whether the primary command buffer has active conditional rendering or not. If this is VK_FALSE, then the primary command buffer must not have conditional rendering active.

If this structure is not present, the behavior is as if `conditionalRenderingEnable` is VK_FALSE.

Valid Usage

- VUID-VkCommandBufferInheritanceConditionalRenderingInfoEXT-conditionalRenderingEnable-01977
  If the `inheritedConditionalRendering` feature is not enabled, `conditionalRenderingEnable` must be VK_FALSE

Valid Usage (Implicit)

- VUID-VkCommandBufferInheritanceConditionalRenderingInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_CONDITIONAL_RENDERING_INFO_EXT

Structure Chaining

Extends the structure

  - VkCommandBufferInheritanceInfo

To begin recording a secondary command buffer compatible with execution inside a render pass using render pass transform, add the VkCommandBufferInheritanceRenderPassTransformInfoQCOM to the `pNext` chain of VkCommandBufferInheritanceInfo structure passed to the vkBeginCommandBuffer command specifying the parameters for transformed rasterization.

The `VkCommandBufferInheritanceRenderPassTransformInfoQCOM` structure is defined as:

    // Provided by VK_QCOM_render_pass_transform
    typedef struct VkCommandBufferInheritanceRenderPassTransformInfoQCOM {
        VkStructureType                  sType;
        const void*                      pNext;
        VkSurfaceTransformFlagBitsKHR    transform;
        VkRect2D                         renderArea;
    } VkCommandBufferInheritanceRenderPassTransformInfoQCOM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `transform` is a VkSurfaceTransformFlagBitsKHR value describing the transform to be applied to the render pass.

- `renderArea` is the render area that is affected by the command buffer.

When the secondary is recorded to execute within a render pass instance using vkCmdExecuteCommands, the render pass transform parameters of the secondary command buffer must be consistent with the render pass transform parameters specified for the render pass instance. In particular, the `transform` and `renderArea` for command buffer must be identical to the `transform` and `renderArea` of the render pass instance.

Valid Usage

- VUID-VkCommandBufferInheritanceRenderPassTransformInfoQCOM-transform-02864
  `transform` must be VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR, VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR, VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR, or VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR

Valid Usage (Implicit)

- VUID-VkCommandBufferInheritanceRenderPassTransformInfoQCOM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_RENDER_PASS_TRANSFORM_INFO_QCOM

Structure Chaining

Extends the structure

  - VkCommandBufferInheritanceInfo

The `VkCommandBufferInheritanceViewportScissorInfoNV` structure is defined as:

    // Provided by VK_NV_inherited_viewport_scissor
    typedef struct VkCommandBufferInheritanceViewportScissorInfoNV {
        VkStructureType      sType;
        const void*          pNext;
        VkBool32             viewportScissor2D;
        uint32_t             viewportDepthCount;
        const VkViewport*    pViewportDepths;
    } VkCommandBufferInheritanceViewportScissorInfoNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `viewportScissor2D` specifies whether the listed dynamic state is inherited.

- `viewportDepthCount` specifies the maximum number of viewports to inherit. When `viewportScissor2D` is VK_FALSE, the behavior is as if this value is zero.

- `pViewportDepths` is a pointer to a VkViewport structure specifying the expected depth range for each inherited viewport.

If the `pNext` chain of VkCommandBufferInheritanceInfo includes a `VkCommandBufferInheritanceViewportScissorInfoNV` structure, then that structure controls whether a command buffer can inherit the following state from other command buffers:

- VK_DYNAMIC_STATE_SCISSOR

- VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT

- VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT

- VK_DYNAMIC_STATE_DISCARD_RECTANGLE_ENABLE_EXT

- VK_DYNAMIC_STATE_DISCARD_RECTANGLE_MODE_EXT

as well as the following state, with restrictions on inherited depth values and viewport count:

- VK_DYNAMIC_STATE_VIEWPORT

- VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT

If `viewportScissor2D` is VK_FALSE, then the command buffer does not inherit the listed dynamic state, and should set this state itself. If this structure is not present, the behavior is as if `viewportScissor2D` is VK_FALSE.

If `viewportScissor2D` is VK_TRUE, then the listed dynamic state is inherited, and the command buffer must not set this state, except that the viewport and scissor count may be set by binding a graphics pipeline that does not specify this state as dynamic.

Note | Due to this restriction, applications should ensure either all or none of the graphics pipelines bound in this secondary command buffer use dynamic viewport/scissor counts.

When the command buffer is executed as part of a the execution of a vkCmdExecuteCommands command, the inherited state (if enabled) is determined by the following procedure, performed separately for each dynamic state, and separately for each value for dynamic state that consists of multiple values (e.g. multiple viewports).

- With i being the index of the executed command buffer in the `pCommandBuffers` array of vkCmdExecuteCommands, if i > 0 and any secondary command buffer from index 0 to i-1 modifies the state, the inherited state is provisionally set to the final value set by the last such secondary command buffer. Binding a graphics pipeline defining the state statically is equivalent to setting the state to an undefined value.

- Otherwise, the tentatative inherited state is that of the primary command buffer at the point the vkCmdExecuteCommands command was recorded; if the state is undefined, then so is the provisional inherited state.

- If the provisional inherited state is an undefined value, then the state is not inherited.

- If the provisional inherited state is a viewport, with n being its viewport index, then if n ≥ `viewportDepthCount`, or if either VkViewport::`minDepth` or VkViewport::`maxDepth` are not equal to the respective values of the nth element of `pViewportDepths`, then the state is not inherited.

- If the provisional inherited state passes both checks, then it becomes the actual inherited state.

Note | There is no support for inheriting dynamic state from a secondary command buffer executed as part of a different `vkCmdExecuteCommands` command.

Valid Usage

- VUID-VkCommandBufferInheritanceViewportScissorInfoNV-viewportScissor2D-04782
  If the `inheritedViewportScissor2D` feature is not enabled, `viewportScissor2D` must be VK_FALSE

- VUID-VkCommandBufferInheritanceViewportScissorInfoNV-viewportScissor2D-04783
  If the `multiViewport` feature is not enabled and `viewportScissor2D` is VK_TRUE, then `viewportDepthCount` must be `1`

- VUID-VkCommandBufferInheritanceViewportScissorInfoNV-viewportScissor2D-04784
  If `viewportScissor2D` is VK_TRUE, then `viewportDepthCount` must be greater than `0`

- VUID-VkCommandBufferInheritanceViewportScissorInfoNV-viewportScissor2D-04785
  If `viewportScissor2D` is VK_TRUE, then `pViewportDepths` must be a valid pointer to an array of `viewportDepthCount` valid `VkViewport` structures, except any requirements on `x`, `y`, `width`, and `height` do not apply

- VUID-VkCommandBufferInheritanceViewportScissorInfoNV-viewportScissor2D-04786
  If `viewportScissor2D` is VK_TRUE, then the command buffer must be recorded with the VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT

Valid Usage (Implicit)

- VUID-VkCommandBufferInheritanceViewportScissorInfoNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_VIEWPORT_SCISSOR_INFO_NV

Structure Chaining

Extends the structure

  - VkCommandBufferInheritanceInfo

The `VkCommandBufferInheritanceRenderingInfo` structure is defined as:

    // Provided by VK_VERSION_1_3
    typedef struct VkCommandBufferInheritanceRenderingInfo {
        VkStructureType          sType;
        const void*              pNext;
        VkRenderingFlags         flags;
        uint32_t                 viewMask;
        uint32_t                 colorAttachmentCount;
        const VkFormat*          pColorAttachmentFormats;
        VkFormat                 depthAttachmentFormat;
        VkFormat                 stencilAttachmentFormat;
        VkSampleCountFlagBits    rasterizationSamples;
    } VkCommandBufferInheritanceRenderingInfo;

    // Provided by VK_KHR_dynamic_rendering
    // Equivalent to VkCommandBufferInheritanceRenderingInfo
    typedef VkCommandBufferInheritanceRenderingInfo VkCommandBufferInheritanceRenderingInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure

- `flags` is a bitmask of VkRenderingFlagBits used by the render pass instance.

- `viewMask` is the view mask used for rendering.

- `colorAttachmentCount` is the number of color attachments specified in the render pass instance.

- `pColorAttachmentFormats` is a pointer to an array of VkFormat values defining the format of color attachments.

- `depthAttachmentFormat` is a VkFormat value defining the format of the depth attachment.

- `stencilAttachmentFormat` is a VkFormat value defining the format of the stencil attachment.

- `rasterizationSamples` is a VkSampleCountFlagBits specifying the number of samples used in rasterization.

If the `pNext` chain of VkCommandBufferInheritanceInfo includes a `VkCommandBufferInheritanceRenderingInfo` structure, then that structure controls parameters of dynamic render pass instances that the VkCommandBuffer can be executed within. If VkCommandBufferInheritanceInfo::`renderPass` is not VK_NULL_HANDLE, or VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT is not specified in VkCommandBufferBeginInfo::`flags`, parameters of this structure are ignored.

If `colorAttachmentCount` is `0` and the `variableMultisampleRate` feature is enabled, `rasterizationSamples` is ignored.

If `depthAttachmentFormat`, `stencilAttachmentFormat`, or any element of `pColorAttachmentFormats` is VK_FORMAT_UNDEFINED, it indicates that the corresponding attachment is unused within the render pass and writes to those attachments are discarded.

Valid Usage

- VUID-VkCommandBufferInheritanceRenderingInfo-colorAttachmentCount-06004
  If `colorAttachmentCount` is not `0`, `rasterizationSamples` must be a valid VkSampleCountFlagBits value

- VUID-VkCommandBufferInheritanceRenderingInfo-variableMultisampleRate-06005
  If the `variableMultisampleRate` feature is not enabled, `rasterizationSamples` must be a valid VkSampleCountFlagBits value

- VUID-VkCommandBufferInheritanceRenderingInfo-depthAttachmentFormat-06540
  If `depthAttachmentFormat` is not VK_FORMAT_UNDEFINED, it must be a format that includes a depth component

- VUID-VkCommandBufferInheritanceRenderingInfo-depthAttachmentFormat-06007
  If `depthAttachmentFormat` is not VK_FORMAT_UNDEFINED, it must be a format with potential format features that include VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT

- VUID-VkCommandBufferInheritanceRenderingInfo-pColorAttachmentFormats-06492
  If any element of `pColorAttachmentFormats` is not VK_FORMAT_UNDEFINED, it must be a format with potential format features that include VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT , or VK_FORMAT_FEATURE_2_LINEAR_COLOR_ATTACHMENT_BIT_NV if the `linearColorAttachment` feature is enabled

- VUID-VkCommandBufferInheritanceRenderingInfo-stencilAttachmentFormat-06541
  If `stencilAttachmentFormat` is not VK_FORMAT_UNDEFINED, it must be a format that includes a stencil aspect

- VUID-VkCommandBufferInheritanceRenderingInfo-stencilAttachmentFormat-06199
  If `stencilAttachmentFormat` is not VK_FORMAT_UNDEFINED, it must be a format with potential format features that include VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT

- VUID-VkCommandBufferInheritanceRenderingInfo-depthAttachmentFormat-06200
  If `depthAttachmentFormat` is not VK_FORMAT_UNDEFINED and `stencilAttachmentFormat` is not VK_FORMAT_UNDEFINED, `depthAttachmentFormat` must equal `stencilAttachmentFormat`

- VUID-VkCommandBufferInheritanceRenderingInfo-multiview-06008
  If the `multiview` feature is not enabled, `viewMask` must be `0`

- VUID-VkCommandBufferInheritanceRenderingInfo-viewMask-06009
  The index of the most significant bit in `viewMask` must be less than `maxMultiviewViewCount`

Valid Usage (Implicit)

- VUID-VkCommandBufferInheritanceRenderingInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_RENDERING_INFO

- VUID-VkCommandBufferInheritanceRenderingInfo-flags-parameter
  `flags` must be a valid combination of VkRenderingFlagBits values

- VUID-VkCommandBufferInheritanceRenderingInfo-pColorAttachmentFormats-parameter
  If `colorAttachmentCount` is not `0`, `pColorAttachmentFormats` must be a valid pointer to an array of `colorAttachmentCount` valid VkFormat values

- VUID-VkCommandBufferInheritanceRenderingInfo-depthAttachmentFormat-parameter
  `depthAttachmentFormat` must be a valid VkFormat value

- VUID-VkCommandBufferInheritanceRenderingInfo-stencilAttachmentFormat-parameter
  `stencilAttachmentFormat` must be a valid VkFormat value

- VUID-VkCommandBufferInheritanceRenderingInfo-rasterizationSamples-parameter
  If `rasterizationSamples` is not `0`, `rasterizationSamples` must be a valid VkSampleCountFlagBits value

Structure Chaining

Extends the structure

  - VkCommandBufferInheritanceInfo

The `VkAttachmentSampleCountInfoAMD` or `VkAttachmentSampleCountInfoNV` structure is defined as:

    // Provided by VK_AMD_mixed_attachment_samples with VK_VERSION_1_3 or VK_KHR_dynamic_rendering
    typedef struct VkAttachmentSampleCountInfoAMD {
        VkStructureType                 sType;
        const void*                     pNext;
        uint32_t                        colorAttachmentCount;
        const VkSampleCountFlagBits*    pColorAttachmentSamples;
        VkSampleCountFlagBits           depthStencilAttachmentSamples;
    } VkAttachmentSampleCountInfoAMD;

    // Provided by VK_NV_framebuffer_mixed_samples with VK_VERSION_1_3 or VK_KHR_dynamic_rendering
    // Equivalent to VkAttachmentSampleCountInfoAMD
    typedef VkAttachmentSampleCountInfoAMD VkAttachmentSampleCountInfoNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure

- `colorAttachmentCount` is the number of color attachments specified in a render pass instance.

- `pColorAttachmentSamples` is a pointer to an array of VkSampleCountFlagBits values defining the sample count of color attachments.

- `depthStencilAttachmentSamples` is a VkSampleCountFlagBits value defining the sample count of a depth/stencil attachment.

If VkCommandBufferInheritanceInfo::`renderPass` is VK_NULL_HANDLE, VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT is specified in VkCommandBufferBeginInfo::`flags`, and the `pNext` chain of VkCommandBufferInheritanceInfo includes `VkAttachmentSampleCountInfoAMD`, then this structure defines the sample counts of each attachment within the render pass instance. If `VkAttachmentSampleCountInfoAMD` is not included, the value of VkCommandBufferInheritanceRenderingInfo::`rasterizationSamples` is used as the sample count for each attachment. If VkCommandBufferInheritanceInfo::`renderPass` is not VK_NULL_HANDLE, or VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT is not specified in VkCommandBufferBeginInfo::`flags`, parameters of this structure are ignored.

`VkAttachmentSampleCountInfoAMD` can also be included in the `pNext` chain of VkGraphicsPipelineCreateInfo. When a graphics pipeline is created without a VkRenderPass, if this structure is included in the `pNext` chain of VkGraphicsPipelineCreateInfo, it specifies the sample count of attachments used for rendering. If this structure is not specified, and the pipeline does not include a VkRenderPass, the value of VkPipelineMultisampleStateCreateInfo::`rasterizationSamples` is used as the sample count for each attachment. If a graphics pipeline is created with a valid VkRenderPass, parameters of this structure are ignored.

Valid Usage (Implicit)

- VUID-VkAttachmentSampleCountInfoAMD-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_ATTACHMENT_SAMPLE_COUNT_INFO_AMD

Structure Chaining

Extends the structures

  - VkCommandBufferInheritanceInfo

  - VkGraphicsPipelineCreateInfo

If the `pNext` chain of VkCommandBufferInheritanceInfo includes a `VkCommandBufferInheritanceDescriptorHeapInfoEXT` structure, then that structure indicates that the secondary will use the same descriptor heaps as the primary command buffer.

The `VkCommandBufferInheritanceDescriptorHeapInfoEXT` structure is defined as:

    // Provided by VK_EXT_descriptor_heap
    typedef struct VkCommandBufferInheritanceDescriptorHeapInfoEXT {
        VkStructureType             sType;
        const void*                 pNext;
        const VkBindHeapInfoEXT*    pSamplerHeapBindInfo;
        const VkBindHeapInfoEXT*    pResourceHeapBindInfo;
    } VkCommandBufferInheritanceDescriptorHeapInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `pSamplerHeapBindInfo` specifies the VkBindHeapInfoEXT of the sampler heap bound using vkCmdBindSamplerHeapEXT in the primary. If this is `NULL`, it indicates that no sampler heap is bound.

- `pResourceHeapBindInfo` specifies the VkBindHeapInfoEXT of the resource heap bound using vkCmdBindResourceHeapEXT in the primary. If this is `NULL`, it indicates that no resource heap is bound.

If this structure is not present, the behavior is as if `pSamplerHeapBindInfo` and `pResourceHeapBindInfo` were both `NULL`.

Valid Usage

- VUID-VkCommandBufferInheritanceDescriptorHeapInfoEXT-descriptorHeap-11200
  If the `descriptorHeap` feature is not enabled, `pSamplerHeapBindInfo` must be `NULL`

- VUID-VkCommandBufferInheritanceDescriptorHeapInfoEXT-descriptorHeap-11201
  If the `descriptorHeap` feature is not enabled, `pResourceHeapBindInfo` must be `NULL`

- VUID-VkCommandBufferInheritanceDescriptorHeapInfoEXT-pSamplerHeapBindInfo-11470
  If `pSamplerHeapBindInfo` is not `NULL`, `pSamplerHeapBindInfo->heapRange` must be a device address range allocated to the application from a buffer created with the VK_BUFFER_USAGE_DESCRIPTOR_HEAP_BIT_EXT usage flag set

- VUID-VkCommandBufferInheritanceDescriptorHeapInfoEXT-pResourceHeapBindInfo-11471
  If `pResourceHeapBindInfo` is not `NULL`, `pResourceHeapBindInfo->heapRange` must be a device address range allocated to the application from a buffer created with the VK_BUFFER_USAGE_DESCRIPTOR_HEAP_BIT_EXT usage flag set

Valid Usage (Implicit)

- VUID-VkCommandBufferInheritanceDescriptorHeapInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_DESCRIPTOR_HEAP_INFO_EXT

- VUID-VkCommandBufferInheritanceDescriptorHeapInfoEXT-pSamplerHeapBindInfo-parameter
  If `pSamplerHeapBindInfo` is not `NULL`, `pSamplerHeapBindInfo` must be a valid pointer to a valid VkBindHeapInfoEXT structure

- VUID-VkCommandBufferInheritanceDescriptorHeapInfoEXT-pResourceHeapBindInfo-parameter
  If `pResourceHeapBindInfo` is not `NULL`, `pResourceHeapBindInfo` must be a valid pointer to a valid VkBindHeapInfoEXT structure

Structure Chaining

Extends the structure

  - VkCommandBufferInheritanceInfo

Once recording starts, an application records a sequence of commands (`vkCmd*`) to set state in the command buffer, draw, dispatch, and other commands.

Several commands can also be recorded indirectly from `VkBuffer` content, see Device-Generated Commands.

To complete recording of a command buffer, call:

    // Provided by VK_VERSION_1_0
    VkResult vkEndCommandBuffer(
        VkCommandBuffer                             commandBuffer);

- `commandBuffer` is the command buffer to complete recording.

The command buffer must have been in the recording state, and, if successful, is moved to the executable state.

If there was an error during recording, the application will be notified by an unsuccessful return code returned by `vkEndCommandBuffer`, and the command buffer will be moved to the invalid state.

In case the application recorded one or more video encode operations into the command buffer, implementations may return the VK_ERROR_INVALID_VIDEO_STD_PARAMETERS_KHR error if any of the specified Video Std parameters do not adhere to the syntactic or semantic requirements of the used video compression standard, or if values derived from parameters according to the rules defined by the used video compression standard do not adhere to the capabilities of the video compression standard or the implementation.

Note | Applications should not rely on the VK_ERROR_INVALID_VIDEO_STD_PARAMETERS_KHR error being returned by any command as a means to verify Video Std parameters, as implementations are not required to report the error in any specific set of cases.

Valid Usage

- VUID-vkEndCommandBuffer-commandBuffer-00059
  `commandBuffer` must be in the recording state

- VUID-vkEndCommandBuffer-commandBuffer-00060
  If `commandBuffer` is a primary command buffer, there must not be an active render pass instance

- VUID-vkEndCommandBuffer-commandBuffer-00061
  All queries made active during the recording of `commandBuffer` must have been made inactive

- VUID-vkEndCommandBuffer-None-01978
  Conditional rendering must not be active

- VUID-vkEndCommandBuffer-None-06991
  There must be no video session object bound

- VUID-vkEndCommandBuffer-commandBuffer-01815
  If `commandBuffer` is a secondary command buffer, there must not be an outstanding vkCmdBeginDebugUtilsLabelEXT command recorded to `commandBuffer` that has not previously been ended by a call to vkCmdEndDebugUtilsLabelEXT

- VUID-vkEndCommandBuffer-commandBuffer-00062
  If `commandBuffer` is a secondary command buffer, there must not be an outstanding vkCmdDebugMarkerBeginEXT command recorded to `commandBuffer` that has not previously been ended by a call to vkCmdDebugMarkerEndEXT

- VUID-vkEndCommandBuffer-commandBuffer-12372
  `commandBuffer` must not have any shader instrumentation active

Valid Usage (Implicit)

- VUID-vkEndCommandBuffer-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_INVALID_VIDEO_STD_PARAMETERS_KHR

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

When a command buffer is in the executable state, it can be submitted to a queue for execution.

### 6.5. Command Buffer Submission

Note | Submission can be a high overhead operation, and applications should attempt to batch work together into as few calls to `vkQueueSubmit` or `vkQueueSubmit2` as possible.

To submit command buffers to a queue, call:

    // Provided by VK_VERSION_1_3
    VkResult vkQueueSubmit2(
        VkQueue                                     queue,
        uint32_t                                    submitCount,
        const VkSubmitInfo2*                        pSubmits,
        VkFence                                     fence);

    // Provided by VK_KHR_synchronization2
    // Equivalent to vkQueueSubmit2
    VkResult vkQueueSubmit2KHR(
        VkQueue                                     queue,
        uint32_t                                    submitCount,
        const VkSubmitInfo2*                        pSubmits,
        VkFence                                     fence);

- `queue` is the queue that the command buffers will be submitted to.

- `submitCount` is the number of elements in the `pSubmits` array.

- `pSubmits` is a pointer to an array of VkSubmitInfo2 structures, each specifying a command buffer submission batch. Command buffers and semaphores specified in this array may be accessed at any point until the queue operations they define complete execution on the device.

- `fence` is an optional handle to a fence to be signaled once all submitted command buffers have completed execution. If `fence` is not VK_NULL_HANDLE, it defines a fence signal operation. If it is not VK_NULL_HANDLE, `fence` may be accessed at any point until this command completes on the device.

`vkQueueSubmit2` is a queue submission command, with each batch defined by an element of `pSubmits`.

The first synchronization scope of each semaphore signal operation defined by this command includes every command in the same batch that the signal operation is defined in, and all commands that occur earlier in submission order. The scope is limited by the `stageMask` member of the VkSemaphoreSubmitInfo used to define each such operation.

The second synchronization scope of each semaphore wait operation defined by this command includes every command in the same batch that the wait operation is defined in, and all commands that occur later in submission order. The scope is limited by the `stageMask` member of the VkSemaphoreSubmitInfo used to define each such operation.

If any command buffer submitted to this queue is in the executable state, it is moved to the pending state. Once execution of all submissions of a command buffer complete, it moves from the pending state, back to the executable state. If a command buffer was recorded with the VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT flag, it instead moves back to the invalid state.

If `vkQueueSubmit2` fails, it may return VK_ERROR_OUT_OF_HOST_MEMORY or VK_ERROR_OUT_OF_DEVICE_MEMORY. If it does, the implementation must ensure that the state and contents of any resources or synchronization primitives referenced by the submitted command buffers and any semaphores referenced by `pSubmits` is unaffected by the call or its failure. If `vkQueueSubmit2` fails in such a way that the implementation is unable to make that guarantee, the implementation must return VK_ERROR_DEVICE_LOST. See Lost Device.

Valid Usage

- VUID-vkQueueSubmit2-fence-04894
  If `fence` is not VK_NULL_HANDLE, `fence` must be unsignaled

- VUID-vkQueueSubmit2-fence-04895
  If `fence` is not VK_NULL_HANDLE, `fence` must not be associated with any other queue command that has not yet completed execution on that queue

- VUID-vkQueueSubmit2-synchronization2-03866
  The `synchronization2` feature must be enabled

- VUID-vkQueueSubmit2-commandBuffer-03867
  If a command recorded into the `commandBuffer` member of any element of the `pCommandBufferInfos` member of any element of `pSubmits` referenced a VkEvent, that event must not be referenced by a command that has been submitted to another queue and is still in the pending state

- VUID-vkQueueSubmit2-semaphore-03868
  The `semaphore` member of any binary semaphore element of the `pSignalSemaphoreInfos` member of any element of `pSubmits` must be unsignaled when the semaphore signal operation it defines is executed on the device

- VUID-vkQueueSubmit2-stageMask-03869
  The `stageMask` member of any element of the `pSignalSemaphoreInfos` member of any element of `pSubmits` must only include pipeline stages that are supported by the queue family which `queue` belongs to

- VUID-vkQueueSubmit2-stageMask-03870
  The `stageMask` member of any element of the `pWaitSemaphoreInfos` member of any element of `pSubmits` must only include pipeline stages that are supported by the queue family which `queue` belongs to

- VUID-vkQueueSubmit2-semaphore-03871
  When a semaphore wait operation for a binary semaphore is executed, as defined by the `semaphore` member of any element of the `pWaitSemaphoreInfos` member of any element of `pSubmits`, there must be no other queues waiting on the same semaphore

- VUID-vkQueueSubmit2-semaphore-03873
  The `semaphore` member of any element of the `pWaitSemaphoreInfos` member of any element of `pSubmits` that was created with a VkSemaphoreType of VK_SEMAPHORE_TYPE_BINARY must reference a semaphore signal operation that has been submitted for execution and any semaphore signal operations on which it depends must have also been submitted for execution

- VUID-vkQueueSubmit2-commandBuffer-03874
  The `commandBuffer` member of any element of the `pCommandBufferInfos` member of any element of `pSubmits` must be in the pending or executable state

- VUID-vkQueueSubmit2-commandBuffer-03875
  If a command recorded into the `commandBuffer` member of any element of the `pCommandBufferInfos` member of any element of `pSubmits` was not recorded with the VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT, it must not be in the pending state

- VUID-vkQueueSubmit2-commandBuffer-03876
  Any secondary command buffers recorded into the `commandBuffer` member of any element of the `pCommandBufferInfos` member of any element of `pSubmits` must be in the pending or executable state

- VUID-vkQueueSubmit2-commandBuffer-03877
  If any secondary command buffers recorded into the `commandBuffer` member of any element of the `pCommandBufferInfos` member of any element of `pSubmits` was not recorded with the VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT, it must not be in the pending state

- VUID-vkQueueSubmit2-commandBuffer-03878
  The `commandBuffer` member of any element of the `pCommandBufferInfos` member of any element of `pSubmits` must have been allocated from a `VkCommandPool` that was created for the same queue family `queue` belongs to

- VUID-vkQueueSubmit2-commandBuffer-03879
  If a command recorded into the `commandBuffer` member of any element of the `pCommandBufferInfos` member of any element of `pSubmits` includes a Queue Family Ownership Transfer Acquire Operation, there must exist a previously submitted Queue Family Ownership Transfer Release Operation on a queue in the queue family identified by the acquire operation, with parameters matching the acquire operation as defined in the definition of such acquire operations, and which happens before the acquire operation

- VUID-vkQueueSubmit2-commandBuffer-10910
  If a command recorded into the `commandBuffer` member of any element of the `pCommandBufferInfos` member of any element of `pSubmits` includes a Queue Family Ownership Transfer Acquire Operation, the affected resource must not be modified in any way between the last matching release operation and the acquire operation

- VUID-vkQueueSubmit2-commandBuffer-03880
  If a command recorded into the `commandBuffer` member of any element of the `pCommandBufferInfos` member of any element of `pSubmits` was a vkCmdBeginQuery whose `queryPool` was created with a `queryType` of VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR, the profiling lock must have been held continuously on the `VkDevice` that `queue` was retrieved from, throughout recording of those command buffers

- VUID-vkQueueSubmit2-queue-06447
  If `queue` was not created with VK_DEVICE_QUEUE_CREATE_PROTECTED_BIT, the `flags` member of any element of `pSubmits` must not include VK_SUBMIT_PROTECTED_BIT_KHR

Valid Usage (Implicit)

- VUID-vkQueueSubmit2-queue-parameter
  `queue` must be a valid VkQueue handle

- VUID-vkQueueSubmit2-pSubmits-parameter
  If `submitCount` is not `0`, `pSubmits` must be a valid pointer to an array of `submitCount` valid VkSubmitInfo2 structures

- VUID-vkQueueSubmit2-fence-parameter
  If `fence` is not VK_NULL_HANDLE, `fence` must be a valid VkFence handle

- VUID-vkQueueSubmit2-commonparent
  Both of `fence`, and `queue` that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `queue` must be externally synchronized if it was not created with VK_DEVICE_QUEUE_CREATE_INTERNALLY_SYNCHRONIZED_BIT_KHR

- Host access to `fence` must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
- | - | - | Any | -

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_DEVICE_LOST

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkSubmitInfo2` structure is defined as:

    // Provided by VK_VERSION_1_3
    typedef struct VkSubmitInfo2 {
        VkStructureType                     sType;
        const void*                         pNext;
        VkSubmitFlags                       flags;
        uint32_t                            waitSemaphoreInfoCount;
        const VkSemaphoreSubmitInfo*        pWaitSemaphoreInfos;
        uint32_t                            commandBufferInfoCount;
        const VkCommandBufferSubmitInfo*    pCommandBufferInfos;
        uint32_t                            signalSemaphoreInfoCount;
        const VkSemaphoreSubmitInfo*        pSignalSemaphoreInfos;
    } VkSubmitInfo2;

    // Provided by VK_KHR_synchronization2
    // Equivalent to VkSubmitInfo2
    typedef VkSubmitInfo2 VkSubmitInfo2KHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask of VkSubmitFlagBits.

- `waitSemaphoreInfoCount` is the number of elements in `pWaitSemaphoreInfos`.

- `pWaitSemaphoreInfos` is a pointer to an array of VkSemaphoreSubmitInfo structures defining semaphore wait operations.

- `commandBufferInfoCount` is the number of elements in `pCommandBufferInfos` and the number of command buffers to execute in the batch.

- `pCommandBufferInfos` is a pointer to an array of VkCommandBufferSubmitInfo structures describing command buffers to execute in the batch.

- `signalSemaphoreInfoCount` is the number of elements in `pSignalSemaphoreInfos`.

- `pSignalSemaphoreInfos` is a pointer to an array of VkSemaphoreSubmitInfo describing semaphore signal operations.

Valid Usage

- VUID-VkSubmitInfo2-semaphore-03881
  If the same semaphore is used as the `semaphore` member of both an element of `pSignalSemaphoreInfos` and `pWaitSemaphoreInfos`, and that semaphore is a timeline semaphore, the `value` member of the `pSignalSemaphoreInfos` element must be greater than the `value` member of the `pWaitSemaphoreInfos` element

- VUID-VkSubmitInfo2-semaphore-03882
  If the `semaphore` member of any element of `pSignalSemaphoreInfos` is a timeline semaphore, the `value` member of that element must have a value greater than the current value of the semaphore when the semaphore signal operation is executed

- VUID-VkSubmitInfo2-semaphore-03883
  If the `semaphore` member of any element of `pSignalSemaphoreInfos` is a timeline semaphore, the `value` member of that element must have a value which does not differ from the current value of the semaphore or the value of any outstanding semaphore wait or signal operation on that semaphore by more than `maxTimelineSemaphoreValueDifference`

- VUID-VkSubmitInfo2-semaphore-03884
  If the `semaphore` member of any element of `pWaitSemaphoreInfos` is a timeline semaphore, the `value` member of that element must have a value which does not differ from the current value of the semaphore or the value of any outstanding semaphore wait or signal operation on that semaphore by more than `maxTimelineSemaphoreValueDifference`

- VUID-VkSubmitInfo2-flags-03886
  If `flags` includes VK_SUBMIT_PROTECTED_BIT, all elements of `pCommandBuffers` must be protected command buffers

- VUID-VkSubmitInfo2-flags-03887
  If `flags` does not include VK_SUBMIT_PROTECTED_BIT, each element of `pCommandBuffers` must not be a protected command buffer

- VUID-VkSubmitInfo2-commandBuffer-06192
  If any `commandBuffer` member of an element of `pCommandBufferInfos` contains any resumed render pass instances, they must be suspended by a render pass instance earlier in submission order within `pCommandBufferInfos`

- VUID-VkSubmitInfo2-commandBuffer-06010
  If any `commandBuffer` member of an element of `pCommandBufferInfos` contains any suspended render pass instances, they must be resumed by a render pass instance later in submission order within `pCommandBufferInfos`

- VUID-VkSubmitInfo2-commandBuffer-06011
  If any `commandBuffer` member of an element of `pCommandBufferInfos` contains any suspended render pass instances, there must be no action or synchronization commands between that render pass instance and the render pass instance that resumes it

- VUID-VkSubmitInfo2-commandBuffer-06012
  If any `commandBuffer` member of an element of `pCommandBufferInfos` contains any suspended render pass instances, there must be no render pass instances between that render pass instance and the render pass instance that resumes it

- VUID-VkSubmitInfo2-variableSampleLocations-06013
  If the `variableSampleLocations` limit is not supported, and any `commandBuffer` member of an element of `pCommandBufferInfos` contains any suspended render pass instances, where a graphics pipeline has been bound, any pipelines bound in the render pass instance that resumes it, or any subsequent render pass instances that resume from that one and so on, must use the same sample locations

- VUID-VkSubmitInfo2-pNext-09682
  If the `pNext` chain of this structure includes a VkFrameBoundaryTensorsARM structure then it must also include a VkFrameBoundaryEXT structure

- VUID-VkSubmitInfo2-pCommandBufferInfos-09933
  If at least one VkCommandBufferSubmitInfo structure in `pCommandBufferInfos` references a `commandBuffer` allocated from a pool that was created with a VkDataGraphProcessingEngineCreateInfoARM structure in the `pNext` chain of VkCommandPoolCreateInfo that included a foreign data graph processing engine in its `pProcessingEngines` member, then `pWaitSemaphoreInfos` and `pSignalSemaphoreInfos` must only reference `semaphore` objects that were created from external handle types reported as supported in a VkQueueFamilyDataGraphProcessingEnginePropertiesARM::`foreignSemaphoreHandleTypes` structure via vkGetPhysicalDeviceQueueFamilyDataGraphProcessingEnginePropertiesARM with a `queueFamilyIndex` matching the one the command pool was created for, for all the foreign data graph processing engines that were part of the VkDataGraphProcessingEngineCreateInfoARM used to create the command pool

Valid Usage (Implicit)

- VUID-VkSubmitInfo2-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SUBMIT_INFO_2

- VUID-VkSubmitInfo2-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkFrameBoundaryEXT, VkFrameBoundaryTensorsARM, VkLatencySubmissionPresentIdNV, VkPerformanceQuerySubmitInfoKHR, VkWin32KeyedMutexAcquireReleaseInfoKHR, or VkWin32KeyedMutexAcquireReleaseInfoNV

- VUID-VkSubmitInfo2-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkSubmitInfo2-flags-parameter
  `flags` must be a valid combination of VkSubmitFlagBits values

- VUID-VkSubmitInfo2-pWaitSemaphoreInfos-parameter
  If `waitSemaphoreInfoCount` is not `0`, `pWaitSemaphoreInfos` must be a valid pointer to an array of `waitSemaphoreInfoCount` valid VkSemaphoreSubmitInfo structures

- VUID-VkSubmitInfo2-pCommandBufferInfos-parameter
  If `commandBufferInfoCount` is not `0`, `pCommandBufferInfos` must be a valid pointer to an array of `commandBufferInfoCount` valid VkCommandBufferSubmitInfo structures

- VUID-VkSubmitInfo2-pSignalSemaphoreInfos-parameter
  If `signalSemaphoreInfoCount` is not `0`, `pSignalSemaphoreInfos` must be a valid pointer to an array of `signalSemaphoreInfoCount` valid VkSemaphoreSubmitInfo structures

Bits which can be set in VkSubmitInfo2::`flags`, specifying submission behavior, are:

    // Provided by VK_VERSION_1_3
    typedef enum VkSubmitFlagBits {
        VK_SUBMIT_PROTECTED_BIT = 0x00000001,
      // Provided by VK_KHR_synchronization2
        VK_SUBMIT_PROTECTED_BIT_KHR = VK_SUBMIT_PROTECTED_BIT,
    } VkSubmitFlagBits;

    // Provided by VK_KHR_synchronization2
    // Equivalent to VkSubmitFlagBits
    typedef VkSubmitFlagBits VkSubmitFlagBitsKHR;

- VK_SUBMIT_PROTECTED_BIT specifies that this batch is a protected submission.

    // Provided by VK_VERSION_1_3
    typedef VkFlags VkSubmitFlags;

    // Provided by VK_KHR_synchronization2
    // Equivalent to VkSubmitFlags
    typedef VkSubmitFlags VkSubmitFlagsKHR;

`VkSubmitFlags` is a bitmask type for setting a mask of zero or more VkSubmitFlagBits.

The `VkSemaphoreSubmitInfo` structure is defined as:

    // Provided by VK_VERSION_1_3
    typedef struct VkSemaphoreSubmitInfo {
        VkStructureType          sType;
        const void*              pNext;
        VkSemaphore              semaphore;
        uint64_t                 value;
        VkPipelineStageFlags2    stageMask;
        uint32_t                 deviceIndex;
    } VkSemaphoreSubmitInfo;

    // Provided by VK_KHR_synchronization2
    // Equivalent to VkSemaphoreSubmitInfo
    typedef VkSemaphoreSubmitInfo VkSemaphoreSubmitInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `semaphore` is a VkSemaphore affected by this operation.

- `value` is either the value used to signal `semaphore` or the value waited on by `semaphore`, if `semaphore` is a timeline semaphore. Otherwise it is ignored.

- `stageMask` is a VkPipelineStageFlags2 mask of pipeline stages which limit the first synchronization scope of a semaphore signal operation, or second synchronization scope of a semaphore wait operation as described in the semaphore wait operation and semaphore signal operation sections of the synchronization chapter.

- `deviceIndex` is the index of the device within a device group that executes the semaphore wait or signal operation.

Whether this structure defines a semaphore wait or signal operation is defined by how it is used. The first synchronization scope of a semaphore signal operation or the second synchronization scope of a semaphore wait operation defined by this structure are limited to operations in stages indicated by `stageMask`.

Valid Usage

- VUID-VkSemaphoreSubmitInfo-stageMask-03929
  If the `geometryShader` feature is not enabled, `stageMask` must not contain VK_PIPELINE_STAGE_2_GEOMETRY_SHADER_BIT

- VUID-VkSemaphoreSubmitInfo-stageMask-03930
  If the `tessellationShader` feature is not enabled, `stageMask` must not contain VK_PIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT or VK_PIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT

- VUID-VkSemaphoreSubmitInfo-stageMask-03931
  If the `conditionalRendering` feature is not enabled, `stageMask` must not contain VK_PIPELINE_STAGE_2_CONDITIONAL_RENDERING_BIT_EXT

- VUID-VkSemaphoreSubmitInfo-stageMask-03932
  If the `fragmentDensityMap` feature is not enabled, `stageMask` must not contain VK_PIPELINE_STAGE_2_FRAGMENT_DENSITY_PROCESS_BIT_EXT

- VUID-VkSemaphoreSubmitInfo-stageMask-03933
  If the `transformFeedback` feature is not enabled, `stageMask` must not contain VK_PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT

- VUID-VkSemaphoreSubmitInfo-stageMask-03934
  If the `meshShader` feature is not enabled, `stageMask` must not contain VK_PIPELINE_STAGE_2_MESH_SHADER_BIT_EXT

- VUID-VkSemaphoreSubmitInfo-stageMask-03935
  If the `taskShader` feature is not enabled, `stageMask` must not contain VK_PIPELINE_STAGE_2_TASK_SHADER_BIT_EXT

- VUID-VkSemaphoreSubmitInfo-stageMask-07316
  If neither of the `shadingRateImage` or the `attachmentFragmentShadingRate` features are enabled, `stageMask` must not contain VK_PIPELINE_STAGE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

- VUID-VkSemaphoreSubmitInfo-stageMask-04957
  If the `subpassShading` feature is not enabled, `stageMask` must not contain VK_PIPELINE_STAGE_2_SUBPASS_SHADER_BIT_HUAWEI

- VUID-VkSemaphoreSubmitInfo-stageMask-04995
  If the `invocationMask` feature is not enabled, `stageMask` must not contain VK_PIPELINE_STAGE_2_INVOCATION_MASK_BIT_HUAWEI

- VUID-VkSemaphoreSubmitInfo-stageMask-07946
  If neither the VK_NV_ray_tracing extension or the `rayTracingPipeline` feature are enabled, `stageMask` must not contain VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR

- VUID-VkSemaphoreSubmitInfo-stageMask-10751
  If the `accelerationStructure` feature is not enabled, `stageMask` must not contain VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR

- VUID-VkSemaphoreSubmitInfo-stageMask-10752
  If the `rayTracingMaintenance1` feature is not enabled, `stageMask` must not contain VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR

- VUID-VkSemaphoreSubmitInfo-stageMask-11541
  If the `VkPhysicalDeviceOpacityMicromapFeaturesEXT`::`micromap` feature is not enabled, `stageMask` must not contain VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT

- VUID-VkSemaphoreSubmitInfo-device-03888
  If the `device` that `semaphore` was created on is not a device group, `deviceIndex` must be `0`

- VUID-VkSemaphoreSubmitInfo-device-03889
  If the `device` that `semaphore` was created on is a device group, `deviceIndex` must be a valid device index

Valid Usage (Implicit)

- VUID-VkSemaphoreSubmitInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SEMAPHORE_SUBMIT_INFO

- VUID-VkSemaphoreSubmitInfo-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkSemaphoreSubmitInfo-semaphore-parameter
  `semaphore` must be a valid VkSemaphore handle

- VUID-VkSemaphoreSubmitInfo-stageMask-parameter
  `stageMask` must be a valid combination of VkPipelineStageFlagBits2 values

The `VkCommandBufferSubmitInfo` structure is defined as:

    // Provided by VK_VERSION_1_3
    typedef struct VkCommandBufferSubmitInfo {
        VkStructureType    sType;
        const void*        pNext;
        VkCommandBuffer    commandBuffer;
        uint32_t           deviceMask;
    } VkCommandBufferSubmitInfo;

    // Provided by VK_KHR_synchronization2
    // Equivalent to VkCommandBufferSubmitInfo
    typedef VkCommandBufferSubmitInfo VkCommandBufferSubmitInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `commandBuffer` is a VkCommandBuffer to be submitted for execution.

- `deviceMask` is a bitmask indicating which devices in a device group execute the command buffer. A `deviceMask` of `0` is equivalent to setting all bits corresponding to valid devices in the group to `1`.

Valid Usage

- VUID-VkCommandBufferSubmitInfo-commandBuffer-03890
  `commandBuffer` must not have been allocated with VK_COMMAND_BUFFER_LEVEL_SECONDARY

- VUID-VkCommandBufferSubmitInfo-deviceMask-03891
  If `deviceMask` is not `0`, it must be a valid device mask

- VUID-VkCommandBufferSubmitInfo-commandBuffer-09445
  If any render pass instance in `commandBuffer` was recorded with a VkRenderPassStripeBeginInfoARM structure in its pNext chain and did not specify the VK_RENDERING_RESUMING_BIT flag, a VkRenderPassStripeSubmitInfoARM must be included in the `pNext` chain

- VUID-VkCommandBufferSubmitInfo-pNext-09446
  If a VkRenderPassStripeSubmitInfoARM is included in the `pNext` chain, the value of VkRenderPassStripeSubmitInfoARM::`stripeSemaphoreInfoCount` must be equal to the sum of the VkRenderPassStripeBeginInfoARM::`stripeInfoCount` parameters provided to render pass instances recorded in `commandBuffer` that did not specify the VK_RENDERING_RESUMING_BIT flag

Valid Usage (Implicit)

- VUID-VkCommandBufferSubmitInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_SUBMIT_INFO

- VUID-VkCommandBufferSubmitInfo-pNext-pNext
  `pNext` must be `NULL` or a pointer to a valid instance of VkRenderPassStripeSubmitInfoARM

- VUID-VkCommandBufferSubmitInfo-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkCommandBufferSubmitInfo-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

The `VkRenderPassStripeSubmitInfoARM` structure is defined as:

    // Provided by VK_ARM_render_pass_striped
    typedef struct VkRenderPassStripeSubmitInfoARM {
        VkStructureType                 sType;
        const void*                     pNext;
        uint32_t                        stripeSemaphoreInfoCount;
        const VkSemaphoreSubmitInfo*    pStripeSemaphoreInfos;
    } VkRenderPassStripeSubmitInfoARM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `stripeSemaphoreInfoCount` is the number of semaphores used to signal stripe completion in the render pass instances in the submitted command buffer.

- `pStripeSemaphoreInfos` is a pointer to an array of `stripeSemaphoreInfoCount` VkSemaphoreSubmitInfo structures describing the semaphores used to signal stripe completion.

This structure can be included in the `pNext` chain of VkCommandBufferSubmitInfo to provide a set of semaphores to be signaled for each striped render pass instance.

The elements of `pStripeSemaphoreInfos` are mapped to render pass instances in VkCommandBufferSubmitInfo::`commandBuffer` in submission order and in stripe order within each render pass instance. Each semaphore in `pStripeSemaphoreInfos` is signaled when the implementation has completed execution of the associated stripe. In a render pass instance that has multiview enabled, the stripe includes all views in the view mask. In a render pass instance with `layerCount` greater than 1, the stripe includes all layers.

Render pass instances that specify the VK_RENDERING_RESUMING_BIT will not have any elements of `pStripeSemaphoreInfos` mapped to them. Instead, for suspending and resuming render pass instances, this mapping is done for the first suspending render pass instance, and the per-stripe semaphores are only signaled for the last resuming render pass instance.

Valid Usage

- VUID-VkRenderPassStripeSubmitInfoARM-semaphore-09447
  The `semaphore` member of each element of `pStripeSemaphoreInfos` must have been created with a VkSemaphoreType of VK_SEMAPHORE_TYPE_BINARY

Valid Usage (Implicit)

- VUID-VkRenderPassStripeSubmitInfoARM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_RENDER_PASS_STRIPE_SUBMIT_INFO_ARM

- VUID-VkRenderPassStripeSubmitInfoARM-pStripeSemaphoreInfos-parameter
  `pStripeSemaphoreInfos` must be a valid pointer to an array of `stripeSemaphoreInfoCount` valid VkSemaphoreSubmitInfo structures

- VUID-VkRenderPassStripeSubmitInfoARM-stripeSemaphoreInfoCount-arraylength
  `stripeSemaphoreInfoCount` must be greater than `0`

Structure Chaining

Extends the structure

  - VkCommandBufferSubmitInfo

To submit command buffers to a queue, call:

Warning | This functionality is superseded by vkQueueSubmit2. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_0
    VkResult vkQueueSubmit(
        VkQueue                                     queue,
        uint32_t                                    submitCount,
        const VkSubmitInfo*                         pSubmits,
        VkFence                                     fence);

- `queue` is the queue that the command buffers will be submitted to.

- `submitCount` is the number of elements in the `pSubmits` array.

- `pSubmits` is a pointer to an array of VkSubmitInfo structures, each specifying a command buffer submission batch. Command buffers and semaphores specified in this array may be accessed at any point until the queue operations they define complete execution on the device.

- `fence` is an optional handle to a fence to be signaled once all submitted command buffers have completed execution. If `fence` is not VK_NULL_HANDLE, it defines a fence signal operation. If it is not VK_NULL_HANDLE, `fence` may be accessed at any point until this command completes on the device.

`vkQueueSubmit` is a queue submission command, with each batch defined by an element of `pSubmits`. Batches begin execution in the order they appear in `pSubmits`, but may complete out of order.

The order that batches appear in `pSubmits` is used to determine submission order, and thus all the implicit ordering guarantees that respect it. Other than these implicit ordering guarantees and any explicit synchronization primitives, these batches may overlap or otherwise execute out of order.

Fence operations submitted with vkQueueSubmit have additional ordering constraints compared to other submission commands, with dependencies involving previous and subsequent queue operations. Information about these additional constraints can be found in the fence sections of the synchronization chapter.

The first synchronization scope of each semaphore signal operation defined by this command includes every command in the same batch that the signal operation is defined in, and all commands that occur earlier in submission order.

The second synchronization scope of each semaphore wait operation defined by this command includes every command in the same batch that the wait operation is defined in, and all commands that occur later in submission order. The scope is limited by the `pWaitDstStageMask` for each batch, as described in VkSubmitInfo.

If any command buffer submitted to this queue is in the executable state, it is moved to the pending state. Once execution of all submissions of a command buffer complete, it moves from the pending state, back to the executable state. If a command buffer was recorded with the VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT flag, it instead moves to the invalid state.

If `vkQueueSubmit` fails, it may return VK_ERROR_OUT_OF_HOST_MEMORY or VK_ERROR_OUT_OF_DEVICE_MEMORY. If it does, the implementation must ensure that the state and contents of any resources or synchronization primitives referenced by the submitted command buffers and any semaphores referenced by `pSubmits` is unaffected by the call or its failure. If `vkQueueSubmit` fails in such a way that the implementation is unable to make that guarantee, the implementation must return VK_ERROR_DEVICE_LOST. See Lost Device.

Valid Usage

- VUID-vkQueueSubmit-fence-00063
  If `fence` is not VK_NULL_HANDLE, `fence` must be unsignaled

- VUID-vkQueueSubmit-fence-00064
  If `fence` is not VK_NULL_HANDLE, `fence` must not be associated with any other queue command that has not yet completed execution on that queue

- VUID-vkQueueSubmit-pCommandBuffers-00065
  Any calls to vkCmdSetEvent, vkCmdResetEvent or vkCmdWaitEvents that have been recorded into any of the command buffer elements of the `pCommandBuffers` member of any element of `pSubmits`, must not reference any VkEvent that is referenced by any of those commands in a command buffer that has been submitted to another queue and is still in the pending state

- VUID-vkQueueSubmit-pWaitDstStageMask-00066
  Any stage flag included in any element of the `pWaitDstStageMask` member of any element of `pSubmits` must be a pipeline stage supported by one of the capabilities of `queue`, as specified in the table of supported pipeline stages

- VUID-vkQueueSubmit-pSignalSemaphores-00067
  Each binary semaphore element of the `pSignalSemaphores` member of any element of `pSubmits` must be unsignaled when the semaphore signal operation it defines is executed on the device

- VUID-vkQueueSubmit-pWaitSemaphores-00068
  When a semaphore wait operation referring to a binary semaphore defined by any element of the `pWaitSemaphores` member of any element of `pSubmits` executes on `queue`, there must be no other queues waiting on the same semaphore

- VUID-vkQueueSubmit-pWaitSemaphores-03238
  All elements of the `pWaitSemaphores` member of all elements of `pSubmits` created with a VkSemaphoreType of VK_SEMAPHORE_TYPE_BINARY must reference a semaphore signal operation that has been submitted for execution and any semaphore signal operations on which it depends must have also been submitted for execution

- VUID-vkQueueSubmit-pCommandBuffers-00070
  Each element of the `pCommandBuffers` member of each element of `pSubmits` must be in the pending or executable state

- VUID-vkQueueSubmit-pCommandBuffers-00071
  If any element of the `pCommandBuffers` member of any element of `pSubmits` was not recorded with the VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT, it must not be in the pending state

- VUID-vkQueueSubmit-pCommandBuffers-00072
  Any secondary command buffers recorded into any element of the `pCommandBuffers` member of any element of `pSubmits` must be in the pending or executable state

- VUID-vkQueueSubmit-pCommandBuffers-00073
  If any secondary command buffers recorded into any element of the `pCommandBuffers` member of any element of `pSubmits` was not recorded with the VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT, it must not be in the pending state

- VUID-vkQueueSubmit-pCommandBuffers-00074
  Each element of the `pCommandBuffers` member of each element of `pSubmits` must have been allocated from a `VkCommandPool` that was created for the same queue family `queue` belongs to

- VUID-vkQueueSubmit-pSubmits-02207
  If any element of `pSubmits->pCommandBuffers` includes a Queue Family Ownership Transfer Acquire Operation, there must exist a previously submitted Queue Family Ownership Transfer Release Operation on a queue in the queue family identified by the acquire operation, with parameters matching the acquire operation as defined in the definition of such acquire operations, and which happens-before the acquire operation

- VUID-vkQueueSubmit-pSubmits-10911
  If any element of `pSubmits->pCommandBuffers` includes a Queue Family Ownership Transfer Acquire Operation, the affected resource must not be modified in any way between the last matching release operation and the acquire operation

- VUID-vkQueueSubmit-pCommandBuffers-03220
  If a command recorded into any element of `pCommandBuffers` was a vkCmdBeginQuery whose `queryPool` was created with a `queryType` of VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR, the profiling lock must have been held continuously on the `VkDevice` that `queue` was retrieved from, throughout recording of those command buffers

- VUID-vkQueueSubmit-pSubmits-02808
  Any resource created with VK_SHARING_MODE_EXCLUSIVE that is read by an operation specified by `pSubmits` must not be owned by any queue family other than the one which `queue` belongs to, at the time it is executed

- VUID-vkQueueSubmit-pSubmits-04626
  Any resource created with VK_SHARING_MODE_CONCURRENT that is accessed by an operation specified by `pSubmits` must have included the queue family of `queue` at resource creation time

- VUID-vkQueueSubmit-queue-06448
  If `queue` was not created with VK_DEVICE_QUEUE_CREATE_PROTECTED_BIT, there must be no element of `pSubmits` that includes a VkProtectedSubmitInfo structure in its `pNext` chain with `protectedSubmit` equal to VK_TRUE

Valid Usage (Implicit)

- VUID-vkQueueSubmit-queue-parameter
  `queue` must be a valid VkQueue handle

- VUID-vkQueueSubmit-pSubmits-parameter
  If `submitCount` is not `0`, `pSubmits` must be a valid pointer to an array of `submitCount` valid VkSubmitInfo structures

- VUID-vkQueueSubmit-fence-parameter
  If `fence` is not VK_NULL_HANDLE, `fence` must be a valid VkFence handle

- VUID-vkQueueSubmit-commonparent
  Both of `fence`, and `queue` that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `queue` must be externally synchronized if it was not created with VK_DEVICE_QUEUE_CREATE_INTERNALLY_SYNCHRONIZED_BIT_KHR

- Host access to `fence` must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
- | - | - | Any | -

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_DEVICE_LOST

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkSubmitInfo` structure is defined as:

Warning | This functionality is superseded by VkSubmitInfo2. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_0
    typedef struct VkSubmitInfo {
        VkStructureType                sType;
        const void*                    pNext;
        uint32_t                       waitSemaphoreCount;
        const VkSemaphore*             pWaitSemaphores;
        const VkPipelineStageFlags*    pWaitDstStageMask;
        uint32_t                       commandBufferCount;
        const VkCommandBuffer*         pCommandBuffers;
        uint32_t                       signalSemaphoreCount;
        const VkSemaphore*             pSignalSemaphores;
    } VkSubmitInfo;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `waitSemaphoreCount` is the number of semaphores upon which to wait before executing the command buffers for the batch.

- `pWaitSemaphores` is a pointer to an array of VkSemaphore handles upon which to wait before the command buffers for this batch begin execution. If semaphores to wait on are provided, they define a semaphore wait operation.

- `pWaitDstStageMask` is a pointer to an array of pipeline stages at which each corresponding semaphore wait will occur.

- `commandBufferCount` is the number of command buffers to execute in the batch.

- `pCommandBuffers` is a pointer to an array of VkCommandBuffer handles to execute in the batch.

- `signalSemaphoreCount` is the number of semaphores to be signaled once the commands specified in `pCommandBuffers` have completed execution.

- `pSignalSemaphores` is a pointer to an array of VkSemaphore handles which will be signaled when the command buffers for this batch have completed execution. If semaphores to be signaled are provided, they define a semaphore signal operation.

The order that command buffers appear in `pCommandBuffers` is used to determine submission order, and thus all the implicit ordering guarantees that respect it. Other than these implicit ordering guarantees and any explicit synchronization primitives, these command buffers may overlap or otherwise execute out of order.

The second synchronization scope of each semaphore wait operation defined by this structure is limited to operations in stages indicated by the corresponding element of `pWaitDstStageMask`.

Note | A common scenario for using `pWaitDstStageMask` with values other than VK_PIPELINE_STAGE_ALL_COMMANDS_BIT is when synchronizing a window system presentation operation against subsequent command buffers which render the next frame. In this case, a presentation image must not be overwritten until the presentation operation completes, but other pipeline stages can execute without waiting. A mask of VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT prevents subsequent color attachment writes from executing until the semaphore signals. Some implementations may be able to execute transfer operations and/or pre-rasterization work before the semaphore is signaled. If an image layout transition needs to be performed on a presentable image before it is used in a framebuffer, that can be performed as the first operation submitted to the queue after acquiring the image, and should not prevent other work from overlapping with the presentation operation. For example, a `VkImageMemoryBarrier` could use: `srcStageMask` = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT `srcAccessMask` = 0 `dstStageMask` = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT `dstAccessMask` = VK_ACCESS_COLOR_ATTACHMENT_READ_BIT | VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT. `oldLayout` = VK_IMAGE_LAYOUT_PRESENT_SRC_KHR `newLayout` = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL Alternatively, `oldLayout` can be VK_IMAGE_LAYOUT_UNDEFINED, if the image’s contents need not be preserved. This barrier accomplishes a dependency chain between previous presentation operations and subsequent color attachment output operations, with the layout transition performed in between, and does not introduce a dependency between previous work and any pre-rasterization shader stages. More precisely, the semaphore signals after the presentation operation completes, the semaphore wait stalls the VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT stage, and there is a dependency from that same stage to itself with the layout transition performed in between.

Valid Usage

- VUID-VkSubmitInfo-pWaitDstStageMask-04090
  If the `geometryShader` feature is not enabled, `pWaitDstStageMask` must not contain VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT

- VUID-VkSubmitInfo-pWaitDstStageMask-04091
  If the `tessellationShader` feature is not enabled, `pWaitDstStageMask` must not contain VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT or VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT

- VUID-VkSubmitInfo-pWaitDstStageMask-04092
  If the `conditionalRendering` feature is not enabled, `pWaitDstStageMask` must not contain VK_PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT

- VUID-VkSubmitInfo-pWaitDstStageMask-04093
  If the `fragmentDensityMap` feature is not enabled, `pWaitDstStageMask` must not contain VK_PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT

- VUID-VkSubmitInfo-pWaitDstStageMask-04094
  If the `transformFeedback` feature is not enabled, `pWaitDstStageMask` must not contain VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT

- VUID-VkSubmitInfo-pWaitDstStageMask-04095
  If the `meshShader` feature is not enabled, `pWaitDstStageMask` must not contain VK_PIPELINE_STAGE_MESH_SHADER_BIT_EXT

- VUID-VkSubmitInfo-pWaitDstStageMask-04096
  If the `taskShader` feature is not enabled, `pWaitDstStageMask` must not contain VK_PIPELINE_STAGE_TASK_SHADER_BIT_EXT

- VUID-VkSubmitInfo-pWaitDstStageMask-07318
  If neither of the `shadingRateImage` or the `attachmentFragmentShadingRate` features are enabled, `pWaitDstStageMask` must not contain VK_PIPELINE_STAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

- VUID-VkSubmitInfo-pWaitDstStageMask-03937
  If the `synchronization2` feature is not enabled, `pWaitDstStageMask` must not be `0`

- VUID-VkSubmitInfo-pWaitDstStageMask-07949
  If neither the VK_NV_ray_tracing extension or the `rayTracingPipeline` feature are enabled, `pWaitDstStageMask` must not contain VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_KHR

- VUID-VkSubmitInfo-pWaitDstStageMask-10754
  If the `accelerationStructure` feature is not enabled, `pWaitDstStageMask` must not contain VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR

- VUID-VkSubmitInfo-pCommandBuffers-00075
  Each element of `pCommandBuffers` must not have been allocated with VK_COMMAND_BUFFER_LEVEL_SECONDARY

- VUID-VkSubmitInfo-pWaitDstStageMask-00078
  Each element of `pWaitDstStageMask` must not include VK_PIPELINE_STAGE_HOST_BIT

- VUID-VkSubmitInfo-pWaitSemaphores-03239
  If any element of `pWaitSemaphores` or `pSignalSemaphores` was created with a VkSemaphoreType of VK_SEMAPHORE_TYPE_TIMELINE, then the `pNext` chain must include a VkTimelineSemaphoreSubmitInfo structure

- VUID-VkSubmitInfo-pNext-03240
  If the `pNext` chain of this structure includes a VkTimelineSemaphoreSubmitInfo structure and any element of `pWaitSemaphores` was created with a VkSemaphoreType of VK_SEMAPHORE_TYPE_TIMELINE, then its `waitSemaphoreValueCount` member must equal `waitSemaphoreCount`

- VUID-VkSubmitInfo-pNext-03241
  If the `pNext` chain of this structure includes a VkTimelineSemaphoreSubmitInfo structure and any element of `pSignalSemaphores` was created with a VkSemaphoreType of VK_SEMAPHORE_TYPE_TIMELINE, then its `signalSemaphoreValueCount` member must equal `signalSemaphoreCount`

- VUID-VkSubmitInfo-pSignalSemaphores-03242
  For each element of `pSignalSemaphores` created with a VkSemaphoreType of VK_SEMAPHORE_TYPE_TIMELINE the corresponding element of VkTimelineSemaphoreSubmitInfo::`pSignalSemaphoreValues` must have a value greater than the current value of the semaphore when the semaphore signal operation is executed

- VUID-VkSubmitInfo-pWaitSemaphores-03243
  For each element of `pWaitSemaphores` created with a VkSemaphoreType of VK_SEMAPHORE_TYPE_TIMELINE the corresponding element of VkTimelineSemaphoreSubmitInfo::`pWaitSemaphoreValues` must have a value which does not differ from the current value of the semaphore or the value of any outstanding semaphore wait or signal operation on that semaphore by more than `maxTimelineSemaphoreValueDifference`

- VUID-VkSubmitInfo-pSignalSemaphores-03244
  For each element of `pSignalSemaphores` created with a VkSemaphoreType of VK_SEMAPHORE_TYPE_TIMELINE the corresponding element of VkTimelineSemaphoreSubmitInfo::`pSignalSemaphoreValues` must have a value which does not differ from the current value of the semaphore or the value of any outstanding semaphore wait or signal operation on that semaphore by more than `maxTimelineSemaphoreValueDifference`

- VUID-VkSubmitInfo-pNext-04120
  If the `pNext` chain of this structure does not include a `VkProtectedSubmitInfo` structure with `protectedSubmit` set to VK_TRUE, then each element of the `pCommandBuffers` array must be an unprotected command buffer

- VUID-VkSubmitInfo-pNext-04148
  If the `pNext` chain of this structure includes a `VkProtectedSubmitInfo` structure with `protectedSubmit` set to VK_TRUE, then each element of the `pCommandBuffers` array must be a protected command buffer

- VUID-VkSubmitInfo-pCommandBuffers-06193
  If `pCommandBuffers` contains any resumed render pass instances, they must be suspended by a render pass instance earlier in submission order within `pCommandBuffers`

- VUID-VkSubmitInfo-pCommandBuffers-06014
  If `pCommandBuffers` contains any suspended render pass instances, they must be resumed by a render pass instance later in submission order within `pCommandBuffers`

- VUID-VkSubmitInfo-pCommandBuffers-06015
  If `pCommandBuffers` contains any suspended render pass instances, there must be no action or synchronization commands executed in a primary or secondary command buffer between that render pass instance and the render pass instance that resumes it

- VUID-VkSubmitInfo-pCommandBuffers-06016
  If `pCommandBuffers` contains any suspended render pass instances, there must be no render pass instances between that render pass instance and the render pass instance that resumes it

- VUID-VkSubmitInfo-variableSampleLocations-06017
  If the `variableSampleLocations` limit is not supported, and any element of `pCommandBuffers` contains any suspended render pass instances, where a graphics pipeline has been bound, any pipelines bound in the render pass instance that resumes it, or any subsequent render pass instances that resume from that one and so on, must use the same sample locations

- VUID-VkSubmitInfo-pNext-09683
  If the `pNext` chain of this structure includes a VkFrameBoundaryTensorsARM structure then it must also include a VkFrameBoundaryEXT structure

- VUID-VkSubmitInfo-pCommandBufferInfos-09942
  If at least one VkCommandBufferSubmitInfo structure in `pCommandBufferInfos` references a `commandBuffer` allocated from a pool that was created with a VkDataGraphProcessingEngineCreateInfoARM structure in the `pNext` chain of VkCommandPoolCreateInfo that included a foreign data graph processing engine in its `pProcessingEngines` member, then `pWaitSemaphoreInfos` and `pSignalSemaphoreInfos` must only reference `semaphore` objects that were created from external handle types reported as supported in a VkQueueFamilyDataGraphProcessingEnginePropertiesARM::`foreignSemaphoreHandleTypes` structure via vkGetPhysicalDeviceQueueFamilyDataGraphProcessingEnginePropertiesARM with a `queueFamilyIndex` matching the one the command pool was created for, for all the foreign data graph processing engines that were part of the VkDataGraphProcessingEngineCreateInfoARM used to create the command pool

Valid Usage (Implicit)

- VUID-VkSubmitInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SUBMIT_INFO

- VUID-VkSubmitInfo-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkAmigoProfilingSubmitInfoSEC, VkD3D12FenceSubmitInfoKHR, VkDeviceGroupSubmitInfo, VkFrameBoundaryEXT, VkFrameBoundaryTensorsARM, VkLatencySubmissionPresentIdNV, VkPerformanceQuerySubmitInfoKHR, VkProtectedSubmitInfo, VkThrottleHintSubmitInfoSEC, VkTimelineSemaphoreSubmitInfo, VkWin32KeyedMutexAcquireReleaseInfoKHR, or VkWin32KeyedMutexAcquireReleaseInfoNV

- VUID-VkSubmitInfo-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkSubmitInfo-pWaitSemaphores-parameter
  If `waitSemaphoreCount` is not `0`, `pWaitSemaphores` must be a valid pointer to an array of `waitSemaphoreCount` valid VkSemaphore handles

- VUID-VkSubmitInfo-pWaitDstStageMask-parameter
  If `waitSemaphoreCount` is not `0`, `pWaitDstStageMask` must be a valid pointer to an array of `waitSemaphoreCount` valid combinations of VkPipelineStageFlagBits values

- VUID-VkSubmitInfo-pCommandBuffers-parameter
  If `commandBufferCount` is not `0`, `pCommandBuffers` must be a valid pointer to an array of `commandBufferCount` valid VkCommandBuffer handles

- VUID-VkSubmitInfo-pSignalSemaphores-parameter
  If `signalSemaphoreCount` is not `0`, `pSignalSemaphores` must be a valid pointer to an array of `signalSemaphoreCount` valid VkSemaphore handles

- VUID-VkSubmitInfo-commonparent
  Each of the elements of `pCommandBuffers`, the elements of `pSignalSemaphores`, and the elements of `pWaitSemaphores` that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevice

To specify the values to use when waiting for and signaling semaphores created with a VkSemaphoreType of VK_SEMAPHORE_TYPE_TIMELINE, add a VkTimelineSemaphoreSubmitInfo structure to the `pNext` chain of the VkSubmitInfo structure when using vkQueueSubmit or the VkBindSparseInfo structure when using vkQueueBindSparse . The `VkTimelineSemaphoreSubmitInfo` structure is defined as:

    // Provided by VK_VERSION_1_2
    typedef struct VkTimelineSemaphoreSubmitInfo {
        VkStructureType    sType;
        const void*        pNext;
        uint32_t           waitSemaphoreValueCount;
        const uint64_t*    pWaitSemaphoreValues;
        uint32_t           signalSemaphoreValueCount;
        const uint64_t*    pSignalSemaphoreValues;
    } VkTimelineSemaphoreSubmitInfo;

    // Provided by VK_KHR_timeline_semaphore
    // Equivalent to VkTimelineSemaphoreSubmitInfo
    typedef VkTimelineSemaphoreSubmitInfo VkTimelineSemaphoreSubmitInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `waitSemaphoreValueCount` is the number of semaphore wait values specified in `pWaitSemaphoreValues`.

- `pWaitSemaphoreValues` is a pointer to an array of `waitSemaphoreValueCount` values for the corresponding semaphores in VkSubmitInfo::`pWaitSemaphores` to wait for.

- `signalSemaphoreValueCount` is the number of semaphore signal values specified in `pSignalSemaphoreValues`.

- `pSignalSemaphoreValues` is a pointer to an array `signalSemaphoreValueCount` values for the corresponding semaphores in VkSubmitInfo::`pSignalSemaphores` to set when signaled.

If the semaphore in VkSubmitInfo::`pWaitSemaphores` or VkSubmitInfo::`pSignalSemaphores` corresponding to an entry in `pWaitSemaphoreValues` or `pSignalSemaphoreValues` respectively was not created with a VkSemaphoreType of VK_SEMAPHORE_TYPE_TIMELINE, the implementation must ignore the value in the `pWaitSemaphoreValues` or `pSignalSemaphoreValues` entry.

Valid Usage (Implicit)

- VUID-VkTimelineSemaphoreSubmitInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO

- VUID-VkTimelineSemaphoreSubmitInfo-pWaitSemaphoreValues-parameter
  If `waitSemaphoreValueCount` is not `0`, and `pWaitSemaphoreValues` is not `NULL`, `pWaitSemaphoreValues` must be a valid pointer to an array of `waitSemaphoreValueCount` `uint64_t` values

- VUID-VkTimelineSemaphoreSubmitInfo-pSignalSemaphoreValues-parameter
  If `signalSemaphoreValueCount` is not `0`, and `pSignalSemaphoreValues` is not `NULL`, `pSignalSemaphoreValues` must be a valid pointer to an array of `signalSemaphoreValueCount` `uint64_t` values

Structure Chaining

Extends the structures

  - VkBindSparseInfo

  - VkSubmitInfo

To specify the values to use when waiting for and signaling semaphores whose current payload refers to a Direct3D 12 fence, add a VkD3D12FenceSubmitInfoKHR structure to the `pNext` chain of the VkSubmitInfo structure. The `VkD3D12FenceSubmitInfoKHR` structure is defined as:

    // Provided by VK_KHR_external_semaphore_win32
    typedef struct VkD3D12FenceSubmitInfoKHR {
        VkStructureType    sType;
        const void*        pNext;
        uint32_t           waitSemaphoreValuesCount;
        const uint64_t*    pWaitSemaphoreValues;
        uint32_t           signalSemaphoreValuesCount;
        const uint64_t*    pSignalSemaphoreValues;
    } VkD3D12FenceSubmitInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `waitSemaphoreValuesCount` is the number of semaphore wait values specified in `pWaitSemaphoreValues`.

- `pWaitSemaphoreValues` is a pointer to an array of `waitSemaphoreValuesCount` values for the corresponding semaphores in VkSubmitInfo::`pWaitSemaphores` to wait for.

- `signalSemaphoreValuesCount` is the number of semaphore signal values specified in `pSignalSemaphoreValues`.

- `pSignalSemaphoreValues` is a pointer to an array of `signalSemaphoreValuesCount` values for the corresponding semaphores in VkSubmitInfo::`pSignalSemaphores` to set when signaled.

If the semaphore in VkSubmitInfo::`pWaitSemaphores` or VkSubmitInfo::`pSignalSemaphores` corresponding to an entry in `pWaitSemaphoreValues` or `pSignalSemaphoreValues` respectively does not currently have a payload referring to a Direct3D 12 fence, the implementation must ignore the value in the `pWaitSemaphoreValues` or `pSignalSemaphoreValues` entry.

Note | As the introduction of the external semaphore handle type VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT predates that of timeline semaphores, support for importing semaphore payloads from external handles of that type into semaphores created (implicitly or explicitly) with a VkSemaphoreType of VK_SEMAPHORE_TYPE_BINARY is preserved for backwards compatibility. However, applications should prefer importing such handle types into semaphores created with a VkSemaphoreType of VK_SEMAPHORE_TYPE_TIMELINE, and use the VkTimelineSemaphoreSubmitInfo structure instead of the `VkD3D12FenceSubmitInfoKHR` structure to specify the values to use when waiting for and signaling such semaphores.

Valid Usage

- VUID-VkD3D12FenceSubmitInfoKHR-waitSemaphoreValuesCount-00079
  `waitSemaphoreValuesCount` must be the same value as `VkSubmitInfo`::`waitSemaphoreCount`, where this structure is in the `pNext` chain of a `VkSubmitInfo` structure

- VUID-VkD3D12FenceSubmitInfoKHR-signalSemaphoreValuesCount-00080
  `signalSemaphoreValuesCount` must be the same value as `VkSubmitInfo`::`signalSemaphoreCount`, where this structure is in the `pNext` chain of a `VkSubmitInfo` structure

Valid Usage (Implicit)

- VUID-VkD3D12FenceSubmitInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_D3D12_FENCE_SUBMIT_INFO_KHR

- VUID-VkD3D12FenceSubmitInfoKHR-pWaitSemaphoreValues-parameter
  If `waitSemaphoreValuesCount` is not `0`, and `pWaitSemaphoreValues` is not `NULL`, `pWaitSemaphoreValues` must be a valid pointer to an array of `waitSemaphoreValuesCount` `uint64_t` values

- VUID-VkD3D12FenceSubmitInfoKHR-pSignalSemaphoreValues-parameter
  If `signalSemaphoreValuesCount` is not `0`, and `pSignalSemaphoreValues` is not `NULL`, `pSignalSemaphoreValues` must be a valid pointer to an array of `signalSemaphoreValuesCount` `uint64_t` values

Structure Chaining

Extends the structure

  - VkSubmitInfo

When submitting work that operates on memory imported from a Direct3D 11 resource to a queue, the keyed mutex mechanism may be used in addition to Vulkan semaphores to synchronize the work. Keyed mutexes are a property of a properly created shareable Direct3D 11 resource. They can only be used if the imported resource was created with the `D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX` flag.

To acquire keyed mutexes before submitted work and/or release them after, add a VkWin32KeyedMutexAcquireReleaseInfoKHR structure to the `pNext` chain of the VkSubmitInfo structure.

The `VkWin32KeyedMutexAcquireReleaseInfoKHR` structure is defined as:

    // Provided by VK_KHR_win32_keyed_mutex
    typedef struct VkWin32KeyedMutexAcquireReleaseInfoKHR {
        VkStructureType          sType;
        const void*              pNext;
        uint32_t                 acquireCount;
        const VkDeviceMemory*    pAcquireSyncs;
        const uint64_t*          pAcquireKeys;
        const uint32_t*          pAcquireTimeouts;
        uint32_t                 releaseCount;
        const VkDeviceMemory*    pReleaseSyncs;
        const uint64_t*          pReleaseKeys;
    } VkWin32KeyedMutexAcquireReleaseInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `acquireCount` is the number of entries in the `pAcquireSyncs`, `pAcquireKeys`, and `pAcquireTimeouts` arrays.

- `pAcquireSyncs` is a pointer to an array of VkDeviceMemory objects which were imported from Direct3D 11 resources.

- `pAcquireKeys` is a pointer to an array of mutex key values to wait for prior to beginning the submitted work. Entries refer to the keyed mutex associated with the corresponding entries in `pAcquireSyncs`.

- `pAcquireTimeouts` is a pointer to an array of timeout values, in millisecond units, for each acquire specified in `pAcquireKeys`.

- `releaseCount` is the number of entries in the `pReleaseSyncs` and `pReleaseKeys` arrays.

- `pReleaseSyncs` is a pointer to an array of VkDeviceMemory objects which were imported from Direct3D 11 resources.

- `pReleaseKeys` is a pointer to an array of mutex key values to set when the submitted work has completed. Entries refer to the keyed mutex associated with the corresponding entries in `pReleaseSyncs`.

Valid Usage

- VUID-VkWin32KeyedMutexAcquireReleaseInfoKHR-pAcquireSyncs-00081
  Each member of `pAcquireSyncs` and `pReleaseSyncs` must be a device memory object imported by setting VkImportMemoryWin32HandleInfoKHR::`handleType` to VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT or VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT

Valid Usage (Implicit)

- VUID-VkWin32KeyedMutexAcquireReleaseInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHR

- VUID-VkWin32KeyedMutexAcquireReleaseInfoKHR-pAcquireSyncs-parameter
  If `acquireCount` is not `0`, `pAcquireSyncs` must be a valid pointer to an array of `acquireCount` valid VkDeviceMemory handles

- VUID-VkWin32KeyedMutexAcquireReleaseInfoKHR-pAcquireKeys-parameter
  If `acquireCount` is not `0`, `pAcquireKeys` must be a valid pointer to an array of `acquireCount` `uint64_t` values

- VUID-VkWin32KeyedMutexAcquireReleaseInfoKHR-pAcquireTimeouts-parameter
  If `acquireCount` is not `0`, `pAcquireTimeouts` must be a valid pointer to an array of `acquireCount` `uint32_t` values

- VUID-VkWin32KeyedMutexAcquireReleaseInfoKHR-pReleaseSyncs-parameter
  If `releaseCount` is not `0`, `pReleaseSyncs` must be a valid pointer to an array of `releaseCount` valid VkDeviceMemory handles

- VUID-VkWin32KeyedMutexAcquireReleaseInfoKHR-pReleaseKeys-parameter
  If `releaseCount` is not `0`, `pReleaseKeys` must be a valid pointer to an array of `releaseCount` `uint64_t` values

- VUID-VkWin32KeyedMutexAcquireReleaseInfoKHR-commonparent
  Both of the elements of `pAcquireSyncs`, and the elements of `pReleaseSyncs` that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevice

Structure Chaining

Extends the structures

  - VkSubmitInfo

  - VkSubmitInfo2

When submitting work that operates on memory imported from a Direct3D 11 resource to a queue, the keyed mutex mechanism may be used in addition to Vulkan semaphores to synchronize the work. Keyed mutexes are a property of a properly created shareable Direct3D 11 resource. They can only be used if the imported resource was created with the `D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX` flag.

To acquire keyed mutexes before submitted work and/or release them after, add a VkWin32KeyedMutexAcquireReleaseInfoNV structure to the `pNext` chain of the VkSubmitInfo structure.

The `VkWin32KeyedMutexAcquireReleaseInfoNV` structure is defined as:

    // Provided by VK_NV_win32_keyed_mutex
    typedef struct VkWin32KeyedMutexAcquireReleaseInfoNV {
        VkStructureType          sType;
        const void*              pNext;
        uint32_t                 acquireCount;
        const VkDeviceMemory*    pAcquireSyncs;
        const uint64_t*          pAcquireKeys;
        const uint32_t*          pAcquireTimeoutMilliseconds;
        uint32_t                 releaseCount;
        const VkDeviceMemory*    pReleaseSyncs;
        const uint64_t*          pReleaseKeys;
    } VkWin32KeyedMutexAcquireReleaseInfoNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `acquireCount` is the number of entries in the `pAcquireSyncs`, `pAcquireKeys`, and `pAcquireTimeoutMilliseconds` arrays.

- `pAcquireSyncs` is a pointer to an array of VkDeviceMemory objects which were imported from Direct3D 11 resources.

- `pAcquireKeys` is a pointer to an array of mutex key values to wait for prior to beginning the submitted work. Entries refer to the keyed mutex associated with the corresponding entries in `pAcquireSyncs`.

- `pAcquireTimeoutMilliseconds` is a pointer to an array of timeout values, in millisecond units, for each acquire specified in `pAcquireKeys`.

- `releaseCount` is the number of entries in the `pReleaseSyncs` and `pReleaseKeys` arrays.

- `pReleaseSyncs` is a pointer to an array of VkDeviceMemory objects which were imported from Direct3D 11 resources.

- `pReleaseKeys` is a pointer to an array of mutex key values to set when the submitted work has completed. Entries refer to the keyed mutex associated with the corresponding entries in `pReleaseSyncs`.

Valid Usage (Implicit)

- VUID-VkWin32KeyedMutexAcquireReleaseInfoNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV

- VUID-VkWin32KeyedMutexAcquireReleaseInfoNV-pAcquireSyncs-parameter
  If `acquireCount` is not `0`, `pAcquireSyncs` must be a valid pointer to an array of `acquireCount` valid VkDeviceMemory handles

- VUID-VkWin32KeyedMutexAcquireReleaseInfoNV-pAcquireKeys-parameter
  If `acquireCount` is not `0`, `pAcquireKeys` must be a valid pointer to an array of `acquireCount` `uint64_t` values

- VUID-VkWin32KeyedMutexAcquireReleaseInfoNV-pAcquireTimeoutMilliseconds-parameter
  If `acquireCount` is not `0`, `pAcquireTimeoutMilliseconds` must be a valid pointer to an array of `acquireCount` `uint32_t` values

- VUID-VkWin32KeyedMutexAcquireReleaseInfoNV-pReleaseSyncs-parameter
  If `releaseCount` is not `0`, `pReleaseSyncs` must be a valid pointer to an array of `releaseCount` valid VkDeviceMemory handles

- VUID-VkWin32KeyedMutexAcquireReleaseInfoNV-pReleaseKeys-parameter
  If `releaseCount` is not `0`, `pReleaseKeys` must be a valid pointer to an array of `releaseCount` `uint64_t` values

- VUID-VkWin32KeyedMutexAcquireReleaseInfoNV-commonparent
  Both of the elements of `pAcquireSyncs`, and the elements of `pReleaseSyncs` that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevice

Structure Chaining

Extends the structures

  - VkSubmitInfo

  - VkSubmitInfo2

If the `pNext` chain of VkSubmitInfo includes a `VkProtectedSubmitInfo` structure, then the structure indicates whether the batch is protected. The `VkProtectedSubmitInfo` structure is defined as:

    // Provided by VK_VERSION_1_1
    typedef struct VkProtectedSubmitInfo {
        VkStructureType    sType;
        const void*        pNext;
        VkBool32           protectedSubmit;
    } VkProtectedSubmitInfo;

- `protectedSubmit` specifies whether the batch is protected. If `protectedSubmit` is VK_TRUE, the batch is protected. If `protectedSubmit` is VK_FALSE, the batch is unprotected. If the `VkSubmitInfo`::`pNext` chain does not include this structure, the batch is unprotected.

Valid Usage (Implicit)

- VUID-VkProtectedSubmitInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PROTECTED_SUBMIT_INFO

Structure Chaining

Extends the structure

  - VkSubmitInfo

If the `pNext` chain of VkSubmitInfo includes a `VkDeviceGroupSubmitInfo` structure, then that structure includes device indices and masks specifying which physical devices execute semaphore operations and command buffers.

The `VkDeviceGroupSubmitInfo` structure is defined as:

    // Provided by VK_VERSION_1_1
    typedef struct VkDeviceGroupSubmitInfo {
        VkStructureType    sType;
        const void*        pNext;
        uint32_t           waitSemaphoreCount;
        const uint32_t*    pWaitSemaphoreDeviceIndices;
        uint32_t           commandBufferCount;
        const uint32_t*    pCommandBufferDeviceMasks;
        uint32_t           signalSemaphoreCount;
        const uint32_t*    pSignalSemaphoreDeviceIndices;
    } VkDeviceGroupSubmitInfo;

    // Provided by VK_KHR_device_group
    // Equivalent to VkDeviceGroupSubmitInfo
    typedef VkDeviceGroupSubmitInfo VkDeviceGroupSubmitInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `waitSemaphoreCount` is the number of elements in the `pWaitSemaphoreDeviceIndices` array.

- `pWaitSemaphoreDeviceIndices` is a pointer to an array of `waitSemaphoreCount` device indices indicating which physical device executes the semaphore wait operation in the corresponding element of VkSubmitInfo::`pWaitSemaphores`.

- `commandBufferCount` is the number of elements in the `pCommandBufferDeviceMasks` array.

- `pCommandBufferDeviceMasks` is a pointer to an array of `commandBufferCount` device masks indicating which physical devices execute the command buffer in the corresponding element of VkSubmitInfo::`pCommandBuffers`. A physical device executes the command buffer if the corresponding bit is set in the mask.

- `signalSemaphoreCount` is the number of elements in the `pSignalSemaphoreDeviceIndices` array.

- `pSignalSemaphoreDeviceIndices` is a pointer to an array of `signalSemaphoreCount` device indices indicating which physical device executes the semaphore signal operation in the corresponding element of VkSubmitInfo::`pSignalSemaphores`.

If this structure is not present, semaphore operations and command buffers execute on device index zero.

Valid Usage

- VUID-VkDeviceGroupSubmitInfo-waitSemaphoreCount-00082
  `waitSemaphoreCount` must equal VkSubmitInfo::`waitSemaphoreCount`

- VUID-VkDeviceGroupSubmitInfo-commandBufferCount-00083
  `commandBufferCount` must equal VkSubmitInfo::`commandBufferCount`

- VUID-VkDeviceGroupSubmitInfo-signalSemaphoreCount-00084
  `signalSemaphoreCount` must equal VkSubmitInfo::`signalSemaphoreCount`

- VUID-VkDeviceGroupSubmitInfo-pWaitSemaphoreDeviceIndices-00085
  All elements of `pWaitSemaphoreDeviceIndices` and `pSignalSemaphoreDeviceIndices` must be valid device indices

- VUID-VkDeviceGroupSubmitInfo-pCommandBufferDeviceMasks-00086
  All elements of `pCommandBufferDeviceMasks` must be valid device masks

Valid Usage (Implicit)

- VUID-VkDeviceGroupSubmitInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO

- VUID-VkDeviceGroupSubmitInfo-pWaitSemaphoreDeviceIndices-parameter
  If `waitSemaphoreCount` is not `0`, `pWaitSemaphoreDeviceIndices` must be a valid pointer to an array of `waitSemaphoreCount` `uint32_t` values

- VUID-VkDeviceGroupSubmitInfo-pCommandBufferDeviceMasks-parameter
  If `commandBufferCount` is not `0`, `pCommandBufferDeviceMasks` must be a valid pointer to an array of `commandBufferCount` `uint32_t` values

- VUID-VkDeviceGroupSubmitInfo-pSignalSemaphoreDeviceIndices-parameter
  If `signalSemaphoreCount` is not `0`, `pSignalSemaphoreDeviceIndices` must be a valid pointer to an array of `signalSemaphoreCount` `uint32_t` values

Structure Chaining

Extends the structure

  - VkSubmitInfo

If the `pNext` chain of VkSubmitInfo includes a VkPerformanceQuerySubmitInfoKHR structure, then the structure indicates which counter pass is active for the batch in that submit.

The `VkPerformanceQuerySubmitInfoKHR` structure is defined as:

    // Provided by VK_KHR_performance_query
    typedef struct VkPerformanceQuerySubmitInfoKHR {
        VkStructureType    sType;
        const void*        pNext;
        uint32_t           counterPassIndex;
    } VkPerformanceQuerySubmitInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `counterPassIndex` specifies which counter pass index is active.

If the `VkSubmitInfo`::`pNext` chain does not include this structure, the batch defaults to use counter pass index 0.

Valid Usage

- VUID-VkPerformanceQuerySubmitInfoKHR-counterPassIndex-03221
  `counterPassIndex` must be less than the number of counter passes required by any queries within the batch. The required number of counter passes for a performance query is obtained by calling vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR

Valid Usage (Implicit)

- VUID-VkPerformanceQuerySubmitInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PERFORMANCE_QUERY_SUBMIT_INFO_KHR

Structure Chaining

Extends the structures

  - VkSubmitInfo

  - VkSubmitInfo2

### 6.6. Queue Forward Progress

When using binary semaphores, the application must ensure that command buffer submissions will be able to complete without any subsequent operations by the application on any queue. After any call to `vkQueueSubmit` (or other queue operation), for every queued wait on a semaphore created with a VkSemaphoreType of VK_SEMAPHORE_TYPE_BINARY there must be a prior signal of that semaphore that will not be consumed by a different wait on the semaphore.

When using timeline semaphores, wait-before-signal behavior is well-defined and applications can submit work via `vkQueueSubmit` defining a timeline semaphore wait operation before submitting a corresponding semaphore signal operation. For each timeline semaphore wait operation defined by a call to `vkQueueSubmit`, the application must ensure that a corresponding semaphore signal operation is executed before forward progress can be made.

If a command buffer submission waits for any events to be signaled, the application must ensure that command buffer submissions will be able to complete without any subsequent operations by the application. Events signaled by the host must be signaled before the command buffer waits on those events.

Note | The ability for commands to wait on the host to set an events was originally added to allow low-latency updates to resources between host and device. However, to ensure quality of service, implementations would necessarily detect extended stalls in execution and timeout after a short period. As this period is not defined in the Vulkan specification, it is impossible to correctly validate any application with any wait period. Since the original users of this functionality were highly limited and platform-specific, this functionality is now considered defunct and should not be used.

### 6.7. Secondary Command Buffer Execution

Secondary command buffers must not be directly submitted to a queue. To record a secondary command buffer to execute as part of a primary command buffer, call:

    // Provided by VK_VERSION_1_0
    void vkCmdExecuteCommands(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    commandBufferCount,
        const VkCommandBuffer*                      pCommandBuffers);

- `commandBuffer` is a handle to a primary command buffer that the secondary command buffers are executed in.

- `commandBufferCount` is the length of the `pCommandBuffers` array.

- `pCommandBuffers` is a pointer to an array of `commandBufferCount` secondary command buffer handles, which are recorded to execute in the primary command buffer in the order they are listed in the array.

If any element of `pCommandBuffers` was not recorded with the VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT flag, and it was recorded into any other primary command buffer which is currently in the executable or recording state, that primary command buffer becomes invalid.

If the `nestedCommandBuffer` feature is enabled it is valid usage for `vkCmdExecuteCommands` to also be recorded to a secondary command buffer.

Valid Usage

- VUID-vkCmdExecuteCommands-pCommandBuffers-00088
  Each element of `pCommandBuffers` must have been allocated with a `level` of VK_COMMAND_BUFFER_LEVEL_SECONDARY

- VUID-vkCmdExecuteCommands-pCommandBuffers-00089
  Each element of `pCommandBuffers` must be in the pending or executable state

- VUID-vkCmdExecuteCommands-pCommandBuffers-00091
  If any element of `pCommandBuffers` was not recorded with the VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT flag, it must not be in the pending state

- VUID-vkCmdExecuteCommands-pCommandBuffers-00092
  If any element of `pCommandBuffers` was not recorded with the VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT flag, it must not have already been recorded to `commandBuffer`

- VUID-vkCmdExecuteCommands-pCommandBuffers-00093
  If any element of `pCommandBuffers` was not recorded with the VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT flag, it must not appear more than once in `pCommandBuffers`

- VUID-vkCmdExecuteCommands-pCommandBuffers-00094
  Each element of `pCommandBuffers` must have been allocated from a `VkCommandPool` that was created for the same queue family as the `VkCommandPool` from which `commandBuffer` was allocated

- VUID-vkCmdExecuteCommands-pCommandBuffers-00096
  If this command is called within a render pass instance, each element of `pCommandBuffers` must have been recorded with the VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT

- VUID-vkCmdExecuteCommands-pCommandBuffers-00099
  If this command is called within a render pass instance, and any element of `pCommandBuffers` was recorded with VkCommandBufferInheritanceInfo::`framebuffer` not equal to VK_NULL_HANDLE, that `VkFramebuffer` must match the `VkFramebuffer` used in the current render pass instance

- VUID-vkCmdExecuteCommands-contents-09680
  If this command is called within a render pass instance begun with vkCmdBeginRenderPass, and vkCmdNextSubpass has not been called in the current render pass instance, the `contents` parameter of vkCmdBeginRenderPass must have been VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS , or VK_SUBPASS_CONTENTS_INLINE_AND_SECONDARY_COMMAND_BUFFERS_EXT

- VUID-vkCmdExecuteCommands-None-09681
  If this command is called within a render pass instance begun with vkCmdBeginRenderPass, and vkCmdNextSubpass has been called in the current render pass instance, the `contents` parameter of the last call to vkCmdNextSubpass must have been VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS , or VK_SUBPASS_CONTENTS_INLINE_AND_SECONDARY_COMMAND_BUFFERS_KHR

- VUID-vkCmdExecuteCommands-pCommandBuffers-06019
  If this command is called within a render pass instance begun with vkCmdBeginRenderPass, each element of `pCommandBuffers` must have been recorded with VkCommandBufferInheritanceInfo::`subpass` set to the index of the subpass which the given command buffer will be executed in

- VUID-vkCmdExecuteCommands-pBeginInfo-06020
  If this command is called within a render pass instance begun with vkCmdBeginRenderPass, the render passes specified in the `pBeginInfo->pInheritanceInfo->renderPass` members of the vkBeginCommandBuffer commands used to begin recording each element of `pCommandBuffers` must be compatible with the current render pass

- VUID-vkCmdExecuteCommands-pNext-02865
  If this command is called within a render pass instance that included VkRenderPassTransformBeginInfoQCOM in the `pNext` chain of VkRenderPassBeginInfo, then each element of `pCommandBuffers` must have been recorded with VkCommandBufferInheritanceRenderPassTransformInfoQCOM in the `pNext` chain of VkCommandBufferBeginInfo

- VUID-vkCmdExecuteCommands-pNext-02866
  If this command is called within a render pass instance that included VkRenderPassTransformBeginInfoQCOM in the `pNext` chain of VkRenderPassBeginInfo, then each element of `pCommandBuffers` must have been recorded with VkCommandBufferInheritanceRenderPassTransformInfoQCOM::`transform` identical to VkRenderPassTransformBeginInfoQCOM::`transform`

- VUID-vkCmdExecuteCommands-pNext-02867
  If this command is called within a render pass instance that included VkRenderPassTransformBeginInfoQCOM in the `pNext` chain of VkRenderPassBeginInfo, then each element of `pCommandBuffers` must have been recorded with VkCommandBufferInheritanceRenderPassTransformInfoQCOM::`renderArea` identical to VkRenderPassBeginInfo::`renderArea`

- VUID-vkCmdExecuteCommands-pCommandBuffers-00100
  If `vkCmdExecuteCommands` is not being called within a render pass instance, each element of `pCommandBuffers` must not have been recorded with the VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT

- VUID-vkCmdExecuteCommands-commandBuffer-00101
  If the `inheritedQueries` feature is not enabled, `commandBuffer` must not have any queries active

- VUID-vkCmdExecuteCommands-commandBuffer-00102
  If `commandBuffer` has a VK_QUERY_TYPE_OCCLUSION query active, then each element of `pCommandBuffers` must have been recorded with `VkCommandBufferInheritanceInfo`::`occlusionQueryEnable` set to VK_TRUE

- VUID-vkCmdExecuteCommands-commandBuffer-00103
  If `commandBuffer` has a VK_QUERY_TYPE_OCCLUSION query active, then each element of `pCommandBuffers` must have been recorded with `VkCommandBufferInheritanceInfo`::`queryFlags` having all bits set that are set for the query

- VUID-vkCmdExecuteCommands-commandBuffer-00104
  If `commandBuffer` has a VK_QUERY_TYPE_PIPELINE_STATISTICS query active, then each element of `pCommandBuffers` must have been recorded with `VkCommandBufferInheritanceInfo`::`pipelineStatistics` having all bits set that are set in the `VkQueryPool` the query uses

- VUID-vkCmdExecuteCommands-pCommandBuffers-00105
  Each element of `pCommandBuffers` must not begin any query types that are active in `commandBuffer`

- VUID-vkCmdExecuteCommands-commandBuffer-07594
  `commandBuffer` must not have any queries other than VK_QUERY_TYPE_OCCLUSION and VK_QUERY_TYPE_PIPELINE_STATISTICS active

- VUID-vkCmdExecuteCommands-commandBuffer-01820
  If `commandBuffer` is a protected command buffer and `protectedNoFault` is not supported, each element of `pCommandBuffers` must be a protected command buffer

- VUID-vkCmdExecuteCommands-commandBuffer-01821
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, each element of `pCommandBuffers` must be an unprotected command buffer

- VUID-vkCmdExecuteCommands-None-02286
  This command must not be recorded when transform feedback is active

- VUID-vkCmdExecuteCommands-commandBuffer-06533
  If this command is called within a render pass instance and any recorded command in `commandBuffer` in the current subpass will write to an image subresource as an attachment, commands recorded in elements of `pCommandBuffers` must not read from the memory backing that image subresource in any other way

- VUID-vkCmdExecuteCommands-commandBuffer-06534
  If this command is called within a render pass instance and any recorded command in `commandBuffer` in the current subpass will read from an image subresource used as an attachment in any way other than as an attachment, commands recorded in elements of `pCommandBuffers` must not write to that image subresource as an attachment

- VUID-vkCmdExecuteCommands-pCommandBuffers-06535
  If this command is called within a render pass instance and any recorded command in a given element of `pCommandBuffers` will write to an image subresource as an attachment, commands recorded in elements of `pCommandBuffers` at a higher index must not read from the memory backing that image subresource in any other way

- VUID-vkCmdExecuteCommands-pCommandBuffers-06536
  If this command is called within a render pass instance and any recorded command in a given element of `pCommandBuffers` will read from an image subresource used as an attachment in any way other than as an attachment, commands recorded in elements of `pCommandBuffers` at a higher index must not write to that image subresource as an attachment

- VUID-vkCmdExecuteCommands-pCommandBuffers-06021
  If `pCommandBuffers` contains any suspended render pass instances, there must be no action or synchronization commands between that render pass instance and any render pass instance that resumes it

- VUID-vkCmdExecuteCommands-pCommandBuffers-06022
  If `pCommandBuffers` contains any suspended render pass instances, there must be no render pass instances between that render pass instance and any render pass instance that resumes it

- VUID-vkCmdExecuteCommands-variableSampleLocations-06023
  If the `variableSampleLocations` limit is not supported, and any element of `pCommandBuffers` contains any suspended render pass instances, where a graphics pipeline has been bound, any pipelines bound in the render pass instance that resumes it, or any subsequent render pass instances that resume from that one and so on, must use the same sample locations

- VUID-vkCmdExecuteCommands-flags-06024
  If this command is called within a render pass instance begun with vkCmdBeginRendering, its VkRenderingInfo::`flags` parameter must have included VK_RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT

- VUID-vkCmdExecuteCommands-pBeginInfo-06025
  If this command is called within a render pass instance begun with vkCmdBeginRendering, the render passes specified in the `pBeginInfo->pInheritanceInfo->renderPass` members of the vkBeginCommandBuffer commands used to begin recording each element of `pCommandBuffers` must be VK_NULL_HANDLE

- VUID-vkCmdExecuteCommands-flags-06026
  If this command is called within a render pass instance begun with vkCmdBeginRendering, the `flags` member of the VkCommandBufferInheritanceRenderingInfo structure included in the `pNext` chain of VkCommandBufferBeginInfo::`pInheritanceInfo` used to begin recording each element of `pCommandBuffers` must be equal to the VkRenderingInfo::`flags` parameter to vkCmdBeginRendering, excluding VK_RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT

- VUID-vkCmdExecuteCommands-colorAttachmentCount-06027
  If this command is called within a render pass instance begun with vkCmdBeginRendering, the `colorAttachmentCount` member of the VkCommandBufferInheritanceRenderingInfo structure included in the `pNext` chain of VkCommandBufferBeginInfo::`pInheritanceInfo` used to begin recording each element of `pCommandBuffers` must be equal to the VkRenderingInfo::`colorAttachmentCount` parameter to vkCmdBeginRendering

- VUID-vkCmdExecuteCommands-imageView-06028
  If this command is called within a render pass instance begun with vkCmdBeginRendering, if the `imageView` member of an element of the VkRenderingInfo::`pColorAttachments` parameter to vkCmdBeginRendering is not VK_NULL_HANDLE, the corresponding element of the `pColorAttachmentFormats` member of the VkCommandBufferInheritanceRenderingInfo structure included in the `pNext` chain of VkCommandBufferBeginInfo::`pInheritanceInfo` used to begin recording each element of `pCommandBuffers` must be equal to the format used to create that image view

- VUID-vkCmdExecuteCommands-imageView-07606
  If this command is called within a render pass instance begun with vkCmdBeginRendering, if the `imageView` member of an element of the VkRenderingInfo::`pColorAttachments` parameter to vkCmdBeginRendering is VK_NULL_HANDLE, the corresponding element of the `pColorAttachmentFormats` member of the VkCommandBufferInheritanceRenderingInfo structure included in the `pNext` chain of VkCommandBufferBeginInfo::`pInheritanceInfo` used to begin recording each element of `pCommandBuffers` must be VK_FORMAT_UNDEFINED

- VUID-vkCmdExecuteCommands-pDepthAttachment-06029
  If this command is called within a render pass instance begun with vkCmdBeginRendering, if the VkRenderingInfo::`pDepthAttachment->imageView` parameter to vkCmdBeginRendering is not VK_NULL_HANDLE, the value of the `depthAttachmentFormat` member of the VkCommandBufferInheritanceRenderingInfo structure included in the `pNext` chain of VkCommandBufferBeginInfo::`pInheritanceInfo` used to begin recording each element of `pCommandBuffers` must be equal to the format used to create that image view

- VUID-vkCmdExecuteCommands-pStencilAttachment-06030
  If this command is called within a render pass instance begun with vkCmdBeginRendering, if the VkRenderingInfo::`pStencilAttachment->imageView` parameter to vkCmdBeginRendering is not VK_NULL_HANDLE, the value of the `stencilAttachmentFormat` member of the VkCommandBufferInheritanceRenderingInfo structure included in the `pNext` chain of VkCommandBufferBeginInfo::`pInheritanceInfo` used to begin recording each element of `pCommandBuffers` must be equal to the format used to create that image view

- VUID-vkCmdExecuteCommands-pDepthAttachment-06774
  If this command is called within a render pass instance begun with vkCmdBeginRendering and the VkRenderingInfo::`pDepthAttachment->imageView` parameter to vkCmdBeginRendering was VK_NULL_HANDLE, the value of the `depthAttachmentFormat` member of the VkCommandBufferInheritanceRenderingInfo structure included in the `pNext` chain of VkCommandBufferBeginInfo::`pInheritanceInfo` used to begin recording each element of `pCommandBuffers` must be VK_FORMAT_UNDEFINED

- VUID-vkCmdExecuteCommands-pStencilAttachment-06775
  If this command is called within a render pass instance begun with vkCmdBeginRendering and the VkRenderingInfo::`pStencilAttachment->imageView` parameter to vkCmdBeginRendering was VK_NULL_HANDLE, the value of the `stencilAttachmentFormat` member of the VkCommandBufferInheritanceRenderingInfo structure included in the `pNext` chain of VkCommandBufferBeginInfo::`pInheritanceInfo` used to begin recording each element of `pCommandBuffers` must be VK_FORMAT_UNDEFINED

- VUID-vkCmdExecuteCommands-pCommandBuffers-11500
  If the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, then each element of `pCommandBuffers` must have been recorded with a VkCustomResolveCreateInfoEXT struct chained to its VkCommandBufferInheritanceInfo

- VUID-vkCmdExecuteCommands-pCommandBuffers-11501
  If the current render pass instance was begun with vkCmdBeginRendering and does not contain a custom resolve, then each element of `pCommandBuffers` must not have been recorded with a VkCustomResolveCreateInfoEXT struct chained to its VkCommandBufferInheritanceInfo

- VUID-vkCmdExecuteCommands-pCommandBuffers-11502
  If the current render pass instance was begun with vkCmdBeginRendering and vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, then each element of `pCommandBuffers` must have been recorded with VkCustomResolveCreateInfoEXT::`customResolve` as VK_TRUE

- VUID-vkCmdExecuteCommands-pCommandBuffers-11503
  If the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, and vkCmdBeginCustomResolveEXT has not been recorded in the render pass instance, then each element of `pCommandBuffers` must have been recorded with VkCustomResolveCreateInfoEXT::`customResolve` as VK_FALSE

- VUID-vkCmdExecuteCommands-colorAttachmentCount-11532
  If this command is called within a render pass instance begun with vkCmdBeginRendering that contains a custom resolve, the `colorAttachmentCount` member of the VkCustomResolveCreateInfoEXT structure included in the `pNext` chain of VkCommandBufferBeginInfo::`pInheritanceInfo` used to begin recording each element of `pCommandBuffers` must be equal to the VkRenderingInfo::`colorAttachmentCount` parameter to vkCmdBeginRendering

- VUID-vkCmdExecuteCommands-resolveImageView-11533
  If this command is called within a render pass instance begun with vkCmdBeginRendering that contains a custom resolve, if the `resolveImageView` member of an element of the VkRenderingInfo::`pColorAttachments` parameter to vkCmdBeginRendering is not VK_NULL_HANDLE, the corresponding element of the `pColorAttachmentFormats` member of the VkCustomResolveCreateInfoEXT structure included in the `pNext` chain of VkCommandBufferBeginInfo::`pInheritanceInfo` used to begin recording each element of `pCommandBuffers` must be equal to the format used to create that image view

- VUID-vkCmdExecuteCommands-resolveImageView-11534
  If this command is called within a render pass instance begun with vkCmdBeginRendering that contains a custom resolve, if the `resolveImageView` member of an element of the VkRenderingInfo::`pColorAttachments` parameter to vkCmdBeginRendering is VK_NULL_HANDLE, the corresponding element of the `pColorAttachmentFormats` member of the VkCustomResolveCreateInfoEXT structure included in the `pNext` chain of VkCommandBufferBeginInfo::`pInheritanceInfo` used to begin recording each element of `pCommandBuffers` must be VK_FORMAT_UNDEFINED

- VUID-vkCmdExecuteCommands-pDepthAttachment-11535
  If this command is called within a render pass instance begun with vkCmdBeginRendering, if the VkRenderingInfo::`pDepthAttachment->imageView` parameter to vkCmdBeginRendering is not VK_NULL_HANDLE, the value of the `depthAttachmentFormat` member of the VkCommandBufferInheritanceRenderingInfo structure included in the `pNext` chain of VkCommandBufferBeginInfo::`pInheritanceInfo` used to begin recording each element of `pCommandBuffers` must be equal to the format used to create that image view

- VUID-vkCmdExecuteCommands-pStencilAttachment-11536
  If this command is called within a render pass instance begun with vkCmdBeginRendering that contains a custom resolve, if the VkRenderingInfo::`pStencilAttachment->resolveImageView` parameter to vkCmdBeginRendering is not VK_NULL_HANDLE, the value of the `stencilAttachmentFormat` member of the VkCustomResolveCreateInfoEXT structure included in the `pNext` chain of VkCommandBufferBeginInfo::`pInheritanceInfo` used to begin recording each element of `pCommandBuffers` must be equal to the format used to create that image view

- VUID-vkCmdExecuteCommands-pDepthAttachment-11537
  If this command is called within a render pass instance begun with vkCmdBeginRendering that contains a custom resolve and the VkRenderingInfo::`pDepthAttachment->resolveImageView` parameter to vkCmdBeginRendering was VK_NULL_HANDLE, the value of the `depthAttachmentFormat` member of the VkCustomResolveCreateInfoEXT structure included in the `pNext` chain of VkCommandBufferBeginInfo::`pInheritanceInfo` used to begin recording each element of `pCommandBuffers` must be VK_FORMAT_UNDEFINED

- VUID-vkCmdExecuteCommands-pStencilAttachment-11538
  If this command is called within a render pass instance begun with vkCmdBeginRendering that contains a custom resolve and the VkRenderingInfo::`pStencilAttachment->resolveImageView` parameter to vkCmdBeginRendering was VK_NULL_HANDLE, the value of the `stencilAttachmentFormat` member of the VkCustomResolveCreateInfoEXT structure included in the `pNext` chain of VkCommandBufferBeginInfo::`pInheritanceInfo` used to begin recording each element of `pCommandBuffers` must be VK_FORMAT_UNDEFINED

- VUID-vkCmdExecuteCommands-resolveImageView-11526
  If this command is called within a render pass instance begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, and the `resolveImageView` member of an element of the VkRenderingInfo::`pColorAttachments` parameter to vkCmdBeginRendering is not VK_NULL_HANDLE, the value of VkCommandBufferInheritanceRenderingInfo::`rasterizationSamples` must be equal to the sample count used to create that `resolveImageView`

- VUID-vkCmdExecuteCommands-pDepthAttachment-11527
  If this command is called within a render pass instance begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, and the VkRenderingInfo::`pDepthAttachment->resolveImageView` parameter to vkCmdBeginRendering is not VK_NULL_HANDLE, the value of VkCommandBufferInheritanceRenderingInfo::`rasterizationSamples` must be equal to the sample count used to create that image view

- VUID-vkCmdExecuteCommands-pStencilAttachment-11528
  If this command is called within a render pass instance begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, and the VkRenderingInfo::`pStencilAttachment->resolveImageView` parameter to vkCmdBeginRendering is not VK_NULL_HANDLE, the value of VkCommandBufferInheritanceRenderingInfo::`rasterizationSamples` must be equal to the sample count used to create that image view

- VUID-vkCmdExecuteCommands-viewMask-06031
  If this command is called within a render pass instance begun with vkCmdBeginRendering, the `viewMask` member of the VkCommandBufferInheritanceRenderingInfo structure included in the `pNext` chain of VkCommandBufferBeginInfo::`pInheritanceInfo` used to begin recording each element of `pCommandBuffers` must be equal to the VkRenderingInfo::`viewMask` parameter to vkCmdBeginRendering

- VUID-vkCmdExecuteCommands-pNext-06032
  If this command is called within a render pass instance begun with vkCmdBeginRendering and the `pNext` chain of VkCommandBufferInheritanceInfo includes a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, if the `imageView` member of an element of the VkRenderingInfo::`pColorAttachments` parameter to vkCmdBeginRendering is not VK_NULL_HANDLE, the corresponding element of the `pColorAttachmentSamples` member of the VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure included in the `pNext` chain of VkCommandBufferBeginInfo::`pInheritanceInfo` used to begin recording each element of `pCommandBuffers` must be equal to the sample count used to create that image view

- VUID-vkCmdExecuteCommands-pNext-06033
  If this command is called within a render pass instance begun with vkCmdBeginRendering and the `pNext` chain of VkCommandBufferInheritanceInfo includes a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, if the VkRenderingInfo::`pDepthAttachment->imageView` parameter to vkCmdBeginRendering is not VK_NULL_HANDLE, the value of the `depthStencilAttachmentSamples` member of the VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure included in the `pNext` chain of VkCommandBufferBeginInfo::`pInheritanceInfo` used to begin recording each element of `pCommandBuffers` must be equal to the sample count used to create that image view

- VUID-vkCmdExecuteCommands-pNext-06034
  If this command is called within a render pass instance begun with vkCmdBeginRendering and the `pNext` chain of VkCommandBufferInheritanceInfo includes a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, if the VkRenderingInfo::`pStencilAttachment->imageView` parameter to vkCmdBeginRendering is not VK_NULL_HANDLE, the value of the `depthStencilAttachmentSamples` member of the VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure included in the `pNext` chain of VkCommandBufferBeginInfo::`pInheritanceInfo` used to begin recording each element of `pCommandBuffers` must be equal to the sample count used to create that image view

- VUID-vkCmdExecuteCommands-pNext-06035
  If this command is called within a render pass instance begun with vkCmdBeginRendering, and the `pNext` chain of VkCommandBufferInheritanceInfo does not include a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and if the `imageView` member of an element of the VkRenderingInfo::`pColorAttachments` parameter to vkCmdBeginRendering is not VK_NULL_HANDLE, the value of VkCommandBufferInheritanceRenderingInfo::`rasterizationSamples` must be equal to the sample count used to create that image view

- VUID-vkCmdExecuteCommands-pNext-06036
  If this command is called within a render pass instance begun with vkCmdBeginRendering and the `pNext` chain of VkCommandBufferInheritanceInfo does not include a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and if the VkRenderingInfo::`pDepthAttachment->imageView` parameter to vkCmdBeginRendering is not VK_NULL_HANDLE, the value of VkCommandBufferInheritanceRenderingInfo::`rasterizationSamples` must be equal to the sample count used to create that image view

- VUID-vkCmdExecuteCommands-pNext-06037
  If this command is called within a render pass instance begun with vkCmdBeginRendering and the `pNext` chain of VkCommandBufferInheritanceInfo does not include a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and if the VkRenderingInfo::`pStencilAttachment->imageView` parameter to vkCmdBeginRendering is not VK_NULL_HANDLE, the value of VkCommandBufferInheritanceRenderingInfo::`rasterizationSamples` must be equal to the sample count used to create that image view

- VUID-vkCmdExecuteCommands-pNext-09299
  If this command is called within a render pass instance begun with vkCmdBeginRendering, with any color attachment using a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, the `pNext` chain of VkCommandBufferInheritanceInfo used to create each element of `pCommandBuffers` must include a VkExternalFormatANDROID structure with an `externalFormat` matching that used to create the resolve attachment in the render pass

- VUID-vkCmdExecuteCommands-pNext-09300
  If this command is called within a render pass instance begun with vkCmdBeginRendering with any color attachment using a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, and the `pNext` chain of VkCommandBufferInheritanceInfo does not include a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, the value of VkCommandBufferInheritanceRenderingInfo::`rasterizationSamples` must be VK_SAMPLE_COUNT_1_BIT

- VUID-vkCmdExecuteCommands-commandBuffer-09375
  `commandBuffer` must not be a secondary command buffer unless the `nestedCommandBuffer` feature is enabled

- VUID-vkCmdExecuteCommands-nestedCommandBuffer-09376
  If the `nestedCommandBuffer` feature is enabled, and `commandBuffer` is a secondary command buffer, the command buffer nesting level of each element of `pCommandBuffers` must be less than `maxCommandBufferNestingLevel`

- VUID-vkCmdExecuteCommands-nestedCommandBufferRendering-09377
  If the `nestedCommandBufferRendering` feature is not enabled, and `commandBuffer` is a secondary command buffer, `commandBuffer` must not have been recorded with VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT

- VUID-vkCmdExecuteCommands-nestedCommandBufferSimultaneousUse-09378
  If the `nestedCommandBufferSimultaneousUse` feature is not enabled, and `commandBuffer` is a secondary command buffer, each element of `pCommandBuffers` must not have been recorded with VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT

- VUID-vkCmdExecuteCommands-pCommandBuffers-09504
  If this command is called within a render pass instance begun with vkCmdBeginRendering, the color attachment mapping state specified by VkRenderingAttachmentLocationInfo in the inheritance info of each element of `pCommandBuffers` and in the current state of `commandBuffer` must match

- VUID-vkCmdExecuteCommands-pCommandBuffers-09505
  If this command is called within a render pass instance begun with vkCmdBeginRendering, the input attachment mapping state specified by VkRenderingInputAttachmentIndexInfo in the inheritance info of each element of `pCommandBuffers` and in the current state of `commandBuffer` must match

- VUID-vkCmdExecuteCommands-memory-10724
  If this command is called within a render pass instance, the size of `memory` member of the VkTileMemoryBindInfoQCOM structure included in the `pNext` chain of VkCommandBufferBeginInfo::`pInheritanceInfo` used to begin recording each element of `pCommandBuffers` must be equal to the active bound bound tile memory object in `commandBuffer`

- VUID-vkCmdExecuteCommands-pCommandBuffers-10620
  If this command is being recorded within a render pass instance with tile shading enabled, all elements of `pCommandBuffers` must have been recorded with VK_TILE_SHADING_RENDER_PASS_ENABLE_BIT_QCOM included in VkRenderPassTileShadingCreateInfoQCOM::`flags`

- VUID-vkCmdExecuteCommands-pCommandBuffers-10621
  If the per-tile execution model is enabled, all elements of `pCommandBuffers` must have been recorded with VK_TILE_SHADING_RENDER_PASS_PER_TILE_EXECUTION_BIT_QCOM included in VkRenderPassTileShadingCreateInfoQCOM::`flags`

- VUID-vkCmdExecuteCommands-tileApronSize-10622
  If this command is being recorded within a render pass instance, the `tileApronSize` used to create the render pass instance must equal the VkRenderPassTileShadingCreateInfoQCOM::`tileApronSize` used to record all elements of `pCommandBuffers`

- VUID-vkCmdExecuteCommands-pCommandBuffers-10623
  If any element of `pCommandBuffers` was recorded with VK_TILE_SHADING_RENDER_PASS_ENABLE_BIT_QCOM included in VkRenderPassTileShadingCreateInfoQCOM::`flags`, this command must be recorded in a render pass that has tile shading enabled

- VUID-vkCmdExecuteCommands-pCommandBuffers-10624
  If any element of `pCommandBuffers` was recorded with VK_TILE_SHADING_RENDER_PASS_PER_TILE_EXECUTION_BIT_QCOM included in VkRenderPassTileShadingCreateInfoQCOM::`flags`, per-tile execution model must be enabled

- VUID-vkCmdExecuteCommands-tileApronSize-10625
  If this command is not being recorded into a render pass instance, the VkRenderPassTileShadingCreateInfoQCOM::`tileApronSize` that was recorded into all elements of `pCommandBuffers` must equal `(0,0)`

- VUID-vkCmdExecuteCommands-commandBuffer-11351
  If there is a sampler descriptor heap bound to `commandBuffer`, each element of `pCommandBuffers` must have been recorded with a value of VkCommandBufferInheritanceDescriptorHeapInfoEXT::`pSamplerHeapBindInfo` that is either `NULL` or a pointer to a bind info that is identical to that set via the last call to vkCmdBindSamplerHeapEXT

- VUID-vkCmdExecuteCommands-commandBuffer-11352
  If there is a resource descriptor heap bound to `commandBuffer`, each element of `pCommandBuffers` must have been recorded with a value of VkCommandBufferInheritanceDescriptorHeapInfoEXT::`pResourceHeapBindInfo` that is either `NULL` or a pointer to a bind info that is identical to that set via the last call to vkCmdBindResourceHeapEXT

- VUID-vkCmdExecuteCommands-commandBuffer-11473
  If there is no sampler descriptor heap bound to `commandBuffer`, each element of `pCommandBuffers` must have been recorded with a value of VkCommandBufferInheritanceDescriptorHeapInfoEXT::`pSamplerHeapBindInfo` set to `NULL`

- VUID-vkCmdExecuteCommands-commandBuffer-11474
  If there is no resource descriptor heap bound to `commandBuffer`, each element of `pCommandBuffers` must have been recorded with a value of VkCommandBufferInheritanceDescriptorHeapInfoEXT::`pResourceHeapBindInfo` set to `NULL`

- VUID-vkCmdExecuteCommands-commandBuffer-12373
  `commandBuffer` must not have any shader instrumentation active

Valid Usage (Implicit)

- VUID-vkCmdExecuteCommands-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdExecuteCommands-pCommandBuffers-parameter
  `pCommandBuffers` must be a valid pointer to an array of `commandBufferCount` valid VkCommandBuffer handles

- VUID-vkCmdExecuteCommands-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdExecuteCommands-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, VK_QUEUE_GRAPHICS_BIT, or VK_QUEUE_TRANSFER_BIT operations

- VUID-vkCmdExecuteCommands-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdExecuteCommands-commandBufferCount-arraylength
  `commandBufferCount` must be greater than `0`

- VUID-vkCmdExecuteCommands-commonparent
  Both of `commandBuffer`, and the elements of `pCommandBuffers` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT VK_QUEUE_TRANSFER_BIT | Indirection

Conditional Rendering

vkCmdExecuteCommands is not affected by conditional rendering

### 6.8. Nested Command Buffers

In addition to secondary command buffer execution from primary command buffers, an implementation may support nested command buffers, which enable secondary command buffers to be executed from other secondary command buffers. If the `nestedCommandBuffer` feature is enabled, the implementation supports nested command buffers.

Nested command buffer execution works the same as primary-to-secondary execution, except that it is subject to some additional implementation-defined limits.

Each secondary command buffer has a command buffer nesting level, which is determined at vkEndCommandBuffer time and evaluated at vkCmdExecuteCommands time. A secondary command buffer that executes no other secondary command buffers has a command buffer nesting level of zero. Otherwise, the command buffer nesting level of a secondary command buffer is equal to the maximum nesting level of all secondary command buffers executed by that command buffer plus one. Some implementations may have a limit on the maximum nesting level of secondary command buffers that can be recorded. This limit is advertised in `maxCommandBufferNestingLevel`.

If the `nestedCommandBufferRendering` feature is enabled, the implementation supports calling vkCmdExecuteCommands inside secondary command buffers recorded with VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT. If the `nestedCommandBufferSimultaneousUse` feature is enabled, the implementation supports calling vkCmdExecuteCommands with secondary command buffers recorded with VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT.

Whenever vkCmdExecuteCommands is recorded inside a secondary command buffer recorded with VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT, each member of `pCommandBuffers` must have been recorded with a VkCommandBufferBeginInfo with VkCommandBufferInheritanceInfo compatible with the VkCommandBufferInheritanceInfo of the command buffer into which the vkCmdExecuteCommands call is being recorded. The VkCommandBufferInheritanceRenderingInfo structures are compatible when the `VkCommandBufferInheritanceRenderingInfo`::`renderpass` are compatible, or if they are VK_NULL_HANDLE then the VkCommandBufferInheritanceRenderingInfo members match, and all other members of `VkCommandBufferInheritanceRenderingInfo` match. This requirement applies recursively, down to the most nested command buffer and up to the command buffer where the render pass was originally begun.

### 6.9. Command Buffer Device Mask

Each command buffer has a piece of state storing the current device mask of the command buffer. This mask controls which physical devices within the logical device all subsequent commands will execute on, including state-setting commands, action commands, and synchronization commands.

Scissor, exclusive scissor, and viewport state (excluding the count of each) can be different values on each physical device (only when set as dynamic state), and each physical device will render using its local copy of the state. Other state is shared between physical devices, such that all physical devices use the most recently set values for the state. However, when recording an action command that uses a piece of state, the most recent command that set that state must have included all physical devices that execute the action command in its current device mask.

The command buffer’s device mask is orthogonal to the `pCommandBufferDeviceMasks` member of VkDeviceGroupSubmitInfo. Commands only execute on a physical device if the device index is set in both device masks.

If the `pNext` chain of VkCommandBufferBeginInfo includes a `VkDeviceGroupCommandBufferBeginInfo` structure, then that structure includes an initial device mask for the command buffer.

The `VkDeviceGroupCommandBufferBeginInfo` structure is defined as:

    // Provided by VK_VERSION_1_1
    typedef struct VkDeviceGroupCommandBufferBeginInfo {
        VkStructureType    sType;
        const void*        pNext;
        uint32_t           deviceMask;
    } VkDeviceGroupCommandBufferBeginInfo;

    // Provided by VK_KHR_device_group
    // Equivalent to VkDeviceGroupCommandBufferBeginInfo
    typedef VkDeviceGroupCommandBufferBeginInfo VkDeviceGroupCommandBufferBeginInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `deviceMask` is the initial value of the command buffer’s device mask.

The initial device mask also acts as an upper bound on the set of devices that can ever be in the device mask in the command buffer.

If this structure is not present, the initial value of a command buffer’s device mask includes all physical devices in the logical device when the command buffer begins recording.

Valid Usage

- VUID-VkDeviceGroupCommandBufferBeginInfo-deviceMask-00106
  `deviceMask` must be a valid device mask value

- VUID-VkDeviceGroupCommandBufferBeginInfo-deviceMask-00107
  `deviceMask` must not be zero

Valid Usage (Implicit)

- VUID-VkDeviceGroupCommandBufferBeginInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO

Structure Chaining

Extends the structure

  - VkCommandBufferBeginInfo

To update the current device mask of a command buffer, call:

    // Provided by VK_VERSION_1_1
    void vkCmdSetDeviceMask(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    deviceMask);

    // Provided by VK_KHR_device_group
    // Equivalent to vkCmdSetDeviceMask
    void vkCmdSetDeviceMaskKHR(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    deviceMask);

- `commandBuffer` is command buffer whose current device mask is modified.

- `deviceMask` is the new value of the current device mask.

`deviceMask` is used to filter out subsequent commands from executing on all physical devices whose bit indices are not set in the mask, except commands beginning a render pass instance, commands transitioning to the next subpass in the render pass instance, and commands ending a render pass instance, which always execute on the set of physical devices whose bit indices are included in the `deviceMask` member of the VkDeviceGroupRenderPassBeginInfo structure passed to the command beginning the corresponding render pass instance.

Valid Usage

- VUID-vkCmdSetDeviceMask-deviceMask-00108
  `deviceMask` must be a valid device mask value

- VUID-vkCmdSetDeviceMask-deviceMask-00109
  `deviceMask` must not be zero

- VUID-vkCmdSetDeviceMask-deviceMask-00110
  `deviceMask` must not include any set bits that were not in the VkDeviceGroupCommandBufferBeginInfo::`deviceMask` value when the command buffer began recording

- VUID-vkCmdSetDeviceMask-deviceMask-00111
  If `vkCmdSetDeviceMask` is called inside a render pass instance, `deviceMask` must not include any set bits that were not in the VkDeviceGroupRenderPassBeginInfo::`deviceMask` value when the render pass instance began recording

Valid Usage (Implicit)

- VUID-vkCmdSetDeviceMask-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetDeviceMask-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetDeviceMask-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, VK_QUEUE_GRAPHICS_BIT, or VK_QUEUE_TRANSFER_BIT operations

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Both | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT VK_QUEUE_TRANSFER_BIT | State

Conditional Rendering

vkCmdSetDeviceMask is not affected by conditional rendering

## 7. Synchronization and Cache Control

Synchronization of access to resources is primarily the responsibility of the application in Vulkan. The order of execution of commands with respect to the host and other commands on the device has few implicit guarantees, and needs to be explicitly specified. Memory caches and other optimizations are also explicitly managed, requiring that the flow of data through the system is largely under application control.

Whilst some implicit guarantees exist between commands, five explicit synchronization mechanisms are exposed by Vulkan:

Fences

  Fences can be used to communicate to the host that execution of some task on the device has completed, controlling resource access between host and device.

Semaphores

  Semaphores can be used to control resource access across multiple queues.

Events

  Events provide a fine-grained synchronization primitive which can be signaled either within a command buffer or by the host, and can be waited upon within a command buffer or queried on the host. Events can be used to control resource access within a single queue.

Pipeline Barriers

  Pipeline barriers also provide synchronization control within a command buffer, but at a single point, rather than with separate signal and wait operations. Pipeline barriers can be used to control resource access within a single queue.

Render Pass Objects

  Render pass objects provide a synchronization framework for rendering tasks, built upon the concepts in this chapter. Many cases that would otherwise need an application to use other synchronization primitives can be expressed more efficiently as part of a render pass. Render pass objects can be used to control resource access within a single queue.

### 7.1. Execution and Memory Dependencies

An operation is an arbitrary amount of work to be executed on the host, a device, or an external entity such as a presentation engine. Synchronization commands introduce explicit execution dependencies, and memory dependencies between two sets of operations defined by the command’s two synchronization scopes.

The synchronization scopes define which other operations a synchronization command is able to create execution dependencies with. Any type of operation that is not in a synchronization command’s synchronization scopes will not be included in the resulting dependency. For example, for many synchronization commands, the synchronization scopes can be limited to just operations executing in specific pipeline stages, which allows other pipeline stages to be excluded from a dependency. Other scoping options are possible, depending on the particular command.

An execution dependency is a guarantee that for two sets of operations, the first set must happen-before the second set. If an operation happens-before another operation, then the first operation must complete before the second operation is initiated. More precisely:

- Let Ops1 and Ops2 be separate sets of operations.

- Let Sync be a synchronization command.

- Let Scope1st and Scope2nd be the synchronization scopes of Sync.

- Let ScopedOps1 be the intersection of sets Ops1 and Scope1st.

- Let ScopedOps2 be the intersection of sets Ops2 and Scope2nd.

- Submitting Ops1, Sync and Ops2 for execution, in that order, will result in execution dependency ExeDep between ScopedOps1 and ScopedOps2.

- Execution dependency ExeDep guarantees that ScopedOps1 happen-before ScopedOps2.

An execution dependency chain is a sequence of execution dependencies that form a happens-before relation between the first dependency’s ScopedOps1 and the final dependency’s ScopedOps2. For each consecutive pair of execution dependencies, a chain exists if the intersection of Scope2nd in the first dependency and Scope1st in the second dependency is not an empty set. The formation of a single execution dependency from an execution dependency chain can be described by substituting the following in the description of execution dependencies:

- Let Sync be a set of synchronization commands that generate an execution dependency chain.

- Let Scope1st be the first synchronization scope of the first command in Sync.

- Let Scope2nd be the second synchronization scope of the last command in Sync.

Execution dependencies alone are not sufficient to guarantee that values resulting from writes in one set of operations can be read from another set of operations.

Three additional types of operations are used to control memory access. Availability operations cause the values generated by specified memory write accesses to become available to a memory domain for future access. Any available value remains available until a subsequent write to the same memory location occurs (whether it is made available or not) or the memory is freed. Memory domain operations cause writes that are available to a source memory domain to become available to a destination memory domain (an example of this is making writes available to the host domain available to the device domain). Visibility operations cause values available to a memory domain to become visible to specified memory accesses.

Availability, visibility, memory domains, and memory domain operations are formally defined in the Availability and Visibility section of the Memory Model chapter. Which API operations perform each of these operations is defined in Availability, Visibility, and Domain Operations.

A memory dependency is an execution dependency which includes availability and visibility operations such that:

- The first set of operations happens-before the availability operation.

- The availability operation happens-before the visibility operation.

- The visibility operation happens-before the second set of operations.

Once written values are made visible to a particular type of memory access, they can be read or written by that type of memory access. Most synchronization commands in Vulkan define a memory dependency.

The specific memory accesses that are made available and visible are defined by the access scopes of a memory dependency. Any type of access that is in a memory dependency’s first access scope and occurs in ScopedOps1 is made available. Any type of access that is in a memory dependency’s second access scope and occurs in ScopedOps2 has any available writes made visible to it. Any type of operation that is not in a synchronization command’s access scopes will not be included in the resulting dependency.

A memory dependency enforces availability and visibility of memory accesses and execution order between two sets of operations. Adding to the description of execution dependency chains:

- Let MemOps1 be the set of memory accesses performed by ScopedOps1.

- Let MemOps2 be the set of memory accesses performed by ScopedOps2.

- Let AccessScope1st be the first access scope of the first command in the Sync chain.

- Let AccessScope2nd be the second access scope of the last command in the Sync chain.

- Let ScopedMemOps1 be the intersection of sets MemOps1 and AccessScope1st.

- Let ScopedMemOps2 be the intersection of sets MemOps2 and AccessScope2nd.

- Submitting Ops1, Sync, and Ops2 for execution, in that order, will result in a memory dependency MemDep between ScopedOps1 and ScopedOps2.

- Memory dependency MemDep guarantees that:

  - Memory writes in ScopedMemOps1 are made available.

  - Available memory writes, including those from ScopedMemOps1, are made visible to ScopedMemOps2.

Note | Execution and memory dependencies are used to solve data hazards, i.e. to ensure that read and write operations occur in a well-defined order. Write-after-read hazards can be solved with just an execution dependency, but read-after-write and write-after-write hazards need appropriate memory dependencies to be included between them. If an application does not include dependencies to solve these hazards, it results in a data race.

#### 7.1.1. Image Layout Transitions

Image subresources can be transitioned from one layout to another as part of a memory dependency (e.g. by using an image memory barrier). When a layout transition is specified in a memory dependency, it happens-after the availability operations in the memory dependency, and happens-before the visibility operations. Image layout transitions may perform read and write accesses on all memory bound to the image subresource range, so applications must ensure that all memory writes have been made available before a layout transition is executed. Available memory is automatically made visible to a layout transition, and writes performed by a layout transition are automatically made available.

Layout transitions always apply to a particular image subresource range, and specify both an old layout and new layout. The old layout must either be VK_IMAGE_LAYOUT_UNDEFINED, or match the current layout of the image subresource range. If the old layout matches the current layout of the image subresource range, the transition preserves the contents of that range. If the old layout is VK_IMAGE_LAYOUT_UNDEFINED, the contents of that range may be discarded.

Note | Image layout transitions with VK_IMAGE_LAYOUT_UNDEFINED allow the implementation to discard the image subresource range, which can provide performance or power benefits. Tile-based architectures may be able to avoid flushing tile data to memory, and immediate style renderers may be able to achieve fast metadata clears to reinitialize frame buffer compression state, or similar. If the contents of an attachment are not needed after a render pass completes, then applications should use VK_ATTACHMENT_STORE_OP_DONT_CARE.

As image layout transitions may perform read and write accesses on the memory bound to the image, if the image subresource affected by the layout transition is bound to peer memory for any device in the current device mask then the memory heap the bound memory comes from must support the VK_PEER_MEMORY_FEATURE_GENERIC_SRC_BIT and VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT capabilities as returned by vkGetDeviceGroupPeerMemoryFeatures.

Note | Applications must ensure that layout transitions happen-after all operations accessing the image with the old layout, and happen-before any operations that will access the image with the new layout. Layout transitions are potentially read/write operations, so not defining appropriate memory dependencies to guarantee this will result in a data race.

Image layout transitions interact with memory aliasing.

Layout transitions that are performed via image memory barriers execute in their entirety in submission order, relative to other image layout transitions submitted to the same queue, including those performed by render passes. This ordering of image layout transitions only applies if the implementation performs actual read/write operations during the transition. An application must not rely on ordering of image layout transitions to influence ordering of other commands.

The image layout of each image subresource of a depth/stencil image created with VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT is dependent on the last sample locations used to render to the image subresource as a depth/stencil attachment, thus when the `image` member of an image memory barrier is an image created with this flag the application can chain a VkSampleLocationsInfoEXT structure to the `pNext` chain of VkImageMemoryBarrier2 or VkImageMemoryBarrier to specify the sample locations to use during any image layout transition.

If the `VkSampleLocationsInfoEXT` structure does not match the sample location state last used to render to the image subresource range specified by `subresourceRange`, or if no `VkSampleLocationsInfoEXT` structure is present, then the contents of the given image subresource range becomes undefined as if `oldLayout` would equal VK_IMAGE_LAYOUT_UNDEFINED.

#### 7.1.2. Pipeline Stages

The work performed by an action command consists of multiple operations, which are performed as a sequence of logically independent steps known as pipeline stages. The exact pipeline stages executed depend on the particular command that is used, and current command buffer state when the command was recorded.

Note | Operations performed by synchronization commands (e.g. availability and visibility operations) are not executed by a defined pipeline stage. However other commands can still synchronize with them by using the synchronization scopes to create a dependency chain.

Execution of operations across pipeline stages must adhere to implicit ordering guarantees, particularly including pipeline stage order. Otherwise, execution across pipeline stages may overlap or execute out of order with regards to other stages, unless otherwise enforced by an execution dependency.

Several of the synchronization commands include pipeline stage parameters, restricting the synchronization scopes for that command to just those stages. This allows fine grained control over the exact execution dependencies and accesses performed by action commands. Implementations should use these pipeline stages to avoid unnecessary stalls or cache flushing.

Bits which can be set in a VkPipelineStageFlags2 mask, specifying stages of execution, are:

    // Provided by VK_VERSION_1_3
    // Flag bits for VkPipelineStageFlagBits2
    typedef VkFlags64 VkPipelineStageFlagBits2;
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_NONE = 0ULL;
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_TOP_OF_PIPE_BIT = 0x00000001ULL;
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_DRAW_INDIRECT_BIT = 0x00000002ULL;
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_VERTEX_INPUT_BIT = 0x00000004ULL;
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_VERTEX_SHADER_BIT = 0x00000008ULL;
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT = 0x00000010ULL;
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT = 0x00000020ULL;
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_GEOMETRY_SHADER_BIT = 0x00000040ULL;
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT = 0x00000080ULL;
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_EARLY_FRAGMENT_TESTS_BIT = 0x00000100ULL;
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT = 0x00000200ULL;
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT = 0x00000400ULL;
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT = 0x00000800ULL;
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_ALL_TRANSFER_BIT = 0x00001000ULL;
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_TRANSFER_BIT = 0x00001000ULL;
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_BOTTOM_OF_PIPE_BIT = 0x00002000ULL;
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_HOST_BIT = 0x00004000ULL;
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT = 0x00008000ULL;
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT = 0x00010000ULL;
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_COPY_BIT = 0x100000000ULL;
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_RESOLVE_BIT = 0x200000000ULL;
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_BLIT_BIT = 0x400000000ULL;
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_CLEAR_BIT = 0x800000000ULL;
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_INDEX_INPUT_BIT = 0x1000000000ULL;
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_VERTEX_ATTRIBUTE_INPUT_BIT = 0x2000000000ULL;
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_PRE_RASTERIZATION_SHADERS_BIT = 0x4000000000ULL;
    // Provided by VK_KHR_video_decode_queue
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_VIDEO_DECODE_BIT_KHR = 0x04000000ULL;
    // Provided by VK_KHR_video_encode_queue
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_VIDEO_ENCODE_BIT_KHR = 0x08000000ULL;
    // Provided by VK_KHR_synchronization2
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_NONE_KHR = 0ULL;
    // Provided by VK_KHR_synchronization2
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_TOP_OF_PIPE_BIT_KHR = 0x00000001ULL;
    // Provided by VK_KHR_synchronization2
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_DRAW_INDIRECT_BIT_KHR = 0x00000002ULL;
    // Provided by VK_KHR_synchronization2
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_VERTEX_INPUT_BIT_KHR = 0x00000004ULL;
    // Provided by VK_KHR_synchronization2
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_VERTEX_SHADER_BIT_KHR = 0x00000008ULL;
    // Provided by VK_KHR_synchronization2
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT_KHR = 0x00000010ULL;
    // Provided by VK_KHR_synchronization2
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT_KHR = 0x00000020ULL;
    // Provided by VK_KHR_synchronization2
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_GEOMETRY_SHADER_BIT_KHR = 0x00000040ULL;
    // Provided by VK_KHR_synchronization2
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT_KHR = 0x00000080ULL;
    // Provided by VK_KHR_synchronization2
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_EARLY_FRAGMENT_TESTS_BIT_KHR = 0x00000100ULL;
    // Provided by VK_KHR_synchronization2
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT_KHR = 0x00000200ULL;
    // Provided by VK_KHR_synchronization2
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT_KHR = 0x00000400ULL;
    // Provided by VK_KHR_synchronization2
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT_KHR = 0x00000800ULL;
    // Provided by VK_KHR_synchronization2
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_ALL_TRANSFER_BIT_KHR = 0x00001000ULL;
    // Provided by VK_KHR_synchronization2
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_TRANSFER_BIT_KHR = 0x00001000ULL;
    // Provided by VK_KHR_synchronization2
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_BOTTOM_OF_PIPE_BIT_KHR = 0x00002000ULL;
    // Provided by VK_KHR_synchronization2
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_HOST_BIT_KHR = 0x00004000ULL;
    // Provided by VK_KHR_synchronization2
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT_KHR = 0x00008000ULL;
    // Provided by VK_KHR_synchronization2
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT_KHR = 0x00010000ULL;
    // Provided by VK_KHR_synchronization2
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_COPY_BIT_KHR = 0x100000000ULL;
    // Provided by VK_KHR_synchronization2
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_RESOLVE_BIT_KHR = 0x200000000ULL;
    // Provided by VK_KHR_synchronization2
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_BLIT_BIT_KHR = 0x400000000ULL;
    // Provided by VK_KHR_synchronization2
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_CLEAR_BIT_KHR = 0x800000000ULL;
    // Provided by VK_KHR_synchronization2
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_INDEX_INPUT_BIT_KHR = 0x1000000000ULL;
    // Provided by VK_KHR_synchronization2
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_VERTEX_ATTRIBUTE_INPUT_BIT_KHR = 0x2000000000ULL;
    // Provided by VK_KHR_synchronization2
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_PRE_RASTERIZATION_SHADERS_BIT_KHR = 0x4000000000ULL;
    // Provided by VK_KHR_synchronization2 with VK_EXT_transform_feedback
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT = 0x01000000ULL;
    // Provided by VK_KHR_synchronization2 with VK_EXT_conditional_rendering
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_CONDITIONAL_RENDERING_BIT_EXT = 0x00040000ULL;
    // Provided by VK_KHR_synchronization2 with VK_NV_device_generated_commands
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_COMMAND_PREPROCESS_BIT_NV = 0x00020000ULL;
    // Provided by VK_KHR_synchronization2 with VK_EXT_device_generated_commands
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_COMMAND_PREPROCESS_BIT_EXT = 0x00020000ULL;
    // Provided by VK_KHR_fragment_shading_rate with VK_KHR_synchronization2
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = 0x00400000ULL;
    // Provided by VK_KHR_synchronization2 with VK_NV_shading_rate_image
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_SHADING_RATE_IMAGE_BIT_NV = 0x00400000ULL;
    // Provided by VK_KHR_acceleration_structure with VK_KHR_synchronization2
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR = 0x02000000ULL;
    // Provided by VK_KHR_ray_tracing_pipeline with VK_KHR_synchronization2
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR = 0x00200000ULL;
    // Provided by VK_KHR_synchronization2 with VK_NV_ray_tracing
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_NV = 0x00200000ULL;
    // Provided by VK_KHR_synchronization2 with VK_NV_ray_tracing
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_NV = 0x02000000ULL;
    // Provided by VK_KHR_synchronization2 with VK_EXT_fragment_density_map
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_FRAGMENT_DENSITY_PROCESS_BIT_EXT = 0x00800000ULL;
    // Provided by VK_KHR_synchronization2 with VK_NV_mesh_shader
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_TASK_SHADER_BIT_NV = 0x00080000ULL;
    // Provided by VK_KHR_synchronization2 with VK_NV_mesh_shader
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_MESH_SHADER_BIT_NV = 0x00100000ULL;
    // Provided by VK_KHR_synchronization2 with VK_EXT_mesh_shader
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_TASK_SHADER_BIT_EXT = 0x00080000ULL;
    // Provided by VK_KHR_synchronization2 with VK_EXT_mesh_shader
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_MESH_SHADER_BIT_EXT = 0x00100000ULL;
    // Provided by VK_HUAWEI_subpass_shading
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_SUBPASS_SHADER_BIT_HUAWEI = 0x8000000000ULL;
    // Provided by VK_HUAWEI_subpass_shading
    // VK_PIPELINE_STAGE_2_SUBPASS_SHADING_BIT_HUAWEI is a legacy alias
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_SUBPASS_SHADING_BIT_HUAWEI = 0x8000000000ULL;
    // Provided by VK_HUAWEI_invocation_mask
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_INVOCATION_MASK_BIT_HUAWEI = 0x10000000000ULL;
    // Provided by VK_KHR_ray_tracing_maintenance1 with VK_KHR_synchronization2 or VK_VERSION_1_3
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR = 0x10000000ULL;
    // Provided by VK_EXT_opacity_micromap
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT = 0x40000000ULL;
    // Provided by VK_HUAWEI_cluster_culling_shader
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_CLUSTER_CULLING_SHADER_BIT_HUAWEI = 0x20000000000ULL;
    // Provided by VK_NV_optical_flow
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_OPTICAL_FLOW_BIT_NV = 0x20000000ULL;
    // Provided by VK_NV_cooperative_vector
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_CONVERT_COOPERATIVE_VECTOR_MATRIX_BIT_NV = 0x100000000000ULL;
    // Provided by VK_ARM_data_graph
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_DATA_GRAPH_BIT_ARM = 0x40000000000ULL;
    // Provided by VK_KHR_copy_memory_indirect
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_COPY_INDIRECT_BIT_KHR = 0x400000000000ULL;
    // Provided by VK_EXT_memory_decompression
    static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_MEMORY_DECOMPRESSION_BIT_EXT = 0x200000000000ULL;

    // Provided by VK_KHR_synchronization2
    // Equivalent to VkPipelineStageFlagBits2
    typedef VkPipelineStageFlagBits2 VkPipelineStageFlagBits2KHR;

- VK_PIPELINE_STAGE_2_NONE specifies no stages of execution.

- VK_PIPELINE_STAGE_2_DRAW_INDIRECT_BIT specifies the stage of the pipeline where indirect command parameters are consumed. This stage also includes reading commands written by vkCmdPreprocessGeneratedCommandsNV. This stage also includes reading commands written by vkCmdPreprocessGeneratedCommandsEXT.

- VK_PIPELINE_STAGE_2_TASK_SHADER_BIT_EXT specifies the task shader stage.

- VK_PIPELINE_STAGE_2_MESH_SHADER_BIT_EXT specifies the mesh shader stage.

- VK_PIPELINE_STAGE_2_INDEX_INPUT_BIT specifies the stage of the pipeline where index buffers are consumed.

- VK_PIPELINE_STAGE_2_VERTEX_ATTRIBUTE_INPUT_BIT specifies the stage of the pipeline where vertex buffers are consumed.

- VK_PIPELINE_STAGE_2_VERTEX_INPUT_BIT is equivalent to the logical OR of:

  - VK_PIPELINE_STAGE_2_INDEX_INPUT_BIT

  - VK_PIPELINE_STAGE_2_VERTEX_ATTRIBUTE_INPUT_BIT

- VK_PIPELINE_STAGE_2_VERTEX_SHADER_BIT specifies the vertex shader stage.

- VK_PIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT specifies the tessellation control shader stage.

- VK_PIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT specifies the tessellation evaluation shader stage.

- VK_PIPELINE_STAGE_2_GEOMETRY_SHADER_BIT specifies the geometry shader stage.

- VK_PIPELINE_STAGE_2_PRE_RASTERIZATION_SHADERS_BIT is equivalent to specifying all supported pre-rasterization shader stages:

  - VK_PIPELINE_STAGE_2_VERTEX_SHADER_BIT

  - VK_PIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT

  - VK_PIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT

  - VK_PIPELINE_STAGE_2_GEOMETRY_SHADER_BIT

  - VK_PIPELINE_STAGE_2_TASK_SHADER_BIT_EXT

  - VK_PIPELINE_STAGE_2_MESH_SHADER_BIT_EXT

  - VK_PIPELINE_STAGE_2_CLUSTER_CULLING_SHADER_BIT_HUAWEI

- VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT specifies the fragment shader stage.

- VK_PIPELINE_STAGE_2_EARLY_FRAGMENT_TESTS_BIT specifies the stage of the pipeline where early fragment tests (depth and stencil tests before fragment shading) are performed. This stage also includes render pass load operations for framebuffer attachments with a depth/stencil format.

- VK_PIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT specifies the stage of the pipeline where late fragment tests (depth and stencil tests after fragment shading) are performed. This stage also includes render pass store operations for framebuffer attachments with a depth/stencil format.

- VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT specifies the stage of the pipeline where final color values are output from the pipeline. This stage includes blending, logic operations, render pass load and store operations for color attachments, render pass multisample resolve operations, and vkCmdClearAttachments.

- VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT specifies the compute shader stage.

- VK_PIPELINE_STAGE_2_HOST_BIT specifies a pseudo-stage indicating execution on the host of reads/writes of device memory. This stage is not invoked by any commands recorded in a command buffer.

- VK_PIPELINE_STAGE_2_COPY_BIT specifies the execution of all copy commands, including vkCmdCopyQueryPoolResults.

- VK_PIPELINE_STAGE_2_BLIT_BIT specifies the execution of vkCmdBlitImage.

- VK_PIPELINE_STAGE_2_RESOLVE_BIT specifies the execution of vkCmdResolveImage.

- VK_PIPELINE_STAGE_2_CLEAR_BIT specifies the execution of clear commands, with the exception of vkCmdClearAttachments.

- VK_PIPELINE_STAGE_2_ALL_TRANSFER_BIT is equivalent to specifying all of:

  - VK_PIPELINE_STAGE_2_COPY_BIT

  - VK_PIPELINE_STAGE_2_BLIT_BIT

  - VK_PIPELINE_STAGE_2_RESOLVE_BIT

  - VK_PIPELINE_STAGE_2_CLEAR_BIT

  - VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR

- VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR specifies the execution of the ray tracing shader stages.

- VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR specifies the execution of acceleration structure commands or acceleration structure copy commands.

- VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR specifies the execution of acceleration structure copy commands.

- VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT specifies the execution of all graphics pipeline stages, and is equivalent to the logical OR of:

  - VK_PIPELINE_STAGE_2_DRAW_INDIRECT_BIT

  - VK_PIPELINE_STAGE_2_COPY_INDIRECT_BIT_KHR

  - VK_PIPELINE_STAGE_2_TASK_SHADER_BIT_EXT

  - VK_PIPELINE_STAGE_2_MESH_SHADER_BIT_EXT

  - VK_PIPELINE_STAGE_2_VERTEX_INPUT_BIT

  - VK_PIPELINE_STAGE_2_VERTEX_SHADER_BIT

  - VK_PIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT

  - VK_PIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT

  - VK_PIPELINE_STAGE_2_GEOMETRY_SHADER_BIT

  - VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT

  - VK_PIPELINE_STAGE_2_EARLY_FRAGMENT_TESTS_BIT

  - VK_PIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT

  - VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT

  - VK_PIPELINE_STAGE_2_CONDITIONAL_RENDERING_BIT_EXT

  - VK_PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT

  - VK_PIPELINE_STAGE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

  - VK_PIPELINE_STAGE_2_FRAGMENT_DENSITY_PROCESS_BIT_EXT

  - VK_PIPELINE_STAGE_2_SUBPASS_SHADER_BIT_HUAWEI

  - VK_PIPELINE_STAGE_2_INVOCATION_MASK_BIT_HUAWEI

  - VK_PIPELINE_STAGE_2_CLUSTER_CULLING_SHADER_BIT_HUAWEI

- VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT specifies all operations performed by all commands supported on the queue it is used with.

- VK_PIPELINE_STAGE_2_CONDITIONAL_RENDERING_BIT_EXT specifies the stage of the pipeline where the predicate of conditional rendering is consumed.

- VK_PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT specifies the stage of the pipeline where vertex attribute output values are written to the transform feedback buffers.

- VK_PIPELINE_STAGE_2_COMMAND_PREPROCESS_BIT_NV specifies the stage of the pipeline where device-side generation of commands via vkCmdPreprocessGeneratedCommandsNV is handled.

- VK_PIPELINE_STAGE_2_COMMAND_PREPROCESS_BIT_EXT specifies the stage of the pipeline where device-side generation of commands via vkCmdPreprocessGeneratedCommandsEXT is handled.

- VK_PIPELINE_STAGE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR specifies the stage of the pipeline where the fragment shading rate attachment or shading rate image is read to determine the fragment shading rate for portions of a rasterized primitive.

- VK_PIPELINE_STAGE_2_FRAGMENT_DENSITY_PROCESS_BIT_EXT specifies the stage of the pipeline where the fragment density map is read to generate the fragment areas.

- VK_PIPELINE_STAGE_2_INVOCATION_MASK_BIT_HUAWEI specifies the stage of the pipeline where the invocation mask image is read by the implementation to optimize the ray dispatch.

- VK_PIPELINE_STAGE_2_VIDEO_DECODE_BIT_KHR specifies the execution of video decode operations.

- VK_PIPELINE_STAGE_2_VIDEO_ENCODE_BIT_KHR specifies the execution of video encode operations.

- VK_PIPELINE_STAGE_2_OPTICAL_FLOW_BIT_NV specifies the stage of the pipeline where optical flow operation are performed.

- VK_PIPELINE_STAGE_2_SUBPASS_SHADER_BIT_HUAWEI specifies the subpass shading shader stage.

- VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT specifies the execution of micromap commands for VkMicromapEXT objects.

- VK_PIPELINE_STAGE_2_CLUSTER_CULLING_SHADER_BIT_HUAWEI specifies the cluster culling shader stage.

- VK_PIPELINE_STAGE_2_CONVERT_COOPERATIVE_VECTOR_MATRIX_BIT_NV specifies the execution of vkCmdConvertCooperativeVectorMatrixNV.

- VK_PIPELINE_STAGE_2_COPY_INDIRECT_BIT_KHR specifies the stage of the pipeline where indirect copy commands (vkCmdCopyMemoryIndirect* and vkCmdCopyMemoryToImageIndirect*) parameters are consumed.

- VK_PIPELINE_STAGE_2_TOP_OF_PIPE_BIT is equivalent to VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT with VkAccessFlags2 set to `0` when specified in the second synchronization scope, but equivalent to VK_PIPELINE_STAGE_2_NONE in the first scope.

- VK_PIPELINE_STAGE_2_BOTTOM_OF_PIPE_BIT is equivalent to VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT with VkAccessFlags2 set to `0` when specified in the first synchronization scope, but equivalent to VK_PIPELINE_STAGE_2_NONE in the second scope.

Note | The `TOP` and `BOTTOM` pipeline stages are legacy, and applications should prefer VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT and VK_PIPELINE_STAGE_2_NONE.

Note | The `VkPipelineStageFlags2` bitmask goes beyond the 31 individual bit flags allowable within a C99 enum, which is how VkPipelineStageFlagBits is defined. The first 31 values are common to both, and are interchangeable.

`VkPipelineStageFlags2` is a bitmask type for setting a mask of zero or more VkPipelineStageFlagBits2 flags:

    // Provided by VK_VERSION_1_3
    typedef VkFlags64 VkPipelineStageFlags2;

    // Provided by VK_KHR_synchronization2
    // Equivalent to VkPipelineStageFlags2
    typedef VkPipelineStageFlags2 VkPipelineStageFlags2KHR;

Bits which can be set in a VkPipelineStageFlags mask, specifying stages of execution, are:

Warning | This functionality is superseded by VkPipelineStageFlagBits2. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_0
    typedef enum VkPipelineStageFlagBits {
        VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT = 0x00000001,
        VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT = 0x00000002,
        VK_PIPELINE_STAGE_VERTEX_INPUT_BIT = 0x00000004,
        VK_PIPELINE_STAGE_VERTEX_SHADER_BIT = 0x00000008,
        VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT = 0x00000010,
        VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT = 0x00000020,
        VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT = 0x00000040,
        VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT = 0x00000080,
        VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT = 0x00000100,
        VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT = 0x00000200,
        VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT = 0x00000400,
        VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT = 0x00000800,
        VK_PIPELINE_STAGE_TRANSFER_BIT = 0x00001000,
        VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT = 0x00002000,
        VK_PIPELINE_STAGE_HOST_BIT = 0x00004000,
        VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT = 0x00008000,
        VK_PIPELINE_STAGE_ALL_COMMANDS_BIT = 0x00010000,
      // Provided by VK_VERSION_1_3
        VK_PIPELINE_STAGE_NONE = 0,
      // Provided by VK_EXT_transform_feedback
        VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT = 0x01000000,
      // Provided by VK_EXT_conditional_rendering
        VK_PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT = 0x00040000,
      // Provided by VK_KHR_acceleration_structure
        VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR = 0x02000000,
      // Provided by VK_KHR_ray_tracing_pipeline
        VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_KHR = 0x00200000,
      // Provided by VK_EXT_fragment_density_map
        VK_PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT = 0x00800000,
      // Provided by VK_KHR_fragment_shading_rate
        VK_PIPELINE_STAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = 0x00400000,
      // Provided by VK_EXT_mesh_shader
        VK_PIPELINE_STAGE_TASK_SHADER_BIT_EXT = 0x00080000,
      // Provided by VK_EXT_mesh_shader
        VK_PIPELINE_STAGE_MESH_SHADER_BIT_EXT = 0x00100000,
      // Provided by VK_EXT_device_generated_commands
        VK_PIPELINE_STAGE_COMMAND_PREPROCESS_BIT_EXT = 0x00020000,
      // Provided by VK_NV_shading_rate_image
        VK_PIPELINE_STAGE_SHADING_RATE_IMAGE_BIT_NV = VK_PIPELINE_STAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR,
      // Provided by VK_NV_ray_tracing
        VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_NV = VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_KHR,
      // Provided by VK_NV_ray_tracing
        VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_NV = VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR,
      // Provided by VK_NV_mesh_shader
        VK_PIPELINE_STAGE_TASK_SHADER_BIT_NV = VK_PIPELINE_STAGE_TASK_SHADER_BIT_EXT,
      // Provided by VK_NV_mesh_shader
        VK_PIPELINE_STAGE_MESH_SHADER_BIT_NV = VK_PIPELINE_STAGE_MESH_SHADER_BIT_EXT,
      // Provided by VK_NV_device_generated_commands
        VK_PIPELINE_STAGE_COMMAND_PREPROCESS_BIT_NV = VK_PIPELINE_STAGE_COMMAND_PREPROCESS_BIT_EXT,
      // Provided by VK_KHR_synchronization2
        VK_PIPELINE_STAGE_NONE_KHR = VK_PIPELINE_STAGE_NONE,
    } VkPipelineStageFlagBits;

These values all have the same meaning as the equivalently named values for VkPipelineStageFlags2.

- VK_PIPELINE_STAGE_NONE specifies no stages of execution.

- VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT specifies the stage of the pipeline where `VkDrawIndirect*` / `VkDispatchIndirect*` / `VkTraceRaysIndirect*` data structures are consumed. This stage also includes reading commands written by vkCmdExecuteGeneratedCommandsNV. This stage also includes reading commands written by vkCmdExecuteGeneratedCommandsEXT.

- VK_PIPELINE_STAGE_TASK_SHADER_BIT_EXT specifies the task shader stage.

- VK_PIPELINE_STAGE_MESH_SHADER_BIT_EXT specifies the mesh shader stage.

- VK_PIPELINE_STAGE_VERTEX_INPUT_BIT specifies the stage of the pipeline where vertex and index buffers are consumed.

- VK_PIPELINE_STAGE_VERTEX_SHADER_BIT specifies the vertex shader stage.

- VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT specifies the tessellation control shader stage.

- VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT specifies the tessellation evaluation shader stage.

- VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT specifies the geometry shader stage.

- VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT specifies the fragment shader stage.

- VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT specifies the stage of the pipeline where early fragment tests (depth and stencil tests before fragment shading) are performed. This stage also includes render pass load operations for framebuffer attachments with a depth/stencil format.

- VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT specifies the stage of the pipeline where late fragment tests (depth and stencil tests after fragment shading) are performed. This stage also includes render pass store operations for framebuffer attachments with a depth/stencil format.

- VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT specifies the stage of the pipeline after blending where the final color values are output from the pipeline. This stage includes blending, logic operations, render pass load and store operations for color attachments, render pass multisample resolve operations, and vkCmdClearAttachments.

- VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT specifies the execution of a compute shader.

- VK_PIPELINE_STAGE_TRANSFER_BIT specifies the following commands:

  - All copy commands, including vkCmdCopyQueryPoolResults

  - vkCmdBlitImage2 and vkCmdBlitImage

  - vkCmdResolveImage2 and vkCmdResolveImage

  - All clear commands, with the exception of vkCmdClearAttachments

- VK_PIPELINE_STAGE_HOST_BIT specifies a pseudo-stage indicating execution on the host of reads/writes of device memory. This stage is not invoked by any commands recorded in a command buffer.

- VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR specifies the execution of vkCmdBuildAccelerationStructureNV, vkCmdCopyAccelerationStructureNV, vkCmdWriteAccelerationStructuresPropertiesNV , vkCmdBuildAccelerationStructuresKHR, vkCmdBuildAccelerationStructuresIndirectKHR, vkCmdCopyAccelerationStructureKHR, vkCmdCopyAccelerationStructureToMemoryKHR, vkCmdCopyMemoryToAccelerationStructureKHR, and vkCmdWriteAccelerationStructuresPropertiesKHR.

- VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_KHR specifies the execution of the ray tracing shader stages, via vkCmdTraceRaysNV , vkCmdTraceRaysKHR, or vkCmdTraceRaysIndirectKHR

- VK_PIPELINE_STAGE_2_MEMORY_DECOMPRESSION_BIT_EXT specifies the execution of decompression commands with vkCmdDecompressMemoryEXT and vkCmdDecompressMemoryIndirectCountEXT.

- VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT specifies the execution of all graphics pipeline stages, and is equivalent to the logical OR of:

  - VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT

  - VK_PIPELINE_STAGE_TASK_SHADER_BIT_EXT

  - VK_PIPELINE_STAGE_MESH_SHADER_BIT_EXT

  - VK_PIPELINE_STAGE_VERTEX_INPUT_BIT

  - VK_PIPELINE_STAGE_VERTEX_SHADER_BIT

  - VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT

  - VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT

  - VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT

  - VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT

  - VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT

  - VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT

  - VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT

  - VK_PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT

  - VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT

  - VK_PIPELINE_STAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

  - VK_PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT

- VK_PIPELINE_STAGE_ALL_COMMANDS_BIT specifies all operations performed by all commands supported on the queue it is used with.

- VK_PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT specifies the stage of the pipeline where the predicate of conditional rendering is consumed.

- VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT specifies the stage of the pipeline where vertex attribute output values are written to the transform feedback buffers.

- VK_PIPELINE_STAGE_COMMAND_PREPROCESS_BIT_NV specifies the stage of the pipeline where device-side preprocessing for generated commands via vkCmdPreprocessGeneratedCommandsNV is handled.

- VK_PIPELINE_STAGE_COMMAND_PREPROCESS_BIT_EXT specifies the stage of the pipeline where device-side preprocessing for generated commands via vkCmdPreprocessGeneratedCommandsEXT is handled.

- VK_PIPELINE_STAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR specifies the stage of the pipeline where the fragment shading rate attachment or shading rate image is read to determine the fragment shading rate for portions of a rasterized primitive.

- VK_PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT specifies the stage of the pipeline where the fragment density map is read to generate the fragment areas.

- VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT is equivalent to VK_PIPELINE_STAGE_ALL_COMMANDS_BIT with VkAccessFlags set to `0` when specified in the second synchronization scope, but specifies no stage of execution when specified in the first scope.

- VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT is equivalent to VK_PIPELINE_STAGE_ALL_COMMANDS_BIT with VkAccessFlags set to `0` when specified in the first synchronization scope, but specifies no stage of execution when specified in the second scope.

Warning | This functionality is superseded by VkPipelineStageFlags2. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_0
    typedef VkFlags VkPipelineStageFlags;

`VkPipelineStageFlags` is a bitmask type for setting a mask of zero or more VkPipelineStageFlagBits.

If a synchronization command includes a source stage mask, its first synchronization scope only includes execution of the pipeline stages specified in that mask and any logically earlier stages. Its first access scope only includes memory accesses performed by pipeline stages explicitly specified in the source stage mask.

If a synchronization command includes a destination stage mask, its second synchronization scope only includes execution of the pipeline stages specified in that mask and any logically later stages. Its second access scope only includes memory accesses performed by pipeline stages explicitly specified in the destination stage mask.

Note | Note that access scopes do not interact with the logically earlier or later stages for either scope - only the stages the application specifies are considered part of each access scope.

Certain pipeline stages are only available on queues that support a particular set of operations. The following table lists, for each pipeline stage flag, which queue capability flag must be supported by the queue. When multiple flags are enumerated in the second column of the table, it means that the pipeline stage is supported on the queue if it supports any of the listed capability flags. For further details on queue capabilities see Physical Device Enumeration and Queues.

Table 3. Supported Pipeline Stage Flags
Pipeline stage flag | Required queue capability flag
--- | ---
VK_PIPELINE_STAGE_2_NONE | None required
VK_PIPELINE_STAGE_2_TOP_OF_PIPE_BIT | None required
VK_PIPELINE_STAGE_2_DRAW_INDIRECT_BIT | VK_QUEUE_GRAPHICS_BIT or VK_QUEUE_COMPUTE_BIT
VK_PIPELINE_STAGE_2_COPY_INDIRECT_BIT_KHR | VK_QUEUE_GRAPHICS_BIT or VK_QUEUE_COMPUTE_BIT or VK_QUEUE_TRANSFER_BIT
VK_PIPELINE_STAGE_2_VERTEX_INPUT_BIT | VK_QUEUE_GRAPHICS_BIT
VK_PIPELINE_STAGE_2_VERTEX_SHADER_BIT | VK_QUEUE_GRAPHICS_BIT
VK_PIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT | VK_QUEUE_GRAPHICS_BIT
VK_PIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT | VK_QUEUE_GRAPHICS_BIT
VK_PIPELINE_STAGE_2_GEOMETRY_SHADER_BIT | VK_QUEUE_GRAPHICS_BIT
VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT | VK_QUEUE_GRAPHICS_BIT
VK_PIPELINE_STAGE_2_EARLY_FRAGMENT_TESTS_BIT | VK_QUEUE_GRAPHICS_BIT
VK_PIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT | VK_QUEUE_GRAPHICS_BIT
VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT | VK_QUEUE_GRAPHICS_BIT
VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT | VK_QUEUE_COMPUTE_BIT
VK_PIPELINE_STAGE_2_ALL_TRANSFER_BIT | VK_QUEUE_GRAPHICS_BIT or VK_QUEUE_COMPUTE_BIT or VK_QUEUE_TRANSFER_BIT
VK_PIPELINE_STAGE_2_BOTTOM_OF_PIPE_BIT | None required
VK_PIPELINE_STAGE_2_HOST_BIT | None required
VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT | VK_QUEUE_GRAPHICS_BIT
VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT | None required
VK_PIPELINE_STAGE_2_COPY_BIT | VK_QUEUE_GRAPHICS_BIT or VK_QUEUE_COMPUTE_BIT or VK_QUEUE_TRANSFER_BIT
VK_PIPELINE_STAGE_2_RESOLVE_BIT | VK_QUEUE_GRAPHICS_BIT or VK_QUEUE_COMPUTE_BIT or VK_QUEUE_TRANSFER_BIT
VK_PIPELINE_STAGE_2_BLIT_BIT | VK_QUEUE_GRAPHICS_BIT or VK_QUEUE_COMPUTE_BIT or VK_QUEUE_TRANSFER_BIT
VK_PIPELINE_STAGE_2_CLEAR_BIT | VK_QUEUE_GRAPHICS_BIT or VK_QUEUE_COMPUTE_BIT or VK_QUEUE_TRANSFER_BIT
VK_PIPELINE_STAGE_2_INDEX_INPUT_BIT | VK_QUEUE_GRAPHICS_BIT
VK_PIPELINE_STAGE_2_VERTEX_ATTRIBUTE_INPUT_BIT | VK_QUEUE_GRAPHICS_BIT
VK_PIPELINE_STAGE_2_PRE_RASTERIZATION_SHADERS_BIT | VK_QUEUE_GRAPHICS_BIT
VK_PIPELINE_STAGE_2_VIDEO_DECODE_BIT_KHR | VK_QUEUE_VIDEO_DECODE_BIT_KHR
VK_PIPELINE_STAGE_2_VIDEO_ENCODE_BIT_KHR | VK_QUEUE_VIDEO_ENCODE_BIT_KHR
VK_PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT | VK_QUEUE_GRAPHICS_BIT
VK_PIPELINE_STAGE_2_CONDITIONAL_RENDERING_BIT_EXT | VK_QUEUE_GRAPHICS_BIT or VK_QUEUE_COMPUTE_BIT
VK_PIPELINE_STAGE_2_COMMAND_PREPROCESS_BIT_EXT | VK_QUEUE_GRAPHICS_BIT or VK_QUEUE_COMPUTE_BIT
VK_PIPELINE_STAGE_2_MEMORY_DECOMPRESSION_BIT_EXT | VK_QUEUE_GRAPHICS_BIT or VK_QUEUE_COMPUTE_BIT
VK_PIPELINE_STAGE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR | VK_QUEUE_GRAPHICS_BIT
VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR | VK_QUEUE_COMPUTE_BIT
VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR | VK_QUEUE_COMPUTE_BIT
VK_PIPELINE_STAGE_2_FRAGMENT_DENSITY_PROCESS_BIT_EXT | VK_QUEUE_GRAPHICS_BIT
VK_PIPELINE_STAGE_2_TASK_SHADER_BIT_EXT | VK_QUEUE_GRAPHICS_BIT
VK_PIPELINE_STAGE_2_MESH_SHADER_BIT_EXT | VK_QUEUE_GRAPHICS_BIT
VK_PIPELINE_STAGE_2_SUBPASS_SHADER_BIT_HUAWEI | VK_QUEUE_GRAPHICS_BIT
VK_PIPELINE_STAGE_2_INVOCATION_MASK_BIT_HUAWEI | VK_QUEUE_GRAPHICS_BIT
VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR | VK_QUEUE_GRAPHICS_BIT or VK_QUEUE_COMPUTE_BIT or VK_QUEUE_TRANSFER_BIT
VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT | VK_QUEUE_COMPUTE_BIT
VK_PIPELINE_STAGE_2_CLUSTER_CULLING_SHADER_BIT_HUAWEI | VK_QUEUE_GRAPHICS_BIT
VK_PIPELINE_STAGE_2_OPTICAL_FLOW_BIT_NV | VK_QUEUE_OPTICAL_FLOW_BIT_NV
VK_PIPELINE_STAGE_2_CONVERT_COOPERATIVE_VECTOR_MATRIX_BIT_NV | VK_QUEUE_GRAPHICS_BIT or VK_QUEUE_COMPUTE_BIT or VK_QUEUE_TRANSFER_BIT
VK_PIPELINE_STAGE_2_DATA_GRAPH_BIT_ARM | VK_QUEUE_DATA_GRAPH_BIT_ARM

Pipeline stages that execute as a result of a command logically complete execution in a specific order, such that completion of a logically later pipeline stage must not happen-before completion of a logically earlier stage. This means that including any stage in the source stage mask for a particular synchronization command also implies that any logically earlier stages are included in Scope1st for that command.

Similarly, initiation of a logically earlier pipeline stage must not happen-after initiation of a logically later pipeline stage. Including any given stage in the destination stage mask for a particular synchronization command also implies that any logically later stages are included in Scope2nd for that command.

Note | Implementations may not support synchronization at every pipeline stage for every synchronization operation. If a pipeline stage that an implementation does not support synchronization for appears in a source stage mask, it may substitute any logically later stage in its place for the first synchronization scope. If a pipeline stage that an implementation does not support synchronization for appears in a destination stage mask, it may substitute any logically earlier stage in its place for the second synchronization scope. For example, if an implementation is unable to signal an event immediately after vertex shader execution is complete, it may instead signal the event after color attachment output has completed. If an implementation makes such a substitution, it must not affect the semantics of execution or memory dependencies or image and buffer memory barriers.

Graphics pipelines are executable on queues supporting VK_QUEUE_GRAPHICS_BIT. Stages executed by graphics pipelines can only be specified in commands recorded for queues supporting VK_QUEUE_GRAPHICS_BIT.

The graphics primitive pipeline executes the following stages, with the logical ordering of the stages matching the order specified here:

- VK_PIPELINE_STAGE_2_DRAW_INDIRECT_BIT

- VK_PIPELINE_STAGE_2_COPY_INDIRECT_BIT_KHR

- VK_PIPELINE_STAGE_2_INDEX_INPUT_BIT

- VK_PIPELINE_STAGE_2_VERTEX_ATTRIBUTE_INPUT_BIT

- VK_PIPELINE_STAGE_2_VERTEX_SHADER_BIT

- VK_PIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT

- VK_PIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT

- VK_PIPELINE_STAGE_2_GEOMETRY_SHADER_BIT

- VK_PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT

- VK_PIPELINE_STAGE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

- VK_PIPELINE_STAGE_2_EARLY_FRAGMENT_TESTS_BIT

- VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT

- VK_PIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT

- VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT

The graphics mesh pipeline executes the following stages, with the logical ordering of the stages matching the order specified here:

- VK_PIPELINE_STAGE_2_DRAW_INDIRECT_BIT

- VK_PIPELINE_STAGE_2_TASK_SHADER_BIT_EXT

- VK_PIPELINE_STAGE_2_MESH_SHADER_BIT_EXT

- VK_PIPELINE_STAGE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

- VK_PIPELINE_STAGE_2_EARLY_FRAGMENT_TESTS_BIT

- VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT

- VK_PIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT

- VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT

For the compute pipeline, the following stages occur in this order:

- VK_PIPELINE_STAGE_2_DRAW_INDIRECT_BIT

- VK_PIPELINE_STAGE_2_COPY_INDIRECT_BIT_KHR

- VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT

For the subpass shading pipeline, the following stages occur in this order:

- VK_PIPELINE_STAGE_2_SUBPASS_SHADER_BIT_HUAWEI

For graphics pipeline commands executing in a render pass with a fragment density map attachment, the following pipeline stage where the fragment density map read happens has no particular order relative to the other stages, except that it is logically earlier than VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT:

- VK_PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT

- VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT

The conditional rendering stage is formally part of both the graphics, and the compute pipeline. The pipeline stage where the predicate read happens has unspecified order relative to other stages of these pipelines:

- VK_PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT

For the transfer pipeline, the following stages occur in this order:

- VK_PIPELINE_STAGE_2_COPY_INDIRECT_BIT_KHR

- VK_PIPELINE_STAGE_2_TRANSFER_BIT

For host operations, only one pipeline stage occurs, so no order is guaranteed:

- VK_PIPELINE_STAGE_2_HOST_BIT

For the command preprocessing pipeline, the following stages occur in this order:

- VK_PIPELINE_STAGE_2_COMMAND_PREPROCESS_BIT_EXT

For the decompression pipeline, the following stages occur in this order:

- VK_PIPELINE_STAGE_2_MEMORY_DECOMPRESSION_BIT_EXT

For acceleration structure build operations, only one pipeline stage occurs, so no order is guaranteed:

- VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR

For acceleration structure copy operations, only one pipeline stage occurs, so no order is guaranteed:

- VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR

For opacity micromap build operations, only one pipeline stage occurs, so no order is guaranteed:

- VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT

For the ray tracing pipeline, the following stages occur in this order:

- VK_PIPELINE_STAGE_2_DRAW_INDIRECT_BIT

- VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR

For the video decode pipeline, the following stages occur in this order:

- VK_PIPELINE_STAGE_2_VIDEO_DECODE_BIT_KHR

For the video encode pipeline, the following stages occur in this order:

- VK_PIPELINE_STAGE_2_VIDEO_ENCODE_BIT_KHR

For the data graph pipeline, the following stages occur in this order:

- VK_PIPELINE_STAGE_2_DATA_GRAPH_BIT_ARM

#### 7.1.3. Access Types

Memory in Vulkan can be accessed from within shader invocations and via some fixed-function stages of the pipeline. The access type is a function of the descriptor type used, or how a fixed-function stage accesses memory.

Some synchronization commands take sets of access types as parameters to define the access scopes of a memory dependency. If a synchronization command includes a source access mask, its first access scope only includes accesses via the access types specified in that mask. Similarly, if a synchronization command includes a destination access mask, its second access scope only includes accesses via the access types specified in that mask.

Bits which can be set in the `srcAccessMask` and `dstAccessMask` members of VkMemoryBarrier2, VkImageMemoryBarrier2, and VkBufferMemoryBarrier2, specifying access behavior, are:

    // Provided by VK_VERSION_1_3
    // Flag bits for VkAccessFlagBits2
    typedef VkFlags64 VkAccessFlagBits2;
    static const VkAccessFlagBits2 VK_ACCESS_2_NONE = 0ULL;
    static const VkAccessFlagBits2 VK_ACCESS_2_INDIRECT_COMMAND_READ_BIT = 0x00000001ULL;
    static const VkAccessFlagBits2 VK_ACCESS_2_INDEX_READ_BIT = 0x00000002ULL;
    static const VkAccessFlagBits2 VK_ACCESS_2_VERTEX_ATTRIBUTE_READ_BIT = 0x00000004ULL;
    static const VkAccessFlagBits2 VK_ACCESS_2_UNIFORM_READ_BIT = 0x00000008ULL;
    static const VkAccessFlagBits2 VK_ACCESS_2_INPUT_ATTACHMENT_READ_BIT = 0x00000010ULL;
    static const VkAccessFlagBits2 VK_ACCESS_2_SHADER_READ_BIT = 0x00000020ULL;
    static const VkAccessFlagBits2 VK_ACCESS_2_SHADER_WRITE_BIT = 0x00000040ULL;
    static const VkAccessFlagBits2 VK_ACCESS_2_COLOR_ATTACHMENT_READ_BIT = 0x00000080ULL;
    static const VkAccessFlagBits2 VK_ACCESS_2_COLOR_ATTACHMENT_WRITE_BIT = 0x00000100ULL;
    static const VkAccessFlagBits2 VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_READ_BIT = 0x00000200ULL;
    static const VkAccessFlagBits2 VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT = 0x00000400ULL;
    static const VkAccessFlagBits2 VK_ACCESS_2_TRANSFER_READ_BIT = 0x00000800ULL;
    static const VkAccessFlagBits2 VK_ACCESS_2_TRANSFER_WRITE_BIT = 0x00001000ULL;
    static const VkAccessFlagBits2 VK_ACCESS_2_HOST_READ_BIT = 0x00002000ULL;
    static const VkAccessFlagBits2 VK_ACCESS_2_HOST_WRITE_BIT = 0x00004000ULL;
    static const VkAccessFlagBits2 VK_ACCESS_2_MEMORY_READ_BIT = 0x00008000ULL;
    static const VkAccessFlagBits2 VK_ACCESS_2_MEMORY_WRITE_BIT = 0x00010000ULL;
    static const VkAccessFlagBits2 VK_ACCESS_2_SHADER_SAMPLED_READ_BIT = 0x100000000ULL;
    static const VkAccessFlagBits2 VK_ACCESS_2_SHADER_STORAGE_READ_BIT = 0x200000000ULL;
    static const VkAccessFlagBits2 VK_ACCESS_2_SHADER_STORAGE_WRITE_BIT = 0x400000000ULL;
    // Provided by VK_KHR_video_decode_queue
    static const VkAccessFlagBits2 VK_ACCESS_2_VIDEO_DECODE_READ_BIT_KHR = 0x800000000ULL;
    // Provided by VK_KHR_video_decode_queue
    static const VkAccessFlagBits2 VK_ACCESS_2_VIDEO_DECODE_WRITE_BIT_KHR = 0x1000000000ULL;
    // Provided by VK_EXT_descriptor_heap
    static const VkAccessFlagBits2 VK_ACCESS_2_SAMPLER_HEAP_READ_BIT_EXT = 0x200000000000000ULL;
    // Provided by VK_EXT_descriptor_heap
    static const VkAccessFlagBits2 VK_ACCESS_2_RESOURCE_HEAP_READ_BIT_EXT = 0x400000000000000ULL;
    // Provided by VK_KHR_video_encode_queue
    static const VkAccessFlagBits2 VK_ACCESS_2_VIDEO_ENCODE_READ_BIT_KHR = 0x2000000000ULL;
    // Provided by VK_KHR_video_encode_queue
    static const VkAccessFlagBits2 VK_ACCESS_2_VIDEO_ENCODE_WRITE_BIT_KHR = 0x4000000000ULL;
    // Provided by VK_QCOM_tile_shading
    static const VkAccessFlagBits2 VK_ACCESS_2_SHADER_TILE_ATTACHMENT_READ_BIT_QCOM = 0x8000000000000ULL;
    // Provided by VK_QCOM_tile_shading
    static const VkAccessFlagBits2 VK_ACCESS_2_SHADER_TILE_ATTACHMENT_WRITE_BIT_QCOM = 0x10000000000000ULL;
    // Provided by VK_KHR_synchronization2
    static const VkAccessFlagBits2 VK_ACCESS_2_NONE_KHR = 0ULL;
    // Provided by VK_KHR_synchronization2
    static const VkAccessFlagBits2 VK_ACCESS_2_INDIRECT_COMMAND_READ_BIT_KHR = 0x00000001ULL;
    // Provided by VK_KHR_synchronization2
    static const VkAccessFlagBits2 VK_ACCESS_2_INDEX_READ_BIT_KHR = 0x00000002ULL;
    // Provided by VK_KHR_synchronization2
    static const VkAccessFlagBits2 VK_ACCESS_2_VERTEX_ATTRIBUTE_READ_BIT_KHR = 0x00000004ULL;
    // Provided by VK_KHR_synchronization2
    static const VkAccessFlagBits2 VK_ACCESS_2_UNIFORM_READ_BIT_KHR = 0x00000008ULL;
    // Provided by VK_KHR_synchronization2
    static const VkAccessFlagBits2 VK_ACCESS_2_INPUT_ATTACHMENT_READ_BIT_KHR = 0x00000010ULL;
    // Provided by VK_KHR_synchronization2
    static const VkAccessFlagBits2 VK_ACCESS_2_SHADER_READ_BIT_KHR = 0x00000020ULL;
    // Provided by VK_KHR_synchronization2
    static const VkAccessFlagBits2 VK_ACCESS_2_SHADER_WRITE_BIT_KHR = 0x00000040ULL;
    // Provided by VK_KHR_synchronization2
    static const VkAccessFlagBits2 VK_ACCESS_2_COLOR_ATTACHMENT_READ_BIT_KHR = 0x00000080ULL;
    // Provided by VK_KHR_synchronization2
    static const VkAccessFlagBits2 VK_ACCESS_2_COLOR_ATTACHMENT_WRITE_BIT_KHR = 0x00000100ULL;
    // Provided by VK_KHR_synchronization2
    static const VkAccessFlagBits2 VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_READ_BIT_KHR = 0x00000200ULL;
    // Provided by VK_KHR_synchronization2
    static const VkAccessFlagBits2 VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT_KHR = 0x00000400ULL;
    // Provided by VK_KHR_synchronization2
    static const VkAccessFlagBits2 VK_ACCESS_2_TRANSFER_READ_BIT_KHR = 0x00000800ULL;
    // Provided by VK_KHR_synchronization2
    static const VkAccessFlagBits2 VK_ACCESS_2_TRANSFER_WRITE_BIT_KHR = 0x00001000ULL;
    // Provided by VK_KHR_synchronization2
    static const VkAccessFlagBits2 VK_ACCESS_2_HOST_READ_BIT_KHR = 0x00002000ULL;
    // Provided by VK_KHR_synchronization2
    static const VkAccessFlagBits2 VK_ACCESS_2_HOST_WRITE_BIT_KHR = 0x00004000ULL;
    // Provided by VK_KHR_synchronization2
    static const VkAccessFlagBits2 VK_ACCESS_2_MEMORY_READ_BIT_KHR = 0x00008000ULL;
    // Provided by VK_KHR_synchronization2
    static const VkAccessFlagBits2 VK_ACCESS_2_MEMORY_WRITE_BIT_KHR = 0x00010000ULL;
    // Provided by VK_KHR_synchronization2
    static const VkAccessFlagBits2 VK_ACCESS_2_SHADER_SAMPLED_READ_BIT_KHR = 0x100000000ULL;
    // Provided by VK_KHR_synchronization2
    static const VkAccessFlagBits2 VK_ACCESS_2_SHADER_STORAGE_READ_BIT_KHR = 0x200000000ULL;
    // Provided by VK_KHR_synchronization2
    static const VkAccessFlagBits2 VK_ACCESS_2_SHADER_STORAGE_WRITE_BIT_KHR = 0x400000000ULL;
    // Provided by VK_KHR_synchronization2 with VK_EXT_transform_feedback
    static const VkAccessFlagBits2 VK_ACCESS_2_TRANSFORM_FEEDBACK_WRITE_BIT_EXT = 0x02000000ULL;
    // Provided by VK_KHR_synchronization2 with VK_EXT_transform_feedback
    static const VkAccessFlagBits2 VK_ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT = 0x04000000ULL;
    // Provided by VK_KHR_synchronization2 with VK_EXT_transform_feedback
    static const VkAccessFlagBits2 VK_ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT = 0x08000000ULL;
    // Provided by VK_KHR_synchronization2 with VK_EXT_conditional_rendering
    static const VkAccessFlagBits2 VK_ACCESS_2_CONDITIONAL_RENDERING_READ_BIT_EXT = 0x00100000ULL;
    // Provided by VK_KHR_synchronization2 with VK_NV_device_generated_commands
    static const VkAccessFlagBits2 VK_ACCESS_2_COMMAND_PREPROCESS_READ_BIT_NV = 0x00020000ULL;
    // Provided by VK_KHR_synchronization2 with VK_NV_device_generated_commands
    static const VkAccessFlagBits2 VK_ACCESS_2_COMMAND_PREPROCESS_WRITE_BIT_NV = 0x00040000ULL;
    // Provided by VK_KHR_synchronization2 with VK_EXT_device_generated_commands
    static const VkAccessFlagBits2 VK_ACCESS_2_COMMAND_PREPROCESS_READ_BIT_EXT = 0x00020000ULL;
    // Provided by VK_KHR_synchronization2 with VK_EXT_device_generated_commands
    static const VkAccessFlagBits2 VK_ACCESS_2_COMMAND_PREPROCESS_WRITE_BIT_EXT = 0x00040000ULL;
    // Provided by VK_KHR_fragment_shading_rate with VK_KHR_synchronization2
    static const VkAccessFlagBits2 VK_ACCESS_2_FRAGMENT_SHADING_RATE_ATTACHMENT_READ_BIT_KHR = 0x00800000ULL;
    // Provided by VK_KHR_synchronization2 with VK_NV_shading_rate_image
    static const VkAccessFlagBits2 VK_ACCESS_2_SHADING_RATE_IMAGE_READ_BIT_NV = 0x00800000ULL;
    // Provided by VK_KHR_acceleration_structure with VK_KHR_synchronization2
    static const VkAccessFlagBits2 VK_ACCESS_2_ACCELERATION_STRUCTURE_READ_BIT_KHR = 0x00200000ULL;
    // Provided by VK_KHR_acceleration_structure with VK_KHR_synchronization2
    static const VkAccessFlagBits2 VK_ACCESS_2_ACCELERATION_STRUCTURE_WRITE_BIT_KHR = 0x00400000ULL;
    // Provided by VK_KHR_synchronization2 with VK_NV_ray_tracing
    static const VkAccessFlagBits2 VK_ACCESS_2_ACCELERATION_STRUCTURE_READ_BIT_NV = 0x00200000ULL;
    // Provided by VK_KHR_synchronization2 with VK_NV_ray_tracing
    static const VkAccessFlagBits2 VK_ACCESS_2_ACCELERATION_STRUCTURE_WRITE_BIT_NV = 0x00400000ULL;
    // Provided by VK_KHR_synchronization2 with VK_EXT_fragment_density_map
    static const VkAccessFlagBits2 VK_ACCESS_2_FRAGMENT_DENSITY_MAP_READ_BIT_EXT = 0x01000000ULL;
    // Provided by VK_KHR_synchronization2 with VK_EXT_blend_operation_advanced
    static const VkAccessFlagBits2 VK_ACCESS_2_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT = 0x00080000ULL;
    // Provided by VK_EXT_descriptor_buffer
    static const VkAccessFlagBits2 VK_ACCESS_2_DESCRIPTOR_BUFFER_READ_BIT_EXT = 0x20000000000ULL;
    // Provided by VK_HUAWEI_invocation_mask
    static const VkAccessFlagBits2 VK_ACCESS_2_INVOCATION_MASK_READ_BIT_HUAWEI = 0x8000000000ULL;
    // Provided by VK_KHR_ray_tracing_maintenance1 with (VK_KHR_synchronization2 or VK_VERSION_1_3) and VK_KHR_ray_tracing_pipeline
    static const VkAccessFlagBits2 VK_ACCESS_2_SHADER_BINDING_TABLE_READ_BIT_KHR = 0x10000000000ULL;
    // Provided by VK_EXT_opacity_micromap
    static const VkAccessFlagBits2 VK_ACCESS_2_MICROMAP_READ_BIT_EXT = 0x100000000000ULL;
    // Provided by VK_EXT_opacity_micromap
    static const VkAccessFlagBits2 VK_ACCESS_2_MICROMAP_WRITE_BIT_EXT = 0x200000000000ULL;
    // Provided by VK_NV_optical_flow
    static const VkAccessFlagBits2 VK_ACCESS_2_OPTICAL_FLOW_READ_BIT_NV = 0x40000000000ULL;
    // Provided by VK_NV_optical_flow
    static const VkAccessFlagBits2 VK_ACCESS_2_OPTICAL_FLOW_WRITE_BIT_NV = 0x80000000000ULL;
    // Provided by VK_ARM_data_graph
    static const VkAccessFlagBits2 VK_ACCESS_2_DATA_GRAPH_READ_BIT_ARM = 0x800000000000ULL;
    // Provided by VK_ARM_data_graph
    static const VkAccessFlagBits2 VK_ACCESS_2_DATA_GRAPH_WRITE_BIT_ARM = 0x1000000000000ULL;
    // Provided by VK_EXT_memory_decompression
    static const VkAccessFlagBits2 VK_ACCESS_2_MEMORY_DECOMPRESSION_READ_BIT_EXT = 0x80000000000000ULL;
    // Provided by VK_EXT_memory_decompression
    static const VkAccessFlagBits2 VK_ACCESS_2_MEMORY_DECOMPRESSION_WRITE_BIT_EXT = 0x100000000000000ULL;

    // Provided by VK_KHR_synchronization2
    // Equivalent to VkAccessFlagBits2
    typedef VkAccessFlagBits2 VkAccessFlagBits2KHR;

- VK_ACCESS_2_NONE specifies no accesses.

- VK_ACCESS_2_MEMORY_READ_BIT specifies all read accesses. It is always valid in any access mask, and is treated as equivalent to setting all `READ` access flags that are valid where it is used.

- VK_ACCESS_2_MEMORY_WRITE_BIT specifies all write accesses. It is always valid in any access mask, and is treated as equivalent to setting all `WRITE` access flags that are valid where it is used.

- VK_ACCESS_2_INDIRECT_COMMAND_READ_BIT specifies read access to command data read from indirect buffers as part of an indirect build, trace, drawing or dispatch command. Such access occurs in the VK_PIPELINE_STAGE_2_DRAW_INDIRECT_BIT pipeline stage. It also specifies read access to command data read from indirect buffers as part of a copy command with access occurring in the VK_PIPELINE_STAGE_2_COPY_INDIRECT_BIT_KHR pipeline stage.

- VK_ACCESS_2_INDEX_READ_BIT specifies read access to an index buffer as part of an indexed drawing command, bound by vkCmdBindIndexBuffer2 and vkCmdBindIndexBuffer. Such access occurs in the VK_PIPELINE_STAGE_2_INDEX_INPUT_BIT pipeline stage.

- VK_ACCESS_2_VERTEX_ATTRIBUTE_READ_BIT specifies read access to a vertex buffer as part of a drawing command, bound by vkCmdBindVertexBuffers. Such access occurs in the VK_PIPELINE_STAGE_2_VERTEX_ATTRIBUTE_INPUT_BIT pipeline stage.

- VK_ACCESS_2_UNIFORM_READ_BIT specifies read access to a uniform buffer in any shader pipeline stage.

- VK_ACCESS_2_INPUT_ATTACHMENT_READ_BIT specifies read access to an input attachment within a render pass during subpass shading or fragment shading. Such access occurs in the VK_PIPELINE_STAGE_2_SUBPASS_SHADER_BIT_HUAWEI or VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT pipeline stage.

- VK_ACCESS_2_SHADER_SAMPLED_READ_BIT specifies read access to a uniform texel buffer or sampled image in any shader pipeline stage.

- VK_ACCESS_2_SHADER_STORAGE_READ_BIT specifies read access to a storage buffer, physical storage buffer, storage texel buffer, or storage image in any shader pipeline stage.

- VK_ACCESS_2_SHADER_BINDING_TABLE_READ_BIT_KHR specifies read access to a shader binding table in any shader pipeline stage.

- VK_ACCESS_2_SHADER_READ_BIT is equivalent to the logical OR of:

  - VK_ACCESS_2_SHADER_SAMPLED_READ_BIT

  - VK_ACCESS_2_SHADER_STORAGE_READ_BIT

  - VK_ACCESS_2_SHADER_BINDING_TABLE_READ_BIT_KHR

  - VK_ACCESS_2_SHADER_TILE_ATTACHMENT_READ_BIT_QCOM

- VK_ACCESS_2_SHADER_STORAGE_WRITE_BIT specifies write access to a storage buffer, physical storage buffer, storage texel buffer, or storage image in any shader pipeline stage.

- VK_ACCESS_2_SHADER_WRITE_BIT is equivalent to VK_ACCESS_2_SHADER_STORAGE_WRITE_BIT.

- VK_ACCESS_2_COLOR_ATTACHMENT_READ_BIT specifies read access to a color attachment, such as via blending (other than advanced blend operations), logic operations or certain render pass load operations in the VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT pipeline stage or via fragment shader tile image reads in the VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT pipeline stage.

- VK_ACCESS_2_COLOR_ATTACHMENT_WRITE_BIT specifies write access to a color attachment during a render pass or via certain render pass load, store, and multisample resolve operations. This includes multisample resolve operations for depth/stencil resolve attachments. Such access occurs in the VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT pipeline stage.

- VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_READ_BIT specifies read access to a depth/stencil attachment, via depth or stencil operations or certain render pass load operations in the VK_PIPELINE_STAGE_2_EARLY_FRAGMENT_TESTS_BIT or VK_PIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT pipeline stages or via fragment shader tile image reads in the VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT pipeline stage.

- VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT specifies write access to a depth/stencil attachment, via depth or stencil operations or certain render pass load and store operations. Such access occurs in the VK_PIPELINE_STAGE_2_EARLY_FRAGMENT_TESTS_BIT or VK_PIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT pipeline stages.

- VK_ACCESS_2_TRANSFER_READ_BIT specifies read access to an image or buffer in a copy operation. Such access occurs in the VK_PIPELINE_STAGE_2_COPY_BIT, VK_PIPELINE_STAGE_2_BLIT_BIT, or VK_PIPELINE_STAGE_2_RESOLVE_BIT pipeline stages.

- VK_ACCESS_2_TRANSFER_WRITE_BIT specifies write access to an image or buffer in a clear or copy operation. Such access occurs in the VK_PIPELINE_STAGE_2_COPY_BIT, VK_PIPELINE_STAGE_2_BLIT_BIT, VK_PIPELINE_STAGE_2_CLEAR_BIT, or VK_PIPELINE_STAGE_2_RESOLVE_BIT pipeline stages.

- VK_ACCESS_2_HOST_READ_BIT specifies read access by a host operation. Accesses of this type are not performed through a resource, but directly on memory. Such access occurs in the VK_PIPELINE_STAGE_2_HOST_BIT pipeline stage.

- VK_ACCESS_2_HOST_WRITE_BIT specifies write access by a host operation. Accesses of this type are not performed through a resource, but directly on memory. Such access occurs in the VK_PIPELINE_STAGE_2_HOST_BIT pipeline stage.

- VK_ACCESS_2_CONDITIONAL_RENDERING_READ_BIT_EXT specifies read access to a predicate as part of conditional rendering. Such access occurs in the VK_PIPELINE_STAGE_2_CONDITIONAL_RENDERING_BIT_EXT pipeline stage.

- VK_ACCESS_2_TRANSFORM_FEEDBACK_WRITE_BIT_EXT specifies write access to a transform feedback buffer made when transform feedback is active. Such access occurs in the VK_PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT pipeline stage.

- VK_ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT specifies read access to a transform feedback counter buffer which is read when vkCmdBeginTransformFeedbackEXT executes. Such access occurs in the VK_PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT pipeline stage.

- VK_ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT specifies write access to a transform feedback counter buffer which is written when vkCmdEndTransformFeedbackEXT executes. Such access occurs in the VK_PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT pipeline stage.

- VK_ACCESS_2_COMMAND_PREPROCESS_READ_BIT_NV specifies reads from buffer inputs to vkCmdPreprocessGeneratedCommandsNV. Such access occurs in the VK_PIPELINE_STAGE_2_COMMAND_PREPROCESS_BIT_NV pipeline stage.

- VK_ACCESS_2_COMMAND_PREPROCESS_WRITE_BIT_NV specifies writes to the target command buffer preprocess outputs. Such access occurs in the VK_PIPELINE_STAGE_2_COMMAND_PREPROCESS_BIT_NV pipeline stage.

- VK_ACCESS_2_COMMAND_PREPROCESS_READ_BIT_EXT specifies reads from buffer inputs to vkCmdPreprocessGeneratedCommandsEXT. Such access occurs in the VK_PIPELINE_STAGE_2_COMMAND_PREPROCESS_BIT_EXT pipeline stage.

- VK_ACCESS_2_COMMAND_PREPROCESS_WRITE_BIT_EXT specifies writes to the target command buffer preprocess outputs. Such access occurs in the VK_PIPELINE_STAGE_2_COMMAND_PREPROCESS_BIT_EXT pipeline stage.

- VK_ACCESS_2_MEMORY_DECOMPRESSION_READ_BIT_EXT specifies read access to memory in decompression commands vkCmdDecompressMemoryEXT and vkCmdDecompressMemoryIndirectCountEXT. Such access occurs in VK_PIPELINE_STAGE_2_MEMORY_DECOMPRESSION_BIT_EXT pipeline stage.

- VK_ACCESS_2_MEMORY_DECOMPRESSION_WRITE_BIT_EXT specifies write access to memory in decompression commands vkCmdDecompressMemoryEXT and vkCmdDecompressMemoryIndirectCountEXT. Such access occurs in VK_PIPELINE_STAGE_2_MEMORY_DECOMPRESSION_BIT_EXT pipeline stage.

- VK_ACCESS_2_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT specifies read access to color attachments, including advanced blend operations. Such access occurs in the VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT pipeline stage.

- VK_ACCESS_2_INVOCATION_MASK_READ_BIT_HUAWEI specifies read access to an invocation mask image in the VK_PIPELINE_STAGE_2_INVOCATION_MASK_BIT_HUAWEI pipeline stage.

- VK_ACCESS_2_ACCELERATION_STRUCTURE_READ_BIT_KHR specifies read access to an acceleration structure as part of a trace, build, or copy command, or to an acceleration structure scratch buffer as part of a build command. Such access occurs in the VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR pipeline stage or VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR pipeline stage.

- VK_ACCESS_2_ACCELERATION_STRUCTURE_WRITE_BIT_KHR specifies write access to an acceleration structure or acceleration structure scratch buffer as part of a build or copy command. Such access occurs in the VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR pipeline stage.

- VK_ACCESS_2_FRAGMENT_DENSITY_MAP_READ_BIT_EXT specifies read access to a fragment density map attachment during dynamic fragment density map operations. Such access occurs in the VK_PIPELINE_STAGE_2_FRAGMENT_DENSITY_PROCESS_BIT_EXT pipeline stage.

- VK_ACCESS_2_FRAGMENT_SHADING_RATE_ATTACHMENT_READ_BIT_KHR specifies read access to a fragment shading rate attachment during rasterization. Such access occurs in the VK_PIPELINE_STAGE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR pipeline stage.

- VK_ACCESS_2_SHADING_RATE_IMAGE_READ_BIT_NV specifies read access to a shading rate image during rasterization. Such access occurs in the VK_PIPELINE_STAGE_2_SHADING_RATE_IMAGE_BIT_NV pipeline stage. It is equivalent to VK_ACCESS_2_FRAGMENT_SHADING_RATE_ATTACHMENT_READ_BIT_KHR.

- VK_ACCESS_2_VIDEO_DECODE_READ_BIT_KHR specifies read access to an image or buffer resource in a video decode operation. Such access occurs in the VK_PIPELINE_STAGE_2_VIDEO_DECODE_BIT_KHR pipeline stage.

- VK_ACCESS_2_VIDEO_DECODE_WRITE_BIT_KHR specifies write access to an image or buffer resource in a video decode operation. Such access occurs in the VK_PIPELINE_STAGE_2_VIDEO_DECODE_BIT_KHR pipeline stage.

- VK_ACCESS_2_VIDEO_ENCODE_READ_BIT_KHR specifies read access to an image or buffer resource in a video encode operation. Such access occurs in the VK_PIPELINE_STAGE_2_VIDEO_ENCODE_BIT_KHR pipeline stage.

- VK_ACCESS_2_VIDEO_ENCODE_WRITE_BIT_KHR specifies write access to an image or buffer resource in a video encode operation. Such access occurs in the VK_PIPELINE_STAGE_2_VIDEO_ENCODE_BIT_KHR pipeline stage.

- VK_ACCESS_2_DESCRIPTOR_BUFFER_READ_BIT_EXT specifies read access to a descriptor buffer in any shader pipeline stage.

- VK_ACCESS_2_OPTICAL_FLOW_READ_BIT_NV specifies read access to an image or buffer resource as part of a optical flow operation. Such access occurs in the VK_PIPELINE_STAGE_2_OPTICAL_FLOW_BIT_NV pipeline stage.

- VK_ACCESS_2_OPTICAL_FLOW_WRITE_BIT_NV specifies write access to an image or buffer resource as part of a optical flow operation. Such access occurs in the VK_PIPELINE_STAGE_2_OPTICAL_FLOW_BIT_NV pipeline stage.

- VK_ACCESS_2_MICROMAP_WRITE_BIT_EXT specifies write access to a micromap object. Such access occurs in the VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT pipeline stage.

- VK_ACCESS_2_MICROMAP_READ_BIT_EXT specifies read access to a micromap object. Such access occurs in the VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT and VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR pipeline stages.

- VK_ACCESS_2_SHADER_TILE_ATTACHMENT_READ_BIT_QCOM specifies read access to a tile attachment. Such access occurs in the VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT or VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT pipeline stages.

- VK_ACCESS_2_SHADER_TILE_ATTACHMENT_WRITE_BIT_QCOM specifies write access to a tile attachment. Such access occurs in the VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT or VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT pipeline stages.

- VK_ACCESS_2_DATA_GRAPH_READ_BIT_ARM specifies read access to resources in the VK_PIPELINE_STAGE_2_DATA_GRAPH_BIT_ARM pipeline stage.

- VK_ACCESS_2_DATA_GRAPH_WRITE_BIT_ARM specifies write access to resources in the VK_PIPELINE_STAGE_2_DATA_GRAPH_BIT_ARM pipeline stage.

- VK_ACCESS_2_SAMPLER_HEAP_READ_BIT_EXT specifies read access to a sampler heap in any shader pipeline stage.

- VK_ACCESS_2_RESOURCE_HEAP_READ_BIT_EXT specifies read access to a resource heap in any shader pipeline stage.

Certain access types are only performed by a subset of pipeline stages, as described in more detail for VkAccessFlagBits. The Supported Access Types table lists, for each access flag, which pipeline stages can perform that type of access.

Note | In situations where an application wishes to select all access types for a given set of pipeline stages, VK_ACCESS_2_MEMORY_READ_BIT or VK_ACCESS_2_MEMORY_WRITE_BIT can be used. This is particularly useful when specifying stages that only have a single access type.

Note | The `VkAccessFlags2` bitmask goes beyond the 31 individual bit flags allowable within a C99 enum, which is how VkAccessFlagBits is defined. The first 31 values are common to both, and are interchangeable.

`VkAccessFlags2` is a bitmask type for setting a mask of zero or more VkAccessFlagBits2:

    // Provided by VK_VERSION_1_3
    typedef VkFlags64 VkAccessFlags2;

    // Provided by VK_KHR_synchronization2
    // Equivalent to VkAccessFlags2
    typedef VkAccessFlags2 VkAccessFlags2KHR;

An application can link a VkMemoryBarrierAccessFlags3KHR structure in the `pNext` chain of VkMemoryBarrier2, VkBufferMemoryBarrier2, or VkImageMemoryBarrier2 to provide additional access flags beyond those available in VkAccessFlagBits2.

The `VkMemoryBarrierAccessFlags3KHR` structure is defined as:

    // Provided by VK_KHR_maintenance8
    typedef struct VkMemoryBarrierAccessFlags3KHR {
        VkStructureType      sType;
        const void*          pNext;
        VkAccessFlags3KHR    srcAccessMask3;
        VkAccessFlags3KHR    dstAccessMask3;
    } VkMemoryBarrierAccessFlags3KHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `srcAccessMask3` is a VkAccessFlags3KHR mask of access flags to be included in the first access scope.

- `dstAccessMask3` is a VkAccessFlags3KHR mask of access flags to be included in the second access scope.

Valid Usage (Implicit)

- VUID-VkMemoryBarrierAccessFlags3KHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_MEMORY_BARRIER_ACCESS_FLAGS_3_KHR

- VUID-VkMemoryBarrierAccessFlags3KHR-srcAccessMask3-parameter
  `srcAccessMask3` must be a valid combination of VkAccessFlagBits3KHR values

- VUID-VkMemoryBarrierAccessFlags3KHR-dstAccessMask3-parameter
  `dstAccessMask3` must be a valid combination of VkAccessFlagBits3KHR values

Structure Chaining

Extends the structures

  - VkBufferMemoryBarrier2

  - VkImageMemoryBarrier2

  - VkMemoryRangeBarriersInfoKHR

  - VkSubpassDependency2

Bits which can be set in the `srcAccessMask3` and `dstAccessMask3` members of VkMemoryBarrierAccessFlags3KHR, specifying access behavior, are:

    // Provided by VK_KHR_maintenance8
    // Flag bits for VkAccessFlagBits3KHR
    typedef VkFlags64 VkAccessFlagBits3KHR;
    static const VkAccessFlagBits3KHR VK_ACCESS_3_NONE_KHR = 0ULL;

- VK_ACCESS_3_NONE_KHR specifies no additional accesses.

`VkAccessFlags3KHR` is a bitmask type for setting a mask of zero or more VkAccessFlagBits3KHR:

    // Provided by VK_KHR_maintenance8
    typedef VkFlags64 VkAccessFlags3KHR;

When a VkMemoryBarrierAccessFlags3KHR structure is linked in the `pNext` field of VkMemoryBarrier2, VkBufferMemoryBarrier2, or VkImageMemoryBarrier2, the flags specified in the `srcAccessMask3` and `dstAccessMask3` fields are considered in addition to the flags in the `srcAccessMask` and `dstAccessMask` fields, respectively, to allow up to 128 total access types to be specified for the first or second access scope.

Note | When VkAccessFlagBits3KHR and VkAccessFlagBits2 are used together, the two sets of 64 flags bits are combined together into 128 flag bits (effectively OR’ing them together). This is different from VkAccessFlagBits2 and VkAccessFlagBits, where the 64 bit VkAccessFlagBits2 extends and replaces the 32 bit VkAccessFlagBits.

Bits which can be set in the `srcAccessMask` and `dstAccessMask` members of VkSubpassDependency, VkSubpassDependency2, VkMemoryBarrier, VkBufferMemoryBarrier, and VkImageMemoryBarrier, specifying access behavior, are:

Warning | This functionality is superseded by VkAccessFlagBits2. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_0
    typedef enum VkAccessFlagBits {
        VK_ACCESS_INDIRECT_COMMAND_READ_BIT = 0x00000001,
        VK_ACCESS_INDEX_READ_BIT = 0x00000002,
        VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT = 0x00000004,
        VK_ACCESS_UNIFORM_READ_BIT = 0x00000008,
        VK_ACCESS_INPUT_ATTACHMENT_READ_BIT = 0x00000010,
        VK_ACCESS_SHADER_READ_BIT = 0x00000020,
        VK_ACCESS_SHADER_WRITE_BIT = 0x00000040,
        VK_ACCESS_COLOR_ATTACHMENT_READ_BIT = 0x00000080,
        VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT = 0x00000100,
        VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT = 0x00000200,
        VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT = 0x00000400,
        VK_ACCESS_TRANSFER_READ_BIT = 0x00000800,
        VK_ACCESS_TRANSFER_WRITE_BIT = 0x00001000,
        VK_ACCESS_HOST_READ_BIT = 0x00002000,
        VK_ACCESS_HOST_WRITE_BIT = 0x00004000,
        VK_ACCESS_MEMORY_READ_BIT = 0x00008000,
        VK_ACCESS_MEMORY_WRITE_BIT = 0x00010000,
      // Provided by VK_VERSION_1_3
        VK_ACCESS_NONE = 0,
      // Provided by VK_EXT_transform_feedback
        VK_ACCESS_TRANSFORM_FEEDBACK_WRITE_BIT_EXT = 0x02000000,
      // Provided by VK_EXT_transform_feedback
        VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT = 0x04000000,
      // Provided by VK_EXT_transform_feedback
        VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT = 0x08000000,
      // Provided by VK_EXT_conditional_rendering
        VK_ACCESS_CONDITIONAL_RENDERING_READ_BIT_EXT = 0x00100000,
      // Provided by VK_EXT_blend_operation_advanced
        VK_ACCESS_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT = 0x00080000,
      // Provided by VK_KHR_acceleration_structure
        VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR = 0x00200000,
      // Provided by VK_KHR_acceleration_structure
        VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_KHR = 0x00400000,
      // Provided by VK_EXT_fragment_density_map
        VK_ACCESS_FRAGMENT_DENSITY_MAP_READ_BIT_EXT = 0x01000000,
      // Provided by VK_KHR_fragment_shading_rate
        VK_ACCESS_FRAGMENT_SHADING_RATE_ATTACHMENT_READ_BIT_KHR = 0x00800000,
      // Provided by VK_EXT_device_generated_commands
        VK_ACCESS_COMMAND_PREPROCESS_READ_BIT_EXT = 0x00020000,
      // Provided by VK_EXT_device_generated_commands
        VK_ACCESS_COMMAND_PREPROCESS_WRITE_BIT_EXT = 0x00040000,
      // Provided by VK_NV_shading_rate_image
        VK_ACCESS_SHADING_RATE_IMAGE_READ_BIT_NV = VK_ACCESS_FRAGMENT_SHADING_RATE_ATTACHMENT_READ_BIT_KHR,
      // Provided by VK_NV_ray_tracing
        VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_NV = VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR,
      // Provided by VK_NV_ray_tracing
        VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_NV = VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_KHR,
      // Provided by VK_NV_device_generated_commands
        VK_ACCESS_COMMAND_PREPROCESS_READ_BIT_NV = VK_ACCESS_COMMAND_PREPROCESS_READ_BIT_EXT,
      // Provided by VK_NV_device_generated_commands
        VK_ACCESS_COMMAND_PREPROCESS_WRITE_BIT_NV = VK_ACCESS_COMMAND_PREPROCESS_WRITE_BIT_EXT,
      // Provided by VK_KHR_synchronization2
        VK_ACCESS_NONE_KHR = VK_ACCESS_NONE,
    } VkAccessFlagBits;

These values all have the same meaning as the equivalently named values for VkAccessFlags2.

- VK_ACCESS_NONE specifies no accesses.

- VK_ACCESS_MEMORY_READ_BIT specifies all read accesses. It is always valid in any access mask, and is treated as equivalent to setting all `READ` access flags that are valid where it is used.

- VK_ACCESS_MEMORY_WRITE_BIT specifies all write accesses. It is always valid in any access mask, and is treated as equivalent to setting all `WRITE` access flags that are valid where it is used.

- VK_ACCESS_INDIRECT_COMMAND_READ_BIT specifies read access to indirect command data read as part of an indirect build, trace, drawing or dispatching command. Such access occurs in the VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT pipeline stage.

- VK_ACCESS_INDEX_READ_BIT specifies read access to an index buffer as part of an indexed drawing command, bound by vkCmdBindIndexBuffer2 and vkCmdBindIndexBuffer. Such access occurs in the VK_PIPELINE_STAGE_VERTEX_INPUT_BIT pipeline stage.

- VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT specifies read access to a vertex buffer as part of a drawing command, bound by vkCmdBindVertexBuffers. Such access occurs in the VK_PIPELINE_STAGE_VERTEX_INPUT_BIT pipeline stage.

- VK_ACCESS_UNIFORM_READ_BIT specifies read access to a uniform buffer in any shader pipeline stage.

- VK_ACCESS_INPUT_ATTACHMENT_READ_BIT specifies read access to an input attachment within a render pass during subpass shading or fragment shading. Such access occurs in the VK_PIPELINE_STAGE_2_SUBPASS_SHADER_BIT_HUAWEI or VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT pipeline stage.

- VK_ACCESS_SHADER_READ_BIT specifies read access to a uniform texel buffer, sampled image, storage buffer, physical storage buffer, shader binding table, storage tensor, storage texel buffer, or storage image in any shader pipeline stage.

- VK_ACCESS_SHADER_WRITE_BIT specifies write access to a storage buffer, physical storage buffer, storage tensor, storage texel buffer, or storage image in any shader pipeline stage.

- VK_ACCESS_COLOR_ATTACHMENT_READ_BIT specifies read access to a color attachment, such as via blending (other than advanced blend operations), logic operations or certain render pass load operations in the VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT pipeline stage or via fragment shader tile image reads in the VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT pipeline stage.

- VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT specifies write access to a color attachment during a render pass or via certain render pass load, store, and multisample resolve operations. This includes multisample resolve operations for depth/stencil resolve attachments. Such access occurs in the VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT pipeline stage.

- VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT specifies read access to a depth/stencil attachment, via depth or stencil operations or certain render pass load operations in the VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT or VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT pipeline stages or via fragment shader tile image reads in the VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT pipeline stage.

- VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT specifies write access to a depth/stencil attachment, via depth or stencil operations or certain render pass load and store operations. Such access occurs in the VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT or VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT pipeline stages.

- VK_ACCESS_TRANSFER_READ_BIT specifies read access to an image, tensor, or buffer in a copy operation. Such access occurs in the VK_PIPELINE_STAGE_2_ALL_TRANSFER_BIT pipeline stage.

- VK_ACCESS_TRANSFER_WRITE_BIT specifies write access to an image, tensor, or buffer in a clear or copy operation. Such access occurs in the VK_PIPELINE_STAGE_2_ALL_TRANSFER_BIT pipeline stage.

- VK_ACCESS_HOST_READ_BIT specifies read access by a host operation. Accesses of this type are not performed through a resource, but directly on memory. Such access occurs in the VK_PIPELINE_STAGE_HOST_BIT pipeline stage.

- VK_ACCESS_HOST_WRITE_BIT specifies write access by a host operation. Accesses of this type are not performed through a resource, but directly on memory. Such access occurs in the VK_PIPELINE_STAGE_HOST_BIT pipeline stage.

- VK_ACCESS_CONDITIONAL_RENDERING_READ_BIT_EXT specifies read access to a predicate as part of conditional rendering. Such access occurs in the VK_PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT pipeline stage.

- VK_ACCESS_TRANSFORM_FEEDBACK_WRITE_BIT_EXT specifies write access to a transform feedback buffer made when transform feedback is active. Such access occurs in the VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT pipeline stage.

- VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT specifies read access to a transform feedback counter buffer which is read when `vkCmdBeginTransformFeedbackEXT` executes. Such access occurs in the VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT pipeline stage.

- VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT specifies write access to a transform feedback counter buffer which is written when `vkCmdEndTransformFeedbackEXT` executes. Such access occurs in the VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT pipeline stage.

- VK_ACCESS_COMMAND_PREPROCESS_READ_BIT_NV specifies reads from buffer inputs to vkCmdPreprocessGeneratedCommandsNV. Such access occurs in the VK_PIPELINE_STAGE_COMMAND_PREPROCESS_BIT_NV pipeline stage.

- VK_ACCESS_COMMAND_PREPROCESS_WRITE_BIT_NV specifies writes to the target command buffer preprocess outputs in vkCmdPreprocessGeneratedCommandsNV. Such access occurs in the VK_PIPELINE_STAGE_COMMAND_PREPROCESS_BIT_NV pipeline stage.

- VK_ACCESS_COMMAND_PREPROCESS_READ_BIT_EXT specifies reads from buffer inputs to vkCmdPreprocessGeneratedCommandsEXT. Such access occurs in the VK_PIPELINE_STAGE_COMMAND_PREPROCESS_BIT_EXT pipeline stage.

- VK_ACCESS_COMMAND_PREPROCESS_WRITE_BIT_EXT specifies writes to the target command buffer preprocess outputs in vkCmdPreprocessGeneratedCommandsEXT. Such access occurs in the VK_PIPELINE_STAGE_COMMAND_PREPROCESS_BIT_EXT pipeline stage.

- VK_ACCESS_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT specifies read access to color attachments, including advanced blend operations. Such access occurs in the VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT pipeline stage.

- VK_ACCESS_2_INVOCATION_MASK_READ_BIT_HUAWEI specifies read access to an invocation mask image in the VK_PIPELINE_STAGE_2_INVOCATION_MASK_BIT_HUAWEI pipeline stage.

- VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR specifies read access to an acceleration structure as part of a trace, build, or copy command, or to an acceleration structure scratch buffer as part of a build command. Such access occurs in the VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_KHR pipeline stage or VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR pipeline stage.

- VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_KHR specifies write access to an acceleration structure or acceleration structure scratch buffer as part of a build or copy command. Such access occurs in the VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR pipeline stage.

- VK_ACCESS_FRAGMENT_DENSITY_MAP_READ_BIT_EXT specifies read access to a fragment density map attachment during dynamic fragment density map operations Such access occurs in the VK_PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT pipeline stage.

- VK_ACCESS_FRAGMENT_SHADING_RATE_ATTACHMENT_READ_BIT_KHR specifies read access to a fragment shading rate attachment during rasterization. Such access occurs in the VK_PIPELINE_STAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR pipeline stage.

- VK_ACCESS_SHADING_RATE_IMAGE_READ_BIT_NV specifies read access to a shading rate image during rasterization. Such access occurs in the VK_PIPELINE_STAGE_SHADING_RATE_IMAGE_BIT_NV pipeline stage. It is equivalent to VK_PIPELINE_STAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR.

Certain access types are only performed by a subset of pipeline stages. Any synchronization command that takes both stage masks and access masks uses both to define the access scopes - only the specified access types performed by the specified stages are included in the access scope. An application must not specify an access flag in a synchronization command if it does not include a pipeline stage in the corresponding stage mask that is able to perform accesses of that type. The following table lists, for each access flag, which pipeline stages can perform that type of access.

Table 4. Supported Access Types
Access flag | Supported pipeline stages
--- | ---
VK_ACCESS_2_NONE, VK_ACCESS_NONE | Any
VK_ACCESS_2_INDIRECT_COMMAND_READ_BIT, VK_ACCESS_INDIRECT_COMMAND_READ_BIT | VK_PIPELINE_STAGE_2_DRAW_INDIRECT_BIT, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, VK_PIPELINE_STAGE_2_COPY_INDIRECT_BIT_KHR
VK_ACCESS_2_INDEX_READ_BIT, VK_ACCESS_INDEX_READ_BIT | VK_PIPELINE_STAGE_2_VERTEX_INPUT_BIT, VK_PIPELINE_STAGE_2_INDEX_INPUT_BIT
VK_ACCESS_2_VERTEX_ATTRIBUTE_READ_BIT, VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT | VK_PIPELINE_STAGE_2_VERTEX_INPUT_BIT, VK_PIPELINE_STAGE_2_VERTEX_ATTRIBUTE_INPUT_BIT
VK_ACCESS_2_UNIFORM_READ_BIT, VK_ACCESS_UNIFORM_READ_BIT | VK_PIPELINE_STAGE_2_VERTEX_SHADER_BIT, VK_PIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT, VK_PIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT, VK_PIPELINE_STAGE_2_GEOMETRY_SHADER_BIT, VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT, VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT, VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR, VK_PIPELINE_STAGE_2_TASK_SHADER_BIT_EXT, VK_PIPELINE_STAGE_2_MESH_SHADER_BIT_EXT, VK_PIPELINE_STAGE_2_SUBPASS_SHADER_BIT_HUAWEI, VK_PIPELINE_STAGE_2_CLUSTER_CULLING_SHADER_BIT_HUAWEI
VK_ACCESS_2_INPUT_ATTACHMENT_READ_BIT, VK_ACCESS_INPUT_ATTACHMENT_READ_BIT | VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT, VK_PIPELINE_STAGE_2_SUBPASS_SHADER_BIT_HUAWEI
VK_ACCESS_2_SHADER_READ_BIT, VK_ACCESS_SHADER_READ_BIT | VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT, VK_PIPELINE_STAGE_2_VERTEX_SHADER_BIT, VK_PIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT, VK_PIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT, VK_PIPELINE_STAGE_2_GEOMETRY_SHADER_BIT, VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT, VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT, VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR, VK_PIPELINE_STAGE_2_TASK_SHADER_BIT_EXT, VK_PIPELINE_STAGE_2_MESH_SHADER_BIT_EXT, VK_PIPELINE_STAGE_2_SUBPASS_SHADER_BIT_HUAWEI, VK_PIPELINE_STAGE_2_CLUSTER_CULLING_SHADER_BIT_HUAWEI
VK_ACCESS_2_SHADER_WRITE_BIT, VK_ACCESS_SHADER_WRITE_BIT | VK_PIPELINE_STAGE_2_VERTEX_SHADER_BIT, VK_PIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT, VK_PIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT, VK_PIPELINE_STAGE_2_GEOMETRY_SHADER_BIT, VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT, VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT, VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR, VK_PIPELINE_STAGE_2_TASK_SHADER_BIT_EXT, VK_PIPELINE_STAGE_2_MESH_SHADER_BIT_EXT, VK_PIPELINE_STAGE_2_SUBPASS_SHADER_BIT_HUAWEI, VK_PIPELINE_STAGE_2_CLUSTER_CULLING_SHADER_BIT_HUAWEI
VK_ACCESS_2_COLOR_ATTACHMENT_READ_BIT, VK_ACCESS_COLOR_ATTACHMENT_READ_BIT | VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT, VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT
VK_ACCESS_2_COLOR_ATTACHMENT_WRITE_BIT, VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT | VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT
VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_READ_BIT, VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT | VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT, VK_PIPELINE_STAGE_2_EARLY_FRAGMENT_TESTS_BIT, VK_PIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT
VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT, VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT | VK_PIPELINE_STAGE_2_EARLY_FRAGMENT_TESTS_BIT, VK_PIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT
VK_ACCESS_2_TRANSFER_READ_BIT, VK_ACCESS_TRANSFER_READ_BIT | VK_PIPELINE_STAGE_2_ALL_TRANSFER_BIT, VK_PIPELINE_STAGE_2_COPY_BIT, VK_PIPELINE_STAGE_2_RESOLVE_BIT, VK_PIPELINE_STAGE_2_BLIT_BIT, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR, VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT, VK_PIPELINE_STAGE_2_CONVERT_COOPERATIVE_VECTOR_MATRIX_BIT_NV
VK_ACCESS_2_TRANSFER_WRITE_BIT, VK_ACCESS_TRANSFER_WRITE_BIT | VK_PIPELINE_STAGE_2_ALL_TRANSFER_BIT, VK_PIPELINE_STAGE_2_COPY_BIT, VK_PIPELINE_STAGE_2_RESOLVE_BIT, VK_PIPELINE_STAGE_2_BLIT_BIT, VK_PIPELINE_STAGE_2_CLEAR_BIT, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR, VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT, VK_PIPELINE_STAGE_2_CONVERT_COOPERATIVE_VECTOR_MATRIX_BIT_NV
VK_ACCESS_2_HOST_READ_BIT, VK_ACCESS_HOST_READ_BIT | VK_PIPELINE_STAGE_2_HOST_BIT
VK_ACCESS_2_HOST_WRITE_BIT, VK_ACCESS_HOST_WRITE_BIT | VK_PIPELINE_STAGE_2_HOST_BIT
VK_ACCESS_2_MEMORY_READ_BIT, VK_ACCESS_MEMORY_READ_BIT | Any
VK_ACCESS_2_MEMORY_WRITE_BIT, VK_ACCESS_MEMORY_WRITE_BIT | Any
VK_ACCESS_2_SHADER_SAMPLED_READ_BIT | VK_PIPELINE_STAGE_2_VERTEX_SHADER_BIT, VK_PIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT, VK_PIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT, VK_PIPELINE_STAGE_2_GEOMETRY_SHADER_BIT, VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT, VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT, VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR, VK_PIPELINE_STAGE_2_TASK_SHADER_BIT_EXT, VK_PIPELINE_STAGE_2_MESH_SHADER_BIT_EXT, VK_PIPELINE_STAGE_2_SUBPASS_SHADER_BIT_HUAWEI, VK_PIPELINE_STAGE_2_CLUSTER_CULLING_SHADER_BIT_HUAWEI
VK_ACCESS_2_SHADER_STORAGE_READ_BIT | VK_PIPELINE_STAGE_2_VERTEX_SHADER_BIT, VK_PIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT, VK_PIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT, VK_PIPELINE_STAGE_2_GEOMETRY_SHADER_BIT, VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT, VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT, VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR, VK_PIPELINE_STAGE_2_TASK_SHADER_BIT_EXT, VK_PIPELINE_STAGE_2_MESH_SHADER_BIT_EXT, VK_PIPELINE_STAGE_2_SUBPASS_SHADER_BIT_HUAWEI, VK_PIPELINE_STAGE_2_CLUSTER_CULLING_SHADER_BIT_HUAWEI
VK_ACCESS_2_SHADER_STORAGE_WRITE_BIT | VK_PIPELINE_STAGE_2_VERTEX_SHADER_BIT, VK_PIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT, VK_PIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT, VK_PIPELINE_STAGE_2_GEOMETRY_SHADER_BIT, VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT, VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT, VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR, VK_PIPELINE_STAGE_2_TASK_SHADER_BIT_EXT, VK_PIPELINE_STAGE_2_MESH_SHADER_BIT_EXT, VK_PIPELINE_STAGE_2_SUBPASS_SHADER_BIT_HUAWEI, VK_PIPELINE_STAGE_2_CLUSTER_CULLING_SHADER_BIT_HUAWEI
VK_ACCESS_2_VIDEO_DECODE_READ_BIT_KHR | VK_PIPELINE_STAGE_2_VIDEO_DECODE_BIT_KHR
VK_ACCESS_2_VIDEO_DECODE_WRITE_BIT_KHR | VK_PIPELINE_STAGE_2_VIDEO_DECODE_BIT_KHR
VK_ACCESS_2_VIDEO_ENCODE_READ_BIT_KHR | VK_PIPELINE_STAGE_2_VIDEO_ENCODE_BIT_KHR
VK_ACCESS_2_VIDEO_ENCODE_WRITE_BIT_KHR | VK_PIPELINE_STAGE_2_VIDEO_ENCODE_BIT_KHR
VK_ACCESS_2_TRANSFORM_FEEDBACK_WRITE_BIT_EXT, VK_ACCESS_TRANSFORM_FEEDBACK_WRITE_BIT_EXT | VK_PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT
VK_ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT, VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT | VK_PIPELINE_STAGE_2_DRAW_INDIRECT_BIT, VK_PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT
VK_ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT, VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT | VK_PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT
VK_ACCESS_2_CONDITIONAL_RENDERING_READ_BIT_EXT, VK_ACCESS_CONDITIONAL_RENDERING_READ_BIT_EXT | VK_PIPELINE_STAGE_2_CONDITIONAL_RENDERING_BIT_EXT
VK_ACCESS_2_COMMAND_PREPROCESS_READ_BIT_EXT, VK_ACCESS_COMMAND_PREPROCESS_READ_BIT_EXT | VK_PIPELINE_STAGE_2_COMMAND_PREPROCESS_BIT_EXT
VK_ACCESS_2_COMMAND_PREPROCESS_WRITE_BIT_EXT, VK_ACCESS_COMMAND_PREPROCESS_WRITE_BIT_EXT | VK_PIPELINE_STAGE_2_COMMAND_PREPROCESS_BIT_EXT
VK_ACCESS_2_MEMORY_DECOMPRESSION_READ_BIT_EXT | VK_PIPELINE_STAGE_2_MEMORY_DECOMPRESSION_BIT_EXT
VK_ACCESS_2_MEMORY_DECOMPRESSION_WRITE_BIT_EXT | VK_PIPELINE_STAGE_2_MEMORY_DECOMPRESSION_BIT_EXT
VK_ACCESS_2_FRAGMENT_SHADING_RATE_ATTACHMENT_READ_BIT_KHR, VK_ACCESS_FRAGMENT_SHADING_RATE_ATTACHMENT_READ_BIT_KHR | VK_PIPELINE_STAGE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR
VK_ACCESS_2_ACCELERATION_STRUCTURE_READ_BIT_KHR, VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR | VK_PIPELINE_STAGE_2_VERTEX_SHADER_BIT, VK_PIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT, VK_PIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT, VK_PIPELINE_STAGE_2_GEOMETRY_SHADER_BIT, VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT, VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT, VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR, VK_PIPELINE_STAGE_2_TASK_SHADER_BIT_EXT, VK_PIPELINE_STAGE_2_MESH_SHADER_BIT_EXT, VK_PIPELINE_STAGE_2_CLUSTER_CULLING_SHADER_BIT_HUAWEI, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR, VK_PIPELINE_STAGE_2_SUBPASS_SHADER_BIT_HUAWEI
VK_ACCESS_2_ACCELERATION_STRUCTURE_WRITE_BIT_KHR, VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_KHR | VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR
VK_ACCESS_2_FRAGMENT_DENSITY_MAP_READ_BIT_EXT, VK_ACCESS_FRAGMENT_DENSITY_MAP_READ_BIT_EXT | VK_PIPELINE_STAGE_2_FRAGMENT_DENSITY_PROCESS_BIT_EXT
VK_ACCESS_2_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT, VK_ACCESS_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT | VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT
VK_ACCESS_2_DESCRIPTOR_BUFFER_READ_BIT_EXT | VK_PIPELINE_STAGE_2_VERTEX_SHADER_BIT, VK_PIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT, VK_PIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT, VK_PIPELINE_STAGE_2_GEOMETRY_SHADER_BIT, VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT, VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT, VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR, VK_PIPELINE_STAGE_2_TASK_SHADER_BIT_EXT, VK_PIPELINE_STAGE_2_MESH_SHADER_BIT_EXT, VK_PIPELINE_STAGE_2_SUBPASS_SHADER_BIT_HUAWEI, VK_PIPELINE_STAGE_2_CLUSTER_CULLING_SHADER_BIT_HUAWEI
VK_ACCESS_2_INVOCATION_MASK_READ_BIT_HUAWEI | VK_PIPELINE_STAGE_2_INVOCATION_MASK_BIT_HUAWEI
VK_ACCESS_2_SHADER_BINDING_TABLE_READ_BIT_KHR | VK_PIPELINE_STAGE_2_VERTEX_SHADER_BIT, VK_PIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT, VK_PIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT, VK_PIPELINE_STAGE_2_GEOMETRY_SHADER_BIT, VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT, VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT, VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR, VK_PIPELINE_STAGE_2_TASK_SHADER_BIT_EXT, VK_PIPELINE_STAGE_2_MESH_SHADER_BIT_EXT, VK_PIPELINE_STAGE_2_SUBPASS_SHADER_BIT_HUAWEI, VK_PIPELINE_STAGE_2_CLUSTER_CULLING_SHADER_BIT_HUAWEI
VK_ACCESS_2_MICROMAP_READ_BIT_EXT | VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR
VK_ACCESS_2_MICROMAP_WRITE_BIT_EXT | VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT
VK_ACCESS_2_OPTICAL_FLOW_READ_BIT_NV | VK_PIPELINE_STAGE_2_OPTICAL_FLOW_BIT_NV
VK_ACCESS_2_OPTICAL_FLOW_WRITE_BIT_NV | VK_PIPELINE_STAGE_2_OPTICAL_FLOW_BIT_NV
VK_ACCESS_2_SHADER_TILE_ATTACHMENT_READ_BIT_QCOM | VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT, VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT
VK_ACCESS_2_SHADER_TILE_ATTACHMENT_WRITE_BIT_QCOM | VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT, VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT
VK_ACCESS_2_DATA_GRAPH_READ_BIT_ARM | VK_PIPELINE_STAGE_2_DATA_GRAPH_BIT_ARM
VK_ACCESS_2_DATA_GRAPH_WRITE_BIT_ARM | VK_PIPELINE_STAGE_2_DATA_GRAPH_BIT_ARM
VK_ACCESS_2_SAMPLER_HEAP_READ_BIT_EXT | VK_PIPELINE_STAGE_2_VERTEX_SHADER_BIT, VK_PIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT, VK_PIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT, VK_PIPELINE_STAGE_2_GEOMETRY_SHADER_BIT, VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT, VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT, VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR, VK_PIPELINE_STAGE_2_TASK_SHADER_BIT_EXT, VK_PIPELINE_STAGE_2_MESH_SHADER_BIT_EXT, VK_PIPELINE_STAGE_2_SUBPASS_SHADER_BIT_HUAWEI, VK_PIPELINE_STAGE_2_CLUSTER_CULLING_SHADER_BIT_HUAWEI
VK_ACCESS_2_RESOURCE_HEAP_READ_BIT_EXT | VK_PIPELINE_STAGE_2_VERTEX_SHADER_BIT, VK_PIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT, VK_PIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT, VK_PIPELINE_STAGE_2_GEOMETRY_SHADER_BIT, VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT, VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT, VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR, VK_PIPELINE_STAGE_2_TASK_SHADER_BIT_EXT, VK_PIPELINE_STAGE_2_MESH_SHADER_BIT_EXT, VK_PIPELINE_STAGE_2_SUBPASS_SHADER_BIT_HUAWEI, VK_PIPELINE_STAGE_2_CLUSTER_CULLING_SHADER_BIT_HUAWEI

Warning | This functionality is superseded by VkAccessFlags2. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_0
    typedef VkFlags VkAccessFlags;

`VkAccessFlags` is a bitmask type for setting a mask of zero or more VkAccessFlagBits.

If a memory object does not have the VK_MEMORY_PROPERTY_HOST_COHERENT_BIT property, then vkFlushMappedMemoryRanges must be called in order to guarantee that writes to the memory object from the host are made available to the host domain, where they can be further made available to the device domain via a domain operation. Similarly, vkInvalidateMappedMemoryRanges must be called to guarantee that writes which are available to the host domain are made visible to host operations.

If the memory object does have the VK_MEMORY_PROPERTY_HOST_COHERENT_BIT property flag, writes to the memory object from the host are automatically made available to the host domain. Similarly, writes made available to the host domain are automatically made visible to the host.

Note | Queue submission commands automatically perform a domain operation from host to device for all writes performed before the command executes, so in most cases an explicit memory barrier is not needed for this case. In the few circumstances where a submit does not occur between the host write and the device read access, writes can be made available by using an explicit memory barrier.

#### 7.1.4. Framebuffer Region Dependencies

Pipeline stages that operate on, or with respect to, the framebuffer are collectively the framebuffer-space pipeline stages. These stages are:

- VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT

- VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT

- VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT

- VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT

For commands recorded where the per-tile execution model is enabled, the VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT and VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT are included as framebuffer-space pipeline stages.

For these pipeline stages, an execution or memory dependency from the first set of operations to the second set can either be a single framebuffer-global dependency, or split into multiple framebuffer-local dependencies. A dependency with non-framebuffer-space pipeline stages is neither framebuffer-global nor framebuffer-local.

Framebuffer-global dependencies require synchronization from all framebuffer operations in the first synchronization scope to all framebuffer operations in the second synchronization scope.

Framebuffer-local dependencies instead partition the framebuffer operations into framebuffer regions, and dependencies are only formed between framebuffer regions with overlapping (x, y, layer, view, sample) coordinates. How a framebuffer-local dependency is partitioned depends on the nature of the dependency and what is being synchronized, as outlined below.

- If the VK_DEPENDENCY_BY_REGION_BIT flag is specified in a synchronization command, each region in that dependency covers a single (x,y,layer) position.

  - If the dependency is between two operations where the sample counts match, VK_RENDERING_FRAGMENT_REGION_BIT_EXT is not also specified, and the operations are not both in subpasses specified with VK_SUBPASS_DESCRIPTION_FRAGMENT_REGION_BIT_EXT, the regions are further split to only cover a single sample.

  - If the dependency is between commands that enable tile shading, instead of a single (x,y) position, each region covers multiple (x,y) positions according to the tile size and the specified apron.

- If the VK_DEPENDENCY_VIEW_LOCAL_BIT flag is specified in a synchronization command, each region covers a single (view).

- Each region in an automatic framebuffer-local dependency inserted between framebuffer-space operations performed by pipelines created with VK_PIPELINE_COLOR_BLEND_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_BIT_EXT, VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_EXT, or VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_EXT, covers a single (x,y,layer,sample) position.

If none of the above conditions partitions the regions across one of the x, y, layer, view, or sample dimensions, all coordinates for that dimension are included in each region. If this is true for all of those dimensions, the dependency is framebuffer-global.

Note | Framebuffer-local dependencies are more efficient for most architectures; particularly tile-based architectures - which can keep framebuffer-regions entirely in on-chip registers and thus avoid external bandwidth across such a dependency. Including a framebuffer-global dependency in your rendering will usually force all implementations to flush data to memory, or to a higher level cache, breaking any potential locality optimizations.

Note | It does not matter whether a framebuffer local dependency is within a single render pass or between two different render passes - the dependencies are always between regions with overlapping framebuffer coordinates.

#### 7.1.5. Device-Local Dependencies

Dependencies can be either device-local or non-device-local. A device-local dependency acts as multiple separate dependencies, one for each physical device that executes the synchronization command, where each dependency only includes operations from that physical device in both synchronization scopes. A non-device-local dependency is a single dependency where both synchronization scopes include operations from all physical devices that participate in the synchronization command. For subpass dependencies, all physical devices in the VkDeviceGroupRenderPassBeginInfo::`deviceMask` participate in the dependency, and for pipeline barriers all physical devices that are set in the command buffer’s current device mask participate in the dependency.

If a synchronization command includes a `dependencyFlags` parameter and specifies the VK_DEPENDENCY_DEVICE_GROUP_BIT flag, then it defines a non-device-local dependency for that synchronization command. If no `dependencyFlags` parameter is included or the VK_DEPENDENCY_DEVICE_GROUP_BIT flag is not specified, then it defines device-local dependencies for that synchronization command, for all participating physical devices.

Semaphore and event dependencies are device-local and only execute on the one physical device that performs the dependency.

### 7.2. Implicit Synchronization Guarantees

A small number of implicit ordering guarantees are provided by Vulkan, ensuring that the order in which commands are submitted is meaningful, and avoiding unnecessary complexity in common operations.

Submission order is a fundamental ordering in Vulkan, giving meaning to the order in which action and synchronization commands are recorded and submitted to a single queue. Explicit and implicit ordering guarantees between commands in Vulkan all work on the premise that this ordering is meaningful. This order does not itself define any execution or memory dependencies; synchronization commands and other orderings within the API use this ordering to define their scopes.

Submission order for any given set of commands is based on the order in which they were recorded to command buffers and then submitted. This order is determined as follows:

1. The initial order is determined by the order in which vkQueueSubmit and vkQueueSubmit2 commands are executed on the host, for a single queue, from first to last.

2. The order in which VkSubmitInfo structures are specified in the `pSubmits` parameter of vkQueueSubmit, or in which VkSubmitInfo2 structures are specified in the `pSubmits` parameter of vkQueueSubmit2, from lowest index to highest.

3. The order in which command buffers are specified in the `pCommandBuffers` member of VkSubmitInfo or VkSubmitInfo2 from lowest index to highest.

4. The order in which commands outside of a render pass were recorded to a command buffer on the host, from first to last.

5. The order in which commands inside a single subpass were recorded to a command buffer on the host, from first to last.

Note | When using a render pass object with multiple subpasses, commands in different subpasses have no defined submission order relative to each other, regardless of the order in which the subpasses were recorded. Commands within a subpass are still ordered relative to other commands in the same subpass, and those outside of the render pass.

State commands do not execute any operations on the device, instead they set the state of the command buffer when they execute on the host, in the order that they are recorded. Action commands consume the current state of the command buffer when they are recorded, and will execute state changes on the device as required to match the recorded state.

The order of primitives passing through the graphics pipeline and image layout transitions as part of an image memory barrier provide additional guarantees based on submission order.

Execution of pipeline stages within a given command also has a loose ordering, dependent only on a single command.

Signal operation order is a fundamental ordering in Vulkan, giving meaning to the order in which semaphore and fence signal operations occur when submitted to a single queue. The signal operation order for queue operations is determined as follows:

1. The initial order is determined by the order in which vkQueueSubmit and vkQueueSubmit2 commands are executed on the host, for a single queue, from first to last.

2. The order in which VkSubmitInfo structures are specified in the `pSubmits` parameter of vkQueueSubmit, or in which VkSubmitInfo2 structures are specified in the `pSubmits` parameter of vkQueueSubmit2, from lowest index to highest.

3. The fence signal operation defined by the `fence` parameter of the following commands and the VkAcquireNextImageInfoKHR::`fence` member of the variable referred to by the `pAcquireInfo` parameter of vkAcquireNextImage2KHR is ordered after all semaphore signal operations defined by that command:

   - vkQueueSubmit

   - vkQueueSubmit2

   - vkQueueBindSparse

   - vkAcquireNextImageKHR

Semaphore signal operations defined by a single VkSubmitInfo or VkSubmitInfo2 or VkBindSparseInfo structure are unordered with respect to other semaphore signal operations defined within the same structure.

The vkSignalSemaphore command does not execute on a queue but instead performs the signal operation from the host. The semaphore signal operation defined by executing a vkSignalSemaphore command happens-after the vkSignalSemaphore command is invoked and happens-before the command returns.

Note | When signaling timeline semaphores, it is the responsibility of the application to ensure that they are ordered such that the semaphore value is strictly increasing. Because the first synchronization scope for a semaphore signal operation contains all semaphore signal operations which occur earlier in submission order, all semaphore signal operations contained in any given batch are guaranteed to happen-after all semaphore signal operations contained in any previous batches. However, no ordering guarantee is provided between the semaphore signal operations defined within a single batch. This, combined with the requirement that timeline semaphore values strictly increase, means that it is invalid to signal the same timeline semaphore twice within a single batch. If an application wishes to ensure that some semaphore signal operation happens-after some other semaphore signal operation, it can submit a separate batch containing only semaphore signal operations, which will happen-after the semaphore signal operations in any earlier batches. When signaling a semaphore from the host, the only ordering guarantee is that the signal operation happens-after when vkSignalSemaphore is called and happens-before it returns. Therefore, it is invalid to call `vkSignalSemaphore` while there are any outstanding signal operations on that semaphore from any queue submissions unless those queue submissions have some dependency which ensures that they happen-after the host signal operation. One example of this would be if the pending signal operation is, itself, waiting on the same semaphore at a lower value and the call to `vkSignalSemaphore` signals that lower value. Furthermore, if there are two or more processes or threads signaling the same timeline semaphore from the host, the application must ensure that the `vkSignalSemaphore` with the lower semaphore value returns before `vkSignalSemaphore` is called with the higher value.

### 7.3. Fences

Fences are a synchronization primitive that can be used to insert a dependency from a queue to the host. Fences have two states - signaled and unsignaled. A fence can be signaled as part of the execution of a queue submission command. Fences can be unsignaled on the host with vkResetFences. Fences can be waited on by the host with the vkWaitForFences command, and the current state can be queried with vkGetFenceStatus.

The internal data of a fence may include a reference to any resources and pending work associated with signal or unsignal operations performed on that fence object, collectively referred to as the fence’s payload. Mechanisms to import and export that internal data to and from fences are provided below. These mechanisms indirectly enable applications to share fence state between two or more fences and other synchronization primitives across process and API boundaries.

Fences are represented by `VkFence` handles:

    // Provided by VK_VERSION_1_0
    VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkFence)

To create a fence, call:

    // Provided by VK_VERSION_1_0
    VkResult vkCreateFence(
        VkDevice                                    device,
        const VkFenceCreateInfo*                    pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkFence*                                    pFence);

- `device` is the logical device that creates the fence.

- `pCreateInfo` is a pointer to a VkFenceCreateInfo structure containing information about how the fence is to be created.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

- `pFence` is a pointer to a handle in which the resulting fence object is returned.

Valid Usage (Implicit)

- VUID-vkCreateFence-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkCreateFence-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkFenceCreateInfo structure

- VUID-vkCreateFence-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateFence-pFence-parameter
  `pFence` must be a valid pointer to a VkFence handle

- VUID-vkCreateFence-device-queuecount
  The device must have been created with at least `1` queue

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkFenceCreateInfo` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkFenceCreateInfo {
        VkStructureType       sType;
        const void*           pNext;
        VkFenceCreateFlags    flags;
    } VkFenceCreateInfo;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask of VkFenceCreateFlagBits specifying the initial state and behavior of the fence.

Valid Usage (Implicit)

- VUID-VkFenceCreateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_FENCE_CREATE_INFO

- VUID-VkFenceCreateInfo-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkExportFenceCreateInfo or VkExportFenceWin32HandleInfoKHR

- VUID-VkFenceCreateInfo-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkFenceCreateInfo-flags-parameter
  `flags` must be a valid combination of VkFenceCreateFlagBits values

    // Provided by VK_VERSION_1_0
    typedef enum VkFenceCreateFlagBits {
        VK_FENCE_CREATE_SIGNALED_BIT = 0x00000001,
    } VkFenceCreateFlagBits;

- VK_FENCE_CREATE_SIGNALED_BIT specifies that the fence object is created in the signaled state. Otherwise, it is created in the unsignaled state.

    // Provided by VK_VERSION_1_0
    typedef VkFlags VkFenceCreateFlags;

`VkFenceCreateFlags` is a bitmask type for setting a mask of zero or more VkFenceCreateFlagBits.

To create a fence whose payload can be exported to external handles, add a VkExportFenceCreateInfo structure to the `pNext` chain of the VkFenceCreateInfo structure. The `VkExportFenceCreateInfo` structure is defined as:

    // Provided by VK_VERSION_1_1
    typedef struct VkExportFenceCreateInfo {
        VkStructureType                   sType;
        const void*                       pNext;
        VkExternalFenceHandleTypeFlags    handleTypes;
    } VkExportFenceCreateInfo;

    // Provided by VK_KHR_external_fence
    // Equivalent to VkExportFenceCreateInfo
    typedef VkExportFenceCreateInfo VkExportFenceCreateInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `handleTypes` is a bitmask of VkExternalFenceHandleTypeFlagBits specifying one or more fence handle types the application can export from the resulting fence. The application can request multiple handle types for the same fence.

Valid Usage

- VUID-VkExportFenceCreateInfo-handleTypes-01446
  The bits in `handleTypes` must be supported and compatible, as reported by VkExternalFenceProperties

Valid Usage (Implicit)

- VUID-VkExportFenceCreateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO

- VUID-VkExportFenceCreateInfo-handleTypes-parameter
  `handleTypes` must be a valid combination of VkExternalFenceHandleTypeFlagBits values

Structure Chaining

Extends the structure

  - VkFenceCreateInfo

To specify additional attributes of NT handles exported from a fence, add a VkExportFenceWin32HandleInfoKHR structure to the `pNext` chain of the VkFenceCreateInfo structure. The `VkExportFenceWin32HandleInfoKHR` structure is defined as:

    // Provided by VK_KHR_external_fence_win32
    typedef struct VkExportFenceWin32HandleInfoKHR {
        VkStructureType               sType;
        const void*                   pNext;
        const SECURITY_ATTRIBUTES*    pAttributes;
        DWORD                         dwAccess;
        LPCWSTR                       name;
    } VkExportFenceWin32HandleInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `pAttributes` is a pointer to a Windows `SECURITY_ATTRIBUTES` structure specifying security attributes of the handle.

- `dwAccess` is a `DWORD` specifying access rights of the handle.

- `name` is a null-terminated UTF-16 string to associate with the underlying synchronization primitive referenced by NT handles exported from the created fence.

If VkExportFenceCreateInfo is not included in the same `pNext` chain, this structure is ignored.

If VkExportFenceCreateInfo is included in the `pNext` chain of VkFenceCreateInfo with a Windows `handleType`, but either `VkExportFenceWin32HandleInfoKHR` is not included in the `pNext` chain, or it is included but `pAttributes` is `NULL`, default security descriptor values will be used, and child processes created by the application will not inherit the handle, as described in the MSDN documentation for “Synchronization Object Security and Access Rights”1. Further, if the structure is not present, the access rights will be

`DXGI_SHARED_RESOURCE_READ` | `DXGI_SHARED_RESOURCE_WRITE`

for handles of the following types:

VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT

1

  https://docs.microsoft.com/en-us/windows/win32/sync/synchronization-object-security-and-access-rights

Valid Usage

- VUID-VkExportFenceWin32HandleInfoKHR-handleTypes-01447
  If VkExportFenceCreateInfo::`handleTypes` does not include VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT, a `VkExportFenceWin32HandleInfoKHR` structure must not be included in the `pNext` chain of VkFenceCreateInfo

Valid Usage (Implicit)

- VUID-VkExportFenceWin32HandleInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_EXPORT_FENCE_WIN32_HANDLE_INFO_KHR

- VUID-VkExportFenceWin32HandleInfoKHR-pAttributes-parameter
  If `pAttributes` is not `NULL`, `pAttributes` must be a valid pointer to a valid `SECURITY_ATTRIBUTES` value

Structure Chaining

Extends the structure

  - VkFenceCreateInfo

To export a Windows handle representing the state of a fence, call:

    // Provided by VK_KHR_external_fence_win32
    VkResult vkGetFenceWin32HandleKHR(
        VkDevice                                    device,
        const VkFenceGetWin32HandleInfoKHR*         pGetWin32HandleInfo,
        HANDLE*                                     pHandle);

- `device` is the logical device that created the fence being exported.

- `pGetWin32HandleInfo` is a pointer to a VkFenceGetWin32HandleInfoKHR structure containing parameters of the export operation.

- `pHandle` will return the Windows handle representing the fence state.

For handle types defined as NT handles, the handles returned by `vkGetFenceWin32HandleKHR` are owned by the application. To avoid leaking resources, the application must release ownership of them using the `CloseHandle` system call when they are no longer needed.

Exporting a Windows handle from a fence may have side effects depending on the transference of the specified handle type, as described in Importing Fence Payloads.

Valid Usage (Implicit)

- VUID-vkGetFenceWin32HandleKHR-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetFenceWin32HandleKHR-pGetWin32HandleInfo-parameter
  `pGetWin32HandleInfo` must be a valid pointer to a valid VkFenceGetWin32HandleInfoKHR structure

- VUID-vkGetFenceWin32HandleKHR-pHandle-parameter
  `pHandle` must be a valid pointer to a `HANDLE` value

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_TOO_MANY_OBJECTS

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkFenceGetWin32HandleInfoKHR` structure is defined as:

    // Provided by VK_KHR_external_fence_win32
    typedef struct VkFenceGetWin32HandleInfoKHR {
        VkStructureType                      sType;
        const void*                          pNext;
        VkFence                              fence;
        VkExternalFenceHandleTypeFlagBits    handleType;
    } VkFenceGetWin32HandleInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `fence` is the fence from which state will be exported.

- `handleType` is a VkExternalFenceHandleTypeFlagBits value specifying the type of handle requested.

The properties of the handle returned depend on the value of `handleType`. See VkExternalFenceHandleTypeFlagBits for a description of the properties of the defined external fence handle types.

Valid Usage

- VUID-VkFenceGetWin32HandleInfoKHR-handleType-01448
  `handleType` must have been included in VkExportFenceCreateInfo::`handleTypes` when the `fence`’s current payload was created

- VUID-VkFenceGetWin32HandleInfoKHR-handleType-01449
  If `handleType` is defined as an NT handle, vkGetFenceWin32HandleKHR must be called no more than once for each valid unique combination of `fence` and `handleType`

- VUID-VkFenceGetWin32HandleInfoKHR-fence-01450
  `fence` must not currently have its payload replaced by an imported payload as described below in Importing Fence Payloads unless that imported payload’s handle type was included in VkExternalFenceProperties::`exportFromImportedHandleTypes` for `handleType`

- VUID-VkFenceGetWin32HandleInfoKHR-handleType-01451
  If `handleType` refers to a handle type with copy payload transference semantics, `fence` must be signaled, or have an associated fence signal operation pending execution

- VUID-VkFenceGetWin32HandleInfoKHR-handleType-01452
  `handleType` must be defined as an NT handle or a global share handle

Valid Usage (Implicit)

- VUID-VkFenceGetWin32HandleInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_FENCE_GET_WIN32_HANDLE_INFO_KHR

- VUID-VkFenceGetWin32HandleInfoKHR-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkFenceGetWin32HandleInfoKHR-fence-parameter
  `fence` must be a valid VkFence handle

- VUID-VkFenceGetWin32HandleInfoKHR-handleType-parameter
  `handleType` must be a valid VkExternalFenceHandleTypeFlagBits value

To export a POSIX file descriptor representing the payload of a fence, call:

    // Provided by VK_KHR_external_fence_fd
    VkResult vkGetFenceFdKHR(
        VkDevice                                    device,
        const VkFenceGetFdInfoKHR*                  pGetFdInfo,
        int*                                        pFd);

- `device` is the logical device that created the fence being exported.

- `pGetFdInfo` is a pointer to a VkFenceGetFdInfoKHR structure containing parameters of the export operation.

- `pFd` will return the file descriptor representing the fence payload.

Each call to `vkGetFenceFdKHR` must create a new file descriptor and transfer ownership of it to the application. To avoid leaking resources, the application must release ownership of the file descriptor when it is no longer needed.

Note | Ownership can be released in many ways. For example, the application can call `close`() on the file descriptor, or transfer ownership back to Vulkan by using the file descriptor to import a fence payload.

If `pGetFdInfo->handleType` is VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT and the fence is signaled at the time `vkGetFenceFdKHR` is called, `pFd` may return the value `-1` instead of a valid file descriptor.

Where supported by the operating system, the implementation must set the file descriptor to be closed automatically when an `execve` system call is made.

Exporting a file descriptor from a fence may have side effects depending on the transference of the specified handle type, as described in Importing Fence State.

Valid Usage (Implicit)

- VUID-vkGetFenceFdKHR-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetFenceFdKHR-pGetFdInfo-parameter
  `pGetFdInfo` must be a valid pointer to a valid VkFenceGetFdInfoKHR structure

- VUID-vkGetFenceFdKHR-pFd-parameter
  `pFd` must be a valid pointer to an `int` value

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_TOO_MANY_OBJECTS

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkFenceGetFdInfoKHR` structure is defined as:

    // Provided by VK_KHR_external_fence_fd
    typedef struct VkFenceGetFdInfoKHR {
        VkStructureType                      sType;
        const void*                          pNext;
        VkFence                              fence;
        VkExternalFenceHandleTypeFlagBits    handleType;
    } VkFenceGetFdInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `fence` is the fence from which state will be exported.

- `handleType` is a VkExternalFenceHandleTypeFlagBits value specifying the type of handle requested.

The properties of the file descriptor returned depend on the value of `handleType`. See VkExternalFenceHandleTypeFlagBits for a description of the properties of the defined external fence handle types.

Valid Usage

- VUID-VkFenceGetFdInfoKHR-handleType-01453
  `handleType` must have been included in VkExportFenceCreateInfo::`handleTypes` when `fence`’s current payload was created

- VUID-VkFenceGetFdInfoKHR-handleType-01454
  If `handleType` refers to a handle type with copy payload transference semantics, `fence` must be signaled, or have an associated fence signal operation pending execution

- VUID-VkFenceGetFdInfoKHR-fence-01455
  `fence` must not currently have its payload replaced by an imported payload as described below in Importing Fence Payloads unless that imported payload’s handle type was included in VkExternalFenceProperties::`exportFromImportedHandleTypes` for `handleType`

- VUID-VkFenceGetFdInfoKHR-handleType-01456
  `handleType` must be defined as a POSIX file descriptor handle

Valid Usage (Implicit)

- VUID-VkFenceGetFdInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_FENCE_GET_FD_INFO_KHR

- VUID-VkFenceGetFdInfoKHR-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkFenceGetFdInfoKHR-fence-parameter
  `fence` must be a valid VkFence handle

- VUID-VkFenceGetFdInfoKHR-handleType-parameter
  `handleType` must be a valid VkExternalFenceHandleTypeFlagBits value

To destroy a fence, call:

    // Provided by VK_VERSION_1_0
    void vkDestroyFence(
        VkDevice                                    device,
        VkFence                                     fence,
        const VkAllocationCallbacks*                pAllocator);

- `device` is the logical device that destroys the fence.

- `fence` is the handle of the fence to destroy.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

Valid Usage

- VUID-vkDestroyFence-fence-01120
  All queue submission commands that refer to `fence` must have completed execution

- VUID-vkDestroyFence-fence-01121
  If `VkAllocationCallbacks` were provided when `fence` was created, a compatible set of callbacks must be provided here

- VUID-vkDestroyFence-fence-01122
  If no `VkAllocationCallbacks` were provided when `fence` was created, `pAllocator` must be `NULL`

Valid Usage (Implicit)

- VUID-vkDestroyFence-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkDestroyFence-fence-parameter
  If `fence` is not VK_NULL_HANDLE, `fence` must be a valid VkFence handle

- VUID-vkDestroyFence-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkDestroyFence-fence-parent
  If `fence` is a valid handle, it must have been created, allocated, or retrieved from `device`

Host Synchronization

- Host access to `fence` must be externally synchronized

To query the status of a fence from the host, call:

    // Provided by VK_VERSION_1_0
    VkResult vkGetFenceStatus(
        VkDevice                                    device,
        VkFence                                     fence);

- `device` is the logical device that owns the fence.

- `fence` is the handle of the fence to query.

Upon success, `vkGetFenceStatus` returns the status of the fence object, with the following return codes:

Table 5. Fence Object Status Codes
Status | Meaning
--- | ---
VK_SUCCESS | The fence specified by `fence` is signaled.
VK_NOT_READY | The fence specified by `fence` is unsignaled.
VK_ERROR_DEVICE_LOST | The device has been lost. See Lost Device.

If a queue submission command is pending execution, then the value returned by this command may immediately be out of date.

If the device has been lost (see Lost Device), `vkGetFenceStatus` may return any of the above status codes. If the device has been lost and `vkGetFenceStatus` is called repeatedly, it will eventually return either VK_SUCCESS or VK_ERROR_DEVICE_LOST.

Valid Usage (Implicit)

- VUID-vkGetFenceStatus-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetFenceStatus-fence-parameter
  `fence` must be a valid VkFence handle

- VUID-vkGetFenceStatus-fence-parent
  `fence` must have been created, allocated, or retrieved from `device`

Return Codes

Success

  - VK_NOT_READY

  - VK_SUCCESS

Failure

  - VK_ERROR_DEVICE_LOST

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

To set the state of fences to unsignaled from the host, call:

    // Provided by VK_VERSION_1_0
    VkResult vkResetFences(
        VkDevice                                    device,
        uint32_t                                    fenceCount,
        const VkFence*                              pFences);

- `device` is the logical device that owns the fences.

- `fenceCount` is the number of fences to reset.

- `pFences` is a pointer to an array of fence handles to reset.

If any member of `pFences` currently has its payload imported with temporary permanence, that fence’s prior permanent payload is first restored. The remaining operations described therefore operate on the restored payload.

When vkResetFences is executed on the host, it defines a fence unsignal operation for each fence, which resets the fence to the unsignaled state.

If any member of `pFences` is already in the unsignaled state when vkResetFences is executed, then vkResetFences has no effect on that fence.

Valid Usage

- VUID-vkResetFences-pFences-01123
  Each element of `pFences` must not be currently associated with any queue command that has not yet completed execution on that queue

Valid Usage (Implicit)

- VUID-vkResetFences-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkResetFences-pFences-parameter
  `pFences` must be a valid pointer to an array of `fenceCount` valid VkFence handles

- VUID-vkResetFences-fenceCount-arraylength
  `fenceCount` must be greater than `0`

- VUID-vkResetFences-pFences-parent
  Each element of `pFences` must have been created, allocated, or retrieved from `device`

Host Synchronization

- Host access to each member of `pFences` must be externally synchronized

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

When a fence is submitted to a queue as part of a queue submission command, it defines a memory dependency on the batches that were submitted as part of that command, and defines a fence signal operation which sets the fence to the signaled state.

The first synchronization scope includes every batch submitted in the same queue submission command. Fence signal operations that are defined by vkQueueSubmit or vkQueueSubmit2 additionally include in the first synchronization scope all commands that occur earlier in submission order. Fence signal operations that are defined by vkQueueSubmit or vkQueueSubmit2 or vkQueueBindSparse additionally include in the first synchronization scope any semaphore and fence signal operations that occur earlier in signal operation order.

The second synchronization scope only includes the fence signal operation.

The first access scope includes all memory access performed by the device.

The second access scope is empty.

To wait for one or more fences to enter the signaled state on the host, call:

    // Provided by VK_VERSION_1_0
    VkResult vkWaitForFences(
        VkDevice                                    device,
        uint32_t                                    fenceCount,
        const VkFence*                              pFences,
        VkBool32                                    waitAll,
        uint64_t                                    timeout);

- `device` is the logical device that owns the fences.

- `fenceCount` is the number of fences to wait on.

- `pFences` is a pointer to an array of `fenceCount` fence handles.

- `waitAll` is the condition that must be satisfied to successfully unblock the wait. If `waitAll` is VK_TRUE, then the condition is that all fences in `pFences` are signaled. Otherwise, the condition is that at least one fence in `pFences` is signaled.

- `timeout` is the timeout period in units of nanoseconds. `timeout` is adjusted to the closest value allowed by the implementation-dependent timeout accuracy, which may be substantially longer than one nanosecond, and may be longer than the requested period.

If the condition is satisfied when `vkWaitForFences` is called, then `vkWaitForFences` returns immediately. If the condition is not satisfied at the time `vkWaitForFences` is called, then `vkWaitForFences` will block and wait until the condition is satisfied or the `timeout` has expired, whichever is sooner.

If `timeout` is zero, then `vkWaitForFences` does not wait, but simply returns the current state of the fences. VK_TIMEOUT will be returned in this case if the condition is not satisfied, even though no actual wait was performed.

If the condition is satisfied before the `timeout` has expired, `vkWaitForFences` returns VK_SUCCESS. Otherwise, `vkWaitForFences` returns VK_TIMEOUT after the `timeout` has expired.

If device loss occurs (see Lost Device) before the timeout has expired, `vkWaitForFences` must return in finite time with either VK_SUCCESS or VK_ERROR_DEVICE_LOST.

Note | While we guarantee that `vkWaitForFences` must return in finite time, no guarantees are made that it returns immediately upon device loss. However, the application can reasonably expect that the delay will be on the order of seconds and that calling `vkWaitForFences` will not result in a permanently (or seemingly permanently) dead process.

Valid Usage (Implicit)

- VUID-vkWaitForFences-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkWaitForFences-pFences-parameter
  `pFences` must be a valid pointer to an array of `fenceCount` valid VkFence handles

- VUID-vkWaitForFences-fenceCount-arraylength
  `fenceCount` must be greater than `0`

- VUID-vkWaitForFences-pFences-parent
  Each element of `pFences` must have been created, allocated, or retrieved from `device`

Return Codes

Success

  - VK_SUCCESS

  - VK_TIMEOUT

Failure

  - VK_ERROR_DEVICE_LOST

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

An execution dependency is defined by waiting for a fence to become signaled, either via vkWaitForFences or by polling on vkGetFenceStatus.

The first synchronization scope includes only the fence signal operation.

The second synchronization scope includes the host operations of vkWaitForFences or vkGetFenceStatus indicating that the fence has become signaled.

Note | Signaling a fence and waiting on the host does not guarantee that the results of memory accesses will be visible to the host, as the access scope of a memory dependency defined by a fence only includes device access. A memory barrier or other memory dependency must be used to guarantee this. See the description of host access types for more information.

#### 7.3.1. Alternate Methods to Signal Fences

Besides submitting a fence to a queue as part of a queue submission command, a fence may also be signaled when a particular event occurs on a device or display.

To create a fence that will be signaled when an event occurs on a device, call:

    // Provided by VK_EXT_display_control
    VkResult vkRegisterDeviceEventEXT(
        VkDevice                                    device,
        const VkDeviceEventInfoEXT*                 pDeviceEventInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkFence*                                    pFence);

- `device` is a logical device on which the event may occur.

- `pDeviceEventInfo` is a pointer to a VkDeviceEventInfoEXT structure describing the event of interest to the application.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

- `pFence` is a pointer to a handle in which the resulting fence object is returned.

Valid Usage (Implicit)

- VUID-vkRegisterDeviceEventEXT-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkRegisterDeviceEventEXT-pDeviceEventInfo-parameter
  `pDeviceEventInfo` must be a valid pointer to a valid VkDeviceEventInfoEXT structure

- VUID-vkRegisterDeviceEventEXT-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkRegisterDeviceEventEXT-pFence-parameter
  `pFence` must be a valid pointer to a VkFence handle

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkDeviceEventInfoEXT` structure is defined as:

    // Provided by VK_EXT_display_control
    typedef struct VkDeviceEventInfoEXT {
        VkStructureType         sType;
        const void*             pNext;
        VkDeviceEventTypeEXT    deviceEvent;
    } VkDeviceEventInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `deviceEvent` is a VkDeviceEventTypeEXT value specifying when the fence will be signaled.

Valid Usage (Implicit)

- VUID-VkDeviceEventInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DEVICE_EVENT_INFO_EXT

- VUID-VkDeviceEventInfoEXT-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkDeviceEventInfoEXT-deviceEvent-parameter
  `deviceEvent` must be a valid VkDeviceEventTypeEXT value

Possible values of VkDeviceEventInfoEXT::`deviceEvent`, specifying when a fence will be signaled, are:

    // Provided by VK_EXT_display_control
    typedef enum VkDeviceEventTypeEXT {
        VK_DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT = 0,
    } VkDeviceEventTypeEXT;

- VK_DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT specifies that the fence is signaled when a display is plugged into or unplugged from the specified device. Applications can use this notification to determine when they need to re-enumerate the available displays on a device.

To create a fence that will be signaled when an event occurs on a VkDisplayKHR object, call:

    // Provided by VK_EXT_display_control
    VkResult vkRegisterDisplayEventEXT(
        VkDevice                                    device,
        VkDisplayKHR                                display,
        const VkDisplayEventInfoEXT*                pDisplayEventInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkFence*                                    pFence);

- `device` is a logical device associated with `display`

- `display` is the display on which the event may occur.

- `pDisplayEventInfo` is a pointer to a VkDisplayEventInfoEXT structure describing the event of interest to the application.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

- `pFence` is a pointer to a handle in which the resulting fence object is returned.

Valid Usage (Implicit)

- VUID-vkRegisterDisplayEventEXT-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkRegisterDisplayEventEXT-display-parameter
  `display` must be a valid VkDisplayKHR handle

- VUID-vkRegisterDisplayEventEXT-pDisplayEventInfo-parameter
  `pDisplayEventInfo` must be a valid pointer to a valid VkDisplayEventInfoEXT structure

- VUID-vkRegisterDisplayEventEXT-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkRegisterDisplayEventEXT-pFence-parameter
  `pFence` must be a valid pointer to a VkFence handle

- VUID-vkRegisterDisplayEventEXT-commonparent
  Both of `device`, and `display` must have been created, allocated, or retrieved from the same VkPhysicalDevice

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkDisplayEventInfoEXT` structure is defined as:

    // Provided by VK_EXT_display_control
    typedef struct VkDisplayEventInfoEXT {
        VkStructureType          sType;
        const void*              pNext;
        VkDisplayEventTypeEXT    displayEvent;
    } VkDisplayEventInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `displayEvent` is a VkDisplayEventTypeEXT specifying when the fence will be signaled.

Valid Usage (Implicit)

- VUID-VkDisplayEventInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DISPLAY_EVENT_INFO_EXT

- VUID-VkDisplayEventInfoEXT-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkDisplayEventInfoEXT-displayEvent-parameter
  `displayEvent` must be a valid VkDisplayEventTypeEXT value

Possible values of VkDisplayEventInfoEXT::`displayEvent`, specifying when a fence will be signaled, are:

    // Provided by VK_EXT_display_control
    typedef enum VkDisplayEventTypeEXT {
        VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT = 0,
    } VkDisplayEventTypeEXT;

- VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT specifies that the fence is signaled when the first pixel of the next display refresh cycle leaves the display engine for the display.

#### 7.3.2. Importing Fence Payloads

Applications can import a fence payload into an existing fence using an external fence handle. The effects of the import operation will be either temporary or permanent, as specified by the application. If the import is temporary, the fence will be restored to its permanent state the next time that fence is passed to vkResetFences.

Note | Restoring a fence to its prior permanent payload is a distinct operation from resetting a fence payload. See vkResetFences for more detail.

Performing a subsequent temporary import on a fence before resetting it has no effect on this requirement; the next unsignal of the fence must still restore its last permanent state. A permanent payload import behaves as if the target fence was destroyed, and a new fence was created with the same handle but the imported payload. Because importing a fence payload temporarily or permanently detaches the existing payload from a fence, similar usage restrictions to those applied to `vkDestroyFence` are applied to any command that imports a fence payload. Which of these import types is used is referred to as the import operation’s permanence. Each handle type supports either one or both types of permanence.

The implementation must perform the import operation by either referencing or copying the payload referred to by the specified external fence handle, depending on the handle’s type. The import method used is referred to as the handle type’s transference. When using handle types with reference transference, importing a payload to a fence adds the fence to the set of all fences sharing that payload. This set includes the fence from which the payload was exported. Fence signaling, waiting, and resetting operations performed on any fence in the set must behave as if the set were a single fence. Importing a payload using handle types with copy transference creates a duplicate copy of the payload at the time of import, but makes no further reference to it. Fence signaling, waiting, and resetting operations performed on the target of copy imports must not affect any other fence or payload.

Export operations have the same transference as the specified handle type’s import operations. Additionally, exporting a fence payload to a handle with copy transference has the same side effects on the source fence’s payload as executing a fence reset operation. If the fence was using a temporarily imported payload, the fence’s prior permanent payload will be restored.

Note | The tables Handle Types Supported by `VkImportFenceWin32HandleInfoKHR` and Handle Types Supported by `VkImportFenceFdInfoKHR` define the permanence and transference of each handle type.

External synchronization allows implementations to modify an object’s internal state, i.e. payload, without internal synchronization. However, for fences sharing a payload across processes, satisfying the external synchronization requirements of `VkFence` parameters as if all fences in the set were the same object is sometimes infeasible. Satisfying valid usage constraints on the state of a fence would similarly require impractical coordination or levels of trust between processes. Therefore, these constraints only apply to a specific fence handle, not to its payload. For distinct fence objects which share a payload:

- If multiple commands which queue a signal operation, or which unsignal a fence, are called concurrently, behavior will be as if the commands were called in an arbitrary sequential order.

- If a queue submission command is called with a fence that is sharing a payload, and the payload is already associated with another queue command that has not yet completed execution, either one or both of the commands will cause the fence to become signaled when they complete execution.

- If a fence payload is reset while it is associated with a queue command that has not yet completed execution, the payload will become unsignaled, but may become signaled again when the command completes execution.

- In the preceding cases, any of the devices associated with the fences sharing the payload may be lost, or any of the queue submission or fence reset commands may return VK_ERROR_INITIALIZATION_FAILED.

Other than these non-deterministic results, behavior is well defined. In particular:

- The implementation must not crash or enter an internally inconsistent state where future valid Vulkan commands might cause undefined results,

- Timeouts on future wait commands on fences sharing the payload must be effective.

Note | These rules allow processes to synchronize access to shared memory without trusting each other. However, such processes must still be cautious not to use the shared fence for more than synchronizing access to the shared memory. For example, a process should not use a fence with shared payload to tell when commands it submitted to a queue have completed and objects used by those commands may be destroyed, since the other process can accidentally or maliciously cause the fence to signal before the commands actually complete.

When a fence is using an imported payload, its VkExportFenceCreateInfo::`handleTypes` value is specified when creating the fence from which the payload was exported, rather than specified when creating the fence. Additionally, VkExternalFenceProperties::`exportFromImportedHandleTypes` restricts which handle types can be exported from such a fence based on the specific handle type used to import the current payload. Passing a fence to vkAcquireNextImageKHR is equivalent to temporarily importing a fence payload to that fence.

Note | Because the exportable handle types of an imported fence correspond to its current imported payload, and vkAcquireNextImageKHR behaves the same as a temporary import operation for which the source fence is opaque to the application, applications have no way of determining whether any external handle types can be exported from a fence in this state. Therefore, applications must not attempt to export handles from fences using a temporarily imported payload from vkAcquireNextImageKHR.

When importing a fence payload, it is the responsibility of the application to ensure the external handles meet all valid usage requirements. However, implementations must perform sufficient validation of external handles to ensure that the operation results in a valid fence which will not cause program termination, device loss, queue stalls, host thread stalls, or corruption of other resources when used as allowed according to its import parameters. If the external handle provided does not meet these requirements, the implementation must fail the fence payload import operation with the error code VK_ERROR_INVALID_EXTERNAL_HANDLE.

To import a fence payload from a Windows handle, call:

    // Provided by VK_KHR_external_fence_win32
    VkResult vkImportFenceWin32HandleKHR(
        VkDevice                                    device,
        const VkImportFenceWin32HandleInfoKHR*      pImportFenceWin32HandleInfo);

- `device` is the logical device that created the fence.

- `pImportFenceWin32HandleInfo` is a pointer to a VkImportFenceWin32HandleInfoKHR structure specifying the fence and import parameters.

Importing a fence payload from Windows handles does not transfer ownership of the handle to the Vulkan implementation. For handle types defined as NT handles, the application must release ownership using the `CloseHandle` system call when the handle is no longer needed.

Applications can import the same fence payload into multiple instances of Vulkan, into the same instance from which it was exported, and multiple times into a given Vulkan instance.

Valid Usage

- VUID-vkImportFenceWin32HandleKHR-fence-04448
  `fence` must not be associated with any queue command that has not yet completed execution on that queue

Valid Usage (Implicit)

- VUID-vkImportFenceWin32HandleKHR-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkImportFenceWin32HandleKHR-pImportFenceWin32HandleInfo-parameter
  `pImportFenceWin32HandleInfo` must be a valid pointer to a valid VkImportFenceWin32HandleInfoKHR structure

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_INVALID_EXTERNAL_HANDLE

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkImportFenceWin32HandleInfoKHR` structure is defined as:

    // Provided by VK_KHR_external_fence_win32
    typedef struct VkImportFenceWin32HandleInfoKHR {
        VkStructureType                      sType;
        const void*                          pNext;
        VkFence                              fence;
        VkFenceImportFlags                   flags;
        VkExternalFenceHandleTypeFlagBits    handleType;
        HANDLE                               handle;
        LPCWSTR                              name;
    } VkImportFenceWin32HandleInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `fence` is the fence into which the state will be imported.

- `flags` is a bitmask of VkFenceImportFlagBits specifying additional parameters for the fence payload import operation.

- `handleType` is a VkExternalFenceHandleTypeFlagBits value specifying the type of `handle`.

- `handle` is `NULL` or the external handle to import.

- `name` is `NULL` or a null-terminated UTF-16 string naming the underlying synchronization primitive to import.

The handle types supported by `handleType` are:

Table 6. Handle Types Supported by `VkImportFenceWin32HandleInfoKHR`
Handle Type | Transference | Permanence Supported
--- | --- | ---
VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT | Reference | Temporary,Permanent
VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT | Reference | Temporary,Permanent

Valid Usage

- VUID-VkImportFenceWin32HandleInfoKHR-handleType-01457
  `handleType` must be a value included in the Handle Types Supported by `VkImportFenceWin32HandleInfoKHR` table

- VUID-VkImportFenceWin32HandleInfoKHR-handleType-01459
  If `handleType` is not VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT, `name` must be `NULL`

- VUID-VkImportFenceWin32HandleInfoKHR-handleType-01460
  If `handle` is `NULL`, `name` must name a valid synchronization primitive of the type specified by `handleType`

- VUID-VkImportFenceWin32HandleInfoKHR-handleType-01461
  If `name` is `NULL`, `handle` must be a valid handle of the type specified by `handleType`

- VUID-VkImportFenceWin32HandleInfoKHR-handle-01462
  If `handle` is not `NULL`, `name` must be `NULL`

- VUID-VkImportFenceWin32HandleInfoKHR-handle-01539
  If `handle` is not `NULL`, it must obey any requirements listed for `handleType` in external fence handle types compatibility

- VUID-VkImportFenceWin32HandleInfoKHR-name-01540
  If `name` is not `NULL`, it must obey any requirements listed for `handleType` in external fence handle types compatibility

Valid Usage (Implicit)

- VUID-VkImportFenceWin32HandleInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_IMPORT_FENCE_WIN32_HANDLE_INFO_KHR

- VUID-VkImportFenceWin32HandleInfoKHR-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkImportFenceWin32HandleInfoKHR-fence-parameter
  `fence` must be a valid VkFence handle

- VUID-VkImportFenceWin32HandleInfoKHR-flags-parameter
  `flags` must be a valid combination of VkFenceImportFlagBits values

Host Synchronization

- Host access to `fence` must be externally synchronized

To import a fence payload from a POSIX file descriptor, call:

    // Provided by VK_KHR_external_fence_fd
    VkResult vkImportFenceFdKHR(
        VkDevice                                    device,
        const VkImportFenceFdInfoKHR*               pImportFenceFdInfo);

- `device` is the logical device that created the fence.

- `pImportFenceFdInfo` is a pointer to a VkImportFenceFdInfoKHR structure specifying the fence and import parameters.

Importing a fence payload from a file descriptor transfers ownership of the file descriptor from the application to the Vulkan implementation. The application must not perform any operations on the file descriptor after a successful import.

Applications can import the same fence payload into multiple instances of Vulkan, into the same instance from which it was exported, and multiple times into a given Vulkan instance.

Valid Usage

- VUID-vkImportFenceFdKHR-fence-01463
  `fence` must not be associated with any queue command that has not yet completed execution on that queue

Valid Usage (Implicit)

- VUID-vkImportFenceFdKHR-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkImportFenceFdKHR-pImportFenceFdInfo-parameter
  `pImportFenceFdInfo` must be a valid pointer to a valid VkImportFenceFdInfoKHR structure

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_INVALID_EXTERNAL_HANDLE

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkImportFenceFdInfoKHR` structure is defined as:

    // Provided by VK_KHR_external_fence_fd
    typedef struct VkImportFenceFdInfoKHR {
        VkStructureType                      sType;
        const void*                          pNext;
        VkFence                              fence;
        VkFenceImportFlags                   flags;
        VkExternalFenceHandleTypeFlagBits    handleType;
        int                                  fd;
    } VkImportFenceFdInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `fence` is the fence into which the payload will be imported.

- `flags` is a bitmask of VkFenceImportFlagBits specifying additional parameters for the fence payload import operation.

- `handleType` is a VkExternalFenceHandleTypeFlagBits value specifying the type of `fd`.

- `fd` is the external handle to import.

The handle types supported by `handleType` are:

Table 7. Handle Types Supported by `VkImportFenceFdInfoKHR`
Handle Type | Transference | Permanence Supported
--- | --- | ---
VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT | Reference | Temporary,Permanent
VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT | Copy | Temporary

Valid Usage

- VUID-VkImportFenceFdInfoKHR-handleType-01464
  `handleType` must be a value included in the Handle Types Supported by `VkImportFenceFdInfoKHR` table

- VUID-VkImportFenceFdInfoKHR-fd-01541
  `fd` must obey any requirements listed for `handleType` in external fence handle types compatibility

- VUID-VkImportFenceFdInfoKHR-handleType-07306
  If `handleType` refers to a handle type with copy payload transference semantics, `flags` must contain VK_FENCE_IMPORT_TEMPORARY_BIT

If `handleType` is VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT, the special value `-1` for `fd` is treated like a valid sync file descriptor referring to an object that has already signaled. The import operation will succeed and the `VkFence` will have a temporarily imported payload as if a valid file descriptor had been provided.

Note | This special behavior for importing an invalid sync file descriptor allows easier interoperability with other system APIs which use the convention that an invalid sync file descriptor represents work that has already completed and does not need to be waited for. It is consistent with the option for implementations to return a `-1` file descriptor when exporting a VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT from a `VkFence` which is signaled.

Valid Usage (Implicit)

- VUID-VkImportFenceFdInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_IMPORT_FENCE_FD_INFO_KHR

- VUID-VkImportFenceFdInfoKHR-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkImportFenceFdInfoKHR-fence-parameter
  `fence` must be a valid VkFence handle

- VUID-VkImportFenceFdInfoKHR-flags-parameter
  `flags` must be a valid combination of VkFenceImportFlagBits values

- VUID-VkImportFenceFdInfoKHR-handleType-parameter
  `handleType` must be a valid VkExternalFenceHandleTypeFlagBits value

Host Synchronization

- Host access to `fence` must be externally synchronized

Bits which can be set in

- VkImportFenceWin32HandleInfoKHR::`flags`

- VkImportFenceFdInfoKHR::`flags`

specifying additional parameters of a fence import operation are:

    // Provided by VK_VERSION_1_1
    typedef enum VkFenceImportFlagBits {
        VK_FENCE_IMPORT_TEMPORARY_BIT = 0x00000001,
      // Provided by VK_KHR_external_fence
        VK_FENCE_IMPORT_TEMPORARY_BIT_KHR = VK_FENCE_IMPORT_TEMPORARY_BIT,
    } VkFenceImportFlagBits;

    // Provided by VK_KHR_external_fence
    // Equivalent to VkFenceImportFlagBits
    typedef VkFenceImportFlagBits VkFenceImportFlagBitsKHR;

- VK_FENCE_IMPORT_TEMPORARY_BIT specifies that the fence payload will be imported only temporarily, as described in Importing Fence Payloads, regardless of the permanence of `handleType`.

    // Provided by VK_VERSION_1_1
    typedef VkFlags VkFenceImportFlags;

    // Provided by VK_KHR_external_fence
    // Equivalent to VkFenceImportFlags
    typedef VkFenceImportFlags VkFenceImportFlagsKHR;

`VkFenceImportFlags` is a bitmask type for setting a mask of zero or more VkFenceImportFlagBits.

### 7.4. Semaphores

Semaphores are a synchronization primitive that can be used to insert a dependency between queue operations or between a queue operation and the host. Binary semaphores have two states - signaled and unsignaled. Timeline semaphores have a strictly increasing 64-bit unsigned integer payload and are signaled with respect to a particular reference value. A semaphore can be signaled after execution of a queue operation is completed, and a queue operation can wait for a semaphore to become signaled before it begins execution. A timeline semaphore can additionally be signaled from the host with the vkSignalSemaphore command and waited on from the host with the vkWaitSemaphores command.

The internal data of a semaphore may include a reference to any resources and pending work associated with signal or unsignal operations performed on that semaphore object, collectively referred to as the semaphore’s payload. Mechanisms to import and export that internal data to and from semaphores are provided below. These mechanisms indirectly enable applications to share semaphore state between two or more semaphores and other synchronization primitives across process and API boundaries.

Semaphores are represented by `VkSemaphore` handles:

    // Provided by VK_VERSION_1_0
    VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSemaphore)

To create a semaphore, call:

    // Provided by VK_VERSION_1_0
    VkResult vkCreateSemaphore(
        VkDevice                                    device,
        const VkSemaphoreCreateInfo*                pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkSemaphore*                                pSemaphore);

- `device` is the logical device that creates the semaphore.

- `pCreateInfo` is a pointer to a VkSemaphoreCreateInfo structure containing information about how the semaphore is to be created.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

- `pSemaphore` is a pointer to a handle in which the resulting semaphore object is returned.

Valid Usage (Implicit)

- VUID-vkCreateSemaphore-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkCreateSemaphore-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkSemaphoreCreateInfo structure

- VUID-vkCreateSemaphore-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateSemaphore-pSemaphore-parameter
  `pSemaphore` must be a valid pointer to a VkSemaphore handle

- VUID-vkCreateSemaphore-device-queuecount
  The device must have been created with at least `1` queue

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkSemaphoreCreateInfo` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkSemaphoreCreateInfo {
        VkStructureType           sType;
        const void*               pNext;
        VkSemaphoreCreateFlags    flags;
    } VkSemaphoreCreateInfo;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is reserved for future use.

Valid Usage

- VUID-VkSemaphoreCreateInfo-pNext-06789
  If the `pNext` chain includes a VkExportMetalObjectCreateInfoEXT structure, its `exportObjectType` member must be VK_EXPORT_METAL_OBJECT_TYPE_METAL_SHARED_EVENT_BIT_EXT

Valid Usage (Implicit)

- VUID-VkSemaphoreCreateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO

- VUID-VkSemaphoreCreateInfo-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkExportMetalObjectCreateInfoEXT, VkExportSemaphoreCreateInfo, VkExportSemaphoreWin32HandleInfoKHR, VkImportMetalSharedEventInfoEXT, VkQueryLowLatencySupportNV, or VkSemaphoreTypeCreateInfo

- VUID-VkSemaphoreCreateInfo-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique, with the exception of structures of type VkExportMetalObjectCreateInfoEXT

- VUID-VkSemaphoreCreateInfo-flags-zerobitmask
  `flags` must be `0`

    // Provided by VK_VERSION_1_0
    typedef VkFlags VkSemaphoreCreateFlags;

`VkSemaphoreCreateFlags` is a bitmask type for setting a mask, but is currently reserved for future use.

The `VkSemaphoreTypeCreateInfo` structure is defined as:

    // Provided by VK_VERSION_1_2
    typedef struct VkSemaphoreTypeCreateInfo {
        VkStructureType    sType;
        const void*        pNext;
        VkSemaphoreType    semaphoreType;
        uint64_t           initialValue;
    } VkSemaphoreTypeCreateInfo;

    // Provided by VK_KHR_timeline_semaphore
    // Equivalent to VkSemaphoreTypeCreateInfo
    typedef VkSemaphoreTypeCreateInfo VkSemaphoreTypeCreateInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `semaphoreType` is a VkSemaphoreType value specifying the type of the semaphore.

- `initialValue` is the initial payload value if `semaphoreType` is VK_SEMAPHORE_TYPE_TIMELINE.

To create a semaphore of a specific type, add a `VkSemaphoreTypeCreateInfo` structure to the VkSemaphoreCreateInfo::`pNext` chain.

If no `VkSemaphoreTypeCreateInfo` structure is included in the `pNext` chain of VkSemaphoreCreateInfo, then the created semaphore will have a default VkSemaphoreType of VK_SEMAPHORE_TYPE_BINARY.

Valid Usage

- VUID-VkSemaphoreTypeCreateInfo-timelineSemaphore-03252
  If the `timelineSemaphore` feature is not enabled, `semaphoreType` must not equal VK_SEMAPHORE_TYPE_TIMELINE

- VUID-VkSemaphoreTypeCreateInfo-semaphoreType-03279
  If `semaphoreType` is VK_SEMAPHORE_TYPE_BINARY, `initialValue` must be zero

Valid Usage (Implicit)

- VUID-VkSemaphoreTypeCreateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SEMAPHORE_TYPE_CREATE_INFO

- VUID-VkSemaphoreTypeCreateInfo-semaphoreType-parameter
  `semaphoreType` must be a valid VkSemaphoreType value

Structure Chaining

Extends the structures

  - VkPhysicalDeviceExternalSemaphoreInfo

  - VkSemaphoreCreateInfo

Possible values of VkSemaphoreTypeCreateInfo::`semaphoreType`, specifying the type of a semaphore, are:

    // Provided by VK_VERSION_1_2
    typedef enum VkSemaphoreType {
        VK_SEMAPHORE_TYPE_BINARY = 0,
        VK_SEMAPHORE_TYPE_TIMELINE = 1,
      // Provided by VK_KHR_timeline_semaphore
        VK_SEMAPHORE_TYPE_BINARY_KHR = VK_SEMAPHORE_TYPE_BINARY,
      // Provided by VK_KHR_timeline_semaphore
        VK_SEMAPHORE_TYPE_TIMELINE_KHR = VK_SEMAPHORE_TYPE_TIMELINE,
    } VkSemaphoreType;

    // Provided by VK_KHR_timeline_semaphore
    // Equivalent to VkSemaphoreType
    typedef VkSemaphoreType VkSemaphoreTypeKHR;

- VK_SEMAPHORE_TYPE_BINARY specifies a binary semaphore type that has a boolean payload indicating whether the semaphore is currently signaled or unsignaled. When created, the semaphore is in the unsignaled state.

- VK_SEMAPHORE_TYPE_TIMELINE specifies a timeline semaphore type that has a strictly increasing 64-bit unsigned integer payload indicating whether the semaphore is signaled with respect to a particular reference value. When created, the semaphore payload has the value given by the `initialValue` field of VkSemaphoreTypeCreateInfo.

To create a semaphore whose payload can be exported to external handles, add a VkExportSemaphoreCreateInfo structure to the `pNext` chain of the VkSemaphoreCreateInfo structure. The `VkExportSemaphoreCreateInfo` structure is defined as:

    // Provided by VK_VERSION_1_1
    typedef struct VkExportSemaphoreCreateInfo {
        VkStructureType                       sType;
        const void*                           pNext;
        VkExternalSemaphoreHandleTypeFlags    handleTypes;
    } VkExportSemaphoreCreateInfo;

    // Provided by VK_KHR_external_semaphore
    // Equivalent to VkExportSemaphoreCreateInfo
    typedef VkExportSemaphoreCreateInfo VkExportSemaphoreCreateInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `handleTypes` is a bitmask of VkExternalSemaphoreHandleTypeFlagBits specifying one or more semaphore handle types the application can export from the resulting semaphore. The application can request multiple handle types for the same semaphore.

Valid Usage

- VUID-VkExportSemaphoreCreateInfo-handleTypes-01124
  The bits in `handleTypes` must be supported and compatible, as reported by VkExternalSemaphoreProperties

Valid Usage (Implicit)

- VUID-VkExportSemaphoreCreateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO

- VUID-VkExportSemaphoreCreateInfo-handleTypes-parameter
  `handleTypes` must be a valid combination of VkExternalSemaphoreHandleTypeFlagBits values

Structure Chaining

Extends the structure

  - VkSemaphoreCreateInfo

To specify additional attributes of NT handles exported from a semaphore, add a `VkExportSemaphoreWin32HandleInfoKHR` structure to the `pNext` chain of the VkSemaphoreCreateInfo structure. The `VkExportSemaphoreWin32HandleInfoKHR` structure is defined as:

    // Provided by VK_KHR_external_semaphore_win32
    typedef struct VkExportSemaphoreWin32HandleInfoKHR {
        VkStructureType               sType;
        const void*                   pNext;
        const SECURITY_ATTRIBUTES*    pAttributes;
        DWORD                         dwAccess;
        LPCWSTR                       name;
    } VkExportSemaphoreWin32HandleInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `pAttributes` is a pointer to a Windows `SECURITY_ATTRIBUTES` structure specifying security attributes of the handle.

- `dwAccess` is a `DWORD` specifying access rights of the handle.

- `name` is a null-terminated UTF-16 string to associate with the underlying synchronization primitive referenced by NT handles exported from the created semaphore.

If VkExportSemaphoreCreateInfo is not included in the same `pNext` chain, this structure is ignored.

If VkExportSemaphoreCreateInfo is included in the `pNext` chain of VkSemaphoreCreateInfo with a Windows `handleType`, but either `VkExportSemaphoreWin32HandleInfoKHR` is not included in the `pNext` chain, or it is included but `pAttributes` is `NULL`, default security descriptor values will be used, and child processes created by the application will not inherit the handle, as described in the MSDN documentation for “Synchronization Object Security and Access Rights”1. Further, if the structure is not present, the access rights used depend on the handle type.

For handles of the following types:

VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT

The implementation must ensure the access rights allow both signal and wait operations on the semaphore.

For handles of the following types:

VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT

The access rights must be:

`GENERIC_ALL`

1

  https://docs.microsoft.com/en-us/windows/win32/sync/synchronization-object-security-and-access-rights

Valid Usage

- VUID-VkExportSemaphoreWin32HandleInfoKHR-handleTypes-01125
  If VkExportSemaphoreCreateInfo::`handleTypes` does not include VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT or VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT, `VkExportSemaphoreWin32HandleInfoKHR` must not be included in the `pNext` chain of VkSemaphoreCreateInfo

Valid Usage (Implicit)

- VUID-VkExportSemaphoreWin32HandleInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR

- VUID-VkExportSemaphoreWin32HandleInfoKHR-pAttributes-parameter
  If `pAttributes` is not `NULL`, `pAttributes` must be a valid pointer to a valid `SECURITY_ATTRIBUTES` value

Structure Chaining

Extends the structure

  - VkSemaphoreCreateInfo

To export a Windows handle representing the payload of a semaphore, call:

    // Provided by VK_KHR_external_semaphore_win32
    VkResult vkGetSemaphoreWin32HandleKHR(
        VkDevice                                    device,
        const VkSemaphoreGetWin32HandleInfoKHR*     pGetWin32HandleInfo,
        HANDLE*                                     pHandle);

- `device` is the logical device that created the semaphore being exported.

- `pGetWin32HandleInfo` is a pointer to a VkSemaphoreGetWin32HandleInfoKHR structure containing parameters of the export operation.

- `pHandle` will return the Windows handle representing the semaphore state.

For handle types defined as NT handles, the handles returned by `vkGetSemaphoreWin32HandleKHR` are owned by the application. To avoid leaking resources, the application must release ownership of them using the `CloseHandle` system call when they are no longer needed.

Exporting a Windows handle from a semaphore may have side effects depending on the transference of the specified handle type, as described in Importing Semaphore Payloads.

Valid Usage (Implicit)

- VUID-vkGetSemaphoreWin32HandleKHR-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetSemaphoreWin32HandleKHR-pGetWin32HandleInfo-parameter
  `pGetWin32HandleInfo` must be a valid pointer to a valid VkSemaphoreGetWin32HandleInfoKHR structure

- VUID-vkGetSemaphoreWin32HandleKHR-pHandle-parameter
  `pHandle` must be a valid pointer to a `HANDLE` value

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_TOO_MANY_OBJECTS

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkSemaphoreGetWin32HandleInfoKHR` structure is defined as:

    // Provided by VK_KHR_external_semaphore_win32
    typedef struct VkSemaphoreGetWin32HandleInfoKHR {
        VkStructureType                          sType;
        const void*                              pNext;
        VkSemaphore                              semaphore;
        VkExternalSemaphoreHandleTypeFlagBits    handleType;
    } VkSemaphoreGetWin32HandleInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `semaphore` is the semaphore from which state will be exported.

- `handleType` is a VkExternalSemaphoreHandleTypeFlagBits value specifying the type of handle requested.

The properties of the handle returned depend on the value of `handleType`. See VkExternalSemaphoreHandleTypeFlagBits for a description of the properties of the defined external semaphore handle types.

Valid Usage

- VUID-VkSemaphoreGetWin32HandleInfoKHR-handleType-01126
  `handleType` must have been included in VkExportSemaphoreCreateInfo::`handleTypes` when the `semaphore`’s current payload was created

- VUID-VkSemaphoreGetWin32HandleInfoKHR-handleType-01127
  If `handleType` is defined as an NT handle, vkGetSemaphoreWin32HandleKHR must be called no more than once for each valid unique combination of `semaphore` and `handleType`

- VUID-VkSemaphoreGetWin32HandleInfoKHR-semaphore-01128
  `semaphore` must not currently have its payload replaced by an imported payload as described below in Importing Semaphore Payloads unless that imported payload’s handle type was included in VkExternalSemaphoreProperties::`exportFromImportedHandleTypes` for `handleType`

- VUID-VkSemaphoreGetWin32HandleInfoKHR-handleType-01129
  If `handleType` refers to a handle type with copy payload transference semantics, as defined below in Importing Semaphore Payloads, there must be no queue waiting on `semaphore`

- VUID-VkSemaphoreGetWin32HandleInfoKHR-handleType-01130
  If `handleType` refers to a handle type with copy payload transference semantics, `semaphore` must be signaled, or have an associated semaphore signal operation pending execution

- VUID-VkSemaphoreGetWin32HandleInfoKHR-handleType-01131
  `handleType` must be defined as an NT handle or a global share handle

Valid Usage (Implicit)

- VUID-VkSemaphoreGetWin32HandleInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SEMAPHORE_GET_WIN32_HANDLE_INFO_KHR

- VUID-VkSemaphoreGetWin32HandleInfoKHR-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkSemaphoreGetWin32HandleInfoKHR-semaphore-parameter
  `semaphore` must be a valid VkSemaphore handle

- VUID-VkSemaphoreGetWin32HandleInfoKHR-handleType-parameter
  `handleType` must be a valid VkExternalSemaphoreHandleTypeFlagBits value

The `VkQueryLowLatencySupportNV` structure is defined as:

    // Provided by VK_NV_low_latency
    typedef struct VkQueryLowLatencySupportNV {
        VkStructureType    sType;
        const void*        pNext;
        void*              pQueriedLowLatencyData;
    } VkQueryLowLatencySupportNV;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `pQueriedLowLatencyData` is used for NVIDIA Reflex Support.

Valid Usage (Implicit)

- VUID-VkQueryLowLatencySupportNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_QUERY_LOW_LATENCY_SUPPORT_NV

- VUID-VkQueryLowLatencySupportNV-pQueriedLowLatencyData-parameter
  `pQueriedLowLatencyData` must be a pointer value

Structure Chaining

Extends the structure

  - VkSemaphoreCreateInfo

To export a POSIX file descriptor representing the payload of a semaphore, call:

    // Provided by VK_KHR_external_semaphore_fd
    VkResult vkGetSemaphoreFdKHR(
        VkDevice                                    device,
        const VkSemaphoreGetFdInfoKHR*              pGetFdInfo,
        int*                                        pFd);

- `device` is the logical device that created the semaphore being exported.

- `pGetFdInfo` is a pointer to a VkSemaphoreGetFdInfoKHR structure containing parameters of the export operation.

- `pFd` will return the file descriptor representing the semaphore payload.

Each call to `vkGetSemaphoreFdKHR` must create a new file descriptor and transfer ownership of it to the application. To avoid leaking resources, the application must release ownership of the file descriptor when it is no longer needed.

Note | Ownership can be released in many ways. For example, the application can call `close`() on the file descriptor, or transfer ownership back to Vulkan by using the file descriptor to import a semaphore payload.

Where supported by the operating system, the implementation must set the file descriptor to be closed automatically when an `execve` system call is made.

Exporting a file descriptor from a semaphore may have side effects depending on the transference of the specified handle type, as described in Importing Semaphore State.

Valid Usage (Implicit)

- VUID-vkGetSemaphoreFdKHR-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetSemaphoreFdKHR-pGetFdInfo-parameter
  `pGetFdInfo` must be a valid pointer to a valid VkSemaphoreGetFdInfoKHR structure

- VUID-vkGetSemaphoreFdKHR-pFd-parameter
  `pFd` must be a valid pointer to an `int` value

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_TOO_MANY_OBJECTS

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkSemaphoreGetFdInfoKHR` structure is defined as:

    // Provided by VK_KHR_external_semaphore_fd
    typedef struct VkSemaphoreGetFdInfoKHR {
        VkStructureType                          sType;
        const void*                              pNext;
        VkSemaphore                              semaphore;
        VkExternalSemaphoreHandleTypeFlagBits    handleType;
    } VkSemaphoreGetFdInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `semaphore` is the semaphore from which state will be exported.

- `handleType` is a VkExternalSemaphoreHandleTypeFlagBits value specifying the type of handle requested.

The properties of the file descriptor returned depend on the value of `handleType`. See VkExternalSemaphoreHandleTypeFlagBits for a description of the properties of the defined external semaphore handle types.

Valid Usage

- VUID-VkSemaphoreGetFdInfoKHR-handleType-01132
  `handleType` must have been included in VkExportSemaphoreCreateInfo::`handleTypes` when `semaphore`’s current payload was created

- VUID-VkSemaphoreGetFdInfoKHR-semaphore-01133
  `semaphore` must not currently have its payload replaced by an imported payload as described below in Importing Semaphore Payloads unless that imported payload’s handle type was included in VkExternalSemaphoreProperties::`exportFromImportedHandleTypes` for `handleType`

- VUID-VkSemaphoreGetFdInfoKHR-handleType-01134
  If `handleType` refers to a handle type with copy payload transference semantics, as defined below in Importing Semaphore Payloads, there must be no queue waiting on `semaphore`

- VUID-VkSemaphoreGetFdInfoKHR-handleType-01135
  If `handleType` refers to a handle type with copy payload transference semantics, `semaphore` must be signaled, or have an associated semaphore signal operation pending execution

- VUID-VkSemaphoreGetFdInfoKHR-handleType-01136
  `handleType` must be defined as a POSIX file descriptor handle

- VUID-VkSemaphoreGetFdInfoKHR-handleType-03253
  If `handleType` refers to a handle type with copy payload transference semantics, `semaphore` must have been created with a VkSemaphoreType of VK_SEMAPHORE_TYPE_BINARY

- VUID-VkSemaphoreGetFdInfoKHR-handleType-03254
  If `handleType` refers to a handle type with copy payload transference semantics, `semaphore` must have an associated semaphore signal operation that has been submitted for execution and any semaphore signal operations on which it depends must have also been submitted for execution

Valid Usage (Implicit)

- VUID-VkSemaphoreGetFdInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SEMAPHORE_GET_FD_INFO_KHR

- VUID-VkSemaphoreGetFdInfoKHR-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkSemaphoreGetFdInfoKHR-semaphore-parameter
  `semaphore` must be a valid VkSemaphore handle

- VUID-VkSemaphoreGetFdInfoKHR-handleType-parameter
  `handleType` must be a valid VkExternalSemaphoreHandleTypeFlagBits value

To export a Zircon event handle representing the payload of a semaphore, call:

    // Provided by VK_FUCHSIA_external_semaphore
    VkResult vkGetSemaphoreZirconHandleFUCHSIA(
        VkDevice                                    device,
        const VkSemaphoreGetZirconHandleInfoFUCHSIA* pGetZirconHandleInfo,
        zx_handle_t*                                pZirconHandle);

- `device` is the logical device that created the semaphore being exported.

- `pGetZirconHandleInfo` is a pointer to a VkSemaphoreGetZirconHandleInfoFUCHSIA structure containing parameters of the export operation.

- `pZirconHandle` will return the Zircon event handle representing the semaphore payload.

Each call to `vkGetSemaphoreZirconHandleFUCHSIA` must create a Zircon event handle and transfer ownership of it to the application. To avoid leaking resources, the application must release ownership of the Zircon event handle when it is no longer needed.

Note | Ownership can be released in many ways. For example, the application can call zx_handle_close() on the file descriptor, or transfer ownership back to Vulkan by using the file descriptor to import a semaphore payload.

Exporting a Zircon event handle from a semaphore may have side effects depending on the transference of the specified handle type, as described in Importing Semaphore State.

Valid Usage (Implicit)

- VUID-vkGetSemaphoreZirconHandleFUCHSIA-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetSemaphoreZirconHandleFUCHSIA-pGetZirconHandleInfo-parameter
  `pGetZirconHandleInfo` must be a valid pointer to a valid VkSemaphoreGetZirconHandleInfoFUCHSIA structure

- VUID-vkGetSemaphoreZirconHandleFUCHSIA-pZirconHandle-parameter
  `pZirconHandle` must be a valid pointer to a `zx_handle_t` value

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_TOO_MANY_OBJECTS

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkSemaphoreGetZirconHandleInfoFUCHSIA` structure is defined as:

    // Provided by VK_FUCHSIA_external_semaphore
    typedef struct VkSemaphoreGetZirconHandleInfoFUCHSIA {
        VkStructureType                          sType;
        const void*                              pNext;
        VkSemaphore                              semaphore;
        VkExternalSemaphoreHandleTypeFlagBits    handleType;
    } VkSemaphoreGetZirconHandleInfoFUCHSIA;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `semaphore` is the semaphore from which state will be exported.

- `handleType` is a VkExternalSemaphoreHandleTypeFlagBits value specifying the type of handle requested.

The properties of the Zircon event handle returned depend on the value of `handleType`. See VkExternalSemaphoreHandleTypeFlagBits for a description of the properties of the defined external semaphore handle types.

Valid Usage

- VUID-VkSemaphoreGetZirconHandleInfoFUCHSIA-handleType-04758
  `handleType` must have been included in VkExportSemaphoreCreateInfo::`handleTypes` when `semaphore`’s current payload was created

- VUID-VkSemaphoreGetZirconHandleInfoFUCHSIA-semaphore-04759
  `semaphore` must not currently have its payload replaced by an imported payload as described below in Importing Semaphore Payloads unless that imported payload’s handle type was included in VkExternalSemaphoreProperties::`exportFromImportedHandleTypes` for `handleType`

- VUID-VkSemaphoreGetZirconHandleInfoFUCHSIA-handleType-04760
  If `handleType` refers to a handle type with copy payload transference semantics, as defined below in Importing Semaphore Payloads, there must be no queue waiting on `semaphore`

- VUID-VkSemaphoreGetZirconHandleInfoFUCHSIA-handleType-04761
  If `handleType` refers to a handle type with copy payload transference semantics, `semaphore` must be signaled, or have an associated semaphore signal operation pending execution

- VUID-VkSemaphoreGetZirconHandleInfoFUCHSIA-handleType-04762
  `handleType` must be defined as a Zircon event handle

- VUID-VkSemaphoreGetZirconHandleInfoFUCHSIA-semaphore-04763
  `semaphore` must have been created with a VkSemaphoreType of VK_SEMAPHORE_TYPE_BINARY

Valid Usage (Implicit)

- VUID-VkSemaphoreGetZirconHandleInfoFUCHSIA-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SEMAPHORE_GET_ZIRCON_HANDLE_INFO_FUCHSIA

- VUID-VkSemaphoreGetZirconHandleInfoFUCHSIA-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkSemaphoreGetZirconHandleInfoFUCHSIA-semaphore-parameter
  `semaphore` must be a valid VkSemaphore handle

- VUID-VkSemaphoreGetZirconHandleInfoFUCHSIA-handleType-parameter
  `handleType` must be a valid VkExternalSemaphoreHandleTypeFlagBits value

To destroy a semaphore, call:

    // Provided by VK_VERSION_1_0
    void vkDestroySemaphore(
        VkDevice                                    device,
        VkSemaphore                                 semaphore,
        const VkAllocationCallbacks*                pAllocator);

- `device` is the logical device that destroys the semaphore.

- `semaphore` is the handle of the semaphore to destroy.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

Valid Usage

- VUID-vkDestroySemaphore-semaphore-05149
  All submitted batches that refer to `semaphore` must have completed execution

- VUID-vkDestroySemaphore-semaphore-01138
  If `VkAllocationCallbacks` were provided when `semaphore` was created, a compatible set of callbacks must be provided here

- VUID-vkDestroySemaphore-semaphore-01139
  If no `VkAllocationCallbacks` were provided when `semaphore` was created, `pAllocator` must be `NULL`

Valid Usage (Implicit)

- VUID-vkDestroySemaphore-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkDestroySemaphore-semaphore-parameter
  If `semaphore` is not VK_NULL_HANDLE, `semaphore` must be a valid VkSemaphore handle

- VUID-vkDestroySemaphore-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkDestroySemaphore-semaphore-parent
  If `semaphore` is a valid handle, it must have been created, allocated, or retrieved from `device`

Host Synchronization

- Host access to `semaphore` must be externally synchronized

#### 7.4.1. Semaphore Signaling

When a batch is submitted to a queue via a queue submission, and it includes semaphores to be signaled, it defines a memory dependency on the batch, and defines semaphore signal operations which set the semaphores to the signaled state.

In case of semaphores created with a VkSemaphoreType of VK_SEMAPHORE_TYPE_TIMELINE the semaphore is considered signaled with respect to the counter value set to be signaled as specified in VkTimelineSemaphoreSubmitInfo or VkSemaphoreSignalInfo.

The first synchronization scope of a semaphore signal operation is defined by the command which defines it.

The second synchronization scope includes only the semaphore signal operation.

The first access scope includes all memory access performed by the device.

The second access scope is empty.

#### 7.4.2. Semaphore Waiting

When a batch is submitted to a queue via a queue submission, and it includes semaphores to be waited on, it defines a memory dependency between prior semaphore signal operations and the batch, and defines semaphore wait operations.

Such semaphore wait operations set the semaphores created with a VkSemaphoreType of VK_SEMAPHORE_TYPE_BINARY to the unsignaled state. In case of semaphores created with a VkSemaphoreType of VK_SEMAPHORE_TYPE_TIMELINE a prior semaphore signal operation defines a memory dependency with a semaphore wait operation if the value the semaphore is signaled with is greater than or equal to the value the semaphore is waited with, thus the semaphore will continue to be considered signaled with respect to the counter value waited on as specified in VkTimelineSemaphoreSubmitInfo.

The first synchronization scope of any wait semaphore operation includes one semaphore signal operation for each semaphore waited on by this batch. The specific signal operation waited on for each semaphore must meet the following criteria:

- for binary semaphores, the signal operation is either earlier in submission order on the same queue, or is submitted by a command whose host operation happens-before this batch is submitted on the host

- for binary semaphores, no wait operation exists that happens-after the signal operation and happens-before this wait operation

- the signal operation is not guaranteed to happen-after the semaphore wait operation in this batch

- for timeline semaphores, the signal value is greater than or equal to the wait value

If multiple semaphore signal operations meet these criteria, any of those operations may be included in the first synchronization scope. When waiting on a binary semaphore, applications must ensure that exactly one semaphore signal operation meets these criteria.

The second synchronization scope of a wait operation is defined by each command.

The first access scope is empty.

The second access scope includes all memory access performed by the device.

The semaphore wait operation happens-after the first set of operations in the execution dependency, and happens-before the second set of operations in the execution dependency.

Note | Unlike timeline semaphores, fences or events, waiting for a binary semaphore also unsignals that semaphore when the wait completes. Applications must ensure that between two such wait operations, the semaphore is signaled again, with execution dependencies used to ensure these occur in order. Binary semaphore waits and signals should thus occur in discrete 1:1 pairs.

#### 7.4.3. Semaphore State Requirements for Wait Operations

Before waiting on a semaphore, the application must ensure the semaphore is in a valid state for a wait operation. Specifically, when a semaphore wait operation is submitted to a queue:

- A binary semaphore must be signaled, or have an associated semaphore signal operation that is pending execution.

- Any semaphore signal operations on which the pending binary semaphore signal operation depends must also be completed or pending execution.

- There must be no other queue waiting on the same binary semaphore when the operation executes.

#### 7.4.4. Host Operations on Semaphores

In addition to semaphore signal operations and semaphore wait operations submitted to device queues, timeline semaphores support the following host operations:

- Query the current counter value of the semaphore using the vkGetSemaphoreCounterValue command.

- Wait for a set of semaphores to reach particular counter values using the vkWaitSemaphores command.

- Signal the semaphore with a particular counter value from the host using the vkSignalSemaphore command.

To query the current counter value of a semaphore created with a VkSemaphoreType of VK_SEMAPHORE_TYPE_TIMELINE from the host, call:

    // Provided by VK_VERSION_1_2
    VkResult vkGetSemaphoreCounterValue(
        VkDevice                                    device,
        VkSemaphore                                 semaphore,
        uint64_t*                                   pValue);

    // Provided by VK_KHR_timeline_semaphore
    // Equivalent to vkGetSemaphoreCounterValue
    VkResult vkGetSemaphoreCounterValueKHR(
        VkDevice                                    device,
        VkSemaphore                                 semaphore,
        uint64_t*                                   pValue);

- `device` is the logical device that owns the semaphore.

- `semaphore` is the handle of the semaphore to query.

- `pValue` is a pointer to a 64-bit integer value in which the current counter value of the semaphore is returned.

Note | If a queue submission command is pending execution, then the value returned by this command may immediately be out of date.

Valid Usage

- VUID-vkGetSemaphoreCounterValue-semaphore-03255
  `semaphore` must have been created with a VkSemaphoreType of VK_SEMAPHORE_TYPE_TIMELINE

Valid Usage (Implicit)

- VUID-vkGetSemaphoreCounterValue-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetSemaphoreCounterValue-semaphore-parameter
  `semaphore` must be a valid VkSemaphore handle

- VUID-vkGetSemaphoreCounterValue-pValue-parameter
  `pValue` must be a valid pointer to a `uint64_t` value

- VUID-vkGetSemaphoreCounterValue-semaphore-parent
  `semaphore` must have been created, allocated, or retrieved from `device`

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_DEVICE_LOST

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

To wait for a set of semaphores created with a VkSemaphoreType of VK_SEMAPHORE_TYPE_TIMELINE to reach particular counter values on the host, call:

    // Provided by VK_VERSION_1_2
    VkResult vkWaitSemaphores(
        VkDevice                                    device,
        const VkSemaphoreWaitInfo*                  pWaitInfo,
        uint64_t                                    timeout);

    // Provided by VK_KHR_timeline_semaphore
    // Equivalent to vkWaitSemaphores
    VkResult vkWaitSemaphoresKHR(
        VkDevice                                    device,
        const VkSemaphoreWaitInfo*                  pWaitInfo,
        uint64_t                                    timeout);

- `device` is the logical device that owns the semaphores.

- `pWaitInfo` is a pointer to a VkSemaphoreWaitInfo structure containing information about the wait condition.

- `timeout` is the timeout period in units of nanoseconds. `timeout` is adjusted to the closest value allowed by the implementation-dependent timeout accuracy, which may be substantially longer than one nanosecond, and may be longer than the requested period.

If the condition is satisfied when `vkWaitSemaphores` is called, then `vkWaitSemaphores` returns immediately. If the condition is not satisfied at the time `vkWaitSemaphores` is called, then `vkWaitSemaphores` will block and wait until the condition is satisfied or the `timeout` has expired, whichever is sooner.

If `timeout` is zero, then `vkWaitSemaphores` does not wait, but simply returns information about the current state of the semaphores. VK_TIMEOUT will be returned in this case if the condition is not satisfied, even though no actual wait was performed.

If the condition is satisfied before the `timeout` has expired, `vkWaitSemaphores` returns VK_SUCCESS. Otherwise, `vkWaitSemaphores` returns VK_TIMEOUT after the `timeout` has expired.

If device loss occurs (see Lost Device) before the timeout has expired, `vkWaitSemaphores` must return in finite time with either VK_SUCCESS or VK_ERROR_DEVICE_LOST.

Valid Usage (Implicit)

- VUID-vkWaitSemaphores-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkWaitSemaphores-pWaitInfo-parameter
  `pWaitInfo` must be a valid pointer to a valid VkSemaphoreWaitInfo structure

Return Codes

Success

  - VK_SUCCESS

  - VK_TIMEOUT

Failure

  - VK_ERROR_DEVICE_LOST

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkSemaphoreWaitInfo` structure is defined as:

    // Provided by VK_VERSION_1_2
    typedef struct VkSemaphoreWaitInfo {
        VkStructureType         sType;
        const void*             pNext;
        VkSemaphoreWaitFlags    flags;
        uint32_t                semaphoreCount;
        const VkSemaphore*      pSemaphores;
        const uint64_t*         pValues;
    } VkSemaphoreWaitInfo;

    // Provided by VK_KHR_timeline_semaphore
    // Equivalent to VkSemaphoreWaitInfo
    typedef VkSemaphoreWaitInfo VkSemaphoreWaitInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask of VkSemaphoreWaitFlagBits specifying additional parameters for the semaphore wait operation.

- `semaphoreCount` is the number of semaphores to wait on.

- `pSemaphores` is a pointer to an array of `semaphoreCount` semaphore handles to wait on.

- `pValues` is a pointer to an array of `semaphoreCount` timeline semaphore values.

Valid Usage

- VUID-VkSemaphoreWaitInfo-pSemaphores-03256
  All of the elements of `pSemaphores` must reference a semaphore that was created with a VkSemaphoreType of VK_SEMAPHORE_TYPE_TIMELINE

Valid Usage (Implicit)

- VUID-VkSemaphoreWaitInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SEMAPHORE_WAIT_INFO

- VUID-VkSemaphoreWaitInfo-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkSemaphoreWaitInfo-flags-parameter
  `flags` must be a valid combination of VkSemaphoreWaitFlagBits values

- VUID-VkSemaphoreWaitInfo-pSemaphores-parameter
  `pSemaphores` must be a valid pointer to an array of `semaphoreCount` valid VkSemaphore handles

- VUID-VkSemaphoreWaitInfo-pValues-parameter
  `pValues` must be a valid pointer to an array of `semaphoreCount` `uint64_t` values

- VUID-VkSemaphoreWaitInfo-semaphoreCount-arraylength
  `semaphoreCount` must be greater than `0`

Bits which can be set in VkSemaphoreWaitInfo::`flags`, specifying additional parameters of a semaphore wait operation, are:

    // Provided by VK_VERSION_1_2
    typedef enum VkSemaphoreWaitFlagBits {
        VK_SEMAPHORE_WAIT_ANY_BIT = 0x00000001,
      // Provided by VK_KHR_timeline_semaphore
        VK_SEMAPHORE_WAIT_ANY_BIT_KHR = VK_SEMAPHORE_WAIT_ANY_BIT,
    } VkSemaphoreWaitFlagBits;

    // Provided by VK_KHR_timeline_semaphore
    // Equivalent to VkSemaphoreWaitFlagBits
    typedef VkSemaphoreWaitFlagBits VkSemaphoreWaitFlagBitsKHR;

- VK_SEMAPHORE_WAIT_ANY_BIT specifies that the semaphore wait condition is that at least one of the semaphores in `VkSemaphoreWaitInfo`::`pSemaphores` has reached the value specified by the corresponding element of `VkSemaphoreWaitInfo`::`pValues`. If VK_SEMAPHORE_WAIT_ANY_BIT is not set, the semaphore wait condition is that all of the semaphores in `VkSemaphoreWaitInfo`::`pSemaphores` have reached the value specified by the corresponding element of `VkSemaphoreWaitInfo`::`pValues`.

    // Provided by VK_VERSION_1_2
    typedef VkFlags VkSemaphoreWaitFlags;

    // Provided by VK_KHR_timeline_semaphore
    // Equivalent to VkSemaphoreWaitFlags
    typedef VkSemaphoreWaitFlags VkSemaphoreWaitFlagsKHR;

`VkSemaphoreWaitFlags` is a bitmask type for setting a mask of zero or more VkSemaphoreWaitFlagBits.

To signal a semaphore created with a VkSemaphoreType of VK_SEMAPHORE_TYPE_TIMELINE with a particular counter value, on the host, call:

    // Provided by VK_VERSION_1_2
    VkResult vkSignalSemaphore(
        VkDevice                                    device,
        const VkSemaphoreSignalInfo*                pSignalInfo);

    // Provided by VK_KHR_timeline_semaphore
    // Equivalent to vkSignalSemaphore
    VkResult vkSignalSemaphoreKHR(
        VkDevice                                    device,
        const VkSemaphoreSignalInfo*                pSignalInfo);

- `device` is the logical device that owns the semaphore.

- `pSignalInfo` is a pointer to a VkSemaphoreSignalInfo structure containing information about the signal operation.

When `vkSignalSemaphore` is executed on the host, it defines and immediately executes a semaphore signal operation which sets the timeline semaphore to the given value.

The first synchronization scope is defined by the host execution model, but includes execution of `vkSignalSemaphore` on the host and anything that happened-before it.

The second synchronization scope is empty.

Valid Usage (Implicit)

- VUID-vkSignalSemaphore-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkSignalSemaphore-pSignalInfo-parameter
  `pSignalInfo` must be a valid pointer to a valid VkSemaphoreSignalInfo structure

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkSemaphoreSignalInfo` structure is defined as:

    // Provided by VK_VERSION_1_2
    typedef struct VkSemaphoreSignalInfo {
        VkStructureType    sType;
        const void*        pNext;
        VkSemaphore        semaphore;
        uint64_t           value;
    } VkSemaphoreSignalInfo;

    // Provided by VK_KHR_timeline_semaphore
    // Equivalent to VkSemaphoreSignalInfo
    typedef VkSemaphoreSignalInfo VkSemaphoreSignalInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `semaphore` is the handle of the semaphore to signal.

- `value` is the value to signal.

Valid Usage

- VUID-VkSemaphoreSignalInfo-semaphore-03257
  `semaphore` must have been created with a VkSemaphoreType of VK_SEMAPHORE_TYPE_TIMELINE

- VUID-VkSemaphoreSignalInfo-value-03258
  `value` must have a value greater than the current value of the semaphore

- VUID-VkSemaphoreSignalInfo-value-03259
  `value` must be less than the value of any pending semaphore signal operations

- VUID-VkSemaphoreSignalInfo-value-03260
  `value` must have a value which does not differ from the current value of the semaphore or the value of any outstanding semaphore wait or signal operation on `semaphore` by more than `maxTimelineSemaphoreValueDifference`

Valid Usage (Implicit)

- VUID-VkSemaphoreSignalInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SEMAPHORE_SIGNAL_INFO

- VUID-VkSemaphoreSignalInfo-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkSemaphoreSignalInfo-semaphore-parameter
  `semaphore` must be a valid VkSemaphore handle

#### 7.4.5. Importing Semaphore Payloads

Applications can import a semaphore payload into an existing semaphore using an external semaphore handle. The effects of the import operation will be either temporary or permanent, as specified by the application. If the import is temporary, the implementation must restore the semaphore to its prior permanent state after submitting the next semaphore wait operation. Performing a subsequent temporary import on a semaphore before performing a semaphore wait has no effect on this requirement; the next wait submitted on the semaphore must still restore its last permanent state. A permanent payload import behaves as if the target semaphore was destroyed, and a new semaphore was created with the same handle but the imported payload. Because importing a semaphore payload temporarily or permanently detaches the existing payload from a semaphore, similar usage restrictions to those applied to `vkDestroySemaphore` are applied to any command that imports a semaphore payload. Which of these import types is used is referred to as the import operation’s permanence. Each handle type supports either one or both types of permanence.

The implementation must perform the import operation by either referencing or copying the payload referred to by the specified external semaphore handle, depending on the handle’s type. The import method used is referred to as the handle type’s transference. When using handle types with reference transference, importing a payload to a semaphore adds the semaphore to the set of all semaphores sharing that payload. This set includes the semaphore from which the payload was exported. Semaphore signaling and waiting operations performed on any semaphore in the set must behave as if the set were a single semaphore. Importing a payload using handle types with copy transference creates a duplicate copy of the payload at the time of import, but makes no further reference to it. Semaphore signaling and waiting operations performed on the target of copy imports must not affect any other semaphore or payload.

Export operations have the same transference as the specified handle type’s import operations. Additionally, exporting a semaphore payload to a handle with copy transference has the same side effects on the source semaphore’s payload as executing a semaphore wait operation. If the semaphore was using a temporarily imported payload, the semaphore’s prior permanent payload will be restored.

Note | The permanence and transference of handle types can be found in: Handle Types Supported by `VkImportSemaphoreWin32HandleInfoKHR` Handle Types Supported by `VkImportSemaphoreFdInfoKHR` Handle Types Supported by `VkImportSemaphoreZirconHandleInfoFUCHSIA`

External synchronization allows implementations to modify an object’s internal state, i.e. payload, without internal synchronization. However, for semaphores sharing a payload across processes, satisfying the external synchronization requirements of `VkSemaphore` parameters as if all semaphores in the set were the same object is sometimes infeasible. Satisfying the wait operation state requirements would similarly require impractical coordination or levels of trust between processes. Therefore, these constraints only apply to a specific semaphore handle, not to its payload. For distinct semaphore objects which share a payload, if the semaphores are passed to separate queue submission commands concurrently, behavior will be as if the commands were called in an arbitrary sequential order. If the wait operation state requirements are violated for the shared payload by a queue submission command, or if a signal operation is queued for a shared payload that is already signaled or has a pending signal operation, effects must be limited to one or more of the following:

- Returning VK_ERROR_INITIALIZATION_FAILED from the command which resulted in the violation.

- Losing the logical device on which the violation occurred immediately or at a future time, resulting in a VK_ERROR_DEVICE_LOST error from subsequent commands, including the one causing the violation.

- Continuing execution of the violating command or operation as if the semaphore wait completed successfully after an implementation-dependent timeout. In this case, the state of the payload becomes undefined, and future operations on semaphores sharing the payload will be subject to these same rules. The semaphore must be destroyed or have its payload replaced by an import operation to again have a well-defined state.

Note | These rules allow processes to synchronize access to shared memory without trusting each other. However, such processes must still be cautious not to use the shared semaphore for more than synchronizing access to the shared memory. For example, a process should not use a shared semaphore as part of an execution dependency chain that, when complete, leads to objects being destroyed, if it does not trust other processes sharing the semaphore payload.

When a semaphore is using an imported payload, its VkExportSemaphoreCreateInfo::`handleTypes` value is specified when creating the semaphore from which the payload was exported, rather than specified when creating the semaphore. Additionally, VkExternalSemaphoreProperties::`exportFromImportedHandleTypes` restricts which handle types can be exported from such a semaphore based on the specific handle type used to import the current payload. Passing a semaphore to vkAcquireNextImageKHR is equivalent to temporarily importing a semaphore payload to that semaphore.

Note | Because the exportable handle types of an imported semaphore correspond to its current imported payload, and vkAcquireNextImageKHR behaves the same as a temporary import operation for which the source semaphore is opaque to the application, applications have no way of determining whether any external handle types can be exported from a semaphore in this state. Therefore, applications must not attempt to export external handles from semaphores using a temporarily imported payload from vkAcquireNextImageKHR.

When importing a semaphore payload, it is the responsibility of the application to ensure the external handles meet all valid usage requirements. However, implementations must perform sufficient validation of external handles to ensure that the operation results in a valid semaphore which will not cause program termination, device loss, queue stalls, or corruption of other resources when used as allowed according to its import parameters, and excepting those side effects allowed for violations of the valid semaphore state for wait operations rules. If the external handle provided does not meet these requirements, the implementation must fail the semaphore payload import operation with the error code VK_ERROR_INVALID_EXTERNAL_HANDLE.

In addition, when importing a semaphore payload that is not compatible with the payload type corresponding to the VkSemaphoreType the semaphore was created with, the implementation may fail the semaphore payload import operation with the error code VK_ERROR_INVALID_EXTERNAL_HANDLE.

Note | As the introduction of the external semaphore handle type VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT predates that of timeline semaphores, support for importing semaphore payloads from external handles of that type into semaphores created (implicitly or explicitly) with a VkSemaphoreType of VK_SEMAPHORE_TYPE_BINARY is preserved for backwards compatibility. However, applications should prefer importing such handle types into semaphores created with a VkSemaphoreType of VK_SEMAPHORE_TYPE_TIMELINE.

To import a semaphore payload from a Windows handle, call:

    // Provided by VK_KHR_external_semaphore_win32
    VkResult vkImportSemaphoreWin32HandleKHR(
        VkDevice                                    device,
        const VkImportSemaphoreWin32HandleInfoKHR*  pImportSemaphoreWin32HandleInfo);

- `device` is the logical device that created the semaphore.

- `pImportSemaphoreWin32HandleInfo` is a pointer to a VkImportSemaphoreWin32HandleInfoKHR structure specifying the semaphore and import parameters.

Importing a semaphore payload from Windows handles does not transfer ownership of the handle to the Vulkan implementation. For handle types defined as NT handles, the application must release ownership using the `CloseHandle` system call when the handle is no longer needed.

Applications can import the same semaphore payload into multiple instances of Vulkan, into the same instance from which it was exported, and multiple times into a given Vulkan instance.

Valid Usage (Implicit)

- VUID-vkImportSemaphoreWin32HandleKHR-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkImportSemaphoreWin32HandleKHR-pImportSemaphoreWin32HandleInfo-parameter
  `pImportSemaphoreWin32HandleInfo` must be a valid pointer to a valid VkImportSemaphoreWin32HandleInfoKHR structure

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_INVALID_EXTERNAL_HANDLE

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkImportSemaphoreWin32HandleInfoKHR` structure is defined as:

    // Provided by VK_KHR_external_semaphore_win32
    typedef struct VkImportSemaphoreWin32HandleInfoKHR {
        VkStructureType                          sType;
        const void*                              pNext;
        VkSemaphore                              semaphore;
        VkSemaphoreImportFlags                   flags;
        VkExternalSemaphoreHandleTypeFlagBits    handleType;
        HANDLE                                   handle;
        LPCWSTR                                  name;
    } VkImportSemaphoreWin32HandleInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `semaphore` is the semaphore into which the payload will be imported.

- `flags` is a bitmask of VkSemaphoreImportFlagBits specifying additional parameters for the semaphore payload import operation.

- `handleType` is a VkExternalSemaphoreHandleTypeFlagBits value specifying the type of `handle`.

- `handle` is `NULL` or the external handle to import.

- `name` is `NULL` or a null-terminated UTF-16 string naming the underlying synchronization primitive to import.

The handle types supported by `handleType` are:

Table 8. Handle Types Supported by `VkImportSemaphoreWin32HandleInfoKHR`
Handle Type | Transference | Permanence Supported
--- | --- | ---
VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT | Reference | Temporary,Permanent
VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT | Reference | Temporary,Permanent
VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT | Reference | Temporary,Permanent

Valid Usage

- VUID-VkImportSemaphoreWin32HandleInfoKHR-handleType-01140
  `handleType` must be a value included in the Handle Types Supported by `VkImportSemaphoreWin32HandleInfoKHR` table

- VUID-VkImportSemaphoreWin32HandleInfoKHR-handleType-01466
  If `handleType` is not VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT or VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT, `name` must be `NULL`

- VUID-VkImportSemaphoreWin32HandleInfoKHR-handleType-01467
  If `handle` is `NULL`, `name` must name a valid synchronization primitive of the type specified by `handleType`

- VUID-VkImportSemaphoreWin32HandleInfoKHR-handleType-01468
  If `name` is `NULL`, `handle` must be a valid handle of the type specified by `handleType`

- VUID-VkImportSemaphoreWin32HandleInfoKHR-handle-01469
  If `handle` is not `NULL`, `name` must be `NULL`

- VUID-VkImportSemaphoreWin32HandleInfoKHR-handle-01542
  If `handle` is not `NULL`, it must obey any requirements listed for `handleType` in external semaphore handle types compatibility

- VUID-VkImportSemaphoreWin32HandleInfoKHR-name-01543
  If `name` is not `NULL`, it must obey any requirements listed for `handleType` in external semaphore handle types compatibility

- VUID-VkImportSemaphoreWin32HandleInfoKHR-handleType-03261
  If `handleType` is VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT or VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT, the VkSemaphoreCreateInfo::`flags` field must match that of the semaphore from which `handle` or `name` was exported

- VUID-VkImportSemaphoreWin32HandleInfoKHR-handleType-03262
  If `handleType` is VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT or VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT, the VkSemaphoreTypeCreateInfo::`semaphoreType` field must match that of the semaphore from which `handle` or `name` was exported

- VUID-VkImportSemaphoreWin32HandleInfoKHR-flags-03322
  If `flags` contains VK_SEMAPHORE_IMPORT_TEMPORARY_BIT, the VkSemaphoreTypeCreateInfo::`semaphoreType` field of the semaphore from which `handle` or `name` was exported must not be VK_SEMAPHORE_TYPE_TIMELINE

Valid Usage (Implicit)

- VUID-VkImportSemaphoreWin32HandleInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR

- VUID-VkImportSemaphoreWin32HandleInfoKHR-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkImportSemaphoreWin32HandleInfoKHR-semaphore-parameter
  `semaphore` must be a valid VkSemaphore handle

- VUID-VkImportSemaphoreWin32HandleInfoKHR-flags-parameter
  `flags` must be a valid combination of VkSemaphoreImportFlagBits values

Host Synchronization

- Host access to `semaphore` must be externally synchronized

To import a semaphore payload from a POSIX file descriptor, call:

    // Provided by VK_KHR_external_semaphore_fd
    VkResult vkImportSemaphoreFdKHR(
        VkDevice                                    device,
        const VkImportSemaphoreFdInfoKHR*           pImportSemaphoreFdInfo);

- `device` is the logical device that created the semaphore.

- `pImportSemaphoreFdInfo` is a pointer to a VkImportSemaphoreFdInfoKHR structure specifying the semaphore and import parameters.

Importing a semaphore payload from a file descriptor transfers ownership of the file descriptor from the application to the Vulkan implementation. The application must not perform any operations on the file descriptor after a successful import.

Applications can import the same semaphore payload into multiple instances of Vulkan, into the same instance from which it was exported, and multiple times into a given Vulkan instance.

Valid Usage

- VUID-vkImportSemaphoreFdKHR-semaphore-01142
  `semaphore` must not be associated with any queue command that has not yet completed execution on that queue

Valid Usage (Implicit)

- VUID-vkImportSemaphoreFdKHR-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkImportSemaphoreFdKHR-pImportSemaphoreFdInfo-parameter
  `pImportSemaphoreFdInfo` must be a valid pointer to a valid VkImportSemaphoreFdInfoKHR structure

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_INVALID_EXTERNAL_HANDLE

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkImportSemaphoreFdInfoKHR` structure is defined as:

    // Provided by VK_KHR_external_semaphore_fd
    typedef struct VkImportSemaphoreFdInfoKHR {
        VkStructureType                          sType;
        const void*                              pNext;
        VkSemaphore                              semaphore;
        VkSemaphoreImportFlags                   flags;
        VkExternalSemaphoreHandleTypeFlagBits    handleType;
        int                                      fd;
    } VkImportSemaphoreFdInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `semaphore` is the semaphore into which the payload will be imported.

- `flags` is a bitmask of VkSemaphoreImportFlagBits specifying additional parameters for the semaphore payload import operation.

- `handleType` is a VkExternalSemaphoreHandleTypeFlagBits value specifying the type of `fd`.

- `fd` is the external handle to import.

The handle types supported by `handleType` are:

Table 9. Handle Types Supported by `VkImportSemaphoreFdInfoKHR`
Handle Type | Transference | Permanence Supported
--- | --- | ---
VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT | Reference | Temporary,Permanent
VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT | Copy | Temporary

Valid Usage

- VUID-VkImportSemaphoreFdInfoKHR-handleType-01143
  `handleType` must be a value included in the Handle Types Supported by `VkImportSemaphoreFdInfoKHR` table

- VUID-VkImportSemaphoreFdInfoKHR-fd-01544
  `fd` must obey any requirements listed for `handleType` in external semaphore handle types compatibility

- VUID-VkImportSemaphoreFdInfoKHR-handleType-03263
  If `handleType` is VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT, the VkSemaphoreCreateInfo::`flags` field must match that of the semaphore from which `fd` was exported

- VUID-VkImportSemaphoreFdInfoKHR-handleType-07307
  If `handleType` refers to a handle type with copy payload transference semantics, `flags` must contain VK_SEMAPHORE_IMPORT_TEMPORARY_BIT

- VUID-VkImportSemaphoreFdInfoKHR-handleType-03264
  If `handleType` is VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT, the VkSemaphoreTypeCreateInfo::`semaphoreType` field must match that of the semaphore from which `fd` was exported

- VUID-VkImportSemaphoreFdInfoKHR-flags-03323
  If `flags` contains VK_SEMAPHORE_IMPORT_TEMPORARY_BIT, the VkSemaphoreTypeCreateInfo::`semaphoreType` field of the semaphore from which `fd` was exported must not be VK_SEMAPHORE_TYPE_TIMELINE

If `handleType` is VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT, the special value `-1` for `fd` is treated like a valid sync file descriptor referring to an object that has already signaled. The import operation will succeed and the `VkSemaphore` will have a temporarily imported payload as if a valid file descriptor had been provided.

Note | This special behavior for importing an invalid sync file descriptor allows easier interoperability with other system APIs which use the convention that an invalid sync file descriptor represents work that has already completed and does not need to be waited for. It is consistent with the option for implementations to return a `-1` file descriptor when exporting a VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT from a `VkSemaphore` which is signaled.

Valid Usage (Implicit)

- VUID-VkImportSemaphoreFdInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_FD_INFO_KHR

- VUID-VkImportSemaphoreFdInfoKHR-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkImportSemaphoreFdInfoKHR-semaphore-parameter
  `semaphore` must be a valid VkSemaphore handle

- VUID-VkImportSemaphoreFdInfoKHR-flags-parameter
  `flags` must be a valid combination of VkSemaphoreImportFlagBits values

- VUID-VkImportSemaphoreFdInfoKHR-handleType-parameter
  `handleType` must be a valid VkExternalSemaphoreHandleTypeFlagBits value

Host Synchronization

- Host access to `semaphore` must be externally synchronized

To import a semaphore payload from a Zircon event handle, call:

    // Provided by VK_FUCHSIA_external_semaphore
    VkResult vkImportSemaphoreZirconHandleFUCHSIA(
        VkDevice                                    device,
        const VkImportSemaphoreZirconHandleInfoFUCHSIA* pImportSemaphoreZirconHandleInfo);

- `device` is the logical device that created the semaphore.

- `pImportSemaphoreZirconHandleInfo` is a pointer to a VkImportSemaphoreZirconHandleInfoFUCHSIA structure specifying the semaphore and import parameters.

Importing a semaphore payload from a Zircon event handle transfers ownership of the handle from the application to the Vulkan implementation. The application must not perform any operations on the handle after a successful import.

Applications can import the same semaphore payload into multiple instances of Vulkan, into the same instance from which it was exported, and multiple times into a given Vulkan instance.

Valid Usage

- VUID-vkImportSemaphoreZirconHandleFUCHSIA-semaphore-04764
  `semaphore` must not be associated with any queue command that has not yet completed execution on that queue

Valid Usage (Implicit)

- VUID-vkImportSemaphoreZirconHandleFUCHSIA-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkImportSemaphoreZirconHandleFUCHSIA-pImportSemaphoreZirconHandleInfo-parameter
  `pImportSemaphoreZirconHandleInfo` must be a valid pointer to a valid VkImportSemaphoreZirconHandleInfoFUCHSIA structure

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_INVALID_EXTERNAL_HANDLE

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkImportSemaphoreZirconHandleInfoFUCHSIA` structure is defined as:

    // Provided by VK_FUCHSIA_external_semaphore
    typedef struct VkImportSemaphoreZirconHandleInfoFUCHSIA {
        VkStructureType                          sType;
        const void*                              pNext;
        VkSemaphore                              semaphore;
        VkSemaphoreImportFlags                   flags;
        VkExternalSemaphoreHandleTypeFlagBits    handleType;
        zx_handle_t                              zirconHandle;
    } VkImportSemaphoreZirconHandleInfoFUCHSIA;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `semaphore` is the semaphore into which the payload will be imported.

- `flags` is a bitmask of VkSemaphoreImportFlagBits specifying additional parameters for the semaphore payload import operation.

- `handleType` is a VkExternalSemaphoreHandleTypeFlagBits value specifying the type of `zirconHandle`.

- `zirconHandle` is the external handle to import.

The handle types supported by `handleType` are:

Table 10. Handle Types Supported by `VkImportSemaphoreZirconHandleInfoFUCHSIA`
Handle Type | Transference | Permanence Supported
--- | --- | ---
VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_ZIRCON_EVENT_BIT_FUCHSIA | Reference | Temporary,Permanent

Valid Usage

- VUID-VkImportSemaphoreZirconHandleInfoFUCHSIA-handleType-04765
  `handleType` must be a value included in the Handle Types Supported by `VkImportSemaphoreZirconHandleInfoFUCHSIA` table

- VUID-VkImportSemaphoreZirconHandleInfoFUCHSIA-zirconHandle-04766
  `zirconHandle` must obey any requirements listed for `handleType` in external semaphore handle types compatibility

- VUID-VkImportSemaphoreZirconHandleInfoFUCHSIA-zirconHandle-04767
  `zirconHandle` must have `ZX_RIGHTS_BASIC` and `ZX_RIGHTS_SIGNAL` rights

- VUID-VkImportSemaphoreZirconHandleInfoFUCHSIA-semaphoreType-04768
  The VkSemaphoreTypeCreateInfo::`semaphoreType` field must not be VK_SEMAPHORE_TYPE_TIMELINE

Valid Usage (Implicit)

- VUID-VkImportSemaphoreZirconHandleInfoFUCHSIA-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_ZIRCON_HANDLE_INFO_FUCHSIA

- VUID-VkImportSemaphoreZirconHandleInfoFUCHSIA-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkImportSemaphoreZirconHandleInfoFUCHSIA-semaphore-parameter
  `semaphore` must be a valid VkSemaphore handle

- VUID-VkImportSemaphoreZirconHandleInfoFUCHSIA-flags-parameter
  `flags` must be a valid combination of VkSemaphoreImportFlagBits values

- VUID-VkImportSemaphoreZirconHandleInfoFUCHSIA-handleType-parameter
  `handleType` must be a valid VkExternalSemaphoreHandleTypeFlagBits value

Host Synchronization

- Host access to `semaphore` must be externally synchronized

Bits which can be set in

- VkImportSemaphoreWin32HandleInfoKHR::`flags`

- VkImportSemaphoreFdInfoKHR::`flags`

- VkImportSemaphoreZirconHandleInfoFUCHSIA::`flags`

specifying additional parameters of a semaphore import operation are:

    // Provided by VK_VERSION_1_1
    typedef enum VkSemaphoreImportFlagBits {
        VK_SEMAPHORE_IMPORT_TEMPORARY_BIT = 0x00000001,
      // Provided by VK_KHR_external_semaphore
        VK_SEMAPHORE_IMPORT_TEMPORARY_BIT_KHR = VK_SEMAPHORE_IMPORT_TEMPORARY_BIT,
    } VkSemaphoreImportFlagBits;

    // Provided by VK_KHR_external_semaphore
    // Equivalent to VkSemaphoreImportFlagBits
    typedef VkSemaphoreImportFlagBits VkSemaphoreImportFlagBitsKHR;

These bits have the following meanings:

- VK_SEMAPHORE_IMPORT_TEMPORARY_BIT specifies that the semaphore payload will be imported only temporarily, as described in Importing Semaphore Payloads, regardless of the permanence of `handleType`.

    // Provided by VK_VERSION_1_1
    typedef VkFlags VkSemaphoreImportFlags;

    // Provided by VK_KHR_external_semaphore
    // Equivalent to VkSemaphoreImportFlags
    typedef VkSemaphoreImportFlags VkSemaphoreImportFlagsKHR;

`VkSemaphoreImportFlags` is a bitmask type for setting a mask of zero or more VkSemaphoreImportFlagBits.

### 7.5. Events

Events are a synchronization primitive that can be used to insert a fine-grained dependency between commands submitted to the same queue, or between the host and a queue. Events must not be used to insert a dependency between commands submitted to different queues. Events have two states - signaled and unsignaled. An application can signal or unsignal an event either on the host or on the device. A device can be made to wait for an event to become signaled before executing further operations. No command exists to wait for an event to become signaled on the host, but the current state of an event can be queried.

Events are represented by `VkEvent` handles:

    // Provided by VK_VERSION_1_0
    VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkEvent)

To create an event, call:

    // Provided by VK_VERSION_1_0
    VkResult vkCreateEvent(
        VkDevice                                    device,
        const VkEventCreateInfo*                    pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkEvent*                                    pEvent);

- `device` is the logical device that creates the event.

- `pCreateInfo` is a pointer to a VkEventCreateInfo structure containing information about how the event is to be created.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

- `pEvent` is a pointer to a handle in which the resulting event object is returned.

When created, the event object is in the unsignaled state.

Valid Usage

- VUID-vkCreateEvent-device-09672
  `device` must support at least one queue family with one of the VK_QUEUE_VIDEO_ENCODE_BIT_KHR, VK_QUEUE_VIDEO_DECODE_BIT_KHR, VK_QUEUE_COMPUTE_BIT, or VK_QUEUE_GRAPHICS_BIT capabilities

- VUID-vkCreateEvent-events-04468
  If the `VK_KHR_portability_subset` extension is enabled, and VkPhysicalDevicePortabilitySubsetFeaturesKHR::`events` is VK_FALSE, then the implementation does not support events, and vkCreateEvent must not be used

Valid Usage (Implicit)

- VUID-vkCreateEvent-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkCreateEvent-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkEventCreateInfo structure

- VUID-vkCreateEvent-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateEvent-pEvent-parameter
  `pEvent` must be a valid pointer to a VkEvent handle

- VUID-vkCreateEvent-device-queuecount
  The device must have been created with at least `1` queue

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkEventCreateInfo` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkEventCreateInfo {
        VkStructureType       sType;
        const void*           pNext;
        VkEventCreateFlags    flags;
    } VkEventCreateInfo;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask of VkEventCreateFlagBits defining additional creation parameters.

Valid Usage

- VUID-VkEventCreateInfo-pNext-06790
  If the `pNext` chain includes a VkExportMetalObjectCreateInfoEXT structure, its `exportObjectType` member must be VK_EXPORT_METAL_OBJECT_TYPE_METAL_SHARED_EVENT_BIT_EXT

Valid Usage (Implicit)

- VUID-VkEventCreateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_EVENT_CREATE_INFO

- VUID-VkEventCreateInfo-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkExportMetalObjectCreateInfoEXT or VkImportMetalSharedEventInfoEXT

- VUID-VkEventCreateInfo-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique, with the exception of structures of type VkExportMetalObjectCreateInfoEXT

- VUID-VkEventCreateInfo-flags-parameter
  `flags` must be a valid combination of VkEventCreateFlagBits values

    // Provided by VK_VERSION_1_0
    typedef enum VkEventCreateFlagBits {
      // Provided by VK_VERSION_1_3
        VK_EVENT_CREATE_DEVICE_ONLY_BIT = 0x00000001,
      // Provided by VK_KHR_synchronization2
        VK_EVENT_CREATE_DEVICE_ONLY_BIT_KHR = VK_EVENT_CREATE_DEVICE_ONLY_BIT,
    } VkEventCreateFlagBits;

- VK_EVENT_CREATE_DEVICE_ONLY_BIT specifies that host event commands will not be used with this event.

    // Provided by VK_VERSION_1_0
    typedef VkFlags VkEventCreateFlags;

`VkEventCreateFlags` is a bitmask type for setting a mask of VkEventCreateFlagBits.

To destroy an event, call:

    // Provided by VK_VERSION_1_0
    void vkDestroyEvent(
        VkDevice                                    device,
        VkEvent                                     event,
        const VkAllocationCallbacks*                pAllocator);

- `device` is the logical device that destroys the event.

- `event` is the handle of the event to destroy.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

Valid Usage

- VUID-vkDestroyEvent-event-01145
  All submitted commands that refer to `event` must have completed execution

- VUID-vkDestroyEvent-event-01146
  If `VkAllocationCallbacks` were provided when `event` was created, a compatible set of callbacks must be provided here

- VUID-vkDestroyEvent-event-01147
  If no `VkAllocationCallbacks` were provided when `event` was created, `pAllocator` must be `NULL`

Valid Usage (Implicit)

- VUID-vkDestroyEvent-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkDestroyEvent-event-parameter
  If `event` is not VK_NULL_HANDLE, `event` must be a valid VkEvent handle

- VUID-vkDestroyEvent-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkDestroyEvent-event-parent
  If `event` is a valid handle, it must have been created, allocated, or retrieved from `device`

Host Synchronization

- Host access to `event` must be externally synchronized

To query the state of an event from the host, call:

    // Provided by VK_VERSION_1_0
    VkResult vkGetEventStatus(
        VkDevice                                    device,
        VkEvent                                     event);

- `device` is the logical device that owns the event.

- `event` is the handle of the event to query.

Upon success, `vkGetEventStatus` returns the state of the event object with the following return codes:

Table 11. Event Object Status Codes
Status | Meaning
--- | ---
VK_EVENT_SET | The event specified by `event` is signaled.
VK_EVENT_RESET | The event specified by `event` is unsignaled.

If a `vkCmdSetEvent` or `vkCmdResetEvent` command is in a command buffer that is in the pending state, then the value returned by this command may immediately be out of date.

The state of an event can be updated by the host. The state of the event is immediately changed, and subsequent calls to `vkGetEventStatus` will return the new state. If an event is already in the requested state, then updating it to the same state has no effect.

Valid Usage

- VUID-vkGetEventStatus-event-03940
  `event` must not have been created with VK_EVENT_CREATE_DEVICE_ONLY_BIT

Valid Usage (Implicit)

- VUID-vkGetEventStatus-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetEventStatus-event-parameter
  `event` must be a valid VkEvent handle

- VUID-vkGetEventStatus-event-parent
  `event` must have been created, allocated, or retrieved from `device`

Return Codes

Success

  - VK_EVENT_RESET

  - VK_EVENT_SET

Failure

  - VK_ERROR_DEVICE_LOST

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

To set the state of an event to signaled from the host, call:

    // Provided by VK_VERSION_1_0
    VkResult vkSetEvent(
        VkDevice                                    device,
        VkEvent                                     event);

- `device` is the logical device that owns the event.

- `event` is the event to set.

When vkSetEvent is executed on the host, it defines an event signal operation which sets the event to the signaled state.

If `event` is already in the signaled state when vkSetEvent is executed, then vkSetEvent has no effect, and no event signal operation occurs.

Note | If a command buffer is waiting for an event to be signaled from the host, the application must signal the event before submitting the command buffer, as described in the queue forward progress section.

Valid Usage

- VUID-vkSetEvent-event-03941
  `event` must not have been created with VK_EVENT_CREATE_DEVICE_ONLY_BIT

- VUID-vkSetEvent-event-09543
  `event` must not be waited on by a command buffer in the pending state

Valid Usage (Implicit)

- VUID-vkSetEvent-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkSetEvent-event-parameter
  `event` must be a valid VkEvent handle

- VUID-vkSetEvent-event-parent
  `event` must have been created, allocated, or retrieved from `device`

Host Synchronization

- Host access to `event` must be externally synchronized

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

To set the state of an event to unsignaled from the host, call:

    // Provided by VK_VERSION_1_0
    VkResult vkResetEvent(
        VkDevice                                    device,
        VkEvent                                     event);

- `device` is the logical device that owns the event.

- `event` is the event to reset.

When vkResetEvent is executed on the host, it defines an event unsignal operation which resets the event to the unsignaled state.

If `event` is already in the unsignaled state when vkResetEvent is executed, then vkResetEvent has no effect, and no event unsignal operation occurs.

Valid Usage

- VUID-vkResetEvent-event-03821
  There must be an execution dependency between `vkResetEvent` and the execution of any vkCmdWaitEvents that includes `event` in its `pEvents` parameter

- VUID-vkResetEvent-event-03822
  There must be an execution dependency between `vkResetEvent` and the execution of any vkCmdWaitEvents2 that includes `event` in its `pEvents` parameter

- VUID-vkResetEvent-event-03823
  `event` must not have been created with VK_EVENT_CREATE_DEVICE_ONLY_BIT

Valid Usage (Implicit)

- VUID-vkResetEvent-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkResetEvent-event-parameter
  `event` must be a valid VkEvent handle

- VUID-vkResetEvent-event-parent
  `event` must have been created, allocated, or retrieved from `device`

Host Synchronization

- Host access to `event` must be externally synchronized

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The state of an event can also be updated on the device by commands inserted in command buffers.

To signal an event from a device, call:

    // Provided by VK_VERSION_1_3
    void vkCmdSetEvent2(
        VkCommandBuffer                             commandBuffer,
        VkEvent                                     event,
        const VkDependencyInfo*                     pDependencyInfo);

    // Provided by VK_KHR_synchronization2
    // Equivalent to vkCmdSetEvent2
    void vkCmdSetEvent2KHR(
        VkCommandBuffer                             commandBuffer,
        VkEvent                                     event,
        const VkDependencyInfo*                     pDependencyInfo);

- `commandBuffer` is the command buffer into which the command is recorded.

- `event` is the event that will be signaled.

- `pDependencyInfo` is a pointer to a VkDependencyInfo structure defining the first scopes of this operation.

When vkCmdSetEvent2 is submitted to a queue, it defines the first half of memory dependencies defined by `pDependencyInfo`, as well as an event signal operation which sets the event to the signaled state. A memory dependency is defined between the event signal operation and commands that occur earlier in submission order.

The first synchronization scope and access scope are defined by the union of all the memory dependencies defined by `pDependencyInfo`, and are applied to all operations that occur earlier in submission order. Queue family ownership transfers and image layout transitions defined by `pDependencyInfo` are also included in the first scopes.

The second synchronization scope includes only the event signal operation, and any queue family ownership transfers and image layout transitions defined by `pDependencyInfo`.

The second access scope includes only queue family ownership transfers and image layout transitions.

If VK_DEPENDENCY_ASYMMETRIC_EVENT_BIT_KHR is not set in `pDependencyInfo->dependencyFlags`, future vkCmdWaitEvents2 commands rely on all values of each element in `pDependencyInfo` matching exactly with those used to signal the corresponding event. If VK_DEPENDENCY_ASYMMETRIC_EVENT_BIT_KHR is set, `vkCmdSetEvent2` must only include the source stage mask of the first synchronization scope in `pDependencyInfo->pMemoryBarriers`[0].`srcStageMask`. vkCmdWaitEvents must not be used to wait on the result of a signal operation defined by `vkCmdSetEvent2`.

Note | The extra information provided by vkCmdSetEvent2 compared to vkCmdSetEvent allows implementations to more efficiently schedule the operations required to satisfy the requested dependencies. With vkCmdSetEvent, the full dependency information is not known until vkCmdWaitEvents is recorded, forcing implementations to insert the required operations at that point and not before.

If `event` is already in the signaled state when vkCmdSetEvent2 is executed on the device, then vkCmdSetEvent2 has no effect, no event signal operation occurs, and no dependency is generated.

Valid Usage

- VUID-vkCmdSetEvent2-synchronization2-03824
  The `synchronization2` feature must be enabled

- VUID-vkCmdSetEvent2-dependencyFlags-03825
  The `dependencyFlags` member of `pDependencyInfo` must be `0` or VK_DEPENDENCY_ASYMMETRIC_EVENT_BIT_KHR

- VUID-vkCmdSetEvent2-srcStageMask-09391
  The `srcStageMask` member of any element of the `pMemoryBarriers`, `pBufferMemoryBarriers`, or `pImageMemoryBarriers` members of `pDependencyInfo` must not include VK_PIPELINE_STAGE_2_HOST_BIT

- VUID-vkCmdSetEvent2-dstStageMask-09392
  The `dstStageMask` member of any element of the `pMemoryBarriers`, `pBufferMemoryBarriers`, or `pImageMemoryBarriers` members of `pDependencyInfo` must not include VK_PIPELINE_STAGE_2_HOST_BIT

- VUID-vkCmdSetEvent2-commandBuffer-03826
  The current device mask of `commandBuffer` must include exactly one physical device

- VUID-vkCmdSetEvent2-srcStageMask-03827
  The `srcStageMask` member of any element of the `pMemoryBarriers`, `pBufferMemoryBarriers`, or `pImageMemoryBarriers` members of `pDependencyInfo` must only include pipeline stages valid for the queue family that was used to create the command pool that `commandBuffer` was allocated from

- VUID-vkCmdSetEvent2-dstStageMask-03828
  The `dstStageMask` member of any element of the `pMemoryBarriers`, `pBufferMemoryBarriers`, or `pImageMemoryBarriers` members of `pDependencyInfo` must only include pipeline stages valid for the queue family that was used to create the command pool that `commandBuffer` was allocated from

- VUID-vkCmdSetEvent2-dependencyFlags-10785
  If the `dependencyFlags` member of `pDependencyInfo` includes VK_DEPENDENCY_ASYMMETRIC_EVENT_BIT_KHR, the `bufferMemoryBarrierCount` and `imageMemoryBarrierCount` members of `pDependencyInfo` must be `0`

- VUID-vkCmdSetEvent2-dependencyFlags-10786
  If the `dependencyFlags` member of `pDependencyInfo` includes VK_DEPENDENCY_ASYMMETRIC_EVENT_BIT_KHR, the `memoryBarrierCount` member of `pDependencyInfo` must be `1`

- VUID-vkCmdSetEvent2-dependencyFlags-10787
  If the `dependencyFlags` member of `pDependencyInfo` includes VK_DEPENDENCY_ASYMMETRIC_EVENT_BIT_KHR, the `srcAccessMask`, `dstStageMask`, and `dstAccessMask` members of `pDependencyInfo->pMemoryBarriers`[0] must be `0`

Valid Usage (Implicit)

- VUID-vkCmdSetEvent2-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetEvent2-event-parameter
  `event` must be a valid VkEvent handle

- VUID-vkCmdSetEvent2-pDependencyInfo-parameter
  `pDependencyInfo` must be a valid pointer to a valid VkDependencyInfo structure

- VUID-vkCmdSetEvent2-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetEvent2-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, VK_QUEUE_GRAPHICS_BIT, VK_QUEUE_VIDEO_DECODE_BIT_KHR, or VK_QUEUE_VIDEO_ENCODE_BIT_KHR operations

- VUID-vkCmdSetEvent2-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdSetEvent2-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdSetEvent2-commonparent
  Both of `commandBuffer`, and `event` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Both | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT VK_QUEUE_VIDEO_DECODE_BIT_KHR VK_QUEUE_VIDEO_ENCODE_BIT_KHR | Synchronization

Conditional Rendering

vkCmdSetEvent2 is not affected by conditional rendering

The `VkDependencyInfo` structure is defined as:

    // Provided by VK_VERSION_1_3
    typedef struct VkDependencyInfo {
        VkStructureType                  sType;
        const void*                      pNext;
        VkDependencyFlags                dependencyFlags;
        uint32_t                         memoryBarrierCount;
        const VkMemoryBarrier2*          pMemoryBarriers;
        uint32_t                         bufferMemoryBarrierCount;
        const VkBufferMemoryBarrier2*    pBufferMemoryBarriers;
        uint32_t                         imageMemoryBarrierCount;
        const VkImageMemoryBarrier2*     pImageMemoryBarriers;
    } VkDependencyInfo;

    // Provided by VK_KHR_synchronization2
    // Equivalent to VkDependencyInfo
    typedef VkDependencyInfo VkDependencyInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `dependencyFlags` is a bitmask of VkDependencyFlagBits specifying how execution and memory dependencies are formed.

- `memoryBarrierCount` is the length of the `pMemoryBarriers` array.

- `pMemoryBarriers` is a pointer to an array of VkMemoryBarrier2 structures defining memory dependencies between any memory accesses.

- `bufferMemoryBarrierCount` is the length of the `pBufferMemoryBarriers` array.

- `pBufferMemoryBarriers` is a pointer to an array of VkBufferMemoryBarrier2 structures defining memory dependencies between buffer ranges.

- `imageMemoryBarrierCount` is the length of the `pImageMemoryBarriers` array.

- `pImageMemoryBarriers` is a pointer to an array of VkImageMemoryBarrier2 structures defining memory dependencies between image subresources.

This structure defines a set of memory dependencies, as well as queue family ownership transfer operations and image layout transitions.

Each member of `pMemoryBarriers`, `pBufferMemoryBarriers`, and `pImageMemoryBarriers` defines a separate memory dependency.

Valid Usage

- VUID-VkDependencyInfo-pMemoryBarriers-10605
  For each element of `pMemoryBarriers`, the `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkDependencyInfo-pMemoryBarriers-10606
  For each element of `pMemoryBarriers`, `pNext` must be either `NULL` or a pointer to a valid instance of VkMemoryBarrierAccessFlags3KHR

- VUID-VkDependencyInfo-pNext-09754
  If a VkTensorDependencyInfoARM structure is included in the `pNext` chain, a VkTensorMemoryBarrierARM structure must not be included in the `pNext` chain

Valid Usage (Implicit)

- VUID-VkDependencyInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DEPENDENCY_INFO

- VUID-VkDependencyInfo-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkMemoryRangeBarriersInfoKHR, VkTensorDependencyInfoARM, or VkTensorMemoryBarrierARM

- VUID-VkDependencyInfo-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkDependencyInfo-dependencyFlags-parameter
  `dependencyFlags` must be a valid combination of VkDependencyFlagBits values

- VUID-VkDependencyInfo-pMemoryBarriers-parameter
  If `memoryBarrierCount` is not `0`, `pMemoryBarriers` must be a valid pointer to an array of `memoryBarrierCount` valid VkMemoryBarrier2 structures

- VUID-VkDependencyInfo-pBufferMemoryBarriers-parameter
  If `bufferMemoryBarrierCount` is not `0`, `pBufferMemoryBarriers` must be a valid pointer to an array of `bufferMemoryBarrierCount` valid VkBufferMemoryBarrier2 structures

- VUID-VkDependencyInfo-pImageMemoryBarriers-parameter
  If `imageMemoryBarrierCount` is not `0`, `pImageMemoryBarriers` must be a valid pointer to an array of `imageMemoryBarrierCount` valid VkImageMemoryBarrier2 structures

To set the state of an event to signaled from a device, call:

Warning | This functionality is superseded by vkCmdSetEvent2. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_0
    void vkCmdSetEvent(
        VkCommandBuffer                             commandBuffer,
        VkEvent                                     event,
        VkPipelineStageFlags                        stageMask);

- `commandBuffer` is the command buffer into which the command is recorded.

- `event` is the event that will be signaled.

- `stageMask` specifies the source stage mask used to determine the first synchronization scope.

`vkCmdSetEvent` behaves identically to vkCmdSetEvent2, except that it does not define an access scope, and must only be used with vkCmdWaitEvents, not vkCmdWaitEvents2.

Valid Usage

- VUID-vkCmdSetEvent-stageMask-04090
  If the `geometryShader` feature is not enabled, `stageMask` must not contain VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT

- VUID-vkCmdSetEvent-stageMask-04091
  If the `tessellationShader` feature is not enabled, `stageMask` must not contain VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT or VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT

- VUID-vkCmdSetEvent-stageMask-04092
  If the `conditionalRendering` feature is not enabled, `stageMask` must not contain VK_PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT

- VUID-vkCmdSetEvent-stageMask-04093
  If the `fragmentDensityMap` feature is not enabled, `stageMask` must not contain VK_PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT

- VUID-vkCmdSetEvent-stageMask-04094
  If the `transformFeedback` feature is not enabled, `stageMask` must not contain VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT

- VUID-vkCmdSetEvent-stageMask-04095
  If the `meshShader` feature is not enabled, `stageMask` must not contain VK_PIPELINE_STAGE_MESH_SHADER_BIT_EXT

- VUID-vkCmdSetEvent-stageMask-04096
  If the `taskShader` feature is not enabled, `stageMask` must not contain VK_PIPELINE_STAGE_TASK_SHADER_BIT_EXT

- VUID-vkCmdSetEvent-stageMask-07318
  If neither of the `shadingRateImage` or the `attachmentFragmentShadingRate` features are enabled, `stageMask` must not contain VK_PIPELINE_STAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

- VUID-vkCmdSetEvent-stageMask-03937
  If the `synchronization2` feature is not enabled, `stageMask` must not be `0`

- VUID-vkCmdSetEvent-stageMask-07949
  If neither the VK_NV_ray_tracing extension or the `rayTracingPipeline` feature are enabled, `stageMask` must not contain VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_KHR

- VUID-vkCmdSetEvent-stageMask-10754
  If the `accelerationStructure` feature is not enabled, `stageMask` must not contain VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR

- VUID-vkCmdSetEvent-stageMask-06457
  Any pipeline stage included in `stageMask` must be supported by the capabilities of the queue family specified by the `queueFamilyIndex` member of the VkCommandPoolCreateInfo structure that was used to create the `VkCommandPool` that `commandBuffer` was allocated from, as specified in the table of supported pipeline stages

- VUID-vkCmdSetEvent-stageMask-01149
  `stageMask` must not include VK_PIPELINE_STAGE_HOST_BIT

- VUID-vkCmdSetEvent-commandBuffer-01152
  The current device mask of `commandBuffer` must include exactly one physical device

Valid Usage (Implicit)

- VUID-vkCmdSetEvent-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetEvent-event-parameter
  `event` must be a valid VkEvent handle

- VUID-vkCmdSetEvent-stageMask-parameter
  `stageMask` must be a valid combination of VkPipelineStageFlagBits values

- VUID-vkCmdSetEvent-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetEvent-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, VK_QUEUE_GRAPHICS_BIT, VK_QUEUE_VIDEO_DECODE_BIT_KHR, or VK_QUEUE_VIDEO_ENCODE_BIT_KHR operations

- VUID-vkCmdSetEvent-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdSetEvent-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdSetEvent-commonparent
  Both of `commandBuffer`, and `event` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Both | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT VK_QUEUE_VIDEO_DECODE_BIT_KHR VK_QUEUE_VIDEO_ENCODE_BIT_KHR | Synchronization

Conditional Rendering

vkCmdSetEvent is not affected by conditional rendering

To unsignal the event from a device, call:

    // Provided by VK_VERSION_1_3
    void vkCmdResetEvent2(
        VkCommandBuffer                             commandBuffer,
        VkEvent                                     event,
        VkPipelineStageFlags2                       stageMask);

    // Provided by VK_KHR_synchronization2
    // Equivalent to vkCmdResetEvent2
    void vkCmdResetEvent2KHR(
        VkCommandBuffer                             commandBuffer,
        VkEvent                                     event,
        VkPipelineStageFlags2                       stageMask);

- `commandBuffer` is the command buffer into which the command is recorded.

- `event` is the event that will be unsignaled.

- `stageMask` is a VkPipelineStageFlags2 mask of pipeline stages used to determine the first synchronization scope.

When vkCmdResetEvent2 is submitted to a queue, it defines an execution dependency on commands that were submitted before it, and defines an event unsignal operation which resets the event to the unsignaled state.

The first synchronization scope includes all commands that occur earlier in submission order. The synchronization scope is limited to operations by `stageMask` or stages that are logically earlier than `stageMask`.

The second synchronization scope includes only the event unsignal operation.

If `event` is already in the unsignaled state when vkCmdResetEvent2 is executed on the device, then this command has no effect, no event unsignal operation occurs, and no execution dependency is generated.

Valid Usage

- VUID-vkCmdResetEvent2-stageMask-03929
  If the `geometryShader` feature is not enabled, `stageMask` must not contain VK_PIPELINE_STAGE_2_GEOMETRY_SHADER_BIT

- VUID-vkCmdResetEvent2-stageMask-03930
  If the `tessellationShader` feature is not enabled, `stageMask` must not contain VK_PIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT or VK_PIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT

- VUID-vkCmdResetEvent2-stageMask-03931
  If the `conditionalRendering` feature is not enabled, `stageMask` must not contain VK_PIPELINE_STAGE_2_CONDITIONAL_RENDERING_BIT_EXT

- VUID-vkCmdResetEvent2-stageMask-03932
  If the `fragmentDensityMap` feature is not enabled, `stageMask` must not contain VK_PIPELINE_STAGE_2_FRAGMENT_DENSITY_PROCESS_BIT_EXT

- VUID-vkCmdResetEvent2-stageMask-03933
  If the `transformFeedback` feature is not enabled, `stageMask` must not contain VK_PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT

- VUID-vkCmdResetEvent2-stageMask-03934
  If the `meshShader` feature is not enabled, `stageMask` must not contain VK_PIPELINE_STAGE_2_MESH_SHADER_BIT_EXT

- VUID-vkCmdResetEvent2-stageMask-03935
  If the `taskShader` feature is not enabled, `stageMask` must not contain VK_PIPELINE_STAGE_2_TASK_SHADER_BIT_EXT

- VUID-vkCmdResetEvent2-stageMask-07316
  If neither of the `shadingRateImage` or the `attachmentFragmentShadingRate` features are enabled, `stageMask` must not contain VK_PIPELINE_STAGE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

- VUID-vkCmdResetEvent2-stageMask-04957
  If the `subpassShading` feature is not enabled, `stageMask` must not contain VK_PIPELINE_STAGE_2_SUBPASS_SHADER_BIT_HUAWEI

- VUID-vkCmdResetEvent2-stageMask-04995
  If the `invocationMask` feature is not enabled, `stageMask` must not contain VK_PIPELINE_STAGE_2_INVOCATION_MASK_BIT_HUAWEI

- VUID-vkCmdResetEvent2-stageMask-07946
  If neither the VK_NV_ray_tracing extension or the `rayTracingPipeline` feature are enabled, `stageMask` must not contain VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR

- VUID-vkCmdResetEvent2-stageMask-10751
  If the `accelerationStructure` feature is not enabled, `stageMask` must not contain VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR

- VUID-vkCmdResetEvent2-stageMask-10752
  If the `rayTracingMaintenance1` feature is not enabled, `stageMask` must not contain VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR

- VUID-vkCmdResetEvent2-stageMask-11541
  If the `VkPhysicalDeviceOpacityMicromapFeaturesEXT`::`micromap` feature is not enabled, `stageMask` must not contain VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT

- VUID-vkCmdResetEvent2-synchronization2-03829
  The `synchronization2` feature must be enabled

- VUID-vkCmdResetEvent2-stageMask-03830
  `stageMask` must not include VK_PIPELINE_STAGE_2_HOST_BIT

- VUID-vkCmdResetEvent2-event-03831
  There must be an execution dependency between `vkCmdResetEvent2` and the execution of any vkCmdWaitEvents that includes `event` in its `pEvents` parameter

- VUID-vkCmdResetEvent2-event-03832
  There must be an execution dependency between `vkCmdResetEvent2` and the execution of any vkCmdWaitEvents2 that includes `event` in its `pEvents` parameter

- VUID-vkCmdResetEvent2-commandBuffer-03833
  `commandBuffer`’s current device mask must include exactly one physical device

Valid Usage (Implicit)

- VUID-vkCmdResetEvent2-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdResetEvent2-event-parameter
  `event` must be a valid VkEvent handle

- VUID-vkCmdResetEvent2-stageMask-parameter
  `stageMask` must be a valid combination of VkPipelineStageFlagBits2 values

- VUID-vkCmdResetEvent2-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdResetEvent2-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, VK_QUEUE_GRAPHICS_BIT, VK_QUEUE_VIDEO_DECODE_BIT_KHR, or VK_QUEUE_VIDEO_ENCODE_BIT_KHR operations

- VUID-vkCmdResetEvent2-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdResetEvent2-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdResetEvent2-commonparent
  Both of `commandBuffer`, and `event` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Both | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT VK_QUEUE_VIDEO_DECODE_BIT_KHR VK_QUEUE_VIDEO_ENCODE_BIT_KHR | Synchronization

Conditional Rendering

vkCmdResetEvent2 is not affected by conditional rendering

To set the state of an event to unsignaled from a device, call:

Warning | This functionality is superseded by vkCmdResetEvent2. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_0
    void vkCmdResetEvent(
        VkCommandBuffer                             commandBuffer,
        VkEvent                                     event,
        VkPipelineStageFlags                        stageMask);

- `commandBuffer` is the command buffer into which the command is recorded.

- `event` is the event that will be unsignaled.

- `stageMask` is a bitmask of VkPipelineStageFlagBits specifying the source stage mask used to determine when the `event` is unsignaled.

`vkCmdResetEvent` behaves identically to vkCmdResetEvent2.

Valid Usage

- VUID-vkCmdResetEvent-stageMask-04090
  If the `geometryShader` feature is not enabled, `stageMask` must not contain VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT

- VUID-vkCmdResetEvent-stageMask-04091
  If the `tessellationShader` feature is not enabled, `stageMask` must not contain VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT or VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT

- VUID-vkCmdResetEvent-stageMask-04092
  If the `conditionalRendering` feature is not enabled, `stageMask` must not contain VK_PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT

- VUID-vkCmdResetEvent-stageMask-04093
  If the `fragmentDensityMap` feature is not enabled, `stageMask` must not contain VK_PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT

- VUID-vkCmdResetEvent-stageMask-04094
  If the `transformFeedback` feature is not enabled, `stageMask` must not contain VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT

- VUID-vkCmdResetEvent-stageMask-04095
  If the `meshShader` feature is not enabled, `stageMask` must not contain VK_PIPELINE_STAGE_MESH_SHADER_BIT_EXT

- VUID-vkCmdResetEvent-stageMask-04096
  If the `taskShader` feature is not enabled, `stageMask` must not contain VK_PIPELINE_STAGE_TASK_SHADER_BIT_EXT

- VUID-vkCmdResetEvent-stageMask-07318
  If neither of the `shadingRateImage` or the `attachmentFragmentShadingRate` features are enabled, `stageMask` must not contain VK_PIPELINE_STAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

- VUID-vkCmdResetEvent-stageMask-03937
  If the `synchronization2` feature is not enabled, `stageMask` must not be `0`

- VUID-vkCmdResetEvent-stageMask-07949
  If neither the VK_NV_ray_tracing extension or the `rayTracingPipeline` feature are enabled, `stageMask` must not contain VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_KHR

- VUID-vkCmdResetEvent-stageMask-10754
  If the `accelerationStructure` feature is not enabled, `stageMask` must not contain VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR

- VUID-vkCmdResetEvent-stageMask-06458
  Any pipeline stage included in `stageMask` must be supported by the capabilities of the queue family specified by the `queueFamilyIndex` member of the VkCommandPoolCreateInfo structure that was used to create the `VkCommandPool` that `commandBuffer` was allocated from, as specified in the table of supported pipeline stages

- VUID-vkCmdResetEvent-stageMask-01153
  `stageMask` must not include VK_PIPELINE_STAGE_HOST_BIT

- VUID-vkCmdResetEvent-event-03834
  There must be an execution dependency between `vkCmdResetEvent` and the execution of any vkCmdWaitEvents that includes `event` in its `pEvents` parameter

- VUID-vkCmdResetEvent-event-03835
  There must be an execution dependency between `vkCmdResetEvent` and the execution of any vkCmdWaitEvents2 that includes `event` in its `pEvents` parameter

- VUID-vkCmdResetEvent-commandBuffer-01157
  `commandBuffer`’s current device mask must include exactly one physical device

Valid Usage (Implicit)

- VUID-vkCmdResetEvent-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdResetEvent-event-parameter
  `event` must be a valid VkEvent handle

- VUID-vkCmdResetEvent-stageMask-parameter
  `stageMask` must be a valid combination of VkPipelineStageFlagBits values

- VUID-vkCmdResetEvent-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdResetEvent-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, VK_QUEUE_GRAPHICS_BIT, VK_QUEUE_VIDEO_DECODE_BIT_KHR, or VK_QUEUE_VIDEO_ENCODE_BIT_KHR operations

- VUID-vkCmdResetEvent-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdResetEvent-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdResetEvent-commonparent
  Both of `commandBuffer`, and `event` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Both | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT VK_QUEUE_VIDEO_DECODE_BIT_KHR VK_QUEUE_VIDEO_ENCODE_BIT_KHR | Synchronization

Conditional Rendering

vkCmdResetEvent is not affected by conditional rendering

To wait for one or more events to enter the signaled state on a device, call:

    // Provided by VK_VERSION_1_3
    void vkCmdWaitEvents2(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    eventCount,
        const VkEvent*                              pEvents,
        const VkDependencyInfo*                     pDependencyInfos);

    // Provided by VK_KHR_synchronization2
    // Equivalent to vkCmdWaitEvents2
    void vkCmdWaitEvents2KHR(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    eventCount,
        const VkEvent*                              pEvents,
        const VkDependencyInfo*                     pDependencyInfos);

- `commandBuffer` is the command buffer into which the command is recorded.

- `eventCount` is the length of the `pEvents` array.

- `pEvents` is a pointer to an array of `eventCount` events to wait on.

- `pDependencyInfos` is a pointer to an array of `eventCount` VkDependencyInfo structures, defining the second synchronization scope.

When `vkCmdWaitEvents2` is submitted to a queue, it inserts memory dependencies according to the elements of `pDependencyInfos` and each corresponding element of `pEvents`. `vkCmdWaitEvents2` must not be used to wait on event signal operations occurring on other queues, or signal operations executed by vkCmdSetEvent.

The first synchronization scope and access scope of each memory dependency defined by any element i of `pDependencyInfos` are applied to operations that occurred earlier in submission order than the last event signal operation on element i of `pEvents`.

Signal operations for an event at index i are only included if:

- The event was signaled by a vkCmdSetEvent2 command that occurred earlier in submission order with a `dependencyInfo` parameter exactly equal to the element of `pDependencyInfos` at index i ; or

- The event was created without VK_EVENT_CREATE_DEVICE_ONLY_BIT, and the first synchronization scope defined by the element of `pDependencyInfos` at index i only includes host operations (VK_PIPELINE_STAGE_2_HOST_BIT).

The second synchronization scope and access scope of each memory dependency defined by any element i of `pDependencyInfos` are applied to operations that occurred later in submission order than `vkCmdWaitEvents2`.

Note | vkCmdWaitEvents2 is used with vkCmdSetEvent2 to define a memory dependency between two sets of action commands, roughly in the same way as pipeline barriers, but split into two commands such that work between the two may execute unhindered.

Note | Applications should be careful to avoid race conditions when using events. There is no direct ordering guarantee between `vkCmdSetEvent2` and vkCmdResetEvent2, vkCmdResetEvent, or vkCmdSetEvent. Another execution dependency (e.g. a pipeline barrier or semaphore with VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT) is needed to prevent such a race condition.

Valid Usage

- VUID-vkCmdWaitEvents2-image-09373
  If `vkCmdWaitEvents2` is called within a render pass instance using a VkRenderPass object, and the `image` member of any image memory barrier is a color resolve attachment, the corresponding color attachment must be VK_ATTACHMENT_UNUSED

- VUID-vkCmdWaitEvents2-image-09374
  If `vkCmdWaitEvents2` is called within a render pass instance using a VkRenderPass object, and the `image` member of any image memory barrier is a color resolve attachment, it must have been created with a non-zero VkExternalFormatANDROID::`externalFormat` value

- VUID-vkCmdWaitEvents2-oldLayout-01181
  If `vkCmdWaitEvents2` is called within a render pass instance, the `oldLayout` and `newLayout` members of any image memory barrier included in this command must be equal

- VUID-vkCmdWaitEvents2-srcQueueFamilyIndex-01182
  If `vkCmdWaitEvents2` is called within a render pass instance, the `srcQueueFamilyIndex` and `dstQueueFamilyIndex` members of any memory barrier included in this command must be equal

- VUID-vkCmdWaitEvents2-synchronization2-03836
  The `synchronization2` feature must be enabled

- VUID-vkCmdWaitEvents2-pEvents-03837
  Members of `pEvents` must not have been signaled by vkCmdSetEvent

- VUID-vkCmdWaitEvents2-pEvents-10788
  For each element i of `pEvents`, if the `dependencyFlags` member of the ith element of `pDependencyInfos` does not include VK_DEPENDENCY_ASYMMETRIC_EVENT_BIT_KHR, and if that event is signaled by vkCmdSetEvent2, that command’s `dependencyInfo` parameter must be exactly equal to the ith element of `pDependencyInfos`

- VUID-vkCmdWaitEvents2-pEvents-10789
  For each element i of `pEvents`, if the `dependencyFlags` member of the ith element of `pDependencyInfos` includes VK_DEPENDENCY_ASYMMETRIC_EVENT_BIT_KHR, that event must be signaled by vkCmdSetEvent2 with VK_DEPENDENCY_ASYMMETRIC_EVENT_BIT_KHR

- VUID-vkCmdWaitEvents2-pEvents-10790
  For each element i of `pEvents`, if the `dependencyFlags` member of the ith element of `pDependencyInfos` includes VK_DEPENDENCY_ASYMMETRIC_EVENT_BIT_KHR, the union of `srcStageMask` members of all elements of `pMemoryBarriers`, `pBufferMemoryBarriers`, and `pImageMemoryBarriers` of the ith element of `pDependencyInfos` must equal `pDependencyInfos->pMemoryBarriers`[0].`srcStageMask` in the vkCmdSetEvent2 command

- VUID-vkCmdWaitEvents2-pEvents-03839
  For each element i of `pEvents`, if that event is signaled by vkSetEvent, barriers in the ith element of `pDependencyInfos` must include only host operations in their first synchronization scope

- VUID-vkCmdWaitEvents2-pEvents-03840
  For each element i of `pEvents`, if barriers in the ith element of `pDependencyInfos` include only host operations, the ith element of `pEvents` must be signaled before vkCmdWaitEvents2 is executed

- VUID-vkCmdWaitEvents2-pEvents-03841
  For each element i of `pEvents`, if barriers in the ith element of `pDependencyInfos` do not include host operations, the ith element of `pEvents` must be signaled by a corresponding vkCmdSetEvent2 that occurred earlier in submission order

- VUID-vkCmdWaitEvents2-srcStageMask-03842
  The `srcStageMask` member of any element of the `pMemoryBarriers`, `pBufferMemoryBarriers`, or `pImageMemoryBarriers` members of `pDependencyInfos` must only include pipeline stages valid for the queue family that was used to create the command pool that `commandBuffer` was allocated from

- VUID-vkCmdWaitEvents2-dstStageMask-03843
  The `dstStageMask` member of any element of the `pMemoryBarriers`, `pBufferMemoryBarriers`, or `pImageMemoryBarriers` members of `pDependencyInfos` must only include pipeline stages valid for the queue family that was used to create the command pool that `commandBuffer` was allocated from

- VUID-vkCmdWaitEvents2-dependencyFlags-10394
  The `dependencyFlags` member of any element of `pDependencyInfo` must not include any of the following bits:

  - VK_DEPENDENCY_BY_REGION_BIT

  - VK_DEPENDENCY_DEVICE_GROUP_BIT

  - VK_DEPENDENCY_VIEW_LOCAL_BIT

  - VK_DEPENDENCY_FEEDBACK_LOOP_BIT_EXT

- VUID-vkCmdWaitEvents2-maintenance8-10205
  If the `maintenance8` feature is not enabled, the `dependencyFlags` members of any element of `pDependencyInfos` must not include VK_DEPENDENCY_QUEUE_FAMILY_OWNERSHIP_TRANSFER_USE_ALL_STAGES_BIT_KHR

- VUID-vkCmdWaitEvents2-dependencyFlags-03844
  If this command is called inside a render pass instance, the `srcStageMask` member of any element of the `pMemoryBarriers`, `pBufferMemoryBarriers`, or `pImageMemoryBarriers` members of `pDependencyInfos` must not include VK_PIPELINE_STAGE_2_HOST_BIT

- VUID-vkCmdWaitEvents2-commandBuffer-03846
  `commandBuffer`’s current device mask must include exactly one physical device

- VUID-vkCmdWaitEvents2-None-10654
  This command must not be recorded when per-tile execution model is enabled

Valid Usage (Implicit)

- VUID-vkCmdWaitEvents2-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdWaitEvents2-pEvents-parameter
  `pEvents` must be a valid pointer to an array of `eventCount` valid VkEvent handles

- VUID-vkCmdWaitEvents2-pDependencyInfos-parameter
  `pDependencyInfos` must be a valid pointer to an array of `eventCount` valid VkDependencyInfo structures

- VUID-vkCmdWaitEvents2-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdWaitEvents2-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, VK_QUEUE_GRAPHICS_BIT, VK_QUEUE_VIDEO_DECODE_BIT_KHR, or VK_QUEUE_VIDEO_ENCODE_BIT_KHR operations

- VUID-vkCmdWaitEvents2-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdWaitEvents2-eventCount-arraylength
  `eventCount` must be greater than `0`

- VUID-vkCmdWaitEvents2-commonparent
  Both of `commandBuffer`, and the elements of `pEvents` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Both | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT VK_QUEUE_VIDEO_DECODE_BIT_KHR VK_QUEUE_VIDEO_ENCODE_BIT_KHR | Synchronization

Conditional Rendering

vkCmdWaitEvents2 is not affected by conditional rendering

To wait for one or more events to enter the signaled state on a device, call:

Warning | This functionality is superseded by vkCmdWaitEvents2. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_0
    void vkCmdWaitEvents(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    eventCount,
        const VkEvent*                              pEvents,
        VkPipelineStageFlags                        srcStageMask,
        VkPipelineStageFlags                        dstStageMask,
        uint32_t                                    memoryBarrierCount,
        const VkMemoryBarrier*                      pMemoryBarriers,
        uint32_t                                    bufferMemoryBarrierCount,
        const VkBufferMemoryBarrier*                pBufferMemoryBarriers,
        uint32_t                                    imageMemoryBarrierCount,
        const VkImageMemoryBarrier*                 pImageMemoryBarriers);

- `commandBuffer` is the command buffer into which the command is recorded.

- `eventCount` is the length of the `pEvents` array.

- `pEvents` is a pointer to an array of event object handles to wait on.

- `srcStageMask` is a bitmask of VkPipelineStageFlagBits specifying the source stage mask.

- `dstStageMask` is a bitmask of VkPipelineStageFlagBits specifying the destination stage mask.

- `memoryBarrierCount` is the length of the `pMemoryBarriers` array.

- `pMemoryBarriers` is a pointer to an array of VkMemoryBarrier structures.

- `bufferMemoryBarrierCount` is the length of the `pBufferMemoryBarriers` array.

- `pBufferMemoryBarriers` is a pointer to an array of VkBufferMemoryBarrier structures.

- `imageMemoryBarrierCount` is the length of the `pImageMemoryBarriers` array.

- `pImageMemoryBarriers` is a pointer to an array of VkImageMemoryBarrier structures.

`vkCmdWaitEvents` is largely similar to vkCmdWaitEvents2, but can only wait on signal operations defined by vkCmdSetEvent. As vkCmdSetEvent does not define any access scopes, `vkCmdWaitEvents` defines the first access scope for each event signal operation in addition to its own access scopes.

Note | Since vkCmdSetEvent does not have any dependency information beyond a stage mask, implementations do not have the same opportunity to perform availability and visibility operations or image layout transitions in advance as they do with vkCmdSetEvent2 and vkCmdWaitEvents2.

When `vkCmdWaitEvents` is submitted to a queue, it defines a memory dependency between prior event signal operations on the same queue or the host, and subsequent commands. `vkCmdWaitEvents` must not be used to wait on event signal operations occurring on other queues.

The first synchronization scope only includes event signal operations that operate on members of `pEvents`, and the operations that happened-before the event signal operations. Event signal operations performed by vkCmdSetEvent that occur earlier in submission order are included in the first synchronization scope, if the logically latest pipeline stage in their `stageMask` parameter is logically earlier than or equal to the logically latest pipeline stage in `srcStageMask`. Event signal operations performed by vkSetEvent are only included in the first synchronization scope if VK_PIPELINE_STAGE_HOST_BIT is included in `srcStageMask`.

The second synchronization scope includes all commands that occur later in submission order. The second synchronization scope is limited to operations on the pipeline stages determined by the destination stage mask specified by `dstStageMask`.

The first access scope is limited to accesses in the pipeline stages determined by the source stage mask specified by `srcStageMask`. Within that, the first access scope only includes the first access scopes defined by elements of the `pMemoryBarriers`, `pBufferMemoryBarriers` and `pImageMemoryBarriers` arrays, which each define a set of memory barriers. If no memory barriers are specified, then the first access scope includes no accesses.

The second access scope is limited to accesses in the pipeline stages determined by the destination stage mask specified by `dstStageMask`. Within that, the second access scope only includes the second access scopes defined by elements of the `pMemoryBarriers`, `pBufferMemoryBarriers` and `pImageMemoryBarriers` arrays, which each define a set of memory barriers. If no memory barriers are specified, then the second access scope includes no accesses.

Valid Usage

- VUID-vkCmdWaitEvents-srcStageMask-04090
  If the `geometryShader` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT

- VUID-vkCmdWaitEvents-srcStageMask-04091
  If the `tessellationShader` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT or VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT

- VUID-vkCmdWaitEvents-srcStageMask-04092
  If the `conditionalRendering` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT

- VUID-vkCmdWaitEvents-srcStageMask-04093
  If the `fragmentDensityMap` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT

- VUID-vkCmdWaitEvents-srcStageMask-04094
  If the `transformFeedback` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT

- VUID-vkCmdWaitEvents-srcStageMask-04095
  If the `meshShader` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_MESH_SHADER_BIT_EXT

- VUID-vkCmdWaitEvents-srcStageMask-04096
  If the `taskShader` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_TASK_SHADER_BIT_EXT

- VUID-vkCmdWaitEvents-srcStageMask-07318
  If neither of the `shadingRateImage` or the `attachmentFragmentShadingRate` features are enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

- VUID-vkCmdWaitEvents-srcStageMask-03937
  If the `synchronization2` feature is not enabled, `srcStageMask` must not be `0`

- VUID-vkCmdWaitEvents-srcStageMask-07949
  If neither the VK_NV_ray_tracing extension or the `rayTracingPipeline` feature are enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_KHR

- VUID-vkCmdWaitEvents-srcStageMask-10754
  If the `accelerationStructure` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR

- VUID-vkCmdWaitEvents-srcAccessMask-06257
  If the `rayQuery` feature is not enabled and a memory barrier `srcAccessMask` includes VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR, `srcStageMask` must include VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_KHR, VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, or VK_PIPELINE_STAGE_ALL_COMMANDS_BIT

- VUID-vkCmdWaitEvents-dstStageMask-04090
  If the `geometryShader` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT

- VUID-vkCmdWaitEvents-dstStageMask-04091
  If the `tessellationShader` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT or VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT

- VUID-vkCmdWaitEvents-dstStageMask-04092
  If the `conditionalRendering` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT

- VUID-vkCmdWaitEvents-dstStageMask-04093
  If the `fragmentDensityMap` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT

- VUID-vkCmdWaitEvents-dstStageMask-04094
  If the `transformFeedback` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT

- VUID-vkCmdWaitEvents-dstStageMask-04095
  If the `meshShader` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_MESH_SHADER_BIT_EXT

- VUID-vkCmdWaitEvents-dstStageMask-04096
  If the `taskShader` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_TASK_SHADER_BIT_EXT

- VUID-vkCmdWaitEvents-dstStageMask-07318
  If neither of the `shadingRateImage` or the `attachmentFragmentShadingRate` features are enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

- VUID-vkCmdWaitEvents-dstStageMask-03937
  If the `synchronization2` feature is not enabled, `dstStageMask` must not be `0`

- VUID-vkCmdWaitEvents-dstStageMask-07949
  If neither the VK_NV_ray_tracing extension or the `rayTracingPipeline` feature are enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_KHR

- VUID-vkCmdWaitEvents-dstStageMask-10754
  If the `accelerationStructure` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR

- VUID-vkCmdWaitEvents-dstAccessMask-06257
  If the `rayQuery` feature is not enabled and a memory barrier `dstAccessMask` includes VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR, `dstStageMask` must include VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_KHR, VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, or VK_PIPELINE_STAGE_ALL_COMMANDS_BIT

- VUID-vkCmdWaitEvents-srcAccessMask-02815
  The `srcAccessMask` member of each element of `pMemoryBarriers` must only include access flags that are supported by one or more of the pipeline stages in `srcStageMask`, as specified in the table of supported access types

- VUID-vkCmdWaitEvents-dstAccessMask-02816
  The `dstAccessMask` member of each element of `pMemoryBarriers` must only include access flags that are supported by one or more of the pipeline stages in `dstStageMask`, as specified in the table of supported access types

- VUID-vkCmdWaitEvents-pBufferMemoryBarriers-02817
  For each element of `pBufferMemoryBarriers`, if its `srcQueueFamilyIndex` and `dstQueueFamilyIndex` members are equal, or if its `srcQueueFamilyIndex` is the queue family index that was used to create the command pool that `commandBuffer` was allocated from, then its `srcAccessMask` member must only contain access flags that are supported by one or more of the pipeline stages in `srcStageMask`, as specified in the table of supported access types

- VUID-vkCmdWaitEvents-pBufferMemoryBarriers-02818
  For each element of `pBufferMemoryBarriers`, if its `srcQueueFamilyIndex` and `dstQueueFamilyIndex` members are equal, or if its `dstQueueFamilyIndex` is the queue family index that was used to create the command pool that `commandBuffer` was allocated from, then its `dstAccessMask` member must only contain access flags that are supported by one or more of the pipeline stages in `dstStageMask`, as specified in the table of supported access types

- VUID-vkCmdWaitEvents-pImageMemoryBarriers-02819
  For each element of `pImageMemoryBarriers`, if its `srcQueueFamilyIndex` and `dstQueueFamilyIndex` members are equal, or if its `srcQueueFamilyIndex` is the queue family index that was used to create the command pool that `commandBuffer` was allocated from, then its `srcAccessMask` member must only contain access flags that are supported by one or more of the pipeline stages in `srcStageMask`, as specified in the table of supported access types

- VUID-vkCmdWaitEvents-pImageMemoryBarriers-02820
  For each element of `pImageMemoryBarriers`, if its `srcQueueFamilyIndex` and `dstQueueFamilyIndex` members are equal, or if its `dstQueueFamilyIndex` is the queue family index that was used to create the command pool that `commandBuffer` was allocated from, then its `dstAccessMask` member must only contain access flags that are supported by one or more of the pipeline stages in `dstStageMask`, as specified in the table of supported access types

- VUID-vkCmdWaitEvents-image-09373
  If `vkCmdWaitEvents` is called within a render pass instance using a VkRenderPass object, and the `image` member of any image memory barrier is a color resolve attachment, the corresponding color attachment must be VK_ATTACHMENT_UNUSED

- VUID-vkCmdWaitEvents-image-09374
  If `vkCmdWaitEvents` is called within a render pass instance using a VkRenderPass object, and the `image` member of any image memory barrier is a color resolve attachment, it must have been created with a non-zero VkExternalFormatANDROID::`externalFormat` value

- VUID-vkCmdWaitEvents-oldLayout-01181
  If `vkCmdWaitEvents` is called within a render pass instance, the `oldLayout` and `newLayout` members of any image memory barrier included in this command must be equal

- VUID-vkCmdWaitEvents-srcQueueFamilyIndex-01182
  If `vkCmdWaitEvents` is called within a render pass instance, the `srcQueueFamilyIndex` and `dstQueueFamilyIndex` members of any memory barrier included in this command must be equal

- VUID-vkCmdWaitEvents-srcStageMask-06459
  Any pipeline stage included in `srcStageMask` must be supported by the capabilities of the queue family specified by the `queueFamilyIndex` member of the VkCommandPoolCreateInfo structure that was used to create the `VkCommandPool` that `commandBuffer` was allocated from, as specified in the table of supported pipeline stages

- VUID-vkCmdWaitEvents-dstStageMask-06460
  Any pipeline stage included in `dstStageMask` must be supported by the capabilities of the queue family specified by the `queueFamilyIndex` member of the VkCommandPoolCreateInfo structure that was used to create the `VkCommandPool` that `commandBuffer` was allocated from, as specified in the table of supported pipeline stages

- VUID-vkCmdWaitEvents-srcStageMask-01158
  `srcStageMask` must be the bitwise OR of the `stageMask` parameter used in previous calls to `vkCmdSetEvent` with any of the elements of `pEvents` and VK_PIPELINE_STAGE_HOST_BIT if any of the elements of `pEvents` was set using `vkSetEvent`

- VUID-vkCmdWaitEvents-srcStageMask-07308
  If this command is called inside a render pass instance, `srcStageMask` must not include VK_PIPELINE_STAGE_HOST_BIT

- VUID-vkCmdWaitEvents-srcQueueFamilyIndex-02803
  The `srcQueueFamilyIndex` and `dstQueueFamilyIndex` members of any element of `pBufferMemoryBarriers` or `pImageMemoryBarriers` must be equal

- VUID-vkCmdWaitEvents-commandBuffer-01167
  `commandBuffer`’s current device mask must include exactly one physical device

- VUID-vkCmdWaitEvents-pEvents-03847
  Elements of `pEvents` must not have been signaled by vkCmdSetEvent2

- VUID-vkCmdWaitEvents-None-10655
  This command must not be recorded when per-tile execution model is enabled

Valid Usage (Implicit)

- VUID-vkCmdWaitEvents-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdWaitEvents-pEvents-parameter
  `pEvents` must be a valid pointer to an array of `eventCount` valid VkEvent handles

- VUID-vkCmdWaitEvents-srcStageMask-parameter
  `srcStageMask` must be a valid combination of VkPipelineStageFlagBits values

- VUID-vkCmdWaitEvents-dstStageMask-parameter
  `dstStageMask` must be a valid combination of VkPipelineStageFlagBits values

- VUID-vkCmdWaitEvents-pMemoryBarriers-parameter
  If `memoryBarrierCount` is not `0`, `pMemoryBarriers` must be a valid pointer to an array of `memoryBarrierCount` valid VkMemoryBarrier structures

- VUID-vkCmdWaitEvents-pBufferMemoryBarriers-parameter
  If `bufferMemoryBarrierCount` is not `0`, `pBufferMemoryBarriers` must be a valid pointer to an array of `bufferMemoryBarrierCount` valid VkBufferMemoryBarrier structures

- VUID-vkCmdWaitEvents-pImageMemoryBarriers-parameter
  If `imageMemoryBarrierCount` is not `0`, `pImageMemoryBarriers` must be a valid pointer to an array of `imageMemoryBarrierCount` valid VkImageMemoryBarrier structures

- VUID-vkCmdWaitEvents-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdWaitEvents-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, VK_QUEUE_GRAPHICS_BIT, VK_QUEUE_VIDEO_DECODE_BIT_KHR, or VK_QUEUE_VIDEO_ENCODE_BIT_KHR operations

- VUID-vkCmdWaitEvents-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdWaitEvents-eventCount-arraylength
  `eventCount` must be greater than `0`

- VUID-vkCmdWaitEvents-commonparent
  Both of `commandBuffer`, and the elements of `pEvents` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Both | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT VK_QUEUE_VIDEO_DECODE_BIT_KHR VK_QUEUE_VIDEO_ENCODE_BIT_KHR | Synchronization

Conditional Rendering

vkCmdWaitEvents is not affected by conditional rendering

### 7.6. Pipeline Barriers

To record a pipeline barrier, call:

    // Provided by VK_VERSION_1_3
    void vkCmdPipelineBarrier2(
        VkCommandBuffer                             commandBuffer,
        const VkDependencyInfo*                     pDependencyInfo);

    // Provided by VK_KHR_synchronization2
    // Equivalent to vkCmdPipelineBarrier2
    void vkCmdPipelineBarrier2KHR(
        VkCommandBuffer                             commandBuffer,
        const VkDependencyInfo*                     pDependencyInfo);

- `commandBuffer` is the command buffer into which the command is recorded.

- `pDependencyInfo` is a pointer to a VkDependencyInfo structure defining the scopes of this operation.

When vkCmdPipelineBarrier2 is submitted to a queue, it defines memory dependencies between commands that were submitted to the same queue before it, and those submitted to the same queue after it.

The first synchronization scope and access scope of each memory dependency defined by `pDependencyInfo` are applied to operations that occurred earlier in submission order.

The second synchronization scope and access scope of each memory dependency defined by `pDependencyInfo` are applied to operations that occurred later in submission order.

If `vkCmdPipelineBarrier2` is recorded within a render pass instance, the synchronization scopes are limited to a subset of operations within the same subpass or render pass instance.

Valid Usage

- VUID-vkCmdPipelineBarrier2-None-07889
  If `vkCmdPipelineBarrier2` is called within a render pass instance using a VkRenderPass object, the render pass must have been created with at least one subpass dependency that expresses a dependency from the current subpass to itself, does not include VK_DEPENDENCY_BY_REGION_BIT if this command does not, does not include VK_DEPENDENCY_VIEW_LOCAL_BIT if this command does not, and has synchronization scopes and access scopes that are all supersets of the scopes defined in this command

- VUID-vkCmdPipelineBarrier2-bufferMemoryBarrierCount-01178
  If `vkCmdPipelineBarrier2` is called within a render pass instance using a VkRenderPass object, it must not include any buffer memory barriers

- VUID-vkCmdPipelineBarrier2-image-04073
  If `vkCmdPipelineBarrier2` is called within a render pass instance using a VkRenderPass object, the `image` member of any image memory barrier included in this command must be an attachment used in the current subpass both as an input attachment, and as either a color, color resolve, or depth/stencil attachment

- VUID-vkCmdPipelineBarrier2-None-07890
  If `vkCmdPipelineBarrier2` is called within a render pass instance, and the source stage masks of any memory barriers include framebuffer-space stages, destination stage masks of all memory barriers must only include framebuffer-space stages

- VUID-vkCmdPipelineBarrier2-dependencyFlags-07891
  If `vkCmdPipelineBarrier2` is called within a render pass instance, and the source stage masks of any memory barriers include framebuffer-space stages, then `dependencyFlags` must include VK_DEPENDENCY_BY_REGION_BIT

- VUID-vkCmdPipelineBarrier2-None-07892
  If `vkCmdPipelineBarrier2` is called within a render pass instance, the source and destination stage masks of any memory barriers must only include graphics pipeline stages

- VUID-vkCmdPipelineBarrier2-dependencyFlags-01186
  If `vkCmdPipelineBarrier2` is called outside of a render pass instance, the dependency flags must not include VK_DEPENDENCY_VIEW_LOCAL_BIT

- VUID-vkCmdPipelineBarrier2-None-07893
  If `vkCmdPipelineBarrier2` is called inside a render pass instance, and there is more than one view in the current subpass, dependency flags must include VK_DEPENDENCY_VIEW_LOCAL_BIT

- VUID-vkCmdPipelineBarrier2-None-09553
  If none of the `shaderTileImageColorReadAccess`, `shaderTileImageStencilReadAccess`, or `shaderTileImageDepthReadAccess` features are enabled, and the `dynamicRenderingLocalRead` feature is not enabled, `vkCmdPipelineBarrier2` must not be called within a render pass instance started with vkCmdBeginRendering

- VUID-vkCmdPipelineBarrier2-None-09554
  If the `dynamicRenderingLocalRead` feature is not enabled, and `vkCmdPipelineBarrier2` is called within a render pass instance started with vkCmdBeginRendering, there must be no buffer or image memory barriers specified by this command

- VUID-vkCmdPipelineBarrier2-None-09586
  If the `dynamicRenderingLocalRead` feature is not enabled, and `vkCmdPipelineBarrier2` is called within a render pass instance started with vkCmdBeginRendering, memory barriers specified by this command must only include VK_ACCESS_2_COLOR_ATTACHMENT_READ_BIT, VK_ACCESS_2_COLOR_ATTACHMENT_WRITE_BIT, VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_READ_BIT, or VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT in their access masks

- VUID-vkCmdPipelineBarrier2-image-09555
  If `vkCmdPipelineBarrier2` is called within a render pass instance started with vkCmdBeginRendering, and the `image` member of any image memory barrier is used as an attachment in the current render pass instance, it must be in the VK_IMAGE_LAYOUT_RENDERING_LOCAL_READ or VK_IMAGE_LAYOUT_GENERAL layout

- VUID-vkCmdPipelineBarrier2-srcStageMask-09556
  If `vkCmdPipelineBarrier2` is called within a render pass instance started with vkCmdBeginRendering, this command must only specify framebuffer-space stages in `srcStageMask` and `dstStageMask`

- VUID-vkCmdPipelineBarrier2-image-09373
  If `vkCmdPipelineBarrier2` is called within a render pass instance using a VkRenderPass object, and the `image` member of any image memory barrier is a color resolve attachment, the corresponding color attachment must be VK_ATTACHMENT_UNUSED

- VUID-vkCmdPipelineBarrier2-image-09374
  If `vkCmdPipelineBarrier2` is called within a render pass instance using a VkRenderPass object, and the `image` member of any image memory barrier is a color resolve attachment, it must have been created with a non-zero VkExternalFormatANDROID::`externalFormat` value

- VUID-vkCmdPipelineBarrier2-oldLayout-01181
  If `vkCmdPipelineBarrier2` is called within a render pass instance, the `oldLayout` and `newLayout` members of any image memory barrier included in this command must be equal

- VUID-vkCmdPipelineBarrier2-srcQueueFamilyIndex-01182
  If `vkCmdPipelineBarrier2` is called within a render pass instance, the `srcQueueFamilyIndex` and `dstQueueFamilyIndex` members of any memory barrier included in this command must be equal

- VUID-vkCmdPipelineBarrier2-synchronization2-03848
  The `synchronization2` feature must be enabled

- VUID-vkCmdPipelineBarrier2-srcStageMask-09673
  The `srcStageMask` member of any element of the `pMemoryBarriers` member of `pDependencyInfo` must only include pipeline stages valid for the queue family that was used to create the command pool that `commandBuffer` was allocated from

- VUID-vkCmdPipelineBarrier2-dstStageMask-09674
  The `dstStageMask` member of any element of the `pMemoryBarriers` member of `pDependencyInfo` must only include pipeline stages valid for the queue family that was used to create the command pool that `commandBuffer` was allocated from

- VUID-vkCmdPipelineBarrier2-srcStageMask-09675
  If a buffer or image memory barrier does not specify an acquire operation, or if it does but `pDependencyInfo->dependencyFlags` includes VK_DEPENDENCY_QUEUE_FAMILY_OWNERSHIP_TRANSFER_USE_ALL_STAGES_BIT_KHR, the respective `srcStageMask` member of the element of the `pBufferMemoryBarriers` or `pImageMemoryBarriers` members of `pDependencyInfo` must only include pipeline stages valid for the queue family that was used to create the command pool that `commandBuffer` was allocated from

- VUID-vkCmdPipelineBarrier2-dstStageMask-09676
  If a buffer or image memory barrier does not specify an release operation, or if it does but `pDependencyInfo->dependencyFlags` includes VK_DEPENDENCY_QUEUE_FAMILY_OWNERSHIP_TRANSFER_USE_ALL_STAGES_BIT_KHR, the respective `dstStageMask` member of the element of the `pBufferMemoryBarriers` or `pImageMemoryBarriers` members of `pDependencyInfo` must only include pipeline stages valid for the queue family that was used to create the command pool that `commandBuffer` was allocated from

- VUID-vkCmdPipelineBarrier2-srcQueueFamilyIndex-10387
  If a buffer or image memory barrier specifies a queue family ownership transfer operation, either the `srcQueueFamilyIndex` or `dstQueueFamilyIndex` member of the element of the `pBufferMemoryBarriers` or `pImageMemoryBarriers` members of `pDependencyInfo` and the queue family index that was used to create the command pool that `commandBuffer` was allocated from must be equal

Valid Usage (Implicit)

- VUID-vkCmdPipelineBarrier2-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdPipelineBarrier2-pDependencyInfo-parameter
  `pDependencyInfo` must be a valid pointer to a valid VkDependencyInfo structure

- VUID-vkCmdPipelineBarrier2-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdPipelineBarrier2-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, VK_QUEUE_GRAPHICS_BIT, VK_QUEUE_TRANSFER_BIT, VK_QUEUE_VIDEO_DECODE_BIT_KHR, or VK_QUEUE_VIDEO_ENCODE_BIT_KHR operations

- VUID-vkCmdPipelineBarrier2-suspended
  This command must not be called between suspended render pass instances

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Both | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT VK_QUEUE_TRANSFER_BIT VK_QUEUE_VIDEO_DECODE_BIT_KHR VK_QUEUE_VIDEO_ENCODE_BIT_KHR | Synchronization

Conditional Rendering

vkCmdPipelineBarrier2 is not affected by conditional rendering

To record a pipeline barrier, call:

Warning | This functionality is superseded by vkCmdPipelineBarrier2. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_0
    void vkCmdPipelineBarrier(
        VkCommandBuffer                             commandBuffer,
        VkPipelineStageFlags                        srcStageMask,
        VkPipelineStageFlags                        dstStageMask,
        VkDependencyFlags                           dependencyFlags,
        uint32_t                                    memoryBarrierCount,
        const VkMemoryBarrier*                      pMemoryBarriers,
        uint32_t                                    bufferMemoryBarrierCount,
        const VkBufferMemoryBarrier*                pBufferMemoryBarriers,
        uint32_t                                    imageMemoryBarrierCount,
        const VkImageMemoryBarrier*                 pImageMemoryBarriers);

- `commandBuffer` is the command buffer into which the command is recorded.

- `srcStageMask` is a bitmask of VkPipelineStageFlagBits specifying the source stages.

- `dstStageMask` is a bitmask of VkPipelineStageFlagBits specifying the destination stages.

- `dependencyFlags` is a bitmask of VkDependencyFlagBits specifying how execution and memory dependencies are formed.

- `memoryBarrierCount` is the length of the `pMemoryBarriers` array.

- `pMemoryBarriers` is a pointer to an array of VkMemoryBarrier structures.

- `bufferMemoryBarrierCount` is the length of the `pBufferMemoryBarriers` array.

- `pBufferMemoryBarriers` is a pointer to an array of VkBufferMemoryBarrier structures.

- `imageMemoryBarrierCount` is the length of the `pImageMemoryBarriers` array.

- `pImageMemoryBarriers` is a pointer to an array of VkImageMemoryBarrier structures.

`vkCmdPipelineBarrier` operates almost identically to vkCmdPipelineBarrier2, except that the scopes and barriers are defined as direct parameters rather than being defined by a VkDependencyInfo.

When vkCmdPipelineBarrier is submitted to a queue, it defines a memory dependency between commands that were submitted to the same queue before it, and those submitted to the same queue after it.

If vkCmdPipelineBarrier was recorded outside a render pass instance, the first synchronization scope includes all commands that occur earlier in submission order. If vkCmdPipelineBarrier was recorded inside a render pass instance, the first synchronization scope includes only commands that occur earlier in submission order within the same subpass. In either case, the first synchronization scope is limited to operations on the pipeline stages determined by the source stage mask specified by `srcStageMask`.

If vkCmdPipelineBarrier was recorded outside a render pass instance, the second synchronization scope includes all commands that occur later in submission order. If vkCmdPipelineBarrier was recorded inside a render pass instance, the second synchronization scope includes only commands that occur later in submission order within the same subpass. In either case, the second synchronization scope is limited to operations on the pipeline stages determined by the destination stage mask specified by `dstStageMask`.

The first access scope is limited to accesses in the pipeline stages determined by the source stage mask specified by `srcStageMask`. Within that, the first access scope only includes the first access scopes defined by elements of the `pMemoryBarriers`, `pBufferMemoryBarriers` and `pImageMemoryBarriers` arrays, which each define a set of memory barriers. If no memory barriers are specified, then the first access scope includes no accesses.

The second access scope is limited to accesses in the pipeline stages determined by the destination stage mask specified by `dstStageMask`. Within that, the second access scope only includes the second access scopes defined by elements of the `pMemoryBarriers`, `pBufferMemoryBarriers` and `pImageMemoryBarriers` arrays, which each define a set of memory barriers. If no memory barriers are specified, then the second access scope includes no accesses.

If `dependencyFlags` includes VK_DEPENDENCY_BY_REGION_BIT, then any dependency between framebuffer-space pipeline stages is framebuffer-local - otherwise it is framebuffer-global.

Valid Usage

- VUID-vkCmdPipelineBarrier-srcStageMask-04090
  If the `geometryShader` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT

- VUID-vkCmdPipelineBarrier-srcStageMask-04091
  If the `tessellationShader` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT or VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT

- VUID-vkCmdPipelineBarrier-srcStageMask-04092
  If the `conditionalRendering` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT

- VUID-vkCmdPipelineBarrier-srcStageMask-04093
  If the `fragmentDensityMap` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT

- VUID-vkCmdPipelineBarrier-srcStageMask-04094
  If the `transformFeedback` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT

- VUID-vkCmdPipelineBarrier-srcStageMask-04095
  If the `meshShader` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_MESH_SHADER_BIT_EXT

- VUID-vkCmdPipelineBarrier-srcStageMask-04096
  If the `taskShader` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_TASK_SHADER_BIT_EXT

- VUID-vkCmdPipelineBarrier-srcStageMask-07318
  If neither of the `shadingRateImage` or the `attachmentFragmentShadingRate` features are enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

- VUID-vkCmdPipelineBarrier-srcStageMask-03937
  If the `synchronization2` feature is not enabled, `srcStageMask` must not be `0`

- VUID-vkCmdPipelineBarrier-srcStageMask-07949
  If neither the VK_NV_ray_tracing extension or the `rayTracingPipeline` feature are enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_KHR

- VUID-vkCmdPipelineBarrier-srcStageMask-10754
  If the `accelerationStructure` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR

- VUID-vkCmdPipelineBarrier-srcAccessMask-06257
  If the `rayQuery` feature is not enabled and a memory barrier `srcAccessMask` includes VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR, `srcStageMask` must include VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_KHR, VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, or VK_PIPELINE_STAGE_ALL_COMMANDS_BIT

- VUID-vkCmdPipelineBarrier-dstStageMask-04090
  If the `geometryShader` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT

- VUID-vkCmdPipelineBarrier-dstStageMask-04091
  If the `tessellationShader` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT or VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT

- VUID-vkCmdPipelineBarrier-dstStageMask-04092
  If the `conditionalRendering` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT

- VUID-vkCmdPipelineBarrier-dstStageMask-04093
  If the `fragmentDensityMap` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT

- VUID-vkCmdPipelineBarrier-dstStageMask-04094
  If the `transformFeedback` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT

- VUID-vkCmdPipelineBarrier-dstStageMask-04095
  If the `meshShader` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_MESH_SHADER_BIT_EXT

- VUID-vkCmdPipelineBarrier-dstStageMask-04096
  If the `taskShader` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_TASK_SHADER_BIT_EXT

- VUID-vkCmdPipelineBarrier-dstStageMask-07318
  If neither of the `shadingRateImage` or the `attachmentFragmentShadingRate` features are enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

- VUID-vkCmdPipelineBarrier-dstStageMask-03937
  If the `synchronization2` feature is not enabled, `dstStageMask` must not be `0`

- VUID-vkCmdPipelineBarrier-dstStageMask-07949
  If neither the VK_NV_ray_tracing extension or the `rayTracingPipeline` feature are enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_KHR

- VUID-vkCmdPipelineBarrier-dstStageMask-10754
  If the `accelerationStructure` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR

- VUID-vkCmdPipelineBarrier-dstAccessMask-06257
  If the `rayQuery` feature is not enabled and a memory barrier `dstAccessMask` includes VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR, `dstStageMask` must include VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_KHR, VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, or VK_PIPELINE_STAGE_ALL_COMMANDS_BIT

- VUID-vkCmdPipelineBarrier-srcAccessMask-02815
  The `srcAccessMask` member of each element of `pMemoryBarriers` must only include access flags that are supported by one or more of the pipeline stages in `srcStageMask`, as specified in the table of supported access types

- VUID-vkCmdPipelineBarrier-dstAccessMask-02816
  The `dstAccessMask` member of each element of `pMemoryBarriers` must only include access flags that are supported by one or more of the pipeline stages in `dstStageMask`, as specified in the table of supported access types

- VUID-vkCmdPipelineBarrier-pBufferMemoryBarriers-02817
  For each element of `pBufferMemoryBarriers`, if its `srcQueueFamilyIndex` and `dstQueueFamilyIndex` members are equal, or if its `srcQueueFamilyIndex` is the queue family index that was used to create the command pool that `commandBuffer` was allocated from, then its `srcAccessMask` member must only contain access flags that are supported by one or more of the pipeline stages in `srcStageMask`, as specified in the table of supported access types

- VUID-vkCmdPipelineBarrier-pBufferMemoryBarriers-02818
  For each element of `pBufferMemoryBarriers`, if its `srcQueueFamilyIndex` and `dstQueueFamilyIndex` members are equal, or if its `dstQueueFamilyIndex` is the queue family index that was used to create the command pool that `commandBuffer` was allocated from, then its `dstAccessMask` member must only contain access flags that are supported by one or more of the pipeline stages in `dstStageMask`, as specified in the table of supported access types

- VUID-vkCmdPipelineBarrier-pImageMemoryBarriers-02819
  For each element of `pImageMemoryBarriers`, if its `srcQueueFamilyIndex` and `dstQueueFamilyIndex` members are equal, or if its `srcQueueFamilyIndex` is the queue family index that was used to create the command pool that `commandBuffer` was allocated from, then its `srcAccessMask` member must only contain access flags that are supported by one or more of the pipeline stages in `srcStageMask`, as specified in the table of supported access types

- VUID-vkCmdPipelineBarrier-pImageMemoryBarriers-02820
  For each element of `pImageMemoryBarriers`, if its `srcQueueFamilyIndex` and `dstQueueFamilyIndex` members are equal, or if its `dstQueueFamilyIndex` is the queue family index that was used to create the command pool that `commandBuffer` was allocated from, then its `dstAccessMask` member must only contain access flags that are supported by one or more of the pipeline stages in `dstStageMask`, as specified in the table of supported access types

- VUID-vkCmdPipelineBarrier-image-09373
  If `vkCmdPipelineBarrier` is called within a render pass instance using a VkRenderPass object, and the `image` member of any image memory barrier is a color resolve attachment, the corresponding color attachment must be VK_ATTACHMENT_UNUSED

- VUID-vkCmdPipelineBarrier-image-09374
  If `vkCmdPipelineBarrier` is called within a render pass instance using a VkRenderPass object, and the `image` member of any image memory barrier is a color resolve attachment, it must have been created with a non-zero VkExternalFormatANDROID::`externalFormat` value

- VUID-vkCmdPipelineBarrier-oldLayout-01181
  If `vkCmdPipelineBarrier` is called within a render pass instance, the `oldLayout` and `newLayout` members of any image memory barrier included in this command must be equal

- VUID-vkCmdPipelineBarrier-srcQueueFamilyIndex-01182
  If `vkCmdPipelineBarrier` is called within a render pass instance, the `srcQueueFamilyIndex` and `dstQueueFamilyIndex` members of any memory barrier included in this command must be equal

- VUID-vkCmdPipelineBarrier-None-07889
  If `vkCmdPipelineBarrier` is called within a render pass instance using a VkRenderPass object, the render pass must have been created with at least one subpass dependency that expresses a dependency from the current subpass to itself, does not include VK_DEPENDENCY_BY_REGION_BIT if this command does not, does not include VK_DEPENDENCY_VIEW_LOCAL_BIT if this command does not, and has synchronization scopes and access scopes that are all supersets of the scopes defined in this command

- VUID-vkCmdPipelineBarrier-bufferMemoryBarrierCount-01178
  If `vkCmdPipelineBarrier` is called within a render pass instance using a VkRenderPass object, it must not include any buffer memory barriers

- VUID-vkCmdPipelineBarrier-image-04073
  If `vkCmdPipelineBarrier` is called within a render pass instance using a VkRenderPass object, the `image` member of any image memory barrier included in this command must be an attachment used in the current subpass both as an input attachment, and as either a color, color resolve, or depth/stencil attachment

- VUID-vkCmdPipelineBarrier-None-07890
  If `vkCmdPipelineBarrier` is called within a render pass instance, and the source stage masks of any memory barriers include framebuffer-space stages, destination stage masks of all memory barriers must only include framebuffer-space stages

- VUID-vkCmdPipelineBarrier-dependencyFlags-07891
  If `vkCmdPipelineBarrier` is called within a render pass instance, and the source stage masks of any memory barriers include framebuffer-space stages, then `dependencyFlags` must include VK_DEPENDENCY_BY_REGION_BIT

- VUID-vkCmdPipelineBarrier-None-07892
  If `vkCmdPipelineBarrier` is called within a render pass instance, the source and destination stage masks of any memory barriers must only include graphics pipeline stages

- VUID-vkCmdPipelineBarrier-dependencyFlags-01186
  If `vkCmdPipelineBarrier` is called outside of a render pass instance, the dependency flags must not include VK_DEPENDENCY_VIEW_LOCAL_BIT

- VUID-vkCmdPipelineBarrier-None-07893
  If `vkCmdPipelineBarrier` is called inside a render pass instance, and there is more than one view in the current subpass, dependency flags must include VK_DEPENDENCY_VIEW_LOCAL_BIT

- VUID-vkCmdPipelineBarrier-None-09553
  If none of the `shaderTileImageColorReadAccess`, `shaderTileImageStencilReadAccess`, or `shaderTileImageDepthReadAccess` features are enabled, and the `dynamicRenderingLocalRead` feature is not enabled, `vkCmdPipelineBarrier` must not be called within a render pass instance started with vkCmdBeginRendering

- VUID-vkCmdPipelineBarrier-None-09554
  If the `dynamicRenderingLocalRead` feature is not enabled, and `vkCmdPipelineBarrier` is called within a render pass instance started with vkCmdBeginRendering, there must be no buffer or image memory barriers specified by this command

- VUID-vkCmdPipelineBarrier-None-09586
  If the `dynamicRenderingLocalRead` feature is not enabled, and `vkCmdPipelineBarrier` is called within a render pass instance started with vkCmdBeginRendering, memory barriers specified by this command must only include VK_ACCESS_2_COLOR_ATTACHMENT_READ_BIT, VK_ACCESS_2_COLOR_ATTACHMENT_WRITE_BIT, VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_READ_BIT, or VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT in their access masks

- VUID-vkCmdPipelineBarrier-image-09555
  If `vkCmdPipelineBarrier` is called within a render pass instance started with vkCmdBeginRendering, and the `image` member of any image memory barrier is used as an attachment in the current render pass instance, it must be in the VK_IMAGE_LAYOUT_RENDERING_LOCAL_READ or VK_IMAGE_LAYOUT_GENERAL layout

- VUID-vkCmdPipelineBarrier-srcStageMask-09556
  If `vkCmdPipelineBarrier` is called within a render pass instance started with vkCmdBeginRendering, this command must only specify framebuffer-space stages in `srcStageMask` and `dstStageMask`

- VUID-vkCmdPipelineBarrier-oldLayout-10758
  If called within a render pass instance using a VkRenderPass object, the `oldLayout` member of any image memory barrier included in this command must be equal to the layout that the corresponding attachment uses during the subpass

- VUID-vkCmdPipelineBarrier-oldLayout-10759
  If called within a render pass instance started with vkCmdBeginRendering, the `oldLayout` member of any image memory barrier included in this command must be equal to the layout that the corresponding attachment uses during the render pass instance

- VUID-vkCmdPipelineBarrier-srcStageMask-06461
  Any pipeline stage included in `srcStageMask` must be supported by the capabilities of the queue family specified by the `queueFamilyIndex` member of the VkCommandPoolCreateInfo structure that was used to create the `VkCommandPool` that `commandBuffer` was allocated from, as specified in the table of supported pipeline stages

- VUID-vkCmdPipelineBarrier-dstStageMask-06462
  Any pipeline stage included in `dstStageMask` must be supported by the capabilities of the queue family specified by the `queueFamilyIndex` member of the VkCommandPoolCreateInfo structure that was used to create the `VkCommandPool` that `commandBuffer` was allocated from, as specified in the table of supported pipeline stages

- VUID-vkCmdPipelineBarrier-srcStageMask-09633
  If either `srcStageMask` or `dstStageMask` includes VK_PIPELINE_STAGE_HOST_BIT, for each element of `pImageMemoryBarriers`, `srcQueueFamilyIndex` and `dstQueueFamilyIndex` must be equal

- VUID-vkCmdPipelineBarrier-srcStageMask-09634
  If either `srcStageMask` or `dstStageMask` includes VK_PIPELINE_STAGE_HOST_BIT, for each element of `pBufferMemoryBarriers`, `srcQueueFamilyIndex` and `dstQueueFamilyIndex` must be equal

- VUID-vkCmdPipelineBarrier-srcQueueFamilyIndex-10388
  If a buffer or image memory barrier specifies a queue family ownership transfer operation, either the `srcQueueFamilyIndex` or `dstQueueFamilyIndex` member and the queue family index that was used to create the command pool that `commandBuffer` was allocated from must be equal

- VUID-vkCmdPipelineBarrier-maintenance8-10206
  If the `maintenance8` feature is not enabled, `dependencyFlags` must not include VK_DEPENDENCY_QUEUE_FAMILY_OWNERSHIP_TRANSFER_USE_ALL_STAGES_BIT_KHR

Valid Usage (Implicit)

- VUID-vkCmdPipelineBarrier-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdPipelineBarrier-srcStageMask-parameter
  `srcStageMask` must be a valid combination of VkPipelineStageFlagBits values

- VUID-vkCmdPipelineBarrier-dstStageMask-parameter
  `dstStageMask` must be a valid combination of VkPipelineStageFlagBits values

- VUID-vkCmdPipelineBarrier-dependencyFlags-parameter
  `dependencyFlags` must be a valid combination of VkDependencyFlagBits values

- VUID-vkCmdPipelineBarrier-pMemoryBarriers-parameter
  If `memoryBarrierCount` is not `0`, `pMemoryBarriers` must be a valid pointer to an array of `memoryBarrierCount` valid VkMemoryBarrier structures

- VUID-vkCmdPipelineBarrier-pBufferMemoryBarriers-parameter
  If `bufferMemoryBarrierCount` is not `0`, `pBufferMemoryBarriers` must be a valid pointer to an array of `bufferMemoryBarrierCount` valid VkBufferMemoryBarrier structures

- VUID-vkCmdPipelineBarrier-pImageMemoryBarriers-parameter
  If `imageMemoryBarrierCount` is not `0`, `pImageMemoryBarriers` must be a valid pointer to an array of `imageMemoryBarrierCount` valid VkImageMemoryBarrier structures

- VUID-vkCmdPipelineBarrier-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdPipelineBarrier-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, VK_QUEUE_GRAPHICS_BIT, VK_QUEUE_TRANSFER_BIT, VK_QUEUE_VIDEO_DECODE_BIT_KHR, or VK_QUEUE_VIDEO_ENCODE_BIT_KHR operations

- VUID-vkCmdPipelineBarrier-suspended
  This command must not be called between suspended render pass instances

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Both | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT VK_QUEUE_TRANSFER_BIT VK_QUEUE_VIDEO_DECODE_BIT_KHR VK_QUEUE_VIDEO_ENCODE_BIT_KHR | Synchronization

Conditional Rendering

vkCmdPipelineBarrier is not affected by conditional rendering

Bits which can be set in `vkCmdPipelineBarrier`::`dependencyFlags`, specifying how execution and memory dependencies are formed, are:

    // Provided by VK_VERSION_1_0
    typedef enum VkDependencyFlagBits {
        VK_DEPENDENCY_BY_REGION_BIT = 0x00000001,
      // Provided by VK_VERSION_1_1
        VK_DEPENDENCY_DEVICE_GROUP_BIT = 0x00000004,
      // Provided by VK_VERSION_1_1
        VK_DEPENDENCY_VIEW_LOCAL_BIT = 0x00000002,
      // Provided by VK_EXT_attachment_feedback_loop_layout
        VK_DEPENDENCY_FEEDBACK_LOOP_BIT_EXT = 0x00000008,
      // Provided by VK_KHR_maintenance8
        VK_DEPENDENCY_QUEUE_FAMILY_OWNERSHIP_TRANSFER_USE_ALL_STAGES_BIT_KHR = 0x00000020,
      // Provided by VK_KHR_maintenance9
        VK_DEPENDENCY_ASYMMETRIC_EVENT_BIT_KHR = 0x00000040,
      // Provided by VK_KHR_multiview
        VK_DEPENDENCY_VIEW_LOCAL_BIT_KHR = VK_DEPENDENCY_VIEW_LOCAL_BIT,
      // Provided by VK_KHR_device_group
        VK_DEPENDENCY_DEVICE_GROUP_BIT_KHR = VK_DEPENDENCY_DEVICE_GROUP_BIT,
    } VkDependencyFlagBits;

- VK_DEPENDENCY_BY_REGION_BIT specifies that dependencies will be split into multiple framebuffer-local regions according to the (x,y,layer,sample) coordinates.

- VK_DEPENDENCY_VIEW_LOCAL_BIT specifies that dependencies will be split into multiple framebuffer-local regions according to the view.

- VK_DEPENDENCY_DEVICE_GROUP_BIT specifies that dependencies are non-device-local.

- VK_DEPENDENCY_FEEDBACK_LOOP_BIT_EXT specifies that the render pass will write to and read from the same image with feedback loop enabled.

- VK_DEPENDENCY_QUEUE_FAMILY_OWNERSHIP_TRANSFER_USE_ALL_STAGES_BIT_KHR specifies that source and destination stages are not ignored when performing a queue family ownership transfer.

- VK_DEPENDENCY_ASYMMETRIC_EVENT_BIT_KHR specifies that the access scopes of vkCmdSetEvent2 and vkCmdWaitEvents2 do not need to match for a given event when it is specified in both commands, and the access scope of vkCmdSetEvent2 is empty.

    // Provided by VK_VERSION_1_0
    typedef VkFlags VkDependencyFlags;

`VkDependencyFlags` is a bitmask type for setting a mask of zero or more VkDependencyFlagBits.

### 7.7. Memory Barriers

Memory barriers are used to explicitly control access to buffer and image subresource ranges. Memory barriers are used to transfer ownership between queue families, change image layouts, and define availability and visibility operations. They explicitly define the access types and buffer and image subresource ranges that are included in the access scopes of a memory dependency that is created by a synchronization command that includes them.

#### 7.7.1. Global Memory Barriers

Global memory barriers apply to memory accesses involving all memory objects that exist at the time of its execution.

The `VkMemoryBarrier2` structure is defined as:

    // Provided by VK_VERSION_1_3
    typedef struct VkMemoryBarrier2 {
        VkStructureType          sType;
        const void*              pNext;
        VkPipelineStageFlags2    srcStageMask;
        VkAccessFlags2           srcAccessMask;
        VkPipelineStageFlags2    dstStageMask;
        VkAccessFlags2           dstAccessMask;
    } VkMemoryBarrier2;

    // Provided by VK_KHR_synchronization2
    // Equivalent to VkMemoryBarrier2
    typedef VkMemoryBarrier2 VkMemoryBarrier2KHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `srcStageMask` is a VkPipelineStageFlags2 mask of pipeline stages to be included in the first synchronization scope.

- `srcAccessMask` is a VkAccessFlags2 mask of access flags to be included in the first access scope.

- `dstStageMask` is a VkPipelineStageFlags2 mask of pipeline stages to be included in the second synchronization scope.

- `dstAccessMask` is a VkAccessFlags2 mask of access flags to be included in the second access scope.

This structure defines a memory dependency affecting all device memory.

The first synchronization scope and access scope described by this structure include only operations and memory accesses specified by the source stage mask and source access mask.

The second synchronization scope and access scope described by this structure include only operations and memory accesses specified by destination stage mask and destination access mask.

Valid Usage

- VUID-VkMemoryBarrier2-srcStageMask-03929
  If the `geometryShader` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_2_GEOMETRY_SHADER_BIT

- VUID-VkMemoryBarrier2-srcStageMask-03930
  If the `tessellationShader` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT or VK_PIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT

- VUID-VkMemoryBarrier2-srcStageMask-03931
  If the `conditionalRendering` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_2_CONDITIONAL_RENDERING_BIT_EXT

- VUID-VkMemoryBarrier2-srcStageMask-03932
  If the `fragmentDensityMap` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_2_FRAGMENT_DENSITY_PROCESS_BIT_EXT

- VUID-VkMemoryBarrier2-srcStageMask-03933
  If the `transformFeedback` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT

- VUID-VkMemoryBarrier2-srcStageMask-03934
  If the `meshShader` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_2_MESH_SHADER_BIT_EXT

- VUID-VkMemoryBarrier2-srcStageMask-03935
  If the `taskShader` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_2_TASK_SHADER_BIT_EXT

- VUID-VkMemoryBarrier2-srcStageMask-07316
  If neither of the `shadingRateImage` or the `attachmentFragmentShadingRate` features are enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

- VUID-VkMemoryBarrier2-srcStageMask-04957
  If the `subpassShading` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_2_SUBPASS_SHADER_BIT_HUAWEI

- VUID-VkMemoryBarrier2-srcStageMask-04995
  If the `invocationMask` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_2_INVOCATION_MASK_BIT_HUAWEI

- VUID-VkMemoryBarrier2-srcStageMask-07946
  If neither the VK_NV_ray_tracing extension or the `rayTracingPipeline` feature are enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR

- VUID-VkMemoryBarrier2-srcStageMask-10751
  If the `accelerationStructure` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR

- VUID-VkMemoryBarrier2-srcStageMask-10752
  If the `rayTracingMaintenance1` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR

- VUID-VkMemoryBarrier2-srcStageMask-11541
  If the `VkPhysicalDeviceOpacityMicromapFeaturesEXT`::`micromap` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT

- VUID-VkMemoryBarrier2-srcAccessMask-03900
  If `srcAccessMask` includes VK_ACCESS_2_INDIRECT_COMMAND_READ_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_DRAW_INDIRECT_BIT, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, VK_PIPELINE_STAGE_2_COPY_INDIRECT_BIT_KHR, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryBarrier2-srcAccessMask-03901
  If `srcAccessMask` includes VK_ACCESS_2_INDEX_READ_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_INDEX_INPUT_BIT, VK_PIPELINE_STAGE_2_VERTEX_INPUT_BIT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryBarrier2-srcAccessMask-03902
  If `srcAccessMask` includes VK_ACCESS_2_VERTEX_ATTRIBUTE_READ_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_VERTEX_ATTRIBUTE_INPUT_BIT, VK_PIPELINE_STAGE_2_VERTEX_INPUT_BIT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryBarrier2-srcAccessMask-03903
  If `srcAccessMask` includes VK_ACCESS_2_INPUT_ATTACHMENT_READ_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT, VK_PIPELINE_STAGE_2_SUBPASS_SHADER_BIT_HUAWEI, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryBarrier2-srcAccessMask-03904
  If `srcAccessMask` includes VK_ACCESS_2_UNIFORM_READ_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, or one of the `VK_PIPELINE_STAGE_*_SHADER_BIT` stages

- VUID-VkMemoryBarrier2-srcAccessMask-03905
  If `srcAccessMask` includes VK_ACCESS_2_SHADER_SAMPLED_READ_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, or one of the `VK_PIPELINE_STAGE_*_SHADER_BIT` stages

- VUID-VkMemoryBarrier2-srcAccessMask-03906
  If `srcAccessMask` includes VK_ACCESS_2_SHADER_STORAGE_READ_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, or one of the `VK_PIPELINE_STAGE_*_SHADER_BIT` stages

- VUID-VkMemoryBarrier2-srcAccessMask-03907
  If `srcAccessMask` includes VK_ACCESS_2_SHADER_STORAGE_WRITE_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, or one of the `VK_PIPELINE_STAGE_*_SHADER_BIT` stages

- VUID-VkMemoryBarrier2-srcAccessMask-07454
  If `srcAccessMask` includes VK_ACCESS_2_SHADER_READ_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT, or one of the `VK_PIPELINE_STAGE_*_SHADER_BIT` stages

- VUID-VkMemoryBarrier2-srcAccessMask-03909
  If `srcAccessMask` includes VK_ACCESS_2_SHADER_WRITE_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, or one of the `VK_PIPELINE_STAGE_*_SHADER_BIT` stages

- VUID-VkMemoryBarrier2-srcAccessMask-03910
  If `srcAccessMask` includes VK_ACCESS_2_COLOR_ATTACHMENT_READ_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryBarrier2-srcAccessMask-03911
  If `srcAccessMask` includes VK_ACCESS_2_COLOR_ATTACHMENT_WRITE_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryBarrier2-srcAccessMask-03912
  If `srcAccessMask` includes VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_READ_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_EARLY_FRAGMENT_TESTS_BIT, VK_PIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryBarrier2-srcAccessMask-03913
  If `srcAccessMask` includes VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_EARLY_FRAGMENT_TESTS_BIT, VK_PIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryBarrier2-srcAccessMask-03914
  If `srcAccessMask` includes VK_ACCESS_2_TRANSFER_READ_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_COPY_BIT, VK_PIPELINE_STAGE_2_BLIT_BIT, VK_PIPELINE_STAGE_2_RESOLVE_BIT, VK_PIPELINE_STAGE_2_ALL_TRANSFER_BIT, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR, VK_PIPELINE_STAGE_2_CONVERT_COOPERATIVE_VECTOR_MATRIX_BIT_NV, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryBarrier2-srcAccessMask-03915
  If `srcAccessMask` includes VK_ACCESS_2_TRANSFER_WRITE_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_COPY_BIT, VK_PIPELINE_STAGE_2_BLIT_BIT, VK_PIPELINE_STAGE_2_RESOLVE_BIT, VK_PIPELINE_STAGE_2_CLEAR_BIT, VK_PIPELINE_STAGE_2_ALL_TRANSFER_BIT, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR, VK_PIPELINE_STAGE_2_CONVERT_COOPERATIVE_VECTOR_MATRIX_BIT_NV, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryBarrier2-srcAccessMask-03916
  If `srcAccessMask` includes VK_ACCESS_2_HOST_READ_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_HOST_BIT

- VUID-VkMemoryBarrier2-srcAccessMask-03917
  If `srcAccessMask` includes VK_ACCESS_2_HOST_WRITE_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_HOST_BIT

- VUID-VkMemoryBarrier2-srcAccessMask-03918
  If `srcAccessMask` includes VK_ACCESS_2_CONDITIONAL_RENDERING_READ_BIT_EXT, `srcStageMask` must include VK_PIPELINE_STAGE_2_CONDITIONAL_RENDERING_BIT_EXT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryBarrier2-srcAccessMask-03919
  If `srcAccessMask` includes VK_ACCESS_2_FRAGMENT_DENSITY_MAP_READ_BIT_EXT, `srcStageMask` must include VK_PIPELINE_STAGE_2_FRAGMENT_DENSITY_PROCESS_BIT_EXT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryBarrier2-srcAccessMask-03920
  If `srcAccessMask` includes VK_ACCESS_2_TRANSFORM_FEEDBACK_WRITE_BIT_EXT, `srcStageMask` must include VK_PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryBarrier2-srcAccessMask-04747
  If `srcAccessMask` includes VK_ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT, `srcStageMask` must include VK_PIPELINE_STAGE_2_DRAW_INDIRECT_BIT, VK_PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryBarrier2-srcAccessMask-03922
  If `srcAccessMask` includes VK_ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT, `srcStageMask` must include VK_PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryBarrier2-srcAccessMask-03923
  If `srcAccessMask` includes VK_ACCESS_2_SHADING_RATE_IMAGE_READ_BIT_NV, `srcStageMask` must include VK_PIPELINE_STAGE_2_SHADING_RATE_IMAGE_BIT_NV, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryBarrier2-srcAccessMask-04994
  If `srcAccessMask` includes VK_ACCESS_2_INVOCATION_MASK_READ_BIT_HUAWEI, `srcStageMask` must include VK_PIPELINE_STAGE_2_INVOCATION_MASK_BIT_HUAWEI

- VUID-VkMemoryBarrier2-srcAccessMask-03924
  If `srcAccessMask` includes VK_ACCESS_2_COMMAND_PREPROCESS_READ_BIT_NV, `srcStageMask` must include VK_PIPELINE_STAGE_2_COMMAND_PREPROCESS_BIT_NV or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryBarrier2-srcAccessMask-03925
  If `srcAccessMask` includes VK_ACCESS_2_COMMAND_PREPROCESS_WRITE_BIT_NV, `srcStageMask` must include VK_PIPELINE_STAGE_2_COMMAND_PREPROCESS_BIT_NV or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryBarrier2-srcAccessMask-03926
  If `srcAccessMask` includes VK_ACCESS_2_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT, `srcStageMask` must include VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryBarrier2-srcAccessMask-03927
  If `srcAccessMask` includes VK_ACCESS_2_ACCELERATION_STRUCTURE_READ_BIT_KHR, and the `rayQuery` feature is enabled, `srcStageMask` must include VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR, one of the `VK_PIPELINE_STAGE_*_SHADER_BIT` stages, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryBarrier2-srcAccessMask-03928
  If `srcAccessMask` includes VK_ACCESS_2_ACCELERATION_STRUCTURE_WRITE_BIT_KHR, `srcStageMask` must include VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryBarrier2-srcAccessMask-06256
  If `srcAccessMask` includes VK_ACCESS_2_ACCELERATION_STRUCTURE_READ_BIT_KHR, and the `rayQuery` feature is not enabled, `srcStageMask` must include VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryBarrier2-srcAccessMask-07272
  If `srcAccessMask` includes VK_ACCESS_2_SHADER_BINDING_TABLE_READ_BIT_KHR, `srcStageMask` must include VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT or VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR

- VUID-VkMemoryBarrier2-srcAccessMask-04858
  If `srcAccessMask` includes VK_ACCESS_2_VIDEO_DECODE_READ_BIT_KHR, `srcStageMask` must include VK_PIPELINE_STAGE_2_VIDEO_DECODE_BIT_KHR

- VUID-VkMemoryBarrier2-srcAccessMask-04859
  If `srcAccessMask` includes VK_ACCESS_2_VIDEO_DECODE_WRITE_BIT_KHR, `srcStageMask` must include VK_PIPELINE_STAGE_2_VIDEO_DECODE_BIT_KHR

- VUID-VkMemoryBarrier2-srcAccessMask-04860
  If `srcAccessMask` includes VK_ACCESS_2_VIDEO_ENCODE_READ_BIT_KHR, `srcStageMask` must include VK_PIPELINE_STAGE_2_VIDEO_ENCODE_BIT_KHR

- VUID-VkMemoryBarrier2-srcAccessMask-04861
  If `srcAccessMask` includes VK_ACCESS_2_VIDEO_ENCODE_WRITE_BIT_KHR, `srcStageMask` must include VK_PIPELINE_STAGE_2_VIDEO_ENCODE_BIT_KHR

- VUID-VkMemoryBarrier2-srcAccessMask-07455
  If `srcAccessMask` includes VK_ACCESS_2_OPTICAL_FLOW_READ_BIT_NV, `srcStageMask` must include VK_PIPELINE_STAGE_2_OPTICAL_FLOW_BIT_NV

- VUID-VkMemoryBarrier2-srcAccessMask-07456
  If `srcAccessMask` includes VK_ACCESS_2_OPTICAL_FLOW_WRITE_BIT_NV, `srcStageMask` must include VK_PIPELINE_STAGE_2_OPTICAL_FLOW_BIT_NV

- VUID-VkMemoryBarrier2-srcAccessMask-07457
  If `srcAccessMask` includes VK_ACCESS_2_MICROMAP_WRITE_BIT_EXT, `srcStageMask` must include VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT

- VUID-VkMemoryBarrier2-srcAccessMask-07458
  If `srcAccessMask` includes VK_ACCESS_2_MICROMAP_READ_BIT_EXT, `srcStageMask` must include VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT or VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR

- VUID-VkMemoryBarrier2-srcAccessMask-08118
  If `srcAccessMask` includes VK_ACCESS_2_DESCRIPTOR_BUFFER_READ_BIT_EXT, `srcStageMask` must include VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, or one of `VK_PIPELINE_STAGE_*_SHADER_BIT` stages

- VUID-VkMemoryBarrier2-srcAccessMask-10670
  If `srcAccessMask` includes VK_ACCESS_2_SHADER_TILE_ATTACHMENT_READ_BIT_QCOM, `srcStageMask` must include VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT or VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT

- VUID-VkMemoryBarrier2-srcAccessMask-10671
  If `srcAccessMask` includes VK_ACCESS_2_SHADER_TILE_ATTACHMENT_WRITE_BIT_QCOM, `srcStageMask` must include VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT or VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT

- VUID-VkMemoryBarrier2-srcAccessMask-11771
  If `srcAccessMask` includes VK_ACCESS_2_MEMORY_DECOMPRESSION_READ_BIT_EXT, `srcStageMask` must include VK_PIPELINE_STAGE_2_MEMORY_DECOMPRESSION_BIT_EXT

- VUID-VkMemoryBarrier2-srcAccessMask-11772
  If `srcAccessMask` includes VK_ACCESS_2_MEMORY_DECOMPRESSION_WRITE_BIT_EXT, `srcStageMask` must include VK_PIPELINE_STAGE_2_MEMORY_DECOMPRESSION_BIT_EXT

- VUID-VkMemoryBarrier2-srcAccessMask-11294
  If `srcAccessMask` includes VK_ACCESS_2_SAMPLER_HEAP_READ_BIT_EXT or VK_ACCESS_2_RESOURCE_HEAP_READ_BIT_EXT, `srcStageMask` must include VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, or one of `VK_PIPELINE_STAGE_*_SHADER_BIT` stages

- VUID-VkMemoryBarrier2-dstStageMask-03929
  If the `geometryShader` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_2_GEOMETRY_SHADER_BIT

- VUID-VkMemoryBarrier2-dstStageMask-03930
  If the `tessellationShader` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT or VK_PIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT

- VUID-VkMemoryBarrier2-dstStageMask-03931
  If the `conditionalRendering` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_2_CONDITIONAL_RENDERING_BIT_EXT

- VUID-VkMemoryBarrier2-dstStageMask-03932
  If the `fragmentDensityMap` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_2_FRAGMENT_DENSITY_PROCESS_BIT_EXT

- VUID-VkMemoryBarrier2-dstStageMask-03933
  If the `transformFeedback` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT

- VUID-VkMemoryBarrier2-dstStageMask-03934
  If the `meshShader` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_2_MESH_SHADER_BIT_EXT

- VUID-VkMemoryBarrier2-dstStageMask-03935
  If the `taskShader` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_2_TASK_SHADER_BIT_EXT

- VUID-VkMemoryBarrier2-dstStageMask-07316
  If neither of the `shadingRateImage` or the `attachmentFragmentShadingRate` features are enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

- VUID-VkMemoryBarrier2-dstStageMask-04957
  If the `subpassShading` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_2_SUBPASS_SHADER_BIT_HUAWEI

- VUID-VkMemoryBarrier2-dstStageMask-04995
  If the `invocationMask` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_2_INVOCATION_MASK_BIT_HUAWEI

- VUID-VkMemoryBarrier2-dstStageMask-07946
  If neither the VK_NV_ray_tracing extension or the `rayTracingPipeline` feature are enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR

- VUID-VkMemoryBarrier2-dstStageMask-10751
  If the `accelerationStructure` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR

- VUID-VkMemoryBarrier2-dstStageMask-10752
  If the `rayTracingMaintenance1` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR

- VUID-VkMemoryBarrier2-dstStageMask-11541
  If the `VkPhysicalDeviceOpacityMicromapFeaturesEXT`::`micromap` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT

- VUID-VkMemoryBarrier2-dstAccessMask-03900
  If `dstAccessMask` includes VK_ACCESS_2_INDIRECT_COMMAND_READ_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_DRAW_INDIRECT_BIT, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, VK_PIPELINE_STAGE_2_COPY_INDIRECT_BIT_KHR, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryBarrier2-dstAccessMask-03901
  If `dstAccessMask` includes VK_ACCESS_2_INDEX_READ_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_INDEX_INPUT_BIT, VK_PIPELINE_STAGE_2_VERTEX_INPUT_BIT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryBarrier2-dstAccessMask-03902
  If `dstAccessMask` includes VK_ACCESS_2_VERTEX_ATTRIBUTE_READ_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_VERTEX_ATTRIBUTE_INPUT_BIT, VK_PIPELINE_STAGE_2_VERTEX_INPUT_BIT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryBarrier2-dstAccessMask-03903
  If `dstAccessMask` includes VK_ACCESS_2_INPUT_ATTACHMENT_READ_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT, VK_PIPELINE_STAGE_2_SUBPASS_SHADER_BIT_HUAWEI, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryBarrier2-dstAccessMask-03904
  If `dstAccessMask` includes VK_ACCESS_2_UNIFORM_READ_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, or one of the `VK_PIPELINE_STAGE_*_SHADER_BIT` stages

- VUID-VkMemoryBarrier2-dstAccessMask-03905
  If `dstAccessMask` includes VK_ACCESS_2_SHADER_SAMPLED_READ_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, or one of the `VK_PIPELINE_STAGE_*_SHADER_BIT` stages

- VUID-VkMemoryBarrier2-dstAccessMask-03906
  If `dstAccessMask` includes VK_ACCESS_2_SHADER_STORAGE_READ_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, or one of the `VK_PIPELINE_STAGE_*_SHADER_BIT` stages

- VUID-VkMemoryBarrier2-dstAccessMask-03907
  If `dstAccessMask` includes VK_ACCESS_2_SHADER_STORAGE_WRITE_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, or one of the `VK_PIPELINE_STAGE_*_SHADER_BIT` stages

- VUID-VkMemoryBarrier2-dstAccessMask-07454
  If `dstAccessMask` includes VK_ACCESS_2_SHADER_READ_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT, or one of the `VK_PIPELINE_STAGE_*_SHADER_BIT` stages

- VUID-VkMemoryBarrier2-dstAccessMask-03909
  If `dstAccessMask` includes VK_ACCESS_2_SHADER_WRITE_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, or one of the `VK_PIPELINE_STAGE_*_SHADER_BIT` stages

- VUID-VkMemoryBarrier2-dstAccessMask-03910
  If `dstAccessMask` includes VK_ACCESS_2_COLOR_ATTACHMENT_READ_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryBarrier2-dstAccessMask-03911
  If `dstAccessMask` includes VK_ACCESS_2_COLOR_ATTACHMENT_WRITE_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryBarrier2-dstAccessMask-03912
  If `dstAccessMask` includes VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_READ_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_EARLY_FRAGMENT_TESTS_BIT, VK_PIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryBarrier2-dstAccessMask-03913
  If `dstAccessMask` includes VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_EARLY_FRAGMENT_TESTS_BIT, VK_PIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryBarrier2-dstAccessMask-03914
  If `dstAccessMask` includes VK_ACCESS_2_TRANSFER_READ_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_COPY_BIT, VK_PIPELINE_STAGE_2_BLIT_BIT, VK_PIPELINE_STAGE_2_RESOLVE_BIT, VK_PIPELINE_STAGE_2_ALL_TRANSFER_BIT, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR, VK_PIPELINE_STAGE_2_CONVERT_COOPERATIVE_VECTOR_MATRIX_BIT_NV, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryBarrier2-dstAccessMask-03915
  If `dstAccessMask` includes VK_ACCESS_2_TRANSFER_WRITE_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_COPY_BIT, VK_PIPELINE_STAGE_2_BLIT_BIT, VK_PIPELINE_STAGE_2_RESOLVE_BIT, VK_PIPELINE_STAGE_2_CLEAR_BIT, VK_PIPELINE_STAGE_2_ALL_TRANSFER_BIT, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR, VK_PIPELINE_STAGE_2_CONVERT_COOPERATIVE_VECTOR_MATRIX_BIT_NV, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryBarrier2-dstAccessMask-03916
  If `dstAccessMask` includes VK_ACCESS_2_HOST_READ_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_HOST_BIT

- VUID-VkMemoryBarrier2-dstAccessMask-03917
  If `dstAccessMask` includes VK_ACCESS_2_HOST_WRITE_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_HOST_BIT

- VUID-VkMemoryBarrier2-dstAccessMask-03918
  If `dstAccessMask` includes VK_ACCESS_2_CONDITIONAL_RENDERING_READ_BIT_EXT, `dstStageMask` must include VK_PIPELINE_STAGE_2_CONDITIONAL_RENDERING_BIT_EXT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryBarrier2-dstAccessMask-03919
  If `dstAccessMask` includes VK_ACCESS_2_FRAGMENT_DENSITY_MAP_READ_BIT_EXT, `dstStageMask` must include VK_PIPELINE_STAGE_2_FRAGMENT_DENSITY_PROCESS_BIT_EXT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryBarrier2-dstAccessMask-03920
  If `dstAccessMask` includes VK_ACCESS_2_TRANSFORM_FEEDBACK_WRITE_BIT_EXT, `dstStageMask` must include VK_PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryBarrier2-dstAccessMask-04747
  If `dstAccessMask` includes VK_ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT, `dstStageMask` must include VK_PIPELINE_STAGE_2_DRAW_INDIRECT_BIT, VK_PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryBarrier2-dstAccessMask-03922
  If `dstAccessMask` includes VK_ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT, `dstStageMask` must include VK_PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryBarrier2-dstAccessMask-03923
  If `dstAccessMask` includes VK_ACCESS_2_SHADING_RATE_IMAGE_READ_BIT_NV, `dstStageMask` must include VK_PIPELINE_STAGE_2_SHADING_RATE_IMAGE_BIT_NV, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryBarrier2-dstAccessMask-04994
  If `dstAccessMask` includes VK_ACCESS_2_INVOCATION_MASK_READ_BIT_HUAWEI, `dstStageMask` must include VK_PIPELINE_STAGE_2_INVOCATION_MASK_BIT_HUAWEI

- VUID-VkMemoryBarrier2-dstAccessMask-03924
  If `dstAccessMask` includes VK_ACCESS_2_COMMAND_PREPROCESS_READ_BIT_NV, `dstStageMask` must include VK_PIPELINE_STAGE_2_COMMAND_PREPROCESS_BIT_NV or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryBarrier2-dstAccessMask-03925
  If `dstAccessMask` includes VK_ACCESS_2_COMMAND_PREPROCESS_WRITE_BIT_NV, `dstStageMask` must include VK_PIPELINE_STAGE_2_COMMAND_PREPROCESS_BIT_NV or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryBarrier2-dstAccessMask-03926
  If `dstAccessMask` includes VK_ACCESS_2_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT, `dstStageMask` must include VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryBarrier2-dstAccessMask-03927
  If `dstAccessMask` includes VK_ACCESS_2_ACCELERATION_STRUCTURE_READ_BIT_KHR, and the `rayQuery` feature is enabled, `dstStageMask` must include VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR, one of the `VK_PIPELINE_STAGE_*_SHADER_BIT` stages, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryBarrier2-dstAccessMask-03928
  If `dstAccessMask` includes VK_ACCESS_2_ACCELERATION_STRUCTURE_WRITE_BIT_KHR, `dstStageMask` must include VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryBarrier2-dstAccessMask-06256
  If `dstAccessMask` includes VK_ACCESS_2_ACCELERATION_STRUCTURE_READ_BIT_KHR, and the `rayQuery` feature is not enabled, `dstStageMask` must include VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryBarrier2-dstAccessMask-07272
  If `dstAccessMask` includes VK_ACCESS_2_SHADER_BINDING_TABLE_READ_BIT_KHR, `dstStageMask` must include VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT or VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR

- VUID-VkMemoryBarrier2-dstAccessMask-04858
  If `dstAccessMask` includes VK_ACCESS_2_VIDEO_DECODE_READ_BIT_KHR, `dstStageMask` must include VK_PIPELINE_STAGE_2_VIDEO_DECODE_BIT_KHR

- VUID-VkMemoryBarrier2-dstAccessMask-04859
  If `dstAccessMask` includes VK_ACCESS_2_VIDEO_DECODE_WRITE_BIT_KHR, `dstStageMask` must include VK_PIPELINE_STAGE_2_VIDEO_DECODE_BIT_KHR

- VUID-VkMemoryBarrier2-dstAccessMask-04860
  If `dstAccessMask` includes VK_ACCESS_2_VIDEO_ENCODE_READ_BIT_KHR, `dstStageMask` must include VK_PIPELINE_STAGE_2_VIDEO_ENCODE_BIT_KHR

- VUID-VkMemoryBarrier2-dstAccessMask-04861
  If `dstAccessMask` includes VK_ACCESS_2_VIDEO_ENCODE_WRITE_BIT_KHR, `dstStageMask` must include VK_PIPELINE_STAGE_2_VIDEO_ENCODE_BIT_KHR

- VUID-VkMemoryBarrier2-dstAccessMask-07455
  If `dstAccessMask` includes VK_ACCESS_2_OPTICAL_FLOW_READ_BIT_NV, `dstStageMask` must include VK_PIPELINE_STAGE_2_OPTICAL_FLOW_BIT_NV

- VUID-VkMemoryBarrier2-dstAccessMask-07456
  If `dstAccessMask` includes VK_ACCESS_2_OPTICAL_FLOW_WRITE_BIT_NV, `dstStageMask` must include VK_PIPELINE_STAGE_2_OPTICAL_FLOW_BIT_NV

- VUID-VkMemoryBarrier2-dstAccessMask-07457
  If `dstAccessMask` includes VK_ACCESS_2_MICROMAP_WRITE_BIT_EXT, `dstStageMask` must include VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT

- VUID-VkMemoryBarrier2-dstAccessMask-07458
  If `dstAccessMask` includes VK_ACCESS_2_MICROMAP_READ_BIT_EXT, `dstStageMask` must include VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT or VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR

- VUID-VkMemoryBarrier2-dstAccessMask-08118
  If `dstAccessMask` includes VK_ACCESS_2_DESCRIPTOR_BUFFER_READ_BIT_EXT, `dstStageMask` must include VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, or one of `VK_PIPELINE_STAGE_*_SHADER_BIT` stages

- VUID-VkMemoryBarrier2-dstAccessMask-10670
  If `dstAccessMask` includes VK_ACCESS_2_SHADER_TILE_ATTACHMENT_READ_BIT_QCOM, `dstStageMask` must include VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT or VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT

- VUID-VkMemoryBarrier2-dstAccessMask-10671
  If `dstAccessMask` includes VK_ACCESS_2_SHADER_TILE_ATTACHMENT_WRITE_BIT_QCOM, `dstStageMask` must include VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT or VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT

- VUID-VkMemoryBarrier2-dstAccessMask-11771
  If `dstAccessMask` includes VK_ACCESS_2_MEMORY_DECOMPRESSION_READ_BIT_EXT, `dstStageMask` must include VK_PIPELINE_STAGE_2_MEMORY_DECOMPRESSION_BIT_EXT

- VUID-VkMemoryBarrier2-dstAccessMask-11772
  If `dstAccessMask` includes VK_ACCESS_2_MEMORY_DECOMPRESSION_WRITE_BIT_EXT, `dstStageMask` must include VK_PIPELINE_STAGE_2_MEMORY_DECOMPRESSION_BIT_EXT

- VUID-VkMemoryBarrier2-dstAccessMask-11294
  If `dstAccessMask` includes VK_ACCESS_2_SAMPLER_HEAP_READ_BIT_EXT or VK_ACCESS_2_RESOURCE_HEAP_READ_BIT_EXT, `dstStageMask` must include VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, or one of `VK_PIPELINE_STAGE_*_SHADER_BIT` stages

Valid Usage (Implicit)

- VUID-VkMemoryBarrier2-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_MEMORY_BARRIER_2

- VUID-VkMemoryBarrier2-srcStageMask-parameter
  `srcStageMask` must be a valid combination of VkPipelineStageFlagBits2 values

- VUID-VkMemoryBarrier2-srcAccessMask-parameter
  `srcAccessMask` must be a valid combination of VkAccessFlagBits2 values

- VUID-VkMemoryBarrier2-dstStageMask-parameter
  `dstStageMask` must be a valid combination of VkPipelineStageFlagBits2 values

- VUID-VkMemoryBarrier2-dstAccessMask-parameter
  `dstAccessMask` must be a valid combination of VkAccessFlagBits2 values

Structure Chaining

Extends the structure

  - VkSubpassDependency2

The `VkMemoryBarrier` structure is defined as:

Warning | This functionality is superseded by VkMemoryBarrier2. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_0
    typedef struct VkMemoryBarrier {
        VkStructureType    sType;
        const void*        pNext;
        VkAccessFlags      srcAccessMask;
        VkAccessFlags      dstAccessMask;
    } VkMemoryBarrier;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `srcAccessMask` is a bitmask of VkAccessFlagBits specifying a source access mask.

- `dstAccessMask` is a bitmask of VkAccessFlagBits specifying a destination access mask.

The first access scope is limited to access types in the source access mask specified by `srcAccessMask` and, if a VkMemoryBarrierAccessFlags3KHR is passed in `pNext`, `srcAccessMask3`.

The second access scope is limited to access types in the destination access mask specified by `dstAccessMask` and, if a VkMemoryBarrierAccessFlags3KHR is passed in `pNext`, `dstAccessMask3`.

Valid Usage (Implicit)

- VUID-VkMemoryBarrier-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_MEMORY_BARRIER

- VUID-VkMemoryBarrier-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkMemoryBarrier-srcAccessMask-parameter
  `srcAccessMask` must be a valid combination of VkAccessFlagBits values

- VUID-VkMemoryBarrier-dstAccessMask-parameter
  `dstAccessMask` must be a valid combination of VkAccessFlagBits values

#### 7.7.2. Memory Range Barriers

Memory range barriers only apply to memory accesses involving a specific device address range. That is, a memory dependency formed from a memory range barrier is scoped to access via the specified device address range. Memory range barriers can also be used to define a queue family ownership transfer for the specified device address range.

The `VkMemoryRangeBarriersInfoKHR` structure is defined as:

    // Provided by VK_KHR_device_address_commands
    typedef struct VkMemoryRangeBarriersInfoKHR {
        VkStructureType                   sType;
        const void*                       pNext;
        uint32_t                          memoryRangeBarrierCount;
        const VkMemoryRangeBarrierKHR*    pMemoryRangeBarriers;
    } VkMemoryRangeBarriersInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `memoryRangeBarrierCount` is the length of the `pMemoryRangeBarriers` array

- `pMemoryRangeBarriers` is a pointer to an array of VkMemoryRangeBarrierKHR structures defining memory dependencies between accesses to specified memory ranges.

When this structure is included in the `pNext` chain of VkDependencyInfo, it defines a set of memory dependencies, as well as queue family ownership transfer operations, for a specified set of memory ranges.

If this structure is not included in the `pNext` chain of VkDependencyInfo, it is equivalent to specifying it with a `memoryRangeBarrierCount` of 0.

Each member of `pMemoryRangeBarriers` defines a separate memory dependency.

Valid Usage (Implicit)

- VUID-VkMemoryRangeBarriersInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_MEMORY_RANGE_BARRIERS_INFO_KHR

- VUID-VkMemoryRangeBarriersInfoKHR-pMemoryRangeBarriers-parameter
  If `memoryRangeBarrierCount` is not `0`, `pMemoryRangeBarriers` must be a valid pointer to an array of `memoryRangeBarrierCount` valid VkMemoryRangeBarrierKHR structures

Structure Chaining

Extends the structure

  - VkDependencyInfo

The `VkMemoryRangeBarrierKHR` structure is defined as:

    // Provided by VK_KHR_device_address_commands
    typedef struct VkMemoryRangeBarrierKHR {
        VkStructureType             sType;
        const void*                 pNext;
        VkPipelineStageFlags2       srcStageMask;
        VkAccessFlags2              srcAccessMask;
        VkPipelineStageFlags2       dstStageMask;
        VkAccessFlags2              dstAccessMask;
        uint32_t                    srcQueueFamilyIndex;
        uint32_t                    dstQueueFamilyIndex;
        VkDeviceAddressRangeKHR     addressRange;
        VkAddressCommandFlagsKHR    addressFlags;
    } VkMemoryRangeBarrierKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `srcStageMask` is a VkPipelineStageFlags2 mask of pipeline stages to be included in the first synchronization scope.

- `srcAccessMask` is a VkAccessFlags2 mask of access flags to be included in the first access scope.

- `dstStageMask` is a VkPipelineStageFlags2 mask of pipeline stages to be included in the second synchronization scope.

- `dstAccessMask` is a VkAccessFlags2 mask of access flags to be included in the second access scope.

- `srcQueueFamilyIndex` is the source queue family for a queue family ownership transfer.

- `dstQueueFamilyIndex` is the destination queue family for a queue family ownership transfer.

- `addressRange` is a VkDeviceAddressRangeKHR structure specifying the address range affected by the barrier.

- `addressFlags` is a VkAddressCommandFlagsKHR value defining the flags for the address range.

This structure defines a memory dependency limited to an address range, and can define a queue family ownership transfer operation for that range.

The first synchronization scope and access scope described by this structure include only operations and memory accesses specified by `srcStageMask` and `srcAccessMask`.

The second synchronization scope and access scope described by this structure include only operations and memory accesses specified by `dstStageMask` and `dstAccessMask`.

Both access scopes are limited to only memory accesses to memory in `addressRange`.

If the buffer from which `address` was queried was created with a sharing mode of VK_SHARING_MODE_EXCLUSIVE, and `srcQueueFamilyIndex` is not equal to `dstQueueFamilyIndex`, this memory range barrier defines a queue family ownership transfer operation. When executed on a queue in the family identified by `srcQueueFamilyIndex`, this barrier defines a queue family release operation for the specified address range, and the second synchronization scope does not apply to this operation. When executed on a queue in the family identified by `dstQueueFamilyIndex`, this barrier defines a queue family acquire operation for the specified address range, and the first synchronization scope does not apply to this operation.

A queue family ownership transfer operation is also defined if the values are not equal, and either is one of the special queue family values reserved for external memory ownership transfers, as described in Queue Family Ownership Transfer. A queue family release operation is defined when `dstQueueFamilyIndex` is one of those values, and a queue family acquire operation is defined when `srcQueueFamilyIndex` is one of those values.

Valid Usage

- VUID-VkMemoryRangeBarrierKHR-addressRange-13097
  If the range specified by `addressRange` is not bound completely to memory when accessed, `addressFlags` must not include VK_ADDRESS_COMMAND_FULLY_BOUND_BIT_KHR

- VUID-VkMemoryRangeBarrierKHR-addressRange-13098
  If the buffer from which the range specified by `addressRange` was created with VK_BUFFER_CREATE_PROTECTED_BIT, and `protectedNoFault` is not supported, `addressFlags` must include VK_ADDRESS_COMMAND_PROTECTED_BIT_KHR

- VUID-VkMemoryRangeBarrierKHR-addressRange-13099
  If the buffer from which the range specified by `addressRange` was created without VK_BUFFER_CREATE_PROTECTED_BIT, and `protectedNoFault` is not supported, `addressFlags` must not include VK_ADDRESS_COMMAND_PROTECTED_BIT_KHR

- VUID-VkMemoryRangeBarrierKHR-addressFlags-13100
  `addressFlags` must not include both VK_ADDRESS_COMMAND_STORAGE_BUFFER_USAGE_BIT_KHR and VK_ADDRESS_COMMAND_UNKNOWN_STORAGE_BUFFER_USAGE_BIT_KHR

- VUID-VkMemoryRangeBarrierKHR-addressRange-13122
  If any buffer, which is bound to a range of VkDeviceMemory that overlaps the range backing `addressRange`, was created with VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, `addressFlags` must include VK_ADDRESS_COMMAND_STORAGE_BUFFER_USAGE_BIT_KHR or VK_ADDRESS_COMMAND_UNKNOWN_STORAGE_BUFFER_USAGE_BIT_KHR

- VUID-VkMemoryRangeBarrierKHR-addressRange-13123
  If any buffer, which is bound to a range of VkDeviceMemory that overlaps the range backing `addressRange`, was created without VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, `addressFlags` must not include VK_ADDRESS_COMMAND_STORAGE_BUFFER_USAGE_BIT_KHR

- VUID-VkMemoryRangeBarrierKHR-addressFlags-13101
  `addressFlags` must not include both VK_ADDRESS_COMMAND_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR and VK_ADDRESS_COMMAND_UNKNOWN_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR

- VUID-VkMemoryRangeBarrierKHR-addressRange-13124
  If any buffer, which is bound to a range of VkDeviceMemory that overlaps the range backing `addressRange`, was created with VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT, `addressFlags` must include VK_ADDRESS_COMMAND_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR or VK_ADDRESS_COMMAND_UNKNOWN_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR

- VUID-VkMemoryRangeBarrierKHR-addressRange-13125
  If any buffer, which is bound to a range of VkDeviceMemory that overlaps the range backing `addressRange`, was created without VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT, `addressFlags` must not include VK_ADDRESS_COMMAND_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR

- VUID-VkMemoryRangeBarrierKHR-srcStageMask-03929
  If the `geometryShader` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_2_GEOMETRY_SHADER_BIT

- VUID-VkMemoryRangeBarrierKHR-srcStageMask-03930
  If the `tessellationShader` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT or VK_PIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT

- VUID-VkMemoryRangeBarrierKHR-srcStageMask-03931
  If the `conditionalRendering` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_2_CONDITIONAL_RENDERING_BIT_EXT

- VUID-VkMemoryRangeBarrierKHR-srcStageMask-03932
  If the `fragmentDensityMap` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_2_FRAGMENT_DENSITY_PROCESS_BIT_EXT

- VUID-VkMemoryRangeBarrierKHR-srcStageMask-03933
  If the `transformFeedback` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT

- VUID-VkMemoryRangeBarrierKHR-srcStageMask-03934
  If the `meshShader` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_2_MESH_SHADER_BIT_EXT

- VUID-VkMemoryRangeBarrierKHR-srcStageMask-03935
  If the `taskShader` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_2_TASK_SHADER_BIT_EXT

- VUID-VkMemoryRangeBarrierKHR-srcStageMask-07316
  If neither of the `shadingRateImage` or the `attachmentFragmentShadingRate` features are enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

- VUID-VkMemoryRangeBarrierKHR-srcStageMask-04957
  If the `subpassShading` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_2_SUBPASS_SHADER_BIT_HUAWEI

- VUID-VkMemoryRangeBarrierKHR-srcStageMask-04995
  If the `invocationMask` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_2_INVOCATION_MASK_BIT_HUAWEI

- VUID-VkMemoryRangeBarrierKHR-srcStageMask-07946
  If neither the VK_NV_ray_tracing extension or the `rayTracingPipeline` feature are enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR

- VUID-VkMemoryRangeBarrierKHR-srcStageMask-10751
  If the `accelerationStructure` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR

- VUID-VkMemoryRangeBarrierKHR-srcStageMask-10752
  If the `rayTracingMaintenance1` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR

- VUID-VkMemoryRangeBarrierKHR-srcStageMask-11541
  If the `VkPhysicalDeviceOpacityMicromapFeaturesEXT`::`micromap` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT

- VUID-VkMemoryRangeBarrierKHR-srcAccessMask-03900
  If `srcAccessMask` includes VK_ACCESS_2_INDIRECT_COMMAND_READ_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_DRAW_INDIRECT_BIT, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, VK_PIPELINE_STAGE_2_COPY_INDIRECT_BIT_KHR, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryRangeBarrierKHR-srcAccessMask-03901
  If `srcAccessMask` includes VK_ACCESS_2_INDEX_READ_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_INDEX_INPUT_BIT, VK_PIPELINE_STAGE_2_VERTEX_INPUT_BIT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryRangeBarrierKHR-srcAccessMask-03902
  If `srcAccessMask` includes VK_ACCESS_2_VERTEX_ATTRIBUTE_READ_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_VERTEX_ATTRIBUTE_INPUT_BIT, VK_PIPELINE_STAGE_2_VERTEX_INPUT_BIT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryRangeBarrierKHR-srcAccessMask-03903
  If `srcAccessMask` includes VK_ACCESS_2_INPUT_ATTACHMENT_READ_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT, VK_PIPELINE_STAGE_2_SUBPASS_SHADER_BIT_HUAWEI, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryRangeBarrierKHR-srcAccessMask-03904
  If `srcAccessMask` includes VK_ACCESS_2_UNIFORM_READ_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, or one of the `VK_PIPELINE_STAGE_*_SHADER_BIT` stages

- VUID-VkMemoryRangeBarrierKHR-srcAccessMask-03905
  If `srcAccessMask` includes VK_ACCESS_2_SHADER_SAMPLED_READ_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, or one of the `VK_PIPELINE_STAGE_*_SHADER_BIT` stages

- VUID-VkMemoryRangeBarrierKHR-srcAccessMask-03906
  If `srcAccessMask` includes VK_ACCESS_2_SHADER_STORAGE_READ_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, or one of the `VK_PIPELINE_STAGE_*_SHADER_BIT` stages

- VUID-VkMemoryRangeBarrierKHR-srcAccessMask-03907
  If `srcAccessMask` includes VK_ACCESS_2_SHADER_STORAGE_WRITE_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, or one of the `VK_PIPELINE_STAGE_*_SHADER_BIT` stages

- VUID-VkMemoryRangeBarrierKHR-srcAccessMask-07454
  If `srcAccessMask` includes VK_ACCESS_2_SHADER_READ_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT, or one of the `VK_PIPELINE_STAGE_*_SHADER_BIT` stages

- VUID-VkMemoryRangeBarrierKHR-srcAccessMask-03909
  If `srcAccessMask` includes VK_ACCESS_2_SHADER_WRITE_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, or one of the `VK_PIPELINE_STAGE_*_SHADER_BIT` stages

- VUID-VkMemoryRangeBarrierKHR-srcAccessMask-03910
  If `srcAccessMask` includes VK_ACCESS_2_COLOR_ATTACHMENT_READ_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryRangeBarrierKHR-srcAccessMask-03911
  If `srcAccessMask` includes VK_ACCESS_2_COLOR_ATTACHMENT_WRITE_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryRangeBarrierKHR-srcAccessMask-03912
  If `srcAccessMask` includes VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_READ_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_EARLY_FRAGMENT_TESTS_BIT, VK_PIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryRangeBarrierKHR-srcAccessMask-03913
  If `srcAccessMask` includes VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_EARLY_FRAGMENT_TESTS_BIT, VK_PIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryRangeBarrierKHR-srcAccessMask-03914
  If `srcAccessMask` includes VK_ACCESS_2_TRANSFER_READ_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_COPY_BIT, VK_PIPELINE_STAGE_2_BLIT_BIT, VK_PIPELINE_STAGE_2_RESOLVE_BIT, VK_PIPELINE_STAGE_2_ALL_TRANSFER_BIT, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR, VK_PIPELINE_STAGE_2_CONVERT_COOPERATIVE_VECTOR_MATRIX_BIT_NV, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryRangeBarrierKHR-srcAccessMask-03915
  If `srcAccessMask` includes VK_ACCESS_2_TRANSFER_WRITE_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_COPY_BIT, VK_PIPELINE_STAGE_2_BLIT_BIT, VK_PIPELINE_STAGE_2_RESOLVE_BIT, VK_PIPELINE_STAGE_2_CLEAR_BIT, VK_PIPELINE_STAGE_2_ALL_TRANSFER_BIT, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR, VK_PIPELINE_STAGE_2_CONVERT_COOPERATIVE_VECTOR_MATRIX_BIT_NV, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryRangeBarrierKHR-srcAccessMask-03916
  If `srcAccessMask` includes VK_ACCESS_2_HOST_READ_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_HOST_BIT

- VUID-VkMemoryRangeBarrierKHR-srcAccessMask-03917
  If `srcAccessMask` includes VK_ACCESS_2_HOST_WRITE_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_HOST_BIT

- VUID-VkMemoryRangeBarrierKHR-srcAccessMask-03918
  If `srcAccessMask` includes VK_ACCESS_2_CONDITIONAL_RENDERING_READ_BIT_EXT, `srcStageMask` must include VK_PIPELINE_STAGE_2_CONDITIONAL_RENDERING_BIT_EXT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryRangeBarrierKHR-srcAccessMask-03919
  If `srcAccessMask` includes VK_ACCESS_2_FRAGMENT_DENSITY_MAP_READ_BIT_EXT, `srcStageMask` must include VK_PIPELINE_STAGE_2_FRAGMENT_DENSITY_PROCESS_BIT_EXT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryRangeBarrierKHR-srcAccessMask-03920
  If `srcAccessMask` includes VK_ACCESS_2_TRANSFORM_FEEDBACK_WRITE_BIT_EXT, `srcStageMask` must include VK_PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryRangeBarrierKHR-srcAccessMask-04747
  If `srcAccessMask` includes VK_ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT, `srcStageMask` must include VK_PIPELINE_STAGE_2_DRAW_INDIRECT_BIT, VK_PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryRangeBarrierKHR-srcAccessMask-03922
  If `srcAccessMask` includes VK_ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT, `srcStageMask` must include VK_PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryRangeBarrierKHR-srcAccessMask-03923
  If `srcAccessMask` includes VK_ACCESS_2_SHADING_RATE_IMAGE_READ_BIT_NV, `srcStageMask` must include VK_PIPELINE_STAGE_2_SHADING_RATE_IMAGE_BIT_NV, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryRangeBarrierKHR-srcAccessMask-04994
  If `srcAccessMask` includes VK_ACCESS_2_INVOCATION_MASK_READ_BIT_HUAWEI, `srcStageMask` must include VK_PIPELINE_STAGE_2_INVOCATION_MASK_BIT_HUAWEI

- VUID-VkMemoryRangeBarrierKHR-srcAccessMask-03924
  If `srcAccessMask` includes VK_ACCESS_2_COMMAND_PREPROCESS_READ_BIT_NV, `srcStageMask` must include VK_PIPELINE_STAGE_2_COMMAND_PREPROCESS_BIT_NV or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryRangeBarrierKHR-srcAccessMask-03925
  If `srcAccessMask` includes VK_ACCESS_2_COMMAND_PREPROCESS_WRITE_BIT_NV, `srcStageMask` must include VK_PIPELINE_STAGE_2_COMMAND_PREPROCESS_BIT_NV or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryRangeBarrierKHR-srcAccessMask-03926
  If `srcAccessMask` includes VK_ACCESS_2_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT, `srcStageMask` must include VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryRangeBarrierKHR-srcAccessMask-03927
  If `srcAccessMask` includes VK_ACCESS_2_ACCELERATION_STRUCTURE_READ_BIT_KHR, and the `rayQuery` feature is enabled, `srcStageMask` must include VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR, one of the `VK_PIPELINE_STAGE_*_SHADER_BIT` stages, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryRangeBarrierKHR-srcAccessMask-03928
  If `srcAccessMask` includes VK_ACCESS_2_ACCELERATION_STRUCTURE_WRITE_BIT_KHR, `srcStageMask` must include VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryRangeBarrierKHR-srcAccessMask-06256
  If `srcAccessMask` includes VK_ACCESS_2_ACCELERATION_STRUCTURE_READ_BIT_KHR, and the `rayQuery` feature is not enabled, `srcStageMask` must include VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryRangeBarrierKHR-srcAccessMask-07272
  If `srcAccessMask` includes VK_ACCESS_2_SHADER_BINDING_TABLE_READ_BIT_KHR, `srcStageMask` must include VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT or VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR

- VUID-VkMemoryRangeBarrierKHR-srcAccessMask-04858
  If `srcAccessMask` includes VK_ACCESS_2_VIDEO_DECODE_READ_BIT_KHR, `srcStageMask` must include VK_PIPELINE_STAGE_2_VIDEO_DECODE_BIT_KHR

- VUID-VkMemoryRangeBarrierKHR-srcAccessMask-04859
  If `srcAccessMask` includes VK_ACCESS_2_VIDEO_DECODE_WRITE_BIT_KHR, `srcStageMask` must include VK_PIPELINE_STAGE_2_VIDEO_DECODE_BIT_KHR

- VUID-VkMemoryRangeBarrierKHR-srcAccessMask-04860
  If `srcAccessMask` includes VK_ACCESS_2_VIDEO_ENCODE_READ_BIT_KHR, `srcStageMask` must include VK_PIPELINE_STAGE_2_VIDEO_ENCODE_BIT_KHR

- VUID-VkMemoryRangeBarrierKHR-srcAccessMask-04861
  If `srcAccessMask` includes VK_ACCESS_2_VIDEO_ENCODE_WRITE_BIT_KHR, `srcStageMask` must include VK_PIPELINE_STAGE_2_VIDEO_ENCODE_BIT_KHR

- VUID-VkMemoryRangeBarrierKHR-srcAccessMask-07455
  If `srcAccessMask` includes VK_ACCESS_2_OPTICAL_FLOW_READ_BIT_NV, `srcStageMask` must include VK_PIPELINE_STAGE_2_OPTICAL_FLOW_BIT_NV

- VUID-VkMemoryRangeBarrierKHR-srcAccessMask-07456
  If `srcAccessMask` includes VK_ACCESS_2_OPTICAL_FLOW_WRITE_BIT_NV, `srcStageMask` must include VK_PIPELINE_STAGE_2_OPTICAL_FLOW_BIT_NV

- VUID-VkMemoryRangeBarrierKHR-srcAccessMask-07457
  If `srcAccessMask` includes VK_ACCESS_2_MICROMAP_WRITE_BIT_EXT, `srcStageMask` must include VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT

- VUID-VkMemoryRangeBarrierKHR-srcAccessMask-07458
  If `srcAccessMask` includes VK_ACCESS_2_MICROMAP_READ_BIT_EXT, `srcStageMask` must include VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT or VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR

- VUID-VkMemoryRangeBarrierKHR-srcAccessMask-08118
  If `srcAccessMask` includes VK_ACCESS_2_DESCRIPTOR_BUFFER_READ_BIT_EXT, `srcStageMask` must include VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, or one of `VK_PIPELINE_STAGE_*_SHADER_BIT` stages

- VUID-VkMemoryRangeBarrierKHR-srcAccessMask-10670
  If `srcAccessMask` includes VK_ACCESS_2_SHADER_TILE_ATTACHMENT_READ_BIT_QCOM, `srcStageMask` must include VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT or VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT

- VUID-VkMemoryRangeBarrierKHR-srcAccessMask-10671
  If `srcAccessMask` includes VK_ACCESS_2_SHADER_TILE_ATTACHMENT_WRITE_BIT_QCOM, `srcStageMask` must include VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT or VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT

- VUID-VkMemoryRangeBarrierKHR-srcAccessMask-11771
  If `srcAccessMask` includes VK_ACCESS_2_MEMORY_DECOMPRESSION_READ_BIT_EXT, `srcStageMask` must include VK_PIPELINE_STAGE_2_MEMORY_DECOMPRESSION_BIT_EXT

- VUID-VkMemoryRangeBarrierKHR-srcAccessMask-11772
  If `srcAccessMask` includes VK_ACCESS_2_MEMORY_DECOMPRESSION_WRITE_BIT_EXT, `srcStageMask` must include VK_PIPELINE_STAGE_2_MEMORY_DECOMPRESSION_BIT_EXT

- VUID-VkMemoryRangeBarrierKHR-srcAccessMask-11294
  If `srcAccessMask` includes VK_ACCESS_2_SAMPLER_HEAP_READ_BIT_EXT or VK_ACCESS_2_RESOURCE_HEAP_READ_BIT_EXT, `srcStageMask` must include VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, or one of `VK_PIPELINE_STAGE_*_SHADER_BIT` stages

- VUID-VkMemoryRangeBarrierKHR-dstStageMask-03929
  If the `geometryShader` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_2_GEOMETRY_SHADER_BIT

- VUID-VkMemoryRangeBarrierKHR-dstStageMask-03930
  If the `tessellationShader` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT or VK_PIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT

- VUID-VkMemoryRangeBarrierKHR-dstStageMask-03931
  If the `conditionalRendering` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_2_CONDITIONAL_RENDERING_BIT_EXT

- VUID-VkMemoryRangeBarrierKHR-dstStageMask-03932
  If the `fragmentDensityMap` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_2_FRAGMENT_DENSITY_PROCESS_BIT_EXT

- VUID-VkMemoryRangeBarrierKHR-dstStageMask-03933
  If the `transformFeedback` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT

- VUID-VkMemoryRangeBarrierKHR-dstStageMask-03934
  If the `meshShader` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_2_MESH_SHADER_BIT_EXT

- VUID-VkMemoryRangeBarrierKHR-dstStageMask-03935
  If the `taskShader` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_2_TASK_SHADER_BIT_EXT

- VUID-VkMemoryRangeBarrierKHR-dstStageMask-07316
  If neither of the `shadingRateImage` or the `attachmentFragmentShadingRate` features are enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

- VUID-VkMemoryRangeBarrierKHR-dstStageMask-04957
  If the `subpassShading` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_2_SUBPASS_SHADER_BIT_HUAWEI

- VUID-VkMemoryRangeBarrierKHR-dstStageMask-04995
  If the `invocationMask` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_2_INVOCATION_MASK_BIT_HUAWEI

- VUID-VkMemoryRangeBarrierKHR-dstStageMask-07946
  If neither the VK_NV_ray_tracing extension or the `rayTracingPipeline` feature are enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR

- VUID-VkMemoryRangeBarrierKHR-dstStageMask-10751
  If the `accelerationStructure` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR

- VUID-VkMemoryRangeBarrierKHR-dstStageMask-10752
  If the `rayTracingMaintenance1` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR

- VUID-VkMemoryRangeBarrierKHR-dstStageMask-11541
  If the `VkPhysicalDeviceOpacityMicromapFeaturesEXT`::`micromap` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT

- VUID-VkMemoryRangeBarrierKHR-dstAccessMask-03900
  If `dstAccessMask` includes VK_ACCESS_2_INDIRECT_COMMAND_READ_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_DRAW_INDIRECT_BIT, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, VK_PIPELINE_STAGE_2_COPY_INDIRECT_BIT_KHR, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryRangeBarrierKHR-dstAccessMask-03901
  If `dstAccessMask` includes VK_ACCESS_2_INDEX_READ_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_INDEX_INPUT_BIT, VK_PIPELINE_STAGE_2_VERTEX_INPUT_BIT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryRangeBarrierKHR-dstAccessMask-03902
  If `dstAccessMask` includes VK_ACCESS_2_VERTEX_ATTRIBUTE_READ_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_VERTEX_ATTRIBUTE_INPUT_BIT, VK_PIPELINE_STAGE_2_VERTEX_INPUT_BIT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryRangeBarrierKHR-dstAccessMask-03903
  If `dstAccessMask` includes VK_ACCESS_2_INPUT_ATTACHMENT_READ_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT, VK_PIPELINE_STAGE_2_SUBPASS_SHADER_BIT_HUAWEI, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryRangeBarrierKHR-dstAccessMask-03904
  If `dstAccessMask` includes VK_ACCESS_2_UNIFORM_READ_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, or one of the `VK_PIPELINE_STAGE_*_SHADER_BIT` stages

- VUID-VkMemoryRangeBarrierKHR-dstAccessMask-03905
  If `dstAccessMask` includes VK_ACCESS_2_SHADER_SAMPLED_READ_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, or one of the `VK_PIPELINE_STAGE_*_SHADER_BIT` stages

- VUID-VkMemoryRangeBarrierKHR-dstAccessMask-03906
  If `dstAccessMask` includes VK_ACCESS_2_SHADER_STORAGE_READ_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, or one of the `VK_PIPELINE_STAGE_*_SHADER_BIT` stages

- VUID-VkMemoryRangeBarrierKHR-dstAccessMask-03907
  If `dstAccessMask` includes VK_ACCESS_2_SHADER_STORAGE_WRITE_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, or one of the `VK_PIPELINE_STAGE_*_SHADER_BIT` stages

- VUID-VkMemoryRangeBarrierKHR-dstAccessMask-07454
  If `dstAccessMask` includes VK_ACCESS_2_SHADER_READ_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT, or one of the `VK_PIPELINE_STAGE_*_SHADER_BIT` stages

- VUID-VkMemoryRangeBarrierKHR-dstAccessMask-03909
  If `dstAccessMask` includes VK_ACCESS_2_SHADER_WRITE_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, or one of the `VK_PIPELINE_STAGE_*_SHADER_BIT` stages

- VUID-VkMemoryRangeBarrierKHR-dstAccessMask-03910
  If `dstAccessMask` includes VK_ACCESS_2_COLOR_ATTACHMENT_READ_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryRangeBarrierKHR-dstAccessMask-03911
  If `dstAccessMask` includes VK_ACCESS_2_COLOR_ATTACHMENT_WRITE_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryRangeBarrierKHR-dstAccessMask-03912
  If `dstAccessMask` includes VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_READ_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_EARLY_FRAGMENT_TESTS_BIT, VK_PIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryRangeBarrierKHR-dstAccessMask-03913
  If `dstAccessMask` includes VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_EARLY_FRAGMENT_TESTS_BIT, VK_PIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryRangeBarrierKHR-dstAccessMask-03914
  If `dstAccessMask` includes VK_ACCESS_2_TRANSFER_READ_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_COPY_BIT, VK_PIPELINE_STAGE_2_BLIT_BIT, VK_PIPELINE_STAGE_2_RESOLVE_BIT, VK_PIPELINE_STAGE_2_ALL_TRANSFER_BIT, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR, VK_PIPELINE_STAGE_2_CONVERT_COOPERATIVE_VECTOR_MATRIX_BIT_NV, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryRangeBarrierKHR-dstAccessMask-03915
  If `dstAccessMask` includes VK_ACCESS_2_TRANSFER_WRITE_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_COPY_BIT, VK_PIPELINE_STAGE_2_BLIT_BIT, VK_PIPELINE_STAGE_2_RESOLVE_BIT, VK_PIPELINE_STAGE_2_CLEAR_BIT, VK_PIPELINE_STAGE_2_ALL_TRANSFER_BIT, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR, VK_PIPELINE_STAGE_2_CONVERT_COOPERATIVE_VECTOR_MATRIX_BIT_NV, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryRangeBarrierKHR-dstAccessMask-03916
  If `dstAccessMask` includes VK_ACCESS_2_HOST_READ_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_HOST_BIT

- VUID-VkMemoryRangeBarrierKHR-dstAccessMask-03917
  If `dstAccessMask` includes VK_ACCESS_2_HOST_WRITE_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_HOST_BIT

- VUID-VkMemoryRangeBarrierKHR-dstAccessMask-03918
  If `dstAccessMask` includes VK_ACCESS_2_CONDITIONAL_RENDERING_READ_BIT_EXT, `dstStageMask` must include VK_PIPELINE_STAGE_2_CONDITIONAL_RENDERING_BIT_EXT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryRangeBarrierKHR-dstAccessMask-03919
  If `dstAccessMask` includes VK_ACCESS_2_FRAGMENT_DENSITY_MAP_READ_BIT_EXT, `dstStageMask` must include VK_PIPELINE_STAGE_2_FRAGMENT_DENSITY_PROCESS_BIT_EXT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryRangeBarrierKHR-dstAccessMask-03920
  If `dstAccessMask` includes VK_ACCESS_2_TRANSFORM_FEEDBACK_WRITE_BIT_EXT, `dstStageMask` must include VK_PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryRangeBarrierKHR-dstAccessMask-04747
  If `dstAccessMask` includes VK_ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT, `dstStageMask` must include VK_PIPELINE_STAGE_2_DRAW_INDIRECT_BIT, VK_PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryRangeBarrierKHR-dstAccessMask-03922
  If `dstAccessMask` includes VK_ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT, `dstStageMask` must include VK_PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryRangeBarrierKHR-dstAccessMask-03923
  If `dstAccessMask` includes VK_ACCESS_2_SHADING_RATE_IMAGE_READ_BIT_NV, `dstStageMask` must include VK_PIPELINE_STAGE_2_SHADING_RATE_IMAGE_BIT_NV, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryRangeBarrierKHR-dstAccessMask-04994
  If `dstAccessMask` includes VK_ACCESS_2_INVOCATION_MASK_READ_BIT_HUAWEI, `dstStageMask` must include VK_PIPELINE_STAGE_2_INVOCATION_MASK_BIT_HUAWEI

- VUID-VkMemoryRangeBarrierKHR-dstAccessMask-03924
  If `dstAccessMask` includes VK_ACCESS_2_COMMAND_PREPROCESS_READ_BIT_NV, `dstStageMask` must include VK_PIPELINE_STAGE_2_COMMAND_PREPROCESS_BIT_NV or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryRangeBarrierKHR-dstAccessMask-03925
  If `dstAccessMask` includes VK_ACCESS_2_COMMAND_PREPROCESS_WRITE_BIT_NV, `dstStageMask` must include VK_PIPELINE_STAGE_2_COMMAND_PREPROCESS_BIT_NV or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryRangeBarrierKHR-dstAccessMask-03926
  If `dstAccessMask` includes VK_ACCESS_2_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT, `dstStageMask` must include VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryRangeBarrierKHR-dstAccessMask-03927
  If `dstAccessMask` includes VK_ACCESS_2_ACCELERATION_STRUCTURE_READ_BIT_KHR, and the `rayQuery` feature is enabled, `dstStageMask` must include VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR, one of the `VK_PIPELINE_STAGE_*_SHADER_BIT` stages, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryRangeBarrierKHR-dstAccessMask-03928
  If `dstAccessMask` includes VK_ACCESS_2_ACCELERATION_STRUCTURE_WRITE_BIT_KHR, `dstStageMask` must include VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryRangeBarrierKHR-dstAccessMask-06256
  If `dstAccessMask` includes VK_ACCESS_2_ACCELERATION_STRUCTURE_READ_BIT_KHR, and the `rayQuery` feature is not enabled, `dstStageMask` must include VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkMemoryRangeBarrierKHR-dstAccessMask-07272
  If `dstAccessMask` includes VK_ACCESS_2_SHADER_BINDING_TABLE_READ_BIT_KHR, `dstStageMask` must include VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT or VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR

- VUID-VkMemoryRangeBarrierKHR-dstAccessMask-04858
  If `dstAccessMask` includes VK_ACCESS_2_VIDEO_DECODE_READ_BIT_KHR, `dstStageMask` must include VK_PIPELINE_STAGE_2_VIDEO_DECODE_BIT_KHR

- VUID-VkMemoryRangeBarrierKHR-dstAccessMask-04859
  If `dstAccessMask` includes VK_ACCESS_2_VIDEO_DECODE_WRITE_BIT_KHR, `dstStageMask` must include VK_PIPELINE_STAGE_2_VIDEO_DECODE_BIT_KHR

- VUID-VkMemoryRangeBarrierKHR-dstAccessMask-04860
  If `dstAccessMask` includes VK_ACCESS_2_VIDEO_ENCODE_READ_BIT_KHR, `dstStageMask` must include VK_PIPELINE_STAGE_2_VIDEO_ENCODE_BIT_KHR

- VUID-VkMemoryRangeBarrierKHR-dstAccessMask-04861
  If `dstAccessMask` includes VK_ACCESS_2_VIDEO_ENCODE_WRITE_BIT_KHR, `dstStageMask` must include VK_PIPELINE_STAGE_2_VIDEO_ENCODE_BIT_KHR

- VUID-VkMemoryRangeBarrierKHR-dstAccessMask-07455
  If `dstAccessMask` includes VK_ACCESS_2_OPTICAL_FLOW_READ_BIT_NV, `dstStageMask` must include VK_PIPELINE_STAGE_2_OPTICAL_FLOW_BIT_NV

- VUID-VkMemoryRangeBarrierKHR-dstAccessMask-07456
  If `dstAccessMask` includes VK_ACCESS_2_OPTICAL_FLOW_WRITE_BIT_NV, `dstStageMask` must include VK_PIPELINE_STAGE_2_OPTICAL_FLOW_BIT_NV

- VUID-VkMemoryRangeBarrierKHR-dstAccessMask-07457
  If `dstAccessMask` includes VK_ACCESS_2_MICROMAP_WRITE_BIT_EXT, `dstStageMask` must include VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT

- VUID-VkMemoryRangeBarrierKHR-dstAccessMask-07458
  If `dstAccessMask` includes VK_ACCESS_2_MICROMAP_READ_BIT_EXT, `dstStageMask` must include VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT or VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR

- VUID-VkMemoryRangeBarrierKHR-dstAccessMask-08118
  If `dstAccessMask` includes VK_ACCESS_2_DESCRIPTOR_BUFFER_READ_BIT_EXT, `dstStageMask` must include VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, or one of `VK_PIPELINE_STAGE_*_SHADER_BIT` stages

- VUID-VkMemoryRangeBarrierKHR-dstAccessMask-10670
  If `dstAccessMask` includes VK_ACCESS_2_SHADER_TILE_ATTACHMENT_READ_BIT_QCOM, `dstStageMask` must include VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT or VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT

- VUID-VkMemoryRangeBarrierKHR-dstAccessMask-10671
  If `dstAccessMask` includes VK_ACCESS_2_SHADER_TILE_ATTACHMENT_WRITE_BIT_QCOM, `dstStageMask` must include VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT or VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT

- VUID-VkMemoryRangeBarrierKHR-dstAccessMask-11771
  If `dstAccessMask` includes VK_ACCESS_2_MEMORY_DECOMPRESSION_READ_BIT_EXT, `dstStageMask` must include VK_PIPELINE_STAGE_2_MEMORY_DECOMPRESSION_BIT_EXT

- VUID-VkMemoryRangeBarrierKHR-dstAccessMask-11772
  If `dstAccessMask` includes VK_ACCESS_2_MEMORY_DECOMPRESSION_WRITE_BIT_EXT, `dstStageMask` must include VK_PIPELINE_STAGE_2_MEMORY_DECOMPRESSION_BIT_EXT

- VUID-VkMemoryRangeBarrierKHR-dstAccessMask-11294
  If `dstAccessMask` includes VK_ACCESS_2_SAMPLER_HEAP_READ_BIT_EXT or VK_ACCESS_2_RESOURCE_HEAP_READ_BIT_EXT, `dstStageMask` must include VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, or one of `VK_PIPELINE_STAGE_*_SHADER_BIT` stages

- VUID-VkMemoryRangeBarrierKHR-None-09097
  If the VK_KHR_external_memory extension is not enabled, and the value of VkApplicationInfo::`apiVersion` used to create the VkInstance is not greater than or equal to Version 1.1, `srcQueueFamilyIndex` must not be VK_QUEUE_FAMILY_EXTERNAL

- VUID-VkMemoryRangeBarrierKHR-None-09098
  If the VK_KHR_external_memory extension is not enabled, and the value of VkApplicationInfo::`apiVersion` used to create the VkInstance is not greater than or equal to Version 1.1, `dstQueueFamilyIndex` must not be VK_QUEUE_FAMILY_EXTERNAL

- VUID-VkMemoryRangeBarrierKHR-srcQueueFamilyIndex-09099
  If the VK_EXT_queue_family_foreign extension is not enabled `srcQueueFamilyIndex` must not be VK_QUEUE_FAMILY_FOREIGN_EXT

- VUID-VkMemoryRangeBarrierKHR-dstQueueFamilyIndex-09100
  If the VK_EXT_queue_family_foreign extension is not enabled `dstQueueFamilyIndex` must not be VK_QUEUE_FAMILY_FOREIGN_EXT

- VUID-VkMemoryRangeBarrierKHR-address-13087
  If the buffer from which `address` was queried was created with a sharing mode of VK_SHARING_MODE_EXCLUSIVE, and `srcQueueFamilyIndex` and `dstQueueFamilyIndex` are not equal, `srcQueueFamilyIndex` must be VK_QUEUE_FAMILY_EXTERNAL, VK_QUEUE_FAMILY_FOREIGN_EXT, or a valid queue family

- VUID-VkMemoryRangeBarrierKHR-address-13088
  If the buffer from which `address` was queried was created with a sharing mode of VK_SHARING_MODE_EXCLUSIVE, and `srcQueueFamilyIndex` and `dstQueueFamilyIndex` are not equal, `dstQueueFamilyIndex` must be VK_QUEUE_FAMILY_EXTERNAL, VK_QUEUE_FAMILY_FOREIGN_EXT, or a valid queue family

- VUID-VkMemoryRangeBarrierKHR-srcStageMask-13089
  If either `srcStageMask` or `dstStageMask` includes VK_PIPELINE_STAGE_2_HOST_BIT, `srcQueueFamilyIndex` and `dstQueueFamilyIndex` must be equal

Valid Usage (Implicit)

- VUID-VkMemoryRangeBarrierKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_MEMORY_RANGE_BARRIER_KHR

- VUID-VkMemoryRangeBarrierKHR-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkMemoryRangeBarrierKHR-srcStageMask-parameter
  `srcStageMask` must be a valid combination of VkPipelineStageFlagBits2 values

- VUID-VkMemoryRangeBarrierKHR-srcAccessMask-parameter
  `srcAccessMask` must be a valid combination of VkAccessFlagBits2 values

- VUID-VkMemoryRangeBarrierKHR-dstStageMask-parameter
  `dstStageMask` must be a valid combination of VkPipelineStageFlagBits2 values

- VUID-VkMemoryRangeBarrierKHR-dstAccessMask-parameter
  `dstAccessMask` must be a valid combination of VkAccessFlagBits2 values

- VUID-VkMemoryRangeBarrierKHR-addressFlags-parameter
  `addressFlags` must be a valid combination of VkAddressCommandFlagBitsKHR values

#### 7.7.3. Buffer Memory Barriers

Buffer memory barriers only apply to memory accesses involving a specific buffer range. That is, a memory dependency formed from a buffer memory barrier is scoped to access via the specified buffer range. Buffer memory barriers can also be used to define a queue family ownership transfer for the specified buffer range.

The `VkBufferMemoryBarrier2` structure is defined as:

    // Provided by VK_VERSION_1_3
    typedef struct VkBufferMemoryBarrier2 {
        VkStructureType          sType;
        const void*              pNext;
        VkPipelineStageFlags2    srcStageMask;
        VkAccessFlags2           srcAccessMask;
        VkPipelineStageFlags2    dstStageMask;
        VkAccessFlags2           dstAccessMask;
        uint32_t                 srcQueueFamilyIndex;
        uint32_t                 dstQueueFamilyIndex;
        VkBuffer                 buffer;
        VkDeviceSize             offset;
        VkDeviceSize             size;
    } VkBufferMemoryBarrier2;

    // Provided by VK_KHR_synchronization2
    // Equivalent to VkBufferMemoryBarrier2
    typedef VkBufferMemoryBarrier2 VkBufferMemoryBarrier2KHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `srcStageMask` is a VkPipelineStageFlags2 mask of pipeline stages to be included in the first synchronization scope.

- `srcAccessMask` is a VkAccessFlags2 mask of access flags to be included in the first access scope.

- `dstStageMask` is a VkPipelineStageFlags2 mask of pipeline stages to be included in the second synchronization scope.

- `dstAccessMask` is a VkAccessFlags2 mask of access flags to be included in the second access scope.

- `srcQueueFamilyIndex` is the source queue family for a queue family ownership transfer.

- `dstQueueFamilyIndex` is the destination queue family for a queue family ownership transfer.

- `buffer` is a handle to the buffer whose backing memory is affected by the barrier.

- `offset` is an offset in bytes into the backing memory for `buffer`; this is relative to the base offset as bound to the buffer (see vkBindBufferMemory).

- `size` is a size in bytes of the affected area of backing memory for `buffer`, or VK_WHOLE_SIZE to use the range from `offset` to the end of the buffer.

This structure defines a memory dependency limited to a range of a buffer, and can define a queue family ownership transfer operation for that range.

The first synchronization scope and access scope described by this structure include only operations and memory accesses specified by the source stage mask and the source access mask.

The second synchronization scope and access scope described by this structure include only operations and memory accesses specified by the destination stage mask and the destination access mask.

Both access scopes are limited to only memory accesses to `buffer` in the range defined by `offset` and `size`.

If `buffer` was created with VK_SHARING_MODE_EXCLUSIVE, and `srcQueueFamilyIndex` is not equal to `dstQueueFamilyIndex`, this memory barrier defines a queue family ownership transfer operation. When executed on a queue in the family identified by `srcQueueFamilyIndex`, this barrier defines a queue family release operation for the specified buffer range, and if VkDependencyInfoKHR::`dependencyFlags` did not include VK_DEPENDENCY_QUEUE_FAMILY_OWNERSHIP_TRANSFER_USE_ALL_STAGES_BIT_KHR, the second synchronization scope does not apply to this operation. When executed on a queue in the family identified by `dstQueueFamilyIndex`, this barrier defines a queue family acquire operation for the specified buffer range, and if VkDependencyInfoKHR::`dependencyFlags` did not include VK_DEPENDENCY_QUEUE_FAMILY_OWNERSHIP_TRANSFER_USE_ALL_STAGES_BIT_KHR, the first synchronization scope does not apply to this operation.

A queue family ownership transfer operation is also defined if the values are not equal, and either is one of the special queue family values reserved for external memory ownership transfers, as described in Queue Family Ownership Transfer. A queue family release operation is defined when `dstQueueFamilyIndex` is one of those values, and a queue family acquire operation is defined when `srcQueueFamilyIndex` is one of those values.

Valid Usage

- VUID-VkBufferMemoryBarrier2-srcStageMask-03929
  If the `geometryShader` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_2_GEOMETRY_SHADER_BIT

- VUID-VkBufferMemoryBarrier2-srcStageMask-03930
  If the `tessellationShader` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT or VK_PIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT

- VUID-VkBufferMemoryBarrier2-srcStageMask-03931
  If the `conditionalRendering` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_2_CONDITIONAL_RENDERING_BIT_EXT

- VUID-VkBufferMemoryBarrier2-srcStageMask-03932
  If the `fragmentDensityMap` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_2_FRAGMENT_DENSITY_PROCESS_BIT_EXT

- VUID-VkBufferMemoryBarrier2-srcStageMask-03933
  If the `transformFeedback` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT

- VUID-VkBufferMemoryBarrier2-srcStageMask-03934
  If the `meshShader` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_2_MESH_SHADER_BIT_EXT

- VUID-VkBufferMemoryBarrier2-srcStageMask-03935
  If the `taskShader` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_2_TASK_SHADER_BIT_EXT

- VUID-VkBufferMemoryBarrier2-srcStageMask-07316
  If neither of the `shadingRateImage` or the `attachmentFragmentShadingRate` features are enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

- VUID-VkBufferMemoryBarrier2-srcStageMask-04957
  If the `subpassShading` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_2_SUBPASS_SHADER_BIT_HUAWEI

- VUID-VkBufferMemoryBarrier2-srcStageMask-04995
  If the `invocationMask` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_2_INVOCATION_MASK_BIT_HUAWEI

- VUID-VkBufferMemoryBarrier2-srcStageMask-07946
  If neither the VK_NV_ray_tracing extension or the `rayTracingPipeline` feature are enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR

- VUID-VkBufferMemoryBarrier2-srcStageMask-10751
  If the `accelerationStructure` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR

- VUID-VkBufferMemoryBarrier2-srcStageMask-10752
  If the `rayTracingMaintenance1` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR

- VUID-VkBufferMemoryBarrier2-srcStageMask-11541
  If the `VkPhysicalDeviceOpacityMicromapFeaturesEXT`::`micromap` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT

- VUID-VkBufferMemoryBarrier2-srcAccessMask-03900
  If `srcAccessMask` includes VK_ACCESS_2_INDIRECT_COMMAND_READ_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_DRAW_INDIRECT_BIT, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, VK_PIPELINE_STAGE_2_COPY_INDIRECT_BIT_KHR, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkBufferMemoryBarrier2-srcAccessMask-03901
  If `srcAccessMask` includes VK_ACCESS_2_INDEX_READ_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_INDEX_INPUT_BIT, VK_PIPELINE_STAGE_2_VERTEX_INPUT_BIT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkBufferMemoryBarrier2-srcAccessMask-03902
  If `srcAccessMask` includes VK_ACCESS_2_VERTEX_ATTRIBUTE_READ_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_VERTEX_ATTRIBUTE_INPUT_BIT, VK_PIPELINE_STAGE_2_VERTEX_INPUT_BIT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkBufferMemoryBarrier2-srcAccessMask-03903
  If `srcAccessMask` includes VK_ACCESS_2_INPUT_ATTACHMENT_READ_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT, VK_PIPELINE_STAGE_2_SUBPASS_SHADER_BIT_HUAWEI, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkBufferMemoryBarrier2-srcAccessMask-03904
  If `srcAccessMask` includes VK_ACCESS_2_UNIFORM_READ_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, or one of the `VK_PIPELINE_STAGE_*_SHADER_BIT` stages

- VUID-VkBufferMemoryBarrier2-srcAccessMask-03905
  If `srcAccessMask` includes VK_ACCESS_2_SHADER_SAMPLED_READ_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, or one of the `VK_PIPELINE_STAGE_*_SHADER_BIT` stages

- VUID-VkBufferMemoryBarrier2-srcAccessMask-03906
  If `srcAccessMask` includes VK_ACCESS_2_SHADER_STORAGE_READ_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, or one of the `VK_PIPELINE_STAGE_*_SHADER_BIT` stages

- VUID-VkBufferMemoryBarrier2-srcAccessMask-03907
  If `srcAccessMask` includes VK_ACCESS_2_SHADER_STORAGE_WRITE_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, or one of the `VK_PIPELINE_STAGE_*_SHADER_BIT` stages

- VUID-VkBufferMemoryBarrier2-srcAccessMask-07454
  If `srcAccessMask` includes VK_ACCESS_2_SHADER_READ_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT, or one of the `VK_PIPELINE_STAGE_*_SHADER_BIT` stages

- VUID-VkBufferMemoryBarrier2-srcAccessMask-03909
  If `srcAccessMask` includes VK_ACCESS_2_SHADER_WRITE_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, or one of the `VK_PIPELINE_STAGE_*_SHADER_BIT` stages

- VUID-VkBufferMemoryBarrier2-srcAccessMask-03910
  If `srcAccessMask` includes VK_ACCESS_2_COLOR_ATTACHMENT_READ_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkBufferMemoryBarrier2-srcAccessMask-03911
  If `srcAccessMask` includes VK_ACCESS_2_COLOR_ATTACHMENT_WRITE_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkBufferMemoryBarrier2-srcAccessMask-03912
  If `srcAccessMask` includes VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_READ_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_EARLY_FRAGMENT_TESTS_BIT, VK_PIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkBufferMemoryBarrier2-srcAccessMask-03913
  If `srcAccessMask` includes VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_EARLY_FRAGMENT_TESTS_BIT, VK_PIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkBufferMemoryBarrier2-srcAccessMask-03914
  If `srcAccessMask` includes VK_ACCESS_2_TRANSFER_READ_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_COPY_BIT, VK_PIPELINE_STAGE_2_BLIT_BIT, VK_PIPELINE_STAGE_2_RESOLVE_BIT, VK_PIPELINE_STAGE_2_ALL_TRANSFER_BIT, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR, VK_PIPELINE_STAGE_2_CONVERT_COOPERATIVE_VECTOR_MATRIX_BIT_NV, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkBufferMemoryBarrier2-srcAccessMask-03915
  If `srcAccessMask` includes VK_ACCESS_2_TRANSFER_WRITE_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_COPY_BIT, VK_PIPELINE_STAGE_2_BLIT_BIT, VK_PIPELINE_STAGE_2_RESOLVE_BIT, VK_PIPELINE_STAGE_2_CLEAR_BIT, VK_PIPELINE_STAGE_2_ALL_TRANSFER_BIT, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR, VK_PIPELINE_STAGE_2_CONVERT_COOPERATIVE_VECTOR_MATRIX_BIT_NV, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkBufferMemoryBarrier2-srcAccessMask-03916
  If `srcAccessMask` includes VK_ACCESS_2_HOST_READ_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_HOST_BIT

- VUID-VkBufferMemoryBarrier2-srcAccessMask-03917
  If `srcAccessMask` includes VK_ACCESS_2_HOST_WRITE_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_HOST_BIT

- VUID-VkBufferMemoryBarrier2-srcAccessMask-03918
  If `srcAccessMask` includes VK_ACCESS_2_CONDITIONAL_RENDERING_READ_BIT_EXT, `srcStageMask` must include VK_PIPELINE_STAGE_2_CONDITIONAL_RENDERING_BIT_EXT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkBufferMemoryBarrier2-srcAccessMask-03919
  If `srcAccessMask` includes VK_ACCESS_2_FRAGMENT_DENSITY_MAP_READ_BIT_EXT, `srcStageMask` must include VK_PIPELINE_STAGE_2_FRAGMENT_DENSITY_PROCESS_BIT_EXT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkBufferMemoryBarrier2-srcAccessMask-03920
  If `srcAccessMask` includes VK_ACCESS_2_TRANSFORM_FEEDBACK_WRITE_BIT_EXT, `srcStageMask` must include VK_PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkBufferMemoryBarrier2-srcAccessMask-04747
  If `srcAccessMask` includes VK_ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT, `srcStageMask` must include VK_PIPELINE_STAGE_2_DRAW_INDIRECT_BIT, VK_PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkBufferMemoryBarrier2-srcAccessMask-03922
  If `srcAccessMask` includes VK_ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT, `srcStageMask` must include VK_PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkBufferMemoryBarrier2-srcAccessMask-03923
  If `srcAccessMask` includes VK_ACCESS_2_SHADING_RATE_IMAGE_READ_BIT_NV, `srcStageMask` must include VK_PIPELINE_STAGE_2_SHADING_RATE_IMAGE_BIT_NV, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkBufferMemoryBarrier2-srcAccessMask-04994
  If `srcAccessMask` includes VK_ACCESS_2_INVOCATION_MASK_READ_BIT_HUAWEI, `srcStageMask` must include VK_PIPELINE_STAGE_2_INVOCATION_MASK_BIT_HUAWEI

- VUID-VkBufferMemoryBarrier2-srcAccessMask-03924
  If `srcAccessMask` includes VK_ACCESS_2_COMMAND_PREPROCESS_READ_BIT_NV, `srcStageMask` must include VK_PIPELINE_STAGE_2_COMMAND_PREPROCESS_BIT_NV or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkBufferMemoryBarrier2-srcAccessMask-03925
  If `srcAccessMask` includes VK_ACCESS_2_COMMAND_PREPROCESS_WRITE_BIT_NV, `srcStageMask` must include VK_PIPELINE_STAGE_2_COMMAND_PREPROCESS_BIT_NV or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkBufferMemoryBarrier2-srcAccessMask-03926
  If `srcAccessMask` includes VK_ACCESS_2_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT, `srcStageMask` must include VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkBufferMemoryBarrier2-srcAccessMask-03927
  If `srcAccessMask` includes VK_ACCESS_2_ACCELERATION_STRUCTURE_READ_BIT_KHR, and the `rayQuery` feature is enabled, `srcStageMask` must include VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR, one of the `VK_PIPELINE_STAGE_*_SHADER_BIT` stages, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkBufferMemoryBarrier2-srcAccessMask-03928
  If `srcAccessMask` includes VK_ACCESS_2_ACCELERATION_STRUCTURE_WRITE_BIT_KHR, `srcStageMask` must include VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkBufferMemoryBarrier2-srcAccessMask-06256
  If `srcAccessMask` includes VK_ACCESS_2_ACCELERATION_STRUCTURE_READ_BIT_KHR, and the `rayQuery` feature is not enabled, `srcStageMask` must include VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkBufferMemoryBarrier2-srcAccessMask-07272
  If `srcAccessMask` includes VK_ACCESS_2_SHADER_BINDING_TABLE_READ_BIT_KHR, `srcStageMask` must include VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT or VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR

- VUID-VkBufferMemoryBarrier2-srcAccessMask-04858
  If `srcAccessMask` includes VK_ACCESS_2_VIDEO_DECODE_READ_BIT_KHR, `srcStageMask` must include VK_PIPELINE_STAGE_2_VIDEO_DECODE_BIT_KHR

- VUID-VkBufferMemoryBarrier2-srcAccessMask-04859
  If `srcAccessMask` includes VK_ACCESS_2_VIDEO_DECODE_WRITE_BIT_KHR, `srcStageMask` must include VK_PIPELINE_STAGE_2_VIDEO_DECODE_BIT_KHR

- VUID-VkBufferMemoryBarrier2-srcAccessMask-04860
  If `srcAccessMask` includes VK_ACCESS_2_VIDEO_ENCODE_READ_BIT_KHR, `srcStageMask` must include VK_PIPELINE_STAGE_2_VIDEO_ENCODE_BIT_KHR

- VUID-VkBufferMemoryBarrier2-srcAccessMask-04861
  If `srcAccessMask` includes VK_ACCESS_2_VIDEO_ENCODE_WRITE_BIT_KHR, `srcStageMask` must include VK_PIPELINE_STAGE_2_VIDEO_ENCODE_BIT_KHR

- VUID-VkBufferMemoryBarrier2-srcAccessMask-07455
  If `srcAccessMask` includes VK_ACCESS_2_OPTICAL_FLOW_READ_BIT_NV, `srcStageMask` must include VK_PIPELINE_STAGE_2_OPTICAL_FLOW_BIT_NV

- VUID-VkBufferMemoryBarrier2-srcAccessMask-07456
  If `srcAccessMask` includes VK_ACCESS_2_OPTICAL_FLOW_WRITE_BIT_NV, `srcStageMask` must include VK_PIPELINE_STAGE_2_OPTICAL_FLOW_BIT_NV

- VUID-VkBufferMemoryBarrier2-srcAccessMask-07457
  If `srcAccessMask` includes VK_ACCESS_2_MICROMAP_WRITE_BIT_EXT, `srcStageMask` must include VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT

- VUID-VkBufferMemoryBarrier2-srcAccessMask-07458
  If `srcAccessMask` includes VK_ACCESS_2_MICROMAP_READ_BIT_EXT, `srcStageMask` must include VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT or VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR

- VUID-VkBufferMemoryBarrier2-srcAccessMask-08118
  If `srcAccessMask` includes VK_ACCESS_2_DESCRIPTOR_BUFFER_READ_BIT_EXT, `srcStageMask` must include VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, or one of `VK_PIPELINE_STAGE_*_SHADER_BIT` stages

- VUID-VkBufferMemoryBarrier2-srcAccessMask-10670
  If `srcAccessMask` includes VK_ACCESS_2_SHADER_TILE_ATTACHMENT_READ_BIT_QCOM, `srcStageMask` must include VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT or VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT

- VUID-VkBufferMemoryBarrier2-srcAccessMask-10671
  If `srcAccessMask` includes VK_ACCESS_2_SHADER_TILE_ATTACHMENT_WRITE_BIT_QCOM, `srcStageMask` must include VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT or VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT

- VUID-VkBufferMemoryBarrier2-srcAccessMask-11771
  If `srcAccessMask` includes VK_ACCESS_2_MEMORY_DECOMPRESSION_READ_BIT_EXT, `srcStageMask` must include VK_PIPELINE_STAGE_2_MEMORY_DECOMPRESSION_BIT_EXT

- VUID-VkBufferMemoryBarrier2-srcAccessMask-11772
  If `srcAccessMask` includes VK_ACCESS_2_MEMORY_DECOMPRESSION_WRITE_BIT_EXT, `srcStageMask` must include VK_PIPELINE_STAGE_2_MEMORY_DECOMPRESSION_BIT_EXT

- VUID-VkBufferMemoryBarrier2-srcAccessMask-11294
  If `srcAccessMask` includes VK_ACCESS_2_SAMPLER_HEAP_READ_BIT_EXT or VK_ACCESS_2_RESOURCE_HEAP_READ_BIT_EXT, `srcStageMask` must include VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, or one of `VK_PIPELINE_STAGE_*_SHADER_BIT` stages

- VUID-VkBufferMemoryBarrier2-dstStageMask-03929
  If the `geometryShader` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_2_GEOMETRY_SHADER_BIT

- VUID-VkBufferMemoryBarrier2-dstStageMask-03930
  If the `tessellationShader` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT or VK_PIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT

- VUID-VkBufferMemoryBarrier2-dstStageMask-03931
  If the `conditionalRendering` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_2_CONDITIONAL_RENDERING_BIT_EXT

- VUID-VkBufferMemoryBarrier2-dstStageMask-03932
  If the `fragmentDensityMap` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_2_FRAGMENT_DENSITY_PROCESS_BIT_EXT

- VUID-VkBufferMemoryBarrier2-dstStageMask-03933
  If the `transformFeedback` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT

- VUID-VkBufferMemoryBarrier2-dstStageMask-03934
  If the `meshShader` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_2_MESH_SHADER_BIT_EXT

- VUID-VkBufferMemoryBarrier2-dstStageMask-03935
  If the `taskShader` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_2_TASK_SHADER_BIT_EXT

- VUID-VkBufferMemoryBarrier2-dstStageMask-07316
  If neither of the `shadingRateImage` or the `attachmentFragmentShadingRate` features are enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

- VUID-VkBufferMemoryBarrier2-dstStageMask-04957
  If the `subpassShading` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_2_SUBPASS_SHADER_BIT_HUAWEI

- VUID-VkBufferMemoryBarrier2-dstStageMask-04995
  If the `invocationMask` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_2_INVOCATION_MASK_BIT_HUAWEI

- VUID-VkBufferMemoryBarrier2-dstStageMask-07946
  If neither the VK_NV_ray_tracing extension or the `rayTracingPipeline` feature are enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR

- VUID-VkBufferMemoryBarrier2-dstStageMask-10751
  If the `accelerationStructure` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR

- VUID-VkBufferMemoryBarrier2-dstStageMask-10752
  If the `rayTracingMaintenance1` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR

- VUID-VkBufferMemoryBarrier2-dstStageMask-11541
  If the `VkPhysicalDeviceOpacityMicromapFeaturesEXT`::`micromap` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT

- VUID-VkBufferMemoryBarrier2-dstAccessMask-03900
  If `dstAccessMask` includes VK_ACCESS_2_INDIRECT_COMMAND_READ_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_DRAW_INDIRECT_BIT, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, VK_PIPELINE_STAGE_2_COPY_INDIRECT_BIT_KHR, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkBufferMemoryBarrier2-dstAccessMask-03901
  If `dstAccessMask` includes VK_ACCESS_2_INDEX_READ_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_INDEX_INPUT_BIT, VK_PIPELINE_STAGE_2_VERTEX_INPUT_BIT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkBufferMemoryBarrier2-dstAccessMask-03902
  If `dstAccessMask` includes VK_ACCESS_2_VERTEX_ATTRIBUTE_READ_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_VERTEX_ATTRIBUTE_INPUT_BIT, VK_PIPELINE_STAGE_2_VERTEX_INPUT_BIT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkBufferMemoryBarrier2-dstAccessMask-03903
  If `dstAccessMask` includes VK_ACCESS_2_INPUT_ATTACHMENT_READ_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT, VK_PIPELINE_STAGE_2_SUBPASS_SHADER_BIT_HUAWEI, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkBufferMemoryBarrier2-dstAccessMask-03904
  If `dstAccessMask` includes VK_ACCESS_2_UNIFORM_READ_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, or one of the `VK_PIPELINE_STAGE_*_SHADER_BIT` stages

- VUID-VkBufferMemoryBarrier2-dstAccessMask-03905
  If `dstAccessMask` includes VK_ACCESS_2_SHADER_SAMPLED_READ_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, or one of the `VK_PIPELINE_STAGE_*_SHADER_BIT` stages

- VUID-VkBufferMemoryBarrier2-dstAccessMask-03906
  If `dstAccessMask` includes VK_ACCESS_2_SHADER_STORAGE_READ_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, or one of the `VK_PIPELINE_STAGE_*_SHADER_BIT` stages

- VUID-VkBufferMemoryBarrier2-dstAccessMask-03907
  If `dstAccessMask` includes VK_ACCESS_2_SHADER_STORAGE_WRITE_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, or one of the `VK_PIPELINE_STAGE_*_SHADER_BIT` stages

- VUID-VkBufferMemoryBarrier2-dstAccessMask-07454
  If `dstAccessMask` includes VK_ACCESS_2_SHADER_READ_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT, or one of the `VK_PIPELINE_STAGE_*_SHADER_BIT` stages

- VUID-VkBufferMemoryBarrier2-dstAccessMask-03909
  If `dstAccessMask` includes VK_ACCESS_2_SHADER_WRITE_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, or one of the `VK_PIPELINE_STAGE_*_SHADER_BIT` stages

- VUID-VkBufferMemoryBarrier2-dstAccessMask-03910
  If `dstAccessMask` includes VK_ACCESS_2_COLOR_ATTACHMENT_READ_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkBufferMemoryBarrier2-dstAccessMask-03911
  If `dstAccessMask` includes VK_ACCESS_2_COLOR_ATTACHMENT_WRITE_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkBufferMemoryBarrier2-dstAccessMask-03912
  If `dstAccessMask` includes VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_READ_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_EARLY_FRAGMENT_TESTS_BIT, VK_PIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkBufferMemoryBarrier2-dstAccessMask-03913
  If `dstAccessMask` includes VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_EARLY_FRAGMENT_TESTS_BIT, VK_PIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkBufferMemoryBarrier2-dstAccessMask-03914
  If `dstAccessMask` includes VK_ACCESS_2_TRANSFER_READ_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_COPY_BIT, VK_PIPELINE_STAGE_2_BLIT_BIT, VK_PIPELINE_STAGE_2_RESOLVE_BIT, VK_PIPELINE_STAGE_2_ALL_TRANSFER_BIT, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR, VK_PIPELINE_STAGE_2_CONVERT_COOPERATIVE_VECTOR_MATRIX_BIT_NV, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkBufferMemoryBarrier2-dstAccessMask-03915
  If `dstAccessMask` includes VK_ACCESS_2_TRANSFER_WRITE_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_COPY_BIT, VK_PIPELINE_STAGE_2_BLIT_BIT, VK_PIPELINE_STAGE_2_RESOLVE_BIT, VK_PIPELINE_STAGE_2_CLEAR_BIT, VK_PIPELINE_STAGE_2_ALL_TRANSFER_BIT, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR, VK_PIPELINE_STAGE_2_CONVERT_COOPERATIVE_VECTOR_MATRIX_BIT_NV, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkBufferMemoryBarrier2-dstAccessMask-03916
  If `dstAccessMask` includes VK_ACCESS_2_HOST_READ_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_HOST_BIT

- VUID-VkBufferMemoryBarrier2-dstAccessMask-03917
  If `dstAccessMask` includes VK_ACCESS_2_HOST_WRITE_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_HOST_BIT

- VUID-VkBufferMemoryBarrier2-dstAccessMask-03918
  If `dstAccessMask` includes VK_ACCESS_2_CONDITIONAL_RENDERING_READ_BIT_EXT, `dstStageMask` must include VK_PIPELINE_STAGE_2_CONDITIONAL_RENDERING_BIT_EXT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkBufferMemoryBarrier2-dstAccessMask-03919
  If `dstAccessMask` includes VK_ACCESS_2_FRAGMENT_DENSITY_MAP_READ_BIT_EXT, `dstStageMask` must include VK_PIPELINE_STAGE_2_FRAGMENT_DENSITY_PROCESS_BIT_EXT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkBufferMemoryBarrier2-dstAccessMask-03920
  If `dstAccessMask` includes VK_ACCESS_2_TRANSFORM_FEEDBACK_WRITE_BIT_EXT, `dstStageMask` must include VK_PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkBufferMemoryBarrier2-dstAccessMask-04747
  If `dstAccessMask` includes VK_ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT, `dstStageMask` must include VK_PIPELINE_STAGE_2_DRAW_INDIRECT_BIT, VK_PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkBufferMemoryBarrier2-dstAccessMask-03922
  If `dstAccessMask` includes VK_ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT, `dstStageMask` must include VK_PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkBufferMemoryBarrier2-dstAccessMask-03923
  If `dstAccessMask` includes VK_ACCESS_2_SHADING_RATE_IMAGE_READ_BIT_NV, `dstStageMask` must include VK_PIPELINE_STAGE_2_SHADING_RATE_IMAGE_BIT_NV, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkBufferMemoryBarrier2-dstAccessMask-04994
  If `dstAccessMask` includes VK_ACCESS_2_INVOCATION_MASK_READ_BIT_HUAWEI, `dstStageMask` must include VK_PIPELINE_STAGE_2_INVOCATION_MASK_BIT_HUAWEI

- VUID-VkBufferMemoryBarrier2-dstAccessMask-03924
  If `dstAccessMask` includes VK_ACCESS_2_COMMAND_PREPROCESS_READ_BIT_NV, `dstStageMask` must include VK_PIPELINE_STAGE_2_COMMAND_PREPROCESS_BIT_NV or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkBufferMemoryBarrier2-dstAccessMask-03925
  If `dstAccessMask` includes VK_ACCESS_2_COMMAND_PREPROCESS_WRITE_BIT_NV, `dstStageMask` must include VK_PIPELINE_STAGE_2_COMMAND_PREPROCESS_BIT_NV or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkBufferMemoryBarrier2-dstAccessMask-03926
  If `dstAccessMask` includes VK_ACCESS_2_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT, `dstStageMask` must include VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkBufferMemoryBarrier2-dstAccessMask-03927
  If `dstAccessMask` includes VK_ACCESS_2_ACCELERATION_STRUCTURE_READ_BIT_KHR, and the `rayQuery` feature is enabled, `dstStageMask` must include VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR, one of the `VK_PIPELINE_STAGE_*_SHADER_BIT` stages, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkBufferMemoryBarrier2-dstAccessMask-03928
  If `dstAccessMask` includes VK_ACCESS_2_ACCELERATION_STRUCTURE_WRITE_BIT_KHR, `dstStageMask` must include VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkBufferMemoryBarrier2-dstAccessMask-06256
  If `dstAccessMask` includes VK_ACCESS_2_ACCELERATION_STRUCTURE_READ_BIT_KHR, and the `rayQuery` feature is not enabled, `dstStageMask` must include VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkBufferMemoryBarrier2-dstAccessMask-07272
  If `dstAccessMask` includes VK_ACCESS_2_SHADER_BINDING_TABLE_READ_BIT_KHR, `dstStageMask` must include VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT or VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR

- VUID-VkBufferMemoryBarrier2-dstAccessMask-04858
  If `dstAccessMask` includes VK_ACCESS_2_VIDEO_DECODE_READ_BIT_KHR, `dstStageMask` must include VK_PIPELINE_STAGE_2_VIDEO_DECODE_BIT_KHR

- VUID-VkBufferMemoryBarrier2-dstAccessMask-04859
  If `dstAccessMask` includes VK_ACCESS_2_VIDEO_DECODE_WRITE_BIT_KHR, `dstStageMask` must include VK_PIPELINE_STAGE_2_VIDEO_DECODE_BIT_KHR

- VUID-VkBufferMemoryBarrier2-dstAccessMask-04860
  If `dstAccessMask` includes VK_ACCESS_2_VIDEO_ENCODE_READ_BIT_KHR, `dstStageMask` must include VK_PIPELINE_STAGE_2_VIDEO_ENCODE_BIT_KHR

- VUID-VkBufferMemoryBarrier2-dstAccessMask-04861
  If `dstAccessMask` includes VK_ACCESS_2_VIDEO_ENCODE_WRITE_BIT_KHR, `dstStageMask` must include VK_PIPELINE_STAGE_2_VIDEO_ENCODE_BIT_KHR

- VUID-VkBufferMemoryBarrier2-dstAccessMask-07455
  If `dstAccessMask` includes VK_ACCESS_2_OPTICAL_FLOW_READ_BIT_NV, `dstStageMask` must include VK_PIPELINE_STAGE_2_OPTICAL_FLOW_BIT_NV

- VUID-VkBufferMemoryBarrier2-dstAccessMask-07456
  If `dstAccessMask` includes VK_ACCESS_2_OPTICAL_FLOW_WRITE_BIT_NV, `dstStageMask` must include VK_PIPELINE_STAGE_2_OPTICAL_FLOW_BIT_NV

- VUID-VkBufferMemoryBarrier2-dstAccessMask-07457
  If `dstAccessMask` includes VK_ACCESS_2_MICROMAP_WRITE_BIT_EXT, `dstStageMask` must include VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT

- VUID-VkBufferMemoryBarrier2-dstAccessMask-07458
  If `dstAccessMask` includes VK_ACCESS_2_MICROMAP_READ_BIT_EXT, `dstStageMask` must include VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT or VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR

- VUID-VkBufferMemoryBarrier2-dstAccessMask-08118
  If `dstAccessMask` includes VK_ACCESS_2_DESCRIPTOR_BUFFER_READ_BIT_EXT, `dstStageMask` must include VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, or one of `VK_PIPELINE_STAGE_*_SHADER_BIT` stages

- VUID-VkBufferMemoryBarrier2-dstAccessMask-10670
  If `dstAccessMask` includes VK_ACCESS_2_SHADER_TILE_ATTACHMENT_READ_BIT_QCOM, `dstStageMask` must include VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT or VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT

- VUID-VkBufferMemoryBarrier2-dstAccessMask-10671
  If `dstAccessMask` includes VK_ACCESS_2_SHADER_TILE_ATTACHMENT_WRITE_BIT_QCOM, `dstStageMask` must include VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT or VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT

- VUID-VkBufferMemoryBarrier2-dstAccessMask-11771
  If `dstAccessMask` includes VK_ACCESS_2_MEMORY_DECOMPRESSION_READ_BIT_EXT, `dstStageMask` must include VK_PIPELINE_STAGE_2_MEMORY_DECOMPRESSION_BIT_EXT

- VUID-VkBufferMemoryBarrier2-dstAccessMask-11772
  If `dstAccessMask` includes VK_ACCESS_2_MEMORY_DECOMPRESSION_WRITE_BIT_EXT, `dstStageMask` must include VK_PIPELINE_STAGE_2_MEMORY_DECOMPRESSION_BIT_EXT

- VUID-VkBufferMemoryBarrier2-dstAccessMask-11294
  If `dstAccessMask` includes VK_ACCESS_2_SAMPLER_HEAP_READ_BIT_EXT or VK_ACCESS_2_RESOURCE_HEAP_READ_BIT_EXT, `dstStageMask` must include VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, or one of `VK_PIPELINE_STAGE_*_SHADER_BIT` stages

- VUID-VkBufferMemoryBarrier2-offset-01187
  `offset` must be less than the size of `buffer`

- VUID-VkBufferMemoryBarrier2-size-01188
  If `size` is not equal to VK_WHOLE_SIZE, `size` must be greater than `0`

- VUID-VkBufferMemoryBarrier2-size-01189
  If `size` is not equal to VK_WHOLE_SIZE, `size` must be less than or equal to than the size of `buffer` minus `offset`

- VUID-VkBufferMemoryBarrier2-buffer-01931
  If `buffer` is non-sparse then it must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-VkBufferMemoryBarrier2-buffer-09095
  If `buffer` was created with a sharing mode of VK_SHARING_MODE_EXCLUSIVE, and `srcQueueFamilyIndex` and `dstQueueFamilyIndex` are not equal, `srcQueueFamilyIndex` must be VK_QUEUE_FAMILY_EXTERNAL, VK_QUEUE_FAMILY_FOREIGN_EXT, or a valid queue family

- VUID-VkBufferMemoryBarrier2-buffer-09096
  If `buffer` was created with a sharing mode of VK_SHARING_MODE_EXCLUSIVE, and `srcQueueFamilyIndex` and `dstQueueFamilyIndex` are not equal, `dstQueueFamilyIndex` must be VK_QUEUE_FAMILY_EXTERNAL, VK_QUEUE_FAMILY_FOREIGN_EXT, or a valid queue family

- VUID-VkBufferMemoryBarrier2-None-09097
  If the VK_KHR_external_memory extension is not enabled, and the value of VkApplicationInfo::`apiVersion` used to create the VkInstance is not greater than or equal to Version 1.1, `srcQueueFamilyIndex` must not be VK_QUEUE_FAMILY_EXTERNAL

- VUID-VkBufferMemoryBarrier2-None-09098
  If the VK_KHR_external_memory extension is not enabled, and the value of VkApplicationInfo::`apiVersion` used to create the VkInstance is not greater than or equal to Version 1.1, `dstQueueFamilyIndex` must not be VK_QUEUE_FAMILY_EXTERNAL

- VUID-VkBufferMemoryBarrier2-srcQueueFamilyIndex-09099
  If the VK_EXT_queue_family_foreign extension is not enabled `srcQueueFamilyIndex` must not be VK_QUEUE_FAMILY_FOREIGN_EXT

- VUID-VkBufferMemoryBarrier2-dstQueueFamilyIndex-09100
  If the VK_EXT_queue_family_foreign extension is not enabled `dstQueueFamilyIndex` must not be VK_QUEUE_FAMILY_FOREIGN_EXT

- VUID-VkBufferMemoryBarrier2-srcStageMask-03851
  If either `srcStageMask` or `dstStageMask` includes VK_PIPELINE_STAGE_2_HOST_BIT, `srcQueueFamilyIndex` and `dstQueueFamilyIndex` must be equal

Valid Usage (Implicit)

- VUID-VkBufferMemoryBarrier2-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER_2

- VUID-VkBufferMemoryBarrier2-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkExternalMemoryAcquireUnmodifiedEXT or VkMemoryBarrierAccessFlags3KHR

- VUID-VkBufferMemoryBarrier2-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkBufferMemoryBarrier2-srcStageMask-parameter
  `srcStageMask` must be a valid combination of VkPipelineStageFlagBits2 values

- VUID-VkBufferMemoryBarrier2-srcAccessMask-parameter
  `srcAccessMask` must be a valid combination of VkAccessFlagBits2 values

- VUID-VkBufferMemoryBarrier2-dstStageMask-parameter
  `dstStageMask` must be a valid combination of VkPipelineStageFlagBits2 values

- VUID-VkBufferMemoryBarrier2-dstAccessMask-parameter
  `dstAccessMask` must be a valid combination of VkAccessFlagBits2 values

- VUID-VkBufferMemoryBarrier2-buffer-parameter
  `buffer` must be a valid VkBuffer handle

The `VkBufferMemoryBarrier` structure is defined as:

Warning | This functionality is superseded by VkBufferMemoryBarrier2. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_0
    typedef struct VkBufferMemoryBarrier {
        VkStructureType    sType;
        const void*        pNext;
        VkAccessFlags      srcAccessMask;
        VkAccessFlags      dstAccessMask;
        uint32_t           srcQueueFamilyIndex;
        uint32_t           dstQueueFamilyIndex;
        VkBuffer           buffer;
        VkDeviceSize       offset;
        VkDeviceSize       size;
    } VkBufferMemoryBarrier;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `srcAccessMask` is a bitmask of VkAccessFlagBits specifying a source access mask.

- `dstAccessMask` is a bitmask of VkAccessFlagBits specifying a destination access mask.

- `srcQueueFamilyIndex` is the source queue family for a queue family ownership transfer.

- `dstQueueFamilyIndex` is the destination queue family for a queue family ownership transfer.

- `buffer` is a handle to the buffer whose backing memory is affected by the barrier.

- `offset` is an offset in bytes into the backing memory for `buffer`; this is relative to the base offset as bound to the buffer (see vkBindBufferMemory).

- `size` is a size in bytes of the affected area of backing memory for `buffer`, or VK_WHOLE_SIZE to use the range from `offset` to the end of the buffer.

The first access scope is limited to access to memory through the specified buffer range, via access types in the source access mask specified by `srcAccessMask` and, if a VkMemoryBarrierAccessFlags3KHR is passed in `pNext`, `srcAccessMask3`. If the source access mask includes VK_ACCESS_HOST_WRITE_BIT, a memory domain operation is performed where available memory in the host domain is also made available to the device domain.

The second access scope is limited to access to memory through the specified buffer range, via access types in the destination access mask specified by `dstAccessMask` and, if a VkMemoryBarrierAccessFlags3KHR is passed in `pNext`, `dstAccessMask3`. If the destination access mask includes VK_ACCESS_HOST_WRITE_BIT or VK_ACCESS_HOST_READ_BIT, a memory domain operation is performed where available memory in the device domain is also made available to the host domain.

Note | Host writes to device memory that was allocated without VK_MEMORY_PROPERTY_HOST_COHERENT_BIT have to be flushed with vkFlushMappedMemoryRanges before they can be accessed safely on the device. Similarly, device writes to such memory have to be invalidated with vkInvalidateMappedMemoryRanges before they can be accessed safely on the host. Memory allocated with VK_MEMORY_PROPERTY_HOST_COHERENT_BIT does not need to have these additional operations performed.

If `srcQueueFamilyIndex` is not equal to `dstQueueFamilyIndex`, and `srcQueueFamilyIndex` is equal to the current queue family, then the memory barrier defines a queue family release operation for the specified buffer range, and if `dependencyFlags` did not include VK_DEPENDENCY_QUEUE_FAMILY_OWNERSHIP_TRANSFER_USE_ALL_STAGES_BIT_KHR, the second synchronization scope of the calling command does not apply to this operation.

If `dstQueueFamilyIndex` is not equal to `srcQueueFamilyIndex`, and `dstQueueFamilyIndex` is equal to the current queue family, then the memory barrier defines a queue family acquire operation for the specified buffer range, and if `dependencyFlags` did not include VK_DEPENDENCY_QUEUE_FAMILY_OWNERSHIP_TRANSFER_USE_ALL_STAGES_BIT_KHR, the first synchronization scope of the calling command does not apply to this operation.

Valid Usage

- VUID-VkBufferMemoryBarrier-offset-01187
  `offset` must be less than the size of `buffer`

- VUID-VkBufferMemoryBarrier-size-01188
  If `size` is not equal to VK_WHOLE_SIZE, `size` must be greater than `0`

- VUID-VkBufferMemoryBarrier-size-01189
  If `size` is not equal to VK_WHOLE_SIZE, `size` must be less than or equal to than the size of `buffer` minus `offset`

- VUID-VkBufferMemoryBarrier-buffer-01931
  If `buffer` is non-sparse then it must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-VkBufferMemoryBarrier-buffer-09095
  If `buffer` was created with a sharing mode of VK_SHARING_MODE_EXCLUSIVE, and `srcQueueFamilyIndex` and `dstQueueFamilyIndex` are not equal, `srcQueueFamilyIndex` must be VK_QUEUE_FAMILY_EXTERNAL, VK_QUEUE_FAMILY_FOREIGN_EXT, or a valid queue family

- VUID-VkBufferMemoryBarrier-buffer-09096
  If `buffer` was created with a sharing mode of VK_SHARING_MODE_EXCLUSIVE, and `srcQueueFamilyIndex` and `dstQueueFamilyIndex` are not equal, `dstQueueFamilyIndex` must be VK_QUEUE_FAMILY_EXTERNAL, VK_QUEUE_FAMILY_FOREIGN_EXT, or a valid queue family

- VUID-VkBufferMemoryBarrier-None-09097
  If the VK_KHR_external_memory extension is not enabled, and the value of VkApplicationInfo::`apiVersion` used to create the VkInstance is not greater than or equal to Version 1.1, `srcQueueFamilyIndex` must not be VK_QUEUE_FAMILY_EXTERNAL

- VUID-VkBufferMemoryBarrier-None-09098
  If the VK_KHR_external_memory extension is not enabled, and the value of VkApplicationInfo::`apiVersion` used to create the VkInstance is not greater than or equal to Version 1.1, `dstQueueFamilyIndex` must not be VK_QUEUE_FAMILY_EXTERNAL

- VUID-VkBufferMemoryBarrier-srcQueueFamilyIndex-09099
  If the VK_EXT_queue_family_foreign extension is not enabled `srcQueueFamilyIndex` must not be VK_QUEUE_FAMILY_FOREIGN_EXT

- VUID-VkBufferMemoryBarrier-dstQueueFamilyIndex-09100
  If the VK_EXT_queue_family_foreign extension is not enabled `dstQueueFamilyIndex` must not be VK_QUEUE_FAMILY_FOREIGN_EXT

- VUID-VkBufferMemoryBarrier-None-09049
  If the `synchronization2` feature is not enabled, and `buffer` was created with a sharing mode of VK_SHARING_MODE_CONCURRENT, at least one of `srcQueueFamilyIndex` and `dstQueueFamilyIndex` must be VK_QUEUE_FAMILY_IGNORED

- VUID-VkBufferMemoryBarrier-None-09050
  If the `synchronization2` feature is not enabled, and `buffer` was created with a sharing mode of VK_SHARING_MODE_CONCURRENT, `srcQueueFamilyIndex` must be VK_QUEUE_FAMILY_IGNORED or VK_QUEUE_FAMILY_EXTERNAL

- VUID-VkBufferMemoryBarrier-None-09051
  If the `synchronization2` feature is not enabled, and `buffer` was created with a sharing mode of VK_SHARING_MODE_CONCURRENT, `dstQueueFamilyIndex` must be VK_QUEUE_FAMILY_IGNORED or VK_QUEUE_FAMILY_EXTERNAL

Valid Usage (Implicit)

- VUID-VkBufferMemoryBarrier-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER

- VUID-VkBufferMemoryBarrier-pNext-pNext
  `pNext` must be `NULL` or a pointer to a valid instance of VkExternalMemoryAcquireUnmodifiedEXT

- VUID-VkBufferMemoryBarrier-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkBufferMemoryBarrier-buffer-parameter
  `buffer` must be a valid VkBuffer handle

VK_WHOLE_SIZE is a special value indicating that the entire remaining length of a buffer or allocation following a given `offset` should be used. It can be specified for VkBufferMemoryBarrier::`size`, vkMapMemory::`size`, and other similar structures.

    #define VK_WHOLE_SIZE                     (~0ULL)

#### 7.7.4. Image Memory Barriers

Image memory barriers only apply to memory accesses involving a specific image subresource range. That is, a memory dependency formed from an image memory barrier is scoped to access via the specified image subresource range. Image memory barriers can also be used to define image layout transitions or a queue family ownership transfer for the specified image subresource range.

The `VkImageMemoryBarrier2` structure is defined as:

    // Provided by VK_VERSION_1_3
    typedef struct VkImageMemoryBarrier2 {
        VkStructureType            sType;
        const void*                pNext;
        VkPipelineStageFlags2      srcStageMask;
        VkAccessFlags2             srcAccessMask;
        VkPipelineStageFlags2      dstStageMask;
        VkAccessFlags2             dstAccessMask;
        VkImageLayout              oldLayout;
        VkImageLayout              newLayout;
        uint32_t                   srcQueueFamilyIndex;
        uint32_t                   dstQueueFamilyIndex;
        VkImage                    image;
        VkImageSubresourceRange    subresourceRange;
    } VkImageMemoryBarrier2;

    // Provided by VK_KHR_synchronization2
    // Equivalent to VkImageMemoryBarrier2
    typedef VkImageMemoryBarrier2 VkImageMemoryBarrier2KHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `srcStageMask` is a VkPipelineStageFlags2 mask of pipeline stages to be included in the first synchronization scope.

- `srcAccessMask` is a VkAccessFlags2 mask of access flags to be included in the first access scope.

- `dstStageMask` is a VkPipelineStageFlags2 mask of pipeline stages to be included in the second synchronization scope.

- `dstAccessMask` is a VkAccessFlags2 mask of access flags to be included in the second access scope.

- `oldLayout` is the old layout in an image layout transition.

- `newLayout` is the new layout in an image layout transition.

- `srcQueueFamilyIndex` is the source queue family for a queue family ownership transfer.

- `dstQueueFamilyIndex` is the destination queue family for a queue family ownership transfer.

- `image` is a handle to the image affected by this barrier.

- `subresourceRange` describes the image subresource range within `image` that is affected by this barrier.

This structure defines a memory dependency limited to an image subresource range, and can define a queue family ownership transfer operation and image layout transition for that subresource range.

The first synchronization scope and access scope described by this structure include only operations and memory accesses specified by the source stage mask and the source access mask.

The second synchronization scope and access scope described by this structure include only operations and memory accesses specified by the destination stage mask and the destination access mask.

Both access scopes are limited to only memory accesses to `image` in the subresource range defined by `subresourceRange`.

If `image` was created with VK_SHARING_MODE_EXCLUSIVE, and `srcQueueFamilyIndex` is not equal to `dstQueueFamilyIndex`, this memory barrier defines a queue family ownership transfer operation. When executed on a queue in the family identified by `srcQueueFamilyIndex`, this barrier defines a queue family release operation for the specified image subresource range, and if VkDependencyInfoKHR::`dependencyFlags` did not include VK_DEPENDENCY_QUEUE_FAMILY_OWNERSHIP_TRANSFER_USE_ALL_STAGES_BIT_KHR, the second synchronization scope does not apply to this operation. When executed on a queue in the family identified by `dstQueueFamilyIndex`, this barrier defines a queue family acquire operation for the specified image subresource range, and if VkDependencyInfoKHR::`dependencyFlags` did not include VK_DEPENDENCY_QUEUE_FAMILY_OWNERSHIP_TRANSFER_USE_ALL_STAGES_BIT_KHR, the first synchronization scope does not apply to this operation.

A queue family ownership transfer operation is also defined if the values are not equal, and either is one of the special queue family values reserved for external memory ownership transfers, as described in Queue Family Ownership Transfer. A queue family release operation is defined when `dstQueueFamilyIndex` is one of those values, and a queue family acquire operation is defined when `srcQueueFamilyIndex` is one of those values.

If `oldLayout` is not equal to `newLayout`, then the memory barrier defines an image layout transition for the specified image subresource range. If this memory barrier defines a queue family ownership transfer operation, the layout transition is only executed once between the queues.

If `srcQueueFamilyIndex` and `dstQueueFamilyIndex` are equal and `oldLayout` and `newLayout` are also equal, the layout values are ignored and the image contents are preserved regardless of the values of `oldLayout`, `newLayout`, and the current layout of the image.

If `image` is a 3D image created with VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT and the `maintenance9` feature is enabled, the `baseArrayLayer` and `layerCount` members of `subresourceRange` specify the subset of slices of the 3D image affected by the memory barrier, including the layout transition. Any slices of a 3D image not included in `subresourceRange` are not affected by the memory barrier and remain in their existing layout.

Note | Enabling the `maintenance9` feature modifies the behavior of image barriers targeting 3D images created with VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT. Previously, a `layerCount` equal to 1 would cover the entire 3D image, but this has a different meaning when the `maintenance9` feature is enabled. Linking this behavioral change solely to the `maintenance9` feature caused an unintended break in forward-compatibility. Validation layers are expected to flag a warning for the scenario where the `maintenance9` feature is not enabled, and the application uses `layerCount` equal to 1 on this kind of 3D image. `layerCount` can be set to VK_REMAINING_ARRAY_LAYERS instead, which has the same semantics with or without the extension. This validation check should make it feasible for software to avoid any breaking changes should the `maintenance9` feature be enabled in the future, either explicitly by application or by a layer outside the control of the application.

If `image` has a multi-planar format and the image is disjoint, then including VK_IMAGE_ASPECT_COLOR_BIT in the `aspectMask` member of `subresourceRange` is equivalent to including VK_IMAGE_ASPECT_PLANE_0_BIT, VK_IMAGE_ASPECT_PLANE_1_BIT, and (for three-plane formats only) VK_IMAGE_ASPECT_PLANE_2_BIT.

Valid Usage

- VUID-VkImageMemoryBarrier2-srcStageMask-03929
  If the `geometryShader` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_2_GEOMETRY_SHADER_BIT

- VUID-VkImageMemoryBarrier2-srcStageMask-03930
  If the `tessellationShader` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT or VK_PIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT

- VUID-VkImageMemoryBarrier2-srcStageMask-03931
  If the `conditionalRendering` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_2_CONDITIONAL_RENDERING_BIT_EXT

- VUID-VkImageMemoryBarrier2-srcStageMask-03932
  If the `fragmentDensityMap` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_2_FRAGMENT_DENSITY_PROCESS_BIT_EXT

- VUID-VkImageMemoryBarrier2-srcStageMask-03933
  If the `transformFeedback` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT

- VUID-VkImageMemoryBarrier2-srcStageMask-03934
  If the `meshShader` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_2_MESH_SHADER_BIT_EXT

- VUID-VkImageMemoryBarrier2-srcStageMask-03935
  If the `taskShader` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_2_TASK_SHADER_BIT_EXT

- VUID-VkImageMemoryBarrier2-srcStageMask-07316
  If neither of the `shadingRateImage` or the `attachmentFragmentShadingRate` features are enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

- VUID-VkImageMemoryBarrier2-srcStageMask-04957
  If the `subpassShading` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_2_SUBPASS_SHADER_BIT_HUAWEI

- VUID-VkImageMemoryBarrier2-srcStageMask-04995
  If the `invocationMask` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_2_INVOCATION_MASK_BIT_HUAWEI

- VUID-VkImageMemoryBarrier2-srcStageMask-07946
  If neither the VK_NV_ray_tracing extension or the `rayTracingPipeline` feature are enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR

- VUID-VkImageMemoryBarrier2-srcStageMask-10751
  If the `accelerationStructure` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR

- VUID-VkImageMemoryBarrier2-srcStageMask-10752
  If the `rayTracingMaintenance1` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR

- VUID-VkImageMemoryBarrier2-srcStageMask-11541
  If the `VkPhysicalDeviceOpacityMicromapFeaturesEXT`::`micromap` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT

- VUID-VkImageMemoryBarrier2-srcAccessMask-03900
  If `srcAccessMask` includes VK_ACCESS_2_INDIRECT_COMMAND_READ_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_DRAW_INDIRECT_BIT, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, VK_PIPELINE_STAGE_2_COPY_INDIRECT_BIT_KHR, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkImageMemoryBarrier2-srcAccessMask-03901
  If `srcAccessMask` includes VK_ACCESS_2_INDEX_READ_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_INDEX_INPUT_BIT, VK_PIPELINE_STAGE_2_VERTEX_INPUT_BIT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkImageMemoryBarrier2-srcAccessMask-03902
  If `srcAccessMask` includes VK_ACCESS_2_VERTEX_ATTRIBUTE_READ_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_VERTEX_ATTRIBUTE_INPUT_BIT, VK_PIPELINE_STAGE_2_VERTEX_INPUT_BIT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkImageMemoryBarrier2-srcAccessMask-03903
  If `srcAccessMask` includes VK_ACCESS_2_INPUT_ATTACHMENT_READ_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT, VK_PIPELINE_STAGE_2_SUBPASS_SHADER_BIT_HUAWEI, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkImageMemoryBarrier2-srcAccessMask-03904
  If `srcAccessMask` includes VK_ACCESS_2_UNIFORM_READ_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, or one of the `VK_PIPELINE_STAGE_*_SHADER_BIT` stages

- VUID-VkImageMemoryBarrier2-srcAccessMask-03905
  If `srcAccessMask` includes VK_ACCESS_2_SHADER_SAMPLED_READ_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, or one of the `VK_PIPELINE_STAGE_*_SHADER_BIT` stages

- VUID-VkImageMemoryBarrier2-srcAccessMask-03906
  If `srcAccessMask` includes VK_ACCESS_2_SHADER_STORAGE_READ_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, or one of the `VK_PIPELINE_STAGE_*_SHADER_BIT` stages

- VUID-VkImageMemoryBarrier2-srcAccessMask-03907
  If `srcAccessMask` includes VK_ACCESS_2_SHADER_STORAGE_WRITE_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, or one of the `VK_PIPELINE_STAGE_*_SHADER_BIT` stages

- VUID-VkImageMemoryBarrier2-srcAccessMask-07454
  If `srcAccessMask` includes VK_ACCESS_2_SHADER_READ_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT, or one of the `VK_PIPELINE_STAGE_*_SHADER_BIT` stages

- VUID-VkImageMemoryBarrier2-srcAccessMask-03909
  If `srcAccessMask` includes VK_ACCESS_2_SHADER_WRITE_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, or one of the `VK_PIPELINE_STAGE_*_SHADER_BIT` stages

- VUID-VkImageMemoryBarrier2-srcAccessMask-03910
  If `srcAccessMask` includes VK_ACCESS_2_COLOR_ATTACHMENT_READ_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkImageMemoryBarrier2-srcAccessMask-03911
  If `srcAccessMask` includes VK_ACCESS_2_COLOR_ATTACHMENT_WRITE_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkImageMemoryBarrier2-srcAccessMask-03912
  If `srcAccessMask` includes VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_READ_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_EARLY_FRAGMENT_TESTS_BIT, VK_PIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkImageMemoryBarrier2-srcAccessMask-03913
  If `srcAccessMask` includes VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_EARLY_FRAGMENT_TESTS_BIT, VK_PIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkImageMemoryBarrier2-srcAccessMask-03914
  If `srcAccessMask` includes VK_ACCESS_2_TRANSFER_READ_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_COPY_BIT, VK_PIPELINE_STAGE_2_BLIT_BIT, VK_PIPELINE_STAGE_2_RESOLVE_BIT, VK_PIPELINE_STAGE_2_ALL_TRANSFER_BIT, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR, VK_PIPELINE_STAGE_2_CONVERT_COOPERATIVE_VECTOR_MATRIX_BIT_NV, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkImageMemoryBarrier2-srcAccessMask-03915
  If `srcAccessMask` includes VK_ACCESS_2_TRANSFER_WRITE_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_COPY_BIT, VK_PIPELINE_STAGE_2_BLIT_BIT, VK_PIPELINE_STAGE_2_RESOLVE_BIT, VK_PIPELINE_STAGE_2_CLEAR_BIT, VK_PIPELINE_STAGE_2_ALL_TRANSFER_BIT, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR, VK_PIPELINE_STAGE_2_CONVERT_COOPERATIVE_VECTOR_MATRIX_BIT_NV, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkImageMemoryBarrier2-srcAccessMask-03916
  If `srcAccessMask` includes VK_ACCESS_2_HOST_READ_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_HOST_BIT

- VUID-VkImageMemoryBarrier2-srcAccessMask-03917
  If `srcAccessMask` includes VK_ACCESS_2_HOST_WRITE_BIT, `srcStageMask` must include VK_PIPELINE_STAGE_2_HOST_BIT

- VUID-VkImageMemoryBarrier2-srcAccessMask-03918
  If `srcAccessMask` includes VK_ACCESS_2_CONDITIONAL_RENDERING_READ_BIT_EXT, `srcStageMask` must include VK_PIPELINE_STAGE_2_CONDITIONAL_RENDERING_BIT_EXT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkImageMemoryBarrier2-srcAccessMask-03919
  If `srcAccessMask` includes VK_ACCESS_2_FRAGMENT_DENSITY_MAP_READ_BIT_EXT, `srcStageMask` must include VK_PIPELINE_STAGE_2_FRAGMENT_DENSITY_PROCESS_BIT_EXT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkImageMemoryBarrier2-srcAccessMask-03920
  If `srcAccessMask` includes VK_ACCESS_2_TRANSFORM_FEEDBACK_WRITE_BIT_EXT, `srcStageMask` must include VK_PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkImageMemoryBarrier2-srcAccessMask-04747
  If `srcAccessMask` includes VK_ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT, `srcStageMask` must include VK_PIPELINE_STAGE_2_DRAW_INDIRECT_BIT, VK_PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkImageMemoryBarrier2-srcAccessMask-03922
  If `srcAccessMask` includes VK_ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT, `srcStageMask` must include VK_PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkImageMemoryBarrier2-srcAccessMask-03923
  If `srcAccessMask` includes VK_ACCESS_2_SHADING_RATE_IMAGE_READ_BIT_NV, `srcStageMask` must include VK_PIPELINE_STAGE_2_SHADING_RATE_IMAGE_BIT_NV, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkImageMemoryBarrier2-srcAccessMask-04994
  If `srcAccessMask` includes VK_ACCESS_2_INVOCATION_MASK_READ_BIT_HUAWEI, `srcStageMask` must include VK_PIPELINE_STAGE_2_INVOCATION_MASK_BIT_HUAWEI

- VUID-VkImageMemoryBarrier2-srcAccessMask-03924
  If `srcAccessMask` includes VK_ACCESS_2_COMMAND_PREPROCESS_READ_BIT_NV, `srcStageMask` must include VK_PIPELINE_STAGE_2_COMMAND_PREPROCESS_BIT_NV or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkImageMemoryBarrier2-srcAccessMask-03925
  If `srcAccessMask` includes VK_ACCESS_2_COMMAND_PREPROCESS_WRITE_BIT_NV, `srcStageMask` must include VK_PIPELINE_STAGE_2_COMMAND_PREPROCESS_BIT_NV or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkImageMemoryBarrier2-srcAccessMask-03926
  If `srcAccessMask` includes VK_ACCESS_2_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT, `srcStageMask` must include VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkImageMemoryBarrier2-srcAccessMask-03927
  If `srcAccessMask` includes VK_ACCESS_2_ACCELERATION_STRUCTURE_READ_BIT_KHR, and the `rayQuery` feature is enabled, `srcStageMask` must include VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR, one of the `VK_PIPELINE_STAGE_*_SHADER_BIT` stages, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkImageMemoryBarrier2-srcAccessMask-03928
  If `srcAccessMask` includes VK_ACCESS_2_ACCELERATION_STRUCTURE_WRITE_BIT_KHR, `srcStageMask` must include VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkImageMemoryBarrier2-srcAccessMask-06256
  If `srcAccessMask` includes VK_ACCESS_2_ACCELERATION_STRUCTURE_READ_BIT_KHR, and the `rayQuery` feature is not enabled, `srcStageMask` must include VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkImageMemoryBarrier2-srcAccessMask-07272
  If `srcAccessMask` includes VK_ACCESS_2_SHADER_BINDING_TABLE_READ_BIT_KHR, `srcStageMask` must include VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT or VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR

- VUID-VkImageMemoryBarrier2-srcAccessMask-04858
  If `srcAccessMask` includes VK_ACCESS_2_VIDEO_DECODE_READ_BIT_KHR, `srcStageMask` must include VK_PIPELINE_STAGE_2_VIDEO_DECODE_BIT_KHR

- VUID-VkImageMemoryBarrier2-srcAccessMask-04859
  If `srcAccessMask` includes VK_ACCESS_2_VIDEO_DECODE_WRITE_BIT_KHR, `srcStageMask` must include VK_PIPELINE_STAGE_2_VIDEO_DECODE_BIT_KHR

- VUID-VkImageMemoryBarrier2-srcAccessMask-04860
  If `srcAccessMask` includes VK_ACCESS_2_VIDEO_ENCODE_READ_BIT_KHR, `srcStageMask` must include VK_PIPELINE_STAGE_2_VIDEO_ENCODE_BIT_KHR

- VUID-VkImageMemoryBarrier2-srcAccessMask-04861
  If `srcAccessMask` includes VK_ACCESS_2_VIDEO_ENCODE_WRITE_BIT_KHR, `srcStageMask` must include VK_PIPELINE_STAGE_2_VIDEO_ENCODE_BIT_KHR

- VUID-VkImageMemoryBarrier2-srcAccessMask-07455
  If `srcAccessMask` includes VK_ACCESS_2_OPTICAL_FLOW_READ_BIT_NV, `srcStageMask` must include VK_PIPELINE_STAGE_2_OPTICAL_FLOW_BIT_NV

- VUID-VkImageMemoryBarrier2-srcAccessMask-07456
  If `srcAccessMask` includes VK_ACCESS_2_OPTICAL_FLOW_WRITE_BIT_NV, `srcStageMask` must include VK_PIPELINE_STAGE_2_OPTICAL_FLOW_BIT_NV

- VUID-VkImageMemoryBarrier2-srcAccessMask-07457
  If `srcAccessMask` includes VK_ACCESS_2_MICROMAP_WRITE_BIT_EXT, `srcStageMask` must include VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT

- VUID-VkImageMemoryBarrier2-srcAccessMask-07458
  If `srcAccessMask` includes VK_ACCESS_2_MICROMAP_READ_BIT_EXT, `srcStageMask` must include VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT or VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR

- VUID-VkImageMemoryBarrier2-srcAccessMask-08118
  If `srcAccessMask` includes VK_ACCESS_2_DESCRIPTOR_BUFFER_READ_BIT_EXT, `srcStageMask` must include VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, or one of `VK_PIPELINE_STAGE_*_SHADER_BIT` stages

- VUID-VkImageMemoryBarrier2-srcAccessMask-10670
  If `srcAccessMask` includes VK_ACCESS_2_SHADER_TILE_ATTACHMENT_READ_BIT_QCOM, `srcStageMask` must include VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT or VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT

- VUID-VkImageMemoryBarrier2-srcAccessMask-10671
  If `srcAccessMask` includes VK_ACCESS_2_SHADER_TILE_ATTACHMENT_WRITE_BIT_QCOM, `srcStageMask` must include VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT or VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT

- VUID-VkImageMemoryBarrier2-srcAccessMask-11771
  If `srcAccessMask` includes VK_ACCESS_2_MEMORY_DECOMPRESSION_READ_BIT_EXT, `srcStageMask` must include VK_PIPELINE_STAGE_2_MEMORY_DECOMPRESSION_BIT_EXT

- VUID-VkImageMemoryBarrier2-srcAccessMask-11772
  If `srcAccessMask` includes VK_ACCESS_2_MEMORY_DECOMPRESSION_WRITE_BIT_EXT, `srcStageMask` must include VK_PIPELINE_STAGE_2_MEMORY_DECOMPRESSION_BIT_EXT

- VUID-VkImageMemoryBarrier2-srcAccessMask-11294
  If `srcAccessMask` includes VK_ACCESS_2_SAMPLER_HEAP_READ_BIT_EXT or VK_ACCESS_2_RESOURCE_HEAP_READ_BIT_EXT, `srcStageMask` must include VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, or one of `VK_PIPELINE_STAGE_*_SHADER_BIT` stages

- VUID-VkImageMemoryBarrier2-dstStageMask-03929
  If the `geometryShader` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_2_GEOMETRY_SHADER_BIT

- VUID-VkImageMemoryBarrier2-dstStageMask-03930
  If the `tessellationShader` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT or VK_PIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT

- VUID-VkImageMemoryBarrier2-dstStageMask-03931
  If the `conditionalRendering` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_2_CONDITIONAL_RENDERING_BIT_EXT

- VUID-VkImageMemoryBarrier2-dstStageMask-03932
  If the `fragmentDensityMap` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_2_FRAGMENT_DENSITY_PROCESS_BIT_EXT

- VUID-VkImageMemoryBarrier2-dstStageMask-03933
  If the `transformFeedback` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT

- VUID-VkImageMemoryBarrier2-dstStageMask-03934
  If the `meshShader` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_2_MESH_SHADER_BIT_EXT

- VUID-VkImageMemoryBarrier2-dstStageMask-03935
  If the `taskShader` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_2_TASK_SHADER_BIT_EXT

- VUID-VkImageMemoryBarrier2-dstStageMask-07316
  If neither of the `shadingRateImage` or the `attachmentFragmentShadingRate` features are enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

- VUID-VkImageMemoryBarrier2-dstStageMask-04957
  If the `subpassShading` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_2_SUBPASS_SHADER_BIT_HUAWEI

- VUID-VkImageMemoryBarrier2-dstStageMask-04995
  If the `invocationMask` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_2_INVOCATION_MASK_BIT_HUAWEI

- VUID-VkImageMemoryBarrier2-dstStageMask-07946
  If neither the VK_NV_ray_tracing extension or the `rayTracingPipeline` feature are enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR

- VUID-VkImageMemoryBarrier2-dstStageMask-10751
  If the `accelerationStructure` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR

- VUID-VkImageMemoryBarrier2-dstStageMask-10752
  If the `rayTracingMaintenance1` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR

- VUID-VkImageMemoryBarrier2-dstStageMask-11541
  If the `VkPhysicalDeviceOpacityMicromapFeaturesEXT`::`micromap` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT

- VUID-VkImageMemoryBarrier2-dstAccessMask-03900
  If `dstAccessMask` includes VK_ACCESS_2_INDIRECT_COMMAND_READ_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_DRAW_INDIRECT_BIT, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, VK_PIPELINE_STAGE_2_COPY_INDIRECT_BIT_KHR, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkImageMemoryBarrier2-dstAccessMask-03901
  If `dstAccessMask` includes VK_ACCESS_2_INDEX_READ_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_INDEX_INPUT_BIT, VK_PIPELINE_STAGE_2_VERTEX_INPUT_BIT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkImageMemoryBarrier2-dstAccessMask-03902
  If `dstAccessMask` includes VK_ACCESS_2_VERTEX_ATTRIBUTE_READ_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_VERTEX_ATTRIBUTE_INPUT_BIT, VK_PIPELINE_STAGE_2_VERTEX_INPUT_BIT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkImageMemoryBarrier2-dstAccessMask-03903
  If `dstAccessMask` includes VK_ACCESS_2_INPUT_ATTACHMENT_READ_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT, VK_PIPELINE_STAGE_2_SUBPASS_SHADER_BIT_HUAWEI, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkImageMemoryBarrier2-dstAccessMask-03904
  If `dstAccessMask` includes VK_ACCESS_2_UNIFORM_READ_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, or one of the `VK_PIPELINE_STAGE_*_SHADER_BIT` stages

- VUID-VkImageMemoryBarrier2-dstAccessMask-03905
  If `dstAccessMask` includes VK_ACCESS_2_SHADER_SAMPLED_READ_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, or one of the `VK_PIPELINE_STAGE_*_SHADER_BIT` stages

- VUID-VkImageMemoryBarrier2-dstAccessMask-03906
  If `dstAccessMask` includes VK_ACCESS_2_SHADER_STORAGE_READ_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, or one of the `VK_PIPELINE_STAGE_*_SHADER_BIT` stages

- VUID-VkImageMemoryBarrier2-dstAccessMask-03907
  If `dstAccessMask` includes VK_ACCESS_2_SHADER_STORAGE_WRITE_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, or one of the `VK_PIPELINE_STAGE_*_SHADER_BIT` stages

- VUID-VkImageMemoryBarrier2-dstAccessMask-07454
  If `dstAccessMask` includes VK_ACCESS_2_SHADER_READ_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT, or one of the `VK_PIPELINE_STAGE_*_SHADER_BIT` stages

- VUID-VkImageMemoryBarrier2-dstAccessMask-03909
  If `dstAccessMask` includes VK_ACCESS_2_SHADER_WRITE_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, or one of the `VK_PIPELINE_STAGE_*_SHADER_BIT` stages

- VUID-VkImageMemoryBarrier2-dstAccessMask-03910
  If `dstAccessMask` includes VK_ACCESS_2_COLOR_ATTACHMENT_READ_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkImageMemoryBarrier2-dstAccessMask-03911
  If `dstAccessMask` includes VK_ACCESS_2_COLOR_ATTACHMENT_WRITE_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkImageMemoryBarrier2-dstAccessMask-03912
  If `dstAccessMask` includes VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_READ_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_EARLY_FRAGMENT_TESTS_BIT, VK_PIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkImageMemoryBarrier2-dstAccessMask-03913
  If `dstAccessMask` includes VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_EARLY_FRAGMENT_TESTS_BIT, VK_PIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkImageMemoryBarrier2-dstAccessMask-03914
  If `dstAccessMask` includes VK_ACCESS_2_TRANSFER_READ_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_COPY_BIT, VK_PIPELINE_STAGE_2_BLIT_BIT, VK_PIPELINE_STAGE_2_RESOLVE_BIT, VK_PIPELINE_STAGE_2_ALL_TRANSFER_BIT, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR, VK_PIPELINE_STAGE_2_CONVERT_COOPERATIVE_VECTOR_MATRIX_BIT_NV, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkImageMemoryBarrier2-dstAccessMask-03915
  If `dstAccessMask` includes VK_ACCESS_2_TRANSFER_WRITE_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_COPY_BIT, VK_PIPELINE_STAGE_2_BLIT_BIT, VK_PIPELINE_STAGE_2_RESOLVE_BIT, VK_PIPELINE_STAGE_2_CLEAR_BIT, VK_PIPELINE_STAGE_2_ALL_TRANSFER_BIT, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR, VK_PIPELINE_STAGE_2_CONVERT_COOPERATIVE_VECTOR_MATRIX_BIT_NV, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkImageMemoryBarrier2-dstAccessMask-03916
  If `dstAccessMask` includes VK_ACCESS_2_HOST_READ_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_HOST_BIT

- VUID-VkImageMemoryBarrier2-dstAccessMask-03917
  If `dstAccessMask` includes VK_ACCESS_2_HOST_WRITE_BIT, `dstStageMask` must include VK_PIPELINE_STAGE_2_HOST_BIT

- VUID-VkImageMemoryBarrier2-dstAccessMask-03918
  If `dstAccessMask` includes VK_ACCESS_2_CONDITIONAL_RENDERING_READ_BIT_EXT, `dstStageMask` must include VK_PIPELINE_STAGE_2_CONDITIONAL_RENDERING_BIT_EXT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkImageMemoryBarrier2-dstAccessMask-03919
  If `dstAccessMask` includes VK_ACCESS_2_FRAGMENT_DENSITY_MAP_READ_BIT_EXT, `dstStageMask` must include VK_PIPELINE_STAGE_2_FRAGMENT_DENSITY_PROCESS_BIT_EXT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkImageMemoryBarrier2-dstAccessMask-03920
  If `dstAccessMask` includes VK_ACCESS_2_TRANSFORM_FEEDBACK_WRITE_BIT_EXT, `dstStageMask` must include VK_PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkImageMemoryBarrier2-dstAccessMask-04747
  If `dstAccessMask` includes VK_ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT, `dstStageMask` must include VK_PIPELINE_STAGE_2_DRAW_INDIRECT_BIT, VK_PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkImageMemoryBarrier2-dstAccessMask-03922
  If `dstAccessMask` includes VK_ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT, `dstStageMask` must include VK_PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkImageMemoryBarrier2-dstAccessMask-03923
  If `dstAccessMask` includes VK_ACCESS_2_SHADING_RATE_IMAGE_READ_BIT_NV, `dstStageMask` must include VK_PIPELINE_STAGE_2_SHADING_RATE_IMAGE_BIT_NV, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkImageMemoryBarrier2-dstAccessMask-04994
  If `dstAccessMask` includes VK_ACCESS_2_INVOCATION_MASK_READ_BIT_HUAWEI, `dstStageMask` must include VK_PIPELINE_STAGE_2_INVOCATION_MASK_BIT_HUAWEI

- VUID-VkImageMemoryBarrier2-dstAccessMask-03924
  If `dstAccessMask` includes VK_ACCESS_2_COMMAND_PREPROCESS_READ_BIT_NV, `dstStageMask` must include VK_PIPELINE_STAGE_2_COMMAND_PREPROCESS_BIT_NV or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkImageMemoryBarrier2-dstAccessMask-03925
  If `dstAccessMask` includes VK_ACCESS_2_COMMAND_PREPROCESS_WRITE_BIT_NV, `dstStageMask` must include VK_PIPELINE_STAGE_2_COMMAND_PREPROCESS_BIT_NV or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkImageMemoryBarrier2-dstAccessMask-03926
  If `dstAccessMask` includes VK_ACCESS_2_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT, `dstStageMask` must include VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkImageMemoryBarrier2-dstAccessMask-03927
  If `dstAccessMask` includes VK_ACCESS_2_ACCELERATION_STRUCTURE_READ_BIT_KHR, and the `rayQuery` feature is enabled, `dstStageMask` must include VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR, one of the `VK_PIPELINE_STAGE_*_SHADER_BIT` stages, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkImageMemoryBarrier2-dstAccessMask-03928
  If `dstAccessMask` includes VK_ACCESS_2_ACCELERATION_STRUCTURE_WRITE_BIT_KHR, `dstStageMask` must include VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkImageMemoryBarrier2-dstAccessMask-06256
  If `dstAccessMask` includes VK_ACCESS_2_ACCELERATION_STRUCTURE_READ_BIT_KHR, and the `rayQuery` feature is not enabled, `dstStageMask` must include VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR, or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT

- VUID-VkImageMemoryBarrier2-dstAccessMask-07272
  If `dstAccessMask` includes VK_ACCESS_2_SHADER_BINDING_TABLE_READ_BIT_KHR, `dstStageMask` must include VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT or VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR

- VUID-VkImageMemoryBarrier2-dstAccessMask-04858
  If `dstAccessMask` includes VK_ACCESS_2_VIDEO_DECODE_READ_BIT_KHR, `dstStageMask` must include VK_PIPELINE_STAGE_2_VIDEO_DECODE_BIT_KHR

- VUID-VkImageMemoryBarrier2-dstAccessMask-04859
  If `dstAccessMask` includes VK_ACCESS_2_VIDEO_DECODE_WRITE_BIT_KHR, `dstStageMask` must include VK_PIPELINE_STAGE_2_VIDEO_DECODE_BIT_KHR

- VUID-VkImageMemoryBarrier2-dstAccessMask-04860
  If `dstAccessMask` includes VK_ACCESS_2_VIDEO_ENCODE_READ_BIT_KHR, `dstStageMask` must include VK_PIPELINE_STAGE_2_VIDEO_ENCODE_BIT_KHR

- VUID-VkImageMemoryBarrier2-dstAccessMask-04861
  If `dstAccessMask` includes VK_ACCESS_2_VIDEO_ENCODE_WRITE_BIT_KHR, `dstStageMask` must include VK_PIPELINE_STAGE_2_VIDEO_ENCODE_BIT_KHR

- VUID-VkImageMemoryBarrier2-dstAccessMask-07455
  If `dstAccessMask` includes VK_ACCESS_2_OPTICAL_FLOW_READ_BIT_NV, `dstStageMask` must include VK_PIPELINE_STAGE_2_OPTICAL_FLOW_BIT_NV

- VUID-VkImageMemoryBarrier2-dstAccessMask-07456
  If `dstAccessMask` includes VK_ACCESS_2_OPTICAL_FLOW_WRITE_BIT_NV, `dstStageMask` must include VK_PIPELINE_STAGE_2_OPTICAL_FLOW_BIT_NV

- VUID-VkImageMemoryBarrier2-dstAccessMask-07457
  If `dstAccessMask` includes VK_ACCESS_2_MICROMAP_WRITE_BIT_EXT, `dstStageMask` must include VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT

- VUID-VkImageMemoryBarrier2-dstAccessMask-07458
  If `dstAccessMask` includes VK_ACCESS_2_MICROMAP_READ_BIT_EXT, `dstStageMask` must include VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT or VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR

- VUID-VkImageMemoryBarrier2-dstAccessMask-08118
  If `dstAccessMask` includes VK_ACCESS_2_DESCRIPTOR_BUFFER_READ_BIT_EXT, `dstStageMask` must include VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, or one of `VK_PIPELINE_STAGE_*_SHADER_BIT` stages

- VUID-VkImageMemoryBarrier2-dstAccessMask-10670
  If `dstAccessMask` includes VK_ACCESS_2_SHADER_TILE_ATTACHMENT_READ_BIT_QCOM, `dstStageMask` must include VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT or VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT

- VUID-VkImageMemoryBarrier2-dstAccessMask-10671
  If `dstAccessMask` includes VK_ACCESS_2_SHADER_TILE_ATTACHMENT_WRITE_BIT_QCOM, `dstStageMask` must include VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT or VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT

- VUID-VkImageMemoryBarrier2-dstAccessMask-11771
  If `dstAccessMask` includes VK_ACCESS_2_MEMORY_DECOMPRESSION_READ_BIT_EXT, `dstStageMask` must include VK_PIPELINE_STAGE_2_MEMORY_DECOMPRESSION_BIT_EXT

- VUID-VkImageMemoryBarrier2-dstAccessMask-11772
  If `dstAccessMask` includes VK_ACCESS_2_MEMORY_DECOMPRESSION_WRITE_BIT_EXT, `dstStageMask` must include VK_PIPELINE_STAGE_2_MEMORY_DECOMPRESSION_BIT_EXT

- VUID-VkImageMemoryBarrier2-dstAccessMask-11294
  If `dstAccessMask` includes VK_ACCESS_2_SAMPLER_HEAP_READ_BIT_EXT or VK_ACCESS_2_RESOURCE_HEAP_READ_BIT_EXT, `dstStageMask` must include VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, or one of `VK_PIPELINE_STAGE_*_SHADER_BIT` stages

- VUID-VkImageMemoryBarrier2-oldLayout-01197
  If layouts are not ignored, `oldLayout` must be VK_IMAGE_LAYOUT_UNDEFINED or the current layout of the image subresources affected by the barrier

- VUID-VkImageMemoryBarrier2-newLayout-01198
  If layouts are not ignored, `newLayout` must not be VK_IMAGE_LAYOUT_UNDEFINED or VK_IMAGE_LAYOUT_ZERO_INITIALIZED_EXT or VK_IMAGE_LAYOUT_PREINITIALIZED

- VUID-VkImageMemoryBarrier2-image-09117
  If `image` was created with a sharing mode of VK_SHARING_MODE_EXCLUSIVE, and `srcQueueFamilyIndex` and `dstQueueFamilyIndex` are not equal, `srcQueueFamilyIndex` must be VK_QUEUE_FAMILY_EXTERNAL, VK_QUEUE_FAMILY_FOREIGN_EXT, or a valid queue family

- VUID-VkImageMemoryBarrier2-image-09118
  If `image` was created with a sharing mode of VK_SHARING_MODE_EXCLUSIVE, and `srcQueueFamilyIndex` and `dstQueueFamilyIndex` are not equal, `dstQueueFamilyIndex` must be VK_QUEUE_FAMILY_EXTERNAL, VK_QUEUE_FAMILY_FOREIGN_EXT, or a valid queue family

- VUID-VkImageMemoryBarrier2-None-09097
  If the VK_KHR_external_memory extension is not enabled, and the value of VkApplicationInfo::`apiVersion` used to create the VkInstance is not greater than or equal to Version 1.1, `srcQueueFamilyIndex` must not be VK_QUEUE_FAMILY_EXTERNAL

- VUID-VkImageMemoryBarrier2-None-09098
  If the VK_KHR_external_memory extension is not enabled, and the value of VkApplicationInfo::`apiVersion` used to create the VkInstance is not greater than or equal to Version 1.1, `dstQueueFamilyIndex` must not be VK_QUEUE_FAMILY_EXTERNAL

- VUID-VkImageMemoryBarrier2-srcQueueFamilyIndex-09099
  If the VK_EXT_queue_family_foreign extension is not enabled `srcQueueFamilyIndex` must not be VK_QUEUE_FAMILY_FOREIGN_EXT

- VUID-VkImageMemoryBarrier2-dstQueueFamilyIndex-09100
  If the VK_EXT_queue_family_foreign extension is not enabled `dstQueueFamilyIndex` must not be VK_QUEUE_FAMILY_FOREIGN_EXT

- VUID-VkImageMemoryBarrier2-subresourceRange-01486
  `subresourceRange.baseMipLevel` must be less than the `mipLevels` specified in VkImageCreateInfo when `image` was created

- VUID-VkImageMemoryBarrier2-subresourceRange-01724
  If `subresourceRange.levelCount` is not VK_REMAINING_MIP_LEVELS, `subresourceRange.baseMipLevel` + `subresourceRange.levelCount` must be less than or equal to the `mipLevels` specified in VkImageCreateInfo when `image` was created

- VUID-VkImageMemoryBarrier2-subresourceRange-01488
  If `image` is not a 3D image or was created without VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT set, or the `maintenance9` feature is not enabled, `subresourceRange.baseArrayLayer` must be less than the `arrayLayers` specified in VkImageCreateInfo when `image` was created

- VUID-VkImageMemoryBarrier2-maintenance9-10798
  If the `maintenance9` feature is enabled and `image` is a 3D image created with VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT set, `subresourceRange.baseArrayLayer` must be less than the depth computed from `baseMipLevel` and `extent.depth` specified in VkImageCreateInfo when `image` was created, according to the formula defined in Image Mip Level Sizing

- VUID-VkImageMemoryBarrier2-maintenance9-10799
  If the `maintenance9` feature is enabled and `image` is a 3D image created with VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT set and either `subresourceRange.baseArrayLayer` is not equal to 0 or `subresourceRange.layerCount` is not equal to VK_REMAINING_ARRAY_LAYERS, `subresourceRange.levelCount` must be 1

- VUID-VkImageMemoryBarrier2-subresourceRange-01725
  If `image` is not a 3D image or was created without VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT set, or the `maintenance9` feature is not enabled, and `subresourceRange.layerCount` is not VK_REMAINING_ARRAY_LAYERS, `subresourceRange.baseArrayLayer` + `subresourceRange.layerCount` must be less than or equal to the `arrayLayers` specified in VkImageCreateInfo when `image` was created

- VUID-VkImageMemoryBarrier2-maintenance9-10800
  If the `maintenance9` feature is enabled, `subresourceRange.layerCount` is not VK_REMAINING_ARRAY_LAYERS, and `image` is a 3D image created with VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT set, `subresourceRange.baseArrayLayer` + `subresourceRange.layerCount` must be less than or equal to the depth computed from `baseMipLevel` and `extent.depth` specified in VkImageCreateInfo when `image` was created, according to the formula defined in Image Mip Level Sizing

- VUID-VkImageMemoryBarrier2-image-01932
  If `image` is non-sparse then the image or each specified disjoint plane must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-VkImageMemoryBarrier2-image-09241
  If `image` has a color format that is single-plane, then the `aspectMask` member of `subresourceRange` must be VK_IMAGE_ASPECT_COLOR_BIT

- VUID-VkImageMemoryBarrier2-image-09242
  If `image` has a color format and is not disjoint, then the `aspectMask` member of `subresourceRange` must be VK_IMAGE_ASPECT_COLOR_BIT

- VUID-VkImageMemoryBarrier2-image-01672
  If `image` has a multi-planar format and the image is disjoint, then the `aspectMask` member of `subresourceRange` must include at least one multi-planar aspect mask bit or VK_IMAGE_ASPECT_COLOR_BIT

- VUID-VkImageMemoryBarrier2-image-03320
  If `image` has a depth/stencil format with both depth and stencil and the `separateDepthStencilLayouts` feature is not enabled, then the `aspectMask` member of `subresourceRange` must include both VK_IMAGE_ASPECT_DEPTH_BIT and VK_IMAGE_ASPECT_STENCIL_BIT

- VUID-VkImageMemoryBarrier2-image-03319
  If `image` has a depth/stencil format with both depth and stencil and the `separateDepthStencilLayouts` feature is enabled, then the `aspectMask` member of `subresourceRange` must include either or both VK_IMAGE_ASPECT_DEPTH_BIT and VK_IMAGE_ASPECT_STENCIL_BIT

- VUID-VkImageMemoryBarrier2-image-10749
  If `image` has a depth-only format then the `aspectMask` member of `subresourceRange` must be VK_IMAGE_ASPECT_DEPTH_BIT

- VUID-VkImageMemoryBarrier2-image-10750
  If `image` has a stencil-only format then the `aspectMask` member of `subresourceRange` must be VK_IMAGE_ASPECT_STENCIL_BIT

- VUID-VkImageMemoryBarrier2-aspectMask-08702
  If the `aspectMask` member of `subresourceRange` includes VK_IMAGE_ASPECT_DEPTH_BIT, `oldLayout` and `newLayout` must not be one of VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL or VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL

- VUID-VkImageMemoryBarrier2-aspectMask-08703
  If the `aspectMask` member of `subresourceRange` includes VK_IMAGE_ASPECT_STENCIL_BIT, `oldLayout` and `newLayout` must not be one of VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL or VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL

- VUID-VkImageMemoryBarrier2-subresourceRange-09601
  `subresourceRange.aspectMask` must be valid for the `format` the `image` was created with

- VUID-VkImageMemoryBarrier2-oldLayout-01208
  If layouts are not ignored, `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL then `image` must have been created with the VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT usage flag set

- VUID-VkImageMemoryBarrier2-oldLayout-01209
  If layouts are not ignored, `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL then `image` must have been created with the VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT usage flag set

- VUID-VkImageMemoryBarrier2-oldLayout-01210
  If layouts are not ignored, `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL then `image` must have been created with the VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT usage flag set

- VUID-VkImageMemoryBarrier2-oldLayout-01211
  If layouts are not ignored, `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL then `image` must have been created with the VK_IMAGE_USAGE_SAMPLED_BIT or VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT usage flag set

- VUID-VkImageMemoryBarrier2-oldLayout-01212
  If layouts are not ignored, `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL then `image` must have been created with the VK_IMAGE_USAGE_TRANSFER_SRC_BIT usage flag set

- VUID-VkImageMemoryBarrier2-oldLayout-01213
  If layouts are not ignored, `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL then `image` must have been created with the VK_IMAGE_USAGE_TRANSFER_DST_BIT usage flag set

- VUID-VkImageMemoryBarrier2-oldLayout-10767
  If the zeroInitializeDeviceMemory feature is not enabled, `oldLayout` must not be VK_IMAGE_LAYOUT_ZERO_INITIALIZED_EXT

- VUID-VkImageMemoryBarrier2-oldLayout-10768
  If `oldLayout` is VK_IMAGE_LAYOUT_ZERO_INITIALIZED_EXT, then all subresources must be included in the barrier

- VUID-VkImageMemoryBarrier2-oldLayout-01658
  If layouts are not ignored, `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL then `image` must have been created with the VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT usage flag set

- VUID-VkImageMemoryBarrier2-oldLayout-01659
  If layouts are not ignored, `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL then `image` must have been created with the VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT usage flag set

- VUID-VkImageMemoryBarrier2-srcQueueFamilyIndex-04065
  If layouts are not ignored, `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL then `image` must have been created with at least one of the VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, VK_IMAGE_USAGE_SAMPLED_BIT, or VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT usage flags set

- VUID-VkImageMemoryBarrier2-srcQueueFamilyIndex-04066
  If layouts are not ignored, `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL then `image` must have been created with the VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT usage flag set

- VUID-VkImageMemoryBarrier2-srcQueueFamilyIndex-04067
  If layouts are not ignored, `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL then `image` must have been created with at least one of the VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, VK_IMAGE_USAGE_SAMPLED_BIT, or VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT usage flags set

- VUID-VkImageMemoryBarrier2-srcQueueFamilyIndex-04068
  If layouts are not ignored, `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL then `image` must have been created with the VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT usage flag set

- VUID-VkImageMemoryBarrier2-synchronization2-07793
  If the `synchronization2` feature is not enabled, `oldLayout` must not be VK_IMAGE_LAYOUT_ATTACHMENT_OPTIMAL_KHR or VK_IMAGE_LAYOUT_READ_ONLY_OPTIMAL_KHR

- VUID-VkImageMemoryBarrier2-synchronization2-07794
  If the `synchronization2` feature is not enabled, `newLayout` must not be VK_IMAGE_LAYOUT_ATTACHMENT_OPTIMAL_KHR or VK_IMAGE_LAYOUT_READ_ONLY_OPTIMAL_KHR

- VUID-VkImageMemoryBarrier2-srcQueueFamilyIndex-03938
  If layouts are not ignored, `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_ATTACHMENT_OPTIMAL, `image` must have been created with the VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT or VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT usage flag set

- VUID-VkImageMemoryBarrier2-srcQueueFamilyIndex-03939
  If layouts are not ignored, `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_READ_ONLY_OPTIMAL, `image` must have been created with at least one of the VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, VK_IMAGE_USAGE_SAMPLED_BIT, or VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT usage flags set

- VUID-VkImageMemoryBarrier2-oldLayout-02088
  If layouts are not ignored, `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_FRAGMENT_SHADING_RATE_ATTACHMENT_OPTIMAL_KHR then `image` must have been created with the VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR usage flag set

- VUID-VkImageMemoryBarrier2-srcQueueFamilyIndex-07120
  If layouts are not ignored, `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_VIDEO_DECODE_SRC_KHR then `image` must have been created with the VK_IMAGE_USAGE_VIDEO_DECODE_SRC_BIT_KHR usage flag set

- VUID-VkImageMemoryBarrier2-srcQueueFamilyIndex-07121
  If layouts are not ignored, `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_VIDEO_DECODE_DST_KHR then `image` must have been created with the VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR usage flag set

- VUID-VkImageMemoryBarrier2-srcQueueFamilyIndex-07122
  If layouts are not ignored, `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_VIDEO_DECODE_DPB_KHR then `image` must have been created with the VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR usage flag set

- VUID-VkImageMemoryBarrier2-srcQueueFamilyIndex-07123
  If layouts are not ignored, `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_VIDEO_ENCODE_SRC_KHR then `image` must have been created with the VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR usage flag set

- VUID-VkImageMemoryBarrier2-srcQueueFamilyIndex-07124
  If layouts are not ignored, `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_VIDEO_ENCODE_DST_KHR then `image` must have been created with the VK_IMAGE_USAGE_VIDEO_ENCODE_DST_BIT_KHR usage flag set

- VUID-VkImageMemoryBarrier2-srcQueueFamilyIndex-07125
  If layouts are not ignored, `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_VIDEO_ENCODE_DPB_KHR then `image` must have been created with the VK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR usage flag set

- VUID-VkImageMemoryBarrier2-srcQueueFamilyIndex-10287
  If layouts are not ignored, `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_VIDEO_ENCODE_QUANTIZATION_MAP_KHR then `image` must have been created with the VK_IMAGE_USAGE_VIDEO_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR or VK_IMAGE_USAGE_VIDEO_ENCODE_EMPHASIS_MAP_BIT_KHR usage flags set

- VUID-VkImageMemoryBarrier2-srcQueueFamilyIndex-07006
  If layouts are not ignored, `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT then `image` must have been created with either the VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT or VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT usage flags set, and the VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT or VK_IMAGE_USAGE_SAMPLED_BIT usage flags set, and the VK_IMAGE_USAGE_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT usage flag set

- VUID-VkImageMemoryBarrier2-attachmentFeedbackLoopLayout-07313
  If the `attachmentFeedbackLoopLayout` feature is not enabled, `newLayout` must not be VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT

- VUID-VkImageMemoryBarrier2-srcQueueFamilyIndex-09550
  If layouts are not ignored, `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_RENDERING_LOCAL_READ then `image` must have been created with either the VK_IMAGE_USAGE_STORAGE_BIT usage flag set, or with both the VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT usage flag and either of the VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT or VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT usage flags set

- VUID-VkImageMemoryBarrier2-dynamicRenderingLocalRead-09551
  If the `dynamicRenderingLocalRead` feature is not enabled, `oldLayout` must not be VK_IMAGE_LAYOUT_RENDERING_LOCAL_READ

- VUID-VkImageMemoryBarrier2-dynamicRenderingLocalRead-09552
  If the `dynamicRenderingLocalRead` feature is not enabled, `newLayout` must not be VK_IMAGE_LAYOUT_RENDERING_LOCAL_READ

- VUID-VkImageMemoryBarrier2-srcStageMask-03854
  If either `srcStageMask` or `dstStageMask` includes VK_PIPELINE_STAGE_2_HOST_BIT, `srcQueueFamilyIndex` and `dstQueueFamilyIndex` must be equal

- VUID-VkImageMemoryBarrier2-srcStageMask-03855
  If `srcStageMask` includes VK_PIPELINE_STAGE_2_HOST_BIT, and `srcQueueFamilyIndex` and `dstQueueFamilyIndex` define a queue family ownership transfer or `oldLayout` and `newLayout` define an image layout transition, `oldLayout` must be one of VK_IMAGE_LAYOUT_PREINITIALIZED, VK_IMAGE_LAYOUT_ZERO_INITIALIZED_EXT, VK_IMAGE_LAYOUT_UNDEFINED, or VK_IMAGE_LAYOUT_GENERAL

Valid Usage (Implicit)

- VUID-VkImageMemoryBarrier2-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER_2

- VUID-VkImageMemoryBarrier2-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkExternalMemoryAcquireUnmodifiedEXT, VkMemoryBarrierAccessFlags3KHR, or VkSampleLocationsInfoEXT

- VUID-VkImageMemoryBarrier2-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkImageMemoryBarrier2-srcStageMask-parameter
  `srcStageMask` must be a valid combination of VkPipelineStageFlagBits2 values

- VUID-VkImageMemoryBarrier2-srcAccessMask-parameter
  `srcAccessMask` must be a valid combination of VkAccessFlagBits2 values

- VUID-VkImageMemoryBarrier2-dstStageMask-parameter
  `dstStageMask` must be a valid combination of VkPipelineStageFlagBits2 values

- VUID-VkImageMemoryBarrier2-dstAccessMask-parameter
  `dstAccessMask` must be a valid combination of VkAccessFlagBits2 values

- VUID-VkImageMemoryBarrier2-oldLayout-parameter
  `oldLayout` must be a valid VkImageLayout value

- VUID-VkImageMemoryBarrier2-newLayout-parameter
  `newLayout` must be a valid VkImageLayout value

- VUID-VkImageMemoryBarrier2-image-parameter
  `image` must be a valid VkImage handle

- VUID-VkImageMemoryBarrier2-subresourceRange-parameter
  `subresourceRange` must be a valid VkImageSubresourceRange structure

The `VkImageMemoryBarrier` structure is defined as:

Warning | This functionality is superseded by VkImageMemoryBarrier2. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_0
    typedef struct VkImageMemoryBarrier {
        VkStructureType            sType;
        const void*                pNext;
        VkAccessFlags              srcAccessMask;
        VkAccessFlags              dstAccessMask;
        VkImageLayout              oldLayout;
        VkImageLayout              newLayout;
        uint32_t                   srcQueueFamilyIndex;
        uint32_t                   dstQueueFamilyIndex;
        VkImage                    image;
        VkImageSubresourceRange    subresourceRange;
    } VkImageMemoryBarrier;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `srcAccessMask` is a bitmask of VkAccessFlagBits specifying a source access mask.

- `dstAccessMask` is a bitmask of VkAccessFlagBits specifying a destination access mask.

- `oldLayout` is the old layout in an image layout transition.

- `newLayout` is the new layout in an image layout transition.

- `srcQueueFamilyIndex` is the source queue family for a queue family ownership transfer.

- `dstQueueFamilyIndex` is the destination queue family for a queue family ownership transfer.

- `image` is a handle to the image affected by this barrier.

- `subresourceRange` describes the image subresource range within `image` that is affected by this barrier.

The first access scope is limited to access to memory through the specified image subresource range, via access types in the source access mask specified by `srcAccessMask`. If `srcAccessMask` includes VK_ACCESS_HOST_WRITE_BIT, memory writes performed by that access type are also made visible, as that access type is not performed through a resource.

The second access scope is limited to access to memory through the specified image subresource range, via access types in the destination access mask specified by `dstAccessMask`. If `dstAccessMask` includes VK_ACCESS_HOST_WRITE_BIT or VK_ACCESS_HOST_READ_BIT, available memory writes are also made visible to accesses of those types, as those access types are not performed through a resource.

If `srcQueueFamilyIndex` is not equal to `dstQueueFamilyIndex`, and `srcQueueFamilyIndex` is equal to the current queue family, then the memory barrier defines a queue family release operation for the specified image subresource range, and if `dependencyFlags` did not include VK_DEPENDENCY_QUEUE_FAMILY_OWNERSHIP_TRANSFER_USE_ALL_STAGES_BIT_KHR, the second synchronization scope of the calling command does not apply to this operation.

If `dstQueueFamilyIndex` is not equal to `srcQueueFamilyIndex`, and `dstQueueFamilyIndex` is equal to the current queue family, then the memory barrier defines a queue family acquire operation for the specified image subresource range, and if `dependencyFlags` did not include VK_DEPENDENCY_QUEUE_FAMILY_OWNERSHIP_TRANSFER_USE_ALL_STAGES_BIT_KHR, the first synchronization scope of the calling command does not apply to this operation.

If the `synchronization2` feature is not enabled or `oldLayout` is not equal to `newLayout`, `oldLayout` and `newLayout` define an image layout transition for the specified image subresource range.

If the `synchronization2` feature is enabled, `srcQueueFamilyIndex` and `dstQueueFamilyIndex` are equal, and `oldLayout` and `newLayout` are also equal, the layout values are ignored and the image contents are preserved regardless of the values of `oldLayout`, `newLayout`, and the current layout of the image.

If `image` is a 3D image created with VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT and the `maintenance9` feature is enabled, the `baseArrayLayer` and `layerCount` members of `subresourceRange` specify the subset of slices of the 3D image affected by the memory barrier, including the layout transition. Any slices of a 3D image not included in `subresourceRange` are not affected by the memory barrier and remain in their existing layout.

If `image` has a multi-planar format and the image is disjoint, then including VK_IMAGE_ASPECT_COLOR_BIT in the `aspectMask` member of `subresourceRange` is equivalent to including VK_IMAGE_ASPECT_PLANE_0_BIT, VK_IMAGE_ASPECT_PLANE_1_BIT, and (for three-plane formats only) VK_IMAGE_ASPECT_PLANE_2_BIT.

Valid Usage

- VUID-VkImageMemoryBarrier-oldLayout-01197
  If layouts are not ignored, `oldLayout` must be VK_IMAGE_LAYOUT_UNDEFINED or the current layout of the image subresources affected by the barrier

- VUID-VkImageMemoryBarrier-newLayout-01198
  If layouts are not ignored, `newLayout` must not be VK_IMAGE_LAYOUT_UNDEFINED or VK_IMAGE_LAYOUT_ZERO_INITIALIZED_EXT or VK_IMAGE_LAYOUT_PREINITIALIZED

- VUID-VkImageMemoryBarrier-image-09117
  If `image` was created with a sharing mode of VK_SHARING_MODE_EXCLUSIVE, and `srcQueueFamilyIndex` and `dstQueueFamilyIndex` are not equal, `srcQueueFamilyIndex` must be VK_QUEUE_FAMILY_EXTERNAL, VK_QUEUE_FAMILY_FOREIGN_EXT, or a valid queue family

- VUID-VkImageMemoryBarrier-image-09118
  If `image` was created with a sharing mode of VK_SHARING_MODE_EXCLUSIVE, and `srcQueueFamilyIndex` and `dstQueueFamilyIndex` are not equal, `dstQueueFamilyIndex` must be VK_QUEUE_FAMILY_EXTERNAL, VK_QUEUE_FAMILY_FOREIGN_EXT, or a valid queue family

- VUID-VkImageMemoryBarrier-None-09097
  If the VK_KHR_external_memory extension is not enabled, and the value of VkApplicationInfo::`apiVersion` used to create the VkInstance is not greater than or equal to Version 1.1, `srcQueueFamilyIndex` must not be VK_QUEUE_FAMILY_EXTERNAL

- VUID-VkImageMemoryBarrier-None-09098
  If the VK_KHR_external_memory extension is not enabled, and the value of VkApplicationInfo::`apiVersion` used to create the VkInstance is not greater than or equal to Version 1.1, `dstQueueFamilyIndex` must not be VK_QUEUE_FAMILY_EXTERNAL

- VUID-VkImageMemoryBarrier-srcQueueFamilyIndex-09099
  If the VK_EXT_queue_family_foreign extension is not enabled `srcQueueFamilyIndex` must not be VK_QUEUE_FAMILY_FOREIGN_EXT

- VUID-VkImageMemoryBarrier-dstQueueFamilyIndex-09100
  If the VK_EXT_queue_family_foreign extension is not enabled `dstQueueFamilyIndex` must not be VK_QUEUE_FAMILY_FOREIGN_EXT

- VUID-VkImageMemoryBarrier-subresourceRange-01486
  `subresourceRange.baseMipLevel` must be less than the `mipLevels` specified in VkImageCreateInfo when `image` was created

- VUID-VkImageMemoryBarrier-subresourceRange-01724
  If `subresourceRange.levelCount` is not VK_REMAINING_MIP_LEVELS, `subresourceRange.baseMipLevel` + `subresourceRange.levelCount` must be less than or equal to the `mipLevels` specified in VkImageCreateInfo when `image` was created

- VUID-VkImageMemoryBarrier-subresourceRange-01488
  If `image` is not a 3D image or was created without VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT set, or the `maintenance9` feature is not enabled, `subresourceRange.baseArrayLayer` must be less than the `arrayLayers` specified in VkImageCreateInfo when `image` was created

- VUID-VkImageMemoryBarrier-maintenance9-10798
  If the `maintenance9` feature is enabled and `image` is a 3D image created with VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT set, `subresourceRange.baseArrayLayer` must be less than the depth computed from `baseMipLevel` and `extent.depth` specified in VkImageCreateInfo when `image` was created, according to the formula defined in Image Mip Level Sizing

- VUID-VkImageMemoryBarrier-maintenance9-10799
  If the `maintenance9` feature is enabled and `image` is a 3D image created with VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT set and either `subresourceRange.baseArrayLayer` is not equal to 0 or `subresourceRange.layerCount` is not equal to VK_REMAINING_ARRAY_LAYERS, `subresourceRange.levelCount` must be 1

- VUID-VkImageMemoryBarrier-subresourceRange-01725
  If `image` is not a 3D image or was created without VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT set, or the `maintenance9` feature is not enabled, and `subresourceRange.layerCount` is not VK_REMAINING_ARRAY_LAYERS, `subresourceRange.baseArrayLayer` + `subresourceRange.layerCount` must be less than or equal to the `arrayLayers` specified in VkImageCreateInfo when `image` was created

- VUID-VkImageMemoryBarrier-maintenance9-10800
  If the `maintenance9` feature is enabled, `subresourceRange.layerCount` is not VK_REMAINING_ARRAY_LAYERS, and `image` is a 3D image created with VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT set, `subresourceRange.baseArrayLayer` + `subresourceRange.layerCount` must be less than or equal to the depth computed from `baseMipLevel` and `extent.depth` specified in VkImageCreateInfo when `image` was created, according to the formula defined in Image Mip Level Sizing

- VUID-VkImageMemoryBarrier-image-01932
  If `image` is non-sparse then the image or each specified disjoint plane must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-VkImageMemoryBarrier-image-09241
  If `image` has a color format that is single-plane, then the `aspectMask` member of `subresourceRange` must be VK_IMAGE_ASPECT_COLOR_BIT

- VUID-VkImageMemoryBarrier-image-09242
  If `image` has a color format and is not disjoint, then the `aspectMask` member of `subresourceRange` must be VK_IMAGE_ASPECT_COLOR_BIT

- VUID-VkImageMemoryBarrier-image-01672
  If `image` has a multi-planar format and the image is disjoint, then the `aspectMask` member of `subresourceRange` must include at least one multi-planar aspect mask bit or VK_IMAGE_ASPECT_COLOR_BIT

- VUID-VkImageMemoryBarrier-image-03320
  If `image` has a depth/stencil format with both depth and stencil and the `separateDepthStencilLayouts` feature is not enabled, then the `aspectMask` member of `subresourceRange` must include both VK_IMAGE_ASPECT_DEPTH_BIT and VK_IMAGE_ASPECT_STENCIL_BIT

- VUID-VkImageMemoryBarrier-image-03319
  If `image` has a depth/stencil format with both depth and stencil and the `separateDepthStencilLayouts` feature is enabled, then the `aspectMask` member of `subresourceRange` must include either or both VK_IMAGE_ASPECT_DEPTH_BIT and VK_IMAGE_ASPECT_STENCIL_BIT

- VUID-VkImageMemoryBarrier-image-10749
  If `image` has a depth-only format then the `aspectMask` member of `subresourceRange` must be VK_IMAGE_ASPECT_DEPTH_BIT

- VUID-VkImageMemoryBarrier-image-10750
  If `image` has a stencil-only format then the `aspectMask` member of `subresourceRange` must be VK_IMAGE_ASPECT_STENCIL_BIT

- VUID-VkImageMemoryBarrier-aspectMask-08702
  If the `aspectMask` member of `subresourceRange` includes VK_IMAGE_ASPECT_DEPTH_BIT, `oldLayout` and `newLayout` must not be one of VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL or VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL

- VUID-VkImageMemoryBarrier-aspectMask-08703
  If the `aspectMask` member of `subresourceRange` includes VK_IMAGE_ASPECT_STENCIL_BIT, `oldLayout` and `newLayout` must not be one of VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL or VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL

- VUID-VkImageMemoryBarrier-subresourceRange-09601
  `subresourceRange.aspectMask` must be valid for the `format` the `image` was created with

- VUID-VkImageMemoryBarrier-oldLayout-01208
  If layouts are not ignored, `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL then `image` must have been created with the VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT usage flag set

- VUID-VkImageMemoryBarrier-oldLayout-01209
  If layouts are not ignored, `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL then `image` must have been created with the VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT usage flag set

- VUID-VkImageMemoryBarrier-oldLayout-01210
  If layouts are not ignored, `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL then `image` must have been created with the VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT usage flag set

- VUID-VkImageMemoryBarrier-oldLayout-01211
  If layouts are not ignored, `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL then `image` must have been created with the VK_IMAGE_USAGE_SAMPLED_BIT or VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT usage flag set

- VUID-VkImageMemoryBarrier-oldLayout-01212
  If layouts are not ignored, `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL then `image` must have been created with the VK_IMAGE_USAGE_TRANSFER_SRC_BIT usage flag set

- VUID-VkImageMemoryBarrier-oldLayout-01213
  If layouts are not ignored, `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL then `image` must have been created with the VK_IMAGE_USAGE_TRANSFER_DST_BIT usage flag set

- VUID-VkImageMemoryBarrier-oldLayout-10767
  If the zeroInitializeDeviceMemory feature is not enabled, `oldLayout` must not be VK_IMAGE_LAYOUT_ZERO_INITIALIZED_EXT

- VUID-VkImageMemoryBarrier-oldLayout-10768
  If `oldLayout` is VK_IMAGE_LAYOUT_ZERO_INITIALIZED_EXT, then all subresources must be included in the barrier

- VUID-VkImageMemoryBarrier-oldLayout-01658
  If layouts are not ignored, `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL then `image` must have been created with the VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT usage flag set

- VUID-VkImageMemoryBarrier-oldLayout-01659
  If layouts are not ignored, `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL then `image` must have been created with the VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT usage flag set

- VUID-VkImageMemoryBarrier-srcQueueFamilyIndex-04065
  If layouts are not ignored, `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL then `image` must have been created with at least one of the VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, VK_IMAGE_USAGE_SAMPLED_BIT, or VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT usage flags set

- VUID-VkImageMemoryBarrier-srcQueueFamilyIndex-04066
  If layouts are not ignored, `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL then `image` must have been created with the VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT usage flag set

- VUID-VkImageMemoryBarrier-srcQueueFamilyIndex-04067
  If layouts are not ignored, `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL then `image` must have been created with at least one of the VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, VK_IMAGE_USAGE_SAMPLED_BIT, or VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT usage flags set

- VUID-VkImageMemoryBarrier-srcQueueFamilyIndex-04068
  If layouts are not ignored, `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL then `image` must have been created with the VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT usage flag set

- VUID-VkImageMemoryBarrier-synchronization2-07793
  If the `synchronization2` feature is not enabled, `oldLayout` must not be VK_IMAGE_LAYOUT_ATTACHMENT_OPTIMAL_KHR or VK_IMAGE_LAYOUT_READ_ONLY_OPTIMAL_KHR

- VUID-VkImageMemoryBarrier-synchronization2-07794
  If the `synchronization2` feature is not enabled, `newLayout` must not be VK_IMAGE_LAYOUT_ATTACHMENT_OPTIMAL_KHR or VK_IMAGE_LAYOUT_READ_ONLY_OPTIMAL_KHR

- VUID-VkImageMemoryBarrier-srcQueueFamilyIndex-03938
  If layouts are not ignored, `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_ATTACHMENT_OPTIMAL, `image` must have been created with the VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT or VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT usage flag set

- VUID-VkImageMemoryBarrier-srcQueueFamilyIndex-03939
  If layouts are not ignored, `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_READ_ONLY_OPTIMAL, `image` must have been created with at least one of the VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, VK_IMAGE_USAGE_SAMPLED_BIT, or VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT usage flags set

- VUID-VkImageMemoryBarrier-oldLayout-02088
  If layouts are not ignored, `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_FRAGMENT_SHADING_RATE_ATTACHMENT_OPTIMAL_KHR then `image` must have been created with the VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR usage flag set

- VUID-VkImageMemoryBarrier-srcQueueFamilyIndex-07120
  If layouts are not ignored, `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_VIDEO_DECODE_SRC_KHR then `image` must have been created with the VK_IMAGE_USAGE_VIDEO_DECODE_SRC_BIT_KHR usage flag set

- VUID-VkImageMemoryBarrier-srcQueueFamilyIndex-07121
  If layouts are not ignored, `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_VIDEO_DECODE_DST_KHR then `image` must have been created with the VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR usage flag set

- VUID-VkImageMemoryBarrier-srcQueueFamilyIndex-07122
  If layouts are not ignored, `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_VIDEO_DECODE_DPB_KHR then `image` must have been created with the VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR usage flag set

- VUID-VkImageMemoryBarrier-srcQueueFamilyIndex-07123
  If layouts are not ignored, `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_VIDEO_ENCODE_SRC_KHR then `image` must have been created with the VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR usage flag set

- VUID-VkImageMemoryBarrier-srcQueueFamilyIndex-07124
  If layouts are not ignored, `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_VIDEO_ENCODE_DST_KHR then `image` must have been created with the VK_IMAGE_USAGE_VIDEO_ENCODE_DST_BIT_KHR usage flag set

- VUID-VkImageMemoryBarrier-srcQueueFamilyIndex-07125
  If layouts are not ignored, `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_VIDEO_ENCODE_DPB_KHR then `image` must have been created with the VK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR usage flag set

- VUID-VkImageMemoryBarrier-srcQueueFamilyIndex-10287
  If layouts are not ignored, `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_VIDEO_ENCODE_QUANTIZATION_MAP_KHR then `image` must have been created with the VK_IMAGE_USAGE_VIDEO_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR or VK_IMAGE_USAGE_VIDEO_ENCODE_EMPHASIS_MAP_BIT_KHR usage flags set

- VUID-VkImageMemoryBarrier-srcQueueFamilyIndex-07006
  If layouts are not ignored, `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT then `image` must have been created with either the VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT or VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT usage flags set, and the VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT or VK_IMAGE_USAGE_SAMPLED_BIT usage flags set, and the VK_IMAGE_USAGE_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT usage flag set

- VUID-VkImageMemoryBarrier-attachmentFeedbackLoopLayout-07313
  If the `attachmentFeedbackLoopLayout` feature is not enabled, `newLayout` must not be VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT

- VUID-VkImageMemoryBarrier-srcQueueFamilyIndex-09550
  If layouts are not ignored, `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_RENDERING_LOCAL_READ then `image` must have been created with either the VK_IMAGE_USAGE_STORAGE_BIT usage flag set, or with both the VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT usage flag and either of the VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT or VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT usage flags set

- VUID-VkImageMemoryBarrier-dynamicRenderingLocalRead-09551
  If the `dynamicRenderingLocalRead` feature is not enabled, `oldLayout` must not be VK_IMAGE_LAYOUT_RENDERING_LOCAL_READ

- VUID-VkImageMemoryBarrier-dynamicRenderingLocalRead-09552
  If the `dynamicRenderingLocalRead` feature is not enabled, `newLayout` must not be VK_IMAGE_LAYOUT_RENDERING_LOCAL_READ

- VUID-VkImageMemoryBarrier-None-09052
  If the `synchronization2` feature is not enabled, and `image` was created with a sharing mode of VK_SHARING_MODE_CONCURRENT, at least one of `srcQueueFamilyIndex` and `dstQueueFamilyIndex` must be VK_QUEUE_FAMILY_IGNORED

- VUID-VkImageMemoryBarrier-None-09053
  If the `synchronization2` feature is not enabled, and `image` was created with a sharing mode of VK_SHARING_MODE_CONCURRENT, `srcQueueFamilyIndex` must be VK_QUEUE_FAMILY_IGNORED or VK_QUEUE_FAMILY_EXTERNAL

- VUID-VkImageMemoryBarrier-None-09054
  If the `synchronization2` feature is not enabled, and `image` was created with a sharing mode of VK_SHARING_MODE_CONCURRENT, `dstQueueFamilyIndex` must be VK_QUEUE_FAMILY_IGNORED or VK_QUEUE_FAMILY_EXTERNAL

- VUID-VkImageMemoryBarrier-dstQueueFamilyIndex-12331
  If `dstQueueFamilyIndex` is VK_QUEUE_FAMILY_EXTERNAL and `image` was created with VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT or VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT in VkExternalMemoryImageCreateInfo::`handleTypes`, `newLayout` must be VK_IMAGE_LAYOUT_GENERAL

- VUID-VkImageMemoryBarrier-srcQueueFamilyIndex-12332
  If `srcQueueFamilyIndex` is VK_QUEUE_FAMILY_EXTERNAL and `image` was created with VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT or VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT in VkExternalMemoryImageCreateInfo::`handleTypes`, `oldLayout` must be VK_IMAGE_LAYOUT_GENERAL or VK_IMAGE_LAYOUT_UNDEFINED

Valid Usage (Implicit)

- VUID-VkImageMemoryBarrier-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER

- VUID-VkImageMemoryBarrier-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkExternalMemoryAcquireUnmodifiedEXT or VkSampleLocationsInfoEXT

- VUID-VkImageMemoryBarrier-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkImageMemoryBarrier-oldLayout-parameter
  `oldLayout` must be a valid VkImageLayout value

- VUID-VkImageMemoryBarrier-newLayout-parameter
  `newLayout` must be a valid VkImageLayout value

- VUID-VkImageMemoryBarrier-image-parameter
  `image` must be a valid VkImage handle

- VUID-VkImageMemoryBarrier-subresourceRange-parameter
  `subresourceRange` must be a valid VkImageSubresourceRange structure

To facilitate usage of images whose memory is initialized on the host, Vulkan allows image layout transitions to be performed by the host as well, albeit supporting limited layouts.

To perform an image layout transition on the host, call:

    // Provided by VK_VERSION_1_4
    VkResult vkTransitionImageLayout(
        VkDevice                                    device,
        uint32_t                                    transitionCount,
        const VkHostImageLayoutTransitionInfo*      pTransitions);

    // Provided by VK_EXT_host_image_copy
    // Equivalent to vkTransitionImageLayout
    VkResult vkTransitionImageLayoutEXT(
        VkDevice                                    device,
        uint32_t                                    transitionCount,
        const VkHostImageLayoutTransitionInfo*      pTransitions);

- `device` is the device which owns `pTransitions`[i].`image`.

- `transitionCount` is the number of image layout transitions to perform.

- `pTransitions` is a pointer to an array of VkHostImageLayoutTransitionInfo structures specifying the image and subresource ranges within them to transition.

Valid Usage (Implicit)

- VUID-vkTransitionImageLayout-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkTransitionImageLayout-pTransitions-parameter
  `pTransitions` must be a valid pointer to an array of `transitionCount` valid VkHostImageLayoutTransitionInfo structures

- VUID-vkTransitionImageLayout-transitionCount-arraylength
  `transitionCount` must be greater than `0`

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_INITIALIZATION_FAILED

  - VK_ERROR_MEMORY_MAP_FAILED

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkHostImageLayoutTransitionInfo` structure is defined as:

    // Provided by VK_VERSION_1_4
    typedef struct VkHostImageLayoutTransitionInfo {
        VkStructureType            sType;
        const void*                pNext;
        VkImage                    image;
        VkImageLayout              oldLayout;
        VkImageLayout              newLayout;
        VkImageSubresourceRange    subresourceRange;
    } VkHostImageLayoutTransitionInfo;

    // Provided by VK_EXT_host_image_copy
    // Equivalent to VkHostImageLayoutTransitionInfo
    typedef VkHostImageLayoutTransitionInfo VkHostImageLayoutTransitionInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `image` is a handle to the image affected by this layout transition.

- `oldLayout` is the old layout in an image layout transition.

- `newLayout` is the new layout in an image layout transition.

- `subresourceRange` describes the image subresource range within `image` that is affected by this layout transition.

`vkTransitionImageLayout` does not check whether the device memory associated with an image is currently in use before performing the layout transition. The application must guarantee that any previously submitted command that reads from or writes to this subresource has completed before the host performs the layout transition. The memory of `image` is accessed by the host as if coherent.

If `image` is a 3D image created with VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT and the `maintenance9` feature is enabled, the `baseArrayLayer` and `layerCount` members of `subresourceRange` specify the subset of slices of the 3D image affected by the memory barrier, including the layout transition. Any slices of a 3D image not included in `subresourceRange` are not affected by the memory barrier and remain in their existing layout.

Note | Image layout transitions performed on the host do not require queue family ownership transfers as the physical layout of the image will not vary between queue families for the layouts supported by this function.

Note | If the device has written to the image memory, it is not automatically made available to the host. Before this command can be called, a memory barrier for this image must have been issued on the device with the second synchronization scope including VK_PIPELINE_STAGE_HOST_BIT and VK_ACCESS_HOST_READ_BIT. Because queue submissions automatically make host memory visible to the device, there would not be a need for a memory barrier before using the results of this layout transition on the device.

Valid Usage

- VUID-VkHostImageLayoutTransitionInfo-image-09055
  `image` must have been created with the VK_IMAGE_USAGE_HOST_TRANSFER_BIT usage flag set

- VUID-VkHostImageLayoutTransitionInfo-subresourceRange-01486
  `subresourceRange.baseMipLevel` must be less than the `mipLevels` specified in VkImageCreateInfo when `image` was created

- VUID-VkHostImageLayoutTransitionInfo-subresourceRange-01724
  If `subresourceRange.levelCount` is not VK_REMAINING_MIP_LEVELS, `subresourceRange.baseMipLevel` + `subresourceRange.levelCount` must be less than or equal to the `mipLevels` specified in VkImageCreateInfo when `image` was created

- VUID-VkHostImageLayoutTransitionInfo-subresourceRange-01488
  If `image` is not a 3D image or was created without VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT set, or the `maintenance9` feature is not enabled, `subresourceRange.baseArrayLayer` must be less than the `arrayLayers` specified in VkImageCreateInfo when `image` was created

- VUID-VkHostImageLayoutTransitionInfo-maintenance9-10798
  If the `maintenance9` feature is enabled and `image` is a 3D image created with VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT set, `subresourceRange.baseArrayLayer` must be less than the depth computed from `baseMipLevel` and `extent.depth` specified in VkImageCreateInfo when `image` was created, according to the formula defined in Image Mip Level Sizing

- VUID-VkHostImageLayoutTransitionInfo-maintenance9-10799
  If the `maintenance9` feature is enabled and `image` is a 3D image created with VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT set and either `subresourceRange.baseArrayLayer` is not equal to 0 or `subresourceRange.layerCount` is not equal to VK_REMAINING_ARRAY_LAYERS, `subresourceRange.levelCount` must be 1

- VUID-VkHostImageLayoutTransitionInfo-subresourceRange-01725
  If `image` is not a 3D image or was created without VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT set, or the `maintenance9` feature is not enabled, and `subresourceRange.layerCount` is not VK_REMAINING_ARRAY_LAYERS, `subresourceRange.baseArrayLayer` + `subresourceRange.layerCount` must be less than or equal to the `arrayLayers` specified in VkImageCreateInfo when `image` was created

- VUID-VkHostImageLayoutTransitionInfo-maintenance9-10800
  If the `maintenance9` feature is enabled, `subresourceRange.layerCount` is not VK_REMAINING_ARRAY_LAYERS, and `image` is a 3D image created with VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT set, `subresourceRange.baseArrayLayer` + `subresourceRange.layerCount` must be less than or equal to the depth computed from `baseMipLevel` and `extent.depth` specified in VkImageCreateInfo when `image` was created, according to the formula defined in Image Mip Level Sizing

- VUID-VkHostImageLayoutTransitionInfo-image-01932
  If `image` is non-sparse then the image or each specified disjoint plane must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-VkHostImageLayoutTransitionInfo-image-09241
  If `image` has a color format that is single-plane, then the `aspectMask` member of `subresourceRange` must be VK_IMAGE_ASPECT_COLOR_BIT

- VUID-VkHostImageLayoutTransitionInfo-image-09242
  If `image` has a color format and is not disjoint, then the `aspectMask` member of `subresourceRange` must be VK_IMAGE_ASPECT_COLOR_BIT

- VUID-VkHostImageLayoutTransitionInfo-image-01672
  If `image` has a multi-planar format and the image is disjoint, then the `aspectMask` member of `subresourceRange` must include at least one multi-planar aspect mask bit or VK_IMAGE_ASPECT_COLOR_BIT

- VUID-VkHostImageLayoutTransitionInfo-image-03320
  If `image` has a depth/stencil format with both depth and stencil and the `separateDepthStencilLayouts` feature is not enabled, then the `aspectMask` member of `subresourceRange` must include both VK_IMAGE_ASPECT_DEPTH_BIT and VK_IMAGE_ASPECT_STENCIL_BIT

- VUID-VkHostImageLayoutTransitionInfo-image-03319
  If `image` has a depth/stencil format with both depth and stencil and the `separateDepthStencilLayouts` feature is enabled, then the `aspectMask` member of `subresourceRange` must include either or both VK_IMAGE_ASPECT_DEPTH_BIT and VK_IMAGE_ASPECT_STENCIL_BIT

- VUID-VkHostImageLayoutTransitionInfo-image-10749
  If `image` has a depth-only format then the `aspectMask` member of `subresourceRange` must be VK_IMAGE_ASPECT_DEPTH_BIT

- VUID-VkHostImageLayoutTransitionInfo-image-10750
  If `image` has a stencil-only format then the `aspectMask` member of `subresourceRange` must be VK_IMAGE_ASPECT_STENCIL_BIT

- VUID-VkHostImageLayoutTransitionInfo-aspectMask-08702
  If the `aspectMask` member of `subresourceRange` includes VK_IMAGE_ASPECT_DEPTH_BIT, `oldLayout` and `newLayout` must not be one of VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL or VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL

- VUID-VkHostImageLayoutTransitionInfo-aspectMask-08703
  If the `aspectMask` member of `subresourceRange` includes VK_IMAGE_ASPECT_STENCIL_BIT, `oldLayout` and `newLayout` must not be one of VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL or VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL

- VUID-VkHostImageLayoutTransitionInfo-subresourceRange-09601
  `subresourceRange.aspectMask` must be valid for the `format` the `image` was created with

- VUID-VkHostImageLayoutTransitionInfo-oldLayout-01208
  If `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL then `image` must have been created with the VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT usage flag set

- VUID-VkHostImageLayoutTransitionInfo-oldLayout-01209
  If `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL then `image` must have been created with the VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT usage flag set

- VUID-VkHostImageLayoutTransitionInfo-oldLayout-01210
  If `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL then `image` must have been created with the VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT usage flag set

- VUID-VkHostImageLayoutTransitionInfo-oldLayout-01211
  If `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL then `image` must have been created with the VK_IMAGE_USAGE_SAMPLED_BIT or VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT usage flag set

- VUID-VkHostImageLayoutTransitionInfo-oldLayout-01212
  If `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL then `image` must have been created with the VK_IMAGE_USAGE_TRANSFER_SRC_BIT usage flag set

- VUID-VkHostImageLayoutTransitionInfo-oldLayout-01213
  If `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL then `image` must have been created with the VK_IMAGE_USAGE_TRANSFER_DST_BIT usage flag set

- VUID-VkHostImageLayoutTransitionInfo-oldLayout-10767
  If the zeroInitializeDeviceMemory feature is not enabled, `oldLayout` must not be VK_IMAGE_LAYOUT_ZERO_INITIALIZED_EXT

- VUID-VkHostImageLayoutTransitionInfo-oldLayout-10768
  If `oldLayout` is VK_IMAGE_LAYOUT_ZERO_INITIALIZED_EXT, then all subresources must be included in the barrier

- VUID-VkHostImageLayoutTransitionInfo-oldLayout-01658
  If `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL then `image` must have been created with the VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT usage flag set

- VUID-VkHostImageLayoutTransitionInfo-oldLayout-01659
  If `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL then `image` must have been created with the VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT usage flag set

- VUID-VkHostImageLayoutTransitionInfo-srcQueueFamilyIndex-04065
  If `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL then `image` must have been created with at least one of the VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, VK_IMAGE_USAGE_SAMPLED_BIT, or VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT usage flags set

- VUID-VkHostImageLayoutTransitionInfo-srcQueueFamilyIndex-04066
  If `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL then `image` must have been created with the VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT usage flag set

- VUID-VkHostImageLayoutTransitionInfo-srcQueueFamilyIndex-04067
  If `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL then `image` must have been created with at least one of the VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, VK_IMAGE_USAGE_SAMPLED_BIT, or VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT usage flags set

- VUID-VkHostImageLayoutTransitionInfo-srcQueueFamilyIndex-04068
  If `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL then `image` must have been created with the VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT usage flag set

- VUID-VkHostImageLayoutTransitionInfo-synchronization2-07793
  If the `synchronization2` feature is not enabled, `oldLayout` must not be VK_IMAGE_LAYOUT_ATTACHMENT_OPTIMAL_KHR or VK_IMAGE_LAYOUT_READ_ONLY_OPTIMAL_KHR

- VUID-VkHostImageLayoutTransitionInfo-synchronization2-07794
  If the `synchronization2` feature is not enabled, `newLayout` must not be VK_IMAGE_LAYOUT_ATTACHMENT_OPTIMAL_KHR or VK_IMAGE_LAYOUT_READ_ONLY_OPTIMAL_KHR

- VUID-VkHostImageLayoutTransitionInfo-srcQueueFamilyIndex-03938
  If `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_ATTACHMENT_OPTIMAL, `image` must have been created with the VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT or VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT usage flag set

- VUID-VkHostImageLayoutTransitionInfo-srcQueueFamilyIndex-03939
  If `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_READ_ONLY_OPTIMAL, `image` must have been created with at least one of the VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, VK_IMAGE_USAGE_SAMPLED_BIT, or VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT usage flags set

- VUID-VkHostImageLayoutTransitionInfo-oldLayout-02088
  If `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_FRAGMENT_SHADING_RATE_ATTACHMENT_OPTIMAL_KHR then `image` must have been created with the VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR usage flag set

- VUID-VkHostImageLayoutTransitionInfo-srcQueueFamilyIndex-07120
  If `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_VIDEO_DECODE_SRC_KHR then `image` must have been created with the VK_IMAGE_USAGE_VIDEO_DECODE_SRC_BIT_KHR usage flag set

- VUID-VkHostImageLayoutTransitionInfo-srcQueueFamilyIndex-07121
  If `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_VIDEO_DECODE_DST_KHR then `image` must have been created with the VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR usage flag set

- VUID-VkHostImageLayoutTransitionInfo-srcQueueFamilyIndex-07122
  If `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_VIDEO_DECODE_DPB_KHR then `image` must have been created with the VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR usage flag set

- VUID-VkHostImageLayoutTransitionInfo-srcQueueFamilyIndex-07123
  If `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_VIDEO_ENCODE_SRC_KHR then `image` must have been created with the VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR usage flag set

- VUID-VkHostImageLayoutTransitionInfo-srcQueueFamilyIndex-07124
  If `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_VIDEO_ENCODE_DST_KHR then `image` must have been created with the VK_IMAGE_USAGE_VIDEO_ENCODE_DST_BIT_KHR usage flag set

- VUID-VkHostImageLayoutTransitionInfo-srcQueueFamilyIndex-07125
  If `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_VIDEO_ENCODE_DPB_KHR then `image` must have been created with the VK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR usage flag set

- VUID-VkHostImageLayoutTransitionInfo-srcQueueFamilyIndex-10287
  If `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_VIDEO_ENCODE_QUANTIZATION_MAP_KHR then `image` must have been created with the VK_IMAGE_USAGE_VIDEO_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR or VK_IMAGE_USAGE_VIDEO_ENCODE_EMPHASIS_MAP_BIT_KHR usage flags set

- VUID-VkHostImageLayoutTransitionInfo-srcQueueFamilyIndex-07006
  If `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT then `image` must have been created with either the VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT or VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT usage flags set, and the VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT or VK_IMAGE_USAGE_SAMPLED_BIT usage flags set, and the VK_IMAGE_USAGE_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT usage flag set

- VUID-VkHostImageLayoutTransitionInfo-attachmentFeedbackLoopLayout-07313
  If the `attachmentFeedbackLoopLayout` feature is not enabled, `newLayout` must not be VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT

- VUID-VkHostImageLayoutTransitionInfo-srcQueueFamilyIndex-09550
  If `oldLayout` or `newLayout` is VK_IMAGE_LAYOUT_RENDERING_LOCAL_READ then `image` must have been created with either the VK_IMAGE_USAGE_STORAGE_BIT usage flag set, or with both the VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT usage flag and either of the VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT or VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT usage flags set

- VUID-VkHostImageLayoutTransitionInfo-dynamicRenderingLocalRead-09551
  If the `dynamicRenderingLocalRead` feature is not enabled, `oldLayout` must not be VK_IMAGE_LAYOUT_RENDERING_LOCAL_READ

- VUID-VkHostImageLayoutTransitionInfo-dynamicRenderingLocalRead-09552
  If the `dynamicRenderingLocalRead` feature is not enabled, `newLayout` must not be VK_IMAGE_LAYOUT_RENDERING_LOCAL_READ

- VUID-VkHostImageLayoutTransitionInfo-oldLayout-09229
  `oldLayout` must be either VK_IMAGE_LAYOUT_UNDEFINED or the current layout of the image subresources as specified in `subresourceRange`

- VUID-VkHostImageLayoutTransitionInfo-oldLayout-09230
  If `oldLayout` is not VK_IMAGE_LAYOUT_UNDEFINED, VK_IMAGE_LAYOUT_ZERO_INITIALIZED_EXT, or VK_IMAGE_LAYOUT_PREINITIALIZED, it must be one of the layouts in VkPhysicalDeviceHostImageCopyProperties::`pCopySrcLayouts`

- VUID-VkHostImageLayoutTransitionInfo-newLayout-09057
  `newLayout` must be one of the layouts in VkPhysicalDeviceHostImageCopyProperties::`pCopyDstLayouts`

Valid Usage (Implicit)

- VUID-VkHostImageLayoutTransitionInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_HOST_IMAGE_LAYOUT_TRANSITION_INFO

- VUID-VkHostImageLayoutTransitionInfo-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkHostImageLayoutTransitionInfo-image-parameter
  `image` must be a valid VkImage handle

- VUID-VkHostImageLayoutTransitionInfo-oldLayout-parameter
  `oldLayout` must be a valid VkImageLayout value

- VUID-VkHostImageLayoutTransitionInfo-newLayout-parameter
  `newLayout` must be a valid VkImageLayout value

- VUID-VkHostImageLayoutTransitionInfo-subresourceRange-parameter
  `subresourceRange` must be a valid VkImageSubresourceRange structure

#### 7.7.5. Tensor Memory Barriers

Tensor memory barriers only apply to memory accesses involving a specific tensor. That is, a memory dependency formed from a tensor memory barrier is scoped to access via the specified tensor. Tensor memory barriers can also be used to define a queue family ownership transfer for the specified tensor.

The `VkTensorMemoryBarrierARM` structure is defined as:

    // Provided by VK_ARM_tensors
    typedef struct VkTensorMemoryBarrierARM {
        VkStructureType          sType;
        const void*              pNext;
        VkPipelineStageFlags2    srcStageMask;
        VkAccessFlags2           srcAccessMask;
        VkPipelineStageFlags2    dstStageMask;
        VkAccessFlags2           dstAccessMask;
        uint32_t                 srcQueueFamilyIndex;
        uint32_t                 dstQueueFamilyIndex;
        VkTensorARM              tensor;
    } VkTensorMemoryBarrierARM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `srcStageMask` is a VkPipelineStageFlags2 mask of pipeline stages to be included in the first synchronization scope.

- `srcAccessMask` is a VkAccessFlags2 mask of access flags to be included in the first access scope.

- `dstStageMask` is a VkPipelineStageFlags2 mask of pipeline stages to be included in the second synchronization scope.

- `dstAccessMask` is a VkAccessFlags2 mask of access flags to be included in the second access scope.

- `srcQueueFamilyIndex` is the source queue family for a queue family ownership transfer.

- `dstQueueFamilyIndex` is the destination queue family for a queue family ownership transfer.

- `tensor` is a handle to the tensor whose backing memory is affected by the barrier.

The first synchronization scope and access scope described by this structure include only operations and memory accesses specified by `srcStageMask` and `srcAccessMask`.

The second synchronization scope and access scope described by this structure include only operations and memory accesses specified by `dstStageMask` and `dstAccessMask`.

Both access scopes are limited to only memory accesses to `tensor`.

If `tensor` was created with VK_SHARING_MODE_EXCLUSIVE, and `srcQueueFamilyIndex` is not equal to `dstQueueFamilyIndex`, this memory barrier defines a queue family transfer operation. When executed on a queue in the family identified by `srcQueueFamilyIndex`, this barrier defines a queue family release operation for the specified tensor, and the second synchronization and access scopes do not synchronize operations on that queue. When executed on a queue in the family identified by `dstQueueFamilyIndex`, this barrier defines a queue family acquire operation for the specified tensor, and the first synchronization and access scopes do not synchronize operations on that queue.

A queue family transfer operation is also defined if the values are not equal, and either is one of the special queue family values reserved for external memory ownership transfers, as described in Queue Family Ownership Transfer. A queue family release operation is defined when `dstQueueFamilyIndex` is one of those values, and a queue family acquire operation is defined when `srcQueueFamilyIndex` is one of those values.

Valid Usage

- VUID-VkTensorMemoryBarrierARM-tensor-09755
  If `tensor` was created with a sharing mode of VK_SHARING_MODE_CONCURRENT, `srcQueueFamilyIndex` and `dstQueueFamilyIndex` must both be VK_QUEUE_FAMILY_IGNORED

- VUID-VkTensorMemoryBarrierARM-tensor-09756
  If `tensor` was created with a sharing mode of VK_SHARING_MODE_EXCLUSIVE, `srcQueueFamilyIndex` and `dstQueueFamilyIndex` must both be either VK_QUEUE_FAMILY_IGNORED, or a valid queue family (see Queue Family Properties)

- VUID-VkTensorMemoryBarrierARM-tensor-09757
  If `tensor` was created with a sharing mode of VK_SHARING_MODE_EXCLUSIVE, and `srcQueueFamilyIndex` and `dstQueueFamilyIndex` are not VK_QUEUE_FAMILY_IGNORED, at least one of them must be the same as the family of the queue that will execute this barrier

- VUID-VkTensorMemoryBarrierARM-tensor-09758
  If `tensor` is non-sparse then it must be bound completely and contiguously to a single VkDeviceMemory object

Valid Usage (Implicit)

- VUID-VkTensorMemoryBarrierARM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_TENSOR_MEMORY_BARRIER_ARM

- VUID-VkTensorMemoryBarrierARM-srcStageMask-parameter
  `srcStageMask` must be a valid combination of VkPipelineStageFlagBits2 values

- VUID-VkTensorMemoryBarrierARM-srcAccessMask-parameter
  `srcAccessMask` must be a valid combination of VkAccessFlagBits2 values

- VUID-VkTensorMemoryBarrierARM-dstStageMask-parameter
  `dstStageMask` must be a valid combination of VkPipelineStageFlagBits2 values

- VUID-VkTensorMemoryBarrierARM-dstAccessMask-parameter
  `dstAccessMask` must be a valid combination of VkAccessFlagBits2 values

- VUID-VkTensorMemoryBarrierARM-tensor-parameter
  `tensor` must be a valid VkTensorARM handle

Structure Chaining

Extends the structure

  - VkDependencyInfo

The `VkTensorDependencyInfoARM` structure is defined as:

    // Provided by VK_ARM_tensors
    typedef struct VkTensorDependencyInfoARM {
        VkStructureType                    sType;
        const void*                        pNext;
        uint32_t                           tensorMemoryBarrierCount;
        const VkTensorMemoryBarrierARM*    pTensorMemoryBarriers;
    } VkTensorDependencyInfoARM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `tensorMemoryBarrierCount` is the length of the `pTensorMemoryBarriers` array.

- `pTensorMemoryBarriers` is a pointer to an array of VkTensorMemoryBarrierARM structures defining memory dependencies between tensors.

Valid Usage (Implicit)

- VUID-VkTensorDependencyInfoARM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_TENSOR_DEPENDENCY_INFO_ARM

- VUID-VkTensorDependencyInfoARM-pTensorMemoryBarriers-parameter
  `pTensorMemoryBarriers` must be a valid pointer to an array of `tensorMemoryBarrierCount` valid VkTensorMemoryBarrierARM structures

- VUID-VkTensorDependencyInfoARM-tensorMemoryBarrierCount-arraylength
  `tensorMemoryBarrierCount` must be greater than `0`

Structure Chaining

Extends the structure

  - VkDependencyInfo

#### 7.7.6. Queue Family Ownership Transfer

Resources created with a VkSharingMode of VK_SHARING_MODE_EXCLUSIVE must have their ownership explicitly transferred from one queue family to another in order to access their content in a well-defined manner on a queue in a different queue family.

The special queue family index VK_QUEUE_FAMILY_IGNORED indicates that a queue family parameter or member is ignored.

    #define VK_QUEUE_FAMILY_IGNORED           (~0U)

Resources shared with external APIs or instances using external memory must also explicitly manage ownership transfers between local and external queues (or equivalent constructs in external APIs) regardless of the VkSharingMode specified when creating them.

The special queue family index VK_QUEUE_FAMILY_EXTERNAL represents any queue external to the resource’s current Vulkan instance, as long as the queue uses the same underlying device group or physical device, and the same driver version as the resource’s VkDevice, as indicated by VkPhysicalDeviceIDProperties::`deviceUUID` and VkPhysicalDeviceIDProperties::`driverUUID`.

    #define VK_QUEUE_FAMILY_EXTERNAL          (~1U)

    #define VK_QUEUE_FAMILY_EXTERNAL_KHR      VK_QUEUE_FAMILY_EXTERNAL

The special queue family index VK_QUEUE_FAMILY_FOREIGN_EXT represents any queue external to the resource’s current Vulkan instance, regardless of the queue’s underlying physical device or driver version. This includes, for example, queues for fixed-function image processing devices, media codec devices, and display devices, as well as all queues that use the same underlying device group or physical device, and the same driver version as the resource’s VkDevice.

    #define VK_QUEUE_FAMILY_FOREIGN_EXT       (~2U)

If memory dependencies are correctly expressed between uses of such a resource between two queues in different families, but no ownership transfer is defined, the contents of that resource are undefined for any read accesses performed by the second queue family.

Note | If an application does not need the contents of a resource to remain valid when transferring from one queue family to another, then the ownership transfer should be skipped.

Note | Applications should expect transfers to/from VK_QUEUE_FAMILY_FOREIGN_EXT to be more expensive than transfers to/from VK_QUEUE_FAMILY_EXTERNAL.

A queue family ownership transfer consists of two distinct parts:

1. Release exclusive ownership from the source queue family

2. Acquire exclusive ownership for the destination queue family

An application must ensure that these operations occur in the correct order by defining an execution dependency between them, e.g. using a semaphore.

A release operation is used to release exclusive ownership of a range of a buffer or image subresource range. A release operation is defined by executing a buffer memory barrier (for a buffer range) or an image memory barrier (for an image subresource range) using a pipeline barrier command, on a queue from the source queue family. The `srcQueueFamilyIndex` parameter of the barrier must be the source queue family index, and the `dstQueueFamilyIndex` parameter to the destination queue family index. The destination access mask is ignored for such a barrier, such that no visibility operation is executed - the value of this mask does not affect the validity of the barrier. The release operation happens-after the availability operation. If `dependencyFlags` does not include VK_DEPENDENCY_QUEUE_FAMILY_OWNERSHIP_TRANSFER_USE_ALL_STAGES_BIT_KHR, `dstStageMask` is also ignored for such a barrier as defined by buffer memory ownership transfer and image memory ownership transfer. After a release operation is performed, the contents and image layout (if applicable) of the released resource are undefined until a matching acquire operation is performed.

Note | It is valid to never call the acquire operation after a release, and instead simply start using the resource on any queue (even the releasing queue), but the contents should be reinitialized before being read. In the case of images, an image layout transition away from VK_IMAGE_LAYOUT_UNDEFINED is also required. Executing an acquire operation after this without another release is invalid.

An acquire operation is used to acquire exclusive ownership of a range of a buffer or image subresource range. An acquire operation is defined by executing a buffer memory barrier (for a buffer range) or an image memory barrier (for an image subresource range) using a pipeline barrier command, on a queue from the destination queue family. The buffer range or image subresource range specified in an acquire operation must match exactly that of a previous release operation. The `srcQueueFamilyIndex` parameter of the barrier must be the source queue family index, and the `dstQueueFamilyIndex` parameter to the destination queue family index. The source access mask is ignored for such a barrier, such that no availability operation is executed - the value of this mask does not affect the validity of the barrier. The acquire operation happens-before the visibility operation. If `dependencyFlags` does not include VK_DEPENDENCY_QUEUE_FAMILY_OWNERSHIP_TRANSFER_USE_ALL_STAGES_BIT_KHR, `srcStageMask` is also ignored for such a barrier as defined by buffer memory ownership transfer and image memory ownership transfer. Applications must not execute an acquire operation on any resource where it has been modified in any way other than a matching release operation.

Note | Whilst it is not invalid to provide destination or source access masks for memory barriers used for release or acquire operations, respectively, they have no practical effect. Access after a release operation has undefined results, and so visibility for those accesses has no practical effect. Similarly, write access before an acquire operation will produce undefined results for future access, so availability of those writes has no practical use. In an earlier version of the specification, these were required to match on both sides - but this was subsequently relaxed. These masks should be set to 0.

Note | To ensure that an acquire and release operation are valid, the release operation must happen-before the acquire operation. Often, semaphores are used for this directly, with the semaphore signaling after a release and then waiting before an acquire. Prior to the introduction of VK_DEPENDENCY_QUEUE_FAMILY_OWNERSHIP_TRANSFER_USE_ALL_STAGES_BIT_KHR, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT is the only valid stage to wait on or wait for these operations, as the acquire and release operations do not occur in a defined stage. When VK_DEPENDENCY_QUEUE_FAMILY_OWNERSHIP_TRANSFER_USE_ALL_STAGES_BIT_KHR is specified however, these can be synchronized with the stages which would otherwise be ignored, as these stages now synchronize the acquire and release operations, providing a way to avoid full pipeline stalls.

If the transfer is via an image memory barrier, and an image layout transition is desired, then the values of `oldLayout` and `newLayout` in the release operation's memory barrier must be equal to values of `oldLayout` and `newLayout` in the acquire operation's memory barrier. Although the image layout transition is submitted twice, it will only be executed once. A layout transition specified in this way happens-after the release operation and happens-before the acquire operation.

If the values of `srcQueueFamilyIndex` and `dstQueueFamilyIndex` are equal, no ownership transfer is performed, and the barrier operates as if they were both set to VK_QUEUE_FAMILY_IGNORED.

Queue family ownership transfers may perform read and write accesses on all memory bound to the image subresource or buffer range, so applications must ensure that all memory writes have been made available before a queue family ownership transfer is executed. Available memory is automatically made visible to queue family release and acquire operations, and writes performed by those operations are automatically made available.

Once a queue family has acquired ownership of a buffer range or image subresource range of a VK_SHARING_MODE_EXCLUSIVE resource, its contents are undefined to other queue families unless ownership is transferred. The contents of any portion of another resource which aliases memory that is bound to the transferred buffer or image subresource range are undefined after a release or acquire operation.

Note | Because events cannot be used directly for inter-queue synchronization, and because vkCmdSetEvent does not have the queue family index or memory barrier parameters needed by a release operation, the release and acquire operations of a queue family ownership transfer can only be performed using vkCmdPipelineBarrier.

An acquire operation may have a performance penalty when acquiring ownership of a subresource range from one of the special queue families reserved for external memory ownership transfers described above. The application can reduce the performance penalty in some cases by adding a VkExternalMemoryAcquireUnmodifiedEXT structure to the `pNext` chain of the acquire operation's memory barrier structure.

The `VkExternalMemoryAcquireUnmodifiedEXT` structure is defined as:

    // Provided by VK_EXT_external_memory_acquire_unmodified
    typedef struct VkExternalMemoryAcquireUnmodifiedEXT {
        VkStructureType    sType;
        const void*        pNext;
        VkBool32           acquireUnmodifiedMemory;
    } VkExternalMemoryAcquireUnmodifiedEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `acquireUnmodifiedMemory` specifies, if VK_TRUE, that no range of VkDeviceMemory bound to the resource of the memory barrier’s subresource range was modified at any time since the resource’s most recent release of ownership to the queue family specified by the memory barrier’s `srcQueueFamilyIndex`. If VK_FALSE, it specifies nothing.

If the application releases ownership of the subresource range to one of the special queue families reserved for external memory ownership transfers with a memory barrier structure, and later re-acquires ownership from the same queue family with a memory barrier structure, and if no range of VkDeviceMemory bound to the resource was modified at any time between the release operation and the acquire operation, then the application should add a VkExternalMemoryAcquireUnmodifiedEXT structure to the `pNext` chain of the acquire operation's memory barrier structure because this may reduce the performance penalty.

This structure is ignored if `acquireUnmodifiedMemory` is VK_FALSE. In particular, VK_FALSE does not specify that memory was modified.

This structure is ignored if the memory barrier’s `srcQueueFamilyIndex` is not a special queue family reserved for external memory ownership transfers.

Note | The method by which the application determines whether memory was modified between the release operation and acquire operation is outside the scope of Vulkan. For any Vulkan operation that accesses a resource, the application must not assume the implementation accesses the resource’s memory as read-only, even for apparently read-only operations such as transfer commands and shader reads. The validity of VkExternalMemoryAcquireUnmodifiedEXT::`acquireUnmodifiedMemory` is independent of memory ranges outside the ranges of VkDeviceMemory bound to the resource. In particular, it is independent of any implementation-private memory associated with the resource.

Valid Usage

- VUID-VkExternalMemoryAcquireUnmodifiedEXT-acquireUnmodifiedMemory-08922
  If `acquireUnmodifiedMemory` is VK_TRUE, and the memory barrier’s `srcQueueFamilyIndex` is a special queue family reserved for external memory ownership transfers (as described in Queue Family Ownership Transfer), then each range of VkDeviceMemory bound to the resource must have remained unmodified during all time since the resource’s most recent release of ownership to the queue family

Valid Usage (Implicit)

- VUID-VkExternalMemoryAcquireUnmodifiedEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_ACQUIRE_UNMODIFIED_EXT

Structure Chaining

Extends the structures

  - VkBufferMemoryBarrier

  - VkBufferMemoryBarrier2

  - VkImageMemoryBarrier

  - VkImageMemoryBarrier2

### 7.8. Wait Idle Operations

To wait on the host for the completion of outstanding queue operations for a given queue, call:

    // Provided by VK_VERSION_1_0
    VkResult vkQueueWaitIdle(
        VkQueue                                     queue);

- `queue` is the queue on which to wait.

`vkQueueWaitIdle` is equivalent to having submitted a valid fence to every previously executed queue submission command that accepts a fence, then waiting for all of those fences to signal using vkWaitForFences with an infinite timeout and `waitAll` set to VK_TRUE.

Note | Even though vkQueuePresentKHR does not have a fence parameter, it does accept a fence through VkSwapchainPresentFenceInfoEXT.

Valid Usage (Implicit)

- VUID-vkQueueWaitIdle-queue-parameter
  `queue` must be a valid VkQueue handle

Host Synchronization

- Host access to `queue` must be externally synchronized if it was not created with VK_DEVICE_QUEUE_CREATE_INTERNALLY_SYNCHRONIZED_BIT_KHR

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
- | - | - | Any | -

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_DEVICE_LOST

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

To wait on the host for the completion of outstanding queue operations for all queues on a given logical device, call:

    // Provided by VK_VERSION_1_0
    VkResult vkDeviceWaitIdle(
        VkDevice                                    device);

- `device` is the logical device to idle.

`vkDeviceWaitIdle` is equivalent to calling `vkQueueWaitIdle` for all queues owned by `device`.

Valid Usage (Implicit)

- VUID-vkDeviceWaitIdle-device-parameter
  `device` must be a valid VkDevice handle

Host Synchronization

- Host access to all `VkQueue` objects created from `device` that are not created with VK_DEVICE_QUEUE_CREATE_INTERNALLY_SYNCHRONIZED_BIT_KHR must be externally synchronized

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_DEVICE_LOST

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

### 7.9. Host Write Ordering Guarantees

When batches of command buffers are submitted to a queue via a queue submission command, it defines a memory dependency with prior host operations, and execution of command buffers submitted to the queue.

The first synchronization scope includes execution of vkQueueSubmit on the host and anything that happened-before it, as defined by the host memory model.

Note | Some systems allow writes that do not directly integrate with the host memory model; these have to be synchronized by the application manually. One example of this is non-temporal store instructions on x86; to ensure these happen-before submission, applications should call `_mm_sfence()`.

The second synchronization scope includes all commands submitted in the same queue submission, and all commands that occur later in submission order.

The first access scope includes all host writes to mappable device memory that are available to the host memory domain.

The second access scope includes all memory access performed by the device.

### 7.10. Synchronization and Multiple Physical Devices

If a logical device includes more than one physical device, then fences, semaphores, and events all still have a single instance of the signaled state.

A fence becomes signaled when all physical devices complete the necessary queue operations.

Semaphore wait and signal operations all include a device index that is the sole physical device that performs the operation. These indices are provided in the VkDeviceGroupSubmitInfo and VkDeviceGroupBindSparseInfo structures. Semaphores are not exclusively owned by any physical device. For example, a semaphore can be signaled by one physical device and then waited on by a different physical device.

An event can only be waited on by the same physical device that signaled it (or the host).

### 7.11. Calibrated Timestamps

In order to be able to correlate the time a particular operation took place at on timelines of different time domains (e.g. a device operation vs. a host operation), Vulkan allows querying calibrated timestamps from multiple time domains.

To query calibrated timestamps from a set of time domains, call:

    // Provided by VK_KHR_calibrated_timestamps
    VkResult vkGetCalibratedTimestampsKHR(
        VkDevice                                    device,
        uint32_t                                    timestampCount,
        const VkCalibratedTimestampInfoKHR*         pTimestampInfos,
        uint64_t*                                   pTimestamps,
        uint64_t*                                   pMaxDeviation);

    // Provided by VK_EXT_calibrated_timestamps
    // Equivalent to vkGetCalibratedTimestampsKHR
    VkResult vkGetCalibratedTimestampsEXT(
        VkDevice                                    device,
        uint32_t                                    timestampCount,
        const VkCalibratedTimestampInfoKHR*         pTimestampInfos,
        uint64_t*                                   pTimestamps,
        uint64_t*                                   pMaxDeviation);

- `device` is the logical device used to perform the query.

- `timestampCount` is the number of timestamps to query.

- `pTimestampInfos` is a pointer to an array of `timestampCount` VkCalibratedTimestampInfoKHR structures, describing the time domains the calibrated timestamps should be captured from.

- `pTimestamps` is a pointer to an array of `timestampCount` 64-bit unsigned integer values in which the requested calibrated timestamp values are returned.

- `pMaxDeviation` is a pointer to a 64-bit unsigned integer value in which the strictly positive maximum deviation, in nanoseconds, of the calibrated timestamp values is returned.

Note | The maximum deviation may vary between calls to `vkGetCalibratedTimestampsKHR` even for the same set of time domains due to implementation and platform specific reasons. It is the application’s responsibility to assess whether the returned maximum deviation makes the timestamp values suitable for any particular purpose and can choose to re-issue the timestamp calibration call pursuing a lower deviation value.

Calibrated timestamp values can be extrapolated to estimate future coinciding timestamp values, however, depending on the nature of the time domains and other properties of the platform extrapolating values over a sufficiently long period of time may no longer be accurate enough to fit any particular purpose, so applications are expected to re-calibrate the timestamps on a regular basis.

Valid Usage

- VUID-vkGetCalibratedTimestampsKHR-timeDomain-09246
  The `timeDomain` value of each VkCalibratedTimestampInfoKHR in `pTimestampInfos` must be unique except for those with a value of VK_TIME_DOMAIN_PRESENT_STAGE_LOCAL_EXT

Valid Usage (Implicit)

- VUID-vkGetCalibratedTimestampsKHR-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetCalibratedTimestampsKHR-pTimestampInfos-parameter
  `pTimestampInfos` must be a valid pointer to an array of `timestampCount` valid VkCalibratedTimestampInfoKHR structures

- VUID-vkGetCalibratedTimestampsKHR-pTimestamps-parameter
  `pTimestamps` must be a valid pointer to an array of `timestampCount` `uint64_t` values

- VUID-vkGetCalibratedTimestampsKHR-pMaxDeviation-parameter
  `pMaxDeviation` must be a valid pointer to a `uint64_t` value

- VUID-vkGetCalibratedTimestampsKHR-timestampCount-arraylength
  `timestampCount` must be greater than `0`

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkCalibratedTimestampInfoKHR` structure is defined as:

    // Provided by VK_KHR_calibrated_timestamps
    typedef struct VkCalibratedTimestampInfoKHR {
        VkStructureType    sType;
        const void*        pNext;
        VkTimeDomainKHR    timeDomain;
    } VkCalibratedTimestampInfoKHR;

    // Provided by VK_EXT_calibrated_timestamps
    // Equivalent to VkCalibratedTimestampInfoKHR
    typedef VkCalibratedTimestampInfoKHR VkCalibratedTimestampInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `timeDomain` is a VkTimeDomainKHR value specifying the time domain from which the calibrated timestamp value should be returned.

Valid Usage

- VUID-VkCalibratedTimestampInfoKHR-timeDomain-02354
  `timeDomain` must be one of the VkTimeDomainKHR values returned by vkGetPhysicalDeviceCalibrateableTimeDomainsKHR

- VUID-VkCalibratedTimestampInfoKHR-timeDomain-12227
  If `timeDomain` is VK_TIME_DOMAIN_SWAPCHAIN_LOCAL_EXT or VK_TIME_DOMAIN_PRESENT_STAGE_LOCAL_EXT, the `pNext` chain must include a VkSwapchainCalibratedTimestampInfoEXT structure

Valid Usage (Implicit)

- VUID-VkCalibratedTimestampInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_CALIBRATED_TIMESTAMP_INFO_KHR

- VUID-VkCalibratedTimestampInfoKHR-pNext-pNext
  `pNext` must be `NULL` or a pointer to a valid instance of VkSwapchainCalibratedTimestampInfoEXT

- VUID-VkCalibratedTimestampInfoKHR-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkCalibratedTimestampInfoKHR-timeDomain-parameter
  `timeDomain` must be a valid VkTimeDomainKHR value

The set of supported time domains consists of:

    // Provided by VK_KHR_calibrated_timestamps
    typedef enum VkTimeDomainKHR {
        VK_TIME_DOMAIN_DEVICE_KHR = 0,
        VK_TIME_DOMAIN_CLOCK_MONOTONIC_KHR = 1,
        VK_TIME_DOMAIN_CLOCK_MONOTONIC_RAW_KHR = 2,
        VK_TIME_DOMAIN_QUERY_PERFORMANCE_COUNTER_KHR = 3,
      // Provided by VK_EXT_present_timing
        VK_TIME_DOMAIN_PRESENT_STAGE_LOCAL_EXT = 1000208000,
      // Provided by VK_EXT_present_timing
        VK_TIME_DOMAIN_SWAPCHAIN_LOCAL_EXT = 1000208001,
      // Provided by VK_EXT_calibrated_timestamps
        VK_TIME_DOMAIN_DEVICE_EXT = VK_TIME_DOMAIN_DEVICE_KHR,
      // Provided by VK_EXT_calibrated_timestamps
        VK_TIME_DOMAIN_CLOCK_MONOTONIC_EXT = VK_TIME_DOMAIN_CLOCK_MONOTONIC_KHR,
      // Provided by VK_EXT_calibrated_timestamps
        VK_TIME_DOMAIN_CLOCK_MONOTONIC_RAW_EXT = VK_TIME_DOMAIN_CLOCK_MONOTONIC_RAW_KHR,
      // Provided by VK_EXT_calibrated_timestamps
        VK_TIME_DOMAIN_QUERY_PERFORMANCE_COUNTER_EXT = VK_TIME_DOMAIN_QUERY_PERFORMANCE_COUNTER_KHR,
    } VkTimeDomainKHR;

    // Provided by VK_EXT_calibrated_timestamps
    // Equivalent to VkTimeDomainKHR
    typedef VkTimeDomainKHR VkTimeDomainEXT;

- VK_TIME_DOMAIN_DEVICE_KHR specifies the device time domain. Timestamp values in this time domain use the same units and are comparable with device timestamp values captured using vkCmdWriteTimestamp or vkCmdWriteTimestamp2 and are defined to be incrementing according to the `timestampPeriod` of the device.

- VK_TIME_DOMAIN_PRESENT_STAGE_LOCAL_EXT specifies a time domain unique to a particular swapchain and a specific present stage. Timestamp values in this time domain are in units of nanosecond and are comparable only with other values from the same swapchain and present stage.

- VK_TIME_DOMAIN_SWAPCHAIN_LOCAL_EXT specifies a time domain unique to a particular swapchain. Timestamp values in this time domain are in units of nanosecond and are comparable only with other values from the same swapchain.

- VK_TIME_DOMAIN_CLOCK_MONOTONIC_KHR specifies the CLOCK_MONOTONIC time domain available on POSIX platforms. Timestamp values in this time domain are in units of nanoseconds and are comparable with platform timestamp values captured using the POSIX clock_gettime API as computed by this example:

Note | An implementation supporting `VK_KHR_calibrated_timestamps` or `VK_EXT_calibrated_timestamps` will use the same time domain for all its VkQueue so that timestamp values reported for VK_TIME_DOMAIN_DEVICE_KHR can be matched to any timestamp captured through vkCmdWriteTimestamp or vkCmdWriteTimestamp2 .

    struct timespec tv;
    clock_gettime(CLOCK_MONOTONIC, &tv);
    return tv.tv_nsec + tv.tv_sec*1000000000ull;

- VK_TIME_DOMAIN_CLOCK_MONOTONIC_RAW_KHR specifies the CLOCK_MONOTONIC_RAW time domain available on POSIX platforms. Timestamp values in this time domain are in units of nanoseconds and are comparable with platform timestamp values captured using the POSIX clock_gettime API as computed by this example:

    struct timespec tv;
    clock_gettime(CLOCK_MONOTONIC_RAW, &tv);
    return tv.tv_nsec + tv.tv_sec*1000000000ull;

- VK_TIME_DOMAIN_QUERY_PERFORMANCE_COUNTER_KHR specifies the performance counter (QPC) time domain available on Windows. Timestamp values in this time domain are in the same units as those provided by the Windows QueryPerformanceCounter API and are comparable with platform timestamp values captured using that API as computed by this example:

    LARGE_INTEGER counter;
    QueryPerformanceCounter(&counter);
    return counter.QuadPart;

The `VkSwapchainCalibratedTimestampInfoEXT` structure is defined as:

    // Provided by VK_EXT_present_timing
    typedef struct VkSwapchainCalibratedTimestampInfoEXT {
        VkStructureType           sType;
        const void*               pNext;
        VkSwapchainKHR            swapchain;
        VkPresentStageFlagsEXT    presentStage;
        uint64_t                  timeDomainId;
    } VkSwapchainCalibratedTimestampInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `swapchain` is the swapchain to retrieve the swapchain-local timestamp from.

- `presentStage` is zero or a VkPresentStageFlagsEXT value used to identify a single present stage when calibrating a timestamp in the VK_TIME_DOMAIN_PRESENT_STAGE_LOCAL_EXT time domain.

- `timeDomainId` is the id for the opaque time domain being calibrated.

`timeDomainId` must be an id previously reported by vkGetSwapchainTimeDomainPropertiesEXT for `swapchain`. If the `timeDomainId` is no longer supported by the `swapchain`, implementations may report zero as the calibrated timestamp value.

Valid Usage

- VUID-VkSwapchainCalibratedTimestampInfoEXT-timeDomain-12228
  If the `timeDomain` member of the VkCalibratedTimestampInfoKHR structure in this structure’s `pNext` chain is VK_TIME_DOMAIN_PRESENT_STAGE_LOCAL_EXT, `presentStage` must specify one and only one present stage

Valid Usage (Implicit)

- VUID-VkSwapchainCalibratedTimestampInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SWAPCHAIN_CALIBRATED_TIMESTAMP_INFO_EXT

- VUID-VkSwapchainCalibratedTimestampInfoEXT-swapchain-parameter
  `swapchain` must be a valid VkSwapchainKHR handle

- VUID-VkSwapchainCalibratedTimestampInfoEXT-presentStage-parameter
  `presentStage` must be a valid combination of VkPresentStageFlagBitsEXT values

Structure Chaining

Extends the structure

  - VkCalibratedTimestampInfoKHR

## 8. Render Pass

Draw commands must be recorded within a render pass instance. Each render pass instance defines a set of image resources, referred to as attachments, used during rendering.

To begin a render pass instance, call:

    // Provided by VK_VERSION_1_3
    void vkCmdBeginRendering(
        VkCommandBuffer                             commandBuffer,
        const VkRenderingInfo*                      pRenderingInfo);

    // Provided by VK_KHR_dynamic_rendering
    // Equivalent to vkCmdBeginRendering
    void vkCmdBeginRenderingKHR(
        VkCommandBuffer                             commandBuffer,
        const VkRenderingInfo*                      pRenderingInfo);

- `commandBuffer` is the command buffer in which to record the command.

- `pRenderingInfo` is a pointer to a VkRenderingInfo structure specifying details of the render pass instance to begin.

After beginning a render pass instance, the command buffer is ready to record draw commands.

If `pRenderingInfo->flags` includes VK_RENDERING_RESUMING_BIT then this render pass is resumed from a render pass instance that has been suspended earlier in submission order.

If there is an instance of VkTileMemorySizeInfoQCOM included in the `pNext` chain of VkRenderingInfo, the structure is ignored.

Valid Usage

- VUID-vkCmdBeginRendering-dynamicRendering-06446
  The `dynamicRendering` feature must be enabled

- VUID-vkCmdBeginRendering-commandBuffer-06068
  If `commandBuffer` is a secondary command buffer, and the `nestedCommandBuffer` feature is not enabled, `pRenderingInfo->flags` must not include VK_RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT

- VUID-vkCmdBeginRendering-commandBuffer-10914
  If `commandBuffer` is a secondary command buffer, VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT must not have been set in VkCommandBufferBeginInfo::`flags` when `commandBuffer` began

- VUID-vkCmdBeginRendering-pRenderingInfo-09588
  If `pRenderingInfo->pDepthAttachment` is not `NULL` and `pRenderingInfo->pDepthAttachment->imageView` is not VK_NULL_HANDLE, when `pRenderingInfo->pDepthAttachment->imageView` is accessed it must be in the layout specified by `pRenderingInfo->pDepthAttachment->imageLayout`

- VUID-vkCmdBeginRendering-pRenderingInfo-09589
  If `pRenderingInfo->pDepthAttachment` is not `NULL`, `pRenderingInfo->pDepthAttachment->imageView` is not VK_NULL_HANDLE, `pRenderingInfo->pDepthAttachment->resolveMode` is not VK_RESOLVE_MODE_NONE, and `pRenderingInfo->pDepthAttachment->resolveImageView` is not VK_NULL_HANDLE, `pRenderingInfo->pDepthAttachment->resolveImageView` must be in the layout specified by `pRenderingInfo->pDepthAttachment->resolveImageLayout`

- VUID-vkCmdBeginRendering-pRenderingInfo-09590
  If `pRenderingInfo->pStencilAttachment` is not `NULL` and `pRenderingInfo->pStencilAttachment->imageView` is not VK_NULL_HANDLE, when `pRenderingInfo->pStencilAttachment->imageView` is accessed it must be in the layout specified by `pRenderingInfo->pStencilAttachment->imageLayout`

- VUID-vkCmdBeginRendering-pRenderingInfo-09591
  If `pRenderingInfo->pStencilAttachment` is not `NULL`, `pRenderingInfo->pStencilAttachment->imageView` is not VK_NULL_HANDLE, `pRenderingInfo->pStencilAttachment->resolveMode` is not VK_RESOLVE_MODE_NONE, and `pRenderingInfo->pStencilAttachment->resolveImageView` is not VK_NULL_HANDLE, `pRenderingInfo->pStencilAttachment->resolveImageView` must be in the layout specified by `pRenderingInfo->pStencilAttachment->resolveImageLayout`

- VUID-vkCmdBeginRendering-pRenderingInfo-09592
  For each element of `pRenderingInfo->pColorAttachments`, if `imageView` is not VK_NULL_HANDLE, when that image view is accessed it must be in the layout specified by the `imageLayout` member of that same element of `pRenderingInfo->pColorAttachments`

- VUID-vkCmdBeginRendering-pRenderingInfo-09593
  For each element of `pRenderingInfo->pColorAttachments`, if either `resolveMode` is VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, or `imageView` is not VK_NULL_HANDLE and `resolveMode` is not VK_RESOLVE_MODE_NONE, and `resolveImageView` is not VK_NULL_HANDLE, `resolveImageView` must be in the layout specified by `resolveImageLayout`

- VUID-vkCmdBeginRendering-flags-10641
  If VK_TILE_SHADING_RENDER_PASS_ENABLE_BIT_QCOM is included in VkRenderPassTileShadingCreateInfoQCOM::`flags`, `commandBuffer` must not have been recorded with VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT

- VUID-vkCmdBeginRendering-flags-10642
  VkRenderPassTileShadingCreateInfoQCOM::`flags` must not include VK_TILE_SHADING_RENDER_PASS_PER_TILE_EXECUTION_BIT_QCOM

- VUID-vkCmdBeginRendering-pRenderingInfo-11750
  If `pRenderingInfo->flags` contains VK_RENDERING_LOCAL_READ_CONCURRENT_ACCESS_CONTROL_BIT_KHR, `maintenance10` must be enabled

- VUID-vkCmdBeginRendering-pRenderingInfo-11751
  If `pRenderingInfo->flags` does not contain VK_RENDERING_LOCAL_READ_CONCURRENT_ACCESS_CONTROL_BIT_KHR, attachments must not specify VK_RENDERING_ATTACHMENT_INPUT_ATTACHMENT_FEEDBACK_BIT_KHR

- VUID-vkCmdBeginRendering-imageView-12276
  If VkRenderingFragmentDensityMapAttachmentInfoEXT::`imageView` is not equal to VK_NULL_HANDLE, when `imageView` is accessed it must be in the layout specified by VkRenderingFragmentDensityMapAttachmentInfoEXT::`imageLayout`

- VUID-vkCmdBeginRendering-imageView-12277
  If VkRenderingFragmentShadingRateAttachmentInfoKHR::`imageView` is not equal to VK_NULL_HANDLE, when `imageView` is accessed it must be in the layout specified by VkRenderingFragmentShadingRateAttachmentInfoKHR::`imageLayout`

Valid Usage (Implicit)

- VUID-vkCmdBeginRendering-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdBeginRendering-pRenderingInfo-parameter
  `pRenderingInfo` must be a valid pointer to a valid VkRenderingInfo structure

- VUID-vkCmdBeginRendering-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdBeginRendering-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdBeginRendering-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdBeginRendering-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdBeginRendering-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Outside | VK_QUEUE_GRAPHICS_BIT | Action State

Conditional Rendering

vkCmdBeginRendering is not affected by conditional rendering

The `VkRenderingInfo` structure is defined as:

    // Provided by VK_VERSION_1_3
    typedef struct VkRenderingInfo {
        VkStructureType                     sType;
        const void*                         pNext;
        VkRenderingFlags                    flags;
        VkRect2D                            renderArea;
        uint32_t                            layerCount;
        uint32_t                            viewMask;
        uint32_t                            colorAttachmentCount;
        const VkRenderingAttachmentInfo*    pColorAttachments;
        const VkRenderingAttachmentInfo*    pDepthAttachment;
        const VkRenderingAttachmentInfo*    pStencilAttachment;
    } VkRenderingInfo;

    // Provided by VK_KHR_dynamic_rendering, VK_QCOM_tile_properties with VK_KHR_dynamic_rendering or VK_VERSION_1_3
    // Equivalent to VkRenderingInfo
    typedef VkRenderingInfo VkRenderingInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask of VkRenderingFlagBits.

- `renderArea` is the render area that is affected by the render pass instance.

- `layerCount` is the number of layers rendered to in each attachment when `viewMask` is `0`.

- `viewMask` is a bitfield of view indices describing which views are active during rendering, when it is not `0`.

- `colorAttachmentCount` is the number of elements in `pColorAttachments`.

- `pColorAttachments` is a pointer to an array of `colorAttachmentCount` VkRenderingAttachmentInfo structures describing any color attachments used.

- `pDepthAttachment` is a pointer to a VkRenderingAttachmentInfo structure describing a depth attachment.

- `pStencilAttachment` is a pointer to a VkRenderingAttachmentInfo structure describing a stencil attachment.

If `viewMask` is not `0`, multiview is enabled.

If there is an instance of VkDeviceGroupRenderPassBeginInfo included in the `pNext` chain and its `deviceRenderAreaCount` member is not `0`, then `renderArea` is ignored, and the render area is defined per-device by that structure.

If multiview is enabled, and the `multiviewPerViewRenderAreas` feature is enabled, and there is an instance of VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM included in the `pNext` chain with `perViewRenderAreaCount` not equal to `0`, then the elements of VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM::`pPerViewRenderAreas` override `renderArea` and define a render area for each view. In this case, `renderArea` must be an area at least as large as the union of all the per-view render areas.

Each element of the `pColorAttachments` array corresponds to an output location in the shader, i.e. if the shader declares an output variable decorated with a `Location` value of X, then it uses the attachment provided in `pColorAttachments`[X]. If the `imageView` member of any element of `pColorAttachments` is VK_NULL_HANDLE, and `resolveMode` is not VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, writes to the corresponding location by a fragment are discarded.

The `aspectMask` of any image view specified for `pDepthAttachment` or `pStencilAttachment` is ignored. Instead, depth attachments are automatically treated as if VK_IMAGE_ASPECT_DEPTH_BIT was specified for their aspect masks, and stencil attachments are automatically treated as if VK_IMAGE_ASPECT_STENCIL_BIT was specified for their aspect masks.

Valid Usage

- VUID-VkRenderingInfo-viewMask-06069
  If `viewMask` is `0`, `layerCount` must not be `0`

- VUID-VkRenderingInfo-multisampledRenderToSingleSampled-06857
  If none of the following are enabled:

  - The `VK_AMD_mixed_attachment_samples` extension

  - The `VK_NV_framebuffer_mixed_samples` extension

  - The `multisampledRenderToSingleSampled` feature

  `imageView` members of `pDepthAttachment`, `pStencilAttachment`, and elements of `pColorAttachments` that are not VK_NULL_HANDLE must have been created with the same `sampleCount`

- VUID-VkRenderingInfo-imageView-09429
  `imageView` members of elements of `pColorAttachments` that are not VK_NULL_HANDLE must have been created with the same `sampleCount` , if the `multisampledRenderToSingleSampled` feature is not enabled

- VUID-VkRenderingInfo-None-08994
  If VkDeviceGroupRenderPassBeginInfo::`deviceRenderAreaCount` is 0, `renderArea.extent.width` must be greater than 0

- VUID-VkRenderingInfo-None-08995
  If VkDeviceGroupRenderPassBeginInfo::`deviceRenderAreaCount` is 0, `renderArea.extent.height` must be greater than 0

- VUID-VkRenderingInfo-imageView-06858
  If multisampled-render-to-single-sampled is enabled, then all attachments referenced by `imageView` members of `pDepthAttachment`, `pStencilAttachment`, and elements of `pColorAttachments` that are not VK_NULL_HANDLE must have a sample count that is either VK_SAMPLE_COUNT_1_BIT or equal to VkMultisampledRenderToSingleSampledInfoEXT::`rasterizationSamples`

- VUID-VkRenderingInfo-imageView-06859
  If multisampled-render-to-single-sampled is enabled, then all attachments referenced by `imageView` members of `pDepthAttachment`, `pStencilAttachment`, and elements of `pColorAttachments` that are not VK_NULL_HANDLE and have a sample count of VK_SAMPLE_COUNT_1_BIT must have been created with VK_IMAGE_CREATE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_BIT_EXT in their VkImageCreateInfo::`flags`

- VUID-VkRenderingInfo-pNext-06077
  If the `pNext` chain does not contain VkDeviceGroupRenderPassBeginInfo or its `deviceRenderAreaCount` member is equal to 0, `renderArea.offset.x` must be greater than or equal to 0

- VUID-VkRenderingInfo-pNext-06078
  If the `pNext` chain does not contain VkDeviceGroupRenderPassBeginInfo or its `deviceRenderAreaCount` member is equal to 0, `renderArea.offset.y` must be greater than or equal to 0

- VUID-VkRenderingInfo-pNext-07815
  If the `pNext` chain does not contain VkDeviceGroupRenderPassBeginInfo or its `deviceRenderAreaCount` member is equal to 0, the sum of `renderArea.extent.width` and `renderArea.offset.x` must be less than or equal to `maxFramebufferWidth`

- VUID-VkRenderingInfo-pNext-07816
  If the `pNext` chain does not contain VkDeviceGroupRenderPassBeginInfo or its `deviceRenderAreaCount` member is equal to 0, the sum of `renderArea.extent.height` and `renderArea.offset.y` must be less than or equal to `maxFramebufferHeight`

- VUID-VkRenderingInfo-pNext-06079
  If the `pNext` chain does not contain VkDeviceGroupRenderPassBeginInfo or its `deviceRenderAreaCount` member is equal to 0, the width of the `imageView` member of each element of `pColorAttachments`, `pDepthAttachment`, or `pStencilAttachment` that is not VK_NULL_HANDLE must be greater than or equal to `renderArea.offset.x` + `renderArea.extent.width`

- VUID-VkRenderingInfo-pNext-06080
  If the `pNext` chain does not contain VkDeviceGroupRenderPassBeginInfo or its `deviceRenderAreaCount` member is equal to 0, the height of the `imageView` member of each element of `pColorAttachments`, `pDepthAttachment`, or `pStencilAttachment` that is not VK_NULL_HANDLE must be greater than or equal to `renderArea.offset.y` + `renderArea.extent.height`

- VUID-VkRenderingInfo-pNext-06083
  If the `pNext` chain contains VkDeviceGroupRenderPassBeginInfo, the width of the `imageView` member of any element of `pColorAttachments`, `pDepthAttachment`, or `pStencilAttachment` that is not VK_NULL_HANDLE must be greater than or equal to the sum of the `offset.x` and `extent.width` members of each element of `pDeviceRenderAreas`

- VUID-VkRenderingInfo-pNext-06084
  If the `pNext` chain contains VkDeviceGroupRenderPassBeginInfo, the height of the `imageView` member of any element of `pColorAttachments`, `pDepthAttachment`, or `pStencilAttachment` that is not VK_NULL_HANDLE must be greater than or equal to the sum of the `offset.y` and `extent.height` members of each element of `pDeviceRenderAreas`

- VUID-VkRenderingInfo-pDepthAttachment-06085
  If neither `pDepthAttachment` or `pStencilAttachment` are `NULL` and the `imageView` member of either structure is not VK_NULL_HANDLE, the `imageView` member of each structure must be the same

- VUID-VkRenderingInfo-pDepthAttachment-06086
  If neither `pDepthAttachment` or `pStencilAttachment` are `NULL`, and the `resolveMode` member of each is not VK_RESOLVE_MODE_NONE, the `resolveImageView` member of each structure must be the same

- VUID-VkRenderingInfo-colorAttachmentCount-06087
  If `colorAttachmentCount` is not `0` and the `imageView` member of an element of `pColorAttachments` is not VK_NULL_HANDLE, that `imageView` must have been created with the VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT usage flag set

- VUID-VkRenderingInfo-colorAttachmentCount-09476
  If `colorAttachmentCount` is not `0` and there is an element of `pColorAttachments` with either its `resolveMode` member set to VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, or its `imageView` member not VK_NULL_HANDLE, its `resolveMode` member not set to VK_RESOLVE_MODE_NONE, and `resolveImageView` is not VK_NULL_HANDLE, then the `resolveImageView` member of that element of `pColorAttachments` must have been created with the VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT usage flag set

- VUID-VkRenderingInfo-pDepthAttachment-06547
  If `pDepthAttachment` is not `NULL` and `pDepthAttachment->imageView` is not VK_NULL_HANDLE, `pDepthAttachment->imageView` must have been created with a format that includes a depth component

- VUID-VkRenderingInfo-pDepthAttachment-06088
  If `pDepthAttachment` is not `NULL` and `pDepthAttachment->imageView` is not VK_NULL_HANDLE, `pDepthAttachment->imageView` must have been created with the VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT usage flag set

- VUID-VkRenderingInfo-pDepthAttachment-09477
  If `pDepthAttachment` is not `NULL`, `pDepthAttachment->resolveMode` is not VK_RESOLVE_MODE_NONE, and `pDepthAttachment->resolveImageView` is not VK_NULL_HANDLE, then `pDepthAttachment->resolveImageView` must have been created with the VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT usage flag set

- VUID-VkRenderingInfo-pStencilAttachment-06548
  If `pStencilAttachment` is not `NULL` and `pStencilAttachment->imageView` is not VK_NULL_HANDLE, `pStencilAttachment->imageView` must have been created with a format that includes a stencil aspect

- VUID-VkRenderingInfo-pStencilAttachment-06089
  If `pStencilAttachment` is not `NULL` and `pStencilAttachment->imageView` is not VK_NULL_HANDLE, `pStencilAttachment->imageView` must have been created with the VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT usage flag set

- VUID-VkRenderingInfo-pStencilAttachment-09478
  If `pStencilAttachment` is not `NULL`, `pStencilAttachment->resolveMode` is not VK_RESOLVE_MODE_NONE, and `pStencilAttachment->resolveImageView` is not VK_NULL_HANDLE, then `pStencilAttachment->resolveImageView` must have been created with the VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT usage flag set

- VUID-VkRenderingInfo-colorAttachmentCount-06090
  If `colorAttachmentCount` is not `0` and the `imageView` member of an element of `pColorAttachments` is not VK_NULL_HANDLE, the `layout` member of that element of `pColorAttachments` must not be VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL or VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL

- VUID-VkRenderingInfo-colorAttachmentCount-06091
  If `colorAttachmentCount` is not `0` and the `imageView` member of an element of `pColorAttachments` is not VK_NULL_HANDLE, if the `resolveMode` member of that element of `pColorAttachments` is not VK_RESOLVE_MODE_NONE, its `resolveImageLayout` member must not be VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL or VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL

- VUID-VkRenderingInfo-pDepthAttachment-06092
  If `pDepthAttachment` is not `NULL` and `pDepthAttachment->imageView` is not VK_NULL_HANDLE, `pDepthAttachment->layout` must not be VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL

- VUID-VkRenderingInfo-pDepthAttachment-06093
  If `pDepthAttachment` is not `NULL`, `pDepthAttachment->imageView` is not VK_NULL_HANDLE, and `pDepthAttachment->resolveMode` is not VK_RESOLVE_MODE_NONE, `pDepthAttachment->resolveImageLayout` must not be VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL

- VUID-VkRenderingInfo-pStencilAttachment-06094
  If `pStencilAttachment` is not `NULL` and `pStencilAttachment->imageView` is not VK_NULL_HANDLE, `pStencilAttachment->layout` must not be VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL

- VUID-VkRenderingInfo-flags-11514
  If `flags` contains VK_RENDERING_CUSTOM_RESOLVE_BIT_EXT or VK_RENDERING_FRAGMENT_REGION_BIT_EXT, then the `customResolve` feature must enabled

- VUID-VkRenderingInfo-pColorAttachments-11515
  For any element of `pColorAttachments`, `pDepthAttachment`, or `pStencilAttachment`, if `resolveMode` contains VK_RESOLVE_MODE_CUSTOM_BIT_EXT, then `flags` must contain VK_RENDERING_CUSTOM_RESOLVE_BIT_EXT

- VUID-VkRenderingInfo-flags-11516
  If `flags` contains VK_RENDERING_CUSTOM_RESOLVE_BIT_EXT, then for any element of `pColorAttachments`, `pDepthAttachment`, or `pStencilAttachment`, `resolveMode` must be VK_RESOLVE_MODE_CUSTOM_BIT_EXT or VK_RESOLVE_MODE_NONE

- VUID-VkRenderingInfo-pStencilAttachment-06095
  If `pStencilAttachment` is not `NULL`, `pStencilAttachment->imageView` is not VK_NULL_HANDLE, and `pStencilAttachment->resolveMode` is not VK_RESOLVE_MODE_NONE, `pStencilAttachment->resolveImageLayout` must not be VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL

- VUID-VkRenderingInfo-layerCount-07817
  `layerCount` must be less than or equal to `maxFramebufferLayers`

- VUID-VkRenderingInfo-viewMask-10859
  If `viewMask` is `0`, each `pColorAttachment->imageView` and `pColorAttachment->resolveImageView` that is not VK_NULL_HANDLE must have a `layerCount` that is greater than or equal to `VkRenderingInfo`::`layerCount`

- VUID-VkRenderingInfo-viewMask-10860
  If `viewMask` is `0`, each `pDepthAttachment->imageView` and `pDepthAttachment->resolveImageView` that is not VK_NULL_HANDLE must have a `layerCount` that is greater than or equal to `VkRenderingInfo`::`layerCount`

- VUID-VkRenderingInfo-viewMask-10861
  If `viewMask` is `0`, each `pStencilAttachment->imageView` and `pStencilAttachment->resolveImageView` that is not VK_NULL_HANDLE must have a `layerCount` that is greater than or equal to `VkRenderingInfo`::`layerCount`

- VUID-VkRenderingInfo-viewMask-12403
  If `viewMask` is not `0`, each `pColorAttachment->imageView` and `pColorAttachment->resolveImageView` that is not VK_NULL_HANDLE must have a `layerCount` that is greater than the index of the most significant bit in `viewMask`

- VUID-VkRenderingInfo-viewMask-12404
  If `viewMask` is not `0`, each `pDepthAttachment->imageView` and `pDepthAttachment->resolveImageView` that is not VK_NULL_HANDLE must have a `layerCount` that is greater than the index of the most significant bit in `viewMask`

- VUID-VkRenderingInfo-viewMask-12405
  If `viewMask` is not `0`, each `pStencilAttachment->imageView` and `pStencilAttachment->resolveImageView` that is not VK_NULL_HANDLE must have a `layerCount` that is greater than the index of the most significant bit in `viewMask`

- VUID-VkRenderingInfo-colorAttachmentCount-06096
  If `colorAttachmentCount` is not `0` and the `imageView` member of an element of `pColorAttachments` is not VK_NULL_HANDLE, the `layout` member of that element of `pColorAttachments` must not be VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL or VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL

- VUID-VkRenderingInfo-colorAttachmentCount-06097
  If `colorAttachmentCount` is not `0` and the `imageView` member of an element of `pColorAttachments` is not VK_NULL_HANDLE, if the `resolveMode` member of that element of `pColorAttachments` is not VK_RESOLVE_MODE_NONE, its `resolveImageLayout` member must not be VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL or VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL

- VUID-VkRenderingInfo-pDepthAttachment-06098
  If `pDepthAttachment` is not `NULL`, `pDepthAttachment->imageView` is not VK_NULL_HANDLE, and `pDepthAttachment->resolveMode` is not VK_RESOLVE_MODE_NONE, `pDepthAttachment->resolveImageLayout` must not be VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL

- VUID-VkRenderingInfo-pStencilAttachment-06099
  If `pStencilAttachment` is not `NULL`, `pStencilAttachment->imageView` is not VK_NULL_HANDLE, and `pStencilAttachment->resolveMode` is not VK_RESOLVE_MODE_NONE, `pStencilAttachment->resolveImageLayout` must not be VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL

- VUID-VkRenderingInfo-colorAttachmentCount-06100
  If `colorAttachmentCount` is not `0` and the `imageView` member of an element of `pColorAttachments` is not VK_NULL_HANDLE, the `layout` member of that element of `pColorAttachments` must not be VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL, VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL, or VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL

- VUID-VkRenderingInfo-colorAttachmentCount-06101
  If `colorAttachmentCount` is not `0` and the `imageView` member of an element of `pColorAttachments` is not VK_NULL_HANDLE, if the `resolveMode` member of that element of `pColorAttachments` is not VK_RESOLVE_MODE_NONE, its `resolveImageLayout` member must not be VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL, VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL, or VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL

- VUID-VkRenderingInfo-pDepthAttachment-07732
  If `pDepthAttachment` is not `NULL` and `pDepthAttachment->imageView` is not VK_NULL_HANDLE, `pDepthAttachment->layout` must not be VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL or VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL

- VUID-VkRenderingInfo-pDepthAttachment-07733
  If `pDepthAttachment` is not `NULL`, `pDepthAttachment->imageView` is not VK_NULL_HANDLE, and `pDepthAttachment->resolveMode` is not VK_RESOLVE_MODE_NONE, `pDepthAttachment->resolveImageLayout` must not be VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL or VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL

- VUID-VkRenderingInfo-pStencilAttachment-07734
  If `pStencilAttachment` is not `NULL` and `pStencilAttachment->imageView` is not VK_NULL_HANDLE, `pStencilAttachment->layout` must not be VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL or VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL

- VUID-VkRenderingInfo-pStencilAttachment-07735
  If `pStencilAttachment` is not `NULL`, `pStencilAttachment->imageView` is not VK_NULL_HANDLE, and `pStencilAttachment->resolveMode` is not VK_RESOLVE_MODE_NONE, `pStencilAttachment->resolveImageLayout` must not be VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL or VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL

- VUID-VkRenderingInfo-pDepthAttachment-06102
  If `pDepthAttachment` is not `NULL` and `pDepthAttachment->imageView` is not VK_NULL_HANDLE, `pDepthAttachment->resolveMode` must be one of the bits set in VkPhysicalDeviceDepthStencilResolveProperties::`supportedDepthResolveModes`

- VUID-VkRenderingInfo-pStencilAttachment-06103
  If `pStencilAttachment` is not `NULL` and `pStencilAttachment->imageView` is not VK_NULL_HANDLE, `pStencilAttachment->resolveMode` must be one of the bits set in VkPhysicalDeviceDepthStencilResolveProperties::`supportedStencilResolveModes`

- VUID-VkRenderingInfo-pDepthAttachment-06104
  If `pDepthAttachment` or `pStencilAttachment` are both not `NULL`, `pDepthAttachment->imageView` and `pStencilAttachment->imageView` are both not VK_NULL_HANDLE, and VkPhysicalDeviceDepthStencilResolveProperties::`independentResolveNone` is VK_FALSE, the `resolveMode` of both structures must be the same value

- VUID-VkRenderingInfo-pDepthAttachment-06105
  If `pDepthAttachment` or `pStencilAttachment` are both not `NULL`, `pDepthAttachment->imageView` and `pStencilAttachment->imageView` are both not VK_NULL_HANDLE, VkPhysicalDeviceDepthStencilResolveProperties::`independentResolve` is VK_FALSE, and the `resolveMode` of neither structure is VK_RESOLVE_MODE_NONE, the `resolveMode` of both structures must be the same value

- VUID-VkRenderingInfo-colorAttachmentCount-06106
  `colorAttachmentCount` must be less than or equal to VkPhysicalDeviceLimits::`maxColorAttachments`

- VUID-VkRenderingInfo-imageView-06107
  If the `imageView` member of a VkRenderingFragmentDensityMapAttachmentInfoEXT structure included in the `pNext` chain is not VK_NULL_HANDLE, and the `fragmentDensityMapNonSubsampledImages` feature is not enabled, valid `imageView` and `resolveImageView` members of `pDepthAttachment`, `pStencilAttachment`, and each element of `pColorAttachments` must be a VkImageView created with VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT

- VUID-VkRenderingInfo-imageView-06108
  If the `imageView` member of a VkRenderingFragmentDensityMapAttachmentInfoEXT structure included in the `pNext` chain is not VK_NULL_HANDLE, and `viewMask` is not `0`, `imageView` must have a `layerCount` greater than the index of the most significant bit in `viewMask`

- VUID-VkRenderingInfo-imageView-06109
  If the `imageView` member of a VkRenderingFragmentDensityMapAttachmentInfoEXT structure included in the `pNext` chain is not VK_NULL_HANDLE, and `viewMask` is `0`, `imageView` must have a `layerCount` equal to `1`

- VUID-VkRenderingInfo-pNext-06112
  If the `pNext` chain does not contain VkDeviceGroupRenderPassBeginInfo or its `deviceRenderAreaCount` member is equal to 0 and the `imageView` member of a VkRenderingFragmentDensityMapAttachmentInfoEXT structure included in the `pNext` chain is not VK_NULL_HANDLE, `imageView` must have a width greater than or equal to ⌈max F r a g mentDensit y T exe lS i z e w idth​rend er Area x​+rend er Area w idth​​⌉

- VUID-VkRenderingInfo-pNext-06114
  If the `pNext` chain does not contain VkDeviceGroupRenderPassBeginInfo or its `deviceRenderAreaCount` member is equal to 0 and the `imageView` member of a VkRenderingFragmentDensityMapAttachmentInfoEXT structure included in the `pNext` chain is not VK_NULL_HANDLE, `imageView` must have a height greater than or equal to ⌈max F r a g mentDensit y T exe lS i z e hei g ht​rend er Area y​+rend er Area hei g ht​​⌉

- VUID-VkRenderingInfo-pNext-06113
  If the `pNext` chain contains a VkDeviceGroupRenderPassBeginInfo structure, its `deviceRenderAreaCount` member is not 0, and the `imageView` member of a VkRenderingFragmentDensityMapAttachmentInfoEXT structure included in the `pNext` chain is not VK_NULL_HANDLE, `imageView` must have a width greater than or equal to ⌈max F r a g mentDensit y T exe lS i z e w idth​pDe v ice R end er Areas x​+pDe v ice R end er Areas w idth​​⌉ for each element of `pDeviceRenderAreas`

- VUID-VkRenderingInfo-pNext-06115
  If the `pNext` chain contains a VkDeviceGroupRenderPassBeginInfo structure, its `deviceRenderAreaCount` member is not 0, and the `imageView` member of a VkRenderingFragmentDensityMapAttachmentInfoEXT structure included in the `pNext` chain is not VK_NULL_HANDLE, `imageView` must have a height greater than or equal to ⌈max F r a g mentDensit y T exe lS i z e hei g ht​pDe v ice R end er Areas y​+pDe v ice R end er Areas hei g ht​​⌉ for each element of `pDeviceRenderAreas`

- VUID-VkRenderingInfo-imageView-06116
  If the `imageView` member of a VkRenderingFragmentDensityMapAttachmentInfoEXT structure included in the `pNext` chain is not VK_NULL_HANDLE, it must not be equal to the `imageView` or `resolveImageView` member of `pDepthAttachment`, `pStencilAttachment`, or any element of `pColorAttachments`

- VUID-VkRenderingInfo-flags-10826
  If `flags` contains VK_RENDERING_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE, then `layerCount` must be less than or equal to `maxFragmentDensityMapLayers`

- VUID-VkRenderingInfo-fragmentDensityMapLayered-10827
  If the `fragmentDensityMapLayered` feature is not enabled, `flags` must not contain VK_RENDERING_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE

- VUID-VkRenderingInfo-pNext-06119
  If the `maintenance7` feature is not enabled or the `robustFragmentShadingRateAttachmentAccess` limit is VK_FALSE or the `imageView` member of a VkRenderingFragmentShadingRateAttachmentInfoKHR structure was created with VkImageSubresourceRange::`baseMipLevel` greater than 0, the `pNext` chain does not contain VkDeviceGroupRenderPassBeginInfo or its `deviceRenderAreaCount` member is equal to 0, and the `imageView` member of a VkRenderingFragmentShadingRateAttachmentInfoKHR structure included in the `pNext` chain is not VK_NULL_HANDLE, `imageView` must have a width greater than or equal to ⌈shadin g R ateAttachmen tT exe lS i z e w idth​rend er Area x​+rend er Area w idth​​⌉

- VUID-VkRenderingInfo-pNext-06121
  If the `maintenance7` feature is not enabled or the `robustFragmentShadingRateAttachmentAccess` limit is VK_FALSE or the `imageView` member of a VkRenderingFragmentShadingRateAttachmentInfoKHR structure was created with VkImageSubresourceRange::`baseMipLevel` greater than 0, the `pNext` chain does not contain VkDeviceGroupRenderPassBeginInfo or its `deviceRenderAreaCount` member is equal to 0 and the `imageView` member of a VkRenderingFragmentShadingRateAttachmentInfoKHR structure included in the `pNext` chain is not VK_NULL_HANDLE, `imageView` must have a height greater than or equal to ⌈shadin g R ateAttachmen tT exe lS i z e hei g ht​rend er Area y​+rend er Area hei g ht​​⌉

- VUID-VkRenderingInfo-pNext-06120
  If the `maintenance7` feature is not enabled or the `robustFragmentShadingRateAttachmentAccess` limit is VK_FALSE or the `imageView` member of a VkRenderingFragmentShadingRateAttachmentInfoKHR structure was created with VkImageSubresourceRange::`baseMipLevel` greater than 0, the `pNext` chain contains a VkDeviceGroupRenderPassBeginInfo structure, its `deviceRenderAreaCount` member is not 0, and the `imageView` member of a VkRenderingFragmentShadingRateAttachmentInfoKHR structure included in the `pNext` chain is not VK_NULL_HANDLE, `imageView` must have a width greater than or equal to ⌈shadin g R ateAttachmen tT exe lS i z e w idth​pDe v ice R end er Areas x​+pDe v ice R end er Areas w idth​​⌉ for each element of `pDeviceRenderAreas`

- VUID-VkRenderingInfo-pNext-06122
  If the `maintenance7` feature is not enabled or the `robustFragmentShadingRateAttachmentAccess` limit is VK_FALSE or the `imageView` member of a VkRenderingFragmentShadingRateAttachmentInfoKHR structure was created with VkImageSubresourceRange::`baseMipLevel` greater than 0, the `pNext` chain contains a VkDeviceGroupRenderPassBeginInfo structure, its `deviceRenderAreaCount` member is not 0, and the `imageView` member of a VkRenderingFragmentShadingRateAttachmentInfoKHR structure included in the `pNext` chain is not VK_NULL_HANDLE, `imageView` must have a height greater than or equal to ⌈shadin g R ateAttachmen tT exe lS i z e hei g ht​pDe v ice R end er Areas y​+pDe v ice R end er Areas hei g ht​​⌉ for each element of `pDeviceRenderAreas`

- VUID-VkRenderingInfo-imageView-06123
  If the `imageView` member of a VkRenderingFragmentShadingRateAttachmentInfoKHR structure included in the `pNext` chain is not VK_NULL_HANDLE, and `viewMask` is `0`, `imageView` must have a `layerCount` that is either equal to `1` or greater than or equal to `VkRenderingInfo`::`layerCount`

- VUID-VkRenderingInfo-imageView-06124
  If the `imageView` member of a VkRenderingFragmentShadingRateAttachmentInfoKHR structure included in the `pNext` chain is not VK_NULL_HANDLE, and `viewMask` is not `0`, `imageView` must have a `layerCount` that is either equal to `1` or greater than the index of the most significant bit in `viewMask`

- VUID-VkRenderingInfo-imageView-06125
  If the `imageView` member of a VkRenderingFragmentShadingRateAttachmentInfoKHR structure included in the `pNext` chain is not VK_NULL_HANDLE, it must not be equal to the `imageView` or `resolveImageView` member of `pDepthAttachment`, `pStencilAttachment`, or any element of `pColorAttachments`

- VUID-VkRenderingInfo-imageView-06126
  If the `imageView` member of a VkRenderingFragmentShadingRateAttachmentInfoKHR structure included in the `pNext` chain is not VK_NULL_HANDLE, it must not be equal to the `imageView` member of a VkRenderingFragmentDensityMapAttachmentInfoEXT structure included in the `pNext` chain

- VUID-VkRenderingInfo-multiview-06127
  If the `multiview` feature is not enabled, `viewMask` must be `0`

- VUID-VkRenderingInfo-viewMask-06128
  The index of the most significant bit in `viewMask` must be less than `maxMultiviewViewCount`

- VUID-VkRenderingInfo-perViewRenderAreaCount-07857
  If the `perViewRenderAreaCount` member of a VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM structure included in the `pNext` chain is not `0`, then the `multiviewPerViewRenderAreas` feature must be enabled

- VUID-VkRenderingInfo-perViewRenderAreaCount-07858
  If the `perViewRenderAreaCount` member of a VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM structure included in the `pNext` chain is not `0`, then `renderArea` must specify a render area that includes the union of all per view render areas

- VUID-VkRenderingInfo-None-09044
  Valid attachments specified by this structure must not be bound to memory locations that are bound to any other valid attachments specified by this structure

- VUID-VkRenderingInfo-flags-10012
  If `flags` includes VK_RENDERING_CONTENTS_INLINE_BIT_KHR then at least one of the following features must be enabled

  - `maintenance7`

  - `nestedCommandBuffer`

- VUID-VkRenderingInfo-pDepthAttachment-09318
  `pDepthAttachment->resolveMode` must not be VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID

- VUID-VkRenderingInfo-pStencilAttachment-09319
  `pStencilAttachment->resolveMode` must not be VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID

- VUID-VkRenderingInfo-colorAttachmentCount-09320
  If `colorAttachmentCount` is not `1`, the `resolveMode` member of any element of `pColorAttachments` must not be VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID

- VUID-VkRenderingInfo-resolveMode-09321
  If the `resolveMode` of any element of `pColorAttachments` is VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, VkRenderingFragmentDensityMapAttachmentInfoEXT::`imageView` must be VK_NULL_HANDLE

- VUID-VkRenderingInfo-resolveMode-09322
  If the `resolveMode` of any element of `pColorAttachments` is VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, VkRenderingFragmentShadingRateAttachmentInfoKHR::`imageView` must be VK_NULL_HANDLE

- VUID-VkRenderingInfo-pNext-09535
  If the `pNext` chain contains a VkRenderPassStripeBeginInfoARM structure, the union of stripe areas defined by the elements of VkRenderPassStripeBeginInfoARM::`pStripeInfos` must cover the `renderArea`

- VUID-VkRenderingInfo-colorAttachmentCount-09479
  If `colorAttachmentCount` is not `0` and the `imageView` member of an element of `pColorAttachments` is not VK_NULL_HANDLE, that `imageView` must have been created with the identity swizzle

- VUID-VkRenderingInfo-colorAttachmentCount-09480
  If `colorAttachmentCount` is not `0`, and there is an element of `pColorAttachments` with either its `resolveMode` member set to VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, or its `imageView` member not set to VK_NULL_HANDLE, its `resolveMode` member not set to VK_RESOLVE_MODE_NONE, and `resolveImageView` is not VK_NULL_HANDLE, then the `resolveImageView` member of that element of `pColorAttachments` must have been created with the identity swizzle

- VUID-VkRenderingInfo-pDepthAttachment-09481
  If `pDepthAttachment` is not `NULL` and `pDepthAttachment->imageView` is not VK_NULL_HANDLE, `pDepthAttachment->imageView` must have been created with the identity swizzle

- VUID-VkRenderingInfo-pDepthAttachment-09482
  If `pDepthAttachment` is not `NULL`, `pDepthAttachment->imageView` is not VK_NULL_HANDLE, `pDepthAttachment->resolveMode` is not VK_RESOLVE_MODE_NONE, and `pDepthAttachment->resolveImageView` is not VK_NULL_HANDLE, `pDepthAttachment->resolveImageView` must have been created with the identity swizzle

- VUID-VkRenderingInfo-pStencilAttachment-09483
  If `pStencilAttachment` is not `NULL` and `pStencilAttachment->imageView` is not VK_NULL_HANDLE, `pStencilAttachment->imageView` must have been created with the identity swizzle

- VUID-VkRenderingInfo-pStencilAttachment-09484
  If `pStencilAttachment` is not `NULL`, `pStencilAttachment->imageView` is not VK_NULL_HANDLE, `pStencilAttachment->resolveMode` is not VK_RESOLVE_MODE_NONE, and `pStencilAttachment->resolveImageView` is not VK_NULL_HANDLE, `pStencilAttachment->resolveImageView` must have been created with the identity swizzle

- VUID-VkRenderingInfo-imageView-09485
  If the `imageView` member of a VkRenderingFragmentShadingRateAttachmentInfoKHR structure included in the `pNext` chain is not VK_NULL_HANDLE, it must have been created with the identity swizzle

- VUID-VkRenderingInfo-imageView-09486
  If the `imageView` member of a VkRenderingFragmentDensityMapAttachmentInfoEXT structure included in the `pNext` chain is not VK_NULL_HANDLE, it must have been created with the identity swizzle

- VUID-VkRenderingInfo-imageView-10643
  If the `imageView` member of a VkRenderingFragmentDensityMapAttachmentInfoEXT structure included in the `pNext` chain is not VK_NULL_HANDLE, VK_TILE_SHADING_RENDER_PASS_ENABLE_BIT_QCOM must not be included in VkRenderPassTileShadingCreateInfoQCOM::`flags`

- VUID-VkRenderingInfo-resolveMode-10644
  If the `resolveMode` of any element of `pColorAttachments` is VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, VK_TILE_SHADING_RENDER_PASS_ENABLE_BIT_QCOM must not be included in VkRenderPassTileShadingCreateInfoQCOM::`flags`

Valid Usage (Implicit)

- VUID-VkRenderingInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_RENDERING_INFO

- VUID-VkRenderingInfo-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkDeviceGroupRenderPassBeginInfo, VkMultisampledRenderToSingleSampledInfoEXT, VkMultiviewPerViewAttributesInfoNVX, VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM, VkRenderPassPerformanceCountersByRegionBeginInfoARM, VkRenderPassStripeBeginInfoARM, VkRenderPassTileShadingCreateInfoQCOM, VkRenderingFragmentDensityMapAttachmentInfoEXT, VkRenderingFragmentShadingRateAttachmentInfoKHR, or VkTileMemorySizeInfoQCOM

- VUID-VkRenderingInfo-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkRenderingInfo-flags-parameter
  `flags` must be a valid combination of VkRenderingFlagBits values

- VUID-VkRenderingInfo-pColorAttachments-parameter
  If `colorAttachmentCount` is not `0`, `pColorAttachments` must be a valid pointer to an array of `colorAttachmentCount` valid VkRenderingAttachmentInfo structures

- VUID-VkRenderingInfo-pDepthAttachment-parameter
  If `pDepthAttachment` is not `NULL`, `pDepthAttachment` must be a valid pointer to a valid VkRenderingAttachmentInfo structure

- VUID-VkRenderingInfo-pStencilAttachment-parameter
  If `pStencilAttachment` is not `NULL`, `pStencilAttachment` must be a valid pointer to a valid VkRenderingAttachmentInfo structure

Bits which can be set in VkRenderingInfo::`flags` describing additional properties of the render pass are:

    // Provided by VK_VERSION_1_3
    typedef enum VkRenderingFlagBits {
        VK_RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT = 0x00000001,
        VK_RENDERING_SUSPENDING_BIT = 0x00000002,
        VK_RENDERING_RESUMING_BIT = 0x00000004,
      // Provided by VK_EXT_legacy_dithering with (VK_KHR_dynamic_rendering or VK_VERSION_1_3) and (VK_VERSION_1_4 or VK_KHR_extended_flags or VK_KHR_maintenance5)
        VK_RENDERING_ENABLE_LEGACY_DITHERING_BIT_EXT = 0x00000008,
      // Provided by VK_KHR_maintenance7
        VK_RENDERING_CONTENTS_INLINE_BIT_KHR = 0x00000010,
      // Provided by VK_VALVE_fragment_density_map_layered
        VK_RENDERING_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE = 0x00000020,
      // Provided by VK_EXT_custom_resolve with VK_KHR_dynamic_rendering or VK_VERSION_1_3
        VK_RENDERING_FRAGMENT_REGION_BIT_EXT = 0x00000040,
      // Provided by VK_EXT_custom_resolve with VK_KHR_dynamic_rendering or VK_VERSION_1_3
        VK_RENDERING_CUSTOM_RESOLVE_BIT_EXT = 0x00000080,
      // Provided by VK_KHR_maintenance10 with (VK_VERSION_1_4 or VK_KHR_dynamic_rendering_local_read) and (VK_VERSION_1_3 or VK_KHR_dynamic_rendering)
        VK_RENDERING_LOCAL_READ_CONCURRENT_ACCESS_CONTROL_BIT_KHR = 0x00000100,
      // Provided by VK_KHR_dynamic_rendering
        VK_RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT_KHR = VK_RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT,
      // Provided by VK_KHR_dynamic_rendering
        VK_RENDERING_SUSPENDING_BIT_KHR = VK_RENDERING_SUSPENDING_BIT,
      // Provided by VK_KHR_dynamic_rendering
        VK_RENDERING_RESUMING_BIT_KHR = VK_RENDERING_RESUMING_BIT,
      // Provided by VK_EXT_nested_command_buffer
        VK_RENDERING_CONTENTS_INLINE_BIT_EXT = VK_RENDERING_CONTENTS_INLINE_BIT_KHR,
    } VkRenderingFlagBits;

    // Provided by VK_KHR_dynamic_rendering
    // Equivalent to VkRenderingFlagBits
    typedef VkRenderingFlagBits VkRenderingFlagBitsKHR;

- VK_RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT specifies that contents for the render pass instance will be recorded in secondary command buffers, and vkCmdExecuteCommands is the only valid command in the command buffer until vkCmdEndRendering2KHR or vkCmdEndRendering. If the `nestedCommandBuffer` feature is enabled, the contents can come from both inline and vkCmdExecuteCommands.

- VK_RENDERING_RESUMING_BIT specifies that the render pass instance is resuming an earlier suspended render pass instance.

- VK_RENDERING_SUSPENDING_BIT specifies that the render pass instance will be suspended.

- VK_RENDERING_ENABLE_LEGACY_DITHERING_BIT_EXT specifies that Legacy Dithering is enabled for the render pass instance.

- VK_RENDERING_CONTENTS_INLINE_BIT_KHR specifies that contents for the render pass instance can be recorded inline within the current command buffer. This can be combined with the VK_RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT bit to allow contents to be recorded both inline and in secondary command buffers.

- VK_RENDERING_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE specifies that the render pass can be used with layered fragment density maps.

- VK_RENDERING_LOCAL_READ_CONCURRENT_ACCESS_CONTROL_BIT_KHR specifies that VK_RENDERING_ATTACHMENT_INPUT_ATTACHMENT_FEEDBACK_BIT_KHR will always be specified for any attachment which invokes the behavior described by that flag.

- VK_RENDERING_FRAGMENT_REGION_BIT_EXT specifies that the render pass can access samples which are not covered in its `SampleMask`.

- VK_RENDERING_CUSTOM_RESOLVE_BIT_EXT specifies that the render pass contains a custom resolve. When this bit is set, vkCmdBeginCustomResolveEXT can be called.

The contents of `pRenderingInfo` must match between suspended render pass instances and the render pass instances that resume them, other than the presence or absence of the VK_RENDERING_RESUMING_BIT, VK_RENDERING_SUSPENDING_BIT, and VK_RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT flags. No action or synchronization commands, or other render pass instances, are allowed between suspending and resuming render pass instances.

    // Provided by VK_VERSION_1_3
    typedef VkFlags VkRenderingFlags;

    // Provided by VK_KHR_dynamic_rendering
    // Equivalent to VkRenderingFlags
    typedef VkRenderingFlags VkRenderingFlagsKHR;

`VkRenderingFlags` is a bitmask type for setting a mask of zero or more VkRenderingFlagBits.

The `VkRenderingAttachmentInfo` structure is defined as:

    // Provided by VK_VERSION_1_3
    typedef struct VkRenderingAttachmentInfo {
        VkStructureType          sType;
        const void*              pNext;
        VkImageView              imageView;
        VkImageLayout            imageLayout;
        VkResolveModeFlagBits    resolveMode;
        VkImageView              resolveImageView;
        VkImageLayout            resolveImageLayout;
        VkAttachmentLoadOp       loadOp;
        VkAttachmentStoreOp      storeOp;
        VkClearValue             clearValue;
    } VkRenderingAttachmentInfo;

    // Provided by VK_KHR_dynamic_rendering
    // Equivalent to VkRenderingAttachmentInfo
    typedef VkRenderingAttachmentInfo VkRenderingAttachmentInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `imageView` is the image view that will be used for rendering.

- `imageLayout` is the layout that `imageView` will be in during rendering.

- `resolveMode` is a VkResolveModeFlagBits value defining how data written to `imageView` will be resolved into `resolveImageView`.

- `resolveImageView` is an image view used to write resolved data at the end of rendering.

- `resolveImageLayout` is the layout that `resolveImageView` will be in during rendering.

- `loadOp` is a VkAttachmentLoadOp value defining the load operation for the attachment.

- `storeOp` is a VkAttachmentStoreOp value defining the store operation for the attachment.

- `clearValue` is a VkClearValue structure defining values used to clear `imageView` when `loadOp` is VK_ATTACHMENT_LOAD_OP_CLEAR.

Values in `imageView` are loaded and stored according to the values of `loadOp` and `storeOp`, within the render area for each device specified in VkRenderingInfo. If `imageView` is VK_NULL_HANDLE, and `resolveMode` is not VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, other members of this structure are ignored; writes to this attachment will be discarded, and no load, store, or multisample resolve operations will be performed.

If `resolveMode` is VK_RESOLVE_MODE_NONE, then `resolveImageView` is ignored. If `resolveMode` is not VK_RESOLVE_MODE_NONE, and `resolveImageView` is not VK_NULL_HANDLE, a render pass multisample resolve operation is defined for the attachment subresource. If `resolveMode` is VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, and the `nullColorAttachmentWithExternalFormatResolve` limit is VK_TRUE, values are only undefined once load operations have completed.

The contents of a resolve attachment within the render area become undefined at the time vkCmdBeginCustomResolveEXT is called if all of the following conditions are true:

- VK_RENDERING_CUSTOM_RESOLVE_BIT_EXT is set.

- The attachment sets `resolveMode` to VK_RESOLVE_MODE_CUSTOM_BIT_EXT.

This affects color, depth, and stencil attachments. In addition, there is an implicit store operation of VK_ATTACHMENT_STORE_OP_STORE for these attachments.

Note | The resolve mode and store operation are independent; it is valid to write both resolved and unresolved values, and equally valid to discard the unresolved values while writing the resolved ones.

Store and resolve operations are only performed at the end of a render pass instance that does not specify the VK_RENDERING_SUSPENDING_BIT_KHR flag. If the VK_RENDERING_CUSTOM_RESOLVE_BIT_EXT is specified and an attachment uses the VK_RESOLVE_MODE_CUSTOM_BIT_EXT resolve mode, the resolve attachment will only be written by draws recorded following a call to vkCmdBeginCustomResolveEXT.

Load operations are only performed at the beginning of a render pass instance that does not specify the VK_RENDERING_RESUMING_BIT_KHR flag.

Image contents at the end of a suspended render pass instance remain defined for access by a resuming render pass instance.

If the `nullColorAttachmentWithExternalFormatResolve` limit is VK_TRUE, and `resolveMode` is VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, values in the color attachment will be loaded from the resolve attachment at the start of rendering, and may also be reloaded any time after a resolve occurs or the resolve attachment is written to; if this occurs it must happen-before any writes to the color attachment are performed which happen-after the resolve that triggers this. If any color component in the external format is subsampled, values will be read from the nearest sample in the image when they are loaded.

Valid Usage

- VUID-VkRenderingAttachmentInfo-imageView-06129
  If `imageView` is not VK_NULL_HANDLE and has a non-integer color format, `resolveMode` must be VK_RESOLVE_MODE_NONE or VK_RESOLVE_MODE_CUSTOM_BIT_EXT or VK_RESOLVE_MODE_AVERAGE_BIT

- VUID-VkRenderingAttachmentInfo-imageView-06130
  If `imageView` is not VK_NULL_HANDLE and has an integer color format, `resolveMode` must be VK_RESOLVE_MODE_NONE or VK_RESOLVE_MODE_CUSTOM_BIT_EXT or VK_RESOLVE_MODE_SAMPLE_ZERO_BIT

- VUID-VkRenderingAttachmentInfo-imageView-06861
  If all of the following are true:

  - `imageView` is not VK_NULL_HANDLE

  - `resolveMode` is not VK_RESOLVE_MODE_NONE

  - the `pNext` chain of VkRenderingInfo does not include a VkMultisampledRenderToSingleSampledInfoEXT structure with the `multisampledRenderToSingleSampledEnable` field equal to VK_TRUE

  `imageView` must not have a sample count of VK_SAMPLE_COUNT_1_BIT

- VUID-VkRenderingAttachmentInfo-imageView-06862
  If all of the following are true:

  - `imageView` is not VK_NULL_HANDLE

  - `resolveMode` is not VK_RESOLVE_MODE_NONE

  - the `pNext` chain of VkRenderingInfo does not include a VkMultisampledRenderToSingleSampledInfoEXT structure with the `multisampledRenderToSingleSampledEnable` field equal to VK_TRUE

  `resolveImageView` must not be VK_NULL_HANDLE

- VUID-VkRenderingAttachmentInfo-imageView-06863
  If `imageView` is not VK_NULL_HANDLE, `resolveMode` is not VK_RESOLVE_MODE_NONE, the `pNext` chain of VkRenderingInfo includes a VkMultisampledRenderToSingleSampledInfoEXT structure with the `multisampledRenderToSingleSampledEnable` field equal to VK_TRUE, and `imageView` has a sample count of VK_SAMPLE_COUNT_1_BIT, `resolveImageView` must be VK_NULL_HANDLE

- VUID-VkRenderingAttachmentInfo-None-12256
  If all of the following are true:

  - `imageView` is not VK_NULL_HANDLE

  - `imageView` has a sample count of VK_SAMPLE_COUNT_1_BIT

  - the `pNext` chain of VkRenderingInfo includes a VkMultisampledRenderToSingleSampledInfoEXT structure with the `multisampledRenderToSingleSampledEnable` field equal to VK_TRUE

  then `resolveMode` must not be VK_RESOLVE_MODE_NONE

- VUID-VkRenderingAttachmentInfo-imageView-06864
  If `imageView` is not VK_NULL_HANDLE, `resolveImageView` is not VK_NULL_HANDLE, and `resolveMode` is not VK_RESOLVE_MODE_NONE, `resolveImageView` must have a sample count of VK_SAMPLE_COUNT_1_BIT

- VUID-VkRenderingAttachmentInfo-imageView-06865
  If `imageView` is not VK_NULL_HANDLE, `resolveImageView` is not VK_NULL_HANDLE, and `resolveMode` is neither VK_RESOLVE_MODE_CUSTOM_BIT_EXT nor VK_RESOLVE_MODE_NONE, `imageView` and `resolveImageView` must have the same VkFormat

- VUID-VkRenderingAttachmentInfo-imageView-06135
  If `imageView` is not VK_NULL_HANDLE, `imageLayout` must not be VK_IMAGE_LAYOUT_UNDEFINED, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, VK_IMAGE_LAYOUT_ZERO_INITIALIZED_EXT, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, or VK_IMAGE_LAYOUT_PREINITIALIZED

- VUID-VkRenderingAttachmentInfo-imageView-06136
  If `imageView` is not VK_NULL_HANDLE and `resolveMode` is not VK_RESOLVE_MODE_NONE, `resolveImageLayout` must not be VK_IMAGE_LAYOUT_UNDEFINED, VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, VK_IMAGE_LAYOUT_ZERO_INITIALIZED_EXT, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, or VK_IMAGE_LAYOUT_PREINITIALIZED

- VUID-VkRenderingAttachmentInfo-imageView-06137
  If `imageView` is not VK_NULL_HANDLE and `resolveMode` is not VK_RESOLVE_MODE_NONE, `resolveImageLayout` must not be VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL or VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL

- VUID-VkRenderingAttachmentInfo-imageView-06138
  If `imageView` is not VK_NULL_HANDLE, `imageLayout` must not be VK_IMAGE_LAYOUT_SHADING_RATE_OPTIMAL_NV

- VUID-VkRenderingAttachmentInfo-imageView-06139
  If `imageView` is not VK_NULL_HANDLE and `resolveMode` is not VK_RESOLVE_MODE_NONE, `resolveImageLayout` must not be VK_IMAGE_LAYOUT_SHADING_RATE_OPTIMAL_NV

- VUID-VkRenderingAttachmentInfo-imageView-06140
  If `imageView` is not VK_NULL_HANDLE, `imageLayout` must not be VK_IMAGE_LAYOUT_FRAGMENT_DENSITY_MAP_OPTIMAL_EXT

- VUID-VkRenderingAttachmentInfo-imageView-06141
  If `imageView` is not VK_NULL_HANDLE and `resolveMode` is not VK_RESOLVE_MODE_NONE, `resolveImageLayout` must not be VK_IMAGE_LAYOUT_FRAGMENT_DENSITY_MAP_OPTIMAL_EXT

- VUID-VkRenderingAttachmentInfo-imageView-06142
  If `imageView` is not VK_NULL_HANDLE and `resolveMode` is not VK_RESOLVE_MODE_NONE, `resolveImageLayout` must not be VK_IMAGE_LAYOUT_READ_ONLY_OPTIMAL_KHR

- VUID-VkRenderingAttachmentInfo-imageView-06143
  If `imageView` is not VK_NULL_HANDLE, `imageLayout` must not be VK_IMAGE_LAYOUT_FRAGMENT_SHADING_RATE_ATTACHMENT_OPTIMAL_KHR

- VUID-VkRenderingAttachmentInfo-imageView-06144
  If `imageView` is not VK_NULL_HANDLE and `resolveMode` is not VK_RESOLVE_MODE_NONE, `resolveImageLayout` must not be VK_IMAGE_LAYOUT_FRAGMENT_SHADING_RATE_ATTACHMENT_OPTIMAL_KHR

- VUID-VkRenderingAttachmentInfo-imageView-10780
  If feedback loop is enabled for the attachment identified by `imageView`, then `imageView` must have been created with a `usage` value including VK_IMAGE_USAGE_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT, either VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT or VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, and either VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT or VK_IMAGE_USAGE_SAMPLED_BIT

- VUID-VkRenderingAttachmentInfo-imageView-06145
  If `imageView` is not VK_NULL_HANDLE, `imageLayout` must not be VK_IMAGE_LAYOUT_PRESENT_SRC_KHR

- VUID-VkRenderingAttachmentInfo-imageView-06146
  If `imageView` is not VK_NULL_HANDLE and `resolveMode` is not VK_RESOLVE_MODE_NONE, `resolveImageLayout` must not be VK_IMAGE_LAYOUT_PRESENT_SRC_KHR

- VUID-VkRenderingAttachmentInfo-externalFormatResolve-09323
  If the `externalFormatResolve` feature is not enabled, `resolveMode` must not be VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID

- VUID-VkRenderingAttachmentInfo-resolveMode-09324
  If `resolveMode` is VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, `resolveImageView` must be a valid image view

- VUID-VkRenderingAttachmentInfo-nullColorAttachmentWithExternalFormatResolve-09325
  If the `nullColorAttachmentWithExternalFormatResolve` property is VK_TRUE and `resolveMode` is VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, `resolveImageView` must have been created with an image with a `samples` value of VK_SAMPLE_COUNT_1_BIT

- VUID-VkRenderingAttachmentInfo-resolveMode-09326
  If `resolveMode` is VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, `resolveImageView` must have been created with an external format specified by VkExternalFormatANDROID

- VUID-VkRenderingAttachmentInfo-resolveMode-09327
  If `resolveMode` is VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, `resolveImageView` must have been created with a `subresourceRange.layerCount` of `1`

- VUID-VkRenderingAttachmentInfo-resolveMode-09328
  If `resolveMode` is VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID and `nullColorAttachmentWithExternalFormatResolve` is VK_TRUE, `imageView` must be VK_NULL_HANDLE

- VUID-VkRenderingAttachmentInfo-resolveMode-09329
  If `resolveMode` is VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID and `nullColorAttachmentWithExternalFormatResolve` is VK_FALSE, `imageView` must be a valid VkImageView

- VUID-VkRenderingAttachmentInfo-resolveMode-09330
  If `resolveMode` is VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID and `nullColorAttachmentWithExternalFormatResolve` is VK_FALSE, `imageView` must have a format equal to the value of VkAndroidHardwareBufferFormatResolvePropertiesANDROID::`colorAttachmentFormat` as returned by a call to vkGetAndroidHardwareBufferPropertiesANDROID for the Android hardware buffer that was used to create `resolveImageView`

- VUID-VkRenderingAttachmentInfo-resolveImageView-10728
  If `resolveImageView` is not VK_NULL_HANDLE, the underlying resource must not be bound to a `VkDeviceMemory` object allocated from a `VkMemoryHeap` with the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property

- VUID-VkRenderingAttachmentInfo-pNext-11752
  If the `pNext` chain includes a VkRenderingAttachmentFlagsInfoKHR structure, and `flags` includes VK_RENDERING_ATTACHMENT_RESOLVE_SKIP_TRANSFER_FUNCTION_BIT_KHR or VK_RENDERING_ATTACHMENT_RESOLVE_ENABLE_TRANSFER_FUNCTION_BIT_KHR, `imageView` must have a format using sRGB encoding

- VUID-VkRenderingAttachmentInfo-pNext-11753
  If the `pNext` chain includes a VkRenderingAttachmentFlagsInfoKHR structure, and `flags` includes VK_RENDERING_ATTACHMENT_RESOLVE_SKIP_TRANSFER_FUNCTION_BIT_KHR or VK_RENDERING_ATTACHMENT_RESOLVE_ENABLE_TRANSFER_FUNCTION_BIT_KHR, `resolveMode` must be equal to VK_RESOLVE_MODE_AVERAGE_BIT

- VUID-VkRenderingAttachmentInfo-pNext-11754
  If the `pNext` chain includes a VkRenderingAttachmentFlagsInfoKHR structure, and `flags` includes VK_RENDERING_ATTACHMENT_INPUT_ATTACHMENT_FEEDBACK_BIT_KHR, `imageView` must have an image that was created with the VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT usage flag set

- VUID-VkRenderingAttachmentInfo-imageView-12470
  If `imageView` is not VK_NULL_HANDLE, it must have been created with a VkImageViewCreateInfo::`viewType` not equal to VK_IMAGE_VIEW_TYPE_3D

- VUID-VkRenderingAttachmentInfo-resolveImageView-12471
  If `resolveImageView` is not VK_NULL_HANDLE, it must have been created with a VkImageViewCreateInfo::`viewType` not equal to VK_IMAGE_VIEW_TYPE_3D

Valid Usage (Implicit)

- VUID-VkRenderingAttachmentInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_RENDERING_ATTACHMENT_INFO

- VUID-VkRenderingAttachmentInfo-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkAttachmentFeedbackLoopInfoEXT or VkRenderingAttachmentFlagsInfoKHR

- VUID-VkRenderingAttachmentInfo-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkRenderingAttachmentInfo-imageView-parameter
  If `imageView` is not VK_NULL_HANDLE, `imageView` must be a valid VkImageView handle

- VUID-VkRenderingAttachmentInfo-imageLayout-parameter
  `imageLayout` must be a valid VkImageLayout value

- VUID-VkRenderingAttachmentInfo-resolveMode-parameter
  If `resolveMode` is not `0`, `resolveMode` must be a valid VkResolveModeFlagBits value

- VUID-VkRenderingAttachmentInfo-resolveImageView-parameter
  If `resolveImageView` is not VK_NULL_HANDLE, `resolveImageView` must be a valid VkImageView handle

- VUID-VkRenderingAttachmentInfo-resolveImageLayout-parameter
  `resolveImageLayout` must be a valid VkImageLayout value

- VUID-VkRenderingAttachmentInfo-loadOp-parameter
  `loadOp` must be a valid VkAttachmentLoadOp value

- VUID-VkRenderingAttachmentInfo-storeOp-parameter
  `storeOp` must be a valid VkAttachmentStoreOp value

- VUID-VkRenderingAttachmentInfo-clearValue-parameter
  `clearValue` must be a valid VkClearValue union

- VUID-VkRenderingAttachmentInfo-commonparent
  Both of `imageView`, and `resolveImageView` that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevice

To specify an attachment as an input attachment or to specify resolve operation flags, the `VkRenderingAttachmentFlagsInfoKHR` structure can be added to the `pNext` chain of VkRenderingAttachmentInfo.

The `VkRenderingAttachmentFlagsInfoKHR` structure is defined as:

    // Provided by VK_KHR_maintenance10
    typedef struct VkRenderingAttachmentFlagsInfoKHR {
        VkStructureType                  sType;
        const void*                      pNext;
        VkRenderingAttachmentFlagsKHR    flags;
    } VkRenderingAttachmentFlagsInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask of VkRenderingAttachmentFlagsKHR

Valid Usage

- VUID-VkRenderingAttachmentFlagsInfoKHR-flags-11755
  `flags` must not include VK_RENDERING_ATTACHMENT_INPUT_ATTACHMENT_FEEDBACK_BIT_KHR if the `dynamicRenderingLocalRead` feature is not enabled

- VUID-VkRenderingAttachmentFlagsInfoKHR-flags-11756
  If `flags` includes VK_RENDERING_ATTACHMENT_RESOLVE_SKIP_TRANSFER_FUNCTION_BIT_KHR, `flags` must not include VK_RENDERING_ATTACHMENT_RESOLVE_ENABLE_TRANSFER_FUNCTION_BIT_KHR

- VUID-VkRenderingAttachmentFlagsInfoKHR-flags-11757
  If `flags` includes VK_RENDERING_ATTACHMENT_RESOLVE_SKIP_TRANSFER_FUNCTION_BIT_KHR or VK_RENDERING_ATTACHMENT_RESOLVE_ENABLE_TRANSFER_FUNCTION_BIT_KHR, `resolveSrgbFormatSupportsTransferFunctionControl` must be VK_TRUE

Valid Usage (Implicit)

- VUID-VkRenderingAttachmentFlagsInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_RENDERING_ATTACHMENT_FLAGS_INFO_KHR

- VUID-VkRenderingAttachmentFlagsInfoKHR-flags-parameter
  `flags` must be a valid combination of VkRenderingAttachmentFlagBitsKHR values

Structure Chaining

Extends the structure

  - VkRenderingAttachmentInfo

Bits which can be set in VkRenderingAttachmentFlagsInfoKHR::`flags`, describing additional properties of a rendering attachment, are:

    // Provided by VK_KHR_maintenance10
    typedef enum VkRenderingAttachmentFlagBitsKHR {
      // Provided by VK_KHR_maintenance10 with (VK_VERSION_1_4 or VK_KHR_dynamic_rendering_local_read) and (VK_VERSION_1_3 or VK_KHR_dynamic_rendering)
        VK_RENDERING_ATTACHMENT_INPUT_ATTACHMENT_FEEDBACK_BIT_KHR = 0x00000001,
      // Provided by VK_KHR_maintenance10 with VK_VERSION_1_3 or VK_KHR_dynamic_rendering
        VK_RENDERING_ATTACHMENT_RESOLVE_SKIP_TRANSFER_FUNCTION_BIT_KHR = 0x00000002,
      // Provided by VK_KHR_maintenance10 with VK_VERSION_1_3 or VK_KHR_dynamic_rendering
        VK_RENDERING_ATTACHMENT_RESOLVE_ENABLE_TRANSFER_FUNCTION_BIT_KHR = 0x00000004,
    } VkRenderingAttachmentFlagBitsKHR;

- VK_RENDERING_ATTACHMENT_INPUT_ATTACHMENT_FEEDBACK_BIT_KHR specifies that the attachment can be used concurrently as both an input attachment and a write-only attachment during the render pass, creating a feedback loop while processing a fragment, and without a VK_DEPENDENCY_BY_REGION_BIT barrier separating the write attachment and input attachment usage. Using this flag does not remove the general requirement to use a VK_DEPENDENCY_BY_REGION_BIT barrier to resolve hazards when two different fragments accesses a particular attachment region, where one of them performs an attachment write, and a subsequent fragment performs an input attachment read. If VK_RENDERING_LOCAL_READ_CONCURRENT_ACCESS_CONTROL_BIT_KHR is specified in the rendering info, this flag must be set for an attachment to be used concurrently as an input attachment and a write attachment in this manner. If VK_RENDERING_LOCAL_READ_CONCURRENT_ACCESS_CONTROL_BIT_KHR is not specified in the rendering info, this flag is implied to be set for any attachment which has a combination of image layouts and image view usage flags which support input attachment usage.

- VK_RENDERING_ATTACHMENT_RESOLVE_SKIP_TRANSFER_FUNCTION_BIT_KHR specifies that resolve operations happening to an sRGB encoded attachment must not convert samples from nonlinear to linear before averaging.

- VK_RENDERING_ATTACHMENT_RESOLVE_ENABLE_TRANSFER_FUNCTION_BIT_KHR specifies that resolve operations happening to an sRGB encoded attachment must convert samples from nonlinear to linear before averaging.

Note | VK_RENDERING_ATTACHMENT_INPUT_ATTACHMENT_FEEDBACK_BIT_KHR is intended to give implementations similar information as a subpass where an attachment could be used as both a color attachment and input attachment. Some implementations require extra work to make this scenario work beyond just considering the image layouts. Implementations which have no such considerations may treat this flag as a noop. The primary use case for this flag is to enable feedback loops inside a single shader. Applications are encouraged to use VK_RENDERING_LOCAL_READ_CONCURRENT_ACCESS_CONTROL_BIT_KHR if `maintenance10` is available and they use feedback loops with VK_KHR_dynamic_rendering_local_read. Feedback loops are still allowed when not using the rendering flag, but the performance implication was an oversight in the original definition of VK_KHR_dynamic_rendering_local_read.

Note | In some scenarios, resolving sRGB in nonlinear space instead of the expected linear space can improve perceptual aliasing at the cost of inaccurate color blending.

    // Provided by VK_KHR_maintenance10
    typedef VkFlags VkRenderingAttachmentFlagsKHR;

`VkRenderingAttachmentFlagsKHR` is a bitmask type for setting a mask of zero or more VkRenderingAttachmentFlagBitsKHR.

To enable feedback loop for an attachment, the `VkAttachmentFeedbackLoopInfoEXT` structure can be added to the `pNext` chain of VkRenderingAttachmentInfo.

The `VkAttachmentFeedbackLoopInfoEXT` structure is defined as:

    // Provided by VK_KHR_unified_image_layouts with VK_EXT_attachment_feedback_loop_layout and (VK_VERSION_1_3 or VK_KHR_dynamic_rendering)
    typedef struct VkAttachmentFeedbackLoopInfoEXT {
        VkStructureType    sType;
        const void*        pNext;
        VkBool32           feedbackLoopEnable;
    } VkAttachmentFeedbackLoopInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `feedbackLoopEnable` specifies that feedback loop is enabled for the attachment identified by VkRenderingAttachmentInfo::`imageView`.

Valid Usage

- VUID-VkAttachmentFeedbackLoopInfoEXT-unifiedImageLayouts-10782
  If the `unifiedImageLayouts` feature is not enabled, `feedbackLoopEnable` must be VK_FALSE

Valid Usage (Implicit)

- VUID-VkAttachmentFeedbackLoopInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_ATTACHMENT_FEEDBACK_LOOP_INFO_EXT

Structure Chaining

Extends the structure

  - VkRenderingAttachmentInfo

The `VkRenderingFragmentShadingRateAttachmentInfoKHR` structure is defined as:

    // Provided by VK_KHR_fragment_shading_rate with VK_VERSION_1_3 or VK_KHR_dynamic_rendering
    typedef struct VkRenderingFragmentShadingRateAttachmentInfoKHR {
        VkStructureType    sType;
        const void*        pNext;
        VkImageView        imageView;
        VkImageLayout      imageLayout;
        VkExtent2D         shadingRateAttachmentTexelSize;
    } VkRenderingFragmentShadingRateAttachmentInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `imageView` is the image view that will be used as a fragment shading rate attachment.

- `imageLayout` is the layout that `imageView` will be in during rendering.

- `shadingRateAttachmentTexelSize` specifies the number of pixels corresponding to each texel in `imageView`.

This structure can be included in the `pNext` chain of VkRenderingInfo to define a fragment shading rate attachment. If `imageView` is VK_NULL_HANDLE, or if this structure is not specified, the implementation behaves as if a valid shading rate attachment was specified with all texels specifying a single pixel per fragment.

Valid Usage

- VUID-VkRenderingFragmentShadingRateAttachmentInfoKHR-imageView-06147
  If `imageView` is not VK_NULL_HANDLE, `layout` must be VK_IMAGE_LAYOUT_GENERAL or VK_IMAGE_LAYOUT_FRAGMENT_SHADING_RATE_ATTACHMENT_OPTIMAL_KHR

- VUID-VkRenderingFragmentShadingRateAttachmentInfoKHR-imageView-06148
  If `imageView` is not VK_NULL_HANDLE, it must have been created with the VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR usage flag set

- VUID-VkRenderingFragmentShadingRateAttachmentInfoKHR-imageView-06149
  If `imageView` is not VK_NULL_HANDLE, `shadingRateAttachmentTexelSize.width` must be a power of two value

- VUID-VkRenderingFragmentShadingRateAttachmentInfoKHR-imageView-06150
  If `imageView` is not VK_NULL_HANDLE, `shadingRateAttachmentTexelSize.width` must be less than or equal to `maxFragmentShadingRateAttachmentTexelSize.width`

- VUID-VkRenderingFragmentShadingRateAttachmentInfoKHR-imageView-06151
  If `imageView` is not VK_NULL_HANDLE, `shadingRateAttachmentTexelSize.width` must be greater than or equal to `minFragmentShadingRateAttachmentTexelSize.width`

- VUID-VkRenderingFragmentShadingRateAttachmentInfoKHR-imageView-06152
  If `imageView` is not VK_NULL_HANDLE, `shadingRateAttachmentTexelSize.height` must be a power of two value

- VUID-VkRenderingFragmentShadingRateAttachmentInfoKHR-imageView-06153
  If `imageView` is not VK_NULL_HANDLE, `shadingRateAttachmentTexelSize.height` must be less than or equal to `maxFragmentShadingRateAttachmentTexelSize.height`

- VUID-VkRenderingFragmentShadingRateAttachmentInfoKHR-imageView-06154
  If `imageView` is not VK_NULL_HANDLE, `shadingRateAttachmentTexelSize.height` must be greater than or equal to `minFragmentShadingRateAttachmentTexelSize.height`

- VUID-VkRenderingFragmentShadingRateAttachmentInfoKHR-imageView-06155
  If `imageView` is not VK_NULL_HANDLE, the quotient of `shadingRateAttachmentTexelSize.width` and `shadingRateAttachmentTexelSize.height` must be less than or equal to `maxFragmentShadingRateAttachmentTexelSizeAspectRatio`

- VUID-VkRenderingFragmentShadingRateAttachmentInfoKHR-imageView-06156
  If `imageView` is not VK_NULL_HANDLE, the quotient of `shadingRateAttachmentTexelSize.height` and `shadingRateAttachmentTexelSize.width` must be less than or equal to `maxFragmentShadingRateAttachmentTexelSizeAspectRatio`

Valid Usage (Implicit)

- VUID-VkRenderingFragmentShadingRateAttachmentInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR

- VUID-VkRenderingFragmentShadingRateAttachmentInfoKHR-imageView-parameter
  If `imageView` is not VK_NULL_HANDLE, `imageView` must be a valid VkImageView handle

- VUID-VkRenderingFragmentShadingRateAttachmentInfoKHR-imageLayout-parameter
  `imageLayout` must be a valid VkImageLayout value

Structure Chaining

Extends the structure

  - VkRenderingInfo

The `VkRenderingFragmentDensityMapAttachmentInfoEXT` structure is defined as:

    // Provided by VK_EXT_fragment_density_map with VK_VERSION_1_3 or VK_KHR_dynamic_rendering
    typedef struct VkRenderingFragmentDensityMapAttachmentInfoEXT {
        VkStructureType    sType;
        const void*        pNext;
        VkImageView        imageView;
        VkImageLayout      imageLayout;
    } VkRenderingFragmentDensityMapAttachmentInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `imageView` is the image view that will be used as a fragment density map attachment.

- `imageLayout` is the layout that `imageView` will be in during rendering.

This structure can be included in the `pNext` chain of VkRenderingInfo to define a fragment density map. If this structure is not included in the `pNext` chain, `imageView` is treated as VK_NULL_HANDLE.

Valid Usage

- VUID-VkRenderingFragmentDensityMapAttachmentInfoEXT-imageView-06157
  If `imageView` is not VK_NULL_HANDLE, `imageLayout` must be VK_IMAGE_LAYOUT_GENERAL or VK_IMAGE_LAYOUT_FRAGMENT_DENSITY_MAP_OPTIMAL_EXT

- VUID-VkRenderingFragmentDensityMapAttachmentInfoEXT-imageView-06158
  If `imageView` is not VK_NULL_HANDLE, it must have been created with the VK_IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT usage flag set

- VUID-VkRenderingFragmentDensityMapAttachmentInfoEXT-imageView-06159
  If `imageView` is not VK_NULL_HANDLE, it must not have been created with VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT

- VUID-VkRenderingFragmentDensityMapAttachmentInfoEXT-apiVersion-07908
  If the `multiview` feature is not enabled, VkPhysicalDeviceProperties::`apiVersion` is less than Vulkan 1.1, and `imageView` is not VK_NULL_HANDLE, it must have a `layerCount` equal to `1`

Valid Usage (Implicit)

- VUID-VkRenderingFragmentDensityMapAttachmentInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_INFO_EXT

- VUID-VkRenderingFragmentDensityMapAttachmentInfoEXT-imageView-parameter
  `imageView` must be a valid VkImageView handle

- VUID-VkRenderingFragmentDensityMapAttachmentInfoEXT-imageLayout-parameter
  `imageLayout` must be a valid VkImageLayout value

Structure Chaining

Extends the structure

  - VkRenderingInfo

To query the render area granularity for a render pass instance, call:

    // Provided by VK_VERSION_1_4
    void vkGetRenderingAreaGranularity(
        VkDevice                                    device,
        const VkRenderingAreaInfo*                  pRenderingAreaInfo,
        VkExtent2D*                                 pGranularity);

    // Provided by VK_KHR_maintenance5
    // Equivalent to vkGetRenderingAreaGranularity
    void vkGetRenderingAreaGranularityKHR(
        VkDevice                                    device,
        const VkRenderingAreaInfo*                  pRenderingAreaInfo,
        VkExtent2D*                                 pGranularity);

- `device` is the logical device that owns the render pass instance.

- `pRenderingAreaInfo` is a pointer to a VkRenderingAreaInfo structure specifying details of the render pass instance to query the render area granularity for.

- `pGranularity` is a pointer to a VkExtent2D structure in which the granularity is returned.

The conditions leading to an optimal `renderArea` are:

- the `offset.x` member in `renderArea` is a multiple of the `width` member of the returned VkExtent2D (the horizontal granularity).

- the `offset.y` member in `renderArea` is a multiple of the `height` member of the returned VkExtent2D (the vertical granularity).

- either the `extent.width` member in `renderArea` is a multiple of the horizontal granularity or `offset.x`+`extent.width` is equal to the `width` of each attachment used in the render pass instance.

- either the `extent.height` member in `renderArea` is a multiple of the vertical granularity or `offset.y`+`extent.height` is equal to the `height` of each attachment used in the render pass instance.

Valid Usage (Implicit)

- VUID-vkGetRenderingAreaGranularity-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetRenderingAreaGranularity-pRenderingAreaInfo-parameter
  `pRenderingAreaInfo` must be a valid pointer to a valid VkRenderingAreaInfo structure

- VUID-vkGetRenderingAreaGranularity-pGranularity-parameter
  `pGranularity` must be a valid pointer to a VkExtent2D structure

The `VkRenderingAreaInfo` structure is defined as:

    // Provided by VK_VERSION_1_4
    typedef struct VkRenderingAreaInfo {
        VkStructureType    sType;
        const void*        pNext;
        uint32_t           viewMask;
        uint32_t           colorAttachmentCount;
        const VkFormat*    pColorAttachmentFormats;
        VkFormat           depthAttachmentFormat;
        VkFormat           stencilAttachmentFormat;
    } VkRenderingAreaInfo;

    // Provided by VK_KHR_maintenance5
    // Equivalent to VkRenderingAreaInfo
    typedef VkRenderingAreaInfo VkRenderingAreaInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `viewMask` is the viewMask used for rendering.

- `colorAttachmentCount` is the number of entries in `pColorAttachmentFormats`

- `pColorAttachmentFormats` is a pointer to an array of VkFormat values defining the format of color attachments used in the render pass instance.

- `depthAttachmentFormat` is a VkFormat value defining the format of the depth attachment used in the render pass instance.

- `stencilAttachmentFormat` is a VkFormat value defining the format of the stencil attachment used in the render pass instance.

Valid Usage (Implicit)

- VUID-VkRenderingAreaInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_RENDERING_AREA_INFO

- VUID-VkRenderingAreaInfo-pNext-pNext
  `pNext` must be `NULL`

The `VkRenderPassStripeBeginInfoARM` structure is defined as:

    // Provided by VK_ARM_render_pass_striped
    typedef struct VkRenderPassStripeBeginInfoARM {
        VkStructureType                     sType;
        const void*                         pNext;
        uint32_t                            stripeInfoCount;
        const VkRenderPassStripeInfoARM*    pStripeInfos;
    } VkRenderPassStripeBeginInfoARM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `stripeInfoCount` is the number of stripes in this render pass instance

- `pStripeInfos` is a pointer to an array of `stripeInfoCount` VkRenderPassStripeInfoARM structures describing the stripes used by the render pass instance.

This structure can be included in the `pNext` chain of VkRenderPassBeginInfo or VkRenderingInfo to define how the render pass instance is split into stripes.

Valid Usage

- VUID-VkRenderPassStripeBeginInfoARM-stripeInfoCount-09450
  `stripeInfoCount` must be less than or equal to `VkPhysicalDeviceRenderPassStripedPropertiesARM`::`maxRenderPassStripes`

- VUID-VkRenderPassStripeBeginInfoARM-stripeArea-09451
  The `stripeArea` defined by each element of `pStripeInfos` must not overlap the `stripeArea` of any other element

Valid Usage (Implicit)

- VUID-VkRenderPassStripeBeginInfoARM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_RENDER_PASS_STRIPE_BEGIN_INFO_ARM

- VUID-VkRenderPassStripeBeginInfoARM-pStripeInfos-parameter
  `pStripeInfos` must be a valid pointer to an array of `stripeInfoCount` valid VkRenderPassStripeInfoARM structures

- VUID-VkRenderPassStripeBeginInfoARM-stripeInfoCount-arraylength
  `stripeInfoCount` must be greater than `0`

Structure Chaining

Extends the structures

  - VkRenderPassBeginInfo

  - VkRenderingInfo

The `VkRenderPassStripeInfoARM` structure is defined as:

    // Provided by VK_ARM_render_pass_striped
    typedef struct VkRenderPassStripeInfoARM {
        VkStructureType    sType;
        const void*        pNext;
        VkRect2D           stripeArea;
    } VkRenderPassStripeInfoARM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `stripeArea` is the stripe area, and is described in more detail below.

`stripeArea` is the render area that is affected by this stripe of the render pass instance. It must be a subregion of the `renderArea` of the render pass instance.

Valid Usage

- VUID-VkRenderPassStripeInfoARM-stripeArea-09452
  `stripeArea.offset.x` must be a multiple of VkPhysicalDeviceRenderPassStripedPropertiesARM::`renderPassStripeGranularity.width`

- VUID-VkRenderPassStripeInfoARM-stripeArea-09453
  `stripeArea.extent.width` must be a multiple of VkPhysicalDeviceRenderPassStripedPropertiesARM::`renderPassStripeGranularity.width`, or the sum of `stripeArea.offset.x` and `stripeArea.extent.width` must be equal to the `renderArea.extent.width` of the render pass instance

- VUID-VkRenderPassStripeInfoARM-stripeArea-09454
  `stripeArea.offset.y` must be a multiple of VkPhysicalDeviceRenderPassStripedPropertiesARM::`renderPassStripeGranularity.height`

- VUID-VkRenderPassStripeInfoARM-stripeArea-09455
  `stripeArea.extent.height` must be a multiple of VkPhysicalDeviceRenderPassStripedPropertiesARM::`renderPassStripeGranularity.height`, or the sum of `stripeArea.offset.y` and `stripeArea.extent.height` must be equal to the `renderArea.extent.height` of the render pass instance

Valid Usage (Implicit)

- VUID-VkRenderPassStripeInfoARM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_RENDER_PASS_STRIPE_INFO_ARM

- VUID-VkRenderPassStripeInfoARM-pNext-pNext
  `pNext` must be `NULL`

The `VkRenderPassPerformanceCountersByRegionBeginInfoARM` structure is defined as:

    // Provided by VK_ARM_performance_counters_by_region
    typedef struct VkRenderPassPerformanceCountersByRegionBeginInfoARM {
        VkStructureType           sType;
        void*                     pNext;
        uint32_t                  counterAddressCount;
        const VkDeviceAddress*    pCounterAddresses;
        VkBool32                  serializeRegions;
        uint32_t                  counterIndexCount;
        uint32_t*                 pCounterIndices;
    } VkRenderPassPerformanceCountersByRegionBeginInfoARM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `counterAddressCount` is the number of entries in the `pCounterAddresses` array.

- `pCounterAddresses` is a pointer to an array of VkDeviceAddress where performance counter data will be written.

- `serializeRegions` controls whether the implementation serializes the execution of each region.

- `counterIndexCount` is the number of entries in the `pCounterIndices` array.

- `pCounterIndices` is a pointer to an array of VkPerformanceCounterARM::`counterID` values, as enumerated by vkEnumeratePhysicalDeviceQueueFamilyPerformanceCountersByRegionARM, to enable in this render pass instance.

Performance counters values are written to each element of `pCounterAddresses` in an implementation-dependent manner. These writes execute in the VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT pipeline stage.

The index into this array is calculated as:

    uint32_t index = s * L + l;

where `s` is the physical subpass index, `L` is the maximum number of views or layers in the current render pass instance, and `l` is the index of the current view or layer.

When using a render pass object with multiple subpasses, an implementation may merge one more subpasses. The physical subpass index represents the index into the set of subpasses that remain after such merge operations are done.

Note | The `VK_EXT_subpass_merge_feedback` extension can be used to determine which if any subpasses have been merged. The physical subpass index is equal to the `postMergeIndex` value provided in VkRenderPassSubpassFeedbackInfoEXT.

Within each element of `pCounterAddresses`, counter values are written in framebuffer-space order if VkPhysicalDevicePerformanceCountersByRegionPropertiesARM::`identityTransformOrder` is VK_TRUE.

Each counter value is written as an unsigned 32-bit integer value.

If the render pass has a fragment density map, performance counter values are only written for regions where the fragment area is unchanged.

Valid Usage

- VUID-VkRenderPassPerformanceCountersByRegionBeginInfoARM-counterAddressCount-11815
  `counterAddressCount` must be equal to S × L, where S is the number of subpasses in the current render pass instance, and L is the number of layers in the current render pass instance or the index of the most significant bit of any view mask in the current render pass instance

- VUID-VkRenderPassPerformanceCountersByRegionBeginInfoARM-pCounterAddresses-11816
  For each element of `pCounterAddresses` that is not `0`, if the buffer from which it was queried is non-sparse then it must be bound completely and contiguously to a single VkDeviceMemory object

- VUID-VkRenderPassPerformanceCountersByRegionBeginInfoARM-pCounterAddresses-11817
  For each element of `pCounterAddresses`[i], all device addresses between `pCounterAddresses`[i] and `pCounterAddresses`[i] plus N - 1, must be in the buffer device address range of the same buffer, where N is given by N=a l i g n(⌈w/rs w⌉×a l i g n(c×sizeo f(uint 32_ t),r a),rsa)×⌈h/rsh⌉, where `w` is the value of VkRenderingInfo::`renderArea.extent.width`, `h` is the value of VkRenderingInfo::`renderArea.extent.height`, `rsw` is the value of VkPhysicalDevicePerformanceCountersByRegionPropertiesARM::`performanceCounterRegionSize.width`, `rsh` is the value of VkPhysicalDevicePerformanceCountersByRegionPropertiesARM::`performanceCounterRegionSize.height`, `c` is the value of `counterIndexCount`, `ra` is the value of VkPhysicalDevicePerformanceCountersByRegionPropertiesARM::`regionAlignment`, and `rsa` is the value of VkPhysicalDevicePerformanceCountersByRegionPropertiesARM::`rowStrideAlignment`

- VUID-VkRenderPassPerformanceCountersByRegionBeginInfoARM-counterIndexCount-11818
  `counterIndexCount` must be less than or equal to VkPhysicalDevicePerformanceCountersByRegionPropertiesARM::`maxPerRegionPerformanceCounters`

Valid Usage (Implicit)

- VUID-VkRenderPassPerformanceCountersByRegionBeginInfoARM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_RENDER_PASS_PERFORMANCE_COUNTERS_BY_REGION_BEGIN_INFO_ARM

- VUID-VkRenderPassPerformanceCountersByRegionBeginInfoARM-pCounterAddresses-parameter
  `pCounterAddresses` must be a valid pointer to an array of `counterAddressCount` VkDeviceAddress values

- VUID-VkRenderPassPerformanceCountersByRegionBeginInfoARM-pCounterIndices-parameter
  `pCounterIndices` must be a valid pointer to an array of `counterIndexCount` `uint32_t` values

- VUID-VkRenderPassPerformanceCountersByRegionBeginInfoARM-counterAddressCount-arraylength
  `counterAddressCount` must be greater than `0`

- VUID-VkRenderPassPerformanceCountersByRegionBeginInfoARM-counterIndexCount-arraylength
  `counterIndexCount` must be greater than `0`

Structure Chaining

Extends the structures

  - VkRenderPassBeginInfo

  - VkRenderingInfo

To begin resolving attachments using render pass draws, call:

    // Provided by VK_EXT_custom_resolve with VK_KHR_dynamic_rendering or VK_VERSION_1_3
    void vkCmdBeginCustomResolveEXT(
        VkCommandBuffer                             commandBuffer,
        const VkBeginCustomResolveInfoEXT*          pBeginCustomResolveInfo);

- `commandBuffer` is the command buffer in which to record the command.

- `pBeginCustomResolveInfo` is an optional struct with which to extend functionality.

Following this call, any `resolveImageView` with `resolveMode` set to VK_RESOLVE_MODE_CUSTOM_BIT_EXT will be written by outputs which would otherwise have written to the `imageView` image until the end of the current render pass instance.

Following this call, the fragment area may be reduced to (1,1) if a fragment density map is attached. If this occurs, reads of input attachments mapped to a color, depth, or stencil attachment return the value for the original larger fragment containing the smaller fragment. Reads of input attachments not mapped to a color, depth, or stencil attachment use the new fragment area.

Note | Because the content of any depth/stencil resolve attachment as well as any color resolve attachment is undefined at the beginning of a resolve operation, any depth testing, stencil testing, or blending operation which sources these undefined values also has undefined result value.

During a custom resolve pass, multiple fragment invocations writing to the same (x, y, layer, view, sample) coordinate, i.e. overdraw, will produce undefined behavior.

Note | Implementations are allowed to implement custom resolve attachment writes through other mechanisms than framebuffer attachment writes, which would normally obey rules of rasterization order.

Valid Usage

- VUID-vkCmdBeginCustomResolveEXT-commandBuffer-11517
  The current render pass instance must have been started or resumed by vkCmdBeginRendering in this `commandBuffer`

- VUID-vkCmdBeginCustomResolveEXT-None-11518
  vkCmdBeginCustomResolveEXT must not have already been recorded in the current render pass instance

- VUID-vkCmdBeginCustomResolveEXT-None-11519
  The current render pass instance must have specified VK_RENDERING_CUSTOM_RESOLVE_BIT_EXT

- VUID-vkCmdBeginCustomResolveEXT-None-11520
  The current render pass instance must not have specified VK_RENDERING_SUSPENDING_BIT

Valid Usage (Implicit)

- VUID-vkCmdBeginCustomResolveEXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdBeginCustomResolveEXT-pBeginCustomResolveInfo-parameter
  If `pBeginCustomResolveInfo` is not `NULL`, `pBeginCustomResolveInfo` must be a valid pointer to a valid VkBeginCustomResolveInfoEXT structure

- VUID-vkCmdBeginCustomResolveEXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdBeginCustomResolveEXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdBeginCustomResolveEXT-renderpass
  This command must only be called inside of a render pass instance

- VUID-vkCmdBeginCustomResolveEXT-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdBeginCustomResolveEXT-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Inside | Outside | VK_QUEUE_GRAPHICS_BIT | Action

Conditional Rendering

vkCmdBeginCustomResolveEXT is affected by conditional rendering

The `VkBeginCustomResolveInfoEXT` structure is defined as:

    // Provided by VK_EXT_custom_resolve with VK_KHR_dynamic_rendering or VK_VERSION_1_3
    typedef struct VkBeginCustomResolveInfoEXT {
        VkStructureType    sType;
        void*              pNext;
    } VkBeginCustomResolveInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

Valid Usage (Implicit)

- VUID-VkBeginCustomResolveInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_BEGIN_CUSTOM_RESOLVE_INFO_EXT

To end a render pass instance, call:

    // Provided by VK_VERSION_1_3
    void vkCmdEndRendering(
        VkCommandBuffer                             commandBuffer);

    // Provided by VK_KHR_dynamic_rendering
    // Equivalent to vkCmdEndRendering
    void vkCmdEndRenderingKHR(
        VkCommandBuffer                             commandBuffer);

- `commandBuffer` is the command buffer in which to record the command.

If the value of `pRenderingInfo->flags` used to begin this render pass instance included VK_RENDERING_SUSPENDING_BIT, then this render pass is suspended and will be resumed later in submission order.

Note | There is no implicit ordering between separate render passes, even in the same command buffer, and even when the attachments match. Some applications rely on the continuation of rasterization order between multiple render passes with attachments defined in the same way, in order to perform non-rendering operations (such as copies or compute operations) between draw calls, but this has never been required by the specification. There is also no explicit barrier currently in the API that provides the guarantee that applications rely on without additional performance penalties. New applications should avoid relying on this ordering until an appropriate barrier is added to the API. Implementations where applications are performing this splitting are encouraged to continue supporting this guarantee until a suitable barrier is added to the API. Existing applications relying on this ordering should expect that it will continue working on platforms where it currently does. Once a new extension adds support for a new barrier, developers are encouraged to adapt their applications to use this when available.

Valid Usage

- VUID-vkCmdEndRendering-None-06161
  The current render pass instance must have been begun with vkCmdBeginRendering

- VUID-vkCmdEndRendering-commandBuffer-06162
  The current render pass instance must have been begun in `commandBuffer`

- VUID-vkCmdEndRendering-None-06781
  This command must not be recorded when transform feedback is active

- VUID-vkCmdEndRendering-None-06999
  If `vkCmdBeginQuery`* was called within the render pass, the corresponding `vkCmdEndQuery`* must have been called subsequently within the same subpass

- VUID-vkCmdEndRendering-None-10645
  This command must not be recorded when per-tile execution model is enabled

Valid Usage (Implicit)

- VUID-vkCmdEndRendering-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdEndRendering-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdEndRendering-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdEndRendering-renderpass
  This command must only be called inside of a render pass instance

- VUID-vkCmdEndRendering-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdEndRendering-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Inside | Outside | VK_QUEUE_GRAPHICS_BIT | Action State

Conditional Rendering

vkCmdEndRendering is not affected by conditional rendering

To end a render pass instance, call:

    // Provided by VK_KHR_maintenance10
    void vkCmdEndRendering2KHR(
        VkCommandBuffer                             commandBuffer,
        const VkRenderingEndInfoKHR*                pRenderingEndInfo);

    // Provided by VK_EXT_fragment_density_map_offset
    // Equivalent to vkCmdEndRendering2KHR
    void vkCmdEndRendering2EXT(
        VkCommandBuffer                             commandBuffer,
        const VkRenderingEndInfoKHR*                pRenderingEndInfo);

- `commandBuffer` is the command buffer in which to record the command.

- `pRenderingEndInfo` is `NULL` or a pointer to a VkRenderingEndInfoKHR structure containing information about how the render pass will be ended.

If the value of `pRenderingInfo->flags` used to begin this render pass instance included VK_RENDERING_SUSPENDING_BIT, then this render pass is suspended and will be resumed later in submission order.

Note | There is no implicit ordering between separate render passes, even in the same command buffer, and even when the attachments match. Some applications rely on the continuation of rasterization order between multiple render passes with attachments defined in the same way, in order to perform non-rendering operations (such as copies or compute operations) between draw calls, but this has never been required by the specification. There is also no explicit barrier currently in the API that provides the guarantee that applications rely on without additional performance penalties. New applications should avoid relying on this ordering until an appropriate barrier is added to the API. Implementations where applications are performing this splitting are encouraged to continue supporting this guarantee until a suitable barrier is added to the API. Existing applications relying on this ordering should expect that it will continue working on platforms where it currently does. Once a new extension adds support for a new barrier, developers are encouraged to adapt their applications to use this when available.

Valid Usage

- VUID-vkCmdEndRendering2KHR-None-10610
  The current render pass instance must have been begun with vkCmdBeginRendering

- VUID-vkCmdEndRendering2KHR-commandBuffer-10611
  The current render pass instance must have been begun in `commandBuffer`

- VUID-vkCmdEndRendering2KHR-None-10612
  This command must not be recorded when transform feedback is active

- VUID-vkCmdEndRendering2KHR-None-10613
  If `vkCmdBeginQuery`* was called within the render pass, the corresponding `vkCmdEndQuery`* must have been called subsequently within the same subpass

Valid Usage (Implicit)

- VUID-vkCmdEndRendering2KHR-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdEndRendering2KHR-pRenderingEndInfo-parameter
  If `pRenderingEndInfo` is not `NULL`, `pRenderingEndInfo` must be a valid pointer to a valid VkRenderingEndInfoKHR structure

- VUID-vkCmdEndRendering2KHR-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdEndRendering2KHR-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdEndRendering2KHR-renderpass
  This command must only be called inside of a render pass instance

- VUID-vkCmdEndRendering2KHR-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdEndRendering2KHR-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Inside | Outside | VK_QUEUE_GRAPHICS_BIT | Action State

Conditional Rendering

vkCmdEndRendering2KHR is not affected by conditional rendering

The `VkRenderingEndInfoKHR` structure is defined as:

    // Provided by VK_KHR_maintenance10
    typedef struct VkRenderingEndInfoKHR {
        VkStructureType    sType;
        const void*        pNext;
    } VkRenderingEndInfoKHR;

    // Provided by VK_EXT_fragment_density_map_offset
    // Equivalent to VkRenderingEndInfoKHR
    typedef VkRenderingEndInfoKHR VkRenderingEndInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

Valid Usage (Implicit)

- VUID-VkRenderingEndInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_RENDERING_END_INFO_KHR

- VUID-VkRenderingEndInfoKHR-pNext-pNext
  `pNext` must be `NULL` or a pointer to a valid instance of VkRenderPassFragmentDensityMapOffsetEndInfoEXT

- VUID-VkRenderingEndInfoKHR-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

Note | For more complex rendering graphs, it is possible to pre-define a static render pass object, which as well as allowing draw commands, allows the definition of framebuffer-local dependencies between multiple subpasses. These objects have a lot of setup cost compared to vkCmdBeginRendering, but use of subpass dependencies can confer important performance benefits on some devices.

The `VkTilePropertiesQCOM` structure is defined as:

    // Provided by VK_QCOM_tile_properties
    typedef struct VkTilePropertiesQCOM {
        VkStructureType    sType;
        void*              pNext;
        VkExtent3D         tileSize;
        VkExtent2D         apronSize;
        VkOffset2D         origin;
    } VkTilePropertiesQCOM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `tileSize` is the dimensions of a tile, with width and height describing the width and height of a tile in pixels, and depth corresponding to the number of slices the tile spans.

- `apronSize` is the dimension of the apron.

- `origin` is the top-left corner of the first tile in attachment space.

All tiles will be tightly packed around the first tile, with edges being multiples of tile width and/or height from the origin.

The `tileSize` is guaranteed to be a multiple of `tileGranularity`.

Valid Usage (Implicit)

- VUID-VkTilePropertiesQCOM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_TILE_PROPERTIES_QCOM

- VUID-VkTilePropertiesQCOM-pNext-pNext
  `pNext` must be `NULL`

To query the tile properties when using dynamic rendering, call:

    // Provided by VK_QCOM_tile_properties
    VkResult vkGetDynamicRenderingTilePropertiesQCOM(
        VkDevice                                    device,
        const VkRenderingInfo*                      pRenderingInfo,
        VkTilePropertiesQCOM*                       pProperties);

- `device` is a logical device associated with the render pass.

- `pRenderingInfo` is a pointer to the VkRenderingInfo structure specifying details of the render pass instance in dynamic rendering.

- `pProperties` is a pointer to a VkTilePropertiesQCOM structure in which the properties are returned.

Valid Usage (Implicit)

- VUID-vkGetDynamicRenderingTilePropertiesQCOM-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetDynamicRenderingTilePropertiesQCOM-pRenderingInfo-parameter
  `pRenderingInfo` must be a valid pointer to a valid VkRenderingInfo structure

- VUID-vkGetDynamicRenderingTilePropertiesQCOM-pProperties-parameter
  `pProperties` must be a valid pointer to a VkTilePropertiesQCOM structure

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

### 8.1. Render Pass Objects

A render pass object represents a collection of attachments, subpasses, and dependencies between the subpasses, and describes how the attachments are used over the course of the subpasses.

Render passes are represented by `VkRenderPass` handles:

Warning | This functionality is superseded by Vulkan Version 1.4. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_0
    VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkRenderPass)

An attachment description describes the properties of an attachment including its format, sample count, and how its contents are treated at the beginning and end of each render pass instance.

A subpass represents a phase of rendering that reads and writes a subset of the attachments in a render pass. Rendering commands are recorded into a particular subpass of a render pass instance.

A subpass description describes the subset of attachments that is involved in the execution of a subpass. Each subpass can read from some attachments as input attachments, write to some as color attachments or depth/stencil attachments, perform shader resolve operations to color_attachments or depth/stencil_attachments, and perform multisample resolve operations to resolve attachments. A subpass description can also include a set of preserve attachments, which are attachments that are not read or written by the subpass but whose contents must be preserved throughout the subpass.

A subpass uses an attachment if the attachment is a color, depth/stencil, resolve, depth/stencil resolve, fragment shading rate, or input attachment for that subpass (as determined by the `pColorAttachments`, `pDepthStencilAttachment`, `pResolveAttachments`, VkSubpassDescriptionDepthStencilResolve::`pDepthStencilResolveAttachment`, VkFragmentShadingRateAttachmentInfoKHR::`pFragmentShadingRateAttachment->attachment`, and `pInputAttachments` members of VkSubpassDescription, respectively). A subpass does not use an attachment if that attachment is preserved by the subpass. The first use of an attachment is in the lowest numbered subpass that uses that attachment. Similarly, the last use of an attachment is in the highest numbered subpass that uses that attachment.

The subpasses in a render pass all render to the same dimensions, and fragments for pixel (x,y,layer) in one subpass can only read attachment contents written by previous subpasses at that same (x,y,layer) location. For multi-pixel fragments, the pixel read from an input attachment is selected from the pixels covered by that fragment in an implementation-dependent manner. However, this selection must be made consistently for any fragment with the same shading rate for the lifetime of the VkDevice.

Note | By describing a complete set of subpasses in advance, render passes provide the implementation an opportunity to optimize the storage and transfer of attachment data between subpasses. In practice, this means that subpasses with a simple framebuffer-space dependency may be merged into a single tiled rendering pass, keeping the attachment data on-chip for the duration of a render pass instance. However, it is also quite common for a render pass to only contain a single subpass.

Subpass dependencies describe execution and memory dependencies between subpasses.

A subpass dependency chain is a sequence of subpass dependencies in a render pass, where the source subpass of each subpass dependency (after the first) equals the destination subpass of the previous dependency.

Execution of subpasses may overlap or execute out of order with regards to other subpasses, unless otherwise enforced by an execution dependency. Each subpass only respects submission order for commands recorded in the same subpass, and the vkCmdBeginRenderPass and vkCmdEndRenderPass commands that delimit the render pass - commands within other subpasses are not included. This affects most other implicit ordering guarantees.

A render pass describes the structure of subpasses and attachments independent of any specific image views for the attachments. The specific image views that will be used for the attachments, and their dimensions, are specified in `VkFramebuffer` objects. Framebuffers are created with respect to a specific render pass that the framebuffer is compatible with (see Render Pass Compatibility). Collectively, a render pass and a framebuffer define the complete render target state for one or more subpasses as well as the algorithmic dependencies between the subpasses.

The various pipeline stages of the drawing commands for a given subpass may execute concurrently and/or out of order, both within and across drawing commands, whilst still respecting pipeline order. However for a given (x,y,layer,sample) sample location, certain per-sample operations are performed in rasterization order.

VK_ATTACHMENT_UNUSED is a constant indicating that a render pass attachment is not used.

    #define VK_ATTACHMENT_UNUSED              (~0U)

### 8.2. Render Pass Creation

To create a render pass, call:

Warning | This functionality is superseded by vkCreateRenderPass2. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_0
    VkResult vkCreateRenderPass(
        VkDevice                                    device,
        const VkRenderPassCreateInfo*               pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkRenderPass*                               pRenderPass);

- `device` is the logical device that creates the render pass.

- `pCreateInfo` is a pointer to a VkRenderPassCreateInfo structure describing the parameters of the render pass.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

- `pRenderPass` is a pointer to a VkRenderPass handle in which the resulting render pass object is returned.

Valid Usage

- VUID-vkCreateRenderPass-device-10000
  `device` must support at least one queue family with the VK_QUEUE_GRAPHICS_BIT capability

- VUID-vkCreateRenderPass-flags-10646
  VkRenderPassTileShadingCreateInfoQCOM::`flags` must not include VK_TILE_SHADING_RENDER_PASS_PER_TILE_EXECUTION_BIT_QCOM

Valid Usage (Implicit)

- VUID-vkCreateRenderPass-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkCreateRenderPass-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkRenderPassCreateInfo structure

- VUID-vkCreateRenderPass-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateRenderPass-pRenderPass-parameter
  `pRenderPass` must be a valid pointer to a VkRenderPass handle

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkRenderPassCreateInfo` structure is defined as:

Warning | This functionality is superseded by VkRenderPassCreateInfo2. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_0
    typedef struct VkRenderPassCreateInfo {
        VkStructureType                   sType;
        const void*                       pNext;
        VkRenderPassCreateFlags           flags;
        uint32_t                          attachmentCount;
        const VkAttachmentDescription*    pAttachments;
        uint32_t                          subpassCount;
        const VkSubpassDescription*       pSubpasses;
        uint32_t                          dependencyCount;
        const VkSubpassDependency*        pDependencies;
    } VkRenderPassCreateInfo;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask of VkRenderPassCreateFlagBits

- `attachmentCount` is the number of attachments used by this render pass.

- `pAttachments` is a pointer to an array of `attachmentCount` VkAttachmentDescription structures describing the attachments used by the render pass.

- `subpassCount` is the number of subpasses to create.

- `pSubpasses` is a pointer to an array of `subpassCount` VkSubpassDescription structures describing each subpass.

- `dependencyCount` is the number of memory dependencies between pairs of subpasses.

- `pDependencies` is a pointer to an array of `dependencyCount` VkSubpassDependency structures describing dependencies between pairs of subpasses.

Note | Care should be taken to avoid a data race here; if any subpasses access attachments with overlapping memory locations, and one of those accesses is a write, a subpass dependency needs to be included between them.

Valid Usage

- VUID-VkRenderPassCreateInfo-attachment-00834
  If the `attachment` member of any element of `pInputAttachments`, `pColorAttachments`, `pResolveAttachments` or `pDepthStencilAttachment`, or any element of `pPreserveAttachments` in any element of `pSubpasses` is not VK_ATTACHMENT_UNUSED, then it must be less than `attachmentCount`

- VUID-VkRenderPassCreateInfo-fragmentDensityMapAttachment-06471
  If the pNext chain includes a VkRenderPassFragmentDensityMapCreateInfoEXT structure and the `fragmentDensityMapAttachment` member is not VK_ATTACHMENT_UNUSED, then `attachment` must be less than `attachmentCount`

- VUID-VkRenderPassCreateInfo-fragmentDensityMapLayered-10828
  If the `fragmentDensityMapLayered` feature is not enabled, `flags` must not contain VK_RENDER_PASS_CREATE_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE

- VUID-VkRenderPassCreateInfo-pAttachments-00836
  For any member of `pAttachments` with a `loadOp` equal to VK_ATTACHMENT_LOAD_OP_CLEAR, the first use of that attachment must not specify a `layout` equal to VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL or VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL

- VUID-VkRenderPassCreateInfo-pAttachments-02511
  For any member of `pAttachments` with a `stencilLoadOp` equal to VK_ATTACHMENT_LOAD_OP_CLEAR, the first use of that attachment must not specify a `layout` equal to VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL or VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL

- VUID-VkRenderPassCreateInfo-pAttachments-01566
  For any member of `pAttachments` with a `loadOp` equal to VK_ATTACHMENT_LOAD_OP_CLEAR, the first use of that attachment must not specify a `layout` equal to VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL

- VUID-VkRenderPassCreateInfo-pAttachments-01567
  For any member of `pAttachments` with a `stencilLoadOp` equal to VK_ATTACHMENT_LOAD_OP_CLEAR, the first use of that attachment must not specify a `layout` equal to VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL

- VUID-VkRenderPassCreateInfo-pNext-01926
  If the `pNext` chain includes a VkRenderPassInputAttachmentAspectCreateInfo structure, the `subpass` member of each element of its `pAspectReferences` member must be less than `subpassCount`

- VUID-VkRenderPassCreateInfo-pNext-01927
  If the `pNext` chain includes a VkRenderPassInputAttachmentAspectCreateInfo structure, the `inputAttachmentIndex` member of each element of its `pAspectReferences` member must be less than the value of `inputAttachmentCount` in the element of `pSubpasses` identified by its `subpass` member

- VUID-VkRenderPassCreateInfo-pNext-01963
  If the `pNext` chain includes a VkRenderPassInputAttachmentAspectCreateInfo structure, for any element of the `pInputAttachments` member of any element of `pSubpasses` where the `attachment` member is not VK_ATTACHMENT_UNUSED, the `aspectMask` member of the corresponding element of VkRenderPassInputAttachmentAspectCreateInfo::`pAspectReferences` must only include aspects that are present in images of the format specified by the element of `pAttachments` at `attachment`

- VUID-VkRenderPassCreateInfo-pNext-01928
  If the `pNext` chain includes a VkRenderPassMultiviewCreateInfo structure, and its `subpassCount` member is not zero, that member must be equal to the value of `subpassCount`

- VUID-VkRenderPassCreateInfo-pNext-01929
  If the `pNext` chain includes a VkRenderPassMultiviewCreateInfo structure, if its `dependencyCount` member is not zero, it must be equal to `dependencyCount`

- VUID-VkRenderPassCreateInfo-pNext-01930
  If the `pNext` chain includes a VkRenderPassMultiviewCreateInfo structure, for each non-zero element of `pViewOffsets`, the `srcSubpass` and `dstSubpass` members of `pDependencies` at the same index must not be equal

- VUID-VkRenderPassCreateInfo-pNext-02512
  If the `pNext` chain includes a VkRenderPassMultiviewCreateInfo structure, for each element of `pDependencies` with a `dependencyFlags` member that does not include VK_DEPENDENCY_VIEW_LOCAL_BIT, the corresponding element of the `pViewOffsets` member of that VkRenderPassMultiviewCreateInfo instance must be `0`

- VUID-VkRenderPassCreateInfo-pNext-02513
  If the `pNext` chain includes a VkRenderPassMultiviewCreateInfo structure, elements of its `pViewMasks` member must either all be `0`, or all not be `0`

- VUID-VkRenderPassCreateInfo-pNext-02514
  If the `pNext` chain includes a VkRenderPassMultiviewCreateInfo structure, and each element of its `pViewMasks` member is `0`, the `dependencyFlags` member of each element of `pDependencies` must not include VK_DEPENDENCY_VIEW_LOCAL_BIT

- VUID-VkRenderPassCreateInfo-pNext-02515
  If the `pNext` chain includes a VkRenderPassMultiviewCreateInfo structure, and each element of its `pViewMasks` member is `0`, its `correlationMaskCount` member must be `0`

- VUID-VkRenderPassCreateInfo-pDependencies-00837
  For each element of `pDependencies`, if the `srcSubpass` is not VK_SUBPASS_EXTERNAL, all stage flags included in the `srcStageMask` member of that dependency must be VK_PIPELINE_STAGE_ALL_COMMANDS_BIT or a pipeline stage supported by the pipeline identified by the `pipelineBindPoint` member of the source subpass

- VUID-VkRenderPassCreateInfo-pDependencies-00838
  For each element of `pDependencies`, if the `dstSubpass` is not VK_SUBPASS_EXTERNAL, all stage flags included in the `dstStageMask` member of that dependency must be VK_PIPELINE_STAGE_ALL_COMMANDS_BIT or a pipeline stage supported by the pipeline identified by the `pipelineBindPoint` member of the destination subpass

- VUID-VkRenderPassCreateInfo-pDependencies-06866
  For each element of `pDependencies`, if its `srcSubpass` is not VK_SUBPASS_EXTERNAL, it must be less than `subpassCount`

- VUID-VkRenderPassCreateInfo-pDependencies-06867
  For each element of `pDependencies`, if its `dstSubpass` is not VK_SUBPASS_EXTERNAL, it must be less than `subpassCount`

- VUID-VkRenderPassCreateInfo-pResolveAttachments-10647
  If any element of `pResolveAttachments` of any element of `pSubpasses` references an attachment description with a format of VK_FORMAT_UNDEFINED, VK_TILE_SHADING_RENDER_PASS_ENABLE_BIT_QCOM must not be included in VkRenderPassTileShadingCreateInfoQCOM::`flags`

- VUID-VkRenderPassCreateInfo-fragmentDensityMapAttachment-10648
  If VkRenderPassFragmentDensityMapCreateInfoEXT::`fragmentDensityMapAttachment` is not VK_ATTACHMENT_UNUSED, VK_TILE_SHADING_RENDER_PASS_ENABLE_BIT_QCOM must not be included in VkRenderPassTileShadingCreateInfoQCOM::`flags`

- VUID-VkRenderPassCreateInfo-None-10915
  If any subpass preserves an attachment, there must be a subpass dependency from a prior subpass which uses or preserves that attachment

Valid Usage (Implicit)

- VUID-VkRenderPassCreateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO

- VUID-VkRenderPassCreateInfo-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkRenderPassFragmentDensityMapCreateInfoEXT, VkRenderPassInputAttachmentAspectCreateInfo, VkRenderPassMultiviewCreateInfo, VkRenderPassTileShadingCreateInfoQCOM, or VkTileMemorySizeInfoQCOM

- VUID-VkRenderPassCreateInfo-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkRenderPassCreateInfo-flags-parameter
  `flags` must be a valid combination of VkRenderPassCreateFlagBits values

- VUID-VkRenderPassCreateInfo-pAttachments-parameter
  If `attachmentCount` is not `0`, `pAttachments` must be a valid pointer to an array of `attachmentCount` valid VkAttachmentDescription structures

- VUID-VkRenderPassCreateInfo-pSubpasses-parameter
  `pSubpasses` must be a valid pointer to an array of `subpassCount` valid VkSubpassDescription structures

- VUID-VkRenderPassCreateInfo-pDependencies-parameter
  If `dependencyCount` is not `0`, `pDependencies` must be a valid pointer to an array of `dependencyCount` valid VkSubpassDependency structures

- VUID-VkRenderPassCreateInfo-subpassCount-arraylength
  `subpassCount` must be greater than `0`

Bits which can be set in VkRenderPassCreateInfo::`flags`, describing additional properties of the render pass, are:

Warning | This functionality is superseded by Vulkan Version 1.2. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_0
    typedef enum VkRenderPassCreateFlagBits {
      // Provided by VK_QCOM_render_pass_transform
        VK_RENDER_PASS_CREATE_TRANSFORM_BIT_QCOM = 0x00000002,
      // Provided by VK_VALVE_fragment_density_map_layered
        VK_RENDER_PASS_CREATE_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE = 0x00000004,
    } VkRenderPassCreateFlagBits;

- VK_RENDER_PASS_CREATE_TRANSFORM_BIT_QCOM specifies that the created render pass is compatible with render pass transform.

- VK_RENDER_PASS_CREATE_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE specifies that the created render pass is usable with layered fragment density maps.

Warning | This functionality is superseded by Vulkan Version 1.2. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_0
    typedef VkFlags VkRenderPassCreateFlags;

`VkRenderPassCreateFlags` is a bitmask type for setting a mask of zero or more VkRenderPassCreateFlagBits.

If the VkRenderPassCreateInfo::`pNext` chain includes a `VkRenderPassMultiviewCreateInfo` structure, then that structure includes an array of view masks, view offsets, and correlation masks for the render pass.

The `VkRenderPassMultiviewCreateInfo` structure is defined as:

Warning | This functionality is superseded by Vulkan Version 1.2. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_1
    typedef struct VkRenderPassMultiviewCreateInfo {
        VkStructureType    sType;
        const void*        pNext;
        uint32_t           subpassCount;
        const uint32_t*    pViewMasks;
        uint32_t           dependencyCount;
        const int32_t*     pViewOffsets;
        uint32_t           correlationMaskCount;
        const uint32_t*    pCorrelationMasks;
    } VkRenderPassMultiviewCreateInfo;

    // Provided by VK_KHR_multiview
    // Equivalent to VkRenderPassMultiviewCreateInfo
    typedef VkRenderPassMultiviewCreateInfo VkRenderPassMultiviewCreateInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `subpassCount` is zero or the number of subpasses in the render pass.

- `pViewMasks` is a pointer to an array of `subpassCount` view masks, where each mask is a bitfield of view indices describing which views rendering is broadcast to in each subpass, when multiview is enabled. If `subpassCount` is zero, each view mask is treated as zero.

- `dependencyCount` is zero or the number of dependencies in the render pass.

- `pViewOffsets` is a pointer to an array of `dependencyCount` view offsets, one for each dependency. If `dependencyCount` is zero, each dependency’s view offset is treated as zero. Each view offset controls which views in the source subpass the views in the destination subpass depend on.

- `correlationMaskCount` is zero or the number of correlation masks.

- `pCorrelationMasks` is a pointer to an array of `correlationMaskCount` view masks indicating sets of views that may be more efficient to render concurrently.

When a subpass uses a non-zero view mask, multiview functionality is considered to be enabled. Multiview is all-or-nothing for a render pass - that is, either all subpasses must have a non-zero view mask (though some subpasses may have only one view) or all must be zero. Multiview causes all drawing and clear commands in the subpass to behave as if they were broadcast to each view, where a view is represented by one layer of the framebuffer attachments. All draws and clears are broadcast to each view index whose bit is set in the view mask. The view index is provided in the `ViewIndex` shader input variable, and color, depth/stencil, and input attachments all read/write the layer of the framebuffer corresponding to the view index.

If the view mask is zero for all subpasses, multiview is considered to be disabled and all drawing commands execute normally, without this additional broadcasting.

Some implementations may not support multiview in conjunction with mesh shaders, geometry shaders or tessellation shaders.

When multiview is enabled, the VK_DEPENDENCY_VIEW_LOCAL_BIT bit in a dependency can be used to express a view-local dependency, meaning that each view in the destination subpass depends on a single view in the source subpass. Unlike pipeline barriers, a subpass dependency can potentially have a different view mask in the source subpass and the destination subpass. If the dependency is view-local, then each view (dstView) in the destination subpass depends on the view dstView + `pViewOffsets`[dependency] in the source subpass. If there is not such a view in the source subpass, then this dependency does not affect that view in the destination subpass. If the dependency is not view-local, then all views in the destination subpass depend on all views in the source subpass, and the view offset is ignored. A non-zero view offset is not allowed in a self-dependency.

The elements of `pCorrelationMasks` are a set of masks of views indicating that views in the same mask may exhibit spatial coherency between the views, making it more efficient to render them concurrently. Correlation masks must not have a functional effect on the results of the multiview rendering.

When multiview is enabled, at the beginning of each subpass all non-render pass state is undefined. In particular, each time vkCmdBeginRenderPass or vkCmdNextSubpass is called the graphics pipeline must be bound, any relevant descriptor sets or vertex/index buffers must be bound, and any relevant dynamic state or push constants must be set before they are used.

A multiview subpass can declare that its shaders will write per-view attributes for all views in a single invocation, by setting the VK_SUBPASS_DESCRIPTION_PER_VIEW_ATTRIBUTES_BIT_NVX bit in the subpass description. The only supported per-view attributes are position and viewport mask, and per-view position and viewport masks are written to output array variables decorated with `PositionPerViewNV` and `ViewportMaskPerViewNV`, respectively. If the `VK_NV_viewport_array2` extension is not supported and enabled, `ViewportMaskPerViewNV` must not be used. Values written to elements of `PositionPerViewNV` and `ViewportMaskPerViewNV` must not depend on the `ViewIndex`. The shader must also write to an output variable decorated with `Position`, and the value written to `Position` must equal the value written to `PositionPerViewNV`[`ViewIndex`]. Similarly, if `ViewportMaskPerViewNV` is written to then the shader must also write to an output variable decorated with `ViewportMaskNV`, and the value written to `ViewportMaskNV` must equal the value written to `ViewportMaskPerViewNV`[`ViewIndex`]. Implementations will either use values taken from `Position` and `ViewportMaskNV` and invoke the shader once for each view, or will use values taken from `PositionPerViewNV` and `ViewportMaskPerViewNV` and invoke the shader fewer times. The values written to `Position` and `ViewportMaskNV` must not depend on the values written to `PositionPerViewNV` and `ViewportMaskPerViewNV`, or vice versa (to allow compilers to eliminate the unused outputs). All attributes that do not have `*PerViewNV` counterparts must not depend on `ViewIndex`.

Per-view attributes are all-or-nothing for a subpass. That is, all pipelines compiled against a subpass that includes the VK_SUBPASS_DESCRIPTION_PER_VIEW_ATTRIBUTES_BIT_NVX bit must write per-view attributes to the `*PerViewNV[]` shader outputs, in addition to the non-per-view (e.g. `Position`) outputs. Pipelines compiled against a subpass that does not include this bit must not include the `*PerViewNV[]` outputs in their interfaces.

Valid Usage

- VUID-VkRenderPassMultiviewCreateInfo-pCorrelationMasks-00841
  Each view index must not be set in more than one element of `pCorrelationMasks`

- VUID-VkRenderPassMultiviewCreateInfo-multiview-06555
  If the `multiview` feature is not enabled, each element of `pViewMasks` must be `0`

- VUID-VkRenderPassMultiviewCreateInfo-pViewMasks-06697
  The index of the most significant bit in each element of `pViewMasks` must be less than `maxMultiviewViewCount`

Valid Usage (Implicit)

- VUID-VkRenderPassMultiviewCreateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO

- VUID-VkRenderPassMultiviewCreateInfo-pViewMasks-parameter
  If `subpassCount` is not `0`, `pViewMasks` must be a valid pointer to an array of `subpassCount` `uint32_t` values

- VUID-VkRenderPassMultiviewCreateInfo-pViewOffsets-parameter
  If `dependencyCount` is not `0`, `pViewOffsets` must be a valid pointer to an array of `dependencyCount` `int32_t` values

- VUID-VkRenderPassMultiviewCreateInfo-pCorrelationMasks-parameter
  If `correlationMaskCount` is not `0`, `pCorrelationMasks` must be a valid pointer to an array of `correlationMaskCount` `uint32_t` values

Structure Chaining

Extends the structure

  - VkRenderPassCreateInfo

The `VkMultiviewPerViewAttributesInfoNVX` structure is defined as:

    // Provided by VK_NVX_multiview_per_view_attributes with VK_VERSION_1_3 or VK_KHR_dynamic_rendering
    typedef struct VkMultiviewPerViewAttributesInfoNVX {
        VkStructureType    sType;
        const void*        pNext;
        VkBool32           perViewAttributes;
        VkBool32           perViewAttributesPositionXOnly;
    } VkMultiviewPerViewAttributesInfoNVX;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `perViewAttributes` specifies that shaders compiled for this pipeline write the attributes for all views in a single invocation of each vertex processing stage. All pipelines executed within a render pass instance that includes this bit must write per-view attributes to the `*PerViewNV[]` shader outputs, in addition to the non-per-view (e.g. `Position`) outputs.

- `perViewAttributesPositionXOnly` specifies that shaders compiled for this pipeline use per-view positions which only differ in value in the x component. Per-view viewport mask can also be used.

When dynamic render pass instances are being used, instead of specifying VK_SUBPASS_DESCRIPTION_PER_VIEW_ATTRIBUTES_BIT_NVX or VK_SUBPASS_DESCRIPTION_PER_VIEW_POSITION_X_ONLY_BIT_NVX in the subpass description flags, the per-attribute properties of the render pass instance must be specified by the `VkMultiviewPerViewAttributesInfoNVX` structure Include the `VkMultiviewPerViewAttributesInfoNVX` structure in the `pNext` chain of VkGraphicsPipelineCreateInfo when creating a graphics pipeline for dynamic rendering, VkRenderingInfo when starting a dynamic render pass instance, and VkCommandBufferInheritanceInfo when specifying the dynamic render pass instance parameters for secondary command buffers.

Valid Usage (Implicit)

- VUID-VkMultiviewPerViewAttributesInfoNVX-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_MULTIVIEW_PER_VIEW_ATTRIBUTES_INFO_NVX

Structure Chaining

Extends the structures

  - VkCommandBufferInheritanceInfo

  - VkGraphicsPipelineCreateInfo

  - VkRenderingInfo

If the VkRenderPassCreateInfo::`pNext` chain includes a `VkRenderPassFragmentDensityMapCreateInfoEXT` structure, then that structure includes a fragment density map attachment for the render pass.

The `VkRenderPassFragmentDensityMapCreateInfoEXT` structure is defined as:

Warning | This functionality is superseded by Vulkan Version 1.4 and VK_KHR_dynamic_rendering_local_read. See Legacy Functionality for more information.

    // Provided by VK_EXT_fragment_density_map
    typedef struct VkRenderPassFragmentDensityMapCreateInfoEXT {
        VkStructureType          sType;
        const void*              pNext;
        VkAttachmentReference    fragmentDensityMapAttachment;
    } VkRenderPassFragmentDensityMapCreateInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `fragmentDensityMapAttachment` is the fragment density map to use for the render pass.

The fragment density map is read at an implementation-dependent time with the following constraints determined by the attachment’s image view `flags`:

- VK_IMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DYNAMIC_BIT_EXT specifies that the fragment density map will be read by the device during VK_PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT

- VK_IMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DEFERRED_BIT_EXT specifies that the fragment density map will be read by the host during vkEndCommandBuffer of the primary command buffer that the render pass is recorded into

- Otherwise the fragment density map will be read by the host during vkCmdBeginRenderPass

The fragment density map may additionally be read by the device during VK_PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT for any mode.

If this structure is not present, it is as if `fragmentDensityMapAttachment` was given as VK_ATTACHMENT_UNUSED.

Valid Usage

- VUID-VkRenderPassFragmentDensityMapCreateInfoEXT-fragmentDensityMapAttachment-02548
  If `fragmentDensityMapAttachment` is not VK_ATTACHMENT_UNUSED, `fragmentDensityMapAttachment` must not be an element of `VkSubpassDescription`::`pInputAttachments`, `VkSubpassDescription`::`pColorAttachments`, `VkSubpassDescription`::`pResolveAttachments`, `VkSubpassDescription`::`pDepthStencilAttachment`, or `VkSubpassDescription`::`pPreserveAttachments` for any subpass

- VUID-VkRenderPassFragmentDensityMapCreateInfoEXT-fragmentDensityMapAttachment-02549
  If `fragmentDensityMapAttachment` is not VK_ATTACHMENT_UNUSED, `layout` must be equal to VK_IMAGE_LAYOUT_FRAGMENT_DENSITY_MAP_OPTIMAL_EXT, or VK_IMAGE_LAYOUT_GENERAL

- VUID-VkRenderPassFragmentDensityMapCreateInfoEXT-fragmentDensityMapAttachment-02550
  If `fragmentDensityMapAttachment` is not VK_ATTACHMENT_UNUSED, `fragmentDensityMapAttachment` must reference an attachment with a `loadOp` equal to VK_ATTACHMENT_LOAD_OP_LOAD or VK_ATTACHMENT_LOAD_OP_DONT_CARE

- VUID-VkRenderPassFragmentDensityMapCreateInfoEXT-fragmentDensityMapAttachment-02551
  If `fragmentDensityMapAttachment` is not VK_ATTACHMENT_UNUSED, `fragmentDensityMapAttachment` must reference an attachment with a `storeOp` equal to VK_ATTACHMENT_STORE_OP_DONT_CARE

Valid Usage (Implicit)

- VUID-VkRenderPassFragmentDensityMapCreateInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_RENDER_PASS_FRAGMENT_DENSITY_MAP_CREATE_INFO_EXT

- VUID-VkRenderPassFragmentDensityMapCreateInfoEXT-fragmentDensityMapAttachment-parameter
  `fragmentDensityMapAttachment` must be a valid VkAttachmentReference structure

Structure Chaining

Extends the structures

  - VkRenderPassCreateInfo

  - VkRenderPassCreateInfo2

The `VkAttachmentDescription` structure is defined as:

Warning | This functionality is superseded by VkAttachmentDescription2. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_0
    typedef struct VkAttachmentDescription {
        VkAttachmentDescriptionFlags    flags;
        VkFormat                        format;
        VkSampleCountFlagBits           samples;
        VkAttachmentLoadOp              loadOp;
        VkAttachmentStoreOp             storeOp;
        VkAttachmentLoadOp              stencilLoadOp;
        VkAttachmentStoreOp             stencilStoreOp;
        VkImageLayout                   initialLayout;
        VkImageLayout                   finalLayout;
    } VkAttachmentDescription;

- `flags` is a bitmask of VkAttachmentDescriptionFlagBits specifying additional properties of the attachment.

- `format` is a VkFormat value specifying the format of the image view that will be used for the attachment.

- `samples` is a VkSampleCountFlagBits value specifying the number of samples of the image.

- `loadOp` is a VkAttachmentLoadOp value specifying how the contents of color and depth components of the attachment are treated at the beginning of the subpass where it is first used.

- `storeOp` is a VkAttachmentStoreOp value specifying how the contents of color and depth components of the attachment are treated at the end of the subpass where it is last used.

- `stencilLoadOp` is a VkAttachmentLoadOp value specifying how the contents of stencil components of the attachment are treated at the beginning of the subpass where it is first used.

- `stencilStoreOp` is a VkAttachmentStoreOp value specifying how the contents of stencil components of the attachment are treated at the end of the last subpass where it is used.

- `initialLayout` is the layout the attachment image subresource will be in when a render pass instance begins.

- `finalLayout` is the layout the attachment image subresource will be transitioned to when a render pass instance ends.

If the attachment uses a color format, then `loadOp` and `storeOp` are used, and `stencilLoadOp` and `stencilStoreOp` are ignored. If the format has depth and/or stencil components, `loadOp` and `storeOp` apply only to the depth data, while `stencilLoadOp` and `stencilStoreOp` define how the stencil data is handled. `loadOp` and `stencilLoadOp` define the load operations for the attachment. `storeOp` and `stencilStoreOp` define the store operations for the attachment. If an attachment is not used by any subpass, `loadOp`, `storeOp`, `stencilStoreOp`, and `stencilLoadOp` will be ignored for that attachment, and no load or store ops will be performed. However, any transition specified by `initialLayout` and `finalLayout` will still be executed.

If `flags` includes VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT, then the attachment is treated as if it shares physical memory with another attachment in the same render pass. This information limits the ability of the implementation to reorder certain operations (like layout transitions and the `loadOp`) such that it is not improperly reordered against other uses of the same physical memory via a different attachment. This is described in more detail below.

If a render pass uses multiple attachments that alias the same device memory, those attachments must each include the VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT bit in their attachment description flags. Attachments aliasing the same memory occurs in multiple ways:

- Multiple attachments being assigned the same image view as part of framebuffer creation.

- Attachments using distinct image views that correspond to the same image subresource of an image.

- Attachments using views of distinct image subresources which are bound to overlapping memory ranges.

Note | Render passes must include subpass dependencies (either directly or via a subpass dependency chain) between any two subpasses that operate on the same attachment or aliasing attachments and those subpass dependencies must include execution and memory dependencies separating uses of the aliases, if at least one of those subpasses writes to one of the aliases. These dependencies must not include the VK_DEPENDENCY_BY_REGION_BIT if the aliases are views of distinct image subresources which overlap in memory.

Multiple attachments that alias the same memory must not be used in a single subpass. A given attachment index must not be used multiple times in a single subpass, with one exception: two subpass attachments can use the same attachment index if at least one use is as an input attachment and neither use is as a resolve or preserve attachment. In other words, the same view can be used simultaneously as an input and color or depth/stencil attachment, but must not be used as multiple color or depth/stencil attachments nor as resolve or preserve attachments.

If a set of attachments alias each other, then all except the first to be used in the render pass must use an `initialLayout` of VK_IMAGE_LAYOUT_UNDEFINED, since the earlier uses of the other aliases make their contents undefined. Once an alias has been used and a different alias has been used after it, the first alias must not be used in any later subpasses. However, an application can assign the same image view to multiple aliasing attachment indices, which allows that image view to be used multiple times even if other aliases are used in between.

Note | Once an attachment needs the VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT bit, there should be no additional cost of introducing additional aliases, and using these additional aliases may allow more efficient clearing of the attachments on multiple uses via VK_ATTACHMENT_LOAD_OP_CLEAR.

Valid Usage

- VUID-VkAttachmentDescription-format-06699
  If `format` includes a color or depth component and `loadOp` is VK_ATTACHMENT_LOAD_OP_LOAD, then `initialLayout` must not be VK_IMAGE_LAYOUT_UNDEFINED

- VUID-VkAttachmentDescription-finalLayout-00843
  `finalLayout` must not be VK_IMAGE_LAYOUT_UNDEFINED or VK_IMAGE_LAYOUT_ZERO_INITIALIZED_EXT or VK_IMAGE_LAYOUT_PREINITIALIZED

- VUID-VkAttachmentDescription-format-03280
  If `format` is a color format, `initialLayout` must not be VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL or VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL

- VUID-VkAttachmentDescription-format-03281
  If `format` is a depth/stencil format, `initialLayout` must not be VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL

- VUID-VkAttachmentDescription-format-03282
  If `format` is a color format, `finalLayout` must not be VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL or VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL

- VUID-VkAttachmentDescription-format-03283
  If `format` is a depth/stencil format, `finalLayout` must not be VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL

- VUID-VkAttachmentDescription-format-06487
  If `format` is a color format, `initialLayout` must not be VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL or VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL

- VUID-VkAttachmentDescription-format-06488
  If `format` is a color format, `finalLayout` must not be VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL or VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL

- VUID-VkAttachmentDescription-separateDepthStencilLayouts-03284
  If the `separateDepthStencilLayouts` feature is not enabled, `initialLayout` must not be VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL, VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL, or VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL,

- VUID-VkAttachmentDescription-separateDepthStencilLayouts-03285
  If the `separateDepthStencilLayouts` feature is not enabled, `finalLayout` must not be VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL, VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL, or VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL,

- VUID-VkAttachmentDescription-format-03286
  If `format` is a color format, `initialLayout` must not be VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL, VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL, or VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL

- VUID-VkAttachmentDescription-format-03287
  If `format` is a color format, `finalLayout` must not be VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL, VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL, or VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL

- VUID-VkAttachmentDescription-format-06906
  If `format` is a depth/stencil format which includes both depth and stencil components, `initialLayout` must not be VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL or VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL

- VUID-VkAttachmentDescription-format-06907
  If `format` is a depth/stencil format which includes both depth and stencil components, `finalLayout` must not be VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL or VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL

- VUID-VkAttachmentDescription-format-03290
  If `format` is a depth/stencil format which includes only the depth component, `initialLayout` must not be VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL or VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL

- VUID-VkAttachmentDescription-format-03291
  If `format` is a depth/stencil format which includes only the depth component, `finalLayout` must not be VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL or VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL

- VUID-VkAttachmentDescription-synchronization2-06908
  If the `synchronization2` feature is not enabled, `initialLayout` must not be VK_IMAGE_LAYOUT_ATTACHMENT_OPTIMAL_KHR or VK_IMAGE_LAYOUT_READ_ONLY_OPTIMAL_KHR

- VUID-VkAttachmentDescription-synchronization2-06909
  If the `synchronization2` feature is not enabled, `finalLayout` must not be VK_IMAGE_LAYOUT_ATTACHMENT_OPTIMAL_KHR or VK_IMAGE_LAYOUT_READ_ONLY_OPTIMAL_KHR

- VUID-VkAttachmentDescription-attachmentFeedbackLoopLayout-07309
  If the `attachmentFeedbackLoopLayout` feature is not enabled, `initialLayout` must not be VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT

- VUID-VkAttachmentDescription-attachmentFeedbackLoopLayout-07310
  If the `attachmentFeedbackLoopLayout` feature is not enabled, `finalLayout` must not be VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT

- VUID-VkAttachmentDescription-samples-08745
  `samples` must be a valid VkSampleCountFlagBits value that is set in `imageCreateSampleCounts` (as defined in Image Creation Limits) for the given `format`

- VUID-VkAttachmentDescription-dynamicRenderingLocalRead-09544
  If the `dynamicRenderingLocalRead` feature is not enabled, `initialLayout` must not be VK_IMAGE_LAYOUT_RENDERING_LOCAL_READ

- VUID-VkAttachmentDescription-dynamicRenderingLocalRead-09545
  If the `dynamicRenderingLocalRead` feature is not enabled, `finalLayout` must not be VK_IMAGE_LAYOUT_RENDERING_LOCAL_READ

- VUID-VkAttachmentDescription-flags-11773
  If `flags` includes VK_ATTACHMENT_DESCRIPTION_RESOLVE_SKIP_TRANSFER_FUNCTION_BIT_KHR, `flags` must not include VK_ATTACHMENT_DESCRIPTION_RESOLVE_ENABLE_TRANSFER_FUNCTION_BIT_KHR

- VUID-VkAttachmentDescription-flags-11774
  If `flags` includes VK_ATTACHMENT_DESCRIPTION_RESOLVE_SKIP_TRANSFER_FUNCTION_BIT_KHR or VK_ATTACHMENT_DESCRIPTION_RESOLVE_ENABLE_TRANSFER_FUNCTION_BIT_KHR, `resolveSrgbFormatSupportsTransferFunctionControl` must be VK_TRUE

- VUID-VkAttachmentDescription-flags-11775
  If `flags` includes VK_ATTACHMENT_DESCRIPTION_RESOLVE_SKIP_TRANSFER_FUNCTION_BIT_KHR or VK_ATTACHMENT_DESCRIPTION_RESOLVE_ENABLE_TRANSFER_FUNCTION_BIT_KHR, `maintenance10` must be enabled

- VUID-VkAttachmentDescription-flags-11776
  If `flags` includes VK_ATTACHMENT_DESCRIPTION_RESOLVE_SKIP_TRANSFER_FUNCTION_BIT_KHR or VK_ATTACHMENT_DESCRIPTION_RESOLVE_ENABLE_TRANSFER_FUNCTION_BIT_KHR, `format` must use sRGB encoding

- VUID-VkAttachmentDescription-flags-11777
  If `flags` includes VK_ATTACHMENT_DESCRIPTION_RESOLVE_SKIP_TRANSFER_FUNCTION_BIT_KHR or VK_ATTACHMENT_DESCRIPTION_RESOLVE_ENABLE_TRANSFER_FUNCTION_BIT_KHR, `samples` must be VK_SAMPLE_COUNT_1_BIT

- VUID-VkAttachmentDescription-format-06698
  `format` must not be VK_FORMAT_UNDEFINED

- VUID-VkAttachmentDescription-format-06700
  If `format` includes a stencil component and `stencilLoadOp` is VK_ATTACHMENT_LOAD_OP_LOAD, then `initialLayout` must not be VK_IMAGE_LAYOUT_UNDEFINED

- VUID-VkAttachmentDescription-format-03292
  If `format` is a depth/stencil format which includes only the stencil component, `initialLayout` must not be VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL or VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL

- VUID-VkAttachmentDescription-format-03293
  If `format` is a depth/stencil format which includes only the stencil component, `finalLayout` must not be VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL or VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL

- VUID-VkAttachmentDescription-format-06242
  If `format` is a depth/stencil format which includes both depth and stencil components, `initialLayout` must not be VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL or VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL

- VUID-VkAttachmentDescription-format-06243
  If `format` is a depth/stencil format which includes both depth and stencil components, `finalLayout` must not be VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL or VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL

Valid Usage (Implicit)

- VUID-VkAttachmentDescription-flags-parameter
  `flags` must be a valid combination of VkAttachmentDescriptionFlagBits values

- VUID-VkAttachmentDescription-format-parameter
  `format` must be a valid VkFormat value

- VUID-VkAttachmentDescription-samples-parameter
  `samples` must be a valid VkSampleCountFlagBits value

- VUID-VkAttachmentDescription-loadOp-parameter
  `loadOp` must be a valid VkAttachmentLoadOp value

- VUID-VkAttachmentDescription-storeOp-parameter
  `storeOp` must be a valid VkAttachmentStoreOp value

- VUID-VkAttachmentDescription-stencilLoadOp-parameter
  `stencilLoadOp` must be a valid VkAttachmentLoadOp value

- VUID-VkAttachmentDescription-stencilStoreOp-parameter
  `stencilStoreOp` must be a valid VkAttachmentStoreOp value

- VUID-VkAttachmentDescription-initialLayout-parameter
  `initialLayout` must be a valid VkImageLayout value

- VUID-VkAttachmentDescription-finalLayout-parameter
  `finalLayout` must be a valid VkImageLayout value

Bits which can be set in VkAttachmentDescription::`flags`, describing additional properties of the attachment, are:

Warning | This functionality is superseded by Vulkan Version 1.2. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_0
    typedef enum VkAttachmentDescriptionFlagBits {
        VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT = 0x00000001,
      // Provided by VK_KHR_maintenance10
        VK_ATTACHMENT_DESCRIPTION_RESOLVE_SKIP_TRANSFER_FUNCTION_BIT_KHR = 0x00000002,
      // Provided by VK_KHR_maintenance10
        VK_ATTACHMENT_DESCRIPTION_RESOLVE_ENABLE_TRANSFER_FUNCTION_BIT_KHR = 0x00000004,
    } VkAttachmentDescriptionFlagBits;

- VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT specifies that the attachment aliases the same device memory as other attachments.

- VK_ATTACHMENT_DESCRIPTION_RESOLVE_SKIP_TRANSFER_FUNCTION_BIT_KHR specifies that resolve operations happening to an sRGB encoded attachment must not convert samples from nonlinear to linear before averaging.

- VK_ATTACHMENT_DESCRIPTION_RESOLVE_ENABLE_TRANSFER_FUNCTION_BIT_KHR specifies that resolve operations happening to an sRGB encoded attachment must convert samples from nonlinear to linear before averaging.

Warning | This functionality is superseded by Vulkan Version 1.2. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_0
    typedef VkFlags VkAttachmentDescriptionFlags;

`VkAttachmentDescriptionFlags` is a bitmask type for setting a mask of zero or more VkAttachmentDescriptionFlagBits.

The `VkRenderPassInputAttachmentAspectCreateInfo` structure is defined as:

Warning | This functionality is superseded by Vulkan Version 1.2. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_1
    typedef struct VkRenderPassInputAttachmentAspectCreateInfo {
        VkStructureType                            sType;
        const void*                                pNext;
        uint32_t                                   aspectReferenceCount;
        const VkInputAttachmentAspectReference*    pAspectReferences;
    } VkRenderPassInputAttachmentAspectCreateInfo;

    // Provided by VK_KHR_maintenance2
    // Equivalent to VkRenderPassInputAttachmentAspectCreateInfo
    typedef VkRenderPassInputAttachmentAspectCreateInfo VkRenderPassInputAttachmentAspectCreateInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `aspectReferenceCount` is the number of elements in the `pAspectReferences` array.

- `pAspectReferences` is a pointer to an array of `aspectReferenceCount` VkInputAttachmentAspectReference structures containing a mask describing which aspect(s) can be accessed for a given input attachment within a given subpass.

To specify which aspects of an input attachment can be read, add a VkRenderPassInputAttachmentAspectCreateInfo structure to the `pNext` chain of the VkRenderPassCreateInfo structure:

An application can access any aspect of an input attachment that does not have a specified aspect mask in the `pAspectReferences` array. Otherwise, an application must not access aspect(s) of an input attachment other than those in its specified aspect mask.

Valid Usage (Implicit)

- VUID-VkRenderPassInputAttachmentAspectCreateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO

- VUID-VkRenderPassInputAttachmentAspectCreateInfo-pAspectReferences-parameter
  `pAspectReferences` must be a valid pointer to an array of `aspectReferenceCount` valid VkInputAttachmentAspectReference structures

- VUID-VkRenderPassInputAttachmentAspectCreateInfo-aspectReferenceCount-arraylength
  `aspectReferenceCount` must be greater than `0`

Structure Chaining

Extends the structure

  - VkRenderPassCreateInfo

The `VkInputAttachmentAspectReference` structure is defined as:

Warning | This functionality is superseded by Vulkan Version 1.2. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_1
    typedef struct VkInputAttachmentAspectReference {
        uint32_t              subpass;
        uint32_t              inputAttachmentIndex;
        VkImageAspectFlags    aspectMask;
    } VkInputAttachmentAspectReference;

    // Provided by VK_KHR_maintenance2
    // Equivalent to VkInputAttachmentAspectReference
    typedef VkInputAttachmentAspectReference VkInputAttachmentAspectReferenceKHR;

- `subpass` is an index into the `pSubpasses` array of the parent `VkRenderPassCreateInfo` structure.

- `inputAttachmentIndex` is an index into the `pInputAttachments` of the specified subpass.

- `aspectMask` is a mask of which aspect(s) can be accessed within the specified subpass.

This structure specifies an aspect mask for a specific input attachment of a specific subpass in the render pass.

`subpass` and `inputAttachmentIndex` index into the render pass as:

    pCreateInfo->pSubpasses[subpass].pInputAttachments[inputAttachmentIndex]

Valid Usage

- VUID-VkInputAttachmentAspectReference-aspectMask-01964
  `aspectMask` must not include VK_IMAGE_ASPECT_METADATA_BIT

- VUID-VkInputAttachmentAspectReference-aspectMask-02250
  `aspectMask` must not include `VK_IMAGE_ASPECT_MEMORY_PLANE_i_BIT_EXT` for any index i

Valid Usage (Implicit)

- VUID-VkInputAttachmentAspectReference-aspectMask-parameter
  `aspectMask` must be a valid combination of VkImageAspectFlagBits values

- VUID-VkInputAttachmentAspectReference-aspectMask-requiredbitmask
  `aspectMask` must not be `0`

The `VkSubpassDescription` structure is defined as:

Warning | This functionality is superseded by VkSubpassDescription2. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_0
    typedef struct VkSubpassDescription {
        VkSubpassDescriptionFlags       flags;
        VkPipelineBindPoint             pipelineBindPoint;
        uint32_t                        inputAttachmentCount;
        const VkAttachmentReference*    pInputAttachments;
        uint32_t                        colorAttachmentCount;
        const VkAttachmentReference*    pColorAttachments;
        const VkAttachmentReference*    pResolveAttachments;
        const VkAttachmentReference*    pDepthStencilAttachment;
        uint32_t                        preserveAttachmentCount;
        const uint32_t*                 pPreserveAttachments;
    } VkSubpassDescription;

- `flags` is a bitmask of VkSubpassDescriptionFlagBits specifying usage of the subpass.

- `pipelineBindPoint` is a VkPipelineBindPoint value specifying the pipeline type supported for this subpass.

- `inputAttachmentCount` is the number of input attachments.

- `pInputAttachments` is a pointer to an array of VkAttachmentReference structures defining the input attachments for this subpass and their layouts.

- `colorAttachmentCount` is the number of color attachments.

- `pColorAttachments` is a pointer to an array of `colorAttachmentCount` VkAttachmentReference structures defining the color attachments for this subpass and their layouts.

- `pResolveAttachments` is `NULL` or a pointer to an array of `colorAttachmentCount` VkAttachmentReference structures defining the resolve attachments for this subpass and their layouts.

- `pDepthStencilAttachment` is a pointer to a VkAttachmentReference structure specifying the depth/stencil attachment for this subpass and its layout.

- `preserveAttachmentCount` is the number of preserved attachments.

- `pPreserveAttachments` is a pointer to an array of `preserveAttachmentCount` render pass attachment indices identifying attachments that are not used by this subpass, but whose contents must be preserved throughout the subpass.

Each element of the `pInputAttachments` array corresponds to an input attachment index in a fragment shader, i.e. if a shader declares an image variable decorated with a `InputAttachmentIndex` value of X, then it uses the attachment provided in `pInputAttachments`[X]. Input attachments must also be bound to the pipeline in a descriptor set. If the `attachment` member of any element of `pInputAttachments` is VK_ATTACHMENT_UNUSED, the application must not read from the corresponding input attachment index. Fragment shaders can use subpass input variables to access the contents of an input attachment at the fragment’s (xf,yf) framebuffer coordinates and layer. Input attachments must not be used by any subpasses within a render pass that enables render pass transform.

Each element of the `pColorAttachments` array corresponds to an output location in the shader, i.e. if the shader declares an output variable decorated with a `Location` value of X, then it uses the attachment provided in `pColorAttachments`[X]. If the `attachment` member of any element of `pColorAttachments` is VK_ATTACHMENT_UNUSED, or if Color Write Enable has been disabled for the corresponding attachment index, then writes to the corresponding location by a fragment shader are discarded.

If `flags` does not include VK_SUBPASS_DESCRIPTION_CUSTOM_RESOLVE_BIT_EXT, and if `pResolveAttachments` is not `NULL`, each of its elements corresponds to a color attachment (the element in `pColorAttachments` at the same index), and a multisample resolve operation is defined for each attachment unless the resolve attachment index is VK_ATTACHMENT_UNUSED.

Similarly, if `flags` does not include VK_SUBPASS_DESCRIPTION_CUSTOM_RESOLVE_BIT_EXT, and VkSubpassDescriptionDepthStencilResolve::`pDepthStencilResolveAttachment` is not `NULL` and does not have the value VK_ATTACHMENT_UNUSED, it corresponds to the depth/stencil attachment in `pDepthStencilAttachment`, and multisample resolve operation for depth and stencil are defined by VkSubpassDescriptionDepthStencilResolve::`depthResolveMode` and VkSubpassDescriptionDepthStencilResolve::`stencilResolveMode`, respectively. If VkSubpassDescriptionDepthStencilResolve::`depthResolveMode` is VK_RESOLVE_MODE_NONE or the `pDepthStencilResolveAttachment` does not have a depth aspect, no resolve operation is performed for the depth attachment. If VkSubpassDescriptionDepthStencilResolve::`stencilResolveMode` is VK_RESOLVE_MODE_NONE or the `pDepthStencilResolveAttachment` does not have a stencil aspect, no resolve operation is performed for the stencil attachment.

If the image subresource range referenced by the depth/stencil attachment is created with VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT, then the multisample resolve operation uses the sample locations state specified in the `sampleLocationsInfo` member of the element of the `VkRenderPassSampleLocationsBeginInfoEXT`::`pPostSubpassSampleLocations` for the subpass.

If `pDepthStencilAttachment` is `NULL`, or if its attachment index is VK_ATTACHMENT_UNUSED, it indicates that no depth/stencil attachment will be used in the subpass.

Following this call, if the `customResolve` feature is enabled the fragment area may be reduced to (1,1) if a fragment density map is attached to the render pass. If this occurs, reads of input attachments may return the value for the original larger fragment containing the smaller fragment or use the new fragment area.

The contents of an attachment within the render area become undefined at the start of a subpass S if all of the following conditions are true:

- The attachment is used as a color, depth/stencil, or resolve attachment in any subpass in the render pass.

- There is a subpass S1 that uses or preserves the attachment, and a subpass dependency from S1 to S.

- The attachment is not used or preserved in subpass S.

In addition, the contents of an attachment within the render area become undefined at the start of a subpass S if all of the following conditions are true:

- VK_SUBPASS_DESCRIPTION_CUSTOM_RESOLVE_BIT_EXT is set.

- The attachment is used as a color or depth/stencil in the subpass.

For color attachments, this operation will be performed in the VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT pipeline stage, with any image accesses performed via VK_ACCESS_INPUT_ATTACHMENT_READ_BIT, VK_ACCESS_COLOR_ATTACHMENT_READ_BIT, and VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT. For depth/stencil attachments, this operation may be performed in either the VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT or VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT pipeline stage, with any image accesses performed via VK_ACCESS_INPUT_ATTACHMENT_READ_BIT, VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT, and VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT.

Once the contents of an attachment become undefined in subpass S, they remain undefined for subpasses in subpass dependency chains starting with subpass S until they are written again. However, they remain valid for subpasses in other subpass dependency chains starting with subpass S1 if all subpasses in each chain use or preserve the attachment.

Note | If a subpass has multiple dependency chains where some of the chains preserve the attachment, and others do not, the contents of the attachment are undefined for that subpass.

Valid Usage

- VUID-VkSubpassDescription-attachment-06912
  If the `attachment` member of an element of `pInputAttachments` is not VK_ATTACHMENT_UNUSED, its `layout` member must not be VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL or VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL

- VUID-VkSubpassDescription-attachment-06913
  If the `attachment` member of an element of `pColorAttachments` is not VK_ATTACHMENT_UNUSED, its `layout` member must not be VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL or VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL

- VUID-VkSubpassDescription-attachment-06914
  If the `attachment` member of an element of `pResolveAttachments` is not VK_ATTACHMENT_UNUSED, its `layout` member must not be VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL or VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL

- VUID-VkSubpassDescription-attachment-06915
  If the `attachment` member of `pDepthStencilAttachment` is not VK_ATTACHMENT_UNUSED, its `layout` member must not be VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL or VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL

- VUID-VkSubpassDescription-attachment-06916
  If the `attachment` member of an element of `pColorAttachments` is not VK_ATTACHMENT_UNUSED, its `layout` member must not be VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL or VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL

- VUID-VkSubpassDescription-attachment-06917
  If the `attachment` member of an element of `pResolveAttachments` is not VK_ATTACHMENT_UNUSED, its `layout` member must not be VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL or VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL

- VUID-VkSubpassDescription-attachment-06918
  If the `attachment` member of an element of `pInputAttachments` is not VK_ATTACHMENT_UNUSED, its `layout` member must not be VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL or VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL

- VUID-VkSubpassDescription-attachment-06919
  If the `attachment` member of an element of `pColorAttachments` is not VK_ATTACHMENT_UNUSED, its `layout` member must not be VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL, VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL, or VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL

- VUID-VkSubpassDescription-attachment-06920
  If the `attachment` member of an element of `pResolveAttachments` is not VK_ATTACHMENT_UNUSED, its `layout` member must not be VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL, VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL, or VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL

- VUID-VkSubpassDescription-attachment-06921
  If the `attachment` member of an element of `pInputAttachments` is not VK_ATTACHMENT_UNUSED, its `layout` member must not be VK_IMAGE_LAYOUT_ATTACHMENT_OPTIMAL_KHR

- VUID-VkSubpassDescription-attachment-06922
  If the `attachment` member of an element of `pColorAttachments` is not VK_ATTACHMENT_UNUSED, its `layout` member must not be VK_IMAGE_LAYOUT_READ_ONLY_OPTIMAL_KHR

- VUID-VkSubpassDescription-attachment-06923
  If the `attachment` member of an element of `pResolveAttachments` is not VK_ATTACHMENT_UNUSED, its `layout` member must not be VK_IMAGE_LAYOUT_READ_ONLY_OPTIMAL_KHR

- VUID-VkSubpassDescription-flags-10683
  If `flags` includes VK_SUBPASS_DESCRIPTION_TILE_SHADING_APRON_BIT_QCOM, the render pass must have been created with a VkRenderPassTileShadingCreateInfoQCOM::`tileApronSize` greater than `(0,0)`

- VUID-VkSubpassDescription-inputAttachmentCount-12293
  `inputAttachmentCount` must be less than or equal to `maxPerStageDescriptorInputAttachments`

- VUID-VkSubpassDescription-colorAttachmentCount-00845
  `colorAttachmentCount` must be less than or equal to `maxColorAttachments`

- VUID-VkSubpassDescription-loadOp-00846
  If the first use of an attachment in this render pass is as an input attachment, and the attachment is not also used as a color or depth/stencil attachment in the same subpass, then `loadOp` must not be VK_ATTACHMENT_LOAD_OP_CLEAR

- VUID-VkSubpassDescription-pipelineBindPoint-04952
  `pipelineBindPoint` must be VK_PIPELINE_BIND_POINT_GRAPHICS or VK_PIPELINE_BIND_POINT_SUBPASS_SHADING_HUAWEI

- VUID-VkSubpassDescription-pResolveAttachments-00847
  If `pResolveAttachments` is not `NULL`, for each resolve attachment that is not VK_ATTACHMENT_UNUSED, the corresponding color attachment must not be VK_ATTACHMENT_UNUSED

- VUID-VkSubpassDescription-pResolveAttachments-00848
  If `pResolveAttachments` is not `NULL`, for each resolve attachment that is not VK_ATTACHMENT_UNUSED, the corresponding color attachment must not have a sample count of VK_SAMPLE_COUNT_1_BIT

- VUID-VkSubpassDescription-pResolveAttachments-00849
  If `pResolveAttachments` is not `NULL`, each resolve attachment that is not VK_ATTACHMENT_UNUSED must have a sample count of VK_SAMPLE_COUNT_1_BIT

- VUID-VkSubpassDescription-pResolveAttachments-00850
  If `pResolveAttachments` is not `NULL`, each resolve attachment that is not VK_ATTACHMENT_UNUSED must have the same VkFormat as its corresponding color attachment

- VUID-VkSubpassDescription-pColorAttachments-09430
  All attachments in `pColorAttachments` that are not VK_ATTACHMENT_UNUSED must have the same sample count

- VUID-VkSubpassDescription-pInputAttachments-02647
  All attachments in `pInputAttachments` that are not VK_ATTACHMENT_UNUSED must have image formats whose potential format features contain at least VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT or VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT

- VUID-VkSubpassDescription-pColorAttachments-02648
  All attachments in `pColorAttachments` that are not VK_ATTACHMENT_UNUSED must have image formats whose potential format features contain VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT

- VUID-VkSubpassDescription-pResolveAttachments-02649
  All attachments in `pResolveAttachments` that are not VK_ATTACHMENT_UNUSED must have image formats whose potential format features contain VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT

- VUID-VkSubpassDescription-pDepthStencilAttachment-02650
  If `pDepthStencilAttachment` is not `NULL` and the attachment is not VK_ATTACHMENT_UNUSED then it must have an image format whose potential format features contain VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT

- VUID-VkSubpassDescription-linearColorAttachment-06496
  If the `linearColorAttachment` feature is enabled and the image is created with VK_IMAGE_TILING_LINEAR, all attachments in `pInputAttachments` that are not VK_ATTACHMENT_UNUSED must have image formats whose potential format features must contain VK_FORMAT_FEATURE_2_LINEAR_COLOR_ATTACHMENT_BIT_NV

- VUID-VkSubpassDescription-linearColorAttachment-06497
  If the `linearColorAttachment` feature is enabled and the image is created with VK_IMAGE_TILING_LINEAR, all attachments in `pColorAttachments` that are not VK_ATTACHMENT_UNUSED must have image formats whose potential format features must contain VK_FORMAT_FEATURE_2_LINEAR_COLOR_ATTACHMENT_BIT_NV

- VUID-VkSubpassDescription-linearColorAttachment-06498
  If the `linearColorAttachment` feature is enabled and the image is created with VK_IMAGE_TILING_LINEAR, all attachments in `pResolveAttachments` that are not VK_ATTACHMENT_UNUSED must have image formats whose potential format features must contain VK_FORMAT_FEATURE_2_LINEAR_COLOR_ATTACHMENT_BIT_NV

- VUID-VkSubpassDescription-None-09431
  If either of the following is enabled:

  - The `VK_AMD_mixed_attachment_samples` extension

  - The `VK_NV_framebuffer_mixed_samples` extension

  all attachments in `pColorAttachments` that are not VK_ATTACHMENT_UNUSED must have a sample count that is smaller than or equal to the sample count of `pDepthStencilAttachment` if it is not VK_ATTACHMENT_UNUSED

- VUID-VkSubpassDescription-pDepthStencilAttachment-01418
  If none of the following are enabled:

  - The `VK_AMD_mixed_attachment_samples` extension

  - The `VK_NV_framebuffer_mixed_samples` extension

  all attachments in `pDepthStencilAttachment` and `pColorAttachments` that are not VK_ATTACHMENT_UNUSED must have the same sample count

- VUID-VkSubpassDescription-attachment-00853
  Each element of `pPreserveAttachments` must not be VK_ATTACHMENT_UNUSED

- VUID-VkSubpassDescription-pPreserveAttachments-00854
  Each element of `pPreserveAttachments` must not also be an element of any other member of the subpass description

- VUID-VkSubpassDescription-layout-02519
  If any attachment is used by more than one VkAttachmentReference member, then each use must use the same `layout`

- VUID-VkSubpassDescription-flags-00856
  If `flags` includes VK_SUBPASS_DESCRIPTION_PER_VIEW_POSITION_X_ONLY_BIT_NVX, it must also include VK_SUBPASS_DESCRIPTION_PER_VIEW_ATTRIBUTES_BIT_NVX

- VUID-VkSubpassDescription-flags-03341
  If `flags` includes VK_SUBPASS_DESCRIPTION_CUSTOM_RESOLVE_BIT_EXT, and if `pResolveAttachments` is not `NULL`, then each resolve attachment must be VK_ATTACHMENT_UNUSED

- VUID-VkSubpassDescription-flags-03343
  If `flags` includes VK_SUBPASS_DESCRIPTION_CUSTOM_RESOLVE_BIT_EXT, then the subpass must be the last subpass in a subpass dependency chain

- VUID-VkSubpassDescription-pInputAttachments-02868
  If the render pass is created with VK_RENDER_PASS_CREATE_TRANSFORM_BIT_QCOM each of the elements of `pInputAttachments` must be VK_ATTACHMENT_UNUSED

- VUID-VkSubpassDescription-pDepthStencilAttachment-04438
  `pDepthStencilAttachment` and `pColorAttachments` must not contain references to the same attachment

Valid Usage (Implicit)

- VUID-VkSubpassDescription-flags-parameter
  `flags` must be a valid combination of VkSubpassDescriptionFlagBits values

- VUID-VkSubpassDescription-pipelineBindPoint-parameter
  `pipelineBindPoint` must be a valid VkPipelineBindPoint value

- VUID-VkSubpassDescription-pInputAttachments-parameter
  If `inputAttachmentCount` is not `0`, `pInputAttachments` must be a valid pointer to an array of `inputAttachmentCount` valid VkAttachmentReference structures

- VUID-VkSubpassDescription-pColorAttachments-parameter
  If `colorAttachmentCount` is not `0`, `pColorAttachments` must be a valid pointer to an array of `colorAttachmentCount` valid VkAttachmentReference structures

- VUID-VkSubpassDescription-pResolveAttachments-parameter
  If `colorAttachmentCount` is not `0`, and `pResolveAttachments` is not `NULL`, `pResolveAttachments` must be a valid pointer to an array of `colorAttachmentCount` valid VkAttachmentReference structures

- VUID-VkSubpassDescription-pDepthStencilAttachment-parameter
  If `pDepthStencilAttachment` is not `NULL`, `pDepthStencilAttachment` must be a valid pointer to a valid VkAttachmentReference structure

- VUID-VkSubpassDescription-pPreserveAttachments-parameter
  If `preserveAttachmentCount` is not `0`, `pPreserveAttachments` must be a valid pointer to an array of `preserveAttachmentCount` `uint32_t` values

Bits which can be set in VkSubpassDescription::`flags`, specifying usage of the subpass, are:

Warning | This functionality is superseded by Vulkan Version 1.2. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_0
    typedef enum VkSubpassDescriptionFlagBits {
      // Provided by VK_NVX_multiview_per_view_attributes
        VK_SUBPASS_DESCRIPTION_PER_VIEW_ATTRIBUTES_BIT_NVX = 0x00000001,
      // Provided by VK_NVX_multiview_per_view_attributes
        VK_SUBPASS_DESCRIPTION_PER_VIEW_POSITION_X_ONLY_BIT_NVX = 0x00000002,
      // Provided by VK_QCOM_tile_shading
        VK_SUBPASS_DESCRIPTION_TILE_SHADING_APRON_BIT_QCOM = 0x00000100,
      // Provided by VK_EXT_rasterization_order_attachment_access
        VK_SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_COLOR_ACCESS_BIT_EXT = 0x00000010,
      // Provided by VK_EXT_rasterization_order_attachment_access
        VK_SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_EXT = 0x00000020,
      // Provided by VK_EXT_rasterization_order_attachment_access
        VK_SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_EXT = 0x00000040,
      // Provided by VK_EXT_legacy_dithering
        VK_SUBPASS_DESCRIPTION_ENABLE_LEGACY_DITHERING_BIT_EXT = 0x00000080,
      // Provided by VK_EXT_custom_resolve
        VK_SUBPASS_DESCRIPTION_FRAGMENT_REGION_BIT_EXT = 0x00000004,
      // Provided by VK_EXT_custom_resolve
        VK_SUBPASS_DESCRIPTION_CUSTOM_RESOLVE_BIT_EXT = 0x00000008,
      // Provided by VK_QCOM_render_pass_shader_resolve
        VK_SUBPASS_DESCRIPTION_FRAGMENT_REGION_BIT_QCOM = VK_SUBPASS_DESCRIPTION_FRAGMENT_REGION_BIT_EXT,
      // Provided by VK_QCOM_render_pass_shader_resolve
        VK_SUBPASS_DESCRIPTION_SHADER_RESOLVE_BIT_QCOM = VK_SUBPASS_DESCRIPTION_CUSTOM_RESOLVE_BIT_EXT,
      // Provided by VK_ARM_rasterization_order_attachment_access
        VK_SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_COLOR_ACCESS_BIT_ARM = VK_SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_COLOR_ACCESS_BIT_EXT,
      // Provided by VK_ARM_rasterization_order_attachment_access
        VK_SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_ARM = VK_SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_EXT,
      // Provided by VK_ARM_rasterization_order_attachment_access
        VK_SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_ARM = VK_SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_EXT,
    } VkSubpassDescriptionFlagBits;

- VK_SUBPASS_DESCRIPTION_PER_VIEW_ATTRIBUTES_BIT_NVX specifies that shaders compiled for this subpass write the attributes for all views in a single invocation of each pre-rasterization shader stage. All pipelines compiled against a subpass that includes this bit must write per-view attributes to the `*PerViewNV[]` shader outputs, in addition to the non-per-view (e.g. `Position`) outputs.

- VK_SUBPASS_DESCRIPTION_PER_VIEW_POSITION_X_ONLY_BIT_NVX specifies that shaders compiled for this subpass use per-view positions which only differ in value in the x component. Per-view viewport mask can also be used.

- VK_SUBPASS_DESCRIPTION_FRAGMENT_REGION_BIT_EXT specifies that the framebuffer region is the fragment region, that is, the minimum region dependencies are by pixel rather than by sample, such that any fragment shader invocation can access any sample associated with that fragment shader invocation.

- VK_SUBPASS_DESCRIPTION_CUSTOM_RESOLVE_BIT_EXT specifies that the subpass performs shader resolve operations.

- VK_SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_COLOR_ACCESS_BIT_EXT specifies that this subpass supports pipelines created with VK_PIPELINE_COLOR_BLEND_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_BIT_EXT.

- VK_SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_EXT specifies that this subpass supports pipelines created with VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_EXT.

- VK_SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_EXT specifies that this subpass supports pipelines created with VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_EXT.

- VK_SUBPASS_DESCRIPTION_ENABLE_LEGACY_DITHERING_BIT_EXT specifies that Legacy Dithering is enabled for this subpass.

- VK_SUBPASS_DESCRIPTION_TILE_SHADING_APRON_BIT_QCOM specifies that apron regions can be read within this subpass when tile shading is enabled.

Note | Shader resolve operations allow for custom resolve operations, but overdrawing pixels may have a performance and/or power cost. Furthermore, since the content of any depth stencil attachment or color attachment is undefined at the beginning of a shader resolve subpass, any depth testing, stencil testing, or blending operation which sources these undefined values also has undefined result value.

Note | There is no equivalent to VK_SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_COLOR_ACCESS_BIT_EXT, VK_SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_EXT, or VK_SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_EXT for render pass instances begun with vkCmdBeginRendering. For such render passes, only the corresponding pipeline flags are specified.

Warning | This functionality is superseded by Vulkan Version 1.2. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_0
    typedef VkFlags VkSubpassDescriptionFlags;

`VkSubpassDescriptionFlags` is a bitmask type for setting a mask of zero or more VkSubpassDescriptionFlagBits.

The `VkAttachmentReference` structure is defined as:

Warning | This functionality is superseded by VkAttachmentReference2. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_0
    typedef struct VkAttachmentReference {
        uint32_t         attachment;
        VkImageLayout    layout;
    } VkAttachmentReference;

- `attachment` is either an integer value identifying an attachment at the corresponding index in VkRenderPassCreateInfo::`pAttachments`, or VK_ATTACHMENT_UNUSED to signify that this attachment is not used.

- `layout` is a VkImageLayout value specifying the layout the attachment uses during the subpass.

Valid Usage

- VUID-VkAttachmentReference-layout-03077
  If `attachment` is not VK_ATTACHMENT_UNUSED, `layout` must not be VK_IMAGE_LAYOUT_UNDEFINED, VK_IMAGE_LAYOUT_ZERO_INITIALIZED_EXT, VK_IMAGE_LAYOUT_PREINITIALIZED, or VK_IMAGE_LAYOUT_PRESENT_SRC_KHR

- VUID-VkAttachmentReference-separateDepthStencilLayouts-03313
  If the `separateDepthStencilLayouts` feature is not enabled, and `attachment` is not VK_ATTACHMENT_UNUSED, `layout` must not be VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL, VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL, or VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL,

- VUID-VkAttachmentReference-synchronization2-06910
  If the `synchronization2` feature is not enabled, `layout` must not be VK_IMAGE_LAYOUT_ATTACHMENT_OPTIMAL_KHR or VK_IMAGE_LAYOUT_READ_ONLY_OPTIMAL_KHR

- VUID-VkAttachmentReference-attachmentFeedbackLoopLayout-07311
  If the `attachmentFeedbackLoopLayout` feature is not enabled, `layout` must not be VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT

- VUID-VkAttachmentReference-dynamicRenderingLocalRead-09546
  If the `dynamicRenderingLocalRead` feature is not enabled, `layout` must not be VK_IMAGE_LAYOUT_RENDERING_LOCAL_READ

Valid Usage (Implicit)

- VUID-VkAttachmentReference-layout-parameter
  `layout` must be a valid VkImageLayout value

VK_SUBPASS_EXTERNAL is a special subpass index value expanding synchronization scope outside a subpass. It is described in more detail by VkSubpassDependency.

    #define VK_SUBPASS_EXTERNAL               (~0U)

The `VkSubpassDependency` structure is defined as:

Warning | This functionality is superseded by VkSubpassDependency2. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_0
    typedef struct VkSubpassDependency {
        uint32_t                srcSubpass;
        uint32_t                dstSubpass;
        VkPipelineStageFlags    srcStageMask;
        VkPipelineStageFlags    dstStageMask;
        VkAccessFlags           srcAccessMask;
        VkAccessFlags           dstAccessMask;
        VkDependencyFlags       dependencyFlags;
    } VkSubpassDependency;

- `srcSubpass` is the subpass index of the first subpass in the dependency, or VK_SUBPASS_EXTERNAL.

- `dstSubpass` is the subpass index of the second subpass in the dependency, or VK_SUBPASS_EXTERNAL.

- `srcStageMask` is a bitmask of VkPipelineStageFlagBits specifying the source stage mask. If set to VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, it is equivalent to setting it to VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT.

- `dstStageMask` is a bitmask of VkPipelineStageFlagBits specifying the destination stage mask If set to VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, it is equivalent to setting it to VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT.

- `srcAccessMask` is a bitmask of VkAccessFlagBits specifying a source access mask.

- `dstAccessMask` is a bitmask of VkAccessFlagBits specifying a destination access mask.

- `dependencyFlags` is a bitmask of VkDependencyFlagBits.

If `srcSubpass` is equal to `dstSubpass` then the VkSubpassDependency does not directly define a dependency. Instead, it enables pipeline barriers to be used in a render pass instance within the identified subpass, where the scopes of one pipeline barrier must be a subset of those described by one subpass dependency. Subpass dependencies specified in this way that include framebuffer-space stages in the `srcStageMask` must only include framebuffer-space stages in `dstStageMask`, and must include VK_DEPENDENCY_BY_REGION_BIT. When a subpass dependency is specified in this way for a subpass that has more than one view in its view mask, its `dependencyFlags` must include VK_DEPENDENCY_VIEW_LOCAL_BIT.

If `srcSubpass` and `dstSubpass` are not equal, when a render pass instance which includes a subpass dependency is submitted to a queue, it defines a dependency between the subpasses identified by `srcSubpass` and `dstSubpass`.

If `srcSubpass` is equal to VK_SUBPASS_EXTERNAL, the first synchronization scope includes commands that occur earlier in submission order than the vkCmdBeginRenderPass used to begin the render pass instance. Otherwise, the first set of commands includes all commands submitted as part of the subpass instance identified by `srcSubpass` and any load, store, or multisample resolve operations on attachments used in `srcSubpass`. In either case, the first synchronization scope is limited to operations on the pipeline stages determined by the source stage mask specified by `srcStageMask`.

If `dstSubpass` is equal to VK_SUBPASS_EXTERNAL, the second synchronization scope includes commands that occur later in submission order than the vkCmdEndRenderPass used to end the render pass instance. Otherwise, the second set of commands includes all commands submitted as part of the subpass instance identified by `dstSubpass` and any load, store, and multisample resolve operations on attachments used in `dstSubpass`. In either case, the second synchronization scope is limited to operations on the pipeline stages determined by the destination stage mask specified by `dstStageMask`.

The first access scope is limited to accesses in the pipeline stages determined by the source stage mask specified by `srcStageMask`. It is also limited to access types in the source access mask specified by `srcAccessMask`.

The second access scope is limited to accesses in the pipeline stages determined by the destination stage mask specified by `dstStageMask`. It is also limited to access types in the destination access mask specified by `dstAccessMask`.

The availability and visibility operations defined by a subpass dependency affect the execution of image layout transitions within the render pass.

Note | For non-attachment resources, the memory dependency expressed by subpass dependency is nearly identical to that of a VkMemoryBarrier (with matching `srcAccessMask` and `dstAccessMask` parameters) submitted as a part of a vkCmdPipelineBarrier (with matching `srcStageMask` and `dstStageMask` parameters). The only difference being that its scopes are limited to the identified subpasses rather than potentially affecting everything before and after. For attachments however, subpass dependencies work more like a VkImageMemoryBarrier defined similarly to the VkMemoryBarrier above, the queue family indices set to VK_QUEUE_FAMILY_IGNORED, and layouts as follows: The equivalent to `oldLayout` is the attachment’s layout according to the subpass description for `srcSubpass`. The equivalent to `newLayout` is the attachment’s layout according to the subpass description for `dstSubpass`.

Valid Usage

- VUID-VkSubpassDependency-srcStageMask-04090
  If the `geometryShader` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT

- VUID-VkSubpassDependency-srcStageMask-04091
  If the `tessellationShader` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT or VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT

- VUID-VkSubpassDependency-srcStageMask-04092
  If the `conditionalRendering` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT

- VUID-VkSubpassDependency-srcStageMask-04093
  If the `fragmentDensityMap` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT

- VUID-VkSubpassDependency-srcStageMask-04094
  If the `transformFeedback` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT

- VUID-VkSubpassDependency-srcStageMask-04095
  If the `meshShader` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_MESH_SHADER_BIT_EXT

- VUID-VkSubpassDependency-srcStageMask-04096
  If the `taskShader` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_TASK_SHADER_BIT_EXT

- VUID-VkSubpassDependency-srcStageMask-07318
  If neither of the `shadingRateImage` or the `attachmentFragmentShadingRate` features are enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

- VUID-VkSubpassDependency-srcStageMask-03937
  If the `synchronization2` feature is not enabled, `srcStageMask` must not be `0`

- VUID-VkSubpassDependency-srcStageMask-07949
  If neither the VK_NV_ray_tracing extension or the `rayTracingPipeline` feature are enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_KHR

- VUID-VkSubpassDependency-srcStageMask-10754
  If the `accelerationStructure` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR

- VUID-VkSubpassDependency-dstStageMask-04090
  If the `geometryShader` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT

- VUID-VkSubpassDependency-dstStageMask-04091
  If the `tessellationShader` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT or VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT

- VUID-VkSubpassDependency-dstStageMask-04092
  If the `conditionalRendering` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT

- VUID-VkSubpassDependency-dstStageMask-04093
  If the `fragmentDensityMap` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT

- VUID-VkSubpassDependency-dstStageMask-04094
  If the `transformFeedback` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT

- VUID-VkSubpassDependency-dstStageMask-04095
  If the `meshShader` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_MESH_SHADER_BIT_EXT

- VUID-VkSubpassDependency-dstStageMask-04096
  If the `taskShader` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_TASK_SHADER_BIT_EXT

- VUID-VkSubpassDependency-dstStageMask-07318
  If neither of the `shadingRateImage` or the `attachmentFragmentShadingRate` features are enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

- VUID-VkSubpassDependency-dstStageMask-03937
  If the `synchronization2` feature is not enabled, `dstStageMask` must not be `0`

- VUID-VkSubpassDependency-dstStageMask-07949
  If neither the VK_NV_ray_tracing extension or the `rayTracingPipeline` feature are enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_KHR

- VUID-VkSubpassDependency-dstStageMask-10754
  If the `accelerationStructure` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR

- VUID-VkSubpassDependency-srcSubpass-00864
  `srcSubpass` must be less than or equal to `dstSubpass`, unless one of them is VK_SUBPASS_EXTERNAL, to avoid cyclic dependencies and ensure a valid execution order

- VUID-VkSubpassDependency-srcSubpass-00865
  `srcSubpass` and `dstSubpass` must not both be equal to VK_SUBPASS_EXTERNAL

- VUID-VkSubpassDependency-srcSubpass-06809
  If `srcSubpass` is equal to `dstSubpass` and `srcStageMask` includes a framebuffer-space stage, `dstStageMask` must only contain framebuffer-space stages

- VUID-VkSubpassDependency-srcAccessMask-00868
  Any access flag included in `srcAccessMask` must be supported by one of the pipeline stages in `srcStageMask`, as specified in the table of supported access types

- VUID-VkSubpassDependency-dstAccessMask-00869
  Any access flag included in `dstAccessMask` must be supported by one of the pipeline stages in `dstStageMask`, as specified in the table of supported access types

- VUID-VkSubpassDependency-srcSubpass-02243
  If `srcSubpass` equals `dstSubpass`, and `srcStageMask` and `dstStageMask` both include a framebuffer-space stage, then `dependencyFlags` must include VK_DEPENDENCY_BY_REGION_BIT

- VUID-VkSubpassDependency-dependencyFlags-02520
  If `dependencyFlags` includes VK_DEPENDENCY_VIEW_LOCAL_BIT, `srcSubpass` must not be equal to VK_SUBPASS_EXTERNAL

- VUID-VkSubpassDependency-dependencyFlags-02521
  If `dependencyFlags` includes VK_DEPENDENCY_VIEW_LOCAL_BIT, `dstSubpass` must not be equal to VK_SUBPASS_EXTERNAL

- VUID-VkSubpassDependency-srcSubpass-00872
  If `srcSubpass` equals `dstSubpass` and that subpass has more than one bit set in the view mask, then `dependencyFlags` must include VK_DEPENDENCY_VIEW_LOCAL_BIT

- VUID-VkSubpassDependency-dependencyFlags-10203
  `dependencyFlags` must not include VK_DEPENDENCY_QUEUE_FAMILY_OWNERSHIP_TRANSFER_USE_ALL_STAGES_BIT_KHR

Valid Usage (Implicit)

- VUID-VkSubpassDependency-srcStageMask-parameter
  `srcStageMask` must be a valid combination of VkPipelineStageFlagBits values

- VUID-VkSubpassDependency-dstStageMask-parameter
  `dstStageMask` must be a valid combination of VkPipelineStageFlagBits values

- VUID-VkSubpassDependency-srcAccessMask-parameter
  `srcAccessMask` must be a valid combination of VkAccessFlagBits values

- VUID-VkSubpassDependency-dstAccessMask-parameter
  `dstAccessMask` must be a valid combination of VkAccessFlagBits values

- VUID-VkSubpassDependency-dependencyFlags-parameter
  `dependencyFlags` must be a valid combination of VkDependencyFlagBits values

When multiview is enabled, the execution of the multiple views of one subpass may not occur simultaneously or even back-to-back, and rather may be interleaved with the execution of other subpasses. The load and store operations apply to attachments on a per-view basis. For example, an attachment using VK_ATTACHMENT_LOAD_OP_CLEAR will have each view cleared on first use, but the first use of one view may be temporally distant from the first use of another view.

Note | A good mental model for multiview is to think of a multiview subpass as if it were a collection of individual (per-view) subpasses that are logically grouped together and described as a single multiview subpass in the API. Similarly, a multiview attachment can be thought of like several individual attachments that happen to be layers in a single image. A view-local dependency between two multiview subpasses acts like a set of one-to-one dependencies between corresponding pairs of per-view subpasses. A view-global dependency between two multiview subpasses acts like a set of N × M dependencies between all pairs of per-view subpasses in the source and destination. Thus, it is a more compact representation which also makes clear the commonality and reuse that is present between views in a subpass. This interpretation motivates the answers to questions like “when does the load op apply” - it is on the first use of each view of an attachment, as if each view was a separate attachment. The content of each view follows the description in attachment content behavior. In particular, if an attachment is preserved, all views within the attachment are preserved.

If any two subpasses of a render pass activate transform feedback to the same bound transform feedback buffers, a subpass dependency must be included (either directly or via some intermediate subpasses) between them.

If there is no subpass dependency from VK_SUBPASS_EXTERNAL to the first subpass that uses an attachment, then an implicit subpass dependency exists from VK_SUBPASS_EXTERNAL to the first subpass it is used in. The implicit subpass dependency only exists if there exists an automatic layout transition away from `initialLayout`. The subpass dependency operates as if defined with the following parameters:

    VkSubpassDependency implicitDependency = {
        .srcSubpass = VK_SUBPASS_EXTERNAL,
        .dstSubpass = firstSubpass, // First subpass attachment is used in
        .srcStageMask = VK_PIPELINE_STAGE_NONE,
        .dstStageMask = VK_PIPELINE_STAGE_ALL_COMMANDS_BIT,
        .srcAccessMask = 0,
        .dstAccessMask = VK_ACCESS_INPUT_ATTACHMENT_READ_BIT |
                         VK_ACCESS_COLOR_ATTACHMENT_READ_BIT |
                         VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT |
                         VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT |
                         VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT,
        .dependencyFlags = 0
    };

Similarly, if there is no subpass dependency from the last subpass that uses an attachment to VK_SUBPASS_EXTERNAL, then an implicit subpass dependency exists from the last subpass it is used in to VK_SUBPASS_EXTERNAL. The implicit subpass dependency only exists if there exists an automatic layout transition into `finalLayout`. The subpass dependency operates as if defined with the following parameters:

    VkSubpassDependency implicitDependency = {
        .srcSubpass = lastSubpass, // Last subpass attachment is used in
        .dstSubpass = VK_SUBPASS_EXTERNAL,
        .srcStageMask = VK_PIPELINE_STAGE_ALL_COMMANDS_BIT,
        .dstStageMask = VK_PIPELINE_STAGE_NONE,
        .srcAccessMask = VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT |
                         VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT,
        .dstAccessMask = 0,
        .dependencyFlags = 0
    };

As subpasses may overlap or execute out of order with regards to other subpasses unless a subpass dependency chain describes otherwise, the layout transitions required between subpasses cannot be known to an application. Instead, an application provides the layout that each attachment must be in at the start and end of a render pass, and the layout it must be in during each subpass it is used in. The implementation then must execute layout transitions between subpasses in order to guarantee that the images are in the layouts required by each subpass, and in the final layout at the end of the render pass.

Automatic layout transitions apply to the entire image subresource attached to the framebuffer. If multiview is not enabled and the attachment is a view of a 1D or 2D image, the automatic layout transitions apply to the number of layers specified by VkFramebufferCreateInfo::`layers`. If multiview is enabled and the attachment is a view of a 1D or 2D image, the automatic layout transitions apply to the layers corresponding to views which are used by some subpass in the render pass, even if that subpass does not reference the given attachment. If the `maintenance9` feature is not enabled, and the attachment view is a 2D or 2D array view of a 3D image, even if the attachment view only refers to a subset of the slices of the selected mip level of the 3D image, automatic layout transitions apply to the entire subresource referenced which is the entire mip level in this case. If the attachment view is a 2D or 2D array view of a 3D image and `maintenance9` feature is enabled, layout transitions apply only to the subresource the attachment view refers to.

Automatic layout transitions away from the layout used in a subpass happen-after the availability operations for all dependencies with that subpass as the `srcSubpass`.

Automatic layout transitions into the layout used in a subpass happen-before the visibility operations for all dependencies with that subpass as the `dstSubpass`.

Automatic layout transitions away from `initialLayout` happen-after the availability operations for all dependencies with a `srcSubpass` equal to VK_SUBPASS_EXTERNAL, where `dstSubpass` uses the attachment that will be transitioned. For attachments created with VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT, automatic layout transitions away from `initialLayout` happen-after the availability operations for all dependencies with a `srcSubpass` equal to VK_SUBPASS_EXTERNAL, where `dstSubpass` uses any aliased attachment.

Automatic layout transitions into `finalLayout` happen-before the visibility operations for all dependencies with a `dstSubpass` equal to VK_SUBPASS_EXTERNAL, where `srcSubpass` uses the attachment that will be transitioned. For attachments created with VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT, automatic layout transitions into `finalLayout` happen-before the visibility operations for all dependencies with a `dstSubpass` equal to VK_SUBPASS_EXTERNAL, where `srcSubpass` uses any aliased attachment.

The image layout of the depth aspect of a depth/stencil attachment referring to an image created with VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT is dependent on the last sample locations used to render to the attachment, thus automatic layout transitions use the sample locations state specified in VkRenderPassSampleLocationsBeginInfoEXT.

Automatic layout transitions of an attachment referring to a depth/stencil image created with VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT use the sample locations the image subresource range referenced by the attachment was last rendered with. If the current render pass does not use the attachment as a depth/stencil attachment in any subpass that happens-before, the automatic layout transition uses the sample locations state specified in the `sampleLocationsInfo` member of the element of the `VkRenderPassSampleLocationsBeginInfoEXT`::`pAttachmentInitialSampleLocations` array for which the `attachmentIndex` member equals the attachment index of the attachment, if one is specified. Otherwise, the automatic layout transition uses the sample locations state specified in the `sampleLocationsInfo` member of the element of the `VkRenderPassSampleLocationsBeginInfoEXT`::`pPostSubpassSampleLocations` array for which the `subpassIndex` member equals the index of the subpass that last used the attachment as a depth/stencil attachment, if one is specified.

If no sample locations state has been specified for an automatic layout transition performed on an attachment referring to a depth/stencil image created with VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT the contents of the depth aspect of the depth/stencil attachment become undefined as if the layout of the attachment was transitioned from the VK_IMAGE_LAYOUT_UNDEFINED layout.

If two subpasses use the same attachment, and both subpasses use the attachment in a read-only layout, no subpass dependency needs to be specified between those subpasses. If an implementation treats those layouts separately, it must insert an implicit subpass dependency between those subpasses to separate the uses in each layout. The subpass dependency operates as if defined with the following parameters:

    // Used for input attachments
    VkPipelineStageFlags inputAttachmentStages = VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT;
    VkAccessFlags inputAttachmentDstAccess = VK_ACCESS_INPUT_ATTACHMENT_READ_BIT;

    // Used for depth/stencil attachments
    VkPipelineStageFlags depthStencilAttachmentStages = VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT | VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT;
    VkAccessFlags depthStencilAttachmentDstAccess = VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT;

    VkSubpassDependency implicitDependency = {
        .srcSubpass = firstSubpass;
        .dstSubpass = secondSubpass;
        .srcStageMask = inputAttachmentStages | depthStencilAttachmentStages;
        .dstStageMask = inputAttachmentStages | depthStencilAttachmentStages;
        .srcAccessMask = 0;
        .dstAccessMask = inputAttachmentDstAccess | depthStencilAttachmentDstAccess;
        .dependencyFlags = 0;
    };

When drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_ATTACHMENT_FEEDBACK_LOOP_ENABLE_EXT set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`, the application must specify which types of attachments that are written to during a render pass will also be accessed as non-attachments in the render pass.

To dynamically set whether a pipeline can access a resource as a non-attachment while it is also used as an attachment that is written to, call:

    // Provided by VK_EXT_attachment_feedback_loop_dynamic_state
    void vkCmdSetAttachmentFeedbackLoopEnableEXT(
        VkCommandBuffer                             commandBuffer,
        VkImageAspectFlags                          aspectMask);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `aspectMask` specifies the types of attachments for which feedback loops will be enabled. Attachment types whose aspects are not included in `aspectMask` will have feedback loops disabled.

For attachments that are written to in a render pass, only attachments with the aspects specified in `aspectMask` can be accessed as non-attachments by subsequent drawing commands.

Valid Usage

- VUID-vkCmdSetAttachmentFeedbackLoopEnableEXT-attachmentFeedbackLoopDynamicState-08862
  The `attachmentFeedbackLoopDynamicState` feature must be enabled

- VUID-vkCmdSetAttachmentFeedbackLoopEnableEXT-aspectMask-08863
  `aspectMask` must only include VK_IMAGE_ASPECT_NONE, VK_IMAGE_ASPECT_COLOR_BIT, VK_IMAGE_ASPECT_DEPTH_BIT, and VK_IMAGE_ASPECT_STENCIL_BIT

- VUID-vkCmdSetAttachmentFeedbackLoopEnableEXT-attachmentFeedbackLoopLayout-08864
  If the `attachmentFeedbackLoopLayout` feature is not enabled, `aspectMask` must be VK_IMAGE_ASPECT_NONE

Valid Usage (Implicit)

- VUID-vkCmdSetAttachmentFeedbackLoopEnableEXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetAttachmentFeedbackLoopEnableEXT-aspectMask-parameter
  `aspectMask` must be a valid combination of VkImageAspectFlagBits values

- VUID-vkCmdSetAttachmentFeedbackLoopEnableEXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetAttachmentFeedbackLoopEnableEXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetAttachmentFeedbackLoopEnableEXT-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetAttachmentFeedbackLoopEnableEXT is not affected by conditional rendering

A more extensible version of render pass creation is also defined below.

To create a render pass, call:

Warning | This functionality is superseded by Vulkan Version 1.4. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_2
    VkResult vkCreateRenderPass2(
        VkDevice                                    device,
        const VkRenderPassCreateInfo2*              pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkRenderPass*                               pRenderPass);

    // Provided by VK_KHR_create_renderpass2
    // Equivalent to vkCreateRenderPass2
    VkResult vkCreateRenderPass2KHR(
        VkDevice                                    device,
        const VkRenderPassCreateInfo2*              pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkRenderPass*                               pRenderPass);

- `device` is the logical device that creates the render pass.

- `pCreateInfo` is a pointer to a VkRenderPassCreateInfo2 structure describing the parameters of the render pass.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

- `pRenderPass` is a pointer to a VkRenderPass handle in which the resulting render pass object is returned.

This command is functionally identical to vkCreateRenderPass, but includes extensible sub-structures that include `sType` and `pNext` parameters, allowing them to be more easily extended.

Valid Usage

- VUID-vkCreateRenderPass2-device-10001
  `device` must support at least one queue family with the VK_QUEUE_GRAPHICS_BIT capability

- VUID-vkCreateRenderPass2-flags-10649
  VkRenderPassTileShadingCreateInfoQCOM::`flags` must not include VK_TILE_SHADING_RENDER_PASS_PER_TILE_EXECUTION_BIT_QCOM

Valid Usage (Implicit)

- VUID-vkCreateRenderPass2-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkCreateRenderPass2-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkRenderPassCreateInfo2 structure

- VUID-vkCreateRenderPass2-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateRenderPass2-pRenderPass-parameter
  `pRenderPass` must be a valid pointer to a VkRenderPass handle

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkRenderPassCreateInfo2` structure is defined as:

Warning | This functionality is superseded by Vulkan Version 1.4. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_2
    typedef struct VkRenderPassCreateInfo2 {
        VkStructureType                    sType;
        const void*                        pNext;
        VkRenderPassCreateFlags            flags;
        uint32_t                           attachmentCount;
        const VkAttachmentDescription2*    pAttachments;
        uint32_t                           subpassCount;
        const VkSubpassDescription2*       pSubpasses;
        uint32_t                           dependencyCount;
        const VkSubpassDependency2*        pDependencies;
        uint32_t                           correlatedViewMaskCount;
        const uint32_t*                    pCorrelatedViewMasks;
    } VkRenderPassCreateInfo2;

    // Provided by VK_KHR_create_renderpass2
    // Equivalent to VkRenderPassCreateInfo2
    typedef VkRenderPassCreateInfo2 VkRenderPassCreateInfo2KHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask of VkRenderPassCreateFlagBits

- `attachmentCount` is the number of attachments used by this render pass.

- `pAttachments` is a pointer to an array of `attachmentCount` VkAttachmentDescription2 structures describing the attachments used by the render pass.

- `subpassCount` is the number of subpasses to create.

- `pSubpasses` is a pointer to an array of `subpassCount` VkSubpassDescription2 structures describing each subpass.

- `dependencyCount` is the number of dependencies between pairs of subpasses.

- `pDependencies` is a pointer to an array of `dependencyCount` VkSubpassDependency2 structures describing dependencies between pairs of subpasses.

- `correlatedViewMaskCount` is the number of correlation masks.

- `pCorrelatedViewMasks` is a pointer to an array of view masks indicating sets of views that may be more efficient to render concurrently.

Parameters defined by this structure with the same name as those in VkRenderPassCreateInfo have the identical effect to those parameters; the child structures are variants of those used in VkRenderPassCreateInfo which add `sType` and `pNext` parameters, allowing them to be extended.

If the VkSubpassDescription2::`viewMask` member of any element of `pSubpasses` is not zero, multiview functionality is considered to be enabled for this render pass.

`correlatedViewMaskCount` and `pCorrelatedViewMasks` have the same effect as VkRenderPassMultiviewCreateInfo::`correlationMaskCount` and VkRenderPassMultiviewCreateInfo::`pCorrelationMasks`, respectively.

Valid Usage

- VUID-VkRenderPassCreateInfo2-None-03049
  If any two subpasses operate on attachments with overlapping ranges of the same `VkDeviceMemory` object, and at least one subpass writes to that area of `VkDeviceMemory`, a subpass dependency must be included (either directly or via some intermediate subpasses) between them

- VUID-VkRenderPassCreateInfo2-attachment-03050
  If the `attachment` member of any element of `pInputAttachments`, `pColorAttachments`, `pResolveAttachments` or `pDepthStencilAttachment`, or the attachment indexed by any element of `pPreserveAttachments` in any element of `pSubpasses` is bound to a range of a `VkDeviceMemory` object that overlaps with any other attachment in any subpass (including the same subpass), the `VkAttachmentDescription2` structures describing them must include VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT in `flags`

- VUID-VkRenderPassCreateInfo2-attachment-03051
  If the `attachment` member of any element of `pInputAttachments`, `pColorAttachments`, `pResolveAttachments` or `pDepthStencilAttachment`, or any element of `pPreserveAttachments` in any element of `pSubpasses` is not VK_ATTACHMENT_UNUSED, then it must be less than `attachmentCount`

- VUID-VkRenderPassCreateInfo2-fragmentDensityMapAttachment-06472
  If the pNext chain includes a VkRenderPassFragmentDensityMapCreateInfoEXT structure and the `fragmentDensityMapAttachment` member is not VK_ATTACHMENT_UNUSED, then `attachment` must be less than `attachmentCount`

- VUID-VkRenderPassCreateInfo2-fragmentDensityMapLayered-10829
  If the `fragmentDensityMapLayered` feature is not enabled, `flags` must not contain VK_RENDER_PASS_CREATE_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE

- VUID-VkRenderPassCreateInfo2-pSubpasses-06473
  If the `pSubpasses` pNext chain includes a VkSubpassDescriptionDepthStencilResolve structure and the `pDepthStencilResolveAttachment` member is not `NULL` and does not have the value VK_ATTACHMENT_UNUSED, then `attachment` must be less than `attachmentCount`

- VUID-VkRenderPassCreateInfo2-pAttachments-02522
  For any member of `pAttachments` with a `loadOp` equal to VK_ATTACHMENT_LOAD_OP_CLEAR, the first use of that attachment must not specify a `layout` equal to VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL, VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, or VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL

- VUID-VkRenderPassCreateInfo2-pAttachments-02523
  For any member of `pAttachments` with a `stencilLoadOp` equal to VK_ATTACHMENT_LOAD_OP_CLEAR, the first use of that attachment must not specify a `layout` equal to VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL, VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, or VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL

- VUID-VkRenderPassCreateInfo2-pDependencies-03054
  For each element of `pDependencies`, if the `srcSubpass` is not VK_SUBPASS_EXTERNAL, all stage flags included in the `srcStageMask` member of that dependency must be VK_PIPELINE_STAGE_ALL_COMMANDS_BIT or a pipeline stage supported by the pipeline identified by the `pipelineBindPoint` member of the source subpass

- VUID-VkRenderPassCreateInfo2-pDependencies-03055
  For each element of `pDependencies`, if the `dstSubpass` is not VK_SUBPASS_EXTERNAL, all stage flags included in the `dstStageMask` member of that dependency must be VK_PIPELINE_STAGE_ALL_COMMANDS_BIT or a pipeline stage supported by the pipeline identified by the `pipelineBindPoint` member of the destination subpass

- VUID-VkRenderPassCreateInfo2-pCorrelatedViewMasks-03056
  The set of bits included in any element of `pCorrelatedViewMasks` must not overlap with the set of bits included in any other element of `pCorrelatedViewMasks`

- VUID-VkRenderPassCreateInfo2-viewMask-03057
  If the VkSubpassDescription2::`viewMask` member of all elements of `pSubpasses` is `0`, `correlatedViewMaskCount` must be `0`

- VUID-VkRenderPassCreateInfo2-viewMask-03058
  The VkSubpassDescription2::`viewMask` member of all elements of `pSubpasses` must either all be `0`, or all not be `0`

- VUID-VkRenderPassCreateInfo2-viewMask-03059
  If the VkSubpassDescription2::`viewMask` member of all elements of `pSubpasses` is `0`, the `dependencyFlags` member of any element of `pDependencies` must not include VK_DEPENDENCY_VIEW_LOCAL_BIT

- VUID-VkRenderPassCreateInfo2-pDependencies-03060
  For each element of `pDependencies` where its `srcSubpass` member equals its `dstSubpass` member, if the `viewMask` member of the corresponding element of `pSubpasses` includes more than one bit, its `dependencyFlags` member must include VK_DEPENDENCY_VIEW_LOCAL_BIT

- VUID-VkRenderPassCreateInfo2-attachment-02525
  If the `attachment` member of any element of the `pInputAttachments` member of any element of `pSubpasses` is not VK_ATTACHMENT_UNUSED, the `aspectMask` member of that element of `pInputAttachments` must only include aspects that are present in images of the format specified by the element of `pAttachments` specified by `attachment`

- VUID-VkRenderPassCreateInfo2-srcSubpass-02526
  The `srcSubpass` member of each element of `pDependencies` must be less than `subpassCount`

- VUID-VkRenderPassCreateInfo2-dstSubpass-02527
  The `dstSubpass` member of each element of `pDependencies` must be less than `subpassCount`

- VUID-VkRenderPassCreateInfo2-pAttachments-04585
  If any element of `pAttachments` is used as a fragment shading rate attachment in any subpass, it must not be used as any other attachment in the render pass

- VUID-VkRenderPassCreateInfo2-pAttachments-09387
  If any element of `pAttachments` is used as a fragment shading rate attachment, the `loadOp` for that attachment must not be VK_ATTACHMENT_LOAD_OP_CLEAR

- VUID-VkRenderPassCreateInfo2-flags-04521
  If `flags` includes VK_RENDER_PASS_CREATE_TRANSFORM_BIT_QCOM, an element of `pSubpasses` includes an instance of VkFragmentShadingRateAttachmentInfoKHR in its `pNext` chain, and the `pFragmentShadingRateAttachment` member of that structure is not equal to `NULL`, the `attachment` member of `pFragmentShadingRateAttachment` must be VK_ATTACHMENT_UNUSED

- VUID-VkRenderPassCreateInfo2-pAttachments-04586
  If any element of `pAttachments` is used as a fragment shading rate attachment in any subpass, it must have an image format whose potential format features contain VK_FORMAT_FEATURE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

- VUID-VkRenderPassCreateInfo2-attachment-06244
  If the `attachment` member of the `pDepthStencilAttachment` member of an element of `pSubpasses` is not VK_ATTACHMENT_UNUSED, the `layout` member of that same structure is either VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL or VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, and the `pNext` chain of that structure does not include a VkAttachmentReferenceStencilLayout structure, then the element of `pAttachments` with an index equal to `attachment` must not have a `format` that includes both depth and stencil components

- VUID-VkRenderPassCreateInfo2-attachment-06245
  If the `attachment` member of the `pDepthStencilAttachment` member of an element of `pSubpasses` is not VK_ATTACHMENT_UNUSED and the `layout` member of that same structure is either VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL or VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL, then the element of `pAttachments` with an index equal to `attachment` must have a `format` that includes only a stencil component

- VUID-VkRenderPassCreateInfo2-attachment-06246
  If the `attachment` member of the `pDepthStencilAttachment` member of an element of `pSubpasses` is not VK_ATTACHMENT_UNUSED and the `layout` member of that same structure is either VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL or VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, then the element of `pAttachments` with an index equal to `attachment` must not have a `format` that includes only a stencil component

- VUID-VkRenderPassCreateInfo2-pResolveAttachments-09331
  If any element of `pResolveAttachments` of any element of `pSubpasses` references an attachment description with a format of VK_FORMAT_UNDEFINED, VkRenderPassFragmentDensityMapCreateInfoEXT::`fragmentDensityMapAttachment->attachment` must be VK_ATTACHMENT_UNUSED

- VUID-VkRenderPassCreateInfo2-pResolveAttachments-10650
  If any element of `pResolveAttachments` of any element of `pSubpasses` references an attachment description with a format of VK_FORMAT_UNDEFINED, VK_TILE_SHADING_RENDER_PASS_ENABLE_BIT_QCOM must not be included in VkRenderPassTileShadingCreateInfoQCOM::`flags`

- VUID-VkRenderPassCreateInfo2-fragmentDensityMapAttachment-10651
  If VkRenderPassFragmentDensityMapCreateInfoEXT::`fragmentDensityMapAttachment` is not VK_ATTACHMENT_UNUSED, VK_TILE_SHADING_RENDER_PASS_ENABLE_BIT_QCOM must not be included in VkRenderPassTileShadingCreateInfoQCOM::`flags`

- VUID-VkRenderPassCreateInfo2-None-10916
  If any subpass preserves an attachment, there must be a subpass dependency from a prior subpass which uses or preserves that attachment

Valid Usage (Implicit)

- VUID-VkRenderPassCreateInfo2-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO_2

- VUID-VkRenderPassCreateInfo2-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkRenderPassCreationControlEXT, VkRenderPassCreationFeedbackCreateInfoEXT, VkRenderPassFragmentDensityMapCreateInfoEXT, VkRenderPassTileShadingCreateInfoQCOM, or VkTileMemorySizeInfoQCOM

- VUID-VkRenderPassCreateInfo2-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkRenderPassCreateInfo2-flags-parameter
  `flags` must be a valid combination of VkRenderPassCreateFlagBits values

- VUID-VkRenderPassCreateInfo2-pAttachments-parameter
  If `attachmentCount` is not `0`, `pAttachments` must be a valid pointer to an array of `attachmentCount` valid VkAttachmentDescription2 structures

- VUID-VkRenderPassCreateInfo2-pSubpasses-parameter
  `pSubpasses` must be a valid pointer to an array of `subpassCount` valid VkSubpassDescription2 structures

- VUID-VkRenderPassCreateInfo2-pDependencies-parameter
  If `dependencyCount` is not `0`, `pDependencies` must be a valid pointer to an array of `dependencyCount` valid VkSubpassDependency2 structures

- VUID-VkRenderPassCreateInfo2-pCorrelatedViewMasks-parameter
  If `correlatedViewMaskCount` is not `0`, `pCorrelatedViewMasks` must be a valid pointer to an array of `correlatedViewMaskCount` `uint32_t` values

- VUID-VkRenderPassCreateInfo2-subpassCount-arraylength
  `subpassCount` must be greater than `0`

The `VkAttachmentDescription2` structure is defined as:

Warning | This functionality is superseded by Vulkan Version 1.4. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_2
    typedef struct VkAttachmentDescription2 {
        VkStructureType                 sType;
        const void*                     pNext;
        VkAttachmentDescriptionFlags    flags;
        VkFormat                        format;
        VkSampleCountFlagBits           samples;
        VkAttachmentLoadOp              loadOp;
        VkAttachmentStoreOp             storeOp;
        VkAttachmentLoadOp              stencilLoadOp;
        VkAttachmentStoreOp             stencilStoreOp;
        VkImageLayout                   initialLayout;
        VkImageLayout                   finalLayout;
    } VkAttachmentDescription2;

    // Provided by VK_KHR_create_renderpass2
    // Equivalent to VkAttachmentDescription2
    typedef VkAttachmentDescription2 VkAttachmentDescription2KHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask of VkAttachmentDescriptionFlagBits specifying additional properties of the attachment.

- `format` is a VkFormat value specifying the format of the image that will be used for the attachment.

- `samples` is a VkSampleCountFlagBits value specifying the number of samples of the image.

- `loadOp` is a VkAttachmentLoadOp value specifying how the contents of color and depth components of the attachment are treated at the beginning of the subpass where it is first used.

- `storeOp` is a VkAttachmentStoreOp value specifying how the contents of color and depth components of the attachment are treated at the end of the subpass where it is last used.

- `stencilLoadOp` is a VkAttachmentLoadOp value specifying how the contents of stencil components of the attachment are treated at the beginning of the subpass where it is first used.

- `stencilStoreOp` is a VkAttachmentStoreOp value specifying how the contents of stencil components of the attachment are treated at the end of the last subpass where it is used.

- `initialLayout` is the layout the attachment image subresource will be in when a render pass instance begins.

- `finalLayout` is the layout the attachment image subresource will be transitioned to when a render pass instance ends.

Parameters defined by this structure with the same name as those in VkAttachmentDescription have the identical effect to those parameters.

If the `separateDepthStencilLayouts` feature is enabled, and `format` is a depth/stencil format, `initialLayout` and `finalLayout` can be set to a layout that only specifies the layout of the depth aspect.

If the `pNext` chain includes a VkAttachmentDescriptionStencilLayout structure, then the `stencilInitialLayout` and `stencilFinalLayout` members specify the initial and final layouts of the stencil aspect of a depth/stencil format, and `initialLayout` and `finalLayout` only apply to the depth aspect. For depth-only formats, the VkAttachmentDescriptionStencilLayout structure is ignored. For stencil-only formats, the initial and final layouts of the stencil aspect are taken from the VkAttachmentDescriptionStencilLayout structure if present, or `initialLayout` and `finalLayout` if not present.

If `format` is a depth/stencil format, and either `initialLayout` or `finalLayout` does not specify a layout for the stencil aspect, then the application must specify the initial and final layouts of the stencil aspect by including a VkAttachmentDescriptionStencilLayout structure in the `pNext` chain.

`loadOp` and `storeOp` are ignored for fragment shading rate attachments. No access to the shading rate attachment is performed in `loadOp` and `storeOp`. Instead, access to VK_ACCESS_FRAGMENT_SHADING_RATE_ATTACHMENT_READ_BIT_KHR is performed as fragments are rasterized.

Valid Usage

- VUID-VkAttachmentDescription2-format-06699
  If `format` includes a color or depth component and `loadOp` is VK_ATTACHMENT_LOAD_OP_LOAD, then `initialLayout` must not be VK_IMAGE_LAYOUT_UNDEFINED

- VUID-VkAttachmentDescription2-finalLayout-00843
  `finalLayout` must not be VK_IMAGE_LAYOUT_UNDEFINED or VK_IMAGE_LAYOUT_ZERO_INITIALIZED_EXT or VK_IMAGE_LAYOUT_PREINITIALIZED

- VUID-VkAttachmentDescription2-format-03280
  If `format` is a color format, `initialLayout` must not be VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL or VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL

- VUID-VkAttachmentDescription2-format-03281
  If `format` is a depth/stencil format, `initialLayout` must not be VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL

- VUID-VkAttachmentDescription2-format-03282
  If `format` is a color format, `finalLayout` must not be VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL or VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL

- VUID-VkAttachmentDescription2-format-03283
  If `format` is a depth/stencil format, `finalLayout` must not be VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL

- VUID-VkAttachmentDescription2-format-06487
  If `format` is a color format, `initialLayout` must not be VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL or VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL

- VUID-VkAttachmentDescription2-format-06488
  If `format` is a color format, `finalLayout` must not be VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL or VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL

- VUID-VkAttachmentDescription2-separateDepthStencilLayouts-03284
  If the `separateDepthStencilLayouts` feature is not enabled, `initialLayout` must not be VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL, VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL, or VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL,

- VUID-VkAttachmentDescription2-separateDepthStencilLayouts-03285
  If the `separateDepthStencilLayouts` feature is not enabled, `finalLayout` must not be VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL, VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL, or VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL,

- VUID-VkAttachmentDescription2-format-03286
  If `format` is a color format, `initialLayout` must not be VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL, VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL, or VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL

- VUID-VkAttachmentDescription2-format-03287
  If `format` is a color format, `finalLayout` must not be VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL, VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL, or VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL

- VUID-VkAttachmentDescription2-format-06906
  If `format` is a depth/stencil format which includes both depth and stencil components, `initialLayout` must not be VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL or VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL

- VUID-VkAttachmentDescription2-format-06907
  If `format` is a depth/stencil format which includes both depth and stencil components, `finalLayout` must not be VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL or VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL

- VUID-VkAttachmentDescription2-format-03290
  If `format` is a depth/stencil format which includes only the depth component, `initialLayout` must not be VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL or VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL

- VUID-VkAttachmentDescription2-format-03291
  If `format` is a depth/stencil format which includes only the depth component, `finalLayout` must not be VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL or VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL

- VUID-VkAttachmentDescription2-synchronization2-06908
  If the `synchronization2` feature is not enabled, `initialLayout` must not be VK_IMAGE_LAYOUT_ATTACHMENT_OPTIMAL_KHR or VK_IMAGE_LAYOUT_READ_ONLY_OPTIMAL_KHR

- VUID-VkAttachmentDescription2-synchronization2-06909
  If the `synchronization2` feature is not enabled, `finalLayout` must not be VK_IMAGE_LAYOUT_ATTACHMENT_OPTIMAL_KHR or VK_IMAGE_LAYOUT_READ_ONLY_OPTIMAL_KHR

- VUID-VkAttachmentDescription2-attachmentFeedbackLoopLayout-07309
  If the `attachmentFeedbackLoopLayout` feature is not enabled, `initialLayout` must not be VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT

- VUID-VkAttachmentDescription2-attachmentFeedbackLoopLayout-07310
  If the `attachmentFeedbackLoopLayout` feature is not enabled, `finalLayout` must not be VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT

- VUID-VkAttachmentDescription2-samples-08745
  `samples` must be a valid VkSampleCountFlagBits value that is set in `imageCreateSampleCounts` (as defined in Image Creation Limits) for the given `format`

- VUID-VkAttachmentDescription2-dynamicRenderingLocalRead-09544
  If the `dynamicRenderingLocalRead` feature is not enabled, `initialLayout` must not be VK_IMAGE_LAYOUT_RENDERING_LOCAL_READ

- VUID-VkAttachmentDescription2-dynamicRenderingLocalRead-09545
  If the `dynamicRenderingLocalRead` feature is not enabled, `finalLayout` must not be VK_IMAGE_LAYOUT_RENDERING_LOCAL_READ

- VUID-VkAttachmentDescription2-flags-11773
  If `flags` includes VK_ATTACHMENT_DESCRIPTION_RESOLVE_SKIP_TRANSFER_FUNCTION_BIT_KHR, `flags` must not include VK_ATTACHMENT_DESCRIPTION_RESOLVE_ENABLE_TRANSFER_FUNCTION_BIT_KHR

- VUID-VkAttachmentDescription2-flags-11774
  If `flags` includes VK_ATTACHMENT_DESCRIPTION_RESOLVE_SKIP_TRANSFER_FUNCTION_BIT_KHR or VK_ATTACHMENT_DESCRIPTION_RESOLVE_ENABLE_TRANSFER_FUNCTION_BIT_KHR, `resolveSrgbFormatSupportsTransferFunctionControl` must be VK_TRUE

- VUID-VkAttachmentDescription2-flags-11775
  If `flags` includes VK_ATTACHMENT_DESCRIPTION_RESOLVE_SKIP_TRANSFER_FUNCTION_BIT_KHR or VK_ATTACHMENT_DESCRIPTION_RESOLVE_ENABLE_TRANSFER_FUNCTION_BIT_KHR, `maintenance10` must be enabled

- VUID-VkAttachmentDescription2-flags-11776
  If `flags` includes VK_ATTACHMENT_DESCRIPTION_RESOLVE_SKIP_TRANSFER_FUNCTION_BIT_KHR or VK_ATTACHMENT_DESCRIPTION_RESOLVE_ENABLE_TRANSFER_FUNCTION_BIT_KHR, `format` must use sRGB encoding

- VUID-VkAttachmentDescription2-flags-11777
  If `flags` includes VK_ATTACHMENT_DESCRIPTION_RESOLVE_SKIP_TRANSFER_FUNCTION_BIT_KHR or VK_ATTACHMENT_DESCRIPTION_RESOLVE_ENABLE_TRANSFER_FUNCTION_BIT_KHR, `samples` must be VK_SAMPLE_COUNT_1_BIT

- VUID-VkAttachmentDescription2-pNext-06704
  If the `pNext` chain does not include a VkAttachmentDescriptionStencilLayout structure, `format` includes a stencil component, and `stencilLoadOp` is VK_ATTACHMENT_LOAD_OP_LOAD, then `initialLayout` must not be VK_IMAGE_LAYOUT_UNDEFINED

- VUID-VkAttachmentDescription2-pNext-06705
  If the `pNext` chain includes a VkAttachmentDescriptionStencilLayout structure, `format` includes a stencil component, and `stencilLoadOp` is VK_ATTACHMENT_LOAD_OP_LOAD, then VkAttachmentDescriptionStencilLayout::`stencilInitialLayout` must not be VK_IMAGE_LAYOUT_UNDEFINED

- VUID-VkAttachmentDescription2-format-06249
  If `format` is a depth/stencil format which includes both depth and stencil components, and `initialLayout` is VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL or VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, the `pNext` chain must include a VkAttachmentDescriptionStencilLayout structure

- VUID-VkAttachmentDescription2-format-06250
  If `format` is a depth/stencil format which includes both depth and stencil components, and `finalLayout` is VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL or VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, the `pNext` chain must include a VkAttachmentDescriptionStencilLayout structure

- VUID-VkAttachmentDescription2-format-06247
  If the `pNext` chain does not include a VkAttachmentDescriptionStencilLayout structure and `format` only includes a stencil component, `initialLayout` must not be VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL or VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL

- VUID-VkAttachmentDescription2-format-06248
  If the `pNext` chain does not include a VkAttachmentDescriptionStencilLayout structure and `format` only includes a stencil component, `finalLayout` must not be VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL or VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL

- VUID-VkAttachmentDescription2-format-09332
  If the `externalFormatResolve` feature is not enabled, `format` must not be VK_FORMAT_UNDEFINED

- VUID-VkAttachmentDescription2-format-09334
  If `format` is VK_FORMAT_UNDEFINED, there must be a VkExternalFormatANDROID structure in the `pNext` chain with a `externalFormat` that is not equal to `0`

Valid Usage (Implicit)

- VUID-VkAttachmentDescription2-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_2

- VUID-VkAttachmentDescription2-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkAttachmentDescriptionStencilLayout, VkExternalFormatANDROID, or VkExternalFormatOHOS

- VUID-VkAttachmentDescription2-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkAttachmentDescription2-flags-parameter
  `flags` must be a valid combination of VkAttachmentDescriptionFlagBits values

- VUID-VkAttachmentDescription2-format-parameter
  `format` must be a valid VkFormat value

- VUID-VkAttachmentDescription2-samples-parameter
  `samples` must be a valid VkSampleCountFlagBits value

- VUID-VkAttachmentDescription2-loadOp-parameter
  `loadOp` must be a valid VkAttachmentLoadOp value

- VUID-VkAttachmentDescription2-storeOp-parameter
  `storeOp` must be a valid VkAttachmentStoreOp value

- VUID-VkAttachmentDescription2-stencilLoadOp-parameter
  `stencilLoadOp` must be a valid VkAttachmentLoadOp value

- VUID-VkAttachmentDescription2-stencilStoreOp-parameter
  `stencilStoreOp` must be a valid VkAttachmentStoreOp value

- VUID-VkAttachmentDescription2-initialLayout-parameter
  `initialLayout` must be a valid VkImageLayout value

- VUID-VkAttachmentDescription2-finalLayout-parameter
  `finalLayout` must be a valid VkImageLayout value

The `VkAttachmentDescriptionStencilLayout` structure is defined as:

Warning | This functionality is superseded by Vulkan Version 1.4. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_2
    typedef struct VkAttachmentDescriptionStencilLayout {
        VkStructureType    sType;
        void*              pNext;
        VkImageLayout      stencilInitialLayout;
        VkImageLayout      stencilFinalLayout;
    } VkAttachmentDescriptionStencilLayout;

    // Provided by VK_KHR_separate_depth_stencil_layouts
    // Equivalent to VkAttachmentDescriptionStencilLayout
    typedef VkAttachmentDescriptionStencilLayout VkAttachmentDescriptionStencilLayoutKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `stencilInitialLayout` is the layout the stencil aspect of the attachment image subresource will be in when a render pass instance begins.

- `stencilFinalLayout` is the layout the stencil aspect of the attachment image subresource will be transitioned to when a render pass instance ends.

Valid Usage

- VUID-VkAttachmentDescriptionStencilLayout-stencilInitialLayout-03308
  `stencilInitialLayout` must not be VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL, VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL, VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL, or VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL

- VUID-VkAttachmentDescriptionStencilLayout-stencilFinalLayout-03309
  `stencilFinalLayout` must not be VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL, VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL, VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL, or VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL

- VUID-VkAttachmentDescriptionStencilLayout-stencilFinalLayout-03310
  `stencilFinalLayout` must not be VK_IMAGE_LAYOUT_UNDEFINED or VK_IMAGE_LAYOUT_ZERO_INITIALIZED_EXT or VK_IMAGE_LAYOUT_PREINITIALIZED

Valid Usage (Implicit)

- VUID-VkAttachmentDescriptionStencilLayout-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_STENCIL_LAYOUT

- VUID-VkAttachmentDescriptionStencilLayout-stencilInitialLayout-parameter
  `stencilInitialLayout` must be a valid VkImageLayout value

- VUID-VkAttachmentDescriptionStencilLayout-stencilFinalLayout-parameter
  `stencilFinalLayout` must be a valid VkImageLayout value

Structure Chaining

Extends the structure

  - VkAttachmentDescription2

The `VkSubpassDescription2` structure is defined as:

Warning | This functionality is superseded by Vulkan Version 1.4. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_2
    typedef struct VkSubpassDescription2 {
        VkStructureType                  sType;
        const void*                      pNext;
        VkSubpassDescriptionFlags        flags;
        VkPipelineBindPoint              pipelineBindPoint;
        uint32_t                         viewMask;
        uint32_t                         inputAttachmentCount;
        const VkAttachmentReference2*    pInputAttachments;
        uint32_t                         colorAttachmentCount;
        const VkAttachmentReference2*    pColorAttachments;
        const VkAttachmentReference2*    pResolveAttachments;
        const VkAttachmentReference2*    pDepthStencilAttachment;
        uint32_t                         preserveAttachmentCount;
        const uint32_t*                  pPreserveAttachments;
    } VkSubpassDescription2;

    // Provided by VK_KHR_create_renderpass2
    // Equivalent to VkSubpassDescription2
    typedef VkSubpassDescription2 VkSubpassDescription2KHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask of VkSubpassDescriptionFlagBits specifying usage of the subpass.

- `pipelineBindPoint` is a VkPipelineBindPoint value specifying the pipeline type supported for this subpass.

- `viewMask` is a bitfield of view indices describing which views rendering is broadcast to in this subpass, when multiview is enabled.

- `inputAttachmentCount` is the number of input attachments.

- `pInputAttachments` is a pointer to an array of VkAttachmentReference2 structures defining the input attachments for this subpass and their layouts.

- `colorAttachmentCount` is the number of color attachments.

- `pColorAttachments` is a pointer to an array of `colorAttachmentCount` VkAttachmentReference2 structures defining the color attachments for this subpass and their layouts.

- `pResolveAttachments` is `NULL` or a pointer to an array of `colorAttachmentCount` VkAttachmentReference2 structures defining the resolve attachments for this subpass and their layouts.

- `pDepthStencilAttachment` is a pointer to a VkAttachmentReference2 structure specifying the depth/stencil attachment for this subpass and its layout.

- `preserveAttachmentCount` is the number of preserved attachments.

- `pPreserveAttachments` is a pointer to an array of `preserveAttachmentCount` render pass attachment indices identifying attachments that are not used by this subpass, but whose contents must be preserved throughout the subpass.

Parameters defined by this structure with the same name as those in VkSubpassDescription have the identical effect to those parameters.

`viewMask` has the same effect for the described subpass as VkRenderPassMultiviewCreateInfo::`pViewMasks` has on each corresponding subpass.

If a VkFragmentShadingRateAttachmentInfoKHR structure is included in the `pNext` chain, `pFragmentShadingRateAttachment` is not `NULL`, and its `attachment` member is not VK_ATTACHMENT_UNUSED, the identified attachment defines a fragment shading rate attachment for that subpass.

If any element of `pResolveAttachments` is an image specified with an VkExternalFormatANDROID, values in the corresponding color attachment will be resolved to the resolve attachment in the same manner as specified for VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID.

If the `nullColorAttachmentWithExternalFormatResolve` limit is VK_TRUE, values in the color attachment will be loaded from the resolve attachment at the start of rendering, and may also be reloaded any time after a resolve occurs or the resolve attachment is written to; if this occurs it must happen-before any writes to the color attachment are performed which happen-after the resolve that triggers this. If any color component in the external format is subsampled, values will be read from the nearest sample in the image when they are loaded. If the color attachment is also used as an input attachment, the same behavior applies.

Setting the color attachment to VK_ATTACHMENT_UNUSED when an external resolve attachment is used and the `nullColorAttachmentWithExternalFormatResolve` limit is VK_TRUE will not result in color attachment writes to be discarded for that attachment.

When `nullColorAttachmentWithExternalFormatResolve` is VK_TRUE, the color output from the subpass can still be read via an input attachment; but the application cannot bind an image view for the color attachment as there is no such image view bound. Instead to access the data as an input attachment applications can use the resolve attachment in its place - using the resolve attachment image for the descriptor, and setting the corresponding element of `pInputAttachments` to the index of the resolve attachment.

Loads or input attachment reads from the resolve attachment are performed as if using a VkSamplerYcbcrConversionCreateInfo with the following parameters:

    VkSamplerYcbcrConversionCreateInfo createInfo = {
        .sType = VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFO,
        .pNext = NULL,
        .format = VK_FORMAT_UNDEFINED,
        .ycbcrModel = VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY,
        .ycbcrRange = VK_SAMPLER_YCBCR_RANGE_ITU_FULL,
        .components = {
            .r = VK_COMPONENT_SWIZZLE_B
            .g = VK_COMPONENT_SWIZZLE_R
            .b = VK_COMPONENT_SWIZZLE_G
            .a = VK_COMPONENT_SWIZZLE_IDENTITY},
        .xChromaOffset = properties.chromaOffsetX,
        .yChromaOffset = properties.chromaOffsetY,
        .chromaFilter = VK_FILTER_NEAREST,
        .forceExplicitReconstruction = ... };

where `properties` is equal to VkPhysicalDeviceExternalFormatResolvePropertiesANDROID returned by the device and `forceExplicitReconstruction` is effectively ignored as the VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY model is used. The applied swizzle is the same effective swizzle that would be applied by the VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY model, but no range expansion is applied.

Valid Usage

- VUID-VkSubpassDescription2-attachment-06912
  If the `attachment` member of an element of `pInputAttachments` is not VK_ATTACHMENT_UNUSED, its `layout` member must not be VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL or VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL

- VUID-VkSubpassDescription2-attachment-06913
  If the `attachment` member of an element of `pColorAttachments` is not VK_ATTACHMENT_UNUSED, its `layout` member must not be VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL or VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL

- VUID-VkSubpassDescription2-attachment-06914
  If the `attachment` member of an element of `pResolveAttachments` is not VK_ATTACHMENT_UNUSED, its `layout` member must not be VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL or VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL

- VUID-VkSubpassDescription2-attachment-06915
  If the `attachment` member of `pDepthStencilAttachment` is not VK_ATTACHMENT_UNUSED, its `layout` member must not be VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL or VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL

- VUID-VkSubpassDescription2-attachment-06916
  If the `attachment` member of an element of `pColorAttachments` is not VK_ATTACHMENT_UNUSED, its `layout` member must not be VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL or VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL

- VUID-VkSubpassDescription2-attachment-06917
  If the `attachment` member of an element of `pResolveAttachments` is not VK_ATTACHMENT_UNUSED, its `layout` member must not be VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL or VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL

- VUID-VkSubpassDescription2-attachment-06918
  If the `attachment` member of an element of `pInputAttachments` is not VK_ATTACHMENT_UNUSED, its `layout` member must not be VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL or VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL

- VUID-VkSubpassDescription2-attachment-06919
  If the `attachment` member of an element of `pColorAttachments` is not VK_ATTACHMENT_UNUSED, its `layout` member must not be VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL, VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL, or VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL

- VUID-VkSubpassDescription2-attachment-06920
  If the `attachment` member of an element of `pResolveAttachments` is not VK_ATTACHMENT_UNUSED, its `layout` member must not be VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL, VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL, or VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL

- VUID-VkSubpassDescription2-attachment-06921
  If the `attachment` member of an element of `pInputAttachments` is not VK_ATTACHMENT_UNUSED, its `layout` member must not be VK_IMAGE_LAYOUT_ATTACHMENT_OPTIMAL_KHR

- VUID-VkSubpassDescription2-attachment-06922
  If the `attachment` member of an element of `pColorAttachments` is not VK_ATTACHMENT_UNUSED, its `layout` member must not be VK_IMAGE_LAYOUT_READ_ONLY_OPTIMAL_KHR

- VUID-VkSubpassDescription2-attachment-06923
  If the `attachment` member of an element of `pResolveAttachments` is not VK_ATTACHMENT_UNUSED, its `layout` member must not be VK_IMAGE_LAYOUT_READ_ONLY_OPTIMAL_KHR

- VUID-VkSubpassDescription2-flags-10683
  If `flags` includes VK_SUBPASS_DESCRIPTION_TILE_SHADING_APRON_BIT_QCOM, the render pass must have been created with a VkRenderPassTileShadingCreateInfoQCOM::`tileApronSize` greater than `(0,0)`

- VUID-VkSubpassDescription2-inputAttachmentCount-12293
  `inputAttachmentCount` must be less than or equal to `maxPerStageDescriptorInputAttachments`

- VUID-VkSubpassDescription2-colorAttachmentCount-00845
  `colorAttachmentCount` must be less than or equal to `maxColorAttachments`

- VUID-VkSubpassDescription2-loadOp-00846
  If the first use of an attachment in this render pass is as an input attachment, and the attachment is not also used as a color or depth/stencil attachment in the same subpass, then `loadOp` must not be VK_ATTACHMENT_LOAD_OP_CLEAR

- VUID-VkSubpassDescription2-attachment-06251
  If the `attachment` member of `pDepthStencilAttachment` is not VK_ATTACHMENT_UNUSED and its `pNext` chain includes a VkAttachmentReferenceStencilLayout structure, the `layout` member of `pDepthStencilAttachment` must not be VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL or VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL

- VUID-VkSubpassDescription2-pipelineBindPoint-04953
  `pipelineBindPoint` must be VK_PIPELINE_BIND_POINT_GRAPHICS or VK_PIPELINE_BIND_POINT_SUBPASS_SHADING_HUAWEI

- VUID-VkSubpassDescription2-pResolveAttachments-03067
  If `pResolveAttachments` is not `NULL`, each resolve attachment that is not VK_ATTACHMENT_UNUSED must have a sample count of VK_SAMPLE_COUNT_1_BIT

- VUID-VkSubpassDescription2-externalFormatResolve-09335
  If the `externalFormatResolve` feature is not enabled and `pResolveAttachments` is not `NULL`, for each resolve attachment that does not have the value VK_ATTACHMENT_UNUSED, the corresponding color attachment must not have the value VK_ATTACHMENT_UNUSED

- VUID-VkSubpassDescription2-nullColorAttachmentWithExternalFormatResolve-09336
  If the `nullColorAttachmentWithExternalFormatResolve` property is VK_FALSE and `pResolveAttachments` is not `NULL`, for each resolve attachment that has a format of VK_FORMAT_UNDEFINED, the corresponding color attachment must not have the value VK_ATTACHMENT_UNUSED

- VUID-VkSubpassDescription2-nullColorAttachmentWithExternalFormatResolve-09337
  If the `nullColorAttachmentWithExternalFormatResolve` property is VK_TRUE and `pResolveAttachments` is not `NULL`, for each resolve attachment that has a format of VK_FORMAT_UNDEFINED, the corresponding color attachment must have the value VK_ATTACHMENT_UNUSED

- VUID-VkSubpassDescription2-externalFormatResolve-09338
  If the `externalFormatResolve` feature is not enabled and `pResolveAttachments` is not `NULL`, for each resolve attachment that is not VK_ATTACHMENT_UNUSED, the corresponding color attachment must not have a sample count of VK_SAMPLE_COUNT_1_BIT

- VUID-VkSubpassDescription2-externalFormatResolve-09339
  If the `externalFormatResolve` feature is not enabled, each element of `pResolveAttachments` must have the same VkFormat as its corresponding color attachment

- VUID-VkSubpassDescription2-multisampledRenderToSingleSampled-06869
  If the `multisampledRenderToSingleSampled` feature is not enabled, all attachments in `pColorAttachments` that are not VK_ATTACHMENT_UNUSED must have the same sample count

- VUID-VkSubpassDescription2-pInputAttachments-02897
  All attachments in `pInputAttachments` that are not VK_ATTACHMENT_UNUSED and any of the following is true:

  - the `externalFormatResolve` feature is not enabled

  - the `nullColorAttachmentWithExternalFormatResolve` property is VK_FALSE

  - does not have a non-zero value of VkExternalFormatANDROID::`externalFormat`

  must have image formats whose potential format features contain at least VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT or VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT

- VUID-VkSubpassDescription2-pColorAttachments-02898
  All attachments in `pColorAttachments` that are not VK_ATTACHMENT_UNUSED must have image formats whose potential format features contain VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT

- VUID-VkSubpassDescription2-pResolveAttachments-09343
  All attachments in `pResolveAttachments` that are not VK_ATTACHMENT_UNUSED and do not have an image format of VK_FORMAT_UNDEFINED must have image formats whose potential format features contain VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT

- VUID-VkSubpassDescription2-pDepthStencilAttachment-02900
  If `pDepthStencilAttachment` is not `NULL` and the attachment is not VK_ATTACHMENT_UNUSED then it must have an image format whose potential format features contain VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT

- VUID-VkSubpassDescription2-linearColorAttachment-06499
  If the `linearColorAttachment` feature is enabled and the image is created with VK_IMAGE_TILING_LINEAR, all attachments in `pInputAttachments` that are not VK_ATTACHMENT_UNUSED must have image formats whose potential format features must contain VK_FORMAT_FEATURE_2_LINEAR_COLOR_ATTACHMENT_BIT_NV

- VUID-VkSubpassDescription2-linearColorAttachment-06500
  If the `linearColorAttachment` feature is enabled and the image is created with VK_IMAGE_TILING_LINEAR, all attachments in `pColorAttachments` that are not VK_ATTACHMENT_UNUSED must have image formats whose potential format features must contain VK_FORMAT_FEATURE_2_LINEAR_COLOR_ATTACHMENT_BIT_NV

- VUID-VkSubpassDescription2-linearColorAttachment-06501
  If the `linearColorAttachment` feature is enabled and the image is created with VK_IMAGE_TILING_LINEAR, all attachments in `pResolveAttachments` that are not VK_ATTACHMENT_UNUSED must have image formats whose potential format features must contain VK_FORMAT_FEATURE_2_LINEAR_COLOR_ATTACHMENT_BIT_NV

- VUID-VkSubpassDescription2-None-09456
  If either of the following is enabled:

  - The `VK_AMD_mixed_attachment_samples` extension

  - The `VK_NV_framebuffer_mixed_samples` extension

  all attachments in `pColorAttachments` that are not VK_ATTACHMENT_UNUSED must have a sample count that is smaller than or equal to the sample count of `pDepthStencilAttachment` if it is not VK_ATTACHMENT_UNUSED

- VUID-VkSubpassDescription2-pNext-06870
  If the `pNext` chain includes a VkMultisampledRenderToSingleSampledInfoEXT structure with `multisampledRenderToSingleSampledEnable` equal to VK_TRUE, then all attachments in `pColorAttachments` and `pDepthStencilAttachment` that are not VK_ATTACHMENT_UNUSED must have a sample count that is either VK_SAMPLE_COUNT_1_BIT or equal to VkMultisampledRenderToSingleSampledInfoEXT::`rasterizationSamples`

- VUID-VkSubpassDescription2-pNext-06871
  If the `pNext` chain includes a VkMultisampledRenderToSingleSampledInfoEXT structure with `multisampledRenderToSingleSampledEnable` equal to VK_TRUE, and `pDepthStencilAttachment` is not `NULL`, does not have the value VK_ATTACHMENT_UNUSED, and has a sample count of VK_SAMPLE_COUNT_1_BIT, the `pNext` chain must also include a VkSubpassDescriptionDepthStencilResolve structure with `pDepthStencilResolveAttachment` that is either `NULL` or has the value VK_ATTACHMENT_UNUSED

- VUID-VkSubpassDescription2-multisampledRenderToSingleSampled-06872
  If none of the following are enabled:

  - The `VK_AMD_mixed_attachment_samples` extension

  - The `VK_NV_framebuffer_mixed_samples` extension

  - The `multisampledRenderToSingleSampled` feature

  all attachments in `pDepthStencilAttachment` and `pColorAttachments` that are not VK_ATTACHMENT_UNUSED must have the same sample count

- VUID-VkSubpassDescription2-attachment-03073
  Each element of `pPreserveAttachments` must not be VK_ATTACHMENT_UNUSED

- VUID-VkSubpassDescription2-pPreserveAttachments-03074
  Each element of `pPreserveAttachments` must not also be an element of any other member of the subpass description

- VUID-VkSubpassDescription2-layout-02528
  If any attachment is used by more than one VkAttachmentReference2 member, then each use must use the same `layout`

- VUID-VkSubpassDescription2-flags-03076
  If `flags` includes VK_SUBPASS_DESCRIPTION_PER_VIEW_POSITION_X_ONLY_BIT_NVX, it must also include VK_SUBPASS_DESCRIPTION_PER_VIEW_ATTRIBUTES_BIT_NVX

- VUID-VkSubpassDescription2-attachment-02799
  If the `attachment` member of any element of `pInputAttachments` is not VK_ATTACHMENT_UNUSED, then the `aspectMask` member must be a valid combination of VkImageAspectFlagBits

- VUID-VkSubpassDescription2-attachment-02800
  If the `attachment` member of any element of `pInputAttachments` is not VK_ATTACHMENT_UNUSED, then the `aspectMask` member must not be `0`

- VUID-VkSubpassDescription2-attachment-02801
  If the `attachment` member of any element of `pInputAttachments` is not VK_ATTACHMENT_UNUSED, then the `aspectMask` member must not include VK_IMAGE_ASPECT_METADATA_BIT

- VUID-VkSubpassDescription2-attachment-04563
  If the `attachment` member of any element of `pInputAttachments` is not VK_ATTACHMENT_UNUSED, then the `aspectMask` member must not include `VK_IMAGE_ASPECT_MEMORY_PLANE_i_BIT_EXT` for any index i

- VUID-VkSubpassDescription2-pDepthStencilAttachment-04440
  An attachment must not be used in both `pDepthStencilAttachment` and `pColorAttachments`

- VUID-VkSubpassDescription2-multiview-06558
  If the `multiview` feature is not enabled, `viewMask` must be `0`

- VUID-VkSubpassDescription2-viewMask-06706
  The index of the most significant bit in `viewMask` must be less than `maxMultiviewViewCount`

- VUID-VkSubpassDescription2-externalFormatResolve-09344
  If the `externalFormatResolve` feature is enabled, `pResolveAttachments` is not `NULL`, and `colorAttachmentCount` is not `1`, any element of `pResolveAttachments` that is not VK_ATTACHMENT_UNUSED, must not have a format of VK_FORMAT_UNDEFINED

- VUID-VkSubpassDescription2-externalFormatResolve-09345
  If the `externalFormatResolve` feature is enabled, `pResolveAttachments` is not `NULL`, any element of `pResolveAttachments` is not VK_ATTACHMENT_UNUSED and has a format of VK_FORMAT_UNDEFINED, and the corresponding element of `pColorAttachments` is not VK_ATTACHMENT_UNUSED, the color attachment must have a `samples` value of `1`

- VUID-VkSubpassDescription2-externalFormatResolve-09346
  If the `externalFormatResolve` feature is enabled, `pResolveAttachments` is not `NULL`, and any element of `pResolveAttachments` is not VK_ATTACHMENT_UNUSED and has a format of VK_FORMAT_UNDEFINED, `viewMask` must be `0`

- VUID-VkSubpassDescription2-externalFormatResolve-09347
  If the `externalFormatResolve` feature is enabled, `pResolveAttachments` is not `NULL`, and any element of `pResolveAttachments` is not VK_ATTACHMENT_UNUSED and has a format of VK_FORMAT_UNDEFINED, VkFragmentShadingRateAttachmentInfoKHR::`pFragmentShadingRateAttachment` must either be `NULL` or a VkAttachmentReference2 structure with an `attachment` value of VK_ATTACHMENT_UNUSED

- VUID-VkSubpassDescription2-externalFormatResolve-09348
  If the `externalFormatResolve` feature is enabled, `pResolveAttachments` is not `NULL`, and any element of `pResolveAttachments` is not VK_ATTACHMENT_UNUSED and has a format of VK_FORMAT_UNDEFINED, elements of `pInputAttachments` referencing either a color attachment or resolve attachment used in this subpass must not include `VK_IMAGE_ASPECT_PLANE_i_BIT` for any index i in its `aspectMask`

- VUID-VkSubpassDescription2-flags-04907
  If `flags` includes VK_SUBPASS_DESCRIPTION_CUSTOM_RESOLVE_BIT_EXT, and if `pResolveAttachments` is not `NULL`, then each resolve attachment must be VK_ATTACHMENT_UNUSED

- VUID-VkSubpassDescription2-flags-04908
  If `flags` includes VK_SUBPASS_DESCRIPTION_CUSTOM_RESOLVE_BIT_EXT, and if `pDepthStencilResolveAttachment` is not `NULL`, then the depth/stencil resolve attachment must be VK_ATTACHMENT_UNUSED

- VUID-VkSubpassDescription2-flags-04909
  If `flags` includes VK_SUBPASS_DESCRIPTION_CUSTOM_RESOLVE_BIT_EXT, then the subpass must be the last subpass in a subpass dependency chain

Valid Usage (Implicit)

- VUID-VkSubpassDescription2-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_2

- VUID-VkSubpassDescription2-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkFragmentShadingRateAttachmentInfoKHR, VkMultisampledRenderToSingleSampledInfoEXT, VkRenderPassCreationControlEXT, VkRenderPassSubpassFeedbackCreateInfoEXT, or VkSubpassDescriptionDepthStencilResolve

- VUID-VkSubpassDescription2-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkSubpassDescription2-flags-parameter
  `flags` must be a valid combination of VkSubpassDescriptionFlagBits values

- VUID-VkSubpassDescription2-pipelineBindPoint-parameter
  `pipelineBindPoint` must be a valid VkPipelineBindPoint value

- VUID-VkSubpassDescription2-pInputAttachments-parameter
  If `inputAttachmentCount` is not `0`, `pInputAttachments` must be a valid pointer to an array of `inputAttachmentCount` valid VkAttachmentReference2 structures

- VUID-VkSubpassDescription2-pColorAttachments-parameter
  If `colorAttachmentCount` is not `0`, `pColorAttachments` must be a valid pointer to an array of `colorAttachmentCount` valid VkAttachmentReference2 structures

- VUID-VkSubpassDescription2-pResolveAttachments-parameter
  If `colorAttachmentCount` is not `0`, and `pResolveAttachments` is not `NULL`, `pResolveAttachments` must be a valid pointer to an array of `colorAttachmentCount` valid VkAttachmentReference2 structures

- VUID-VkSubpassDescription2-pDepthStencilAttachment-parameter
  If `pDepthStencilAttachment` is not `NULL`, `pDepthStencilAttachment` must be a valid pointer to a valid VkAttachmentReference2 structure

- VUID-VkSubpassDescription2-pPreserveAttachments-parameter
  If `preserveAttachmentCount` is not `0`, `pPreserveAttachments` must be a valid pointer to an array of `preserveAttachmentCount` `uint32_t` values

The `VkSubpassDescriptionDepthStencilResolve` structure is defined as:

Warning | This functionality is superseded by Vulkan Version 1.4. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_2
    typedef struct VkSubpassDescriptionDepthStencilResolve {
        VkStructureType                  sType;
        const void*                      pNext;
        VkResolveModeFlagBits            depthResolveMode;
        VkResolveModeFlagBits            stencilResolveMode;
        const VkAttachmentReference2*    pDepthStencilResolveAttachment;
    } VkSubpassDescriptionDepthStencilResolve;

    // Provided by VK_KHR_depth_stencil_resolve
    // Equivalent to VkSubpassDescriptionDepthStencilResolve
    typedef VkSubpassDescriptionDepthStencilResolve VkSubpassDescriptionDepthStencilResolveKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `depthResolveMode` is a VkResolveModeFlagBits value describing the depth resolve mode.

- `stencilResolveMode` is a VkResolveModeFlagBits value describing the stencil resolve mode.

- `pDepthStencilResolveAttachment` is `NULL` or a pointer to a VkAttachmentReference2 structure defining the depth/stencil resolve attachment for this subpass and its layout.

If the `pNext` chain of VkSubpassDescription2 includes a `VkSubpassDescriptionDepthStencilResolve` structure, then that structure describes multisample resolve operations for the depth/stencil attachment in a subpass. If this structure is not included in the `pNext` chain of VkSubpassDescription2, or if it is and either `pDepthStencilResolveAttachment` is `NULL` or its attachment index is VK_ATTACHMENT_UNUSED, it indicates that no depth/stencil resolve attachment will be used in the subpass.

Valid Usage

- VUID-VkSubpassDescriptionDepthStencilResolve-pDepthStencilResolveAttachment-03177
  If `pDepthStencilResolveAttachment` is not `NULL` and does not have the value VK_ATTACHMENT_UNUSED, `pDepthStencilAttachment` must not be `NULL` or have the value VK_ATTACHMENT_UNUSED

- VUID-VkSubpassDescriptionDepthStencilResolve-pDepthStencilResolveAttachment-03179
  If `pDepthStencilResolveAttachment` is not `NULL` and does not have the value VK_ATTACHMENT_UNUSED, `pDepthStencilAttachment` must not have a sample count of VK_SAMPLE_COUNT_1_BIT

- VUID-VkSubpassDescriptionDepthStencilResolve-pDepthStencilResolveAttachment-03180
  If `pDepthStencilResolveAttachment` is not `NULL` and does not have the value VK_ATTACHMENT_UNUSED, `pDepthStencilResolveAttachment` must have a sample count of VK_SAMPLE_COUNT_1_BIT

- VUID-VkSubpassDescriptionDepthStencilResolve-pDepthStencilResolveAttachment-02651
  If `pDepthStencilResolveAttachment` is not `NULL` and does not have the value VK_ATTACHMENT_UNUSED then it must have an image format whose potential format features contain VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT

- VUID-VkSubpassDescriptionDepthStencilResolve-pDepthStencilResolveAttachment-03181
  If `pDepthStencilResolveAttachment` is not `NULL` and does not have the value VK_ATTACHMENT_UNUSED and VkFormat of `pDepthStencilResolveAttachment` has a depth component, then the VkFormat of `pDepthStencilAttachment` must have a depth component with the same number of bits and numeric format

- VUID-VkSubpassDescriptionDepthStencilResolve-pDepthStencilResolveAttachment-03182
  If `pDepthStencilResolveAttachment` is not `NULL` and does not have the value VK_ATTACHMENT_UNUSED, and VkFormat of `pDepthStencilResolveAttachment` has a stencil component, then the VkFormat of `pDepthStencilAttachment` must have a stencil component with the same number of bits and numeric format

- VUID-VkSubpassDescriptionDepthStencilResolve-pDepthStencilResolveAttachment-03178
  If `pDepthStencilResolveAttachment` is not `NULL` and does not have the value VK_ATTACHMENT_UNUSED, `depthResolveMode` and `stencilResolveMode` must not both be VK_RESOLVE_MODE_NONE

- VUID-VkSubpassDescriptionDepthStencilResolve-depthResolveMode-03183
  If `pDepthStencilResolveAttachment` is not `NULL` and does not have the value VK_ATTACHMENT_UNUSED and the VkFormat of `pDepthStencilResolveAttachment` has a depth component, then the value of `depthResolveMode` must be one of the bits set in VkPhysicalDeviceDepthStencilResolveProperties::`supportedDepthResolveModes` or VK_RESOLVE_MODE_NONE

- VUID-VkSubpassDescriptionDepthStencilResolve-stencilResolveMode-03184
  If `pDepthStencilResolveAttachment` is not `NULL` and does not have the value VK_ATTACHMENT_UNUSED and the VkFormat of `pDepthStencilResolveAttachment` has a stencil component, then the value of `stencilResolveMode` must be one of the bits set in VkPhysicalDeviceDepthStencilResolveProperties::`supportedStencilResolveModes` or VK_RESOLVE_MODE_NONE

- VUID-VkSubpassDescriptionDepthStencilResolve-pDepthStencilResolveAttachment-03185
  If `pDepthStencilResolveAttachment` is not `NULL` and does not have the value VK_ATTACHMENT_UNUSED, the VkFormat of `pDepthStencilResolveAttachment` has both depth and stencil components, VkPhysicalDeviceDepthStencilResolveProperties::`independentResolve` is VK_FALSE, and VkPhysicalDeviceDepthStencilResolveProperties::`independentResolveNone` is VK_FALSE, then the values of `depthResolveMode` and `stencilResolveMode` must be identical

- VUID-VkSubpassDescriptionDepthStencilResolve-pDepthStencilResolveAttachment-03186
  If `pDepthStencilResolveAttachment` is not `NULL` and does not have the value VK_ATTACHMENT_UNUSED, the VkFormat of `pDepthStencilResolveAttachment` has both depth and stencil components, VkPhysicalDeviceDepthStencilResolveProperties::`independentResolve` is VK_FALSE and VkPhysicalDeviceDepthStencilResolveProperties::`independentResolveNone` is VK_TRUE, then the values of `depthResolveMode` and `stencilResolveMode` must be identical or one of them must be VK_RESOLVE_MODE_NONE

- VUID-VkSubpassDescriptionDepthStencilResolve-pNext-06873
  If the `pNext` chain of VkSubpassDescription2 includes a `VkMultisampledRenderToSingleSampledInfoEXT` structure, the `multisampledRenderToSingleSampledEnable` field is VK_TRUE, and `pDepthStencilAttachment` is not `NULL` and does not have the value VK_ATTACHMENT_UNUSED, `depthResolveMode` and `stencilResolveMode` must not both be VK_RESOLVE_MODE_NONE

- VUID-VkSubpassDescriptionDepthStencilResolve-pNext-06874
  If the `pNext` chain of VkSubpassDescription2 includes a `VkMultisampledRenderToSingleSampledInfoEXT` structure whose `multisampledRenderToSingleSampledEnable` field is VK_TRUE, and `pDepthStencilAttachment` is not `NULL`, does not have the value VK_ATTACHMENT_UNUSED, and has a VkFormat that has a depth component, then the value of `depthResolveMode` must be one of the bits set in VkPhysicalDeviceDepthStencilResolveProperties::`supportedDepthResolveModes` or VK_RESOLVE_MODE_NONE

- VUID-VkSubpassDescriptionDepthStencilResolve-pNext-06875
  If the `pNext` chain of VkSubpassDescription2 includes a `VkMultisampledRenderToSingleSampledInfoEXT` structure whose `multisampledRenderToSingleSampledEnable` field is VK_TRUE, and `pDepthStencilAttachment` is not `NULL`, does not have the value VK_ATTACHMENT_UNUSED, and has a VkFormat with a stencil component, then the value of `stencilResolveMode` must be one of the bits set in VkPhysicalDeviceDepthStencilResolveProperties::`supportedStencilResolveModes` or VK_RESOLVE_MODE_NONE

- VUID-VkSubpassDescriptionDepthStencilResolve-pNext-06876
  If the `pNext` chain of VkSubpassDescription2 includes a `VkMultisampledRenderToSingleSampledInfoEXT` structure whose `multisampledRenderToSingleSampledEnable` field is VK_TRUE, `pDepthStencilAttachment` is not `NULL`, does not have the value VK_ATTACHMENT_UNUSED, and has a VkFormat with both depth and stencil components, and both VkPhysicalDeviceDepthStencilResolveProperties::`independentResolve` and VkPhysicalDeviceDepthStencilResolveProperties::`independentResolveNone` are VK_FALSE, then the values of `depthResolveMode` and `stencilResolveMode` must be identical

- VUID-VkSubpassDescriptionDepthStencilResolve-pNext-06877
  If the `pNext` chain of VkSubpassDescription2 includes a `VkMultisampledRenderToSingleSampledInfoEXT` structure whose `multisampledRenderToSingleSampledEnable` field is VK_TRUE, `pDepthStencilAttachment` is not `NULL`, does not have the value VK_ATTACHMENT_UNUSED, and has a VkFormat with both depth and stencil components, VkPhysicalDeviceDepthStencilResolveProperties::`independentResolve` is VK_FALSE, and VkPhysicalDeviceDepthStencilResolveProperties::`independentResolveNone` is VK_TRUE, then the values of `depthResolveMode` and `stencilResolveMode` must be identical or one of them must be VK_RESOLVE_MODE_NONE

Valid Usage (Implicit)

- VUID-VkSubpassDescriptionDepthStencilResolve-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE

- VUID-VkSubpassDescriptionDepthStencilResolve-pDepthStencilResolveAttachment-parameter
  If `pDepthStencilResolveAttachment` is not `NULL`, `pDepthStencilResolveAttachment` must be a valid pointer to a valid VkAttachmentReference2 structure

Structure Chaining

Extends the structure

  - VkSubpassDescription2

The `VkFragmentShadingRateAttachmentInfoKHR` structure is defined as:

Warning | This functionality is superseded by Vulkan Version 1.4 and VK_KHR_dynamic_rendering_local_read. See Legacy Functionality for more information.

    // Provided by VK_KHR_fragment_shading_rate
    typedef struct VkFragmentShadingRateAttachmentInfoKHR {
        VkStructureType                  sType;
        const void*                      pNext;
        const VkAttachmentReference2*    pFragmentShadingRateAttachment;
        VkExtent2D                       shadingRateAttachmentTexelSize;
    } VkFragmentShadingRateAttachmentInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `pFragmentShadingRateAttachment` is `NULL` or a pointer to a VkAttachmentReference2 structure defining the fragment shading rate attachment for this subpass.

- `shadingRateAttachmentTexelSize` specifies the size of the portion of the framebuffer corresponding to each texel in `pFragmentShadingRateAttachment`.

If no shading rate attachment is specified, or if this structure is not specified, the implementation behaves as if a valid shading rate attachment was specified with all texels specifying a single pixel per fragment.

Valid Usage

- VUID-VkFragmentShadingRateAttachmentInfoKHR-pFragmentShadingRateAttachment-04524
  If `pFragmentShadingRateAttachment` is not `NULL` and its `attachment` member is not VK_ATTACHMENT_UNUSED, its `layout` member must be equal to VK_IMAGE_LAYOUT_GENERAL or VK_IMAGE_LAYOUT_FRAGMENT_SHADING_RATE_ATTACHMENT_OPTIMAL_KHR

- VUID-VkFragmentShadingRateAttachmentInfoKHR-pFragmentShadingRateAttachment-04525
  If `pFragmentShadingRateAttachment` is not `NULL` and its `attachment` member is not VK_ATTACHMENT_UNUSED, `shadingRateAttachmentTexelSize.width` must be a power of two value

- VUID-VkFragmentShadingRateAttachmentInfoKHR-pFragmentShadingRateAttachment-04526
  If `pFragmentShadingRateAttachment` is not `NULL` and its `attachment` member is not VK_ATTACHMENT_UNUSED, `shadingRateAttachmentTexelSize.width` must be less than or equal to `maxFragmentShadingRateAttachmentTexelSize.width`

- VUID-VkFragmentShadingRateAttachmentInfoKHR-pFragmentShadingRateAttachment-04527
  If `pFragmentShadingRateAttachment` is not `NULL` and its `attachment` member is not VK_ATTACHMENT_UNUSED, `shadingRateAttachmentTexelSize.width` must be greater than or equal to `minFragmentShadingRateAttachmentTexelSize.width`

- VUID-VkFragmentShadingRateAttachmentInfoKHR-pFragmentShadingRateAttachment-04528
  If `pFragmentShadingRateAttachment` is not `NULL` and its `attachment` member is not VK_ATTACHMENT_UNUSED, `shadingRateAttachmentTexelSize.height` must be a power of two value

- VUID-VkFragmentShadingRateAttachmentInfoKHR-pFragmentShadingRateAttachment-04529
  If `pFragmentShadingRateAttachment` is not `NULL` and its `attachment` member is not VK_ATTACHMENT_UNUSED, `shadingRateAttachmentTexelSize.height` must be less than or equal to `maxFragmentShadingRateAttachmentTexelSize.height`

- VUID-VkFragmentShadingRateAttachmentInfoKHR-pFragmentShadingRateAttachment-04530
  If `pFragmentShadingRateAttachment` is not `NULL` and its `attachment` member is not VK_ATTACHMENT_UNUSED, `shadingRateAttachmentTexelSize.height` must be greater than or equal to `minFragmentShadingRateAttachmentTexelSize.height`

- VUID-VkFragmentShadingRateAttachmentInfoKHR-pFragmentShadingRateAttachment-04531
  If `pFragmentShadingRateAttachment` is not `NULL` and its `attachment` member is not VK_ATTACHMENT_UNUSED, the quotient of `shadingRateAttachmentTexelSize.width` and `shadingRateAttachmentTexelSize.height` must be less than or equal to `maxFragmentShadingRateAttachmentTexelSizeAspectRatio`

- VUID-VkFragmentShadingRateAttachmentInfoKHR-pFragmentShadingRateAttachment-04532
  If `pFragmentShadingRateAttachment` is not `NULL` and its `attachment` member is not VK_ATTACHMENT_UNUSED, the quotient of `shadingRateAttachmentTexelSize.height` and `shadingRateAttachmentTexelSize.width` must be less than or equal to `maxFragmentShadingRateAttachmentTexelSizeAspectRatio`

Valid Usage (Implicit)

- VUID-VkFragmentShadingRateAttachmentInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR

- VUID-VkFragmentShadingRateAttachmentInfoKHR-pFragmentShadingRateAttachment-parameter
  If `pFragmentShadingRateAttachment` is not `NULL`, `pFragmentShadingRateAttachment` must be a valid pointer to a valid VkAttachmentReference2 structure

Structure Chaining

Extends the structure

  - VkSubpassDescription2

If the `pNext` chain of VkSubpassDescription2 or VkRenderingInfo includes a `VkMultisampledRenderToSingleSampledInfoEXT` structure, then that structure describes how multisampled rendering is performed on single sampled attachments in that subpass.

The `VkMultisampledRenderToSingleSampledInfoEXT` structure is defined as:

    // Provided by VK_EXT_multisampled_render_to_single_sampled
    typedef struct VkMultisampledRenderToSingleSampledInfoEXT {
        VkStructureType          sType;
        const void*              pNext;
        VkBool32                 multisampledRenderToSingleSampledEnable;
        VkSampleCountFlagBits    rasterizationSamples;
    } VkMultisampledRenderToSingleSampledInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `multisampledRenderToSingleSampledEnable` controls whether multisampled rendering to single-sampled attachments is performed as described below.

- `rasterizationSamples` is a VkSampleCountFlagBits specifying the number of samples used in rasterization.

Valid Usage

- VUID-VkMultisampledRenderToSingleSampledInfoEXT-rasterizationSamples-06878
  The value of `rasterizationSamples` must not be VK_SAMPLE_COUNT_1_BIT

- VUID-VkMultisampledRenderToSingleSampledInfoEXT-pNext-06880
  If added to the `pNext` chain of VkRenderingInfo, each `imageView` member of any element of VkRenderingInfo::`pColorAttachments`, VkRenderingInfo::`pDepthAttachment`, or VkRenderingInfo::`pStencilAttachment` that is not VK_NULL_HANDLE must have a format that supports the sample count specified in `rasterizationSamples`

Valid Usage (Implicit)

- VUID-VkMultisampledRenderToSingleSampledInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_INFO_EXT

- VUID-VkMultisampledRenderToSingleSampledInfoEXT-rasterizationSamples-parameter
  `rasterizationSamples` must be a valid VkSampleCountFlagBits value

Structure Chaining

Extends the structures

  - VkRenderingInfo

  - VkSubpassDescription2

If the `pNext` chain of VkSubpassDescription2 or VkRenderingInfo includes a VkMultisampledRenderToSingleSampledInfoEXT structure whose `multisampledRenderToSingleSampledEnable` field is VK_TRUE, the graphics pipelines must have VkGraphicsPipelineCreateInfo::`rasterizationSamples` equal to VkMultisampledRenderToSingleSampledInfoEXT::`rasterizationSamples`, and the subpass attachments can have a sample count of VK_SAMPLE_COUNT_1_BIT. For attachments with a sample count of VK_SAMPLE_COUNT_1_BIT, multisampled rendering is performed to an intermediate multisampled image with VkMultisampledRenderToSingleSampledInfoEXT::`rasterizationSamples` samples, implicitly allocated by the implementation for the duration of the subpass. For such attachments:

- If `loadOp` equals to VK_ATTACHMENT_LOAD_OP_LOAD, samples of the implicit image are initialized by replicating the value from the corresponding pixel in the attachment.

- If `storeOp` or `stencilStoreOp` is equal to VK_ATTACHMENT_STORE_OP_STORE, the implicit image is implicitly resolved prior to storage in the attachment.

Memory constraints due to high primitive counts may result in an implicit split of the subpass. This is the equivalent of partial rasterization of geometry in a render pass that ends in `storeOp` and `stencilStoreOp` equal to VK_ATTACHMENT_STORE_OP_STORE, followed by another render pass with `loadOp` and `stencilLoadOp` equal to VK_ATTACHMENT_LOAD_OP_LOAD with appropriate barriers in between. When VkMultisampledRenderToSingleSampledInfoEXT is used, the implementation is allowed to resolve attachments with a sample count of VK_SAMPLE_COUNT_1_BIT and lose multisampled data on such splits. The implementation may similarly split the render pass at subpass boundaries even if they use the same value for VkMultisampledRenderToSingleSampledInfoEXT::`rasterizationSamples`.

The `VkAttachmentReference2` structure is defined as:

Warning | This functionality is superseded by Vulkan Version 1.4. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_2
    typedef struct VkAttachmentReference2 {
        VkStructureType       sType;
        const void*           pNext;
        uint32_t              attachment;
        VkImageLayout         layout;
        VkImageAspectFlags    aspectMask;
    } VkAttachmentReference2;

    // Provided by VK_KHR_create_renderpass2
    // Equivalent to VkAttachmentReference2
    typedef VkAttachmentReference2 VkAttachmentReference2KHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `attachment` is either an integer value identifying an attachment at the corresponding index in VkRenderPassCreateInfo2::`pAttachments`, or VK_ATTACHMENT_UNUSED to signify that this attachment is not used.

- `layout` is a VkImageLayout value specifying the layout the attachment uses during the subpass.

- `aspectMask` is a mask of which aspect(s) can be accessed within the specified subpass as an input attachment.

Parameters defined by this structure with the same name as those in VkAttachmentReference have the identical effect to those parameters.

`aspectMask` is ignored when this structure is used to describe anything other than an input attachment reference.

If the `separateDepthStencilLayouts` feature is enabled, and `attachment` has a depth/stencil format, `layout` can be set to a layout that only specifies the layout of the depth aspect.

If `layout` only specifies the layout of the depth aspect of the attachment, the layout of the stencil aspect is specified by the `stencilLayout` member of a VkAttachmentReferenceStencilLayout structure included in the `pNext` chain. Otherwise, `layout` describes the layout for all relevant image aspects.

Valid Usage

- VUID-VkAttachmentReference2-layout-03077
  If `attachment` is not VK_ATTACHMENT_UNUSED, `layout` must not be VK_IMAGE_LAYOUT_UNDEFINED, VK_IMAGE_LAYOUT_ZERO_INITIALIZED_EXT, VK_IMAGE_LAYOUT_PREINITIALIZED, or VK_IMAGE_LAYOUT_PRESENT_SRC_KHR

- VUID-VkAttachmentReference2-separateDepthStencilLayouts-03313
  If the `separateDepthStencilLayouts` feature is not enabled, and `attachment` is not VK_ATTACHMENT_UNUSED, `layout` must not be VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL, VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL, or VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL,

- VUID-VkAttachmentReference2-synchronization2-06910
  If the `synchronization2` feature is not enabled, `layout` must not be VK_IMAGE_LAYOUT_ATTACHMENT_OPTIMAL_KHR or VK_IMAGE_LAYOUT_READ_ONLY_OPTIMAL_KHR

- VUID-VkAttachmentReference2-attachmentFeedbackLoopLayout-07311
  If the `attachmentFeedbackLoopLayout` feature is not enabled, `layout` must not be VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT

- VUID-VkAttachmentReference2-dynamicRenderingLocalRead-09546
  If the `dynamicRenderingLocalRead` feature is not enabled, `layout` must not be VK_IMAGE_LAYOUT_RENDERING_LOCAL_READ

Valid Usage (Implicit)

- VUID-VkAttachmentReference2-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2

- VUID-VkAttachmentReference2-pNext-pNext
  `pNext` must be `NULL` or a pointer to a valid instance of VkAttachmentReferenceStencilLayout

- VUID-VkAttachmentReference2-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkAttachmentReference2-layout-parameter
  `layout` must be a valid VkImageLayout value

The `VkAttachmentReferenceStencilLayout` structure is defined as:

    // Provided by VK_VERSION_1_2
    typedef struct VkAttachmentReferenceStencilLayout {
        VkStructureType    sType;
        void*              pNext;
        VkImageLayout      stencilLayout;
    } VkAttachmentReferenceStencilLayout;

    // Provided by VK_KHR_separate_depth_stencil_layouts
    // Equivalent to VkAttachmentReferenceStencilLayout
    typedef VkAttachmentReferenceStencilLayout VkAttachmentReferenceStencilLayoutKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `stencilLayout` is a VkImageLayout value specifying the layout the stencil aspect of the attachment uses during the subpass.

Valid Usage

- VUID-VkAttachmentReferenceStencilLayout-stencilLayout-03318
  `stencilLayout` must not be VK_IMAGE_LAYOUT_UNDEFINED, VK_IMAGE_LAYOUT_PREINITIALIZED, VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL, VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL, VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL, VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL, or VK_IMAGE_LAYOUT_PRESENT_SRC_KHR

Valid Usage (Implicit)

- VUID-VkAttachmentReferenceStencilLayout-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_STENCIL_LAYOUT

- VUID-VkAttachmentReferenceStencilLayout-stencilLayout-parameter
  `stencilLayout` must be a valid VkImageLayout value

Structure Chaining

Extends the structure

  - VkAttachmentReference2

The `VkSubpassDependency2` structure is defined as:

Warning | This functionality is superseded by Vulkan Version 1.4. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_2
    typedef struct VkSubpassDependency2 {
        VkStructureType         sType;
        const void*             pNext;
        uint32_t                srcSubpass;
        uint32_t                dstSubpass;
        VkPipelineStageFlags    srcStageMask;
        VkPipelineStageFlags    dstStageMask;
        VkAccessFlags           srcAccessMask;
        VkAccessFlags           dstAccessMask;
        VkDependencyFlags       dependencyFlags;
        int32_t                 viewOffset;
    } VkSubpassDependency2;

    // Provided by VK_KHR_create_renderpass2
    // Equivalent to VkSubpassDependency2
    typedef VkSubpassDependency2 VkSubpassDependency2KHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `srcSubpass` is the subpass index of the first subpass in the dependency, or VK_SUBPASS_EXTERNAL.

- `dstSubpass` is the subpass index of the second subpass in the dependency, or VK_SUBPASS_EXTERNAL.

- `srcStageMask` is a bitmask of VkPipelineStageFlagBits specifying the source stage mask. If set to VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, it is equivalent to setting it to VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT.

- `dstStageMask` is a bitmask of VkPipelineStageFlagBits specifying the destination stage mask If set to VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, it is equivalent to setting it to VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT.

- `srcAccessMask` is a bitmask of VkAccessFlagBits specifying a source access mask.

- `dstAccessMask` is a bitmask of VkAccessFlagBits specifying a destination access mask.

- `dependencyFlags` is a bitmask of VkDependencyFlagBits.

- `viewOffset` controls which views in the source subpass the views in the destination subpass depend on.

Parameters defined by this structure with the same name as those in VkSubpassDependency have the identical effect to those parameters.

`viewOffset` has the same effect for the described subpass dependency as VkRenderPassMultiviewCreateInfo::`pViewOffsets` has on each corresponding subpass dependency.

If a VkMemoryBarrier2 is included in the `pNext` chain, `srcStageMask`, `dstStageMask`, `srcAccessMask`, and `dstAccessMask` parameters are ignored. The synchronization and access scopes instead are defined by the parameters of VkMemoryBarrier2. If either `srcStageMask` or `dstStageMask` are set to VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, it is equivalent to setting VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT.

Valid Usage

- VUID-VkSubpassDependency2-srcStageMask-04090
  If the `geometryShader` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT

- VUID-VkSubpassDependency2-srcStageMask-04091
  If the `tessellationShader` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT or VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT

- VUID-VkSubpassDependency2-srcStageMask-04092
  If the `conditionalRendering` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT

- VUID-VkSubpassDependency2-srcStageMask-04093
  If the `fragmentDensityMap` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT

- VUID-VkSubpassDependency2-srcStageMask-04094
  If the `transformFeedback` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT

- VUID-VkSubpassDependency2-srcStageMask-04095
  If the `meshShader` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_MESH_SHADER_BIT_EXT

- VUID-VkSubpassDependency2-srcStageMask-04096
  If the `taskShader` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_TASK_SHADER_BIT_EXT

- VUID-VkSubpassDependency2-srcStageMask-07318
  If neither of the `shadingRateImage` or the `attachmentFragmentShadingRate` features are enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

- VUID-VkSubpassDependency2-srcStageMask-03937
  If the `synchronization2` feature is not enabled, `srcStageMask` must not be `0`

- VUID-VkSubpassDependency2-srcStageMask-07949
  If neither the VK_NV_ray_tracing extension or the `rayTracingPipeline` feature are enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_KHR

- VUID-VkSubpassDependency2-srcStageMask-10754
  If the `accelerationStructure` feature is not enabled, `srcStageMask` must not contain VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR

- VUID-VkSubpassDependency2-dstStageMask-04090
  If the `geometryShader` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT

- VUID-VkSubpassDependency2-dstStageMask-04091
  If the `tessellationShader` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT or VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT

- VUID-VkSubpassDependency2-dstStageMask-04092
  If the `conditionalRendering` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT

- VUID-VkSubpassDependency2-dstStageMask-04093
  If the `fragmentDensityMap` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT

- VUID-VkSubpassDependency2-dstStageMask-04094
  If the `transformFeedback` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT

- VUID-VkSubpassDependency2-dstStageMask-04095
  If the `meshShader` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_MESH_SHADER_BIT_EXT

- VUID-VkSubpassDependency2-dstStageMask-04096
  If the `taskShader` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_TASK_SHADER_BIT_EXT

- VUID-VkSubpassDependency2-dstStageMask-07318
  If neither of the `shadingRateImage` or the `attachmentFragmentShadingRate` features are enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

- VUID-VkSubpassDependency2-dstStageMask-03937
  If the `synchronization2` feature is not enabled, `dstStageMask` must not be `0`

- VUID-VkSubpassDependency2-dstStageMask-07949
  If neither the VK_NV_ray_tracing extension or the `rayTracingPipeline` feature are enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_KHR

- VUID-VkSubpassDependency2-dstStageMask-10754
  If the `accelerationStructure` feature is not enabled, `dstStageMask` must not contain VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR

- VUID-VkSubpassDependency2-srcSubpass-03084
  `srcSubpass` must be less than or equal to `dstSubpass`, unless one of them is VK_SUBPASS_EXTERNAL, to avoid cyclic dependencies and ensure a valid execution order

- VUID-VkSubpassDependency2-srcSubpass-03085
  `srcSubpass` and `dstSubpass` must not both be equal to VK_SUBPASS_EXTERNAL

- VUID-VkSubpassDependency2-srcSubpass-06810
  If `srcSubpass` is equal to `dstSubpass` and `srcStageMask` includes a framebuffer-space stage, `dstStageMask` must only contain framebuffer-space stages

- VUID-VkSubpassDependency2-srcAccessMask-03088
  Any access flag included in `srcAccessMask` must be supported by one of the pipeline stages in `srcStageMask`, as specified in the table of supported access types

- VUID-VkSubpassDependency2-dstAccessMask-03089
  Any access flag included in `dstAccessMask` must be supported by one of the pipeline stages in `dstStageMask`, as specified in the table of supported access types

- VUID-VkSubpassDependency2-dependencyFlags-03090
  If `dependencyFlags` includes VK_DEPENDENCY_VIEW_LOCAL_BIT, `srcSubpass` must not be equal to VK_SUBPASS_EXTERNAL

- VUID-VkSubpassDependency2-dependencyFlags-03091
  If `dependencyFlags` includes VK_DEPENDENCY_VIEW_LOCAL_BIT, `dstSubpass` must not be equal to VK_SUBPASS_EXTERNAL

- VUID-VkSubpassDependency2-srcSubpass-02245
  If `srcSubpass` equals `dstSubpass`, and `srcStageMask` and `dstStageMask` both include a framebuffer-space stage, then `dependencyFlags` must include VK_DEPENDENCY_BY_REGION_BIT

- VUID-VkSubpassDependency2-viewOffset-02530
  If `viewOffset` is not equal to `0`, `srcSubpass` must not be equal to `dstSubpass`

- VUID-VkSubpassDependency2-dependencyFlags-03092
  If `dependencyFlags` does not include VK_DEPENDENCY_VIEW_LOCAL_BIT, `viewOffset` must be `0`

- VUID-VkSubpassDependency2-dependencyFlags-10204
  `dependencyFlags` must not include VK_DEPENDENCY_QUEUE_FAMILY_OWNERSHIP_TRANSFER_USE_ALL_STAGES_BIT_KHR

Valid Usage (Implicit)

- VUID-VkSubpassDependency2-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SUBPASS_DEPENDENCY_2

- VUID-VkSubpassDependency2-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkMemoryBarrier2 or VkMemoryBarrierAccessFlags3KHR

- VUID-VkSubpassDependency2-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkSubpassDependency2-srcStageMask-parameter
  `srcStageMask` must be a valid combination of VkPipelineStageFlagBits values

- VUID-VkSubpassDependency2-dstStageMask-parameter
  `dstStageMask` must be a valid combination of VkPipelineStageFlagBits values

- VUID-VkSubpassDependency2-srcAccessMask-parameter
  `srcAccessMask` must be a valid combination of VkAccessFlagBits values

- VUID-VkSubpassDependency2-dstAccessMask-parameter
  `dstAccessMask` must be a valid combination of VkAccessFlagBits values

- VUID-VkSubpassDependency2-dependencyFlags-parameter
  `dependencyFlags` must be a valid combination of VkDependencyFlagBits values

To destroy a render pass, call:

Warning | This functionality is superseded by Vulkan Version 1.4. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_0
    void vkDestroyRenderPass(
        VkDevice                                    device,
        VkRenderPass                                renderPass,
        const VkAllocationCallbacks*                pAllocator);

- `device` is the logical device that destroys the render pass.

- `renderPass` is the handle of the render pass to destroy.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

Valid Usage

- VUID-vkDestroyRenderPass-renderPass-00873
  All submitted commands that refer to `renderPass` must have completed execution

- VUID-vkDestroyRenderPass-renderPass-00874
  If `VkAllocationCallbacks` were provided when `renderPass` was created, a compatible set of callbacks must be provided here

- VUID-vkDestroyRenderPass-renderPass-00875
  If no `VkAllocationCallbacks` were provided when `renderPass` was created, `pAllocator` must be `NULL`

Valid Usage (Implicit)

- VUID-vkDestroyRenderPass-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkDestroyRenderPass-renderPass-parameter
  If `renderPass` is not VK_NULL_HANDLE, `renderPass` must be a valid VkRenderPass handle

- VUID-vkDestroyRenderPass-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkDestroyRenderPass-renderPass-parent
  If `renderPass` is a valid handle, it must have been created, allocated, or retrieved from `device`

Host Synchronization

- Host access to `renderPass` must be externally synchronized

### 8.3. Render Pass Compatibility

Framebuffers and graphics pipelines are created based on a specific render pass object. They must only be used with that render pass object, or one compatible with it.

Two attachment references are compatible if they have matching format and sample count, or are both VK_ATTACHMENT_UNUSED.

Two arrays of attachment references are compatible if all corresponding pairs of attachments are compatible. If the arrays are of different lengths, attachment references not present in the smaller array are treated as VK_ATTACHMENT_UNUSED. If the pointer that would contain the reference is `NULL`, the attachment reference is treated as VK_ATTACHMENT_UNUSED.

Two render passes are compatible if their corresponding color, input, resolve, and depth/stencil attachment references are compatible and if they are otherwise identical except for:

- Initial and final image layout in attachment descriptions

- Load and store operations in attachment descriptions

- Image layout in attachment references

- The inclusion of VK_ATTACHMENT_DESCRIPTION_RESOLVE_SKIP_TRANSFER_FUNCTION_BIT_KHR

- The inclusion of VK_ATTACHMENT_DESCRIPTION_RESOLVE_ENABLE_TRANSFER_FUNCTION_BIT_KHR

As an additional special case, if two render passes have a single subpass, the resolve attachment reference and depth/stencil resolve mode compatibility requirements are ignored.

A framebuffer is compatible with a render pass if it was created using the same render pass or a compatible render pass.

### 8.4. Framebuffers

Render passes operate in conjunction with framebuffers. Framebuffers represent a collection of specific memory attachments that a render pass instance uses.

Framebuffers are represented by `VkFramebuffer` handles:

Warning | This functionality is superseded by Vulkan Version 1.4. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_0
    VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkFramebuffer)

To create a framebuffer, call:

Warning | This functionality is superseded by Vulkan Version 1.4. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_0
    VkResult vkCreateFramebuffer(
        VkDevice                                    device,
        const VkFramebufferCreateInfo*              pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkFramebuffer*                              pFramebuffer);

- `device` is the logical device that creates the framebuffer.

- `pCreateInfo` is a pointer to a VkFramebufferCreateInfo structure describing additional information about framebuffer creation.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

- `pFramebuffer` is a pointer to a VkFramebuffer handle in which the resulting framebuffer object is returned.

Valid Usage

- VUID-vkCreateFramebuffer-device-10002
  `device` must support at least one queue family with the VK_QUEUE_GRAPHICS_BIT capability

- VUID-vkCreateFramebuffer-pCreateInfo-02777
  If `pCreateInfo->flags` does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, and `attachmentCount` is not `0`, each element of `pCreateInfo->pAttachments` must have been created on `device`

Valid Usage (Implicit)

- VUID-vkCreateFramebuffer-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkCreateFramebuffer-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkFramebufferCreateInfo structure

- VUID-vkCreateFramebuffer-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateFramebuffer-pFramebuffer-parameter
  `pFramebuffer` must be a valid pointer to a VkFramebuffer handle

- VUID-vkCreateFramebuffer-device-queuecount
  The device must have been created with at least `1` queue

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkFramebufferCreateInfo` structure is defined as:

Warning | This functionality is superseded by Vulkan Version 1.4. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_0
    typedef struct VkFramebufferCreateInfo {
        VkStructureType             sType;
        const void*                 pNext;
        VkFramebufferCreateFlags    flags;
        VkRenderPass                renderPass;
        uint32_t                    attachmentCount;
        const VkImageView*          pAttachments;
        uint32_t                    width;
        uint32_t                    height;
        uint32_t                    layers;
    } VkFramebufferCreateInfo;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask of VkFramebufferCreateFlagBits

- `renderPass` is a render pass defining what render passes the framebuffer will be compatible with. See Render Pass Compatibility for details. The implementation must not access this object outside of the duration of the command this structure is passed to.

- `attachmentCount` is the number of attachments.

- `pAttachments` is a pointer to an array of VkImageView handles, each of which will be used as the corresponding attachment in a render pass instance. If `flags` includes VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, this parameter is ignored.

- `width`, `height` and `layers` define the dimensions of the framebuffer. If the render pass uses multiview, then `layers` must be one and each attachment requires a number of layers that is greater than the maximum bit index set in the view mask in the subpasses in which it is used.

For any depth/stencil attachments used by this framebuffer in `pAttachments`, or set later through VkRenderPassAttachmentBeginInfoKHR::`pAttachments`, the `aspectMask` is ignored.

It is legal for a subpass to use no color or depth/stencil attachments, either because it has no attachment references or because all of them are VK_ATTACHMENT_UNUSED. This kind of subpass can use shader side effects such as image stores and atomics to produce an output. In this case, the subpass continues to use the `width`, `height`, and `layers` of the framebuffer to define the dimensions of the rendering area, and the `rasterizationSamples` from each pipeline’s VkPipelineMultisampleStateCreateInfo to define the number of samples used in rasterization; however, if VkPhysicalDeviceFeatures::`variableMultisampleRate` is VK_FALSE, then all pipelines to be bound with the subpass must have the same value for VkPipelineMultisampleStateCreateInfo::`rasterizationSamples`. In all such cases, `rasterizationSamples` must be a valid VkSampleCountFlagBits value that is set in VkPhysicalDeviceLimits::`framebufferNoAttachmentsSampleCounts`.

Valid Usage

- VUID-VkFramebufferCreateInfo-attachmentCount-00876
  `attachmentCount` must be equal to the attachment count specified in `renderPass`

- VUID-VkFramebufferCreateInfo-flags-02778
  If `flags` does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT and `attachmentCount` is not `0`, `pAttachments` must be a valid pointer to an array of `attachmentCount` valid VkImageView handles

- VUID-VkFramebufferCreateInfo-pAttachments-00877
  If `flags` does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of `pAttachments` that is used as a color attachment or resolve attachment by `renderPass` must have been created with the VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT usage flag set

- VUID-VkFramebufferCreateInfo-pAttachments-02633
  If `flags` does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of `pAttachments` that is used as a depth/stencil attachment by `renderPass` must have been created with the VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT usage flag set

- VUID-VkFramebufferCreateInfo-pAttachments-02634
  If `flags` does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of `pAttachments` that is used as a depth/stencil resolve attachment by `renderPass` must have been created with the VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT usage flag set

- VUID-VkFramebufferCreateInfo-pAttachments-00879
  If `renderpass` is not VK_NULL_HANDLE, `flags` does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of `pAttachments` that is used as an input attachment by `renderPass` must have been created with the VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT usage flag set

- VUID-VkFramebufferCreateInfo-pAttachments-02552
  Each element of `pAttachments` that is used as a fragment density map attachment by `renderPass` must not have been created with a `flags` value including VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT

- VUID-VkFramebufferCreateInfo-renderPass-02553
  If `renderPass` has a fragment density map attachment and the `fragmentDensityMapNonSubsampledImages` feature is not enabled, each element of `pAttachments` must have been created with a `flags` value including VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT unless that element is the fragment density map attachment

- VUID-VkFramebufferCreateInfo-renderPass-10830
  If `renderPass` was created with VK_RENDER_PASS_CREATE_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE, then `layers` must be less than or equal to `maxFragmentDensityMapLayers`

- VUID-VkFramebufferCreateInfo-pAttachments-12327
  If flags does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, then each element of `pAttachments` that is used as a resolve attachment by `renderPass` must not be bound to a `VkDeviceMemory` object allocated from a `VkMemoryHeap` with the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property

- VUID-VkFramebufferCreateInfo-pAttachments-00880
  If `flags` does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of `pAttachments` must have been created with a VkFormat value that matches the VkFormat specified by the corresponding `VkAttachmentDescription` in `renderPass`

- VUID-VkFramebufferCreateInfo-pAttachments-00881
  If `flags` does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of `pAttachments` must have been created with a `samples` value that matches the `samples` value specified by the corresponding `VkAttachmentDescription` in `renderPass`

- VUID-VkFramebufferCreateInfo-flags-04533
  If `flags` does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of `pAttachments` that is used as an input, color, resolve, or depth/stencil attachment by `renderPass` must have been created with a VkImageCreateInfo::`extent.width` greater than or equal to `width`

- VUID-VkFramebufferCreateInfo-flags-04534
  If `flags` does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of `pAttachments` that is used as an input, color, resolve, or depth/stencil attachment by `renderPass` must have been created with a VkImageCreateInfo::`extent.height` greater than or equal to `height`

- VUID-VkFramebufferCreateInfo-flags-04535
  If `flags` does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of `pAttachments` that is used as an input, color, resolve, or depth/stencil attachment by `renderPass` must have been created with a VkImageViewCreateInfo::`subresourceRange.layerCount` greater than or equal to `layers`

- VUID-VkFramebufferCreateInfo-renderPass-04536
  If `renderPass` was specified with non-zero view masks, each element of `pAttachments` that is used as an input, color, resolve, or depth/stencil attachment by `renderPass` must have a `layerCount` greater than the index of the most significant bit set in any of those view masks

- VUID-VkFramebufferCreateInfo-renderPass-02746
  Each element of `pAttachments` that is referenced by `fragmentDensityMapAttachment` must have a `layerCount` equal to `1` or if `renderPass` was specified with non-zero view masks, greater than the index of the most significant bit set in any of those view masks

- VUID-VkFramebufferCreateInfo-pAttachments-02555
  If `flags` does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, an element of `pAttachments` that is referenced by `fragmentDensityMapAttachment` must have a width at least as large as ⌈max F r a g mentDensit y T exe lS i z e w idth​w idth​⌉

- VUID-VkFramebufferCreateInfo-pAttachments-02556
  If `flags` does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, an element of `pAttachments` that is referenced by `fragmentDensityMapAttachment` must have a height at least as large as ⌈max F r a g mentDensit y T exe lS i z e hei g ht​hei g ht​⌉

- VUID-VkFramebufferCreateInfo-flags-04537
  If `flags` does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, and `renderPass` was specified with non-zero view masks, each element of `pAttachments` that is used as a fragment shading rate attachment by `renderPass` must have a `layerCount` that is either `1`, or greater than the index of the most significant bit set in any of those view masks

- VUID-VkFramebufferCreateInfo-flags-04538
  If `flags` does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, and `renderPass` was not specified with non-zero view masks, each element of `pAttachments` that is used as a fragment shading rate attachment by `renderPass` must have a `layerCount` that is either `1`, or greater than `layers`

- VUID-VkFramebufferCreateInfo-flags-04539
  If the `maintenance7` feature is not enabled or the `robustFragmentShadingRateAttachmentAccess` limit is VK_FALSE or the `imageView` member of a VkRenderingFragmentShadingRateAttachmentInfoKHR structure was created with VkImageSubresourceRange::`baseMipLevel` greater than 0, `flags` does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, an element of `pAttachments` that is used as a fragment shading rate attachment must have a width at least as large as ⌈`width` / `texelWidth`⌉, where `texelWidth` is the largest value of `shadingRateAttachmentTexelSize.width` in a VkFragmentShadingRateAttachmentInfoKHR which references that attachment

- VUID-VkFramebufferCreateInfo-flags-04540
  If the `maintenance7` feature is not enabled or the `robustFragmentShadingRateAttachmentAccess` limit is VK_FALSE or the `imageView` member of a VkRenderingFragmentShadingRateAttachmentInfoKHR structure was created with VkImageSubresourceRange::`baseMipLevel` greater than 0, `flags` does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, an element of `pAttachments` that is used as a fragment shading rate attachment must have a height at least as large as ⌈`height` / `texelHeight`⌉, where `texelHeight` is the largest value of `shadingRateAttachmentTexelSize.height` in a VkFragmentShadingRateAttachmentInfoKHR which references that attachment

- VUID-VkFramebufferCreateInfo-pAttachments-00883
  If `flags` does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of `pAttachments` must only specify a single mip level

- VUID-VkFramebufferCreateInfo-pAttachments-00884
  If `flags` does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of `pAttachments` must have been created with the identity swizzle

- VUID-VkFramebufferCreateInfo-width-00885
  `width` must be greater than `0`

- VUID-VkFramebufferCreateInfo-width-00886
  `width` must be less than or equal to `maxFramebufferWidth`

- VUID-VkFramebufferCreateInfo-height-00887
  `height` must be greater than `0`

- VUID-VkFramebufferCreateInfo-height-00888
  `height` must be less than or equal to `maxFramebufferHeight`

- VUID-VkFramebufferCreateInfo-layers-00889
  `layers` must be greater than `0`

- VUID-VkFramebufferCreateInfo-layers-00890
  `layers` must be less than or equal to `maxFramebufferLayers`

- VUID-VkFramebufferCreateInfo-renderPass-02531
  If `renderPass` was specified with non-zero view masks, `layers` must be `1`

- VUID-VkFramebufferCreateInfo-pAttachments-00891
  If `flags` does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of `pAttachments` that is a 2D or 2D array image view taken from a 3D image must not be a depth/stencil format

- VUID-VkFramebufferCreateInfo-flags-03189
  If the `imagelessFramebuffer` feature is not enabled, `flags` must not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT

- VUID-VkFramebufferCreateInfo-flags-03190
  If `flags` includes VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, the `pNext` chain must include a VkFramebufferAttachmentsCreateInfo structure

- VUID-VkFramebufferCreateInfo-flags-03191
  If `flags` includes VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, the `attachmentImageInfoCount` member of a VkFramebufferAttachmentsCreateInfo structure in the `pNext` chain must be equal to either zero or `attachmentCount`

- VUID-VkFramebufferCreateInfo-flags-04541
  If `flags` includes VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, the `width` member of any element of the `pAttachmentImageInfos` member of a VkFramebufferAttachmentsCreateInfo structure in the `pNext` chain that is used as an input, color, resolve, or depth/stencil attachment in `renderPass` must be greater than or equal to `width`

- VUID-VkFramebufferCreateInfo-flags-04542
  If `flags` includes VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, the `height` member of any element of the `pAttachmentImageInfos` member of a VkFramebufferAttachmentsCreateInfo structure in the `pNext` chain that is used as an input, color, resolve, or depth/stencil attachment in `renderPass` must be greater than or equal to `height`

- VUID-VkFramebufferCreateInfo-flags-03196
  If `flags` includes VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, the `width` member of any element of the `pAttachmentImageInfos` member of a VkFramebufferAttachmentsCreateInfo structure in the `pNext` chain that is referenced by VkRenderPassFragmentDensityMapCreateInfoEXT::`fragmentDensityMapAttachment` in `renderPass` must be greater than or equal to ⌈max F r a g mentDensit y T exe lS i z e w idth​w idth​⌉

- VUID-VkFramebufferCreateInfo-flags-03197
  If `flags` includes VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, the `height` member of any element of the `pAttachmentImageInfos` member of a VkFramebufferAttachmentsCreateInfo structure included in the `pNext` chain that is referenced by VkRenderPassFragmentDensityMapCreateInfoEXT::`fragmentDensityMapAttachment` in `renderPass` must be greater than or equal to ⌈max F r a g mentDensit y T exe lS i z e hei g ht​hei g ht​⌉

- VUID-VkFramebufferCreateInfo-flags-04543
  If the `maintenance7` feature is not enabled or the `robustFragmentShadingRateAttachmentAccess` limit is VK_FALSE or the `imageView` member of a VkRenderingFragmentShadingRateAttachmentInfoKHR structure was created with VkImageSubresourceRange::`baseMipLevel` greater than 0, and `flags` includes VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, the `width` member of any element of the `pAttachmentImageInfos` member of a VkFramebufferAttachmentsCreateInfo structure in the `pNext` chain that is used as a fragment shading rate attachment must be greater than or equal to ⌈`width` / `texelWidth`⌉, where `texelWidth` is the largest value of `shadingRateAttachmentTexelSize.width` in a VkFragmentShadingRateAttachmentInfoKHR which references that attachment

- VUID-VkFramebufferCreateInfo-flags-04544
  If the `maintenance7` feature is not enabled or the `robustFragmentShadingRateAttachmentAccess` limit is VK_FALSE or the `imageView` member of a VkRenderingFragmentShadingRateAttachmentInfoKHR structure was created with VkImageSubresourceRange::`baseMipLevel` greater than 0, and `flags` includes VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, the `height` member of any element of the `pAttachmentImageInfos` member of a VkFramebufferAttachmentsCreateInfo structure in the `pNext` chain that is used as a fragment shading rate attachment must be greater than or equal to ⌈`height` / `texelHeight`⌉, where `texelHeight` is the largest value of `shadingRateAttachmentTexelSize.height` in a VkFragmentShadingRateAttachmentInfoKHR which references that attachment

- VUID-VkFramebufferCreateInfo-flags-04545
  If `flags` includes VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, the `layerCount` member of any element of the `pAttachmentImageInfos` member of a VkFramebufferAttachmentsCreateInfo structure in the `pNext` chain that is used as a fragment shading rate attachment must be either `1`, or greater than or equal to `layers`

- VUID-VkFramebufferCreateInfo-flags-04587
  If `flags` includes VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT and `renderPass` was specified with non-zero view masks, the `layerCount` member of any element of the `pAttachmentImageInfos` member of a VkFramebufferAttachmentsCreateInfo structure in the `pNext` chain that is used as a fragment shading rate attachment must be either `1`, or greater than the index of the most significant bit set in any of those view masks

- VUID-VkFramebufferCreateInfo-renderPass-03198
  If multiview is enabled for `renderPass` and `flags` includes VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, the `layerCount` member of any element of the `pAttachmentImageInfos` member of a VkFramebufferAttachmentsCreateInfo structure included in the `pNext` chain used as an input, color, resolve, or depth/stencil attachment in `renderPass` must be greater than the maximum bit index set in the view mask in the subpasses in which it is used in `renderPass`

- VUID-VkFramebufferCreateInfo-renderPass-04546
  If multiview is not enabled for `renderPass` and `flags` includes VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, the `layerCount` member of any element of the `pAttachmentImageInfos` member of a VkFramebufferAttachmentsCreateInfo structure included in the `pNext` chain used as an input, color, resolve, or depth/stencil attachment in `renderPass` must be greater than or equal to `layers`

- VUID-VkFramebufferCreateInfo-flags-03201
  If `flags` includes VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, the `usage` member of any element of the `pAttachmentImageInfos` member of a VkFramebufferAttachmentsCreateInfo structure included in the `pNext` chain that refers to an attachment used as a color attachment or resolve attachment by `renderPass` must include VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT

- VUID-VkFramebufferCreateInfo-flags-03202
  If `flags` includes VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, the `usage` member of any element of the `pAttachmentImageInfos` member of a VkFramebufferAttachmentsCreateInfo structure included in the `pNext` chain that refers to an attachment used as a depth/stencil attachment by `renderPass` must include VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT

- VUID-VkFramebufferCreateInfo-flags-03203
  If `flags` includes VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, the `usage` member of any element of the `pAttachmentImageInfos` member of a VkFramebufferAttachmentsCreateInfo structure included in the `pNext` chain that refers to an attachment used as a depth/stencil resolve attachment by `renderPass` must include VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT

- VUID-VkFramebufferCreateInfo-flags-03204
  If `flags` includes VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, the `usage` member of any element of the `pAttachmentImageInfos` member of a VkFramebufferAttachmentsCreateInfo structure included in the `pNext` chain that refers to an attachment used as an input attachment by `renderPass` must include VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT

- VUID-VkFramebufferCreateInfo-flags-03205
  If `flags` includes VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, at least one element of the `pViewFormats` member of any element of the `pAttachmentImageInfos` member of a VkFramebufferAttachmentsCreateInfo structure included in the `pNext` chain must be equal to the corresponding value of VkAttachmentDescription::`format` used to create `renderPass`

- VUID-VkFramebufferCreateInfo-flags-04113
  If `flags` does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of `pAttachments` must have been created with VkImageViewCreateInfo::`viewType` not equal to VK_IMAGE_VIEW_TYPE_3D

- VUID-VkFramebufferCreateInfo-flags-04548
  If `flags` does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of `pAttachments` that is used as a fragment shading rate attachment by `renderPass` must have been created with the VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR usage flag set

- VUID-VkFramebufferCreateInfo-flags-04549
  If `flags` includes VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, the `usage` member of any element of the `pAttachmentImageInfos` member of a VkFramebufferAttachmentsCreateInfo structure included in the `pNext` chain that refers to an attachment used as a fragment shading rate attachment by `renderPass` must include VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

- VUID-VkFramebufferCreateInfo-samples-06881
  If multisampled-render-to-single-sampled is enabled for any subpass, all color, depth/stencil, and input attachments used in that subpass which have `VkAttachmentDescription`::`samples` or `VkAttachmentDescription2`::`samples` equal to VK_SAMPLE_COUNT_1_BIT must have been created with VK_IMAGE_CREATE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_BIT_EXT in their VkImageCreateInfo::`flags`

- VUID-VkFramebufferCreateInfo-samples-07009
  If multisampled-render-to-single-sampled is enabled for any subpass, all color, depth/stencil, and input attachments used in that subpass which have `VkAttachmentDescription`::`samples` or `VkAttachmentDescription2`::`samples` equal to VK_SAMPLE_COUNT_1_BIT must have a format that supports the sample count specified in VkMultisampledRenderToSingleSampledInfoEXT::`rasterizationSamples`

- VUID-VkFramebufferCreateInfo-nullColorAttachmentWithExternalFormatResolve-09349
  If the `nullColorAttachmentWithExternalFormatResolve` is VK_FALSE, and `flags` does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, the format of the color attachment for each subpass in `renderPass` that includes an external format image as a resolve attachment must have a format equal to the value of VkAndroidHardwareBufferFormatResolvePropertiesANDROID::`colorAttachmentFormat` as returned by a call to vkGetAndroidHardwareBufferPropertiesANDROID for the Android hardware buffer that was used to create the image view use as its resolve attachment

- VUID-VkFramebufferCreateInfo-pAttachments-09350
  If `flags` does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, then if an element of `pAttachments` has a format of VK_FORMAT_UNDEFINED, it must have been created with a VkExternalFormatANDROID::`externalFormat` value identical to that provided in the VkExternalFormatANDROID::`externalFormat` specified by the corresponding VkAttachmentDescription2 in `renderPass`

Valid Usage (Implicit)

- VUID-VkFramebufferCreateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO

- VUID-VkFramebufferCreateInfo-pNext-pNext
  `pNext` must be `NULL` or a pointer to a valid instance of VkFramebufferAttachmentsCreateInfo

- VUID-VkFramebufferCreateInfo-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkFramebufferCreateInfo-flags-parameter
  `flags` must be a valid combination of VkFramebufferCreateFlagBits values

- VUID-VkFramebufferCreateInfo-renderPass-parameter
  `renderPass` must be a valid VkRenderPass handle

- VUID-VkFramebufferCreateInfo-commonparent
  Both of `renderPass`, and the elements of `pAttachments` that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevice

The `VkFramebufferAttachmentsCreateInfo` structure is defined as:

Warning | This functionality is superseded by Vulkan Version 1.4. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_2
    typedef struct VkFramebufferAttachmentsCreateInfo {
        VkStructureType                            sType;
        const void*                                pNext;
        uint32_t                                   attachmentImageInfoCount;
        const VkFramebufferAttachmentImageInfo*    pAttachmentImageInfos;
    } VkFramebufferAttachmentsCreateInfo;

    // Provided by VK_KHR_imageless_framebuffer
    // Equivalent to VkFramebufferAttachmentsCreateInfo
    typedef VkFramebufferAttachmentsCreateInfo VkFramebufferAttachmentsCreateInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `attachmentImageInfoCount` is the number of attachments being described.

- `pAttachmentImageInfos` is a pointer to an array of VkFramebufferAttachmentImageInfo structures, each structure describing a number of parameters of the corresponding attachment in a render pass instance.

Valid Usage (Implicit)

- VUID-VkFramebufferAttachmentsCreateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENTS_CREATE_INFO

- VUID-VkFramebufferAttachmentsCreateInfo-pAttachmentImageInfos-parameter
  If `attachmentImageInfoCount` is not `0`, `pAttachmentImageInfos` must be a valid pointer to an array of `attachmentImageInfoCount` valid VkFramebufferAttachmentImageInfo structures

Structure Chaining

Extends the structure

  - VkFramebufferCreateInfo

The `VkFramebufferAttachmentImageInfo` structure is defined as:

Warning | This functionality is superseded by Vulkan Version 1.4. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_2
    typedef struct VkFramebufferAttachmentImageInfo {
        VkStructureType       sType;
        const void*           pNext;
        VkImageCreateFlags    flags;
        VkImageUsageFlags     usage;
        uint32_t              width;
        uint32_t              height;
        uint32_t              layerCount;
        uint32_t              viewFormatCount;
        const VkFormat*       pViewFormats;
    } VkFramebufferAttachmentImageInfo;

    // Provided by VK_KHR_imageless_framebuffer
    // Equivalent to VkFramebufferAttachmentImageInfo
    typedef VkFramebufferAttachmentImageInfo VkFramebufferAttachmentImageInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask of VkImageCreateFlagBits, matching the value of VkImageCreateInfo::`flags` used to create an image that will be used with this framebuffer.

- `usage` is a bitmask of VkImageUsageFlagBits, matching the value of VkImageCreateInfo::`usage` used to create an image used with this framebuffer.

- `width` is the width of the image view used for rendering.

- `height` is the height of the image view used for rendering.

- `layerCount` is the number of array layers of the image view used for rendering.

- `viewFormatCount` is the number of entries in the `pViewFormats` array, matching the value of VkImageFormatListCreateInfo::`viewFormatCount` used to create an image used with this framebuffer.

- `pViewFormats` is a pointer to an array of VkFormat values specifying all of the formats which can be used when creating views of the image, matching the value of VkImageFormatListCreateInfo::`pViewFormats` used to create an image used with this framebuffer.

`flags` defines the effective create flags for the image. If the `pNext` chain includes a VkImageCreateFlags2CreateInfoKHR structure, `flags` is ignored, and the effective create flags are defined by VkImageCreateFlags2CreateInfoKHR::`flags`.

`usage` defines the effective usage flags for the image. If the `pNext` chain includes a VkImageUsageFlags2CreateInfoKHR structure, `usage` is ignored, and the effective usage flags are defined by VkImageUsageFlags2CreateInfoKHR::`flags`.

Images that can be used with the framebuffer when beginning a render pass, as specified by VkRenderPassAttachmentBeginInfo, must be created with parameters that are identical to those specified here.

Valid Usage

- VUID-VkFramebufferAttachmentImageInfo-viewFormatCount-09536
  If `viewFormatCount` is not 0, and the render pass is not being used with an external format resolve attachment, each element of `pViewFormats` must not be VK_FORMAT_UNDEFINED

Valid Usage (Implicit)

- VUID-VkFramebufferAttachmentImageInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENT_IMAGE_INFO

- VUID-VkFramebufferAttachmentImageInfo-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkImageCreateFlags2CreateInfoKHR or VkImageUsageFlags2CreateInfoKHR

- VUID-VkFramebufferAttachmentImageInfo-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkFramebufferAttachmentImageInfo-flags-parameter
  `flags` must be a valid combination of VkImageCreateFlagBits values

- VUID-VkFramebufferAttachmentImageInfo-usage-parameter
  `usage` must be a valid combination of VkImageUsageFlagBits values

- VUID-VkFramebufferAttachmentImageInfo-usage-requiredbitmask
  `usage` must not be `0`

- VUID-VkFramebufferAttachmentImageInfo-pViewFormats-parameter
  If `viewFormatCount` is not `0`, `pViewFormats` must be a valid pointer to an array of `viewFormatCount` valid VkFormat values

Bits which can be set in VkFramebufferCreateInfo::`flags`, specifying options for framebuffers, are:

Warning | This functionality is superseded by Vulkan Version 1.4. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_0
    typedef enum VkFramebufferCreateFlagBits {
      // Provided by VK_VERSION_1_2
        VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT = 0x00000001,
      // Provided by VK_KHR_imageless_framebuffer
        VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT_KHR = VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT,
    } VkFramebufferCreateFlagBits;

- VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT specifies that image views are not specified, and only attachment compatibility information will be provided via a VkFramebufferAttachmentImageInfo structure.

Warning | This functionality is superseded by Vulkan Version 1.4. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_0
    typedef VkFlags VkFramebufferCreateFlags;

`VkFramebufferCreateFlags` is a bitmask type for setting a mask of zero or more VkFramebufferCreateFlagBits.

To destroy a framebuffer, call:

Warning | This functionality is superseded by Vulkan Version 1.4. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_0
    void vkDestroyFramebuffer(
        VkDevice                                    device,
        VkFramebuffer                               framebuffer,
        const VkAllocationCallbacks*                pAllocator);

- `device` is the logical device that destroys the framebuffer.

- `framebuffer` is the handle of the framebuffer to destroy.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

Valid Usage

- VUID-vkDestroyFramebuffer-framebuffer-00892
  All submitted commands that refer to `framebuffer` must have completed execution

- VUID-vkDestroyFramebuffer-framebuffer-00893
  If `VkAllocationCallbacks` were provided when `framebuffer` was created, a compatible set of callbacks must be provided here

- VUID-vkDestroyFramebuffer-framebuffer-00894
  If no `VkAllocationCallbacks` were provided when `framebuffer` was created, `pAllocator` must be `NULL`

Valid Usage (Implicit)

- VUID-vkDestroyFramebuffer-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkDestroyFramebuffer-framebuffer-parameter
  If `framebuffer` is not VK_NULL_HANDLE, `framebuffer` must be a valid VkFramebuffer handle

- VUID-vkDestroyFramebuffer-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkDestroyFramebuffer-framebuffer-parent
  If `framebuffer` is a valid handle, it must have been created, allocated, or retrieved from `device`

Host Synchronization

- Host access to `framebuffer` must be externally synchronized

### 8.5. Render Pass Load Operations

Render pass load operations define the initial values of an attachment during a render pass instance.

Load operations for attachments with a depth/stencil format execute in the VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT pipeline stage. Load operations for attachments with a color format execute in the VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT pipeline stage. The load operation for each sample in an attachment happens-before any recorded command which accesses the sample in that render pass instance via that attachment or an alias. In a render pass object with multiple subpasses, load operations are performed in the first subpass which uses an attachment.

Note | Because load operations always happen first, external synchronization with attachment access only needs to synchronize the load operations with previous commands; not the operations within the render pass instance. This does not apply when using VK_ATTACHMENT_LOAD_OP_NONE.

Load operations only update values within the defined render area for the render pass instance. However, any writes performed by a load operation (as defined by its access masks) to a given attachment may read and write back any memory locations within the image subresource bound for that attachment. For depth/stencil images, if the maintenance7 feature is not enabled or `separateDepthStencilAttachmentAccess` is VK_FALSE, writes to one aspect may also result in read-modify-write operations for the other aspect. If the subresource is bound to an attachment with feedback loop enabled, implementations must not access pixels outside of the render area.

Note | As entire subresources could be accessed by load operations, applications cannot safely access values outside of the render area during a render pass instance when a load operation that modifies values is used.

Load operations that can be used for a render pass are:

    // Provided by VK_VERSION_1_0
    typedef enum VkAttachmentLoadOp {
        VK_ATTACHMENT_LOAD_OP_LOAD = 0,
        VK_ATTACHMENT_LOAD_OP_CLEAR = 1,
        VK_ATTACHMENT_LOAD_OP_DONT_CARE = 2,
      // Provided by VK_VERSION_1_4
        VK_ATTACHMENT_LOAD_OP_NONE = 1000400000,
      // Provided by VK_EXT_load_store_op_none
        VK_ATTACHMENT_LOAD_OP_NONE_EXT = VK_ATTACHMENT_LOAD_OP_NONE,
      // Provided by VK_KHR_load_store_op_none
        VK_ATTACHMENT_LOAD_OP_NONE_KHR = VK_ATTACHMENT_LOAD_OP_NONE,
    } VkAttachmentLoadOp;

- VK_ATTACHMENT_LOAD_OP_LOAD specifies that the previous contents of the image within the render area will be preserved as the initial values. For attachments with a depth/stencil format, this uses the access type VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT. For attachments with a color format, this uses the access type VK_ACCESS_COLOR_ATTACHMENT_READ_BIT.

- VK_ATTACHMENT_LOAD_OP_CLEAR specifies that the contents within the render area will be cleared to a uniform value, which is specified when a render pass instance is begun. For attachments with a depth/stencil format, this uses the access type VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT. For attachments with a color format, this uses the access type VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT.

- VK_ATTACHMENT_LOAD_OP_DONT_CARE specifies that the previous contents within the area need not be preserved; the contents of the attachment will be undefined inside the render area. For attachments with a depth/stencil format, this uses the access type VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT. For attachments with a color format, this uses the access type VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT.

- VK_ATTACHMENT_LOAD_OP_NONE specifies that the previous contents of the image will be undefined inside the render pass. No access type is used as the image is not accessed.

During a render pass instance, input and color attachments with color formats that have a component size of 8, 16, or 32 bits must be represented in the attachment’s format throughout the instance. Attachments with other floating- or fixed-point color formats, or with depth components may be represented in a format with a precision higher than the attachment format, but must be represented with the same range. When such a component is loaded via the `loadOp`, it will be converted into an implementation-dependent format used by the render pass. Such components must be converted from the render pass format, to the format of the attachment, before they are resolved or stored at the end of a render pass instance via `storeOp`. Conversions occur as described in Numeric Representation and Computation and Fixed-Point Data Conversions.

### 8.6. Render Pass Store Operations

Render pass store operations define how values written to an attachment during a render pass instance are stored to memory.

Store operations for attachments with a depth/stencil format execute in the VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT pipeline stage. Store operations for attachments with a color format execute in the VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT pipeline stage. The store operation for each sample in an attachment happens-after any recorded command which accesses the sample via that attachment or an alias. In a render pass object with multiple subpasses, store operations are performed in the last subpass which uses an attachment.

Note | Because store operations always happen after other accesses in a render pass instance, external synchronization with attachment access in an earlier render pass only needs to synchronize with the store operations; not the operations within the render pass instance. This does not apply when using VK_ATTACHMENT_STORE_OP_NONE.

Store operations only update values within the defined render area for the render pass instance. However, any writes performed by a store operation (as defined by its access masks) to a given attachment may read and write back any memory locations within the image subresource bound for that attachment. For depth/stencil images, if `separateDepthStencilAttachmentAccess` is VK_FALSE, writes to one aspect may also result in read-modify-write operations for the other aspect. If the subresource is bound to an attachment with feedback loop enabled, implementations must not access pixels outside of the render area.

Note | As entire subresources could be accessed by store operations, applications cannot safely access values outside of the render area via aliased resources during a render pass instance when a store operation that modifies values is used.

Possible values of VkAttachmentDescription::`storeOp` and `stencilStoreOp`, specifying how the contents of the attachment are treated, are:

    // Provided by VK_VERSION_1_0
    typedef enum VkAttachmentStoreOp {
        VK_ATTACHMENT_STORE_OP_STORE = 0,
        VK_ATTACHMENT_STORE_OP_DONT_CARE = 1,
      // Provided by VK_VERSION_1_3
        VK_ATTACHMENT_STORE_OP_NONE = 1000301000,
      // Provided by VK_KHR_dynamic_rendering, VK_KHR_load_store_op_none
        VK_ATTACHMENT_STORE_OP_NONE_KHR = VK_ATTACHMENT_STORE_OP_NONE,
      // Provided by VK_QCOM_render_pass_store_ops
        VK_ATTACHMENT_STORE_OP_NONE_QCOM = VK_ATTACHMENT_STORE_OP_NONE,
      // Provided by VK_EXT_load_store_op_none
        VK_ATTACHMENT_STORE_OP_NONE_EXT = VK_ATTACHMENT_STORE_OP_NONE,
    } VkAttachmentStoreOp;

- VK_ATTACHMENT_STORE_OP_STORE specifies the contents generated during the render pass and within the render area are written to memory. For attachments with a depth/stencil format, this uses the access type VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT. For attachments with a color format, this uses the access type VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT.

- VK_ATTACHMENT_STORE_OP_DONT_CARE specifies the contents within the render area are not needed after rendering, and may be discarded; the contents of the attachment will be undefined inside the render area. For attachments with a depth/stencil format, this uses the access type VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT. For attachments with a color format, this uses the access type VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT.

- VK_ATTACHMENT_STORE_OP_NONE specifies the contents within the render area are not accessed by the store operation as long as no values are written to the attachment during the render pass. If values are written during the render pass, this behaves identically to VK_ATTACHMENT_STORE_OP_DONT_CARE and with matching access semantics.

Note | VK_ATTACHMENT_STORE_OP_DONT_CARE can cause contents generated during previous render passes to be discarded before reaching memory, even if no write to the attachment occurs during the current render pass.

### 8.7. Render Pass Multisample Resolve Operations

Fixed-function render pass multisample resolve operations combine sample values from a single pixel in a multisample attachment and store the result to the corresponding pixel in a single sample attachment.

Note | Because VK_RESOLVE_MODE_CUSTOM_BIT_EXT specifies that the attachment will be resolved by shaders in the render pass instead of fixed-function operations, resolve operations with VK_RESOLVE_MODE_CUSTOM_BIT_EXT do not count as fixed-function multisample resolve operations.

Fixed-function multisample resolve operations for attachments execute in the VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT pipeline stage. A final resolve operation for all pixels in the render area happens-after any recorded command which writes a pixel via the multisample attachment to be resolved or an explicit alias of it in the subpass that it is specified. Any single sample attachment specified for use in a fixed-function multisample resolve operation may have its contents modified at any point once rendering begins for the render pass instance. Reads from the multisample attachment can be synchronized with VK_ACCESS_COLOR_ATTACHMENT_READ_BIT. Access to the single sample attachment can be synchronized with VK_ACCESS_COLOR_ATTACHMENT_READ_BIT and VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT. These pipeline stage and access types are used whether the attachments are color or depth/stencil attachments.

When using render pass objects, a subpass dependency specified with the above pipeline stages and access flags will ensure synchronization with fixed-function multisample resolve operations for any attachments that were last accessed by that subpass. This allows later subpasses to read resolved values as input attachments.

Fixed-function resolve operations only update values within the defined render area for the render pass instance. However, any writes performed by a resolve operation (as defined by its access masks) to a given attachment may read and write back any memory locations within the image subresource bound for that attachment. For depth/stencil images, if `separateDepthStencilAttachmentAccess` is VK_FALSE, writes to one aspect may also result in read-modify-write operations for the other aspect. If the subresource is bound to an attachment with feedback loop enabled, implementations must not access pixels outside of the render area.

Note | As entire subresources could be accessed by fixed-function multisample resolve operations, applications cannot safely access values outside of the render area via aliased resources during a render pass instance when a multisample resolve operation is performed.

Multisample values in a multisample attachment are combined according to the resolve mode used:

    // Provided by VK_VERSION_1_2
    typedef enum VkResolveModeFlagBits {
        VK_RESOLVE_MODE_NONE = 0,
        VK_RESOLVE_MODE_SAMPLE_ZERO_BIT = 0x00000001,
        VK_RESOLVE_MODE_AVERAGE_BIT = 0x00000002,
        VK_RESOLVE_MODE_MIN_BIT = 0x00000004,
        VK_RESOLVE_MODE_MAX_BIT = 0x00000008,
      // Provided by VK_ANDROID_external_format_resolve with VK_KHR_dynamic_rendering or VK_VERSION_1_3
        VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID = 0x00000010,
      // Provided by VK_EXT_custom_resolve with VK_KHR_dynamic_rendering or VK_VERSION_1_3
        VK_RESOLVE_MODE_CUSTOM_BIT_EXT = 0x00000020,
      // Provided by VK_KHR_depth_stencil_resolve
        VK_RESOLVE_MODE_NONE_KHR = VK_RESOLVE_MODE_NONE,
      // Provided by VK_KHR_depth_stencil_resolve
        VK_RESOLVE_MODE_SAMPLE_ZERO_BIT_KHR = VK_RESOLVE_MODE_SAMPLE_ZERO_BIT,
      // Provided by VK_KHR_depth_stencil_resolve
        VK_RESOLVE_MODE_AVERAGE_BIT_KHR = VK_RESOLVE_MODE_AVERAGE_BIT,
      // Provided by VK_KHR_depth_stencil_resolve
        VK_RESOLVE_MODE_MIN_BIT_KHR = VK_RESOLVE_MODE_MIN_BIT,
      // Provided by VK_KHR_depth_stencil_resolve
        VK_RESOLVE_MODE_MAX_BIT_KHR = VK_RESOLVE_MODE_MAX_BIT,
      // Provided by VK_ANDROID_external_format_resolve with VK_KHR_dynamic_rendering or VK_VERSION_1_3
      // VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_ANDROID is a legacy alias
        VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_ANDROID = VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID,
    } VkResolveModeFlagBits;

    // Provided by VK_KHR_depth_stencil_resolve
    // Equivalent to VkResolveModeFlagBits
    typedef VkResolveModeFlagBits VkResolveModeFlagBitsKHR;

- VK_RESOLVE_MODE_NONE specifies that no resolve operation is done.

- VK_RESOLVE_MODE_SAMPLE_ZERO_BIT specifies that result of the resolve operation is equal to the value of sample 0.

- VK_RESOLVE_MODE_AVERAGE_BIT specifies that result of the resolve operation is the average of the sample values.

- VK_RESOLVE_MODE_MIN_BIT specifies that result of the resolve operation is the minimum of the sample values.

- VK_RESOLVE_MODE_MAX_BIT specifies that result of the resolve operation is the maximum of the sample values.

- VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID specifies that rather than a multisample resolve, a single sampled color attachment will be downsampled into a Y′CBCR format image specified by an external Android format. Unlike other resolve modes, implementations can resolve multiple times during rendering, or even bypass writing to the color attachment altogether, as long as the final value is resolved to the resolve attachment. Values in the G, B, and R channels of the color attachment will be written to the Y, CB, and CR channels of the external format image, respectively. Chroma values are calculated as if sampling with a linear filter from the color attachment at full rate, at the location the chroma values sit according to VkPhysicalDeviceExternalFormatResolvePropertiesANDROID::`externalFormatResolveChromaOffsetX`, VkPhysicalDeviceExternalFormatResolvePropertiesANDROID::`externalFormatResolveChromaOffsetY`, and the chroma sample rate of the resolved image.

- VK_RESOLVE_MODE_CUSTOM_BIT_EXT specifies that the attachment will be resolved by shaders in the render pass instead of fixed-function operations.

If no resolve mode is otherwise specified, VK_RESOLVE_MODE_AVERAGE_BIT is used.

If VK_RESOLVE_MODE_AVERAGE_BIT is used, and the source format is a floating-point or normalized type, the sample values for each pixel are resolved with implementation-defined numerical precision.

If the numeric format of the resolve attachment uses sRGB encoding, the implementation should convert samples from nonlinear to linear before averaging samples as described in the “sRGB EOTF” section of the Khronos Data Format Specification. In this case, the implementation must convert the linear averaged value to nonlinear before writing the resolved result to resolve attachment. If the `maintenance10` feature is enabled, whether a nonlinear to linear conversion happens for sRGB resolve is defined by `resolveSrgbFormatAppliesTransferFunction`. This behavior can be overridden with appropriate `VK_*`RESOLVE{SKIP,ENABLE}_TRANSFER_FUNCTION_BIT_KHR flag usage.

Note | No range compression or Y′CBCR model conversion is performed by VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID; applications have to do these conversions themselves. Value outputs are expected to match those that would be read through a Y′CBCR sampler using VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY. The color space that the values should be in is defined by the platform and is not exposed via Vulkan.

    // Provided by VK_VERSION_1_2
    typedef VkFlags VkResolveModeFlags;

    // Provided by VK_KHR_depth_stencil_resolve
    // Equivalent to VkResolveModeFlags
    typedef VkResolveModeFlags VkResolveModeFlagsKHR;

`VkResolveModeFlags` is a bitmask type for setting a mask of zero or more VkResolveModeFlagBits.

### 8.8. Render Pass Commands

An application records the commands for a render pass instance one subpass at a time, by beginning a render pass instance, iterating over the subpasses to record commands for that subpass, and then ending the render pass instance.

To begin a render pass instance, call:

Warning | This functionality is superseded by vkCmdBeginRenderPass2. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_0
    void vkCmdBeginRenderPass(
        VkCommandBuffer                             commandBuffer,
        const VkRenderPassBeginInfo*                pRenderPassBegin,
        VkSubpassContents                           contents);

- `commandBuffer` is the command buffer in which to record the command.

- `pRenderPassBegin` is a pointer to a VkRenderPassBeginInfo structure specifying the render pass to begin an instance of, and the framebuffer the instance uses.

- `contents` is a VkSubpassContents value specifying how the commands in the first subpass will be provided.

After beginning a render pass instance, the command buffer is ready to record the commands for the first subpass of that render pass.

Valid Usage

- VUID-vkCmdBeginRenderPass-initialLayout-00895
  If any of the `initialLayout` or `finalLayout` member of the `VkAttachmentDescription` structures or the `layout` member of the `VkAttachmentReference` structures specified when creating the render pass specified in the `renderPass` member of `pRenderPassBegin` is VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL then the corresponding attachment image view of the framebuffer specified in the `framebuffer` member of `pRenderPassBegin` must have been created with the VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT usage flag set

- VUID-vkCmdBeginRenderPass-initialLayout-01758
  If any of the `initialLayout` or `finalLayout` member of the `VkAttachmentDescription` structures or the `layout` member of the `VkAttachmentReference` structures specified when creating the render pass specified in the `renderPass` member of `pRenderPassBegin` is VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL, VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL, VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL, or VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL then the corresponding attachment image view of the framebuffer specified in the `framebuffer` member of `pRenderPassBegin` must have been created with the VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT usage flag set

- VUID-vkCmdBeginRenderPass-initialLayout-02842
  If any of the `initialLayout` or `finalLayout` member of the `VkAttachmentDescription` structures or the `layout` member of the `VkAttachmentReference` structures specified when creating the render pass specified in the `renderPass` member of `pRenderPassBegin` is VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL, or VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL, or VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL then the corresponding attachment image view of the framebuffer specified in the `framebuffer` member of `pRenderPassBegin` must have been created with the VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT usage flag set

- VUID-vkCmdBeginRenderPass-stencilInitialLayout-02843
  If any of the `stencilInitialLayout` or `stencilFinalLayout` member of the `VkAttachmentDescriptionStencilLayout` structures or the `stencilLayout` member of the `VkAttachmentReferenceStencilLayout` structures specified when creating the render pass specified in the `renderPass` member of `pRenderPassBegin` is VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL, or VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL then the corresponding attachment image view of the framebuffer specified in the `framebuffer` member of `pRenderPassBegin` must have been created with the VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT usage flag set

- VUID-vkCmdBeginRenderPass-initialLayout-00897
  If any of the `initialLayout` or `finalLayout` member of the `VkAttachmentDescription` structures or the `layout` member of the `VkAttachmentReference` structures specified when creating the render pass specified in the `renderPass` member of `pRenderPassBegin` is VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL then the corresponding attachment image view of the framebuffer specified in the `framebuffer` member of `pRenderPassBegin` must have been created with the VK_IMAGE_USAGE_SAMPLED_BIT or VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT usage flags set

- VUID-vkCmdBeginRenderPass-initialLayout-00898
  If any of the `initialLayout` or `finalLayout` member of the `VkAttachmentDescription` structures or the `layout` member of the `VkAttachmentReference` structures specified when creating the render pass specified in the `renderPass` member of `pRenderPassBegin` is VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL then the corresponding attachment image view of the framebuffer specified in the `framebuffer` member of `pRenderPassBegin` must have been created with the VK_IMAGE_USAGE_TRANSFER_SRC_BIT usage flag set

- VUID-vkCmdBeginRenderPass-initialLayout-00899
  If any of the `initialLayout` or `finalLayout` member of the `VkAttachmentDescription` structures or the `layout` member of the `VkAttachmentReference` structures specified when creating the render pass specified in the `renderPass` member of `pRenderPassBegin` is VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL then the corresponding attachment image view of the framebuffer specified in the `framebuffer` member of `pRenderPassBegin` must have been created with the VK_IMAGE_USAGE_TRANSFER_DST_BIT usage flag set

- VUID-vkCmdBeginRenderPass-initialLayout-00900
  If the `initialLayout` member of any of the `VkAttachmentDescription` structures specified when creating the render pass specified in the `renderPass` member of `pRenderPassBegin` is not VK_IMAGE_LAYOUT_UNDEFINED, then each such `initialLayout` must be equal to the current layout of the corresponding attachment image subresource of the framebuffer specified in the `framebuffer` member of `pRenderPassBegin`

- VUID-vkCmdBeginRenderPass-srcStageMask-06451
  The `srcStageMask` members of any element of the `pDependencies` member of VkRenderPassCreateInfo used to create `renderPass` must be supported by the capabilities of the queue family identified by the `queueFamilyIndex` member of the VkCommandPoolCreateInfo used to create the command pool which `commandBuffer` was allocated from

- VUID-vkCmdBeginRenderPass-dstStageMask-06452
  The `dstStageMask` members of any element of the `pDependencies` member of VkRenderPassCreateInfo used to create `renderPass` must be supported by the capabilities of the queue family identified by the `queueFamilyIndex` member of the VkCommandPoolCreateInfo used to create the command pool which `commandBuffer` was allocated from

- VUID-vkCmdBeginRenderPass-framebuffer-02532
  For any attachment in `framebuffer` that is used by `renderPass` and is bound to memory locations that are also bound to another attachment used by `renderPass`, and if at least one of those uses causes either attachment to be written to, both attachments must have had the VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT set

- VUID-vkCmdBeginRenderPass-framebuffer-09045
  If any attachments specified in `framebuffer` are used by `renderPass` and are bound to overlapping memory locations, there must be only one that is used as a color attachment, depth/stencil, or resolve attachment in any subpass

- VUID-vkCmdBeginRenderPass-initialLayout-07000
  If any of the `initialLayout` or `finalLayout` member of the `VkAttachmentDescription` structures or the `layout` member of the `VkAttachmentReference` structures specified when creating the render pass specified in the `renderPass` member of `pRenderPassBegin` is VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT then the corresponding attachment image view of the framebuffer specified in the `framebuffer` member of `pRenderPassBegin` must have been created with either the VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT or VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT usage flags set, and either the VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT or VK_IMAGE_USAGE_SAMPLED_BIT usage flags set

- VUID-vkCmdBeginRenderPass-initialLayout-07001
  If any of the `initialLayout` or `finalLayout` member of the `VkAttachmentDescription` structures or the `layout` member of the `VkAttachmentReference` structures specified when creating the render pass specified in the `renderPass` member of `pRenderPassBegin` is VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT then the corresponding attachment image view of the framebuffer specified in the `framebuffer` member of `pRenderPassBegin` must have been created with the VK_IMAGE_USAGE_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT usage flag set

- VUID-vkCmdBeginRenderPass-initialLayout-09537
  If any of the `initialLayout` or `finalLayout` member of the `VkAttachmentDescription` structures or the `layout` member of the `VkAttachmentReference` structures specified when creating the render pass specified in the `renderPass` member of `pRenderPassBegin` is VK_IMAGE_LAYOUT_RENDERING_LOCAL_READ then the corresponding attachment image view of the framebuffer specified in the `framebuffer` member of `pRenderPassBegin` must have been created with either the VK_IMAGE_USAGE_STORAGE_BIT usage flag set, or both the VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT and either of VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT or VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT usage flags set

- VUID-vkCmdBeginRenderPass-contents-09640
  If `contents` is VK_SUBPASS_CONTENTS_INLINE_AND_SECONDARY_COMMAND_BUFFERS_KHR, then at least one of the following features must be enabled:

  - `maintenance7`

  - `nestedCommandBuffer`

Valid Usage (Implicit)

- VUID-vkCmdBeginRenderPass-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdBeginRenderPass-pRenderPassBegin-parameter
  `pRenderPassBegin` must be a valid pointer to a valid VkRenderPassBeginInfo structure

- VUID-vkCmdBeginRenderPass-contents-parameter
  `contents` must be a valid VkSubpassContents value

- VUID-vkCmdBeginRenderPass-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdBeginRenderPass-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdBeginRenderPass-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdBeginRenderPass-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdBeginRenderPass-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdBeginRenderPass-bufferlevel
  `commandBuffer` must be a primary `VkCommandBuffer`

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary | Outside | Outside | VK_QUEUE_GRAPHICS_BIT | Action State Synchronization

Conditional Rendering

vkCmdBeginRenderPass is not affected by conditional rendering

To begin a render pass, call:

Warning | This functionality is superseded by Vulkan Version 1.4. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_2
    void vkCmdBeginRenderPass2(
        VkCommandBuffer                             commandBuffer,
        const VkRenderPassBeginInfo*                pRenderPassBegin,
        const VkSubpassBeginInfo*                   pSubpassBeginInfo);

    // Provided by VK_KHR_create_renderpass2
    // Equivalent to vkCmdBeginRenderPass2
    void vkCmdBeginRenderPass2KHR(
        VkCommandBuffer                             commandBuffer,
        const VkRenderPassBeginInfo*                pRenderPassBegin,
        const VkSubpassBeginInfo*                   pSubpassBeginInfo);

- `commandBuffer` is the command buffer in which to record the command.

- `pRenderPassBegin` is a pointer to a VkRenderPassBeginInfo structure specifying the render pass to begin an instance of, and the framebuffer the instance uses. After recording this command, the render pass and framebuffer may be accessed at any point that `commandBuffer` is in the recording or pending state until it is reset.

- `pSubpassBeginInfo` is a pointer to a VkSubpassBeginInfo structure containing information about the subpass which is about to begin rendering.

After beginning a render pass instance, the command buffer is ready to record the commands for the first subpass of that render pass.

Valid Usage

- VUID-vkCmdBeginRenderPass2-framebuffer-02779
  Both the `framebuffer` and `renderPass` members of `pRenderPassBegin` must have been created on the same VkDevice that `commandBuffer` was allocated on

- VUID-vkCmdBeginRenderPass2-initialLayout-03094
  If any of the `initialLayout` or `finalLayout` member of the `VkAttachmentDescription` structures or the `layout` member of the `VkAttachmentReference` structures specified when creating the render pass specified in the `renderPass` member of `pRenderPassBegin` is VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL then the corresponding attachment image view of the framebuffer specified in the `framebuffer` member of `pRenderPassBegin` must have been created with the VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT usage flag set

- VUID-vkCmdBeginRenderPass2-initialLayout-03096
  If any of the `initialLayout` or `finalLayout` member of the `VkAttachmentDescription` structures or the `layout` member of the `VkAttachmentReference` structures specified when creating the render pass specified in the `renderPass` member of `pRenderPassBegin` is VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL, VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL, VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL, or VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL then the corresponding attachment image view of the framebuffer specified in the `framebuffer` member of `pRenderPassBegin` must have been created with the VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT usage flag set

- VUID-vkCmdBeginRenderPass2-initialLayout-02844
  If any of the `initialLayout` or `finalLayout` member of the `VkAttachmentDescription` structures or the `layout` member of the `VkAttachmentReference` structures specified when creating the render pass specified in the `renderPass` member of `pRenderPassBegin` is VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL, or VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL, or VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL then the corresponding attachment image view of the framebuffer specified in the `framebuffer` member of `pRenderPassBegin` must have been created with the VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT usage flag set

- VUID-vkCmdBeginRenderPass2-stencilInitialLayout-02845
  If any of the `stencilInitialLayout` or `stencilFinalLayout` member of the `VkAttachmentDescriptionStencilLayout` structures or the `stencilLayout` member of the `VkAttachmentReferenceStencilLayout` structures specified when creating the render pass specified in the `renderPass` member of `pRenderPassBegin` is VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL, or VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL then the corresponding attachment image view of the framebuffer specified in the `framebuffer` member of `pRenderPassBegin` must have been created with the VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT usage flag set

- VUID-vkCmdBeginRenderPass2-initialLayout-03097
  If any of the `initialLayout` or `finalLayout` member of the `VkAttachmentDescription` structures or the `layout` member of the `VkAttachmentReference` structures specified when creating the render pass specified in the `renderPass` member of `pRenderPassBegin` is VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL then the corresponding attachment image view of the framebuffer specified in the `framebuffer` member of `pRenderPassBegin` must have been created with the VK_IMAGE_USAGE_SAMPLED_BIT or VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT usage flags set

- VUID-vkCmdBeginRenderPass2-initialLayout-03098
  If any of the `initialLayout` or `finalLayout` member of the `VkAttachmentDescription` structures or the `layout` member of the `VkAttachmentReference` structures specified when creating the render pass specified in the `renderPass` member of `pRenderPassBegin` is VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL then the corresponding attachment image view of the framebuffer specified in the `framebuffer` member of `pRenderPassBegin` must have been created with the VK_IMAGE_USAGE_TRANSFER_SRC_BIT usage flag set

- VUID-vkCmdBeginRenderPass2-initialLayout-03099
  If any of the `initialLayout` or `finalLayout` member of the `VkAttachmentDescription` structures or the `layout` member of the `VkAttachmentReference` structures specified when creating the render pass specified in the `renderPass` member of `pRenderPassBegin` is VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL then the corresponding attachment image view of the framebuffer specified in the `framebuffer` member of `pRenderPassBegin` must have been created with the VK_IMAGE_USAGE_TRANSFER_DST_BIT usage flag set

- VUID-vkCmdBeginRenderPass2-initialLayout-03100
  If the `initialLayout` member of any of the `VkAttachmentDescription` structures specified when creating the render pass specified in the `renderPass` member of `pRenderPassBegin` is not VK_IMAGE_LAYOUT_UNDEFINED, then each such `initialLayout` must be equal to the current layout of the corresponding attachment image subresource of the framebuffer specified in the `framebuffer` member of `pRenderPassBegin`

- VUID-vkCmdBeginRenderPass2-srcStageMask-06453
  The `srcStageMask` members of any element of the `pDependencies` member of VkRenderPassCreateInfo used to create `renderPass` must be supported by the capabilities of the queue family identified by the `queueFamilyIndex` member of the VkCommandPoolCreateInfo used to create the command pool which `commandBuffer` was allocated from

- VUID-vkCmdBeginRenderPass2-dstStageMask-06454
  The `dstStageMask` members of any element of the `pDependencies` member of VkRenderPassCreateInfo used to create `renderPass` must be supported by the capabilities of the queue family identified by the `queueFamilyIndex` member of the VkCommandPoolCreateInfo used to create the command pool which `commandBuffer` was allocated from

- VUID-vkCmdBeginRenderPass2-framebuffer-02533
  For any attachment in `framebuffer` that is used by `renderPass` and is bound to memory locations that are also bound to another attachment used by `renderPass`, and if at least one of those uses causes either attachment to be written to, both attachments must have had the VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT set

- VUID-vkCmdBeginRenderPass2-framebuffer-09046
  If any attachments specified in `framebuffer` are used by `renderPass` and are bound to overlapping memory locations, there must be only one that is used as a color attachment, depth/stencil, or resolve attachment in any subpass

- VUID-vkCmdBeginRenderPass2-initialLayout-07002
  If any of the `initialLayout` or `finalLayout` member of the `VkAttachmentDescription` structures or the `layout` member of the `VkAttachmentReference` structures specified when creating the render pass specified in the `renderPass` member of `pRenderPassBegin` is VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT then the corresponding attachment image view of the framebuffer specified in the `framebuffer` member of `pRenderPassBegin` must have been created with either the VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT or VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT usage flags set, and either the VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT or VK_IMAGE_USAGE_SAMPLED_BIT usage flags set

- VUID-vkCmdBeginRenderPass2-initialLayout-07003
  If any of the `initialLayout` or `finalLayout` member of the `VkAttachmentDescription` structures or the `layout` member of the `VkAttachmentReference` structures specified when creating the render pass specified in the `renderPass` member of `pRenderPassBegin` is VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT then the corresponding attachment image view of the framebuffer specified in the `framebuffer` member of `pRenderPassBegin` must have been created with the VK_IMAGE_USAGE_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT usage flag set

- VUID-vkCmdBeginRenderPass2-initialLayout-09538
  If any of the `initialLayout` or `finalLayout` member of the `VkAttachmentDescription` structures or the `layout` member of the `VkAttachmentReference` structures specified when creating the render pass specified in the `renderPass` member of `pRenderPassBegin` is VK_IMAGE_LAYOUT_RENDERING_LOCAL_READ then the corresponding attachment image view of the framebuffer specified in the `framebuffer` member of `pRenderPassBegin` must have been created with either the VK_IMAGE_USAGE_STORAGE_BIT usage flag set, or both the VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT and either of the VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT or VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT usage flags set

- VUID-vkCmdBeginRenderPass2-flags-10652
  If VK_TILE_SHADING_RENDER_PASS_ENABLE_BIT_QCOM was included in the VkRenderPassTileShadingCreateInfoQCOM::`flags` used to create the `renderPass`, `commandBuffer` must not have been recorded with VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT

Valid Usage (Implicit)

- VUID-vkCmdBeginRenderPass2-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdBeginRenderPass2-pRenderPassBegin-parameter
  `pRenderPassBegin` must be a valid pointer to a valid VkRenderPassBeginInfo structure

- VUID-vkCmdBeginRenderPass2-pSubpassBeginInfo-parameter
  `pSubpassBeginInfo` must be a valid pointer to a valid VkSubpassBeginInfo structure

- VUID-vkCmdBeginRenderPass2-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdBeginRenderPass2-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdBeginRenderPass2-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdBeginRenderPass2-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdBeginRenderPass2-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdBeginRenderPass2-bufferlevel
  `commandBuffer` must be a primary `VkCommandBuffer`

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary | Outside | Outside | VK_QUEUE_GRAPHICS_BIT | Action State Synchronization

Conditional Rendering

vkCmdBeginRenderPass2 is not affected by conditional rendering

The `VkRenderPassBeginInfo` structure is defined as:

Warning | This functionality is superseded by Vulkan Version 1.4. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_0
    typedef struct VkRenderPassBeginInfo {
        VkStructureType        sType;
        const void*            pNext;
        VkRenderPass           renderPass;
        VkFramebuffer          framebuffer;
        VkRect2D               renderArea;
        uint32_t               clearValueCount;
        const VkClearValue*    pClearValues;
    } VkRenderPassBeginInfo;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `renderPass` is the render pass to begin an instance of.

- `framebuffer` is the framebuffer containing the attachments that are used with the render pass.

- `renderArea` is the render area that is affected by the render pass instance, and is described in more detail below.

- `clearValueCount` is the number of elements in `pClearValues`.

- `pClearValues` is a pointer to an array of `clearValueCount` VkClearValue structures containing clear values for each attachment, if the attachment uses a `loadOp` value of VK_ATTACHMENT_LOAD_OP_CLEAR or if the attachment has a depth/stencil format and uses a `stencilLoadOp` value of VK_ATTACHMENT_LOAD_OP_CLEAR. The array is indexed by attachment number. Only elements corresponding to cleared attachments are used. Other elements of `pClearValues` are ignored.

`renderArea` is the render area that is affected by the render pass instance. The effects of attachment load, store, and multisample resolve operations are restricted to the pixels whose x and y coordinates fall within the render area on all attachments. The render area extends to all layers of `framebuffer`. The application must ensure (using scissor if necessary) that all rendering is contained within the render area. The render area, after any transform specified by VkRenderPassTransformBeginInfoQCOM::`transform` is applied, must be contained within the framebuffer dimensions.

If render pass transform is enabled, then `renderArea` must equal the framebuffer pre-transformed dimensions. After `renderArea` has been transformed by VkRenderPassTransformBeginInfoQCOM::`transform`, the resulting render area must be equal to the framebuffer dimensions.

If multiview is enabled in `renderPass`, and `multiviewPerViewRenderAreas` feature is enabled, and there is an instance of VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM included in the `pNext` chain with `perViewRenderAreaCount` not equal to `0`, then the elements of VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM::`pPerViewRenderAreas` override `renderArea` and define a render area for each view. In this case, `renderArea` must be an area at least as large as the union of all the per-view render areas.

If the `subpassShading` feature is enabled, then `renderArea` must equal the framebuffer dimensions.

Note | There may be a performance cost for using a render area smaller than the framebuffer, unless it matches the render area granularity for the render pass.

Valid Usage

- VUID-VkRenderPassBeginInfo-clearValueCount-00902
  `clearValueCount` must be greater than the largest attachment index in `renderPass` specifying a `loadOp` (or `stencilLoadOp`, if the attachment has a depth/stencil format) of VK_ATTACHMENT_LOAD_OP_CLEAR

- VUID-VkRenderPassBeginInfo-clearValueCount-04962
  If `clearValueCount` is not `0`, `pClearValues` must be a valid pointer to an array of `clearValueCount` VkClearValue unions

- VUID-VkRenderPassBeginInfo-renderPass-00904
  `renderPass` must be compatible with the `renderPass` member of the VkFramebufferCreateInfo structure specified when creating `framebuffer`

- VUID-VkRenderPassBeginInfo-None-08996
  If the `pNext` chain does not contain VkDeviceGroupRenderPassBeginInfo or its `deviceRenderAreaCount` member is equal to 0, `renderArea.extent.width` must be greater than 0

- VUID-VkRenderPassBeginInfo-None-08997
  If the `pNext` chain does not contain VkDeviceGroupRenderPassBeginInfo or its `deviceRenderAreaCount` member is equal to 0, `renderArea.extent.height` must be greater than 0

- VUID-VkRenderPassBeginInfo-pNext-02850
  If the `pNext` chain does not contain VkDeviceGroupRenderPassBeginInfo or its `deviceRenderAreaCount` member is equal to 0, `renderArea.offset.x` must be greater than or equal to 0

- VUID-VkRenderPassBeginInfo-pNext-02851
  If the `pNext` chain does not contain VkDeviceGroupRenderPassBeginInfo or its `deviceRenderAreaCount` member is equal to 0, `renderArea.offset.y` must be greater than or equal to 0

- VUID-VkRenderPassBeginInfo-pNext-02852
  If the `pNext` chain does not contain VkDeviceGroupRenderPassBeginInfo or its `deviceRenderAreaCount` member is equal to 0, `renderArea.offset.x` + `renderArea.extent.width` must be less than or equal to VkFramebufferCreateInfo::`width` the `framebuffer` was created with

- VUID-VkRenderPassBeginInfo-pNext-02853
  If the `pNext` chain does not contain VkDeviceGroupRenderPassBeginInfo or its `deviceRenderAreaCount` member is equal to 0, `renderArea.offset.y` + `renderArea.extent.height` must be less than or equal to VkFramebufferCreateInfo::`height` the `framebuffer` was created with

- VUID-VkRenderPassBeginInfo-pNext-02856
  If the `pNext` chain contains VkDeviceGroupRenderPassBeginInfo, `offset.x` + `extent.width` of each element of `pDeviceRenderAreas` must be less than or equal to VkFramebufferCreateInfo::`width` the `framebuffer` was created with

- VUID-VkRenderPassBeginInfo-pNext-02857
  If the `pNext` chain contains VkDeviceGroupRenderPassBeginInfo, `offset.y` + `extent.height` of each element of `pDeviceRenderAreas` must be less than or equal to VkFramebufferCreateInfo::`height` the `framebuffer` was created with

- VUID-VkRenderPassBeginInfo-framebuffer-03207
  If `framebuffer` was created with a VkFramebufferCreateInfo::`flags` value that did not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, and the `pNext` chain includes a VkRenderPassAttachmentBeginInfo structure, its `attachmentCount` must be zero

- VUID-VkRenderPassBeginInfo-framebuffer-03208
  If `framebuffer` was created with a VkFramebufferCreateInfo::`flags` value that included VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, the `attachmentCount` of a VkRenderPassAttachmentBeginInfo structure included in the `pNext` chain must be equal to the value of VkFramebufferAttachmentsCreateInfo::`attachmentImageInfoCount` used to create `framebuffer`

- VUID-VkRenderPassBeginInfo-framebuffer-02780
  If `framebuffer` was created with a VkFramebufferCreateInfo::`flags` value that included VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of the `pAttachments` member of a VkRenderPassAttachmentBeginInfo structure included in the `pNext` chain must have been created on the same VkDevice as `framebuffer` and `renderPass`

- VUID-VkRenderPassBeginInfo-framebuffer-03209
  If `framebuffer` was created with a VkFramebufferCreateInfo::`flags` value that included VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of the `pAttachments` member of a VkRenderPassAttachmentBeginInfo structure included in the `pNext` chain must be a VkImageView of an image created with a value of VkImageCreateInfo::`flags` equal to the `flags` member of the corresponding element of VkFramebufferAttachmentsCreateInfo::`pAttachmentImageInfos` used to create `framebuffer`

- VUID-VkRenderPassBeginInfo-framebuffer-12328
  If `framebuffer` was created with a VkFramebufferCreateInfo::`flags` value that included VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each `pAttachments` member of VkRenderPassAttachmentBeginInfo that is used as a resolve attachment by `renderPass` must not be bound to a `VkDeviceMemory` object allocated from a `VkMemoryHeap` with the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property

- VUID-VkRenderPassBeginInfo-framebuffer-04627
  If `framebuffer` was created with a VkFramebufferCreateInfo::`flags` value that included VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of the `pAttachments` member of a VkRenderPassAttachmentBeginInfo structure included in the `pNext` chain must be a VkImageView with an inherited usage equal to the `usage` member of the corresponding element of VkFramebufferAttachmentsCreateInfo::`pAttachmentImageInfos` used to create `framebuffer`

- VUID-VkRenderPassBeginInfo-framebuffer-03211
  If `framebuffer` was created with a VkFramebufferCreateInfo::`flags` value that included VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of the `pAttachments` member of a VkRenderPassAttachmentBeginInfo structure included in the `pNext` chain must be a VkImageView with a width equal to the `width` member of the corresponding element of VkFramebufferAttachmentsCreateInfo::`pAttachmentImageInfos` used to create `framebuffer`

- VUID-VkRenderPassBeginInfo-framebuffer-03212
  If `framebuffer` was created with a VkFramebufferCreateInfo::`flags` value that included VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of the `pAttachments` member of a VkRenderPassAttachmentBeginInfo structure included in the `pNext` chain must be a VkImageView with a height equal to the `height` member of the corresponding element of VkFramebufferAttachmentsCreateInfo::`pAttachmentImageInfos` used to create `framebuffer`

- VUID-VkRenderPassBeginInfo-framebuffer-03213
  If `framebuffer` was created with a VkFramebufferCreateInfo::`flags` value that included VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of the `pAttachments` member of a VkRenderPassAttachmentBeginInfo structure included in the `pNext` chain must be a VkImageView of an image created with a value of VkImageViewCreateInfo::`subresourceRange.layerCount` equal to the `layerCount` member of the corresponding element of VkFramebufferAttachmentsCreateInfo::`pAttachmentImageInfos` used to create `framebuffer`

- VUID-VkRenderPassBeginInfo-framebuffer-03214
  If `framebuffer` was created with a VkFramebufferCreateInfo::`flags` value that included VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of the `pAttachments` member of a VkRenderPassAttachmentBeginInfo structure included in the `pNext` chain must be a VkImageView of an image created with a value of VkImageFormatListCreateInfo::`viewFormatCount` equal to the `viewFormatCount` member of the corresponding element of VkFramebufferAttachmentsCreateInfo::`pAttachmentImageInfos` used to create `framebuffer`

- VUID-VkRenderPassBeginInfo-framebuffer-03215
  If `framebuffer` was created with a VkFramebufferCreateInfo::`flags` value that included VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of the `pAttachments` member of a VkRenderPassAttachmentBeginInfo structure included in the `pNext` chain must be a VkImageView of an image created with a set of elements in VkImageFormatListCreateInfo::`pViewFormats` equal to the set of elements in the `pViewFormats` member of the corresponding element of VkFramebufferAttachmentsCreateInfo::`pAttachmentImageInfos` used to create `framebuffer`

- VUID-VkRenderPassBeginInfo-framebuffer-03216
  If `framebuffer` was created with a VkFramebufferCreateInfo::`flags` value that included VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of the `pAttachments` member of a VkRenderPassAttachmentBeginInfo structure included in the `pNext` chain must be a VkImageView of an image created with a value of VkImageViewCreateInfo::`format` equal to the corresponding value of VkAttachmentDescription::`format` in `renderPass`

- VUID-VkRenderPassBeginInfo-framebuffer-09353
  If `framebuffer` was created with a VkFramebufferCreateInfo::`flags` value that included VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, and the `nullColorAttachmentWithExternalFormatResolve` is VK_FALSE, the format of the color attachment for each subpass that includes an external format image as a resolve attachment must have a format equal to the value of VkAndroidHardwareBufferFormatResolvePropertiesANDROID::`colorAttachmentFormat` as returned by a call to vkGetAndroidHardwareBufferPropertiesANDROID for the Android hardware buffer that was used to create the image view use as its resolve attachment

- VUID-VkRenderPassBeginInfo-framebuffer-09354
  If `framebuffer` was created with a VkFramebufferCreateInfo::`flags` value that included VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of the `pAttachments` member of a VkRenderPassAttachmentBeginInfo structure included in the `pNext` chain must be a VkImageView of an image created with a value of VkExternalFormatANDROID::`externalFormat` equal to VkExternalFormatANDROID::`externalFormat` in the `pNext` chain of the corresponding VkAttachmentDescription2 structure used to create `renderPass`

- VUID-VkRenderPassBeginInfo-framebuffer-09047
  If `framebuffer` was created with a VkFramebufferCreateInfo::`flags` value that included VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of the `pAttachments` member of a VkRenderPassAttachmentBeginInfo structure included in the `pNext` chain must be a VkImageView of an image created with a value of VkImageCreateInfo::`samples` equal to the corresponding value of VkAttachmentDescription::`samples` in `renderPass` , or VK_SAMPLE_COUNT_1_BIT if `renderPass` was created with VkMultisampledRenderToSingleSampledInfoEXT structure in the `pNext` chain with `multisampledRenderToSingleSampledEnable` equal to VK_TRUE

- VUID-VkRenderPassBeginInfo-pNext-02869
  If the `pNext` chain includes VkRenderPassTransformBeginInfoQCOM, `renderArea.offset` must equal (0,0)

- VUID-VkRenderPassBeginInfo-pNext-02870
  If the `pNext` chain includes VkRenderPassTransformBeginInfoQCOM, `renderArea.extent` transformed by VkRenderPassTransformBeginInfoQCOM::`transform` must equal the `framebuffer` dimensions

- VUID-VkRenderPassBeginInfo-perViewRenderAreaCount-07859
  If the `perViewRenderAreaCount` member of a VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM structure included in the `pNext` chain is not `0`, then the `multiviewPerViewRenderAreas` feature must be enabled

- VUID-VkRenderPassBeginInfo-perViewRenderAreaCount-07860
  If the `perViewRenderAreaCount` member of a VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM structure included in the `pNext` chain is not `0`, then `renderArea` must specify a render area that includes the union of all per view render areas

- VUID-VkRenderPassBeginInfo-pNext-09539
  If the `pNext` chain contains a VkRenderPassStripeBeginInfoARM structure, the union of stripe areas defined by the elements of VkRenderPassStripeBeginInfoARM::`pStripeInfos` must cover the `renderArea`

Valid Usage (Implicit)

- VUID-VkRenderPassBeginInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO

- VUID-VkRenderPassBeginInfo-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkDeviceGroupRenderPassBeginInfo, VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM, VkRenderPassAttachmentBeginInfo, VkRenderPassPerformanceCountersByRegionBeginInfoARM, VkRenderPassSampleLocationsBeginInfoEXT, VkRenderPassStripeBeginInfoARM, or VkRenderPassTransformBeginInfoQCOM

- VUID-VkRenderPassBeginInfo-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkRenderPassBeginInfo-renderPass-parameter
  `renderPass` must be a valid VkRenderPass handle

- VUID-VkRenderPassBeginInfo-framebuffer-parameter
  `framebuffer` must be a valid VkFramebuffer handle

- VUID-VkRenderPassBeginInfo-commonparent
  Both of `framebuffer`, and `renderPass` must have been created, allocated, or retrieved from the same VkDevice

The image layout of the depth aspect of a depth/stencil attachment referring to an image created with VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT is dependent on the last sample locations used to render to the image subresource, thus preserving the contents of such depth/stencil attachments across subpass boundaries requires the application to specify these sample locations whenever a layout transition of the attachment may occur. This information can be provided by adding a `VkRenderPassSampleLocationsBeginInfoEXT` structure to the `pNext` chain of `VkRenderPassBeginInfo`.

The `VkRenderPassSampleLocationsBeginInfoEXT` structure is defined as:

Warning | This functionality is superseded by Vulkan Version 1.4 and VK_KHR_dynamic_rendering_local_read. See Legacy Functionality for more information.

    // Provided by VK_EXT_sample_locations
    typedef struct VkRenderPassSampleLocationsBeginInfoEXT {
        VkStructureType                          sType;
        const void*                              pNext;
        uint32_t                                 attachmentInitialSampleLocationsCount;
        const VkAttachmentSampleLocationsEXT*    pAttachmentInitialSampleLocations;
        uint32_t                                 postSubpassSampleLocationsCount;
        const VkSubpassSampleLocationsEXT*       pPostSubpassSampleLocations;
    } VkRenderPassSampleLocationsBeginInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `attachmentInitialSampleLocationsCount` is the number of elements in the `pAttachmentInitialSampleLocations` array.

- `pAttachmentInitialSampleLocations` is a pointer to an array of `attachmentInitialSampleLocationsCount` VkAttachmentSampleLocationsEXT structures specifying the attachment indices and their corresponding sample location state. Each element of `pAttachmentInitialSampleLocations` can specify the sample location state to use in the automatic layout transition performed to transition a depth/stencil attachment from the initial layout of the attachment to the image layout specified for the attachment in the first subpass using it.

- `postSubpassSampleLocationsCount` is the number of elements in the `pPostSubpassSampleLocations` array.

- `pPostSubpassSampleLocations` is a pointer to an array of `postSubpassSampleLocationsCount` VkSubpassSampleLocationsEXT structures specifying the subpass indices and their corresponding sample location state. Each element of `pPostSubpassSampleLocations` can specify the sample location state to use in the automatic layout transition performed to transition the depth/stencil attachment used by the specified subpass to the image layout specified in a dependent subpass or to the final layout of the attachment in case the specified subpass is the last subpass using that attachment. In addition, if VkPhysicalDeviceSampleLocationsPropertiesEXT::`variableSampleLocations` is VK_FALSE, each element of `pPostSubpassSampleLocations` must specify the sample location state that matches the sample locations used by all pipelines that will be bound to a command buffer during the specified subpass. If `variableSampleLocations` is VK_TRUE, the sample locations used for rasterization do not depend on `pPostSubpassSampleLocations`.

Valid Usage (Implicit)

- VUID-VkRenderPassSampleLocationsBeginInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT

- VUID-VkRenderPassSampleLocationsBeginInfoEXT-pAttachmentInitialSampleLocations-parameter
  If `attachmentInitialSampleLocationsCount` is not `0`, `pAttachmentInitialSampleLocations` must be a valid pointer to an array of `attachmentInitialSampleLocationsCount` valid VkAttachmentSampleLocationsEXT structures

- VUID-VkRenderPassSampleLocationsBeginInfoEXT-pPostSubpassSampleLocations-parameter
  If `postSubpassSampleLocationsCount` is not `0`, `pPostSubpassSampleLocations` must be a valid pointer to an array of `postSubpassSampleLocationsCount` valid VkSubpassSampleLocationsEXT structures

Structure Chaining

Extends the structure

  - VkRenderPassBeginInfo

The `VkAttachmentSampleLocationsEXT` structure is defined as:

Warning | This functionality is superseded by Vulkan Version 1.4 and VK_KHR_dynamic_rendering_local_read. See Legacy Functionality for more information.

    // Provided by VK_EXT_sample_locations
    typedef struct VkAttachmentSampleLocationsEXT {
        uint32_t                    attachmentIndex;
        VkSampleLocationsInfoEXT    sampleLocationsInfo;
    } VkAttachmentSampleLocationsEXT;

- `attachmentIndex` is the index of the attachment for which the sample locations state is provided.

- `sampleLocationsInfo` is the sample locations state to use for the layout transition of the given attachment from the initial layout of the attachment to the image layout specified for the attachment in the first subpass using it.

If the image referenced by the framebuffer attachment at index `attachmentIndex` was not created with VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT then the values specified in `sampleLocationsInfo` are ignored.

Valid Usage

- VUID-VkAttachmentSampleLocationsEXT-attachmentIndex-01531
  `attachmentIndex` must be less than the `attachmentCount` specified in VkRenderPassCreateInfo the render pass specified by VkRenderPassBeginInfo::`renderPass` was created with

Valid Usage (Implicit)

- VUID-VkAttachmentSampleLocationsEXT-sampleLocationsInfo-parameter
  `sampleLocationsInfo` must be a valid VkSampleLocationsInfoEXT structure

The `VkSubpassSampleLocationsEXT` structure is defined as:

Warning | This functionality is superseded by Vulkan Version 1.4 and VK_KHR_dynamic_rendering_local_read. See Legacy Functionality for more information.

    // Provided by VK_EXT_sample_locations
    typedef struct VkSubpassSampleLocationsEXT {
        uint32_t                    subpassIndex;
        VkSampleLocationsInfoEXT    sampleLocationsInfo;
    } VkSubpassSampleLocationsEXT;

- `subpassIndex` is the index of the subpass for which the sample locations state is provided.

- `sampleLocationsInfo` is the sample locations state to use for the layout transition of the depth/stencil attachment away from the image layout the attachment is used with in the subpass specified in `subpassIndex`.

If the image referenced by the depth/stencil attachment used in the subpass identified by `subpassIndex` was not created with VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT or if the subpass does not use a depth/stencil attachment, and VkPhysicalDeviceSampleLocationsPropertiesEXT::`variableSampleLocations` is VK_TRUE then the values specified in `sampleLocationsInfo` are ignored.

Valid Usage

- VUID-VkSubpassSampleLocationsEXT-subpassIndex-01532
  `subpassIndex` must be less than the `subpassCount` specified in VkRenderPassCreateInfo the render pass specified by VkRenderPassBeginInfo::`renderPass` was created with

Valid Usage (Implicit)

- VUID-VkSubpassSampleLocationsEXT-sampleLocationsInfo-parameter
  `sampleLocationsInfo` must be a valid VkSampleLocationsInfoEXT structure

To begin a render pass instance with render pass transform enabled, add the VkRenderPassTransformBeginInfoQCOM to the `pNext` chain of VkRenderPassBeginInfo structure passed to the vkCmdBeginRenderPass command specifying the render pass transform.

The `VkRenderPassTransformBeginInfoQCOM` structure is defined as:

    // Provided by VK_QCOM_render_pass_transform
    typedef struct VkRenderPassTransformBeginInfoQCOM {
        VkStructureType                  sType;
        const void*                      pNext;
        VkSurfaceTransformFlagBitsKHR    transform;
    } VkRenderPassTransformBeginInfoQCOM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `transform` is a VkSurfaceTransformFlagBitsKHR value describing the transform to be applied to rasterization.

Valid Usage

- VUID-VkRenderPassTransformBeginInfoQCOM-transform-02871
  `transform` must be VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR, VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR, VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR, or VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR

- VUID-VkRenderPassTransformBeginInfoQCOM-flags-02872
  The `renderpass` must have been created with VkRenderPassCreateInfo::`flags` containing VK_RENDER_PASS_CREATE_TRANSFORM_BIT_QCOM

Valid Usage (Implicit)

- VUID-VkRenderPassTransformBeginInfoQCOM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_RENDER_PASS_TRANSFORM_BEGIN_INFO_QCOM

Structure Chaining

Extends the structure

  - VkRenderPassBeginInfo

The tile properties queried using VK_QCOM_tile_properties depend on the size of the reserved tile memory by the application. This size can be specified by the following structure to VkRenderPassCreateInfo, VkRenderPassCreateInfo2 , or VkRenderingInfo to specify the reserved tile memory size for the render pass object.

For dynamic render passes, this structure can be attached to the `pNext` member of VkRenderingInfo passed to vkGetDynamicRenderingTilePropertiesQCOM.

The `VkTileMemorySizeInfoQCOM` structure is defined as:

    // Provided by VK_QCOM_tile_memory_heap with VK_QCOM_tile_properties
    typedef struct VkTileMemorySizeInfoQCOM {
        VkStructureType    sType;
        const void*        pNext;
        VkDeviceSize       size;
    } VkTileMemorySizeInfoQCOM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `size` is the size in bytes of tile memory used by the render pass or preserved for later use.

The returned tile properties are invalid if the `size` is not equal to the bound tile memory’s allocation size when the render pass is executed.

If this structure is not provided, the `size` of the reserved region defaults to `0`.

Note | Tile memory is reserved for application use by binding tile memory objects to the command buffer. The size provided by this command is informational only for use when evaluating tile properties. If the application does not need to query the tile properties, then this size can be safely omitted.

Valid Usage

- VUID-VkTileMemorySizeInfoQCOM-size-10729
  `size` must be less than or equal to the largest size memory heap with the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property

Valid Usage (Implicit)

- VUID-VkTileMemorySizeInfoQCOM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_TILE_MEMORY_SIZE_INFO_QCOM

Structure Chaining

Extends the structures

  - VkRenderPassCreateInfo

  - VkRenderPassCreateInfo2

  - VkRenderingInfo

The `VkSubpassBeginInfo` structure is defined as:

Warning | This functionality is superseded by Vulkan Version 1.4. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_2
    typedef struct VkSubpassBeginInfo {
        VkStructureType      sType;
        const void*          pNext;
        VkSubpassContents    contents;
    } VkSubpassBeginInfo;

    // Provided by VK_KHR_create_renderpass2
    // Equivalent to VkSubpassBeginInfo
    typedef VkSubpassBeginInfo VkSubpassBeginInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `contents` is a VkSubpassContents value specifying how the commands in the next subpass will be provided.

Valid Usage

- VUID-VkSubpassBeginInfo-contents-09382
  If `contents` is VK_SUBPASS_CONTENTS_INLINE_AND_SECONDARY_COMMAND_BUFFERS_KHR, then at least one of the following features must be enabled:

  - `maintenance7`

  - `nestedCommandBuffer`

Valid Usage (Implicit)

- VUID-VkSubpassBeginInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SUBPASS_BEGIN_INFO

- VUID-VkSubpassBeginInfo-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkSubpassBeginInfo-contents-parameter
  `contents` must be a valid VkSubpassContents value

Possible values of vkCmdBeginRenderPass::`contents`, specifying how the commands in the first subpass will be provided, are:

Warning | This functionality is superseded by Vulkan Version 1.4. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_0
    typedef enum VkSubpassContents {
        VK_SUBPASS_CONTENTS_INLINE = 0,
        VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS = 1,
      // Provided by VK_KHR_maintenance7
        VK_SUBPASS_CONTENTS_INLINE_AND_SECONDARY_COMMAND_BUFFERS_KHR = 1000451000,
      // Provided by VK_EXT_nested_command_buffer
        VK_SUBPASS_CONTENTS_INLINE_AND_SECONDARY_COMMAND_BUFFERS_EXT = VK_SUBPASS_CONTENTS_INLINE_AND_SECONDARY_COMMAND_BUFFERS_KHR,
    } VkSubpassContents;

- VK_SUBPASS_CONTENTS_INLINE specifies that the contents of the subpass will be recorded inline in the primary command buffer, and secondary command buffers must not be executed within the subpass.

- VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS specifies that the contents are recorded in secondary command buffers that will be called from the primary command buffer, and vkCmdExecuteCommands is the only valid command in the command buffer until vkCmdNextSubpass or vkCmdEndRenderPass.

- VK_SUBPASS_CONTENTS_INLINE_AND_SECONDARY_COMMAND_BUFFERS_KHR specifies that the contents of the subpass can be recorded both inline and in secondary command buffers executed from this command buffer with vkCmdExecuteCommands.

If the `pNext` chain of VkRenderPassBeginInfo or VkRenderingInfo includes a `VkDeviceGroupRenderPassBeginInfo` structure, then that structure includes a device mask and set of render areas for the render pass instance.

The `VkDeviceGroupRenderPassBeginInfo` structure is defined as:

    // Provided by VK_VERSION_1_1
    typedef struct VkDeviceGroupRenderPassBeginInfo {
        VkStructureType    sType;
        const void*        pNext;
        uint32_t           deviceMask;
        uint32_t           deviceRenderAreaCount;
        const VkRect2D*    pDeviceRenderAreas;
    } VkDeviceGroupRenderPassBeginInfo;

    // Provided by VK_KHR_device_group
    // Equivalent to VkDeviceGroupRenderPassBeginInfo
    typedef VkDeviceGroupRenderPassBeginInfo VkDeviceGroupRenderPassBeginInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `deviceMask` is the device mask for the render pass instance.

- `deviceRenderAreaCount` is the number of elements in the `pDeviceRenderAreas` array.

- `pDeviceRenderAreas` is a pointer to an array of VkRect2D structures defining the render area for each physical device.

The `deviceMask` serves several purposes. It is an upper bound on the set of physical devices that can be used during the render pass instance, and the initial device mask when the render pass instance begins. In addition, commands transitioning to the next subpass in a render pass instance and commands ending the render pass instance, and, accordingly render pass load, store, and multisample resolve operations and subpass dependencies corresponding to the render pass instance, are executed on the physical devices included in the device mask provided here.

If `deviceRenderAreaCount` is not zero, then the elements of `pDeviceRenderAreas` override the value of VkRenderPassBeginInfo::`renderArea`, and provide a render area specific to each physical device. These render areas serve the same purpose as VkRenderPassBeginInfo::`renderArea`, including controlling the region of attachments that are cleared by VK_ATTACHMENT_LOAD_OP_CLEAR and that are resolved into resolve attachments.

If this structure is not present, the render pass instance’s device mask is the value of VkDeviceGroupCommandBufferBeginInfo::`deviceMask`. If this structure is not present or if `deviceRenderAreaCount` is zero, VkRenderPassBeginInfo::`renderArea` is used for all physical devices.

Valid Usage

- VUID-VkDeviceGroupRenderPassBeginInfo-deviceMask-00905
  `deviceMask` must be a valid device mask value

- VUID-VkDeviceGroupRenderPassBeginInfo-deviceMask-00906
  `deviceMask` must not be zero

- VUID-VkDeviceGroupRenderPassBeginInfo-deviceMask-00907
  `deviceMask` must be a subset of the command buffer’s initial device mask

- VUID-VkDeviceGroupRenderPassBeginInfo-deviceRenderAreaCount-00908
  `deviceRenderAreaCount` must either be zero or equal to the number of physical devices in the logical device

- VUID-VkDeviceGroupRenderPassBeginInfo-offset-06166
  The `offset.x` member of any element of `pDeviceRenderAreas` must be greater than or equal to 0

- VUID-VkDeviceGroupRenderPassBeginInfo-offset-06167
  The `offset.y` member of any element of `pDeviceRenderAreas` must be greater than or equal to 0

- VUID-VkDeviceGroupRenderPassBeginInfo-offset-06168
  The sum of the `offset.x` and `extent.width` members of any element of `pDeviceRenderAreas` must be less than or equal to `maxFramebufferWidth`

- VUID-VkDeviceGroupRenderPassBeginInfo-offset-06169
  The sum of the `offset.y` and `extent.height` members of any element of `pDeviceRenderAreas` must be less than or equal to `maxFramebufferHeight`

- VUID-VkDeviceGroupRenderPassBeginInfo-extent-08998
  The `extent.width` member of any element of `pDeviceRenderAreas` must be greater than 0

- VUID-VkDeviceGroupRenderPassBeginInfo-extent-08999
  The `extent.height` member of any element of `pDeviceRenderAreas` must be greater than 0

Valid Usage (Implicit)

- VUID-VkDeviceGroupRenderPassBeginInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO

- VUID-VkDeviceGroupRenderPassBeginInfo-pDeviceRenderAreas-parameter
  If `deviceRenderAreaCount` is not `0`, `pDeviceRenderAreas` must be a valid pointer to an array of `deviceRenderAreaCount` VkRect2D structures

Structure Chaining

Extends the structures

  - VkRenderPassBeginInfo

  - VkRenderingInfo

The `VkRenderPassAttachmentBeginInfo` structure is defined as:

Warning | This functionality is superseded by Vulkan Version 1.4. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_2
    typedef struct VkRenderPassAttachmentBeginInfo {
        VkStructureType       sType;
        const void*           pNext;
        uint32_t              attachmentCount;
        const VkImageView*    pAttachments;
    } VkRenderPassAttachmentBeginInfo;

    // Provided by VK_KHR_imageless_framebuffer
    // Equivalent to VkRenderPassAttachmentBeginInfo
    typedef VkRenderPassAttachmentBeginInfo VkRenderPassAttachmentBeginInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `attachmentCount` is the number of attachments.

- `pAttachments` is a pointer to an array of `VkImageView` handles, each of which will be used as the corresponding attachment in the render pass instance.

Valid Usage

- VUID-VkRenderPassAttachmentBeginInfo-pAttachments-03218
  Each element of `pAttachments` must only specify a single mip level

- VUID-VkRenderPassAttachmentBeginInfo-pAttachments-03219
  Each element of `pAttachments` must have been created with the identity swizzle

- VUID-VkRenderPassAttachmentBeginInfo-pAttachments-04114
  Each element of `pAttachments` must have been created with VkImageViewCreateInfo::`viewType` not equal to VK_IMAGE_VIEW_TYPE_3D

- VUID-VkRenderPassAttachmentBeginInfo-pAttachments-07010
  If multisampled-render-to-single-sampled is enabled for any subpass, all element of `pAttachments` which have a sample count equal to VK_SAMPLE_COUNT_1_BIT must have a format that supports the sample count specified in VkMultisampledRenderToSingleSampledInfoEXT::`rasterizationSamples`

Valid Usage (Implicit)

- VUID-VkRenderPassAttachmentBeginInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_RENDER_PASS_ATTACHMENT_BEGIN_INFO

- VUID-VkRenderPassAttachmentBeginInfo-pAttachments-parameter
  If `attachmentCount` is not `0`, `pAttachments` must be a valid pointer to an array of `attachmentCount` valid VkImageView handles

Structure Chaining

Extends the structure

  - VkRenderPassBeginInfo

If a render pass instance enables multiview and if the `multiviewPerViewRenderAreas` feature is enabled, the `VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM` structure can be included in the `pNext` chain of VkRenderPassBeginInfo or VkRenderingInfo

The `VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM` structure is defined as:

    // Provided by VK_QCOM_multiview_per_view_render_areas
    typedef struct VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM {
        VkStructureType    sType;
        const void*        pNext;
        uint32_t           perViewRenderAreaCount;
        const VkRect2D*    pPerViewRenderAreas;
    } VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `perViewRenderAreaCount` is the number of elements in the `pPerViewRenderAreas` array.

- `pPerViewRenderAreas` is a pointer to an array of VkRect2D structures defining the render area for each view.

If `perViewRenderAreaCount` is not zero, then the elements of `pPerViewRenderAreas` override the value of VkRenderPassBeginInfo::`renderArea` or VkRenderingInfo::`renderArea` and define per-view render areas for the individual views of a multiview render pass. The render area for the view with view index `i` is specified by `pPerViewRenderAreas`[i].

The per-view render areas define per-view regions of attachments that are loaded, stored, and resolved according to the `loadOp`, `storeOp`, and `resolveMode` values of the render pass instance. When per-view render areas are defined, the value of VkRenderPassBeginInfo::`renderArea` or VkRenderingInfo::`renderArea` must be a render area that includes the union of all per-view render areas, may be used by the implementation for optimizations, but does not affect loads, stores, or resolves.

If this structure is present and if `perViewRenderAreaCount` is not zero, then `perViewRenderAreaCount` must be at least one greater than the most significant bit set in any element of VkRenderPassMultiviewCreateInfo::`pViewMasks`. or VkRenderingInfo::`viewMask`

If this structure is not present or if `perViewRenderAreaCount` is zero, VkRenderPassBeginInfo::`renderArea` or VkRenderingInfo::`renderArea` is used for all views.

Valid Usage

- VUID-VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM-offset-07861
  The `offset.x` member of any element of `pPerViewRenderAreas` must be greater than or equal to 0

- VUID-VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM-offset-07862
  The `offset.y` member of any element of `pPerViewRenderAreas` must be greater than or equal to 0

- VUID-VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM-offset-07863
  The sum of the `offset.x` and `extent.width` members of any element of `pPerViewRenderAreas` must be less than or equal to `maxFramebufferWidth`

- VUID-VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM-offset-07864
  The sum of the `offset.y` and `extent.height` members of any element of `pPerViewRenderAreas` must be less than or equal to `maxFramebufferHeight`

- VUID-VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM-pNext-07865
  If this structure is in the `pNext` chain of VkRenderPassBeginInfo and if the render pass object included an element in VkRenderPassMultiviewCreateInfo::`pViewMasks` that set bit `n`, then `perViewRenderAreaCount` must be at least equal to `n+1`

- VUID-VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM-pNext-07866
  If this structure is in the `pNext` chain of VkRenderingInfo and if VkRenderingInfo::`viewMask` set bit `n`, then `perViewRenderAreaCount` must be at least equal to `n+1`

Valid Usage (Implicit)

- VUID-VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_MULTIVIEW_PER_VIEW_RENDER_AREAS_RENDER_PASS_BEGIN_INFO_QCOM

- VUID-VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM-pPerViewRenderAreas-parameter
  If `perViewRenderAreaCount` is not `0`, `pPerViewRenderAreas` must be a valid pointer to an array of `perViewRenderAreaCount` VkRect2D structures

Structure Chaining

Extends the structures

  - VkRenderPassBeginInfo

  - VkRenderingInfo

To query the render area granularity, call:

Warning | This functionality is superseded by Vulkan Version 1.4. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_0
    void vkGetRenderAreaGranularity(
        VkDevice                                    device,
        VkRenderPass                                renderPass,
        VkExtent2D*                                 pGranularity);

- `device` is the logical device that owns the render pass.

- `renderPass` is a handle to a render pass.

- `pGranularity` is a pointer to a VkExtent2D structure in which the granularity is returned.

The conditions leading to an optimal `renderArea` are:

- the `offset.x` member in `renderArea` is a multiple of the `width` member of the returned VkExtent2D (the horizontal granularity).

- the `offset.y` member in `renderArea` is a multiple of the `height` member of the returned VkExtent2D (the vertical granularity).

- either the `extent.width` member in `renderArea` is a multiple of the horizontal granularity or `offset.x`+`extent.width` is equal to the `width` of the `framebuffer` in the VkRenderPassBeginInfo.

- either the `extent.height` member in `renderArea` is a multiple of the vertical granularity or `offset.y`+`extent.height` is equal to the `height` of the `framebuffer` in the VkRenderPassBeginInfo.

Subpass dependencies are not affected by the render area, and apply to the entire image subresources attached to the framebuffer as specified in the description of automatic layout transitions. Similarly, pipeline barriers are valid even if their effect extends outside the render area.

Valid Usage (Implicit)

- VUID-vkGetRenderAreaGranularity-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetRenderAreaGranularity-renderPass-parameter
  `renderPass` must be a valid VkRenderPass handle

- VUID-vkGetRenderAreaGranularity-pGranularity-parameter
  `pGranularity` must be a valid pointer to a VkExtent2D structure

- VUID-vkGetRenderAreaGranularity-renderPass-parent
  `renderPass` must have been created, allocated, or retrieved from `device`

To transition to the next subpass in the render pass instance after recording the commands for a subpass, call:

Warning | This functionality is superseded by vkCmdNextSubpass2. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_0
    void vkCmdNextSubpass(
        VkCommandBuffer                             commandBuffer,
        VkSubpassContents                           contents);

- `commandBuffer` is the command buffer in which to record the command.

- `contents` specifies how the commands in the next subpass will be provided, in the same fashion as the corresponding parameter of vkCmdBeginRenderPass.

The subpass index for a render pass begins at zero when `vkCmdBeginRenderPass` is recorded, and increments each time `vkCmdNextSubpass` is recorded.

After transitioning to the next subpass, the application can record the commands for that subpass.

Valid Usage

- VUID-vkCmdNextSubpass-None-00909
  The current subpass index must be less than the number of subpasses in the render pass minus one

- VUID-vkCmdNextSubpass-None-02349
  This command must not be recorded when transform feedback is active

Valid Usage (Implicit)

- VUID-vkCmdNextSubpass-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdNextSubpass-contents-parameter
  `contents` must be a valid VkSubpassContents value

- VUID-vkCmdNextSubpass-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdNextSubpass-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdNextSubpass-renderpass
  This command must only be called inside of a render pass instance

- VUID-vkCmdNextSubpass-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdNextSubpass-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdNextSubpass-bufferlevel
  `commandBuffer` must be a primary `VkCommandBuffer`

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary | Inside | Outside | VK_QUEUE_GRAPHICS_BIT | Action State Synchronization

Conditional Rendering

vkCmdNextSubpass is not affected by conditional rendering

To transition to the next subpass in the render pass instance after recording the commands for a subpass, call:

Warning | This functionality is superseded by Vulkan Version 1.4. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_2
    void vkCmdNextSubpass2(
        VkCommandBuffer                             commandBuffer,
        const VkSubpassBeginInfo*                   pSubpassBeginInfo,
        const VkSubpassEndInfo*                     pSubpassEndInfo);

    // Provided by VK_KHR_create_renderpass2
    // Equivalent to vkCmdNextSubpass2
    void vkCmdNextSubpass2KHR(
        VkCommandBuffer                             commandBuffer,
        const VkSubpassBeginInfo*                   pSubpassBeginInfo,
        const VkSubpassEndInfo*                     pSubpassEndInfo);

- `commandBuffer` is the command buffer in which to record the command.

- `pSubpassBeginInfo` is a pointer to a VkSubpassBeginInfo structure containing information about the subpass which is about to begin rendering.

- `pSubpassEndInfo` is a pointer to a VkSubpassEndInfo structure containing information about how the previous subpass will be ended.

`vkCmdNextSubpass2` is semantically identical to vkCmdNextSubpass, except that it is extensible, and that `contents` is provided as part of an extensible structure instead of as a flat parameter.

Valid Usage

- VUID-vkCmdNextSubpass2-None-03102
  The current subpass index must be less than the number of subpasses in the render pass minus one

- VUID-vkCmdNextSubpass2-None-02350
  This command must not be recorded when transform feedback is active

Valid Usage (Implicit)

- VUID-vkCmdNextSubpass2-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdNextSubpass2-pSubpassBeginInfo-parameter
  `pSubpassBeginInfo` must be a valid pointer to a valid VkSubpassBeginInfo structure

- VUID-vkCmdNextSubpass2-pSubpassEndInfo-parameter
  `pSubpassEndInfo` must be a valid pointer to a valid VkSubpassEndInfo structure

- VUID-vkCmdNextSubpass2-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdNextSubpass2-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdNextSubpass2-renderpass
  This command must only be called inside of a render pass instance

- VUID-vkCmdNextSubpass2-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdNextSubpass2-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdNextSubpass2-bufferlevel
  `commandBuffer` must be a primary `VkCommandBuffer`

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary | Inside | Outside | VK_QUEUE_GRAPHICS_BIT | Action State Synchronization

Conditional Rendering

vkCmdNextSubpass2 is not affected by conditional rendering

To record a command to end a render pass instance after recording the commands for the last subpass, call:

Warning | This functionality is superseded by vkCmdEndRenderPass2. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_0
    void vkCmdEndRenderPass(
        VkCommandBuffer                             commandBuffer);

- `commandBuffer` is the command buffer in which to end the current render pass instance.

Ending a render pass instance performs any multisample resolve operations on the final subpass.

Note | There is no implicit ordering between separate render passes, even in the same command buffer, and even when the attachments match. Some applications rely on the continuation of rasterization order between multiple render passes with attachments defined in the same way, in order to perform non-rendering operations (such as copies or compute operations) between draw calls, but this has never been required by the specification. There is also no explicit barrier currently in the API that provides the guarantee that applications rely on without additional performance penalties. New applications should avoid relying on this ordering until an appropriate barrier is added to the API. Implementations where applications are performing this splitting are encouraged to continue supporting this guarantee until a suitable barrier is added to the API. Existing applications relying on this ordering should expect that it will continue working on platforms where it currently does. Once a new extension adds support for a new barrier, developers are encouraged to adapt their applications to use this when available.

Valid Usage

- VUID-vkCmdEndRenderPass-None-00910
  The current subpass index must be equal to the number of subpasses in the render pass minus one

- VUID-vkCmdEndRenderPass-None-02351
  This command must not be recorded when transform feedback is active

- VUID-vkCmdEndRenderPass-None-06170
  The current render pass instance must not have been begun with vkCmdBeginRendering

- VUID-vkCmdEndRenderPass-None-07004
  If `vkCmdBeginQuery`* was called within a subpass of the render pass, the corresponding `vkCmdEndQuery`* must have been called subsequently within the same subpass

- VUID-vkCmdEndRenderPass-None-10653
  This command must not be recorded when per-tile execution model is enabled

Valid Usage (Implicit)

- VUID-vkCmdEndRenderPass-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdEndRenderPass-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdEndRenderPass-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdEndRenderPass-renderpass
  This command must only be called inside of a render pass instance

- VUID-vkCmdEndRenderPass-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdEndRenderPass-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdEndRenderPass-bufferlevel
  `commandBuffer` must be a primary `VkCommandBuffer`

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary | Inside | Outside | VK_QUEUE_GRAPHICS_BIT | Action State Synchronization

Conditional Rendering

vkCmdEndRenderPass is not affected by conditional rendering

To record a command to end a render pass instance after recording the commands for the last subpass, call:

Warning | This functionality is superseded by Vulkan Version 1.4. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_2
    void vkCmdEndRenderPass2(
        VkCommandBuffer                             commandBuffer,
        const VkSubpassEndInfo*                     pSubpassEndInfo);

    // Provided by VK_KHR_create_renderpass2
    // Equivalent to vkCmdEndRenderPass2
    void vkCmdEndRenderPass2KHR(
        VkCommandBuffer                             commandBuffer,
        const VkSubpassEndInfo*                     pSubpassEndInfo);

- `commandBuffer` is the command buffer in which to end the current render pass instance.

- `pSubpassEndInfo` is a pointer to a VkSubpassEndInfo structure containing information about how the last subpass will be ended.

`vkCmdEndRenderPass2` is semantically identical to vkCmdEndRenderPass, except that it is extensible.

Note | There is no implicit ordering between separate render passes, even in the same command buffer, and even when the attachments match. Some applications rely on the continuation of rasterization order between multiple render passes with attachments defined in the same way, in order to perform non-rendering operations (such as copies or compute operations) between draw calls, but this has never been required by the specification. There is also no explicit barrier currently in the API that provides the guarantee that applications rely on without additional performance penalties. New applications should avoid relying on this ordering until an appropriate barrier is added to the API. Implementations where applications are performing this splitting are encouraged to continue supporting this guarantee until a suitable barrier is added to the API. Existing applications relying on this ordering should expect that it will continue working on platforms where it currently does. Once a new extension adds support for a new barrier, developers are encouraged to adapt their applications to use this when available.

Valid Usage

- VUID-vkCmdEndRenderPass2-None-03103
  The current subpass index must be equal to the number of subpasses in the render pass minus one

- VUID-vkCmdEndRenderPass2-None-02352
  This command must not be recorded when transform feedback is active

- VUID-vkCmdEndRenderPass2-None-06171
  The current render pass instance must not have been begun with vkCmdBeginRendering

- VUID-vkCmdEndRenderPass2-None-07005
  If `vkCmdBeginQuery`* was called within a subpass of the render pass, the corresponding `vkCmdEndQuery`* must have been called subsequently within the same subpass

Valid Usage (Implicit)

- VUID-vkCmdEndRenderPass2-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdEndRenderPass2-pSubpassEndInfo-parameter
  `pSubpassEndInfo` must be a valid pointer to a valid VkSubpassEndInfo structure

- VUID-vkCmdEndRenderPass2-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdEndRenderPass2-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdEndRenderPass2-renderpass
  This command must only be called inside of a render pass instance

- VUID-vkCmdEndRenderPass2-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdEndRenderPass2-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdEndRenderPass2-bufferlevel
  `commandBuffer` must be a primary `VkCommandBuffer`

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary | Inside | Outside | VK_QUEUE_GRAPHICS_BIT | Action State Synchronization

Conditional Rendering

vkCmdEndRenderPass2 is not affected by conditional rendering

The `VkSubpassEndInfo` structure is defined as:

Warning | This functionality is superseded by Vulkan Version 1.4. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_2
    typedef struct VkSubpassEndInfo {
        VkStructureType    sType;
        const void*        pNext;
    } VkSubpassEndInfo;

    // Provided by VK_KHR_create_renderpass2
    // Equivalent to VkSubpassEndInfo
    typedef VkSubpassEndInfo VkSubpassEndInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

Valid Usage (Implicit)

- VUID-VkSubpassEndInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SUBPASS_END_INFO

- VUID-VkSubpassEndInfo-pNext-pNext
  `pNext` must be `NULL` or a pointer to a valid instance of VkRenderPassFragmentDensityMapOffsetEndInfoEXT

- VUID-VkSubpassEndInfo-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

If the VkSubpassEndInfo::`pNext` chain or VkRenderingEndInfoEXT::`pNext` chain includes a `VkRenderPassFragmentDensityMapOffsetEndInfoEXT` structure, then that structure includes an array of fragment density map offsets per layer for the render pass.

The `VkRenderPassFragmentDensityMapOffsetEndInfoEXT` structure is defined as:

    // Provided by VK_EXT_fragment_density_map_offset
    typedef struct VkRenderPassFragmentDensityMapOffsetEndInfoEXT {
        VkStructureType      sType;
        const void*          pNext;
        uint32_t             fragmentDensityOffsetCount;
        const VkOffset2D*    pFragmentDensityOffsets;
    } VkRenderPassFragmentDensityMapOffsetEndInfoEXT;

    // Provided by VK_QCOM_fragment_density_map_offset
    // Equivalent to VkRenderPassFragmentDensityMapOffsetEndInfoEXT
    typedef VkRenderPassFragmentDensityMapOffsetEndInfoEXT VkSubpassFragmentDensityMapOffsetEndInfoQCOM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `fragmentDensityOffsetCount` is the number of offsets being specified.

- `pFragmentDensityOffsets` is a pointer to an array of VkOffset2D structs, each of which describes the offset per layer.

The array elements are given per `layer` as defined by Fetch Density Value, where index = layer. Each (x,y) offset is in framebuffer pixels and shifts the fetch of the fragment density map by that amount. Offsets can be positive or negative.

If neither the VkSubpassEndInfo::`pNext` chain for the last subpass of a render pass nor the VkRenderingEndInfoEXT::`pNext` chain of a dynamic render pass include `VkRenderPassFragmentDensityMapOffsetEndInfoEXT`, or if `fragmentDensityOffsetCount` is zero, then the offset (0,0) is used for Fetch Density Value.

Valid Usage

- VUID-VkRenderPassFragmentDensityMapOffsetEndInfoEXT-fragmentDensityMapOffsets-06503
  If the `fragmentDensityMapOffset` feature is not enabled or fragment density map is not enabled in the render pass, `fragmentDensityOffsetCount` must equal `0`

- VUID-VkRenderPassFragmentDensityMapOffsetEndInfoEXT-fragmentDensityMapAttachment-06504
  If VkRenderPassFragmentDensityMapCreateInfoEXT::`fragmentDensityMapAttachment` is not VK_ATTACHMENT_UNUSED and was not created with VK_IMAGE_CREATE_FRAGMENT_DENSITY_MAP_OFFSET_BIT_EXT, `fragmentDensityOffsetCount` must equal `0`

- VUID-VkRenderPassFragmentDensityMapOffsetEndInfoEXT-pDepthStencilAttachment-06505
  If the depth or stencil attachments for the render pass are used and were not created with VK_IMAGE_CREATE_FRAGMENT_DENSITY_MAP_OFFSET_BIT_EXT, `fragmentDensityOffsetCount` must equal `0`

- VUID-VkRenderPassFragmentDensityMapOffsetEndInfoEXT-pInputAttachments-06506
  If any used input attachments for the render pass were not created with VK_IMAGE_CREATE_FRAGMENT_DENSITY_MAP_OFFSET_BIT_EXT, `fragmentDensityOffsetCount` must equal `0`

- VUID-VkRenderPassFragmentDensityMapOffsetEndInfoEXT-pColorAttachments-06507
  If any used color attachments for the render pass were not created with VK_IMAGE_CREATE_FRAGMENT_DENSITY_MAP_OFFSET_BIT_EXT, `fragmentDensityOffsetCount` must equal `0`

- VUID-VkRenderPassFragmentDensityMapOffsetEndInfoEXT-pResolveAttachments-06508
  If any used resolve attachments for the render pass were not created with VK_IMAGE_CREATE_FRAGMENT_DENSITY_MAP_OFFSET_BIT_EXT, `fragmentDensityOffsetCount` must equal `0`

- VUID-VkRenderPassFragmentDensityMapOffsetEndInfoEXT-pPreserveAttachments-06509
  If any used preserve attachments for the render pass were not created with VK_IMAGE_CREATE_FRAGMENT_DENSITY_MAP_OFFSET_BIT_EXT, `fragmentDensityOffsetCount` must equal `0`

- VUID-VkRenderPassFragmentDensityMapOffsetEndInfoEXT-fragmentDensityOffsetCount-06510
  If `fragmentDensityOffsetCount` is not `0` and multiview is enabled for the render pass, `fragmentDensityOffsetCount` must equal the `layerCount` that was specified in creating the fragment density map attachment view

- VUID-VkRenderPassFragmentDensityMapOffsetEndInfoEXT-fragmentDensityOffsetCount-06511
  If `fragmentDensityOffsetCount` is not `0` and multiview is not enabled for the render pass, `fragmentDensityOffsetCount` must equal `1`

- VUID-VkRenderPassFragmentDensityMapOffsetEndInfoEXT-x-06512
  The `x` component of each element of `pFragmentDensityOffsets` must be an integer multiple of `fragmentDensityOffsetGranularity.width`

- VUID-VkRenderPassFragmentDensityMapOffsetEndInfoEXT-y-06513
  The `y` component of each element of `pFragmentDensityOffsets` must be an integer multiple of `fragmentDensityOffsetGranularity.height`

- VUID-VkRenderPassFragmentDensityMapOffsetEndInfoEXT-pFragmentDensityOffsets-10730
  Each element of `pFragmentDensityOffsets` must be identical for every vkCmdEndRendering2KHR call made in a render pass

Valid Usage (Implicit)

- VUID-VkRenderPassFragmentDensityMapOffsetEndInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_RENDER_PASS_FRAGMENT_DENSITY_MAP_OFFSET_END_INFO_EXT

- VUID-VkRenderPassFragmentDensityMapOffsetEndInfoEXT-pFragmentDensityOffsets-parameter
  If `fragmentDensityOffsetCount` is not `0`, `pFragmentDensityOffsets` must be a valid pointer to an array of `fragmentDensityOffsetCount` VkOffset2D structures

Structure Chaining

Extends the structures

  - VkRenderingEndInfoKHR

  - VkSubpassEndInfo

### 8.9. Render Pass Creation Feedback

A `VkRenderPassCreationControlEXT` structure can be included in the `pNext` chain of `VkRenderPassCreateInfo2` or `pNext` chain of VkSubpassDescription2. The `VkRenderPassCreationControlEXT` structure is defined as:

Warning | This functionality is superseded by Vulkan Version 1.4 and VK_KHR_dynamic_rendering_local_read. See Legacy Functionality for more information.

    // Provided by VK_EXT_subpass_merge_feedback
    typedef struct VkRenderPassCreationControlEXT {
        VkStructureType    sType;
        const void*        pNext;
        VkBool32           disallowMerging;
    } VkRenderPassCreationControlEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `disallowMerging` is a boolean value indicating whether subpass merging will be disabled.

If a `VkRenderPassCreationControlEXT` structure is included in the `pNext` chain of VkRenderPassCreateInfo2 and its value of `disallowMerging` is VK_TRUE, the implementation will disable subpass merging for the entire render pass. If a `VkRenderPassCreationControlEXT` structure is included in the `pNext` chain of VkSubpassDescription2 and its value of `disallowMerging` is VK_TRUE, the implementation will disable merging the described subpass with previous subpasses in the render pass.

Valid Usage (Implicit)

- VUID-VkRenderPassCreationControlEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_RENDER_PASS_CREATION_CONTROL_EXT

Structure Chaining

Extends the structures

  - VkRenderPassCreateInfo2

  - VkSubpassDescription2

To obtain feedback about the creation of a render pass, include a `VkRenderPassCreationFeedbackCreateInfoEXT` structure in the `pNext` chain of VkRenderPassCreateInfo2. The `VkRenderPassCreationFeedbackCreateInfoEXT` structure is defined as:

Warning | This functionality is superseded by Vulkan Version 1.4 and VK_KHR_dynamic_rendering_local_read. See Legacy Functionality for more information.

    // Provided by VK_EXT_subpass_merge_feedback
    typedef struct VkRenderPassCreationFeedbackCreateInfoEXT {
        VkStructureType                         sType;
        const void*                             pNext;
        VkRenderPassCreationFeedbackInfoEXT*    pRenderPassFeedback;
    } VkRenderPassCreationFeedbackCreateInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `pRenderPassFeedback` is a pointer to a VkRenderPassCreationFeedbackInfoEXT structure in which feedback is returned.

Valid Usage (Implicit)

- VUID-VkRenderPassCreationFeedbackCreateInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_RENDER_PASS_CREATION_FEEDBACK_CREATE_INFO_EXT

- VUID-VkRenderPassCreationFeedbackCreateInfoEXT-pRenderPassFeedback-parameter
  `pRenderPassFeedback` must be a valid pointer to a VkRenderPassCreationFeedbackInfoEXT structure

Structure Chaining

Extends the structure

  - VkRenderPassCreateInfo2

The `VkRenderPassCreationFeedbackInfoEXT` structure is defined as:

Warning | This functionality is superseded by Vulkan Version 1.4 and VK_KHR_dynamic_rendering_local_read. See Legacy Functionality for more information.

    // Provided by VK_EXT_subpass_merge_feedback
    typedef struct VkRenderPassCreationFeedbackInfoEXT {
        uint32_t    postMergeSubpassCount;
    } VkRenderPassCreationFeedbackInfoEXT;

- `postMergeSubpassCount` is the subpass count after merge.

Feedback about the creation of a subpass can be obtained by including a `VkRenderPassSubpassFeedbackCreateInfoEXT` structure in the `pNext` chain of VkSubpassDescription2. `VkRenderPassSubpassFeedbackCreateInfoEXT` structure is defined as:

Warning | This functionality is superseded by Vulkan Version 1.4 and VK_KHR_dynamic_rendering_local_read. See Legacy Functionality for more information.

    // Provided by VK_EXT_subpass_merge_feedback
    typedef struct VkRenderPassSubpassFeedbackCreateInfoEXT {
        VkStructureType                        sType;
        const void*                            pNext;
        VkRenderPassSubpassFeedbackInfoEXT*    pSubpassFeedback;
    } VkRenderPassSubpassFeedbackCreateInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `pSubpassFeedback` is a pointer to a VkRenderPassSubpassFeedbackInfoEXT structure in which feedback is returned.

Valid Usage (Implicit)

- VUID-VkRenderPassSubpassFeedbackCreateInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_RENDER_PASS_SUBPASS_FEEDBACK_CREATE_INFO_EXT

- VUID-VkRenderPassSubpassFeedbackCreateInfoEXT-pSubpassFeedback-parameter
  `pSubpassFeedback` must be a valid pointer to a VkRenderPassSubpassFeedbackInfoEXT structure

Structure Chaining

Extends the structure

  - VkSubpassDescription2

The `VkRenderPassSubpassFeedbackInfoEXT` structure is defined as:

Warning | This functionality is superseded by Vulkan Version 1.4 and VK_KHR_dynamic_rendering_local_read. See Legacy Functionality for more information.

    // Provided by VK_EXT_subpass_merge_feedback
    typedef struct VkRenderPassSubpassFeedbackInfoEXT {
        VkSubpassMergeStatusEXT    subpassMergeStatus;
        char                       description[VK_MAX_DESCRIPTION_SIZE];
        uint32_t                   postMergeIndex;
    } VkRenderPassSubpassFeedbackInfoEXT;

- `subpassMergeStatus` is a VkSubpassMergeStatusEXT value specifying information about whether the subpass is merged with the previous subpass and the reason why it is not merged.

- `description` is an array of VK_MAX_DESCRIPTION_SIZE `char` containing a null-terminated UTF-8 string which provides additional details.

- `postMergeIndex` is the subpass index after the subpass merging.

Possible values of `VkRenderPassSubpassFeedbackInfoEXT`:subpassMergeStatus are:

    // Provided by VK_EXT_subpass_merge_feedback
    typedef enum VkSubpassMergeStatusEXT {
        VK_SUBPASS_MERGE_STATUS_MERGED_EXT = 0,
        VK_SUBPASS_MERGE_STATUS_DISALLOWED_EXT = 1,
        VK_SUBPASS_MERGE_STATUS_NOT_MERGED_SIDE_EFFECTS_EXT = 2,
        VK_SUBPASS_MERGE_STATUS_NOT_MERGED_SAMPLES_MISMATCH_EXT = 3,
        VK_SUBPASS_MERGE_STATUS_NOT_MERGED_VIEWS_MISMATCH_EXT = 4,
        VK_SUBPASS_MERGE_STATUS_NOT_MERGED_ALIASING_EXT = 5,
        VK_SUBPASS_MERGE_STATUS_NOT_MERGED_DEPENDENCIES_EXT = 6,
        VK_SUBPASS_MERGE_STATUS_NOT_MERGED_INCOMPATIBLE_INPUT_ATTACHMENT_EXT = 7,
        VK_SUBPASS_MERGE_STATUS_NOT_MERGED_TOO_MANY_ATTACHMENTS_EXT = 8,
        VK_SUBPASS_MERGE_STATUS_NOT_MERGED_INSUFFICIENT_STORAGE_EXT = 9,
        VK_SUBPASS_MERGE_STATUS_NOT_MERGED_DEPTH_STENCIL_COUNT_EXT = 10,
        VK_SUBPASS_MERGE_STATUS_NOT_MERGED_RESOLVE_ATTACHMENT_REUSE_EXT = 11,
        VK_SUBPASS_MERGE_STATUS_NOT_MERGED_SINGLE_SUBPASS_EXT = 12,
        VK_SUBPASS_MERGE_STATUS_NOT_MERGED_UNSPECIFIED_EXT = 13,
    } VkSubpassMergeStatusEXT;

- VK_SUBPASS_MERGE_STATUS_MERGED_EXT specifies that the subpass is merged with a previous subpass.

- VK_SUBPASS_MERGE_STATUS_DISALLOWED_EXT specifies that the subpass is not merged because merging was disabled using VkRenderPassCreationControlEXT. If the render pass does not allow subpass merging, then all subpass statuses are set to this value. If a subpass description does not allow subpass merging, then only that subpass’s status is set to this value.

- VK_SUBPASS_MERGE_STATUS_NOT_MERGED_SIDE_EFFECTS_EXT specifies that the subpass is not merged because it contains side effects.

- VK_SUBPASS_MERGE_STATUS_NOT_MERGED_SAMPLES_MISMATCH_EXT specifies that the subpass is not merged because sample count is not compatible with the previous subpass.

- VK_SUBPASS_MERGE_STATUS_NOT_MERGED_VIEWS_MISMATCH_EXT specifies that the subpass is not merged because view masks do not match with previous subpass.

- VK_SUBPASS_MERGE_STATUS_NOT_MERGED_ALIASING_EXT specifies that the subpass is not merged because of attachments aliasing between them.

- VK_SUBPASS_MERGE_STATUS_NOT_MERGED_DEPENDENCIES_EXT specifies that the subpass is not merged because subpass dependencies do not allow merging.

- VK_SUBPASS_MERGE_STATUS_NOT_MERGED_INCOMPATIBLE_INPUT_ATTACHMENT_EXT specifies that the subpass is not merged because input attachment is not a color attachment from previous subpass or the formats are incompatible.

- VK_SUBPASS_MERGE_STATUS_NOT_MERGED_TOO_MANY_ATTACHMENTS_EXT specifies that the subpass is not merged because of too many attachments.

- VK_SUBPASS_MERGE_STATUS_NOT_MERGED_INSUFFICIENT_STORAGE_EXT specifies that the subpass is not merged because of insufficient memory.

- VK_SUBPASS_MERGE_STATUS_NOT_MERGED_DEPTH_STENCIL_COUNT_EXT specifies that the subpass is not merged because of too many depth/stencil attachments.

- VK_SUBPASS_MERGE_STATUS_NOT_MERGED_RESOLVE_ATTACHMENT_REUSE_EXT specifies that the subpass is not merged because a resolve attachment is reused as an input attachment in a subsequent subpass.

- VK_SUBPASS_MERGE_STATUS_NOT_MERGED_SINGLE_SUBPASS_EXT specifies that the subpass is not merged because the render pass has only one subpass.

- VK_SUBPASS_MERGE_STATUS_NOT_MERGED_UNSPECIFIED_EXT specifies that the subpass is not merged for unspecified reasons. Implementations should return this value when no other VkSubpassMergeStatusEXT value is appropriate.

### 8.10. Common Render Pass Data Races (Informative)

Due to the complexity of how rendering is performed, there are several ways an application can accidentally introduce a data race, usually by doing something that may seem benign but actually cannot be supported. This section indicates a number of the more common cases as guidelines to help avoid them.

#### 8.10.1. Sampling From a Read-Only Attachment

Vulkan includes read-only layouts for depth/stencil images, that allow the images to be both read during a render pass for the purposes of depth/stencil tests, and read as a non-attachment.

However, because VK_ATTACHMENT_STORE_OP_STORE and VK_ATTACHMENT_STORE_OP_DONT_CARE may perform write operations, even if no recorded command writes to an attachment, reading from an image while also using it as an attachment with these store operations can result in a data race. If the reads from the non-attachment are performed in a fragment shader where the accessed samples match those covered by the fragment shader, no data race will occur as store operations are guaranteed to operate after fragment shader execution for the set of samples the fragment covers. Notably, input attachments can also be used for this case. Reading other samples or in any other shader stage can result in unexpected behavior due to the potential for a data race, and validation errors should be generated for doing so. In practice, many applications have shipped reading samples outside of the covered fragment without any observable issue, but there is no guarantee that this will always work, and it is not advisable to rely on this in new or re-worked code bases. As VK_ATTACHMENT_STORE_OP_NONE is guaranteed to perform no writes, applications wishing to read an image as both an attachment and a non-attachment should make use of this store operation, coupled with a load operation that also performs no writes.

#### 8.10.2. Non-Overlapping Access Between Resources

When relying on non-overlapping accesses between attachments and other resources, it is important to note that load and store operations have fairly wide alignment requirements - potentially affecting entire subresources and adjacent depth/stencil aspects. This makes it invalid to access a non-attachment subresource that is simultaneously being used as an attachment where either access performs a write operation.

The only exception to this is if a subresource is explicitly specified for use as a feedback loop attachment. Feedback loop is enabled for an attachment if either of the following conditions are satisfied:

- The corresponding attachment is in the VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT layout

- For the attachment identified by VkRenderingAttachmentInfo::`imageView`, VkAttachmentFeedbackLoopInfoEXT::`feedbackLoopEnable` is VK_TRUE

In that case the overlap is defined to occur at a per-pixel granularity, and applications can read data from pixels outside the render area without introducing a data race.

In addition to the attachment layout requirements, extra state must be set for non-attachment uses to be valid. For every image aspect accessed with feedback loops, one of the following conditions must be satisfied:

- The feedback loop attachment is a color attachment, and the bound pipeline was created with VK_PIPELINE_CREATE_COLOR_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT.

- The feedback loop attachment is a depth-stencil attachment, and the bound pipeline was created with VK_PIPELINE_CREATE_DEPTH_STENCIL_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT.

- There is no bound pipeline or the bound pipeline was created with VK_DYNAMIC_STATE_ATTACHMENT_FEEDBACK_LOOP_ENABLE_EXT and the `aspectMask` state in vkCmdSetAttachmentFeedbackLoopEnableEXT has been set and not subsequently invalidated in the current command buffer, and `aspectMask` includes all aspects which require feedback loop.

#### 8.10.3. Depth/Stencil and Input Attachments

When rendering to only the depth OR stencil aspect of an image, an input attachment accessing the other aspect will not cause a data race only under very specific conditions. To avoid a data race, the aspect not being written must be in a read-only layout, and writes to it must be disabled in the draw state. For example, to read from stencil while writing depth, the attachment must be in VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL (or equivalent), and the stencil write mask must be 0. Similarly to read from depth while writing stencil, the attachment must be in VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL (or equivalent), and depth write enable must be VK_FALSE.

#### 8.10.4. Synchronization Options

There are several synchronization options available to synchronize between accesses to resources within a render pass. Some of the options are outlined below:

- A VkSubpassDependency in a render pass object can synchronize attachment writes and multisample resolve operations from a prior subpass for subsequent input attachment reads.

- A vkCmdPipelineBarrier inside a subpass can synchronize prior attachment writes in the subpass with subsequent input attachment reads.

- A vkCmdPipelineBarrier inside a subpass can synchronize prior attachment writes in the subpass with subsequent non-attachment reads if feedback loop is enabled for the attachment.

- If a subresource is used as a color and input attachment, and the pipeline performing the read was created with VK_PIPELINE_COLOR_BLEND_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_BIT_EXT

- If a subresource is used as a depth and input attachment, and the pipeline performing the read was created with VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_EXT

- If a subresource is used as a stencil and input attachment, and the pipeline performing the read was created with VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_EXT

- If a subresource is used as two separate non-attachment resources, writes to a pixel or individual sample in a fragment shader can be synchronized with access to the same pixel or sample in another fragment shader by using one of the fragment interlock execution modes.

### 8.11. Tile Shading Render Pass

Tile shading can be enabled within a render pass.

To enable tile shading for a render pass object, add a VkRenderPassTileShadingCreateInfoQCOM to the `pNext` chain of VkRenderPassCreateInfo or VkRenderPassCreateInfo2 . To enable tile shading for a dynamic render pass, add a VkRenderPassTileShadingCreateInfoQCOM to the `pNext` chain of VkRenderingInfo. To execute a secondary command buffer within a render pass, add a VkRenderPassTileShadingCreateInfoQCOM to the `pNext` chain of VkCommandBufferInheritanceInfo when the secondary command buffer is recorded.

The `VkRenderPassTileShadingCreateInfoQCOM` structure is defined as:

    // Provided by VK_QCOM_tile_shading
    typedef struct VkRenderPassTileShadingCreateInfoQCOM {
        VkStructureType                     sType;
        const void*                         pNext;
        VkTileShadingRenderPassFlagsQCOM    flags;
        VkExtent2D                          tileApronSize;
    } VkRenderPassTileShadingCreateInfoQCOM;

- `sType` is a VkStructureType value identifying this structure

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask of VkTileShadingRenderPassFlagBitsQCOM.

- `tileApronSize` is a VkExtent2D describing the is size of the tiling apron in each dimension.

If this structure is not present, the render pass will have `flags` set to `0` and `tileApronSize` is set to `(0,0)`.

Valid Usage

- VUID-VkRenderPassTileShadingCreateInfoQCOM-tileShading-10658
  If the `tileShading` feature is not enabled, VK_TILE_SHADING_RENDER_PASS_ENABLE_BIT_QCOM must not be included in `flags`

- VUID-VkRenderPassTileShadingCreateInfoQCOM-flags-10659
  If VK_TILE_SHADING_RENDER_PASS_ENABLE_BIT_QCOM is not included in `flags` or the `tileShadingApron` feature is not enabled, `tileApronSize` must be `(0,0)`

- VUID-VkRenderPassTileShadingCreateInfoQCOM-flags-10660
  If VK_TILE_SHADING_RENDER_PASS_ENABLE_BIT_QCOM is not included in `flags`, or neither the tileShadingPerTileDispatch and tileShadingPerTileDraw features are enabled, `flags` must not include VK_TILE_SHADING_RENDER_PASS_PER_TILE_EXECUTION_BIT_QCOM

- VUID-VkRenderPassTileShadingCreateInfoQCOM-tileShadingAnisotropicApron-10661
  If the `tileShadingAnisotropicApron` feature is not enabled, `tileApronSize.x` and must be equal to `tileApronSize.y`

- VUID-VkRenderPassTileShadingCreateInfoQCOM-tileApronSize-10662
  `tileApronSize.x` must be less than or equal to `maxApronSize`

- VUID-VkRenderPassTileShadingCreateInfoQCOM-tileApronSize-10663
  `tileApronSize.y` must be less than or equal to `maxApronSize`

Valid Usage (Implicit)

- VUID-VkRenderPassTileShadingCreateInfoQCOM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_RENDER_PASS_TILE_SHADING_CREATE_INFO_QCOM

- VUID-VkRenderPassTileShadingCreateInfoQCOM-flags-parameter
  `flags` must be a valid combination of VkTileShadingRenderPassFlagBitsQCOM values

Structure Chaining

Extends the structures

  - VkCommandBufferInheritanceInfo

  - VkRenderPassCreateInfo

  - VkRenderPassCreateInfo2

  - VkRenderingInfo

Bits which can be set in VkRenderPassTileShadingCreateInfoQCOM::`flags` describing additional properties of the render pass are:

    // Provided by VK_QCOM_tile_shading
    typedef enum VkTileShadingRenderPassFlagBitsQCOM {
        VK_TILE_SHADING_RENDER_PASS_ENABLE_BIT_QCOM = 0x00000001,
        VK_TILE_SHADING_RENDER_PASS_PER_TILE_EXECUTION_BIT_QCOM = 0x00000002,
    } VkTileShadingRenderPassFlagBitsQCOM;

- VK_TILE_SHADING_RENDER_PASS_ENABLE_BIT_QCOM specifies that the render pass has tile shading enabled.

- VK_TILE_SHADING_RENDER_PASS_PER_TILE_EXECUTION_BIT_QCOM specifies that the secondary command buffer will be executed within a per-tile execution block.

    // Provided by VK_QCOM_tile_shading
    typedef VkFlags VkTileShadingRenderPassFlagsQCOM;

`VkTileShadingRenderPassFlagsQCOM` is a bitmask type for setting a mask of zero or more VkTileShadingRenderPassFlagBitsQCOM.

#### 8.11.1. Tile Attachment Variables

Within a tile shading render pass, fragment and compute shader invocations can use the Tile Attachment Interface to perform load/store, operations on storage tile attachment variables, to perform load operations on input tile attachment variables, and to perform sampling operations on sampled tile attachment variables. Storage tile attachment, sampled tile attachment, and input tile attachment variables must be declared and used as described in the tile attachment interface.

#### 8.11.2. Tiling Aprons

In a render pass that enables tile shading, a tiling apron can be enabled by setting VkRenderPassTileShadingCreateInfoQCOM::`tileApronSize` to a value other than (0,0). Additionally, subpass `flags` must include VK_SUBPASS_DESCRIPTION_TILE_SHADING_APRON_BIT_QCOM if the render pass is not a dynamic render pass or the apron size for that subpass will be (0,0). The tile apron enables shader invocations to load from tile attachment variables at a location that is outside the current tile. The `width` and `height` value of `tileApronSize` specifies the number of pixels in the horizontal and vertical directions that are included in the apron region. For example, (1,1) means that the apron region extends the top, bottom, left, and right margins of the tile by 1 pixel. The `tileApronSize` must not exceed VkPhysicalDeviceTileShadingPropertiesQCOM::`maxApronSize`.

Note | A good mental model for the tiling apron is to think of it as enabling "overlapping tiles". The top/bottom and left/right margins of each tile are extended to include a few pixels of the adjacent tiles. Those pixels that are outside the original tile extents, but within the apron extents are “apron pixels”. In a render pass that enables tile shading, apron pixels will be initialized by the VkAttachmentLoadOp, and may be updated by any draw within the render pass, but are always discarded and never written by VkAttachmentStoreOp. Apron pixels can be read as a result of using `OpImageRead`, `OpImageSparseRead`, `OpImageSample*`, `OpImageSparseSample*`, `OpImage*Gather`, `OpImageSparse*Gather`, `OpImageGatherQCOM`, `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatch*QCOM`, `OpImageFetch`, or `OpImageSparseFetch` but cannot be written using `OpImageWrite` or with atomic operations using `OpImageTexelPointer`. For image processing use cases, the tiling apron allows fragment and compute shader invocations to read or sample color attachment pixels within the neighborhood of a given fragment, even if the given fragment is close to a tile edge. Enabling the apron may reduce the GPU efficiency, with larger apron sizes having a greater potential impact. Aprons should be enabled only when needing to access pixels outside the tile.

#### 8.11.3. Tile Attachment Coordinate Validation

Image operations that access a tile attachment can use normalized, unnormalized, or integer texel coordinates, but the final set of (i,j,[k]) integer texel coordinates accessed in texel filtering must be within the extents of the current tile and apron as well as within the render pass `renderArea`. Any out of bounds shader access will result in poison.

The robustImageAccess and robustImageAccess2 features do not apply to tile attachment accesses.

The built-in variables `TileOffsetQCOM`, TileApronSizeQCOM, and `TileDimensionQCOM` define the extent of the current tile and apron.

For storage tile attachment stores using `OpImageWrite` and with an `Image` operand from storage class `TileAttachmentQCOM`, the `Coordinate` operand O s​ must specify a framebuffer location within the render pass `renderArea` and within the extent of the tile.

O min​O max​O min​≤​=max(O r a​,O t​)=min((O r a​+E r a​),(O t​+S i z e t​))O s​<O max​​

For storage tile attachment using `OpImageRead` or `OpImageSparseRead`, or input tile attachment loads using `OpImageRead`, and with an `Image` operand from storage class `TileAttachmentQCOM`, the `Coordinate` operand O l​ must specify a framebuffer location within the render pass `renderArea` and within the combined extent of the tile and apron.

O min​O max​O min​≤​=max(O r a​,O t​−S i z e a​)=min((O r a​+E r a​),(O t​+S i z e t​+S i z e a​))O l​<O max​​

where:

  O s​ represents `offset` operand to `OpImageWrite`

  O l​ represents `offset` operand to `OpImageRead`

  O t​ represents TileOffsetQCOM

  S i z e t​ represents TileDimensionQCOM

  O r a​ represents the render pass `renderArea.offset`

  E r a​ represents the render pass `renderArea.extent`

  S i z e a​ represents TileApronSizeQCOM

For storage tile attachment atomic operations using `OpImageTexelPointer`, the `Coordinate` operand must specify a framebuffer location within the render pass `RenderArea` and within the extent of the tile. The `Coordinate` must not point to the apron region.

When accessing a sampled tile attachment using `OpImageSample*`, `OpImageSparseSample*`, `OpImageFetch`, `OpImageSparseFetch*`, `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatch*QCOM`, `OpImage*Gather`, `OpImageGatherQCOM`, or `OpImageSparse*Gather`, and with an `Image` operand from storage class `TileAttachmentQCOM`, the `Coordinate` operand must not result in a any texels accessed that are outside the `renderArea` or outside the combined extent of the tile and apron.

Note | It is the application’s responsibility to guarantee that the instruction and texture coordinates do not cause any out of bounds texels to be accessed as a result of loads, stores, atomics, or the sampling filter. In practice, this may require that the coordinates are clamped in the shader code.

#### 8.11.4. Tile Shading Fragment Regions

If tile shading is enabled for a render pass instance, then framebuffer-local dependencies defined using VK_DEPENDENCY_BY_REGION_BIT specify a framebuffer region equal to the region covered by the active tile.

When per-tile execution model is enabled an active tile is associated with each of the per-tile command invocations with an extent described by shader built-in variables `TileOffsetQCOM`, `TileDimensionQCOM`, and `TileApronSizeQCOM`. Otherwise, the extent of the active tile is defined by the tile exposed by `VK_QCOM_tile_properties` that contains the framebuffer coordinate (x, y, z) of the fragment being processed.

Note | Without tile shading the framebuffer region described by VK_DEPENDENCY_BY_REGION_BIT must be assumed by applications to be no larger than a single pixel or single sample. The larger tile-sized framebuffer region provided by tile shading allows applications to achieve increased rendering efficiency on some tiling architectures. It enables synchronization commands with a framebuffer-local dependency to be used for a dependency across fragments with different framebuffer coordinates, as long as the fragments are located within the same tile. In this situation, it avoids an otherwise required framebuffer-global dependency and corresponding data flushing to memory as noted in the synchronization chapter.

#### 8.11.5. Per-Tile Execution Model

Within a tile shading render pass instance, the per-tile execution model can be enabled.

To enable the per-tile execution model, call:

    // Provided by VK_QCOM_tile_shading
    void vkCmdBeginPerTileExecutionQCOM(
        VkCommandBuffer                             commandBuffer,
        const VkPerTileBeginInfoQCOM*               pPerTileBeginInfo);

- `commandBuffer` is the command buffer in which to record the command.

- `pPerTileBeginInfo` is a pointer to a VkPerTileBeginInfoQCOM structure containing information about how the per-tile execution model is started.

When per-tile execution model is enabled, recorded `vkCmdDraw*` or `vkCmdDispatch*` commands are invoked per tile. That is, the recorded draw or dispatch is invoked exactly once for each covered tile. The set of covered tiles for a given render pass instance consists of the set of render pass tiles, which can be queried with `VK_QCOM_tile_properties`, that are completely or partially covered by the `renderArea` for the render pass instance. The draw or dispatch commands may be invoked for uncovered tiles.

Each per-tile command invocation is associated with a single tile, the active tile. These per-tile invocations are not specified to execute in any particular order, but the size and offset of the active tile is available via shader built-ins.

When per-tile execution model is enabled, the following restrictions apply:

- Transform feedback commands such as vkCmdBeginTransformFeedbackEXT, vkCmdEndTransformFeedbackEXT, vkCmdBeginQueryIndexedEXT, and vkCmdEndQueryIndexedEXT, must not be recorded.

- Query commands such as vkCmdWriteTimestamp, vkCmdDebugMarkerBeginEXT, vkCmdDebugMarkerEndEXT, vkCmdDebugMarkerInsertEXT, vkCmdBeginQuery, and vkCmdEndQuery, must not be recorded.

- Event commands such as vkCmdWaitEvents2 and vkCmdWaitEvents must not be recorded.

- Render pass clears like vkCmdClearAttachments must not be recorded

- Access of an attachment with layout VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT as provided by `VK_EXT_attachment_feedback_loop_layout` is disallowed

- Any commands that would cause a invocations of one of the following shader stages are not allowed

  - tessellation

  - geometry

  - ray tracing

  - mesh shading

Valid Usage

- VUID-vkCmdBeginPerTileExecutionQCOM-None-10664
  The current render pass must be a tile shading render pass

- VUID-vkCmdBeginPerTileExecutionQCOM-None-10665
  The tileShadingPerTileDispatch or tileShadingPerTileDraw feature must be enabled

Valid Usage (Implicit)

- VUID-vkCmdBeginPerTileExecutionQCOM-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdBeginPerTileExecutionQCOM-pPerTileBeginInfo-parameter
  `pPerTileBeginInfo` must be a valid pointer to a valid VkPerTileBeginInfoQCOM structure

- VUID-vkCmdBeginPerTileExecutionQCOM-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdBeginPerTileExecutionQCOM-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, or VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdBeginPerTileExecutionQCOM-renderpass
  This command must only be called inside of a render pass instance

- VUID-vkCmdBeginPerTileExecutionQCOM-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Inside | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdBeginPerTileExecutionQCOM is not affected by conditional rendering

The `VkPerTileBeginInfoQCOM` structure is defined as:

    // Provided by VK_QCOM_tile_shading
    typedef struct VkPerTileBeginInfoQCOM {
        VkStructureType    sType;
        const void*        pNext;
    } VkPerTileBeginInfoQCOM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

Valid Usage (Implicit)

- VUID-VkPerTileBeginInfoQCOM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PER_TILE_BEGIN_INFO_QCOM

- VUID-VkPerTileBeginInfoQCOM-pNext-pNext
  `pNext` must be `NULL`

To disable per-tile execution model, call:

    // Provided by VK_QCOM_tile_shading
    void vkCmdEndPerTileExecutionQCOM(
        VkCommandBuffer                             commandBuffer,
        const VkPerTileEndInfoQCOM*                 pPerTileEndInfo);

- `commandBuffer` is the command buffer in which to record the command.

- `pPerTileEndInfo` is a pointer to a VkPerTileEndInfoQCOM structure containing information about how the per-tile execution model is ended.

This command disables per-tile execution model.

Valid Usage

- VUID-vkCmdEndPerTileExecutionQCOM-None-10666
  The per-tile execution model must have been enabled in the current render pass

- VUID-vkCmdEndPerTileExecutionQCOM-None-10667
  The current render pass must be a tile shading render pass

Valid Usage (Implicit)

- VUID-vkCmdEndPerTileExecutionQCOM-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdEndPerTileExecutionQCOM-pPerTileEndInfo-parameter
  `pPerTileEndInfo` must be a valid pointer to a valid VkPerTileEndInfoQCOM structure

- VUID-vkCmdEndPerTileExecutionQCOM-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdEndPerTileExecutionQCOM-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, or VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdEndPerTileExecutionQCOM-renderpass
  This command must only be called inside of a render pass instance

- VUID-vkCmdEndPerTileExecutionQCOM-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Inside | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdEndPerTileExecutionQCOM is not affected by conditional rendering

The `VkPerTileEndInfoQCOM` structure is defined as:

    // Provided by VK_QCOM_tile_shading
    typedef struct VkPerTileEndInfoQCOM {
        VkStructureType    sType;
        const void*        pNext;
    } VkPerTileEndInfoQCOM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

Valid Usage (Implicit)

- VUID-VkPerTileEndInfoQCOM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PER_TILE_END_INFO_QCOM

- VUID-VkPerTileEndInfoQCOM-pNext-pNext
  `pNext` must be `NULL`

#### 8.11.6. Area-Based Dispatch

When the per-tile execution model is enabled, the command vkCmdDispatchTileQCOM can be used to provide an area-based dispatch, where the implementation determines the work group count and size based on the tile size and a given shading rate.

## 9. Shaders

A shader specifies programmable operations that execute for each vertex, control point, tessellated vertex, primitive, fragment, or workgroup in the corresponding stage(s) of the graphics and compute pipelines.

Graphics pipelines include vertex shader execution as a result of primitive assembly, followed, if enabled, by tessellation control and evaluation shaders operating on patches, geometry shaders, if enabled, operating on primitives, and fragment shaders, if present, operating on fragments generated by Rasterization. In this specification, vertex, tessellation control, tessellation evaluation and geometry shaders are collectively referred to as pre-rasterization shader stages and occur in the logical pipeline before rasterization. The fragment shader occurs logically after rasterization.

Only the compute shader stage is included in a compute pipeline. Compute shaders operate on compute invocations in a workgroup.

Shaders can read from input variables, and read from and write to output variables. Input and output variables can be used to transfer data between shader stages, or to allow the shader to interact with values that exist in the execution environment. Similarly, the execution environment provides constants describing capabilities.

Shader variables are associated with execution environment-provided inputs and outputs using built-in decorations in the shader. The available decorations for each stage are documented in the following subsections.

### 9.1. Shader Objects

Shaders may be compiled and linked into pipeline objects as described in Pipelines chapter, or if the `shaderObject` feature is enabled they may be compiled into individual per-stage shader objects which can be bound on a command buffer independently from one another. Unlike pipelines, shader objects are not intrinsically tied to any specific set of state. Instead, state is specified dynamically in the command buffer.

Each shader object represents a single compiled shader stage, which may optionally be linked with one or more other stages.

Shader objects are represented by `VkShaderEXT` handles:

    // Provided by VK_EXT_shader_object
    VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkShaderEXT)

#### 9.1.1. Shader Object Creation

Shader objects may be created from shader code provided as SPIR-V, or in an opaque, implementation-defined binary format specific to the physical device.

To create one or more shader objects, call:

    // Provided by VK_EXT_shader_object
    VkResult vkCreateShadersEXT(
        VkDevice                                    device,
        uint32_t                                    createInfoCount,
        const VkShaderCreateInfoEXT*                pCreateInfos,
        const VkAllocationCallbacks*                pAllocator,
        VkShaderEXT*                                pShaders);

- `device` is the logical device that creates the shader objects.

- `createInfoCount` is the length of the `pCreateInfos` and `pShaders` arrays.

- `pCreateInfos` is a pointer to an array of VkShaderCreateInfoEXT structures.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

- `pShaders` is a pointer to an array of VkShaderEXT handles in which the resulting shader objects are returned.

When this function returns, whether or not it succeeds, it is guaranteed that every element of `pShaders` will have been overwritten by either VK_NULL_HANDLE or a valid `VkShaderEXT` handle.

This means that whenever shader creation fails, the application can determine which shader the returned error pertains to by locating the first VK_NULL_HANDLE element in `pShaders`. It also means that an application can reliably clean up from a failed call by iterating over the `pShaders` array and destroying every element that is not VK_NULL_HANDLE.

Valid Usage

- VUID-vkCreateShadersEXT-stage-09670
  If the `stage` member of any element of `pCreateInfos` is VK_SHADER_STAGE_COMPUTE_BIT, `device` must support at least one queue family with the VK_QUEUE_COMPUTE_BIT capability

- VUID-vkCreateShadersEXT-stage-09671
  If the `stage` member of any element of `pCreateInfos` is VK_SHADER_STAGE_TASK_BIT_EXT, VK_SHADER_STAGE_MESH_BIT_EXT, VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT, VK_SHADER_STAGE_GEOMETRY_BIT, or VK_SHADER_STAGE_FRAGMENT_BIT, `device` must support at least one queue family with the VK_QUEUE_GRAPHICS_BIT capability

- VUID-vkCreateShadersEXT-None-08400
  The `shaderObject` feature must be enabled

- VUID-vkCreateShadersEXT-pCreateInfos-08402
  If the `flags` member of any element of `pCreateInfos` includes VK_SHADER_CREATE_LINK_STAGE_BIT_EXT, the `flags` member of all other elements of `pCreateInfos` whose `stage` is VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT, VK_SHADER_STAGE_GEOMETRY_BIT, or VK_SHADER_STAGE_FRAGMENT_BIT must also include VK_SHADER_CREATE_LINK_STAGE_BIT_EXT

- VUID-vkCreateShadersEXT-pCreateInfos-08403
  If the `flags` member of any element of `pCreateInfos` includes VK_SHADER_CREATE_LINK_STAGE_BIT_EXT, the `flags` member of all other elements of `pCreateInfos` whose `stage` is VK_SHADER_STAGE_TASK_BIT_EXT or VK_SHADER_STAGE_MESH_BIT_EXT must also include VK_SHADER_CREATE_LINK_STAGE_BIT_EXT

- VUID-vkCreateShadersEXT-pCreateInfos-08404
  If the `flags` member of any element of `pCreateInfos` whose `stage` is VK_SHADER_STAGE_TASK_BIT_EXT or VK_SHADER_STAGE_MESH_BIT_EXT includes VK_SHADER_CREATE_LINK_STAGE_BIT_EXT, there must be no member of `pCreateInfos` whose `flags` member includes VK_SHADER_CREATE_LINK_STAGE_BIT_EXT and whose `stage` is any of VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_GEOMETRY_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, or VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT

- VUID-vkCreateShadersEXT-pCreateInfos-08405
  If there is any element of `pCreateInfos` whose `stage` is VK_SHADER_STAGE_MESH_BIT_EXT and whose `flags` member includes both VK_SHADER_CREATE_LINK_STAGE_BIT_EXT and VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT, there must be no element of `pCreateInfos` whose `stage` is VK_SHADER_STAGE_TASK_BIT_EXT and whose `flags` member includes VK_SHADER_CREATE_LINK_STAGE_BIT_EXT

- VUID-vkCreateShadersEXT-pCreateInfos-08409
  For each element of `pCreateInfos` whose `flags` member includes VK_SHADER_CREATE_LINK_STAGE_BIT_EXT, if there is any other element of `pCreateInfos` whose `stage` is logically later than the `stage` of the former and whose `flags` member also includes VK_SHADER_CREATE_LINK_STAGE_BIT_EXT, the `nextStage` of the former must be equal to the `stage` of the element with the logically earliest `stage` following the `stage` of the former whose `flags` member also includes VK_SHADER_CREATE_LINK_STAGE_BIT_EXT

- VUID-vkCreateShadersEXT-pCreateInfos-08410
  The `stage` member of each element of `pCreateInfos` whose `flags` member includes VK_SHADER_CREATE_LINK_STAGE_BIT_EXT must be unique

- VUID-vkCreateShadersEXT-pCreateInfos-08411
  The `codeType` member of all elements of `pCreateInfos` whose `flags` member includes VK_SHADER_CREATE_LINK_STAGE_BIT_EXT must be the same

- VUID-vkCreateShadersEXT-pCreateInfos-12224
  If `pCreateInfos` contains elements with both VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT, both elements' `flags` include VK_SHADER_CREATE_LINK_STAGE_BIT_EXT, both elements' `codeType` is VK_SHADER_CODE_TYPE_SPIRV_EXT, at least one must contain an `OpExecutionMode` instruction specifying the orientation of triangles generated by the tessellator

- VUID-vkCreateShadersEXT-pCreateInfos-12225
  If `pCreateInfos` contains elements with both VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT, both elements' `flags` include VK_SHADER_CREATE_LINK_STAGE_BIT_EXT, both elements' `codeType` is VK_SHADER_CODE_TYPE_SPIRV_EXT, at least one must contain an `OpExecutionMode` instruction specifying the spacing of segments on the edges of tessellated primitives

- VUID-vkCreateShadersEXT-pCreateInfos-08867
  If `pCreateInfos` contains elements with both VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT, both elements' `flags` include VK_SHADER_CREATE_LINK_STAGE_BIT_EXT, both elements' `codeType` is VK_SHADER_CODE_TYPE_SPIRV_EXT, and both stages contains an `OpExecutionMode` instruction specifying the type of subdivision, they must be the same

- VUID-vkCreateShadersEXT-pCreateInfos-08868
  If `pCreateInfos` contains elements with both VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT, both elements' `flags` include VK_SHADER_CREATE_LINK_STAGE_BIT_EXT, both elements' `codeType` is VK_SHADER_CODE_TYPE_SPIRV_EXT, and both stages contains an `OpExecutionMode` instruction specifying the orientation of triangles, they must be the same

- VUID-vkCreateShadersEXT-pCreateInfos-08870
  If `pCreateInfos` contains elements with both VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT, both elements' `flags` include VK_SHADER_CREATE_LINK_STAGE_BIT_EXT, both elements' `codeType` is VK_SHADER_CODE_TYPE_SPIRV_EXT, and both stages contains an `OpExecutionMode` instruction specifying the spacing of segments on the edges of tessellated primitives, they must be the same

- VUID-vkCreateShadersEXT-pCreateInfos-08871
  If `pCreateInfos` contains elements with both VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT, both elements' `flags` include VK_SHADER_CREATE_LINK_STAGE_BIT_EXT, both elements' `codeType` is VK_SHADER_CODE_TYPE_SPIRV_EXT, and both stages contains an `OpExecutionMode` instruction specifying the output patch size, they must be the same

- VUID-vkCreateShadersEXT-pCreateInfos-09632
  If `pCreateInfos` contains a VK_SHADER_STAGE_MESH_BIT_EXT with `codeType` of VK_SHADER_CODE_TYPE_SPIRV_EXT and VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT is not set, then the mesh shader’s entry point must not declare a variable with a `DrawIndex` `BuiltIn` decoration

- VUID-vkCreateShadersEXT-pCreateInfos-11413
  If any element of `pCreateInfos` sets VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT and includes embedded sampler mappings, there must be less than (`maxSamplerAllocationCount` - (`minSamplerHeapReservedRangeWithEmbedded` / `samplerDescriptorSize`)) VkSampler objects currently created on the device

- VUID-vkCreateShadersEXT-pCreateInfos-11428
  If any element of `pCreateInfos` sets VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT and includes embedded sampler mappings, this command must not cause the total number of unique embedded samplers in pipelines and shaders on this device to exceed `maxDescriptorHeapEmbeddedSamplers`

- VUID-vkCreateShadersEXT-flags-11472
  If the `flags` member of any element of `pCreateInfos` includes VK_SHADER_CREATE_LINK_STAGE_BIT_EXT and VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT, the `flags` member of all other elements of `pCreateInfos` whose `stage` is VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT, VK_SHADER_STAGE_GEOMETRY_BIT, VK_SHADER_STAGE_TASK_BIT_EXT, VK_SHADER_STAGE_MESH_BIT_EXT, or VK_SHADER_STAGE_FRAGMENT_BIT must also include VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT

Valid Usage (Implicit)

- VUID-vkCreateShadersEXT-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkCreateShadersEXT-pCreateInfos-parameter
  `pCreateInfos` must be a valid pointer to an array of `createInfoCount` valid VkShaderCreateInfoEXT structures

- VUID-vkCreateShadersEXT-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateShadersEXT-pShaders-parameter
  `pShaders` must be a valid pointer to an array of `createInfoCount` VkShaderEXT handles

- VUID-vkCreateShadersEXT-createInfoCount-arraylength
  `createInfoCount` must be greater than `0`

Return Codes

Success

  - VK_INCOMPATIBLE_SHADER_BINARY_EXT

  - VK_SUCCESS

Failure

  - VK_ERROR_INITIALIZATION_FAILED

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkShaderCreateInfoEXT` structure is defined as:

    // Provided by VK_EXT_shader_object
    typedef struct VkShaderCreateInfoEXT {
        VkStructureType                 sType;
        const void*                     pNext;
        VkShaderCreateFlagsEXT          flags;
        VkShaderStageFlagBits           stage;
        VkShaderStageFlags              nextStage;
        VkShaderCodeTypeEXT             codeType;
        size_t                          codeSize;
        const void*                     pCode;
        const char*                     pName;
        uint32_t                        setLayoutCount;
        const VkDescriptorSetLayout*    pSetLayouts;
        uint32_t                        pushConstantRangeCount;
        const VkPushConstantRange*      pPushConstantRanges;
        const VkSpecializationInfo*     pSpecializationInfo;
    } VkShaderCreateInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask of VkShaderCreateFlagBitsEXT describing additional parameters of the shader.

- `stage` is a VkShaderStageFlagBits value specifying a single shader stage.

- `nextStage` is a bitmask of VkShaderStageFlagBits specifying which stages can be used as a logically next bound stage when drawing with the shader bound. A value of zero indicates this shader stage must be the last one.

- `codeType` is a VkShaderCodeTypeEXT value specifying the type of the shader code pointed to be `pCode`.

- `codeSize` is the size in bytes of the shader code pointed to be `pCode`.

- `pCode` is a pointer to the shader code to use to create the shader.

- `pName` is a pointer to a null-terminated UTF-8 string specifying the entry point name of the shader for this stage.

- `setLayoutCount` is the number of descriptor set layouts pointed to by `pSetLayouts`.

- `pSetLayouts` is a pointer to an array of VkDescriptorSetLayout objects used by the shader stage. The implementation must not access these objects outside of the duration of the command this structure is passed to.

- `pushConstantRangeCount` is the number of push constant ranges pointed to by `pPushConstantRanges`.

- `pPushConstantRanges` is a pointer to an array of VkPushConstantRange structures used by the shader stage.

- `pSpecializationInfo` is a pointer to a VkSpecializationInfo structure, as described in Specialization Constants, or `NULL`.

When determining pipeline layout compatibility, compatibility is determined as if a the shader was created with a pipeline layout object that was created with identical values of `setLayoutCount`, `pSetLayouts`, `pushConstantRangeCount`, and `pPushConstantRanges`, and with VkPipelineLayoutCreateInfo::`flags` set to 0. If `flags` includes VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT, the shader is not considered created with a pipeline layout.

When specifying descriptor heap mappings, only mappings corresponding to bindings that are actually present in the SPIR-V shader affect compilation. Mappings are ignored when `codeType` is VK_SHADER_CODE_TYPE_BINARY_EXT. The resulting compiled binary from two different SPIR-V shaders which would have identical bit patterns must remain identical even if the mapping entries vary in any of the following ways:

- Different numbers of unused mapping structures

- Different binding counts for unused bindings

- Unused parameters in mapping structures (e.g. sampler offsets)

- Ignored parameters in mapping structures

- Different order of mapping structures, used or unused

Note | Calculating the same offset in a mapping via different parameter values is not guaranteed to provide identical results.

Valid Usage

- VUID-VkShaderCreateInfoEXT-codeSize-08735
  If `codeType` is VK_SHADER_CODE_TYPE_SPIRV_EXT, `codeSize` must be a multiple of 4

- VUID-VkShaderCreateInfoEXT-pCode-08736
  If `codeType` is VK_SHADER_CODE_TYPE_SPIRV_EXT, `pCode` must point to valid SPIR-V code, formatted and packed as described by the Khronos SPIR-V Specification

- VUID-VkShaderCreateInfoEXT-pCode-08737
  If `codeType` is VK_SHADER_CODE_TYPE_SPIRV_EXT, `pCode` must adhere to the validation rules described by the Validation Rules within a Module section of the SPIR-V Environment appendix

- VUID-VkShaderCreateInfoEXT-pCode-08738
  If `codeType` is VK_SHADER_CODE_TYPE_SPIRV_EXT, `pCode` must declare the `Shader` capability for SPIR-V code

- VUID-VkShaderCreateInfoEXT-pCode-08739
  If `codeType` is VK_SHADER_CODE_TYPE_SPIRV_EXT, `pCode` must not declare any capability that is not supported by the API, as described by the Capabilities section of the SPIR-V Environment appendix

- VUID-VkShaderCreateInfoEXT-pCode-08740
  If `codeType` is VK_SHADER_CODE_TYPE_SPIRV_EXT, and `pCode` declares any of the capabilities listed in the SPIR-V Environment appendix, one of the corresponding requirements must be satisfied

- VUID-VkShaderCreateInfoEXT-pCode-08741
  If `codeType` is VK_SHADER_CODE_TYPE_SPIRV_EXT, `pCode` must not declare any SPIR-V extension that is not supported by the API, as described by the Extension section of the SPIR-V Environment appendix

- VUID-VkShaderCreateInfoEXT-pCode-08742
  If `codeType` is VK_SHADER_CODE_TYPE_SPIRV_EXT, and `pCode` declares any of the SPIR-V extensions listed in the SPIR-V Environment appendix, one of the corresponding requirements must be satisfied

- VUID-VkShaderCreateInfoEXT-descriptorHeap-11314
  If the `descriptorHeap` feature is not enabled, VkShaderDescriptorSetAndBindingMappingInfoEXT::`mappingCount` must be 0

- VUID-VkShaderCreateInfoEXT-pNext-11315
  If the `pNext` chain specifies a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_DATA_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT, the mapped resource in the shader must be a variable with a structure type decorated with `Block` in the `Uniform` `Storage` `Class`

- VUID-VkShaderCreateInfoEXT-pNext-11316
  If the `pNext` chain specifies a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_DATA_EXT, the mapped structure must not be larger than `maxPushDataSize` minus the `pushDataOffset` used in the mapping

- VUID-VkShaderCreateInfoEXT-pNext-12454
  If the `pNext` chain specifies a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_DATA_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, and there is a variable in the shader that matches the mapping, the `stage` must be a ray tracing stage

- VUID-VkShaderCreateInfoEXT-pNext-11317
  If the `pNext` chain specifies a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_DATA_EXT, the sum of mapped structure size and `shaderRecordDataOffset` used in the mapping must not be larger than `maxShaderGroupStride`

- VUID-VkShaderCreateInfoEXT-pNext-11318
  If the `pNext` chain specifies a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT the mapped resource in the shader must be one of:

  - A variable with a structure type decorated with `Block` in the `Uniform` `Storage` `Class`

  - A variable with a structure type decorated with `BufferBlock` in the `Uniform` `Storage` `Class`

  - A variable with a structure type decorated with `Block` in the `StorageBuffer` `Storage` `Class`

  - A `OpTypeAccelerationStructureKHR` variable

  - A `OpTypeAccelerationStructureNV` variable

- VUID-VkShaderCreateInfoEXT-pNext-11378
  If the `pNext` chain specifies a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, the `OpArrayLength` or `OpUntypedArrayLengthKHR` instruction must not be used on that resource

- VUID-VkShaderCreateInfoEXT-pNext-11399
  If the `pNext` chain specifies a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_CONSTANT_OFFSET_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, and the mapped resource declaration is an array, the `pEmbeddedSampler` member of the corresponding mapping structure must be `NULL`

- VUID-VkShaderCreateInfoEXT-flags-08412
  If `stage` is not VK_SHADER_STAGE_TASK_BIT_EXT, VK_SHADER_STAGE_MESH_BIT_EXT, VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT, VK_SHADER_STAGE_GEOMETRY_BIT, or VK_SHADER_STAGE_FRAGMENT_BIT, `flags` must not include VK_SHADER_CREATE_LINK_STAGE_BIT_EXT

- VUID-VkShaderCreateInfoEXT-flags-08486
  If `stage` is not VK_SHADER_STAGE_FRAGMENT_BIT, `flags` must not include VK_SHADER_CREATE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_EXT

- VUID-VkShaderCreateInfoEXT-flags-08487
  If the `attachmentFragmentShadingRate` feature is not enabled, `flags` must not include VK_SHADER_CREATE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_EXT

- VUID-VkShaderCreateInfoEXT-flags-08488
  If `stage` is not VK_SHADER_STAGE_FRAGMENT_BIT, `flags` must not include VK_SHADER_CREATE_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT

- VUID-VkShaderCreateInfoEXT-flags-08489
  If the `fragmentDensityMap` feature is not enabled, `flags` must not include VK_SHADER_CREATE_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT

- VUID-VkShaderCreateInfoEXT-micromap-11623
  If `flags` includes VK_SHADER_CREATE_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_EXT, the `VkPhysicalDeviceOpacityMicromapFeaturesKHR`::`micromap` feature must be enabled

- VUID-VkShaderCreateInfoEXT-flags-09404
  If `flags` includes VK_SHADER_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT_EXT, the `subgroupSizeControl` feature must be enabled

- VUID-VkShaderCreateInfoEXT-flags-09405
  If `flags` includes VK_SHADER_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXT, the `computeFullSubgroups` feature must be enabled

- VUID-VkShaderCreateInfoEXT-flags-11005
  If `flags` includes VK_SHADER_CREATE_INDIRECT_BINDABLE_BIT_EXT, then the `VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT`::`deviceGeneratedCommands` feature must be enabled

- VUID-VkShaderCreateInfoEXT-flags-11006
  If `flags` includes VK_SHADER_CREATE_INDIRECT_BINDABLE_BIT_EXT, then the identified entry point must not specify `Xfb` execution mode

- VUID-VkShaderCreateInfoEXT-flags-08992
  If `flags` includes VK_SHADER_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXT, `stage` must be one of VK_SHADER_STAGE_MESH_BIT_EXT, VK_SHADER_STAGE_TASK_BIT_EXT, or VK_SHADER_STAGE_COMPUTE_BIT

- VUID-VkShaderCreateInfoEXT-flags-08485
  If `stage` is not VK_SHADER_STAGE_COMPUTE_BIT, `flags` must not include VK_SHADER_CREATE_DISPATCH_BASE_BIT_EXT

- VUID-VkShaderCreateInfoEXT-flags-08414
  If `stage` is not VK_SHADER_STAGE_MESH_BIT_EXT, `flags` must not include VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT

- VUID-VkShaderCreateInfoEXT-flags-08416
  If `flags` includes both VK_SHADER_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT_EXT and VK_SHADER_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXT, the local workgroup size in the X dimension of the shader must be a multiple of `maxSubgroupSize`

- VUID-VkShaderCreateInfoEXT-flags-08417
  If `flags` includes VK_SHADER_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXT but not VK_SHADER_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT_EXT and no VkShaderRequiredSubgroupSizeCreateInfoEXT structure is included in the `pNext` chain, the local workgroup size in the X dimension of the shader must be a multiple of `subgroupSize`

- VUID-VkShaderCreateInfoEXT-stage-08418
  `stage` must not be VK_SHADER_STAGE_ALL_GRAPHICS or VK_SHADER_STAGE_ALL

- VUID-VkShaderCreateInfoEXT-stage-08419
  If the `tessellationShader` feature is not enabled, `stage` must not be VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT or VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT

- VUID-VkShaderCreateInfoEXT-stage-08420
  If the `geometryShader` feature is not enabled, `stage` must not be VK_SHADER_STAGE_GEOMETRY_BIT

- VUID-VkShaderCreateInfoEXT-stage-08421
  If the `taskShader` feature is not enabled, `stage` must not be VK_SHADER_STAGE_TASK_BIT_EXT

- VUID-VkShaderCreateInfoEXT-stage-08422
  If the `meshShader` feature is not enabled, `stage` must not be VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-VkShaderCreateInfoEXT-stage-08425
  `stage` must not be VK_SHADER_STAGE_SUBPASS_SHADING_BIT_HUAWEI

- VUID-VkShaderCreateInfoEXT-stage-08426
  `stage` must not be VK_SHADER_STAGE_CLUSTER_CULLING_BIT_HUAWEI

- VUID-VkShaderCreateInfoEXT-nextStage-08427
  If `stage` is VK_SHADER_STAGE_VERTEX_BIT, `nextStage` must not include any bits other than VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_GEOMETRY_BIT, and VK_SHADER_STAGE_FRAGMENT_BIT

- VUID-VkShaderCreateInfoEXT-nextStage-08428
  If the `tessellationShader` feature is not enabled, `nextStage` must not include VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT or VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT

- VUID-VkShaderCreateInfoEXT-nextStage-08429
  If the `geometryShader` feature is not enabled, `nextStage` must not include VK_SHADER_STAGE_GEOMETRY_BIT

- VUID-VkShaderCreateInfoEXT-nextStage-08430
  If `stage` is VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, `nextStage` must not include any bits other than VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT

- VUID-VkShaderCreateInfoEXT-nextStage-08431
  If `stage` is VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT, `nextStage` must not include any bits other than VK_SHADER_STAGE_GEOMETRY_BIT and VK_SHADER_STAGE_FRAGMENT_BIT

- VUID-VkShaderCreateInfoEXT-nextStage-08433
  If `stage` is VK_SHADER_STAGE_GEOMETRY_BIT, `nextStage` must not include any bits other than VK_SHADER_STAGE_FRAGMENT_BIT

- VUID-VkShaderCreateInfoEXT-nextStage-08434
  If `stage` is VK_SHADER_STAGE_FRAGMENT_BIT or VK_SHADER_STAGE_COMPUTE_BIT, `nextStage` must be 0

- VUID-VkShaderCreateInfoEXT-nextStage-08435
  If `stage` is VK_SHADER_STAGE_TASK_BIT_EXT, `nextStage` must not include any bits other than VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-VkShaderCreateInfoEXT-nextStage-08436
  If `stage` is VK_SHADER_STAGE_MESH_BIT_EXT, `nextStage` must not include any bits other than VK_SHADER_STAGE_FRAGMENT_BIT

- VUID-VkShaderCreateInfoEXT-pName-08440
  If `codeType` is VK_SHADER_CODE_TYPE_SPIRV_EXT, `pName` must be the name of an `OpEntryPoint` in `pCode` with an execution model that matches `stage`

- VUID-VkShaderCreateInfoEXT-pCode-08492
  If `codeType` is VK_SHADER_CODE_TYPE_BINARY_EXT, `pCode` must be aligned to `16` bytes

- VUID-VkShaderCreateInfoEXT-pCode-08493
  If `codeType` is VK_SHADER_CODE_TYPE_SPIRV_EXT, `pCode` must be aligned to `4` bytes

- VUID-VkShaderCreateInfoEXT-pCode-08448
  If `codeType` is VK_SHADER_CODE_TYPE_SPIRV_EXT, and the identified entry point includes any variable in its interface that is declared with the `ClipDistance` `BuiltIn` decoration, that variable must not have an array size greater than `VkPhysicalDeviceLimits`::`maxClipDistances`

- VUID-VkShaderCreateInfoEXT-pCode-08449
  If `codeType` is VK_SHADER_CODE_TYPE_SPIRV_EXT, and the identified entry point includes any variable in its interface that is declared with the `CullDistance` `BuiltIn` decoration, that variable must not have an array size greater than `VkPhysicalDeviceLimits`::`maxCullDistances`

- VUID-VkShaderCreateInfoEXT-pCode-08450
  If `codeType` is VK_SHADER_CODE_TYPE_SPIRV_EXT, and the identified entry point includes variables in its interface that are declared with the `ClipDistance` `BuiltIn` decoration and variables in its interface that are declared with the `CullDistance` `BuiltIn` decoration, those variables must not have array sizes which sum to more than `VkPhysicalDeviceLimits`::`maxCombinedClipAndCullDistances`

- VUID-VkShaderCreateInfoEXT-pCode-08451
  If `codeType` is VK_SHADER_CODE_TYPE_SPIRV_EXT, and the identified entry point includes any variable in its interface that is declared with the `SampleMask` `BuiltIn` decoration, that variable must not have an array size greater than `VkPhysicalDeviceLimits`::`maxSampleMaskWords`

- VUID-VkShaderCreateInfoEXT-pCode-08453
  If `codeType` is VK_SHADER_CODE_TYPE_SPIRV_EXT, and `stage` is VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT or VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT, and the identified entry point has an `OpExecutionMode` instruction specifying a patch size with `OutputVertices`, the patch size must be greater than `0` and less than or equal to `VkPhysicalDeviceLimits`::`maxTessellationPatchSize`

- VUID-VkShaderCreateInfoEXT-pCode-08454
  If `codeType` is VK_SHADER_CODE_TYPE_SPIRV_EXT, and `stage` is VK_SHADER_STAGE_GEOMETRY_BIT, the identified entry point must have an `OpExecutionMode` instruction specifying a maximum output vertex count that is greater than `0` and less than or equal to `VkPhysicalDeviceLimits`::`maxGeometryOutputVertices`

- VUID-VkShaderCreateInfoEXT-pCode-08455
  If `codeType` is VK_SHADER_CODE_TYPE_SPIRV_EXT, and `stage` is VK_SHADER_STAGE_GEOMETRY_BIT, the identified entry point must have an `OpExecutionMode` instruction specifying an invocation count that is greater than `0` and less than or equal to `VkPhysicalDeviceLimits`::`maxGeometryShaderInvocations`

- VUID-VkShaderCreateInfoEXT-pCode-08456
  If `codeType` is VK_SHADER_CODE_TYPE_SPIRV_EXT, and `stage` is a pre-rasterization shader stage, and the identified entry point writes to `Layer` for any primitive, it must write the same value to `Layer` for all vertices of a given primitive

- VUID-VkShaderCreateInfoEXT-pCode-08457
  If `codeType` is VK_SHADER_CODE_TYPE_SPIRV_EXT, and `stage` is a pre-rasterization shader stage, and the identified entry point writes to `ViewportIndex` for any primitive, it must write the same value to `ViewportIndex` for all vertices of a given primitive

- VUID-VkShaderCreateInfoEXT-pCode-08459
  If `codeType` is VK_SHADER_CODE_TYPE_SPIRV_EXT, and `stage` is VK_SHADER_STAGE_FRAGMENT_BIT, and the identified entry point writes to `FragDepth` in any execution path, all execution paths that are not exclusive to helper invocations must either discard the fragment, or write or initialize the value of `FragDepth`

- VUID-VkShaderCreateInfoEXT-pCode-08460
  If `codeType` is VK_SHADER_CODE_TYPE_SPIRV_EXT, the shader code in `pCode` must be valid as described by the Khronos SPIR-V Specification after applying the specializations provided in `pSpecializationInfo`, if any, and then converting all specialization constants into fixed constants

- VUID-VkShaderCreateInfoEXT-codeType-08872
  If `codeType` is VK_SHADER_CODE_TYPE_SPIRV_EXT, and `stage` is VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT, `pCode` must contain an `OpExecutionMode` instruction specifying the type of subdivision

- VUID-VkShaderCreateInfoEXT-codeType-12226
  If `codeType` is VK_SHADER_CODE_TYPE_SPIRV_EXT, and `stage` is VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, `pCode` must contain an `OpExecutionMode` instruction specifying the output patch size

- VUID-VkShaderCreateInfoEXT-pPushConstantRanges-10063
  Any two elements of `pPushConstantRanges` must not include the same stage in `stageFlags`

- VUID-VkShaderCreateInfoEXT-codeType-10064
  If `codeType` is VK_SHADER_CODE_TYPE_SPIRV_EXT, `flags` does not include VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT and if a push constant block is declared in a shader, then an element of `pPushConstantRanges->stageFlags` must match `stage`

- VUID-VkShaderCreateInfoEXT-codeType-10065
  If `codeType` is VK_SHADER_CODE_TYPE_SPIRV_EXT, `flags` does not include VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT and if a push constant block is declared in a shader, the block must be contained inside the element of `pPushConstantRanges` that matches the stage

- VUID-VkShaderCreateInfoEXT-codeType-10383
  If `codeType` is VK_SHADER_CODE_TYPE_SPIRV_EXT, `flags` does not include VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT and a resource variable is declared in a shader, the corresponding descriptor set in `pSetLayouts` must match the shader stage

- VUID-VkShaderCreateInfoEXT-codeType-10384
  If `codeType` is VK_SHADER_CODE_TYPE_SPIRV_EXT, `flags` does not include VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT and a resource variable is declared in a shader, and the descriptor type is not VK_DESCRIPTOR_TYPE_MUTABLE_EXT, the corresponding descriptor set in `pSetLayouts` must match the descriptor type

- VUID-VkShaderCreateInfoEXT-codeType-10385
  If `codeType` is VK_SHADER_CODE_TYPE_SPIRV_EXT, `flags` does not include VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT and a resource variable is declared in a shader as an array, the corresponding descriptor set in `pSetLayouts` must match the descriptor count

- VUID-VkShaderCreateInfoEXT-setLayoutCount-13359
  If `setLayoutCount` is not 0, pSetLayouts is not `NULL`, and `flags` does not include VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR, then `pSetLayouts` must be a valid pointer to an array of `setLayoutCount` valid VkDescriptorSetLayout handles

- VUID-VkShaderCreateInfoEXT-setLayoutCount-13360
  If `setLayoutCount` is not 0, pSetLayouts is not `NULL`, and `flags` includes VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR, then `pSetLayouts` must be a valid pointer to an array of `setLayoutCount` VkDescriptorSetLayout or `VK_NULL_HANDLE` handles

- VUID-VkShaderCreateInfoEXT-stage-12428
  If `stage` is VK_SHADER_STAGE_COMPUTE_BIT, then `flags` must not include VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR

- VUID-VkShaderCreateInfoEXT-codeType-10386
  If `codeType` is VK_SHADER_CODE_TYPE_SPIRV_EXT, `flags` does not include VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT and a resource variable is declared in a shader as an array of descriptors, then the descriptor type of that variable must not be VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK

- VUID-VkShaderCreateInfoEXT-flags-11758
  If shader64BitIndexing feature is not enabled, `flags` must not contain VK_SHADER_CREATE_64_BIT_INDEXING_BIT_EXT

- VUID-VkShaderCreateInfoEXT-setLayoutCount-12257
  `setLayoutCount` must be less than or equal to `VkPhysicalDeviceLimits`::`maxBoundDescriptorSets`

- VUID-VkShaderCreateInfoEXT-flags-11290
  If `flags` includes VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT, `setLayoutCount` must be 0

- VUID-VkShaderCreateInfoEXT-flags-11291
  If `flags` includes VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT, `pSetLayouts` must be `NULL`

- VUID-VkShaderCreateInfoEXT-flags-11370
  If `flags` includes VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT, `pushConstantRangeCount` must be 0

- VUID-VkShaderCreateInfoEXT-flags-11371
  If `flags` includes VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT, `pPushConstantRanges` must be `NULL`

- VUID-VkShaderCreateInfoEXT-flags-11292
  If `flags` includes VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT, and `codeType` is VK_SHADER_CODE_TYPE_SPIRV_EXT, all shader variables in the shader resource interface with a `DescriptorSet` and `Binding` decoration must have a mapping declared in VkShaderDescriptorSetAndBindingMappingInfoEXT::`pMappings`

- VUID-VkShaderCreateInfoEXT-stage-12445
  `stage` must not contain VK_SHADER_STAGE_RAYGEN_BIT_KHR, VK_SHADER_STAGE_ANY_HIT_BIT_KHR, VK_SHADER_STAGE_CLOSEST_HIT_BIT_KHR, VK_SHADER_STAGE_MISS_BIT_KHR, VK_SHADER_STAGE_INTERSECTION_BIT_KHR, or VK_SHADER_STAGE_CALLABLE_BIT_KHR

Valid Usage (Implicit)

- VUID-VkShaderCreateInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SHADER_CREATE_INFO_EXT

- VUID-VkShaderCreateInfoEXT-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkCustomResolveCreateInfoEXT, VkPipelineShaderStageRequiredSubgroupSizeCreateInfo, VkShaderDescriptorSetAndBindingMappingInfoEXT, or VkValidationFeaturesEXT

- VUID-VkShaderCreateInfoEXT-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkShaderCreateInfoEXT-flags-parameter
  `flags` must be a valid combination of VkShaderCreateFlagBitsEXT values

- VUID-VkShaderCreateInfoEXT-stage-parameter
  `stage` must be a valid VkShaderStageFlagBits value

- VUID-VkShaderCreateInfoEXT-nextStage-parameter
  `nextStage` must be a valid combination of VkShaderStageFlagBits values

- VUID-VkShaderCreateInfoEXT-codeType-parameter
  `codeType` must be a valid VkShaderCodeTypeEXT value

- VUID-VkShaderCreateInfoEXT-pCode-parameter
  `pCode` must be a valid pointer to an array of `codeSize` bytes

- VUID-VkShaderCreateInfoEXT-pName-parameter
  If `pName` is not `NULL`, `pName` must be a null-terminated UTF-8 string

- VUID-VkShaderCreateInfoEXT-pPushConstantRanges-parameter
  If `pushConstantRangeCount` is not `0`, and `pPushConstantRanges` is not `NULL`, `pPushConstantRanges` must be a valid pointer to an array of `pushConstantRangeCount` valid VkPushConstantRange structures

- VUID-VkShaderCreateInfoEXT-pSpecializationInfo-parameter
  If `pSpecializationInfo` is not `NULL`, `pSpecializationInfo` must be a valid pointer to a valid VkSpecializationInfo structure

- VUID-VkShaderCreateInfoEXT-codeSize-arraylength
  `codeSize` must be greater than `0`

    // Provided by VK_EXT_shader_object
    typedef VkFlags VkShaderCreateFlagsEXT;

`VkShaderCreateFlagsEXT` is a bitmask type for setting a mask of zero or more VkShaderCreateFlagBitsEXT.

Possible values of the `flags` member of VkShaderCreateInfoEXT specifying how a shader object is created, are:

    // Provided by VK_EXT_shader_object
    typedef enum VkShaderCreateFlagBitsEXT {
        VK_SHADER_CREATE_LINK_STAGE_BIT_EXT = 0x00000001,
      // Provided by VK_EXT_descriptor_heap with VK_EXT_shader_object
        VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT = 0x00000400,
      // Provided by VK_KHR_maintenance5 with VK_ARM_shader_instrumentation, VK_EXT_shader_object with VK_ARM_shader_instrumentation
        VK_SHADER_CREATE_INSTRUMENT_SHADER_BIT_ARM = 0x00000800,
      // Provided by VK_EXT_shader_object with VK_EXT_subgroup_size_control or VK_VERSION_1_3
        VK_SHADER_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT_EXT = 0x00000002,
      // Provided by VK_EXT_shader_object with VK_EXT_subgroup_size_control or VK_VERSION_1_3
        VK_SHADER_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXT = 0x00000004,
      // Provided by VK_EXT_shader_object with VK_EXT_mesh_shader or VK_NV_mesh_shader
        VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT = 0x00000008,
      // Provided by VK_EXT_shader_object with VK_KHR_device_group or VK_VERSION_1_1
        VK_SHADER_CREATE_DISPATCH_BASE_BIT_EXT = 0x00000010,
      // Provided by VK_KHR_fragment_shading_rate with VK_EXT_shader_object
        VK_SHADER_CREATE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_EXT = 0x00000020,
      // Provided by VK_EXT_fragment_density_map with VK_EXT_shader_object
        VK_SHADER_CREATE_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT = 0x00000040,
      // Provided by VK_EXT_device_generated_commands
        VK_SHADER_CREATE_INDIRECT_BINDABLE_BIT_EXT = 0x00000080,
      // Provided by VK_KHR_opacity_micromap with VK_EXT_shader_object
        VK_SHADER_CREATE_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_EXT = 0x00001000,
      // Provided by VK_EXT_shader_64bit_indexing
        VK_SHADER_CREATE_64_BIT_INDEXING_BIT_EXT = 0x00008000,
      // Provided by VK_KHR_maintenance11 with VK_EXT_shader_object
        VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR = 0x00040000,
    } VkShaderCreateFlagBitsEXT;

- VK_SHADER_CREATE_LINK_STAGE_BIT_EXT specifies that a shader is linked to all other shaders created in the same vkCreateShadersEXT call whose VkShaderCreateInfoEXT structures' `flags` include VK_SHADER_CREATE_LINK_STAGE_BIT_EXT.

- VK_SHADER_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT_EXT specifies that the `SubgroupSize` may vary in a task, mesh, or compute shader.

- VK_SHADER_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXT specifies that the subgroup sizes must be launched with all invocations active in a task, mesh, or compute shader.

- VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT specifies that a mesh shader must only be used without a task shader. Otherwise, the mesh shader must only be used with a task shader.

- VK_SHADER_CREATE_DISPATCH_BASE_BIT_EXT specifies that a compute shader can be used with vkCmdDispatchBase with a non-zero base workgroup.

- VK_SHADER_CREATE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_EXT specifies that a fragment shader can be used with a fragment shading rate attachment.

- VK_SHADER_CREATE_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT specifies that a fragment shader can be used with a fragment density map attachment.

- VK_SHADER_CREATE_INDIRECT_BINDABLE_BIT_EXT specifies that the shader can be used in combination with Device-Generated Commands.

- VK_SHADER_CREATE_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_EXT specifies that shader objects cannot be used with acceleration structures which are built with geometry that have an index buffer including both special indices and indices pointing to an associated micromap array. Geometry which has an index buffer using only special indices without an associated micromap array can be used with this flag.

- VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR specifies that implementations must ensure that the properties and/or absence of a particular descriptor set do not influence any other descriptor sets for the shader. This allows shader objects to be created with a subset of the total descriptor sets.

- VK_SHADER_CREATE_64_BIT_INDEXING_BIT_EXT specifies that the shader enables 64-bit indexing.

- VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT specifies that the shader will use descriptor heap mappings instead of descriptor set layouts.

Note | The behavior of VK_SHADER_CREATE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_EXT and VK_SHADER_CREATE_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT differs subtly from the behavior of VK_PIPELINE_CREATE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR and VK_PIPELINE_CREATE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT in that the shader bit allows, but does not require the shader to be used with that type of attachment. This means that the application need not create multiple shaders when it does not know in advance whether the shader will be used with or without the attachment type, or when it needs the same shader to be compatible with usage both with and without. This may come at some performance cost on some implementations, so applications should still only set bits that are actually necessary.

Shader objects can be created using different types of shader code. Possible values of VkShaderCreateInfoEXT::`codeType`, are:

    // Provided by VK_EXT_shader_object
    typedef enum VkShaderCodeTypeEXT {
        VK_SHADER_CODE_TYPE_BINARY_EXT = 0,
        VK_SHADER_CODE_TYPE_SPIRV_EXT = 1,
    } VkShaderCodeTypeEXT;

- VK_SHADER_CODE_TYPE_BINARY_EXT specifies shader code in an opaque, implementation-defined binary format specific to the physical device.

- VK_SHADER_CODE_TYPE_SPIRV_EXT specifies shader code in SPIR-V format.

#### 9.1.2. Binary Shader Code

Binary shader code can be retrieved from a shader object using the command:

    // Provided by VK_EXT_shader_object
    VkResult vkGetShaderBinaryDataEXT(
        VkDevice                                    device,
        VkShaderEXT                                 shader,
        size_t*                                     pDataSize,
        void*                                       pData);

- `device` is the logical device that shader object was created from.

- `shader` is the shader object to retrieve binary shader code from.

- `pDataSize` is a pointer to a `size_t` value related to the size of the binary shader code, as described below.

- `pData` is either `NULL` or a pointer to a buffer.

If `pData` is `NULL`, then the size of the binary shader code of the shader object, in bytes, is returned in `pDataSize`. Otherwise, `pDataSize` must point to a variable set by the application to the size of the buffer, in bytes, pointed to by `pData`, and on return the variable is overwritten with the amount of data actually written to `pData`. If `pDataSize` is less than the size of the binary shader code, nothing is written to `pData`, and VK_INCOMPLETE will be returned instead of VK_SUCCESS.

Note | The behavior of this command when `pDataSize` is too small differs from how some other getter-type commands work in Vulkan. Because shader binary data is only usable in its entirety, it would never be useful for the implementation to return partial data. Because of this, nothing is written to `pData` unless `pDataSize` is large enough to fit the data in its entirety. This behavior is not consistent with the behavior described in Opaque Binary Data Results, for historical reasons. If the amount of data available is larger than the passed `pDataSize`, the query returns a VK_INCOMPLETE success status instead of a VK_ERROR_NOT_ENOUGH_SPACE_KHR error status.

Binary shader code retrieved using `vkGetShaderBinaryDataEXT` can be passed to a subsequent call to vkCreateShadersEXT on a compatible physical device by specifying VK_SHADER_CODE_TYPE_BINARY_EXT in the `codeType` member of `VkShaderCreateInfoEXT`.

The shader code returned by repeated calls to this function with the same `VkShaderEXT` is guaranteed to be invariant for the lifetime of the `VkShaderEXT` object.

Valid Usage

- VUID-vkGetShaderBinaryDataEXT-None-08461
  The `shaderObject` feature must be enabled

- VUID-vkGetShaderBinaryDataEXT-None-08499
  If `pData` is not `NULL`, it must be aligned to `16` bytes

Valid Usage (Implicit)

- VUID-vkGetShaderBinaryDataEXT-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetShaderBinaryDataEXT-shader-parameter
  `shader` must be a valid VkShaderEXT handle

- VUID-vkGetShaderBinaryDataEXT-pDataSize-parameter
  `pDataSize` must be a valid pointer to a `size_t` value

- VUID-vkGetShaderBinaryDataEXT-pData-parameter
  If the value referenced by `pDataSize` is not `0`, and `pData` is not `NULL`, `pData` must be a valid pointer to an array of `pDataSize` bytes

- VUID-vkGetShaderBinaryDataEXT-shader-parent
  `shader` must have been created, allocated, or retrieved from `device`

Return Codes

Success

  - VK_INCOMPLETE

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

#### 9.1.3. Binary Shader Compatibility

Binary shader compatibility means that binary shader code returned from a call to vkGetShaderBinaryDataEXT can be passed to a later call to vkCreateShadersEXT, potentially on a different logical and/or physical device, and that this will result in the successful creation of a shader object functionally equivalent to the shader object that the code was originally queried from.

Binary shader code queried from vkGetShaderBinaryDataEXT is not guaranteed to be compatible across all devices, but implementations are required to provide some compatibility guarantees. Applications may determine binary shader compatibility using either (or both) of two mechanisms.

Guaranteed compatibility of shader binaries is expressed through a combination of the `shaderBinaryUUID` and `shaderBinaryVersion` members of the VkPhysicalDeviceShaderObjectPropertiesEXT structure queried from a physical device. Binary shaders retrieved from a physical device with a certain `shaderBinaryUUID` are guaranteed to be compatible with all other physical devices reporting the same `shaderBinaryUUID` and the same or higher `shaderBinaryVersion`.

Whenever a new version of an implementation incorporates any changes that affect the output of vkGetShaderBinaryDataEXT, the implementation should either increment `shaderBinaryVersion` if binary shader code retrieved from older versions remains compatible with the new implementation, or else replace `shaderBinaryUUID` with a new value if backward compatibility has been broken. Binary shader code queried from a device with a matching `shaderBinaryUUID` and lower `shaderBinaryVersion` relative to the device on which vkCreateShadersEXT is being called may be suboptimal for the new device in ways that do not change shader functionality, but it is still guaranteed to be usable to successfully create the shader object(s).

Note | Implementations are encouraged to share `shaderBinaryUUID` between devices and driver versions to the maximum extent their hardware naturally allows, and are strongly discouraged from ever changing the `shaderBinaryUUID` for the same hardware except unless absolutely necessary.

In addition to the shader compatibility guarantees described above, it is valid for an application to call vkCreateShadersEXT with binary shader code created on a device with a different or unknown `shaderBinaryUUID` and/or higher `shaderBinaryVersion`. In this case, the implementation may use any unspecified means of its choosing to determine whether the provided binary shader code is usable. If it is, vkCreateShadersEXT must return VK_SUCCESS, and the created shader object is guaranteed to be valid. Otherwise, in the absence of some error, vkCreateShadersEXT must return VK_INCOMPATIBLE_SHADER_BINARY_EXT to indicate that the provided binary shader code is not compatible with the device.

#### 9.1.4. Binding Shader Objects

Once shader objects have been created, they can be bound to the command buffer using the command:

    // Provided by VK_EXT_shader_object
    void vkCmdBindShadersEXT(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    stageCount,
        const VkShaderStageFlagBits*                pStages,
        const VkShaderEXT*                          pShaders);

- `commandBuffer` is the command buffer that the shader object will be bound to.

- `stageCount` is the length of the `pStages` and `pShaders` arrays.

- `pStages` is a pointer to an array of VkShaderStageFlagBits values specifying one stage per array index that is affected by the corresponding value in the `pShaders` array.

- `pShaders` is a pointer to an array of `VkShaderEXT` handles and/or VK_NULL_HANDLE values describing the shader binding operations to be performed on each stage in `pStages`.

When binding linked shaders, an application may bind them in any combination of one or more calls to `vkCmdBindShadersEXT` (i.e., shaders that were created linked together do not need to be bound in the same `vkCmdBindShadersEXT` call).

Any shader object bound to a particular stage may be unbound by setting its value in `pShaders` to VK_NULL_HANDLE. If `pShaders` is `NULL`, `vkCmdBindShadersEXT` behaves as if `pShaders` was an array of `stageCount` VK_NULL_HANDLE values (i.e., any shaders bound to the stages specified in `pStages` are unbound).

Valid Usage

- VUID-vkCmdBindShadersEXT-None-08462
  The `shaderObject` feature must be enabled

- VUID-vkCmdBindShadersEXT-pStages-08463
  Every element of `pStages` must be unique

- VUID-vkCmdBindShadersEXT-pStages-08464
  `pStages` must not contain VK_SHADER_STAGE_ALL_GRAPHICS or VK_SHADER_STAGE_ALL

- VUID-vkCmdBindShadersEXT-pStages-08465
  `pStages` must not contain VK_SHADER_STAGE_RAYGEN_BIT_KHR, VK_SHADER_STAGE_ANY_HIT_BIT_KHR, VK_SHADER_STAGE_CLOSEST_HIT_BIT_KHR, VK_SHADER_STAGE_MISS_BIT_KHR, VK_SHADER_STAGE_INTERSECTION_BIT_KHR, or VK_SHADER_STAGE_CALLABLE_BIT_KHR

- VUID-vkCmdBindShadersEXT-pStages-08467
  `pStages` must not contain VK_SHADER_STAGE_SUBPASS_SHADING_BIT_HUAWEI

- VUID-vkCmdBindShadersEXT-pStages-08468
  `pStages` must not contain VK_SHADER_STAGE_CLUSTER_CULLING_BIT_HUAWEI

- VUID-vkCmdBindShadersEXT-pShaders-08469
  For each element of `pStages`, if `pShaders` is not `NULL`, and the element of the `pShaders` array with the same index is not VK_NULL_HANDLE, it must have been created with a `stage` equal to the corresponding element of `pStages`

- VUID-vkCmdBindShadersEXT-pShaders-08470
  If `pStages` contains both VK_SHADER_STAGE_TASK_BIT_EXT and VK_SHADER_STAGE_VERTEX_BIT, and `pShaders` is not `NULL`, and the same index in `pShaders` as VK_SHADER_STAGE_TASK_BIT_EXT in `pStages` is not VK_NULL_HANDLE, the same index in `pShaders` as VK_SHADER_STAGE_VERTEX_BIT in `pStages` must be VK_NULL_HANDLE

- VUID-vkCmdBindShadersEXT-pShaders-08471
  If `pStages` contains both VK_SHADER_STAGE_MESH_BIT_EXT and VK_SHADER_STAGE_VERTEX_BIT, and `pShaders` is not `NULL`, and the same index in `pShaders` as VK_SHADER_STAGE_MESH_BIT_EXT in `pStages` is not VK_NULL_HANDLE, the same index in `pShaders` as VK_SHADER_STAGE_VERTEX_BIT in `pStages` must be VK_NULL_HANDLE

- VUID-vkCmdBindShadersEXT-pShaders-08476
  If `pStages` contains VK_SHADER_STAGE_COMPUTE_BIT, the `VkCommandPool` that `commandBuffer` was allocated from must support compute operations

- VUID-vkCmdBindShadersEXT-pShaders-08477
  If `pStages` contains VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT, VK_SHADER_STAGE_GEOMETRY_BIT, or VK_SHADER_STAGE_FRAGMENT_BIT, the `VkCommandPool` that `commandBuffer` was allocated from must support graphics operations

- VUID-vkCmdBindShadersEXT-pShaders-08478
  If `pStages` contains VK_SHADER_STAGE_MESH_BIT_EXT or VK_SHADER_STAGE_TASK_BIT_EXT, the `VkCommandPool` that `commandBuffer` was allocated from must support graphics operations

Valid Usage (Implicit)

- VUID-vkCmdBindShadersEXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdBindShadersEXT-pStages-parameter
  `pStages` must be a valid pointer to an array of `stageCount` valid VkShaderStageFlagBits values

- VUID-vkCmdBindShadersEXT-pShaders-parameter
  If `pShaders` is not `NULL`, `pShaders` must be a valid pointer to an array of `stageCount` valid or VK_NULL_HANDLE VkShaderEXT handles

- VUID-vkCmdBindShadersEXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdBindShadersEXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, or VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdBindShadersEXT-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdBindShadersEXT-stageCount-arraylength
  `stageCount` must be greater than `0`

- VUID-vkCmdBindShadersEXT-commonparent
  Both of `commandBuffer`, and the elements of `pShaders` that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdBindShadersEXT is not affected by conditional rendering

#### 9.1.5. Setting State

Whenever shader objects are used to issue drawing commands, the appropriate dynamic state setting commands must have been called to set the relevant state in the command buffer prior to drawing:

- vkCmdSetViewportWithCount

- vkCmdSetScissorWithCount

- vkCmdSetRasterizerDiscardEnable

If a shader is bound to the VK_SHADER_STAGE_VERTEX_BIT stage, the following commands must have been called in the command buffer prior to drawing:

- vkCmdSetVertexInputEXT

- vkCmdSetPrimitiveTopology

- vkCmdSetPrimitiveRestartEnable

If a shader is bound to the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage, the following command must have been called in the command buffer prior to drawing:

- vkCmdSetPatchControlPointsEXT, if `primitiveTopology` is VK_PRIMITIVE_TOPOLOGY_PATCH_LIST

If a shader is bound to the VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stage, the following command must have been called in the command buffer prior to drawing:

- vkCmdSetTessellationDomainOriginEXT

If `rasterizerDiscardEnable` is VK_FALSE, the following commands must have been called in the command buffer prior to drawing:

- vkCmdSetRasterizationSamplesEXT

- vkCmdSetSampleMaskEXT

- vkCmdSetAlphaToCoverageEnableEXT

- vkCmdSetAlphaToOneEnableEXT, if the alphaToOne feature is enabled

- vkCmdSetPolygonModeEXT

- vkCmdSetLineWidth, if the effective rasterization input topology is in the line topology class

- vkCmdSetCullMode

- vkCmdSetFrontFace

- vkCmdSetDepthTestEnable

- vkCmdSetDepthWriteEnable, if `depthTestEnable` is VK_TRUE

- vkCmdSetDepthCompareOp, if `depthTestEnable` is VK_TRUE

- vkCmdSetDepthBoundsTestEnable, if the depthBounds feature is enabled

- vkCmdSetDepthBounds, if `depthBoundsTestEnable` is VK_TRUE

- vkCmdSetDepthBiasEnable

- vkCmdSetDepthBias or vkCmdSetDepthBias2EXT, if `depthBiasEnable` is VK_TRUE

- vkCmdSetDepthClampEnableEXT, if the depthClamp feature is enabled

- vkCmdSetStencilTestEnable

- vkCmdSetStencilOp, if `stencilTestEnable` is VK_TRUE

- vkCmdSetStencilCompareMask, if `stencilTestEnable` is VK_TRUE

- vkCmdSetStencilWriteMask, if `stencilTestEnable` is VK_TRUE

- vkCmdSetStencilReference, if `stencilTestEnable` is VK_TRUE

If a shader is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, and `rasterizerDiscardEnable` is VK_FALSE, the following commands must have been called in the command buffer prior to drawing:

- vkCmdSetLogicOpEnableEXT, if the `logicOp` feature is enabled

- vkCmdSetLogicOpEXT, if `logicOpEnable` is VK_TRUE

- vkCmdSetColorBlendEnableEXT and vkCmdSetColorWriteMaskEXT, if color attachments are bound, with values set for every color attachment in the render pass instance active at draw time

- vkCmdSetColorBlendEquationEXT or vkCmdSetColorBlendAdvancedEXT, if color attachments are bound, for every attachment whose index in `pColorBlendEnables` is a pointer to a value of VK_TRUE

- vkCmdSetBlendConstants, if any index in `pColorBlendEnables` is VK_TRUE, and the same index in `pColorBlendEquations` is a `VkColorBlendEquationEXT` structure with any VkBlendFactor member with a value of VK_BLEND_FACTOR_CONSTANT_COLOR, VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR, VK_BLEND_FACTOR_CONSTANT_ALPHA, or VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA

If the `pipelineFragmentShadingRate` feature is enabled, and `rasterizerDiscardEnable` is VK_FALSE, the following command must have been called in the command buffer prior to drawing:

- vkCmdSetFragmentShadingRateKHR

If the `geometryStreams` feature is enabled, and a shader is bound to the VK_SHADER_STAGE_GEOMETRY_BIT stage, the following command must have been called in the command buffer prior to drawing:

- vkCmdSetRasterizationStreamEXT

If the `VK_EXT_discard_rectangles` extension is enabled, and `rasterizerDiscardEnable` is VK_FALSE, the following commands must have been called in the command buffer prior to drawing:

- vkCmdSetDiscardRectangleEnableEXT

- vkCmdSetDiscardRectangleModeEXT, if `discardRectangleEnable` is VK_TRUE

- vkCmdSetDiscardRectangleEXT, if `discardRectangleEnable` is VK_TRUE

If the `VK_EXT_conservative_rasterization` extension is enabled, and `rasterizerDiscardEnable` is VK_FALSE, the following commands must have been called in the command buffer prior to drawing:

- vkCmdSetConservativeRasterizationModeEXT

- vkCmdSetExtraPrimitiveOverestimationSizeEXT, if `conservativeRasterizationMode` is VK_CONSERVATIVE_RASTERIZATION_MODE_OVERESTIMATE_EXT

If the `depthClipEnable` feature is enabled, the following command must have been called in the command buffer prior to drawing:

- vkCmdSetDepthClipEnableEXT

If the `VK_EXT_sample_locations` extension is enabled, and `rasterizerDiscardEnable` is VK_FALSE, the following commands must have been called in the command buffer prior to drawing:

- vkCmdSetSampleLocationsEnableEXT

- vkCmdSetSampleLocationsEXT, if `sampleLocationsEnable` is VK_TRUE

If the `VK_EXT_provoking_vertex` extension is enabled, and `rasterizerDiscardEnable` is VK_FALSE, and a shader is bound to the VK_SHADER_STAGE_VERTEX_BIT stage, the following command must have been called in the command buffer prior to drawing:

- vkCmdSetProvokingVertexModeEXT

If any of the `stippledRectangularLines`, `stippledBresenhamLines`, or `stippledSmoothLines` features are enabled, and `rasterizerDiscardEnable` is VK_FALSE, and if the effective rasterization input topology is in the line topology class, the following commands must have been called in the command buffer prior to drawing:

- vkCmdSetLineRasterizationModeEXT

- vkCmdSetLineStippleEnableEXT

- vkCmdSetLineStipple, if `stippledLineEnable` is VK_TRUE

If the `depthClipControl` feature is enabled, the following command must have been called in the command buffer prior to drawing:

- vkCmdSetDepthClipNegativeOneToOneEXT

If the `colorWriteEnable` feature is enabled, and a shader is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, and `rasterizerDiscardEnable` is VK_FALSE, the following command must have been called in the command buffer prior to drawing:

- vkCmdSetColorWriteEnableEXT, with values set for every color attachment in the render pass instance active at draw time

If the attachmentFeedbackLoopDynamicState feature is enabled, and a shader is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, and `rasterizerDiscardEnable` is VK_FALSE, the following command must have been called in the command buffer prior to drawing:

- vkCmdSetAttachmentFeedbackLoopEnableEXT

If the `VK_NV_clip_space_w_scaling` extension is enabled, the following commands must have been called in the command buffer prior to drawing:

- vkCmdSetViewportWScalingEnableNV

- vkCmdSetViewportWScalingNV, if `viewportWScalingEnable` is VK_TRUE

If the depthClamp and `depthClampControl` features are enabled, and `depthClampEnable` is VK_TRUE, the following command must have been called in the command buffer prior to drawing:

- vkCmdSetDepthClampRangeEXT

If the `VK_NV_viewport_swizzle` extension is enabled, the following command must have been called in the command buffer prior to drawing:

- vkCmdSetViewportSwizzleNV

If the `VK_NV_fragment_coverage_to_color` extension is enabled, and `rasterizerDiscardEnable` is VK_FALSE, the following commands must have been called in the command buffer prior to drawing:

- vkCmdSetCoverageToColorEnableNV

- vkCmdSetCoverageToColorLocationNV, if `coverageToColorEnable` is VK_TRUE

If the `VK_NV_framebuffer_mixed_samples` extension is enabled, and `rasterizerDiscardEnable` is VK_FALSE, the following commands must have been called in the command buffer prior to drawing:

- vkCmdSetCoverageModulationModeNV

- vkCmdSetCoverageModulationTableEnableNV, if `coverageModulationMode` is not VK_COVERAGE_MODULATION_MODE_NONE_NV

- vkCmdSetCoverageModulationTableNV, if `coverageModulationTableEnable` is VK_TRUE

If the `coverageReductionMode` feature is enabled, and `rasterizerDiscardEnable` is VK_FALSE, the following command must have been called in the command buffer prior to drawing:

- vkCmdSetCoverageReductionModeNV

If the `representativeFragmentTest` feature is enabled, and `rasterizerDiscardEnable` is VK_FALSE, the following command must have been called in the command buffer prior to drawing:

- vkCmdSetRepresentativeFragmentTestEnableNV

If the `shadingRateImage` feature is enabled, and `rasterizerDiscardEnable` is VK_FALSE, the following commands must have been called in the command buffer prior to drawing:

- vkCmdSetCoarseSampleOrderNV

- vkCmdSetShadingRateImageEnableNV

- vkCmdSetViewportShadingRatePaletteNV, if `shadingRateImageEnable` is VK_TRUE

If the `exclusiveScissor` feature is enabled, the following commands must have been called in the command buffer prior to drawing:

- vkCmdSetExclusiveScissorEnableNV

- vkCmdSetExclusiveScissorNV, if any value in `pExclusiveScissorEnables` is VK_TRUE

State can be set either at any time before or after shader objects are bound, but all required state must be set prior to issuing drawing commands.

If the `commandBufferInheritance` feature is enabled, graphics and compute state is inherited from the previously executed command buffer in the queue. Any valid state inherited in this way does not need to be set again in the current command buffer.

#### 9.1.6. Interaction With Pipelines

Calling vkCmdBindShadersEXT causes the pipeline bind points corresponding to each stage in `pStages` to be disturbed, meaning that any pipelines that had previously been bound to those pipeline bind points are no longer bound.

If VK_PIPELINE_BIND_POINT_GRAPHICS is disturbed (i.e., if `pStages` contains any graphics stage), any graphics pipeline state that the previously bound pipeline did not specify as dynamic becomes undefined, and must be set in the command buffer before issuing drawing commands using shader objects.

Calls to vkCmdBindPipeline likewise disturb the shader stage(s) corresponding to `pipelineBindPoint`, meaning that any shaders that had previously been bound to any of those stages are no longer bound, even if the pipeline was created without shaders for some of those stages.

#### 9.1.7. Shader Object Destruction

To destroy a shader object, call:

    // Provided by VK_EXT_shader_object
    void vkDestroyShaderEXT(
        VkDevice                                    device,
        VkShaderEXT                                 shader,
        const VkAllocationCallbacks*                pAllocator);

- `device` is the logical device that destroys the shader object.

- `shader` is the handle of the shader object to destroy.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

Destroying a shader object used by one or more command buffers in the recording or executable state causes those command buffers to move into the invalid state.

Valid Usage

- VUID-vkDestroyShaderEXT-None-08481
  The `shaderObject` feature must be enabled

- VUID-vkDestroyShaderEXT-shader-08482
  All submitted commands that refer to `shader` must have completed execution

- VUID-vkDestroyShaderEXT-pAllocator-08483
  If `VkAllocationCallbacks` were provided when `shader` was created, a compatible set of callbacks must be provided here

- VUID-vkDestroyShaderEXT-pAllocator-08484
  If no `VkAllocationCallbacks` were provided when `shader` was created, `pAllocator` must be `NULL`

Valid Usage (Implicit)

- VUID-vkDestroyShaderEXT-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkDestroyShaderEXT-shader-parameter
  If `shader` is not VK_NULL_HANDLE, `shader` must be a valid VkShaderEXT handle

- VUID-vkDestroyShaderEXT-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkDestroyShaderEXT-shader-parent
  If `shader` is a valid handle, it must have been created, allocated, or retrieved from `device`

Host Synchronization

- Host access to `shader` must be externally synchronized

### 9.2. Shader Modules

Shader modules contain shader code and one or more entry points. Shaders are selected from a shader module by specifying an entry point as part of pipeline creation. The stages of a pipeline can use shaders that come from different modules. The shader code defining a shader module must be in the SPIR-V format, as described by the Vulkan Environment for SPIR-V appendix.

Shader modules are represented by `VkShaderModule` handles:

    // Provided by VK_VERSION_1_0
    VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkShaderModule)

To create a shader module, call:

    // Provided by VK_VERSION_1_0
    VkResult vkCreateShaderModule(
        VkDevice                                    device,
        const VkShaderModuleCreateInfo*             pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkShaderModule*                             pShaderModule);

- `device` is the logical device that creates the shader module.

- `pCreateInfo` is a pointer to a VkShaderModuleCreateInfo structure.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

- `pShaderModule` is a pointer to a VkShaderModule handle in which the resulting shader module object is returned.

Once a shader module has been created, any entry points it contains can be used in pipeline shader stages as described in Compute Pipelines and Graphics Pipelines .

Note | If the `maintenance5` feature is enabled, shader module creation can be omitted entirely. Instead, applications should provide the VkShaderModuleCreateInfo structure directly in to pipeline creation by chaining it to VkPipelineShaderStageCreateInfo. This avoids the overhead of creating and managing an additional object.

Valid Usage

- VUID-vkCreateShaderModule-pCreateInfo-06904
  If `pCreateInfo` is not `NULL`, `pCreateInfo->pNext` must be `NULL` or a pointer to a valid instance of

  - VkShaderModuleValidationCacheCreateInfoEXT

  - VkValidationFeaturesEXT

Valid Usage (Implicit)

- VUID-vkCreateShaderModule-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkCreateShaderModule-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkShaderModuleCreateInfo structure

- VUID-vkCreateShaderModule-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateShaderModule-pShaderModule-parameter
  `pShaderModule` must be a valid pointer to a VkShaderModule handle

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_INVALID_SHADER_NV

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkShaderModuleCreateInfo` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkShaderModuleCreateInfo {
        VkStructureType              sType;
        const void*                  pNext;
        VkShaderModuleCreateFlags    flags;
        size_t                       codeSize;
        const uint32_t*              pCode;
    } VkShaderModuleCreateInfo;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is reserved for future use.

- `codeSize` is the size, in bytes, of the code pointed to by `pCode`.

- `pCode` is a pointer to code that is used to create the shader module. The type and format of the code is determined from the content of the memory addressed by `pCode`.

Valid Usage

- VUID-VkShaderModuleCreateInfo-codeSize-08735
  If pCode is a pointer to SPIR-V code, `codeSize` must be a multiple of 4

- VUID-VkShaderModuleCreateInfo-pCode-08736
  If pCode is a pointer to SPIR-V code, `pCode` must point to valid SPIR-V code, formatted and packed as described by the Khronos SPIR-V Specification

- VUID-VkShaderModuleCreateInfo-pCode-08737
  If pCode is a pointer to SPIR-V code, `pCode` must adhere to the validation rules described by the Validation Rules within a Module section of the SPIR-V Environment appendix

- VUID-VkShaderModuleCreateInfo-pCode-08738
  If pCode is a pointer to SPIR-V code, `pCode` must declare the `Shader` capability for SPIR-V code

- VUID-VkShaderModuleCreateInfo-pCode-08739
  If pCode is a pointer to SPIR-V code, `pCode` must not declare any capability that is not supported by the API, as described by the Capabilities section of the SPIR-V Environment appendix

- VUID-VkShaderModuleCreateInfo-pCode-08740
  If pCode is a pointer to SPIR-V code, and `pCode` declares any of the capabilities listed in the SPIR-V Environment appendix, one of the corresponding requirements must be satisfied

- VUID-VkShaderModuleCreateInfo-pCode-08741
  If pCode is a pointer to SPIR-V code, `pCode` must not declare any SPIR-V extension that is not supported by the API, as described by the Extension section of the SPIR-V Environment appendix

- VUID-VkShaderModuleCreateInfo-pCode-08742
  If pCode is a pointer to SPIR-V code, and `pCode` declares any of the SPIR-V extensions listed in the SPIR-V Environment appendix, one of the corresponding requirements must be satisfied

- VUID-VkShaderModuleCreateInfo-pCode-07912
  If the VK_NV_glsl_shader extension is not enabled, `pCode` must be a pointer to SPIR-V code

- VUID-VkShaderModuleCreateInfo-pCode-01379
  If `pCode` is a pointer to GLSL code, it must be valid GLSL code written to the `GL_KHR_vulkan_glsl` GLSL extension specification

- VUID-VkShaderModuleCreateInfo-codeSize-01085
  `codeSize` must be greater than 0

Valid Usage (Implicit)

- VUID-VkShaderModuleCreateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO

- VUID-VkShaderModuleCreateInfo-flags-zerobitmask
  `flags` must be `0`

- VUID-VkShaderModuleCreateInfo-pCode-parameter
  `pCode` must be a valid pointer to an array of 4 codeSize​ `uint32_t` values

Structure Chaining

Extends the structures

  - VkDataGraphPipelineCreateInfoARM

  - VkPipelineShaderStageCreateInfo

    // Provided by VK_VERSION_1_0
    typedef VkFlags VkShaderModuleCreateFlags;

`VkShaderModuleCreateFlags` is a bitmask type for setting a mask, but is currently reserved for future use.

To use a VkValidationCacheEXT to cache shader validation results, add a VkShaderModuleValidationCacheCreateInfoEXT structure to the `pNext` chain of the VkShaderModuleCreateInfo structure, specifying the cache object to use.

The `VkShaderModuleValidationCacheCreateInfoEXT` structure is defined as:

    // Provided by VK_EXT_validation_cache
    typedef struct VkShaderModuleValidationCacheCreateInfoEXT {
        VkStructureType         sType;
        const void*             pNext;
        VkValidationCacheEXT    validationCache;
    } VkShaderModuleValidationCacheCreateInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `validationCache` is the validation cache object from which the results of prior validation attempts will be written, and to which new validation results for this VkShaderModule will be written (if not already present). The implementation must not access this object outside of the duration of the command this structure is passed to.

Valid Usage (Implicit)

- VUID-VkShaderModuleValidationCacheCreateInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT

- VUID-VkShaderModuleValidationCacheCreateInfoEXT-validationCache-parameter
  `validationCache` must be a valid VkValidationCacheEXT handle

Structure Chaining

Extends the structures

  - VkPipelineShaderStageCreateInfo

  - VkShaderModuleCreateInfo

To destroy a shader module, call:

    // Provided by VK_VERSION_1_0
    void vkDestroyShaderModule(
        VkDevice                                    device,
        VkShaderModule                              shaderModule,
        const VkAllocationCallbacks*                pAllocator);

- `device` is the logical device that destroys the shader module.

- `shaderModule` is the handle of the shader module to destroy.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

A shader module can be destroyed while pipelines created using its shaders are still in use.

Valid Usage

- VUID-vkDestroyShaderModule-shaderModule-01092
  If `VkAllocationCallbacks` were provided when `shaderModule` was created, a compatible set of callbacks must be provided here

- VUID-vkDestroyShaderModule-shaderModule-01093
  If no `VkAllocationCallbacks` were provided when `shaderModule` was created, `pAllocator` must be `NULL`

Valid Usage (Implicit)

- VUID-vkDestroyShaderModule-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkDestroyShaderModule-shaderModule-parameter
  If `shaderModule` is not VK_NULL_HANDLE, `shaderModule` must be a valid VkShaderModule handle

- VUID-vkDestroyShaderModule-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkDestroyShaderModule-shaderModule-parent
  If `shaderModule` is a valid handle, it must have been created, allocated, or retrieved from `device`

Host Synchronization

- Host access to `shaderModule` must be externally synchronized

### 9.3. Shader Module Identifiers

Shader modules have unique identifiers associated with them. To query an implementation provided identifier, call:

    // Provided by VK_EXT_shader_module_identifier
    void vkGetShaderModuleIdentifierEXT(
        VkDevice                                    device,
        VkShaderModule                              shaderModule,
        VkShaderModuleIdentifierEXT*                pIdentifier);

- `device` is the logical device that created the shader module.

- `shaderModule` is the handle of the shader module.

- `pIdentifier` is a pointer to the returned VkShaderModuleIdentifierEXT.

The identifier returned by the implementation must only depend on `shaderIdentifierAlgorithmUUID` and information provided in the VkShaderModuleCreateInfo which created `shaderModule`. The implementation may return equal identifiers for two different VkShaderModuleCreateInfo structures if the difference does not affect pipeline compilation. Identifiers are only meaningful on different VkDevice objects if the device the identifier was queried from had the same `shaderModuleIdentifierAlgorithmUUID` as the device consuming the identifier.

Valid Usage

- VUID-vkGetShaderModuleIdentifierEXT-shaderModuleIdentifier-06884
  `shaderModuleIdentifier` feature must be enabled

Valid Usage (Implicit)

- VUID-vkGetShaderModuleIdentifierEXT-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetShaderModuleIdentifierEXT-shaderModule-parameter
  `shaderModule` must be a valid VkShaderModule handle

- VUID-vkGetShaderModuleIdentifierEXT-pIdentifier-parameter
  `pIdentifier` must be a valid pointer to a VkShaderModuleIdentifierEXT structure

- VUID-vkGetShaderModuleIdentifierEXT-shaderModule-parent
  `shaderModule` must have been created, allocated, or retrieved from `device`

VkShaderModuleCreateInfo structures have unique identifiers associated with them. To query an implementation provided identifier, call:

    // Provided by VK_EXT_shader_module_identifier
    void vkGetShaderModuleCreateInfoIdentifierEXT(
        VkDevice                                    device,
        const VkShaderModuleCreateInfo*             pCreateInfo,
        VkShaderModuleIdentifierEXT*                pIdentifier);

- `device` is the logical device that can create a VkShaderModule from `pCreateInfo`.

- `pCreateInfo` is a pointer to a VkShaderModuleCreateInfo structure.

- `pIdentifier` is a pointer to the returned VkShaderModuleIdentifierEXT.

The identifier returned by implementation must only depend on `shaderIdentifierAlgorithmUUID` and information provided in the VkShaderModuleCreateInfo. The implementation may return equal identifiers for two different VkShaderModuleCreateInfo structures if the difference does not affect pipeline compilation. Identifiers are only meaningful on different VkDevice objects if the device the identifier was queried from had the same `shaderModuleIdentifierAlgorithmUUID` as the device consuming the identifier.

The identifier returned by the implementation in vkGetShaderModuleCreateInfoIdentifierEXT must be equal to the identifier returned by vkGetShaderModuleIdentifierEXT given equivalent definitions of VkShaderModuleCreateInfo and any chained `pNext` structures.

Valid Usage

- VUID-vkGetShaderModuleCreateInfoIdentifierEXT-shaderModuleIdentifier-06885
  `shaderModuleIdentifier` feature must be enabled

Valid Usage (Implicit)

- VUID-vkGetShaderModuleCreateInfoIdentifierEXT-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetShaderModuleCreateInfoIdentifierEXT-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkShaderModuleCreateInfo structure

- VUID-vkGetShaderModuleCreateInfoIdentifierEXT-pIdentifier-parameter
  `pIdentifier` must be a valid pointer to a VkShaderModuleIdentifierEXT structure

VkShaderModuleIdentifierEXT represents a shader module identifier returned by the implementation.

    // Provided by VK_EXT_shader_module_identifier
    typedef struct VkShaderModuleIdentifierEXT {
        VkStructureType    sType;
        void*              pNext;
        uint32_t           identifierSize;
        uint8_t            identifier[VK_MAX_SHADER_MODULE_IDENTIFIER_SIZE_EXT];
    } VkShaderModuleIdentifierEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `identifierSize` is the size, in bytes, of valid data returned in `identifier`.

- `identifier` is a buffer of opaque data specifying an identifier.

Any returned values beyond the first `identifierSize` bytes are undefined. Implementations must return an `identifierSize` greater than 0, and less-or-equal to VK_MAX_SHADER_MODULE_IDENTIFIER_SIZE_EXT.

Two identifiers are considered equal if `identifierSize` is equal and the first `identifierSize` bytes of `identifier` compare equal.

Implementations may return a different `identifierSize` for different modules. Implementations should ensure that `identifierSize` is large enough to uniquely define a shader module.

Valid Usage (Implicit)

- VUID-VkShaderModuleIdentifierEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SHADER_MODULE_IDENTIFIER_EXT

- VUID-VkShaderModuleIdentifierEXT-pNext-pNext
  `pNext` must be `NULL`

VK_MAX_SHADER_MODULE_IDENTIFIER_SIZE_EXT is the length in bytes of a shader module identifier, as returned in VkShaderModuleIdentifierEXT::`identifierSize`.

    #define VK_MAX_SHADER_MODULE_IDENTIFIER_SIZE_EXT 32U

### 9.4. Binding Shaders

Before a shader can be used it must be first bound to the command buffer.

Calling vkCmdBindPipeline binds all stages corresponding to the VkPipelineBindPoint. Calling vkCmdBindShadersEXT binds all stages in `pStages`

The following table describes the relationship between shader stages and pipeline bind points:

Shader stage | Pipeline bind point | behavior controlled
--- | --- | ---
VK_SHADER_STAGE_VERTEX_BIT VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT VK_SHADER_STAGE_GEOMETRY_BIT VK_SHADER_STAGE_FRAGMENT_BIT VK_SHADER_STAGE_TASK_BIT_EXT VK_SHADER_STAGE_MESH_BIT_EXT | VK_PIPELINE_BIND_POINT_GRAPHICS | all drawing commands
VK_SHADER_STAGE_COMPUTE_BIT | VK_PIPELINE_BIND_POINT_COMPUTE | all dispatch commands
VK_SHADER_STAGE_ANY_HIT_BIT_KHR VK_SHADER_STAGE_CALLABLE_BIT_KHR VK_SHADER_STAGE_CLOSEST_HIT_BIT_KHR VK_SHADER_STAGE_INTERSECTION_BIT_KHR VK_SHADER_STAGE_MISS_BIT_KHR VK_SHADER_STAGE_RAYGEN_BIT_KHR | VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR | vkCmdTraceRaysNV vkCmdTraceRaysKHR and vkCmdTraceRaysIndirectKHR
VK_SHADER_STAGE_SUBPASS_SHADING_BIT_HUAWEI VK_SHADER_STAGE_CLUSTER_CULLING_BIT_HUAWEI | VK_PIPELINE_BIND_POINT_SUBPASS_SHADING_HUAWEI | vkCmdSubpassShadingHUAWEI
VK_SHADER_STAGE_COMPUTE_BIT | VK_PIPELINE_BIND_POINT_EXECUTION_GRAPH_AMDX | all execution graph commands

### 9.5. Shader Execution

At each stage of the pipeline, multiple invocations of a shader may execute simultaneously. Further, invocations of a single shader produced as the result of different commands may execute simultaneously. The relative execution order of invocations of the same shader type is undefined. Shader invocations may complete in a different order than that in which the primitives they originated from were drawn or dispatched by the application. However, fragment shader outputs are written to attachments in rasterization order.

The relative execution order of invocations of different shader types is largely undefined. However, when invoking a shader whose inputs are generated from a previous pipeline stage, the shader invocations from the previous stage are guaranteed to have executed far enough to generate input values for all required shader inputs.

Note | This execution ordering guarantee is limited to variables in the shader input and output interface and payloads sent between stages. In particular, stores or atomic operations on storage buffers or images are not part of these interfaces and such operations in a previous pipeline stage are not guaranteed to be visible in the subsequent pipeline stage.

#### 9.5.1. Shader Termination

A shader invocation that is terminated has finished executing instructions.

Executing `OpReturn` in the entry point, or executing `OpTerminateInvocation` in any function will terminate an invocation. Implementations may also terminate a shader invocation when `OpKill` is executed in any function; otherwise it becomes a helper invocation.

In addition to the above conditions, helper invocations may be terminated when all non-helper invocations in the same derivative group either terminate or become helper invocations.

A shader stage for a given command completes execution when all invocations for that stage have terminated.

Note | Depending on the implementation, `OpKill` will be functionally equivalent to either `OpTerminateInvocation` or `OpDemoteToHelperInvocation`. To obtain the most predictable behavior, shader authors should use `OpTerminateInvocation` or `OpDemoteToHelperInvocation` rather than `OpKill` wherever possible.

#### 9.5.2. Varying Subgroup Size

Shaders may report a different value of `SubgroupSize` for different subgroups if varying subgroups are allowed.

If varying subgroups are not allowed, `SubgroupSize` will always be equal to [limits-subgroupSize]. If varying subgroups are allowed, `SubgroupSize` must be a power-of-two value between `minSubgroupSize` and `maxSubgroupSize` and must be uniform with subgroup scope. For task, mesh, or compute shaders, subgroups in the same command scope will have the same size. For other stages, every subgroup may have a different size even within a single command.

Varying subgroups are allowed if any of the following conditions are true:

- The shader was created from SPIR-V with version number of 1.6 or higher.

- The shader was created with vkCreateShadersEXT and the VK_SHADER_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT_EXT flag was set.

- The shader was created as part of a pipeline and the VK_PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT flag was set.

#### 9.5.3. Full Subgroups

When full subgroups are required, subgroups must be launched with all invocations active, i.e., there is an active invocation with `SubgroupLocalInvocationId` for each value in range [0,`SubgroupSize`-1].

Full subgroups are required when the `X` dimension of the workgroup size is a multiple of the reported value of the `SubgroupSize` built-in, and one of the following is true:

- The shader was created from SPIR-V with version number of 1.6 or higher.

- The shader was created with vkCreateShadersEXT and the VK_SHADER_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXT flag was set.

- The shader was created as part of a pipeline and the VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT flag was set.

Note | If varying subgroup sizes are allowed, this can only be statically guaranteed if the x dimension of the workgroup size is a multiple of the `maxSubgroupSize`. Otherwise, the subgroup size in a particular subgroup may be set to any of the supported sizes, making this a dynamic condition. Requiring a specific subgroup size will also ensure this is statically known.

Note | Many algorithms cannot easily be implemented without full subgroups. For implementations, full subgroup guarantees can be provided more often with varying subgroup sizes. The behavior of this built-in without that guarantee is considered legacy, and implementations are encouraged to implement the tighter behavior unconditionally.

#### 9.5.4. Required Subgroup Size

A specific subgroup size can be required for a shader between `minSubgroupSize` and `maxSubgroupSize`. The required size can be specified by:

- Adding an instance of VkPipelineShaderStageRequiredSubgroupSizeCreateInfo to the `pNext` chain of VkPipelineShaderStageCreateInfo with `requiredSize` set to the desired value.

- Adding an instance of VkShaderRequiredSubgroupSizeCreateInfoEXT to the `pNext` chain of VkShaderCreateInfoEXT with `requiredSize` set to the desired value.

When specified, the value of `SubgroupSize` must match the required value for all invocations of the shader.

### 9.6. Shader Out-of-Bounds Memory Access

Shader accesses to memory are not automatically bounds checked by the implementation. Applications must not execute operations that would access out of bounds memory locations unless some form of bounds checking is enabled or behavior is otherwise explicitly defined. An access is considered out of bounds if any part of the access is outside of any specified memory range, whether that is the array length specified in a shader or a range specified in the API (e.g. descriptor size).

Note | External tooling such as the Vulkan Validation Layers can be used to help validate that accesses are not out of bounds.

An access can be independently out of bounds for each range that applies; if one is bounds checked and the others are not, behavior is still undefined.

Note | For example, given the following shader declaration
    // Buffer type
    struct MySSBO {
        uint32_t data[2];
    };
accessing `data` at an index greater than 1 is undefined behavior, whether the underlying buffer is bigger than that or not.

Vulkan provides functionality that enables automatic bounds checking in some cases, as outlined below.

Note | Automatic bounds checking can be used to ensure that accesses outside of certain bounds have predictable results, acting as a safety net for untrusted code, or simply as a way for applications to avoid their own bounds checks. While there may be a performance cost for enabling these features, they should not be slower than an application performing equivalent checks. Automatic checks do not necessarily account for all possible bounds - e.g. Robust Buffer Access will not prevent undefined behavior in the buffer access example in the prior note.

#### 9.6.1. Robust Buffer Access

Robust buffer access can be enabled by specifying VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS in VkPipelineRobustnessCreateInfo, or specifying VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DEVICE_DEFAULT and enabling the the `robustBufferAccess` feature.

When robust buffer access is enabled, access to a buffer via a descriptor is bounds checked against the range specified for the descriptor, and access to vertex input data is bounds checked against the bound vertex buffer range. Reads from a vertex input may instead be bounds checked against a range rounded down to the nearest multiple of the stride of its binding.

Note | The range of a descriptor is not necessarily equivalent to the size of the underlying resource; applications may suballocate descriptors from larger buffers, for instance. The APIs specifying the descriptor range vary between resource types and descriptor interfaces, but for example include the ranges specified by VkDescriptorBufferInfo or VkBufferViewCreateInfo.

If any vertex input read is outside of the checked range, all other vertex input reads through the same binding in the same shader invocation may behave as if they were outside of the checked range.

If any access to a uniform, storage, uniform texel, or storage texel buffer is outside of the checked range, any access of the same type (write, read-modify-write, or read) to the same buffer that is less than 16 bytes away from the first access may behave as if it is also outside of the checked range.

Any non-atomic access to a uniform, storage, uniform texel, or storage texel buffer wider than 32-bits may be treated as multiple 32-bit accesses that are separately bounds checked.

Writes to a storage or storage texel buffer outside of the checked range will either be discarded, or modify values within the memory range(s) bound to the underlying buffer (including outside of the checked range). They will not modify any other memory.

Note | Non-atomic writes outside of the checked range can lead to data races, as the application has no control over where the data will be written.

Atomic read-modify-write operations to a storage or storage texel buffer outside of the checked range will behave the same as a write outside of the checked range, but will return an undefined value.

Reading a uniform, storage, uniform texel, or storage texel buffer outside of the checked range will return one of the following values:

- Values from anywhere within the memory range(s) bound to the underlying buffer object, which may include bytes beyond the size of the buffer itself.

- Zero values

- For 4-component vectors, a value of (0,0,0,x), where x is any of

  - 0, 1, or the maximum positive integer value for integer components

  - 0.0 or 1.0 for floating-point components

- The value of the last store to the same out-of-bounds location in the same shader invocation.

  - Using the `Volatile`/`VolatileTexel` memory/image operand, the `Volatile` memory semantic, or the `Volatile` decoration to load the value will prevent prior stored values from being returned.

Note | Getting the value of the previous store is possible as implementations are free to optimize multiple accesses in the general case. There are several ways this can be prevented, but using volatile loads is by far the simplest.

Reads from a vertex input outside of the checked range will produce one of the following values:

- Values from anywhere within the memory range(s) bound to the underlying buffer object, which may include bytes beyond the size of the buffer itself, converted via input extraction.

- Zero values, converted via input extraction.

- Zero values

- For 4-component vectors, a value of (0,0,0,x), where x is any of

  - 0, 1, or the maximum positive integer value for integer components

  - 0.0 or 1.0 for floating-point components

Accesses via `OpCooperativeMatrixLoadNV` and `OpCooperativeMatrixStoreNV` are only bounds checked in the above manner if the `VkPhysicalDeviceCooperativeMatrixFeaturesNV`::`cooperativeMatrixRobustBufferAccess` feature is enabled.

Accesses via `OpCooperativeMatrixLoadKHR` and `OpCooperativeMatrixStoreKHR` are only bounds checked in the above manner if the `VkPhysicalDeviceCooperativeMatrixFeaturesKHR`::`cooperativeMatrixRobustBufferAccess` feature is enabled.

Accesses using `OpCooperativeVector*` instructions are not bounds-checked.

#### 9.6.2. Robust Buffer Access 2

Robust buffer access 2 can be enabled by specifying VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 in VkPipelineRobustnessCreateInfo, or specifying VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DEVICE_DEFAULT and enabling the the `robustBufferAccess2` feature.

When robust buffer access 2 is enabled, access to a buffer via a descriptor is bounds checked against the range specified for the descriptor, and access to vertex input data is bounds checked against the bound vertex buffer range, similarly to Robust Buffer Access, but with tighter bounds on the results.

Accesses to a uniform buffer may instead be bounds checked against a range rounded up to `robustUniformBufferAccessSizeAlignment`. Accesses inside the aligned range may behave as if they are in bounds, even if they are outside of the unaligned descriptor range, and access memory accordingly. The same is true for accesses to a storage buffer, using the `robustStorageBufferAccessSizeAlignment` limit instead.

Note | To avoid unexpected data races between neighboring descriptor ranges, applications may wish to ensure suballocated ranges of buffers are aligned to these limits.

Any access to a uniform, storage, uniform texel, or storage texel buffer wider than 32-bits may be treated as multiple 32-bit accesses that are separately bounds checked.

Note | Accesses to null descriptors are not considered out-of-bounds and have separate behavior controlled by the `nullDescriptor` feature.

Writes to a storage or storage texel buffer outside of the checked range will not modify any memory.

Atomic read-modify-write operations to a storage or storage texel buffer outside of the checked range will behave the same as a write outside of the checked range, but will return an undefined value.

Reads from a uniform or storage buffer outside of the checked range will return zero values. If a value was previously written to the same out of bounds location in the same shader invocation, that value may be returned instead; using the `Volatile`/`VolatileTexel` memory/image operand, the `Volatile` memory semantic, or the `Volatile` decoration to load the value will prevent prior stored values from being returned.

Reading a uniform texel or storage texel buffer outside of the checked range will produce zero values, but component substitution will still be applied based on the buffer view’s format, with the resulting value returned to the shader. If a value was previously written to the same out of bounds location in the same shader invocation, that value may be returned instead; using the `Volatile`/`VolatileTexel` memory/image operand, the `Volatile` memory semantic, or the `Volatile` decoration to load the value will prevent prior stored values from being returned.

Reads from a vertex input outside of the checked range will produce zero values, but input extraction will still be applied, filling missing G, B, or A components with (0,0,1).

Accesses via `OpCooperativeMatrixLoadNV` and `OpCooperativeMatrixStoreNV` are only bounds checked in the above manner if the `VkPhysicalDeviceCooperativeMatrixFeaturesNV`::`cooperativeMatrixRobustBufferAccess` feature is enabled.

Accesses via `OpCooperativeMatrixLoadKHR` and `OpCooperativeMatrixStoreKHR` are only bounds checked in the above manner if the `VkPhysicalDeviceCooperativeMatrixFeaturesKHR`::`cooperativeMatrixRobustBufferAccess` feature is enabled.

Accesses using `OpCooperativeVector*` instructions are not bounds-checked.

#### 9.6.3. Image Sampling

Sampling operations on an image descriptor are always well-defined when coordinates exceeding the dimensions specified for the descriptor are accessed, as described in the Wrapping Operation section.

#### 9.6.4. Robust Image Access

Robust image access can be enabled by specifying VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_ROBUST_IMAGE_ACCESS in VkPipelineRobustnessCreateInfo, or specifying VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_DEVICE_DEFAULT and enabling the the `robustImageAccess` feature.

If robust image access is enabled, accesses to image descriptors are bounds checked against the image view dimensions specified for the descriptor.

Writes or atomic read-modify-write operations to a storage image outside of the checked dimensions will not modify any memory.

Reads, atomic read-modify-write operations, or fetches from images outside of the checked dimensions will return zero values, with (0,0,1) or (0,0,0) values inserted for missing G, B, or A components based on the format.

If a value was previously written to the same out of bounds location in the same shader invocation, that value may be returned instead; using the `VolatileTexel` image operand, the `Volatile` memory semantic, or the `Volatile` decoration to load the value will prevent prior stored values from being returned.

#### 9.6.5. Robust Image Access 2

Note | This is largely identical to Robust Image Access; the only difference being that the alpha channel must be replaced with 1, rather than 1 or 0, for out of bounds texel access.

Robust image access 2 can be enabled by specifying VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_ROBUST_IMAGE_ACCESS_2 in VkPipelineRobustnessCreateInfo, or specifying VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_DEVICE_DEFAULT and enabling the the `robustImageAccess2` feature.

If robust image access 2 is enabled, accesses to image descriptors are bounds checked against the image view dimensions specified for the descriptor.

Writes or atomic read-modify-write operations to a storage image outside of the checked dimensions will not modify any memory.

Reads, atomic read-modify-write operations, or fetches from images outside of the checked dimensions will return zero values, with (0,0,1) values inserted for missing G, B, or A components based on the format.

If a value was previously written to the same out of bounds location in the same shader invocation, that value may be returned instead; using the `VolatileTexel` image operand, the `Volatile` memory semantic, or the `Volatile` decoration to load the value will prevent prior stored values from being returned.

### 9.7. Shader Memory Access Ordering

The order in which image or buffer memory is read or written by shaders is largely undefined. For some shader types (vertex, tessellation evaluation, and in some cases, fragment), even the number of shader invocations that may perform loads and stores is undefined.

In particular, the following rules apply:

- Vertex and tessellation evaluation shaders will be invoked at least once for each unique vertex, as defined in those sections.

- Fragment shaders will be invoked zero or more times, as defined in that section.

- The relative execution order of invocations of the same shader type is undefined. A store issued by a shader when working on primitive B might complete prior to a store for primitive A, even if primitive A is specified prior to primitive B. This applies even to fragment shaders; while fragment shader outputs are always written to the framebuffer in rasterization order, stores executed by fragment shader invocations are not.

- The relative execution order of invocations of different shader types is largely undefined.

Note | The above limitations on shader invocation order make some forms of synchronization between shader invocations within a single set of primitives unimplementable. For example, having one invocation poll memory written by another invocation assumes that the other invocation has been launched and will complete its writes in finite time.

The Memory Model appendix defines the terminology and rules for how to correctly communicate between shader invocations, such as when a write is Visible-To a read, and what constitutes a Data Race. Applications must not cause a data race.

### 9.8. Shader Inputs and Outputs

Data is passed into and out of shaders using variables with input or output storage class, respectively. User-defined inputs and outputs are connected between stages by matching their `Location` decorations. Additionally, data can be provided by or communicated to special functions provided by the execution environment using `BuiltIn` decorations.

In many cases, the same `BuiltIn` decoration can be used in multiple shader stages with similar meaning. The specific behavior of variables decorated as `BuiltIn` is documented in the following sections.

### 9.9. Task Shaders

Task shaders operate in conjunction with the mesh shaders to produce a collection of primitives that will be processed by subsequent stages of the graphics pipeline. Its primary purpose is to create a variable amount of subsequent mesh shader invocations.

Task shaders are invoked via the execution of the programmable mesh shading pipeline.

The task shader has no fixed-function inputs other than variables identifying the specific workgroup and invocation. In the `TaskNV` `Execution` `Model` the number of mesh shader workgroups to create is specified via a `TaskCountNV` decorated output variable. In the `TaskEXT` `Execution` `Model` the number of mesh shader workgroups to create is specified via the `OpEmitMeshTasksEXT` instruction.

The task shader can write additional outputs to task memory, which can be read by all of the mesh shader workgroups it created.

#### 9.9.1. Task Shader Execution

Task workloads are formed from groups of work items called workgroups and processed by the task shader in the current graphics pipeline. A workgroup is a collection of shader invocations that execute the same shader, potentially in parallel. Task shaders execute in global workgroups which are divided into a number of local workgroups with a size that can be set by assigning a value to the `LocalSize` or `LocalSizeId` execution mode or via an object decorated by the `WorkgroupSize` decoration. An invocation within a local workgroup can share data with other members of the local workgroup through shared variables and issue memory and control flow barriers to synchronize with other members of the local workgroup. If the subpass includes multiple views in its view mask, a Task shader using `TaskEXT` `Execution` `Model` may be invoked separately for each view.

### 9.10. Mesh Shaders

Mesh shaders operate in workgroups to produce a collection of primitives that will be processed by subsequent stages of the graphics pipeline. Each workgroup emits zero or more output primitives and the group of vertices and their associated data required for each output primitive.

Mesh shaders are invoked via the execution of the programmable mesh shading pipeline.

The only inputs available to the mesh shader are variables identifying the specific workgroup and invocation and, if applicable, any outputs written to task memory by the task shader that spawned the mesh shader’s workgroup. The mesh shader can operate without a task shader as well.

The invocations of the mesh shader workgroup write an output mesh, comprising a set of primitives with per-primitive attributes, a set of vertices with per-vertex attributes, and an array of indices identifying the mesh vertices that belong to each primitive. The primitives of this mesh are then processed by subsequent graphics pipeline stages, where the outputs of the mesh shader form an interface with the fragment shader.

#### 9.10.1. Mesh Shader Execution

Mesh workloads are formed from groups of work items called workgroups and processed by the mesh shader in the current graphics pipeline. A workgroup is a collection of shader invocations that execute the same shader, potentially in parallel. Mesh shaders execute in global workgroups which are divided into a number of local workgroups with a size that can be set by assigning a value to the `LocalSize` or `LocalSizeId` execution mode or via an object decorated by the `WorkgroupSize` decoration. An invocation within a local workgroup can share data with other members of the local workgroup through shared variables and issue memory and control flow barriers to synchronize with other members of the local workgroup.

The global workgroups may be generated explicitly via the API, or implicitly through the task shader’s work creation mechanism. If the subpass includes multiple views in its view mask, a Mesh shader using `MeshEXT` `Execution` `Model` may be invoked separately for each view.

### 9.11. Cluster Culling Shaders

Cluster Culling shaders are invoked via the execution of the Programmable Cluster Culling Shading pipeline.

The only inputs available to the cluster culling shader are variables identifying the specific workgroup and invocation.

Cluster Culling shaders operate in workgroups to perform cluster-based culling and produce zero or more cluster drawing command that will be processed by subsequent stages of the graphics pipeline.

The Cluster Drawing Command (CDC) is very similar to the MDI command, invocations in workgroup can emit zero of more CDC to draw zero or more visible cluster.

#### 9.11.1. Cluster Culling Shader Execution

Cluster Culling workloads are formed from groups of work items called workgroups and processed by the cluster culling shader in the current graphics pipeline. A workgroup is a collection of shader invocations that execute the same shader, potentially in parallel. Cluster Culling shaders execute in global workgroups which are divided into a number of local workgroups with a size that can be set by assigning a value to the `LocalSize` or `LocalSizeId` execution mode or via an object decorated by the `WorkgroupSize` decoration. An invocation within a local workgroup can share data with other members of the local workgroup through shared variables and issue memory and control flow barriers to synchronize with other members of the local workgroup.

### 9.12. Vertex Shaders

Each vertex shader invocation operates on one vertex and its associated vertex attribute data, and outputs one vertex and associated data. Graphics pipelines using primitive shading must include a vertex shader, and the vertex shader stage is always the first shader stage in the graphics pipeline.

#### 9.12.1. Vertex Shader Execution

A vertex shader must be executed at least once for each vertex specified by a drawing command. If the subpass includes multiple views in its view mask, the shader may be invoked separately for each view. During execution, the shader is presented with the index of the vertex and instance for which it has been invoked. Input variables declared in the vertex shader are filled by the implementation with the values of vertex attributes associated with the invocation being executed.

If the same vertex is specified multiple times in a drawing command (e.g. by including the same index value multiple times in an index buffer) the implementation may reuse the results of vertex shading if it can statically determine that the vertex shader invocations will produce identical results.

Note | It is implementation-dependent when and if results of vertex shading are reused, and thus how many times the vertex shader will be executed. This is true also if the vertex shader contains stores or atomic operations (see `vertexPipelineStoresAndAtomics`).

### 9.13. Tessellation Control Shaders

The tessellation control shader is used to read an input patch provided by the application and to produce an output patch. Each tessellation control shader invocation operates on an input patch (after all control points in the patch are processed by a vertex shader) and its associated data, and outputs a single control point of the output patch and its associated data, and can also output additional per-patch data. The input patch is sized according to the `patchControlPoints` member of VkPipelineTessellationStateCreateInfo, as part of input assembly.

The input patch can also be dynamically sized with `patchControlPoints` parameter of vkCmdSetPatchControlPointsEXT.

To dynamically set the number of control points per patch, call:

    // Provided by VK_EXT_extended_dynamic_state2, VK_EXT_shader_object
    void vkCmdSetPatchControlPointsEXT(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    patchControlPoints);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `patchControlPoints` specifies the number of control points per patch.

This command sets the number of control points per patch for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the VkPipelineTessellationStateCreateInfo::`patchControlPoints` value used to create the currently active pipeline.

Valid Usage

- VUID-vkCmdSetPatchControlPointsEXT-None-09422
  At least one of the following must be true:

  - The `extendedDynamicState2PatchControlPoints` feature is enabled

  - The `shaderObject` feature is enabled

- VUID-vkCmdSetPatchControlPointsEXT-patchControlPoints-04874
  `patchControlPoints` must be greater than zero and less than or equal to `VkPhysicalDeviceLimits`::`maxTessellationPatchSize`

Valid Usage (Implicit)

- VUID-vkCmdSetPatchControlPointsEXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetPatchControlPointsEXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetPatchControlPointsEXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetPatchControlPointsEXT-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetPatchControlPointsEXT is not affected by conditional rendering

The size of the output patch is controlled by the `OpExecutionMode` `OutputVertices` specified in the tessellation control or tessellation evaluation shaders, which must be specified in at least one of the shaders. The size of the input and output patches must each be greater than zero and less than or equal to `VkPhysicalDeviceLimits`::`maxTessellationPatchSize`.

#### 9.13.1. Tessellation Control Shader Execution

A tessellation control shader is invoked at least once for each output vertex in a patch. If the subpass includes multiple views in its view mask, the shader may be invoked separately for each view.

Inputs to the tessellation control shader are generated by the vertex shader. Each invocation of the tessellation control shader can read the attributes of any incoming vertices and their associated data. The invocations corresponding to a given patch execute logically in parallel, with undefined relative execution order. However, the `OpControlBarrier` instruction can be used to provide limited control of the execution order by synchronizing invocations within a patch, effectively dividing tessellation control shader execution into a set of phases. Tessellation control shaders will read undefined values if one invocation reads a per-vertex or per-patch output written by another invocation at any point during the same phase, or if two invocations attempt to write different values to the same per-patch output in a single phase.

### 9.14. Tessellation Evaluation Shaders

The Tessellation Evaluation Shader operates on an input patch of control points and their associated data, and a single input barycentric coordinate indicating the invocation’s relative position within the subdivided patch, and outputs a single vertex and its associated data.

#### 9.14.1. Tessellation Evaluation Shader Execution

A tessellation evaluation shader is invoked at least once for each unique vertex generated by the tessellator. If the subpass includes multiple views in its view mask, the shader may be invoked separately for each view.

### 9.15. Geometry Shaders

The geometry shader operates on a group of vertices and their associated data assembled from a single input primitive, and emits zero or more output primitives and the group of vertices and their associated data required for each output primitive.

#### 9.15.1. Geometry Shader Execution

A geometry shader is invoked at least once for each primitive produced by the tessellation stages, or at least once for each primitive generated by primitive assembly when tessellation is not in use. A shader can request that the geometry shader runs multiple instances. A geometry shader is invoked at least once for each instance. If the subpass includes multiple views in its view mask, the shader may be invoked separately for each view.

### 9.16. Fragment Shaders

Fragment shaders are invoked as a fragment operation in a graphics pipeline. Each fragment shader invocation operates on a single fragment and its associated data. With few exceptions, fragment shaders do not have access to any data associated with other fragments and are considered to execute in isolation of fragment shader invocations associated with other fragments.

### 9.17. Compute Shaders

Compute shaders are invoked via dispatching commands. In general, they have access to similar resources as shader stages executing as part of a graphics pipeline.

Compute workloads are formed from groups of work items called workgroups and processed by the compute shader in the current compute pipeline. A workgroup is a collection of shader invocations that execute the same shader, potentially in parallel. Compute shaders execute in global workgroups which are divided into a number of local workgroups with a size that can be set by assigning a value to the `LocalSize` or `LocalSizeId` execution mode or via an object decorated by the `WorkgroupSize` decoration. An invocation within a local workgroup can share data with other members of the local workgroup through shared variables and issue memory and control flow barriers to synchronize with other members of the local workgroup.

### 9.18. Ray Generation Shaders

A ray generation shader is similar to a compute shader. Its main purpose is to execute ray tracing queries using pipeline trace ray instructions (such as `OpTraceRayKHR`) and process the results.

#### 9.18.1. Ray Generation Shader Execution

One ray generation shader is executed per ray tracing dispatch. Its location in the shader binding table (see Shader Binding Table for details) is passed directly into vkCmdTraceRaysKHR using the `pRaygenShaderBindingTable` parameter or vkCmdTraceRaysNV using the `raygenShaderBindingTableBuffer` and `raygenShaderBindingOffset` parameters .

### 9.19. Intersection Shaders

Intersection shaders enable the implementation of arbitrary, application defined geometric primitives. An intersection shader for a primitive is executed whenever its axis-aligned bounding box is hit by a ray.

Like other ray tracing shader domains, an intersection shader operates on a single ray at a time. It also operates on a single primitive at a time. It is therefore the purpose of an intersection shader to compute the ray-primitive intersections and report them. To report an intersection, the shader calls the `OpReportIntersectionKHR` instruction.

An intersection shader communicates with any-hit and closest shaders by generating attribute values that they can read. Intersection shaders cannot read or modify the ray payload.

#### 9.19.1. Intersection Shader Execution

The order in which intersections are found along a ray, and therefore the order in which intersection shaders are executed, is unspecified.

The intersection shader of the closest AABB which intersects the ray is guaranteed to be executed at some point during traversal, unless the ray is forcibly terminated.

### 9.20. Any-Hit Shaders

The any-hit shader is executed after the intersection shader reports an intersection that lies within the current [tmin,tmax] of the ray. The main use of any-hit shaders is to programmatically decide whether or not an intersection will be accepted. The intersection will be accepted unless the shader calls the `OpIgnoreIntersectionKHR` instruction. Any-hit shaders have read-only access to the attributes generated by the corresponding intersection shader, and can read or modify the ray payload.

#### 9.20.1. Any-Hit Shader Execution

The order in which intersections are found along a ray, and therefore the order in which any-hit shaders are executed, is unspecified.

The any-hit shader of the closest hit is guaranteed to be executed at some point during traversal, unless the ray is forcibly terminated.

### 9.21. Closest Hit Shaders

Closest hit shaders have read-only access to the attributes generated by the corresponding intersection shader, and can read or modify the ray payload. They also have access to a number of system-generated values. Closest hit shaders can call pipeline trace ray instructions to recursively trace rays.

#### 9.21.1. Closest Hit Shader Execution

Exactly one closest hit shader is executed when traversal is finished and an intersection has been found and accepted.

### 9.22. Miss Shaders

Miss shaders can access the ray payload and can trace new rays through the pipeline trace ray instructions, but cannot access attributes since they are not associated with an intersection.

#### 9.22.1. Miss Shader Execution

A miss shader is executed instead of a closest hit shader if no intersection was found during traversal.

### 9.23. Callable Shaders

Callable shaders can access a callable payload that works similarly to ray payloads to do subroutine work.

#### 9.23.1. Callable Shader Execution

A callable shader is executed by calling `OpExecuteCallableKHR` from an allowed shader stage.

### 9.24. Interpolation Decorations

Variables in the `Input` storage class in a fragment shader’s interface are interpolated from the values specified by the primitive being rasterized.

Note | Interpolation decorations can be present on input and output variables in pre-rasterization shaders but have no effect on the interpolation performed.

An undecorated input variable will be interpolated with perspective-correct interpolation according to the primitive type being rasterized. Lines and polygons are interpolated in the same way as the primitive’s clip coordinates. If the `NoPerspective` decoration is present, linear interpolation is instead used for lines and polygons. For points, as there is only a single vertex, input values are never interpolated and instead take the value written for the single vertex.

If the `Flat` decoration is present on an input variable, the value is not interpolated, and instead takes its value directly from the provoking vertex. Fragment shader inputs that are signed or unsigned integers, integer vectors, or any double-precision floating-point type must be decorated with `Flat`.

Interpolation of input variables is performed at an implementation-defined position within the fragment area being shaded. The position is further constrained as follows:

- If the `Centroid` decoration is used, the interpolation position used for the variable must also fall within the bounds of the primitive being rasterized.

- If the `Sample` decoration is used, the interpolation position used for the variable must be at the position of the sample being shaded by the current fragment shader invocation.

- If a sample count of 1 is used, and the `sampleLocationSampleCounts` limit includes VK_SAMPLE_COUNT_1_BIT, the interpolation position must be at the position of the sample being shaded by the current fragment shader invocation.

- If a sample count of 1 is used and VK_SAMPLE_COUNT_1_BIT is not advertised in the `sampleLocationSampleCounts` limit, the interpolation position must be at the center of the fragment area.

Note | As `Centroid` constrains the interpolation position to lie within the covered area of the primitive, using it may cause the position to differ between neighboring fragments when it otherwise would not. Derivatives calculated based on these differing locations can produce inconsistent results compared to undecorated inputs. Thus using `Centroid` with input variables used in derivative calculations is not recommended.

If the `PerVertexKHR` decoration is present on an input variable, the value is not interpolated, and instead values from all input vertices are available in an array. Each index of the array corresponds to one of the vertices of the primitive that produced the fragment.

If the `CustomInterpAMD` decoration is present on an input variable, the value cannot be accessed directly; instead the extended instruction `InterpolateAtVertexAMD` must be used to obtain values from the input vertices.

### 9.25. Push Constant Decorations

Variables in the `PushConstant` storage class can be decorated with additional parameters to control their placement and behavior within push constant banks.

The `BankNV` decoration specifies which hardware push constant bank a variable or block should be placed in. When present on a push constant variable or block, it indicates the hardware bank index to use for accessing the push constant data. When BankNV is absent, it behaves as if the value is 0.

The `MemberOffsetNV` decoration specifies an additional offset within a push constant bank for push constant variables or blocks. This decoration allows control over the placement of push constants within the specified bank, enabling more efficient memory layout and access patterns. When MemberOffsetNV is absent, it behaves as if the value is 0.

### 9.26. Static Use

A SPIR-V module declares a global object in memory using the `OpVariable` or `OpUntypedVariableKHR` instruction, which results in a pointer `x` to that object. A specific entry point in a SPIR-V module is said to statically use that object if that entry point’s call tree contains a function containing a instruction with `x` as an `id` operand. A shader entry point also statically uses any variables explicitly declared in its interface.

### 9.27. Scope

A scope describes a set of shader invocations, where each such set is a scope instance. Each invocation belongs to one or more scope instances, but belongs to no more than one scope instance for each scope.

The operations available between invocations in a given scope instance vary, with smaller scopes generally able to perform more operations, and with greater efficiency.

#### 9.27.1. Cross Device

All invocations executed in a Vulkan instance fall into a single cross device scope instance.

Whilst the `CrossDevice` scope is defined in SPIR-V, it is disallowed in Vulkan. API synchronization commands can be used to communicate between devices.

#### 9.27.2. Device

All invocations executed on a single device form a device scope instance.

If the `vulkanMemoryModel` and `vulkanMemoryModelDeviceScope` features are enabled, this scope is represented in SPIR-V by the `Device` `Scope`, which can be used as a `Memory` `Scope` for barrier and atomic operations.

If both the `shaderDeviceClock` and `vulkanMemoryModelDeviceScope` features are enabled, using the `Device` `Scope` with the `OpReadClockKHR` instruction will read from a clock that is consistent across invocations in the same device scope instance.

There is no method to synchronize the execution of these invocations within SPIR-V, and this can only be done with API synchronization primitives.

Invocations executing on different devices in a device group operate in separate device scope instances.

#### 9.27.3. Queue Family

Invocations executed by queues in a given queue family form a queue family scope instance.

This scope is identified in SPIR-V as the `QueueFamily` `Scope` if the `vulkanMemoryModel` feature is enabled, or if not, the `Device` `Scope`, which can be used as a `Memory` `Scope` for barrier and atomic operations.

If the `shaderDeviceClock` feature is enabled, but the `vulkanMemoryModelDeviceScope` feature is not enabled, using the `Device` `Scope` with the `OpReadClockKHR` instruction will read from a clock that is consistent across invocations in the same queue family scope instance.

There is no method to synchronize the execution of these invocations within SPIR-V, and this can only be done with API synchronization primitives.

Each invocation in a queue family scope instance must be in the same device scope instance.

#### 9.27.4. Command

Any shader invocations executed as the result of a single command such as vkCmdDispatch or vkCmdDraw form a command scope instance. For indirect drawing commands with `drawCount` greater than one, invocations from separate draws are in separate command scope instances. For ray tracing shaders, an invocation group is an implementation-dependent subset of the set of shader invocations of a given shader stage which are produced by a single trace rays command.

There is no specific `Scope` for communication across invocations in a command scope instance. As this has a clear boundary at the API level, coordination here can be performed in the API, rather than in SPIR-V.

Each invocation in a command scope instance must be in the same queue-family scope instance.

For shaders without defined workgroups, this set of invocations forms an invocation group as defined in the SPIR-V specification.

#### 9.27.5. Primitive

Any fragment shader invocations executed as the result of rasterization of a single primitive form a primitive scope instance.

There is no specific `Scope` for communication across invocations in a primitive scope instance.

Any generated helper invocations are included in this scope instance.

Each invocation in a primitive scope instance must be in the same command scope instance.

Any input variables decorated with `Flat` are uniform within a primitive scope instance.

#### 9.27.6. Shader Call

Any shader-call-related invocations that are executed in one or more ray tracing execution models form a shader call scope instance.

The `ShaderCallKHR` `Scope` can be used as `Memory` `Scope` for barrier and atomic operations.

Each invocation in a shader call scope instance must be in the same queue family scope instance.

#### 9.27.7. Workgroup

A local workgroup is a set of invocations that can synchronize and share data with each other using memory in the `Workgroup` storage class.

The `Workgroup` `Scope` can be used as both an `Execution` `Scope` and `Memory` `Scope` for barrier and atomic operations.

Each invocation in a local workgroup must be in the same command scope instance.

Only task, mesh, and compute shaders have defined workgroups - other shader types cannot use workgroup functionality. For shaders that have defined workgroups, this set of invocations forms an invocation group as defined in the SPIR-V specification.

When variables declared with the `Workgroup` storage class are explicitly laid out (hence they are also decorated with `Block`), the amount of storage consumed is the size of the largest Block variable, not counting any padding at the end. The amount of storage consumed by the non-Block variables declared with the `Workgroup` storage class is implementation-dependent. However, the amount of storage consumed may not exceed the largest block size that would be obtained if all active non-Block variables declared with `Workgroup` storage class were assigned offsets in an arbitrary order by successively taking the smallest valid offset according to the Standard Storage Buffer Layout rules, and with `Boolean` values considered as 32-bit integer values for the purpose of this calculation. (This is equivalent to using the GLSL std430 layout rules.)

#### 9.27.8. Subgroup

A subgroup (see the subsection “Control Flow” of section 2 of the SPIR-V 1.3 Revision 1 specification) is a set of invocations that can synchronize and share data with each other efficiently.

The `Subgroup` `Scope` can be used as both an `Execution` `Scope` and `Memory` `Scope` for barrier and atomic operations. Other subgroup features allow the use of group operations with subgroup scope.

If the `shaderSubgroupClock` feature is enabled, using the `Subgroup` `Scope` with the `OpReadClockKHR` instruction will read from a clock that is consistent across invocations in the same subgroup.

For shaders that have defined workgroups, each invocation in a subgroup must be in the same local workgroup.

In other shader stages, each invocation in a subgroup must be in the same device scope instance.

Only shader stages that support subgroup operations have defined subgroups.

Note | Subgroups are not guaranteed to be a subset of a single command in shaders that do not have defined workgroups. Values that are guaranteed to be uniform for a given command or sub command may then not be uniform for the subgroup, and vice versa. As such, applications must take care when dealing with mixed uniformity. A somewhat common example of this would something like trying to optimize access to per-draw data using subgroup operations:
    buffer { uint draw_data[]; };

    flat in int vDrawID; // Passed through from vertex shader

    void main()
    {
        uint local_draw_data = subgroupBroadcastFirst(draw_data[local_draw_data]);
    }
This can be done in an attempt to optimize the shader to only perform the loads once per subgroup. However, if the implementation packs multiple draws into a single subgroup, invocations from draws with a different drawID are now receiving data from the wrong invocation. Applications should rely on implementations to do this kind of optimization automatically where the implementation can, rather than trying to force it.

#### 9.27.9. Quad

A quad scope instance is formed of four shader invocations.

In a fragment shader, each invocation in a quad scope instance is formed of invocations in neighboring framebuffer locations (xi, yi), where:

- i is the index of the invocation within the scope instance.

- w and h are the number of pixels the fragment covers in the x and y axes.

- w and h are identical for all participating invocations.

- (x0) = (x1 - w) = (x2) = (x3 - w)

- (y0) = (y1) = (y2 - h) = (y3 - h)

- Each invocation has the same layer and sample indices.

In a mesh, task, or compute shader, if the `DerivativeGroupQuadsKHR` execution mode is specified, each invocation in a quad scope instance is formed of invocations with adjacent local invocation IDs (xi, yi), where:

- i is the index of the invocation within the quad scope instance.

- (x0) = (x1 - 1) = (x2) = (x3 - 1)

- (y0) = (y1) = (y2 - 1) = (y3 - 1)

- x0 and y0 are integer multiples of 2.

- Each invocation has the same z coordinate.

In a mesh, task, or compute shader, if the `DerivativeGroupLinearKHR` execution mode is specified, each invocation in a quad scope instance is formed of invocations with adjacent local invocation indices (li), where:

- i is the index of the invocation within the quad scope instance.

- (l0) = (l1 - 1) = (l2 - 2) = (l3 - 3)

- l0 is an integer multiple of 4.

In all shaders, each invocation in a quad scope instance is formed of invocations in adjacent subgroup invocation indices (si), where:

- i is the index of the invocation within the quad scope instance.

- (s0) = (s1 - 1) = (s2 - 2) = (s3 - 3)

- s0 is an integer multiple of 4.

Each invocation in a quad scope instance must be in the same subgroup.

In a fragment shader, each invocation in a quad scope instance must be in the same primitive scope instance.

Fragment , mesh, task, and compute shaders have defined quad scope instances. If the `quadOperationsInAllStages` limit is supported, any shader stages that support subgroup operations also have defined quad scope instances.

#### 9.27.10. Fragment Interlock

A fragment interlock scope instance is formed of fragment shader invocations based on their framebuffer locations (x,y,layer,sample), executed by commands inside a single subpass.

The specific set of invocations included varies based on the execution mode as follows:

- If the `SampleInterlockOrderedEXT` or `SampleInterlockUnorderedEXT` execution modes are used, only invocations with identical framebuffer locations (x,y,layer,sample) are included.

- If the `PixelInterlockOrderedEXT` or `PixelInterlockUnorderedEXT` execution modes are used, fragments with different sample ids are also included.

- If the `ShadingRateInterlockOrderedEXT` or `ShadingRateInterlockUnorderedEXT` execution modes are used, fragments from neighboring framebuffer locations are also included. The shading rate image or fragment shading rate determines these fragments.

Only fragment shaders with one of the above execution modes have defined fragment interlock scope instances.

There is no specific `Scope` value for communication across invocations in a fragment interlock scope instance. However, this is implicitly used as a memory scope by `OpBeginInvocationInterlockEXT` and `OpEndInvocationInterlockEXT`.

Each invocation in a fragment interlock scope instance must be in the same queue family scope instance.

#### 9.27.11. Invocation

The smallest scope is a single invocation; this is represented by the `Invocation` `Scope` in SPIR-V.

Fragment shader invocations must be in a primitive scope instance.

Invocations in fragment shaders that have a defined fragment interlock scope must be in a fragment interlock scope instance.

Invocations in shaders that have defined workgroups must be in a local workgroup.

Invocations in shaders that have a defined subgroup scope must be in a subgroup.

Invocations in shaders that have a defined quad scope must be in a quad scope instance.

All invocations in all stages must be in a command scope instance.

### 9.28. Group Operations

Group operations are executed by multiple invocations within a scope instance; with each invocation involved in calculating the result. This provides a mechanism for efficient communication between invocations in a particular scope instance.

Group operations all take a `Scope` defining the desired scope instance to operate within. Only the `Subgroup` scope can be used for these operations; the `subgroupSupportedOperations` limit defines which types of operation can be used.

#### 9.28.1. Basic Group Operations

Basic group operations include the use of `OpGroupNonUniformElect`, `OpControlBarrier`, `OpMemoryBarrier`, and atomic operations.

`OpGroupNonUniformElect` can be used to choose a single invocation to perform a task for the whole group. Only the invocation with the lowest id in the group will return `true`.

The Memory Model appendix defines the operation of barriers and atomics.

#### 9.28.2. Vote Group Operations

The vote group operations allow invocations within a group to compare values across a group. The types of votes enabled are:

- Do all active group invocations agree that an expression is true?

- Do any active group invocations evaluate an expression to true?

- Do all active group invocations have the same value of an expression?

Note | These operations are useful in combination with control flow in that they allow for developers to check whether conditions match across the group and choose potentially faster code-paths in these cases.

#### 9.28.3. Arithmetic Group Operations

The arithmetic group operations allow invocations to perform scans and reductions across a group. The operators supported are add, mul, min, max, and, or, xor.

For reductions, every invocation in a group will obtain the cumulative result of these operators applied to all values in the group. For exclusive scans, each invocation in a group will obtain the cumulative result of these operators applied to all values in invocations with a lower index in the group. Inclusive scans are identical to exclusive scans, except the cumulative result includes the operator applied to the value in the current invocation.

The order in which these operators are applied is implementation-dependent.

#### 9.28.4. Ballot Group Operations

The ballot group operations allow invocations to perform more complex votes across the group. The ballot functionality allows all invocations within a group to provide a boolean value and get as a result what each invocation provided as their boolean value. The broadcast functionality allows values to be broadcast from an invocation to all other invocations within the group.

#### 9.28.5. Shuffle Group Operations

The shuffle group operations allow invocations to read values from other invocations within a group.

#### 9.28.6. Shuffle Relative Group Operations

The shuffle relative group operations allow invocations to read values from other invocations within the group relative to the current invocation in the group. The relative operations supported allow data to be shifted up and down through the invocations within a group.

#### 9.28.7. Clustered Group Operations

The clustered group operations allow invocations to perform an operation among partitions of a group, such that the operation is only performed within the group invocations within a partition. The partitions for clustered group operations are consecutive power-of-two size groups of invocations and the cluster size must be known at pipeline creation time. The operations supported are add, mul, min, max, and, or, xor.

#### 9.28.8. Rotate Group Operations

The rotate group operations allow invocations to read values from other invocations within the group relative to the current invocation and modulo the size of the group. Clustered rotate group operations perform the same operation within individual partitions of a group.

The partitions for clustered rotate group operations are consecutive power-of-two size groups of invocations and the cluster size must be known at pipeline creation time.

### 9.29. Quad Group Operations

Quad group operations (`OpGroupNonUniformQuad*`) are a specialized type of group operations that only operate on quad scope instances. Whilst these instructions do include a `Scope` parameter, this scope is always overridden; only the quad scope instance is included in its execution scope.

Fragment shaders that statically execute either `OpGroupNonUniformQuadBroadcast` or `OpGroupNonUniformQuadSwap` must launch sufficient invocations to ensure their correct operation; additional helper invocations are launched for framebuffer locations not covered by rasterized fragments if necessary.

The index used to select participating invocations is i, as described for a quad scope instance, defined as the quad index in the SPIR-V specification.

For `OpGroupNonUniformQuadBroadcast` this value is equal to `Index`. For `OpGroupNonUniformQuadSwap`, it is equal to the implicit `Index` used by each participating invocation.

### 9.30. Derivative Operations

Derivative operations calculate the partial derivative for an expression P as a function of an invocation’s x and y coordinates.

Derivative operations operate on a set of invocations known as a derivative group as defined in the SPIR-V specification.

A derivative group in a fragment shader is equivalent to the quad scope instance if the `QuadDerivativesKHR` execution mode is specified, otherwise it is equivalent to the primitive scope instance. A derivative group in a mesh, task, or compute shader is equivalent to the quad scope instance.

Derivatives are calculated assuming that P is piecewise linear and continuous within the derivative group.

The following control-flow restrictions apply to derivative operations:

- If the `QuadDerivativesKHR` execution mode is specified, dynamic instances of any derivative operations must be executed in control flow that is uniform within the current quad scope instance.

- If the `QuadDerivativesKHR` execution mode is not specified:

  - dynamic instances of explicit derivative instructions (`OpDPdx*`, `OpDPdy*`, and `OpFwidth*`) must be executed in control flow that is uniform within a derivative group.

  - dynamic instances of implicit derivative operations can be executed in control flow that is not uniform within the derivative group, but results are undefined.

Fragment shaders that statically execute derivative operations must launch sufficient invocations to ensure their correct operation; additional helper invocations are launched for framebuffer locations not covered by rasterized fragments if necessary.

Note | In a mesh, task, or compute shader, it is the application’s responsibility to ensure that sufficient invocations are launched.

Derivative operations calculate their results as the difference between the result of P across invocations in the quad. For fine derivative operations (`OpDPdxFine` and `OpDPdyFine`), the values of DPdx(Pi) are calculated as

  DPdx(P0) = DPdx(P1) = P1 - P0

  DPdx(P2) = DPdx(P3) = P3 - P2

and the values of DPdy(Pi) are calculated as

  DPdy(P0) = DPdy(P2) = P2 - P0

  DPdy(P1) = DPdy(P3) = P3 - P1

where i is the index of each invocation as described in Quad.

Coarse derivative operations (`OpDPdxCoarse` and `OpDPdyCoarse`), calculate their results in roughly the same manner, but may only calculate two values instead of four (one for each of DPdx and DPdy), reusing the same result no matter the originating invocation. If an implementation does this, it should use the fine derivative calculations described for P0.

Note | Derivative values are calculated between fragments rather than pixels. If the fragment shader invocations involved in the calculation cover multiple pixels, these operations cover a wider area, resulting in larger derivative values. This in turn will result in a coarser LOD being selected for image sampling operations using derivatives. Applications may want to account for this when using multi-pixel fragments; if pixel derivatives are desired, applications should use explicit derivative operations and divide the results by the size of the fragment in each dimension as follows: DPdx(Pn)' = DPdx(Pn) / w DPdy(Pn)' = DPdy(Pn) / h where w and h are the size of the fragments in the quad, and DPdx(Pn)' and DPdy(Pn)' are the pixel derivatives.

The results for `OpDPdx` and `OpDPdy` may be calculated as either fine or coarse derivatives, with implementations favoring the most efficient approach. Implementations must choose coarse or fine consistently between the two.

Executing `OpFwidthFine`, `OpFwidthCoarse`, or `OpFwidth` is equivalent to executing the corresponding `OpDPdx*` and `OpDPdy*` instructions, taking the absolute value of the results, and summing them.

Executing an `OpImage*Sample*ImplicitLod` instruction is equivalent to executing `OpDPdx`(`Coordinate`) and `OpDPdy`(`Coordinate`), and passing the results as the `Grad` operands `dx` and `dy`.

Note | It is expected that using the `ImplicitLod` variants of sampling functions will be substantially more efficient than using the `ExplicitLod` variants with explicitly generated derivatives.

### 9.31. Helper Invocations

When performing derivative or quad group operations in a fragment shader, additional invocations may be spawned in order to ensure correct results. These additional invocations are known as helper invocations and can be identified by a non-zero value in the `HelperInvocation` built-in. Stores and atomics performed by helper invocations must not have any effect on memory except for the `Function`, `Private` and `Output` storage classes, and values returned by atomic instructions in helper invocations are undefined.

Note | While storage to `Output` storage class has an effect even in helper invocations, it does not mean that helper invocations have an effect on the framebuffer. `Output` variables in fragment shaders can be read from as well, and they behave more like `Private` variables for the duration of the shader invocation.

If the `MaximallyReconvergesKHR` execution mode is applied to the entry point, helper invocations must remain active for all instructions for the lifetime of the quad scope instance they are a part of. If the `MaximallyReconvergesKHR` execution mode is not applied to the entry point, helper invocations may be considered inactive for group operations other than derivative and quad group operations. All invocations in a quad scope instance may become permanently inactive at any point once the only remaining invocations in that quad scope instance are helper invocations.

### 9.32. Cooperative Matrices

A cooperative matrix type is a SPIR-V type where the storage for and computations performed on the matrix are spread across the invocations in a scope instance. These types give the implementation freedom in how to optimize matrix multiplies.

SPIR-V defines the types and instructions, but does not specify rules about what sizes/combinations are valid, and it is expected that different implementations may support different sizes.

To enumerate the supported cooperative matrix types and operations, call:

    // Provided by VK_KHR_cooperative_matrix
    VkResult vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR(
        VkPhysicalDevice                            physicalDevice,
        uint32_t*                                   pPropertyCount,
        VkCooperativeMatrixPropertiesKHR*           pProperties);

- `physicalDevice` is the physical device.

- `pPropertyCount` is a pointer to an integer related to the number of cooperative matrix properties available or queried.

- `pProperties` is either `NULL` or a pointer to an array of VkCooperativeMatrixPropertiesKHR structures.

If `pProperties` is `NULL`, then the number of cooperative matrix properties available is returned in `pPropertyCount`. Otherwise, `pPropertyCount` must point to a variable set by the application to the number of elements in the `pProperties` array, and on return the variable is overwritten with the number of structures actually written to `pProperties`. If `pPropertyCount` is less than the number of cooperative matrix properties available, at most `pPropertyCount` structures will be written, and VK_INCOMPLETE will be returned instead of VK_SUCCESS, to indicate that not all the available cooperative matrix properties were returned.

Valid Usage (Implicit)

- VUID-vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR-physicalDevice-parameter
  `physicalDevice` must be a valid VkPhysicalDevice handle

- VUID-vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR-pPropertyCount-parameter
  `pPropertyCount` must be a valid pointer to a `uint32_t` value

- VUID-vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR-pProperties-parameter
  If the value referenced by `pPropertyCount` is not `0`, and `pProperties` is not `NULL`, `pProperties` must be a valid pointer to an array of `pPropertyCount` VkCooperativeMatrixPropertiesKHR structures

Return Codes

Success

  - VK_INCOMPLETE

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

To enumerate additional supported cooperative matrix types and operations, call:

    // Provided by VK_NV_cooperative_matrix2
    VkResult vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV(
        VkPhysicalDevice                            physicalDevice,
        uint32_t*                                   pPropertyCount,
        VkCooperativeMatrixFlexibleDimensionsPropertiesNV* pProperties);

- `physicalDevice` is the physical device.

- `pPropertyCount` is a pointer to an integer related to the number of cooperative matrix properties available or queried.

- `pProperties` is either `NULL` or a pointer to an array of VkCooperativeMatrixFlexibleDimensionsPropertiesNV structures.

If `pProperties` is `NULL`, then the number of flexible dimensions properties available is returned in `pPropertyCount`. Otherwise, `pPropertyCount` must point to a variable set by the application to the number of elements in the `pProperties` array, and on return the variable is overwritten with the number of structures actually written to `pProperties`. If `pPropertyCount` is less than the number flexible dimensions properties available, at most `pPropertyCount` structures will be written, and VK_INCOMPLETE will be returned instead of VK_SUCCESS, to indicate that not all the available flexible dimensions properties were returned.

If the `cooperativeMatrixFlexibleDimensions` feature is not supported, the implementation must advertise zero properties.

Valid Usage (Implicit)

- VUID-vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV-physicalDevice-parameter
  `physicalDevice` must be a valid VkPhysicalDevice handle

- VUID-vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV-pPropertyCount-parameter
  `pPropertyCount` must be a valid pointer to a `uint32_t` value

- VUID-vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV-pProperties-parameter
  If the value referenced by `pPropertyCount` is not `0`, and `pProperties` is not `NULL`, `pProperties` must be a valid pointer to an array of `pPropertyCount` VkCooperativeMatrixFlexibleDimensionsPropertiesNV structures

Return Codes

Success

  - VK_INCOMPLETE

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

To enumerate the supported cooperative matrix types and operations, call:

    // Provided by VK_NV_cooperative_matrix
    VkResult vkGetPhysicalDeviceCooperativeMatrixPropertiesNV(
        VkPhysicalDevice                            physicalDevice,
        uint32_t*                                   pPropertyCount,
        VkCooperativeMatrixPropertiesNV*            pProperties);

- `physicalDevice` is the physical device.

- `pPropertyCount` is a pointer to an integer related to the number of cooperative matrix properties available or queried.

- `pProperties` is either `NULL` or a pointer to an array of VkCooperativeMatrixPropertiesNV structures.

If `pProperties` is `NULL`, then the number of cooperative matrix properties available is returned in `pPropertyCount`. Otherwise, `pPropertyCount` must point to a variable set by the application to the number of elements in the `pProperties` array, and on return the variable is overwritten with the number of structures actually written to `pProperties`. If `pPropertyCount` is less than the number of cooperative matrix properties available, at most `pPropertyCount` structures will be written, and VK_INCOMPLETE will be returned instead of VK_SUCCESS, to indicate that not all the available cooperative matrix properties were returned.

Valid Usage (Implicit)

- VUID-vkGetPhysicalDeviceCooperativeMatrixPropertiesNV-physicalDevice-parameter
  `physicalDevice` must be a valid VkPhysicalDevice handle

- VUID-vkGetPhysicalDeviceCooperativeMatrixPropertiesNV-pPropertyCount-parameter
  `pPropertyCount` must be a valid pointer to a `uint32_t` value

- VUID-vkGetPhysicalDeviceCooperativeMatrixPropertiesNV-pProperties-parameter
  If the value referenced by `pPropertyCount` is not `0`, and `pProperties` is not `NULL`, `pProperties` must be a valid pointer to an array of `pPropertyCount` VkCooperativeMatrixPropertiesNV structures

Return Codes

Success

  - VK_INCOMPLETE

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

Each VkCooperativeMatrixPropertiesKHR or VkCooperativeMatrixPropertiesNV structure describes a single supported combination of types for a matrix multiply/add operation ( `OpCooperativeMatrixMulAddKHR` or `OpCooperativeMatrixMulAddNV` ). The multiply can be described in terms of the following variables and types (in SPIR-V pseudocode):

        %A is of type OpTypeCooperativeMatrixKHR %AType %scope %MSize %KSize %MatrixAKHR
        %B is of type OpTypeCooperativeMatrixKHR %BType %scope %KSize %NSize %MatrixBKHR
        %C is of type OpTypeCooperativeMatrixKHR %CType %scope %MSize %NSize %MatrixAccumulatorKHR
        %Result is of type OpTypeCooperativeMatrixKHR %ResultType %scope %MSize %NSize %MatrixAccumulatorKHR

        %Result = %A * %B + %C // using OpCooperativeMatrixMulAddKHR

        %A is of type OpTypeCooperativeMatrixNV %AType %scope %MSize %KSize
        %B is of type OpTypeCooperativeMatrixNV %BType %scope %KSize %NSize
        %C is of type OpTypeCooperativeMatrixNV %CType %scope %MSize %NSize
        %D is of type OpTypeCooperativeMatrixNV %DType %scope %MSize %NSize

        %D = %A * %B + %C // using OpCooperativeMatrixMulAddNV

A matrix multiply with these dimensions is known as an MxNxK matrix multiply.

The `VkCooperativeMatrixPropertiesKHR` structure is defined as:

    // Provided by VK_KHR_cooperative_matrix
    typedef struct VkCooperativeMatrixPropertiesKHR {
        VkStructureType       sType;
        void*                 pNext;
        uint32_t              MSize;
        uint32_t              NSize;
        uint32_t              KSize;
        VkComponentTypeKHR    AType;
        VkComponentTypeKHR    BType;
        VkComponentTypeKHR    CType;
        VkComponentTypeKHR    ResultType;
        VkBool32              saturatingAccumulation;
        VkScopeKHR            scope;
    } VkCooperativeMatrixPropertiesKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `MSize` is the number of rows in matrices `A`, `C`, and `Result`.

- `KSize` is the number of columns in matrix `A` and rows in matrix `B`.

- `NSize` is the number of columns in matrices `B`, `C`, `Result`.

- `AType` is the component type of matrix `A`, of type VkComponentTypeKHR.

- `BType` is the component type of matrix `B`, of type VkComponentTypeKHR.

- `CType` is the component type of matrix `C`, of type VkComponentTypeKHR.

- `ResultType` is the component type of matrix `Result`, of type VkComponentTypeKHR.

- `saturatingAccumulation` indicates whether the `SaturatingAccumulation` operand to `OpCooperativeMatrixMulAddKHR` must be present or not. If it is VK_TRUE, the `SaturatingAccumulation` operand must be present. If it is VK_FALSE, the `SaturatingAccumulation` operand must not be present.

- `scope` is the scope of all the matrix types, of type VkScopeKHR.

If some types are preferred over other types (e.g. for performance), they should appear earlier in the list enumerated by vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR.

At least one entry in the list must have power of two values for all of `MSize`, `KSize`, and `NSize`.

If the `cooperativeMatrixWorkgroupScope` feature is not supported, `scope` must be VK_SCOPE_SUBGROUP_KHR.

Valid Usage (Implicit)

- VUID-VkCooperativeMatrixPropertiesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_COOPERATIVE_MATRIX_PROPERTIES_KHR

- VUID-VkCooperativeMatrixPropertiesKHR-pNext-pNext
  `pNext` must be `NULL`

The `VkCooperativeMatrixFlexibleDimensionsPropertiesNV` structure is defined as:

    // Provided by VK_NV_cooperative_matrix2
    typedef struct VkCooperativeMatrixFlexibleDimensionsPropertiesNV {
        VkStructureType       sType;
        void*                 pNext;
        uint32_t              MGranularity;
        uint32_t              NGranularity;
        uint32_t              KGranularity;
        VkComponentTypeKHR    AType;
        VkComponentTypeKHR    BType;
        VkComponentTypeKHR    CType;
        VkComponentTypeKHR    ResultType;
        VkBool32              saturatingAccumulation;
        VkScopeKHR            scope;
        uint32_t              workgroupInvocations;
    } VkCooperativeMatrixFlexibleDimensionsPropertiesNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `MGranularity` is the granularity of the number of rows in matrices `A`, `C`, and `Result`. The rows must be an integer multiple of this value.

- `KGranularity` is the granularity of columns in matrix `A` and rows in matrix `B`. The columns/rows must be an integer multiple of this value.

- `NGranularity` is the granularity of columns in matrices `B`, `C`, `Result`. The columns must be an integer multiple of this value.

- `AType` is the component type of matrix `A`, of type VkComponentTypeKHR.

- `BType` is the component type of matrix `B`, of type VkComponentTypeKHR.

- `CType` is the component type of matrix `C`, of type VkComponentTypeKHR.

- `ResultType` is the component type of matrix `Result`, of type VkComponentTypeKHR.

- `saturatingAccumulation` indicates whether the `SaturatingAccumulation` operand to `OpCooperativeMatrixMulAddKHR` must be present or not. If it is VK_TRUE, the `SaturatingAccumulation` operand must be present. If it is VK_FALSE, the `SaturatingAccumulation` operand must not be present.

- `scope` is the scope of all the matrix types, of type VkScopeKHR.

- `workgroupInvocations` is the number of invocations in the local workgroup when this combination of values is supported.

Rather than explicitly enumerating a list of supported sizes, `VkCooperativeMatrixFlexibleDimensionsPropertiesNV` advertises size granularities, where the matrix must be a multiple of the advertised size. The M and K granularities apply to rows and columns of matrices with `Use` of `MatrixA`, K, and N apply to rows and columns of matrices with `Use` of `MatrixB`, M, and N apply to rows and columns of matrices with `Use` of `MatrixAccumulator`.

For a given type combination, if multiple workgroup sizes are supported there may be multiple `VkCooperativeMatrixFlexibleDimensionsPropertiesNV` structures with different granularities.

All granularity values must be powers of two.

Note | Different A/B types may require different granularities but share the same accumulator type. In such a case, the supported granularity for a matrix with the accumulator type would be the smallest advertised granularity.

Valid Usage (Implicit)

- VUID-VkCooperativeMatrixFlexibleDimensionsPropertiesNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_COOPERATIVE_MATRIX_FLEXIBLE_DIMENSIONS_PROPERTIES_NV

- VUID-VkCooperativeMatrixFlexibleDimensionsPropertiesNV-pNext-pNext
  `pNext` must be `NULL`

The `VkCooperativeMatrixPropertiesNV` structure is defined as:

    // Provided by VK_NV_cooperative_matrix
    typedef struct VkCooperativeMatrixPropertiesNV {
        VkStructureType      sType;
        void*                pNext;
        uint32_t             MSize;
        uint32_t             NSize;
        uint32_t             KSize;
        VkComponentTypeNV    AType;
        VkComponentTypeNV    BType;
        VkComponentTypeNV    CType;
        VkComponentTypeNV    DType;
        VkScopeNV            scope;
    } VkCooperativeMatrixPropertiesNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `MSize` is the number of rows in matrices A, C, and D.

- `KSize` is the number of columns in matrix A and rows in matrix B.

- `NSize` is the number of columns in matrices B, C, D.

- `AType` is the component type of matrix A, of type VkComponentTypeNV.

- `BType` is the component type of matrix B, of type VkComponentTypeNV.

- `CType` is the component type of matrix C, of type VkComponentTypeNV.

- `DType` is the component type of matrix D, of type VkComponentTypeNV.

- `scope` is the scope of all the matrix types, of type VkScopeNV.

If some types are preferred over other types (e.g. for performance), they should appear earlier in the list enumerated by vkGetPhysicalDeviceCooperativeMatrixPropertiesNV.

At least one entry in the list must have power of two values for all of `MSize`, `KSize`, and `NSize`.

Valid Usage (Implicit)

- VUID-VkCooperativeMatrixPropertiesNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_COOPERATIVE_MATRIX_PROPERTIES_NV

- VUID-VkCooperativeMatrixPropertiesNV-pNext-pNext
  `pNext` must be `NULL`

Possible values for VkScopeKHR include:

    // Provided by VK_KHR_cooperative_matrix
    typedef enum VkScopeKHR {
        VK_SCOPE_DEVICE_KHR = 1,
        VK_SCOPE_WORKGROUP_KHR = 2,
        VK_SCOPE_SUBGROUP_KHR = 3,
        VK_SCOPE_QUEUE_FAMILY_KHR = 5,
      // Provided by VK_NV_cooperative_matrix
        VK_SCOPE_DEVICE_NV = VK_SCOPE_DEVICE_KHR,
      // Provided by VK_NV_cooperative_matrix
        VK_SCOPE_WORKGROUP_NV = VK_SCOPE_WORKGROUP_KHR,
      // Provided by VK_NV_cooperative_matrix
        VK_SCOPE_SUBGROUP_NV = VK_SCOPE_SUBGROUP_KHR,
      // Provided by VK_NV_cooperative_matrix
        VK_SCOPE_QUEUE_FAMILY_NV = VK_SCOPE_QUEUE_FAMILY_KHR,
    } VkScopeKHR;

    // Provided by VK_NV_cooperative_matrix
    // Equivalent to VkScopeKHR
    typedef VkScopeKHR VkScopeNV;

- VK_SCOPE_DEVICE_KHR corresponds to SPIR-V `Device` scope.

- VK_SCOPE_WORKGROUP_KHR corresponds to SPIR-V `Workgroup` scope.

- VK_SCOPE_SUBGROUP_KHR corresponds to SPIR-V `Subgroup` scope.

- VK_SCOPE_QUEUE_FAMILY_KHR corresponds to SPIR-V `QueueFamily` scope.

All enum values match the corresponding SPIR-V value.

Possible values for VkComponentTypeKHR include:

    // Provided by VK_KHR_cooperative_matrix, VK_NV_cooperative_vector
    typedef enum VkComponentTypeKHR {
        VK_COMPONENT_TYPE_FLOAT16_KHR = 0,
        VK_COMPONENT_TYPE_FLOAT32_KHR = 1,
        VK_COMPONENT_TYPE_FLOAT64_KHR = 2,
        VK_COMPONENT_TYPE_SINT8_KHR = 3,
        VK_COMPONENT_TYPE_SINT16_KHR = 4,
        VK_COMPONENT_TYPE_SINT32_KHR = 5,
        VK_COMPONENT_TYPE_SINT64_KHR = 6,
        VK_COMPONENT_TYPE_UINT8_KHR = 7,
        VK_COMPONENT_TYPE_UINT16_KHR = 8,
        VK_COMPONENT_TYPE_UINT32_KHR = 9,
        VK_COMPONENT_TYPE_UINT64_KHR = 10,
      // Provided by VK_KHR_cooperative_matrix with VK_KHR_shader_bfloat16
        VK_COMPONENT_TYPE_BFLOAT16_KHR = 1000141000,
      // Provided by VK_NV_cooperative_vector
        VK_COMPONENT_TYPE_SINT8_PACKED_NV = 1000491000,
      // Provided by VK_NV_cooperative_vector
        VK_COMPONENT_TYPE_UINT8_PACKED_NV = 1000491001,
      // Provided by VK_KHR_cooperative_matrix with VK_EXT_shader_float8
        VK_COMPONENT_TYPE_FLOAT8_E4M3_EXT = 1000491002,
      // Provided by VK_KHR_cooperative_matrix with VK_EXT_shader_float8
        VK_COMPONENT_TYPE_FLOAT8_E5M2_EXT = 1000491003,
      // Provided by VK_KHR_cooperative_matrix with VK_EXT_shader_ocp_microscaling_types
        VK_COMPONENT_TYPE_FLOAT6_E2M3_EXT = 1000672000,
      // Provided by VK_KHR_cooperative_matrix with VK_EXT_shader_ocp_microscaling_types
        VK_COMPONENT_TYPE_FLOAT6_E3M2_EXT = 1000672001,
      // Provided by VK_KHR_cooperative_matrix with VK_EXT_shader_ocp_microscaling_types
        VK_COMPONENT_TYPE_FLOAT4_E2M1_EXT = 1000672002,
      // Provided by VK_KHR_cooperative_matrix with VK_EXT_shader_ocp_microscaling_types
        VK_COMPONENT_TYPE_FLOAT8_UNSIGNED_E8M0_EXT = 1000672003,
      // Provided by VK_KHR_cooperative_matrix with VK_EXT_shader_ocp_microscaling_types
        VK_COMPONENT_TYPE_MXINT8_EXT = 1000672004,
      // Provided by VK_NV_cooperative_matrix
        VK_COMPONENT_TYPE_FLOAT16_NV = VK_COMPONENT_TYPE_FLOAT16_KHR,
      // Provided by VK_NV_cooperative_matrix
        VK_COMPONENT_TYPE_FLOAT32_NV = VK_COMPONENT_TYPE_FLOAT32_KHR,
      // Provided by VK_NV_cooperative_matrix
        VK_COMPONENT_TYPE_FLOAT64_NV = VK_COMPONENT_TYPE_FLOAT64_KHR,
      // Provided by VK_NV_cooperative_matrix
        VK_COMPONENT_TYPE_SINT8_NV = VK_COMPONENT_TYPE_SINT8_KHR,
      // Provided by VK_NV_cooperative_matrix
        VK_COMPONENT_TYPE_SINT16_NV = VK_COMPONENT_TYPE_SINT16_KHR,
      // Provided by VK_NV_cooperative_matrix
        VK_COMPONENT_TYPE_SINT32_NV = VK_COMPONENT_TYPE_SINT32_KHR,
      // Provided by VK_NV_cooperative_matrix
        VK_COMPONENT_TYPE_SINT64_NV = VK_COMPONENT_TYPE_SINT64_KHR,
      // Provided by VK_NV_cooperative_matrix
        VK_COMPONENT_TYPE_UINT8_NV = VK_COMPONENT_TYPE_UINT8_KHR,
      // Provided by VK_NV_cooperative_matrix
        VK_COMPONENT_TYPE_UINT16_NV = VK_COMPONENT_TYPE_UINT16_KHR,
      // Provided by VK_NV_cooperative_matrix
        VK_COMPONENT_TYPE_UINT32_NV = VK_COMPONENT_TYPE_UINT32_KHR,
      // Provided by VK_NV_cooperative_matrix
        VK_COMPONENT_TYPE_UINT64_NV = VK_COMPONENT_TYPE_UINT64_KHR,
      // Provided by VK_NV_cooperative_vector
        VK_COMPONENT_TYPE_FLOAT_E4M3_NV = VK_COMPONENT_TYPE_FLOAT8_E4M3_EXT,
      // Provided by VK_NV_cooperative_vector
        VK_COMPONENT_TYPE_FLOAT_E5M2_NV = VK_COMPONENT_TYPE_FLOAT8_E5M2_EXT,
    } VkComponentTypeKHR;

    // Provided by VK_NV_cooperative_matrix
    // Equivalent to VkComponentTypeKHR
    typedef VkComponentTypeKHR VkComponentTypeNV;

- VK_COMPONENT_TYPE_FLOAT16_KHR corresponds to SPIR-V `OpTypeFloat` 16.

- VK_COMPONENT_TYPE_FLOAT32_KHR corresponds to SPIR-V `OpTypeFloat` 32.

- VK_COMPONENT_TYPE_FLOAT64_KHR corresponds to SPIR-V `OpTypeFloat` 64.

- VK_COMPONENT_TYPE_SINT8_KHR corresponds to SPIR-V `OpTypeInt` 8 0/1.

- VK_COMPONENT_TYPE_SINT16_KHR corresponds to SPIR-V `OpTypeInt` 16 0/1.

- VK_COMPONENT_TYPE_SINT32_KHR corresponds to SPIR-V `OpTypeInt` 32 0/1.

- VK_COMPONENT_TYPE_SINT64_KHR corresponds to SPIR-V `OpTypeInt` 64 0/1.

- VK_COMPONENT_TYPE_UINT8_KHR corresponds to SPIR-V `OpTypeInt` 8 0/1.

- VK_COMPONENT_TYPE_UINT16_KHR corresponds to SPIR-V `OpTypeInt` 16 0/1.

- VK_COMPONENT_TYPE_UINT32_KHR corresponds to SPIR-V `OpTypeInt` 32 0/1.

- VK_COMPONENT_TYPE_UINT64_KHR corresponds to SPIR-V `OpTypeInt` 64 0/1.

- VK_COMPONENT_TYPE_BFLOAT16_KHR corresponds to SPIR-V `OpTypeFloat` 16 BFloat16KHR.

- VK_COMPONENT_TYPE_SINT8_PACKED_NV corresponds to four 8-bit signed integers packed in a 32-bit unsigned integer.

- VK_COMPONENT_TYPE_UINT8_PACKED_NV corresponds to four 8-bit unsigned integers packed in a 32-bit unsigned integer.

- VK_COMPONENT_TYPE_FLOAT_E4M3_NV corresponds to a floating-point type with a sign bit in the most significant bit, followed by four exponent bits, followed by three mantissa bits.

- VK_COMPONENT_TYPE_FLOAT_E5M2_NV corresponds to a floating-point type with a sign bit in the most significant bit, followed by five exponent bits, followed by two mantissa bits.

- VK_COMPONENT_TYPE_FLOAT8_E4M3_EXT corresponds to SPIR-V `OpTypeFloat` 8 Float8E4M3EXT.

- VK_COMPONENT_TYPE_FLOAT8_E5M2_EXT corresponds to SPIR-V `OpTypeFloat` 8 Float8E5M2EXT.

- VK_COMPONENT_TYPE_FLOAT6_E2M3_EXT corresponds to SPIR-V `OpTypeFloat` 6 Float6E2M3EXT.

- VK_COMPONENT_TYPE_FLOAT6_E3M2_EXT corresponds to SPIR-V `OpTypeFloat` 6 Float6E3M2EXT.

- VK_COMPONENT_TYPE_FLOAT4_E2M1_EXT corresponds to SPIR-V `OpTypeFloat` 4 Float4E2M1EXT.

- VK_COMPONENT_TYPE_FLOAT8_UNSIGNED_E8M0_EXT corresponds to SPIR-V `OpTypeFloat` 8 Float8UnsignedE8M0EXT.

- VK_COMPONENT_TYPE_MXINT8_EXT corresponds to SPIR-V `OpTypeFloat` 8 MXInt8EXT.

### 9.33. Cooperative Vectors

A cooperative vector type is a SPIR-V vector type optimized for the evaluation of small neural networks.

SPIR-V defines the types and instructions, but does not specify rules about what combinations of types are valid, and it is expected that different implementations may support different combinations.

To enumerate the supported cooperative vector type combinations, call:

    // Provided by VK_NV_cooperative_vector
    VkResult vkGetPhysicalDeviceCooperativeVectorPropertiesNV(
        VkPhysicalDevice                            physicalDevice,
        uint32_t*                                   pPropertyCount,
        VkCooperativeVectorPropertiesNV*            pProperties);

- `physicalDevice` is the physical device.

- `pPropertyCount` is a pointer to an integer related to the number of cooperative vector properties available or queried.

- `pProperties` is either `NULL` or a pointer to an array of VkCooperativeVectorPropertiesNV structures.

If `pProperties` is `NULL`, then the number of cooperative vector properties available is returned in `pPropertyCount`. Otherwise, `pPropertyCount` must point to a variable set by the user to the number of elements in the `pProperties` array, and on return the variable is overwritten with the number of structures actually written to `pProperties`. If `pPropertyCount` is less than the number of cooperative vector properties available, at most `pPropertyCount` structures will be written, and VK_INCOMPLETE will be returned instead of VK_SUCCESS, to indicate that not all the available cooperative vector properties were returned.

Valid Usage (Implicit)

- VUID-vkGetPhysicalDeviceCooperativeVectorPropertiesNV-physicalDevice-parameter
  `physicalDevice` must be a valid VkPhysicalDevice handle

- VUID-vkGetPhysicalDeviceCooperativeVectorPropertiesNV-pPropertyCount-parameter
  `pPropertyCount` must be a valid pointer to a `uint32_t` value

- VUID-vkGetPhysicalDeviceCooperativeVectorPropertiesNV-pProperties-parameter
  If the value referenced by `pPropertyCount` is not `0`, and `pProperties` is not `NULL`, `pProperties` must be a valid pointer to an array of `pPropertyCount` VkCooperativeVectorPropertiesNV structures

Return Codes

Success

  - VK_INCOMPLETE

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

Each `VkCooperativeVectorPropertiesNV` structure describes a single supported combination of types for a matrix-vector multiply (or multiply-add) operation (`OpCooperativeVectorMatrixMulNV` or `OpCooperativeVectorMatrixMulAddNV`).

The `VkCooperativeVectorPropertiesNV` structure is defined as:

    // Provided by VK_NV_cooperative_vector
    typedef struct VkCooperativeVectorPropertiesNV {
        VkStructureType       sType;
        void*                 pNext;
        VkComponentTypeKHR    inputType;
        VkComponentTypeKHR    inputInterpretation;
        VkComponentTypeKHR    matrixInterpretation;
        VkComponentTypeKHR    biasInterpretation;
        VkComponentTypeKHR    resultType;
        VkBool32              transpose;
    } VkCooperativeVectorPropertiesNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `inputType` is the component type of vector `Input`, of type VkComponentTypeKHR.

- `inputInterpretation` is the value of `InputInterpretation`, of type VkComponentTypeKHR.

- `matrixInterpretation` is the value of `MatrixInterpretation`, of type VkComponentTypeKHR.

- `biasInterpretation` is the value of `BiasInterpretation`, of type VkComponentTypeKHR.

- `resultType` is the component type of `Result` `Type`, of type VkComponentTypeKHR.

- `transpose` is a boolean indicating whether opaque layout matrices with this combination of input and output types supports transposition.

VK_COMPONENT_TYPE_SINT8_PACKED_NV and VK_COMPONENT_TYPE_UINT8_PACKED_NV must not be used for members other than `inputInterpretation`.

The following combinations must be supported (each row is a required combination):

inputType | inputInterpretation | matrixInterpretation | biasInterpretation | resultType
--- | --- | --- | --- | ---
FLOAT16 | FLOAT16 | FLOAT16 | FLOAT16 | FLOAT16
UINT32 | SINT8_PACKED | SINT8 | SINT32 | SINT32
SINT8 | SINT8 | SINT8 | SINT32 | SINT32
FLOAT32 | SINT8 | SINT8 | SINT32 | SINT32
FLOAT16 | FLOAT_E4M3 | FLOAT_E4M3 | FLOAT16 | FLOAT16
FLOAT16 | FLOAT_E5M2 | FLOAT_E5M2 | FLOAT16 | FLOAT16

Valid Usage (Implicit)

- VUID-VkCooperativeVectorPropertiesNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_COOPERATIVE_VECTOR_PROPERTIES_NV

- VUID-VkCooperativeVectorPropertiesNV-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkCooperativeVectorPropertiesNV-inputType-parameter
  `inputType` must be a valid VkComponentTypeKHR value

- VUID-VkCooperativeVectorPropertiesNV-inputInterpretation-parameter
  `inputInterpretation` must be a valid VkComponentTypeKHR value

- VUID-VkCooperativeVectorPropertiesNV-matrixInterpretation-parameter
  `matrixInterpretation` must be a valid VkComponentTypeKHR value

- VUID-VkCooperativeVectorPropertiesNV-biasInterpretation-parameter
  `biasInterpretation` must be a valid VkComponentTypeKHR value

- VUID-VkCooperativeVectorPropertiesNV-resultType-parameter
  `resultType` must be a valid VkComponentTypeKHR value

To query the size of a cooperative vector matrix, or to convert a matrix to another layout and type, call:

    // Provided by VK_NV_cooperative_vector
    VkResult vkConvertCooperativeVectorMatrixNV(
        VkDevice                                    device,
        const VkConvertCooperativeVectorMatrixInfoNV* pInfo);

- `device` is the device.

- `pInfo` is a pointer to a VkConvertCooperativeVectorMatrixInfoNV structure containing information about the layout conversion.

If `pInfo->dstData` is `NULL`, then the number of bytes required to store the converted matrix is returned in `pDstSize`. Otherwise, `pInfo->pDstSize` must point to a variable set by the user to the number of bytes in `pInfo->dstData`, and on return the variable is overwritten with the number of bytes actually written to `pInfo->dstData`. `pInfo->srcData` can be `NULL` when `pInfo->dstData` is `NULL`. If `pInfo->pDstSize` is less than the number of bytes required to store the converted matrix, no bytes will be written, and VK_INCOMPLETE will be returned instead of VK_SUCCESS, to indicate that not enough space was provided.

Valid Usage

- VUID-vkConvertCooperativeVectorMatrixNV-pInfo-10073
  If `pInfo->srcData.hostAddress` is `NULL`, then `pInfo->dstData.hostAddress` must be `NULL`

- VUID-vkConvertCooperativeVectorMatrixNV-pInfo-10074
  If `pInfo->srcData.hostAddress` is not `NULL`, then `pInfo->srcSize` must be large enough to contain the source matrix, based either on the standard matrix layout or based on the size filled out by this command

- VUID-vkConvertCooperativeVectorMatrixNV-pInfo-10075
  If `pInfo->dstData.hostAddress` is not `NULL`, then the value pointed to by `pInfo->pDstSize` must be large enough to contain the destination matrix, based either on the standard matrix layout or based on the size filled out by this command

- VUID-vkConvertCooperativeVectorMatrixNV-pInfo-10076
  If `pInfo->dstData.hostAddress` is not `NULL`, the source and destination memory ranges must not overlap

Valid Usage (Implicit)

- VUID-vkConvertCooperativeVectorMatrixNV-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkConvertCooperativeVectorMatrixNV-pInfo-parameter
  `pInfo` must be a valid pointer to a valid VkConvertCooperativeVectorMatrixInfoNV structure

Return Codes

Success

  - VK_INCOMPLETE

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

Each `VkConvertCooperativeVectorMatrixInfoNV` structure describes a request to convert the layout and type of a cooperative vector matrix.

The `VkConvertCooperativeVectorMatrixInfoNV` structure is defined as:

    // Provided by VK_NV_cooperative_vector
    typedef struct VkConvertCooperativeVectorMatrixInfoNV {
        VkStructureType                      sType;
        const void*                          pNext;
        size_t                               srcSize;
        VkDeviceOrHostAddressConstKHR        srcData;
        size_t*                              pDstSize;
        VkDeviceOrHostAddressKHR             dstData;
        VkComponentTypeKHR                   srcComponentType;
        VkComponentTypeKHR                   dstComponentType;
        uint32_t                             numRows;
        uint32_t                             numColumns;
        VkCooperativeVectorMatrixLayoutNV    srcLayout;
        size_t                               srcStride;
        VkCooperativeVectorMatrixLayoutNV    dstLayout;
        size_t                               dstStride;
    } VkConvertCooperativeVectorMatrixInfoNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `srcSize` is the length in bytes of `srcData`.

- `srcData` is either `NULL` or a pointer to the source data in the source layout.

- `pDstSize` is a pointer to an integer related to the number of bytes required or requested to convert.

- `dstData` is either `NULL` or a pointer to the destination data in the destination layout.

- `srcComponentType` is the type of a source matrix element.

- `dstComponentType` is the type of a destination matrix element.

- `numRows` is the number of rows in the matrix.

- `numColumns` is the number of columns in the matrix.

- `srcLayout` is the layout of the source matrix.

- `srcStride` is the number of bytes between a consecutive row or column (depending on `srcLayout`) of the source matrix, if it is row-major or column-major.

- `dstLayout` is the layout the matrix is converted to.

- `dstStride` is the number of bytes between a consecutive row or column (depending on `dstLayout`) of destination matrix, if it is row-major or column-major.

When called from vkCmdConvertCooperativeVectorMatrixNV, the `deviceAddress` members of `srcData` and `dstData` are used. When called from vkConvertCooperativeVectorMatrixNV, the `hostAddress` members of `srcData` and `dstData` are used.

For each of the source and destination matrix, if the layout is not either VK_COOPERATIVE_VECTOR_MATRIX_LAYOUT_ROW_MAJOR_NV or VK_COOPERATIVE_VECTOR_MATRIX_LAYOUT_COLUMN_MAJOR_NV, then the corresponding stride parameter is ignored.

The size of the destination is only a function of the destination layout information, and does not depend on the source layout information.

Conversion can be used to convert between VK_COMPONENT_TYPE_FLOAT32_KHR or VK_COMPONENT_TYPE_FLOAT16_KHR and any supported lower-precision floating-point type. In this case, the conversion uses round-to-nearest-even rounding.

Valid Usage

- VUID-VkConvertCooperativeVectorMatrixInfoNV-srcLayout-10077
  If `srcLayout` is row-major or column-major, then `srcStride` must be greater than the length of a row/column, and a multiple of the element size

- VUID-VkConvertCooperativeVectorMatrixInfoNV-dstLayout-10078
  If `dstLayout` is row-major or column-major, then `dstStride` must be greater than the length of a row/column, and a multiple of the element size

- VUID-VkConvertCooperativeVectorMatrixInfoNV-srcComponentType-10079
  If `srcComponentType` is not a supported VkCooperativeVectorPropertiesNV::`matrixInterpretation` value as reported by vkGetPhysicalDeviceCooperativeVectorPropertiesNV, then `srcComponentType` must be VK_COMPONENT_TYPE_FLOAT32_KHR

- VUID-VkConvertCooperativeVectorMatrixInfoNV-dstComponentType-10080
  If `dstComponentType` is not a supported VkCooperativeVectorPropertiesNV::`matrixInterpretation` value as reported by vkGetPhysicalDeviceCooperativeVectorPropertiesNV, then `dstComponentType` must be VK_COMPONENT_TYPE_FLOAT32_KHR

- VUID-VkConvertCooperativeVectorMatrixInfoNV-srcComponentType-10081
  If `srcComponentType` and `dstComponentType` are not equal, then one must be VK_COMPONENT_TYPE_FLOAT32_KHR or VK_COMPONENT_TYPE_FLOAT16_KHR and the other must be a lower-precision floating-point type

- VUID-VkConvertCooperativeVectorMatrixInfoNV-dstComponentType-10082
  If `dstComponentType` is VK_COMPONENT_TYPE_FLOAT_E4M3_NV or VK_COMPONENT_TYPE_FLOAT_E5M2_NV, then `dstLayout` must be VK_COOPERATIVE_VECTOR_MATRIX_LAYOUT_INFERENCING_OPTIMAL_NV or VK_COOPERATIVE_VECTOR_MATRIX_LAYOUT_TRAINING_OPTIMAL_NV

Valid Usage (Implicit)

- VUID-VkConvertCooperativeVectorMatrixInfoNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_CONVERT_COOPERATIVE_VECTOR_MATRIX_INFO_NV

- VUID-VkConvertCooperativeVectorMatrixInfoNV-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkConvertCooperativeVectorMatrixInfoNV-srcData-parameter
  `srcData` must be a valid VkDeviceOrHostAddressConstKHR union

- VUID-VkConvertCooperativeVectorMatrixInfoNV-pDstSize-parameter
  `pDstSize` must be a valid pointer to a `size_t` value

- VUID-VkConvertCooperativeVectorMatrixInfoNV-dstData-parameter
  `dstData` must be a valid VkDeviceOrHostAddressKHR union

- VUID-VkConvertCooperativeVectorMatrixInfoNV-srcComponentType-parameter
  `srcComponentType` must be a valid VkComponentTypeKHR value

- VUID-VkConvertCooperativeVectorMatrixInfoNV-dstComponentType-parameter
  `dstComponentType` must be a valid VkComponentTypeKHR value

- VUID-VkConvertCooperativeVectorMatrixInfoNV-srcLayout-parameter
  `srcLayout` must be a valid VkCooperativeVectorMatrixLayoutNV value

- VUID-VkConvertCooperativeVectorMatrixInfoNV-dstLayout-parameter
  `dstLayout` must be a valid VkCooperativeVectorMatrixLayoutNV value

Possible values for VkCooperativeVectorMatrixLayoutNV include:

    // Provided by VK_NV_cooperative_vector
    typedef enum VkCooperativeVectorMatrixLayoutNV {
        VK_COOPERATIVE_VECTOR_MATRIX_LAYOUT_ROW_MAJOR_NV = 0,
        VK_COOPERATIVE_VECTOR_MATRIX_LAYOUT_COLUMN_MAJOR_NV = 1,
        VK_COOPERATIVE_VECTOR_MATRIX_LAYOUT_INFERENCING_OPTIMAL_NV = 2,
        VK_COOPERATIVE_VECTOR_MATRIX_LAYOUT_TRAINING_OPTIMAL_NV = 3,
    } VkCooperativeVectorMatrixLayoutNV;

- VK_COOPERATIVE_VECTOR_MATRIX_LAYOUT_ROW_MAJOR_NV corresponds to SPIR-V `RowMajorNV` layout.

- VK_COOPERATIVE_VECTOR_MATRIX_LAYOUT_COLUMN_MAJOR_NV corresponds to SPIR-V `ColumnMajorNV` layout.

- VK_COOPERATIVE_VECTOR_MATRIX_LAYOUT_INFERENCING_OPTIMAL_NV corresponds to SPIR-V `InferencingOptimalNV` layout.

- VK_COOPERATIVE_VECTOR_MATRIX_LAYOUT_TRAINING_OPTIMAL_NV corresponds to SPIR-V `TrainingOptimalNV` layout.

All enum values match the corresponding SPIR-V value.

Row-major layout has elements of each row stored consecutively in memory, with a controllable stride from the start of one row to the start of the next row. Column-major layout has elements of each column stored consecutively in memory, with a controllable stride from the start of one column to the start of the next column. Inferencing-optimal and Training-optimal layouts are implementation-dependent, and the application can convert a matrix to those layouts using vkConvertCooperativeVectorMatrixNV or vkCmdConvertCooperativeVectorMatrixNV. Training-optimal layout with VK_COMPONENT_TYPE_FLOAT16_KHR or VK_COMPONENT_TYPE_FLOAT32_KHR type has the additional guarantee that the application can reinterpret the data as an array of elements and perform element-wise operations on the data, and finite values in any padding elements do not affect the result of a matrix-vector multiply (inf/NaN values may still cause NaN values in the result).

To convert a matrix to another layout and type, call:

    // Provided by VK_NV_cooperative_vector
    void vkCmdConvertCooperativeVectorMatrixNV(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    infoCount,
        const VkConvertCooperativeVectorMatrixInfoNV* pInfos);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `infoCount` is the number of layout conversions to perform.

- `pInfos` is a pointer to an array of VkConvertCooperativeVectorMatrixInfoNV structures containing information about the layout conversion.

This command does the same conversions as vkConvertCooperativeVectorMatrixNV, but executes on the device. One conversion is performed for each of the `infoCount` elements of `pInfos`.

This command’s execution is synchronized using VK_PIPELINE_STAGE_2_CONVERT_COOPERATIVE_VECTOR_MATRIX_BIT_NV.

Valid Usage

- VUID-vkCmdConvertCooperativeVectorMatrixNV-pInfo-10083
  For each element of `pInfo`, `srcData.deviceAddress` must be a valid VkDeviceAddress

- VUID-vkCmdConvertCooperativeVectorMatrixNV-pInfo-10895
  For each element of `pInfo`, `dstData.deviceAddress` must be a valid VkDeviceAddress

- VUID-vkCmdConvertCooperativeVectorMatrixNV-pInfo-10084
  For each element of `pInfo`, `srcData.deviceAddress` must be 64 byte aligned

- VUID-vkCmdConvertCooperativeVectorMatrixNV-pInfo-10085
  For each element of `pInfo`, `dstData.deviceAddress` must be 64 byte aligned

- VUID-vkCmdConvertCooperativeVectorMatrixNV-pInfo-10086
  For each element of `pInfo`, `srcSize` must be large enough to contain the source matrix, based either on the standard matrix layout or based on the size filled out by vkConvertCooperativeVectorMatrixNV

- VUID-vkCmdConvertCooperativeVectorMatrixNV-pInfo-10087
  For each element of `pInfo`, the value pointed to by `pDstSize` must be large enough to contain the destination matrix, based either on the standard matrix layout or based on the size filled out by vkConvertCooperativeVectorMatrixNV

- VUID-vkCmdConvertCooperativeVectorMatrixNV-None-10088
  Memory accessed by the sources and destinations of all of the conversions must not overlap

Valid Usage (Implicit)

- VUID-vkCmdConvertCooperativeVectorMatrixNV-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdConvertCooperativeVectorMatrixNV-pInfos-parameter
  `pInfos` must be a valid pointer to an array of `infoCount` valid VkConvertCooperativeVectorMatrixInfoNV structures

- VUID-vkCmdConvertCooperativeVectorMatrixNV-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdConvertCooperativeVectorMatrixNV-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, or VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdConvertCooperativeVectorMatrixNV-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdConvertCooperativeVectorMatrixNV-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdConvertCooperativeVectorMatrixNV-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdConvertCooperativeVectorMatrixNV-infoCount-arraylength
  `infoCount` must be greater than `0`

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT | Action

Conditional Rendering

vkCmdConvertCooperativeVectorMatrixNV is not affected by conditional rendering

### 9.34. Validation Cache

Validation cache objects allow the result of internal validation to be reused, both within a single application run and between multiple runs. Reuse within a single run is achieved by passing the same validation cache object when creating supported Vulkan objects. Reuse across runs of an application is achieved by retrieving validation cache contents in one run of an application, saving the contents, and using them to preinitialize a validation cache on a subsequent run. The contents of the validation cache objects are managed by the validation layers. Applications can manage the host memory consumed by a validation cache object and control the amount of data retrieved from a validation cache object.

Validation cache objects are represented by `VkValidationCacheEXT` handles:

    // Provided by VK_EXT_validation_cache
    VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkValidationCacheEXT)

To create validation cache objects, call:

    // Provided by VK_EXT_validation_cache
    VkResult vkCreateValidationCacheEXT(
        VkDevice                                    device,
        const VkValidationCacheCreateInfoEXT*       pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkValidationCacheEXT*                       pValidationCache);

- `device` is the logical device that creates the validation cache object.

- `pCreateInfo` is a pointer to a VkValidationCacheCreateInfoEXT structure containing the initial parameters for the validation cache object.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

- `pValidationCache` is a pointer to a VkValidationCacheEXT handle in which the resulting validation cache object is returned.

Note | Applications can track and manage the total host memory size of a validation cache object using the `pAllocator`. Applications can limit the amount of data retrieved from a validation cache object in `vkGetValidationCacheDataEXT`. Implementations should not internally limit the total number of entries added to a validation cache object or the total host memory consumed.

Once created, a validation cache can be passed to the `vkCreateShaderModule` command by adding this object to the VkShaderModuleCreateInfo structure’s `pNext` chain. If a VkShaderModuleValidationCacheCreateInfoEXT object is included in the VkShaderModuleCreateInfo::`pNext` chain, and its `validationCache` field is not VK_NULL_HANDLE, the implementation will query it for possible reuse opportunities and update it with new content. The use of the validation cache object in these commands is internally synchronized, and the same validation cache object can be used in multiple threads simultaneously.

Note | Implementations should make every effort to limit any critical sections to the actual accesses to the cache, which is expected to be significantly shorter than the duration of the `vkCreateShaderModule` command.

Valid Usage (Implicit)

- VUID-vkCreateValidationCacheEXT-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkCreateValidationCacheEXT-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkValidationCacheCreateInfoEXT structure

- VUID-vkCreateValidationCacheEXT-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateValidationCacheEXT-pValidationCache-parameter
  `pValidationCache` must be a valid pointer to a VkValidationCacheEXT handle

- VUID-vkCreateValidationCacheEXT-device-queuecount
  The device must have been created with at least `1` queue

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkValidationCacheCreateInfoEXT` structure is defined as:

    // Provided by VK_EXT_validation_cache
    typedef struct VkValidationCacheCreateInfoEXT {
        VkStructureType                    sType;
        const void*                        pNext;
        VkValidationCacheCreateFlagsEXT    flags;
        size_t                             initialDataSize;
        const void*                        pInitialData;
    } VkValidationCacheCreateInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is reserved for future use.

- `initialDataSize` is the number of bytes in `pInitialData`. If `initialDataSize` is zero, the validation cache will initially be empty.

- `pInitialData` is a pointer to previously retrieved validation cache data. If the validation cache data is incompatible (as defined below) with the device, the validation cache will be initially empty. If `initialDataSize` is zero, `pInitialData` is ignored.

Valid Usage

- VUID-VkValidationCacheCreateInfoEXT-initialDataSize-01534
  If `initialDataSize` is not `0`, it must be equal to the size of `pInitialData`, as returned by `vkGetValidationCacheDataEXT` when `pInitialData` was originally retrieved

- VUID-VkValidationCacheCreateInfoEXT-initialDataSize-01535
  If `initialDataSize` is not `0`, `pInitialData` must have been retrieved from a previous call to `vkGetValidationCacheDataEXT`

Valid Usage (Implicit)

- VUID-VkValidationCacheCreateInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VALIDATION_CACHE_CREATE_INFO_EXT

- VUID-VkValidationCacheCreateInfoEXT-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkValidationCacheCreateInfoEXT-flags-zerobitmask
  `flags` must be `0`

- VUID-VkValidationCacheCreateInfoEXT-pInitialData-parameter
  If `initialDataSize` is not `0`, `pInitialData` must be a valid pointer to an array of `initialDataSize` bytes

    // Provided by VK_EXT_validation_cache
    typedef VkFlags VkValidationCacheCreateFlagsEXT;

`VkValidationCacheCreateFlagsEXT` is a bitmask type for setting a mask, but is currently reserved for future use.

Validation cache objects can be merged using the command:

    // Provided by VK_EXT_validation_cache
    VkResult vkMergeValidationCachesEXT(
        VkDevice                                    device,
        VkValidationCacheEXT                        dstCache,
        uint32_t                                    srcCacheCount,
        const VkValidationCacheEXT*                 pSrcCaches);

- `device` is the logical device that owns the validation cache objects.

- `dstCache` is the handle of the validation cache to merge results into.

- `srcCacheCount` is the length of the `pSrcCaches` array.

- `pSrcCaches` is a pointer to an array of validation cache handles, which will be merged into `dstCache`. The previous contents of `dstCache` are included after the merge.

Note | The details of the merge operation are implementation-dependent, but implementations should merge the contents of the specified validation caches and prune duplicate entries.

Valid Usage

- VUID-vkMergeValidationCachesEXT-dstCache-01536
  `dstCache` must not appear in the list of source caches

Valid Usage (Implicit)

- VUID-vkMergeValidationCachesEXT-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkMergeValidationCachesEXT-dstCache-parameter
  `dstCache` must be a valid VkValidationCacheEXT handle

- VUID-vkMergeValidationCachesEXT-pSrcCaches-parameter
  `pSrcCaches` must be a valid pointer to an array of `srcCacheCount` valid VkValidationCacheEXT handles

- VUID-vkMergeValidationCachesEXT-srcCacheCount-arraylength
  `srcCacheCount` must be greater than `0`

- VUID-vkMergeValidationCachesEXT-dstCache-parent
  `dstCache` must have been created, allocated, or retrieved from `device`

- VUID-vkMergeValidationCachesEXT-pSrcCaches-parent
  Each element of `pSrcCaches` must have been created, allocated, or retrieved from `device`

Host Synchronization

- Host access to `dstCache` must be externally synchronized

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

Data can be retrieved from a validation cache object using the command:

    // Provided by VK_EXT_validation_cache
    VkResult vkGetValidationCacheDataEXT(
        VkDevice                                    device,
        VkValidationCacheEXT                        validationCache,
        size_t*                                     pDataSize,
        void*                                       pData);

- `device` is the logical device that owns the validation cache.

- `validationCache` is the validation cache to retrieve data from.

- `pDataSize` is a pointer to a value related to the amount of data in the validation cache, as described below.

- `pData` is either `NULL` or a pointer to a buffer.

If `pData` is `NULL`, then the maximum size of the data that can be retrieved from the validation cache, in bytes, is returned in `pDataSize`. Otherwise, `pDataSize` must point to a variable set by the application to the size of the buffer, in bytes, pointed to by `pData`, and on return the variable is overwritten with the amount of data actually written to `pData`. If `pDataSize` is less than the maximum size that can be retrieved by the validation cache, at most `pDataSize` bytes will be written to `pData`, and `vkGetValidationCacheDataEXT` will return VK_INCOMPLETE instead of VK_SUCCESS, to indicate that not all of the validation cache was returned.

Any data written to `pData` is valid and can be provided as the `pInitialData` member of the VkValidationCacheCreateInfoEXT structure passed to `vkCreateValidationCacheEXT`.

Two calls to `vkGetValidationCacheDataEXT` with the same parameters must retrieve the same data unless a command that modifies the contents of the cache is called between them.

Applications can store the data retrieved from the validation cache, and use these data, possibly in a future run of the application, to populate new validation cache objects. The results of validation, however, may depend on the vendor ID, device ID, driver version, and other details of the device. To enable applications to detect when previously retrieved data is incompatible with the device, the initial bytes written to `pData` must be a header consisting of the following members:

Table 12. Layout for Validation Cache Header Version VK_VALIDATION_CACHE_HEADER_VERSION_ONE_EXT
Offset | Size | Meaning
--- | --- | ---
0 | 4 | length in bytes of the entire validation cache header written as a stream of bytes, with the least significant byte first
4 | 4 | a VkValidationCacheHeaderVersionEXT value written as a stream of bytes, with the least significant byte first
8 | VK_UUID_SIZE | a layer commit ID expressed as a UUID, which uniquely identifies the version of the validation layers used to generate these validation results

The first four bytes encode the length of the entire validation cache header, in bytes. This value includes all fields in the header including the validation cache version field and the size of the length field.

The next four bytes encode the validation cache version, as described for VkValidationCacheHeaderVersionEXT. A consumer of the validation cache should use the cache version to interpret the remainder of the cache header.

If `pDataSize` is less than what is necessary to store this header, nothing will be written to `pData` and zero will be written to `pDataSize`.

Note | This query does not behave consistently with the behavior described in Opaque Binary Data Results, for historical reasons. If the amount of data available is larger than the passed `pDataSize`, the query returns up to the size of the passed buffer, and signals overflow with a VK_INCOMPLETE success status instead of returning a VK_ERROR_NOT_ENOUGH_SPACE_KHR error status.

Valid Usage (Implicit)

- VUID-vkGetValidationCacheDataEXT-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetValidationCacheDataEXT-validationCache-parameter
  `validationCache` must be a valid VkValidationCacheEXT handle

- VUID-vkGetValidationCacheDataEXT-pDataSize-parameter
  `pDataSize` must be a valid pointer to a `size_t` value

- VUID-vkGetValidationCacheDataEXT-pData-parameter
  If the value referenced by `pDataSize` is not `0`, and `pData` is not `NULL`, `pData` must be a valid pointer to an array of `pDataSize` bytes

- VUID-vkGetValidationCacheDataEXT-validationCache-parent
  `validationCache` must have been created, allocated, or retrieved from `device`

Return Codes

Success

  - VK_INCOMPLETE

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

Possible values of the second group of four bytes in the header returned by vkGetValidationCacheDataEXT, encoding the validation cache version, are:

    // Provided by VK_EXT_validation_cache
    typedef enum VkValidationCacheHeaderVersionEXT {
        VK_VALIDATION_CACHE_HEADER_VERSION_ONE_EXT = 1,
    } VkValidationCacheHeaderVersionEXT;

- VK_VALIDATION_CACHE_HEADER_VERSION_ONE_EXT specifies version one of the validation cache.

To destroy a validation cache, call:

    // Provided by VK_EXT_validation_cache
    void vkDestroyValidationCacheEXT(
        VkDevice                                    device,
        VkValidationCacheEXT                        validationCache,
        const VkAllocationCallbacks*                pAllocator);

- `device` is the logical device that destroys the validation cache object.

- `validationCache` is the handle of the validation cache to destroy.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

Valid Usage

- VUID-vkDestroyValidationCacheEXT-validationCache-01537
  If `VkAllocationCallbacks` were provided when `validationCache` was created, a compatible set of callbacks must be provided here

- VUID-vkDestroyValidationCacheEXT-validationCache-01538
  If no `VkAllocationCallbacks` were provided when `validationCache` was created, `pAllocator` must be `NULL`

Valid Usage (Implicit)

- VUID-vkDestroyValidationCacheEXT-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkDestroyValidationCacheEXT-validationCache-parameter
  If `validationCache` is not VK_NULL_HANDLE, `validationCache` must be a valid VkValidationCacheEXT handle

- VUID-vkDestroyValidationCacheEXT-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkDestroyValidationCacheEXT-validationCache-parent
  If `validationCache` is a valid handle, it must have been created, allocated, or retrieved from `device`

Host Synchronization

- Host access to `validationCache` must be externally synchronized

### 9.35. CUDA Modules

#### 9.35.1. Creating a CUDA Module

CUDA modules must contain some kernel code and must expose at least one function entry point.

CUDA modules are represented by `VkCudaModuleNV` handles:

    // Provided by VK_NV_cuda_kernel_launch
    VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkCudaModuleNV)

To create a CUDA module, call:

    // Provided by VK_NV_cuda_kernel_launch
    VkResult vkCreateCudaModuleNV(
        VkDevice                                    device,
        const VkCudaModuleCreateInfoNV*             pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkCudaModuleNV*                             pModule);

- `device` is the logical device that creates the shader module.

- `pCreateInfo` is a pointer to a VkCudaModuleCreateInfoNV structure.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

- `pModule` is a pointer to a VkCudaModuleNV handle in which the resulting CUDA module object is returned.

Once a CUDA module has been created, the application may create the function entry point, which must refer to one function in the module.

Valid Usage (Implicit)

- VUID-vkCreateCudaModuleNV-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkCreateCudaModuleNV-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkCudaModuleCreateInfoNV structure

- VUID-vkCreateCudaModuleNV-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateCudaModuleNV-pModule-parameter
  `pModule` must be a valid pointer to a VkCudaModuleNV handle

- VUID-vkCreateCudaModuleNV-device-queuecount
  The device must have been created with at least `1` queue

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_INITIALIZATION_FAILED

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkCudaModuleCreateInfoNV` structure is defined as:

    // Provided by VK_NV_cuda_kernel_launch
    typedef struct VkCudaModuleCreateInfoNV {
        VkStructureType    sType;
        const void*        pNext;
        size_t             dataSize;
        const void*        pData;
    } VkCudaModuleCreateInfoNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` may be `NULL` or may be a pointer to a structure extending this structure.

- `dataSize` is the length of the `pData` array.

- `pData` is a pointer to CUDA code

Valid Usage

- VUID-VkCudaModuleCreateInfoNV-dataSize-09413
  `dataSize` must be the total size in bytes of the PTX files or binary cache passed to `pData`

Valid Usage (Implicit)

- VUID-VkCudaModuleCreateInfoNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_CUDA_MODULE_CREATE_INFO_NV

- VUID-VkCudaModuleCreateInfoNV-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkCudaModuleCreateInfoNV-pData-parameter
  `pData` must be a valid pointer to an array of `dataSize` bytes

- VUID-VkCudaModuleCreateInfoNV-dataSize-arraylength
  `dataSize` must be greater than `0`

#### 9.35.2. Creating a CUDA Function Handle

CUDA functions are represented by `VkCudaFunctionNV` handles. Handles to `global` functions may then be used to issue a kernel launch (i.e. dispatch) from a commandbuffer. See Dispatching Command for CUDA PTX kernel.

    // Provided by VK_NV_cuda_kernel_launch
    VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkCudaFunctionNV)

To create a CUDA function, call:

    // Provided by VK_NV_cuda_kernel_launch
    VkResult vkCreateCudaFunctionNV(
        VkDevice                                    device,
        const VkCudaFunctionCreateInfoNV*           pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkCudaFunctionNV*                           pFunction);

- `device` is the logical device that creates the shader module.

- `pCreateInfo` is a pointer to a VkCudaFunctionCreateInfoNV structure.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

- `pFunction` is a pointer to a VkCudaFunctionNV handle in which the resulting CUDA function object is returned.

Valid Usage (Implicit)

- VUID-vkCreateCudaFunctionNV-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkCreateCudaFunctionNV-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkCudaFunctionCreateInfoNV structure

- VUID-vkCreateCudaFunctionNV-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateCudaFunctionNV-pFunction-parameter
  `pFunction` must be a valid pointer to a VkCudaFunctionNV handle

- VUID-vkCreateCudaFunctionNV-device-queuecount
  The device must have been created with at least `1` queue

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_INITIALIZATION_FAILED

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkCudaFunctionCreateInfoNV` structure is defined as:

    // Provided by VK_NV_cuda_kernel_launch
    typedef struct VkCudaFunctionCreateInfoNV {
        VkStructureType    sType;
        const void*        pNext;
        VkCudaModuleNV     module;
        const char*        pName;
    } VkCudaFunctionCreateInfoNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `module` is the CUDA VkCudaModuleNV module in which the function resides.

- `pName` is a null-terminated UTF-8 string containing the name of the shader entry point for this stage.

Valid Usage (Implicit)

- VUID-VkCudaFunctionCreateInfoNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_CUDA_FUNCTION_CREATE_INFO_NV

- VUID-VkCudaFunctionCreateInfoNV-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkCudaFunctionCreateInfoNV-module-parameter
  `module` must be a valid VkCudaModuleNV handle

- VUID-VkCudaFunctionCreateInfoNV-pName-parameter
  `pName` must be a null-terminated UTF-8 string

#### 9.35.3. Destroying a CUDA Function

To destroy a CUDA function handle, call:

    // Provided by VK_NV_cuda_kernel_launch
    void vkDestroyCudaFunctionNV(
        VkDevice                                    device,
        VkCudaFunctionNV                            function,
        const VkAllocationCallbacks*                pAllocator);

- `device` is the logical device that destroys the Function.

- `function` is the handle of the CUDA function to destroy.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

Valid Usage (Implicit)

- VUID-vkDestroyCudaFunctionNV-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkDestroyCudaFunctionNV-function-parameter
  `function` must be a valid VkCudaFunctionNV handle

- VUID-vkDestroyCudaFunctionNV-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkDestroyCudaFunctionNV-function-parent
  `function` must have been created, allocated, or retrieved from `device`

#### 9.35.4. Destroying a CUDA Module

To destroy a CUDA shader module, call:

    // Provided by VK_NV_cuda_kernel_launch
    void vkDestroyCudaModuleNV(
        VkDevice                                    device,
        VkCudaModuleNV                              module,
        const VkAllocationCallbacks*                pAllocator);

- `device` is the logical device that destroys the shader module.

- `module` is the handle of the CUDA module to destroy.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

Valid Usage (Implicit)

- VUID-vkDestroyCudaModuleNV-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkDestroyCudaModuleNV-module-parameter
  `module` must be a valid VkCudaModuleNV handle

- VUID-vkDestroyCudaModuleNV-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkDestroyCudaModuleNV-module-parent
  `module` must have been created, allocated, or retrieved from `device`

#### 9.35.5. Reading back CUDA Module Cache

After uploading the PTX kernel code, the module compiles the code to generate a binary cache with all the necessary information for the device to execute it. It is possible to read back this cache for later use, such as accelerating the initialization of further executions.

To get the CUDA module cache call:

    // Provided by VK_NV_cuda_kernel_launch
    VkResult vkGetCudaModuleCacheNV(
        VkDevice                                    device,
        VkCudaModuleNV                              module,
        size_t*                                     pCacheSize,
        void*                                       pCacheData);

- `device` is the logical device that destroys the Function.

- `module` is the CUDA module.

- `pCacheSize` is a pointer containing the amount of bytes to be copied in `pCacheData`

- `pCacheData` is a pointer to a buffer in which to copy the binary cache

If `pCacheData` is `NULL`, then the size of the binary cache, in bytes, is returned in `pCacheSize`. Otherwise, `pCacheSize` must point to a variable set by the application to the size of the buffer, in bytes, pointed to by `pCacheData`, and on return the variable is overwritten with the amount of data actually written to `pCacheData`. If `pCacheSize` is less than the size of the binary shader code, nothing is written to `pCacheData`, and VK_INCOMPLETE will be returned instead of VK_SUCCESS.

The returned cache may then be used later for further initialization of the CUDA module, by sending this cache instead of the PTX code when using vkCreateCudaModuleNV.

Note | Using the binary cache instead of the original PTX code should significantly speed up initialization of the CUDA module, given that the whole compilation and validation will not be necessary. As with VkPipelineCache, the binary cache depends on the specific implementation. The application must assume the cache upload might fail in many circumstances and thus may have to get ready for falling back to the original PTX code if necessary. Most often, the cache may succeed if the same device driver and architecture is used between the cache generation from PTX and the use of this cache. In the event of a new driver version or if using a different device architecture, this cache may become invalid.

Note | This query does not behave consistently with the behavior described in Opaque Binary Data Results, for historical reasons. If the amount of data available is larger than the passed `pDataSize`, the query returns a VK_INCOMPLETE success status instead of a VK_ERROR_NOT_ENOUGH_SPACE_KHR error status.

Valid Usage (Implicit)

- VUID-vkGetCudaModuleCacheNV-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetCudaModuleCacheNV-module-parameter
  `module` must be a valid VkCudaModuleNV handle

- VUID-vkGetCudaModuleCacheNV-pCacheSize-parameter
  `pCacheSize` must be a valid pointer to a `size_t` value

- VUID-vkGetCudaModuleCacheNV-pCacheData-parameter
  If the value referenced by `pCacheSize` is not `0`, and `pCacheData` is not `NULL`, `pCacheData` must be a valid pointer to an array of `pCacheSize` bytes

- VUID-vkGetCudaModuleCacheNV-module-parent
  `module` must have been created, allocated, or retrieved from `device`

Return Codes

Success

  - VK_INCOMPLETE

  - VK_SUCCESS

Failure

  - VK_ERROR_INITIALIZATION_FAILED

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

#### 9.35.6. Limitations

CUDA and Vulkan do not use the device in the same configuration. The following limitations must be taken into account:

- It is not possible to read or write global parameters from Vulkan. The only way to share resources or send values to the PTX kernel is to pass them as arguments of the function. See Resources sharing between CUDA Kernel and Vulkan for more details.

- No calls to functions external to the module PTX are supported.

- Vulkan disables some shader/kernel exceptions, which could break CUDA kernels relying on exceptions.

- CUDA kernels submitted to Vulkan are limited to the amount of shared memory, which can be queried from the physical capabilities. It may be less than what CUDA can offer.

- CUDA instruction-level preemption (CILP) does not work.

- CUDA Unified Memory will not work in this extension.

- CUDA Dynamic parallelism is not supported.

- `vk*DispatchIndirect` is not available.

### 9.36. Shader Instrumentation

Shaders can be instrumented to provide a runtime shader cost analysis.

Shader instrumentation is enabled for a pipeline when VK_PIPELINE_CREATE_2_INSTRUMENT_SHADERS_BIT_ARM is included in VkPipelineCreateFlags2CreateInfoKHR::`flags`.

Shader instrumentation is enabled for a shader object when VK_SHADER_CREATE_INSTRUMENT_SHADER_BIT_ARM is included in VkShaderCreateInfoEXT::`flags`.

Note | Shader instrumentation will incur a runtime performance cost. Applications or tools are only expected to enable shader instrumentation during development, for performance profiling or debugging purposes, and to leave it disabled in production use of the applications.

#### 9.36.1. Shader Instrumentation Metrics

To enumerate the available shader instrumentation metrics, call:

    // Provided by VK_ARM_shader_instrumentation
    VkResult vkEnumeratePhysicalDeviceShaderInstrumentationMetricsARM(
        VkPhysicalDevice                            physicalDevice,
        uint32_t*                                   pDescriptionCount,
        VkShaderInstrumentationMetricDescriptionARM* pDescriptions);

- `physicalDevice` is the physical device.

- `pDescriptionCount` is a pointer to an integer related to the number of shader instrumentation metrics available or queried.

- `pDescriptions` is either `NULL` or a pointer to an array of VkShaderInstrumentationMetricDescriptionARM structures.

If `pDescriptions` is `NULL`, then the number of shader instrumentation metrics available is returned in `pDescriptionCount`. Otherwise, `pDescriptionCount` must point to a variable set by the application to the number of elements in the `pDescriptions` array, and on return the variable is overwritten with the number of structures actually written to `pDescriptions`. If `pDescriptionCount` is less than the number shader instrumentation metrics available, at most `pDescriptionCount` structures will be written, and VK_INCOMPLETE will be returned instead of VK_SUCCESS, to indicate that not all the available shader instrumentation metrics were returned.

Valid Usage (Implicit)

- VUID-vkEnumeratePhysicalDeviceShaderInstrumentationMetricsARM-physicalDevice-parameter
  `physicalDevice` must be a valid VkPhysicalDevice handle

- VUID-vkEnumeratePhysicalDeviceShaderInstrumentationMetricsARM-pDescriptionCount-parameter
  `pDescriptionCount` must be a valid pointer to a `uint32_t` value

- VUID-vkEnumeratePhysicalDeviceShaderInstrumentationMetricsARM-pDescriptions-parameter
  If the value referenced by `pDescriptionCount` is not `0`, and `pDescriptions` is not `NULL`, `pDescriptions` must be a valid pointer to an array of `pDescriptionCount` VkShaderInstrumentationMetricDescriptionARM structures

Return Codes

Success

  - VK_INCOMPLETE

  - VK_SUCCESS

Failure

  - VK_ERROR_INITIALIZATION_FAILED

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkShaderInstrumentationMetricDescriptionARM` structure is defined as:

    // Provided by VK_ARM_shader_instrumentation
    typedef struct VkShaderInstrumentationMetricDescriptionARM {
        VkStructureType    sType;
        void*              pNext;
        char               name[VK_MAX_DESCRIPTION_SIZE];
        char               description[VK_MAX_DESCRIPTION_SIZE];
    } VkShaderInstrumentationMetricDescriptionARM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `name` is an array of VK_MAX_DESCRIPTION_SIZE `char` containing a null-terminated UTF-8 string which is a short human readable name for this shader instrumentation metric.

- `description` is an array of VK_MAX_DESCRIPTION_SIZE `char` containing a null-terminated UTF-8 string which is a human readable description for this shader instrumentation metric.

Valid Usage (Implicit)

- VUID-VkShaderInstrumentationMetricDescriptionARM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SHADER_INSTRUMENTATION_METRIC_DESCRIPTION_ARM

- VUID-VkShaderInstrumentationMetricDescriptionARM-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkShaderInstrumentationMetricDescriptionARM-name-parameter
  `name` must be a null-terminated UTF-8 string whose length is less than or equal to VK_MAX_DESCRIPTION_SIZE

- VUID-VkShaderInstrumentationMetricDescriptionARM-description-parameter
  `description` must be a null-terminated UTF-8 string whose length is less than or equal to VK_MAX_DESCRIPTION_SIZE

#### 9.36.2. Shader Instrumentation Objects

Shader instrumentation metrics are captured via instrumentation objects.

Shader instrumentation objects are represented by `VkShaderInstrumentationARM` handles:

    // Provided by VK_ARM_shader_instrumentation
    VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkShaderInstrumentationARM)

To create a shader instrumentation object, call:

    // Provided by VK_ARM_shader_instrumentation
    VkResult vkCreateShaderInstrumentationARM(
        VkDevice                                    device,
        const VkShaderInstrumentationCreateInfoARM* pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkShaderInstrumentationARM*                 pInstrumentation);

- `device` is the logical device that creates the shader instrumentation object.

- `pCreateInfo` is a pointer to a VkShaderInstrumentationCreateInfoARM structure containing information about how the shader instrumentation object is to be created.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

- `pInstrumentation` is a pointer to a handle in which the resulting shader instrumentation object is returned.

Valid Usage
Valid Usage (Implicit)

- VUID-vkCreateShaderInstrumentationARM-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkCreateShaderInstrumentationARM-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkShaderInstrumentationCreateInfoARM structure

- VUID-vkCreateShaderInstrumentationARM-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateShaderInstrumentationARM-pInstrumentation-parameter
  `pInstrumentation` must be a valid pointer to a VkShaderInstrumentationARM handle

- VUID-vkCreateShaderInstrumentationARM-device-queuecount
  The device must have been created with at least `1` queue

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkShaderInstrumentationCreateInfoARM` structure is defined as:

    // Provided by VK_ARM_shader_instrumentation
    typedef struct VkShaderInstrumentationCreateInfoARM {
        VkStructureType    sType;
        void*              pNext;
    } VkShaderInstrumentationCreateInfoARM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

Valid Usage (Implicit)

- VUID-VkShaderInstrumentationCreateInfoARM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SHADER_INSTRUMENTATION_CREATE_INFO_ARM

- VUID-VkShaderInstrumentationCreateInfoARM-pNext-pNext
  `pNext` must be `NULL`

To destroy a shader instrumentation object, call:

    // Provided by VK_ARM_shader_instrumentation
    void vkDestroyShaderInstrumentationARM(
        VkDevice                                    device,
        VkShaderInstrumentationARM                  instrumentation,
        const VkAllocationCallbacks*                pAllocator);

- `device` is the logical device that destroys the shader instrumentation.

- `instrumentation` is the handle of the shader instrumentation to destroy.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

Valid Usage

- VUID-vkDestroyShaderInstrumentationARM-instrumentation-12374
  All submitted commands that refer to `instrumentation` must have completed execution

Valid Usage (Implicit)

- VUID-vkDestroyShaderInstrumentationARM-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkDestroyShaderInstrumentationARM-instrumentation-parameter
  If `instrumentation` is not VK_NULL_HANDLE, `instrumentation` must be a valid VkShaderInstrumentationARM handle

- VUID-vkDestroyShaderInstrumentationARM-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkDestroyShaderInstrumentationARM-instrumentation-parent
  If `instrumentation` is a valid handle, it must have been created, allocated, or retrieved from `device`

Host Synchronization

- Host access to `instrumentation` must be externally synchronized

#### 9.36.3. Shader Instrumentation Capture

To begin shader instrumentation, call:

    // Provided by VK_ARM_shader_instrumentation
    void vkCmdBeginShaderInstrumentationARM(
        VkCommandBuffer                             commandBuffer,
        VkShaderInstrumentationARM                  instrumentation);

- `commandBuffer` is the command buffer into which this command will be recorded.

- `instrumentation` is the handle of the shader instrumentation object that will capture the metrics.

After beginning shader instrumentation, shader instrumentation is considered active within the command buffer it was called in until shader instrumentation is ended.

The shader instrumentation object has an implicit result index where the per-shader metrics will be written. The result index is set to 0 when the object is created by calling `vkCreateShaderInstrumentationARM`, and incremented by `1` for each draw, dispatch, and ray tracing command recorded while the shader instrumentation object is active.

The result index is also incremented by `1` when vkCmdExecuteGeneratedCommandsEXT is recorded.

While shader instrumentation is active, instrumented shaders write to the instrumentation object. These writes must be synchronized using the instrumented shader’s stage with access mask VK_ACCESS_2_SHADER_WRITE_BIT. If no instrumentation object is bound, writes are discarded.

If a command buffer is submitted multiple times, the shader instrumented metrics for all submissions will be aggregated in the instrumentation object, unless the metrics are cleared between submissions.

Valid Usage

- VUID-vkCmdBeginShaderInstrumentationARM-commandBuffer-12375
  This command must not be recorded while shader instrumentation is active within `commandBuffer`

- VUID-vkCmdBeginShaderInstrumentationARM-commandBuffer-12376
  `commandBuffer` must not be a protected command buffer

Valid Usage (Implicit)

- VUID-vkCmdBeginShaderInstrumentationARM-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdBeginShaderInstrumentationARM-instrumentation-parameter
  `instrumentation` must be a valid VkShaderInstrumentationARM handle

- VUID-vkCmdBeginShaderInstrumentationARM-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdBeginShaderInstrumentationARM-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, VK_QUEUE_DATA_GRAPH_BIT_ARM, or VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdBeginShaderInstrumentationARM-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdBeginShaderInstrumentationARM-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdBeginShaderInstrumentationARM-commonparent
  Both of `commandBuffer`, and `instrumentation` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to `instrumentation` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_DATA_GRAPH_BIT_ARM VK_QUEUE_GRAPHICS_BIT | Action State

Conditional Rendering

vkCmdBeginShaderInstrumentationARM is not affected by conditional rendering

To end shader instrumentation, call:

    // Provided by VK_ARM_shader_instrumentation
    void vkCmdEndShaderInstrumentationARM(
        VkCommandBuffer                             commandBuffer);

- `commandBuffer` is the command buffer into which this command will be recorded.

Once recorded, shader instrumentation is no longer considered active within the command buffer.

Valid Usage

- VUID-vkCmdEndShaderInstrumentationARM-commandBuffer-12377
  Shader instrumentation must be active within `commandBuffer`

- VUID-vkCmdEndShaderInstrumentationARM-commandBuffer-12378
  `commandBuffer` must not be a protected command buffer

Valid Usage (Implicit)

- VUID-vkCmdEndShaderInstrumentationARM-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdEndShaderInstrumentationARM-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdEndShaderInstrumentationARM-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, VK_QUEUE_DATA_GRAPH_BIT_ARM, or VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdEndShaderInstrumentationARM-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdEndShaderInstrumentationARM-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_DATA_GRAPH_BIT_ARM VK_QUEUE_GRAPHICS_BIT | Action State

Conditional Rendering

vkCmdEndShaderInstrumentationARM is not affected by conditional rendering

#### 9.36.4. Shader Instrumentation Retrieval

Data can be retrieved from an instrumentation object in units of metric blocks. The size of each metric block in bytes is `sizeof`(VkShaderInstrumentationMetricDataHeaderARM) + `sizeof`(uint64_t) × `VkPhysicalDeviceShaderInstrumentationPropertiesARM`::`numMetrics`.

To retrieve metric blocks from an instrumentation object, call:

    // Provided by VK_ARM_shader_instrumentation
    VkResult vkGetShaderInstrumentationValuesARM(
        VkDevice                                    device,
        VkShaderInstrumentationARM                  instrumentation,
        uint32_t*                                   pMetricBlockCount,
        void*                                       pMetricValues,
        VkShaderInstrumentationValuesFlagsARM       flags);

- `device` is the logical device that was used to capture shader instrumentation data.

- `instrumentation` is the shader instrumentation object to retrieve values from

- `pMetricBlockCount` is a pointer to an integer related to the number of metric blocks available or queried.

- `pMetricValues` is either `NULL` or a pointer to an application-allocated buffer where the results will be written.

- `flags` is reserved for future use.

If `pMetricValues` is `NULL`, then the number of metric blocks available is returned in `pMetricBlockCount`. Otherwise, `pMetricBlockCount` must point to a variable set by the application to the number of elements in the `pMetricValues` array, and on return the variable is overwritten with the number of metric blocks actually written to `pMetricValues`. If `pMetricBlockCount` is less than the number of metric blocks available, at most `pMetricBlockCount` elements will be written, and VK_INCOMPLETE will be returned instead of VK_SUCCESS, to indicate that not all the available metric blocks were returned.

Metrics are written to `pMetricValues` as a tightly packed array of metric blocks, where each block consists of a `VkShaderInstrumentationMetricDataHeaderARM` header followed by `VkPhysicalDeviceShaderInstrumentationPropertiesARM`::`numMetrics` unsigned 64-bit values. The order of the metrics matches the order in which they are enumerated by vkEnumeratePhysicalDeviceShaderInstrumentationMetricsARM.

Valid Usage (Implicit)

- VUID-vkGetShaderInstrumentationValuesARM-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetShaderInstrumentationValuesARM-instrumentation-parameter
  `instrumentation` must be a valid VkShaderInstrumentationARM handle

- VUID-vkGetShaderInstrumentationValuesARM-pMetricBlockCount-parameter
  `pMetricBlockCount` must be a valid pointer to a `uint32_t` value

- VUID-vkGetShaderInstrumentationValuesARM-pMetricValues-parameter
  `pMetricValues` must be a pointer value

- VUID-vkGetShaderInstrumentationValuesARM-flags-zerobitmask
  `flags` must be `0`

- VUID-vkGetShaderInstrumentationValuesARM-instrumentation-parent
  `instrumentation` must have been created, allocated, or retrieved from `device`

Return Codes

Success

  - VK_INCOMPLETE

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

    // Provided by VK_ARM_shader_instrumentation
    typedef VkFlags VkShaderInstrumentationValuesFlagsARM;

`VkShaderInstrumentationValuesFlagsARM` is a bitmask type for parameters to the retrieval, but is currently reserved for future use.

The shader instrumentation metrics block header is defined as:

    // Provided by VK_ARM_shader_instrumentation
    typedef struct VkShaderInstrumentationMetricDataHeaderARM {
        uint32_t              resultIndex;
        uint32_t              resultSubIndex;
        VkShaderStageFlags    stages;
        uint32_t              basicBlockIndex;
    } VkShaderInstrumentationMetricDataHeaderARM;

- `resultIndex` is the result index of the metric block, as captured when the command was recorded.

- `resultSubIndex` is a secondary index with the result index, explained further below.

- `stages` is a bitfield of VkShaderStageFlagBits describing the shader stages that the metric block is for.

- `basicBlockIndex` is the index of the basic block within the shader that the metric block is for.

Valid Usage (Implicit)

- VUID-VkShaderInstrumentationMetricDataHeaderARM-stages-parameter
  `stages` must be a valid combination of VkShaderStageFlagBits values

- VUID-VkShaderInstrumentationMetricDataHeaderARM-stages-requiredbitmask
  `stages` must not be `0`

The `resultIndex` is the index captured during command buffer recording, and identifies the draw, dispatch, or ray tracing command that the metrics are captured for.

Metrics are returned in ascending order of `resultIndex` values. Metrics with the same value of `resultIndex` are returned in ascending order of `resultSubIndex` values. Metrics with the same value of `resultIndex` and `resultSubIndex` are grouped by the value of `stages`. Metrics with the same value of `resultIndex`, `resultSubIndex`, and `stages` are returned in ascending order of `basicBlockIndex` values.

All metrics for commands that record multiple draws (such as indirect drawing commands with `drawCount` greater than one), dispatches, or involve groups of shaders (such as ray tracing pipelines), are returned using the same `resultIndex`.

Implementations may use a non-zero `resultSubIndex` to report more fine-grained metrics (such as per draw) for such commands, or aggregate all metrics for the command using `resultSubIndex` zero.

Metrics for commands recorded while multiview is enabled are returned as aggregated values across all views.

Implementations may aggregate metrics for multiple shader stages. The value of `stages` describes which shader stages have been aggregated.

`basicBlockIndex` describes the index of the basic block of the shader that metrics are captured for. If `VkPhysicalDeviceShaderInstrumentationPropertiesARM`::`perBasicBlockGranularity` is VK_FALSE, results are aggregated for the entire shader and reported as basic block zero.

#### 9.36.5. Shader Instrumentation Clearing

To clear the value of all metric blocks in an instrumentation object to zero, call:

    // Provided by VK_ARM_shader_instrumentation
    void vkClearShaderInstrumentationMetricsARM(
        VkDevice                                    device,
        VkShaderInstrumentationARM                  instrumentation);

- `device` is the logical device that owns the shader instrumentation object.

- `instrumentation` is the shader instrumentation object to clear.

Valid Usage (Implicit)

- VUID-vkClearShaderInstrumentationMetricsARM-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkClearShaderInstrumentationMetricsARM-instrumentation-parameter
  `instrumentation` must be a valid VkShaderInstrumentationARM handle

- VUID-vkClearShaderInstrumentationMetricsARM-instrumentation-parent
  `instrumentation` must have been created, allocated, or retrieved from `device`

## 10. Pipelines

The following figure shows a block diagram of the Vulkan pipelines. Some Vulkan commands specify geometric objects to be drawn or computational work to be performed, while others specify state controlling how objects are handled by the various pipeline stages, or control data transfer between memory organized as images and buffers. Commands are effectively sent through a processing pipeline, such as a graphics pipeline, a ray tracing pipeline, or a compute pipeline.

The graphics pipeline can be operated in two modes, as either primitive shading or mesh shading pipeline.

Primitive Shading

The first stage of the graphics pipeline (Input Assembler) assembles vertices to form geometric primitives such as points, lines, and triangles, based on a requested primitive topology. In the next stage (Vertex Shader) vertices can be transformed, computing positions and attributes for each vertex. If tessellation and/or geometry shaders are supported, they can then generate multiple primitives from a single input primitive, possibly changing the primitive topology or generating additional attribute data in the process.

Cluster Culling Shading

When using the Cluster Culling Shader, a compute-like shader will perform cluster-based culling, a set of new built-in output variables are used to express visible cluster, in addition, a new built-in function is used to emit these variables from the cluster culling shader to the Input Assembler (IA) stage, then IA can use these variables to fetch vertices of visible cluster and drive vertex shader to work.

Mesh Shading

When using the mesh shading pipeline input primitives are not assembled implicitly, but explicitly through the (Mesh Shader). The work on the mesh pipeline is initiated by the application drawing a set of mesh tasks.

If an optional (Task Shader) is active, each task triggers the execution of a task shader workgroup that will generate a new set of tasks upon completion. Each of these spawned tasks, or each of the original dispatched tasks if no task shader is present, triggers the execution of a mesh shader workgroup that produces an output mesh with a variable-sized number of primitives assembled from vertices stored in the output mesh.

Common

The final resulting primitives are clipped to a clip volume in preparation for the next stage, Rasterization. The rasterizer produces a series of fragments associated with a region of the framebuffer, from a two-dimensional description of a point, line segment, or triangle. These fragments are processed by fragment operations to determine whether generated values will be written to the framebuffer. Fragment shading determines the values to be written to the framebuffer attachments. Framebuffer operations then read and write the color and depth/stencil attachments of the framebuffer for a given subpass of a render pass instance. The attachments can be used as input attachments in the fragment shader in a later subpass of the same render pass.

The compute pipeline is a separate pipeline from the graphics pipeline, which operates on one-, two-, or three-dimensional workgroups which can read from and write to buffer and image memory.

This ordering is meant only as a tool for describing Vulkan, not as a strict rule of how Vulkan is implemented, and we present it only as a means to organize the various operations of the pipelines. Actual ordering guarantees between pipeline stages are explained in detail in the synchronization chapter.

Figure 2. Block diagram of the Vulkan pipeline

Each pipeline is controlled by a monolithic object created from a description of all of the shader stages and any relevant fixed-function stages. Linking the whole pipeline together allows the optimization of shaders based on their input/outputs and eliminates expensive draw time state validation.

A pipeline object is bound to the current state using vkCmdBindPipeline. Any pipeline object state that is specified as dynamic is not applied to the current state when the pipeline object is bound, but is instead set by dynamic state setting commands.

If the `commandBufferInheritance` feature is not enabled, then no state, including dynamic state, is inherited from one command buffer to another.

If the `commandBufferInheritance` feature is enabled, then all graphics and compute state that is valid at the end of the command buffer executed in a queue is inherited and valid at beginning of the command buffer next executed in the same queue. This applies to both primary and secondary command buffers, where a primary command buffer submitted to a queue will inherit state from the previously submitted command buffer to that queue, secondary command buffers will inherit state from the primary or seconard command buffer they are executed in, and after a seconard command buffer is executed, its state inherited by the primary or secondary command buffer that executed it. Command buffers executed in one queue do not inherit state from any command buffers executed in another queue.

Compute, ray tracing, and graphics pipelines are each represented by `VkPipeline` handles:

    // Provided by VK_VERSION_1_0
    VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPipeline)

### 10.1. Multiple Pipeline Creation

Multiple pipelines can be created in a single call by commands such as:

- vkCreateExecutionGraphPipelinesAMDX,

- vkCreateRayTracingPipelinesKHR,

- vkCreateRayTracingPipelinesNV,

- vkCreateDataGraphPipelinesARM,

- vkCreateGraphicsPipelines,

- vkCreateComputePipelines.

The creation commands are passed an array `pCreateInfos` of `Vk*PipelineCreateInfo` structures specifying parameters of each pipeline to be created, and return a corresponding array of handles in `pPipelines`. Each element index i of `pPipelines` is created based on the corresponding element i of `pCreateInfos`.

Applications can group together similar pipelines to be created in a single call, and implementations are encouraged to look for reuse opportunities when creating a group.

When attempting to create many pipelines in a single command, it is possible that creation may fail for a subset of them. In this case, the corresponding elements of `pPipelines` will be VK_NULL_HANDLE. If creation fails for a pipeline despite valid arguments (for example, due to out of memory errors), the VkResult code returned by the pipeline creation command will indicate why. The implementation will attempt to create all pipelines, and only return VK_NULL_HANDLE values for those that actually failed.

If creation fails for a pipeline that has the VK_PIPELINE_CREATE_EARLY_RETURN_ON_FAILURE_BIT set in its `Vk*PipelineCreateInfo`, pipelines at an index in the `pPipelines` array greater than or equal to that of the failing pipeline will be VK_NULL_HANDLE.

If creation fails for multiple pipelines, the returned VkResult must be the return value of any one of the pipelines which did not succeed. An application can reliably clean up from a failed call by iterating over the `pPipelines` array and destroying every element that is not VK_NULL_HANDLE.

If the entire command fails and no pipelines are created, all elements of `pPipelines` will be VK_NULL_HANDLE.

### 10.2. Pipeline Creation Flags

When creating a pipeline, the application can specify a set of flags that control how the pipeline is created and certain aspects of its behavior and capabilities. These flags are specified by chaining the VkPipelineCreateFlags2CreateInfo structure to the pipeline creation structure with a bitmask of VkPipelineCreateFlagBits2, or by setting the `flags` member of the pipeline creation structure to a bitmask of VkPipelineCreateFlagBits.

The `VkPipelineCreateFlags2CreateInfo` structure is defined as:

    // Provided by VK_VERSION_1_4
    typedef struct VkPipelineCreateFlags2CreateInfo {
        VkStructureType           sType;
        const void*               pNext;
        VkPipelineCreateFlags2    flags;
    } VkPipelineCreateFlags2CreateInfo;

    // Provided by VK_KHR_extended_flags, VK_KHR_maintenance5
    // Equivalent to VkPipelineCreateFlags2CreateInfo
    typedef VkPipelineCreateFlags2CreateInfo VkPipelineCreateFlags2CreateInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask of VkPipelineCreateFlagBits2 specifying how a pipeline will be generated.

If this structure is included in the `pNext` chain of a pipeline creation structure, `flags` is used instead of the corresponding `flags` value passed in that creation structure, allowing additional creation flags to be specified.

Valid Usage (Implicit)

- VUID-VkPipelineCreateFlags2CreateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PIPELINE_CREATE_FLAGS_2_CREATE_INFO

- VUID-VkPipelineCreateFlags2CreateInfo-flags-parameter
  `flags` must be a valid combination of VkPipelineCreateFlagBits2 values

Structure Chaining

Extends the structures

  - VkComputePipelineCreateInfo

  - VkGraphicsPipelineCreateInfo

  - VkRayTracingPipelineCreateInfoKHR

  - VkRayTracingPipelineCreateInfoNV

Bits which can be set in VkPipelineCreateFlags2CreateInfo::`flags`, specifying how a pipeline is created, are:

    // Provided by VK_VERSION_1_4
    // Flag bits for VkPipelineCreateFlagBits2
    typedef VkFlags64 VkPipelineCreateFlagBits2;
    static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_DISABLE_OPTIMIZATION_BIT = 0x00000001ULL;
    static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_ALLOW_DERIVATIVES_BIT = 0x00000002ULL;
    static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_DERIVATIVE_BIT = 0x00000004ULL;
    static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_VIEW_INDEX_FROM_DEVICE_INDEX_BIT = 0x00000008ULL;
    static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_DISPATCH_BASE_BIT = 0x00000010ULL;
    static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT = 0x00000100ULL;
    static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_EARLY_RETURN_ON_FAILURE_BIT = 0x00000200ULL;
    static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_NO_PROTECTED_ACCESS_BIT = 0x08000000ULL;
    static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_PROTECTED_ACCESS_ONLY_BIT = 0x40000000ULL;
    // Provided by VK_AMDX_shader_enqueue with VK_VERSION_1_4 or VK_KHR_extended_flags or VK_KHR_maintenance5
    #ifdef VK_ENABLE_BETA_EXTENSIONS
    static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_EXECUTION_GRAPH_BIT_AMDX = 0x100000000ULL;
    #endif
    // Provided by VK_EXT_descriptor_heap
    static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT = 0x1000000000ULL;
    // Provided by VK_KHR_ray_tracing_pipeline
    static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RAY_TRACING_SKIP_BUILT_IN_PRIMITIVES_BIT_KHR = 0x00001000ULL;
    // Provided by VK_KHR_extended_flags with VK_EXT_opacity_micromap, VK_EXT_opacity_micromap with VK_KHR_maintenance5 or VK_VERSION_1_4
    static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RAY_TRACING_OPACITY_MICROMAP_BIT_EXT = 0x01000000ULL;
    // Provided by VK_NV_ray_tracing_linear_swept_spheres
    static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RAY_TRACING_ALLOW_SPHERES_AND_LINEAR_SWEPT_SPHERES_BIT_NV = 0x200000000ULL;
    // Provided by VK_EXT_legacy_dithering with (VK_KHR_dynamic_rendering or VK_VERSION_1_3) and (VK_VERSION_1_4 or VK_KHR_extended_flags or VK_KHR_maintenance5)
    static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_ENABLE_LEGACY_DITHERING_BIT_EXT = 0x400000000ULL;
    // Provided by VK_KHR_extended_flags, VK_KHR_maintenance5
    static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_DISABLE_OPTIMIZATION_BIT_KHR = 0x00000001ULL;
    // Provided by VK_KHR_extended_flags, VK_KHR_maintenance5
    static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_ALLOW_DERIVATIVES_BIT_KHR = 0x00000002ULL;
    // Provided by VK_KHR_extended_flags, VK_KHR_maintenance5
    static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_DERIVATIVE_BIT_KHR = 0x00000004ULL;
    // Provided by VK_KHR_extended_flags, VK_KHR_maintenance5
    static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_VIEW_INDEX_FROM_DEVICE_INDEX_BIT_KHR = 0x00000008ULL;
    // Provided by VK_KHR_extended_flags, VK_KHR_maintenance5
    static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_DISPATCH_BASE_BIT_KHR = 0x00000010ULL;
    // Provided by VK_KHR_extended_flags with VK_NV_ray_tracing, VK_KHR_maintenance5 with VK_NV_ray_tracing
    static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_DEFER_COMPILE_BIT_NV = 0x00000020ULL;
    // Provided by VK_KHR_extended_flags with VK_KHR_pipeline_executable_properties, VK_KHR_maintenance5 with VK_KHR_pipeline_executable_properties
    static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_CAPTURE_STATISTICS_BIT_KHR = 0x00000040ULL;
    // Provided by VK_KHR_extended_flags with VK_KHR_pipeline_executable_properties, VK_KHR_maintenance5 with VK_KHR_pipeline_executable_properties
    static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR = 0x00000080ULL;
    // Provided by VK_KHR_extended_flags with VK_VERSION_1_3 or VK_EXT_pipeline_creation_cache_control, VK_KHR_maintenance5 with VK_VERSION_1_3 or VK_EXT_pipeline_creation_cache_control
    static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT_KHR = 0x00000100ULL;
    // Provided by VK_KHR_extended_flags with VK_VERSION_1_3 or VK_EXT_pipeline_creation_cache_control, VK_KHR_maintenance5 with VK_VERSION_1_3 or VK_EXT_pipeline_creation_cache_control
    static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_EARLY_RETURN_ON_FAILURE_BIT_KHR = 0x00000200ULL;
    // Provided by VK_KHR_extended_flags with VK_EXT_graphics_pipeline_library, VK_KHR_maintenance5 with VK_EXT_graphics_pipeline_library
    static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_LINK_TIME_OPTIMIZATION_BIT_EXT = 0x00000400ULL;
    // Provided by VK_KHR_extended_flags with VK_EXT_graphics_pipeline_library, VK_KHR_maintenance5 with VK_EXT_graphics_pipeline_library
    static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RETAIN_LINK_TIME_OPTIMIZATION_INFO_BIT_EXT = 0x00800000ULL;
    // Provided by VK_KHR_extended_flags with VK_KHR_pipeline_library, VK_KHR_maintenance5 with VK_KHR_pipeline_library
    static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_LIBRARY_BIT_KHR = 0x00000800ULL;
    // Provided by VK_KHR_extended_flags with VK_KHR_ray_tracing_pipeline, VK_KHR_maintenance5 with VK_KHR_ray_tracing_pipeline
    static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RAY_TRACING_SKIP_TRIANGLES_BIT_KHR = 0x00001000ULL;
    // Provided by VK_KHR_extended_flags with VK_KHR_ray_tracing_pipeline, VK_KHR_maintenance5 with VK_KHR_ray_tracing_pipeline
    static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RAY_TRACING_SKIP_AABBS_BIT_KHR = 0x00002000ULL;
    // Provided by VK_KHR_extended_flags with VK_KHR_ray_tracing_pipeline, VK_KHR_maintenance5 with VK_KHR_ray_tracing_pipeline
    static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR = 0x00004000ULL;
    // Provided by VK_KHR_extended_flags with VK_KHR_ray_tracing_pipeline, VK_KHR_maintenance5 with VK_KHR_ray_tracing_pipeline
    static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR = 0x00008000ULL;
    // Provided by VK_KHR_extended_flags with VK_KHR_ray_tracing_pipeline, VK_KHR_maintenance5 with VK_KHR_ray_tracing_pipeline
    static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR = 0x00010000ULL;
    // Provided by VK_KHR_extended_flags with VK_KHR_ray_tracing_pipeline, VK_KHR_maintenance5 with VK_KHR_ray_tracing_pipeline
    static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR = 0x00020000ULL;
    // Provided by VK_KHR_extended_flags with VK_KHR_ray_tracing_pipeline, VK_KHR_maintenance5 with VK_KHR_ray_tracing_pipeline
    static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR = 0x00080000ULL;
    // Provided by VK_KHR_extended_flags with VK_NV_device_generated_commands, VK_KHR_maintenance5 with VK_NV_device_generated_commands
    static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_INDIRECT_BINDABLE_BIT_NV = 0x00040000ULL;
    // Provided by VK_KHR_extended_flags with VK_NV_ray_tracing_motion_blur, VK_KHR_maintenance5 with VK_NV_ray_tracing_motion_blur
    static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RAY_TRACING_ALLOW_MOTION_BIT_NV = 0x00100000ULL;
    // Provided by VK_KHR_extended_flags with (VK_KHR_dynamic_rendering or VK_VERSION_1_3) and VK_KHR_fragment_shading_rate, VK_KHR_maintenance5 with (VK_KHR_dynamic_rendering or VK_VERSION_1_3) and VK_KHR_fragment_shading_rate
    static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = 0x00200000ULL;
    // Provided by VK_KHR_extended_flags with (VK_KHR_dynamic_rendering or VK_VERSION_1_3) and VK_EXT_fragment_density_map, VK_KHR_maintenance5 with (VK_KHR_dynamic_rendering or VK_VERSION_1_3) and VK_EXT_fragment_density_map
    static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT = 0x00400000ULL;
    // Provided by VK_KHR_extended_flags with VK_EXT_attachment_feedback_loop_layout, VK_KHR_maintenance5 with VK_EXT_attachment_feedback_loop_layout
    static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_COLOR_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT = 0x02000000ULL;
    // Provided by VK_KHR_extended_flags with VK_EXT_attachment_feedback_loop_layout, VK_KHR_maintenance5 with VK_EXT_attachment_feedback_loop_layout
    static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_DEPTH_STENCIL_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT = 0x04000000ULL;
    // Provided by VK_KHR_maintenance5 with VK_VERSION_1_4 or VK_EXT_pipeline_protected_access
    static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_NO_PROTECTED_ACCESS_BIT_EXT = 0x08000000ULL;
    // Provided by VK_KHR_maintenance5 with VK_VERSION_1_4 or VK_EXT_pipeline_protected_access
    static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_PROTECTED_ACCESS_ONLY_BIT_EXT = 0x40000000ULL;
    // Provided by VK_KHR_extended_flags with VK_NV_displacement_micromap, VK_KHR_maintenance5 with VK_NV_displacement_micromap
    #ifdef VK_ENABLE_BETA_EXTENSIONS
    static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RAY_TRACING_DISPLACEMENT_MICROMAP_BIT_NV = 0x10000000ULL;
    #endif
    // Provided by VK_KHR_extended_flags with VK_EXT_descriptor_buffer, VK_KHR_maintenance5 with VK_EXT_descriptor_buffer
    static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_DESCRIPTOR_BUFFER_BIT_EXT = 0x20000000ULL;
    // Provided by VK_KHR_extended_flags with VK_ARM_pipeline_opacity_micromap, VK_KHR_maintenance5 with VK_ARM_pipeline_opacity_micromap, VK_ARM_pipeline_opacity_micromap
    static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_DISALLOW_OPACITY_MICROMAP_BIT_ARM = 0x2000000000ULL;
    // Provided by VK_KHR_maintenance5 with VK_ARM_shader_instrumentation, VK_ARM_shader_instrumentation
    static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_INSTRUMENT_SHADERS_BIT_ARM = 0x8000000000ULL;
    // Provided by VK_KHR_pipeline_binary
    static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_CAPTURE_DATA_BIT_KHR = 0x80000000ULL;
    // Provided by VK_EXT_device_generated_commands
    static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_INDIRECT_BINDABLE_BIT_EXT = 0x4000000000ULL;
    // Provided by VK_VALVE_fragment_density_map_layered
    static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE = 0x10000000000ULL;
    // Provided by VK_KHR_opacity_micromap with VK_VERSION_1_4 or VK_KHR_extended_flags or VK_KHR_maintenance5
    static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RAY_TRACING_OPACITY_MICROMAP_BIT_KHR = 0x01000000ULL;
    // Provided by VK_KHR_opacity_micromap with VK_VERSION_1_4 or VK_KHR_extended_flags or VK_KHR_maintenance5
    static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_KHR = 0x20000000000ULL;
    // Provided by VK_EXT_shader_64bit_indexing
    static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_64_BIT_INDEXING_BIT_EXT = 0x80000000000ULL;

    // Provided by VK_KHR_extended_flags, VK_KHR_maintenance5
    // Equivalent to VkPipelineCreateFlagBits2
    typedef VkPipelineCreateFlagBits2 VkPipelineCreateFlagBits2KHR;

- VK_PIPELINE_CREATE_2_DISABLE_OPTIMIZATION_BIT specifies that the created pipeline will not be optimized. Using this flag may reduce the time taken to create the pipeline.

- VK_PIPELINE_CREATE_2_ALLOW_DERIVATIVES_BIT specifies that the pipeline to be created is allowed to be the parent of a pipeline that will be created in a subsequent pipeline creation call.

- VK_PIPELINE_CREATE_2_DERIVATIVE_BIT specifies that the pipeline to be created will be a child of a previously created parent pipeline.

- VK_PIPELINE_CREATE_2_VIEW_INDEX_FROM_DEVICE_INDEX_BIT specifies that any shader input variables decorated as `ViewIndex` will be assigned values as if they were decorated as `DeviceIndex`.

- VK_PIPELINE_CREATE_2_DISPATCH_BASE_BIT specifies that a compute pipeline can be used with vkCmdDispatchBase with a non-zero base workgroup.

- VK_PIPELINE_CREATE_2_DEFER_COMPILE_BIT_NV specifies that a pipeline is created with all shaders in the deferred state. Before using the pipeline the application must call vkCompileDeferredNV exactly once on each shader in the pipeline before using the pipeline.

- VK_PIPELINE_CREATE_2_CAPTURE_STATISTICS_BIT_KHR specifies that the shader compiler should capture statistics for the pipeline executables produced by the compile process which can later be retrieved by calling vkGetPipelineExecutableStatisticsKHR. Enabling this flag must not affect the final compiled pipeline but may disable pipeline caching or otherwise affect pipeline creation time.

- VK_PIPELINE_CREATE_2_CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR specifies that the shader compiler should capture the internal representations of pipeline executables produced by the compile process which can later be retrieved by calling vkGetPipelineExecutableInternalRepresentationsKHR. Enabling this flag must not affect the final compiled pipeline but may disable pipeline caching or otherwise affect pipeline creation time. When capturing IR from pipelines created with pipeline libraries, there is no guarantee that IR from libraries can be retrieved from the linked pipeline. Applications should retrieve IR from each library, and any linked pipelines, separately.

- VK_PIPELINE_CREATE_2_LIBRARY_BIT_KHR specifies that the pipeline cannot be used directly, and instead defines a pipeline library that can be combined with other pipelines using the VkPipelineLibraryCreateInfoKHR structure. This is available in ray tracing and graphics pipelines.

- VK_PIPELINE_CREATE_2_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR specifies that an any-hit shader will always be present when an any-hit shader would be executed. A NULL any-hit shader is an any-hit shader which is effectively VK_SHADER_UNUSED_KHR, such as from a shader group consisting entirely of zeros.

- VK_PIPELINE_CREATE_2_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR specifies that a closest hit shader will always be present when a closest hit shader would be executed. A NULL closest hit shader is a closest hit shader which is effectively VK_SHADER_UNUSED_KHR, such as from a shader group consisting entirely of zeros.

- VK_PIPELINE_CREATE_2_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR specifies that a miss shader will always be present when a miss shader would be executed. A NULL miss shader is a miss shader which is effectively VK_SHADER_UNUSED_KHR, such as from a shader group consisting entirely of zeros.

- VK_PIPELINE_CREATE_2_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR specifies that an intersection shader will always be present when an intersection shader would be executed. A NULL intersection shader is an intersection shader which is effectively VK_SHADER_UNUSED_KHR, such as from a shader group consisting entirely of zeros.

- VK_PIPELINE_CREATE_2_RAY_TRACING_SKIP_TRIANGLES_BIT_KHR specifies that all built-in primitives including triangles, spheres, and LSS primitives will be skipped during traversal using pipeline trace ray instructions.

- VK_PIPELINE_CREATE_2_RAY_TRACING_SKIP_BUILT_IN_PRIMITIVES_BIT_KHR is an alias for VK_PIPELINE_CREATE_2_RAY_TRACING_SKIP_TRIANGLES_BIT_KHR.

- VK_PIPELINE_CREATE_2_RAY_TRACING_SKIP_AABBS_BIT_KHR specifies that AABB primitives will be skipped during traversal using pipeline trace ray instructions.

- VK_PIPELINE_CREATE_2_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR specifies that the shader group handles can be saved and reused on a subsequent run (e.g. for trace capture and replay).

- VK_PIPELINE_CREATE_2_RAY_TRACING_ALLOW_SPHERES_AND_LINEAR_SWEPT_SPHERES_BIT_NV specifies that the pipeline is allowed to use spheres or linear swept spheres as a geometry type in the acceleration structures. Using this flag may affect performance.

- VK_PIPELINE_CREATE_2_INDIRECT_BINDABLE_BIT_NV specifies that the pipeline can be used in combination with Device-Generated Commands.

- VK_PIPELINE_CREATE_2_INDIRECT_BINDABLE_BIT_EXT specifies that the pipeline can be used in a `VkIndirectExecutionSetEXT`.

- VK_PIPELINE_CREATE_2_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT specifies that pipeline creation will fail if a compile is required for creation of a valid VkPipeline object; VK_PIPELINE_COMPILE_REQUIRED will be returned by pipeline creation, and the VkPipeline will be VK_NULL_HANDLE.

- When creating multiple pipelines, VK_PIPELINE_CREATE_2_EARLY_RETURN_ON_FAILURE_BIT specifies that control will be returned to the application if any individual pipeline returns a result which is not VK_SUCCESS rather than continuing to create additional pipelines.

- VK_PIPELINE_CREATE_2_RAY_TRACING_ALLOW_MOTION_BIT_NV specifies that the pipeline is allowed to use `OpTraceRayMotionNV`.

- VK_PIPELINE_CREATE_2_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR specifies that the pipeline will be used with a fragment shading rate attachment.

- VK_PIPELINE_CREATE_2_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT specifies that the pipeline will be used with a fragment density map attachment.

- VK_PIPELINE_CREATE_2_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE specifies that the pipeline can be used with layered fragment density maps.

- VK_PIPELINE_CREATE_2_LINK_TIME_OPTIMIZATION_BIT_EXT specifies that pipeline libraries being linked into this library should have link time optimizations applied. If this bit is omitted, implementations should instead perform linking as rapidly as possible.

- VK_PIPELINE_CREATE_2_RETAIN_LINK_TIME_OPTIMIZATION_INFO_BIT_EXT specifies that pipeline libraries should retain any information necessary to later perform an optimal link with VK_PIPELINE_CREATE_2_LINK_TIME_OPTIMIZATION_BIT_EXT.

- VK_PIPELINE_CREATE_2_DESCRIPTOR_BUFFER_BIT_EXT specifies that a pipeline will be used with descriptor buffers, rather than descriptor sets.

- VK_PIPELINE_CREATE_2_COLOR_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT specifies that the pipeline may be used with an attachment feedback loop including color attachments.

- VK_PIPELINE_CREATE_2_DEPTH_STENCIL_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT specifies that the pipeline may be used with an attachment feedback loop including depth-stencil attachments.

- VK_PIPELINE_CREATE_2_RAY_TRACING_OPACITY_MICROMAP_BIT_KHR specifies that the ray tracing pipeline can be used with acceleration structures which reference an opacity micromap array. This flag has no effect on using opacity micromaps with ray queries.

- VK_PIPELINE_CREATE_2_RAY_TRACING_DISPLACEMENT_MICROMAP_BIT_NV specifies that the ray tracing pipeline can be used with acceleration structures which reference a displacement micromap array.

- VK_PIPELINE_CREATE_2_NO_PROTECTED_ACCESS_BIT specifies that the pipeline must not be bound to a protected command buffer.

- VK_PIPELINE_CREATE_2_PROTECTED_ACCESS_ONLY_BIT specifies that the pipeline must not be bound to an unprotected command buffer.

- VK_PIPELINE_CREATE_2_CAPTURE_DATA_BIT_KHR specifies that `VkPipelineBinaryKHR` objects can be created from the pipeline. If VK_PIPELINE_CREATE_2_CAPTURE_DATA_BIT_KHR is used, implementations should not store pipeline data to an internal cache, if such a cache exists as stated by `pipelineBinaryInternalCache`. If `pipelineBinaryPrefersInternalCache` is VK_TRUE, applications should not use VK_PIPELINE_CREATE_2_CAPTURE_DATA_BIT_KHR.

- VK_PIPELINE_CREATE_2_ENABLE_LEGACY_DITHERING_BIT_EXT specifies that the pipeline will be used in a render pass that is begun with VK_RENDERING_ENABLE_LEGACY_DITHERING_BIT_EXT.

- VK_PIPELINE_CREATE_2_EXECUTION_GRAPH_BIT_AMDX specifies that the pipeline will be used in an execution graph

- VK_PIPELINE_CREATE_2_DISALLOW_OPACITY_MICROMAP_BIT_ARM specifies that the pipeline must not be used with acceleration structures which reference an opacity micromap.

- VK_PIPELINE_CREATE_2_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_KHR specifies that the pipeline cannot be used with acceleration structures which are built with geometry that have an index buffer including both special indices and indices pointing to an associated micromap array. Geometry which has an index buffer using only special indices without an associated micromap array can be used with this flag.

- VK_PIPELINE_CREATE_2_64_BIT_INDEXING_BIT_EXT specifies that the pipeline enables 64-bit indexing.

- VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT specifies that the pipeline will use descriptor heap mappings instead of descriptor set layouts.

- VK_PIPELINE_CREATE_2_INSTRUMENT_SHADERS_BIT_ARM specifies that the shaders in the pipeline will be instrumented.

It is valid to set both VK_PIPELINE_CREATE_2_ALLOW_DERIVATIVES_BIT and VK_PIPELINE_CREATE_2_DERIVATIVE_BIT. This allows a pipeline to be both a parent and possibly a child in a pipeline hierarchy. See Pipeline Derivatives for more information.

When an implementation is looking up a pipeline in a pipeline cache, if that pipeline is being created using linked libraries, implementations should always return an equivalent pipeline created with VK_PIPELINE_CREATE_2_LINK_TIME_OPTIMIZATION_BIT_EXT if available, whether or not that bit was specified.

Note | Using VK_PIPELINE_CREATE_2_LINK_TIME_OPTIMIZATION_BIT_EXT (or not) when linking pipeline libraries is intended as a performance tradeoff between host and device. If the bit is omitted, linking should be faster and produce a pipeline more rapidly, but performance of the pipeline on the target device may be reduced. If the bit is included, linking may be slower but should produce a pipeline with device performance comparable to a monolithically created pipeline. Using both options can allow latency-sensitive applications to generate a suboptimal but usable pipeline quickly, and then perform an optimal link in the background, substituting the result for the suboptimally linked pipeline as soon as it is available.

    // Provided by VK_VERSION_1_4
    typedef VkFlags64 VkPipelineCreateFlags2;

    // Provided by VK_KHR_extended_flags, VK_KHR_maintenance5
    // Equivalent to VkPipelineCreateFlags2
    typedef VkPipelineCreateFlags2 VkPipelineCreateFlags2KHR;

`VkPipelineCreateFlags2` is a bitmask type for setting a mask of zero or more VkPipelineCreateFlagBits2.

Bits which can be set in

- VkGraphicsPipelineCreateInfo::`flags`

- VkComputePipelineCreateInfo::`flags`

- VkRayTracingPipelineCreateInfoKHR::`flags`

- VkRayTracingPipelineCreateInfoNV::`flags`

specify how a pipeline is created, and are:

Warning | This functionality is superseded by VkPipelineCreateFlagBits2. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_0
    typedef enum VkPipelineCreateFlagBits {
        VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT = 0x00000001,
        VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT = 0x00000002,
        VK_PIPELINE_CREATE_DERIVATIVE_BIT = 0x00000004,
      // Provided by VK_VERSION_1_1
        VK_PIPELINE_CREATE_DISPATCH_BASE_BIT = 0x00000010,
      // Provided by VK_VERSION_1_1
        VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT = 0x00000008,
      // Provided by VK_VERSION_1_3
        VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT = 0x00000100,
      // Provided by VK_VERSION_1_3
        VK_PIPELINE_CREATE_EARLY_RETURN_ON_FAILURE_BIT = 0x00000200,
      // Provided by VK_VERSION_1_4
        VK_PIPELINE_CREATE_NO_PROTECTED_ACCESS_BIT = 0x08000000,
      // Provided by VK_VERSION_1_4
        VK_PIPELINE_CREATE_PROTECTED_ACCESS_ONLY_BIT = 0x40000000,
      // Provided by VK_KHR_ray_tracing_pipeline
        VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR = 0x00004000,
      // Provided by VK_KHR_ray_tracing_pipeline
        VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR = 0x00008000,
      // Provided by VK_KHR_ray_tracing_pipeline
        VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR = 0x00010000,
      // Provided by VK_KHR_ray_tracing_pipeline
        VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR = 0x00020000,
      // Provided by VK_KHR_ray_tracing_pipeline
        VK_PIPELINE_CREATE_RAY_TRACING_SKIP_TRIANGLES_BIT_KHR = 0x00001000,
      // Provided by VK_KHR_ray_tracing_pipeline
        VK_PIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT_KHR = 0x00002000,
      // Provided by VK_KHR_ray_tracing_pipeline
        VK_PIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR = 0x00080000,
      // Provided by VK_NV_ray_tracing
        VK_PIPELINE_CREATE_DEFER_COMPILE_BIT_NV = 0x00000020,
      // Provided by VK_EXT_fragment_density_map with VK_VERSION_1_3 or VK_KHR_dynamic_rendering
        VK_PIPELINE_CREATE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT = 0x00400000,
      // Provided by VK_KHR_fragment_shading_rate with VK_VERSION_1_3 or VK_KHR_dynamic_rendering
        VK_PIPELINE_CREATE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = 0x00200000,
      // Provided by VK_KHR_pipeline_executable_properties
        VK_PIPELINE_CREATE_CAPTURE_STATISTICS_BIT_KHR = 0x00000040,
      // Provided by VK_KHR_pipeline_executable_properties
        VK_PIPELINE_CREATE_CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR = 0x00000080,
      // Provided by VK_NV_device_generated_commands
        VK_PIPELINE_CREATE_INDIRECT_BINDABLE_BIT_NV = 0x00040000,
      // Provided by VK_KHR_pipeline_library
        VK_PIPELINE_CREATE_LIBRARY_BIT_KHR = 0x00000800,
      // Provided by VK_EXT_descriptor_buffer
        VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT = 0x20000000,
      // Provided by VK_EXT_graphics_pipeline_library
        VK_PIPELINE_CREATE_RETAIN_LINK_TIME_OPTIMIZATION_INFO_BIT_EXT = 0x00800000,
      // Provided by VK_EXT_graphics_pipeline_library
        VK_PIPELINE_CREATE_LINK_TIME_OPTIMIZATION_BIT_EXT = 0x00000400,
      // Provided by VK_NV_ray_tracing_motion_blur
        VK_PIPELINE_CREATE_RAY_TRACING_ALLOW_MOTION_BIT_NV = 0x00100000,
      // Provided by VK_EXT_attachment_feedback_loop_layout
        VK_PIPELINE_CREATE_COLOR_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT = 0x02000000,
      // Provided by VK_EXT_attachment_feedback_loop_layout
        VK_PIPELINE_CREATE_DEPTH_STENCIL_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT = 0x04000000,
    #ifdef VK_ENABLE_BETA_EXTENSIONS
      // Provided by VK_NV_displacement_micromap
        VK_PIPELINE_CREATE_RAY_TRACING_DISPLACEMENT_MICROMAP_BIT_NV = 0x10000000,
    #endif
      // Provided by VK_KHR_opacity_micromap
        VK_PIPELINE_CREATE_RAY_TRACING_OPACITY_MICROMAP_BIT_KHR = 0x01000000,
      // Provided by VK_VERSION_1_1
      // VK_PIPELINE_CREATE_DISPATCH_BASE is a legacy alias
        VK_PIPELINE_CREATE_DISPATCH_BASE = VK_PIPELINE_CREATE_DISPATCH_BASE_BIT,
      // Provided by VK_KHR_device_group
        VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT_KHR = VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT,
      // Provided by VK_KHR_device_group
        VK_PIPELINE_CREATE_DISPATCH_BASE_BIT_KHR = VK_PIPELINE_CREATE_DISPATCH_BASE_BIT,
      // Provided by VK_KHR_device_group
      // VK_PIPELINE_CREATE_DISPATCH_BASE_KHR is a legacy alias
        VK_PIPELINE_CREATE_DISPATCH_BASE_KHR = VK_PIPELINE_CREATE_DISPATCH_BASE_BIT,
      // Provided by VK_EXT_fragment_density_map with VK_VERSION_1_3 or VK_KHR_dynamic_rendering
      // VK_PIPELINE_RASTERIZATION_STATE_CREATE_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT is a legacy alias
        VK_PIPELINE_RASTERIZATION_STATE_CREATE_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT = VK_PIPELINE_CREATE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT,
      // Provided by VK_KHR_fragment_shading_rate with VK_VERSION_1_3 or VK_KHR_dynamic_rendering
      // VK_PIPELINE_RASTERIZATION_STATE_CREATE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR is a legacy alias
        VK_PIPELINE_RASTERIZATION_STATE_CREATE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = VK_PIPELINE_CREATE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR,
      // Provided by VK_EXT_pipeline_creation_cache_control
        VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT_EXT = VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT,
      // Provided by VK_EXT_pipeline_creation_cache_control
        VK_PIPELINE_CREATE_EARLY_RETURN_ON_FAILURE_BIT_EXT = VK_PIPELINE_CREATE_EARLY_RETURN_ON_FAILURE_BIT,
      // Provided by VK_EXT_opacity_micromap
        VK_PIPELINE_CREATE_RAY_TRACING_OPACITY_MICROMAP_BIT_EXT = VK_PIPELINE_CREATE_RAY_TRACING_OPACITY_MICROMAP_BIT_KHR,
      // Provided by VK_EXT_pipeline_protected_access
        VK_PIPELINE_CREATE_NO_PROTECTED_ACCESS_BIT_EXT = VK_PIPELINE_CREATE_NO_PROTECTED_ACCESS_BIT,
      // Provided by VK_EXT_pipeline_protected_access
        VK_PIPELINE_CREATE_PROTECTED_ACCESS_ONLY_BIT_EXT = VK_PIPELINE_CREATE_PROTECTED_ACCESS_ONLY_BIT,
    } VkPipelineCreateFlagBits;

- VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT specifies that the created pipeline will not be optimized. Using this flag may reduce the time taken to create the pipeline.

- VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT specifies that the pipeline to be created is allowed to be the parent of a pipeline that will be created in a subsequent pipeline creation call.

- VK_PIPELINE_CREATE_DERIVATIVE_BIT specifies that the pipeline to be created will be a child of a previously created parent pipeline.

- VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT specifies that any shader input variables decorated as `ViewIndex` will be assigned values as if they were decorated as `DeviceIndex`.

- VK_PIPELINE_CREATE_DISPATCH_BASE_BIT specifies that a compute pipeline can be used with vkCmdDispatchBase with a non-zero base workgroup.

- VK_PIPELINE_CREATE_DEFER_COMPILE_BIT_NV specifies that a pipeline is created with all shaders in the deferred state. Before using the pipeline the application must call vkCompileDeferredNV exactly once on each shader in the pipeline before using the pipeline.

- VK_PIPELINE_CREATE_CAPTURE_STATISTICS_BIT_KHR specifies that the shader compiler should capture statistics for the pipeline executables produced by the compile process which can later be retrieved by calling vkGetPipelineExecutableStatisticsKHR. Enabling this flag must not affect the final compiled pipeline but may disable pipeline caching or otherwise affect pipeline creation time.

- VK_PIPELINE_CREATE_CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR specifies that the shader compiler should capture the internal representations of pipeline executables produced by the compile process which can later be retrieved by calling vkGetPipelineExecutableInternalRepresentationsKHR. Enabling this flag must not affect the final compiled pipeline but may disable pipeline caching or otherwise affect pipeline creation time. When capturing IR from pipelines created with pipeline libraries, there is no guarantee that IR from libraries can be retrieved from the linked pipeline. Applications should retrieve IR from each library, and any linked pipelines, separately.

- VK_PIPELINE_CREATE_LIBRARY_BIT_KHR specifies that the pipeline cannot be used directly, and instead defines a pipeline library that can be combined with other pipelines using the VkPipelineLibraryCreateInfoKHR structure. This is available in ray tracing and graphics pipelines.

- VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR specifies that an any-hit shader will always be present when an any-hit shader would be executed. A NULL any-hit shader is an any-hit shader which is effectively VK_SHADER_UNUSED_KHR, such as from a shader group consisting entirely of zeros.

- VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR specifies that a closest hit shader will always be present when a closest hit shader would be executed. A NULL closest hit shader is a closest hit shader which is effectively VK_SHADER_UNUSED_KHR, such as from a shader group consisting entirely of zeros.

- VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR specifies that a miss shader will always be present when a miss shader would be executed. A NULL miss shader is a miss shader which is effectively VK_SHADER_UNUSED_KHR, such as from a shader group consisting entirely of zeros.

- VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR specifies that an intersection shader will always be present when an intersection shader would be executed. A NULL intersection shader is an intersection shader which is effectively VK_SHADER_UNUSED_KHR, such as from a shader group consisting entirely of zeros.

- VK_PIPELINE_CREATE_RAY_TRACING_SKIP_TRIANGLES_BIT_KHR specifies that sphere, LSS and triangle primitives will be skipped during traversal using pipeline trace ray instructions.

- VK_PIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT_KHR specifies that AABB primitives will be skipped during traversal using pipeline trace ray instructions.

- VK_PIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR specifies that the shader group handles can be saved and reused on a subsequent run (e.g. for trace capture and replay).

- VK_PIPELINE_CREATE_INDIRECT_BINDABLE_BIT_NV specifies that the pipeline can be used in combination with Device-Generated Commands.

- VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT specifies that pipeline creation will fail if a compile is required for creation of a valid VkPipeline object; VK_PIPELINE_COMPILE_REQUIRED will be returned by pipeline creation, and the VkPipeline will be VK_NULL_HANDLE.

- When creating multiple pipelines, VK_PIPELINE_CREATE_EARLY_RETURN_ON_FAILURE_BIT specifies that control will be returned to the application if any individual pipeline returns a result which is not VK_SUCCESS rather than continuing to create additional pipelines.

- VK_PIPELINE_CREATE_RAY_TRACING_ALLOW_MOTION_BIT_NV specifies that the pipeline is allowed to use `OpTraceRayMotionNV`.

- VK_PIPELINE_CREATE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR specifies that the pipeline will be used with a fragment shading rate attachment and dynamic rendering.

- VK_PIPELINE_CREATE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT specifies that the pipeline will be used with a fragment density map attachment and dynamic rendering.

- VK_PIPELINE_CREATE_LINK_TIME_OPTIMIZATION_BIT_EXT specifies that pipeline libraries being linked into this library should have link time optimizations applied. If this bit is omitted, implementations should instead perform linking as rapidly as possible.

- VK_PIPELINE_CREATE_RETAIN_LINK_TIME_OPTIMIZATION_INFO_BIT_EXT specifies that pipeline libraries should retain any information necessary to later perform an optimal link with VK_PIPELINE_CREATE_LINK_TIME_OPTIMIZATION_BIT_EXT.

- VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT specifies that a pipeline will be used with descriptor buffers, rather than descriptor sets.

- VK_PIPELINE_CREATE_COLOR_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT specifies that the pipeline may be used with an attachment feedback loop including color attachments. It is ignored if VK_DYNAMIC_STATE_ATTACHMENT_FEEDBACK_LOOP_ENABLE_EXT is set in `pDynamicStates`.

- VK_PIPELINE_CREATE_DEPTH_STENCIL_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT specifies that the pipeline may be used with an attachment feedback loop including depth-stencil attachments. It is ignored if VK_DYNAMIC_STATE_ATTACHMENT_FEEDBACK_LOOP_ENABLE_EXT is set in `pDynamicStates`.

- VK_PIPELINE_CREATE_RAY_TRACING_OPACITY_MICROMAP_BIT_KHR specifies that the ray tracing pipeline can be used with acceleration structures which reference an opacity micromap array. This flag has no effect on using opacity micromaps with ray queries.

- VK_PIPELINE_CREATE_RAY_TRACING_DISPLACEMENT_MICROMAP_BIT_NV specifies that the ray tracing pipeline can be used with acceleration structures which reference a displacement micromap array.

- VK_PIPELINE_CREATE_NO_PROTECTED_ACCESS_BIT specifies that the pipeline must not be bound to a protected command buffer.

- VK_PIPELINE_CREATE_PROTECTED_ACCESS_ONLY_BIT specifies that the pipeline must not be bound to an unprotected command buffer.

It is valid to set both VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT and VK_PIPELINE_CREATE_DERIVATIVE_BIT. This allows a pipeline to be both a parent and possibly a child in a pipeline hierarchy. See Pipeline Derivatives for more information.

When an implementation is looking up a pipeline in a pipeline cache, if that pipeline is being created using linked libraries, implementations should always return an equivalent pipeline created with VK_PIPELINE_CREATE_LINK_TIME_OPTIMIZATION_BIT_EXT if available, whether or not that bit was specified.

Note | Using VK_PIPELINE_CREATE_LINK_TIME_OPTIMIZATION_BIT_EXT (or not) when linking pipeline libraries is intended as a performance tradeoff between host and device. If the bit is omitted, linking should be faster and produce a pipeline more rapidly, but performance of the pipeline on the target device may be reduced. If the bit is included, linking may be slower but should produce a pipeline with device performance comparable to a monolithically created pipeline. Using both options can allow latency-sensitive applications to generate a suboptimal but usable pipeline quickly, and then perform an optimal link in the background, substituting the result for the suboptimally linked pipeline as soon as it is available.

Warning | This functionality is superseded by VkPipelineCreateFlags2. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_0
    typedef VkFlags VkPipelineCreateFlags;

`VkPipelineCreateFlags` is a bitmask type for setting a mask of zero or more VkPipelineCreateFlagBits.

### 10.3. Compute Pipelines

Compute pipelines consist of a single static compute shader stage and the pipeline layout.

The compute pipeline represents a compute shader and is created by calling `vkCreateComputePipelines` with `module` and `pName` selecting an entry point from a shader module, where that entry point defines a valid compute shader, in the VkPipelineShaderStageCreateInfo structure contained within the VkComputePipelineCreateInfo structure.

To create compute pipelines, call:

    // Provided by VK_VERSION_1_0
    VkResult vkCreateComputePipelines(
        VkDevice                                    device,
        VkPipelineCache                             pipelineCache,
        uint32_t                                    createInfoCount,
        const VkComputePipelineCreateInfo*          pCreateInfos,
        const VkAllocationCallbacks*                pAllocator,
        VkPipeline*                                 pPipelines);

- `device` is the logical device that creates the compute pipelines.

- `pipelineCache` is either VK_NULL_HANDLE, indicating that pipeline caching is disabled, or to enable caching, the handle of a valid VkPipelineCache object. The implementation must not access this object outside of the duration of this command.

- `createInfoCount` is the length of the `pCreateInfos` and `pPipelines` arrays.

- `pCreateInfos` is a pointer to an array of VkComputePipelineCreateInfo structures.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

- `pPipelines` is a pointer to an array of VkPipeline handles in which the resulting compute pipeline objects are returned.

Pipelines are created and returned as described for Multiple Pipeline Creation.

Valid Usage

- VUID-vkCreateComputePipelines-device-09661
  `device` must support at least one queue family with the VK_QUEUE_COMPUTE_BIT capability

- VUID-vkCreateComputePipelines-flags-00695
  If the `flags` member of any element of `pCreateInfos` contains the VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, and the `basePipelineIndex` member of that same element is not `-1`, `basePipelineIndex` must be less than the index into `pCreateInfos` that corresponds to that element

- VUID-vkCreateComputePipelines-flags-00696
  If the `flags` member of any element of `pCreateInfos` contains the VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, the base pipeline must have been created with the VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT flag set

- VUID-vkCreateComputePipelines-pipelineCache-02873
  If `pipelineCache` was created with VK_PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT, host access to `pipelineCache` must be externally synchronized

- VUID-vkCreateComputePipelines-pNext-09616
  If VkPipelineBinaryInfoKHR::`binaryCount` is not `0` for any element of `pCreateInfos`, `pipelineCache` must be VK_NULL_HANDLE

- VUID-vkCreateComputePipelines-pNext-09617
  If a VkPipelineCreateFlags2CreateInfoKHR structure with the VK_PIPELINE_CREATE_2_CAPTURE_DATA_BIT_KHR flag set is included in the `pNext` chain of any element of `pCreateInfos`, `pipelineCache` must be VK_NULL_HANDLE

- VUID-vkCreateComputePipelines-binaryCount-09620
  If VkPipelineBinaryInfoKHR::`binaryCount` is not `0` for any element of `pCreateInfos`, VK_PIPELINE_CREATION_FEEDBACK_APPLICATION_PIPELINE_CACHE_HIT_BIT must not be set in the `flags` of that element

- VUID-vkCreateComputePipelines-binaryCount-09621
  If VkPipelineBinaryInfoKHR::`binaryCount` is not `0` for any element of `pCreateInfos`, VK_PIPELINE_CREATION_FEEDBACK_BASE_PIPELINE_ACCELERATION_BIT must not be set in the `flags` of that element

- VUID-vkCreateComputePipelines-binaryCount-09622
  If VkPipelineBinaryInfoKHR::`binaryCount` is not `0` for any element of `pCreateInfos`, VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT_EXT must not be set in the `flags` of that element

- VUID-vkCreateComputePipelines-pCreateInfos-11414
  If any element of `pCreateInfos` sets VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT and includes embedded sampler mappings, there must be less than (`maxSamplerAllocationCount` - (`minSamplerHeapReservedRangeWithEmbedded` / `samplerDescriptorSize`)) VkSampler objects currently created on the device

- VUID-vkCreateComputePipelines-pCreateInfos-11429
  If any element of `pCreateInfos` sets VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT and includes embedded sampler mappings, this command must not cause the total number of unique embedded samplers in pipelines and shaders on this device to exceed `maxDescriptorHeapEmbeddedSamplers`

Valid Usage (Implicit)

- VUID-vkCreateComputePipelines-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkCreateComputePipelines-pipelineCache-parameter
  If `pipelineCache` is not VK_NULL_HANDLE, `pipelineCache` must be a valid VkPipelineCache handle

- VUID-vkCreateComputePipelines-pCreateInfos-parameter
  `pCreateInfos` must be a valid pointer to an array of `createInfoCount` valid VkComputePipelineCreateInfo structures

- VUID-vkCreateComputePipelines-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateComputePipelines-pPipelines-parameter
  `pPipelines` must be a valid pointer to an array of `createInfoCount` VkPipeline handles

- VUID-vkCreateComputePipelines-createInfoCount-arraylength
  `createInfoCount` must be greater than `0`

- VUID-vkCreateComputePipelines-pipelineCache-parent
  If `pipelineCache` is a valid handle, it must have been created, allocated, or retrieved from `device`

Return Codes

Success

  - VK_PIPELINE_COMPILE_REQUIRED_EXT

  - VK_SUCCESS

Failure

  - VK_ERROR_INVALID_SHADER_NV

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkComputePipelineCreateInfo` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkComputePipelineCreateInfo {
        VkStructureType                    sType;
        const void*                        pNext;
        VkPipelineCreateFlags              flags;
        VkPipelineShaderStageCreateInfo    stage;
        VkPipelineLayout                   layout;
        VkPipeline                         basePipelineHandle;
        int32_t                            basePipelineIndex;
    } VkComputePipelineCreateInfo;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask of VkPipelineCreateFlagBits specifying how the pipeline will be generated.

- `stage` is a VkPipelineShaderStageCreateInfo structure describing the compute shader.

- `layout` is the description of binding locations used by both the pipeline and descriptor sets used with the pipeline. If VkPhysicalDeviceProperties::`apiVersion` is greater than or equal to Vulkan 1.3 or VK_KHR_maintenance4 is enabled `layout` must not be accessed by the implementation outside of the duration of the command this structure is passed to.

- `basePipelineHandle` is a pipeline to derive from.

- `basePipelineIndex` is an index into the `pCreateInfos` parameter to use as a pipeline to derive from.

The parameters `basePipelineHandle` and `basePipelineIndex` are described in more detail in Pipeline Derivatives.

If the `pNext` chain includes a VkPipelineCreateFlags2CreateInfo structure, VkPipelineCreateFlags2CreateInfo::`flags` from that structure is used instead of `flags` from this structure.

Valid Usage

- VUID-VkComputePipelineCreateInfo-None-09497
  If the `pNext` chain does not include a VkPipelineCreateFlags2CreateInfo structure, `flags` must be a valid combination of VkPipelineCreateFlagBits values

- VUID-VkComputePipelineCreateInfo-flags-07984
  If `flags` contains the VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, and `basePipelineIndex` is -1, `basePipelineHandle` must be a valid compute `VkPipeline` handle

- VUID-VkComputePipelineCreateInfo-flags-07985
  If `flags` contains the VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, and `basePipelineHandle` is VK_NULL_HANDLE, `basePipelineIndex` must be a valid index into the calling command’s `pCreateInfos` parameter

- VUID-VkComputePipelineCreateInfo-flags-07986
  If `flags` contains the VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, `basePipelineIndex` must be -1 or `basePipelineHandle` must be VK_NULL_HANDLE

- VUID-VkComputePipelineCreateInfo-layout-07987
  If a push constant block is declared in a shader and `layout` is not VK_NULL_HANDLE, a push constant range in `layout` must match the shader stage

- VUID-VkComputePipelineCreateInfo-layout-10069
  If a push constant block is declared in a shader and `layout` is not VK_NULL_HANDLE, the block must be contained inside the push constant range in `layout` that matches the stage

- VUID-VkComputePipelineCreateInfo-layout-07988
  If a resource variable is declared in a shader and `layout` is not VK_NULL_HANDLE, the corresponding descriptor set in `layout` must match the shader stage

- VUID-VkComputePipelineCreateInfo-layout-07990
  If a resource variable is declared in a shader, `layout` is not VK_NULL_HANDLE, and the descriptor type is not VK_DESCRIPTOR_TYPE_MUTABLE_EXT, the corresponding descriptor set in `layout` must match the descriptor type

- VUID-VkComputePipelineCreateInfo-layout-07991
  If a resource variable is declared in a shader as an array and `layout` is not VK_NULL_HANDLE, the corresponding descriptor binding used to create `layout` must have a `descriptorCount` that is greater than or equal to the length of the array

- VUID-VkComputePipelineCreateInfo-None-10391
  If a resource variables is declared in a shader as an array of descriptors, then the descriptor type of that variable must not be VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK

- VUID-VkComputePipelineCreateInfo-flags-11798
  If shader64BitIndexing feature is not enabled, `flags` must not contain VK_PIPELINE_CREATE_2_64_BIT_INDEXING_BIT_EXT

- VUID-VkComputePipelineCreateInfo-pipelineCreationCacheControl-02878
  If the `pipelineCreationCacheControl` feature is not enabled, `flags` must not include VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT nor VK_PIPELINE_CREATE_EARLY_RETURN_ON_FAILURE_BIT

- VUID-VkComputePipelineCreateInfo-pipelineProtectedAccess-07368
  If the `pipelineProtectedAccess` feature is not enabled, `flags` must not include VK_PIPELINE_CREATE_NO_PROTECTED_ACCESS_BIT nor VK_PIPELINE_CREATE_PROTECTED_ACCESS_ONLY_BIT

- VUID-VkComputePipelineCreateInfo-flags-07369
  `flags` must not include both VK_PIPELINE_CREATE_NO_PROTECTED_ACCESS_BIT and VK_PIPELINE_CREATE_PROTECTED_ACCESS_ONLY_BIT

- VUID-VkComputePipelineCreateInfo-flags-11311
  If VkPipelineCreateFlags2CreateInfoKHR::`flags` includes VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT, `layout` must be VK_NULL_HANDLE

- VUID-VkComputePipelineCreateInfo-flags-11312
  If VkPipelineCreateFlags2CreateInfoKHR::`flags` includes VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT, all shader variables in the shader resource interface with a `DescriptorSet` and `Binding` decoration must have a mapping declared in VkShaderDescriptorSetAndBindingMappingInfoEXT::`pMappings`

- VUID-VkComputePipelineCreateInfo-flags-03365
  `flags` must not include VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR

- VUID-VkComputePipelineCreateInfo-flags-03366
  `flags` must not include VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR

- VUID-VkComputePipelineCreateInfo-flags-03367
  `flags` must not include VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR

- VUID-VkComputePipelineCreateInfo-flags-03368
  `flags` must not include VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR

- VUID-VkComputePipelineCreateInfo-flags-03369
  `flags` must not include VK_PIPELINE_CREATE_RAY_TRACING_SKIP_TRIANGLES_BIT_KHR

- VUID-VkComputePipelineCreateInfo-flags-03370
  `flags` must not include VK_PIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT_KHR

- VUID-VkComputePipelineCreateInfo-flags-03576
  `flags` must not include VK_PIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR

- VUID-VkComputePipelineCreateInfo-flags-04945
  `flags` must not include VK_PIPELINE_CREATE_RAY_TRACING_ALLOW_MOTION_BIT_NV

- VUID-VkComputePipelineCreateInfo-flags-09007
  If the `VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV`::`deviceGeneratedComputePipelines` feature is not enabled, `flags` must not include VK_PIPELINE_CREATE_INDIRECT_BINDABLE_BIT_NV

- VUID-VkComputePipelineCreateInfo-flags-09008
  If `flags` includes VK_PIPELINE_CREATE_INDIRECT_BINDABLE_BIT_NV, then the `pNext` chain must include a pointer to a valid instance of VkComputePipelineIndirectBufferInfoNV specifying the address where the pipeline’s metadata will be saved

- VUID-VkComputePipelineCreateInfo-flags-11007
  If `flags` includes VK_PIPELINE_CREATE_2_INDIRECT_BINDABLE_BIT_EXT, then the `VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT`::`deviceGeneratedCommands` feature must be enabled

- VUID-VkComputePipelineCreateInfo-stage-00701
  The `stage` member of `stage` must be VK_SHADER_STAGE_COMPUTE_BIT

- VUID-VkComputePipelineCreateInfo-stage-00702
  The shader code for the entry point identified by `stage` and the rest of the state identified by this structure must adhere to the pipeline linking rules described in the Shader Interfaces chapter

- VUID-VkComputePipelineCreateInfo-layout-01687
  If `layout` is not VK_NULL_HANDLE, the number of resources in `layout` accessible to the compute shader stage must be less than or equal to `VkPhysicalDeviceLimits`::`maxPerStageResources`

- VUID-VkComputePipelineCreateInfo-shaderEnqueue-09177
  If the `shaderEnqueue` feature is not enabled, `flags` must not include VK_PIPELINE_CREATE_LIBRARY_BIT_KHR

- VUID-VkComputePipelineCreateInfo-flags-09178
  If `flags` does not include VK_PIPELINE_CREATE_LIBRARY_BIT_KHR, the shader specified by `stage` must not declare the `ShaderEnqueueAMDX` capability

- VUID-VkComputePipelineCreateInfo-pipelineStageCreationFeedbackCount-06566
  If VkPipelineCreationFeedbackCreateInfo::`pipelineStageCreationFeedbackCount` is not `0`, it must be `1`

- VUID-VkComputePipelineCreateInfo-flags-07367
  `flags` must not include VK_PIPELINE_CREATE_RAY_TRACING_OPACITY_MICROMAP_BIT_KHR

- VUID-VkComputePipelineCreateInfo-flags-11593
  If the `VkPhysicalDeviceOpacityMicromapFeaturesKHR`::`micromap` feature is not enabled, `flags` must not include VK_PIPELINE_CREATE_2_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_KHR

- VUID-VkComputePipelineCreateInfo-flags-07996
  `flags` must not include VK_PIPELINE_CREATE_RAY_TRACING_DISPLACEMENT_MICROMAP_BIT_NV

- VUID-VkComputePipelineCreateInfo-layout-12396
  If `layout` is not VK_NULL_HANDLE, it must not have been created with VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT

- VUID-VkComputePipelineCreateInfo-None-11367
  If VkPipelineCreateFlags2CreateInfoKHR::`flags` does not include VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT, `layout` must not be VK_NULL_HANDLE

Valid Usage (Implicit)

- VUID-VkComputePipelineCreateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO

- VUID-VkComputePipelineCreateInfo-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkComputePipelineIndirectBufferInfoNV, VkPipelineBinaryInfoKHR, VkPipelineCompilerControlCreateInfoAMD, VkPipelineCreateFlags2CreateInfo, VkPipelineCreationFeedbackCreateInfo, VkPipelineRobustnessCreateInfo, VkSubpassShadingPipelineCreateInfoHUAWEI, or VkValidationFeaturesEXT

- VUID-VkComputePipelineCreateInfo-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkComputePipelineCreateInfo-stage-parameter
  `stage` must be a valid VkPipelineShaderStageCreateInfo structure

- VUID-VkComputePipelineCreateInfo-layout-parameter
  If `layout` is not VK_NULL_HANDLE, `layout` must be a valid VkPipelineLayout handle

- VUID-VkComputePipelineCreateInfo-commonparent
  Both of `basePipelineHandle`, and `layout` that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevice

The `VkPipelineShaderStageCreateInfo` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkPipelineShaderStageCreateInfo {
        VkStructureType                     sType;
        const void*                         pNext;
        VkPipelineShaderStageCreateFlags    flags;
        VkShaderStageFlagBits               stage;
        VkShaderModule                      module;
        const char*                         pName;
        const VkSpecializationInfo*         pSpecializationInfo;
    } VkPipelineShaderStageCreateInfo;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask of VkPipelineShaderStageCreateFlagBits specifying how the pipeline shader stage will be generated.

- `stage` is a VkShaderStageFlagBits value specifying a single pipeline stage.

- `module` is optionally a VkShaderModule object containing the shader code for this stage. The implementation must not access this object outside of the duration of the command this structure is passed to.

- `pName` is a pointer to a null-terminated UTF-8 string specifying the entry point name of the shader for this stage.

- `pSpecializationInfo` is a pointer to a VkSpecializationInfo structure, as described in Specialization Constants, or `NULL`.

If `module` is not VK_NULL_HANDLE, the shader code used by the pipeline is defined by `module`. If `module` is VK_NULL_HANDLE, the shader code is defined by the chained VkShaderModuleCreateInfo if present.

If the `shaderModuleIdentifier` feature is enabled, applications can omit shader code for `stage` and instead provide a module identifier. This is done by including a VkPipelineShaderStageModuleIdentifierCreateInfoEXT structure with `identifierSize` not equal to 0 in the `pNext` chain. A shader stage created in this way is equivalent to one created using a shader module with the same identifier. The identifier allows an implementation to look up a pipeline without consuming a valid SPIR-V module. If a pipeline is not found, pipeline compilation is not possible and the implementation must fail as specified by VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT.

When an identifier is used in lieu of a shader module, implementations may fail pipeline compilation with VK_PIPELINE_COMPILE_REQUIRED for any reason.

Note | The rationale for the relaxed requirement on implementations to return a pipeline with VkPipelineShaderStageModuleIdentifierCreateInfoEXT is that layers or tools may intercept pipeline creation calls and require the full SPIR-V context to operate correctly. ICDs are not expected to fail pipeline compilation if the pipeline exists in a cache somewhere.

Applications can use identifiers when creating pipelines with VK_PIPELINE_CREATE_LIBRARY_BIT_KHR. When creating such pipelines, VK_SUCCESS may be returned, but subsequently fail when referencing the pipeline in a VkPipelineLibraryCreateInfoKHR struct. Applications must allow pipeline compilation to fail during link steps with VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT as it may not be possible to determine if a pipeline can be created from identifiers until the link step.

Valid Usage

- VUID-VkPipelineShaderStageCreateInfo-descriptorHeap-11314
  If the `descriptorHeap` feature is not enabled, VkShaderDescriptorSetAndBindingMappingInfoEXT::`mappingCount` must be 0

- VUID-VkPipelineShaderStageCreateInfo-pNext-11315
  If the `pNext` chain specifies a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_DATA_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT, the mapped resource in the shader must be a variable with a structure type decorated with `Block` in the `Uniform` `Storage` `Class`

- VUID-VkPipelineShaderStageCreateInfo-pNext-11316
  If the `pNext` chain specifies a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_DATA_EXT, the mapped structure must not be larger than `maxPushDataSize` minus the `pushDataOffset` used in the mapping

- VUID-VkPipelineShaderStageCreateInfo-pNext-12454
  If the `pNext` chain specifies a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_DATA_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, and there is a variable in the shader that matches the mapping, the `stage` must be a ray tracing stage

- VUID-VkPipelineShaderStageCreateInfo-pNext-11317
  If the `pNext` chain specifies a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_DATA_EXT, the sum of mapped structure size and `shaderRecordDataOffset` used in the mapping must not be larger than `maxShaderGroupStride`

- VUID-VkPipelineShaderStageCreateInfo-pNext-11318
  If the `pNext` chain specifies a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT the mapped resource in the shader must be one of:

  - A variable with a structure type decorated with `Block` in the `Uniform` `Storage` `Class`

  - A variable with a structure type decorated with `BufferBlock` in the `Uniform` `Storage` `Class`

  - A variable with a structure type decorated with `Block` in the `StorageBuffer` `Storage` `Class`

  - A `OpTypeAccelerationStructureKHR` variable

  - A `OpTypeAccelerationStructureNV` variable

- VUID-VkPipelineShaderStageCreateInfo-pNext-11378
  If the `pNext` chain specifies a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, the `OpArrayLength` or `OpUntypedArrayLengthKHR` instruction must not be used on that resource

- VUID-VkPipelineShaderStageCreateInfo-pNext-11399
  If the `pNext` chain specifies a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_CONSTANT_OFFSET_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, and the mapped resource declaration is an array, the `pEmbeddedSampler` member of the corresponding mapping structure must be `NULL`

- VUID-VkPipelineShaderStageCreateInfo-stage-00704
  If the `geometryShader` feature is not enabled, `stage` must not be VK_SHADER_STAGE_GEOMETRY_BIT

- VUID-VkPipelineShaderStageCreateInfo-stage-00705
  If the `tessellationShader` feature is not enabled, `stage` must not be VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT or VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT

- VUID-VkPipelineShaderStageCreateInfo-stage-02091
  If the `meshShaders` feature is not enabled, `stage` must not be VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-VkPipelineShaderStageCreateInfo-stage-02092
  If the `taskShaders` feature is not enabled, `stage` must not be VK_SHADER_STAGE_TASK_BIT_EXT

- VUID-VkPipelineShaderStageCreateInfo-clustercullingShader-07813
  If the `clustercullingShader` feature is not enabled, `stage` must not be VK_SHADER_STAGE_CLUSTER_CULLING_BIT_HUAWEI

- VUID-VkPipelineShaderStageCreateInfo-stage-00706
  `stage` must not be VK_SHADER_STAGE_ALL_GRAPHICS, or VK_SHADER_STAGE_ALL

- VUID-VkPipelineShaderStageCreateInfo-pName-00707
  `pName` must be the name of an `OpEntryPoint` in `module` with an execution model that matches `stage`

- VUID-VkPipelineShaderStageCreateInfo-maxClipDistances-00708
  If the identified entry point includes any variable in its interface that is declared with the `ClipDistance` `BuiltIn` decoration, that variable must not have an array size greater than `VkPhysicalDeviceLimits`::`maxClipDistances`

- VUID-VkPipelineShaderStageCreateInfo-maxCullDistances-00709
  If the identified entry point includes any variable in its interface that is declared with the `CullDistance` `BuiltIn` decoration, that variable must not have an array size greater than `VkPhysicalDeviceLimits`::`maxCullDistances`

- VUID-VkPipelineShaderStageCreateInfo-maxCombinedClipAndCullDistances-00710
  If the identified entry point includes variables in its interface that are declared with the `ClipDistance` `BuiltIn` decoration and variables in its interface that are declared with the `CullDistance` `BuiltIn` decoration, those variables must not have array sizes which sum to more than `VkPhysicalDeviceLimits`::`maxCombinedClipAndCullDistances`

- VUID-VkPipelineShaderStageCreateInfo-maxSampleMaskWords-00711
  If the identified entry point includes any variable in its interface that is declared with the `SampleMask` `BuiltIn` decoration, that variable must not have an array size greater than `VkPhysicalDeviceLimits`::`maxSampleMaskWords`

- VUID-VkPipelineShaderStageCreateInfo-stage-00713
  If `stage` is VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT or VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT, and the identified entry point has an `OpExecutionMode` instruction specifying a patch size with `OutputVertices`, the patch size must be greater than `0` and less than or equal to `VkPhysicalDeviceLimits`::`maxTessellationPatchSize`

- VUID-VkPipelineShaderStageCreateInfo-stage-00714
  If `stage` is VK_SHADER_STAGE_GEOMETRY_BIT, the identified entry point must have an `OpExecutionMode` instruction specifying a maximum output vertex count that is greater than `0` and less than or equal to `VkPhysicalDeviceLimits`::`maxGeometryOutputVertices`

- VUID-VkPipelineShaderStageCreateInfo-stage-00715
  If `stage` is VK_SHADER_STAGE_GEOMETRY_BIT, the identified entry point must have an `OpExecutionMode` instruction specifying an invocation count that is greater than `0` and less than or equal to `VkPhysicalDeviceLimits`::`maxGeometryShaderInvocations`

- VUID-VkPipelineShaderStageCreateInfo-stage-02596
  If `stage` is either VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT, or VK_SHADER_STAGE_GEOMETRY_BIT, and the identified entry point writes to `Layer` for any primitive, it must write the same value to `Layer` for all vertices of a given primitive

- VUID-VkPipelineShaderStageCreateInfo-stage-02597
  If `stage` is either VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT, or VK_SHADER_STAGE_GEOMETRY_BIT, and the identified entry point writes to `ViewportIndex` for any primitive, it must write the same value to `ViewportIndex` for all vertices of a given primitive

- VUID-VkPipelineShaderStageCreateInfo-stage-06685
  If `stage` is VK_SHADER_STAGE_FRAGMENT_BIT, and the identified entry point writes to `FragDepth` in any execution path, all execution paths that are not exclusive to helper invocations must either discard the fragment, or write or initialize the value of `FragDepth`

- VUID-VkPipelineShaderStageCreateInfo-stage-06686
  If `stage` is VK_SHADER_STAGE_FRAGMENT_BIT, and the identified entry point writes to `FragStencilRefEXT` in any execution path, all execution paths that are not exclusive to helper invocations must either discard the fragment, or write or initialize the value of `FragStencilRefEXT`

- VUID-VkPipelineShaderStageCreateInfo-flags-02784
  If `flags` has the VK_PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT flag set, the `subgroupSizeControl` feature must be enabled

- VUID-VkPipelineShaderStageCreateInfo-flags-02785
  If `flags` has the VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT flag set, the `computeFullSubgroups` feature must be enabled

- VUID-VkPipelineShaderStageCreateInfo-flags-08988
  If `flags` includes VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT, `stage` must be one of VK_SHADER_STAGE_MESH_BIT_EXT, VK_SHADER_STAGE_TASK_BIT_EXT, or VK_SHADER_STAGE_COMPUTE_BIT

- VUID-VkPipelineShaderStageCreateInfo-pNext-02754
  If a VkPipelineShaderStageRequiredSubgroupSizeCreateInfo structure is included in the `pNext` chain, `flags` must not have the VK_PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT flag set

- VUID-VkPipelineShaderStageCreateInfo-pNext-02755
  If a VkPipelineShaderStageRequiredSubgroupSizeCreateInfo structure is included in the `pNext` chain, the `subgroupSizeControl` feature must be enabled, and `stage` must be a valid bit specified in `requiredSubgroupSizeStages`

- VUID-VkPipelineShaderStageCreateInfo-pNext-02756
  If a VkPipelineShaderStageRequiredSubgroupSizeCreateInfo structure is included in the `pNext` chain and `stage` is VK_SHADER_STAGE_COMPUTE_BIT, VK_SHADER_STAGE_MESH_BIT_EXT, or VK_SHADER_STAGE_TASK_BIT_EXT, the local workgroup size of the shader must be less than or equal to the product of VkPipelineShaderStageRequiredSubgroupSizeCreateInfo::`requiredSubgroupSize` and `maxComputeWorkgroupSubgroups`

- VUID-VkPipelineShaderStageCreateInfo-pNext-02757
  If a VkPipelineShaderStageRequiredSubgroupSizeCreateInfo structure is included in the `pNext` chain, and `flags` has the VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT flag set, the local workgroup size in the X dimension of the pipeline must be a multiple of VkPipelineShaderStageRequiredSubgroupSizeCreateInfo::`requiredSubgroupSize`

- VUID-VkPipelineShaderStageCreateInfo-flags-02758
  If `flags` has both the VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT and VK_PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT flags set, the local workgroup size in the X dimension of the pipeline must be a multiple of `maxSubgroupSize`

- VUID-VkPipelineShaderStageCreateInfo-flags-02759
  If `flags` has the VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT flag set and `flags` does not have the VK_PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT flag set and no VkPipelineShaderStageRequiredSubgroupSizeCreateInfo structure is included in the `pNext` chain, the local workgroup size in the X dimension of the pipeline must be a multiple of `subgroupSize`

- VUID-VkPipelineShaderStageCreateInfo-module-08987
  If `module` uses the `OpTypeCooperativeMatrixKHR` instruction with a `Scope` equal to `Subgroup`, then the local workgroup size in the X dimension of the pipeline must be a multiple of the effective subgroup size

- VUID-VkPipelineShaderStageCreateInfo-module-10169
  If `module` uses the `OpTypeCooperativeMatrixKHR` instruction with a `Scope` equal to `Workgroup`, then the local workgroup size in the X dimension of the pipeline must be a multiple of the effective subgroup size and the total local workgroup size must be a power of two multiple of the effective subgroup size and must be less than or equal to cooperativeMatrixWorkgroupScopeMaxWorkgroupSize

- VUID-VkPipelineShaderStageCreateInfo-stage-08771
  If a shader module identifier is not specified for this `stage`, `module` must be a valid VkShaderModule , or the `pNext` chain of the parent `Vk*CreateInfo` structure must set VkPipelineBinaryInfoKHR::`binaryCount` to a value greater than `0`, if none of the following features are enabled:

  - `graphicsPipelineLibrary`

  - `maintenance5`

- VUID-VkPipelineShaderStageCreateInfo-stage-06845
  If a shader module identifier is not specified for this `stage`, `module` must be a valid VkShaderModule, or there must be a valid VkShaderModuleCreateInfo structure in the `pNext` chain , or the `pNext` chain of the parent `Vk*CreateInfo` structure must set VkPipelineBinaryInfoKHR::`binaryCount` to a value greater than `0`,

- VUID-VkPipelineShaderStageCreateInfo-stage-06844
  If a shader module identifier is specified for this `stage`, the `pNext` chain must not include a VkShaderModuleCreateInfo structure

- VUID-VkPipelineShaderStageCreateInfo-stage-06848
  If a shader module identifier is specified for this `stage`, `module` must be VK_NULL_HANDLE

- VUID-VkPipelineShaderStageCreateInfo-pSpecializationInfo-06849
  If a shader module identifier is not specified, the shader code used by the pipeline must be valid as described by the Khronos SPIR-V Specification after applying the specializations provided in `pSpecializationInfo`, if any, and then converting all specialization constants into fixed constants

Valid Usage (Implicit)

- VUID-VkPipelineShaderStageCreateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO

- VUID-VkPipelineShaderStageCreateInfo-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkDebugUtilsObjectNameInfoEXT, VkPipelineRobustnessCreateInfo, VkPipelineShaderStageModuleIdentifierCreateInfoEXT, VkPipelineShaderStageNodeCreateInfoAMDX, VkPipelineShaderStageRequiredSubgroupSizeCreateInfo, VkShaderDescriptorSetAndBindingMappingInfoEXT, VkShaderModuleCreateInfo, VkShaderModuleValidationCacheCreateInfoEXT, or VkValidationFeaturesEXT

- VUID-VkPipelineShaderStageCreateInfo-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkPipelineShaderStageCreateInfo-flags-parameter
  `flags` must be a valid combination of VkPipelineShaderStageCreateFlagBits values

- VUID-VkPipelineShaderStageCreateInfo-stage-parameter
  `stage` must be a valid VkShaderStageFlagBits value

- VUID-VkPipelineShaderStageCreateInfo-module-parameter
  If `module` is not VK_NULL_HANDLE, `module` must be a valid VkShaderModule handle

- VUID-VkPipelineShaderStageCreateInfo-pName-parameter
  `pName` must be a null-terminated UTF-8 string

- VUID-VkPipelineShaderStageCreateInfo-pSpecializationInfo-parameter
  If `pSpecializationInfo` is not `NULL`, `pSpecializationInfo` must be a valid pointer to a valid VkSpecializationInfo structure

    // Provided by VK_VERSION_1_0
    typedef VkFlags VkPipelineShaderStageCreateFlags;

`VkPipelineShaderStageCreateFlags` is a bitmask type for setting a mask of zero or more VkPipelineShaderStageCreateFlagBits.

Possible values of the `flags` member of VkPipelineShaderStageCreateInfo specifying how a pipeline shader stage is created, are:

    // Provided by VK_VERSION_1_0
    typedef enum VkPipelineShaderStageCreateFlagBits {
      // Provided by VK_VERSION_1_3
        VK_PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT = 0x00000001,
      // Provided by VK_VERSION_1_3
        VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT = 0x00000002,
      // Provided by VK_EXT_subgroup_size_control
        VK_PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT_EXT = VK_PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT,
      // Provided by VK_EXT_subgroup_size_control
        VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXT = VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT,
    } VkPipelineShaderStageCreateFlagBits;

- VK_PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT specifies that the `SubgroupSize` may vary in the shader stage.

- VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT specifies that the subgroup sizes must be launched with all invocations active in the task, mesh, or compute stage.

Note | If VK_PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT_EXT and VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXT are specified and `minSubgroupSize` does not equal `maxSubgroupSize` and no required subgroup size is specified, then the only way to guarantee that the 'X' dimension of the local workgroup size is a multiple of `SubgroupSize` is to make it a multiple of `maxSubgroupSize`. Under these conditions, you are guaranteed full subgroups but not any particular subgroup size.

Bits which can be set by commands and structures, specifying one or more shader stages, are:

    // Provided by VK_VERSION_1_0
    typedef enum VkShaderStageFlagBits {
        VK_SHADER_STAGE_VERTEX_BIT = 0x00000001,
        VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT = 0x00000002,
        VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT = 0x00000004,
        VK_SHADER_STAGE_GEOMETRY_BIT = 0x00000008,
        VK_SHADER_STAGE_FRAGMENT_BIT = 0x00000010,
        VK_SHADER_STAGE_COMPUTE_BIT = 0x00000020,
        VK_SHADER_STAGE_ALL_GRAPHICS = 0x0000001F,
        VK_SHADER_STAGE_ALL = 0x7FFFFFFF,
      // Provided by VK_KHR_ray_tracing_pipeline
        VK_SHADER_STAGE_RAYGEN_BIT_KHR = 0x00000100,
      // Provided by VK_KHR_ray_tracing_pipeline
        VK_SHADER_STAGE_ANY_HIT_BIT_KHR = 0x00000200,
      // Provided by VK_KHR_ray_tracing_pipeline
        VK_SHADER_STAGE_CLOSEST_HIT_BIT_KHR = 0x00000400,
      // Provided by VK_KHR_ray_tracing_pipeline
        VK_SHADER_STAGE_MISS_BIT_KHR = 0x00000800,
      // Provided by VK_KHR_ray_tracing_pipeline
        VK_SHADER_STAGE_INTERSECTION_BIT_KHR = 0x00001000,
      // Provided by VK_KHR_ray_tracing_pipeline
        VK_SHADER_STAGE_CALLABLE_BIT_KHR = 0x00002000,
      // Provided by VK_EXT_mesh_shader
        VK_SHADER_STAGE_TASK_BIT_EXT = 0x00000040,
      // Provided by VK_EXT_mesh_shader
        VK_SHADER_STAGE_MESH_BIT_EXT = 0x00000080,
      // Provided by VK_HUAWEI_subpass_shading
        VK_SHADER_STAGE_SUBPASS_SHADING_BIT_HUAWEI = 0x00004000,
      // Provided by VK_HUAWEI_cluster_culling_shader
        VK_SHADER_STAGE_CLUSTER_CULLING_BIT_HUAWEI = 0x00080000,
      // Provided by VK_NV_ray_tracing
        VK_SHADER_STAGE_RAYGEN_BIT_NV = VK_SHADER_STAGE_RAYGEN_BIT_KHR,
      // Provided by VK_NV_ray_tracing
        VK_SHADER_STAGE_ANY_HIT_BIT_NV = VK_SHADER_STAGE_ANY_HIT_BIT_KHR,
      // Provided by VK_NV_ray_tracing
        VK_SHADER_STAGE_CLOSEST_HIT_BIT_NV = VK_SHADER_STAGE_CLOSEST_HIT_BIT_KHR,
      // Provided by VK_NV_ray_tracing
        VK_SHADER_STAGE_MISS_BIT_NV = VK_SHADER_STAGE_MISS_BIT_KHR,
      // Provided by VK_NV_ray_tracing
        VK_SHADER_STAGE_INTERSECTION_BIT_NV = VK_SHADER_STAGE_INTERSECTION_BIT_KHR,
      // Provided by VK_NV_ray_tracing
        VK_SHADER_STAGE_CALLABLE_BIT_NV = VK_SHADER_STAGE_CALLABLE_BIT_KHR,
      // Provided by VK_NV_mesh_shader
        VK_SHADER_STAGE_TASK_BIT_NV = VK_SHADER_STAGE_TASK_BIT_EXT,
      // Provided by VK_NV_mesh_shader
        VK_SHADER_STAGE_MESH_BIT_NV = VK_SHADER_STAGE_MESH_BIT_EXT,
    } VkShaderStageFlagBits;

- VK_SHADER_STAGE_VERTEX_BIT specifies the vertex stage.

- VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT specifies the tessellation control stage.

- VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT specifies the tessellation evaluation stage.

- VK_SHADER_STAGE_GEOMETRY_BIT specifies the geometry stage.

- VK_SHADER_STAGE_FRAGMENT_BIT specifies the fragment stage.

- VK_SHADER_STAGE_COMPUTE_BIT specifies the compute stage.

- VK_SHADER_STAGE_ALL_GRAPHICS is a combination of bits used as shorthand to specify all graphics stages defined above (excluding the compute stage).

- VK_SHADER_STAGE_ALL is a combination of bits used as shorthand to specify all shader stages supported by the device, including all additional stages which are introduced by extensions.

- VK_SHADER_STAGE_TASK_BIT_EXT specifies the task stage.

- VK_SHADER_STAGE_MESH_BIT_EXT specifies the mesh stage.

- VK_SHADER_STAGE_CLUSTER_CULLING_BIT_HUAWEI specifies the cluster culling stage.

- VK_SHADER_STAGE_RAYGEN_BIT_KHR specifies the ray generation stage.

- VK_SHADER_STAGE_ANY_HIT_BIT_KHR specifies the any-hit stage.

- VK_SHADER_STAGE_CLOSEST_HIT_BIT_KHR specifies the closest hit stage.

- VK_SHADER_STAGE_MISS_BIT_KHR specifies the miss stage.

- VK_SHADER_STAGE_INTERSECTION_BIT_KHR specifies the intersection stage.

- VK_SHADER_STAGE_CALLABLE_BIT_KHR specifies the callable stage.

Note | VK_SHADER_STAGE_ALL_GRAPHICS only includes the original five graphics stages included in Vulkan 1.0, and not any stages added by extensions. Thus, it may not have the desired effect in all cases.

    // Provided by VK_VERSION_1_0
    typedef VkFlags VkShaderStageFlags;

`VkShaderStageFlags` is a bitmask type for setting a mask of zero or more VkShaderStageFlagBits.

The `VkPipelineShaderStageRequiredSubgroupSizeCreateInfo` structure is defined as:

    // Provided by VK_VERSION_1_3
    typedef struct VkPipelineShaderStageRequiredSubgroupSizeCreateInfo {
        VkStructureType    sType;
        const void*        pNext;
        uint32_t           requiredSubgroupSize;
    } VkPipelineShaderStageRequiredSubgroupSizeCreateInfo;

    // Provided by VK_EXT_subgroup_size_control
    // Equivalent to VkPipelineShaderStageRequiredSubgroupSizeCreateInfo
    typedef VkPipelineShaderStageRequiredSubgroupSizeCreateInfo VkPipelineShaderStageRequiredSubgroupSizeCreateInfoEXT;

or the equiavlent

    // Provided by VK_EXT_shader_object
    // Equivalent to VkPipelineShaderStageRequiredSubgroupSizeCreateInfo
    typedef VkPipelineShaderStageRequiredSubgroupSizeCreateInfo VkShaderRequiredSubgroupSizeCreateInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `requiredSubgroupSize` is an unsigned integer value specifying the required subgroup size for the newly created pipeline shader stage.

If a `VkPipelineShaderStageRequiredSubgroupSizeCreateInfo` structure is included in the `pNext` chain of VkPipelineShaderStageCreateInfo, it specifies that the pipeline shader stage being compiled has a required subgroup size.

If a `VkShaderRequiredSubgroupSizeCreateInfoEXT` structure is included in the `pNext` chain of VkShaderCreateInfoEXT, it specifies that the shader being compiled has a required subgroup size.

Valid Usage

- VUID-VkPipelineShaderStageRequiredSubgroupSizeCreateInfo-requiredSubgroupSize-02760
  `requiredSubgroupSize` must be a power-of-two integer

- VUID-VkPipelineShaderStageRequiredSubgroupSizeCreateInfo-requiredSubgroupSize-02761
  `requiredSubgroupSize` must be greater or equal to `minSubgroupSize`

- VUID-VkPipelineShaderStageRequiredSubgroupSizeCreateInfo-requiredSubgroupSize-02762
  `requiredSubgroupSize` must be less than or equal to `maxSubgroupSize`

Valid Usage (Implicit)

- VUID-VkPipelineShaderStageRequiredSubgroupSizeCreateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_REQUIRED_SUBGROUP_SIZE_CREATE_INFO

Structure Chaining

Extends the structures

  - VkPipelineShaderStageCreateInfo

  - VkShaderCreateInfoEXT

A subpass shading pipeline is a compute pipeline which must be called only in a subpass of a render pass with work dimensions specified by render area size. The subpass shading pipeline shader is a compute shader allowed to access input attachments specified in the calling subpass. To create a subpass shading pipeline, call vkCreateComputePipelines with VkSubpassShadingPipelineCreateInfoHUAWEI in the `pNext` chain of VkComputePipelineCreateInfo.

The `VkSubpassShadingPipelineCreateInfoHUAWEI` structure is defined as:

    // Provided by VK_HUAWEI_subpass_shading
    typedef struct VkSubpassShadingPipelineCreateInfoHUAWEI {
        VkStructureType    sType;
        void*              pNext;
        VkRenderPass       renderPass;
        uint32_t           subpass;
    } VkSubpassShadingPipelineCreateInfoHUAWEI;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `renderPass` is a handle to a render pass object describing the environment in which the pipeline will be used. The pipeline must only be used with a render pass instance compatible with the one provided. See Render Pass Compatibility for more information. The implementation must not access this object outside of the duration of the command this structure is passed to.

- `subpass` is the index of the subpass in the render pass where this pipeline will be used.

Valid Usage

- VUID-VkSubpassShadingPipelineCreateInfoHUAWEI-subpass-04946
  `subpass` must be created with VK_PIPELINE_BIND_POINT_SUBPASS_SHADING_HUAWEI bind point

Valid Usage (Implicit)

- VUID-VkSubpassShadingPipelineCreateInfoHUAWEI-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SUBPASS_SHADING_PIPELINE_CREATE_INFO_HUAWEI

- VUID-VkSubpassShadingPipelineCreateInfoHUAWEI-renderPass-parameter
  `renderPass` must be a valid VkRenderPass handle

Structure Chaining

Extends the structure

  - VkComputePipelineCreateInfo

A subpass shading pipeline’s workgroup size is a 2D vector with number of power-of-two in width and height. The maximum number of width and height is implementation-dependent, and may vary for different formats and sample counts of attachments in a render pass.

To query the maximum workgroup size, call:

    // Provided by VK_HUAWEI_subpass_shading
    VkResult vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI(
        VkDevice                                    device,
        VkRenderPass                                renderpass,
        VkExtent2D*                                 pMaxWorkgroupSize);

- `device` is a handle to a local device object that was used to create the given render pass.

- `renderpass` is a handle to a render pass object describing the environment in which the pipeline will be used. The pipeline must only be used with a render pass instance compatible with the one provided. See Render Pass Compatibility for more information.

- `pMaxWorkgroupSize` is a pointer to a VkExtent2D structure.

Valid Usage (Implicit)

- VUID-vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI-renderpass-parameter
  `renderpass` must be a valid VkRenderPass handle

- VUID-vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI-pMaxWorkgroupSize-parameter
  `pMaxWorkgroupSize` must be a valid pointer to VkExtent2D structures

- VUID-vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI-renderpass-parent
  `renderpass` must have been created, allocated, or retrieved from `device`

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_SURFACE_LOST_KHR

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkPipelineRobustnessCreateInfo` structure is defined as:

    // Provided by VK_VERSION_1_4
    typedef struct VkPipelineRobustnessCreateInfo {
        VkStructureType                       sType;
        const void*                           pNext;
        VkPipelineRobustnessBufferBehavior    storageBuffers;
        VkPipelineRobustnessBufferBehavior    uniformBuffers;
        VkPipelineRobustnessBufferBehavior    vertexInputs;
        VkPipelineRobustnessImageBehavior     images;
    } VkPipelineRobustnessCreateInfo;

    // Provided by VK_EXT_pipeline_robustness
    // Equivalent to VkPipelineRobustnessCreateInfo
    typedef VkPipelineRobustnessCreateInfo VkPipelineRobustnessCreateInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `storageBuffers` sets the behavior of out of bounds accesses made to resources bound as:

  - VK_DESCRIPTOR_TYPE_STORAGE_BUFFER

  - VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER

  - VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC

- `uniformBuffers` describes the behavior of out of bounds accesses made to resources bound as:

  - VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER

  - VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER

  - VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC

  - VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK

- `vertexInputs` describes the behavior of out of bounds accesses made to vertex input attributes

- `images` describes the behavior of out of bounds accesses made to resources bound as:

  - VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE

  - VK_DESCRIPTOR_TYPE_STORAGE_IMAGE

Resources bound as VK_DESCRIPTOR_TYPE_MUTABLE_EXT will have the robustness behavior that covers its active descriptor type.

The scope of the effect of `VkPipelineRobustnessCreateInfo` depends on which structure’s `pNext` chain it is included in.

- `VkGraphicsPipelineCreateInfo`, `VkRayTracingPipelineCreateInfoKHR`, `VkComputePipelineCreateInfo`:
  The robustness behavior described by `VkPipelineRobustnessCreateInfo` applies to all accesses through this pipeline

- `VkPipelineShaderStageCreateInfo`:
  The robustness behavior described by `VkPipelineRobustnessCreateInfo` applies to all accesses emanating from the shader code of this shader stage

If `VkPipelineRobustnessCreateInfo` is specified for both a pipeline and a pipeline stage, the `VkPipelineRobustnessCreateInfo` specified for the pipeline stage will take precedence.

When `VkPipelineRobustnessCreateInfo` is specified for a pipeline, it only affects the subset of the pipeline that is specified by the create info, as opposed to subsets linked from pipeline libraries. For VkGraphicsPipelineCreateInfo, that subset is specified by VkGraphicsPipelineLibraryCreateInfoEXT::`flags`. For VkRayTracingPipelineCreateInfoKHR, that subset is specified by the specific stages in VkRayTracingPipelineCreateInfoKHR::`pStages`.

Valid Usage

- VUID-VkPipelineRobustnessCreateInfo-pipelineRobustness-06926
  If the `pipelineRobustness` feature is not enabled, `storageBuffers` must be VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DEVICE_DEFAULT

- VUID-VkPipelineRobustnessCreateInfo-pipelineRobustness-06927
  If the `pipelineRobustness` feature is not enabled, `uniformBuffers` must be VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DEVICE_DEFAULT

- VUID-VkPipelineRobustnessCreateInfo-pipelineRobustness-06928
  If the `pipelineRobustness` feature is not enabled, `vertexInputs` must be VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DEVICE_DEFAULT

- VUID-VkPipelineRobustnessCreateInfo-pipelineRobustness-06929
  If the `pipelineRobustness` feature is not enabled, `images` must be VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_DEVICE_DEFAULT

- VUID-VkPipelineRobustnessCreateInfo-robustImageAccess-06930
  If the `robustImageAccess` feature is not supported, `images` must not be VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_ROBUST_IMAGE_ACCESS

- VUID-VkPipelineRobustnessCreateInfo-robustBufferAccess2-06931
  If the `robustBufferAccess2` feature is not supported, `storageBuffers` must not be VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2

- VUID-VkPipelineRobustnessCreateInfo-robustBufferAccess2-06932
  If the `robustBufferAccess2` feature is not supported, `uniformBuffers` must not be VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2

- VUID-VkPipelineRobustnessCreateInfo-robustBufferAccess2-06933
  If the `robustBufferAccess2` feature is not supported, `vertexInputs` must not be VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2

- VUID-VkPipelineRobustnessCreateInfo-robustImageAccess2-06934
  If the `robustImageAccess2` feature is not supported, `images` must not be VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_ROBUST_IMAGE_ACCESS_2

- VUID-VkPipelineRobustnessCreateInfo-storageBuffers-10636
  If `storageBuffers` is VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2, and either the `descriptorBindingStorageBufferUpdateAfterBind` feature or the `descriptorBindingStorageTexelBufferUpdateAfterBind` feature is enabled on the device, `robustBufferAccessUpdateAfterBind` must be VK_TRUE

- VUID-VkPipelineRobustnessCreateInfo-uniformBuffers-10637
  If `uniformBuffers` is VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2, and either the `descriptorBindingInlineUniformBlockUpdateAfterBind` feature, the `descriptorBindingUniformBufferUpdateAfterBind` feature, or the `descriptorBindingUniformTexelBufferUpdateAfterBind` feature is enabled on the device, `robustBufferAccessUpdateAfterBind` must be VK_TRUE

- VUID-VkPipelineRobustnessCreateInfo-images-10638
  If `images` is VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_ROBUST_IMAGE_ACCESS or VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_ROBUST_IMAGE_ACCESS_2, and either the `descriptorBindingStorageImageUpdateAfterBind` feature or the `descriptorBindingSampledImageUpdateAfterBind` feature is enabled on the device, `robustBufferAccessUpdateAfterBind` must be VK_TRUE

Valid Usage (Implicit)

- VUID-VkPipelineRobustnessCreateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PIPELINE_ROBUSTNESS_CREATE_INFO

- VUID-VkPipelineRobustnessCreateInfo-storageBuffers-parameter
  `storageBuffers` must be a valid VkPipelineRobustnessBufferBehavior value

- VUID-VkPipelineRobustnessCreateInfo-uniformBuffers-parameter
  `uniformBuffers` must be a valid VkPipelineRobustnessBufferBehavior value

- VUID-VkPipelineRobustnessCreateInfo-vertexInputs-parameter
  `vertexInputs` must be a valid VkPipelineRobustnessBufferBehavior value

- VUID-VkPipelineRobustnessCreateInfo-images-parameter
  `images` must be a valid VkPipelineRobustnessImageBehavior value

Structure Chaining

Extends the structures

  - VkComputePipelineCreateInfo

  - VkGraphicsPipelineCreateInfo

  - VkPipelineShaderStageCreateInfo

  - VkRayTracingPipelineCreateInfoKHR

Possible values of the `storageBuffers`, `uniformBuffers`, and `vertexInputs` members of VkPipelineRobustnessCreateInfo are:

    // Provided by VK_VERSION_1_4
    typedef enum VkPipelineRobustnessBufferBehavior {
        VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DEVICE_DEFAULT = 0,
        VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DISABLED = 1,
        VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS = 2,
        VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 = 3,
      // Provided by VK_EXT_pipeline_robustness
        VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DEVICE_DEFAULT_EXT = VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DEVICE_DEFAULT,
      // Provided by VK_EXT_pipeline_robustness
        VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DISABLED_EXT = VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DISABLED,
      // Provided by VK_EXT_pipeline_robustness
        VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_EXT = VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS,
      // Provided by VK_EXT_pipeline_robustness
        VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2_EXT = VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2,
    } VkPipelineRobustnessBufferBehavior;

    // Provided by VK_EXT_pipeline_robustness
    // Equivalent to VkPipelineRobustnessBufferBehavior
    typedef VkPipelineRobustnessBufferBehavior VkPipelineRobustnessBufferBehaviorEXT;

- VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DEVICE_DEFAULT specifies that out of bounds buffer accesses follow the behavior of robust buffer access features enabled for the device.

- VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DISABLED specifies that buffer accesses must not be out of bounds.

- VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS specifies that buffer accesses conform to Robust Buffer Access guarantees.

- VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 specifies that buffer accesses conform to Robust Buffer Access 2 guarantees.

Possible values of the `images` member of VkPipelineRobustnessCreateInfo are:

    // Provided by VK_VERSION_1_4
    typedef enum VkPipelineRobustnessImageBehavior {
        VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_DEVICE_DEFAULT = 0,
        VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_DISABLED = 1,
        VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_ROBUST_IMAGE_ACCESS = 2,
        VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_ROBUST_IMAGE_ACCESS_2 = 3,
      // Provided by VK_EXT_pipeline_robustness
        VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_DEVICE_DEFAULT_EXT = VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_DEVICE_DEFAULT,
      // Provided by VK_EXT_pipeline_robustness
        VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_DISABLED_EXT = VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_DISABLED,
      // Provided by VK_EXT_pipeline_robustness
        VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_ROBUST_IMAGE_ACCESS_EXT = VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_ROBUST_IMAGE_ACCESS,
      // Provided by VK_EXT_pipeline_robustness
        VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_ROBUST_IMAGE_ACCESS_2_EXT = VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_ROBUST_IMAGE_ACCESS_2,
    } VkPipelineRobustnessImageBehavior;

    // Provided by VK_EXT_pipeline_robustness
    // Equivalent to VkPipelineRobustnessImageBehavior
    typedef VkPipelineRobustnessImageBehavior VkPipelineRobustnessImageBehaviorEXT;

- VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_DEVICE_DEFAULT specifies that out of bounds image accesses follow the behavior of robust image access features enabled for the device.

- VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_DISABLED specifies that image accesses must not be out of bounds.

- VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_ROBUST_IMAGE_ACCESS specifies that image accesses conform to Robust Image Access guarantees.

- VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_ROBUST_IMAGE_ACCESS_2 specifies that image accesses conform to Robust Image Access 2 guarantees.

An identifier can be provided instead of shader code in an attempt to compile pipelines without providing complete SPIR-V to the implementation.

The `VkPipelineShaderStageModuleIdentifierCreateInfoEXT` structure is defined as:

    // Provided by VK_EXT_shader_module_identifier
    typedef struct VkPipelineShaderStageModuleIdentifierCreateInfoEXT {
        VkStructureType    sType;
        const void*        pNext;
        uint32_t           identifierSize;
        const uint8_t*     pIdentifier;
    } VkPipelineShaderStageModuleIdentifierCreateInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `identifierSize` is the size, in bytes, of the buffer pointed to by `pIdentifier`.

- `pIdentifier` is a pointer to a buffer of opaque data specifying an identifier.

Any identifier can be used. If the pipeline being created with identifier requires compilation to complete the pipeline creation call, pipeline compilation must fail as defined by VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT.

`pIdentifier` and `identifierSize` can be obtained from an VkShaderModuleIdentifierEXT queried earlier.

Valid Usage

- VUID-VkPipelineShaderStageModuleIdentifierCreateInfoEXT-pNext-06850
  If this structure is included in a `pNext` chain and `identifierSize` is not equal to 0, the `shaderModuleIdentifier` feature must be enabled

- VUID-VkPipelineShaderStageModuleIdentifierCreateInfoEXT-pNext-06851
  If this structure is included in a `pNext` chain of VkPipelineShaderStageCreateInfo and `identifierSize` is not equal to 0, the pipeline must be created with the VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT flag set

- VUID-VkPipelineShaderStageModuleIdentifierCreateInfoEXT-identifierSize-06852
  `identifierSize` must be less-or-equal to VK_MAX_SHADER_MODULE_IDENTIFIER_SIZE_EXT

Valid Usage (Implicit)

- VUID-VkPipelineShaderStageModuleIdentifierCreateInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_MODULE_IDENTIFIER_CREATE_INFO_EXT

- VUID-VkPipelineShaderStageModuleIdentifierCreateInfoEXT-pIdentifier-parameter
  If `identifierSize` is not `0`, `pIdentifier` must be a valid pointer to an array of `identifierSize` `uint8_t` values

Structure Chaining

Extends the structure

  - VkPipelineShaderStageCreateInfo

If a compute pipeline is going to be used in Device-Generated Commands by specifying its pipeline token with VkBindPipelineIndirectCommandNV, then that pipeline’s associated metadata must be saved at a specified buffer device address for later use in indirect command generation. The buffer device address must be specified at the time of compute pipeline creation with VkComputePipelineIndirectBufferInfoNV structure in the `pNext` chain of VkComputePipelineCreateInfo.

The `VkComputePipelineIndirectBufferInfoNV` structure is defined as:

    // Provided by VK_NV_device_generated_commands_compute
    typedef struct VkComputePipelineIndirectBufferInfoNV {
        VkStructureType    sType;
        const void*        pNext;
        VkDeviceAddress    deviceAddress;
        VkDeviceSize       size;
        VkDeviceAddress    pipelineDeviceAddressCaptureReplay;
    } VkComputePipelineIndirectBufferInfoNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `deviceAddress` is the address where the pipeline’s metadata will be stored.

- `size` is the size of pipeline’s metadata that was queried using vkGetPipelineIndirectMemoryRequirementsNV.

- `pipelineDeviceAddressCaptureReplay` is the device address where pipeline’s metadata was originally saved and can now be used to re-populate `deviceAddress` for replay.

If `pipelineDeviceAddressCaptureReplay` is zero, no specific address is requested. If `pipelineDeviceAddressCaptureReplay` is not zero, then it must be an address retrieved from an identically created pipeline on the same implementation. The pipeline metadata must also be placed on an identically created buffer and at the same offset using the vkCmdUpdatePipelineIndirectBufferNV command.

Valid Usage

- VUID-VkComputePipelineIndirectBufferInfoNV-deviceGeneratedComputePipelines-09009
  The `VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV`::`deviceGeneratedComputePipelines` feature must be enabled

- VUID-VkComputePipelineIndirectBufferInfoNV-flags-09010
  The pipeline creation flags in VkComputePipelineCreateInfo::`flags` must include VK_PIPELINE_CREATE_INDIRECT_BINDABLE_BIT_NV

- VUID-VkComputePipelineIndirectBufferInfoNV-deviceAddress-09011
  `deviceAddress` must be aligned to the VkMemoryRequirements2::`memoryRequirements.alignment`, as returned by vkGetPipelineIndirectMemoryRequirementsNV

- VUID-VkComputePipelineIndirectBufferInfoNV-deviceAddress-09012
  `deviceAddress` must have been allocated from a buffer that was created with both the VK_BUFFER_USAGE_TRANSFER_DST_BIT and VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT usage flags set

- VUID-VkComputePipelineIndirectBufferInfoNV-size-09013
  `size` must be greater than or equal to the VkMemoryRequirements2::`memoryRequirements.size`, as returned by vkGetPipelineIndirectMemoryRequirementsNV

- VUID-VkComputePipelineIndirectBufferInfoNV-pipelineDeviceAddressCaptureReplay-09014
  If `pipelineDeviceAddressCaptureReplay` is non-zero then the `VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV`::`deviceGeneratedComputeCaptureReplay` feature must be enabled

- VUID-VkComputePipelineIndirectBufferInfoNV-pipelineDeviceAddressCaptureReplay-09015
  If `pipelineDeviceAddressCaptureReplay` is non-zero then that address must have been allocated with flag VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT set

- VUID-VkComputePipelineIndirectBufferInfoNV-pipelineDeviceAddressCaptureReplay-09016
  If `pipelineDeviceAddressCaptureReplay` is non-zero, the `pipeline` must have been recreated for replay

- VUID-VkComputePipelineIndirectBufferInfoNV-pipelineDeviceAddressCaptureReplay-09017
  `pipelineDeviceAddressCaptureReplay` must satisfy the `alignment` and `size` requirements similar to `deviceAddress`

Valid Usage (Implicit)

- VUID-VkComputePipelineIndirectBufferInfoNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_INDIRECT_BUFFER_INFO_NV

- VUID-VkComputePipelineIndirectBufferInfoNV-deviceAddress-parameter
  `deviceAddress` must be a valid VkDeviceAddress value

- VUID-VkComputePipelineIndirectBufferInfoNV-pipelineDeviceAddressCaptureReplay-parameter
  If `pipelineDeviceAddressCaptureReplay` is not `0`, `pipelineDeviceAddressCaptureReplay` must be a valid VkDeviceAddress value

Structure Chaining

Extends the structure

  - VkComputePipelineCreateInfo

To save a compute pipeline’s metadata at a device address call:

    // Provided by VK_NV_device_generated_commands_compute
    void vkCmdUpdatePipelineIndirectBufferNV(
        VkCommandBuffer                             commandBuffer,
        VkPipelineBindPoint                         pipelineBindPoint,
        VkPipeline                                  pipeline);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `pipelineBindPoint` is a VkPipelineBindPoint value specifying the type of pipeline whose metadata will be saved.

- `pipeline` is the pipeline whose metadata will be saved.

`vkCmdUpdatePipelineIndirectBufferNV` is only allowed outside of a render pass. This command is treated as a “transfer” operation for the purposes of synchronization barriers. The writes to the address must be synchronized using stages VK_PIPELINE_STAGE_2_COPY_BIT and VK_PIPELINE_STAGE_COMMAND_PREPROCESS_BIT_NV and with access masks VK_ACCESS_MEMORY_WRITE_BIT and VK_ACCESS_COMMAND_PREPROCESS_READ_BIT_NV respectively before using the results in preprocessing.

Valid Usage

- VUID-vkCmdUpdatePipelineIndirectBufferNV-pipelineBindPoint-09018
  `pipelineBindPoint` must be VK_PIPELINE_BIND_POINT_COMPUTE

- VUID-vkCmdUpdatePipelineIndirectBufferNV-pipeline-09019
  `pipeline` must have been created with VK_PIPELINE_CREATE_INDIRECT_BINDABLE_BIT_NV flag set

- VUID-vkCmdUpdatePipelineIndirectBufferNV-pipeline-09020
  `pipeline` must have been created with VkComputePipelineIndirectBufferInfoNV structure specifying a valid address where its metadata will be saved

- VUID-vkCmdUpdatePipelineIndirectBufferNV-deviceGeneratedComputePipelines-09021
  The `VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV`::`deviceGeneratedComputePipelines` feature must be enabled

Valid Usage (Implicit)

- VUID-vkCmdUpdatePipelineIndirectBufferNV-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdUpdatePipelineIndirectBufferNV-pipelineBindPoint-parameter
  `pipelineBindPoint` must be a valid VkPipelineBindPoint value

- VUID-vkCmdUpdatePipelineIndirectBufferNV-pipeline-parameter
  `pipeline` must be a valid VkPipeline handle

- VUID-vkCmdUpdatePipelineIndirectBufferNV-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdUpdatePipelineIndirectBufferNV-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, VK_QUEUE_GRAPHICS_BIT, or VK_QUEUE_TRANSFER_BIT operations

- VUID-vkCmdUpdatePipelineIndirectBufferNV-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdUpdatePipelineIndirectBufferNV-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdUpdatePipelineIndirectBufferNV-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdUpdatePipelineIndirectBufferNV-commonparent
  Both of `commandBuffer`, and `pipeline` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT VK_QUEUE_TRANSFER_BIT | Action

Conditional Rendering

vkCmdUpdatePipelineIndirectBufferNV is not affected by conditional rendering

### 10.4. Graphics Pipelines

Graphics pipelines consist of multiple shader stages, multiple fixed-function pipeline stages, and a pipeline layout.

To create graphics pipelines, call:

    // Provided by VK_VERSION_1_0
    VkResult vkCreateGraphicsPipelines(
        VkDevice                                    device,
        VkPipelineCache                             pipelineCache,
        uint32_t                                    createInfoCount,
        const VkGraphicsPipelineCreateInfo*         pCreateInfos,
        const VkAllocationCallbacks*                pAllocator,
        VkPipeline*                                 pPipelines);

- `device` is the logical device that creates the graphics pipelines.

- `pipelineCache` is either VK_NULL_HANDLE, indicating that pipeline caching is disabled, or to enable caching, the handle of a valid VkPipelineCache object. The implementation must not access this object outside of the duration of this command.

- `createInfoCount` is the length of the `pCreateInfos` and `pPipelines` arrays.

- `pCreateInfos` is a pointer to an array of VkGraphicsPipelineCreateInfo structures.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

- `pPipelines` is a pointer to an array of VkPipeline handles in which the resulting graphics pipeline objects are returned.

The VkGraphicsPipelineCreateInfo structure includes an array of VkPipelineShaderStageCreateInfo structures for each of the desired active shader stages, as well as creation information for all relevant fixed-function stages, and a pipeline layout.

Pipelines are created and returned as described for Multiple Pipeline Creation.

Valid Usage

- VUID-vkCreateGraphicsPipelines-device-09662
  `device` must support at least one queue family with the VK_QUEUE_GRAPHICS_BIT capability

- VUID-vkCreateGraphicsPipelines-flags-00720
  If the `flags` member of any element of `pCreateInfos` contains the VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, and the `basePipelineIndex` member of that same element is not `-1`, `basePipelineIndex` must be less than the index into `pCreateInfos` that corresponds to that element

- VUID-vkCreateGraphicsPipelines-flags-00721
  If the `flags` member of any element of `pCreateInfos` contains the VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, the base pipeline must have been created with the VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT flag set

- VUID-vkCreateGraphicsPipelines-pipelineCache-02876
  If `pipelineCache` was created with VK_PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT, host access to `pipelineCache` must be externally synchronized

- VUID-vkCreateGraphicsPipelines-pNext-09616
  If VkPipelineBinaryInfoKHR::`binaryCount` is not `0` for any element of `pCreateInfos`, `pipelineCache` must be VK_NULL_HANDLE

- VUID-vkCreateGraphicsPipelines-pNext-09617
  If a VkPipelineCreateFlags2CreateInfoKHR structure with the VK_PIPELINE_CREATE_2_CAPTURE_DATA_BIT_KHR flag set is included in the `pNext` chain of any element of `pCreateInfos`, `pipelineCache` must be VK_NULL_HANDLE

- VUID-vkCreateGraphicsPipelines-binaryCount-09620
  If VkPipelineBinaryInfoKHR::`binaryCount` is not `0` for any element of `pCreateInfos`, VK_PIPELINE_CREATION_FEEDBACK_APPLICATION_PIPELINE_CACHE_HIT_BIT must not be set in the `flags` of that element

- VUID-vkCreateGraphicsPipelines-binaryCount-09621
  If VkPipelineBinaryInfoKHR::`binaryCount` is not `0` for any element of `pCreateInfos`, VK_PIPELINE_CREATION_FEEDBACK_BASE_PIPELINE_ACCELERATION_BIT must not be set in the `flags` of that element

- VUID-vkCreateGraphicsPipelines-binaryCount-09622
  If VkPipelineBinaryInfoKHR::`binaryCount` is not `0` for any element of `pCreateInfos`, VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT_EXT must not be set in the `flags` of that element

- VUID-vkCreateGraphicsPipelines-pCreateInfos-11414
  If any element of `pCreateInfos` sets VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT and includes embedded sampler mappings, there must be less than (`maxSamplerAllocationCount` - (`minSamplerHeapReservedRangeWithEmbedded` / `samplerDescriptorSize`)) VkSampler objects currently created on the device

- VUID-vkCreateGraphicsPipelines-pCreateInfos-11429
  If any element of `pCreateInfos` sets VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT and includes embedded sampler mappings, this command must not cause the total number of unique embedded samplers in pipelines and shaders on this device to exceed `maxDescriptorHeapEmbeddedSamplers`

Note | An implicit cache may be provided by the implementation or a layer. For this reason, it is still valid to set VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT on `flags` for any element of `pCreateInfos` while passing VK_NULL_HANDLE for `pipelineCache`.

Valid Usage (Implicit)

- VUID-vkCreateGraphicsPipelines-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkCreateGraphicsPipelines-pipelineCache-parameter
  If `pipelineCache` is not VK_NULL_HANDLE, `pipelineCache` must be a valid VkPipelineCache handle

- VUID-vkCreateGraphicsPipelines-pCreateInfos-parameter
  `pCreateInfos` must be a valid pointer to an array of `createInfoCount` valid VkGraphicsPipelineCreateInfo structures

- VUID-vkCreateGraphicsPipelines-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateGraphicsPipelines-pPipelines-parameter
  `pPipelines` must be a valid pointer to an array of `createInfoCount` VkPipeline handles

- VUID-vkCreateGraphicsPipelines-createInfoCount-arraylength
  `createInfoCount` must be greater than `0`

- VUID-vkCreateGraphicsPipelines-pipelineCache-parent
  If `pipelineCache` is a valid handle, it must have been created, allocated, or retrieved from `device`

Return Codes

Success

  - VK_PIPELINE_COMPILE_REQUIRED_EXT

  - VK_SUCCESS

Failure

  - VK_ERROR_INVALID_SHADER_NV

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkGraphicsPipelineCreateInfo` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkGraphicsPipelineCreateInfo {
        VkStructureType                                  sType;
        const void*                                      pNext;
        VkPipelineCreateFlags                            flags;
        uint32_t                                         stageCount;
        const VkPipelineShaderStageCreateInfo*           pStages;
        const VkPipelineVertexInputStateCreateInfo*      pVertexInputState;
        const VkPipelineInputAssemblyStateCreateInfo*    pInputAssemblyState;
        const VkPipelineTessellationStateCreateInfo*     pTessellationState;
        const VkPipelineViewportStateCreateInfo*         pViewportState;
        const VkPipelineRasterizationStateCreateInfo*    pRasterizationState;
        const VkPipelineMultisampleStateCreateInfo*      pMultisampleState;
        const VkPipelineDepthStencilStateCreateInfo*     pDepthStencilState;
        const VkPipelineColorBlendStateCreateInfo*       pColorBlendState;
        const VkPipelineDynamicStateCreateInfo*          pDynamicState;
        VkPipelineLayout                                 layout;
        VkRenderPass                                     renderPass;
        uint32_t                                         subpass;
        VkPipeline                                       basePipelineHandle;
        int32_t                                          basePipelineIndex;
    } VkGraphicsPipelineCreateInfo;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask of VkPipelineCreateFlagBits specifying how the pipeline will be generated.

- `stageCount` is the number of entries in the `pStages` array.

- `pStages` is a pointer to an array of `stageCount` VkPipelineShaderStageCreateInfo structures describing the set of the shader stages to be included in the graphics pipeline.

- `pVertexInputState` is a pointer to a VkPipelineVertexInputStateCreateInfo structure. It is ignored if the pipeline includes a mesh shader stage. It can be `NULL` if the pipeline is created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state set.

- `pInputAssemblyState` is a pointer to a VkPipelineInputAssemblyStateCreateInfo structure which determines input assembly behavior for vertex shading, as described in Drawing Commands. If the `VK_EXT_extended_dynamic_state3` extension is enabled, it can be `NULL` if the pipeline is created with both VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE, and VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY dynamic states set and `dynamicPrimitiveTopologyUnrestricted` is VK_TRUE. It is ignored if the pipeline includes a mesh shader stage.

- `pTessellationState` is a pointer to a VkPipelineTessellationStateCreateInfo structure defining tessellation state used by tessellation shaders. It can be `NULL` if the pipeline is created with the VK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT dynamic state set.

- `pViewportState` is a pointer to a VkPipelineViewportStateCreateInfo structure defining viewport state used when rasterization is enabled. If the `VK_EXT_extended_dynamic_state3` extension is enabled, it can be `NULL` if the pipeline is created with both VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT, and VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT dynamic states set.

- `pRasterizationState` is a pointer to a VkPipelineRasterizationStateCreateInfo structure defining rasterization state. If the `VK_EXT_extended_dynamic_state3` extension is enabled, it can be `NULL` if the pipeline is created with all of VK_DYNAMIC_STATE_DEPTH_CLAMP_ENABLE_EXT, VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE, VK_DYNAMIC_STATE_POLYGON_MODE_EXT, VK_DYNAMIC_STATE_CULL_MODE, VK_DYNAMIC_STATE_FRONT_FACE, VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE, VK_DYNAMIC_STATE_DEPTH_BIAS, and VK_DYNAMIC_STATE_LINE_WIDTH dynamic states set.

- `pMultisampleState` is a pointer to a VkPipelineMultisampleStateCreateInfo structure defining multisample state used when rasterization is enabled. If the `VK_EXT_extended_dynamic_state3` extension is enabled, it can be `NULL` if the pipeline is created with all of VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT, VK_DYNAMIC_STATE_SAMPLE_MASK_EXT, and VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT dynamic states set, and either the alphaToOne feature is not enabled or VK_DYNAMIC_STATE_ALPHA_TO_ONE_ENABLE_EXT is set, in which case VkPipelineMultisampleStateCreateInfo::`sampleShadingEnable` is assumed to be VK_FALSE.

- `pDepthStencilState` is a pointer to a VkPipelineDepthStencilStateCreateInfo structure defining depth/stencil state used when rasterization is enabled for depth or stencil attachments accessed during rendering. If the `VK_EXT_extended_dynamic_state3` extension is enabled, it can be `NULL` if the pipeline is created with all of VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE, VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE, VK_DYNAMIC_STATE_DEPTH_COMPARE_OP, VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE, VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE, VK_DYNAMIC_STATE_STENCIL_OP, and VK_DYNAMIC_STATE_DEPTH_BOUNDS dynamic states set.

- `pColorBlendState` is a pointer to a VkPipelineColorBlendStateCreateInfo structure defining color blend state used when rasterization is enabled for any color attachments accessed during rendering. If the `VK_EXT_extended_dynamic_state3` extension is enabled, it can be `NULL` if the pipeline is created with all of VK_DYNAMIC_STATE_LOGIC_OP_ENABLE_EXT, VK_DYNAMIC_STATE_LOGIC_OP_EXT, VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT, VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT, VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT, and VK_DYNAMIC_STATE_BLEND_CONSTANTS dynamic states set.

- `pDynamicState` is a pointer to a VkPipelineDynamicStateCreateInfo structure defining which properties of the pipeline state object are dynamic and can be changed independently of the pipeline state. This can be `NULL`, which means no state in the pipeline is considered dynamic.

- `layout` is the description of binding locations used by both the pipeline and descriptor sets used with the pipeline. If VkPhysicalDeviceProperties::`apiVersion` is greater than or equal to Vulkan 1.3 or VK_KHR_maintenance4 is enabled `layout` must not be accessed by the implementation outside of the duration of the command this structure is passed to.

- `renderPass` is a handle to a render pass object describing the environment in which the pipeline will be used. The pipeline must only be used with a render pass instance compatible with the one provided. See Render Pass Compatibility for more information. The implementation must not access this object outside of the duration of the command this structure is passed to.

- `subpass` is the index of the subpass in the render pass where this pipeline will be used.

- `basePipelineHandle` is a pipeline to derive from.

- `basePipelineIndex` is an index into the `pCreateInfos` parameter to use as a pipeline to derive from.

The parameters `basePipelineHandle` and `basePipelineIndex` are described in more detail in Pipeline Derivatives.

If any shader stage fails to compile, the compile log will be reported back to the application, and VK_ERROR_INVALID_SHADER_NV will be generated.

Note | With `VK_EXT_extended_dynamic_state3`, it is possible that many of the `VkGraphicsPipelineCreateInfo` members above can be `NULL` because all their state is dynamic and therefore ignored. This is optional so the application can still use a valid pointer if it needs to set the `pNext` or `flags` fields to specify state for other extensions.

The state required for a graphics pipeline is divided into vertex input state, pre-rasterization shader state, fragment shader state, and fragment output state.

#### Vertex Input State

Vertex input state is defined by:

- VkPipelineVertexInputStateCreateInfo

- VkPipelineInputAssemblyStateCreateInfo

If this pipeline specifies pre-rasterization state either directly or by including it as a pipeline library and its `pStages` includes a vertex shader, this state must be specified to create a complete graphics pipeline.

If a pipeline includes VK_GRAPHICS_PIPELINE_LIBRARY_VERTEX_INPUT_INTERFACE_BIT_EXT in VkGraphicsPipelineLibraryCreateInfoEXT::`flags` either explicitly or as a default, and either the conditions requiring this state for a complete graphics pipeline are met or this pipeline does not specify pre-rasterization state in any way, that pipeline must specify this state directly.

#### Pre-Rasterization Shader State

Pre-rasterization shader state is defined by:

- VkPipelineShaderStageCreateInfo entries for:

  - Vertex shaders

  - Tessellation control shaders

  - Tessellation evaluation shaders

  - Geometry shaders

  - Task shaders

  - Mesh shaders

- Within the VkPipelineLayout, all descriptor sets with pre-rasterization shader bindings if VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT was specified.

  - If VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT was not specified, the full pipeline layout must be specified.

- VkPipelineViewportStateCreateInfo

- VkPipelineRasterizationStateCreateInfo

- VkPipelineTessellationStateCreateInfo

- VkRenderPass and `subpass` parameter

- The `viewMask` parameter of VkPipelineRenderingCreateInfo (formats are ignored)

- VkPipelineDiscardRectangleStateCreateInfoEXT

- VkPipelineFragmentShadingRateStateCreateInfoKHR

- Inclusion/omission of the VK_PIPELINE_CREATE_2_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE flag

This state must be specified to create a complete graphics pipeline.

If either the `pNext` chain includes a VkGraphicsPipelineLibraryCreateInfoEXT structure with VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT included in `flags`, or it is not specified and would default to include that value, this state must be specified in the pipeline.

#### Fragment Shader State

Fragment shader state is defined by:

- A VkPipelineShaderStageCreateInfo entry for the fragment shader

- Within the VkPipelineLayout, all descriptor sets with fragment shader bindings if VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT was specified.

  - If VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT was not specified, the full pipeline layout must be specified.

- VkPipelineMultisampleStateCreateInfo if sample shading is enabled or `renderpass` is not VK_NULL_HANDLE

- VkPipelineDepthStencilStateCreateInfo

- VkRenderPass and `subpass` parameter

- The `viewMask` parameter of VkPipelineRenderingCreateInfo (formats are ignored)

- VkPipelineFragmentShadingRateStateCreateInfoKHR

- VkPipelineFragmentShadingRateEnumStateCreateInfoNV

- VkPipelineRepresentativeFragmentTestStateCreateInfoNV

- Inclusion/omission of the VK_PIPELINE_RASTERIZATION_STATE_CREATE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR flag

- Inclusion/omission of the VK_PIPELINE_RASTERIZATION_STATE_CREATE_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT flag

- VkRenderingInputAttachmentIndexInfo

- Inclusion/omission of the VK_PIPELINE_CREATE_2_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE flag

- The `customResolve` parameter of VkCustomResolveCreateInfoEXT. Formats are ignored, and not including the structure behaves identically to setting `customResolve` to VK_FALSE, unlike in fragment output interface state.

If a pipeline specifies pre-rasterization state either directly or by including it as a pipeline library and `rasterizerDiscardEnable` is VK_FALSE or VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE is used, this state must be specified to create a complete graphics pipeline.

If a pipeline includes VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT in VkGraphicsPipelineLibraryCreateInfoEXT::`flags` either explicitly or as a default, and either the conditions requiring this state for a complete graphics pipeline are met or this pipeline does not specify pre-rasterization state in any way, that pipeline must specify this state directly.

#### Fragment Output State

Fragment output state is defined by:

- VkPipelineColorBlendStateCreateInfo

- VkRenderPass and `subpass` parameter

- VkPipelineMultisampleStateCreateInfo

- The format parameters of VkPipelineRenderingCreateInfo (`viewMask` is ignored)

- VkAttachmentSampleCountInfoAMD

- VkAttachmentSampleCountInfoNV

- VkExternalFormatANDROID

- VkCustomResolveCreateInfoEXT

- Inclusion/omission of the VK_PIPELINE_CREATE_COLOR_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT and VK_PIPELINE_CREATE_DEPTH_STENCIL_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT flags

- Inclusion/omission of the VK_PIPELINE_CREATE_2_ENABLE_LEGACY_DITHERING_BIT_EXT flag

- VkRenderingAttachmentLocationInfo

If a pipeline specifies pre-rasterization state either directly or by including it as a pipeline library and `rasterizerDiscardEnable` is VK_FALSE or VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE is used, this state must be specified to create a complete graphics pipeline.

If a pipeline includes VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT in VkGraphicsPipelineLibraryCreateInfoEXT::`flags` either explicitly or as a default, and either the conditions requiring this state for a complete graphics pipeline are met or this pipeline does not specify pre-rasterization state in any way, that pipeline must specify this state directly.

#### Dynamic State

Dynamic state values set via `pDynamicState` must be ignored if the state they correspond to is not otherwise statically set by one of the state subsets used to create the pipeline. Additionally, setting dynamic state values must not modify whether state in a linked library is static or dynamic; this is set and unchangeable when the library is created. For example, if a pipeline only included pre-rasterization shader state, then any dynamic state value corresponding to depth or stencil testing has no effect. Any linked library that has dynamic state enabled that same dynamic state must also be enabled in all the other linked libraries to which that dynamic state applies.

##### Complete Graphics Pipelines

A complete graphics pipeline always includes pre-rasterization shader state, with other subsets included depending on that state as specified in the above sections.

##### Graphics Pipeline Library Layouts

If different subsets are linked together with pipeline layouts created with VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT, the final effective pipeline layout is effectively the union of the linked pipeline layouts. When binding descriptor sets for this pipeline, the pipeline layout used must be compatible with this union. This pipeline layout can be overridden when linking with VK_PIPELINE_CREATE_LINK_TIME_OPTIMIZATION_BIT_EXT by providing a VkPipelineLayout that is compatible with this union other than VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT, or when linking without VK_PIPELINE_CREATE_LINK_TIME_OPTIMIZATION_BIT_EXT by providing a VkPipelineLayout that is fully compatible with this union.

If the `pNext` chain includes a VkPipelineCreateFlags2CreateInfo structure, VkPipelineCreateFlags2CreateInfo::`flags` from that structure is used instead of `flags` from this structure.

Valid Usage

- VUID-VkGraphicsPipelineCreateInfo-None-09497
  If the `pNext` chain does not include a VkPipelineCreateFlags2CreateInfo structure, `flags` must be a valid combination of VkPipelineCreateFlagBits values

- VUID-VkGraphicsPipelineCreateInfo-flags-07984
  If `flags` contains the VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, and `basePipelineIndex` is -1, `basePipelineHandle` must be a valid graphics `VkPipeline` handle

- VUID-VkGraphicsPipelineCreateInfo-flags-07985
  If `flags` contains the VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, and `basePipelineHandle` is VK_NULL_HANDLE, `basePipelineIndex` must be a valid index into the calling command’s `pCreateInfos` parameter

- VUID-VkGraphicsPipelineCreateInfo-flags-07986
  If `flags` contains the VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, `basePipelineIndex` must be -1 or `basePipelineHandle` must be VK_NULL_HANDLE

- VUID-VkGraphicsPipelineCreateInfo-layout-07987
  If a push constant block is declared in a shader and `layout` is not VK_NULL_HANDLE, a push constant range in `layout` must match the shader stage

- VUID-VkGraphicsPipelineCreateInfo-layout-10069
  If a push constant block is declared in a shader and `layout` is not VK_NULL_HANDLE, the block must be contained inside the push constant range in `layout` that matches the stage

- VUID-VkGraphicsPipelineCreateInfo-layout-07988
  If a resource variable is declared in a shader and `layout` is not VK_NULL_HANDLE, the corresponding descriptor set in `layout` must match the shader stage

- VUID-VkGraphicsPipelineCreateInfo-layout-07990
  If a resource variable is declared in a shader, `layout` is not VK_NULL_HANDLE, and the descriptor type is not VK_DESCRIPTOR_TYPE_MUTABLE_EXT, the corresponding descriptor set in `layout` must match the descriptor type

- VUID-VkGraphicsPipelineCreateInfo-layout-07991
  If a resource variable is declared in a shader as an array and `layout` is not VK_NULL_HANDLE, the corresponding descriptor binding used to create `layout` must have a `descriptorCount` that is greater than or equal to the length of the array

- VUID-VkGraphicsPipelineCreateInfo-None-10391
  If a resource variables is declared in a shader as an array of descriptors, then the descriptor type of that variable must not be VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK

- VUID-VkGraphicsPipelineCreateInfo-flags-11798
  If shader64BitIndexing feature is not enabled, `flags` must not contain VK_PIPELINE_CREATE_2_64_BIT_INDEXING_BIT_EXT

- VUID-VkGraphicsPipelineCreateInfo-pipelineCreationCacheControl-02878
  If the `pipelineCreationCacheControl` feature is not enabled, `flags` must not include VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT nor VK_PIPELINE_CREATE_EARLY_RETURN_ON_FAILURE_BIT

- VUID-VkGraphicsPipelineCreateInfo-pipelineProtectedAccess-07368
  If the `pipelineProtectedAccess` feature is not enabled, `flags` must not include VK_PIPELINE_CREATE_NO_PROTECTED_ACCESS_BIT nor VK_PIPELINE_CREATE_PROTECTED_ACCESS_ONLY_BIT

- VUID-VkGraphicsPipelineCreateInfo-flags-07369
  `flags` must not include both VK_PIPELINE_CREATE_NO_PROTECTED_ACCESS_BIT and VK_PIPELINE_CREATE_PROTECTED_ACCESS_ONLY_BIT

- VUID-VkGraphicsPipelineCreateInfo-flags-11311
  If VkPipelineCreateFlags2CreateInfoKHR::`flags` includes VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT, `layout` must be VK_NULL_HANDLE

- VUID-VkGraphicsPipelineCreateInfo-flags-11312
  If VkPipelineCreateFlags2CreateInfoKHR::`flags` includes VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT, all shader variables in the shader resource interface with a `DescriptorSet` and `Binding` decoration must have a mapping declared in VkShaderDescriptorSetAndBindingMappingInfoEXT::`pMappings`

- VUID-VkGraphicsPipelineCreateInfo-stage-02096
  If the pipeline requires pre-rasterization shader state the `stage` member of one element of `pStages` must be VK_SHADER_STAGE_VERTEX_BIT or VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-VkGraphicsPipelineCreateInfo-pStages-02095
  If the pipeline requires pre-rasterization shader state the geometric shader stages provided in `pStages` must be either from the mesh shading pipeline (`stage` is VK_SHADER_STAGE_TASK_BIT_EXT or VK_SHADER_STAGE_MESH_BIT_EXT) or from the primitive shading pipeline (`stage` is VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT, or VK_SHADER_STAGE_GEOMETRY_BIT)

- VUID-VkGraphicsPipelineCreateInfo-pStages-09631
  If the pipeline requires pre-rasterization shader state and `pStages` contains both VK_SHADER_STAGE_TASK_BIT_EXT and VK_SHADER_STAGE_MESH_BIT_EXT, then the mesh shader’s entry point must not declare a variable with a `DrawIndex` `BuiltIn` decoration

- VUID-VkGraphicsPipelineCreateInfo-TaskNV-07063
  The shader stages for VK_SHADER_STAGE_TASK_BIT_EXT or VK_SHADER_STAGE_MESH_BIT_EXT must use either the `TaskNV` and `MeshNV` `Execution` `Model` or the `TaskEXT` and `MeshEXT` `Execution` `Model`, but must not use both

- VUID-VkGraphicsPipelineCreateInfo-pStages-00729
  If the pipeline requires pre-rasterization shader state and `pStages` includes a tessellation control shader stage, it must include a tessellation evaluation shader stage

- VUID-VkGraphicsPipelineCreateInfo-pStages-00730
  If the pipeline requires pre-rasterization shader state and `pStages` includes a tessellation evaluation shader stage, it must include a tessellation control shader stage

- VUID-VkGraphicsPipelineCreateInfo-pStages-09022
  If the pipeline requires pre-rasterization shader state and `pStages` includes a tessellation control shader stage, and the `VK_EXT_extended_dynamic_state3` extension is not enabled or the VK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT dynamic state is not set, `pTessellationState` must be a valid pointer to a valid VkPipelineTessellationStateCreateInfo structure

- VUID-VkGraphicsPipelineCreateInfo-pTessellationState-09023
  If `pTessellationState` is not `NULL` it must be a pointer to a valid VkPipelineTessellationStateCreateInfo structure

- VUID-VkGraphicsPipelineCreateInfo-pStages-00732
  If the pipeline requires pre-rasterization shader state and `pStages` includes tessellation shader stages, the shader code of at least one stage must contain an `OpExecutionMode` instruction specifying the type of subdivision in the pipeline

- VUID-VkGraphicsPipelineCreateInfo-pStages-00733
  If the pipeline requires pre-rasterization shader state and `pStages` includes tessellation shader stages, and the shader code of both stages contain an `OpExecutionMode` instruction specifying the type of subdivision in the pipeline, they must both specify the same subdivision mode

- VUID-VkGraphicsPipelineCreateInfo-pStages-00734
  If the pipeline requires pre-rasterization shader state and `pStages` includes tessellation shader stages, the shader code of at least one stage must contain an `OpExecutionMode` instruction specifying the output patch size in the pipeline

- VUID-VkGraphicsPipelineCreateInfo-pStages-00735
  If the pipeline requires pre-rasterization shader state and `pStages` includes tessellation shader stages, and the shader code of both contain an `OpExecutionMode` instruction specifying the out patch size in the pipeline, they must both specify the same patch size

- VUID-VkGraphicsPipelineCreateInfo-pStages-08888
  If the pipeline is being created with pre-rasterization shader state and vertex input state and `pStages` includes tessellation shader stages, and either VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY dynamic state is not enabled or `dynamicPrimitiveTopologyUnrestricted` is VK_FALSE, the `topology` member of `pInputAssembly` must be VK_PRIMITIVE_TOPOLOGY_PATCH_LIST

- VUID-VkGraphicsPipelineCreateInfo-topology-08889
  If the pipeline is being created with pre-rasterization shader state and vertex input state and the `topology` member of `pInputAssembly` is VK_PRIMITIVE_TOPOLOGY_PATCH_LIST, and either VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY dynamic state is not enabled or `dynamicPrimitiveTopologyUnrestricted` is VK_FALSE, then `pStages` must include tessellation shader stages

- VUID-VkGraphicsPipelineCreateInfo-TessellationEvaluation-07723
  If the pipeline is being created with a `TessellationEvaluation` `Execution` `Model`, no `Geometry` `Execution` `Model`, uses the `PointMode` `Execution` `Mode`, and the `shaderTessellationAndGeometryPointSize` feature is enabled, a `PointSize` decorated variable must be written to if the `maintenance5` feature is not enabled

- VUID-VkGraphicsPipelineCreateInfo-topology-08773
  If the pipeline is being created with a `Vertex` `Execution` `Model` and no `TessellationEvaluation` or `Geometry` `Execution` `Model`, and the `topology` member of `pInputAssembly` is VK_PRIMITIVE_TOPOLOGY_POINT_LIST, and either VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY dynamic state is not enabled or `dynamicPrimitiveTopologyUnrestricted` is VK_FALSE, a `PointSize` decorated variable must be written to if the `maintenance5` feature is not enabled

- VUID-VkGraphicsPipelineCreateInfo-TessellationEvaluation-07724
  If the pipeline is being created with a `TessellationEvaluation` `Execution` `Model`, no `Geometry` `Execution` `Model`, uses the `PointMode` `Execution` `Mode`, and the `shaderTessellationAndGeometryPointSize` feature is not enabled, a `PointSize` decorated variable must not be written to

- VUID-VkGraphicsPipelineCreateInfo-shaderTessellationAndGeometryPointSize-08776
  If the pipeline is being created with a `Geometry` `Execution` `Model`, uses the `OutputPoints` `Execution` `Mode`, and the `shaderTessellationAndGeometryPointSize` feature is enabled, a `PointSize` decorated variable must be written to for every vertex emitted if the `maintenance5` feature is not enabled

- VUID-VkGraphicsPipelineCreateInfo-Geometry-07726
  If the pipeline is being created with a `Geometry` `Execution` `Model`, uses the `OutputPoints` `Execution` `Mode`, and the `shaderTessellationAndGeometryPointSize` feature is not enabled, a `PointSize` decorated variable must not be written to

- VUID-VkGraphicsPipelineCreateInfo-pStages-00738
  If the pipeline requires pre-rasterization shader state and `pStages` includes a geometry shader stage, and does not include any tessellation shader stages, its shader code must contain an `OpExecutionMode` instruction specifying an input primitive type that is compatible with the primitive topology specified in `pInputAssembly`

- VUID-VkGraphicsPipelineCreateInfo-pStages-00739
  If the pipeline requires pre-rasterization shader state and `pStages` includes a geometry shader stage, and also includes tessellation shader stages, its shader code must contain an `OpExecutionMode` instruction specifying an input primitive type that is compatible with the primitive topology that is output by the tessellation stages

- VUID-VkGraphicsPipelineCreateInfo-pStages-00740
  If the pipeline requires pre-rasterization shader state and fragment shader state, it includes both a fragment shader and a geometry shader, and the fragment shader code reads from an input variable that is decorated with `PrimitiveId`, then the geometry shader code must write to a matching output variable, decorated with `PrimitiveId`, in all execution paths

- VUID-VkGraphicsPipelineCreateInfo-PrimitiveId-06264
  If the pipeline requires pre-rasterization shader state, it includes a mesh shader and the fragment shader code reads from an input variable that is decorated with `PrimitiveId`, then the mesh shader code must write to a matching output variable, decorated with `PrimitiveId`, in all execution paths

- VUID-VkGraphicsPipelineCreateInfo-renderPass-06038
  If `renderPass` is not VK_NULL_HANDLE and the pipeline is being created with fragment shader state the fragment shader must not read from any input attachment that is defined as VK_ATTACHMENT_UNUSED in `subpass`

- VUID-VkGraphicsPipelineCreateInfo-pStages-00742
  If the pipeline requires pre-rasterization shader state and multiple pre-rasterization shader stages are included in `pStages`, the shader code for the entry points identified by those `pStages` and the rest of the state identified by this structure must adhere to the pipeline linking rules described in the Shader Interfaces chapter

- VUID-VkGraphicsPipelineCreateInfo-None-04889
  If the pipeline requires pre-rasterization shader state and fragment shader state, the fragment shader and last pre-rasterization shader stage and any relevant state must adhere to the pipeline linking rules described in the Shader Interfaces chapter

- VUID-VkGraphicsPipelineCreateInfo-renderPass-06041
  If `renderPass` is not VK_NULL_HANDLE, and the pipeline is being created with fragment output interface state, then for each color attachment in the subpass, if the potential format features of the format of the corresponding attachment description do not contain VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT, then the `blendEnable` member of the corresponding element of the `pAttachments` member of `pColorBlendState` must be VK_FALSE

- VUID-VkGraphicsPipelineCreateInfo-renderPass-07609
  If `renderPass` is not VK_NULL_HANDLE, the pipeline is being created with fragment output interface state, the `pColorBlendState` pointer is not `NULL`, the `attachmentCount` member of `pColorBlendState` is not ignored, and the subpass uses color attachments, the `attachmentCount` member of `pColorBlendState` must be equal to the `colorAttachmentCount` used to create `subpass`

- VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-04130
  If the pipeline requires pre-rasterization shader state, and `pViewportState->pViewports` is not dynamic, then `pViewportState->pViewports` must be a valid pointer to an array of `pViewportState->viewportCount` valid `VkViewport` structures

- VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-04131
  If the pipeline requires pre-rasterization shader state, and `pViewportState->pScissors` is not dynamic, then `pViewportState->pScissors` must be a valid pointer to an array of `pViewportState->scissorCount` `VkRect2D` structures

- VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-00749
  If the pipeline requires pre-rasterization shader state, and the `wideLines` feature is not enabled, and no element of the `pDynamicStates` member of `pDynamicState` is VK_DYNAMIC_STATE_LINE_WIDTH, the `lineWidth` member of `pRasterizationState` must be `1.0`

- VUID-VkGraphicsPipelineCreateInfo-rasterizerDiscardEnable-09024
  If the pipeline requires pre-rasterization shader state, and the VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE dynamic state is enabled or the `rasterizerDiscardEnable` member of `pRasterizationState` is VK_FALSE, and related dynamic state is not set, `pViewportState` must be a valid pointer to a valid VkPipelineViewportStateCreateInfo structure

- VUID-VkGraphicsPipelineCreateInfo-pViewportState-09025
  If `pViewportState` is not `NULL` it must be a valid pointer to a valid VkPipelineViewportStateCreateInfo structure

- VUID-VkGraphicsPipelineCreateInfo-pMultisampleState-09026
  If the pipeline requires fragment output interface state, and the `VK_EXT_extended_dynamic_state3` extension is not enabled or any of the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT, VK_DYNAMIC_STATE_SAMPLE_MASK_EXT, or VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT dynamic states is not set, or the alphaToOne feature is enabled and VK_DYNAMIC_STATE_ALPHA_TO_ONE_ENABLE_EXT is not set, `pMultisampleState` must be a valid pointer to a valid VkPipelineMultisampleStateCreateInfo structure

- VUID-VkGraphicsPipelineCreateInfo-pMultisampleState-09027
  If `pMultisampleState` is not `NULL` it must be a valid pointer to a valid VkPipelineMultisampleStateCreateInfo structure

- VUID-VkGraphicsPipelineCreateInfo-alphaToCoverageEnable-08891
  If the pipeline is being created with fragment shader state, the VkPipelineMultisampleStateCreateInfo::`alphaToCoverageEnable` is not ignored and is VK_TRUE, then the Fragment Output Interface must contain a variable for the alpha `Component` word in `Location` 0 at `Index` 0

- VUID-VkGraphicsPipelineCreateInfo-renderPass-09028
  If `renderPass` is not VK_NULL_HANDLE, the pipeline is being created with fragment shader state, and `subpass` uses a depth/stencil attachment, and related dynamic state is not set, `pDepthStencilState` must be a valid pointer to a valid VkPipelineDepthStencilStateCreateInfo structure

- VUID-VkGraphicsPipelineCreateInfo-pDepthStencilState-09029
  If `pDepthStencilState` is not `NULL` it must be a valid pointer to a valid VkPipelineDepthStencilStateCreateInfo structure

- VUID-VkGraphicsPipelineCreateInfo-renderPass-09030
  If `renderPass` is not VK_NULL_HANDLE, the pipeline is being created with fragment output interface state, and `subpass` uses color attachments, and related dynamic state is not set, `pColorBlendState` must be a valid pointer to a valid VkPipelineColorBlendStateCreateInfo structure

- VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-00754
  If the pipeline requires pre-rasterization shader state, the `depthBiasClamp` feature is not enabled, no element of the `pDynamicStates` member of `pDynamicState` is VK_DYNAMIC_STATE_DEPTH_BIAS, and the `depthBiasEnable` member of `pRasterizationState` is VK_TRUE, the `depthBiasClamp` member of `pRasterizationState` must be `0.0`

- VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-02510
  If the pipeline requires fragment shader state, the `VK_EXT_depth_range_unrestricted` extension is not enabled and no element of the `pDynamicStates` member of `pDynamicState` is VK_DYNAMIC_STATE_DEPTH_BOUNDS, and the `depthBoundsTestEnable` member of `pDepthStencilState` is VK_TRUE, the `minDepthBounds` and `maxDepthBounds` members of `pDepthStencilState` must be between `0.0` and `1.0`, inclusive

- VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-10913
  If the pipeline requires fragment shader state, no element of the `pDynamicStates` member of `pDynamicState` is VK_DYNAMIC_STATE_DEPTH_BOUNDS, and `pDynamicStates` includes VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE or the `depthBoundsTestEnable` member of `pDepthStencilState` is VK_TRUE, `minDepthBounds` must be less than or equal to `maxDepthBounds`

- VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-07610
  If the pipeline requires fragment shader state or fragment output interface state, and `rasterizationSamples` and `sampleLocationsInfo` are not dynamic, and VkPipelineSampleLocationsStateCreateInfoEXT::`sampleLocationsEnable` included in the `pNext` chain of `pMultisampleState` is VK_TRUE, `sampleLocationsInfo.sampleLocationGridSize.width` must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.width` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling `rasterizationSamples`

- VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-07611
  If the pipeline requires fragment shader state or fragment output interface state, and `rasterizationSamples` and `sampleLocationsInfo` are not dynamic, and VkPipelineSampleLocationsStateCreateInfoEXT::`sampleLocationsEnable` the included in the `pNext` chain of `pMultisampleState` is VK_TRUE or VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT is used, `sampleLocationsInfo.sampleLocationGridSize.height` must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.height` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling `rasterizationSamples`

- VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-07612
  If the pipeline requires fragment shader state or fragment output interface state, and `rasterizationSamples` and `sampleLocationsInfo` are not dynamic, and VkPipelineSampleLocationsStateCreateInfoEXT::`sampleLocationsEnable` included in the `pNext` chain of `pMultisampleState` is VK_TRUE or VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT is used, `sampleLocationsInfo.sampleLocationsPerPixel` must equal `rasterizationSamples`

- VUID-VkGraphicsPipelineCreateInfo-sampleLocationsEnable-01524
  If the pipeline requires fragment shader state, and the `sampleLocationsEnable` member of a VkPipelineSampleLocationsStateCreateInfoEXT structure included in the `pNext` chain of `pMultisampleState` is VK_TRUE, the fragment shader code must not statically use the extended instruction `InterpolateAtSample`

- VUID-VkGraphicsPipelineCreateInfo-multisampledRenderToSingleSampled-06853
  If the pipeline requires fragment output interface state, the `multisampledRenderToSingleSampled` feature is not enabled, the `VK_AMD_mixed_attachment_samples` extension is not enabled, the `VK_NV_framebuffer_mixed_samples` extension is not enabled, `rasterizationSamples` is not dynamic, and `subpass` uses color and/or depth/stencil attachments, then the `rasterizationSamples` member of `pMultisampleState` must be the same as the sample count for those subpass attachments

- VUID-VkGraphicsPipelineCreateInfo-subpass-01505
  If the pipeline requires fragment output interface state, and the `VK_AMD_mixed_attachment_samples` extension is enabled, `rasterizationSamples` is not dynamic, and if `subpass` uses color and/or depth/stencil attachments, then the `rasterizationSamples` member of `pMultisampleState` must equal the maximum of the sample counts of those subpass attachments

- VUID-VkGraphicsPipelineCreateInfo-renderPass-06854
  If `renderPass` is not VK_NULL_HANDLE, the `multisampledRenderToSingleSampled` feature is not enabled, `rasterizationSamples` is not dynamic, and `subpass` has a VkMultisampledRenderToSingleSampledInfoEXT structure included in the VkSubpassDescription2::`pNext` chain with `multisampledRenderToSingleSampledEnable` equal to VK_TRUE, then the `rasterizationSamples` member of `pMultisampleState` must be equal to VkMultisampledRenderToSingleSampledInfoEXT::`rasterizationSamples`

- VUID-VkGraphicsPipelineCreateInfo-subpass-01411
  If the pipeline requires fragment output interface state, the `VK_NV_framebuffer_mixed_samples` extension is enabled, `rasterizationSamples` is not dynamic, and if `subpass` has a depth/stencil attachment and depth test, stencil test, or depth bounds test are enabled, then the `rasterizationSamples` member of `pMultisampleState` must be the same as the sample count of the depth/stencil attachment

- VUID-VkGraphicsPipelineCreateInfo-subpass-01412
  If the pipeline requires fragment output interface state, the `VK_NV_framebuffer_mixed_samples` extension is enabled, `rasterizationSamples` is not dynamic, and if `subpass` has any color attachments, then the `rasterizationSamples` member of `pMultisampleState` must be greater than or equal to the sample count for those subpass attachments

- VUID-VkGraphicsPipelineCreateInfo-coverageReductionMode-02722
  If the pipeline requires fragment output interface state, the `coverageReductionMode` feature is enabled, and `rasterizationSamples` is not dynamic, the coverage reduction mode specified by VkPipelineCoverageReductionStateCreateInfoNV::`coverageReductionMode`, the `rasterizationSamples` member of `pMultisampleState` and the sample counts for the color and depth/stencil attachments (if the subpass has them) must be a valid combination returned by `vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV`

- VUID-VkGraphicsPipelineCreateInfo-subpass-00758
  If the pipeline requires fragment output interface state, `rasterizationSamples` is not dynamic, and `subpass` does not use any color and/or depth/stencil attachments, then the `rasterizationSamples` member of `pMultisampleState` must follow the rules for a zero-attachment subpass

- VUID-VkGraphicsPipelineCreateInfo-renderPass-06046
  If `renderPass` is not VK_NULL_HANDLE, `subpass` must be a valid subpass within `renderPass`

- VUID-VkGraphicsPipelineCreateInfo-renderPass-06047
  If `renderPass` is not VK_NULL_HANDLE, the pipeline is being created with pre-rasterization shader state, `subpass` viewMask is not `0`, and `multiviewTessellationShader` is not enabled, then `pStages` must not include tessellation shaders

- VUID-VkGraphicsPipelineCreateInfo-renderPass-06048
  If `renderPass` is not VK_NULL_HANDLE, the pipeline is being created with pre-rasterization shader state, `subpass` viewMask is not `0`, and `multiviewGeometryShader` is not enabled, then `pStages` must not include a geometry shader

- VUID-VkGraphicsPipelineCreateInfo-renderPass-06050
  If `renderPass` is not VK_NULL_HANDLE and the pipeline is being created with pre-rasterization shader state, and `subpass` viewMask is not `0`, then all of the shaders in the pipeline must not include variables decorated with the `Layer` built-in decoration in their interfaces

- VUID-VkGraphicsPipelineCreateInfo-renderPass-07064
  If `renderPass` is not VK_NULL_HANDLE, the pipeline is being created with pre-rasterization shader state, `subpass` viewMask is not `0`, and `multiviewMeshShader` is not enabled, then `pStages` must not include a mesh shader

- VUID-VkGraphicsPipelineCreateInfo-renderPass-12325
  If `renderPass` is not VK_NULL_HANDLE, the pipeline is being created with pre-rasterization shader state, `pStages` include a mesh shader, and `subpass` viewMask is not `0`, then the index of the most significant bit in `viewMask` must be less than `maxMeshMultiviewViewCount`

- VUID-VkGraphicsPipelineCreateInfo-flags-00764
  `flags` must not contain the VK_PIPELINE_CREATE_DISPATCH_BASE_BIT flag

- VUID-VkGraphicsPipelineCreateInfo-pStages-01565
  If the pipeline requires fragment shader state and an input attachment was referenced by an `aspectMask` at `renderPass` creation time, the fragment shader must only read from the aspects that were specified for that input attachment

- VUID-VkGraphicsPipelineCreateInfo-layout-01688
  The number of resources in `layout` accessible to each shader stage that is used by the pipeline must be less than or equal to `VkPhysicalDeviceLimits`::`maxPerStageResources`

- VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-01715
  If the pipeline requires pre-rasterization shader state, and no element of the `pDynamicStates` member of `pDynamicState` is VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV, and the `viewportWScalingEnable` member of a VkPipelineViewportWScalingStateCreateInfoNV structure, included in the `pNext` chain of `pViewportState`, is VK_TRUE, the `pViewportWScalings` member of the VkPipelineViewportWScalingStateCreateInfoNV must be a pointer to an array of VkPipelineViewportWScalingStateCreateInfoNV::`viewportCount` valid VkViewportWScalingNV structures

- VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-04056
  If the pipeline requires pre-rasterization shader state, and no element of the `pDynamicStates` member of `pDynamicState` is VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_NV, and if `pViewportState->pNext` chain includes a VkPipelineViewportExclusiveScissorStateCreateInfoNV structure, and if its `exclusiveScissorCount` member is not `0`, then its `pExclusiveScissors` member must be a valid pointer to an array of `exclusiveScissorCount` VkRect2D structures

- VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-07854
  If VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_ENABLE_NV is included in the `pDynamicStates` array then the implementation must support at least `specVersion` `2` of the `VK_NV_scissor_exclusive` extension

- VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-04057
  If the pipeline requires pre-rasterization shader state, and no element of the `pDynamicStates` member of `pDynamicState` is VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV, and if `pViewportState->pNext` chain includes a VkPipelineViewportShadingRateImageStateCreateInfoNV structure, then its `pShadingRatePalettes` member must be a valid pointer to an array of `viewportCount` valid VkShadingRatePaletteNV structures

- VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-04058
  If the pipeline requires pre-rasterization shader state, and no element of the `pDynamicStates` member of `pDynamicState` is VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT, and if `pNext` chain includes a VkPipelineDiscardRectangleStateCreateInfoEXT structure, and if its `discardRectangleCount` member is not `0`, then its `pDiscardRectangles` member must be a valid pointer to an array of `discardRectangleCount` VkRect2D structures

- VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-07855
  If VK_DYNAMIC_STATE_DISCARD_RECTANGLE_ENABLE_EXT is included in the `pDynamicStates` array then the implementation must support at least `specVersion` `2` of the `VK_EXT_discard_rectangles` extension

- VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-07856
  If VK_DYNAMIC_STATE_DISCARD_RECTANGLE_MODE_EXT is included in the `pDynamicStates` array then the implementation must support at least `specVersion` `2` of the `VK_EXT_discard_rectangles` extension

- VUID-VkGraphicsPipelineCreateInfo-pStages-02097
  If the pipeline requires vertex input state, and `pVertexInputState` is not dynamic, then `pVertexInputState` must be a valid pointer to a valid VkPipelineVertexInputStateCreateInfo structure

- VUID-VkGraphicsPipelineCreateInfo-Input-07904
  If the `vertexAttributeRobustness` feature is not enabled, and the `maintenance9` feature is not enabled, and the pipeline is being created with vertex input state and `pVertexInputState` is not dynamic, then all variables with the `Input` storage class decorated with `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` must contain a location in VkVertexInputAttributeDescription::`location`

- VUID-VkGraphicsPipelineCreateInfo-Input-08733
  If the pipeline requires vertex input state and `pVertexInputState` is not dynamic, then the numeric type associated with all `Input` variables of the corresponding `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` must be the same as VkVertexInputAttributeDescription::`format`

- VUID-VkGraphicsPipelineCreateInfo-pVertexInputState-08929
  If the pipeline is being created with vertex input state and `pVertexInputState` is not dynamic, and VkVertexInputAttributeDescription::`format` has a 64-bit component, then the scalar width associated with all `Input` variables of the corresponding `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` must be 64-bit

- VUID-VkGraphicsPipelineCreateInfo-pVertexInputState-08930
  If the pipeline is being created with vertex input state and `pVertexInputState` is not dynamic, and the scalar width associated with a `Location` decorated `Input` variable in the `Vertex` `Execution` `Model` `OpEntryPoint` is 64-bit, then the corresponding VkVertexInputAttributeDescription::`format` must have a 64-bit component

- VUID-VkGraphicsPipelineCreateInfo-pVertexInputState-09198
  If the pipeline is being created with vertex input state and `pVertexInputState` is not dynamic, and VkVertexInputAttributeDescription::`format` has a 64-bit component, then all `Input` variables at the corresponding `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` must not use components that are not present in the format

- VUID-VkGraphicsPipelineCreateInfo-dynamicPrimitiveTopologyUnrestricted-09031
  If the pipeline requires vertex input state, and related dynamic state is not set, `pInputAssemblyState` must be a valid pointer to a valid VkPipelineInputAssemblyStateCreateInfo structure

- VUID-VkGraphicsPipelineCreateInfo-pInputAssemblyState-09032
  If `pInputAssemblyState` is not `NULL` it must be a valid pointer to a valid VkPipelineInputAssemblyStateCreateInfo structure

- VUID-VkGraphicsPipelineCreateInfo-pStages-02317
  If the pipeline requires pre-rasterization shader state, the `Xfb` execution mode can be specified by no more than one shader stage in `pStages`

- VUID-VkGraphicsPipelineCreateInfo-pStages-02318
  If the pipeline requires pre-rasterization shader state, and any shader stage in `pStages` specifies `Xfb` execution mode it must be the last pre-rasterization shader stage

- VUID-VkGraphicsPipelineCreateInfo-rasterizationStream-02319
  If the pipeline requires pre-rasterization shader state, and a VkPipelineRasterizationStateStreamCreateInfoEXT::`rasterizationStream` value other than zero is specified, all variables in the output interface of the entry point being compiled decorated with `Position`, `PointSize`, `ClipDistance`, or `CullDistance` must be decorated with identical `Stream` values that match the `rasterizationStream`

- VUID-VkGraphicsPipelineCreateInfo-rasterizationStream-02320
  If the pipeline requires pre-rasterization shader state, and VkPipelineRasterizationStateStreamCreateInfoEXT::`rasterizationStream` is zero, or not specified, all variables in the output interface of the entry point being compiled decorated with `Position`, `PointSize`, `ClipDistance`, or `CullDistance` must be decorated with a `Stream` value of zero, or must not specify the `Stream` decoration

- VUID-VkGraphicsPipelineCreateInfo-geometryStreams-02321
  If the pipeline requires pre-rasterization shader state, and the last pre-rasterization shader stage is a geometry shader, and that geometry shader uses the `GeometryStreams` capability, then `VkPhysicalDeviceTransformFeedbackFeaturesEXT`::`geometryStreams` feature must be enabled

- VUID-VkGraphicsPipelineCreateInfo-None-02322
  If the pipeline requires pre-rasterization shader state, and there are any mesh shader stages in the pipeline there must not be any shader stage in the pipeline with a `Xfb` execution mode

- VUID-VkGraphicsPipelineCreateInfo-lineRasterizationMode-02766
  If the pipeline requires pre-rasterization shader state and at least one of fragment output interface state or fragment shader state, and `pMultisampleState` is not `NULL`, the `lineRasterizationMode` member of a VkPipelineRasterizationLineStateCreateInfo structure included in the `pNext` chain of `pRasterizationState` is VK_LINE_RASTERIZATION_MODE_BRESENHAM or VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH, then the `alphaToCoverageEnable`, `alphaToOneEnable`, and `sampleShadingEnable` members of `pMultisampleState` must all be VK_FALSE

- VUID-VkGraphicsPipelineCreateInfo-stippledLineEnable-02767
  If the pipeline requires pre-rasterization shader state, the `stippledLineEnable` member of VkPipelineRasterizationLineStateCreateInfo is VK_TRUE, and no element of the `pDynamicStates` member of `pDynamicState` is VK_DYNAMIC_STATE_LINE_STIPPLE, then the `lineStippleFactor` member of VkPipelineRasterizationLineStateCreateInfo must be in the range [1,256]

- VUID-VkGraphicsPipelineCreateInfo-shaderMeshEnqueue-10187
  If the `shaderMeshEnqueue` feature is not enabled, shaders specified by `pStages` must not declare the `ShaderEnqueueAMDX` capability

- VUID-VkGraphicsPipelineCreateInfo-flags-10188
  If `flags` does not include VK_PIPELINE_CREATE_LIBRARY_BIT_KHR, shaders specified by `pStages` must not declare the `ShaderEnqueueAMDX` capability

- VUID-VkGraphicsPipelineCreateInfo-pStages-10189
  If any shader stages in `pStages` declare the `ShaderEnqueueAMDX` capability, VK_PIPELINE_CREATE_2_EXECUTION_GRAPH_BIT_AMDX and VK_PIPELINE_CREATE_2_LIBRARY_BIT_KHR must be included in `flags`

- VUID-VkGraphicsPipelineCreateInfo-flags-10190
  If VK_PIPELINE_CREATE_2_EXECUTION_GRAPH_BIT_AMDX is included in `flags`, and the pipeline requires pre-rasterization shader state, there must not be a task or vertex shader specified in `pStages`

- VUID-VkGraphicsPipelineCreateInfo-flags-10191
  If VK_PIPELINE_CREATE_2_EXECUTION_GRAPH_BIT_AMDX is included in `flags`, all elements of VkPipelineLibraryCreateInfoKHR::`pLibraries` must have been created with VK_PIPELINE_CREATE_2_EXECUTION_GRAPH_BIT_AMDX

- VUID-VkGraphicsPipelineCreateInfo-flags-03372
  `flags` must not include VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR

- VUID-VkGraphicsPipelineCreateInfo-flags-03373
  `flags` must not include VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR

- VUID-VkGraphicsPipelineCreateInfo-flags-03374
  `flags` must not include VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR

- VUID-VkGraphicsPipelineCreateInfo-flags-03375
  `flags` must not include VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR

- VUID-VkGraphicsPipelineCreateInfo-flags-03376
  `flags` must not include VK_PIPELINE_CREATE_RAY_TRACING_SKIP_TRIANGLES_BIT_KHR

- VUID-VkGraphicsPipelineCreateInfo-flags-03377
  `flags` must not include VK_PIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT_KHR

- VUID-VkGraphicsPipelineCreateInfo-flags-03577
  `flags` must not include VK_PIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR

- VUID-VkGraphicsPipelineCreateInfo-flags-04947
  `flags` must not include VK_PIPELINE_CREATE_RAY_TRACING_ALLOW_MOTION_BIT_NV

- VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-03378
  If the `extendedDynamicState` feature is not enabled, and the minimum value of VkApplicationInfo::`apiVersion` used to create the VkInstance and `apiVersion` supported by the physical device is less than Version 1.3 there must be no element of the `pDynamicStates` member of `pDynamicState` set to VK_DYNAMIC_STATE_CULL_MODE, VK_DYNAMIC_STATE_FRONT_FACE, VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY, VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT, VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT, VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE, VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE, VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE, VK_DYNAMIC_STATE_DEPTH_COMPARE_OP, VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE, VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE, or VK_DYNAMIC_STATE_STENCIL_OP

- VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-03379
  If the pipeline requires pre-rasterization shader state, and VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT is included in the `pDynamicStates` array then `viewportCount` must be zero

- VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-03380
  If the pipeline requires pre-rasterization shader state, and VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT is included in the `pDynamicStates` array then `scissorCount` must be zero

- VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-04132
  If the pipeline requires pre-rasterization shader state, and VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT is included in the `pDynamicStates` array then VK_DYNAMIC_STATE_VIEWPORT must not be present

- VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-04133
  If the pipeline requires pre-rasterization shader state, and VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT is included in the `pDynamicStates` array then VK_DYNAMIC_STATE_SCISSOR must not be present

- VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-07065
  If the pipeline requires pre-rasterization shader state, and includes a mesh shader, there must be no element of the `pDynamicStates` member of `pDynamicState` set to VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY, or VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE

- VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-04868
  If the `extendedDynamicState2` feature is not enabled, and the minimum value of VkApplicationInfo::`apiVersion` used to create the VkInstance and `apiVersion` supported by the physical device is less than Version 1.3 there must be no element of the `pDynamicStates` member of `pDynamicState` set to VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE, VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE, or VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE

- VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-04869
  If the `extendedDynamicState2LogicOp` feature is not enabled, there must be no element of the `pDynamicStates` member of `pDynamicState` set to VK_DYNAMIC_STATE_LOGIC_OP_EXT

- VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-04870
  If the `extendedDynamicState2PatchControlPoints` feature is not enabled, there must be no element of the `pDynamicStates` member of `pDynamicState` set to VK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT

- VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-07066
  If the pipeline requires pre-rasterization shader state, and includes a mesh shader, there must be no element of the `pDynamicStates` member of `pDynamicState` set to VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE, or VK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT

- VUID-VkGraphicsPipelineCreateInfo-flags-02877
  If `flags` includes VK_PIPELINE_CREATE_INDIRECT_BINDABLE_BIT_NV, then the `VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV`::`deviceGeneratedCommands` feature must be enabled

- VUID-VkGraphicsPipelineCreateInfo-flags-02966
  If the pipeline requires pre-rasterization shader state and `flags` includes VK_PIPELINE_CREATE_INDIRECT_BINDABLE_BIT_NV, then all stages must not specify `Xfb` execution mode

- VUID-VkGraphicsPipelineCreateInfo-libraryCount-06648
  If the pipeline is not created with a complete set of state, or VkPipelineLibraryCreateInfoKHR::`libraryCount` is not `0`, VkGraphicsPipelineShaderGroupsCreateInfoNV::`groupCount` and VkGraphicsPipelineShaderGroupsCreateInfoNV::`pipelineCount` must be `0`

- VUID-VkGraphicsPipelineCreateInfo-libraryCount-06649
  If the pipeline is created with a complete set of state, and VkPipelineLibraryCreateInfoKHR::`libraryCount` is `0`, and the `pNext` chain includes an instance of VkGraphicsPipelineShaderGroupsCreateInfoNV, VkGraphicsPipelineShaderGroupsCreateInfoNV::`groupCount` must be greater than `0`

- VUID-VkGraphicsPipelineCreateInfo-flags-11000
  If `flags` includes VK_PIPELINE_CREATE_2_INDIRECT_BINDABLE_BIT_EXT, then the `VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT`::`deviceGeneratedCommands` feature must be enabled

- VUID-VkGraphicsPipelineCreateInfo-flags-11001
  If the pipeline requires pre-rasterization shader state and `flags` includes VK_PIPELINE_CREATE_2_INDIRECT_BINDABLE_BIT_EXT, then all stages must not specify `Xfb` execution mode

- VUID-VkGraphicsPipelineCreateInfo-pDynamicState-04494
  If the pipeline requires pre-rasterization shader state or fragment shader state and VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in `pDynamicState->pDynamicStates`, VkPipelineFragmentShadingRateStateCreateInfoKHR::`fragmentSize.width` must be greater than or equal to `1`

- VUID-VkGraphicsPipelineCreateInfo-pDynamicState-04495
  If the pipeline requires pre-rasterization shader state or fragment shader state and VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in `pDynamicState->pDynamicStates`, VkPipelineFragmentShadingRateStateCreateInfoKHR::`fragmentSize.height` must be greater than or equal to `1`

- VUID-VkGraphicsPipelineCreateInfo-pDynamicState-04496
  If the pipeline requires pre-rasterization shader state or fragment shader state and VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in `pDynamicState->pDynamicStates`, VkPipelineFragmentShadingRateStateCreateInfoKHR::`fragmentSize.width` must be a power-of-two value

- VUID-VkGraphicsPipelineCreateInfo-pDynamicState-04497
  If the pipeline requires pre-rasterization shader state or fragment shader state and VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in `pDynamicState->pDynamicStates`, VkPipelineFragmentShadingRateStateCreateInfoKHR::`fragmentSize.height` must be a power-of-two value

- VUID-VkGraphicsPipelineCreateInfo-pDynamicState-04498
  If the pipeline requires pre-rasterization shader state or fragment shader state and VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in `pDynamicState->pDynamicStates`, VkPipelineFragmentShadingRateStateCreateInfoKHR::`fragmentSize.width` must be less than or equal to `4`

- VUID-VkGraphicsPipelineCreateInfo-pDynamicState-04499
  If the pipeline requires pre-rasterization shader state or fragment shader state and VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in `pDynamicState->pDynamicStates`, VkPipelineFragmentShadingRateStateCreateInfoKHR::`fragmentSize.height` must be less than or equal to `4`

- VUID-VkGraphicsPipelineCreateInfo-pDynamicState-04500
  If the pipeline requires pre-rasterization shader state or fragment shader state and VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in `pDynamicState->pDynamicStates`, and the `pipelineFragmentShadingRate` feature is not enabled, VkPipelineFragmentShadingRateStateCreateInfoKHR::`fragmentSize.width` and VkPipelineFragmentShadingRateStateCreateInfoKHR::`fragmentSize.height` must both be equal to `1`

- VUID-VkGraphicsPipelineCreateInfo-pDynamicState-06567
  If the pipeline requires pre-rasterization shader state or fragment shader state and VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in `pDynamicState->pDynamicStates`, VkPipelineFragmentShadingRateStateCreateInfoKHR::`combinerOps`[0] must be a valid VkFragmentShadingRateCombinerOpKHR value

- VUID-VkGraphicsPipelineCreateInfo-pDynamicState-06568
  If the pipeline requires pre-rasterization shader state or fragment shader state and VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in `pDynamicState->pDynamicStates`, VkPipelineFragmentShadingRateStateCreateInfoKHR::`combinerOps`[1] must be a valid VkFragmentShadingRateCombinerOpKHR value

- VUID-VkGraphicsPipelineCreateInfo-pDynamicState-04501
  If the pipeline requires pre-rasterization shader state or fragment shader state and VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in `pDynamicState->pDynamicStates`, and the `primitiveFragmentShadingRate` feature is not enabled, VkPipelineFragmentShadingRateStateCreateInfoKHR::`combinerOps`[0] must be VK_FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR

- VUID-VkGraphicsPipelineCreateInfo-pDynamicState-04502
  If the pipeline requires pre-rasterization shader state or fragment shader state and VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in `pDynamicState->pDynamicStates`, and the `attachmentFragmentShadingRate` feature is not enabled, VkPipelineFragmentShadingRateStateCreateInfoKHR::`combinerOps`[1] must be VK_FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR

- VUID-VkGraphicsPipelineCreateInfo-primitiveFragmentShadingRateWithMultipleViewports-04503
  If the pipeline requires pre-rasterization shader state and the `primitiveFragmentShadingRateWithMultipleViewports` limit is not supported, VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT is not included in `pDynamicState->pDynamicStates`, and VkPipelineViewportStateCreateInfo::`viewportCount` is greater than `1`, entry points specified in `pStages` must not write to the `PrimitiveShadingRateKHR` built-in

- VUID-VkGraphicsPipelineCreateInfo-primitiveFragmentShadingRateWithMultipleViewports-04504
  If the pipeline requires pre-rasterization shader state and the `primitiveFragmentShadingRateWithMultipleViewports` limit is not supported, and entry points specified in `pStages` write to the `ViewportIndex` built-in, they must not also write to the `PrimitiveShadingRateKHR` built-in

- VUID-VkGraphicsPipelineCreateInfo-primitiveFragmentShadingRateWithMultipleViewports-04505
  If the pipeline requires pre-rasterization shader state and the `primitiveFragmentShadingRateWithMultipleViewports` limit is not supported, and entry points specified in `pStages` write to the `ViewportMaskNV` built-in, they must not also write to the `PrimitiveShadingRateKHR` built-in

- VUID-VkGraphicsPipelineCreateInfo-fragmentShadingRateNonTrivialCombinerOps-04506
  If the pipeline requires pre-rasterization shader state or fragment shader state, the `fragmentShadingRateNonTrivialCombinerOps` limit is not supported, and VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in `pDynamicState->pDynamicStates`, elements of VkPipelineFragmentShadingRateStateCreateInfoKHR::`combinerOps` must be VK_FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR or VK_FRAGMENT_SHADING_RATE_COMBINER_OP_REPLACE_KHR

- VUID-VkGraphicsPipelineCreateInfo-None-06569
  If the pipeline requires fragment shader state and VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in `pDynamicState->pDynamicStates`, VkPipelineFragmentShadingRateEnumStateCreateInfoNV::`shadingRateType` must be a valid VkFragmentShadingRateTypeNV value

- VUID-VkGraphicsPipelineCreateInfo-pDynamicState-06570
  If the pipeline requires fragment shader state and VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in `pDynamicState->pDynamicStates`, VkPipelineFragmentShadingRateEnumStateCreateInfoNV::`shadingRate` must be a valid VkFragmentShadingRateNV value

- VUID-VkGraphicsPipelineCreateInfo-pDynamicState-06571
  If the pipeline requires fragment shader state and VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in `pDynamicState->pDynamicStates`, VkPipelineFragmentShadingRateEnumStateCreateInfoNV::`combinerOps`[0] must be a valid VkFragmentShadingRateCombinerOpKHR value

- VUID-VkGraphicsPipelineCreateInfo-pDynamicState-06572
  If the pipeline requires fragment shader state and VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in `pDynamicState->pDynamicStates`, VkPipelineFragmentShadingRateEnumStateCreateInfoNV::`combinerOps`[1] must be a valid VkFragmentShadingRateCombinerOpKHR value

- VUID-VkGraphicsPipelineCreateInfo-pDynamicState-04569
  If the pipeline requires fragment shader state and VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in `pDynamicState->pDynamicStates`, and the `fragmentShadingRateEnums` feature is not enabled, VkPipelineFragmentShadingRateEnumStateCreateInfoNV::`shadingRateType` must be equal to VK_FRAGMENT_SHADING_RATE_TYPE_FRAGMENT_SIZE_NV

- VUID-VkGraphicsPipelineCreateInfo-pDynamicState-04570
  If the pipeline requires fragment shader state and VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in `pDynamicState->pDynamicStates`, and the `pipelineFragmentShadingRate` feature is not enabled, VkPipelineFragmentShadingRateEnumStateCreateInfoNV::`shadingRate` must be equal to VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_PIXEL_NV

- VUID-VkGraphicsPipelineCreateInfo-pDynamicState-04571
  If the pipeline requires fragment shader state and VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in `pDynamicState->pDynamicStates`, and the `primitiveFragmentShadingRate` feature is not enabled, VkPipelineFragmentShadingRateEnumStateCreateInfoNV::`combinerOps`[0] must be VK_FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR

- VUID-VkGraphicsPipelineCreateInfo-pDynamicState-04572
  If the pipeline requires fragment shader state and VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in `pDynamicState->pDynamicStates`, and the `attachmentFragmentShadingRate` feature is not enabled, VkPipelineFragmentShadingRateEnumStateCreateInfoNV::`combinerOps`[1] must be VK_FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR

- VUID-VkGraphicsPipelineCreateInfo-fragmentShadingRateNonTrivialCombinerOps-04573
  If the pipeline requires fragment shader state, and the `fragmentShadingRateNonTrivialCombinerOps` limit is not supported and VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in `pDynamicState->pDynamicStates`, elements of VkPipelineFragmentShadingRateEnumStateCreateInfoNV::`combinerOps` must be VK_FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR or VK_FRAGMENT_SHADING_RATE_COMBINER_OP_REPLACE_KHR

- VUID-VkGraphicsPipelineCreateInfo-None-04574
  If the pipeline requires fragment shader state, and the `supersampleFragmentShadingRates` feature is not enabled, VkPipelineFragmentShadingRateEnumStateCreateInfoNV::`shadingRate` must not be equal to VK_FRAGMENT_SHADING_RATE_2_INVOCATIONS_PER_PIXEL_NV, VK_FRAGMENT_SHADING_RATE_4_INVOCATIONS_PER_PIXEL_NV, VK_FRAGMENT_SHADING_RATE_8_INVOCATIONS_PER_PIXEL_NV, or VK_FRAGMENT_SHADING_RATE_16_INVOCATIONS_PER_PIXEL_NV

- VUID-VkGraphicsPipelineCreateInfo-None-04575
  If the pipeline requires fragment shader state, and the `noInvocationFragmentShadingRates` feature is not enabled, VkPipelineFragmentShadingRateEnumStateCreateInfoNV::`shadingRate` must not be equal to VK_FRAGMENT_SHADING_RATE_NO_INVOCATIONS_NV

- VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-03578
  All elements of the `pDynamicStates` member of `pDynamicState` must not be VK_DYNAMIC_STATE_RAY_TRACING_PIPELINE_STACK_SIZE_KHR

- VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-04807
  If the pipeline requires pre-rasterization shader state and the `vertexInputDynamicState` feature is not enabled, there must be no element of the `pDynamicStates` member of `pDynamicState` set to VK_DYNAMIC_STATE_VERTEX_INPUT_EXT

- VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-07067
  If the pipeline requires pre-rasterization shader state, and includes a mesh shader, there must be no element of the `pDynamicStates` member of `pDynamicState` set to VK_DYNAMIC_STATE_VERTEX_INPUT_EXT

- VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-04800
  If the `colorWriteEnable` feature is not enabled, there must be no element of the `pDynamicStates` member of `pDynamicState` set to VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT

- VUID-VkGraphicsPipelineCreateInfo-rasterizationSamples-04899
  If the pipeline requires fragment shader state, and the `VK_QCOM_render_pass_shader_resolve` extension or the `customResolve` feature is enabled, `rasterizationSamples` is not dynamic, and if subpass has any input attachments, and if the subpass description contains VK_SUBPASS_DESCRIPTION_FRAGMENT_REGION_BIT_EXT, then the sample count of the input attachments must equal `rasterizationSamples`

- VUID-VkGraphicsPipelineCreateInfo-sampleShadingEnable-04900
  If the pipeline requires fragment shader state, and the `VK_QCOM_render_pass_shader_resolve` extension or the `customResolve` feature is enabled, and if the subpass description contains VK_SUBPASS_DESCRIPTION_FRAGMENT_REGION_BIT_EXT, then `sampleShadingEnable` must be false

- VUID-VkGraphicsPipelineCreateInfo-dynamicRendering-06576
  If the `dynamicRendering` feature is not enabled and the pipeline requires pre-rasterization shader state, fragment shader state, or fragment output interface state, `renderPass` must not be VK_NULL_HANDLE

- VUID-VkGraphicsPipelineCreateInfo-pNext-12427
  If VkPipelineRenderingCreateInfo is included in the `pNext` chain, then `renderPass` must be VK_NULL_HANDLE

- VUID-VkGraphicsPipelineCreateInfo-multiview-06577
  If the `multiview` feature is not enabled, the pipeline requires pre-rasterization shader state or fragment shader state, and `renderPass` is VK_NULL_HANDLE, VkPipelineRenderingCreateInfo::`viewMask` must be `0`

- VUID-VkGraphicsPipelineCreateInfo-renderPass-06578
  If the pipeline requires pre-rasterization shader state or fragment shader state, and `renderPass` is VK_NULL_HANDLE, the index of the most significant bit in VkPipelineRenderingCreateInfo::`viewMask` must be less than `maxMultiviewViewCount`

- VUID-VkGraphicsPipelineCreateInfo-renderPass-06579
  If the pipeline requires fragment output interface state, and `renderPass` is VK_NULL_HANDLE, and VkPipelineRenderingCreateInfo::`colorAttachmentCount` is not 0, VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` must be a valid pointer to an array of `colorAttachmentCount` valid VkFormat values

- VUID-VkGraphicsPipelineCreateInfo-renderPass-06580
  If the pipeline requires fragment output interface state, and `renderPass` is VK_NULL_HANDLE, each element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` must be a valid VkFormat value

- VUID-VkGraphicsPipelineCreateInfo-renderPass-06582
  If the pipeline requires fragment output interface state, `renderPass` is VK_NULL_HANDLE, and any element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` is not VK_FORMAT_UNDEFINED, that format must be a format with potential format features that include VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT or VK_FORMAT_FEATURE_2_LINEAR_COLOR_ATTACHMENT_BIT_NV

- VUID-VkGraphicsPipelineCreateInfo-renderPass-06583
  If the pipeline requires fragment output interface state, and `renderPass` is VK_NULL_HANDLE, VkPipelineRenderingCreateInfo::`depthAttachmentFormat` must be a valid VkFormat value

- VUID-VkGraphicsPipelineCreateInfo-renderPass-06584
  If the pipeline requires fragment output interface state, and `renderPass` is VK_NULL_HANDLE, VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` must be a valid VkFormat value

- VUID-VkGraphicsPipelineCreateInfo-renderPass-06585
  If the pipeline requires fragment output interface state, `renderPass` is VK_NULL_HANDLE, and VkPipelineRenderingCreateInfo::`depthAttachmentFormat` is not VK_FORMAT_UNDEFINED, it must be a format with potential format features that include VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT

- VUID-VkGraphicsPipelineCreateInfo-renderPass-06586
  If the pipeline requires fragment output interface state, `renderPass` is VK_NULL_HANDLE, and VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` is not VK_FORMAT_UNDEFINED, it must be a format with potential format features that include VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT

- VUID-VkGraphicsPipelineCreateInfo-renderPass-06587
  If the pipeline requires fragment output interface state, `renderPass` is VK_NULL_HANDLE, and VkPipelineRenderingCreateInfo::`depthAttachmentFormat` is not VK_FORMAT_UNDEFINED, it must be a format that includes a depth component

- VUID-VkGraphicsPipelineCreateInfo-renderPass-06588
  If the pipeline requires fragment output interface state, `renderPass` is VK_NULL_HANDLE, and VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` is not VK_FORMAT_UNDEFINED, it must be a format that includes a stencil component

- VUID-VkGraphicsPipelineCreateInfo-renderPass-06589
  If the pipeline requires fragment output interface state, `renderPass` is VK_NULL_HANDLE, VkPipelineRenderingCreateInfo::`depthAttachmentFormat` is not VK_FORMAT_UNDEFINED, and VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` is not VK_FORMAT_UNDEFINED, `depthAttachmentFormat` must equal `stencilAttachmentFormat`

- VUID-VkGraphicsPipelineCreateInfo-renderPass-09033
  If `renderPass` is VK_NULL_HANDLE, the pipeline is being created with fragment shader state and fragment output interface state, and either of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` or VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` are not VK_FORMAT_UNDEFINED, and the `VK_EXT_extended_dynamic_state3` extension is not enabled or any of the VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE, VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE, VK_DYNAMIC_STATE_DEPTH_COMPARE_OP, VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE, VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE, VK_DYNAMIC_STATE_STENCIL_OP, or VK_DYNAMIC_STATE_DEPTH_BOUNDS dynamic states are not set, `pDepthStencilState` must be a valid pointer to a valid VkPipelineDepthStencilStateCreateInfo structure

- VUID-VkGraphicsPipelineCreateInfo-pDepthStencilState-09034
  If `pDepthStencilState` is not `NULL` it must be a valid pointer to a valid VkPipelineDepthStencilStateCreateInfo structure

- VUID-VkGraphicsPipelineCreateInfo-renderPass-09035
  If `renderPass` is VK_NULL_HANDLE and the pipeline is being created with fragment shader state but not fragment output interface state, and the `VK_EXT_extended_dynamic_state3` extension is not enabled, or any of the VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE, VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE, VK_DYNAMIC_STATE_DEPTH_COMPARE_OP, VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE, VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE, VK_DYNAMIC_STATE_STENCIL_OP, or VK_DYNAMIC_STATE_DEPTH_BOUNDS dynamic states are not set, `pDepthStencilState` must be a valid pointer to a valid VkPipelineDepthStencilStateCreateInfo structure

- VUID-VkGraphicsPipelineCreateInfo-pDepthStencilState-09036
  If `pDepthStencilState` is not `NULL` it must be a valid pointer to a valid VkPipelineDepthStencilStateCreateInfo structure

- VUID-VkGraphicsPipelineCreateInfo-renderPass-09037
  If `renderPass` is VK_NULL_HANDLE, the pipeline is being created with fragment output interface state, and any element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` is not VK_FORMAT_UNDEFINED, and the `VK_EXT_extended_dynamic_state3` extension is not enabled, or any of the VK_DYNAMIC_STATE_LOGIC_OP_ENABLE_EXT, VK_DYNAMIC_STATE_LOGIC_OP_EXT, VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT, VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT, VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT, or VK_DYNAMIC_STATE_BLEND_CONSTANTS dynamic states are not set, `pColorBlendState` must be a valid pointer to a valid VkPipelineColorBlendStateCreateInfo structure

- VUID-VkGraphicsPipelineCreateInfo-pColorBlendState-09038
  If `pColorBlendState` is not `NULL` it must be a valid pointer to a valid VkPipelineColorBlendStateCreateInfo structure

- VUID-VkGraphicsPipelineCreateInfo-renderPass-06055
  If `renderPass` is VK_NULL_HANDLE, `pColorBlendState` is not dynamic, and the pipeline is being created with fragment output interface state, `pColorBlendState->attachmentCount` must be equal to VkPipelineRenderingCreateInfo::`colorAttachmentCount`

- VUID-VkGraphicsPipelineCreateInfo-renderPass-11504
  If `renderPass` is VK_NULL_HANDLE, a VkCustomResolveCreateInfoEXT is in the pNext chain, and the pipeline is being created with fragment output interface state, VkPipelineRenderingCreateInfo::`colorAttachmentCount` must be equal to VkCustomResolveCreateInfoEXT::`colorAttachmentCount`

- VUID-VkGraphicsPipelineCreateInfo-renderPass-06057
  If `renderPass` is VK_NULL_HANDLE, the pipeline is being created with pre-rasterization shader state, VkPipelineRenderingCreateInfo::`viewMask` is not `0`, and the `multiviewTessellationShader` feature is not enabled, then `pStages` must not include tessellation shaders

- VUID-VkGraphicsPipelineCreateInfo-renderPass-06058
  If `renderPass` is VK_NULL_HANDLE, the pipeline is being created with pre-rasterization shader state, VkPipelineRenderingCreateInfo::`viewMask` is not `0`, and the `multiviewGeometryShader` feature is not enabled, then `pStages` must not include a geometry shader

- VUID-VkGraphicsPipelineCreateInfo-renderPass-06059
  If `renderPass` is VK_NULL_HANDLE, the pipeline is being created with pre-rasterization shader state, and VkPipelineRenderingCreateInfo::`viewMask` is not `0`, all of the shaders in the pipeline must not include variables decorated with the `Layer` built-in decoration in their interfaces

- VUID-VkGraphicsPipelineCreateInfo-renderPass-07720
  If `renderPass` is VK_NULL_HANDLE, the pipeline is being created with pre-rasterization shader state, and VkPipelineRenderingCreateInfo::`viewMask` is not `0`, and `multiviewMeshShader` is not enabled, then `pStages` must not include a mesh shader

- VUID-VkGraphicsPipelineCreateInfo-renderPass-12326
  If `renderPass` is VK_NULL_HANDLE, the pipeline is being created with pre-rasterization shader state, `pStages` include a mesh shader, and VkPipelineRenderingCreateInfo::`viewMask` is not `0`, then the index of the most significant bit in `viewMask` must be less than `maxMeshMultiviewViewCount`

- VUID-VkGraphicsPipelineCreateInfo-renderPass-06061
  If the `dynamicRenderingLocalRead` feature is not enabled, the pipeline requires fragment shader state, and `renderPass` is VK_NULL_HANDLE, fragment shaders in `pStages` must not include the `InputAttachment` capability

- VUID-VkGraphicsPipelineCreateInfo-renderPass-08710
  If the pipeline requires fragment shader state and `renderPass` is not VK_NULL_HANDLE, fragment shaders in `pStages` must not include any of the `TileImageColorReadAccessEXT`, `TileImageDepthReadAccessEXT`, or `TileImageStencilReadAccessEXT` capabilities

- VUID-VkGraphicsPipelineCreateInfo-renderPass-06062
  If the pipeline requires fragment output interface state and `renderPass` is VK_NULL_HANDLE, for each color attachment format defined by the `pColorAttachmentFormats` member of VkPipelineRenderingCreateInfo, if its potential format features do not contain VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT, then the `blendEnable` member of the corresponding element of the `pAttachments` member of `pColorBlendState` must be VK_FALSE

- VUID-VkGraphicsPipelineCreateInfo-renderPass-06063
  If the pipeline requires fragment output interface state and `renderPass` is VK_NULL_HANDLE, if the `pNext` chain includes VkAttachmentSampleCountInfoAMD or `VkAttachmentSampleCountInfoNV`, the `colorAttachmentCount` member of that structure must be equal to the value of VkPipelineRenderingCreateInfo::`colorAttachmentCount`

- VUID-VkGraphicsPipelineCreateInfo-flags-06591
  If `pStages` includes a fragment shader stage, and the fragment shader declares the `EarlyFragmentTests` execution mode, the `flags` member of VkPipelineDepthStencilStateCreateInfo must not include VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_EXT or VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_EXT

- VUID-VkGraphicsPipelineCreateInfo-flags-06482
  If the `dynamicRenderingLocalRead` feature is not enabled, the pipeline requires fragment output interface state, and the `flags` member of VkPipelineColorBlendStateCreateInfo includes VK_PIPELINE_COLOR_BLEND_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_BIT_EXT, `renderPass` must not be VK_NULL_HANDLE

- VUID-VkGraphicsPipelineCreateInfo-None-09526
  If the `dynamicRenderingLocalRead` feature is not enabled, the pipeline requires fragment output interface state, and the `flags` member of VkPipelineDepthStencilStateCreateInfo includes VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_EXT or VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_EXT, `renderPass` must not be VK_NULL_HANDLE

- VUID-VkGraphicsPipelineCreateInfo-pColorAttachmentSamples-06592
  If the fragment output interface state, elements of the `pColorAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV must be valid VkSampleCountFlagBits values

- VUID-VkGraphicsPipelineCreateInfo-depthStencilAttachmentSamples-06593
  If the fragment output interface state and the `depthStencilAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV is not 0, it must be a valid VkSampleCountFlagBits value

- VUID-VkGraphicsPipelineCreateInfo-renderPass-09527
  If the pipeline requires fragment output interface state, `renderPass` is not VK_NULL_HANDLE, and the `flags` member of VkPipelineColorBlendStateCreateInfo includes VK_PIPELINE_COLOR_BLEND_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_BIT_EXT `subpass` must have been created with VK_SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_COLOR_ACCESS_BIT_EXT

- VUID-VkGraphicsPipelineCreateInfo-renderPass-09528
  If the pipeline requires fragment shader state, `renderPass` is not VK_NULL_HANDLE, and the `flags` member of VkPipelineDepthStencilStateCreateInfo includes VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_EXT, `subpass` must have been created with VK_SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_EXT

- VUID-VkGraphicsPipelineCreateInfo-renderPass-09529
  If the pipeline requires fragment shader state, `renderPass` is not VK_NULL_HANDLE, and the `flags` member of VkPipelineDepthStencilStateCreateInfo includes VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_EXT, `subpass` must have been created with VK_SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_EXT

- VUID-VkGraphicsPipelineCreateInfo-pipelineStageCreationFeedbackCount-06594
  If VkPipelineCreationFeedbackCreateInfo::`pipelineStageCreationFeedbackCount` is not `0`, it must be equal to `stageCount`

- VUID-VkGraphicsPipelineCreateInfo-renderPass-06595
  If `renderPass` is VK_NULL_HANDLE, the pipeline is being created with pre-rasterization shader state or fragment shader state, and VkMultiviewPerViewAttributesInfoNVX::`perViewAttributesPositionXOnly` is VK_TRUE then VkMultiviewPerViewAttributesInfoNVX::`perViewAttributes` must also be VK_TRUE

- VUID-VkGraphicsPipelineCreateInfo-flags-06596
  If VkGraphicsPipelineLibraryCreateInfoEXT::`flags` includes only one of VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT or VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, and an element of VkPipelineLibraryCreateInfoKHR::`pLibraries` includes the other flag, the value of VkMultiviewPerViewAttributesInfoNVX::`perViewAttributes` specified in both this pipeline and the library must be equal

- VUID-VkGraphicsPipelineCreateInfo-pLibraries-06597
  If one element of VkPipelineLibraryCreateInfoKHR::`pLibraries` includes VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT and another element includes VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, the value of VkMultiviewPerViewAttributesInfoNVX::`perViewAttributes` specified in both libraries must be equal

- VUID-VkGraphicsPipelineCreateInfo-flags-06598
  If VkGraphicsPipelineLibraryCreateInfoEXT::`flags` includes only one of VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT or VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, and an element of VkPipelineLibraryCreateInfoKHR::`pLibraries` includes the other flag, the value of VkMultiviewPerViewAttributesInfoNVX::`perViewAttributesPositionXOnly` specified in both this pipeline and the library must be equal

- VUID-VkGraphicsPipelineCreateInfo-pLibraries-06599
  If one element of VkPipelineLibraryCreateInfoKHR::`pLibraries` includes VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT and another element includes VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, the value of VkMultiviewPerViewAttributesInfoNVX::`perViewAttributesPositionXOnly` specified in both libraries must be equal

- VUID-VkGraphicsPipelineCreateInfo-pStages-06600
  If the pipeline requires pre-rasterization shader state or fragment shader state, `pStages` must be a valid pointer to an array of `stageCount` valid VkPipelineShaderStageCreateInfo structures

- VUID-VkGraphicsPipelineCreateInfo-stageCount-09587
  If the pipeline does not require pre-rasterization shader state or fragment shader state, `stageCount` must be zero

- VUID-VkGraphicsPipelineCreateInfo-pRasterizationState-06601
  If the pipeline requires pre-rasterization shader state, and related dynamic state is not set, `pRasterizationState` must be a valid pointer to a valid VkPipelineRasterizationStateCreateInfo structure

- VUID-VkGraphicsPipelineCreateInfo-pRasterizationState-09039
  If VkGraphicsPipelineLibraryCreateInfoEXT::`flags` includes VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT, and related dynamic state is not set, then `pMultisampleState` must be a valid pointer to a valid VkPipelineMultisampleStateCreateInfo structure

- VUID-VkGraphicsPipelineCreateInfo-pRasterizationState-09040
  If `pRasterizationState` is not `NULL` it must be a valid pointer to a valid VkPipelineRasterizationStateCreateInfo structure

- VUID-VkGraphicsPipelineCreateInfo-layout-06602
  If the pipeline requires fragment shader state or pre-rasterization shader state, and VkPipelineCreateFlags2CreateInfoKHR::`flags` does not include VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT, `layout` must be a valid VkPipelineLayout handle

- VUID-VkGraphicsPipelineCreateInfo-renderPass-06603
  If the pipeline requires pre-rasterization shader state, fragment shader state, or fragment output state, and `renderPass` is not VK_NULL_HANDLE, `renderPass` must be a valid VkRenderPass handle

- VUID-VkGraphicsPipelineCreateInfo-stageCount-09530
  If the pipeline requires pre-rasterization shader state, `stageCount` must be greater than `0`

- VUID-VkGraphicsPipelineCreateInfo-graphicsPipelineLibrary-06606
  If the `graphicsPipelineLibrary` feature is not enabled, and if the `shaderMeshEnqueue` feature is not enabled, `flags` must not include VK_PIPELINE_CREATE_LIBRARY_BIT_KHR

- VUID-VkGraphicsPipelineCreateInfo-flags-06608
  If the `shaderMeshEnqueue` feature is not enabled, and the pipeline is being created with all possible state subsets, `flags` must not include VK_PIPELINE_CREATE_LIBRARY_BIT_KHR

- VUID-VkGraphicsPipelineCreateInfo-flags-06609
  If `flags` includes VK_PIPELINE_CREATE_LINK_TIME_OPTIMIZATION_BIT_EXT, pipeline libraries included via VkPipelineLibraryCreateInfoKHR must have been created with VK_PIPELINE_CREATE_RETAIN_LINK_TIME_OPTIMIZATION_INFO_BIT_EXT

- VUID-VkGraphicsPipelineCreateInfo-flags-09245
  If `flags` includes VK_PIPELINE_CREATE_RETAIN_LINK_TIME_OPTIMIZATION_INFO_BIT_EXT, `flags` must also include VK_PIPELINE_CREATE_LIBRARY_BIT_KHR

- VUID-VkGraphicsPipelineCreateInfo-flags-06610
  If `flags` includes VK_PIPELINE_CREATE_RETAIN_LINK_TIME_OPTIMIZATION_INFO_BIT_EXT, pipeline libraries included via VkPipelineLibraryCreateInfoKHR must have been created with VK_PIPELINE_CREATE_RETAIN_LINK_TIME_OPTIMIZATION_INFO_BIT_EXT

- VUID-VkGraphicsPipelineCreateInfo-pLibraries-06611
  Any pipeline libraries included via VkPipelineLibraryCreateInfoKHR::`pLibraries` must not include any state subset already defined by this structure or defined by any other pipeline library in VkPipelineLibraryCreateInfoKHR::`pLibraries`

- VUID-VkGraphicsPipelineCreateInfo-flags-06612
  If VkPipelineCreateFlags2CreateInfoKHR::`flags` does not include VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT, VkGraphicsPipelineLibraryCreateInfoEXT::`flags` includes only one of VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT or VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, and an element of VkPipelineLibraryCreateInfoKHR::`pLibraries` includes the other flag, and `layout` was not created with VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT, then the `layout` used by this pipeline and the library must be identically defined

- VUID-VkGraphicsPipelineCreateInfo-pLibraries-06613
  If VkPipelineCreateFlags2CreateInfoKHR::`flags` does not include VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT, one element of VkPipelineLibraryCreateInfoKHR::`pLibraries` includes VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT and another element includes VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, and the `layout` specified by either library was not created with VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT, then the `layout` used by each library must be identically defined

- VUID-VkGraphicsPipelineCreateInfo-flags-06614
  If VkPipelineCreateFlags2CreateInfoKHR::`flags` does not include VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT, VkGraphicsPipelineLibraryCreateInfoEXT::`flags` includes only one of VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT or VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, an element of VkPipelineLibraryCreateInfoKHR::`pLibraries` includes the other subset, and `layout` was created with VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT, then the `layout` used by the library must also have been created with VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT

- VUID-VkGraphicsPipelineCreateInfo-pLibraries-06615
  If VkPipelineCreateFlags2CreateInfoKHR::`flags` does not include VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT, one element of VkPipelineLibraryCreateInfoKHR::`pLibraries` includes VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT and another element includes VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, and the `layout` specified by either library was created with VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT, then the `layout` used by both libraries must have been created with VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT

- VUID-VkGraphicsPipelineCreateInfo-flags-06616
  If VkPipelineCreateFlags2CreateInfoKHR::`flags` does not include VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT, VkGraphicsPipelineLibraryCreateInfoEXT::`flags` includes only one of VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT or VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, an element of VkPipelineLibraryCreateInfoKHR::`pLibraries` includes the other subset, and `layout` was created with VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT, elements of the `pSetLayouts` array which `layout` was created with that are not VK_NULL_HANDLE must be identically defined to the element at the same index of `pSetLayouts` used to create the library’s `layout`

- VUID-VkGraphicsPipelineCreateInfo-pLibraries-06617
  If VkPipelineCreateFlags2CreateInfoKHR::`flags` does not include VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT, one element of VkPipelineLibraryCreateInfoKHR::`pLibraries` includes VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT and another element includes VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, and the `layout` specified by either library was created with VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT, elements of the `pSetLayouts` array which either `layout` was created with that are not VK_NULL_HANDLE must be identically defined to the element at the same index of `pSetLayouts` used to create the other library’s `layout`

- VUID-VkGraphicsPipelineCreateInfo-flags-06618
  If VkPipelineCreateFlags2CreateInfoKHR::`flags` does not include VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT, VkGraphicsPipelineLibraryCreateInfoEXT::`flags` includes only one of VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT or VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, and an element of VkPipelineLibraryCreateInfoKHR::`pLibraries` includes the other flag, any descriptor set layout N specified by `layout` in both this pipeline and the library which include bindings accessed by shader stages in each must be identically defined

- VUID-VkGraphicsPipelineCreateInfo-pLibraries-06619
  If VkPipelineCreateFlags2CreateInfoKHR::`flags` does not include VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT, one element of VkPipelineLibraryCreateInfoKHR::`pLibraries` includes VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT and another element includes VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, any descriptor set layout N specified by `layout` in both libraries which include bindings accessed by shader stages in each must be identically defined

- VUID-VkGraphicsPipelineCreateInfo-flags-06620
  If VkPipelineCreateFlags2CreateInfoKHR::`flags` does not include VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT, VkGraphicsPipelineLibraryCreateInfoEXT::`flags` includes only one of VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT or VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, and an element of VkPipelineLibraryCreateInfoKHR::`pLibraries` includes the other flag, push constants specified in `layout` in both this pipeline and the library which are available to shader stages in each must be identically defined

- VUID-VkGraphicsPipelineCreateInfo-pLibraries-06621
  If VkPipelineCreateFlags2CreateInfoKHR::`flags` does not include VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT, and one element of VkPipelineLibraryCreateInfoKHR::`pLibraries` includes VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT and another element includes VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, push constants specified in `layout` in both this pipeline and the library which are available to shader stages in each must be identically defined

- VUID-VkGraphicsPipelineCreateInfo-flags-06679
  If VkPipelineCreateFlags2CreateInfoKHR::`flags` does not include VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT, and VkGraphicsPipelineLibraryCreateInfoEXT::`flags` includes only one of VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT or VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, an element of VkPipelineLibraryCreateInfoKHR::`pLibraries` includes the other subset, VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT was not used, and any element of the `pSetLayouts` array when `layout` was created and the corresponding element of the `pSetLayouts` array used to create the library’s `layout` must not both be VK_NULL_HANDLE

- VUID-VkGraphicsPipelineCreateInfo-pLibraries-06681
  If VkPipelineCreateFlags2CreateInfoKHR::`flags` does not include VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT, one element of VkPipelineLibraryCreateInfoKHR::`pLibraries` includes VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT and another element includes VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT was not used, and any element of the `pSetLayouts` array used to create each library’s `layout` was VK_NULL_HANDLE, then the corresponding element of the `pSetLayouts` array used to create the other library’s `layout` must not be VK_NULL_HANDLE

- VUID-VkGraphicsPipelineCreateInfo-flags-06756
  If VkPipelineCreateFlags2CreateInfoKHR::`flags` does not include VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT, VkGraphicsPipelineLibraryCreateInfoEXT::`flags` includes only one of VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT or VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, an element of VkPipelineLibraryCreateInfoKHR::`pLibraries` includes the other subset, and any element of the `pSetLayouts` array which `layout` was created with was VK_NULL_HANDLE, then the corresponding element of the `pSetLayouts` array used to create the library’s `layout` must not have shader bindings for shaders in the other subset

- VUID-VkGraphicsPipelineCreateInfo-flags-06757
  If VkPipelineCreateFlags2CreateInfoKHR::`flags` does not include VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT, VkGraphicsPipelineLibraryCreateInfoEXT::`flags` includes only one of VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT or VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, an element of VkPipelineLibraryCreateInfoKHR::`pLibraries` includes the other subset, and any element of the `pSetLayouts` array used to create the library’s `layout` was VK_NULL_HANDLE, then the corresponding element of the `pSetLayouts` array used to create this pipeline’s `layout` must not have shader bindings for shaders in the other subset

- VUID-VkGraphicsPipelineCreateInfo-pLibraries-06758
  If VkPipelineCreateFlags2CreateInfoKHR::`flags` does not include VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT, one element of VkPipelineLibraryCreateInfoKHR::`pLibraries` includes VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT and another element includes VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, and any element of the `pSetLayouts` array used to create each library’s `layout` was VK_NULL_HANDLE, then the corresponding element of the `pSetLayouts` array used to create the other library’s `layout` must not have shader bindings for shaders in the other subset

- VUID-VkGraphicsPipelineCreateInfo-flags-06682
  If VkPipelineCreateFlags2CreateInfoKHR::`flags` does not include VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT, and VkGraphicsPipelineLibraryCreateInfoEXT::`flags` includes both VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT and VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, `layout` must have been created with no elements of the `pSetLayouts` array set to VK_NULL_HANDLE

- VUID-VkGraphicsPipelineCreateInfo-flags-06683
  If VkPipelineCreateFlags2CreateInfoKHR::`flags` does not include VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT, VkGraphicsPipelineLibraryCreateInfoEXT::`flags` includes VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT, and `pRasterizationState->rasterizerDiscardEnable` is VK_TRUE, `layout` must have been created with no elements of the `pSetLayouts` array set to VK_NULL_HANDLE

- VUID-VkGraphicsPipelineCreateInfo-flags-06684
  If VkGraphicsPipelineLibraryCreateInfoEXT::`flags` includes at least one of and no more than two of VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT, VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, or VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT, and an element of VkPipelineLibraryCreateInfoKHR::`pLibraries` includes one of the other flags, the value of `subpass` must be equal to that used to create the library

- VUID-VkGraphicsPipelineCreateInfo-pLibraries-06623
  If one element of VkPipelineLibraryCreateInfoKHR::`pLibraries` includes at least one of and no more than two of VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT, VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, or VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT, and another element of VkPipelineLibraryCreateInfoKHR::`pLibraries` includes one of the other flags, the value of `subpass` used to create each library must be identical

- VUID-VkGraphicsPipelineCreateInfo-renderpass-06624
  If `renderpass` is not VK_NULL_HANDLE, VkGraphicsPipelineLibraryCreateInfoEXT::`flags` includes at least one of and no more than two of VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT, VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, or VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT, and an element of VkPipelineLibraryCreateInfoKHR::`pLibraries` includes one of the other flags, `renderPass` must be compatible with that used to create the library

- VUID-VkGraphicsPipelineCreateInfo-renderpass-06625
  If `renderpass` is VK_NULL_HANDLE, VkGraphicsPipelineLibraryCreateInfoEXT::`flags` includes at least one of and no more than two of VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT, VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, or VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT, and an element of VkPipelineLibraryCreateInfoKHR::`pLibraries` includes one of the other flags, the value of `renderPass` used to create that library must also be VK_NULL_HANDLE

- VUID-VkGraphicsPipelineCreateInfo-flags-06626
  If VkGraphicsPipelineLibraryCreateInfoEXT::`flags` includes either VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT or VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, and the other element is included in VkPipelineLibraryCreateInfoKHR::`pLibraries`, and `renderPass` is VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`viewMask` used by this pipeline and that specified by the library must be identical

- VUID-VkGraphicsPipelineCreateInfo-pLibraries-06627
  If VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT and VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT are included in two elements of VkPipelineLibraryCreateInfoKHR::`pLibraries`, and `renderPass` was VK_NULL_HANDLE for both libraries, the value of VkPipelineRenderingCreateInfo::`viewMask` set by each library must be identical

- VUID-VkGraphicsPipelineCreateInfo-pLibraries-06628
  If one element of VkPipelineLibraryCreateInfoKHR::`pLibraries` includes at least one of and no more than two of VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT, VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, or VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT, and another element of VkPipelineLibraryCreateInfoKHR::`pLibraries` includes one of the other flags, the `renderPass` objects used to create each library must be compatible or all equal to VK_NULL_HANDLE

- VUID-VkGraphicsPipelineCreateInfo-renderpass-06631
  If `renderPass` is not VK_NULL_HANDLE, the pipeline requires fragment shader state, and the `VK_EXT_extended_dynamic_state3` extension is not enabled or any of the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT, VK_DYNAMIC_STATE_SAMPLE_MASK_EXT, or VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT dynamic states is not set, or the alphaToOne feature is enabled and VK_DYNAMIC_STATE_ALPHA_TO_ONE_ENABLE_EXT is not set, then `pMultisampleState` must be a valid pointer to a valid VkPipelineMultisampleStateCreateInfo structure

- VUID-VkGraphicsPipelineCreateInfo-Input-06632
  If the pipeline requires fragment shader state with a fragment shader that either enables sample shading or decorates any variable in the `Input` storage class with `Sample`, and the `VK_EXT_extended_dynamic_state3` extension is not enabled or any of the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT, VK_DYNAMIC_STATE_SAMPLE_MASK_EXT, or VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT dynamic states is not set, or the alphaToOne feature is enabled and VK_DYNAMIC_STATE_ALPHA_TO_ONE_ENABLE_EXT is not set, then `pMultisampleState` must be a valid pointer to a valid VkPipelineMultisampleStateCreateInfo structure

- VUID-VkGraphicsPipelineCreateInfo-flags-11856
  If VkGraphicsPipelineLibraryCreateInfoEXT::`flags` includes either VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT or VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, VkCustomResolveCreateInfoEXT is included and VkCustomResolveCreateInfoEXT::`customResolve` is VK_TRUE, and an element of VkPipelineLibraryCreateInfoKHR::`pLibraries` also includes either VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT or VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, the library must also include VkCustomResolveCreateInfoEXT and the VkCustomResolveCreateInfoEXT::`customResolve` specified by the library must be VK_TRUE

- VUID-VkGraphicsPipelineCreateInfo-flags-11857
  If VkGraphicsPipelineLibraryCreateInfoEXT::`flags` includes either VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT or VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, VkCustomResolveCreateInfoEXT is not included or VkCustomResolveCreateInfoEXT::`customResolve` is VK_FALSE, and an element of VkPipelineLibraryCreateInfoKHR::`pLibraries` also includes either VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT or VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, either the library must not include VkCustomResolveCreateInfoEXT or the VkCustomResolveCreateInfoEXT::`customResolve` specified by the library must be VK_FALSE

- VUID-VkGraphicsPipelineCreateInfo-customResolve-11858
  If one element of VkPipelineLibraryCreateInfoKHR includes either VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT or VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, VkCustomResolveCreateInfoEXT is included and VkCustomResolveCreateInfoEXT::`customResolve` is VK_TRUE, and another element of VkPipelineLibraryCreateInfoKHR::`pLibraries` also includes either VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT or VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, the other library must also include VkCustomResolveCreateInfoEXT and the VkCustomResolveCreateInfoEXT::`customResolve` specified by the library must be VK_TRUE

- VUID-VkGraphicsPipelineCreateInfo-customResolve-11859
  If one element of VkPipelineLibraryCreateInfoKHR includes either VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT or VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, VkCustomResolveCreateInfoEXT is not included or VkCustomResolveCreateInfoEXT::`customResolve` is VK_FALSE, and another element of VkPipelineLibraryCreateInfoKHR::`pLibraries` also includes either VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT or VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, either the other library must not include VkCustomResolveCreateInfoEXT or the VkCustomResolveCreateInfoEXT::`customResolve` specified by the library must be VK_FALSE

- VUID-VkGraphicsPipelineCreateInfo-flags-06633
  If VkGraphicsPipelineLibraryCreateInfoEXT::`flags` includes VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT with a `pMultisampleState` that was not `NULL`, and an element of VkPipelineLibraryCreateInfoKHR::`pLibraries` was created with VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT, `pMultisampleState` must be identically defined to that used to create the library

- VUID-VkGraphicsPipelineCreateInfo-pLibraries-06634
  If an element of VkPipelineLibraryCreateInfoKHR::`pLibraries` was created with VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT with a `pMultisampleState` that was not `NULL`, and if VkGraphicsPipelineLibraryCreateInfoEXT::`flags` includes VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT, `pMultisampleState` must be identically defined to that used to create the library

- VUID-VkGraphicsPipelineCreateInfo-pLibraries-06635
  If one element of VkPipelineLibraryCreateInfoKHR::`pLibraries` was created with VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT with a `pMultisampleState` that was not `NULL`, and if a different element of VkPipelineLibraryCreateInfoKHR::`pLibraries` was created with VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT, the `pMultisampleState` used to create each library must be identically defined

- VUID-VkGraphicsPipelineCreateInfo-pLibraries-06636
  If one element of VkPipelineLibraryCreateInfoKHR::`pLibraries` was created with VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT and a value of `pMultisampleState->sampleShadingEnable` equal VK_TRUE, and if a different element of VkPipelineLibraryCreateInfoKHR::`pLibraries` was created with VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, the `pMultisampleState` used to create each library must be identically defined

- VUID-VkGraphicsPipelineCreateInfo-flags-06637
  If VkGraphicsPipelineLibraryCreateInfoEXT::`flags` includes VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT, `pMultisampleState->sampleShadingEnable` is VK_TRUE, and an element of VkPipelineLibraryCreateInfoKHR::`pLibraries` was created with VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, `pMultisampleState` must be identically defined to that used to create the library

- VUID-VkGraphicsPipelineCreateInfo-pLibraries-09567
  If one element of VkPipelineLibraryCreateInfoKHR::`pLibraries` was created with VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT and a value of `pMultisampleState->sampleShadingEnable` equal VK_TRUE, and if VkGraphicsPipelineLibraryCreateInfoEXT::`flags` includes VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, `pMultisampleState` must be identically defined to that used to create the library

- VUID-VkGraphicsPipelineCreateInfo-flags-06638
  If VkGraphicsPipelineLibraryCreateInfoEXT::`flags` includes only one of VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT or VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, and an element of VkPipelineLibraryCreateInfoKHR::`pLibraries` includes the other flag, values specified in VkPipelineFragmentShadingRateStateCreateInfoKHR for both this pipeline and that library must be identical

- VUID-VkGraphicsPipelineCreateInfo-pLibraries-06639
  If one element of VkPipelineLibraryCreateInfoKHR::`pLibraries` includes VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT and another element includes VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, values specified in VkPipelineFragmentShadingRateStateCreateInfoKHR for both this pipeline and that library must be identical

- VUID-VkGraphicsPipelineCreateInfo-flags-06640
  If VkGraphicsPipelineLibraryCreateInfoEXT::`flags` includes VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT or VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, `pStages` must be a valid pointer to an array of `stageCount` valid VkPipelineShaderStageCreateInfo structures

- VUID-VkGraphicsPipelineCreateInfo-flags-06642
  If VkPipelineCreateFlags2CreateInfoKHR::`flags` does not include VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT, VkGraphicsPipelineLibraryCreateInfoEXT::`flags` includes VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT or VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, `layout` must be a valid VkPipelineLayout handle

- VUID-VkGraphicsPipelineCreateInfo-flags-06643
  If VkGraphicsPipelineLibraryCreateInfoEXT::`flags` includes VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT, or VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT, and `renderPass` is not VK_NULL_HANDLE, `renderPass` must be a valid VkRenderPass handle

- VUID-VkGraphicsPipelineCreateInfo-flags-06644
  If VkGraphicsPipelineLibraryCreateInfoEXT::`flags` includes VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT or VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, `stageCount` must be greater than `0`

- VUID-VkGraphicsPipelineCreateInfo-flags-06645
  If VkGraphicsPipelineLibraryCreateInfoEXT::`flags` is non-zero, if `flags` includes VK_PIPELINE_CREATE_CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR, any libraries must have also been created with VK_PIPELINE_CREATE_CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR

- VUID-VkGraphicsPipelineCreateInfo-pLibraries-06646
  If VkPipelineLibraryCreateInfoKHR::`pLibraries` includes more than one library, and any library was created with VK_PIPELINE_CREATE_CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR, all libraries must have also been created with VK_PIPELINE_CREATE_CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR

- VUID-VkGraphicsPipelineCreateInfo-pLibraries-06647
  If VkPipelineLibraryCreateInfoKHR::`pLibraries` includes at least one library, VkGraphicsPipelineLibraryCreateInfoEXT::`flags` is non-zero, and any library was created with VK_PIPELINE_CREATE_CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR, `flags` must include VK_PIPELINE_CREATE_CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR

- VUID-VkGraphicsPipelineCreateInfo-None-07826
  If VkPipelineCreateFlags2CreateInfoKHR::`flags` does not include VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT, the pipeline includes a complete set of state, and there are no libraries included in VkPipelineLibraryCreateInfoKHR::`pLibraries`, then VkPipelineLayout must be a valid pipeline layout

- VUID-VkGraphicsPipelineCreateInfo-layout-07827
  If VkPipelineCreateFlags2CreateInfoKHR::`flags` does not include VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT, the pipeline includes a complete set of state specified entirely by libraries, and each library was created with a VkPipelineLayout created without VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT, then `layout` must be compatible with the layouts in those libraries

- VUID-VkGraphicsPipelineCreateInfo-flags-06729
  If VkPipelineCreateFlags2CreateInfoKHR::`flags` does not include VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT, `flags` includes VK_PIPELINE_CREATE_LINK_TIME_OPTIMIZATION_BIT_EXT, the pipeline includes a complete set of state specified entirely by libraries, and each library was created with a VkPipelineLayout created with VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT, then `layout` must be compatible with the union of the libraries' pipeline layouts other than the inclusion/exclusion of VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT

- VUID-VkGraphicsPipelineCreateInfo-flags-06730
  If VkPipelineCreateFlags2CreateInfoKHR::`flags` does not include VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT, `flags` does not include VK_PIPELINE_CREATE_LINK_TIME_OPTIMIZATION_BIT_EXT, the pipeline includes a complete set of state specified entirely by libraries, and each library was created with a VkPipelineLayout created with VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT, then `layout` must be compatible with the union of the libraries' pipeline layouts

- VUID-VkGraphicsPipelineCreateInfo-conservativePointAndLineRasterization-08892
  If `conservativePointAndLineRasterization` is not supported and the effective rasterization input topology is in line or point topology class, then VkPipelineRasterizationConservativeStateCreateInfoEXT::`conservativeRasterizationMode` must be VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT

- VUID-VkGraphicsPipelineCreateInfo-pStages-06894
  If the pipeline requires pre-rasterization shader state but not fragment shader state, elements of `pStages` must not have `stage` set to VK_SHADER_STAGE_FRAGMENT_BIT

- VUID-VkGraphicsPipelineCreateInfo-pStages-06895
  If the pipeline requires fragment shader state but not pre-rasterization shader state, elements of `pStages` must not have `stage` set to a shader stage which participates in pre-rasterization

- VUID-VkGraphicsPipelineCreateInfo-pStages-06896
  If the pipeline requires pre-rasterization shader state, all elements of `pStages` must have a `stage` set to a shader stage which participates in fragment shader state or pre-rasterization shader state

- VUID-VkGraphicsPipelineCreateInfo-stage-06897
  If the pipeline requires fragment shader state and/or pre-rasterization shader state, any value of `stage` must not be set in more than one element of `pStages`

- VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3TessellationDomainOrigin-07370
  If the `extendedDynamicState3TessellationDomainOrigin` feature is not enabled, there must be no element of the `pDynamicStates` member of `pDynamicState` set to VK_DYNAMIC_STATE_TESSELLATION_DOMAIN_ORIGIN_EXT

- VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3DepthClampEnable-07371
  If the `extendedDynamicState3DepthClampEnable` feature is not enabled, there must be no element of the `pDynamicStates` member of `pDynamicState` set to VK_DYNAMIC_STATE_DEPTH_CLAMP_ENABLE_EXT

- VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3PolygonMode-07372
  If the `extendedDynamicState3PolygonMode` feature is not enabled, there must be no element of the `pDynamicStates` member of `pDynamicState` set to VK_DYNAMIC_STATE_POLYGON_MODE_EXT

- VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3RasterizationSamples-07373
  If the `extendedDynamicState3RasterizationSamples` feature is not enabled, there must be no element of the `pDynamicStates` member of `pDynamicState` set to VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT

- VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3SampleMask-07374
  If the `extendedDynamicState3SampleMask` feature is not enabled, there must be no element of the `pDynamicStates` member of `pDynamicState` set to VK_DYNAMIC_STATE_SAMPLE_MASK_EXT

- VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3AlphaToCoverageEnable-07375
  If the `extendedDynamicState3AlphaToCoverageEnable` feature is not enabled, there must be no element of the `pDynamicStates` member of `pDynamicState` set to VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT

- VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3AlphaToOneEnable-07376
  If the `extendedDynamicState3AlphaToOneEnable` feature is not enabled, there must be no element of the `pDynamicStates` member of `pDynamicState` set to VK_DYNAMIC_STATE_ALPHA_TO_ONE_ENABLE_EXT

- VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3LogicOpEnable-07377
  If the `extendedDynamicState3LogicOpEnable` feature is not enabled, there must be no element of the `pDynamicStates` member of `pDynamicState` set to VK_DYNAMIC_STATE_LOGIC_OP_ENABLE_EXT

- VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3ColorBlendEnable-07378
  If the `extendedDynamicState3ColorBlendEnable` feature is not enabled, there must be no element of the `pDynamicStates` member of `pDynamicState` set to VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT

- VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3ColorBlendEquation-07379
  If the `extendedDynamicState3ColorBlendEquation` feature is not enabled, there must be no element of the `pDynamicStates` member of `pDynamicState` set to VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT

- VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3ColorWriteMask-07380
  If the `extendedDynamicState3ColorWriteMask` feature is not enabled, there must be no element of the `pDynamicStates` member of `pDynamicState` set to VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT

- VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3RasterizationStream-07381
  If the `extendedDynamicState3RasterizationStream` feature is not enabled, there must be no element of the `pDynamicStates` member of `pDynamicState` set to VK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXT

- VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3ConservativeRasterizationMode-07382
  If the `extendedDynamicState3ConservativeRasterizationMode` feature is not enabled, there must be no element of the `pDynamicStates` member of `pDynamicState` set to VK_DYNAMIC_STATE_CONSERVATIVE_RASTERIZATION_MODE_EXT

- VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3ExtraPrimitiveOverestimationSize-07383
  If the `extendedDynamicState3ExtraPrimitiveOverestimationSize` feature is not enabled, there must be no element of the `pDynamicStates` member of `pDynamicState` set to VK_DYNAMIC_STATE_EXTRA_PRIMITIVE_OVERESTIMATION_SIZE_EXT

- VUID-VkGraphicsPipelineCreateInfo-pDynamicState-09639
  If the pipeline requires pre-rasterization shader state, `pDynamicState` includes VK_DYNAMIC_STATE_CONSERVATIVE_RASTERIZATION_MODE_EXT, and `pDynamicState` does not include VK_DYNAMIC_STATE_EXTRA_PRIMITIVE_OVERESTIMATION_SIZE_EXT, `pRasterizationState` must include a VkPipelineRasterizationConservativeStateCreateInfoEXT in its `pNext` chain

- VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3DepthClipEnable-07384
  If the `extendedDynamicState3DepthClipEnable` feature is not enabled, there must be no element of the `pDynamicStates` member of `pDynamicState` set to VK_DYNAMIC_STATE_DEPTH_CLIP_ENABLE_EXT

- VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3SampleLocationsEnable-07385
  If the `extendedDynamicState3SampleLocationsEnable` feature is not enabled, there must be no element of the `pDynamicStates` member of `pDynamicState` set to VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT

- VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3ColorBlendAdvanced-07386
  If the `extendedDynamicState3ColorBlendAdvanced` feature is not enabled, there must be no element of the `pDynamicStates` member of `pDynamicState` set to VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT

- VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3ProvokingVertexMode-07387
  If the `extendedDynamicState3ProvokingVertexMode` feature is not enabled, there must be no element of the `pDynamicStates` member of `pDynamicState` set to VK_DYNAMIC_STATE_PROVOKING_VERTEX_MODE_EXT

- VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3LineRasterizationMode-07388
  If the `extendedDynamicState3LineRasterizationMode` feature is not enabled, there must be no element of the `pDynamicStates` member of `pDynamicState` set to VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT

- VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3LineStippleEnable-07389
  If the `extendedDynamicState3LineStippleEnable` feature is not enabled, there must be no element of the `pDynamicStates` member of `pDynamicState` set to VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT

- VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3DepthClipNegativeOneToOne-07390
  If the `extendedDynamicState3DepthClipNegativeOneToOne` feature is not enabled, there must be no element of the `pDynamicStates` member of `pDynamicState` set to VK_DYNAMIC_STATE_DEPTH_CLIP_NEGATIVE_ONE_TO_ONE_EXT

- VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3ViewportWScalingEnable-07391
  If the `extendedDynamicState3ViewportWScalingEnable` feature is not enabled, there must be no element of the `pDynamicStates` member of `pDynamicState` set to VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_ENABLE_NV

- VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3ViewportSwizzle-07392
  If the `extendedDynamicState3ViewportSwizzle` feature is not enabled, there must be no element of the `pDynamicStates` member of `pDynamicState` set to VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV

- VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3CoverageToColorEnable-07393
  If the `extendedDynamicState3CoverageToColorEnable` feature is not enabled, there must be no element of the `pDynamicStates` member of `pDynamicState` set to VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV

- VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3CoverageToColorLocation-07394
  If the `extendedDynamicState3CoverageToColorLocation` feature is not enabled, there must be no element of the `pDynamicStates` member of `pDynamicState` set to VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_LOCATION_NV

- VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3CoverageModulationMode-07395
  If the `extendedDynamicState3CoverageModulationMode` feature is not enabled, there must be no element of the `pDynamicStates` member of `pDynamicState` set to VK_DYNAMIC_STATE_COVERAGE_MODULATION_MODE_NV

- VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3CoverageModulationTableEnable-07396
  If the `extendedDynamicState3CoverageModulationTableEnable` feature is not enabled, there must be no element of the `pDynamicStates` member of `pDynamicState` set to VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NV

- VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3CoverageModulationTable-07397
  If the `extendedDynamicState3CoverageModulationTable` feature is not enabled, there must be no element of the `pDynamicStates` member of `pDynamicState` set to VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_NV

- VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3CoverageReductionMode-07398
  If the `extendedDynamicState3CoverageReductionMode` feature is not enabled, there must be no element of the `pDynamicStates` member of `pDynamicState` set to VK_DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV

- VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3RepresentativeFragmentTestEnable-07399
  If the `extendedDynamicState3RepresentativeFragmentTestEnable` feature is not enabled, there must be no element of the `pDynamicStates` member of `pDynamicState` set to VK_DYNAMIC_STATE_REPRESENTATIVE_FRAGMENT_TEST_ENABLE_NV

- VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3ShadingRateImageEnable-07400
  If the `extendedDynamicState3ShadingRateImageEnable` feature is not enabled, there must be no element of the `pDynamicStates` member of `pDynamicState` set to VK_DYNAMIC_STATE_SHADING_RATE_IMAGE_ENABLE_NV

- VUID-VkGraphicsPipelineCreateInfo-flags-07401
  `flags` must not include VK_PIPELINE_CREATE_RAY_TRACING_OPACITY_MICROMAP_BIT_KHR

- VUID-VkGraphicsPipelineCreateInfo-pLibraries-11594
  If `flags` includes VK_PIPELINE_CREATE_2_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_KHR, each element of VkPipelineLibraryCreateInfoKHR::`pLibraries` must have been created with the VK_PIPELINE_CREATE_2_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_KHR bit set

- VUID-VkGraphicsPipelineCreateInfo-flags-11595
  If the `VkPhysicalDeviceOpacityMicromapFeaturesKHR`::`micromap` feature is not enabled, `flags` must not include VK_PIPELINE_CREATE_2_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_KHR

- VUID-VkGraphicsPipelineCreateInfo-flags-07997
  `flags` must not include VK_PIPELINE_CREATE_RAY_TRACING_DISPLACEMENT_MICROMAP_BIT_NV

- VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-07730
  If the `multiviewPerViewViewports` feature is enabled, `renderpass` is not VK_NULL_HANDLE, the pipeline requires pre-rasterization shader state, and no element of the `pDynamicStates` member of `pDynamicState` is VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT, then the index of the most significant bit in each element of VkRenderPassMultiviewCreateInfo::`pViewMasks` must be less than `pViewportState->viewportCount`

- VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-07731
  If the `multiviewPerViewViewports` feature is enabled, `renderpass` is not VK_NULL_HANDLE, the pipeline requires pre-rasterization shader state, and no element of the `pDynamicStates` member of `pDynamicState` is VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT, then the index of the most significant bit in each element of VkRenderPassMultiviewCreateInfo::`pViewMasks` must be less than `pViewportState->scissorCount`

- VUID-VkGraphicsPipelineCreateInfo-multiviewPerViewViewports-12249
  If the `multiviewPerViewViewports` feature is enabled, `renderpass` is VK_NULL_HANDLE, the pipeline requires pre-rasterization shader state, and no element of the `pDynamicStates` member of `pDynamicState` is VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT, then the index of the most significant bit in VkPipelineRenderingCreateInfo::`viewMask` must be less than `pViewportState->viewportCount`

- VUID-VkGraphicsPipelineCreateInfo-multiviewPerViewViewports-12250
  If the `multiviewPerViewViewports` feature is enabled, `renderpass` is VK_NULL_HANDLE, the pipeline requires pre-rasterization shader state, and no element of the `pDynamicStates` member of `pDynamicState` is VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT, then the index of the most significant bit in VkPipelineRenderingCreateInfo::`viewMask` must be less than `pViewportState->scissorCount`

- VUID-VkGraphicsPipelineCreateInfo-pStages-08711
  If `pStages` includes a fragment shader stage, VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE is not set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`, and the fragment shader declares the `EarlyFragmentTests` execution mode and uses `OpDepthAttachmentReadEXT`, the `depthWriteEnable` member of VkPipelineDepthStencilStateCreateInfo must be VK_FALSE

- VUID-VkGraphicsPipelineCreateInfo-pStages-08712
  If `pStages` includes a fragment shader stage, VK_DYNAMIC_STATE_STENCIL_WRITE_MASK is not set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`, and the fragment shader declares the `EarlyFragmentTests` execution mode and uses `OpStencilAttachmentReadEXT`, the value of VkStencilOpState::`writeMask` for both `front` and `back` in VkPipelineDepthStencilStateCreateInfo must be `0`

- VUID-VkGraphicsPipelineCreateInfo-renderPass-08744
  If `renderPass` is VK_NULL_HANDLE, the pipeline requires fragment output state or fragment shader state, the pipeline enables sample shading, `rasterizationSamples` is not dynamic, and the `pNext` chain includes a VkPipelineRenderingCreateInfo structure, `rasterizationSamples` must be a valid VkSampleCountFlagBits value that is set in `imageCreateSampleCounts` (as defined in Image Creation Limits) for every element of `depthAttachmentFormat`, `stencilAttachmentFormat` and the `pColorAttachmentFormats` array which is not VK_FORMAT_UNDEFINED

- VUID-VkGraphicsPipelineCreateInfo-flags-08897
  If VkGraphicsPipelineLibraryCreateInfoEXT::`flags` includes VK_GRAPHICS_PIPELINE_LIBRARY_VERTEX_INPUT_INTERFACE_BIT_EXT, pre-rasterization shader state is specified either in a library or by the inclusion of VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT, and that state includes a vertex shader stage in `pStages`, the pipeline must define vertex input state

- VUID-VkGraphicsPipelineCreateInfo-flags-08898
  If VkGraphicsPipelineLibraryCreateInfoEXT::`flags` includes VK_GRAPHICS_PIPELINE_LIBRARY_VERTEX_INPUT_INTERFACE_BIT_EXT, and pre-rasterization shader state is not specified, the pipeline must define vertex input state

- VUID-VkGraphicsPipelineCreateInfo-flags-08899
  If `flags` does not include VK_PIPELINE_CREATE_LIBRARY_BIT_KHR, pre-rasterization shader state is specified either in a library or by the inclusion of VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT, and that state includes a vertex shader stage in `pStages`, the pipeline must either define vertex input state or include that state in a linked pipeline library

- VUID-VkGraphicsPipelineCreateInfo-flags-08900
  If VkGraphicsPipelineLibraryCreateInfoEXT::`flags` includes VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT the pipeline must define pre-rasterization shader state

- VUID-VkGraphicsPipelineCreateInfo-flags-08901
  If `flags` does not include VK_PIPELINE_CREATE_LIBRARY_BIT_KHR, the pipeline must either define pre-rasterization shader state or include that state in a linked pipeline library

- VUID-VkGraphicsPipelineCreateInfo-flags-08903
  If VkGraphicsPipelineLibraryCreateInfoEXT::`flags` includes VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, pre-rasterization shader state is specified either in a library or by the inclusion of VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT, and that state either includes VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE or has `pRasterizationState->rasterizerDiscardEnable` set to VK_FALSE, the pipeline must define fragment shader state

- VUID-VkGraphicsPipelineCreateInfo-flags-08904
  If VkGraphicsPipelineLibraryCreateInfoEXT::`flags` includes VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, and pre-rasterization shader state is not specified, the pipeline must define fragment shader state

- VUID-VkGraphicsPipelineCreateInfo-flags-08906
  If VkGraphicsPipelineLibraryCreateInfoEXT::`flags` includes VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, pre-rasterization shader state is specified either in a library or by the inclusion of VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT, and that state either includes VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE or has `pRasterizationState->rasterizerDiscardEnable` set to VK_FALSE, the pipeline must define fragment output interface state

- VUID-VkGraphicsPipelineCreateInfo-flags-08907
  If VkGraphicsPipelineLibraryCreateInfoEXT::`flags` includes VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, and pre-rasterization shader state is not specified, the pipeline must define fragment output interface state

- VUID-VkGraphicsPipelineCreateInfo-flags-08909
  If `flags` does not include VK_PIPELINE_CREATE_LIBRARY_BIT_KHR, pre-rasterization shader state is specified either in a library or by the inclusion of VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT, and that state either includes VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE or has `pRasterizationState->rasterizerDiscardEnable` set to VK_FALSE, the pipeline must define fragment output interface state and fragment shader state or include those states in linked pipeline libraries

- VUID-VkGraphicsPipelineCreateInfo-None-09043
  If `pDynamicState->pDynamicStates` does not include VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT, and the format of any color attachment is VK_FORMAT_E5B9G9R9_UFLOAT_PACK32, the `colorWriteMask` member of the corresponding element of `pColorBlendState->pAttachments` must either include all of VK_COLOR_COMPONENT_R_BIT, VK_COLOR_COMPONENT_G_BIT, VK_COLOR_COMPONENT_B_BIT, and VK_COLOR_COMPONENT_A_BIT, or none of them

- VUID-VkGraphicsPipelineCreateInfo-externalFormatResolve-09301
  If the `externalFormatResolve` feature is enabled, the pipeline requires fragment output interface state, `renderPass` is VK_NULL_HANDLE, and VkExternalFormatANDROID::`externalFormat` is not `0`, VkPipelineRenderingCreateInfo::`viewMask` must be `0`

- VUID-VkGraphicsPipelineCreateInfo-externalFormatResolve-09304
  If the `externalFormatResolve` feature is enabled, the pipeline requires fragment output interface state, `renderPass` is VK_NULL_HANDLE, VkExternalFormatANDROID::`externalFormat` is not `0`, and `rasterizationSamples` is not dynamic, VkPipelineMultisampleStateCreateInfo::`rasterizationSamples` must be `1`

- VUID-VkGraphicsPipelineCreateInfo-externalFormatResolve-09305
  If the `externalFormatResolve` feature is enabled, the pipeline requires fragment output interface state, `renderPass` is VK_NULL_HANDLE, and VkExternalFormatANDROID::`externalFormat` is not `0`, and `blendEnable` is not dynamic, the `blendEnable` member of each element of `pColorBlendState->pAttachments` must be VK_FALSE

- VUID-VkGraphicsPipelineCreateInfo-externalFormatResolve-09306
  If the `externalFormatResolve` feature is enabled, the pipeline requires fragment output interface state, `renderPass` is VK_NULL_HANDLE, and VkExternalFormatANDROID::`externalFormat` is not `0`, and `pDynamicState->pDynamicStates` does not include VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR, VkPipelineFragmentShadingRateStateCreateInfoKHR::`fragmentSize.width` must be `1`

- VUID-VkGraphicsPipelineCreateInfo-externalFormatResolve-09307
  If the `externalFormatResolve` feature is enabled, the pipeline requires fragment output interface state, `renderPass` is VK_NULL_HANDLE, and VkExternalFormatANDROID::`externalFormat` is not `0`, and `pDynamicState->pDynamicStates` does not include VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR, VkPipelineFragmentShadingRateStateCreateInfoKHR::`fragmentSize.height` must be `1`

- VUID-VkGraphicsPipelineCreateInfo-externalFormatResolve-09308
  If the `externalFormatResolve` feature is enabled, the pipeline requires pre-rasterization shader state and fragment output interface state, `renderPass` is VK_NULL_HANDLE, and VkExternalFormatANDROID::`externalFormat` is not `0`, the last pre-rasterization shader stage must not statically use a variable with the `PrimitiveShadingRateKHR` built-in

- VUID-VkGraphicsPipelineCreateInfo-externalFormatResolve-09309
  If the `externalFormatResolve` feature is enabled, the pipeline requires fragment output interface state, `renderPass` is VK_NULL_HANDLE, and VkExternalFormatANDROID::`externalFormat` is not `0`, VkPipelineRenderingCreateInfo::`colorAttachmentCount` must be `1`

- VUID-VkGraphicsPipelineCreateInfo-externalFormatResolve-09310
  If the `externalFormatResolve` feature is enabled, the pipeline requires fragment shader state and fragment output interface state, `renderPass` is VK_NULL_HANDLE, and VkExternalFormatANDROID::`externalFormat` is not `0`, the fragment shader must not declare the `DepthReplacing` or `StencilRefReplacingEXT` execution modes

- VUID-VkGraphicsPipelineCreateInfo-externalFormatResolve-09313
  If the `externalFormatResolve` feature is enabled, the pipeline requires fragment output interface state, `renderPass` is not VK_NULL_HANDLE, `subpass` includes an external format resolve attachment, and `rasterizationSamples` is not dynamic, VkPipelineMultisampleStateCreateInfo::`rasterizationSamples` must be VK_SAMPLE_COUNT_1_BIT

- VUID-VkGraphicsPipelineCreateInfo-externalFormatResolve-09314
  If the `externalFormatResolve` feature is enabled, the pipeline requires fragment output interface state, `renderPass` is not VK_NULL_HANDLE, `subpass` includes an external format resolve attachment, and `blendEnable` is not dynamic, the `blendEnable` member of each element of `pColorBlendState->pAttachments` must be VK_FALSE

- VUID-VkGraphicsPipelineCreateInfo-externalFormatResolve-09315
  If the `externalFormatResolve` feature is enabled, the pipeline requires fragment output interface state, `renderPass` is not VK_NULL_HANDLE, `subpass` includes an external format resolve attachment, and `pDynamicState->pDynamicStates` does not include VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR, VkPipelineFragmentShadingRateStateCreateInfoKHR::`fragmentSize.width` must be `1`

- VUID-VkGraphicsPipelineCreateInfo-externalFormatResolve-09316
  If the `externalFormatResolve` feature is enabled, the pipeline requires fragment output interface state, `renderPass` is not VK_NULL_HANDLE, `subpass` includes an external format resolve attachment, and `pDynamicState->pDynamicStates` does not include VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR, VkPipelineFragmentShadingRateStateCreateInfoKHR::`fragmentSize.height` must be `1`

- VUID-VkGraphicsPipelineCreateInfo-externalFormatResolve-09317
  If the `externalFormatResolve` feature is enabled, the pipeline requires pre-rasterization shader state and fragment output interface state, `renderPass` is not VK_NULL_HANDLE, and `subpass` includes an external format resolve attachment, the last pre-rasterization shader stage must not statically use a variable with the `PrimitiveShadingRateKHR` built-in

- VUID-VkGraphicsPipelineCreateInfo-renderPass-09531
  If the pipeline is being created with fragment shader state and fragment output state, the value of `renderPass` is VK_NULL_HANDLE, and VkRenderingInputAttachmentIndexInfo is included, VkRenderingInputAttachmentIndexInfo::`colorAttachmentCount` must be equal to VkPipelineRenderingCreateInfo::`colorAttachmentCount`

- VUID-VkGraphicsPipelineCreateInfo-renderPass-09652
  If the pipeline is being created with fragment shader state and fragment output state, the value of `renderPass` is VK_NULL_HANDLE, and VkRenderingInputAttachmentIndexInfo is not included, the fragment shader must not contain any input attachments with a `InputAttachmentIndex` greater than or equal to VkPipelineRenderingCreateInfo::`colorAttachmentCount`

- VUID-VkGraphicsPipelineCreateInfo-renderPass-09532
  If the pipeline is being created with fragment output state, and the value of `renderPass` is VK_NULL_HANDLE, VkRenderingAttachmentLocationInfo::`colorAttachmentCount` must be equal to VkPipelineRenderingCreateInfo::`colorAttachmentCount`

- VUID-VkGraphicsPipelineCreateInfo-flags-11273
  If VkPipelineCreateFlags2CreateInfoKHR::`flags` includes VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT, all libraries linked to this pipeline must also have that flag set

- VUID-VkGraphicsPipelineCreateInfo-flags-11274
  If VkPipelineCreateFlags2CreateInfoKHR::`flags` does not include VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT, all libraries linked to this pipeline must also not have that flag set

- VUID-VkGraphicsPipelineCreateInfo-flags-12355
  If `flags` includes VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, all libraries linked to this pipeline must also have that flag set

- VUID-VkGraphicsPipelineCreateInfo-flags-12356
  If `flags` does not include VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, all libraries linked to this pipeline must also not have that flag set

- VUID-VkGraphicsPipelineCreateInfo-flags-12357
  If `flags` includes VK_PIPELINE_CREATE_NO_PROTECTED_ACCESS_BIT, all libraries linked to this pipeline must also have that flag set

- VUID-VkGraphicsPipelineCreateInfo-flags-12358
  If `flags` does not include VK_PIPELINE_CREATE_NO_PROTECTED_ACCESS_BIT, all libraries linked to this pipeline must also not have that flag set

- VUID-VkGraphicsPipelineCreateInfo-flags-12359
  If `flags` includes VK_PIPELINE_CREATE_PROTECTED_ACCESS_ONLY_BIT, all libraries linked to this pipeline must also have that flag set

- VUID-VkGraphicsPipelineCreateInfo-flags-12360
  If `flags` does not include VK_PIPELINE_CREATE_PROTECTED_ACCESS_ONLY_BIT, all libraries linked to this pipeline must also not have that flag set

Valid Usage (Implicit)

- VUID-VkGraphicsPipelineCreateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO

- VUID-VkGraphicsPipelineCreateInfo-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkAttachmentSampleCountInfoAMD, VkCustomResolveCreateInfoEXT, VkExternalFormatANDROID, VkExternalFormatOHOS, VkGraphicsPipelineLibraryCreateInfoEXT, VkGraphicsPipelineShaderGroupsCreateInfoNV, VkMultiviewPerViewAttributesInfoNVX, VkPipelineBinaryInfoKHR, VkPipelineCompilerControlCreateInfoAMD, VkPipelineCreateFlags2CreateInfo, VkPipelineCreationFeedbackCreateInfo, VkPipelineDiscardRectangleStateCreateInfoEXT, VkPipelineFragmentDensityMapLayeredCreateInfoVALVE, VkPipelineFragmentShadingRateEnumStateCreateInfoNV, VkPipelineFragmentShadingRateStateCreateInfoKHR, VkPipelineLibraryCreateInfoKHR, VkPipelineRenderingCreateInfo, VkPipelineRepresentativeFragmentTestStateCreateInfoNV, VkPipelineRobustnessCreateInfo, VkRenderingAttachmentLocationInfo, VkRenderingInputAttachmentIndexInfo, or VkValidationFeaturesEXT

- VUID-VkGraphicsPipelineCreateInfo-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkGraphicsPipelineCreateInfo-pDynamicState-parameter
  If `pDynamicState` is not `NULL`, `pDynamicState` must be a valid pointer to a valid VkPipelineDynamicStateCreateInfo structure

- VUID-VkGraphicsPipelineCreateInfo-commonparent
  Each of `basePipelineHandle`, `layout`, and `renderPass` that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevice

The `VkPipelineFragmentDensityMapLayeredCreateInfoVALVE` structure is defined as:

    // Provided by VK_VALVE_fragment_density_map_layered
    typedef struct VkPipelineFragmentDensityMapLayeredCreateInfoVALVE {
        VkStructureType    sType;
        const void*        pNext;
        uint32_t           maxFragmentDensityMapLayers;
    } VkPipelineFragmentDensityMapLayeredCreateInfoVALVE;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `maxFragmentDensityMapLayers` is the maximum number of layers which can be used with a fragment density map.

Valid Usage

- VUID-VkPipelineFragmentDensityMapLayeredCreateInfoVALVE-maxFragmentDensityMapLayers-10825
  `maxFragmentDensityMapLayers` must be less than or equal to `maxFragmentDensityMapLayers`

Valid Usage (Implicit)

- VUID-VkPipelineFragmentDensityMapLayeredCreateInfoVALVE-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PIPELINE_FRAGMENT_DENSITY_MAP_LAYERED_CREATE_INFO_VALVE

Structure Chaining

Extends the structure

  - VkGraphicsPipelineCreateInfo

The `VkPipelineRenderingCreateInfo` structure is defined as:

    // Provided by VK_VERSION_1_3
    typedef struct VkPipelineRenderingCreateInfo {
        VkStructureType    sType;
        const void*        pNext;
        uint32_t           viewMask;
        uint32_t           colorAttachmentCount;
        const VkFormat*    pColorAttachmentFormats;
        VkFormat           depthAttachmentFormat;
        VkFormat           stencilAttachmentFormat;
    } VkPipelineRenderingCreateInfo;

    // Provided by VK_KHR_dynamic_rendering
    // Equivalent to VkPipelineRenderingCreateInfo
    typedef VkPipelineRenderingCreateInfo VkPipelineRenderingCreateInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `viewMask` is a bitfield of view indices describing which views are active during rendering. It must match VkRenderingInfo::`viewMask` when rendering.

- `colorAttachmentCount` is the number of entries in `pColorAttachmentFormats`

- `pColorAttachmentFormats` is a pointer to an array of VkFormat values defining the format of color attachments used in this pipeline.

- `depthAttachmentFormat` is a VkFormat value defining the format of the depth attachment used in this pipeline.

- `stencilAttachmentFormat` is a VkFormat value defining the format of the stencil attachment used in this pipeline.

When a pipeline is created without a VkRenderPass, if the `pNext` chain of VkGraphicsPipelineCreateInfo includes this structure, it specifies the view mask and format of attachments used for rendering. If this structure is not specified, and the pipeline does not include a VkRenderPass, `viewMask` and `colorAttachmentCount` are `0`, and `depthAttachmentFormat` and `stencilAttachmentFormat` are VK_FORMAT_UNDEFINED. If a graphics pipeline is created with a valid VkRenderPass, parameters of this structure are ignored.

If `depthAttachmentFormat`, `stencilAttachmentFormat`, or any element of `pColorAttachmentFormats` is VK_FORMAT_UNDEFINED, it indicates that the corresponding attachment is unused within the render pass. Valid formats indicate that an attachment can be used - but it is still valid to set the attachment to `NULL` when beginning rendering.

If the render pass is going to be used with an external format resolve attachment, a VkExternalFormatANDROID structure must also be included in the `pNext` chain of VkGraphicsPipelineCreateInfo, defining the external format of the resolve attachment that will be used.

Valid Usage

- VUID-VkPipelineRenderingCreateInfo-colorAttachmentCount-09533
  `colorAttachmentCount` must be less than or equal to `maxColorAttachments`

Valid Usage (Implicit)

- VUID-VkPipelineRenderingCreateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PIPELINE_RENDERING_CREATE_INFO

Structure Chaining

Extends the structure

  - VkGraphicsPipelineCreateInfo

The `VkCustomResolveCreateInfoEXT` structure is defined as:

    // Provided by VK_EXT_custom_resolve with VK_KHR_dynamic_rendering or VK_VERSION_1_3
    typedef struct VkCustomResolveCreateInfoEXT {
        VkStructureType    sType;
        const void*        pNext;
        VkBool32           customResolve;
        uint32_t           colorAttachmentCount;
        const VkFormat*    pColorAttachmentFormats;
        VkFormat           depthAttachmentFormat;
        VkFormat           stencilAttachmentFormat;
    } VkCustomResolveCreateInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `customResolve` indicates whether this pipeline will be used for a resolve operation.

- `colorAttachmentCount` is the number of entries in `pColorAttachmentFormats`.

- `pColorAttachmentFormats` is a pointer to an array of VkFormat values defining the format of color resolve attachments used in custom resolves in the same render pass.

- `depthAttachmentFormat` is a VkFormat value defining the format of the depth resolve attachment used in custom resolves in the same render pass.

- `stencilAttachmentFormat` is a VkFormat value defining the format of the stencil resolve attachment used in custom resolves in the same render pass.

If the `pNext` chain includes this structure for one of:

- a VkGraphicsPipelineCreateInfo for a pipeline created without a VkRenderPass

- a VkCommandBufferInheritanceInfo for a secondary command buffer within a render pass instance begun with vkCmdBeginRendering.

it specifies the formats used in custom resolves within the same render pass. It also specifies that the corresponding object will be used in a render pass which contains a custom resolve operation.

If the `pNext` chain includes this structure for a VkShaderCreateInfoEXT for a fragment shader object, it only specifies that the fragment shader will be used in a custom resolve operation.

If a graphics pipeline is created with a valid VkRenderPass, parameters of this structure are ignored.

If `customResolve` is VK_FALSE, the pipeline can only be used outside the custom resolve section. If `customResolve` is VK_TRUE, the pipeline can only be used inside the custom resolve section.

When a dynamic render pass instance contains a custom resolve operation and the `dynamicRenderingUnusedAttachments` feature is not enabled , all pipelines used to draw in such render pass must include this structure and have identical format information in it. When a dynamic render pass does not contain a custom resolve operation and the `dynamicRenderingUnusedAttachments` feature is not enabled , all pipelines used to draw in such render pass must not include this structure.

If the `dynamicRenderingUnusedAttachments` feature is enabled, then when this structure is not included in the `pNext` chain for VkGraphicsPipelineCreateInfo, `customResolve` is VK_FALSE, `colorAttachmentCount` is `0`, and `depthAttachmentFormat` and `stencilAttachmentFormat` are VK_FORMAT_UNDEFINED.

If `depthAttachmentFormat`, `stencilAttachmentFormat`, or any element of `pColorAttachmentFormats` is VK_FORMAT_UNDEFINED, it indicates that the corresponding attachment is unused within the resolve portion of the render pass. Valid formats indicate that an attachment can be used - but it is still valid to set the attachment to `NULL` when beginning rendering.

When passed as a `pNext` member to a VkShaderCreateInfoEXT struct for use with fragment density maps, the `colorAttachmentCount`, `pColorAttachmentFormats`, `depthAttachmentFormat`, and `stencilAttachmentFormat` members of this struct are ignored. When not passed as a `pNext` member, `customResolve` is VK_FALSE.

Valid Usage

- VUID-VkCustomResolveCreateInfoEXT-colorAttachmentCount-11507
  `colorAttachmentCount` must be less than or equal to `maxColorAttachments`

- VUID-VkCustomResolveCreateInfoEXT-depthAttachmentFormat-11508
  If `depthAttachmentFormat` is not VK_FORMAT_UNDEFINED, it must be a format that includes a depth component

- VUID-VkCustomResolveCreateInfoEXT-depthAttachmentFormat-11509
  If `depthAttachmentFormat` is not VK_FORMAT_UNDEFINED, it must be a format with potential format features that include VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT

- VUID-VkCustomResolveCreateInfoEXT-pColorAttachmentFormats-11510
  If any element of `pColorAttachmentFormats` is not VK_FORMAT_UNDEFINED, it must be a format with potential format features that include VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT , or VK_FORMAT_FEATURE_2_LINEAR_COLOR_ATTACHMENT_BIT_NV if the `linearColorAttachment` feature is enabled

- VUID-VkCustomResolveCreateInfoEXT-stencilAttachmentFormat-11511
  If `stencilAttachmentFormat` is not VK_FORMAT_UNDEFINED, it must be a format that includes a stencil aspect

- VUID-VkCustomResolveCreateInfoEXT-stencilAttachmentFormat-11512
  If `stencilAttachmentFormat` is not VK_FORMAT_UNDEFINED, it must be a format with potential format features that include VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT

- VUID-VkCustomResolveCreateInfoEXT-depthAttachmentFormat-11513
  If `depthAttachmentFormat` is not VK_FORMAT_UNDEFINED and `stencilAttachmentFormat` is not VK_FORMAT_UNDEFINED, `depthAttachmentFormat` must equal `stencilAttachmentFormat`

Valid Usage (Implicit)

- VUID-VkCustomResolveCreateInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_CUSTOM_RESOLVE_CREATE_INFO_EXT

Structure Chaining

Extends the structures

  - VkCommandBufferInheritanceInfo

  - VkGraphicsPipelineCreateInfo

  - VkShaderCreateInfoEXT

The `VkPipelineBinaryInfoKHR` structure is defined as:

    // Provided by VK_KHR_pipeline_binary
    typedef struct VkPipelineBinaryInfoKHR {
        VkStructureType               sType;
        const void*                   pNext;
        uint32_t                      binaryCount;
        const VkPipelineBinaryKHR*    pPipelineBinaries;
    } VkPipelineBinaryInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `binaryCount` is the number of elements in the `pPipelineBinaries` array.

- `pPipelineBinaries` is a pointer to an array of VkPipelineBinaryKHR handles.

If a `VkPipelineBinaryInfoKHR` structure with a `binaryCount` greater than 0 is included in the `pNext` chain of any `Vk*PipelineCreateInfo` structure when creating a pipeline, implementations must use the data in `pPipelineBinaries` instead of recalculating it. Any shader module identifiers, shader modules, or chained VkShaderModuleCreateInfo structures declared in VkPipelineShaderStageCreateInfo instances, are ignored. Any VkShaderDescriptorSetAndBindingMappingInfoEXT in the `pNext` chains of VkPipelineShaderStageCreateInfo instances are ignored.

If this structure is not included in the `pNext` chain, it is equivalent to specifying this structure with a `binaryCount` of `0`.

Valid Usage

- VUID-VkPipelineBinaryInfoKHR-binaryCount-09603
  `binaryCount` and the order of the elements in `pPipelineBinaries` must exactly match that returned by vkCreatePipelineBinariesKHR for the matching `Vk*PipelineCreateInfo` structure and its `pNext` chain, ignoring the presence of the `VkPipelineBinaryInfoKHR` structure, the presence of the VK_PIPELINE_CREATE_2_CAPTURE_DATA_BIT_KHR flag, and absence of any shader module identifiers, shader modules, or `VkShaderModuleCreateInfo` structures, for the same global pipeline key, from either:

  - VkPipelineBinaryCreateInfoKHR::`pPipelineCreateInfo`, or

  - VkPipelineBinaryCreateInfoKHR::`pipeline`

Valid Usage (Implicit)

- VUID-VkPipelineBinaryInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PIPELINE_BINARY_INFO_KHR

- VUID-VkPipelineBinaryInfoKHR-pPipelineBinaries-parameter
  If `binaryCount` is not `0`, `pPipelineBinaries` must be a valid pointer to an array of `binaryCount` valid VkPipelineBinaryKHR handles

Structure Chaining

Extends the structures

  - VkComputePipelineCreateInfo

  - VkGraphicsPipelineCreateInfo

  - VkRayTracingPipelineCreateInfoKHR

The `VkGraphicsPipelineLibraryCreateInfoEXT` structure is defined as:

    // Provided by VK_EXT_graphics_pipeline_library
    typedef struct VkGraphicsPipelineLibraryCreateInfoEXT {
        VkStructureType                      sType;
        const void*                          pNext;
        VkGraphicsPipelineLibraryFlagsEXT    flags;
    } VkGraphicsPipelineLibraryCreateInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask of VkGraphicsPipelineLibraryFlagBitsEXT specifying the subsets of the graphics pipeline that are being compiled.

If a `VkGraphicsPipelineLibraryCreateInfoEXT` structure is included in the `pNext` chain of VkGraphicsPipelineCreateInfo, it specifies the subsets of the graphics pipeline being created, excluding any subsets from linked pipeline libraries. If the pipeline is created with pipeline libraries, state from those libraries is aggregated with said subset.

If this structure is omitted, and either VkGraphicsPipelineCreateInfo::`flags` includes VK_PIPELINE_CREATE_LIBRARY_BIT_KHR or the VkGraphicsPipelineCreateInfo::`pNext` chain includes a VkPipelineLibraryCreateInfoKHR structure with a `libraryCount` greater than `0`, it is as if `flags` is `0`. Otherwise if this structure is omitted, it is as if `flags` includes all possible subsets of the graphics pipeline (i.e. a complete graphics pipeline).

Valid Usage (Implicit)

- VUID-VkGraphicsPipelineLibraryCreateInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_LIBRARY_CREATE_INFO_EXT

- VUID-VkGraphicsPipelineLibraryCreateInfoEXT-flags-parameter
  `flags` must be a valid combination of VkGraphicsPipelineLibraryFlagBitsEXT values

- VUID-VkGraphicsPipelineLibraryCreateInfoEXT-flags-requiredbitmask
  `flags` must not be `0`

Structure Chaining

Extends the structure

  - VkGraphicsPipelineCreateInfo

    // Provided by VK_EXT_graphics_pipeline_library
    typedef VkFlags VkGraphicsPipelineLibraryFlagsEXT;

`VkGraphicsPipelineLibraryFlagsEXT` is a bitmask type for setting a mask of zero or more VkGraphicsPipelineLibraryFlagBitsEXT.

Possible values of the `flags` member of VkGraphicsPipelineLibraryCreateInfoEXT, specifying the subsets of a graphics pipeline to compile are:

    // Provided by VK_EXT_graphics_pipeline_library
    typedef enum VkGraphicsPipelineLibraryFlagBitsEXT {
        VK_GRAPHICS_PIPELINE_LIBRARY_VERTEX_INPUT_INTERFACE_BIT_EXT = 0x00000001,
        VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT = 0x00000002,
        VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT = 0x00000004,
        VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT = 0x00000008,
    } VkGraphicsPipelineLibraryFlagBitsEXT;

- VK_GRAPHICS_PIPELINE_LIBRARY_VERTEX_INPUT_INTERFACE_BIT_EXT specifies that a pipeline will include vertex input interface state.

- VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT specifies that a pipeline will include pre-rasterization shader state.

- VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT specifies that a pipeline will include fragment shader state.

- VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT specifies that a pipeline will include fragment output interface state.

The `VkPipelineDynamicStateCreateInfo` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkPipelineDynamicStateCreateInfo {
        VkStructureType                      sType;
        const void*                          pNext;
        VkPipelineDynamicStateCreateFlags    flags;
        uint32_t                             dynamicStateCount;
        const VkDynamicState*                pDynamicStates;
    } VkPipelineDynamicStateCreateInfo;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is reserved for future use.

- `dynamicStateCount` is the number of elements in the `pDynamicStates` array.

- `pDynamicStates` is a pointer to an array of VkDynamicState values specifying which pieces of pipeline state will use the values from dynamic state commands rather than from pipeline state creation information.

Valid Usage

- VUID-VkPipelineDynamicStateCreateInfo-pDynamicStates-01442
  Each element of `pDynamicStates` must be unique

Valid Usage (Implicit)

- VUID-VkPipelineDynamicStateCreateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO

- VUID-VkPipelineDynamicStateCreateInfo-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkPipelineDynamicStateCreateInfo-flags-zerobitmask
  `flags` must be `0`

- VUID-VkPipelineDynamicStateCreateInfo-pDynamicStates-parameter
  If `dynamicStateCount` is not `0`, `pDynamicStates` must be a valid pointer to an array of `dynamicStateCount` valid VkDynamicState values

    // Provided by VK_VERSION_1_0
    typedef VkFlags VkPipelineDynamicStateCreateFlags;

`VkPipelineDynamicStateCreateFlags` is a bitmask type for setting a mask, but is currently reserved for future use.

The source of different pieces of dynamic state is specified by the VkPipelineDynamicStateCreateInfo::`pDynamicStates` property of the currently active pipeline, each of whose elements must be one of the values:

    // Provided by VK_VERSION_1_0
    typedef enum VkDynamicState {
        VK_DYNAMIC_STATE_VIEWPORT = 0,
        VK_DYNAMIC_STATE_SCISSOR = 1,
        VK_DYNAMIC_STATE_LINE_WIDTH = 2,
        VK_DYNAMIC_STATE_DEPTH_BIAS = 3,
        VK_DYNAMIC_STATE_BLEND_CONSTANTS = 4,
        VK_DYNAMIC_STATE_DEPTH_BOUNDS = 5,
        VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK = 6,
        VK_DYNAMIC_STATE_STENCIL_WRITE_MASK = 7,
        VK_DYNAMIC_STATE_STENCIL_REFERENCE = 8,
      // Provided by VK_VERSION_1_3
        VK_DYNAMIC_STATE_CULL_MODE = 1000267000,
      // Provided by VK_VERSION_1_3
        VK_DYNAMIC_STATE_FRONT_FACE = 1000267001,
      // Provided by VK_VERSION_1_3
        VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY = 1000267002,
      // Provided by VK_VERSION_1_3
        VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT = 1000267003,
      // Provided by VK_VERSION_1_3
        VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT = 1000267004,
      // Provided by VK_VERSION_1_3
        VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE = 1000267005,
      // Provided by VK_VERSION_1_3
        VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE = 1000267006,
      // Provided by VK_VERSION_1_3
        VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE = 1000267007,
      // Provided by VK_VERSION_1_3
        VK_DYNAMIC_STATE_DEPTH_COMPARE_OP = 1000267008,
      // Provided by VK_VERSION_1_3
        VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE = 1000267009,
      // Provided by VK_VERSION_1_3
        VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE = 1000267010,
      // Provided by VK_VERSION_1_3
        VK_DYNAMIC_STATE_STENCIL_OP = 1000267011,
      // Provided by VK_VERSION_1_3
        VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE = 1000377001,
      // Provided by VK_VERSION_1_3
        VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE = 1000377002,
      // Provided by VK_VERSION_1_3
        VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE = 1000377004,
      // Provided by VK_VERSION_1_4
        VK_DYNAMIC_STATE_LINE_STIPPLE = 1000259000,
      // Provided by VK_NV_clip_space_w_scaling
        VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV = 1000087000,
      // Provided by VK_EXT_discard_rectangles
        VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT = 1000099000,
      // Provided by VK_EXT_discard_rectangles
        VK_DYNAMIC_STATE_DISCARD_RECTANGLE_ENABLE_EXT = 1000099001,
      // Provided by VK_EXT_discard_rectangles
        VK_DYNAMIC_STATE_DISCARD_RECTANGLE_MODE_EXT = 1000099002,
      // Provided by VK_EXT_sample_locations
        VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT = 1000143000,
      // Provided by VK_KHR_ray_tracing_pipeline
        VK_DYNAMIC_STATE_RAY_TRACING_PIPELINE_STACK_SIZE_KHR = 1000347000,
      // Provided by VK_NV_shading_rate_image
        VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV = 1000164004,
      // Provided by VK_NV_shading_rate_image
        VK_DYNAMIC_STATE_VIEWPORT_COARSE_SAMPLE_ORDER_NV = 1000164006,
      // Provided by VK_NV_scissor_exclusive
        VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_ENABLE_NV = 1000205000,
      // Provided by VK_NV_scissor_exclusive
        VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_NV = 1000205001,
      // Provided by VK_KHR_fragment_shading_rate
        VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR = 1000226000,
      // Provided by VK_EXT_vertex_input_dynamic_state
        VK_DYNAMIC_STATE_VERTEX_INPUT_EXT = 1000352000,
      // Provided by VK_EXT_extended_dynamic_state2
        VK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT = 1000377000,
      // Provided by VK_EXT_extended_dynamic_state2
        VK_DYNAMIC_STATE_LOGIC_OP_EXT = 1000377003,
      // Provided by VK_EXT_color_write_enable
        VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT = 1000381000,
      // Provided by VK_EXT_extended_dynamic_state3
        VK_DYNAMIC_STATE_DEPTH_CLAMP_ENABLE_EXT = 1000455003,
      // Provided by VK_EXT_extended_dynamic_state3
        VK_DYNAMIC_STATE_POLYGON_MODE_EXT = 1000455004,
      // Provided by VK_EXT_extended_dynamic_state3
        VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT = 1000455005,
      // Provided by VK_EXT_extended_dynamic_state3
        VK_DYNAMIC_STATE_SAMPLE_MASK_EXT = 1000455006,
      // Provided by VK_EXT_extended_dynamic_state3
        VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT = 1000455007,
      // Provided by VK_EXT_extended_dynamic_state3
        VK_DYNAMIC_STATE_ALPHA_TO_ONE_ENABLE_EXT = 1000455008,
      // Provided by VK_EXT_extended_dynamic_state3
        VK_DYNAMIC_STATE_LOGIC_OP_ENABLE_EXT = 1000455009,
      // Provided by VK_EXT_extended_dynamic_state3
        VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT = 1000455010,
      // Provided by VK_EXT_extended_dynamic_state3
        VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT = 1000455011,
      // Provided by VK_EXT_extended_dynamic_state3
        VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT = 1000455012,
      // Provided by VK_EXT_extended_dynamic_state3 with VK_KHR_maintenance2 or VK_VERSION_1_1
        VK_DYNAMIC_STATE_TESSELLATION_DOMAIN_ORIGIN_EXT = 1000455002,
      // Provided by VK_EXT_extended_dynamic_state3 with VK_EXT_transform_feedback
        VK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXT = 1000455013,
      // Provided by VK_EXT_conservative_rasterization with VK_EXT_extended_dynamic_state3
        VK_DYNAMIC_STATE_CONSERVATIVE_RASTERIZATION_MODE_EXT = 1000455014,
      // Provided by VK_EXT_conservative_rasterization with VK_EXT_extended_dynamic_state3
        VK_DYNAMIC_STATE_EXTRA_PRIMITIVE_OVERESTIMATION_SIZE_EXT = 1000455015,
      // Provided by VK_EXT_depth_clip_enable with VK_EXT_extended_dynamic_state3
        VK_DYNAMIC_STATE_DEPTH_CLIP_ENABLE_EXT = 1000455016,
      // Provided by VK_EXT_extended_dynamic_state3 with VK_EXT_sample_locations
        VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT = 1000455017,
      // Provided by VK_EXT_blend_operation_advanced with VK_EXT_extended_dynamic_state3
        VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT = 1000455018,
      // Provided by VK_EXT_extended_dynamic_state3 with VK_EXT_provoking_vertex
        VK_DYNAMIC_STATE_PROVOKING_VERTEX_MODE_EXT = 1000455019,
      // Provided by VK_EXT_extended_dynamic_state3 with VK_VERSION_1_4 or VK_KHR_line_rasterization or VK_EXT_line_rasterization
        VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT = 1000455020,
      // Provided by VK_EXT_extended_dynamic_state3 with VK_VERSION_1_4 or VK_KHR_line_rasterization or VK_EXT_line_rasterization
        VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT = 1000455021,
      // Provided by VK_EXT_depth_clip_control with VK_EXT_extended_dynamic_state3
        VK_DYNAMIC_STATE_DEPTH_CLIP_NEGATIVE_ONE_TO_ONE_EXT = 1000455022,
      // Provided by VK_EXT_extended_dynamic_state3 with VK_NV_clip_space_w_scaling
        VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_ENABLE_NV = 1000455023,
      // Provided by VK_EXT_extended_dynamic_state3 with VK_NV_viewport_swizzle
        VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV = 1000455024,
      // Provided by VK_EXT_extended_dynamic_state3 with VK_NV_fragment_coverage_to_color
        VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV = 1000455025,
      // Provided by VK_EXT_extended_dynamic_state3 with VK_NV_fragment_coverage_to_color
        VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_LOCATION_NV = 1000455026,
      // Provided by VK_EXT_extended_dynamic_state3 with VK_NV_framebuffer_mixed_samples
        VK_DYNAMIC_STATE_COVERAGE_MODULATION_MODE_NV = 1000455027,
      // Provided by VK_EXT_extended_dynamic_state3 with VK_NV_framebuffer_mixed_samples
        VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NV = 1000455028,
      // Provided by VK_EXT_extended_dynamic_state3 with VK_NV_framebuffer_mixed_samples
        VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_NV = 1000455029,
      // Provided by VK_EXT_extended_dynamic_state3 with VK_NV_shading_rate_image
        VK_DYNAMIC_STATE_SHADING_RATE_IMAGE_ENABLE_NV = 1000455030,
      // Provided by VK_EXT_extended_dynamic_state3 with VK_NV_representative_fragment_test
        VK_DYNAMIC_STATE_REPRESENTATIVE_FRAGMENT_TEST_ENABLE_NV = 1000455031,
      // Provided by VK_EXT_extended_dynamic_state3 with VK_NV_coverage_reduction_mode
        VK_DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV = 1000455032,
      // Provided by VK_EXT_attachment_feedback_loop_dynamic_state
        VK_DYNAMIC_STATE_ATTACHMENT_FEEDBACK_LOOP_ENABLE_EXT = 1000524000,
      // Provided by VK_EXT_depth_clamp_control
        VK_DYNAMIC_STATE_DEPTH_CLAMP_RANGE_EXT = 1000582000,
      // Provided by VK_EXT_line_rasterization
        VK_DYNAMIC_STATE_LINE_STIPPLE_EXT = VK_DYNAMIC_STATE_LINE_STIPPLE,
      // Provided by VK_EXT_extended_dynamic_state
        VK_DYNAMIC_STATE_CULL_MODE_EXT = VK_DYNAMIC_STATE_CULL_MODE,
      // Provided by VK_EXT_extended_dynamic_state
        VK_DYNAMIC_STATE_FRONT_FACE_EXT = VK_DYNAMIC_STATE_FRONT_FACE,
      // Provided by VK_EXT_extended_dynamic_state
        VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY_EXT = VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY,
      // Provided by VK_EXT_extended_dynamic_state
        VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT = VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT,
      // Provided by VK_EXT_extended_dynamic_state
        VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXT = VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT,
      // Provided by VK_EXT_extended_dynamic_state
        VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXT = VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE,
      // Provided by VK_EXT_extended_dynamic_state
        VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE_EXT = VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE,
      // Provided by VK_EXT_extended_dynamic_state
        VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE_EXT = VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE,
      // Provided by VK_EXT_extended_dynamic_state
        VK_DYNAMIC_STATE_DEPTH_COMPARE_OP_EXT = VK_DYNAMIC_STATE_DEPTH_COMPARE_OP,
      // Provided by VK_EXT_extended_dynamic_state
        VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE_EXT = VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE,
      // Provided by VK_EXT_extended_dynamic_state
        VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE_EXT = VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE,
      // Provided by VK_EXT_extended_dynamic_state
        VK_DYNAMIC_STATE_STENCIL_OP_EXT = VK_DYNAMIC_STATE_STENCIL_OP,
      // Provided by VK_EXT_extended_dynamic_state2
        VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE_EXT = VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE,
      // Provided by VK_EXT_extended_dynamic_state2
        VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE_EXT = VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE,
      // Provided by VK_EXT_extended_dynamic_state2
        VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE_EXT = VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE,
      // Provided by VK_KHR_line_rasterization
        VK_DYNAMIC_STATE_LINE_STIPPLE_KHR = VK_DYNAMIC_STATE_LINE_STIPPLE,
    } VkDynamicState;

- VK_DYNAMIC_STATE_VIEWPORT specifies that the `pViewports` state in VkPipelineViewportStateCreateInfo will be ignored and must be set dynamically with vkCmdSetViewport before any drawing commands. The number of viewports used by a pipeline is still specified by the `viewportCount` member of VkPipelineViewportStateCreateInfo.

- VK_DYNAMIC_STATE_SCISSOR specifies that the `pScissors` state in VkPipelineViewportStateCreateInfo will be ignored and must be set dynamically with vkCmdSetScissor before any drawing commands. The number of scissor rectangles used by a pipeline is still specified by the `scissorCount` member of VkPipelineViewportStateCreateInfo.

- VK_DYNAMIC_STATE_LINE_WIDTH specifies that the `lineWidth` state in VkPipelineRasterizationStateCreateInfo will be ignored and must be set dynamically with vkCmdSetLineWidth before any drawing commands that generate line primitives for the rasterizer.

- VK_DYNAMIC_STATE_DEPTH_BIAS specifies that any instance of VkDepthBiasRepresentationInfoEXT included in the `pNext` chain of VkPipelineRasterizationStateCreateInfo as well as the `depthBiasConstantFactor`, `depthBiasClamp` and `depthBiasSlopeFactor` states in VkPipelineRasterizationStateCreateInfo will be ignored and must be set dynamically with vkCmdSetDepthBias or vkCmdSetDepthBias2EXT before any draws are performed with depth bias enabled.

- VK_DYNAMIC_STATE_BLEND_CONSTANTS specifies that the `blendConstants` state in VkPipelineColorBlendStateCreateInfo will be ignored and must be set dynamically with vkCmdSetBlendConstants before any draws are performed with a pipeline state with `VkPipelineColorBlendAttachmentState` member `blendEnable` set to VK_TRUE and any of the blend functions using a constant blend color.

- VK_DYNAMIC_STATE_DEPTH_BOUNDS specifies that the `minDepthBounds` and `maxDepthBounds` states of VkPipelineDepthStencilStateCreateInfo will be ignored and must be set dynamically with vkCmdSetDepthBounds before any draws are performed with a pipeline state with VkPipelineDepthStencilStateCreateInfo member `depthBoundsTestEnable` set to VK_TRUE.

- VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK specifies that the `compareMask` state in VkPipelineDepthStencilStateCreateInfo for both `front` and `back` will be ignored and must be set dynamically with vkCmdSetStencilCompareMask before any draws are performed with a pipeline state with VkPipelineDepthStencilStateCreateInfo member `stencilTestEnable` set to VK_TRUE

- VK_DYNAMIC_STATE_STENCIL_WRITE_MASK specifies that the `writeMask` state in VkPipelineDepthStencilStateCreateInfo for both `front` and `back` will be ignored and must be set dynamically with vkCmdSetStencilWriteMask before any draws are performed with a pipeline state with VkPipelineDepthStencilStateCreateInfo member `stencilTestEnable` set to VK_TRUE

- VK_DYNAMIC_STATE_STENCIL_REFERENCE specifies that the `reference` state in VkPipelineDepthStencilStateCreateInfo for both `front` and `back` will be ignored and must be set dynamically with vkCmdSetStencilReference before any draws are performed with a pipeline state with VkPipelineDepthStencilStateCreateInfo member `stencilTestEnable` set to VK_TRUE

- VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV specifies that the `pViewportWScalings` state in VkPipelineViewportWScalingStateCreateInfoNV will be ignored and must be set dynamically with vkCmdSetViewportWScalingNV before any draws are performed with a pipeline state with VkPipelineViewportWScalingStateCreateInfoNV member `viewportScalingEnable` set to VK_TRUE

- VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT specifies that the `pDiscardRectangles` state in VkPipelineDiscardRectangleStateCreateInfoEXT will be ignored and must be set dynamically with vkCmdSetDiscardRectangleEXT before any draw or clear commands.

- VK_DYNAMIC_STATE_DISCARD_RECTANGLE_ENABLE_EXT specifies that the presence of the VkPipelineDiscardRectangleStateCreateInfoEXT structure in the VkGraphicsPipelineCreateInfo chain with a `discardRectangleCount` greater than zero does not implicitly enable discard rectangles and they must be enabled dynamically with vkCmdSetDiscardRectangleEnableEXT before any draw commands. This is available on implementations that support at least `specVersion` `2` of the `VK_EXT_discard_rectangles` extension.

- VK_DYNAMIC_STATE_DISCARD_RECTANGLE_MODE_EXT specifies that the `discardRectangleMode` state in VkPipelineDiscardRectangleStateCreateInfoEXT will be ignored and must be set dynamically with vkCmdSetDiscardRectangleModeEXT before any draw commands. This is available on implementations that support at least `specVersion` `2` of the `VK_EXT_discard_rectangles` extension.

- VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT specifies that the `sampleLocationsInfo` state in VkPipelineSampleLocationsStateCreateInfoEXT will be ignored and must be set dynamically with vkCmdSetSampleLocationsEXT before any draw or clear commands. Enabling custom sample locations is still indicated by the `sampleLocationsEnable` member of VkPipelineSampleLocationsStateCreateInfoEXT.

- VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_NV specifies that the `pExclusiveScissors` state in VkPipelineViewportExclusiveScissorStateCreateInfoNV will be ignored and must be set dynamically with vkCmdSetExclusiveScissorNV before any drawing commands.

- VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_ENABLE_NV specifies that the exclusive scissors must be explicitly enabled with vkCmdSetExclusiveScissorEnableNV and the `exclusiveScissorCount` value in VkPipelineViewportExclusiveScissorStateCreateInfoNV will not implicitly enable them. This is available on implementations that support at least `specVersion` `2` of the `VK_NV_scissor_exclusive` extension.

- VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV specifies that the `pShadingRatePalettes` state in VkPipelineViewportShadingRateImageStateCreateInfoNV will be ignored and must be set dynamically with vkCmdSetViewportShadingRatePaletteNV before any drawing commands.

- VK_DYNAMIC_STATE_VIEWPORT_COARSE_SAMPLE_ORDER_NV specifies that the coarse sample order state in VkPipelineViewportCoarseSampleOrderStateCreateInfoNV will be ignored and must be set dynamically with vkCmdSetCoarseSampleOrderNV before any drawing commands.

- VK_DYNAMIC_STATE_LINE_STIPPLE specifies that the `lineStippleFactor` and `lineStipplePattern` state in VkPipelineRasterizationLineStateCreateInfo will be ignored and must be set dynamically with vkCmdSetLineStipple before any draws are performed with a pipeline state with VkPipelineRasterizationLineStateCreateInfo member `stippledLineEnable` set to VK_TRUE.

- VK_DYNAMIC_STATE_CULL_MODE specifies that the `cullMode` state in VkPipelineRasterizationStateCreateInfo will be ignored and must be set dynamically with vkCmdSetCullMode before any drawing commands.

- VK_DYNAMIC_STATE_FRONT_FACE specifies that the `frontFace` state in VkPipelineRasterizationStateCreateInfo will be ignored and must be set dynamically with vkCmdSetFrontFace before any drawing commands.

- VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY specifies that the `topology` state in VkPipelineInputAssemblyStateCreateInfo only specifies the topology class, and the specific topology order and adjacency must be set dynamically with vkCmdSetPrimitiveTopology before any drawing commands.

- VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT specifies that the `viewportCount` and `pViewports` state in VkPipelineViewportStateCreateInfo will be ignored and must be set dynamically with vkCmdSetViewportWithCount before any draw call.

- VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT specifies that the `scissorCount` and `pScissors` state in VkPipelineViewportStateCreateInfo will be ignored and must be set dynamically with vkCmdSetScissorWithCount before any draw call.

- VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE specifies that the `stride` state in VkVertexInputBindingDescription will be ignored and must be set dynamically with vkCmdBindVertexBuffers2 before any draw call.

- VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE specifies that the `depthTestEnable` state in VkPipelineDepthStencilStateCreateInfo will be ignored and must be set dynamically with vkCmdSetDepthTestEnable before any draw call.

- VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE specifies that the `depthWriteEnable` state in VkPipelineDepthStencilStateCreateInfo will be ignored and must be set dynamically with vkCmdSetDepthWriteEnable before any draw call.

- VK_DYNAMIC_STATE_DEPTH_COMPARE_OP specifies that the `depthCompareOp` state in VkPipelineDepthStencilStateCreateInfo will be ignored and must be set dynamically with vkCmdSetDepthCompareOp before any draw call.

- VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE specifies that the `depthBoundsTestEnable` state in VkPipelineDepthStencilStateCreateInfo will be ignored and must be set dynamically with vkCmdSetDepthBoundsTestEnable before any draw call.

- VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE specifies that the `stencilTestEnable` state in VkPipelineDepthStencilStateCreateInfo will be ignored and must be set dynamically with vkCmdSetStencilTestEnable before any draw call.

- VK_DYNAMIC_STATE_STENCIL_OP specifies that the `failOp`, `passOp`, `depthFailOp`, and `compareOp` states in `VkPipelineDepthStencilStateCreateInfo` for both `front` and `back` will be ignored and must be set dynamically with vkCmdSetStencilOp before any draws are performed with a pipeline state with `VkPipelineDepthStencilStateCreateInfo` member `stencilTestEnable` set to VK_TRUE

- VK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT specifies that the `patchControlPoints` state in VkPipelineTessellationStateCreateInfo will be ignored and must be set dynamically with vkCmdSetPatchControlPointsEXT before any drawing commands.

- VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE specifies that the `rasterizerDiscardEnable` state in VkPipelineRasterizationStateCreateInfo will be ignored and must be set dynamically with vkCmdSetRasterizerDiscardEnable before any drawing commands.

- VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE specifies that the `depthBiasEnable` state in VkPipelineRasterizationStateCreateInfo will be ignored and must be set dynamically with vkCmdSetDepthBiasEnable before any drawing commands.

- VK_DYNAMIC_STATE_LOGIC_OP_EXT specifies that the `logicOp` state in VkPipelineColorBlendStateCreateInfo will be ignored and must be set dynamically with vkCmdSetLogicOpEXT before any drawing commands.

- VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE specifies that the `primitiveRestartEnable` state in VkPipelineInputAssemblyStateCreateInfo will be ignored and must be set dynamically with vkCmdSetPrimitiveRestartEnable before any drawing commands.

- VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR specifies that state in VkPipelineFragmentShadingRateStateCreateInfoKHR and VkPipelineFragmentShadingRateEnumStateCreateInfoNV will be ignored and must be set dynamically with vkCmdSetFragmentShadingRateKHR or vkCmdSetFragmentShadingRateEnumNV before any drawing commands.

- VK_DYNAMIC_STATE_RAY_TRACING_PIPELINE_STACK_SIZE_KHR specifies that the default stack size computation for the pipeline will be ignored and must be set dynamically with vkCmdSetRayTracingPipelineStackSizeKHR before any ray tracing calls are performed.

- VK_DYNAMIC_STATE_VERTEX_INPUT_EXT specifies that the `pVertexInputState` state will be ignored and must be set dynamically with vkCmdSetVertexInputEXT before any drawing commands

- VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT specifies that the `pColorWriteEnables` state in VkPipelineColorWriteCreateInfoEXT will be ignored and must be set dynamically with vkCmdSetColorWriteEnableEXT before any draw call.

- VK_DYNAMIC_STATE_TESSELLATION_DOMAIN_ORIGIN_EXT specifies that the `domainOrigin` state in VkPipelineTessellationDomainOriginStateCreateInfo will be ignored and must be set dynamically with vkCmdSetTessellationDomainOriginEXT before any draw call.

- VK_DYNAMIC_STATE_DEPTH_CLAMP_ENABLE_EXT specifies that the `depthClampEnable` state in VkPipelineRasterizationStateCreateInfo will be ignored and must be set dynamically with vkCmdSetDepthClampEnableEXT before any draw call.

- VK_DYNAMIC_STATE_POLYGON_MODE_EXT specifies that the `polygonMode` state in VkPipelineRasterizationStateCreateInfo will be ignored and must be set dynamically with vkCmdSetPolygonModeEXT before any draw call.

- VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT specifies that the `rasterizationSamples` state in VkPipelineMultisampleStateCreateInfo will be ignored and must be set dynamically with vkCmdSetRasterizationSamplesEXT before any draw call.

- VK_DYNAMIC_STATE_SAMPLE_MASK_EXT specifies that the `pSampleMask` state in VkPipelineMultisampleStateCreateInfo will be ignored and must be set dynamically with vkCmdSetSampleMaskEXT before any draw call.

- VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT specifies that the `alphaToCoverageEnable` state in VkPipelineMultisampleStateCreateInfo will be ignored and must be set dynamically with vkCmdSetAlphaToCoverageEnableEXT before any draw call.

- VK_DYNAMIC_STATE_ALPHA_TO_ONE_ENABLE_EXT specifies that the `alphaToOneEnable` state in VkPipelineMultisampleStateCreateInfo will be ignored and must be set dynamically with vkCmdSetAlphaToOneEnableEXT before any draw call.

- VK_DYNAMIC_STATE_LOGIC_OP_ENABLE_EXT specifies that the `logicOpEnable` state in VkPipelineColorBlendStateCreateInfo will be ignored and must be set dynamically with vkCmdSetLogicOpEnableEXT before any draw call.

- VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT specifies that the `blendEnable` state in VkPipelineColorBlendAttachmentState will be ignored and must be set dynamically with vkCmdSetColorBlendEnableEXT before any draw call.

- VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT specifies that the `srcColorBlendFactor`, `dstColorBlendFactor`, `colorBlendOp`, `srcAlphaBlendFactor`, `dstAlphaBlendFactor`, and `alphaBlendOp` states in VkPipelineColorBlendAttachmentState will be ignored and must be set dynamically with vkCmdSetColorBlendEquationEXT before any draw call.

- VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT specifies that the `colorWriteMask` state in VkPipelineColorBlendAttachmentState will be ignored and must be set dynamically with vkCmdSetColorWriteMaskEXT before any draw call.

- VK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXT specifies that the `rasterizationStream` state in VkPipelineRasterizationStateStreamCreateInfoEXT will be ignored and must be set dynamically with vkCmdSetRasterizationStreamEXT before any draw call.

- VK_DYNAMIC_STATE_CONSERVATIVE_RASTERIZATION_MODE_EXT specifies that the `conservativeRasterizationMode` state in VkPipelineRasterizationConservativeStateCreateInfoEXT will be ignored and must be set dynamically with vkCmdSetConservativeRasterizationModeEXT before any draw call.

- VK_DYNAMIC_STATE_EXTRA_PRIMITIVE_OVERESTIMATION_SIZE_EXT specifies that the `extraPrimitiveOverestimationSize` state in VkPipelineRasterizationConservativeStateCreateInfoEXT will be ignored and must be set dynamically with vkCmdSetExtraPrimitiveOverestimationSizeEXT before any draw call.

- VK_DYNAMIC_STATE_DEPTH_CLIP_ENABLE_EXT specifies that the `depthClipEnable` state in VkPipelineRasterizationDepthClipStateCreateInfoEXT will be ignored and must be set dynamically with vkCmdSetDepthClipEnableEXT before any draw call.

- VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT specifies that the `sampleLocationsEnable` state in VkPipelineSampleLocationsStateCreateInfoEXT will be ignored and must be set dynamically with vkCmdSetSampleLocationsEnableEXT before any draw call.

- VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT specifies that the `colorBlendOp` state in VkPipelineColorBlendAttachmentState, and `srcPremultiplied`, `dstPremultiplied`, and `blendOverlap` states in VkPipelineColorBlendAdvancedStateCreateInfoEXT will be ignored and must be set dynamically with vkCmdSetColorBlendAdvancedEXT before any draw call.

- VK_DYNAMIC_STATE_PROVOKING_VERTEX_MODE_EXT specifies that the `provokingVertexMode` state in VkPipelineRasterizationProvokingVertexStateCreateInfoEXT will be ignored and must be set dynamically with vkCmdSetProvokingVertexModeEXT before any draw call.

- VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT specifies that the `lineRasterizationMode` state in VkPipelineRasterizationLineStateCreateInfo will be ignored and must be set dynamically with vkCmdSetLineRasterizationModeEXT before any draw call.

- VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT specifies that the `stippledLineEnable` state in VkPipelineRasterizationLineStateCreateInfo will be ignored and must be set dynamically with vkCmdSetLineStippleEnableEXT before any draw call.

- VK_DYNAMIC_STATE_DEPTH_CLIP_NEGATIVE_ONE_TO_ONE_EXT specifies that the `negativeOneToOne` state in VkPipelineViewportDepthClipControlCreateInfoEXT will be ignored and must be set dynamically with vkCmdSetDepthClipNegativeOneToOneEXT before any draw call.

- VK_DYNAMIC_STATE_DEPTH_CLAMP_RANGE_EXT specifies that the `depthClampMode` and `pDepthClampRange` state in VkPipelineViewportDepthClampControlCreateInfoEXT will be ignored and must be set dynamically with vkCmdSetDepthClampRangeEXT before any draw call.

- VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_ENABLE_NV specifies that the `viewportWScalingEnable` state in VkPipelineViewportWScalingStateCreateInfoNV will be ignored and must be set dynamically with vkCmdSetViewportWScalingEnableNV before any draw call.

- VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV specifies that the `viewportCount`, and `pViewportSwizzles` states in VkPipelineViewportSwizzleStateCreateInfoNV will be ignored and must be set dynamically with vkCmdSetViewportSwizzleNV before any draw call.

- VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV specifies that the `coverageToColorEnable` state in VkPipelineCoverageToColorStateCreateInfoNV will be ignored and must be set dynamically with vkCmdSetCoverageToColorEnableNV before any draw call.

- VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_LOCATION_NV specifies that the `coverageToColorLocation` state in VkPipelineCoverageToColorStateCreateInfoNV will be ignored and must be set dynamically with vkCmdSetCoverageToColorLocationNV before any draw call.

- VK_DYNAMIC_STATE_COVERAGE_MODULATION_MODE_NV specifies that the `coverageModulationMode` state in VkPipelineCoverageModulationStateCreateInfoNV will be ignored and must be set dynamically with vkCmdSetCoverageModulationModeNV before any draw call.

- VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NV specifies that the `coverageModulationTableEnable` state in VkPipelineCoverageModulationStateCreateInfoNV will be ignored and must be set dynamically with vkCmdSetCoverageModulationTableEnableNV before any draw call.

- VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_NV specifies that the `coverageModulationTableCount`, and `pCoverageModulationTable` states in VkPipelineCoverageModulationStateCreateInfoNV will be ignored and must be set dynamically with vkCmdSetCoverageModulationTableNV before any draw call.

- VK_DYNAMIC_STATE_SHADING_RATE_IMAGE_ENABLE_NV specifies that the `shadingRateImageEnable` state in VkPipelineViewportShadingRateImageStateCreateInfoNV will be ignored and must be set dynamically with vkCmdSetShadingRateImageEnableNV before any draw call.

- VK_DYNAMIC_STATE_REPRESENTATIVE_FRAGMENT_TEST_ENABLE_NV specifies that the `representativeFragmentTestEnable` state in VkPipelineRepresentativeFragmentTestStateCreateInfoNV will be ignored and must be set dynamically with vkCmdSetRepresentativeFragmentTestEnableNV before any draw call.

- VK_DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV specifies that the `coverageReductionMode` state in VkPipelineCoverageReductionStateCreateInfoNV will be ignored and must be set dynamically with vkCmdSetCoverageReductionModeNV before any draw call.

- VK_DYNAMIC_STATE_ATTACHMENT_FEEDBACK_LOOP_ENABLE_EXT specifies that the VK_PIPELINE_CREATE_COLOR_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT and VK_PIPELINE_CREATE_DEPTH_STENCIL_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT flags will be ignored and must be set dynamically with vkCmdSetAttachmentFeedbackLoopEnableEXT before any draw call.

#### 10.4.1. Valid Combinations of Stages for Graphics Pipelines

Primitive processing can be handled either on a per primitive basis by the vertex, tessellation, and geometry shader stages, or on a per mesh basis using task and mesh shader stages. If the pipeline includes a mesh shader stage, it uses the mesh pipeline, otherwise it uses the primitive pipeline.

If a task shader is omitted, the task shading stage is skipped.

If tessellation shader stages are omitted, the tessellation shading and fixed-function stages of the pipeline are skipped.

If a geometry shader is omitted, the geometry shading stage is skipped.

If a fragment shader is omitted, fragment color outputs have undefined values, and the fragment depth value is determined by Fragment Operations state. This can be useful for depth-only rendering.

Presence of a shader stage in a pipeline is indicated by including a valid VkPipelineShaderStageCreateInfo with `module` and `pName` selecting an entry point from a shader module, where that entry point is valid for the stage specified by `stage`.

Presence of some of the fixed-function stages in the pipeline is implicitly derived from enabled shaders and provided state. For example, the fixed-function tessellator is always present when the pipeline has valid Tessellation Control and Tessellation Evaluation shaders.

For example:

- Depth/stencil-only rendering in a subpass with no color attachments

  - Active Pipeline Shader Stages

    - Vertex Shader

  - Required: Fixed-Function Pipeline Stages

    - VkPipelineVertexInputStateCreateInfo

    - VkPipelineInputAssemblyStateCreateInfo

    - VkPipelineViewportStateCreateInfo

    - VkPipelineRasterizationStateCreateInfo

    - VkPipelineMultisampleStateCreateInfo

    - VkPipelineDepthStencilStateCreateInfo

- Color-only rendering in a subpass with no depth/stencil attachment

  - Active Pipeline Shader Stages

    - Vertex Shader

    - Fragment Shader

  - Required: Fixed-Function Pipeline Stages

    - VkPipelineVertexInputStateCreateInfo

    - VkPipelineInputAssemblyStateCreateInfo

    - VkPipelineViewportStateCreateInfo

    - VkPipelineRasterizationStateCreateInfo

    - VkPipelineMultisampleStateCreateInfo

    - VkPipelineColorBlendStateCreateInfo

- Rendering pipeline with tessellation and geometry shaders

  - Active Pipeline Shader Stages

    - Vertex Shader

    - Tessellation Control Shader

    - Tessellation Evaluation Shader

    - Geometry Shader

    - Fragment Shader

  - Required: Fixed-Function Pipeline Stages

    - VkPipelineVertexInputStateCreateInfo

    - VkPipelineInputAssemblyStateCreateInfo

    - VkPipelineTessellationStateCreateInfo

    - VkPipelineViewportStateCreateInfo

    - VkPipelineRasterizationStateCreateInfo

    - VkPipelineMultisampleStateCreateInfo

    - VkPipelineDepthStencilStateCreateInfo

    - VkPipelineColorBlendStateCreateInfo

- Rendering pipeline with task and mesh shaders

  - Active Pipeline Shader Stages

    - Task Shader

    - Mesh Shader

    - Fragment Shader

  - Required: Fixed-Function Pipeline Stages

    - VkPipelineViewportStateCreateInfo

    - VkPipelineRasterizationStateCreateInfo

    - VkPipelineMultisampleStateCreateInfo

    - VkPipelineDepthStencilStateCreateInfo

    - VkPipelineColorBlendStateCreateInfo

#### 10.4.2. Graphics Pipeline Shader Groups

Graphics pipelines can contain multiple shader groups that can be bound individually. Each shader group behaves as if it was a pipeline using the shader group’s state. When the pipeline is bound by regular means, it behaves as if the state of group `0` is active, use vkCmdBindPipelineShaderGroupNV to bind an individual shader group.

The primary purpose of shader groups is allowing the device to bind different pipeline state using Device-Generated Commands.

The `VkGraphicsPipelineShaderGroupsCreateInfoNV` structure is defined as:

    // Provided by VK_NV_device_generated_commands
    typedef struct VkGraphicsPipelineShaderGroupsCreateInfoNV {
        VkStructureType                             sType;
        const void*                                 pNext;
        uint32_t                                    groupCount;
        const VkGraphicsShaderGroupCreateInfoNV*    pGroups;
        uint32_t                                    pipelineCount;
        const VkPipeline*                           pPipelines;
    } VkGraphicsPipelineShaderGroupsCreateInfoNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `groupCount` is the number of elements in the `pGroups` array.

- `pGroups` is a pointer to an array of VkGraphicsShaderGroupCreateInfoNV structures specifying which state of the original VkGraphicsPipelineCreateInfo each shader group overrides.

- `pipelineCount` is the number of elements in the `pPipelines` array.

- `pPipelines` is a pointer to an array of graphics `VkPipeline` structures which are referenced within the created pipeline, including all their shader groups.

When referencing shader groups by index, groups defined in the referenced pipelines are treated as if they were defined as additional entries in `pGroups`. They are appended in the order they appear in the `pPipelines` array and in the `pGroups` array when those pipelines were defined.

The application must maintain the lifetime of all such referenced pipelines based on the pipelines that make use of them.

Valid Usage

- VUID-VkGraphicsPipelineShaderGroupsCreateInfoNV-groupCount-02879
  `groupCount` must be at least `1` and as maximum `VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV`::`maxGraphicsShaderGroupCount`

- VUID-VkGraphicsPipelineShaderGroupsCreateInfoNV-groupCount-02880
  The sum of `groupCount` including those groups added from referenced `pPipelines` must also be as maximum `VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV`::`maxGraphicsShaderGroupCount`

- VUID-VkGraphicsPipelineShaderGroupsCreateInfoNV-pGroups-02881
  The state of the first element of `pGroups` must match its equivalent within the parent’s VkGraphicsPipelineCreateInfo

- VUID-VkGraphicsPipelineShaderGroupsCreateInfoNV-pGroups-02882
  Each element of `pGroups` must in combination with the rest of the pipeline state yield a valid state configuration

- VUID-VkGraphicsPipelineShaderGroupsCreateInfoNV-pGroups-02884
  All elements of `pGroups` must use the same shader stage combinations unless any mesh shader stage is used, then either combination of task and mesh or just mesh shader is valid

- VUID-VkGraphicsPipelineShaderGroupsCreateInfoNV-pGroups-02885
  Mesh and regular primitive shading stages cannot be mixed across `pGroups`

- VUID-VkGraphicsPipelineShaderGroupsCreateInfoNV-pPipelines-02886
  Each element of `pPipelines` must have been created with identical state to the pipeline currently created except the state that can be overridden by VkGraphicsShaderGroupCreateInfoNV

- VUID-VkGraphicsPipelineShaderGroupsCreateInfoNV-deviceGeneratedCommands-02887
  The `VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV`::`deviceGeneratedCommands` feature must be enabled

Valid Usage (Implicit)

- VUID-VkGraphicsPipelineShaderGroupsCreateInfoNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_SHADER_GROUPS_CREATE_INFO_NV

- VUID-VkGraphicsPipelineShaderGroupsCreateInfoNV-pGroups-parameter
  If `groupCount` is not `0`, `pGroups` must be a valid pointer to an array of `groupCount` valid VkGraphicsShaderGroupCreateInfoNV structures

- VUID-VkGraphicsPipelineShaderGroupsCreateInfoNV-pPipelines-parameter
  If `pipelineCount` is not `0`, `pPipelines` must be a valid pointer to an array of `pipelineCount` valid VkPipeline handles

Structure Chaining

Extends the structure

  - VkGraphicsPipelineCreateInfo

The `VkGraphicsShaderGroupCreateInfoNV` structure provides the state overrides for each shader group. Each shader group behaves like a pipeline that was created from its state as well as the remaining parent’s state. It is defined as:

    // Provided by VK_NV_device_generated_commands
    typedef struct VkGraphicsShaderGroupCreateInfoNV {
        VkStructureType                                 sType;
        const void*                                     pNext;
        uint32_t                                        stageCount;
        const VkPipelineShaderStageCreateInfo*          pStages;
        const VkPipelineVertexInputStateCreateInfo*     pVertexInputState;
        const VkPipelineTessellationStateCreateInfo*    pTessellationState;
    } VkGraphicsShaderGroupCreateInfoNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `stageCount` is the number of entries in the `pStages` array.

- `pStages` is a pointer to an array VkPipelineShaderStageCreateInfo structures specifying the set of the shader stages to be included in this shader group.

- `pVertexInputState` is a pointer to a VkPipelineVertexInputStateCreateInfo structure.

- `pTessellationState` is a pointer to a VkPipelineTessellationStateCreateInfo structure, and is ignored if the shader group does not include a tessellation control shader stage and tessellation evaluation shader stage.

Valid Usage

- VUID-VkGraphicsShaderGroupCreateInfoNV-stageCount-02888
  For `stageCount`, the same restrictions as in VkGraphicsPipelineCreateInfo::`stageCount` apply

- VUID-VkGraphicsShaderGroupCreateInfoNV-pStages-02889
  For `pStages`, the same restrictions as in VkGraphicsPipelineCreateInfo::`pStages` apply

- VUID-VkGraphicsShaderGroupCreateInfoNV-pVertexInputState-02890
  For `pVertexInputState`, the same restrictions as in VkGraphicsPipelineCreateInfo::`pVertexInputState` apply

- VUID-VkGraphicsShaderGroupCreateInfoNV-pTessellationState-02891
  For `pTessellationState`, the same restrictions as in VkGraphicsPipelineCreateInfo::`pTessellationState` apply

Valid Usage (Implicit)

- VUID-VkGraphicsShaderGroupCreateInfoNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_GRAPHICS_SHADER_GROUP_CREATE_INFO_NV

- VUID-VkGraphicsShaderGroupCreateInfoNV-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkGraphicsShaderGroupCreateInfoNV-pStages-parameter
  `pStages` must be a valid pointer to an array of `stageCount` valid VkPipelineShaderStageCreateInfo structures

- VUID-VkGraphicsShaderGroupCreateInfoNV-stageCount-arraylength
  `stageCount` must be greater than `0`

### 10.5. Ray Tracing Pipelines

Ray tracing pipelines consist of multiple shader stages, fixed-function traversal stages, and a pipeline layout.

#### 10.5.1. Ray Tracing Pipeline Enums and Types

VK_SHADER_UNUSED_KHR is a special shader index used to indicate that a ray generation, miss, or callable shader member is not used.

    #define VK_SHADER_UNUSED_KHR              (~0U)

    #define VK_SHADER_UNUSED_NV               VK_SHADER_UNUSED_KHR

The VkRayTracingShaderGroupTypeKHR enumeration is defined as:

    // Provided by VK_KHR_ray_tracing_pipeline
    typedef enum VkRayTracingShaderGroupTypeKHR {
        VK_RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR = 0,
        VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR = 1,
        VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR = 2,
      // Provided by VK_NV_ray_tracing
        VK_RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_NV = VK_RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR,
      // Provided by VK_NV_ray_tracing
        VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_NV = VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR,
      // Provided by VK_NV_ray_tracing
        VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_NV = VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR,
    } VkRayTracingShaderGroupTypeKHR;

    // Provided by VK_NV_ray_tracing
    // Equivalent to VkRayTracingShaderGroupTypeKHR
    typedef VkRayTracingShaderGroupTypeKHR VkRayTracingShaderGroupTypeNV;

- VK_RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR specifies that a shader group with a single VK_SHADER_STAGE_RAYGEN_BIT_KHR, VK_SHADER_STAGE_MISS_BIT_KHR, or VK_SHADER_STAGE_CALLABLE_BIT_KHR shader in it.

- VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR specifies that a shader group that only hits triangles and must not contain an intersection shader, only closest hit and any-hit shaders.

- VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR specifies that a shader group that only intersects with custom geometry and must contain an intersection shader and may contain closest hit and any-hit shaders.

Note | For current group types, the hit group type could be inferred from the presence or absence of the intersection shader, but we provide the type explicitly for future hit groups that do not have that property.

#### 10.5.2. Ray Tracing Pipeline Creation

To create ray tracing pipelines, call:

    // Provided by VK_KHR_ray_tracing_pipeline
    VkResult vkCreateRayTracingPipelinesKHR(
        VkDevice                                    device,
        VkDeferredOperationKHR                      deferredOperation,
        VkPipelineCache                             pipelineCache,
        uint32_t                                    createInfoCount,
        const VkRayTracingPipelineCreateInfoKHR*    pCreateInfos,
        const VkAllocationCallbacks*                pAllocator,
        VkPipeline*                                 pPipelines);

- `device` is the logical device that creates the ray tracing pipelines.

- `deferredOperation` is VK_NULL_HANDLE or the handle of a valid VkDeferredOperationKHR request deferral object for this command.

- `pipelineCache` is either VK_NULL_HANDLE, indicating that pipeline caching is disabled, or to enable caching, the handle of a valid VkPipelineCache object. The implementation must not access this object outside of the duration of this command.

- `createInfoCount` is the length of the `pCreateInfos` and `pPipelines` arrays.

- `pCreateInfos` is a pointer to an array of VkRayTracingPipelineCreateInfoKHR structures.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

- `pPipelines` is a pointer to an array in which the resulting ray tracing pipeline objects are returned.

The VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS error is returned if the implementation is unable to reuse the shader group handles provided in VkRayTracingShaderGroupCreateInfoKHR::`pShaderGroupCaptureReplayHandle` when VkPhysicalDeviceRayTracingPipelineFeaturesKHR::`rayTracingPipelineShaderGroupHandleCaptureReplay` is enabled.

Pipelines are created and returned as described for Multiple Pipeline Creation.

Valid Usage

- VUID-vkCreateRayTracingPipelinesKHR-device-09677
  `device` must support at least one queue family with the VK_QUEUE_COMPUTE_BIT capability

- VUID-vkCreateRayTracingPipelinesKHR-flags-03415
  If the `flags` member of any element of `pCreateInfos` contains the VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, and the `basePipelineIndex` member of that same element is not `-1`, `basePipelineIndex` must be less than the index into `pCreateInfos` that corresponds to that element

- VUID-vkCreateRayTracingPipelinesKHR-flags-03416
  If the `flags` member of any element of `pCreateInfos` contains the VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, the base pipeline must have been created with the VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT flag set

- VUID-vkCreateRayTracingPipelinesKHR-flags-03816
  `flags` must not contain the VK_PIPELINE_CREATE_DISPATCH_BASE_BIT flag

- VUID-vkCreateRayTracingPipelinesKHR-pipelineCache-02903
  If `pipelineCache` was created with VK_PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT, host access to `pipelineCache` must be externally synchronized

- VUID-vkCreateRayTracingPipelinesKHR-deferredOperation-03678
  Any previous deferred operation that was associated with `deferredOperation` must be complete

- VUID-vkCreateRayTracingPipelinesKHR-pNext-09616
  If VkPipelineBinaryInfoKHR::`binaryCount` is not `0` for any element of `pCreateInfos`, `pipelineCache` must be VK_NULL_HANDLE

- VUID-vkCreateRayTracingPipelinesKHR-pNext-09617
  If a VkPipelineCreateFlags2CreateInfoKHR structure with the VK_PIPELINE_CREATE_2_CAPTURE_DATA_BIT_KHR flag set is included in the `pNext` chain of any element of `pCreateInfos`, `pipelineCache` must be VK_NULL_HANDLE

- VUID-vkCreateRayTracingPipelinesKHR-binaryCount-09620
  If VkPipelineBinaryInfoKHR::`binaryCount` is not `0` for any element of `pCreateInfos`, VK_PIPELINE_CREATION_FEEDBACK_APPLICATION_PIPELINE_CACHE_HIT_BIT must not be set in the `flags` of that element

- VUID-vkCreateRayTracingPipelinesKHR-binaryCount-09621
  If VkPipelineBinaryInfoKHR::`binaryCount` is not `0` for any element of `pCreateInfos`, VK_PIPELINE_CREATION_FEEDBACK_BASE_PIPELINE_ACCELERATION_BIT must not be set in the `flags` of that element

- VUID-vkCreateRayTracingPipelinesKHR-binaryCount-09622
  If VkPipelineBinaryInfoKHR::`binaryCount` is not `0` for any element of `pCreateInfos`, VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT_EXT must not be set in the `flags` of that element

- VUID-vkCreateRayTracingPipelinesKHR-pCreateInfos-11414
  If any element of `pCreateInfos` sets VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT and includes embedded sampler mappings, there must be less than (`maxSamplerAllocationCount` - (`minSamplerHeapReservedRangeWithEmbedded` / `samplerDescriptorSize`)) VkSampler objects currently created on the device

- VUID-vkCreateRayTracingPipelinesKHR-pCreateInfos-11429
  If any element of `pCreateInfos` sets VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT and includes embedded sampler mappings, this command must not cause the total number of unique embedded samplers in pipelines and shaders on this device to exceed `maxDescriptorHeapEmbeddedSamplers`

- VUID-vkCreateRayTracingPipelinesKHR-rayTracingPipeline-03586
  The `rayTracingPipeline` feature must be enabled

- VUID-vkCreateRayTracingPipelinesKHR-deferredOperation-03587
  If `deferredOperation` is not VK_NULL_HANDLE, the `flags` member of elements of `pCreateInfos` must not include VK_PIPELINE_CREATE_EARLY_RETURN_ON_FAILURE_BIT

Valid Usage (Implicit)

- VUID-vkCreateRayTracingPipelinesKHR-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkCreateRayTracingPipelinesKHR-deferredOperation-parameter
  If `deferredOperation` is not VK_NULL_HANDLE, `deferredOperation` must be a valid VkDeferredOperationKHR handle

- VUID-vkCreateRayTracingPipelinesKHR-pipelineCache-parameter
  If `pipelineCache` is not VK_NULL_HANDLE, `pipelineCache` must be a valid VkPipelineCache handle

- VUID-vkCreateRayTracingPipelinesKHR-pCreateInfos-parameter
  `pCreateInfos` must be a valid pointer to an array of `createInfoCount` valid VkRayTracingPipelineCreateInfoKHR structures

- VUID-vkCreateRayTracingPipelinesKHR-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateRayTracingPipelinesKHR-pPipelines-parameter
  `pPipelines` must be a valid pointer to an array of `createInfoCount` VkPipeline handles

- VUID-vkCreateRayTracingPipelinesKHR-createInfoCount-arraylength
  `createInfoCount` must be greater than `0`

- VUID-vkCreateRayTracingPipelinesKHR-deferredOperation-parent
  If `deferredOperation` is a valid handle, it must have been created, allocated, or retrieved from `device`

- VUID-vkCreateRayTracingPipelinesKHR-pipelineCache-parent
  If `pipelineCache` is a valid handle, it must have been created, allocated, or retrieved from `device`

Return Codes

Success

  - VK_OPERATION_DEFERRED_KHR

  - VK_OPERATION_NOT_DEFERRED_KHR

  - VK_PIPELINE_COMPILE_REQUIRED_EXT

  - VK_SUCCESS

Failure

  - VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkRayTracingPipelineCreateInfoKHR` structure is defined as:

    // Provided by VK_KHR_ray_tracing_pipeline
    typedef struct VkRayTracingPipelineCreateInfoKHR {
        VkStructureType                                      sType;
        const void*                                          pNext;
        VkPipelineCreateFlags                                flags;
        uint32_t                                             stageCount;
        const VkPipelineShaderStageCreateInfo*               pStages;
        uint32_t                                             groupCount;
        const VkRayTracingShaderGroupCreateInfoKHR*          pGroups;
        uint32_t                                             maxPipelineRayRecursionDepth;
        const VkPipelineLibraryCreateInfoKHR*                pLibraryInfo;
        const VkRayTracingPipelineInterfaceCreateInfoKHR*    pLibraryInterface;
        const VkPipelineDynamicStateCreateInfo*              pDynamicState;
        VkPipelineLayout                                     layout;
        VkPipeline                                           basePipelineHandle;
        int32_t                                              basePipelineIndex;
    } VkRayTracingPipelineCreateInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask of VkPipelineCreateFlagBits specifying how the pipeline will be generated.

- `stageCount` is the number of entries in the `pStages` array.

- `pStages` is a pointer to an array of `stageCount` VkPipelineShaderStageCreateInfo structures describing the set of the shader stages to be included in the ray tracing pipeline.

- `groupCount` is the number of entries in the `pGroups` array.

- `pGroups` is a pointer to an array of `groupCount` VkRayTracingShaderGroupCreateInfoKHR structures describing the set of the shader stages to be included in each shader group in the ray tracing pipeline.

- `maxPipelineRayRecursionDepth` is the maximum recursion depth of shaders executed by this pipeline.

- `pLibraryInfo` is a pointer to a VkPipelineLibraryCreateInfoKHR structure defining pipeline libraries to include.

- `pLibraryInterface` is a pointer to a VkRayTracingPipelineInterfaceCreateInfoKHR structure defining additional information when using pipeline libraries.

- `pDynamicState` is a pointer to a VkPipelineDynamicStateCreateInfo structure, and is used to indicate which properties of the pipeline state object are dynamic and can be changed independently of the pipeline state. This can be `NULL`, which means no state in the pipeline is considered dynamic.

- `layout` is the description of binding locations used by both the pipeline and descriptor sets used with the pipeline. If VkPhysicalDeviceProperties::`apiVersion` is greater than or equal to Vulkan 1.3 or VK_KHR_maintenance4 is enabled `layout` must not be accessed by the implementation outside of the duration of the command this structure is passed to.

- `basePipelineHandle` is a pipeline to derive from.

- `basePipelineIndex` is an index into the `pCreateInfos` parameter to use as a pipeline to derive from.

The parameters `basePipelineHandle` and `basePipelineIndex` are described in more detail in Pipeline Derivatives.

When VK_PIPELINE_CREATE_LIBRARY_BIT_KHR is specified, this pipeline defines a pipeline library which cannot be bound as a ray tracing pipeline directly. Instead, pipeline libraries define common shaders and shader groups which can be included in future pipeline creation.

If pipeline libraries are included in `pLibraryInfo`, shaders defined in those libraries are treated as if they were defined as additional entries in `pStages`, appended in the order they appear in the `pLibraries` array and in the `pStages` array when those libraries were defined.

When referencing shader groups in order to obtain a shader group handle, groups defined in those libraries are treated as if they were defined as additional entries in `pGroups`, appended in the order they appear in the `pLibraries` array and in the `pGroups` array when those libraries were defined. The shaders these groups reference are set when the pipeline library is created, referencing those specified in the pipeline library, not in the pipeline that includes it.

The default stack size for a pipeline if VK_DYNAMIC_STATE_RAY_TRACING_PIPELINE_STACK_SIZE_KHR is not provided is computed as described in Ray Tracing Pipeline Stack.

If the `pNext` chain includes a VkPipelineCreateFlags2CreateInfo structure, VkPipelineCreateFlags2CreateInfo::`flags` from that structure is used instead of `flags` from this structure.

If the `pNext` chain includes a VkRayTracingPipelineClusterAccelerationStructureCreateInfoNV structure, then that structure controls whether cluster acceleration structures are allowed in this ray tracing pipeline.

Valid Usage

- VUID-VkRayTracingPipelineCreateInfoKHR-None-09497
  If the `pNext` chain does not include a VkPipelineCreateFlags2CreateInfo structure, `flags` must be a valid combination of VkPipelineCreateFlagBits values

- VUID-VkRayTracingPipelineCreateInfoKHR-flags-07984
  If `flags` contains the VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, and `basePipelineIndex` is -1, `basePipelineHandle` must be a valid ray tracing `VkPipeline` handle

- VUID-VkRayTracingPipelineCreateInfoKHR-flags-07985
  If `flags` contains the VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, and `basePipelineHandle` is VK_NULL_HANDLE, `basePipelineIndex` must be a valid index into the calling command’s `pCreateInfos` parameter

- VUID-VkRayTracingPipelineCreateInfoKHR-flags-07986
  If `flags` contains the VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, `basePipelineIndex` must be -1 or `basePipelineHandle` must be VK_NULL_HANDLE

- VUID-VkRayTracingPipelineCreateInfoKHR-layout-07987
  If a push constant block is declared in a shader and `layout` is not VK_NULL_HANDLE, a push constant range in `layout` must match the shader stage

- VUID-VkRayTracingPipelineCreateInfoKHR-layout-10069
  If a push constant block is declared in a shader and `layout` is not VK_NULL_HANDLE, the block must be contained inside the push constant range in `layout` that matches the stage

- VUID-VkRayTracingPipelineCreateInfoKHR-layout-07988
  If a resource variable is declared in a shader and `layout` is not VK_NULL_HANDLE, the corresponding descriptor set in `layout` must match the shader stage

- VUID-VkRayTracingPipelineCreateInfoKHR-layout-07990
  If a resource variable is declared in a shader, `layout` is not VK_NULL_HANDLE, and the descriptor type is not VK_DESCRIPTOR_TYPE_MUTABLE_EXT, the corresponding descriptor set in `layout` must match the descriptor type

- VUID-VkRayTracingPipelineCreateInfoKHR-layout-07991
  If a resource variable is declared in a shader as an array and `layout` is not VK_NULL_HANDLE, the corresponding descriptor binding used to create `layout` must have a `descriptorCount` that is greater than or equal to the length of the array

- VUID-VkRayTracingPipelineCreateInfoKHR-None-10391
  If a resource variables is declared in a shader as an array of descriptors, then the descriptor type of that variable must not be VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK

- VUID-VkRayTracingPipelineCreateInfoKHR-flags-11798
  If shader64BitIndexing feature is not enabled, `flags` must not contain VK_PIPELINE_CREATE_2_64_BIT_INDEXING_BIT_EXT

- VUID-VkRayTracingPipelineCreateInfoKHR-pipelineCreationCacheControl-02878
  If the `pipelineCreationCacheControl` feature is not enabled, `flags` must not include VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT nor VK_PIPELINE_CREATE_EARLY_RETURN_ON_FAILURE_BIT

- VUID-VkRayTracingPipelineCreateInfoKHR-pipelineProtectedAccess-07368
  If the `pipelineProtectedAccess` feature is not enabled, `flags` must not include VK_PIPELINE_CREATE_NO_PROTECTED_ACCESS_BIT nor VK_PIPELINE_CREATE_PROTECTED_ACCESS_ONLY_BIT

- VUID-VkRayTracingPipelineCreateInfoKHR-flags-07369
  `flags` must not include both VK_PIPELINE_CREATE_NO_PROTECTED_ACCESS_BIT and VK_PIPELINE_CREATE_PROTECTED_ACCESS_ONLY_BIT

- VUID-VkRayTracingPipelineCreateInfoKHR-flags-11311
  If VkPipelineCreateFlags2CreateInfoKHR::`flags` includes VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT, `layout` must be VK_NULL_HANDLE

- VUID-VkRayTracingPipelineCreateInfoKHR-flags-11312
  If VkPipelineCreateFlags2CreateInfoKHR::`flags` includes VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT, all shader variables in the shader resource interface with a `DescriptorSet` and `Binding` decoration must have a mapping declared in VkShaderDescriptorSetAndBindingMappingInfoEXT::`pMappings`

- VUID-VkRayTracingPipelineCreateInfoKHR-pStages-03426
  The shader code for the entry points identified by `pStages`, and the rest of the state identified by this structure must adhere to the pipeline linking rules described in the Shader Interfaces chapter

- VUID-VkRayTracingPipelineCreateInfoKHR-layout-03428
  The number of resources in `layout` accessible to each shader stage that is used by the pipeline must be less than or equal to VkPhysicalDeviceLimits::`maxPerStageResources`

- VUID-VkRayTracingPipelineCreateInfoKHR-flags-02904
  `flags` must not include VK_PIPELINE_CREATE_INDIRECT_BINDABLE_BIT_NV

- VUID-VkRayTracingPipelineCreateInfoKHR-flags-12341
  `flags` must not include VK_PIPELINE_CREATE_NO_PROTECTED_ACCESS_BIT nor VK_PIPELINE_CREATE_PROTECTED_ACCESS_ONLY_BIT

- VUID-VkRayTracingPipelineCreateInfoKHR-layout-12402
  If `layout` is not VK_NULL_HANDLE, it must not have been created with VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT

- VUID-VkRayTracingPipelineCreateInfoKHR-stage-03425
  If `flags` does not include VK_PIPELINE_CREATE_LIBRARY_BIT_KHR, the `stage` member of at least one element of `pStages`, including those implicitly added by `pLibraryInfo`, must be VK_SHADER_STAGE_RAYGEN_BIT_KHR

- VUID-VkRayTracingPipelineCreateInfoKHR-maxPipelineRayRecursionDepth-03589
  `maxPipelineRayRecursionDepth` must be less than or equal to VkPhysicalDeviceRayTracingPipelinePropertiesKHR::`maxRayRecursionDepth`

- VUID-VkRayTracingPipelineCreateInfoKHR-flags-03465
  If `flags` includes VK_PIPELINE_CREATE_LIBRARY_BIT_KHR, `pLibraryInterface` must not be `NULL`

- VUID-VkRayTracingPipelineCreateInfoKHR-pLibraryInfo-03590
  If `pLibraryInfo` is not `NULL` and its `libraryCount` member is greater than `0`, `pLibraryInterface` must not be `NULL`

- VUID-VkRayTracingPipelineCreateInfoKHR-pLibraries-03591
  Each element of `pLibraryInfo->pLibraries` must have been created with the value of `maxPipelineRayRecursionDepth` equal to that in this pipeline

- VUID-VkRayTracingPipelineCreateInfoKHR-pLibraryInfo-03592
  If `pLibraryInfo` is not `NULL` and `layout` is not VK_NULL_HANDLE, each element of `pLibraryInfo->pLibraries` must have been created with a `layout` that is compatible with the `layout` in this pipeline

- VUID-VkRayTracingPipelineCreateInfoKHR-pLibraryInfo-03593
  If `pLibraryInfo` is not `NULL`, each element of its `pLibraries` member must have been created with values of the `maxPipelineRayPayloadSize` and `maxPipelineRayHitAttributeSize` members of `pLibraryInterface` equal to those in this pipeline

- VUID-VkRayTracingPipelineCreateInfoKHR-flags-03594
  If `flags` includes VK_PIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR, each element of `pLibraryInfo->pLibraries` must have been created with the VK_PIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR bit set

- VUID-VkRayTracingPipelineCreateInfoKHR-flags-04718
  If `flags` includes VK_PIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT_KHR, each element of `pLibraryInfo->pLibraries` must have been created with the VK_PIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT_KHR bit set

- VUID-VkRayTracingPipelineCreateInfoKHR-flags-04719
  If `flags` includes VK_PIPELINE_CREATE_RAY_TRACING_SKIP_TRIANGLES_BIT_KHR, each element of `pLibraryInfo->pLibraries` must have been created with the VK_PIPELINE_CREATE_RAY_TRACING_SKIP_TRIANGLES_BIT_KHR bit set

- VUID-VkRayTracingPipelineCreateInfoKHR-flags-04720
  If `flags` includes VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR, each element of `pLibraryInfo->pLibraries` must have been created with the VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR bit set

- VUID-VkRayTracingPipelineCreateInfoKHR-flags-04721
  If `flags` includes VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR, each element of `pLibraryInfo->pLibraries` must have been created with the VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR bit set

- VUID-VkRayTracingPipelineCreateInfoKHR-flags-04722
  If `flags` includes VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR, each element of `pLibraryInfo->pLibraries` must have been created with the VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR bit set

- VUID-VkRayTracingPipelineCreateInfoKHR-flags-04723
  If `flags` includes VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR, each element of `pLibraryInfo->pLibraries` must have been created with the VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR bit set

- VUID-VkRayTracingPipelineCreateInfoKHR-pLibraryInfo-03595
  If the `VK_KHR_pipeline_library` extension is not enabled, `pLibraryInfo` and `pLibraryInterface` must be `NULL`

- VUID-VkRayTracingPipelineCreateInfoKHR-flags-03470
  If `flags` includes VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR, for each element of `pGroups` with a `type` of VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR or VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR, the `anyHitShader` of that element must not be VK_SHADER_UNUSED_KHR

- VUID-VkRayTracingPipelineCreateInfoKHR-flags-03471
  If `flags` includes VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR, for each element of `pGroups` with a `type` of VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR or VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR, the `closestHitShader` of that element must not be VK_SHADER_UNUSED_KHR

- VUID-VkRayTracingPipelineCreateInfoKHR-rayTraversalPrimitiveCulling-03596
  If the `rayTraversalPrimitiveCulling` feature is not enabled, `flags` must not include VK_PIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT_KHR

- VUID-VkRayTracingPipelineCreateInfoKHR-rayTraversalPrimitiveCulling-03597
  If the `rayTraversalPrimitiveCulling` feature is not enabled, `flags` must not include VK_PIPELINE_CREATE_RAY_TRACING_SKIP_TRIANGLES_BIT_KHR

- VUID-VkRayTracingPipelineCreateInfoKHR-flags-06546
  `flags` must not include both VK_PIPELINE_CREATE_RAY_TRACING_SKIP_TRIANGLES_BIT_KHR and VK_PIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT_KHR

- VUID-VkRayTracingPipelineCreateInfoKHR-flags-03598
  If `flags` includes VK_PIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR, `rayTracingPipelineShaderGroupHandleCaptureReplay` must be enabled

- VUID-VkRayTracingPipelineCreateInfoKHR-rayTracingPipelineShaderGroupHandleCaptureReplay-03599
  If VkPhysicalDeviceRayTracingPipelineFeaturesKHR::`rayTracingPipelineShaderGroupHandleCaptureReplay` is VK_TRUE and the `pShaderGroupCaptureReplayHandle` member of any element of `pGroups` is not `NULL`, `flags` must include VK_PIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR

- VUID-VkRayTracingPipelineCreateInfoKHR-pLibraryInfo-07999
  If `pLibraryInfo` is `NULL` or its `libraryCount` is `0`, `stageCount` must not be `0`

- VUID-VkRayTracingPipelineCreateInfoKHR-flags-08700
  If `flags` does not include VK_PIPELINE_CREATE_LIBRARY_BIT_KHR and either `pLibraryInfo` is `NULL` or its `libraryCount` is `0`, `groupCount` must not be `0`

- VUID-VkRayTracingPipelineCreateInfoKHR-pDynamicStates-03602
  Any element of the `pDynamicStates` member of `pDynamicState` must be VK_DYNAMIC_STATE_RAY_TRACING_PIPELINE_STACK_SIZE_KHR

- VUID-VkRayTracingPipelineCreateInfoKHR-pipelineStageCreationFeedbackCount-06652
  If VkPipelineCreationFeedbackCreateInfo::`pipelineStageCreationFeedbackCount` is not `0`, it must be equal to `stageCount`

- VUID-VkRayTracingPipelineCreateInfoKHR-stage-06899
  The `stage` value in all `pStages` elements must be one of VK_SHADER_STAGE_RAYGEN_BIT_KHR, VK_SHADER_STAGE_ANY_HIT_BIT_KHR, VK_SHADER_STAGE_CLOSEST_HIT_BIT_KHR, VK_SHADER_STAGE_MISS_BIT_KHR, VK_SHADER_STAGE_INTERSECTION_BIT_KHR, or VK_SHADER_STAGE_CALLABLE_BIT_KHR

- VUID-VkRayTracingPipelineCreateInfoKHR-flags-11597
  If `flags` includes VK_PIPELINE_CREATE_RAY_TRACING_OPACITY_MICROMAP_BIT_KHR, at least one of the following features must be enabled

  - `VkPhysicalDeviceOpacityMicromapFeaturesKHR`::`micromap`

  - `VkPhysicalDeviceOpacityMicromapFeaturesEXT`::`micromap`

- VUID-VkRayTracingPipelineCreateInfoKHR-pLibraries-11598
  If `flags` includes VK_PIPELINE_CREATE_RAY_TRACING_OPACITY_MICROMAP_BIT_KHR, each element of `pLibraryInfo->pLibraries` must have been created with the VK_PIPELINE_CREATE_RAY_TRACING_OPACITY_MICROMAP_BIT_KHR bit set

- VUID-VkRayTracingPipelineCreateInfoKHR-flags-11599
  If the `VkPhysicalDeviceOpacityMicromapFeaturesKHR`::`micromap` feature is not enabled or `flags` does not include VK_PIPELINE_CREATE_RAY_TRACING_OPACITY_MICROMAP_BIT_KHR, `flags` must not include VK_PIPELINE_CREATE_2_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_KHR

- VUID-VkRayTracingPipelineCreateInfoKHR-flags-08701
  If `flags` includes VK_PIPELINE_CREATE_RAY_TRACING_DISPLACEMENT_MICROMAP_BIT_NV, each element of `pLibraryInfo->pLibraries` must have been created with the VK_PIPELINE_CREATE_RAY_TRACING_DISPLACEMENT_MICROMAP_BIT_NV bit set

- VUID-VkRayTracingPipelineCreateInfoKHR-flags-10392
  If the `pNext` chain includes a VkPipelineCreateFlags2CreateInfo structure, `flags` must not include both VK_PIPELINE_CREATE_2_RAY_TRACING_OPACITY_MICROMAP_BIT_KHR and VK_PIPELINE_CREATE_2_DISALLOW_OPACITY_MICROMAP_BIT_ARM

- VUID-VkRayTracingPipelineCreateInfoKHR-flags-11275
  If VkPipelineCreateFlags2CreateInfoKHR::`flags` includes VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT, all libraries linked to this pipeline must also have that flag set

- VUID-VkRayTracingPipelineCreateInfoKHR-flags-11276
  If VkPipelineCreateFlags2CreateInfoKHR::`flags` does not include VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT, all libraries linked to this pipeline must also not have that flag set

- VUID-VkRayTracingPipelineCreateInfoKHR-flags-12361
  If `flags` includes VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, all libraries linked to this pipeline must also have that flag set

- VUID-VkRayTracingPipelineCreateInfoKHR-flags-12362
  If `flags` does not include VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, all libraries linked to this pipeline must also not have that flag set

- VUID-VkRayTracingPipelineCreateInfoKHR-None-11369
  If VkPipelineCreateFlags2CreateInfoKHR::`flags` does not include VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT, `layout` must not be VK_NULL_HANDLE

Valid Usage (Implicit)

- VUID-VkRayTracingPipelineCreateInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_KHR

- VUID-VkRayTracingPipelineCreateInfoKHR-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkPipelineBinaryInfoKHR, VkPipelineCreateFlags2CreateInfo, VkPipelineCreationFeedbackCreateInfo, VkPipelineRobustnessCreateInfo, VkRayTracingPipelineClusterAccelerationStructureCreateInfoNV, or VkValidationFeaturesEXT

- VUID-VkRayTracingPipelineCreateInfoKHR-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkRayTracingPipelineCreateInfoKHR-pStages-parameter
  If `stageCount` is not `0`, `pStages` must be a valid pointer to an array of `stageCount` valid VkPipelineShaderStageCreateInfo structures

- VUID-VkRayTracingPipelineCreateInfoKHR-pGroups-parameter
  If `groupCount` is not `0`, `pGroups` must be a valid pointer to an array of `groupCount` valid VkRayTracingShaderGroupCreateInfoKHR structures

- VUID-VkRayTracingPipelineCreateInfoKHR-pLibraryInfo-parameter
  If `pLibraryInfo` is not `NULL`, `pLibraryInfo` must be a valid pointer to a valid VkPipelineLibraryCreateInfoKHR structure

- VUID-VkRayTracingPipelineCreateInfoKHR-pLibraryInterface-parameter
  If `pLibraryInterface` is not `NULL`, `pLibraryInterface` must be a valid pointer to a valid VkRayTracingPipelineInterfaceCreateInfoKHR structure

- VUID-VkRayTracingPipelineCreateInfoKHR-pDynamicState-parameter
  If `pDynamicState` is not `NULL`, `pDynamicState` must be a valid pointer to a valid VkPipelineDynamicStateCreateInfo structure

- VUID-VkRayTracingPipelineCreateInfoKHR-layout-parameter
  If `layout` is not VK_NULL_HANDLE, `layout` must be a valid VkPipelineLayout handle

- VUID-VkRayTracingPipelineCreateInfoKHR-commonparent
  Both of `basePipelineHandle`, and `layout` that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevice

The VkRayTracingPipelineClusterAccelerationStructureCreateInfoNV structure is defined as:

    // Provided by VK_KHR_ray_tracing_pipeline with VK_NV_cluster_acceleration_structure
    typedef struct VkRayTracingPipelineClusterAccelerationStructureCreateInfoNV {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           allowClusterAccelerationStructure;
    } VkRayTracingPipelineClusterAccelerationStructureCreateInfoNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `allowClusterAccelerationStructure` controls if cluster acceleration structures are allowed in the ray tracing pipeline.

If no cluster acceleration structures are present in the ray tracing pipeline, `allowClusterAccelerationStructure` should not be used to prevent traversal penalty on some implementations.

Valid Usage

- VUID-VkRayTracingPipelineClusterAccelerationStructureCreateInfoNV-clusterAccelerationStructure-10576
  The `VkPhysicalDeviceClusterAccelerationStructureFeaturesNV`::`clusterAccelerationStructure` feature must be enabled

Valid Usage (Implicit)

- VUID-VkRayTracingPipelineClusterAccelerationStructureCreateInfoNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_RAY_TRACING_PIPELINE_CLUSTER_ACCELERATION_STRUCTURE_CREATE_INFO_NV

Structure Chaining

Extends the structure

  - VkRayTracingPipelineCreateInfoKHR

The `VkRayTracingShaderGroupCreateInfoKHR` structure is defined as:

    // Provided by VK_KHR_ray_tracing_pipeline
    typedef struct VkRayTracingShaderGroupCreateInfoKHR {
        VkStructureType                   sType;
        const void*                       pNext;
        VkRayTracingShaderGroupTypeKHR    type;
        uint32_t                          generalShader;
        uint32_t                          closestHitShader;
        uint32_t                          anyHitShader;
        uint32_t                          intersectionShader;
        const void*                       pShaderGroupCaptureReplayHandle;
    } VkRayTracingShaderGroupCreateInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `type` is the type of hit group specified in this structure.

- `generalShader` is the index of the ray generation, miss, or callable shader from VkRayTracingPipelineCreateInfoKHR::`pStages` in the group if the shader group has `type` of VK_RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR, and VK_SHADER_UNUSED_KHR otherwise.

- `closestHitShader` is the optional index of the closest hit shader from VkRayTracingPipelineCreateInfoKHR::`pStages` in the group if the shader group has `type` of VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR or VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR, and VK_SHADER_UNUSED_KHR otherwise.

- `anyHitShader` is the optional index of the any-hit shader from VkRayTracingPipelineCreateInfoKHR::`pStages` in the group if the shader group has `type` of VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR or VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR, and VK_SHADER_UNUSED_KHR otherwise.

- `intersectionShader` is the index of the intersection shader from VkRayTracingPipelineCreateInfoKHR::`pStages` in the group if the shader group has `type` of VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR, and VK_SHADER_UNUSED_KHR otherwise.

- `pShaderGroupCaptureReplayHandle` is `NULL` or a pointer to replay information for this shader group queried from vkGetRayTracingCaptureReplayShaderGroupHandlesKHR, as described in Ray Tracing Capture Replay. Ignored if VkPhysicalDeviceRayTracingPipelineFeaturesKHR::`rayTracingPipelineShaderGroupHandleCaptureReplay` is VK_FALSE.

If the pipeline is created with VK_PIPELINE_CREATE_LIBRARY_BIT_KHR and the pipelineLibraryGroupHandles feature is enabled, `pShaderGroupCaptureReplayHandle` is inherited by all pipelines which link against this pipeline and remains bitwise identical for any pipeline which references this pipeline library.

Valid Usage

- VUID-VkRayTracingShaderGroupCreateInfoKHR-type-03474
  If `type` is VK_RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR then `generalShader` must be a valid index into the list of shaders, formed by shaders in VkRayTracingPipelineCreateInfoKHR::`pStages` and the shaders imported from pipeline libraries, referring to a shader of VK_SHADER_STAGE_RAYGEN_BIT_KHR, VK_SHADER_STAGE_MISS_BIT_KHR, or VK_SHADER_STAGE_CALLABLE_BIT_KHR

- VUID-VkRayTracingShaderGroupCreateInfoKHR-type-03475
  If `type` is VK_RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR then `closestHitShader`, `anyHitShader`, and `intersectionShader` must be VK_SHADER_UNUSED_KHR

- VUID-VkRayTracingShaderGroupCreateInfoKHR-type-03476
  If `type` is VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR then `intersectionShader` must be a valid index into the list of shaders, formed by shaders in VkRayTracingPipelineCreateInfoKHR::`pStages` and the shaders imported from pipeline libraries, referring to a shader of VK_SHADER_STAGE_INTERSECTION_BIT_KHR

- VUID-VkRayTracingShaderGroupCreateInfoKHR-type-03477
  If `type` is VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR then `intersectionShader` must be VK_SHADER_UNUSED_KHR

- VUID-VkRayTracingShaderGroupCreateInfoKHR-closestHitShader-03478
  `closestHitShader` must be either VK_SHADER_UNUSED_KHR or a valid index into the list of shaders, formed by shaders in VkRayTracingPipelineCreateInfoKHR::`pStages` and the shaders imported from pipeline libraries, referring to a shader of VK_SHADER_STAGE_CLOSEST_HIT_BIT_KHR

- VUID-VkRayTracingShaderGroupCreateInfoKHR-anyHitShader-03479
  `anyHitShader` must be either VK_SHADER_UNUSED_KHR or a valid index into the list of shaders, formed by shaders in VkRayTracingPipelineCreateInfoKHR::`pStages` and the shaders imported from pipeline libraries, referring to a shader of VK_SHADER_STAGE_ANY_HIT_BIT_KHR

- VUID-VkRayTracingShaderGroupCreateInfoKHR-rayTracingPipelineShaderGroupHandleCaptureReplayMixed-03603
  If VkPhysicalDeviceRayTracingPipelineFeaturesKHR::`rayTracingPipelineShaderGroupHandleCaptureReplayMixed` is VK_FALSE then `pShaderGroupCaptureReplayHandle` must not be provided if it has not been provided on a previous call to ray tracing pipeline creation

- VUID-VkRayTracingShaderGroupCreateInfoKHR-rayTracingPipelineShaderGroupHandleCaptureReplayMixed-03604
  If VkPhysicalDeviceRayTracingPipelineFeaturesKHR::`rayTracingPipelineShaderGroupHandleCaptureReplayMixed` is VK_FALSE then the caller must guarantee that no ray tracing pipeline creation commands with `pShaderGroupCaptureReplayHandle` provided execute simultaneously with ray tracing pipeline creation commands without `pShaderGroupCaptureReplayHandle` provided

Valid Usage (Implicit)

- VUID-VkRayTracingShaderGroupCreateInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_KHR

- VUID-VkRayTracingShaderGroupCreateInfoKHR-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkRayTracingShaderGroupCreateInfoKHR-type-parameter
  `type` must be a valid VkRayTracingShaderGroupTypeKHR value

The `VkRayTracingPipelineInterfaceCreateInfoKHR` structure is defined as:

    // Provided by VK_KHR_ray_tracing_pipeline
    typedef struct VkRayTracingPipelineInterfaceCreateInfoKHR {
        VkStructureType    sType;
        const void*        pNext;
        uint32_t           maxPipelineRayPayloadSize;
        uint32_t           maxPipelineRayHitAttributeSize;
    } VkRayTracingPipelineInterfaceCreateInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `maxPipelineRayPayloadSize` is the maximum payload size in bytes used by any shader in the pipeline.

- `maxPipelineRayHitAttributeSize` is the maximum attribute structure size in bytes used by any shader in the pipeline.

`maxPipelineRayPayloadSize` is calculated as the maximum size of the block (in bytes) declared in the `RayPayloadKHR` or `IncomingRayPayloadKHR` storage classes. `maxPipelineRayHitAttributeSize` is calculated as the maximum size of any block (in bytes) declared in the `HitAttributeKHR` or `HitObjectAttributeEXT` storage class. As variables in these storage classes do not have explicit offsets, the size should be calculated as if each variable has a scalar alignment equal to the largest scalar alignment of any of the block’s members.

Note | There is no explicit upper limit for `maxPipelineRayPayloadSize`, but in practice it should be kept as small as possible. Similar to invocation local memory, it must be allocated for each shader invocation and for devices which support many simultaneous invocations, this storage can rapidly be exhausted, resulting in failure.

Valid Usage

- VUID-VkRayTracingPipelineInterfaceCreateInfoKHR-maxPipelineRayHitAttributeSize-03605
  `maxPipelineRayHitAttributeSize` must be less than or equal to VkPhysicalDeviceRayTracingPipelinePropertiesKHR::`maxRayHitAttributeSize`

Valid Usage (Implicit)

- VUID-VkRayTracingPipelineInterfaceCreateInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_RAY_TRACING_PIPELINE_INTERFACE_CREATE_INFO_KHR

- VUID-VkRayTracingPipelineInterfaceCreateInfoKHR-pNext-pNext
  `pNext` must be `NULL`

To create ray tracing pipelines, call:

    // Provided by VK_NV_ray_tracing
    VkResult vkCreateRayTracingPipelinesNV(
        VkDevice                                    device,
        VkPipelineCache                             pipelineCache,
        uint32_t                                    createInfoCount,
        const VkRayTracingPipelineCreateInfoNV*     pCreateInfos,
        const VkAllocationCallbacks*                pAllocator,
        VkPipeline*                                 pPipelines);

- `device` is the logical device that creates the ray tracing pipelines.

- `pipelineCache` is either VK_NULL_HANDLE, indicating that pipeline caching is disabled, or to enable caching, the handle of a valid VkPipelineCache object. The implementation must not access this object outside of the duration of this command.

- `createInfoCount` is the length of the `pCreateInfos` and `pPipelines` arrays.

- `pCreateInfos` is a pointer to an array of VkRayTracingPipelineCreateInfoNV structures.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

- `pPipelines` is a pointer to an array in which the resulting ray tracing pipeline objects are returned.

Pipelines are created and returned as described for Multiple Pipeline Creation.

Valid Usage

- VUID-vkCreateRayTracingPipelinesNV-device-09677
  `device` must support at least one queue family with the VK_QUEUE_COMPUTE_BIT capability

- VUID-vkCreateRayTracingPipelinesNV-flags-03415
  If the `flags` member of any element of `pCreateInfos` contains the VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, and the `basePipelineIndex` member of that same element is not `-1`, `basePipelineIndex` must be less than the index into `pCreateInfos` that corresponds to that element

- VUID-vkCreateRayTracingPipelinesNV-flags-03416
  If the `flags` member of any element of `pCreateInfos` contains the VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, the base pipeline must have been created with the VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT flag set

- VUID-vkCreateRayTracingPipelinesNV-flags-03816
  `flags` must not contain the VK_PIPELINE_CREATE_DISPATCH_BASE_BIT flag

- VUID-vkCreateRayTracingPipelinesNV-pipelineCache-02903
  If `pipelineCache` was created with VK_PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT, host access to `pipelineCache` must be externally synchronized

- VUID-vkCreateRayTracingPipelinesNV-pNext-09616
  If VkPipelineBinaryInfoKHR::`binaryCount` is not `0` for any element of `pCreateInfos`, `pipelineCache` must be VK_NULL_HANDLE

- VUID-vkCreateRayTracingPipelinesNV-pNext-09617
  If a VkPipelineCreateFlags2CreateInfoKHR structure with the VK_PIPELINE_CREATE_2_CAPTURE_DATA_BIT_KHR flag set is included in the `pNext` chain of any element of `pCreateInfos`, `pipelineCache` must be VK_NULL_HANDLE

- VUID-vkCreateRayTracingPipelinesNV-binaryCount-09620
  If VkPipelineBinaryInfoKHR::`binaryCount` is not `0` for any element of `pCreateInfos`, VK_PIPELINE_CREATION_FEEDBACK_APPLICATION_PIPELINE_CACHE_HIT_BIT must not be set in the `flags` of that element

- VUID-vkCreateRayTracingPipelinesNV-binaryCount-09621
  If VkPipelineBinaryInfoKHR::`binaryCount` is not `0` for any element of `pCreateInfos`, VK_PIPELINE_CREATION_FEEDBACK_BASE_PIPELINE_ACCELERATION_BIT must not be set in the `flags` of that element

- VUID-vkCreateRayTracingPipelinesNV-binaryCount-09622
  If VkPipelineBinaryInfoKHR::`binaryCount` is not `0` for any element of `pCreateInfos`, VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT_EXT must not be set in the `flags` of that element

- VUID-vkCreateRayTracingPipelinesNV-pCreateInfos-11414
  If any element of `pCreateInfos` sets VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT and includes embedded sampler mappings, there must be less than (`maxSamplerAllocationCount` - (`minSamplerHeapReservedRangeWithEmbedded` / `samplerDescriptorSize`)) VkSampler objects currently created on the device

- VUID-vkCreateRayTracingPipelinesNV-pCreateInfos-11429
  If any element of `pCreateInfos` sets VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT and includes embedded sampler mappings, this command must not cause the total number of unique embedded samplers in pipelines and shaders on this device to exceed `maxDescriptorHeapEmbeddedSamplers`

- VUID-vkCreateRayTracingPipelinesNV-pNext-10150
  If a VkPipelineCreateFlags2CreateInfoKHR structure is included in the `pNext` chain of any element of `pCreateInfos`, VK_PIPELINE_CREATE_2_CAPTURE_DATA_BIT_KHR flag must not be set

Valid Usage (Implicit)

- VUID-vkCreateRayTracingPipelinesNV-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkCreateRayTracingPipelinesNV-pipelineCache-parameter
  If `pipelineCache` is not VK_NULL_HANDLE, `pipelineCache` must be a valid VkPipelineCache handle

- VUID-vkCreateRayTracingPipelinesNV-pCreateInfos-parameter
  `pCreateInfos` must be a valid pointer to an array of `createInfoCount` valid VkRayTracingPipelineCreateInfoNV structures

- VUID-vkCreateRayTracingPipelinesNV-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateRayTracingPipelinesNV-pPipelines-parameter
  `pPipelines` must be a valid pointer to an array of `createInfoCount` VkPipeline handles

- VUID-vkCreateRayTracingPipelinesNV-createInfoCount-arraylength
  `createInfoCount` must be greater than `0`

- VUID-vkCreateRayTracingPipelinesNV-pipelineCache-parent
  If `pipelineCache` is a valid handle, it must have been created, allocated, or retrieved from `device`

Return Codes

Success

  - VK_PIPELINE_COMPILE_REQUIRED_EXT

  - VK_SUCCESS

Failure

  - VK_ERROR_INVALID_SHADER_NV

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkRayTracingPipelineCreateInfoNV` structure is defined as:

    // Provided by VK_NV_ray_tracing
    typedef struct VkRayTracingPipelineCreateInfoNV {
        VkStructureType                               sType;
        const void*                                   pNext;
        VkPipelineCreateFlags                         flags;
        uint32_t                                      stageCount;
        const VkPipelineShaderStageCreateInfo*        pStages;
        uint32_t                                      groupCount;
        const VkRayTracingShaderGroupCreateInfoNV*    pGroups;
        uint32_t                                      maxRecursionDepth;
        VkPipelineLayout                              layout;
        VkPipeline                                    basePipelineHandle;
        int32_t                                       basePipelineIndex;
    } VkRayTracingPipelineCreateInfoNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask of VkPipelineCreateFlagBits specifying how the pipeline will be generated.

- `stageCount` is the number of entries in the `pStages` array.

- `pStages` is a pointer to an array of VkPipelineShaderStageCreateInfo structures specifying the set of the shader stages to be included in the ray tracing pipeline.

- `groupCount` is the number of entries in the `pGroups` array.

- `pGroups` is a pointer to an array of VkRayTracingShaderGroupCreateInfoNV structures describing the set of the shader stages to be included in each shader group in the ray tracing pipeline.

- `maxRecursionDepth` is the maximum recursion depth of shaders executed by this pipeline.

- `layout` is the description of binding locations used by both the pipeline and descriptor sets used with the pipeline. If VkPhysicalDeviceProperties::`apiVersion` is greater than or equal to Vulkan 1.3 or VK_KHR_maintenance4 is enabled `layout` must not be accessed by the implementation outside of the duration of the command this structure is passed to.

- `basePipelineHandle` is a pipeline to derive from.

- `basePipelineIndex` is an index into the `pCreateInfos` parameter to use as a pipeline to derive from.

The parameters `basePipelineHandle` and `basePipelineIndex` are described in more detail in Pipeline Derivatives.

If the `pNext` chain includes a VkPipelineCreateFlags2CreateInfo structure, VkPipelineCreateFlags2CreateInfo::`flags` from that structure is used instead of `flags` from this structure.

Valid Usage

- VUID-VkRayTracingPipelineCreateInfoNV-None-09497
  If the `pNext` chain does not include a VkPipelineCreateFlags2CreateInfo structure, `flags` must be a valid combination of VkPipelineCreateFlagBits values

- VUID-VkRayTracingPipelineCreateInfoNV-flags-07984
  If `flags` contains the VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, and `basePipelineIndex` is -1, `basePipelineHandle` must be a valid ray tracing `VkPipeline` handle

- VUID-VkRayTracingPipelineCreateInfoNV-flags-07985
  If `flags` contains the VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, and `basePipelineHandle` is VK_NULL_HANDLE, `basePipelineIndex` must be a valid index into the calling command’s `pCreateInfos` parameter

- VUID-VkRayTracingPipelineCreateInfoNV-flags-07986
  If `flags` contains the VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, `basePipelineIndex` must be -1 or `basePipelineHandle` must be VK_NULL_HANDLE

- VUID-VkRayTracingPipelineCreateInfoNV-layout-07987
  If a push constant block is declared in a shader and `layout` is not VK_NULL_HANDLE, a push constant range in `layout` must match the shader stage

- VUID-VkRayTracingPipelineCreateInfoNV-layout-10069
  If a push constant block is declared in a shader and `layout` is not VK_NULL_HANDLE, the block must be contained inside the push constant range in `layout` that matches the stage

- VUID-VkRayTracingPipelineCreateInfoNV-layout-07988
  If a resource variable is declared in a shader and `layout` is not VK_NULL_HANDLE, the corresponding descriptor set in `layout` must match the shader stage

- VUID-VkRayTracingPipelineCreateInfoNV-layout-07990
  If a resource variable is declared in a shader, `layout` is not VK_NULL_HANDLE, and the descriptor type is not VK_DESCRIPTOR_TYPE_MUTABLE_EXT, the corresponding descriptor set in `layout` must match the descriptor type

- VUID-VkRayTracingPipelineCreateInfoNV-layout-07991
  If a resource variable is declared in a shader as an array and `layout` is not VK_NULL_HANDLE, the corresponding descriptor binding used to create `layout` must have a `descriptorCount` that is greater than or equal to the length of the array

- VUID-VkRayTracingPipelineCreateInfoNV-None-10391
  If a resource variables is declared in a shader as an array of descriptors, then the descriptor type of that variable must not be VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK

- VUID-VkRayTracingPipelineCreateInfoNV-flags-11798
  If shader64BitIndexing feature is not enabled, `flags` must not contain VK_PIPELINE_CREATE_2_64_BIT_INDEXING_BIT_EXT

- VUID-VkRayTracingPipelineCreateInfoNV-pipelineCreationCacheControl-02878
  If the `pipelineCreationCacheControl` feature is not enabled, `flags` must not include VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT nor VK_PIPELINE_CREATE_EARLY_RETURN_ON_FAILURE_BIT

- VUID-VkRayTracingPipelineCreateInfoNV-pipelineProtectedAccess-07368
  If the `pipelineProtectedAccess` feature is not enabled, `flags` must not include VK_PIPELINE_CREATE_NO_PROTECTED_ACCESS_BIT nor VK_PIPELINE_CREATE_PROTECTED_ACCESS_ONLY_BIT

- VUID-VkRayTracingPipelineCreateInfoNV-flags-07369
  `flags` must not include both VK_PIPELINE_CREATE_NO_PROTECTED_ACCESS_BIT and VK_PIPELINE_CREATE_PROTECTED_ACCESS_ONLY_BIT

- VUID-VkRayTracingPipelineCreateInfoNV-flags-11311
  If VkPipelineCreateFlags2CreateInfoKHR::`flags` includes VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT, `layout` must be VK_NULL_HANDLE

- VUID-VkRayTracingPipelineCreateInfoNV-flags-11312
  If VkPipelineCreateFlags2CreateInfoKHR::`flags` includes VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT, all shader variables in the shader resource interface with a `DescriptorSet` and `Binding` decoration must have a mapping declared in VkShaderDescriptorSetAndBindingMappingInfoEXT::`pMappings`

- VUID-VkRayTracingPipelineCreateInfoNV-pStages-03426
  The shader code for the entry points identified by `pStages`, and the rest of the state identified by this structure must adhere to the pipeline linking rules described in the Shader Interfaces chapter

- VUID-VkRayTracingPipelineCreateInfoNV-layout-03428
  The number of resources in `layout` accessible to each shader stage that is used by the pipeline must be less than or equal to VkPhysicalDeviceLimits::`maxPerStageResources`

- VUID-VkRayTracingPipelineCreateInfoNV-flags-02904
  `flags` must not include VK_PIPELINE_CREATE_INDIRECT_BINDABLE_BIT_NV

- VUID-VkRayTracingPipelineCreateInfoNV-flags-12341
  `flags` must not include VK_PIPELINE_CREATE_NO_PROTECTED_ACCESS_BIT nor VK_PIPELINE_CREATE_PROTECTED_ACCESS_ONLY_BIT

- VUID-VkRayTracingPipelineCreateInfoNV-layout-12402
  If `layout` is not VK_NULL_HANDLE, it must not have been created with VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT

- VUID-VkRayTracingPipelineCreateInfoNV-stage-06232
  The `stage` member of at least one element of `pStages` must be VK_SHADER_STAGE_RAYGEN_BIT_KHR

- VUID-VkRayTracingPipelineCreateInfoNV-flags-03456
  `flags` must not include VK_PIPELINE_CREATE_LIBRARY_BIT_KHR

- VUID-VkRayTracingPipelineCreateInfoNV-maxRecursionDepth-03457
  `maxRecursionDepth` must be less than or equal to VkPhysicalDeviceRayTracingPropertiesNV::`maxRecursionDepth`

- VUID-VkRayTracingPipelineCreateInfoNV-flags-03458
  `flags` must not include VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR

- VUID-VkRayTracingPipelineCreateInfoNV-flags-03459
  `flags` must not include VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR

- VUID-VkRayTracingPipelineCreateInfoNV-flags-03460
  `flags` must not include VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR

- VUID-VkRayTracingPipelineCreateInfoNV-flags-03461
  `flags` must not include VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR

- VUID-VkRayTracingPipelineCreateInfoNV-flags-03462
  `flags` must not include VK_PIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT_KHR

- VUID-VkRayTracingPipelineCreateInfoNV-flags-03463
  `flags` must not include VK_PIPELINE_CREATE_RAY_TRACING_SKIP_TRIANGLES_BIT_KHR

- VUID-VkRayTracingPipelineCreateInfoNV-flags-03588
  `flags` must not include VK_PIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR

- VUID-VkRayTracingPipelineCreateInfoNV-flags-04948
  `flags` must not include VK_PIPELINE_CREATE_RAY_TRACING_ALLOW_MOTION_BIT_NV

- VUID-VkRayTracingPipelineCreateInfoNV-flags-02957
  `flags` must not include both VK_PIPELINE_CREATE_DEFER_COMPILE_BIT_NV and VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT at the same time

- VUID-VkRayTracingPipelineCreateInfoNV-pipelineStageCreationFeedbackCount-06651
  If VkPipelineCreationFeedbackCreateInfo::`pipelineStageCreationFeedbackCount` is not `0`, it must be equal to `stageCount`

- VUID-VkRayTracingPipelineCreateInfoNV-stage-06898
  The `stage` value in all `pStages` elements must be one of VK_SHADER_STAGE_RAYGEN_BIT_KHR, VK_SHADER_STAGE_ANY_HIT_BIT_KHR, VK_SHADER_STAGE_CLOSEST_HIT_BIT_KHR, VK_SHADER_STAGE_MISS_BIT_KHR, VK_SHADER_STAGE_INTERSECTION_BIT_KHR, or VK_SHADER_STAGE_CALLABLE_BIT_KHR

- VUID-VkRayTracingPipelineCreateInfoNV-flags-11596
  `flags` must not include any of the following bits

  - VK_PIPELINE_CREATE_RAY_TRACING_OPACITY_MICROMAP_BIT_KHR

  - VK_PIPELINE_CREATE_2_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_KHR

- VUID-VkRayTracingPipelineCreateInfoNV-flags-07402
  `flags` must not include VK_PIPELINE_CREATE_RAY_TRACING_OPACITY_MICROMAP_BIT_EXT

- VUID-VkRayTracingPipelineCreateInfoNV-flags-07998
  `flags` must not include VK_PIPELINE_CREATE_RAY_TRACING_DISPLACEMENT_MICROMAP_BIT_NV

- VUID-VkRayTracingPipelineCreateInfoNV-flags-11008
  `flags` must not include VK_PIPELINE_CREATE_2_INDIRECT_BINDABLE_BIT_EXT

- VUID-VkRayTracingPipelineCreateInfoNV-None-11368
  If VkPipelineCreateFlags2CreateInfoKHR::`flags` does not include VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT, `layout` must not be VK_NULL_HANDLE

Valid Usage (Implicit)

- VUID-VkRayTracingPipelineCreateInfoNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_NV

- VUID-VkRayTracingPipelineCreateInfoNV-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkPipelineCreateFlags2CreateInfo or VkPipelineCreationFeedbackCreateInfo

- VUID-VkRayTracingPipelineCreateInfoNV-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkRayTracingPipelineCreateInfoNV-pStages-parameter
  `pStages` must be a valid pointer to an array of `stageCount` valid VkPipelineShaderStageCreateInfo structures

- VUID-VkRayTracingPipelineCreateInfoNV-pGroups-parameter
  `pGroups` must be a valid pointer to an array of `groupCount` valid VkRayTracingShaderGroupCreateInfoNV structures

- VUID-VkRayTracingPipelineCreateInfoNV-layout-parameter
  If `layout` is not VK_NULL_HANDLE, `layout` must be a valid VkPipelineLayout handle

- VUID-VkRayTracingPipelineCreateInfoNV-stageCount-arraylength
  `stageCount` must be greater than `0`

- VUID-VkRayTracingPipelineCreateInfoNV-groupCount-arraylength
  `groupCount` must be greater than `0`

- VUID-VkRayTracingPipelineCreateInfoNV-commonparent
  Both of `basePipelineHandle`, and `layout` that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevice

The `VkRayTracingShaderGroupCreateInfoNV` structure is defined as:

    // Provided by VK_NV_ray_tracing
    typedef struct VkRayTracingShaderGroupCreateInfoNV {
        VkStructureType                   sType;
        const void*                       pNext;
        VkRayTracingShaderGroupTypeKHR    type;
        uint32_t                          generalShader;
        uint32_t                          closestHitShader;
        uint32_t                          anyHitShader;
        uint32_t                          intersectionShader;
    } VkRayTracingShaderGroupCreateInfoNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `type` is the type of hit group specified in this structure.

- `generalShader` is the index of the ray generation, miss, or callable shader from VkRayTracingPipelineCreateInfoNV::`pStages` in the group if the shader group has `type` of VK_RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_NV, and VK_SHADER_UNUSED_NV otherwise.

- `closestHitShader` is the optional index of the closest hit shader from VkRayTracingPipelineCreateInfoNV::`pStages` in the group if the shader group has `type` of VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_NV or VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_NV, and VK_SHADER_UNUSED_NV otherwise.

- `anyHitShader` is the optional index of the any-hit shader from VkRayTracingPipelineCreateInfoNV::`pStages` in the group if the shader group has `type` of VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_NV or VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_NV, and VK_SHADER_UNUSED_NV otherwise.

- `intersectionShader` is the index of the intersection shader from VkRayTracingPipelineCreateInfoNV::`pStages` in the group if the shader group has `type` of VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_NV, and VK_SHADER_UNUSED_NV otherwise.

Valid Usage

- VUID-VkRayTracingShaderGroupCreateInfoNV-type-02413
  If `type` is VK_RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_NV then `generalShader` must be a valid index into VkRayTracingPipelineCreateInfoNV::`pStages` referring to a shader of VK_SHADER_STAGE_RAYGEN_BIT_NV, VK_SHADER_STAGE_MISS_BIT_NV, or VK_SHADER_STAGE_CALLABLE_BIT_NV

- VUID-VkRayTracingShaderGroupCreateInfoNV-type-02414
  If `type` is VK_RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_NV then `closestHitShader`, `anyHitShader`, and `intersectionShader` must be VK_SHADER_UNUSED_NV

- VUID-VkRayTracingShaderGroupCreateInfoNV-type-02415
  If `type` is VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_NV then `intersectionShader` must be a valid index into VkRayTracingPipelineCreateInfoNV::`pStages` referring to a shader of VK_SHADER_STAGE_INTERSECTION_BIT_NV

- VUID-VkRayTracingShaderGroupCreateInfoNV-type-02416
  If `type` is VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_NV then `intersectionShader` must be VK_SHADER_UNUSED_NV

- VUID-VkRayTracingShaderGroupCreateInfoNV-closestHitShader-02417
  `closestHitShader` must be either VK_SHADER_UNUSED_NV or a valid index into VkRayTracingPipelineCreateInfoNV::`pStages` referring to a shader of VK_SHADER_STAGE_CLOSEST_HIT_BIT_NV

- VUID-VkRayTracingShaderGroupCreateInfoNV-anyHitShader-02418
  `anyHitShader` must be either VK_SHADER_UNUSED_NV or a valid index into VkRayTracingPipelineCreateInfoNV::`pStages` referring to a shader of VK_SHADER_STAGE_ANY_HIT_BIT_NV

Valid Usage (Implicit)

- VUID-VkRayTracingShaderGroupCreateInfoNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_NV

- VUID-VkRayTracingShaderGroupCreateInfoNV-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkRayTracingShaderGroupCreateInfoNV-type-parameter
  `type` must be a valid VkRayTracingShaderGroupTypeKHR value

#### 10.5.3. Ray Tracing Pipeline Queries and Commands

To query the opaque handles of shaders in the ray tracing pipeline, call:

    // Provided by VK_KHR_ray_tracing_pipeline
    VkResult vkGetRayTracingShaderGroupHandlesKHR(
        VkDevice                                    device,
        VkPipeline                                  pipeline,
        uint32_t                                    firstGroup,
        uint32_t                                    groupCount,
        size_t                                      dataSize,
        void*                                       pData);

    // Provided by VK_NV_ray_tracing
    // Equivalent to vkGetRayTracingShaderGroupHandlesKHR
    VkResult vkGetRayTracingShaderGroupHandlesNV(
        VkDevice                                    device,
        VkPipeline                                  pipeline,
        uint32_t                                    firstGroup,
        uint32_t                                    groupCount,
        size_t                                      dataSize,
        void*                                       pData);

- `device` is the logical device containing the ray tracing pipeline.

- `pipeline` is the ray tracing pipeline object containing the shaders.

- `firstGroup` is the index of the first group to retrieve a handle for from the VkRayTracingPipelineCreateInfoKHR::`pGroups` or VkRayTracingPipelineCreateInfoNV::`pGroups` array.

- `groupCount` is the number of shader handles to retrieve.

- `dataSize` is the size in bytes of the buffer pointed to by `pData`.

- `pData` is a pointer to an application-allocated buffer where the results will be written.

On success, an array of `groupCount` shader handles will be written to `pData`, with each element being of size VkPhysicalDeviceRayTracingPipelinePropertiesKHR::`shaderGroupHandleSize`. The first handle written corresponds to the group identified by `firstGroup`, with subsequent handles corresponding to consecutive shader groups in the order they appear in the VkRayTracingPipelineCreateInfoKHR::`pGroups` or VkRayTracingPipelineCreateInfoNV::`pGroups` array.

If `pipeline` was created with VK_PIPELINE_CREATE_LIBRARY_BIT_KHR and the pipelineLibraryGroupHandles feature is enabled applications can query group handles from that pipeline, even if the pipeline is a library and is never bound to a command buffer. These group handles remain bitwise identical for any `pipeline` which references the pipeline library. Group indices are assigned as-if the pipeline was created without VK_PIPELINE_CREATE_LIBRARY_BIT_KHR.

Valid Usage

- VUID-vkGetRayTracingShaderGroupHandlesKHR-pipeline-04619
  `pipeline` must be a ray tracing pipeline

- VUID-vkGetRayTracingShaderGroupHandlesKHR-firstGroup-04050
  `firstGroup` must be less than the number of shader groups in `pipeline`

- VUID-vkGetRayTracingShaderGroupHandlesKHR-firstGroup-02419
  The sum of `firstGroup` and `groupCount` must be less than or equal to the number of shader groups in `pipeline`

- VUID-vkGetRayTracingShaderGroupHandlesKHR-dataSize-02420
  `dataSize` must be at least VkPhysicalDeviceRayTracingPipelinePropertiesKHR::`shaderGroupHandleSize` × `groupCount`

- VUID-vkGetRayTracingShaderGroupHandlesKHR-pipeline-07828
  If the pipelineLibraryGroupHandles feature is not enabled, `pipeline` must not have been created with VK_PIPELINE_CREATE_LIBRARY_BIT_KHR

Valid Usage (Implicit)

- VUID-vkGetRayTracingShaderGroupHandlesKHR-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetRayTracingShaderGroupHandlesKHR-pipeline-parameter
  `pipeline` must be a valid VkPipeline handle

- VUID-vkGetRayTracingShaderGroupHandlesKHR-pData-parameter
  `pData` must be a valid pointer to an array of `dataSize` bytes

- VUID-vkGetRayTracingShaderGroupHandlesKHR-dataSize-arraylength
  `dataSize` must be greater than `0`

- VUID-vkGetRayTracingShaderGroupHandlesKHR-pipeline-parent
  `pipeline` must have been created, allocated, or retrieved from `device`

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

To query the opaque capture data of shader groups in a ray tracing pipeline, call:

    // Provided by VK_KHR_ray_tracing_pipeline
    VkResult vkGetRayTracingCaptureReplayShaderGroupHandlesKHR(
        VkDevice                                    device,
        VkPipeline                                  pipeline,
        uint32_t                                    firstGroup,
        uint32_t                                    groupCount,
        size_t                                      dataSize,
        void*                                       pData);

- `device` is the logical device containing the ray tracing pipeline.

- `pipeline` is the ray tracing pipeline object containing the shaders.

- `firstGroup` is the index of the first group to retrieve a handle for from the VkRayTracingPipelineCreateInfoKHR::`pGroups` array.

- `groupCount` is the number of shader handles to retrieve.

- `dataSize` is the size in bytes of the buffer pointed to by `pData`.

- `pData` is a pointer to an application-allocated buffer where the results will be written.

On success, an array of `groupCount` shader handles will be written to `pData`, with each element being of size VkPhysicalDeviceRayTracingPipelinePropertiesKHR::`shaderGroupHandleCaptureReplaySize`. The first handle written corresponds to the group identified by `firstGroup`, with subsequent handles corresponding to consecutive shader groups in the order they appear in the VkRayTracingPipelineCreateInfoKHR::`pGroups` array.

Once queried, this opaque data can be provided at pipeline creation time (in a subsequent execution), using VkRayTracingShaderGroupCreateInfoKHR::`pShaderGroupCaptureReplayHandle`, as described in Ray Tracing Capture Replay.

If `pipeline` was created with VK_PIPELINE_CREATE_LIBRARY_BIT_KHR and the pipelineLibraryGroupHandles feature is enabled applications can query capture replay group handles from that pipeline. The capture replay handle remains bitwise identical for any `pipeline` which references the pipeline library. Group indices are assigned as-if the pipeline was created without VK_PIPELINE_CREATE_LIBRARY_BIT_KHR.

Valid Usage

- VUID-vkGetRayTracingCaptureReplayShaderGroupHandlesKHR-pipeline-04620
  `pipeline` must be a ray tracing pipeline

- VUID-vkGetRayTracingCaptureReplayShaderGroupHandlesKHR-firstGroup-04051
  `firstGroup` must be less than the number of shader groups in `pipeline`

- VUID-vkGetRayTracingCaptureReplayShaderGroupHandlesKHR-firstGroup-03483
  The sum of `firstGroup` and `groupCount` must be less than or equal to the number of shader groups in `pipeline`

- VUID-vkGetRayTracingCaptureReplayShaderGroupHandlesKHR-dataSize-03484
  `dataSize` must be at least VkPhysicalDeviceRayTracingPipelinePropertiesKHR::`shaderGroupHandleCaptureReplaySize` × `groupCount`

- VUID-vkGetRayTracingCaptureReplayShaderGroupHandlesKHR-rayTracingPipelineShaderGroupHandleCaptureReplay-03606
  `VkPhysicalDeviceRayTracingPipelineFeaturesKHR`::`rayTracingPipelineShaderGroupHandleCaptureReplay` must be enabled to call this function

- VUID-vkGetRayTracingCaptureReplayShaderGroupHandlesKHR-pipeline-03607
  `pipeline` must have been created with a `flags` that included VK_PIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR

- VUID-vkGetRayTracingCaptureReplayShaderGroupHandlesKHR-pipeline-07829
  If the pipelineLibraryGroupHandles feature is not enabled, `pipeline` must not have been created with VK_PIPELINE_CREATE_LIBRARY_BIT_KHR

Valid Usage (Implicit)

- VUID-vkGetRayTracingCaptureReplayShaderGroupHandlesKHR-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetRayTracingCaptureReplayShaderGroupHandlesKHR-pipeline-parameter
  `pipeline` must be a valid VkPipeline handle

- VUID-vkGetRayTracingCaptureReplayShaderGroupHandlesKHR-pData-parameter
  `pData` must be a valid pointer to an array of `dataSize` bytes

- VUID-vkGetRayTracingCaptureReplayShaderGroupHandlesKHR-dataSize-arraylength
  `dataSize` must be greater than `0`

- VUID-vkGetRayTracingCaptureReplayShaderGroupHandlesKHR-pipeline-parent
  `pipeline` must have been created, allocated, or retrieved from `device`

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

To query the pipeline stack size of shaders in a shader group in the ray tracing pipeline, call:

    // Provided by VK_KHR_ray_tracing_pipeline
    VkDeviceSize vkGetRayTracingShaderGroupStackSizeKHR(
        VkDevice                                    device,
        VkPipeline                                  pipeline,
        uint32_t                                    group,
        VkShaderGroupShaderKHR                      groupShader);

- `device` is the logical device containing the ray tracing pipeline.

- `pipeline` is the ray tracing pipeline object containing the shaders groups.

- `group` is the index of the shader group to query.

- `groupShader` is the type of shader from the group to query.

The return value is the ray tracing pipeline stack size in bytes for the specified shader as called from the specified shader group.

Valid Usage

- VUID-vkGetRayTracingShaderGroupStackSizeKHR-pipeline-04622
  `pipeline` must be a ray tracing pipeline

- VUID-vkGetRayTracingShaderGroupStackSizeKHR-group-03608
  The value of `group` must be less than the number of shader groups in `pipeline`

- VUID-vkGetRayTracingShaderGroupStackSizeKHR-groupShader-03609
  The shader identified by `groupShader` in `group` must not be VK_SHADER_UNUSED_KHR

Valid Usage (Implicit)

- VUID-vkGetRayTracingShaderGroupStackSizeKHR-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetRayTracingShaderGroupStackSizeKHR-pipeline-parameter
  `pipeline` must be a valid VkPipeline handle

- VUID-vkGetRayTracingShaderGroupStackSizeKHR-groupShader-parameter
  `groupShader` must be a valid VkShaderGroupShaderKHR value

- VUID-vkGetRayTracingShaderGroupStackSizeKHR-pipeline-parent
  `pipeline` must have been created, allocated, or retrieved from `device`

Possible values of `groupShader` in vkGetRayTracingShaderGroupStackSizeKHR are:

    // Provided by VK_KHR_ray_tracing_pipeline
    typedef enum VkShaderGroupShaderKHR {
        VK_SHADER_GROUP_SHADER_GENERAL_KHR = 0,
        VK_SHADER_GROUP_SHADER_CLOSEST_HIT_KHR = 1,
        VK_SHADER_GROUP_SHADER_ANY_HIT_KHR = 2,
        VK_SHADER_GROUP_SHADER_INTERSECTION_KHR = 3,
    } VkShaderGroupShaderKHR;

- VK_SHADER_GROUP_SHADER_GENERAL_KHR uses the shader specified in the group with VkRayTracingShaderGroupCreateInfoKHR::`generalShader`

- VK_SHADER_GROUP_SHADER_CLOSEST_HIT_KHR uses the shader specified in the group with VkRayTracingShaderGroupCreateInfoKHR::`closestHitShader`

- VK_SHADER_GROUP_SHADER_ANY_HIT_KHR uses the shader specified in the group with VkRayTracingShaderGroupCreateInfoKHR::`anyHitShader`

- VK_SHADER_GROUP_SHADER_INTERSECTION_KHR uses the shader specified in the group with VkRayTracingShaderGroupCreateInfoKHR::`intersectionShader`

To dynamically set the stack size for a ray tracing pipeline, call:

    // Provided by VK_KHR_ray_tracing_pipeline
    void vkCmdSetRayTracingPipelineStackSizeKHR(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    pipelineStackSize);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `pipelineStackSize` is the stack size to use for subsequent ray tracing trace commands.

This command sets the stack size for subsequent ray tracing commands when the ray tracing pipeline is created with VK_DYNAMIC_STATE_RAY_TRACING_PIPELINE_STACK_SIZE_KHR set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, the stack size is computed as described in Ray Tracing Pipeline Stack.

Valid Usage

- VUID-vkCmdSetRayTracingPipelineStackSizeKHR-pipelineStackSize-03610
  `pipelineStackSize` must be large enough for any dynamic execution through the shaders in the ray tracing pipeline used by a subsequent trace call

Valid Usage (Implicit)

- VUID-vkCmdSetRayTracingPipelineStackSizeKHR-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetRayTracingPipelineStackSizeKHR-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetRayTracingPipelineStackSizeKHR-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT operations

- VUID-vkCmdSetRayTracingPipelineStackSizeKHR-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdSetRayTracingPipelineStackSizeKHR-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Outside | VK_QUEUE_COMPUTE_BIT | State

Conditional Rendering

vkCmdSetRayTracingPipelineStackSizeKHR is not affected by conditional rendering

Ray tracing pipelines can contain more shaders than a graphics or compute pipeline, so to allow parallel compilation of shaders within a pipeline, an application can choose to defer compilation until a later point in time.

To compile a deferred shader in a pipeline call:

    // Provided by VK_NV_ray_tracing
    VkResult vkCompileDeferredNV(
        VkDevice                                    device,
        VkPipeline                                  pipeline,
        uint32_t                                    shader);

- `device` is the logical device containing the ray tracing pipeline.

- `pipeline` is the ray tracing pipeline object containing the shaders.

- `shader` is the index of the shader to compile.

Valid Usage

- VUID-vkCompileDeferredNV-pipeline-04621
  `pipeline` must be a ray tracing pipeline

- VUID-vkCompileDeferredNV-pipeline-02237
  `pipeline` must have been created with VK_PIPELINE_CREATE_DEFER_COMPILE_BIT_NV

- VUID-vkCompileDeferredNV-shader-02238
  `shader` must not have been called as a deferred compile before

Valid Usage (Implicit)

- VUID-vkCompileDeferredNV-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkCompileDeferredNV-pipeline-parameter
  `pipeline` must be a valid VkPipeline handle

- VUID-vkCompileDeferredNV-pipeline-parent
  `pipeline` must have been created, allocated, or retrieved from `device`

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

### 10.6. Pipeline Destruction

To destroy a pipeline, call:

    // Provided by VK_VERSION_1_0
    void vkDestroyPipeline(
        VkDevice                                    device,
        VkPipeline                                  pipeline,
        const VkAllocationCallbacks*                pAllocator);

- `device` is the logical device that destroys the pipeline.

- `pipeline` is the handle of the pipeline to destroy.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

Valid Usage

- VUID-vkDestroyPipeline-pipeline-00765
  All submitted commands that refer to `pipeline` must have completed execution

- VUID-vkDestroyPipeline-pipeline-00766
  If `VkAllocationCallbacks` were provided when `pipeline` was created, a compatible set of callbacks must be provided here

- VUID-vkDestroyPipeline-pipeline-00767
  If no `VkAllocationCallbacks` were provided when `pipeline` was created, `pAllocator` must be `NULL`

Valid Usage (Implicit)

- VUID-vkDestroyPipeline-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkDestroyPipeline-pipeline-parameter
  If `pipeline` is not VK_NULL_HANDLE, `pipeline` must be a valid VkPipeline handle

- VUID-vkDestroyPipeline-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkDestroyPipeline-pipeline-parent
  If `pipeline` is a valid handle, it must have been created, allocated, or retrieved from `device`

Host Synchronization

- Host access to `pipeline` must be externally synchronized

### 10.7. Pipeline Derivatives

A pipeline derivative is a child pipeline created from a parent pipeline, where the child and parent are expected to have much commonality.

The goal of derivative pipelines is that they be cheaper to create using the parent as a starting point, and that it be more efficient (on either host or device) to switch/bind between children of the same parent.

A derivative pipeline is created by setting the VK_PIPELINE_CREATE_DERIVATIVE_BIT flag in the `Vk*PipelineCreateInfo` structure. If this is set, then exactly one of `basePipelineHandle` or `basePipelineIndex` members of the structure must have a valid handle/index, and specifies the parent pipeline. If `basePipelineHandle` is used, the parent pipeline must have already been created. If `basePipelineIndex` is used, then the parent is being created in the same command. VK_NULL_HANDLE acts as the invalid handle for `basePipelineHandle`, and -1 is the invalid index for `basePipelineIndex`. If `basePipelineIndex` is used, the base pipeline must appear earlier in the array. The base pipeline must have been created with the VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT flag set.

### 10.8. Pipeline Cache

Pipeline cache objects allow the result of pipeline construction to be reused between pipelines and between runs of an application. Reuse between pipelines is achieved by passing the same pipeline cache object when creating multiple related pipelines. Reuse across runs of an application is achieved by retrieving pipeline cache contents in one run of an application, saving the contents, and using them to preinitialize a pipeline cache on a subsequent run. The contents of the pipeline cache objects are managed by the implementation. Applications can manage the host memory consumed by a pipeline cache object and control the amount of data retrieved from a pipeline cache object.

Pipeline cache objects are represented by `VkPipelineCache` handles:

    // Provided by VK_VERSION_1_0
    VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPipelineCache)

#### 10.8.1. Creating a Pipeline Cache

To create pipeline cache objects, call:

    // Provided by VK_VERSION_1_0
    VkResult vkCreatePipelineCache(
        VkDevice                                    device,
        const VkPipelineCacheCreateInfo*            pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkPipelineCache*                            pPipelineCache);

- `device` is the logical device that creates the pipeline cache object.

- `pCreateInfo` is a pointer to a VkPipelineCacheCreateInfo structure containing initial parameters for the pipeline cache object.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

- `pPipelineCache` is a pointer to a VkPipelineCache handle in which the resulting pipeline cache object is returned.

Note | Applications can track and manage the total host memory size of a pipeline cache object using the `pAllocator`. Applications can limit the amount of data retrieved from a pipeline cache object in `vkGetPipelineCacheData`. Implementations should not internally limit the total number of entries added to a pipeline cache object or the total host memory consumed.

Once created, a pipeline cache can be passed to the vkCreateGraphicsPipelines vkCreateRayTracingPipelinesKHR, vkCreateRayTracingPipelinesNV, vkCreateDataGraphPipelinesARM, and vkCreateComputePipelines commands. If the pipeline cache passed into these commands is not VK_NULL_HANDLE, the implementation will query it for possible reuse opportunities and update it with new content. The use of the pipeline cache object in these commands is internally synchronized, and the same pipeline cache object can be used in multiple threads simultaneously.

If `flags` of `pCreateInfo` includes VK_PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT, all commands that modify the returned pipeline cache object must be externally synchronized.

Note | Implementations should make every effort to limit any critical sections to the actual accesses to the cache, which is expected to be significantly shorter than the duration of the `vkCreate*Pipelines` commands.

Valid Usage (Implicit)

- VUID-vkCreatePipelineCache-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkCreatePipelineCache-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkPipelineCacheCreateInfo structure

- VUID-vkCreatePipelineCache-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreatePipelineCache-pPipelineCache-parameter
  `pPipelineCache` must be a valid pointer to a VkPipelineCache handle

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkPipelineCacheCreateInfo` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkPipelineCacheCreateInfo {
        VkStructureType               sType;
        const void*                   pNext;
        VkPipelineCacheCreateFlags    flags;
        size_t                        initialDataSize;
        const void*                   pInitialData;
    } VkPipelineCacheCreateInfo;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask of VkPipelineCacheCreateFlagBits specifying the behavior of the pipeline cache.

- `initialDataSize` is the number of bytes in `pInitialData`. If `initialDataSize` is zero, the pipeline cache will initially be empty.

- `pInitialData` is a pointer to previously retrieved pipeline cache data. If the pipeline cache data is incompatible (as defined below) with the device, the pipeline cache will be initially empty. If `initialDataSize` is zero, `pInitialData` is ignored.

Valid Usage

- VUID-VkPipelineCacheCreateInfo-initialDataSize-00768
  If `initialDataSize` is not `0`, it must be equal to the size of `pInitialData`, as returned by `vkGetPipelineCacheData` when `pInitialData` was originally retrieved

- VUID-VkPipelineCacheCreateInfo-initialDataSize-00769
  If `initialDataSize` is not `0`, `pInitialData` must have been retrieved from a previous call to `vkGetPipelineCacheData`

- VUID-VkPipelineCacheCreateInfo-pipelineCreationCacheControl-02892
  If the `pipelineCreationCacheControl` feature is not enabled, `flags` must not include VK_PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT

- VUID-VkPipelineCacheCreateInfo-maintenance8-10200
  If the `maintenance8` feature is not enabled, `flags` must not include VK_PIPELINE_CACHE_CREATE_INTERNALLY_SYNCHRONIZED_MERGE_BIT_KHR

- VUID-VkPipelineCacheCreateInfo-flags-10201
  If `flags` includes VK_PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT, it must not include VK_PIPELINE_CACHE_CREATE_INTERNALLY_SYNCHRONIZED_MERGE_BIT_KHR

Valid Usage (Implicit)

- VUID-VkPipelineCacheCreateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO

- VUID-VkPipelineCacheCreateInfo-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkPipelineCacheCreateInfo-flags-parameter
  `flags` must be a valid combination of VkPipelineCacheCreateFlagBits values

- VUID-VkPipelineCacheCreateInfo-pInitialData-parameter
  If `initialDataSize` is not `0`, `pInitialData` must be a valid pointer to an array of `initialDataSize` bytes

    // Provided by VK_VERSION_1_0
    typedef VkFlags VkPipelineCacheCreateFlags;

`VkPipelineCacheCreateFlags` is a bitmask type for setting a mask of zero or more VkPipelineCacheCreateFlagBits.

Bits which can be set in VkPipelineCacheCreateInfo::`flags`, specifying behavior of the pipeline cache, are:

    // Provided by VK_VERSION_1_0, VK_KHR_maintenance8, VK_EXT_pipeline_creation_cache_control
    typedef enum VkPipelineCacheCreateFlagBits {
      // Provided by VK_VERSION_1_3
        VK_PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT = 0x00000001,
      // Provided by VK_KHR_maintenance8
        VK_PIPELINE_CACHE_CREATE_INTERNALLY_SYNCHRONIZED_MERGE_BIT_KHR = 0x00000008,
      // Provided by VK_EXT_pipeline_creation_cache_control
        VK_PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT_EXT = VK_PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT,
    } VkPipelineCacheCreateFlagBits;

- VK_PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT specifies that all commands that modify the created VkPipelineCache will be externally synchronized. When set, the implementation may skip any unnecessary processing needed to support simultaneous modification from multiple threads where allowed.

- VK_PIPELINE_CACHE_CREATE_INTERNALLY_SYNCHRONIZED_MERGE_BIT_KHR specifies that when the created VkPipelineCache is used as the `dstCache` parameter of vkMergePipelineCaches, it does not need to be externally synchronized. This flag is mutually exclusive with VK_PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT.

#### 10.8.2. Merging Pipeline Caches

Pipeline cache objects can be merged using the command:

    // Provided by VK_VERSION_1_0
    VkResult vkMergePipelineCaches(
        VkDevice                                    device,
        VkPipelineCache                             dstCache,
        uint32_t                                    srcCacheCount,
        const VkPipelineCache*                      pSrcCaches);

- `device` is the logical device that owns the pipeline cache objects.

- `dstCache` is the handle of the pipeline cache to merge results into.

- `srcCacheCount` is the length of the `pSrcCaches` array.

- `pSrcCaches` is a pointer to an array of pipeline cache handles, which will be merged into `dstCache`. The previous contents of `dstCache` are included after the merge.

Note | The details of the merge operation are implementation-dependent, but implementations should merge the contents of the specified pipelines and prune duplicate entries.

Valid Usage

- VUID-vkMergePipelineCaches-dstCache-00770
  `dstCache` must not appear in the list of source caches

- VUID-vkMergePipelineCaches-dstCache-10202
  Host access to `dstCache` must be externally synchronized if it was not created with VK_PIPELINE_CACHE_CREATE_INTERNALLY_SYNCHRONIZED_MERGE_BIT_KHR

- VUID-vkMergePipelineCaches-dstCache-11832
  `dstCache` must not have been created with the `headerVersion` member of VkPipelineCacheCreateInfo::`pInitialData` equal to VK_PIPELINE_CACHE_HEADER_VERSION_DATA_GRAPH_QCOM

- VUID-vkMergePipelineCaches-headerVersion-11833
  Each member of pSrcCaches must not have been created with the `headerVersion` member of VkPipelineCacheCreateInfo::`pInitialData` equal to VK_PIPELINE_CACHE_HEADER_VERSION_DATA_GRAPH_QCOM

Valid Usage (Implicit)

- VUID-vkMergePipelineCaches-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkMergePipelineCaches-dstCache-parameter
  `dstCache` must be a valid VkPipelineCache handle

- VUID-vkMergePipelineCaches-pSrcCaches-parameter
  `pSrcCaches` must be a valid pointer to an array of `srcCacheCount` valid VkPipelineCache handles

- VUID-vkMergePipelineCaches-srcCacheCount-arraylength
  `srcCacheCount` must be greater than `0`

- VUID-vkMergePipelineCaches-dstCache-parent
  `dstCache` must have been created, allocated, or retrieved from `device`

- VUID-vkMergePipelineCaches-pSrcCaches-parent
  Each element of `pSrcCaches` must have been created, allocated, or retrieved from `device`

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

#### 10.8.3. Retrieving Pipeline Cache Data

Data can be retrieved from a pipeline cache object using the command:

    // Provided by VK_VERSION_1_0
    VkResult vkGetPipelineCacheData(
        VkDevice                                    device,
        VkPipelineCache                             pipelineCache,
        size_t*                                     pDataSize,
        void*                                       pData);

- `device` is the logical device that owns the pipeline cache.

- `pipelineCache` is the pipeline cache to retrieve data from.

- `pDataSize` is a pointer to a `size_t` value related to the amount of data in the pipeline cache, as described below.

- `pData` is either `NULL` or a pointer to a buffer.

If `pData` is `NULL`, then the maximum size of the data that can be retrieved from the pipeline cache, in bytes, is returned in `pDataSize`. Otherwise, `pDataSize` must point to a variable set by the application to the size of the buffer, in bytes, pointed to by `pData`, and on return the variable is overwritten with the amount of data actually written to `pData`. If `pDataSize` is less than the maximum size that can be retrieved by the pipeline cache, at most `pDataSize` bytes will be written to `pData`, and VK_INCOMPLETE will be returned instead of VK_SUCCESS, to indicate that not all of the pipeline cache was returned.

Any data written to `pData` is valid and can be provided as the `pInitialData` member of the VkPipelineCacheCreateInfo structure passed to `vkCreatePipelineCache`.

Two calls to `vkGetPipelineCacheData` with the same parameters must retrieve the same data unless a command that modifies the contents of the cache is called between them.

The initial bytes written to `pData` must be a header as described in the Pipeline Cache Header section.

If `pDataSize` is less than what is necessary to store this header, nothing will be written to `pData` and zero will be written to `pDataSize`.

Note | This query does not behave consistently with the behavior described in Opaque Binary Data Results, for historical reasons. If the amount of data available is larger than the passed `pDataSize`, the query returns up to the size of the passed buffer, and signals overflow with a VK_INCOMPLETE success status instead of returning a VK_ERROR_NOT_ENOUGH_SPACE_KHR error status.

Valid Usage

- VUID-vkGetPipelineCacheData-pipelineCache-11834
  `pipelineCache` must not have been created with the `headerVersion` member of VkPipelineCacheCreateInfo::`pInitialData` equal to VK_PIPELINE_CACHE_HEADER_VERSION_DATA_GRAPH_QCOM

Valid Usage (Implicit)

- VUID-vkGetPipelineCacheData-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetPipelineCacheData-pipelineCache-parameter
  `pipelineCache` must be a valid VkPipelineCache handle

- VUID-vkGetPipelineCacheData-pDataSize-parameter
  `pDataSize` must be a valid pointer to a `size_t` value

- VUID-vkGetPipelineCacheData-pData-parameter
  If the value referenced by `pDataSize` is not `0`, and `pData` is not `NULL`, `pData` must be a valid pointer to an array of `pDataSize` bytes

- VUID-vkGetPipelineCacheData-pipelineCache-parent
  `pipelineCache` must have been created, allocated, or retrieved from `device`

Return Codes

Success

  - VK_INCOMPLETE

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

#### 10.8.4. Pipeline Cache Header

Applications can store the data retrieved from the pipeline cache, and use these data, possibly in a future run of the application, to populate new pipeline cache objects. The results of pipeline compiles, however, may depend on the vendor ID, device ID, driver version, and other details of the device. To enable applications to detect when previously retrieved data is incompatible with the device, the pipeline cache data must begin with a valid pipeline cache header.

Note | Structures described in this section are not part of the Vulkan API and are only used to describe the representation of data elements in pipeline cache data. Accordingly, the valid usage clauses defined for structures defined in this section do not define valid usage conditions for APIs accepting pipeline cache data as input, as providing invalid pipeline cache data as input to any Vulkan API commands will result in the provided pipeline cache data being ignored.

Version one of the pipeline cache header is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkPipelineCacheHeaderVersionOne {
        uint32_t                        headerSize;
        VkPipelineCacheHeaderVersion    headerVersion;
        uint32_t                        vendorID;
        uint32_t                        deviceID;
        uint8_t                         pipelineCacheUUID[VK_UUID_SIZE];
    } VkPipelineCacheHeaderVersionOne;

- `headerSize` is the length in bytes of the pipeline cache header.

- `headerVersion` is a VkPipelineCacheHeaderVersion value specifying the version of the header. A consumer of the pipeline cache should use the cache version to interpret the remainder of the cache header. `headerVersion` must be written as exactly 4 bytes.

- `vendorID` is the `VkPhysicalDeviceProperties`::`vendorID` of the implementation.

- `deviceID` is the `VkPhysicalDeviceProperties`::`deviceID` of the implementation.

- `pipelineCacheUUID` is the `VkPhysicalDeviceProperties`::`pipelineCacheUUID` of the implementation.

Unlike most structures declared by the Vulkan API, all fields of this structure are written with the least significant byte first, regardless of host byte-order.

The C language specification does not define the packing of structure members. This layout assumes tight structure member packing, with members laid out in the order listed in the structure, and the intended size of the structure is 32 bytes. If a compiler produces code that diverges from that pattern, applications must employ another method to set values at the correct offsets.

Valid Usage

- VUID-VkPipelineCacheHeaderVersionOne-headerSize-04967
  `headerSize` must be 32

- VUID-VkPipelineCacheHeaderVersionOne-headerVersion-04968
  `headerVersion` must be VK_PIPELINE_CACHE_HEADER_VERSION_ONE

- VUID-VkPipelineCacheHeaderVersionOne-headerSize-08990
  `headerSize` must not exceed the size of the pipeline cache

Valid Usage (Implicit)

- VUID-VkPipelineCacheHeaderVersionOne-headerVersion-parameter
  `headerVersion` must be a valid VkPipelineCacheHeaderVersion value

Possible values of the `headerVersion` value of the pipeline cache header are:

    // Provided by VK_VERSION_1_0
    typedef enum VkPipelineCacheHeaderVersion {
        VK_PIPELINE_CACHE_HEADER_VERSION_ONE = 1,
      // Provided by VK_QCOM_data_graph_model
        VK_PIPELINE_CACHE_HEADER_VERSION_DATA_GRAPH_QCOM = 1000629000,
    } VkPipelineCacheHeaderVersion;

- VK_PIPELINE_CACHE_HEADER_VERSION_ONE specifies version one of the pipeline cache, described by VkPipelineCacheHeaderVersionOne.

- VK_PIPELINE_CACHE_HEADER_VERSION_DATA_GRAPH_QCOM specifies a pipeline cache for offline built data graph models, described by VkPipelineCacheHeaderVersionDataGraphQCOM.

The data graph pipeline cache header is defined as:

    // Provided by VK_QCOM_data_graph_model
    typedef struct VkPipelineCacheHeaderVersionDataGraphQCOM {
        uint32_t                         headerSize;
        VkPipelineCacheHeaderVersion     headerVersion;
        VkDataGraphModelCacheTypeQCOM    cacheType;
        uint32_t                         cacheVersion;
        uint32_t                         toolchainVersion[VK_DATA_GRAPH_MODEL_TOOLCHAIN_VERSION_LENGTH_QCOM];
    } VkPipelineCacheHeaderVersionDataGraphQCOM;

- `headerSize` is the length in bytes of the pipeline cache header.

- `headerVersion` is a VkPipelineCacheHeaderVersion value specifying the version of the header. A consumer of the pipeline cache should use the cache version to interpret the remainder of the cache header. `headerVersion` must be written as exactly 4 bytes.

- `cacheType` is the VkDataGraphModelCacheTypeQCOM type of data graph cache encoded in the data.

- `cacheVersion` is the version of the encoding of the data graph cache.

- `toolchainVersion` is a null-terminated UTF-8 string specifying the version of the compiler that built the data graph cache.

The application should verify that the header info is compatible with the VkDataGraphProcessingEngineCreateInfoARM passed during pipeline creation. Implementations may return VK_PIPELINE_COMPILE_REQUIRED_EXT from vkCreateDataGraphPipelinesARM if the cache is not compatible.

Note | This cache type is built using offline compilation, therefore Vulkan does not define engine compatibility. The application should refer to the offline compiler used to create the cache for guidance on compatibility.

Unlike most structures declared by the Vulkan API, all fields of this structure are written with the least significant byte first, regardless of host byte-order.

The C language specification does not define the packing of structure members. This layout assumes tight structure member packing, with members laid out in the order listed in the structure, and the intended size of the structure is 28 bytes. If a compiler produces code that diverges from that pattern, applications must employ another method to set values at the correct offsets.

Valid Usage

- VUID-VkPipelineCacheHeaderVersionDataGraphQCOM-None-11835
  The dataGraphModel feature must be enabled

- VUID-VkPipelineCacheHeaderVersionDataGraphQCOM-headerSize-11836
  `headerSize` must be 28

- VUID-VkPipelineCacheHeaderVersionDataGraphQCOM-headerVersion-11837
  `headerVersion` must be VK_PIPELINE_CACHE_HEADER_VERSION_DATA_GRAPH_QCOM

- VUID-VkPipelineCacheHeaderVersionDataGraphQCOM-headerSize-11838
  `headerSize` must not exceed the size of the pipeline cache

Valid Usage (Implicit)

- VUID-VkPipelineCacheHeaderVersionDataGraphQCOM-headerVersion-parameter
  `headerVersion` must be a valid VkPipelineCacheHeaderVersion value

- VUID-VkPipelineCacheHeaderVersionDataGraphQCOM-cacheType-parameter
  `cacheType` must be a valid VkDataGraphModelCacheTypeQCOM value

The VkDataGraphModelCacheTypeQCOM enumeration determines the contents of the pipeline data graph cache.

Possible values are:

    // Provided by VK_QCOM_data_graph_model
    typedef enum VkDataGraphModelCacheTypeQCOM {
        VK_DATA_GRAPH_MODEL_CACHE_TYPE_GENERIC_BINARY_QCOM = 0,
    } VkDataGraphModelCacheTypeQCOM;

- VK_DATA_GRAPH_MODEL_CACHE_TYPE_GENERIC_BINARY_QCOM specifies a general binary layout type.

VK_DATA_GRAPH_MODEL_TOOLCHAIN_VERSION_LENGTH_QCOM is the length in `char` values of an array containing the version of the compiler that built a data graph cache, as returned in VkPipelineCacheHeaderVersionDataGraphQCOM::`toolchainVersion`.

    #define VK_DATA_GRAPH_MODEL_TOOLCHAIN_VERSION_LENGTH_QCOM 3U

#### 10.8.5. Destroying a Pipeline Cache

To destroy a pipeline cache, call:

    // Provided by VK_VERSION_1_0
    void vkDestroyPipelineCache(
        VkDevice                                    device,
        VkPipelineCache                             pipelineCache,
        const VkAllocationCallbacks*                pAllocator);

- `device` is the logical device that destroys the pipeline cache object.

- `pipelineCache` is the handle of the pipeline cache to destroy.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

Valid Usage

- VUID-vkDestroyPipelineCache-pipelineCache-00771
  If `VkAllocationCallbacks` were provided when `pipelineCache` was created, a compatible set of callbacks must be provided here

- VUID-vkDestroyPipelineCache-pipelineCache-00772
  If no `VkAllocationCallbacks` were provided when `pipelineCache` was created, `pAllocator` must be `NULL`

Valid Usage (Implicit)

- VUID-vkDestroyPipelineCache-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkDestroyPipelineCache-pipelineCache-parameter
  If `pipelineCache` is not VK_NULL_HANDLE, `pipelineCache` must be a valid VkPipelineCache handle

- VUID-vkDestroyPipelineCache-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkDestroyPipelineCache-pipelineCache-parent
  If `pipelineCache` is a valid handle, it must have been created, allocated, or retrieved from `device`

Host Synchronization

- Host access to `pipelineCache` must be externally synchronized

### 10.9. Pipeline Binaries

Pipeline binary objects allow the result of pipeline construction to be reused between pipelines and between runs of an application. Reuse is achieved by extracting pipeline binaries from a VkPipeline object, associating them with a corresponding VkPipelineBinaryKeyKHR and then adding a VkPipelineBinaryInfoKHR to the `pNext` chain of any `Vk*PipelineCreateInfo` when creating a pipeline. Pipeline binaries can be reused between runs by extracting `VkPipelineBinaryDataKHR` from `VkPipelineBinaryKHR` objects, saving the contents, and then using them to create a `VkPipelineBinaryKHR` object on subsequent runs.

When creating a pipeline that includes VkPipelineBinaryInfoKHR in the `pNext` chain, or has the VK_PIPELINE_CREATE_2_CAPTURE_DATA_BIT_KHR flag set, the use of VkPipelineCache objects is not allowed.

Pipeline binary objects are represented by `VkPipelineBinaryKHR` handles:

    // Provided by VK_KHR_pipeline_binary
    VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPipelineBinaryKHR)

#### 10.9.1. Generating the Pipeline Key

To generate the key for a particular pipeline creation info, call:

    // Provided by VK_KHR_pipeline_binary
    VkResult vkGetPipelineKeyKHR(
        VkDevice                                    device,
        const VkPipelineCreateInfoKHR*              pPipelineCreateInfo,
        VkPipelineBinaryKeyKHR*                     pPipelineKey);

- `device` is the logical device that creates the pipeline object.

- `pPipelineCreateInfo` is `NULL` or a pointer to a VkPipelineCreateInfoKHR structure.

- `pPipelineKey` is a pointer to a VkPipelineBinaryKeyKHR structure in which the resulting key is returned.

If `pPipelineCreateInfo` is `NULL`, then the implementation must return the global key that applies to all pipelines. If the key obtained in this way changes between saving and restoring data obtained from vkGetPipelineBinaryDataKHR in a different VkDevice, then the application must assume that the restored data is invalid and cannot be passed to vkCreatePipelineBinariesKHR. Otherwise the application can assume the data is still valid.

If `pPipelineCreateInfo` is not `NULL`, the key obtained functions as a method to compare two pipeline creation info structures. Implementations may not compare parts of a pipeline creation info which would not contribute to the final binary output. If a shader module identifier is used instead of a shader module, the `pPipelineKey` generated must be equal to the key generated when using the shader module from which the identifier was queried. If the content of two `pPipelineKey` are equal, pipelines created with the two `pPipelineCreateInfo->pNext` create infos must produce the same VkPipelineBinaryKHR contents.

The pipeline key is distinct from pipeline binary key. Pipeline binary keys can only be obtained after compilation. The pipeline key is intended to optionally allow associating pipeline create info with multiple pipeline binary keys.

Valid Usage

- VUID-vkGetPipelineKeyKHR-pNext-09605
  The `pNext` chain of `pPipelineCreateInfo` must not set VkPipelineBinaryInfoKHR::`binaryCount` to a value greater than `0`

Valid Usage (Implicit)

- VUID-vkGetPipelineKeyKHR-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetPipelineKeyKHR-pPipelineCreateInfo-parameter
  If `pPipelineCreateInfo` is not `NULL`, `pPipelineCreateInfo` must be a valid pointer to a valid VkPipelineCreateInfoKHR structure

- VUID-vkGetPipelineKeyKHR-pPipelineKey-parameter
  `pPipelineKey` must be a valid pointer to a VkPipelineBinaryKeyKHR structure

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkPipelineCreateInfoKHR` structure is defined as:

    // Provided by VK_KHR_pipeline_binary
    typedef struct VkPipelineCreateInfoKHR {
        VkStructureType    sType;
        void*              pNext;
    } VkPipelineCreateInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is a pointer to a structure extending this structure.

Valid Usage

- VUID-VkPipelineCreateInfoKHR-pNext-09604
  `pNext` must be pointer to a valid instance of VkGraphicsPipelineCreateInfo, VkExecutionGraphPipelineCreateInfoAMDX, VkRayTracingPipelineCreateInfoKHR, or VkComputePipelineCreateInfo

Valid Usage (Implicit)

- VUID-VkPipelineCreateInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PIPELINE_CREATE_INFO_KHR

The `VkPipelineBinaryKeyKHR` structure is defined as:

    // Provided by VK_KHR_pipeline_binary
    typedef struct VkPipelineBinaryKeyKHR {
        VkStructureType    sType;
        void*              pNext;
        uint32_t           keySize;
        uint8_t            key[VK_MAX_PIPELINE_BINARY_KEY_SIZE_KHR];
    } VkPipelineBinaryKeyKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `keySize` is the size, in bytes, of valid data returned in `key`.

- `key` is a buffer of opaque data specifying a pipeline binary key.

Any returned values beyond the first `keySize` bytes are undefined. Implementations must return a `keySize` greater than 0, and less-or-equal to VK_MAX_PIPELINE_BINARY_KEY_SIZE_KHR.

Two keys are considered equal if `keySize` is equal and the first `keySize` bytes of `key` compare equal.

Implementations may return a different `keySize` for different binaries.

Implementations should ensure that `keySize` is large enough to uniquely identify a pipeline binary.

Valid Usage (Implicit)

- VUID-VkPipelineBinaryKeyKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PIPELINE_BINARY_KEY_KHR

- VUID-VkPipelineBinaryKeyKHR-pNext-pNext
  `pNext` must be `NULL`

VK_MAX_PIPELINE_BINARY_KEY_SIZE_KHR is the length in bytes of a binary key, as returned in VkPipelineBinaryKeyKHR::`keySize`.

    #define VK_MAX_PIPELINE_BINARY_KEY_SIZE_KHR 32U

#### 10.9.2. Creating Pipeline Binaries

To create pipeline binary objects, call:

    // Provided by VK_KHR_pipeline_binary
    VkResult vkCreatePipelineBinariesKHR(
        VkDevice                                    device,
        const VkPipelineBinaryCreateInfoKHR*        pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkPipelineBinaryHandlesInfoKHR*             pBinaries);

- `device` is the logical device that creates the pipeline binary objects.

- `pCreateInfo` is a pointer to a VkPipelineBinaryCreateInfoKHR structure that contains the data to create the pipeline binaries from.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

- `pBinaries` is a pointer to a VkPipelineBinaryHandlesInfoKHR structure in which the resulting pipeline binaries are returned.

The implementation will attempt to create all pipeline binaries. If creation fails for any pipeline binary, then:

- The corresponding entry in the `pPipelineBinaries` output array will be filled with VK_NULL_HANDLE.

- The VkResult returned by vkCreatePipelineBinariesKHR will contain the error value for the first entry in the output array in `pBinaries` containing VK_NULL_HANDLE.

Valid Usage (Implicit)

- VUID-vkCreatePipelineBinariesKHR-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkCreatePipelineBinariesKHR-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkPipelineBinaryCreateInfoKHR structure

- VUID-vkCreatePipelineBinariesKHR-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreatePipelineBinariesKHR-pBinaries-parameter
  `pBinaries` must be a valid pointer to a VkPipelineBinaryHandlesInfoKHR structure

Return Codes

Success

  - VK_INCOMPLETE

  - VK_PIPELINE_BINARY_MISSING_KHR

  - VK_SUCCESS

Failure

  - VK_ERROR_INITIALIZATION_FAILED

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkPipelineBinaryHandlesInfoKHR` structure is defined as:

    // Provided by VK_KHR_pipeline_binary
    typedef struct VkPipelineBinaryHandlesInfoKHR {
        VkStructureType         sType;
        const void*             pNext;
        uint32_t                pipelineBinaryCount;
        VkPipelineBinaryKHR*    pPipelineBinaries;
    } VkPipelineBinaryHandlesInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `pipelineBinaryCount` is the number of binaries associated with this pipeline or the number of entries in the `pPipelineBinaries` array.

- `pPipelineBinaries` is `NULL` or a pointer to an array of VkPipelineBinaryKHR handles in which the resulting pipeline binaries are returned.

If `pPipelineBinaries` is `NULL`, the number of binaries that would be created is returned in `pipelineBinaryCount`. Otherwise, `pipelineBinaryCount` must be the number of entries in the `pPipelineBinaries` array, and on return from vkCreatePipelineBinariesKHR `pipelineBinaryCount` is overwritten with the number of handles actually written to `pPipelineBinaries`. If the value of `pipelineBinaryCount` is less than the number of binaries that would have been created, at most `pipelineBinaryCount` handles will be written to `pPipelineBinaries` and VK_INCOMPLETE will be returned instead of VK_SUCCESS, to indicate that `pPipelineBinaries` was not large enough to create all the binaries.

Valid Usage (Implicit)

- VUID-VkPipelineBinaryHandlesInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PIPELINE_BINARY_HANDLES_INFO_KHR

- VUID-VkPipelineBinaryHandlesInfoKHR-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkPipelineBinaryHandlesInfoKHR-pPipelineBinaries-parameter
  If `pipelineBinaryCount` is not `0`, and `pPipelineBinaries` is not `NULL`, `pPipelineBinaries` must be a valid pointer to an array of `pipelineBinaryCount` VkPipelineBinaryKHR handles

The `VkPipelineBinaryCreateInfoKHR` structure is defined as:

    // Provided by VK_KHR_pipeline_binary
    typedef struct VkPipelineBinaryCreateInfoKHR {
        VkStructureType                          sType;
        const void*                              pNext;
        const VkPipelineBinaryKeysAndDataKHR*    pKeysAndDataInfo;
        VkPipeline                               pipeline;
        const VkPipelineCreateInfoKHR*           pPipelineCreateInfo;
    } VkPipelineBinaryCreateInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `pKeysAndDataInfo` is `NULL` or a pointer to a VkPipelineBinaryKeysAndDataKHR structure that contains keys and data to create the pipeline binaries from.

- `pipeline` is VK_NULL_HANDLE or a `VkPipeline` that contains data to create the pipeline binaries from.

- `pPipelineCreateInfo` is `NULL` or a pointer to a VkPipelineCreateInfoKHR structure with the pipeline creation info. This is used to probe the implementation’s internal cache for pipeline binaries.

When `pPipelineCreateInfo` is not `NULL`, an implementation will attempt to retrieve pipeline binary data from an internal cache external to the application if `pipelineBinaryInternalCache` is VK_TRUE. Applications can use this to determine if a pipeline can be created without compilation. If the implementation fails to create a pipeline binary due to missing an internal cache entry, VK_PIPELINE_BINARY_MISSING_KHR is returned. If creation succeeds, the resulting binary can be used to create a pipeline. VK_PIPELINE_BINARY_MISSING_KHR may be returned for any reason in this situation, even if creating a pipeline binary with the same parameters that succeeded earlier.

If `pipelineBinaryPrecompiledInternalCache` is VK_TRUE, the implementation may be able to create pipeline binaries even when `pPipelineCreateInfo` has not been used to create binaries before by the application.

Note | On some platforms, internal pipeline caches may be pre-populated before running the application.

Valid Usage

- VUID-VkPipelineBinaryCreateInfoKHR-pipeline-09607
  If `pipeline` is not VK_NULL_HANDLE, `pipeline` must have been created with VK_PIPELINE_CREATE_2_CAPTURE_DATA_BIT_KHR

- VUID-VkPipelineBinaryCreateInfoKHR-pipeline-09608
  If `pipeline` is not VK_NULL_HANDLE, vkReleaseCapturedPipelineDataKHR must not have been called on `pipeline` prior to this command

- VUID-VkPipelineBinaryCreateInfoKHR-pipelineBinaryInternalCache-09609
  If `pipelineBinaryInternalCache` is VK_FALSE pPipelineCreateInfo must be `NULL`

- VUID-VkPipelineBinaryCreateInfoKHR-device-09610
  If `device` was created with VkDevicePipelineBinaryInternalCacheControlKHR::`disableInternalCache` set to VK_TRUE, `pPipelineCreateInfo` must be `NULL`

- VUID-VkPipelineBinaryCreateInfoKHR-pKeysAndDataInfo-09619
  One and only one of `pKeysAndDataInfo`, `pipeline`, or `pPipelineCreateInfo` must be non-`NULL`

- VUID-VkPipelineBinaryCreateInfoKHR-pPipelineCreateInfo-09606
  If `pPipelineCreateInfo` is not `NULL`, the `pNext` chain of `pPipelineCreateInfo` must not set VkPipelineBinaryInfoKHR::`binaryCount` to a value greater than `0`

Valid Usage (Implicit)

- VUID-VkPipelineBinaryCreateInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PIPELINE_BINARY_CREATE_INFO_KHR

- VUID-VkPipelineBinaryCreateInfoKHR-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkPipelineBinaryCreateInfoKHR-pKeysAndDataInfo-parameter
  If `pKeysAndDataInfo` is not `NULL`, `pKeysAndDataInfo` must be a valid pointer to a valid VkPipelineBinaryKeysAndDataKHR structure

- VUID-VkPipelineBinaryCreateInfoKHR-pipeline-parameter
  If `pipeline` is not VK_NULL_HANDLE, `pipeline` must be a valid VkPipeline handle

- VUID-VkPipelineBinaryCreateInfoKHR-pPipelineCreateInfo-parameter
  If `pPipelineCreateInfo` is not `NULL`, `pPipelineCreateInfo` must be a valid pointer to a valid VkPipelineCreateInfoKHR structure

The `VkPipelineBinaryKeysAndDataKHR` structure is defined as:

    // Provided by VK_KHR_pipeline_binary
    typedef struct VkPipelineBinaryKeysAndDataKHR {
        uint32_t                          binaryCount;
        const VkPipelineBinaryKeyKHR*     pPipelineBinaryKeys;
        const VkPipelineBinaryDataKHR*    pPipelineBinaryData;
    } VkPipelineBinaryKeysAndDataKHR;

- `binaryCount` is the size of the `pPipelineBinaryKeys` and `pPipelineBinaryData` arrays

- `pPipelineBinaryKeys` is a pointer to an array of VkPipelineBinaryKeyKHR structures containing the pipeline binary keys

- `pPipelineBinaryData` is a pointer to an array of VkPipelineBinaryDataKHR structures containing the pipeline binary data

Valid Usage (Implicit)

- VUID-VkPipelineBinaryKeysAndDataKHR-pPipelineBinaryKeys-parameter
  `pPipelineBinaryKeys` must be a valid pointer to an array of `binaryCount` valid VkPipelineBinaryKeyKHR structures

- VUID-VkPipelineBinaryKeysAndDataKHR-pPipelineBinaryData-parameter
  `pPipelineBinaryData` must be a valid pointer to an array of `binaryCount` valid VkPipelineBinaryDataKHR structures

- VUID-VkPipelineBinaryKeysAndDataKHR-binaryCount-arraylength
  `binaryCount` must be greater than `0`

The `VkPipelineBinaryDataKHR` structure is defined as:

    // Provided by VK_KHR_pipeline_binary
    typedef struct VkPipelineBinaryDataKHR {
        size_t    dataSize;
        void*     pData;
    } VkPipelineBinaryDataKHR;

- `dataSize` is the size of the `pData` buffer in bytes.

- `pData` is a pointer to a buffer of `size` bytes that contains pipeline binary data obtained from `vkGetPipelineBinaryDataKHR`.

Valid Usage (Implicit)

- VUID-VkPipelineBinaryDataKHR-pData-parameter
  `pData` must be a valid pointer to an array of `dataSize` bytes

- VUID-VkPipelineBinaryDataKHR-dataSize-arraylength
  `dataSize` must be greater than `0`

#### 10.9.3. Retrieving Pipeline Binary Data

Data can be retrieved from a pipeline binary object using the command:

    // Provided by VK_KHR_pipeline_binary
    VkResult vkGetPipelineBinaryDataKHR(
        VkDevice                                    device,
        const VkPipelineBinaryDataInfoKHR*          pInfo,
        VkPipelineBinaryKeyKHR*                     pPipelineBinaryKey,
        size_t*                                     pPipelineBinaryDataSize,
        void*                                       pPipelineBinaryData);

- `device` is the logical device that created the pipeline binary.

- `pInfo` is a pointer to a VkPipelineBinaryDataInfoKHR structure which describes the pipeline binary to get data from.

- `pPipelineBinaryKey` is a pointer to a VkPipelineBinaryKeyKHR structure where the key for this binary will be written.

- `pPipelineBinaryDataSize` is a pointer to a `size_t` value related to the amount of data in the pipeline binary, as described below.

- `pPipelineBinaryData` is either `NULL` or a pointer to a buffer.

If `pPipelineBinaryData` is `NULL`, then the size of the data, in bytes, that is required to store the binary is returned in `pPipelineBinaryDataSize`. Otherwise, `pPipelineBinaryDataSize` must contain the size of the buffer, in bytes, pointed to by `pPipelineBinaryData`, and on return `pPipelineBinaryDataSize` is overwritten with the size of the data, in bytes, that is required to store the binary. If `pPipelineBinaryDataSize` is less than the size that is required to store the binary, nothing is written to `pPipelineBinaryData` and VK_ERROR_NOT_ENOUGH_SPACE_KHR will be returned, instead of VK_SUCCESS.

If the call returns one of the success return codes, the pipeline binary key is written to `pPipelineBinaryKey`, regardless of whether `pPipelineBinaryData` is `NULL` or not.

If pipelineBinaryCompressedData is VK_FALSE, implementations should not return compressed pipeline binary data to the application.

Valid Usage (Implicit)

- VUID-vkGetPipelineBinaryDataKHR-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetPipelineBinaryDataKHR-pInfo-parameter
  `pInfo` must be a valid pointer to a valid VkPipelineBinaryDataInfoKHR structure

- VUID-vkGetPipelineBinaryDataKHR-pPipelineBinaryKey-parameter
  `pPipelineBinaryKey` must be a valid pointer to a VkPipelineBinaryKeyKHR structure

- VUID-vkGetPipelineBinaryDataKHR-pPipelineBinaryDataSize-parameter
  `pPipelineBinaryDataSize` must be a valid pointer to a `size_t` value

- VUID-vkGetPipelineBinaryDataKHR-pPipelineBinaryData-parameter
  If the value referenced by `pPipelineBinaryDataSize` is not `0`, and `pPipelineBinaryData` is not `NULL`, `pPipelineBinaryData` must be a valid pointer to an array of `pPipelineBinaryDataSize` bytes

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_NOT_ENOUGH_SPACE_KHR

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkPipelineBinaryDataInfoKHR` structure is defined as:

    // Provided by VK_KHR_pipeline_binary
    typedef struct VkPipelineBinaryDataInfoKHR {
        VkStructureType        sType;
        void*                  pNext;
        VkPipelineBinaryKHR    pipelineBinary;
    } VkPipelineBinaryDataInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `pipelineBinary` is the pipeline binary to get data from.

Valid Usage (Implicit)

- VUID-VkPipelineBinaryDataInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PIPELINE_BINARY_DATA_INFO_KHR

- VUID-VkPipelineBinaryDataInfoKHR-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkPipelineBinaryDataInfoKHR-pipelineBinary-parameter
  `pipelineBinary` must be a valid VkPipelineBinaryKHR handle

#### 10.9.4. Releasing Captured Pipeline Binary Data

To release pipeline resources captured with VK_PIPELINE_CREATE_2_CAPTURE_DATA_BIT_KHR, call:

    // Provided by VK_KHR_pipeline_binary
    VkResult vkReleaseCapturedPipelineDataKHR(
        VkDevice                                    device,
        const VkReleaseCapturedPipelineDataInfoKHR* pInfo,
        const VkAllocationCallbacks*                pAllocator);

- `device` is the logical device that created the pipeline object.

- `pInfo` is a pointer to a VkReleaseCapturedPipelineDataInfoKHR structure which describes the pipeline to release the data from.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

The implementation may free any resources captured as a result of creating the pipeline with VK_PIPELINE_CREATE_2_CAPTURE_DATA_BIT_KHR and put the pipeline into a state as if VK_PIPELINE_CREATE_2_CAPTURE_DATA_BIT_KHR had not been provided at pipeline creation time.

Note | Any resources captured as a result of creating the pipeline with VK_PIPELINE_CREATE_2_CAPTURE_DATA_BIT_KHR are implicitly freed by vkDestroyPipeline.

Valid Usage

- VUID-vkReleaseCapturedPipelineDataKHR-pipeline-09611
  If `VkAllocationCallbacks` were provided when `pipeline` was created, a compatible set of callbacks must be provided in `pAllocator`

- VUID-vkReleaseCapturedPipelineDataKHR-pipeline-09612
  If no VkAllocationCallbacks were provided when `pipeline` was created, `pAllocator` must be `NULL`

Valid Usage (Implicit)

- VUID-vkReleaseCapturedPipelineDataKHR-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkReleaseCapturedPipelineDataKHR-pInfo-parameter
  `pInfo` must be a valid pointer to a valid VkReleaseCapturedPipelineDataInfoKHR structure

- VUID-vkReleaseCapturedPipelineDataKHR-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkReleaseCapturedPipelineDataInfoKHR` structure is defined as:

    // Provided by VK_KHR_pipeline_binary
    typedef struct VkReleaseCapturedPipelineDataInfoKHR {
        VkStructureType    sType;
        void*              pNext;
        VkPipeline         pipeline;
    } VkReleaseCapturedPipelineDataInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `pipeline` the handle of the pipeline object to release the data from.

Valid Usage

- VUID-VkReleaseCapturedPipelineDataInfoKHR-pipeline-09613
  `pipeline` must have been created with VK_PIPELINE_CREATE_2_CAPTURE_DATA_BIT_KHR

- VUID-VkReleaseCapturedPipelineDataInfoKHR-pipeline-09618
  `pipeline` must not have been used in a previous call to `vkReleaseCapturedPipelineDataKHR`

Valid Usage (Implicit)

- VUID-VkReleaseCapturedPipelineDataInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_RELEASE_CAPTURED_PIPELINE_DATA_INFO_KHR

- VUID-VkReleaseCapturedPipelineDataInfoKHR-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkReleaseCapturedPipelineDataInfoKHR-pipeline-parameter
  `pipeline` must be a valid VkPipeline handle

Host Synchronization

- Host access to `pipeline` must be externally synchronized

#### 10.9.5. Destroying Pipeline Binaries

To destroy a VkPipelineBinaryKHR, call:

    // Provided by VK_KHR_pipeline_binary
    void vkDestroyPipelineBinaryKHR(
        VkDevice                                    device,
        VkPipelineBinaryKHR                         pipelineBinary,
        const VkAllocationCallbacks*                pAllocator);

- `device` is the logical device that created the pipeline binary object.

- `pipelineBinary` is the handle of the pipeline binary object to destroy.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

Valid Usage

- VUID-vkDestroyPipelineBinaryKHR-pipelineBinary-09614
  If `VkAllocationCallbacks` were provided when `pipelineBinary` was created, a compatible set of callbacks must be provided here

- VUID-vkDestroyPipelineBinaryKHR-pipelineBinary-09615
  If no VkAllocationCallbacks were provided when `pipelineBinary` was created, `pAllocator` must be `NULL`

Valid Usage (Implicit)

- VUID-vkDestroyPipelineBinaryKHR-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkDestroyPipelineBinaryKHR-pipelineBinary-parameter
  If `pipelineBinary` is not VK_NULL_HANDLE, `pipelineBinary` must be a valid VkPipelineBinaryKHR handle

- VUID-vkDestroyPipelineBinaryKHR-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkDestroyPipelineBinaryKHR-pipelineBinary-parent
  If `pipelineBinary` is a valid handle, it must have been created, allocated, or retrieved from `device`

Host Synchronization

- Host access to `pipelineBinary` must be externally synchronized

### 10.10. Specialization Constants

Specialization constants are a mechanism whereby constants in a SPIR-V module can have their constant value specified at the time the `VkPipeline` is created. This allows a SPIR-V module to have constants that can be modified while executing an application that uses the Vulkan API.

Note | Specialization constants are useful to allow a compute shader to have its local workgroup size changed at runtime by the user, for example.

Each VkPipelineShaderStageCreateInfo structure contains a `pSpecializationInfo` member, which can be `NULL` to indicate no specialization constants, or point to a `VkSpecializationInfo` structure.

The `VkSpecializationInfo` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkSpecializationInfo {
        uint32_t                           mapEntryCount;
        const VkSpecializationMapEntry*    pMapEntries;
        size_t                             dataSize;
        const void*                        pData;
    } VkSpecializationInfo;

- `mapEntryCount` is the number of entries in the `pMapEntries` array.

- `pMapEntries` is a pointer to an array of `VkSpecializationMapEntry` structures, which map constant IDs to offsets in `pData`.

- `dataSize` is the byte size of the `pData` buffer.

- `pData` contains the actual constant values to specialize with.

Valid Usage

- VUID-VkSpecializationInfo-offset-00773
  The `offset` member of each element of `pMapEntries` must be less than `dataSize`

- VUID-VkSpecializationInfo-pMapEntries-00774
  The `size` member of each element of `pMapEntries` must be less than or equal to `dataSize` minus `offset`

- VUID-VkSpecializationInfo-constantID-04911
  The `constantID` value of each element of `pMapEntries` must be unique within `pMapEntries`

Valid Usage (Implicit)

- VUID-VkSpecializationInfo-pMapEntries-parameter
  If `mapEntryCount` is not `0`, `pMapEntries` must be a valid pointer to an array of `mapEntryCount` valid VkSpecializationMapEntry structures

- VUID-VkSpecializationInfo-pData-parameter
  If `dataSize` is not `0`, `pData` must be a valid pointer to an array of `dataSize` bytes

The `VkSpecializationMapEntry` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkSpecializationMapEntry {
        uint32_t    constantID;
        uint32_t    offset;
        size_t      size;
    } VkSpecializationMapEntry;

- `constantID` is the ID of the specialization constant in SPIR-V.

- `offset` is the byte offset of the specialization constant value within the supplied data buffer.

- `size` is the byte size of the specialization constant value within the supplied data buffer.

If a `constantID` value is not a specialization constant ID used in the shader, that map entry does not affect the behavior of the pipeline.

Valid Usage

- VUID-VkSpecializationMapEntry-constantID-00776
  For a `constantID` specialization constant declared in a shader, `size` must match the byte size of the `constantID`. If the specialization constant is of type `boolean`, `size` must be the byte size of VkBool32

In human readable SPIR-V:

    OpDecorate %x SpecId 13 ; decorate .x component of WorkgroupSize with ID 13
    OpDecorate %y SpecId 42 ; decorate .y component of WorkgroupSize with ID 42
    OpDecorate %z SpecId 3  ; decorate .z component of WorkgroupSize with ID 3
    OpDecorate %wgsize BuiltIn WorkgroupSize ; decorate WorkgroupSize onto constant
    %i32 = OpTypeInt 32 0 ; declare an unsigned 32-bit type
    %uvec3 = OpTypeVector %i32 3 ; declare a 3 element vector type of unsigned 32-bit
    %x = OpSpecConstant %i32 1 ; declare the .x component of WorkgroupSize
    %y = OpSpecConstant %i32 1 ; declare the .y component of WorkgroupSize
    %z = OpSpecConstant %i32 1 ; declare the .z component of WorkgroupSize
    %wgsize = OpSpecConstantComposite %uvec3 %x %y %z ; declare WorkgroupSize

From the above we have three specialization constants, one for each of the x, y, and z elements of the WorkgroupSize vector.

Now to specialize the above via the specialization constants mechanism:

    const VkSpecializationMapEntry entries[] =
    {
        {
            .constantID = 13,
            .offset = 0 * sizeof(uint32_t),
            .size = sizeof(uint32_t)
        },
        {
            .constantID = 42,
            .offset = 1 * sizeof(uint32_t),
            .size = sizeof(uint32_t)
        },
        {
            .constantID = 3,
            .offset = 2 * sizeof(uint32_t),
            .size = sizeof(uint32_t)
        }
    };

    const uint32_t data[] = { 16, 8, 4 }; // our workgroup size is 16x8x4

    const VkSpecializationInfo info =
    {
        .mapEntryCount = 3,
        .pMapEntries  = entries,
        .dataSize = 3 * sizeof(uint32_t),
        .pData = data,
    };

Then when calling vkCreateComputePipelines, and passing the `VkSpecializationInfo` we defined as the `pSpecializationInfo` parameter of VkPipelineShaderStageCreateInfo, we will create a compute pipeline with the runtime specified local workgroup size.

Another example would be that an application has a SPIR-V module that has some platform-dependent constants they wish to use.

In human readable SPIR-V:

    OpDecorate %1 SpecId 0  ; decorate our signed 32-bit integer constant
    OpDecorate %2 SpecId 12 ; decorate our 32-bit floating-point constant
    %i32 = OpTypeInt 32 1   ; declare a signed 32-bit type
    %float = OpTypeFloat 32 ; declare a 32-bit floating-point type
    %1 = OpSpecConstant %i32 -1 ; some signed 32-bit integer constant
    %2 = OpSpecConstant %float 0.5 ; some 32-bit floating-point constant

From the above we have two specialization constants, one is a signed 32-bit integer and the second is a 32-bit floating-point value.

Now to specialize the above via the specialization constants mechanism:

    struct SpecializationData {
        int32_t data0;
        float data1;
    };

    const VkSpecializationMapEntry entries[] =
    {
        {
            .constantID = 0,
            .offset = offsetof(SpecializationData, data0),
            .size = sizeof(SpecializationData::data0)
        },
        {
            .constantID = 12,
            .offset = offsetof(SpecializationData, data1),
            .size = sizeof(SpecializationData::data1)
        }
    };

    SpecializationData data;
    data.data0 = -42;    // set the data for the 32-bit integer
    data.data1 = 42.0f;  // set the data for the 32-bit floating-point

    const VkSpecializationInfo info =
    {
        .mapEntryCount = 2,
        .pMapEntries = entries,
        .dataSize = sizeof(data),
        .pdata = &data,
    };

It is legal for a SPIR-V module with specializations to be compiled into a pipeline where no specialization information was provided. SPIR-V specialization constants contain default values such that if a specialization is not provided, the default value will be used. In the examples above, it would be valid for an application to only specialize some of the specialization constants within the SPIR-V module, and let the other constants use their default values encoded within the OpSpecConstant declarations.

### 10.11. Pipeline Libraries

A pipeline library is a special pipeline that was created using the VK_PIPELINE_CREATE_LIBRARY_BIT_KHR and cannot be bound, instead it defines a set of pipeline state which can be linked into other pipelines. For ray tracing pipelines this includes shaders and shader groups. For graphics pipelines this includes distinct library types defined by VkGraphicsPipelineLibraryFlagBitsEXT. The application must maintain the lifetime of a pipeline library based on the pipelines that link with it.

This linkage is achieved by using the following structure within the appropriate creation mechanisms:

The `VkPipelineLibraryCreateInfoKHR` structure is defined as:

    // Provided by VK_KHR_pipeline_library
    typedef struct VkPipelineLibraryCreateInfoKHR {
        VkStructureType      sType;
        const void*          pNext;
        uint32_t             libraryCount;
        const VkPipeline*    pLibraries;
    } VkPipelineLibraryCreateInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `libraryCount` is the number of pipeline libraries in `pLibraries`.

- `pLibraries` is a pointer to an array of VkPipeline structures specifying pipeline libraries to use when creating a pipeline.

Valid Usage

- VUID-VkPipelineLibraryCreateInfoKHR-pLibraries-03381
  Each element of `pLibraries` must have been created with VK_PIPELINE_CREATE_LIBRARY_BIT_KHR

- VUID-VkPipelineLibraryCreateInfoKHR-pLibraries-06855
  If any library in `pLibraries` was created with a shader stage with VkPipelineShaderStageModuleIdentifierCreateInfoEXT and `identifierSize` not equal to 0, the pipeline must be created with the VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT flag set

Valid Usage (Implicit)

- VUID-VkPipelineLibraryCreateInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PIPELINE_LIBRARY_CREATE_INFO_KHR

- VUID-VkPipelineLibraryCreateInfoKHR-pLibraries-parameter
  If `libraryCount` is not `0`, `pLibraries` must be a valid pointer to an array of `libraryCount` valid VkPipeline handles

Structure Chaining

Extends the structure

  - VkGraphicsPipelineCreateInfo

Pipelines created with VK_PIPELINE_CREATE_LIBRARY_BIT_KHR libraries can depend on other pipeline libraries in VkPipelineLibraryCreateInfoKHR.

A pipeline library is considered in-use, as long as one of the linking pipelines is in-use. This applies recursively if a pipeline library includes other pipeline libraries.

### 10.12. Pipeline Binding

Once a pipeline has been created, it can be bound to the command buffer using the command:

    // Provided by VK_VERSION_1_0
    void vkCmdBindPipeline(
        VkCommandBuffer                             commandBuffer,
        VkPipelineBindPoint                         pipelineBindPoint,
        VkPipeline                                  pipeline);

- `commandBuffer` is the command buffer that the pipeline will be bound to.

- `pipelineBindPoint` is a VkPipelineBindPoint value specifying to which bind point the pipeline is bound. Binding one does not disturb the others.

- `pipeline` is the pipeline to be bound.

Once bound, a pipeline binding affects subsequent commands that interact with the given pipeline type in the command buffer until a different pipeline of the same type is bound to the bind point, or until the pipeline bind point is disturbed by binding a shader object as described in Interaction with Pipelines. Commands that do not interact with the given pipeline type must not be affected by the pipeline state.

Valid Usage

- VUID-vkCmdBindPipeline-pipelineBindPoint-00777
  If `pipelineBindPoint` is VK_PIPELINE_BIND_POINT_COMPUTE, the `VkCommandPool` that `commandBuffer` was allocated from must support compute operations

- VUID-vkCmdBindPipeline-pipelineBindPoint-00778
  If `pipelineBindPoint` is VK_PIPELINE_BIND_POINT_GRAPHICS, the `VkCommandPool` that `commandBuffer` was allocated from must support graphics operations

- VUID-vkCmdBindPipeline-pipelineBindPoint-00779
  If `pipelineBindPoint` is VK_PIPELINE_BIND_POINT_COMPUTE, `pipeline` must be a compute pipeline

- VUID-vkCmdBindPipeline-pipelineBindPoint-00780
  If `pipelineBindPoint` is VK_PIPELINE_BIND_POINT_GRAPHICS, `pipeline` must be a graphics pipeline

- VUID-vkCmdBindPipeline-pipeline-00781
  If the `variableMultisampleRate` feature is not supported, `pipeline` is a graphics pipeline, the current subpass uses no attachments, and this is not the first call to this function with a graphics pipeline after transitioning to the current subpass, then the sample count specified by this pipeline must match that set in the previous pipeline

- VUID-vkCmdBindPipeline-variableSampleLocations-01525
  If VkPhysicalDeviceSampleLocationsPropertiesEXT::`variableSampleLocations` is VK_FALSE, and `pipeline` is a graphics pipeline created with a `renderPass` that is not VK_NULL_HANDLE and with a VkPipelineSampleLocationsStateCreateInfoEXT structure having its `sampleLocationsEnable` member set to VK_TRUE but without VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT enabled then the current render pass instance must have been begun by specifying a VkRenderPassSampleLocationsBeginInfoEXT structure whose `pPostSubpassSampleLocations` member contains an element with a `subpassIndex` matching the current subpass index and the `sampleLocationsInfo` member of that element must match the `sampleLocationsInfo` specified in VkPipelineSampleLocationsStateCreateInfoEXT when the pipeline was created

- VUID-vkCmdBindPipeline-None-02323
  This command must not be recorded when transform feedback is active

- VUID-vkCmdBindPipeline-pipelineBindPoint-02391
  If `pipelineBindPoint` is VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR, the `VkCommandPool` that `commandBuffer` was allocated from must support compute operations

- VUID-vkCmdBindPipeline-pipelineBindPoint-02392
  If `pipelineBindPoint` is VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR, `pipeline` must be a ray tracing pipeline

- VUID-vkCmdBindPipeline-pipelineBindPoint-06721
  If `pipelineBindPoint` is VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR, `commandBuffer` must not be a protected command buffer

- VUID-vkCmdBindPipeline-pipelineProtectedAccess-07408
  If the `pipelineProtectedAccess` feature is enabled, and `commandBuffer` is a protected command buffer, `pipeline` must have been created without VK_PIPELINE_CREATE_NO_PROTECTED_ACCESS_BIT

- VUID-vkCmdBindPipeline-pipelineProtectedAccess-07409
  If the `pipelineProtectedAccess` feature is enabled, and `commandBuffer` is not a protected command buffer, `pipeline` must have been created without VK_PIPELINE_CREATE_PROTECTED_ACCESS_ONLY_BIT

- VUID-vkCmdBindPipeline-pipeline-03382
  `pipeline` must not have been created with VK_PIPELINE_CREATE_LIBRARY_BIT_KHR set

- VUID-vkCmdBindPipeline-commandBuffer-04808
  If `commandBuffer` is a secondary command buffer with VkCommandBufferInheritanceViewportScissorInfoNV::`viewportScissor2D` enabled and `pipelineBindPoint` is VK_PIPELINE_BIND_POINT_GRAPHICS, then the `pipeline` must have been created with VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT or VK_DYNAMIC_STATE_VIEWPORT, and VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT or VK_DYNAMIC_STATE_SCISSOR enabled

- VUID-vkCmdBindPipeline-commandBuffer-04809
  If `commandBuffer` is a secondary command buffer with VkCommandBufferInheritanceViewportScissorInfoNV::`viewportScissor2D` enabled and `pipelineBindPoint` is VK_PIPELINE_BIND_POINT_GRAPHICS and `pipeline` was created with VkPipelineDiscardRectangleStateCreateInfoEXT structure and its `discardRectangleCount` member is not `0`, or the pipeline was created with VK_DYNAMIC_STATE_DISCARD_RECTANGLE_ENABLE_EXT enabled, then the pipeline must have been created with VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT enabled

- VUID-vkCmdBindPipeline-pipelineBindPoint-04881
  If `pipelineBindPoint` is VK_PIPELINE_BIND_POINT_GRAPHICS and the `provokingVertexModePerPipeline` limit is VK_FALSE, then pipeline’s VkPipelineRasterizationProvokingVertexStateCreateInfoEXT::`provokingVertexMode` must be the same as that of any other pipelines previously bound to this bind point within the current render pass instance, including any pipeline already bound when beginning the render pass instance

- VUID-vkCmdBindPipeline-pipelineBindPoint-04949
  If `pipelineBindPoint` is VK_PIPELINE_BIND_POINT_SUBPASS_SHADING_HUAWEI, the `VkCommandPool` that `commandBuffer` was allocated from must support compute operations

- VUID-vkCmdBindPipeline-pipelineBindPoint-04950
  If `pipelineBindPoint` is VK_PIPELINE_BIND_POINT_SUBPASS_SHADING_HUAWEI, `pipeline` must be a subpass shading pipeline

- VUID-vkCmdBindPipeline-pipelineBindPoint-09910
  If `pipelineBindPoint` is VK_PIPELINE_BIND_POINT_DATA_GRAPH_ARM, the `VkCommandPool` that `commandBuffer` was allocated from must have been created for a queue family that supports VK_QUEUE_DATA_GRAPH_BIT_ARM

- VUID-vkCmdBindPipeline-pipelineBindPoint-09911
  If `pipelineBindPoint` is VK_PIPELINE_BIND_POINT_DATA_GRAPH_ARM, `pipeline` must be a data graph pipeline

- VUID-vkCmdBindPipeline-pipeline-09912
  If `pipeline` is a data graph pipeline and the VkDataGraphPipelineCreateInfoARM structure used to create it had a VkDataGraphProcessingEngineCreateInfoARM structure in its `pNext` chain that specified any foreign data processing engines, then the command pool from which `commandBuffer` was allocated must have been created with a VkCommandPoolCreateInfo structure that had a VkDataGraphProcessingEngineCreateInfoARM structure specifying a superset of the foreign data graph processing engines specified at pipeline creation time in its `pNext` chain

- VUID-vkCmdBindPipeline-pipeline-09913
  If `pipeline` is a data graph pipeline and the VkDataGraphPipelineCreateInfoARM structure used to create it did not have a VkDataGraphProcessingEngineCreateInfoARM structure in its `pNext` chain, then the command pool from which `commandBuffer` was allocated must not have been created with a VkCommandPoolCreateInfo that had a VkDataGraphProcessingEngineCreateInfoARM structure in its `pNext` chain

Valid Usage (Implicit)

- VUID-vkCmdBindPipeline-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdBindPipeline-pipelineBindPoint-parameter
  `pipelineBindPoint` must be a valid VkPipelineBindPoint value

- VUID-vkCmdBindPipeline-pipeline-parameter
  `pipeline` must be a valid VkPipeline handle

- VUID-vkCmdBindPipeline-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdBindPipeline-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, VK_QUEUE_DATA_GRAPH_BIT_ARM, or VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdBindPipeline-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdBindPipeline-commonparent
  Both of `commandBuffer`, and `pipeline` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_DATA_GRAPH_BIT_ARM VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdBindPipeline is not affected by conditional rendering

Possible values of vkCmdBindPipeline::`pipelineBindPoint`, specifying the bind point of a pipeline object, are:

    // Provided by VK_VERSION_1_0
    typedef enum VkPipelineBindPoint {
        VK_PIPELINE_BIND_POINT_GRAPHICS = 0,
        VK_PIPELINE_BIND_POINT_COMPUTE = 1,
    #ifdef VK_ENABLE_BETA_EXTENSIONS
      // Provided by VK_AMDX_shader_enqueue
        VK_PIPELINE_BIND_POINT_EXECUTION_GRAPH_AMDX = 1000134000,
    #endif
      // Provided by VK_KHR_ray_tracing_pipeline
        VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR = 1000165000,
      // Provided by VK_HUAWEI_subpass_shading
        VK_PIPELINE_BIND_POINT_SUBPASS_SHADING_HUAWEI = 1000369003,
      // Provided by VK_ARM_data_graph
        VK_PIPELINE_BIND_POINT_DATA_GRAPH_ARM = 1000507000,
      // Provided by VK_NV_ray_tracing
        VK_PIPELINE_BIND_POINT_RAY_TRACING_NV = VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR,
    } VkPipelineBindPoint;

- VK_PIPELINE_BIND_POINT_COMPUTE specifies binding as a compute pipeline.

- VK_PIPELINE_BIND_POINT_GRAPHICS specifies binding as a graphics pipeline.

- VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR specifies binding as a ray tracing pipeline.

- VK_PIPELINE_BIND_POINT_SUBPASS_SHADING_HUAWEI specifies binding as a subpass shading pipeline.

- VK_PIPELINE_BIND_POINT_EXECUTION_GRAPH_AMDX specifies binding as an execution graph pipeline.

For pipelines that were created with the support of multiple shader groups (see Graphics Pipeline Shader Groups), the regular `vkCmdBindPipeline` command will bind Shader Group `0`. To explicitly bind a shader group use:

    // Provided by VK_NV_device_generated_commands
    void vkCmdBindPipelineShaderGroupNV(
        VkCommandBuffer                             commandBuffer,
        VkPipelineBindPoint                         pipelineBindPoint,
        VkPipeline                                  pipeline,
        uint32_t                                    groupIndex);

- `commandBuffer` is the command buffer that the pipeline will be bound to.

- `pipelineBindPoint` is a VkPipelineBindPoint value specifying the bind point to which the pipeline will be bound.

- `pipeline` is the pipeline to be bound.

- `groupIndex` is the shader group to be bound.

Valid Usage

- VUID-vkCmdBindPipelineShaderGroupNV-groupIndex-02893
  `groupIndex` must be `0` or less than the effective VkGraphicsPipelineShaderGroupsCreateInfoNV::`groupCount` including the referenced pipelines

- VUID-vkCmdBindPipelineShaderGroupNV-pipelineBindPoint-02894
  The `pipelineBindPoint` must be VK_PIPELINE_BIND_POINT_GRAPHICS

- VUID-vkCmdBindPipelineShaderGroupNV-groupIndex-02895
  The same restrictions as vkCmdBindPipeline apply as if the bound pipeline was created only with the Shader Group from the `groupIndex` information

- VUID-vkCmdBindPipelineShaderGroupNV-deviceGeneratedCommands-02896
  The `VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV`::`deviceGeneratedCommands` feature must be enabled

Valid Usage (Implicit)

- VUID-vkCmdBindPipelineShaderGroupNV-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdBindPipelineShaderGroupNV-pipelineBindPoint-parameter
  `pipelineBindPoint` must be a valid VkPipelineBindPoint value

- VUID-vkCmdBindPipelineShaderGroupNV-pipeline-parameter
  `pipeline` must be a valid VkPipeline handle

- VUID-vkCmdBindPipelineShaderGroupNV-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdBindPipelineShaderGroupNV-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, or VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdBindPipelineShaderGroupNV-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdBindPipelineShaderGroupNV-commonparent
  Both of `commandBuffer`, and `pipeline` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdBindPipelineShaderGroupNV is not affected by conditional rendering

#### 10.12.1. Interaction With Shader Objects

If the `shaderObject` feature is enabled, applications can use both pipelines and shader objects at the same time. The interaction between pipelines and shader objects is described in Interaction with Pipelines.

### 10.13. Dynamic State

When a pipeline object is bound, any pipeline object state that is not specified as dynamic is applied to the command buffer state. Pipeline object state that is specified as dynamic is not applied to the command buffer state at this time.

Instead, dynamic state can be modified at any time and persists for the lifetime of the command buffer, or until modified by another dynamic state setting command, or made invalid by binding a pipeline in which that state is statically specified.

If the `commandBufferInheritance` feature is enabled, all valid state from the previously executed command buffer in the queue is inherited into the next command buffer executed in the same queue. This inherited state does not need to be set again before draw or dispatch commands.

When a pipeline object is bound, the following applies to each state parameter:

- If the state is not specified as dynamic in the new pipeline object, then that command buffer state is overwritten by the state in the new pipeline object. Before any draw or dispatch call with this pipeline there must not have been any calls to any of the corresponding dynamic state setting commands after this pipeline was bound.

- If the state is specified as dynamic in the new pipeline object, then that command buffer state is not disturbed. Before any draw or dispatch call with this pipeline there must have been at least one call to each of the corresponding dynamic state setting commands. The state-setting commands must be recorded after command buffer recording was begun, or after the last command binding a pipeline object with that state specified as static, whichever was the latter.

- If the state is not included (corresponding pointer in VkGraphicsPipelineCreateInfo was `NULL` or was ignored) in the new pipeline object, then that command buffer state is not disturbed. For example, mesh shading pipelines do not include vertex input state and therefore do not disturb any such command buffer state.

Dynamic state that does not affect the result of operations can be left undefined.

Note | For example, if blending is disabled by the pipeline object state then the dynamic color blend constants do not need to be specified in the command buffer, even if this state is specified as dynamic in the pipeline object.

Note | Applications running on Vulkan implementations advertising a VkPhysicalDeviceDriverProperties::`conformanceVersion` less than 1.3.8.0 should be aware that rebinding the bound pipeline object may not reapply static state.

### 10.14. Pipeline Properties and Shader Information

When a pipeline is created, its state and shaders are compiled into zero or more device-specific executables, which are used when executing commands against that pipeline. To query the properties of these pipeline executables, call:

    // Provided by VK_KHR_pipeline_executable_properties
    VkResult vkGetPipelineExecutablePropertiesKHR(
        VkDevice                                    device,
        const VkPipelineInfoKHR*                    pPipelineInfo,
        uint32_t*                                   pExecutableCount,
        VkPipelineExecutablePropertiesKHR*          pProperties);

- `device` is the device that created the pipeline.

- `pPipelineInfo` describes the pipeline being queried.

- `pExecutableCount` is a pointer to an integer related to the number of pipeline executables available or queried, as described below.

- `pProperties` is either `NULL` or a pointer to an array of VkPipelineExecutablePropertiesKHR structures.

If `pProperties` is `NULL`, then the number of pipeline executables associated with the pipeline is returned in `pExecutableCount`. Otherwise, `pExecutableCount` must point to a variable set by the application to the number of elements in the `pProperties` array, and on return the variable is overwritten with the number of structures actually written to `pProperties`. If `pExecutableCount` is less than the number of pipeline executables associated with the pipeline, at most `pExecutableCount` structures will be written, and VK_INCOMPLETE will be returned instead of VK_SUCCESS, to indicate that not all the available properties were returned.

Valid Usage

- VUID-vkGetPipelineExecutablePropertiesKHR-pipelineExecutableInfo-03270
  The `pipelineExecutableInfo` feature must be enabled

- VUID-vkGetPipelineExecutablePropertiesKHR-pipeline-03271
  The `pipeline` member of `pPipelineInfo` must have been created with `device`

Valid Usage (Implicit)

- VUID-vkGetPipelineExecutablePropertiesKHR-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetPipelineExecutablePropertiesKHR-pPipelineInfo-parameter
  `pPipelineInfo` must be a valid pointer to a valid VkPipelineInfoKHR structure

- VUID-vkGetPipelineExecutablePropertiesKHR-pExecutableCount-parameter
  `pExecutableCount` must be a valid pointer to a `uint32_t` value

- VUID-vkGetPipelineExecutablePropertiesKHR-pProperties-parameter
  If the value referenced by `pExecutableCount` is not `0`, and `pProperties` is not `NULL`, `pProperties` must be a valid pointer to an array of `pExecutableCount` VkPipelineExecutablePropertiesKHR structures

Return Codes

Success

  - VK_INCOMPLETE

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkPipelineExecutablePropertiesKHR` structure is defined as:

    // Provided by VK_KHR_pipeline_executable_properties
    typedef struct VkPipelineExecutablePropertiesKHR {
        VkStructureType       sType;
        void*                 pNext;
        VkShaderStageFlags    stages;
        char                  name[VK_MAX_DESCRIPTION_SIZE];
        char                  description[VK_MAX_DESCRIPTION_SIZE];
        uint32_t              subgroupSize;
    } VkPipelineExecutablePropertiesKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `stages` is a bitmask of zero or more VkShaderStageFlagBits indicating which shader stages (if any) were principally used as inputs to compile this pipeline executable.

- `name` is an array of VK_MAX_DESCRIPTION_SIZE `char` containing a null-terminated UTF-8 string which is a short human readable name for this pipeline executable.

- `description` is an array of VK_MAX_DESCRIPTION_SIZE `char` containing a null-terminated UTF-8 string which is a human readable description for this pipeline executable.

- `subgroupSize` is the subgroup size with which this pipeline executable is dispatched.

Not all implementations have a 1:1 mapping between shader stages and pipeline executables and some implementations may reduce a given shader stage to fixed function hardware programming such that no pipeline executable is available. No guarantees are provided about the mapping between shader stages and pipeline executables and `stages` should be considered a best effort hint. Because the application cannot rely on the `stages` field to provide an exact description, `name` and `description` provide a human readable name and description which more accurately describes the given pipeline executable.

Valid Usage (Implicit)

- VUID-VkPipelineExecutablePropertiesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_PROPERTIES_KHR

- VUID-VkPipelineExecutablePropertiesKHR-pNext-pNext
  `pNext` must be `NULL`

To query the pipeline properties call:

    // Provided by VK_EXT_pipeline_properties
    VkResult vkGetPipelinePropertiesEXT(
        VkDevice                                    device,
        const VkPipelineInfoKHR*                    pPipelineInfo,
        VkBaseOutStructure*                         pPipelineProperties);

- `device` is the logical device that created the pipeline.

- `pPipelineInfo` is a pointer to a VkPipelineInfoEXT structure which describes the pipeline being queried.

- `pPipelineProperties` is a pointer to a VkBaseOutStructure structure in which the pipeline properties will be written.

To query a pipeline’s `pipelineIdentifier` pass a VkPipelinePropertiesIdentifierEXT structure in `pPipelineProperties`. Each pipeline is associated with a `pipelineIdentifier` and the identifier is implementation specific.

Valid Usage

- VUID-vkGetPipelinePropertiesEXT-pipeline-06738
  The `pipeline` member of `pPipelineInfo` must have been created with `device`

- VUID-vkGetPipelinePropertiesEXT-pPipelineProperties-06739
  `pPipelineProperties` must be a valid pointer to a VkPipelinePropertiesIdentifierEXT structure

- VUID-vkGetPipelinePropertiesEXT-None-06766
  The `pipelinePropertiesIdentifier` feature must be enabled

Valid Usage (Implicit)

- VUID-vkGetPipelinePropertiesEXT-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetPipelinePropertiesEXT-pPipelineInfo-parameter
  `pPipelineInfo` must be a valid pointer to a valid VkPipelineInfoKHR structure

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkPipelinePropertiesIdentifierEXT` structure is defined as:

    // Provided by VK_EXT_pipeline_properties
    typedef struct VkPipelinePropertiesIdentifierEXT {
        VkStructureType    sType;
        void*              pNext;
        uint8_t            pipelineIdentifier[VK_UUID_SIZE];
    } VkPipelinePropertiesIdentifierEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `pipelineIdentifier` is an array of VK_UUID_SIZE `uint8_t` values into which the pipeline identifier will be written.

Valid Usage (Implicit)

- VUID-VkPipelinePropertiesIdentifierEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PIPELINE_PROPERTIES_IDENTIFIER_EXT

- VUID-VkPipelinePropertiesIdentifierEXT-pNext-pNext
  `pNext` must be `NULL`

The `VkPipelineInfoKHR` structure is defined as:

    // Provided by VK_KHR_pipeline_executable_properties
    typedef struct VkPipelineInfoKHR {
        VkStructureType    sType;
        const void*        pNext;
        VkPipeline         pipeline;
    } VkPipelineInfoKHR;

    // Provided by VK_EXT_pipeline_properties
    // Equivalent to VkPipelineInfoKHR
    typedef VkPipelineInfoKHR VkPipelineInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `pipeline` is a `VkPipeline` handle.

Valid Usage (Implicit)

- VUID-VkPipelineInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PIPELINE_INFO_KHR

- VUID-VkPipelineInfoKHR-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkPipelineInfoKHR-pipeline-parameter
  `pipeline` must be a valid VkPipeline handle

Each pipeline executable may have a set of statistics associated with it that are generated by the pipeline compilation process. These statistics may include things such as instruction counts, amount of spilling (if any), maximum number of simultaneous threads, or anything else which may aid developers in evaluating the expected performance of a shader. To query the compile time statistics associated with a pipeline executable, call:

    // Provided by VK_KHR_pipeline_executable_properties
    VkResult vkGetPipelineExecutableStatisticsKHR(
        VkDevice                                    device,
        const VkPipelineExecutableInfoKHR*          pExecutableInfo,
        uint32_t*                                   pStatisticCount,
        VkPipelineExecutableStatisticKHR*           pStatistics);

- `device` is the device that created the pipeline.

- `pExecutableInfo` describes the pipeline executable being queried.

- `pStatisticCount` is a pointer to an integer related to the number of statistics available or queried, as described below.

- `pStatistics` is either `NULL` or a pointer to an array of VkPipelineExecutableStatisticKHR structures.

If `pStatistics` is `NULL`, then the number of statistics associated with the pipeline executable is returned in `pStatisticCount`. Otherwise, `pStatisticCount` must point to a variable set by the application to the number of elements in the `pStatistics` array, and on return the variable is overwritten with the number of structures actually written to `pStatistics`. If `pStatisticCount` is less than the number of statistics associated with the pipeline executable, at most `pStatisticCount` structures will be written, and VK_INCOMPLETE will be returned instead of VK_SUCCESS, to indicate that not all the available statistics were returned.

Valid Usage

- VUID-vkGetPipelineExecutableStatisticsKHR-pipelineExecutableInfo-03272
  The `pipelineExecutableInfo` feature must be enabled

- VUID-vkGetPipelineExecutableStatisticsKHR-pipeline-03273
  The `pipeline` member of `pExecutableInfo` must have been created with `device`

- VUID-vkGetPipelineExecutableStatisticsKHR-pipeline-03274
  The `pipeline` member of `pExecutableInfo` must have been created with VK_PIPELINE_CREATE_CAPTURE_STATISTICS_BIT_KHR

Valid Usage (Implicit)

- VUID-vkGetPipelineExecutableStatisticsKHR-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetPipelineExecutableStatisticsKHR-pExecutableInfo-parameter
  `pExecutableInfo` must be a valid pointer to a valid VkPipelineExecutableInfoKHR structure

- VUID-vkGetPipelineExecutableStatisticsKHR-pStatisticCount-parameter
  `pStatisticCount` must be a valid pointer to a `uint32_t` value

- VUID-vkGetPipelineExecutableStatisticsKHR-pStatistics-parameter
  If the value referenced by `pStatisticCount` is not `0`, and `pStatistics` is not `NULL`, `pStatistics` must be a valid pointer to an array of `pStatisticCount` VkPipelineExecutableStatisticKHR structures

Return Codes

Success

  - VK_INCOMPLETE

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkPipelineExecutableInfoKHR` structure is defined as:

    // Provided by VK_KHR_pipeline_executable_properties
    typedef struct VkPipelineExecutableInfoKHR {
        VkStructureType    sType;
        const void*        pNext;
        VkPipeline         pipeline;
        uint32_t           executableIndex;
    } VkPipelineExecutableInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `pipeline` is the pipeline to query.

- `executableIndex` is the index of the pipeline executable to query in the array of executable properties returned by vkGetPipelineExecutablePropertiesKHR.

Valid Usage

- VUID-VkPipelineExecutableInfoKHR-executableIndex-03275
  `executableIndex` must be less than the number of pipeline executables associated with `pipeline` as returned in the `pExecutableCount` parameter of `vkGetPipelineExecutablePropertiesKHR`

Valid Usage (Implicit)

- VUID-VkPipelineExecutableInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_INFO_KHR

- VUID-VkPipelineExecutableInfoKHR-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkPipelineExecutableInfoKHR-pipeline-parameter
  `pipeline` must be a valid VkPipeline handle

The `VkPipelineExecutableStatisticKHR` structure is defined as:

    // Provided by VK_KHR_pipeline_executable_properties
    typedef struct VkPipelineExecutableStatisticKHR {
        VkStructureType                           sType;
        void*                                     pNext;
        char                                      name[VK_MAX_DESCRIPTION_SIZE];
        char                                      description[VK_MAX_DESCRIPTION_SIZE];
        VkPipelineExecutableStatisticFormatKHR    format;
        VkPipelineExecutableStatisticValueKHR     value;
    } VkPipelineExecutableStatisticKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `name` is an array of VK_MAX_DESCRIPTION_SIZE `char` containing a null-terminated UTF-8 string which is a short human readable name for this statistic.

- `description` is an array of VK_MAX_DESCRIPTION_SIZE `char` containing a null-terminated UTF-8 string which is a human readable description for this statistic.

- `format` is a VkPipelineExecutableStatisticFormatKHR value specifying the format of the data found in `value`.

- `value` is the value of this statistic.

Valid Usage (Implicit)

- VUID-VkPipelineExecutableStatisticKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_STATISTIC_KHR

- VUID-VkPipelineExecutableStatisticKHR-pNext-pNext
  `pNext` must be `NULL`

The VkPipelineExecutableStatisticFormatKHR enum is defined as:

    // Provided by VK_KHR_pipeline_executable_properties
    typedef enum VkPipelineExecutableStatisticFormatKHR {
        VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_BOOL32_KHR = 0,
        VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_INT64_KHR = 1,
        VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_UINT64_KHR = 2,
        VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_FLOAT64_KHR = 3,
    } VkPipelineExecutableStatisticFormatKHR;

- VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_BOOL32_KHR specifies that the statistic is returned as a 32-bit boolean value which must be either VK_TRUE or VK_FALSE and should be read from the `b32` field of `VkPipelineExecutableStatisticValueKHR`.

- VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_INT64_KHR specifies that the statistic is returned as a signed 64-bit integer and should be read from the `i64` field of `VkPipelineExecutableStatisticValueKHR`.

- VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_UINT64_KHR specifies that the statistic is returned as an unsigned 64-bit integer and should be read from the `u64` field of `VkPipelineExecutableStatisticValueKHR`.

- VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_FLOAT64_KHR specifies that the statistic is returned as a 64-bit floating-point value and should be read from the `f64` field of `VkPipelineExecutableStatisticValueKHR`.

The `VkPipelineExecutableStatisticValueKHR` union is defined as:

    // Provided by VK_KHR_pipeline_executable_properties
    typedef union VkPipelineExecutableStatisticValueKHR {
        VkBool32    b32;
        int64_t     i64;
        uint64_t    u64;
        double      f64;
    } VkPipelineExecutableStatisticValueKHR;

- `b32` is the 32-bit boolean value if the VkPipelineExecutableStatisticFormatKHR is VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_BOOL32_KHR.

- `i64` is the signed 64-bit integer value if the VkPipelineExecutableStatisticFormatKHR is VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_INT64_KHR.

- `u64` is the unsigned 64-bit integer value if the VkPipelineExecutableStatisticFormatKHR is VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_UINT64_KHR.

- `f64` is the 64-bit floating-point value if the VkPipelineExecutableStatisticFormatKHR is VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_FLOAT64_KHR.

Each pipeline executable may have one or more text or binary internal representations associated with it which are generated as part of the compile process. These may include the final shader assembly, a binary form of the compiled shader, or the shader compiler’s internal representation at any number of intermediate compile steps. To query the internal representations associated with a pipeline executable, call:

    // Provided by VK_KHR_pipeline_executable_properties
    VkResult vkGetPipelineExecutableInternalRepresentationsKHR(
        VkDevice                                    device,
        const VkPipelineExecutableInfoKHR*          pExecutableInfo,
        uint32_t*                                   pInternalRepresentationCount,
        VkPipelineExecutableInternalRepresentationKHR* pInternalRepresentations);

- `device` is the device that created the pipeline.

- `pExecutableInfo` describes the pipeline executable being queried.

- `pInternalRepresentationCount` is a pointer to an integer related to the number of internal representations available or queried, as described below.

- `pInternalRepresentations` is either `NULL` or a pointer to an array of VkPipelineExecutableInternalRepresentationKHR structures.

If `pInternalRepresentations` is `NULL`, then the number of internal representations associated with the pipeline executable is returned in `pInternalRepresentationCount`. Otherwise, `pInternalRepresentationCount` must point to a variable set by the application to the number of elements in the `pInternalRepresentations` array, and on return the variable is overwritten with the number of structures actually written to `pInternalRepresentations`. If `pInternalRepresentationCount` is less than the number of internal representations associated with the pipeline executable, at most `pInternalRepresentationCount` structures will be written, and VK_INCOMPLETE will be returned instead of VK_SUCCESS, to indicate that not all the available representations were returned.

While the details of the internal representations remain implementation-dependent, the implementation should order the internal representations in the order in which they occur in the compiled pipeline with the final shader assembly (if any) last.

Valid Usage

- VUID-vkGetPipelineExecutableInternalRepresentationsKHR-pipelineExecutableInfo-03276
  The `pipelineExecutableInfo` feature must be enabled

- VUID-vkGetPipelineExecutableInternalRepresentationsKHR-pipeline-03277
  The `pipeline` member of `pExecutableInfo` must have been created with `device`

- VUID-vkGetPipelineExecutableInternalRepresentationsKHR-pipeline-03278
  The `pipeline` member of `pExecutableInfo` must have been created with VK_PIPELINE_CREATE_CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR

Valid Usage (Implicit)

- VUID-vkGetPipelineExecutableInternalRepresentationsKHR-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetPipelineExecutableInternalRepresentationsKHR-pExecutableInfo-parameter
  `pExecutableInfo` must be a valid pointer to a valid VkPipelineExecutableInfoKHR structure

- VUID-vkGetPipelineExecutableInternalRepresentationsKHR-pInternalRepresentationCount-parameter
  `pInternalRepresentationCount` must be a valid pointer to a `uint32_t` value

- VUID-vkGetPipelineExecutableInternalRepresentationsKHR-pInternalRepresentations-parameter
  If the value referenced by `pInternalRepresentationCount` is not `0`, and `pInternalRepresentations` is not `NULL`, `pInternalRepresentations` must be a valid pointer to an array of `pInternalRepresentationCount` VkPipelineExecutableInternalRepresentationKHR structures

Return Codes

Success

  - VK_INCOMPLETE

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkPipelineExecutableInternalRepresentationKHR` structure is defined as:

    // Provided by VK_KHR_pipeline_executable_properties
    typedef struct VkPipelineExecutableInternalRepresentationKHR {
        VkStructureType    sType;
        void*              pNext;
        char               name[VK_MAX_DESCRIPTION_SIZE];
        char               description[VK_MAX_DESCRIPTION_SIZE];
        VkBool32           isText;
        size_t             dataSize;
        void*              pData;
    } VkPipelineExecutableInternalRepresentationKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `name` is an array of VK_MAX_DESCRIPTION_SIZE `char` containing a null-terminated UTF-8 string which is a short human readable name for this internal representation.

- `description` is an array of VK_MAX_DESCRIPTION_SIZE `char` containing a null-terminated UTF-8 string which is a human readable description for this internal representation.

- `isText` specifies whether the returned data is text or opaque data. If `isText` is VK_TRUE then the data returned in `pData` is text and is guaranteed to be a null-terminated UTF-8 string.

- `dataSize` is an integer related to the size, in bytes, of the internal representation’s data, as described below.

- `pData` is either `NULL` or a pointer to a block of data into which the implementation will write the internal representation.

If `pData` is `NULL`, then the size, in bytes, of the internal representation data is returned in `dataSize`. Otherwise, `dataSize` must be the size of the buffer, in bytes, pointed to by `pData` and on return `dataSize` is overwritten with the number of bytes of data actually written to `pData` including any trailing null character. If `dataSize` is less than the size, in bytes, of the internal representation’s data, at most `dataSize` bytes of data will be written to `pData`, and VK_INCOMPLETE will be returned instead of VK_SUCCESS, to indicate that not all the available representation was returned.

If `isText` is VK_TRUE and `pData` is not `NULL` and `dataSize` is not zero, the last byte written to `pData` will be a null character.

Valid Usage (Implicit)

- VUID-VkPipelineExecutableInternalRepresentationKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_INTERNAL_REPRESENTATION_KHR

- VUID-VkPipelineExecutableInternalRepresentationKHR-pNext-pNext
  `pNext` must be `NULL`

Information about a particular shader that has been compiled as part of a pipeline object can be extracted by calling:

    // Provided by VK_AMD_shader_info
    VkResult vkGetShaderInfoAMD(
        VkDevice                                    device,
        VkPipeline                                  pipeline,
        VkShaderStageFlagBits                       shaderStage,
        VkShaderInfoTypeAMD                         infoType,
        size_t*                                     pInfoSize,
        void*                                       pInfo);

- `device` is the device that created `pipeline`.

- `pipeline` is the target of the query.

- `shaderStage` is a VkShaderStageFlagBits specifying the particular shader within the pipeline about which information is being queried.

- `infoType` describes what kind of information is being queried.

- `pInfoSize` is a pointer to a value related to the amount of data the query returns, as described below.

- `pInfo` is either `NULL` or a pointer to a buffer.

If `pInfo` is `NULL`, then the maximum size of the information that can be retrieved about the shader, in bytes, is returned in `pInfoSize`. Otherwise, `pInfoSize` must point to a variable set by the application to the size of the buffer, in bytes, pointed to by `pInfo`, and on return the variable is overwritten with the amount of data actually written to `pInfo`. If `pInfoSize` is less than the maximum size that can be retrieved by the pipeline cache, then at most `pInfoSize` bytes will be written to `pInfo`, and VK_INCOMPLETE will be returned, instead of VK_SUCCESS, to indicate that not all required of the pipeline cache was returned.

Not all information is available for every shader and implementations may not support all kinds of information for any shader. When a certain type of information is unavailable, the function returns VK_ERROR_FEATURE_NOT_PRESENT.

If information is successfully and fully queried, the function will return VK_SUCCESS.

For `infoType` VK_SHADER_INFO_TYPE_STATISTICS_AMD, a `VkShaderStatisticsInfoAMD` structure will be written to the buffer pointed to by `pInfo`. This structure will be populated with statistics regarding the physical device resources used by that shader along with other miscellaneous information and is described in further detail below.

For `infoType` VK_SHADER_INFO_TYPE_DISASSEMBLY_AMD, `pInfo` is a pointer to a null-terminated UTF-8 string containing human-readable disassembly. The exact formatting and contents of the disassembly string are vendor-specific.

The formatting and contents of all other types of information, including `infoType` VK_SHADER_INFO_TYPE_BINARY_AMD, are left to the vendor and are not further specified by this extension.

Note | This query does not behave consistently with the behavior described in Opaque Binary Data Results, for historical reasons. If the amount of data available is larger than the passed `pInfoSize`, the query returns up to the size of the passed buffer, and signals overflow with a VK_INCOMPLETE success status instead of returning a VK_ERROR_NOT_ENOUGH_SPACE_KHR error status.

Valid Usage (Implicit)

- VUID-vkGetShaderInfoAMD-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetShaderInfoAMD-pipeline-parameter
  `pipeline` must be a valid VkPipeline handle

- VUID-vkGetShaderInfoAMD-shaderStage-parameter
  `shaderStage` must be a valid VkShaderStageFlagBits value

- VUID-vkGetShaderInfoAMD-infoType-parameter
  `infoType` must be a valid VkShaderInfoTypeAMD value

- VUID-vkGetShaderInfoAMD-pInfoSize-parameter
  `pInfoSize` must be a valid pointer to a `size_t` value

- VUID-vkGetShaderInfoAMD-pInfo-parameter
  If the value referenced by `pInfoSize` is not `0`, and `pInfo` is not `NULL`, `pInfo` must be a valid pointer to an array of `pInfoSize` bytes

- VUID-vkGetShaderInfoAMD-pipeline-parent
  `pipeline` must have been created, allocated, or retrieved from `device`

Return Codes

Success

  - VK_INCOMPLETE

  - VK_SUCCESS

Failure

  - VK_ERROR_FEATURE_NOT_PRESENT

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

Possible values of vkGetShaderInfoAMD::`infoType`, specifying the information being queried from a shader, are:

    // Provided by VK_AMD_shader_info
    typedef enum VkShaderInfoTypeAMD {
        VK_SHADER_INFO_TYPE_STATISTICS_AMD = 0,
        VK_SHADER_INFO_TYPE_BINARY_AMD = 1,
        VK_SHADER_INFO_TYPE_DISASSEMBLY_AMD = 2,
    } VkShaderInfoTypeAMD;

- VK_SHADER_INFO_TYPE_STATISTICS_AMD specifies that device resources used by a shader will be queried.

- VK_SHADER_INFO_TYPE_BINARY_AMD specifies that implementation-specific information will be queried.

- VK_SHADER_INFO_TYPE_DISASSEMBLY_AMD specifies that human-readable disassembly of a shader.

The `VkShaderStatisticsInfoAMD` structure is defined as:

    // Provided by VK_AMD_shader_info
    typedef struct VkShaderStatisticsInfoAMD {
        VkShaderStageFlags          shaderStageMask;
        VkShaderResourceUsageAMD    resourceUsage;
        uint32_t                    numPhysicalVgprs;
        uint32_t                    numPhysicalSgprs;
        uint32_t                    numAvailableVgprs;
        uint32_t                    numAvailableSgprs;
        uint32_t                    computeWorkGroupSize[3];
    } VkShaderStatisticsInfoAMD;

- `shaderStageMask` are the combination of logical shader stages contained within this shader.

- `resourceUsage` is a VkShaderResourceUsageAMD structure describing internal physical device resources used by this shader.

- `numPhysicalVgprs` is the maximum number of vector instruction general-purpose registers (VGPRs) available to the physical device.

- `numPhysicalSgprs` is the maximum number of scalar instruction general-purpose registers (SGPRs) available to the physical device.

- `numAvailableVgprs` is the maximum limit of VGPRs made available to the shader compiler.

- `numAvailableSgprs` is the maximum limit of SGPRs made available to the shader compiler.

- `computeWorkGroupSize` is the local workgroup size of this shader in { X, Y, Z } dimensions.

Some implementations may merge multiple logical shader stages together in a single shader. In such cases, `shaderStageMask` will contain a bitmask of all of the stages that are active within that shader. Consequently, if specifying those stages as input to vkGetShaderInfoAMD, the same output information may be returned for all such shader stage queries.

The number of available VGPRs and SGPRs (`numAvailableVgprs` and `numAvailableSgprs` respectively) are the shader-addressable subset of physical registers that is given as a limit to the compiler for register assignment. These values may further be limited by implementations due to performance optimizations where register pressure is a bottleneck.

The `VkShaderResourceUsageAMD` structure is defined as:

    // Provided by VK_AMD_shader_info
    typedef struct VkShaderResourceUsageAMD {
        uint32_t    numUsedVgprs;
        uint32_t    numUsedSgprs;
        uint32_t    ldsSizePerLocalWorkGroup;
        size_t      ldsUsageSizeInBytes;
        size_t      scratchMemUsageInBytes;
    } VkShaderResourceUsageAMD;

- `numUsedVgprs` is the number of vector instruction general-purpose registers used by this shader.

- `numUsedSgprs` is the number of scalar instruction general-purpose registers used by this shader.

- `ldsSizePerLocalWorkGroup` is the maximum local data store size per work group in bytes.

- `ldsUsageSizeInBytes` is the LDS usage size in bytes per work group by this shader.

- `scratchMemUsageInBytes` is the scratch memory usage in bytes by this shader.

### 10.15. Pipeline Compiler Control

The compilation of a pipeline can be tuned by adding a `VkPipelineCompilerControlCreateInfoAMD` structure to the `pNext` chain of VkGraphicsPipelineCreateInfo or VkComputePipelineCreateInfo.

    // Provided by VK_AMD_pipeline_compiler_control
    typedef struct VkPipelineCompilerControlCreateInfoAMD {
        VkStructureType                      sType;
        const void*                          pNext;
        VkPipelineCompilerControlFlagsAMD    compilerControlFlags;
    } VkPipelineCompilerControlCreateInfoAMD;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `compilerControlFlags` is a bitmask of VkPipelineCompilerControlFlagBitsAMD affecting how the pipeline will be compiled.

Valid Usage (Implicit)

- VUID-VkPipelineCompilerControlCreateInfoAMD-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PIPELINE_COMPILER_CONTROL_CREATE_INFO_AMD

- VUID-VkPipelineCompilerControlCreateInfoAMD-compilerControlFlags-zerobitmask
  `compilerControlFlags` must be `0`

Structure Chaining

Extends the structures

  - VkComputePipelineCreateInfo

  - VkExecutionGraphPipelineCreateInfoAMDX

  - VkGraphicsPipelineCreateInfo

There are currently no available flags for this extension; flags will be added by future versions of this extension.

    // Provided by VK_AMD_pipeline_compiler_control
    typedef enum VkPipelineCompilerControlFlagBitsAMD {
    } VkPipelineCompilerControlFlagBitsAMD;

    // Provided by VK_AMD_pipeline_compiler_control
    typedef VkFlags VkPipelineCompilerControlFlagsAMD;

`VkPipelineCompilerControlFlagsAMD` is a bitmask type for setting a mask of zero or more VkPipelineCompilerControlFlagBitsAMD.

### 10.16. Pipeline Creation Feedback

Feedback about the creation of a particular pipeline object can be obtained by adding a `VkPipelineCreationFeedbackCreateInfo` structure to the `pNext` chain of VkGraphicsPipelineCreateInfo, VkRayTracingPipelineCreateInfoKHR, VkRayTracingPipelineCreateInfoNV, VkDataGraphPipelineCreateInfoARM, or VkComputePipelineCreateInfo. The `VkPipelineCreationFeedbackCreateInfo` structure is defined as:

    // Provided by VK_VERSION_1_3
    typedef struct VkPipelineCreationFeedbackCreateInfo {
        VkStructureType                sType;
        const void*                    pNext;
        VkPipelineCreationFeedback*    pPipelineCreationFeedback;
        uint32_t                       pipelineStageCreationFeedbackCount;
        VkPipelineCreationFeedback*    pPipelineStageCreationFeedbacks;
    } VkPipelineCreationFeedbackCreateInfo;

    // Provided by VK_EXT_pipeline_creation_feedback
    // Equivalent to VkPipelineCreationFeedbackCreateInfo
    typedef VkPipelineCreationFeedbackCreateInfo VkPipelineCreationFeedbackCreateInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `pPipelineCreationFeedback` is a pointer to a VkPipelineCreationFeedback structure.

- `pipelineStageCreationFeedbackCount` is the number of elements in `pPipelineStageCreationFeedbacks`.

- `pPipelineStageCreationFeedbacks` is a pointer to an array of `pipelineStageCreationFeedbackCount` VkPipelineCreationFeedback structures.

An implementation should write pipeline creation feedback to `pPipelineCreationFeedback` and may write pipeline stage creation feedback to `pPipelineStageCreationFeedbacks`. An implementation must set or clear the VK_PIPELINE_CREATION_FEEDBACK_VALID_BIT in VkPipelineCreationFeedback::`flags` for `pPipelineCreationFeedback` and every element of `pPipelineStageCreationFeedbacks`.

Note | One common scenario for an implementation to skip per-stage feedback is when VK_PIPELINE_CREATION_FEEDBACK_APPLICATION_PIPELINE_CACHE_HIT_BIT is set in `pPipelineCreationFeedback`.

When chained to VkRayTracingPipelineCreateInfoKHR, VkRayTracingPipelineCreateInfoNV, or VkGraphicsPipelineCreateInfo, the `i` element of `pPipelineStageCreationFeedbacks` corresponds to the `i` element of VkRayTracingPipelineCreateInfoKHR::`pStages`, VkRayTracingPipelineCreateInfoNV::`pStages`, or VkGraphicsPipelineCreateInfo::`pStages`. When chained to VkComputePipelineCreateInfo, the first element of `pPipelineStageCreationFeedbacks` corresponds to VkComputePipelineCreateInfo::`stage`.

Valid Usage (Implicit)

- VUID-VkPipelineCreationFeedbackCreateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO

- VUID-VkPipelineCreationFeedbackCreateInfo-pPipelineCreationFeedback-parameter
  `pPipelineCreationFeedback` must be a valid pointer to a VkPipelineCreationFeedback structure

- VUID-VkPipelineCreationFeedbackCreateInfo-pPipelineStageCreationFeedbacks-parameter
  If `pipelineStageCreationFeedbackCount` is not `0`, `pPipelineStageCreationFeedbacks` must be a valid pointer to an array of `pipelineStageCreationFeedbackCount` VkPipelineCreationFeedback structures

Structure Chaining

Extends the structures

  - VkComputePipelineCreateInfo

  - VkDataGraphPipelineCreateInfoARM

  - VkExecutionGraphPipelineCreateInfoAMDX

  - VkGraphicsPipelineCreateInfo

  - VkRayTracingPipelineCreateInfoKHR

  - VkRayTracingPipelineCreateInfoNV

The `VkPipelineCreationFeedback` structure is defined as:

    // Provided by VK_VERSION_1_3
    typedef struct VkPipelineCreationFeedback {
        VkPipelineCreationFeedbackFlags    flags;
        uint64_t                           duration;
    } VkPipelineCreationFeedback;

    // Provided by VK_EXT_pipeline_creation_feedback
    // Equivalent to VkPipelineCreationFeedback
    typedef VkPipelineCreationFeedback VkPipelineCreationFeedbackEXT;

- `flags` is a bitmask of VkPipelineCreationFeedbackFlagBits providing feedback about the creation of a pipeline or of a pipeline stage.

- `duration` is the duration spent creating a pipeline or pipeline stage in nanoseconds.

If the VK_PIPELINE_CREATION_FEEDBACK_VALID_BIT is not set in `flags`, an implementation must not set any other bits in `flags`, and the values of all other `VkPipelineCreationFeedback` data members are undefined.

Possible values of the `flags` member of VkPipelineCreationFeedback are:

    // Provided by VK_VERSION_1_3
    typedef enum VkPipelineCreationFeedbackFlagBits {
        VK_PIPELINE_CREATION_FEEDBACK_VALID_BIT = 0x00000001,
        VK_PIPELINE_CREATION_FEEDBACK_APPLICATION_PIPELINE_CACHE_HIT_BIT = 0x00000002,
        VK_PIPELINE_CREATION_FEEDBACK_BASE_PIPELINE_ACCELERATION_BIT = 0x00000004,
      // Provided by VK_EXT_pipeline_creation_feedback
        VK_PIPELINE_CREATION_FEEDBACK_VALID_BIT_EXT = VK_PIPELINE_CREATION_FEEDBACK_VALID_BIT,
      // Provided by VK_EXT_pipeline_creation_feedback
        VK_PIPELINE_CREATION_FEEDBACK_APPLICATION_PIPELINE_CACHE_HIT_BIT_EXT = VK_PIPELINE_CREATION_FEEDBACK_APPLICATION_PIPELINE_CACHE_HIT_BIT,
      // Provided by VK_EXT_pipeline_creation_feedback
        VK_PIPELINE_CREATION_FEEDBACK_BASE_PIPELINE_ACCELERATION_BIT_EXT = VK_PIPELINE_CREATION_FEEDBACK_BASE_PIPELINE_ACCELERATION_BIT,
    } VkPipelineCreationFeedbackFlagBits;

    // Provided by VK_EXT_pipeline_creation_feedback
    // Equivalent to VkPipelineCreationFeedbackFlagBits
    typedef VkPipelineCreationFeedbackFlagBits VkPipelineCreationFeedbackFlagBitsEXT;

- VK_PIPELINE_CREATION_FEEDBACK_VALID_BIT specifies that the feedback information is valid.

- VK_PIPELINE_CREATION_FEEDBACK_APPLICATION_PIPELINE_CACHE_HIT_BIT specifies that a readily usable pipeline or pipeline stage was found in the `pipelineCache` specified by the application in the pipeline creation command.

  An implementation should set the VK_PIPELINE_CREATION_FEEDBACK_APPLICATION_PIPELINE_CACHE_HIT_BIT bit if it was able to avoid the large majority of pipeline or pipeline stage creation work by using the `pipelineCache` parameter of vkCreateGraphicsPipelines, vkCreateRayTracingPipelinesKHR, vkCreateRayTracingPipelinesNV, vkCreateDataGraphPipelinesARM, or vkCreateComputePipelines. When an implementation sets this bit for the entire pipeline, it may leave it unset for any stage.

  Note | Implementations are encouraged to provide a meaningful signal to applications using this bit. The intention is to communicate to the application that the pipeline or pipeline stage was created “as fast as it gets” using the pipeline cache provided by the application. If an implementation uses an internal cache, it is discouraged from setting this bit as the feedback would be unactionable.

- VK_PIPELINE_CREATION_FEEDBACK_BASE_PIPELINE_ACCELERATION_BIT specifies that the base pipeline specified by the `basePipelineHandle` or `basePipelineIndex` member of the `Vk*PipelineCreateInfo` structure was used to accelerate the creation of the pipeline.

  An implementation should set the VK_PIPELINE_CREATION_FEEDBACK_BASE_PIPELINE_ACCELERATION_BIT bit if it was able to avoid a significant amount of work by using the base pipeline.

  Note | While “significant amount of work” is subjective, implementations are encouraged to provide a meaningful signal to applications using this bit. For example, a 1% reduction in duration may not warrant setting this bit, while a 50% reduction would.

    // Provided by VK_VERSION_1_3
    typedef VkFlags VkPipelineCreationFeedbackFlags;

    // Provided by VK_EXT_pipeline_creation_feedback
    // Equivalent to VkPipelineCreationFeedbackFlags
    typedef VkPipelineCreationFeedbackFlags VkPipelineCreationFeedbackFlagsEXT;

`VkPipelineCreationFeedbackFlags` is a bitmask type for providing zero or more VkPipelineCreationFeedbackFlagBits.

## 11. Memory Allocation

Vulkan memory is broken up into two categories, host memory and device memory.

### 11.1. Host Memory

Host memory is memory needed by the Vulkan implementation for non-device-visible storage.

Note | This memory may be used to store the implementation’s representation and state of Vulkan objects.

Vulkan provides applications the opportunity to perform host memory allocations on behalf of the Vulkan implementation. If this feature is not used, the implementation will perform its own memory allocations. Since most memory allocations are off the critical path, this is not meant as a performance feature. Rather, this can be useful for certain embedded systems, for debugging purposes (e.g. putting a guard page after all host allocations), or for memory allocation logging.

Allocators are provided by the application as a pointer to a `VkAllocationCallbacks` structure:

    // Provided by VK_VERSION_1_0
    typedef struct VkAllocationCallbacks {
        void*                                   pUserData;
        PFN_vkAllocationFunction                pfnAllocation;
        PFN_vkReallocationFunction              pfnReallocation;
        PFN_vkFreeFunction                      pfnFree;
        PFN_vkInternalAllocationNotification    pfnInternalAllocation;
        PFN_vkInternalFreeNotification          pfnInternalFree;
    } VkAllocationCallbacks;

- `pUserData` is NULL or an application-defined user data pointer to be interpreted by the implementation of the callbacks. When any of the callbacks in `VkAllocationCallbacks` are called, the Vulkan implementation will pass this value as the first parameter to the callback. This value can vary each time an allocator is passed into a command, even when the same object takes an allocator in multiple commands.

- `pfnAllocation` is a PFN_vkAllocationFunction pointer to an application-defined memory allocation function.

- `pfnReallocation` is a PFN_vkReallocationFunction pointer to an application-defined memory reallocation function.

- `pfnFree` is a PFN_vkFreeFunction pointer to an application-defined memory free function.

- `pfnInternalAllocation` is a PFN_vkInternalAllocationNotification pointer to an application-defined function that is called by the implementation when the implementation makes internal allocations.

- `pfnInternalFree` is a PFN_vkInternalFreeNotification pointer to an application-defined function that is called by the implementation when the implementation frees internal allocations.

Valid Usage

- VUID-VkAllocationCallbacks-pfnAllocation-00632
  `pfnAllocation` must be a valid pointer to a valid application-defined PFN_vkAllocationFunction

- VUID-VkAllocationCallbacks-pfnReallocation-00633
  `pfnReallocation` must be a valid pointer to a valid application-defined PFN_vkReallocationFunction

- VUID-VkAllocationCallbacks-pfnFree-00634
  `pfnFree` must be a valid pointer to a valid application-defined PFN_vkFreeFunction

- VUID-VkAllocationCallbacks-pfnInternalAllocation-00635
  If either of `pfnInternalAllocation` or `pfnInternalFree` is not `NULL`, both must be valid callbacks

The type of `pfnAllocation` is:

    // Provided by VK_VERSION_1_0
    typedef void* (*PFN_vkAllocationFunction)(
        void*                                       pUserData,
        size_t                                      size,
        size_t                                      alignment,
        VkSystemAllocationScope                     allocationScope);

- `pUserData` is the value specified for VkAllocationCallbacks::`pUserData` in the allocator specified by the application.

- `size` is the size in bytes of the requested allocation.

- `alignment` is the requested alignment of the allocation in bytes and must be a power of two.

- `allocationScope` is a VkSystemAllocationScope value specifying the allocation scope of the lifetime of the allocation, as described here.

If `pfnAllocation` is unable to allocate the requested memory, it must return `NULL`. If the allocation was successful, it must return a valid pointer to memory allocation containing at least `size` bytes, and with the pointer value being a multiple of `alignment`.

Note | Correct Vulkan operation cannot be assumed if the application does not follow these rules. For example, `pfnAllocation` (or `pfnReallocation`) could cause termination of running Vulkan instance(s) on a failed allocation for debugging purposes, either directly or indirectly. In these circumstances, it cannot be assumed that any part of any affected VkInstance objects are going to operate correctly (even vkDestroyInstance), and the application must ensure it cleans up properly via other means (e.g. process termination).

If `pfnAllocation` returns `NULL`, and if the implementation is unable to continue correct processing of the current command without the requested allocation, it must treat this as a runtime error, and generate VK_ERROR_OUT_OF_HOST_MEMORY at the appropriate time for the command in which the condition was detected, as described in Return Codes.

If the implementation is able to continue correct processing of the current command without the requested allocation, then it may do so, and must not generate VK_ERROR_OUT_OF_HOST_MEMORY as a result of this failed allocation.

The type of `pfnReallocation` is:

    // Provided by VK_VERSION_1_0
    typedef void* (*PFN_vkReallocationFunction)(
        void*                                       pUserData,
        void*                                       pOriginal,
        size_t                                      size,
        size_t                                      alignment,
        VkSystemAllocationScope                     allocationScope);

- `pUserData` is the value specified for VkAllocationCallbacks::`pUserData` in the allocator specified by the application.

- `pOriginal` must be either `NULL` or a pointer previously returned by `pfnReallocation` or `pfnAllocation` of a compatible allocator.

- `size` is the size in bytes of the requested allocation.

- `alignment` is the requested alignment of the allocation in bytes and must be a power of two.

- `allocationScope` is a VkSystemAllocationScope value specifying the allocation scope of the lifetime of the allocation, as described here.

If the reallocation was successful, `pfnReallocation` must return an allocation with enough space for `size` bytes, and the contents of the original allocation from bytes zero to min(original size, new size) - 1 must be preserved in the returned allocation. If `size` is larger than the old size, the contents of the additional space are undefined. If satisfying these requirements involves creating a new allocation, then the old allocation should be freed.

If `pOriginal` is `NULL`, then `pfnReallocation` must behave equivalently to a call to PFN_vkAllocationFunction with the same parameter values (without `pOriginal`).

If `size` is zero, then `pfnReallocation` must behave equivalently to a call to PFN_vkFreeFunction with the same `pUserData` parameter value, and `pMemory` equal to `pOriginal`.

If `pOriginal` is non-`NULL`, the implementation must ensure that `alignment` is equal to the `alignment` used to originally allocate `pOriginal`.

If this function fails and `pOriginal` is non-`NULL` the application must not free the old allocation.

`pfnReallocation` must follow the same rules for return values as `PFN_vkAllocationFunction`.

The type of `pfnFree` is:

    // Provided by VK_VERSION_1_0
    typedef void (*PFN_vkFreeFunction)(
        void*                                       pUserData,
        void*                                       pMemory);

- `pUserData` is the value specified for VkAllocationCallbacks::`pUserData` in the allocator specified by the application.

- `pMemory` is the allocation to be freed.

`pMemory` may be `NULL`, which the callback must handle safely. If `pMemory` is non-`NULL`, it must be a pointer previously allocated by `pfnAllocation` or `pfnReallocation`. The application should free this memory.

The type of `pfnInternalAllocation` is:

    // Provided by VK_VERSION_1_0
    typedef void (*PFN_vkInternalAllocationNotification)(
        void*                                       pUserData,
        size_t                                      size,
        VkInternalAllocationType                    allocationType,
        VkSystemAllocationScope                     allocationScope);

- `pUserData` is the value specified for VkAllocationCallbacks::`pUserData` in the allocator specified by the application.

- `size` is the requested size of an allocation.

- `allocationType` is a VkInternalAllocationType value specifying the requested type of an allocation.

- `allocationScope` is a VkSystemAllocationScope value specifying the allocation scope of the lifetime of the allocation, as described here.

This is a purely informational callback.

The type of `pfnInternalFree` is:

    // Provided by VK_VERSION_1_0
    typedef void (*PFN_vkInternalFreeNotification)(
        void*                                       pUserData,
        size_t                                      size,
        VkInternalAllocationType                    allocationType,
        VkSystemAllocationScope                     allocationScope);

- `pUserData` is the value specified for VkAllocationCallbacks::`pUserData` in the allocator specified by the application.

- `size` is the requested size of an allocation.

- `allocationType` is a VkInternalAllocationType value specifying the requested type of an allocation.

- `allocationScope` is a VkSystemAllocationScope value specifying the allocation scope of the lifetime of the allocation, as described here.

Each allocation has an allocation scope defining its lifetime and which object it is associated with. Possible values passed to the `allocationScope` parameter of the callback functions specified by VkAllocationCallbacks, indicating the allocation scope, are:

    // Provided by VK_VERSION_1_0
    typedef enum VkSystemAllocationScope {
        VK_SYSTEM_ALLOCATION_SCOPE_COMMAND = 0,
        VK_SYSTEM_ALLOCATION_SCOPE_OBJECT = 1,
        VK_SYSTEM_ALLOCATION_SCOPE_CACHE = 2,
        VK_SYSTEM_ALLOCATION_SCOPE_DEVICE = 3,
        VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE = 4,
    } VkSystemAllocationScope;

- VK_SYSTEM_ALLOCATION_SCOPE_COMMAND specifies that the allocation is scoped to the duration of the Vulkan command.

- VK_SYSTEM_ALLOCATION_SCOPE_OBJECT specifies that the allocation is scoped to the lifetime of the Vulkan object that is being created or used.

- VK_SYSTEM_ALLOCATION_SCOPE_CACHE specifies that the allocation is scoped to the lifetime of a `VkPipelineCache` or `VkValidationCacheEXT` object.

- VK_SYSTEM_ALLOCATION_SCOPE_DEVICE specifies that the allocation is scoped to the lifetime of the Vulkan device.

- VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE specifies that the allocation is scoped to the lifetime of the Vulkan instance.

Most Vulkan commands operate on a single object, or there is a sole object that is being created or manipulated. When an allocation uses an allocation scope of VK_SYSTEM_ALLOCATION_SCOPE_OBJECT or VK_SYSTEM_ALLOCATION_SCOPE_CACHE, the allocation is scoped to the object being created or manipulated.

When an implementation requires host memory, it will make callbacks to the application using the most specific allocator and allocation scope available:

- If an allocation is scoped to the duration of a command, the allocator will use the VK_SYSTEM_ALLOCATION_SCOPE_COMMAND allocation scope. The most specific allocator available is used: if the object being created or manipulated has an allocator, that object’s allocator will be used, else if the parent `VkDevice` has an allocator it will be used, else if the parent `VkInstance` has an allocator it will be used. Else,

- If an allocation is associated with a `VkValidationCacheEXT` or `VkPipelineCache` object, the allocator will use the VK_SYSTEM_ALLOCATION_SCOPE_CACHE allocation scope. The most specific allocator available is used (cache, else device, else instance). Else,

- If an allocation is scoped to the lifetime of an object, that object is being created or manipulated by the command, and that object’s type is not `VkDevice` or `VkInstance`, the allocator will use an allocation scope of VK_SYSTEM_ALLOCATION_SCOPE_OBJECT. The most specific allocator available is used (object, else device, else instance). Else,

- If an allocation is scoped to the lifetime of a device, the allocator will use an allocation scope of VK_SYSTEM_ALLOCATION_SCOPE_DEVICE. The most specific allocator available is used (device, else instance). Else,

- If the allocation is scoped to the lifetime of an instance and the instance has an allocator, its allocator will be used with an allocation scope of VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE.

- Otherwise an implementation will allocate memory through an alternative mechanism that is unspecified.

Objects that are allocated from pools do not specify their own allocator. When an implementation requires host memory for such an object, that memory is sourced from the object’s parent pool’s allocator.

The application is not expected to handle allocating memory that is intended for execution by the host due to the complexities of differing security implementations across multiple platforms. The implementation will allocate such memory internally and invoke an application provided informational callback when these internal allocations are allocated and freed. Upon allocation of executable memory, `pfnInternalAllocation` will be called. Upon freeing executable memory, `pfnInternalFree` will be called. An implementation will only call an informational callback for executable memory allocations and frees.

The `allocationType` parameter to the `pfnInternalAllocation` and `pfnInternalFree` functions may be one of the following values:

    // Provided by VK_VERSION_1_0
    typedef enum VkInternalAllocationType {
        VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE = 0,
    } VkInternalAllocationType;

- VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE specifies that the allocation is intended for execution by the host.

An implementation must only make calls into an application-provided allocator during the execution of an API command. An implementation must only make calls into an application-provided allocator from the same thread that called the provoking API command. The implementation should not synchronize calls to any of the callbacks. If synchronization is needed, the callbacks must provide it themselves. The informational callbacks are subject to the same restrictions as the allocation callbacks.

If an implementation intends to make calls through a `VkAllocationCallbacks` structure between the time a `vkCreate*` command returns and the time a corresponding `vkDestroy*` command begins, that implementation must save a copy of the allocator before the `vkCreate*` command returns. The callback functions and any data structures they rely upon must remain valid for the lifetime of the object they are associated with.

If an allocator is provided to a `vkCreate*` command, a compatible allocator must be provided to the corresponding `vkDestroy*` command. Two `VkAllocationCallbacks` structures are compatible if memory allocated with `pfnAllocation` or `pfnReallocation` in each can be freed with `pfnReallocation` or `pfnFree` in the other. An allocator must not be provided to a `vkDestroy*` command if an allocator was not provided to the corresponding `vkCreate*` command.

If a non-`NULL` allocator is used, the `pfnAllocation`, `pfnReallocation` and `pfnFree` members must be non-`NULL` and point to valid implementations of the callbacks. An application can choose to not provide informational callbacks by setting both `pfnInternalAllocation` and `pfnInternalFree` to `NULL`. `pfnInternalAllocation` and `pfnInternalFree` must either both be `NULL` or both be non-`NULL`.

If `pfnAllocation` or `pfnReallocation` fail, the implementation may fail object creation and/or generate a VK_ERROR_OUT_OF_HOST_MEMORY error, as appropriate.

Allocation callbacks must not call any Vulkan commands.

The following sets of rules define when an implementation is permitted to call the allocator callbacks.

`pfnAllocation` or `pfnReallocation` may be called in the following situations:

- Allocations scoped to a `VkDevice` or `VkInstance` may be allocated from any API command.

- Allocations scoped to a command may be allocated from any API command.

- Allocations scoped to a `VkPipelineCache` may only be allocated from:

  - `vkCreatePipelineCache`

  - `vkMergePipelineCaches` for `dstCache`

  - `vkCreateGraphicsPipelines` for `pipelineCache`

  - `vkCreateComputePipelines` for `pipelineCache`

- Allocations scoped to a `VkValidationCacheEXT` may only be allocated from:

  - `vkCreateValidationCacheEXT`

  - `vkMergeValidationCachesEXT` for `dstCache`

  - `vkCreateShaderModule` for `validationCache` in VkShaderModuleValidationCacheCreateInfoEXT

- Allocations scoped to a `VkDescriptorPool` may only be allocated from:

  - any command that takes the pool as a direct argument

  - `vkAllocateDescriptorSets` for the `descriptorPool` member of its `pAllocateInfo` parameter

  - `vkCreateDescriptorPool`

- Allocations scoped to a `VkCommandPool` may only be allocated from:

  - any command that takes the pool as a direct argument

  - `vkCreateCommandPool`

  - `vkAllocateCommandBuffers` for the `commandPool` member of its `pAllocateInfo` parameter

  - any `vkCmd*` command whose `commandBuffer` was allocated from that `VkCommandPool`

- Allocations scoped to any other object may only be allocated in that object’s `vkCreate*` command.

`pfnFree`, or `pfnReallocation` with zero `size`, may be called in the following situations:

- Allocations scoped to a `VkDevice` or `VkInstance` may be freed from any API command.

- Allocations scoped to a command must be freed by any API command which allocates such memory.

- Allocations scoped to a `VkPipelineCache` may be freed from `vkDestroyPipelineCache`.

- Allocations scoped to a `VkValidationCacheEXT` may be freed from `vkDestroyValidationCacheEXT`.

- Allocations scoped to a `VkDescriptorPool` may be freed from

  - any command that takes the pool as a direct argument

- Allocations scoped to a `VkCommandPool` may be freed from:

  - any command that takes the pool as a direct argument

  - `vkResetCommandBuffer` whose `commandBuffer` was allocated from that `VkCommandPool`

- Allocations scoped to any other object may be freed in that object’s `vkDestroy*` command.

- Any command that allocates host memory may also free host memory of the same scope.

### 11.2. Device Memory

Device memory is memory that is visible to the device — for example the contents of the image or buffer objects, which can be natively used by the device.

#### 11.2.1. Device Memory Properties

Memory properties of a physical device describe the memory heaps and memory types available.

To query memory properties, call:

Warning | This functionality is superseded by vkGetPhysicalDeviceMemoryProperties2. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_0
    void vkGetPhysicalDeviceMemoryProperties(
        VkPhysicalDevice                            physicalDevice,
        VkPhysicalDeviceMemoryProperties*           pMemoryProperties);

- `physicalDevice` is the handle to the device to query.

- `pMemoryProperties` is a pointer to a VkPhysicalDeviceMemoryProperties structure in which the properties are returned.

Valid Usage (Implicit)

- VUID-vkGetPhysicalDeviceMemoryProperties-physicalDevice-parameter
  `physicalDevice` must be a valid VkPhysicalDevice handle

- VUID-vkGetPhysicalDeviceMemoryProperties-pMemoryProperties-parameter
  `pMemoryProperties` must be a valid pointer to a VkPhysicalDeviceMemoryProperties structure

The `VkPhysicalDeviceMemoryProperties` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkPhysicalDeviceMemoryProperties {
        uint32_t        memoryTypeCount;
        VkMemoryType    memoryTypes[VK_MAX_MEMORY_TYPES];
        uint32_t        memoryHeapCount;
        VkMemoryHeap    memoryHeaps[VK_MAX_MEMORY_HEAPS];
    } VkPhysicalDeviceMemoryProperties;

- `memoryTypeCount` is the number of valid elements in the `memoryTypes` array.

- `memoryTypes` is an array of VK_MAX_MEMORY_TYPES VkMemoryType structures describing the memory types that can be used to access memory allocated from the heaps specified by `memoryHeaps`.

- `memoryHeapCount` is the number of valid elements in the `memoryHeaps` array.

- `memoryHeaps` is an array of VK_MAX_MEMORY_HEAPS VkMemoryHeap structures describing the memory heaps from which memory can be allocated.

The `VkPhysicalDeviceMemoryProperties` structure describes a number of memory heaps as well as a number of memory types that can be used to access memory allocated in those heaps. Each heap describes a memory resource of a particular size, and each memory type describes a set of memory properties (e.g. host cached vs. uncached) that can be used with a given memory heap. Allocations using a particular memory type will consume resources from the heap indicated by that memory type’s heap index. More than one memory type may share each heap, and the heaps and memory types provide a mechanism to advertise an accurate size of the physical memory resources while allowing the memory to be used with a variety of different properties.

The number of memory heaps is given by `memoryHeapCount` and is less than or equal to VK_MAX_MEMORY_HEAPS. Each heap is described by an element of the `memoryHeaps` array as a VkMemoryHeap structure. The number of memory types available across all memory heaps is given by `memoryTypeCount` and is less than or equal to VK_MAX_MEMORY_TYPES. Each memory type is described by an element of the `memoryTypes` array as a VkMemoryType structure.

At least one heap must include VK_MEMORY_HEAP_DEVICE_LOCAL_BIT in VkMemoryHeap::`flags`. If there are multiple heaps that all have similar performance characteristics, they may all include VK_MEMORY_HEAP_DEVICE_LOCAL_BIT. In a unified memory architecture (UMA) system there is often only a single memory heap which is considered to be equally “local” to the host and to the device, and such an implementation must advertise the heap as device-local.

Memory contents within a tile memory heap, denoted by VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM, are only visible across the command buffers executed in a single command buffer submission batch within a vkQueueSubmit or vkQueueSubmit2 call. If the VkPhysicalDeviceTileMemoryHeapPropertiesQCOM::`queueSubmitBoundary` property is set, the visibility is extended across all batches in the submit call. Memory contents are discarded and made undefined after the respective submission batch or submit call. Tile memory may have different performance characteristics than non tile memory. Tile memory can be used simultaneously by command buffers in other queues without invalidating each others contents. Collectively, these rules define the tile memory scope.

Note | Tile memory heaps work differently than most heaps as it is allowing addressing on device cache memory. Therefore, the heap’s address space is aliased across the different queues, with each queue retaining its individual copy of the heap. The implementation takes care of any required saving and restoring of the tile memory contents. Effectively, this means that the same address in the heap in different queues have simultaneously different defined contents and the contents has a lifespan scoped to the submit or batch for that specific queues.

Each memory type returned by vkGetPhysicalDeviceMemoryProperties must have its `propertyFlags` set to one of the following values:

- 0

- VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT |
  VK_MEMORY_PROPERTY_HOST_COHERENT_BIT

- VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT |
  VK_MEMORY_PROPERTY_HOST_CACHED_BIT

- VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT |
  VK_MEMORY_PROPERTY_HOST_CACHED_BIT |
  VK_MEMORY_PROPERTY_HOST_COHERENT_BIT

- VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT

- VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT |
  VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT |
  VK_MEMORY_PROPERTY_HOST_COHERENT_BIT

- VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT |
  VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT |
  VK_MEMORY_PROPERTY_HOST_CACHED_BIT

- VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT |
  VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT |
  VK_MEMORY_PROPERTY_HOST_CACHED_BIT |
  VK_MEMORY_PROPERTY_HOST_COHERENT_BIT

- VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT |
  VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT

- VK_MEMORY_PROPERTY_PROTECTED_BIT

- VK_MEMORY_PROPERTY_PROTECTED_BIT | VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT

- VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT |
  VK_MEMORY_PROPERTY_HOST_COHERENT_BIT |
  VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD

- VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT |
  VK_MEMORY_PROPERTY_HOST_CACHED_BIT |
  VK_MEMORY_PROPERTY_HOST_COHERENT_BIT |
  VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD

- VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT |
  VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD

- VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT |
  VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT |
  VK_MEMORY_PROPERTY_HOST_COHERENT_BIT |
  VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD

- VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT |
  VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT |
  VK_MEMORY_PROPERTY_HOST_CACHED_BIT |
  VK_MEMORY_PROPERTY_HOST_COHERENT_BIT |
  VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD

- VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT |
  VK_MEMORY_PROPERTY_HOST_COHERENT_BIT |
  VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD |
  VK_MEMORY_PROPERTY_DEVICE_UNCACHED_BIT_AMD

- VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT |
  VK_MEMORY_PROPERTY_HOST_CACHED_BIT |
  VK_MEMORY_PROPERTY_HOST_COHERENT_BIT |
  VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD |
  VK_MEMORY_PROPERTY_DEVICE_UNCACHED_BIT_AMD

- VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT |
  VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD |
  VK_MEMORY_PROPERTY_DEVICE_UNCACHED_BIT_AMD

- VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT |
  VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT |
  VK_MEMORY_PROPERTY_HOST_COHERENT_BIT |
  VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD |
  VK_MEMORY_PROPERTY_DEVICE_UNCACHED_BIT_AMD

- VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT |
  VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT |
  VK_MEMORY_PROPERTY_HOST_CACHED_BIT |
  VK_MEMORY_PROPERTY_HOST_COHERENT_BIT |
  VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD |
  VK_MEMORY_PROPERTY_DEVICE_UNCACHED_BIT_AMD

- VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT |
  VK_MEMORY_PROPERTY_RDMA_CAPABLE_BIT_NV

There must be at least one memory type with both the VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT and VK_MEMORY_PROPERTY_HOST_COHERENT_BIT bits set in its `propertyFlags`. There must be at least one memory type with the VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT bit set in its `propertyFlags`. If the `deviceCoherentMemory` feature is enabled, there must be at least one memory type with the VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD bit set in its `propertyFlags`.

For each pair of elements X and Y returned in `memoryTypes`, X must be placed at a lower index position than Y if:

- the set of bit flags returned in the `propertyFlags` member of X is a strict subset of the set of bit flags returned in the `propertyFlags` member of Y; or

- the `propertyFlags` members of X and Y are equal, and X belongs to a memory heap with greater performance (as determined in an implementation-specific manner) ; or

- the `propertyFlags` members of Y includes VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD or VK_MEMORY_PROPERTY_DEVICE_UNCACHED_BIT_AMD and X does not

Note | There is no ordering requirement between X and Y elements for the case their `propertyFlags` members are not in a subset relation. That potentially allows more than one possible way to order the same set of memory types. Notice that the list of all allowed memory property flag combinations is written in a valid order. But if instead VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT was before VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT, the list would still be in a valid order. There may be a performance penalty for using device coherent or uncached device memory types, and using these accidentally is undesirable. In order to avoid this, memory types with these properties always appear at the end of the list; but are subject to the same rules otherwise.

This ordering requirement enables applications to use a simple search loop to select the desired memory type along the lines of:

    // Find a memory in `memoryTypeBitsRequirement` that includes all of `requiredProperties`
    int32_t findProperties(const VkPhysicalDeviceMemoryProperties* pMemoryProperties,
                           uint32_t memoryTypeBitsRequirement,
                           VkMemoryPropertyFlags requiredProperties) {
        const uint32_t memoryCount = pMemoryProperties->memoryTypeCount;
        for (uint32_t memoryIndex = 0; memoryIndex < memoryCount; ++memoryIndex) {
            const uint32_t memoryTypeBits = (1 << memoryIndex);
            const bool isRequiredMemoryType = memoryTypeBitsRequirement & memoryTypeBits;

            const VkMemoryPropertyFlags properties =
                pMemoryProperties->memoryTypes[memoryIndex].propertyFlags;
            const bool hasRequiredProperties =
                (properties & requiredProperties) == requiredProperties;

            if (isRequiredMemoryType && hasRequiredProperties)
                return static_cast<int32_t>(memoryIndex);
        }

        // failed to find memory type
        return -1;
    }

    // Try to find an optimal memory type, or if it does not exist try fallback memory type
    // `device` is the VkDevice
    // `image` is the VkImage that requires memory to be bound
    // `memoryProperties` properties as returned by vkGetPhysicalDeviceMemoryProperties
    // `requiredProperties` are the property flags that must be present
    // `optimalProperties` are the property flags that are preferred by the application
    VkMemoryRequirements memoryRequirements;
    vkGetImageMemoryRequirements(device, image, &memoryRequirements);
    int32_t memoryType =
        findProperties(&memoryProperties, memoryRequirements.memoryTypeBits, optimalProperties);
    if (memoryType == -1) // not found; try fallback properties
        memoryType =
            findProperties(&memoryProperties, memoryRequirements.memoryTypeBits, requiredProperties);

VK_MAX_MEMORY_TYPES is the length of an array of VkMemoryType structures describing memory types, as returned in VkPhysicalDeviceMemoryProperties::`memoryTypes`.

    #define VK_MAX_MEMORY_TYPES               32U

VK_MAX_MEMORY_HEAPS is the length of an array of VkMemoryHeap structures describing memory heaps, as returned in VkPhysicalDeviceMemoryProperties::`memoryHeaps`.

    #define VK_MAX_MEMORY_HEAPS               16U

To query memory properties, call:

    // Provided by VK_VERSION_1_1
    void vkGetPhysicalDeviceMemoryProperties2(
        VkPhysicalDevice                            physicalDevice,
        VkPhysicalDeviceMemoryProperties2*          pMemoryProperties);

    // Provided by VK_KHR_get_physical_device_properties2
    // Equivalent to vkGetPhysicalDeviceMemoryProperties2
    void vkGetPhysicalDeviceMemoryProperties2KHR(
        VkPhysicalDevice                            physicalDevice,
        VkPhysicalDeviceMemoryProperties2*          pMemoryProperties);

- `physicalDevice` is the handle to the device to query.

- `pMemoryProperties` is a pointer to a VkPhysicalDeviceMemoryProperties2 structure in which the properties are returned.

`vkGetPhysicalDeviceMemoryProperties2` behaves similarly to vkGetPhysicalDeviceMemoryProperties, with the ability to return extended information in a `pNext` chain of output structures.

Valid Usage (Implicit)

- VUID-vkGetPhysicalDeviceMemoryProperties2-physicalDevice-parameter
  `physicalDevice` must be a valid VkPhysicalDevice handle

- VUID-vkGetPhysicalDeviceMemoryProperties2-pMemoryProperties-parameter
  `pMemoryProperties` must be a valid pointer to a VkPhysicalDeviceMemoryProperties2 structure

The `VkPhysicalDeviceMemoryProperties2` structure is defined as:

    // Provided by VK_VERSION_1_1
    typedef struct VkPhysicalDeviceMemoryProperties2 {
        VkStructureType                     sType;
        void*                               pNext;
        VkPhysicalDeviceMemoryProperties    memoryProperties;
    } VkPhysicalDeviceMemoryProperties2;

    // Provided by VK_KHR_get_physical_device_properties2
    // Equivalent to VkPhysicalDeviceMemoryProperties2
    typedef VkPhysicalDeviceMemoryProperties2 VkPhysicalDeviceMemoryProperties2KHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `memoryProperties` is a VkPhysicalDeviceMemoryProperties structure which is populated with the same values as in vkGetPhysicalDeviceMemoryProperties.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceMemoryProperties2-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2

- VUID-VkPhysicalDeviceMemoryProperties2-pNext-pNext
  `pNext` must be `NULL` or a pointer to a valid instance of VkPhysicalDeviceMemoryBudgetPropertiesEXT

- VUID-VkPhysicalDeviceMemoryProperties2-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

The `VkMemoryHeap` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkMemoryHeap {
        VkDeviceSize         size;
        VkMemoryHeapFlags    flags;
    } VkMemoryHeap;

- `size` is the total memory size in bytes in the heap.

- `flags` is a bitmask of VkMemoryHeapFlagBits specifying attribute flags for the heap.

Bits which may be set in VkMemoryHeap::`flags`, indicating attribute flags for the heap, are:

    // Provided by VK_VERSION_1_0
    typedef enum VkMemoryHeapFlagBits {
        VK_MEMORY_HEAP_DEVICE_LOCAL_BIT = 0x00000001,
      // Provided by VK_VERSION_1_1
        VK_MEMORY_HEAP_MULTI_INSTANCE_BIT = 0x00000002,
      // Provided by VK_QCOM_tile_memory_heap
        VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM = 0x00000008,
      // Provided by VK_KHR_device_group_creation
        VK_MEMORY_HEAP_MULTI_INSTANCE_BIT_KHR = VK_MEMORY_HEAP_MULTI_INSTANCE_BIT,
    } VkMemoryHeapFlagBits;

- VK_MEMORY_HEAP_DEVICE_LOCAL_BIT specifies that the heap corresponds to device-local memory. Device-local memory may have different performance characteristics than host-local memory, and may support different memory property flags.

- VK_MEMORY_HEAP_MULTI_INSTANCE_BIT specifies that in a logical device representing more than one physical device, there is a per-physical device instance of the heap memory. By default, an allocation from such a heap will be replicated to each physical device’s instance of the heap.

- VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM bit specifies that the heap corresponds to tile memory.

    // Provided by VK_VERSION_1_0
    typedef VkFlags VkMemoryHeapFlags;

`VkMemoryHeapFlags` is a bitmask type for setting a mask of zero or more VkMemoryHeapFlagBits.

The `VkMemoryType` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkMemoryType {
        VkMemoryPropertyFlags    propertyFlags;
        uint32_t                 heapIndex;
    } VkMemoryType;

- `heapIndex` describes which memory heap this memory type corresponds to, and must be less than `memoryHeapCount` from the VkPhysicalDeviceMemoryProperties structure.

- `propertyFlags` is a bitmask of VkMemoryPropertyFlagBits of properties for this memory type.

Bits which may be set in VkMemoryType::`propertyFlags`, indicating properties of a memory type, are:

    // Provided by VK_VERSION_1_0
    typedef enum VkMemoryPropertyFlagBits {
        VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT = 0x00000001,
        VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT = 0x00000002,
        VK_MEMORY_PROPERTY_HOST_COHERENT_BIT = 0x00000004,
        VK_MEMORY_PROPERTY_HOST_CACHED_BIT = 0x00000008,
        VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT = 0x00000010,
      // Provided by VK_VERSION_1_1
        VK_MEMORY_PROPERTY_PROTECTED_BIT = 0x00000020,
      // Provided by VK_AMD_device_coherent_memory
        VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD = 0x00000040,
      // Provided by VK_AMD_device_coherent_memory
        VK_MEMORY_PROPERTY_DEVICE_UNCACHED_BIT_AMD = 0x00000080,
      // Provided by VK_NV_external_memory_rdma
        VK_MEMORY_PROPERTY_RDMA_CAPABLE_BIT_NV = 0x00000100,
    } VkMemoryPropertyFlagBits;

- VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT bit specifies that memory allocated with this type is the most efficient for device access. This property will be set if and only if the memory type belongs to a heap with the VK_MEMORY_HEAP_DEVICE_LOCAL_BIT set.

- VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT bit specifies that memory allocated with this type can be mapped for host access using vkMapMemory.

- VK_MEMORY_PROPERTY_HOST_COHERENT_BIT bit specifies that the host cache management commands vkFlushMappedMemoryRanges and vkInvalidateMappedMemoryRanges are not needed to manage availability and visibility on the host.

- VK_MEMORY_PROPERTY_HOST_CACHED_BIT bit specifies that memory allocated with this type is cached on the host. Host memory accesses to uncached memory are slower than to cached memory, however uncached memory is always host coherent.

- VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT bit specifies that the memory type only allows device access to the memory. Memory types must not have both VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT and VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT set. Additionally, the object’s backing memory may be provided by the implementation lazily as specified in Lazily Allocated Memory.

- VK_MEMORY_PROPERTY_PROTECTED_BIT bit specifies that the memory type only allows device access to the memory, and allows protected queue operations to access the memory. Memory types must not have VK_MEMORY_PROPERTY_PROTECTED_BIT set and any of VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT set, or VK_MEMORY_PROPERTY_HOST_COHERENT_BIT set, or VK_MEMORY_PROPERTY_HOST_CACHED_BIT set.

- VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD bit specifies that device accesses to allocations of this memory type are automatically made available and visible on the device. If paired with VK_MEMORY_PROPERTY_HOST_COHERENT_BIT, memory domain operations are also performed automatically between host and device.

- VK_MEMORY_PROPERTY_DEVICE_UNCACHED_BIT_AMD bit specifies that memory allocated with this type is not cached on the device. Uncached device memory is always device coherent.

- VK_MEMORY_PROPERTY_RDMA_CAPABLE_BIT_NV bit specifies that external devices can access this memory directly.

For any memory allocated with both the VK_MEMORY_PROPERTY_HOST_COHERENT_BIT and the VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD, host or device accesses also perform automatic memory domain transfer operations, such that writes are always automatically available and visible to both host and device memory domains.

Note | Device coherence is a useful property for certain debugging use cases (e.g. crash analysis, where performing separate coherence actions could mean values are not reported correctly). However, device coherent accesses may be slower than equivalent accesses without device coherence, particularly if they are also device uncached. For device uncached memory in particular, repeated accesses to the same or neighboring memory locations over a short time period (e.g. within a frame) may be slower than it would be for the equivalent cached memory type. As such, it is generally inadvisable to use device coherent or device uncached memory except when really needed.

    // Provided by VK_VERSION_1_0
    typedef VkFlags VkMemoryPropertyFlags;

`VkMemoryPropertyFlags` is a bitmask type for setting a mask of zero or more VkMemoryPropertyFlagBits.

If the `VkPhysicalDeviceMemoryBudgetPropertiesEXT` structure is included in the `pNext` chain of VkPhysicalDeviceMemoryProperties2, it is filled with the current memory budgets and usages.

The `VkPhysicalDeviceMemoryBudgetPropertiesEXT` structure is defined as:

    // Provided by VK_EXT_memory_budget
    typedef struct VkPhysicalDeviceMemoryBudgetPropertiesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkDeviceSize       heapBudget[VK_MAX_MEMORY_HEAPS];
        VkDeviceSize       heapUsage[VK_MAX_MEMORY_HEAPS];
    } VkPhysicalDeviceMemoryBudgetPropertiesEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `heapBudget` is an array of VK_MAX_MEMORY_HEAPS VkDeviceSize values in which memory budgets are returned, with one element for each memory heap. A heap’s budget is a rough estimate of how much memory the process can allocate from that heap before allocations may fail or cause performance degradation. The budget includes any currently allocated device memory.

- `heapUsage` is an array of VK_MAX_MEMORY_HEAPS VkDeviceSize values in which memory usages are returned, with one element for each memory heap. A heap’s usage is an estimate of how much memory the process is currently using in that heap.

The values returned in this structure are not invariant. The `heapBudget` and `heapUsage` values must be zero for array elements greater than or equal to VkPhysicalDeviceMemoryProperties::`memoryHeapCount`. The `heapBudget` value must be non-zero for array elements less than VkPhysicalDeviceMemoryProperties::`memoryHeapCount`. The `heapBudget` value must be less than or equal to VkMemoryHeap::`size` for each heap.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceMemoryBudgetPropertiesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_BUDGET_PROPERTIES_EXT

Structure Chaining

Extends the structure

  - VkPhysicalDeviceMemoryProperties2

#### 11.2.2. Device Memory Objects

A Vulkan device operates on data in device memory via memory objects that are represented in the API by a `VkDeviceMemory` handle:

    // Provided by VK_VERSION_1_0
    VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDeviceMemory)

#### 11.2.3. Device Memory Allocation

To allocate memory objects, call:

    // Provided by VK_VERSION_1_0
    VkResult vkAllocateMemory(
        VkDevice                                    device,
        const VkMemoryAllocateInfo*                 pAllocateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkDeviceMemory*                             pMemory);

- `device` is the logical device that owns the memory.

- `pAllocateInfo` is a pointer to a VkMemoryAllocateInfo structure describing parameters of the allocation. A successfully returned allocation must use the requested parameters — no substitution is permitted by the implementation.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

- `pMemory` is a pointer to a VkDeviceMemory handle in which information about the allocated memory is returned.

Allocations returned by `vkAllocateMemory` are guaranteed to meet any alignment requirement of the implementation. For example, if an implementation requires 128 byte alignment for images and 64 byte alignment for buffers, the device memory returned through this mechanism would be 128-byte aligned. This ensures that applications can correctly suballocate objects of different types (with potentially different alignment requirements) in the same memory object.

When memory is allocated, its contents are undefined with the following constraint:

- The contents of unprotected memory must not be a function of the contents of data protected memory objects, even if those memory objects were previously freed.

Note | The contents of memory allocated by one application should not be a function of data from protected memory objects of another application, even if those memory objects were previously freed.

The maximum number of valid memory allocations that can exist simultaneously within a VkDevice may be restricted by implementation- or platform-dependent limits. The `maxMemoryAllocationCount` feature describes the number of allocations that can exist simultaneously before encountering these internal limits.

Note | For historical reasons, if `maxMemoryAllocationCount` is exceeded, some implementations may return VK_ERROR_TOO_MANY_OBJECTS. Exceeding this limit will result in undefined behavior, and an application should not rely on the use of the returned error code in order to identify when the limit is reached.

Note | Many protected memory implementations involve complex hardware and system software support, and often have additional and much lower limits on the number of simultaneous protected memory allocations (from memory types with the VK_MEMORY_PROPERTY_PROTECTED_BIT property) than for non-protected memory allocations. These limits can be system-wide, and depend on a variety of factors outside of the Vulkan implementation, so they cannot be queried in Vulkan. Applications should use as few allocations as possible from such memory types by suballocating aggressively, and be prepared for allocation failure even when there is apparently plenty of capacity remaining in the memory heap. As a guideline, the Vulkan conformance test suite requires that at least 80 minimum-size allocations can exist concurrently when no other uses of protected memory are active in the system.

Some platforms may have a limit on the maximum size of a single allocation. For example, certain systems may fail to create allocations with a size greater than or equal to 4GB. Such a limit is implementation-dependent, and if such a failure occurs then the error VK_ERROR_OUT_OF_DEVICE_MEMORY must be returned. This limit is advertised in VkPhysicalDeviceMaintenance3Properties::`maxMemoryAllocationSize`.

The cumulative memory size allocated to a heap can be limited by the size of the specified heap. In such cases, allocated memory is tracked on a per-device and per-heap basis. Some platforms allow overallocation into other heaps. The overallocation behavior can be specified through the `VK_AMD_memory_overallocation_behavior` extension.

If the `memoryTypeIndex` belongs to a heap with the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM bit included in its properties, this allocation is backed by tile memory, which is an on device cache. Unlike other heaps, allocations out of the tile memory will always have a starting address at the start of the heap and its contents are aliased with all other VkDeviceMemory objects bound to the same range while executing within the same tile memory scope.

If the VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT::`pageableDeviceLocalMemory` feature is enabled, memory allocations made from a heap that includes VK_MEMORY_HEAP_DEVICE_LOCAL_BIT in VkMemoryHeap::`flags` may be transparently moved to host-local memory allowing multiple applications to share device-local memory. If there is no space left in device-local memory when this new allocation is made, other allocations may be moved out transparently to make room. The operating system will determine which allocations to move to device-local memory or host-local memory based on platform-specific criteria. To help the operating system make good choices, the application should set the appropriate memory priority with VkMemoryPriorityAllocateInfoEXT and adjust it as necessary with vkSetDeviceMemoryPriorityEXT. Higher priority allocations will moved to device-local memory first.

Memory allocations made on heaps without the VK_MEMORY_HEAP_DEVICE_LOCAL_BIT property will not be transparently promoted to device-local memory by the operating system.

Valid Usage

- VUID-vkAllocateMemory-pAllocateInfo-01713
  `pAllocateInfo->allocationSize` must be less than or equal to VkPhysicalDeviceMemoryProperties::`memoryHeaps`[memindex].`size` where `memindex` = VkPhysicalDeviceMemoryProperties::`memoryTypes`[`pAllocateInfo->memoryTypeIndex`].`heapIndex` as returned by vkGetPhysicalDeviceMemoryProperties for the VkPhysicalDevice that `device` was created from

- VUID-vkAllocateMemory-pAllocateInfo-01714
  `pAllocateInfo->memoryTypeIndex` must be less than VkPhysicalDeviceMemoryProperties::`memoryTypeCount` as returned by vkGetPhysicalDeviceMemoryProperties for the VkPhysicalDevice that `device` was created from

- VUID-vkAllocateMemory-deviceCoherentMemory-02790
  If the `deviceCoherentMemory` feature is not enabled, `pAllocateInfo->memoryTypeIndex` must not identify a memory type supporting VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD

- VUID-vkAllocateMemory-maxMemoryAllocationCount-04101
  There must be less than `VkPhysicalDeviceLimits`::`maxMemoryAllocationCount` device memory allocations currently allocated on the device

- VUID-vkAllocateMemory-tileMemoryHeap-10976
  If the `tileMemoryHeap` feature is not enabled, `pAllocateInfo->memoryTypeIndex` must not identify a memory type that corresponds to a VkMemoryHeap with the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property

Valid Usage (Implicit)

- VUID-vkAllocateMemory-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkAllocateMemory-pAllocateInfo-parameter
  `pAllocateInfo` must be a valid pointer to a valid VkMemoryAllocateInfo structure

- VUID-vkAllocateMemory-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkAllocateMemory-pMemory-parameter
  `pMemory` must be a valid pointer to a VkDeviceMemory handle

- VUID-vkAllocateMemory-device-queuecount
  The device must have been created with at least `1` queue

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_INVALID_EXTERNAL_HANDLE

  - VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkMemoryAllocateInfo` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkMemoryAllocateInfo {
        VkStructureType    sType;
        const void*        pNext;
        VkDeviceSize       allocationSize;
        uint32_t           memoryTypeIndex;
    } VkMemoryAllocateInfo;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `allocationSize` is the size of the allocation in bytes.

- `memoryTypeIndex` is an index identifying a memory type from the `memoryTypes` array of the VkPhysicalDeviceMemoryProperties structure.

The internal data of an allocated device memory object must include a reference to implementation-specific resources, referred to as the memory object’s payload. Applications can also import and export that internal data to and from device memory objects to share data between Vulkan instances and other compatible APIs. A `VkMemoryAllocateInfo` structure defines a memory import operation if its `pNext` chain includes one of the following structures:

- VkImportMemoryWin32HandleInfoKHR with a non-zero `handleType` value

- VkImportMemoryFdInfoKHR with a non-zero `handleType` value

- VkImportMemoryHostPointerInfoEXT with a non-zero `handleType` value

- VkImportAndroidHardwareBufferInfoANDROID with a non-`NULL` `buffer` value

- VkImportMemoryZirconHandleInfoFUCHSIA with a non-zero `handleType` value

- VkImportMemoryBufferCollectionFUCHSIA

- VkImportScreenBufferInfoQNX with a non-`NULL` `buffer` value

- VkImportMemoryMetalHandleInfoEXT with a non-zero `handleType` value

If the parameters define an import operation and the external handle type is VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT, VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT, or VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT, `allocationSize` is ignored. The implementation must query the size of these allocations from the OS.

If the parameters define an import operation and the external handle type is VK_EXTERNAL_MEMORY_HANDLE_TYPE_MTLTEXTURE_BIT_EXT, `allocationSize` is ignored. The implementation must query the size of these allocations from the OS.

Whether device memory objects constructed via a memory import operation hold a reference to their payload depends on the properties of the handle type used to perform the import, as defined below for each valid handle type. Importing memory must not modify the content of the memory. Implementations must ensure that importing memory does not enable the importing Vulkan instance to access any memory or resources in other Vulkan instances other than that corresponding to the memory object imported. Implementations must also ensure accessing imported memory which has not been initialized does not allow the importing Vulkan instance to obtain data from the exporting Vulkan instance or vice-versa.

Note | How exported and imported memory is isolated is left to the implementation, but applications should be aware that such isolation may prevent implementations from placing multiple exportable memory objects in the same physical or virtual page. Hence, applications should avoid creating many small external memory objects whenever possible.

Importing memory must not increase overall heap usage within a system. However, it must affect the following per-process values:

- VkPhysicalDeviceLimits::`maxMemoryAllocationCount`

- VkPhysicalDeviceMemoryBudgetPropertiesEXT::`heapUsage`

When performing a memory import operation, it is the responsibility of the application to ensure the external handles and their associated payloads meet all valid usage requirements. However, implementations must perform sufficient validation of external handles and payloads to ensure that the operation results in a valid memory object which will not cause program termination, device loss, queue stalls, or corruption of other resources when used as allowed according to its allocation parameters. If the external handle provided does not meet these requirements, the implementation must fail the memory import operation with the error code VK_ERROR_INVALID_EXTERNAL_HANDLE. If the parameters define an export operation and the external handle type is VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID, implementations should not strictly follow `memoryTypeIndex`. Instead, they should modify the allocation internally to use the required memory type for the application’s given usage. This is because for an export operation, there is currently no way for the application to know the memory type index before allocating.

Valid Usage

- VUID-VkMemoryAllocateInfo-allocationSize-07897
  If the parameters do not define an import or export operation, `allocationSize` must be greater than `0`

- VUID-VkMemoryAllocateInfo-None-06657
  The parameters must not define more than one import operation

- VUID-VkMemoryAllocateInfo-allocationSize-07899
  If the parameters define an export operation and the handle type is not VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID , `allocationSize` must be greater than `0`

- VUID-VkMemoryAllocateInfo-buffer-06380
  If the parameters define an import operation from an VkBufferCollectionFUCHSIA, and VkMemoryDedicatedAllocateInfo::`buffer` is present and non-NULL, VkImportMemoryBufferCollectionFUCHSIA::`collection` and VkImportMemoryBufferCollectionFUCHSIA::`index` must match VkBufferCollectionBufferCreateInfoFUCHSIA::`collection` and VkBufferCollectionBufferCreateInfoFUCHSIA::`index`, respectively, of the VkBufferCollectionBufferCreateInfoFUCHSIA structure used to create the VkMemoryDedicatedAllocateInfo::`buffer`

- VUID-VkMemoryAllocateInfo-image-06381
  If the parameters define an import operation from an VkBufferCollectionFUCHSIA, and VkMemoryDedicatedAllocateInfo::`image` is present and non-NULL, VkImportMemoryBufferCollectionFUCHSIA::`collection` and VkImportMemoryBufferCollectionFUCHSIA::`index` must match VkBufferCollectionImageCreateInfoFUCHSIA::`collection` and VkBufferCollectionImageCreateInfoFUCHSIA::`index`, respectively, of the VkBufferCollectionImageCreateInfoFUCHSIA structure used to create the VkMemoryDedicatedAllocateInfo::`image`

- VUID-VkMemoryAllocateInfo-allocationSize-06382
  If the parameters define an import operation from an VkBufferCollectionFUCHSIA, `allocationSize` must match VkMemoryRequirements::`size` value retrieved by vkGetImageMemoryRequirements or vkGetBufferMemoryRequirements for image-based or buffer-based collections respectively

- VUID-VkMemoryAllocateInfo-pNext-06383
  If the parameters define an import operation from an VkBufferCollectionFUCHSIA, the `pNext` chain must include a VkMemoryDedicatedAllocateInfo structure with either its `image` or `buffer` field set to a value other than VK_NULL_HANDLE

- VUID-VkMemoryAllocateInfo-image-06384
  If the parameters define an import operation from an VkBufferCollectionFUCHSIA and VkMemoryDedicatedAllocateInfo::`image` is not VK_NULL_HANDLE, the `image` must be created with a VkBufferCollectionImageCreateInfoFUCHSIA structure chained to its VkImageCreateInfo::`pNext` pointer

- VUID-VkMemoryAllocateInfo-buffer-06385
  If the parameters define an import operation from an VkBufferCollectionFUCHSIA and VkMemoryDedicatedAllocateInfo::`buffer` is not VK_NULL_HANDLE, the `buffer` must be created with a VkBufferCollectionBufferCreateInfoFUCHSIA structure chained to its VkBufferCreateInfo::`pNext` pointer

- VUID-VkMemoryAllocateInfo-memoryTypeIndex-06386
  If the parameters define an import operation from an VkBufferCollectionFUCHSIA, `memoryTypeIndex` must be from VkBufferCollectionPropertiesFUCHSIA as retrieved by vkGetBufferCollectionPropertiesFUCHSIA

- VUID-VkMemoryAllocateInfo-pNext-00639
  If the `pNext` chain includes a `VkExportMemoryAllocateInfo` structure, and any of the handle types specified in `VkExportMemoryAllocateInfo`::`handleTypes` require a dedicated allocation, as reported by vkGetPhysicalDeviceImageFormatProperties2 in `VkExternalImageFormatProperties`::`externalMemoryProperties.externalMemoryFeatures`, or by vkGetPhysicalDeviceExternalBufferProperties in `VkExternalBufferProperties`::`externalMemoryProperties.externalMemoryFeatures`, the `pNext` chain must include a `VkMemoryDedicatedAllocateInfo` or `VkDedicatedAllocationMemoryAllocateInfoNV` structure with either its `image` or `buffer` member set to a value other than VK_NULL_HANDLE

- VUID-VkMemoryAllocateInfo-pNext-09858
  If the `pNext` chain includes a `VkExportMemoryAllocateInfo` structure, and any of the handle types specified in `VkExportMemoryAllocateInfo`::`handleTypes` require a dedicated allocation, as reported by vkGetPhysicalDeviceExternalTensorPropertiesARM in `VkExternalTensorPropertiesARM`::`externalMemoryProperties.externalMemoryFeatures`, the `pNext` chain must include a `VkMemoryDedicatedAllocateInfoTensorARM` structure with its `tensor` member set to a value other than VK_NULL_HANDLE

- VUID-VkMemoryAllocateInfo-pNext-00640
  If the `pNext` chain includes a VkExportMemoryAllocateInfo structure, it must not include a VkExportMemoryAllocateInfoNV or VkExportMemoryWin32HandleInfoNV structure

- VUID-VkMemoryAllocateInfo-pNext-00641
  If the `pNext` chain includes a VkImportMemoryWin32HandleInfoKHR structure, it must not include a VkImportMemoryWin32HandleInfoNV structure

- VUID-VkMemoryAllocateInfo-allocationSize-01742
  If the parameters define an import operation, the external handle specified was created by the Vulkan API, and the external handle type is VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT, then the values of `allocationSize` and `memoryTypeIndex` must match those specified when the payload being imported was created

- VUID-VkMemoryAllocateInfo-None-00643
  If the parameters define an import operation and the external handle specified was created by the Vulkan API, the device mask specified by VkMemoryAllocateFlagsInfo must match the mask specified when the payload being imported was allocated

- VUID-VkMemoryAllocateInfo-None-00644
  If the parameters define an import operation and the external handle specified was created by the Vulkan API, the list of physical devices that comprise the logical device passed to vkAllocateMemory must match the list of physical devices that comprise the logical device on which the payload was originally allocated

- VUID-VkMemoryAllocateInfo-memoryTypeIndex-00645
  If the parameters define an import operation and the external handle is an NT handle or a global share handle created outside of the Vulkan API, the value of `memoryTypeIndex` must be one of those returned by vkGetMemoryWin32HandlePropertiesKHR

- VUID-VkMemoryAllocateInfo-allocationSize-01743
  If the parameters define an import operation, the external handle was created by the Vulkan API, and the external handle type is VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT or VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT, then the values of `allocationSize` and `memoryTypeIndex` must match those specified when the payload being imported was created

- VUID-VkMemoryAllocateInfo-allocationSize-00647
  If the parameters define an import operation and the external handle type is VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT, `allocationSize` must match the size specified when creating the Direct3D 12 heap from which the payload was extracted

- VUID-VkMemoryAllocateInfo-memoryTypeIndex-00648
  If the parameters define an import operation and the external handle is a POSIX file descriptor created outside of the Vulkan API, the value of `memoryTypeIndex` must be one of those returned by vkGetMemoryFdPropertiesKHR

- VUID-VkMemoryAllocateInfo-memoryTypeIndex-01872
  If the `protectedMemory` feature is not enabled, the `VkMemoryAllocateInfo`::`memoryTypeIndex` must not indicate a memory type that reports VK_MEMORY_PROPERTY_PROTECTED_BIT

- VUID-VkMemoryAllocateInfo-memoryTypeIndex-01744
  If the parameters define an import operation and the external handle is a host pointer, the value of `memoryTypeIndex` must be one of those returned by vkGetMemoryHostPointerPropertiesEXT

- VUID-VkMemoryAllocateInfo-allocationSize-01745
  If the parameters define an import operation and the external handle is a host pointer, `allocationSize` must be an integer multiple of `VkPhysicalDeviceExternalMemoryHostPropertiesEXT`::`minImportedHostPointerAlignment`

- VUID-VkMemoryAllocateInfo-pNext-02805
  If the parameters define an import operation and the external handle is a host pointer, the `pNext` chain must not include a VkDedicatedAllocationMemoryAllocateInfoNV structure with either its `image` or `buffer` field set to a value other than VK_NULL_HANDLE

- VUID-VkMemoryAllocateInfo-pNext-02806
  If the parameters define an import operation and the external handle is a host pointer, the `pNext` chain must not include a VkMemoryDedicatedAllocateInfo structure with either its `image` or `buffer` field set to a value other than VK_NULL_HANDLE

- VUID-VkMemoryAllocateInfo-allocationSize-02383
  If the parameters define an import operation and the external handle type is VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID, `allocationSize` must be the size returned by vkGetAndroidHardwareBufferPropertiesANDROID for the Android hardware buffer

- VUID-VkMemoryAllocateInfo-pNext-02384
  If the parameters define an import operation and the external handle type is VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID, and the `pNext` chain does not include a VkMemoryDedicatedAllocateInfo structure or VkMemoryDedicatedAllocateInfo::`image` is VK_NULL_HANDLE, the Android hardware buffer must have a `AHardwareBuffer_Desc`::`format` of `AHARDWAREBUFFER_FORMAT_BLOB` and a `AHardwareBuffer_Desc`::`usage` that includes `AHARDWAREBUFFER_USAGE_GPU_DATA_BUFFER`

- VUID-VkMemoryAllocateInfo-memoryTypeIndex-02385
  If the parameters define an import operation and the external handle type is VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID, `memoryTypeIndex` must be one of those returned by vkGetAndroidHardwareBufferPropertiesANDROID for the Android hardware buffer

- VUID-VkMemoryAllocateInfo-pNext-01874
  If the parameters do not define an import operation, and the `pNext` chain includes a `VkExportMemoryAllocateInfo` structure with VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID included in its `handleTypes` member, and the `pNext` chain includes a VkMemoryDedicatedAllocateInfo structure with `image` not equal to VK_NULL_HANDLE, then `allocationSize` must be `0`

- VUID-VkMemoryAllocateInfo-pNext-07900
  If the parameters define an export operation, the handle type is VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID, and the `pNext` does not include a VkMemoryDedicatedAllocateInfo structure, `allocationSize` must be greater than `0`

- VUID-VkMemoryAllocateInfo-pNext-07901
  If the parameters define an export operation, the handle type is VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID, and the `pNext` chain includes a VkMemoryDedicatedAllocateInfo structure with `buffer` set to a valid VkBuffer object, `allocationSize` must be greater than `0`

- VUID-VkMemoryAllocateInfo-pNext-02386
  If the parameters define an import operation, the external handle is an Android hardware buffer, and the `pNext` chain includes a VkMemoryDedicatedAllocateInfo with `image` that is not VK_NULL_HANDLE, the Android hardware buffer’s AHardwareBuffer::`usage` must include at least one of `AHARDWAREBUFFER_USAGE_GPU_FRAMEBUFFER`, `AHARDWAREBUFFER_USAGE_GPU_SAMPLED_IMAGE` or `AHARDWAREBUFFER_USAGE_GPU_DATA_BUFFER`

- VUID-VkMemoryAllocateInfo-pNext-02387
  If the parameters define an import operation, the external handle is an Android hardware buffer, and the `pNext` chain includes a VkMemoryDedicatedAllocateInfo with `image` that is not VK_NULL_HANDLE, the format of `image` must be VK_FORMAT_UNDEFINED or the format returned by vkGetAndroidHardwareBufferPropertiesANDROID in VkAndroidHardwareBufferFormatPropertiesANDROID::`format` for the Android hardware buffer

- VUID-VkMemoryAllocateInfo-pNext-02388
  If the parameters define an import operation, the external handle is an Android hardware buffer, and the `pNext` chain includes a VkMemoryDedicatedAllocateInfo structure with `image` that is not VK_NULL_HANDLE, the width, height, and array layer dimensions of `image` and the Android hardware buffer’s `AHardwareBuffer_Desc` must be identical

- VUID-VkMemoryAllocateInfo-pNext-02389
  If the parameters define an import operation, the external handle is an Android hardware buffer, and the `pNext` chain includes a VkMemoryDedicatedAllocateInfo structure with `image` that is not VK_NULL_HANDLE, and the Android hardware buffer’s AHardwareBuffer::`usage` includes `AHARDWAREBUFFER_USAGE_GPU_MIPMAP_COMPLETE`, the `image` must have a complete mipmap chain

- VUID-VkMemoryAllocateInfo-pNext-02586
  If the parameters define an import operation, the external handle is an Android hardware buffer, and the `pNext` chain includes a VkMemoryDedicatedAllocateInfo structure with `image` that is not VK_NULL_HANDLE, and the Android hardware buffer’s AHardwareBuffer::`usage` does not include `AHARDWAREBUFFER_USAGE_GPU_MIPMAP_COMPLETE`, the `image` must have exactly one mipmap level

- VUID-VkMemoryAllocateInfo-pNext-02390
  If the parameters define an import operation, the external handle is an Android hardware buffer, and the `pNext` chain includes a VkMemoryDedicatedAllocateInfo structure with `image` that is not VK_NULL_HANDLE, each bit set in the usage of `image` must be listed in AHardwareBuffer Usage Equivalence, and if there is a corresponding `AHARDWAREBUFFER_USAGE` bit listed that bit must be included in the Android hardware buffer’s `AHardwareBuffer_Desc`::`usage`

- VUID-VkMemoryAllocateInfo-screenBufferImport-08941
  If the parameters define an import operation and the external handle type is VK_EXTERNAL_MEMORY_HANDLE_TYPE_SCREEN_BUFFER_BIT_QNX, VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX::`screenBufferImport` must be enabled

- VUID-VkMemoryAllocateInfo-allocationSize-08942
  If the parameters define an import operation and the external handle type is VK_EXTERNAL_MEMORY_HANDLE_TYPE_SCREEN_BUFFER_BIT_QNX, `allocationSize` must be the size returned by vkGetScreenBufferPropertiesQNX for the QNX Screen buffer

- VUID-VkMemoryAllocateInfo-memoryTypeIndex-08943
  If the parameters define an import operation and the external handle type is VK_EXTERNAL_MEMORY_HANDLE_TYPE_SCREEN_BUFFER_BIT_QNX, `memoryTypeIndex` must be one of those returned by vkGetScreenBufferPropertiesQNX for the QNX Screen buffer

- VUID-VkMemoryAllocateInfo-pNext-08944
  If the parameters define an import operation, the external handle is a QNX Screen buffer, and the `pNext` chain includes a VkMemoryDedicatedAllocateInfo with `image` that is not VK_NULL_HANDLE, the QNX Screen’s buffer must be a valid QNX Screen buffer

- VUID-VkMemoryAllocateInfo-pNext-08945
  If the parameters define an import operation, the external handle is an QNX Screen buffer, and the `pNext` chain includes a VkMemoryDedicatedAllocateInfo with `image` that is not VK_NULL_HANDLE, the format of `image` must be VK_FORMAT_UNDEFINED or the format returned by vkGetScreenBufferPropertiesQNX in VkScreenBufferFormatPropertiesQNX::`format` for the QNX Screen buffer

- VUID-VkMemoryAllocateInfo-pNext-08946
  If the parameters define an import operation, the external handle is a QNX Screen buffer, and the `pNext` chain includes a VkMemoryDedicatedAllocateInfo structure with `image` that is not VK_NULL_HANDLE, the width, height, and array layer dimensions of `image` and the QNX Screen buffer’s `_screen_buffer` must be identical

- VUID-VkMemoryAllocateInfo-pNext-10395
  If the parameters define an import operation and the external handle is a VK_EXTERNAL_MEMORY_HANDLE_TYPE_MTLTEXTURE_BIT_EXT, then `pNext` must include a VkMemoryDedicatedAllocateInfo with `image` that is not VK_NULL_HANDLE

- VUID-VkMemoryAllocateInfo-pNext-10396
  If the parameters define an import operation, the external handle is a Metal MTLTexture, and the `pNext` chain includes a VkMemoryDedicatedAllocateInfo structure with `image` that is not VK_NULL_HANDLE, the width, height, array layer dimensions, and mipmap levels of `image` and the Metal MTLTexture’s must be identical

- VUID-VkMemoryAllocateInfo-pNext-10397
  If the parameters define an import operation, the external handle is a Metal MTLTexture, and the `pNext` chain includes a VkMemoryDedicatedAllocateInfo structure with `image` that is not VK_NULL_HANDLE, `allocationSize` must be `0`

- VUID-VkMemoryAllocateInfo-opaqueCaptureAddress-03329
  If VkMemoryOpaqueCaptureAddressAllocateInfo::`opaqueCaptureAddress` is not zero, `VkMemoryAllocateFlagsInfo`::`flags` must include VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT

- VUID-VkMemoryAllocateInfo-flags-03330
  If `VkMemoryAllocateFlagsInfo`::`flags` includes VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT, the `bufferDeviceAddressCaptureReplay` feature must be enabled

- VUID-VkMemoryAllocateInfo-flags-03331
  If `VkMemoryAllocateFlagsInfo`::`flags` includes VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT, the `bufferDeviceAddress` feature must be enabled

- VUID-VkMemoryAllocateInfo-pNext-03332
  If the `pNext` chain includes a `VkImportMemoryHostPointerInfoEXT` structure, VkMemoryOpaqueCaptureAddressAllocateInfo::`opaqueCaptureAddress` must be zero

- VUID-VkMemoryAllocateInfo-opaqueCaptureAddress-03333
  If the parameters define an import operation, VkMemoryOpaqueCaptureAddressAllocateInfo::`opaqueCaptureAddress` must be zero

- VUID-VkMemoryAllocateInfo-None-04749
  If the parameters define an import operation and the external handle type is VK_EXTERNAL_MEMORY_HANDLE_TYPE_ZIRCON_VMO_BIT_FUCHSIA, the value of `memoryTypeIndex` must be an index identifying a memory type from the `memoryTypeBits` field of the VkMemoryZirconHandlePropertiesFUCHSIA structure populated by a call to vkGetMemoryZirconHandlePropertiesFUCHSIA

- VUID-VkMemoryAllocateInfo-allocationSize-07902
  If the parameters define an import operation and the external handle type is VK_EXTERNAL_MEMORY_HANDLE_TYPE_ZIRCON_VMO_BIT_FUCHSIA, the value of `allocationSize` must be greater than `0`

- VUID-VkMemoryAllocateInfo-allocationSize-07903
  If the parameters define an import operation and the external handle type is VK_EXTERNAL_MEMORY_HANDLE_TYPE_ZIRCON_VMO_BIT_FUCHSIA, the value of `allocationSize` must be less than or equal to the size of the VMO as determined by `zx_vmo_get_size`(`handle`) where `handle` is the VMO handle to the imported external memory

- VUID-VkMemoryAllocateInfo-pNext-06780
  If the `pNext` chain includes a VkExportMetalObjectCreateInfoEXT structure, its `exportObjectType` member must be VK_EXPORT_METAL_OBJECT_TYPE_METAL_BUFFER_BIT_EXT

Valid Usage (Implicit)

- VUID-VkMemoryAllocateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO

- VUID-VkMemoryAllocateInfo-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkDedicatedAllocationMemoryAllocateInfoNV, VkExportMemoryAllocateInfo, VkExportMemoryAllocateInfoNV, VkExportMemoryWin32HandleInfoKHR, VkExportMemoryWin32HandleInfoNV, VkExportMetalObjectCreateInfoEXT, VkImportAndroidHardwareBufferInfoANDROID, VkImportMemoryBufferCollectionFUCHSIA, VkImportMemoryFdInfoKHR, VkImportMemoryHostPointerInfoEXT, VkImportMemoryMetalHandleInfoEXT, VkImportMemoryWin32HandleInfoKHR, VkImportMemoryWin32HandleInfoNV, VkImportMemoryZirconHandleInfoFUCHSIA, VkImportMetalBufferInfoEXT, VkImportNativeBufferInfoOHOS, VkImportScreenBufferInfoQNX, VkMemoryAllocateFlagsInfo, VkMemoryDedicatedAllocateInfo, VkMemoryDedicatedAllocateInfoTensorARM, VkMemoryOpaqueCaptureAddressAllocateInfo, or VkMemoryPriorityAllocateInfoEXT

- VUID-VkMemoryAllocateInfo-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique, with the exception of structures of type VkExportMetalObjectCreateInfoEXT

If the `pNext` chain includes a `VkMemoryDedicatedAllocateInfo` structure, then that structure includes a handle of the sole buffer or image resource that the memory can be bound to.

The `VkMemoryDedicatedAllocateInfo` structure is defined as:

    // Provided by VK_VERSION_1_1
    typedef struct VkMemoryDedicatedAllocateInfo {
        VkStructureType    sType;
        const void*        pNext;
        VkImage            image;
        VkBuffer           buffer;
    } VkMemoryDedicatedAllocateInfo;

    // Provided by VK_KHR_dedicated_allocation
    // Equivalent to VkMemoryDedicatedAllocateInfo
    typedef VkMemoryDedicatedAllocateInfo VkMemoryDedicatedAllocateInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `image` is VK_NULL_HANDLE or a handle of an image which this memory will be bound to.

- `buffer` is VK_NULL_HANDLE or a handle of a buffer which this memory will be bound to.

Valid Usage

- VUID-VkMemoryDedicatedAllocateInfo-image-01432
  At least one of `image` and `buffer` must be VK_NULL_HANDLE

- VUID-VkMemoryDedicatedAllocateInfo-image-02964
  If `image` is not VK_NULL_HANDLE and the memory is not an imported Android Hardware Buffer or an imported QNX Screen buffer , `VkMemoryAllocateInfo`::`allocationSize` must be greater than or equal to the `VkMemoryRequirements`::`size` of the image

- VUID-VkMemoryDedicatedAllocateInfo-image-01434
  If `image` is not VK_NULL_HANDLE, `image` must have been created without VK_IMAGE_CREATE_SPARSE_BINDING_BIT set in VkImageCreateInfo::`flags`

- VUID-VkMemoryDedicatedAllocateInfo-buffer-02965
  If `buffer` is not VK_NULL_HANDLE and the memory is not an imported Android Hardware Buffer or an imported QNX Screen buffer , `VkMemoryAllocateInfo`::`allocationSize` must be greater than or equal to the `VkMemoryRequirements`::`size` of the buffer

- VUID-VkMemoryDedicatedAllocateInfo-buffer-01436
  If `buffer` is not VK_NULL_HANDLE, `buffer` must have been created without VK_BUFFER_CREATE_SPARSE_BINDING_BIT set in VkBufferCreateInfo::`flags`

- VUID-VkMemoryDedicatedAllocateInfo-image-01876
  If `image` is not VK_NULL_HANDLE and VkMemoryAllocateInfo defines a memory import operation with handle type VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT, VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT, VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT, VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT, VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT, or VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT, and the external handle was created by the Vulkan API, then the memory being imported must also be a dedicated image allocation and `image` must be identical to the image associated with the imported memory

- VUID-VkMemoryDedicatedAllocateInfo-buffer-01877
  If `buffer` is not VK_NULL_HANDLE and VkMemoryAllocateInfo defines a memory import operation with handle type VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT, VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT, VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT, VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT, VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT, or VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT, and the external handle was created by the Vulkan API, then the memory being imported must also be a dedicated buffer allocation and `buffer` must be identical to the buffer associated with the imported memory

- VUID-VkMemoryDedicatedAllocateInfo-image-01878
  If `image` is not VK_NULL_HANDLE and VkMemoryAllocateInfo defines a memory import operation with handle type VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT, the memory being imported must also be a dedicated image allocation and `image` must be identical to the image associated with the imported memory

- VUID-VkMemoryDedicatedAllocateInfo-buffer-01879
  If `buffer` is not VK_NULL_HANDLE and VkMemoryAllocateInfo defines a memory import operation with handle type VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT, the memory being imported must also be a dedicated buffer allocation and `buffer` must be identical to the buffer associated with the imported memory

- VUID-VkMemoryDedicatedAllocateInfo-image-01797
  If `image` is not VK_NULL_HANDLE, `image` must not have been created with VK_IMAGE_CREATE_DISJOINT_BIT set in VkImageCreateInfo::`flags`

- VUID-VkMemoryDedicatedAllocateInfo-image-04751
  If `image` is not VK_NULL_HANDLE and VkMemoryAllocateInfo defines a memory import operation with handle type VK_EXTERNAL_MEMORY_HANDLE_TYPE_ZIRCON_VMO_BIT_FUCHSIA, the memory being imported must also be a dedicated image allocation and `image` must be identical to the image associated with the imported memory

- VUID-VkMemoryDedicatedAllocateInfo-buffer-04752
  If `buffer` is not VK_NULL_HANDLE and VkMemoryAllocateInfo defines a memory import operation with handle type VK_EXTERNAL_MEMORY_HANDLE_TYPE_ZIRCON_VMO_BIT_FUCHSIA, the memory being imported must also be a dedicated buffer allocation and `buffer` must be identical to the buffer associated with the imported memory

Valid Usage (Implicit)

- VUID-VkMemoryDedicatedAllocateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO

- VUID-VkMemoryDedicatedAllocateInfo-image-parameter
  If `image` is not VK_NULL_HANDLE, `image` must be a valid VkImage handle

- VUID-VkMemoryDedicatedAllocateInfo-buffer-parameter
  If `buffer` is not VK_NULL_HANDLE, `buffer` must be a valid VkBuffer handle

- VUID-VkMemoryDedicatedAllocateInfo-commonparent
  Both of `buffer`, and `image` that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevice

Structure Chaining

Extends the structure

  - VkMemoryAllocateInfo

To bind a range of tile memory to the command buffer, call:

    // Provided by VK_QCOM_tile_memory_heap
    void vkCmdBindTileMemoryQCOM(
        VkCommandBuffer                             commandBuffer,
        const VkTileMemoryBindInfoQCOM*             pTileMemoryBindInfo);

- `commandBuffer` is the command buffer that the tile memory will be bound to.

- `pTileMemoryBindInfo` is VK_NULL_HANDLE or a pointer to a VkTileMemoryBindInfoQCOM structure defining how tile memory is bound.

Calling vkCmdBindTileMemoryQCOM when `pTileMemoryBindInfo` is `NULL` is equivalent to binding no tile memory to the command buffer.

Valid Usage (Implicit)

- VUID-vkCmdBindTileMemoryQCOM-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdBindTileMemoryQCOM-pTileMemoryBindInfo-parameter
  If `pTileMemoryBindInfo` is not `NULL`, `pTileMemoryBindInfo` must be a valid pointer to a valid VkTileMemoryBindInfoQCOM structure

- VUID-vkCmdBindTileMemoryQCOM-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdBindTileMemoryQCOM-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, or VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdBindTileMemoryQCOM-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdBindTileMemoryQCOM-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdBindTileMemoryQCOM is not affected by conditional rendering

The `VkTileMemoryBindInfoQCOM` structure is defined as:

    // Provided by VK_QCOM_tile_memory_heap
    typedef struct VkTileMemoryBindInfoQCOM {
        VkStructureType    sType;
        const void*        pNext;
        VkDeviceMemory     memory;
    } VkTileMemoryBindInfoQCOM;

- `memory` is the tile memory object to be bound.

`memory` is used to bind this memory object to tile memory for all subsequent commands in the `commandBuffer`. Tile memory contents for ranges in the heap outside the bound `memory` are discarded and become undefined for the active tile memory scope if an action command is executed.

For secondary command buffers executing within a render pass instance, the active bound tile memory object is provided with this structure included in the `pNext` chain of `VkCommandBufferInheritanceInfo`.

If this structure was not specified since recording started for `commandBuffer`, no tile memory is bound to the command buffer and all contents become undefined for the tile memory scope if an action command is executed.

Valid Usage

- VUID-VkTileMemoryBindInfoQCOM-memory-10726
  `memory` must have been allocated from a VkMemoryHeap with the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property

Valid Usage (Implicit)

- VUID-VkTileMemoryBindInfoQCOM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_TILE_MEMORY_BIND_INFO_QCOM

- VUID-VkTileMemoryBindInfoQCOM-memory-parameter
  `memory` must be a valid VkDeviceMemory handle

Structure Chaining

Extends the structure

  - VkCommandBufferInheritanceInfo

If the `pNext` chain includes a `VkMemoryDedicatedAllocateInfoTensorARM` structure, then that structure includes a handle of the sole tensor resource that the memory can be bound to.

The `VkMemoryDedicatedAllocateInfoTensorARM` structure is defined as:

    // Provided by VK_ARM_tensors
    typedef struct VkMemoryDedicatedAllocateInfoTensorARM {
        VkStructureType    sType;
        const void*        pNext;
        VkTensorARM        tensor;
    } VkMemoryDedicatedAllocateInfoTensorARM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `tensor` is a handle of a tensor which this memory will be bound to.

Valid Usage

- VUID-VkMemoryDedicatedAllocateInfoTensorARM-allocationSize-09710
  `VkMemoryAllocateInfo`::`allocationSize` must equal the `VkMemoryRequirements`::`size` of the tensor

- VUID-VkMemoryDedicatedAllocateInfoTensorARM-tensor-09859
  If VkMemoryAllocateInfo defines a memory import operation with handle type VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT, the memory being imported must also be a dedicated tensor allocation and `tensor` must be identical to the tensor associated with the imported memory

Valid Usage (Implicit)

- VUID-VkMemoryDedicatedAllocateInfoTensorARM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO_TENSOR_ARM

- VUID-VkMemoryDedicatedAllocateInfoTensorARM-tensor-parameter
  `tensor` must be a valid VkTensorARM handle

Structure Chaining

Extends the structure

  - VkMemoryAllocateInfo

If the `pNext` chain includes a `VkDedicatedAllocationMemoryAllocateInfoNV` structure, then that structure includes a handle of the sole buffer or image resource that the memory can be bound to.

The `VkDedicatedAllocationMemoryAllocateInfoNV` structure is defined as:

    // Provided by VK_NV_dedicated_allocation
    typedef struct VkDedicatedAllocationMemoryAllocateInfoNV {
        VkStructureType    sType;
        const void*        pNext;
        VkImage            image;
        VkBuffer           buffer;
    } VkDedicatedAllocationMemoryAllocateInfoNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `image` is VK_NULL_HANDLE or a handle of an image which this memory will be bound to.

- `buffer` is VK_NULL_HANDLE or a handle of a buffer which this memory will be bound to.

Valid Usage

- VUID-VkDedicatedAllocationMemoryAllocateInfoNV-image-00649
  At least one of `image` and `buffer` must be VK_NULL_HANDLE

- VUID-VkDedicatedAllocationMemoryAllocateInfoNV-image-00650
  If `image` is not VK_NULL_HANDLE, the image must have been created with VkDedicatedAllocationImageCreateInfoNV::`dedicatedAllocation` equal to VK_TRUE

- VUID-VkDedicatedAllocationMemoryAllocateInfoNV-buffer-00651
  If `buffer` is not VK_NULL_HANDLE, the buffer must have been created with VkDedicatedAllocationBufferCreateInfoNV::`dedicatedAllocation` equal to VK_TRUE

- VUID-VkDedicatedAllocationMemoryAllocateInfoNV-image-00652
  If `image` is not VK_NULL_HANDLE, `VkMemoryAllocateInfo`::`allocationSize` must equal the `VkMemoryRequirements`::`size` of the image

- VUID-VkDedicatedAllocationMemoryAllocateInfoNV-buffer-00653
  If `buffer` is not VK_NULL_HANDLE, `VkMemoryAllocateInfo`::`allocationSize` must equal the `VkMemoryRequirements`::`size` of the buffer

- VUID-VkDedicatedAllocationMemoryAllocateInfoNV-image-00654
  If `image` is not VK_NULL_HANDLE and VkMemoryAllocateInfo defines a memory import operation, the memory being imported must also be a dedicated image allocation and `image` must be identical to the image associated with the imported memory

- VUID-VkDedicatedAllocationMemoryAllocateInfoNV-buffer-00655
  If `buffer` is not VK_NULL_HANDLE and VkMemoryAllocateInfo defines a memory import operation, the memory being imported must also be a dedicated buffer allocation and `buffer` must be identical to the buffer associated with the imported memory

Valid Usage (Implicit)

- VUID-VkDedicatedAllocationMemoryAllocateInfoNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV

- VUID-VkDedicatedAllocationMemoryAllocateInfoNV-image-parameter
  If `image` is not VK_NULL_HANDLE, `image` must be a valid VkImage handle

- VUID-VkDedicatedAllocationMemoryAllocateInfoNV-buffer-parameter
  If `buffer` is not VK_NULL_HANDLE, `buffer` must be a valid VkBuffer handle

- VUID-VkDedicatedAllocationMemoryAllocateInfoNV-commonparent
  Both of `buffer`, and `image` that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevice

Structure Chaining

Extends the structure

  - VkMemoryAllocateInfo

If the `pNext` chain includes a `VkMemoryPriorityAllocateInfoEXT` structure, then that structure includes a priority for the memory.

The `VkMemoryPriorityAllocateInfoEXT` structure is defined as:

    // Provided by VK_EXT_memory_priority
    typedef struct VkMemoryPriorityAllocateInfoEXT {
        VkStructureType    sType;
        const void*        pNext;
        float              priority;
    } VkMemoryPriorityAllocateInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `priority` is a floating-point value between `0` and `1`, indicating the priority of the allocation relative to other memory allocations. Larger values are higher priority. The granularity of the priorities is implementation-dependent.

Memory allocations with higher priority may be more likely to stay in device-local memory when the system is under memory pressure.

If this structure is not included, it is as if the `priority` value were `0.5`.

Valid Usage

- VUID-VkMemoryPriorityAllocateInfoEXT-priority-02602
  `priority` must be between `0` and `1`, inclusive

Valid Usage (Implicit)

- VUID-VkMemoryPriorityAllocateInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_MEMORY_PRIORITY_ALLOCATE_INFO_EXT

Structure Chaining

Extends the structure

  - VkMemoryAllocateInfo

To modify the priority of an existing memory allocation, call:

    // Provided by VK_EXT_pageable_device_local_memory
    void vkSetDeviceMemoryPriorityEXT(
        VkDevice                                    device,
        VkDeviceMemory                              memory,
        float                                       priority);

- `device` is the logical device that owns the memory.

- `memory` is the VkDeviceMemory object to which the new priority will be applied.

- `priority` is a floating-point value between `0` and `1`, indicating the priority of the allocation relative to other memory allocations. Larger values are higher priority. The granularity of the priorities is implementation-dependent.

Memory allocations with higher priority may be more likely to stay in device-local memory when the system is under memory pressure.

Valid Usage

- VUID-vkSetDeviceMemoryPriorityEXT-priority-06258
  `priority` must be between `0` and `1`, inclusive

Valid Usage (Implicit)

- VUID-vkSetDeviceMemoryPriorityEXT-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkSetDeviceMemoryPriorityEXT-memory-parameter
  `memory` must be a valid VkDeviceMemory handle

- VUID-vkSetDeviceMemoryPriorityEXT-memory-parent
  `memory` must have been created, allocated, or retrieved from `device`

When allocating memory whose payload may be exported to another process or Vulkan instance, add a VkExportMemoryAllocateInfo structure to the `pNext` chain of the VkMemoryAllocateInfo structure, specifying the handle types that may be exported.

The VkExportMemoryAllocateInfo structure is defined as:

    // Provided by VK_VERSION_1_1
    typedef struct VkExportMemoryAllocateInfo {
        VkStructureType                    sType;
        const void*                        pNext;
        VkExternalMemoryHandleTypeFlags    handleTypes;
    } VkExportMemoryAllocateInfo;

    // Provided by VK_KHR_external_memory
    // Equivalent to VkExportMemoryAllocateInfo
    typedef VkExportMemoryAllocateInfo VkExportMemoryAllocateInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `handleTypes` is zero or a bitmask of VkExternalMemoryHandleTypeFlagBits specifying one or more memory handle types the application can export from the resulting allocation. The application can request multiple handle types for the same allocation.

Valid Usage

- VUID-VkExportMemoryAllocateInfo-handleTypes-09860
  The bits in `handleTypes` must be supported and compatible, as reported by VkExternalTensorPropertiesARM, VkExternalImageFormatProperties, or VkExternalBufferProperties

Valid Usage (Implicit)

- VUID-VkExportMemoryAllocateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO

- VUID-VkExportMemoryAllocateInfo-handleTypes-parameter
  `handleTypes` must be a valid combination of VkExternalMemoryHandleTypeFlagBits values

Structure Chaining

Extends the structure

  - VkMemoryAllocateInfo

When allocating memory that may be exported to another process or Vulkan instance, add a VkExportMemoryAllocateInfoNV structure to the `pNext` chain of the VkMemoryAllocateInfo structure, specifying the handle types that may be exported.

The VkExportMemoryAllocateInfoNV structure is defined as:

    // Provided by VK_NV_external_memory
    typedef struct VkExportMemoryAllocateInfoNV {
        VkStructureType                      sType;
        const void*                          pNext;
        VkExternalMemoryHandleTypeFlagsNV    handleTypes;
    } VkExportMemoryAllocateInfoNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `handleTypes` is a bitmask of VkExternalMemoryHandleTypeFlagBitsNV specifying one or more memory handle types that may be exported. Multiple handle types may be requested for the same allocation as long as they are compatible, as reported by vkGetPhysicalDeviceExternalImageFormatPropertiesNV.

Valid Usage (Implicit)

- VUID-VkExportMemoryAllocateInfoNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV

- VUID-VkExportMemoryAllocateInfoNV-handleTypes-parameter
  `handleTypes` must be a valid combination of VkExternalMemoryHandleTypeFlagBitsNV values

Structure Chaining

Extends the structure

  - VkMemoryAllocateInfo

#### 11.2.4. Win32 External Memory

To specify additional attributes of NT handles exported from a memory object, add a VkExportMemoryWin32HandleInfoKHR structure to the `pNext` chain of the VkMemoryAllocateInfo structure. The `VkExportMemoryWin32HandleInfoKHR` structure is defined as:

    // Provided by VK_KHR_external_memory_win32
    typedef struct VkExportMemoryWin32HandleInfoKHR {
        VkStructureType               sType;
        const void*                   pNext;
        const SECURITY_ATTRIBUTES*    pAttributes;
        DWORD                         dwAccess;
        LPCWSTR                       name;
    } VkExportMemoryWin32HandleInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `pAttributes` is a pointer to a Windows `SECURITY_ATTRIBUTES` structure specifying security attributes of the handle.

- `dwAccess` is a `DWORD` specifying access rights of the handle.

- `name` is a null-terminated UTF-16 string to associate with the payload referenced by NT handles exported from the created memory.

If VkExportMemoryAllocateInfo is not included in the same `pNext` chain, this structure is ignored.

If VkExportMemoryAllocateInfo is included in the `pNext` chain of VkMemoryAllocateInfo with a Windows `handleType`, but either `VkExportMemoryWin32HandleInfoKHR` is not included in the `pNext` chain, or it is included but `pAttributes` is set to `NULL`, default security descriptor values will be used, and child processes created by the application will not inherit the handle, as described in the MSDN documentation for “Synchronization Object Security and Access Rights”1. Further, if the structure is not present, the access rights used depend on the handle type.

For handles of the following types:

- VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT

The implementation must ensure the access rights allow read and write access to the memory.

1

  https://docs.microsoft.com/en-us/windows/win32/sync/synchronization-object-security-and-access-rights

Valid Usage

- VUID-VkExportMemoryWin32HandleInfoKHR-handleTypes-00657
  If VkExportMemoryAllocateInfo::`handleTypes` does not include VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT, a `VkExportMemoryWin32HandleInfoKHR` structure must not be included in the `pNext` chain of VkMemoryAllocateInfo

Valid Usage (Implicit)

- VUID-VkExportMemoryWin32HandleInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR

- VUID-VkExportMemoryWin32HandleInfoKHR-pAttributes-parameter
  If `pAttributes` is not `NULL`, `pAttributes` must be a valid pointer to a valid `SECURITY_ATTRIBUTES` value

Structure Chaining

Extends the structure

  - VkMemoryAllocateInfo

To import memory from a Windows handle, add a VkImportMemoryWin32HandleInfoKHR structure to the `pNext` chain of the VkMemoryAllocateInfo structure.

The `VkImportMemoryWin32HandleInfoKHR` structure is defined as:

    // Provided by VK_KHR_external_memory_win32
    typedef struct VkImportMemoryWin32HandleInfoKHR {
        VkStructureType                       sType;
        const void*                           pNext;
        VkExternalMemoryHandleTypeFlagBits    handleType;
        HANDLE                                handle;
        LPCWSTR                               name;
    } VkImportMemoryWin32HandleInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `handleType` is a VkExternalMemoryHandleTypeFlagBits value specifying the type of `handle` or `name`.

- `handle` is `NULL` or the external handle to import.

- `name` is `NULL` or a null-terminated UTF-16 string naming the payload to import.

Importing memory object payloads from Windows handles does not transfer ownership of the handle to the Vulkan implementation. For handle types defined as NT handles, the application must release handle ownership using the `CloseHandle` system call when the handle is no longer needed. For handle types defined as NT handles, the imported memory object holds a reference to its payload.

Note | Non-NT handle import operations do not add a reference to their associated payload. If the original object owning the payload is destroyed, all resources and handles sharing that payload will become invalid.

Applications can import the same payload into multiple instances of Vulkan, into the same instance from which it was exported, and multiple times into a given Vulkan instance. In all cases, each import operation must create a distinct `VkDeviceMemory` object.

Valid Usage

- VUID-VkImportMemoryWin32HandleInfoKHR-handleType-09861
  If `handleType` is not `0`, it must be supported for import, as reported by VkExternalTensorPropertiesARM, VkExternalImageFormatProperties, or VkExternalBufferProperties

- VUID-VkImportMemoryWin32HandleInfoKHR-handle-00659
  The memory from which `handle` was exported, or the memory named by `name` must have been created on the same underlying physical device as `device`

- VUID-VkImportMemoryWin32HandleInfoKHR-handleType-00660
  If `handleType` is not `0`, it must be defined as an NT handle or a global share handle

- VUID-VkImportMemoryWin32HandleInfoKHR-handleType-01439
  If `handleType` is not VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT, VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT, VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT, or VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT, `name` must be `NULL`

- VUID-VkImportMemoryWin32HandleInfoKHR-handleType-01440
  If `handleType` is not `0` and `handle` is `NULL`, `name` must name a valid memory resource of the type specified by `handleType`

- VUID-VkImportMemoryWin32HandleInfoKHR-handleType-00661
  If `handleType` is not `0` and `name` is `NULL`, `handle` must be a valid handle of the type specified by `handleType`

- VUID-VkImportMemoryWin32HandleInfoKHR-handle-01441
  If `handle` is not `NULL`, `name` must be `NULL`

- VUID-VkImportMemoryWin32HandleInfoKHR-handle-01518
  If `handle` is not `NULL`, it must obey any requirements listed for `handleType` in external memory handle types compatibility

- VUID-VkImportMemoryWin32HandleInfoKHR-name-01519
  If `name` is not `NULL`, it must obey any requirements listed for `handleType` in external memory handle types compatibility

Valid Usage (Implicit)

- VUID-VkImportMemoryWin32HandleInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR

- VUID-VkImportMemoryWin32HandleInfoKHR-handleType-parameter
  If `handleType` is not `0`, `handleType` must be a valid VkExternalMemoryHandleTypeFlagBits value

Structure Chaining

Extends the structure

  - VkMemoryAllocateInfo

To export a Windows handle representing the payload of a Vulkan device memory object, call:

    // Provided by VK_KHR_external_memory_win32
    VkResult vkGetMemoryWin32HandleKHR(
        VkDevice                                    device,
        const VkMemoryGetWin32HandleInfoKHR*        pGetWin32HandleInfo,
        HANDLE*                                     pHandle);

- `device` is the logical device that created the device memory being exported.

- `pGetWin32HandleInfo` is a pointer to a VkMemoryGetWin32HandleInfoKHR structure containing parameters of the export operation.

- `pHandle` will return the Windows handle representing the payload of the device memory object.

For handle types defined as NT handles, the handles returned by `vkGetMemoryWin32HandleKHR` are owned by the application and hold a reference to their payload. To avoid leaking resources, the application must release ownership of them using the `CloseHandle` system call when they are no longer needed.

Note | Non-NT handle types do not add a reference to their associated payload. If the original object owning the payload is destroyed, all resources and handles sharing that payload will become invalid.

Valid Usage (Implicit)

- VUID-vkGetMemoryWin32HandleKHR-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetMemoryWin32HandleKHR-pGetWin32HandleInfo-parameter
  `pGetWin32HandleInfo` must be a valid pointer to a valid VkMemoryGetWin32HandleInfoKHR structure

- VUID-vkGetMemoryWin32HandleKHR-pHandle-parameter
  `pHandle` must be a valid pointer to a `HANDLE` value

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_TOO_MANY_OBJECTS

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkMemoryGetWin32HandleInfoKHR` structure is defined as:

    // Provided by VK_KHR_external_memory_win32
    typedef struct VkMemoryGetWin32HandleInfoKHR {
        VkStructureType                       sType;
        const void*                           pNext;
        VkDeviceMemory                        memory;
        VkExternalMemoryHandleTypeFlagBits    handleType;
    } VkMemoryGetWin32HandleInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `memory` is the memory object from which the handle will be exported.

- `handleType` is a VkExternalMemoryHandleTypeFlagBits value specifying the type of handle requested.

The properties of the handle returned depend on the value of `handleType`. See VkExternalMemoryHandleTypeFlagBits for a description of the properties of the defined external memory handle types.

Valid Usage

- VUID-VkMemoryGetWin32HandleInfoKHR-handleType-00662
  `handleType` must have been included in VkExportMemoryAllocateInfo::`handleTypes` when `memory` was created

- VUID-VkMemoryGetWin32HandleInfoKHR-handleType-00663
  If `handleType` is defined as an NT handle, vkGetMemoryWin32HandleKHR must be called no more than once for each valid unique combination of `memory` and `handleType`

- VUID-VkMemoryGetWin32HandleInfoKHR-handleType-00664
  `handleType` must be defined as an NT handle or a global share handle

Valid Usage (Implicit)

- VUID-VkMemoryGetWin32HandleInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_MEMORY_GET_WIN32_HANDLE_INFO_KHR

- VUID-VkMemoryGetWin32HandleInfoKHR-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkMemoryGetWin32HandleInfoKHR-memory-parameter
  `memory` must be a valid VkDeviceMemory handle

- VUID-VkMemoryGetWin32HandleInfoKHR-handleType-parameter
  `handleType` must be a valid VkExternalMemoryHandleTypeFlagBits value

Windows memory handles compatible with Vulkan may also be created by non-Vulkan APIs using methods beyond the scope of this specification. To determine the correct parameters to use when importing such handles, call:

    // Provided by VK_KHR_external_memory_win32
    VkResult vkGetMemoryWin32HandlePropertiesKHR(
        VkDevice                                    device,
        VkExternalMemoryHandleTypeFlagBits          handleType,
        HANDLE                                      handle,
        VkMemoryWin32HandlePropertiesKHR*           pMemoryWin32HandleProperties);

- `device` is the logical device that will be importing `handle`.

- `handleType` is a VkExternalMemoryHandleTypeFlagBits value specifying the type of the handle `handle`.

- `handle` is the handle which will be imported.

- `pMemoryWin32HandleProperties` is a pointer to a VkMemoryWin32HandlePropertiesKHR structure in which properties of `handle` are returned.

Valid Usage

- VUID-vkGetMemoryWin32HandlePropertiesKHR-handle-00665
  `handle` must point to a valid Windows memory handle

- VUID-vkGetMemoryWin32HandlePropertiesKHR-handleType-00666
  `handleType` must not be one of the handle types defined as opaque

Valid Usage (Implicit)

- VUID-vkGetMemoryWin32HandlePropertiesKHR-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetMemoryWin32HandlePropertiesKHR-handleType-parameter
  `handleType` must be a valid VkExternalMemoryHandleTypeFlagBits value

- VUID-vkGetMemoryWin32HandlePropertiesKHR-pMemoryWin32HandleProperties-parameter
  `pMemoryWin32HandleProperties` must be a valid pointer to a VkMemoryWin32HandlePropertiesKHR structure

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_INVALID_EXTERNAL_HANDLE

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkMemoryWin32HandlePropertiesKHR` structure returned is defined as:

    // Provided by VK_KHR_external_memory_win32
    typedef struct VkMemoryWin32HandlePropertiesKHR {
        VkStructureType    sType;
        void*              pNext;
        uint32_t           memoryTypeBits;
    } VkMemoryWin32HandlePropertiesKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `memoryTypeBits` is a bitmask containing one bit set for every memory type which the specified windows handle can be imported as.

Valid Usage (Implicit)

- VUID-VkMemoryWin32HandlePropertiesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_MEMORY_WIN32_HANDLE_PROPERTIES_KHR

- VUID-VkMemoryWin32HandlePropertiesKHR-pNext-pNext
  `pNext` must be `NULL`

When VkExportMemoryAllocateInfoNV::`handleTypes` includes VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_NV, add a `VkExportMemoryWin32HandleInfoNV` structure to the `pNext` chain of the VkExportMemoryAllocateInfoNV structure to specify security attributes and access rights for the memory object’s external handle.

The `VkExportMemoryWin32HandleInfoNV` structure is defined as:

    // Provided by VK_NV_external_memory_win32
    typedef struct VkExportMemoryWin32HandleInfoNV {
        VkStructureType               sType;
        const void*                   pNext;
        const SECURITY_ATTRIBUTES*    pAttributes;
        DWORD                         dwAccess;
    } VkExportMemoryWin32HandleInfoNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `pAttributes` is a pointer to a Windows `SECURITY_ATTRIBUTES` structure specifying security attributes of the handle.

- `dwAccess` is a `DWORD` specifying access rights of the handle.

If this structure is not present, or if `pAttributes` is `NULL`, default security descriptor values will be used, and child processes created by the application will not inherit the handle, as described in the MSDN documentation for “Synchronization Object Security and Access Rights”1. Further, if the structure is not present, the access rights will be

`DXGI_SHARED_RESOURCE_READ` | `DXGI_SHARED_RESOURCE_WRITE`

1

  https://docs.microsoft.com/en-us/windows/win32/sync/synchronization-object-security-and-access-rights

Valid Usage (Implicit)

- VUID-VkExportMemoryWin32HandleInfoNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV

- VUID-VkExportMemoryWin32HandleInfoNV-pAttributes-parameter
  If `pAttributes` is not `NULL`, `pAttributes` must be a valid pointer to a valid `SECURITY_ATTRIBUTES` value

Structure Chaining

Extends the structure

  - VkMemoryAllocateInfo

To import memory created on the same physical device but outside of the current Vulkan instance, add a VkImportMemoryWin32HandleInfoNV structure to the `pNext` chain of the VkMemoryAllocateInfo structure, specifying a handle to and the type of the memory.

The `VkImportMemoryWin32HandleInfoNV` structure is defined as:

    // Provided by VK_NV_external_memory_win32
    typedef struct VkImportMemoryWin32HandleInfoNV {
        VkStructureType                      sType;
        const void*                          pNext;
        VkExternalMemoryHandleTypeFlagsNV    handleType;
        HANDLE                               handle;
    } VkImportMemoryWin32HandleInfoNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `handleType` is `0` or a VkExternalMemoryHandleTypeFlagBitsNV value specifying the type of memory handle in `handle`.

- `handle` is a Windows `HANDLE` referring to the memory.

If `handleType` is `0`, this structure is ignored by consumers of the VkMemoryAllocateInfo structure it is chained from.

Valid Usage

- VUID-VkImportMemoryWin32HandleInfoNV-handleType-01327
  `handleType` must not have more than one bit set

- VUID-VkImportMemoryWin32HandleInfoNV-handle-01328
  `handle` must be a valid handle to memory, obtained as specified by `handleType`

Valid Usage (Implicit)

- VUID-VkImportMemoryWin32HandleInfoNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV

- VUID-VkImportMemoryWin32HandleInfoNV-handleType-parameter
  `handleType` must be a valid combination of VkExternalMemoryHandleTypeFlagBitsNV values

Structure Chaining

Extends the structure

  - VkMemoryAllocateInfo

Bits which can be set in `handleType` are:

Possible values of VkImportMemoryWin32HandleInfoNV::`handleType`, specifying the type of an external memory handle, are:

    // Provided by VK_NV_external_memory_capabilities
    typedef enum VkExternalMemoryHandleTypeFlagBitsNV {
        VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_NV = 0x00000001,
        VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_NV = 0x00000002,
        VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_BIT_NV = 0x00000004,
        VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_KMT_BIT_NV = 0x00000008,
    } VkExternalMemoryHandleTypeFlagBitsNV;

- VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_NV specifies a handle to memory returned by vkGetMemoryWin32HandleNV.

- VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_NV specifies a handle to memory returned by vkGetMemoryWin32HandleNV, or one duplicated from such a handle using `DuplicateHandle()`.

- VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_BIT_NV specifies a valid NT handle to memory returned by `IDXGIResource1::CreateSharedHandle`, or a handle duplicated from such a handle using `DuplicateHandle()`.

- VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_KMT_BIT_NV specifies a handle to memory returned by `IDXGIResource::GetSharedHandle()`.

    // Provided by VK_NV_external_memory_capabilities
    typedef VkFlags VkExternalMemoryHandleTypeFlagsNV;

`VkExternalMemoryHandleTypeFlagsNV` is a bitmask type for setting a mask of zero or more VkExternalMemoryHandleTypeFlagBitsNV.

To retrieve the handle corresponding to a device memory object created with VkExportMemoryAllocateInfoNV::`handleTypes` set to include VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_NV or VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_NV, call:

    // Provided by VK_NV_external_memory_win32
    VkResult vkGetMemoryWin32HandleNV(
        VkDevice                                    device,
        VkDeviceMemory                              memory,
        VkExternalMemoryHandleTypeFlagsNV           handleType,
        HANDLE*                                     pHandle);

- `device` is the logical device that owns the memory.

- `memory` is the VkDeviceMemory object.

- `handleType` is a bitmask of VkExternalMemoryHandleTypeFlagBitsNV containing a single bit specifying the type of handle requested.

- `pHandle` is a pointer to a Windows `HANDLE` in which the handle is returned.

Valid Usage

- VUID-vkGetMemoryWin32HandleNV-handleType-01326
  `handleType` must be a flag specified in VkExportMemoryAllocateInfoNV::`handleTypes` when allocating `memory`

Valid Usage (Implicit)

- VUID-vkGetMemoryWin32HandleNV-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetMemoryWin32HandleNV-memory-parameter
  `memory` must be a valid VkDeviceMemory handle

- VUID-vkGetMemoryWin32HandleNV-handleType-parameter
  `handleType` must be a valid combination of VkExternalMemoryHandleTypeFlagBitsNV values

- VUID-vkGetMemoryWin32HandleNV-handleType-requiredbitmask
  `handleType` must not be `0`

- VUID-vkGetMemoryWin32HandleNV-pHandle-parameter
  `pHandle` must be a valid pointer to a `HANDLE` value

- VUID-vkGetMemoryWin32HandleNV-memory-parent
  `memory` must have been created, allocated, or retrieved from `device`

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_TOO_MANY_OBJECTS

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

#### 11.2.5. File Descriptor External Memory

To import memory from a POSIX file descriptor handle, add a VkImportMemoryFdInfoKHR structure to the `pNext` chain of the VkMemoryAllocateInfo structure. The `VkImportMemoryFdInfoKHR` structure is defined as:

    // Provided by VK_KHR_external_memory_fd
    typedef struct VkImportMemoryFdInfoKHR {
        VkStructureType                       sType;
        const void*                           pNext;
        VkExternalMemoryHandleTypeFlagBits    handleType;
        int                                   fd;
    } VkImportMemoryFdInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `handleType` is a VkExternalMemoryHandleTypeFlagBits value specifying the handle type of `fd`.

- `fd` is the external handle to import.

Importing memory from a file descriptor transfers ownership of the file descriptor from the application to the Vulkan implementation. The application must not perform any operations on the file descriptor after a successful import. The imported memory object holds a reference to its payload.

Applications can import the same payload into multiple instances of Vulkan, into the same instance from which it was exported, and multiple times into a given Vulkan instance. In all cases, each import operation must create a distinct `VkDeviceMemory` object.

Valid Usage

- VUID-VkImportMemoryFdInfoKHR-handleType-09862
  If `handleType` is not `0`, it must be supported for import, as reported by VkExternalTensorPropertiesARM, VkExternalImageFormatProperties or VkExternalBufferProperties

- VUID-VkImportMemoryFdInfoKHR-fd-00668
  The memory from which `fd` was exported must have been created on the same underlying physical device as `device`

- VUID-VkImportMemoryFdInfoKHR-handleType-00669
  If `handleType` is not `0`, it must be VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT or VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT

- VUID-VkImportMemoryFdInfoKHR-handleType-00670
  If `handleType` is not `0`, `fd` must be a valid handle of the type specified by `handleType`

- VUID-VkImportMemoryFdInfoKHR-fd-01746
  The memory represented by `fd` must have been created from a physical device and driver that is compatible with `device` and `handleType`, as described in external memory handle types compatibility

- VUID-VkImportMemoryFdInfoKHR-fd-01520
  `fd` must obey any requirements listed for `handleType` in external memory handle types compatibility

Valid Usage (Implicit)

- VUID-VkImportMemoryFdInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR

- VUID-VkImportMemoryFdInfoKHR-handleType-parameter
  If `handleType` is not `0`, `handleType` must be a valid VkExternalMemoryHandleTypeFlagBits value

Structure Chaining

Extends the structure

  - VkMemoryAllocateInfo

To export a POSIX file descriptor referencing the payload of a Vulkan device memory object, call:

    // Provided by VK_KHR_external_memory_fd
    VkResult vkGetMemoryFdKHR(
        VkDevice                                    device,
        const VkMemoryGetFdInfoKHR*                 pGetFdInfo,
        int*                                        pFd);

- `device` is the logical device that created the device memory being exported.

- `pGetFdInfo` is a pointer to a VkMemoryGetFdInfoKHR structure containing parameters of the export operation.

- `pFd` will return a file descriptor referencing the payload of the device memory object.

Each call to `vkGetMemoryFdKHR` must create a new file descriptor holding a reference to the memory object’s payload and transfer ownership of the file descriptor to the application. To avoid leaking resources, the application must release ownership of the file descriptor using the `close` system call when it is no longer needed, or by importing a Vulkan memory object from it. Where supported by the operating system, the implementation must set the file descriptor to be closed automatically when an `execve` system call is made.

Valid Usage (Implicit)

- VUID-vkGetMemoryFdKHR-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetMemoryFdKHR-pGetFdInfo-parameter
  `pGetFdInfo` must be a valid pointer to a valid VkMemoryGetFdInfoKHR structure

- VUID-vkGetMemoryFdKHR-pFd-parameter
  `pFd` must be a valid pointer to an `int` value

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_TOO_MANY_OBJECTS

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkMemoryGetFdInfoKHR` structure is defined as:

    // Provided by VK_KHR_external_memory_fd
    typedef struct VkMemoryGetFdInfoKHR {
        VkStructureType                       sType;
        const void*                           pNext;
        VkDeviceMemory                        memory;
        VkExternalMemoryHandleTypeFlagBits    handleType;
    } VkMemoryGetFdInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `memory` is the memory object from which the handle will be exported.

- `handleType` is a VkExternalMemoryHandleTypeFlagBits value specifying the type of handle requested.

The properties of the file descriptor exported depend on the value of `handleType`. See VkExternalMemoryHandleTypeFlagBits for a description of the properties of the defined external memory handle types.

Note | The size of the exported file may be larger than the size requested by VkMemoryAllocateInfo::`allocationSize`. If `handleType` is VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT, then the application can query the file’s actual size with `lseek`.

Valid Usage

- VUID-VkMemoryGetFdInfoKHR-handleType-00671
  `handleType` must have been included in VkExportMemoryAllocateInfo::`handleTypes` when `memory` was created

- VUID-VkMemoryGetFdInfoKHR-handleType-00672
  `handleType` must be VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT or VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT

Valid Usage (Implicit)

- VUID-VkMemoryGetFdInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_MEMORY_GET_FD_INFO_KHR

- VUID-VkMemoryGetFdInfoKHR-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkMemoryGetFdInfoKHR-memory-parameter
  `memory` must be a valid VkDeviceMemory handle

- VUID-VkMemoryGetFdInfoKHR-handleType-parameter
  `handleType` must be a valid VkExternalMemoryHandleTypeFlagBits value

POSIX file descriptor memory handles compatible with Vulkan may also be created by non-Vulkan APIs using methods beyond the scope of this specification. To determine the correct parameters to use when importing such handles, call:

    // Provided by VK_KHR_external_memory_fd
    VkResult vkGetMemoryFdPropertiesKHR(
        VkDevice                                    device,
        VkExternalMemoryHandleTypeFlagBits          handleType,
        int                                         fd,
        VkMemoryFdPropertiesKHR*                    pMemoryFdProperties);

- `device` is the logical device that will be importing `fd`.

- `handleType` is a VkExternalMemoryHandleTypeFlagBits value specifying the type of the handle `fd`.

- `fd` is the handle which will be imported.

- `pMemoryFdProperties` is a pointer to a VkMemoryFdPropertiesKHR structure in which the properties of the handle `fd` are returned.

Valid Usage

- VUID-vkGetMemoryFdPropertiesKHR-fd-00673
  `fd` must point to a valid POSIX file descriptor memory handle

- VUID-vkGetMemoryFdPropertiesKHR-handleType-00674
  `handleType` must not be VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT

Valid Usage (Implicit)

- VUID-vkGetMemoryFdPropertiesKHR-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetMemoryFdPropertiesKHR-handleType-parameter
  `handleType` must be a valid VkExternalMemoryHandleTypeFlagBits value

- VUID-vkGetMemoryFdPropertiesKHR-pMemoryFdProperties-parameter
  `pMemoryFdProperties` must be a valid pointer to a VkMemoryFdPropertiesKHR structure

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_INVALID_EXTERNAL_HANDLE

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkMemoryFdPropertiesKHR` structure returned is defined as:

    // Provided by VK_KHR_external_memory_fd
    typedef struct VkMemoryFdPropertiesKHR {
        VkStructureType    sType;
        void*              pNext;
        uint32_t           memoryTypeBits;
    } VkMemoryFdPropertiesKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `memoryTypeBits` is a bitmask containing one bit set for every memory type which the specified file descriptor can be imported as.

Valid Usage (Implicit)

- VUID-VkMemoryFdPropertiesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_MEMORY_FD_PROPERTIES_KHR

- VUID-VkMemoryFdPropertiesKHR-pNext-pNext
  `pNext` must be `NULL`

#### 11.2.6. Host External Memory

To import memory from a host pointer, add a VkImportMemoryHostPointerInfoEXT structure to the `pNext` chain of the VkMemoryAllocateInfo structure. The `VkImportMemoryHostPointerInfoEXT` structure is defined as:

    // Provided by VK_EXT_external_memory_host
    typedef struct VkImportMemoryHostPointerInfoEXT {
        VkStructureType                       sType;
        const void*                           pNext;
        VkExternalMemoryHandleTypeFlagBits    handleType;
        void*                                 pHostPointer;
    } VkImportMemoryHostPointerInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `handleType` is a VkExternalMemoryHandleTypeFlagBits value specifying the handle type.

- `pHostPointer` is the host pointer to import from.

Importing memory from a host pointer shares ownership of the memory between the host and the Vulkan implementation. The application can continue to access the memory through the host pointer but it is the application’s responsibility to synchronize device and non-device access to the payload as defined in Host Access to Device Memory Objects.

Applications can import the same payload into multiple instances of Vulkan and multiple times into a given Vulkan instance. However, implementations may fail to import the same payload multiple times into a given physical device due to platform constraints.

Importing memory from a particular host pointer may not be possible due to additional platform-specific restrictions beyond the scope of this specification in which case the implementation must fail the memory import operation with the error code VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR.

Whether device memory objects imported from a host pointer hold a reference to their payload is undefined. As such, the application must ensure that the imported memory range remains valid and accessible for the lifetime of the imported memory object.

Implementations may support importing host pointers for memory types which are not host-visible. In this case, after a successful call to vkAllocateMemory, the memory range imported from `pHostPointer` must not be accessed by the application until the VkDeviceMemory has been destroyed. Memory contents for the host memory becomes undefined on import, and is left undefined after the VkDeviceMemory has been destroyed. Applications must also not access host memory which is mapped to the same physical memory as `pHostPointer`, but mapped to a different host pointer while the VkDeviceMemory handle is valid. Implementations running on general-purpose operating systems should not support importing host pointers for memory types which are not host-visible.

Note | Using host pointers to back non-host visible allocations is a platform-specific use case, and applications should not attempt to do this unless instructed by the platform.

Valid Usage

- VUID-VkImportMemoryHostPointerInfoEXT-handleType-01747
  If `handleType` is not `0`, it must be supported for import, as reported in VkExternalMemoryProperties

- VUID-VkImportMemoryHostPointerInfoEXT-handleType-01748
  If `handleType` is not `0`, it must be VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT or VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT

- VUID-VkImportMemoryHostPointerInfoEXT-pHostPointer-01749
  `pHostPointer` must be a pointer aligned to an integer multiple of `VkPhysicalDeviceExternalMemoryHostPropertiesEXT`::`minImportedHostPointerAlignment`

- VUID-VkImportMemoryHostPointerInfoEXT-handleType-01750
  If `handleType` is VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT, `pHostPointer` must be a pointer to `allocationSize` number of bytes of host memory, where `allocationSize` is the member of the `VkMemoryAllocateInfo` structure this structure is chained to

- VUID-VkImportMemoryHostPointerInfoEXT-handleType-01751
  If `handleType` is VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT, `pHostPointer` must be a pointer to `allocationSize` number of bytes of host mapped foreign memory, where `allocationSize` is the member of the `VkMemoryAllocateInfo` structure this structure is chained to

Valid Usage (Implicit)

- VUID-VkImportMemoryHostPointerInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_IMPORT_MEMORY_HOST_POINTER_INFO_EXT

- VUID-VkImportMemoryHostPointerInfoEXT-handleType-parameter
  `handleType` must be a valid VkExternalMemoryHandleTypeFlagBits value

- VUID-VkImportMemoryHostPointerInfoEXT-pHostPointer-parameter
  `pHostPointer` must be a pointer value

Structure Chaining

Extends the structure

  - VkMemoryAllocateInfo

To determine the correct parameters to use when importing host pointers, call:

    // Provided by VK_EXT_external_memory_host
    VkResult vkGetMemoryHostPointerPropertiesEXT(
        VkDevice                                    device,
        VkExternalMemoryHandleTypeFlagBits          handleType,
        const void*                                 pHostPointer,
        VkMemoryHostPointerPropertiesEXT*           pMemoryHostPointerProperties);

- `device` is the logical device that will be importing `pHostPointer`.

- `handleType` is a VkExternalMemoryHandleTypeFlagBits value specifying the type of the handle `pHostPointer`.

- `pHostPointer` is the host pointer to import from.

- `pMemoryHostPointerProperties` is a pointer to a VkMemoryHostPointerPropertiesEXT structure in which the host pointer properties are returned.

Valid Usage

- VUID-vkGetMemoryHostPointerPropertiesEXT-handleType-01752
  `handleType` must be VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT or VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT

- VUID-vkGetMemoryHostPointerPropertiesEXT-pHostPointer-01753
  `pHostPointer` must be a pointer aligned to an integer multiple of `VkPhysicalDeviceExternalMemoryHostPropertiesEXT`::`minImportedHostPointerAlignment`

- VUID-vkGetMemoryHostPointerPropertiesEXT-handleType-01754
  If `handleType` is VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT, `pHostPointer` must be a pointer to host memory

- VUID-vkGetMemoryHostPointerPropertiesEXT-handleType-01755
  If `handleType` is VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT, `pHostPointer` must be a pointer to host mapped foreign memory

Valid Usage (Implicit)

- VUID-vkGetMemoryHostPointerPropertiesEXT-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetMemoryHostPointerPropertiesEXT-handleType-parameter
  `handleType` must be a valid VkExternalMemoryHandleTypeFlagBits value

- VUID-vkGetMemoryHostPointerPropertiesEXT-pHostPointer-parameter
  `pHostPointer` must be a pointer value

- VUID-vkGetMemoryHostPointerPropertiesEXT-pMemoryHostPointerProperties-parameter
  `pMemoryHostPointerProperties` must be a valid pointer to a VkMemoryHostPointerPropertiesEXT structure

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_INVALID_EXTERNAL_HANDLE

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkMemoryHostPointerPropertiesEXT` structure is defined as:

    // Provided by VK_EXT_external_memory_host
    typedef struct VkMemoryHostPointerPropertiesEXT {
        VkStructureType    sType;
        void*              pNext;
        uint32_t           memoryTypeBits;
    } VkMemoryHostPointerPropertiesEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `memoryTypeBits` is a bitmask containing one bit set for every memory type which the specified host pointer can be imported as.

The value returned by `memoryTypeBits` should only include bits that identify memory types which are host visible. Implementations may include bits that identify memory types which are not host visible. Behavior for imported pointers of such types is defined by VkImportMemoryHostPointerInfoEXT.

Valid Usage (Implicit)

- VUID-VkMemoryHostPointerPropertiesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_MEMORY_HOST_POINTER_PROPERTIES_EXT

- VUID-VkMemoryHostPointerPropertiesEXT-pNext-pNext
  `pNext` must be `NULL`

#### 11.2.7. Android Hardware Buffer External Memory

To import memory created outside of the current Vulkan instance from an Android hardware buffer, add a `VkImportAndroidHardwareBufferInfoANDROID` structure to the `pNext` chain of the VkMemoryAllocateInfo structure. The `VkImportAndroidHardwareBufferInfoANDROID` structure is defined as:

    // Provided by VK_ANDROID_external_memory_android_hardware_buffer
    typedef struct VkImportAndroidHardwareBufferInfoANDROID {
        VkStructureType            sType;
        const void*                pNext;
        struct AHardwareBuffer*    buffer;
    } VkImportAndroidHardwareBufferInfoANDROID;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `buffer` is the Android hardware buffer to import.

If the vkAllocateMemory command succeeds, the implementation must acquire a reference to the imported hardware buffer, which it must release when the device memory object is freed. If the command fails, the implementation must not retain a reference.

Valid Usage

- VUID-VkImportAndroidHardwareBufferInfoANDROID-buffer-09863
  If `buffer` is not `NULL`, Android hardware buffers must be supported for import, as reported by VkExternalTensorPropertiesARM, VkExternalImageFormatProperties, or VkExternalBufferProperties

- VUID-VkImportAndroidHardwareBufferInfoANDROID-buffer-01881
  If `buffer` is not `NULL`, it must be a valid Android hardware buffer object with `AHardwareBuffer_Desc`::`usage` compatible with Vulkan as described in Android Hardware Buffers

Valid Usage (Implicit)

- VUID-VkImportAndroidHardwareBufferInfoANDROID-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_IMPORT_ANDROID_HARDWARE_BUFFER_INFO_ANDROID

- VUID-VkImportAndroidHardwareBufferInfoANDROID-buffer-parameter
  `buffer` must be a valid pointer to an AHardwareBuffer value

Structure Chaining

Extends the structure

  - VkMemoryAllocateInfo

To export an Android hardware buffer referencing the payload of a Vulkan device memory object, call:

    // Provided by VK_ANDROID_external_memory_android_hardware_buffer
    VkResult vkGetMemoryAndroidHardwareBufferANDROID(
        VkDevice                                    device,
        const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo,
        struct AHardwareBuffer**                    pBuffer);

- `device` is the logical device that created the device memory being exported.

- `pInfo` is a pointer to a VkMemoryGetAndroidHardwareBufferInfoANDROID structure containing parameters of the export operation.

- `pBuffer` will return an Android hardware buffer referencing the payload of the device memory object.

Each call to `vkGetMemoryAndroidHardwareBufferANDROID` must return an Android hardware buffer with a new reference acquired in addition to the reference held by the VkDeviceMemory. To avoid leaking resources, the application must release the reference by calling `AHardwareBuffer_release` when it is no longer needed. When called with the same handle in VkMemoryGetAndroidHardwareBufferInfoANDROID::`memory`, `vkGetMemoryAndroidHardwareBufferANDROID` must return the same Android hardware buffer object. If the device memory was created by importing an Android hardware buffer, `vkGetMemoryAndroidHardwareBufferANDROID` must return that same Android hardware buffer object.

Valid Usage (Implicit)

- VUID-vkGetMemoryAndroidHardwareBufferANDROID-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetMemoryAndroidHardwareBufferANDROID-pInfo-parameter
  `pInfo` must be a valid pointer to a valid VkMemoryGetAndroidHardwareBufferInfoANDROID structure

- VUID-vkGetMemoryAndroidHardwareBufferANDROID-pBuffer-parameter
  `pBuffer` must be a valid pointer to a valid pointer to an AHardwareBuffer value

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_TOO_MANY_OBJECTS

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkMemoryGetAndroidHardwareBufferInfoANDROID` structure is defined as:

    // Provided by VK_ANDROID_external_memory_android_hardware_buffer
    typedef struct VkMemoryGetAndroidHardwareBufferInfoANDROID {
        VkStructureType    sType;
        const void*        pNext;
        VkDeviceMemory     memory;
    } VkMemoryGetAndroidHardwareBufferInfoANDROID;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `memory` is the memory object from which the Android hardware buffer will be exported.

Valid Usage

- VUID-VkMemoryGetAndroidHardwareBufferInfoANDROID-handleTypes-01882
  VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID must have been included in VkExportMemoryAllocateInfo::`handleTypes` when `memory` was created

- VUID-VkMemoryGetAndroidHardwareBufferInfoANDROID-pNext-01883
  If the `pNext` chain of the VkMemoryAllocateInfo used to allocate `memory` included a VkMemoryDedicatedAllocateInfo with non-`NULL` `image` member, then that `image` must already be bound to `memory`

Valid Usage (Implicit)

- VUID-VkMemoryGetAndroidHardwareBufferInfoANDROID-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_MEMORY_GET_ANDROID_HARDWARE_BUFFER_INFO_ANDROID

- VUID-VkMemoryGetAndroidHardwareBufferInfoANDROID-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkMemoryGetAndroidHardwareBufferInfoANDROID-memory-parameter
  `memory` must be a valid VkDeviceMemory handle

To determine the memory parameters to use when importing an Android hardware buffer, call:

    // Provided by VK_ANDROID_external_memory_android_hardware_buffer
    VkResult vkGetAndroidHardwareBufferPropertiesANDROID(
        VkDevice                                    device,
        const struct AHardwareBuffer*               buffer,
        VkAndroidHardwareBufferPropertiesANDROID*   pProperties);

- `device` is the logical device that will be importing `buffer`.

- `buffer` is the Android hardware buffer which will be imported.

- `pProperties` is a pointer to a VkAndroidHardwareBufferPropertiesANDROID structure in which the properties of `buffer` are returned.

Valid Usage

- VUID-vkGetAndroidHardwareBufferPropertiesANDROID-buffer-01884
  `buffer` must be a valid Android hardware buffer object with at least one of the `AHARDWAREBUFFER_USAGE_GPU_*` flags in its `AHardwareBuffer_Desc`::`usage`

Valid Usage (Implicit)

- VUID-vkGetAndroidHardwareBufferPropertiesANDROID-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetAndroidHardwareBufferPropertiesANDROID-buffer-parameter
  `buffer` must be a valid pointer to a valid AHardwareBuffer value

- VUID-vkGetAndroidHardwareBufferPropertiesANDROID-pProperties-parameter
  `pProperties` must be a valid pointer to a VkAndroidHardwareBufferPropertiesANDROID structure

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkAndroidHardwareBufferPropertiesANDROID` structure returned is defined as:

    // Provided by VK_ANDROID_external_memory_android_hardware_buffer
    typedef struct VkAndroidHardwareBufferPropertiesANDROID {
        VkStructureType    sType;
        void*              pNext;
        VkDeviceSize       allocationSize;
        uint32_t           memoryTypeBits;
    } VkAndroidHardwareBufferPropertiesANDROID;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `allocationSize` is the size of the external memory

- `memoryTypeBits` is a bitmask containing one bit set for every memory type which the specified Android hardware buffer can be imported as.

Valid Usage (Implicit)

- VUID-VkAndroidHardwareBufferPropertiesANDROID-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_PROPERTIES_ANDROID

- VUID-VkAndroidHardwareBufferPropertiesANDROID-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkAndroidHardwareBufferFormatProperties2ANDROID, VkAndroidHardwareBufferFormatPropertiesANDROID, or VkAndroidHardwareBufferFormatResolvePropertiesANDROID

- VUID-VkAndroidHardwareBufferPropertiesANDROID-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

To obtain format properties of an Android hardware buffer, include a `VkAndroidHardwareBufferFormatPropertiesANDROID` structure in the `pNext` chain of the VkAndroidHardwareBufferPropertiesANDROID structure passed to vkGetAndroidHardwareBufferPropertiesANDROID. This structure is defined as:

    // Provided by VK_ANDROID_external_memory_android_hardware_buffer
    typedef struct VkAndroidHardwareBufferFormatPropertiesANDROID {
        VkStructureType                  sType;
        void*                            pNext;
        VkFormat                         format;
        uint64_t                         externalFormat;
        VkFormatFeatureFlags             formatFeatures;
        VkComponentMapping               samplerYcbcrConversionComponents;
        VkSamplerYcbcrModelConversion    suggestedYcbcrModel;
        VkSamplerYcbcrRange              suggestedYcbcrRange;
        VkChromaLocation                 suggestedXChromaOffset;
        VkChromaLocation                 suggestedYChromaOffset;
    } VkAndroidHardwareBufferFormatPropertiesANDROID;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `format` is the Vulkan format corresponding to the Android hardware buffer’s format, or VK_FORMAT_UNDEFINED if there is not an equivalent Vulkan format.

- `externalFormat` is an implementation-defined external format identifier for use with VkExternalFormatANDROID. It must not be zero.

- `formatFeatures` describes the capabilities of this external format when used with an image bound to memory imported from `buffer`.

- `samplerYcbcrConversionComponents` is the component swizzle that should be used in VkSamplerYcbcrConversionCreateInfo.

- `suggestedYcbcrModel` is a suggested color model to use in the VkSamplerYcbcrConversionCreateInfo.

- `suggestedYcbcrRange` is a suggested numerical value range to use in VkSamplerYcbcrConversionCreateInfo.

- `suggestedXChromaOffset` is a suggested X chroma offset to use in VkSamplerYcbcrConversionCreateInfo.

- `suggestedYChromaOffset` is a suggested Y chroma offset to use in VkSamplerYcbcrConversionCreateInfo.

If the Android hardware buffer has one of the formats listed in the Format Equivalence table, then `format` must have the equivalent Vulkan format listed in the table. Otherwise, `format` may be VK_FORMAT_UNDEFINED, indicating the Android hardware buffer can only be used with an external format.

The `formatFeatures` member must include VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT and at least one of VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT or VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT, and should include VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT and VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT.

Note | The `formatFeatures` member only indicates the features available when using an external-format image created from the Android hardware buffer. Images from Android hardware buffers with a format other than VK_FORMAT_UNDEFINED are subject to the format capabilities obtained from vkGetPhysicalDeviceFormatProperties2, and vkGetPhysicalDeviceImageFormatProperties2 with appropriate parameters. These sets of features are independent of each other, e.g. the external format will support sampler Y′CBCR conversion even if the non-external format does not, and rendering directly to the external format will not be supported even if the non-external format does support this.

Android hardware buffers with the same external format must have the same support for VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT, VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT, VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT, VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT, VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT, and VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT. in `formatFeatures`. Other format features may differ between Android hardware buffers that have the same external format. This allows applications to use the same VkSamplerYcbcrConversion object (and samplers and pipelines created from them) for any Android hardware buffers that have the same external format.

If `format` is not VK_FORMAT_UNDEFINED, then the value of `samplerYcbcrConversionComponents` must be valid when used as the `components` member of VkSamplerYcbcrConversionCreateInfo with that format. If `format` is VK_FORMAT_UNDEFINED, all members of `samplerYcbcrConversionComponents` must be the identity swizzle.

Implementations may not always be able to determine the color model, numerical range, or chroma offsets of the image contents, so the values in `VkAndroidHardwareBufferFormatPropertiesANDROID` are only suggestions. Applications should treat these values as sensible defaults to use in the absence of more reliable information obtained through some other means. If the underlying physical device is also usable via OpenGL ES with the `GL_OES_EGL_image_external` extension, the implementation should suggest values that will produce similar sampled values as would be obtained by sampling the same external image via `samplerExternalOES` in OpenGL ES using equivalent sampler parameters.

Note | Since `GL_OES_EGL_image_external` does not require the same sampling and conversion calculations as Vulkan does, achieving identical results between APIs may not be possible on some implementations.

Valid Usage (Implicit)

- VUID-VkAndroidHardwareBufferFormatPropertiesANDROID-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_FORMAT_PROPERTIES_ANDROID

Structure Chaining

Extends the structure

  - VkAndroidHardwareBufferPropertiesANDROID

The format properties of an Android hardware buffer can be obtained by including a `VkAndroidHardwareBufferFormatProperties2ANDROID` structure in the `pNext` chain of the VkAndroidHardwareBufferPropertiesANDROID structure passed to vkGetAndroidHardwareBufferPropertiesANDROID. This structure is defined as:

    // Provided by VK_ANDROID_external_memory_android_hardware_buffer with VK_KHR_format_feature_flags2 or VK_VERSION_1_3
    typedef struct VkAndroidHardwareBufferFormatProperties2ANDROID {
        VkStructureType                  sType;
        void*                            pNext;
        VkFormat                         format;
        uint64_t                         externalFormat;
        VkFormatFeatureFlags2            formatFeatures;
        VkComponentMapping               samplerYcbcrConversionComponents;
        VkSamplerYcbcrModelConversion    suggestedYcbcrModel;
        VkSamplerYcbcrRange              suggestedYcbcrRange;
        VkChromaLocation                 suggestedXChromaOffset;
        VkChromaLocation                 suggestedYChromaOffset;
    } VkAndroidHardwareBufferFormatProperties2ANDROID;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `format` is the Vulkan format corresponding to the Android hardware buffer’s format, or VK_FORMAT_UNDEFINED if there is not an equivalent Vulkan format.

- `externalFormat` is an implementation-defined external format identifier for use with VkExternalFormatANDROID. It must not be zero.

- `formatFeatures` describes the capabilities of this external format when used with an image bound to memory imported from `buffer`.

- `samplerYcbcrConversionComponents` is the component swizzle that should be used in VkSamplerYcbcrConversionCreateInfo.

- `suggestedYcbcrModel` is a suggested color model to use in the VkSamplerYcbcrConversionCreateInfo.

- `suggestedYcbcrRange` is a suggested numerical value range to use in VkSamplerYcbcrConversionCreateInfo.

- `suggestedXChromaOffset` is a suggested X chroma offset to use in VkSamplerYcbcrConversionCreateInfo.

- `suggestedYChromaOffset` is a suggested Y chroma offset to use in VkSamplerYcbcrConversionCreateInfo.

The bits reported in `formatFeatures` must include the bits reported in the corresponding fields of `VkAndroidHardwareBufferFormatPropertiesANDROID`::`formatFeatures`.

Valid Usage (Implicit)

- VUID-VkAndroidHardwareBufferFormatProperties2ANDROID-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_FORMAT_PROPERTIES_2_ANDROID

Structure Chaining

Extends the structure

  - VkAndroidHardwareBufferPropertiesANDROID

The VkAndroidHardwareBufferFormatResolvePropertiesANDROID structure is defined as:

    // Provided by VK_ANDROID_external_format_resolve
    typedef struct VkAndroidHardwareBufferFormatResolvePropertiesANDROID {
        VkStructureType    sType;
        void*              pNext;
        VkFormat           colorAttachmentFormat;
    } VkAndroidHardwareBufferFormatResolvePropertiesANDROID;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `colorAttachmentFormat` is a VkFormat specifying the format of color attachment images that must be used for color attachments when resolving to the specified external format. If the implementation supports external format resolves for the specified external format, this value will be a color format supporting the VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT in VkFormatProperties::`optimalTilingFeatures` as returned by vkGetPhysicalDeviceFormatProperties with `format` equal to `colorAttachmentFormat` If external format resolves are not supported, this value will be VK_FORMAT_UNDEFINED.

Any Android hardware buffer created with the `GRALLOC_USAGE_HW_RENDER` flag must be renderable in some way in Vulkan, either:

- VkAndroidHardwareBufferFormatPropertiesANDROID::`format` must be a format that supports VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT or VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT in VkFormatProperties::`optimalTilingFeatures`; or

- `colorAttachmentFormat` must be a format that supports VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT in VkFormatProperties::`optimalTilingFeatures`.

Valid Usage (Implicit)

- VUID-VkAndroidHardwareBufferFormatResolvePropertiesANDROID-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_FORMAT_RESOLVE_PROPERTIES_ANDROID

Structure Chaining

Extends the structure

  - VkAndroidHardwareBufferPropertiesANDROID

#### 11.2.8. Remote Device External Memory

To export an address representing the payload of a Vulkan device memory object accessible by remote devices, call:

    // Provided by VK_NV_external_memory_rdma
    VkResult vkGetMemoryRemoteAddressNV(
        VkDevice                                    device,
        const VkMemoryGetRemoteAddressInfoNV*       pMemoryGetRemoteAddressInfo,
        VkRemoteAddressNV*                          pAddress);

- `device` is the logical device that created the device memory being exported.

- `pMemoryGetRemoteAddressInfo` is a pointer to a VkMemoryGetRemoteAddressInfoNV structure containing parameters of the export operation.

- `pAddress` is a pointer to a VkRemoteAddressNV value in which an address representing the payload of the device memory object is returned.

More communication may be required between the kernel-mode drivers of the devices involved. This information is out of scope of this documentation and should be requested from the vendors of the devices.

Valid Usage (Implicit)

- VUID-vkGetMemoryRemoteAddressNV-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetMemoryRemoteAddressNV-pMemoryGetRemoteAddressInfo-parameter
  `pMemoryGetRemoteAddressInfo` must be a valid pointer to a valid VkMemoryGetRemoteAddressInfoNV structure

- VUID-vkGetMemoryRemoteAddressNV-pAddress-parameter
  `pAddress` must be a valid pointer to a VkRemoteAddressNV value

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_INVALID_EXTERNAL_HANDLE

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkMemoryGetRemoteAddressInfoNV` structure is defined as:

    // Provided by VK_NV_external_memory_rdma
    typedef struct VkMemoryGetRemoteAddressInfoNV {
        VkStructureType                       sType;
        const void*                           pNext;
        VkDeviceMemory                        memory;
        VkExternalMemoryHandleTypeFlagBits    handleType;
    } VkMemoryGetRemoteAddressInfoNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `memory` is the memory object from which the remote accessible address will be exported.

- `handleType` is the type of handle requested.

Valid Usage

- VUID-VkMemoryGetRemoteAddressInfoNV-handleType-04966
  `handleType` must have been included in VkExportMemoryAllocateInfo::`handleTypes` when `memory` was created

Valid Usage (Implicit)

- VUID-VkMemoryGetRemoteAddressInfoNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_MEMORY_GET_REMOTE_ADDRESS_INFO_NV

- VUID-VkMemoryGetRemoteAddressInfoNV-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkMemoryGetRemoteAddressInfoNV-memory-parameter
  `memory` must be a valid VkDeviceMemory handle

- VUID-VkMemoryGetRemoteAddressInfoNV-handleType-parameter
  `handleType` must be a valid VkExternalMemoryHandleTypeFlagBits value

VkRemoteAddressNV represents an address of a memory object accessible by remote devices, as returned in vkGetMemoryRemoteAddressNV::`pAddress`.

    // Provided by VK_NV_external_memory_rdma
    typedef void* VkRemoteAddressNV;

#### 11.2.9. Fuchsia External Memory

On Fuchsia, when allocating memory that may be imported from another device, process, or Vulkan instance, add a VkImportMemoryZirconHandleInfoFUCHSIA structure to the `pNext` chain of the VkMemoryAllocateInfo structure.

External memory on Fuchsia is imported and exported using VMO handles of type `zx_handle_t`. VMO handles to external memory are canonically obtained from Fuchsia’s Sysmem service or from syscalls such as `zx_vmo_create`(). VMO handles for import can also be obtained by exporting them from another Vulkan instance as described in exporting fuchsia device memory.

Importing VMO handles to the Vulkan instance transfers ownership of the handle to the instance from the application. The application must not perform any operations on the handle after successful import.

Applications can import the same underlying memory into multiple instances of Vulkan, into the same instance from which it was exported, and multiple times into a given Vulkan instance. In all cases, each import operation must create a distinct `VkDeviceMemory` object.

##### Importing Fuchsia External Memory

The `VkImportMemoryZirconHandleInfoFUCHSIA` structure is defined as:

    // Provided by VK_FUCHSIA_external_memory
    typedef struct VkImportMemoryZirconHandleInfoFUCHSIA {
        VkStructureType                       sType;
        const void*                           pNext;
        VkExternalMemoryHandleTypeFlagBits    handleType;
        zx_handle_t                           handle;
    } VkImportMemoryZirconHandleInfoFUCHSIA;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `handleType` is a VkExternalMemoryHandleTypeFlagBits value specifying the type of `handle`.

- `handle` is a `zx_handle_t` (Zircon) handle to the external memory.

Valid Usage

- VUID-VkImportMemoryZirconHandleInfoFUCHSIA-handleType-04771
  `handleType` must be VK_EXTERNAL_MEMORY_HANDLE_TYPE_ZIRCON_VMO_BIT_FUCHSIA

- VUID-VkImportMemoryZirconHandleInfoFUCHSIA-handle-04772
  `handle` must be a valid VMO handle

Valid Usage (Implicit)

- VUID-VkImportMemoryZirconHandleInfoFUCHSIA-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_IMPORT_MEMORY_ZIRCON_HANDLE_INFO_FUCHSIA

- VUID-VkImportMemoryZirconHandleInfoFUCHSIA-handleType-parameter
  If `handleType` is not `0`, `handleType` must be a valid VkExternalMemoryHandleTypeFlagBits value

Structure Chaining

Extends the structure

  - VkMemoryAllocateInfo

To obtain the memoryTypeIndex for the VkMemoryAllocateInfo structure, call `vkGetMemoryZirconHandlePropertiesFUCHSIA`:

    // Provided by VK_FUCHSIA_external_memory
    VkResult vkGetMemoryZirconHandlePropertiesFUCHSIA(
        VkDevice                                    device,
        VkExternalMemoryHandleTypeFlagBits          handleType,
        zx_handle_t                                 zirconHandle,
        VkMemoryZirconHandlePropertiesFUCHSIA*      pMemoryZirconHandleProperties);

- `device` is the VkDevice.

- `handleType` is a VkExternalMemoryHandleTypeFlagBits value specifying the type of `zirconHandle`

- `zirconHandle` is a `zx_handle_t` (Zircon) handle to the external resource.

- `pMemoryZirconHandleProperties` is a pointer to a VkMemoryZirconHandlePropertiesFUCHSIA structure in which the result will be stored.

Valid Usage

- VUID-vkGetMemoryZirconHandlePropertiesFUCHSIA-handleType-04773
  `handleType` must be VK_EXTERNAL_MEMORY_HANDLE_TYPE_ZIRCON_VMO_BIT_FUCHSIA

- VUID-vkGetMemoryZirconHandlePropertiesFUCHSIA-zirconHandle-04774
  `zirconHandle` must reference a valid VMO

Valid Usage (Implicit)

- VUID-vkGetMemoryZirconHandlePropertiesFUCHSIA-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetMemoryZirconHandlePropertiesFUCHSIA-handleType-parameter
  `handleType` must be a valid VkExternalMemoryHandleTypeFlagBits value

- VUID-vkGetMemoryZirconHandlePropertiesFUCHSIA-pMemoryZirconHandleProperties-parameter
  `pMemoryZirconHandleProperties` must be a valid pointer to a VkMemoryZirconHandlePropertiesFUCHSIA structure

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_INVALID_EXTERNAL_HANDLE

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkMemoryZirconHandlePropertiesFUCHSIA` structure is defined as:

    // Provided by VK_FUCHSIA_external_memory
    typedef struct VkMemoryZirconHandlePropertiesFUCHSIA {
        VkStructureType    sType;
        void*              pNext;
        uint32_t           memoryTypeBits;
    } VkMemoryZirconHandlePropertiesFUCHSIA;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `memoryTypeBits` a bitmask containing one bit set for every memory type which the specified handle can be imported as.

Valid Usage (Implicit)

- VUID-VkMemoryZirconHandlePropertiesFUCHSIA-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_MEMORY_ZIRCON_HANDLE_PROPERTIES_FUCHSIA

- VUID-VkMemoryZirconHandlePropertiesFUCHSIA-pNext-pNext
  `pNext` must be `NULL`

With `pMemoryZirconHandleProperties` now successfully populated by vkGetMemoryZirconHandlePropertiesFUCHSIA, assign the VkMemoryAllocateInfo memoryTypeIndex field to a memory type which has a bit set in the VkMemoryZirconHandlePropertiesFUCHSIA memoryTypeBits field.

##### Exporting Fuchsia Device Memory

Similar to importing, exporting a VMO handle from Vulkan transfers ownership of the handle from the Vulkan instance to the application. The application is responsible for closing the handle with `zx_handle_close`() when it is no longer in use.

To export device memory as a Zircon handle that can be used by another instance, device, or process, retrieve the handle to the VkDeviceMemory using the command:

    // Provided by VK_FUCHSIA_external_memory
    VkResult vkGetMemoryZirconHandleFUCHSIA(
        VkDevice                                    device,
        const VkMemoryGetZirconHandleInfoFUCHSIA*   pGetZirconHandleInfo,
        zx_handle_t*                                pZirconHandle);

- `device` is the VkDevice.

- `pGetZirconHandleInfo` is a pointer to a VkMemoryGetZirconHandleInfoFUCHSIA structure.

- `pZirconHandle` is a pointer to a `zx_handle_t` which holds the resulting Zircon handle.

Valid Usage (Implicit)

- VUID-vkGetMemoryZirconHandleFUCHSIA-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetMemoryZirconHandleFUCHSIA-pGetZirconHandleInfo-parameter
  `pGetZirconHandleInfo` must be a valid pointer to a valid VkMemoryGetZirconHandleInfoFUCHSIA structure

- VUID-vkGetMemoryZirconHandleFUCHSIA-pZirconHandle-parameter
  `pZirconHandle` must be a valid pointer to a `zx_handle_t` value

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_TOO_MANY_OBJECTS

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

`VkMemoryGetZirconHandleInfoFUCHSIA` is defined as:

    // Provided by VK_FUCHSIA_external_memory
    typedef struct VkMemoryGetZirconHandleInfoFUCHSIA {
        VkStructureType                       sType;
        const void*                           pNext;
        VkDeviceMemory                        memory;
        VkExternalMemoryHandleTypeFlagBits    handleType;
    } VkMemoryGetZirconHandleInfoFUCHSIA;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `memory` the VkDeviceMemory being exported.

- `handleType` is a VkExternalMemoryHandleTypeFlagBits value specifying the type of the handle pointed to by vkGetMemoryZirconHandleFUCHSIA::`pZirconHandle`.

Valid Usage

- VUID-VkMemoryGetZirconHandleInfoFUCHSIA-handleType-04775
  `handleType` must be VK_EXTERNAL_MEMORY_HANDLE_TYPE_ZIRCON_VMO_BIT_FUCHSIA

- VUID-VkMemoryGetZirconHandleInfoFUCHSIA-handleType-04776
  `handleType` must have been included in the `handleTypes` field of the `VkExportMemoryAllocateInfo` structure when the external memory was allocated

Valid Usage (Implicit)

- VUID-VkMemoryGetZirconHandleInfoFUCHSIA-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_MEMORY_GET_ZIRCON_HANDLE_INFO_FUCHSIA

- VUID-VkMemoryGetZirconHandleInfoFUCHSIA-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkMemoryGetZirconHandleInfoFUCHSIA-memory-parameter
  `memory` must be a valid VkDeviceMemory handle

- VUID-VkMemoryGetZirconHandleInfoFUCHSIA-handleType-parameter
  `handleType` must be a valid VkExternalMemoryHandleTypeFlagBits value

With the result `pZirconHandle` now obtained, the memory properties for the handle can be retrieved using vkGetMemoryZirconHandlePropertiesFUCHSIA as documented above substituting the dereferenced, retrieved `pZirconHandle` in for the `zirconHandle` argument.

#### 11.2.10. Metal Objects

A Vulkan implementation that is layered on top of Metal on Apple device platform, and implements the `VK_EXT_metal_objects` extension, supports the ability to import and export the underlying Metal objects associated with specific Vulkan objects.

The underlying Metal objects associated with certain Vulkan objects can be exported from those Vulkan objects using the `pNext` chain of the VkExportMetalObjectsInfoEXT parameter of the vkExportMetalObjectsEXT command.

An VkDeviceMemory object can be allocated on an existing `MTLBuffer` object, by including the `MTLBuffer` object in a VkImportMetalBufferInfoEXT structure in the `pNext` chain of the VkMemoryAllocateInfo structure in the vkAllocateMemory command.

A new VkImage object can be created on an existing `IOSurface` object, or one or more existing Metal `MTLTexture` objects, by including those Metal objects in either VkImportMetalIOSurfaceInfoEXT or VkImportMetalTextureInfoEXT structures in the `pNext` chain of the VkImageCreateInfo structure in the vkCreateImage command.

To export Metal objects from Vulkan objects, the application must first indicate the intention to do so during the creation of the Vulkan object, by including one or more VkExportMetalObjectCreateInfoEXT structures in the `pNext` chain of the VkInstanceCreateInfo, VkMemoryAllocateInfo, VkImageCreateInfo, VkImageViewCreateInfo, VkBufferViewCreateInfo, VkSemaphoreCreateInfo, or VkEventCreateInfo, in the corresponding Vulkan object creation command.

The `VkExportMetalObjectCreateInfoEXT` structure is defined as:

    // Provided by VK_EXT_metal_objects
    typedef struct VkExportMetalObjectCreateInfoEXT {
        VkStructureType                       sType;
        const void*                           pNext;
        VkExportMetalObjectTypeFlagBitsEXT    exportObjectType;
    } VkExportMetalObjectCreateInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `exportObjectType` is a VkExportMetalObjectTypeFlagBitsEXT indicating the type of Metal object that the application may request to be exported from the Vulkan object.

Valid Usage (Implicit)

- VUID-VkExportMetalObjectCreateInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_EXPORT_METAL_OBJECT_CREATE_INFO_EXT

- VUID-VkExportMetalObjectCreateInfoEXT-exportObjectType-parameter
  If `exportObjectType` is not `0`, `exportObjectType` must be a valid VkExportMetalObjectTypeFlagBitsEXT value

Structure Chaining

Extends the structures

  - VkBufferViewCreateInfo

  - VkEventCreateInfo

  - VkImageCreateInfo

  - VkImageViewCreateInfo

  - VkInstanceCreateInfo

  - VkMemoryAllocateInfo

  - VkSemaphoreCreateInfo

Bits which indicate the types of Metal objects that may be exported from a corresponding Vulkan object are:

    // Provided by VK_EXT_metal_objects
    typedef enum VkExportMetalObjectTypeFlagBitsEXT {
        VK_EXPORT_METAL_OBJECT_TYPE_METAL_DEVICE_BIT_EXT = 0x00000001,
        VK_EXPORT_METAL_OBJECT_TYPE_METAL_COMMAND_QUEUE_BIT_EXT = 0x00000002,
        VK_EXPORT_METAL_OBJECT_TYPE_METAL_BUFFER_BIT_EXT = 0x00000004,
        VK_EXPORT_METAL_OBJECT_TYPE_METAL_TEXTURE_BIT_EXT = 0x00000008,
        VK_EXPORT_METAL_OBJECT_TYPE_METAL_IOSURFACE_BIT_EXT = 0x00000010,
        VK_EXPORT_METAL_OBJECT_TYPE_METAL_SHARED_EVENT_BIT_EXT = 0x00000020,
    } VkExportMetalObjectTypeFlagBitsEXT;

- VK_EXPORT_METAL_OBJECT_TYPE_METAL_DEVICE_BIT_EXT specifies that a Metal `MTLDevice` may be exported.

- VK_EXPORT_METAL_OBJECT_TYPE_METAL_COMMAND_QUEUE_BIT_EXT specifies that a Metal `MTLCommandQueue` may be exported.

- VK_EXPORT_METAL_OBJECT_TYPE_METAL_BUFFER_BIT_EXT specifies that a Metal `MTLBuffer` may be exported.

- VK_EXPORT_METAL_OBJECT_TYPE_METAL_TEXTURE_BIT_EXT specifies that a Metal `MTLTexture` may be exported.

- VK_EXPORT_METAL_OBJECT_TYPE_METAL_IOSURFACE_BIT_EXT specifies that a Metal `IOSurface` may be exported.

- VK_EXPORT_METAL_OBJECT_TYPE_METAL_SHARED_EVENT_BIT_EXT specifies that a Metal `MTLSharedEvent` may be exported.

    // Provided by VK_EXT_metal_objects
    typedef VkFlags VkExportMetalObjectTypeFlagsEXT;

`VkExportMetalObjectTypeFlagsEXT` is a bitmask type for setting a mask of zero or more VkExportMetalObjectTypeFlagBitsEXT.

To export Metal objects that underlie Vulkan objects, call:

    // Provided by VK_EXT_metal_objects
    void vkExportMetalObjectsEXT(
        VkDevice                                    device,
        VkExportMetalObjectsInfoEXT*                pMetalObjectsInfo);

- `device` is the device that created the Vulkan objects.

- `pMetalObjectsInfo` is a pointer to a VkExportMetalObjectsInfoEXT structure whose `pNext` chain contains structures, each identifying a Vulkan object and providing a pointer through which the Metal object will be returned.

Valid Usage (Implicit)

- VUID-vkExportMetalObjectsEXT-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkExportMetalObjectsEXT-pMetalObjectsInfo-parameter
  `pMetalObjectsInfo` must be a valid pointer to a VkExportMetalObjectsInfoEXT structure

The `VkExportMetalObjectsInfoEXT` structure is defined as:

    // Provided by VK_EXT_metal_objects
    typedef struct VkExportMetalObjectsInfoEXT {
        VkStructureType    sType;
        const void*        pNext;
    } VkExportMetalObjectsInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

Valid Usage

- VUID-VkExportMetalObjectsInfoEXT-pNext-06791
  If the `pNext` chain includes a VkExportMetalDeviceInfoEXT structure, the VkInstance must have been created with VK_EXPORT_METAL_OBJECT_TYPE_METAL_DEVICE_BIT_EXT in the `exportObjectType` member of a VkExportMetalObjectCreateInfoEXT structure in the `pNext` chain of the VkInstanceCreateInfo structure in the vkCreateInstance command

- VUID-VkExportMetalObjectsInfoEXT-pNext-06792
  If the `pNext` chain includes a VkExportMetalCommandQueueInfoEXT structure, the VkInstance must have been created with VK_EXPORT_METAL_OBJECT_TYPE_METAL_COMMAND_QUEUE_BIT_EXT in the `exportObjectType` member of a VkExportMetalObjectCreateInfoEXT structure in the `pNext` chain of the VkInstanceCreateInfo structure in the vkCreateInstance command

- VUID-VkExportMetalObjectsInfoEXT-pNext-06793
  If the `pNext` chain includes a VkExportMetalBufferInfoEXT structure, the VkDeviceMemory in its `memory` member must have been allocated with VK_EXPORT_METAL_OBJECT_TYPE_METAL_BUFFER_BIT_EXT in the `exportObjectType` member of a VkExportMetalObjectCreateInfoEXT structure in the `pNext` chain of the VkMemoryAllocateInfo structure in the vkAllocateMemory command

- VUID-VkExportMetalObjectsInfoEXT-pNext-06794
  If the `pNext` chain includes a VkExportMetalTextureInfoEXT structure, exactly one of its `image`, `imageView`, or `bufferView` members must not be VK_NULL_HANDLE

- VUID-VkExportMetalObjectsInfoEXT-pNext-06795
  If the `pNext` chain includes a VkExportMetalTextureInfoEXT structure, and its `image` member is not VK_NULL_HANDLE, the VkImage in its `image` member must have been created with VK_EXPORT_METAL_OBJECT_TYPE_METAL_TEXTURE_BIT_EXT in the `exportObjectType` member of a VkExportMetalObjectCreateInfoEXT structure in the `pNext` chain of the VkImageCreateInfo structure in the vkCreateImage command

- VUID-VkExportMetalObjectsInfoEXT-pNext-06796
  If the `pNext` chain includes a VkExportMetalTextureInfoEXT structure, and its `imageView` member is not VK_NULL_HANDLE, the VkImageView in its `imageView` member must have been created with VK_EXPORT_METAL_OBJECT_TYPE_METAL_TEXTURE_BIT_EXT in the `exportObjectType` member of a VkExportMetalObjectCreateInfoEXT structure in the `pNext` chain of the VkImageViewCreateInfo structure in the vkCreateImageView command

- VUID-VkExportMetalObjectsInfoEXT-pNext-06797
  If the `pNext` chain includes a VkExportMetalTextureInfoEXT structure, and its `bufferView` member is not VK_NULL_HANDLE, the VkBufferView in its `bufferView` member must have been created with VK_EXPORT_METAL_OBJECT_TYPE_METAL_TEXTURE_BIT_EXT in the `exportObjectType` member of a VkExportMetalObjectCreateInfoEXT structure in the `pNext` chain of the VkBufferViewCreateInfo structure in the vkCreateBufferView command

- VUID-VkExportMetalObjectsInfoEXT-pNext-06798
  If the `pNext` chain includes a VkExportMetalTextureInfoEXT structure, and if either its `image` or `imageView` member is not VK_NULL_HANDLE, then `plane` must be VK_IMAGE_ASPECT_PLANE_0_BIT, VK_IMAGE_ASPECT_PLANE_1_BIT, or VK_IMAGE_ASPECT_PLANE_2_BIT

- VUID-VkExportMetalObjectsInfoEXT-pNext-06799
  If the `pNext` chain includes a VkExportMetalTextureInfoEXT structure, and if the VkImage in its `image` member does not have a multi-planar format, then its `plane` member must be VK_IMAGE_ASPECT_PLANE_0_BIT

- VUID-VkExportMetalObjectsInfoEXT-pNext-06800
  If the `pNext` chain includes a VkExportMetalTextureInfoEXT structure, and if the VkImage in its `image` member has a multi-planar format with only two planes, then its `plane` member must not be VK_IMAGE_ASPECT_PLANE_2_BIT

- VUID-VkExportMetalObjectsInfoEXT-pNext-06801
  If the `pNext` chain includes a VkExportMetalTextureInfoEXT structure, and if the VkImageView in its `imageView` member does not have a multi-planar format, then its `plane` member must be VK_IMAGE_ASPECT_PLANE_0_BIT

- VUID-VkExportMetalObjectsInfoEXT-pNext-06802
  If the `pNext` chain includes a VkExportMetalTextureInfoEXT structure, and if the VkImageView in its `imageView` member has a multi-planar format with only two planes, then its `plane` member must not be VK_IMAGE_ASPECT_PLANE_2_BIT

- VUID-VkExportMetalObjectsInfoEXT-pNext-06803
  If the `pNext` chain includes a VkExportMetalIOSurfaceInfoEXT structure, the VkImage in its `image` member must have been created with VK_EXPORT_METAL_OBJECT_TYPE_METAL_IOSURFACE_BIT_EXT in the `exportObjectType` member of a VkExportMetalObjectCreateInfoEXT structure in the `pNext` chain of the VkImageCreateInfo structure in the vkCreateImage command

- VUID-VkExportMetalObjectsInfoEXT-pNext-06804
  If the `pNext` chain includes a VkExportMetalSharedEventInfoEXT structure, exactly one of its `semaphore` or `event` members must not be VK_NULL_HANDLE

- VUID-VkExportMetalObjectsInfoEXT-pNext-06805
  If the `pNext` chain includes a VkExportMetalSharedEventInfoEXT structure, and its `semaphore` member is not VK_NULL_HANDLE, the VkSemaphore in its `semaphore` member must have been created with VK_EXPORT_METAL_OBJECT_TYPE_METAL_SHARED_EVENT_BIT_EXT in the `exportObjectType` member of a VkExportMetalObjectCreateInfoEXT structure in the `pNext` chain of the VkSemaphoreCreateInfo structure in the vkCreateSemaphore command

- VUID-VkExportMetalObjectsInfoEXT-pNext-06806
  If the `pNext` chain includes a VkExportMetalSharedEventInfoEXT structure, and its `event` member is not VK_NULL_HANDLE, the VkEvent in its `event` member must have been created with VK_EXPORT_METAL_OBJECT_TYPE_METAL_SHARED_EVENT_BIT_EXT in the `exportObjectType` member of a VkExportMetalObjectCreateInfoEXT structure in the `pNext` chain of the VkEventCreateInfo structure in the vkCreateEvent command

Valid Usage (Implicit)

- VUID-VkExportMetalObjectsInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_EXPORT_METAL_OBJECTS_INFO_EXT

- VUID-VkExportMetalObjectsInfoEXT-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkExportMetalBufferInfoEXT, VkExportMetalCommandQueueInfoEXT, VkExportMetalDeviceInfoEXT, VkExportMetalIOSurfaceInfoEXT, VkExportMetalSharedEventInfoEXT, or VkExportMetalTextureInfoEXT

- VUID-VkExportMetalObjectsInfoEXT-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique, with the exception of structures of type VkExportMetalBufferInfoEXT, VkExportMetalCommandQueueInfoEXT, VkExportMetalIOSurfaceInfoEXT, VkExportMetalSharedEventInfoEXT, or VkExportMetalTextureInfoEXT

To export the Metal `MTLDevice` object underlying the VkPhysicalDevice associated with a VkDevice object, include a `VkExportMetalDeviceInfoEXT` structure in the `pNext` chain of the `pMetalObjectsInfo` parameter of a vkExportMetalObjectsEXT call.

The `VkExportMetalDeviceInfoEXT` structure is defined as:

    // Provided by VK_EXT_metal_objects
    typedef struct VkExportMetalDeviceInfoEXT {
        VkStructureType    sType;
        const void*        pNext;
        MTLDevice_id       mtlDevice;
    } VkExportMetalDeviceInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `mtlDevice` is the Metal `id<MTLDevice>` object underlying the VkPhysicalDevice associated with the VkDevice object identified in the call. The implementation will return the `MTLDevice` in this member, or it will return `NULL` if no `MTLDevice` could be found underlying the VkPhysicalDevice object.

Valid Usage (Implicit)

- VUID-VkExportMetalDeviceInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_EXPORT_METAL_DEVICE_INFO_EXT

Structure Chaining

Extends the structure

  - VkExportMetalObjectsInfoEXT

The type `id<MTLDevice>` is defined in Apple’s Metal framework, but to remove an unnecessary compile time dependency, an incomplete type definition of MTLDevice_id is provided in the Vulkan headers:

    // Provided by VK_EXT_metal_objects
    #ifdef __OBJC__
    @protocol MTLDevice;
    typedef __unsafe_unretained id<MTLDevice> MTLDevice_id;
    #else
    typedef void* MTLDevice_id;
    #endif

To export the Metal `MTLCommandQueue` object underlying a VkQueue object, include a `VkExportMetalCommandQueueInfoEXT` structure in the `pNext` chain of the `pMetalObjectsInfo` parameter of a vkExportMetalObjectsEXT call.

The `VkExportMetalCommandQueueInfoEXT` structure is defined as:

    // Provided by VK_EXT_metal_objects
    typedef struct VkExportMetalCommandQueueInfoEXT {
        VkStructureType       sType;
        const void*           pNext;
        VkQueue               queue;
        MTLCommandQueue_id    mtlCommandQueue;
    } VkExportMetalCommandQueueInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `queue` is a VkQueue.

- `mtlCommandQueue` is the Metal `id<MTLCommandQueue>` object underlying the VkQueue object in `queue`. The implementation will return the `MTLCommandQueue` in this member, or it will return `NULL` if no `MTLCommandQueue` could be found underlying the VkQueue object.

Valid Usage (Implicit)

- VUID-VkExportMetalCommandQueueInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_EXPORT_METAL_COMMAND_QUEUE_INFO_EXT

- VUID-VkExportMetalCommandQueueInfoEXT-queue-parameter
  `queue` must be a valid VkQueue handle

Structure Chaining

Extends the structure

  - VkExportMetalObjectsInfoEXT

The type `id<MTLCommandQueue>` is defined in Apple’s Metal framework, but to remove an unnecessary compile time dependency, an incomplete type definition of MTLCommandQueue_id is provided in the Vulkan headers:

    // Provided by VK_EXT_metal_objects
    #ifdef __OBJC__
    @protocol MTLCommandQueue;
    typedef __unsafe_unretained id<MTLCommandQueue> MTLCommandQueue_id;
    #else
    typedef void* MTLCommandQueue_id;
    #endif

To export the Metal `MTLBuffer` object underlying a VkDeviceMemory object, include a `VkExportMetalBufferInfoEXT` structure in the `pNext` chain of the `pMetalObjectsInfo` parameter of a vkExportMetalObjectsEXT call.

The `VkExportMetalBufferInfoEXT` structure is defined as:

    // Provided by VK_EXT_metal_objects
    typedef struct VkExportMetalBufferInfoEXT {
        VkStructureType    sType;
        const void*        pNext;
        VkDeviceMemory     memory;
        MTLBuffer_id       mtlBuffer;
    } VkExportMetalBufferInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `memory` is a VkDeviceMemory.

- `mtlBuffer` is the Metal `id<MTLBuffer>` object underlying the VkDeviceMemory object in `memory`. The implementation will return the `MTLBuffer` in this member, or it will return `NULL` if no `MTLBuffer` could be found underlying the VkDeviceMemory object.

Valid Usage (Implicit)

- VUID-VkExportMetalBufferInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_EXPORT_METAL_BUFFER_INFO_EXT

- VUID-VkExportMetalBufferInfoEXT-memory-parameter
  `memory` must be a valid VkDeviceMemory handle

Structure Chaining

Extends the structure

  - VkExportMetalObjectsInfoEXT

To import a Metal `MTLBuffer` object to underlie a VkDeviceMemory object, include a `VkImportMetalBufferInfoEXT` structure in the `pNext` chain of the VkMemoryAllocateInfo structure in a vkAllocateMemory command.

The `VkImportMetalBufferInfoEXT` structure is defined as:

    // Provided by VK_EXT_metal_objects
    typedef struct VkImportMetalBufferInfoEXT {
        VkStructureType    sType;
        const void*        pNext;
        MTLBuffer_id       mtlBuffer;
    } VkImportMetalBufferInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `mtlBuffer` is the Metal `id<MTLBuffer>` object that is to underlie the VkDeviceMemory.

The application must ensure that the configuration of the `id<MTLBuffer>` object is compatible with the configuration of the VkDeviceMemory. Failure to do so results in undefined behavior.

Valid Usage (Implicit)

- VUID-VkImportMetalBufferInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_IMPORT_METAL_BUFFER_INFO_EXT

Structure Chaining

Extends the structure

  - VkMemoryAllocateInfo

The type `id<MTLBuffer>` is defined in Apple’s Metal framework, but to remove an unnecessary compile time dependency, an incomplete type definition of MTLBuffer_id is provided in the Vulkan headers:

    // Provided by VK_EXT_metal_objects
    #ifdef __OBJC__
    @protocol MTLBuffer;
    typedef __unsafe_unretained id<MTLBuffer> MTLBuffer_id;
    #else
    typedef void* MTLBuffer_id;
    #endif

To export a Metal `MTLTexture` object underlying a VkImage, VkImageView, or VkBufferView object, include a `VkExportMetalTextureInfoEXT` structure in the `pNext` chain of the `pMetalObjectsInfo` parameter of a vkExportMetalObjectsEXT call.

The `VkExportMetalTextureInfoEXT` structure is defined as:

    // Provided by VK_EXT_metal_objects
    typedef struct VkExportMetalTextureInfoEXT {
        VkStructureType          sType;
        const void*              pNext;
        VkImage                  image;
        VkImageView              imageView;
        VkBufferView             bufferView;
        VkImageAspectFlagBits    plane;
        MTLTexture_id            mtlTexture;
    } VkExportMetalTextureInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `image` is VK_NULL_HANDLE or a VkImage.

- `imageView` is VK_NULL_HANDLE or a VkImageView.

- `bufferView` is VK_NULL_HANDLE or a VkBufferView.

- `plane` specifies the plane of a multi-planar VkImage or VkImageView.

- `mtlTexture` is the Metal `id<MTLTexture>` object underlying the VkImage, VkImageView, or VkBufferView object in `image`, `imageView`, or `bufferView`, respectively, at the plane indicated in `aspectMask`. The implementation will return the `MTLTexture` in this member, or it will return `NULL` if no `MTLTexture` could be found underlying the VkImage, VkImageView, or VkBufferView object, at the plane indicated in `aspectMask`.

Valid Usage (Implicit)

- VUID-VkExportMetalTextureInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_EXPORT_METAL_TEXTURE_INFO_EXT

- VUID-VkExportMetalTextureInfoEXT-image-parameter
  If `image` is not VK_NULL_HANDLE, `image` must be a valid VkImage handle

- VUID-VkExportMetalTextureInfoEXT-imageView-parameter
  If `imageView` is not VK_NULL_HANDLE, `imageView` must be a valid VkImageView handle

- VUID-VkExportMetalTextureInfoEXT-bufferView-parameter
  If `bufferView` is not VK_NULL_HANDLE, `bufferView` must be a valid VkBufferView handle

- VUID-VkExportMetalTextureInfoEXT-plane-parameter
  `plane` must be a valid VkImageAspectFlagBits value

- VUID-VkExportMetalTextureInfoEXT-commonparent
  Each of `bufferView`, `image`, and `imageView` that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevice

Structure Chaining

Extends the structure

  - VkExportMetalObjectsInfoEXT

To import one or more existing Metal `MTLTexture` objects to underlie a VkImage object, include one or more `VkImportMetalTextureInfoEXT` structures in the `pNext` chain of the VkImageCreateInfo structure in a vkCreateImage command.

The `VkImportMetalTextureInfoEXT` structure is defined as:

    // Provided by VK_EXT_metal_objects
    typedef struct VkImportMetalTextureInfoEXT {
        VkStructureType          sType;
        const void*              pNext;
        VkImageAspectFlagBits    plane;
        MTLTexture_id            mtlTexture;
    } VkImportMetalTextureInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `plane` specifies the plane of the VkImage that the `id<MTLTexture>` object should be attached to.

- `mtlTexture` is a the Metal `id<MTLTexture>` object that is to underlie the VkImage plane.

The `pNext` chain must include one `VkImportMetalTextureInfoEXT` structure for each plane in the VkImage. The application must ensure that the configuration of the Metal `id<MTLTexture>` objects are compatible with the configuration of the VkImage. Failure to do so results in undefined behavior.

Note | Due to `id<MTLTexture>` already being backed by memory, images created with `VkImportMetalTextureInfoEXT` in the `pNext` of the VkImageCreateInfo will be treated as bound to a VkDeviceMemory.

Valid Usage (Implicit)

- VUID-VkImportMetalTextureInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_IMPORT_METAL_TEXTURE_INFO_EXT

- VUID-VkImportMetalTextureInfoEXT-plane-parameter
  `plane` must be a valid VkImageAspectFlagBits value

Structure Chaining

Extends the structure

  - VkImageCreateInfo

The type `id<MTLTexture>` is defined in Apple’s Metal framework, but to remove an unnecessary compile time dependency, an incomplete type definition of MTLTexture_id is provided in the Vulkan headers:

    // Provided by VK_EXT_metal_objects
    #ifdef __OBJC__
    @protocol MTLTexture;
    typedef __unsafe_unretained id<MTLTexture> MTLTexture_id;
    #else
    typedef void* MTLTexture_id;
    #endif

To export the Metal IOSurfaceRef object underlying a VkImage object, include a `VkExportMetalIOSurfaceInfoEXT` structure in the `pNext` chain of the `pMetalObjectsInfo` parameter of a vkExportMetalObjectsEXT call.

The `VkExportMetalIOSurfaceInfoEXT` structure is defined as:

    // Provided by VK_EXT_metal_objects
    typedef struct VkExportMetalIOSurfaceInfoEXT {
        VkStructureType    sType;
        const void*        pNext;
        VkImage            image;
        IOSurfaceRef       ioSurface;
    } VkExportMetalIOSurfaceInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `image` is a VkImage.

- `ioSurface` is the Metal IOSurfaceRef object underlying the VkImage object in `image`. The implementation will return the IOSurfaceRef in this member, or it will return `NULL` if no IOSurfaceRef could be found underlying the VkImage object.

Valid Usage (Implicit)

- VUID-VkExportMetalIOSurfaceInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_EXPORT_METAL_IO_SURFACE_INFO_EXT

- VUID-VkExportMetalIOSurfaceInfoEXT-image-parameter
  `image` must be a valid VkImage handle

Structure Chaining

Extends the structure

  - VkExportMetalObjectsInfoEXT

To import, or create, a Metal IOSurfaceRef object to underlie a VkImage object, include a `VkImportMetalIOSurfaceInfoEXT` structure in the `pNext` chain of the VkImageCreateInfo structure in a vkCreateImage command.

The `VkImportMetalIOSurfaceInfoEXT` structure is defined as:

    // Provided by VK_EXT_metal_objects
    typedef struct VkImportMetalIOSurfaceInfoEXT {
        VkStructureType    sType;
        const void*        pNext;
        IOSurfaceRef       ioSurface;
    } VkImportMetalIOSurfaceInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `ioSurface` is VK_NULL_HANDLE or the Metal IOSurfaceRef object that is to underlie the VkImage.

If `ioSurface` is not VK_NULL_HANDLE, it will be used to underlie the VkImage. If `ioSurface` is VK_NULL_HANDLE, the implementation will create a new `IOSurface` to underlie the VkImage.

If provided, the application must ensure that the configuration of the IOSurfaceRef object is compatible with the configuration of the VkImage. Failure to do so results in undefined behavior.

Valid Usage (Implicit)

- VUID-VkImportMetalIOSurfaceInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_IMPORT_METAL_IO_SURFACE_INFO_EXT

Structure Chaining

Extends the structure

  - VkImageCreateInfo

The type IOSurfaceRef is defined in Apple’s CoreGraphics framework, but to remove an unnecessary compile time dependency, an incomplete type definition of IOSurfaceRef is provided in the Vulkan headers:

    // Provided by VK_EXT_metal_objects
    typedef struct __IOSurface* IOSurfaceRef;

To export the Metal `MTLSharedEvent` object underlying a VkSemaphore or VkEvent object, include a `VkExportMetalSharedEventInfoEXT` structure in the `pNext` chain of the `pMetalObjectsInfo` parameter of a vkExportMetalObjectsEXT call.

The `VkExportMetalSharedEventInfoEXT` structure is defined as:

    // Provided by VK_EXT_metal_objects
    typedef struct VkExportMetalSharedEventInfoEXT {
        VkStructureType      sType;
        const void*          pNext;
        VkSemaphore          semaphore;
        VkEvent              event;
        MTLSharedEvent_id    mtlSharedEvent;
    } VkExportMetalSharedEventInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `semaphore` is VK_NULL_HANDLE or a VkSemaphore.

- `event` is VK_NULL_HANDLE or a VkEvent.

- `mtlSharedEvent` is the Metal `id<MTLSharedEvent>` object underlying the VkSemaphore or VkEvent object in `semaphore` or `event`, respectively. The implementation will return the `MTLSharedEvent` in this member, or it will return `NULL` if no `MTLSharedEvent` could be found underlying the VkSemaphore or VkEvent object.

Valid Usage (Implicit)

- VUID-VkExportMetalSharedEventInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_EXPORT_METAL_SHARED_EVENT_INFO_EXT

- VUID-VkExportMetalSharedEventInfoEXT-semaphore-parameter
  If `semaphore` is not VK_NULL_HANDLE, `semaphore` must be a valid VkSemaphore handle

- VUID-VkExportMetalSharedEventInfoEXT-event-parameter
  If `event` is not VK_NULL_HANDLE, `event` must be a valid VkEvent handle

- VUID-VkExportMetalSharedEventInfoEXT-commonparent
  Both of `event`, and `semaphore` that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevice

Structure Chaining

Extends the structure

  - VkExportMetalObjectsInfoEXT

To import a Metal `id<MTLSharedEvent>` object to underlie a VkSemaphore or VkEvent object, include a `VkImportMetalSharedEventInfoEXT` structure in the `pNext` chain of the VkSemaphoreCreateInfo or VkEventCreateInfo structure in a vkCreateSemaphore or vkCreateEvent command, respectively.

The `VkImportMetalSharedEventInfoEXT` structure is defined as:

    // Provided by VK_EXT_metal_objects
    typedef struct VkImportMetalSharedEventInfoEXT {
        VkStructureType      sType;
        const void*          pNext;
        MTLSharedEvent_id    mtlSharedEvent;
    } VkImportMetalSharedEventInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `mtlSharedEvent` is the Metal `id<MTLSharedEvent>` object that is to underlie the VkSemaphore or VkEvent.

If the `pNext` chain of the VkSemaphoreCreateInfo structure includes both `VkImportMetalSharedEventInfoEXT` and VkSemaphoreTypeCreateInfo, the `signaledValue` property of the imported `id<MTLSharedEvent>` object will be set to VkSemaphoreTypeCreateInfo::`initialValue`.

Valid Usage (Implicit)

- VUID-VkImportMetalSharedEventInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_IMPORT_METAL_SHARED_EVENT_INFO_EXT

Structure Chaining

Extends the structures

  - VkEventCreateInfo

  - VkSemaphoreCreateInfo

The type `id<MTLSharedEvent>` is defined in Apple’s Metal framework, but to remove an unnecessary compile time dependency, an incomplete type definition of MTLSharedEvent_id is provided in the Vulkan headers:

    // Provided by VK_EXT_metal_objects
    #ifdef __OBJC__
    @protocol MTLSharedEvent;
    typedef __unsafe_unretained id<MTLSharedEvent> MTLSharedEvent_id;
    #else
    typedef void* MTLSharedEvent_id;
    #endif

#### 11.2.11. QNX Screen Buffer External Memory

To import memory created outside of the current Vulkan instance from a QNX Screen buffer, add a `VkImportScreenBufferInfoQNX` structure to the `pNext` chain of the VkMemoryAllocateInfo structure. The `VkImportScreenBufferInfoQNX` structure is defined as:

    // Provided by VK_QNX_external_memory_screen_buffer
    typedef struct VkImportScreenBufferInfoQNX {
        VkStructureType           sType;
        const void*               pNext;
        struct _screen_buffer*    buffer;
    } VkImportScreenBufferInfoQNX;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `buffer` is a pointer to a `struct` `_screen_buffer`, the QNX Screen buffer to import

The implementation may not acquire a reference to the imported Screen buffer. Therefore, the application must ensure that the object referred to by `buffer` stays valid as long as the device memory to which it is imported is being used.

Valid Usage

- VUID-VkImportScreenBufferInfoQNX-buffer-08966
  If `buffer` is not `NULL`, QNX Screen Buffers must be supported for import, as reported by VkExternalImageFormatProperties or VkExternalBufferProperties

- VUID-VkImportScreenBufferInfoQNX-buffer-08967
  `buffer` is not `NULL`, it must be a pointer to valid QNX Screen buffer

Valid Usage (Implicit)

- VUID-VkImportScreenBufferInfoQNX-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_IMPORT_SCREEN_BUFFER_INFO_QNX

Structure Chaining

Extends the structure

  - VkMemoryAllocateInfo

To determine the memory parameters to use when importing a QNX Screen buffer, call:

    // Provided by VK_QNX_external_memory_screen_buffer
    VkResult vkGetScreenBufferPropertiesQNX(
        VkDevice                                    device,
        const struct _screen_buffer*                buffer,
        VkScreenBufferPropertiesQNX*                pProperties);

- `device` is the logical device that will be importing `buffer`.

- `buffer` is the QNX Screen buffer which will be imported.

- `pProperties` is a pointer to a VkScreenBufferPropertiesQNX structure in which the properties of `buffer` are returned.

Valid Usage

- VUID-vkGetScreenBufferPropertiesQNX-buffer-08968
  `buffer` must be a valid QNX Screen buffer

Valid Usage (Implicit)

- VUID-vkGetScreenBufferPropertiesQNX-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetScreenBufferPropertiesQNX-buffer-parameter
  `buffer` must be a valid pointer to a valid `_screen_buffer` value

- VUID-vkGetScreenBufferPropertiesQNX-pProperties-parameter
  `pProperties` must be a valid pointer to a VkScreenBufferPropertiesQNX structure

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkScreenBufferPropertiesQNX` structure returned is defined as:

    // Provided by VK_QNX_external_memory_screen_buffer
    typedef struct VkScreenBufferPropertiesQNX {
        VkStructureType    sType;
        void*              pNext;
        VkDeviceSize       allocationSize;
        uint32_t           memoryTypeBits;
    } VkScreenBufferPropertiesQNX;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `allocationSize` is the size of the external memory.

- `memoryTypeBits` is a bitmask containing one bit set for every memory type which the specified Screen buffer can be imported as.

Valid Usage (Implicit)

- VUID-VkScreenBufferPropertiesQNX-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SCREEN_BUFFER_PROPERTIES_QNX

- VUID-VkScreenBufferPropertiesQNX-pNext-pNext
  `pNext` must be `NULL` or a pointer to a valid instance of VkScreenBufferFormatPropertiesQNX

- VUID-VkScreenBufferPropertiesQNX-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

To obtain format properties of a QNX Screen buffer, include a `VkScreenBufferFormatPropertiesQNX` structure in the `pNext` chain of the VkScreenBufferPropertiesQNX structure passed to vkGetScreenBufferPropertiesQNX. This structure is defined as:

    // Provided by VK_QNX_external_memory_screen_buffer
    typedef struct VkScreenBufferFormatPropertiesQNX {
        VkStructureType                  sType;
        void*                            pNext;
        VkFormat                         format;
        uint64_t                         externalFormat;
        uint64_t                         screenUsage;
        VkFormatFeatureFlags             formatFeatures;
        VkComponentMapping               samplerYcbcrConversionComponents;
        VkSamplerYcbcrModelConversion    suggestedYcbcrModel;
        VkSamplerYcbcrRange              suggestedYcbcrRange;
        VkChromaLocation                 suggestedXChromaOffset;
        VkChromaLocation                 suggestedYChromaOffset;
    } VkScreenBufferFormatPropertiesQNX;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `format` is the Vulkan format corresponding to the Screen buffer’s format or VK_FORMAT_UNDEFINED if there is not an equivalent Vulkan format.

- `externalFormat` is an implementation-defined external format identifier for use with VkExternalFormatQNX. It must not be zero.

- `screenUsage` is an implementation-defined external usage identifier for the QNX Screen buffer.

- `formatFeatures` describes the capabilities of this external format when used with an image bound to memory imported from `buffer`.

- `samplerYcbcrConversionComponents` is the component swizzle that should be used in VkSamplerYcbcrConversionCreateInfo.

- `suggestedYcbcrModel` is a suggested color model to use in the VkSamplerYcbcrConversionCreateInfo.

- `suggestedYcbcrRange` is a suggested numerical value range to use in VkSamplerYcbcrConversionCreateInfo.

- `suggestedXChromaOffset` is a suggested X chroma offset to use in VkSamplerYcbcrConversionCreateInfo.

- `suggestedYChromaOffset` is a suggested Y chroma offset to use in VkSamplerYcbcrConversionCreateInfo.

If the QNX Screen buffer has one of the formats listed in the QNX Screen Format Equivalence table, then `format` must have the equivalent Vulkan format listed in the table. Otherwise, `format` may be VK_FORMAT_UNDEFINED, indicating the QNX Screen buffer can only be used with an external format. The `formatFeatures` member must include VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT and should include VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT and VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT.

Valid Usage (Implicit)

- VUID-VkScreenBufferFormatPropertiesQNX-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SCREEN_BUFFER_FORMAT_PROPERTIES_QNX

Structure Chaining

Extends the structure

  - VkScreenBufferPropertiesQNX

#### 11.2.12. Metal External Memory

To import memory from a Metal handle, add a VkImportMemoryMetalHandleInfoEXT structure to the `pNext` chain of the VkMemoryAllocateInfo structure.

The `VkImportMemoryMetalHandleInfoEXT` structure is defined as:

    // Provided by VK_EXT_external_memory_metal
    typedef struct VkImportMemoryMetalHandleInfoEXT {
        VkStructureType                       sType;
        const void*                           pNext;
        VkExternalMemoryHandleTypeFlagBits    handleType;
        void*                                 handle;
    } VkImportMemoryMetalHandleInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `handleType` is a VkExternalMemoryHandleTypeFlagBits value specifying the type of `handle` or `name`.

- `handle` is `NULL` or the external handle to import.

Importing memory object payloads from Metal handles shares the ownership of the handle to the Vulkan implementation.

Applications can import the same payload into multiple instances of Vulkan, into the same instance from which it was exported, and multiple times into a given Vulkan instance. In all cases, each import operation must create a distinct `VkDeviceMemory` object.

Valid Usage

- VUID-VkImportMemoryMetalHandleInfoEXT-handleType-10408
  If `handleType` is not `0`, it must be supported for import, as reported by VkExternalImageFormatProperties or VkExternalBufferProperties

- VUID-VkImportMemoryMetalHandleInfoEXT-handle-10409
  The memory from which `handle` was exported must have been created on the same underlying physical device as `device`

- VUID-VkImportMemoryMetalHandleInfoEXT-handleType-10410
  If `handleType` is not `0`, it must be VK_EXTERNAL_MEMORY_HANDLE_TYPE_MTLBUFFER_BIT_EXT, VK_EXTERNAL_MEMORY_HANDLE_TYPE_MTLTEXTURE_BIT_EXT or VK_EXTERNAL_MEMORY_HANDLE_TYPE_MTLHEAP_BIT_EXT

- VUID-VkImportMemoryMetalHandleInfoEXT-handleType-10411
  If `handleType` is not `0` , `handle` must be a valid non-NULL handle of the type specified by `handleType`

- VUID-VkImportMemoryMetalHandleInfoEXT-handle-10412
  `handle` must obey any requirements listed for `handleType` in external memory handle types compatibility

Valid Usage (Implicit)

- VUID-VkImportMemoryMetalHandleInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_IMPORT_MEMORY_METAL_HANDLE_INFO_EXT

- VUID-VkImportMemoryMetalHandleInfoEXT-handleType-parameter
  If `handleType` is not `0`, `handleType` must be a valid VkExternalMemoryHandleTypeFlagBits value

Structure Chaining

Extends the structure

  - VkMemoryAllocateInfo

To export a Metal handle representing the payload of a Vulkan device memory object, call:

    // Provided by VK_EXT_external_memory_metal
    VkResult vkGetMemoryMetalHandleEXT(
        VkDevice                                    device,
        const VkMemoryGetMetalHandleInfoEXT*        pGetMetalHandleInfo,
        void**                                      pHandle);

- `device` is the logical device that created the device memory being exported.

- `pGetMetalHandleInfo` is a pointer to a VkMemoryGetMetalHandleInfoEXT structure containing parameters of the export operation.

- `pHandle` will return the Metal handle representing the payload of the device memory object.

Unless the app retains the handle object returned by the call, the lifespan will be the same as the associated `VkDeviceMemory`.

Valid Usage (Implicit)

- VUID-vkGetMemoryMetalHandleEXT-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetMemoryMetalHandleEXT-pGetMetalHandleInfo-parameter
  `pGetMetalHandleInfo` must be a valid pointer to a valid VkMemoryGetMetalHandleInfoEXT structure

- VUID-vkGetMemoryMetalHandleEXT-pHandle-parameter
  `pHandle` must be a valid pointer to a pointer value

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_TOO_MANY_OBJECTS

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkMemoryGetMetalHandleInfoEXT` structure is defined as:

    // Provided by VK_EXT_external_memory_metal
    typedef struct VkMemoryGetMetalHandleInfoEXT {
        VkStructureType                       sType;
        const void*                           pNext;
        VkDeviceMemory                        memory;
        VkExternalMemoryHandleTypeFlagBits    handleType;
    } VkMemoryGetMetalHandleInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `memory` is the memory object from which the handle will be exported.

- `handleType` is a VkExternalMemoryHandleTypeFlagBits value specifying the type of handle requested.

The properties of the handle returned depend on the value of `handleType`. See VkExternalMemoryHandleTypeFlagBits for a description of the properties of the defined external memory handle types.

Valid Usage

- VUID-VkMemoryGetMetalHandleInfoEXT-memory-10413
  `memory` must have been created with a valid VkExportMemoryAllocateInfo

- VUID-VkMemoryGetMetalHandleInfoEXT-handleType-10414
  `handleType` must have been included in VkExportMemoryAllocateInfo::`handleTypes` when `memory` was created

- VUID-VkMemoryGetMetalHandleInfoEXT-handleType-10415
  `handleType` must be VK_EXTERNAL_MEMORY_HANDLE_TYPE_MTLBUFFER_BIT_EXT, VK_EXTERNAL_MEMORY_HANDLE_TYPE_MTLTEXTURE_BIT_EXT or VK_EXTERNAL_MEMORY_HANDLE_TYPE_MTLHEAP_BIT_EXT

Valid Usage (Implicit)

- VUID-VkMemoryGetMetalHandleInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_MEMORY_GET_METAL_HANDLE_INFO_EXT

- VUID-VkMemoryGetMetalHandleInfoEXT-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkMemoryGetMetalHandleInfoEXT-memory-parameter
  `memory` must be a valid VkDeviceMemory handle

- VUID-VkMemoryGetMetalHandleInfoEXT-handleType-parameter
  `handleType` must be a valid VkExternalMemoryHandleTypeFlagBits value

Metal memory handles compatible with Vulkan may also be created by non-Vulkan APIs using methods beyond the scope of this specification. To determine the correct parameters to use when importing such handles, call:

    // Provided by VK_EXT_external_memory_metal
    VkResult vkGetMemoryMetalHandlePropertiesEXT(
        VkDevice                                    device,
        VkExternalMemoryHandleTypeFlagBits          handleType,
        const void*                                 pHandle,
        VkMemoryMetalHandlePropertiesEXT*           pMemoryMetalHandleProperties);

- `device` is the logical device that will be importing `pHandle`.

- `handleType` is a VkExternalMemoryHandleTypeFlagBits value specifying the type of the handle `pHandle`.

- `pHandle` is the handle which will be imported.

- `pMemoryMetalHandleProperties` is a pointer to a VkMemoryMetalHandlePropertiesEXT structure in which properties of `pHandle` are returned.

Valid Usage

- VUID-vkGetMemoryMetalHandlePropertiesEXT-handle-10416
  `pHandle` must point to a valid id<MTLBuffer>, id<MTLTexture> or id<MTLDevice>

- VUID-vkGetMemoryMetalHandlePropertiesEXT-handleType-10417
  `handleType` must be VK_EXTERNAL_MEMORY_HANDLE_TYPE_MTLBUFFER_BIT_EXT, VK_EXTERNAL_MEMORY_HANDLE_TYPE_MTLTEXTURE_BIT_EXT or VK_EXTERNAL_MEMORY_HANDLE_TYPE_MTLHEAP_BIT_EXT

Valid Usage (Implicit)

- VUID-vkGetMemoryMetalHandlePropertiesEXT-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetMemoryMetalHandlePropertiesEXT-handleType-parameter
  `handleType` must be a valid VkExternalMemoryHandleTypeFlagBits value

- VUID-vkGetMemoryMetalHandlePropertiesEXT-pHandle-parameter
  `pHandle` must be a pointer value

- VUID-vkGetMemoryMetalHandlePropertiesEXT-pMemoryMetalHandleProperties-parameter
  `pMemoryMetalHandleProperties` must be a valid pointer to a VkMemoryMetalHandlePropertiesEXT structure

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_INVALID_EXTERNAL_HANDLE

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkMemoryMetalHandlePropertiesEXT` structure returned is defined as:

    // Provided by VK_EXT_external_memory_metal
    typedef struct VkMemoryMetalHandlePropertiesEXT {
        VkStructureType    sType;
        void*              pNext;
        uint32_t           memoryTypeBits;
    } VkMemoryMetalHandlePropertiesEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `memoryTypeBits` is a bitmask containing one bit set for every memory type which the specified Metal handle can be imported as.

Valid Usage (Implicit)

- VUID-VkMemoryMetalHandlePropertiesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_MEMORY_METAL_HANDLE_PROPERTIES_EXT

- VUID-VkMemoryMetalHandlePropertiesEXT-pNext-pNext
  `pNext` must be `NULL`

#### 11.2.13. Device Group Memory Allocations

If the `pNext` chain of VkMemoryAllocateInfo includes a `VkMemoryAllocateFlagsInfo` structure, then that structure includes flags and a device mask controlling how many instances of the memory will be allocated.

The `VkMemoryAllocateFlagsInfo` structure is defined as:

    // Provided by VK_VERSION_1_1
    typedef struct VkMemoryAllocateFlagsInfo {
        VkStructureType          sType;
        const void*              pNext;
        VkMemoryAllocateFlags    flags;
        uint32_t                 deviceMask;
    } VkMemoryAllocateFlagsInfo;

    // Provided by VK_KHR_device_group
    // Equivalent to VkMemoryAllocateFlagsInfo
    typedef VkMemoryAllocateFlagsInfo VkMemoryAllocateFlagsInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask of VkMemoryAllocateFlagBits controlling the allocation.

- `deviceMask` is a mask of physical devices in the logical device, indicating that memory must be allocated on each device in the mask, if VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT is set in `flags`.

If VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT is not set, the number of instances allocated depends on whether VK_MEMORY_HEAP_MULTI_INSTANCE_BIT is set in the memory heap. If VK_MEMORY_HEAP_MULTI_INSTANCE_BIT is set, then memory is allocated for every physical device in the logical device (as if `deviceMask` has bits set for all device indices). If VK_MEMORY_HEAP_MULTI_INSTANCE_BIT is not set, then a single instance of memory is allocated (as if `deviceMask` is set to one).

On some implementations, allocations from a multi-instance heap may consume memory on all physical devices even if the `deviceMask` excludes some devices. If VkPhysicalDeviceGroupProperties::`subsetAllocation` is VK_TRUE, then memory is only consumed for the devices in the device mask.

Note | In practice, most allocations on a multi-instance heap will be allocated across all physical devices. Unicast allocation support is an optional optimization for a minority of allocations.

Valid Usage

- VUID-VkMemoryAllocateFlagsInfo-deviceMask-00675
  If VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT is set, `deviceMask` must be a valid device mask

- VUID-VkMemoryAllocateFlagsInfo-deviceMask-00676
  If VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT is set, `deviceMask` must not be zero

- VUID-VkMemoryAllocateFlagsInfo-flags-10760
  If the allocation is performing a memory import operation, then `flags` must not contain VK_MEMORY_ALLOCATE_ZERO_INITIALIZE_BIT_EXT

- VUID-VkMemoryAllocateFlagsInfo-flags-10761
  If the allocation uses protected memory, then `flags` must not contain VK_MEMORY_ALLOCATE_ZERO_INITIALIZE_BIT_EXT

Valid Usage (Implicit)

- VUID-VkMemoryAllocateFlagsInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO

- VUID-VkMemoryAllocateFlagsInfo-flags-parameter
  `flags` must be a valid combination of VkMemoryAllocateFlagBits values

Structure Chaining

Extends the structure

  - VkMemoryAllocateInfo

Bits which can be set in VkMemoryAllocateFlagsInfo::`flags`, controlling device memory allocation, are:

    // Provided by VK_VERSION_1_1
    typedef enum VkMemoryAllocateFlagBits {
        VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT = 0x00000001,
      // Provided by VK_VERSION_1_2
        VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT = 0x00000002,
      // Provided by VK_VERSION_1_2
        VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT = 0x00000004,
      // Provided by VK_EXT_zero_initialize_device_memory
        VK_MEMORY_ALLOCATE_ZERO_INITIALIZE_BIT_EXT = 0x00000008,
      // Provided by VK_KHR_device_group
        VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT_KHR = VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT,
      // Provided by VK_KHR_buffer_device_address
        VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT_KHR = VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT,
      // Provided by VK_KHR_buffer_device_address
        VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR = VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT,
    } VkMemoryAllocateFlagBits;

    // Provided by VK_KHR_device_group
    // Equivalent to VkMemoryAllocateFlagBits
    typedef VkMemoryAllocateFlagBits VkMemoryAllocateFlagBitsKHR;

- VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT specifies that memory will be allocated for the devices in VkMemoryAllocateFlagsInfo::`deviceMask`.

- VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT specifies that the memory can be attached to a buffer object created with the VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT usage flag set.

- VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT specifies that the memory’s address can be saved and reused on a subsequent run (e.g. for trace capture and replay), see VkBufferOpaqueCaptureAddressCreateInfo for more detail. If this bit is set, VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT must also be set.

- VK_MEMORY_ALLOCATE_ZERO_INITIALIZE_BIT_EXT specifies that the memory will be zeroed automatically by the implementation before application is able to access it.

    // Provided by VK_VERSION_1_1
    typedef VkFlags VkMemoryAllocateFlags;

    // Provided by VK_KHR_device_group
    // Equivalent to VkMemoryAllocateFlags
    typedef VkMemoryAllocateFlags VkMemoryAllocateFlagsKHR;

`VkMemoryAllocateFlags` is a bitmask type for setting a mask of zero or more VkMemoryAllocateFlagBits.

#### 11.2.14. Opaque Capture Address Allocation

To request a specific device address for a memory allocation, add a VkMemoryOpaqueCaptureAddressAllocateInfo structure to the `pNext` chain of the VkMemoryAllocateInfo structure. The `VkMemoryOpaqueCaptureAddressAllocateInfo` structure is defined as:

    // Provided by VK_VERSION_1_2
    typedef struct VkMemoryOpaqueCaptureAddressAllocateInfo {
        VkStructureType    sType;
        const void*        pNext;
        uint64_t           opaqueCaptureAddress;
    } VkMemoryOpaqueCaptureAddressAllocateInfo;

    // Provided by VK_KHR_buffer_device_address
    // Equivalent to VkMemoryOpaqueCaptureAddressAllocateInfo
    typedef VkMemoryOpaqueCaptureAddressAllocateInfo VkMemoryOpaqueCaptureAddressAllocateInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `opaqueCaptureAddress` is the opaque capture address requested for the memory allocation.

If `opaqueCaptureAddress` is zero, no specific address is requested.

If `opaqueCaptureAddress` is not zero, it should be an address retrieved from vkGetDeviceMemoryOpaqueCaptureAddress on an identically created memory allocation on the same implementation.

Note | In most cases, it is expected that a non-zero `opaqueAddress` is an address retrieved from vkGetDeviceMemoryOpaqueCaptureAddress on an identically created memory allocation. If this is not the case, it is likely that VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS errors will occur. This is, however, not a strict requirement because trace capture/replay tools may need to adjust memory allocation parameters for imported memory.

If this structure is not present, it is as if `opaqueCaptureAddress` is zero.

Valid Usage (Implicit)

- VUID-VkMemoryOpaqueCaptureAddressAllocateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO

Structure Chaining

Extends the structure

  - VkMemoryAllocateInfo

#### 11.2.15. Freeing Device Memory

To free a memory object, call:

    // Provided by VK_VERSION_1_0
    void vkFreeMemory(
        VkDevice                                    device,
        VkDeviceMemory                              memory,
        const VkAllocationCallbacks*                pAllocator);

- `device` is the logical device that owns the memory.

- `memory` is the VkDeviceMemory object to be freed.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

Before freeing a memory object, an application must ensure the memory object is no longer in use by the device — for example by command buffers in the pending state. Memory can be freed whilst still bound to resources, but those resources must not be used afterwards. Freeing a memory object releases the reference it held, if any, to its payload. If there are still any bound images or buffers, the memory object’s payload may not be immediately released by the implementation, but must be released by the time all bound images and buffers have been destroyed. Once all references to a payload are released, it is returned to the heap from which it was allocated.

How memory objects are bound to Images and Buffers is described in detail in the Resource Memory Association section.

If a memory object is mapped at the time it is freed, it is implicitly unmapped.

Note | As described below, host writes are not implicitly flushed when the memory object is unmapped, but the implementation must guarantee that writes that have not been flushed do not affect any other memory.

Valid Usage

- VUID-vkFreeMemory-memory-00677
  All submitted commands that refer to `memory` (via images or buffers) must have completed execution

Valid Usage (Implicit)

- VUID-vkFreeMemory-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkFreeMemory-memory-parameter
  If `memory` is not VK_NULL_HANDLE, `memory` must be a valid VkDeviceMemory handle

- VUID-vkFreeMemory-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkFreeMemory-memory-parent
  If `memory` is a valid handle, it must have been created, allocated, or retrieved from `device`

Host Synchronization

- Host access to `memory` must be externally synchronized

#### 11.2.16. Host Access to Device Memory Objects

Memory objects created with vkAllocateMemory are not directly host accessible.

Memory objects created with the memory property VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT are considered mappable. Memory objects must be mappable in order to be successfully mapped on the host.

To retrieve a host virtual address pointer to a region of a mappable memory object, call:

    // Provided by VK_VERSION_1_0
    VkResult vkMapMemory(
        VkDevice                                    device,
        VkDeviceMemory                              memory,
        VkDeviceSize                                offset,
        VkDeviceSize                                size,
        VkMemoryMapFlags                            flags,
        void**                                      ppData);

- `device` is the logical device that owns the memory.

- `memory` is the VkDeviceMemory object to be mapped.

- `offset` is a zero-based byte offset from the beginning of the memory object.

- `size` is the size of the memory range to map, or VK_WHOLE_SIZE to map from `offset` to the end of the allocation.

- `flags` is a bitmask of VkMemoryMapFlagBits specifying additional parameters of the memory map operation.

- `ppData` is a pointer to a `void*` variable in which a host-accessible pointer to the beginning of the mapped range is returned. The value of the returned pointer minus `offset` must be aligned to VkPhysicalDeviceLimits::`minMemoryMapAlignment`.

After a successful call to `vkMapMemory` the memory object `memory` is considered to be currently host mapped.

Note | It is an application error to call `vkMapMemory` on a memory object that is already host mapped.

Note | `vkMapMemory` will fail if the implementation is unable to allocate an appropriately sized contiguous virtual address range, e.g. due to virtual address space fragmentation or platform limits. In such cases, `vkMapMemory` must return VK_ERROR_MEMORY_MAP_FAILED. The application can improve the likelihood of success by reducing the size of the mapped range and/or removing unneeded mappings using vkUnmapMemory.

`vkMapMemory` does not check whether the device memory is currently in use before returning the host-accessible pointer. The application must guarantee that any previously submitted command that writes to this range has completed before the host reads from or writes to that range, and that any previously submitted command that reads from that range has completed before the host writes to that region (see here for details on fulfilling such a guarantee). If the device memory was allocated without the VK_MEMORY_PROPERTY_HOST_COHERENT_BIT set, these guarantees must be made for an extended range: the application must round down the start of the range to the nearest multiple of VkPhysicalDeviceLimits::`nonCoherentAtomSize`, and round the end of the range up to the nearest multiple of VkPhysicalDeviceLimits::`nonCoherentAtomSize`.

While a range of device memory is host mapped, the application is responsible for synchronizing both device and host access to that memory range.

Note | It is important for the application developer to become meticulously familiar with all of the mechanisms described in the chapter on Synchronization and Cache Control as they are crucial to maintaining memory access ordering.

Calling `vkMapMemory` is equivalent to calling vkMapMemory2 with an empty `pNext` chain.

Valid Usage

- VUID-vkMapMemory-memory-00678
  `memory` must not be currently host mapped

- VUID-vkMapMemory-offset-00679
  `offset` must be less than the size of `memory`

- VUID-vkMapMemory-size-00680
  If `size` is not equal to VK_WHOLE_SIZE, `size` must be greater than `0`

- VUID-vkMapMemory-size-00681
  If `size` is not equal to VK_WHOLE_SIZE, `size` must be less than or equal to the size of the `memory` minus `offset`

- VUID-vkMapMemory-memory-00682
  `memory` must have been created with a memory type that reports VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT

- VUID-vkMapMemory-memory-00683
  `memory` must not have been allocated with multiple instances

- VUID-vkMapMemory-flags-09568
  VK_MEMORY_MAP_PLACED_BIT_EXT must not be set in `flags`

Valid Usage (Implicit)

- VUID-vkMapMemory-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkMapMemory-memory-parameter
  `memory` must be a valid VkDeviceMemory handle

- VUID-vkMapMemory-flags-parameter
  `flags` must be a valid combination of VkMemoryMapFlagBits values

- VUID-vkMapMemory-ppData-parameter
  `ppData` must be a valid pointer to a pointer value

- VUID-vkMapMemory-memory-parent
  `memory` must have been created, allocated, or retrieved from `device`

Host Synchronization

- Host access to `memory` must be externally synchronized

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_MEMORY_MAP_FAILED

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

Bits which can be set in vkMapMemory::`flags` and VkMemoryMapInfo::`flags`, specifying additional properties of a memory map, are:

    // Provided by VK_VERSION_1_0
    typedef enum VkMemoryMapFlagBits {
      // Provided by VK_EXT_map_memory_placed
        VK_MEMORY_MAP_PLACED_BIT_EXT = 0x00000001,
    } VkMemoryMapFlagBits;

- VK_MEMORY_MAP_PLACED_BIT_EXT requests that the implementation place the memory map at the virtual address specified by the application via VkMemoryMapPlacedInfoEXT::`pPlacedAddress`, replacing any existing mapping at that address. This flag must not be used with vkMapMemory as there is no way to specify the placement address.

    // Provided by VK_VERSION_1_0
    typedef VkFlags VkMemoryMapFlags;

`VkMemoryMapFlags` is a bitmask type for setting a mask of zero or more VkMemoryMapFlagBits.

To retrieve a host virtual address pointer to a region of a mappable memory object, call:

    // Provided by VK_VERSION_1_4
    VkResult vkMapMemory2(
        VkDevice                                    device,
        const VkMemoryMapInfo*                      pMemoryMapInfo,
        void**                                      ppData);

    // Provided by VK_KHR_map_memory2
    // Equivalent to vkMapMemory2
    VkResult vkMapMemory2KHR(
        VkDevice                                    device,
        const VkMemoryMapInfo*                      pMemoryMapInfo,
        void**                                      ppData);

- `device` is the logical device that owns the memory.

- `pMemoryMapInfo` is a pointer to a VkMemoryMapInfo structure describing parameters of the map.

- `ppData` is a pointer to a `void *` variable in which is returned a host-accessible pointer to the beginning of the mapped range. This pointer minus VkMemoryMapInfo::`offset` must be aligned to at least VkPhysicalDeviceLimits::`minMemoryMapAlignment`.

This function behaves identically to vkMapMemory except that it gets its parameters via an extensible structure pointer rather than directly as function arguments.

Valid Usage (Implicit)

- VUID-vkMapMemory2-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkMapMemory2-pMemoryMapInfo-parameter
  `pMemoryMapInfo` must be a valid pointer to a valid VkMemoryMapInfo structure

- VUID-vkMapMemory2-ppData-parameter
  `ppData` must be a valid pointer to a pointer value

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_MEMORY_MAP_FAILED

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkMemoryMapInfo` structure is defined as:

    // Provided by VK_VERSION_1_4
    typedef struct VkMemoryMapInfo {
        VkStructureType     sType;
        const void*         pNext;
        VkMemoryMapFlags    flags;
        VkDeviceMemory      memory;
        VkDeviceSize        offset;
        VkDeviceSize        size;
    } VkMemoryMapInfo;

    // Provided by VK_KHR_map_memory2
    // Equivalent to VkMemoryMapInfo
    typedef VkMemoryMapInfo VkMemoryMapInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask of VkMemoryMapFlagBits specifying additional parameters of the memory map operation.

- `memory` is the VkDeviceMemory object to be mapped.

- `offset` is a zero-based byte offset from the beginning of the memory object.

- `size` is the size of the memory range to map, or VK_WHOLE_SIZE to map from `offset` to the end of the allocation.

Valid Usage

- VUID-VkMemoryMapInfo-memory-07958
  `memory` must not be currently host mapped

- VUID-VkMemoryMapInfo-offset-07959
  `offset` must be less than the size of `memory`

- VUID-VkMemoryMapInfo-size-07960
  If `size` is not equal to VK_WHOLE_SIZE, `size` must be greater than `0`

- VUID-VkMemoryMapInfo-size-07961
  If `size` is not equal to VK_WHOLE_SIZE, `size` must be less than or equal to the size of the `memory` minus `offset`

- VUID-VkMemoryMapInfo-memory-07962
  `memory` must have been created with a memory type that reports VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT

- VUID-VkMemoryMapInfo-memory-07963
  `memory` must not have been allocated with multiple instances

- VUID-VkMemoryMapInfo-flags-09569
  If VK_MEMORY_MAP_PLACED_BIT_EXT is set in `flags`, the `memoryMapPlaced` feature must be enabled

- VUID-VkMemoryMapInfo-flags-09570
  If VK_MEMORY_MAP_PLACED_BIT_EXT is set in `flags`, the `pNext` chain must include a VkMemoryMapPlacedInfoEXT structure and `VkMemoryMapPlacedInfoEXT`::`pPlacedAddress` must not be `NULL`

- VUID-VkMemoryMapInfo-flags-09571
  If VK_MEMORY_MAP_PLACED_BIT_EXT is set in `flags` and the `memoryMapRangePlaced` feature is not enabled, `offset` must be zero

- VUID-VkMemoryMapInfo-flags-09572
  If VK_MEMORY_MAP_PLACED_BIT_EXT is set in `flags` and the `memoryMapRangePlaced` feature is not enabled, `size` must be VK_WHOLE_SIZE or `VkMemoryAllocateInfo`::`allocationSize`

- VUID-VkMemoryMapInfo-flags-09573
  If VK_MEMORY_MAP_PLACED_BIT_EXT is set in `flags` and the `memoryMapRangePlaced` feature is enabled, `offset` must be aligned to an integer multiple of `VkPhysicalDeviceMapMemoryPlacedPropertiesEXT`::`minPlacedMemoryMapAlignment`

- VUID-VkMemoryMapInfo-flags-09574
  If VK_MEMORY_MAP_PLACED_BIT_EXT is set in `flags` and `size` is not VK_WHOLE_SIZE, `size` must be aligned to an integer multiple of `VkPhysicalDeviceMapMemoryPlacedPropertiesEXT`::`minPlacedMemoryMapAlignment`

- VUID-VkMemoryMapInfo-flags-09651
  If VK_MEMORY_MAP_PLACED_BIT_EXT is set in `flags` and `size` is VK_WHOLE_SIZE, `VkMemoryAllocateInfo`::`allocationSize` must be aligned to an integer multiple of `VkPhysicalDeviceMapMemoryPlacedPropertiesEXT`::`minPlacedMemoryMapAlignment`

- VUID-VkMemoryMapInfo-flags-09575
  If VK_MEMORY_MAP_PLACED_BIT_EXT is set in `flags`, the memory object must not have been imported from a handle type of VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT or VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT

Valid Usage (Implicit)

- VUID-VkMemoryMapInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_MEMORY_MAP_INFO

- VUID-VkMemoryMapInfo-pNext-pNext
  `pNext` must be `NULL` or a pointer to a valid instance of VkMemoryMapPlacedInfoEXT

- VUID-VkMemoryMapInfo-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkMemoryMapInfo-flags-parameter
  `flags` must be a valid combination of VkMemoryMapFlagBits values

- VUID-VkMemoryMapInfo-memory-parameter
  `memory` must be a valid VkDeviceMemory handle

Host Synchronization

- Host access to `memory` must be externally synchronized

If VK_MEMORY_MAP_PLACED_BIT_EXT is set in `VkMemoryMapInfo`::`flags` and the `pNext` chain of VkMemoryMapInfo includes a `VkMemoryMapPlacedInfoEXT` structure, then that structure specifies the placement address of the memory map. The implementation will place the memory map at the specified address, replacing any existing maps in the specified memory range. Replacing memory maps in this way does not implicitly unmap Vulkan memory objects. Instead, the application must ensure no other Vulkan memory objects are mapped anywhere in the specified virtual address range. If successful, `ppData` will be set to the same value as `VkMemoryMapPlacedInfoEXT`::`pPlacedAddress` and `vkMapMemory2` will return VK_SUCCESS. If it cannot place the map at the requested address for any reason, the memory object is left unmapped and `vkMapMemory2` will return VK_ERROR_MEMORY_MAP_FAILED.

The `VkMemoryMapPlacedInfoEXT` structure is defined as:

    // Provided by VK_EXT_map_memory_placed
    typedef struct VkMemoryMapPlacedInfoEXT {
        VkStructureType    sType;
        const void*        pNext;
        void*              pPlacedAddress;
    } VkMemoryMapPlacedInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `pPlacedAddress` is the virtual address at which to place the address. If `VkMemoryMapInfo`::`flags` does not contain VK_MEMORY_MAP_PLACED_BIT_EXT, this value is ignored.

Valid Usage

- VUID-VkMemoryMapPlacedInfoEXT-pPlacedAddress-09577
  `pPlacedAddress` must be aligned to an integer multiple of `VkPhysicalDeviceMapMemoryPlacedPropertiesEXT`::`minPlacedMemoryMapAlignment`

- VUID-VkMemoryMapPlacedInfoEXT-pPlacedAddress-09578
  The address range specified by `pPlacedAddress` and `VkMemoryMapInfo`::`size` must not overlap any existing Vulkan memory object mapping

Valid Usage (Implicit)

- VUID-VkMemoryMapPlacedInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_MEMORY_MAP_PLACED_INFO_EXT

Structure Chaining

Extends the structure

  - VkMemoryMapInfo

Two commands are provided to enable applications to work with non-coherent memory allocations: `vkFlushMappedMemoryRanges` and `vkInvalidateMappedMemoryRanges`.

Note | If the memory object was created with the VK_MEMORY_PROPERTY_HOST_COHERENT_BIT set, `vkFlushMappedMemoryRanges` and `vkInvalidateMappedMemoryRanges` are unnecessary and may have a performance cost. However, availability and visibility operations still need to be managed on the device. See the description of host access types for more information.

Note | While memory objects imported from a handle type of VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT or VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT are inherently mapped to host address space, they are not considered to be host mapped device memory unless they are explicitly host mapped using vkMapMemory. That means flushing or invalidating host caches with respect to host accesses performed on such memory through the original host pointer specified at import time is the responsibility of the application and must be performed with appropriate synchronization primitives provided by the platform which are outside the scope of Vulkan. `vkFlushMappedMemoryRanges` and `vkInvalidateMappedMemoryRanges`, however, can still be used on such memory objects to synchronize host accesses performed through the host pointer of the host mapped device memory range returned by vkMapMemory.

After a successful call to `vkMapMemory` or `vkMapMemory2` the memory object `memory` is considered to be currently host mapped.

To flush ranges of non-coherent memory from the host caches, call:

    // Provided by VK_VERSION_1_0
    VkResult vkFlushMappedMemoryRanges(
        VkDevice                                    device,
        uint32_t                                    memoryRangeCount,
        const VkMappedMemoryRange*                  pMemoryRanges);

- `device` is the logical device that owns the memory ranges.

- `memoryRangeCount` is the length of the `pMemoryRanges` array.

- `pMemoryRanges` is a pointer to an array of VkMappedMemoryRange structures describing the memory ranges to flush.

`vkFlushMappedMemoryRanges` guarantees that host writes to the memory ranges described by `pMemoryRanges` are made available to the host memory domain, such that they can be made available to the device memory domain via memory domain operations using the VK_ACCESS_HOST_WRITE_BIT access type.

The first synchronization scope includes all host operations that happened-before it, as defined by the host memory model.

Note | Some systems allow writes that do not directly integrate with the host memory model; these have to be synchronized by the application manually. One example of this is non-temporal store instructions on x86; to ensure these happen-before submission, applications should call `_mm_sfence()`.

The second synchronization scope is empty.

The first access scope includes host writes to the specified memory ranges.

Note | When a host write to a memory location is made available in this way, each whole aligned set of `nonCoherentAtomSize` bytes that the memory location exists in will also be made available as if they were written by the host. For example, with a `nonCoherentAtomSize` of 128, if an application writes to the first byte of a memory object via a host mapping, the first 128 bytes of the memory object will be made available by this command. While the value of the following 127 bytes will be unchanged, this does count as an access for the purpose of synchronization, so care must be taken to avoid data races.

The second access scope is empty.

Unmapping non-coherent memory does not implicitly flush the host mapped memory, and host writes that have not been flushed may not ever be visible to the device. However, implementations must ensure that writes that have not been flushed do not become visible to any other memory.

Note | The above guarantee avoids a potential memory corruption in scenarios where host writes to a mapped memory object have not been flushed before the memory is unmapped (or freed), and the virtual address range is subsequently reused for a different mapping (or memory allocation).

Valid Usage (Implicit)

- VUID-vkFlushMappedMemoryRanges-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkFlushMappedMemoryRanges-pMemoryRanges-parameter
  `pMemoryRanges` must be a valid pointer to an array of `memoryRangeCount` valid VkMappedMemoryRange structures

- VUID-vkFlushMappedMemoryRanges-memoryRangeCount-arraylength
  `memoryRangeCount` must be greater than `0`

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

To invalidate ranges of non-coherent memory from the host caches, call:

    // Provided by VK_VERSION_1_0
    VkResult vkInvalidateMappedMemoryRanges(
        VkDevice                                    device,
        uint32_t                                    memoryRangeCount,
        const VkMappedMemoryRange*                  pMemoryRanges);

- `device` is the logical device that owns the memory ranges.

- `memoryRangeCount` is the length of the `pMemoryRanges` array.

- `pMemoryRanges` is a pointer to an array of VkMappedMemoryRange structures describing the memory ranges to invalidate.

`vkInvalidateMappedMemoryRanges` guarantees that device writes to the memory ranges described by `pMemoryRanges`, which have been made available to the host memory domain using the VK_ACCESS_HOST_WRITE_BIT and VK_ACCESS_HOST_READ_BIT access types, are made visible to the host. If a range of non-coherent memory is written by the host and then invalidated without first being flushed, its contents are undefined.

The first synchronization scope includes all host operations that happened-before it, as defined by the host memory model.

Note | This function does not synchronize with device operations directly - other host synchronization operations that depend on device operations such as vkWaitForFences must be executed beforehand. So for any non-coherent device write to be made visible to the host, there has to be a dependency chain along the following lines: Device write Device memory barrier including host reads in its second scope Signal on the device (e.g. a fence signal operation) Wait on the host (e.g. vkWaitForFences) vkInvalidateMappedMemoryRanges

The second synchronization scope includes all host operations that happen-after it, as defined by the host memory model.

The first access scope is empty.

The second access scope includes host reads to the specified memory ranges.

Note | When a device write to a memory location is made visible to the host in this way, each whole aligned set of `nonCoherentAtomSize` bytes that the memory location exists in will also be made visible as if they were written by the device. For example, with a `nonCoherentAtomSize` of 128, if an application writes to the first byte of a memory object on the device, the first 128 bytes of the memory object will be made visible by this command. While the value of the following 127 bytes will be unchanged, this does count as an access for the purpose of synchronization, so care must be taken to avoid data races.

Note | Mapping non-coherent memory does not implicitly invalidate that memory.

Valid Usage (Implicit)

- VUID-vkInvalidateMappedMemoryRanges-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkInvalidateMappedMemoryRanges-pMemoryRanges-parameter
  `pMemoryRanges` must be a valid pointer to an array of `memoryRangeCount` valid VkMappedMemoryRange structures

- VUID-vkInvalidateMappedMemoryRanges-memoryRangeCount-arraylength
  `memoryRangeCount` must be greater than `0`

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkMappedMemoryRange` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkMappedMemoryRange {
        VkStructureType    sType;
        const void*        pNext;
        VkDeviceMemory     memory;
        VkDeviceSize       offset;
        VkDeviceSize       size;
    } VkMappedMemoryRange;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `memory` is the memory object to which this range belongs.

- `offset` is the zero-based byte offset from the beginning of the memory object.

- `size` is either the size of range, or VK_WHOLE_SIZE to affect the range from `offset` to the end of the current mapping of the allocation.

Valid Usage

- VUID-VkMappedMemoryRange-memory-00684
  `memory` must be currently host mapped

- VUID-VkMappedMemoryRange-size-00685
  If `size` is not equal to VK_WHOLE_SIZE, `offset` and `size` must specify a range contained within the currently mapped range of `memory`

- VUID-VkMappedMemoryRange-size-00686
  If `size` is equal to VK_WHOLE_SIZE, `offset` must be within the currently mapped range of `memory`

- VUID-VkMappedMemoryRange-offset-00687
  `offset` must be a multiple of VkPhysicalDeviceLimits::`nonCoherentAtomSize`

- VUID-VkMappedMemoryRange-size-01389
  If `size` is equal to VK_WHOLE_SIZE, the end of the current mapping of `memory` must either be a multiple of VkPhysicalDeviceLimits::`nonCoherentAtomSize` bytes from the beginning of the memory object, or be equal to the end of the memory object

- VUID-VkMappedMemoryRange-size-01390
  If `size` is not equal to VK_WHOLE_SIZE, `size` must either be a multiple of VkPhysicalDeviceLimits::`nonCoherentAtomSize`, or `offset` plus `size` must equal the size of `memory`

Valid Usage (Implicit)

- VUID-VkMappedMemoryRange-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE

- VUID-VkMappedMemoryRange-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkMappedMemoryRange-memory-parameter
  `memory` must be a valid VkDeviceMemory handle

To unmap a memory object once host access to it is no longer needed by the application, call:

    // Provided by VK_VERSION_1_0
    void vkUnmapMemory(
        VkDevice                                    device,
        VkDeviceMemory                              memory);

- `device` is the logical device that owns the memory.

- `memory` is the memory object to be unmapped.

Calling `vkUnmapMemory` is equivalent to calling vkUnmapMemory2 with an empty `pNext` chain and `flags` set to zero.

Valid Usage

- VUID-vkUnmapMemory-memory-00689
  `memory` must be currently host mapped

Valid Usage (Implicit)

- VUID-vkUnmapMemory-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkUnmapMemory-memory-parameter
  `memory` must be a valid VkDeviceMemory handle

- VUID-vkUnmapMemory-memory-parent
  `memory` must have been created, allocated, or retrieved from `device`

Host Synchronization

- Host access to `memory` must be externally synchronized

To unmap a memory object once host access to it is no longer needed by the application, call:

    // Provided by VK_VERSION_1_4
    VkResult vkUnmapMemory2(
        VkDevice                                    device,
        const VkMemoryUnmapInfo*                    pMemoryUnmapInfo);

    // Provided by VK_KHR_map_memory2
    // Equivalent to vkUnmapMemory2
    VkResult vkUnmapMemory2KHR(
        VkDevice                                    device,
        const VkMemoryUnmapInfo*                    pMemoryUnmapInfo);

- `device` is the logical device that owns the memory.

- `pMemoryUnmapInfo` is a pointer to a VkMemoryUnmapInfo structure describing parameters of the unmap.

This function behaves identically to vkUnmapMemory except that it gets its parameters via an extensible structure pointer rather than directly as function arguments.

Valid Usage (Implicit)

- VUID-vkUnmapMemory2-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkUnmapMemory2-pMemoryUnmapInfo-parameter
  `pMemoryUnmapInfo` must be a valid pointer to a valid VkMemoryUnmapInfo structure

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_MEMORY_MAP_FAILED

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkMemoryUnmapInfo` structure is defined as:

    // Provided by VK_VERSION_1_4
    typedef struct VkMemoryUnmapInfo {
        VkStructureType       sType;
        const void*           pNext;
        VkMemoryUnmapFlags    flags;
        VkDeviceMemory        memory;
    } VkMemoryUnmapInfo;

    // Provided by VK_KHR_map_memory2
    // Equivalent to VkMemoryUnmapInfo
    typedef VkMemoryUnmapInfo VkMemoryUnmapInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask of VkMemoryUnmapFlagBits specifying additional parameters of the memory map operation.

- `memory` is the VkDeviceMemory object to be unmapped.

Valid Usage

- VUID-VkMemoryUnmapInfo-memory-07964
  `memory` must be currently host mapped

- VUID-VkMemoryUnmapInfo-flags-09579
  If VK_MEMORY_UNMAP_RESERVE_BIT_EXT is set in `flags`, the `memoryUnmapReserve` must be enabled

- VUID-VkMemoryUnmapInfo-flags-09580
  If VK_MEMORY_UNMAP_RESERVE_BIT_EXT is set in `flags`, the memory object must not have been imported from a handle type of VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT or VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT

Valid Usage (Implicit)

- VUID-VkMemoryUnmapInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_MEMORY_UNMAP_INFO

- VUID-VkMemoryUnmapInfo-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkMemoryUnmapInfo-flags-parameter
  `flags` must be a valid combination of VkMemoryUnmapFlagBits values

- VUID-VkMemoryUnmapInfo-memory-parameter
  `memory` must be a valid VkDeviceMemory handle

Host Synchronization

- Host access to `memory` must be externally synchronized

Bits which can be set in VkMemoryUnmapInfo::`flags`, specifying additional properties of a memory unmap, are:

    // Provided by VK_VERSION_1_4
    typedef enum VkMemoryUnmapFlagBits {
      // Provided by VK_EXT_map_memory_placed
        VK_MEMORY_UNMAP_RESERVE_BIT_EXT = 0x00000001,
    } VkMemoryUnmapFlagBits;

    // Provided by VK_KHR_map_memory2
    // Equivalent to VkMemoryUnmapFlagBits
    typedef VkMemoryUnmapFlagBits VkMemoryUnmapFlagBitsKHR;

- VK_MEMORY_UNMAP_RESERVE_BIT_EXT requests that virtual address range currently occupied by the memory map remain reserved after the vkUnmapMemory2 call completes. Future system memory map operations or calls to vkMapMemory or vkMapMemory2 will not return addresses in that range unless the range has since been unreserved by the client or the mapping is explicitly placed in that range by calling vkMapMemory2 with VK_MEMORY_MAP_PLACED_BIT_EXT, or doing the system memory map equivalent. When VK_MEMORY_UNMAP_RESERVE_BIT_EXT is set, the memory unmap operation may fail, in which case the memory object will remain host mapped and vkUnmapMemory2 will return VK_ERROR_MEMORY_MAP_FAILED.

    // Provided by VK_VERSION_1_4
    typedef VkFlags VkMemoryUnmapFlags;

    // Provided by VK_KHR_map_memory2
    // Equivalent to VkMemoryUnmapFlags
    typedef VkMemoryUnmapFlags VkMemoryUnmapFlagsKHR;

`VkMemoryUnmapFlags` is a bitmask type for setting a mask of zero or more VkMemoryUnmapFlagBits.

#### 11.2.17. Lazily Allocated Memory

If the memory object is allocated from a heap with the VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT bit set, that object’s backing memory may be provided by the implementation lazily. The actual committed size of the memory may initially be as small as zero (or as large as the requested size), and monotonically increases as additional memory is needed.

A memory type with this flag set is only allowed to be bound to a `VkImage` whose usage flags include VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT.

Note | Using lazily allocated memory objects for framebuffer attachments that are not needed once a render pass instance has completed may allow some implementations to never allocate memory for such attachments.

To determine the amount of lazily-allocated memory that is currently committed for a memory object, call:

    // Provided by VK_VERSION_1_0
    void vkGetDeviceMemoryCommitment(
        VkDevice                                    device,
        VkDeviceMemory                              memory,
        VkDeviceSize*                               pCommittedMemoryInBytes);

- `device` is the logical device that owns the memory.

- `memory` is the memory object being queried.

- `pCommittedMemoryInBytes` is a pointer to a VkDeviceSize value in which the number of bytes currently committed is returned, on success.

The implementation may update the commitment at any time, and the value returned by this query may be out of date.

The implementation guarantees to allocate any committed memory from the `heapIndex` indicated by the memory type that the memory object was created with.

Valid Usage

- VUID-vkGetDeviceMemoryCommitment-memory-00690
  `memory` must have been created with a memory type that reports VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT

Valid Usage (Implicit)

- VUID-vkGetDeviceMemoryCommitment-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetDeviceMemoryCommitment-memory-parameter
  `memory` must be a valid VkDeviceMemory handle

- VUID-vkGetDeviceMemoryCommitment-pCommittedMemoryInBytes-parameter
  `pCommittedMemoryInBytes` must be a valid pointer to a VkDeviceSize value

- VUID-vkGetDeviceMemoryCommitment-memory-parent
  `memory` must have been created, allocated, or retrieved from `device`

#### 11.2.18. Protected Memory

Protected memory divides device memory into protected device memory and unprotected device memory.

Protected memory adds the following concepts:

- Memory:

  - Unprotected device memory, which can be visible to the device and can be visible to the host

  - Protected device memory, which can be visible to the device but must not be visible to the host

- Resources:

  - Unprotected images , unprotected tensors, and unprotected buffers, to which unprotected memory can be bound

  - Protected images , protected tensors, and protected buffers, to which protected memory can be bound

- Command buffers:

  - Unprotected command buffers, which can be submitted to a device queue to execute unprotected queue operations

  - Protected command buffers, which can be submitted to a protected-capable device queue to execute protected queue operations

- Device queues:

  - Unprotected device queues, to which unprotected command buffers can be submitted

  - Protected-capable device queues, to which unprotected command buffers or protected command buffers can be submitted

- Queue submissions

  - Unprotected queue submissions, through which unprotected command buffers can be submitted

  - Protected queue submissions, through which protected command buffers can be submitted

- Queue operations

  - Unprotected queue operations

  - Protected queue operations

Note | When the `protectedMemory` feature is enabled, all pipelines may be recorded in either protected or unprotected command buffers (or both), which may incur an extra cost on some implementations. This can be mitigated by enabling the `pipelineProtectedAccess` feature, in which case pipelines created with VK_PIPELINE_CREATE_PROTECTED_ACCESS_ONLY_BIT may only be recorded in protected command buffers, and pipelines created with VK_PIPELINE_CREATE_NO_PROTECTED_ACCESS_BIT may only be recorded in unprotected command buffers.

##### Protected Memory Access Rules

If VkPhysicalDeviceProtectedMemoryProperties::`protectedNoFault` is VK_FALSE, applications must not perform any of the following operations:

- Write to unprotected memory within protected queue operations.

- Access protected memory within protected queue operations other than in framebuffer-space pipeline stages, the compute shader stage, in video decode operations, in video encode operations, or the transfer stage.

- Perform a query within protected queue operations.

If VkPhysicalDeviceProtectedMemoryProperties::`protectedNoFault` is VK_TRUE, these operations are valid, but reads will return undefined values, and writes will either be dropped or store undefined values.

Additionally, indirect operations must not be performed within protected queue operations.

Whether these operations are valid or not, or if any other invalid usage is performed, the implementation must guarantee that:

- Protected device memory must never be visible to the host.

- Values written to unprotected device memory must not be a function of values from protected memory.

#### 11.2.19. External Memory Handle Types

##### Android Hardware Buffer

Android’s NDK defines AHardwareBuffer objects, which represent device memory that is shareable across processes and that can be accessed by a variety of media APIs and the hardware used to implement them. These Android hardware buffer objects may be imported into VkDeviceMemory objects for access via Vulkan, or exported from Vulkan. An VkImage or VkBuffer or VkTensorARM can be bound to the imported or exported VkDeviceMemory object if it is created with VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID.

To remove an unnecessary compile time dependency, an incomplete type definition of AHardwareBuffer is provided in the Vulkan headers:

    // Provided by VK_ANDROID_external_memory_android_hardware_buffer
    struct AHardwareBuffer;

The actual AHardwareBuffer type is defined in Android NDK headers.

Note | The NDK format, usage, and size/dimensions of an AHardwareBuffer object can be obtained with the `AHardwareBuffer_describe` function. While Android hardware buffers can be imported to or exported from Vulkan without using that function, valid usage and implementation behavior is defined in terms of the `AHardwareBuffer_Desc` properties it returns.

Android hardware buffer objects are reference-counted using Android NDK functions outside of the scope of this specification. A VkDeviceMemory imported from an Android hardware buffer or that can be exported to an Android hardware buffer must acquire a reference to its AHardwareBuffer object, and must release this reference when the device memory is freed. During the host execution of a Vulkan command that has an Android hardware buffer as a parameter (including indirect parameters via `pNext` chains), the application must not decrement the Android hardware buffer’s reference count to zero.

Android hardware buffers can be mapped and unmapped for CPU access using the NDK functions. These lock and unlock APIs are considered to acquire and release ownership of the Android hardware buffer, and applications must follow the rules described in External Resource Sharing to transfer ownership between the Vulkan instance and these native APIs.

Android hardware buffers can be shared with external APIs and Vulkan instances on the same device, and also with foreign devices. When transferring ownership of the Android hardware buffer, the external and foreign special queue families described in Queue Family Ownership Transfer are not identical. All APIs which produce or consume Android hardware buffers are considered to use foreign devices, except OpenGL ES contexts and Vulkan logical devices that have matching device and driver UUIDs. Implementations may treat a transfer to or from the foreign queue family as if it were a transfer to or from the external queue family when the Android hardware buffer’s usage only permits it to be used on the same physical device.

###### Android Hardware Buffer Optimal Usages

Vulkan buffer and image usage flags do not correspond exactly to Android hardware buffer usage flags. When allocating Android hardware buffers with non-Vulkan APIs, if any `AHARDWAREBUFFER_USAGE_GPU_*` usage bits are included, by default the allocator must allocate the memory in such a way that it supports Vulkan usages and creation flags in the usage equivalence table which do not have Android hardware buffer equivalents.

An VkAndroidHardwareBufferUsageANDROID structure can be included in the `pNext` chain of a VkImageFormatProperties2 structure passed to vkGetPhysicalDeviceImageFormatProperties2 to obtain optimal Android hardware buffer usage flags for specific Vulkan resource creation parameters. Some usage flags returned by these commands are required based on the input parameters, but additional vendor-specific usage flags (`AHARDWAREBUFFER_USAGE_VENDOR_*`) may also be returned. Any Android hardware buffer allocated with these vendor-specific usage flags and imported to Vulkan must only be bound to resources created with parameters that are a subset of the parameters used to obtain the Android hardware buffer usage, since the memory may have been allocated in a way incompatible with other parameters. If an Android hardware buffer is successfully allocated with additional non-vendor-specific usage flags in addition to the recommended usage, it must support being used in the same ways as an Android hardware buffer allocated with only the recommended usage, and also in ways indicated by the additional usage.

###### Android Hardware Buffer External Formats

Android hardware buffers may represent images using implementation-specific formats, layouts, color models, etc., which do not have Vulkan equivalents. Such external formats are commonly used by external image sources such as video decoders or cameras. Vulkan can import Android hardware buffers that have external formats, but since the image contents are in a possibly proprietary representation, images with external formats must have optimal tiling, and their use is restricted. Images with external formats must only be sampled with a sampler that has Y′CBCR conversion enabled.

Images that will be backed by an Android hardware buffer can use an external format by setting VkImageCreateInfo::`format` to VK_FORMAT_UNDEFINED and including a VkExternalFormatANDROID structure in the `pNext` chain. Images can be created with an external format even if the Android hardware buffer has a format which has an equivalent Vulkan format to enable consistent handling of images from sources that might use either category of format. However, all images created with an external format are subject to the valid usage requirements associated with external formats, even if the Android hardware buffer’s format has a Vulkan equivalent. The external format of an Android hardware buffer can be obtained by passing a VkAndroidHardwareBufferFormatPropertiesANDROID structure to vkGetAndroidHardwareBufferPropertiesANDROID.

###### Android Hardware Buffer Image Resources

Android hardware buffers have intrinsic width, height, format, and usage properties, so Vulkan images bound to memory imported from an Android hardware buffer must use dedicated allocations: `VkMemoryDedicatedRequirements`::`requiresDedicatedAllocation` must be VK_TRUE for images created with VkExternalMemoryImageCreateInfo::`handleTypes` that includes VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID. When creating an image that will be bound to an imported Android hardware buffer, the image creation parameters must be equivalent to the AHardwareBuffer properties as described by the valid usage of VkMemoryAllocateInfo. Similarly, device memory allocated for a dedicated image must not be exported to an Android hardware buffer until it has been bound to that image, and the implementation must return an Android hardware buffer with properties derived from the image:

- The `width` and `height` members of `AHardwareBuffer_Desc` must be the same as the `width` and `height` members of VkImageCreateInfo::`extent`, respectively.

- The `layers` member of `AHardwareBuffer_Desc` must be the same as the `arrayLayers` member of VkImageCreateInfo.

- The `format` member of `AHardwareBuffer_Desc` must be equivalent to VkImageCreateInfo::`format` as defined by AHardwareBuffer Format Equivalence.

- The `usage` member of `AHardwareBuffer_Desc` must include bits corresponding to bits included in VkImageCreateInfo::`usage` and VkImageCreateInfo::`flags` where such a correspondence exists according to AHardwareBuffer Usage Equivalence. It may also include additional usage bits, including vendor-specific usages. Presence of vendor usage bits may make the Android hardware buffer only usable in ways indicated by the image creation parameters, even when used outside Vulkan, in a similar way that allocating the Android hardware buffer with usage returned in VkAndroidHardwareBufferUsageANDROID does.

Implementations may support fewer combinations of image creation parameters for images with Android hardware buffer external handle type than for non-external images. Support for a given set of parameters can be determined by passing VkExternalImageFormatProperties to vkGetPhysicalDeviceImageFormatProperties2 with `handleType` set to VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID. Any Android hardware buffer successfully allocated outside Vulkan with usage that includes `AHARDWAREBUFFER_USAGE_GPU_*` must be supported when using equivalent Vulkan image parameters. If a given choice of image parameters are supported for import, they can also be used to create an image and memory that will be exported to an Android hardware buffer.

Table 13. AHardwareBuffer Format Equivalence
AHardwareBuffer Format | Vulkan Format
--- | ---
`AHARDWAREBUFFER_FORMAT_R8G8B8A8_UNORM` | VK_FORMAT_R8G8B8A8_UNORM
`AHARDWAREBUFFER_FORMAT_R8G8B8X8_UNORM` 1 | VK_FORMAT_R8G8B8A8_UNORM
`AHARDWAREBUFFER_FORMAT_R8G8B8_UNORM` | VK_FORMAT_R8G8B8_UNORM
`AHARDWAREBUFFER_FORMAT_R5G6B5_UNORM` | VK_FORMAT_R5G6B5_UNORM_PACK16
`AHARDWAREBUFFER_FORMAT_R16G16B16A16_FLOAT` | VK_FORMAT_R16G16B16A16_SFLOAT
`AHARDWAREBUFFER_FORMAT_R10G10B10A2_UNORM` | VK_FORMAT_A2B10G10R10_UNORM_PACK32
`AHARDWAREBUFFER_FORMAT_D16_UNORM` | VK_FORMAT_D16_UNORM
`AHARDWAREBUFFER_FORMAT_D24_UNORM` | VK_FORMAT_X8_D24_UNORM_PACK32
`AHARDWAREBUFFER_FORMAT_D24_UNORM_S8_UINT` | VK_FORMAT_D24_UNORM_S8_UINT
`AHARDWAREBUFFER_FORMAT_D32_FLOAT` | VK_FORMAT_D32_SFLOAT
`AHARDWAREBUFFER_FORMAT_D32_FLOAT_S8_UINT` | VK_FORMAT_D32_SFLOAT_S8_UINT
`AHARDWAREBUFFER_FORMAT_S8_UINT` | VK_FORMAT_S8_UINT

Table 14. AHardwareBuffer Usage Equivalence
AHardwareBuffer Usage | Vulkan Usage or Creation Flag
--- | ---
None | VK_IMAGE_USAGE_TRANSFER_SRC_BIT
None | VK_IMAGE_USAGE_TRANSFER_DST_BIT
`AHARDWAREBUFFER_USAGE_GPU_SAMPLED_IMAGE` | VK_IMAGE_USAGE_SAMPLED_BIT
`AHARDWAREBUFFER_USAGE_GPU_SAMPLED_IMAGE` | VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT
`AHARDWAREBUFFER_USAGE_GPU_FRAMEBUFFER` 3 | VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT
`AHARDWAREBUFFER_USAGE_GPU_FRAMEBUFFER` 3 | VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT
`AHARDWAREBUFFER_USAGE_GPU_CUBE_MAP` | VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT
`AHARDWAREBUFFER_USAGE_GPU_MIPMAP_COMPLETE` | None 2
`AHARDWAREBUFFER_USAGE_PROTECTED_CONTENT` | VK_IMAGE_CREATE_PROTECTED_BIT
None | VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT
None | VK_IMAGE_CREATE_EXTENDED_USAGE_BIT
`AHARDWAREBUFFER_USAGE_GPU_DATA_BUFFER` 4 | VK_IMAGE_USAGE_STORAGE_BIT

1

  Vulkan does not differentiate between `AHARDWAREBUFFER_FORMAT_R8G8B8A8_UNORM` and `AHARDWAREBUFFER_FORMAT_R8G8B8X8_UNORM`: they both behave as VK_FORMAT_R8G8B8A8_UNORM. After an external entity writes to a `AHARDWAREBUFFER_FORMAT_R8G8B8X8_UNORM` Android hardware buffer, the values read by Vulkan from the X/A component are undefined. To emulate the traditional behavior of the X component during sampling or blending, applications should use VK_COMPONENT_SWIZZLE_ONE in image view component mappings and VK_BLEND_FACTOR_ONE in color blend factors. There is no way to avoid copying these undefined values when copying from such an image to another image or buffer.

2

  The `AHARDWAREBUFFER_USAGE_GPU_MIPMAP_COMPLETE` flag does not correspond to a Vulkan image usage or creation flag. Instead, its presence indicates that the Android hardware buffer contains a complete mipmap chain, and its absence indicates that the Android hardware buffer contains only a single mip level.

3

  Only image usages valid for the format are valid. It would be invalid to take a Android Hardware Buffer with a format of `AHARDWAREBUFFER_FORMAT_R8G8B8A8_UNORM` that has a `AHARDWAREBUFFER_USAGE_GPU_FRAMEBUFFER` usage and try to create an image with VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT.

4

  In combination with a hardware buffer format other than `BLOB`.

Note | When using VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT with Android hardware buffer images, applications should use VkImageFormatListCreateInfo to inform the implementation which view formats will be used with the image. For some common sets of format, this allows some implementations to provide significantly better performance when accessing the image via Vulkan.

###### Android Hardware Buffer Resources

Android hardware buffers with a format of `AHARDWAREBUFFER_FORMAT_BLOB` and usage that includes `AHARDWAREBUFFER_USAGE_GPU_DATA_BUFFER` can be used as the backing store for VkBuffer objects. Such Android hardware buffers have a size in bytes specified by their `width`; `height` and `layers` are both `1`.

Unlike images, buffer resources backed by Android hardware buffers do not require dedicated allocations.

Exported AHardwareBuffer objects that do not have dedicated images must have a format of `AHARDWAREBUFFER_FORMAT_BLOB`, usage must include `AHARDWAREBUFFER_USAGE_GPU_DATA_BUFFER`, `width` must equal the device memory allocation size, and `height` and `layers` must be `1`.

##### QNX Screen Buffer

The QNX SDP defines `_screen_buffer` objects, which represent a buffer that the QNX Screen graphics subsystem can use directly in its windowing system APIs. More specifically, a Screen buffer is an area of memory that stores pixel data. It can be attached to Screen windows, streams, or pixmaps. These QNX Screen buffer objects may be imported into VkDeviceMemory objects for access via Vulkan. An VkImage or VkBuffer can be bound to the imported VkDeviceMemory object if it is created with VK_EXTERNAL_MEMORY_HANDLE_TYPE_SCREEN_BUFFER_BIT_QNX.

`struct` `_screen_buffer` is strongly typed, so naming the handle type is redundant. The internal layout and therefore size of a `struct` `_screen_buffer` image may depend on native usage flags that do not have corresponding Vulkan counterparts.

###### QNX Screen Buffer Validity

The design of Screen in the QNX SDP makes it difficult to determine the validity of objects from outside of Screen. Therefore, applications must ensure that QNX Screen buffer objects provided used in various Vulkan interfaces are ones created explicitly with QNX Screen APIs. See QNX SDP documentation for more information.

A VkDeviceMemory imported from a QNX Screen buffer has no way to acquire a reference to its `_screen_buffer` object. Therefore, during the host execution of a Vulkan command that has a QNX Screen buffer as a parameter (including indirect parameters via `pNext` chains), the application must ensure that the QNX Screen buffer resource remains valid.

Generally, for a `_screen_buffer` object to be valid for use within a Vulkan implementation, the buffer object should have a `_screen_buffer`::`SCREEN_PROPERTY_USAGE` that includes at least one of: `SCREEN_USAGE_VULKAN`, `SCREEN_USAGE_OPENGL_ES2`, `SCREEN_USAGE_OPENGL_ES3`, or `SCREEN_USAGE_NATIVE`. The exact Screen-native usage flags required depends on the Vulkan implementation, and QNX Screen itself will not necessarily enforce these requirements. Note that Screen-native usage flags are in no way related to usage flags in the Vulkan specification.

###### QNX Screen Buffer External Formats

QNX Screen buffers may represent images using implementation-specific formats, layouts, color models, etc., which do not have Vulkan equivalents. Such external formats are commonly used by external image sources such as video decoders or cameras. Vulkan can import QNX Screen buffers that have external formats, but since the image contents are in an undiscoverable and possibly proprietary representation, images with external formats must only be used as sampled images, must only be sampled with a sampler that has Y′CBCR conversion enabled, and must have optimal tiling.

Images that will be backed by a QNX Screen buffer can use an external format by setting VkImageCreateInfo::`format` to VK_FORMAT_UNDEFINED and including a VkExternalFormatQNX structure in the `pNext` chain. Images can be created with an external format even if the QNX Screen buffer has a format which has an equivalent Vulkan format to enable consistent handling of images from sources that might use either category of format. The external format of a QNX Screen buffer can be obtained by passing a VkScreenBufferFormatPropertiesQNX structure to vkGetScreenBufferPropertiesQNX.

###### QNX Screen Buffer Image Resources

QNX Screen buffers have intrinsic width, height, format, and usage properties, so Vulkan images bound to memory imported from a QNX Screen buffer must use dedicated allocations: `VkMemoryDedicatedRequirements`::`requiresDedicatedAllocation` must be VK_TRUE for images created with VkExternalMemoryImageCreateInfo::`handleTypes` that includes VK_EXTERNAL_MEMORY_HANDLE_TYPE_SCREEN_BUFFER_BIT_QNX. When creating an image that will be bound to an imported QNX Screen buffer, the image creation parameters must be equivalent to the `_screen_buffer` properties as described by the valid usage of VkMemoryAllocateInfo.

Table 15. QNX Screen Buffer Format Equivalence
QNX Screen Format | Vulkan Format
--- | ---
`SCREEN_FORMAT_RGBA8888` | VK_FORMAT_B8G8R8A8_UNORM
`SCREEN_FORMAT_RGBX8888` 1 | VK_FORMAT_B8G8R8A8_UNORM
`SCREEN_FORMAT_BGRA8888` | VK_FORMAT_R8G8B8A8_UNORM
`SCREEN_FORMAT_BGRX8888` 1 | VK_FORMAT_R8G8B8A8_UNORM
`SCREEN_FORMAT_RGBA1010102` | VK_FORMAT_A2R10G10B10_UNORM_PACK32
`SCREEN_FORMAT_RGBX1010102` 1 | VK_FORMAT_A2R10G10B10_UNORM_PACK32
`SCREEN_FORMAT_BGRA1010102` | VK_FORMAT_A2B10G10R10_UNORM_PACK32
`SCREEN_FORMAT_BGRX1010102` 1 | VK_FORMAT_A2B10G10R10_UNORM_PACK32
`SCREEN_FORMAT_RGBA5551` | VK_FORMAT_A1R5G5B5_UNORM_PACK16
`SCREEN_FORMAT_RGBX5551` 1 | VK_FORMAT_A1R5G5B5_UNORM_PACK16
`SCREEN_FORMAT_RGB565` | VK_FORMAT_R5G6B5_UNORM_PACK16
`SCREEN_FORMAT_RGB888` | VK_FORMAT_R8G8B8_UNORM

1

  Vulkan does not differentiate between `SCREEN_FORMAT_RGBA8888` and `SCREEN_FORMAT_RGBX8888`: they both behave as VK_FORMAT_R8G8B8A8_UNORM. After an external entity writes to a `SCREEN_FORMAT_RGBX8888` QNX Screen buffer, the values read by Vulkan from the X/A component are undefined. To emulate the traditional behavior of the X component during sampling or blending, applications should use VK_COMPONENT_SWIZZLE_ONE in image view component mappings and VK_BLEND_FACTOR_ONE in color blend factors. There is no way to avoid copying these undefined values when copying from such an image to another image or buffer. The same behavior applies to the following pairs: `SCREEN_FORMAT_BGRA8888` and `SCREEN_FORMAT_BGRX8888`, `SCREEN_FORMAT_RGBA1010102` and `SCREEN_FORMAT_RGBX1010102`, `SCREEN_FORMAT_BGRA1010102` and `SCREEN_FORMAT_BGRX1010102`, `SCREEN_FORMAT_RGBA5551` and `SCREEN_FORMAT_RGBX5551`

#### 11.2.20. Peer Memory Features

Peer memory is memory that is allocated for a given physical device and then bound to a resource and accessed by a different physical device, in a logical device that represents multiple physical devices. Some ways of reading and writing peer memory may not be supported by a device.

To determine how peer memory can be accessed, call:

    // Provided by VK_VERSION_1_1
    void vkGetDeviceGroupPeerMemoryFeatures(
        VkDevice                                    device,
        uint32_t                                    heapIndex,
        uint32_t                                    localDeviceIndex,
        uint32_t                                    remoteDeviceIndex,
        VkPeerMemoryFeatureFlags*                   pPeerMemoryFeatures);

    // Provided by VK_KHR_device_group
    // Equivalent to vkGetDeviceGroupPeerMemoryFeatures
    void vkGetDeviceGroupPeerMemoryFeaturesKHR(
        VkDevice                                    device,
        uint32_t                                    heapIndex,
        uint32_t                                    localDeviceIndex,
        uint32_t                                    remoteDeviceIndex,
        VkPeerMemoryFeatureFlags*                   pPeerMemoryFeatures);

- `device` is the logical device that owns the memory.

- `heapIndex` is the index of the memory heap from which the memory is allocated.

- `localDeviceIndex` is the device index of the physical device that performs the memory access.

- `remoteDeviceIndex` is the device index of the physical device that the memory is allocated for.

- `pPeerMemoryFeatures` is a pointer to a VkPeerMemoryFeatureFlags bitmask indicating which types of memory accesses are supported for the combination of heap, local, and remote devices.

Valid Usage

- VUID-vkGetDeviceGroupPeerMemoryFeatures-heapIndex-00691
  `heapIndex` must be less than `memoryHeapCount`

- VUID-vkGetDeviceGroupPeerMemoryFeatures-localDeviceIndex-00692
  `localDeviceIndex` must be a valid device index

- VUID-vkGetDeviceGroupPeerMemoryFeatures-remoteDeviceIndex-00693
  `remoteDeviceIndex` must be a valid device index

- VUID-vkGetDeviceGroupPeerMemoryFeatures-localDeviceIndex-00694
  `localDeviceIndex` must not equal `remoteDeviceIndex`

Valid Usage (Implicit)

- VUID-vkGetDeviceGroupPeerMemoryFeatures-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetDeviceGroupPeerMemoryFeatures-pPeerMemoryFeatures-parameter
  `pPeerMemoryFeatures` must be a valid pointer to a VkPeerMemoryFeatureFlags value

Bits which may be set in vkGetDeviceGroupPeerMemoryFeatures::`pPeerMemoryFeatures`, indicating supported peer memory features, are:

    // Provided by VK_VERSION_1_1
    typedef enum VkPeerMemoryFeatureFlagBits {
        VK_PEER_MEMORY_FEATURE_COPY_SRC_BIT = 0x00000001,
        VK_PEER_MEMORY_FEATURE_COPY_DST_BIT = 0x00000002,
        VK_PEER_MEMORY_FEATURE_GENERIC_SRC_BIT = 0x00000004,
        VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT = 0x00000008,
      // Provided by VK_KHR_device_group
        VK_PEER_MEMORY_FEATURE_COPY_SRC_BIT_KHR = VK_PEER_MEMORY_FEATURE_COPY_SRC_BIT,
      // Provided by VK_KHR_device_group
        VK_PEER_MEMORY_FEATURE_COPY_DST_BIT_KHR = VK_PEER_MEMORY_FEATURE_COPY_DST_BIT,
      // Provided by VK_KHR_device_group
        VK_PEER_MEMORY_FEATURE_GENERIC_SRC_BIT_KHR = VK_PEER_MEMORY_FEATURE_GENERIC_SRC_BIT,
      // Provided by VK_KHR_device_group
        VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT_KHR = VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT,
    } VkPeerMemoryFeatureFlagBits;

    // Provided by VK_KHR_device_group
    // Equivalent to VkPeerMemoryFeatureFlagBits
    typedef VkPeerMemoryFeatureFlagBits VkPeerMemoryFeatureFlagBitsKHR;

- VK_PEER_MEMORY_FEATURE_COPY_SRC_BIT specifies that the memory can be accessed as the source of any `vkCmdCopy*` command.

- VK_PEER_MEMORY_FEATURE_COPY_DST_BIT specifies that the memory can be accessed as the destination of any `vkCmdCopy*` command.

- VK_PEER_MEMORY_FEATURE_GENERIC_SRC_BIT specifies that the memory can be read as any memory access type.

- VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT specifies that the memory can be written as any memory access type. Shader atomics are considered to be writes.

Note | The peer memory features of a memory heap also apply to any accesses that may be performed during image layout transitions.

VK_PEER_MEMORY_FEATURE_COPY_DST_BIT must be supported for all host local heaps and for at least one device-local memory heap.

If a device does not support a peer memory feature, it is still valid to use a resource that includes both local and peer memory bindings with the corresponding access type as long as only the local bindings are actually accessed. For example, an application doing split-frame rendering would use framebuffer attachments that include both local and peer memory bindings, but would scissor the rendering to only update local memory.

    // Provided by VK_VERSION_1_1
    typedef VkFlags VkPeerMemoryFeatureFlags;

    // Provided by VK_KHR_device_group
    // Equivalent to VkPeerMemoryFeatureFlags
    typedef VkPeerMemoryFeatureFlags VkPeerMemoryFeatureFlagsKHR;

`VkPeerMemoryFeatureFlags` is a bitmask type for setting a mask of zero or more VkPeerMemoryFeatureFlagBits.

#### 11.2.21. Opaque Capture Address Query

To query a 64-bit opaque capture address value from a memory object, call:

    // Provided by VK_VERSION_1_2
    uint64_t vkGetDeviceMemoryOpaqueCaptureAddress(
        VkDevice                                    device,
        const VkDeviceMemoryOpaqueCaptureAddressInfo* pInfo);

    // Provided by VK_KHR_buffer_device_address
    // Equivalent to vkGetDeviceMemoryOpaqueCaptureAddress
    uint64_t vkGetDeviceMemoryOpaqueCaptureAddressKHR(
        VkDevice                                    device,
        const VkDeviceMemoryOpaqueCaptureAddressInfo* pInfo);

- `device` is the logical device that the memory object was allocated on.

- `pInfo` is a pointer to a VkDeviceMemoryOpaqueCaptureAddressInfo structure specifying the memory object to retrieve an address for.

The 64-bit return value is an opaque address representing the start of `pInfo->memory`.

If the memory object was allocated with a non-zero value of VkMemoryOpaqueCaptureAddressAllocateInfo::`opaqueCaptureAddress`, the return value must be the same address.

Note | The expected usage for these opaque addresses is only for trace capture/replay tools to store these addresses in a trace and subsequently specify them during replay.

Valid Usage

- VUID-vkGetDeviceMemoryOpaqueCaptureAddress-None-03334
  The `bufferDeviceAddress` and `bufferDeviceAddressCaptureReplay` features must be enabled

- VUID-vkGetDeviceMemoryOpaqueCaptureAddress-pInfo-10727
  `pInfo->memory` must have been allocated using the VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT flag

- VUID-vkGetDeviceMemoryOpaqueCaptureAddress-device-03335
  If `device` was created with multiple physical devices, then the `bufferDeviceAddressMultiDevice` feature must be enabled

Valid Usage (Implicit)

- VUID-vkGetDeviceMemoryOpaqueCaptureAddress-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetDeviceMemoryOpaqueCaptureAddress-pInfo-parameter
  `pInfo` must be a valid pointer to a valid VkDeviceMemoryOpaqueCaptureAddressInfo structure

The `VkDeviceMemoryOpaqueCaptureAddressInfo` structure is defined as:

    // Provided by VK_VERSION_1_2
    typedef struct VkDeviceMemoryOpaqueCaptureAddressInfo {
        VkStructureType    sType;
        const void*        pNext;
        VkDeviceMemory     memory;
    } VkDeviceMemoryOpaqueCaptureAddressInfo;

    // Provided by VK_KHR_buffer_device_address
    // Equivalent to VkDeviceMemoryOpaqueCaptureAddressInfo
    typedef VkDeviceMemoryOpaqueCaptureAddressInfo VkDeviceMemoryOpaqueCaptureAddressInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `memory` specifies the memory whose address is being queried.

Valid Usage

- VUID-VkDeviceMemoryOpaqueCaptureAddressInfo-memory-03336
  `memory` must have been allocated with VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT

Valid Usage (Implicit)

- VUID-VkDeviceMemoryOpaqueCaptureAddressInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DEVICE_MEMORY_OPAQUE_CAPTURE_ADDRESS_INFO

- VUID-VkDeviceMemoryOpaqueCaptureAddressInfo-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkDeviceMemoryOpaqueCaptureAddressInfo-memory-parameter
  `memory` must be a valid VkDeviceMemory handle

## 12. Resource Creation

Vulkan supports three primary resource types: buffers, images, and tensors. Resources are views of memory with associated formatting and dimensionality. Buffers provide access to raw arrays of bytes, whereas images can be multidimensional and may have associated metadata. Tensors can be multidimensional, contain format information like images and may have associated metadata.

Other resource types, such as acceleration structures and micromaps use buffers as the backing store for opaque data structures.

### 12.1. Buffers

Buffers represent linear arrays of data which are used for various purposes by binding them to a graphics or compute pipeline via descriptor sets or certain commands, or by directly specifying them as parameters to certain commands.

Buffers are represented by `VkBuffer` handles:

    // Provided by VK_VERSION_1_0
    VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkBuffer)

To create buffers, call:

    // Provided by VK_VERSION_1_0
    VkResult vkCreateBuffer(
        VkDevice                                    device,
        const VkBufferCreateInfo*                   pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkBuffer*                                   pBuffer);

- `device` is the logical device that creates the buffer object.

- `pCreateInfo` is a pointer to a VkBufferCreateInfo structure containing parameters affecting creation of the buffer.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

- `pBuffer` is a pointer to a VkBuffer handle in which the resulting buffer object is returned.

Implementations may fail to create a buffer if the effective usage includes the VK_BUFFER_USAGE_2_DESCRIPTOR_HEAP_BIT_EXT flag, and `size` is greater than the maximum of `maxResourceHeapSize` and `maxSamplerHeapSize`. If this happens, VK_ERROR_OUT_OF_DEVICE_MEMORY will be returned.

Note | This is an issue identified with VK_EXT_descriptor_heap, which we plan to tighten up for the KHR version. Applications using VK_EXT_descriptor_heap may wish to avoid suballocating heaps from the same buffer, instead creating one buffer per heap, to avoid situations where this causes issues.

Valid Usage

- VUID-vkCreateBuffer-device-09664
  `device` must support at least one queue family with one of the VK_QUEUE_VIDEO_ENCODE_BIT_KHR, VK_QUEUE_VIDEO_DECODE_BIT_KHR, VK_QUEUE_SPARSE_BINDING_BIT, VK_QUEUE_TRANSFER_BIT, VK_QUEUE_COMPUTE_BIT, or VK_QUEUE_GRAPHICS_BIT capabilities

- VUID-vkCreateBuffer-flags-00911
  If the `flags` member of `pCreateInfo` includes VK_BUFFER_CREATE_SPARSE_BINDING_BIT, and the `extendedSparseAddressSpace` feature is not enabled, creating this `VkBuffer` must not cause the total required sparse memory for all currently valid sparse resources on the device to exceed `VkPhysicalDeviceLimits`::`sparseAddressSpaceSize`

- VUID-vkCreateBuffer-flags-09383
  If the `flags` member of `pCreateInfo` includes VK_BUFFER_CREATE_SPARSE_BINDING_BIT, the `extendedSparseAddressSpace` feature is enabled, and the `usage` member of `pCreateInfo` contains bits not in `VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV`::`extendedSparseBufferUsageFlags`, creating this `VkBuffer` must not cause the total required sparse memory for all currently valid sparse resources on the device, excluding `VkBuffer` created with `usage` member of `pCreateInfo` containing bits in `VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV`::`extendedSparseBufferUsageFlags` and `VkImage` created with `usage` member of `pCreateInfo` containing bits in `VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV`::`extendedSparseImageUsageFlags`, to exceed `VkPhysicalDeviceLimits`::`sparseAddressSpaceSize`

- VUID-vkCreateBuffer-flags-09384
  If the `flags` member of `pCreateInfo` includes VK_BUFFER_CREATE_SPARSE_BINDING_BIT and the `extendedSparseAddressSpace` feature is enabled, creating this `VkBuffer` must not cause the total required sparse memory for all currently valid sparse resources on the device to exceed `VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV`::`extendedSparseAddressSpaceSize`

- VUID-vkCreateBuffer-pNext-06387
  If using the VkBuffer for an import operation from a VkBufferCollectionFUCHSIA where a VkBufferCollectionBufferCreateInfoFUCHSIA has been chained to `pNext`, `pCreateInfo` must match the VkBufferConstraintsInfoFUCHSIA::`createInfo` used when setting the constraints on the buffer collection with vkSetBufferCollectionBufferConstraintsFUCHSIA

Valid Usage (Implicit)

- VUID-vkCreateBuffer-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkCreateBuffer-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkBufferCreateInfo structure

- VUID-vkCreateBuffer-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateBuffer-pBuffer-parameter
  `pBuffer` must be a valid pointer to a VkBuffer handle

- VUID-vkCreateBuffer-device-queuecount
  The device must have been created with at least `1` queue

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkBufferCreateInfo` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkBufferCreateInfo {
        VkStructureType        sType;
        const void*            pNext;
        VkBufferCreateFlags    flags;
        VkDeviceSize           size;
        VkBufferUsageFlags     usage;
        VkSharingMode          sharingMode;
        uint32_t               queueFamilyIndexCount;
        const uint32_t*        pQueueFamilyIndices;
    } VkBufferCreateInfo;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask of VkBufferCreateFlagBits specifying additional parameters of the buffer.

- `size` is the size in bytes of the buffer to be created.

- `usage` is a bitmask of VkBufferUsageFlagBits specifying allowed usages of the buffer.

- `sharingMode` is a VkSharingMode value specifying the sharing mode of the buffer when it will be accessed by multiple queue families.

- `queueFamilyIndexCount` is the number of entries in the `pQueueFamilyIndices` array.

- `pQueueFamilyIndices` is a pointer to an array of queue families that will access this buffer. It is ignored if `sharingMode` is not VK_SHARING_MODE_CONCURRENT.

`usage` defines the effective usage flags for the buffer. If the `pNext` chain includes a VkBufferUsageFlags2CreateInfo structure, `usage` is ignored, and the effective usage flags are defined by VkBufferUsageFlags2CreateInfo::`usage`.

Valid Usage

- VUID-VkBufferCreateInfo-None-09499
  If the `pNext` chain does not include a VkBufferUsageFlags2CreateInfo structure, `usage` must be a valid combination of VkBufferUsageFlagBits values

- VUID-VkBufferCreateInfo-None-09500
  If the `pNext` chain does not include a VkBufferUsageFlags2CreateInfo structure, `usage` must not be 0

- VUID-VkBufferCreateInfo-size-00912
  `size` must be greater than `0`

- VUID-VkBufferCreateInfo-sharingMode-00913
  If `sharingMode` is VK_SHARING_MODE_CONCURRENT, `pQueueFamilyIndices` must be a valid pointer to an array of `queueFamilyIndexCount` `uint32_t` values

- VUID-VkBufferCreateInfo-maintenance11-13353
  If the `maintenance11` feature is enabled and `sharingMode` is VK_SHARING_MODE_CONCURRENT, then `queueFamilyIndexCount` must be greater than `0`

- VUID-VkBufferCreateInfo-sharingMode-00914
  If the `maintenance11` feature is not enabled and `sharingMode` is VK_SHARING_MODE_CONCURRENT, then `queueFamilyIndexCount` must be greater than `1`

- VUID-VkBufferCreateInfo-sharingMode-01419
  If `sharingMode` is VK_SHARING_MODE_CONCURRENT, each element of `pQueueFamilyIndices` must be unique and must be less than `pQueueFamilyPropertyCount` returned by either vkGetPhysicalDeviceQueueFamilyProperties2 or vkGetPhysicalDeviceQueueFamilyProperties for the `physicalDevice` that was used to create `device`

- VUID-VkBufferCreateInfo-flags-00915
  If the `sparseBinding` feature is not enabled, `flags` must not contain VK_BUFFER_CREATE_SPARSE_BINDING_BIT

- VUID-VkBufferCreateInfo-flags-00916
  If the `sparseResidencyBuffer` feature is not enabled, `flags` must not contain VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT

- VUID-VkBufferCreateInfo-flags-00917
  If the `sparseResidencyAliased` feature is not enabled, `flags` must not contain VK_BUFFER_CREATE_SPARSE_ALIASED_BIT

- VUID-VkBufferCreateInfo-flags-00918
  If `flags` contains VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT or VK_BUFFER_CREATE_SPARSE_ALIASED_BIT, it must also contain VK_BUFFER_CREATE_SPARSE_BINDING_BIT

- VUID-VkBufferCreateInfo-pNext-00920
  If the `pNext` chain includes a VkExternalMemoryBufferCreateInfo structure, its `handleTypes` member must only contain bits that are also in VkExternalBufferProperties::`externalMemoryProperties.compatibleHandleTypes`, as returned by vkGetPhysicalDeviceExternalBufferProperties with `pExternalBufferInfo->handleType` equal to any one of the handle types specified in VkExternalMemoryBufferCreateInfo::`handleTypes`

- VUID-VkBufferCreateInfo-flags-01887
  If the `protectedMemory` feature is not enabled, `flags` must not contain VK_BUFFER_CREATE_PROTECTED_BIT

- VUID-VkBufferCreateInfo-None-01888
  If any of the bits VK_BUFFER_CREATE_SPARSE_BINDING_BIT, VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT, or VK_BUFFER_CREATE_SPARSE_ALIASED_BIT are set, VK_BUFFER_CREATE_PROTECTED_BIT must not also be set

- VUID-VkBufferCreateInfo-pNext-01571
  If the `pNext` chain includes a VkDedicatedAllocationBufferCreateInfoNV structure, and the `dedicatedAllocation` member of the chained structure is VK_TRUE, then `flags` must not include VK_BUFFER_CREATE_SPARSE_BINDING_BIT, VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT, or VK_BUFFER_CREATE_SPARSE_ALIASED_BIT

- VUID-VkBufferCreateInfo-deviceAddress-02604
  If VkBufferDeviceAddressCreateInfoEXT::`deviceAddress` is not zero, `flags` must include VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT

- VUID-VkBufferCreateInfo-opaqueCaptureAddress-03337
  If VkBufferOpaqueCaptureAddressCreateInfo::`opaqueCaptureAddress` is not zero, `flags` must include VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT

- VUID-VkBufferCreateInfo-flags-03338
  If `flags` includes VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT, the VkPhysicalDeviceBufferDeviceAddressFeaturesEXT::`bufferDeviceAddressCaptureReplay` feature or the `bufferDeviceAddressCaptureReplay` feature must be enabled

- VUID-VkBufferCreateInfo-usage-04813
  If `usage` includes VK_BUFFER_USAGE_VIDEO_DECODE_SRC_BIT_KHR or VK_BUFFER_USAGE_VIDEO_DECODE_DST_BIT_KHR, and `flags` does not include VK_BUFFER_CREATE_VIDEO_PROFILE_INDEPENDENT_BIT_KHR, then the `pNext` chain must include a VkVideoProfileListInfoKHR structure with `profileCount` greater than `0` and `pProfiles` including at least one VkVideoProfileInfoKHR structure with a `videoCodecOperation` member specifying a decode operation

- VUID-VkBufferCreateInfo-usage-04814
  If `usage` includes VK_BUFFER_USAGE_VIDEO_ENCODE_SRC_BIT_KHR or VK_BUFFER_USAGE_VIDEO_ENCODE_DST_BIT_KHR, and `flags` does not include VK_BUFFER_CREATE_VIDEO_PROFILE_INDEPENDENT_BIT_KHR, then the `pNext` chain must include a VkVideoProfileListInfoKHR structure with `profileCount` greater than `0` and `pProfiles` including at least one VkVideoProfileInfoKHR structure with a `videoCodecOperation` member specifying an encode operation

- VUID-VkBufferCreateInfo-flags-08325
  If `flags` includes VK_BUFFER_CREATE_VIDEO_PROFILE_INDEPENDENT_BIT_KHR, then `videoMaintenance1` must be enabled

- VUID-VkBufferCreateInfo-pNext-10783
  If the `pNext` chain includes a VkVideoProfileListInfoKHR structure and for any element of its `pProfiles` member `videoCodecOperation` is VK_VIDEO_CODEC_OPERATION_DECODE_VP9_BIT_KHR, then the `videoDecodeVP9` feature must be enabled

- VUID-VkBufferCreateInfo-pNext-10249
  If the `pNext` chain includes a VkVideoProfileListInfoKHR structure and for any element of its `pProfiles` member `videoCodecOperation` is VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR, then the `videoEncodeAV1` feature must be enabled

- VUID-VkBufferCreateInfo-pNext-10919
  If the `pNext` chain includes a VkVideoEncodeProfileRgbConversionInfoVALVE structure, then the `videoEncodeRgbConversion` feature must be enabled

- VUID-VkBufferCreateInfo-size-06409
  `size` must be less than or equal to VkPhysicalDeviceMaintenance4Properties::`maxBufferSize`

- VUID-VkBufferCreateInfo-usage-08097
  If `usage` includes VK_BUFFER_USAGE_SAMPLER_DESCRIPTOR_BUFFER_BIT_EXT, creating this `VkBuffer` must not cause the total required space for all currently valid buffers using this flag on the device to exceed VkPhysicalDeviceDescriptorBufferPropertiesEXT::`samplerDescriptorBufferAddressSpaceSize` or VkPhysicalDeviceDescriptorBufferPropertiesEXT::`descriptorBufferAddressSpaceSize`

- VUID-VkBufferCreateInfo-usage-08098
  If `usage` includes VK_BUFFER_USAGE_RESOURCE_DESCRIPTOR_BUFFER_BIT_EXT, creating this `VkBuffer` must not cause the total required space for all currently valid buffers using this flag on the device to exceed VkPhysicalDeviceDescriptorBufferPropertiesEXT::`resourceDescriptorBufferAddressSpaceSize` or VkPhysicalDeviceDescriptorBufferPropertiesEXT::`descriptorBufferAddressSpaceSize`

- VUID-VkBufferCreateInfo-flags-08099
  If `flags` includes VK_BUFFER_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT, the `descriptorBufferCaptureReplay` feature must be enabled

- VUID-VkBufferCreateInfo-pNext-08100
  If the `pNext` chain includes a VkOpaqueCaptureDescriptorDataCreateInfoEXT structure, `flags` must contain VK_BUFFER_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT

- VUID-VkBufferCreateInfo-usage-08101
  If `usage` includes VK_BUFFER_USAGE_PUSH_DESCRIPTORS_DESCRIPTOR_BUFFER_BIT_EXT, the `descriptorBufferPushDescriptors` feature must be enabled

- VUID-VkBufferCreateInfo-usage-08102
  If `usage` includes VK_BUFFER_USAGE_PUSH_DESCRIPTORS_DESCRIPTOR_BUFFER_BIT_EXT `VkPhysicalDeviceDescriptorBufferPropertiesEXT`::`bufferlessPushDescriptors` must be VK_FALSE

- VUID-VkBufferCreateInfo-usage-08103
  If `usage` includes VK_BUFFER_USAGE_PUSH_DESCRIPTORS_DESCRIPTOR_BUFFER_BIT_EXT, `usage` must contain at least one of VK_BUFFER_USAGE_RESOURCE_DESCRIPTOR_BUFFER_BIT_EXT or VK_BUFFER_USAGE_SAMPLER_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-VkBufferCreateInfo-tileMemoryHeap-10762
  If the `tileMemoryHeap` feature is not enabled, `usage` must not include VK_BUFFER_USAGE_TILE_MEMORY_BIT_QCOM

- VUID-VkBufferCreateInfo-usage-10763
  If `usage` includes VK_BUFFER_USAGE_TILE_MEMORY_BIT_QCOM, then `flags` must not contain any of the VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT, VK_BUFFER_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT, VK_BUFFER_CREATE_VIDEO_PROFILE_INDEPENDENT_BIT_KHR, VK_BUFFER_CREATE_SPARSE_BINDING_BIT, VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT, VK_BUFFER_CREATE_SPARSE_ALIASED_BIT, or VK_BUFFER_CREATE_PROTECTED_BIT flags

- VUID-VkBufferCreateInfo-usage-10764
  If `usage` includes VK_BUFFER_USAGE_TILE_MEMORY_BIT_QCOM, then only the following `usages` may be set:

  - VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT

  - VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT

  - VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT

  - VK_BUFFER_USAGE_STORAGE_BUFFER_BIT

  - VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT

  - and if VkPhysicalDeviceTileMemoryHeapPropertiesQCOM::`tileBufferTransfers` is VK_TRUE then additionally VK_BUFFER_USAGE_TRANSFER_SRC_BIT or VK_BUFFER_USAGE_TRANSFER_DST_BIT

- VUID-VkBufferCreateInfo-flags-09641
  If `flags` includes VK_BUFFER_CREATE_PROTECTED_BIT, then the effective usage flags must not contain bits other than

  - VK_BUFFER_USAGE_TRANSFER_SRC_BIT

  - VK_BUFFER_USAGE_TRANSFER_DST_BIT

  - VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT

  - VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT

  - VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT

  - VK_BUFFER_USAGE_STORAGE_BUFFER_BIT

  - VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT

  - VK_BUFFER_USAGE_2_VIDEO_DECODE_SRC_BIT_KHR

  - VK_BUFFER_USAGE_2_VIDEO_ENCODE_DST_BIT_KHR

  - VK_BUFFER_USAGE_2_DESCRIPTOR_HEAP_BIT_EXT

- VUID-VkBufferCreateInfo-flags-11277
  If the `protectedDescriptorHeaps` property is not supported and the effective usage flags include the VK_BUFFER_USAGE_2_DESCRIPTOR_HEAP_BIT_EXT flag, `flags` must not include the VK_BUFFER_CREATE_PROTECTED_BIT flag

- VUID-VkBufferCreateInfo-flags-11279
  If the `sparseDescriptorHeaps` property is not supported and the effective usage flags include the VK_BUFFER_USAGE_2_DESCRIPTOR_HEAP_BIT_EXT flag, `flags` must not include any of the VK_BUFFER_CREATE_SPARSE_BINDING_BIT, VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT, or VK_BUFFER_CREATE_SPARSE_ALIASED_BIT flags

Valid Usage (Implicit)

- VUID-VkBufferCreateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO

- VUID-VkBufferCreateInfo-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkBufferCollectionBufferCreateInfoFUCHSIA, VkBufferDeviceAddressCreateInfoEXT, VkBufferOpaqueCaptureAddressCreateInfo, VkBufferUsageFlags2CreateInfo, VkDedicatedAllocationBufferCreateInfoNV, VkExternalMemoryBufferCreateInfo, VkOpaqueCaptureDescriptorDataCreateInfoEXT, or VkVideoProfileListInfoKHR

- VUID-VkBufferCreateInfo-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkBufferCreateInfo-flags-parameter
  `flags` must be a valid combination of VkBufferCreateFlagBits values

- VUID-VkBufferCreateInfo-sharingMode-parameter
  `sharingMode` must be a valid VkSharingMode value

The `VkBufferUsageFlags2CreateInfo` structure is defined as:

    // Provided by VK_VERSION_1_4
    typedef struct VkBufferUsageFlags2CreateInfo {
        VkStructureType        sType;
        const void*            pNext;
        VkBufferUsageFlags2    usage;
    } VkBufferUsageFlags2CreateInfo;

    // Provided by VK_KHR_extended_flags, VK_KHR_maintenance5
    // Equivalent to VkBufferUsageFlags2CreateInfo
    typedef VkBufferUsageFlags2CreateInfo VkBufferUsageFlags2CreateInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `usage` is a bitmask of VkBufferUsageFlagBits2 specifying allowed usages of the buffer.

If this structure is included in the `pNext` chain of a buffer creation structure, `usage` is used instead of the corresponding `usage` value passed in that creation structure, allowing additional usage flags to be specified.

If this structure is included in the `pNext` chain of a query structure including VkBufferUsageFlags, the usage flags of the buffer are returned in `flags` of this structure, allowing additional usage flags to be queried. The flags representable in VkBufferUsageFlags are still returned in the query structure in this case.

Valid Usage (Implicit)

- VUID-VkBufferUsageFlags2CreateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_BUFFER_USAGE_FLAGS_2_CREATE_INFO

- VUID-VkBufferUsageFlags2CreateInfo-usage-parameter
  `usage` must be a valid combination of VkBufferUsageFlagBits2 values

- VUID-VkBufferUsageFlags2CreateInfo-usage-requiredbitmask
  `usage` must not be `0`

Structure Chaining

Extends the structures

  - VkBufferCreateInfo

  - VkBufferViewCreateInfo

  - VkDescriptorBufferBindingInfoEXT

  - VkPhysicalDeviceExternalBufferInfo

Bits which can be set in VkBufferUsageFlags2CreateInfo::`usage`, specifying usage behavior of a buffer, are:

    // Provided by VK_VERSION_1_4
    // Flag bits for VkBufferUsageFlagBits2
    typedef VkFlags64 VkBufferUsageFlagBits2;
    static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_TRANSFER_SRC_BIT = 0x00000001ULL;
    static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_TRANSFER_DST_BIT = 0x00000002ULL;
    static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_UNIFORM_TEXEL_BUFFER_BIT = 0x00000004ULL;
    static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_STORAGE_TEXEL_BUFFER_BIT = 0x00000008ULL;
    static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_UNIFORM_BUFFER_BIT = 0x00000010ULL;
    static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_STORAGE_BUFFER_BIT = 0x00000020ULL;
    static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_INDEX_BUFFER_BIT = 0x00000040ULL;
    static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_VERTEX_BUFFER_BIT = 0x00000080ULL;
    static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_INDIRECT_BUFFER_BIT = 0x00000100ULL;
    // Provided by VK_VERSION_1_4
    static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_SHADER_DEVICE_ADDRESS_BIT = 0x00020000ULL;
    // Provided by VK_AMDX_shader_enqueue with VK_VERSION_1_4 or VK_KHR_extended_flags or VK_KHR_maintenance5
    #ifdef VK_ENABLE_BETA_EXTENSIONS
    static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_EXECUTION_GRAPH_SCRATCH_BIT_AMDX = 0x02000000ULL;
    #endif
    // Provided by VK_EXT_descriptor_heap
    static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_DESCRIPTOR_HEAP_BIT_EXT = 0x10000000ULL;
    // Provided by VK_KHR_extended_flags with VK_EXT_opacity_micromap, VK_EXT_opacity_micromap with VK_KHR_maintenance5 or VK_VERSION_1_4
    static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_MICROMAP_BUILD_INPUT_READ_ONLY_BIT_EXT = 0x00800000ULL;
    // Provided by VK_KHR_extended_flags with VK_EXT_opacity_micromap, VK_EXT_opacity_micromap with VK_KHR_maintenance5 or VK_VERSION_1_4
    static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_MICROMAP_STORAGE_BIT_EXT = 0x01000000ULL;
    // Provided by VK_KHR_extended_flags, VK_KHR_maintenance5
    static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_TRANSFER_SRC_BIT_KHR = 0x00000001ULL;
    // Provided by VK_KHR_extended_flags, VK_KHR_maintenance5
    static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_TRANSFER_DST_BIT_KHR = 0x00000002ULL;
    // Provided by VK_KHR_extended_flags, VK_KHR_maintenance5
    static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_UNIFORM_TEXEL_BUFFER_BIT_KHR = 0x00000004ULL;
    // Provided by VK_KHR_extended_flags, VK_KHR_maintenance5
    static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_STORAGE_TEXEL_BUFFER_BIT_KHR = 0x00000008ULL;
    // Provided by VK_KHR_extended_flags, VK_KHR_maintenance5
    static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_UNIFORM_BUFFER_BIT_KHR = 0x00000010ULL;
    // Provided by VK_KHR_extended_flags, VK_KHR_maintenance5
    static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_STORAGE_BUFFER_BIT_KHR = 0x00000020ULL;
    // Provided by VK_KHR_extended_flags, VK_KHR_maintenance5
    static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_INDEX_BUFFER_BIT_KHR = 0x00000040ULL;
    // Provided by VK_KHR_extended_flags, VK_KHR_maintenance5
    static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_VERTEX_BUFFER_BIT_KHR = 0x00000080ULL;
    // Provided by VK_KHR_extended_flags, VK_KHR_maintenance5
    static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_INDIRECT_BUFFER_BIT_KHR = 0x00000100ULL;
    // Provided by VK_KHR_extended_flags with VK_EXT_conditional_rendering, VK_KHR_maintenance5 with VK_EXT_conditional_rendering
    static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_CONDITIONAL_RENDERING_BIT_EXT = 0x00000200ULL;
    // Provided by VK_KHR_extended_flags with VK_KHR_ray_tracing_pipeline, VK_KHR_maintenance5 with VK_KHR_ray_tracing_pipeline
    static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_SHADER_BINDING_TABLE_BIT_KHR = 0x00000400ULL;
    // Provided by VK_KHR_maintenance5 with VK_NV_ray_tracing
    static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_RAY_TRACING_BIT_NV = 0x00000400ULL;
    // Provided by VK_KHR_extended_flags with VK_EXT_transform_feedback, VK_KHR_maintenance5 with VK_EXT_transform_feedback
    static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT = 0x00000800ULL;
    // Provided by VK_KHR_extended_flags with VK_EXT_transform_feedback, VK_KHR_maintenance5 with VK_EXT_transform_feedback
    static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXT = 0x00001000ULL;
    // Provided by VK_KHR_extended_flags with VK_KHR_video_decode_queue, VK_KHR_maintenance5 with VK_KHR_video_decode_queue
    static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_VIDEO_DECODE_SRC_BIT_KHR = 0x00002000ULL;
    // Provided by VK_KHR_extended_flags with VK_KHR_video_decode_queue, VK_KHR_maintenance5 with VK_KHR_video_decode_queue
    static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_VIDEO_DECODE_DST_BIT_KHR = 0x00004000ULL;
    // Provided by VK_KHR_extended_flags with VK_KHR_video_encode_queue, VK_KHR_maintenance5 with VK_KHR_video_encode_queue
    static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_VIDEO_ENCODE_DST_BIT_KHR = 0x00008000ULL;
    // Provided by VK_KHR_extended_flags with VK_KHR_video_encode_queue, VK_KHR_maintenance5 with VK_KHR_video_encode_queue
    static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_VIDEO_ENCODE_SRC_BIT_KHR = 0x00010000ULL;
    // Provided by VK_KHR_extended_flags with VK_VERSION_1_2 or VK_KHR_buffer_device_address or VK_EXT_buffer_device_address, VK_KHR_maintenance5 with VK_VERSION_1_2 or VK_KHR_buffer_device_address or VK_EXT_buffer_device_address
    static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_SHADER_DEVICE_ADDRESS_BIT_KHR = 0x00020000ULL;
    // Provided by VK_KHR_acceleration_structure with VK_KHR_extended_flags, VK_KHR_acceleration_structure with VK_KHR_maintenance5
    static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_ACCELERATION_STRUCTURE_BUILD_INPUT_READ_ONLY_BIT_KHR = 0x00080000ULL;
    // Provided by VK_KHR_acceleration_structure with VK_KHR_extended_flags, VK_KHR_acceleration_structure with VK_KHR_maintenance5
    static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_ACCELERATION_STRUCTURE_STORAGE_BIT_KHR = 0x00100000ULL;
    // Provided by VK_KHR_extended_flags with VK_EXT_descriptor_buffer, VK_KHR_maintenance5 with VK_EXT_descriptor_buffer
    static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_SAMPLER_DESCRIPTOR_BUFFER_BIT_EXT = 0x00200000ULL;
    // Provided by VK_KHR_extended_flags with VK_EXT_descriptor_buffer, VK_KHR_maintenance5 with VK_EXT_descriptor_buffer
    static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_RESOURCE_DESCRIPTOR_BUFFER_BIT_EXT = 0x00400000ULL;
    // Provided by VK_KHR_extended_flags with VK_EXT_descriptor_buffer, VK_KHR_maintenance5 with VK_EXT_descriptor_buffer
    static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_PUSH_DESCRIPTORS_DESCRIPTOR_BUFFER_BIT_EXT = 0x04000000ULL;
    // Provided by VK_AMDX_dense_geometry_format
    #ifdef VK_ENABLE_BETA_EXTENSIONS
    static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_COMPRESSED_DATA_DGF1_BIT_AMDX = 0x200000000ULL;
    #endif
    // Provided by VK_ARM_data_graph
    static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_DATA_GRAPH_FOREIGN_DESCRIPTOR_BIT_ARM = 0x20000000ULL;
    // Provided by VK_QCOM_tile_memory_heap
    static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_TILE_MEMORY_BIT_QCOM = 0x08000000ULL;
    // Provided by VK_EXT_memory_decompression
    static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_MEMORY_DECOMPRESSION_BIT_EXT = 0x100000000ULL;
    // Provided by VK_EXT_device_generated_commands
    static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_PREPROCESS_BUFFER_BIT_EXT = 0x80000000ULL;

    // Provided by VK_KHR_extended_flags, VK_KHR_maintenance5
    // Equivalent to VkBufferUsageFlagBits2
    typedef VkBufferUsageFlagBits2 VkBufferUsageFlagBits2KHR;

- VK_BUFFER_USAGE_2_TRANSFER_SRC_BIT specifies that the buffer can be used as the source of a transfer command (see the definition of VK_PIPELINE_STAGE_TRANSFER_BIT).

- VK_BUFFER_USAGE_2_TRANSFER_DST_BIT specifies that the buffer can be used as the destination of a transfer command.

- VK_BUFFER_USAGE_2_UNIFORM_TEXEL_BUFFER_BIT specifies that the buffer can be used to create a `VkBufferView` suitable for occupying a `VkDescriptorSet` slot of type VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER.

- VK_BUFFER_USAGE_2_STORAGE_TEXEL_BUFFER_BIT specifies that the buffer can be used to create a `VkBufferView` suitable for occupying a `VkDescriptorSet` slot of type VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER.

- VK_BUFFER_USAGE_2_UNIFORM_BUFFER_BIT specifies that the buffer can be used in a `VkDescriptorBufferInfo` suitable for occupying a `VkDescriptorSet` slot either of type VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER or VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC.

- VK_BUFFER_USAGE_2_STORAGE_BUFFER_BIT specifies that the buffer can be used in a `VkDescriptorBufferInfo` suitable for occupying a `VkDescriptorSet` slot either of type VK_DESCRIPTOR_TYPE_STORAGE_BUFFER or VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC.

- VK_BUFFER_USAGE_2_INDEX_BUFFER_BIT specifies that the buffer is suitable for passing as the `buffer` parameter to vkCmdBindIndexBuffer2 and vkCmdBindIndexBuffer.

- VK_BUFFER_USAGE_2_VERTEX_BUFFER_BIT specifies that the buffer is suitable for passing as an element of the `pBuffers` array to vkCmdBindVertexBuffers.

- VK_BUFFER_USAGE_2_INDIRECT_BUFFER_BIT specifies that the buffer is suitable for passing as the `buffer` parameter to vkCmdDrawIndirect, vkCmdDrawIndexedIndirect, vkCmdDrawMeshTasksIndirectNV, vkCmdDrawMeshTasksIndirectCountNV, `vkCmdDrawMeshTasksIndirectEXT`, `vkCmdDrawMeshTasksIndirectCountEXT`, vkCmdDrawClusterIndirectHUAWEI, or vkCmdDispatchIndirect. It is also suitable for passing as the `buffer` member of `VkIndirectCommandsStreamNV`, or `sequencesCountBuffer` or `sequencesIndexBuffer` or `preprocessedBuffer` member of `VkGeneratedCommandsInfoNV`. It is also suitable for passing as the underlying buffer of either the `preprocessAddress` or `sequenceCountAddress` members of `VkGeneratedCommandsInfoEXT`.

- VK_BUFFER_USAGE_2_CONDITIONAL_RENDERING_BIT_EXT specifies that the buffer is suitable for passing as the `buffer` parameter to vkCmdBeginConditionalRenderingEXT.

- VK_BUFFER_USAGE_2_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT specifies that the buffer is suitable for using for binding as a transform feedback buffer with vkCmdBindTransformFeedbackBuffers2EXT or vkCmdBindTransformFeedbackBuffersEXT.

- VK_BUFFER_USAGE_2_TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXT specifies that the buffer is suitable for using as a counter buffer with vkCmdBeginTransformFeedback2EXT, vkCmdEndTransformFeedback2EXT, vkCmdBeginTransformFeedbackEXT, and vkCmdEndTransformFeedbackEXT.

- VK_BUFFER_USAGE_2_SAMPLER_DESCRIPTOR_BUFFER_BIT_EXT specifies that the buffer is suitable to contain sampler and combined image sampler descriptors when bound as a descriptor buffer. Buffers containing combined image sampler descriptors must also specify VK_BUFFER_USAGE_2_RESOURCE_DESCRIPTOR_BUFFER_BIT_EXT.

- VK_BUFFER_USAGE_2_RESOURCE_DESCRIPTOR_BUFFER_BIT_EXT specifies that the buffer is suitable to contain resource descriptors when bound as a descriptor buffer.

- VK_BUFFER_USAGE_2_PUSH_DESCRIPTORS_DESCRIPTOR_BUFFER_BIT_EXT specifies that the buffer, when bound, can be used by the implementation to support push descriptors when using descriptor buffers.

- VK_BUFFER_USAGE_2_TILE_MEMORY_BIT_QCOM specifies that the buffer can be bound to `VkDeviceMemory` allocated from a VkMemoryHeap with the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property.

- VK_BUFFER_USAGE_2_RAY_TRACING_BIT_NV specifies that the buffer is suitable for use in vkCmdTraceRaysNV.

- VK_BUFFER_USAGE_2_SHADER_BINDING_TABLE_BIT_KHR specifies that the buffer is suitable for use as a Shader Binding Table.

- VK_BUFFER_USAGE_2_ACCELERATION_STRUCTURE_BUILD_INPUT_READ_ONLY_BIT_KHR specifies that the buffer is suitable for use as a read-only input to an acceleration structure build.

- VK_BUFFER_USAGE_2_ACCELERATION_STRUCTURE_STORAGE_BIT_KHR specifies that the buffer is suitable for storage space for a VkAccelerationStructureKHR.

- VK_BUFFER_USAGE_2_SHADER_DEVICE_ADDRESS_BIT specifies that the buffer can be used to retrieve a buffer device address via vkGetBufferDeviceAddress and use that address to access the buffer’s memory from a shader.

- VK_BUFFER_USAGE_2_VIDEO_DECODE_SRC_BIT_KHR specifies that the buffer can be used as the source video bitstream buffer in a video decode operation.

- VK_BUFFER_USAGE_2_VIDEO_DECODE_DST_BIT_KHR is reserved for future use.

- VK_BUFFER_USAGE_2_VIDEO_ENCODE_DST_BIT_KHR specifies that the buffer can be used as the destination video bitstream buffer in a video encode operation.

- VK_BUFFER_USAGE_2_VIDEO_ENCODE_SRC_BIT_KHR is reserved for future use.

- VK_BUFFER_USAGE_2_EXECUTION_GRAPH_SCRATCH_BIT_AMDX specifies that the buffer can be used for as scratch memory for execution graph dispatch.

- VK_BUFFER_USAGE_2_PREPROCESS_BUFFER_BIT_EXT specifies that the buffer can be used as a preprocess buffer for Device-Generated Commands.

- VK_BUFFER_USAGE_2_MICROMAP_BUILD_INPUT_READ_ONLY_BIT_EXT specifies that the buffer can be used as a read-only VkMicromapEXT build input, which includes the `data` and `triangleArray` parameters

- VK_BUFFER_USAGE_2_MICROMAP_STORAGE_BIT_EXT specifies that the buffer can be used to create VkMicromapEXT objects.

- VK_BUFFER_USAGE_2_COMPRESSED_DATA_DGF1_BIT_AMDX specifies that the buffer is suitable as storage space for Dense Geometry Format data.

- VK_BUFFER_USAGE_2_DATA_GRAPH_FOREIGN_DESCRIPTOR_BIT_ARM specifies that the buffer is suitable to contain resource descriptors when bound as a descriptor buffer in command buffers allocated from a command pool that can target foreign data graph processing engines.

- VK_BUFFER_USAGE_2_MEMORY_DECOMPRESSION_BIT_EXT specifies that the buffer can be used as a destination buffer in memory decompression.

- VK_BUFFER_USAGE_2_DESCRIPTOR_HEAP_BIT_EXT specifies that the buffer can be used as a descriptor heap.

    // Provided by VK_VERSION_1_4
    typedef VkFlags64 VkBufferUsageFlags2;

    // Provided by VK_KHR_extended_flags, VK_KHR_maintenance5
    // Equivalent to VkBufferUsageFlags2
    typedef VkBufferUsageFlags2 VkBufferUsageFlags2KHR;

`VkBufferUsageFlags2` is a bitmask type for setting a mask of zero or more VkBufferUsageFlagBits2.

Bits which can be set in VkBufferCreateInfo::`usage`, specifying usage behavior of a buffer, are:

Warning | This functionality is superseded by VkBufferUsageFlagBits2. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_0
    typedef enum VkBufferUsageFlagBits {
        VK_BUFFER_USAGE_TRANSFER_SRC_BIT = 0x00000001,
        VK_BUFFER_USAGE_TRANSFER_DST_BIT = 0x00000002,
        VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT = 0x00000004,
        VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT = 0x00000008,
        VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT = 0x00000010,
        VK_BUFFER_USAGE_STORAGE_BUFFER_BIT = 0x00000020,
        VK_BUFFER_USAGE_INDEX_BUFFER_BIT = 0x00000040,
        VK_BUFFER_USAGE_VERTEX_BUFFER_BIT = 0x00000080,
        VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT = 0x00000100,
      // Provided by VK_VERSION_1_2
        VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT = 0x00020000,
      // Provided by VK_KHR_video_decode_queue
        VK_BUFFER_USAGE_VIDEO_DECODE_SRC_BIT_KHR = 0x00002000,
      // Provided by VK_KHR_video_decode_queue
        VK_BUFFER_USAGE_VIDEO_DECODE_DST_BIT_KHR = 0x00004000,
      // Provided by VK_EXT_transform_feedback
        VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT = 0x00000800,
      // Provided by VK_EXT_transform_feedback
        VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXT = 0x00001000,
      // Provided by VK_EXT_conditional_rendering
        VK_BUFFER_USAGE_CONDITIONAL_RENDERING_BIT_EXT = 0x00000200,
    #ifdef VK_ENABLE_BETA_EXTENSIONS
      // Provided by VK_AMDX_shader_enqueue
        VK_BUFFER_USAGE_EXECUTION_GRAPH_SCRATCH_BIT_AMDX = 0x02000000,
    #endif
      // Provided by VK_EXT_descriptor_heap
        VK_BUFFER_USAGE_DESCRIPTOR_HEAP_BIT_EXT = 0x10000000,
      // Provided by VK_KHR_acceleration_structure
        VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_BUILD_INPUT_READ_ONLY_BIT_KHR = 0x00080000,
      // Provided by VK_KHR_acceleration_structure
        VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_STORAGE_BIT_KHR = 0x00100000,
      // Provided by VK_KHR_ray_tracing_pipeline
        VK_BUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHR = 0x00000400,
      // Provided by VK_KHR_video_encode_queue
        VK_BUFFER_USAGE_VIDEO_ENCODE_DST_BIT_KHR = 0x00008000,
      // Provided by VK_KHR_video_encode_queue
        VK_BUFFER_USAGE_VIDEO_ENCODE_SRC_BIT_KHR = 0x00010000,
      // Provided by VK_EXT_descriptor_buffer
        VK_BUFFER_USAGE_SAMPLER_DESCRIPTOR_BUFFER_BIT_EXT = 0x00200000,
      // Provided by VK_EXT_descriptor_buffer
        VK_BUFFER_USAGE_RESOURCE_DESCRIPTOR_BUFFER_BIT_EXT = 0x00400000,
      // Provided by VK_EXT_descriptor_buffer
        VK_BUFFER_USAGE_PUSH_DESCRIPTORS_DESCRIPTOR_BUFFER_BIT_EXT = 0x04000000,
      // Provided by VK_EXT_opacity_micromap
        VK_BUFFER_USAGE_MICROMAP_BUILD_INPUT_READ_ONLY_BIT_EXT = 0x00800000,
      // Provided by VK_EXT_opacity_micromap
        VK_BUFFER_USAGE_MICROMAP_STORAGE_BIT_EXT = 0x01000000,
      // Provided by VK_QCOM_tile_memory_heap
        VK_BUFFER_USAGE_TILE_MEMORY_BIT_QCOM = 0x08000000,
      // Provided by VK_NV_ray_tracing
        VK_BUFFER_USAGE_RAY_TRACING_BIT_NV = VK_BUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHR,
      // Provided by VK_EXT_buffer_device_address
        VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT_EXT = VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT,
      // Provided by VK_KHR_buffer_device_address
        VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT_KHR = VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT,
    } VkBufferUsageFlagBits;

- VK_BUFFER_USAGE_TRANSFER_SRC_BIT specifies that the buffer can be used as the source of a transfer command (see the definition of VK_PIPELINE_STAGE_TRANSFER_BIT).

- VK_BUFFER_USAGE_TRANSFER_DST_BIT specifies that the buffer can be used as the destination of a transfer command.

- VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT specifies that the buffer can be used to create a `VkBufferView` suitable for occupying a `VkDescriptorSet` slot of type VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER.

- VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT specifies that the buffer can be used to create a `VkBufferView` suitable for occupying a `VkDescriptorSet` slot of type VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER.

- VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT specifies that the buffer can be used in a `VkDescriptorBufferInfo` suitable for occupying a `VkDescriptorSet` slot either of type VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER or VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC.

- VK_BUFFER_USAGE_STORAGE_BUFFER_BIT specifies that the buffer can be used in a `VkDescriptorBufferInfo` suitable for occupying a `VkDescriptorSet` slot either of type VK_DESCRIPTOR_TYPE_STORAGE_BUFFER or VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC.

- VK_BUFFER_USAGE_INDEX_BUFFER_BIT specifies that the buffer is suitable for passing as the `buffer` parameter to vkCmdBindIndexBuffer2 and vkCmdBindIndexBuffer.

- VK_BUFFER_USAGE_VERTEX_BUFFER_BIT specifies that the buffer is suitable for passing as an element of the `pBuffers` array to vkCmdBindVertexBuffers.

- VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT specifies that the buffer is suitable for passing as the `buffer` parameter to vkCmdDrawIndirect, vkCmdDrawIndexedIndirect, vkCmdDrawMeshTasksIndirectNV, vkCmdDrawMeshTasksIndirectCountNV, `vkCmdDrawMeshTasksIndirectEXT`, `vkCmdDrawMeshTasksIndirectCountEXT`, vkCmdDrawClusterIndirectHUAWEI, or vkCmdDispatchIndirect. It is also suitable for passing as the `buffer` member of `VkIndirectCommandsStreamNV`, or `sequencesCountBuffer` or `sequencesIndexBuffer` or `preprocessedBuffer` member of `VkGeneratedCommandsInfoNV`. It is also suitable for passing as the underlying buffer of either the `preprocessAddress` or `sequenceCountAddress` members of `VkGeneratedCommandsInfoEXT`.

- VK_BUFFER_USAGE_CONDITIONAL_RENDERING_BIT_EXT specifies that the buffer is suitable for passing as the `buffer` parameter to vkCmdBeginConditionalRenderingEXT.

- VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT specifies that the buffer is suitable for using for binding as a transform feedback buffer with vkCmdBindTransformFeedbackBuffers2EXT or vkCmdBindTransformFeedbackBuffersEXT.

- VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXT specifies that the buffer is suitable for using as a counter buffer with vkCmdBeginTransformFeedback2EXT, vkCmdEndTransformFeedback2EXT, vkCmdBeginTransformFeedbackEXT, and vkCmdEndTransformFeedbackEXT.

- VK_BUFFER_USAGE_SAMPLER_DESCRIPTOR_BUFFER_BIT_EXT specifies that the buffer is suitable to contain sampler and combined image sampler descriptors when bound as a descriptor buffer. Buffers containing combined image sampler descriptors must also specify VK_BUFFER_USAGE_RESOURCE_DESCRIPTOR_BUFFER_BIT_EXT.

- VK_BUFFER_USAGE_RESOURCE_DESCRIPTOR_BUFFER_BIT_EXT specifies that the buffer is suitable to contain resource descriptors when bound as a descriptor buffer.

- VK_BUFFER_USAGE_PUSH_DESCRIPTORS_DESCRIPTOR_BUFFER_BIT_EXT specifies that the buffer, when bound, can be used by the implementation to support push descriptors when using descriptor buffers.

- VK_BUFFER_USAGE_MICROMAP_BUILD_INPUT_READ_ONLY_BIT_EXT specifies that when building a VkMicromapEXT, the buffer can be used as a read-only micromap build input, which includes the `data` and `triangleArray` parameters

- VK_BUFFER_USAGE_MICROMAP_STORAGE_BIT_EXT specifies that the buffer can be used to create VkMicromapEXT objects.

- VK_BUFFER_USAGE_TILE_MEMORY_BIT_QCOM specifies that the buffer can be bound to `VkDeviceMemory` allocated from a VkMemoryHeap with the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property.

- VK_BUFFER_USAGE_RAY_TRACING_BIT_NV specifies that the buffer is suitable for use in vkCmdTraceRaysNV.

- VK_BUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHR specifies that the buffer is suitable for use as a Shader Binding Table.

- VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_BUILD_INPUT_READ_ONLY_BIT_KHR specifies that the buffer is suitable for use as a read-only input to an acceleration structure build.

- VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_STORAGE_BIT_KHR specifies that the buffer is suitable for storage space for a VkAccelerationStructureKHR.

- VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT specifies that the buffer can be used to retrieve a buffer device address via vkGetBufferDeviceAddress and use that address to access the buffer’s memory from a shader.

- VK_BUFFER_USAGE_VIDEO_DECODE_SRC_BIT_KHR specifies that the buffer can be used as the source video bitstream buffer in a video decode operation.

- VK_BUFFER_USAGE_VIDEO_DECODE_DST_BIT_KHR is reserved for future use.

- VK_BUFFER_USAGE_VIDEO_ENCODE_DST_BIT_KHR specifies that the buffer can be used as the destination video bitstream buffer in a video encode operation.

- VK_BUFFER_USAGE_VIDEO_ENCODE_SRC_BIT_KHR is reserved for future use.

- VK_BUFFER_USAGE_EXECUTION_GRAPH_SCRATCH_BIT_AMDX specifies that the buffer can be used for as scratch memory for execution graph dispatch.

- VK_BUFFER_USAGE_DESCRIPTOR_HEAP_BIT_EXT specifies that the buffer can be used as a descriptor heap.

Warning | This functionality is superseded by VkBufferUsageFlags2. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_0
    typedef VkFlags VkBufferUsageFlags;

`VkBufferUsageFlags` is a bitmask type for setting a mask of zero or more VkBufferUsageFlagBits.

Bits which can be set in VkBufferCreateInfo::`flags`, specifying additional parameters of a buffer, are:

    // Provided by VK_VERSION_1_0
    typedef enum VkBufferCreateFlagBits {
        VK_BUFFER_CREATE_SPARSE_BINDING_BIT = 0x00000001,
        VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002,
        VK_BUFFER_CREATE_SPARSE_ALIASED_BIT = 0x00000004,
      // Provided by VK_VERSION_1_1
        VK_BUFFER_CREATE_PROTECTED_BIT = 0x00000008,
      // Provided by VK_VERSION_1_2
        VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT = 0x00000010,
      // Provided by VK_EXT_descriptor_buffer
        VK_BUFFER_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT = 0x00000020,
      // Provided by VK_KHR_video_maintenance1
        VK_BUFFER_CREATE_VIDEO_PROFILE_INDEPENDENT_BIT_KHR = 0x00000040,
      // Provided by VK_EXT_buffer_device_address
        VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_EXT = VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT,
      // Provided by VK_KHR_buffer_device_address
        VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR = VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT,
    } VkBufferCreateFlagBits;

- VK_BUFFER_CREATE_SPARSE_BINDING_BIT specifies that the buffer will be backed using sparse memory binding.

- VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT specifies that the buffer can be partially backed using sparse memory binding. Buffers created with this flag must also be created with the VK_BUFFER_CREATE_SPARSE_BINDING_BIT flag.

- VK_BUFFER_CREATE_SPARSE_ALIASED_BIT specifies that the buffer will be backed using sparse memory binding with memory ranges that might also simultaneously be backing another buffer (or another portion of the same buffer). Buffers created with this flag must also be created with the VK_BUFFER_CREATE_SPARSE_BINDING_BIT flag.

- VK_BUFFER_CREATE_PROTECTED_BIT specifies that the buffer is a protected buffer.

- VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT specifies that the buffer’s address can be saved and reused on a subsequent run (e.g. for trace capture and replay), see VkBufferOpaqueCaptureAddressCreateInfo for more detail.

- VK_BUFFER_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT specifies that the buffer can be used with descriptor buffers when capturing and replaying (e.g. for trace capture and replay), see VkOpaqueCaptureDescriptorDataCreateInfoEXT for more detail.

- VK_BUFFER_CREATE_VIDEO_PROFILE_INDEPENDENT_BIT_KHR specifies that the buffer can be used in video coding operations without having to specify at buffer creation time the set of video profiles the buffer will be used with.

See Sparse Resource Features and Physical Device Features for details of the sparse memory features supported on a device.

    // Provided by VK_VERSION_1_0
    typedef VkFlags VkBufferCreateFlags;

`VkBufferCreateFlags` is a bitmask type for setting a mask of zero or more VkBufferCreateFlagBits.

If the `pNext` chain includes a `VkDedicatedAllocationBufferCreateInfoNV` structure, then that structure includes an enable controlling whether the buffer will have a dedicated memory allocation bound to it.

The `VkDedicatedAllocationBufferCreateInfoNV` structure is defined as:

    // Provided by VK_NV_dedicated_allocation
    typedef struct VkDedicatedAllocationBufferCreateInfoNV {
        VkStructureType    sType;
        const void*        pNext;
        VkBool32           dedicatedAllocation;
    } VkDedicatedAllocationBufferCreateInfoNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `dedicatedAllocation` specifies whether the buffer will have a dedicated allocation bound to it.

Valid Usage (Implicit)

- VUID-VkDedicatedAllocationBufferCreateInfoNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV

Structure Chaining

Extends the structure

  - VkBufferCreateInfo

To define a set of external memory handle types that may be used as backing store for a buffer, add a VkExternalMemoryBufferCreateInfo structure to the `pNext` chain of the VkBufferCreateInfo structure. The `VkExternalMemoryBufferCreateInfo` structure is defined as:

    // Provided by VK_VERSION_1_1
    typedef struct VkExternalMemoryBufferCreateInfo {
        VkStructureType                    sType;
        const void*                        pNext;
        VkExternalMemoryHandleTypeFlags    handleTypes;
    } VkExternalMemoryBufferCreateInfo;

    // Provided by VK_KHR_external_memory
    // Equivalent to VkExternalMemoryBufferCreateInfo
    typedef VkExternalMemoryBufferCreateInfo VkExternalMemoryBufferCreateInfoKHR;

Note | A `VkExternalMemoryBufferCreateInfo` structure with a non-zero `handleTypes` field must be included in the creation parameters for a buffer that will be bound to memory that is either exported or imported.

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `handleTypes` is zero or a bitmask of VkExternalMemoryHandleTypeFlagBits specifying one or more external memory handle types.

Valid Usage (Implicit)

- VUID-VkExternalMemoryBufferCreateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO

- VUID-VkExternalMemoryBufferCreateInfo-handleTypes-parameter
  `handleTypes` must be a valid combination of VkExternalMemoryHandleTypeFlagBits values

Structure Chaining

Extends the structure

  - VkBufferCreateInfo

To request a specific device address for a buffer, add a VkBufferOpaqueCaptureAddressCreateInfo structure to the `pNext` chain of the VkBufferCreateInfo structure. The `VkBufferOpaqueCaptureAddressCreateInfo` structure is defined as:

    // Provided by VK_VERSION_1_2
    typedef struct VkBufferOpaqueCaptureAddressCreateInfo {
        VkStructureType    sType;
        const void*        pNext;
        uint64_t           opaqueCaptureAddress;
    } VkBufferOpaqueCaptureAddressCreateInfo;

    // Provided by VK_KHR_buffer_device_address
    // Equivalent to VkBufferOpaqueCaptureAddressCreateInfo
    typedef VkBufferOpaqueCaptureAddressCreateInfo VkBufferOpaqueCaptureAddressCreateInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `opaqueCaptureAddress` is the opaque capture address requested for the buffer.

If `opaqueCaptureAddress` is zero, no specific address is requested.

If `opaqueCaptureAddress` is not zero, then it should be an address retrieved from vkGetBufferOpaqueCaptureAddress for an identically created buffer on the same implementation.

If this structure is not present, it is as if `opaqueCaptureAddress` is zero.

Applications should avoid creating buffers with application-provided addresses and implementation-provided addresses in the same process, to reduce the likelihood of VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS errors.

Note | The expected usage for this is that a trace capture/replay tool will add the VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT flag to all buffers that use VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT, and during capture will save the queried opaque device addresses in the trace. During replay, the buffers will be created specifying the original address so any address values stored in the trace data will remain valid. Implementations are expected to separate such buffers in the GPU address space so normal allocations will avoid using these addresses. Applications and tools should avoid mixing application-provided and implementation-provided addresses for buffers created with VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT, to avoid address space allocation conflicts.

Valid Usage (Implicit)

- VUID-VkBufferOpaqueCaptureAddressCreateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO

Structure Chaining

Extends the structure

  - VkBufferCreateInfo

To request a specific device address for a buffer, add a `VkBufferDeviceAddressCreateInfoEXT` structure to the `pNext` chain of the VkBufferCreateInfo structure. The `VkBufferDeviceAddressCreateInfoEXT` structure is defined as:

    // Provided by VK_EXT_buffer_device_address
    typedef struct VkBufferDeviceAddressCreateInfoEXT {
        VkStructureType    sType;
        const void*        pNext;
        VkDeviceAddress    deviceAddress;
    } VkBufferDeviceAddressCreateInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `deviceAddress` is the device address requested for the buffer.

If `deviceAddress` is zero, no specific address is requested.

If `deviceAddress` is not zero, then it must be an address retrieved from an identically created buffer on the same implementation. The buffer must also be bound to an identically created `VkDeviceMemory` object.

If this structure is not present, it is as if `deviceAddress` is zero.

Applications should avoid creating buffers with application-provided addresses and implementation-provided addresses in the same process, to reduce the likelihood of VK_ERROR_INVALID_DEVICE_ADDRESS_EXT errors.

Valid Usage (Implicit)

- VUID-VkBufferDeviceAddressCreateInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_CREATE_INFO_EXT

- VUID-VkBufferDeviceAddressCreateInfoEXT-deviceAddress-parameter
  If `deviceAddress` is not `0`, `deviceAddress` must be a valid VkDeviceAddress value

Structure Chaining

Extends the structure

  - VkBufferCreateInfo

The `VkBufferCollectionBufferCreateInfoFUCHSIA` structure is defined as:

    // Provided by VK_FUCHSIA_buffer_collection
    typedef struct VkBufferCollectionBufferCreateInfoFUCHSIA {
        VkStructureType              sType;
        const void*                  pNext;
        VkBufferCollectionFUCHSIA    collection;
        uint32_t                     index;
    } VkBufferCollectionBufferCreateInfoFUCHSIA;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure

- `collection` is the VkBufferCollectionFUCHSIA handle

- `index` is the index of the buffer in the buffer collection from which the memory will be imported

Valid Usage

- VUID-VkBufferCollectionBufferCreateInfoFUCHSIA-index-06388
  `index` must be less than VkBufferCollectionPropertiesFUCHSIA::`bufferCount`

Valid Usage (Implicit)

- VUID-VkBufferCollectionBufferCreateInfoFUCHSIA-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_BUFFER_COLLECTION_BUFFER_CREATE_INFO_FUCHSIA

- VUID-VkBufferCollectionBufferCreateInfoFUCHSIA-collection-parameter
  `collection` must be a valid VkBufferCollectionFUCHSIA handle

Structure Chaining

Extends the structure

  - VkBufferCreateInfo

To destroy a buffer, call:

    // Provided by VK_VERSION_1_0
    void vkDestroyBuffer(
        VkDevice                                    device,
        VkBuffer                                    buffer,
        const VkAllocationCallbacks*                pAllocator);

- `device` is the logical device that destroys the buffer.

- `buffer` is the buffer to destroy.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

Valid Usage

- VUID-vkDestroyBuffer-buffer-00922
  All submitted commands that refer to `buffer`, either directly or via a `VkBufferView`, must have completed execution

- VUID-vkDestroyBuffer-buffer-00923
  If `VkAllocationCallbacks` were provided when `buffer` was created, a compatible set of callbacks must be provided here

- VUID-vkDestroyBuffer-buffer-00924
  If no `VkAllocationCallbacks` were provided when `buffer` was created, `pAllocator` must be `NULL`

Valid Usage (Implicit)

- VUID-vkDestroyBuffer-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkDestroyBuffer-buffer-parameter
  If `buffer` is not VK_NULL_HANDLE, `buffer` must be a valid VkBuffer handle

- VUID-vkDestroyBuffer-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkDestroyBuffer-buffer-parent
  If `buffer` is a valid handle, it must have been created, allocated, or retrieved from `device`

Host Synchronization

- Host access to `buffer` must be externally synchronized

### 12.2. Buffer Views

A buffer view represents a contiguous range of a buffer and a specific format to be used to interpret the data. Buffer views are used to enable shaders to access buffer contents using image operations. In order to create a valid buffer view, the buffer must have been created with at least one of the following usage flags:

- VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT

- VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT

Buffer views are represented by `VkBufferView` handles:

    // Provided by VK_VERSION_1_0
    VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkBufferView)

To create a buffer view, call:

    // Provided by VK_VERSION_1_0
    VkResult vkCreateBufferView(
        VkDevice                                    device,
        const VkBufferViewCreateInfo*               pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkBufferView*                               pView);

- `device` is the logical device that creates the buffer view.

- `pCreateInfo` is a pointer to a VkBufferViewCreateInfo structure containing parameters to be used to create the buffer view.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

- `pView` is a pointer to a VkBufferView handle in which the resulting buffer view object is returned.

Valid Usage

- VUID-vkCreateBufferView-device-09665
  `device` must support at least one queue family with one of the VK_QUEUE_COMPUTE_BIT or VK_QUEUE_GRAPHICS_BIT capabilities

Valid Usage (Implicit)

- VUID-vkCreateBufferView-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkCreateBufferView-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkBufferViewCreateInfo structure

- VUID-vkCreateBufferView-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateBufferView-pView-parameter
  `pView` must be a valid pointer to a VkBufferView handle

- VUID-vkCreateBufferView-device-queuecount
  The device must have been created with at least `1` queue

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkBufferViewCreateInfo` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkBufferViewCreateInfo {
        VkStructureType            sType;
        const void*                pNext;
        VkBufferViewCreateFlags    flags;
        VkBuffer                   buffer;
        VkFormat                   format;
        VkDeviceSize               offset;
        VkDeviceSize               range;
    } VkBufferViewCreateInfo;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is reserved for future use.

- `buffer` is a VkBuffer on which the view will be created.

- `format` is a VkFormat describing the format of the data elements in the buffer.

- `offset` is an offset in bytes from the base address of the buffer. Accesses to the buffer view from shaders use addressing that is relative to this starting offset.

- `range` is a size in bytes of the buffer view. If `range` is equal to VK_WHOLE_SIZE, the range from `offset` to the end of the buffer is used. If VK_WHOLE_SIZE is used and the remaining size of the buffer is not a multiple of the texel block size of `format`, the nearest smaller multiple is used.

The buffer view has a buffer view usage identifying which descriptor types can be created from it. This usage can be defined by including the VkBufferUsageFlags2CreateInfo structure in the `pNext` chain, and specifying the `usage` value there. If this structure is not included, it is equal to the VkBufferCreateInfo::`usage` value used to create `buffer`.

Valid Usage

- VUID-VkBufferViewCreateInfo-offset-00925
  `offset` must be less than the size of `buffer`

- VUID-VkBufferViewCreateInfo-range-00928
  If `range` is not equal to VK_WHOLE_SIZE, `range` must be greater than `0`

- VUID-VkBufferViewCreateInfo-range-00929
  If `range` is not equal to VK_WHOLE_SIZE, `range` must be an integer multiple of the texel block size of `format`

- VUID-VkBufferViewCreateInfo-range-00930
  If `range` is not equal to VK_WHOLE_SIZE, the number of texel buffer elements given by (⌊`range` / (texel block size)⌋ × (texels per block)) where texel block size and texels per block are as defined in the Compatible Formats table for `format`, must be less than or equal to `VkPhysicalDeviceLimits`::`maxTexelBufferElements`

- VUID-VkBufferViewCreateInfo-offset-00931
  If `range` is not equal to VK_WHOLE_SIZE, the sum of `offset` and `range` must be less than or equal to the size of `buffer`

- VUID-VkBufferViewCreateInfo-range-04059
  If `range` is equal to VK_WHOLE_SIZE, the number of texel buffer elements given by (⌊(size - `offset`) / (texel block size)⌋ × (texels per block)) where size is the size of `buffer`, and texel block size and texels per block are as defined in the Compatible Formats table for `format`, must be less than or equal to `VkPhysicalDeviceLimits`::`maxTexelBufferElements`

- VUID-VkBufferViewCreateInfo-buffer-00932
  `buffer` must have been created with at least one of the VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT or VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT usage flags set

- VUID-VkBufferViewCreateInfo-format-08778
  If the buffer view usage contains VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT, then format features of `format` must contain VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT

- VUID-VkBufferViewCreateInfo-format-08779
  If the buffer view usage contains VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT, then format features of `format` must contain VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT

- VUID-VkBufferViewCreateInfo-buffer-00935
  If `buffer` is non-sparse then it must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-VkBufferViewCreateInfo-buffer-02750
  If `buffer` was created with the VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT usage flag set, `offset` must be a multiple of the effective alignment requirement of `format` for VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER as defined by `minTexelBufferOffsetAlignment`

- VUID-VkBufferViewCreateInfo-buffer-02751
  If `buffer` was created with the VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT usage flag set, `offset` must be a multiple of the effective alignment requirement of `format` for VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER as defined by `minTexelBufferOffsetAlignment`

- VUID-VkBufferViewCreateInfo-pNext-06782
  If the `pNext` chain includes a VkExportMetalObjectCreateInfoEXT structure, its `exportObjectType` member must be VK_EXPORT_METAL_OBJECT_TYPE_METAL_TEXTURE_BIT_EXT

- VUID-VkBufferViewCreateInfo-pNext-08780
  If the `pNext` chain includes a VkBufferUsageFlags2CreateInfo, its `usage` must not contain any other bit than VK_BUFFER_USAGE_2_UNIFORM_TEXEL_BUFFER_BIT or VK_BUFFER_USAGE_2_STORAGE_TEXEL_BUFFER_BIT

- VUID-VkBufferViewCreateInfo-pNext-08781
  If the `pNext` chain includes a VkBufferUsageFlags2CreateInfo, its `usage` must be a subset of the VkBufferCreateInfo::`usage` specified or VkBufferUsageFlags2CreateInfo::`usage` from VkBufferCreateInfo::`pNext` when creating `buffer`

- VUID-VkBufferViewCreateInfo-None-12278
  If Vulkan 1.3 is not supported and the `ycbcr2plane444Formats` feature is not enabled, `format` must not be VK_FORMAT_G8_B8R8_2PLANE_444_UNORM, VK_FORMAT_G10X6_B10X6R10X6_2PLANE_444_UNORM_3PACK16, VK_FORMAT_G12X4_B12X4R12X4_2PLANE_444_UNORM_3PACK16, or VK_FORMAT_G16_B16R16_2PLANE_444_UNORM

Valid Usage (Implicit)

- VUID-VkBufferViewCreateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO

- VUID-VkBufferViewCreateInfo-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkBufferUsageFlags2CreateInfo or VkExportMetalObjectCreateInfoEXT

- VUID-VkBufferViewCreateInfo-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique, with the exception of structures of type VkExportMetalObjectCreateInfoEXT

- VUID-VkBufferViewCreateInfo-flags-zerobitmask
  `flags` must be `0`

- VUID-VkBufferViewCreateInfo-buffer-parameter
  `buffer` must be a valid VkBuffer handle

- VUID-VkBufferViewCreateInfo-format-parameter
  `format` must be a valid VkFormat value

    // Provided by VK_VERSION_1_0
    typedef VkFlags VkBufferViewCreateFlags;

`VkBufferViewCreateFlags` is a bitmask type for setting a mask, but is currently reserved for future use.

To destroy a buffer view, call:

    // Provided by VK_VERSION_1_0
    void vkDestroyBufferView(
        VkDevice                                    device,
        VkBufferView                                bufferView,
        const VkAllocationCallbacks*                pAllocator);

- `device` is the logical device that destroys the buffer view.

- `bufferView` is the buffer view to destroy.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

Valid Usage

- VUID-vkDestroyBufferView-bufferView-00936
  All submitted commands that refer to `bufferView` must have completed execution

- VUID-vkDestroyBufferView-bufferView-00937
  If `VkAllocationCallbacks` were provided when `bufferView` was created, a compatible set of callbacks must be provided here

- VUID-vkDestroyBufferView-bufferView-00938
  If no `VkAllocationCallbacks` were provided when `bufferView` was created, `pAllocator` must be `NULL`

Valid Usage (Implicit)

- VUID-vkDestroyBufferView-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkDestroyBufferView-bufferView-parameter
  If `bufferView` is not VK_NULL_HANDLE, `bufferView` must be a valid VkBufferView handle

- VUID-vkDestroyBufferView-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkDestroyBufferView-bufferView-parent
  If `bufferView` is a valid handle, it must have been created, allocated, or retrieved from `device`

Host Synchronization

- Host access to `bufferView` must be externally synchronized

#### 12.2.1. Buffer View Format Features

Valid uses of a VkBufferView may depend on the buffer view’s format features, defined below. Such constraints are documented in the affected valid usage statement.

- If Vulkan 1.3 is supported or the `VK_KHR_format_feature_flags2` extension is supported, then the buffer view’s set of format features is the value of VkFormatProperties3::`bufferFeatures` found by calling vkGetPhysicalDeviceFormatProperties2 on the same `format` as VkBufferViewCreateInfo::`format`.

### 12.3. Buffer Device Addresses

To query a 64-bit buffer device address value which can be used to identify a buffer to API commands or through which buffer memory can be accessed, call:

    // Provided by VK_VERSION_1_2
    VkDeviceAddress vkGetBufferDeviceAddress(
        VkDevice                                    device,
        const VkBufferDeviceAddressInfo*            pInfo);

    // Provided by VK_KHR_buffer_device_address
    // Equivalent to vkGetBufferDeviceAddress
    VkDeviceAddress vkGetBufferDeviceAddressKHR(
        VkDevice                                    device,
        const VkBufferDeviceAddressInfo*            pInfo);

    // Provided by VK_EXT_buffer_device_address
    // Equivalent to vkGetBufferDeviceAddress
    VkDeviceAddress vkGetBufferDeviceAddressEXT(
        VkDevice                                    device,
        const VkBufferDeviceAddressInfo*            pInfo);

- `device` is the logical device that the buffer was created on.

- `pInfo` is a pointer to a VkBufferDeviceAddressInfo structure specifying the buffer to retrieve an address for.

The 64-bit return value, `bufferBaseAddress`, is an address of the start of `pInfo->buffer`. Addresses in the range [`bufferBaseAddress`, `bufferBaseAddress` + VkBufferCreateInfo::`size`) can be used to access the memory bound to this buffer on the device.

A value of zero is reserved as a “null” pointer and must not be returned as a valid buffer device address.

If the buffer was created with a non-zero value of VkBufferOpaqueCaptureAddressCreateInfo::`opaqueCaptureAddress` or VkBufferDeviceAddressCreateInfoEXT::`deviceAddress`, the return value will be the same address that was returned at capture time.

The returned address must satisfy the alignment requirement specified by VkMemoryRequirements::`alignment` for the buffer in VkBufferDeviceAddressInfo::`buffer`.

If multiple VkBuffer objects are bound to overlapping ranges of VkDeviceMemory, implementations may return address ranges which overlap. In this case, it is ambiguous which VkBuffer is associated with any given device address. For purposes of valid usage, if multiple VkBuffer objects can be attributed to a device address, a VkBuffer is selected such that valid usage passes, if it exists.

Valid Usage

- VUID-vkGetBufferDeviceAddress-bufferDeviceAddress-03324
  The `bufferDeviceAddress` feature or the VkPhysicalDeviceBufferDeviceAddressFeaturesEXT::`bufferDeviceAddress` feature must be enabled, and at least one of the following conditions must be met

  - `buffer` is sparse

  - `buffer` is bound completely and contiguously to a single `VkDeviceMemory` object

  - `buffer` was created with the VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT flag and the VkPhysicalDeviceBufferDeviceAddressFeaturesEXT::`bufferDeviceAddress` feature is enabled on the device

- VUID-vkGetBufferDeviceAddress-device-03325
  If `device` was created with multiple physical devices, then the `bufferDeviceAddressMultiDevice` or VkPhysicalDeviceBufferDeviceAddressFeaturesEXT::`bufferDeviceAddressMultiDevice` feature must be enabled

Valid Usage (Implicit)

- VUID-vkGetBufferDeviceAddress-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetBufferDeviceAddress-pInfo-parameter
  `pInfo` must be a valid pointer to a valid VkBufferDeviceAddressInfo structure

The `VkBufferDeviceAddressInfo` structure is defined as:

    // Provided by VK_VERSION_1_2
    typedef struct VkBufferDeviceAddressInfo {
        VkStructureType    sType;
        const void*        pNext;
        VkBuffer           buffer;
    } VkBufferDeviceAddressInfo;

    // Provided by VK_KHR_buffer_device_address
    // Equivalent to VkBufferDeviceAddressInfo
    typedef VkBufferDeviceAddressInfo VkBufferDeviceAddressInfoKHR;

    // Provided by VK_EXT_buffer_device_address
    // Equivalent to VkBufferDeviceAddressInfo
    typedef VkBufferDeviceAddressInfo VkBufferDeviceAddressInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `buffer` specifies the buffer whose address is being queried.

Valid Usage

- VUID-VkBufferDeviceAddressInfo-buffer-02601
  `buffer` must have been created with the VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT usage flag set

Valid Usage (Implicit)

- VUID-VkBufferDeviceAddressInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO

- VUID-VkBufferDeviceAddressInfo-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkBufferDeviceAddressInfo-buffer-parameter
  `buffer` must be a valid VkBuffer handle

To query a 64-bit buffer opaque capture address, call:

    // Provided by VK_VERSION_1_2
    uint64_t vkGetBufferOpaqueCaptureAddress(
        VkDevice                                    device,
        const VkBufferDeviceAddressInfo*            pInfo);

    // Provided by VK_KHR_buffer_device_address
    // Equivalent to vkGetBufferOpaqueCaptureAddress
    uint64_t vkGetBufferOpaqueCaptureAddressKHR(
        VkDevice                                    device,
        const VkBufferDeviceAddressInfo*            pInfo);

- `device` is the logical device that the buffer was created on.

- `pInfo` is a pointer to a VkBufferDeviceAddressInfo structure specifying the buffer to retrieve an address for.

The 64-bit return value is an opaque capture address of the start of `pInfo->buffer`.

If the buffer was created with a non-zero value of VkBufferOpaqueCaptureAddressCreateInfo::`opaqueCaptureAddress` the return value must be the same address.

Valid Usage

- VUID-vkGetBufferOpaqueCaptureAddress-None-03326
  The `bufferDeviceAddress` and `bufferDeviceAddressCaptureReplay` features must be enabled

- VUID-vkGetBufferOpaqueCaptureAddress-pInfo-10725
  `pInfo->buffer` must have been created with the VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT flag

- VUID-vkGetBufferOpaqueCaptureAddress-device-03327
  If `device` was created with multiple physical devices, then the `bufferDeviceAddressMultiDevice` feature must be enabled

Valid Usage (Implicit)

- VUID-vkGetBufferOpaqueCaptureAddress-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetBufferOpaqueCaptureAddress-pInfo-parameter
  `pInfo` must be a valid pointer to a valid VkBufferDeviceAddressInfo structure

The `VkStridedDeviceAddressRegionKHR` structure is defined as:

    // Provided by VK_KHR_ray_tracing_pipeline
    typedef struct VkStridedDeviceAddressRegionKHR {
        VkDeviceAddress    deviceAddress;
        VkDeviceSize       stride;
        VkDeviceSize       size;
    } VkStridedDeviceAddressRegionKHR;

- `deviceAddress` is the device address (as returned by the vkGetBufferDeviceAddress command) at which the region starts, or zero if the region is unused.

- `stride` is the byte stride between consecutive elements.

- `size` is the size in bytes of the region starting at `deviceAddress`.

Valid Usage

- VUID-VkStridedDeviceAddressRegionKHR-size-04631
  If `size` is not zero, all addresses between `deviceAddress` and `deviceAddress` + `size` - 1 must be in the buffer device address range of the same buffer

- VUID-VkStridedDeviceAddressRegionKHR-size-04632
  If `size` is not zero, `stride` must be less than or equal to the size of the buffer from which `deviceAddress` was queried

Valid Usage (Implicit)

- VUID-VkStridedDeviceAddressRegionKHR-deviceAddress-parameter
  If `deviceAddress` is not `0`, `deviceAddress` must be a valid VkDeviceAddress value

### 12.4. Images

Images are specialized resources that have multi-dimensional access, as outlined in the Images chapter. Images can be used for various purposes, such as rendering attachments, for copy operations, or accessed through shaders via resource descriptors.

Images are represented by `VkImage` handles:

    // Provided by VK_VERSION_1_0
    VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkImage)

To create images, call:

    // Provided by VK_VERSION_1_0
    VkResult vkCreateImage(
        VkDevice                                    device,
        const VkImageCreateInfo*                    pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkImage*                                    pImage);

- `device` is the logical device that creates the image.

- `pCreateInfo` is a pointer to a VkImageCreateInfo structure containing parameters to be used to create the image.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

- `pImage` is a pointer to a VkImage handle in which the resulting image object is returned.

Valid Usage

- VUID-vkCreateImage-device-09666
  `device` must support at least one queue family with one of the VK_QUEUE_VIDEO_ENCODE_BIT_KHR, VK_QUEUE_VIDEO_DECODE_BIT_KHR, VK_QUEUE_OPTICAL_FLOW_BIT_NV, VK_QUEUE_SPARSE_BINDING_BIT, VK_QUEUE_TRANSFER_BIT, VK_QUEUE_COMPUTE_BIT, or VK_QUEUE_GRAPHICS_BIT capabilities

- VUID-vkCreateImage-flags-00939
  If the `flags` member of `pCreateInfo` includes VK_IMAGE_CREATE_SPARSE_BINDING_BIT, and the `extendedSparseAddressSpace` feature is not enabled, creating this `VkImage` must not cause the total required sparse memory for all currently valid sparse resources on the device to exceed `VkPhysicalDeviceLimits`::`sparseAddressSpaceSize`

- VUID-vkCreateImage-flags-09385
  If the `flags` member of `pCreateInfo` includes VK_IMAGE_CREATE_SPARSE_BINDING_BIT, the `extendedSparseAddressSpace` feature is enabled, and the `usage` member of `pCreateInfo` contains bits not in `VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV`::`extendedSparseImageUsageFlags`, creating this `VkImage` must not cause the total required sparse memory for all currently valid sparse resources on the device, excluding `VkBuffer` created with `usage` member of `pCreateInfo` containing bits in `VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV`::`extendedSparseBufferUsageFlags` and `VkImage` created with `usage` member of `pCreateInfo` containing bits in `VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV`::`extendedSparseImageUsageFlags`, to exceed `VkPhysicalDeviceLimits`::`sparseAddressSpaceSize`

- VUID-vkCreateImage-flags-09386
  If the `flags` member of `pCreateInfo` includes VK_IMAGE_CREATE_SPARSE_BINDING_BIT and the `extendedSparseAddressSpace` feature is enabled, creating this `VkImage` must not cause the total required sparse memory for all currently valid sparse resources on the device to exceed `VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV`::`extendedSparseAddressSpaceSize`

- VUID-vkCreateImage-pNext-06389
  If a VkBufferCollectionImageCreateInfoFUCHSIA has been chained to `pNext`, `pCreateInfo` must match the Sysmem chosen `VkImageCreateInfo` excepting members VkImageCreateInfo::`extent` and VkImageCreateInfo::`usage` in the match criteria

Valid Usage (Implicit)

- VUID-vkCreateImage-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkCreateImage-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkImageCreateInfo structure

- VUID-vkCreateImage-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateImage-pImage-parameter
  `pImage` must be a valid pointer to a VkImage handle

- VUID-vkCreateImage-device-queuecount
  The device must have been created with at least `1` queue

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_COMPRESSION_EXHAUSTED_EXT

  - VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkImageCreateInfo` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkImageCreateInfo {
        VkStructureType          sType;
        const void*              pNext;
        VkImageCreateFlags       flags;
        VkImageType              imageType;
        VkFormat                 format;
        VkExtent3D               extent;
        uint32_t                 mipLevels;
        uint32_t                 arrayLayers;
        VkSampleCountFlagBits    samples;
        VkImageTiling            tiling;
        VkImageUsageFlags        usage;
        VkSharingMode            sharingMode;
        uint32_t                 queueFamilyIndexCount;
        const uint32_t*          pQueueFamilyIndices;
        VkImageLayout            initialLayout;
    } VkImageCreateInfo;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask of VkImageCreateFlagBits describing additional parameters of the image.

- `imageType` is a VkImageType value specifying the basic dimensionality of the image. Layers in array textures do not count as a dimension for the purposes of the image type.

- `format` is a VkFormat describing the format and type of the texel blocks that will be contained in the image.

- `extent` is a VkExtent3D describing the number of texels/pixels in each dimension of the base level.

- `mipLevels` describes the number of levels of detail available for minified sampling of the image.

- `arrayLayers` is the number of layers in the image.

- `samples` is a VkSampleCountFlagBits value specifying the number of samples per texel.

- `tiling` is a VkImageTiling value specifying the tiling arrangement of the texel blocks in memory.

- `usage` is a bitmask of VkImageUsageFlagBits describing the intended usage of the image.

- `sharingMode` is a VkSharingMode value specifying the sharing mode of the image when it will be accessed by multiple queue families.

- `queueFamilyIndexCount` is the number of entries in the `pQueueFamilyIndices` array.

- `pQueueFamilyIndices` is a pointer to an array of queue families that will access this image. It is ignored if `sharingMode` is not VK_SHARING_MODE_CONCURRENT.

- `initialLayout` is a VkImageLayout value specifying the initial VkImageLayout of all image subresources of the image. See Image Layouts.

`flags` defines the effective create flags for the image. If the `pNext` chain includes a VkImageCreateFlags2CreateInfoKHR structure, `flags` is ignored, and the effective create flags are defined by VkImageCreateFlags2CreateInfoKHR::`flags`.

`usage` defines the effective usage flags for the image. If the `pNext` chain includes a VkImageUsageFlags2CreateInfoKHR structure, `usage` is ignored, and the effective usage flags are defined by VkImageUsageFlags2CreateInfoKHR::`usage`.

Images created with `tiling` equal to VK_IMAGE_TILING_LINEAR have further restrictions on their limits and capabilities compared to images created with `tiling` equal to VK_IMAGE_TILING_OPTIMAL. Creation of images with tiling VK_IMAGE_TILING_LINEAR may not be supported unless other parameters meet all of the constraints:

- `imageType` is VK_IMAGE_TYPE_2D

- `format` is not a depth/stencil format

- `mipLevels` is 1

- `arrayLayers` is 1

- `samples` is VK_SAMPLE_COUNT_1_BIT

- `usage` only includes VK_IMAGE_USAGE_TRANSFER_SRC_BIT and/or VK_IMAGE_USAGE_TRANSFER_DST_BIT

Images created with one of the formats that require a sampler Y′CBCR conversion, have further restrictions on their limits and capabilities compared to images created with other formats. Creation of images with a format requiring Y′CBCR conversion may not be supported unless other parameters meet all of the constraints:

- `imageType` is VK_IMAGE_TYPE_2D

- `mipLevels` is 1

- `arrayLayers` is 1, unless the `ycbcrImageArrays` feature is enabled, or otherwise indicated by VkImageFormatProperties::`maxArrayLayers`, as returned by vkGetPhysicalDeviceImageFormatProperties

- `samples` is VK_SAMPLE_COUNT_1_BIT

Images created with the VK_IMAGE_USAGE_TILE_MEMORY_BIT_QCOM usage flag set have further restrictions on their limits and capabilities compared to images created without this flag. Creation of images with usage including VK_IMAGE_USAGE_TILE_MEMORY_BIT_QCOM may not be supported unless parameters meet all of the constraints:

- `flags` is 0 or only includes VK_IMAGE_CREATE_ALIAS_BIT

- `imageType` is VK_IMAGE_TYPE_2D

- `mipLevels` is 1

- `arrayLayers` is 1

- `samples` is VK_SAMPLE_COUNT_1_BIT

- `tiling` is VK_IMAGE_TILING_OPTIMAL

- `usage` includes VK_IMAGE_USAGE_TILE_MEMORY_BIT_QCOM and any valid combination of the following VK_IMAGE_USAGE_SAMPLED_BIT, VK_IMAGE_USAGE_STORAGE_BIT, VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT

Implementations may support additional limits and capabilities beyond those listed above.

To determine the set of valid `usage` bits for a given format, call vkGetPhysicalDeviceFormatProperties.

If the size of the resultant image would exceed `maxResourceSize`, then vkCreateImage must fail and return VK_ERROR_OUT_OF_DEVICE_MEMORY. This failure may occur even when all image creation parameters satisfy their valid usage requirements.

If the implementation reports VK_TRUE in VkPhysicalDeviceHostImageCopyProperties::`identicalMemoryTypeRequirements`, usage of VK_IMAGE_USAGE_HOST_TRANSFER_BIT must not affect the memory type requirements of the image as described in Sparse Resource Memory Requirements and Resource Memory Association.

Note | For images created without the VK_IMAGE_CREATE_EXTENDED_USAGE_BIT flag set, a `usage` bit is valid if it is supported for the format the image is created with. For images created with VK_IMAGE_CREATE_EXTENDED_USAGE_BIT a `usage` bit is valid if it is supported for at least one of the formats a `VkImageView` created from the image can have (see Image Views for more detail).

Image Creation Limits

Valid values for some image creation parameters are limited by a numerical upper bound or by inclusion in a bitset. For example, VkImageCreateInfo::`arrayLayers` is limited by `imageCreateMaxArrayLayers`, defined below; and VkImageCreateInfo::`samples` is limited by `imageCreateSampleCounts`, also defined below.

Several limiting values are defined below, as well as assisting values from which the limiting values are derived. The limiting values are referenced by the relevant valid usage statements of VkImageCreateInfo.

- Let `uint64_t imageCreateDrmFormatModifiers[]` be the set of Linux DRM format modifiers that the resultant image may have.

  - If `tiling` is not VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, then `imageCreateDrmFormatModifiers` is empty.

  - If VkImageCreateInfo::`pNext` contains VkImageDrmFormatModifierExplicitCreateInfoEXT, then `imageCreateDrmFormatModifiers` contains exactly one modifier, VkImageDrmFormatModifierExplicitCreateInfoEXT::`drmFormatModifier`.

  - If VkImageCreateInfo::`pNext` contains VkImageDrmFormatModifierListCreateInfoEXT, then `imageCreateDrmFormatModifiers` contains the entire array VkImageDrmFormatModifierListCreateInfoEXT::`pDrmFormatModifiers`.

- Let `VkBool32 imageCreateMaybeLinear` indicate if the resultant image may be linear.

  - If `tiling` is VK_IMAGE_TILING_LINEAR, then `imageCreateMaybeLinear` is VK_TRUE.

  - If `tiling` is VK_IMAGE_TILING_OPTIMAL, then `imageCreateMaybeLinear` is VK_FALSE.

  - If `tiling` is VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, then `imageCreateMaybeLinear` is VK_TRUE if and only if `imageCreateDrmFormatModifiers` contains `DRM_FORMAT_MOD_LINEAR`.

- Let `VkFormatFeatureFlags imageCreateFormatFeatures` be the set of valid format features available during image creation.

  - If `tiling` is VK_IMAGE_TILING_LINEAR, then `imageCreateFormatFeatures` is the value of VkFormatProperties::`linearTilingFeatures` found by calling vkGetPhysicalDeviceFormatProperties with parameter `format` equal to VkImageCreateInfo::`format`.

  - If `tiling` is VK_IMAGE_TILING_OPTIMAL, and if the `pNext` chain includes no VkExternalFormatANDROID or VkExternalFormatQNX structure with non-zero `externalFormat`, then `imageCreateFormatFeatures` is the value of VkFormatProperties::`optimalTilingFeatures` found by calling vkGetPhysicalDeviceFormatProperties with parameter `format` equal to VkImageCreateInfo::`format`.

  - If `tiling` is VK_IMAGE_TILING_OPTIMAL, and if the `pNext` chain includes a VkExternalFormatANDROID structure with non-zero `externalFormat`, then `imageCreateFormatFeatures` is the value of VkAndroidHardwareBufferFormatPropertiesANDROID::`formatFeatures` obtained by vkGetAndroidHardwareBufferPropertiesANDROID with a matching `externalFormat` value.

  - If `tiling` is VK_IMAGE_TILING_OPTIMAL, and if the `pNext` chain includes a VkExternalFormatQNX structure with non-zero `externalFormat`, then `imageCreateFormatFeatures` is the value of VkScreenBufferFormatPropertiesQNX::`formatFeatures` obtained by vkGetScreenBufferPropertiesQNX with a matching `externalFormat` value.

  - If the `pNext` chain includes a VkBufferCollectionImageCreateInfoFUCHSIA structure, then `imageCreateFormatFeatures` is the value of VkBufferCollectionPropertiesFUCHSIA::`formatFeatures` found by calling vkGetBufferCollectionPropertiesFUCHSIA with a parameter `collection` equal to VkBufferCollectionImageCreateInfoFUCHSIA::`collection`

  - If `tiling` is VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, then the value of `imageCreateFormatFeatures` is found by calling vkGetPhysicalDeviceFormatProperties2 with VkImageFormatProperties::`format` equal to VkImageCreateInfo::`format` and with VkDrmFormatModifierPropertiesListEXT chained into VkFormatProperties2; by collecting all members of the returned array VkDrmFormatModifierPropertiesListEXT::`pDrmFormatModifierProperties` whose `drmFormatModifier` belongs to `imageCreateDrmFormatModifiers`; and by taking the bitwise intersection, over the collected array members, of `drmFormatModifierTilingFeatures`. (The resultant `imageCreateFormatFeatures` may be empty).

- Let `VkImageFormatProperties2 imageCreateImageFormatPropertiesList[]` be defined as follows.

  - If VkImageCreateInfo::`pNext` contains no VkExternalFormatANDROID or VkExternalFormatQNX structure with non-zero `externalFormat`, then `imageCreateImageFormatPropertiesList` is the list of structures obtained by calling vkGetPhysicalDeviceImageFormatProperties2, possibly multiple times, as follows:

    - The parameters VkPhysicalDeviceImageFormatInfo2::`format`, `imageType`, `tiling`, `usage`, and `flags` must be equal to those in VkImageCreateInfo.

    - If VkImageCreateInfo::`pNext` contains a VkExternalMemoryImageCreateInfo structure whose `handleTypes` is not `0`, then VkPhysicalDeviceImageFormatInfo2::`pNext` must contain a VkPhysicalDeviceExternalImageFormatInfo structure whose `handleType` is not `0`; and vkGetPhysicalDeviceImageFormatProperties2 must be called for each handle type in VkExternalMemoryImageCreateInfo::`handleTypes`, successively setting VkPhysicalDeviceExternalImageFormatInfo::`handleType` on each call.

    - If VkImageCreateInfo::`pNext` contains no VkExternalMemoryImageCreateInfo structure, or contains a structure whose `handleTypes` is `0`, then VkPhysicalDeviceImageFormatInfo2::`pNext` must either contain no VkPhysicalDeviceExternalImageFormatInfo structure, or contain a structure whose `handleType` is `0`.

    - If VkImageCreateInfo::`pNext` contains a VkVideoProfileListInfoKHR structure then VkPhysicalDeviceImageFormatInfo2::`pNext` must also contain the same VkVideoProfileListInfoKHR structure on each call.

    - If `tiling` is VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, then:

      - VkPhysicalDeviceImageFormatInfo2::`pNext` must contain a VkPhysicalDeviceImageDrmFormatModifierInfoEXT structure where `sharingMode` is equal to VkImageCreateInfo::`sharingMode`;

      - if `sharingMode` is VK_SHARING_MODE_CONCURRENT, then `queueFamilyIndexCount` and `pQueueFamilyIndices` must be equal to those in VkImageCreateInfo;

      - if `flags` contains VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT, then the VkImageFormatListCreateInfo structure included in the `pNext` chain of VkPhysicalDeviceImageFormatInfo2 must be equivalent to the one included in the `pNext` chain of VkImageCreateInfo;

      - if VkImageCreateInfo::`pNext` contains a VkImageCompressionControlEXT structure, then the VkPhysicalDeviceImageFormatInfo2::`pNext` chain must contain an equivalent structure;

      - vkGetPhysicalDeviceImageFormatProperties2 must be called for each modifier in `imageCreateDrmFormatModifiers`, successively setting VkPhysicalDeviceImageDrmFormatModifierInfoEXT::`drmFormatModifier` on each call.

    - If `tiling` is not VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, then VkPhysicalDeviceImageFormatInfo2::`pNext` must contain no VkPhysicalDeviceImageDrmFormatModifierInfoEXT structure.

    - If any call to vkGetPhysicalDeviceImageFormatProperties2 returns an error, then `imageCreateImageFormatPropertiesList` is defined to be the empty list.

  - If VkImageCreateInfo::`pNext` contains a VkExternalFormatANDROID structure with non-zero `externalFormat`, then `imageCreateImageFormatPropertiesList` contains a single element where:

    - `VkImageFormatProperties`::`maxMipLevels` is ⌊log2(max(`extent.width`, `extent.height`, `extent.depth`))⌋ + 1.

    - `VkImageFormatProperties`::`maxArrayLayers` is VkPhysicalDeviceLimits::`maxImageArrayLayers`.

    - Each component of `VkImageFormatProperties`::`maxExtent` is VkPhysicalDeviceLimits::`maxImageDimension2D`.

    - `VkImageFormatProperties`::`sampleCounts` contains exactly VK_SAMPLE_COUNT_1_BIT.

- Let `uint32_t imageCreateMaxMipLevels` be the minimum value of VkImageFormatProperties::`maxMipLevels` in `imageCreateImageFormatPropertiesList`. The value is undefined if `imageCreateImageFormatPropertiesList` is empty.

- Let `uint32_t imageCreateMaxArrayLayers` be the minimum value of VkImageFormatProperties::`maxArrayLayers` in `imageCreateImageFormatPropertiesList`. The value is undefined if `imageCreateImageFormatPropertiesList` is empty.

- Let `VkExtent3D imageCreateMaxExtent` be the component-wise minimum over all VkImageFormatProperties::`maxExtent` values in `imageCreateImageFormatPropertiesList`. The value is undefined if `imageCreateImageFormatPropertiesList` is empty.

- Let `VkSampleCountFlags imageCreateSampleCounts` be the intersection of each VkImageFormatProperties::`sampleCounts` in `imageCreateImageFormatPropertiesList`. The value is undefined if `imageCreateImageFormatPropertiesList` is empty.

- Let `VkVideoFormatPropertiesKHR videoFormatProperties[]` be defined as follows.

  - If VkImageCreateInfo::`pNext` contains a VkVideoProfileListInfoKHR structure, then `videoFormatProperties` is the list of structures obtained by calling vkGetPhysicalDeviceVideoFormatPropertiesKHR with VkPhysicalDeviceVideoFormatInfoKHR::`imageUsage` equal to the `usage` member of VkImageCreateInfo and VkPhysicalDeviceVideoFormatInfoKHR::`pNext` containing the same VkVideoProfileListInfoKHR structure chained to VkImageCreateInfo.

  - If VkImageCreateInfo::`pNext` contains no VkVideoProfileListInfoKHR structure, then `videoFormatProperties` is an empty list.

- Let `VkBool32 supportedVideoFormat` indicate if the image parameters are supported by the specified video profiles.

  - `supportedVideoFormat` is VK_TRUE if there exists an element in the `videoFormatProperties` list for which all of the following conditions are true:

    - VkImageCreateInfo::`format` equals VkVideoFormatPropertiesKHR::`format`.

    - VkImageCreateInfo::`flags` only contains VK_IMAGE_CREATE_VIDEO_PROFILE_INDEPENDENT_BIT_KHR and/or bits also set in VkVideoFormatPropertiesKHR::`imageCreateFlags`.

    - VkImageCreateInfo::`imageType` equals VkVideoFormatPropertiesKHR::`imageType`.

    - VkImageCreateInfo::`tiling` equals VkVideoFormatPropertiesKHR::`imageTiling`.

    - VkImageCreateInfo::`usage` only contains bits also set in VkVideoFormatPropertiesKHR::`imageUsageFlags`, or VkImageCreateInfo::`flags` includes VK_IMAGE_CREATE_EXTENDED_USAGE_BIT.

  - Otherwise `supportedVideoFormat` is VK_FALSE.

Valid Usage

- VUID-VkImageCreateInfo-imageCreateMaxMipLevels-02251
  Each of the following values (as described in Image Creation Limits) must not be undefined : `imageCreateMaxMipLevels`, `imageCreateMaxArrayLayers`, `imageCreateMaxExtent`, and `imageCreateSampleCounts`

- VUID-VkImageCreateInfo-sharingMode-00941
  If `sharingMode` is VK_SHARING_MODE_CONCURRENT, `pQueueFamilyIndices` must be a valid pointer to an array of `queueFamilyIndexCount` `uint32_t` values

- VUID-VkImageCreateInfo-maintenance11-13354
  If the `maintenance11` feature is enabled and `sharingMode` is VK_SHARING_MODE_CONCURRENT, then `queueFamilyIndexCount` must be greater than `0`

- VUID-VkImageCreateInfo-sharingMode-00942
  If the `maintenance11` feature is not enabled and `sharingMode` is VK_SHARING_MODE_CONCURRENT, then `queueFamilyIndexCount` must be greater than `1`

- VUID-VkImageCreateInfo-sharingMode-01420
  If `sharingMode` is VK_SHARING_MODE_CONCURRENT, each element of `pQueueFamilyIndices` must be unique and must be less than `pQueueFamilyPropertyCount` returned by either vkGetPhysicalDeviceQueueFamilyProperties or vkGetPhysicalDeviceQueueFamilyProperties2 for the `physicalDevice` that was used to create `device`

- VUID-VkImageCreateInfo-pNext-01974
  If the `pNext` chain includes a VkExternalFormatANDROID structure, and its `externalFormat` member is non-zero the `format` must be VK_FORMAT_UNDEFINED

- VUID-VkImageCreateInfo-pNext-01975
  If the `pNext` chain does not include a VkExternalFormatANDROID structure, or does and its `externalFormat` member is `0`, the `format` must not be VK_FORMAT_UNDEFINED

- VUID-VkImageCreateInfo-extent-00944
  `extent.width` must be greater than `0`

- VUID-VkImageCreateInfo-extent-00945
  `extent.height` must be greater than `0`

- VUID-VkImageCreateInfo-extent-00946
  `extent.depth` must be greater than `0`

- VUID-VkImageCreateInfo-mipLevels-00947
  `mipLevels` must be greater than `0`

- VUID-VkImageCreateInfo-arrayLayers-00948
  `arrayLayers` must be greater than `0`

- VUID-VkImageCreateInfo-flags-00949
  If `flags` contains VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT, `imageType` must be VK_IMAGE_TYPE_2D

- VUID-VkImageCreateInfo-flags-08865
  If `flags` contains VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT, `extent.width` and `extent.height` must be equal

- VUID-VkImageCreateInfo-flags-08866
  If `flags` contains VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT, `arrayLayers` must be greater than or equal to 6

- VUID-VkImageCreateInfo-initialLayout-10765
  If the zeroInitializeDeviceMemory feature is not enabled, `initialLayout` must not be VK_IMAGE_LAYOUT_ZERO_INITIALIZED_EXT

- VUID-VkImageCreateInfo-flags-02557
  If `flags` contains VK_IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT, `imageType` must be VK_IMAGE_TYPE_2D

- VUID-VkImageCreateInfo-flags-00950
  If `flags` contains VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT, `imageType` must be VK_IMAGE_TYPE_3D

- VUID-VkImageCreateInfo-flags-09403
  If `flags` contains VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT, `flags` must not include VK_IMAGE_CREATE_SPARSE_ALIASED_BIT, VK_IMAGE_CREATE_SPARSE_BINDING_BIT, or VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT

- VUID-VkImageCreateInfo-flags-07755
  If `flags` contains VK_IMAGE_CREATE_2D_VIEW_COMPATIBLE_BIT_EXT, `imageType` must be VK_IMAGE_TYPE_3D

- VUID-VkImageCreateInfo-imageType-10197
  If `flags` contains VK_IMAGE_CREATE_2D_VIEW_COMPATIBLE_BIT_EXT and either the `maintenance9` feature is not enabled on the device or `image2DViewOf3DSparse` is VK_FALSE , `flags` must not include VK_IMAGE_CREATE_SPARSE_ALIASED_BIT, VK_IMAGE_CREATE_SPARSE_BINDING_BIT, or VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT

- VUID-VkImageCreateInfo-extent-02252
  `extent.width` must be less than or equal to `imageCreateMaxExtent.width` (as defined in Image Creation Limits)

- VUID-VkImageCreateInfo-extent-02253
  `extent.height` must be less than or equal to `imageCreateMaxExtent.height` (as defined in Image Creation Limits)

- VUID-VkImageCreateInfo-extent-02254
  `extent.depth` must be less than or equal to `imageCreateMaxExtent.depth` (as defined in Image Creation Limits)

- VUID-VkImageCreateInfo-imageType-00956
  If `imageType` is VK_IMAGE_TYPE_1D, both `extent.height` and `extent.depth` must be `1`

- VUID-VkImageCreateInfo-imageType-00957
  If `imageType` is VK_IMAGE_TYPE_2D, `extent.depth` must be `1`

- VUID-VkImageCreateInfo-mipLevels-00958
  `mipLevels` must be less than or equal to the number of levels in the complete mipmap chain based on `extent.width`, `extent.height`, and `extent.depth`

- VUID-VkImageCreateInfo-mipLevels-02255
  `mipLevels` must be less than or equal to `imageCreateMaxMipLevels` (as defined in Image Creation Limits)

- VUID-VkImageCreateInfo-arrayLayers-02256
  `arrayLayers` must be less than or equal to `imageCreateMaxArrayLayers` (as defined in Image Creation Limits)

- VUID-VkImageCreateInfo-imageType-00961
  If `imageType` is VK_IMAGE_TYPE_3D, `arrayLayers` must be `1`

- VUID-VkImageCreateInfo-samples-02257
  If `samples` is not VK_SAMPLE_COUNT_1_BIT, then `imageType` must be VK_IMAGE_TYPE_2D, `flags` must not contain VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT, `mipLevels` must be equal to `1`, and `imageCreateMaybeLinear` (as defined in Image Creation Limits) must be VK_FALSE,

- VUID-VkImageCreateInfo-samples-02558
  If `samples` is not VK_SAMPLE_COUNT_1_BIT, `usage` must not contain VK_IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT

- VUID-VkImageCreateInfo-usage-00963
  If `usage` includes VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT, then bits other than VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, and VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT must not be set

- VUID-VkImageCreateInfo-usage-00964
  If `usage` includes VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT, or VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT, `extent.width` must be less than or equal to `VkPhysicalDeviceLimits`::`maxFramebufferWidth`

- VUID-VkImageCreateInfo-usage-00965
  If `usage` includes VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT, or VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT, `extent.height` must be less than or equal to `VkPhysicalDeviceLimits`::`maxFramebufferHeight`

- VUID-VkImageCreateInfo-fragmentDensityMapOffset-06514
  If the `fragmentDensityMapOffset` feature is not enabled and `usage` includes VK_IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT, `extent.width` must be less than or equal to ⌈min F r a g mentDensit y T exe lS i z e w idth​max F r amebu ff er Width​⌉

- VUID-VkImageCreateInfo-fragmentDensityMapOffset-06515
  If the `fragmentDensityMapOffset` feature is not enabled and `usage` includes VK_IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT, `extent.height` must be less than or equal to ⌈min F r a g mentDensit y T exe lS i z e hei g ht​max F r amebu ff erHei g ht​⌉

- VUID-VkImageCreateInfo-usage-00966
  If `usage` includes VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT, `usage` must also contain at least one of VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, or VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT

- VUID-VkImageCreateInfo-samples-02258
  `samples` must be a valid VkSampleCountFlagBits value that is set in `imageCreateSampleCounts` (as defined in Image Creation Limits)

- VUID-VkImageCreateInfo-usage-00968
  If the `shaderStorageImageMultisample` feature is not enabled, and `usage` contains VK_IMAGE_USAGE_STORAGE_BIT, `samples` must be VK_SAMPLE_COUNT_1_BIT

- VUID-VkImageCreateInfo-flags-00969
  If the `sparseBinding` feature is not enabled, `flags` must not contain VK_IMAGE_CREATE_SPARSE_BINDING_BIT

- VUID-VkImageCreateInfo-flags-01924
  If the `sparseResidencyAliased` feature is not enabled, `flags` must not contain VK_IMAGE_CREATE_SPARSE_ALIASED_BIT

- VUID-VkImageCreateInfo-tiling-04121
  If `tiling` is VK_IMAGE_TILING_LINEAR, `flags` must not contain VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT

- VUID-VkImageCreateInfo-imageType-00970
  If `imageType` is VK_IMAGE_TYPE_1D, `flags` must not contain VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT

- VUID-VkImageCreateInfo-imageType-00971
  If the `sparseResidencyImage2D` feature is not enabled, and `imageType` is VK_IMAGE_TYPE_2D, `flags` must not contain VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT

- VUID-VkImageCreateInfo-imageType-00972
  If the `sparseResidencyImage3D` feature is not enabled, and `imageType` is VK_IMAGE_TYPE_3D, `flags` must not contain VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT

- VUID-VkImageCreateInfo-imageType-00973
  If the `sparseResidency2Samples` feature is not enabled, `imageType` is VK_IMAGE_TYPE_2D, and `samples` is VK_SAMPLE_COUNT_2_BIT, `flags` must not contain VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT

- VUID-VkImageCreateInfo-imageType-00974
  If the `sparseResidency4Samples` feature is not enabled, `imageType` is VK_IMAGE_TYPE_2D, and `samples` is VK_SAMPLE_COUNT_4_BIT, `flags` must not contain VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT

- VUID-VkImageCreateInfo-imageType-00975
  If the `sparseResidency8Samples` feature is not enabled, `imageType` is VK_IMAGE_TYPE_2D, and `samples` is VK_SAMPLE_COUNT_8_BIT, `flags` must not contain VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT

- VUID-VkImageCreateInfo-imageType-00976
  If the `sparseResidency16Samples` feature is not enabled, `imageType` is VK_IMAGE_TYPE_2D, and `samples` is VK_SAMPLE_COUNT_16_BIT, `flags` must not contain VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT

- VUID-VkImageCreateInfo-flags-00987
  If `flags` contains VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT or VK_IMAGE_CREATE_SPARSE_ALIASED_BIT, it must also contain VK_IMAGE_CREATE_SPARSE_BINDING_BIT

- VUID-VkImageCreateInfo-None-01925
  If any of the bits VK_IMAGE_CREATE_SPARSE_BINDING_BIT, VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT, or VK_IMAGE_CREATE_SPARSE_ALIASED_BIT are set, VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT must not also be set

- VUID-VkImageCreateInfo-flags-01890
  If the `protectedMemory` feature is not enabled, `flags` must not contain VK_IMAGE_CREATE_PROTECTED_BIT

- VUID-VkImageCreateInfo-None-01891
  If any of the bits VK_IMAGE_CREATE_SPARSE_BINDING_BIT, VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT, or VK_IMAGE_CREATE_SPARSE_ALIASED_BIT are set, VK_IMAGE_CREATE_PROTECTED_BIT must not also be set

- VUID-VkImageCreateInfo-pNext-00988
  If the `pNext` chain includes a VkExternalMemoryImageCreateInfoNV structure, it must not contain a VkExternalMemoryImageCreateInfo structure

- VUID-VkImageCreateInfo-pNext-00990
  If the `pNext` chain includes a VkExternalMemoryImageCreateInfo structure, its `handleTypes` member must only contain bits that are also in VkExternalImageFormatProperties::`externalMemoryProperties.compatibleHandleTypes`, as returned by vkGetPhysicalDeviceImageFormatProperties2 with `format`, `imageType`, `tiling`, `usage`, and `flags` equal to those in this structure, and with a VkPhysicalDeviceExternalImageFormatInfo structure included in the `pNext` chain, with a `handleType` equal to any one of the handle types specified in VkExternalMemoryImageCreateInfo::`handleTypes`

- VUID-VkImageCreateInfo-pNext-00991
  If the `pNext` chain includes a VkExternalMemoryImageCreateInfoNV structure, its `handleTypes` member must only contain bits that are also in VkExternalImageFormatPropertiesNV::`externalMemoryFeatures.compatibleHandleTypes`, as returned by vkGetPhysicalDeviceExternalImageFormatPropertiesNV with `format`, `imageType`, `tiling`, `usage`, and `flags` equal to those in this structure, and with `externalHandleType` equal to any one of the handle types specified in VkExternalMemoryImageCreateInfoNV::`handleTypes`

- VUID-VkImageCreateInfo-physicalDeviceCount-01421
  If the logical device was created with VkDeviceGroupDeviceCreateInfo::`physicalDeviceCount` equal to 1, `flags` must not contain VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT

- VUID-VkImageCreateInfo-flags-02259
  If `flags` contains VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT, then `mipLevels` must be one, `arrayLayers` must be one, `imageType` must be VK_IMAGE_TYPE_2D, and `imageCreateMaybeLinear` (as defined in Image Creation Limits) must be VK_FALSE

- VUID-VkImageCreateInfo-flags-01572
  If `flags` contains VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT, then `format` must be a compressed image format

- VUID-VkImageCreateInfo-flags-01573
  If `flags` contains VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT, then `flags` must also contain VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT

- VUID-VkImageCreateInfo-initialLayout-00993
  `initialLayout` must be VK_IMAGE_LAYOUT_UNDEFINED or VK_IMAGE_LAYOUT_ZERO_INITIALIZED_EXT or VK_IMAGE_LAYOUT_PREINITIALIZED

- VUID-VkImageCreateInfo-pNext-01443
  If the `pNext` chain includes a VkExternalMemoryImageCreateInfo or `VkExternalMemoryImageCreateInfoNV` structure whose `handleTypes` member is not `0`, `initialLayout` must be VK_IMAGE_LAYOUT_UNDEFINED

- VUID-VkImageCreateInfo-format-06410
  If the image `format` is one of the formats that require a sampler Y′CBCR conversion, `mipLevels` must be 1

- VUID-VkImageCreateInfo-format-06411
  If the image `format` is one of the formats that require a sampler Y′CBCR conversion, `samples` must be VK_SAMPLE_COUNT_1_BIT

- VUID-VkImageCreateInfo-format-06412
  If the image `format` is one of the formats that require a sampler Y′CBCR conversion, `imageType` must be VK_IMAGE_TYPE_2D

- VUID-VkImageCreateInfo-imageCreateFormatFeatures-02260
  If `format` is a multi-planar format, and if `imageCreateFormatFeatures` (as defined in Image Creation Limits) does not contain VK_FORMAT_FEATURE_DISJOINT_BIT, then `flags` must not contain VK_IMAGE_CREATE_DISJOINT_BIT

- VUID-VkImageCreateInfo-format-01577
  If `format` is not a multi-planar format, and `flags` does not include VK_IMAGE_CREATE_ALIAS_BIT, `flags` must not contain VK_IMAGE_CREATE_DISJOINT_BIT

- VUID-VkImageCreateInfo-format-04712
  If `format` has a `_422` or `_420` suffix, `extent.width` must be a multiple of 2

- VUID-VkImageCreateInfo-format-04713
  If `format` has a `_420` suffix, `extent.height` must be a multiple of 2

- VUID-VkImageCreateInfo-format-09583
  If `format` is one of the `VK_FORMAT_PVRTC1_*_IMG` formats, `extent.width` must be a power of 2

- VUID-VkImageCreateInfo-format-09584
  If `format` is one of the `VK_FORMAT_PVRTC1_*_IMG` formats, `extent.height` must be a power of 2

- VUID-VkImageCreateInfo-tiling-02261
  If `tiling` is VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, then the `pNext` chain must include exactly one of VkImageDrmFormatModifierListCreateInfoEXT or VkImageDrmFormatModifierExplicitCreateInfoEXT structures

- VUID-VkImageCreateInfo-pNext-02262
  If the `pNext` chain includes a VkImageDrmFormatModifierListCreateInfoEXT or VkImageDrmFormatModifierExplicitCreateInfoEXT structure, then `tiling` must be VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT

- VUID-VkImageCreateInfo-tiling-02353
  If `tiling` is VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT and `flags` contains VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT, then the `pNext` chain must include a VkImageFormatListCreateInfo structure with non-zero `viewFormatCount`

- VUID-VkImageCreateInfo-flags-01533
  If `flags` contains VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT `format` must be a depth or depth/stencil format

- VUID-VkImageCreateInfo-pNext-02393
  If the `pNext` chain includes a VkExternalMemoryImageCreateInfo structure whose `handleTypes` member includes VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID, `imageType` must be VK_IMAGE_TYPE_2D

- VUID-VkImageCreateInfo-pNext-02394
  If the `pNext` chain includes a VkExternalMemoryImageCreateInfo structure whose `handleTypes` member includes VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID, `mipLevels` must either be `1` or equal to the number of levels in the complete mipmap chain based on `extent.width`, `extent.height`, and `extent.depth`

- VUID-VkImageCreateInfo-pNext-02396
  If the `pNext` chain includes a VkExternalFormatANDROID structure whose `externalFormat` member is not `0`, `flags` must not include VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT

- VUID-VkImageCreateInfo-pNext-02397
  If the `pNext` chain includes a VkExternalFormatANDROID structure whose `externalFormat` member is not `0`, `usage` must not include any usages except VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT, VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, or VK_IMAGE_USAGE_SAMPLED_BIT

- VUID-VkImageCreateInfo-pNext-09457
  If the `pNext` chain includes a VkExternalFormatANDROID structure whose `externalFormat` member is not `0`, and `externalFormatResolve` feature is not enabled, `usage` must not include VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT or VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT

- VUID-VkImageCreateInfo-pNext-02398
  If the `pNext` chain includes a VkExternalFormatANDROID structure whose `externalFormat` member is not `0`, `tiling` must be VK_IMAGE_TILING_OPTIMAL

- VUID-VkImageCreateInfo-pNext-08951
  If the `pNext` chain includes a VkExternalMemoryImageCreateInfo structure whose `handleTypes` member includes VK_EXTERNAL_MEMORY_HANDLE_TYPE_SCREEN_BUFFER_BIT_QNX, `imageType` must be VK_IMAGE_TYPE_2D

- VUID-VkImageCreateInfo-pNext-08952
  If the `pNext` chain includes a VkExternalMemoryImageCreateInfo structure whose `handleTypes` member includes VK_EXTERNAL_MEMORY_HANDLE_TYPE_SCREEN_BUFFER_BIT_QNX, `mipLevels` must either be `1` or equal to the number of levels in the complete mipmap chain based on `extent.width`, `extent.height`, and `extent.depth`

- VUID-VkImageCreateInfo-pNext-08953
  If the `pNext` chain includes a VkExternalFormatQNX structure whose `externalFormat` member is not `0`, `flags` must not include VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT

- VUID-VkImageCreateInfo-pNext-08954
  If the `pNext` chain includes a VkExternalFormatQNX structure whose `externalFormat` member is not `0`, `usage` must not include any usages except VK_IMAGE_USAGE_SAMPLED_BIT

- VUID-VkImageCreateInfo-pNext-08955
  If the `pNext` chain includes a VkExternalFormatQNX structure whose `externalFormat` member is not `0`, `tiling` must be VK_IMAGE_TILING_OPTIMAL

- VUID-VkImageCreateInfo-format-02795
  If `format` is a depth-stencil format, `usage` includes VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, and the `pNext` chain includes a VkImageStencilUsageCreateInfo structure, then its VkImageStencilUsageCreateInfo::`stencilUsage` member must also include VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT

- VUID-VkImageCreateInfo-format-02796
  If `format` is a depth-stencil format, `usage` does not include VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, and the `pNext` chain includes a VkImageStencilUsageCreateInfo structure, then its VkImageStencilUsageCreateInfo::`stencilUsage` member must also not include VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT

- VUID-VkImageCreateInfo-format-02797
  If `format` is a depth-stencil format, `usage` includes VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT, and the `pNext` chain includes a VkImageStencilUsageCreateInfo structure, then its VkImageStencilUsageCreateInfo::`stencilUsage` member must also include VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT

- VUID-VkImageCreateInfo-format-02798
  If `format` is a depth-stencil format, `usage` does not include VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT, and the `pNext` chain includes a VkImageStencilUsageCreateInfo structure, then its VkImageStencilUsageCreateInfo::`stencilUsage` member must also not include VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT

- VUID-VkImageCreateInfo-Format-02536
  If `Format` is a depth-stencil format and the `pNext` chain includes a VkImageStencilUsageCreateInfo structure with its `stencilUsage` member including VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT, `extent.width` must be less than or equal to `VkPhysicalDeviceLimits`::`maxFramebufferWidth`

- VUID-VkImageCreateInfo-format-02537
  If `format` is a depth-stencil format and the `pNext` chain includes a VkImageStencilUsageCreateInfo structure with its `stencilUsage` member including VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT, `extent.height` must be less than or equal to `VkPhysicalDeviceLimits`::`maxFramebufferHeight`

- VUID-VkImageCreateInfo-format-02538
  If the `shaderStorageImageMultisample` feature is not enabled, `format` is a depth-stencil format and the `pNext` chain includes a VkImageStencilUsageCreateInfo structure with its `stencilUsage` including VK_IMAGE_USAGE_STORAGE_BIT, `samples` must be VK_SAMPLE_COUNT_1_BIT

- VUID-VkImageCreateInfo-flags-02050
  If `flags` contains VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV, `imageType` must be VK_IMAGE_TYPE_2D or VK_IMAGE_TYPE_3D

- VUID-VkImageCreateInfo-flags-02051
  If `flags` contains VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV, it must not contain VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT and the `format` must not be a depth/stencil format

- VUID-VkImageCreateInfo-flags-02052
  If `flags` contains VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV and `imageType` is VK_IMAGE_TYPE_2D, `extent.width` and `extent.height` must be greater than `1`

- VUID-VkImageCreateInfo-flags-02053
  If `flags` contains VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV and `imageType` is VK_IMAGE_TYPE_3D, `extent.width`, `extent.height`, and `extent.depth` must be greater than `1`

- VUID-VkImageCreateInfo-imageType-02082
  If `usage` includes VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR, `imageType` must be VK_IMAGE_TYPE_2D

- VUID-VkImageCreateInfo-samples-02083
  If `usage` includes VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR, `samples` must be VK_SAMPLE_COUNT_1_BIT

- VUID-VkImageCreateInfo-shadingRateImage-07727
  If the `shadingRateImage` feature is enabled and `usage` includes VK_IMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV, `tiling` must be VK_IMAGE_TILING_OPTIMAL

- VUID-VkImageCreateInfo-flags-02565
  If `flags` contains VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT, `tiling` must be VK_IMAGE_TILING_OPTIMAL

- VUID-VkImageCreateInfo-flags-02566
  If `flags` contains VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT, `imageType` must be VK_IMAGE_TYPE_2D

- VUID-VkImageCreateInfo-flags-02567
  If `flags` contains VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT, `flags` must not contain VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT

- VUID-VkImageCreateInfo-flags-02568
  If `flags` contains VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT, `mipLevels` must be `1`

- VUID-VkImageCreateInfo-usage-04992
  If `usage` includes VK_IMAGE_USAGE_INVOCATION_MASK_BIT_HUAWEI, `tiling` must be VK_IMAGE_TILING_LINEAR

- VUID-VkImageCreateInfo-imageView2DOn3DImage-04459
  If the `VK_KHR_portability_subset` extension is enabled, and VkPhysicalDevicePortabilitySubsetFeaturesKHR::`imageView2DOn3DImage` is VK_FALSE, `flags` must not contain VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT

- VUID-VkImageCreateInfo-multisampleArrayImage-04460
  If the `VK_KHR_portability_subset` extension is enabled, and VkPhysicalDevicePortabilitySubsetFeaturesKHR::`multisampleArrayImage` is VK_FALSE, and `samples` is not VK_SAMPLE_COUNT_1_BIT, then `arrayLayers` must be `1`

- VUID-VkImageCreateInfo-pNext-06722
  If a VkImageFormatListCreateInfo structure was included in the `pNext` chain and `format` is not a multi-planar format and VkImageFormatListCreateInfo::`viewFormatCount` is not zero, then each format in VkImageFormatListCreateInfo::`pViewFormats` must either be compatible with the `format` as described in the compatibility table or, if `flags` contains VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT, be an uncompressed format that is size-compatible with `format`

- VUID-VkImageCreateInfo-pNext-10062
  If a VkImageFormatListCreateInfo structure was included in the `pNext` chain and `format` is a multi-planar format and `flags` contains VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT and VkImageFormatListCreateInfo::`viewFormatCount` is not zero, then each format in VkImageFormatListCreateInfo::`pViewFormats` must be compatible with the VkFormat for the plane of the image format

- VUID-VkImageCreateInfo-flags-04738
  If `flags` does not contain VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT and the `pNext` chain includes a VkImageFormatListCreateInfo structure, then VkImageFormatListCreateInfo::`viewFormatCount` must be `0` or `1`

- VUID-VkImageCreateInfo-usage-04815
  If `usage` includes VK_IMAGE_USAGE_VIDEO_DECODE_SRC_BIT_KHR, VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR, or VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR, and `flags` does not include VK_IMAGE_CREATE_VIDEO_PROFILE_INDEPENDENT_BIT_KHR, then the `pNext` chain must include a VkVideoProfileListInfoKHR structure with `profileCount` greater than `0` and `pProfiles` including at least one VkVideoProfileInfoKHR structure with a `videoCodecOperation` member specifying a decode operation

- VUID-VkImageCreateInfo-usage-04816
  If `usage` includes VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR, VK_IMAGE_USAGE_VIDEO_ENCODE_DST_BIT_KHR, or VK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR, and `flags` does not include VK_IMAGE_CREATE_VIDEO_PROFILE_INDEPENDENT_BIT_KHR, then the `pNext` chain must include a VkVideoProfileListInfoKHR structure with `profileCount` greater than `0` and `pProfiles` including at least one VkVideoProfileInfoKHR structure with a `videoCodecOperation` member specifying an encode operation

- VUID-VkImageCreateInfo-flags-08328
  If `flags` includes VK_IMAGE_CREATE_VIDEO_PROFILE_INDEPENDENT_BIT_KHR, then `videoMaintenance1` must be enabled

- VUID-VkImageCreateInfo-flags-08329
  If `flags` includes VK_IMAGE_CREATE_VIDEO_PROFILE_INDEPENDENT_BIT_KHR and `usage` does not include VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR, then `usage` must not include VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR

- VUID-VkImageCreateInfo-flags-08331
  If `flags` includes VK_IMAGE_CREATE_VIDEO_PROFILE_INDEPENDENT_BIT_KHR, then `usage` must not include VK_IMAGE_USAGE_VIDEO_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR, VK_IMAGE_USAGE_VIDEO_ENCODE_EMPHASIS_MAP_BIT_KHR, or VK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR

- VUID-VkImageCreateInfo-pNext-06811
  If the `pNext` chain includes a VkVideoProfileListInfoKHR structure with `profileCount` greater than `0`, then `supportedVideoFormat` must be VK_TRUE

- VUID-VkImageCreateInfo-pNext-10784
  If the `pNext` chain includes a VkVideoProfileListInfoKHR structure and for any element of its `pProfiles` member `videoCodecOperation` is VK_VIDEO_CODEC_OPERATION_DECODE_VP9_BIT_KHR, then the `videoDecodeVP9` feature must be enabled

- VUID-VkImageCreateInfo-pNext-10250
  If the `pNext` chain includes a VkVideoProfileListInfoKHR structure and for any element of its `pProfiles` member `videoCodecOperation` is VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR, then the `videoEncodeAV1` feature must be enabled

- VUID-VkImageCreateInfo-pNext-10920
  If the `pNext` chain includes a VkVideoEncodeProfileRgbConversionInfoVALVE structure, then the `videoEncodeRgbConversion` feature must be enabled

- VUID-VkImageCreateInfo-usage-10251
  If `usage` includes VK_IMAGE_USAGE_VIDEO_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR or VK_IMAGE_USAGE_VIDEO_ENCODE_EMPHASIS_MAP_BIT_KHR, then the `videoEncodeQuantizationMap` feature must be enabled

- VUID-VkImageCreateInfo-usage-10252
  If `usage` includes VK_IMAGE_USAGE_VIDEO_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR or VK_IMAGE_USAGE_VIDEO_ENCODE_EMPHASIS_MAP_BIT_KHR, `imageType` must be VK_IMAGE_TYPE_2D

- VUID-VkImageCreateInfo-usage-10253
  If `usage` includes VK_IMAGE_USAGE_VIDEO_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR or VK_IMAGE_USAGE_VIDEO_ENCODE_EMPHASIS_MAP_BIT_KHR, `samples` must be VK_SAMPLE_COUNT_1_BIT

- VUID-VkImageCreateInfo-usage-10254
  If `usage` includes VK_IMAGE_USAGE_VIDEO_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR or VK_IMAGE_USAGE_VIDEO_ENCODE_EMPHASIS_MAP_BIT_KHR, then the `pNext` chain must include a VkVideoProfileListInfoKHR structure with `profileCount` equal to `1` and `pProfiles` pointing to a VkVideoProfileInfoKHR structure with a `videoCodecOperation` member specifying an encode operation

- VUID-VkImageCreateInfo-usage-10255
  If `usage` includes VK_IMAGE_USAGE_VIDEO_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR, then VkVideoEncodeCapabilitiesKHR::`flags` must include VK_VIDEO_ENCODE_CAPABILITY_QUANTIZATION_DELTA_MAP_BIT_KHR, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile specified in the `pProfiles` member of the VkVideoProfileListInfoKHR structure included in the `pNext` chain

- VUID-VkImageCreateInfo-usage-10256
  If `usage` includes VK_IMAGE_USAGE_VIDEO_ENCODE_EMPHASIS_MAP_BIT_KHR, then VkVideoEncodeCapabilitiesKHR::`flags` must include VK_VIDEO_ENCODE_CAPABILITY_EMPHASIS_MAP_BIT_KHR, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile specified in the `pProfiles` member of the VkVideoProfileListInfoKHR structure included in the `pNext` chain

- VUID-VkImageCreateInfo-usage-10257
  If `usage` includes VK_IMAGE_USAGE_VIDEO_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR or VK_IMAGE_USAGE_VIDEO_ENCODE_EMPHASIS_MAP_BIT_KHR, `extent.width` must be less than or equal to VkVideoEncodeQuantizationMapCapabilitiesKHR::`maxQuantizationMapExtent.width`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile specified in the `pProfiles` member of the VkVideoProfileListInfoKHR structure included in the `pNext` chain

- VUID-VkImageCreateInfo-usage-10258
  If `usage` includes VK_IMAGE_USAGE_VIDEO_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR or VK_IMAGE_USAGE_VIDEO_ENCODE_EMPHASIS_MAP_BIT_KHR, `extent.height` must be less than or equal to VkVideoEncodeQuantizationMapCapabilitiesKHR::`maxQuantizationMapExtent.height`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile specified in the `pProfiles` member of the VkVideoProfileListInfoKHR structure included in the `pNext` chain

- VUID-VkImageCreateInfo-pNext-06390
  If the VkImage is to be used to import memory from a VkBufferCollectionFUCHSIA, a VkBufferCollectionImageCreateInfoFUCHSIA structure must be chained to `pNext`

- VUID-VkImageCreateInfo-multisampledRenderToSingleSampled-06882
  If the `multisampledRenderToSingleSampled` feature is not enabled, `flags` must not contain VK_IMAGE_CREATE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_BIT_EXT

- VUID-VkImageCreateInfo-flags-06883
  If `flags` contains VK_IMAGE_CREATE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_BIT_EXT, `samples` must be VK_SAMPLE_COUNT_1_BIT

- VUID-VkImageCreateInfo-pNext-06743
  If the `pNext` chain includes a VkImageCompressionControlEXT structure, `format` is a multi-planar format, and VkImageCompressionControlEXT::`flags` includes VK_IMAGE_COMPRESSION_FIXED_RATE_EXPLICIT_EXT, then VkImageCompressionControlEXT::`compressionControlPlaneCount` must be equal to the number of planes in `format`

- VUID-VkImageCreateInfo-pNext-06744
  If the `pNext` chain includes a VkImageCompressionControlEXT structure, `format` is not a multi-planar format, and VkImageCompressionControlEXT::`flags` includes VK_IMAGE_COMPRESSION_FIXED_RATE_EXPLICIT_EXT, then VkImageCompressionControlEXT::`compressionControlPlaneCount` must be 1

- VUID-VkImageCreateInfo-pNext-06746
  If the `pNext` chain includes a VkImageCompressionControlEXT structure, it must not contain a VkImageDrmFormatModifierExplicitCreateInfoEXT structure

- VUID-VkImageCreateInfo-flags-08104
  If `flags` includes VK_IMAGE_CREATE_DESCRIPTOR_HEAP_CAPTURE_REPLAY_BIT_EXT, the `descriptorBufferCaptureReplay` or `descriptorHeapCaptureReplay` feature must be enabled

- VUID-VkImageCreateInfo-pNext-08105
  If the `pNext` chain includes a VkOpaqueCaptureDescriptorDataCreateInfoEXT structure, `flags` must contain VK_IMAGE_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT

- VUID-VkImageCreateInfo-pNext-06783
  If the `pNext` chain includes a VkExportMetalObjectCreateInfoEXT structure, its `exportObjectType` member must be either VK_EXPORT_METAL_OBJECT_TYPE_METAL_TEXTURE_BIT_EXT or VK_EXPORT_METAL_OBJECT_TYPE_METAL_IOSURFACE_BIT_EXT

- VUID-VkImageCreateInfo-pNext-06784
  If the `pNext` chain includes a VkImportMetalTextureInfoEXT structure its `plane` member must be VK_IMAGE_ASPECT_PLANE_0_BIT, VK_IMAGE_ASPECT_PLANE_1_BIT, or VK_IMAGE_ASPECT_PLANE_2_BIT

- VUID-VkImageCreateInfo-pNext-06785
  If the `pNext` chain includes a VkImportMetalTextureInfoEXT structure and the image does not have a multi-planar format, then VkImportMetalTextureInfoEXT::`plane` must be VK_IMAGE_ASPECT_PLANE_0_BIT

- VUID-VkImageCreateInfo-pNext-06786
  If the `pNext` chain includes a VkImportMetalTextureInfoEXT structure and the image has a multi-planar format with only two planes, then VkImportMetalTextureInfoEXT::`plane` must not be VK_IMAGE_ASPECT_PLANE_2_BIT

- VUID-VkImageCreateInfo-imageCreateFormatFeatures-09048
  If `imageCreateFormatFeatures` (as defined in Image Creation Limits) does not contain VK_FORMAT_FEATURE_2_HOST_IMAGE_TRANSFER_BIT, then `usage` must not contain VK_IMAGE_USAGE_HOST_TRANSFER_BIT

- VUID-VkImageCreateInfo-usage-10245
  If `usage` includes VK_IMAGE_USAGE_HOST_TRANSFER_BIT, then the `hostImageCopy` feature must be enabled

- VUID-VkImageCreateInfo-tileMemoryHeap-10766
  If the `tileMemoryHeap` feature is not enabled, `usage` must not include VK_IMAGE_USAGE_TILE_MEMORY_BIT_QCOM

- VUID-VkImageCreateInfo-pNext-09653
  If the `pNext` chain contains a VkImageAlignmentControlCreateInfoMESA structure, `tiling` must be VK_IMAGE_TILING_OPTIMAL

- VUID-VkImageCreateInfo-pNext-09654
  If the `pNext` chain contains a VkImageAlignmentControlCreateInfoMESA structure, it must not contain a VkExternalMemoryImageCreateInfo structure

- VUID-VkImageCreateInfo-tiling-09711
  If `tiling` is VK_IMAGE_TILING_LINEAR then VK_IMAGE_USAGE_TENSOR_ALIASING_BIT_ARM must not be set in `usage`

- VUID-VkImageCreateInfo-flags-13355
  If `flags` contains VK_IMAGE_CREATE_ALIAS_SINGLE_LAYER_DESCRIPTOR_BIT_KHR, the `maintenance11` feature must be enabled

- VUID-VkImageCreateInfo-flags-13356
  If `flags` contains VK_IMAGE_CREATE_ALIAS_SINGLE_LAYER_DESCRIPTOR_BIT_KHR, `imageType` must be VK_IMAGE_TYPE_1D or VK_IMAGE_TYPE_2D

- VUID-VkImageCreateInfo-None-12279
  If Vulkan 1.3 is not supported and the `ycbcr2plane444Formats` feature is not enabled, `format` must not be VK_FORMAT_G8_B8R8_2PLANE_444_UNORM, VK_FORMAT_G10X6_B10X6R10X6_2PLANE_444_UNORM_3PACK16, VK_FORMAT_G12X4_B12X4R12X4_2PLANE_444_UNORM_3PACK16, or VK_FORMAT_G16_B16R16_2PLANE_444_UNORM

- VUID-VkImageCreateInfo-flags-11281
  If VkOpaqueCaptureDataCreateInfoEXT::`pData` is not `NULL`, `flags` must contain VK_IMAGE_CREATE_DESCRIPTOR_HEAP_CAPTURE_REPLAY_BIT_EXT

- VUID-VkImageCreateInfo-pData-11286
  If `flags` contains VK_IMAGE_CREATE_DESCRIPTOR_HEAP_CAPTURE_REPLAY_BIT_EXT, and VkOpaqueCaptureDataCreateInfoEXT::`pData` is not `NULL`, VkOpaqueCaptureDataCreateInfoEXT::`pData->size` must be equal to `imageCaptureReplayOpaqueDataSize`

- VUID-VkImageCreateInfo-pNext-12442
  `pNext` must contain at most one of the structures VkImageStencilUsageCreateInfo and VkImageStencilUsage2CreateInfoKHR

Valid Usage (Implicit)

- VUID-VkImageCreateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO

- VUID-VkImageCreateInfo-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkBufferCollectionImageCreateInfoFUCHSIA, VkDataGraphOpticalFlowImageFormatInfoARM, VkDedicatedAllocationImageCreateInfoNV, VkExportMetalObjectCreateInfoEXT, VkExternalFormatANDROID, VkExternalFormatOHOS, VkExternalFormatQNX, VkExternalMemoryImageCreateInfo, VkExternalMemoryImageCreateInfoNV, VkImageAlignmentControlCreateInfoMESA, VkImageCompressionControlEXT, VkImageCreateFlags2CreateInfoKHR, VkImageDrmFormatModifierExplicitCreateInfoEXT, VkImageDrmFormatModifierListCreateInfoEXT, VkImageFormatListCreateInfo, VkImageStencilUsage2CreateInfoKHR, VkImageStencilUsageCreateInfo, VkImageSwapchainCreateInfoKHR, VkImageUsageFlags2CreateInfoKHR, VkImportMetalIOSurfaceInfoEXT, VkImportMetalTextureInfoEXT, VkOpaqueCaptureDataCreateInfoEXT, VkOpaqueCaptureDescriptorDataCreateInfoEXT, VkOpticalFlowImageFormatInfoNV, or VkVideoProfileListInfoKHR

- VUID-VkImageCreateInfo-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique, with the exception of structures of type VkExportMetalObjectCreateInfoEXT or VkImportMetalTextureInfoEXT

- VUID-VkImageCreateInfo-flags-parameter
  `flags` must be a valid combination of VkImageCreateFlagBits values

- VUID-VkImageCreateInfo-imageType-parameter
  `imageType` must be a valid VkImageType value

- VUID-VkImageCreateInfo-format-parameter
  `format` must be a valid VkFormat value

- VUID-VkImageCreateInfo-samples-parameter
  `samples` must be a valid VkSampleCountFlagBits value

- VUID-VkImageCreateInfo-tiling-parameter
  `tiling` must be a valid VkImageTiling value

- VUID-VkImageCreateInfo-usage-parameter
  `usage` must be a valid combination of VkImageUsageFlagBits values

- VUID-VkImageCreateInfo-usage-requiredbitmask
  `usage` must not be `0`

- VUID-VkImageCreateInfo-sharingMode-parameter
  `sharingMode` must be a valid VkSharingMode value

- VUID-VkImageCreateInfo-initialLayout-parameter
  `initialLayout` must be a valid VkImageLayout value

The `VkImageCreateFlags2CreateInfoKHR` structure is defined as:

    // Provided by VK_KHR_extended_flags
    typedef struct VkImageCreateFlags2CreateInfoKHR {
        VkStructureType           sType;
        void*                     pNext;
        VkImageCreateFlags2KHR    flags;
    } VkImageCreateFlags2CreateInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask of VkImageCreateFlagBits2KHR specifying creation flags of the image.

If this structure is included in the `pNext` chain of an image creation structure, `flags` is used instead of the corresponding `flags` value passed in that creation structure, allowing additional create flags to be specified.

If this structure is included in the `pNext` chain of a query structure including VkImageCreateFlags, the create flags of the image are returned in `flags` of this structure, allowing additional create flags to be queried. The flags representable in VkImageCreateFlags are still returned in the query structure in this case.

Valid Usage (Implicit)

- VUID-VkImageCreateFlags2CreateInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_IMAGE_CREATE_FLAGS_2_CREATE_INFO_KHR

- VUID-VkImageCreateFlags2CreateInfoKHR-flags-parameter
  `flags` must be a valid combination of VkImageCreateFlagBits2KHR values

- VUID-VkImageCreateFlags2CreateInfoKHR-flags-requiredbitmask
  `flags` must not be `0`

Structure Chaining

Extends the structures

  - VkFramebufferAttachmentImageInfo

  - VkImageCreateInfo

  - VkPhysicalDeviceImageFormatInfo2

  - VkVideoFormatPropertiesKHR

The `VkImageUsageFlags2CreateInfoKHR` structure is defined as:

    // Provided by VK_KHR_extended_flags
    typedef struct VkImageUsageFlags2CreateInfoKHR {
        VkStructureType          sType;
        void*                    pNext;
        VkImageUsageFlags2KHR    usage;
    } VkImageUsageFlags2CreateInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `usage` is a bitmask of VkImageUsageFlagBits2KHR specifying allowed usages of the image.

If this structure is included in the `pNext` chain of an image creation structure, `usage` is used instead of the corresponding `usage` value passed in that creation structure, allowing additional usage flags to be specified.

If this structure is included in the `pNext` chain of a query structure including VkImageCreateFlags, the usage flags of the image are returned in `flags` of this structure, allowing additional usage flags to be queried. The flags representable in VkImageUsageFlags are still returned in the query structure in this case.

Valid Usage (Implicit)

- VUID-VkImageUsageFlags2CreateInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_IMAGE_USAGE_FLAGS_2_CREATE_INFO_KHR

- VUID-VkImageUsageFlags2CreateInfoKHR-usage-parameter
  `usage` must be a valid combination of VkImageUsageFlagBits2KHR values

- VUID-VkImageUsageFlags2CreateInfoKHR-usage-requiredbitmask
  `usage` must not be `0`

Structure Chaining

Extends the structures

  - VkFramebufferAttachmentImageInfo

  - VkImageCreateInfo

  - VkPhysicalDeviceImageFormatInfo2

  - VkPhysicalDeviceSparseImageFormatInfo2

  - VkPhysicalDeviceVideoFormatInfoKHR

  - VkSurfaceCapabilities2KHR

  - VkSwapchainCreateInfoKHR

  - VkVideoFormatPropertiesKHR

The `VkBufferCollectionImageCreateInfoFUCHSIA` structure is defined as:

    // Provided by VK_FUCHSIA_buffer_collection
    typedef struct VkBufferCollectionImageCreateInfoFUCHSIA {
        VkStructureType              sType;
        const void*                  pNext;
        VkBufferCollectionFUCHSIA    collection;
        uint32_t                     index;
    } VkBufferCollectionImageCreateInfoFUCHSIA;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure

- `collection` is the VkBufferCollectionFUCHSIA handle

- `index` is the index of the buffer in the buffer collection from which the memory will be imported

Valid Usage

- VUID-VkBufferCollectionImageCreateInfoFUCHSIA-index-06391
  `index` must be less than VkBufferCollectionPropertiesFUCHSIA::`bufferCount`

Valid Usage (Implicit)

- VUID-VkBufferCollectionImageCreateInfoFUCHSIA-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_BUFFER_COLLECTION_IMAGE_CREATE_INFO_FUCHSIA

- VUID-VkBufferCollectionImageCreateInfoFUCHSIA-collection-parameter
  `collection` must be a valid VkBufferCollectionFUCHSIA handle

Structure Chaining

Extends the structure

  - VkImageCreateInfo

The `VkImageStencilUsageCreateInfo` structure is defined as:

    // Provided by VK_VERSION_1_2
    typedef struct VkImageStencilUsageCreateInfo {
        VkStructureType      sType;
        const void*          pNext;
        VkImageUsageFlags    stencilUsage;
    } VkImageStencilUsageCreateInfo;

    // Provided by VK_EXT_separate_stencil_usage
    // Equivalent to VkImageStencilUsageCreateInfo
    typedef VkImageStencilUsageCreateInfo VkImageStencilUsageCreateInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `stencilUsage` is a bitmask of VkImageUsageFlagBits describing the intended usage of the stencil aspect of the image.

If the `pNext` chain of VkImageCreateInfo includes a `VkImageStencilUsageCreateInfo` structure, then that structure includes the usage flags specific to the stencil aspect of the image for an image with a depth-stencil format.

This structure specifies image usages which only apply to the stencil aspect of a depth/stencil format image. When this structure is included in the `pNext` chain of VkImageCreateInfo, the stencil aspect of the image must only be used as specified by `stencilUsage`. Use of other aspects of an image are unaffected by this structure.

This structure can also be included in the `pNext` chain of VkPhysicalDeviceImageFormatInfo2 to query additional capabilities specific to image creation parameter combinations including a separate set of usage flags for the stencil aspect of the image using vkGetPhysicalDeviceImageFormatProperties2. When this structure is not included in the `pNext` chain of `VkPhysicalDeviceImageFormatInfo2` then the implicit value of `stencilUsage` matches that of `VkPhysicalDeviceImageFormatInfo2`::`usage`.

Valid Usage

- VUID-VkImageStencilUsageCreateInfo-stencilUsage-02539
  If `stencilUsage` includes VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT, it must not include bits other than VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT or VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT

Valid Usage (Implicit)

- VUID-VkImageStencilUsageCreateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_IMAGE_STENCIL_USAGE_CREATE_INFO

- VUID-VkImageStencilUsageCreateInfo-stencilUsage-parameter
  `stencilUsage` must be a valid combination of VkImageUsageFlagBits values

- VUID-VkImageStencilUsageCreateInfo-stencilUsage-requiredbitmask
  `stencilUsage` must not be `0`

Structure Chaining

Extends the structures

  - VkImageCreateInfo

  - VkPhysicalDeviceImageFormatInfo2

The `VkImageStencilUsage2CreateInfoKHR` structure is defined as:

    // Provided by VK_KHR_extended_flags with VK_VERSION_1_2 or VK_EXT_separate_stencil_usage
    typedef struct VkImageStencilUsage2CreateInfoKHR {
        VkStructureType          sType;
        void*                    pNext;
        VkImageUsageFlags2KHR    stencilUsage;
    } VkImageStencilUsage2CreateInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `stencilUsage` is a bitmask of VkImageUsageFlagBits2KHR describing the intended usage of the stencil aspect of the image.

If the `pNext` chain of VkImageCreateInfo includes a `VkImageStencilUsage2CreateInfoKHR` structure, then that structure includes the usage flags specific to the stencil aspect of the image for an image with a depth-stencil format.

This structure specifies image usages which only apply to the stencil aspect of a depth/stencil format image. When this structure is included in the `pNext` chain of VkImageCreateInfo, the stencil aspect of the image must only be used as specified by `stencilUsage`. Use of other aspects of an image are unaffected by this structure.

This structure can also be included in the `pNext` chain of VkPhysicalDeviceImageFormatInfo2 to query additional capabilities specific to image creation parameter combinations including a separate set of usage flags for the stencil aspect of the image using vkGetPhysicalDeviceImageFormatProperties2. When this structure is not included in the `pNext` chain of `VkPhysicalDeviceImageFormatInfo2` then the implicit value of `stencilUsage` matches that of `VkPhysicalDeviceImageFormatInfo2`::`usage`.

Valid Usage

- VUID-VkImageStencilUsage2CreateInfoKHR-stencilUsage-12443
  If `stencilUsage` includes VK_IMAGE_USAGE_2_TRANSIENT_ATTACHMENT_BIT_KHR, it must not include bits other than VK_IMAGE_USAGE_2_DEPTH_STENCIL_ATTACHMENT_BIT_KHR or VK_IMAGE_USAGE_2_INPUT_ATTACHMENT_BIT_KHR

Valid Usage (Implicit)

- VUID-VkImageStencilUsage2CreateInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_IMAGE_STENCIL_USAGE_2_CREATE_INFO_KHR

- VUID-VkImageStencilUsage2CreateInfoKHR-stencilUsage-parameter
  `stencilUsage` must be a valid combination of VkImageUsageFlagBits2KHR values

- VUID-VkImageStencilUsage2CreateInfoKHR-stencilUsage-requiredbitmask
  `stencilUsage` must not be `0`

Structure Chaining

Extends the structures

  - VkImageCreateInfo

  - VkPhysicalDeviceImageFormatInfo2

If the `pNext` chain includes a `VkDedicatedAllocationImageCreateInfoNV` structure, then that structure includes an enable controlling whether the image will have a dedicated memory allocation bound to it.

The `VkDedicatedAllocationImageCreateInfoNV` structure is defined as:

    // Provided by VK_NV_dedicated_allocation
    typedef struct VkDedicatedAllocationImageCreateInfoNV {
        VkStructureType    sType;
        const void*        pNext;
        VkBool32           dedicatedAllocation;
    } VkDedicatedAllocationImageCreateInfoNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `dedicatedAllocation` specifies whether the image will have a dedicated allocation bound to it.

Note | Using a dedicated allocation for color and depth/stencil attachments or other large images may improve performance on some devices.

Valid Usage

- VUID-VkDedicatedAllocationImageCreateInfoNV-dedicatedAllocation-00994
  If `dedicatedAllocation` is VK_TRUE, VkImageCreateInfo::`flags` must not include VK_IMAGE_CREATE_SPARSE_BINDING_BIT, VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT, or VK_IMAGE_CREATE_SPARSE_ALIASED_BIT

Valid Usage (Implicit)

- VUID-VkDedicatedAllocationImageCreateInfoNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV

Structure Chaining

Extends the structure

  - VkImageCreateInfo

To define a set of external memory handle types that may be used as backing store for an image, add a VkExternalMemoryImageCreateInfo structure to the `pNext` chain of the VkImageCreateInfo structure. The `VkExternalMemoryImageCreateInfo` structure is defined as:

    // Provided by VK_VERSION_1_1
    typedef struct VkExternalMemoryImageCreateInfo {
        VkStructureType                    sType;
        const void*                        pNext;
        VkExternalMemoryHandleTypeFlags    handleTypes;
    } VkExternalMemoryImageCreateInfo;

    // Provided by VK_KHR_external_memory
    // Equivalent to VkExternalMemoryImageCreateInfo
    typedef VkExternalMemoryImageCreateInfo VkExternalMemoryImageCreateInfoKHR;

Note | A `VkExternalMemoryImageCreateInfo` structure with a non-zero `handleTypes` field must be included in the creation parameters for an image that will be bound to memory that is either exported or imported.

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `handleTypes` is zero or a bitmask of VkExternalMemoryHandleTypeFlagBits specifying one or more external memory handle types.

Valid Usage (Implicit)

- VUID-VkExternalMemoryImageCreateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO

- VUID-VkExternalMemoryImageCreateInfo-handleTypes-parameter
  `handleTypes` must be a valid combination of VkExternalMemoryHandleTypeFlagBits values

Structure Chaining

Extends the structure

  - VkImageCreateInfo

#### 12.4.1. Use External Memory On Open Harmony OS platform

The `VkExternalFormatOHOS` structure is defined as:

    // Provided by VK_OHOS_external_memory
    typedef struct VkExternalFormatOHOS {
        VkStructureType    sType;
        void*              pNext;
        uint64_t           externalFormat;
    } VkExternalFormatOHOS;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `externalFormat` is an implementation-defined identifier for the external format.

To obtain additional format that are not provided by VkFormat for an Open Harmony OS hardware buffer, this structure should be included in the pNext chain of another structure. The return value of `externalFormat` indicates whether an additional format exists. If zero is returned, then no external format is used and other format information should be used for implementations, and this is also true if this structure is not present.

Valid Usage (Implicit)

- VUID-VkExternalFormatOHOS-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_EXTERNAL_FORMAT_OHOS

Structure Chaining

Extends the structures

  - VkAttachmentDescription2

  - VkCommandBufferInheritanceInfo

  - VkGraphicsPipelineCreateInfo

  - VkImageCreateInfo

  - VkSamplerYcbcrConversionCreateInfo

To import memory created outside of the current Vulkan instance from an Open Harmony OS native buffer, add a `VkImportNativeBufferInfoOHOS` structure to the `pNext` chain of the VkMemoryAllocateInfo structure. The `VkImportNativeBufferInfoOHOS` structure is defined as:

    // Provided by VK_OHOS_external_memory
    typedef struct VkImportNativeBufferInfoOHOS {
        VkStructureType            sType;
        const void*                pNext;
        struct OH_NativeBuffer*    buffer;
    } VkImportNativeBufferInfoOHOS;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `buffer` is a pointer to an OH_NativeBuffer structure.

A reference to the imported native buffer should be acquired by the implementation if the vkAllocateMemory command succeeds. Then the reference must release when the device memory object is freed. If the command fails, the implementation must not retain a reference.

Valid Usage (Implicit)

- VUID-VkImportNativeBufferInfoOHOS-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_IMPORT_NATIVE_BUFFER_INFO_OHOS

- VUID-VkImportNativeBufferInfoOHOS-buffer-parameter
  `buffer` must be a valid pointer to an OH_NativeBuffer value

Structure Chaining

Extends the structure

  - VkMemoryAllocateInfo

The OH_NativeBuffer structure is defined as:

    // Provided by VK_OHOS_external_memory
    struct OH_NativeBuffer;

It is the native buffer structure on Open Harmony OS platform. It is defined in Open Harmony OS NDK headers.

To obtain optimal Open Harmony OS native buffer usage flags for specific image creation parameters, add a `VkNativeBufferUsageOHOS` structure to the `pNext` chain of a VkImageFormatProperties2 structure passed to vkGetPhysicalDeviceImageFormatProperties2.

The `VkNativeBufferUsageOHOS` structure is defined as:

    // Provided by VK_OHOS_external_memory
    typedef struct VkNativeBufferUsageOHOS {
        VkStructureType    sType;
        void*              pNext;
        uint64_t           OHOSNativeBufferUsage;
    } VkNativeBufferUsageOHOS;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `OHOSNativeBufferUsage` returns the Open Harmony OS buffer usage flags.

Valid Usage (Implicit)

- VUID-VkNativeBufferUsageOHOS-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_NATIVE_BUFFER_USAGE_OHOS

Structure Chaining

Extends the structure

  - VkImageFormatProperties2

To determine the memory parameters to use when importing an Open Harmony OS native buffer:

    // Provided by VK_OHOS_external_memory
    VkResult vkGetNativeBufferPropertiesOHOS(
        VkDevice                                    device,
        const struct OH_NativeBuffer*               buffer,
        VkNativeBufferPropertiesOHOS*               pProperties);

- `device` is the logical device that will be importing `buffer`.

- `buffer` is the OH_NativeBuffer object specifies the buffer for which its properties are to be queried.

- `pProperties` is a pointer to a VkNativeBufferPropertiesOHOS structure in which the properties of `buffer` are returned.

Valid Usage (Implicit)

- VUID-vkGetNativeBufferPropertiesOHOS-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetNativeBufferPropertiesOHOS-buffer-parameter
  `buffer` must be a valid pointer to a valid OH_NativeBuffer value

- VUID-vkGetNativeBufferPropertiesOHOS-pProperties-parameter
  `pProperties` must be a valid pointer to a VkNativeBufferPropertiesOHOS structure

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

To obtain an OH_NativeBuffer object, call:

    // Provided by VK_OHOS_external_memory
    VkResult vkGetMemoryNativeBufferOHOS(
        VkDevice                                    device,
        const VkMemoryGetNativeBufferInfoOHOS*      pInfo,
        struct OH_NativeBuffer**                    pBuffer);

- `device` is a valid Vulkan device object.

- `pInfo` is a pointer pointing to a `VkMemoryGetNativeBufferInfoOHOS` structure.

- `pBuffer` is a pointer to an OH_NativeBuffer object.

Valid Usage (Implicit)

- VUID-vkGetMemoryNativeBufferOHOS-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetMemoryNativeBufferOHOS-pInfo-parameter
  `pInfo` must be a valid pointer to a valid VkMemoryGetNativeBufferInfoOHOS structure

- VUID-vkGetMemoryNativeBufferOHOS-pBuffer-parameter
  `pBuffer` must be a valid pointer to a valid pointer to an OH_NativeBuffer value

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkNativeBufferPropertiesOHOS` structure is defined as:

    // Provided by VK_OHOS_external_memory
    typedef struct VkNativeBufferPropertiesOHOS {
        VkStructureType    sType;
        void*              pNext;
        VkDeviceSize       allocationSize;
        uint32_t           memoryTypeBits;
    } VkNativeBufferPropertiesOHOS;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `allocationSize` is the size of the external memory.

- `memoryTypeBits` is a bitmask containing one bit set for every memory type which the specified Open Harmony OS native buffer can be imported as.

Valid Usage (Implicit)

- VUID-VkNativeBufferPropertiesOHOS-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_NATIVE_BUFFER_PROPERTIES_OHOS

- VUID-VkNativeBufferPropertiesOHOS-pNext-pNext
  `pNext` must be `NULL` or a pointer to a valid instance of VkNativeBufferFormatPropertiesOHOS

- VUID-VkNativeBufferPropertiesOHOS-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

To obtain format properties of an Open Harmony OS native buffer, include a `VkNativeBufferFormatPropertiesOHOS` structure in the `pNext` chain of the VkNativeBufferPropertiesOHOS structure passed to vkGetNativeBufferPropertiesOHOS. The `VkNativeBufferFormatPropertiesOHOS` structure is defined as:

    // Provided by VK_OHOS_external_memory
    typedef struct VkNativeBufferFormatPropertiesOHOS {
        VkStructureType                  sType;
        void*                            pNext;
        VkFormat                         format;
        uint64_t                         externalFormat;
        VkFormatFeatureFlags             formatFeatures;
        VkComponentMapping               samplerYcbcrConversionComponents;
        VkSamplerYcbcrModelConversion    suggestedYcbcrModel;
        VkSamplerYcbcrRange              suggestedYcbcrRange;
        VkChromaLocation                 suggestedXChromaOffset;
        VkChromaLocation                 suggestedYChromaOffset;
    } VkNativeBufferFormatPropertiesOHOS;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `format` is the Vulkan format corresponding to the Open Harmony OS native buffer’s format, or VK_FORMAT_UNDEFINED if there is not an equivalent Vulkan format.

- `externalFormat` is an implementation-defined external format identifier for use with VkExternalFormatOHOS.

- `formatFeatures` describes the capabilities of this external format when used with an image bound to memory imported from `buffer`.

- `samplerYcbcrConversionComponents` represents a set of VkComponentSwizzle.

- `suggestedYcbcrModel` represents the color model.

- `suggestedYcbcrRange` represents the numerical value range.

- `suggestedXChromaOffset` represents the X chroma offset.

- `suggestedYChromaOffset` represents the Y chroma offset.

Valid Usage (Implicit)

- VUID-VkNativeBufferFormatPropertiesOHOS-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_NATIVE_BUFFER_FORMAT_PROPERTIES_OHOS

Structure Chaining

Extends the structure

  - VkNativeBufferPropertiesOHOS

The `VkMemoryGetNativeBufferInfoOHOS` structure is defined as:

    // Provided by VK_OHOS_external_memory
    typedef struct VkMemoryGetNativeBufferInfoOHOS {
        VkStructureType    sType;
        const void*        pNext;
        VkDeviceMemory     memory;
    } VkMemoryGetNativeBufferInfoOHOS;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `memory` is a valid `VkDeviceMemory` object from which the Open Harmony OS native buffer will be exported.

Valid Usage (Implicit)

- VUID-VkMemoryGetNativeBufferInfoOHOS-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_MEMORY_GET_NATIVE_BUFFER_INFO_OHOS

- VUID-VkMemoryGetNativeBufferInfoOHOS-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkMemoryGetNativeBufferInfoOHOS-memory-parameter
  `memory` must be a valid VkDeviceMemory handle

If the `pNext` chain includes a `VkExternalMemoryImageCreateInfoNV` structure, then that structure defines a set of external memory handle types that may be used as backing store for the image.

The `VkExternalMemoryImageCreateInfoNV` structure is defined as:

    // Provided by VK_NV_external_memory
    typedef struct VkExternalMemoryImageCreateInfoNV {
        VkStructureType                      sType;
        const void*                          pNext;
        VkExternalMemoryHandleTypeFlagsNV    handleTypes;
    } VkExternalMemoryImageCreateInfoNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `handleTypes` is zero or a bitmask of VkExternalMemoryHandleTypeFlagBitsNV specifying one or more external memory handle types.

Valid Usage (Implicit)

- VUID-VkExternalMemoryImageCreateInfoNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV

- VUID-VkExternalMemoryImageCreateInfoNV-handleTypes-parameter
  `handleTypes` must be a valid combination of VkExternalMemoryHandleTypeFlagBitsNV values

Structure Chaining

Extends the structure

  - VkImageCreateInfo

`VkExternalFormatANDROID` is defined as:

    // Provided by VK_ANDROID_external_memory_android_hardware_buffer
    typedef struct VkExternalFormatANDROID {
        VkStructureType    sType;
        void*              pNext;
        uint64_t           externalFormat;
    } VkExternalFormatANDROID;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `externalFormat` is an implementation-defined identifier for the external format

When included in the `pNext` chain of another structure, it indicates additional format information beyond what is provided by VkFormat values for an Android hardware buffer. If `externalFormat` is zero, it indicates that no external format is used, and implementations should rely only on other format information. If this structure is not present, it is equivalent to setting `externalFormat` to zero.

Valid Usage

- VUID-VkExternalFormatANDROID-externalFormat-01894
  `externalFormat` must be `0` or a value returned in the `externalFormat` member of VkAndroidHardwareBufferFormatPropertiesANDROID by an earlier call to vkGetAndroidHardwareBufferPropertiesANDROID

Valid Usage (Implicit)

- VUID-VkExternalFormatANDROID-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_EXTERNAL_FORMAT_ANDROID

Structure Chaining

Extends the structures

  - VkAttachmentDescription2

  - VkCommandBufferInheritanceInfo

  - VkGraphicsPipelineCreateInfo

  - VkImageCreateInfo

  - VkSamplerYcbcrConversionCreateInfo

To create an image with an QNX Screen external format, add a `VkExternalFormatQNX` structure in the `pNext` chain of VkImageCreateInfo. `VkExternalFormatQNX` is defined as:

    // Provided by VK_QNX_external_memory_screen_buffer
    typedef struct VkExternalFormatQNX {
        VkStructureType    sType;
        void*              pNext;
        uint64_t           externalFormat;
    } VkExternalFormatQNX;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `externalFormat` is an implementation-defined identifier for the external format

If `externalFormat` is zero, the effect is as if the `VkExternalFormatQNX` structure was not present. Otherwise, the `image` will have the specified external format.

Valid Usage

- VUID-VkExternalFormatQNX-externalFormat-08956
  `externalFormat` must be `0` or a value returned in the `externalFormat` member of VkScreenBufferFormatPropertiesQNX by an earlier call to vkGetScreenBufferPropertiesQNX

Valid Usage (Implicit)

- VUID-VkExternalFormatQNX-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_EXTERNAL_FORMAT_QNX

Structure Chaining

Extends the structures

  - VkImageCreateInfo

  - VkSamplerYcbcrConversionCreateInfo

If the `pNext` chain of VkImageCreateInfo includes a `VkImageSwapchainCreateInfoKHR` structure, then that structure includes a swapchain handle indicating that the image will be bound to memory from that swapchain.

The `VkImageSwapchainCreateInfoKHR` structure is defined as:

    // Provided by VK_VERSION_1_1 with VK_KHR_swapchain, VK_KHR_device_group with VK_KHR_swapchain
    typedef struct VkImageSwapchainCreateInfoKHR {
        VkStructureType    sType;
        const void*        pNext;
        VkSwapchainKHR     swapchain;
    } VkImageSwapchainCreateInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `swapchain` is VK_NULL_HANDLE or a handle of a swapchain that the image will be bound to.

Valid Usage

- VUID-VkImageSwapchainCreateInfoKHR-swapchain-00995
  If `swapchain` is not VK_NULL_HANDLE, the fields of VkImageCreateInfo must match the implied image creation parameters of the swapchain

Valid Usage (Implicit)

- VUID-VkImageSwapchainCreateInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHR

- VUID-VkImageSwapchainCreateInfoKHR-swapchain-parameter
  If `swapchain` is not VK_NULL_HANDLE, `swapchain` must be a valid VkSwapchainKHR handle

Structure Chaining

Extends the structure

  - VkImageCreateInfo

If the `pNext` chain of VkImageCreateInfo includes a `VkImageFormatListCreateInfo` structure, then that structure contains a list of all formats that can be used when creating views of this image.

The `VkImageFormatListCreateInfo` structure is defined as:

    // Provided by VK_VERSION_1_2
    typedef struct VkImageFormatListCreateInfo {
        VkStructureType    sType;
        const void*        pNext;
        uint32_t           viewFormatCount;
        const VkFormat*    pViewFormats;
    } VkImageFormatListCreateInfo;

    // Provided by VK_KHR_image_format_list
    // Equivalent to VkImageFormatListCreateInfo
    typedef VkImageFormatListCreateInfo VkImageFormatListCreateInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `viewFormatCount` is the number of entries in the `pViewFormats` array.

- `pViewFormats` is a pointer to an array of VkFormat values specifying all formats which can be used when creating views of this image.

If `viewFormatCount` is zero, `pViewFormats` is ignored and the image is created as if the `VkImageFormatListCreateInfo` structure were not included in the `pNext` chain of VkImageCreateInfo.

Valid Usage

- VUID-VkImageFormatListCreateInfo-viewFormatCount-09540
  If `viewFormatCount` is not 0, each element of `pViewFormats` must not be VK_FORMAT_UNDEFINED

Valid Usage (Implicit)

- VUID-VkImageFormatListCreateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO

- VUID-VkImageFormatListCreateInfo-pViewFormats-parameter
  If `viewFormatCount` is not `0`, `pViewFormats` must be a valid pointer to an array of `viewFormatCount` valid VkFormat values

Structure Chaining

Extends the structures

  - VkImageCreateInfo

  - VkPhysicalDeviceImageFormatInfo2

  - VkSwapchainCreateInfoKHR

If the `pNext` chain of VkImageCreateInfo includes a VkImageDrmFormatModifierListCreateInfoEXT structure, then the image will be created with one of the Linux DRM format modifiers listed in the structure. The choice of modifier is implementation-dependent.

The VkImageDrmFormatModifierListCreateInfoEXT structure is defined as:

    // Provided by VK_EXT_image_drm_format_modifier
    typedef struct VkImageDrmFormatModifierListCreateInfoEXT {
        VkStructureType    sType;
        const void*        pNext;
        uint32_t           drmFormatModifierCount;
        const uint64_t*    pDrmFormatModifiers;
    } VkImageDrmFormatModifierListCreateInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `drmFormatModifierCount` is the length of the `pDrmFormatModifiers` array.

- `pDrmFormatModifiers` is a pointer to an array of Linux DRM format modifiers.

Valid Usage

- VUID-VkImageDrmFormatModifierListCreateInfoEXT-pDrmFormatModifiers-02263
  Each modifier in `pDrmFormatModifiers` must be compatible with the parameters in VkImageCreateInfo and its `pNext` chain, as determined by querying VkPhysicalDeviceImageFormatInfo2 extended with VkPhysicalDeviceImageDrmFormatModifierInfoEXT

Valid Usage (Implicit)

- VUID-VkImageDrmFormatModifierListCreateInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_LIST_CREATE_INFO_EXT

- VUID-VkImageDrmFormatModifierListCreateInfoEXT-pDrmFormatModifiers-parameter
  `pDrmFormatModifiers` must be a valid pointer to an array of `drmFormatModifierCount` `uint64_t` values

- VUID-VkImageDrmFormatModifierListCreateInfoEXT-drmFormatModifierCount-arraylength
  `drmFormatModifierCount` must be greater than `0`

Structure Chaining

Extends the structure

  - VkImageCreateInfo

If the `pNext` chain of VkImageCreateInfo includes a VkImageDrmFormatModifierExplicitCreateInfoEXT structure, then the image will be created with the Linux DRM format modifier and memory layout defined by the structure.

The VkImageDrmFormatModifierExplicitCreateInfoEXT structure is defined as:

    // Provided by VK_EXT_image_drm_format_modifier
    typedef struct VkImageDrmFormatModifierExplicitCreateInfoEXT {
        VkStructureType               sType;
        const void*                   pNext;
        uint64_t                      drmFormatModifier;
        uint32_t                      drmFormatModifierPlaneCount;
        const VkSubresourceLayout*    pPlaneLayouts;
    } VkImageDrmFormatModifierExplicitCreateInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `drmFormatModifier` is the Linux DRM format modifier with which the image will be created.

- `drmFormatModifierPlaneCount` is the number of memory planes in the image (as reported by VkDrmFormatModifierPropertiesEXT) as well as the length of the `pPlaneLayouts` array.

- `pPlaneLayouts` is a pointer to an array of VkSubresourceLayout structures describing the image’s memory planes.

The `i`th member of `pPlaneLayouts` describes the layout of the image’s `i`th memory plane (that is, `VK_IMAGE_ASPECT_MEMORY_PLANE_i_BIT_EXT`). In each element of `pPlaneLayouts`, the implementation must ignore `size`. The implementation calculates the size of each plane, which the application can query with vkGetImageSubresourceLayout.

When creating an image with VkImageDrmFormatModifierExplicitCreateInfoEXT, it is the application’s responsibility to satisfy all valid usage requirements. However, the implementation must validate that the provided `pPlaneLayouts`, when combined with the provided `drmFormatModifier` and other creation parameters in VkImageCreateInfo and its `pNext` chain, produce a valid image. (This validation is necessarily implementation-dependent and outside the scope of Vulkan, and therefore not described by valid usage requirements). If this validation fails, then vkCreateImage returns VK_ERROR_INVALID_DRM_FORMAT_MODIFIER_PLANE_LAYOUT_EXT.

Valid Usage

- VUID-VkImageDrmFormatModifierExplicitCreateInfoEXT-drmFormatModifier-02264
  `drmFormatModifier` must be compatible with the parameters in VkImageCreateInfo and its `pNext` chain, as determined by querying VkPhysicalDeviceImageFormatInfo2 extended with VkPhysicalDeviceImageDrmFormatModifierInfoEXT

- VUID-VkImageDrmFormatModifierExplicitCreateInfoEXT-drmFormatModifierPlaneCount-02265
  `drmFormatModifierPlaneCount` must be equal to the VkDrmFormatModifierPropertiesEXT::`drmFormatModifierPlaneCount` associated with VkImageCreateInfo::`format` and `drmFormatModifier`, as found by querying VkDrmFormatModifierPropertiesListEXT

- VUID-VkImageDrmFormatModifierExplicitCreateInfoEXT-size-02267
  For each element of `pPlaneLayouts`, `size` must be 0

- VUID-VkImageDrmFormatModifierExplicitCreateInfoEXT-arrayPitch-02268
  For each element of `pPlaneLayouts`, `arrayPitch` must be 0 if VkImageCreateInfo::`arrayLayers` is 1

- VUID-VkImageDrmFormatModifierExplicitCreateInfoEXT-depthPitch-02269
  For each element of `pPlaneLayouts`, `depthPitch` must be 0 if VkImageCreateInfo::`extent.depth` is 1

Valid Usage (Implicit)

- VUID-VkImageDrmFormatModifierExplicitCreateInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_EXPLICIT_CREATE_INFO_EXT

- VUID-VkImageDrmFormatModifierExplicitCreateInfoEXT-pPlaneLayouts-parameter
  `pPlaneLayouts` must be a valid pointer to an array of `drmFormatModifierPlaneCount` VkSubresourceLayout structures

- VUID-VkImageDrmFormatModifierExplicitCreateInfoEXT-drmFormatModifierPlaneCount-arraylength
  `drmFormatModifierPlaneCount` must be greater than `0`

Structure Chaining

Extends the structure

  - VkImageCreateInfo

If the `pNext` list of VkImageCreateInfo includes a `VkImageCompressionControlEXT` structure, then that structure describes compression controls for this image.

The `VkImageCompressionControlEXT` structure is defined as:

    // Provided by VK_EXT_image_compression_control
    typedef struct VkImageCompressionControlEXT {
        VkStructureType                         sType;
        const void*                             pNext;
        VkImageCompressionFlagsEXT              flags;
        uint32_t                                compressionControlPlaneCount;
        VkImageCompressionFixedRateFlagsEXT*    pFixedRateFlags;
    } VkImageCompressionControlEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask of VkImageCompressionFlagBitsEXT describing compression controls for the image.

- `compressionControlPlaneCount` is the number of entries in the `pFixedRateFlags` array.

- `pFixedRateFlags` is `NULL` or a pointer to an array of VkImageCompressionFixedRateFlagsEXT bitfields describing allowed fixed-rate compression rates of each image plane. It is ignored if `flags` does not include VK_IMAGE_COMPRESSION_FIXED_RATE_EXPLICIT_EXT.

If enabled, fixed-rate compression is done in an implementation-defined manner and may be applied at block granularity. In that case, a write to an individual texel may modify the value of other texels in the same block.

Valid Usage

- VUID-VkImageCompressionControlEXT-flags-06747
  `flags` must be one of VK_IMAGE_COMPRESSION_DEFAULT_EXT, VK_IMAGE_COMPRESSION_FIXED_RATE_DEFAULT_EXT, VK_IMAGE_COMPRESSION_FIXED_RATE_EXPLICIT_EXT, or VK_IMAGE_COMPRESSION_DISABLED_EXT

- VUID-VkImageCompressionControlEXT-flags-06748
  If `flags` includes VK_IMAGE_COMPRESSION_FIXED_RATE_EXPLICIT_EXT, `pFixedRateFlags` must not be `NULL`

Valid Usage (Implicit)

- VUID-VkImageCompressionControlEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_IMAGE_COMPRESSION_CONTROL_EXT

Structure Chaining

Extends the structures

  - VkImageCreateInfo

  - VkPhysicalDeviceImageFormatInfo2

  - VkSwapchainCreateInfoKHR

Note | Some combinations of compression properties may not be supported. For example, some implementations may not support different fixed-rate compression rates per plane of a multi-planar format and will not be able to enable fixed-rate compression for any plane if the requested rates differ.

Possible values of VkImageCompressionControlEXT::`flags`, specifying compression controls for an image, are:

    // Provided by VK_EXT_image_compression_control
    typedef enum VkImageCompressionFlagBitsEXT {
        VK_IMAGE_COMPRESSION_DEFAULT_EXT = 0,
        VK_IMAGE_COMPRESSION_FIXED_RATE_DEFAULT_EXT = 0x00000001,
        VK_IMAGE_COMPRESSION_FIXED_RATE_EXPLICIT_EXT = 0x00000002,
        VK_IMAGE_COMPRESSION_DISABLED_EXT = 0x00000004,
    } VkImageCompressionFlagBitsEXT;

- VK_IMAGE_COMPRESSION_DEFAULT_EXT specifies that the default image compression setting is used. Implementations must not apply fixed-rate compression.

- VK_IMAGE_COMPRESSION_FIXED_RATE_DEFAULT_EXT specifies that the implementation may choose any supported fixed-rate compression setting in an implementation-defined manner based on the properties of the image.

- VK_IMAGE_COMPRESSION_FIXED_RATE_EXPLICIT_EXT specifies that fixed-rate compression may be used and that the allowed compression rates are specified by VkImageCompressionControlEXT::`pFixedRateFlags`.

- VK_IMAGE_COMPRESSION_DISABLED_EXT specifies that all lossless and fixed-rate compression should be disabled.

If VkImageCompressionControlEXT::`flags` is VK_IMAGE_COMPRESSION_FIXED_RATE_EXPLICIT_EXT, then the `i`th member of the `pFixedRateFlags` array specifies the allowed compression rates for the image’s `i`th plane.

Note | If VK_IMAGE_COMPRESSION_DISABLED_EXT is included in VkImageCompressionControlEXT::`flags`, both lossless and fixed-rate compression will be disabled. This is likely to have a negative impact on performance and is only intended to be used for debugging purposes.

    // Provided by VK_EXT_image_compression_control
    typedef VkFlags VkImageCompressionFlagsEXT;

`VkImageCompressionFlagsEXT` is a bitmask type for setting a mask of zero or more VkImageCompressionFlagBitsEXT.

    // Provided by VK_EXT_image_compression_control
    typedef VkFlags VkImageCompressionFixedRateFlagsEXT;

`VkImageCompressionFixedRateFlagsEXT` is a bitmask type for setting a mask of zero or more VkImageCompressionFixedRateFlagBitsEXT.

Bits which can be set in VkImageCompressionControlEXT::`pFixedRateFlags`, specifying allowed compression rates for an image plane, are:

    // Provided by VK_EXT_image_compression_control
    typedef enum VkImageCompressionFixedRateFlagBitsEXT {
        VK_IMAGE_COMPRESSION_FIXED_RATE_NONE_EXT = 0,
        VK_IMAGE_COMPRESSION_FIXED_RATE_1BPC_BIT_EXT = 0x00000001,
        VK_IMAGE_COMPRESSION_FIXED_RATE_2BPC_BIT_EXT = 0x00000002,
        VK_IMAGE_COMPRESSION_FIXED_RATE_3BPC_BIT_EXT = 0x00000004,
        VK_IMAGE_COMPRESSION_FIXED_RATE_4BPC_BIT_EXT = 0x00000008,
        VK_IMAGE_COMPRESSION_FIXED_RATE_5BPC_BIT_EXT = 0x00000010,
        VK_IMAGE_COMPRESSION_FIXED_RATE_6BPC_BIT_EXT = 0x00000020,
        VK_IMAGE_COMPRESSION_FIXED_RATE_7BPC_BIT_EXT = 0x00000040,
        VK_IMAGE_COMPRESSION_FIXED_RATE_8BPC_BIT_EXT = 0x00000080,
        VK_IMAGE_COMPRESSION_FIXED_RATE_9BPC_BIT_EXT = 0x00000100,
        VK_IMAGE_COMPRESSION_FIXED_RATE_10BPC_BIT_EXT = 0x00000200,
        VK_IMAGE_COMPRESSION_FIXED_RATE_11BPC_BIT_EXT = 0x00000400,
        VK_IMAGE_COMPRESSION_FIXED_RATE_12BPC_BIT_EXT = 0x00000800,
        VK_IMAGE_COMPRESSION_FIXED_RATE_13BPC_BIT_EXT = 0x00001000,
        VK_IMAGE_COMPRESSION_FIXED_RATE_14BPC_BIT_EXT = 0x00002000,
        VK_IMAGE_COMPRESSION_FIXED_RATE_15BPC_BIT_EXT = 0x00004000,
        VK_IMAGE_COMPRESSION_FIXED_RATE_16BPC_BIT_EXT = 0x00008000,
        VK_IMAGE_COMPRESSION_FIXED_RATE_17BPC_BIT_EXT = 0x00010000,
        VK_IMAGE_COMPRESSION_FIXED_RATE_18BPC_BIT_EXT = 0x00020000,
        VK_IMAGE_COMPRESSION_FIXED_RATE_19BPC_BIT_EXT = 0x00040000,
        VK_IMAGE_COMPRESSION_FIXED_RATE_20BPC_BIT_EXT = 0x00080000,
        VK_IMAGE_COMPRESSION_FIXED_RATE_21BPC_BIT_EXT = 0x00100000,
        VK_IMAGE_COMPRESSION_FIXED_RATE_22BPC_BIT_EXT = 0x00200000,
        VK_IMAGE_COMPRESSION_FIXED_RATE_23BPC_BIT_EXT = 0x00400000,
        VK_IMAGE_COMPRESSION_FIXED_RATE_24BPC_BIT_EXT = 0x00800000,
    } VkImageCompressionFixedRateFlagBitsEXT;

- VK_IMAGE_COMPRESSION_FIXED_RATE_NONE_EXT specifies that fixed-rate compression must not be used.

- VK_IMAGE_COMPRESSION_FIXED_RATE_1BPC_BIT_EXT specifies that fixed-rate compression with a bitrate of [1,2) bits per component may be used.

- VK_IMAGE_COMPRESSION_FIXED_RATE_2BPC_BIT_EXT specifies that fixed-rate compression with a bitrate of [2,3) bits per component may be used.

- VK_IMAGE_COMPRESSION_FIXED_RATE_3BPC_BIT_EXT specifies that fixed-rate compression with a bitrate of [3,4) bits per component may be used.

- VK_IMAGE_COMPRESSION_FIXED_RATE_4BPC_BIT_EXT specifies that fixed-rate compression with a bitrate of [4,5) bits per component may be used.

- VK_IMAGE_COMPRESSION_FIXED_RATE_5BPC_BIT_EXT specifies that fixed-rate compression with a bitrate of [5,6) bits per component may be used.

- VK_IMAGE_COMPRESSION_FIXED_RATE_6BPC_BIT_EXT specifies that fixed-rate compression with a bitrate of [6,7) bits per component may be used.

- VK_IMAGE_COMPRESSION_FIXED_RATE_7BPC_BIT_EXT specifies that fixed-rate compression with a bitrate of [7,8) bits per component may be used.

- VK_IMAGE_COMPRESSION_FIXED_RATE_8BPC_BIT_EXT specifies that fixed-rate compression with a bitrate of [8,9) bits per component may be used.

- VK_IMAGE_COMPRESSION_FIXED_RATE_9BPC_BIT_EXT specifies that fixed-rate compression with a bitrate of [9,10) bits per component may be used.

- VK_IMAGE_COMPRESSION_FIXED_RATE_10BPC_BIT_EXT specifies that fixed-rate compression with a bitrate of [10,11) bits per component may be used.

- VK_IMAGE_COMPRESSION_FIXED_RATE_11BPC_BIT_EXT specifies that fixed-rate compression with a bitrate of [11,12) bits per component may be used.

- VK_IMAGE_COMPRESSION_FIXED_RATE_12BPC_BIT_EXT specifies that fixed-rate compression with a bitrate of at least 12 bits per component may be used.

If the format has a different bit rate for different components, VkImageCompressionControlEXT::`pFixedRateFlags` describes the rate of the component with the largest number of bits assigned to it, scaled pro rata. For example, to request that a VK_FORMAT_A2R10G10B10_UNORM_PACK32 format be stored at a rate of 8 bits per pixel, use VK_IMAGE_COMPRESSION_FIXED_RATE_2BPC_BIT_EXT (10 bits for the largest component, stored at quarter the original size, 2.5 bits, rounded down).

If `flags` includes VK_IMAGE_COMPRESSION_FIXED_RATE_EXPLICIT_EXT, and multiple bits are set in VkImageCompressionControlEXT::`pFixedRateFlags` for a plane, implementations should apply the lowest allowed bitrate that is supported.

Note | The choice of “bits per component” terminology was chosen so that the same compression rate describes the same degree of compression applied to formats that differ only in the number of components. For example, VK_FORMAT_R8G8_UNORM compressed to half its original size is a rate of 4 bits per component, 8 bits per pixel. VK_FORMAT_R8G8B8A8_UNORM compressed to half its original size is 4 bits per component, 16 bits per pixel. Both of these cases can be requested with VK_IMAGE_COMPRESSION_FIXED_RATE_4BPC_BIT_EXT.

To query the compression properties of an image, add a VkImageCompressionPropertiesEXT structure to the `pNext` chain of the VkSubresourceLayout2 structure in a call to vkGetImageSubresourceLayout2.

To determine the compression rates that are supported for a given image format, add a VkImageCompressionPropertiesEXT structure to the `pNext` chain of the VkImageFormatProperties2 structure in a call to vkGetPhysicalDeviceImageFormatProperties2.

Note | Since fixed-rate compression is disabled by default, the VkImageCompressionPropertiesEXT structure passed to vkGetPhysicalDeviceImageFormatProperties2 will not indicate any fixed-rate compression support unless a VkImageCompressionControlEXT structure is also included in the `pNext` chain of the VkPhysicalDeviceImageFormatInfo2 structure passed to the same command.

The `VkImageCompressionPropertiesEXT` structure is defined as:

    // Provided by VK_EXT_image_compression_control
    typedef struct VkImageCompressionPropertiesEXT {
        VkStructureType                        sType;
        void*                                  pNext;
        VkImageCompressionFlagsEXT             imageCompressionFlags;
        VkImageCompressionFixedRateFlagsEXT    imageCompressionFixedRateFlags;
    } VkImageCompressionPropertiesEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `imageCompressionFlags` returns a value describing the compression controls that apply to the image. The value will be either VK_IMAGE_COMPRESSION_DEFAULT_EXT to indicate no fixed-rate compression, VK_IMAGE_COMPRESSION_FIXED_RATE_EXPLICIT_EXT to indicate fixed-rate compression, or VK_IMAGE_COMPRESSION_DISABLED_EXT to indicate no compression.

- `imageCompressionFixedRateFlags` returns a VkImageCompressionFixedRateFlagsEXT value describing the compression rates that apply to the specified aspect of the image.

Valid Usage (Implicit)

- VUID-VkImageCompressionPropertiesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_IMAGE_COMPRESSION_PROPERTIES_EXT

Structure Chaining

Extends the structures

  - VkImageFormatProperties2

  - VkSubresourceLayout2

  - VkSurfaceFormat2KHR

If the `pNext` list of VkImageCreateInfo includes a `VkImageAlignmentControlCreateInfoMESA` structure, then that structure describes desired alignment for this image.

The `VkImageAlignmentControlCreateInfoMESA` structure is defined as:

    // Provided by VK_MESA_image_alignment_control
    typedef struct VkImageAlignmentControlCreateInfoMESA {
        VkStructureType    sType;
        const void*        pNext;
        uint32_t           maximumRequestedAlignment;
    } VkImageAlignmentControlCreateInfoMESA;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `maximumRequestedAlignment` specifies the maximum alignment for the image.

If `maximumRequestedAlignment` is not 0, the implementation should choose an image memory layout that requires an alignment no larger than `maximumRequestedAlignment` as reported in VkMemoryRequirements::`alignment`. If such a layout does not exist for the given image creation parameters, the implementation should return the smallest alignment which is supported in VkMemoryRequirements.

If an implementation needs to disable image compression for `maximumRequestedAlignment` to be honored - where a larger alignment would enable image compression - the implementation should not use `maximumRequestedAlignment`, and should return the smallest alignment which does not compromise compression. If the `imageCompressionControl` feature is enabled, the application can chain a VkImageCompressionControlEXT with VK_IMAGE_COMPRESSION_DISABLED_EXT. In this case, image compression considerations should not apply when implementation decides alignment.

Valid Usage

- VUID-VkImageAlignmentControlCreateInfoMESA-maximumRequestedAlignment-09655
  If `maximumRequestedAlignment` is not 0, `maximumRequestedAlignment` must be a power of two

- VUID-VkImageAlignmentControlCreateInfoMESA-maximumRequestedAlignment-09656
  If `maximumRequestedAlignment` is not 0, the bitwise-and of `maximumRequestedAlignment` and `supportedImageAlignmentMask` must be non-zero

- VUID-VkImageAlignmentControlCreateInfoMESA-imageAlignmentControl-09657
  `imageAlignmentControl` must be enabled

Valid Usage (Implicit)

- VUID-VkImageAlignmentControlCreateInfoMESA-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_IMAGE_ALIGNMENT_CONTROL_CREATE_INFO_MESA

Structure Chaining

Extends the structure

  - VkImageCreateInfo

Bits which can be set in VkImageUsageFlags2CreateInfoKHR::`usage`, specifying intended usage of an image, are:

    // Provided by VK_KHR_extended_flags
    // Flag bits for VkImageUsageFlagBits2KHR
    typedef VkFlags64 VkImageUsageFlagBits2KHR;
    static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_TRANSFER_SRC_BIT_KHR = 0x00000001ULL;
    static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_TRANSFER_DST_BIT_KHR = 0x00000002ULL;
    static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_SAMPLED_BIT_KHR = 0x00000004ULL;
    static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_STORAGE_BIT_KHR = 0x00000008ULL;
    static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_COLOR_ATTACHMENT_BIT_KHR = 0x00000010ULL;
    static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_DEPTH_STENCIL_ATTACHMENT_BIT_KHR = 0x00000020ULL;
    static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_TRANSIENT_ATTACHMENT_BIT_KHR = 0x00000040ULL;
    static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_INPUT_ATTACHMENT_BIT_KHR = 0x00000080ULL;
    // Provided by VK_KHR_extended_flags with VK_KHR_fragment_shading_rate
    static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = 0x00000100ULL;
    // Provided by VK_KHR_extended_flags with VK_EXT_fragment_density_map
    static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_FRAGMENT_DENSITY_MAP_BIT_EXT = 0x00000200ULL;
    // Provided by VK_KHR_extended_flags with VK_KHR_video_decode_queue
    static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_VIDEO_DECODE_DST_BIT_KHR = 0x00000400ULL;
    // Provided by VK_KHR_extended_flags with VK_KHR_video_decode_queue
    static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_VIDEO_DECODE_SRC_BIT_KHR = 0x00000800ULL;
    // Provided by VK_KHR_extended_flags with VK_KHR_video_decode_queue
    static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_VIDEO_DECODE_DPB_BIT_KHR = 0x00001000ULL;
    // Provided by VK_KHR_extended_flags with VK_KHR_video_encode_queue
    static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_VIDEO_ENCODE_DST_BIT_KHR = 0x00002000ULL;
    // Provided by VK_KHR_extended_flags with VK_KHR_video_encode_queue
    static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_VIDEO_ENCODE_SRC_BIT_KHR = 0x00004000ULL;
    // Provided by VK_KHR_extended_flags with VK_KHR_video_encode_queue
    static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_VIDEO_ENCODE_DPB_BIT_KHR = 0x00008000ULL;
    // Provided by VK_KHR_extended_flags with VK_HUAWEI_invocation_mask
    static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_INVOCATION_MASK_BIT_HUAWEI = 0x00040000ULL;
    // Provided by VK_KHR_extended_flags with VK_EXT_attachment_feedback_loop_layout
    static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT = 0x00080000ULL;
    // Provided by VK_KHR_extended_flags with VK_QCOM_image_processing
    static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_SAMPLE_WEIGHT_BIT_QCOM = 0x00100000ULL;
    // Provided by VK_KHR_extended_flags with VK_QCOM_image_processing
    static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_SAMPLE_BLOCK_MATCH_BIT_QCOM = 0x00200000ULL;
    // Provided by VK_VERSION_1_4 with VK_KHR_extended_flags
    static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_HOST_TRANSFER_BIT_KHR = 0x00400000ULL;
    // Provided by VK_KHR_extended_flags with VK_ARM_tensors
    static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_TENSOR_ALIASING_BIT_ARM = 0x00800000ULL;
    // Provided by VK_KHR_extended_flags with VK_KHR_video_encode_quantization_map
    static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_VIDEO_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR = 0x02000000ULL;
    // Provided by VK_KHR_extended_flags with VK_KHR_video_encode_quantization_map
    static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_VIDEO_ENCODE_EMPHASIS_MAP_BIT_KHR = 0x04000000ULL;
    // Provided by VK_KHR_extended_flags with VK_QCOM_tile_memory_heap
    static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_TILE_MEMORY_BIT_QCOM = 0x08000000ULL;

- VK_IMAGE_USAGE_2_TRANSFER_SRC_BIT_KHR specifies that the image can be used as the source of a transfer command.

- VK_IMAGE_USAGE_2_TRANSFER_DST_BIT_KHR specifies that the image can be used as the destination of a transfer command.

- VK_IMAGE_USAGE_2_SAMPLED_BIT_KHR specifies that the image can be used to create a `VkImageView` suitable for occupying a `VkDescriptorSet` slot either of type VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE or VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, and be sampled by a shader.

- VK_IMAGE_USAGE_2_STORAGE_BIT_KHR specifies that the image can be used to create a `VkImageView` suitable for occupying a `VkDescriptorSet` slot of type VK_DESCRIPTOR_TYPE_STORAGE_IMAGE.

- VK_IMAGE_USAGE_2_COLOR_ATTACHMENT_BIT_KHR specifies that the image can be used to create a `VkImageView` suitable for use as a color or resolve attachment in a `VkFramebuffer`.

- VK_IMAGE_USAGE_2_DEPTH_STENCIL_ATTACHMENT_BIT_KHR specifies that the image can be used to create a `VkImageView` suitable for use as a depth/stencil or depth/stencil resolve attachment in a `VkFramebuffer`.

- VK_IMAGE_USAGE_2_TRANSIENT_ATTACHMENT_BIT_KHR specifies that implementations may support using memory allocations with the VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT to back an image with this usage. This bit can be set for any image that can be used to create a `VkImageView` suitable for use as a color, resolve, depth/stencil, or input attachment.

- VK_IMAGE_USAGE_2_INPUT_ATTACHMENT_BIT_KHR specifies that the image can be used to create a `VkImageView` suitable for occupying `VkDescriptorSet` slot of type VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT; be read from a shader as an input attachment; and be used as an input attachment in a framebuffer.

- VK_IMAGE_USAGE_2_FRAGMENT_DENSITY_MAP_BIT_EXT specifies that the image can be used to create a `VkImageView` suitable for use as a fragment density map image.

- VK_IMAGE_USAGE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR specifies that the image can be used to create a `VkImageView` suitable for use as a fragment shading rate attachment or shading rate image

- VK_IMAGE_USAGE_2_VIDEO_DECODE_DST_BIT_KHR specifies that the image can be used as a decode output picture in a video decode operation.

- VK_IMAGE_USAGE_2_VIDEO_DECODE_SRC_BIT_KHR is reserved for future use.

- VK_IMAGE_USAGE_2_VIDEO_DECODE_DPB_BIT_KHR specifies that the image can be used as an output reconstructed picture or an input reference picture in a video decode operation.

- VK_IMAGE_USAGE_2_VIDEO_ENCODE_DST_BIT_KHR is reserved for future use.

- VK_IMAGE_USAGE_2_VIDEO_ENCODE_SRC_BIT_KHR specifies that the image can be used as an encode input picture in a video encode operation.

- VK_IMAGE_USAGE_2_VIDEO_ENCODE_DPB_BIT_KHR specifies that the image can be used as an output reconstructed picture or an input reference picture in a video encode operation.

- VK_IMAGE_USAGE_2_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT specifies that the image can be used as a color or depth/stencil attachment with feedback loop enabled.

- VK_IMAGE_USAGE_2_TILE_MEMORY_BIT_QCOM specifies that the image can be bound to `VkDeviceMemory` allocated from a VkMemoryHeap with the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property.

- VK_IMAGE_USAGE_2_HOST_TRANSFER_BIT_KHR specifies that the image can be used with host copy commands and host layout transitions.

- VK_IMAGE_USAGE_2_VIDEO_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR specifies that the image can be used as a quantization delta map in a video encode operation.

- VK_IMAGE_USAGE_2_VIDEO_ENCODE_EMPHASIS_MAP_BIT_KHR specifies that the image can be used as an emphasis map in a video encode operation.

- VK_IMAGE_USAGE_2_TENSOR_ALIASING_BIT_ARM specifies that the image can be transitioned to the VK_IMAGE_LAYOUT_TENSOR_ALIASING_ARM layout. See Memory Aliasing for a complete set of rules for tensor/image aliasing.

    // Provided by VK_KHR_extended_flags
    typedef VkFlags64 VkImageUsageFlags2KHR;

`VkImageUsageFlags2KHR` is a bitmask type for setting a mask of zero or more VkImageUsageFlagBits2KHR.

Bits which can be set in

- VkImageViewUsageCreateInfo::`usage`

- VkImageStencilUsageCreateInfo::`stencilUsage`

- VkImageCreateInfo::`usage`

specify intended usage of an image, and are:

    // Provided by VK_VERSION_1_0
    typedef enum VkImageUsageFlagBits {
        VK_IMAGE_USAGE_TRANSFER_SRC_BIT = 0x00000001,
        VK_IMAGE_USAGE_TRANSFER_DST_BIT = 0x00000002,
        VK_IMAGE_USAGE_SAMPLED_BIT = 0x00000004,
        VK_IMAGE_USAGE_STORAGE_BIT = 0x00000008,
        VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT = 0x00000010,
        VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000020,
        VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT = 0x00000040,
        VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT = 0x00000080,
      // Provided by VK_VERSION_1_4
        VK_IMAGE_USAGE_HOST_TRANSFER_BIT = 0x00400000,
      // Provided by VK_KHR_video_decode_queue
        VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR = 0x00000400,
      // Provided by VK_KHR_video_decode_queue
        VK_IMAGE_USAGE_VIDEO_DECODE_SRC_BIT_KHR = 0x00000800,
      // Provided by VK_KHR_video_decode_queue
        VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR = 0x00001000,
      // Provided by VK_EXT_fragment_density_map
        VK_IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT = 0x00000200,
      // Provided by VK_KHR_fragment_shading_rate
        VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = 0x00000100,
      // Provided by VK_KHR_video_encode_queue
        VK_IMAGE_USAGE_VIDEO_ENCODE_DST_BIT_KHR = 0x00002000,
      // Provided by VK_KHR_video_encode_queue
        VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR = 0x00004000,
      // Provided by VK_KHR_video_encode_queue
        VK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR = 0x00008000,
      // Provided by VK_EXT_attachment_feedback_loop_layout
        VK_IMAGE_USAGE_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT = 0x00080000,
      // Provided by VK_HUAWEI_invocation_mask
        VK_IMAGE_USAGE_INVOCATION_MASK_BIT_HUAWEI = 0x00040000,
      // Provided by VK_QCOM_image_processing
        VK_IMAGE_USAGE_SAMPLE_WEIGHT_BIT_QCOM = 0x00100000,
      // Provided by VK_QCOM_image_processing
        VK_IMAGE_USAGE_SAMPLE_BLOCK_MATCH_BIT_QCOM = 0x00200000,
      // Provided by VK_ARM_tensors
        VK_IMAGE_USAGE_TENSOR_ALIASING_BIT_ARM = 0x00800000,
      // Provided by VK_QCOM_tile_memory_heap
        VK_IMAGE_USAGE_TILE_MEMORY_BIT_QCOM = 0x08000000,
      // Provided by VK_KHR_video_encode_quantization_map
        VK_IMAGE_USAGE_VIDEO_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR = 0x02000000,
      // Provided by VK_KHR_video_encode_quantization_map
        VK_IMAGE_USAGE_VIDEO_ENCODE_EMPHASIS_MAP_BIT_KHR = 0x04000000,
      // Provided by VK_NV_shading_rate_image
        VK_IMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV = VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR,
      // Provided by VK_EXT_host_image_copy
        VK_IMAGE_USAGE_HOST_TRANSFER_BIT_EXT = VK_IMAGE_USAGE_HOST_TRANSFER_BIT,
    } VkImageUsageFlagBits;

- VK_IMAGE_USAGE_TRANSFER_SRC_BIT specifies that the image can be used as the source of a transfer command.

- VK_IMAGE_USAGE_TRANSFER_DST_BIT specifies that the image can be used as the destination of a transfer command.

- VK_IMAGE_USAGE_SAMPLED_BIT specifies that the image can be used to create a `VkImageView` suitable for occupying a `VkDescriptorSet` slot either of type VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE or VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, and be sampled by a shader.

- VK_IMAGE_USAGE_STORAGE_BIT specifies that the image can be used to create a `VkImageView` suitable for occupying a `VkDescriptorSet` slot of type VK_DESCRIPTOR_TYPE_STORAGE_IMAGE.

- VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT specifies that the image can be used to create a `VkImageView` suitable for use as a color or resolve attachment in a `VkFramebuffer`.

- VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT specifies that the image can be used to create a `VkImageView` suitable for use as a depth/stencil or depth/stencil resolve attachment in a `VkFramebuffer`.

- VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT specifies that implementations may support using memory allocations with the VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT to back an image with this usage. This bit can be set for any image that can be used to create a `VkImageView` suitable for use as a color, resolve, depth/stencil, or input attachment.

- VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT specifies that the image can be used to create a `VkImageView` suitable for occupying `VkDescriptorSet` slot of type VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT; be read from a shader as an input attachment; and be used as an input attachment in a framebuffer.

- VK_IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT specifies that the image can be used to create a `VkImageView` suitable for use as a fragment density map image.

- VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR specifies that the image can be used to create a `VkImageView` suitable for use as a fragment shading rate attachment or shading rate image

- VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR specifies that the image can be used as a decode output picture in a video decode operation.

- VK_IMAGE_USAGE_VIDEO_DECODE_SRC_BIT_KHR is reserved for future use.

- VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR specifies that the image can be used as an output reconstructed picture or an input reference picture in a video decode operation.

- VK_IMAGE_USAGE_VIDEO_ENCODE_DST_BIT_KHR is reserved for future use.

- VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR specifies that the image can be used as an encode input picture in a video encode operation.

- VK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR specifies that the image can be used as an output reconstructed picture or an input reference picture in a video encode operation.

- VK_IMAGE_USAGE_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT specifies that the image can be used as a color or depth/stencil attachment with feedback loop enabled.

- VK_IMAGE_USAGE_SAMPLE_WEIGHT_BIT_QCOM specifies that the image can be used in weight image sampling operations.

- VK_IMAGE_USAGE_SAMPLE_BLOCK_MATCH_BIT_QCOM specifies that the image can be used in block matching operations.

- VK_IMAGE_USAGE_TILE_MEMORY_BIT_QCOM specifies that the image can be bound to `VkDeviceMemory` allocated from a VkMemoryHeap with the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property.

- VK_IMAGE_USAGE_HOST_TRANSFER_BIT specifies that the image can be used with host copy commands and host layout transitions.

- VK_IMAGE_USAGE_VIDEO_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR specifies that the image can be used as a quantization delta map in a video encode operation.

- VK_IMAGE_USAGE_VIDEO_ENCODE_EMPHASIS_MAP_BIT_KHR specifies that the image can be used as an emphasis map in a video encode operation.

- VK_IMAGE_USAGE_TENSOR_ALIASING_BIT_ARM specifies that the image can be transitioned to the VK_IMAGE_LAYOUT_TENSOR_ALIASING_ARM layout. See Memory Aliasing for a complete set of rules for tensor/image aliasing.

    // Provided by VK_VERSION_1_0
    typedef VkFlags VkImageUsageFlags;

`VkImageUsageFlags` is a bitmask type for setting a mask of zero or more VkImageUsageFlagBits.

Bits which can be set in VkImageCreateFlags2CreateInfoKHR::`flags`, specifying additional parameters of an image, are:

    // Provided by VK_KHR_extended_flags
    // Flag bits for VkImageCreateFlagBits2KHR
    typedef VkFlags64 VkImageCreateFlagBits2KHR;
    static const VkImageCreateFlagBits2KHR VK_IMAGE_CREATE_2_SPARSE_BINDING_BIT_KHR = 0x00000001ULL;
    static const VkImageCreateFlagBits2KHR VK_IMAGE_CREATE_2_SPARSE_RESIDENCY_BIT_KHR = 0x00000002ULL;
    static const VkImageCreateFlagBits2KHR VK_IMAGE_CREATE_2_SPARSE_ALIASED_BIT_KHR = 0x00000004ULL;
    static const VkImageCreateFlagBits2KHR VK_IMAGE_CREATE_2_MUTABLE_FORMAT_BIT_KHR = 0x00000008ULL;
    static const VkImageCreateFlagBits2KHR VK_IMAGE_CREATE_2_CUBE_COMPATIBLE_BIT_KHR = 0x00000010ULL;
    // Provided by VK_KHR_extended_flags with VK_KHR_maintenance11
    static const VkImageCreateFlagBits2KHR VK_IMAGE_CREATE_2_ALIAS_SINGLE_LAYER_DESCRIPTOR_BIT_KHR = 0x00400000ULL;
    // Provided by VK_VERSION_1_0 with VK_KHR_extended_flags
    static const VkImageCreateFlagBits2KHR VK_IMAGE_CREATE_2_2D_ARRAY_COMPATIBLE_BIT_KHR = 0x00000020ULL;
    // Provided by VK_VERSION_1_0 with VK_KHR_extended_flags
    static const VkImageCreateFlagBits2KHR VK_IMAGE_CREATE_2_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR = 0x00000040ULL;
    // Provided by VK_VERSION_1_0 with VK_KHR_extended_flags
    static const VkImageCreateFlagBits2KHR VK_IMAGE_CREATE_2_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT_KHR = 0x00000080ULL;
    // Provided by VK_VERSION_1_0 with VK_KHR_extended_flags
    static const VkImageCreateFlagBits2KHR VK_IMAGE_CREATE_2_EXTENDED_USAGE_BIT_KHR = 0x00000100ULL;
    // Provided by VK_VERSION_1_0 with VK_KHR_extended_flags
    static const VkImageCreateFlagBits2KHR VK_IMAGE_CREATE_2_DISJOINT_BIT_KHR = 0x00000200ULL;
    // Provided by VK_VERSION_1_0 with VK_KHR_extended_flags
    static const VkImageCreateFlagBits2KHR VK_IMAGE_CREATE_2_ALIAS_BIT_KHR = 0x00000400ULL;
    // Provided by VK_VERSION_1_0 with VK_KHR_extended_flags
    static const VkImageCreateFlagBits2KHR VK_IMAGE_CREATE_2_PROTECTED_BIT_KHR = 0x00000800ULL;
    // Provided by VK_KHR_extended_flags with VK_EXT_sample_locations
    static const VkImageCreateFlagBits2KHR VK_IMAGE_CREATE_2_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT = 0x00001000ULL;
    // Provided by VK_KHR_extended_flags with VK_NV_corner_sampled_image
    static const VkImageCreateFlagBits2KHR VK_IMAGE_CREATE_2_CORNER_SAMPLED_BIT_NV = 0x00002000ULL;
    // Provided by VK_KHR_extended_flags with VK_EXT_fragment_density_map
    static const VkImageCreateFlagBits2KHR VK_IMAGE_CREATE_2_SUBSAMPLED_BIT_EXT = 0x00004000ULL;
    // Provided by VK_KHR_extended_flags with VK_EXT_fragment_density_map_offset
    static const VkImageCreateFlagBits2KHR VK_IMAGE_CREATE_2_FRAGMENT_DENSITY_MAP_OFFSET_BIT_EXT = 0x00008000ULL;
    // Provided by VK_KHR_extended_flags with VK_EXT_descriptor_buffer
    static const VkImageCreateFlagBits2KHR VK_IMAGE_CREATE_2_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT = 0x00010000ULL;
    // Provided by VK_KHR_extended_flags with VK_EXT_image_2d_view_of_3d
    static const VkImageCreateFlagBits2KHR VK_IMAGE_CREATE_2_2D_VIEW_COMPATIBLE_BIT_EXT = 0x00020000ULL;
    // Provided by VK_KHR_extended_flags with VK_EXT_multisampled_render_to_single_sampled
    static const VkImageCreateFlagBits2KHR VK_IMAGE_CREATE_2_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_BIT_EXT = 0x00040000ULL;
    // Provided by VK_KHR_extended_flags with VK_KHR_video_maintenance1
    static const VkImageCreateFlagBits2KHR VK_IMAGE_CREATE_2_VIDEO_PROFILE_INDEPENDENT_BIT_KHR = 0x00100000ULL;

- VK_IMAGE_CREATE_2_SPARSE_BINDING_BIT_KHR specifies that the image will be backed using sparse memory binding.

- VK_IMAGE_CREATE_2_SPARSE_RESIDENCY_BIT_KHR specifies that the image can be partially backed using sparse memory binding. Images created with this flag must also be created with the VK_IMAGE_CREATE_2_SPARSE_BINDING_BIT_KHR flag.

- VK_IMAGE_CREATE_2_SPARSE_ALIASED_BIT_KHR specifies that the image will be backed using sparse memory binding with memory ranges that might also simultaneously be backing another image (or another portion of the same image). Images created with this flag must also be created with the VK_IMAGE_CREATE_2_SPARSE_BINDING_BIT_KHR flag.

- VK_IMAGE_CREATE_2_MUTABLE_FORMAT_BIT_KHR specifies that the image can be used to create a `VkImageView` with a different format from the image. For multi-planar formats, VK_IMAGE_CREATE_2_MUTABLE_FORMAT_BIT_KHR specifies that a `VkImageView` can be created of a plane of the image.

- VK_IMAGE_CREATE_2_CUBE_COMPATIBLE_BIT_KHR specifies that the image can be used to create a `VkImageView` of type VK_IMAGE_VIEW_TYPE_CUBE or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY.

- VK_IMAGE_CREATE_2_2D_ARRAY_COMPATIBLE_BIT_KHR specifies that the image can be used to create a `VkImageView` of type VK_IMAGE_VIEW_TYPE_2D or VK_IMAGE_VIEW_TYPE_2D_ARRAY.

- VK_IMAGE_CREATE_2_2D_VIEW_COMPATIBLE_BIT_EXT specifies that the image can be used to create a `VkImageView` of type VK_IMAGE_VIEW_TYPE_2D.

- VK_IMAGE_CREATE_2_PROTECTED_BIT_KHR specifies that the image is a protected image.

- VK_IMAGE_CREATE_2_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR specifies that the image can be used with a non-zero value of the `splitInstanceBindRegionCount` member of a VkBindImageMemoryDeviceGroupInfo structure passed into vkBindImageMemory2. This flag also has the effect of making the image use the standard sparse image block dimensions.

- VK_IMAGE_CREATE_2_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT_KHR specifies that the image having a compressed format can be used to create a `VkImageView` with an uncompressed format where each texel in the image view corresponds to a compressed texel block of the image.

- VK_IMAGE_CREATE_2_EXTENDED_USAGE_BIT_KHR specifies that the image can be created with usage flags that are not supported for the format the image is created with but are supported for at least one format a `VkImageView` created from the image can have.

- VK_IMAGE_CREATE_2_DISJOINT_BIT_KHR specifies that an image with a multi-planar format must have each plane separately bound to memory, rather than having a single memory binding for the whole image; the presence of this bit distinguishes a disjoint image from an image without this bit set.

- VK_IMAGE_CREATE_2_ALIAS_BIT_KHR specifies that two images created with the same creation parameters and aliased to the same memory can interpret the contents of the memory consistently with each other, subject to the rules described in the Memory Aliasing section. This flag further specifies that each plane of a disjoint image can share an in-memory non-linear representation with single-plane images, and that a single-plane image can share an in-memory non-linear representation with a plane of a multi-planar disjoint image, according to the rules in Compatible Formats of Planes of Multi-Planar Formats. If the `pNext` chain includes a VkExternalMemoryImageCreateInfo or VkExternalMemoryImageCreateInfoNV structure whose `handleTypes` member is not `0`, it is as if VK_IMAGE_CREATE_2_ALIAS_BIT_KHR is set.

- VK_IMAGE_CREATE_2_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT specifies that an image with a depth or depth/stencil format can be used with custom sample locations when used as a depth/stencil attachment.

- VK_IMAGE_CREATE_2_CORNER_SAMPLED_BIT_NV specifies that the image is a corner-sampled image.

- VK_IMAGE_CREATE_2_SUBSAMPLED_BIT_EXT specifies that an image can be in a subsampled format which may be more optimal when written as an attachment by a render pass that has a fragment density map attachment. Accessing a subsampled image has additional considerations:

  - Image data read as an image sampler will have undefined values if the sampler was not created with `flags` containing VK_SAMPLER_CREATE_SUBSAMPLED_BIT_EXT or was not sampled through the use of a combined image sampler with an immutable sampler in `VkDescriptorSetLayoutBinding`.

  - Image data read with an input attachment will have undefined values if the contents were not written as an attachment in an earlier subpass of the same render pass.

  - Image data read as an image sampler in the fragment shader will be additionally be read by the device during VK_PIPELINE_STAGE_VERTEX_SHADER_BIT if `VkPhysicalDeviceFragmentDensityMap2PropertiesEXT`::`subsampledCoarseReconstructionEarlyAccess` is VK_TRUE and the sampler was created with `flags` containing VK_SAMPLER_CREATE_SUBSAMPLED_COARSE_RECONSTRUCTION_BIT_EXT.

  - Image data read with load operations are resampled to the fragment density of the render pass if `VkPhysicalDeviceFragmentDensityMap2PropertiesEXT`::`subsampledLoads` is VK_TRUE. Otherwise, values of image data are undefined.

  - Image contents outside of the render area take on undefined values if the image is stored as a render pass attachment.

- VK_IMAGE_CREATE_2_FRAGMENT_DENSITY_MAP_OFFSET_BIT_EXT specifies that an image can be used in a render pass with non-zero fragment density map offsets. In a render pass with non-zero offsets, fragment density map attachments, input attachments, color attachments, depth/stencil attachment, resolve attachments, and preserve attachments must be created with VK_IMAGE_CREATE_2_FRAGMENT_DENSITY_MAP_OFFSET_BIT_EXT.

- VK_IMAGE_CREATE_2_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT specifies that the image can be used with descriptor buffers when capturing and replaying (e.g. for trace capture and replay), see VkOpaqueCaptureDescriptorDataCreateInfoEXT for more detail.

- VK_IMAGE_CREATE_2_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_BIT_EXT specifies that an image can be used with multisampled rendering as a single-sampled framebuffer attachment

- VK_IMAGE_CREATE_2_VIDEO_PROFILE_INDEPENDENT_BIT_KHR specifies that the image can be used in video coding operations without having to specify at image creation time the set of video profiles the image will be used with, except for images used only as DPB pictures, as long as the image is otherwise compatible with the video profile in question.

  Note | This enables exchanging video picture data without additional copies or conversions when used as: Decode output pictures, regardless of the video profile used to produce them. Encode input pictures, regardless of the video profile used to consume them. This includes images created with both VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR and VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR, which is necessary to use the same video picture as the reconstructed picture and decode output picture in a video decode operation on implementations supporting VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_COINCIDE_BIT_KHR. However, images with only DPB usage remain tied to the video profiles the image was created with, as the data layout of such DPB-only images may be implementation- and codec-dependent. If an application would like to share or reuse the device memory backing such images (e.g. for the purposes of temporal aliasing), then it should create separate image objects for each video profile and bind them to the same underlying device memory range, similar to how memory resources can be shared across separate video sessions or any other memory-backed resource.

See Sparse Resource Features and Sparse Physical Device Features for more details.

    // Provided by VK_KHR_extended_flags
    typedef VkFlags64 VkImageCreateFlags2KHR;

`VkImageCreateFlags2KHR` is a bitmask type for setting a mask of zero or more VkImageCreateFlagBits2KHR.

Bits which can be set in VkImageCreateInfo::`flags`, specifying additional parameters of an image, are:

    // Provided by VK_VERSION_1_0
    typedef enum VkImageCreateFlagBits {
        VK_IMAGE_CREATE_SPARSE_BINDING_BIT = 0x00000001,
        VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002,
        VK_IMAGE_CREATE_SPARSE_ALIASED_BIT = 0x00000004,
        VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT = 0x00000008,
        VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT = 0x00000010,
      // Provided by VK_VERSION_1_1
        VK_IMAGE_CREATE_ALIAS_BIT = 0x00000400,
      // Provided by VK_VERSION_1_1
        VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT = 0x00000040,
      // Provided by VK_VERSION_1_1
        VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT = 0x00000020,
      // Provided by VK_VERSION_1_1
        VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT = 0x00000080,
      // Provided by VK_VERSION_1_1
        VK_IMAGE_CREATE_EXTENDED_USAGE_BIT = 0x00000100,
      // Provided by VK_VERSION_1_1
        VK_IMAGE_CREATE_PROTECTED_BIT = 0x00000800,
      // Provided by VK_VERSION_1_1
        VK_IMAGE_CREATE_DISJOINT_BIT = 0x00000200,
      // Provided by VK_NV_corner_sampled_image
        VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV = 0x00002000,
      // Provided by VK_EXT_descriptor_heap
        VK_IMAGE_CREATE_DESCRIPTOR_HEAP_CAPTURE_REPLAY_BIT_EXT = 0x00010000,
      // Provided by VK_EXT_sample_locations
        VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT = 0x00001000,
      // Provided by VK_EXT_fragment_density_map
        VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT = 0x00004000,
      // Provided by VK_EXT_multisampled_render_to_single_sampled
        VK_IMAGE_CREATE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_BIT_EXT = 0x00040000,
      // Provided by VK_EXT_image_2d_view_of_3d
        VK_IMAGE_CREATE_2D_VIEW_COMPATIBLE_BIT_EXT = 0x00020000,
      // Provided by VK_KHR_video_maintenance1
        VK_IMAGE_CREATE_VIDEO_PROFILE_INDEPENDENT_BIT_KHR = 0x00100000,
      // Provided by VK_EXT_fragment_density_map_offset
        VK_IMAGE_CREATE_FRAGMENT_DENSITY_MAP_OFFSET_BIT_EXT = 0x00008000,
      // Provided by VK_KHR_maintenance11
        VK_IMAGE_CREATE_ALIAS_SINGLE_LAYER_DESCRIPTOR_BIT_KHR = 0x00400000,
      // Provided by VK_KHR_bind_memory2 with VK_KHR_device_group
        VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR = VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT,
      // Provided by VK_KHR_maintenance1
        VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR = VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT,
      // Provided by VK_KHR_maintenance2
        VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT_KHR = VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT,
      // Provided by VK_KHR_maintenance2
        VK_IMAGE_CREATE_EXTENDED_USAGE_BIT_KHR = VK_IMAGE_CREATE_EXTENDED_USAGE_BIT,
      // Provided by VK_KHR_sampler_ycbcr_conversion
        VK_IMAGE_CREATE_DISJOINT_BIT_KHR = VK_IMAGE_CREATE_DISJOINT_BIT,
      // Provided by VK_KHR_bind_memory2
        VK_IMAGE_CREATE_ALIAS_BIT_KHR = VK_IMAGE_CREATE_ALIAS_BIT,
      // Provided by VK_EXT_descriptor_buffer
        VK_IMAGE_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT = VK_IMAGE_CREATE_DESCRIPTOR_HEAP_CAPTURE_REPLAY_BIT_EXT,
      // Provided by VK_QCOM_fragment_density_map_offset
        VK_IMAGE_CREATE_FRAGMENT_DENSITY_MAP_OFFSET_BIT_QCOM = VK_IMAGE_CREATE_FRAGMENT_DENSITY_MAP_OFFSET_BIT_EXT,
    } VkImageCreateFlagBits;

- VK_IMAGE_CREATE_SPARSE_BINDING_BIT specifies that the image will be backed using sparse memory binding.

- VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT specifies that the image can be partially backed using sparse memory binding. Images created with this flag must also be created with the VK_IMAGE_CREATE_SPARSE_BINDING_BIT flag.

- VK_IMAGE_CREATE_SPARSE_ALIASED_BIT specifies that the image will be backed using sparse memory binding with memory ranges that might also simultaneously be backing another image (or another portion of the same image). Images created with this flag must also be created with the VK_IMAGE_CREATE_SPARSE_BINDING_BIT flag.

- VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT specifies that the image can be used to create a `VkImageView` with a different format from the image. For multi-planar formats, VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT specifies that a `VkImageView` can be created of a plane of the image.

- VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT specifies that the image can be used to create a `VkImageView` of type VK_IMAGE_VIEW_TYPE_CUBE or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY.

- VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT specifies that the image can be used to create a `VkImageView` of type VK_IMAGE_VIEW_TYPE_2D or VK_IMAGE_VIEW_TYPE_2D_ARRAY.

- VK_IMAGE_CREATE_2D_VIEW_COMPATIBLE_BIT_EXT specifies that the image can be used to create a `VkImageView` of type VK_IMAGE_VIEW_TYPE_2D.

- VK_IMAGE_CREATE_PROTECTED_BIT specifies that the image is a protected image.

- VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT specifies that the image can be used with a non-zero value of the `splitInstanceBindRegionCount` member of a VkBindImageMemoryDeviceGroupInfo structure passed into vkBindImageMemory2. This flag also has the effect of making the image use the standard sparse image block dimensions.

- VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT specifies that the image having a compressed format can be used to create a `VkImageView` with an uncompressed format where each texel in the image view corresponds to a compressed texel block of the image.

- VK_IMAGE_CREATE_EXTENDED_USAGE_BIT specifies that the image can be created with usage flags that are not supported for the format the image is created with but are supported for at least one format a `VkImageView` created from the image can have.

- VK_IMAGE_CREATE_DISJOINT_BIT specifies that an image with a multi-planar format must have each plane separately bound to memory, rather than having a single memory binding for the whole image; the presence of this bit distinguishes a disjoint image from an image without this bit set.

- VK_IMAGE_CREATE_ALIAS_BIT specifies that two images created with the same creation parameters and aliased to the same memory can interpret the contents of the memory consistently with each other, subject to the rules described in the Memory Aliasing section. This flag further specifies that each plane of a disjoint image can share an in-memory non-linear representation with single-plane images, and that a single-plane image can share an in-memory non-linear representation with a plane of a multi-planar disjoint image, according to the rules in Compatible Formats of Planes of Multi-Planar Formats. If the `pNext` chain includes a VkExternalMemoryImageCreateInfo or VkExternalMemoryImageCreateInfoNV structure whose `handleTypes` member is not `0`, it is as if VK_IMAGE_CREATE_ALIAS_BIT is set.

- VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT specifies that an image with a depth or depth/stencil format can be used with custom sample locations when used as a depth/stencil attachment.

- VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV specifies that the image is a corner-sampled image.

- VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT specifies that an image can be in a subsampled format which may be more optimal when written as an attachment by a render pass that has a fragment density map attachment. Accessing a subsampled image has additional considerations:

  - Image data read as an image sampler will have undefined values if the sampler was not created with `flags` containing VK_SAMPLER_CREATE_SUBSAMPLED_BIT_EXT or was not sampled through a combined embedded sampler and image mapping if using descriptor heaps, or the use of a combined image sampler with an immutable sampler in `VkDescriptorSetLayoutBinding`.

  - Image data read with an input attachment will have undefined values if the contents were not written as an attachment in an earlier subpass of the same render pass.

  - Image data read as an image sampler in the fragment shader will be additionally be read by the device during VK_PIPELINE_STAGE_VERTEX_SHADER_BIT if `VkPhysicalDeviceFragmentDensityMap2PropertiesEXT`::`subsampledCoarseReconstructionEarlyAccess` is VK_TRUE and the sampler was created with `flags` containing VK_SAMPLER_CREATE_SUBSAMPLED_COARSE_RECONSTRUCTION_BIT_EXT.

  - Image data read with load operations are resampled to the fragment density of the render pass if `VkPhysicalDeviceFragmentDensityMap2PropertiesEXT`::`subsampledLoads` is VK_TRUE. Otherwise, values of image data are undefined.

  - Image contents outside of the render area take on undefined values if the image is stored as a render pass attachment.

- VK_IMAGE_CREATE_FRAGMENT_DENSITY_MAP_OFFSET_BIT_EXT specifies that an image can be used in a render pass with non-zero fragment density map offsets. In a render pass with non-zero offsets, fragment density map attachments, input attachments, color attachments, depth/stencil attachment, resolve attachments, and preserve attachments must be created with VK_IMAGE_CREATE_FRAGMENT_DENSITY_MAP_OFFSET_BIT_EXT.

- VK_IMAGE_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT specifies that the image can be used with descriptor buffers when capturing and replaying (e.g. for trace capture and replay), see VkOpaqueCaptureDescriptorDataCreateInfoEXT for more detail.

- VK_IMAGE_CREATE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_BIT_EXT specifies that an image can be used with multisampled rendering as a single-sampled render pass attachment

- VK_IMAGE_CREATE_ALIAS_SINGLE_LAYER_DESCRIPTOR_BIT_KHR specifies that a single layer image view created from this image can be accessed with both `Arrayed` equal to 0 and `Arrayed` equal to 1 in a shader. If accessed with `Arrayed` equal to 1 in a shader, and VkImageViewCreateInfo::`viewType` is VK_IMAGE_VIEW_TYPE_1D or VK_IMAGE_VIEW_TYPE_2D, the image is treated as having an array size of `1`, and `subresourceRange.baseArrayLayer` is accessed. If accessed with `Arrayed` equal to 0 in a shader, and VkImageViewCreateInfo::`viewType` is VK_IMAGE_VIEW_TYPE_1D_ARRAY or VK_IMAGE_VIEW_TYPE_2D_ARRAY, the descriptor is accessed as-if the view was created with VK_IMAGE_VIEW_TYPE_1D or VK_IMAGE_VIEW_TYPE_2D respectively. Cube map view aliasing is not included by this flag bit. Also, image views created with a multi-planar format can not alias like this.

- VK_IMAGE_CREATE_VIDEO_PROFILE_INDEPENDENT_BIT_KHR specifies that the image can be used in video coding operations without having to specify at image creation time the set of video profiles the image will be used with, except for images used only as DPB pictures, as long as the image is otherwise compatible with the video profile in question.

  Note | This enables exchanging video picture data without additional copies or conversions when used as: Decode output pictures, regardless of the video profile used to produce them. Encode input pictures, regardless of the video profile used to consume them. This includes images created with both VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR and VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR, which is necessary to use the same video picture as the reconstructed picture and decode output picture in a video decode operation on implementations supporting VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_COINCIDE_BIT_KHR. However, images with only DPB usage remain tied to the video profiles the image was created with, as the data layout of such DPB-only images may be implementation- and codec-dependent. If an application would like to share or reuse the device memory backing such images (e.g. for the purposes of temporal aliasing), then it should create separate image objects for each video profile and bind them to the same underlying device memory range, similar to how memory resources can be shared across separate video sessions or any other memory-backed resource.

See Sparse Resource Features and Sparse Physical Device Features for more details.

    // Provided by VK_VERSION_1_0
    typedef VkFlags VkImageCreateFlags;

`VkImageCreateFlags` is a bitmask type for setting a mask of zero or more VkImageCreateFlagBits.

Possible values of VkImageCreateInfo::`imageType`, specifying the basic dimensionality of an image, are:

    // Provided by VK_VERSION_1_0
    typedef enum VkImageType {
        VK_IMAGE_TYPE_1D = 0,
        VK_IMAGE_TYPE_2D = 1,
        VK_IMAGE_TYPE_3D = 2,
    } VkImageType;

- VK_IMAGE_TYPE_1D specifies a one-dimensional image.

- VK_IMAGE_TYPE_2D specifies a two-dimensional image.

- VK_IMAGE_TYPE_3D specifies a three-dimensional image.

Possible values of VkImageCreateInfo::`tiling`, specifying the tiling arrangement of texel blocks in an image, are:

    // Provided by VK_VERSION_1_0
    typedef enum VkImageTiling {
        VK_IMAGE_TILING_OPTIMAL = 0,
        VK_IMAGE_TILING_LINEAR = 1,
      // Provided by VK_EXT_image_drm_format_modifier
        VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT = 1000158000,
    } VkImageTiling;

- VK_IMAGE_TILING_OPTIMAL specifies optimal tiling (texels are laid out in an implementation-dependent arrangement, for more efficient memory access).

- VK_IMAGE_TILING_LINEAR specifies linear tiling (texels are laid out in memory in row-major order, possibly with some padding on each row).

- VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT specifies that the image’s tiling is defined by a Linux DRM format modifier. The modifier is specified at image creation with VkImageDrmFormatModifierListCreateInfoEXT or VkImageDrmFormatModifierExplicitCreateInfoEXT, and can be queried with vkGetImageDrmFormatModifierPropertiesEXT.

To query the memory layout of an image subresource, call:

    // Provided by VK_VERSION_1_0
    void vkGetImageSubresourceLayout(
        VkDevice                                    device,
        VkImage                                     image,
        const VkImageSubresource*                   pSubresource,
        VkSubresourceLayout*                        pLayout);

- `device` is the logical device that owns the image.

- `image` is the image whose layout is being queried.

- `pSubresource` is a pointer to a VkImageSubresource structure selecting a specific image subresource from the image.

- `pLayout` is a pointer to a VkSubresourceLayout structure in which the layout is returned.

If the image is linear, then the returned layout is valid for host access.

If the image’s tiling is VK_IMAGE_TILING_LINEAR and its format is a multi-planar format, then `vkGetImageSubresourceLayout` describes one format plane of the image. If the image’s tiling is VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, then `vkGetImageSubresourceLayout` describes one memory plane of the image. If the image’s tiling is VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT and the image is non-linear, then the returned layout has an implementation-dependent meaning; the vendor of the image’s DRM format modifier may provide documentation that explains how to interpret the returned layout.

`vkGetImageSubresourceLayout` is invariant for the lifetime of a single image. However, the subresource layout of images in Android hardware buffer or QNX Screen buffer external memory is not known until the image has been bound to memory, so applications must not call vkGetImageSubresourceLayout for such an image before it has been bound.

Valid Usage

- VUID-vkGetImageSubresourceLayout-image-07790
  `image` must have been created with `tiling` equal to VK_IMAGE_TILING_LINEAR or VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT

- VUID-vkGetImageSubresourceLayout-aspectMask-00997
  The `aspectMask` member of `pSubresource` must only have a single bit set

- VUID-vkGetImageSubresourceLayout-mipLevel-01716
  The `mipLevel` member of `pSubresource` must be less than the `mipLevels` specified in `image`

- VUID-vkGetImageSubresourceLayout-arrayLayer-01717
  The `arrayLayer` member of `pSubresource` must be less than the `arrayLayers` specified in `image`

- VUID-vkGetImageSubresourceLayout-format-08886
  If `format` of the `image` is a color format that is not a multi-planar format, and `tiling` of the `image` is VK_IMAGE_TILING_LINEAR or VK_IMAGE_TILING_OPTIMAL, the `aspectMask` member of `pSubresource` must be VK_IMAGE_ASPECT_COLOR_BIT

- VUID-vkGetImageSubresourceLayout-format-04462
  If `format` of the `image` has a depth component, the `aspectMask` member of `pSubresource` must contain VK_IMAGE_ASPECT_DEPTH_BIT

- VUID-vkGetImageSubresourceLayout-format-04463
  If `format` of the `image` has a stencil component, the `aspectMask` member of `pSubresource` must contain VK_IMAGE_ASPECT_STENCIL_BIT

- VUID-vkGetImageSubresourceLayout-format-04464
  If `format` of the `image` does not contain a stencil or depth component, the `aspectMask` member of `pSubresource` must not contain VK_IMAGE_ASPECT_DEPTH_BIT or VK_IMAGE_ASPECT_STENCIL_BIT

- VUID-vkGetImageSubresourceLayout-tiling-08717
  If the `tiling` of the `image` is VK_IMAGE_TILING_LINEAR and has a multi-planar format, then the `aspectMask` member of `pSubresource` must be a single valid multi-planar aspect mask bit

- VUID-vkGetImageSubresourceLayout-image-09432
  If `image` was created with the VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID external memory handle type, then `image` must be bound to memory

- VUID-vkGetImageSubresourceLayout-tiling-09433
  If the `tiling` of the `image` is VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, then the `aspectMask` member of `pSubresource` must be `VK_IMAGE_ASPECT_MEMORY_PLANE_i_BIT_EXT` and the index i must be less than the VkDrmFormatModifierPropertiesEXT::`drmFormatModifierPlaneCount` associated with the image’s `format` and VkImageDrmFormatModifierPropertiesEXT::`drmFormatModifier`

Valid Usage (Implicit)

- VUID-vkGetImageSubresourceLayout-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetImageSubresourceLayout-image-parameter
  `image` must be a valid VkImage handle

- VUID-vkGetImageSubresourceLayout-pSubresource-parameter
  `pSubresource` must be a valid pointer to a valid VkImageSubresource structure

- VUID-vkGetImageSubresourceLayout-pLayout-parameter
  `pLayout` must be a valid pointer to a VkSubresourceLayout structure

- VUID-vkGetImageSubresourceLayout-image-parent
  `image` must have been created, allocated, or retrieved from `device`

The `VkImageSubresource` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkImageSubresource {
        VkImageAspectFlags    aspectMask;
        uint32_t              mipLevel;
        uint32_t              arrayLayer;
    } VkImageSubresource;

- `aspectMask` is a VkImageAspectFlags value selecting the image aspect.

- `mipLevel` selects the mipmap level.

- `arrayLayer` selects the array layer.

Valid Usage (Implicit)

- VUID-VkImageSubresource-aspectMask-parameter
  `aspectMask` must be a valid combination of VkImageAspectFlagBits values

- VUID-VkImageSubresource-aspectMask-requiredbitmask
  `aspectMask` must not be `0`

Information about the layout of the image subresource is returned in a `VkSubresourceLayout` structure:

    // Provided by VK_VERSION_1_0
    typedef struct VkSubresourceLayout {
        VkDeviceSize    offset;
        VkDeviceSize    size;
        VkDeviceSize    rowPitch;
        VkDeviceSize    arrayPitch;
        VkDeviceSize    depthPitch;
    } VkSubresourceLayout;

- `offset` is the byte offset from the start of the image or the plane where the image subresource begins.

- `size` is the size in bytes of the image subresource. `size` includes any extra memory that is required based on `rowPitch`.

- `rowPitch` describes the number of bytes between each row of texels in an image.

- `arrayPitch` describes the number of bytes between each array layer of an image.

- `depthPitch` describes the number of bytes between each slice of 3D image.

If the image is linear, then `rowPitch`, `arrayPitch` and `depthPitch` describe the layout of the image subresource in linear memory. For uncompressed formats, `rowPitch` is the number of bytes between texels with the same x coordinate in adjacent rows (y coordinates differ by one). `arrayPitch` is the number of bytes between texels with the same x and y coordinate in adjacent array layers of the image (array layer values differ by one). `depthPitch` is the number of bytes between texels with the same x and y coordinate in adjacent slices of a 3D image (z coordinates differ by one). Expressed as an addressing formula, the starting byte of a texel in the image subresource has address:

    // (x,y,z,layer) are in texel coordinates
    address(x,y,z,layer) = layer*arrayPitch + z*depthPitch + y*rowPitch + x*elementSize + offset

For compressed formats, the `rowPitch` is the number of bytes between compressed texel blocks in adjacent rows. `arrayPitch` is the number of bytes between compressed texel blocks in adjacent array layers. `depthPitch` is the number of bytes between compressed texel blocks in adjacent slices of a 3D image.

    // (x,y,z,layer) are in compressed texel block coordinates
    address(x,y,z,layer) = layer*arrayPitch + z*depthPitch + y*rowPitch + x*compressedTexelBlockByteSize + offset;

The value of `arrayPitch` is undefined for images that were not created as arrays. `depthPitch` is defined only for 3D images.

If the image has a single-plane color format and its tiling is VK_IMAGE_TILING_LINEAR , then the `aspectMask` member of `VkImageSubresource` must be VK_IMAGE_ASPECT_COLOR_BIT.

If the image has a depth/stencil format and its tiling is VK_IMAGE_TILING_LINEAR , then `aspectMask` must be either VK_IMAGE_ASPECT_DEPTH_BIT or VK_IMAGE_ASPECT_STENCIL_BIT. On implementations that store depth and stencil aspects separately, querying each of these image subresource layouts will return a different `offset` and `size` representing the region of memory used for that aspect. On implementations that store depth and stencil aspects interleaved, the same `offset` and `size` are returned and represent the interleaved memory allocation.

If the image has a multi-planar format and its tiling is VK_IMAGE_TILING_LINEAR , then the `aspectMask` member of `VkImageSubresource` must be VK_IMAGE_ASPECT_PLANE_0_BIT, VK_IMAGE_ASPECT_PLANE_1_BIT, or (for 3-plane formats only) VK_IMAGE_ASPECT_PLANE_2_BIT. Querying each of these image subresource layouts will return a different `offset` and `size` representing the region of memory used for that plane. If the image is disjoint, then the `offset` is relative to the base address of the plane. If the image is non-disjoint, then the `offset` is relative to the base address of the image.

If the image’s tiling is VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, then the `aspectMask` member of `VkImageSubresource` must be one of `VK_IMAGE_ASPECT_MEMORY_PLANE_i_BIT_EXT`, where the maximum allowed plane index i is defined by the VkDrmFormatModifierPropertiesEXT::`drmFormatModifierPlaneCount` associated with the image’s VkImageCreateInfo::`format` and modifier. The memory range used by the subresource is described by `offset` and `size`. If the image is disjoint, then the `offset` is relative to the base address of the memory plane. If the image is non-disjoint, then the `offset` is relative to the base address of the image. If the image is non-linear, then `rowPitch`, `arrayPitch`, and `depthPitch` have an implementation-dependent meaning.

To query the memory layout of an image subresource, call:

    // Provided by VK_VERSION_1_4
    void vkGetImageSubresourceLayout2(
        VkDevice                                    device,
        VkImage                                     image,
        const VkImageSubresource2*                  pSubresource,
        VkSubresourceLayout2*                       pLayout);

    // Provided by VK_KHR_maintenance5
    // Equivalent to vkGetImageSubresourceLayout2
    void vkGetImageSubresourceLayout2KHR(
        VkDevice                                    device,
        VkImage                                     image,
        const VkImageSubresource2*                  pSubresource,
        VkSubresourceLayout2*                       pLayout);

    // Provided by VK_EXT_host_image_copy, VK_EXT_image_compression_control
    // Equivalent to vkGetImageSubresourceLayout2
    void vkGetImageSubresourceLayout2EXT(
        VkDevice                                    device,
        VkImage                                     image,
        const VkImageSubresource2*                  pSubresource,
        VkSubresourceLayout2*                       pLayout);

- `device` is the logical device that owns the image.

- `image` is the image whose layout is being queried.

- `pSubresource` is a pointer to a VkImageSubresource2 structure selecting a specific image for the image subresource.

- `pLayout` is a pointer to a VkSubresourceLayout2 structure in which the layout is returned.

`vkGetImageSubresourceLayout2` behaves similarly to vkGetImageSubresourceLayout, with the ability to specify extended inputs via chained input structures, and to return extended information via chained output structures.

It is legal to call `vkGetImageSubresourceLayout2` with an `image` created with `tiling` equal to VK_IMAGE_TILING_OPTIMAL, but the members of VkSubresourceLayout2::`subresourceLayout` will have undefined values in this case.

Note | Structures chained from VkImageSubresource2::`pNext` will also be updated when `tiling` is equal to VK_IMAGE_TILING_OPTIMAL.

Valid Usage

- VUID-vkGetImageSubresourceLayout2-aspectMask-00997
  The `aspectMask` member of `pSubresource` must only have a single bit set

- VUID-vkGetImageSubresourceLayout2-mipLevel-01716
  The `mipLevel` member of `pSubresource` must be less than the `mipLevels` specified in `image`

- VUID-vkGetImageSubresourceLayout2-arrayLayer-01717
  The `arrayLayer` member of `pSubresource` must be less than the `arrayLayers` specified in `image`

- VUID-vkGetImageSubresourceLayout2-format-08886
  If `format` of the `image` is a color format that is not a multi-planar format, and `tiling` of the `image` is VK_IMAGE_TILING_LINEAR or VK_IMAGE_TILING_OPTIMAL, the `aspectMask` member of `pSubresource` must be VK_IMAGE_ASPECT_COLOR_BIT

- VUID-vkGetImageSubresourceLayout2-format-04462
  If `format` of the `image` has a depth component, the `aspectMask` member of `pSubresource` must contain VK_IMAGE_ASPECT_DEPTH_BIT

- VUID-vkGetImageSubresourceLayout2-format-04463
  If `format` of the `image` has a stencil component, the `aspectMask` member of `pSubresource` must contain VK_IMAGE_ASPECT_STENCIL_BIT

- VUID-vkGetImageSubresourceLayout2-format-04464
  If `format` of the `image` does not contain a stencil or depth component, the `aspectMask` member of `pSubresource` must not contain VK_IMAGE_ASPECT_DEPTH_BIT or VK_IMAGE_ASPECT_STENCIL_BIT

- VUID-vkGetImageSubresourceLayout2-tiling-08717
  If the `tiling` of the `image` is VK_IMAGE_TILING_LINEAR and has a multi-planar format, then the `aspectMask` member of `pSubresource` must be a single valid multi-planar aspect mask bit

- VUID-vkGetImageSubresourceLayout2-image-09434
  If `image` was created with the VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID external memory handle type, then `image` must be bound to memory

- VUID-vkGetImageSubresourceLayout2-tiling-09435
  If the `tiling` of the `image` is VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, then the `aspectMask` member of `pSubresource` must be `VK_IMAGE_ASPECT_MEMORY_PLANE_i_BIT_EXT` and the index i must be less than the VkDrmFormatModifierPropertiesEXT::`drmFormatModifierPlaneCount` associated with the image’s `format` and VkImageDrmFormatModifierPropertiesEXT::`drmFormatModifier`

Valid Usage (Implicit)

- VUID-vkGetImageSubresourceLayout2-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetImageSubresourceLayout2-image-parameter
  `image` must be a valid VkImage handle

- VUID-vkGetImageSubresourceLayout2-pSubresource-parameter
  `pSubresource` must be a valid pointer to a valid VkImageSubresource2 structure

- VUID-vkGetImageSubresourceLayout2-pLayout-parameter
  `pLayout` must be a valid pointer to a VkSubresourceLayout2 structure

- VUID-vkGetImageSubresourceLayout2-image-parent
  `image` must have been created, allocated, or retrieved from `device`

The `VkImageSubresource2` structure is defined as:

    // Provided by VK_VERSION_1_4
    typedef struct VkImageSubresource2 {
        VkStructureType       sType;
        void*                 pNext;
        VkImageSubresource    imageSubresource;
    } VkImageSubresource2;

    // Provided by VK_KHR_maintenance5
    // Equivalent to VkImageSubresource2
    typedef VkImageSubresource2 VkImageSubresource2KHR;

    // Provided by VK_EXT_host_image_copy, VK_EXT_image_compression_control
    // Equivalent to VkImageSubresource2
    typedef VkImageSubresource2 VkImageSubresource2EXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `imageSubresource` is a VkImageSubresource structure.

Valid Usage (Implicit)

- VUID-VkImageSubresource2-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_IMAGE_SUBRESOURCE_2

- VUID-VkImageSubresource2-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkImageSubresource2-imageSubresource-parameter
  `imageSubresource` must be a valid VkImageSubresource structure

Information about the layout of the image subresource is returned in a `VkSubresourceLayout2` structure:

    // Provided by VK_VERSION_1_4
    typedef struct VkSubresourceLayout2 {
        VkStructureType        sType;
        void*                  pNext;
        VkSubresourceLayout    subresourceLayout;
    } VkSubresourceLayout2;

    // Provided by VK_KHR_maintenance5
    // Equivalent to VkSubresourceLayout2
    typedef VkSubresourceLayout2 VkSubresourceLayout2KHR;

    // Provided by VK_EXT_host_image_copy, VK_EXT_image_compression_control
    // Equivalent to VkSubresourceLayout2
    typedef VkSubresourceLayout2 VkSubresourceLayout2EXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `subresourceLayout` is a VkSubresourceLayout structure.

Valid Usage (Implicit)

- VUID-VkSubresourceLayout2-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SUBRESOURCE_LAYOUT_2

- VUID-VkSubresourceLayout2-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkImageCompressionPropertiesEXT or VkSubresourceHostMemcpySize

- VUID-VkSubresourceLayout2-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

To query the memory size needed to copy to or from an image using vkCopyMemoryToImage or vkCopyImageToMemory when the VK_HOST_IMAGE_COPY_MEMCPY_BIT flag is specified, add a VkSubresourceHostMemcpySize structure to the `pNext` chain of the VkSubresourceLayout2 structure in a call to vkGetImageSubresourceLayout2.

The `VkSubresourceHostMemcpySize` structure is defined as:

    // Provided by VK_VERSION_1_4
    typedef struct VkSubresourceHostMemcpySize {
        VkStructureType    sType;
        void*              pNext;
        VkDeviceSize       size;
    } VkSubresourceHostMemcpySize;

    // Provided by VK_EXT_host_image_copy
    // Equivalent to VkSubresourceHostMemcpySize
    typedef VkSubresourceHostMemcpySize VkSubresourceHostMemcpySizeEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `size` is the size in bytes of the image subresource.

Valid Usage (Implicit)

- VUID-VkSubresourceHostMemcpySize-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SUBRESOURCE_HOST_MEMCPY_SIZE

Structure Chaining

Extends the structure

  - VkSubresourceLayout2

To query the memory layout of an image subresource, without an image object, call:

    // Provided by VK_VERSION_1_4
    void vkGetDeviceImageSubresourceLayout(
        VkDevice                                    device,
        const VkDeviceImageSubresourceInfo*         pInfo,
        VkSubresourceLayout2*                       pLayout);

    // Provided by VK_KHR_maintenance5
    // Equivalent to vkGetDeviceImageSubresourceLayout
    void vkGetDeviceImageSubresourceLayoutKHR(
        VkDevice                                    device,
        const VkDeviceImageSubresourceInfo*         pInfo,
        VkSubresourceLayout2*                       pLayout);

- `device` is the logical device that owns the image.

- `pInfo` is a pointer to a VkDeviceImageSubresourceInfo structure containing parameters required for the subresource layout query.

- `pLayout` is a pointer to a VkSubresourceLayout2 structure in which the layout is returned.

`vkGetDeviceImageSubresourceLayout` behaves similarly to vkGetImageSubresourceLayout2, but uses a VkImageCreateInfo structure to specify the image rather than a VkImage object.

Valid Usage (Implicit)

- VUID-vkGetDeviceImageSubresourceLayout-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetDeviceImageSubresourceLayout-pInfo-parameter
  `pInfo` must be a valid pointer to a valid VkDeviceImageSubresourceInfo structure

- VUID-vkGetDeviceImageSubresourceLayout-pLayout-parameter
  `pLayout` must be a valid pointer to a VkSubresourceLayout2 structure

The `VkDeviceImageSubresourceInfo` structure is defined as:

    // Provided by VK_VERSION_1_4
    typedef struct VkDeviceImageSubresourceInfo {
        VkStructureType               sType;
        const void*                   pNext;
        const VkImageCreateInfo*      pCreateInfo;
        const VkImageSubresource2*    pSubresource;
    } VkDeviceImageSubresourceInfo;

    // Provided by VK_KHR_maintenance5
    // Equivalent to VkDeviceImageSubresourceInfo
    typedef VkDeviceImageSubresourceInfo VkDeviceImageSubresourceInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `pCreateInfo` is a pointer to a VkImageCreateInfo structure containing parameters affecting creation of the image to query.

- `pSubresource` is a pointer to a VkImageSubresource2 structure selecting a specific image subresource for the query.

Valid Usage

- VUID-VkDeviceImageSubresourceInfo-aspectMask-00997
  The `aspectMask` member of `pSubresource` must only have a single bit set

- VUID-VkDeviceImageSubresourceInfo-mipLevel-01716
  The `mipLevel` member of `pSubresource` must be less than the `mipLevels` specified in `pCreateInfo`

- VUID-VkDeviceImageSubresourceInfo-arrayLayer-01717
  The `arrayLayer` member of `pSubresource` must be less than the `arrayLayers` specified in `pCreateInfo`

- VUID-VkDeviceImageSubresourceInfo-format-08886
  If `format` of the `image` is a color format that is not a multi-planar format, and `tiling` of the `pCreateInfo` is VK_IMAGE_TILING_LINEAR or VK_IMAGE_TILING_OPTIMAL, the `aspectMask` member of `pSubresource` must be VK_IMAGE_ASPECT_COLOR_BIT

- VUID-VkDeviceImageSubresourceInfo-format-04462
  If `format` of the `pCreateInfo` has a depth component, the `aspectMask` member of `pSubresource` must contain VK_IMAGE_ASPECT_DEPTH_BIT

- VUID-VkDeviceImageSubresourceInfo-format-04463
  If `format` of the `pCreateInfo` has a stencil component, the `aspectMask` member of `pSubresource` must contain VK_IMAGE_ASPECT_STENCIL_BIT

- VUID-VkDeviceImageSubresourceInfo-format-04464
  If `format` of the `pCreateInfo` does not contain a stencil or depth component, the `aspectMask` member of `pSubresource` must not contain VK_IMAGE_ASPECT_DEPTH_BIT or VK_IMAGE_ASPECT_STENCIL_BIT

- VUID-VkDeviceImageSubresourceInfo-tiling-08717
  If the `tiling` of the `pCreateInfo` is VK_IMAGE_TILING_LINEAR and has a multi-planar format, then the `aspectMask` member of `pSubresource` must be a single valid multi-planar aspect mask bit

Valid Usage (Implicit)

- VUID-VkDeviceImageSubresourceInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DEVICE_IMAGE_SUBRESOURCE_INFO

- VUID-VkDeviceImageSubresourceInfo-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkDeviceImageSubresourceInfo-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkImageCreateInfo structure

- VUID-VkDeviceImageSubresourceInfo-pSubresource-parameter
  `pSubresource` must be a valid pointer to a valid VkImageSubresource2 structure

If an image was created with VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, then the image has a Linux DRM format modifier. To query the modifier, call:

    // Provided by VK_EXT_image_drm_format_modifier
    VkResult vkGetImageDrmFormatModifierPropertiesEXT(
        VkDevice                                    device,
        VkImage                                     image,
        VkImageDrmFormatModifierPropertiesEXT*      pProperties);

- `device` is the logical device that owns the image.

- `image` is the queried image.

- `pProperties` is a pointer to a VkImageDrmFormatModifierPropertiesEXT structure in which properties of the image’s DRM format modifier are returned.

Valid Usage

- VUID-vkGetImageDrmFormatModifierPropertiesEXT-image-02272
  `image` must have been created with `tiling` equal to VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT

Valid Usage (Implicit)

- VUID-vkGetImageDrmFormatModifierPropertiesEXT-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetImageDrmFormatModifierPropertiesEXT-image-parameter
  `image` must be a valid VkImage handle

- VUID-vkGetImageDrmFormatModifierPropertiesEXT-pProperties-parameter
  `pProperties` must be a valid pointer to a VkImageDrmFormatModifierPropertiesEXT structure

- VUID-vkGetImageDrmFormatModifierPropertiesEXT-image-parent
  `image` must have been created, allocated, or retrieved from `device`

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The VkImageDrmFormatModifierPropertiesEXT structure is defined as:

    // Provided by VK_EXT_image_drm_format_modifier
    typedef struct VkImageDrmFormatModifierPropertiesEXT {
        VkStructureType    sType;
        void*              pNext;
        uint64_t           drmFormatModifier;
    } VkImageDrmFormatModifierPropertiesEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `drmFormatModifier` returns the image’s Linux DRM format modifier.

If the `image` was created with VkImageDrmFormatModifierListCreateInfoEXT, then the returned `drmFormatModifier` must belong to the list of modifiers provided at time of image creation in VkImageDrmFormatModifierListCreateInfoEXT::`pDrmFormatModifiers`. If the `image` was created with VkImageDrmFormatModifierExplicitCreateInfoEXT, then the returned `drmFormatModifier` must be the modifier provided at time of image creation in VkImageDrmFormatModifierExplicitCreateInfoEXT::`drmFormatModifier`.

Valid Usage (Implicit)

- VUID-VkImageDrmFormatModifierPropertiesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_PROPERTIES_EXT

- VUID-VkImageDrmFormatModifierPropertiesEXT-pNext-pNext
  `pNext` must be `NULL`

To destroy an image, call:

    // Provided by VK_VERSION_1_0
    void vkDestroyImage(
        VkDevice                                    device,
        VkImage                                     image,
        const VkAllocationCallbacks*                pAllocator);

- `device` is the logical device that destroys the image.

- `image` is the image to destroy.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

Valid Usage

- VUID-vkDestroyImage-image-01000
  All submitted commands that refer to `image`, either directly or via a `VkImageView`, must have completed execution

- VUID-vkDestroyImage-image-01001
  If `VkAllocationCallbacks` were provided when `image` was created, a compatible set of callbacks must be provided here

- VUID-vkDestroyImage-image-01002
  If no `VkAllocationCallbacks` were provided when `image` was created, `pAllocator` must be `NULL`

- VUID-vkDestroyImage-image-04882
  `image` must not have been acquired from vkGetSwapchainImagesKHR

Valid Usage (Implicit)

- VUID-vkDestroyImage-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkDestroyImage-image-parameter
  If `image` is not VK_NULL_HANDLE, `image` must be a valid VkImage handle

- VUID-vkDestroyImage-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkDestroyImage-image-parent
  If `image` is a valid handle, it must have been created, allocated, or retrieved from `device`

Host Synchronization

- Host access to `image` must be externally synchronized

#### 12.4.2. Image Format Features

Valid uses of a VkImage may depend on the image’s format features, defined below. Such constraints are documented in the affected valid usage statement.

- If the image was created with VK_IMAGE_TILING_LINEAR, then its set of format features is the value of VkFormatProperties::`linearTilingFeatures` found by calling vkGetPhysicalDeviceFormatProperties on the same `format` as VkImageCreateInfo::`format`.

- If the image was created with VK_IMAGE_TILING_OPTIMAL, but without an Android hardware buffer external format, or a QNX Screen Buffer external format or an VkBufferCollectionImageCreateInfoFUCHSIA, then its set of format features is the value of VkFormatProperties::`optimalTilingFeatures` found by calling vkGetPhysicalDeviceFormatProperties on the same `format` as VkImageCreateInfo::`format`.

- If the image was created with an Android hardware buffer external format, then its set of format features is the value of VkAndroidHardwareBufferFormatPropertiesANDROID::`formatFeatures` found by calling vkGetAndroidHardwareBufferPropertiesANDROID on the Android hardware buffer that was imported to the VkDeviceMemory to which the image is bound.

- If the image was created with an QNX Screen buffer external format, then its set of format features is the value of VkScreenBufferFormatPropertiesQNX::`formatFeatures` found by calling vkGetScreenBufferPropertiesQNX on the QNX Screen buffer that was imported to the VkDeviceMemory to which the image is bound.

- If the image was created with VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, then:

  - The image’s DRM format modifier is the value of VkImageDrmFormatModifierPropertiesEXT::`drmFormatModifier` found by calling vkGetImageDrmFormatModifierPropertiesEXT.

  - Let VkDrmFormatModifierPropertiesListEXT::`pDrmFormatModifierProperties` be the array found by calling vkGetPhysicalDeviceFormatProperties2 on the same `format` as VkImageCreateInfo::`format`.

  - Let `VkDrmFormatModifierPropertiesEXT prop` be the array element whose `drmFormatModifier` member is the value of the image’s DRM format modifier.

  - Then the image’s set of format features is the value of `prop`::`drmFormatModifierTilingFeatures`.

#### 12.4.3. Corner-Sampled Images

A corner-sampled image is an image where unnormalized texel coordinates are centered on integer values rather than half-integer values.

A corner-sampled image has a number of differences compared to conventional texture image:

- Texels are centered on integer coordinates. See Unnormalized Texel Coordinate Operations

- Normalized coordinates are scaled using coord × (dim - 1) rather than coord × dim, where dim is the size of one dimension of the image. See normalized texel coordinate transform.

- Partial derivatives are scaled using coord × (dim - 1) rather than coord × dim. See Scale Factor Operation.

- Calculation of the next higher LOD size goes according to ⌈dim / 2⌉ rather than ⌊dim / 2⌋. See Image Mip Level Sizing.

- The minimum level size is 2x2 for 2D images and 2x2x2 for 3D images. See Image Mip Level Sizing.

Corner-sampling is only supported for 2D and 3D images. When sampling a corner-sampled image, the sampler addressing mode must be VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE. Corner-sampled images are not supported as cube maps or depth/stencil images.

#### 12.4.4. Image Mip Level Sizing

A complete mipmap chain is the full set of mip levels, from the largest mip level provided, down to the minimum mip level size.

##### Conventional Images

For conventional images, the dimensions of each successive mip level, n+1, are:

  `width`n+1 = max(⌊`width`n/2⌋, 1)

  `height`n+1 = max(⌊`height`n/2⌋, 1)

  `depth`n+1 = max(⌊`depth`n/2⌋, 1)

where `width`n, `height`n, and `depth`n are the dimensions of the next larger mip level, n.

The minimum mip level size is:

- 1 for one-dimensional images,

- 1x1 for two-dimensional images, and

- 1x1x1 for three-dimensional images.

The number of levels in a complete mipmap chain is:

  ⌊log2(max(`width`0, `height`0, `depth`0))⌋ + 1

where `width`0, `height`0, and `depth`0 are the dimensions of the largest (most detailed) mip level, `0`.

##### Corner-Sampled Images

For corner-sampled images, the dimensions of each successive mip level, n+1, are:

  `width`n+1 = max(⌈`width`n/2⌉, 2)

  `height`n+1 = max(⌈`height`n/2⌉, 2)

  `depth`n+1 = max(⌈`depth`n/2⌉, 2)

where `width`n, `height`n, and `depth`n are the dimensions of the next larger mip level, n.

The minimum mip level size is:

- 2x2 for two-dimensional images, and

- 2x2x2 for three-dimensional images.

The number of levels in a complete mipmap chain is:

  ⌈log2(max(`width`0, `height`0, `depth`0))⌉

where `width`0, `height`0, and `depth`0 are the dimensions of the largest (most detailed) mip level, `0`.

#### 12.4.5. Image Capture Replay for Descriptor Heaps

To allow for a replay tool to capture and replay image descriptors used with descriptor heaps, opaque data must be captured during the initial recording and provided when recreating the image during replay, using the following functions:

To get the opaque capture descriptor data for images, call:

    // Provided by VK_EXT_descriptor_heap
    VkResult vkGetImageOpaqueCaptureDataEXT(
        VkDevice                                    device,
        uint32_t                                    imageCount,
        const VkImage*                              pImages,
        VkHostAddressRangeEXT*                      pDatas);

- `device` is the logical device that gets the data.

- `imageCount` is the number of images to retrieve data from.

- `pImages` is a pointer to an array of VkImage objects to retrieve the opaque capture data from.

- `pDatas` is a pointer to an array of VkHostAddressRangeEXT structures defining the host address ranges where each image’s opaque capture data will be written.

Valid Usage

- VUID-vkGetImageOpaqueCaptureDataEXT-descriptorHeapCaptureReplay-11282
  The `descriptorHeapCaptureReplay` feature must be enabled

- VUID-vkGetImageOpaqueCaptureDataEXT-size-11283
  The `size` member of each element of `pDatas` must be equal to `imageCaptureReplayOpaqueDataSize`

- VUID-vkGetImageOpaqueCaptureDataEXT-device-11284
  If `device` was created with multiple physical devices, then the `bufferDeviceAddressMultiDevice` feature must be enabled

- VUID-vkGetImageOpaqueCaptureDataEXT-pImages-11285
  Each element of `pImages` must have been created with VK_IMAGE_CREATE_DESCRIPTOR_HEAP_CAPTURE_REPLAY_BIT_EXT set in VkImageCreateInfo::`flags`

Valid Usage (Implicit)

- VUID-vkGetImageOpaqueCaptureDataEXT-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetImageOpaqueCaptureDataEXT-pImages-parameter
  `pImages` must be a valid pointer to an array of `imageCount` valid VkImage handles

- VUID-vkGetImageOpaqueCaptureDataEXT-pDatas-parameter
  `pDatas` must be a valid pointer to an array of `imageCount` VkHostAddressRangeEXT structures

- VUID-vkGetImageOpaqueCaptureDataEXT-imageCount-arraylength
  `imageCount` must be greater than `0`

- VUID-vkGetImageOpaqueCaptureDataEXT-pImages-parent
  Each element of `pImages` must have been created, allocated, or retrieved from `device`

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkOpaqueCaptureDataCreateInfoEXT` structure is defined as:

    // Provided by VK_EXT_descriptor_heap
    typedef struct VkOpaqueCaptureDataCreateInfoEXT {
        VkStructureType                      sType;
        const void*                          pNext;
        const VkHostAddressRangeConstEXT*    pData;
    } VkOpaqueCaptureDataCreateInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `pData` is a pointer to the range of host memory containing opaque data previously captured via vkGetImageOpaqueCaptureDataEXT.

When an image is created with VK_IMAGE_CREATE_DESCRIPTOR_HEAP_CAPTURE_REPLAY_BIT_EXT set in VkImageCreateInfo::`flags`, if the `pNext` chain of VkImageCreateInfo includes this structure, and `pData` is not `NULL`, the implementation will attempt to recreate the image such that descriptors written with vkWriteResourceDescriptorsEXT will be reproduced with the same bit pattern as during capture if possible. If the implementation is unable to recreate the image based on this data, image creation will fail and return VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS.

When a tensor is created with VK_TENSOR_CREATE_DESCRIPTOR_HEAP_CAPTURE_REPLAY_BIT_ARM set in VkTensorCreateInfoARM::`flags`, if the `pNext` chain of VkTensorCreateInfoARM includes this structure, and `pData` is not `NULL`, the implementation will attempt to recreate the tensor such that descriptors written with vkWriteResourceDescriptorsEXT will be reproduced with the same bit pattern as during capture if possible. If the implementation is unable to recreate the tensor based on this data, tensor creation will fail and return VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS.

If this structure is not present, it is equivalent to setting `pData` to `NULL`.

Valid Usage (Implicit)

- VUID-VkOpaqueCaptureDataCreateInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_OPAQUE_CAPTURE_DATA_CREATE_INFO_EXT

- VUID-VkOpaqueCaptureDataCreateInfoEXT-pData-parameter
  If `pData` is not `NULL`, `pData` must be a valid pointer to a valid VkHostAddressRangeConstEXT structure

Structure Chaining

Extends the structures

  - VkImageCreateInfo

  - VkTensorCreateInfoARM

#### 12.4.6. Tensor Capture Replay for Descriptor Heaps

To allow for a replay tool to capture and replay tensor descriptors used with descriptor heaps, opaque data must be captured during the initial recording and provided when recreating the tensor during replay, using the following functions:

To get the opaque capture descriptor data for tensors, call:

    // Provided by VK_EXT_descriptor_heap with VK_ARM_tensors
    VkResult vkGetTensorOpaqueCaptureDataARM(
        VkDevice                                    device,
        uint32_t                                    tensorCount,
        const VkTensorARM*                          pTensors,
        VkHostAddressRangeEXT*                      pDatas);

- `device` is the logical device that gets the data.

- `tensorCount` is the number of tensors to retrieve data from.

- `pTensors` is a pointer to an array of VkTensorARM objects to retrieve the opaque capture data from.

- `pDatas` is a pointer to an array of VkHostAddressRangeEXT structures defining the host address ranges where each tensor’s opaque capture data will be written.

Valid Usage

- VUID-vkGetTensorOpaqueCaptureDataARM-descriptorHeapCaptureReplay-11391
  The `descriptorHeapCaptureReplay` feature must be enabled

- VUID-vkGetTensorOpaqueCaptureDataARM-size-11392
  The `size` member of each element of `pDatas` must be equal to `tensorCaptureReplayOpaqueDataSize`

- VUID-vkGetTensorOpaqueCaptureDataARM-device-11393
  If `device` was created with multiple physical devices, then the `bufferDeviceAddressMultiDevice` feature must be enabled

- VUID-vkGetTensorOpaqueCaptureDataARM-pTensors-11394
  Each element of `pTensors` must have been created with VK_TENSOR_CREATE_DESCRIPTOR_HEAP_CAPTURE_REPLAY_BIT_ARM set in VkTensorCreateInfoARM::`flags`

Valid Usage (Implicit)

- VUID-vkGetTensorOpaqueCaptureDataARM-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetTensorOpaqueCaptureDataARM-pTensors-parameter
  `pTensors` must be a valid pointer to an array of `tensorCount` valid VkTensorARM handles

- VUID-vkGetTensorOpaqueCaptureDataARM-pDatas-parameter
  `pDatas` must be a valid pointer to an array of `tensorCount` VkHostAddressRangeEXT structures

- VUID-vkGetTensorOpaqueCaptureDataARM-tensorCount-arraylength
  `tensorCount` must be greater than `0`

- VUID-vkGetTensorOpaqueCaptureDataARM-pTensors-parent
  Each element of `pTensors` must have been created, allocated, or retrieved from `device`

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

### 12.5. Image Layouts

Images are stored in implementation-dependent opaque layouts in memory. Each layout has limitations on what kinds of operations are supported for image subresources using the layout. At any given time, the data representing an image subresource in memory exists in a particular layout which is determined by the most recent layout transition that was performed on that image subresource. Applications have control over which layout each image subresource uses, and can transition an image subresource from one layout to another. Transitions can happen with an image memory barrier, included as part of a vkCmdPipelineBarrier or a vkCmdWaitEvents command buffer command (see Image Memory Barriers), or as part of a subpass dependency within a render pass (see `VkSubpassDependency`).

Image layout is per-image subresource. Separate image subresources of the same image can be in different layouts at the same time, with the exception that depth and stencil aspects of a given image subresource can only be in different layouts if the `separateDepthStencilLayouts` feature is enabled. When an `VkImageView` descriptor is accessed on the device, all image subresources must be in a valid image layout.

Note | Each layout may offer optimal performance for a specific usage of image memory. For example, an image with a layout of VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL may provide optimal performance for use as a color attachment, but be unsupported for use in transfer commands. Applications can transition an image subresource from one layout to another in order to achieve optimal performance when the image subresource is used for multiple kinds of operations. After initialization, applications need not use any layout other than the general layout, though this may produce suboptimal performance on some implementations.

Upon creation, all image subresources of an image are initially in the same layout, where that layout is selected by the `VkImageCreateInfo`::`initialLayout` member. The `initialLayout` must be either VK_IMAGE_LAYOUT_UNDEFINED or VK_IMAGE_LAYOUT_ZERO_INITIALIZED_EXT or VK_IMAGE_LAYOUT_PREINITIALIZED. If it is VK_IMAGE_LAYOUT_PREINITIALIZED, then the image data can be preinitialized by the host while using this layout, and the transition away from this layout will preserve that data. If it is VK_IMAGE_LAYOUT_ZERO_INITIALIZED_EXT, then the image data is interpreted to be zeroed. If the memory bound to this image is not fully zeroed when the image is transitioned to a different layout, the results are undefined. If it is VK_IMAGE_LAYOUT_UNDEFINED, then the contents of the data are considered to be undefined, and the transition away from this layout is not guaranteed to preserve that data. For either of these initial layouts, any image subresources must be transitioned to another layout before they are accessed by the device.

Host access to image memory is only well-defined for linear images and for image subresources of those images which are currently in any of the following layouts:

- VK_IMAGE_LAYOUT_PREINITIALIZED

- VK_IMAGE_LAYOUT_GENERAL

- VK_IMAGE_LAYOUT_ZERO_INITIALIZED_EXT

Calling vkGetImageSubresourceLayout for a linear image returns a subresource layout mapping that is valid for either of those image layouts.

The set of image layouts consists of:

    // Provided by VK_VERSION_1_0
    typedef enum VkImageLayout {
        VK_IMAGE_LAYOUT_UNDEFINED = 0,
        VK_IMAGE_LAYOUT_GENERAL = 1,
        VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL = 2,
        VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL = 3,
        VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL = 4,
        VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL = 5,
        VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL = 6,
        VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL = 7,
        VK_IMAGE_LAYOUT_PREINITIALIZED = 8,
      // Provided by VK_VERSION_1_1
        VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL = 1000117000,
      // Provided by VK_VERSION_1_1
        VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL = 1000117001,
      // Provided by VK_VERSION_1_2
        VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL = 1000241000,
      // Provided by VK_VERSION_1_2
        VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL = 1000241001,
      // Provided by VK_VERSION_1_2
        VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL = 1000241002,
      // Provided by VK_VERSION_1_2
        VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL = 1000241003,
      // Provided by VK_VERSION_1_3
        VK_IMAGE_LAYOUT_READ_ONLY_OPTIMAL = 1000314000,
      // Provided by VK_VERSION_1_3
        VK_IMAGE_LAYOUT_ATTACHMENT_OPTIMAL = 1000314001,
      // Provided by VK_VERSION_1_4
        VK_IMAGE_LAYOUT_RENDERING_LOCAL_READ = 1000232000,
      // Provided by VK_KHR_swapchain
        VK_IMAGE_LAYOUT_PRESENT_SRC_KHR = 1000001002,
      // Provided by VK_KHR_video_decode_queue
        VK_IMAGE_LAYOUT_VIDEO_DECODE_DST_KHR = 1000024000,
      // Provided by VK_KHR_video_decode_queue
        VK_IMAGE_LAYOUT_VIDEO_DECODE_SRC_KHR = 1000024001,
      // Provided by VK_KHR_video_decode_queue
        VK_IMAGE_LAYOUT_VIDEO_DECODE_DPB_KHR = 1000024002,
      // Provided by VK_KHR_shared_presentable_image
        VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR = 1000111000,
      // Provided by VK_EXT_fragment_density_map
        VK_IMAGE_LAYOUT_FRAGMENT_DENSITY_MAP_OPTIMAL_EXT = 1000218000,
      // Provided by VK_KHR_fragment_shading_rate
        VK_IMAGE_LAYOUT_FRAGMENT_SHADING_RATE_ATTACHMENT_OPTIMAL_KHR = 1000164003,
      // Provided by VK_KHR_video_encode_queue
        VK_IMAGE_LAYOUT_VIDEO_ENCODE_DST_KHR = 1000299000,
      // Provided by VK_KHR_video_encode_queue
        VK_IMAGE_LAYOUT_VIDEO_ENCODE_SRC_KHR = 1000299001,
      // Provided by VK_KHR_video_encode_queue
        VK_IMAGE_LAYOUT_VIDEO_ENCODE_DPB_KHR = 1000299002,
      // Provided by VK_EXT_attachment_feedback_loop_layout
        VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT = 1000339000,
      // Provided by VK_ARM_tensors
        VK_IMAGE_LAYOUT_TENSOR_ALIASING_ARM = 1000460000,
      // Provided by VK_KHR_video_encode_quantization_map
        VK_IMAGE_LAYOUT_VIDEO_ENCODE_QUANTIZATION_MAP_KHR = 1000553000,
      // Provided by VK_EXT_zero_initialize_device_memory
        VK_IMAGE_LAYOUT_ZERO_INITIALIZED_EXT = 1000620000,
      // Provided by VK_KHR_maintenance2
        VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL_KHR = VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL,
      // Provided by VK_KHR_maintenance2
        VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL_KHR = VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL,
      // Provided by VK_NV_shading_rate_image
        VK_IMAGE_LAYOUT_SHADING_RATE_OPTIMAL_NV = VK_IMAGE_LAYOUT_FRAGMENT_SHADING_RATE_ATTACHMENT_OPTIMAL_KHR,
      // Provided by VK_KHR_dynamic_rendering_local_read
        VK_IMAGE_LAYOUT_RENDERING_LOCAL_READ_KHR = VK_IMAGE_LAYOUT_RENDERING_LOCAL_READ,
      // Provided by VK_KHR_separate_depth_stencil_layouts
        VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL_KHR = VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL,
      // Provided by VK_KHR_separate_depth_stencil_layouts
        VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL_KHR = VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL,
      // Provided by VK_KHR_separate_depth_stencil_layouts
        VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL_KHR = VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL,
      // Provided by VK_KHR_separate_depth_stencil_layouts
        VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL_KHR = VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL,
      // Provided by VK_KHR_synchronization2
        VK_IMAGE_LAYOUT_READ_ONLY_OPTIMAL_KHR = VK_IMAGE_LAYOUT_READ_ONLY_OPTIMAL,
      // Provided by VK_KHR_synchronization2
        VK_IMAGE_LAYOUT_ATTACHMENT_OPTIMAL_KHR = VK_IMAGE_LAYOUT_ATTACHMENT_OPTIMAL,
    } VkImageLayout;

The type(s) of device access supported by each layout are:

- VK_IMAGE_LAYOUT_UNDEFINED specifies that the layout is unknown. Image memory cannot be transitioned into this layout. This layout can be used as the `initialLayout` member of VkImageCreateInfo. This layout can be used in place of the current image layout in a layout transition, but doing so will cause the contents of the image’s memory to be undefined.

- VK_IMAGE_LAYOUT_PREINITIALIZED specifies that an image’s memory is in a defined layout and can be populated by data, but that it has not yet been initialized by the driver. Image memory cannot be transitioned into this layout. This layout can be used as the `initialLayout` member of VkImageCreateInfo. This layout is intended to be used as the initial layout for an image whose contents are written by the host, and hence the data can be written to memory immediately, without first executing a layout transition. Currently, VK_IMAGE_LAYOUT_PREINITIALIZED is only useful with linear images because there is not a standard layout defined for VK_IMAGE_TILING_OPTIMAL images.

- VK_IMAGE_LAYOUT_GENERAL supports all types of device access, unless specified otherwise.

- VK_IMAGE_LAYOUT_ZERO_INITIALIZED_EXT specifies that an image’s memory is in a defined layout and is zeroed, but that it has not yet been initialized by the driver. Image memory cannot be transitioned into this layout. This layout can be used as the `initialLayout` member of VkImageCreateInfo. This layout is intended to be used as the initial layout for an image whose contents are already zeroed, either from being explicitly set to zero by an application or from being allocated with VK_MEMORY_ALLOCATE_ZERO_INITIALIZE_BIT_EXT.

- VK_IMAGE_LAYOUT_ATTACHMENT_OPTIMAL specifies a layout that must only be used with attachment accesses in the graphics pipeline.

- VK_IMAGE_LAYOUT_READ_ONLY_OPTIMAL specifies a layout allowing read only access as an attachment, or in shaders as a sampled image, combined image/sampler, or input attachment.

- VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL must only be used as a color or resolve attachment in a `VkFramebuffer`. This layout is valid only for image subresources of images created with the VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT usage flag set.

- VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL specifies a layout for both the depth and stencil aspects of a depth/stencil format image allowing read and write access as a depth/stencil attachment. It is equivalent to VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL and VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL.

- VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL specifies a layout for both the depth and stencil aspects of a depth/stencil format image allowing read only access as a depth/stencil attachment or in shaders as a sampled image, combined image/sampler, or input attachment. It is equivalent to VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL and VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL.

- VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL specifies a layout for depth/stencil format images allowing read and write access to the stencil aspect as a stencil attachment, and read only access to the depth aspect as a depth attachment or in shaders as a sampled image, combined image/sampler, or input attachment. It is equivalent to VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL and VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL.

- VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL specifies a layout for depth/stencil format images allowing read and write access to the depth aspect as a depth attachment, and read only access to the stencil aspect as a stencil attachment or in shaders as a sampled image, combined image/sampler, or input attachment. It is equivalent to VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL and VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL.

- VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL specifies a layout for the depth aspect of a depth/stencil format image allowing read and write access as a depth attachment.

- VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL specifies a layout for the depth aspect of a depth/stencil format image allowing read-only access as a depth attachment or in shaders as a sampled image, combined image/sampler, or input attachment.

- VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL specifies a layout for the stencil aspect of a depth/stencil format image allowing read and write access as a stencil attachment.

- VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL specifies a layout for the stencil aspect of a depth/stencil format image allowing read-only access as a stencil attachment or in shaders as a sampled image, combined image/sampler, or input attachment.

- VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL specifies a layout allowing read-only access in a shader as a sampled image, combined image/sampler, or input attachment. This layout is valid only for image subresources of images created with the VK_IMAGE_USAGE_SAMPLED_BIT or VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT usage bits enabled.

- VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL must only be used as a source image of a transfer command (see the definition of VK_PIPELINE_STAGE_TRANSFER_BIT). This layout is valid only for image subresources of images created with the VK_IMAGE_USAGE_TRANSFER_SRC_BIT usage flag set.

- VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL must only be used as a destination image of a transfer command. This layout is valid only for image subresources of images created with the VK_IMAGE_USAGE_TRANSFER_DST_BIT usage flag set.

- VK_IMAGE_LAYOUT_PRESENT_SRC_KHR must only be used for presenting a presentable image for display.

- VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR is valid only for shared presentable images, and must be used for any usage the image supports.

- VK_IMAGE_LAYOUT_FRAGMENT_SHADING_RATE_ATTACHMENT_OPTIMAL_KHR must only be used as a fragment shading rate attachment or shading rate image. This layout is valid only for image subresources of images created with the VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR usage flag set.

- VK_IMAGE_LAYOUT_FRAGMENT_DENSITY_MAP_OPTIMAL_EXT must only be used as a fragment density map attachment in a `VkRenderPass`. This layout is valid only for image subresources of images created with the VK_IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT usage flag set.

- VK_IMAGE_LAYOUT_VIDEO_DECODE_DST_KHR must only be used as a decode output picture in a video decode operation. This layout is valid only for image subresources of images created with the VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR usage flag set.

- VK_IMAGE_LAYOUT_VIDEO_DECODE_SRC_KHR is reserved for future use.

- VK_IMAGE_LAYOUT_VIDEO_DECODE_DPB_KHR must only be used as an output reconstructed picture or an input reference picture in a video decode operation. This layout is valid only for image subresources of images created with the VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR usage flag set.

- VK_IMAGE_LAYOUT_VIDEO_ENCODE_DST_KHR is reserved for future use.

- VK_IMAGE_LAYOUT_VIDEO_ENCODE_SRC_KHR must only be used as an encode input picture in a video encode operation. This layout is valid only for image subresources of images created with the VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR usage flag set.

- VK_IMAGE_LAYOUT_VIDEO_ENCODE_DPB_KHR must only be used as an output reconstructed picture or an input reference picture in a video encode operation. This layout is valid only for image subresources of images created with the VK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR usage flag set.

- VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT must only be used as either a color attachment or depth/stencil attachment and/or read-only access in a shader as a sampled image, combined image/sampler, or input attachment. This layout is valid only for image subresources of images created with the VK_IMAGE_USAGE_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT usage flag set, and either the VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT or VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT usage flags set, and either the VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT or VK_IMAGE_USAGE_SAMPLED_BIT usage flags set

- VK_IMAGE_LAYOUT_RENDERING_LOCAL_READ must only be used as either a storage image, or a color or depth/stencil attachment and an input attachment. This layout is valid only for image subresources of images created with either the VK_IMAGE_USAGE_STORAGE_BIT usage flag set, or both the VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT and either of the VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT or VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT usage flags set.

- VK_IMAGE_LAYOUT_VIDEO_ENCODE_QUANTIZATION_MAP_KHR must only be used as a quantization map in a video encode operation. This layout is valid only for image subresources of images created with the VK_IMAGE_USAGE_VIDEO_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR or VK_IMAGE_USAGE_VIDEO_ENCODE_EMPHASIS_MAP_BIT_KHR usage flags set.

- VK_IMAGE_LAYOUT_TENSOR_ALIASING_ARM specifies the layout that an image created with VK_IMAGE_TILING_OPTIMAL must be in, if the `unifiedImageLayouts` feature is disabled, or may be in if it is enabled, for it and a tensor bound to the same aliased range of memory to consistently interpret the data in memory. See Memory Aliasing for a complete set of rules for tensor/image aliasing. This layout is valid only for image subresources of images created with the VK_IMAGE_USAGE_TENSOR_ALIASING_BIT_ARM usage flag set.

The layout of each image subresource is not a state of the image subresource itself, but is rather a property of how the data in memory is organized, and thus for each mechanism of accessing an image in the API the application must specify a parameter or structure member that indicates which image layout the image subresource(s) are considered to be in when the image will be accessed. For transfer commands, this is a parameter to the command (see Clear Commands and Copy Commands). For use as a framebuffer attachment, this is a member in the substructures of the VkRenderPassCreateInfo (see Render Pass). For use in a descriptor set, this is a member in the `VkDescriptorImageInfo` structure (see Descriptor Set Updates).

If the `unifiedImageLayouts` feature is enabled, the VK_IMAGE_LAYOUT_GENERAL image layout may be used in place of the other layouts where allowed with no loss of performance.

Note | VK_IMAGE_LAYOUT_GENERAL can be a useful catch-all image layout, but there are situations where a dedicated image layout must be used instead. Some examples include: VK_IMAGE_LAYOUT_PRESENT_SRC_KHR VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR VK_IMAGE_LAYOUT_VIDEO_DECODE_SRC_KHR, VK_IMAGE_LAYOUT_VIDEO_DECODE_DST_KHR, and VK_IMAGE_LAYOUT_VIDEO_DECODE_DPB_KHR without the `unifiedImageLayoutsVideo` feature VK_IMAGE_LAYOUT_VIDEO_ENCODE_SRC_KHR, VK_IMAGE_LAYOUT_VIDEO_ENCODE_DST_KHR, and VK_IMAGE_LAYOUT_VIDEO_ENCODE_DPB_KHR without the `unifiedImageLayoutsVideo` feature VK_IMAGE_LAYOUT_VIDEO_ENCODE_QUANTIZATION_MAP_KHR without the `unifiedImageLayoutsVideo` feature

Note | While VK_IMAGE_LAYOUT_GENERAL suggests that all types of device access is possible, it does not mean that all patterns of memory accesses are safe in all situations. Common Render Pass Data Races outlines some situations where data races are unavoidable. For example, when a subresource is used as both an attachment and a sampled image (i.e., not an input attachment), enabling feedback loop adds extra guarantees which VK_IMAGE_LAYOUT_GENERAL alone does not.

#### 12.5.1. Image Layout Matching Rules

At the time that any command buffer command accessing an image executes on any queue, the layouts of the image subresources that are accessed must all match exactly the layout specified via the API controlling those accesses, except in case of accesses to an image with a depth/stencil format performed through descriptors referring to only a single aspect of the image, where the following relaxed matching rules apply:

- Descriptors referring just to the depth aspect of a depth/stencil image only need to match in the image layout of the depth aspect, thus VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL and VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL are considered to match.

- Descriptors referring just to the stencil aspect of a depth/stencil image only need to match in the image layout of the stencil aspect, thus VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL and VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL are considered to match.

When performing a layout transition on an image subresource, the old layout value must either equal the current layout of the image subresource (at the time the transition executes), or else be VK_IMAGE_LAYOUT_UNDEFINED (implying that the contents of the image subresource need not be preserved). The new layout used in a transition must not be any of:

- VK_IMAGE_LAYOUT_UNDEFINED

- VK_IMAGE_LAYOUT_PREINITIALIZED

- VK_IMAGE_LAYOUT_ZERO_INITIALIZED_EXT

The image layout of each image subresource of a depth/stencil image created with VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT is dependent on the last sample locations used to render to the image subresource as a depth/stencil attachment, thus applications must provide the same sample locations that were last used to render to the given image subresource whenever a layout transition of the image subresource happens, otherwise the contents of the depth aspect of the image subresource become undefined.

In addition, depth reads from a depth/stencil attachment referring to an image subresource range of a depth/stencil image created with VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT using different sample locations than what have been last used to perform depth writes to the image subresources of the same image subresource range return undefined values.

Similarly, depth writes to a depth/stencil attachment referring to an image subresource range of a depth/stencil image created with VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT using different sample locations than what have been last used to perform depth writes to the image subresources of the same image subresource range make the contents of the depth aspect of those image subresources undefined.

#### 12.5.2. Image Layout Rules with External Memory

When images created with external memory handle types listed in the external image implied layouts table are accessed outside of Vulkan, they must be in the layout specified in the table, and can be assumed to be in that layout when they are accessed in Vulkan after external access.

Table 16. External Image Implied Layouts
External Memory Handle Type | Implied Layout When Accessed Externally
--- | ---
VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT | VK_IMAGE_LAYOUT_GENERAL
VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT | VK_IMAGE_LAYOUT_GENERAL
VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_BIT_NV | VK_IMAGE_LAYOUT_GENERAL
VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_KMT_BIT_NV | VK_IMAGE_LAYOUT_GENERAL

### 12.6. Image Views

Image objects are not directly accessed by pipeline shaders for reading or writing image data. Instead, image views representing contiguous ranges of the image subresources and containing additional metadata are used for that purpose. Views must be created on images of compatible types, and must represent a valid subset of image subresources.

Image views are represented by `VkImageView` handles:

    // Provided by VK_VERSION_1_0
    VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkImageView)

VK_REMAINING_ARRAY_LAYERS is a special constant value used for image views to indicate that all remaining array layers in an image after the base layer should be included in the view.

    #define VK_REMAINING_ARRAY_LAYERS         (~0U)

VK_REMAINING_MIP_LEVELS is a special constant value used for image views to indicate that all remaining mipmap levels in an image after the base level should be included in the view.

    #define VK_REMAINING_MIP_LEVELS           (~0U)

The types of image views that can be created are:

    // Provided by VK_VERSION_1_0
    typedef enum VkImageViewType {
        VK_IMAGE_VIEW_TYPE_1D = 0,
        VK_IMAGE_VIEW_TYPE_2D = 1,
        VK_IMAGE_VIEW_TYPE_3D = 2,
        VK_IMAGE_VIEW_TYPE_CUBE = 3,
        VK_IMAGE_VIEW_TYPE_1D_ARRAY = 4,
        VK_IMAGE_VIEW_TYPE_2D_ARRAY = 5,
        VK_IMAGE_VIEW_TYPE_CUBE_ARRAY = 6,
    } VkImageViewType;

To create an image view, call:

    // Provided by VK_VERSION_1_0
    VkResult vkCreateImageView(
        VkDevice                                    device,
        const VkImageViewCreateInfo*                pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkImageView*                                pView);

- `device` is the logical device that creates the image view.

- `pCreateInfo` is a pointer to a VkImageViewCreateInfo structure containing parameters to be used to create the image view.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

- `pView` is a pointer to a VkImageView handle in which the resulting image view object is returned.

Valid Usage

- VUID-vkCreateImageView-device-09667
  `device` must support at least one queue family with one of the VK_QUEUE_VIDEO_ENCODE_BIT_KHR, VK_QUEUE_VIDEO_DECODE_BIT_KHR, VK_QUEUE_COMPUTE_BIT, or VK_QUEUE_GRAPHICS_BIT capabilities

- VUID-vkCreateImageView-image-09179
  VkImageViewCreateInfo::`image` must have been created from `device`

- VUID-vkCreateImageView-pNext-12444
  The `pNext` chain of `pCreateInfo` must contain at most one of the structures VkImageViewUsageCreateInfo and VkImageViewUsage2CreateInfoKHR

Valid Usage (Implicit)

- VUID-vkCreateImageView-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkCreateImageView-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkImageViewCreateInfo structure

- VUID-vkCreateImageView-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateImageView-pView-parameter
  `pView` must be a valid pointer to a VkImageView handle

- VUID-vkCreateImageView-device-queuecount
  The device must have been created with at least `1` queue

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkImageViewCreateInfo` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkImageViewCreateInfo {
        VkStructureType            sType;
        const void*                pNext;
        VkImageViewCreateFlags     flags;
        VkImage                    image;
        VkImageViewType            viewType;
        VkFormat                   format;
        VkComponentMapping         components;
        VkImageSubresourceRange    subresourceRange;
    } VkImageViewCreateInfo;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask of VkImageViewCreateFlagBits specifying additional parameters of the image view.

- `image` is a VkImage on which the view will be created.

- `viewType` is a VkImageViewType value specifying the type of the image view.

- `format` is a VkFormat specifying the format and type used to interpret texel blocks of the image.

- `components` is a VkComponentMapping structure specifying a remapping of color components (or of depth or stencil components after they have been converted into color components).

- `subresourceRange` is a VkImageSubresourceRange structure selecting the set of mipmap levels and array layers to be accessible to the view.

Some of the `image` creation parameters are inherited by the view. In particular, image view creation inherits the implicit parameter `usage` specifying the allowed usages of the image view that, by default, takes the value of the corresponding `usage` parameter specified in VkImageCreateInfo at image creation time. The implicit `usage` can be overridden by adding a VkImageViewUsageCreateInfo or VkImageViewUsage2CreateInfoKHR structure to the `pNext` chain, but the view usage must be a subset of the image usage. If `image` has a depth-stencil format and was created with a VkImageStencilUsageCreateInfo structure included in the `pNext` chain of VkImageCreateInfo, the usage is calculated based on the `subresourceRange.aspectMask` provided:

- If `aspectMask` includes only VK_IMAGE_ASPECT_STENCIL_BIT, the implicit `usage` is equal to VkImageStencilUsageCreateInfo::`stencilUsage`.

- If `aspectMask` includes only VK_IMAGE_ASPECT_DEPTH_BIT, the implicit `usage` is equal to VkImageCreateInfo::`usage`.

- If both aspects are included in `aspectMask`, the implicit `usage` is equal to the intersection of VkImageCreateInfo::`usage` and VkImageStencilUsageCreateInfo::`stencilUsage`.

If `image` is a 3D image, its Z range can be restricted to a subset by adding a VkImageViewSlicedCreateInfoEXT to the `pNext` chain.

If `image`’s format is multi-planar and `aspectMask` is one of VK_IMAGE_ASPECT_PLANE_0_BIT, VK_IMAGE_ASPECT_PLANE_1_BIT, or VK_IMAGE_ASPECT_PLANE_2_BIT, the view format is the compatible format for the plane. Otherwise the view format is the `format` used to create `image`.

If `image` was created with the VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT flag, `format` can be set to a format that is compatible with the view format. If the image was not created with VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT, `format` must equal the view format.

When creating a single-plane view of a multi-planar image, `width` and `height` must be derived from the multi-planar image’s dimensions in the manner listed for plane compatibility for the plane.

Views of compatible formats will have the same mapping between texel coordinates and memory locations irrespective of the `format`, with only the interpretation of the bit pattern changing.

If `image` was created with a multi-planar format, and the image view’s `aspectMask` is one of VK_IMAGE_ASPECT_PLANE_0_BIT, VK_IMAGE_ASPECT_PLANE_1_BIT or VK_IMAGE_ASPECT_PLANE_2_BIT, the view’s aspect mask is considered to be equivalent to VK_IMAGE_ASPECT_COLOR_BIT when used as a framebuffer attachment.

Note | Values intended to be used with one view format may not be exactly preserved when written or read through a different format. For example, an integer value that happens to have the bit pattern of a floating-point denorm or NaN may be flushed or canonicalized when written or read through a view with a floating-point format. Similarly, a value written through a signed normalized format that has a bit pattern exactly equal to -2b may be changed to -2b + 1 as described in Conversion from Normalized Fixed-Point to Floating-Point.

If `image` was created with the VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT flag, `format` must be compatible with the image’s format as described above; or must be an uncompressed format, in which case it must be size-compatible with the image’s format. In this case, the resulting image view’s texel dimensions equal the dimensions of the selected mip level divided by the compressed texel block size and rounded up.

The VkComponentMapping `components` member describes a remapping from components of the image to components of the vector returned by shader image instructions. This remapping must be the identity swizzle for any `VkImageView` used with a combined image sampler that enables sampler Y′CBCR conversion, input attachment descriptors, framebuffer attachments, and storage image descriptors.

Image views with formats that require YCBCR conversion or external formats must be created with a VkSamplerYcbcrConversionInfo structure in the `pNext` chain to be used with sampling. Any image view created with a VkSamplerYcbcrConversionInfo structure in the `pNext` chain must only be sampled using a sampler with an identically defined VkSamplerYcbcrConversion. When used in a video coding operation, the specified sampler Y′CBCR conversion has no effect.

Table 17. Image Type and Image View Type Compatibility Requirements
Image View Type | Compatible Image Types
--- | ---
VK_IMAGE_VIEW_TYPE_1D | VK_IMAGE_TYPE_1D
VK_IMAGE_VIEW_TYPE_1D_ARRAY | VK_IMAGE_TYPE_1D
VK_IMAGE_VIEW_TYPE_2D | VK_IMAGE_TYPE_2D , VK_IMAGE_TYPE_3D
VK_IMAGE_VIEW_TYPE_2D_ARRAY | VK_IMAGE_TYPE_2D , VK_IMAGE_TYPE_3D
VK_IMAGE_VIEW_TYPE_CUBE | VK_IMAGE_TYPE_2D
VK_IMAGE_VIEW_TYPE_CUBE_ARRAY | VK_IMAGE_TYPE_2D
VK_IMAGE_VIEW_TYPE_3D | VK_IMAGE_TYPE_3D

Valid Usage

- VUID-VkImageViewCreateInfo-image-01003
  If `image` was not created with VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT then `viewType` must not be VK_IMAGE_VIEW_TYPE_CUBE or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY

- VUID-VkImageViewCreateInfo-viewType-01004
  If the `imageCubeArray` feature is not enabled, `viewType` must not be VK_IMAGE_VIEW_TYPE_CUBE_ARRAY

- VUID-VkImageViewCreateInfo-image-06723
  If `image` was created with VK_IMAGE_TYPE_3D but without VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT set then `viewType` must not be VK_IMAGE_VIEW_TYPE_2D_ARRAY

- VUID-VkImageViewCreateInfo-image-06728
  If `image` was created with VK_IMAGE_TYPE_3D but without VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT or VK_IMAGE_CREATE_2D_VIEW_COMPATIBLE_BIT_EXT set, then `viewType` must not be VK_IMAGE_VIEW_TYPE_2D

- VUID-VkImageViewCreateInfo-image-04970
  If `image` was created with VK_IMAGE_TYPE_3D and `viewType` is VK_IMAGE_VIEW_TYPE_2D or VK_IMAGE_VIEW_TYPE_2D_ARRAY then `subresourceRange.levelCount` must be 1

- VUID-VkImageViewCreateInfo-image-04972
  If `image` was created with a `samples` value not equal to VK_SAMPLE_COUNT_1_BIT then `viewType` must be either VK_IMAGE_VIEW_TYPE_2D or VK_IMAGE_VIEW_TYPE_2D_ARRAY

- VUID-VkImageViewCreateInfo-image-04441
  `image` must have been created with a `usage` value containing at least one of the following:

  - VK_IMAGE_USAGE_SAMPLED_BIT

  - VK_IMAGE_USAGE_STORAGE_BIT

  - VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT

  - VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT

  - VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT

  - VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT

  - VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

  - VK_IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT

  - VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR

  - VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR

  - VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR

  - VK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR

  - VK_IMAGE_USAGE_SAMPLE_WEIGHT_BIT_QCOM

  - VK_IMAGE_USAGE_SAMPLE_BLOCK_MATCH_BIT_QCOM

  - VK_IMAGE_USAGE_VIDEO_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR

  - VK_IMAGE_USAGE_VIDEO_ENCODE_EMPHASIS_MAP_BIT_KHR

- VUID-VkImageViewCreateInfo-None-02273
  The format features of the resultant image view must contain at least one bit

- VUID-VkImageViewCreateInfo-usage-02274
  If `usage` contains VK_IMAGE_USAGE_SAMPLED_BIT, then the format features of the resultant image view must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT

- VUID-VkImageViewCreateInfo-usage-02275
  If `usage` contains VK_IMAGE_USAGE_STORAGE_BIT, then the image view’s format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT

- VUID-VkImageViewCreateInfo-usage-08931
  If `usage` contains VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, then the image view’s format features must contain VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT or VK_FORMAT_FEATURE_2_LINEAR_COLOR_ATTACHMENT_BIT_NV

- VUID-VkImageViewCreateInfo-usage-02277
  If `usage` contains VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, then the image view’s format features must contain VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT

- VUID-VkImageViewCreateInfo-image-08333
  If `usage` contains VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR, then the image view’s format features must contain VK_FORMAT_FEATURE_VIDEO_DECODE_OUTPUT_BIT_KHR

- VUID-VkImageViewCreateInfo-image-08334
  If `usage` contains VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR, then the image view’s format features must contain VK_FORMAT_FEATURE_VIDEO_DECODE_DPB_BIT_KHR

- VUID-VkImageViewCreateInfo-image-08335
  `usage` must not include VK_IMAGE_USAGE_VIDEO_DECODE_SRC_BIT_KHR

- VUID-VkImageViewCreateInfo-image-08336
  If `usage` contains VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR, then the image view’s format features must contain VK_FORMAT_FEATURE_VIDEO_ENCODE_INPUT_BIT_KHR

- VUID-VkImageViewCreateInfo-image-08337
  If `usage` contains VK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR, then the image view’s format features must contain VK_FORMAT_FEATURE_VIDEO_ENCODE_DPB_BIT_KHR

- VUID-VkImageViewCreateInfo-image-08338
  `usage` must not include VK_IMAGE_USAGE_VIDEO_ENCODE_DST_BIT_KHR

- VUID-VkImageViewCreateInfo-usage-10259
  If `usage` contains VK_IMAGE_USAGE_VIDEO_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR, then the image view’s format features must contain VK_FORMAT_FEATURE_2_VIDEO_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR

- VUID-VkImageViewCreateInfo-usage-10260
  If `usage` contains VK_IMAGE_USAGE_VIDEO_ENCODE_EMPHASIS_MAP_BIT_KHR, then the image view’s format features must contain VK_FORMAT_FEATURE_2_VIDEO_ENCODE_EMPHASIS_MAP_BIT_KHR

- VUID-VkImageViewCreateInfo-usage-08932
  If `usage` contains VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT, and any of the following is true:

  - the `externalFormatResolve` feature is not enabled

  - the `nullColorAttachmentWithExternalFormatResolve` property is VK_FALSE

  - `image` was created with an VkExternalFormatANDROID::`externalFormat` value of 0

    then the image view’s format features must contain at least one of VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT or VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT or VK_FORMAT_FEATURE_2_LINEAR_COLOR_ATTACHMENT_BIT_NV

- VUID-VkImageViewCreateInfo-subresourceRange-01478
  `subresourceRange.baseMipLevel` must be less than the `mipLevels` specified in VkImageCreateInfo when `image` was created

- VUID-VkImageViewCreateInfo-subresourceRange-01718
  If `subresourceRange.levelCount` is not VK_REMAINING_MIP_LEVELS, `subresourceRange.baseMipLevel` + `subresourceRange.levelCount` must be less than or equal to the `mipLevels` specified in VkImageCreateInfo when `image` was created

- VUID-VkImageViewCreateInfo-image-02571
  If `image` was created with the VK_IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT usage flag set, `subresourceRange.levelCount` must be `1`

- VUID-VkImageViewCreateInfo-image-06724
  If `image` is not a 3D image created with VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT or VK_IMAGE_CREATE_2D_VIEW_COMPATIBLE_BIT_EXT set, or `viewType` is not VK_IMAGE_VIEW_TYPE_2D or VK_IMAGE_VIEW_TYPE_2D_ARRAY, `subresourceRange.baseArrayLayer` must be less than the `arrayLayers` specified in VkImageCreateInfo when `image` was created

- VUID-VkImageViewCreateInfo-subresourceRange-06725
  If `subresourceRange.layerCount` is not VK_REMAINING_ARRAY_LAYERS, `image` is not a 3D image created with VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT or VK_IMAGE_CREATE_2D_VIEW_COMPATIBLE_BIT_EXT set, or `viewType` is not VK_IMAGE_VIEW_TYPE_2D or VK_IMAGE_VIEW_TYPE_2D_ARRAY, `subresourceRange.layerCount` must be non-zero and `subresourceRange.baseArrayLayer` + `subresourceRange.layerCount` must be less than or equal to the `arrayLayers` specified in VkImageCreateInfo when `image` was created

- VUID-VkImageViewCreateInfo-image-02724
  If `image` is a 3D image created with VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT set, and `viewType` is VK_IMAGE_VIEW_TYPE_2D or VK_IMAGE_VIEW_TYPE_2D_ARRAY, `subresourceRange.baseArrayLayer` must be less than the depth computed from `baseMipLevel` and `extent.depth` specified in VkImageCreateInfo when `image` was created, according to the formula defined in Image Mip Level Sizing

- VUID-VkImageViewCreateInfo-subresourceRange-02725
  If `subresourceRange.layerCount` is not VK_REMAINING_ARRAY_LAYERS, `image` is a 3D image created with VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT set, and `viewType` is VK_IMAGE_VIEW_TYPE_2D or VK_IMAGE_VIEW_TYPE_2D_ARRAY, `subresourceRange.layerCount` must be non-zero and `subresourceRange.baseArrayLayer` + `subresourceRange.layerCount` must be less than or equal to the depth computed from `baseMipLevel` and `extent.depth` specified in VkImageCreateInfo when `image` was created, according to the formula defined in Image Mip Level Sizing

- VUID-VkImageViewCreateInfo-image-01761
  If `image` was created with the VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT flag, but without the VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT flag, and if the `format` of the `image` is not a multi-planar format, `format` must be compatible with the `format` used to create `image`, as defined in Format Compatibility Classes

- VUID-VkImageViewCreateInfo-image-01583
  If `image` was created with the VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT flag, `format` must be compatible with, or must be an uncompressed format that is size-compatible with, the `format` used to create `image`

- VUID-VkImageViewCreateInfo-image-07072
  If `image` was created with the VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT flag and `format` is a non-compressed format, the `levelCount` member of `subresourceRange` must be `1`

- VUID-VkImageViewCreateInfo-image-09487
  If `image` was created with the VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT flag, the `VkPhysicalDeviceMaintenance6Properties`::`blockTexelViewCompatibleMultipleLayers` property is not VK_TRUE, and `format` is a non-compressed format, then the `layerCount` member of `subresourceRange` must be `1`

- VUID-VkImageViewCreateInfo-pNext-01585
  If a VkImageFormatListCreateInfo structure was included in the `pNext` chain of the VkImageCreateInfo structure used when creating `image` and VkImageFormatListCreateInfo::`viewFormatCount` is not zero then `format` must be one of the formats in VkImageFormatListCreateInfo::`pViewFormats`

- VUID-VkImageViewCreateInfo-image-01586
  If `image` was created with the VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT flag, if the `format` of the `image` is a multi-planar format, and if `subresourceRange.aspectMask` is one of the multi-planar aspect mask bits, then `format` must be compatible with the VkFormat for the plane of the `image` `format` indicated by `subresourceRange.aspectMask`, as defined in Compatible Formats of Planes of Multi-Planar Formats

- VUID-VkImageViewCreateInfo-subresourceRange-07818
  `subresourceRange.aspectMask` must only have at most 1 valid multi-planar aspect mask bit

- VUID-VkImageViewCreateInfo-image-12397
  If `image` was not created with the VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT flag `format` must be identical to the `format` used to create `image`

- VUID-VkImageViewCreateInfo-format-12398
  If the `format` of the `image` is a multi-planar format and `subresourceRange.aspectMask` is VK_IMAGE_ASPECT_COLOR_BIT, `format` must be identical to the `format` used to create `image`

- VUID-VkImageViewCreateInfo-format-06415
  If the image view’s format requires a sampler Y′CBCR conversion and `usage` contains VK_IMAGE_USAGE_SAMPLED_BIT, then the `pNext` chain must include a VkSamplerYcbcrConversionInfo structure with a conversion value other than VK_NULL_HANDLE

- VUID-VkImageViewCreateInfo-format-04714
  If `format` has a `_422` or `_420` suffix then `image` must have been created with a width that is a multiple of 2

- VUID-VkImageViewCreateInfo-format-04715
  If `format` has a `_420` suffix then `image` must have been created with a height that is a multiple of 2

- VUID-VkImageViewCreateInfo-pNext-01970
  If the `pNext` chain includes a VkSamplerYcbcrConversionInfo structure with a `conversion` value other than VK_NULL_HANDLE, all members of `components` must have the identity swizzle

- VUID-VkImageViewCreateInfo-pNext-06658
  If the `pNext` chain includes a VkSamplerYcbcrConversionInfo structure with a `conversion` value other than VK_NULL_HANDLE, `format` must be the same used in VkSamplerYcbcrConversionCreateInfo::`format`

- VUID-VkImageViewCreateInfo-image-01020
  If `image` is non-sparse then the image or each specified disjoint plane must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-VkImageViewCreateInfo-subResourceRange-01021
  `viewType` must be compatible with the type of `image` as shown in the view type compatibility table

- VUID-VkImageViewCreateInfo-image-02399
  If `image` has an Android external format, `format` must be VK_FORMAT_UNDEFINED

- VUID-VkImageViewCreateInfo-image-02400
  If `image` has an Android external format, the `pNext` chain must include a VkSamplerYcbcrConversionInfo structure with a `conversion` object created with the same external format as `image`

- VUID-VkImageViewCreateInfo-image-02401
  If `image` has an Android external format, all members of `components` must be the identity swizzle

- VUID-VkImageViewCreateInfo-image-08957
  If `image` has an QNX Screen external format, `format` must be VK_FORMAT_UNDEFINED

- VUID-VkImageViewCreateInfo-image-08958
  If `image` has an QNX Screen external format, the `pNext` chain must include a VkSamplerYcbcrConversionInfo structure with a `conversion` object created with the same external format as `image`

- VUID-VkImageViewCreateInfo-image-08959
  If `image` has an QNX Screen external format, all members of `components` must be the identity swizzle

- VUID-VkImageViewCreateInfo-image-02086
  If `image` was created with the VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR usage flag set, `viewType` must be VK_IMAGE_VIEW_TYPE_2D or VK_IMAGE_VIEW_TYPE_2D_ARRAY

- VUID-VkImageViewCreateInfo-image-02087
  If the `shadingRateImage` feature is enabled, and `image` was created with the VK_IMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV usage flag set, `format` must be VK_FORMAT_R8_UINT

- VUID-VkImageViewCreateInfo-attachmentFragmentShadingRate-12386
  If the `attachmentFragmentShadingRate` feature is not enabled, the `usage` for the image view must not contain VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

- VUID-VkImageViewCreateInfo-usage-04550
  If the `usage` for the image view includes VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR, then the image view’s format features must contain VK_FORMAT_FEATURE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

- VUID-VkImageViewCreateInfo-usage-04551
  If the `usage` for the image view includes VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR, and `layeredShadingRateAttachments` is VK_FALSE, `subresourceRange.layerCount` must be `1`

- VUID-VkImageViewCreateInfo-flags-02572
  If the `fragmentDensityMapDynamic` feature is not enabled, `flags` must not contain VK_IMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DYNAMIC_BIT_EXT

- VUID-VkImageViewCreateInfo-flags-03567
  If the `fragmentDensityMapDeferred` feature is not enabled, `flags` must not contain VK_IMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DEFERRED_BIT_EXT

- VUID-VkImageViewCreateInfo-flags-03568
  If `flags` contains VK_IMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DEFERRED_BIT_EXT, `flags` must not contain VK_IMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DYNAMIC_BIT_EXT

- VUID-VkImageViewCreateInfo-image-03569
  If `image` was created with `flags` containing VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT and the VK_IMAGE_USAGE_SAMPLED_BIT usage flag set, `subresourceRange.layerCount` must be less than or equal to `VkPhysicalDeviceFragmentDensityMap2PropertiesEXT`::`maxSubsampledArrayLayers`

- VUID-VkImageViewCreateInfo-invocationMask-04993
  If the `invocationMask` feature is enabled, and `image` was created with the VK_IMAGE_USAGE_INVOCATION_MASK_BIT_HUAWEI usage flag set, `format` must be VK_FORMAT_R8_UINT

- VUID-VkImageViewCreateInfo-flags-04116
  If `flags` does not contain VK_IMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DYNAMIC_BIT_EXT, and `image` was created with the VK_IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT usage flag set, its `flags` must not contain any of VK_IMAGE_CREATE_PROTECTED_BIT, VK_IMAGE_CREATE_SPARSE_BINDING_BIT, VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT, or VK_IMAGE_CREATE_SPARSE_ALIASED_BIT

- VUID-VkImageViewCreateInfo-pNext-02662
  If the `pNext` chain includes a VkImageViewUsageCreateInfo structure, and `image` was not created with a VkImageStencilUsageCreateInfo structure included in the `pNext` chain of VkImageCreateInfo, its `usage` member must not include any bits that were not set in the `usage` member of the VkImageCreateInfo structure used to create `image`

- VUID-VkImageViewCreateInfo-pNext-02663
  If the `pNext` chain includes a VkImageViewUsageCreateInfo structure, `image` was created with a VkImageStencilUsageCreateInfo structure included in the `pNext` chain of VkImageCreateInfo, and `subresourceRange.aspectMask` includes VK_IMAGE_ASPECT_STENCIL_BIT, the `usage` member of the VkImageViewUsageCreateInfo structure must not include any bits that were not set in the `usage` member of the VkImageStencilUsageCreateInfo structure used to create `image`

- VUID-VkImageViewCreateInfo-pNext-02664
  If the `pNext` chain includes a VkImageViewUsageCreateInfo structure, `image` was created with a VkImageStencilUsageCreateInfo structure included in the `pNext` chain of VkImageCreateInfo, and `subresourceRange.aspectMask` includes bits other than VK_IMAGE_ASPECT_STENCIL_BIT, the `usage` member of the VkImageViewUsageCreateInfo structure must not include any bits that were not set in the `usage` member of the VkImageCreateInfo structure used to create `image`

- VUID-VkImageViewCreateInfo-imageViewType-04973
  If `viewType` is VK_IMAGE_VIEW_TYPE_1D, VK_IMAGE_VIEW_TYPE_2D, or VK_IMAGE_VIEW_TYPE_3D; and `subresourceRange.layerCount` is not VK_REMAINING_ARRAY_LAYERS, then `subresourceRange.layerCount` must be 1

- VUID-VkImageViewCreateInfo-imageViewType-04974
  If `viewType` is VK_IMAGE_VIEW_TYPE_1D, VK_IMAGE_VIEW_TYPE_2D, or VK_IMAGE_VIEW_TYPE_3D; and `subresourceRange.layerCount` is VK_REMAINING_ARRAY_LAYERS, then the remaining number of layers must be 1

- VUID-VkImageViewCreateInfo-viewType-02960
  If `viewType` is VK_IMAGE_VIEW_TYPE_CUBE and `subresourceRange.layerCount` is not VK_REMAINING_ARRAY_LAYERS, `subresourceRange.layerCount` must be `6`

- VUID-VkImageViewCreateInfo-viewType-02961
  If `viewType` is VK_IMAGE_VIEW_TYPE_CUBE_ARRAY and `subresourceRange.layerCount` is not VK_REMAINING_ARRAY_LAYERS, `subresourceRange.layerCount` must be a multiple of `6`

- VUID-VkImageViewCreateInfo-viewType-02962
  If `viewType` is VK_IMAGE_VIEW_TYPE_CUBE and `subresourceRange.layerCount` is VK_REMAINING_ARRAY_LAYERS, the remaining number of layers must be `6`

- VUID-VkImageViewCreateInfo-viewType-02963
  If `viewType` is VK_IMAGE_VIEW_TYPE_CUBE_ARRAY and `subresourceRange.layerCount` is VK_REMAINING_ARRAY_LAYERS, the remaining number of layers must be a multiple of `6`

- VUID-VkImageViewCreateInfo-imageViewFormatSwizzle-04465
  If the `VK_KHR_portability_subset` extension is enabled, and VkPhysicalDevicePortabilitySubsetFeaturesKHR::`imageViewFormatSwizzle` is VK_FALSE, all elements of `components` must have the identity swizzle

- VUID-VkImageViewCreateInfo-imageViewFormatReinterpretation-04466
  If the `VK_KHR_portability_subset` extension is enabled, and VkPhysicalDevicePortabilitySubsetFeaturesKHR::`imageViewFormatReinterpretation` is VK_FALSE, the VkFormat in `format` must not contain a different number of components, or a different number of bits in each component, than the format of the `VkImage` in `image`

- VUID-VkImageViewCreateInfo-image-04817
  If `image` was created with the VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR usage flag set, VK_IMAGE_USAGE_VIDEO_DECODE_SRC_BIT_KHR, or VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR, then the `viewType` must be VK_IMAGE_VIEW_TYPE_2D or VK_IMAGE_VIEW_TYPE_2D_ARRAY

- VUID-VkImageViewCreateInfo-image-04818
  If `image` was created with the VK_IMAGE_USAGE_VIDEO_ENCODE_DST_BIT_KHR usage flag set, VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR, or VK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR, then the `viewType` must be VK_IMAGE_VIEW_TYPE_2D or VK_IMAGE_VIEW_TYPE_2D_ARRAY

- VUID-VkImageViewCreateInfo-image-10261
  If `image` was created with the VK_IMAGE_USAGE_VIDEO_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR or VK_IMAGE_USAGE_VIDEO_ENCODE_EMPHASIS_MAP_BIT_KHR usage flags set, then `viewType` must be VK_IMAGE_VIEW_TYPE_2D or VK_IMAGE_VIEW_TYPE_2D_ARRAY

- VUID-VkImageViewCreateInfo-flags-08106
  If `flags` includes VK_IMAGE_VIEW_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT, the `descriptorBufferCaptureReplay` feature must be enabled

- VUID-VkImageViewCreateInfo-pNext-08107
  If the `pNext` chain includes a VkOpaqueCaptureDescriptorDataCreateInfoEXT structure, `flags` must contain VK_IMAGE_VIEW_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT

- VUID-VkImageViewCreateInfo-pNext-06787
  If the `pNext` chain includes a VkExportMetalObjectCreateInfoEXT structure, its `exportObjectType` member must be VK_EXPORT_METAL_OBJECT_TYPE_METAL_TEXTURE_BIT_EXT

- VUID-VkImageViewCreateInfo-pNext-06944
  If the `pNext` chain includes VkImageViewSampleWeightCreateInfoQCOM structure, then `textureSampleWeighted` feature must be enabled

- VUID-VkImageViewCreateInfo-pNext-06945
  If the `pNext` chain includes VkImageViewSampleWeightCreateInfoQCOM structure, then `image` must have been created with the VK_IMAGE_USAGE_SAMPLE_WEIGHT_BIT_QCOM usage flag set

- VUID-VkImageViewCreateInfo-pNext-06946
  If the `pNext` chain includes VkImageViewSampleWeightCreateInfoQCOM structure, then `components` must be VK_COMPONENT_SWIZZLE_IDENTITY for all components

- VUID-VkImageViewCreateInfo-pNext-06947
  If the `pNext` chain includes VkImageViewSampleWeightCreateInfoQCOM structure, then `subresourceRange.aspectMask` must be VK_IMAGE_ASPECT_COLOR_BIT

- VUID-VkImageViewCreateInfo-pNext-06948
  If the `pNext` chain includes VkImageViewSampleWeightCreateInfoQCOM structure, then `subresourceRange.levelCount` must be `1`

- VUID-VkImageViewCreateInfo-pNext-06949
  If the `pNext` chain includes VkImageViewSampleWeightCreateInfoQCOM structure, then `viewType` must be VK_IMAGE_VIEW_TYPE_1D_ARRAY or VK_IMAGE_VIEW_TYPE_2D_ARRAY

- VUID-VkImageViewCreateInfo-pNext-06950
  If the `pNext` chain includes VkImageViewSampleWeightCreateInfoQCOM structure and if `viewType` is VK_IMAGE_VIEW_TYPE_1D_ARRAY, then `image` must have been created with `imageType` VK_IMAGE_TYPE_1D

- VUID-VkImageViewCreateInfo-pNext-06951
  If the `pNext` chain includes VkImageViewSampleWeightCreateInfoQCOM structure and `viewType` is VK_IMAGE_VIEW_TYPE_1D_ARRAY, then `subresourceRange.layerCount` must be equal to `2`

- VUID-VkImageViewCreateInfo-pNext-06952
  If the `pNext` chain includes VkImageViewSampleWeightCreateInfoQCOM structure and `viewType` is VK_IMAGE_VIEW_TYPE_1D_ARRAY, then `image` must have been created with `width` equal to or greater than (num P hases×max(a l i g n(f ilt er S ize. w idth, 4),f ilt er S ize.hei g ht))

- VUID-VkImageViewCreateInfo-pNext-06953
  If the `pNext` chain includes VkImageViewSampleWeightCreateInfoQCOM structure and if `viewType` is VK_IMAGE_VIEW_TYPE_2D_ARRAY, then `image` must have been created with `imageType` VK_IMAGE_TYPE_2D

- VUID-VkImageViewCreateInfo-pNext-06954
  If the `pNext` chain includes VkImageViewSampleWeightCreateInfoQCOM structure and `viewType` is VK_IMAGE_VIEW_TYPE_2D_ARRAY, then `subresourceRange.layerCount` must be equal or greater than numPhases

- VUID-VkImageViewCreateInfo-pNext-06955
  If the `pNext` chain includes VkImageViewSampleWeightCreateInfoQCOM structure and `viewType` is VK_IMAGE_VIEW_TYPE_2D_ARRAY, then `image` must have been created with `width` equal to or greater than `filterSize.width`

- VUID-VkImageViewCreateInfo-pNext-06956
  If the `pNext` chain includes VkImageViewSampleWeightCreateInfoQCOM structure and `viewType` is VK_IMAGE_VIEW_TYPE_2D_ARRAY, then `image` must have been created with `height` equal to or greater than `filterSize.height`

- VUID-VkImageViewCreateInfo-pNext-06957
  If the `pNext` chain includes VkImageViewSampleWeightCreateInfoQCOM structure then VkImageViewSampleWeightCreateInfoQCOM::`filterSize.height` must be less than or equal to `VkPhysicalDeviceImageProcessingPropertiesQCOM`::`maxWeightFilterDimension.height`

- VUID-VkImageViewCreateInfo-subresourceRange-09594
  `subresourceRange.aspectMask` must be valid for the `format` the `image` was created with

- VUID-VkImageViewCreateInfo-image-13357
  If `image` was created with VK_IMAGE_CREATE_ALIAS_SINGLE_LAYER_DESCRIPTOR_BIT_KHR, `format` must not be a multi-planar format

- VUID-VkImageViewCreateInfo-None-12280
  If Vulkan 1.3 is not supported and the `ycbcr2plane444Formats` feature is not enabled, `format` must not be VK_FORMAT_G8_B8R8_2PLANE_444_UNORM, VK_FORMAT_G10X6_B10X6R10X6_2PLANE_444_UNORM_3PACK16, VK_FORMAT_G12X4_B12X4R12X4_2PLANE_444_UNORM_3PACK16, or VK_FORMAT_G16_B16R16_2PLANE_444_UNORM

Valid Usage (Implicit)

- VUID-VkImageViewCreateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO

- VUID-VkImageViewCreateInfo-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkExportMetalObjectCreateInfoEXT, VkImageViewASTCDecodeModeEXT, VkImageViewMinLodCreateInfoEXT, VkImageViewSampleWeightCreateInfoQCOM, VkImageViewSlicedCreateInfoEXT, VkImageViewUsage2CreateInfoKHR, VkImageViewUsageCreateInfo, VkOpaqueCaptureDescriptorDataCreateInfoEXT, or VkSamplerYcbcrConversionInfo

- VUID-VkImageViewCreateInfo-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique, with the exception of structures of type VkExportMetalObjectCreateInfoEXT

- VUID-VkImageViewCreateInfo-flags-parameter
  `flags` must be a valid combination of VkImageViewCreateFlagBits values

- VUID-VkImageViewCreateInfo-image-parameter
  `image` must be a valid VkImage handle

- VUID-VkImageViewCreateInfo-viewType-parameter
  `viewType` must be a valid VkImageViewType value

- VUID-VkImageViewCreateInfo-format-parameter
  `format` must be a valid VkFormat value

- VUID-VkImageViewCreateInfo-components-parameter
  `components` must be a valid VkComponentMapping structure

- VUID-VkImageViewCreateInfo-subresourceRange-parameter
  `subresourceRange` must be a valid VkImageSubresourceRange structure

Bits which can be set in VkImageViewCreateInfo::`flags`, specifying additional parameters of an image view, are:

    // Provided by VK_VERSION_1_0
    typedef enum VkImageViewCreateFlagBits {
      // Provided by VK_EXT_fragment_density_map
        VK_IMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DYNAMIC_BIT_EXT = 0x00000001,
      // Provided by VK_EXT_descriptor_buffer
        VK_IMAGE_VIEW_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT = 0x00000004,
      // Provided by VK_EXT_fragment_density_map2
        VK_IMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DEFERRED_BIT_EXT = 0x00000002,
    } VkImageViewCreateFlagBits;

- VK_IMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DYNAMIC_BIT_EXT specifies that the fragment density map will be read by device during VK_PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT

- VK_IMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DEFERRED_BIT_EXT specifies that the fragment density map will be read by the host during vkEndCommandBuffer for the primary command buffer that the render pass is recorded into

- VK_IMAGE_VIEW_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT specifies that the image view can be used with descriptor buffers when capturing and replaying (e.g. for trace capture and replay), see VkOpaqueCaptureDescriptorDataCreateInfoEXT for more detail.

    // Provided by VK_VERSION_1_0
    typedef VkFlags VkImageViewCreateFlags;

`VkImageViewCreateFlags` is a bitmask type for setting a mask of zero or more VkImageViewCreateFlagBits.

The set of usages for the created image view can be restricted compared to the parent image’s `usage` flags by adding a `VkImageViewUsageCreateInfo` structure to the `pNext` chain of VkImageViewCreateInfo.

The `VkImageViewUsageCreateInfo` structure is defined as:

    // Provided by VK_VERSION_1_1
    typedef struct VkImageViewUsageCreateInfo {
        VkStructureType      sType;
        const void*          pNext;
        VkImageUsageFlags    usage;
    } VkImageViewUsageCreateInfo;

    // Provided by VK_KHR_maintenance2
    // Equivalent to VkImageViewUsageCreateInfo
    typedef VkImageViewUsageCreateInfo VkImageViewUsageCreateInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `usage` is a bitmask of VkImageUsageFlagBits specifying allowed usages of the image view.

When this structure is chained to VkImageViewCreateInfo the `usage` field overrides the implicit `usage` parameter inherited from image creation time and its value is used instead for the purposes of determining the valid usage conditions of VkImageViewCreateInfo.

Valid Usage (Implicit)

- VUID-VkImageViewUsageCreateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO

- VUID-VkImageViewUsageCreateInfo-usage-parameter
  `usage` must be a valid combination of VkImageUsageFlagBits values

- VUID-VkImageViewUsageCreateInfo-usage-requiredbitmask
  `usage` must not be `0`

Structure Chaining

Extends the structure

  - VkImageViewCreateInfo

The set of usages for the created image view can be restricted compared to the parent image’s `usage` flags by adding a `VkImageViewUsage2CreateInfoKHR` structure to the `pNext` chain of VkImageViewCreateInfo.

The `VkImageViewUsage2CreateInfoKHR` structure is defined as:

    // Provided by VK_KHR_extended_flags
    typedef struct VkImageViewUsage2CreateInfoKHR {
        VkStructureType          sType;
        void*                    pNext;
        VkImageUsageFlags2KHR    usage;
    } VkImageViewUsage2CreateInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `usage` is a bitmask of VkImageUsageFlagBits2KHR specifying allowed usages of the image view.

When this structure is chained to VkImageViewCreateInfo the `usage` field overrides the implicit `usage` parameter inherited from image creation time and its value is used instead for the purposes of determining the valid usage conditions of VkImageViewCreateInfo.

Valid Usage (Implicit)

- VUID-VkImageViewUsage2CreateInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_2_CREATE_INFO_KHR

- VUID-VkImageViewUsage2CreateInfoKHR-usage-parameter
  `usage` must be a valid combination of VkImageUsageFlagBits2KHR values

- VUID-VkImageViewUsage2CreateInfoKHR-usage-requiredbitmask
  `usage` must not be `0`

Structure Chaining

Extends the structure

  - VkImageViewCreateInfo

The range of 3D slices for the created image view can be restricted to a subset of the parent image’s Z range by adding a `VkImageViewSlicedCreateInfoEXT` structure to the `pNext` chain of VkImageViewCreateInfo.

The `VkImageViewSlicedCreateInfoEXT` structure is defined as:

    // Provided by VK_EXT_image_sliced_view_of_3d
    typedef struct VkImageViewSlicedCreateInfoEXT {
        VkStructureType    sType;
        const void*        pNext;
        uint32_t           sliceOffset;
        uint32_t           sliceCount;
    } VkImageViewSlicedCreateInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `sliceOffset` is the Z-offset for the first 3D slice accessible to the image view.

- `sliceCount` is the number of 3D slices accessible to the image view.

When this structure is chained to VkImageViewCreateInfo the `sliceOffset` field is treated as a Z-offset for the sliced view and `sliceCount` specifies the range. Shader accesses using a Z coordinate of 0 will access the depth slice corresponding to `sliceOffset` in the image, and in a shader, the maximum in-bounds Z coordinate for the view is `sliceCount` - 1.

A sliced 3D view must only be used with a single mip level. The slice coordinates are integer coordinates within the `subresourceRange.baseMipLevel` used to create the image view.

The effective view depth is equal to `extent.depth` used to create the `image` for this view adjusted by `subresourceRange.baseMipLevel` as specified in Image Mip Level Sizing.

Shader access to this image view is only affected by `VkImageViewSlicedCreateInfoEXT` if it uses a descriptor of type VK_DESCRIPTOR_TYPE_STORAGE_IMAGE. For access using any other descriptor type, the contents of `VkImageViewSlicedCreateInfoEXT` are ignored; instead, `sliceOffset` is treated as being equal to 0, and `sliceCount` is treated as being equal to VK_REMAINING_3D_SLICES_EXT.

Valid Usage

- VUID-VkImageViewSlicedCreateInfoEXT-sliceOffset-07867
  `sliceOffset` must be less than the effective view depth as specified in Image Mip Level Sizing

- VUID-VkImageViewSlicedCreateInfoEXT-sliceCount-07868
  If `sliceCount` is not VK_REMAINING_3D_SLICES_EXT, it must be non-zero and `sliceOffset` + `sliceCount` must be less than or equal to the effective view depth as specified in Image Mip Level Sizing

- VUID-VkImageViewSlicedCreateInfoEXT-image-07869
  `image` must have been created with `imageType` equal to VK_IMAGE_TYPE_3D

- VUID-VkImageViewSlicedCreateInfoEXT-viewType-07909
  `viewType` must be VK_IMAGE_VIEW_TYPE_3D

- VUID-VkImageViewSlicedCreateInfoEXT-None-07870
  The image view must reference exactly 1 mip level

- VUID-VkImageViewSlicedCreateInfoEXT-None-07871
  The imageSlicedViewOf3D feature must be enabled

Valid Usage (Implicit)

- VUID-VkImageViewSlicedCreateInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_IMAGE_VIEW_SLICED_CREATE_INFO_EXT

Structure Chaining

Extends the structure

  - VkImageViewCreateInfo

VK_REMAINING_3D_SLICES_EXT is a special constant value used for VkImageViewSlicedCreateInfoEXT::`sliceCount` to indicate that all remaining 3D slices in an image after the first slice offset specified should be included in the view.

    #define VK_REMAINING_3D_SLICES_EXT        (~0U)

The `VkImageSubresourceRange` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkImageSubresourceRange {
        VkImageAspectFlags    aspectMask;
        uint32_t              baseMipLevel;
        uint32_t              levelCount;
        uint32_t              baseArrayLayer;
        uint32_t              layerCount;
    } VkImageSubresourceRange;

- `aspectMask` is a bitmask of VkImageAspectFlagBits specifying which aspect(s) of the image are included in the view.

- `baseMipLevel` is the first mipmap level accessible to the view.

- `levelCount` is the number of mipmap levels (starting from `baseMipLevel`) accessible to the view.

- `baseArrayLayer` is the first array layer accessible to the view.

- `layerCount` is the number of array layers (starting from `baseArrayLayer`) accessible to the view.

The number of mipmap levels and array layers must be a subset of the image subresources in the image. If an application wants to use all mip levels or layers in an image after the `baseMipLevel` or `baseArrayLayer`, it can set `levelCount` and `layerCount` to the special values VK_REMAINING_MIP_LEVELS and VK_REMAINING_ARRAY_LAYERS without knowing the exact number of mip levels or layers.

For cube and cube array image views, the layers of the image view starting at `baseArrayLayer` correspond to faces in the order +X, -X, +Y, -Y, +Z, -Z. For cube arrays, each set of six sequential layers is a single cube, so the number of cube maps in a cube map array view is `layerCount` / 6, and image array layer (`baseArrayLayer` + i) is face index (i mod 6) of cube i / 6. If the number of layers in the view, whether set explicitly in `layerCount` or implied by VK_REMAINING_ARRAY_LAYERS, is not a multiple of 6, the last cube map in the array must not be accessed.

`aspectMask` must be only VK_IMAGE_ASPECT_COLOR_BIT, VK_IMAGE_ASPECT_DEPTH_BIT or VK_IMAGE_ASPECT_STENCIL_BIT if `format` is a color, depth-only or stencil-only format, respectively, except if `format` is a multi-planar format. If using a depth/stencil format with both depth and stencil components, `aspectMask` must include at least one of VK_IMAGE_ASPECT_DEPTH_BIT and VK_IMAGE_ASPECT_STENCIL_BIT, and can include both.

When the `VkImageSubresourceRange` structure is used to select a subset of the slices of a 3D image’s mip level in order to create a 2D or 2D array image view of a 3D image created with VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT, `baseArrayLayer` and `layerCount` specify the first slice index and the number of slices to include in the created image view. Such an image view can be used as a framebuffer attachment that refers only to the specified range of slices of the selected mip level. If the `maintenance9` feature is not enabled, any layout transitions performed on such an attachment view during a render pass instance still apply to the entire subresource referenced which includes all the slices of the selected mip level.

When using an image view of a depth/stencil image to populate a descriptor set (e.g. for sampling in the shader, or for use as an input attachment), the `aspectMask` must only include one bit, which selects whether the image view is used for depth reads (i.e. using a floating-point sampler or input attachment in the shader) or stencil reads (i.e. using an unsigned integer sampler or input attachment in the shader). When an image view of a depth/stencil image is used as a depth/stencil framebuffer attachment, the `aspectMask` is ignored and both depth and stencil image subresources are used.

When creating a `VkImageView`, if sampler Y′CBCR conversion is enabled in the sampler, the `aspectMask` of a `subresourceRange` used by the `VkImageView` must be VK_IMAGE_ASPECT_COLOR_BIT.

When creating a `VkImageView`, if sampler Y′CBCR conversion is not enabled in the sampler and the image `format` is multi-planar format, the image must have been created with VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT, and the `aspectMask` of the `VkImageView`’s `subresourceRange` must be VK_IMAGE_ASPECT_PLANE_0_BIT, VK_IMAGE_ASPECT_PLANE_1_BIT or VK_IMAGE_ASPECT_PLANE_2_BIT.

Valid Usage

- VUID-VkImageSubresourceRange-levelCount-01720
  If `levelCount` is not VK_REMAINING_MIP_LEVELS, it must be greater than `0`

- VUID-VkImageSubresourceRange-layerCount-01721
  If `layerCount` is not VK_REMAINING_ARRAY_LAYERS, it must be greater than `0`

- VUID-VkImageSubresourceRange-aspectMask-01670
  If `aspectMask` includes VK_IMAGE_ASPECT_COLOR_BIT, then it must not include any of VK_IMAGE_ASPECT_PLANE_0_BIT, VK_IMAGE_ASPECT_PLANE_1_BIT, or VK_IMAGE_ASPECT_PLANE_2_BIT

- VUID-VkImageSubresourceRange-aspectMask-02278
  `aspectMask` must not include `VK_IMAGE_ASPECT_MEMORY_PLANE_i_BIT_EXT` for any index i

Valid Usage (Implicit)

- VUID-VkImageSubresourceRange-aspectMask-parameter
  `aspectMask` must be a valid combination of VkImageAspectFlagBits values

- VUID-VkImageSubresourceRange-aspectMask-requiredbitmask
  `aspectMask` must not be `0`

Bits which can be set in an aspect mask to specify aspects of an image for purposes such as identifying a subresource, are:

    // Provided by VK_VERSION_1_0
    typedef enum VkImageAspectFlagBits {
        VK_IMAGE_ASPECT_COLOR_BIT = 0x00000001,
        VK_IMAGE_ASPECT_DEPTH_BIT = 0x00000002,
        VK_IMAGE_ASPECT_STENCIL_BIT = 0x00000004,
        VK_IMAGE_ASPECT_METADATA_BIT = 0x00000008,
      // Provided by VK_VERSION_1_1
        VK_IMAGE_ASPECT_PLANE_0_BIT = 0x00000010,
      // Provided by VK_VERSION_1_1
        VK_IMAGE_ASPECT_PLANE_1_BIT = 0x00000020,
      // Provided by VK_VERSION_1_1
        VK_IMAGE_ASPECT_PLANE_2_BIT = 0x00000040,
      // Provided by VK_VERSION_1_3
        VK_IMAGE_ASPECT_NONE = 0,
      // Provided by VK_EXT_image_drm_format_modifier
        VK_IMAGE_ASPECT_MEMORY_PLANE_0_BIT_EXT = 0x00000080,
      // Provided by VK_EXT_image_drm_format_modifier
        VK_IMAGE_ASPECT_MEMORY_PLANE_1_BIT_EXT = 0x00000100,
      // Provided by VK_EXT_image_drm_format_modifier
        VK_IMAGE_ASPECT_MEMORY_PLANE_2_BIT_EXT = 0x00000200,
      // Provided by VK_EXT_image_drm_format_modifier
        VK_IMAGE_ASPECT_MEMORY_PLANE_3_BIT_EXT = 0x00000400,
      // Provided by VK_KHR_sampler_ycbcr_conversion
        VK_IMAGE_ASPECT_PLANE_0_BIT_KHR = VK_IMAGE_ASPECT_PLANE_0_BIT,
      // Provided by VK_KHR_sampler_ycbcr_conversion
        VK_IMAGE_ASPECT_PLANE_1_BIT_KHR = VK_IMAGE_ASPECT_PLANE_1_BIT,
      // Provided by VK_KHR_sampler_ycbcr_conversion
        VK_IMAGE_ASPECT_PLANE_2_BIT_KHR = VK_IMAGE_ASPECT_PLANE_2_BIT,
      // Provided by VK_KHR_maintenance4
        VK_IMAGE_ASPECT_NONE_KHR = VK_IMAGE_ASPECT_NONE,
    } VkImageAspectFlagBits;

- VK_IMAGE_ASPECT_NONE specifies no image aspect, or the image aspect is not applicable.

- VK_IMAGE_ASPECT_COLOR_BIT specifies the color aspect.

- VK_IMAGE_ASPECT_DEPTH_BIT specifies the depth aspect.

- VK_IMAGE_ASPECT_STENCIL_BIT specifies the stencil aspect.

- VK_IMAGE_ASPECT_METADATA_BIT specifies the metadata aspect used for sparse resource operations.

- VK_IMAGE_ASPECT_PLANE_0_BIT specifies plane 0 of a multi-planar image format.

- VK_IMAGE_ASPECT_PLANE_1_BIT specifies plane 1 of a multi-planar image format.

- VK_IMAGE_ASPECT_PLANE_2_BIT specifies plane 2 of a multi-planar image format.

- VK_IMAGE_ASPECT_MEMORY_PLANE_0_BIT_EXT specifies memory plane 0.

- VK_IMAGE_ASPECT_MEMORY_PLANE_1_BIT_EXT specifies memory plane 1.

- VK_IMAGE_ASPECT_MEMORY_PLANE_2_BIT_EXT specifies memory plane 2.

- VK_IMAGE_ASPECT_MEMORY_PLANE_3_BIT_EXT specifies memory plane 3.

    // Provided by VK_VERSION_1_0
    typedef VkFlags VkImageAspectFlags;

`VkImageAspectFlags` is a bitmask type for setting a mask of zero or more VkImageAspectFlagBits.

The `VkComponentMapping` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkComponentMapping {
        VkComponentSwizzle    r;
        VkComponentSwizzle    g;
        VkComponentSwizzle    b;
        VkComponentSwizzle    a;
    } VkComponentMapping;

- `r` is a VkComponentSwizzle specifying the component value placed in the R component of the output vector.

- `g` is a VkComponentSwizzle specifying the component value placed in the G component of the output vector.

- `b` is a VkComponentSwizzle specifying the component value placed in the B component of the output vector.

- `a` is a VkComponentSwizzle specifying the component value placed in the A component of the output vector.

Valid Usage (Implicit)

- VUID-VkComponentMapping-r-parameter
  `r` must be a valid VkComponentSwizzle value

- VUID-VkComponentMapping-g-parameter
  `g` must be a valid VkComponentSwizzle value

- VUID-VkComponentMapping-b-parameter
  `b` must be a valid VkComponentSwizzle value

- VUID-VkComponentMapping-a-parameter
  `a` must be a valid VkComponentSwizzle value

Possible values of the members of VkComponentMapping, specifying the component values placed in each component of the output vector, are:

    // Provided by VK_VERSION_1_0
    typedef enum VkComponentSwizzle {
        VK_COMPONENT_SWIZZLE_IDENTITY = 0,
        VK_COMPONENT_SWIZZLE_ZERO = 1,
        VK_COMPONENT_SWIZZLE_ONE = 2,
        VK_COMPONENT_SWIZZLE_R = 3,
        VK_COMPONENT_SWIZZLE_G = 4,
        VK_COMPONENT_SWIZZLE_B = 5,
        VK_COMPONENT_SWIZZLE_A = 6,
    } VkComponentSwizzle;

- VK_COMPONENT_SWIZZLE_IDENTITY specifies that the component is set to the identity swizzle.

- VK_COMPONENT_SWIZZLE_ZERO specifies that the component is set to zero.

- VK_COMPONENT_SWIZZLE_ONE specifies that the component is set to either 1 or 1.0, depending on whether the type of the image view format is integer or floating-point respectively, as determined by the Format Definition section for each VkFormat.

- VK_COMPONENT_SWIZZLE_R specifies that the component is set to the value of the R component of the image.

- VK_COMPONENT_SWIZZLE_G specifies that the component is set to the value of the G component of the image.

- VK_COMPONENT_SWIZZLE_B specifies that the component is set to the value of the B component of the image.

- VK_COMPONENT_SWIZZLE_A specifies that the component is set to the value of the A component of the image.

Setting the identity swizzle on a component is equivalent to setting the identity mapping on that component. That is:

Table 18. Component Mappings Equivalent To VK_COMPONENT_SWIZZLE_IDENTITY
Component | Identity Mapping
--- | ---
`components.r` | VK_COMPONENT_SWIZZLE_R
`components.g` | VK_COMPONENT_SWIZZLE_G
`components.b` | VK_COMPONENT_SWIZZLE_B
`components.a` | VK_COMPONENT_SWIZZLE_A

If the `pNext` chain includes a `VkImageViewASTCDecodeModeEXT` structure, then that structure includes a parameter specifying the decode mode for image views using ASTC compressed formats.

The `VkImageViewASTCDecodeModeEXT` structure is defined as:

    // Provided by VK_EXT_astc_decode_mode
    typedef struct VkImageViewASTCDecodeModeEXT {
        VkStructureType    sType;
        const void*        pNext;
        VkFormat           decodeMode;
    } VkImageViewASTCDecodeModeEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `decodeMode` is the intermediate format used to decode ASTC compressed formats.

Valid Usage

- VUID-VkImageViewASTCDecodeModeEXT-decodeMode-02230
  `decodeMode` must be one of VK_FORMAT_R16G16B16A16_SFLOAT, VK_FORMAT_R8G8B8A8_UNORM, or VK_FORMAT_E5B9G9R9_UFLOAT_PACK32

- VUID-VkImageViewASTCDecodeModeEXT-decodeMode-02231
  If the `decodeModeSharedExponent` feature is not enabled, `decodeMode` must not be VK_FORMAT_E5B9G9R9_UFLOAT_PACK32

- VUID-VkImageViewASTCDecodeModeEXT-decodeMode-02232
  If `decodeMode` is VK_FORMAT_R8G8B8A8_UNORM the image view must not include blocks using any of the ASTC HDR modes

- VUID-VkImageViewASTCDecodeModeEXT-format-04084
  `format` of the image view must be one of the ASTC Compressed Image Formats

If `format` uses sRGB encoding then the `decodeMode` has no effect.

Valid Usage (Implicit)

- VUID-VkImageViewASTCDecodeModeEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_IMAGE_VIEW_ASTC_DECODE_MODE_EXT

- VUID-VkImageViewASTCDecodeModeEXT-decodeMode-parameter
  `decodeMode` must be a valid VkFormat value

Structure Chaining

Extends the structure

  - VkImageViewCreateInfo

If the `pNext` chain includes a `VkImageViewSampleWeightCreateInfoQCOM` structure, then that structure includes a parameter specifying the parameters for weight image views used in weight image sampling.

The `VkImageViewSampleWeightCreateInfoQCOM` structure is defined as:

    // Provided by VK_QCOM_image_processing
    typedef struct VkImageViewSampleWeightCreateInfoQCOM {
        VkStructureType    sType;
        const void*        pNext;
        VkOffset2D         filterCenter;
        VkExtent2D         filterSize;
        uint32_t           numPhases;
    } VkImageViewSampleWeightCreateInfoQCOM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `filterCenter` is a VkOffset2D describing the location of the weight filter origin.

- `filterSize` is a VkExtent2D specifying weight filter dimensions.

- `numPhases` is the number of sub-pixel filter phases.

The `filterCenter` specifies the origin or center of the filter kernel, as described in Weight Sampling Operation. The `numPhases` describes the number of sub-pixel filter phases as described in Weight Sampling Phases.

Valid Usage

- VUID-VkImageViewSampleWeightCreateInfoQCOM-filterSize-06958
  `filterSize.width` must be less than or equal to `VkPhysicalDeviceImageProcessingPropertiesQCOM`::`maxWeightFilterDimension.width`

- VUID-VkImageViewSampleWeightCreateInfoQCOM-filterSize-06959
  `filterSize.height` must be less than or equal to `VkPhysicalDeviceImageProcessingPropertiesQCOM`::`maxWeightFilterDimension.height`

- VUID-VkImageViewSampleWeightCreateInfoQCOM-filterCenter-06960
  `filterCenter.x` must be less than or equal to (filterSize.width - 1)

- VUID-VkImageViewSampleWeightCreateInfoQCOM-filterCenter-06961
  `filterCenter.y` must be less than or equal to (filterSize.height - 1)

- VUID-VkImageViewSampleWeightCreateInfoQCOM-numPhases-06962
  `numPhases` must be a power of two squared value (i.e., 1, 4, 16, 64, 256, etc.)

- VUID-VkImageViewSampleWeightCreateInfoQCOM-numPhases-06963
  `numPhases` must be less than or equal to `VkPhysicalDeviceImageProcessingPropertiesQCOM`::`maxWeightFilterPhases`

Valid Usage (Implicit)

- VUID-VkImageViewSampleWeightCreateInfoQCOM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_IMAGE_VIEW_SAMPLE_WEIGHT_CREATE_INFO_QCOM

Structure Chaining

Extends the structure

  - VkImageViewCreateInfo

To destroy an image view, call:

    // Provided by VK_VERSION_1_0
    void vkDestroyImageView(
        VkDevice                                    device,
        VkImageView                                 imageView,
        const VkAllocationCallbacks*                pAllocator);

- `device` is the logical device that destroys the image view.

- `imageView` is the image view to destroy.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

Valid Usage

- VUID-vkDestroyImageView-imageView-01026
  All submitted commands that refer to `imageView` must have completed execution

- VUID-vkDestroyImageView-imageView-01027
  If `VkAllocationCallbacks` were provided when `imageView` was created, a compatible set of callbacks must be provided here

- VUID-vkDestroyImageView-imageView-01028
  If no `VkAllocationCallbacks` were provided when `imageView` was created, `pAllocator` must be `NULL`

Valid Usage (Implicit)

- VUID-vkDestroyImageView-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkDestroyImageView-imageView-parameter
  If `imageView` is not VK_NULL_HANDLE, `imageView` must be a valid VkImageView handle

- VUID-vkDestroyImageView-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkDestroyImageView-imageView-parent
  If `imageView` is a valid handle, it must have been created, allocated, or retrieved from `device`

Host Synchronization

- Host access to `imageView` must be externally synchronized

To get the handle for an image view, call:

    // Provided by VK_NVX_image_view_handle
    uint32_t vkGetImageViewHandleNVX(
        VkDevice                                    device,
        const VkImageViewHandleInfoNVX*             pInfo);

- `device` is the logical device that owns the image view.

- `pInfo` describes the image view to query and type of handle.

Valid Usage (Implicit)

- VUID-vkGetImageViewHandleNVX-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetImageViewHandleNVX-pInfo-parameter
  `pInfo` must be a valid pointer to a valid VkImageViewHandleInfoNVX structure

To get the 64-bit handle for an image view, call:

    // Provided by VK_NVX_image_view_handle
    uint64_t vkGetImageViewHandle64NVX(
        VkDevice                                    device,
        const VkImageViewHandleInfoNVX*             pInfo);

- `device` is the logical device that owns the image view.

- `pInfo` describes the image view to query and type of handle.

Valid Usage (Implicit)

- VUID-vkGetImageViewHandle64NVX-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetImageViewHandle64NVX-pInfo-parameter
  `pInfo` must be a valid pointer to a valid VkImageViewHandleInfoNVX structure

The `VkImageViewHandleInfoNVX` structure is defined as:

    // Provided by VK_NVX_image_view_handle
    typedef struct VkImageViewHandleInfoNVX {
        VkStructureType     sType;
        const void*         pNext;
        VkImageView         imageView;
        VkDescriptorType    descriptorType;
        VkSampler           sampler;
    } VkImageViewHandleInfoNVX;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `imageView` is the image view to query.

- `descriptorType` is the type of descriptor for which to query a handle.

- `sampler` is the sampler to combine with the image view when generating the handle.

Valid Usage

- VUID-VkImageViewHandleInfoNVX-descriptorType-02654
  `descriptorType` must be VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, or VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER

- VUID-VkImageViewHandleInfoNVX-sampler-02655
  `sampler` must be a valid VkSampler if `descriptorType` is VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER

- VUID-VkImageViewHandleInfoNVX-imageView-02656
  If descriptorType is VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE or VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, the image that `imageView` was created from must have been created with the VK_IMAGE_USAGE_SAMPLED_BIT usage flag set

- VUID-VkImageViewHandleInfoNVX-imageView-02657
  If descriptorType is VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, the image that `imageView` was created from must have been created with the VK_IMAGE_USAGE_STORAGE_BIT usage flag set

Valid Usage (Implicit)

- VUID-VkImageViewHandleInfoNVX-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_IMAGE_VIEW_HANDLE_INFO_NVX

- VUID-VkImageViewHandleInfoNVX-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkImageViewHandleInfoNVX-imageView-parameter
  `imageView` must be a valid VkImageView handle

- VUID-VkImageViewHandleInfoNVX-descriptorType-parameter
  `descriptorType` must be a valid VkDescriptorType value

- VUID-VkImageViewHandleInfoNVX-sampler-parameter
  If `sampler` is not VK_NULL_HANDLE, `sampler` must be a valid VkSampler handle

- VUID-VkImageViewHandleInfoNVX-commonparent
  Both of `imageView`, and `sampler` that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevice

To get the device address for an image view, call:

    // Provided by VK_NVX_image_view_handle
    VkResult vkGetImageViewAddressNVX(
        VkDevice                                    device,
        VkImageView                                 imageView,
        VkImageViewAddressPropertiesNVX*            pProperties);

- `device` is the logical device that owns the image view.

- `imageView` is a handle to the image view.

- `pProperties` contains the device address and size when the call returns.

Valid Usage (Implicit)

- VUID-vkGetImageViewAddressNVX-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetImageViewAddressNVX-imageView-parameter
  `imageView` must be a valid VkImageView handle

- VUID-vkGetImageViewAddressNVX-pProperties-parameter
  `pProperties` must be a valid pointer to a VkImageViewAddressPropertiesNVX structure

- VUID-vkGetImageViewAddressNVX-imageView-parent
  `imageView` must have been created, allocated, or retrieved from `device`

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkImageViewAddressPropertiesNVX` structure is defined as:

    // Provided by VK_NVX_image_view_handle
    typedef struct VkImageViewAddressPropertiesNVX {
        VkStructureType    sType;
        void*              pNext;
        VkDeviceAddress    deviceAddress;
        VkDeviceSize       size;
    } VkImageViewAddressPropertiesNVX;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `deviceAddress` is the device address of the image view.

- `size` is the size in bytes of the image view device memory.

Valid Usage (Implicit)

- VUID-VkImageViewAddressPropertiesNVX-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_IMAGE_VIEW_ADDRESS_PROPERTIES_NVX

- VUID-VkImageViewAddressPropertiesNVX-pNext-pNext
  `pNext` must be `NULL`

To get the handle for a combined image sampler, call:

    // Provided by VK_NVX_image_view_handle
    uint64_t vkGetDeviceCombinedImageSamplerIndexNVX(
        VkDevice                                    device,
        uint64_t                                    imageViewIndex,
        uint64_t                                    samplerIndex);

- `device` is the logical device that will use the result handle.

- `imageViewIndex` is the index within the resource heap.

- `samplerIndex` is the index within the sampler heap.

Shaders take `imageViewIndex` and `samplerIndex`, and multiply it by VkPhysicalDeviceDescriptorHeapPropertiesEXT::`imageDescriptorSize` and VkPhysicalDeviceDescriptorHeapPropertiesEXT::`samplerDescriptorSize` respectively to obtain the descriptor offset in bytes.

Valid Usage (Implicit)

- VUID-vkGetDeviceCombinedImageSamplerIndexNVX-device-parameter
  `device` must be a valid VkDevice handle

#### 12.6.1. Image View Format Features

Valid uses of a VkImageView may depend on the image view’s format features, defined below. Such constraints are documented in the affected valid usage statement.

- If Vulkan 1.3 is supported or the `VK_KHR_format_feature_flags2` extension is supported, and VkImageViewCreateInfo::`image` was created with VK_IMAGE_TILING_LINEAR, then the image view’s set of format features is the value of VkFormatProperties3::`linearTilingFeatures` found by calling vkGetPhysicalDeviceFormatProperties2 on the same `format` as VkImageViewCreateInfo::`format`.

- If Vulkan 1.3 is not supported and the `VK_KHR_format_feature_flags2` extension is not supported, and VkImageViewCreateInfo::`image` was created with VK_IMAGE_TILING_LINEAR, then the image view’s set of format features is the union of the value of VkFormatProperties::`linearTilingFeatures` found by calling vkGetPhysicalDeviceFormatProperties on the same `format` as VkImageViewCreateInfo::`format`, with:

  - VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT if the format is a depth/stencil format and the image view features also contain VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_BIT.

  - VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT if the format is one of the extended storage formats and the `shaderStorageImageReadWithoutFormat` feature is enabled.

  - VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT if the format is one of the extended storage formats and the `shaderStorageImageWriteWithoutFormat` feature is enabled.

- If Vulkan 1.3 is supported or the `VK_KHR_format_feature_flags2` extension is supported, and VkImageViewCreateInfo::`image` was created with VK_IMAGE_TILING_OPTIMAL, but without an Android hardware buffer external format, or a QNX Screen buffer external format, then the image view’s set of format features is the value of VkFormatProperties::`optimalTilingFeatures` or VkFormatProperties3::`optimalTilingFeatures` found by calling vkGetPhysicalDeviceFormatProperties or vkGetPhysicalDeviceImageFormatProperties2 on the same `format` as VkImageViewCreateInfo::`format`.

- If Vulkan 1.3 is not supported and the `VK_KHR_format_feature_flags2` extension is not supported, and VkImageViewCreateInfo::`image` was created with VK_IMAGE_TILING_OPTIMAL, but without an Android hardware buffer external format, or a QNX Screen buffer external format, then the image view’s set of format features is the union of the value of VkFormatProperties::`optimalTilingFeatures` found by calling vkGetPhysicalDeviceFormatProperties on the same `format` as VkImageViewCreateInfo::`format`, with:

  - VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT if the format is a depth/stencil format and the image view features also contain VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_BIT.

  - VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT if the format is one of the extended storage formats and the `shaderStorageImageReadWithoutFormat` feature is enabled.

  - VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT if the format is one of the extended storage formats and the `shaderStorageImageWriteWithoutFormat` feature is enabled.

- If VkImageViewCreateInfo::`image` was created with an Android hardware buffer external format, then the image views’s set of format features is the value of VkAndroidHardwareBufferFormatPropertiesANDROID::`formatFeatures` found by calling vkGetAndroidHardwareBufferPropertiesANDROID on the Android hardware buffer that was imported to the VkDeviceMemory to which the VkImageViewCreateInfo::`image` is bound.

- If VkImageViewCreateInfo::`image` was created with a QNX Screen buffer external format, then the image views’s set of format features is the value of VkScreenBufferFormatPropertiesQNX::`formatFeatures` found by calling vkGetScreenBufferPropertiesQNX on the QNX Screen buffer that was imported to the VkDeviceMemory to which the VkImageViewCreateInfo::`image` is bound.

- If VkImageViewCreateInfo::`image` was created with a chained VkBufferCollectionImageCreateInfoFUCHSIA, then the image view’s set of format features is the value of VkBufferCollectionPropertiesFUCHSIA::`formatFeatures` found by calling vkGetBufferCollectionPropertiesFUCHSIA on the buffer collection passed as VkBufferCollectionImageCreateInfoFUCHSIA::`collection` when the image was created.

- If VkImageViewCreateInfo::`image` was created with VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, then:

  - The image’s DRM format modifier is the value of VkImageDrmFormatModifierPropertiesEXT::`drmFormatModifier` found by calling vkGetImageDrmFormatModifierPropertiesEXT.

  - Let VkDrmFormatModifierPropertiesListEXT::`pDrmFormatModifierProperties` be the array found by calling vkGetPhysicalDeviceFormatProperties2 on the same `format` as VkImageViewCreateInfo::`format`.

  - Let `VkDrmFormatModifierPropertiesEXT prop` be the array element whose `drmFormatModifier` member is the value of the image’s DRM format modifier.

  - Then the image view’s set of format features is `prop`::`drmFormatModifierTilingFeatures`.

The `VkImageViewMinLodCreateInfoEXT` structure is defined as:

    // Provided by VK_EXT_image_view_min_lod
    typedef struct VkImageViewMinLodCreateInfoEXT {
        VkStructureType    sType;
        const void*        pNext;
        float              minLod;
    } VkImageViewMinLodCreateInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `minLod` is the value to clamp the minimum LOD accessible by this VkImageView.

If the `pNext` chain includes a `VkImageViewMinLodCreateInfoEXT` structure, then that structure includes a parameter specifying a value to clamp the minimum LOD value during Image Level(s) Selection, Texel Gathering and Integer Texel Coordinate Operations.

If the image view contains `VkImageViewMinLodCreateInfoEXT` and it is used as part of a sampling operation:

minLodFloatimageView = `minLod`

otherwise:

minLodFloatimageView = 0.0

An integer variant of this parameter is also defined for sampling operations which access integer mipmap levels:

minLodIntegerimageView = ⌊minLodFloatimageView⌋

Valid Usage

- VUID-VkImageViewMinLodCreateInfoEXT-minLod-06455
  If the `minLod` feature is not enabled, `minLod` must be `0.0`

- VUID-VkImageViewMinLodCreateInfoEXT-minLod-06456
  `minLod` must be less or equal to the index of the last mipmap level accessible to the view

Valid Usage (Implicit)

- VUID-VkImageViewMinLodCreateInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_IMAGE_VIEW_MIN_LOD_CREATE_INFO_EXT

Structure Chaining

Extends the structure

  - VkImageViewCreateInfo

### 12.7. Acceleration Structures

Acceleration structures are opaque data structures that are built by the implementation to more efficiently perform spatial queries on the provided geometric data. For these extensions, an acceleration structure is either a top-level acceleration structure containing a set of bottom-level acceleration structures or a bottom-level acceleration structure containing either a set of axis-aligned bounding boxes for custom geometry or a set of triangles.

Each instance in the top-level acceleration structure contains a reference to a bottom-level acceleration structure as well as an instance transform plus information required to index into the shader bindings. The top-level acceleration structure is what is bound to the acceleration descriptor, for example to trace inside the shader in the ray tracing pipeline.

Acceleration structures for the `VK_KHR_acceleration_structure extension` and micromaps for the `VK_KHR_opacity_micromap extension` are represented by `VkAccelerationStructureKHR` handles:

    // Provided by VK_KHR_acceleration_structure
    VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkAccelerationStructureKHR)

To create an acceleration structure using a device address, call:

    // Provided by VK_KHR_acceleration_structure with VK_KHR_device_address_commands
    VkResult vkCreateAccelerationStructure2KHR(
        VkDevice                                    device,
        const VkAccelerationStructureCreateInfo2KHR* pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkAccelerationStructureKHR*                 pAccelerationStructure);

- `device` is the logical device that creates the acceleration structure object.

- `pCreateInfo` is a pointer to a VkAccelerationStructureCreateInfo2KHR structure containing parameters affecting creation of the acceleration structure.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

- `pAccelerationStructure` is a pointer to a `VkAccelerationStructureKHR` handle in which the resulting acceleration structure object is returned.

Similar to other objects in Vulkan, the acceleration structure creation merely creates an object with a specific “shape”. The type and quantity of geometry that can be built into an acceleration structure is determined by the parameters of VkAccelerationStructureCreateInfo2KHR.

The acceleration structure data is stored in the object referred to by `VkAccelerationStructureCreateInfo2KHR`::`addressRange.address`.

Once the `VkAccelerationStructureKHR` object has been created, it must be populated by acceleration structure build or acceleration structure copy commands such as vkCmdBuildAccelerationStructuresKHR and vkCmdCopyAccelerationStructureKHR. Acceleration structures created with this command must not be used by host commands.

Note | The expected usage for a trace capture/replay tool is that it will serialize and later deserialize the acceleration structure data using acceleration structure copy commands. During capture the tool will use vkCmdCopyAccelerationStructureToMemoryKHR with a `mode` of VK_COPY_ACCELERATION_STRUCTURE_MODE_SERIALIZE_KHR, and vkCmdCopyMemoryToAccelerationStructureKHR with a `mode` of VK_COPY_ACCELERATION_STRUCTURE_MODE_DESERIALIZE_KHR during replay.

Valid Usage

- VUID-vkCreateAccelerationStructure2KHR-accelerationStructure-03611
  The `VkPhysicalDeviceAccelerationStructureFeaturesKHR`::`accelerationStructure` feature must be enabled

- VUID-vkCreateAccelerationStructure2KHR-deviceAddressCommands-13086
  The `VkPhysicalDeviceDeviceAddressCommandsFeaturesKHR`::`deviceAddressCommands` feature must be enabled

Valid Usage (Implicit)

- VUID-vkCreateAccelerationStructure2KHR-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkCreateAccelerationStructure2KHR-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkAccelerationStructureCreateInfo2KHR structure

- VUID-vkCreateAccelerationStructure2KHR-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateAccelerationStructure2KHR-pAccelerationStructure-parameter
  `pAccelerationStructure` must be a valid pointer to a VkAccelerationStructureKHR handle

- VUID-vkCreateAccelerationStructure2KHR-device-queuecount
  The device must have been created with at least `1` queue

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkAccelerationStructureCreateInfo2KHR` structure is defined as:

    // Provided by VK_KHR_acceleration_structure with VK_KHR_device_address_commands
    typedef struct VkAccelerationStructureCreateInfo2KHR {
        VkStructureType                          sType;
        const void*                              pNext;
        VkAccelerationStructureCreateFlagsKHR    createFlags;
        VkDeviceAddressRangeKHR                  addressRange;
        VkAddressCommandFlagsKHR                 addressFlags;
        VkAccelerationStructureTypeKHR           type;
    } VkAccelerationStructureCreateInfo2KHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `createFlags` is a bitmask of VkAccelerationStructureCreateFlagBitsKHR specifying additional creation parameters of the acceleration structure.

- `addressRange` is a VkDeviceAddressRangeKHR structure defining the size required for the acceleration structure and its starting address.

- `addressFlags` is a VkAddressCommandFlagsKHR value defining the flags for the address range.

- `type` is a VkAccelerationStructureTypeKHR value specifying the type of acceleration structure that will be created.

Applications should create an acceleration structure with a specific VkAccelerationStructureTypeKHR other than VK_ACCELERATION_STRUCTURE_TYPE_GENERIC_KHR.

Note | VK_ACCELERATION_STRUCTURE_TYPE_GENERIC_KHR is intended to be used by API translation layers. This can be used at acceleration structure creation time in cases where the actual acceleration structure type (top or bottom) is not yet known. The actual acceleration structure type must be specified as VK_ACCELERATION_STRUCTURE_TYPE_OPACITY_MICROMAP_KHR, VK_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR or VK_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR when the build is performed.

During replay, if `createFlags` includes VK_ACCELERATION_STRUCTURE_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR, `addressRange.address` must be an address used to create an identical acceleration structure on the same implementation. The address must be in the range of an identically created VkBuffer at the same offset.

Applications should avoid creating acceleration structures with application-provided addresses and implementation-provided addresses in the same process, to reduce the likelihood of VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR errors.

Note | The expected usage for this is that a trace capture/replay tool will add the VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT flag and VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT to all buffers used as storage for an acceleration structure with VK_ACCELERATION_STRUCTURE_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR included in `createFlags`. This also means that the tool will need to add VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT to memory allocations to allow the VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT flag to be set where the application may not have otherwise required it. During capture the tool will save the queried opaque device addresses in the trace. During replay, the buffers will be created specifying the original address so any address values stored in the trace data will remain valid. Implementations are expected to separate such buffers in the GPU address space so normal allocations will avoid using these addresses. Applications and tools should avoid mixing application-provided and implementation-provided addresses for buffers created with VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT, to avoid address space allocation conflicts.

If the acceleration structure will be the target of a build operation, the required size for an acceleration structure can be queried with vkGetAccelerationStructureBuildSizesKHR. If the acceleration structure is going to be the target of a copy, vkCmdWriteAccelerationStructuresPropertiesKHR can be used to obtain the size required depending on the type of copy.

If the acceleration structure will be the target of a build operation with VK_BUILD_ACCELERATION_STRUCTURE_MOTION_BIT_NV it must include VK_ACCELERATION_STRUCTURE_CREATE_MOTION_BIT_NV in `createFlags` and include VkAccelerationStructureMotionInfoNV as an extension structure in `pNext` with the number of instances as metadata for the object.

Valid Usage

- VUID-VkAccelerationStructureCreateInfo2KHR-addressRange-13097
  If the range specified by `addressRange` is not bound completely to memory when accessed, `addressFlags` must not include VK_ADDRESS_COMMAND_FULLY_BOUND_BIT_KHR

- VUID-VkAccelerationStructureCreateInfo2KHR-addressRange-13098
  If the buffer from which the range specified by `addressRange` was created with VK_BUFFER_CREATE_PROTECTED_BIT, and `protectedNoFault` is not supported, `addressFlags` must include VK_ADDRESS_COMMAND_PROTECTED_BIT_KHR

- VUID-VkAccelerationStructureCreateInfo2KHR-addressRange-13099
  If the buffer from which the range specified by `addressRange` was created without VK_BUFFER_CREATE_PROTECTED_BIT, and `protectedNoFault` is not supported, `addressFlags` must not include VK_ADDRESS_COMMAND_PROTECTED_BIT_KHR

- VUID-VkAccelerationStructureCreateInfo2KHR-addressFlags-13100
  `addressFlags` must not include both VK_ADDRESS_COMMAND_STORAGE_BUFFER_USAGE_BIT_KHR and VK_ADDRESS_COMMAND_UNKNOWN_STORAGE_BUFFER_USAGE_BIT_KHR

- VUID-VkAccelerationStructureCreateInfo2KHR-addressRange-13122
  If any buffer, which is bound to a range of VkDeviceMemory that overlaps the range backing `addressRange`, was created with VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, `addressFlags` must include VK_ADDRESS_COMMAND_STORAGE_BUFFER_USAGE_BIT_KHR or VK_ADDRESS_COMMAND_UNKNOWN_STORAGE_BUFFER_USAGE_BIT_KHR

- VUID-VkAccelerationStructureCreateInfo2KHR-addressRange-13123
  If any buffer, which is bound to a range of VkDeviceMemory that overlaps the range backing `addressRange`, was created without VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, `addressFlags` must not include VK_ADDRESS_COMMAND_STORAGE_BUFFER_USAGE_BIT_KHR

- VUID-VkAccelerationStructureCreateInfo2KHR-addressFlags-13101
  `addressFlags` must not include both VK_ADDRESS_COMMAND_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR and VK_ADDRESS_COMMAND_UNKNOWN_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR

- VUID-VkAccelerationStructureCreateInfo2KHR-addressRange-13124
  If any buffer, which is bound to a range of VkDeviceMemory that overlaps the range backing `addressRange`, was created with VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT, `addressFlags` must include VK_ADDRESS_COMMAND_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR or VK_ADDRESS_COMMAND_UNKNOWN_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR

- VUID-VkAccelerationStructureCreateInfo2KHR-addressRange-13125
  If any buffer, which is bound to a range of VkDeviceMemory that overlaps the range backing `addressRange`, was created without VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT, `addressFlags` must not include VK_ADDRESS_COMMAND_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR

- VUID-VkAccelerationStructureCreateInfo2KHR-addressRange-11602
  `addressRange.address` must be a valid VkDeviceAddress

- VUID-VkAccelerationStructureCreateInfo2KHR-addressRange-11603
  `addressRange` must specify a range within a valid address retrieved from `buffer` that was created with a `usage` value containing VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_STORAGE_BIT_KHR

- VUID-VkAccelerationStructureCreateInfo2KHR-addressRange-11604
  `addressRange` must specify a range within a valid address retrieved from `buffer` that was not created with a `flags` value containing VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT

- VUID-VkAccelerationStructureCreateInfo2KHR-addressRange-11605
  `addressRange.address` must be a multiple of `256` bytes

- VUID-VkAccelerationStructureCreateInfo2KHR-createFlags-11606
  If the `address` member of `addressRange` was retrieved from a VkBuffer created with VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT, `createFlags` must include VK_ACCELERATION_STRUCTURE_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR

- VUID-VkAccelerationStructureCreateInfo2KHR-createFlags-11607
  If the `address` member of `addressRange` was retrieved from a VkBuffer not created with VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT, `createFlags` must not include VK_ACCELERATION_STRUCTURE_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR

- VUID-VkAccelerationStructureCreateInfo2KHR-addressRange-11608
  `addressRange.size` must be greater than zero

- VUID-VkAccelerationStructureCreateInfo2KHR-micromap-11609
  If `type` is VK_ACCELERATION_STRUCTURE_TYPE_OPACITY_MICROMAP_KHR, the `VkPhysicalDeviceOpacityMicromapFeaturesKHR`::`micromap` feature must be enabled

- VUID-VkAccelerationStructureCreateInfo2KHR-createFlags-11610
  If `type` is VK_ACCELERATION_STRUCTURE_TYPE_OPACITY_MICROMAP_KHR, `createFlags` must not include VK_ACCELERATION_STRUCTURE_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT

- VUID-VkAccelerationStructureCreateInfo2KHR-createFlags-11611
  If `type` is VK_ACCELERATION_STRUCTURE_TYPE_OPACITY_MICROMAP_KHR, `createFlags` must not include VK_ACCELERATION_STRUCTURE_CREATE_MOTION_BIT_NV

- VUID-VkAccelerationStructureCreateInfo2KHR-createFlags-03613
  If `createFlags` includes VK_ACCELERATION_STRUCTURE_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR, VkPhysicalDeviceAccelerationStructureFeaturesKHR::`accelerationStructureCaptureReplay` must be VK_TRUE

- VUID-VkAccelerationStructureCreateInfo2KHR-createFlags-11673
  If `createFlags` includes VK_ACCELERATION_STRUCTURE_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR and `device` was created with multiple physical devices, the `bufferDeviceAddressMultiDevice` feature must be enabled

- VUID-VkAccelerationStructureCreateInfo2KHR-createFlags-04954
  If VK_ACCELERATION_STRUCTURE_CREATE_MOTION_BIT_NV is set in `createFlags` and `type` is VK_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR, one member of the `pNext` chain must be a pointer to a valid instance of VkAccelerationStructureMotionInfoNV

- VUID-VkAccelerationStructureCreateInfo2KHR-createFlags-04955
  If any geometry includes `VkAccelerationStructureGeometryMotionTrianglesDataNV` then `createFlags` must contain VK_ACCELERATION_STRUCTURE_CREATE_MOTION_BIT_NV

- VUID-VkAccelerationStructureCreateInfo2KHR-createFlags-08108
  If `createFlags` includes VK_ACCELERATION_STRUCTURE_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT, the `descriptorBufferCaptureReplay` feature must be enabled

- VUID-VkAccelerationStructureCreateInfo2KHR-pNext-08109
  If the `pNext` chain includes a VkOpaqueCaptureDescriptorDataCreateInfoEXT structure, `createFlags` must contain VK_ACCELERATION_STRUCTURE_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT

Valid Usage (Implicit)

- VUID-VkAccelerationStructureCreateInfo2KHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_INFO_2_KHR

- VUID-VkAccelerationStructureCreateInfo2KHR-pNext-pNext
  `pNext` must be `NULL` or a pointer to a valid instance of VkOpaqueCaptureDescriptorDataCreateInfoEXT

- VUID-VkAccelerationStructureCreateInfo2KHR-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkAccelerationStructureCreateInfo2KHR-createFlags-parameter
  `createFlags` must be a valid combination of VkAccelerationStructureCreateFlagBitsKHR values

- VUID-VkAccelerationStructureCreateInfo2KHR-addressFlags-parameter
  `addressFlags` must be a valid combination of VkAddressCommandFlagBitsKHR values

- VUID-VkAccelerationStructureCreateInfo2KHR-type-parameter
  `type` must be a valid VkAccelerationStructureTypeKHR value

To create an acceleration structure using a buffer, call:

Warning | This functionality is superseded by vkCreateAccelerationStructure2KHR. See Legacy Functionality for more information.

    // Provided by VK_KHR_acceleration_structure
    VkResult vkCreateAccelerationStructureKHR(
        VkDevice                                    device,
        const VkAccelerationStructureCreateInfoKHR* pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkAccelerationStructureKHR*                 pAccelerationStructure);

- `device` is the logical device that creates the acceleration structure object.

- `pCreateInfo` is a pointer to a VkAccelerationStructureCreateInfoKHR structure containing parameters affecting creation of the acceleration structure.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

- `pAccelerationStructure` is a pointer to a `VkAccelerationStructureKHR` handle in which the resulting acceleration structure object is returned.

Similar to other objects in Vulkan, the acceleration structure creation merely creates an object with a specific “shape”. The type and quantity of geometry that can be built into an acceleration structure is determined by the parameters of VkAccelerationStructureCreateInfoKHR.

The acceleration structure data is stored in the object referred to by `VkAccelerationStructureCreateInfoKHR`::`buffer`. Once memory has been bound to that buffer, it must be populated by acceleration structure build or acceleration structure copy commands such as vkCmdBuildAccelerationStructuresKHR, vkBuildAccelerationStructuresKHR, vkCmdCopyAccelerationStructureKHR, and vkCopyAccelerationStructureKHR.

Note | The expected usage for a trace capture/replay tool is that it will serialize and later deserialize the acceleration structure data using acceleration structure copy commands. During capture the tool will use vkCopyAccelerationStructureToMemoryKHR or vkCmdCopyAccelerationStructureToMemoryKHR with a `mode` of VK_COPY_ACCELERATION_STRUCTURE_MODE_SERIALIZE_KHR, and vkCopyMemoryToAccelerationStructureKHR or vkCmdCopyMemoryToAccelerationStructureKHR with a `mode` of VK_COPY_ACCELERATION_STRUCTURE_MODE_DESERIALIZE_KHR during replay.

Note | Memory does not need to be bound to the underlying buffer when vkCreateAccelerationStructureKHR is called.

Valid Usage

- VUID-vkCreateAccelerationStructureKHR-accelerationStructure-03611
  The `VkPhysicalDeviceAccelerationStructureFeaturesKHR`::`accelerationStructure` feature must be enabled

- VUID-vkCreateAccelerationStructureKHR-deviceAddress-03488
  If VkAccelerationStructureCreateInfoKHR::`deviceAddress` is not zero, the `accelerationStructureCaptureReplay` feature must be enabled

Valid Usage (Implicit)

- VUID-vkCreateAccelerationStructureKHR-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkCreateAccelerationStructureKHR-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkAccelerationStructureCreateInfoKHR structure

- VUID-vkCreateAccelerationStructureKHR-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateAccelerationStructureKHR-pAccelerationStructure-parameter
  `pAccelerationStructure` must be a valid pointer to a VkAccelerationStructureKHR handle

- VUID-vkCreateAccelerationStructureKHR-device-queuecount
  The device must have been created with at least `1` queue

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkAccelerationStructureCreateInfoKHR` structure is defined as:

Warning | This functionality is superseded by VkAccelerationStructureCreateInfo2KHR. See Legacy Functionality for more information.

    // Provided by VK_KHR_acceleration_structure
    typedef struct VkAccelerationStructureCreateInfoKHR {
        VkStructureType                          sType;
        const void*                              pNext;
        VkAccelerationStructureCreateFlagsKHR    createFlags;
        VkBuffer                                 buffer;
        VkDeviceSize                             offset;
        VkDeviceSize                             size;
        VkAccelerationStructureTypeKHR           type;
        VkDeviceAddress                          deviceAddress;
    } VkAccelerationStructureCreateInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `createFlags` is a bitmask of VkAccelerationStructureCreateFlagBitsKHR specifying additional creation parameters of the acceleration structure.

- `buffer` is the buffer on which the acceleration structure will be stored.

- `offset` is an offset in bytes from the base address of the buffer at which the acceleration structure will be stored, and must be a multiple of `256`.

- `size` is the size required for the acceleration structure.

- `type` is a VkAccelerationStructureTypeKHR value specifying the type of acceleration structure that will be created.

- `deviceAddress` is the device address requested for the acceleration structure, obtained from vkGetAccelerationStructureDeviceAddressKHR, if the `accelerationStructureCaptureReplay` feature is being used. If `deviceAddress` is zero, no specific address is requested.

Applications should avoid creating acceleration structures with application-provided addresses and implementation-provided addresses in the same process, to reduce the likelihood of VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR errors.

Note | The expected usage for this is that a trace capture/replay tool will add the VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT flag to all buffers that use VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT, and will add VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT to all buffers used as storage for an acceleration structure where `deviceAddress` is not zero. This also means that the tool will need to add VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT to memory allocations to allow the flag to be set where the application may not have otherwise required it. During capture the tool will save the queried opaque device addresses in the trace. During replay, the buffers will be created specifying the original address so any address values stored in the trace data will remain valid. Implementations are expected to separate such buffers in the GPU address space so normal allocations will avoid using these addresses. Applications and tools should avoid mixing application-provided and implementation-provided addresses for buffers created with VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT, to avoid address space allocation conflicts.

Applications should create an acceleration structure with a specific VkAccelerationStructureTypeKHR other than VK_ACCELERATION_STRUCTURE_TYPE_GENERIC_KHR.

Note | VK_ACCELERATION_STRUCTURE_TYPE_GENERIC_KHR is intended to be used by API translation layers. This can be used at acceleration structure creation time in cases where the actual acceleration structure type (top or bottom) is not yet known. The actual acceleration structure type is determined when the acceleration structure is constructed as VK_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR or VK_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR. For acceleration structures constructed by build commands, this type is specified by the build parameters. For acceleration structures constructed by acceleration structure copy commands, this type is determined by the source acceleration structure or serialized data, depending on the copy command.

If the acceleration structure will be the target of a build operation, the required size for an acceleration structure can be queried with vkGetAccelerationStructureBuildSizesKHR. If the acceleration structure is going to be the target of a compacting copy, vkCmdWriteAccelerationStructuresPropertiesKHR or vkWriteAccelerationStructuresPropertiesKHR can be used to obtain the compacted size required.

If the acceleration structure will be the target of a build operation with VK_BUILD_ACCELERATION_STRUCTURE_MOTION_BIT_NV it must include VK_ACCELERATION_STRUCTURE_CREATE_MOTION_BIT_NV in `createFlags` and include VkAccelerationStructureMotionInfoNV as an extension structure in `pNext` with the number of instances as metadata for the object.

Valid Usage

- VUID-VkAccelerationStructureCreateInfoKHR-deviceAddress-03612
  If `deviceAddress` is not zero, `createFlags` must include VK_ACCELERATION_STRUCTURE_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR

- VUID-VkAccelerationStructureCreateInfoKHR-deviceAddress-09488
  If `deviceAddress` is not zero, it must have been retrieved from an identically created acceleration structure, except for `buffer` and `deviceAddress`

- VUID-VkAccelerationStructureCreateInfoKHR-deviceAddress-09489
  If `deviceAddress` is not zero, `buffer` must have been created identically to the `buffer` used to create the acceleration structure from which `deviceAddress` was retrieved, except for VkBufferOpaqueCaptureAddressCreateInfo::`opaqueCaptureAddress`

- VUID-VkAccelerationStructureCreateInfoKHR-deviceAddress-09490
  If `deviceAddress` is not zero, `buffer` must have been created with a VkBufferOpaqueCaptureAddressCreateInfo::`opaqueCaptureAddress` that was retrieved from vkGetBufferOpaqueCaptureAddress for the `buffer` that was used to create the acceleration structure from which `deviceAddress` was retrieved

- VUID-VkAccelerationStructureCreateInfoKHR-buffer-03614
  `buffer` must have been created with the VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_STORAGE_BIT_KHR usage flag set

- VUID-VkAccelerationStructureCreateInfoKHR-buffer-03615
  `buffer` must not have been created with VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT

- VUID-VkAccelerationStructureCreateInfoKHR-offset-03616
  The sum of `offset` and `size` must be less than or equal to the size of `buffer`

- VUID-VkAccelerationStructureCreateInfoKHR-offset-03734
  `offset` must be a multiple of `256` bytes

- VUID-VkAccelerationStructureCreateInfoKHR-type-11600
  `type` must not equal VK_ACCELERATION_STRUCTURE_TYPE_OPACITY_MICROMAP_KHR

- VUID-VkAccelerationStructureCreateInfoKHR-createFlags-03613
  If `createFlags` includes VK_ACCELERATION_STRUCTURE_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR, VkPhysicalDeviceAccelerationStructureFeaturesKHR::`accelerationStructureCaptureReplay` must be VK_TRUE

- VUID-VkAccelerationStructureCreateInfoKHR-createFlags-11673
  If `createFlags` includes VK_ACCELERATION_STRUCTURE_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR and `device` was created with multiple physical devices, the `bufferDeviceAddressMultiDevice` feature must be enabled

- VUID-VkAccelerationStructureCreateInfoKHR-createFlags-04954
  If VK_ACCELERATION_STRUCTURE_CREATE_MOTION_BIT_NV is set in `createFlags` and `type` is VK_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR, one member of the `pNext` chain must be a pointer to a valid instance of VkAccelerationStructureMotionInfoNV

- VUID-VkAccelerationStructureCreateInfoKHR-createFlags-04955
  If any geometry includes `VkAccelerationStructureGeometryMotionTrianglesDataNV` then `createFlags` must contain VK_ACCELERATION_STRUCTURE_CREATE_MOTION_BIT_NV

- VUID-VkAccelerationStructureCreateInfoKHR-createFlags-08108
  If `createFlags` includes VK_ACCELERATION_STRUCTURE_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT, the `descriptorBufferCaptureReplay` feature must be enabled

- VUID-VkAccelerationStructureCreateInfoKHR-pNext-08109
  If the `pNext` chain includes a VkOpaqueCaptureDescriptorDataCreateInfoEXT structure, `createFlags` must contain VK_ACCELERATION_STRUCTURE_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT

Valid Usage (Implicit)

- VUID-VkAccelerationStructureCreateInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_INFO_KHR

- VUID-VkAccelerationStructureCreateInfoKHR-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkAccelerationStructureMotionInfoNV or VkOpaqueCaptureDescriptorDataCreateInfoEXT

- VUID-VkAccelerationStructureCreateInfoKHR-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkAccelerationStructureCreateInfoKHR-createFlags-parameter
  `createFlags` must be a valid combination of VkAccelerationStructureCreateFlagBitsKHR values

- VUID-VkAccelerationStructureCreateInfoKHR-buffer-parameter
  `buffer` must be a valid VkBuffer handle

- VUID-VkAccelerationStructureCreateInfoKHR-type-parameter
  `type` must be a valid VkAccelerationStructureTypeKHR value

- VUID-VkAccelerationStructureCreateInfoKHR-deviceAddress-parameter
  If `deviceAddress` is not `0`, `deviceAddress` must be a valid VkDeviceAddress value

The `VkAccelerationStructureMotionInfoNV` structure is defined as:

    // Provided by VK_NV_ray_tracing_motion_blur
    typedef struct VkAccelerationStructureMotionInfoNV {
        VkStructureType                             sType;
        const void*                                 pNext;
        uint32_t                                    maxInstances;
        VkAccelerationStructureMotionInfoFlagsNV    flags;
    } VkAccelerationStructureMotionInfoNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `maxInstances` is the maximum number of instances that may be used in the motion top-level acceleration structure.

- `flags` is 0 and reserved for future use.

Valid Usage (Implicit)

- VUID-VkAccelerationStructureMotionInfoNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_MOTION_INFO_NV

- VUID-VkAccelerationStructureMotionInfoNV-flags-zerobitmask
  `flags` must be `0`

Structure Chaining

Extends the structure

  - VkAccelerationStructureCreateInfoKHR

    // Provided by VK_NV_ray_tracing_motion_blur
    typedef VkFlags VkAccelerationStructureMotionInfoFlagsNV;

`VkAccelerationStructureMotionInfoFlagsNV` is a bitmask type for setting a mask, but is currently reserved for future use.

To get the build sizes for an acceleration structure, call:

    // Provided by VK_KHR_acceleration_structure
    void vkGetAccelerationStructureBuildSizesKHR(
        VkDevice                                    device,
        VkAccelerationStructureBuildTypeKHR         buildType,
        const VkAccelerationStructureBuildGeometryInfoKHR* pBuildInfo,
        const uint32_t*                             pMaxPrimitiveCounts,
        VkAccelerationStructureBuildSizesInfoKHR*   pSizeInfo);

- `device` is the logical device that will be used for creating the acceleration structure.

- `buildType` defines whether host or device operations (or both) are being queried for.

- `pBuildInfo` is a pointer to a VkAccelerationStructureBuildGeometryInfoKHR structure describing parameters of a build operation.

- `pMaxPrimitiveCounts` is a pointer to an array of `pBuildInfo->geometryCount` `uint32_t` values defining the number of primitives built into each geometry.

- `pSizeInfo` is a pointer to a VkAccelerationStructureBuildSizesInfoKHR structure which returns the size required for an acceleration structure and the sizes required for the scratch buffers, given the build parameters. The size requirements for a scratch buffer may be zero.

The `srcAccelerationStructure`, `dstAccelerationStructure`, and `mode` members of `pBuildInfo` are ignored. Any VkDeviceOrHostAddressKHR, VkDeviceOrHostAddressConstKHR, or VkDeviceAddress members of `pBuildInfo` are ignored by this command, except that the `hostAddress` member of VkAccelerationStructureGeometryTrianglesDataKHR::`transformData` will be examined to check if it is `NULL`.

An acceleration structure created with the `accelerationStructureSize` returned by this command supports any build or update with a VkAccelerationStructureBuildGeometryInfoKHR structure and array of VkAccelerationStructureBuildRangeInfoKHR structures subject to the following properties:

- The build command is a host build command, and `buildType` is VK_ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_KHR or VK_ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_OR_DEVICE_KHR

- The build command is a device build command, and `buildType` is VK_ACCELERATION_STRUCTURE_BUILD_TYPE_DEVICE_KHR or VK_ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_OR_DEVICE_KHR

- For VkAccelerationStructureBuildGeometryInfoKHR:

  - Its `type`, and `flags` members are equal to `pBuildInfo->type` and `pBuildInfo->flags`, respectively.

  - `geometryCount` is less than or equal to `pBuildInfo->geometryCount`.

  - For each element of either `pGeometries` or `ppGeometries` at a given index, its `geometryType` member is equal to `pBuildInfo->geometryType`.

  - For each element of either `pGeometries` or `ppGeometries` at a given index, its `flags` member is equal to the corresponding member of the same element in `pBuildInfo`.

  - For each element of either `pGeometries` or `ppGeometries` at a given index, with a `geometryType` member equal to VK_GEOMETRY_TYPE_TRIANGLES_KHR, the `vertexFormat` and `indexType` members of `geometry.triangles` are equal to the corresponding members of the same element in `pBuildInfo`.

  - For each element of either `pGeometries` or `ppGeometries` at a given index, with a `geometryType` member equal to VK_GEOMETRY_TYPE_TRIANGLES_KHR, the `maxVertex` member of `geometry.triangles` is less than or equal to the corresponding member of the same element in `pBuildInfo`.

  - For each element of either `pGeometries` or `ppGeometries` at a given index, with a `geometryType` member equal to VK_GEOMETRY_TYPE_TRIANGLES_KHR, if the applicable address in the `transformData` member of `geometry.triangles` is not `NULL`, the corresponding `transformData.hostAddress` parameter in `pBuildInfo` is not `NULL`.

  - For each element of either `pGeometries` or `ppGeometries` at a given index, with a `geometryType` member equal to VK_GEOMETRY_TYPE_MICROMAP_KHR, the sum of usage information in either the `pUsageCounts` or `ppUsageCounts` members of the VkAccelerationStructureGeometryMicromapDataKHR structure in its `pNext` chain is equal to the sum of usage information in the corresponding members of `pBuild` info.

  - For each element of either `pGeometries` or `ppGeometries` at a given index, with a `geometryType` member equal to VK_GEOMETRY_TYPE_TRIANGLES_KHR, if the `pNext` chain contains VkAccelerationStructureTrianglesOpacityMicromapKHR the corresponding member of `pBuildInfo` also contains VkAccelerationStructureTrianglesOpacityMicromapKHR and with an equivalent `micromap`.

  - For each element of either `pGeometries` or `ppGeometries` at a given index, with a `geometryType` member equal to VK_GEOMETRY_TYPE_DENSE_GEOMETRY_FORMAT_TRIANGLES_AMDX, the `numTriangles` member of the VkAccelerationStructureDenseGeometryFormatTrianglesDataAMDX structure in the `pNext` chain is less than or equal to the corresponding member of the same element in `pBuildInfo`

  - For each element of either `pGeometries` or `ppGeometries` at a given index, with a `geometryType` member equal to VK_GEOMETRY_TYPE_DENSE_GEOMETRY_FORMAT_TRIANGLES_AMDX, the `numVertices` member of the VkAccelerationStructureDenseGeometryFormatTrianglesDataAMDX structure in the `pNext` chain is less than or equal to the corresponding member of the same element in `pBuildInfo`

  - For each element of either `pGeometries` or `ppGeometries` at a given index, with a `geometryType` member equal to VK_GEOMETRY_TYPE_DENSE_GEOMETRY_FORMAT_TRIANGLES_AMDX, the `maxPrimitiveIndex` member of the VkAccelerationStructureDenseGeometryFormatTrianglesDataAMDX structure in the `pNext` chain is less than or equal to the corresponding member of the same element in `pBuildInfo`

  - For each element of either `pGeometries` or `ppGeometries` at a given index, with a `geometryType` member equal to VK_GEOMETRY_TYPE_DENSE_GEOMETRY_FORMAT_TRIANGLES_AMDX, the `maxGeometryIndex` member of the VkAccelerationStructureDenseGeometryFormatTrianglesDataAMDX structure in the `pNext` chain is less than or equal to the corresponding member of the same element in `pBuildInfo`

  - For each element of either `pGeometries` or `ppGeometries` at a given index, with a `geometryType` member equal to VK_GEOMETRY_TYPE_DENSE_GEOMETRY_FORMAT_TRIANGLES_AMDX, the `format` member of the VkAccelerationStructureDenseGeometryFormatTrianglesDataAMDX structure in the `pNext` chain is equal to the corresponding member of the same element in `pBuildInfo`

- For each VkAccelerationStructureBuildRangeInfoKHR corresponding to the VkAccelerationStructureBuildGeometryInfoKHR:

  - Its `primitiveCount` member is less than or equal to the corresponding element of `pMaxPrimitiveCounts`.

  - For each element of either `pGeometries` or `ppGeometries` at a given index, with a `geometryType` member equal to VK_GEOMETRY_TYPE_TRIANGLES_KHR, if the `pNext` chain contains VkAccelerationStructureTrianglesOpacityMicromapEXT the corresponding member of `pBuildInfo` also contains VkAccelerationStructureTrianglesOpacityMicromapEXT and with an equivalent `micromap`.

  - For each element of either `pGeometries` or `ppGeometries` at a given index, with a `geometryType` member equal to VK_GEOMETRY_TYPE_TRIANGLES_KHR, if the `pNext` chain contains VkAccelerationStructureTrianglesDisplacementMicromapNV the corresponding member of `pBuildInfo` also contains VkAccelerationStructureTrianglesDisplacementMicromapNV and with an equivalent `micromap`.

- For each VkAccelerationStructureBuildRangeInfoKHR corresponding to the VkAccelerationStructureBuildGeometryInfoKHR:

  - Its `primitiveCount` member is less than or equal to the corresponding element of `pMaxPrimitiveCounts`.

Similarly, the `updateScratchSize` value will support any build command specifying the VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR `mode` under the above conditions, and the `buildScratchSize` value will support any build command specifying the VK_BUILD_ACCELERATION_STRUCTURE_MODE_BUILD_KHR `mode` under the above conditions.

Valid Usage

- VUID-vkGetAccelerationStructureBuildSizesKHR-accelerationStructure-08933
  The `VkPhysicalDeviceAccelerationStructureFeaturesKHR`::`accelerationStructure` feature must be enabled

- VUID-vkGetAccelerationStructureBuildSizesKHR-device-03618
  If `device` was created with multiple physical devices, then the `bufferDeviceAddressMultiDevice` feature must be enabled

- VUID-vkGetAccelerationStructureBuildSizesKHR-pMaxPrimitiveCounts-11612
  If `pBuildInfo->geometryCount` is not `0` and `pBuildInfo->type` is not VK_ACCELERATION_STRUCTURE_TYPE_OPACITY_MICROMAP_KHR , `pMaxPrimitiveCounts` must be a valid pointer to an array of `pBuildInfo->geometryCount` `uint32_t` values

- VUID-vkGetAccelerationStructureBuildSizesKHR-pMaxPrimitiveCounts-11613
  If `pBuildInfo->type` is VK_ACCELERATION_STRUCTURE_TYPE_OPACITY_MICROMAP_KHR, `pMaxPrimitiveCounts` must equal `NULL`

- VUID-vkGetAccelerationStructureBuildSizesKHR-buildType-11614
  If `pBuildInfo->type` is VK_ACCELERATION_STRUCTURE_TYPE_OPACITY_MICROMAP_KHR, `buildType` must equal VK_ACCELERATION_STRUCTURE_BUILD_TYPE_DEVICE_KHR

- VUID-vkGetAccelerationStructureBuildSizesKHR-pBuildInfo-03785
  If `pBuildInfo->pGeometries` or `pBuildInfo->ppGeometries` has a `geometryType` of VK_GEOMETRY_TYPE_INSTANCES_KHR, each `pMaxPrimitiveCounts`[i] must be less than or equal to VkPhysicalDeviceAccelerationStructurePropertiesKHR::`maxInstanceCount`

Valid Usage (Implicit)

- VUID-vkGetAccelerationStructureBuildSizesKHR-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetAccelerationStructureBuildSizesKHR-buildType-parameter
  `buildType` must be a valid VkAccelerationStructureBuildTypeKHR value

- VUID-vkGetAccelerationStructureBuildSizesKHR-pBuildInfo-parameter
  `pBuildInfo` must be a valid pointer to a valid VkAccelerationStructureBuildGeometryInfoKHR structure

- VUID-vkGetAccelerationStructureBuildSizesKHR-pMaxPrimitiveCounts-parameter
  If `pMaxPrimitiveCounts` is not `NULL`, `pMaxPrimitiveCounts` must be a valid pointer to an array of `pBuildInfo->geometryCount` `uint32_t` values

- VUID-vkGetAccelerationStructureBuildSizesKHR-pSizeInfo-parameter
  `pSizeInfo` must be a valid pointer to a VkAccelerationStructureBuildSizesInfoKHR structure

The `VkAccelerationStructureBuildSizesInfoKHR` structure describes the required build sizes for an acceleration structure and scratch buffers and is defined as:

    // Provided by VK_KHR_acceleration_structure
    typedef struct VkAccelerationStructureBuildSizesInfoKHR {
        VkStructureType    sType;
        void*              pNext;
        VkDeviceSize       accelerationStructureSize;
        VkDeviceSize       updateScratchSize;
        VkDeviceSize       buildScratchSize;
    } VkAccelerationStructureBuildSizesInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `accelerationStructureSize` is the size in bytes required in a VkAccelerationStructureKHR for a build or update operation.

- `updateScratchSize` is the size in bytes required in a scratch buffer for an update operation.

- `buildScratchSize` is the size in bytes required in a scratch buffer for a build operation.

Acceleration structure objects that represent micromaps cannot be the target for update commands. Implementations must set `updateScratchSize` equal to `0` if the `pBuildInfo->type` is VK_ACCELERATION_STRUCTURE_TYPE_OPACITY_MICROMAP_KHR.

Valid Usage (Implicit)

- VUID-VkAccelerationStructureBuildSizesInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_BUILD_SIZES_INFO_KHR

- VUID-VkAccelerationStructureBuildSizesInfoKHR-pNext-pNext
  `pNext` must be `NULL`

Acceleration structures for the `VK_NV_ray_tracing extension` are represented by the similar `VkAccelerationStructureNV` handles:

    // Provided by VK_NV_ray_tracing
    VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkAccelerationStructureNV)

To create acceleration structures, call:

    // Provided by VK_NV_ray_tracing
    VkResult vkCreateAccelerationStructureNV(
        VkDevice                                    device,
        const VkAccelerationStructureCreateInfoNV*  pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkAccelerationStructureNV*                  pAccelerationStructure);

- `device` is the logical device that creates the buffer object.

- `pCreateInfo` is a pointer to a VkAccelerationStructureCreateInfoNV structure containing parameters affecting creation of the acceleration structure.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

- `pAccelerationStructure` is a pointer to a VkAccelerationStructureNV handle in which the resulting acceleration structure object is returned.

Similarly to other objects in Vulkan, the acceleration structure creation merely creates an object with a specific “shape” as specified by the information in VkAccelerationStructureInfoNV and `compactedSize` in `pCreateInfo`.

Once memory has been bound to the acceleration structure using vkBindAccelerationStructureMemoryNV, that memory is populated by calls to vkCmdBuildAccelerationStructureNV and vkCmdCopyAccelerationStructureNV.

Acceleration structure creation uses the count and type information from the geometries, but does not use the data references in the structures.

Valid Usage (Implicit)

- VUID-vkCreateAccelerationStructureNV-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkCreateAccelerationStructureNV-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkAccelerationStructureCreateInfoNV structure

- VUID-vkCreateAccelerationStructureNV-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateAccelerationStructureNV-pAccelerationStructure-parameter
  `pAccelerationStructure` must be a valid pointer to a VkAccelerationStructureNV handle

- VUID-vkCreateAccelerationStructureNV-device-queuecount
  The device must have been created with at least `1` queue

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkAccelerationStructureCreateInfoNV` structure is defined as:

    // Provided by VK_NV_ray_tracing
    typedef struct VkAccelerationStructureCreateInfoNV {
        VkStructureType                  sType;
        const void*                      pNext;
        VkDeviceSize                     compactedSize;
        VkAccelerationStructureInfoNV    info;
    } VkAccelerationStructureCreateInfoNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `compactedSize` is the size from the result of vkCmdWriteAccelerationStructuresPropertiesNV if this acceleration structure is going to be the target of a compacting copy.

- `info` is the VkAccelerationStructureInfoNV structure specifying further parameters of the created acceleration structure.

Valid Usage

- VUID-VkAccelerationStructureCreateInfoNV-compactedSize-02421
  If `compactedSize` is not `0` then both `info.geometryCount` and `info.instanceCount` must be `0`

Valid Usage (Implicit)

- VUID-VkAccelerationStructureCreateInfoNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_INFO_NV

- VUID-VkAccelerationStructureCreateInfoNV-pNext-pNext
  `pNext` must be `NULL` or a pointer to a valid instance of VkOpaqueCaptureDescriptorDataCreateInfoEXT

- VUID-VkAccelerationStructureCreateInfoNV-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkAccelerationStructureCreateInfoNV-info-parameter
  `info` must be a valid VkAccelerationStructureInfoNV structure

The `VkAccelerationStructureInfoNV` structure is defined as:

    // Provided by VK_NV_ray_tracing
    typedef struct VkAccelerationStructureInfoNV {
        VkStructureType                         sType;
        const void*                             pNext;
        VkAccelerationStructureTypeNV           type;
        VkBuildAccelerationStructureFlagsKHR    flags;
        uint32_t                                instanceCount;
        uint32_t                                geometryCount;
        const VkGeometryNV*                     pGeometries;
    } VkAccelerationStructureInfoNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `type` is a VkAccelerationStructureTypeNV value specifying the type of acceleration structure that will be created.

- `flags` is a bitmask of VkBuildAccelerationStructureFlagBitsNV specifying additional parameters of the acceleration structure.

- `instanceCount` specifies the number of instances that will be in the new acceleration structure.

- `geometryCount` specifies the number of geometries that will be in the new acceleration structure.

- `pGeometries` is a pointer to an array of `geometryCount` VkGeometryNV structures containing the scene data being passed into the acceleration structure.

`VkAccelerationStructureInfoNV` contains information that is used both for acceleration structure creation with vkCreateAccelerationStructureNV and in combination with the actual geometric data to build the acceleration structure with vkCmdBuildAccelerationStructureNV.

Valid Usage

- VUID-VkAccelerationStructureInfoNV-geometryCount-02422
  `geometryCount` must be less than or equal to VkPhysicalDeviceRayTracingPropertiesNV::`maxGeometryCount`

- VUID-VkAccelerationStructureInfoNV-instanceCount-02423
  `instanceCount` must be less than or equal to VkPhysicalDeviceRayTracingPropertiesNV::`maxInstanceCount`

- VUID-VkAccelerationStructureInfoNV-maxTriangleCount-02424
  The total number of triangles in all geometries must be less than or equal to VkPhysicalDeviceRayTracingPropertiesNV::`maxTriangleCount`

- VUID-VkAccelerationStructureInfoNV-type-02425
  If `type` is VK_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_NV then `geometryCount` must be `0`

- VUID-VkAccelerationStructureInfoNV-type-02426
  If `type` is VK_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_NV then `instanceCount` must be `0`

- VUID-VkAccelerationStructureInfoNV-type-02786
  If `type` is VK_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_NV then the `geometryType` member of each geometry in `pGeometries` must be the same

- VUID-VkAccelerationStructureInfoNV-type-04623
  `type` must not be VK_ACCELERATION_STRUCTURE_TYPE_GENERIC_KHR

- VUID-VkAccelerationStructureInfoNV-flags-02592
  If `flags` has the VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_NV bit set, then it must not have the VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_NV bit set

- VUID-VkAccelerationStructureInfoNV-scratch-02781
  `scratch` must have been created with the VK_BUFFER_USAGE_RAY_TRACING_BIT_NV usage flag set

- VUID-VkAccelerationStructureInfoNV-instanceData-02782
  If `instanceData` is not VK_NULL_HANDLE, `instanceData` must have been created with the VK_BUFFER_USAGE_RAY_TRACING_BIT_NV usage flag set

Valid Usage (Implicit)

- VUID-VkAccelerationStructureInfoNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_INFO_NV

- VUID-VkAccelerationStructureInfoNV-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkAccelerationStructureInfoNV-type-parameter
  `type` must be a valid VkAccelerationStructureTypeNV value

- VUID-VkAccelerationStructureInfoNV-flags-parameter
  `flags` must be a valid combination of VkBuildAccelerationStructureFlagBitsKHR values

- VUID-VkAccelerationStructureInfoNV-pGeometries-parameter
  If `geometryCount` is not `0`, `pGeometries` must be a valid pointer to an array of `geometryCount` valid VkGeometryNV structures

Values which can be set in VkAccelerationStructureCreateInfoKHR::`type` or VkAccelerationStructureInfoNV::`type` specifying the type of acceleration structure, are:

    // Provided by VK_KHR_acceleration_structure
    typedef enum VkAccelerationStructureTypeKHR {
        VK_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR = 0,
        VK_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR = 1,
        VK_ACCELERATION_STRUCTURE_TYPE_GENERIC_KHR = 2,
      // Provided by VK_KHR_opacity_micromap
        VK_ACCELERATION_STRUCTURE_TYPE_OPACITY_MICROMAP_KHR = 1000623000,
      // Provided by VK_NV_ray_tracing
        VK_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_NV = VK_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR,
      // Provided by VK_NV_ray_tracing
        VK_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_NV = VK_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR,
    } VkAccelerationStructureTypeKHR;

    // Provided by VK_NV_ray_tracing
    // Equivalent to VkAccelerationStructureTypeKHR
    typedef VkAccelerationStructureTypeKHR VkAccelerationStructureTypeNV;

- VK_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR is a top-level acceleration structure containing instance data referring to bottom-level acceleration structures.

- VK_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR is a bottom-level acceleration structure containing the AABBs or geometry to be intersected.

- VK_ACCELERATION_STRUCTURE_TYPE_GENERIC_KHR is an acceleration structure whose type is determined at build time used for special circumstances. In these cases, the acceleration structure type is not known at creation time, but must be specified at build time as micromap, top, or bottom.

- VK_ACCELERATION_STRUCTURE_TYPE_OPACITY_MICROMAP_KHR is a micromap containing opacity information, which can be referenced by geometry in bottom-level acceleration structures.

Bits which can be set in VkAccelerationStructureCreateInfoKHR::`createFlags`, specifying additional creation parameters for acceleration structures, are:

    // Provided by VK_KHR_acceleration_structure
    typedef enum VkAccelerationStructureCreateFlagBitsKHR {
        VK_ACCELERATION_STRUCTURE_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR = 0x00000001,
      // Provided by VK_EXT_descriptor_buffer
        VK_ACCELERATION_STRUCTURE_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT = 0x00000008,
      // Provided by VK_NV_ray_tracing_motion_blur
        VK_ACCELERATION_STRUCTURE_CREATE_MOTION_BIT_NV = 0x00000004,
    } VkAccelerationStructureCreateFlagBitsKHR;

- VK_ACCELERATION_STRUCTURE_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR specifies that the acceleration structure’s address can be saved and reused on a subsequent run.

- VK_ACCELERATION_STRUCTURE_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT specifies that the acceleration structure can be used with descriptor buffers when capturing and replaying (e.g. for trace capture and replay), see VkOpaqueCaptureDescriptorDataCreateInfoEXT for more detail.

- VK_ACCELERATION_STRUCTURE_CREATE_MOTION_BIT_NV specifies that the acceleration structure will be used with motion information, see VkAccelerationStructureMotionInfoNV for more detail.

    // Provided by VK_KHR_acceleration_structure
    typedef VkFlags VkAccelerationStructureCreateFlagsKHR;

`VkAccelerationStructureCreateFlagsKHR` is a bitmask type for setting a mask of zero or more VkAccelerationStructureCreateFlagBitsKHR.

Bits which can be set in VkAccelerationStructureBuildGeometryInfoKHR::`flags` or VkAccelerationStructureInfoNV::`flags` specifying additional parameters for acceleration structure builds, are:

    // Provided by VK_KHR_acceleration_structure
    typedef enum VkBuildAccelerationStructureFlagBitsKHR {
        VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR = 0x00000001,
        VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR = 0x00000002,
        VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_KHR = 0x00000004,
        VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_KHR = 0x00000008,
        VK_BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_KHR = 0x00000010,
      // Provided by VK_NV_ray_tracing_motion_blur
        VK_BUILD_ACCELERATION_STRUCTURE_MOTION_BIT_NV = 0x00000020,
      // Provided by VK_EXT_opacity_micromap
        VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_DATA_UPDATE_BIT_EXT = 0x00000100,
    #ifdef VK_ENABLE_BETA_EXTENSIONS
      // Provided by VK_NV_displacement_micromap
        VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DISPLACEMENT_MICROMAP_UPDATE_BIT_NV = 0x00000200,
    #endif
      // Provided by VK_KHR_ray_tracing_position_fetch
        VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DATA_ACCESS_BIT_KHR = 0x00000800,
      // Provided by VK_NV_cluster_acceleration_structure
        VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_CLUSTER_OPACITY_MICROMAPS_BIT_NV = 0x00001000,
      // Provided by VK_KHR_opacity_micromap
        VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_UPDATE_BIT_KHR = 0x00000040,
      // Provided by VK_KHR_opacity_micromap
        VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DISABLE_OPACITY_MICROMAPS_BIT_KHR = 0x00000080,
      // Provided by VK_KHR_opacity_micromap
        VK_BUILD_ACCELERATION_STRUCTURE_MICROMAP_LOSSY_BIT_KHR = 0x00000400,
      // Provided by VK_NV_ray_tracing
        VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_NV = VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR,
      // Provided by VK_NV_ray_tracing
        VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_NV = VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR,
      // Provided by VK_NV_ray_tracing
        VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_NV = VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_KHR,
      // Provided by VK_NV_ray_tracing
        VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_NV = VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_KHR,
      // Provided by VK_NV_ray_tracing
        VK_BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_NV = VK_BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_KHR,
      // Provided by VK_EXT_opacity_micromap
        VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_UPDATE_BIT_EXT = VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_UPDATE_BIT_KHR,
      // Provided by VK_EXT_opacity_micromap
      // VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_UPDATE_EXT is a legacy alias
        VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_UPDATE_EXT = VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_UPDATE_BIT_EXT,
      // Provided by VK_EXT_opacity_micromap
        VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DISABLE_OPACITY_MICROMAPS_BIT_EXT = VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DISABLE_OPACITY_MICROMAPS_BIT_KHR,
      // Provided by VK_EXT_opacity_micromap
      // VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DISABLE_OPACITY_MICROMAPS_EXT is a legacy alias
        VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DISABLE_OPACITY_MICROMAPS_EXT = VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DISABLE_OPACITY_MICROMAPS_BIT_EXT,
      // Provided by VK_EXT_opacity_micromap
      // VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_DATA_UPDATE_EXT is a legacy alias
        VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_DATA_UPDATE_EXT = VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_DATA_UPDATE_BIT_EXT,
    #ifdef VK_ENABLE_BETA_EXTENSIONS
      // Provided by VK_NV_displacement_micromap
      // VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DISPLACEMENT_MICROMAP_UPDATE_NV is a legacy alias
        VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DISPLACEMENT_MICROMAP_UPDATE_NV = VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DISPLACEMENT_MICROMAP_UPDATE_BIT_NV,
    #endif
      // Provided by VK_KHR_ray_tracing_position_fetch
      // VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DATA_ACCESS_KHR is a legacy alias
        VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DATA_ACCESS_KHR = VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DATA_ACCESS_BIT_KHR,
    } VkBuildAccelerationStructureFlagBitsKHR;

    // Provided by VK_NV_ray_tracing
    // Equivalent to VkBuildAccelerationStructureFlagBitsKHR
    typedef VkBuildAccelerationStructureFlagBitsKHR VkBuildAccelerationStructureFlagBitsNV;

- VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR specifies that the specified acceleration structure can be updated with a `mode` of VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR in VkAccelerationStructureBuildGeometryInfoKHR or an `update` of VK_TRUE in vkCmdBuildAccelerationStructureNV . For sphere and LSS primitives, only positions and radii may be updated, the provided index buffers and flags must remain unchanged from the initial build.

- VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR specifies that the specified acceleration structure can act as the source for a copy acceleration structure command with `mode` of VK_COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_KHR to produce a compacted acceleration structure.

- VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_KHR specifies that the given acceleration structure build should prioritize trace performance over build time.

- VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_KHR specifies that the given acceleration structure build should prioritize build time over trace performance.

- VK_BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_KHR specifies that this acceleration structure should minimize the size of the scratch memory and the final result acceleration structure, potentially at the expense of build time or trace performance.

- VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_UPDATE_BIT_KHR specifies that the opacity micromaps associated with the specified acceleration structure may change with an acceleration structure update.

- VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_DATA_UPDATE_BIT_EXT specifies that the data of the opacity micromaps associated with the specified acceleration structure may change with an acceleration structure update.

- VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DISABLE_OPACITY_MICROMAPS_BIT_KHR specifies that the specified acceleration structure may be referenced in an instance with VK_GEOMETRY_INSTANCE_DISABLE_OPACITY_MICROMAPS_BIT_KHR set.

- VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_CLUSTER_OPACITY_MICROMAPS_BIT_NV specifies that opacity micromaps may be associated with the given cluster acceleration structure.

- VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DATA_ACCESS_BIT_KHR specifies that the specified acceleration structure can be used when fetching the vertex and radius positions of a hit LSS or sphere primitive, or vertex positions of a hit triangle.

- VK_BUILD_ACCELERATION_STRUCTURE_MICROMAP_LOSSY_BIT_KHR specifies that micromaps can be compressed with a lossy encoding as described in Ray Opacity Micromap, which may support additional subdivision levels.

- VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DISPLACEMENT_MICROMAP_UPDATE_BIT_NV specifies that the displacement micromaps associated with the specified acceleration structure may change with an acceleration structure update.

Note | VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR and VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR may take more time and memory than a normal build, and so should only be used when those features are needed.

Note | VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR and VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR are allowed to be used together. In that case, the result of the compaction copy is used as the source of a build with `mode` of VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR to perform the compacted update.

    // Provided by VK_KHR_acceleration_structure
    typedef VkFlags VkBuildAccelerationStructureFlagsKHR;

    // Provided by VK_NV_ray_tracing
    // Equivalent to VkBuildAccelerationStructureFlagsKHR
    typedef VkBuildAccelerationStructureFlagsKHR VkBuildAccelerationStructureFlagsNV;

`VkBuildAccelerationStructureFlagsKHR` is a bitmask type for setting a mask of zero or more VkBuildAccelerationStructureFlagBitsKHR.

The `VkGeometryNV` structure describes geometry in a bottom-level acceleration structure and is defined as:

    // Provided by VK_NV_ray_tracing
    typedef struct VkGeometryNV {
        VkStructureType       sType;
        const void*           pNext;
        VkGeometryTypeKHR     geometryType;
        VkGeometryDataNV      geometry;
        VkGeometryFlagsKHR    flags;
    } VkGeometryNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `geometryType` specifies the VkGeometryTypeKHR which this geometry refers to.

- `geometry` contains the geometry data as described in VkGeometryDataNV.

- `flags` has VkGeometryFlagBitsKHR describing options for this geometry.

Valid Usage

- VUID-VkGeometryNV-geometryType-03503
  `geometryType` must be VK_GEOMETRY_TYPE_TRIANGLES_NV or VK_GEOMETRY_TYPE_AABBS_NV

Valid Usage (Implicit)

- VUID-VkGeometryNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_GEOMETRY_NV

- VUID-VkGeometryNV-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkGeometryNV-geometryType-parameter
  `geometryType` must be a valid VkGeometryTypeKHR value

- VUID-VkGeometryNV-geometry-parameter
  `geometry` must be a valid VkGeometryDataNV structure

- VUID-VkGeometryNV-flags-parameter
  `flags` must be a valid combination of VkGeometryFlagBitsKHR values

Geometry types are specified by VkGeometryTypeKHR, which takes values:

    // Provided by VK_KHR_acceleration_structure
    typedef enum VkGeometryTypeKHR {
        VK_GEOMETRY_TYPE_TRIANGLES_KHR = 0,
        VK_GEOMETRY_TYPE_AABBS_KHR = 1,
        VK_GEOMETRY_TYPE_INSTANCES_KHR = 2,
      // Provided by VK_NV_ray_tracing_linear_swept_spheres
        VK_GEOMETRY_TYPE_SPHERES_NV = 1000429004,
      // Provided by VK_NV_ray_tracing_linear_swept_spheres
        VK_GEOMETRY_TYPE_LINEAR_SWEPT_SPHERES_NV = 1000429005,
    #ifdef VK_ENABLE_BETA_EXTENSIONS
      // Provided by VK_AMDX_dense_geometry_format
        VK_GEOMETRY_TYPE_DENSE_GEOMETRY_FORMAT_TRIANGLES_AMDX = 1000478000,
    #endif
      // Provided by VK_KHR_opacity_micromap
        VK_GEOMETRY_TYPE_MICROMAP_KHR = 1000623000,
      // Provided by VK_NV_ray_tracing
        VK_GEOMETRY_TYPE_TRIANGLES_NV = VK_GEOMETRY_TYPE_TRIANGLES_KHR,
      // Provided by VK_NV_ray_tracing
        VK_GEOMETRY_TYPE_AABBS_NV = VK_GEOMETRY_TYPE_AABBS_KHR,
    } VkGeometryTypeKHR;

    // Provided by VK_NV_ray_tracing
    // Equivalent to VkGeometryTypeKHR
    typedef VkGeometryTypeKHR VkGeometryTypeNV;

- VK_GEOMETRY_TYPE_TRIANGLES_KHR specifies a geometry type consisting of triangles.

- VK_GEOMETRY_TYPE_AABBS_KHR specifies a geometry type consisting of axis-aligned bounding boxes.

- VK_GEOMETRY_TYPE_INSTANCES_KHR specifies a geometry type consisting of acceleration structure instances.

- VK_GEOMETRY_TYPE_DENSE_GEOMETRY_FORMAT_TRIANGLES_AMDX specifies a geometry type consisting of triangles from compressed data.

- VK_GEOMETRY_TYPE_SPHERES_NV specifies a geometry type consisting of spheres.

- VK_GEOMETRY_TYPE_LINEAR_SWEPT_SPHERES_NV specifies a geometry type consisting of linear swept spheres.

- VK_GEOMETRY_TYPE_MICROMAP_KHR specifies a geometry type consisting of a micromap array.

Bits specifying additional parameters for geometries in acceleration structure builds, are:

    // Provided by VK_KHR_acceleration_structure
    typedef enum VkGeometryFlagBitsKHR {
        VK_GEOMETRY_OPAQUE_BIT_KHR = 0x00000001,
        VK_GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_KHR = 0x00000002,
      // Provided by VK_NV_ray_tracing
        VK_GEOMETRY_OPAQUE_BIT_NV = VK_GEOMETRY_OPAQUE_BIT_KHR,
      // Provided by VK_NV_ray_tracing
        VK_GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_NV = VK_GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_KHR,
    } VkGeometryFlagBitsKHR;

    // Provided by VK_NV_ray_tracing
    // Equivalent to VkGeometryFlagBitsKHR
    typedef VkGeometryFlagBitsKHR VkGeometryFlagBitsNV;

- VK_GEOMETRY_OPAQUE_BIT_KHR specifies that this geometry does not invoke the any-hit shaders even if present in a hit group.

- VK_GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_KHR specifies that the implementation must only call the any-hit shader a single time for each primitive in this geometry. If this bit is absent an implementation may invoke the any-hit shader more than once for this geometry.

    // Provided by VK_KHR_acceleration_structure
    typedef VkFlags VkGeometryFlagsKHR;

    // Provided by VK_NV_ray_tracing
    // Equivalent to VkGeometryFlagsKHR
    typedef VkGeometryFlagsKHR VkGeometryFlagsNV;

`VkGeometryFlagsKHR` is a bitmask type for setting a mask of zero or more VkGeometryFlagBitsKHR.

The `VkGeometryDataNV` structure specifies geometry in a bottom-level acceleration structure and is defined as:

    // Provided by VK_NV_ray_tracing
    typedef struct VkGeometryDataNV {
        VkGeometryTrianglesNV    triangles;
        VkGeometryAABBNV         aabbs;
    } VkGeometryDataNV;

- `triangles` contains triangle data if VkGeometryNV::`geometryType` is VK_GEOMETRY_TYPE_TRIANGLES_NV.

- `aabbs` contains axis-aligned bounding box data if VkGeometryNV::`geometryType` is VK_GEOMETRY_TYPE_AABBS_NV.

Valid Usage (Implicit)

- VUID-VkGeometryDataNV-triangles-parameter
  `triangles` must be a valid VkGeometryTrianglesNV structure

- VUID-VkGeometryDataNV-aabbs-parameter
  `aabbs` must be a valid VkGeometryAABBNV structure

The `VkGeometryTrianglesNV` structure specifies triangle geometry in a bottom-level acceleration structure and is defined as:

    // Provided by VK_NV_ray_tracing
    typedef struct VkGeometryTrianglesNV {
        VkStructureType    sType;
        const void*        pNext;
        VkBuffer           vertexData;
        VkDeviceSize       vertexOffset;
        uint32_t           vertexCount;
        VkDeviceSize       vertexStride;
        VkFormat           vertexFormat;
        VkBuffer           indexData;
        VkDeviceSize       indexOffset;
        uint32_t           indexCount;
        VkIndexType        indexType;
        VkBuffer           transformData;
        VkDeviceSize       transformOffset;
    } VkGeometryTrianglesNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `vertexData` is the buffer containing vertex data for this geometry.

- `vertexOffset` is the offset in bytes within `vertexData` containing vertex data for this geometry.

- `vertexCount` is the number of valid vertices.

- `vertexStride` is the stride in bytes between each vertex.

- `vertexFormat` is a VkFormat describing the format of each vertex element.

- `indexData` is the buffer containing index data for this geometry.

- `indexOffset` is the offset in bytes within `indexData` containing index data for this geometry.

- `indexCount` is the number of indices to include in this geometry.

- `indexType` is a VkIndexType describing the format of each index.

- `transformData` is an optional buffer containing an VkTransformMatrixNV structure defining a transformation to be applied to this geometry.

- `transformOffset` is the offset in bytes in `transformData` of the transform information described above.

If `indexType` is VK_INDEX_TYPE_NONE_NV, then this structure describes a set of triangles determined by `vertexCount`. Otherwise, this structure describes a set of indexed triangles determined by `indexCount`.

Valid Usage

- VUID-VkGeometryTrianglesNV-vertexOffset-02428
  `vertexOffset` must be less than the size of `vertexData`

- VUID-VkGeometryTrianglesNV-vertexOffset-02429
  `vertexOffset` must be a multiple of the component size of `vertexFormat`

- VUID-VkGeometryTrianglesNV-vertexFormat-02430
  `vertexFormat` must be one of VK_FORMAT_R32G32B32_SFLOAT, VK_FORMAT_R32G32_SFLOAT, VK_FORMAT_R16G16B16_SFLOAT, VK_FORMAT_R16G16_SFLOAT, VK_FORMAT_R16G16_SNORM, or VK_FORMAT_R16G16B16_SNORM

- VUID-VkGeometryTrianglesNV-vertexStride-03818
  `vertexStride` must be less than or equal to 232-1

- VUID-VkGeometryTrianglesNV-indexOffset-02431
  `indexOffset` must be less than the size of `indexData`

- VUID-VkGeometryTrianglesNV-indexOffset-02432
  `indexOffset` must be a multiple of the element size of `indexType`

- VUID-VkGeometryTrianglesNV-indexType-02433
  `indexType` must be VK_INDEX_TYPE_UINT16, VK_INDEX_TYPE_UINT32, or VK_INDEX_TYPE_NONE_NV

- VUID-VkGeometryTrianglesNV-indexData-02434
  `indexData` must be VK_NULL_HANDLE if `indexType` is VK_INDEX_TYPE_NONE_NV

- VUID-VkGeometryTrianglesNV-indexData-02435
  `indexData` must be a valid `VkBuffer` handle if `indexType` is not VK_INDEX_TYPE_NONE_NV

- VUID-VkGeometryTrianglesNV-indexCount-02436
  `indexCount` must be `0` if `indexType` is VK_INDEX_TYPE_NONE_NV

- VUID-VkGeometryTrianglesNV-transformOffset-02437
  `transformOffset` must be less than the size of `transformData`

- VUID-VkGeometryTrianglesNV-transformOffset-02438
  `transformOffset` must be a multiple of `16`

Valid Usage (Implicit)

- VUID-VkGeometryTrianglesNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_GEOMETRY_TRIANGLES_NV

- VUID-VkGeometryTrianglesNV-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkGeometryTrianglesNV-vertexData-parameter
  If `vertexData` is not VK_NULL_HANDLE, `vertexData` must be a valid VkBuffer handle

- VUID-VkGeometryTrianglesNV-vertexFormat-parameter
  `vertexFormat` must be a valid VkFormat value

- VUID-VkGeometryTrianglesNV-indexData-parameter
  If `indexData` is not VK_NULL_HANDLE, `indexData` must be a valid VkBuffer handle

- VUID-VkGeometryTrianglesNV-indexType-parameter
  `indexType` must be a valid VkIndexType value

- VUID-VkGeometryTrianglesNV-transformData-parameter
  If `transformData` is not VK_NULL_HANDLE, `transformData` must be a valid VkBuffer handle

- VUID-VkGeometryTrianglesNV-commonparent
  Each of `indexData`, `transformData`, and `vertexData` that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevice

The `VkGeometryAABBNV` structure specifies axis-aligned bounding box geometry in a bottom-level acceleration structure, and is defined as:

    // Provided by VK_NV_ray_tracing
    typedef struct VkGeometryAABBNV {
        VkStructureType    sType;
        const void*        pNext;
        VkBuffer           aabbData;
        uint32_t           numAABBs;
        uint32_t           stride;
        VkDeviceSize       offset;
    } VkGeometryAABBNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `aabbData` is the buffer containing axis-aligned bounding box data.

- `numAABBs` is the number of AABBs in this geometry.

- `stride` is the stride in bytes between AABBs in `aabbData`.

- `offset` is the offset in bytes of the first AABB in `aabbData`.

The AABB data in memory is six 32-bit floats consisting of the minimum x, y, and z values followed by the maximum x, y, and z values.

Valid Usage

- VUID-VkGeometryAABBNV-offset-02439
  `offset` must be less than the size of `aabbData`

- VUID-VkGeometryAABBNV-offset-02440
  `offset` must be a multiple of `8`

- VUID-VkGeometryAABBNV-stride-02441
  `stride` must be a multiple of `8`

Valid Usage (Implicit)

- VUID-VkGeometryAABBNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_GEOMETRY_AABB_NV

- VUID-VkGeometryAABBNV-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkGeometryAABBNV-aabbData-parameter
  If `aabbData` is not VK_NULL_HANDLE, `aabbData` must be a valid VkBuffer handle

To destroy an acceleration structure, call:

    // Provided by VK_KHR_acceleration_structure
    void vkDestroyAccelerationStructureKHR(
        VkDevice                                    device,
        VkAccelerationStructureKHR                  accelerationStructure,
        const VkAllocationCallbacks*                pAllocator);

- `device` is the logical device that destroys the acceleration structure.

- `accelerationStructure` is the acceleration structure to destroy.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

Valid Usage

- VUID-vkDestroyAccelerationStructureKHR-accelerationStructure-08934
  The `VkPhysicalDeviceAccelerationStructureFeaturesKHR`::`accelerationStructure` feature must be enabled

- VUID-vkDestroyAccelerationStructureKHR-accelerationStructure-02442
  All submitted commands that refer to `accelerationStructure` must have completed execution

- VUID-vkDestroyAccelerationStructureKHR-accelerationStructure-02443
  If `VkAllocationCallbacks` were provided when `accelerationStructure` was created, a compatible set of callbacks must be provided here

- VUID-vkDestroyAccelerationStructureKHR-accelerationStructure-02444
  If no `VkAllocationCallbacks` were provided when `accelerationStructure` was created, `pAllocator` must be `NULL`

Valid Usage (Implicit)

- VUID-vkDestroyAccelerationStructureKHR-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkDestroyAccelerationStructureKHR-accelerationStructure-parameter
  If `accelerationStructure` is not VK_NULL_HANDLE, `accelerationStructure` must be a valid VkAccelerationStructureKHR handle

- VUID-vkDestroyAccelerationStructureKHR-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkDestroyAccelerationStructureKHR-accelerationStructure-parent
  If `accelerationStructure` is a valid handle, it must have been created, allocated, or retrieved from `device`

Host Synchronization

- Host access to `accelerationStructure` must be externally synchronized

To destroy an acceleration structure, call:

    // Provided by VK_NV_ray_tracing
    void vkDestroyAccelerationStructureNV(
        VkDevice                                    device,
        VkAccelerationStructureNV                   accelerationStructure,
        const VkAllocationCallbacks*                pAllocator);

- `device` is the logical device that destroys the buffer.

- `accelerationStructure` is the acceleration structure to destroy.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

Valid Usage

- VUID-vkDestroyAccelerationStructureNV-accelerationStructure-03752
  All submitted commands that refer to `accelerationStructure` must have completed execution

- VUID-vkDestroyAccelerationStructureNV-accelerationStructure-03753
  If `VkAllocationCallbacks` were provided when `accelerationStructure` was created, a compatible set of callbacks must be provided here

- VUID-vkDestroyAccelerationStructureNV-accelerationStructure-03754
  If no `VkAllocationCallbacks` were provided when `accelerationStructure` was created, `pAllocator` must be `NULL`

Valid Usage (Implicit)

- VUID-vkDestroyAccelerationStructureNV-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkDestroyAccelerationStructureNV-accelerationStructure-parameter
  If `accelerationStructure` is not VK_NULL_HANDLE, `accelerationStructure` must be a valid VkAccelerationStructureNV handle

- VUID-vkDestroyAccelerationStructureNV-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkDestroyAccelerationStructureNV-accelerationStructure-parent
  If `accelerationStructure` is a valid handle, it must have been created, allocated, or retrieved from `device`

Host Synchronization

- Host access to `accelerationStructure` must be externally synchronized

An acceleration structure has memory requirements for the structure object itself, scratch space for the build, and scratch space for the update.

Scratch space is allocated as a `VkBuffer`, so for VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_BUILD_SCRATCH_NV and VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_UPDATE_SCRATCH_NV the `pMemoryRequirements->alignment` and `pMemoryRequirements->memoryTypeBits` values returned by this call must be filled with zero, and should be ignored by the application.

To query the memory requirements, call:

    // Provided by VK_NV_ray_tracing
    void vkGetAccelerationStructureMemoryRequirementsNV(
        VkDevice                                    device,
        const VkAccelerationStructureMemoryRequirementsInfoNV* pInfo,
        VkMemoryRequirements2*                      pMemoryRequirements);

- `device` is the logical device on which the acceleration structure was created.

- `pInfo` is a pointer to a VkAccelerationStructureMemoryRequirementsInfoNV structure specifying the acceleration structure to get memory requirements for.

- `pMemoryRequirements` is a pointer to a VkMemoryRequirements2KHR structure in which the requested acceleration structure memory requirements are returned.

Valid Usage (Implicit)

- VUID-vkGetAccelerationStructureMemoryRequirementsNV-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetAccelerationStructureMemoryRequirementsNV-pInfo-parameter
  `pInfo` must be a valid pointer to a valid VkAccelerationStructureMemoryRequirementsInfoNV structure

- VUID-vkGetAccelerationStructureMemoryRequirementsNV-pMemoryRequirements-parameter
  `pMemoryRequirements` must be a valid pointer to a VkMemoryRequirements2 structure

The `VkAccelerationStructureMemoryRequirementsInfoNV` structure is defined as:

    // Provided by VK_NV_ray_tracing
    typedef struct VkAccelerationStructureMemoryRequirementsInfoNV {
        VkStructureType                                    sType;
        const void*                                        pNext;
        VkAccelerationStructureMemoryRequirementsTypeNV    type;
        VkAccelerationStructureNV                          accelerationStructure;
    } VkAccelerationStructureMemoryRequirementsInfoNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `type` selects the type of memory requirement being queried. VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_OBJECT_NV returns the memory requirements for the object itself. VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_BUILD_SCRATCH_NV returns the memory requirements for the scratch memory when doing a build. VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_UPDATE_SCRATCH_NV returns the memory requirements for the scratch memory when doing an update.

- `accelerationStructure` is the acceleration structure to be queried for memory requirements.

Valid Usage (Implicit)

- VUID-VkAccelerationStructureMemoryRequirementsInfoNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_INFO_NV

- VUID-VkAccelerationStructureMemoryRequirementsInfoNV-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkAccelerationStructureMemoryRequirementsInfoNV-type-parameter
  `type` must be a valid VkAccelerationStructureMemoryRequirementsTypeNV value

- VUID-VkAccelerationStructureMemoryRequirementsInfoNV-accelerationStructure-parameter
  `accelerationStructure` must be a valid VkAccelerationStructureNV handle

Possible values of `type` in `VkAccelerationStructureMemoryRequirementsInfoNV` are:,

    // Provided by VK_NV_ray_tracing
    typedef enum VkAccelerationStructureMemoryRequirementsTypeNV {
        VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_OBJECT_NV = 0,
        VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_BUILD_SCRATCH_NV = 1,
        VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_UPDATE_SCRATCH_NV = 2,
    } VkAccelerationStructureMemoryRequirementsTypeNV;

- VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_OBJECT_NV requests the memory requirement for the `VkAccelerationStructureNV` backing store.

- VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_BUILD_SCRATCH_NV requests the memory requirement for scratch space during the initial build.

- VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_UPDATE_SCRATCH_NV requests the memory requirement for scratch space during an update.

Possible values of `buildType` in vkGetAccelerationStructureBuildSizesKHR are:

    // Provided by VK_KHR_acceleration_structure
    typedef enum VkAccelerationStructureBuildTypeKHR {
        VK_ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_KHR = 0,
        VK_ACCELERATION_STRUCTURE_BUILD_TYPE_DEVICE_KHR = 1,
        VK_ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_OR_DEVICE_KHR = 2,
    } VkAccelerationStructureBuildTypeKHR;

- VK_ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_KHR requests the memory requirement for operations performed by the host.

- VK_ACCELERATION_STRUCTURE_BUILD_TYPE_DEVICE_KHR requests the memory requirement for operations performed by the device.

- VK_ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_OR_DEVICE_KHR requests the memory requirement for operations performed by either the host, or the device.

To attach memory to one or more acceleration structures at a time, call:

    // Provided by VK_NV_ray_tracing
    VkResult vkBindAccelerationStructureMemoryNV(
        VkDevice                                    device,
        uint32_t                                    bindInfoCount,
        const VkBindAccelerationStructureMemoryInfoNV* pBindInfos);

- `device` is the logical device that owns the acceleration structures and memory.

- `bindInfoCount` is the number of elements in `pBindInfos`.

- `pBindInfos` is a pointer to an array of VkBindAccelerationStructureMemoryInfoNV structures describing acceleration structures and memory to bind.

Valid Usage (Implicit)

- VUID-vkBindAccelerationStructureMemoryNV-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkBindAccelerationStructureMemoryNV-pBindInfos-parameter
  `pBindInfos` must be a valid pointer to an array of `bindInfoCount` valid VkBindAccelerationStructureMemoryInfoNV structures

- VUID-vkBindAccelerationStructureMemoryNV-bindInfoCount-arraylength
  `bindInfoCount` must be greater than `0`

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkBindAccelerationStructureMemoryInfoNV` structure is defined as:

    // Provided by VK_NV_ray_tracing
    typedef struct VkBindAccelerationStructureMemoryInfoNV {
        VkStructureType              sType;
        const void*                  pNext;
        VkAccelerationStructureNV    accelerationStructure;
        VkDeviceMemory               memory;
        VkDeviceSize                 memoryOffset;
        uint32_t                     deviceIndexCount;
        const uint32_t*              pDeviceIndices;
    } VkBindAccelerationStructureMemoryInfoNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `accelerationStructure` is the acceleration structure to be attached to memory.

- `memory` is a `VkDeviceMemory` object describing the device memory to attach.

- `memoryOffset` is the start offset of the region of memory that is to be bound to the acceleration structure. The number of bytes returned in the VkMemoryRequirements::`size` member in `memory`, starting from `memoryOffset` bytes, will be bound to the specified acceleration structure.

- `deviceIndexCount` is the number of elements in `pDeviceIndices`.

- `pDeviceIndices` is a pointer to an array of device indices.

Valid Usage

- VUID-VkBindAccelerationStructureMemoryInfoNV-accelerationStructure-03620
  `accelerationStructure` must not already be backed by a memory object

- VUID-VkBindAccelerationStructureMemoryInfoNV-memoryOffset-03621
  `memoryOffset` must be less than the size of `memory`

- VUID-VkBindAccelerationStructureMemoryInfoNV-memory-03622
  `memory` must have been allocated using one of the memory types allowed in the `memoryTypeBits` member of the VkMemoryRequirements structure returned from a call to vkGetAccelerationStructureMemoryRequirementsNV with `accelerationStructure` and `type` of VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_OBJECT_NV

- VUID-VkBindAccelerationStructureMemoryInfoNV-memoryOffset-03623
  `memoryOffset` must be an integer multiple of the `alignment` member of the VkMemoryRequirements structure returned from a call to vkGetAccelerationStructureMemoryRequirementsNV with `accelerationStructure` and `type` of VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_OBJECT_NV

- VUID-VkBindAccelerationStructureMemoryInfoNV-size-03624
  The `size` member of the `VkMemoryRequirements` structure returned from a call to vkGetAccelerationStructureMemoryRequirementsNV with `accelerationStructure` and `type` of VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_OBJECT_NV must be less than or equal to the size of `memory` minus `memoryOffset`

Valid Usage (Implicit)

- VUID-VkBindAccelerationStructureMemoryInfoNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_BIND_ACCELERATION_STRUCTURE_MEMORY_INFO_NV

- VUID-VkBindAccelerationStructureMemoryInfoNV-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkBindAccelerationStructureMemoryInfoNV-accelerationStructure-parameter
  `accelerationStructure` must be a valid VkAccelerationStructureNV handle

- VUID-VkBindAccelerationStructureMemoryInfoNV-memory-parameter
  `memory` must be a valid VkDeviceMemory handle

- VUID-VkBindAccelerationStructureMemoryInfoNV-pDeviceIndices-parameter
  If `deviceIndexCount` is not `0`, `pDeviceIndices` must be a valid pointer to an array of `deviceIndexCount` `uint32_t` values

- VUID-VkBindAccelerationStructureMemoryInfoNV-commonparent
  Both of `accelerationStructure`, and `memory` must have been created, allocated, or retrieved from the same VkDevice

To allow constructing geometry instances with device code if desired, we need to be able to query an opaque handle for an acceleration structure. This handle is a value of 8 bytes. To get this handle, call:

    // Provided by VK_NV_ray_tracing
    VkResult vkGetAccelerationStructureHandleNV(
        VkDevice                                    device,
        VkAccelerationStructureNV                   accelerationStructure,
        size_t                                      dataSize,
        void*                                       pData);

- `device` is the logical device that owns the acceleration structures.

- `accelerationStructure` is the acceleration structure.

- `dataSize` is the size in bytes of the buffer pointed to by `pData`.

- `pData` is a pointer to an application-allocated buffer where the results will be written.

Valid Usage

- VUID-vkGetAccelerationStructureHandleNV-dataSize-02240
  `dataSize` must be large enough to contain the result of the query, as described above

- VUID-vkGetAccelerationStructureHandleNV-accelerationStructure-02787
  `accelerationStructure` must be bound completely and contiguously to a single `VkDeviceMemory` object via vkBindAccelerationStructureMemoryNV

Valid Usage (Implicit)

- VUID-vkGetAccelerationStructureHandleNV-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetAccelerationStructureHandleNV-accelerationStructure-parameter
  `accelerationStructure` must be a valid VkAccelerationStructureNV handle

- VUID-vkGetAccelerationStructureHandleNV-pData-parameter
  `pData` must be a valid pointer to an array of `dataSize` bytes

- VUID-vkGetAccelerationStructureHandleNV-dataSize-arraylength
  `dataSize` must be greater than `0`

- VUID-vkGetAccelerationStructureHandleNV-accelerationStructure-parent
  `accelerationStructure` must have been created, allocated, or retrieved from `device`

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

To query the 64-bit device address for an acceleration structure, call:

    // Provided by VK_KHR_acceleration_structure
    VkDeviceAddress vkGetAccelerationStructureDeviceAddressKHR(
        VkDevice                                    device,
        const VkAccelerationStructureDeviceAddressInfoKHR* pInfo);

- `device` is the logical device that the acceleration structure was created on.

- `pInfo` is a pointer to a VkAccelerationStructureDeviceAddressInfoKHR structure specifying the acceleration structure to retrieve an address for.

The 64-bit return value is an address of the acceleration structure, which can be used for device and shader operations that involve acceleration structures, such as ray traversal and acceleration structure building.

If the acceleration structure was created with vkCreateAccelerationStructure2KHR, the return value will be the same address as `addressRange.address`.

If the acceleration structure was created with vkCreateAccelerationStructureKHR with a non-zero value of VkAccelerationStructureCreateInfoKHR::`deviceAddress`, the return value will be the same address.

Otherwise, if the acceleration structure was created with a `type` of VK_ACCELERATION_STRUCTURE_TYPE_GENERIC_KHR, the returned address must be consistent with the relative offset to other acceleration structures with `type` VK_ACCELERATION_STRUCTURE_TYPE_GENERIC_KHR allocated with the same VkBuffer. That is, the difference in returned addresses between the two must be the same as the difference in offsets provided at acceleration structure creation.

The returned address must be aligned to 256 bytes.

Note | For acceleration structures created with vkCreateAccelerationStructureKHR, their device address may be different from the buffer device address corresponding to the acceleration structure’s start offset in its storage buffer for acceleration structure types other than VK_ACCELERATION_STRUCTURE_TYPE_GENERIC_KHR.

Valid Usage

- VUID-vkGetAccelerationStructureDeviceAddressKHR-accelerationStructure-08935
  The `VkPhysicalDeviceAccelerationStructureFeaturesKHR`::`accelerationStructure` feature must be enabled

- VUID-vkGetAccelerationStructureDeviceAddressKHR-device-03504
  If `device` was created with multiple physical devices, then the `bufferDeviceAddressMultiDevice` feature must be enabled

- VUID-vkGetAccelerationStructureDeviceAddressKHR-pInfo-09541
  If the buffer on which `pInfo->accelerationStructure` was placed is non-sparse then it must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-vkGetAccelerationStructureDeviceAddressKHR-pInfo-09542
  The buffer on which `pInfo->accelerationStructure` was placed must have been created with the VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT usage flag set

Valid Usage (Implicit)

- VUID-vkGetAccelerationStructureDeviceAddressKHR-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetAccelerationStructureDeviceAddressKHR-pInfo-parameter
  `pInfo` must be a valid pointer to a valid VkAccelerationStructureDeviceAddressInfoKHR structure

The `VkAccelerationStructureDeviceAddressInfoKHR` structure is defined as:

    // Provided by VK_KHR_acceleration_structure
    typedef struct VkAccelerationStructureDeviceAddressInfoKHR {
        VkStructureType               sType;
        const void*                   pNext;
        VkAccelerationStructureKHR    accelerationStructure;
    } VkAccelerationStructureDeviceAddressInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `accelerationStructure` specifies the acceleration structure whose address is being queried.

Valid Usage (Implicit)

- VUID-VkAccelerationStructureDeviceAddressInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_DEVICE_ADDRESS_INFO_KHR

- VUID-VkAccelerationStructureDeviceAddressInfoKHR-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkAccelerationStructureDeviceAddressInfoKHR-accelerationStructure-parameter
  `accelerationStructure` must be a valid VkAccelerationStructureKHR handle

### 12.8. Micromaps

Micromaps are opaque data structures that are built by the implementation to encode sub-triangle data to be included in an acceleration structure.

Micromaps are represented by VkAccelerationStructureKHR handles for use with `VK_KHR_opacity_micromap` commands.

Micromaps are represented by `VkMicromapEXT` handles for use with `VK_EXT_opacity_micromap` commands:

    // Provided by VK_EXT_opacity_micromap
    VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkMicromapEXT)

To create a micromap, call:

    // Provided by VK_EXT_opacity_micromap
    VkResult vkCreateMicromapEXT(
        VkDevice                                    device,
        const VkMicromapCreateInfoEXT*              pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkMicromapEXT*                              pMicromap);

- `device` is the logical device that creates the micromap structure object.

- `pCreateInfo` is a pointer to a VkMicromapCreateInfoEXT structure containing parameters affecting creation of the micromap.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

- `pMicromap` is a pointer to a VkMicromapEXT handle in which the resulting micromap object is returned.

Similar to other objects in Vulkan, the micromap creation merely creates an object with a specific “shape”. The type and quantity of geometry that can be built into a micromap is determined by the parameters of VkMicromapCreateInfoEXT.

The micromap data is stored in the object referred to by `VkMicromapCreateInfoEXT`::`buffer`. Once memory has been bound to that buffer, it must be populated by micromap build or micromap copy commands such as vkCmdBuildMicromapsEXT, vkBuildMicromapsEXT, vkCmdCopyMicromapEXT, and vkCopyMicromapEXT.

Note | The expected usage for a trace capture/replay tool is that it will serialize and later deserialize the micromap data using micromap copy commands. During capture the tool will set VkCopyMicromapToMemoryInfoEXT::`mode` to VK_COPY_MICROMAP_MODE_SERIALIZE_EXT, and during replay the tool will set VkCopyMemoryToMicromapInfoEXT::`mode` to VK_COPY_MICROMAP_MODE_DESERIALIZE_EXT.

Valid Usage

- VUID-vkCreateMicromapEXT-micromap-11615
  The `VkPhysicalDeviceOpacityMicromapFeaturesEXT`::`micromap` feature must be enabled

Valid Usage (Implicit)

- VUID-vkCreateMicromapEXT-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkCreateMicromapEXT-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkMicromapCreateInfoEXT structure

- VUID-vkCreateMicromapEXT-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateMicromapEXT-pMicromap-parameter
  `pMicromap` must be a valid pointer to a VkMicromapEXT handle

- VUID-vkCreateMicromapEXT-device-queuecount
  The device must have been created with at least `1` queue

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkMicromapCreateInfoEXT` structure is defined as:

    // Provided by VK_EXT_opacity_micromap
    typedef struct VkMicromapCreateInfoEXT {
        VkStructureType             sType;
        const void*                 pNext;
        VkMicromapCreateFlagsEXT    createFlags;
        VkBuffer                    buffer;
        VkDeviceSize                offset;
        VkDeviceSize                size;
        VkMicromapTypeEXT           type;
        VkDeviceAddress             deviceAddress;
    } VkMicromapCreateInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `createFlags` is a bitmask of VkMicromapCreateFlagBitsEXT specifying additional creation parameters of the micromap.

- `buffer` is the buffer on which the micromap will be stored.

- `offset` is an offset in bytes from the base address of the buffer at which the micromap will be stored, and must be a multiple of `256`.

- `size` is the size required for the micromap.

- `type` is a VkMicromapTypeEXT value specifying the type of micromap that will be created.

- `deviceAddress` is the device address requested for the micromap if the `VkPhysicalDeviceOpacityMicromapFeaturesEXT`::`micromapCaptureReplay` feature is being used.

If `deviceAddress` is zero, no specific address is requested.

If `deviceAddress` is not zero, `deviceAddress` must be an address retrieved from an identically created micromap on the same implementation. The micromap must also be placed on an identically created `buffer` and at the same `offset`.

Applications should avoid creating micromaps with application-provided addresses and implementation-provided addresses in the same process, to reduce the likelihood of VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR errors.

Note | The expected usage for this is that a trace capture/replay tool will add the VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT flag and VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT to all buffers used as storage for a micromap with VK_MICROMAP_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_EXT included in `createFlags`. This also means that the tool will need to add VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT to memory allocations to allow the VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT flag to be set where the application may not have otherwise required it. During capture the tool will save the queried opaque device addresses in the trace. During replay, the buffers will be created specifying the original address so any address values stored in the trace data will remain valid. Implementations are expected to separate such buffers in the GPU address space so normal allocations will avoid using these addresses. Applications and tools should avoid mixing application-provided and implementation-provided addresses for buffers created with VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT, to avoid address space allocation conflicts.

If the micromap will be the target of a build operation, the required size for a micromap can be queried with vkGetMicromapBuildSizesEXT.

Valid Usage

- VUID-VkMicromapCreateInfoEXT-deviceAddress-07433
  If `deviceAddress` is not zero, `createFlags` must include VK_MICROMAP_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_EXT

- VUID-VkMicromapCreateInfoEXT-micromapCaptureReplay-11616
  If `createFlags` includes VK_MICROMAP_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_EXT, `VkPhysicalDeviceOpacityMicromapFeaturesEXT`::`micromapCaptureReplay` must be VK_TRUE

- VUID-VkMicromapCreateInfoEXT-bufferDeviceAddressMultiDevice-11617
  If `createFlags` includes VK_MICROMAP_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_EXT and `device` was created with multiple physical devices, the `bufferDeviceAddressMultiDevice` feature must be enabled

- VUID-VkMicromapCreateInfoEXT-buffer-07435
  `buffer` must have been created with the VK_BUFFER_USAGE_MICROMAP_STORAGE_BIT_EXT usage flag set

- VUID-VkMicromapCreateInfoEXT-buffer-07436
  `buffer` must not have been created with VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT

- VUID-VkMicromapCreateInfoEXT-offset-07437
  The sum of `offset` and `size` must be less than or equal to the size of `buffer`

- VUID-VkMicromapCreateInfoEXT-offset-07438
  `offset` must be a multiple of `256` bytes

Valid Usage (Implicit)

- VUID-VkMicromapCreateInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_MICROMAP_CREATE_INFO_EXT

- VUID-VkMicromapCreateInfoEXT-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkMicromapCreateInfoEXT-createFlags-parameter
  `createFlags` must be a valid combination of VkMicromapCreateFlagBitsEXT values

- VUID-VkMicromapCreateInfoEXT-buffer-parameter
  `buffer` must be a valid VkBuffer handle

- VUID-VkMicromapCreateInfoEXT-type-parameter
  `type` must be a valid VkMicromapTypeEXT value

- VUID-VkMicromapCreateInfoEXT-deviceAddress-parameter
  If `deviceAddress` is not `0`, `deviceAddress` must be a valid VkDeviceAddress value

To get the build sizes for a micromap, call:

    // Provided by VK_EXT_opacity_micromap
    void vkGetMicromapBuildSizesEXT(
        VkDevice                                    device,
        VkAccelerationStructureBuildTypeKHR         buildType,
        const VkMicromapBuildInfoEXT*               pBuildInfo,
        VkMicromapBuildSizesInfoEXT*                pSizeInfo);

- `device` is the logical device that will be used for creating the micromap.

- `buildType` defines whether host or device operations (or both) are being queried for.

- `pBuildInfo` is a pointer to a VkMicromapBuildInfoEXT structure describing parameters of a build operation.

- `pSizeInfo` is a pointer to a VkMicromapBuildSizesInfoEXT structure which returns the size required for a micromap and the sizes required for the scratch buffers, given the build parameters. The size requirements for a scratch buffer may be zero.

The `dstMicromap`, `mode`, `data`, `scratchData`, and `triangleArray` members of `pBuildInfo` are ignored by this command.

A micromap created with the `micromapSize` returned by this command supports any build with a VkMicromapBuildInfoEXT structure subject to the following properties:

- The build command is a host build command, and `buildType` is VK_ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_KHR or VK_ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_OR_DEVICE_KHR

- The build command is a device build command, and `buildType` is VK_ACCELERATION_STRUCTURE_BUILD_TYPE_DEVICE_KHR or VK_ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_OR_DEVICE_KHR

- For VkMicromapBuildInfoEXT:

  - Its `type`, and `flags` members are equal to `pBuildInfo->type` and `pBuildInfo->flags`, respectively.

  - The sum of usage information in either `pUsageCounts` or `ppUsageCounts` is equal to the sum of usage information in either `pBuildInfo->pUsageCounts` or `pBuildInfo->ppUsageCounts`.

Similarly, the `buildScratchSize` value will support any build command specifying the VK_BUILD_MICROMAP_MODE_BUILD_EXT `mode` under the above conditions.

Valid Usage

- VUID-vkGetMicromapBuildSizesEXT-micromap-11618
  The `VkPhysicalDeviceOpacityMicromapFeaturesEXT`::`micromap` feature must be enabled

- VUID-vkGetMicromapBuildSizesEXT-device-07440
  If `device` was created with multiple physical devices, the `bufferDeviceAddressMultiDevice` feature must be enabled

Valid Usage (Implicit)

- VUID-vkGetMicromapBuildSizesEXT-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetMicromapBuildSizesEXT-buildType-parameter
  `buildType` must be a valid VkAccelerationStructureBuildTypeKHR value

- VUID-vkGetMicromapBuildSizesEXT-pBuildInfo-parameter
  `pBuildInfo` must be a valid pointer to a valid VkMicromapBuildInfoEXT structure

- VUID-vkGetMicromapBuildSizesEXT-pSizeInfo-parameter
  `pSizeInfo` must be a valid pointer to a VkMicromapBuildSizesInfoEXT structure

The `VkMicromapBuildSizesInfoEXT` structure describes the required build sizes for a micromap and scratch buffers and is defined as:

    // Provided by VK_EXT_opacity_micromap
    typedef struct VkMicromapBuildSizesInfoEXT {
        VkStructureType    sType;
        const void*        pNext;
        VkDeviceSize       micromapSize;
        VkDeviceSize       buildScratchSize;
        VkBool32           discardable;
    } VkMicromapBuildSizesInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `micromapSize` is the size in bytes required in a VkMicromapEXT for a build or update operation.

- `buildScratchSize` is the size in bytes required in a scratch buffer for a build operation.

- `discardable` indicates whether or not the micromap object may be destroyed after an acceleration structure build or update. A false value means that acceleration structures built with this micromap may contain references to the data contained therein, and the application must not destroy the micromap until ray traversal has concluded. A true value means that the information in the micromap will be copied by value into the acceleration structure, and the micromap can be destroyed after the acceleration structure build concludes.

Valid Usage (Implicit)

- VUID-VkMicromapBuildSizesInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_MICROMAP_BUILD_SIZES_INFO_EXT

- VUID-VkMicromapBuildSizesInfoEXT-pNext-pNext
  `pNext` must be `NULL`

Values which can be set in VkMicromapCreateInfoEXT::`type` specifying the type of micromap, are:

    // Provided by VK_EXT_opacity_micromap
    typedef enum VkMicromapTypeEXT {
        VK_MICROMAP_TYPE_OPACITY_MICROMAP_EXT = 0,
    #ifdef VK_ENABLE_BETA_EXTENSIONS
      // Provided by VK_NV_displacement_micromap
        VK_MICROMAP_TYPE_DISPLACEMENT_MICROMAP_NV = 1000397000,
    #endif
    } VkMicromapTypeEXT;

- VK_MICROMAP_TYPE_OPACITY_MICROMAP_EXT is a micromap containing data to control the opacity of a triangle.

- VK_MICROMAP_TYPE_DISPLACEMENT_MICROMAP_NV is a micromap containing data to control the displacement of subtriangles within a triangle.

Bits which can be set in VkMicromapCreateInfoEXT::`createFlags`, specifying additional creation parameters for micromaps, are:

    // Provided by VK_EXT_opacity_micromap
    typedef enum VkMicromapCreateFlagBitsEXT {
        VK_MICROMAP_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_EXT = 0x00000001,
    } VkMicromapCreateFlagBitsEXT;

- VK_MICROMAP_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_EXT specifies that the micromap’s address can be saved and reused on a subsequent run.

    // Provided by VK_EXT_opacity_micromap
    typedef VkFlags VkMicromapCreateFlagsEXT;

`VkMicromapCreateFlagsEXT` is a bitmask type for setting a mask of zero or more VkMicromapCreateFlagBitsEXT.

To destroy a micromap, call:

    // Provided by VK_EXT_opacity_micromap
    void vkDestroyMicromapEXT(
        VkDevice                                    device,
        VkMicromapEXT                               micromap,
        const VkAllocationCallbacks*                pAllocator);

- `device` is the logical device that destroys the micromap.

- `micromap` is the micromap to destroy.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

Valid Usage

- VUID-vkDestroyMicromapEXT-micromap-11619
  The `VkPhysicalDeviceOpacityMicromapFeaturesEXT`::`micromap` feature must be enabled

- VUID-vkDestroyMicromapEXT-micromap-07441
  All submitted commands that refer to `micromap` must have completed execution

- VUID-vkDestroyMicromapEXT-micromap-07442
  If `VkAllocationCallbacks` were provided when `micromap` was created, a compatible set of callbacks must be provided here

- VUID-vkDestroyMicromapEXT-micromap-07443
  If no `VkAllocationCallbacks` were provided when `micromap` was created, `pAllocator` must be `NULL`

Valid Usage (Implicit)

- VUID-vkDestroyMicromapEXT-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkDestroyMicromapEXT-micromap-parameter
  If `micromap` is not VK_NULL_HANDLE, `micromap` must be a valid VkMicromapEXT handle

- VUID-vkDestroyMicromapEXT-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkDestroyMicromapEXT-micromap-parent
  If `micromap` is a valid handle, it must have been created, allocated, or retrieved from `device`

Host Synchronization

- Host access to `micromap` must be externally synchronized

### 12.9. Resource Memory Association

Resources are initially created as virtual allocations with no backing memory. Device memory is allocated separately (see Device Memory) and then associated with the resource. This association is done differently for sparse and non-sparse resources.

Resources created with any of the sparse creation flags are considered sparse resources. Resources created without these flags are non-sparse. The details on resource memory association for sparse resources is described in Sparse Resources.

Non-sparse resources must be bound completely and contiguously to a single `VkDeviceMemory` object before the resource is passed as a parameter to any of the following operations:

- creating buffer, image, or tensor views

- updating descriptor sets

- recording commands in a command buffer

Once bound, the memory binding is immutable for the lifetime of the resource.

In a logical device representing more than one physical device, buffer and image resources exist on all physical devices but can be bound to memory differently on each. Each such replicated resource is an instance of the resource. For sparse resources, each instance can be bound to memory arbitrarily differently. For non-sparse resources, each instance can either be bound to the local or a peer instance of the memory, or for images can be bound to rectangular regions from the local and/or peer instances. When a resource is used in a descriptor set, each physical device interprets the descriptor according to its own instance’s binding to memory.

Note | There are no new copy commands to transfer data between physical devices. Instead, an application can create a resource with a peer mapping and use it as the source or destination of a transfer command executed by a single physical device to copy the data from one physical device to another.

To determine the memory requirements for a buffer resource, call:

    // Provided by VK_VERSION_1_0
    void vkGetBufferMemoryRequirements(
        VkDevice                                    device,
        VkBuffer                                    buffer,
        VkMemoryRequirements*                       pMemoryRequirements);

- `device` is the logical device that owns the buffer.

- `buffer` is the buffer to query.

- `pMemoryRequirements` is a pointer to a VkMemoryRequirements structure in which the memory requirements of the buffer object are returned.

Valid Usage (Implicit)

- VUID-vkGetBufferMemoryRequirements-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetBufferMemoryRequirements-buffer-parameter
  `buffer` must be a valid VkBuffer handle

- VUID-vkGetBufferMemoryRequirements-pMemoryRequirements-parameter
  `pMemoryRequirements` must be a valid pointer to a VkMemoryRequirements structure

- VUID-vkGetBufferMemoryRequirements-buffer-parent
  `buffer` must have been created, allocated, or retrieved from `device`

To determine the memory requirements for an image resource which is not created with the VK_IMAGE_CREATE_DISJOINT_BIT flag set, call:

    // Provided by VK_VERSION_1_0
    void vkGetImageMemoryRequirements(
        VkDevice                                    device,
        VkImage                                     image,
        VkMemoryRequirements*                       pMemoryRequirements);

- `device` is the logical device that owns the image.

- `image` is the image to query.

- `pMemoryRequirements` is a pointer to a VkMemoryRequirements structure in which the memory requirements of the image object are returned.

Valid Usage

- VUID-vkGetImageMemoryRequirements-image-01588
  `image` must not have been created with the VK_IMAGE_CREATE_DISJOINT_BIT flag set

- VUID-vkGetImageMemoryRequirements-image-04004
  If `image` was created with the VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID external memory handle type, then `image` must be bound to memory

- VUID-vkGetImageMemoryRequirements-image-08960
  If `image` was created with the VK_EXTERNAL_MEMORY_HANDLE_TYPE_SCREEN_BUFFER_BIT_QNX external memory handle type, then `image` must be bound to memory

Valid Usage (Implicit)

- VUID-vkGetImageMemoryRequirements-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetImageMemoryRequirements-image-parameter
  `image` must be a valid VkImage handle

- VUID-vkGetImageMemoryRequirements-pMemoryRequirements-parameter
  `pMemoryRequirements` must be a valid pointer to a VkMemoryRequirements structure

- VUID-vkGetImageMemoryRequirements-image-parent
  `image` must have been created, allocated, or retrieved from `device`

To determine the memory requirements for a tensor resource, call:

    // Provided by VK_ARM_tensors
    void vkGetTensorMemoryRequirementsARM(
        VkDevice                                    device,
        const VkTensorMemoryRequirementsInfoARM*    pInfo,
        VkMemoryRequirements2*                      pMemoryRequirements);

- `device` is the logical device that owns the tensor.

- `pInfo` is a pointer to a VkTensorMemoryRequirementsInfoARM structure containing parameters required for the memory requirements query.

- `pMemoryRequirements` is a pointer to a VkMemoryRequirements2 structure in which the memory requirements of the tensor object are returned.

Valid Usage (Implicit)

- VUID-vkGetTensorMemoryRequirementsARM-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetTensorMemoryRequirementsARM-pInfo-parameter
  `pInfo` must be a valid pointer to a valid VkTensorMemoryRequirementsInfoARM structure

- VUID-vkGetTensorMemoryRequirementsARM-pMemoryRequirements-parameter
  `pMemoryRequirements` must be a valid pointer to a VkMemoryRequirements2 structure

The `VkTensorMemoryRequirementsInfoARM` structure is defined as:

    // Provided by VK_ARM_tensors
    typedef struct VkTensorMemoryRequirementsInfoARM {
        VkStructureType    sType;
        const void*        pNext;
        VkTensorARM        tensor;
    } VkTensorMemoryRequirementsInfoARM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `tensor` is the tensor to query.

Valid Usage (Implicit)

- VUID-VkTensorMemoryRequirementsInfoARM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_TENSOR_MEMORY_REQUIREMENTS_INFO_ARM

- VUID-VkTensorMemoryRequirementsInfoARM-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkTensorMemoryRequirementsInfoARM-tensor-parameter
  `tensor` must be a valid VkTensorARM handle

To determine the memory requirements for a tensor resource without creating an object, call:

    // Provided by VK_ARM_tensors
    void vkGetDeviceTensorMemoryRequirementsARM(
        VkDevice                                    device,
        const VkDeviceTensorMemoryRequirementsARM*  pInfo,
        VkMemoryRequirements2*                      pMemoryRequirements);

- `device` is the logical device intended to own the tensor.

- `pInfo` is a pointer to a VkDeviceTensorMemoryRequirementsARM structure containing parameters required for the memory requirements query.

- `pMemoryRequirements` is a pointer to a VkMemoryRequirements2 structure in which the memory requirements of the tensor object are returned.

Valid Usage

- VUID-vkGetDeviceTensorMemoryRequirementsARM-tensors-09831
  The `tensors` feature must be enabled

Valid Usage (Implicit)

- VUID-vkGetDeviceTensorMemoryRequirementsARM-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetDeviceTensorMemoryRequirementsARM-pInfo-parameter
  `pInfo` must be a valid pointer to a valid VkDeviceTensorMemoryRequirementsARM structure

- VUID-vkGetDeviceTensorMemoryRequirementsARM-pMemoryRequirements-parameter
  `pMemoryRequirements` must be a valid pointer to a VkMemoryRequirements2 structure

The `VkDeviceTensorMemoryRequirementsARM` structure is defined as:

    // Provided by VK_ARM_tensors
    typedef struct VkDeviceTensorMemoryRequirementsARM {
        VkStructureType                 sType;
        const void*                     pNext;
        const VkTensorCreateInfoARM*    pCreateInfo;
    } VkDeviceTensorMemoryRequirementsARM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `pCreateInfo` is a pointer to a VkTensorCreateInfoARM structure containing parameters affecting the creation of the tensor to query.

Valid Usage (Implicit)

- VUID-VkDeviceTensorMemoryRequirementsARM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DEVICE_TENSOR_MEMORY_REQUIREMENTS_ARM

- VUID-VkDeviceTensorMemoryRequirementsARM-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkDeviceTensorMemoryRequirementsARM-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkTensorCreateInfoARM structure

The `VkMemoryRequirements` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkMemoryRequirements {
        VkDeviceSize    size;
        VkDeviceSize    alignment;
        uint32_t        memoryTypeBits;
    } VkMemoryRequirements;

- `size` is the size, in bytes, of the memory allocation required for the resource.

- `alignment` is the alignment, in bytes, of the offset within the allocation required for the resource.

- `memoryTypeBits` is a bitmask and contains one bit set for every supported memory type for the resource. Bit `i` is set if and only if the memory type `i` in the `VkPhysicalDeviceMemoryProperties` structure for the physical device is supported for the resource.

The precise size of images that will be bound to external Android hardware buffer memory is unknown until the memory has been imported or allocated, so applications must not call vkGetImageMemoryRequirements or vkGetImageMemoryRequirements2 with such a VkImage before it has been bound to memory. For this reason, applications also must not call vkGetDeviceImageMemoryRequirements with a VkImageCreateInfo describing an external Android hardware buffer. When importing Android hardware buffer memory, the `allocationSize` can be determined by calling vkGetAndroidHardwareBufferPropertiesANDROID. When allocating new memory for a VkImage that can be exported to an Android hardware buffer, the memory’s `allocationSize` must be zero; the actual size will be determined by the dedicated image’s parameters. After the memory has been allocated, the amount of space allocated from the memory’s heap can be obtained by getting the image’s memory requirements or by calling vkGetAndroidHardwareBufferPropertiesANDROID with the Android hardware buffer exported from the memory.

When allocating new memory for a VkBuffer that can be exported to an Android hardware buffer an application may still call vkGetBufferMemoryRequirements or vkGetBufferMemoryRequirements2 with VkBuffer before it has been bound to memory.

The value of `size` has no meaning and should be ignored if the resource being queried was created with any of the following external memory handle types:

- VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT

- VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT

- VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT

- VK_EXTERNAL_MEMORY_HANDLE_TYPE_MTLTEXTURE_BIT_EXT

The implementation guarantees certain properties about the memory requirements returned by vkGetBufferMemoryRequirements2, vkGetImageMemoryRequirements2, vkGetDeviceBufferMemoryRequirements, vkGetDeviceImageMemoryRequirements, vkGetDeviceTensorMemoryRequirementsARM, vkGetTensorMemoryRequirementsARM, vkGetBufferMemoryRequirements and vkGetImageMemoryRequirements:

- The `memoryTypeBits` member always contains at least one bit set.

- If `buffer` is a `VkBuffer` not created with the VK_BUFFER_CREATE_SPARSE_BINDING_BIT or VK_BUFFER_CREATE_PROTECTED_BIT bits set, or if `image` is a linear image that was not created with the VK_IMAGE_CREATE_PROTECTED_BIT bit set, or if `tensor` is a `VkTensorARM` not created with the VK_TENSOR_CREATE_PROTECTED_BIT_ARM, then the `memoryTypeBits` member always contains at least one bit set corresponding to a `VkMemoryType` with a `propertyFlags` that has both the VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT bit and the VK_MEMORY_PROPERTY_HOST_COHERENT_BIT bit set. In other words, mappable coherent memory can always be attached to these objects.

- If `buffer` was created with VkExternalMemoryBufferCreateInfo::`handleTypes` set to `0` or `image` was created with VkExternalMemoryImageCreateInfo::`handleTypes` set to `0`, or `tensor` was created with VkExternalMemoryTensorCreateInfoARM::`handleTypes` set to `0`, the `memoryTypeBits` member always contains at least one bit set corresponding to a `VkMemoryType` with a `propertyFlags` that has the VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT bit set.

- The `memoryTypeBits` member is identical for all `VkBuffer` objects created with the same value for the `flags` and `usage` members in the VkBufferCreateInfo structure and the `handleTypes` member of the VkExternalMemoryBufferCreateInfo structure passed to vkCreateBuffer. Further, if `usage1` and `usage2` of type VkBufferUsageFlags are such that the bits set in `usage2` are a subset of the bits set in `usage1`, and they have the same `flags` and VkExternalMemoryBufferCreateInfo::`handleTypes`, then the bits set in `memoryTypeBits` returned for `usage1` must be a subset of the bits set in `memoryTypeBits` returned for `usage2`, for all values of `flags`.

- The `alignment` member is a power of two.

- The `alignment` member is identical for all `VkBuffer` objects created with the same combination of values for the `usage` and `flags` members in the VkBufferCreateInfo structure passed to vkCreateBuffer.

- If the `maintenance4` feature is enabled, then the `alignment` member is identical for all `VkImage` objects created with the same combination of values for the `flags`, `imageType`, `format`, `extent`, `mipLevels`, `arrayLayers`, `samples`, `tiling` and `usage` members in the VkImageCreateInfo structure passed to vkCreateImage.

- The `alignment` member satisfies the buffer descriptor offset alignment requirements associated with the `VkBuffer`’s `usage`:

  - If `usage` included VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT or VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT, `alignment` must be an integer multiple of `VkPhysicalDeviceLimits`::`minTexelBufferOffsetAlignment`.

  - If `usage` included VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT, `alignment` must be an integer multiple of `VkPhysicalDeviceLimits`::`minUniformBufferOffsetAlignment`.

  - If `usage` included VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, `alignment` must be an integer multiple of `VkPhysicalDeviceLimits`::`minStorageBufferOffsetAlignment`.

- For images created with a color format, the `memoryTypeBits` member is identical for all `VkImage` objects created with the same combination of values for the `tiling` member, the VK_IMAGE_CREATE_SPARSE_BINDING_BIT bit and VK_IMAGE_CREATE_PROTECTED_BIT bit of the `flags` member, the VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT bit of the `flags` member, the VK_IMAGE_USAGE_HOST_TRANSFER_BIT bit of the `usage` member if the VkPhysicalDeviceHostImageCopyProperties::`identicalMemoryTypeRequirements` property is VK_FALSE, `handleTypes` member of VkExternalMemoryImageCreateInfo, and the VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT of the `usage` member in the VkImageCreateInfo structure passed to vkCreateImage.

- For images created with a depth/stencil format, the `memoryTypeBits` member is identical for all `VkImage` objects created with the same combination of values for the `format` member, the `tiling` member, the VK_IMAGE_CREATE_SPARSE_BINDING_BIT bit and VK_IMAGE_CREATE_PROTECTED_BIT bit of the `flags` member, the VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT bit of the `flags` member, the VK_IMAGE_USAGE_HOST_TRANSFER_BIT bit of the `usage` member if the VkPhysicalDeviceHostImageCopyProperties::`identicalMemoryTypeRequirements` property is VK_FALSE, `handleTypes` member of VkExternalMemoryImageCreateInfo, and the VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT of the `usage` member in the VkImageCreateInfo structure passed to vkCreateImage.

- If the memory requirements are for a `VkImage`, the `memoryTypeBits` member must not refer to a `VkMemoryType` with a `propertyFlags` that has the VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT bit set if the `image` did not have VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT bit set in the `usage` member of the VkImageCreateInfo structure passed to vkCreateImage.

- If the memory requirements are for a `VkBuffer`, the `memoryTypeBits` member must not refer to a `VkMemoryType` with a `propertyFlags` that has the VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT bit set.

- If the memory requirements are for a `VkTensorARM`, the `memoryTypeBits` member must not refer to a `VkMemoryType` with a `propertyFlags` that has the VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT bit set.

  Note | The implication of this requirement is that lazily allocated memory is disallowed for buffers in all cases.

- The `size` member is identical for all `VkBuffer` objects created with the same combination of creation parameters specified in VkBufferCreateInfo and its `pNext` chain.

- The `size` member is identical for all `VkImage` objects created with the same combination of creation parameters specified in VkImageCreateInfo and its `pNext` chain.

- The `size` member is identical for all `VkTensorARM` objects created with the same combination of creation parameters specified in `VkTensorCreateInfoARM` and its `pNext` chain.

  Note | This, however, does not imply that they interpret the contents of the bound memory identically with each other. That additional guarantee, however, can be explicitly requested using VK_IMAGE_CREATE_ALIAS_BIT.

- If the `maintenance4` feature is enabled, these additional guarantees apply:

  - For a `VkBuffer`, the `size` memory requirement is never greater than that of another `VkBuffer` created with a greater or equal `size` specified in VkBufferCreateInfo, all other creation parameters being identical.

  - For a `VkBuffer`, the `size` memory requirement is never greater than the result of aligning VkBufferCreateInfo::`size` with the `alignment` memory requirement.

  - For a VkImage, the `size` memory requirement is never greater than that of another VkImage created with a greater or equal value in each of `extent.width`, `extent.height`, and `extent.depth`; all other creation parameters being identical.

  - The memory requirements returned by vkGetDeviceBufferMemoryRequirements are identical to those that would be returned by vkGetBufferMemoryRequirements2 if it were called with a `VkBuffer` created with the same VkBufferCreateInfo values.

  - The memory requirements returned by vkGetDeviceImageMemoryRequirements are identical to those that would be returned by vkGetImageMemoryRequirements2 if it were called with a `VkImage` created with the same VkImageCreateInfo values.

  - The memory requirements returned by vkGetDeviceTensorMemoryRequirementsARM are identical to those that would be returned by vkGetTensorMemoryRequirementsARM if it were called with a `VkTensorARM` created with the same VkTensorCreateInfoARM values, including additional values provided via a VkExternalMemoryTensorCreateInfoARM structure.

To determine the memory requirements for a buffer resource, call:

    // Provided by VK_VERSION_1_1
    void vkGetBufferMemoryRequirements2(
        VkDevice                                    device,
        const VkBufferMemoryRequirementsInfo2*      pInfo,
        VkMemoryRequirements2*                      pMemoryRequirements);

    // Provided by VK_KHR_get_memory_requirements2
    // Equivalent to vkGetBufferMemoryRequirements2
    void vkGetBufferMemoryRequirements2KHR(
        VkDevice                                    device,
        const VkBufferMemoryRequirementsInfo2*      pInfo,
        VkMemoryRequirements2*                      pMemoryRequirements);

- `device` is the logical device that owns the buffer.

- `pInfo` is a pointer to a VkBufferMemoryRequirementsInfo2 structure containing parameters required for the memory requirements query.

- `pMemoryRequirements` is a pointer to a VkMemoryRequirements2 structure in which the memory requirements of the buffer object are returned.

Valid Usage (Implicit)

- VUID-vkGetBufferMemoryRequirements2-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetBufferMemoryRequirements2-pInfo-parameter
  `pInfo` must be a valid pointer to a valid VkBufferMemoryRequirementsInfo2 structure

- VUID-vkGetBufferMemoryRequirements2-pMemoryRequirements-parameter
  `pMemoryRequirements` must be a valid pointer to a VkMemoryRequirements2 structure

To determine the memory requirements for a buffer resource without creating an object, call:

    // Provided by VK_VERSION_1_3
    void vkGetDeviceBufferMemoryRequirements(
        VkDevice                                    device,
        const VkDeviceBufferMemoryRequirements*     pInfo,
        VkMemoryRequirements2*                      pMemoryRequirements);

    // Provided by VK_KHR_maintenance4
    // Equivalent to vkGetDeviceBufferMemoryRequirements
    void vkGetDeviceBufferMemoryRequirementsKHR(
        VkDevice                                    device,
        const VkDeviceBufferMemoryRequirements*     pInfo,
        VkMemoryRequirements2*                      pMemoryRequirements);

- `device` is the logical device intended to own the buffer.

- `pInfo` is a pointer to a VkDeviceBufferMemoryRequirements structure containing parameters required for the memory requirements query.

- `pMemoryRequirements` is a pointer to a VkMemoryRequirements2 structure in which the memory requirements of the buffer object are returned.

Valid Usage (Implicit)

- VUID-vkGetDeviceBufferMemoryRequirements-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetDeviceBufferMemoryRequirements-pInfo-parameter
  `pInfo` must be a valid pointer to a valid VkDeviceBufferMemoryRequirements structure

- VUID-vkGetDeviceBufferMemoryRequirements-pMemoryRequirements-parameter
  `pMemoryRequirements` must be a valid pointer to a VkMemoryRequirements2 structure

The `VkBufferMemoryRequirementsInfo2` structure is defined as:

    // Provided by VK_VERSION_1_1
    typedef struct VkBufferMemoryRequirementsInfo2 {
        VkStructureType    sType;
        const void*        pNext;
        VkBuffer           buffer;
    } VkBufferMemoryRequirementsInfo2;

    // Provided by VK_KHR_get_memory_requirements2
    // Equivalent to VkBufferMemoryRequirementsInfo2
    typedef VkBufferMemoryRequirementsInfo2 VkBufferMemoryRequirementsInfo2KHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `buffer` is the buffer to query.

Valid Usage (Implicit)

- VUID-VkBufferMemoryRequirementsInfo2-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2

- VUID-VkBufferMemoryRequirementsInfo2-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkBufferMemoryRequirementsInfo2-buffer-parameter
  `buffer` must be a valid VkBuffer handle

The `VkDeviceBufferMemoryRequirements` structure is defined as:

    // Provided by VK_VERSION_1_3
    typedef struct VkDeviceBufferMemoryRequirements {
        VkStructureType              sType;
        const void*                  pNext;
        const VkBufferCreateInfo*    pCreateInfo;
    } VkDeviceBufferMemoryRequirements;

    // Provided by VK_KHR_maintenance4
    // Equivalent to VkDeviceBufferMemoryRequirements
    typedef VkDeviceBufferMemoryRequirements VkDeviceBufferMemoryRequirementsKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `pCreateInfo` is a pointer to a VkBufferCreateInfo structure containing parameters affecting creation of the buffer to query.

Valid Usage (Implicit)

- VUID-VkDeviceBufferMemoryRequirements-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DEVICE_BUFFER_MEMORY_REQUIREMENTS

- VUID-VkDeviceBufferMemoryRequirements-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkDeviceBufferMemoryRequirements-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkBufferCreateInfo structure

To determine the memory requirements for an image resource, call:

    // Provided by VK_VERSION_1_1
    void vkGetImageMemoryRequirements2(
        VkDevice                                    device,
        const VkImageMemoryRequirementsInfo2*       pInfo,
        VkMemoryRequirements2*                      pMemoryRequirements);

    // Provided by VK_KHR_get_memory_requirements2
    // Equivalent to vkGetImageMemoryRequirements2
    void vkGetImageMemoryRequirements2KHR(
        VkDevice                                    device,
        const VkImageMemoryRequirementsInfo2*       pInfo,
        VkMemoryRequirements2*                      pMemoryRequirements);

- `device` is the logical device that owns the image.

- `pInfo` is a pointer to a VkImageMemoryRequirementsInfo2 structure containing parameters required for the memory requirements query.

- `pMemoryRequirements` is a pointer to a VkMemoryRequirements2 structure in which the memory requirements of the image object are returned.

Valid Usage (Implicit)

- VUID-vkGetImageMemoryRequirements2-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetImageMemoryRequirements2-pInfo-parameter
  `pInfo` must be a valid pointer to a valid VkImageMemoryRequirementsInfo2 structure

- VUID-vkGetImageMemoryRequirements2-pMemoryRequirements-parameter
  `pMemoryRequirements` must be a valid pointer to a VkMemoryRequirements2 structure

To determine the memory requirements for an image resource without creating an object, call:

    // Provided by VK_VERSION_1_3
    void vkGetDeviceImageMemoryRequirements(
        VkDevice                                    device,
        const VkDeviceImageMemoryRequirements*      pInfo,
        VkMemoryRequirements2*                      pMemoryRequirements);

    // Provided by VK_KHR_maintenance4
    // Equivalent to vkGetDeviceImageMemoryRequirements
    void vkGetDeviceImageMemoryRequirementsKHR(
        VkDevice                                    device,
        const VkDeviceImageMemoryRequirements*      pInfo,
        VkMemoryRequirements2*                      pMemoryRequirements);

- `device` is the logical device intended to own the image.

- `pInfo` is a pointer to a VkDeviceImageMemoryRequirements structure containing parameters required for the memory requirements query.

- `pMemoryRequirements` is a pointer to a VkMemoryRequirements2 structure in which the memory requirements of the image object are returned.

Valid Usage (Implicit)

- VUID-vkGetDeviceImageMemoryRequirements-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetDeviceImageMemoryRequirements-pInfo-parameter
  `pInfo` must be a valid pointer to a valid VkDeviceImageMemoryRequirements structure

- VUID-vkGetDeviceImageMemoryRequirements-pMemoryRequirements-parameter
  `pMemoryRequirements` must be a valid pointer to a VkMemoryRequirements2 structure

The `VkImageMemoryRequirementsInfo2` structure is defined as:

    // Provided by VK_VERSION_1_1
    typedef struct VkImageMemoryRequirementsInfo2 {
        VkStructureType    sType;
        const void*        pNext;
        VkImage            image;
    } VkImageMemoryRequirementsInfo2;

    // Provided by VK_KHR_get_memory_requirements2
    // Equivalent to VkImageMemoryRequirementsInfo2
    typedef VkImageMemoryRequirementsInfo2 VkImageMemoryRequirementsInfo2KHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `image` is the image to query.

Valid Usage

- VUID-VkImageMemoryRequirementsInfo2-image-01589
  If `image` was created with a multi-planar format and the VK_IMAGE_CREATE_DISJOINT_BIT flag, there must be a VkImagePlaneMemoryRequirementsInfo included in the `pNext` chain of the VkImageMemoryRequirementsInfo2 structure

- VUID-VkImageMemoryRequirementsInfo2-image-02279
  If `image` was created with VK_IMAGE_CREATE_DISJOINT_BIT and with VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, then there must be a VkImagePlaneMemoryRequirementsInfo included in the `pNext` chain of the VkImageMemoryRequirementsInfo2 structure

- VUID-VkImageMemoryRequirementsInfo2-image-01590
  If `image` was not created with the VK_IMAGE_CREATE_DISJOINT_BIT flag, there must not be a VkImagePlaneMemoryRequirementsInfo included in the `pNext` chain of the VkImageMemoryRequirementsInfo2 structure

- VUID-VkImageMemoryRequirementsInfo2-image-02280
  If `image` was created with a single-plane format and with any `tiling` other than VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, then there must not be a VkImagePlaneMemoryRequirementsInfo included in the `pNext` chain of the VkImageMemoryRequirementsInfo2 structure

- VUID-VkImageMemoryRequirementsInfo2-image-01897
  If `image` was created with the VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID external memory handle type, then `image` must be bound to memory

- VUID-VkImageMemoryRequirementsInfo2-image-08961
  If `image` was created with the VK_EXTERNAL_MEMORY_HANDLE_TYPE_SCREEN_BUFFER_BIT_QNX external memory handle type, then `image` must be bound to memory

Valid Usage (Implicit)

- VUID-VkImageMemoryRequirementsInfo2-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2

- VUID-VkImageMemoryRequirementsInfo2-pNext-pNext
  `pNext` must be `NULL` or a pointer to a valid instance of VkImagePlaneMemoryRequirementsInfo

- VUID-VkImageMemoryRequirementsInfo2-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkImageMemoryRequirementsInfo2-image-parameter
  `image` must be a valid VkImage handle

The `VkDeviceImageMemoryRequirements` structure is defined as:

    // Provided by VK_VERSION_1_3
    typedef struct VkDeviceImageMemoryRequirements {
        VkStructureType             sType;
        const void*                 pNext;
        const VkImageCreateInfo*    pCreateInfo;
        VkImageAspectFlagBits       planeAspect;
    } VkDeviceImageMemoryRequirements;

    // Provided by VK_KHR_maintenance4
    // Equivalent to VkDeviceImageMemoryRequirements
    typedef VkDeviceImageMemoryRequirements VkDeviceImageMemoryRequirementsKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `pCreateInfo` is a pointer to a VkImageCreateInfo structure containing parameters affecting creation of the image to query.

- `planeAspect` is a VkImageAspectFlagBits value specifying the aspect corresponding to the image plane to query. This parameter is ignored unless `pCreateInfo->tiling` is VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, or `pCreateInfo->flags` has VK_IMAGE_CREATE_DISJOINT_BIT set.

Valid Usage

- VUID-VkDeviceImageMemoryRequirements-pCreateInfo-06416
  The `pCreateInfo->pNext` chain must not contain a VkImageSwapchainCreateInfoKHR structure

- VUID-VkDeviceImageMemoryRequirements-pCreateInfo-06776
  The `pCreateInfo->pNext` chain must not contain a VkImageDrmFormatModifierExplicitCreateInfoEXT structure

- VUID-VkDeviceImageMemoryRequirements-pNext-06996
  Applications also must not call vkGetDeviceImageMemoryRequirements with a VkImageCreateInfo whose `pNext` chain includes a VkExternalFormatANDROID structure with non-zero `externalFormat`

- VUID-VkDeviceImageMemoryRequirements-pNext-08962
  Applications also must not call vkGetDeviceImageMemoryRequirements with a VkImageCreateInfo whose `pNext` chain includes a VkExternalFormatQNX structure with non-zero `externalFormat`

- VUID-VkDeviceImageMemoryRequirements-pCreateInfo-06417
  If `pCreateInfo->format` specifies a multi-planar format and `pCreateInfo->flags` has VK_IMAGE_CREATE_DISJOINT_BIT set then `planeAspect` must not be VK_IMAGE_ASPECT_NONE_KHR

- VUID-VkDeviceImageMemoryRequirements-pCreateInfo-06419
  If `pCreateInfo->flags` has VK_IMAGE_CREATE_DISJOINT_BIT set and if the `pCreateInfo->tiling` is VK_IMAGE_TILING_LINEAR or VK_IMAGE_TILING_OPTIMAL, then `planeAspect` must be a single valid multi-planar aspect mask bit

- VUID-VkDeviceImageMemoryRequirements-pCreateInfo-06420
  If `pCreateInfo->tiling` is VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, then `planeAspect` must be a single valid memory plane for the image (that is, `aspectMask` must specify a plane index that is less than the VkDrmFormatModifierPropertiesEXT::`drmFormatModifierPlaneCount` associated with the image’s `format` and VkImageDrmFormatModifierPropertiesEXT::`drmFormatModifier`)

- VUID-VkDeviceImageMemoryRequirements-planeAspect-12399
  If `planeAspect` is not 0, `pCreateInfo->tiling` is not VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, and `pCreateInfo->flags` does not have VK_IMAGE_CREATE_DISJOINT_BIT set, `planeAspect` must be a valid VkImageAspectFlagBits value

Valid Usage (Implicit)

- VUID-VkDeviceImageMemoryRequirements-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DEVICE_IMAGE_MEMORY_REQUIREMENTS

- VUID-VkDeviceImageMemoryRequirements-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkDeviceImageMemoryRequirements-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkImageCreateInfo structure

To determine the memory requirements for a plane of a disjoint image, add a `VkImagePlaneMemoryRequirementsInfo` structure to the `pNext` chain of the `VkImageMemoryRequirementsInfo2` structure.

The `VkImagePlaneMemoryRequirementsInfo` structure is defined as:

    // Provided by VK_VERSION_1_1
    typedef struct VkImagePlaneMemoryRequirementsInfo {
        VkStructureType          sType;
        const void*              pNext;
        VkImageAspectFlagBits    planeAspect;
    } VkImagePlaneMemoryRequirementsInfo;

    // Provided by VK_KHR_sampler_ycbcr_conversion
    // Equivalent to VkImagePlaneMemoryRequirementsInfo
    typedef VkImagePlaneMemoryRequirementsInfo VkImagePlaneMemoryRequirementsInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `planeAspect` is a VkImageAspectFlagBits value specifying the aspect corresponding to the image plane to query.

Valid Usage

- VUID-VkImagePlaneMemoryRequirementsInfo-planeAspect-02281
  If the image’s `tiling` is VK_IMAGE_TILING_LINEAR or VK_IMAGE_TILING_OPTIMAL, then `planeAspect` must be a single valid multi-planar aspect mask bit

- VUID-VkImagePlaneMemoryRequirementsInfo-planeAspect-02282
  If the image’s `tiling` is VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, then `planeAspect` must be a single valid memory plane for the image (that is, `aspectMask` must specify a plane index that is less than the VkDrmFormatModifierPropertiesEXT::`drmFormatModifierPlaneCount` associated with the image’s `format` and VkImageDrmFormatModifierPropertiesEXT::`drmFormatModifier`)

Valid Usage (Implicit)

- VUID-VkImagePlaneMemoryRequirementsInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO

- VUID-VkImagePlaneMemoryRequirementsInfo-planeAspect-parameter
  `planeAspect` must be a valid VkImageAspectFlagBits value

Structure Chaining

Extends the structure

  - VkImageMemoryRequirementsInfo2

To determine the tile memory allocation requirements of a buffer or image resource, add a `VkTileMemoryRequirementsQCOM` structure to the `pNext` chain of the `VkMemoryRequirements2` structure passed as the `pMemoryRequirements` parameter of vkGetBufferMemoryRequirements2 or vkGetImageMemoryRequirements2, respectively. The `VkTileMemoryRequirementsQCOM` structure is defined as:

    // Provided by VK_QCOM_tile_memory_heap
    typedef struct VkTileMemoryRequirementsQCOM {
        VkStructureType    sType;
        void*              pNext;
        VkDeviceSize       size;
        VkDeviceSize       alignment;
    } VkTileMemoryRequirementsQCOM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `size` is the size, in bytes, of the tile memory allocation required for the resource.

- `alignment` is the alignment, in bytes, of the offset within the tile memory allocation required for the resource.

The `size` and `alignment` must be used when the resource is bound to a VkDeviceMemory object that was allocated from a VkMemoryType that has a `heapIndex` that corresponds to a VkMemoryHeap with the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property.

If the resource cannot be bound to tile memory, then `size` and `alignment` is filled with zero by the implementation.

Valid Usage (Implicit)

- VUID-VkTileMemoryRequirementsQCOM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_TILE_MEMORY_REQUIREMENTS_QCOM

Structure Chaining

Extends the structure

  - VkMemoryRequirements2

The `VkMemoryRequirements2` structure is defined as:

    // Provided by VK_VERSION_1_1
    typedef struct VkMemoryRequirements2 {
        VkStructureType         sType;
        void*                   pNext;
        VkMemoryRequirements    memoryRequirements;
    } VkMemoryRequirements2;

    // Provided by VK_KHR_get_memory_requirements2, VK_NV_ray_tracing with VK_KHR_get_memory_requirements2 or VK_VERSION_1_1
    // Equivalent to VkMemoryRequirements2
    typedef VkMemoryRequirements2 VkMemoryRequirements2KHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `memoryRequirements` is a VkMemoryRequirements structure describing the memory requirements of the resource.

Valid Usage (Implicit)

- VUID-VkMemoryRequirements2-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2

- VUID-VkMemoryRequirements2-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkMemoryDedicatedRequirements or VkTileMemoryRequirementsQCOM

- VUID-VkMemoryRequirements2-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

The `VkMemoryDedicatedRequirements` structure is defined as:

    // Provided by VK_VERSION_1_1
    typedef struct VkMemoryDedicatedRequirements {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           prefersDedicatedAllocation;
        VkBool32           requiresDedicatedAllocation;
    } VkMemoryDedicatedRequirements;

    // Provided by VK_KHR_dedicated_allocation
    // Equivalent to VkMemoryDedicatedRequirements
    typedef VkMemoryDedicatedRequirements VkMemoryDedicatedRequirementsKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `prefersDedicatedAllocation` specifies that the implementation would prefer a dedicated allocation for this resource. The application is still free to suballocate the resource but it may get better performance if a dedicated allocation is used.

- `requiresDedicatedAllocation` specifies that a dedicated allocation is required for this resource.

To determine the dedicated allocation requirements of a buffer or image or tensor resource, add a VkMemoryDedicatedRequirements structure to the `pNext` chain of the VkMemoryRequirements2 structure passed as the `pMemoryRequirements` parameter of vkGetBufferMemoryRequirements2, vkGetTensorMemoryRequirementsARM, vkGetDeviceBufferMemoryRequirements, vkGetDeviceImageMemoryRequirements, or vkGetImageMemoryRequirements2 respectively.

Constraints on the values returned for buffer resources are:

- `requiresDedicatedAllocation` may be VK_TRUE if the `pNext` chain of VkBufferCreateInfo for the call to `vkCreateBuffer` used to create the buffer being queried included a VkExternalMemoryBufferCreateInfo structure, and any of the handle types specified in VkExternalMemoryBufferCreateInfo::`handleTypes` requires dedicated allocation, as reported by vkGetPhysicalDeviceExternalBufferProperties in `VkExternalBufferProperties`::`externalMemoryProperties.externalMemoryFeatures`. Otherwise, `requiresDedicatedAllocation` will be VK_FALSE.

- When the implementation sets `requiresDedicatedAllocation` to VK_TRUE, it must also set `prefersDedicatedAllocation` to VK_TRUE.

- If VK_BUFFER_CREATE_SPARSE_BINDING_BIT was set in VkBufferCreateInfo::`flags` when `buffer` was created, then both `prefersDedicatedAllocation` and `requiresDedicatedAllocation` will be VK_FALSE.

Constraints on the values returned for image resources are:

- `requiresDedicatedAllocation` may be VK_TRUE if the `pNext` chain of VkImageCreateInfo for the call to vkCreateImage used to create the image being queried included a VkExternalMemoryImageCreateInfo structure, and any of the handle types specified in VkExternalMemoryImageCreateInfo::`handleTypes` requires dedicated allocation, as reported by vkGetPhysicalDeviceImageFormatProperties2 in `VkExternalImageFormatProperties`::`externalMemoryProperties.externalMemoryFeatures`.

- `requiresDedicatedAllocation` may be VK_TRUE if the image’s tiling is VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT.

- `requiresDedicatedAllocation` will otherwise be VK_FALSE

- If VK_IMAGE_CREATE_SPARSE_BINDING_BIT was set in VkImageCreateInfo::`flags` when `image` was created, then both `prefersDedicatedAllocation` and `requiresDedicatedAllocation` will be VK_FALSE.

Constraints on the values returned for tensor resources are:

- `requiresDedicatedAllocation` may be VK_TRUE if the `pNext` chain of VkTensorCreateInfoARM for the call to `vkCreateTensorARM` used to create the tensor being queried included a VkExternalMemoryTensorCreateInfoARM structure, and any of the handle types specified in VkExternalMemoryTensorCreateInfoARM::`handleTypes` requires dedicated allocation, as reported by vkGetPhysicalDeviceExternalTensorPropertiesARM in `VkExternalTensorPropertiesARM`::`externalMemoryProperties.externalMemoryFeatures`.

- `requiresDedicatedAllocation` will be VK_TRUE if the VkTensorDescriptionARM::`tiling` provided via the VkTensorCreateInfoARM structure for the call to vkCreateTensorARM used to create the tensor being queried was VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_64K_ARM.

- `requiresDedicatedAllocation` will otherwise be VK_FALSE.

- When the implementation sets `requiresDedicatedAllocation` to VK_TRUE, it must also set `prefersDedicatedAllocation` to VK_TRUE.

Valid Usage (Implicit)

- VUID-VkMemoryDedicatedRequirements-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS

Structure Chaining

Extends the structure

  - VkMemoryRequirements2

To attach memory to a buffer object, call:

    // Provided by VK_VERSION_1_0
    VkResult vkBindBufferMemory(
        VkDevice                                    device,
        VkBuffer                                    buffer,
        VkDeviceMemory                              memory,
        VkDeviceSize                                memoryOffset);

- `device` is the logical device that owns the buffer and memory.

- `buffer` is the buffer to be attached to memory.

- `memory` is a VkDeviceMemory object describing the device memory to attach.

- `memoryOffset` is the start offset of the region of `memory` which is to be bound to the buffer. The number of bytes returned in the `VkMemoryRequirements`::`size` member in `memory`, starting from `memoryOffset` bytes, will be bound to the specified buffer.

`vkBindBufferMemory` is equivalent to passing the same parameters through VkBindBufferMemoryInfo to vkBindBufferMemory2.

Valid Usage

- VUID-vkBindBufferMemory-buffer-07459
  `buffer` must not have been bound to a memory object

- VUID-vkBindBufferMemory-buffer-01030
  `buffer` must not have been created with any sparse memory binding flags

- VUID-vkBindBufferMemory-memoryOffset-01031
  `memoryOffset` must be less than the size of `memory`

- VUID-vkBindBufferMemory-memory-01035
  `memory` must have been allocated using one of the memory types allowed in the `memoryTypeBits` member of the `VkMemoryRequirements` structure returned from a call to `vkGetBufferMemoryRequirements` with `buffer`

- VUID-vkBindBufferMemory-None-10739
  If `memory` was not allocated from a memory heap with the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property set, `memoryOffset` must be an integer multiple of the `alignment` member of the `VkMemoryRequirements` structure returned from a call to `vkGetBufferMemoryRequirements` with `buffer`

- VUID-vkBindBufferMemory-memory-10740
  If `memory` was allocated from a memory heap with the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property set, `memoryOffset` must be an integer multiple of the `alignment` member of the `VkTileMemoryRequirementsQCOM` structure returned from a call to `vkGetBufferMemoryRequirements` with `buffer`

- VUID-vkBindBufferMemory-None-10741
  If `memory` was not allocated from a memory heap with the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property set, `size` member of the `VkMemoryRequirements` structure returned from a call to `vkGetBufferMemoryRequirements` with `buffer` must be less than or equal to the size of `memory` minus `memoryOffset`

- VUID-vkBindBufferMemory-memory-10742
  If `memory` was allocated from a memory heap with the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property set, `size` member of the `VkTileMemoryRequirementsQCOM` structure returned from a call to `vkGetBufferMemoryRequirements` with `buffer` must be less than or equal to the size of `memory` minus `memoryOffset`

- VUID-vkBindBufferMemory-buffer-01444
  If `buffer` requires a dedicated allocation (as reported by vkGetBufferMemoryRequirements2 in VkMemoryDedicatedRequirements::`requiresDedicatedAllocation` for `buffer`), `memory` must have been allocated with VkMemoryDedicatedAllocateInfo::`buffer` equal to `buffer`

- VUID-vkBindBufferMemory-memory-01508
  If the `VkMemoryAllocateInfo` provided when `memory` was allocated included a VkMemoryDedicatedAllocateInfo structure in its `pNext` chain, and VkMemoryDedicatedAllocateInfo::`buffer` was not VK_NULL_HANDLE, then `buffer` must equal VkMemoryDedicatedAllocateInfo::`buffer`, and `memoryOffset` must be zero

- VUID-vkBindBufferMemory-memory-10925
  If the `VkMemoryAllocateInfo` provided when `memory` was allocated included a VkMemoryDedicatedAllocateInfo structure in its `pNext` chain, VkMemoryDedicatedAllocateInfo::`image` must have been VK_NULL_HANDLE

- VUID-vkBindBufferMemory-None-01898
  If `buffer` was created with the VK_BUFFER_CREATE_PROTECTED_BIT bit set, the buffer must be bound to a memory object allocated with a memory type that reports VK_MEMORY_PROPERTY_PROTECTED_BIT

- VUID-vkBindBufferMemory-None-01899
  If `buffer` was created with the VK_BUFFER_CREATE_PROTECTED_BIT bit not set, the buffer must not be bound to a memory object allocated with a memory type that reports VK_MEMORY_PROPERTY_PROTECTED_BIT

- VUID-vkBindBufferMemory-buffer-01038
  If `buffer` was created with VkDedicatedAllocationBufferCreateInfoNV::`dedicatedAllocation` equal to VK_TRUE, `memory` must have been allocated with VkDedicatedAllocationMemoryAllocateInfoNV::`buffer` equal to a buffer handle created with identical creation parameters to `buffer` and `memoryOffset` must be zero

- VUID-vkBindBufferMemory-apiVersion-07920
  If the VK_KHR_dedicated_allocation extension is not enabled, VkPhysicalDeviceProperties::`apiVersion` is less than Vulkan 1.1, and `buffer` was not created with VkDedicatedAllocationBufferCreateInfoNV::`dedicatedAllocation` equal to VK_TRUE, `memory` must not have been allocated dedicated for a specific buffer or image

- VUID-vkBindBufferMemory-memory-02726
  If the value of VkExportMemoryAllocateInfo::`handleTypes` used to allocate `memory` is not `0`, it must include at least one of the handles set in VkExternalMemoryBufferCreateInfo::`handleTypes` when `buffer` was created

- VUID-vkBindBufferMemory-memory-02985
  If `memory` was allocated by a memory import operation, that is not VkImportAndroidHardwareBufferInfoANDROID with a non-`NULL` `buffer` value, the external handle type of the imported memory must also have been set in VkExternalMemoryBufferCreateInfo::`handleTypes` when `buffer` was created

- VUID-vkBindBufferMemory-memory-02986
  If `memory` was allocated with the VkImportAndroidHardwareBufferInfoANDROID memory import operation with a non-`NULL` `buffer` value, VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID must also have been set in VkExternalMemoryBufferCreateInfo::`handleTypes` when `buffer` was created

- VUID-vkBindBufferMemory-bufferDeviceAddress-03339
  If the VkPhysicalDeviceBufferDeviceAddressFeatures::`bufferDeviceAddress` feature is enabled and `buffer` was created with the VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT usage flag set, `memory` must have been allocated with the VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT bit set

- VUID-vkBindBufferMemory-bufferDeviceAddressCaptureReplay-09200
  If the VkPhysicalDeviceBufferDeviceAddressFeatures::`bufferDeviceAddressCaptureReplay` feature is enabled and `buffer` was created with the VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT bit set, `memory` must have been allocated with the VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT bit set

- VUID-vkBindBufferMemory-buffer-06408
  If `buffer` was created with VkBufferCollectionBufferCreateInfoFUCHSIA chained to VkBufferCreateInfo::`pNext`, `memory` must be allocated with a VkImportMemoryBufferCollectionFUCHSIA chained to VkMemoryAllocateInfo::`pNext`

- VUID-vkBindBufferMemory-descriptorBufferCaptureReplay-08112
  If the `buffer` was created with the VK_BUFFER_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT bit set, `memory` must have been allocated with the VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT bit set

- VUID-vkBindBufferMemory-buffer-09201
  If the `buffer` was created with the VK_BUFFER_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT bit set, `memory` must have been allocated with the VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT bit set

- VUID-vkBindBufferMemory-buffer-11408
  If the `buffer` was created with the VK_BUFFER_USAGE_DESCRIPTOR_HEAP_BIT_EXT or VK_BUFFER_USAGE_2_DESCRIPTOR_HEAP_BIT_EXT bit set, `memory` must have been allocated with the VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT bit set

Valid Usage (Implicit)

- VUID-vkBindBufferMemory-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkBindBufferMemory-buffer-parameter
  `buffer` must be a valid VkBuffer handle

- VUID-vkBindBufferMemory-memory-parameter
  `memory` must be a valid VkDeviceMemory handle

- VUID-vkBindBufferMemory-buffer-parent
  `buffer` must have been created, allocated, or retrieved from `device`

- VUID-vkBindBufferMemory-memory-parent
  `memory` must have been created, allocated, or retrieved from `device`

Host Synchronization

- Host access to `buffer` must be externally synchronized

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

To attach memory to buffer objects for one or more buffers at a time, call:

    // Provided by VK_VERSION_1_1
    VkResult vkBindBufferMemory2(
        VkDevice                                    device,
        uint32_t                                    bindInfoCount,
        const VkBindBufferMemoryInfo*               pBindInfos);

    // Provided by VK_KHR_bind_memory2
    // Equivalent to vkBindBufferMemory2
    VkResult vkBindBufferMemory2KHR(
        VkDevice                                    device,
        uint32_t                                    bindInfoCount,
        const VkBindBufferMemoryInfo*               pBindInfos);

- `device` is the logical device that owns the buffers and memory.

- `bindInfoCount` is the number of elements in `pBindInfos`.

- `pBindInfos` is a pointer to an array of `bindInfoCount` VkBindBufferMemoryInfo structures describing buffers and memory to bind.

On some implementations, it may be more efficient to batch memory bindings into a single command.

If the `maintenance6` feature is enabled, this command must attempt to perform all of the memory binding operations described by `pBindInfos`, and must not early exit on the first failure.

If any of the memory binding operations described by `pBindInfos` fail, the VkResult returned by this command must be the return value of any one of the memory binding operations which did not return VK_SUCCESS.

Note | If the `vkBindBufferMemory2` command failed, VkBindMemoryStatus structures were not included in the `pNext` chains of each element of `pBindInfos`, and `bindInfoCount` was greater than one, then the buffers referenced by `pBindInfos` will be in an indeterminate state, and must not be used. Applications should destroy these buffers.

Valid Usage (Implicit)

- VUID-vkBindBufferMemory2-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkBindBufferMemory2-pBindInfos-parameter
  `pBindInfos` must be a valid pointer to an array of `bindInfoCount` valid VkBindBufferMemoryInfo structures

- VUID-vkBindBufferMemory2-bindInfoCount-arraylength
  `bindInfoCount` must be greater than `0`

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

`VkBindBufferMemoryInfo` contains members corresponding to the parameters of vkBindBufferMemory.

The `VkBindBufferMemoryInfo` structure is defined as:

    // Provided by VK_VERSION_1_1
    typedef struct VkBindBufferMemoryInfo {
        VkStructureType    sType;
        const void*        pNext;
        VkBuffer           buffer;
        VkDeviceMemory     memory;
        VkDeviceSize       memoryOffset;
    } VkBindBufferMemoryInfo;

    // Provided by VK_KHR_bind_memory2
    // Equivalent to VkBindBufferMemoryInfo
    typedef VkBindBufferMemoryInfo VkBindBufferMemoryInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `buffer` is the buffer to be attached to memory.

- `memory` is a VkDeviceMemory object describing the device memory to attach.

- `memoryOffset` is the start offset of the region of `memory` which is to be bound to the buffer. The number of bytes returned in the `VkMemoryRequirements`::`size` member in `memory`, starting from `memoryOffset` bytes, will be bound to the specified buffer.

Valid Usage

- VUID-VkBindBufferMemoryInfo-buffer-07459
  `buffer` must not have been bound to a memory object

- VUID-VkBindBufferMemoryInfo-buffer-01030
  `buffer` must not have been created with any sparse memory binding flags

- VUID-VkBindBufferMemoryInfo-memoryOffset-01031
  `memoryOffset` must be less than the size of `memory`

- VUID-VkBindBufferMemoryInfo-memory-01035
  `memory` must have been allocated using one of the memory types allowed in the `memoryTypeBits` member of the `VkMemoryRequirements` structure returned from a call to `vkGetBufferMemoryRequirements` with `buffer`

- VUID-VkBindBufferMemoryInfo-None-10739
  If `memory` was not allocated from a memory heap with the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property set, `memoryOffset` must be an integer multiple of the `alignment` member of the `VkMemoryRequirements` structure returned from a call to `vkGetBufferMemoryRequirements` with `buffer`

- VUID-VkBindBufferMemoryInfo-memory-10740
  If `memory` was allocated from a memory heap with the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property set, `memoryOffset` must be an integer multiple of the `alignment` member of the `VkTileMemoryRequirementsQCOM` structure returned from a call to `vkGetBufferMemoryRequirements` with `buffer`

- VUID-VkBindBufferMemoryInfo-None-10741
  If `memory` was not allocated from a memory heap with the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property set, `size` member of the `VkMemoryRequirements` structure returned from a call to `vkGetBufferMemoryRequirements` with `buffer` must be less than or equal to the size of `memory` minus `memoryOffset`

- VUID-VkBindBufferMemoryInfo-memory-10742
  If `memory` was allocated from a memory heap with the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property set, `size` member of the `VkTileMemoryRequirementsQCOM` structure returned from a call to `vkGetBufferMemoryRequirements` with `buffer` must be less than or equal to the size of `memory` minus `memoryOffset`

- VUID-VkBindBufferMemoryInfo-buffer-01444
  If `buffer` requires a dedicated allocation (as reported by vkGetBufferMemoryRequirements2 in VkMemoryDedicatedRequirements::`requiresDedicatedAllocation` for `buffer`), `memory` must have been allocated with VkMemoryDedicatedAllocateInfo::`buffer` equal to `buffer`

- VUID-VkBindBufferMemoryInfo-memory-01508
  If the `VkMemoryAllocateInfo` provided when `memory` was allocated included a VkMemoryDedicatedAllocateInfo structure in its `pNext` chain, and VkMemoryDedicatedAllocateInfo::`buffer` was not VK_NULL_HANDLE, then `buffer` must equal VkMemoryDedicatedAllocateInfo::`buffer`, and `memoryOffset` must be zero

- VUID-VkBindBufferMemoryInfo-memory-10925
  If the `VkMemoryAllocateInfo` provided when `memory` was allocated included a VkMemoryDedicatedAllocateInfo structure in its `pNext` chain, VkMemoryDedicatedAllocateInfo::`image` must have been VK_NULL_HANDLE

- VUID-VkBindBufferMemoryInfo-None-01898
  If `buffer` was created with the VK_BUFFER_CREATE_PROTECTED_BIT bit set, the buffer must be bound to a memory object allocated with a memory type that reports VK_MEMORY_PROPERTY_PROTECTED_BIT

- VUID-VkBindBufferMemoryInfo-None-01899
  If `buffer` was created with the VK_BUFFER_CREATE_PROTECTED_BIT bit not set, the buffer must not be bound to a memory object allocated with a memory type that reports VK_MEMORY_PROPERTY_PROTECTED_BIT

- VUID-VkBindBufferMemoryInfo-buffer-01038
  If `buffer` was created with VkDedicatedAllocationBufferCreateInfoNV::`dedicatedAllocation` equal to VK_TRUE, `memory` must have been allocated with VkDedicatedAllocationMemoryAllocateInfoNV::`buffer` equal to a buffer handle created with identical creation parameters to `buffer` and `memoryOffset` must be zero

- VUID-VkBindBufferMemoryInfo-apiVersion-07920
  If the VK_KHR_dedicated_allocation extension is not enabled, VkPhysicalDeviceProperties::`apiVersion` is less than Vulkan 1.1, and `buffer` was not created with VkDedicatedAllocationBufferCreateInfoNV::`dedicatedAllocation` equal to VK_TRUE, `memory` must not have been allocated dedicated for a specific buffer or image

- VUID-VkBindBufferMemoryInfo-memory-02726
  If the value of VkExportMemoryAllocateInfo::`handleTypes` used to allocate `memory` is not `0`, it must include at least one of the handles set in VkExternalMemoryBufferCreateInfo::`handleTypes` when `buffer` was created

- VUID-VkBindBufferMemoryInfo-memory-02985
  If `memory` was allocated by a memory import operation, that is not VkImportAndroidHardwareBufferInfoANDROID with a non-`NULL` `buffer` value, the external handle type of the imported memory must also have been set in VkExternalMemoryBufferCreateInfo::`handleTypes` when `buffer` was created

- VUID-VkBindBufferMemoryInfo-memory-02986
  If `memory` was allocated with the VkImportAndroidHardwareBufferInfoANDROID memory import operation with a non-`NULL` `buffer` value, VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID must also have been set in VkExternalMemoryBufferCreateInfo::`handleTypes` when `buffer` was created

- VUID-VkBindBufferMemoryInfo-bufferDeviceAddress-03339
  If the VkPhysicalDeviceBufferDeviceAddressFeatures::`bufferDeviceAddress` feature is enabled and `buffer` was created with the VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT usage flag set, `memory` must have been allocated with the VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT bit set

- VUID-VkBindBufferMemoryInfo-bufferDeviceAddressCaptureReplay-09200
  If the VkPhysicalDeviceBufferDeviceAddressFeatures::`bufferDeviceAddressCaptureReplay` feature is enabled and `buffer` was created with the VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT bit set, `memory` must have been allocated with the VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT bit set

- VUID-VkBindBufferMemoryInfo-buffer-06408
  If `buffer` was created with VkBufferCollectionBufferCreateInfoFUCHSIA chained to VkBufferCreateInfo::`pNext`, `memory` must be allocated with a VkImportMemoryBufferCollectionFUCHSIA chained to VkMemoryAllocateInfo::`pNext`

- VUID-VkBindBufferMemoryInfo-descriptorBufferCaptureReplay-08112
  If the `buffer` was created with the VK_BUFFER_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT bit set, `memory` must have been allocated with the VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT bit set

- VUID-VkBindBufferMemoryInfo-buffer-09201
  If the `buffer` was created with the VK_BUFFER_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT bit set, `memory` must have been allocated with the VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT bit set

- VUID-VkBindBufferMemoryInfo-buffer-11408
  If the `buffer` was created with the VK_BUFFER_USAGE_DESCRIPTOR_HEAP_BIT_EXT or VK_BUFFER_USAGE_2_DESCRIPTOR_HEAP_BIT_EXT bit set, `memory` must have been allocated with the VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT bit set

- VUID-VkBindBufferMemoryInfo-pNext-01605
  If the `pNext` chain includes a VkBindBufferMemoryDeviceGroupInfo structure, all instances of `memory` specified by VkBindBufferMemoryDeviceGroupInfo::`pDeviceIndices` must have been allocated

Valid Usage (Implicit)

- VUID-VkBindBufferMemoryInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO

- VUID-VkBindBufferMemoryInfo-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkBindBufferMemoryDeviceGroupInfo or VkBindMemoryStatus

- VUID-VkBindBufferMemoryInfo-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkBindBufferMemoryInfo-buffer-parameter
  `buffer` must be a valid VkBuffer handle

- VUID-VkBindBufferMemoryInfo-memory-parameter
  `memory` must be a valid VkDeviceMemory handle

- VUID-VkBindBufferMemoryInfo-commonparent
  Both of `buffer`, and `memory` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `buffer` must be externally synchronized

The `VkBindBufferMemoryDeviceGroupInfo` structure is defined as:

    // Provided by VK_VERSION_1_1
    typedef struct VkBindBufferMemoryDeviceGroupInfo {
        VkStructureType    sType;
        const void*        pNext;
        uint32_t           deviceIndexCount;
        const uint32_t*    pDeviceIndices;
    } VkBindBufferMemoryDeviceGroupInfo;

    // Provided by VK_KHR_bind_memory2 with VK_KHR_device_group
    // Equivalent to VkBindBufferMemoryDeviceGroupInfo
    typedef VkBindBufferMemoryDeviceGroupInfo VkBindBufferMemoryDeviceGroupInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `deviceIndexCount` is the number of elements in `pDeviceIndices`.

- `pDeviceIndices` is a pointer to an array of device indices.

If the `pNext` chain of VkBindBufferMemoryInfo includes a `VkBindBufferMemoryDeviceGroupInfo` structure, then that structure determines how memory is bound to buffers across multiple devices in a device group.

If `deviceIndexCount` is greater than zero, then on device index i the buffer is attached to the instance of `memory` on the physical device with device index `pDeviceIndices`[i].

If `deviceIndexCount` is zero and `memory` comes from a memory heap with the VK_MEMORY_HEAP_MULTI_INSTANCE_BIT bit set, then it is as if `pDeviceIndices` contains consecutive indices from zero to the number of physical devices in the logical device, minus one. In other words, by default each physical device attaches to its own instance of `memory`.

If `deviceIndexCount` is zero and `memory` comes from a memory heap without the VK_MEMORY_HEAP_MULTI_INSTANCE_BIT bit set, then it is as if `pDeviceIndices` contains an array of zeros. In other words, by default each physical device attaches to instance zero.

Valid Usage

- VUID-VkBindBufferMemoryDeviceGroupInfo-deviceIndexCount-01606
  `deviceIndexCount` must either be zero or equal to the number of physical devices in the logical device

- VUID-VkBindBufferMemoryDeviceGroupInfo-pDeviceIndices-01607
  All elements of `pDeviceIndices` must be valid device indices

Valid Usage (Implicit)

- VUID-VkBindBufferMemoryDeviceGroupInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO

- VUID-VkBindBufferMemoryDeviceGroupInfo-pDeviceIndices-parameter
  If `deviceIndexCount` is not `0`, `pDeviceIndices` must be a valid pointer to an array of `deviceIndexCount` `uint32_t` values

Structure Chaining

Extends the structure

  - VkBindBufferMemoryInfo

The `VkBindMemoryStatus` structure is defined as:

    // Provided by VK_VERSION_1_4
    typedef struct VkBindMemoryStatus {
        VkStructureType    sType;
        const void*        pNext;
        VkResult*          pResult;
    } VkBindMemoryStatus;

    // Provided by VK_KHR_maintenance6
    // Equivalent to VkBindMemoryStatus
    typedef VkBindMemoryStatus VkBindMemoryStatusKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `pResult` is a pointer to a VkResult value.

If the `pNext` chain of VkBindBufferMemoryInfo or VkBindImageMemoryInfo includes a `VkBindMemoryStatus` structure, then the `VkBindMemoryStatus`::`pResult` will be populated with a value describing the result of the corresponding memory binding operation.

Valid Usage (Implicit)

- VUID-VkBindMemoryStatus-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_BIND_MEMORY_STATUS

- VUID-VkBindMemoryStatus-pResult-parameter
  `pResult` must be a valid pointer to a VkResult value

Structure Chaining

Extends the structures

  - VkBindBufferMemoryInfo

  - VkBindImageMemoryInfo

To attach memory to a `VkImage` object created without the VK_IMAGE_CREATE_DISJOINT_BIT set, call:

    // Provided by VK_VERSION_1_0
    VkResult vkBindImageMemory(
        VkDevice                                    device,
        VkImage                                     image,
        VkDeviceMemory                              memory,
        VkDeviceSize                                memoryOffset);

- `device` is the logical device that owns the image and memory.

- `image` is the image.

- `memory` is the VkDeviceMemory object describing the device memory to attach.

- `memoryOffset` is the start offset of the region of `memory` which is to be bound to the image. The number of bytes returned in the `VkMemoryRequirements`::`size` member in `memory`, starting from `memoryOffset` bytes, will be bound to the specified image.

`vkBindImageMemory` is equivalent to passing the same parameters through VkBindImageMemoryInfo to vkBindImageMemory2.

Valid Usage

- VUID-vkBindImageMemory-image-07460
  `image` must not have been bound to a memory object

- VUID-vkBindImageMemory-image-01045
  `image` must not have been created with any sparse memory binding flags

- VUID-vkBindImageMemory-memoryOffset-01046
  `memoryOffset` must be less than the size of `memory`

- VUID-vkBindImageMemory-image-01445
  If `image` requires a dedicated allocation (as reported by vkGetImageMemoryRequirements2 in VkMemoryDedicatedRequirements::`requiresDedicatedAllocation` for `image`), `memory` must have been created with VkMemoryDedicatedAllocateInfo::`image` equal to `image`

- VUID-vkBindImageMemory-memory-02628
  If the `dedicatedAllocationImageAliasing` feature is not enabled, and the `VkMemoryAllocateInfo` provided when `memory` was allocated included a VkMemoryDedicatedAllocateInfo structure in its `pNext` chain, and VkMemoryDedicatedAllocateInfo::`image` was not VK_NULL_HANDLE, then `image` must equal VkMemoryDedicatedAllocateInfo::`image` and `memoryOffset` must be zero

- VUID-vkBindImageMemory-memory-02629
  If the `dedicatedAllocationImageAliasing` feature is enabled, and the `VkMemoryAllocateInfo` provided when `memory` was allocated included a VkMemoryDedicatedAllocateInfo structure in its `pNext` chain, and VkMemoryDedicatedAllocateInfo::`image` was not VK_NULL_HANDLE, then `memoryOffset` must be zero, and `image` must be either equal to VkMemoryDedicatedAllocateInfo::`image` or an image that was created using the same parameters in VkImageCreateInfo, with the exception that `extent` and `arrayLayers` may differ subject to the following restrictions: every dimension in the `extent` parameter of the image being bound must be equal to or smaller than the original image for which the allocation was created; and the `arrayLayers` parameter of the image being bound must be equal to or smaller than the original image for which the allocation was created

- VUID-vkBindImageMemory-memory-10926
  If the `VkMemoryAllocateInfo` provided when `memory` was allocated included a VkMemoryDedicatedAllocateInfo structure in its `pNext` chain, VkMemoryDedicatedAllocateInfo::`buffer` must have been VK_NULL_HANDLE

- VUID-vkBindImageMemory-None-01901
  If image was created with the VK_IMAGE_CREATE_PROTECTED_BIT bit set, the image must be bound to a memory object allocated with a memory type that reports VK_MEMORY_PROPERTY_PROTECTED_BIT

- VUID-vkBindImageMemory-None-01902
  If image was created with the VK_IMAGE_CREATE_PROTECTED_BIT bit not set, the image must not be bound to a memory object created with a memory type that reports VK_MEMORY_PROPERTY_PROTECTED_BIT

- VUID-vkBindImageMemory-image-01050
  If `image` was created with VkDedicatedAllocationImageCreateInfoNV::`dedicatedAllocation` equal to VK_TRUE, `memory` must have been created with VkDedicatedAllocationMemoryAllocateInfoNV::`image` equal to an image handle created with identical creation parameters to `image` and `memoryOffset` must be zero

- VUID-vkBindImageMemory-apiVersion-07921
  If the VK_KHR_dedicated_allocation extension is not enabled, VkPhysicalDeviceProperties::`apiVersion` is less than Vulkan 1.1, and `image` was not created with VkDedicatedAllocationImageCreateInfoNV::`dedicatedAllocation` equal to VK_TRUE, `memory` must not have been allocated dedicated for a specific buffer or image

- VUID-vkBindImageMemory-memory-02728
  If the value of VkExportMemoryAllocateInfo::`handleTypes` used to allocate `memory` is not `0`, it must include at least one of the handles set in VkExternalMemoryImageCreateInfo::`handleTypes` when `image` was created

- VUID-vkBindImageMemory-memory-02989
  If `memory` was created by a memory import operation, that is not VkImportAndroidHardwareBufferInfoANDROID with a non-`NULL` `buffer` value, the external handle type of the imported memory must also have been set in VkExternalMemoryImageCreateInfo::`handleTypes` when `image` was created

- VUID-vkBindImageMemory-memory-02990
  If `memory` was created with the VkImportAndroidHardwareBufferInfoANDROID memory import operation with a non-`NULL` `buffer` value, VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID must also have been set in VkExternalMemoryImageCreateInfo::`handleTypes` when `image` was created

- VUID-vkBindImageMemory-image-08113
  If the `image` was created with the VK_IMAGE_CREATE_DESCRIPTOR_HEAP_CAPTURE_REPLAY_BIT_EXT bit set, `memory` must have been allocated with the VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT bit set

- VUID-vkBindImageMemory-image-09202
  If the `image` was created with the VK_IMAGE_CREATE_DESCRIPTOR_HEAP_CAPTURE_REPLAY_BIT_EXT bit set, `memory` must have been allocated with the VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT bit set

- VUID-vkBindImageMemory-image-01608
  `image` must not have been created with the VK_IMAGE_CREATE_DISJOINT_BIT set

- VUID-vkBindImageMemory-memory-01047
  `memory` must have been allocated using one of the memory types allowed in the `memoryTypeBits` member of the `VkMemoryRequirements` structure returned from a call to vkGetImageMemoryRequirements with `image`

- VUID-vkBindImageMemory-None-10735
  If `memory` was not allocated from a memory heap with the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property set, `memoryOffset` must be an integer multiple of the `alignment` member of the `VkMemoryRequirements` structure returned from a call to vkGetImageMemoryRequirements with `image`

- VUID-vkBindImageMemory-memory-10736
  If `memory` was allocated from a memory heap with the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property set, `memoryOffset` must be an integer multiple of the `alignment` member of the `VkTileMemoryRequirementsQCOM` structure returned from a call to `vkGetImageMemoryRequirements2` with `image`

- VUID-vkBindImageMemory-None-10737
  If `memory` was not allocated from a memory heap with the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property set, `size` member of the `VkMemoryRequirements` structure returned from a call to `vkGetImageMemoryRequirements` with `image` must be less than or equal to the size of `memory` minus `memoryOffset`

- VUID-vkBindImageMemory-memory-10738
  If `memory` was allocated from a memory heap with the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property set, `size` member of the `VkTileMemoryRequirementsQCOM` structure returned from a call to `vkGetImageMemoryRequirements2` with `image` must be less than or equal to the size of `memory` minus `memoryOffset`

- VUID-vkBindImageMemory-image-06392
  If `image` was created with VkBufferCollectionImageCreateInfoFUCHSIA chained to VkImageCreateInfo::`pNext`, `memory` must be allocated with a VkImportMemoryBufferCollectionFUCHSIA chained to VkMemoryAllocateInfo::`pNext`

Valid Usage (Implicit)

- VUID-vkBindImageMemory-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkBindImageMemory-image-parameter
  `image` must be a valid VkImage handle

- VUID-vkBindImageMemory-memory-parameter
  `memory` must be a valid VkDeviceMemory handle

- VUID-vkBindImageMemory-image-parent
  `image` must have been created, allocated, or retrieved from `device`

- VUID-vkBindImageMemory-memory-parent
  `memory` must have been created, allocated, or retrieved from `device`

Host Synchronization

- Host access to `image` must be externally synchronized

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

To attach memory to image objects for one or more images at a time, call:

    // Provided by VK_VERSION_1_1
    VkResult vkBindImageMemory2(
        VkDevice                                    device,
        uint32_t                                    bindInfoCount,
        const VkBindImageMemoryInfo*                pBindInfos);

    // Provided by VK_KHR_bind_memory2
    // Equivalent to vkBindImageMemory2
    VkResult vkBindImageMemory2KHR(
        VkDevice                                    device,
        uint32_t                                    bindInfoCount,
        const VkBindImageMemoryInfo*                pBindInfos);

- `device` is the logical device that owns the images and memory.

- `bindInfoCount` is the number of elements in `pBindInfos`.

- `pBindInfos` is a pointer to an array of VkBindImageMemoryInfo structures, describing images and memory to bind.

On some implementations, it may be more efficient to batch memory bindings into a single command.

If the `maintenance6` feature is enabled, this command must attempt to perform all of the memory binding operations described by `pBindInfos`, and must not early exit on the first failure.

If any of the memory binding operations described by `pBindInfos` fail, the VkResult returned by this command must be the return value of any one of the memory binding operations which did not return VK_SUCCESS.

Note | If the `vkBindImageMemory2` command failed, VkBindMemoryStatus structures were not included in the `pNext` chains of each element of `pBindInfos`, and `bindInfoCount` was greater than one, then the images referenced by `pBindInfos` will be in an indeterminate state, and must not be used. Applications should destroy these images.

Valid Usage

- VUID-vkBindImageMemory2-pBindInfos-02858
  If any VkBindImageMemoryInfo::`image` was created with VK_IMAGE_CREATE_DISJOINT_BIT then all planes of VkBindImageMemoryInfo::`image` must be bound individually in separate `pBindInfos`

- VUID-vkBindImageMemory2-pBindInfos-04006
  `pBindInfos` must not refer to the same image subresource more than once

Valid Usage (Implicit)

- VUID-vkBindImageMemory2-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkBindImageMemory2-pBindInfos-parameter
  `pBindInfos` must be a valid pointer to an array of `bindInfoCount` valid VkBindImageMemoryInfo structures

- VUID-vkBindImageMemory2-bindInfoCount-arraylength
  `bindInfoCount` must be greater than `0`

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

`VkBindImageMemoryInfo` contains members corresponding to the parameters of vkBindImageMemory.

The `VkBindImageMemoryInfo` structure is defined as:

    // Provided by VK_VERSION_1_1
    typedef struct VkBindImageMemoryInfo {
        VkStructureType    sType;
        const void*        pNext;
        VkImage            image;
        VkDeviceMemory     memory;
        VkDeviceSize       memoryOffset;
    } VkBindImageMemoryInfo;

    // Provided by VK_KHR_bind_memory2
    // Equivalent to VkBindImageMemoryInfo
    typedef VkBindImageMemoryInfo VkBindImageMemoryInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `image` is the image to be attached to memory.

- `memory` is a VkDeviceMemory object describing the device memory to attach.

- `memoryOffset` is the start offset of the region of `memory` which is to be bound to the image. The number of bytes returned in the `VkMemoryRequirements`::`size` member in `memory`, starting from `memoryOffset` bytes, will be bound to the specified image.

Valid Usage

- VUID-VkBindImageMemoryInfo-image-07460
  `image` must not have been bound to a memory object

- VUID-VkBindImageMemoryInfo-image-01045
  `image` must not have been created with any sparse memory binding flags

- VUID-VkBindImageMemoryInfo-memoryOffset-01046
  `memoryOffset` must be less than the size of `memory`

- VUID-VkBindImageMemoryInfo-image-01445
  If `image` requires a dedicated allocation (as reported by vkGetImageMemoryRequirements2 in VkMemoryDedicatedRequirements::`requiresDedicatedAllocation` for `image`), `memory` must have been created with VkMemoryDedicatedAllocateInfo::`image` equal to `image`

- VUID-VkBindImageMemoryInfo-memory-02628
  If the `dedicatedAllocationImageAliasing` feature is not enabled, and the `VkMemoryAllocateInfo` provided when `memory` was allocated included a VkMemoryDedicatedAllocateInfo structure in its `pNext` chain, and VkMemoryDedicatedAllocateInfo::`image` was not VK_NULL_HANDLE, then `image` must equal VkMemoryDedicatedAllocateInfo::`image` and `memoryOffset` must be zero

- VUID-VkBindImageMemoryInfo-memory-02629
  If the `dedicatedAllocationImageAliasing` feature is enabled, and the `VkMemoryAllocateInfo` provided when `memory` was allocated included a VkMemoryDedicatedAllocateInfo structure in its `pNext` chain, and VkMemoryDedicatedAllocateInfo::`image` was not VK_NULL_HANDLE, then `memoryOffset` must be zero, and `image` must be either equal to VkMemoryDedicatedAllocateInfo::`image` or an image that was created using the same parameters in VkImageCreateInfo, with the exception that `extent` and `arrayLayers` may differ subject to the following restrictions: every dimension in the `extent` parameter of the image being bound must be equal to or smaller than the original image for which the allocation was created; and the `arrayLayers` parameter of the image being bound must be equal to or smaller than the original image for which the allocation was created

- VUID-VkBindImageMemoryInfo-memory-10926
  If the `VkMemoryAllocateInfo` provided when `memory` was allocated included a VkMemoryDedicatedAllocateInfo structure in its `pNext` chain, VkMemoryDedicatedAllocateInfo::`buffer` must have been VK_NULL_HANDLE

- VUID-VkBindImageMemoryInfo-None-01901
  If image was created with the VK_IMAGE_CREATE_PROTECTED_BIT bit set, the image must be bound to a memory object allocated with a memory type that reports VK_MEMORY_PROPERTY_PROTECTED_BIT

- VUID-VkBindImageMemoryInfo-None-01902
  If image was created with the VK_IMAGE_CREATE_PROTECTED_BIT bit not set, the image must not be bound to a memory object created with a memory type that reports VK_MEMORY_PROPERTY_PROTECTED_BIT

- VUID-VkBindImageMemoryInfo-image-01050
  If `image` was created with VkDedicatedAllocationImageCreateInfoNV::`dedicatedAllocation` equal to VK_TRUE, `memory` must have been created with VkDedicatedAllocationMemoryAllocateInfoNV::`image` equal to an image handle created with identical creation parameters to `image` and `memoryOffset` must be zero

- VUID-VkBindImageMemoryInfo-apiVersion-07921
  If the VK_KHR_dedicated_allocation extension is not enabled, VkPhysicalDeviceProperties::`apiVersion` is less than Vulkan 1.1, and `image` was not created with VkDedicatedAllocationImageCreateInfoNV::`dedicatedAllocation` equal to VK_TRUE, `memory` must not have been allocated dedicated for a specific buffer or image

- VUID-VkBindImageMemoryInfo-memory-02728
  If the value of VkExportMemoryAllocateInfo::`handleTypes` used to allocate `memory` is not `0`, it must include at least one of the handles set in VkExternalMemoryImageCreateInfo::`handleTypes` when `image` was created

- VUID-VkBindImageMemoryInfo-memory-02989
  If `memory` was created by a memory import operation, that is not VkImportAndroidHardwareBufferInfoANDROID with a non-`NULL` `buffer` value, the external handle type of the imported memory must also have been set in VkExternalMemoryImageCreateInfo::`handleTypes` when `image` was created

- VUID-VkBindImageMemoryInfo-memory-02990
  If `memory` was created with the VkImportAndroidHardwareBufferInfoANDROID memory import operation with a non-`NULL` `buffer` value, VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID must also have been set in VkExternalMemoryImageCreateInfo::`handleTypes` when `image` was created

- VUID-VkBindImageMemoryInfo-image-08113
  If the `image` was created with the VK_IMAGE_CREATE_DESCRIPTOR_HEAP_CAPTURE_REPLAY_BIT_EXT bit set, `memory` must have been allocated with the VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT bit set

- VUID-VkBindImageMemoryInfo-image-09202
  If the `image` was created with the VK_IMAGE_CREATE_DESCRIPTOR_HEAP_CAPTURE_REPLAY_BIT_EXT bit set, `memory` must have been allocated with the VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT bit set

- VUID-VkBindImageMemoryInfo-pNext-01615
  If the `pNext` chain does not include a VkBindImagePlaneMemoryInfo structure, and `memory` was not allocated from a memory heap with the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property set, then `memory` must have been allocated using one of the memory types allowed in the `memoryTypeBits` member of the VkMemoryRequirements structure returned from a call to vkGetImageMemoryRequirements2 with `image`

- VUID-VkBindImageMemoryInfo-pNext-01616
  If the `pNext` chain does not include a VkBindImagePlaneMemoryInfo structure, and `memory` was not allocated from a memory heap with the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property set, then `memoryOffset` must be an integer multiple of the `alignment` member of the VkMemoryRequirements structure returned from a call to vkGetImageMemoryRequirements2 with `image`

- VUID-VkBindImageMemoryInfo-pNext-01617
  If the `pNext` chain does not include a VkBindImagePlaneMemoryInfo structure, and `memory` was not allocated from a memory heap with the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property set, then the difference of the size of `memory` and `memoryOffset` must be greater than or equal to the `size` member of the VkMemoryRequirements structure returned from a call to vkGetImageMemoryRequirements2 with the same `image`

- VUID-VkBindImageMemoryInfo-pNext-12329
  If the `pNext` chain does not include a VkBindImagePlaneMemoryInfo structure, and `memory` was allocated from a memory heap with the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property set, then `memoryOffset` must be an integer multiple of the `alignment` member of the `VkTileMemoryRequirementsQCOM` structure returned from a call to `vkGetImageMemoryRequirements2` with `image`

- VUID-VkBindImageMemoryInfo-pNext-12330
  If the `pNext` chain does not include a VkBindImagePlaneMemoryInfo structure, and `memory` was allocated from a memory heap with the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property set, then `size` member of the `VkTileMemoryRequirementsQCOM` structure returned from a call to `vkGetImageMemoryRequirements2` with `image` must be less than or equal to the size of `memory` minus `memoryOffset`

- VUID-VkBindImageMemoryInfo-pNext-01618
  If the `pNext` chain includes a VkBindImagePlaneMemoryInfo structure, `image` must have been created with the VK_IMAGE_CREATE_DISJOINT_BIT bit set

- VUID-VkBindImageMemoryInfo-image-07736
  If `image` was created with the VK_IMAGE_CREATE_DISJOINT_BIT bit set, then the `pNext` chain must include a VkBindImagePlaneMemoryInfo structure

- VUID-VkBindImageMemoryInfo-pNext-01619
  If the `pNext` chain includes a VkBindImagePlaneMemoryInfo structure, `memory` must have been allocated using one of the memory types allowed in the `memoryTypeBits` member of the VkMemoryRequirements structure returned from a call to vkGetImageMemoryRequirements2 with `image` and where VkBindImagePlaneMemoryInfo::`planeAspect` corresponds to the VkImagePlaneMemoryRequirementsInfo::`planeAspect` in the VkImageMemoryRequirementsInfo2 structure’s `pNext` chain

- VUID-VkBindImageMemoryInfo-pNext-01620
  If the `pNext` chain includes a VkBindImagePlaneMemoryInfo structure, `memoryOffset` must be an integer multiple of the `alignment` member of the VkMemoryRequirements structure returned from a call to vkGetImageMemoryRequirements2 with `image` and where VkBindImagePlaneMemoryInfo::`planeAspect` corresponds to the VkImagePlaneMemoryRequirementsInfo::`planeAspect` in the VkImageMemoryRequirementsInfo2 structure’s `pNext` chain

- VUID-VkBindImageMemoryInfo-pNext-01621
  If the `pNext` chain includes a VkBindImagePlaneMemoryInfo structure, the difference of the size of `memory` and `memoryOffset` must be greater than or equal to the `size` member of the VkMemoryRequirements structure returned from a call to vkGetImageMemoryRequirements2 with the same `image` and where VkBindImagePlaneMemoryInfo::`planeAspect` corresponds to the VkImagePlaneMemoryRequirementsInfo::`planeAspect` in the VkImageMemoryRequirementsInfo2 structure’s `pNext` chain

- VUID-VkBindImageMemoryInfo-pNext-01626
  If the `pNext` chain includes a VkBindImageMemoryDeviceGroupInfo structure, all instances of `memory` specified by VkBindImageMemoryDeviceGroupInfo::`pDeviceIndices` must have been allocated

- VUID-VkBindImageMemoryInfo-pNext-01627
  If the `pNext` chain includes a VkBindImageMemoryDeviceGroupInfo structure, and VkBindImageMemoryDeviceGroupInfo::`splitInstanceBindRegionCount` is not zero, then `image` must have been created with the VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT bit set

- VUID-VkBindImageMemoryInfo-pNext-01628
  If the `pNext` chain includes a VkBindImageMemoryDeviceGroupInfo structure, all elements of VkBindImageMemoryDeviceGroupInfo::`pSplitInstanceBindRegions` must be valid rectangles contained within the dimensions of `image`

- VUID-VkBindImageMemoryInfo-pNext-01629
  If the `pNext` chain includes a VkBindImageMemoryDeviceGroupInfo structure, the union of the areas of all elements of VkBindImageMemoryDeviceGroupInfo::`pSplitInstanceBindRegions` that correspond to the same instance of `image` must cover the entire image

- VUID-VkBindImageMemoryInfo-image-01630
  If `image` was created with a valid swapchain handle in VkImageSwapchainCreateInfoKHR::`swapchain`, then the `pNext` chain must include a VkBindImageMemorySwapchainInfoKHR structure containing the same swapchain handle

- VUID-VkBindImageMemoryInfo-pNext-01631
  If the `pNext` chain includes a VkBindImageMemorySwapchainInfoKHR structure, `memory` must be VK_NULL_HANDLE

- VUID-VkBindImageMemoryInfo-pNext-01632
  If the `pNext` chain does not include a VkBindImageMemorySwapchainInfoKHR structure, `memory` must be a valid VkDeviceMemory handle

Valid Usage (Implicit)

- VUID-VkBindImageMemoryInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO

- VUID-VkBindImageMemoryInfo-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkBindImageMemoryDeviceGroupInfo, VkBindImageMemorySwapchainInfoKHR, VkBindImagePlaneMemoryInfo, or VkBindMemoryStatus

- VUID-VkBindImageMemoryInfo-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkBindImageMemoryInfo-image-parameter
  `image` must be a valid VkImage handle

- VUID-VkBindImageMemoryInfo-commonparent
  Both of `image`, and `memory` that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `image` must be externally synchronized

The `VkBindImageMemoryDeviceGroupInfo` structure is defined as:

    // Provided by VK_VERSION_1_1
    typedef struct VkBindImageMemoryDeviceGroupInfo {
        VkStructureType    sType;
        const void*        pNext;
        uint32_t           deviceIndexCount;
        const uint32_t*    pDeviceIndices;
        uint32_t           splitInstanceBindRegionCount;
        const VkRect2D*    pSplitInstanceBindRegions;
    } VkBindImageMemoryDeviceGroupInfo;

    // Provided by VK_KHR_bind_memory2 with VK_KHR_device_group
    // Equivalent to VkBindImageMemoryDeviceGroupInfo
    typedef VkBindImageMemoryDeviceGroupInfo VkBindImageMemoryDeviceGroupInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `deviceIndexCount` is the number of elements in `pDeviceIndices`.

- `pDeviceIndices` is a pointer to an array of device indices.

- `splitInstanceBindRegionCount` is the number of elements in `pSplitInstanceBindRegions`.

- `pSplitInstanceBindRegions` is a pointer to an array of VkRect2D structures describing which regions of the image are attached to each instance of memory.

If the `pNext` chain of VkBindImageMemoryInfo includes a `VkBindImageMemoryDeviceGroupInfo` structure, then that structure determines how memory is bound to images across multiple devices in a device group.

If `deviceIndexCount` is greater than zero, then on device index i `image` is attached to the instance of the memory on the physical device with device index `pDeviceIndices`[i].

Let N be the number of physical devices in the logical device. If `splitInstanceBindRegionCount` is greater than zero, then `pSplitInstanceBindRegions` is a pointer to an array of N2 rectangles, where the image region specified by the rectangle at element i*N+j in resource instance i is bound to the memory instance j. The blocks of the memory that are bound to each sparse image block region use an offset in memory, relative to `memoryOffset`, computed as if the whole image was being bound to a contiguous range of memory. In other words, horizontally adjacent image blocks use consecutive blocks of memory, vertically adjacent image blocks are separated by the number of bytes per block multiplied by the width in blocks of `image`, and the block at (0,0) corresponds to memory starting at `memoryOffset`.

If `splitInstanceBindRegionCount` and `deviceIndexCount` are zero and the memory comes from a memory heap with the VK_MEMORY_HEAP_MULTI_INSTANCE_BIT bit set, then it is as if `pDeviceIndices` contains consecutive indices from zero to the number of physical devices in the logical device, minus one. In other words, by default each physical device attaches to its own instance of the memory.

If `splitInstanceBindRegionCount` and `deviceIndexCount` are zero and the memory comes from a memory heap without the VK_MEMORY_HEAP_MULTI_INSTANCE_BIT bit set, then it is as if `pDeviceIndices` contains an array of zeros. In other words, by default each physical device attaches to instance zero.

Valid Usage

- VUID-VkBindImageMemoryDeviceGroupInfo-deviceIndexCount-01633
  At least one of `deviceIndexCount` and `splitInstanceBindRegionCount` must be zero

- VUID-VkBindImageMemoryDeviceGroupInfo-deviceIndexCount-01634
  `deviceIndexCount` must either be zero or equal to the number of physical devices in the logical device

- VUID-VkBindImageMemoryDeviceGroupInfo-pDeviceIndices-01635
  All elements of `pDeviceIndices` must be valid device indices

- VUID-VkBindImageMemoryDeviceGroupInfo-splitInstanceBindRegionCount-01636
  `splitInstanceBindRegionCount` must either be zero or equal to the number of physical devices in the logical device squared

- VUID-VkBindImageMemoryDeviceGroupInfo-pSplitInstanceBindRegions-01637
  Elements of `pSplitInstanceBindRegions` that correspond to the same instance of an image must not overlap

- VUID-VkBindImageMemoryDeviceGroupInfo-offset-01638
  The `offset.x` member of any element of `pSplitInstanceBindRegions` must be a multiple of the sparse image block width (`VkSparseImageFormatProperties`::`imageGranularity.width`) of all non-metadata aspects of the image

- VUID-VkBindImageMemoryDeviceGroupInfo-offset-01639
  The `offset.y` member of any element of `pSplitInstanceBindRegions` must be a multiple of the sparse image block height (`VkSparseImageFormatProperties`::`imageGranularity.height`) of all non-metadata aspects of the image

- VUID-VkBindImageMemoryDeviceGroupInfo-extent-01640
  The `extent.width` member of any element of `pSplitInstanceBindRegions` must either be a multiple of the sparse image block width of all non-metadata aspects of the image, or else `extent.width` + `offset.x` must equal the width of the image subresource

- VUID-VkBindImageMemoryDeviceGroupInfo-extent-01641
  The `extent.height` member of any element of `pSplitInstanceBindRegions` must either be a multiple of the sparse image block height of all non-metadata aspects of the image, or else `extent.height` + `offset.y` must equal the height of the image subresource

Valid Usage (Implicit)

- VUID-VkBindImageMemoryDeviceGroupInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO

- VUID-VkBindImageMemoryDeviceGroupInfo-pDeviceIndices-parameter
  If `deviceIndexCount` is not `0`, `pDeviceIndices` must be a valid pointer to an array of `deviceIndexCount` `uint32_t` values

- VUID-VkBindImageMemoryDeviceGroupInfo-pSplitInstanceBindRegions-parameter
  If `splitInstanceBindRegionCount` is not `0`, `pSplitInstanceBindRegions` must be a valid pointer to an array of `splitInstanceBindRegionCount` VkRect2D structures

Structure Chaining

Extends the structure

  - VkBindImageMemoryInfo

If the `pNext` chain of VkBindImageMemoryInfo includes a `VkBindImageMemorySwapchainInfoKHR` structure, then that structure includes a swapchain handle and image index indicating that the image will be bound to memory from that swapchain.

The `VkBindImageMemorySwapchainInfoKHR` structure is defined as:

    // Provided by VK_VERSION_1_1 with VK_KHR_swapchain, VK_KHR_device_group with VK_KHR_swapchain
    typedef struct VkBindImageMemorySwapchainInfoKHR {
        VkStructureType    sType;
        const void*        pNext;
        VkSwapchainKHR     swapchain;
        uint32_t           imageIndex;
    } VkBindImageMemorySwapchainInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `swapchain` is VK_NULL_HANDLE or a swapchain handle.

- `imageIndex` is an image index within `swapchain`.

If `swapchain` is not `NULL`, the `swapchain` and `imageIndex` are used to determine the memory that the image is bound to, instead of `memory` and `memoryOffset`.

Memory can be bound to a swapchain and use the `pDeviceIndices` or `pSplitInstanceBindRegions` members of VkBindImageMemoryDeviceGroupInfo.

Valid Usage

- VUID-VkBindImageMemorySwapchainInfoKHR-imageIndex-01644
  `imageIndex` must be less than the number of images in `swapchain`

- VUID-VkBindImageMemorySwapchainInfoKHR-swapchain-07756
  If the `swapchain` has been created with VK_SWAPCHAIN_CREATE_DEFERRED_MEMORY_ALLOCATION_BIT_KHR, `imageIndex` must be one that has previously been returned by vkAcquireNextImageKHR or vkAcquireNextImage2KHR

Valid Usage (Implicit)

- VUID-VkBindImageMemorySwapchainInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR

- VUID-VkBindImageMemorySwapchainInfoKHR-swapchain-parameter
  `swapchain` must be a valid VkSwapchainKHR handle

Host Synchronization

- Host access to `swapchain` must be externally synchronized

Structure Chaining

Extends the structure

  - VkBindImageMemoryInfo

In order to bind planes of a disjoint image, add a `VkBindImagePlaneMemoryInfo` structure to the `pNext` chain of VkBindImageMemoryInfo.

The `VkBindImagePlaneMemoryInfo` structure is defined as:

    // Provided by VK_VERSION_1_1
    typedef struct VkBindImagePlaneMemoryInfo {
        VkStructureType          sType;
        const void*              pNext;
        VkImageAspectFlagBits    planeAspect;
    } VkBindImagePlaneMemoryInfo;

    // Provided by VK_KHR_sampler_ycbcr_conversion
    // Equivalent to VkBindImagePlaneMemoryInfo
    typedef VkBindImagePlaneMemoryInfo VkBindImagePlaneMemoryInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `planeAspect` is a VkImageAspectFlagBits value specifying the aspect of the disjoint image plane to bind.

Valid Usage

- VUID-VkBindImagePlaneMemoryInfo-planeAspect-02283
  If the image’s `tiling` is VK_IMAGE_TILING_LINEAR or VK_IMAGE_TILING_OPTIMAL, then `planeAspect` must be a single valid multi-planar aspect mask bit

- VUID-VkBindImagePlaneMemoryInfo-planeAspect-02284
  If the image’s `tiling` is VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, then `planeAspect` must be a single valid memory plane for the image (that is, `aspectMask` must specify a plane index that is less than the VkDrmFormatModifierPropertiesEXT::`drmFormatModifierPlaneCount` associated with the image’s `format` and VkImageDrmFormatModifierPropertiesEXT::`drmFormatModifier`)

Valid Usage (Implicit)

- VUID-VkBindImagePlaneMemoryInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO

- VUID-VkBindImagePlaneMemoryInfo-planeAspect-parameter
  `planeAspect` must be a valid VkImageAspectFlagBits value

Structure Chaining

Extends the structure

  - VkBindImageMemoryInfo

To attach memory to tensor objects call:

    // Provided by VK_ARM_tensors
    VkResult vkBindTensorMemoryARM(
        VkDevice                                    device,
        uint32_t                                    bindInfoCount,
        const VkBindTensorMemoryInfoARM*            pBindInfos);

- `device` is the logical device that owns the buffers and memory.

- `bindInfoCount` is the number of elements in `pBindInfos`.

- `pBindInfos` is a pointer to an array of structures of type VkBindTensorMemoryInfoARM, describing tensors and memory to bind.

On some implementations, it may be more efficient to batch memory bindings into a single command.

Valid Usage (Implicit)

- VUID-vkBindTensorMemoryARM-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkBindTensorMemoryARM-pBindInfos-parameter
  `pBindInfos` must be a valid pointer to an array of `bindInfoCount` valid VkBindTensorMemoryInfoARM structures

- VUID-vkBindTensorMemoryARM-bindInfoCount-arraylength
  `bindInfoCount` must be greater than `0`

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkBindTensorMemoryInfoARM` structure is defined as:

    // Provided by VK_ARM_tensors
    typedef struct VkBindTensorMemoryInfoARM {
        VkStructureType    sType;
        const void*        pNext;
        VkTensorARM        tensor;
        VkDeviceMemory     memory;
        VkDeviceSize       memoryOffset;
    } VkBindTensorMemoryInfoARM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `tensor` is the tensor to be attached to memory.

- `memory` is a VkDeviceMemory object describing the device memory to attach.

- `memoryOffset` is the start offset of the region of `memory` which is to be bound to the tensor. The number of bytes returned in the `VkMemoryRequirements`::`size` member in `memory`, starting from `memoryOffset` bytes, will be bound to the specified tensor.

Valid Usage

- VUID-VkBindTensorMemoryInfoARM-tensor-09712
  `tensor` must not already be backed by a memory object

- VUID-VkBindTensorMemoryInfoARM-memoryOffset-09713
  `memoryOffset` must be less than the size of `memory`

- VUID-VkBindTensorMemoryInfoARM-memory-09714
  `memory` must have been allocated using one of the memory types allowed in the `memoryTypeBits` member of the `VkMemoryRequirements` structure returned from a call to `vkGetTensorMemoryRequirementsARM` with `tensor`

- VUID-VkBindTensorMemoryInfoARM-memoryOffset-09715
  `memoryOffset` must be an integer multiple of the `alignment` member of the `VkMemoryRequirements` structure returned from a call to `vkGetTensorMemoryRequirementsARM` with `tensor`

- VUID-VkBindTensorMemoryInfoARM-size-09716
  The `size` member of the `VkMemoryRequirements` structure returned from a call to `vkGetTensorMemoryRequirementsARM` with `tensor` must be less than or equal to the size of `memory` minus `memoryOffset`

- VUID-VkBindTensorMemoryInfoARM-tensor-09717
  If `tensor` requires a dedicated allocation (as reported by vkGetTensorMemoryRequirementsARM in VkMemoryDedicatedRequirements::`requiresDedicatedAllocation` for `tensor`), `memory` must have been created with VkMemoryDedicatedAllocateInfoTensorARM::`tensor` equal to `tensor`

- VUID-VkBindTensorMemoryInfoARM-memory-09806
  If the VkMemoryAllocateInfo provided when `memory` was allocated included a VkMemoryDedicatedAllocateInfoTensorARM structure in its `pNext` chain, and VkMemoryDedicatedAllocateInfoTensorARM::`tensor` was not VK_NULL_HANDLE, then `tensor` must equal VkMemoryDedicatedAllocateInfoTensorARM::`tensor`, and `memoryOffset` must be zero

- VUID-VkBindTensorMemoryInfoARM-memory-09895
  If the value of VkExportMemoryAllocateInfo::`handleTypes` used to allocate `memory` is not `0`, it must include at least one of the handles set in VkExternalMemoryTensorCreateInfoARM::`handleTypes` when `tensor` was created

- VUID-VkBindTensorMemoryInfoARM-memory-09896
  If `memory` was allocated by a memory import operation, that is not VkImportAndroidHardwareBufferInfoANDROID with a non-`NULL` `buffer` value, the external handle type of the imported memory must also have been set in VkExternalMemoryTensorCreateInfoARM::`handleTypes` when `tensor` was created

- VUID-VkBindTensorMemoryInfoARM-memory-09897
  If `memory` was allocated with the VkImportAndroidHardwareBufferInfoANDROID memory import operation with a non-`NULL` `buffer` value, VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID must also have been set in VkExternalMemoryTensorCreateInfoARM::`handleTypes` when `tensor` was created

- VUID-VkBindTensorMemoryInfoARM-tensor-09718
  If `tensor` was created with the VK_TENSOR_CREATE_PROTECTED_BIT_ARM bit set, the tensor must be bound to a memory object allocated with a memory type that reports VK_MEMORY_PROPERTY_PROTECTED_BIT

- VUID-VkBindTensorMemoryInfoARM-tensor-09719
  If `tensor` was created with the VK_TENSOR_CREATE_PROTECTED_BIT_ARM bit not set, the tensor must not be bound to a memory object allocated with a memory type that reports VK_MEMORY_PROPERTY_PROTECTED_BIT

- VUID-VkBindTensorMemoryInfoARM-tensor-09943
  If `tensor` was created with the VK_TENSOR_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_ARM bit set, `memory` must have been allocated with the VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT bit set

- VUID-VkBindTensorMemoryInfoARM-tensor-09944
  If `tensor` was created with the VK_TENSOR_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_ARM bit set, `memory` must have been allocated with the VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT bit set

- VUID-VkBindTensorMemoryInfoARM-tensor-11406
  If `tensor` was created with the VK_TENSOR_CREATE_DESCRIPTOR_HEAP_CAPTURE_REPLAY_BIT_ARM bit set, `memory` must have been allocated with the VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT bit set

- VUID-VkBindTensorMemoryInfoARM-tensor-11407
  If `tensor` was created with the VK_TENSOR_CREATE_DESCRIPTOR_HEAP_CAPTURE_REPLAY_BIT_ARM bit set, `memory` must have been allocated with the VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT bit set

Valid Usage (Implicit)

- VUID-VkBindTensorMemoryInfoARM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_BIND_TENSOR_MEMORY_INFO_ARM

- VUID-VkBindTensorMemoryInfoARM-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkBindTensorMemoryInfoARM-tensor-parameter
  `tensor` must be a valid VkTensorARM handle

- VUID-VkBindTensorMemoryInfoARM-memory-parameter
  `memory` must be a valid VkDeviceMemory handle

- VUID-VkBindTensorMemoryInfoARM-commonparent
  Both of `memory`, and `tensor` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `tensor` must be externally synchronized

#### 12.9.1. Buffer-Image Granularity

The implementation-dependent limit `bufferImageGranularity` specifies a page-like granularity at which linear and non-linear resources must be placed in adjacent memory locations to avoid aliasing. Two resources which do not satisfy this granularity requirement are said to alias. `bufferImageGranularity` is specified in bytes, and must be a power of two. Implementations which do not impose a granularity restriction may report a `bufferImageGranularity` value of one.

Note | Despite its name, `bufferImageGranularity` is really a granularity between “linear” and “non-linear” resources. The limit `bufferImageGranularity` also applies to tensor resources.

Given resourceA at the lower memory offset and resourceB at the higher memory offset in the same `VkDeviceMemory` object, where one resource is linear and the other is non-linear (as defined in the Glossary), and the following:

    resourceA.end       = resourceA.memoryOffset + resourceA.size - 1
    resourceA.endPage   = resourceA.end & ~(bufferImageGranularity-1)
    resourceB.start     = resourceB.memoryOffset
    resourceB.startPage = resourceB.start & ~(bufferImageGranularity-1)

The following property must hold:

    resourceA.endPage < resourceB.startPage

That is, the end of the first resource (A) and the beginning of the second resource (B) must be on separate “pages” of size `bufferImageGranularity`. `bufferImageGranularity` may be different than the physical page size of the memory heap. This restriction is only needed when a linear resource and a non-linear resource are adjacent in memory and will be used simultaneously. The memory ranges of adjacent resources can be closer than `bufferImageGranularity`, provided they meet the `alignment` requirement for the objects in question.

Sparse block size in bytes and sparse image and buffer memory alignments must all be multiples of the `bufferImageGranularity`. Therefore, memory bound to sparse resources naturally satisfies the `bufferImageGranularity`.

Note | The implementation-dependent limit, `bufferImageGranularity` also applies to tensor resources.

### 12.10. Resource Sharing Mode

Buffer and image objects are created with a sharing mode controlling how they can be accessed from queues. The supported sharing modes are:

    // Provided by VK_VERSION_1_0
    typedef enum VkSharingMode {
        VK_SHARING_MODE_EXCLUSIVE = 0,
        VK_SHARING_MODE_CONCURRENT = 1,
    } VkSharingMode;

- VK_SHARING_MODE_EXCLUSIVE specifies that access to any range or image subresource of the object will be exclusive to a single queue family at a time.

- VK_SHARING_MODE_CONCURRENT specifies that concurrent access to any range or image subresource of the object from multiple queue families is supported.

Note | VK_SHARING_MODE_CONCURRENT may result in lower performance access to the buffer or image than VK_SHARING_MODE_EXCLUSIVE.

Ranges of buffers and image subresources of image objects created using VK_SHARING_MODE_EXCLUSIVE must only be accessed by queues in the queue family that has ownership of the resource. Upon creation, such resources are not owned by any queue family; ownership is implicitly acquired upon first use within a queue. Once a resource using VK_SHARING_MODE_EXCLUSIVE is owned by some queue family, unless the `maintenance9` feature is enabled, the application must perform a queue family ownership transfer if it wishes to make the memory contents of a range or image subresource accessible to a different queue family. VK_SHARING_MODE_EXCLUSIVE resources that are already owned by a queue family may be acquired by a different queue family without a queue family ownership transfer, but unless the `maintenance9` feature is enabled, their contents become undefined.

If the `maintenance9` feature is enabled, the contents of buffer resources, and of linear image resources (i.e., those created with `tiling` set to VK_IMAGE_TILING_LINEAR) are always preserved when they are implicitly acquired by a different queue family on the same logical device (i.e., neither queue family is VK_QUEUE_FAMILY_FOREIGN_EXT or VK_QUEUE_FAMILY_EXTERNAL). This means that whenever the `maintenance9` feature is enabled, explicit queue family ownership transfers of buffer and linear image resources between different queue families on the same logical device are optional.

Additionally, if the `maintenance9` feature is enabled, the contents of some optimal image resources (i.e., those created with VK_IMAGE_TILING_OPTIMAL) are always preserved when they are implicitly acquired by a different queue family on the same logical device (i.e., neither queue family is VK_QUEUE_FAMILY_FOREIGN_EXT or VK_QUEUE_FAMILY_EXTERNAL). This applies only to optimal images that are being implicitly acquired by a queue family whose index bit is set in the current queue family’s VkQueueFamilyOwnershipTransferPropertiesKHR::`optimalImageTransferToQueueFamilies`, and that were created without any of the following bits set in `usage`:

- VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT

- VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT

- VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT

- VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT

- VK_IMAGE_USAGE_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT

- VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

This means that whenever the `maintenance9` feature is enabled, explicit queue family ownership transfers of such image resources between such combinations of queue families are optional. For all other optimal images and/or combinations of queue families, the application must still perform an explicit queue family ownership transfer if it wishes to make the memory contents of an optimal image subresource already owned by a queue family accessible to a different queue family.

Note | Applications are allowed to perform explicit queue family ownership transfers in circumstances where they are not required, but there is no functional nor performance advantage in doing so. Performing explicit transfers in such cases remains supported for backward compatibility and is not recommended for new applications.

Note | Before being used on the first queue, images still require a layout transition from these layouts: VK_IMAGE_LAYOUT_UNDEFINED VK_IMAGE_LAYOUT_PREINITIALIZED VK_IMAGE_LAYOUT_ZERO_INITIALIZED_EXT

A queue family can take ownership of an image subresource, tensor subresource, or buffer range of a resource created with VK_SHARING_MODE_EXCLUSIVE, without an ownership transfer, in the same way as for a resource that was just created; however, taking ownership in this way has the effect that the contents of the image subresource or buffer range are undefined.

Ranges of buffers, tensor subresources of tensor objects, and image subresources of image objects created using VK_SHARING_MODE_CONCURRENT must only be accessed by queues from the queue families specified through the `queueFamilyIndexCount` and `pQueueFamilyIndices` members of the corresponding create info structures.

#### 12.10.1. External Resource Sharing

Resources should only be accessed in the Vulkan instance that has exclusive ownership of their underlying memory. Only one Vulkan instance has exclusive ownership of a resource’s underlying memory at a given time, regardless of whether the resource was created using VK_SHARING_MODE_EXCLUSIVE or VK_SHARING_MODE_CONCURRENT. Applications can transfer ownership of a resource’s underlying memory only if the memory has been imported from or exported to another instance or external API using external memory handles. The semantics for transferring ownership outside of the instance are similar to those used for transferring ownership of VK_SHARING_MODE_EXCLUSIVE resources between queues, and is also accomplished using VkBufferMemoryBarrier or VkImageMemoryBarrier operations. To make the contents of the underlying memory accessible in the destination instance or API, applications must

1. Release exclusive ownership from the source instance or API.

2. Ensure the release operation has completed using semaphores or fences.

3. Acquire exclusive ownership in the destination instance or API

Unlike queue family ownership transfers, the destination instance or API is not specified explicitly when releasing ownership, nor is the source instance or API specified when acquiring ownership. Instead, the image or memory barrier’s `dstQueueFamilyIndex` or `srcQueueFamilyIndex` parameters are set to the reserved queue family index VK_QUEUE_FAMILY_EXTERNAL or VK_QUEUE_FAMILY_FOREIGN_EXT to represent the external destination or source respectively.

Binding a resource to a memory object shared between multiple Vulkan instances or other APIs does not change the ownership of the underlying memory. The first entity to access the resource implicitly acquires ownership. An entity can also implicitly take ownership from another entity in the same way without an explicit ownership transfer. However, taking ownership in this way has the effect that the contents of the underlying memory are undefined.

Accessing a resource backed by memory that is owned by a particular instance or API has the same semantics as accessing a VK_SHARING_MODE_EXCLUSIVE resource, with one exception: Implementations must ensure layout transitions performed on one member of a set of identical subresources of identical images that alias the same range of an underlying memory object affect the layout of all the subresources in the set.

As a corollary, writes to any image subresources in such a set must not make the contents of memory used by other subresources in the set undefined. An application can define the content of a subresource of one image by performing device writes to an identical subresource of another image provided both images are bound to the same region of external memory. Applications may also add resources to such a set after the content of the existing set members has been defined without making the content undefined by creating a new image with the initial layout VK_IMAGE_LAYOUT_UNDEFINED and binding it to the same region of external memory as the existing images.

Note | Because layout transitions apply to all identical images aliasing the same region of external memory, the actual layout of the memory backing a new image as well as an existing image with defined content will not be undefined. Such an image is not usable until it acquires ownership of its memory from the existing owner. Therefore, the layout specified as part of this transition will be the true initial layout of the image. The undefined layout specified when creating it is a placeholder to simplify valid usage requirements.

When sharing resources with other APIs, it is generally left to those APIs to define how they interact with the Vulkan concepts of image layouts and fine-grained synchronization. However, some external memory handle types require use of specific image layouts when transitioning to or from external usage, as defined in the external image implied layouts table.

### 12.11. Memory Aliasing

A range of a `VkDeviceMemory` allocation is aliased if it is bound to multiple resources simultaneously, as described below, via vkBindImageMemory, vkBindBufferMemory, vkBindAccelerationStructureMemoryNV, vkBindTensorMemoryARM, via sparse memory bindings, or by binding the memory to resources in multiple Vulkan instances or external APIs using external memory handle export and import mechanisms.

Consider two resources, resourceA and resourceB, bound respectively to memory rangeA and rangeB. Let paddedRangeA and paddedRangeB be, respectively, rangeA and rangeB aligned to `bufferImageGranularity`. If the resources are both linear or both non-linear (as defined in the Glossary), then the resources alias the memory in the intersection of rangeA and rangeB. If one resource is linear and the other is non-linear, then the resources alias the memory in the intersection of paddedRangeA and paddedRangeB.

Applications can alias memory, but use of multiple aliases is subject to several constraints.

Note | The implementation-dependent limit `bufferImageGranularity` also applies to tensor resources.

Note | Memory aliasing can be useful to reduce the total device memory footprint of an application, if some large resources are used for disjoint periods of time.

When a non-linear, non-VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT image is bound to an aliased range, all image subresources of the image overlap the range. When a linear image is bound to an aliased range, the image subresources that (according to the image’s advertised layout) include bytes from the aliased range overlap the range. When a VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT image has sparse image blocks bound to an aliased range, only image subresources including those sparse image blocks overlap the range, and when the memory bound to the image’s mip tail overlaps an aliased range all image subresources in the mip tail overlap the range.

Buffers, linear tensors, and linear image subresources are considered host-accessible subresources when they are in any of these layouts:

- VK_IMAGE_LAYOUT_PREINITIALIZED

- VK_IMAGE_LAYOUT_GENERAL

- VK_IMAGE_LAYOUT_ZERO_INITIALIZED_EXT

That is, the host has a well-defined addressing scheme to interpret the contents, and thus the layout of the data in memory can be consistently interpreted across aliases if each of those aliases is a host-accessible subresource. Non-linear images, non-linear tensors, and linear image subresources in other layouts, are not host-accessible.

If two aliases are both host-accessible, then they interpret the contents of the memory in consistent ways, and data written to one alias can be read by the other alias.

For an acceleration structure `AS_2` that is an alias of another acceleration structure `AS_1`, `AS_2` can be used in place of `AS_1` for operations acting on acceleration structures if the following conditions are met:

- The buffer referred to by the `buffer` member of the VkAccelerationStructureCreateInfoKHR that `AS_2` was created with must be bound to the same VkDeviceMemory as the buffer referred to by the `buffer` member of the VkAccelerationStructureCreateInfoKHR that `AS_1` was created with.

- The start of the memory range occupied by `AS_2`, defined by the sum of the `offset` member of the VkAccelerationStructureCreateInfoKHR that `AS_2` was created with and the offset at which the buffer associated with `AS_2` is bound to a VkDeviceMemory, must match the start of the memory range occupied by `AS_1`.

- If the `deviceAddress` member of the VkAccelerationStructureCreateInfoKHR that `AS_2` was created with is non-zero, it must match the `deviceAddress` member of the VkAccelerationStructureCreateInfoKHR that `AS_1` was created with.

- The `createFlags` member of the VkAccelerationStructureCreateInfoKHR that `AS_2` was created with must match the `createFlags` member of the VkAccelerationStructureCreateInfoKHR that `AS_1` was created with.

- The `type` member of the VkAccelerationStructureCreateInfoKHR that `AS_2` was created with must match the `type` member of the VkAccelerationStructureCreateInfoKHR that `AS_1` was created with.

- The `size` member of the VkAccelerationStructureCreateInfoKHR that `AS_2` was created with must be greater or equal to the `size` returned by vkGetAccelerationStructureBuildSizesKHR for the build parameters `AS_1` was built with.

After an acceleration structure object is destroyed, aliased acceleration structures may continue being used to refer to that acceleration structure for operations acting on acceleration structures.

If two aliases are both images that were created with identical creation parameters, both were created with the VK_IMAGE_CREATE_ALIAS_BIT flag set, and both are bound identically to memory except for VkBindImageMemoryDeviceGroupInfo::`pDeviceIndices` and VkBindImageMemoryDeviceGroupInfo::`pSplitInstanceBindRegions`, then they interpret the contents of the memory in consistent ways, and data written to one alias can be read by the other alias.

Additionally, if an individual plane of a multi-planar image and a single-plane image alias the same memory, then they also interpret the contents of the memory in consistent ways under the same conditions, but with the following modifications:

- Both must have been created with the VK_IMAGE_CREATE_DISJOINT_BIT flag.

- The single-plane image must have a VkFormat that is equivalent to that of the multi-planar image’s individual plane.

- The single-plane image and the individual plane of the multi-planar image must be bound identically to memory except for VkBindImageMemoryDeviceGroupInfo::`pDeviceIndices` and VkBindImageMemoryDeviceGroupInfo::`pSplitInstanceBindRegions`.

- The `width` and `height` of the single-plane image are derived from the multi-planar image’s dimensions in the manner listed for plane compatibility for the aliased plane.

- If either image’s `tiling` is VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, then both images must be linear.

- All other creation parameters must be identical

Aliases created by binding the same memory to resources in multiple Vulkan instances or external APIs using external memory handle export and import mechanisms interpret the contents of the memory in consistent ways, and data written to one alias can be read by the other alias.

Aliases created by binding the same memory to a tensor and an image subresource interpret the contents of the memory in consistent ways if and only if:

- The image was created with VK_IMAGE_TILING_LINEAR and the tensor was created with VK_TENSOR_TILING_LINEAR_ARM. The strides for the image subresource, as reported by vkGetImageSubresourceLayout, are compatible with strides passed when creating the tensor, i.e. VkTensorDescriptionARM::`pStrides`[`dimensionCount`-3] must be equal to VkSubresourceLayout::`rowPitch` if VkTensorDescriptionARM::`dimensionCount` is greater than 2 and VkTensorDescriptionARM::`pStrides`[`dimensionCount`-4] must be equal to VkSubresourceLayout::`depthPitch` if VkTensorDescriptionARM::`dimensionCount` is greater than 3.

- The image was created with VK_IMAGE_TILING_OPTIMAL and the tensor was created with VK_TENSOR_TILING_OPTIMAL_ARM. The image was created with the VK_IMAGE_USAGE_TENSOR_ALIASING_BIT_ARM usage flag set and the tensor was created with VK_TENSOR_USAGE_IMAGE_ALIASING_BIT_ARM.

- The format of the tensor must be compatible with that of the individual components of the format of the image.

- The number of dimensions of the tensor (VkTensorDescriptionARM::`dimensionCount`) is greater than or equal to the number of dimensions of the image (as specified by VkImageCreateInfo::`imageType`) plus 1.

- The size of the tensor along its innermost dimension (VkTensorDescriptionARM::`pDimensions`[`dimensionCount`-1]) is equal to the number of components of the format of the image (VkImageCreateInfo::`format`).

- The size of the tensor along all dimensions other than the N innermost dimensions necessary to represent the image (i.e. the number of dimensions of the image plus 1) must be 1.

- The image subresource is in the VK_IMAGE_LAYOUT_TENSOR_ALIASING_ARM layout if the image was created with VK_IMAGE_TILING_OPTIMAL and the `unifiedImageLayouts` feature is not enabled. If the `unifiedImageLayouts` feature if not enabled, the image must be transitioned to VK_IMAGE_LAYOUT_TENSOR_ALIASING_ARM prior to any reads via the tensor resource for those reads to return data consistent with that provided to the image writes. If the `unifiedImageLayouts` feature if not enabled, the image must be transitioned to VK_IMAGE_LAYOUT_TENSOR_ALIASING_ARM prior to any writes performed via the tensor resource for reads performed via the image resource to return data consistent with that provided to the tensor writes.

Otherwise, the aliases interpret the contents of the memory differently, and writes via one alias make the contents of memory partially or completely undefined to the other alias. If the first alias is a host-accessible subresource, then the bytes affected are those written by the memory operations according to its addressing scheme. If the first alias is not host-accessible, then the bytes affected are those overlapped by the image subresources that were written. If the second alias is a host-accessible subresource, the affected bytes become undefined. If the second alias is not host-accessible, all sparse image blocks (for sparse partially-resident images) or all image subresources (for non-sparse image and fully resident sparse images) that overlap the affected bytes become undefined.

If any image subresources are made undefined due to writes to an alias, then each of those image subresources must have its layout transitioned from VK_IMAGE_LAYOUT_UNDEFINED to a valid layout before it is used, from VK_IMAGE_LAYOUT_ZERO_INITIALIZED_EXT if it is zeroed, or from VK_IMAGE_LAYOUT_PREINITIALIZED if the memory has been written by the host. If any sparse blocks of a sparse image have been made undefined, then only the image subresources containing them must be transitioned.

Use of an overlapping range by two aliases must be separated by a memory dependency using the appropriate access types if at least one of those uses performs writes, whether the aliases interpret memory consistently or not. If buffer or image memory barriers are used, the scope of the barrier must contain the entire range and/or set of image subresources that overlap.

If two aliasing image views are used in the same framebuffer, then the render pass must declare the attachments using the VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT, and follow the other rules listed in that section.

Note | Memory recycled via an application suballocator (i.e. without freeing and reallocating the memory objects) is not substantially different from memory aliasing. However, a suballocator usually waits on a fence before recycling a region of memory, and signaling a fence involves sufficient implicit dependencies to satisfy all the above requirements.

#### 12.11.1. Resource Memory Overlap

Applications can safely access resources concurrently via separate device and host operations as long as the accessed memory locations are guaranteed to not overlap, as defined in Memory Location, and the operation, resource, and access are otherwise independently valid.

Some operations have alignment requirements or access ambiguous memory locations, so the semantics of a particular operation should be considered when determining the overlap. Such requirements will be described alongside the operation. Operations between host and device when using non-coherent memory are aligned to `nonCoherentAtomSize`, as defined by vkFlushMappedMemoryRanges and vkInvalidateMappedMemoryRanges.

Note | The intent is that buffers (or linear images) can be accessed concurrently, even when they share cache lines, but otherwise do not access the same memory range. The concept of a device cache line size is not exposed in the memory model.

### 12.12. Buffer Collections

Fuchsia’s FIDL-based Sysmem service interoperates with Vulkan via the `VK_FUCHSIA_buffer_collection` extension.

A buffer collection is a set of one or more buffers which were allocated together as a group and which all have the same properties. These properties describe the buffers' internal representation, such as its dimensions and memory layout. This ensures that all of the buffers can be used interchangeably by tasks that require swapping among multiple buffers, such as double-buffered graphics rendering.

On Fuchsia, the Sysmem service uses buffer collections as a core construct in its design.

Buffer collections are represented by `VkBufferCollectionFUCHSIA` handles:

    // Provided by VK_FUCHSIA_buffer_collection
    VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkBufferCollectionFUCHSIA)

#### 12.12.1. Definitions

- FIDL - Fuchsia Interface Definition Language. The declarative language used to define FIDL interprocess communication interfaces on Fuchsia. FIDL files use the `fidl` extension. FIDL is also used to refer to the services defined by interfaces declared in the FIDL language

- Sysmem - The FIDL service that facilitates optimal buffer sharing and reuse on Fuchsia

- client - Any participant of the buffer collection e.g. the Vulkan application

- token - A `zx_handle_t` Zircon channel object that allows participation in the buffer collection

#### 12.12.2. Platform Initialization for Buffer Collections

To initialize a buffer collection on Fuchsia:

- Connect to the Sysmem service to initialize a Sysmem allocator

- Create an initial buffer collection token using the Sysmem allocator

- Duplicate the token for each participant beyond the initiator

- See the Sysmem Overview and fuchsia.sysmem FIDL documentation on fuchsia.dev for more detailed information

#### 12.12.3. Create the Buffer Collection

To create a VkBufferCollectionFUCHSIA for Vulkan to participate in the buffer collection:

    // Provided by VK_FUCHSIA_buffer_collection
    VkResult vkCreateBufferCollectionFUCHSIA(
        VkDevice                                    device,
        const VkBufferCollectionCreateInfoFUCHSIA*  pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkBufferCollectionFUCHSIA*                  pCollection);

- `device` is the logical device that creates the `VkBufferCollectionFUCHSIA`

- `pCreateInfo` is a pointer to a VkBufferCollectionCreateInfoFUCHSIA structure containing parameters affecting creation of the buffer collection

- `pAllocator` is a pointer to a VkAllocationCallbacks structure controlling host memory allocation as described in the Memory Allocation chapter

- `pCollection` is a pointer to a VkBufferCollectionFUCHSIA handle in which the resulting buffer collection object is returned

Valid Usage (Implicit)

- VUID-vkCreateBufferCollectionFUCHSIA-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkCreateBufferCollectionFUCHSIA-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkBufferCollectionCreateInfoFUCHSIA structure

- VUID-vkCreateBufferCollectionFUCHSIA-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateBufferCollectionFUCHSIA-pCollection-parameter
  `pCollection` must be a valid pointer to a VkBufferCollectionFUCHSIA handle

- VUID-vkCreateBufferCollectionFUCHSIA-device-queuecount
  The device must have been created with at least `1` queue

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_INITIALIZATION_FAILED

  - VK_ERROR_INVALID_EXTERNAL_HANDLE

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

Host Access

All functions referencing a VkBufferCollectionFUCHSIA must be externally synchronized with the exception of `vkCreateBufferCollectionFUCHSIA`.

The `VkBufferCollectionCreateInfoFUCHSIA` structure is defined as:

    // Provided by VK_FUCHSIA_buffer_collection
    typedef struct VkBufferCollectionCreateInfoFUCHSIA {
        VkStructureType    sType;
        const void*        pNext;
        zx_handle_t        collectionToken;
    } VkBufferCollectionCreateInfoFUCHSIA;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure

- `collectionToken` is a `zx_handle_t` containing the Sysmem client’s buffer collection token

Valid Usage

- VUID-VkBufferCollectionCreateInfoFUCHSIA-collectionToken-06393
  `collectionToken` must be a valid `zx_handle_t` to a Zircon channel allocated from Sysmem (`fuchsia.sysmem.Allocator`/AllocateSharedCollection) with `ZX_DEFAULT_CHANNEL_RIGHTS` rights

Valid Usage (Implicit)

- VUID-VkBufferCollectionCreateInfoFUCHSIA-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_BUFFER_COLLECTION_CREATE_INFO_FUCHSIA

- VUID-VkBufferCollectionCreateInfoFUCHSIA-pNext-pNext
  `pNext` must be `NULL`

#### 12.12.4. Set the Constraints

Buffer collections can be established for VkImage allocations or VkBuffer allocations.

##### Set Image-Based Buffer Collection Constraints

Setting the constraints on the buffer collection initiates the format negotiation and allocation of the buffer collection. To set the constraints on a VkImage buffer collection, call:

    // Provided by VK_FUCHSIA_buffer_collection
    VkResult vkSetBufferCollectionImageConstraintsFUCHSIA(
        VkDevice                                    device,
        VkBufferCollectionFUCHSIA                   collection,
        const VkImageConstraintsInfoFUCHSIA*        pImageConstraintsInfo);

- `device` is the logical device

- `collection` is the VkBufferCollectionFUCHSIA handle

- `pImageConstraintsInfo` is a pointer to a VkImageConstraintsInfoFUCHSIA structure

`vkSetBufferCollectionImageConstraintsFUCHSIA` may fail if `pImageConstraintsInfo->formatConstraintsCount` is larger than the implementation-defined limit. If that occurs, vkSetBufferCollectionImageConstraintsFUCHSIA will return VK_ERROR_INITIALIZATION_FAILED.

`vkSetBufferCollectionImageConstraintsFUCHSIA` may fail if the implementation does not support any of the formats described by the `pImageConstraintsInfo` structure. If that occurs, vkSetBufferCollectionImageConstraintsFUCHSIA will return VK_ERROR_FORMAT_NOT_SUPPORTED.

Valid Usage

- VUID-vkSetBufferCollectionImageConstraintsFUCHSIA-collection-06394
  `vkSetBufferCollectionImageConstraintsFUCHSIA` or `vkSetBufferCollectionBufferConstraintsFUCHSIA` must not have already been called on `collection`

Valid Usage (Implicit)

- VUID-vkSetBufferCollectionImageConstraintsFUCHSIA-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkSetBufferCollectionImageConstraintsFUCHSIA-collection-parameter
  `collection` must be a valid VkBufferCollectionFUCHSIA handle

- VUID-vkSetBufferCollectionImageConstraintsFUCHSIA-pImageConstraintsInfo-parameter
  `pImageConstraintsInfo` must be a valid pointer to a valid VkImageConstraintsInfoFUCHSIA structure

- VUID-vkSetBufferCollectionImageConstraintsFUCHSIA-collection-parent
  `collection` must have been created, allocated, or retrieved from `device`

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_FORMAT_NOT_SUPPORTED

  - VK_ERROR_INITIALIZATION_FAILED

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkImageConstraintsInfoFUCHSIA` structure is defined as:

    // Provided by VK_FUCHSIA_buffer_collection
    typedef struct VkImageConstraintsInfoFUCHSIA {
        VkStructureType                               sType;
        const void*                                   pNext;
        uint32_t                                      formatConstraintsCount;
        const VkImageFormatConstraintsInfoFUCHSIA*    pFormatConstraints;
        VkBufferCollectionConstraintsInfoFUCHSIA      bufferCollectionConstraints;
        VkImageConstraintsInfoFlagsFUCHSIA            flags;
    } VkImageConstraintsInfoFUCHSIA;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `formatConstraintsCount` is the number of elements in `pFormatConstraints`.

- `pFormatConstraints` is a pointer to an array of VkImageFormatConstraintsInfoFUCHSIA structures of size `formatConstraintsCount` that is used to further constrain buffer collection format selection for image-based buffer collections.

- `bufferCollectionConstraints` is a VkBufferCollectionConstraintsInfoFUCHSIA structure used to supply parameters for the negotiation and allocation for buffer-based buffer collections.

- `flags` is a VkImageConstraintsInfoFlagBitsFUCHSIA value specifying hints about the type of memory Sysmem should allocate for the buffer collection.

Valid Usage

- VUID-VkImageConstraintsInfoFUCHSIA-pFormatConstraints-06395
  All elements of `pFormatConstraints` must have at least one bit set in its VkImageFormatConstraintsInfoFUCHSIA::`requiredFormatFeatures`

- VUID-VkImageConstraintsInfoFUCHSIA-pFormatConstraints-06396
  If `pFormatConstraints->imageCreateInfo->usage` contains VK_IMAGE_USAGE_SAMPLED_BIT, then `pFormatConstraints->requiredFormatFeatures` must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT

- VUID-VkImageConstraintsInfoFUCHSIA-pFormatConstraints-06397
  If `pFormatConstraints->imageCreateInfo->usage` contains VK_IMAGE_USAGE_STORAGE_BIT, then `pFormatConstraints->requiredFormatFeatures` must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT

- VUID-VkImageConstraintsInfoFUCHSIA-pFormatConstraints-06398
  If `pFormatConstraints->imageCreateInfo->usage` contains VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, then `pFormatConstraints->requiredFormatFeatures` must contain VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT

- VUID-VkImageConstraintsInfoFUCHSIA-pFormatConstraints-06399
  If `pFormatConstraints->imageCreateInfo->usage` contains VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, then `pFormatConstraints->requiredFormatFeatures` must contain VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT

- VUID-VkImageConstraintsInfoFUCHSIA-pFormatConstraints-06400
  If `pFormatConstraints->imageCreateInfo->usage` contains VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT, then `pFormatConstraints->requiredFormatFeatures` must contain at least one of VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT or VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT

- VUID-VkImageConstraintsInfoFUCHSIA-attachmentFragmentShadingRate-06401
  If the `attachmentFragmentShadingRate` feature is enabled, and `pFormatConstraints->imageCreateInfo->usage` contains VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR, then `pFormatConstraints->requiredFormatFeatures` must contain VK_FORMAT_FEATURE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

Valid Usage (Implicit)

- VUID-VkImageConstraintsInfoFUCHSIA-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_IMAGE_CONSTRAINTS_INFO_FUCHSIA

- VUID-VkImageConstraintsInfoFUCHSIA-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkImageConstraintsInfoFUCHSIA-pFormatConstraints-parameter
  `pFormatConstraints` must be a valid pointer to an array of `formatConstraintsCount` valid VkImageFormatConstraintsInfoFUCHSIA structures

- VUID-VkImageConstraintsInfoFUCHSIA-bufferCollectionConstraints-parameter
  `bufferCollectionConstraints` must be a valid VkBufferCollectionConstraintsInfoFUCHSIA structure

- VUID-VkImageConstraintsInfoFUCHSIA-flags-parameter
  `flags` must be a valid combination of VkImageConstraintsInfoFlagBitsFUCHSIA values

- VUID-VkImageConstraintsInfoFUCHSIA-formatConstraintsCount-arraylength
  `formatConstraintsCount` must be greater than `0`

    // Provided by VK_FUCHSIA_buffer_collection
    typedef VkFlags VkImageConstraintsInfoFlagsFUCHSIA;

`VkImageConstraintsInfoFlagsFUCHSIA` is a bitmask type for setting a mask of zero or more VkImageConstraintsInfoFlagBitsFUCHSIA bits.

Bits which can be set in VkImageConstraintsInfoFlagBitsFUCHSIA::`flags` include:

    // Provided by VK_FUCHSIA_buffer_collection
    typedef enum VkImageConstraintsInfoFlagBitsFUCHSIA {
        VK_IMAGE_CONSTRAINTS_INFO_CPU_READ_RARELY_FUCHSIA = 0x00000001,
        VK_IMAGE_CONSTRAINTS_INFO_CPU_READ_OFTEN_FUCHSIA = 0x00000002,
        VK_IMAGE_CONSTRAINTS_INFO_CPU_WRITE_RARELY_FUCHSIA = 0x00000004,
        VK_IMAGE_CONSTRAINTS_INFO_CPU_WRITE_OFTEN_FUCHSIA = 0x00000008,
        VK_IMAGE_CONSTRAINTS_INFO_PROTECTED_OPTIONAL_FUCHSIA = 0x00000010,
    } VkImageConstraintsInfoFlagBitsFUCHSIA;

General hints about the type of memory that should be allocated by Sysmem based on the expected usage of the images in the buffer collection include:

- VK_IMAGE_CONSTRAINTS_INFO_CPU_READ_RARELY_FUCHSIA

- VK_IMAGE_CONSTRAINTS_INFO_CPU_READ_OFTEN_FUCHSIA

- VK_IMAGE_CONSTRAINTS_INFO_CPU_WRITE_RARELY_FUCHSIA

- VK_IMAGE_CONSTRAINTS_INFO_CPU_WRITE_OFTEN_FUCHSIA

For protected memory:

- VK_IMAGE_CONSTRAINTS_INFO_PROTECTED_OPTIONAL_FUCHSIA specifies that protected memory is optional for the buffer collection.

Note that if all participants in the buffer collection (Vulkan or otherwise) specify that protected memory is optional, Sysmem will not allocate protected memory.

The `VkImageFormatConstraintsInfoFUCHSIA` structure is defined as:

    // Provided by VK_FUCHSIA_buffer_collection
    typedef struct VkImageFormatConstraintsInfoFUCHSIA {
        VkStructureType                         sType;
        const void*                             pNext;
        VkImageCreateInfo                       imageCreateInfo;
        VkFormatFeatureFlags                    requiredFormatFeatures;
        VkImageFormatConstraintsFlagsFUCHSIA    flags;
        uint64_t                                sysmemPixelFormat;
        uint32_t                                colorSpaceCount;
        const VkSysmemColorSpaceFUCHSIA*        pColorSpaces;
    } VkImageFormatConstraintsInfoFUCHSIA;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure

- `imageCreateInfo` is the VkImageCreateInfo used to create a VkImage that is to use memory from the VkBufferCollectionFUCHSIA

- `requiredFormatFeatures` is a bitmask of VkFormatFeatureFlagBits specifying required features of the buffers in the buffer collection

- `flags` is reserved for future use

- `sysmemPixelFormat` is a `PixelFormatType` value from the `fuchsia.sysmem/image_formats.fidl` FIDL interface

- `colorSpaceCount` is the element count of `pColorSpaces`

- `pColorSpaces` is a pointer to an array of VkSysmemColorSpaceFUCHSIA structs of size `colorSpaceCount`

Valid Usage (Implicit)

- VUID-VkImageFormatConstraintsInfoFUCHSIA-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_IMAGE_FORMAT_CONSTRAINTS_INFO_FUCHSIA

- VUID-VkImageFormatConstraintsInfoFUCHSIA-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkImageFormatConstraintsInfoFUCHSIA-imageCreateInfo-parameter
  `imageCreateInfo` must be a valid VkImageCreateInfo structure

- VUID-VkImageFormatConstraintsInfoFUCHSIA-requiredFormatFeatures-parameter
  `requiredFormatFeatures` must be a valid combination of VkFormatFeatureFlagBits values

- VUID-VkImageFormatConstraintsInfoFUCHSIA-requiredFormatFeatures-requiredbitmask
  `requiredFormatFeatures` must not be `0`

- VUID-VkImageFormatConstraintsInfoFUCHSIA-flags-zerobitmask
  `flags` must be `0`

- VUID-VkImageFormatConstraintsInfoFUCHSIA-pColorSpaces-parameter
  `pColorSpaces` must be a valid pointer to an array of `colorSpaceCount` valid VkSysmemColorSpaceFUCHSIA structures

- VUID-VkImageFormatConstraintsInfoFUCHSIA-colorSpaceCount-arraylength
  `colorSpaceCount` must be greater than `0`

    // Provided by VK_FUCHSIA_buffer_collection
    typedef VkFlags VkImageFormatConstraintsFlagsFUCHSIA;

`VkImageFormatConstraintsFlagsFUCHSIA` is a bitmask type for setting a mask, but is currently reserved for future use.

The `VkBufferCollectionConstraintsInfoFUCHSIA` structure is defined as:

    // Provided by VK_FUCHSIA_buffer_collection
    typedef struct VkBufferCollectionConstraintsInfoFUCHSIA {
        VkStructureType    sType;
        const void*        pNext;
        uint32_t           minBufferCount;
        uint32_t           maxBufferCount;
        uint32_t           minBufferCountForCamping;
        uint32_t           minBufferCountForDedicatedSlack;
        uint32_t           minBufferCountForSharedSlack;
    } VkBufferCollectionConstraintsInfoFUCHSIA;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure

- `minBufferCount` is the minimum number of buffers available in the collection

- `maxBufferCount` is the maximum number of buffers allowed in the collection

- `minBufferCountForCamping` is the per-participant minimum buffers for camping

- `minBufferCountForDedicatedSlack` is the per-participant minimum buffers for dedicated slack

- `minBufferCountForSharedSlack` is the per-participant minimum buffers for shared slack

Sysmem uses all buffer count parameters in combination to determine the number of buffers it will allocate. Sysmem defines buffer count constraints in `fuchsia.sysmem/constraints.fidl`.

Camping as referred to by `minBufferCountForCamping`, is the number of buffers that should be available for the participant that are not for transient use. This number of buffers is required for the participant to logically operate.

Slack as referred to by `minBufferCountForDedicatedSlack` and `minBufferCountForSharedSlack`, refers to the number of buffers desired by participants for optimal performance. `minBufferCountForDedicatedSlack` refers to the current participant. `minBufferCountForSharedSlack` refers to buffer slack for all participants in the collection.

Valid Usage (Implicit)

- VUID-VkBufferCollectionConstraintsInfoFUCHSIA-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_BUFFER_COLLECTION_CONSTRAINTS_INFO_FUCHSIA

- VUID-VkBufferCollectionConstraintsInfoFUCHSIA-pNext-pNext
  `pNext` must be `NULL`

The `VkSysmemColorSpaceFUCHSIA` structure is defined as:

    // Provided by VK_FUCHSIA_buffer_collection
    typedef struct VkSysmemColorSpaceFUCHSIA {
        VkStructureType    sType;
        const void*        pNext;
        uint32_t           colorSpace;
    } VkSysmemColorSpaceFUCHSIA;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure

- `colorSpace` value of the Sysmem `ColorSpaceType`

Valid Usage

- VUID-VkSysmemColorSpaceFUCHSIA-colorSpace-06402
  `colorSpace` must be a `ColorSpaceType` as defined in `fuchsia.sysmem/image_formats.fidl`

Valid Usage (Implicit)

- VUID-VkSysmemColorSpaceFUCHSIA-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SYSMEM_COLOR_SPACE_FUCHSIA

- VUID-VkSysmemColorSpaceFUCHSIA-pNext-pNext
  `pNext` must be `NULL`

##### Set Buffer-Based Buffer Collection Constraints

To set the constraints on a VkBuffer buffer collection, call:

    // Provided by VK_FUCHSIA_buffer_collection
    VkResult vkSetBufferCollectionBufferConstraintsFUCHSIA(
        VkDevice                                    device,
        VkBufferCollectionFUCHSIA                   collection,
        const VkBufferConstraintsInfoFUCHSIA*       pBufferConstraintsInfo);

- `device` is the logical device

- `collection` is the VkBufferCollectionFUCHSIA handle

- `pBufferConstraintsInfo` is a pointer to a VkBufferConstraintsInfoFUCHSIA structure

`vkSetBufferCollectionBufferConstraintsFUCHSIA` may fail if the implementation does not support the constraints specified in the `bufferCollectionConstraints` structure. If that occurs, vkSetBufferCollectionBufferConstraintsFUCHSIA will return VK_ERROR_FORMAT_NOT_SUPPORTED.

Valid Usage

- VUID-vkSetBufferCollectionBufferConstraintsFUCHSIA-collection-06403
  `vkSetBufferCollectionImageConstraintsFUCHSIA` or `vkSetBufferCollectionBufferConstraintsFUCHSIA` must not have already been called on `collection`

Valid Usage (Implicit)

- VUID-vkSetBufferCollectionBufferConstraintsFUCHSIA-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkSetBufferCollectionBufferConstraintsFUCHSIA-collection-parameter
  `collection` must be a valid VkBufferCollectionFUCHSIA handle

- VUID-vkSetBufferCollectionBufferConstraintsFUCHSIA-pBufferConstraintsInfo-parameter
  `pBufferConstraintsInfo` must be a valid pointer to a valid VkBufferConstraintsInfoFUCHSIA structure

- VUID-vkSetBufferCollectionBufferConstraintsFUCHSIA-collection-parent
  `collection` must have been created, allocated, or retrieved from `device`

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_FORMAT_NOT_SUPPORTED

  - VK_ERROR_INITIALIZATION_FAILED

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkBufferConstraintsInfoFUCHSIA` structure is defined as:

    // Provided by VK_FUCHSIA_buffer_collection
    typedef struct VkBufferConstraintsInfoFUCHSIA {
        VkStructureType                             sType;
        const void*                                 pNext;
        VkBufferCreateInfo                          createInfo;
        VkFormatFeatureFlags                        requiredFormatFeatures;
        VkBufferCollectionConstraintsInfoFUCHSIA    bufferCollectionConstraints;
    } VkBufferConstraintsInfoFUCHSIA;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure

- `createInfo` is a pointer to a VkBufferCreateInfo struct describing the buffer attributes for the buffer collection

- `requiredFormatFeatures` is a bitmask of VkFormatFeatureFlagBits required features of the buffers in the buffer collection

- `bufferCollectionConstraints` is used to supply parameters for the negotiation and allocation of the buffer collection

Valid Usage

- VUID-VkBufferConstraintsInfoFUCHSIA-requiredFormatFeatures-06404
  The `requiredFormatFeatures` bitmask of VkFormatFeatureFlagBits must be chosen from among the buffer compatible format features listed in buffer compatible format features

Valid Usage (Implicit)

- VUID-VkBufferConstraintsInfoFUCHSIA-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_BUFFER_CONSTRAINTS_INFO_FUCHSIA

- VUID-VkBufferConstraintsInfoFUCHSIA-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkBufferConstraintsInfoFUCHSIA-createInfo-parameter
  `createInfo` must be a valid VkBufferCreateInfo structure

- VUID-VkBufferConstraintsInfoFUCHSIA-requiredFormatFeatures-parameter
  `requiredFormatFeatures` must be a valid combination of VkFormatFeatureFlagBits values

- VUID-VkBufferConstraintsInfoFUCHSIA-bufferCollectionConstraints-parameter
  `bufferCollectionConstraints` must be a valid VkBufferCollectionConstraintsInfoFUCHSIA structure

#### 12.12.5. Retrieve Buffer Collection Properties

After constraints have been set on the buffer collection by calling vkSetBufferCollectionImageConstraintsFUCHSIA or vkSetBufferCollectionBufferConstraintsFUCHSIA, call `vkGetBufferCollectionPropertiesFUCHSIA` to retrieve the negotiated and finalized properties of the buffer collection.

The call to `vkGetBufferCollectionPropertiesFUCHSIA` is synchronous. It waits for the Sysmem format negotiation and buffer collection allocation to complete before returning.

    // Provided by VK_FUCHSIA_buffer_collection
    VkResult vkGetBufferCollectionPropertiesFUCHSIA(
        VkDevice                                    device,
        VkBufferCollectionFUCHSIA                   collection,
        VkBufferCollectionPropertiesFUCHSIA*        pProperties);

- `device` is the logical device handle

- `collection` is the VkBufferCollectionFUCHSIA handle

- `pProperties` is a pointer to the retrieved VkBufferCollectionPropertiesFUCHSIA struct

For image-based buffer collections, upon calling `vkGetBufferCollectionPropertiesFUCHSIA`, Sysmem will choose an element of the VkImageConstraintsInfoFUCHSIA::`pImageCreateInfos` established by the preceding call to vkSetBufferCollectionImageConstraintsFUCHSIA. The index of the element chosen is stored in and can be retrieved from VkBufferCollectionPropertiesFUCHSIA::`createInfoIndex`.

For buffer-based buffer collections, a single VkBufferCreateInfo is specified as VkBufferConstraintsInfoFUCHSIA::`createInfo`. VkBufferCollectionPropertiesFUCHSIA::`createInfoIndex` will therefore always be zero.

`vkGetBufferCollectionPropertiesFUCHSIA` may fail if Sysmem is unable to resolve the constraints of all of the participants in the buffer collection. If that occurs, `vkGetBufferCollectionPropertiesFUCHSIA` will return VK_ERROR_INITIALIZATION_FAILED.

Valid Usage

- VUID-vkGetBufferCollectionPropertiesFUCHSIA-None-06405
  Prior to calling vkGetBufferCollectionPropertiesFUCHSIA, the constraints on the buffer collection must have been set by either vkSetBufferCollectionImageConstraintsFUCHSIA or vkSetBufferCollectionBufferConstraintsFUCHSIA

Valid Usage (Implicit)

- VUID-vkGetBufferCollectionPropertiesFUCHSIA-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetBufferCollectionPropertiesFUCHSIA-collection-parameter
  `collection` must be a valid VkBufferCollectionFUCHSIA handle

- VUID-vkGetBufferCollectionPropertiesFUCHSIA-pProperties-parameter
  `pProperties` must be a valid pointer to a VkBufferCollectionPropertiesFUCHSIA structure

- VUID-vkGetBufferCollectionPropertiesFUCHSIA-collection-parent
  `collection` must have been created, allocated, or retrieved from `device`

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_INITIALIZATION_FAILED

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkBufferCollectionPropertiesFUCHSIA` structure is defined as:

    // Provided by VK_FUCHSIA_buffer_collection
    typedef struct VkBufferCollectionPropertiesFUCHSIA {
        VkStructureType                  sType;
        void*                            pNext;
        uint32_t                         memoryTypeBits;
        uint32_t                         bufferCount;
        uint32_t                         createInfoIndex;
        uint64_t                         sysmemPixelFormat;
        VkFormatFeatureFlags             formatFeatures;
        VkSysmemColorSpaceFUCHSIA        sysmemColorSpaceIndex;
        VkComponentMapping               samplerYcbcrConversionComponents;
        VkSamplerYcbcrModelConversion    suggestedYcbcrModel;
        VkSamplerYcbcrRange              suggestedYcbcrRange;
        VkChromaLocation                 suggestedXChromaOffset;
        VkChromaLocation                 suggestedYChromaOffset;
    } VkBufferCollectionPropertiesFUCHSIA;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure

- `memoryTypeBits` is a bitmask containing one bit set for every memory type which the buffer collection can be imported as buffer collection

- `bufferCount` is the number of buffers in the collection

- `createInfoIndex` as described in Sysmem chosen create infos

- `sysmemPixelFormat` is the Sysmem `PixelFormatType` as defined in `fuchsia.sysmem/image_formats.fidl`

- `formatFeatures` is a bitmask of VkFormatFeatureFlagBits shared by the buffer collection

- `sysmemColorSpaceIndex` is a VkSysmemColorSpaceFUCHSIA struct specifying the color space

- `samplerYcbcrConversionComponents` is a VkComponentMapping structure specifying the component mapping

- `suggestedYcbcrModel` is a VkSamplerYcbcrModelConversion value specifying the suggested Y′CBCR model

- `suggestedYcbcrRange` is a VkSamplerYcbcrRange value specifying the suggested Y′CBCR range

- `suggestedXChromaOffset` is a VkChromaLocation value specifying the suggested X chroma offset

- `suggestedYChromaOffset` is a VkChromaLocation value specifying the suggested Y chroma offset

`sysmemColorSpace` is only set for image-based buffer collections where the constraints were specified using VkImageConstraintsInfoFUCHSIA in a call to vkSetBufferCollectionImageConstraintsFUCHSIA.

For image-based buffer collections, `createInfoIndex` will identify both the VkImageConstraintsInfoFUCHSIA::`pImageCreateInfos` element and the VkImageConstraintsInfoFUCHSIA::`pFormatConstraints` element chosen by Sysmem when vkSetBufferCollectionImageConstraintsFUCHSIA was called. The value of `sysmemColorSpaceIndex` will be an index to one of the color spaces provided in the VkImageFormatConstraintsInfoFUCHSIA::`pColorSpaces` array.

The implementation must have `formatFeatures` with all bits set that were set in VkImageFormatConstraintsInfoFUCHSIA::`requiredFormatFeatures`, by the call to vkSetBufferCollectionImageConstraintsFUCHSIA, at `createInfoIndex` (other bits could be set as well).

Valid Usage (Implicit)

- VUID-VkBufferCollectionPropertiesFUCHSIA-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_BUFFER_COLLECTION_PROPERTIES_FUCHSIA

- VUID-VkBufferCollectionPropertiesFUCHSIA-pNext-pNext
  `pNext` must be `NULL`

#### 12.12.6. Memory Allocation

To import memory from a buffer collection into a VkImage or a VkBuffer, chain a VkImportMemoryBufferCollectionFUCHSIA structure to the `pNext` member of the VkMemoryAllocateInfo in the call to vkAllocateMemory.

The `VkImportMemoryBufferCollectionFUCHSIA` structure is defined as:

    // Provided by VK_FUCHSIA_buffer_collection
    typedef struct VkImportMemoryBufferCollectionFUCHSIA {
        VkStructureType              sType;
        const void*                  pNext;
        VkBufferCollectionFUCHSIA    collection;
        uint32_t                     index;
    } VkImportMemoryBufferCollectionFUCHSIA;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure

- `collection` is the VkBufferCollectionFUCHSIA handle

- `index` is the index of the buffer to import from `collection`

Valid Usage

- VUID-VkImportMemoryBufferCollectionFUCHSIA-index-06406
  `index` must be less than the value retrieved as VkBufferCollectionPropertiesFUCHSIA::`bufferCount`

Valid Usage (Implicit)

- VUID-VkImportMemoryBufferCollectionFUCHSIA-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_IMPORT_MEMORY_BUFFER_COLLECTION_FUCHSIA

- VUID-VkImportMemoryBufferCollectionFUCHSIA-collection-parameter
  `collection` must be a valid VkBufferCollectionFUCHSIA handle

Structure Chaining

Extends the structure

  - VkMemoryAllocateInfo

To release a VkBufferCollectionFUCHSIA:

    // Provided by VK_FUCHSIA_buffer_collection
    void vkDestroyBufferCollectionFUCHSIA(
        VkDevice                                    device,
        VkBufferCollectionFUCHSIA                   collection,
        const VkAllocationCallbacks*                pAllocator);

- `device` is the logical device that creates the `VkBufferCollectionFUCHSIA`

- `collection` is the VkBufferCollectionFUCHSIA handle

- `pAllocator` is a pointer to a VkAllocationCallbacks structure controlling host memory allocation as described in the Memory Allocation chapter

Valid Usage

- VUID-vkDestroyBufferCollectionFUCHSIA-collection-06407
  VkImage and VkBuffer objects that referenced `collection` upon creation by inclusion of a VkBufferCollectionImageCreateInfoFUCHSIA or VkBufferCollectionBufferCreateInfoFUCHSIA chained to their VkImageCreateInfo or VkBufferCreateInfo structures respectively, may outlive `collection`

Valid Usage (Implicit)

- VUID-vkDestroyBufferCollectionFUCHSIA-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkDestroyBufferCollectionFUCHSIA-collection-parameter
  `collection` must be a valid VkBufferCollectionFUCHSIA handle

- VUID-vkDestroyBufferCollectionFUCHSIA-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkDestroyBufferCollectionFUCHSIA-collection-parent
  `collection` must have been created, allocated, or retrieved from `device`

### 12.13. Tensors

Tensors are similar to images, in that they have multi-dimensional access as documented in the Tensor Operations chapter, but a tensor’s dimensions are not predefined. A tensor can have an arbitrary number of dimensions, up to `maxTensorDimensionCount`, with one index per dimension used to access the tensor.

Tensors can be used by binding them to pipelines via descriptor sets, or by directly specifying them as parameters to certain commands.

Tensors are represented by `VkTensorARM` handles:

    // Provided by VK_EXT_descriptor_heap, VK_ARM_tensors
    VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkTensorARM)

To create tensors, call:

    // Provided by VK_ARM_tensors
    VkResult vkCreateTensorARM(
        VkDevice                                    device,
        const VkTensorCreateInfoARM*                pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkTensorARM*                                pTensor);

- `device` is the logical device that creates the tensor.

- `pCreateInfo` is a pointer to a VkTensorCreateInfoARM structure containing parameters to be used to create the tensor.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

- `pTensor` is a pointer to a VkTensorARM handle in which the resulting tensor object is returned.

Valid Usage

- VUID-vkCreateTensorARM-tensors-09832
  The `tensors` feature must be enabled

Valid Usage (Implicit)

- VUID-vkCreateTensorARM-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkCreateTensorARM-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkTensorCreateInfoARM structure

- VUID-vkCreateTensorARM-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateTensorARM-pTensor-parameter
  `pTensor` must be a valid pointer to a VkTensorARM handle

- VUID-vkCreateTensorARM-device-queuecount
  The device must have been created with at least `1` queue

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The VkTensorCreateInfoARM structure is defined as:

    // Provided by VK_ARM_tensors
    typedef struct VkTensorCreateInfoARM {
        VkStructureType                  sType;
        const void*                      pNext;
        VkTensorCreateFlagsARM           flags;
        const VkTensorDescriptionARM*    pDescription;
        VkSharingMode                    sharingMode;
        uint32_t                         queueFamilyIndexCount;
        const uint32_t*                  pQueueFamilyIndices;
    } VkTensorCreateInfoARM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask of VkTensorCreateFlagBitsARM describing additional parameters of the tensor.

- `pDescription` is a pointer to an instance of VkTensorDescriptionARM describing the tensor.

- `sharingMode` is a VkSharingMode value specifying the sharing mode of the tensor when it will be accessed by multiple queue families.

- `queueFamilyIndexCount` is the number of entries in the `pQueueFamilyIndices` array.

- `pQueueFamilyIndices` is a list of queue families that will access this tensor (ignored if `sharingMode` is not VK_SHARING_MODE_CONCURRENT).

To determine the set of valid `usage` bits for a given tensor format, call vkGetPhysicalDeviceFormatProperties2 with VkTensorFormatPropertiesARM in the `pNext` chain.

Tensor Creation Limits

Valid values for some tensor creation parameters are limited by a numerical upper bound or by inclusion in a bitset.

Several limiting values are defined below. The limiting values are referenced by the relevant valid usage statements of `VkTensorCreateInfoARM`.

- Let the uint64_t tensorElements define the number of data elements in the tensor computed as the product of all `VkTensorCreateInfoARM`::`pDescription->pDimensions`[i] for i between 0 and `VkTensorCreateInfoARM`::`pDescription->dimensionCount` - 1.

Valid Usage

- VUID-VkTensorCreateInfoARM-pDescription-09720
  If `pDescription->tiling` is VK_TENSOR_TILING_OPTIMAL_ARM, `pDescription->pStrides` must be `NULL`

- VUID-VkTensorCreateInfoARM-tensorElements-09721
  `tensorElements` (as defined in Tensor Creation Limits) must not be greater than VkPhysicalDeviceTensorPropertiesARM::`maxTensorElements`

- VUID-VkTensorCreateInfoARM-sharingMode-09722
  If `sharingMode` is VK_SHARING_MODE_CONCURRENT, `pQueueFamilyIndices` must be a valid pointer to an array of `queueFamilyIndexCount` `uint32_t` values

- VUID-VkTensorCreateInfoARM-maintenance11-13358
  If the `maintenance11` feature is enabled and `sharingMode` is VK_SHARING_MODE_CONCURRENT, then `queueFamilyIndexCount` must be greater than `0`

- VUID-VkTensorCreateInfoARM-sharingMode-09723
  If the `maintenance11` feature is not enabled and `sharingMode` is VK_SHARING_MODE_CONCURRENT, then `queueFamilyIndexCount` must be greater than `1`

- VUID-VkTensorCreateInfoARM-sharingMode-09725
  If `sharingMode` is VK_SHARING_MODE_CONCURRENT, each element of `pQueueFamilyIndices` must be unique and must be less than `pQueueFamilyPropertyCount` returned by either vkGetPhysicalDeviceQueueFamilyProperties or vkGetPhysicalDeviceQueueFamilyProperties2 for the `physicalDevice` that was used to create `device`

- VUID-VkTensorCreateInfoARM-pNext-09864
  If the `pNext` chain includes a VkExternalMemoryTensorCreateInfoARM structure, its `handleTypes` member must only contain bits that are also in VkExternalTensorPropertiesARM::`externalMemoryProperties.compatibleHandleTypes`, as returned by vkGetPhysicalDeviceExternalTensorPropertiesARM with `pExternalTensorInfo->handleType` equal to any one of the handle types specified in VkExternalMemoryTensorCreateInfoARM::`handleTypes`

- VUID-VkTensorCreateInfoARM-flags-09726
  If `flags` includes VK_TENSOR_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_ARM, the `descriptorBufferCaptureReplay` feature must be enabled

- VUID-VkTensorCreateInfoARM-pNext-09727
  If the `pNext` chain includes a VkOpaqueCaptureDescriptorDataCreateInfoEXT structure, `flags` must contain VK_TENSOR_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_ARM

- VUID-VkTensorCreateInfoARM-pDescription-09728
  If `pDescription->usage` does not have any of the following bits set (i.e. if it is not possible to create a tensor view for this tensor), then the format features must contain the format feature flags required by the `usage` flags for `pDescription->format` as indicated in the Format Feature Dependent Usage Flags section

  - VK_TENSOR_USAGE_SHADER_BIT_ARM

  - VK_TENSOR_USAGE_DATA_GRAPH_BIT_ARM

- VUID-VkTensorCreateInfoARM-protectedMemory-09729
  If the `protectedMemory` feature is not enabled, `flags` must not contain VK_TENSOR_CREATE_PROTECTED_BIT_ARM

- VUID-VkTensorCreateInfoARM-flags-11395
  If VkOpaqueCaptureDataCreateInfoEXT::`pData` is not `NULL`, `flags` must contain VK_TENSOR_CREATE_DESCRIPTOR_HEAP_CAPTURE_REPLAY_BIT_ARM

- VUID-VkTensorCreateInfoARM-flags-11396
  If `flags` contains VK_TENSOR_CREATE_DESCRIPTOR_HEAP_CAPTURE_REPLAY_BIT_ARM, VkOpaqueCaptureDataCreateInfoEXT::`pData->size` must be equal to `imageCaptureReplayOpaqueDataSize`

- VUID-VkTensorCreateInfoARM-pNext-09833
  If a VkTensorRollingBackingCreateInfoARM structure is present in the `pNext` chain of VkTensorCreateInfoARM, then `pDescription->tiling` must be VK_TENSOR_TILING_LINEAR_ARM, VK_TENSOR_TILING_BRICK_16_WIDE_ARM, VK_TENSOR_TILING_BRICK_8_WIDE_ARM, or VK_TENSOR_TILING_BRICK_4_WIDE_ARM

- VUID-VkTensorCreateInfoARM-pNext-09834
  If a VkTensorRollingBackingCreateInfoARM structure is present in the `pNext` chain of VkTensorCreateInfoARM, then `pDescription->dimensionCount` must be less than or equal to `4`

Valid Usage (Implicit)

- VUID-VkTensorCreateInfoARM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_TENSOR_CREATE_INFO_ARM

- VUID-VkTensorCreateInfoARM-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkExternalMemoryTensorCreateInfoARM, VkOpaqueCaptureDataCreateInfoEXT, VkOpaqueCaptureDescriptorDataCreateInfoEXT, or VkTensorRollingBackingCreateInfoARM

- VUID-VkTensorCreateInfoARM-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkTensorCreateInfoARM-flags-parameter
  `flags` must be a valid combination of VkTensorCreateFlagBitsARM values

- VUID-VkTensorCreateInfoARM-pDescription-parameter
  `pDescription` must be a valid pointer to a valid VkTensorDescriptionARM structure

- VUID-VkTensorCreateInfoARM-sharingMode-parameter
  `sharingMode` must be a valid VkSharingMode value

Bits which can be set in VkTensorCreateInfoARM::`flags`, specifying additional parameters of a tensor, are:

    // Provided by VK_ARM_tensors
    // Flag bits for VkTensorCreateFlagBitsARM
    typedef VkFlags64 VkTensorCreateFlagBitsARM;
    static const VkTensorCreateFlagBitsARM VK_TENSOR_CREATE_MUTABLE_FORMAT_BIT_ARM = 0x00000001ULL;
    static const VkTensorCreateFlagBitsARM VK_TENSOR_CREATE_PROTECTED_BIT_ARM = 0x00000002ULL;
    // Provided by VK_EXT_descriptor_heap with VK_ARM_tensors
    static const VkTensorCreateFlagBitsARM VK_TENSOR_CREATE_DESCRIPTOR_HEAP_CAPTURE_REPLAY_BIT_ARM = 0x00000008ULL;
    // Provided by VK_EXT_descriptor_buffer with VK_ARM_tensors
    static const VkTensorCreateFlagBitsARM VK_TENSOR_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_ARM = 0x00000004ULL;

- VK_TENSOR_CREATE_MUTABLE_FORMAT_BIT_ARM specifies that the tensor can be used to create a `VkTensorViewARM` with a different format from the tensor.

- VK_TENSOR_CREATE_PROTECTED_BIT_ARM specifies that the tensor is a protected tensor.

- VK_TENSOR_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_ARM specifies that the tensor can be used with descriptor buffers when capturing and replaying (e.g. for trace capture and replay), see VkOpaqueCaptureDescriptorDataCreateInfoEXT for more detail.

    // Provided by VK_ARM_tensors
    typedef VkFlags64 VkTensorCreateFlagsARM;

`VkTensorCreateFlagsARM` is a bitmask type for setting a mask of zero or more VkTensorCreateFlagBitsARM.

To define a set of external memory handle types that may be used as backing store for a tensor, add a VkExternalMemoryTensorCreateInfoARM structure to the `pNext` chain of the VkTensorCreateInfoARM structure.

The `VkExternalMemoryTensorCreateInfoARM` structure is defined as:

    // Provided by VK_ARM_tensors
    typedef struct VkExternalMemoryTensorCreateInfoARM {
        VkStructureType                    sType;
        const void*                        pNext;
        VkExternalMemoryHandleTypeFlags    handleTypes;
    } VkExternalMemoryTensorCreateInfoARM;

Note | A `VkExternalMemoryTensorCreateInfoARM` structure with a non-zero `handleTypes` field must be included in the creation parameters for a tensor that will be bound to memory that is either exported or imported.

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `handleTypes` is zero or a bitmask of VkExternalMemoryHandleTypeFlagBits specifying one or more external memory handle types.

Valid Usage (Implicit)

- VUID-VkExternalMemoryTensorCreateInfoARM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_TENSOR_CREATE_INFO_ARM

- VUID-VkExternalMemoryTensorCreateInfoARM-handleTypes-parameter
  `handleTypes` must be a valid combination of VkExternalMemoryHandleTypeFlagBits values

Structure Chaining

Extends the structure

  - VkTensorCreateInfoARM

To create a tensor for which only a rolling window is backed by memory, add a VkTensorRollingBackingCreateInfoARM structure to the `pNext` chain of the VkTensorCreateInfoARM structure.

The VkTensorRollingBackingCreateInfoARM structure is defined as:

    // Provided by VK_ARM_tensor_controls
    typedef struct VkTensorRollingBackingCreateInfoARM {
        VkStructureType    sType;
        const void*        pNext;
        uint32_t           wraps[VK_MAX_TENSOR_CREATE_INFO_ROLLING_BACKING_WRAP_COUNT_ARM];
    } VkTensorRollingBackingCreateInfoARM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `wraps` is an array of VK_MAX_TENSOR_CREATE_INFO_ROLLING_BACKING_WRAP_COUNT_ARM 32-bit integers specifying the size of the rolling window for the tensor along each of its dimensions.

Rolling backing common parameters

Valid values for some rolling backing creation parameters are calculated from others that are a function of tensor creation parameters. To improve the readability of Valid Usage rules for VkTensorRollingBackingCreateInfoARM, these latter values are defined once in this inset.

- Let uint32_t `brickOuterSize` define the size of a brick along its outermost dimension.

  - If VkTensorDescriptionARM::`tiling` is VK_TENSOR_TILING_BRICK_16_WIDE_ARM, then `brickOuterSize` = 16.

  - If VkTensorDescriptionARM::`tiling` is VK_TENSOR_TILING_BRICK_8_WIDE_ARM, then `brickOuterSize` = 8.

  - If VkTensorDescriptionARM::`tiling` is VK_TENSOR_TILING_BRICK_4_WIDE_ARM, then `brickOuterSize` = 4.

  - Otherwise, `brickOuterSize` = 1.

- Let uint32_t `elementSize` define the size of individual elements of the tensor.

Valid Usage

- VUID-VkTensorRollingBackingCreateInfoARM-wraps-09835
  For each i where i < VkTensorDescriptionARM::`dimensionCount`, `wraps`[i] must be less than or equal to VkTensorDescriptionARM::`pDimensions`[i]

- VUID-VkTensorRollingBackingCreateInfoARM-wraps-09836
  For each i where i < VkTensorDescriptionARM::`dimensionCount`, `wraps`[i] must either be equal to VkTensorDescriptionARM::`pDimensions`[i] or must be less than 2^16

- VUID-VkTensorRollingBackingCreateInfoARM-wraps-09837
  For each i where i < VkTensorDescriptionARM::`dimensionCount`, if `wraps`[i] is not equal to VkTensorDescriptionARM::`pDimensions`[i] and one element `wraps`[j] with j < i is not a power of two, then `wraps`[i] must be a power of two

- VUID-VkTensorRollingBackingCreateInfoARM-wraps-09838
  If VkTensorDescriptionARM::`dimensionCount` is greater than 1, then `wraps`[`dimensionCount` - 2] must be a multiple of `brickOuterSize` or must be equal to VkTensorDescriptionARM::`pDimensions`[`dimensionCount` - 2]

- VUID-VkTensorRollingBackingCreateInfoARM-wraps-09839
  If `brickOuterSize` is not equal to 1, then `wraps`[`dimensionCount` - 1] must be a multiple of 64 / `brickOuterSize` / `elementSize` or be equal to VkTensorDescriptionARM::`pDimensions`[`dimensionCount` - 1]

Valid Usage (Implicit)

- VUID-VkTensorRollingBackingCreateInfoARM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_TENSOR_ROLLING_BACKING_CREATE_INFO_ARM

Structure Chaining

Extends the structure

  - VkTensorCreateInfoARM

VK_MAX_TENSOR_CREATE_INFO_ROLLING_BACKING_WRAP_COUNT_ARM is the maximum number of tensor rolling backing wraps.

    #define VK_MAX_TENSOR_CREATE_INFO_ROLLING_BACKING_WRAP_COUNT_ARM 4U

To destroy a tensor, call:

    // Provided by VK_ARM_tensors
    void vkDestroyTensorARM(
        VkDevice                                    device,
        VkTensorARM                                 tensor,
        const VkAllocationCallbacks*                pAllocator);

- `device` is the logical device that destroys the tensor.

- `tensor` is the tensor to destroy.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

Valid Usage

- VUID-vkDestroyTensorARM-tensor-09730
  All submitted commands that refer to `tensor`, either directly or via a `VkTensorViewARM`, must have completed execution

- VUID-vkDestroyTensorARM-tensor-09731
  If `VkAllocationCallbacks` were provided when `tensor` was created, a compatible set of callbacks must be provided here

- VUID-vkDestroyTensorARM-tensor-09732
  If no `VkAllocationCallbacks` were provided when `tensor` was created, `pAllocator` must be `NULL`

Valid Usage (Implicit)

- VUID-vkDestroyTensorARM-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkDestroyTensorARM-tensor-parameter
  If `tensor` is not VK_NULL_HANDLE, `tensor` must be a valid VkTensorARM handle

- VUID-vkDestroyTensorARM-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkDestroyTensorARM-tensor-parent
  If `tensor` is a valid handle, it must have been created, allocated, or retrieved from `device`

Host Synchronization

- Host access to `tensor` must be externally synchronized

#### 12.13.1. Tensor Description

The `VkTensorDescriptionARM` structure is defined as:

    // Provided by VK_ARM_tensors
    typedef struct VkTensorDescriptionARM {
        VkStructureType          sType;
        const void*              pNext;
        VkTensorTilingARM        tiling;
        VkFormat                 format;
        uint32_t                 dimensionCount;
        const int64_t*           pDimensions;
        const int64_t*           pStrides;
        VkTensorUsageFlagsARM    usage;
    } VkTensorDescriptionARM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `tiling` is a VkTensorTilingARM value specifying the tiling of the tensor

- `format` is a one component VkFormat describing the format and type of the data elements that will be contained in the tensor.

- `dimensionCount` is the number of dimensions for the tensor.

- `pDimensions` is a pointer to an array of integers of size `dimensionCount` providing the number of data elements in each dimension.

- `pStrides` is either `NULL` or is an array of size `dimensionCount` providing the strides in bytes for the tensor in each dimension.

- `usage` is a bitmask of VkTensorUsageFlagBitsARM specifying the usage of the tensor.

When describing a tensor created with VK_TENSOR_TILING_OPTIMAL_ARM, `pStrides` must be equal to `NULL`. When describing a tensor created with VK_TENSOR_TILING_LINEAR_ARM, `pStrides` is either an array of size `dimensionCount` or `NULL`.

The formats that must be supported for `format` are documented in Mandatory tensor format support.

Each element in the `pStrides` array describes the offset in bytes between increments of the given dimension. For example, `pStrides`[0] describes the offset between element [x0,x1,x2,x3] and element [x0+1,x1,x2,x3]. The `pStrides` array can be used to determine whether a tensor is packed or not. If `pStrides`[`dimensionCount`-1] is equal to the size of a tensor element and for each dimension `n` greater than 0 and less than `dimensionCount`, `pStrides`[n-1] is equal to `pStrides`[n] * `pDimensions`[n], then the tensor is a packed tensor. If the tensorNonPacked feature is not enabled, the tensor must be a packed tensor.

When a tensor is created with VK_TENSOR_TILING_LINEAR_ARM and `pStrides` equal to `NULL` the tensor strides are calculated by the vulkan implementation such that the resulting tensor is a packed tensor.

Expressed as an addressing formula, the starting byte of an element in a 4-dimensional, for example, linear tensor has address:

    // Assume (x0,x1,x2,x3) are in units of elements.

    address(x0,x1,x2,x3) = x0*pStrides[0] + x1*pStrides[1] + x2*pStrides[2] + x3*pStrides[3]

Valid Usage

- VUID-VkTensorDescriptionARM-dimensionCount-09733
  `dimensionCount` must be less than or equal to VkPhysicalDeviceTensorPropertiesARM::`maxTensorDimensionCount`

- VUID-VkTensorDescriptionARM-pDimensions-09734
  For each i where i ≤ dimensionCount-1, `pDimensions`[i] must be greater than `0`

- VUID-VkTensorDescriptionARM-pDimensions-09883
  For each i where i ≤ dimensionCount-1, `pDimensions`[i] must be less than or equal to `VkPhysicalDeviceTensorPropertiesARM`::`maxPerDimensionTensorElements`

- VUID-VkTensorDescriptionARM-format-09735
  `format` must not be VK_FORMAT_UNDEFINED and must be a one-component VkFormat

- VUID-VkTensorDescriptionARM-pStrides-09736
  `pStrides`[`dimensionCount`-1] must equal the size in bytes of a tensor element

- VUID-VkTensorDescriptionARM-pStrides-09737
  For each i, `pStrides`[i] must be a multiple of the element size

- VUID-VkTensorDescriptionARM-pStrides-09738
  For each i, `pStrides`[i] must be greater than `0` and less than or equal to VkPhysicalDeviceTensorPropertiesARM::`maxTensorStride`

- VUID-VkTensorDescriptionARM-pStrides-09884
  `pStrides`[0] × `pDimensions`[0] must be less than or equal to `VkPhysicalDeviceTensorPropertiesARM`::`maxTensorSize`

- VUID-VkTensorDescriptionARM-pStrides-09739
  For each i greater than 0, `pStrides`[i-1] must be greater than or equal to `pStrides`[i] × `pDimensions`[i] so that no two elements of the tensor reference the same memory address

- VUID-VkTensorDescriptionARM-None-09740
  If the tensorNonPacked feature is not enabled, then the members of VkTensorDescriptionARM must describe a packed tensor

- VUID-VkTensorDescriptionARM-tiling-09741
  If `tiling` is VK_TENSOR_TILING_OPTIMAL_ARM and `usage` is VK_TENSOR_USAGE_IMAGE_ALIASING_BIT_ARM then the size of the tensor along its innermost dimension, i.e. `pDimensions`[`dimensionCount` - 1], must be less than or equal to `4`

- VUID-VkTensorDescriptionARM-tiling-09742
  If `tiling` is VK_TENSOR_TILING_LINEAR_ARM then VK_TENSOR_USAGE_IMAGE_ALIASING_BIT_ARM must not be set in `usage`

- VUID-VkTensorDescriptionARM-tiling-09842
  If `tiling` is VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_ARM or VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_64K_ARM then `pDimensions`[`dimensionCount`-1] must be less than or equal to `4`

- VUID-VkTensorDescriptionARM-tiling-09843
  If `tiling` is VK_TENSOR_TILING_BRICK_16_WIDE_ARM, VK_TENSOR_TILING_BRICK_8_WIDE_ARM, VK_TENSOR_TILING_BRICK_4_WIDE_ARM, VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_ARM, or VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_64K_ARM, then `pStrides` must be `NULL`

Valid Usage (Implicit)

- VUID-VkTensorDescriptionARM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_TENSOR_DESCRIPTION_ARM

- VUID-VkTensorDescriptionARM-tiling-parameter
  `tiling` must be a valid VkTensorTilingARM value

- VUID-VkTensorDescriptionARM-format-parameter
  `format` must be a valid VkFormat value

- VUID-VkTensorDescriptionARM-pDimensions-parameter
  `pDimensions` must be a valid pointer to an array of `dimensionCount` `int64_t` values

- VUID-VkTensorDescriptionARM-pStrides-parameter
  If `pStrides` is not `NULL`, `pStrides` must be a valid pointer to an array of `dimensionCount` `int64_t` values

- VUID-VkTensorDescriptionARM-usage-parameter
  `usage` must be a valid combination of VkTensorUsageFlagBitsARM values

- VUID-VkTensorDescriptionARM-usage-requiredbitmask
  `usage` must not be `0`

- VUID-VkTensorDescriptionARM-dimensionCount-arraylength
  `dimensionCount` must be greater than `0`

Structure Chaining

Extends the structures

  - VkDataGraphPipelineConstantARM

  - VkDataGraphPipelineResourceInfoARM

Bits which can be set in VkTensorDescriptionARM::`usage`, specifying usage behavior of a tensor, are:

    // Provided by VK_ARM_tensors
    // Flag bits for VkTensorUsageFlagBitsARM
    typedef VkFlags64 VkTensorUsageFlagBitsARM;
    static const VkTensorUsageFlagBitsARM VK_TENSOR_USAGE_SHADER_BIT_ARM = 0x00000002ULL;
    static const VkTensorUsageFlagBitsARM VK_TENSOR_USAGE_TRANSFER_SRC_BIT_ARM = 0x00000004ULL;
    static const VkTensorUsageFlagBitsARM VK_TENSOR_USAGE_TRANSFER_DST_BIT_ARM = 0x00000008ULL;
    static const VkTensorUsageFlagBitsARM VK_TENSOR_USAGE_IMAGE_ALIASING_BIT_ARM = 0x00000010ULL;
    // Provided by VK_ARM_data_graph
    static const VkTensorUsageFlagBitsARM VK_TENSOR_USAGE_DATA_GRAPH_BIT_ARM = 0x00000020ULL;

- VK_TENSOR_USAGE_SHADER_BIT_ARM specifies that the tensor can be used to create a `VkTensorViewARM` suitable for occupying a `VkDescriptorSet` slot of type VK_DESCRIPTOR_TYPE_TENSOR_ARM accessed by shader stages.

- VK_TENSOR_USAGE_TRANSFER_SRC_BIT_ARM specifies that the tensor can be used as the source of a transfer command (see the definition of VK_PIPELINE_STAGE_TRANSFER_BIT).

- VK_TENSOR_USAGE_TRANSFER_DST_BIT_ARM specifies that the tensor can be used as the destination of a transfer command.

- VK_TENSOR_USAGE_IMAGE_ALIASING_BIT_ARM specifies that the tensor can be bound to a range of memory aliased with an image created with VK_IMAGE_TILING_OPTIMAL. See Memory Aliasing for a complete set of rules for tensor/image aliasing.

- VK_TENSOR_USAGE_DATA_GRAPH_BIT_ARM specifies that the tensor can be used to create a `VkTensorViewARM` suitable for occupying a `VkDescriptorSet` slot of type VK_DESCRIPTOR_TYPE_TENSOR_ARM accessed by data graph pipelines.

    // Provided by VK_ARM_tensors
    typedef VkFlags64 VkTensorUsageFlagsARM;

`VkTensorUsageFlags` is a bitmask type for setting a mask of zero or more VkTensorUsageFlagBitsARM.

Possible values of VkTensorCreateInfoARM::`tiling`, specifying the tiling arrangement of elements in the tensor, are:

    // Provided by VK_ARM_tensors
    typedef enum VkTensorTilingARM {
        VK_TENSOR_TILING_OPTIMAL_ARM = 0,
        VK_TENSOR_TILING_LINEAR_ARM = 1,
      // Provided by VK_ARM_tensor_controls
        VK_TENSOR_TILING_BRICK_16_WIDE_ARM = 1000565000,
      // Provided by VK_ARM_tensor_controls
        VK_TENSOR_TILING_BRICK_8_WIDE_ARM = 1000565001,
      // Provided by VK_ARM_tensor_controls
        VK_TENSOR_TILING_BRICK_4_WIDE_ARM = 1000565002,
      // Provided by VK_ARM_tensor_controls
        VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_ARM = 1000565003,
      // Provided by VK_ARM_tensor_controls
        VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_64K_ARM = 1000565004,
    } VkTensorTilingARM;

- VK_TENSOR_TILING_OPTIMAL_ARM specifies optimal tiling (elements are laid out in an implementation-dependent arrangement, for more efficient memory access).

- VK_TENSOR_TILING_LINEAR_ARM specifies linear tiling (elements are laid out linearly and the offset between each element is determined by the strides of the tensor).

- VK_TENSOR_TILING_BRICK_16_WIDE_ARM specifies that the data is laid out in 64-byte blocks of 16 x N elements where N depends on the size of the elements in the tensor.

- VK_TENSOR_TILING_BRICK_8_WIDE_ARM specifies that the data is laid out in 64-byte blocks of 8 x N elements where N depends on the size of the elements in the tensor.

- VK_TENSOR_TILING_BRICK_4_WIDE_ARM specifies that the data is laid out in 64-byte blocks of 4 x N elements where N depends on the size of the elements in the tensor.

- VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_ARM specifies that the data is laid out using blocks of size 16 x 16 x C where C is the size of the tensor along the innermost dimension.

- VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_64K_ARM specifies that the data is laid out using 64kiB groups of blocks of size 16 x 16 x C, where C is the size of the tensor along the innermost dimension.

### 12.14. Tensor Views

Tensor objects are not directly accessed by pipelines for reading or writing tensor data. Instead, tensor views representing the tensor subresources and containing additional metadata are used for that purpose. Views must be created on tensors of compatible types.

Tensor views are represented by `VkTensorViewARM` handles:

    // Provided by VK_ARM_tensors
    VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkTensorViewARM)

To create a tensor view, call:

    // Provided by VK_ARM_tensors
    VkResult vkCreateTensorViewARM(
        VkDevice                                    device,
        const VkTensorViewCreateInfoARM*            pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkTensorViewARM*                            pView);

- `device` is the logical device that creates the tensor view.

- `pCreateInfo` is a pointer to an instance of the `VkTensorViewCreateInfoARM` structure containing parameters to be used to create the tensor view.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

- `pView` is a pointer to a VkTensorViewARM handle in which the resulting tensor view object is returned.

Some of the tensor creation parameters are inherited by the view. In particular, other than format, the tensor view creation inherits all other parameters from the tensor.

The remaining parameters are contained in `pCreateInfo`.

Valid Usage (Implicit)

- VUID-vkCreateTensorViewARM-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkCreateTensorViewARM-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkTensorViewCreateInfoARM structure

- VUID-vkCreateTensorViewARM-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateTensorViewARM-pView-parameter
  `pView` must be a valid pointer to a VkTensorViewARM handle

- VUID-vkCreateTensorViewARM-device-queuecount
  The device must have been created with at least `1` queue

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkTensorViewCreateInfoARM` structure is defined as:

    // Provided by VK_EXT_descriptor_heap, VK_ARM_tensors
    typedef struct VkTensorViewCreateInfoARM {
        VkStructureType               sType;
        const void*                   pNext;
        VkTensorViewCreateFlagsARM    flags;
        VkTensorARM                   tensor;
        VkFormat                      format;
    } VkTensorViewCreateInfoARM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is reserved for future use.

- `tensor` is a VkTensorARM on which the view will be created.

- `format` is a VkFormat describing the format and type used to interpret elements in the tensor.

If `tensor` was created with the VK_TENSOR_CREATE_MUTABLE_FORMAT_BIT_ARM flag, `format` can be different from the tensor’s format, but if they are not equal they must be compatible. Tensor format compatibility is defined in the Format Compatibility Classes section. Views of compatible formats will have the same mapping between element locations irrespective of the `format`, with only the interpretation of the bit pattern changing.

Note | Values intended to be used with one view format may not be exactly preserved when written or read through a different format. For example, an integer value that happens to have the bit pattern of a floating-point denorm or NaN may be flushed or canonicalized when written or read through a view with a floating-point format. Similarly, a value written through a signed normalized format that has a bit pattern exactly equal to -2b may be changed to -2b + 1 as described in Conversion from Normalized Fixed-Point to Floating-Point.

Valid Usage

- VUID-VkTensorViewCreateInfoARM-tensor-09743
  If `tensor` was not created with VK_TENSOR_CREATE_MUTABLE_FORMAT_BIT_ARM flag, `format` must be identical to the `format` used to create `tensor`

- VUID-VkTensorViewCreateInfoARM-tensor-09744
  If `tensor` was created with VK_TENSOR_CREATE_MUTABLE_FORMAT_BIT_ARM flag, `format` must be compatible with the `format` used to create `tensor`, as defined in Format Compatibility Classes

- VUID-VkTensorViewCreateInfoARM-flags-09745
  If `flags` includes VK_TENSOR_VIEW_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_ARM, the `descriptorBufferCaptureReplay` feature must be enabled

- VUID-VkTensorViewCreateInfoARM-pNext-09746
  If the `pNext` chain includes a VkOpaqueCaptureDescriptorDataCreateInfoEXT structure, `flags` must contain VK_TENSOR_VIEW_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_ARM

- VUID-VkTensorViewCreateInfoARM-usage-09747
  The `usage` flags of `tensor` must have at least one of the following bits set:

  - VK_TENSOR_USAGE_SHADER_BIT_ARM

  - VK_TENSOR_USAGE_DATA_GRAPH_BIT_ARM

- VUID-VkTensorViewCreateInfoARM-usage-09748
  The tensor view’s format features must contain the format feature flags required by the `usage` flags of `tensor` for `format` as indicated in the Format Feature Dependent Usage Flags section

- VUID-VkTensorViewCreateInfoARM-tensor-09749
  If `tensor` is non-sparse then it must be bound completely and contiguously to a single VkDeviceMemory object

Valid Usage (Implicit)

- VUID-VkTensorViewCreateInfoARM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_TENSOR_VIEW_CREATE_INFO_ARM

- VUID-VkTensorViewCreateInfoARM-pNext-pNext
  `pNext` must be `NULL` or a pointer to a valid instance of VkOpaqueCaptureDescriptorDataCreateInfoEXT

- VUID-VkTensorViewCreateInfoARM-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkTensorViewCreateInfoARM-flags-parameter
  `flags` must be a valid combination of VkTensorViewCreateFlagBitsARM values

- VUID-VkTensorViewCreateInfoARM-tensor-parameter
  `tensor` must be a valid VkTensorARM handle

- VUID-VkTensorViewCreateInfoARM-format-parameter
  `format` must be a valid VkFormat value

Bits which can be set in VkTensorViewCreateInfoARM::`flags`, specifying additional parameters of an tensor, are:

    // Provided by VK_ARM_tensors
    // Flag bits for VkTensorViewCreateFlagBitsARM
    typedef VkFlags64 VkTensorViewCreateFlagBitsARM;
    // Provided by VK_EXT_descriptor_buffer with VK_ARM_tensors
    static const VkTensorViewCreateFlagBitsARM VK_TENSOR_VIEW_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_ARM = 0x00000001ULL;

- VK_TENSOR_VIEW_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_ARM specifies that the tensor view can be used with descriptor buffers when capturing and replaying (e.g. for trace capture and replay), see VkOpaqueCaptureDescriptorDataCreateInfoEXT for more detail.

    // Provided by VK_EXT_descriptor_heap, VK_ARM_tensors
    typedef VkFlags64 VkTensorViewCreateFlagsARM;

`VkTensorViewCreateFlagsARM` is a bitmask type for setting a mask of zero or more VkTensorViewCreateFlagBitsARM.

To destroy a tensor view, call:

    // Provided by VK_ARM_tensors
    void vkDestroyTensorViewARM(
        VkDevice                                    device,
        VkTensorViewARM                             tensorView,
        const VkAllocationCallbacks*                pAllocator);

- `device` is the logical device that destroys the tensor view.

- `tensorView` is the tensor view to destroy.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

Valid Usage

- VUID-vkDestroyTensorViewARM-tensorView-09750
  All submitted commands that refer to `tensorView` must have completed execution

- VUID-vkDestroyTensorViewARM-tensorView-09751
  If `VkAllocationCallbacks` were provided when `tensorView` was created, a compatible set of callbacks must be provided here

- VUID-vkDestroyTensorViewARM-tensorView-09752
  If no `VkAllocationCallbacks` were provided when `tensorView` was created, `pAllocator` must be `NULL`

Valid Usage (Implicit)

- VUID-vkDestroyTensorViewARM-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkDestroyTensorViewARM-tensorView-parameter
  If `tensorView` is not VK_NULL_HANDLE, `tensorView` must be a valid VkTensorViewARM handle

- VUID-vkDestroyTensorViewARM-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkDestroyTensorViewARM-tensorView-parent
  If `tensorView` is a valid handle, it must have been created, allocated, or retrieved from `device`

Host Synchronization

- Host access to `tensorView` must be externally synchronized

#### 12.14.1. Tensor View Format Features

Valid usage of a VkTensorViewARM may be constrained by the tensor view’s format features, defined below. Such constraints are documented in the affected valid usage statement.

- If the view’s tensor was created with VK_TENSOR_TILING_LINEAR_ARM, then the tensor view’s set of format features is the value of VkTensorFormatPropertiesARM::`linearTilingTensorFeatures` found by calling vkGetPhysicalDeviceFormatProperties2 on the same `format` as VkTensorViewCreateInfoARM::`format`.

- If the view’s tensor was created with VK_TENSOR_TILING_OPTIMAL_ARM, then the tensor view’s set of format features is the value of VkTensorFormatPropertiesARM::`optimalTilingTensorFeatures` found by calling vkGetPhysicalDeviceFormatProperties2 on the same `format` as VkTensorViewCreateInfoARM::`format`.

- If the view’s tensor was created with VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_ARM, then the tensor view’s set of format features is the value of VkTensorExplicitTilingFormatPropertiesARM::`blockUTilingTensorFeatures` found by calling vkGetPhysicalDeviceFormatProperties2 on the same `format` as VkTensorViewCreateInfoARM::`format`.

- If the view’s tensor was created with VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_64K_ARM, then the tensor view’s set of format features is the value of VkTensorExplicitTilingFormatPropertiesARM::`blockU64kTilingTensorFeatures` found by calling vkGetPhysicalDeviceFormatProperties2 on the same `format` as VkTensorViewCreateInfoARM::`format`.

- If the view’s tensor was created with VK_TENSOR_TILING_BRICK_4_WIDE_ARM, then the tensor view’s set of format features is the value of VkTensorExplicitTilingFormatPropertiesARM::`brick4TilingTensorFeatures` found by calling vkGetPhysicalDeviceFormatProperties2 on the same `format` as VkTensorViewCreateInfoARM::`format`.

- If the view’s tensor was created with VK_TENSOR_TILING_BRICK_8_WIDE_ARM, then the tensor view’s set of format features is the value of VkTensorExplicitTilingFormatPropertiesARM::`brick8TilingTensorFeatures` found by calling vkGetPhysicalDeviceFormatProperties2 on the same `format` as VkTensorViewCreateInfoARM::`format`.

- If the view’s tensor was created with VK_TENSOR_TILING_BRICK_16_WIDE_ARM, then the tensor view’s set of format features is the value of VkTensorExplicitTilingFormatPropertiesARM::`brick16TilingTensorFeatures` found by calling vkGetPhysicalDeviceFormatProperties2 on the same `format` as VkTensorViewCreateInfoARM::`format`.

## 13. Images

Images are specialized resources that have multi-dimensional access rather than the typical linear access to memory. These resources allow implementations to optimize the memory layout for common access patterns, by mapping multi-dimensional coordinates to an implementation-dependent offset in the underlying memory.

Additionally, images are homogeneous, with every discrete coordinate associated with data that is in the same format as the data associated with any other coordinate. Each set of data associated with one of these coordinates is referred to in this specification as a texel. A texel can consist of up to 4 separate components, labeled as (R,G,B,A) in this chapter. Each texel block in an image maps to a distinct set of memory locations within the memory they are bound to. Unless otherwise noted by the specification, the mapping from texels to memory is implementation-defined.

Note | This terminology is historical; texel is a combination of the words “texture” and “element”, and (R,G,B,A) are abbreviations for Red, Green, Blue, and Alpha. Early interactive computer graphics only supported operations that allowed image data to be used to add color “texture” to rendered objects, which is just a small subset of what the image operations on images described here enable. These terms are deeply embedded in the industry, and so are still used here by convention, despite images being used in far more varied ways than they were in the past.

Some image formats identify components as D for depth, S for stencil, or X for padding elements. Image format components identified as D are treated as R, and S components are treated as G for the purpose of image accesses. X components are ignored when reading, and may be modified in implementation-dependent ways when writing to that texel.

The coordinates used to identify a texel are six-dimensional, made up of the following integer indices:

- x - The first spatial index

- y - The second spatial index

- z - The third spatial index

- layer - The array index for arrayed images

- sample - The sample index

- level - The detail level

Each image is constructed with a number of texels in each dimension, with the integer size in each dimension for that image identified as:

- width - The number of x indices

- height - The number of y indices

- depth - The number of z indices

- layers - The number of layers

- samples - The number of samples

- levels - The number of detail levels

Of these sizes, the number of levels is somewhat unique - each further level reduces the number of indices in each of the x, y, and z dimensions by half, according to these formulae:

- widthlevel = max(1, ⌊width / 2level⌋)

- heightlevel = max(1, ⌊height / 2level⌋)

- depthlevel = max(1, ⌊depth / 2level⌋)

An image will have no more than one level where all of the above dimensions are set to 1. See Image Mip Level Sizing for more details.

The Vulkan specification allows the creation of resources with fewer dimensions than this (e.g. texel buffers); these can be considered equivalent to an image with all dimensions specified, with the missing dimensions having a size of 1, and an implicit coordinate value of 0.

These parameters are set for an image during image creation, and are adjusted when accessing an image through an image view.

### 13.1. Image Coordinate Validation

When accessing an image, a set of (x,y,z,layer,sample,level) coordinates are used to indicate which texel is accessed. These coordinates are first checked to see if they refer to texels within the image dimensions, according to the following equations:

- x < widthlevel

- y < heightlevel

- z < depthlevel

- layer < layers

- sample < samples

- level < levels

If any of these equations evaluates to false, the coordinate is considered out of bounds, otherwise they are in bounds.

### 13.2. Image Reads

Image reads use a set of (x,y,z,layer,sample,level) coordinates, validated as per Image Coordinate Validation, and return a converted value for the texel at that coordinate. If the coordinates are out of bounds, behavior of the read is as described in Shader Out-of-Bounds Memory Access. If the coordinates are in bounds, but the texel is not backed by memory, behavior of the read is as described in Accessing Unbound Regions. Otherwise, the read proceeds as follows.

#### 13.2.1. Texel Decode

The formatted value of the texel at the (x,y,z,layer,sample,level) coordinate is read and decoded according to the procedures outlined in the Khronos Data Format Specification.

For sRGB formats, the (R,G,B,A) components are first converted as if they are `UNORM` formats, and then sRGB to linear conversion is performed on the converted (R,G,B) components, as described in the “sRGB EOTF” section of the Khronos Data Format Specification.

#### 13.2.2. Component Substitution

If after conversion, less than four of the (R,G,B,A) components are present, missing components are substituted by the components of (0,0,0,1) for missing (R,G,B,A) components, respectively.

#### 13.2.3. Numeric Encoding

The values are encoded according to the bit width and numeric format of each component:

- Components with a fixed-point numeric format or with a floating-point numeric format and a bit width less than or equal to 32 are encoded into the IEEE-754 binary32 format.

- Components with a floating-point numeric format and a bit width greater than 32 are encoded into the IEEE-754 binary64 format.

- Components with an integer numeric format and a bit width less than or equal to 32 are directly encoded as 32-bit integer values with the same signedness.

- Components with an integer numeric format and a bit width greater than 32 are directly encoded as 64-bit integer values with the same signedness.

These values are then returned as the result of the image read.

### 13.3. Image Writes

Image writes also use a set of (x,y,z,layer,sample,level) coordinates, validated as per Image Coordinate Validation, and with a value to be written. If the coordinates are out of bounds, the write is discarded. If the coordinates are in bounds, but the texel is not backed by memory, the write is silently discarded. Otherwise, an image write is performed as follows:

#### 13.3.1. Texel Encode

If the image format is sRGB, a linear to sRGB conversion is applied to the (R,G,B) components of value as described in the “sRGB EOTF” section of the Khronos Data Format Specification.

The converted (R,G,B) and original A values are then encoded to the image format according to the procedures outlined in the Khronos Data Format Specification. Components not present in the image format are discarded.

The final value is then written to the texel at (x,y,z,layer,sample,level).

### 13.4. SPIR-V Image Access

Images are represented in SPIR-V by variables with the OpTypeImage type, and operated on by image instructions.

Images are mapped to a shader using image views, which define access to a subset of the base image resource, specified by VkImageSubresourceRange.

#### 13.4.1. SPIR-V Image Read Instructions

Texels can be read from an image using OpImageRead or OpImageSparseRead. The elements of the Coordinate operand and the optional `Sample` image operand map to image coordinates, modified by the parameters of the image view used, as:

- x = `u`

- y = `v`

- z = `w`

- layer = `array_layer`

- sample = `Sample`

- level = 0

Any index missing in the instruction is implicitly set to 0.

After the coordinates are validated, some indices are offset before performing the access as follows:

- layer += VkImageSubresourceRange::`baseArrayLayer`

- level += VkImageSubresourceRange::`baseMipLevel`

- z += VkImageViewSlicedCreateInfoEXT::`sliceOffset`

#### 13.4.2. SPIR-V Image Write Instructions

Texels can be written to an image using OpImageWrite. The elements of the Coordinate operand and the optional `Sample` image operand map to image coordinates, modified by the parameters of the image view used, in the same ways as for image reads.

#### 13.4.3. SPIR-V Image Atomic Instructions

SPIR-V atomic instructions operate on pointers rather than texels, but can be used with texels via OpImageTexelPointer. OpImageTexelPointer can be used to obtain a valid pointer to a specific texel in an image. The elements of the Coordinate operand and the optional `Sample` image operand map to image coordinates, modified by the parameters of the image view used, in the same ways as for image reads. The resulting pointer can be used to access the identified texel, with atomic operations potentially reading and writing to that texel.

#### 13.4.4. SPIR-V Image Query Instructions

Query operations return properties of an image, allowing the accessible size of each dimension of an image to be queried from within a shader. Query operations do not access any texels in the image.

- `OpImageQuerySizeLod` returns the values of widthlevel, heightlevel, depthlevel, and layers for the image at a specified level, where level is equal to the sum of the `Level` `of` `Detail` operand and VkImageSubresourceRange::`baseMipLevel`. If the image is not a sampled image and VkImageViewSlicedCreateInfoEXT::`sliceCount` is not set to VK_REMAINING_3D_SLICES_EXT, `sliceCount` will be returned in place of depthlevel. If the image is not a sampled image and VkImageViewSlicedCreateInfoEXT::`sliceCount` is set to VK_REMAINING_3D_SLICES_EXT, the value returned will be equal to depthlevel :minus: VkImageViewSlicedCreateInfoEXT::`sliceOffset`. If `Level` `of` `Detail` is greater than VkImageSubresourceRange::`levelCount`, the result is undefined.

- `OpImageQuerySize` is equivalent to `OpImageQuerySizeLod` with level set to VkImageSubresourceRange::`baseMipLevel`.

- `OpImageQueryLevels` returns the value of VkImageSubresourceRange::`levelCount` specified for the image view used.

- `OpImageQuerySamples` returns the value of samples for the image.

Note | `OpImageQueryLod` is performed as a sampling operation, so is not included here.

If the descriptor bound to the image is a null descriptor, all values returned by the above queries are replaced with 0.

If the image is a weight image, all values returned by the above queries are undefined.

#### 13.4.5. SPIR-V Image Sampling Instructions

Sampling operations can also be performed on images, typically in conjunction with a sampler, as defined in the Sampling chapter.

## 14. Samplers

`VkSampler` objects represent the state of an image sampler which is used by the implementation to read image data and apply filtering and other transformations for the shader.

Samplers are represented by `VkSampler` handles:

    // Provided by VK_VERSION_1_0
    VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSampler)

To create a sampler object, call:

    // Provided by VK_VERSION_1_0
    VkResult vkCreateSampler(
        VkDevice                                    device,
        const VkSamplerCreateInfo*                  pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkSampler*                                  pSampler);

- `device` is the logical device that creates the sampler.

- `pCreateInfo` is a pointer to a VkSamplerCreateInfo structure specifying the state of the sampler object.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

- `pSampler` is a pointer to a VkSampler handle in which the resulting sampler object is returned.

Valid Usage

- VUID-vkCreateSampler-device-09668
  `device` must support at least one queue family with one of the VK_QUEUE_COMPUTE_BIT or VK_QUEUE_GRAPHICS_BIT capabilities

- VUID-vkCreateSampler-maxSamplerAllocationCount-04110
  There must be less than VkPhysicalDeviceLimits::`maxSamplerAllocationCount` VkSampler objects currently created on the device

- VUID-vkCreateSampler-maxSamplerAllocationCount-11412
  If there are any pipelines or shaders with embedded samplers currently created on the device, there must be less than (`maxSamplerAllocationCount` - (`minSamplerHeapReservedRangeWithEmbedded` / `samplerDescriptorSize`)) VkSampler objects currently created on the device

Valid Usage (Implicit)

- VUID-vkCreateSampler-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkCreateSampler-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkSamplerCreateInfo structure

- VUID-vkCreateSampler-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateSampler-pSampler-parameter
  `pSampler` must be a valid pointer to a VkSampler handle

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkSamplerCreateInfo` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkSamplerCreateInfo {
        VkStructureType         sType;
        const void*             pNext;
        VkSamplerCreateFlags    flags;
        VkFilter                magFilter;
        VkFilter                minFilter;
        VkSamplerMipmapMode     mipmapMode;
        VkSamplerAddressMode    addressModeU;
        VkSamplerAddressMode    addressModeV;
        VkSamplerAddressMode    addressModeW;
        float                   mipLodBias;
        VkBool32                anisotropyEnable;
        float                   maxAnisotropy;
        VkBool32                compareEnable;
        VkCompareOp             compareOp;
        float                   minLod;
        float                   maxLod;
        VkBorderColor           borderColor;
        VkBool32                unnormalizedCoordinates;
    } VkSamplerCreateInfo;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask of VkSamplerCreateFlagBits describing additional parameters of the sampler.

- `magFilter` is a VkFilter value specifying the magnification filter to apply to lookups.

- `minFilter` is a VkFilter value specifying the minification filter to apply to lookups.

- `mipmapMode` is a VkSamplerMipmapMode value specifying the mipmap filter to apply to lookups.

- `addressModeU` is a VkSamplerAddressMode value specifying the wrapping operation used when the i coordinate used to sample the image would be out of bounds.

- `addressModeV` is a VkSamplerAddressMode value specifying the wrapping operation used when the j coordinate used to sample the image would be out of bounds.

- `addressModeW` is a VkSamplerAddressMode value specifying the wrapping operation used when the k coordinate used to sample the image would be out of bounds. If `unnormalizedCoordinates` is VK_TRUE, `addressModeW` is ignored.

- `mipLodBias` is the bias to be added to mipmap LOD calculation and bias provided by image sampling functions in SPIR-V, as described in the LOD Operation section.

- `anisotropyEnable` is VK_TRUE to enable anisotropic filtering, as described in the Texel Anisotropic Filtering section, or VK_FALSE otherwise.

- `maxAnisotropy` is the anisotropy value clamp used by the sampler when `anisotropyEnable` is VK_TRUE. If `anisotropyEnable` is VK_FALSE, `maxAnisotropy` is ignored.

- `compareEnable` is VK_TRUE to enable comparison against a reference value during lookups, or VK_FALSE otherwise.

  - Note: Some implementations will default to shader state if this member does not match.

- `compareOp` is a VkCompareOp value specifying the comparison operator to apply to fetched data before filtering as described in the Depth Compare Operation section.

- `minLod` is used to clamp the minimum of the computed LOD value.

- `maxLod` is used to clamp the maximum of the computed LOD value. To avoid clamping the maximum value, set `maxLod` to the constant VK_LOD_CLAMP_NONE.

- `borderColor` is a VkBorderColor value specifying the predefined border color to use.

- `unnormalizedCoordinates` controls whether to use unnormalized or normalized texel coordinates to address texels of the image. When `unnormalizedCoordinates` is VK_TRUE, the range of the image coordinates used to lookup the texel is in the range of zero to the image size in each dimension. When `unnormalizedCoordinates` is VK_FALSE, the range of image coordinates is zero to one.

  When `unnormalizedCoordinates` is VK_TRUE, images the sampler is used with in the shader have the following requirements:

  - The `viewType` must be either VK_IMAGE_VIEW_TYPE_1D or VK_IMAGE_VIEW_TYPE_2D.

  - The image view must have a single layer and a single mip level.

    When `unnormalizedCoordinates` is VK_TRUE, image built-in functions in the shader that use the sampler have the following requirements:

  - The functions must not use projection.

  - The functions must not use offsets.

Note | Mapping of OpenGL to Vulkan Filter Modes `magFilter` values of VK_FILTER_NEAREST and VK_FILTER_LINEAR directly correspond to `GL_NEAREST` and `GL_LINEAR` magnification filters. `minFilter` and `mipmapMode` combine to correspond to the similarly named OpenGL minification filter of `GL_minFilter_MIPMAP_mipmapMode` (e.g. `minFilter` of VK_FILTER_LINEAR and `mipmapMode` of VK_SAMPLER_MIPMAP_MODE_NEAREST correspond to `GL_LINEAR_MIPMAP_NEAREST`). There are no Vulkan filter modes that directly correspond to OpenGL minification filters of `GL_LINEAR` or `GL_NEAREST`, but they can be emulated using VK_SAMPLER_MIPMAP_MODE_NEAREST, `minLod` = 0, and `maxLod` = 0.25, and using `minFilter` = VK_FILTER_LINEAR or `minFilter` = VK_FILTER_NEAREST, respectively. Note that using a `maxLod` of zero would cause magnification to always be performed, and the `magFilter` to always be used. This is valid, just not an exact match for OpenGL behavior. Clamping the maximum LOD to 0.25 allows the λ value to be non-zero and minification to be performed, while still always rounding down to the base level. If the `minFilter` and `magFilter` are equal, then using a `maxLod` of zero also works.

The maximum number of sampler objects which can be simultaneously created on a device is implementation-dependent and specified by the `maxSamplerAllocationCount` member of the VkPhysicalDeviceLimits structure.

Note | For historical reasons, if `maxSamplerAllocationCount` is exceeded, some implementations may return VK_ERROR_TOO_MANY_OBJECTS. Exceeding this limit will result in undefined behavior, and an application should not rely on the use of the returned error code in order to identify when the limit is reached.

Since VkSampler is a non-dispatchable handle type, implementations may return the same handle for sampler state vectors that are identical. In such cases, all such objects would only count once against the `maxSamplerAllocationCount` limit.

When this structure is used to write a descriptor via vkWriteSamplerDescriptorsEXT, applications can give the descriptor a debug name in a similar way to naming an object, via the VkDebugUtilsObjectNameInfoEXT structure. However, as there is no actual object, VkDebugUtilsObjectNameInfoEXT must be passed via the `pNext` chain of this structure, with a `objectType` of VK_OBJECT_TYPE_UNKNOWN and a `objectHandle` of VK_NULL_HANDLE. The name is attached to the unique set of descriptor bits written by the implementation, and writing the same bits again with new debug info may rename the original descriptor.

Note | Implementations are not prevented from returning the same bits for different descriptors. This can result in multiple different samplers mapping to the same name.

VkDescriptorSetAndBindingMappingEXT can also be chained in the same way when defining an embedded sampler via VkDescriptorSetAndBindingMappingEXT, naming the embedded sampler.

Valid Usage

- VUID-VkSamplerCreateInfo-mipLodBias-01069
  The absolute value of `mipLodBias` must be less than or equal to `VkPhysicalDeviceLimits`::`maxSamplerLodBias`

- VUID-VkSamplerCreateInfo-samplerMipLodBias-04467
  If the `VK_KHR_portability_subset` extension is enabled, and VkPhysicalDevicePortabilitySubsetFeaturesKHR::`samplerMipLodBias` is VK_FALSE, `mipLodBias` must be zero

- VUID-VkSamplerCreateInfo-maxLod-01973
  `maxLod` must be greater than or equal to `minLod`

- VUID-VkSamplerCreateInfo-anisotropyEnable-01070
  If the `samplerAnisotropy` feature is not enabled, `anisotropyEnable` must be VK_FALSE

- VUID-VkSamplerCreateInfo-anisotropyEnable-01071
  If `anisotropyEnable` is VK_TRUE, `maxAnisotropy` must be between `1.0` and `VkPhysicalDeviceLimits`::`maxSamplerAnisotropy`, inclusive

- VUID-VkSamplerCreateInfo-minFilter-01645
  If sampler Y′CBCR conversion is enabled and the potential format features of the sampler Y′CBCR conversion do not support VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT, `minFilter` and `magFilter` must be equal to the sampler Y′CBCR conversion’s `chromaFilter`

- VUID-VkSamplerCreateInfo-unnormalizedCoordinates-01072
  If `unnormalizedCoordinates` is VK_TRUE, `minFilter` and `magFilter` must be equal

- VUID-VkSamplerCreateInfo-unnormalizedCoordinates-01073
  If `unnormalizedCoordinates` is VK_TRUE, `mipmapMode` must be VK_SAMPLER_MIPMAP_MODE_NEAREST

- VUID-VkSamplerCreateInfo-unnormalizedCoordinates-01074
  If `unnormalizedCoordinates` is VK_TRUE, `minLod` and `maxLod` must be zero

- VUID-VkSamplerCreateInfo-unnormalizedCoordinates-01075
  If `unnormalizedCoordinates` is VK_TRUE, `addressModeU` and `addressModeV` must each be either VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE or VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER

- VUID-VkSamplerCreateInfo-unnormalizedCoordinates-01076
  If `unnormalizedCoordinates` is VK_TRUE, `anisotropyEnable` must be VK_FALSE

- VUID-VkSamplerCreateInfo-unnormalizedCoordinates-01077
  If `unnormalizedCoordinates` is VK_TRUE, `compareEnable` must be VK_FALSE

- VUID-VkSamplerCreateInfo-addressModeU-01078
  If any of `addressModeU`, `addressModeV` or `addressModeW` are VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER, `borderColor` must be a valid VkBorderColor value

- VUID-VkSamplerCreateInfo-addressModeU-01646
  If sampler Y′CBCR conversion is enabled, `addressModeU`, `addressModeV`, and `addressModeW` must be VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, `anisotropyEnable` must be VK_FALSE, and `unnormalizedCoordinates` must be VK_FALSE

- VUID-VkSamplerCreateInfo-None-01647
  If sampler Y′CBCR conversion is enabled and the `pNext` chain includes a VkSamplerReductionModeCreateInfo structure, then the sampler reduction mode must be VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE

- VUID-VkSamplerCreateInfo-pNext-06726
  If the `samplerFilterMinmax` feature is not enabled and the `pNext` chain includes a VkSamplerReductionModeCreateInfo structure, then the sampler reduction mode must be VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE

- VUID-VkSamplerCreateInfo-addressModeU-01079
  If the `samplerMirrorClampToEdge` feature is not enabled, and if the `VK_KHR_sampler_mirror_clamp_to_edge` extension is not enabled, `addressModeU`, `addressModeV` and `addressModeW` must not be VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE

- VUID-VkSamplerCreateInfo-compareEnable-01080
  If `compareEnable` is VK_TRUE, `compareOp` must be a valid VkCompareOp value

- VUID-VkSamplerCreateInfo-magFilter-01081
  If either `magFilter` or `minFilter` is VK_FILTER_CUBIC_EXT, `anisotropyEnable` must be VK_FALSE

- VUID-VkSamplerCreateInfo-magFilter-07911
  If the VK_EXT_filter_cubic extension is not enabled and either `magFilter` or `minFilter` is VK_FILTER_CUBIC_IMG, the `reductionMode` member of VkSamplerReductionModeCreateInfo must be VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE

- VUID-VkSamplerCreateInfo-compareEnable-01423
  If `compareEnable` is VK_TRUE, the `reductionMode` member of VkSamplerReductionModeCreateInfo must be VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE

- VUID-VkSamplerCreateInfo-flags-02574
  If `flags` includes VK_SAMPLER_CREATE_SUBSAMPLED_BIT_EXT, then `minFilter` and `magFilter` must be equal

- VUID-VkSamplerCreateInfo-flags-02575
  If `flags` includes VK_SAMPLER_CREATE_SUBSAMPLED_BIT_EXT, then `mipmapMode` must be VK_SAMPLER_MIPMAP_MODE_NEAREST

- VUID-VkSamplerCreateInfo-flags-02576
  If `flags` includes VK_SAMPLER_CREATE_SUBSAMPLED_BIT_EXT, then `minLod` and `maxLod` must be zero

- VUID-VkSamplerCreateInfo-flags-02577
  If `flags` includes VK_SAMPLER_CREATE_SUBSAMPLED_BIT_EXT, then `addressModeU` and `addressModeV` must each be either VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE or VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER

- VUID-VkSamplerCreateInfo-flags-02578
  If `flags` includes VK_SAMPLER_CREATE_SUBSAMPLED_BIT_EXT, then `anisotropyEnable` must be VK_FALSE

- VUID-VkSamplerCreateInfo-flags-02579
  If `flags` includes VK_SAMPLER_CREATE_SUBSAMPLED_BIT_EXT, then `compareEnable` must be VK_FALSE

- VUID-VkSamplerCreateInfo-flags-02580
  If `flags` includes VK_SAMPLER_CREATE_SUBSAMPLED_BIT_EXT, then `unnormalizedCoordinates` must be VK_FALSE

- VUID-VkSamplerCreateInfo-nonSeamlessCubeMap-06788
  If the `nonSeamlessCubeMap` feature is not enabled, `flags` must not include VK_SAMPLER_CREATE_NON_SEAMLESS_CUBE_MAP_BIT_EXT

- VUID-VkSamplerCreateInfo-borderColor-04011
  If `borderColor` is one of VK_BORDER_COLOR_FLOAT_CUSTOM_EXT or VK_BORDER_COLOR_INT_CUSTOM_EXT, then a VkSamplerCustomBorderColorCreateInfoEXT must be included in the `pNext` chain

- VUID-VkSamplerCreateInfo-customBorderColors-04085
  If the `customBorderColors` feature is not enabled, `borderColor` must not be VK_BORDER_COLOR_FLOAT_CUSTOM_EXT or VK_BORDER_COLOR_INT_CUSTOM_EXT

- VUID-VkSamplerCreateInfo-borderColor-04442
  If `borderColor` is one of VK_BORDER_COLOR_FLOAT_CUSTOM_EXT or VK_BORDER_COLOR_INT_CUSTOM_EXT, and VkSamplerCustomBorderColorCreateInfoEXT::`format` is not VK_FORMAT_UNDEFINED, VkSamplerCustomBorderColorCreateInfoEXT::`customBorderColor` must be within the range of values representable in `format`

- VUID-VkSamplerCreateInfo-None-04012
  The maximum number of samplers with custom border colors which can be simultaneously created on a device is implementation-dependent and specified by the `maxCustomBorderColorSamplers` member of the VkPhysicalDeviceCustomBorderColorPropertiesEXT structure

- VUID-VkSamplerCreateInfo-flags-08110
  If `flags` includes VK_SAMPLER_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT, the `descriptorBufferCaptureReplay` feature must be enabled

- VUID-VkSamplerCreateInfo-pNext-08111
  If the `pNext` chain includes a VkOpaqueCaptureDescriptorDataCreateInfoEXT structure, `flags` must contain VK_SAMPLER_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT

- VUID-VkSamplerCreateInfo-flags-06964
  If `flags` includes VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM, then `minFilter` and `magFilter` must be VK_FILTER_NEAREST

- VUID-VkSamplerCreateInfo-flags-06965
  If `flags` includes VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM, then `mipmapMode` must be VK_SAMPLER_MIPMAP_MODE_NEAREST

- VUID-VkSamplerCreateInfo-flags-06966
  [If `flags` includes VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM, then `minLod` and `maxLod` must be zero

- VUID-VkSamplerCreateInfo-flags-06967
  If `flags` includes VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM, then `addressModeU` and `addressModeV` must each be either VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE or VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER

- VUID-VkSamplerCreateInfo-flags-06968
  If `flags` includes VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM, and if `addressModeU` or `addressModeV` is VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER, then `borderColor` must be VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK

- VUID-VkSamplerCreateInfo-flags-06969
  If `flags` includes VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM, then `anisotropyEnable` must be VK_FALSE

- VUID-VkSamplerCreateInfo-flags-06970
  If `flags` includes VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM, then `compareEnable` must be VK_FALSE

Valid Usage (Implicit)

- VUID-VkSamplerCreateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO

- VUID-VkSamplerCreateInfo-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkDebugUtilsObjectNameInfoEXT, VkOpaqueCaptureDescriptorDataCreateInfoEXT, VkSamplerBlockMatchWindowCreateInfoQCOM, VkSamplerBorderColorComponentMappingCreateInfoEXT, VkSamplerCubicWeightsCreateInfoQCOM, VkSamplerCustomBorderColorCreateInfoEXT, VkSamplerCustomBorderColorIndexCreateInfoEXT, VkSamplerReductionModeCreateInfo, or VkSamplerYcbcrConversionInfo

- VUID-VkSamplerCreateInfo-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkSamplerCreateInfo-flags-parameter
  `flags` must be a valid combination of VkSamplerCreateFlagBits values

- VUID-VkSamplerCreateInfo-magFilter-parameter
  `magFilter` must be a valid VkFilter value

- VUID-VkSamplerCreateInfo-minFilter-parameter
  `minFilter` must be a valid VkFilter value

- VUID-VkSamplerCreateInfo-mipmapMode-parameter
  `mipmapMode` must be a valid VkSamplerMipmapMode value

- VUID-VkSamplerCreateInfo-addressModeU-parameter
  `addressModeU` must be a valid VkSamplerAddressMode value

- VUID-VkSamplerCreateInfo-addressModeV-parameter
  `addressModeV` must be a valid VkSamplerAddressMode value

- VUID-VkSamplerCreateInfo-addressModeW-parameter
  `addressModeW` must be a valid VkSamplerAddressMode value

VK_LOD_CLAMP_NONE is a special constant value used for VkSamplerCreateInfo::`maxLod` to indicate that maximum LOD clamping should not be performed.

    #define VK_LOD_CLAMP_NONE                 1000.0F

Bits which can be set in VkSamplerCreateInfo::`flags`, specifying additional parameters of a sampler, are:

    // Provided by VK_VERSION_1_0
    typedef enum VkSamplerCreateFlagBits {
      // Provided by VK_EXT_fragment_density_map
        VK_SAMPLER_CREATE_SUBSAMPLED_BIT_EXT = 0x00000001,
      // Provided by VK_EXT_fragment_density_map
        VK_SAMPLER_CREATE_SUBSAMPLED_COARSE_RECONSTRUCTION_BIT_EXT = 0x00000002,
      // Provided by VK_EXT_descriptor_buffer
        VK_SAMPLER_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT = 0x00000008,
      // Provided by VK_EXT_non_seamless_cube_map
        VK_SAMPLER_CREATE_NON_SEAMLESS_CUBE_MAP_BIT_EXT = 0x00000004,
      // Provided by VK_QCOM_image_processing
        VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM = 0x00000010,
    } VkSamplerCreateFlagBits;

- VK_SAMPLER_CREATE_SUBSAMPLED_BIT_EXT specifies that the sampler will read from an image created with `flags` containing VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT.

- VK_SAMPLER_CREATE_SUBSAMPLED_COARSE_RECONSTRUCTION_BIT_EXT specifies that the implementation may use approximations when reconstructing a full color value for texture access from a subsampled image.

- VK_SAMPLER_CREATE_NON_SEAMLESS_CUBE_MAP_BIT_EXT specifies that cube map edge handling is not performed.

- VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM specifies that the sampler will read from images using only `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM`.

Note | The approximations used when VK_SAMPLER_CREATE_SUBSAMPLED_COARSE_RECONSTRUCTION_BIT_EXT is specified are implementation defined. Some implementations may interpolate between fragment density levels in a subsampled image. In that case, this bit may be used to decide whether the interpolation factors are calculated per fragment or at a coarser granularity.

- VK_SAMPLER_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT specifies that the sampler can be used with descriptor buffers when capturing and replaying (e.g. for trace capture and replay), see VkOpaqueCaptureDescriptorDataCreateInfoEXT for more detail.

    // Provided by VK_VERSION_1_0
    typedef VkFlags VkSamplerCreateFlags;

`VkSamplerCreateFlags` is a bitmask type for setting a mask of zero or more VkSamplerCreateFlagBits.

The `VkSamplerReductionModeCreateInfo` structure is defined as:

    // Provided by VK_VERSION_1_2
    typedef struct VkSamplerReductionModeCreateInfo {
        VkStructureType           sType;
        const void*               pNext;
        VkSamplerReductionMode    reductionMode;
    } VkSamplerReductionModeCreateInfo;

    // Provided by VK_EXT_sampler_filter_minmax
    // Equivalent to VkSamplerReductionModeCreateInfo
    typedef VkSamplerReductionModeCreateInfo VkSamplerReductionModeCreateInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `reductionMode` is a VkSamplerReductionMode value controlling how texture filtering combines texel values.

If the `pNext` chain of VkSamplerCreateInfo includes a `VkSamplerReductionModeCreateInfo` structure, then that structure includes a mode controlling how texture filtering combines texel values.

If this structure is not present, `reductionMode` is considered to be VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE.

Valid Usage (Implicit)

- VUID-VkSamplerReductionModeCreateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO

- VUID-VkSamplerReductionModeCreateInfo-reductionMode-parameter
  `reductionMode` must be a valid VkSamplerReductionMode value

Structure Chaining

Extends the structure

  - VkSamplerCreateInfo

Reduction modes are specified by VkSamplerReductionMode, which takes values:

    // Provided by VK_VERSION_1_2
    typedef enum VkSamplerReductionMode {
        VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE = 0,
        VK_SAMPLER_REDUCTION_MODE_MIN = 1,
        VK_SAMPLER_REDUCTION_MODE_MAX = 2,
      // Provided by VK_QCOM_filter_cubic_clamp
        VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM = 1000521000,
      // Provided by VK_EXT_sampler_filter_minmax
        VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_EXT = VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE,
      // Provided by VK_EXT_sampler_filter_minmax
        VK_SAMPLER_REDUCTION_MODE_MIN_EXT = VK_SAMPLER_REDUCTION_MODE_MIN,
      // Provided by VK_EXT_sampler_filter_minmax
        VK_SAMPLER_REDUCTION_MODE_MAX_EXT = VK_SAMPLER_REDUCTION_MODE_MAX,
    } VkSamplerReductionMode;

    // Provided by VK_EXT_sampler_filter_minmax
    // Equivalent to VkSamplerReductionMode
    typedef VkSamplerReductionMode VkSamplerReductionModeEXT;

- VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE specifies that texel values are combined by computing a weighted average of values in the footprint, using weights as specified in the image operations chapter.

- VK_SAMPLER_REDUCTION_MODE_MIN specifies that texel values are combined by taking the component-wise minimum of values in the footprint with non-zero weights.

- VK_SAMPLER_REDUCTION_MODE_MAX specifies that texel values are combined by taking the component-wise maximum of values in the footprint with non-zero weights.

- VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM specifies values are combined as described by VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, followed by a texel range clamp.

The `VkSamplerCubicWeightsCreateInfoQCOM` structure is defined as:

    // Provided by VK_QCOM_filter_cubic_weights
    typedef struct VkSamplerCubicWeightsCreateInfoQCOM {
        VkStructureType             sType;
        const void*                 pNext;
        VkCubicFilterWeightsQCOM    cubicWeights;
    } VkSamplerCubicWeightsCreateInfoQCOM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `cubicWeights` is a VkCubicFilterWeightsQCOM value controlling which cubic weights are used.

If the `pNext` chain of VkSamplerCreateInfo includes a `VkSamplerCubicWeightsCreateInfoQCOM` structure, then that structure specifies which cubic weights are used.

If that structure is not present, `cubicWeights` is considered to be VK_CUBIC_FILTER_WEIGHTS_CATMULL_ROM_QCOM.

Valid Usage (Implicit)

- VUID-VkSamplerCubicWeightsCreateInfoQCOM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SAMPLER_CUBIC_WEIGHTS_CREATE_INFO_QCOM

- VUID-VkSamplerCubicWeightsCreateInfoQCOM-cubicWeights-parameter
  `cubicWeights` must be a valid VkCubicFilterWeightsQCOM value

Structure Chaining

Extends the structure

  - VkSamplerCreateInfo

Possible values of the VkSamplerCubicWeightsCreateInfoQCOM::`cubicWeights`, specifying cubic weights used in Texel Cubic Filtering are:

    // Provided by VK_QCOM_filter_cubic_weights
    typedef enum VkCubicFilterWeightsQCOM {
        VK_CUBIC_FILTER_WEIGHTS_CATMULL_ROM_QCOM = 0,
        VK_CUBIC_FILTER_WEIGHTS_ZERO_TANGENT_CARDINAL_QCOM = 1,
        VK_CUBIC_FILTER_WEIGHTS_B_SPLINE_QCOM = 2,
        VK_CUBIC_FILTER_WEIGHTS_MITCHELL_NETRAVALI_QCOM = 3,
    } VkCubicFilterWeightsQCOM;

- VK_CUBIC_FILTER_WEIGHTS_CATMULL_ROM_QCOM specifies Catmull-Rom weights.

- VK_CUBIC_FILTER_WEIGHTS_ZERO_TANGENT_CARDINAL_QCOM specifies Zero Tangent Cardinal weights.

- VK_CUBIC_FILTER_WEIGHTS_B_SPLINE_QCOM specifies B-Spline weights.

- VK_CUBIC_FILTER_WEIGHTS_MITCHELL_NETRAVALI_QCOM specifies Mitchell-Netravali weights.

Possible values of the VkSamplerCreateInfo::`magFilter` and `minFilter` parameters, specifying filters used for texture lookups, are:

    // Provided by VK_VERSION_1_0
    typedef enum VkFilter {
        VK_FILTER_NEAREST = 0,
        VK_FILTER_LINEAR = 1,
      // Provided by VK_EXT_filter_cubic
        VK_FILTER_CUBIC_EXT = 1000015000,
      // Provided by VK_IMG_filter_cubic
        VK_FILTER_CUBIC_IMG = VK_FILTER_CUBIC_EXT,
    } VkFilter;

- VK_FILTER_NEAREST specifies nearest filtering.

- VK_FILTER_LINEAR specifies linear filtering.

- VK_FILTER_CUBIC_EXT specifies cubic filtering.

These filters are described in detail in Texel Filtering.

Possible values of the VkSamplerCreateInfo::`mipmapMode`, specifying the mipmap mode used for texture lookups, are:

    // Provided by VK_VERSION_1_0
    typedef enum VkSamplerMipmapMode {
        VK_SAMPLER_MIPMAP_MODE_NEAREST = 0,
        VK_SAMPLER_MIPMAP_MODE_LINEAR = 1,
    } VkSamplerMipmapMode;

- VK_SAMPLER_MIPMAP_MODE_NEAREST specifies nearest filtering.

- VK_SAMPLER_MIPMAP_MODE_LINEAR specifies linear filtering.

These modes are described in detail in Texel Filtering.

Possible values of the VkSamplerCreateInfo::`addressMode*` parameters, corresponding to different wrapping operations used during sampling, are:

    // Provided by VK_VERSION_1_0
    typedef enum VkSamplerAddressMode {
        VK_SAMPLER_ADDRESS_MODE_REPEAT = 0,
        VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT = 1,
        VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE = 2,
        VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER = 3,
      // Provided by VK_VERSION_1_2, VK_KHR_sampler_mirror_clamp_to_edge
        VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE = 4,
      // Provided by VK_KHR_sampler_mirror_clamp_to_edge
      // VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE_KHR is a legacy alias
        VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE_KHR = VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE,
    } VkSamplerAddressMode;

- VK_SAMPLER_ADDRESS_MODE_REPEAT specifies that the repeat wrap mode will be used.

- VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT specifies that the mirrored repeat wrap mode will be used.

- VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE specifies that the clamp to edge wrap mode will be used.

- VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER specifies that the clamp to border wrap mode will be used.

- VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE specifies that the mirror clamp to edge wrap mode will be used. This is only valid if the `samplerMirrorClampToEdge` feature is enabled, or if the `VK_KHR_sampler_mirror_clamp_to_edge` extension is enabled.

Comparison operators compare a reference and a test value, and return a true (“passed”) or false (“failed”) value depending on the comparison operator chosen. The supported operators are:

    // Provided by VK_VERSION_1_0
    typedef enum VkCompareOp {
        VK_COMPARE_OP_NEVER = 0,
        VK_COMPARE_OP_LESS = 1,
        VK_COMPARE_OP_EQUAL = 2,
        VK_COMPARE_OP_LESS_OR_EQUAL = 3,
        VK_COMPARE_OP_GREATER = 4,
        VK_COMPARE_OP_NOT_EQUAL = 5,
        VK_COMPARE_OP_GREATER_OR_EQUAL = 6,
        VK_COMPARE_OP_ALWAYS = 7,
    } VkCompareOp;

- VK_COMPARE_OP_NEVER specifies that the comparison always evaluates false.

- VK_COMPARE_OP_LESS specifies that the comparison evaluates reference < test.

- VK_COMPARE_OP_EQUAL specifies that the comparison evaluates reference = test.

- VK_COMPARE_OP_LESS_OR_EQUAL specifies that the comparison evaluates reference ≤ test.

- VK_COMPARE_OP_GREATER specifies that the comparison evaluates reference > test.

- VK_COMPARE_OP_NOT_EQUAL specifies that the comparison evaluates reference ≠ test.

- VK_COMPARE_OP_GREATER_OR_EQUAL specifies that the comparison evaluates reference ≥ test.

- VK_COMPARE_OP_ALWAYS specifies that the comparison always evaluates true.

Comparison operators are used for:

- The Depth Compare Operation operator for a sampler, specified by VkSamplerCreateInfo::`compareOp`.

- The stencil comparison operator for the stencil test, specified by vkCmdSetStencilOp::`compareOp` or VkStencilOpState::`compareOp`.

- The Depth Comparison operator for the depth test, specified by vkCmdSetDepthCompareOp::`depthCompareOp` or VkPipelineDepthStencilStateCreateInfo::`depthCompareOp`.

Each such use describes how the reference and test values for that comparison are determined.

Possible values of VkSamplerCreateInfo::`borderColor`, specifying the border color used for texture lookups, are:

    // Provided by VK_VERSION_1_0
    typedef enum VkBorderColor {
        VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK = 0,
        VK_BORDER_COLOR_INT_TRANSPARENT_BLACK = 1,
        VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK = 2,
        VK_BORDER_COLOR_INT_OPAQUE_BLACK = 3,
        VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE = 4,
        VK_BORDER_COLOR_INT_OPAQUE_WHITE = 5,
      // Provided by VK_EXT_custom_border_color
        VK_BORDER_COLOR_FLOAT_CUSTOM_EXT = 1000287003,
      // Provided by VK_EXT_custom_border_color
        VK_BORDER_COLOR_INT_CUSTOM_EXT = 1000287004,
    } VkBorderColor;

- VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK specifies a transparent, floating-point format, black color.

- VK_BORDER_COLOR_INT_TRANSPARENT_BLACK specifies a transparent, integer format, black color.

- VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK specifies an opaque, floating-point format, black color.

- VK_BORDER_COLOR_INT_OPAQUE_BLACK specifies an opaque, integer format, black color.

- VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE specifies an opaque, floating-point format, white color.

- VK_BORDER_COLOR_INT_OPAQUE_WHITE specifies an opaque, integer format, white color.

- VK_BORDER_COLOR_FLOAT_CUSTOM_EXT specifies that a VkSamplerCustomBorderColorCreateInfoEXT structure is included in the VkSamplerCreateInfo::`pNext` chain containing the color data in floating-point format.

- VK_BORDER_COLOR_INT_CUSTOM_EXT specifies that a VkSamplerCustomBorderColorCreateInfoEXT structure is included in the VkSamplerCreateInfo::`pNext` chain containing the color data in integer format.

These colors are described in detail in Border Replacement.

To destroy a sampler, call:

    // Provided by VK_VERSION_1_0
    void vkDestroySampler(
        VkDevice                                    device,
        VkSampler                                   sampler,
        const VkAllocationCallbacks*                pAllocator);

- `device` is the logical device that destroys the sampler.

- `sampler` is the sampler to destroy.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

Valid Usage

- VUID-vkDestroySampler-sampler-01082
  All submitted commands that refer to `sampler` must have completed execution

- VUID-vkDestroySampler-sampler-01083
  If `VkAllocationCallbacks` were provided when `sampler` was created, a compatible set of callbacks must be provided here

- VUID-vkDestroySampler-sampler-01084
  If no `VkAllocationCallbacks` were provided when `sampler` was created, `pAllocator` must be `NULL`

Valid Usage (Implicit)

- VUID-vkDestroySampler-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkDestroySampler-sampler-parameter
  If `sampler` is not VK_NULL_HANDLE, `sampler` must be a valid VkSampler handle

- VUID-vkDestroySampler-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkDestroySampler-sampler-parent
  If `sampler` is a valid handle, it must have been created, allocated, or retrieved from `device`

Host Synchronization

- Host access to `sampler` must be externally synchronized

### 14.1. Sampler Y′CBCR Conversion

To create a sampler with Y′CBCR conversion enabled, add a VkSamplerYcbcrConversionInfo structure to the `pNext` chain of the VkSamplerCreateInfo structure. To create a sampler Y′CBCR conversion, the `samplerYcbcrConversion` feature must be enabled. Conversion must be fixed at pipeline creation time, through use of a combined embedded sampler and image mapping if using descriptor heaps, or a combined image sampler with an immutable sampler in `VkDescriptorSetLayoutBinding`.

A VkSamplerYcbcrConversionInfo must be provided for samplers to be used with image views that access VK_IMAGE_ASPECT_COLOR_BIT if the format is one of the formats that require a sampler Y′CBCR conversion , or if the image view has an external format .

The `VkSamplerYcbcrConversionInfo` structure is defined as:

    // Provided by VK_VERSION_1_1
    typedef struct VkSamplerYcbcrConversionInfo {
        VkStructureType             sType;
        const void*                 pNext;
        VkSamplerYcbcrConversion    conversion;
    } VkSamplerYcbcrConversionInfo;

    // Provided by VK_KHR_sampler_ycbcr_conversion
    // Equivalent to VkSamplerYcbcrConversionInfo
    typedef VkSamplerYcbcrConversionInfo VkSamplerYcbcrConversionInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `conversion` is a VkSamplerYcbcrConversion handle created with vkCreateSamplerYcbcrConversion.

Valid Usage (Implicit)

- VUID-VkSamplerYcbcrConversionInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO

- VUID-VkSamplerYcbcrConversionInfo-conversion-parameter
  `conversion` must be a valid VkSamplerYcbcrConversion handle

Structure Chaining

Extends the structures

  - VkImageViewCreateInfo

  - VkSamplerCreateInfo

A sampler Y′CBCR conversion is an opaque representation of a device-specific sampler Y′CBCR conversion description, represented as a `VkSamplerYcbcrConversion` handle:

    // Provided by VK_VERSION_1_1
    VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSamplerYcbcrConversion)

    // Provided by VK_KHR_sampler_ycbcr_conversion
    // Equivalent to VkSamplerYcbcrConversion
    typedef VkSamplerYcbcrConversion VkSamplerYcbcrConversionKHR;

To create a VkSamplerYcbcrConversion, call:

    // Provided by VK_VERSION_1_1
    VkResult vkCreateSamplerYcbcrConversion(
        VkDevice                                    device,
        const VkSamplerYcbcrConversionCreateInfo*   pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkSamplerYcbcrConversion*                   pYcbcrConversion);

    // Provided by VK_KHR_sampler_ycbcr_conversion
    // Equivalent to vkCreateSamplerYcbcrConversion
    VkResult vkCreateSamplerYcbcrConversionKHR(
        VkDevice                                    device,
        const VkSamplerYcbcrConversionCreateInfo*   pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkSamplerYcbcrConversion*                   pYcbcrConversion);

- `device` is the logical device that creates the sampler Y′CBCR conversion.

- `pCreateInfo` is a pointer to a VkSamplerYcbcrConversionCreateInfo structure specifying the requested sampler Y′CBCR conversion.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

- `pYcbcrConversion` is a pointer to a VkSamplerYcbcrConversion handle in which the resulting sampler Y′CBCR conversion is returned.

The interpretation of the configured sampler Y′CBCR conversion is described in more detail in the description of sampler Y′CBCR conversion in the Image Operations chapter.

Valid Usage

- VUID-vkCreateSamplerYcbcrConversion-None-01648
  The `samplerYcbcrConversion` feature must be enabled

Valid Usage (Implicit)

- VUID-vkCreateSamplerYcbcrConversion-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkCreateSamplerYcbcrConversion-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkSamplerYcbcrConversionCreateInfo structure

- VUID-vkCreateSamplerYcbcrConversion-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateSamplerYcbcrConversion-pYcbcrConversion-parameter
  `pYcbcrConversion` must be a valid pointer to a VkSamplerYcbcrConversion handle

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkSamplerYcbcrConversionCreateInfo` structure is defined as:

    // Provided by VK_VERSION_1_1
    typedef struct VkSamplerYcbcrConversionCreateInfo {
        VkStructureType                  sType;
        const void*                      pNext;
        VkFormat                         format;
        VkSamplerYcbcrModelConversion    ycbcrModel;
        VkSamplerYcbcrRange              ycbcrRange;
        VkComponentMapping               components;
        VkChromaLocation                 xChromaOffset;
        VkChromaLocation                 yChromaOffset;
        VkFilter                         chromaFilter;
        VkBool32                         forceExplicitReconstruction;
    } VkSamplerYcbcrConversionCreateInfo;

    // Provided by VK_KHR_sampler_ycbcr_conversion
    // Equivalent to VkSamplerYcbcrConversionCreateInfo
    typedef VkSamplerYcbcrConversionCreateInfo VkSamplerYcbcrConversionCreateInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `format` is the format of the image from which color information will be retrieved.

- `ycbcrModel` describes the color matrix for conversion between color models.

- `ycbcrRange` describes whether the encoded values have headroom and foot room, or whether the encoding uses the full numerical range.

- `components` applies a swizzle based on VkComponentSwizzle enums prior to range expansion and color model conversion.

- `xChromaOffset` describes the sample location associated with downsampled chroma components in the x dimension. `xChromaOffset` has no effect for formats in which chroma components are not downsampled horizontally.

- `yChromaOffset` describes the sample location associated with downsampled chroma components in the y dimension. `yChromaOffset` has no effect for formats in which the chroma components are not downsampled vertically.

- `chromaFilter` is the filter for chroma reconstruction.

- `forceExplicitReconstruction` can be used to ensure that reconstruction is done explicitly, if supported.

Note | Setting `forceExplicitReconstruction` to VK_TRUE may have a performance penalty on implementations where explicit reconstruction is not the default mode of operation. If `format` supports VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT the `forceExplicitReconstruction` value behaves as if it were VK_TRUE.

If the `pNext` chain includes a VkExternalFormatANDROID structure with non-zero `externalFormat` member, the sampler Y′CBCR conversion object represents an external format conversion, and `format` must be VK_FORMAT_UNDEFINED. Such conversions must only be used to sample image views with a matching external format. When creating an external format conversion, the value of `components` is ignored.

Valid Usage

- VUID-VkSamplerYcbcrConversionCreateInfo-format-01904
  If an external format conversion is being created, `format` must be VK_FORMAT_UNDEFINED

- VUID-VkSamplerYcbcrConversionCreateInfo-format-04061
  If an external format conversion is not being created, `format` must represent unsigned normalized values (i.e. the format must be a `UNORM` format)

- VUID-VkSamplerYcbcrConversionCreateInfo-format-01650
  The potential format features of the sampler Y′CBCR conversion must support VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT or VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT

- VUID-VkSamplerYcbcrConversionCreateInfo-xChromaOffset-01651
  If the potential format features of the sampler Y′CBCR conversion do not support VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT, `xChromaOffset` and `yChromaOffset` must not be VK_CHROMA_LOCATION_COSITED_EVEN if the corresponding components are downsampled

- VUID-VkSamplerYcbcrConversionCreateInfo-xChromaOffset-01652
  If the potential format features of the sampler Y′CBCR conversion do not support VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT, `xChromaOffset` and `yChromaOffset` must not be VK_CHROMA_LOCATION_MIDPOINT if the corresponding components are downsampled

- VUID-VkSamplerYcbcrConversionCreateInfo-components-02581
  If the format has a `_422` or `_420` suffix, then `components.g` must be the identity swizzle

- VUID-VkSamplerYcbcrConversionCreateInfo-components-02582
  If the format has a `_422` or `_420` suffix, then `components.a` must be the identity swizzle, VK_COMPONENT_SWIZZLE_ONE, or VK_COMPONENT_SWIZZLE_ZERO

- VUID-VkSamplerYcbcrConversionCreateInfo-components-02583
  If the format has a `_422` or `_420` suffix, then `components.r` must be the identity swizzle or VK_COMPONENT_SWIZZLE_B

- VUID-VkSamplerYcbcrConversionCreateInfo-components-02584
  If the format has a `_422` or `_420` suffix, then `components.b` must be the identity swizzle or VK_COMPONENT_SWIZZLE_R

- VUID-VkSamplerYcbcrConversionCreateInfo-components-02585
  If the format has a `_422` or `_420` suffix, and if either `components.r` or `components.b` is the identity swizzle, both values must be the identity swizzle

- VUID-VkSamplerYcbcrConversionCreateInfo-ycbcrModel-01655
  If `ycbcrModel` is not VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY, then `components.r`, `components.g`, and `components.b` must correspond to components of the `format`; that is, `components.r`, `components.g`, and `components.b` must not be VK_COMPONENT_SWIZZLE_ZERO or VK_COMPONENT_SWIZZLE_ONE, and must not correspond to a component containing zero or one as a consequence of component substitution

- VUID-VkSamplerYcbcrConversionCreateInfo-ycbcrRange-02748
  If `ycbcrRange` is VK_SAMPLER_YCBCR_RANGE_ITU_NARROW, then the R, G, and B components obtained by applying the `component` swizzle to `format` must each have a bit-depth greater than or equal to 8

- VUID-VkSamplerYcbcrConversionCreateInfo-forceExplicitReconstruction-01656
  If the potential format features of the sampler Y′CBCR conversion do not support VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT `forceExplicitReconstruction` must be VK_FALSE

- VUID-VkSamplerYcbcrConversionCreateInfo-chromaFilter-01657
  If the potential format features of the sampler Y′CBCR conversion do not support VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT, `chromaFilter` must not be VK_FILTER_LINEAR

- VUID-VkSamplerYcbcrConversionCreateInfo-pNext-09207
  If the `pNext` chain includes a VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM structure, and if the `ycbcrDegamma` feature is not enabled, then VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM::`enableYDegamma` must be VK_FALSE

- VUID-VkSamplerYcbcrConversionCreateInfo-pNext-09208
  If the `pNext` chain includes a VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM structure, and if the `ycbcrDegamma` feature is not enabled, then VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM::`enableCbCrDegamma` must be VK_FALSE

- VUID-VkSamplerYcbcrConversionCreateInfo-pNext-09209
  If the `pNext` chain includes a VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM structure, `format` must be a format with 8-bit R, G, and B components

Valid Usage (Implicit)

- VUID-VkSamplerYcbcrConversionCreateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFO

- VUID-VkSamplerYcbcrConversionCreateInfo-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkExternalFormatANDROID, VkExternalFormatOHOS, VkExternalFormatQNX, or VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM

- VUID-VkSamplerYcbcrConversionCreateInfo-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkSamplerYcbcrConversionCreateInfo-format-parameter
  `format` must be a valid VkFormat value

- VUID-VkSamplerYcbcrConversionCreateInfo-ycbcrModel-parameter
  `ycbcrModel` must be a valid VkSamplerYcbcrModelConversion value

- VUID-VkSamplerYcbcrConversionCreateInfo-ycbcrRange-parameter
  `ycbcrRange` must be a valid VkSamplerYcbcrRange value

- VUID-VkSamplerYcbcrConversionCreateInfo-components-parameter
  `components` must be a valid VkComponentMapping structure

- VUID-VkSamplerYcbcrConversionCreateInfo-xChromaOffset-parameter
  `xChromaOffset` must be a valid VkChromaLocation value

- VUID-VkSamplerYcbcrConversionCreateInfo-yChromaOffset-parameter
  `yChromaOffset` must be a valid VkChromaLocation value

- VUID-VkSamplerYcbcrConversionCreateInfo-chromaFilter-parameter
  `chromaFilter` must be a valid VkFilter value

If `chromaFilter` is VK_FILTER_NEAREST, chroma samples are reconstructed to luma component resolution using nearest-neighbour sampling. Otherwise, chroma samples are reconstructed using interpolation. More details can be found in the description of sampler Y′CBCR conversion in the Image Operations chapter.

VkSamplerYcbcrModelConversion defines the conversion from the source color model to the shader color model. Possible values are:

    // Provided by VK_VERSION_1_1
    typedef enum VkSamplerYcbcrModelConversion {
        VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY = 0,
        VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY = 1,
        VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709 = 2,
        VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601 = 3,
        VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020 = 4,
      // Provided by VK_KHR_sampler_ycbcr_conversion
        VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY_KHR = VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY,
      // Provided by VK_KHR_sampler_ycbcr_conversion
        VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY_KHR = VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY,
      // Provided by VK_KHR_sampler_ycbcr_conversion
        VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709_KHR = VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709,
      // Provided by VK_KHR_sampler_ycbcr_conversion
        VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601_KHR = VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601,
      // Provided by VK_KHR_sampler_ycbcr_conversion
        VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020_KHR = VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020,
    } VkSamplerYcbcrModelConversion;

    // Provided by VK_KHR_sampler_ycbcr_conversion
    // Equivalent to VkSamplerYcbcrModelConversion
    typedef VkSamplerYcbcrModelConversion VkSamplerYcbcrModelConversionKHR;

- VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY specifies that the input values to the conversion are unmodified.

- VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY specifies no model conversion but the inputs are range expanded as for Y′CBCR.

- VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709 specifies the color model conversion from Y′CBCR to R′G′B′ defined in BT.709 and described in the “BT.709 Y′CBCR conversion” section of the Khronos Data Format Specification.

- VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601 specifies the color model conversion from Y′CBCR to R′G′B′ defined in BT.601 and described in the “BT.601 Y′CBCR conversion” section of the Khronos Data Format Specification.

- VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020 specifies the color model conversion from Y′CBCR to R′G′B′ defined in BT.2020 and described in the “BT.2020 Y′CBCR conversion” section of the Khronos Data Format Specification.

In the `VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_*` color models, for the input to the sampler Y′CBCR range expansion and model conversion:

- the Y (Y′ luma) component corresponds to the G component of an RGB image.

- the CB (CB or “U” blue color difference) component corresponds to the B component of an RGB image.

- the CR (CR or “V” red color difference) component corresponds to the R component of an RGB image.

- the alpha component, if present, is not modified by color model conversion.

These rules reflect the mapping of components after the component swizzle operation (controlled by VkSamplerYcbcrConversionCreateInfo::`components`).

Note | For example, an “YUVA” 32-bit format comprising four 8-bit components can be implemented as VK_FORMAT_R8G8B8A8_UNORM with a component mapping: `components.a` = VK_COMPONENT_SWIZZLE_IDENTITY `components.r` = VK_COMPONENT_SWIZZLE_B `components.g` = VK_COMPONENT_SWIZZLE_R `components.b` = VK_COMPONENT_SWIZZLE_G

The VkSamplerYcbcrRange enum describes whether color components are encoded using the full range of numerical values or whether values are reserved for headroom and foot room. VkSamplerYcbcrRange is defined as:

    // Provided by VK_VERSION_1_1
    typedef enum VkSamplerYcbcrRange {
        VK_SAMPLER_YCBCR_RANGE_ITU_FULL = 0,
        VK_SAMPLER_YCBCR_RANGE_ITU_NARROW = 1,
      // Provided by VK_KHR_sampler_ycbcr_conversion
        VK_SAMPLER_YCBCR_RANGE_ITU_FULL_KHR = VK_SAMPLER_YCBCR_RANGE_ITU_FULL,
      // Provided by VK_KHR_sampler_ycbcr_conversion
        VK_SAMPLER_YCBCR_RANGE_ITU_NARROW_KHR = VK_SAMPLER_YCBCR_RANGE_ITU_NARROW,
    } VkSamplerYcbcrRange;

    // Provided by VK_KHR_sampler_ycbcr_conversion
    // Equivalent to VkSamplerYcbcrRange
    typedef VkSamplerYcbcrRange VkSamplerYcbcrRangeKHR;

- VK_SAMPLER_YCBCR_RANGE_ITU_FULL specifies that the full range of the encoded values are valid and interpreted according to the ITU “full range” quantization rules.

- VK_SAMPLER_YCBCR_RANGE_ITU_NARROW specifies that headroom and foot room are reserved in the numerical range of encoded values, and the remaining values are expanded according to the ITU “narrow range” quantization rules.

The formulae for these conversions is described in the Sampler Y′CBCR Range Expansion section of the Image Operations chapter.

No range modification takes place if `ycbcrModel` is VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY; the `ycbcrRange` field of VkSamplerYcbcrConversionCreateInfo is ignored in this case.

The VkChromaLocation enum defines the location of downsampled chroma component samples relative to the luma samples, and is defined as:

    // Provided by VK_VERSION_1_1
    typedef enum VkChromaLocation {
        VK_CHROMA_LOCATION_COSITED_EVEN = 0,
        VK_CHROMA_LOCATION_MIDPOINT = 1,
      // Provided by VK_KHR_sampler_ycbcr_conversion
        VK_CHROMA_LOCATION_COSITED_EVEN_KHR = VK_CHROMA_LOCATION_COSITED_EVEN,
      // Provided by VK_KHR_sampler_ycbcr_conversion
        VK_CHROMA_LOCATION_MIDPOINT_KHR = VK_CHROMA_LOCATION_MIDPOINT,
    } VkChromaLocation;

    // Provided by VK_KHR_sampler_ycbcr_conversion
    // Equivalent to VkChromaLocation
    typedef VkChromaLocation VkChromaLocationKHR;

- VK_CHROMA_LOCATION_COSITED_EVEN specifies that downsampled chroma samples are aligned with luma samples with even coordinates.

- VK_CHROMA_LOCATION_MIDPOINT specifies that downsampled chroma samples are located half way between each even luma sample and the nearest higher odd luma sample.

Applications can enable sRGB to linear conversion for the R, G, and B components of a Y′CBCR image during sampling by including `VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM` structure in the `pNext` chain of VkSamplerYcbcrConversionCreateInfo.

The `VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM` structure is defined as:

    // Provided by VK_QCOM_ycbcr_degamma
    typedef struct VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           enableYDegamma;
        VkBool32           enableCbCrDegamma;
    } VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `enableYDegamma` indicates sRGB to linear conversion is enabled for the G component.

- `enableCbCrDegamma` indicates sRGB to linear conversion is enabled for the R and B components.

Valid Usage (Implicit)

- VUID-VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_YCBCR_DEGAMMA_CREATE_INFO_QCOM

Structure Chaining

Extends the structure

  - VkSamplerYcbcrConversionCreateInfo

To destroy a sampler Y′CBCR conversion, call:

    // Provided by VK_VERSION_1_1
    void vkDestroySamplerYcbcrConversion(
        VkDevice                                    device,
        VkSamplerYcbcrConversion                    ycbcrConversion,
        const VkAllocationCallbacks*                pAllocator);

    // Provided by VK_KHR_sampler_ycbcr_conversion
    // Equivalent to vkDestroySamplerYcbcrConversion
    void vkDestroySamplerYcbcrConversionKHR(
        VkDevice                                    device,
        VkSamplerYcbcrConversion                    ycbcrConversion,
        const VkAllocationCallbacks*                pAllocator);

- `device` is the logical device that destroys the Y′CBCR conversion.

- `ycbcrConversion` is the conversion to destroy.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

Valid Usage (Implicit)

- VUID-vkDestroySamplerYcbcrConversion-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkDestroySamplerYcbcrConversion-ycbcrConversion-parameter
  If `ycbcrConversion` is not VK_NULL_HANDLE, `ycbcrConversion` must be a valid VkSamplerYcbcrConversion handle

- VUID-vkDestroySamplerYcbcrConversion-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkDestroySamplerYcbcrConversion-ycbcrConversion-parent
  If `ycbcrConversion` is a valid handle, it must have been created, allocated, or retrieved from `device`

Host Synchronization

- Host access to `ycbcrConversion` must be externally synchronized

### 14.2. Custom Border Colors

In addition to the predefined border color values, applications can provide a custom border color value by including the `VkSamplerCustomBorderColorCreateInfoEXT` structure in the VkSamplerCreateInfo::`pNext` chain.

The `VkSamplerCustomBorderColorCreateInfoEXT` structure is defined as:

    // Provided by VK_EXT_custom_border_color
    typedef struct VkSamplerCustomBorderColorCreateInfoEXT {
        VkStructureType      sType;
        const void*          pNext;
        VkClearColorValue    customBorderColor;
        VkFormat             format;
    } VkSamplerCustomBorderColorCreateInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `customBorderColor` is a VkClearColorValue representing the desired custom sampler border color.

- `format` is a VkFormat representing the format of the sampled image view(s). This field may be VK_FORMAT_UNDEFINED if the `customBorderColorWithoutFormat` feature is enabled.

Note | If `format` is a depth/stencil format, the aspect is determined by the value of VkSamplerCreateInfo::`borderColor`. If VkSamplerCreateInfo::`borderColor` is VK_BORDER_COLOR_FLOAT_CUSTOM_EXT, the depth aspect is considered. If VkSamplerCreateInfo::`borderColor` is VK_BORDER_COLOR_INT_CUSTOM_EXT, the stencil aspect is considered. If `format` is VK_FORMAT_UNDEFINED, the VkSamplerCreateInfo::`borderColor` is VK_BORDER_COLOR_INT_CUSTOM_EXT, and the sampler is used with an image with a stencil format, then the implementation must source the custom border color from either the first or second components of VkSamplerCreateInfo::`borderColor` and should source it from the first component.

In some cases, implementations may return undefined values instead of the specified custom border color when used on VK_QUEUE_COMPUTE_BIT queues that do not also support VK_QUEUE_GRAPHICS_BIT.

Note | Tests added in 2026 revealed issues around custom border colors on AMD in compute-only queues, that were not fixable in software. While this will be fixed in future hardware, there is no reasonable workaround for existing hardware. Use of standard border colors is unaffected.

Valid Usage

- VUID-VkSamplerCustomBorderColorCreateInfoEXT-format-07605
  If `format` is not VK_FORMAT_UNDEFINED and `format` is not a depth/stencil format then the VkSamplerCreateInfo::`borderColor` type must match the sampled type of the provided `format`, as shown in the SPIR-V Type column of the Interpretation of Numeric Format table

- VUID-VkSamplerCustomBorderColorCreateInfoEXT-format-04014
  If the `customBorderColorWithoutFormat` feature is not enabled then `format` must not be VK_FORMAT_UNDEFINED

- VUID-VkSamplerCustomBorderColorCreateInfoEXT-format-04015
  If the sampler is used to sample an image view of VK_FORMAT_B4G4R4A4_UNORM_PACK16, VK_FORMAT_B5G6R5_UNORM_PACK16, VK_FORMAT_A1B5G5R5_UNORM_PACK16, or VK_FORMAT_B5G5R5A1_UNORM_PACK16 format then `format` must not be VK_FORMAT_UNDEFINED

Valid Usage (Implicit)

- VUID-VkSamplerCustomBorderColorCreateInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SAMPLER_CUSTOM_BORDER_COLOR_CREATE_INFO_EXT

- VUID-VkSamplerCustomBorderColorCreateInfoEXT-format-parameter
  `format` must be a valid VkFormat value

Structure Chaining

Extends the structure

  - VkSamplerCreateInfo

If the sampler is created with VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK, VK_BORDER_COLOR_INT_OPAQUE_BLACK, VK_BORDER_COLOR_FLOAT_CUSTOM_EXT, or VK_BORDER_COLOR_INT_CUSTOM_EXT `borderColor`, and that sampler will be combined with an image view that does not have an identity swizzle, and VkPhysicalDeviceBorderColorSwizzleFeaturesEXT::`borderColorSwizzleFromImage` is not enabled, then it is necessary to specify the component mapping of the border color, by including the `VkSamplerBorderColorComponentMappingCreateInfoEXT` structure in the VkSamplerCreateInfo::`pNext` chain, to get defined results.

The `VkSamplerBorderColorComponentMappingCreateInfoEXT` structure is defined as:

    // Provided by VK_EXT_border_color_swizzle
    typedef struct VkSamplerBorderColorComponentMappingCreateInfoEXT {
        VkStructureType       sType;
        const void*           pNext;
        VkComponentMapping    components;
        VkBool32              srgb;
    } VkSamplerBorderColorComponentMappingCreateInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `components` is a VkComponentMapping structure specifying a remapping of the border color components.

- `srgb` indicates that the sampler will be combined with an image view that has an image format which is sRGB encoded.

The VkComponentMapping `components` member describes a remapping from components of the border color to components of the vector returned by shader image instructions when the border color is used.

Valid Usage

- VUID-VkSamplerBorderColorComponentMappingCreateInfoEXT-borderColorSwizzle-06437
  The `borderColorSwizzle` feature must be enabled

Valid Usage (Implicit)

- VUID-VkSamplerBorderColorComponentMappingCreateInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SAMPLER_BORDER_COLOR_COMPONENT_MAPPING_CREATE_INFO_EXT

- VUID-VkSamplerBorderColorComponentMappingCreateInfoEXT-components-parameter
  `components` must be a valid VkComponentMapping structure

Structure Chaining

Extends the structure

  - VkSamplerCreateInfo

#### 14.2.1. Custom Border Color Registration

When using descriptor heaps, it is possible to create a sampler descriptor without creating a sampler object. Without this object, implementations using a fixed palette of border colors have no way to know which custom border colors are active or not.

In order to use custom border colors with descriptor heaps, border colors must instead be registered with the implementation and unregistered when they are no longer in use, and the registered index provided when writing the sampler descriptor.

To register a custom border color, call:

    // Provided by VK_EXT_custom_border_color with VK_EXT_descriptor_heap
    VkResult vkRegisterCustomBorderColorEXT(
        VkDevice                                    device,
        const VkSamplerCustomBorderColorCreateInfoEXT* pBorderColor,
        VkBool32                                    requestIndex,
        uint32_t*                                   pIndex);

- `device` is the logical device where the border color is registered.

- `pBorderColor` is a pointer to a VkSamplerCustomBorderColorCreateInfoEXT structure specifying the custom border color value to register.

- `requestIndex` is a Boolean value indicating if a specific index is requested or not.

- `pIndex` is a pointer to a `uint32_t` index value that will be written by the command upon success.

If `requestIndex` is VK_TRUE, the value present in `pIndex` when passed to the command is a requested index, and rather than returning a new index, the implementation will attempt to register that index, leaving the value intact. If the implementation is unable to register a requested index, VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS will be returned. If an index has not been registered (either explicitly or implicitly by creating a sampler object), or if it has been subsequently unregistered, the implementation must register that index successfully.

If `requestIndex` is VK_FALSE, the value stored in `pIndex` is ignored, and a new index will be returned if the implementation is able to register a new index. If the implementation is unable to register a new index, VK_ERROR_TOO_MANY_OBJECTS will be returned.

If an index is successfully registered, it can be used when writing a sampler descriptor or creating a sampler object to use with the custom border color, via VkSamplerCustomBorderColorIndexCreateInfoEXT.

Note | The type of border color is not specified by this command (VK_BORDER_COLOR_FLOAT_CUSTOM_EXT vs. VK_BORDER_COLOR_INT_CUSTOM_EXT); the data will be interpreted at the point the border color is sampled with an actual sampler. Implementations are expected to store the data as raw bytes if they do not need the format to be specified.

Valid Usage

- VUID-vkRegisterCustomBorderColorEXT-requestIndex-11287
  If `requestIndex` is VK_TRUE, the value stored in `pIndex` must be less than maxCustomBorderColorSamplers

Valid Usage (Implicit)

- VUID-vkRegisterCustomBorderColorEXT-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkRegisterCustomBorderColorEXT-pBorderColor-parameter
  `pBorderColor` must be a valid pointer to a valid VkSamplerCustomBorderColorCreateInfoEXT structure

- VUID-vkRegisterCustomBorderColorEXT-pIndex-parameter
  `pIndex` must be a valid pointer to a `uint32_t` value

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_TOO_MANY_OBJECTS

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

To unregister a custom border color, call:

    // Provided by VK_EXT_custom_border_color with VK_EXT_descriptor_heap
    void vkUnregisterCustomBorderColorEXT(
        VkDevice                                    device,
        uint32_t                                    index);

- `device` is the logical device where the border color is registered.

- `index` is the `uint32_t` index value to unregister.

Valid Usage

- VUID-vkUnregisterCustomBorderColorEXT-index-11288
  `index` must be less than `maxCustomBorderColorSamplers`

Valid Usage (Implicit)

- VUID-vkUnregisterCustomBorderColorEXT-device-parameter
  `device` must be a valid VkDevice handle

The `VkSamplerCustomBorderColorIndexCreateInfoEXT` structure is defined as:

    // Provided by VK_EXT_custom_border_color with VK_EXT_descriptor_heap
    typedef struct VkSamplerCustomBorderColorIndexCreateInfoEXT {
        VkStructureType    sType;
        const void*        pNext;
        uint32_t           index;
    } VkSamplerCustomBorderColorIndexCreateInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `index` is the `uint32_t` index value to use with the sampler

If this structure is included in the `pNext` chain of VkSamplerCreateInfo, the value of `index` will be used for the custom border color registration. `index` does not need to be registered at the point that a sampler object is created or a sampler descriptor is written; as long as it is registered when any use of the sampler is recorded to a command, and remains registered while the sampler is in use. The color registered with the index and the color specified in the sampler must be identically defined.

If this structure is not provided when creating a sampler object with a custom border color, it is equivalent to registering a new custom border color by calling vkRegisterCustomBorderColorEXT with that custom border color value, and using that value as `index` in this structure. This implicit registration will be implicitly unregistered when the sampler is destroyed.

If this structure is not provided when creating a sampler object without a custom border color, it is equivalent to setting `index` to 0.

Valid Usage

- VUID-VkSamplerCustomBorderColorIndexCreateInfoEXT-index-11289
  `index` must be less than `maxCustomBorderColorSamplers`

Valid Usage (Implicit)

- VUID-VkSamplerCustomBorderColorIndexCreateInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SAMPLER_CUSTOM_BORDER_COLOR_INDEX_CREATE_INFO_EXT

Structure Chaining

Extends the structure

  - VkSamplerCreateInfo

### 14.3. Sampler block matching

The `VkSamplerBlockMatchWindowCreateInfoQCOM` structure is defined as:

    // Provided by VK_QCOM_image_processing2
    typedef struct VkSamplerBlockMatchWindowCreateInfoQCOM {
        VkStructureType                      sType;
        const void*                          pNext;
        VkExtent2D                           windowExtent;
        VkBlockMatchWindowCompareModeQCOM    windowCompareMode;
    } VkSamplerBlockMatchWindowCreateInfoQCOM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `windowExtent` is a VkExtent2D specifying a the width and height of the block match window.

- `windowCompareMode` is a VkBlockMatchWindowCompareModeQCOM specifying the compare mode.

Valid Usage

- VUID-VkSamplerBlockMatchWindowCreateInfoQCOM-WindowExtent-09210
  `WindowExtent` must not be larger than VkPhysicalDeviceImageProcessing2PropertiesQCOM::`maxBlockMatchWindow`

Valid Usage (Implicit)

- VUID-VkSamplerBlockMatchWindowCreateInfoQCOM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SAMPLER_BLOCK_MATCH_WINDOW_CREATE_INFO_QCOM

- VUID-VkSamplerBlockMatchWindowCreateInfoQCOM-windowCompareMode-parameter
  `windowCompareMode` must be a valid VkBlockMatchWindowCompareModeQCOM value

Structure Chaining

Extends the structure

  - VkSamplerCreateInfo

The VkBlockMatchWindowCompareModeQCOM enum describes how block match values within the window are compared. VkBlockMatchWindowCompareModeQCOM is defined as:

    // Provided by VK_QCOM_image_processing2
    typedef enum VkBlockMatchWindowCompareModeQCOM {
        VK_BLOCK_MATCH_WINDOW_COMPARE_MODE_MIN_QCOM = 0,
        VK_BLOCK_MATCH_WINDOW_COMPARE_MODE_MAX_QCOM = 1,
    } VkBlockMatchWindowCompareModeQCOM;

- VK_BLOCK_MATCH_WINDOW_COMPARE_MODE_MIN_QCOM specifies that windowed block match operations return the minimum error within the window.

- VK_BLOCK_MATCH_WINDOW_COMPARE_MODE_MAX_QCOM specifies that windowed block match operations return the maximum error within the window.

## 15. Resource Descriptors

A descriptor is an opaque data structure used to access shader resources such as buffers, images, or samplers. Rather than existing as distinct objects, descriptors are handled as opaque data, which can be accessed by a shader through descriptor heaps, descriptor buffers, or descriptor sets.

Shaders access descriptors via the `ResourceHeapEXT` and `SamplerHeapEXT` built-ins, or through variables decorated with `DescriptorSet` and `Binding` values linking them to the API. Details of the shader interface mapping are described in the Shader Resource Interface section.

Note | Shaders can also access buffers without going through descriptors by using Physical Storage Buffer Access to access them through 64-bit addresses.

### 15.1. Descriptor Types

There are a number of different types of descriptor supported by Vulkan, corresponding to different resources or usage. The following sections describe the API definitions of each descriptor type. The mapping of each type to SPIR-V is listed in the Shader Resource and Descriptor Type Correspondence and Shader Resource and Storage Class Correspondence tables in the Shader Interfaces chapter.

Possible descriptor types are:

    // Provided by VK_VERSION_1_0
    typedef enum VkDescriptorType {
        VK_DESCRIPTOR_TYPE_SAMPLER = 0,
        VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER = 1,
        VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE = 2,
        VK_DESCRIPTOR_TYPE_STORAGE_IMAGE = 3,
        VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER = 4,
        VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER = 5,
        VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER = 6,
        VK_DESCRIPTOR_TYPE_STORAGE_BUFFER = 7,
        VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC = 8,
        VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC = 9,
        VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT = 10,
      // Provided by VK_VERSION_1_3
        VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK = 1000138000,
      // Provided by VK_KHR_acceleration_structure
        VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR = 1000150000,
      // Provided by VK_NV_ray_tracing
        VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV = 1000165000,
      // Provided by VK_QCOM_image_processing
        VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM = 1000440000,
      // Provided by VK_QCOM_image_processing
        VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM = 1000440001,
      // Provided by VK_ARM_tensors
        VK_DESCRIPTOR_TYPE_TENSOR_ARM = 1000460000,
      // Provided by VK_EXT_mutable_descriptor_type
        VK_DESCRIPTOR_TYPE_MUTABLE_EXT = 1000351000,
      // Provided by VK_NV_partitioned_acceleration_structure
        VK_DESCRIPTOR_TYPE_PARTITIONED_ACCELERATION_STRUCTURE_NV = 1000570000,
      // Provided by VK_EXT_inline_uniform_block
        VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT = VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK,
      // Provided by VK_VALVE_mutable_descriptor_type
        VK_DESCRIPTOR_TYPE_MUTABLE_VALVE = VK_DESCRIPTOR_TYPE_MUTABLE_EXT,
    } VkDescriptorType;

- VK_DESCRIPTOR_TYPE_SAMPLER specifies a sampler descriptor.

- VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER specifies a combined image sampler descriptor.

- VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE specifies a sampled image descriptor.

- VK_DESCRIPTOR_TYPE_STORAGE_IMAGE specifies a storage image descriptor.

- VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER specifies a uniform texel buffer descriptor.

- VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER specifies a storage texel buffer descriptor.

- VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER specifies a uniform buffer descriptor.

- VK_DESCRIPTOR_TYPE_STORAGE_BUFFER specifies a storage buffer descriptor.

- VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC specifies a dynamic uniform buffer descriptor.

- VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC specifies a dynamic storage buffer descriptor.

- VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT specifies an input attachment descriptor.

- VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK specifies an inline uniform block.

- VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR specifies an acceleration structure descriptor.

- VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV specifies an acceleration structure descriptor.

- VK_DESCRIPTOR_TYPE_MUTABLE_EXT specifies a descriptor of mutable type.

- VK_DESCRIPTOR_TYPE_PARTITIONED_ACCELERATION_STRUCTURE_NV specifies a partitioned acceleration structure descriptor.

- VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM specifies a sampled weight image descriptor.

- VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM specifies a block matching image descriptor.

- VK_DESCRIPTOR_TYPE_TENSOR_ARM specifies a storage tensor descriptor.

#### 15.1.1. Storage Image

A storage image (VK_DESCRIPTOR_TYPE_STORAGE_IMAGE) is a descriptor type associated with an image resource via an image view that load, store, and atomic operations can be performed on.

Storage image loads are supported in all shader stages for image views whose format features contain VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT.

Stores to storage images are supported in task, mesh and compute shaders for image views whose format features contain VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT.

Atomic operations on storage images are supported in task, mesh and compute shaders for image views whose format features contain VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT.

When the `fragmentStoresAndAtomics` feature is enabled, stores and atomic operations are also supported for storage images in fragment shaders with the same set of image formats as supported in compute shaders. When the `vertexPipelineStoresAndAtomics` feature is enabled, stores and atomic operations are also supported in vertex, tessellation, and geometry shaders with the same set of image formats as supported in compute shaders.

The image subresources for a storage image must be in the VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR or VK_IMAGE_LAYOUT_TENSOR_ALIASING_ARM or VK_IMAGE_LAYOUT_GENERAL layout in order to access its data in a shader.

When the `tileShadingColorAttachments` feature is enabled, loads using `OpImageRead` or `OpImageSparseRead` are supported for color tile attachments in fragment and compute shaders for image views whose format features contain VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT. Additionally, when the `tileShadingColorAttachments` feature is enabled, stores using `OpImageWrite` are supported for color attachments in compute shaders with the same set of image formats as for loads. When the `tileShadingAtomicOps` feature is enabled, tile atomic operations are supported for color attachments in compute shaders with the same set of image formats as for loads.

When the `tileShadingInputAttachments` feature is enabled, loads using `OpImageRead` are supported for input tile attachments in fragment and compute shaders with the same set of image formats as for color attachments. Stores to input attachments are not supported.

When the `tileShadingDepthAttachments` or `tileShadingStencilAttachments` feature is enabled, loads using `OpImageRead` or `OpImageSparseRead` are supported for depth or stencil aspects of a depth/stencil tile attachment in fragment and compute shaders with the same set of image formats as for color attachments. Stores to depth/stencil attachments are not supported.

#### 15.1.2. Sampler

A sampler descriptor (VK_DESCRIPTOR_TYPE_SAMPLER) is a descriptor type associated with a sampler object, used to control the behavior of sampling operations performed on a sampled image.

#### 15.1.3. Sampled Image

A sampled image (VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE) is a descriptor type associated with an image resource via an image view that sampling operations can be performed on.

Shaders combine a sampled image variable and a sampler variable to perform sampling operations.

Sampled images are supported in all shader stages for image views whose format features contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT.

An image subresources for a sampled image must be in one of the following layouts:

- VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL

- VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL

- VK_IMAGE_LAYOUT_GENERAL

- VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR

- VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL

- VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL

- VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL

- VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL

- VK_IMAGE_LAYOUT_READ_ONLY_OPTIMAL_KHR

- VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT

- VK_IMAGE_LAYOUT_TENSOR_ALIASING_ARM

#### 15.1.4. Combined Image Sampler

A combined image sampler (VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER) is a single descriptor type associated with both a sampler and an image resource, combining both a sampler and sampled image descriptor into a single descriptor.

If the descriptor refers to a sampler that performs Y′CBCR conversion or samples a subsampled image, the sampler must only be used to sample the image in the same descriptor. Otherwise, the sampler and image in this type of descriptor can be used freely with any other samplers and images.

An image subresources for a combined image sampler must be in one of the following layouts:

- VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL

- VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL

- VK_IMAGE_LAYOUT_GENERAL

- VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR

- VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL

- VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL

- VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL

- VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL

- VK_IMAGE_LAYOUT_READ_ONLY_OPTIMAL_KHR

- VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT

- VK_IMAGE_LAYOUT_TENSOR_ALIASING_ARM

Note | On some implementations, it may be more efficient to sample from an image using a combination of sampler and sampled image that are stored together in the descriptor set in a combined descriptor.

#### 15.1.5. Uniform Texel Buffer

A uniform texel buffer (VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER) is a descriptor type associated with a buffer resource via a buffer view that image sampling operations can be performed on.

Uniform texel buffers define a tightly-packed 1-dimensional linear array of texels, with texels going through format conversion when read in a shader in the same way as they are for an image.

Load operations from uniform texel buffers are supported in all shader stages for buffer view formats which report format features support for VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT

#### 15.1.6. Storage Texel Buffer

A storage texel buffer (VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER) is a descriptor type associated with a buffer resource via a buffer view that image load, store, and atomic operations can be performed on.

Storage texel buffers define a tightly-packed 1-dimensional linear array of texels, with texels going through format conversion when read in a shader in the same way as they are for an image. Unlike uniform texel buffers, these buffers can also be written to in the same way as for storage images.

Storage texel buffer loads are supported in all shader stages for texel buffer view formats which report format features support for VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT

Stores to storage texel buffers are supported in task, mesh and compute shaders for texel buffer formats which report format features support for VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT

Atomic operations on storage texel buffers are supported in task, mesh and compute shaders for texel buffer formats which report format features support for VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT

When the `fragmentStoresAndAtomics` feature is enabled, stores and atomic operations are also supported for storage texel buffers in fragment shaders with the same set of texel buffer formats as supported in compute shaders. When the `vertexPipelineStoresAndAtomics` feature is enabled, stores and atomic operations are also supported in vertex, tessellation, and geometry shaders with the same set of texel buffer formats as supported in compute shaders.

#### 15.1.7. Storage Buffer

A storage buffer (VK_DESCRIPTOR_TYPE_STORAGE_BUFFER) is a descriptor type associated with a buffer resource directly, described in a shader as a structure with various members that load, store, and atomic operations can be performed on.

Note | Atomic operations can only be performed on members of certain types as defined in the SPIR-V environment appendix.

#### 15.1.8. Uniform Buffer

A uniform buffer (VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER) is a descriptor type associated with a buffer resource directly, described in a shader as a structure with various members that load operations can be performed on.

#### 15.1.9. Dynamic Uniform Buffer

A dynamic uniform buffer (VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC) is almost identical to a uniform buffer, and differs only in how the offset into the buffer is specified. This descriptor type is only valid when using descriptor sets. The base offset calculated by VkDescriptorBufferInfo when initially updating a descriptor set is added to a dynamic offset when binding a descriptor set.

#### 15.1.10. Dynamic Storage Buffer

A dynamic storage buffer (VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC) is almost identical to a storage buffer, and differs only in how the offset into the buffer is specified. This descriptor type is only valid when using descriptor sets. The base offset calculated by VkDescriptorBufferInfo when initially updating a descriptor set is added to a dynamic offset when binding a descriptor set.

#### 15.1.11. Inline Uniform Block

An inline uniform block (VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK) is almost identical to a uniform buffer in how it is accessed in the shader. Where it differs is that its storage is taken directly from a containing descriptor set or descriptor buffer, instead of being backed by a separate buffer object. This descriptor type is not valid when using descriptor heaps; applications can directly access the heap pointer in a shader or use the VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_DATA_EXT mapping.

Inline uniform blocks are typically used to access a small set of constant data that does not require the additional flexibility provided by the indirection enabled when using a uniform buffer where the descriptor and the referenced buffer memory are decoupled. Compared to push constants, they allow reusing the same set of constant data across multiple disjoint sets of drawing and dispatching commands.

Inline uniform block descriptors cannot be aggregated into arrays. Instead, the array size specified for an inline uniform block descriptor binding specifies the binding’s capacity in bytes.

#### 15.1.12. Sample Weight Image

A sample weight image (VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM) is a descriptor type associated with an image resource via an image view that can be used in weight image sampling. The image view must have been created with VkImageViewSampleWeightCreateInfoQCOM.

Shaders can combine a weight image variable, a sampled image variable, and a sampler variable to perform weight image sampling.

Weight image sampling is supported in all shader stages if the weight image view specifies a format that supports format feature VK_FORMAT_FEATURE_2_WEIGHT_IMAGE_BIT_QCOM and the sampled image view specifies a format that supports format feature VK_FORMAT_FEATURE_2_WEIGHT_SAMPLED_IMAGE_BIT_QCOM

The image subresources for the weight image must be in the VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL, or VK_IMAGE_LAYOUT_GENERAL layout in order to access its data in a shader.

#### 15.1.13. Block Matching Image

A block matching image (VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM) is a descriptor type associated with an image resource via an image view that can be used in block matching.

Shaders can combine a target image variable, a reference image variable, and a sampler variable to perform block matching.

Block matching is supported in all shader stages for if both the target view and reference view specifies a format that supports format feature VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM

For `opImageBlockMatchWindowSAD`, `opImageBlockMatchWindowSSD`, `opImageBlockMatchGatherSAD`, and `opImageBlockMatchGatherSSD` operations, only the single-component formats with the VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM flag set are supported.

For `OpImageBlockMatchSSDQCOM` and `OpImageBlockMatchSADQCOM` operations, additional formats for target view and reference view are specified with the VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM format feature flag.

Note | Applications should use VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM to determine the full format support with `OpImageBlockMatchSSDQCOM` and `OpImageBlockMatchSADQCOM`. Applications can also use VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM, but it may specify a reduced set of formats that are also compatible with the `OpImageBlockMatchWindow*QCOM` and `OpImageBlockMatchGather*QCOM` operations.

The image subresources for block matching must be in the VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL, or VK_IMAGE_LAYOUT_GENERAL layout in order to access its data in a shader.

#### 15.1.14. Input Attachment

An input attachment (VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT) is a descriptor type associated with an image resource via an image view that can be used for framebuffer local load operations in fragment shaders.

All image formats that are supported for color attachments (VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT or VK_FORMAT_FEATURE_2_LINEAR_COLOR_ATTACHMENT_BIT_NV ) or depth/stencil attachments (VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT) for a given image tiling mode are also supported for input attachments.

An image view used as an input attachment must be in one of the following layouts:

- VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL

- VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL

- VK_IMAGE_LAYOUT_GENERAL

- VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR

- VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL

- VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL

- VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL

- VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL

- VK_IMAGE_LAYOUT_READ_ONLY_OPTIMAL_KHR

- VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT

- VK_IMAGE_LAYOUT_RENDERING_LOCAL_READ

#### 15.1.15. Acceleration Structure

An acceleration structure ( VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR or VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV ) is a descriptor type that is used to retrieve scene geometry from within shaders that are used for ray traversal. Shaders have read-only access to the memory.

#### 15.1.16. Partitioned Acceleration Structure

A partitioned acceleration structure (VK_DESCRIPTOR_TYPE_PARTITIONED_ACCELERATION_STRUCTURE_NV) is a descriptor type that references a built partitioned top-level acceleration structure (PTLAS), as defined in Partitioned Top Level Acceleration Structures. It is used to retrieve scene geometry from within shaders that are used for ray traversal. From the perspective of ray tracing shaders, a PTLAS descriptor behaves identically to a conventional top-level acceleration structure descriptor. Shaders have read-only access to the memory.

#### 15.1.17. Mutable

A descriptor of mutable (VK_DESCRIPTOR_TYPE_MUTABLE_EXT) type indicates that this descriptor can mutate to a number of different types. This descriptor type is not valid when using descriptor heaps, as the elements of a descriptor heap can be manually adjusted to hold different descriptor types already. When specified in a descriptor set layout, any of the descriptor types given in the VkMutableDescriptorTypeListEXT::`pDescriptorTypes` list of descriptor types in the `pNext` chain of VkDescriptorSetLayoutCreateInfo for this binding. At any point, each individual descriptor of mutable type has an active descriptor type. The active descriptor type can be any one of the declared types in `pDescriptorTypes`. Additionally, a mutable descriptor’s active descriptor type can be of the VK_DESCRIPTOR_TYPE_MUTABLE_EXT type, which is the initial active descriptor type. The active descriptor type can change when the descriptor is updated. When a descriptor is consumed by binding a descriptor buffer or set, the active descriptor type is considered, not VK_DESCRIPTOR_TYPE_MUTABLE_EXT.

An active descriptor type of VK_DESCRIPTOR_TYPE_MUTABLE_EXT is considered an undefined descriptor. If a descriptor is consumed where the active descriptor type does not match what the shader expects, the descriptor is considered an undefined descriptor.

Note | To find which descriptor types are supported as VK_DESCRIPTOR_TYPE_MUTABLE_EXT, the application can use vkGetDescriptorSetLayoutSupport with a VK_DESCRIPTOR_TYPE_MUTABLE_EXT binding, with the list of descriptor types to query in the VkMutableDescriptorTypeCreateInfoEXT::`pMutableDescriptorTypeLists` array for that binding.

Note | The intention of a mutable descriptor type is that implementations allocate N bytes per descriptor, where N is determined by the maximum descriptor size for a given descriptor binding. Implementations are not expected to keep track of the active descriptor type, and it should be considered a C-like union type. A mutable descriptor type is not considered as efficient in terms of runtime performance as using a non-mutable descriptor type, and applications are not encouraged to use them outside API layering efforts. Mutable descriptor types can be more efficient if the alternative is using many different descriptors to emulate mutable descriptor types.

#### 15.1.18. Storage Tensor

A storage tensor (VK_DESCRIPTOR_TYPE_TENSOR_ARM) is a descriptor type associated with a tensor resource via a tensor view that read and write operations can be performed on.

Storage tensor reads and writes are supported in shaders for tensor views whose format features contain VK_FORMAT_FEATURE_2_TENSOR_SHADER_BIT_ARM.

Storage tensor reads and writes are supported in graph pipelines for tensor views whose format features contain VK_FORMAT_FEATURE_2_TENSOR_DATA_GRAPH_BIT_ARM.

### 15.2. Physical Storage Buffer Access

Buffer device addresses can also be used to access buffer memory in a shader, using the `SPV_KHR_physical_storage_buffer` extension or the equivalent `SPV_EXT_physical_storage_buffer` extension and the `PhysicalStorageBuffer` storage class. For example, this value can be stored in a uniform buffer, and the shader can read the value from the uniform buffer and use it to do a dependent read/write to this buffer. All loads, stores, and atomics in a shader through `PhysicalStorageBuffer` pointers must access addresses in the address range of some buffer.

## 16. Descriptor Heaps

When the `descriptorHeap` feature is enabled, applications can use descriptor heaps to specify the descriptors that they will be accessing from shaders. Descriptor heaps are not objects, rather they are state that is bound to a command buffer indicating the device address of descriptors that can be accessed from a shader. There are two heaps available to the application - the sampler heap and the resource heap. The sampler heap contains sampler descriptors, the resource heap contains image, acceleration structure, tensor, and buffer descriptors.

### 16.1. Writing Descriptors

Descriptors can be obtained for the different heaps with commands that write descriptors to a host address, with the application responsible for transferring those descriptors into device memory for access via heaps.

To write sampler descriptors to memory, call:

    // Provided by VK_EXT_descriptor_heap
    VkResult vkWriteSamplerDescriptorsEXT(
        VkDevice                                    device,
        uint32_t                                    samplerCount,
        const VkSamplerCreateInfo*                  pSamplers,
        const VkHostAddressRangeEXT*                pDescriptors);

- `device` is the logical device that the descriptors are for.

- `samplerCount` is the number of elements in `pSamplers` and `pDescriptors`.

- `pSamplers` is a pointer to an array of VkSamplerCreateInfo structures defining properties of the sampler descriptors that will be written.

- `pDescriptors` is a pointer to an array of VkHostAddressRangeEXT structures defining the host address ranges that will be written to for each descriptor.

Each descriptor will be written to `pDescriptors`[i].`address` where i is the index of its create info in `pSamplers`.

Descriptors written using a fully identical VkSamplerCreateInfo structure on the same VkDevice will always return the same bit pattern. If the descriptorHeapCaptureReplay feature is enabled, descriptors written using a fully identical VkSamplerCreateInfo structure on a VkDevice created from the same VkPhysicalDevice with identical parameters will always return the same bit pattern.

Note | YCBCR samplers must be embedded in a shader by using VkShaderDescriptorSetAndBindingMappingInfoEXT, they cannot be specified here.

Valid Usage

- VUID-vkWriteSamplerDescriptorsEXT-descriptorHeap-11202
  The `descriptorHeap` feature must be enabled

- VUID-vkWriteSamplerDescriptorsEXT-size-11203
  The `size` member of each element of `pDescriptors` must be greater than or equal to the value returned by vkGetPhysicalDeviceDescriptorSizeEXT with a `descriptorType` equal to VK_DESCRIPTOR_TYPE_SAMPLER

- VUID-vkWriteSamplerDescriptorsEXT-pSamplers-11204
  Elements of `pSamplers` must not include VkSamplerYcbcrConversionInfo structures in their `pNext` chains

- VUID-vkWriteSamplerDescriptorsEXT-borderColor-11444
  If the `borderColor` of any element of `pSamplers` is VK_BORDER_COLOR_FLOAT_CUSTOM_EXT or VK_BORDER_COLOR_INT_CUSTOM_EXT, VkSamplerCustomBorderColorIndexCreateInfoEXT must be included in the `pNext` chain of that element

- VUID-vkWriteSamplerDescriptorsEXT-borderColor-11205
  If the `borderColor` of any element of `pSamplers` is VK_BORDER_COLOR_FLOAT_CUSTOM_EXT or VK_BORDER_COLOR_INT_CUSTOM_EXT, VkSamplerCustomBorderColorIndexCreateInfoEXT::`index` must be a value less than `maxCustomBorderColorSamplers`

- VUID-vkWriteSamplerDescriptorsEXT-pNext-11400
  If there is a VkDebugUtilsObjectNameInfoEXT structure in the `pNext` chain of any element of `pSamplers`, its `objectType` must be VK_OBJECT_TYPE_UNKNOWN

Valid Usage (Implicit)

- VUID-vkWriteSamplerDescriptorsEXT-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkWriteSamplerDescriptorsEXT-pSamplers-parameter
  `pSamplers` must be a valid pointer to an array of `samplerCount` valid VkSamplerCreateInfo structures

- VUID-vkWriteSamplerDescriptorsEXT-pDescriptors-parameter
  `pDescriptors` must be a valid pointer to an array of `samplerCount` valid VkHostAddressRangeEXT structures

- VUID-vkWriteSamplerDescriptorsEXT-samplerCount-arraylength
  `samplerCount` must be greater than `0`

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

To write resource descriptors to memory, call:

    // Provided by VK_EXT_descriptor_heap
    VkResult vkWriteResourceDescriptorsEXT(
        VkDevice                                    device,
        uint32_t                                    resourceCount,
        const VkResourceDescriptorInfoEXT*          pResources,
        const VkHostAddressRangeEXT*                pDescriptors);

- `device` is the logical device that the descriptors are for.

- `resourceCount` is the number of elements in `pResources` and `pDescriptors`.

- `pResources` is a pointer to an array of VkResourceDescriptorInfoEXT structures defining properties of the resource descriptors that will be written.

- `pDescriptors` is a pointer to an array of VkHostAddressRangeEXT structures defining the host address ranges that will be written to for each descriptor.

Each descriptor will be written to `pDescriptors`[i].address where i is the index of its create info in `pResources`.

If any image descriptor written by this command includes a VkSamplerYcbcrConversion, multiple descriptors will be written adjacent to each other for that descriptor, equal to VkSamplerYcbcrConversionImageFormatProperties::`combinedImageSamplerDescriptorCount` for the image.

If any image descriptor written by this command is for an image created with `flags` containing VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT, multiple descriptors will be written adjacent to each other for that descriptor, equal to VkSubsampledImageFormatPropertiesEXT::`subsampledImageDescriptorCount` for the image.

Descriptors using the same `type` and written using a fully identical VkTexelBufferDescriptorInfoEXT or VkDeviceAddressRangeKHR structure on the same VkDevice will always return the same bit pattern. If the descriptorHeapCaptureReplay feature is enabled, this applies to any VkDevice created with identical parameters from the same VkPhysicalDevice.

Note | Recreating the same buffer descriptor during replay of a prior capture requires that the device address is the same, which requires additional data to be captured and provided during replay when creating a buffer and allocating memory for it.

Image descriptors using the same `type` and written using a fully identical VkImageDescriptorInfoEXT other than VkImageDescriptorInfoEXT::`pView->image`, where image was successfully created with VK_IMAGE_CREATE_DESCRIPTOR_HEAP_CAPTURE_REPLAY_BIT_EXT and a VkOpaqueCaptureDataCreateInfoEXT with data captured via vkGetImageOpaqueCaptureDataEXT from an image used previously, will write a descriptor with the same bit pattern if possible; if the same bit pattern cannot be generated, VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS will be returned instead.

Tensor descriptors using the same `type` and written using a fully identical VkTensorViewCreateInfoARM other than VkTensorViewCreateInfoARM::`tensor`, where tensor was successfully created with VkOpaqueCaptureDataCreateInfoEXT with VK_TENSOR_CREATE_DESCRIPTOR_HEAP_CAPTURE_REPLAY_BIT_ARM and a VkOpaqueCaptureDataCreateInfoEXT with data captured via vkGetTensorOpaqueCaptureDataARM from a tensor used previously, will write a descriptor with the same bit pattern if possible; if the same bit pattern cannot be generated, VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS will be returned instead.

Note | Image creation is sufficiently complex that it may not be possible to recreate all possible descriptors from an image during replay, even if the image itself was successfully recreated. The conditions for this happening will be largely the same as those which could cause allocating a buffer with the same device address during replay to fail. Replay tools are advised to recreate captured descriptors for an image immediately after recreating the image itself wherever possible. The same is true for tensors.

Valid Usage

- VUID-vkWriteResourceDescriptorsEXT-descriptorHeap-11206
  The `descriptorHeap` feature must be enabled

- VUID-vkWriteResourceDescriptorsEXT-size-11207
  The `size` member of each element of `pDescriptors` must be greater than or equal to the value returned by vkGetPhysicalDeviceDescriptorSizeEXT with a `descriptorType` equal to `type`

- VUID-vkWriteResourceDescriptorsEXT-pResources-11208
  If any element of `pResources` specifies a VkImageViewCreateInfo structure with a VkSamplerYcbcrConversionInfo structure in its `pNext` chain, the corresponding element of `pDescriptors` must have a `size` member that is greater than or equal to the product of the value returned by vkGetPhysicalDeviceDescriptorSizeEXT with a `descriptorType` equal to `type` and VkSamplerYcbcrConversionImageFormatProperties::`combinedImageSamplerDescriptorCount`, as queried from VkPhysicalDeviceImageFormatInfo2 with image format info equivalent to the image view the descriptor is being created for

- VUID-vkWriteResourceDescriptorsEXT-pResources-11209
  If any element of `pResources` specifies a VkImageViewCreateInfo structure with an `image` created with `flags` containing VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT, the corresponding element of `pDescriptors` must have a `size` member that is greater than or equal to the product of the value returned by vkGetPhysicalDeviceDescriptorSizeEXT with a `descriptorType` equal to `type` and VkSubsampledImageFormatPropertiesEXT::`subsampledImageDescriptorCount`, as queried from VkPhysicalDeviceImageFormatInfo2 with image format info equivalent to the image view the descriptor is being created for

Valid Usage (Implicit)

- VUID-vkWriteResourceDescriptorsEXT-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkWriteResourceDescriptorsEXT-pResources-parameter
  `pResources` must be a valid pointer to an array of `resourceCount` valid VkResourceDescriptorInfoEXT structures

- VUID-vkWriteResourceDescriptorsEXT-pDescriptors-parameter
  `pDescriptors` must be a valid pointer to an array of `resourceCount` valid VkHostAddressRangeEXT structures

- VUID-vkWriteResourceDescriptorsEXT-resourceCount-arraylength
  `resourceCount` must be greater than `0`

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

`VkResourceDescriptorInfoEXT` is defined as:

    // Provided by VK_EXT_descriptor_heap
    typedef struct VkResourceDescriptorInfoEXT {
        VkStructureType                sType;
        const void*                    pNext;
        VkDescriptorType               type;
        VkResourceDescriptorDataEXT    data;
    } VkResourceDescriptorInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `type` is the type of descriptor to get.

- `data` is a VkResourceDescriptorDataEXT union defining the properties of a resource descriptor according to `type`

If `type` is VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER or VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, `data->pTexelBuffer` is used to construct the descriptor.

If `type` is VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR, VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV, VK_DESCRIPTOR_TYPE_PARTITIONED_ACCELERATION_STRUCTURE_NV, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, or VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, `data->pAddressRange` is used to construct the descriptor. For acceleration structures, the size of the range is not used by the descriptor, and can be set to 0. If a non-zero size is provided though, it must be a valid range.

Note | Applications may wish to provide a valid range as a way to check their own assumptions about the range they are binding; but it has no bearing on anything except validation. Implementations cannot make any assumptions based on the size of the provided range.

If `type` is VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, or VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, `data->pImage` is used to construct the descriptor. If `type` is VK_DESCRIPTOR_TYPE_TENSOR_ARM, `data->pTensorARM` is used to construct the descriptor.

If the `nullDescriptor` feature is enabled, the corresponding element of `data` may be `NULL` to generate a null descriptor.

Applications can give resource descriptors a debug name in a similar way to naming an object, via the VkDebugUtilsObjectNameInfoEXT structure. However, as there is no actual object, this structure must be passed via the `pNext` chain of this structure, with a `objectType` of VK_OBJECT_TYPE_UNKNOWN and a `objectHandle` of VK_NULL_HANDLE. The name is attached to the unique set of descriptor bits written by the implementation, and writing the same bits again with new debug info may rename the original descriptor.

Note | Implementations are not prevented from returning the same bits for different descriptors. This can result in multiple different resources mapping to the same name. A common case for this might be something like a uniform buffer and storage buffer with the same device address range.

If a descriptor becomes invalid due to the underlying resource becoming invalid, implementations may remove the name association.

Valid Usage

- VUID-VkResourceDescriptorInfoEXT-type-11210
  `type` must be one of VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER, VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR, VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV, VK_DESCRIPTOR_TYPE_PARTITIONED_ACCELERATION_STRUCTURE_NV, VK_DESCRIPTOR_TYPE_TENSOR_ARM, or VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT

- VUID-VkResourceDescriptorInfoEXT-None-11211
  If the `nullDescriptor` feature is not enabled, and `type` is VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE or VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, `data->pImage` must not be `NULL`

- VUID-VkResourceDescriptorInfoEXT-type-11469
  If `type` is VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM, or VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, `data->pImage` must not be `NULL`

- VUID-VkResourceDescriptorInfoEXT-None-11212
  If the `nullDescriptor` feature is not enabled, and `type` is VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER or VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, `data->pTexelBuffer` must not be `NULL`

- VUID-VkResourceDescriptorInfoEXT-None-11213
  If the `nullDescriptor` feature is not enabled, and `type` is VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR, VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV, VK_DESCRIPTOR_TYPE_PARTITIONED_ACCELERATION_STRUCTURE_NV, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, or VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, `data->pAddressRange` must not be `NULL`

- VUID-VkResourceDescriptorInfoEXT-None-11457
  If the `nullDescriptor` feature is not enabled, and `type` is VK_DESCRIPTOR_TYPE_TENSOR_ARM, `data->pTensorARM` must not be `NULL`

- VUID-VkResourceDescriptorInfoEXT-type-12349
  If `type` is VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER or VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, `data->pTexelBuffer->addressRange.address` must be a multiple of the effective alignment requirement of `data->pTexelBuffer->format` as determined by `minTexelBufferOffsetAlignment`

- VUID-VkResourceDescriptorInfoEXT-type-12350
  If `type` is VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, `data->pAddressRange->address` must be a multiple of `minUniformBufferOffsetAlignment`

- VUID-VkResourceDescriptorInfoEXT-type-12351
  If `type` is VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, `data->pAddressRange->address` must be a multiple of `minStorageBufferOffsetAlignment`

- VUID-VkResourceDescriptorInfoEXT-type-11454
  If `type` is one of

  - VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR

  - VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV

  - VK_DESCRIPTOR_TYPE_PARTITIONED_ACCELERATION_STRUCTURE_NV

    `data->pAddressRange->address` must be a multiple of 256

- VUID-VkResourceDescriptorInfoEXT-pNext-11401
  If there is a VkDebugUtilsObjectNameInfoEXT structure in the `pNext` chain, its `objectType` must be VK_OBJECT_TYPE_UNKNOWN

- VUID-VkResourceDescriptorInfoEXT-type-11422
  If `type` is VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM, or VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, `data.pImage->pView->image` must not have been created with an `imageType` of VK_IMAGE_TYPE_3D

- VUID-VkResourceDescriptorInfoEXT-type-11424
  If `type` is VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, `data.pImage->pView->viewType` is VK_IMAGE_VIEW_TYPE_2D, and the `image2DViewOf3D` feature is not enabled, `data.pImage->pView->image` must not have been created with an `imageType` of VK_IMAGE_TYPE_3D

- VUID-VkResourceDescriptorInfoEXT-type-11425
  If `type` is VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, `data.pImage->pView->viewType` is VK_IMAGE_VIEW_TYPE_2D, and the `sampler2DViewOf3D` feature is not enabled, `data.pImage->pView->image` must not have been created with an `imageType` of VK_IMAGE_TYPE_3D

- VUID-VkResourceDescriptorInfoEXT-type-11433
  If `type` is VK_DESCRIPTOR_TYPE_STORAGE_BUFFER or VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, `data.pAddressRange->size` must not be 0

- VUID-VkResourceDescriptorInfoEXT-type-11458
  If `type` is VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE and `data.pImage` is not `NULL`, `data.pImage->pView->image` must have been created with the VK_IMAGE_USAGE_SAMPLED_BIT usage flag set

- VUID-VkResourceDescriptorInfoEXT-type-11459
  If `type` is VK_DESCRIPTOR_TYPE_STORAGE_IMAGE and `data.pImage` is not `NULL`, `data.pImage->pView->image` must have been created with the VK_IMAGE_USAGE_STORAGE_BIT usage flag set

- VUID-VkResourceDescriptorInfoEXT-type-11460
  If `type` is VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT and `data.pImage` is not `NULL`, `data.pImage->pView->image` must have been created with the VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT usage flag set

- VUID-VkResourceDescriptorInfoEXT-type-11461
  If `type` is VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER and `data.pAddressRange` is not `NULL`, `data.pAddressRange` must be a device address range allocated to the application from a buffer created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-VkResourceDescriptorInfoEXT-type-11462
  If `type` is VK_DESCRIPTOR_TYPE_STORAGE_BUFFER and `data.pAddressRange` is not `NULL`, `data.pAddressRange` must be a device address range allocated to the application from a buffer created with the VK_BUFFER_USAGE_STORAGE_BUFFER_BIT usage flag set

- VUID-VkResourceDescriptorInfoEXT-type-11463
  If `type` is VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER and `data.pTexelBuffer` is not `NULL`, `data.pTexelBuffer->addressRange` must be a device address range allocated to the application from a buffer created with the VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT usage flag set

- VUID-VkResourceDescriptorInfoEXT-type-11464
  If `type` is VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER and `data.pTexelBuffer` is not `NULL`, `data.pTexelBuffer->addressRange` must be a device address range allocated to the application from a buffer created with the VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT usage flag set

- VUID-VkResourceDescriptorInfoEXT-type-11483
  If `type` is VK_DESCRIPTOR_TYPE_PARTITIONED_ACCELERATION_STRUCTURE_NV or VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR, and `data.pAddressRange` is not `NULL`, `data.pAddressRange->address` must be an acceleration structure address retrieved from a VkAccelerationStructureKHR object via vkGetAccelerationStructureDeviceAddressKHR

- VUID-VkResourceDescriptorInfoEXT-type-11484
  If `type` is VK_DESCRIPTOR_TYPE_PARTITIONED_ACCELERATION_STRUCTURE_NV or VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR, `data.pAddressRange` is not `NULL`, and `data.pAddressRange->size` is not 0, `data.pAddressRange` must be a device address range allocated to the application from the buffer used to create the acceleration structure that `data.pAddressRange->address` was retrieved from, and within the buffer range bound to that acceleration structure

- VUID-VkResourceDescriptorInfoEXT-type-11467
  If `type` is VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV and `data.pAddressRange` is not `NULL`, `data.pAddressRange->address` must be an acceleration structure handle retrieved from a VkAccelerationStructureNV object via vkGetAccelerationStructureHandleNV

- VUID-VkResourceDescriptorInfoEXT-type-11468
  If `type` is VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV and `data.pAddressRange` is not `NULL`, `data.pAddressRange->size` must be 0

Valid Usage (Implicit)

- VUID-VkResourceDescriptorInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_RESOURCE_DESCRIPTOR_INFO_EXT

- VUID-VkResourceDescriptorInfoEXT-pNext-pNext
  `pNext` must be `NULL` or a pointer to a valid instance of VkDebugUtilsObjectNameInfoEXT

- VUID-VkResourceDescriptorInfoEXT-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkResourceDescriptorInfoEXT-type-parameter
  `type` must be a valid VkDescriptorType value

- VUID-VkResourceDescriptorInfoEXT-pImage-parameter
  If `type` is VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM, or VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM, and if `pImage` is not `NULL`, the `pImage` member of `data` must be a valid pointer to a valid VkImageDescriptorInfoEXT structure

- VUID-VkResourceDescriptorInfoEXT-pTexelBuffer-parameter
  If `type` is VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER or VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, and if `pTexelBuffer` is not `NULL`, the `pTexelBuffer` member of `data` must be a valid pointer to a valid VkTexelBufferDescriptorInfoEXT structure

- VUID-VkResourceDescriptorInfoEXT-pAddressRange-parameter
  If `type` is VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, or VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, and if `pAddressRange` is not `NULL`, the `pAddressRange` member of `data` must be a valid pointer to a valid VkDeviceAddressRangeEXT structure

- VUID-VkResourceDescriptorInfoEXT-pTensorARM-parameter
  If `type` is VK_DESCRIPTOR_TYPE_TENSOR_ARM, and if `pTensorARM` is not `NULL`, the `pTensorARM` member of `data` must be a valid pointer to a valid VkTensorViewCreateInfoARM structure

The `VkResourceDescriptorDataEXT` union is defined as:

    // Provided by VK_EXT_descriptor_heap
    typedef union VkResourceDescriptorDataEXT {
        const VkImageDescriptorInfoEXT*          pImage;
        const VkTexelBufferDescriptorInfoEXT*    pTexelBuffer;
        const VkDeviceAddressRangeEXT*           pAddressRange;
        const VkTensorViewCreateInfoARM*         pTensorARM;
    } VkResourceDescriptorDataEXT;

- `pImage` is a pointer to a VkImageDescriptorInfoEXT structure.

- `pTexelBuffer` is a pointer to a VkTexelBufferDescriptorInfoEXT structure.

- `pAddressRange` is a pointer to a VkDeviceAddressRangeKHR structure.

- `pTensorARM` is a pointer to a VkTensorViewCreateInfoARM structure.

`VkTexelBufferDescriptorInfoEXT` is defined as:

    // Provided by VK_EXT_descriptor_heap
    typedef struct VkTexelBufferDescriptorInfoEXT {
        VkStructureType            sType;
        const void*                pNext;
        VkFormat                   format;
        VkDeviceAddressRangeEXT    addressRange;
    } VkTexelBufferDescriptorInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `format` is the VkFormat of the descriptor.

- `addressRange` is a VkDeviceAddressRangeKHR defining the range of data backing the descriptor.

Valid Usage (Implicit)

- VUID-VkTexelBufferDescriptorInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_TEXEL_BUFFER_DESCRIPTOR_INFO_EXT

- VUID-VkTexelBufferDescriptorInfoEXT-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkTexelBufferDescriptorInfoEXT-format-parameter
  `format` must be a valid VkFormat value

`VkImageDescriptorInfoEXT` is defined as:

    // Provided by VK_EXT_descriptor_heap
    typedef struct VkImageDescriptorInfoEXT {
        VkStructureType                 sType;
        const void*                     pNext;
        const VkImageViewCreateInfo*    pView;
        VkImageLayout                   layout;
    } VkImageDescriptorInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `pView` is an VkImageViewCreateInfo describing the descriptor.

- `layout` is the VkImageLayout that the image view will be in when accessed as a descriptor.

Valid Usage

- VUID-VkImageDescriptorInfoEXT-pView-11426
  `pView->viewType` must not be VK_IMAGE_VIEW_TYPE_2D_ARRAY if `pView->image` was created with an `imageType` of VK_IMAGE_TYPE_3D

- VUID-VkImageDescriptorInfoEXT-pView-11427
  If `pView->viewType` is VK_IMAGE_VIEW_TYPE_2D and `pView->image` was created with an `imageType` of VK_IMAGE_TYPE_3D, `pView->image` must have been created with VK_IMAGE_CREATE_2D_VIEW_COMPATIBLE_BIT_EXT set

- VUID-VkImageDescriptorInfoEXT-layout-11219
  `layout` must be VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL, VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL, VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL, VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL, VK_IMAGE_LAYOUT_READ_ONLY_OPTIMAL, VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR, VK_IMAGE_LAYOUT_RENDERING_LOCAL_READ_KHR, VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT, or VK_IMAGE_LAYOUT_GENERAL

- VUID-VkImageDescriptorInfoEXT-layout-11221
  If `layout` is VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL, VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL, VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL, or VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, then `pView->aspectMask` must not include VK_IMAGE_ASPECT_COLOR_BIT

- VUID-VkImageDescriptorInfoEXT-pView-11430
  If `pView->image` is a depth/stencil image, `pView->subresourceRange.aspectMask` must include either VK_IMAGE_ASPECT_DEPTH_BIT or VK_IMAGE_ASPECT_STENCIL_BIT but not both

Valid Usage (Implicit)

- VUID-VkImageDescriptorInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_IMAGE_DESCRIPTOR_INFO_EXT

- VUID-VkImageDescriptorInfoEXT-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkImageDescriptorInfoEXT-pView-parameter
  `pView` must be a valid pointer to a valid VkImageViewCreateInfo structure

- VUID-VkImageDescriptorInfoEXT-layout-parameter
  `layout` must be a valid VkImageLayout value

### 16.2. Using Heaps

One descriptor heap of each type can be bound to a command buffer for use with shaders. When using descriptor heaps, pipelines must be created with VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT and shaders created with VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT in order to make use of the heaps.

When any heap state command is recorded to a command buffer, it immediately invalidates all descriptor set and descriptor buffer state set by vkCmdBindDescriptorSets2, vkCmdPushDescriptorSet2, vkCmdPushDescriptorSetWithTemplate2, vkCmdSetDescriptorBufferOffsets2EXT, vkCmdBindDescriptorBufferEmbeddedSamplers2EXT, vkCmdPushConstants2, vkCmdBindDescriptorSets, vkCmdPushDescriptorSet, vkCmdPushDescriptorSetWithTemplate, vkCmdBindDescriptorBuffersEXT, vkCmdSetDescriptorBufferOffsetsEXT, vkCmdBindDescriptorBufferEmbeddedSamplersEXT, or vkCmdPushConstants. Similarly, recording any of these commands immediately invalidates all state set by commands in this chapter.

Implementations may require storage in descriptor heaps for their own internal descriptors. Storage for these extra descriptors must be allocated by the application as part of each descriptor heap address range, and must not be accessed by the application while it is bound as a reserved range, in any command buffer, until all such command buffers are freed or reset. The amount of storage required by an implementation is advertised by `minResourceHeapReservedRange` for the resource heap, and `minSamplerHeapReservedRange` or `minSamplerHeapReservedRangeWithEmbedded` for the sampler heap (the latter being required when using embedded samplers).

Applications can set different heaps to use the same address ranges, but must take care to ensure that the reserved ranges for each heap do not overlap with each other or with user ranges.

To bind a sampler heap to a command buffer, call:

    // Provided by VK_EXT_descriptor_heap
    void vkCmdBindSamplerHeapEXT(
        VkCommandBuffer                             commandBuffer,
        const VkBindHeapInfoEXT*                    pBindInfo);

- `commandBuffer` is the command buffer that the sampler heap will be bound to.

- `pBindInfo` is a VkBindHeapInfoEXT specifying the device address range used for the heap and any implementation reservations.

Addresses in the range defined by `pBindInfo->heapRange` are bound as the sampler heap. The application can access samplers and data through this heap anywhere except for the reserved range specified by `pBindInfo->reservedRangeOffset`. Addresses in the range [`pBindInfo->reservedRangeOffset`, `pBindInfo->reservedRangeOffset` + `pBindInfo->reservedRangeSize`) are reserved for the implementation and must not be accessed by the application at any time from when this command is recorded until there are no command buffers with that range bound.

The reserved range is bound to the command buffer until it has been reset.

Note | Implementations may require a larger sampler heap reservation to store embedded sampler descriptors when used in a mapping, as advertised by `minSamplerHeapReservedRangeWithEmbedded`.

Shaders executed by commands recorded after this command can use the specified sampler heap to access resources. `pBindInfo->heapRange.address` will be available to shaders to access samplers and data through the `SamplerHeapEXT` `BuiltIn` or via shader bindings.

When `vkCmdBindSamplerHeapEXT` is recorded, it immediately invalidates all non-heap descriptor state. Similarly, recording any non-heap descriptor state commands immediately invalidates state set by this command.

Valid Usage

- VUID-vkCmdBindSamplerHeapEXT-pBindInfo-11223
  The sum of `pBindInfo->reservedRangeOffset` and `pBindInfo->reservedRangeSize` must be less than or equal to `pBindInfo->heapRange.size`

- VUID-vkCmdBindSamplerHeapEXT-pBindInfo-11224
  `pBindInfo->reservedRangeSize` must be greater than or equal to `minSamplerHeapReservedRange`

- VUID-vkCmdBindSamplerHeapEXT-pBindInfo-11225
  `pBindInfo->heapRange.size` must less than or equal to `maxSamplerHeapSize`

- VUID-vkCmdBindSamplerHeapEXT-pBindInfo-11226
  `pBindInfo->heapRange.address` must be a multiple of `samplerHeapAlignment`

- VUID-vkCmdBindSamplerHeapEXT-pBindInfo-11434
  `pBindInfo->reservedRangeOffset` must be a multiple of `samplerDescriptorAlignment`

- VUID-vkCmdBindSamplerHeapEXT-pBindInfo-11228
  Memory bound to addresses in the range [`pBindInfo->heapRange.address` + `pBindInfo->reservedRangeOffset`, `pBindInfo->heapRange.address` + `pBindInfo->reservedRangeOffset` + `pBindInfo->reservedRangeSize`) must not be bound to any other command buffer as a reserved range for any heap unless the reserved range matches exactly and it is the same heap type

- VUID-vkCmdBindSamplerHeapEXT-heapRange-11230
  `heapRange` must be a device address range allocated to the application from a buffer created with the VK_BUFFER_USAGE_DESCRIPTOR_HEAP_BIT_EXT usage flag set

- VUID-vkCmdBindSamplerHeapEXT-commandBuffer-11231
  If `commandBuffer` is a secondary command buffer, it must have begun with VkCommandBufferInheritanceDescriptorHeapInfoEXT::`pSamplerHeapBindInfo` equal to `NULL`

Valid Usage (Implicit)

- VUID-vkCmdBindSamplerHeapEXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdBindSamplerHeapEXT-pBindInfo-parameter
  `pBindInfo` must be a valid pointer to a valid VkBindHeapInfoEXT structure

- VUID-vkCmdBindSamplerHeapEXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdBindSamplerHeapEXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, or VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdBindSamplerHeapEXT-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdBindSamplerHeapEXT is not affected by conditional rendering

To bind a resource heap to a command buffer, call:

    // Provided by VK_EXT_descriptor_heap
    void vkCmdBindResourceHeapEXT(
        VkCommandBuffer                             commandBuffer,
        const VkBindHeapInfoEXT*                    pBindInfo);

- `commandBuffer` is the command buffer that the resource heap will be bound to.

- `pBindInfo` is a VkBindHeapInfoEXT specifying the device address range used for the heap and any implementation reservations.

Addresses in the range defined by `pBindInfo->heapRange` are bound as the resource heap. The application can access resources and data through this heap anywhere except for the reserved range specified by `pBindInfo->reservedRangeOffset`. Addresses in the range [`pBindInfo->reservedRangeOffset`, `pBindInfo->reservedRangeOffset` + `pBindInfo->reservedRangeSize`) are reserved for the implementation and must not be accessed by the application at any time from when this command is recorded until there are no command buffers with that range bound.

The reserved range is bound to the command buffer until it has been reset.

Shaders executed by commands recorded after this command can use the specified resource heap to access resources. `pBindInfo->heapRange.address` will be available to shaders to access resources through the `ResourceHeapEXT` `BuiltIn` or via shader bindings.

When `vkCmdBindResourceHeapEXT` is recorded, it immediately invalidates all non-heap descriptor state. Similarly, recording any non-heap descriptor state commands immediately invalidates state set by this command.

Valid Usage

- VUID-vkCmdBindResourceHeapEXT-pBindInfo-11232
  The sum of `pBindInfo->reservedRangeOffset` and `pBindInfo->reservedRangeSize` must be less than or equal to `pBindInfo->heapRange.size`

- VUID-vkCmdBindResourceHeapEXT-pBindInfo-11233
  `pBindInfo->reservedRangeSize` must be greater than or equal to `minResourceHeapReservedRange`

- VUID-vkCmdBindResourceHeapEXT-pBindInfo-11234
  `pBindInfo->heapRange.size` must less than or equal to `maxResourceHeapSize`

- VUID-vkCmdBindResourceHeapEXT-pBindInfo-11235
  `pBindInfo->heapRange.address` must be a multiple of `resourceHeapAlignment`

- VUID-vkCmdBindResourceHeapEXT-pBindInfo-11435
  `pBindInfo->reservedRangeOffset` must be a multiple of `bufferDescriptorAlignment`

- VUID-vkCmdBindResourceHeapEXT-pBindInfo-11436
  `pBindInfo->reservedRangeOffset` must be a multiple of `imageDescriptorAlignment`

- VUID-vkCmdBindResourceHeapEXT-pBindInfo-11236
  Memory bound to addresses in the range [`pBindInfo->heapRange.address` + `pBindInfo->reservedRangeOffset`, `pBindInfo->heapRange.address` + `pBindInfo->reservedRangeOffset` + `pBindInfo->reservedRangeSize`) must not be bound to any other command buffer as a reserved range for any heap unless the reserved range matches exactly and it is the same heap type

- VUID-vkCmdBindResourceHeapEXT-heapRange-11237
  `heapRange` must be a device address range allocated to the application from a buffer created with the VK_BUFFER_USAGE_DESCRIPTOR_HEAP_BIT_EXT usage flag set

- VUID-vkCmdBindResourceHeapEXT-commandBuffer-11238
  If `commandBuffer` is a secondary command buffer, it must have begun with VkCommandBufferInheritanceDescriptorHeapInfoEXT::`pResourceHeapBindInfo` equal to `NULL`

Valid Usage (Implicit)

- VUID-vkCmdBindResourceHeapEXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdBindResourceHeapEXT-pBindInfo-parameter
  `pBindInfo` must be a valid pointer to a valid VkBindHeapInfoEXT structure

- VUID-vkCmdBindResourceHeapEXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdBindResourceHeapEXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, or VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdBindResourceHeapEXT-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdBindResourceHeapEXT is not affected by conditional rendering

`VkBindHeapInfoEXT` is defined as:

    // Provided by VK_EXT_descriptor_heap
    typedef struct VkBindHeapInfoEXT {
        VkStructureType            sType;
        const void*                pNext;
        VkDeviceAddressRangeEXT    heapRange;
        VkDeviceSize               reservedRangeOffset;
        VkDeviceSize               reservedRangeSize;
    } VkBindHeapInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `heapRange` is a VkDeviceAddressRangeKHR defining the device address range used for the heap, inclusive of the implementation reserved range.

- `reservedRangeOffset` is the offset within `heapRange` to the start of the reserved range for the implementation.

- `reservedRangeSize` is the size of the reserved range for the implementation within `heapRange`.

Valid Usage (Implicit)

- VUID-VkBindHeapInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_BIND_HEAP_INFO_EXT

- VUID-VkBindHeapInfoEXT-pNext-pNext
  `pNext` must be `NULL`

`SamplerHeapEXT`

  Decorating a variable with the `SamplerHeapEXT` built-in decoration will back it with the contents of the sampler heap bound by vkCmdBindSamplerHeapEXT.

Valid Usage

- VUID-SamplerHeapEXT-SamplerHeapEXT-11239
  The variable decorated with `SamplerHeapEXT` must be declared using the `UniformConstant` `Storage` `Class`

`ResourceHeapEXT`

  Decorating a variable with the `ResourceHeapEXT` built-in decoration will back it with the contents of the resource heap bound by vkCmdBindResourceHeapEXT.

Valid Usage

- VUID-ResourceHeapEXT-ResourceHeapEXT-11241
  The variable decorated with `ResourceHeapEXT` must be declared using the `UniformConstant` `Storage` `Class`

#### 16.2.1. Push Data

Push constants specified by vkCmdPushConstants or vkCmdPushConstants2KHR rely on descriptor set layout state, and are not compatible with descriptor heaps. A new push interface is provided for use with descriptor heaps:

To update push data when using descriptor heaps, call:

    // Provided by VK_EXT_descriptor_heap
    void vkCmdPushDataEXT(
        VkCommandBuffer                             commandBuffer,
        const VkPushDataInfoEXT*                    pPushDataInfo);

- `commandBuffer` is the command buffer in which the push data update will be recorded.

- `pPushDataInfo` is a pointer to a VkPushDataInfoEXT structure.

When `vkCmdPushDataEXT` is recorded, it immediately invalidates all non-heap descriptor state. Similarly, recording any non-heap descriptor state commands immediately invalidates state set by this command.

All push data is available to all shaders using the existing `PushConstant` `Storage` `Class`.

Note | Device addresses in push data are intended as the fast path for shader-constant data that does not fit into push data directly. In order to maximize performance of constant data inputs, addresses should be aligned to `minUniformBufferOffsetAlignment`, and decorated with `Alignment` and `NonWritable` in the shader when using physical pointers.

Valid Usage (Implicit)

- VUID-vkCmdPushDataEXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdPushDataEXT-pPushDataInfo-parameter
  `pPushDataInfo` must be a valid pointer to a valid VkPushDataInfoEXT structure

- VUID-vkCmdPushDataEXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdPushDataEXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, or VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdPushDataEXT-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdPushDataEXT is not affected by conditional rendering

The `VkPushDataInfoEXT` structure is defined as:

    // Provided by VK_EXT_descriptor_heap
    typedef struct VkPushDataInfoEXT {
        VkStructureType               sType;
        const void*                   pNext;
        uint32_t                      offset;
        VkHostAddressRangeConstEXT    data;
    } VkPushDataInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `offset` is the start offset of the push data range to update, in units of bytes.

- `data` is the host address range containing the push data to update.

Valid Usage

- VUID-VkPushDataInfoEXT-offset-11243
  The sum of `offset` and `data.size` must be less than or equal to `maxPushDataSize`

- VUID-VkPushDataInfoEXT-offset-11418
  `offset` must be a multiple of 4

- VUID-VkPushDataInfoEXT-data-11419
  `data.size` must be a multiple of 4

Valid Usage (Implicit)

- VUID-VkPushDataInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PUSH_DATA_INFO_EXT

- VUID-VkPushDataInfoEXT-pNext-pNext
  `pNext` must be `NULL` or a pointer to a valid instance of VkPushConstantBankInfoNV

- VUID-VkPushDataInfoEXT-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkPushDataInfoEXT-data-parameter
  `data` must be a valid VkHostAddressRangeConstEXT structure

##### Push Data Banks

When the pushConstantBank feature is enabled, applications can specify the hardware bank into which data is pushed using the `VkPushConstantBankInfoNV` structure.

The `VkPushConstantBankInfoNV` structure is defined as:

    // Provided by VK_NV_push_constant_bank
    typedef struct VkPushConstantBankInfoNV {
        VkStructureType    sType;
        const void*        pNext;
        uint32_t           bank;
    } VkPushConstantBankInfoNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `bank` is the index of the hardware bank into which the data is pushed.

This structure can be chained to VkPushDataInfoEXT, VkPushConstantsInfo, VkDescriptorSetAndBindingMappingEXT, and VkIndirectCommandsLayoutTokenEXT via the `pNext` chain to specify push constant bank placement:

- When chained to VkPushDataInfoEXT, it specifies the hardware bank into which vkCmdPushDataEXT pushes the data.

- When chained to VkPushConstantsInfo, it specifies the hardware bank into which vkCmdPushConstants2 pushes the constants.

- When chained to VkDescriptorSetAndBindingMappingEXT, it specifies the hardware push data bank from which the push data is read.

- When chained to VkIndirectCommandsLayoutTokenEXT with VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_DATA_EXT, it specifies the hardware bank into which indirect push data is placed.

This allows for more flexible push constant management in descriptor heap scenarios where shaders access different root descriptors with specific bank requirements.

Valid Usage

- VUID-VkPushConstantBankInfoNV-bank-12342
  When chained to VkPushDataInfoEXT, if the command buffer is executing graphics operations, `bank` must be less than VkPhysicalDevicePushConstantBankPropertiesNV::`maxGraphicsPushDataBanks`

- VUID-VkPushConstantBankInfoNV-bank-12343
  When chained to VkPushDataInfoEXT, if the command buffer is executing compute operations, `bank` must be less than VkPhysicalDevicePushConstantBankPropertiesNV::`maxComputePushDataBanks`

- VUID-VkPushConstantBankInfoNV-bank-12344
  When chained to VkPushConstantsInfo, if VkPushConstantsInfo::stageFlags includes a graphics stage then `bank` must be less than VkPhysicalDevicePushConstantBankPropertiesNV::`maxGraphicsPushConstantBanks`

- VUID-VkPushConstantBankInfoNV-bank-12345
  When chained to VkPushConstantsInfo, if VkPushConstantsInfo::stageFlags includes a compute stage then `bank` must be less than VkPhysicalDevicePushConstantBankPropertiesNV::`maxComputePushConstantBanks`

- VUID-VkPushConstantBankInfoNV-bank-12346
  When chained to VkDescriptorSetAndBindingMappingEXT for a graphics shader stage, `bank` must be less than VkPhysicalDevicePushConstantBankPropertiesNV::`maxGraphicsPushDataBanks`

- VUID-VkPushConstantBankInfoNV-bank-12347
  When chained to VkDescriptorSetAndBindingMappingEXT for a compute shader stage, `bank` must be less than VkPhysicalDevicePushConstantBankPropertiesNV::`maxComputePushDataBanks`

Valid Usage (Implicit)

- VUID-VkPushConstantBankInfoNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PUSH_CONSTANT_BANK_INFO_NV

Structure Chaining

Extends the structures

  - VkDescriptorSetAndBindingMappingEXT

  - VkIndirectCommandsLayoutTokenEXT

  - VkPushConstantsInfo

  - VkPushDataInfoEXT

### 16.3. Shader Bindings

While descriptor heaps can be accessed directly through the `SamplerHeapEXT` and `ResourceHeapEXT` built-ins, shaders using the existing `DescriptorSet` and `Binding` decorations can map these to heap offsets. In place of descriptor set layouts and pipeline layouts, information can be provided at pipeline or shader creation time to indicate how these bindings are mapped, through a combination of constants, push data, and indirections through device addresses. This interface provides significantly more flexibility than descriptor set layouts, enabling applications to specify precisely where they expect each descriptor to be.

The `VkShaderDescriptorSetAndBindingMappingInfoEXT` structure is defined as:

    // Provided by VK_EXT_descriptor_heap
    typedef struct VkShaderDescriptorSetAndBindingMappingInfoEXT {
        VkStructureType                               sType;
        const void*                                   pNext;
        uint32_t                                      mappingCount;
        const VkDescriptorSetAndBindingMappingEXT*    pMappings;
    } VkShaderDescriptorSetAndBindingMappingInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `mappingCount` is the number of elements in `pMappings`.

- `pMappings` is a pointer to an array of VkDescriptorSetAndBindingMappingEXT structures specifying mappings for a set of descriptors

Including this structure in the `pNext` chain of VkPipelineShaderStageCreateInfo will set mappings for the shader defined by that structure. Similarly, including this structure in the `pNext` chain of a VkShaderCreateInfoEXT with a `codeType` of VK_SHADER_CODE_TYPE_SPIRV_EXT, will set mappings for that shader.

If this structure is not present, it is equivalent to setting `mappingCount` to 0.

Valid Usage

- VUID-VkShaderDescriptorSetAndBindingMappingInfoEXT-pMappings-11244
  Any two elements of `pMappings` must not have the same value of `descriptorSet`, an overlapping range specified by `firstBinding` and `bindingCount`, and any overlapping bits in `resourceMask`

Valid Usage (Implicit)

- VUID-VkShaderDescriptorSetAndBindingMappingInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SHADER_DESCRIPTOR_SET_AND_BINDING_MAPPING_INFO_EXT

- VUID-VkShaderDescriptorSetAndBindingMappingInfoEXT-pMappings-parameter
  If `mappingCount` is not `0`, `pMappings` must be a valid pointer to an array of `mappingCount` valid VkDescriptorSetAndBindingMappingEXT structures

Structure Chaining

Extends the structures

  - VkPipelineShaderStageCreateInfo

  - VkShaderCreateInfoEXT

The `VkDescriptorSetAndBindingMappingEXT` structure is defined as:

    // Provided by VK_EXT_descriptor_heap
    typedef struct VkDescriptorSetAndBindingMappingEXT {
        VkStructureType                     sType;
        const void*                         pNext;
        uint32_t                            descriptorSet;
        uint32_t                            firstBinding;
        uint32_t                            bindingCount;
        VkSpirvResourceTypeFlagsEXT         resourceMask;
        VkDescriptorMappingSourceEXT        source;
        VkDescriptorMappingSourceDataEXT    sourceData;
    } VkDescriptorSetAndBindingMappingEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `descriptorSet` is the value of `DescriptorSet` for resources that this mapping affects.

- `firstBinding` is the first value of `Binding` of resources that this mapping affects.

- `bindingCount` is the number of consecutive `Binding` values of resources that this mapping affects.

- `resourceMask` is a mask of VkSpirvResourceTypeFlagBitsEXT values indicating which resource types are specified by this mapping.

- `source` is a VkDescriptorMappingSourceEXT value specifying the method of mapping specified for the affected resources.

- `sourceData` is a VkDescriptorMappingSourceDataEXT that provides the details of how each mapping is specified according to `source`.

Resources specified in a shader with a `DescriptorSet` decoration set to `descriptorSet`, a `Binding` decoration greater than or equal to `firstBinding` and less than the sum of `firstBinding` and `bindingCount`, and a resource type matching one of the bits in `resourceMask` will be mapped according to `source` and `sourceData`.

Note | Applications are free to overspecify bindings that are not present; allowing reuse of the same mapping structures with multiple shaders, even when those shaders only partially reuse those mappings. This includes things like setting binding counts higher than the number used in the shader, specifying bindings that are not present in the shader, and setting `resourceMask` to all possible resources that may be encountered.

If `source` selects an element of `sourceData` defined by a structure, the description of that structure defines how resources are mapped. Source mappings using a single base type are defined here.

If `source` is VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_CONSTANT_OFFSET_EXT, the resource will be backed by heap data as specified by `constantOffset`.

If `source` is VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, the resource will be backed by heap data as specified by `pushIndex`.

If `source` is VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, the resource will be backed by heap data as specified by `indirectIndex`.

If `source` is VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, the resource will be backed by heap data as specified by `indirectIndexArray`.

If `source` is VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT, the resource will be backed by heap data as specified by `heapData`.

If `source` is VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_DATA_EXT, the resource will be backed by push data at a range from `pushDataOffset` to the size of the resource, allowing a uniform buffer to be backed by push data access push data. Accessing data in the uniform buffer at an offset of shaderOffset in the shader will access push data at an offset equal to

  offset = shaderOffset + pushDataOffset.

If `source` is VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, the resource will be backed by data pointed to by a device address in push data at an offset of `pushAddressOffset`. Accessing data via the mapped resource in the shader will access data backing the address specified in push data:

  address = ((VkDeviceAddress*)pPushData)[pushAddressOffset/8]

where pPushData is the total set of push data specified by vkCmdPushDataEXT. If the shader resource is an acceleration structure, the address must be a valid acceleration structure address.

If `source` is VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, the resource will be backed by heap data as specified by `indirectAddress`.

Note | Accesses to resources using mappings to anything that is not a descriptor in a heap are not subject to robustness guarantees; resources for such mappings must not be accessed out of bounds.

If `source` is VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, the resource will be backed by heap data as specified by `shaderRecordIndex`.

If `source` is VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_DATA_EXT, the resource will be backed by shader record data at a range from `shaderRecordDataOffset` to the size of the resource, allowing a uniform buffer to be used as a way to access shader record data. Accessing data in the uniform buffer at an offset shaderOffset in the shader will access shader record data at an offset equal to

  offset = shaderOffset + shaderRecordDataOffset.

If `source` is VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, the resource will be backed by data pointed to by a device address in the shader record at `shaderRecordAddressOffset`. Accessing data via the mapped resource in the shader will access data backing the address specified in shader record data:

  address = ((VkDeviceAddress*)pShaderRecordData)[shaderRecordAddressOffset/8]

where pShaderRecord is the memory associated with a given shader as its shader record. If the shader resource is an acceleration structure, the address must be a valid acceleration structure address.

Note | Accesses to resources using VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT mappings are not subject to robustness guarantees; data must not be accessed outside of the allocated memory range.

Mappings must be declared for all variables with a `DescriptorSet` and `Binding` in the shader resource interface.

Valid Usage

- VUID-VkDescriptorSetAndBindingMappingEXT-source-11245
  If `source` is VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT, `bindingCount` must be 1

- VUID-VkDescriptorSetAndBindingMappingEXT-source-11246
  If `source` is VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_DATA_EXT, `sourceData.pushDataOffset` must be a multiple of 4

- VUID-VkDescriptorSetAndBindingMappingEXT-source-12452
  If `source` is VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_DATA_EXT, `sourceData.pushDataOffset` must be less than or equal to `maxPushDataSize` - 4

- VUID-VkDescriptorSetAndBindingMappingEXT-source-11247
  If `source` is VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, `sourceData.pushAddressOffset` must be a multiple of 8

- VUID-VkDescriptorSetAndBindingMappingEXT-source-12453
  If `source` is VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, `sourceData.pushAddressOffset` must be less than or equal to `maxPushDataSize` - 8

- VUID-VkDescriptorSetAndBindingMappingEXT-source-11248
  If `source` is VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_DATA_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, `bindingCount` must be 1

- VUID-VkDescriptorSetAndBindingMappingEXT-source-11249
  If `source` is VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_DATA_EXT, `sourceData.shaderRecordDataOffset` must be a multiple of 4

- VUID-VkDescriptorSetAndBindingMappingEXT-source-11250
  If `source` is VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, `sourceData.shaderRecordAddressOffset` must be a multiple of 8

- VUID-VkDescriptorSetAndBindingMappingEXT-source-11251
  If `source` is VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_CONSTANT_OFFSET_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, and `descriptorSet`, `firstBinding`, and `bindingCount` identify any `OpTypeImage` variables, any `heapOffset`, and `heapArrayStride` members of the corresponding member of `sourceData` must be 0 or a multiple of `imageDescriptorAlignment`

- VUID-VkDescriptorSetAndBindingMappingEXT-source-11252
  If `source` is VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_CONSTANT_OFFSET_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, and `descriptorSet`, `firstBinding`, and `bindingCount` identify any `OpTypeStruct` variables, any `heapOffset`, and `heapArrayStride` members of the corresponding member of `sourceData` must be 0 or a multiple of `bufferDescriptorAlignment`

- VUID-VkDescriptorSetAndBindingMappingEXT-source-11253
  If `source` is VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_CONSTANT_OFFSET_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, and `descriptorSet`, `firstBinding`, and `bindingCount` identify any `OpTypeSampler` variables, any `heapOffset` and `heapArrayStride` members of the corresponding member of `sourceData` must be 0 or a multiple of `samplerDescriptorAlignment`

- VUID-VkDescriptorSetAndBindingMappingEXT-source-11254
  If `source` is VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_CONSTANT_OFFSET_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, and `descriptorSet`, `firstBinding`, and `bindingCount` identify any `OpTypeSampledImage` variables, and `pEmbeddedSampler` is `NULL`, then any `samplerHeapOffset` and `samplerHeapArrayStride` members of the corresponding member of `sourceData` must be 0 or a multiple of `samplerDescriptorAlignment`

- VUID-VkDescriptorSetAndBindingMappingEXT-source-12406
  If `source` is VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_CONSTANT_OFFSET_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, and `descriptorSet`, `firstBinding`, and `bindingCount` identify any `OpTypeSampledImage` variables, any `heapOffset` and `heapArrayStride` members of the corresponding member of `sourceData` must be 0 or a multiple of `imageDescriptorAlignment`

- VUID-VkDescriptorSetAndBindingMappingEXT-source-12456
  If `source` is VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, and `descriptorSet`, `firstBinding`, and `bindingCount` identify any `OpTypeSampledImage` variables, and `pEmbeddedSampler` is `NULL`, `samplerPushOffset` must be a multiple of 4

- VUID-VkDescriptorSetAndBindingMappingEXT-source-12457
  If `source` is VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, and `descriptorSet`, `firstBinding`, and `bindingCount` identify any `OpTypeSampledImage` variables, and `pEmbeddedSampler` is `NULL`, `samplerPushOffset` must be less than or equal to `maxPushDataSize` - 4

- VUID-VkDescriptorSetAndBindingMappingEXT-source-12458
  If `source` is VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, and `descriptorSet`, `firstBinding`, and `bindingCount` identify any `OpTypeSampledImage` variables, and `pEmbeddedSampler` is `NULL`, `samplerPushOffset` must be a multiple of 8

- VUID-VkDescriptorSetAndBindingMappingEXT-source-12459
  If `source` is VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, and `descriptorSet`, `firstBinding`, and `bindingCount` identify any `OpTypeSampledImage` variables, and `pEmbeddedSampler` is `NULL`, `samplerPushOffset` must be less than or equal to `maxPushDataSize` - 8

- VUID-VkDescriptorSetAndBindingMappingEXT-source-12460
  If `source` is VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, and `descriptorSet`, `firstBinding`, and `bindingCount` identify any `OpTypeSampledImage` variables, and `pEmbeddedSampler` is `NULL`, `samplerAddressOffset` must be a multiple of 4

- VUID-VkDescriptorSetAndBindingMappingEXT-source-11356
  If `source` is VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_DATA_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_DATA_EXT, `resourceMask` must include VK_SPIRV_RESOURCE_TYPE_UNIFORM_BUFFER_BIT_EXT

- VUID-VkDescriptorSetAndBindingMappingEXT-source-11357
  If `source` is VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, `resourceMask` must include at least one of VK_SPIRV_RESOURCE_TYPE_UNIFORM_BUFFER_BIT_EXT, VK_SPIRV_RESOURCE_TYPE_READ_ONLY_STORAGE_BUFFER_BIT_EXT, VK_SPIRV_RESOURCE_TYPE_READ_WRITE_STORAGE_BUFFER_BIT_EXT, or VK_SPIRV_RESOURCE_TYPE_ACCELERATION_STRUCTURE_BIT_EXT

- VUID-VkDescriptorSetAndBindingMappingEXT-source-11358
  If `source` is VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, and the mapping sets `useCombinedImageSamplerIndex` to VK_TRUE, `resourceMask` must include at least one of VK_SPIRV_RESOURCE_TYPE_COMBINED_SAMPLED_IMAGE_BIT_EXT, VK_SPIRV_RESOURCE_TYPE_SAMPLED_IMAGE_BIT_EXT, or VK_SPIRV_RESOURCE_TYPE_SAMPLER_BIT_EXT

- VUID-VkDescriptorSetAndBindingMappingEXT-source-11389
  If `source` is VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_CONSTANT_OFFSET_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, and `bindingCount` is not `1`, the `pEmbeddedSampler` member of the corresponding mapping structure must be `NULL`

- VUID-VkDescriptorSetAndBindingMappingEXT-source-11390
  If `source` is VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_CONSTANT_OFFSET_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, and `descriptorSet`, `firstBinding`, and `bindingCount` identify any `OpTypeTensorARM` variables, the `heapOffset`, and `heapArrayStride` members of the corresponding member of `sourceData` must be 0 or a multiple of `tensorDescriptorAlignment`

Valid Usage (Implicit)

- VUID-VkDescriptorSetAndBindingMappingEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_AND_BINDING_MAPPING_EXT

- VUID-VkDescriptorSetAndBindingMappingEXT-pNext-pNext
  `pNext` must be `NULL` or a pointer to a valid instance of VkPushConstantBankInfoNV

- VUID-VkDescriptorSetAndBindingMappingEXT-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkDescriptorSetAndBindingMappingEXT-resourceMask-parameter
  `resourceMask` must be a valid combination of VkSpirvResourceTypeFlagBitsEXT values

- VUID-VkDescriptorSetAndBindingMappingEXT-resourceMask-requiredbitmask
  `resourceMask` must not be `0`

- VUID-VkDescriptorSetAndBindingMappingEXT-source-parameter
  `source` must be a valid VkDescriptorMappingSourceEXT value

- VUID-VkDescriptorSetAndBindingMappingEXT-constantOffset-parameter
  If `source` is VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_CONSTANT_OFFSET_EXT, the `constantOffset` member of `sourceData` must be a valid VkDescriptorMappingSourceConstantOffsetEXT structure

- VUID-VkDescriptorSetAndBindingMappingEXT-pushIndex-parameter
  If `source` is VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, the `pushIndex` member of `sourceData` must be a valid VkDescriptorMappingSourcePushIndexEXT structure

- VUID-VkDescriptorSetAndBindingMappingEXT-indirectIndex-parameter
  If `source` is VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, the `indirectIndex` member of `sourceData` must be a valid VkDescriptorMappingSourceIndirectIndexEXT structure

- VUID-VkDescriptorSetAndBindingMappingEXT-indirectIndexArray-parameter
  If `source` is VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, the `indirectIndexArray` member of `sourceData` must be a valid VkDescriptorMappingSourceIndirectIndexArrayEXT structure

- VUID-VkDescriptorSetAndBindingMappingEXT-shaderRecordIndex-parameter
  If `source` is VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, the `shaderRecordIndex` member of `sourceData` must be a valid VkDescriptorMappingSourceShaderRecordIndexEXT structure

Bits which can be set in VkDescriptorSetAndBindingMappingEXT::`resourceMask`, are:

    // Provided by VK_EXT_descriptor_heap
    typedef enum VkSpirvResourceTypeFlagBitsEXT {
        VK_SPIRV_RESOURCE_TYPE_ALL_EXT = 0x7FFFFFFF,
        VK_SPIRV_RESOURCE_TYPE_SAMPLER_BIT_EXT = 0x00000001,
        VK_SPIRV_RESOURCE_TYPE_SAMPLED_IMAGE_BIT_EXT = 0x00000002,
        VK_SPIRV_RESOURCE_TYPE_READ_ONLY_IMAGE_BIT_EXT = 0x00000004,
        VK_SPIRV_RESOURCE_TYPE_READ_WRITE_IMAGE_BIT_EXT = 0x00000008,
        VK_SPIRV_RESOURCE_TYPE_COMBINED_SAMPLED_IMAGE_BIT_EXT = 0x00000010,
        VK_SPIRV_RESOURCE_TYPE_UNIFORM_BUFFER_BIT_EXT = 0x00000020,
        VK_SPIRV_RESOURCE_TYPE_READ_ONLY_STORAGE_BUFFER_BIT_EXT = 0x00000040,
        VK_SPIRV_RESOURCE_TYPE_READ_WRITE_STORAGE_BUFFER_BIT_EXT = 0x00000080,
      // Provided by VK_EXT_descriptor_heap with VK_KHR_ray_tracing_pipeline or VK_NV_ray_tracing
        VK_SPIRV_RESOURCE_TYPE_ACCELERATION_STRUCTURE_BIT_EXT = 0x00000100,
      // Provided by VK_EXT_descriptor_heap with VK_ARM_tensors
        VK_SPIRV_RESOURCE_TYPE_TENSOR_BIT_ARM = 0x00000200,
    } VkSpirvResourceTypeFlagBitsEXT;

- VK_SPIRV_RESOURCE_TYPE_ALL_EXT specifies that all resource declarations are included.

- VK_SPIRV_RESOURCE_TYPE_SAMPLER_BIT_EXT specifies `OpTypeSampler` variables.

- VK_SPIRV_RESOURCE_TYPE_SAMPLED_IMAGE_BIT_EXT specifies `OpTypeImage` variables with a `Sampled` parameter of 1.

- VK_SPIRV_RESOURCE_TYPE_READ_ONLY_IMAGE_BIT_EXT specifies `OpTypeImage` variables with a `Sampled` parameter of 2 and decorated with `NonWritable`.

- VK_SPIRV_RESOURCE_TYPE_READ_WRITE_IMAGE_BIT_EXT specifies `OpTypeImage` variables with a `Sampled` parameter of 2 and not decorated with `NonWritable`.

- VK_SPIRV_RESOURCE_TYPE_COMBINED_SAMPLED_IMAGE_BIT_EXT specifies `OpTypeSampledImage` variables.

- VK_SPIRV_RESOURCE_TYPE_UNIFORM_BUFFER_BIT_EXT specifies `OpTypeStruct` variables in the `Uniform` storage class decorated with `Block`

- VK_SPIRV_RESOURCE_TYPE_READ_ONLY_STORAGE_BUFFER_BIT_EXT specifies `OpTypeStruct` variables either in the `StorageBuffer` storage class decorated with `Block` or in the `Uniform` storage class decorated with `BufferBlock`, and decorated with `NonWritable`

- VK_SPIRV_RESOURCE_TYPE_READ_WRITE_STORAGE_BUFFER_BIT_EXT specifies `OpTypeStruct` variables either in the `StorageBuffer` storage class decorated with `Block` or in the `Uniform` storage class decorated with `BufferBlock`, but not decorated with `NonWritable`

- VK_SPIRV_RESOURCE_TYPE_ACCELERATION_STRUCTURE_BIT_EXT specifies `OpTypeAccelerationStructureKHR` variables

- VK_SPIRV_RESOURCE_TYPE_TENSOR_BIT_ARM specifies `OpTypeTensorARM` variables

    // Provided by VK_EXT_descriptor_heap
    typedef VkFlags VkSpirvResourceTypeFlagsEXT;

`VkSpirvResourceTypeFlagsEXT` is a bitmask type for setting a mask of zero or more VkSpirvResourceTypeFlagBitsEXT.

The possible mapping sources for a shader binding are:

    // Provided by VK_EXT_descriptor_heap
    typedef enum VkDescriptorMappingSourceEXT {
        VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_CONSTANT_OFFSET_EXT = 0,
        VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT = 1,
        VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT = 2,
        VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT = 3,
        VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT = 4,
        VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_DATA_EXT = 5,
        VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT = 6,
        VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT = 7,
      // Provided by VK_EXT_descriptor_heap with VK_KHR_ray_tracing_pipeline or VK_NV_ray_tracing
        VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT = 8,
      // Provided by VK_EXT_descriptor_heap with VK_KHR_ray_tracing_pipeline or VK_NV_ray_tracing
        VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_DATA_EXT = 9,
      // Provided by VK_EXT_descriptor_heap with VK_KHR_ray_tracing_pipeline or VK_NV_ray_tracing
        VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT = 10,
    } VkDescriptorMappingSourceEXT;

- VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_CONSTANT_OFFSET_EXT specifies that the resource will be backed by a descriptor from the heap at a constant index.

- VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT specifies that the resource will be backed by a descriptor from the heap at an index sourced from push data, added to a constant index.

- VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT specifies that the resource will be backed by a descriptor from the heap at an index sourced from an address in push data, added to a constant index. If the mapping is an array, the array will be mapped to a base offset in indirect memory, and subsequent elements are mapped as offsets to that base.

- VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT specifies that the resource will be backed by a descriptor from the heap at an index sourced from an address in push data, added to a constant index. If the mapping is an array, each array element will be mapped to a separate index in indirect memory.

- VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT specifies that the resource will be backed by heap data directly.

- VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_DATA_EXT specifies that the resource will be backed by push data directly.

- VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT specifies that the resource will be backed by an address in push data.

- VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT specifies that the resource will be backed by an address sourced via another address in push data.

- VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT specifies that the resource will be backed by a descriptor from the heap at an index sourced from shader record data, added to a constant index.

- VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_DATA_EXT specifies that the resource will be backed by shader record data directly.

- VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT specifies that the resource will be backed by an address in shader record data.

The `VkDescriptorMappingSourceDataEXT` union is defined as:

    // Provided by VK_EXT_descriptor_heap
    typedef union VkDescriptorMappingSourceDataEXT {
        VkDescriptorMappingSourceConstantOffsetEXT        constantOffset;
        VkDescriptorMappingSourcePushIndexEXT             pushIndex;
        VkDescriptorMappingSourceIndirectIndexEXT         indirectIndex;
        VkDescriptorMappingSourceIndirectIndexArrayEXT    indirectIndexArray;
        VkDescriptorMappingSourceHeapDataEXT              heapData;
        uint32_t                                          pushDataOffset;
        uint32_t                                          pushAddressOffset;
        VkDescriptorMappingSourceIndirectAddressEXT       indirectAddress;
        VkDescriptorMappingSourceShaderRecordIndexEXT     shaderRecordIndex;
        uint32_t                                          shaderRecordDataOffset;
        uint32_t                                          shaderRecordAddressOffset;
    } VkDescriptorMappingSourceDataEXT;

- `constantOffset` is a VkDescriptorMappingSourceConstantOffsetEXT structure specifying the mapping for resources at a constant byte offset into a heap.

- `pushIndex` is a VkDescriptorMappingSourcePushIndexEXT structure specifying the mapping for resources at an index into a heap source from push data.

- `indirectIndex` is a VkDescriptorMappingSourceIndirectIndexEXT structure specifying the mapping for resources at an index into a heap source from an address in push data.

- `indirectIndexArray` is a VkDescriptorMappingSourceIndirectIndexArrayEXT structure specifying the mapping for resources to an array of indices into a heap source from an address in push data.

- `heapData` is a VkDescriptorMappingSourceHeapDataEXT structure specifying an offset into heap data for a uniform buffer to map to.

- `pushDataOffset` an offset into push data for a uniform buffer to map to.

- `pushAddressOffset` an offset into push data storing an address for a resource to map to.

- `indirectAddress` is a VkDescriptorMappingSourceIndirectAddressEXT structure specifying an address in push data containing another address for a resource to map to.

- `shaderRecordIndex` is a VkDescriptorMappingSourceShaderRecordIndexEXT structure specifying the mapping for resources at an index into a heap source from shader record data.

- `shaderRecordDataOffset` an offset into shader record data for a uniform buffer to map to.

- `shaderRecordAddressOffset` an offset into shader record data storing an address for a resource to map to.

The `VkDescriptorMappingSourceConstantOffsetEXT` structure is defined as:

    // Provided by VK_EXT_descriptor_heap
    typedef struct VkDescriptorMappingSourceConstantOffsetEXT {
        uint32_t                      heapOffset;
        uint32_t                      heapArrayStride;
        const VkSamplerCreateInfo*    pEmbeddedSampler;
        uint32_t                      samplerHeapOffset;
        uint32_t                      samplerHeapArrayStride;
    } VkDescriptorMappingSourceConstantOffsetEXT;

- `heapOffset` is a constant byte offset added to the heap address for the mapped resource or sampler.

- `heapArrayStride` is a constant byte stride that multiplies the shader binding and array index.

- `pEmbeddedSampler` is an optional VkSamplerCreateInfo structure specifying a sampler to embed into the shader, in place of looking the sampler up in a heap.

- `samplerHeapOffset` is used only when mapping a combined image sampler, used in place of `heapOffset` to retrieve the sampler.

- `samplerHeapArrayStride` is used only when mapping a combined image sampler, used in place of `heapArrayStride` to retrieve the sampler.

Resources using this mapping will be backed by a descriptor in the heap, at an offset calculated as

  shaderIndex = (Binding - `firstBinding`) + arrayIndex

  offset = heapOffset + (shaderIndex * heapArrayStride)

where Binding is the binding value in the shader, arrayIndex is the index into the array if the shader binding is declared as an array.

If the mapped resource is a `OpTypeSampledImage`, offset is instead calculated for the sampler as

  offset = samplerHeapOffset + (shaderIndex * samplerHeapArrayStride)

If the mapped resource is a `OpTypeSampler` or `OpTypeSampledImage`, and `pEmbeddedSampler` is not `NULL`, the specified embedded sampler will be used rather than accessing the sampler heap.

Valid Usage

- VUID-VkDescriptorMappingSourceConstantOffsetEXT-pEmbeddedSampler-11445
  If `pEmbeddedSampler` is a valid pointer to a VkSamplerCreateInfo, its `borderColor` must not be VK_BORDER_COLOR_FLOAT_CUSTOM_EXT or VK_BORDER_COLOR_INT_CUSTOM_EXT

- VUID-VkDescriptorMappingSourceConstantOffsetEXT-pEmbeddedSampler-11415
  If `pEmbeddedSampler` is a valid pointer to a VkSamplerCreateInfo, and there is a VkDebugUtilsObjectNameInfoEXT structure in its `pNext` chain, its `objectType` must be VK_OBJECT_TYPE_UNKNOWN

- VUID-VkDescriptorMappingSourceConstantOffsetEXT-pEmbeddedSampler-12432
  If `pEmbeddedSampler` is a valid pointer to a VkSamplerCreateInfo, the VkSamplerCreateInfo::`pNext` chain must not contain VkOpaqueCaptureDescriptorDataCreateInfoEXT

Valid Usage (Implicit)

- VUID-VkDescriptorMappingSourceConstantOffsetEXT-pEmbeddedSampler-parameter
  If `pEmbeddedSampler` is not `NULL`, `pEmbeddedSampler` must be a valid pointer to a valid VkSamplerCreateInfo structure

The `VkDescriptorMappingSourcePushIndexEXT` structure is defined as:

    // Provided by VK_EXT_descriptor_heap
    typedef struct VkDescriptorMappingSourcePushIndexEXT {
        uint32_t                      heapOffset;
        uint32_t                      pushOffset;
        uint32_t                      heapIndexStride;
        uint32_t                      heapArrayStride;
        const VkSamplerCreateInfo*    pEmbeddedSampler;
        VkBool32                      useCombinedImageSamplerIndex;
        uint32_t                      samplerHeapOffset;
        uint32_t                      samplerPushOffset;
        uint32_t                      samplerHeapIndexStride;
        uint32_t                      samplerHeapArrayStride;
    } VkDescriptorMappingSourcePushIndexEXT;

- `heapOffset` is a constant byte offset added to the heap address for the mapped resource or sampler.

- `pushOffset` is an index into push data where an index into the heap for the mapped resource will be retrieved.

- `heapIndexStride` is a constant byte stride that multiplies the index in push data.

- `heapArrayStride` is a constant byte stride that multiplies the shader binding and array index.

- `pEmbeddedSampler` is an optional VkSamplerCreateInfo structure specifying a sampler to embed into the shader, in place of looking the sampler up in a heap.

- `useCombinedImageSamplerIndex` specifies whether the generated index value will be decoded as two packed indices if the mapped resource is an `OpTypeSampledImage`.

- `samplerHeapOffset` is used only when mapping a combined image sampler, used in place of `heapOffset` to retrieve the sampler.

- `samplerPushOffset` is used only when mapping a combined image sampler, used in place of `pushOffset` to retrieve the sampler.

- `samplerHeapIndexStride` is used only when mapping a combined image sampler, used in place of `heapIndexStride` to retrieve the sampler.

- `samplerHeapArrayStride` is used only when mapping a combined image sampler, used in place of `heapArrayStride` to retrieve the sampler.

Resources using this mapping will be backed by a descriptor in the heap, at an offset calculated as

  pushIndex = ((uint32_t*)pPushData)[pushOffset/4]

  shaderIndex = (Binding - firstBinding) + arrayIndex

  offset = heapOffset + (pushIndex × heapIndexStride) + (shaderIndex × heapArrayStride)

where Binding is the binding value in the shader, arrayIndex is the index into the array if the shader binding is declared as an array, and pPushData is the total set of push data specified by vkCmdPushDataEXT.

If the mapped resource is a `OpTypeSampledImage`, offset is instead calculated for the sampler as

  samplerPushIndex = ((uint32_t*)pPushData)[samplerPushOffset/4]

  offset = samplerHeapOffset + (samplerPushIndex × samplerHeapIndexStride) + (shaderIndex × samplerHeapArrayStride)

If `useCombinedImageSamplerIndex` is VK_TRUE, and the mapped resource is a `OpTypeSampledImage`, pushIndex and samplerPushIndex in the above equations are instead calculated as

  pushIndex = ((uint32_t*)pPushData)[pushOffset/4] & 0xFFFFF

  samplerPushIndex = (((uint32_t*)pPushData)[pushOffset/4] >> 20) & 0xFFF

If the mapped resource is a `OpTypeSampler` or `OpTypeSampledImage`, and `pEmbeddedSampler` is not `NULL`, the specified embedded sampler will be used rather than accessing the sampler heap.

Valid Usage

- VUID-VkDescriptorMappingSourcePushIndexEXT-pushOffset-11258
  `pushOffset` must be a multiple of 4

- VUID-VkDescriptorMappingSourcePushIndexEXT-pushOffset-11259
  `pushOffset` must be less than or equal to `maxPushDataSize` - 4

- VUID-VkDescriptorMappingSourcePushIndexEXT-pEmbeddedSampler-11445
  If `pEmbeddedSampler` is a valid pointer to a VkSamplerCreateInfo, its `borderColor` must not be VK_BORDER_COLOR_FLOAT_CUSTOM_EXT or VK_BORDER_COLOR_INT_CUSTOM_EXT

- VUID-VkDescriptorMappingSourcePushIndexEXT-pEmbeddedSampler-11415
  If `pEmbeddedSampler` is a valid pointer to a VkSamplerCreateInfo, and there is a VkDebugUtilsObjectNameInfoEXT structure in its `pNext` chain, its `objectType` must be VK_OBJECT_TYPE_UNKNOWN

- VUID-VkDescriptorMappingSourcePushIndexEXT-pEmbeddedSampler-12432
  If `pEmbeddedSampler` is a valid pointer to a VkSamplerCreateInfo, the VkSamplerCreateInfo::`pNext` chain must not contain VkOpaqueCaptureDescriptorDataCreateInfoEXT

Valid Usage (Implicit)

- VUID-VkDescriptorMappingSourcePushIndexEXT-pEmbeddedSampler-parameter
  If `pEmbeddedSampler` is not `NULL`, `pEmbeddedSampler` must be a valid pointer to a valid VkSamplerCreateInfo structure

The `VkDescriptorMappingSourceIndirectIndexEXT` structure is defined as:

    // Provided by VK_EXT_descriptor_heap
    typedef struct VkDescriptorMappingSourceIndirectIndexEXT {
        uint32_t                      heapOffset;
        uint32_t                      pushOffset;
        uint32_t                      addressOffset;
        uint32_t                      heapIndexStride;
        uint32_t                      heapArrayStride;
        const VkSamplerCreateInfo*    pEmbeddedSampler;
        VkBool32                      useCombinedImageSamplerIndex;
        uint32_t                      samplerHeapOffset;
        uint32_t                      samplerPushOffset;
        uint32_t                      samplerAddressOffset;
        uint32_t                      samplerHeapIndexStride;
        uint32_t                      samplerHeapArrayStride;
    } VkDescriptorMappingSourceIndirectIndexEXT;

- `heapOffset` is a constant byte offset added to the heap address for the mapped resource or sampler.

- `pushOffset` is an offset into push data where an the indirect address will be.

- `addressOffset` is an index into the address in push data where an index into the heap for the mapped resource will be retrieved.

- `heapIndexStride` is a constant byte stride that multiplies the index in indirect data.

- `heapArrayStride` is a constant byte stride that multiplies the shader binding and array index.

- `pEmbeddedSampler` is an optional VkSamplerCreateInfo structure specifying a sampler to embed into the shader, in place of looking the sampler up in a heap.

- `useCombinedImageSamplerIndex` specifies whether the generated index value will be decoded as two packed indices if the mapped resource is an `OpTypeSampledImage`.

- `samplerHeapOffset` is used only when mapping a combined image sampler, used in place of `heapOffset` to retrieve the sampler.

- `samplerPushOffset` is used only when mapping a combined image sampler, used in place of `pushOffset` to retrieve the sampler.

- `samplerAddressOffset` is used only when mapping a combined image sampler, used in place of `addressOffset` to retrieve the sampler.

- `samplerHeapIndexStride` is used only when mapping a combined image sampler, used in place of `heapIndexStride` to retrieve the sampler.

- `samplerHeapArrayStride` is used only when mapping a combined image sampler, used in place of `heapArrayStride` to retrieve the sampler.

Resources using this mapping will be backed by a descriptor in the heap, at an offset calculated as

  uint32_t *indirectAddress = ((VkDeviceAddress*)pPushData)[pushOffset/8]

  indirectIndex = indirectAddress[(addressOffset / 4)]

  shaderIndex = (Binding - firstBinding) + arrayIndex

  offset = heapOffset + (indirectIndex × heapIndexStride) + (shaderIndex × heapArrayStride)

where Binding is the binding value in the shader, arrayIndex is the index into the array if the shader binding is declared as an array, and pPushData is the total set of push data specified by vkCmdPushDataEXT. The value of the address in push data must be a multiple of 4. Index reads through indirectAddress are performed as non-volatile uniform buffer reads, and can be synchronized using VK_ACCESS_2_UNIFORM_READ_BIT. The value in memory must remain static while any shader invocation using this mapping is in flight to avoid a data race.

If the mapped resource is a `OpTypeSampledImage`, offset is instead calculated for the sampler as

  uint32_t *samplerIndirectAddress = ((VkDeviceAddress*)pPushData)[samplerPushOffset/8]

  samplerIndirectIndex = samplerIndirectAddress[(samplerAddressOffset / 4)]

  offset = samplerHeapOffset + (samplerIndirectIndex × samplerHeapIndexStride) + (shaderIndex × samplerHeapArrayStride)

If `useCombinedImageSamplerIndex` is VK_TRUE, and the mapped resource is a `OpTypeSampledImage`, indirectIndex and samplerIndirectIndex in the above equations are instead calculated as

  indirectIndex = indirectAddress[addressOffset/4] & 0xFFFFF

  samplerIndirectIndex = indirectAddress[addressOffset/4] >> 20) & 0xFFF

If the mapped resource is a `OpTypeSampler` or `OpTypeSampledImage`, and `pEmbeddedSampler` is not `NULL`, the specified embedded sampler will be used rather than accessing the sampler heap.

Valid Usage

- VUID-VkDescriptorMappingSourceIndirectIndexEXT-pushOffset-11260
  `pushOffset` must be a multiple of 8

- VUID-VkDescriptorMappingSourceIndirectIndexEXT-pushOffset-11261
  `pushOffset` must be less than or equal to `maxPushDataSize` - 8

- VUID-VkDescriptorMappingSourceIndirectIndexEXT-addressOffset-11262
  `addressOffset` must be a multiple of 4

- VUID-VkDescriptorMappingSourceIndirectIndexEXT-pEmbeddedSampler-11445
  If `pEmbeddedSampler` is a valid pointer to a VkSamplerCreateInfo, its `borderColor` must not be VK_BORDER_COLOR_FLOAT_CUSTOM_EXT or VK_BORDER_COLOR_INT_CUSTOM_EXT

- VUID-VkDescriptorMappingSourceIndirectIndexEXT-pEmbeddedSampler-11415
  If `pEmbeddedSampler` is a valid pointer to a VkSamplerCreateInfo, and there is a VkDebugUtilsObjectNameInfoEXT structure in its `pNext` chain, its `objectType` must be VK_OBJECT_TYPE_UNKNOWN

- VUID-VkDescriptorMappingSourceIndirectIndexEXT-pEmbeddedSampler-12432
  If `pEmbeddedSampler` is a valid pointer to a VkSamplerCreateInfo, the VkSamplerCreateInfo::`pNext` chain must not contain VkOpaqueCaptureDescriptorDataCreateInfoEXT

Valid Usage (Implicit)

- VUID-VkDescriptorMappingSourceIndirectIndexEXT-pEmbeddedSampler-parameter
  If `pEmbeddedSampler` is not `NULL`, `pEmbeddedSampler` must be a valid pointer to a valid VkSamplerCreateInfo structure

The `VkDescriptorMappingSourceIndirectIndexArrayEXT` structure is defined as:

    // Provided by VK_EXT_descriptor_heap
    typedef struct VkDescriptorMappingSourceIndirectIndexArrayEXT {
        uint32_t                      heapOffset;
        uint32_t                      pushOffset;
        uint32_t                      addressOffset;
        uint32_t                      heapIndexStride;
        const VkSamplerCreateInfo*    pEmbeddedSampler;
        VkBool32                      useCombinedImageSamplerIndex;
        uint32_t                      samplerHeapOffset;
        uint32_t                      samplerPushOffset;
        uint32_t                      samplerAddressOffset;
        uint32_t                      samplerHeapIndexStride;
    } VkDescriptorMappingSourceIndirectIndexArrayEXT;

- `heapOffset` is a constant byte offset added to the heap address for the mapped resource or sampler.

- `pushOffset` is an offset into push data where an the indirect address will be.

- `addressOffset` is an index into the address in push data where an index into the heap for the mapped resource will be retrieved.

- `heapIndexStride` is a constant byte stride that multiplies the index in indirect data.

- `pEmbeddedSampler` is an optional VkSamplerCreateInfo structure specifying a sampler to embed into the shader, in place of looking the sampler up in a heap.

- `useCombinedImageSamplerIndex` specifies whether the generated index value will be decoded as two packed indices if the mapped resource is an `OpTypeSampledImage`.

- `samplerHeapOffset` is used only when mapping a combined image sampler, used in place of `heapOffset` to retrieve the sampler.

- `samplerPushOffset` is used only when mapping a combined image sampler, used in place of `pushOffset` to retrieve the sampler.

- `samplerAddressOffset` is used only when mapping a combined image sampler, used in place of `addressOffset` to retrieve the sampler.

- `samplerHeapIndexStride` is used only when mapping a combined image sampler, used in place of `heapIndexStride` to retrieve the sampler.

Resources using this mapping will be backed by a descriptor in the heap, at an offset calculated as

  uint32_t *indirectAddress = ((VkDeviceAddress*)pPushData)[pushOffset/8]

  shaderIndex = (Binding - firstBinding) + arrayIndex

  indirectIndex = indirectAddress[(addressOffset / 4) + shaderIndex]

  offset = heapOffset + (indirectIndex × heapIndexStride)

where Binding is the binding value in the shader, arrayIndex is the index into the array if the shader binding is declared as an array, and pPushData is the total set of push data specified by vkCmdPushDataEXT. The value of the address in push data must be a multiple of 4. Index reads through indirectAddress are performed as non-volatile uniform buffer reads, and can be synchronized using VK_ACCESS_2_UNIFORM_READ_BIT. The value in memory must remain static while any shader invocation using this mapping is in flight to avoid a data race.

If the mapped resource is a `OpTypeSampledImage`, offset is instead calculated for the sampler as

  uint32_t *samplerIndirectAddress = ((VkDeviceAddress*)pPushData)[samplerPushOffset/8]

  samplerIndirectIndex = samplerAddr[(samplerAddressOffset / 4) + shaderIndex]

  offset = samplerHeapOffset + (samplerIndirectIndex × samplerHeapIndexStride)

If `useCombinedImageSamplerIndex` is VK_TRUE, and the mapped resource is a `OpTypeSampledImage`, indirectIndex and samplerIndirectIndex in the above equations are instead calculated as

  indirectIndex = indirectAddress[addressOffset/4 + shaderIndex] & 0xFFFFF

  samplerIndirectIndex = indirectAddress[addressOffset/4 + shaderIndex] >> 20) & 0xFFF

If the mapped resource is a `OpTypeSampler` or `OpTypeSampledImage`, and `pEmbeddedSampler` is not `NULL`, the specified embedded sampler will be used rather than accessing the sampler heap.

Valid Usage

- VUID-VkDescriptorMappingSourceIndirectIndexArrayEXT-pushOffset-11359
  `pushOffset` must be a multiple of 8

- VUID-VkDescriptorMappingSourceIndirectIndexArrayEXT-pushOffset-11360
  `pushOffset` must be less than or equal to `maxPushDataSize` - 8

- VUID-VkDescriptorMappingSourceIndirectIndexArrayEXT-addressOffset-11361
  `addressOffset` must be a multiple of 4

- VUID-VkDescriptorMappingSourceIndirectIndexArrayEXT-pEmbeddedSampler-11445
  If `pEmbeddedSampler` is a valid pointer to a VkSamplerCreateInfo, its `borderColor` must not be VK_BORDER_COLOR_FLOAT_CUSTOM_EXT or VK_BORDER_COLOR_INT_CUSTOM_EXT

- VUID-VkDescriptorMappingSourceIndirectIndexArrayEXT-pEmbeddedSampler-11415
  If `pEmbeddedSampler` is a valid pointer to a VkSamplerCreateInfo, and there is a VkDebugUtilsObjectNameInfoEXT structure in its `pNext` chain, its `objectType` must be VK_OBJECT_TYPE_UNKNOWN

- VUID-VkDescriptorMappingSourceIndirectIndexArrayEXT-pEmbeddedSampler-12432
  If `pEmbeddedSampler` is a valid pointer to a VkSamplerCreateInfo, the VkSamplerCreateInfo::`pNext` chain must not contain VkOpaqueCaptureDescriptorDataCreateInfoEXT

Valid Usage (Implicit)

- VUID-VkDescriptorMappingSourceIndirectIndexArrayEXT-pEmbeddedSampler-parameter
  If `pEmbeddedSampler` is not `NULL`, `pEmbeddedSampler` must be a valid pointer to a valid VkSamplerCreateInfo structure

The `VkDescriptorMappingSourceHeapDataEXT` structure is defined as:

    // Provided by VK_EXT_descriptor_heap
    typedef struct VkDescriptorMappingSourceHeapDataEXT {
        uint32_t    heapOffset;
        uint32_t    pushOffset;
    } VkDescriptorMappingSourceHeapDataEXT;

- `heapOffset` is a constant byte offset added to the heap address for the mapped buffer.

- `pushOffset` is an index into push data where an additional offset into the heap for the mapped resource will be retrieved.

Uniform buffers using this mapping will be backed directly by data in the heap. Accessing data in the uniform buffer at an offset of shaderOffset in the shader will access heap data at an offset equal to

  offset = shaderOffset + heapOffset + ((uint32_t*)pPushData)[pushOffset/4]

where pPushData is the total set of push data specified by vkCmdPushDataEXT. Shader reads through the heap mapped in this way are performed according to the mapped resource.

Valid Usage

- VUID-VkDescriptorMappingSourceHeapDataEXT-heapOffset-11263
  `heapOffset` must be a multiple of `minUniformBufferOffsetAlignment`

- VUID-VkDescriptorMappingSourceHeapDataEXT-pushOffset-11264
  `pushOffset` must be a multiple of 4

- VUID-VkDescriptorMappingSourceHeapDataEXT-pushOffset-11265
  `pushOffset` must be less than or equal to `maxPushDataSize` - 4

The `VkDescriptorMappingSourceIndirectAddressEXT` structure is defined as:

    // Provided by VK_EXT_descriptor_heap
    typedef struct VkDescriptorMappingSourceIndirectAddressEXT {
        uint32_t    pushOffset;
        uint32_t    addressOffset;
    } VkDescriptorMappingSourceIndirectAddressEXT;

- `pushOffset` is a byte offset into push data where an indirect address containing the address for the mapped resource will be retrieved.

- `addressOffset` is a byte offset into the indirect address where the address for the mapped resource will be retrieved.

Accessing data via the mapped resource in the shader will access data backing the address specified in the indirect address at the supplied offset:

  indirectAddress = ((VkDeviceAddress*)pPushData)[pushOffset/8]

  resourceAddress = ((VkDeviceAddress*)indirectAddress)[addressOffset/8]

where pPushData is the total set of push data specified by vkCmdPushDataEXT. Reads through indirectAddress are performed as non-volatile uniform buffer reads, and can be synchronized using VK_ACCESS_2_UNIFORM_READ_BIT. Shader reads through resourceAddress are performed according to the mapped resource. If the shader resource is an acceleration structure, the address must be a valid acceleration structure address.

Valid Usage

- VUID-VkDescriptorMappingSourceIndirectAddressEXT-pushOffset-11266
  `pushOffset` must be a multiple of 8

- VUID-VkDescriptorMappingSourceIndirectAddressEXT-pushOffset-11267
  `pushOffset` must be less than or equal to `maxPushDataSize` - 8

- VUID-VkDescriptorMappingSourceIndirectAddressEXT-addressOffset-11268
  `addressOffset` must be a multiple of 8

The `VkDescriptorMappingSourceShaderRecordIndexEXT` structure is defined as:

    // Provided by VK_EXT_descriptor_heap
    typedef struct VkDescriptorMappingSourceShaderRecordIndexEXT {
        uint32_t                      heapOffset;
        uint32_t                      shaderRecordOffset;
        uint32_t                      heapIndexStride;
        uint32_t                      heapArrayStride;
        const VkSamplerCreateInfo*    pEmbeddedSampler;
        VkBool32                      useCombinedImageSamplerIndex;
        uint32_t                      samplerHeapOffset;
        uint32_t                      samplerShaderRecordOffset;
        uint32_t                      samplerHeapIndexStride;
        uint32_t                      samplerHeapArrayStride;
    } VkDescriptorMappingSourceShaderRecordIndexEXT;

- `heapOffset` is a constant byte offset added to the heap address for the mapped resource or sampler.

- `shaderRecordOffset` is an index into shader record data where an index into the heap for the mapped resource will be retrieved.

- `heapIndexStride` is a constant byte stride that multiplies the index in shader record data.

- `heapArrayStride` is a constant byte stride that multiplies the shader binding and array index.

- `pEmbeddedSampler` is an optional VkSamplerCreateInfo structure specifying a sampler to embed into the shader, in place of looking the sampler up in a heap.

- `useCombinedImageSamplerIndex` specifies whether the generated index value will be decoded as two packed indices if the mapped resource is an `OpTypeSampledImage`.

- `samplerHeapOffset` is used only when mapping a combined image sampler, used in place of `heapOffset` to retrieve the sampler.

- `samplerShaderRecordOffset` is used only when mapping a combined image sampler, used in place of `shaderRecordOffset` to retrieve the sampler.

- `samplerHeapIndexStride` is used only when mapping a combined image sampler, used in place of `heapIndexStride` to retrieve the sampler.

- `samplerHeapArrayStride` is used only when mapping a combined image sampler, used in place of `heapArrayStride` to retrieve the sampler.

Resources using this mapping will be backed by a descriptor in the heap, at an offset calculated as

  shaderRecordIndex = ((uint32_t*)pShaderRecordData)[shaderRecordOffset/4]

  shaderIndex = (Binding - firstBinding) + arrayIndex

  offset = heapOffset + (shaderRecordIndex × heapIndexStride) + (shaderIndex × heapArrayStride)

where Binding is the binding value in the shader, arrayIndex is the index into the array if the shader binding is declared as an array, and pShaderRecordData is the set of shader record data accessible to the shader.

If the mapped resource is a `OpTypeSampledImage`, offset is instead calculated for the sampler as

  samplerShaderRecordIndex = ((uint32_t*)pShaderRecordData)[samplerShaderRecordOffset/4]

  offset = samplerHeapOffset + (samplerShaderRecordIndex × samplerHeapIndexStride) + (shaderIndex × samplerHeapArrayStride)

If `useCombinedImageSamplerIndex` is VK_TRUE, and the mapped resource is a `OpTypeSampledImage`, shaderRecordIndex and samplerShaderRecordIndex in the above equations are instead calculated as

  shaderRecordIndex = ((uint32_t*)pShaderRecordData)[shaderRecordOffset/4] & 0xFFFFF

  samplerShaderRecordIndex = (((uint32_t*)pShaderRecordData)[shaderRecordOffset/4] >> 20) & 0xFFF

If the mapped resource is a `OpTypeSampler` or `OpTypeSampledImage`, and `pEmbeddedSampler` is not `NULL`, the specified embedded sampler will be used rather than accessing the sampler heap.

Valid Usage

- VUID-VkDescriptorMappingSourceShaderRecordIndexEXT-shaderRecordOffset-11269
  `shaderRecordOffset` must be a multiple of 4

- VUID-VkDescriptorMappingSourceShaderRecordIndexEXT-shaderRecordOffset-11270
  `shaderRecordOffset` must be less than or equal to `maxShaderGroupStride` - 4

- VUID-VkDescriptorMappingSourceShaderRecordIndexEXT-pEmbeddedSampler-11445
  If `pEmbeddedSampler` is a valid pointer to a VkSamplerCreateInfo, its `borderColor` must not be VK_BORDER_COLOR_FLOAT_CUSTOM_EXT or VK_BORDER_COLOR_INT_CUSTOM_EXT

- VUID-VkDescriptorMappingSourceShaderRecordIndexEXT-pEmbeddedSampler-11415
  If `pEmbeddedSampler` is a valid pointer to a VkSamplerCreateInfo, and there is a VkDebugUtilsObjectNameInfoEXT structure in its `pNext` chain, its `objectType` must be VK_OBJECT_TYPE_UNKNOWN

- VUID-VkDescriptorMappingSourceShaderRecordIndexEXT-pEmbeddedSampler-12432
  If `pEmbeddedSampler` is a valid pointer to a VkSamplerCreateInfo, the VkSamplerCreateInfo::`pNext` chain must not contain VkOpaqueCaptureDescriptorDataCreateInfoEXT

Valid Usage (Implicit)

- VUID-VkDescriptorMappingSourceShaderRecordIndexEXT-pEmbeddedSampler-parameter
  If `pEmbeddedSampler` is not `NULL`, `pEmbeddedSampler` must be a valid pointer to a valid VkSamplerCreateInfo structure

### 16.4. Packing descriptors more tightly

For simplicity, descriptor sizes are advertised and treated by default as equal to the advertised descriptor size limits:

- `samplerDescriptorSize`

- `bufferDescriptorSize`

- `imageDescriptorSize`

- `tensorDescriptorSize`

However, for some specific use cases it is useful to be able to pack specific descriptors into memory more tightly than this when the implementation allows for this.

To query the size of heap descriptor for a specific VkDescriptorType, call:

    // Provided by VK_EXT_descriptor_heap
    VkDeviceSize vkGetPhysicalDeviceDescriptorSizeEXT(
        VkPhysicalDevice                            physicalDevice,
        VkDescriptorType                            descriptorType);

- `physicalDevice` is the physical device from which to query the descriptor sizes.

- `descriptorType` is a VkDescriptorType specifying the type of heap descriptor to query the size for.

The return value of this function will be a VkDeviceSize indicating the size in bytes (N) of a heap descriptor with a type equal to `descriptorType`. When a descriptor of this type is written by vkWriteResourceDescriptorsEXT or vkWriteSamplerDescriptorsEXT, only the first N bytes are written; the rest will not be accessed and can be safely discarded when copying descriptors around. Additionally, those first N bytes are the only bytes that will be accessed when the descriptor is accessed in the shader. N will never be larger than the applicable limits in VkPhysicalDeviceDescriptorHeapTensorPropertiesARM or VkPhysicalDeviceDescriptorHeapPropertiesEXT.

Note | Values returned by this function may be non power-of-two.

Note | This command is not intended for general use, and is for tools that already take advantage of tighter packing with other similar features (e.g. `VK_EXT_descriptor_buffer`) to optimize accesses in some cases. Applications can safely ignore this function and are advised to do so, to avoid depending on non-portable packing.

Valid Usage

- VUID-vkGetPhysicalDeviceDescriptorSizeEXT-type-11362
  `type` must be one of VK_DESCRIPTOR_TYPE_SAMPLER, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER, VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR, VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV, VK_DESCRIPTOR_TYPE_PARTITIONED_ACCELERATION_STRUCTURE_NV, VK_DESCRIPTOR_TYPE_TENSOR_ARM, or VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT

Valid Usage (Implicit)

- VUID-vkGetPhysicalDeviceDescriptorSizeEXT-physicalDevice-parameter
  `physicalDevice` must be a valid VkPhysicalDevice handle

- VUID-vkGetPhysicalDeviceDescriptorSizeEXT-descriptorType-parameter
  `descriptorType` must be a valid VkDescriptorType value

## 17. Descriptor Sets

A descriptor set object is an opaque object containing storage for a set of descriptors, where the types and number of descriptors is defined by a descriptor set layout. The layout object may be used to define the association of each descriptor binding with memory or other implementation resources. The layout is used both for determining the resources that need to be associated with the descriptor set, and determining the interface between shader stages and shader resources.

### 17.1. Descriptor Set Layout

A descriptor set layout object is defined by an array of zero or more descriptor bindings. Each individual descriptor binding is specified by a descriptor type, a count (array size) of the number of descriptors in the binding, a set of shader stages that can access the binding, and (if using immutable samplers) an array of sampler descriptors.

Descriptor set layout objects are represented by `VkDescriptorSetLayout` handles:

    // Provided by VK_VERSION_1_0
    VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorSetLayout)

To create descriptor set layout objects, call:

    // Provided by VK_VERSION_1_0
    VkResult vkCreateDescriptorSetLayout(
        VkDevice                                    device,
        const VkDescriptorSetLayoutCreateInfo*      pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkDescriptorSetLayout*                      pSetLayout);

- `device` is the logical device that creates the descriptor set layout.

- `pCreateInfo` is a pointer to a VkDescriptorSetLayoutCreateInfo structure specifying the state of the descriptor set layout object.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

- `pSetLayout` is a pointer to a VkDescriptorSetLayout handle in which the resulting descriptor set layout object is returned.

Valid Usage

- VUID-vkCreateDescriptorSetLayout-support-09582
  If the descriptor layout exceeds the limits reported through the physical device limits, then vkGetDescriptorSetLayoutSupport must have returned VkDescriptorSetLayoutSupport with `support` equal to VK_TRUE for `pCreateInfo`

Valid Usage (Implicit)

- VUID-vkCreateDescriptorSetLayout-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkCreateDescriptorSetLayout-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkDescriptorSetLayoutCreateInfo structure

- VUID-vkCreateDescriptorSetLayout-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateDescriptorSetLayout-pSetLayout-parameter
  `pSetLayout` must be a valid pointer to a VkDescriptorSetLayout handle

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

Information about the descriptor set layout is passed in a `VkDescriptorSetLayoutCreateInfo` structure:

    // Provided by VK_VERSION_1_0
    typedef struct VkDescriptorSetLayoutCreateInfo {
        VkStructureType                        sType;
        const void*                            pNext;
        VkDescriptorSetLayoutCreateFlags       flags;
        uint32_t                               bindingCount;
        const VkDescriptorSetLayoutBinding*    pBindings;
    } VkDescriptorSetLayoutCreateInfo;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask of VkDescriptorSetLayoutCreateFlagBits specifying options for descriptor set layout creation.

- `bindingCount` is the number of elements in `pBindings`.

- `pBindings` is a pointer to an array of VkDescriptorSetLayoutBinding structures.

Valid Usage

- VUID-VkDescriptorSetLayoutCreateInfo-binding-00279
  If the `perStageDescriptorSet` feature is not enabled, or `flags` does not contain VK_DESCRIPTOR_SET_LAYOUT_CREATE_PER_STAGE_BIT_NV, then the VkDescriptorSetLayoutBinding::`binding` members of the elements of the `pBindings` array must each have different values

- VUID-VkDescriptorSetLayoutCreateInfo-flags-10354
  If `flags` contains VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT, and the VK_KHR_push_descriptor extension is not enabled, `pushDescriptor` must be enabled

- VUID-VkDescriptorSetLayoutCreateInfo-flags-00280
  If `flags` contains VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT, then all elements of `pBindings` must not have a `descriptorType` of VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC or VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC

- VUID-VkDescriptorSetLayoutCreateInfo-flags-02208
  If `flags` contains VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT, then all elements of `pBindings` must not have a `descriptorType` of VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK

- VUID-VkDescriptorSetLayoutCreateInfo-flags-00281
  If `flags` contains VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT, then the total number of elements of all bindings must be less than or equal to VkPhysicalDevicePushDescriptorProperties::`maxPushDescriptors`

- VUID-VkDescriptorSetLayoutCreateInfo-flags-04590
  If `flags` contains VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT, `flags` must not contain VK_DESCRIPTOR_SET_LAYOUT_CREATE_HOST_ONLY_POOL_BIT_EXT

- VUID-VkDescriptorSetLayoutCreateInfo-flags-04591
  If `flags` contains VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT, `pBindings` must not have a `descriptorType` of VK_DESCRIPTOR_TYPE_MUTABLE_EXT

- VUID-VkDescriptorSetLayoutCreateInfo-flags-03000
  If any binding has the VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT bit set, `flags` must include VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT

- VUID-VkDescriptorSetLayoutCreateInfo-descriptorType-03001
  If any binding has the VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT bit set, then all bindings must not have `descriptorType` of VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC or VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC

- VUID-VkDescriptorSetLayoutCreateInfo-flags-04592
  If `flags` contains VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT, `flags` must not contain VK_DESCRIPTOR_SET_LAYOUT_CREATE_HOST_ONLY_POOL_BIT_EXT

- VUID-VkDescriptorSetLayoutCreateInfo-pBindings-07303
  If any element `pBindings`[i] has a `descriptorType` of VK_DESCRIPTOR_TYPE_MUTABLE_EXT, then the `pNext` chain must include a VkMutableDescriptorTypeCreateInfoEXT structure, and `mutableDescriptorTypeListCount` must be greater than i

- VUID-VkDescriptorSetLayoutCreateInfo-descriptorType-04594
  If a binding has a `descriptorType` value of VK_DESCRIPTOR_TYPE_MUTABLE_EXT, then `pImmutableSamplers` must be `NULL`

- VUID-VkDescriptorSetLayoutCreateInfo-mutableDescriptorType-04595
  If VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT::`mutableDescriptorType` is not enabled, `pBindings` must not contain a `descriptorType` of VK_DESCRIPTOR_TYPE_MUTABLE_EXT

- VUID-VkDescriptorSetLayoutCreateInfo-flags-04596
  If `flags` contains VK_DESCRIPTOR_SET_LAYOUT_CREATE_HOST_ONLY_POOL_BIT_EXT, VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT::`mutableDescriptorType` must be enabled

- VUID-VkDescriptorSetLayoutCreateInfo-flags-08000
  If `flags` contains VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, then all elements of `pBindings` must not have a `descriptorType` of VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC or VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC

- VUID-VkDescriptorSetLayoutCreateInfo-flags-08001
  If `flags` contains VK_DESCRIPTOR_SET_LAYOUT_CREATE_EMBEDDED_IMMUTABLE_SAMPLERS_BIT_EXT, `flags` must also contain VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-VkDescriptorSetLayoutCreateInfo-flags-08002
  If `flags` contains VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, then `flags` must not contain VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT

- VUID-VkDescriptorSetLayoutCreateInfo-flags-08003
  If `flags` contains VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, then `flags` must not contain VK_DESCRIPTOR_SET_LAYOUT_CREATE_HOST_ONLY_POOL_BIT_EXT

- VUID-VkDescriptorSetLayoutCreateInfo-flags-09463
  If `flags` contains VK_DESCRIPTOR_SET_LAYOUT_CREATE_PER_STAGE_BIT_NV, then `perStageDescriptorSet` must be enabled

- VUID-VkDescriptorSetLayoutCreateInfo-flags-09464
  If `flags` contains VK_DESCRIPTOR_SET_LAYOUT_CREATE_PER_STAGE_BIT_NV, then there must not be any two elements of the `pBindings` array with the same VkDescriptorSetLayoutBinding::`binding` value and their VkDescriptorSetLayoutBinding::`stageFlags` containing the same bit

Valid Usage (Implicit)

- VUID-VkDescriptorSetLayoutCreateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO

- VUID-VkDescriptorSetLayoutCreateInfo-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkDescriptorSetLayoutBindingFlagsCreateInfo or VkMutableDescriptorTypeCreateInfoEXT

- VUID-VkDescriptorSetLayoutCreateInfo-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkDescriptorSetLayoutCreateInfo-flags-parameter
  `flags` must be a valid combination of VkDescriptorSetLayoutCreateFlagBits values

- VUID-VkDescriptorSetLayoutCreateInfo-pBindings-parameter
  If `bindingCount` is not `0`, `pBindings` must be a valid pointer to an array of `bindingCount` valid VkDescriptorSetLayoutBinding structures

If the `pNext` chain of a VkDescriptorSetLayoutCreateInfo or VkDescriptorPoolCreateInfo structure includes a VkMutableDescriptorTypeCreateInfoEXT structure, then that structure specifies Information about the possible descriptor types for mutable descriptor types.

The `VkMutableDescriptorTypeCreateInfoEXT` structure is defined as:

Warning | This functionality is superseded by VK_EXT_descriptor_heap. See Legacy Functionality for more information.

    // Provided by VK_EXT_mutable_descriptor_type
    typedef struct VkMutableDescriptorTypeCreateInfoEXT {
        VkStructureType                          sType;
        const void*                              pNext;
        uint32_t                                 mutableDescriptorTypeListCount;
        const VkMutableDescriptorTypeListEXT*    pMutableDescriptorTypeLists;
    } VkMutableDescriptorTypeCreateInfoEXT;

    // Provided by VK_VALVE_mutable_descriptor_type
    // Equivalent to VkMutableDescriptorTypeCreateInfoEXT
    typedef VkMutableDescriptorTypeCreateInfoEXT VkMutableDescriptorTypeCreateInfoVALVE;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `mutableDescriptorTypeListCount` is the number of elements in `pMutableDescriptorTypeLists`.

- `pMutableDescriptorTypeLists` is a pointer to an array of `VkMutableDescriptorTypeListEXT` structures.

If `mutableDescriptorTypeListCount` is zero or if this structure is not included in the `pNext` chain, the VkMutableDescriptorTypeListEXT for each element is considered to be zero or `NULL` for each member. Otherwise, the descriptor set layout binding at VkDescriptorSetLayoutCreateInfo::`pBindings`[i] uses the descriptor type lists in VkMutableDescriptorTypeCreateInfoEXT::`pMutableDescriptorTypeLists`[i].

Valid Usage (Implicit)

- VUID-VkMutableDescriptorTypeCreateInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_EXT

- VUID-VkMutableDescriptorTypeCreateInfoEXT-pMutableDescriptorTypeLists-parameter
  If `mutableDescriptorTypeListCount` is not `0`, `pMutableDescriptorTypeLists` must be a valid pointer to an array of `mutableDescriptorTypeListCount` valid VkMutableDescriptorTypeListEXT structures

Structure Chaining

Extends the structures

  - VkDescriptorPoolCreateInfo

  - VkDescriptorSetLayoutCreateInfo

The list of potential descriptor types a given mutable descriptor can mutate to is passed in a `VkMutableDescriptorTypeListEXT` structure.

The `VkMutableDescriptorTypeListEXT` structure is defined as:

Warning | This functionality is superseded by VK_EXT_descriptor_heap. See Legacy Functionality for more information.

    // Provided by VK_EXT_mutable_descriptor_type
    typedef struct VkMutableDescriptorTypeListEXT {
        uint32_t                   descriptorTypeCount;
        const VkDescriptorType*    pDescriptorTypes;
    } VkMutableDescriptorTypeListEXT;

    // Provided by VK_VALVE_mutable_descriptor_type
    // Equivalent to VkMutableDescriptorTypeListEXT
    typedef VkMutableDescriptorTypeListEXT VkMutableDescriptorTypeListVALVE;

- `descriptorTypeCount` is the number of elements in `pDescriptorTypes`.

- `pDescriptorTypes` is `NULL` or a pointer to an array of `descriptorTypeCount` VkDescriptorType values defining which descriptor types a given binding may mutate to.

Valid Usage

- VUID-VkMutableDescriptorTypeListEXT-descriptorTypeCount-04597
  `descriptorTypeCount` must not be `0` if the corresponding binding is of VK_DESCRIPTOR_TYPE_MUTABLE_EXT

- VUID-VkMutableDescriptorTypeListEXT-pDescriptorTypes-04598
  `pDescriptorTypes` must be a valid pointer to an array of `descriptorTypeCount` valid, unique VkDescriptorType values if the given binding is of VK_DESCRIPTOR_TYPE_MUTABLE_EXT type

- VUID-VkMutableDescriptorTypeListEXT-descriptorTypeCount-04599
  `descriptorTypeCount` must be `0` if the corresponding binding is not of VK_DESCRIPTOR_TYPE_MUTABLE_EXT

- VUID-VkMutableDescriptorTypeListEXT-pDescriptorTypes-04600
  `pDescriptorTypes` must not contain VK_DESCRIPTOR_TYPE_MUTABLE_EXT

- VUID-VkMutableDescriptorTypeListEXT-pDescriptorTypes-04601
  `pDescriptorTypes` must not contain VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC

- VUID-VkMutableDescriptorTypeListEXT-pDescriptorTypes-04602
  `pDescriptorTypes` must not contain VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC

- VUID-VkMutableDescriptorTypeListEXT-pDescriptorTypes-04603
  `pDescriptorTypes` must not contain VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK

- VUID-VkMutableDescriptorTypeListEXT-pDescriptorTypes-09696
  `pDescriptorTypes` must not contain VK_DESCRIPTOR_TYPE_TENSOR_ARM

Valid Usage (Implicit)

- VUID-VkMutableDescriptorTypeListEXT-pDescriptorTypes-parameter
  If `descriptorTypeCount` is not `0`, `pDescriptorTypes` must be a valid pointer to an array of `descriptorTypeCount` valid VkDescriptorType values

Bits which can be set in VkDescriptorSetLayoutCreateInfo::`flags`, specifying options for descriptor set layout, are:

    // Provided by VK_VERSION_1_0
    typedef enum VkDescriptorSetLayoutCreateFlagBits {
      // Provided by VK_VERSION_1_2
        VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT = 0x00000002,
      // Provided by VK_VERSION_1_4
        VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT = 0x00000001,
      // Provided by VK_EXT_descriptor_buffer
        VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT = 0x00000010,
      // Provided by VK_EXT_descriptor_buffer
        VK_DESCRIPTOR_SET_LAYOUT_CREATE_EMBEDDED_IMMUTABLE_SAMPLERS_BIT_EXT = 0x00000020,
      // Provided by VK_NV_device_generated_commands_compute
        VK_DESCRIPTOR_SET_LAYOUT_CREATE_INDIRECT_BINDABLE_BIT_NV = 0x00000080,
      // Provided by VK_EXT_mutable_descriptor_type
        VK_DESCRIPTOR_SET_LAYOUT_CREATE_HOST_ONLY_POOL_BIT_EXT = 0x00000004,
      // Provided by VK_NV_per_stage_descriptor_set
        VK_DESCRIPTOR_SET_LAYOUT_CREATE_PER_STAGE_BIT_NV = 0x00000040,
      // Provided by VK_KHR_push_descriptor
        VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR = VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT,
      // Provided by VK_EXT_descriptor_indexing
        VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT_EXT = VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT,
      // Provided by VK_VALVE_mutable_descriptor_type
        VK_DESCRIPTOR_SET_LAYOUT_CREATE_HOST_ONLY_POOL_BIT_VALVE = VK_DESCRIPTOR_SET_LAYOUT_CREATE_HOST_ONLY_POOL_BIT_EXT,
    } VkDescriptorSetLayoutCreateFlagBits;

- VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT specifies that descriptor sets must not be allocated using this layout, and descriptors are instead pushed by vkCmdPushDescriptorSet.

- VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT specifies that descriptor sets using this layout must be allocated from a descriptor pool created with the VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT bit set. Descriptor set layouts created with this bit set have alternate limits for the maximum number of descriptors per-stage and per-pipeline layout. The non-UpdateAfterBind limits only count descriptors in sets created without this flag. The UpdateAfterBind limits count all descriptors, but the limits may be higher than the non-UpdateAfterBind limits.

- VK_DESCRIPTOR_SET_LAYOUT_CREATE_INDIRECT_BINDABLE_BIT_NV specifies that descriptor sets using this layout allows them to be bound with compute pipelines that are created with VK_PIPELINE_CREATE_INDIRECT_BINDABLE_BIT_NV flag set to be used in Device-Generated Commands.

- VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT specifies that this layout must only be used with descriptor buffers.

- VK_DESCRIPTOR_SET_LAYOUT_CREATE_EMBEDDED_IMMUTABLE_SAMPLERS_BIT_EXT specifies that this is a layout only containing immutable samplers that can be bound by vkCmdBindDescriptorBufferEmbeddedSamplersEXT. Unlike normal immutable samplers, embedded immutable samplers do not require the application to provide them in a descriptor buffer.

- VK_DESCRIPTOR_SET_LAYOUT_CREATE_HOST_ONLY_POOL_BIT_EXT specifies that descriptor sets using this layout must be allocated from a descriptor pool created with the VK_DESCRIPTOR_POOL_CREATE_HOST_ONLY_BIT_EXT bit set. Descriptor set layouts created with this bit have no expressible limit for maximum number of descriptors per-stage. Host descriptor sets are limited only by available host memory, but may be limited for implementation specific reasons. Implementations may limit the number of supported descriptors to UpdateAfterBind limits or non-UpdateAfterBind limits, whichever is larger.

- VK_DESCRIPTOR_SET_LAYOUT_CREATE_PER_STAGE_BIT_NV specifies that binding numbers in descriptor sets using this layout may represent different resources and/or types of resources in each stage.

    // Provided by VK_VERSION_1_0
    typedef VkFlags VkDescriptorSetLayoutCreateFlags;

`VkDescriptorSetLayoutCreateFlags` is a bitmask type for setting a mask of zero or more VkDescriptorSetLayoutCreateFlagBits.

The `VkDescriptorSetLayoutBinding` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkDescriptorSetLayoutBinding {
        uint32_t              binding;
        VkDescriptorType      descriptorType;
        uint32_t              descriptorCount;
        VkShaderStageFlags    stageFlags;
        const VkSampler*      pImmutableSamplers;
    } VkDescriptorSetLayoutBinding;

- `binding` is the binding number of this entry and corresponds to a resource of the same binding number in the shader stages.

- `descriptorType` is a VkDescriptorType specifying which type of resource descriptors are used for this binding.

- `descriptorCount` is the number of descriptors contained in the binding, accessed in a shader as an array, except if `descriptorType` is VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK in which case `descriptorCount` is the size in bytes of the inline uniform block. If `descriptorCount` is zero this binding entry is reserved and the resource must not be accessed from any stage via this binding within any pipeline using the set layout.

- `stageFlags` member is a bitmask of VkShaderStageFlagBits specifying which pipeline shader stages can access a resource for this binding. VK_SHADER_STAGE_ALL is a shorthand specifying that all defined shader stages, including any additional stages defined by extensions, can access the resource.

  If a shader stage is not included in `stageFlags`, then a resource must not be accessed from that stage via this binding within any pipeline using the set layout. Other than input attachments which are limited to the fragment shader, there are no limitations on what combinations of stages can use a descriptor binding, and in particular a binding can be used by both graphics stages and the compute stage.

- `pImmutableSamplers` affects initialization of samplers. If `descriptorType` specifies a VK_DESCRIPTOR_TYPE_SAMPLER or VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER type descriptor, then `pImmutableSamplers` can be used to initialize a set of immutable samplers. Immutable samplers are permanently bound into the set layout and must not be changed; updating a VK_DESCRIPTOR_TYPE_SAMPLER descriptor with immutable samplers is not allowed and updates to a VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER descriptor with immutable samplers does not modify the samplers (the image views are updated, but the sampler updates are ignored). If `pImmutableSamplers` is not `NULL`, then it is a pointer to an array of sampler handles that will be copied into the set layout and used for the corresponding binding. Only the sampler handles are copied; the sampler objects must not be destroyed before the final use of the set layout and any descriptor pools and sets created using it. If `pImmutableSamplers` is `NULL`, then the sampler slots are dynamic and sampler handles must be bound into descriptor sets using this layout. If `descriptorType` is not one of these descriptor types, then `pImmutableSamplers` is ignored.

The above layout definition allows the descriptor bindings to be specified sparsely such that not all binding numbers between 0 and the maximum binding number need to be specified in the `pBindings` array. Bindings that are not specified have a `descriptorCount` and `stageFlags` of zero, and the value of `descriptorType` is undefined. However, all binding numbers between 0 and the maximum binding number in the VkDescriptorSetLayoutCreateInfo::`pBindings` array may consume memory in the descriptor set layout even if not all descriptor bindings are used, though it should not consume additional memory from the descriptor pool.

Note | The maximum binding number specified should be as compact as possible to avoid wasted memory.

Valid Usage

- VUID-VkDescriptorSetLayoutBinding-descriptorType-00282
  If `descriptorType` is VK_DESCRIPTOR_TYPE_SAMPLER or VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, and `descriptorCount` is not `0` and `pImmutableSamplers` is not `NULL`, `pImmutableSamplers` must be a valid pointer to an array of `descriptorCount` valid `VkSampler` handles

- VUID-VkDescriptorSetLayoutBinding-descriptorType-12200
  If `descriptorType` is VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, and `descriptorCount` is not `0` and `pImmutableSamplers` is not `NULL`, either each element of `pImmutableSamplers` must be a `VkSampler` that enables sampler Y′CBCR conversion or none of them enable sampler Y′CBCR conversion

- VUID-VkDescriptorSetLayoutBinding-descriptorType-12215
  If `descriptorType` is VK_DESCRIPTOR_TYPE_SAMPLER, each element of `pImmutableSamplers` must not be a `VkSampler` object that enables sampler Y′CBCR conversion

- VUID-VkDescriptorSetLayoutBinding-descriptorType-04604
  If the `inlineUniformBlock` feature is not enabled, `descriptorType` must not be VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK

- VUID-VkDescriptorSetLayoutBinding-descriptorType-02209
  If `descriptorType` is VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK then `descriptorCount` must be a multiple of `4`

- VUID-VkDescriptorSetLayoutBinding-descriptorType-08004
  If `descriptorType` is VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK and VkDescriptorSetLayoutCreateInfo::`flags` does not contain VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT then `descriptorCount` must be less than or equal to `VkPhysicalDeviceInlineUniformBlockProperties`::`maxInlineUniformBlockSize`

- VUID-VkDescriptorSetLayoutBinding-flags-08005
  If VkDescriptorSetLayoutCreateInfo::`flags` contains VK_DESCRIPTOR_SET_LAYOUT_CREATE_EMBEDDED_IMMUTABLE_SAMPLERS_BIT_EXT, `descriptorType` must be VK_DESCRIPTOR_TYPE_SAMPLER

- VUID-VkDescriptorSetLayoutBinding-flags-08006
  If VkDescriptorSetLayoutCreateInfo::`flags` contains VK_DESCRIPTOR_SET_LAYOUT_CREATE_EMBEDDED_IMMUTABLE_SAMPLERS_BIT_EXT, `descriptorCount` must be less than or equal to `1`

- VUID-VkDescriptorSetLayoutBinding-flags-08007
  If VkDescriptorSetLayoutCreateInfo::`flags` contains VK_DESCRIPTOR_SET_LAYOUT_CREATE_EMBEDDED_IMMUTABLE_SAMPLERS_BIT_EXT, and `descriptorCount` is equal to `1`, `pImmutableSamplers` must not be `NULL`

- VUID-VkDescriptorSetLayoutBinding-descriptorCount-09465
  If `descriptorCount` is not `0`, `stageFlags` must be VK_SHADER_STAGE_ALL or a valid combination of other VkShaderStageFlagBits values

- VUID-VkDescriptorSetLayoutBinding-descriptorType-01510
  If `descriptorType` is VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT and `descriptorCount` is not `0`, then `stageFlags` must be `0` or VK_SHADER_STAGE_FRAGMENT_BIT

- VUID-VkDescriptorSetLayoutBinding-pImmutableSamplers-04009
  The sampler objects indicated by `pImmutableSamplers` must not have a `borderColor` with one of the values VK_BORDER_COLOR_FLOAT_CUSTOM_EXT or VK_BORDER_COLOR_INT_CUSTOM_EXT

- VUID-VkDescriptorSetLayoutBinding-descriptorType-04605
  If `descriptorType` is VK_DESCRIPTOR_TYPE_MUTABLE_EXT, then `pImmutableSamplers` must be `NULL`

- VUID-VkDescriptorSetLayoutBinding-flags-09466
  If VkDescriptorSetLayoutCreateInfo::`flags` contains VK_DESCRIPTOR_SET_LAYOUT_CREATE_PER_STAGE_BIT_NV, and `descriptorCount` is not `0`, then `stageFlags` must be a valid combination of VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT, VK_SHADER_STAGE_GEOMETRY_BIT, VK_SHADER_STAGE_FRAGMENT_BIT and VK_SHADER_STAGE_COMPUTE_BIT values

Valid Usage (Implicit)

- VUID-VkDescriptorSetLayoutBinding-descriptorType-parameter
  `descriptorType` must be a valid VkDescriptorType value

If the `pNext` chain of a VkDescriptorSetLayoutCreateInfo structure includes a VkDescriptorSetLayoutBindingFlagsCreateInfo structure, then that structure includes an array of flags, one for each descriptor set layout binding.

The VkDescriptorSetLayoutBindingFlagsCreateInfo structure is defined as:

    // Provided by VK_VERSION_1_2
    typedef struct VkDescriptorSetLayoutBindingFlagsCreateInfo {
        VkStructureType                    sType;
        const void*                        pNext;
        uint32_t                           bindingCount;
        const VkDescriptorBindingFlags*    pBindingFlags;
    } VkDescriptorSetLayoutBindingFlagsCreateInfo;

    // Provided by VK_EXT_descriptor_indexing
    // Equivalent to VkDescriptorSetLayoutBindingFlagsCreateInfo
    typedef VkDescriptorSetLayoutBindingFlagsCreateInfo VkDescriptorSetLayoutBindingFlagsCreateInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `bindingCount` is zero or the number of elements in `pBindingFlags`.

- `pBindingFlags` is a pointer to an array of VkDescriptorBindingFlags bitfields, one for each descriptor set layout binding.

If `bindingCount` is zero or if this structure is not included in the `pNext` chain, the VkDescriptorBindingFlags for each descriptor set layout binding is considered to be zero. Otherwise, the descriptor set layout binding at VkDescriptorSetLayoutCreateInfo::`pBindings`[i] uses the flags in `pBindingFlags`[i].

Valid Usage

- VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-bindingCount-03002
  If `bindingCount` is not zero, `bindingCount` must equal VkDescriptorSetLayoutCreateInfo::`bindingCount`

- VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-flags-03003
  If VkDescriptorSetLayoutCreateInfo::`flags` includes VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT, then all elements of `pBindingFlags` must not include VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT, VK_DESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT, or VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT

- VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-pBindingFlags-03004
  If an element of `pBindingFlags` includes VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT, then it must be the element with the highest `binding` number

- VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-descriptorBindingUniformBufferUpdateAfterBind-03005
  If VkPhysicalDeviceDescriptorIndexingFeatures::`descriptorBindingUniformBufferUpdateAfterBind` is not enabled, all bindings with descriptor type VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER must not use VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT

- VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-descriptorBindingSampledImageUpdateAfterBind-03006
  If VkPhysicalDeviceDescriptorIndexingFeatures::`descriptorBindingSampledImageUpdateAfterBind` is not enabled, all bindings with descriptor type VK_DESCRIPTOR_TYPE_SAMPLER, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, or VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE must not use VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT

- VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-descriptorBindingStorageImageUpdateAfterBind-03007
  If VkPhysicalDeviceDescriptorIndexingFeatures::`descriptorBindingStorageImageUpdateAfterBind` is not enabled, all bindings with descriptor type VK_DESCRIPTOR_TYPE_STORAGE_IMAGE must not use VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT

- VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-descriptorBindingStorageBufferUpdateAfterBind-03008
  If VkPhysicalDeviceDescriptorIndexingFeatures::`descriptorBindingStorageBufferUpdateAfterBind` is not enabled, all bindings with descriptor type VK_DESCRIPTOR_TYPE_STORAGE_BUFFER must not use VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT

- VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-descriptorBindingUniformTexelBufferUpdateAfterBind-03009
  If VkPhysicalDeviceDescriptorIndexingFeatures::`descriptorBindingUniformTexelBufferUpdateAfterBind` is not enabled, all bindings with descriptor type VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER must not use VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT

- VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-descriptorBindingStorageTexelBufferUpdateAfterBind-03010
  If VkPhysicalDeviceDescriptorIndexingFeatures::`descriptorBindingStorageTexelBufferUpdateAfterBind` is not enabled, all bindings with descriptor type VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER must not use VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT

- VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-descriptorBindingInlineUniformBlockUpdateAfterBind-02211
  If VkPhysicalDeviceInlineUniformBlockFeatures::`descriptorBindingInlineUniformBlockUpdateAfterBind` is not enabled, all bindings with descriptor type VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK must not use VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT

- VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-descriptorBindingAccelerationStructureUpdateAfterBind-03570
  If VkPhysicalDeviceAccelerationStructureFeaturesKHR::`descriptorBindingAccelerationStructureUpdateAfterBind` is not enabled, all bindings with descriptor type VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR or VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV must not use VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT

- VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-None-03011
  All bindings with descriptor type VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, or VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC must not use VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT

- VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-descriptorBindingUpdateUnusedWhilePending-03012
  If VkPhysicalDeviceDescriptorIndexingFeatures::`descriptorBindingUpdateUnusedWhilePending` is not enabled, all elements of `pBindingFlags` must not include VK_DESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT

- VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-descriptorBindingPartiallyBound-03013
  If VkPhysicalDeviceDescriptorIndexingFeatures::`descriptorBindingPartiallyBound` is not enabled, all elements of `pBindingFlags` must not include VK_DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT

- VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-descriptorBindingVariableDescriptorCount-03014
  If VkPhysicalDeviceDescriptorIndexingFeatures::`descriptorBindingVariableDescriptorCount` is not enabled, all elements of `pBindingFlags` must not include VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT

- VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-pBindingFlags-03015
  If an element of `pBindingFlags` includes VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT, that element’s `descriptorType` must not be VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC or VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC

- VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-descriptorBindingStorageTensorUpdateAfterBind-09697
  If VkPhysicalDeviceTensorFeaturesARM::`descriptorBindingStorageTensorUpdateAfterBind` is not enabled, all bindings with descriptor type VK_DESCRIPTOR_TYPE_TENSOR_ARM must not use VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT

Valid Usage (Implicit)

- VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO

- VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-pBindingFlags-parameter
  If `bindingCount` is not `0`, `pBindingFlags` must be a valid pointer to an array of `bindingCount` valid combinations of VkDescriptorBindingFlagBits values

Structure Chaining

Extends the structure

  - VkDescriptorSetLayoutCreateInfo

Bits which can be set in each element of VkDescriptorSetLayoutBindingFlagsCreateInfo::`pBindingFlags`, specifying options for the corresponding descriptor set layout binding, are:

    // Provided by VK_VERSION_1_2
    typedef enum VkDescriptorBindingFlagBits {
        VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT = 0x00000001,
        VK_DESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT = 0x00000002,
        VK_DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT = 0x00000004,
        VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT = 0x00000008,
      // Provided by VK_EXT_descriptor_indexing
        VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT_EXT = VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT,
      // Provided by VK_EXT_descriptor_indexing
        VK_DESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT_EXT = VK_DESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT,
      // Provided by VK_EXT_descriptor_indexing
        VK_DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT_EXT = VK_DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT,
      // Provided by VK_EXT_descriptor_indexing
        VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT_EXT = VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT,
    } VkDescriptorBindingFlagBits;

    // Provided by VK_EXT_descriptor_indexing
    // Equivalent to VkDescriptorBindingFlagBits
    typedef VkDescriptorBindingFlagBits VkDescriptorBindingFlagBitsEXT;

- VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT specifies that if descriptors in this binding are updated between when the descriptor set is bound in a command buffer and when that command buffer is submitted to a queue, then the submission will use the most recently set descriptors for this binding and the updates do not invalidate the command buffer. Descriptor bindings created with this flag are also partially exempt from the external synchronization requirement in vkUpdateDescriptorSetWithTemplateKHR and vkUpdateDescriptorSets. Multiple descriptors with this flag set can be updated concurrently in different threads, though the same descriptor must not be updated concurrently by two threads. Descriptors with this flag set can be updated concurrently with the set being bound to a command buffer in another thread, but not concurrently with the set being reset or freed.

- VK_DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT specifies that descriptors in this binding that are not dynamically used need not contain valid descriptors at the time the descriptors are consumed. A descriptor is dynamically used if any shader invocation executes an instruction that performs any memory access using the descriptor. If a descriptor is not dynamically used, any resource referenced by the descriptor is not considered to be referenced during command execution.

- VK_DESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT specifies that descriptors in this binding can be updated after a command buffer has bound this descriptor set, or while a command buffer that uses this descriptor set is pending execution, as long as the descriptors that are updated are not used by those command buffers. Descriptor bindings created with this flag are also partially exempt from the external synchronization requirement in vkUpdateDescriptorSetWithTemplateKHR and vkUpdateDescriptorSets in the same way as for VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT. If VK_DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT is also set, then descriptors can be updated as long as they are not dynamically used by any shader invocations. If VK_DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT is not set, then descriptors can be updated as long as they are not statically used by any shader invocations.

- VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT specifies that this is a variable-sized descriptor binding whose size will be specified when a descriptor set is allocated using this layout. The value of `descriptorCount` is treated as an upper bound on the size of the binding. This must only be used for the last binding in the descriptor set layout (i.e. the binding with the largest value of `binding`). For the purposes of counting against limits such as `maxDescriptorSet`* and `maxPerStageDescriptor`*, the full value of `descriptorCount` is counted, except for descriptor bindings with a descriptor type of VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK, when VkDescriptorSetLayoutCreateInfo::`flags` does not contain VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT. In this case, `descriptorCount` specifies the upper bound on the byte size of the binding; thus it counts against the `maxInlineUniformBlockSize` and `maxInlineUniformTotalSize` limits instead.

Note | Note that while VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT and VK_DESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT both involve updates to descriptor sets after they are bound, VK_DESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT is a weaker requirement since it is only about descriptors that are not used, whereas VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT requires the implementation to observe updates to descriptors that are used.

    // Provided by VK_VERSION_1_2
    typedef VkFlags VkDescriptorBindingFlags;

    // Provided by VK_EXT_descriptor_indexing
    // Equivalent to VkDescriptorBindingFlags
    typedef VkDescriptorBindingFlags VkDescriptorBindingFlagsEXT;

`VkDescriptorBindingFlags` is a bitmask type for setting a mask of zero or more VkDescriptorBindingFlagBits.

To query information about whether a descriptor set layout can be created, call:

    // Provided by VK_VERSION_1_1
    void vkGetDescriptorSetLayoutSupport(
        VkDevice                                    device,
        const VkDescriptorSetLayoutCreateInfo*      pCreateInfo,
        VkDescriptorSetLayoutSupport*               pSupport);

    // Provided by VK_KHR_maintenance3
    // Equivalent to vkGetDescriptorSetLayoutSupport
    void vkGetDescriptorSetLayoutSupportKHR(
        VkDevice                                    device,
        const VkDescriptorSetLayoutCreateInfo*      pCreateInfo,
        VkDescriptorSetLayoutSupport*               pSupport);

- `device` is the logical device that would create the descriptor set layout.

- `pCreateInfo` is a pointer to a VkDescriptorSetLayoutCreateInfo structure specifying the state of the descriptor set layout object.

- `pSupport` is a pointer to a VkDescriptorSetLayoutSupport structure, in which information about support for the descriptor set layout object is returned.

Some implementations have limitations on what fits in a descriptor set which are not easily expressible in terms of existing limits like `maxDescriptorSet`*, for example if all descriptor types share a limited space in memory but each descriptor is a different size or alignment. This command returns information about whether a descriptor set satisfies this limit. If the descriptor set layout satisfies the VkPhysicalDeviceMaintenance3Properties::`maxPerSetDescriptors` limit, this command is guaranteed to return VK_TRUE in VkDescriptorSetLayoutSupport::`supported`. If the descriptor set layout exceeds the VkPhysicalDeviceMaintenance3Properties::`maxPerSetDescriptors` limit, whether the descriptor set layout is supported is implementation-dependent and may depend on whether the descriptor sizes and alignments cause the layout to exceed an internal limit.

This command does not consider other limits such as `maxPerStageDescriptor`*, and so a descriptor set layout that is supported according to this command must still satisfy the pipeline layout limits such as `maxPerStageDescriptor`* in order to be used in a pipeline layout.

Note | This is a `VkDevice` query rather than `VkPhysicalDevice` because the answer may depend on enabled features.

Valid Usage (Implicit)

- VUID-vkGetDescriptorSetLayoutSupport-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetDescriptorSetLayoutSupport-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkDescriptorSetLayoutCreateInfo structure

- VUID-vkGetDescriptorSetLayoutSupport-pSupport-parameter
  `pSupport` must be a valid pointer to a VkDescriptorSetLayoutSupport structure

Information about support for the descriptor set layout is returned in a `VkDescriptorSetLayoutSupport` structure:

    // Provided by VK_VERSION_1_1
    typedef struct VkDescriptorSetLayoutSupport {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           supported;
    } VkDescriptorSetLayoutSupport;

    // Provided by VK_KHR_maintenance3
    // Equivalent to VkDescriptorSetLayoutSupport
    typedef VkDescriptorSetLayoutSupport VkDescriptorSetLayoutSupportKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `supported` specifies whether the descriptor set layout can be created.

`supported` will be VK_TRUE if the descriptor set can be created, or else VK_FALSE.

Valid Usage (Implicit)

- VUID-VkDescriptorSetLayoutSupport-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_SUPPORT

- VUID-VkDescriptorSetLayoutSupport-pNext-pNext
  `pNext` must be `NULL` or a pointer to a valid instance of VkDescriptorSetVariableDescriptorCountLayoutSupport

- VUID-VkDescriptorSetLayoutSupport-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

If the `pNext` chain of a VkDescriptorSetLayoutSupport structure includes a `VkDescriptorSetVariableDescriptorCountLayoutSupport` structure, then that structure returns additional information about whether the descriptor set layout is supported.

    // Provided by VK_VERSION_1_2
    typedef struct VkDescriptorSetVariableDescriptorCountLayoutSupport {
        VkStructureType    sType;
        void*              pNext;
        uint32_t           maxVariableDescriptorCount;
    } VkDescriptorSetVariableDescriptorCountLayoutSupport;

    // Provided by VK_EXT_descriptor_indexing
    // Equivalent to VkDescriptorSetVariableDescriptorCountLayoutSupport
    typedef VkDescriptorSetVariableDescriptorCountLayoutSupport VkDescriptorSetVariableDescriptorCountLayoutSupportEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `maxVariableDescriptorCount` indicates the maximum number of descriptors supported in the highest numbered binding of the layout, if that binding is variable-sized. If the highest numbered binding of the layout has a descriptor type of VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK then `maxVariableDescriptorCount` indicates the maximum byte size supported for the binding, if that binding is variable-sized.

If the VkDescriptorSetLayoutCreateInfo structure specified in vkGetDescriptorSetLayoutSupport::`pCreateInfo` includes a variable-sized descriptor, then `supported` is determined assuming the requested size of the variable-sized descriptor, and `maxVariableDescriptorCount` is the maximum size of that descriptor that can be successfully created (which is greater than or equal to the requested size passed in). If the VkDescriptorSetLayoutCreateInfo structure does not include a variable-sized descriptor, or if the VkPhysicalDeviceDescriptorIndexingFeatures::`descriptorBindingVariableDescriptorCount` feature is not enabled, then `maxVariableDescriptorCount` is zero. For the purposes of this command, a variable-sized descriptor binding with a `descriptorCount` of zero is treated as having a `descriptorCount` of four if `descriptorType` is VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK, or one otherwise, and thus the binding is not ignored and the maximum descriptor count will be returned. If the layout is not supported, then the value written to `maxVariableDescriptorCount` is undefined.

Valid Usage (Implicit)

- VUID-VkDescriptorSetVariableDescriptorCountLayoutSupport-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT

Structure Chaining

Extends the structure

  - VkDescriptorSetLayoutSupport

The following examples show a shader snippet using two descriptor sets, and application code that creates corresponding descriptor set layouts.

GLSL Example

    //
    // binding to a single sampled image descriptor in set 0
    //
    layout (set=0, binding=0) uniform texture2D mySampledImage;

    //
    // binding to an array of sampled image descriptors in set 0
    //
    layout (set=0, binding=1) uniform texture2D myArrayOfSampledImages[12];

    //
    // binding to a single uniform buffer descriptor in set 1
    //
    layout (set=1, binding=0) uniform myUniformBuffer
    {
        vec4 myElement[32];
    };

SPIR-V Example

                   ...
              %1 = OpExtInstImport "GLSL.std.450"
                   ...
                   OpName %9 "mySampledImage"
                   OpName %14 "myArrayOfSampledImages"
                   OpName %18 "myUniformBuffer"
                   OpMemberName %18 0 "myElement"
                   OpName %20 ""
                   OpDecorate %9 DescriptorSet 0
                   OpDecorate %9 Binding 0
                   OpDecorate %14 DescriptorSet 0
                   OpDecorate %14 Binding 1
                   OpDecorate %17 ArrayStride 16
                   OpMemberDecorate %18 0 Offset 0
                   OpDecorate %18 Block
                   OpDecorate %20 DescriptorSet 1
                   OpDecorate %20 Binding 0
              %2 = OpTypeVoid
              %3 = OpTypeFunction %2
              %6 = OpTypeFloat 32
              %7 = OpTypeImage %6 2D 0 0 0 1 Unknown
              %8 = OpTypePointer UniformConstant %7
              %9 = OpVariable %8 UniformConstant
             %10 = OpTypeInt 32 0
             %11 = OpConstant %10 12
             %12 = OpTypeArray %7 %11
             %13 = OpTypePointer UniformConstant %12
             %14 = OpVariable %13 UniformConstant
             %15 = OpTypeVector %6 4
             %16 = OpConstant %10 32
             %17 = OpTypeArray %15 %16
             %18 = OpTypeStruct %17
             %19 = OpTypePointer Uniform %18
             %20 = OpVariable %19 Uniform
                   ...

API Example

    VkResult myResult;

    const VkDescriptorSetLayoutBinding myDescriptorSetLayoutBinding[] =
    {
        // binding to a single image descriptor
        {
            .binding = 0,
            .descriptorType = VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE,
            .descriptorCount = 1,
            .stageFlags = VK_SHADER_STAGE_FRAGMENT_BIT,
            .pImmutableSamplers = NULL
        },

        // binding to an array of image descriptors
        {
            .binding = 1,
            .descriptorType = VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE,
            .descriptorCount = 12,
            .stageFlags = VK_SHADER_STAGE_FRAGMENT_BIT,
            .pImmutableSamplers = NULL
        },

        // binding to a single uniform buffer descriptor
        {
            .binding = 0,
            .descriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER,
            .descriptorCount = 1,
            .stageFlags = VK_SHADER_STAGE_FRAGMENT_BIT,
            .pImmutableSamplers = NULL
        }
    };

    const VkDescriptorSetLayoutCreateInfo myDescriptorSetLayoutCreateInfo[] =
    {
        // Information for first descriptor set with two descriptor bindings
        {
            .sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO,
            .pNext = NULL,
            .flags = 0,
            .bindingCount = 2,
            .pBindings = &myDescriptorSetLayoutBinding[0]
        },

        // Information for second descriptor set with one descriptor binding
        {
            .sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO,
            .pNext = NULL,
            .flags = 0,
            .bindingCount = 1,
            .pBindings = &myDescriptorSetLayoutBinding[2]
        }
    };

    VkDescriptorSetLayout myDescriptorSetLayout[2];

    //
    // Create first descriptor set layout
    //
    myResult = vkCreateDescriptorSetLayout(
        myDevice,
        &myDescriptorSetLayoutCreateInfo[0],
        NULL,
        &myDescriptorSetLayout[0]);

    //
    // Create second descriptor set layout
    //
    myResult = vkCreateDescriptorSetLayout(
        myDevice,
        &myDescriptorSetLayoutCreateInfo[1],
        NULL,
        &myDescriptorSetLayout[1]);

To destroy a descriptor set layout, call:

    // Provided by VK_VERSION_1_0
    void vkDestroyDescriptorSetLayout(
        VkDevice                                    device,
        VkDescriptorSetLayout                       descriptorSetLayout,
        const VkAllocationCallbacks*                pAllocator);

- `device` is the logical device that destroys the descriptor set layout.

- `descriptorSetLayout` is the descriptor set layout to destroy.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

Valid Usage

- VUID-vkDestroyDescriptorSetLayout-descriptorSetLayout-00284
  If `VkAllocationCallbacks` were provided when `descriptorSetLayout` was created, a compatible set of callbacks must be provided here

- VUID-vkDestroyDescriptorSetLayout-descriptorSetLayout-00285
  If no `VkAllocationCallbacks` were provided when `descriptorSetLayout` was created, `pAllocator` must be `NULL`

Valid Usage (Implicit)

- VUID-vkDestroyDescriptorSetLayout-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkDestroyDescriptorSetLayout-descriptorSetLayout-parameter
  If `descriptorSetLayout` is not VK_NULL_HANDLE, `descriptorSetLayout` must be a valid VkDescriptorSetLayout handle

- VUID-vkDestroyDescriptorSetLayout-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkDestroyDescriptorSetLayout-descriptorSetLayout-parent
  If `descriptorSetLayout` is a valid handle, it must have been created, allocated, or retrieved from `device`

Host Synchronization

- Host access to `descriptorSetLayout` must be externally synchronized

### 17.2. Pipeline Layouts

Access to descriptor sets from a pipeline is accomplished through a pipeline layout. Zero or more descriptor set layouts and zero or more push constant ranges are combined to form a pipeline layout object describing the complete set of resources that can be accessed by a pipeline. The pipeline layout represents a sequence of descriptor sets with each having a specific layout. This sequence of layouts is used to determine the interface between shader stages and shader resources. Each pipeline is created using a pipeline layout.

Pipeline layout objects are represented by `VkPipelineLayout` handles:

    // Provided by VK_VERSION_1_0
    VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPipelineLayout)

To create a pipeline layout, call:

    // Provided by VK_VERSION_1_0
    VkResult vkCreatePipelineLayout(
        VkDevice                                    device,
        const VkPipelineLayoutCreateInfo*           pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkPipelineLayout*                           pPipelineLayout);

- `device` is the logical device that creates the pipeline layout.

- `pCreateInfo` is a pointer to a VkPipelineLayoutCreateInfo structure specifying the state of the pipeline layout object.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

- `pPipelineLayout` is a pointer to a VkPipelineLayout handle in which the resulting pipeline layout object is returned.

Valid Usage (Implicit)

- VUID-vkCreatePipelineLayout-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkCreatePipelineLayout-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkPipelineLayoutCreateInfo structure

- VUID-vkCreatePipelineLayout-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreatePipelineLayout-pPipelineLayout-parameter
  `pPipelineLayout` must be a valid pointer to a VkPipelineLayout handle

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The VkPipelineLayoutCreateInfo structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkPipelineLayoutCreateInfo {
        VkStructureType                 sType;
        const void*                     pNext;
        VkPipelineLayoutCreateFlags     flags;
        uint32_t                        setLayoutCount;
        const VkDescriptorSetLayout*    pSetLayouts;
        uint32_t                        pushConstantRangeCount;
        const VkPushConstantRange*      pPushConstantRanges;
    } VkPipelineLayoutCreateInfo;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask of VkPipelineLayoutCreateFlagBits specifying options for pipeline layout creation.

- `setLayoutCount` is the number of descriptor sets included in the pipeline layout.

- `pSetLayouts` is a pointer to an array of `VkDescriptorSetLayout` objects. The implementation must not access these objects outside of the duration of the command this structure is passed to.

- `pushConstantRangeCount` is the number of push constant ranges included in the pipeline layout.

- `pPushConstantRanges` is a pointer to an array of VkPushConstantRange structures defining a set of push constant ranges for use in a single pipeline layout. In addition to descriptor set layouts, a pipeline layout also describes how many push constants can be accessed by each stage of the pipeline.

  Note | Push constants represent a high speed path to modify constant data in pipelines that is expected to outperform memory-backed resource updates.

Valid Usage

- VUID-VkPipelineLayoutCreateInfo-setLayoutCount-00286
  `setLayoutCount` must be less than or equal to `VkPhysicalDeviceLimits`::`maxBoundDescriptorSets`

- VUID-VkPipelineLayoutCreateInfo-descriptorType-03016
  The total number of descriptors in descriptor set layouts created without the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set with a `descriptorType` of VK_DESCRIPTOR_TYPE_SAMPLER and VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER accessible to any given shader stage across all elements of `pSetLayouts` must be less than or equal to `VkPhysicalDeviceLimits`::`maxPerStageDescriptorSamplers`

- VUID-VkPipelineLayoutCreateInfo-descriptorType-03017
  The total number of descriptors in descriptor set layouts created without the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set with a `descriptorType` of VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER and VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC accessible to any given shader stage across all elements of `pSetLayouts` must be less than or equal to `VkPhysicalDeviceLimits`::`maxPerStageDescriptorUniformBuffers`

- VUID-VkPipelineLayoutCreateInfo-descriptorType-03018
  The total number of descriptors in descriptor set layouts created without the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set with a `descriptorType` of VK_DESCRIPTOR_TYPE_STORAGE_BUFFER and VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC accessible to any given shader stage across all elements of `pSetLayouts` must be less than or equal to `VkPhysicalDeviceLimits`::`maxPerStageDescriptorStorageBuffers`

- VUID-VkPipelineLayoutCreateInfo-descriptorType-06939
  The total number of descriptors in descriptor set layouts created without the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set with a `descriptorType` of VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM, and VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER, accessible to any given shader stage across all elements of `pSetLayouts` must be less than or equal to `VkPhysicalDeviceLimits`::`maxPerStageDescriptorSampledImages`

- VUID-VkPipelineLayoutCreateInfo-descriptorType-03020
  The total number of descriptors in descriptor set layouts created without the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set with a `descriptorType` of VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, and VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER accessible to any given shader stage across all elements of `pSetLayouts` must be less than or equal to `VkPhysicalDeviceLimits`::`maxPerStageDescriptorStorageImages`

- VUID-VkPipelineLayoutCreateInfo-descriptorType-03021
  The total number of descriptors in descriptor set layouts created without the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set with a `descriptorType` of VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT accessible to any given shader stage across all elements of `pSetLayouts` must be less than or equal to `VkPhysicalDeviceLimits`::`maxPerStageDescriptorInputAttachments`

- VUID-VkPipelineLayoutCreateInfo-descriptorType-02214
  The total number of bindings in descriptor set layouts created without the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set and with a `descriptorType` of VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK accessible to any given shader stage across all elements of `pSetLayouts`, must be less than or equal to `VkPhysicalDeviceInlineUniformBlockProperties`::`maxPerStageDescriptorInlineUniformBlocks`

- VUID-VkPipelineLayoutCreateInfo-descriptorType-03022
  If the `descriptorBindingSampledImageUpdateAfterBind` feature is supported on the device, the total number of descriptors with a `descriptorType` of VK_DESCRIPTOR_TYPE_SAMPLER and VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER accessible to any given shader stage across all elements of `pSetLayouts` must be less than or equal to `VkPhysicalDeviceDescriptorIndexingProperties`::`maxPerStageDescriptorUpdateAfterBindSamplers`

- VUID-VkPipelineLayoutCreateInfo-descriptorType-03023
  If the `descriptorBindingUniformBufferUpdateAfterBind` feature is supported on the device, the total number of descriptors with a `descriptorType` of VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER and VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC accessible to any given shader stage across all elements of `pSetLayouts` must be less than or equal to `VkPhysicalDeviceDescriptorIndexingProperties`::`maxPerStageDescriptorUpdateAfterBindUniformBuffers`

- VUID-VkPipelineLayoutCreateInfo-descriptorType-03024
  If the `descriptorBindingStorageBufferUpdateAfterBind` feature is supported on the device, the total number of descriptors with a `descriptorType` of VK_DESCRIPTOR_TYPE_STORAGE_BUFFER and VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC accessible to any given shader stage across all elements of `pSetLayouts` must be less than or equal to `VkPhysicalDeviceDescriptorIndexingProperties`::`maxPerStageDescriptorUpdateAfterBindStorageBuffers`

- VUID-VkPipelineLayoutCreateInfo-descriptorType-03025
  If the `descriptorBindingSampledImageUpdateAfterBind` feature is supported on the device, the total number of descriptors with a `descriptorType` of VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, and VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER accessible to any given shader stage across all elements of `pSetLayouts` must be less than or equal to `VkPhysicalDeviceDescriptorIndexingProperties`::`maxPerStageDescriptorUpdateAfterBindSampledImages`

- VUID-VkPipelineLayoutCreateInfo-descriptorType-03026
  If the `descriptorBindingStorageImageUpdateAfterBind` feature is supported on the device, the total number of descriptors with a `descriptorType` of VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, and VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER accessible to any given shader stage across all elements of `pSetLayouts` must be less than or equal to `VkPhysicalDeviceDescriptorIndexingProperties`::`maxPerStageDescriptorUpdateAfterBindStorageImages`

- VUID-VkPipelineLayoutCreateInfo-descriptorType-03027
  If any element of `pSetLayouts` is created with the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set, the total number of descriptors with a `descriptorType` of VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT accessible to any given shader stage across all elements of `pSetLayouts` must be less than or equal to `VkPhysicalDeviceDescriptorIndexingProperties`::`maxPerStageDescriptorUpdateAfterBindInputAttachments`

- VUID-VkPipelineLayoutCreateInfo-descriptorType-02215
  If the `descriptorBindingInlineUniformBlockUpdateAfterBind` feature is supported on the device, the total number of bindings with a `descriptorType` of VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK accessible to any given shader stage across all elements of `pSetLayouts` must be less than or equal to `VkPhysicalDeviceInlineUniformBlockProperties`::`maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks`

- VUID-VkPipelineLayoutCreateInfo-descriptorType-03028
  The total number of descriptors in descriptor set layouts created without the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set with a `descriptorType` of VK_DESCRIPTOR_TYPE_SAMPLER and VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER accessible across all shader stages and across all elements of `pSetLayouts` must be less than or equal to `VkPhysicalDeviceLimits`::`maxDescriptorSetSamplers`

- VUID-VkPipelineLayoutCreateInfo-descriptorType-03029
  The total number of descriptors in descriptor set layouts created without the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set with a `descriptorType` of VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER accessible across all shader stages and across all elements of `pSetLayouts` must be less than or equal to `VkPhysicalDeviceLimits`::`maxDescriptorSetUniformBuffers`

- VUID-VkPipelineLayoutCreateInfo-descriptorType-03030
  If the `maintenance7` feature is not enabled, the total number of descriptors in descriptor set layouts created without the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set with a `descriptorType` of VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC accessible across all shader stages and across all elements of `pSetLayouts` must be less than or equal to `VkPhysicalDeviceLimits`::`maxDescriptorSetUniformBuffersDynamic`

- VUID-VkPipelineLayoutCreateInfo-maintenance7-10003
  If the `maintenance7` feature is enabled, the total number of descriptors in descriptor set layouts created without the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set with a `descriptorType` of VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC accessible across all shader stages and across all elements of `pSetLayouts` must be less than or equal to `VkPhysicalDeviceMaintenance7PropertiesKHR`::`maxDescriptorSetTotalUniformBuffersDynamic`

- VUID-VkPipelineLayoutCreateInfo-descriptorType-03031
  The total number of descriptors in descriptor set layouts created without the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set with a `descriptorType` of VK_DESCRIPTOR_TYPE_STORAGE_BUFFER accessible across all shader stages and across all elements of `pSetLayouts` must be less than or equal to `VkPhysicalDeviceLimits`::`maxDescriptorSetStorageBuffers`

- VUID-VkPipelineLayoutCreateInfo-descriptorType-03032
  If the `maintenance7` feature is not enabled, the total number of descriptors in descriptor set layouts created without the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set with a `descriptorType` of VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC accessible across all shader stages and across all elements of `pSetLayouts` must be less than or equal to `VkPhysicalDeviceLimits`::`maxDescriptorSetStorageBuffersDynamic`

- VUID-VkPipelineLayoutCreateInfo-maintenance7-10004
  If the `maintenance7` feature is enabled, the total number of descriptors in descriptor set layouts created without the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set with a `descriptorType` of VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC accessible across all shader stages and across all elements of `pSetLayouts` must be less than or equal to `VkPhysicalDeviceMaintenance7PropertiesKHR`::`maxDescriptorSetTotalStorageBuffersDynamic`

- VUID-VkPipelineLayoutCreateInfo-None-10005
  The total number of descriptors in descriptor set layouts created without the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set with a `descriptorType` of VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC or VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC accessible across all shader stages and across all elements of `pSetLayouts` must be less than or equal to `VkPhysicalDeviceMaintenance7PropertiesKHR`::`maxDescriptorSetTotalBuffersDynamic`

- VUID-VkPipelineLayoutCreateInfo-pSetLayouts-10006
  If either the `descriptorBindingStorageBufferUpdateAfterBind` or `descriptorBindingUniformBufferUpdateAfterBind` feature is supported on the device, the total number of descriptors of the type VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC or VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC accessible across all shader stages and across all elements of `pSetLayouts` must be less than or equal to `VkPhysicalDeviceMaintenance7PropertiesKHR`::`maxDescriptorSetUpdateAfterBindTotalBuffersDynamic`

- VUID-VkPipelineLayoutCreateInfo-descriptorType-03033
  The total number of descriptors in descriptor set layouts created without the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set with a `descriptorType` of VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, and VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER accessible across all shader stages and across all elements of `pSetLayouts` must be less than or equal to `VkPhysicalDeviceLimits`::`maxDescriptorSetSampledImages`

- VUID-VkPipelineLayoutCreateInfo-descriptorType-03034
  The total number of descriptors in descriptor set layouts created without the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set with a `descriptorType` of VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, and VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER accessible across all shader stages and across all elements of `pSetLayouts` must be less than or equal to `VkPhysicalDeviceLimits`::`maxDescriptorSetStorageImages`

- VUID-VkPipelineLayoutCreateInfo-descriptorType-03035
  The total number of descriptors in descriptor set layouts created without the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set with a `descriptorType` of VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT accessible across all shader stages and across all elements of `pSetLayouts` must be less than or equal to `VkPhysicalDeviceLimits`::`maxDescriptorSetInputAttachments`

- VUID-VkPipelineLayoutCreateInfo-descriptorType-02216
  The total number of bindings in descriptor set layouts created without the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set with a `descriptorType` of VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK accessible across all shader stages and across all elements of `pSetLayouts` must be less than or equal to `VkPhysicalDeviceInlineUniformBlockProperties`::`maxDescriptorSetInlineUniformBlocks`

- VUID-VkPipelineLayoutCreateInfo-pSetLayouts-03036
  If the `descriptorBindingSampledImageUpdateAfterBind` feature is supported on the device, the total number of descriptors of the type VK_DESCRIPTOR_TYPE_SAMPLER and VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER accessible across all shader stages and across all elements of `pSetLayouts` must be less than or equal to `VkPhysicalDeviceDescriptorIndexingProperties`::`maxDescriptorSetUpdateAfterBindSamplers`

- VUID-VkPipelineLayoutCreateInfo-pSetLayouts-03037
  If the `descriptorBindingUniformBufferUpdateAfterBind` feature is supported on the device, the total number of descriptors of the type VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER accessible across all shader stages and across all elements of `pSetLayouts` must be less than or equal to `VkPhysicalDeviceDescriptorIndexingProperties`::`maxDescriptorSetUpdateAfterBindUniformBuffers`

- VUID-VkPipelineLayoutCreateInfo-pSetLayouts-03038
  If the `descriptorBindingUniformBufferUpdateAfterBind` feature is supported on the device, and if the `maintenance7` feature is not enabled, the total number of descriptors of the type VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC accessible across all shader stages and across all elements of `pSetLayouts` must be less than or equal to `VkPhysicalDeviceLimits`::`maxDescriptorSetUpdateAfterBindUniformBuffersDynamic`

- VUID-VkPipelineLayoutCreateInfo-maintenance7-10007
  If the `descriptorBindingUniformBufferUpdateAfterBind` feature is supported on the device, and the `maintenance7` feature is enabled, the total number of descriptors of the type VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC accessible across all shader stages and across all elements of `pSetLayouts` must be less than or equal to `VkPhysicalDeviceMaintenance7PropertiesKHR`::`maxDescriptorSetUpdateAfterBindTotalUniformBuffersDynamic`

- VUID-VkPipelineLayoutCreateInfo-pSetLayouts-03039
  If the `descriptorBindingStorageBufferUpdateAfterBind` feature is supported on the device, the total number of descriptors of the type VK_DESCRIPTOR_TYPE_STORAGE_BUFFER accessible across all shader stages and across all elements of `pSetLayouts` must be less than or equal to `VkPhysicalDeviceDescriptorIndexingProperties`::`maxDescriptorSetUpdateAfterBindStorageBuffers`

- VUID-VkPipelineLayoutCreateInfo-pSetLayouts-03040
  If the `descriptorBindingStorageBufferUpdateAfterBind` feature is supported on the device, and if the `maintenance7` feature is not enabled, the total number of descriptors of the type VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC accessible across all shader stages and across all elements of `pSetLayouts` must be less than or equal to `VkPhysicalDeviceLimits`::`maxDescriptorSetUpdateAfterBindStorageBuffersDynamic`

- VUID-VkPipelineLayoutCreateInfo-maintenance7-10008
  If the `descriptorBindingStorageBufferUpdateAfterBind` feature is supported on the device, and if the `maintenance7` feature is enabled, the total number of descriptors of the type VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC accessible across all shader stages and across all elements of `pSetLayouts` must be less than or equal to `VkPhysicalDeviceMaintenance7PropertiesKHR`::`maxDescriptorSetUpdateAfterBindTotalStorageBuffersDynamic`

- VUID-VkPipelineLayoutCreateInfo-pSetLayouts-03041
  If the `descriptorBindingSampledImageUpdateAfterBind` feature is supported on the device, the total number of descriptors of the type VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, and VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER accessible across all shader stages and across all elements of `pSetLayouts` must be less than or equal to `VkPhysicalDeviceDescriptorIndexingProperties`::`maxDescriptorSetUpdateAfterBindSampledImages`

- VUID-VkPipelineLayoutCreateInfo-pSetLayouts-03042
  If the `descriptorBindingStorageImageUpdateAfterBind` feature is supported on the device, the total number of descriptors of the type VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, and VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER accessible across all shader stages and across all elements of `pSetLayouts` must be less than or equal to `VkPhysicalDeviceDescriptorIndexingProperties`::`maxDescriptorSetUpdateAfterBindStorageImages`

- VUID-VkPipelineLayoutCreateInfo-pSetLayouts-03043
  If any element of `pSetLayouts` is created with the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set, the total number of descriptors of the type VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT accessible across all shader stages and across all elements of `pSetLayouts` must be less than or equal to `VkPhysicalDeviceDescriptorIndexingProperties`::`maxDescriptorSetUpdateAfterBindInputAttachments`

- VUID-VkPipelineLayoutCreateInfo-descriptorType-02217
  If the `descriptorBindingInlineUniformBlockUpdateAfterBind` feature is supported on the device, the total number of bindings with a `descriptorType` of VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK accessible across all shader stages and across all elements of `pSetLayouts` must be less than or equal to `VkPhysicalDeviceInlineUniformBlockProperties`::`maxDescriptorSetUpdateAfterBindInlineUniformBlocks`

- VUID-VkPipelineLayoutCreateInfo-descriptorType-06531
  The total number of descriptors with a `descriptorType` of VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK accessible across all shader stages and across all elements of `pSetLayouts` must be less than or equal to `VkPhysicalDeviceVulkan13Properties`::`maxInlineUniformTotalSize`

- VUID-VkPipelineLayoutCreateInfo-pPushConstantRanges-00292
  Any two elements of `pPushConstantRanges` must not include the same stage in `stageFlags`

- VUID-VkPipelineLayoutCreateInfo-pSetLayouts-00293
  `pSetLayouts` must not contain more than one descriptor set layout that was created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT set

- VUID-VkPipelineLayoutCreateInfo-descriptorType-03571
  The total number of bindings in descriptor set layouts created without the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set with a `descriptorType` of VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR accessible to any given shader stage across all elements of `pSetLayouts` must be less than or equal to VkPhysicalDeviceAccelerationStructurePropertiesKHR::`maxPerStageDescriptorAccelerationStructures`

- VUID-VkPipelineLayoutCreateInfo-descriptorType-03572
  The total number of bindings with a `descriptorType` of VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR accessible to any given shader stage across all elements of `pSetLayouts` must be less than or equal to VkPhysicalDeviceAccelerationStructurePropertiesKHR::`maxPerStageDescriptorUpdateAfterBindAccelerationStructures`

- VUID-VkPipelineLayoutCreateInfo-descriptorType-03573
  The total number of bindings in descriptor set layouts created without the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set with a `descriptorType` of VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR accessible across all shader stages and across all elements of `pSetLayouts` must be less than or equal to VkPhysicalDeviceAccelerationStructurePropertiesKHR::`maxDescriptorSetAccelerationStructures`

- VUID-VkPipelineLayoutCreateInfo-descriptorType-03574
  The total number of bindings with a `descriptorType` of VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR accessible across all shader stages and across all elements of `pSetLayouts` must be less than or equal to VkPhysicalDeviceAccelerationStructurePropertiesKHR::`maxDescriptorSetUpdateAfterBindAccelerationStructures`

- VUID-VkPipelineLayoutCreateInfo-descriptorType-02381
  The total number of bindings with a `descriptorType` of VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV accessible across all shader stages and across all elements of `pSetLayouts` must be less than or equal to VkPhysicalDeviceRayTracingPropertiesNV::`maxDescriptorSetAccelerationStructures`

- VUID-VkPipelineLayoutCreateInfo-pImmutableSamplers-03566
  The total number of `pImmutableSamplers` created with `flags` containing VK_SAMPLER_CREATE_SUBSAMPLED_BIT_EXT or VK_SAMPLER_CREATE_SUBSAMPLED_COARSE_RECONSTRUCTION_BIT_EXT across all shader stages and across all elements of `pSetLayouts` must be less than or equal to `VkPhysicalDeviceFragmentDensityMap2PropertiesEXT`::`maxDescriptorSetSubsampledSamplers`

- VUID-VkPipelineLayoutCreateInfo-pSetLayouts-04606
  Any element of `pSetLayouts` must not have been created with the VK_DESCRIPTOR_SET_LAYOUT_CREATE_HOST_ONLY_POOL_BIT_EXT bit set

- VUID-VkPipelineLayoutCreateInfo-graphicsPipelineLibrary-06753
  If the `graphicsPipelineLibrary` feature is not enabled, elements of `pSetLayouts` must be valid VkDescriptorSetLayout objects

- VUID-VkPipelineLayoutCreateInfo-pSetLayouts-08008
  If any element of `pSetLayouts` was created with the VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT bit set, all elements of `pSetLayouts` must have been created with the VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT bit set

- VUID-VkPipelineLayoutCreateInfo-pSetLayouts-09698
  The total number of descriptors in descriptor set layouts created without the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set with a `descriptorType` of VK_DESCRIPTOR_TYPE_TENSOR_ARM accessible to any given shader stage across all elements of `pSetLayouts` must be less than or equal to VkPhysicalDeviceTensorPropertiesARM::`maxPerStageDescriptorSetStorageTensors`

- VUID-VkPipelineLayoutCreateInfo-pSetLayouts-09699
  The total number of descriptors in descriptor set layouts created without the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set with a `descriptorType` of VK_DESCRIPTOR_TYPE_TENSOR_ARM accessible across all shader stages and across all elements of `pSetLayouts` must be less than or equal to VkPhysicalDeviceTensorPropertiesARM::`maxDescriptorSetStorageTensors`

- VUID-VkPipelineLayoutCreateInfo-pSetLayouts-09878
  The total number of descriptors of the type VK_DESCRIPTOR_TYPE_TENSOR_ARM accessible across all shader stages and across all elements of `pSetLayouts` must be less than or equal to VkPhysicalDeviceTensorPropertiesARM::`maxDescriptorSetUpdateAfterBindStorageTensors`

- VUID-VkPipelineLayoutCreateInfo-descriptorType-09879
  The total number of descriptors with a `descriptorType` of VK_DESCRIPTOR_TYPE_TENSOR_ARM accessible to any given shader stage across all elements of `pSetLayouts` must be less than or equal to `VkPhysicalDeviceTensorPropertiesARM`::`maxPerStageDescriptorUpdateAfterBindStorageTensors`

- VUID-VkPipelineLayoutCreateInfo-flags-13352
  If `flags` has VK_PIPELINE_LAYOUT_CREATE_NO_TASK_SHADER_BIT_KHR set, then VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT must also be set

Valid Usage (Implicit)

- VUID-VkPipelineLayoutCreateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO

- VUID-VkPipelineLayoutCreateInfo-flags-parameter
  `flags` must be a valid combination of VkPipelineLayoutCreateFlagBits values

- VUID-VkPipelineLayoutCreateInfo-pSetLayouts-parameter
  If `setLayoutCount` is not `0`, `pSetLayouts` must be a valid pointer to an array of `setLayoutCount` valid or VK_NULL_HANDLE VkDescriptorSetLayout handles

- VUID-VkPipelineLayoutCreateInfo-pPushConstantRanges-parameter
  If `pushConstantRangeCount` is not `0`, `pPushConstantRanges` must be a valid pointer to an array of `pushConstantRangeCount` valid VkPushConstantRange structures

Structure Chaining

Extends the structures

  - VkBindDescriptorBufferEmbeddedSamplersInfoEXT

  - VkBindDescriptorSetsInfo

  - VkIndirectCommandsLayoutCreateInfoEXT

  - VkPushConstantsInfo

  - VkPushDescriptorSetInfo

  - VkPushDescriptorSetWithTemplateInfo

  - VkSetDescriptorBufferOffsetsInfoEXT

    // Provided by VK_VERSION_1_0, VK_EXT_graphics_pipeline_library
    typedef enum VkPipelineLayoutCreateFlagBits {
      // Provided by VK_KHR_maintenance11 with VK_EXT_shader_object, VK_EXT_graphics_pipeline_library
        VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT = 0x00000002,
      // Provided by VK_KHR_maintenance11 with VK_EXT_shader_object and (VK_EXT_mesh_shader or VK_NV_mesh_shader)
        VK_PIPELINE_LAYOUT_CREATE_NO_TASK_SHADER_BIT_KHR = 0x00000004,
    } VkPipelineLayoutCreateFlagBits;

- VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT specifies that implementations must ensure that the properties and/or absence of a particular descriptor set do not influence any other properties of the pipeline layout. This allows pipelines libraries linked without VK_PIPELINE_CREATE_LINK_TIME_OPTIMIZATION_BIT_EXT to be created with a subset of the total descriptor sets.

- VK_PIPELINE_LAYOUT_CREATE_NO_TASK_SHADER_BIT_KHR, when used in combination with VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT, specifies that this pipeline layout will only be used to draw with shader objects created with VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT.

    // Provided by VK_VERSION_1_0
    typedef VkFlags VkPipelineLayoutCreateFlags;

`VkPipelineLayoutCreateFlags` is a bitmask type for setting a mask of VkPipelineLayoutCreateFlagBits.

The `VkPushConstantRange` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkPushConstantRange {
        VkShaderStageFlags    stageFlags;
        uint32_t              offset;
        uint32_t              size;
    } VkPushConstantRange;

- `stageFlags` is a set of stage flags describing the shader stages that will access a range of push constants. If a particular stage is not included in the range, then accessing members of that range of push constants from the corresponding shader stage will return undefined values.

- `offset` and `size` are the start offset and size, respectively, consumed by the range. Both `offset` and `size` are in units of bytes and must be a multiple of 4. The layout of the push constant variables is specified in the shader.

Valid Usage

- VUID-VkPushConstantRange-offset-00294
  `offset` must be less than `VkPhysicalDeviceLimits`::`maxPushConstantsSize`

- VUID-VkPushConstantRange-offset-00295
  `offset` must be a multiple of `4`

- VUID-VkPushConstantRange-size-00296
  `size` must be greater than `0`

- VUID-VkPushConstantRange-size-00297
  `size` must be a multiple of `4`

- VUID-VkPushConstantRange-size-00298
  `size` must be less than or equal to `VkPhysicalDeviceLimits`::`maxPushConstantsSize` minus `offset`

Valid Usage (Implicit)

- VUID-VkPushConstantRange-stageFlags-parameter
  `stageFlags` must be a valid combination of VkShaderStageFlagBits values

- VUID-VkPushConstantRange-stageFlags-requiredbitmask
  `stageFlags` must not be `0`

Once created, pipeline layouts can be used as part of pipeline creation (see Pipelines), as part of binding descriptor sets (see Descriptor Set Binding), and as part of setting push constants (see Push Constant Updates). Pipeline creation accepts a pipeline layout as input, and the layout may be used to map (set, binding, arrayElement) tuples to implementation resources or memory locations within a descriptor set. The assignment of implementation resources depends only on the bindings defined in the descriptor sets that comprise the pipeline layout, and not on any shader source.

All resource variables statically used in all shaders in a pipeline must be declared with a (set, binding, arrayElement) that exists in the corresponding descriptor set layout and is of an appropriate descriptor type and includes the set of shader stages it is used by in `stageFlags`. The pipeline layout can include entries that are not used by a particular pipeline. The pipeline layout allows the application to provide a consistent set of bindings across multiple pipeline compiles, which enables those pipelines to be compiled in a way that the implementation may cheaply switch pipelines without reprogramming the bindings.

Similarly, the push constant block declared in each shader (if present) must only place variables at offsets that are each included in a push constant range with `stageFlags` including the bit corresponding to the shader stage that uses it. The pipeline layout can include ranges or portions of ranges that are not used by a particular pipeline.

There is a limit on the total number of resources of each type that can be included in bindings in all descriptor set layouts in a pipeline layout as shown in Pipeline Layout Resource Limits. The “Total Resources Available” column gives the limit on the number of each type of resource that can be included in bindings in all descriptor sets in the pipeline layout. Some resource types count against multiple limits. Additionally, there are limits on the total number of each type of resource that can be used in any pipeline stage as described in Shader Resource Limits.

Table 19. Pipeline Layout Resource Limits
Total Resources Available | Resource Types
--- | ---
`maxDescriptorSetSamplers` or `maxDescriptorSetUpdateAfterBindSamplers` | sampler
combined image sampler
`maxDescriptorSetSampledImages` or `maxDescriptorSetUpdateAfterBindSampledImages` | sampled image
combined image sampler
uniform texel buffer
`maxDescriptorSetStorageImages` or `maxDescriptorSetUpdateAfterBindStorageImages` | storage image
storage texel buffer
`maxDescriptorSetUniformBuffers` or `maxDescriptorSetUpdateAfterBindUniformBuffers` | uniform buffer
uniform buffer dynamic
`maxDescriptorSetUniformBuffersDynamic` or `maxDescriptorSetUpdateAfterBindUniformBuffersDynamic` or `maxDescriptorSetUpdateAfterBindTotalUniformBuffersDynamic` | uniform buffer dynamic
`maxDescriptorSetStorageBuffers` or `maxDescriptorSetUpdateAfterBindStorageBuffers` | storage buffer
storage buffer dynamic
`maxDescriptorSetStorageBuffersDynamic` or `maxDescriptorSetUpdateAfterBindStorageBuffersDynamic` or `maxDescriptorSetUpdateAfterBindTotalStorageBuffersDynamic` | storage buffer dynamic
`maxDescriptorSetInputAttachments` or `maxDescriptorSetUpdateAfterBindInputAttachments` | input attachment
`maxDescriptorSetInlineUniformBlocks` or `maxDescriptorSetUpdateAfterBindInlineUniformBlocks` | inline uniform block
`maxDescriptorSetAccelerationStructures` or `maxDescriptorSetUpdateAfterBindAccelerationStructures` | acceleration structure
`maxDescriptorSetStorageTensors` or `maxDescriptorSetUpdateAfterBindStorageTensors` | storage tensor

To destroy a pipeline layout, call:

    // Provided by VK_VERSION_1_0
    void vkDestroyPipelineLayout(
        VkDevice                                    device,
        VkPipelineLayout                            pipelineLayout,
        const VkAllocationCallbacks*                pAllocator);

- `device` is the logical device that destroys the pipeline layout.

- `pipelineLayout` is the pipeline layout to destroy.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

Valid Usage

- VUID-vkDestroyPipelineLayout-pipelineLayout-00299
  If `VkAllocationCallbacks` were provided when `pipelineLayout` was created, a compatible set of callbacks must be provided here

- VUID-vkDestroyPipelineLayout-pipelineLayout-00300
  If no `VkAllocationCallbacks` were provided when `pipelineLayout` was created, `pAllocator` must be `NULL`

Valid Usage (Implicit)

- VUID-vkDestroyPipelineLayout-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkDestroyPipelineLayout-pipelineLayout-parameter
  If `pipelineLayout` is not VK_NULL_HANDLE, `pipelineLayout` must be a valid VkPipelineLayout handle

- VUID-vkDestroyPipelineLayout-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkDestroyPipelineLayout-pipelineLayout-parent
  If `pipelineLayout` is a valid handle, it must have been created, allocated, or retrieved from `device`

Host Synchronization

- Host access to `pipelineLayout` must be externally synchronized

#### 17.2.1. Pipeline Layout Compatibility

Two pipeline layouts are defined to be “compatible for push constants” if they were created with identical push constant ranges. Two pipeline layouts are defined to be “compatible for set N” if they were created with identically defined descriptor set layouts for sets zero through N, if both of them either were or were not created with VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT, and if they were created with identical push constant ranges.

When binding a descriptor set (see Descriptor Set Binding) to set number N, a previously bound descriptor set bound with lower index M than N is disturbed if the pipeline layouts for set M and N are not compatible for set M. Otherwise, the bound descriptor set in M is not disturbed.

If, additionally, the previously bound descriptor set for set N was bound using a pipeline layout not compatible for set N, then all bindings in sets numbered greater than N are disturbed.

When binding a pipeline, the pipeline can correctly access any previously bound descriptor set N if it was bound with compatible pipeline layout for set N, and it was not disturbed.

Layout compatibility means that descriptor sets can be bound to a command buffer for use by any pipeline created with a compatible pipeline layout, and without having bound a particular pipeline first. It also means that descriptor sets can remain valid across a pipeline change, and the same resources will be accessible to the newly bound pipeline.

When a descriptor set is disturbed by binding descriptor sets, the disturbed set is considered to contain undefined descriptors bound with the same pipeline layout as the disturbing descriptor set.

Implementor’s Note

A consequence of layout compatibility is that when the implementation compiles a pipeline layout and maps pipeline resources to implementation resources, the mechanism for set N should only be a function of sets [0..N].

Note | Place the least frequently changing descriptor sets near the start of the pipeline layout, and place the descriptor sets representing the most frequently changing resources near the end. When pipelines are switched, only the descriptor set bindings that have been invalidated will need to be updated and the remainder of the descriptor set bindings will remain in place.

The maximum number of descriptor sets that can be bound to a pipeline layout is queried from physical device properties (see `maxBoundDescriptorSets` in Limits).

API Example

    const VkDescriptorSetLayout layouts[] = { layout1, layout2 };

    const VkPushConstantRange ranges[] =
    {
        {
            .stageFlags = VK_SHADER_STAGE_VERTEX_BIT,
            .offset = 0,
            .size = 4
        },
        {
            .stageFlags = VK_SHADER_STAGE_FRAGMENT_BIT,
            .offset = 4,
            .size = 4
        },
    };

    const VkPipelineLayoutCreateInfo createInfo =
    {
        .sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO,
        .pNext = NULL,
        .flags = 0,
        .setLayoutCount = 2,
        .pSetLayouts = layouts,
        .pushConstantRangeCount = 2,
        .pPushConstantRanges = ranges
    };

    VkPipelineLayout myPipelineLayout;
    myResult = vkCreatePipelineLayout(
        myDevice,
        &createInfo,
        NULL,
        &myPipelineLayout);

### 17.3. Allocation of Descriptor Sets

A descriptor pool maintains a pool of descriptors, from which descriptor sets are allocated. Descriptor pools are externally synchronized, meaning that the application must not allocate and/or free descriptor sets from the same pool in multiple threads simultaneously.

Descriptor pools are represented by `VkDescriptorPool` handles:

    // Provided by VK_VERSION_1_0
    VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorPool)

To create a descriptor pool object, call:

    // Provided by VK_VERSION_1_0
    VkResult vkCreateDescriptorPool(
        VkDevice                                    device,
        const VkDescriptorPoolCreateInfo*           pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkDescriptorPool*                           pDescriptorPool);

- `device` is the logical device that creates the descriptor pool.

- `pCreateInfo` is a pointer to a VkDescriptorPoolCreateInfo structure specifying the state of the descriptor pool object.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

- `pDescriptorPool` is a pointer to a VkDescriptorPool handle in which the resulting descriptor pool object is returned.

The created descriptor pool is returned in `pDescriptorPool`.

Valid Usage (Implicit)

- VUID-vkCreateDescriptorPool-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkCreateDescriptorPool-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkDescriptorPoolCreateInfo structure

- VUID-vkCreateDescriptorPool-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateDescriptorPool-pDescriptorPool-parameter
  `pDescriptorPool` must be a valid pointer to a VkDescriptorPool handle

- VUID-vkCreateDescriptorPool-device-queuecount
  The device must have been created with at least `1` queue

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_FRAGMENTATION_EXT

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

Additional information about the pool is passed in a `VkDescriptorPoolCreateInfo` structure:

    // Provided by VK_VERSION_1_0
    typedef struct VkDescriptorPoolCreateInfo {
        VkStructureType                sType;
        const void*                    pNext;
        VkDescriptorPoolCreateFlags    flags;
        uint32_t                       maxSets;
        uint32_t                       poolSizeCount;
        const VkDescriptorPoolSize*    pPoolSizes;
    } VkDescriptorPoolCreateInfo;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask of VkDescriptorPoolCreateFlagBits specifying certain supported operations on the pool.

- `maxSets` is the maximum number of descriptor sets that can be allocated from the pool.

- `poolSizeCount` is the number of elements in `pPoolSizes`.

- `pPoolSizes` is a pointer to an array of VkDescriptorPoolSize structures, each containing a descriptor type and number of descriptors of that type to be allocated in the pool.

If multiple `VkDescriptorPoolSize` structures containing the same descriptor type appear in the `pPoolSizes` array then the pool will be created with enough storage for the total number of descriptors of each type.

Fragmentation of a descriptor pool is possible and may lead to descriptor set allocation failures. A failure due to fragmentation is defined as failing a descriptor set allocation despite the sum of all outstanding descriptor set allocations from the pool plus the requested allocation requiring no more than the total number of descriptors requested at pool creation. Implementations provide certain guarantees of when fragmentation must not cause allocation failure, as described below.

If a descriptor pool has not had any descriptor sets freed since it was created or most recently reset then fragmentation must not cause an allocation failure (note that this is always the case for a pool created without the VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT bit set). Additionally, if all sets allocated from the pool since it was created or most recently reset use the same number of descriptors (of each type) and the requested allocation also uses that same number of descriptors (of each type), then fragmentation must not cause an allocation failure.

If an allocation failure occurs due to fragmentation, an application can create an additional descriptor pool to perform further descriptor set allocations.

If `flags` has the VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT bit set, descriptor pool creation may fail with the error VK_ERROR_FRAGMENTATION if the total number of descriptors across all pools (including this one) created with this bit set exceeds `maxUpdateAfterBindDescriptorsInAllPools`, or if fragmentation of the underlying hardware resources occurs.

If a `pPoolSizes`[i]::`type` is VK_DESCRIPTOR_TYPE_MUTABLE_EXT, a VkMutableDescriptorTypeCreateInfoEXT structure in the `pNext` chain can be used to specify which mutable descriptor types can be allocated from the pool. If included in the `pNext` chain, VkMutableDescriptorTypeCreateInfoEXT::`pMutableDescriptorTypeLists`[i] specifies which kind of VK_DESCRIPTOR_TYPE_MUTABLE_EXT descriptors can be allocated from this pool entry. If VkMutableDescriptorTypeCreateInfoEXT does not exist in the `pNext` chain, or VkMutableDescriptorTypeCreateInfoEXT::`pMutableDescriptorTypeLists`[i] is out of range, the descriptor pool allocates enough memory to be able to allocate a VK_DESCRIPTOR_TYPE_MUTABLE_EXT descriptor with any supported VkDescriptorType as a mutable descriptor. A mutable descriptor can be allocated from a pool entry if the type list in VkDescriptorSetLayoutCreateInfo is a subset of the type list declared in the descriptor pool, or if the pool entry is created without a descriptor type list. Multiple `pPoolSizes` entries with VK_DESCRIPTOR_TYPE_MUTABLE_EXT can be declared. When multiple such pool entries are present in `pPoolSizes`, they specify sets of supported descriptor types which either fully overlap, partially overlap, or are disjoint. Two sets fully overlap if the sets of supported descriptor types are equal. If the sets are not disjoint they partially overlap. A pool entry without a `VkMutableDescriptorTypeListEXT` assigned to it is considered to partially overlap any other pool entry which has a `VkMutableDescriptorTypeListEXT` assigned to it. The application must ensure that partial overlap does not exist in `pPoolSizes`.

Note | The requirement of no partial overlap is intended to resolve ambiguity for validation as there is no confusion which `pPoolSizes` entries will be allocated from. An implementation is not expected to depend on this requirement.

Valid Usage

- VUID-VkDescriptorPoolCreateInfo-descriptorPoolOverallocation-09227
  If the `descriptorPoolOverallocation` feature is not enabled, or `flags` does not have VK_DESCRIPTOR_POOL_CREATE_ALLOW_OVERALLOCATION_SETS_BIT_NV set, `maxSets` must be greater than `0`

- VUID-VkDescriptorPoolCreateInfo-flags-09228
  If `flags` has the VK_DESCRIPTOR_POOL_CREATE_ALLOW_OVERALLOCATION_SETS_BIT_NV or VK_DESCRIPTOR_POOL_CREATE_ALLOW_OVERALLOCATION_POOLS_BIT_NV bits set, then `descriptorPoolOverallocation` must be enabled

- VUID-VkDescriptorPoolCreateInfo-flags-04607
  If `flags` has the VK_DESCRIPTOR_POOL_CREATE_HOST_ONLY_BIT_EXT bit set, then the VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT bit must not be set

- VUID-VkDescriptorPoolCreateInfo-mutableDescriptorType-04608
  If VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT::`mutableDescriptorType` is not enabled, `pPoolSizes` must not contain a `descriptorType` of VK_DESCRIPTOR_TYPE_MUTABLE_EXT

- VUID-VkDescriptorPoolCreateInfo-flags-04609
  If `flags` has the VK_DESCRIPTOR_POOL_CREATE_HOST_ONLY_BIT_EXT bit set, VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT::`mutableDescriptorType` must be enabled

- VUID-VkDescriptorPoolCreateInfo-pPoolSizes-04787
  If `pPoolSizes` contains a `descriptorType` of VK_DESCRIPTOR_TYPE_MUTABLE_EXT, any other VK_DESCRIPTOR_TYPE_MUTABLE_EXT element in `pPoolSizes` must not have sets of supported descriptor types which partially overlap

- VUID-VkDescriptorPoolCreateInfo-pPoolSizes-09424
  If `pPoolSizes` contains a `descriptorType` of VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK, the `pNext` chain must include a VkDescriptorPoolInlineUniformBlockCreateInfo structure whose `maxInlineUniformBlockBindings` member is not zero

- VUID-VkDescriptorPoolCreateInfo-pNext-09946
  If a VkDataGraphProcessingEngineCreateInfoARM structure is included in the `pNext` chain, each member of `pProcessingEngines` must be identical to an VkQueueFamilyDataGraphPropertiesARM::`engine` retrieved from vkGetPhysicalDeviceQueueFamilyDataGraphPropertiesARM with the `physicalDevice` that was used to create `device`

Valid Usage (Implicit)

- VUID-VkDescriptorPoolCreateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO

- VUID-VkDescriptorPoolCreateInfo-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkDataGraphProcessingEngineCreateInfoARM, VkDescriptorPoolInlineUniformBlockCreateInfo, or VkMutableDescriptorTypeCreateInfoEXT

- VUID-VkDescriptorPoolCreateInfo-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkDescriptorPoolCreateInfo-flags-parameter
  `flags` must be a valid combination of VkDescriptorPoolCreateFlagBits values

- VUID-VkDescriptorPoolCreateInfo-pPoolSizes-parameter
  If `poolSizeCount` is not `0`, `pPoolSizes` must be a valid pointer to an array of `poolSizeCount` valid VkDescriptorPoolSize structures

In order to be able to allocate descriptor sets having inline uniform block bindings the descriptor pool must be created with specifying the inline uniform block binding capacity of the descriptor pool, in addition to the total inline uniform data capacity in bytes which is specified through a VkDescriptorPoolSize structure with a `descriptorType` value of VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK. This can be done by adding a `VkDescriptorPoolInlineUniformBlockCreateInfo` structure to the `pNext` chain of VkDescriptorPoolCreateInfo.

The `VkDescriptorPoolInlineUniformBlockCreateInfo` structure is defined as:

    // Provided by VK_VERSION_1_3
    typedef struct VkDescriptorPoolInlineUniformBlockCreateInfo {
        VkStructureType    sType;
        const void*        pNext;
        uint32_t           maxInlineUniformBlockBindings;
    } VkDescriptorPoolInlineUniformBlockCreateInfo;

    // Provided by VK_EXT_inline_uniform_block
    // Equivalent to VkDescriptorPoolInlineUniformBlockCreateInfo
    typedef VkDescriptorPoolInlineUniformBlockCreateInfo VkDescriptorPoolInlineUniformBlockCreateInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `maxInlineUniformBlockBindings` is the number of inline uniform block bindings to allocate.

Valid Usage (Implicit)

- VUID-VkDescriptorPoolInlineUniformBlockCreateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_INLINE_UNIFORM_BLOCK_CREATE_INFO

Structure Chaining

Extends the structure

  - VkDescriptorPoolCreateInfo

Bits which can be set in VkDescriptorPoolCreateInfo::`flags`, enabling operations on a descriptor pool, are:

    // Provided by VK_VERSION_1_0
    typedef enum VkDescriptorPoolCreateFlagBits {
        VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT = 0x00000001,
      // Provided by VK_VERSION_1_2
        VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT = 0x00000002,
      // Provided by VK_EXT_mutable_descriptor_type
        VK_DESCRIPTOR_POOL_CREATE_HOST_ONLY_BIT_EXT = 0x00000004,
      // Provided by VK_NV_descriptor_pool_overallocation
        VK_DESCRIPTOR_POOL_CREATE_ALLOW_OVERALLOCATION_SETS_BIT_NV = 0x00000008,
      // Provided by VK_NV_descriptor_pool_overallocation
        VK_DESCRIPTOR_POOL_CREATE_ALLOW_OVERALLOCATION_POOLS_BIT_NV = 0x00000010,
      // Provided by VK_EXT_descriptor_indexing
        VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT_EXT = VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT,
      // Provided by VK_VALVE_mutable_descriptor_type
        VK_DESCRIPTOR_POOL_CREATE_HOST_ONLY_BIT_VALVE = VK_DESCRIPTOR_POOL_CREATE_HOST_ONLY_BIT_EXT,
    } VkDescriptorPoolCreateFlagBits;

- VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT specifies that descriptor sets can return their individual allocations to the pool, i.e. all of vkAllocateDescriptorSets, vkFreeDescriptorSets, and vkResetDescriptorPool are allowed. Otherwise, descriptor sets allocated from the pool must not be individually freed back to the pool, i.e. only vkAllocateDescriptorSets and vkResetDescriptorPool are allowed.

- VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT specifies that descriptor sets allocated from this pool can include bindings with the VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT bit set. It is valid to allocate descriptor sets that have bindings that do not set the VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT bit from a pool that has VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT set.

- VK_DESCRIPTOR_POOL_CREATE_HOST_ONLY_BIT_EXT specifies that this descriptor pool and the descriptor sets allocated from it reside entirely in host memory and cannot be bound. Similar to descriptor sets allocated without this flag, applications can copy-from and copy-to descriptors sets allocated from this descriptor pool. Descriptor sets allocated from this pool are partially exempt from the external synchronization requirement in vkUpdateDescriptorSetWithTemplateKHR and vkUpdateDescriptorSets. Descriptor sets and their descriptors can be updated concurrently in different threads, though the same descriptor must not be updated concurrently by two threads.

- VK_DESCRIPTOR_POOL_CREATE_ALLOW_OVERALLOCATION_SETS_BIT_NV specifies that the implementation should allow the application to allocate more than VkDescriptorPoolCreateInfo::`maxSets` descriptor set objects from the descriptor pool as available resources allow. The implementation may use the `maxSets` value to allocate the initial available sets, but using zero is permitted.

- VK_DESCRIPTOR_POOL_CREATE_ALLOW_OVERALLOCATION_POOLS_BIT_NV specifies that the implementation should allow the application to allocate more descriptors from the pool than was specified by the VkDescriptorPoolSize::`descriptorCount` for any descriptor type as specified by VkDescriptorPoolCreateInfo::`poolSizeCount` and VkDescriptorPoolCreateInfo::`pPoolSizes`, as available resources allow. The implementation may use the `descriptorCount` for each descriptor type to allocate the initial pool, but the application is allowed to set the `poolSizeCount` to zero, or any of the `descriptorCount` values in the `pPoolSizes` array to zero.

    // Provided by VK_VERSION_1_0
    typedef VkFlags VkDescriptorPoolCreateFlags;

`VkDescriptorPoolCreateFlags` is a bitmask type for setting a mask of zero or more VkDescriptorPoolCreateFlagBits.

The `VkDescriptorPoolSize` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkDescriptorPoolSize {
        VkDescriptorType    type;
        uint32_t            descriptorCount;
    } VkDescriptorPoolSize;

- `type` is the type of descriptor.

- `descriptorCount` is the number of descriptors of that type to allocate. If `type` is VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK then `descriptorCount` is the number of bytes to allocate for descriptors of this type.

Note | When creating a descriptor pool that will contain descriptors for combined image samplers of multi-planar formats, an application needs to account for non-trivial descriptor consumption when choosing the `descriptorCount` value, as indicated by VkSamplerYcbcrConversionImageFormatProperties::`combinedImageSamplerDescriptorCount`. For simplicity the application can use the VkPhysicalDeviceMaintenance6Properties::`maxCombinedImageSamplerDescriptorCount` property, which is sized to accommodate any and all formats that require a sampler Y′CBCR conversion supported by the implementation.

Valid Usage

- VUID-VkDescriptorPoolSize-descriptorCount-00302
  `descriptorCount` must be greater than `0`

- VUID-VkDescriptorPoolSize-type-02218
  If `type` is VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK then `descriptorCount` must be a multiple of `4`

Valid Usage (Implicit)

- VUID-VkDescriptorPoolSize-type-parameter
  `type` must be a valid VkDescriptorType value

To destroy a descriptor pool, call:

    // Provided by VK_VERSION_1_0
    void vkDestroyDescriptorPool(
        VkDevice                                    device,
        VkDescriptorPool                            descriptorPool,
        const VkAllocationCallbacks*                pAllocator);

- `device` is the logical device that destroys the descriptor pool.

- `descriptorPool` is the descriptor pool to destroy.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

When a pool is destroyed, all descriptor sets allocated from the pool are implicitly freed and become invalid. Descriptor sets allocated from a given pool do not need to be freed before destroying that descriptor pool.

Valid Usage

- VUID-vkDestroyDescriptorPool-descriptorPool-00303
  All submitted commands that refer to `descriptorPool` (via any allocated descriptor sets) must have completed execution

- VUID-vkDestroyDescriptorPool-descriptorPool-00304
  If `VkAllocationCallbacks` were provided when `descriptorPool` was created, a compatible set of callbacks must be provided here

- VUID-vkDestroyDescriptorPool-descriptorPool-00305
  If no `VkAllocationCallbacks` were provided when `descriptorPool` was created, `pAllocator` must be `NULL`

Valid Usage (Implicit)

- VUID-vkDestroyDescriptorPool-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkDestroyDescriptorPool-descriptorPool-parameter
  If `descriptorPool` is not VK_NULL_HANDLE, `descriptorPool` must be a valid VkDescriptorPool handle

- VUID-vkDestroyDescriptorPool-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkDestroyDescriptorPool-descriptorPool-parent
  If `descriptorPool` is a valid handle, it must have been created, allocated, or retrieved from `device`

Host Synchronization

- Host access to `descriptorPool` must be externally synchronized

Descriptor sets are allocated from descriptor pool objects, and are represented by `VkDescriptorSet` handles:

    // Provided by VK_VERSION_1_0
    VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorSet)

To allocate descriptor sets from a descriptor pool, call:

    // Provided by VK_VERSION_1_0
    VkResult vkAllocateDescriptorSets(
        VkDevice                                    device,
        const VkDescriptorSetAllocateInfo*          pAllocateInfo,
        VkDescriptorSet*                            pDescriptorSets);

- `device` is the logical device that owns the descriptor pool.

- `pAllocateInfo` is a pointer to a VkDescriptorSetAllocateInfo structure describing parameters of the allocation.

- `pDescriptorSets` is a pointer to an array of VkDescriptorSet handles in which the resulting descriptor set objects are returned.

The allocated descriptor sets are returned in `pDescriptorSets`.

When a descriptor set is allocated, the initial state is largely uninitialized and all descriptors are undefined, with the exception that samplers with a non-null `pImmutableSamplers` are initialized on allocation. Descriptors also become undefined if the underlying resource or view object is destroyed. Descriptor sets containing undefined descriptors can still be bound and used, subject to the following conditions:

- For descriptor set bindings created with the VK_DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT bit set, all descriptors in that binding that are dynamically used must have been populated before the descriptor set is consumed.

- For descriptor set bindings created without the VK_DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT bit set, all descriptors in that binding that are statically used must have been populated before the descriptor set is consumed.

- Descriptor bindings with descriptor type of VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK can be undefined when the descriptor set is consumed; though values in that block will be undefined.

- Entries that are not used by a pipeline can have undefined descriptors.

If a call to `vkAllocateDescriptorSets` would cause the total number of descriptor sets allocated from the pool to exceed the value of VkDescriptorPoolCreateInfo::`maxSets` used to create `pAllocateInfo->descriptorPool`, then the allocation may fail due to lack of space in the descriptor pool. Similarly, the allocation may fail due to lack of space if the call to `vkAllocateDescriptorSets` would cause the number of any given descriptor type to exceed the sum of all the `descriptorCount` members of each element of VkDescriptorPoolCreateInfo::`pPoolSizes` with a `type` equal to that type.

Additionally, the allocation may also fail if a call to `vkAllocateDescriptorSets` would cause the total number of inline uniform block bindings allocated from the pool to exceed the value of VkDescriptorPoolInlineUniformBlockCreateInfo::`maxInlineUniformBlockBindings` used to create the descriptor pool.

If the allocation fails due to no more space in the descriptor pool, and not because of system or device memory exhaustion, then VK_ERROR_OUT_OF_POOL_MEMORY must be returned.

`vkAllocateDescriptorSets` can be used to create multiple descriptor sets. If the creation of any of those descriptor sets fails, then the implementation must destroy all successfully created descriptor set objects from this command, set all entries of the `pDescriptorSets` array to VK_NULL_HANDLE and return the error.

Valid Usage (Implicit)

- VUID-vkAllocateDescriptorSets-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkAllocateDescriptorSets-pAllocateInfo-parameter
  `pAllocateInfo` must be a valid pointer to a valid VkDescriptorSetAllocateInfo structure

- VUID-vkAllocateDescriptorSets-pDescriptorSets-parameter
  `pDescriptorSets` must be a valid pointer to an array of `pAllocateInfo->descriptorSetCount` VkDescriptorSet handles

- VUID-vkAllocateDescriptorSets-device-queuecount
  The device must have been created with at least `1` queue

- VUID-vkAllocateDescriptorSets-pAllocateInfo::descriptorSetCount-arraylength
  `pAllocateInfo->descriptorSetCount` must be greater than `0`

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_FRAGMENTED_POOL

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_OUT_OF_POOL_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkDescriptorSetAllocateInfo` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkDescriptorSetAllocateInfo {
        VkStructureType                 sType;
        const void*                     pNext;
        VkDescriptorPool                descriptorPool;
        uint32_t                        descriptorSetCount;
        const VkDescriptorSetLayout*    pSetLayouts;
    } VkDescriptorSetAllocateInfo;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `descriptorPool` is the pool which the sets will be allocated from.

- `descriptorSetCount` determines the number of descriptor sets to be allocated from the pool.

- `pSetLayouts` is a pointer to an array of descriptor set layouts, with each member specifying how the corresponding descriptor set is allocated.

Valid Usage

- VUID-VkDescriptorSetAllocateInfo-apiVersion-07895
  If the VK_KHR_maintenance1 extension is not enabled and VkPhysicalDeviceProperties::`apiVersion` is less than Vulkan 1.1, `descriptorSetCount` must not be greater than the number of sets that are currently available for allocation in `descriptorPool`

- VUID-VkDescriptorSetAllocateInfo-apiVersion-07896
  If the VK_KHR_maintenance1 extension is not enabled and VkPhysicalDeviceProperties::`apiVersion` is less than Vulkan 1.1, `descriptorPool` must have enough free descriptor capacity remaining to allocate the descriptor sets of the specified layouts

- VUID-VkDescriptorSetAllocateInfo-pSetLayouts-00308
  Each element of `pSetLayouts` must not have been created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT set

- VUID-VkDescriptorSetAllocateInfo-pSetLayouts-03044
  If any element of `pSetLayouts` was created with the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set, `descriptorPool` must have been created with the VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT flag set

- VUID-VkDescriptorSetAllocateInfo-pSetLayouts-09380
  If `pSetLayouts`[i] was created with an element of `pBindingFlags` that includes VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT, and VkDescriptorSetVariableDescriptorCountAllocateInfo is included in the `pNext` chain, and `VkDescriptorSetVariableDescriptorCountAllocateInfo`::`descriptorSetCount` is not zero, then VkDescriptorSetVariableDescriptorCountAllocateInfo::`pDescriptorCounts`[i] must be less than or equal to VkDescriptorSetLayoutBinding::`descriptorCount` for the corresponding binding used to create `pSetLayouts`[i]

- VUID-VkDescriptorSetAllocateInfo-pSetLayouts-04610
  If any element of `pSetLayouts` was created with the VK_DESCRIPTOR_SET_LAYOUT_CREATE_HOST_ONLY_POOL_BIT_EXT bit set, `descriptorPool` must have been created with the VK_DESCRIPTOR_POOL_CREATE_HOST_ONLY_BIT_EXT flag set

- VUID-VkDescriptorSetAllocateInfo-pSetLayouts-08009
  Each element of `pSetLayouts` must not have been created with the VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT bit set

Valid Usage (Implicit)

- VUID-VkDescriptorSetAllocateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO

- VUID-VkDescriptorSetAllocateInfo-pNext-pNext
  `pNext` must be `NULL` or a pointer to a valid instance of VkDescriptorSetVariableDescriptorCountAllocateInfo

- VUID-VkDescriptorSetAllocateInfo-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkDescriptorSetAllocateInfo-descriptorPool-parameter
  `descriptorPool` must be a valid VkDescriptorPool handle

- VUID-VkDescriptorSetAllocateInfo-pSetLayouts-parameter
  `pSetLayouts` must be a valid pointer to an array of `descriptorSetCount` valid VkDescriptorSetLayout handles

- VUID-VkDescriptorSetAllocateInfo-descriptorSetCount-arraylength
  `descriptorSetCount` must be greater than `0`

- VUID-VkDescriptorSetAllocateInfo-commonparent
  Both of `descriptorPool`, and the elements of `pSetLayouts` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `descriptorPool` must be externally synchronized

If the `pNext` chain of a VkDescriptorSetAllocateInfo structure includes a `VkDescriptorSetVariableDescriptorCountAllocateInfo` structure, then that structure includes an array of descriptor counts for variable-sized descriptor bindings, one for each descriptor set being allocated.

The `VkDescriptorSetVariableDescriptorCountAllocateInfo` structure is defined as:

    // Provided by VK_VERSION_1_2
    typedef struct VkDescriptorSetVariableDescriptorCountAllocateInfo {
        VkStructureType    sType;
        const void*        pNext;
        uint32_t           descriptorSetCount;
        const uint32_t*    pDescriptorCounts;
    } VkDescriptorSetVariableDescriptorCountAllocateInfo;

    // Provided by VK_EXT_descriptor_indexing
    // Equivalent to VkDescriptorSetVariableDescriptorCountAllocateInfo
    typedef VkDescriptorSetVariableDescriptorCountAllocateInfo VkDescriptorSetVariableDescriptorCountAllocateInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `descriptorSetCount` is zero or the number of elements in `pDescriptorCounts`.

- `pDescriptorCounts` is a pointer to an array of descriptor counts, with each member specifying the number of descriptors in a variable-sized descriptor binding in the corresponding descriptor set being allocated.

If `descriptorSetCount` is zero or this structure is not included in the `pNext` chain, then the variable lengths are considered to be zero. Otherwise, `pDescriptorCounts`[i] is the number of descriptors in the variable-sized descriptor binding in the corresponding descriptor set layout. If the variable-sized descriptor binding in the corresponding descriptor set layout has a descriptor type of VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK then `pDescriptorCounts`[i] specifies the binding’s capacity in bytes. If VkDescriptorSetAllocateInfo::`pSetLayouts`[i] does not include a variable-sized descriptor binding, then `pDescriptorCounts`[i] is ignored.

Valid Usage

- VUID-VkDescriptorSetVariableDescriptorCountAllocateInfo-descriptorSetCount-03045
  If `descriptorSetCount` is not zero, `descriptorSetCount` must equal VkDescriptorSetAllocateInfo::`descriptorSetCount`

Valid Usage (Implicit)

- VUID-VkDescriptorSetVariableDescriptorCountAllocateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO

- VUID-VkDescriptorSetVariableDescriptorCountAllocateInfo-pDescriptorCounts-parameter
  If `descriptorSetCount` is not `0`, `pDescriptorCounts` must be a valid pointer to an array of `descriptorSetCount` `uint32_t` values

Structure Chaining

Extends the structure

  - VkDescriptorSetAllocateInfo

To free allocated descriptor sets, call:

    // Provided by VK_VERSION_1_0
    VkResult vkFreeDescriptorSets(
        VkDevice                                    device,
        VkDescriptorPool                            descriptorPool,
        uint32_t                                    descriptorSetCount,
        const VkDescriptorSet*                      pDescriptorSets);

- `device` is the logical device that owns the descriptor pool.

- `descriptorPool` is the descriptor pool from which the descriptor sets were allocated.

- `descriptorSetCount` is the number of elements in the `pDescriptorSets` array.

- `pDescriptorSets` is a pointer to an array of handles to VkDescriptorSet objects.

After calling `vkFreeDescriptorSets`, all descriptor sets in `pDescriptorSets` are invalid.

Valid Usage

- VUID-vkFreeDescriptorSets-pDescriptorSets-00309
  All submitted commands that refer to any element of `pDescriptorSets` must have completed execution

- VUID-vkFreeDescriptorSets-pDescriptorSets-00310
  `pDescriptorSets` must be a valid pointer to an array of `descriptorSetCount` `VkDescriptorSet` handles, each element of which must either be a valid handle or VK_NULL_HANDLE

- VUID-vkFreeDescriptorSets-descriptorPool-00312
  `descriptorPool` must have been created with the VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT flag

Valid Usage (Implicit)

- VUID-vkFreeDescriptorSets-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkFreeDescriptorSets-descriptorPool-parameter
  `descriptorPool` must be a valid VkDescriptorPool handle

- VUID-vkFreeDescriptorSets-descriptorSetCount-arraylength
  `descriptorSetCount` must be greater than `0`

- VUID-vkFreeDescriptorSets-descriptorPool-parent
  `descriptorPool` must have been created, allocated, or retrieved from `device`

- VUID-vkFreeDescriptorSets-pDescriptorSets-parent
  Each element of `pDescriptorSets` that is a valid handle must have been created, allocated, or retrieved from `descriptorPool`

Host Synchronization

- Host access to `descriptorPool` must be externally synchronized

- Host access to each member of `pDescriptorSets` must be externally synchronized

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

To return all descriptor sets allocated from a given pool to the pool, rather than freeing individual descriptor sets, call:

    // Provided by VK_VERSION_1_0
    VkResult vkResetDescriptorPool(
        VkDevice                                    device,
        VkDescriptorPool                            descriptorPool,
        VkDescriptorPoolResetFlags                  flags);

- `device` is the logical device that owns the descriptor pool.

- `descriptorPool` is the descriptor pool to be reset.

- `flags` is reserved for future use.

Resetting a descriptor pool recycles all of the resources from all of the descriptor sets allocated from the descriptor pool back to the descriptor pool, and the descriptor sets are implicitly freed.

Valid Usage

- VUID-vkResetDescriptorPool-descriptorPool-00313
  All uses of `descriptorPool` (via any allocated descriptor sets) must have completed execution

Valid Usage (Implicit)

- VUID-vkResetDescriptorPool-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkResetDescriptorPool-descriptorPool-parameter
  `descriptorPool` must be a valid VkDescriptorPool handle

- VUID-vkResetDescriptorPool-flags-zerobitmask
  `flags` must be `0`

- VUID-vkResetDescriptorPool-descriptorPool-parent
  `descriptorPool` must have been created, allocated, or retrieved from `device`

Host Synchronization

- Host access to `descriptorPool` must be externally synchronized

- Host access to any `VkDescriptorSet` objects allocated from `descriptorPool` must be externally synchronized

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

    // Provided by VK_VERSION_1_0
    typedef VkFlags VkDescriptorPoolResetFlags;

`VkDescriptorPoolResetFlags` is a bitmask type for setting a mask, but is currently reserved for future use.

### 17.4. Descriptor Set Updates

Once allocated, descriptor sets can be updated with a combination of write and copy operations. To update descriptor sets, call:

    // Provided by VK_VERSION_1_0
    void vkUpdateDescriptorSets(
        VkDevice                                    device,
        uint32_t                                    descriptorWriteCount,
        const VkWriteDescriptorSet*                 pDescriptorWrites,
        uint32_t                                    descriptorCopyCount,
        const VkCopyDescriptorSet*                  pDescriptorCopies);

- `device` is the logical device that updates the descriptor sets.

- `descriptorWriteCount` is the number of elements in the `pDescriptorWrites` array.

- `pDescriptorWrites` is a pointer to an array of VkWriteDescriptorSet structures describing the descriptor sets to write to.

- `descriptorCopyCount` is the number of elements in the `pDescriptorCopies` array.

- `pDescriptorCopies` is a pointer to an array of VkCopyDescriptorSet structures describing the descriptor sets to copy between.

The operations described by `pDescriptorWrites` are performed first, followed by the operations described by `pDescriptorCopies`. Within each array, the operations are performed in the order they appear in the array.

Each element in the `pDescriptorWrites` array describes an operation updating the descriptor set using descriptors for resources specified in the structure.

Each element in the `pDescriptorCopies` array is a VkCopyDescriptorSet structure describing an operation copying descriptors between sets.

If the `dstSet` member of any element of `pDescriptorWrites` or `pDescriptorCopies` is bound, accessed, or modified by any command that was recorded to a command buffer which is currently in the recording or executable state, and any of the descriptor bindings that are updated were not created with the VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT or VK_DESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT bits set, that command buffer becomes invalid.

Copying a descriptor from a descriptor set does not constitute a use of the referenced resource or view, as it is the reference itself that is copied. Applications can copy a descriptor referencing a destroyed resource, and it can copy an undefined descriptor. The destination descriptor becomes undefined in both cases.

Valid Usage

- VUID-vkUpdateDescriptorSets-pDescriptorWrites-06236
  For each element i where `pDescriptorWrites`[i].`descriptorType` is VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER or VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, elements of the `pTexelBufferView` member of `pDescriptorWrites`[i] must have been created on `device`

- VUID-vkUpdateDescriptorSets-pDescriptorWrites-06237
  For each element i where `pDescriptorWrites`[i].`descriptorType` is VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, or VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC, the `buffer` member of any element of the `pBufferInfo` member of `pDescriptorWrites`[i] must have been created on `device`

- VUID-vkUpdateDescriptorSets-pDescriptorWrites-06238
  For each element i where `pDescriptorWrites`[i].`descriptorType` is VK_DESCRIPTOR_TYPE_SAMPLER or VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, and `dstSet` was not allocated with a layout that included immutable samplers for `dstBinding` with `descriptorType`, the `sampler` member of any element of the `pImageInfo` member of `pDescriptorWrites`[i] must have been created on `device`

- VUID-vkUpdateDescriptorSets-pDescriptorWrites-06239
  For each element i where `pDescriptorWrites`[i].`descriptorType` is VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM, or VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER the `imageView` member of any element of `pDescriptorWrites`[i] must have been created on `device`

- VUID-vkUpdateDescriptorSets-pDescriptorWrites-06240
  For each element i where `pDescriptorWrites`[i].`descriptorType` is VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR, elements of the `pAccelerationStructures` member of a VkWriteDescriptorSetAccelerationStructureKHR structure in the `pNext` chain of `pDescriptorWrites`[i] must have been created on `device`

- VUID-vkUpdateDescriptorSets-pDescriptorWrites-06241
  For each element i where `pDescriptorWrites`[i].`descriptorType` is VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV, elements of the `pAccelerationStructures` member of a VkWriteDescriptorSetAccelerationStructureNV structure in the `pNext` chain of `pDescriptorWrites`[i] must have been created on `device`

- VUID-vkUpdateDescriptorSets-pDescriptorWrites-12324
  For each element i where `pDescriptorWrites`[i].`descriptorType` is VK_DESCRIPTOR_TYPE_TENSOR_ARM, elements of the `pTensorViews` member of a VkWriteDescriptorSetTensorARM structure in the `pNext` chain of `pDescriptorWrites`[i] must have been created on `device`

- VUID-vkUpdateDescriptorSets-pDescriptorWrites-06493
  For each element i where `pDescriptorWrites`[i].`descriptorType` is VK_DESCRIPTOR_TYPE_SAMPLER, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM, or VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, `pDescriptorWrites`[i].`pImageInfo` must be a valid pointer to an array of `pDescriptorWrites`[i].`descriptorCount` valid `VkDescriptorImageInfo` structures

- VUID-vkUpdateDescriptorSets-None-03047
  The `dstSet` member of each element of `pDescriptorWrites` or `pDescriptorCopies` for bindings which were created without the VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT or VK_DESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT bits set must not be used by any command that was recorded to a command buffer which is in the pending state

- VUID-vkUpdateDescriptorSets-pDescriptorWrites-06993
  Host access to `pDescriptorWrites`[i].`dstSet` and `pDescriptorCopies`[i].`dstSet` must be externally synchronized unless explicitly denoted otherwise for specific flags

Valid Usage (Implicit)

- VUID-vkUpdateDescriptorSets-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkUpdateDescriptorSets-pDescriptorWrites-parameter
  If `descriptorWriteCount` is not `0`, `pDescriptorWrites` must be a valid pointer to an array of `descriptorWriteCount` valid VkWriteDescriptorSet structures

- VUID-vkUpdateDescriptorSets-pDescriptorCopies-parameter
  If `descriptorCopyCount` is not `0`, `pDescriptorCopies` must be a valid pointer to an array of `descriptorCopyCount` valid VkCopyDescriptorSet structures

The `VkWriteDescriptorSet` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkWriteDescriptorSet {
        VkStructureType                  sType;
        const void*                      pNext;
        VkDescriptorSet                  dstSet;
        uint32_t                         dstBinding;
        uint32_t                         dstArrayElement;
        uint32_t                         descriptorCount;
        VkDescriptorType                 descriptorType;
        const VkDescriptorImageInfo*     pImageInfo;
        const VkDescriptorBufferInfo*    pBufferInfo;
        const VkBufferView*              pTexelBufferView;
    } VkWriteDescriptorSet;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `dstSet` is the destination descriptor set to update.

- `dstBinding` is the descriptor binding within that set.

- `dstArrayElement` is the starting element in that array. If the descriptor binding identified by `dstSet` and `dstBinding` has a descriptor type of VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK then `dstArrayElement` specifies the starting byte offset within the binding.

- `descriptorCount` is the number of descriptors to update. If the descriptor binding identified by `dstSet` and `dstBinding` has a descriptor type of VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK, then `descriptorCount` specifies the number of bytes to update. Otherwise, `descriptorCount` is one of

  - the number of elements in `pImageInfo`

  - the number of elements in `pBufferInfo`

  - the number of elements in `pTexelBufferView`

  - a value matching the `dataSize` member of a VkWriteDescriptorSetInlineUniformBlock structure in the `pNext` chain

  - a value matching the `accelerationStructureCount` of a VkWriteDescriptorSetAccelerationStructureKHR or VkWriteDescriptorSetAccelerationStructureNV structure in the `pNext` chain

  - a value matching the `descriptorCount` of a VkWriteDescriptorSetTensorARM structure in the `pNext` chain

- `descriptorType` is a VkDescriptorType specifying the type of each descriptor in `pImageInfo`, `pBufferInfo`, or `pTexelBufferView`, as described below. If `VkDescriptorSetLayoutBinding` for `dstSet` at `dstBinding` is not equal to VK_DESCRIPTOR_TYPE_MUTABLE_EXT, `descriptorType` must be the same type as the `descriptorType` specified in `VkDescriptorSetLayoutBinding` for `dstSet` at `dstBinding`. The type of the descriptor also controls which array the descriptors are taken from.

- `pImageInfo` is a pointer to an array of VkDescriptorImageInfo structures or is ignored, as described below.

- `pBufferInfo` is a pointer to an array of VkDescriptorBufferInfo structures or is ignored, as described below.

- `pTexelBufferView` is a pointer to an array of VkBufferView handles as described in the Buffer Views section or is ignored, as described below.

Members of `pImageInfo`, `pBufferInfo` and `pTexelBufferView` are only accessed by the implementation when they correspond to a descriptor type being defined - otherwise they are ignored. The members accessed are as follows for each descriptor type:

- For VK_DESCRIPTOR_TYPE_SAMPLER, only the `sampler` member of each element of VkWriteDescriptorSet::`pImageInfo` is accessed.

- For VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, or VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, only the `imageView` and `imageLayout` members of each element of VkWriteDescriptorSet::`pImageInfo` are accessed.

- For VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, all members of each element of VkWriteDescriptorSet::`pImageInfo` are accessed.

- For VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, or VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC, all members of each element of VkWriteDescriptorSet::`pBufferInfo` are accessed.

- For VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER or VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, each element of VkWriteDescriptorSet::`pTexelBufferView` is accessed.

When updating descriptor sets with a `descriptorType` of VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK, none of the `pImageInfo`, `pBufferInfo`, or `pTexelBufferView` members are accessed, instead the source data of the descriptor update operation is taken from the VkWriteDescriptorSetInlineUniformBlock structure in the `pNext` chain of `VkWriteDescriptorSet`. When updating descriptor sets with a `descriptorType` of VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR, none of the `pImageInfo`, `pBufferInfo`, or `pTexelBufferView` members are accessed, instead the source data of the descriptor update operation is taken from the VkWriteDescriptorSetAccelerationStructureKHR structure in the `pNext` chain of `VkWriteDescriptorSet`. When updating descriptor sets with a `descriptorType` of VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV, none of the `pImageInfo`, `pBufferInfo`, or `pTexelBufferView` members are accessed, instead the source data of the descriptor update operation is taken from the VkWriteDescriptorSetAccelerationStructureNV structure in the `pNext` chain of `VkWriteDescriptorSet`. When updating descriptor sets with a `descriptorType` of VK_DESCRIPTOR_TYPE_TENSOR_ARM, none of the `pImageInfo`, `pBufferInfo`, or `pTexelBufferView` members are accessed, instead the source data of the descriptor update operation is taken from the instance of VkWriteDescriptorSetTensorARM in the `pNext` chain of VkWriteDescriptorSet.

If the `nullDescriptor` feature is enabled, the buffer, acceleration structure, tensor, imageView, or bufferView can be VK_NULL_HANDLE. Loads from a null descriptor return zero values and stores and atomics to a null descriptor are discarded. A null acceleration structure descriptor results in the miss shader being invoked.

If the destination descriptor is a mutable descriptor, the active descriptor type for the destination descriptor becomes `descriptorType`.

### Consecutive Binding Updates

If the `dstBinding` has fewer than `descriptorCount` array elements remaining starting from `dstArrayElement`, then the remainder will be used to update the subsequent binding - `dstBinding`+1 starting at array element zero. If a binding has a `descriptorCount` of zero, it is skipped. This behavior applies recursively, with the update affecting consecutive bindings as needed to update all `descriptorCount` descriptors. Consecutive bindings must have identical VkDescriptorType, VkShaderStageFlags, VkDescriptorBindingFlagBits, and immutable samplers references. In addition, if the VkDescriptorType is VK_DESCRIPTOR_TYPE_MUTABLE_EXT, the supported descriptor types in VkMutableDescriptorTypeCreateInfoEXT must be equally defined.

Note | The same behavior applies to bindings with a descriptor type of VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK where `descriptorCount` specifies the number of bytes to update while `dstArrayElement` specifies the starting byte offset, thus in this case if the `dstBinding` has a smaller byte size than the sum of `dstArrayElement` and `descriptorCount`, then the remainder will be used to update the subsequent binding - `dstBinding`+1 starting at offset zero. This falls out as a special case of the above rule.

Valid Usage

- VUID-VkWriteDescriptorSet-dstBinding-00315
  `dstBinding` must be less than or equal to the maximum value of `binding` of all VkDescriptorSetLayoutBinding structures specified when `dstSet`’s descriptor set layout was created

- VUID-VkWriteDescriptorSet-dstBinding-00316
  `dstBinding` must be a binding with a non-zero `descriptorCount`

- VUID-VkWriteDescriptorSet-dstBinding-10009
  `dstBinding` must be a binding with a non-zero VkDescriptorSetLayoutCreateInfo::`bindingCount`

- VUID-VkWriteDescriptorSet-descriptorCount-00317
  All consecutive bindings updated via a single `VkWriteDescriptorSet` structure, except those with a `descriptorCount` of zero, must have identical `descriptorType`

- VUID-VkWriteDescriptorSet-descriptorCount-10776
  All consecutive bindings updated via a single `VkWriteDescriptorSet` structure, except those with a `descriptorCount` of zero, must have identical `stageFlags`

- VUID-VkWriteDescriptorSet-descriptorCount-00318
  All consecutive bindings updated via a single `VkWriteDescriptorSet` structure, except those with a `descriptorCount` of zero, must all either use immutable samplers or must all not use immutable samplers

- VUID-VkWriteDescriptorSet-descriptorCount-10777
  All consecutive bindings updated via a single `VkWriteDescriptorSet` structure, except those with a `descriptorCount` of zero, must have identical VkDescriptorBindingFlagBits

- VUID-VkWriteDescriptorSet-descriptorType-00319
  `descriptorType` must match the type of `dstBinding` within `dstSet`

- VUID-VkWriteDescriptorSet-dstSet-00320
  `dstSet` must be a valid VkDescriptorSet handle

- VUID-VkWriteDescriptorSet-dstArrayElement-00321
  The sum of `dstArrayElement` and `descriptorCount` must be less than or equal to the number of array elements in the descriptor set binding specified by `dstBinding`, and all applicable consecutive bindings

- VUID-VkWriteDescriptorSet-descriptorType-02219
  If `descriptorType` is VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK, `dstArrayElement` must be an integer multiple of `4`

- VUID-VkWriteDescriptorSet-descriptorType-02220
  If `descriptorType` is VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK, `descriptorCount` must be an integer multiple of `4`

- VUID-VkWriteDescriptorSet-descriptorType-02994
  If `descriptorType` is VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER or VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, each element of `pTexelBufferView` must be either a valid `VkBufferView` handle or VK_NULL_HANDLE

- VUID-VkWriteDescriptorSet-descriptorType-02995
  If `descriptorType` is VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER or VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER and the `nullDescriptor` feature is not enabled, each element of `pTexelBufferView` must not be VK_NULL_HANDLE

- VUID-VkWriteDescriptorSet-descriptorType-00324
  If `descriptorType` is VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, or VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC, `pBufferInfo` must be a valid pointer to an array of `descriptorCount` valid `VkDescriptorBufferInfo` structures

- VUID-VkWriteDescriptorSet-descriptorType-00325
  If `descriptorType` is VK_DESCRIPTOR_TYPE_SAMPLER or VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, and `dstSet` was not allocated with a layout that included immutable samplers for `dstBinding` with `descriptorType`, the `sampler` member of each element of `pImageInfo` must be a valid `VkSampler` object

- VUID-VkWriteDescriptorSet-descriptorType-02996
  If `descriptorType` is VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, or VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, the `imageView` member of each element of `pImageInfo` must be either a valid `VkImageView` handle or VK_NULL_HANDLE

- VUID-VkWriteDescriptorSet-descriptorType-02997
  If `descriptorType` is VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, or VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, and the `nullDescriptor` feature is not enabled, the `imageView` member of each element of `pImageInfo` must not be VK_NULL_HANDLE

- VUID-VkWriteDescriptorSet-descriptorType-07683
  If `descriptorType` is VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM, or VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, then the `imageView` member of each element of `pImageInfo` must not be VK_NULL_HANDLE

- VUID-VkWriteDescriptorSet-descriptorType-02221
  If `descriptorType` is VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK, the `pNext` chain must include a VkWriteDescriptorSetInlineUniformBlock structure whose `dataSize` member equals `descriptorCount`

- VUID-VkWriteDescriptorSet-descriptorType-02382
  If `descriptorType` is VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR, the `pNext` chain must include a VkWriteDescriptorSetAccelerationStructureKHR structure whose `accelerationStructureCount` member equals `descriptorCount`

- VUID-VkWriteDescriptorSet-descriptorType-03817
  If `descriptorType` is VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV, the `pNext` chain must include a VkWriteDescriptorSetAccelerationStructureNV structure whose `accelerationStructureCount` member equals `descriptorCount`

- VUID-VkWriteDescriptorSet-descriptorType-09945
  If `descriptorType` is VK_DESCRIPTOR_TYPE_TENSOR_ARM, the `pNext` chain must include a VkWriteDescriptorSetTensorARM structure whose `tensorViewCount` member equals `descriptorCount`

- VUID-VkWriteDescriptorSet-descriptorType-01946
  If `descriptorType` is VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, then the `imageView` member of each `pImageInfo` element must have been created without a `VkSamplerYcbcrConversionInfo` structure in its `pNext` chain

- VUID-VkWriteDescriptorSet-descriptorType-02738
  If `descriptorType` is VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, and if any element of `pImageInfo` has an `imageView` member that was created with a `VkSamplerYcbcrConversionInfo` structure in its `pNext` chain, then `dstSet` must have been allocated with a layout that included immutable samplers for `dstBinding`, and the corresponding immutable sampler must have been created with an identically defined `VkSamplerYcbcrConversionInfo` object

- VUID-VkWriteDescriptorSet-descriptorType-01948
  If `descriptorType` is VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, and `dstSet` was allocated with a layout that included immutable samplers for `dstBinding`, then the `imageView` member of each element of `pImageInfo` which corresponds to an immutable sampler that enables sampler Y′CBCR conversion must have been created with a `VkSamplerYcbcrConversionInfo` structure in its `pNext` chain with an identically defined `VkSamplerYcbcrConversionInfo` to the corresponding immutable sampler

- VUID-VkWriteDescriptorSet-descriptorType-09506
  If `descriptorType` is VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, `dstSet` was allocated with a layout that included immutable samplers for `dstBinding`, and those samplers enable sampler Y′CBCR conversion, then `imageView` must not be VK_NULL_HANDLE

- VUID-VkWriteDescriptorSet-descriptorType-00327
  If `descriptorType` is VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER or VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, the `offset` member of each element of `pBufferInfo` must be a multiple of `VkPhysicalDeviceLimits`::`minUniformBufferOffsetAlignment`

- VUID-VkWriteDescriptorSet-descriptorType-00328
  If `descriptorType` is VK_DESCRIPTOR_TYPE_STORAGE_BUFFER or VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC, the `offset` member of each element of `pBufferInfo` must be a multiple of `VkPhysicalDeviceLimits`::`minStorageBufferOffsetAlignment`

- VUID-VkWriteDescriptorSet-descriptorType-00329
  If `descriptorType` is VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, or VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC, and the `buffer` member of any element of `pBufferInfo` is the handle of a non-sparse buffer, then that buffer must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-VkWriteDescriptorSet-descriptorType-00330
  If `descriptorType` is VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER or VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, the `buffer` member of each element of `pBufferInfo` must have been created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-VkWriteDescriptorSet-descriptorType-00331
  If `descriptorType` is VK_DESCRIPTOR_TYPE_STORAGE_BUFFER or VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC, the `buffer` member of each element of `pBufferInfo` must have been created with the VK_BUFFER_USAGE_STORAGE_BUFFER_BIT usage flag set

- VUID-VkWriteDescriptorSet-descriptorType-00332
  If `descriptorType` is VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER or VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, the `range` member of each element of `pBufferInfo`, or the effective range if `range` is VK_WHOLE_SIZE, must be less than or equal to `VkPhysicalDeviceLimits`::`maxUniformBufferRange`

- VUID-VkWriteDescriptorSet-descriptorType-00333
  If `descriptorType` is VK_DESCRIPTOR_TYPE_STORAGE_BUFFER or VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC, and the `shader64BitIndexing` feature is not enabled, the `range` member of each element of `pBufferInfo`, or the effective range if `range` is VK_WHOLE_SIZE, must be less than or equal to `VkPhysicalDeviceLimits`::`maxStorageBufferRange`

- VUID-VkWriteDescriptorSet-descriptorType-08765
  If `descriptorType` is VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER, the `pTexelBufferView` buffer view usage must include VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT

- VUID-VkWriteDescriptorSet-descriptorType-08766
  If `descriptorType` is VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, the `pTexelBufferView` buffer view usage must include VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT

- VUID-VkWriteDescriptorSet-descriptorType-00336
  If `descriptorType` is VK_DESCRIPTOR_TYPE_STORAGE_IMAGE or VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, the `imageView` member of each element of `pImageInfo` must have been created with the identity swizzle

- VUID-VkWriteDescriptorSet-descriptorType-00337
  If `descriptorType` is VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE or VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, the `imageView` member of each element of `pImageInfo` must have been created with the VK_IMAGE_USAGE_SAMPLED_BIT usage flag set

- VUID-VkWriteDescriptorSet-descriptorType-04149
  If `descriptorType` is VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE the `imageLayout` member of each element of `pImageInfo` must be a member of the list given in Sampled Image

- VUID-VkWriteDescriptorSet-descriptorType-04150
  If `descriptorType` is VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER the `imageLayout` member of each element of `pImageInfo` must be a member of the list given in Combined Image Sampler

- VUID-VkWriteDescriptorSet-descriptorType-04151
  If `descriptorType` is VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT the `imageLayout` member of each element of `pImageInfo` must be a member of the list given in Input Attachment

- VUID-VkWriteDescriptorSet-descriptorType-04152
  If `descriptorType` is VK_DESCRIPTOR_TYPE_STORAGE_IMAGE the `imageLayout` member of each element of `pImageInfo` must be a member of the list given in Storage Image

- VUID-VkWriteDescriptorSet-descriptorType-00338
  If `descriptorType` is VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, the `imageView` member of each element of `pImageInfo` must have been created with the VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT usage flag set

- VUID-VkWriteDescriptorSet-descriptorType-00339
  If `descriptorType` is VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, the `imageView` member of each element of `pImageInfo` must have been created with the VK_IMAGE_USAGE_STORAGE_BIT usage flag set

- VUID-VkWriteDescriptorSet-descriptorType-02752
  If `descriptorType` is VK_DESCRIPTOR_TYPE_SAMPLER, then `dstSet` must not have been allocated with a layout that included immutable samplers for `dstBinding`

- VUID-VkWriteDescriptorSet-dstSet-04611
  If the `VkDescriptorSetLayoutBinding` for `dstSet` at `dstBinding` is VK_DESCRIPTOR_TYPE_MUTABLE_EXT, the new active descriptor type `descriptorType` must exist in the corresponding `pMutableDescriptorTypeLists` list for `dstBinding`

- VUID-VkWriteDescriptorSet-descriptorType-06450
  If `descriptorType` is VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, the `imageView` member of each element of `pImageInfo` must have either been created without a VkImageViewMinLodCreateInfoEXT included in the `pNext` chain or with a VkImageViewMinLodCreateInfoEXT::`minLod` of `0.0`

- VUID-VkWriteDescriptorSet-descriptorType-06942
  If `descriptorType` is VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM, the `imageView` member of each element of `pImageInfo` must have been created with a view created with an `image` created with the VK_IMAGE_USAGE_SAMPLE_WEIGHT_BIT_QCOM usage flag set

- VUID-VkWriteDescriptorSet-descriptorType-06943
  If `descriptorType` is VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM, the `imageView` member of each element of `pImageInfo` must have been created with a view created with an `image` created with the VK_IMAGE_USAGE_SAMPLE_BLOCK_MATCH_BIT_QCOM usage flag set

Valid Usage (Implicit)

- VUID-VkWriteDescriptorSet-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET

- VUID-VkWriteDescriptorSet-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkWriteDescriptorSetAccelerationStructureKHR, VkWriteDescriptorSetAccelerationStructureNV, VkWriteDescriptorSetInlineUniformBlock, VkWriteDescriptorSetPartitionedAccelerationStructureNV, or VkWriteDescriptorSetTensorARM

- VUID-VkWriteDescriptorSet-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkWriteDescriptorSet-descriptorType-parameter
  `descriptorType` must be a valid VkDescriptorType value

- VUID-VkWriteDescriptorSet-descriptorCount-arraylength
  `descriptorCount` must be greater than `0`

- VUID-VkWriteDescriptorSet-commonparent
  Both of `dstSet`, and the elements of `pTexelBufferView` that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevice

The `VkDescriptorBufferInfo` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkDescriptorBufferInfo {
        VkBuffer        buffer;
        VkDeviceSize    offset;
        VkDeviceSize    range;
    } VkDescriptorBufferInfo;

- `buffer` is VK_NULL_HANDLE or the buffer resource.

- `offset` is the offset in bytes from the start of `buffer`. Access to buffer memory via this descriptor uses addressing that is relative to this starting offset.

- `range` is the size in bytes that is used for this descriptor update, or VK_WHOLE_SIZE to use the range from `offset` to the end of the buffer.

  Note | When setting `range` to VK_WHOLE_SIZE, the effective range must not be larger than the maximum range for the descriptor type (`maxUniformBufferRange` or `maxStorageBufferRange`). This means that VK_WHOLE_SIZE is not typically useful in the common case where uniform buffer descriptors are suballocated from a buffer that is much larger than `maxUniformBufferRange`.

For VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC and VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC descriptor types, `offset` is the base offset from which the dynamic offset is applied and `range` is the static size used for all dynamic offsets.

When `range` is VK_WHOLE_SIZE the effective range is calculated at vkUpdateDescriptorSets is by taking the size of `buffer` minus the `offset`.

Valid Usage

- VUID-VkDescriptorBufferInfo-offset-00340
  `offset` must be less than the size of `buffer`

- VUID-VkDescriptorBufferInfo-range-00341
  If `range` is not equal to VK_WHOLE_SIZE, `range` must be greater than `0`

- VUID-VkDescriptorBufferInfo-range-00342
  If `range` is not equal to VK_WHOLE_SIZE, `range` must be less than or equal to the size of `buffer` minus `offset`

- VUID-VkDescriptorBufferInfo-buffer-02998
  If the `nullDescriptor` feature is not enabled, `buffer` must not be VK_NULL_HANDLE

- VUID-VkDescriptorBufferInfo-buffer-02999
  If `buffer` is VK_NULL_HANDLE, `offset` must be zero and `range` must be VK_WHOLE_SIZE

Valid Usage (Implicit)

- VUID-VkDescriptorBufferInfo-buffer-parameter
  If `buffer` is not VK_NULL_HANDLE, `buffer` must be a valid VkBuffer handle

The `VkDescriptorImageInfo` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkDescriptorImageInfo {
        VkSampler        sampler;
        VkImageView      imageView;
        VkImageLayout    imageLayout;
    } VkDescriptorImageInfo;

- `sampler` is a sampler handle, and is used in descriptor updates for types VK_DESCRIPTOR_TYPE_SAMPLER and VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER if the binding being updated does not use immutable samplers.

- `imageView` is VK_NULL_HANDLE or an image view handle, and is used in descriptor updates for types VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, and VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT.

- `imageLayout` is the layout that the image subresources accessible from `imageView` will be in at the time this descriptor is accessed. `imageLayout` is used in descriptor updates for types VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, and VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT.

Members of `VkDescriptorImageInfo` that are not used in an update (as described above) are ignored.

Valid Usage

- VUID-VkDescriptorImageInfo-imageView-06712
  `imageView` must not be a 2D array image view created from a 3D image

- VUID-VkDescriptorImageInfo-imageView-07795
  If `imageView` is a 2D view created from a 3D image, then `descriptorType` must be VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, or VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER

- VUID-VkDescriptorImageInfo-imageView-07796
  If `imageView` is a 2D view created from a 3D image, then the image must have been created with VK_IMAGE_CREATE_2D_VIEW_COMPATIBLE_BIT_EXT set

- VUID-VkDescriptorImageInfo-descriptorType-06713
  If the `image2DViewOf3D` feature is not enabled or `descriptorType` is not VK_DESCRIPTOR_TYPE_STORAGE_IMAGE then `imageView` must not be a 2D view created from a 3D image

- VUID-VkDescriptorImageInfo-descriptorType-06714
  If the `sampler2DViewOf3D` feature is not enabled or `descriptorType` is not VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE or VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER then `imageView` must not be a 2D view created from a 3D image

- VUID-VkDescriptorImageInfo-imageView-01976
  If `imageView` is created from a depth/stencil image, the `aspectMask` used to create the `imageView` must include either VK_IMAGE_ASPECT_DEPTH_BIT or VK_IMAGE_ASPECT_STENCIL_BIT but not both

- VUID-VkDescriptorImageInfo-imageLayout-09425
  If `imageLayout` is VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, then the `aspectMask` used to create `imageView` must not include either VK_IMAGE_ASPECT_DEPTH_BIT or VK_IMAGE_ASPECT_STENCIL_BIT

- VUID-VkDescriptorImageInfo-imageLayout-09426
  If `imageLayout` is VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL, VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL, VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL, VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL, VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL, VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL or VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, then the `aspectMask` used to create `imageView` must not include VK_IMAGE_ASPECT_COLOR_BIT

- VUID-VkDescriptorImageInfo-sampler-01564
  If `sampler` is used and the VkFormat of the image is a multi-planar format, the image must have been created with VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT, and the `aspectMask` of the `imageView` must be a valid multi-planar aspect mask bit

- VUID-VkDescriptorImageInfo-mutableComparisonSamplers-04450
  If the `VK_KHR_portability_subset` extension is enabled, and VkPhysicalDevicePortabilitySubsetFeaturesKHR::`mutableComparisonSamplers` is VK_FALSE, then `sampler` must have been created with VkSamplerCreateInfo::`compareEnable` set to VK_FALSE

Valid Usage (Implicit)

- VUID-VkDescriptorImageInfo-commonparent
  Both of `imageView`, and `sampler` that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevice

If the `descriptorType` member of VkWriteDescriptorSet is VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK then the data to write to the descriptor set is specified through a `VkWriteDescriptorSetInlineUniformBlock` structure included in the `pNext` chain of `VkWriteDescriptorSet`.

The `VkWriteDescriptorSetInlineUniformBlock` structure is defined as:

    // Provided by VK_VERSION_1_3
    typedef struct VkWriteDescriptorSetInlineUniformBlock {
        VkStructureType    sType;
        const void*        pNext;
        uint32_t           dataSize;
        const void*        pData;
    } VkWriteDescriptorSetInlineUniformBlock;

    // Provided by VK_EXT_inline_uniform_block
    // Equivalent to VkWriteDescriptorSetInlineUniformBlock
    typedef VkWriteDescriptorSetInlineUniformBlock VkWriteDescriptorSetInlineUniformBlockEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `dataSize` is the number of bytes of inline uniform block data pointed to by `pData`.

- `pData` is a pointer to `dataSize` number of bytes of data to write to the inline uniform block.

Valid Usage

- VUID-VkWriteDescriptorSetInlineUniformBlock-dataSize-02222
  `dataSize` must be an integer multiple of `4`

Valid Usage (Implicit)

- VUID-VkWriteDescriptorSetInlineUniformBlock-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_INLINE_UNIFORM_BLOCK

- VUID-VkWriteDescriptorSetInlineUniformBlock-pData-parameter
  `pData` must be a valid pointer to an array of `dataSize` bytes

- VUID-VkWriteDescriptorSetInlineUniformBlock-dataSize-arraylength
  `dataSize` must be greater than `0`

Structure Chaining

Extends the structure

  - VkWriteDescriptorSet

The `VkWriteDescriptorSetAccelerationStructureKHR` structure is defined as:

    // Provided by VK_KHR_acceleration_structure
    typedef struct VkWriteDescriptorSetAccelerationStructureKHR {
        VkStructureType                      sType;
        const void*                          pNext;
        uint32_t                             accelerationStructureCount;
        const VkAccelerationStructureKHR*    pAccelerationStructures;
    } VkWriteDescriptorSetAccelerationStructureKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `accelerationStructureCount` is the number of elements in `pAccelerationStructures`.

- `pAccelerationStructures` is a pointer to an array of VkAccelerationStructureKHR structures specifying the acceleration structures to update.

Valid Usage

- VUID-VkWriteDescriptorSetAccelerationStructureKHR-pAccelerationStructures-03579
  Each acceleration structure in `pAccelerationStructures` must have been created with a `type` of VK_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR or VK_ACCELERATION_STRUCTURE_TYPE_GENERIC_KHR

- VUID-VkWriteDescriptorSetAccelerationStructureKHR-pAccelerationStructures-03580
  If the `nullDescriptor` feature is not enabled, each element of `pAccelerationStructures` must not be VK_NULL_HANDLE

Valid Usage (Implicit)

- VUID-VkWriteDescriptorSetAccelerationStructureKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_KHR

- VUID-VkWriteDescriptorSetAccelerationStructureKHR-pAccelerationStructures-parameter
  `pAccelerationStructures` must be a valid pointer to an array of `accelerationStructureCount` valid or VK_NULL_HANDLE VkAccelerationStructureKHR handles

- VUID-VkWriteDescriptorSetAccelerationStructureKHR-accelerationStructureCount-arraylength
  `accelerationStructureCount` must be greater than `0`

Structure Chaining

Extends the structure

  - VkWriteDescriptorSet

If the `descriptorType` member of VkWriteDescriptorSet is VK_DESCRIPTOR_TYPE_PARTITIONED_ACCELERATION_STRUCTURE_NV, then the data to write to the descriptor set is specified through a `VkWriteDescriptorSetPartitionedAccelerationStructureNV` structure included in the `pNext` chain of `VkWriteDescriptorSet`.

The `VkWriteDescriptorSetPartitionedAccelerationStructureNV` structure is defined as:

    // Provided by VK_NV_partitioned_acceleration_structure
    typedef struct VkWriteDescriptorSetPartitionedAccelerationStructureNV {
        VkStructureType           sType;
        void*                     pNext;
        uint32_t                  accelerationStructureCount;
        const VkDeviceAddress*    pAccelerationStructures;
    } VkWriteDescriptorSetPartitionedAccelerationStructureNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `accelerationStructureCount` is the number of elements in `pAccelerationStructures`.

- `pAccelerationStructures` is a pointer to an array of `accelerationStructureCount` device addresses pointing to previously built PTLAS.

Valid Usage

- VUID-VkWriteDescriptorSetPartitionedAccelerationStructureNV-accelerationStructureCount-10511
  `accelerationStructureCount` must be equal to `descriptorCount` in the extended structure

- VUID-VkWriteDescriptorSetPartitionedAccelerationStructureNV-pAccelerationStructures-10512
  Each entry in `pAccelerationStructures` must be a valid address of a PTLAS

Valid Usage (Implicit)

- VUID-VkWriteDescriptorSetPartitionedAccelerationStructureNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_PARTITIONED_ACCELERATION_STRUCTURE_NV

- VUID-VkWriteDescriptorSetPartitionedAccelerationStructureNV-pAccelerationStructures-parameter
  `pAccelerationStructures` must be a valid pointer to an array of `accelerationStructureCount` or VK_NULL_HANDLE VkDeviceAddress values

- VUID-VkWriteDescriptorSetPartitionedAccelerationStructureNV-accelerationStructureCount-arraylength
  `accelerationStructureCount` must be greater than `0`

Structure Chaining

Extends the structure

  - VkWriteDescriptorSet

The `VkWriteDescriptorSetAccelerationStructureNV` structure is defined as:

    // Provided by VK_NV_ray_tracing
    typedef struct VkWriteDescriptorSetAccelerationStructureNV {
        VkStructureType                     sType;
        const void*                         pNext;
        uint32_t                            accelerationStructureCount;
        const VkAccelerationStructureNV*    pAccelerationStructures;
    } VkWriteDescriptorSetAccelerationStructureNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `accelerationStructureCount` is the number of elements in `pAccelerationStructures`.

- `pAccelerationStructures` is a pointer to an array of VkAccelerationStructureNV structures specifying the acceleration structures to update.

Valid Usage

- VUID-VkWriteDescriptorSetAccelerationStructureNV-pAccelerationStructures-03748
  Each acceleration structure in `pAccelerationStructures` must have been created with VK_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR

- VUID-VkWriteDescriptorSetAccelerationStructureNV-pAccelerationStructures-03749
  If the `nullDescriptor` feature is not enabled, each member of `pAccelerationStructures` must not be VK_NULL_HANDLE

Valid Usage (Implicit)

- VUID-VkWriteDescriptorSetAccelerationStructureNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_NV

- VUID-VkWriteDescriptorSetAccelerationStructureNV-pAccelerationStructures-parameter
  `pAccelerationStructures` must be a valid pointer to an array of `accelerationStructureCount` valid or VK_NULL_HANDLE VkAccelerationStructureNV handles

- VUID-VkWriteDescriptorSetAccelerationStructureNV-accelerationStructureCount-arraylength
  `accelerationStructureCount` must be greater than `0`

Structure Chaining

Extends the structure

  - VkWriteDescriptorSet

The `VkWriteDescriptorSetTensorARM` structure is defined as:

    // Provided by VK_ARM_tensors
    typedef struct VkWriteDescriptorSetTensorARM {
        VkStructureType           sType;
        const void*               pNext;
        uint32_t                  tensorViewCount;
        const VkTensorViewARM*    pTensorViews;
    } VkWriteDescriptorSetTensorARM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `tensorViewCount` is the number of elements in `pTensorViews`.

- `pTensorViews` are the tensor views that will be used to update the descriptor set.

Valid Usage

- VUID-VkWriteDescriptorSetTensorARM-nullDescriptor-09898
  If the `nullDescriptor` feature is not enabled, each element of `pTensorViews` must not be VK_NULL_HANDLE

Valid Usage (Implicit)

- VUID-VkWriteDescriptorSetTensorARM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_TENSOR_ARM

- VUID-VkWriteDescriptorSetTensorARM-pTensorViews-parameter
  `pTensorViews` must be a valid pointer to an array of `tensorViewCount` valid or VK_NULL_HANDLE VkTensorViewARM handles

- VUID-VkWriteDescriptorSetTensorARM-tensorViewCount-arraylength
  `tensorViewCount` must be greater than `0`

Structure Chaining

Extends the structure

  - VkWriteDescriptorSet

The `VkCopyDescriptorSet` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkCopyDescriptorSet {
        VkStructureType    sType;
        const void*        pNext;
        VkDescriptorSet    srcSet;
        uint32_t           srcBinding;
        uint32_t           srcArrayElement;
        VkDescriptorSet    dstSet;
        uint32_t           dstBinding;
        uint32_t           dstArrayElement;
        uint32_t           descriptorCount;
    } VkCopyDescriptorSet;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `srcSet`, `srcBinding`, and `srcArrayElement` are the source set, binding, and array element, respectively. If the descriptor binding identified by `srcSet` and `srcBinding` has a descriptor type of VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK then `srcArrayElement` specifies the starting byte offset within the binding to copy from.

- `dstSet`, `dstBinding`, and `dstArrayElement` are the destination set, binding, and array element, respectively. If the descriptor binding identified by `dstSet` and `dstBinding` has a descriptor type of VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK then `dstArrayElement` specifies the starting byte offset within the binding to copy to.

- `descriptorCount` is the number of descriptors to copy from the source to destination. If `descriptorCount` is greater than the number of remaining array elements in the source or destination binding, those affect consecutive bindings in a manner similar to VkWriteDescriptorSet above. If the descriptor binding identified by `srcSet` and `srcBinding` has a descriptor type of VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK then `descriptorCount` specifies the number of bytes to copy and the remaining array elements in the source or destination binding refer to the remaining number of bytes in those.

If the `VkDescriptorSetLayoutBinding` for `dstBinding` is VK_DESCRIPTOR_TYPE_MUTABLE_EXT and `srcBinding` is not VK_DESCRIPTOR_TYPE_MUTABLE_EXT, the new active descriptor type becomes the descriptor type of `srcBinding`. If both `VkDescriptorSetLayoutBinding` for `srcBinding` and `dstBinding` are VK_DESCRIPTOR_TYPE_MUTABLE_EXT, the active descriptor type in each source descriptor is copied into the corresponding destination descriptor. The active descriptor type can be different for each source descriptor.

Note | The intention is that copies to and from mutable descriptors is a simple memcpy. Copies between non-mutable and mutable descriptors are expected to require one memcpy per descriptor to handle the difference in size, but this use case with more than one `descriptorCount` is considered rare.

Valid Usage

- VUID-VkCopyDescriptorSet-srcBinding-00345
  `srcBinding` must be a valid binding within `srcSet`

- VUID-VkCopyDescriptorSet-srcArrayElement-00346
  The sum of `srcArrayElement` and `descriptorCount` must be less than or equal to the number of array elements in the descriptor set binding specified by `srcBinding`, and all applicable consecutive bindings

- VUID-VkCopyDescriptorSet-dstBinding-00347
  `dstBinding` must be a valid binding within `dstSet`

- VUID-VkCopyDescriptorSet-dstArrayElement-00348
  The sum of `dstArrayElement` and `descriptorCount` must be less than or equal to the number of array elements in the descriptor set binding specified by `dstBinding`, and all applicable consecutive bindings

- VUID-VkCopyDescriptorSet-dstBinding-02632
  The type of `dstBinding` within `dstSet` must be equal to the type of `srcBinding` within `srcSet`

- VUID-VkCopyDescriptorSet-srcSet-00349
  If `srcSet` is equal to `dstSet`, then the source and destination ranges of descriptors must not overlap, where the ranges may include array elements from consecutive bindings

- VUID-VkCopyDescriptorSet-srcBinding-02223
  If the descriptor type of the descriptor set binding specified by `srcBinding` is VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK, `srcArrayElement` must be an integer multiple of `4`

- VUID-VkCopyDescriptorSet-dstBinding-02224
  If the descriptor type of the descriptor set binding specified by `dstBinding` is VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK, `dstArrayElement` must be an integer multiple of `4`

- VUID-VkCopyDescriptorSet-srcBinding-02225
  If the descriptor type of the descriptor set binding specified by either `srcBinding` or `dstBinding` is VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK, `descriptorCount` must be an integer multiple of `4`

- VUID-VkCopyDescriptorSet-srcSet-01918
  If `srcSet`’s layout was created with the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT flag set, then `dstSet`’s layout must also have been created with the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT flag set

- VUID-VkCopyDescriptorSet-srcSet-04885
  If `srcSet`’s layout was created without either the VK_DESCRIPTOR_SET_LAYOUT_CREATE_HOST_ONLY_POOL_BIT_EXT flag or the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT flag set, then `dstSet`’s layout must have been created without the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT flag set

- VUID-VkCopyDescriptorSet-srcSet-01920
  If the descriptor pool from which `srcSet` was allocated was created with the VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT flag set, then the descriptor pool from which `dstSet` was allocated must also have been created with the VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT flag set

- VUID-VkCopyDescriptorSet-srcSet-04887
  If the descriptor pool from which `srcSet` was allocated was created without either the VK_DESCRIPTOR_POOL_CREATE_HOST_ONLY_BIT_EXT flag or the VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT flag set, then the descriptor pool from which `dstSet` was allocated must have been created without the VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT flag set

- VUID-VkCopyDescriptorSet-dstBinding-02753
  If the descriptor type of the descriptor set binding specified by `dstBinding` is VK_DESCRIPTOR_TYPE_SAMPLER, then `dstSet` must not have been allocated with a layout that included immutable samplers for `dstBinding`

- VUID-VkCopyDescriptorSet-dstSet-04612
  If `VkDescriptorSetLayoutBinding` for `dstSet` at `dstBinding` is VK_DESCRIPTOR_TYPE_MUTABLE_EXT, the new active descriptor type must exist in the corresponding `pMutableDescriptorTypeLists` list for `dstBinding` if the new active descriptor type is not VK_DESCRIPTOR_TYPE_MUTABLE_EXT

- VUID-VkCopyDescriptorSet-srcSet-04613
  If `VkDescriptorSetLayoutBinding` for `srcSet` at `srcBinding` is VK_DESCRIPTOR_TYPE_MUTABLE_EXT and the `VkDescriptorSetLayoutBinding` for `dstSet` at `dstBinding` is not VK_DESCRIPTOR_TYPE_MUTABLE_EXT, the active descriptor type for the source descriptor must match the descriptor type of `dstBinding`

- VUID-VkCopyDescriptorSet-dstSet-04614
  If `VkDescriptorSetLayoutBinding` for `dstSet` at `dstBinding` is VK_DESCRIPTOR_TYPE_MUTABLE_EXT, and the new active descriptor type is VK_DESCRIPTOR_TYPE_MUTABLE_EXT, the `pMutableDescriptorTypeLists` for `srcBinding` and `dstBinding` must match exactly

Valid Usage (Implicit)

- VUID-VkCopyDescriptorSet-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET

- VUID-VkCopyDescriptorSet-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkCopyDescriptorSet-srcSet-parameter
  `srcSet` must be a valid VkDescriptorSet handle

- VUID-VkCopyDescriptorSet-dstSet-parameter
  `dstSet` must be a valid VkDescriptorSet handle

- VUID-VkCopyDescriptorSet-commonparent
  Both of `dstSet`, and `srcSet` must have been created, allocated, or retrieved from the same VkDevice

### 17.5. Descriptor Update Templates

A descriptor update template specifies a mapping from descriptor update information in host memory to descriptors in a descriptor set. It is designed to avoid passing redundant information to the driver when frequently updating the same set of descriptors in descriptor sets.

Descriptor update template objects are represented by `VkDescriptorUpdateTemplate` handles:

    // Provided by VK_VERSION_1_1
    VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorUpdateTemplate)

    // Provided by VK_KHR_descriptor_update_template
    // Equivalent to VkDescriptorUpdateTemplate
    typedef VkDescriptorUpdateTemplate VkDescriptorUpdateTemplateKHR;

### 17.6. Descriptor Set Updates With Templates

Updating a large `VkDescriptorSet` array can be an expensive operation since an application must specify one VkWriteDescriptorSet structure for each descriptor or descriptor array to update, each of which re-specifies the same state when updating the same descriptor in multiple descriptor sets. For cases when an application wishes to update the same set of descriptors in multiple descriptor sets allocated using the same `VkDescriptorSetLayout`, vkUpdateDescriptorSetWithTemplate can be used as a replacement for vkUpdateDescriptorSets.

`VkDescriptorUpdateTemplate` allows implementations to convert a set of descriptor update operations on a single descriptor set to an internal format. In conjunction with vkCmdPushDescriptorSetWithTemplate or vkUpdateDescriptorSetWithTemplate, this can be more efficient compared to calling vkCmdPushDescriptorSet or vkUpdateDescriptorSets. The descriptors themselves are not specified in the `VkDescriptorUpdateTemplate`, rather, offsets into an application provided pointer to host memory are specified, which are combined with a pointer passed to vkCmdPushDescriptorSetWithTemplate or vkUpdateDescriptorSetWithTemplate. This allows large batches of updates to be executed without having to convert application data structures into a strictly-defined Vulkan data structure.

To create a descriptor update template, call:

    // Provided by VK_VERSION_1_1
    VkResult vkCreateDescriptorUpdateTemplate(
        VkDevice                                    device,
        const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkDescriptorUpdateTemplate*                 pDescriptorUpdateTemplate);

    // Provided by VK_KHR_descriptor_update_template
    // Equivalent to vkCreateDescriptorUpdateTemplate
    VkResult vkCreateDescriptorUpdateTemplateKHR(
        VkDevice                                    device,
        const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkDescriptorUpdateTemplate*                 pDescriptorUpdateTemplate);

- `device` is the logical device that creates the descriptor update template.

- `pCreateInfo` is a pointer to a VkDescriptorUpdateTemplateCreateInfo structure specifying the set of descriptors to update with a single call to vkCmdPushDescriptorSetWithTemplate or vkUpdateDescriptorSetWithTemplate.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

- `pDescriptorUpdateTemplate` is a pointer to a `VkDescriptorUpdateTemplate` handle in which the resulting descriptor update template object is returned.

Valid Usage (Implicit)

- VUID-vkCreateDescriptorUpdateTemplate-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkCreateDescriptorUpdateTemplate-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkDescriptorUpdateTemplateCreateInfo structure

- VUID-vkCreateDescriptorUpdateTemplate-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateDescriptorUpdateTemplate-pDescriptorUpdateTemplate-parameter
  `pDescriptorUpdateTemplate` must be a valid pointer to a VkDescriptorUpdateTemplate handle

- VUID-vkCreateDescriptorUpdateTemplate-device-queuecount
  The device must have been created with at least `1` queue

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The VkDescriptorUpdateTemplateCreateInfo structure is defined as:

    // Provided by VK_VERSION_1_1
    typedef struct VkDescriptorUpdateTemplateCreateInfo {
        VkStructureType                           sType;
        const void*                               pNext;
        VkDescriptorUpdateTemplateCreateFlags     flags;
        uint32_t                                  descriptorUpdateEntryCount;
        const VkDescriptorUpdateTemplateEntry*    pDescriptorUpdateEntries;
        VkDescriptorUpdateTemplateType            templateType;
        VkDescriptorSetLayout                     descriptorSetLayout;
        VkPipelineBindPoint                       pipelineBindPoint;
        VkPipelineLayout                          pipelineLayout;
        uint32_t                                  set;
    } VkDescriptorUpdateTemplateCreateInfo;

    // Provided by VK_KHR_descriptor_update_template
    // Equivalent to VkDescriptorUpdateTemplateCreateInfo
    typedef VkDescriptorUpdateTemplateCreateInfo VkDescriptorUpdateTemplateCreateInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is reserved for future use.

- `descriptorUpdateEntryCount` is the number of elements in the `pDescriptorUpdateEntries` array.

- `pDescriptorUpdateEntries` is a pointer to an array of VkDescriptorUpdateTemplateEntry structures describing the descriptors to be updated by the descriptor update template.

- `templateType` Specifies the type of the descriptor update template. If set to VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET it can only be used to update descriptor sets with a fixed `descriptorSetLayout`. If set to VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS it can only be used to push descriptor sets using the provided `pipelineBindPoint`, `pipelineLayout`, and `set` number.

- `descriptorSetLayout` is the descriptor set layout used to build the descriptor update template. All descriptor sets which are going to be updated through the newly created descriptor update template must be created with a layout that matches (is the same as, or defined identically to) this layout. This parameter is ignored if `templateType` is not VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET. The implementation must not access this object outside of the duration of the command this structure is passed to.

- `pipelineBindPoint` is a VkPipelineBindPoint indicating the type of the pipeline that will use the descriptors. This parameter is ignored if `templateType` is not VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS

- `pipelineLayout` is a VkPipelineLayout object used to program the bindings. This parameter is ignored if `templateType` is not VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS

- `set` is the set number of the descriptor set in the pipeline layout that will be updated. This parameter is ignored if `templateType` is not VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS

Valid Usage

- VUID-VkDescriptorUpdateTemplateCreateInfo-templateType-00350
  If `templateType` is VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET, `descriptorSetLayout` must be a valid `VkDescriptorSetLayout` handle

- VUID-VkDescriptorUpdateTemplateCreateInfo-templateType-10355
  If `templateType` is VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS, and the VK_KHR_push_descriptor extension is not enabled, `pushDescriptor` must be enabled

- VUID-VkDescriptorUpdateTemplateCreateInfo-templateType-00351
  If `templateType` is VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS, `pipelineBindPoint` must be a valid VkPipelineBindPoint value

- VUID-VkDescriptorUpdateTemplateCreateInfo-templateType-00352
  If `templateType` is VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS, `pipelineLayout` must be a valid `VkPipelineLayout` handle

- VUID-VkDescriptorUpdateTemplateCreateInfo-templateType-00353
  If `templateType` is VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS, `set` must be the unique set number in the pipeline layout that uses a descriptor set layout that was created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT

- VUID-VkDescriptorUpdateTemplateCreateInfo-templateType-04615
  If `templateType` is VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET, `descriptorSetLayout` must not contain a binding with type VK_DESCRIPTOR_TYPE_MUTABLE_EXT

Valid Usage (Implicit)

- VUID-VkDescriptorUpdateTemplateCreateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO

- VUID-VkDescriptorUpdateTemplateCreateInfo-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkDescriptorUpdateTemplateCreateInfo-flags-zerobitmask
  `flags` must be `0`

- VUID-VkDescriptorUpdateTemplateCreateInfo-pDescriptorUpdateEntries-parameter
  `pDescriptorUpdateEntries` must be a valid pointer to an array of `descriptorUpdateEntryCount` valid VkDescriptorUpdateTemplateEntry structures

- VUID-VkDescriptorUpdateTemplateCreateInfo-templateType-parameter
  `templateType` must be a valid VkDescriptorUpdateTemplateType value

- VUID-VkDescriptorUpdateTemplateCreateInfo-descriptorUpdateEntryCount-arraylength
  `descriptorUpdateEntryCount` must be greater than `0`

- VUID-VkDescriptorUpdateTemplateCreateInfo-commonparent
  Both of `descriptorSetLayout`, and `pipelineLayout` that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevice

    // Provided by VK_VERSION_1_1
    typedef VkFlags VkDescriptorUpdateTemplateCreateFlags;

    // Provided by VK_KHR_descriptor_update_template
    // Equivalent to VkDescriptorUpdateTemplateCreateFlags
    typedef VkDescriptorUpdateTemplateCreateFlags VkDescriptorUpdateTemplateCreateFlagsKHR;

`VkDescriptorUpdateTemplateCreateFlags` is a bitmask type for setting a mask, but is currently reserved for future use.

The descriptor update template type is determined by the VkDescriptorUpdateTemplateCreateInfo::`templateType` property, which takes the following values:

    // Provided by VK_VERSION_1_1
    typedef enum VkDescriptorUpdateTemplateType {
        VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET = 0,
      // Provided by VK_VERSION_1_4
        VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS = 1,
      // Provided by VK_KHR_descriptor_update_template with VK_KHR_push_descriptor, VK_KHR_push_descriptor with VK_VERSION_1_1 or VK_KHR_descriptor_update_template
        VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR = VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS,
      // Provided by VK_KHR_descriptor_update_template
        VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET_KHR = VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET,
    } VkDescriptorUpdateTemplateType;

    // Provided by VK_KHR_descriptor_update_template
    // Equivalent to VkDescriptorUpdateTemplateType
    typedef VkDescriptorUpdateTemplateType VkDescriptorUpdateTemplateTypeKHR;

- VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET specifies that the descriptor update template will be used for descriptor set updates only.

- VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS specifies that the descriptor update template will be used for push descriptor updates only.

The `VkDescriptorUpdateTemplateEntry` structure is defined as:

    // Provided by VK_VERSION_1_1
    typedef struct VkDescriptorUpdateTemplateEntry {
        uint32_t            dstBinding;
        uint32_t            dstArrayElement;
        uint32_t            descriptorCount;
        VkDescriptorType    descriptorType;
        size_t              offset;
        size_t              stride;
    } VkDescriptorUpdateTemplateEntry;

    // Provided by VK_KHR_descriptor_update_template
    // Equivalent to VkDescriptorUpdateTemplateEntry
    typedef VkDescriptorUpdateTemplateEntry VkDescriptorUpdateTemplateEntryKHR;

- `dstBinding` is the descriptor binding to update when using this descriptor update template.

- `dstArrayElement` is the starting element in the array belonging to `dstBinding`. If the descriptor binding identified by `dstBinding` has a descriptor type of VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK then `dstArrayElement` specifies the starting byte offset to update.

- `descriptorCount` is the number of descriptors to update. If `descriptorCount` is greater than the number of remaining array elements in the destination binding, those affect consecutive bindings in a manner similar to VkWriteDescriptorSet above. If the descriptor binding identified by `dstBinding` has a descriptor type of VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK then `descriptorCount` specifies the number of bytes to update and the remaining array elements in the destination binding refer to the remaining number of bytes in it.

- `descriptorType` is a VkDescriptorType specifying the type of the descriptor.

- `offset` is the offset in bytes of the first binding in the raw data structure.

- `stride` is the stride in bytes between two consecutive array elements of the descriptor update information in the raw data structure. The actual pointer ptr for each array element j of update entry i is computed using the following formula:

          const char *ptr = (const char *)pData + pDescriptorUpdateEntries[i].offset + j * pDescriptorUpdateEntries[i].stride

  The stride is useful in case the bindings are stored in structs along with other data. If `descriptorType` is VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK then the value of `stride` is ignored and the stride is assumed to be `1`, i.e. the descriptor update information for them is always specified as a contiguous range.

Valid Usage

- VUID-VkDescriptorUpdateTemplateEntry-dstBinding-00354
  `dstBinding` must be a valid binding in the descriptor set layout implicitly specified when using a descriptor update template to update descriptors

- VUID-VkDescriptorUpdateTemplateEntry-dstArrayElement-00355
  `dstArrayElement` and `descriptorCount` must be less than or equal to the number of array elements in the descriptor set binding implicitly specified when using a descriptor update template to update descriptors, and all applicable consecutive bindings

- VUID-VkDescriptorUpdateTemplateEntry-descriptor-02226
  If `descriptor` type is VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK, `dstArrayElement` must be an integer multiple of `4`

- VUID-VkDescriptorUpdateTemplateEntry-descriptor-02227
  If `descriptor` type is VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK, `descriptorCount` must be an integer multiple of `4`

Valid Usage (Implicit)

- VUID-VkDescriptorUpdateTemplateEntry-descriptorType-parameter
  `descriptorType` must be a valid VkDescriptorType value

To destroy a descriptor update template, call:

    // Provided by VK_VERSION_1_1
    void vkDestroyDescriptorUpdateTemplate(
        VkDevice                                    device,
        VkDescriptorUpdateTemplate                  descriptorUpdateTemplate,
        const VkAllocationCallbacks*                pAllocator);

    // Provided by VK_KHR_descriptor_update_template
    // Equivalent to vkDestroyDescriptorUpdateTemplate
    void vkDestroyDescriptorUpdateTemplateKHR(
        VkDevice                                    device,
        VkDescriptorUpdateTemplate                  descriptorUpdateTemplate,
        const VkAllocationCallbacks*                pAllocator);

- `device` is the logical device that has been used to create the descriptor update template

- `descriptorUpdateTemplate` is the descriptor update template to destroy.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

Valid Usage

- VUID-vkDestroyDescriptorUpdateTemplate-descriptorSetLayout-00356
  If `VkAllocationCallbacks` were provided when `descriptorUpdateTemplate` was created, a compatible set of callbacks must be provided here

- VUID-vkDestroyDescriptorUpdateTemplate-descriptorSetLayout-00357
  If no `VkAllocationCallbacks` were provided when `descriptorUpdateTemplate` was created, `pAllocator` must be `NULL`

Valid Usage (Implicit)

- VUID-vkDestroyDescriptorUpdateTemplate-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkDestroyDescriptorUpdateTemplate-descriptorUpdateTemplate-parameter
  If `descriptorUpdateTemplate` is not VK_NULL_HANDLE, `descriptorUpdateTemplate` must be a valid VkDescriptorUpdateTemplate handle

- VUID-vkDestroyDescriptorUpdateTemplate-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkDestroyDescriptorUpdateTemplate-descriptorUpdateTemplate-parent
  If `descriptorUpdateTemplate` is a valid handle, it must have been created, allocated, or retrieved from `device`

Host Synchronization

- Host access to `descriptorUpdateTemplate` must be externally synchronized

Once a `VkDescriptorUpdateTemplate` has been created, descriptor sets can be updated by calling:

    // Provided by VK_VERSION_1_1
    void vkUpdateDescriptorSetWithTemplate(
        VkDevice                                    device,
        VkDescriptorSet                             descriptorSet,
        VkDescriptorUpdateTemplate                  descriptorUpdateTemplate,
        const void*                                 pData);

    // Provided by VK_KHR_descriptor_update_template
    // Equivalent to vkUpdateDescriptorSetWithTemplate
    void vkUpdateDescriptorSetWithTemplateKHR(
        VkDevice                                    device,
        VkDescriptorSet                             descriptorSet,
        VkDescriptorUpdateTemplate                  descriptorUpdateTemplate,
        const void*                                 pData);

- `device` is the logical device that updates the descriptor set.

- `descriptorSet` is the descriptor set to update

- `descriptorUpdateTemplate` is a VkDescriptorUpdateTemplate object specifying the update mapping between `pData` and the descriptor set to update.

- `pData` is a pointer to memory containing one or more VkDescriptorImageInfo, VkDescriptorBufferInfo, or VkBufferView structures or VkAccelerationStructureKHR or VkAccelerationStructureNV handles used to write the descriptors.

Valid Usage

- VUID-vkUpdateDescriptorSetWithTemplate-pData-01685
  `pData` must be a valid pointer to a memory containing one or more valid instances of VkAccelerationStructureKHR handles, VkAccelerationStructureNV handles, VkDescriptorImageInfo, VkDescriptorBufferInfo, or VkBufferView in a layout defined by `descriptorUpdateTemplate` when it was created with vkCreateDescriptorUpdateTemplate

- VUID-vkUpdateDescriptorSetWithTemplate-descriptorSet-06995
  Host access to `descriptorSet` must be externally synchronized unless explicitly denoted otherwise for specific flags

Valid Usage (Implicit)

- VUID-vkUpdateDescriptorSetWithTemplate-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkUpdateDescriptorSetWithTemplate-descriptorSet-parameter
  `descriptorSet` must be a valid VkDescriptorSet handle

- VUID-vkUpdateDescriptorSetWithTemplate-descriptorUpdateTemplate-parameter
  `descriptorUpdateTemplate` must be a valid VkDescriptorUpdateTemplate handle

- VUID-vkUpdateDescriptorSetWithTemplate-descriptorSet-parent
  `descriptorSet` must have been created, allocated, or retrieved from `device`

- VUID-vkUpdateDescriptorSetWithTemplate-descriptorUpdateTemplate-parent
  `descriptorUpdateTemplate` must have been created, allocated, or retrieved from `device`

API Example

    struct AppBufferView {
        VkBufferView bufferView;
        uint32_t     applicationRelatedInformation;
    };

    struct AppDataStructure
    {
        VkDescriptorImageInfo  imageInfo;          // a single image info
        VkDescriptorBufferInfo bufferInfoArray[3]; // 3 buffer infos in an array
        AppBufferView          bufferView[2];      // An application-defined structure containing a bufferView
        // ... some more application-related data
    };

    const VkDescriptorUpdateTemplateEntry descriptorUpdateTemplateEntries[] =
    {
        // binding to a single image descriptor
        {
            .binding = 0,
            .dstArrayElement = 0,
            .descriptorCount = 1,
            .descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER,
            .offset = offsetof(AppDataStructure, imageInfo),
            .stride = 0         // stride not required if descriptorCount is 1
        },

        // binding to an array of buffer descriptors
        {
            .binding = 1,
            .dstArrayElement = 0,
            .descriptorCount = 3,
            .descriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER,
            .offset = offsetof(AppDataStructure, bufferInfoArray),
            .stride = sizeof(VkDescriptorBufferInfo)    // descriptor buffer infos are compact
        },

        // binding to an array of buffer views
        {
            .binding = 2,
            .dstArrayElement = 0,
            .descriptorCount = 2,
            .descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER,
            .offset = offsetof(AppDataStructure, bufferView) +
                      offsetof(AppBufferView, bufferView),
            .stride = sizeof(AppBufferView)             // bufferViews do not have to be compact
        },
    };

    // create a descriptor update template for descriptor set updates
    const VkDescriptorUpdateTemplateCreateInfo createInfo =
    {
        .sType = VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO,
        .pNext = NULL,
        .flags = 0,
        .descriptorUpdateEntryCount = 3,
        .pDescriptorUpdateEntries = descriptorUpdateTemplateEntries,
        .templateType = VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET,
        .descriptorSetLayout = myLayout,
        .pipelineBindPoint = 0,     // ignored by given templateType
        .pipelineLayout = 0,        // ignored by given templateType
        .set = 0,                   // ignored by given templateType
    };

    VkDescriptorUpdateTemplate myDescriptorUpdateTemplate;
    myResult = vkCreateDescriptorUpdateTemplate(
        myDevice,
        &createInfo,
        NULL,
        &myDescriptorUpdateTemplate);

    AppDataStructure appData;

    // fill appData here or cache it in your engine
    vkUpdateDescriptorSetWithTemplate(myDevice, myDescriptorSet, myDescriptorUpdateTemplate, &appData);

### 17.7. Descriptor Set Binding

To bind one or more descriptor sets to a command buffer, call:

    // Provided by VK_VERSION_1_0
    void vkCmdBindDescriptorSets(
        VkCommandBuffer                             commandBuffer,
        VkPipelineBindPoint                         pipelineBindPoint,
        VkPipelineLayout                            layout,
        uint32_t                                    firstSet,
        uint32_t                                    descriptorSetCount,
        const VkDescriptorSet*                      pDescriptorSets,
        uint32_t                                    dynamicOffsetCount,
        const uint32_t*                             pDynamicOffsets);

- `commandBuffer` is the command buffer that the descriptor sets will be bound to.

- `pipelineBindPoint` is a VkPipelineBindPoint indicating the type of the pipeline that will use the descriptors. There is a separate set of bind points for each pipeline type, so binding one does not disturb the others.

- `layout` is a VkPipelineLayout object used to program the bindings.

- `firstSet` is the set number of the first descriptor set to be bound.

- `descriptorSetCount` is the number of elements in the `pDescriptorSets` array.

- `pDescriptorSets` is a pointer to an array of handles to VkDescriptorSet objects describing the descriptor sets to bind to.

- `dynamicOffsetCount` is the number of dynamic offsets in the `pDynamicOffsets` array.

- `pDynamicOffsets` is a pointer to an array of `uint32_t` values specifying dynamic offsets.

`vkCmdBindDescriptorSets` binds descriptor sets `pDescriptorSets`[0..`descriptorSetCount`-1] to set numbers [`firstSet`..`firstSet`+`descriptorSetCount`-1] for subsequent bound pipeline commands set by `pipelineBindPoint`. Any bindings that were previously applied via these sets , or calls to vkCmdSetDescriptorBufferOffsetsEXT or vkCmdBindDescriptorBufferEmbeddedSamplersEXT, are no longer valid.

Once bound, a descriptor set affects rendering of subsequent commands that interact with the given pipeline type in the command buffer until either a different set is bound to the same set number, or the set is disturbed as described in Pipeline Layout Compatibility.

A compatible descriptor set must be bound for all set numbers that any shaders in a pipeline access, at the time that a drawing or dispatching command is recorded to execute using that pipeline. However, if none of the shaders in a pipeline statically use any bindings with a particular set number, then no descriptor set need be bound for that set number, even if the pipeline layout includes a non-trivial descriptor set layout for that set number.

When consuming a descriptor, a descriptor is considered valid if the descriptor is not undefined as described by descriptor set allocation. If the `nullDescriptor` feature is enabled, a null descriptor is also considered valid. A descriptor that was disturbed by Pipeline Layout Compatibility, or was never bound by `vkCmdBindDescriptorSets` is not considered valid. For any given descriptor, VkDescriptorBindingFlagBits and VkDescriptorSetLayoutCreateFlagBits determine if validity is defined in terms of the descriptor being statically accessed, or dynamically accessed. If the descriptor is determined to be accessed by the appropriate definition, the consuming descriptor type in the pipeline must match the VkDescriptorType in VkDescriptorSetLayoutCreateInfo for the descriptor to be considered valid. If a descriptor is a mutable descriptor, the consuming descriptor type in the pipeline must match the active descriptor type for the descriptor to be considered valid.

Note | Further validation may be carried out beyond validation for descriptor types, e.g. Texel Input Validation.

If any of the sets being bound include dynamic uniform or storage buffers, then `pDynamicOffsets` includes one element for each array element in each dynamic descriptor type binding in each set. Values are taken from `pDynamicOffsets` in an order such that all entries for set N come before set N+1; within a set, entries are ordered by the binding numbers in the descriptor set layouts; and within a binding array, elements are in order. `dynamicOffsetCount` must equal the total number of dynamic descriptors in the sets being bound.

The effective offset used for dynamic uniform and storage buffer bindings is the sum of the relative offset taken from `pDynamicOffsets`, and the base address of the buffer plus base offset in the descriptor set. The range of the dynamic uniform and storage buffer bindings is the buffer range as specified in the descriptor set.

Each of the `pDescriptorSets` must be compatible with the pipeline layout specified by `layout`. The layout used to program the bindings must also be compatible with the pipeline used in subsequent bound pipeline commands with that pipeline type, as defined in the Pipeline Layout Compatibility section.

The descriptor set contents bound by a call to `vkCmdBindDescriptorSets` may be consumed at the following times:

- For descriptor bindings created with the VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT bit set, the contents may be consumed when the command buffer is submitted to a queue, or during shader execution of the resulting draws and dispatches, or any time in between. Otherwise,

- during host execution of the command, or during shader execution of the resulting draws and dispatches, or any time in between.

Thus, the contents of a descriptor set binding must not be altered (overwritten by an update command, or freed) between the first point in time that it may be consumed, and when the command completes executing on the queue.

The contents of `pDynamicOffsets` are consumed immediately during execution of `vkCmdBindDescriptorSets`. Once all pending uses have completed, it is legal to update and reuse a descriptor set.

Valid Usage

- VUID-vkCmdBindDescriptorSets-commandBuffer-11295
  If `commandBuffer` is a secondary command buffer, it must have begun with VkCommandBufferInheritanceDescriptorHeapInfoEXT::`pSamplerHeapBindInfo` equal to `NULL`

- VUID-vkCmdBindDescriptorSets-commandBuffer-11296
  If `commandBuffer` is a secondary command buffer, it must have begun with VkCommandBufferInheritanceDescriptorHeapInfoEXT::`pResourceHeapBindInfo` equal to `NULL`

- VUID-vkCmdBindDescriptorSets-pDescriptorSets-00358
  Each element of `pDescriptorSets` that is not VK_NULL_HANDLE must have been allocated with a `VkDescriptorSetLayout` that matches (is the same as, or identically defined as) the `VkDescriptorSetLayout` at set n in `layout`, where n is the sum of `firstSet` and the index into `pDescriptorSets`

- VUID-vkCmdBindDescriptorSets-dynamicOffsetCount-00359
  `dynamicOffsetCount` must be equal to the total number of dynamic descriptors in `pDescriptorSets`

- VUID-vkCmdBindDescriptorSets-firstSet-00360
  The sum of `firstSet` and `descriptorSetCount` must be less than or equal to VkPipelineLayoutCreateInfo::`setLayoutCount` provided when `layout` was created

- VUID-vkCmdBindDescriptorSets-pDynamicOffsets-01971
  Each element of `pDynamicOffsets` which corresponds to a descriptor binding with type VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC must be a multiple of `VkPhysicalDeviceLimits`::`minUniformBufferOffsetAlignment`

- VUID-vkCmdBindDescriptorSets-pDynamicOffsets-01972
  Each element of `pDynamicOffsets` which corresponds to a descriptor binding with type VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC must be a multiple of `VkPhysicalDeviceLimits`::`minStorageBufferOffsetAlignment`

- VUID-vkCmdBindDescriptorSets-pDescriptorSets-01979
  For each dynamic uniform or storage buffer binding in `pDescriptorSets`, the sum of the effective offset and the range of the binding must be less than or equal to the size of the buffer

- VUID-vkCmdBindDescriptorSets-pDescriptorSets-06715
  For each dynamic uniform or storage buffer binding in `pDescriptorSets`, if the range was set with VK_WHOLE_SIZE then `pDynamicOffsets` which corresponds to the descriptor binding must be 0

- VUID-vkCmdBindDescriptorSets-pDescriptorSets-04616
  Each element of `pDescriptorSets` must not have been allocated from a `VkDescriptorPool` with the VK_DESCRIPTOR_POOL_CREATE_HOST_ONLY_BIT_EXT flag set

- VUID-vkCmdBindDescriptorSets-pDescriptorSets-06563
  If the `graphicsPipelineLibrary` feature is not enabled, each element of `pDescriptorSets` must be a valid VkDescriptorSet

- VUID-vkCmdBindDescriptorSets-pDescriptorSets-08010
  Each element of `pDescriptorSets` must have been allocated with a `VkDescriptorSetLayout` which was not created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdBindDescriptorSets-pDescriptorSets-09914
  If any element of `pDescriptorSets` was allocated from a descriptor pool created with a VkDescriptorPoolCreateInfo structure that had a VkDataGraphProcessingEngineCreateInfoARM structure specifying foreign data processing engines in its `pNext` chain, then the command pool from which `commandBuffer` was allocated must have been created with a VkCommandPoolCreateInfo structure that had a VkDataGraphProcessingEngineCreateInfoARM structure in its `pNext` chain specifying a superset of all the foreign data processing engines specified when creating the descriptor pools from which the elements of `pDescriptorSets` were allocated

- VUID-vkCmdBindDescriptorSets-pDescriptorSets-09915
  If none of the elements of `pDescriptorSets` were allocated from a descriptor pool created with a VkDescriptorPoolCreateInfo structure that had a VkDataGraphProcessingEngineCreateInfoARM structure specifying foreign data processing engines in its `pNext` chain, then the command pool from which `commandBuffer` was allocated must not have been created with a VkCommandPoolCreateInfo structure that had a VkDataGraphProcessingEngineCreateInfoARM structure in its `pNext` chain

- VUID-vkCmdBindDescriptorSets-pipelineBindPoint-00361
  `pipelineBindPoint` must be supported by the `commandBuffer`’s parent `VkCommandPool`’s queue family

Valid Usage (Implicit)

- VUID-vkCmdBindDescriptorSets-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdBindDescriptorSets-pipelineBindPoint-parameter
  `pipelineBindPoint` must be a valid VkPipelineBindPoint value

- VUID-vkCmdBindDescriptorSets-layout-parameter
  `layout` must be a valid VkPipelineLayout handle

- VUID-vkCmdBindDescriptorSets-pDescriptorSets-parameter
  `pDescriptorSets` must be a valid pointer to an array of `descriptorSetCount` valid or VK_NULL_HANDLE VkDescriptorSet handles

- VUID-vkCmdBindDescriptorSets-pDynamicOffsets-parameter
  If `dynamicOffsetCount` is not `0`, `pDynamicOffsets` must be a valid pointer to an array of `dynamicOffsetCount` `uint32_t` values

- VUID-vkCmdBindDescriptorSets-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdBindDescriptorSets-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, VK_QUEUE_DATA_GRAPH_BIT_ARM, or VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdBindDescriptorSets-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdBindDescriptorSets-descriptorSetCount-arraylength
  `descriptorSetCount` must be greater than `0`

- VUID-vkCmdBindDescriptorSets-commonparent
  Each of `commandBuffer`, `layout`, and the elements of `pDescriptorSets` that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_DATA_GRAPH_BIT_ARM VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdBindDescriptorSets is not affected by conditional rendering

To bind one or more descriptor sets to a command buffer, call:

    // Provided by VK_VERSION_1_4
    void vkCmdBindDescriptorSets2(
        VkCommandBuffer                             commandBuffer,
        const VkBindDescriptorSetsInfo*             pBindDescriptorSetsInfo);

    // Provided by VK_KHR_maintenance6
    // Equivalent to vkCmdBindDescriptorSets2
    void vkCmdBindDescriptorSets2KHR(
        VkCommandBuffer                             commandBuffer,
        const VkBindDescriptorSetsInfo*             pBindDescriptorSetsInfo);

- `commandBuffer` is the command buffer that the descriptor sets will be bound to.

- `pBindDescriptorSetsInfo` is a pointer to a `VkBindDescriptorSetsInfo` structure.

Valid Usage

- VUID-vkCmdBindDescriptorSets2-commandBuffer-11295
  If `commandBuffer` is a secondary command buffer, it must have begun with VkCommandBufferInheritanceDescriptorHeapInfoEXT::`pSamplerHeapBindInfo` equal to `NULL`

- VUID-vkCmdBindDescriptorSets2-commandBuffer-11296
  If `commandBuffer` is a secondary command buffer, it must have begun with VkCommandBufferInheritanceDescriptorHeapInfoEXT::`pResourceHeapBindInfo` equal to `NULL`

- VUID-vkCmdBindDescriptorSets2-pBindDescriptorSetsInfo-09467
  Each bit in `pBindDescriptorSetsInfo->stageFlags` must be a stage supported by the `commandBuffer`’s parent `VkCommandPool`’s queue family

Valid Usage (Implicit)

- VUID-vkCmdBindDescriptorSets2-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdBindDescriptorSets2-pBindDescriptorSetsInfo-parameter
  `pBindDescriptorSetsInfo` must be a valid pointer to a valid VkBindDescriptorSetsInfo structure

- VUID-vkCmdBindDescriptorSets2-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdBindDescriptorSets2-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, or VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdBindDescriptorSets2-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdBindDescriptorSets2 is not affected by conditional rendering

The `VkBindDescriptorSetsInfo` structure is defined as:

    // Provided by VK_VERSION_1_4
    typedef struct VkBindDescriptorSetsInfo {
        VkStructureType           sType;
        const void*               pNext;
        VkShaderStageFlags        stageFlags;
        VkPipelineLayout          layout;
        uint32_t                  firstSet;
        uint32_t                  descriptorSetCount;
        const VkDescriptorSet*    pDescriptorSets;
        uint32_t                  dynamicOffsetCount;
        const uint32_t*           pDynamicOffsets;
    } VkBindDescriptorSetsInfo;

    // Provided by VK_KHR_maintenance6
    // Equivalent to VkBindDescriptorSetsInfo
    typedef VkBindDescriptorSetsInfo VkBindDescriptorSetsInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `stageFlags` is a bitmask of VkShaderStageFlagBits specifying the shader stages the descriptor sets will be bound to.

- `layout` is a VkPipelineLayout object used to program the bindings. If the `dynamicPipelineLayout` feature is enabled, `layout` can be VK_NULL_HANDLE and the layout must be specified by chaining the VkPipelineLayoutCreateInfo structure off the `pNext`

- `firstSet` is the set number of the first descriptor set to be bound.

- `descriptorSetCount` is the number of elements in the `pDescriptorSets` array.

- `pDescriptorSets` is a pointer to an array of handles to VkDescriptorSet objects describing the descriptor sets to bind to.

- `dynamicOffsetCount` is the number of dynamic offsets in the `pDynamicOffsets` array.

- `pDynamicOffsets` is a pointer to an array of `uint32_t` values specifying dynamic offsets.

If `stageFlags` specifies a subset of all stages corresponding to one or more pipeline bind points, the binding operation still affects all stages corresponding to the given pipeline bind point(s) as if the equivalent original version of this command had been called with the same parameters. For example, specifying a `stageFlags` value of VK_SHADER_STAGE_VERTEX_BIT | VK_SHADER_STAGE_FRAGMENT_BIT | VK_SHADER_STAGE_COMPUTE_BIT is equivalent to calling the original version of this command once with VK_PIPELINE_BIND_POINT_GRAPHICS and once with VK_PIPELINE_BIND_POINT_COMPUTE.

Valid Usage

- VUID-VkBindDescriptorSetsInfo-pDescriptorSets-00358
  Each element of `pDescriptorSets` that is not VK_NULL_HANDLE must have been allocated with a `VkDescriptorSetLayout` that matches (is the same as, or identically defined as) the `VkDescriptorSetLayout` at set n in `layout`, where n is the sum of `firstSet` and the index into `pDescriptorSets`

- VUID-VkBindDescriptorSetsInfo-dynamicOffsetCount-00359
  `dynamicOffsetCount` must be equal to the total number of dynamic descriptors in `pDescriptorSets`

- VUID-VkBindDescriptorSetsInfo-firstSet-00360
  The sum of `firstSet` and `descriptorSetCount` must be less than or equal to VkPipelineLayoutCreateInfo::`setLayoutCount` provided when `layout` was created

- VUID-VkBindDescriptorSetsInfo-pDynamicOffsets-01971
  Each element of `pDynamicOffsets` which corresponds to a descriptor binding with type VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC must be a multiple of `VkPhysicalDeviceLimits`::`minUniformBufferOffsetAlignment`

- VUID-VkBindDescriptorSetsInfo-pDynamicOffsets-01972
  Each element of `pDynamicOffsets` which corresponds to a descriptor binding with type VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC must be a multiple of `VkPhysicalDeviceLimits`::`minStorageBufferOffsetAlignment`

- VUID-VkBindDescriptorSetsInfo-pDescriptorSets-01979
  For each dynamic uniform or storage buffer binding in `pDescriptorSets`, the sum of the effective offset and the range of the binding must be less than or equal to the size of the buffer

- VUID-VkBindDescriptorSetsInfo-pDescriptorSets-06715
  For each dynamic uniform or storage buffer binding in `pDescriptorSets`, if the range was set with VK_WHOLE_SIZE then `pDynamicOffsets` which corresponds to the descriptor binding must be 0

- VUID-VkBindDescriptorSetsInfo-pDescriptorSets-04616
  Each element of `pDescriptorSets` must not have been allocated from a `VkDescriptorPool` with the VK_DESCRIPTOR_POOL_CREATE_HOST_ONLY_BIT_EXT flag set

- VUID-VkBindDescriptorSetsInfo-pDescriptorSets-06563
  If the `graphicsPipelineLibrary` feature is not enabled, each element of `pDescriptorSets` must be a valid VkDescriptorSet

- VUID-VkBindDescriptorSetsInfo-pDescriptorSets-08010
  Each element of `pDescriptorSets` must have been allocated with a `VkDescriptorSetLayout` which was not created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-VkBindDescriptorSetsInfo-pDescriptorSets-09914
  If any element of `pDescriptorSets` was allocated from a descriptor pool created with a VkDescriptorPoolCreateInfo structure that had a VkDataGraphProcessingEngineCreateInfoARM structure specifying foreign data processing engines in its `pNext` chain, then the command pool from which `commandBuffer` was allocated must have been created with a VkCommandPoolCreateInfo structure that had a VkDataGraphProcessingEngineCreateInfoARM structure in its `pNext` chain specifying a superset of all the foreign data processing engines specified when creating the descriptor pools from which the elements of `pDescriptorSets` were allocated

- VUID-VkBindDescriptorSetsInfo-pDescriptorSets-09915
  If none of the elements of `pDescriptorSets` were allocated from a descriptor pool created with a VkDescriptorPoolCreateInfo structure that had a VkDataGraphProcessingEngineCreateInfoARM structure specifying foreign data processing engines in its `pNext` chain, then the command pool from which `commandBuffer` was allocated must not have been created with a VkCommandPoolCreateInfo structure that had a VkDataGraphProcessingEngineCreateInfoARM structure in its `pNext` chain

- VUID-VkBindDescriptorSetsInfo-None-09495
  If the `dynamicPipelineLayout` feature is not enabled, `layout` must be a valid VkPipelineLayout handle

- VUID-VkBindDescriptorSetsInfo-layout-09496
  If `layout` is VK_NULL_HANDLE, the `pNext` chain must include a valid VkPipelineLayoutCreateInfo structure

Valid Usage (Implicit)

- VUID-VkBindDescriptorSetsInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_BIND_DESCRIPTOR_SETS_INFO

- VUID-VkBindDescriptorSetsInfo-pNext-pNext
  `pNext` must be `NULL` or a pointer to a valid instance of VkPipelineLayoutCreateInfo

- VUID-VkBindDescriptorSetsInfo-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkBindDescriptorSetsInfo-stageFlags-parameter
  `stageFlags` must be a valid combination of VkShaderStageFlagBits values

- VUID-VkBindDescriptorSetsInfo-stageFlags-requiredbitmask
  `stageFlags` must not be `0`

- VUID-VkBindDescriptorSetsInfo-layout-parameter
  If `layout` is not VK_NULL_HANDLE, `layout` must be a valid VkPipelineLayout handle

- VUID-VkBindDescriptorSetsInfo-pDescriptorSets-parameter
  `pDescriptorSets` must be a valid pointer to an array of `descriptorSetCount` valid VkDescriptorSet handles

- VUID-VkBindDescriptorSetsInfo-pDynamicOffsets-parameter
  If `dynamicOffsetCount` is not `0`, and `pDynamicOffsets` is not `NULL`, `pDynamicOffsets` must be a valid pointer to an array of `dynamicOffsetCount` or VK_NULL_HANDLE `uint32_t` values

- VUID-VkBindDescriptorSetsInfo-descriptorSetCount-arraylength
  `descriptorSetCount` must be greater than `0`

- VUID-VkBindDescriptorSetsInfo-commonparent
  Both of `layout`, and the elements of `pDescriptorSets` that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevice

### 17.8. Push Descriptor Updates

In addition to allocating descriptor sets and binding them to a command buffer, an application can record descriptor updates into the command buffer.

To push descriptor updates into a command buffer, call:

    // Provided by VK_VERSION_1_4
    void vkCmdPushDescriptorSet(
        VkCommandBuffer                             commandBuffer,
        VkPipelineBindPoint                         pipelineBindPoint,
        VkPipelineLayout                            layout,
        uint32_t                                    set,
        uint32_t                                    descriptorWriteCount,
        const VkWriteDescriptorSet*                 pDescriptorWrites);

    // Provided by VK_KHR_push_descriptor
    // Equivalent to vkCmdPushDescriptorSet
    void vkCmdPushDescriptorSetKHR(
        VkCommandBuffer                             commandBuffer,
        VkPipelineBindPoint                         pipelineBindPoint,
        VkPipelineLayout                            layout,
        uint32_t                                    set,
        uint32_t                                    descriptorWriteCount,
        const VkWriteDescriptorSet*                 pDescriptorWrites);

- `commandBuffer` is the command buffer that the descriptors will be recorded in.

- `pipelineBindPoint` is a VkPipelineBindPoint indicating the type of the pipeline that will use the descriptors. There is a separate set of push descriptor bindings for each pipeline type, so binding one does not disturb the others.

- `layout` is a VkPipelineLayout object used to program the bindings.

- `set` is the set number of the descriptor set in the pipeline layout that will be updated.

- `descriptorWriteCount` is the number of elements in the `pDescriptorWrites` array.

- `pDescriptorWrites` is a pointer to an array of VkWriteDescriptorSet structures describing the descriptors to be updated.

Push descriptors are a small bank of descriptors whose storage is internally managed by the command buffer rather than being written into a descriptor set and later bound to a command buffer. Push descriptors allow for incremental updates of descriptors without managing the lifetime of descriptor sets.

When a command buffer begins recording, all push descriptors are undefined. Push descriptors can be updated incrementally and cause shaders to use the updated descriptors for subsequent bound pipeline commands with the pipeline type set by `pipelineBindPoint` until the descriptor is overwritten, or else until the set is disturbed as described in Pipeline Layout Compatibility. When the set is disturbed or push descriptors with a different descriptor set layout are set, all push descriptors are undefined.

Push descriptors that are statically used by a pipeline must not be undefined at the time that a drawing or dispatching command is recorded to execute using that pipeline. This includes immutable sampler descriptors, which must be pushed before they are accessed by a pipeline (the immutable samplers are pushed, rather than the samplers in `pDescriptorWrites`). Push descriptors that are not statically used can remain undefined.

Push descriptors do not use dynamic offsets. Instead, the corresponding non-dynamic descriptor types can be used and the `offset` member of VkDescriptorBufferInfo can be changed each time the descriptor is written.

Each element of `pDescriptorWrites` is interpreted as in VkWriteDescriptorSet, except the `dstSet` member is ignored.

To push an immutable sampler, use a VkWriteDescriptorSet with `dstBinding` and `dstArrayElement` selecting the immutable sampler’s binding. If the descriptor type is VK_DESCRIPTOR_TYPE_SAMPLER, the `pImageInfo` parameter is ignored and the immutable sampler is taken from the push descriptor set layout in the pipeline layout. If the descriptor type is VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, the `sampler` member of the `pImageInfo` parameter is ignored and the immutable sampler is taken from the push descriptor set layout in the pipeline layout.

Valid Usage

- VUID-vkCmdPushDescriptorSet-commandBuffer-11295
  If `commandBuffer` is a secondary command buffer, it must have begun with VkCommandBufferInheritanceDescriptorHeapInfoEXT::`pSamplerHeapBindInfo` equal to `NULL`

- VUID-vkCmdPushDescriptorSet-commandBuffer-11296
  If `commandBuffer` is a secondary command buffer, it must have begun with VkCommandBufferInheritanceDescriptorHeapInfoEXT::`pResourceHeapBindInfo` equal to `NULL`

- VUID-vkCmdPushDescriptorSet-set-00364
  `set` must be less than VkPipelineLayoutCreateInfo::`setLayoutCount` provided when `layout` was created

- VUID-vkCmdPushDescriptorSet-set-00365
  `set` must be the unique set number in the pipeline layout that uses a descriptor set layout that was created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT

- VUID-vkCmdPushDescriptorSet-pDescriptorWrites-06494
  For each element i where `pDescriptorWrites`[i].`descriptorType` is VK_DESCRIPTOR_TYPE_SAMPLER, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, or VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, `pDescriptorWrites`[i].`pImageInfo` must be a valid pointer to an array of `pDescriptorWrites`[i].`descriptorCount` valid `VkDescriptorImageInfo` structures

- VUID-vkCmdPushDescriptorSet-pipelineBindPoint-00363
  `pipelineBindPoint` must be supported by the `commandBuffer`’s parent `VkCommandPool`’s queue family

- VUID-vkCmdPushDescriptorSet-None-10356
  If the VK_KHR_push_descriptor extension is not enabled, `pushDescriptor` must be enabled

Valid Usage (Implicit)

- VUID-vkCmdPushDescriptorSet-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdPushDescriptorSet-pipelineBindPoint-parameter
  `pipelineBindPoint` must be a valid VkPipelineBindPoint value

- VUID-vkCmdPushDescriptorSet-layout-parameter
  `layout` must be a valid VkPipelineLayout handle

- VUID-vkCmdPushDescriptorSet-pDescriptorWrites-parameter
  `pDescriptorWrites` must be a valid pointer to an array of `descriptorWriteCount` valid VkWriteDescriptorSet structures

- VUID-vkCmdPushDescriptorSet-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdPushDescriptorSet-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, or VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdPushDescriptorSet-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdPushDescriptorSet-descriptorWriteCount-arraylength
  `descriptorWriteCount` must be greater than `0`

- VUID-vkCmdPushDescriptorSet-commonparent
  Both of `commandBuffer`, and `layout` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdPushDescriptorSet is not affected by conditional rendering

To push descriptor updates into a command buffer, call:

    // Provided by VK_VERSION_1_4
    void vkCmdPushDescriptorSet2(
        VkCommandBuffer                             commandBuffer,
        const VkPushDescriptorSetInfo*              pPushDescriptorSetInfo);

    // Provided by VK_KHR_maintenance6 with VK_KHR_push_descriptor
    // Equivalent to vkCmdPushDescriptorSet2
    void vkCmdPushDescriptorSet2KHR(
        VkCommandBuffer                             commandBuffer,
        const VkPushDescriptorSetInfo*              pPushDescriptorSetInfo);

- `commandBuffer` is the command buffer that the descriptors will be recorded in.

- `pPushDescriptorSetInfo` is a pointer to a `VkPushDescriptorSetInfo` structure.

Valid Usage

- VUID-vkCmdPushDescriptorSet2-commandBuffer-11295
  If `commandBuffer` is a secondary command buffer, it must have begun with VkCommandBufferInheritanceDescriptorHeapInfoEXT::`pSamplerHeapBindInfo` equal to `NULL`

- VUID-vkCmdPushDescriptorSet2-commandBuffer-11296
  If `commandBuffer` is a secondary command buffer, it must have begun with VkCommandBufferInheritanceDescriptorHeapInfoEXT::`pResourceHeapBindInfo` equal to `NULL`

- VUID-vkCmdPushDescriptorSet2-pPushDescriptorSetInfo-09468
  Each bit in `pPushDescriptorSetInfo->stageFlags` must be a stage supported by the `commandBuffer`’s parent `VkCommandPool`’s queue family

- VUID-vkCmdPushDescriptorSet2-None-10357
  If the VK_KHR_push_descriptor extension is not enabled, `pushDescriptor` must be enabled

Valid Usage (Implicit)

- VUID-vkCmdPushDescriptorSet2-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdPushDescriptorSet2-pPushDescriptorSetInfo-parameter
  `pPushDescriptorSetInfo` must be a valid pointer to a valid VkPushDescriptorSetInfo structure

- VUID-vkCmdPushDescriptorSet2-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdPushDescriptorSet2-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, or VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdPushDescriptorSet2-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdPushDescriptorSet2 is not affected by conditional rendering

The `VkPushDescriptorSetInfo` structure is defined as:

    // Provided by VK_VERSION_1_4
    typedef struct VkPushDescriptorSetInfo {
        VkStructureType                sType;
        const void*                    pNext;
        VkShaderStageFlags             stageFlags;
        VkPipelineLayout               layout;
        uint32_t                       set;
        uint32_t                       descriptorWriteCount;
        const VkWriteDescriptorSet*    pDescriptorWrites;
    } VkPushDescriptorSetInfo;

    // Provided by VK_KHR_maintenance6 with VK_KHR_push_descriptor
    // Equivalent to VkPushDescriptorSetInfo
    typedef VkPushDescriptorSetInfo VkPushDescriptorSetInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `stageFlags` is a bitmask of VkShaderStageFlagBits specifying the shader stages that will use the descriptors.

- `layout` is a VkPipelineLayout object used to program the bindings. If the `dynamicPipelineLayout` feature is enabled, `layout` can be VK_NULL_HANDLE and the layout must be specified by chaining VkPipelineLayoutCreateInfo structure off the `pNext`

- `set` is the set number of the descriptor set in the pipeline layout that will be updated.

- `descriptorWriteCount` is the number of elements in the `pDescriptorWrites` array.

- `pDescriptorWrites` is a pointer to an array of VkWriteDescriptorSet structures describing the descriptors to be updated.

If `stageFlags` specifies a subset of all stages corresponding to one or more pipeline bind points, the binding operation still affects all stages corresponding to the given pipeline bind point(s) as if the equivalent original version of this command had been called with the same parameters. For example, specifying a `stageFlags` value of VK_SHADER_STAGE_VERTEX_BIT | VK_SHADER_STAGE_FRAGMENT_BIT | VK_SHADER_STAGE_COMPUTE_BIT is equivalent to calling the original version of this command once with VK_PIPELINE_BIND_POINT_GRAPHICS and once with VK_PIPELINE_BIND_POINT_COMPUTE.

Valid Usage

- VUID-VkPushDescriptorSetInfo-set-00364
  `set` must be less than VkPipelineLayoutCreateInfo::`setLayoutCount` provided when `layout` was created

- VUID-VkPushDescriptorSetInfo-set-00365
  `set` must be the unique set number in the pipeline layout that uses a descriptor set layout that was created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT

- VUID-VkPushDescriptorSetInfo-pDescriptorWrites-06494
  For each element i where `pDescriptorWrites`[i].`descriptorType` is VK_DESCRIPTOR_TYPE_SAMPLER, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, or VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, `pDescriptorWrites`[i].`pImageInfo` must be a valid pointer to an array of `pDescriptorWrites`[i].`descriptorCount` valid `VkDescriptorImageInfo` structures

- VUID-VkPushDescriptorSetInfo-None-09495
  If the `dynamicPipelineLayout` feature is not enabled, `layout` must be a valid VkPipelineLayout handle

- VUID-VkPushDescriptorSetInfo-layout-09496
  If `layout` is VK_NULL_HANDLE, the `pNext` chain must include a valid VkPipelineLayoutCreateInfo structure

Valid Usage (Implicit)

- VUID-VkPushDescriptorSetInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PUSH_DESCRIPTOR_SET_INFO

- VUID-VkPushDescriptorSetInfo-pNext-pNext
  `pNext` must be `NULL` or a pointer to a valid instance of VkPipelineLayoutCreateInfo

- VUID-VkPushDescriptorSetInfo-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkPushDescriptorSetInfo-stageFlags-parameter
  `stageFlags` must be a valid combination of VkShaderStageFlagBits values

- VUID-VkPushDescriptorSetInfo-stageFlags-requiredbitmask
  `stageFlags` must not be `0`

- VUID-VkPushDescriptorSetInfo-layout-parameter
  If `layout` is not VK_NULL_HANDLE, `layout` must be a valid VkPipelineLayout handle

- VUID-VkPushDescriptorSetInfo-pDescriptorWrites-parameter
  `pDescriptorWrites` must be a valid pointer to an array of `descriptorWriteCount` valid VkWriteDescriptorSet structures

- VUID-VkPushDescriptorSetInfo-descriptorWriteCount-arraylength
  `descriptorWriteCount` must be greater than `0`

### 17.9. Push Descriptor Updates With Descriptor Update Templates

To use a descriptor update template to specify the push descriptors to update in a command buffer, call:

    // Provided by VK_VERSION_1_4
    void vkCmdPushDescriptorSetWithTemplate(
        VkCommandBuffer                             commandBuffer,
        VkDescriptorUpdateTemplate                  descriptorUpdateTemplate,
        VkPipelineLayout                            layout,
        uint32_t                                    set,
        const void*                                 pData);

    // Provided by VK_KHR_descriptor_update_template with VK_KHR_push_descriptor, VK_KHR_push_descriptor with VK_VERSION_1_1 or VK_KHR_descriptor_update_template
    // Equivalent to vkCmdPushDescriptorSetWithTemplate
    void vkCmdPushDescriptorSetWithTemplateKHR(
        VkCommandBuffer                             commandBuffer,
        VkDescriptorUpdateTemplate                  descriptorUpdateTemplate,
        VkPipelineLayout                            layout,
        uint32_t                                    set,
        const void*                                 pData);

- `commandBuffer` is the command buffer that the descriptors will be recorded in.

- `descriptorUpdateTemplate` is a descriptor update template defining how to interpret the descriptor information in `pData`.

- `layout` is a VkPipelineLayout object used to program the bindings. It must be compatible with the layout used to create the `descriptorUpdateTemplate` handle.

- `set` is the set number of the descriptor set in the pipeline layout that will be updated. This must be the same number used to create the `descriptorUpdateTemplate` handle.

- `pData` is a pointer to memory containing descriptors for the templated update.

Valid Usage

- VUID-vkCmdPushDescriptorSetWithTemplate-commandBuffer-11295
  If `commandBuffer` is a secondary command buffer, it must have begun with VkCommandBufferInheritanceDescriptorHeapInfoEXT::`pSamplerHeapBindInfo` equal to `NULL`

- VUID-vkCmdPushDescriptorSetWithTemplate-commandBuffer-11296
  If `commandBuffer` is a secondary command buffer, it must have begun with VkCommandBufferInheritanceDescriptorHeapInfoEXT::`pResourceHeapBindInfo` equal to `NULL`

- VUID-vkCmdPushDescriptorSetWithTemplate-commandBuffer-00366
  The `pipelineBindPoint` specified during the creation of the descriptor update template must be supported by the `commandBuffer`’s parent `VkCommandPool`’s queue family

- VUID-vkCmdPushDescriptorSetWithTemplate-pData-01686
  `pData` must be a valid pointer to a memory containing one or more valid instances of VkDescriptorImageInfo, VkDescriptorBufferInfo, or VkBufferView in a layout defined by `descriptorUpdateTemplate` when it was created with vkCreateDescriptorUpdateTemplate

- VUID-vkCmdPushDescriptorSetWithTemplate-layout-07993
  `layout` must be compatible with the layout used to create `descriptorUpdateTemplate`

- VUID-vkCmdPushDescriptorSetWithTemplate-descriptorUpdateTemplate-07994
  `descriptorUpdateTemplate` must have been created with a `templateType` of VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS

- VUID-vkCmdPushDescriptorSetWithTemplate-set-07995
  `set` must be the same value used to create `descriptorUpdateTemplate`

- VUID-vkCmdPushDescriptorSetWithTemplate-set-07304
  `set` must be less than VkPipelineLayoutCreateInfo::`setLayoutCount` provided when `layout` was created

- VUID-vkCmdPushDescriptorSetWithTemplate-set-11854
  `set` must reference a valid VkDescriptorSetLayout handle in `layout`

- VUID-vkCmdPushDescriptorSetWithTemplate-set-07305
  `set` must be the unique set number in the pipeline layout that uses a descriptor set layout that was created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT

- VUID-vkCmdPushDescriptorSetWithTemplate-None-10358
  If the VK_KHR_push_descriptor extension is not enabled, `pushDescriptor` must be enabled

Valid Usage (Implicit)

- VUID-vkCmdPushDescriptorSetWithTemplate-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdPushDescriptorSetWithTemplate-descriptorUpdateTemplate-parameter
  `descriptorUpdateTemplate` must be a valid VkDescriptorUpdateTemplate handle

- VUID-vkCmdPushDescriptorSetWithTemplate-layout-parameter
  `layout` must be a valid VkPipelineLayout handle

- VUID-vkCmdPushDescriptorSetWithTemplate-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdPushDescriptorSetWithTemplate-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, or VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdPushDescriptorSetWithTemplate-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdPushDescriptorSetWithTemplate-commonparent
  Each of `commandBuffer`, `descriptorUpdateTemplate`, and `layout` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdPushDescriptorSetWithTemplate is not affected by conditional rendering

API Example

    struct AppDataStructure
    {
        VkDescriptorImageInfo  imageInfo;          // a single image info
        // ... some more application-related data
    };

    const VkDescriptorUpdateTemplateEntry descriptorUpdateTemplateEntries[] =
    {
        // binding to a single image descriptor
        {
            .binding = 0,
            .dstArrayElement = 0,
            .descriptorCount = 1,
            .descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER,
            .offset = offsetof(AppDataStructure, imageInfo),
            .stride = 0     // not required if descriptorCount is 1
        }
    };

    // create a descriptor update template for push descriptor set updates
    const VkDescriptorUpdateTemplateCreateInfo createInfo =
    {
        .sType = VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO,
        .pNext = NULL,
        .flags = 0,
        .descriptorUpdateEntryCount = 1,
        .pDescriptorUpdateEntries = descriptorUpdateTemplateEntries,
        .templateType = VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS,
        .descriptorSetLayout = 0,   // ignored by given templateType
        .pipelineBindPoint = VK_PIPELINE_BIND_POINT_GRAPHICS,
        .pipelineLayout = myPipelineLayout,
        .set = 0,
    };

    VkDescriptorUpdateTemplate myDescriptorUpdateTemplate;
    myResult = vkCreateDescriptorUpdateTemplate(
        myDevice,
        &createInfo,
        NULL,
        &myDescriptorUpdateTemplate);

    AppDataStructure appData;
    // fill appData here or cache it in your engine
    vkCmdPushDescriptorSetWithTemplate(myCmdBuffer, myDescriptorUpdateTemplate, myPipelineLayout, 0,&appData);

To use a descriptor update template to specify the push descriptors to update in a command buffer, call:

    // Provided by VK_VERSION_1_4
    void vkCmdPushDescriptorSetWithTemplate2(
        VkCommandBuffer                             commandBuffer,
        const VkPushDescriptorSetWithTemplateInfo*  pPushDescriptorSetWithTemplateInfo);

    // Provided by VK_KHR_maintenance6 with VK_KHR_push_descriptor
    // Equivalent to vkCmdPushDescriptorSetWithTemplate2
    void vkCmdPushDescriptorSetWithTemplate2KHR(
        VkCommandBuffer                             commandBuffer,
        const VkPushDescriptorSetWithTemplateInfo*  pPushDescriptorSetWithTemplateInfo);

- `commandBuffer` is the command buffer that the descriptors will be recorded in.

- `pPushDescriptorSetWithTemplateInfo` is a pointer to a `VkPushDescriptorSetWithTemplateInfo` structure.

Valid Usage

- VUID-vkCmdPushDescriptorSetWithTemplate2-commandBuffer-11295
  If `commandBuffer` is a secondary command buffer, it must have begun with VkCommandBufferInheritanceDescriptorHeapInfoEXT::`pSamplerHeapBindInfo` equal to `NULL`

- VUID-vkCmdPushDescriptorSetWithTemplate2-commandBuffer-11296
  If `commandBuffer` is a secondary command buffer, it must have begun with VkCommandBufferInheritanceDescriptorHeapInfoEXT::`pResourceHeapBindInfo` equal to `NULL`

Valid Usage (Implicit)

- VUID-vkCmdPushDescriptorSetWithTemplate2-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdPushDescriptorSetWithTemplate2-pPushDescriptorSetWithTemplateInfo-parameter
  `pPushDescriptorSetWithTemplateInfo` must be a valid pointer to a valid VkPushDescriptorSetWithTemplateInfo structure

- VUID-vkCmdPushDescriptorSetWithTemplate2-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdPushDescriptorSetWithTemplate2-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, or VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdPushDescriptorSetWithTemplate2-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdPushDescriptorSetWithTemplate2 is not affected by conditional rendering

The `VkPushDescriptorSetWithTemplateInfo` structure is defined as:

    // Provided by VK_VERSION_1_4
    typedef struct VkPushDescriptorSetWithTemplateInfo {
        VkStructureType               sType;
        const void*                   pNext;
        VkDescriptorUpdateTemplate    descriptorUpdateTemplate;
        VkPipelineLayout              layout;
        uint32_t                      set;
        const void*                   pData;
    } VkPushDescriptorSetWithTemplateInfo;

    // Provided by VK_KHR_maintenance6 with VK_KHR_push_descriptor
    // Equivalent to VkPushDescriptorSetWithTemplateInfo
    typedef VkPushDescriptorSetWithTemplateInfo VkPushDescriptorSetWithTemplateInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `descriptorUpdateTemplate` is a descriptor update template defining how to interpret the descriptor information in `pData`.

- `layout` is a VkPipelineLayout object used to program the bindings. It must be compatible with the layout used to create the `descriptorUpdateTemplate` handle. If the `dynamicPipelineLayout` feature is enabled, `layout` can be VK_NULL_HANDLE and the layout must be specified by chaining VkPipelineLayoutCreateInfo structure off the `pNext`

- `set` is the set number of the descriptor set in the pipeline layout that will be updated. This must be the same number used to create the `descriptorUpdateTemplate` handle.

- `pData` is a pointer to memory containing descriptors for the templated update.

Valid Usage

- VUID-VkPushDescriptorSetWithTemplateInfo-commandBuffer-00366
  The `pipelineBindPoint` specified during the creation of the descriptor update template must be supported by the `commandBuffer`’s parent `VkCommandPool`’s queue family

- VUID-VkPushDescriptorSetWithTemplateInfo-pData-01686
  `pData` must be a valid pointer to a memory containing one or more valid instances of VkDescriptorImageInfo, VkDescriptorBufferInfo, or VkBufferView in a layout defined by `descriptorUpdateTemplate` when it was created with vkCreateDescriptorUpdateTemplate

- VUID-VkPushDescriptorSetWithTemplateInfo-layout-07993
  `layout` must be compatible with the layout used to create `descriptorUpdateTemplate`

- VUID-VkPushDescriptorSetWithTemplateInfo-descriptorUpdateTemplate-07994
  `descriptorUpdateTemplate` must have been created with a `templateType` of VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS

- VUID-VkPushDescriptorSetWithTemplateInfo-set-07995
  `set` must be the same value used to create `descriptorUpdateTemplate`

- VUID-VkPushDescriptorSetWithTemplateInfo-set-07304
  `set` must be less than VkPipelineLayoutCreateInfo::`setLayoutCount` provided when `layout` was created

- VUID-VkPushDescriptorSetWithTemplateInfo-set-11854
  `set` must reference a valid VkDescriptorSetLayout handle in `layout`

- VUID-VkPushDescriptorSetWithTemplateInfo-set-07305
  `set` must be the unique set number in the pipeline layout that uses a descriptor set layout that was created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT

- VUID-VkPushDescriptorSetWithTemplateInfo-None-09495
  If the `dynamicPipelineLayout` feature is not enabled, `layout` must be a valid VkPipelineLayout handle

- VUID-VkPushDescriptorSetWithTemplateInfo-layout-09496
  If `layout` is VK_NULL_HANDLE, the `pNext` chain must include a valid VkPipelineLayoutCreateInfo structure

- VUID-VkPushDescriptorSetWithTemplateInfo-None-10359
  If the VK_KHR_push_descriptor extension is not enabled, `pushDescriptor` must be enabled

Valid Usage (Implicit)

- VUID-VkPushDescriptorSetWithTemplateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PUSH_DESCRIPTOR_SET_WITH_TEMPLATE_INFO

- VUID-VkPushDescriptorSetWithTemplateInfo-pNext-pNext
  `pNext` must be `NULL` or a pointer to a valid instance of VkPipelineLayoutCreateInfo

- VUID-VkPushDescriptorSetWithTemplateInfo-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkPushDescriptorSetWithTemplateInfo-descriptorUpdateTemplate-parameter
  `descriptorUpdateTemplate` must be a valid VkDescriptorUpdateTemplate handle

- VUID-VkPushDescriptorSetWithTemplateInfo-layout-parameter
  If `layout` is not VK_NULL_HANDLE, `layout` must be a valid VkPipelineLayout handle

- VUID-VkPushDescriptorSetWithTemplateInfo-pData-parameter
  `pData` must be a pointer value

- VUID-VkPushDescriptorSetWithTemplateInfo-commonparent
  Both of `descriptorUpdateTemplate`, and `layout` that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevice

### 17.10. Push Constant Updates

As described above in section Pipeline Layouts, the pipeline layout defines shader push constants which are updated via Vulkan commands rather than via writes to memory or copy commands.

Note | Push constants represent a high speed path to modify constant data in pipelines that is expected to outperform memory-backed resource updates.

To update push constants, call:

    // Provided by VK_VERSION_1_0
    void vkCmdPushConstants(
        VkCommandBuffer                             commandBuffer,
        VkPipelineLayout                            layout,
        VkShaderStageFlags                          stageFlags,
        uint32_t                                    offset,
        uint32_t                                    size,
        const void*                                 pValues);

- `commandBuffer` is the command buffer in which the push constant update will be recorded.

- `layout` is the pipeline layout used to program the push constant updates.

- `stageFlags` is a bitmask of VkShaderStageFlagBits specifying the shader stages that will use the push constants in the updated range.

- `offset` is the start offset of the push constant range to update, in units of bytes.

- `size` is the size of the push constant range to update, in units of bytes.

- `pValues` is a pointer to an array of `size` bytes containing the new push constant values.

When a command buffer begins recording, all push constant values are undefined. Reads of undefined push constant values by the executing shader return undefined values.

Push constant values can be updated incrementally, causing shader stages in `stageFlags` to read the new data from `pValues` for push constants modified by this command, while still reading the previous data for push constants not modified by this command. When a bound pipeline command is issued, the bound pipeline’s layout must be compatible with the layouts used to set the values of all push constants in the pipeline layout’s push constant ranges, as described in Pipeline Layout Compatibility. Binding a pipeline with a layout that is not compatible with the push constant layout does not disturb the push constant values.

Note | As `stageFlags` needs to include all flags the relevant push constant ranges were created with, any flags that are not supported by the queue family that the VkCommandPool used to allocate `commandBuffer` was created on are ignored.

Valid Usage

- VUID-vkCmdPushConstants-commandBuffer-11295
  If `commandBuffer` is a secondary command buffer, it must have begun with VkCommandBufferInheritanceDescriptorHeapInfoEXT::`pSamplerHeapBindInfo` equal to `NULL`

- VUID-vkCmdPushConstants-commandBuffer-11296
  If `commandBuffer` is a secondary command buffer, it must have begun with VkCommandBufferInheritanceDescriptorHeapInfoEXT::`pResourceHeapBindInfo` equal to `NULL`

- VUID-vkCmdPushConstants-offset-01795
  For each byte in the range specified by `offset` and `size` and for each shader stage in `stageFlags`, there must be a push constant range in `layout` that includes that byte and that stage

- VUID-vkCmdPushConstants-offset-01796
  For each byte in the range specified by `offset` and `size` and for each push constant range that overlaps that byte, `stageFlags` must include all stages in that push constant range’s VkPushConstantRange::`stageFlags`

- VUID-vkCmdPushConstants-offset-00368
  `offset` must be a multiple of `4`

- VUID-vkCmdPushConstants-size-00369
  `size` must be a multiple of `4`

- VUID-vkCmdPushConstants-offset-00370
  `offset` must be less than `VkPhysicalDeviceLimits`::`maxPushConstantsSize`

- VUID-vkCmdPushConstants-size-00371
  `size` must be less than or equal to `VkPhysicalDeviceLimits`::`maxPushConstantsSize` minus `offset`

Valid Usage (Implicit)

- VUID-vkCmdPushConstants-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdPushConstants-layout-parameter
  `layout` must be a valid VkPipelineLayout handle

- VUID-vkCmdPushConstants-stageFlags-parameter
  `stageFlags` must be a valid combination of VkShaderStageFlagBits values

- VUID-vkCmdPushConstants-stageFlags-requiredbitmask
  `stageFlags` must not be `0`

- VUID-vkCmdPushConstants-pValues-parameter
  `pValues` must be a valid pointer to an array of `size` bytes

- VUID-vkCmdPushConstants-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdPushConstants-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, or VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdPushConstants-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdPushConstants-size-arraylength
  `size` must be greater than `0`

- VUID-vkCmdPushConstants-commonparent
  Both of `commandBuffer`, and `layout` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdPushConstants is not affected by conditional rendering

To update push constants, call:

    // Provided by VK_VERSION_1_4
    void vkCmdPushConstants2(
        VkCommandBuffer                             commandBuffer,
        const VkPushConstantsInfo*                  pPushConstantsInfo);

    // Provided by VK_KHR_maintenance6
    // Equivalent to vkCmdPushConstants2
    void vkCmdPushConstants2KHR(
        VkCommandBuffer                             commandBuffer,
        const VkPushConstantsInfo*                  pPushConstantsInfo);

- `commandBuffer` is the command buffer in which the push constant update will be recorded.

- `pPushConstantsInfo` is a pointer to a VkPushConstantsInfo structure.

Valid Usage

- VUID-vkCmdPushConstants2-commandBuffer-11295
  If `commandBuffer` is a secondary command buffer, it must have begun with VkCommandBufferInheritanceDescriptorHeapInfoEXT::`pSamplerHeapBindInfo` equal to `NULL`

- VUID-vkCmdPushConstants2-commandBuffer-11296
  If `commandBuffer` is a secondary command buffer, it must have begun with VkCommandBufferInheritanceDescriptorHeapInfoEXT::`pResourceHeapBindInfo` equal to `NULL`

Valid Usage (Implicit)

- VUID-vkCmdPushConstants2-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdPushConstants2-pPushConstantsInfo-parameter
  `pPushConstantsInfo` must be a valid pointer to a valid VkPushConstantsInfo structure

- VUID-vkCmdPushConstants2-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdPushConstants2-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, or VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdPushConstants2-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdPushConstants2 is not affected by conditional rendering

The `VkPushConstantsInfo` structure is defined as:

    // Provided by VK_VERSION_1_4
    typedef struct VkPushConstantsInfo {
        VkStructureType       sType;
        const void*           pNext;
        VkPipelineLayout      layout;
        VkShaderStageFlags    stageFlags;
        uint32_t              offset;
        uint32_t              size;
        const void*           pValues;
    } VkPushConstantsInfo;

    // Provided by VK_KHR_maintenance6
    // Equivalent to VkPushConstantsInfo
    typedef VkPushConstantsInfo VkPushConstantsInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `layout` is the pipeline layout used to program the push constant updates. If the `dynamicPipelineLayout` feature is enabled, `layout` can be VK_NULL_HANDLE and the layout must be specified by chaining VkPipelineLayoutCreateInfo structure off the `pNext`

- `stageFlags` is a bitmask of VkShaderStageFlagBits specifying the shader stages that will use the push constants in the updated range.

- `offset` is the start offset of the push constant range to update, in units of bytes.

- `size` is the size of the push constant range to update, in units of bytes.

- `pValues` is a pointer to an array of `size` bytes containing the new push constant values.

Valid Usage

- VUID-VkPushConstantsInfo-offset-01795
  For each byte in the range specified by `offset` and `size` and for each shader stage in `stageFlags`, there must be a push constant range in `layout` that includes that byte and that stage

- VUID-VkPushConstantsInfo-offset-01796
  For each byte in the range specified by `offset` and `size` and for each push constant range that overlaps that byte, `stageFlags` must include all stages in that push constant range’s VkPushConstantRange::`stageFlags`

- VUID-VkPushConstantsInfo-offset-00368
  `offset` must be a multiple of `4`

- VUID-VkPushConstantsInfo-size-00369
  `size` must be a multiple of `4`

- VUID-VkPushConstantsInfo-offset-00370
  `offset` must be less than `VkPhysicalDeviceLimits`::`maxPushConstantsSize`

- VUID-VkPushConstantsInfo-size-00371
  `size` must be less than or equal to `VkPhysicalDeviceLimits`::`maxPushConstantsSize` minus `offset`

- VUID-VkPushConstantsInfo-None-09495
  If the `dynamicPipelineLayout` feature is not enabled, `layout` must be a valid VkPipelineLayout handle

- VUID-VkPushConstantsInfo-layout-09496
  If `layout` is VK_NULL_HANDLE, the `pNext` chain must include a valid VkPipelineLayoutCreateInfo structure

Valid Usage (Implicit)

- VUID-VkPushConstantsInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PUSH_CONSTANTS_INFO

- VUID-VkPushConstantsInfo-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkPipelineLayoutCreateInfo or VkPushConstantBankInfoNV

- VUID-VkPushConstantsInfo-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkPushConstantsInfo-layout-parameter
  If `layout` is not VK_NULL_HANDLE, `layout` must be a valid VkPipelineLayout handle

- VUID-VkPushConstantsInfo-stageFlags-parameter
  `stageFlags` must be a valid combination of VkShaderStageFlagBits values

- VUID-VkPushConstantsInfo-stageFlags-requiredbitmask
  `stageFlags` must not be `0`

- VUID-VkPushConstantsInfo-pValues-parameter
  `pValues` must be a valid pointer to an array of `size` bytes

- VUID-VkPushConstantsInfo-size-arraylength
  `size` must be greater than `0`

## 18. Descriptor Buffers

If the `descriptorBuffer` feature is enabled, an alternative way to specify descriptor sets is via buffers, rather than descriptor set objects.

### 18.1. Putting Descriptors in Memory

Commands are provided to retrieve descriptor data, and also to locate where in memory that data must be written to match the given descriptor set layout.

To determine the amount of memory needed to store all descriptors with a given layout, call:

Warning | This functionality is superseded by VK_EXT_descriptor_heap. See Legacy Functionality for more information.

    // Provided by VK_EXT_descriptor_buffer
    void vkGetDescriptorSetLayoutSizeEXT(
        VkDevice                                    device,
        VkDescriptorSetLayout                       layout,
        VkDeviceSize*                               pLayoutSizeInBytes);

- `device` is the logical device that gets the size.

- `layout` is the descriptor set layout being queried.

- `pLayoutSizeInBytes` is a pointer to VkDeviceSize where the size in bytes will be written.

The size of a descriptor set layout will be at least as large as the sum total of the size of all descriptors in the layout, and may be larger. This size represents the amount of memory that will be required to store all of the descriptors for this layout in memory, when placed according to the layout’s offsets as obtained by vkGetDescriptorSetLayoutBindingOffsetEXT.

If any `binding` in `layout` is VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT, the returned size includes space for the maximum `descriptorCount` descriptors as declared for that `binding`. To compute the required size of a descriptor set with a VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT:

  size = offset + descriptorSize × variableDescriptorCount

where offset is obtained by vkGetDescriptorSetLayoutBindingOffsetEXT and descriptorSize is the size of the relevant descriptor as obtained from VkPhysicalDeviceDescriptorBufferPropertiesEXT, and variableDescriptorCount is the equivalent of VkDescriptorSetVariableDescriptorCountAllocateInfo::`pDescriptorCounts`. For VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK, variableDescriptorCount is the size in bytes for the inline uniform block, and descriptorSize is 1.

If VkPhysicalDeviceDescriptorBufferPropertiesEXT::`combinedImageSamplerDescriptorSingleArray` is VK_FALSE and the variable descriptor type is VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, variableDescriptorCount is always considered to be the upper bound.

Valid Usage

- VUID-vkGetDescriptorSetLayoutSizeEXT-None-08011
  The `descriptorBuffer` feature must be enabled

- VUID-vkGetDescriptorSetLayoutSizeEXT-layout-08012
  `layout` must have been created with the VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT flag set

- VUID-vkGetDescriptorSetLayoutSizeEXT-layout-11811
  `layout` must have not been created with the VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT flag set

- VUID-vkGetDescriptorSetLayoutSizeEXT-layout-11812
  `layout` must have not been created with the VK_DESCRIPTOR_SET_LAYOUT_CREATE_EMBEDDED_IMMUTABLE_SAMPLERS_BIT_EXT flag set

Valid Usage (Implicit)

- VUID-vkGetDescriptorSetLayoutSizeEXT-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetDescriptorSetLayoutSizeEXT-layout-parameter
  `layout` must be a valid VkDescriptorSetLayout handle

- VUID-vkGetDescriptorSetLayoutSizeEXT-pLayoutSizeInBytes-parameter
  `pLayoutSizeInBytes` must be a valid pointer to a VkDeviceSize value

- VUID-vkGetDescriptorSetLayoutSizeEXT-layout-parent
  `layout` must have been created, allocated, or retrieved from `device`

To get the offset of a binding within a descriptor set layout in memory, call:

Warning | This functionality is superseded by VK_EXT_descriptor_heap. See Legacy Functionality for more information.

    // Provided by VK_EXT_descriptor_buffer
    void vkGetDescriptorSetLayoutBindingOffsetEXT(
        VkDevice                                    device,
        VkDescriptorSetLayout                       layout,
        uint32_t                                    binding,
        VkDeviceSize*                               pOffset);

- `device` is the logical device that gets the offset.

- `layout` is the descriptor set layout being queried.

- `binding` is the binding number being queried.

- `pOffset` is a pointer to VkDeviceSize where the byte offset of the binding will be written.

Each binding in a descriptor set layout is assigned an offset in memory by the implementation. When a shader accesses a resource with that binding, it will access the bound descriptor buffer from that offset to look for its descriptor. This command provides an application with that offset, so that descriptors can be placed in the correct locations. The precise location accessed by a shader for a given descriptor is as follows:

  location = bufferAddress + setOffset + descriptorOffset + (arrayElement × descriptorSize)

where bufferAddress and setOffset are the base address and offset for the identified descriptor set as specified by vkCmdBindDescriptorBuffersEXT and vkCmdSetDescriptorBufferOffsetsEXT, descriptorOffset is the offset for the binding returned by this command, arrayElement is the index into the array specified in the shader, and descriptorSize is the size of the relevant descriptor as obtained from VkPhysicalDeviceDescriptorBufferPropertiesEXT. Applications are responsible for placing valid descriptors at the expected location in order for a shader to access it. The overall offset added to bufferAddress to calculate location must be less than VkPhysicalDeviceDescriptorBufferPropertiesEXT::`maxSamplerDescriptorBufferRange` for samplers and VkPhysicalDeviceDescriptorBufferPropertiesEXT::`maxResourceDescriptorBufferRange` for resources.

If any `binding` in `layout` is VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT, that `binding` must have the largest offset of any `binding`.

A descriptor `binding` with type VK_DESCRIPTOR_TYPE_MUTABLE_EXT can be used. Any potential types in VkMutableDescriptorTypeCreateInfoEXT::`pDescriptorTypes` for `binding` share the same offset. If the size of the mutable descriptor is larger than the size of a concrete descriptor type being accessed, the padding area is ignored by the implementation.

Valid Usage

- VUID-vkGetDescriptorSetLayoutBindingOffsetEXT-None-08013
  The `descriptorBuffer` feature must be enabled

- VUID-vkGetDescriptorSetLayoutBindingOffsetEXT-layout-08014
  `layout` must have been created with the VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT flag set

- VUID-vkGetDescriptorSetLayoutBindingOffsetEXT-layout-11813
  `layout` must have not been created with the VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT flag set

- VUID-vkGetDescriptorSetLayoutBindingOffsetEXT-layout-11814
  `layout` must have not been created with the VK_DESCRIPTOR_SET_LAYOUT_CREATE_EMBEDDED_IMMUTABLE_SAMPLERS_BIT_EXT flag set

Valid Usage (Implicit)

- VUID-vkGetDescriptorSetLayoutBindingOffsetEXT-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetDescriptorSetLayoutBindingOffsetEXT-layout-parameter
  `layout` must be a valid VkDescriptorSetLayout handle

- VUID-vkGetDescriptorSetLayoutBindingOffsetEXT-pOffset-parameter
  `pOffset` must be a valid pointer to a VkDeviceSize value

- VUID-vkGetDescriptorSetLayoutBindingOffsetEXT-layout-parent
  `layout` must have been created, allocated, or retrieved from `device`

To get descriptor data to place in a buffer, call:

Warning | This functionality is superseded by VK_EXT_descriptor_heap. See Legacy Functionality for more information.

    // Provided by VK_EXT_descriptor_buffer
    void vkGetDescriptorEXT(
        VkDevice                                    device,
        const VkDescriptorGetInfoEXT*               pDescriptorInfo,
        size_t                                      dataSize,
        void*                                       pDescriptor);

- `device` is the logical device that gets the descriptor.

- `pDescriptorInfo` is a pointer to a VkDescriptorGetInfoEXT structure specifying the parameters of the descriptor to get.

- `dataSize` is the amount of the descriptor data to get in bytes.

- `pDescriptor` is a pointer to an application-allocated buffer where the descriptor will be written.

The size of the data for each descriptor type is determined by the value in VkPhysicalDeviceDescriptorBufferPropertiesEXT. This value also defines the stride in bytes for arrays of that descriptor type.

If the VkPhysicalDeviceDescriptorBufferPropertiesEXT::`combinedImageSamplerDescriptorSingleArray` property is VK_FALSE the implementation requires an array of VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER descriptors to be written into a descriptor buffer as an array of image descriptors, immediately followed by an array of sampler descriptors. Applications must write the first VkPhysicalDeviceDescriptorBufferPropertiesEXT::`sampledImageDescriptorSize` bytes of the data returned through `pDescriptor` to the first array, and the remaining VkPhysicalDeviceDescriptorBufferPropertiesEXT::`samplerDescriptorSize` bytes of the data to the second array. For variable-sized descriptor bindings of VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER descriptors, the two arrays each have a size equal to the upper bound `descriptorCount` of that binding.

A descriptor obtained by this command references the underlying VkImageView or VkSampler, and these objects must not be destroyed before the last time a descriptor is dynamically accessed. For descriptor types which consume an address instead of an object, the underlying VkBuffer is referenced instead.

Valid Usage

- VUID-vkGetDescriptorEXT-None-08015
  The `descriptorBuffer` feature must be enabled

- VUID-vkGetDescriptorEXT-dataSize-08125
  If `pDescriptorInfo->type` is not VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER or `pDescriptorInfo->data.pCombinedImageSampler` has an `imageView` member that was not created with a `VkSamplerYcbcrConversionInfo` structure in its `pNext` chain, `dataSize` must equal the size of a descriptor of type VkDescriptorGetInfoEXT::`type` determined by the value in VkPhysicalDeviceDescriptorBufferPropertiesEXT , or determined by VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT::`combinedImageSamplerDensityMapDescriptorSize` if `pDescriptorInfo` specifies a VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER whose VkSampler was created with VK_SAMPLER_CREATE_SUBSAMPLED_BIT_EXT set

- VUID-vkGetDescriptorEXT-descriptorType-09469
  If `pDescriptorInfo->type` is VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER and `pDescriptorInfo->data.pCombinedImageSampler` has an `imageView` member that was created with a `VkSamplerYcbcrConversionInfo` structure in its `pNext` chain, `dataSize` must equal the size of VkPhysicalDeviceDescriptorBufferPropertiesEXT::`combinedImageSamplerDescriptorSize` times VkSamplerYcbcrConversionImageFormatProperties::`combinedImageSamplerDescriptorCount`

- VUID-vkGetDescriptorEXT-pDescriptorInfo-09507
  If `pDescriptorInfo->type` is VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER and it has a `imageView` that is VK_NULL_HANDLE then `dataSize` must be equal to the size of VkPhysicalDeviceDescriptorBufferPropertiesEXT::`combinedImageSamplerDescriptorSize`

Valid Usage (Implicit)

- VUID-vkGetDescriptorEXT-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetDescriptorEXT-pDescriptorInfo-parameter
  `pDescriptorInfo` must be a valid pointer to a valid VkDescriptorGetInfoEXT structure

- VUID-vkGetDescriptorEXT-pDescriptor-parameter
  `pDescriptor` must be a valid pointer to an array of `dataSize` bytes

- VUID-vkGetDescriptorEXT-dataSize-arraylength
  `dataSize` must be greater than `0`

Information about the descriptor to get is passed in a `VkDescriptorGetInfoEXT` structure:

Warning | This functionality is superseded by VK_EXT_descriptor_heap. See Legacy Functionality for more information.

    // Provided by VK_EXT_descriptor_buffer
    typedef struct VkDescriptorGetInfoEXT {
        VkStructureType        sType;
        const void*            pNext;
        VkDescriptorType       type;
        VkDescriptorDataEXT    data;
    } VkDescriptorGetInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `type` is the type of descriptor to get.

- `data` is a VkDescriptorDataEXT union containing the information needed to get the descriptor.

Valid Usage

- VUID-VkDescriptorGetInfoEXT-type-08018
  `type` must not be VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC or VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK

- VUID-VkDescriptorGetInfoEXT-type-08019
  If `type` is VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, the `pCombinedImageSampler->sampler` member of `data` must be a VkSampler created on `device`

- VUID-VkDescriptorGetInfoEXT-type-08020
  If `type` is VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, the `pCombinedImageSampler->imageView` member of `data` must be a VkImageView created on `device`, or VK_NULL_HANDLE

- VUID-VkDescriptorGetInfoEXT-type-08021
  If `type` is VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, the `pInputAttachmentImage->imageView` member of `data` must be a VkImageView created on `device`

- VUID-VkDescriptorGetInfoEXT-type-08022
  If `type` is VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, and if `pSampledImage` is not `NULL`, the `pSampledImage->imageView` member of `data` must be a VkImageView created on `device`, or VK_NULL_HANDLE

- VUID-VkDescriptorGetInfoEXT-type-08023
  If `type` is VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, and if `pStorageImage` is not `NULL`, the `pStorageImage->imageView` member of `data` must be a VkImageView created on `device`, or VK_NULL_HANDLE

- VUID-VkDescriptorGetInfoEXT-type-09427
  If `type` is VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER, `pUniformBuffer` is not `NULL` , the number of texel buffer elements given by (⌊`pUniformBuffer->range` / (texel block size)⌋ × (texels per block)) where texel block size and texels per block are as defined in the Compatible Formats table for `pUniformBuffer->format`, must be less than or equal to `VkPhysicalDeviceLimits`::`maxTexelBufferElements`

- VUID-VkDescriptorGetInfoEXT-type-09428
  If `type` is VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, `pStorageBuffer` is not `NULL` , the number of texel buffer elements given by (⌊`pStorageBuffer->range` / (texel block size)⌋ × (texels per block)) where texel block size and texels per block are as defined in the Compatible Formats table for `pStorageBuffer->format`, must be less than or equal to `VkPhysicalDeviceLimits`::`maxTexelBufferElements`

- VUID-VkDescriptorGetInfoEXT-type-08028
  If `type` is VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR and `accelerationStructure` is not `0`, `accelerationStructure` must contain the address of a VkAccelerationStructureKHR created on `device`

- VUID-VkDescriptorGetInfoEXT-type-08029
  If `type` is VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV and `accelerationStructure` is not `0`, `accelerationStructure` must contain the handle of a VkAccelerationStructureNV created on `device`, returned by vkGetAccelerationStructureHandleNV

- VUID-VkDescriptorGetInfoEXT-type-09701
  If `type` is VK_DESCRIPTOR_TYPE_TENSOR_ARM, a VkDescriptorGetTensorInfoARM structure must be included in the `pNext` chain and `data` is ignored

- VUID-VkDescriptorGetInfoEXT-type-12216
  If `type` is VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER and `pCombinedImageSampler->imageView` is not VK_NULL_HANDLE, the `pCombinedImageSampler->imageView` member of `data` must have been created with VK_IMAGE_USAGE_SAMPLED_BIT set

- VUID-VkDescriptorGetInfoEXT-type-12217
  If `type` is VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, `pSampledImage` is not `NULL`, and `pSampledImage->imageView` is not VK_NULL_HANDLE, the `pSampledImage->imageView` member of `data` must have been created with VK_IMAGE_USAGE_SAMPLED_BIT set

- VUID-VkDescriptorGetInfoEXT-type-12218
  If `type` is VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, `pStorageImage` is not `NULL`, and `pStorageImage->imageView` is not VK_NULL_HANDLE, the `pStorageImage->imageView` member of `data` must have been created with VK_IMAGE_USAGE_STORAGE_BIT set

- VUID-VkDescriptorGetInfoEXT-type-12219
  If `type` is VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, the `pInputAttachmentImage->imageView` member of `data` must have been created with VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT set

- VUID-VkDescriptorGetInfoEXT-type-12220
  If `type` is VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, `pUniformBuffer` is not `NULL` and `pUniformBuffer->address` is not zero, `pUniformBuffer->address` must be a device address allocated to the application from a buffer created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-VkDescriptorGetInfoEXT-type-12221
  If `type` is VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, `pStorageBuffer` is not `NULL` and `pStorageBuffer->address` is not zero, `pStorageBuffer->address` must be a device address allocated to the application from a buffer created with the VK_BUFFER_USAGE_STORAGE_BUFFER_BIT usage flag set

- VUID-VkDescriptorGetInfoEXT-type-12222
  If `type` is VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER, `pUniformTexelBuffer` is not `NULL` and `pUniformTexelBuffer->address` is not zero, `pUniformTexelBuffer->address` must be a device address allocated to the application from a buffer created with the VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT usage flag set

- VUID-VkDescriptorGetInfoEXT-type-12223
  If `type` is VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, `pStorageTexelBuffer` is not `NULL` and `pStorageTexelBuffer->address` is not zero, `pStorageTexelBuffer->address` must be a device address allocated to the application from a buffer created with the VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT usage flag set

- VUID-VkDescriptorGetInfoEXT-type-12265
  If `type` is VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER and `pUniformBuffer` is not `NULL`, `pUniformBuffer->address` must be aligned to `VkPhysicalDeviceLimits`::`minUniformBufferOffsetAlignment`

- VUID-VkDescriptorGetInfoEXT-type-12266
  If `type` is VK_DESCRIPTOR_TYPE_STORAGE_BUFFER and `pStorageBuffer` is not `NULL`, `pStorageBuffer->address` must be aligned to `VkPhysicalDeviceLimits`::`minStorageBufferOffsetAlignment`

- VUID-VkDescriptorGetInfoEXT-type-12269
  If `type` is VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER, and `pUniformTexelBuffer` is not `NULL`, `pUniformTexelBuffer->address` must be a multiple of the effective alignment requirement as determined by `minTexelBufferOffsetAlignment`

- VUID-VkDescriptorGetInfoEXT-type-12270
  If `type` is VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, and `pStorageTexelBuffer` is not `NULL`, `pStorageTexelBuffer->address` must be a multiple of the effective alignment requirement as determined by `minTexelBufferOffsetAlignment`

Valid Usage (Implicit)

- VUID-VkDescriptorGetInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DESCRIPTOR_GET_INFO_EXT

- VUID-VkDescriptorGetInfoEXT-pNext-pNext
  `pNext` must be `NULL` or a pointer to a valid instance of VkDescriptorGetTensorInfoARM

- VUID-VkDescriptorGetInfoEXT-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkDescriptorGetInfoEXT-type-parameter
  `type` must be a valid VkDescriptorType value

- VUID-VkDescriptorGetInfoEXT-pSampler-parameter
  If `type` is VK_DESCRIPTOR_TYPE_SAMPLER, the `pSampler` member of `data` must be a valid pointer to a valid VkSampler handle

- VUID-VkDescriptorGetInfoEXT-pCombinedImageSampler-parameter
  If `type` is VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, the `pCombinedImageSampler` member of `data` must be a valid pointer to a valid VkDescriptorImageInfo structure

- VUID-VkDescriptorGetInfoEXT-pInputAttachmentImage-parameter
  If `type` is VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, the `pInputAttachmentImage` member of `data` must be a valid pointer to a valid VkDescriptorImageInfo structure

- VUID-VkDescriptorGetInfoEXT-pSampledImage-parameter
  If `type` is VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, and if `pSampledImage` is not `NULL`, the `pSampledImage` member of `data` must be a valid pointer to a valid VkDescriptorImageInfo structure

- VUID-VkDescriptorGetInfoEXT-pStorageImage-parameter
  If `type` is VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, and if `pStorageImage` is not `NULL`, the `pStorageImage` member of `data` must be a valid pointer to a valid VkDescriptorImageInfo structure

- VUID-VkDescriptorGetInfoEXT-pUniformTexelBuffer-parameter
  If `type` is VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER, and if `pUniformTexelBuffer` is not `NULL`, the `pUniformTexelBuffer` member of `data` must be a valid pointer to a valid VkDescriptorAddressInfoEXT structure

- VUID-VkDescriptorGetInfoEXT-pStorageTexelBuffer-parameter
  If `type` is VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, and if `pStorageTexelBuffer` is not `NULL`, the `pStorageTexelBuffer` member of `data` must be a valid pointer to a valid VkDescriptorAddressInfoEXT structure

- VUID-VkDescriptorGetInfoEXT-pUniformBuffer-parameter
  If `type` is VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, and if `pUniformBuffer` is not `NULL`, the `pUniformBuffer` member of `data` must be a valid pointer to a valid VkDescriptorAddressInfoEXT structure

- VUID-VkDescriptorGetInfoEXT-pStorageBuffer-parameter
  If `type` is VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, and if `pStorageBuffer` is not `NULL`, the `pStorageBuffer` member of `data` must be a valid pointer to a valid VkDescriptorAddressInfoEXT structure

- VUID-VkDescriptorGetInfoEXT-accelerationStructure-parameter
  If `type` is VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR or VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV, the `accelerationStructure` member of `data` must be a valid VkDeviceAddress value

Data describing the descriptor is passed in a `VkDescriptorDataEXT` structure:

Warning | This functionality is superseded by VK_EXT_descriptor_heap. See Legacy Functionality for more information.

    // Provided by VK_EXT_descriptor_buffer
    typedef union VkDescriptorDataEXT {
        const VkSampler*                     pSampler;
        const VkDescriptorImageInfo*         pCombinedImageSampler;
        const VkDescriptorImageInfo*         pInputAttachmentImage;
        const VkDescriptorImageInfo*         pSampledImage;
        const VkDescriptorImageInfo*         pStorageImage;
        const VkDescriptorAddressInfoEXT*    pUniformTexelBuffer;
        const VkDescriptorAddressInfoEXT*    pStorageTexelBuffer;
        const VkDescriptorAddressInfoEXT*    pUniformBuffer;
        const VkDescriptorAddressInfoEXT*    pStorageBuffer;
        VkDeviceAddress                      accelerationStructure;
    } VkDescriptorDataEXT;

- `pSampler` is a pointer to a VkSampler handle specifying the parameters of a VK_DESCRIPTOR_TYPE_SAMPLER descriptor.

- `pCombinedImageSampler` is a pointer to a VkDescriptorImageInfo structure specifying the parameters of a VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER descriptor.

- `pInputAttachmentImage` is a pointer to a VkDescriptorImageInfo structure specifying the parameters of a VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT descriptor.

- `pSampledImage` is a pointer to a VkDescriptorImageInfo structure specifying the parameters of a VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE descriptor.

- `pStorageImage` is a pointer to a VkDescriptorImageInfo structure specifying the parameters of a VK_DESCRIPTOR_TYPE_STORAGE_IMAGE descriptor.

- `pUniformTexelBuffer` is a pointer to a VkDescriptorAddressInfoEXT structure specifying the parameters of a VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER descriptor.

- `pStorageTexelBuffer` is a pointer to a VkDescriptorAddressInfoEXT structure specifying the parameters of a VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER descriptor.

- `pUniformBuffer` is a pointer to a VkDescriptorAddressInfoEXT structure specifying the parameters of a VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER descriptor.

- `pStorageBuffer` is a pointer to a VkDescriptorAddressInfoEXT structure specifying the parameters of a VK_DESCRIPTOR_TYPE_STORAGE_BUFFER descriptor.

- `accelerationStructure` is the address of a VkAccelerationStructureKHR specifying the parameters of a VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR descriptor , or a VkAccelerationStructureNV handle specifying the parameters of a VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV descriptor.

If the `nullDescriptor` feature is enabled, `pSampledImage`, `pStorageImage`, `pUniformTexelBuffer`, `pStorageTexelBuffer`, `pUniformBuffer`, and `pStorageBuffer` can each be `NULL`. Loads from a null descriptor return zero values and stores and atomics to a null descriptor are discarded.

If the `nullDescriptor` feature is enabled, `accelerationStructure` can be `0`. A null acceleration structure descriptor results in the miss shader being invoked.

Valid Usage

- VUID-VkDescriptorDataEXT-type-08034
  If VkDescriptorGetInfoEXT::`type` is VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, and the `nullDescriptor` feature is not enabled, `pCombinedImageSampler->imageView` must not be VK_NULL_HANDLE

- VUID-VkDescriptorDataEXT-type-08035
  If VkDescriptorGetInfoEXT::`type` is VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, and the `nullDescriptor` feature is not enabled, `pSampledImage` must not be `NULL` and `pSampledImage->imageView` must not be VK_NULL_HANDLE

- VUID-VkDescriptorDataEXT-type-08036
  If VkDescriptorGetInfoEXT::`type` is VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, and the `nullDescriptor` feature is not enabled, `pStorageImage` must not be `NULL` and `pStorageImage->imageView` must not be VK_NULL_HANDLE

- VUID-VkDescriptorDataEXT-type-08037
  If VkDescriptorGetInfoEXT::`type` is VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER, and the `nullDescriptor` feature is not enabled, `pUniformTexelBuffer` must not be `NULL`

- VUID-VkDescriptorDataEXT-type-08038
  If VkDescriptorGetInfoEXT::`type` is VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, and the `nullDescriptor` feature is not enabled, `pStorageTexelBuffer` must not be `NULL`

- VUID-VkDescriptorDataEXT-type-08039
  If VkDescriptorGetInfoEXT::`type` is VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, and the `nullDescriptor` feature is not enabled, `pUniformBuffer` must not be `NULL`

- VUID-VkDescriptorDataEXT-type-08040
  If VkDescriptorGetInfoEXT::`type` is VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, and the `nullDescriptor` feature is not enabled, `pStorageBuffer` must not be `NULL`

- VUID-VkDescriptorDataEXT-type-08041
  If VkDescriptorGetInfoEXT::`type` is VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR, and the `nullDescriptor` feature is not enabled, `accelerationStructure` must not be `0`

- VUID-VkDescriptorDataEXT-type-08042
  If VkDescriptorGetInfoEXT::`type` is VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV, and the `nullDescriptor` feature is not enabled, `accelerationStructure` must not be `0`

Data describing a VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER, or VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER descriptor is passed in a `VkDescriptorAddressInfoEXT` structure:

Warning | This functionality is superseded by VK_EXT_descriptor_heap. See Legacy Functionality for more information.

    // Provided by VK_EXT_descriptor_buffer
    typedef struct VkDescriptorAddressInfoEXT {
        VkStructureType    sType;
        void*              pNext;
        VkDeviceAddress    address;
        VkDeviceSize       range;
        VkFormat           format;
    } VkDescriptorAddressInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `address` is either `0` or a device address at an offset in a buffer, where the base address can be queried from vkGetBufferDeviceAddress.

- `range` is the size in bytes of the buffer or buffer view used by the descriptor.

- `format` is the format of the data elements in the buffer view and is ignored for buffers.

Valid Usage

- VUID-VkDescriptorAddressInfoEXT-None-09508
  If `address` is not zero, and the descriptor is of type VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER or VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, then `format` must not be VK_FORMAT_UNDEFINED

- VUID-VkDescriptorAddressInfoEXT-address-08043
  If the `nullDescriptor` feature is not enabled, `address` must not be zero

- VUID-VkDescriptorAddressInfoEXT-nullDescriptor-08938
  If `address` is zero, `range` must be VK_WHOLE_SIZE

- VUID-VkDescriptorAddressInfoEXT-nullDescriptor-08939
  If `address` is not zero, `range` must not be VK_WHOLE_SIZE

- VUID-VkDescriptorAddressInfoEXT-range-08045
  If `address` is not zero, then `range` must be less than or equal to the size of the buffer containing `address` minus the offset of `address` from the base address of the buffer

- VUID-VkDescriptorAddressInfoEXT-range-08940
  `range` must not be zero

- VUID-VkDescriptorAddressInfoEXT-None-12271
  If Vulkan 1.3 is not supported and the `ycbcr2plane444Formats` feature is not enabled, `format` must not be VK_FORMAT_G8_B8R8_2PLANE_444_UNORM, VK_FORMAT_G10X6_B10X6R10X6_2PLANE_444_UNORM_3PACK16, VK_FORMAT_G12X4_B12X4R12X4_2PLANE_444_UNORM_3PACK16, or VK_FORMAT_G16_B16R16_2PLANE_444_UNORM

Valid Usage (Implicit)

- VUID-VkDescriptorAddressInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DESCRIPTOR_ADDRESS_INFO_EXT

- VUID-VkDescriptorAddressInfoEXT-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkDescriptorAddressInfoEXT-address-parameter
  If `address` is not `0`, `address` must be a valid VkDeviceAddress value

- VUID-VkDescriptorAddressInfoEXT-format-parameter
  `format` must be a valid VkFormat value

If the `nullDescriptor` feature is enabled, `address` can be zero. Loads from a null descriptor return zero values and stores and atomics to a null descriptor are discarded.

Immutable samplers specified in a descriptor set layout through `pImmutableSamplers` must be provided by applications when obtaining descriptor data. Immutable samplers written in a descriptor buffer must have identical parameters to the immutable samplers in the descriptor set layout that consumes the sampler.

Note | If the descriptor set layout was created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_EMBEDDED_IMMUTABLE_SAMPLERS_BIT_EXT, there is no buffer backing for the immutable sampler, so this requirement does not exist. The implementation handles allocation of these descriptors internally.

Note | As descriptors are now in regular memory, drivers cannot hide copies of immutable samplers that end up in descriptor sets from the application. As such, applications are required to provide these samplers as if they were not provided immutably.

The `VkDescriptorGetTensorInfoARM` is defined as:

    // Provided by VK_EXT_descriptor_buffer with VK_ARM_tensors
    typedef struct VkDescriptorGetTensorInfoARM {
        VkStructureType    sType;
        const void*        pNext;
        VkTensorViewARM    tensorView;
    } VkDescriptorGetTensorInfoARM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `tensorView` is a VkTensorViewARM handle specifying the parameters of a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor.

Valid Usage

- VUID-VkDescriptorGetTensorInfoARM-nullDescriptor-09899
  If the `nullDescriptor` feature is not enabled, `tensorView` must not be VK_NULL_HANDLE

Valid Usage (Implicit)

- VUID-VkDescriptorGetTensorInfoARM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DESCRIPTOR_GET_TENSOR_INFO_ARM

- VUID-VkDescriptorGetTensorInfoARM-tensorView-parameter
  If `tensorView` is not VK_NULL_HANDLE, `tensorView` must be a valid VkTensorViewARM handle

Structure Chaining

Extends the structure

  - VkDescriptorGetInfoEXT

### 18.2. Binding Descriptor Buffers

Descriptor buffers have their own separate binding point on the command buffer, with buffers bound using vkCmdBindDescriptorBuffersEXT. vkCmdSetDescriptorBufferOffsetsEXT assigns pairs of buffer binding indices and buffer offsets to the same binding point on the command buffer as vkCmdBindDescriptorSets, allowing subsequent bound pipeline commands to use the specified descriptor buffers. Bindings applied via vkCmdBindDescriptorSets cannot exist simultaneously with those applied via calls to vkCmdSetDescriptorBufferOffsetsEXT or vkCmdBindDescriptorBufferEmbeddedSamplersEXT, as calls to vkCmdSetDescriptorBufferOffsetsEXT or vkCmdBindDescriptorBufferEmbeddedSamplersEXT invalidate any bindings by previous calls to vkCmdBindDescriptorSets and vice-versa.

To bind descriptor buffers to a command buffer, call:

Warning | This functionality is superseded by VK_EXT_descriptor_heap. See Legacy Functionality for more information.

    // Provided by VK_EXT_descriptor_buffer
    void vkCmdBindDescriptorBuffersEXT(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    bufferCount,
        const VkDescriptorBufferBindingInfoEXT*     pBindingInfos);

- `commandBuffer` is the command buffer that the descriptor buffers will be bound to.

- `bufferCount` is the number of elements in the `pBindingInfos` array.

- `pBindingInfos` is a pointer to an array of VkDescriptorBufferBindingInfoEXT structures.

`vkCmdBindDescriptorBuffersEXT` causes any offsets previously set by vkCmdSetDescriptorBufferOffsetsEXT that use the bindings numbered [`0`.. `bufferCount`-1] to be no longer valid for subsequent bound pipeline commands. Any previously bound buffers at binding points greater than or equal to `bufferCount` are unbound.

Valid Usage

- VUID-vkCmdBindDescriptorBuffersEXT-commandBuffer-11295
  If `commandBuffer` is a secondary command buffer, it must have begun with VkCommandBufferInheritanceDescriptorHeapInfoEXT::`pSamplerHeapBindInfo` equal to `NULL`

- VUID-vkCmdBindDescriptorBuffersEXT-commandBuffer-11296
  If `commandBuffer` is a secondary command buffer, it must have begun with VkCommandBufferInheritanceDescriptorHeapInfoEXT::`pResourceHeapBindInfo` equal to `NULL`

- VUID-vkCmdBindDescriptorBuffersEXT-None-08047
  The `descriptorBuffer` feature must be enabled

- VUID-vkCmdBindDescriptorBuffersEXT-maxSamplerDescriptorBufferBindings-08048
  There must be no more than VkPhysicalDeviceDescriptorBufferPropertiesEXT::`maxSamplerDescriptorBufferBindings` elements in `pBindingInfos` with VkDescriptorBufferBindingInfoEXT::`usage` containing VK_BUFFER_USAGE_SAMPLER_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdBindDescriptorBuffersEXT-maxResourceDescriptorBufferBindings-08049
  There must be no more than VkPhysicalDeviceDescriptorBufferPropertiesEXT::`maxResourceDescriptorBufferBindings` elements in `pBindingInfos` with VkDescriptorBufferBindingInfoEXT::`usage` containing VK_BUFFER_USAGE_RESOURCE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdBindDescriptorBuffersEXT-None-08050
  There must be no more than `1` element in `pBindingInfos` with VkDescriptorBufferBindingInfoEXT::`usage` containing VK_BUFFER_USAGE_PUSH_DESCRIPTORS_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdBindDescriptorBuffersEXT-bufferCount-08051
  `bufferCount` must be less than or equal to VkPhysicalDeviceDescriptorBufferPropertiesEXT::`maxDescriptorBufferBindings`

- VUID-vkCmdBindDescriptorBuffersEXT-pBindingInfos-08053
  For each element of `pBindingInfos`, the buffer from which `address` was queried must have been created with the VK_BUFFER_USAGE_SAMPLER_DESCRIPTOR_BUFFER_BIT_EXT usage flag set if it contains sampler descriptor data

- VUID-vkCmdBindDescriptorBuffersEXT-pBindingInfos-08054
  For each element of `pBindingInfos`, the buffer from which `address` was queried must have been created with the VK_BUFFER_USAGE_RESOURCE_DESCRIPTOR_BUFFER_BIT_EXT usage flag set if it contains resource descriptor data

- VUID-vkCmdBindDescriptorBuffersEXT-pBindingInfos-08055
  For each element of `pBindingInfos`, at least one buffer from which `address` was queried must contain `usage`

- VUID-vkCmdBindDescriptorBuffersEXT-pBindingInfos-09947
  For all elements of `pBindingInfos`, the buffer from which `address` was queried must have been created with the VK_BUFFER_USAGE_2_DATA_GRAPH_FOREIGN_DESCRIPTOR_BIT_ARM usage flag set if the command pool from which `commandBuffer` was allocated from was created with any element of VkDataGraphProcessingEngineCreateInfoARM::`pProcessingEngines` with `isForeign` set to VK_TRUE

Valid Usage (Implicit)

- VUID-vkCmdBindDescriptorBuffersEXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdBindDescriptorBuffersEXT-pBindingInfos-parameter
  `pBindingInfos` must be a valid pointer to an array of `bufferCount` valid VkDescriptorBufferBindingInfoEXT structures

- VUID-vkCmdBindDescriptorBuffersEXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdBindDescriptorBuffersEXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, VK_QUEUE_DATA_GRAPH_BIT_ARM, or VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdBindDescriptorBuffersEXT-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdBindDescriptorBuffersEXT-bufferCount-arraylength
  `bufferCount` must be greater than `0`

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_DATA_GRAPH_BIT_ARM VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdBindDescriptorBuffersEXT is not affected by conditional rendering

Data describing a descriptor buffer binding is passed in a `VkDescriptorBufferBindingInfoEXT` structure:

Warning | This functionality is superseded by VK_EXT_descriptor_heap. See Legacy Functionality for more information.

    // Provided by VK_EXT_descriptor_buffer
    typedef struct VkDescriptorBufferBindingInfoEXT {
        VkStructureType       sType;
        const void*           pNext;
        VkDeviceAddress       address;
        VkBufferUsageFlags    usage;
    } VkDescriptorBufferBindingInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `address` is a VkDeviceAddress specifying the device address defining the descriptor buffer to be bound.

- `usage` is a bitmask of VkBufferUsageFlagBits specifying the VkBufferCreateInfo::`usage` for the buffer from which `address` was queried. Usage flags other than VK_BUFFER_USAGE_RESOURCE_DESCRIPTOR_BUFFER_BIT_EXT, VK_BUFFER_USAGE_SAMPLER_DESCRIPTOR_BUFFER_BIT_EXT, and VK_BUFFER_USAGE_PUSH_DESCRIPTORS_DESCRIPTOR_BUFFER_BIT_EXT are ignored.

If the `pNext` chain includes a VkBufferUsageFlags2CreateInfo structure, VkBufferUsageFlags2CreateInfo::`usage` from that structure is used instead of `usage` from this structure.

Valid Usage

- VUID-VkDescriptorBufferBindingInfoEXT-None-09499
  If the `pNext` chain does not include a VkBufferUsageFlags2CreateInfo structure, `usage` must be a valid combination of VkBufferUsageFlagBits values

- VUID-VkDescriptorBufferBindingInfoEXT-None-09500
  If the `pNext` chain does not include a VkBufferUsageFlags2CreateInfo structure, `usage` must not be 0

- VUID-VkDescriptorBufferBindingInfoEXT-usage-10998
  The `usage` must include at least one of VK_BUFFER_USAGE_RESOURCE_DESCRIPTOR_BUFFER_BIT_EXT, VK_BUFFER_USAGE_SAMPLER_DESCRIPTOR_BUFFER_BIT_EXT, or VK_BUFFER_USAGE_PUSH_DESCRIPTORS_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-VkDescriptorBufferBindingInfoEXT-bufferlessPushDescriptors-08056
  If `VkPhysicalDeviceDescriptorBufferPropertiesEXT`::`bufferlessPushDescriptors` is VK_FALSE, and `usage` contains VK_BUFFER_USAGE_PUSH_DESCRIPTORS_DESCRIPTOR_BUFFER_BIT_EXT, then the `pNext` chain must include a VkDescriptorBufferBindingPushDescriptorBufferHandleEXT structure

- VUID-VkDescriptorBufferBindingInfoEXT-address-08057
  `address` must be aligned to VkPhysicalDeviceDescriptorBufferPropertiesEXT::`descriptorBufferOffsetAlignment`

- VUID-VkDescriptorBufferBindingInfoEXT-usage-08122
  If `usage` includes VK_BUFFER_USAGE_SAMPLER_DESCRIPTOR_BUFFER_BIT_EXT, `address` must be a device address allocated to the application from a buffer created with the VK_BUFFER_USAGE_SAMPLER_DESCRIPTOR_BUFFER_BIT_EXT usage flag set

- VUID-VkDescriptorBufferBindingInfoEXT-usage-08123
  If `usage` includes VK_BUFFER_USAGE_RESOURCE_DESCRIPTOR_BUFFER_BIT_EXT, `address` must be a device address allocated to the application from a buffer created with the VK_BUFFER_USAGE_RESOURCE_DESCRIPTOR_BUFFER_BIT_EXT usage flag set

- VUID-VkDescriptorBufferBindingInfoEXT-usage-08124
  If `usage` includes VK_BUFFER_USAGE_PUSH_DESCRIPTORS_DESCRIPTOR_BUFFER_BIT_EXT, `address` must be a device address allocated to the application from a buffer created with the VK_BUFFER_USAGE_PUSH_DESCRIPTORS_DESCRIPTOR_BUFFER_BIT_EXT usage flag set

Valid Usage (Implicit)

- VUID-VkDescriptorBufferBindingInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DESCRIPTOR_BUFFER_BINDING_INFO_EXT

- VUID-VkDescriptorBufferBindingInfoEXT-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkBufferUsageFlags2CreateInfo or VkDescriptorBufferBindingPushDescriptorBufferHandleEXT

- VUID-VkDescriptorBufferBindingInfoEXT-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkDescriptorBufferBindingInfoEXT-address-parameter
  `address` must be a valid VkDeviceAddress value

When the `VkPhysicalDeviceDescriptorBufferPropertiesEXT`::`bufferlessPushDescriptors` property is VK_FALSE, the `VkBuffer` handle of the buffer for push descriptors is passed in a `VkDescriptorBufferBindingPushDescriptorBufferHandleEXT` structure:

Warning | This functionality is superseded by VK_EXT_descriptor_heap. See Legacy Functionality for more information.

    // Provided by VK_EXT_descriptor_buffer
    typedef struct VkDescriptorBufferBindingPushDescriptorBufferHandleEXT {
        VkStructureType    sType;
        const void*        pNext;
        VkBuffer           buffer;
    } VkDescriptorBufferBindingPushDescriptorBufferHandleEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `buffer` is the `VkBuffer` handle of the buffer for push descriptors.

Valid Usage

- VUID-VkDescriptorBufferBindingPushDescriptorBufferHandleEXT-bufferlessPushDescriptors-08059
  `VkPhysicalDeviceDescriptorBufferPropertiesEXT`::`bufferlessPushDescriptors` must be VK_FALSE

Valid Usage (Implicit)

- VUID-VkDescriptorBufferBindingPushDescriptorBufferHandleEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DESCRIPTOR_BUFFER_BINDING_PUSH_DESCRIPTOR_BUFFER_HANDLE_EXT

- VUID-VkDescriptorBufferBindingPushDescriptorBufferHandleEXT-buffer-parameter
  `buffer` must be a valid VkBuffer handle

Structure Chaining

Extends the structure

  - VkDescriptorBufferBindingInfoEXT

To set descriptor buffer offsets in a command buffer, call:

Warning | This functionality is superseded by VK_EXT_descriptor_heap. See Legacy Functionality for more information.

    // Provided by VK_EXT_descriptor_buffer
    void vkCmdSetDescriptorBufferOffsetsEXT(
        VkCommandBuffer                             commandBuffer,
        VkPipelineBindPoint                         pipelineBindPoint,
        VkPipelineLayout                            layout,
        uint32_t                                    firstSet,
        uint32_t                                    setCount,
        const uint32_t*                             pBufferIndices,
        const VkDeviceSize*                         pOffsets);

- `commandBuffer` is the command buffer in which the descriptor buffer offsets will be set.

- `pipelineBindPoint` is a VkPipelineBindPoint indicating the type of the pipeline that will use the descriptors.

- `layout` is a VkPipelineLayout object used to program the bindings.

- `firstSet` is the number of the first set to be bound.

- `setCount` is the number of elements in the `pBufferIndices` and `pOffsets` arrays.

- `pBufferIndices` is a pointer to an array of indices into the descriptor buffer binding points set by vkCmdBindDescriptorBuffersEXT.

- `pOffsets` is a pointer to an array of VkDeviceSize offsets to apply to the bound descriptor buffers.

`vkCmdSetDescriptorBufferOffsetsEXT` binds `setCount` pairs of descriptor buffers, specified by indices into the binding points bound using vkCmdBindDescriptorBuffersEXT, and buffer offsets to set numbers [`firstSet`..`firstSet`+`setCount`-1] for subsequent bound pipeline commands set by `pipelineBindPoint`. Set [`firstSet` + i] is bound to the descriptor buffer at binding `pBufferIndices`[i] at an offset of `pOffsets`[i]. Any bindings that were previously applied via these sets, or calls to vkCmdBindDescriptorSets, are no longer valid. Other sets will also be invalidated upon calling this command if `layout` differs from the pipeline layout used to bind those other sets, as described in Pipeline Layout Compatibility.

After binding descriptors, applications can modify descriptor memory either by performing writes on the host or with device commands. When descriptor memory is updated with device commands, visibility for the shader stage accessing a descriptor is ensured with the VK_ACCESS_2_DESCRIPTOR_BUFFER_READ_BIT_EXT access flag. Implementations must not access resources referenced by these descriptors unless they are dynamically accessed by shaders. Descriptors bound with this call can be undefined if they are not dynamically accessed by shaders.

Implementations may read descriptor data for any statically accessed descriptor if the `binding` in `layout` is not declared with the VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT flag. If the `binding` in `layout` is declared with VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT, implementations must not read descriptor data that is not dynamically accessed.

Applications must ensure that any descriptor which the implementation may read must be in-bounds of the underlying descriptor buffer binding.

Note | Applications can freely decide how large a variable descriptor buffer binding is, so it may not be safe to read such descriptor payloads statically. The intention of these rules is to allow implementations to speculatively prefetch descriptor payloads where feasible.

Dynamically accessing a resource through descriptor data from an unbound region of a sparse partially-resident buffer will result in invalid descriptor data being read, and therefore undefined behavior.

Note | For descriptors written by the host, visibility is implied through the automatic visibility operation on queue submit, and there is no need to consider `VK_ACCESS_2_DESCRIPTOR_BUFFER_READ_BIT`. Explicit synchronization for descriptors is only required when descriptors are updated on the device.

Note | The requirements above imply that all descriptor bindings have been defined with the equivalent of VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT, VK_DESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT and VK_DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT, but enabling those features is not required to get this behavior.

Valid Usage

- VUID-vkCmdSetDescriptorBufferOffsetsEXT-commandBuffer-11295
  If `commandBuffer` is a secondary command buffer, it must have begun with VkCommandBufferInheritanceDescriptorHeapInfoEXT::`pSamplerHeapBindInfo` equal to `NULL`

- VUID-vkCmdSetDescriptorBufferOffsetsEXT-commandBuffer-11296
  If `commandBuffer` is a secondary command buffer, it must have begun with VkCommandBufferInheritanceDescriptorHeapInfoEXT::`pResourceHeapBindInfo` equal to `NULL`

- VUID-vkCmdSetDescriptorBufferOffsetsEXT-pOffsets-08061
  The offsets in `pOffsets` must be aligned to VkPhysicalDeviceDescriptorBufferPropertiesEXT::`descriptorBufferOffsetAlignment`

- VUID-vkCmdSetDescriptorBufferOffsetsEXT-pOffsets-08063
  The offsets in `pOffsets` must be small enough such that any descriptor binding referenced by `layout` without the VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT flag computes a valid address inside the underlying VkBuffer

- VUID-vkCmdSetDescriptorBufferOffsetsEXT-pOffsets-08126
  The offsets in `pOffsets` must be small enough such that any location accessed by a shader as a sampler descriptor must be within VkPhysicalDeviceDescriptorBufferPropertiesEXT::`maxSamplerDescriptorBufferRange` of the sampler descriptor buffer binding

- VUID-vkCmdSetDescriptorBufferOffsetsEXT-pOffsets-08127
  The offsets in `pOffsets` must be small enough such that any location accessed by a shader as a resource descriptor must be within VkPhysicalDeviceDescriptorBufferPropertiesEXT::`maxResourceDescriptorBufferRange` of the resource descriptor buffer binding

- VUID-vkCmdSetDescriptorBufferOffsetsEXT-pBufferIndices-08064
  Each element of `pBufferIndices` must be less than VkPhysicalDeviceDescriptorBufferPropertiesEXT::`maxDescriptorBufferBindings`

- VUID-vkCmdSetDescriptorBufferOffsetsEXT-pBufferIndices-08065
  Each element of `pBufferIndices` must reference a valid descriptor buffer binding set by a previous call to vkCmdBindDescriptorBuffersEXT in `commandBuffer`

- VUID-vkCmdSetDescriptorBufferOffsetsEXT-firstSet-08066
  The sum of `firstSet` and `setCount` must be less than or equal to VkPipelineLayoutCreateInfo::`setLayoutCount` provided when `layout` was created

- VUID-vkCmdSetDescriptorBufferOffsetsEXT-firstSet-09006
  The VkDescriptorSetLayout for each set from `firstSet` to `firstSet` + `setCount` when `layout` was created must have been created with the VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT bit set

- VUID-vkCmdSetDescriptorBufferOffsetsEXT-firstSet-11803
  The VkDescriptorSetLayout for each set from `firstSet` to `firstSet` + `setCount` when `layout` was created must not have been created with the VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR bit set

- VUID-vkCmdSetDescriptorBufferOffsetsEXT-firstSet-11804
  The VkDescriptorSetLayout for each set from `firstSet` to `firstSet` + `setCount` when `layout` was created must not have been created with the VK_DESCRIPTOR_SET_LAYOUT_CREATE_EMBEDDED_IMMUTABLE_SAMPLERS_BIT_EXT bit set

- VUID-vkCmdSetDescriptorBufferOffsetsEXT-None-08060
  The `descriptorBuffer` feature must be enabled

- VUID-vkCmdSetDescriptorBufferOffsetsEXT-pipelineBindPoint-08067
  `pipelineBindPoint` must be supported by the `commandBuffer`’s parent `VkCommandPool`’s queue family

Valid Usage (Implicit)

- VUID-vkCmdSetDescriptorBufferOffsetsEXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetDescriptorBufferOffsetsEXT-pipelineBindPoint-parameter
  `pipelineBindPoint` must be a valid VkPipelineBindPoint value

- VUID-vkCmdSetDescriptorBufferOffsetsEXT-layout-parameter
  `layout` must be a valid VkPipelineLayout handle

- VUID-vkCmdSetDescriptorBufferOffsetsEXT-pBufferIndices-parameter
  `pBufferIndices` must be a valid pointer to an array of `setCount` `uint32_t` values

- VUID-vkCmdSetDescriptorBufferOffsetsEXT-pOffsets-parameter
  `pOffsets` must be a valid pointer to an array of `setCount` VkDeviceSize values

- VUID-vkCmdSetDescriptorBufferOffsetsEXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetDescriptorBufferOffsetsEXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, VK_QUEUE_DATA_GRAPH_BIT_ARM, or VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetDescriptorBufferOffsetsEXT-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdSetDescriptorBufferOffsetsEXT-setCount-arraylength
  `setCount` must be greater than `0`

- VUID-vkCmdSetDescriptorBufferOffsetsEXT-commonparent
  Both of `commandBuffer`, and `layout` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_DATA_GRAPH_BIT_ARM VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetDescriptorBufferOffsetsEXT is not affected by conditional rendering

To set descriptor buffer offsets in a command buffer, call:

Warning | This functionality is superseded by VK_EXT_descriptor_heap. See Legacy Functionality for more information.

    // Provided by VK_KHR_maintenance6 with VK_EXT_descriptor_buffer
    void vkCmdSetDescriptorBufferOffsets2EXT(
        VkCommandBuffer                             commandBuffer,
        const VkSetDescriptorBufferOffsetsInfoEXT*  pSetDescriptorBufferOffsetsInfo);

- `commandBuffer` is the command buffer in which the descriptor buffer offsets will be set.

- `pSetDescriptorBufferOffsetsInfo` is a pointer to a `VkSetDescriptorBufferOffsetsInfoEXT` structure.

Valid Usage

- VUID-vkCmdSetDescriptorBufferOffsets2EXT-commandBuffer-11295
  If `commandBuffer` is a secondary command buffer, it must have begun with VkCommandBufferInheritanceDescriptorHeapInfoEXT::`pSamplerHeapBindInfo` equal to `NULL`

- VUID-vkCmdSetDescriptorBufferOffsets2EXT-commandBuffer-11296
  If `commandBuffer` is a secondary command buffer, it must have begun with VkCommandBufferInheritanceDescriptorHeapInfoEXT::`pResourceHeapBindInfo` equal to `NULL`

- VUID-vkCmdSetDescriptorBufferOffsets2EXT-descriptorBuffer-09470
  The `descriptorBuffer` feature must be enabled

- VUID-vkCmdSetDescriptorBufferOffsets2EXT-pSetDescriptorBufferOffsetsInfo-09471
  Each bit in `pSetDescriptorBufferOffsetsInfo->stageFlags` must be a stage supported by the `commandBuffer`’s parent `VkCommandPool`’s queue family

Valid Usage (Implicit)

- VUID-vkCmdSetDescriptorBufferOffsets2EXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetDescriptorBufferOffsets2EXT-pSetDescriptorBufferOffsetsInfo-parameter
  `pSetDescriptorBufferOffsetsInfo` must be a valid pointer to a valid VkSetDescriptorBufferOffsetsInfoEXT structure

- VUID-vkCmdSetDescriptorBufferOffsets2EXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetDescriptorBufferOffsets2EXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, VK_QUEUE_DATA_GRAPH_BIT_ARM, or VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetDescriptorBufferOffsets2EXT-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_DATA_GRAPH_BIT_ARM VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetDescriptorBufferOffsets2EXT is not affected by conditional rendering

The `VkSetDescriptorBufferOffsetsInfoEXT` structure is defined as:

    // Provided by VK_KHR_maintenance6 with VK_EXT_descriptor_buffer
    typedef struct VkSetDescriptorBufferOffsetsInfoEXT {
        VkStructureType        sType;
        const void*            pNext;
        VkShaderStageFlags     stageFlags;
        VkPipelineLayout       layout;
        uint32_t               firstSet;
        uint32_t               setCount;
        const uint32_t*        pBufferIndices;
        const VkDeviceSize*    pOffsets;
    } VkSetDescriptorBufferOffsetsInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `stageFlags` is a bitmask of VkShaderStageFlagBits specifying the shader stages the descriptor sets will be bound to

- `layout` is a VkPipelineLayout object used to program the bindings. If the `dynamicPipelineLayout` feature is enabled, `layout` can be VK_NULL_HANDLE and the layout must be specified by chaining VkPipelineLayoutCreateInfo structure off the `pNext`

- `firstSet` is the number of the first set to be bound.

- `setCount` is the number of elements in the `pBufferIndices` and `pOffsets` arrays.

- `pBufferIndices` is a pointer to an array of indices into the descriptor buffer binding points set by vkCmdBindDescriptorBuffersEXT.

- `pOffsets` is a pointer to an array of VkDeviceSize offsets to apply to the bound descriptor buffers.

If `stageFlags` specifies a subset of all stages corresponding to one or more pipeline bind points, the binding operation still affects all stages corresponding to the given pipeline bind point(s) as if the equivalent original version of this command had been called with the same parameters. For example, specifying a `stageFlags` value of VK_SHADER_STAGE_VERTEX_BIT | VK_SHADER_STAGE_FRAGMENT_BIT | VK_SHADER_STAGE_COMPUTE_BIT is equivalent to calling the original version of this command once with VK_PIPELINE_BIND_POINT_GRAPHICS and once with VK_PIPELINE_BIND_POINT_COMPUTE.

Valid Usage

- VUID-VkSetDescriptorBufferOffsetsInfoEXT-pOffsets-08061
  The offsets in `pOffsets` must be aligned to VkPhysicalDeviceDescriptorBufferPropertiesEXT::`descriptorBufferOffsetAlignment`

- VUID-VkSetDescriptorBufferOffsetsInfoEXT-pOffsets-08063
  The offsets in `pOffsets` must be small enough such that any descriptor binding referenced by `layout` without the VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT flag computes a valid address inside the underlying VkBuffer

- VUID-VkSetDescriptorBufferOffsetsInfoEXT-pOffsets-08126
  The offsets in `pOffsets` must be small enough such that any location accessed by a shader as a sampler descriptor must be within VkPhysicalDeviceDescriptorBufferPropertiesEXT::`maxSamplerDescriptorBufferRange` of the sampler descriptor buffer binding

- VUID-VkSetDescriptorBufferOffsetsInfoEXT-pOffsets-08127
  The offsets in `pOffsets` must be small enough such that any location accessed by a shader as a resource descriptor must be within VkPhysicalDeviceDescriptorBufferPropertiesEXT::`maxResourceDescriptorBufferRange` of the resource descriptor buffer binding

- VUID-VkSetDescriptorBufferOffsetsInfoEXT-pBufferIndices-08064
  Each element of `pBufferIndices` must be less than VkPhysicalDeviceDescriptorBufferPropertiesEXT::`maxDescriptorBufferBindings`

- VUID-VkSetDescriptorBufferOffsetsInfoEXT-pBufferIndices-08065
  Each element of `pBufferIndices` must reference a valid descriptor buffer binding set by a previous call to vkCmdBindDescriptorBuffersEXT in `commandBuffer`

- VUID-VkSetDescriptorBufferOffsetsInfoEXT-firstSet-08066
  The sum of `firstSet` and `setCount` must be less than or equal to VkPipelineLayoutCreateInfo::`setLayoutCount` provided when `layout` was created

- VUID-VkSetDescriptorBufferOffsetsInfoEXT-firstSet-09006
  The VkDescriptorSetLayout for each set from `firstSet` to `firstSet` + `setCount` when `layout` was created must have been created with the VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT bit set

- VUID-VkSetDescriptorBufferOffsetsInfoEXT-firstSet-11803
  The VkDescriptorSetLayout for each set from `firstSet` to `firstSet` + `setCount` when `layout` was created must not have been created with the VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR bit set

- VUID-VkSetDescriptorBufferOffsetsInfoEXT-firstSet-11804
  The VkDescriptorSetLayout for each set from `firstSet` to `firstSet` + `setCount` when `layout` was created must not have been created with the VK_DESCRIPTOR_SET_LAYOUT_CREATE_EMBEDDED_IMMUTABLE_SAMPLERS_BIT_EXT bit set

- VUID-VkSetDescriptorBufferOffsetsInfoEXT-None-09495
  If the `dynamicPipelineLayout` feature is not enabled, `layout` must be a valid VkPipelineLayout handle

- VUID-VkSetDescriptorBufferOffsetsInfoEXT-layout-09496
  If `layout` is VK_NULL_HANDLE, the `pNext` chain must include a valid VkPipelineLayoutCreateInfo structure

Valid Usage (Implicit)

- VUID-VkSetDescriptorBufferOffsetsInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SET_DESCRIPTOR_BUFFER_OFFSETS_INFO_EXT

- VUID-VkSetDescriptorBufferOffsetsInfoEXT-pNext-pNext
  `pNext` must be `NULL` or a pointer to a valid instance of VkPipelineLayoutCreateInfo

- VUID-VkSetDescriptorBufferOffsetsInfoEXT-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkSetDescriptorBufferOffsetsInfoEXT-stageFlags-parameter
  `stageFlags` must be a valid combination of VkShaderStageFlagBits values

- VUID-VkSetDescriptorBufferOffsetsInfoEXT-stageFlags-requiredbitmask
  `stageFlags` must not be `0`

- VUID-VkSetDescriptorBufferOffsetsInfoEXT-layout-parameter
  If `layout` is not VK_NULL_HANDLE, `layout` must be a valid VkPipelineLayout handle

- VUID-VkSetDescriptorBufferOffsetsInfoEXT-pBufferIndices-parameter
  `pBufferIndices` must be a valid pointer to an array of `setCount` `uint32_t` values

- VUID-VkSetDescriptorBufferOffsetsInfoEXT-pOffsets-parameter
  `pOffsets` must be a valid pointer to an array of `setCount` VkDeviceSize values

- VUID-VkSetDescriptorBufferOffsetsInfoEXT-setCount-arraylength
  `setCount` must be greater than `0`

To bind an embedded immutable sampler set to a command buffer, call:

Warning | This functionality is superseded by VK_EXT_descriptor_heap. See Legacy Functionality for more information.

    // Provided by VK_EXT_descriptor_buffer
    void vkCmdBindDescriptorBufferEmbeddedSamplersEXT(
        VkCommandBuffer                             commandBuffer,
        VkPipelineBindPoint                         pipelineBindPoint,
        VkPipelineLayout                            layout,
        uint32_t                                    set);

- `commandBuffer` is the command buffer that the embedded immutable samplers will be bound to.

- `pipelineBindPoint` is a VkPipelineBindPoint indicating the type of the pipeline that will use the embedded immutable samplers.

- `layout` is a VkPipelineLayout object used to program the bindings.

- `set` is the number of the set to be bound.

`vkCmdBindDescriptorBufferEmbeddedSamplersEXT` binds the embedded immutable samplers in `set` of `layout` to `set` for the command buffer for subsequent bound pipeline commands set by `pipelineBindPoint`. Any previous binding to this set by vkCmdSetDescriptorBufferOffsetsEXT or this command is overwritten. Any sets that were last bound by a call to vkCmdBindDescriptorSets are invalidated upon calling this command. Other sets will also be invalidated upon calling this command if `layout` differs from the pipeline layout used to bind those other sets, as described in Pipeline Layout Compatibility.

Valid Usage

- VUID-vkCmdBindDescriptorBufferEmbeddedSamplersEXT-commandBuffer-11295
  If `commandBuffer` is a secondary command buffer, it must have begun with VkCommandBufferInheritanceDescriptorHeapInfoEXT::`pSamplerHeapBindInfo` equal to `NULL`

- VUID-vkCmdBindDescriptorBufferEmbeddedSamplersEXT-commandBuffer-11296
  If `commandBuffer` is a secondary command buffer, it must have begun with VkCommandBufferInheritanceDescriptorHeapInfoEXT::`pResourceHeapBindInfo` equal to `NULL`

- VUID-vkCmdBindDescriptorBufferEmbeddedSamplersEXT-set-08070
  The VkDescriptorSetLayout at index `set` when `layout` was created must have been created with the VK_DESCRIPTOR_SET_LAYOUT_CREATE_EMBEDDED_IMMUTABLE_SAMPLERS_BIT_EXT bit set

- VUID-vkCmdBindDescriptorBufferEmbeddedSamplersEXT-set-08071
  `set` must be less than or equal to VkPipelineLayoutCreateInfo::`setLayoutCount` provided when `layout` was created

- VUID-vkCmdBindDescriptorBufferEmbeddedSamplersEXT-None-08068
  The `descriptorBuffer` feature must be enabled

- VUID-vkCmdBindDescriptorBufferEmbeddedSamplersEXT-pipelineBindPoint-08069
  `pipelineBindPoint` must be supported by the `commandBuffer`’s parent `VkCommandPool`’s queue family

Valid Usage (Implicit)

- VUID-vkCmdBindDescriptorBufferEmbeddedSamplersEXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdBindDescriptorBufferEmbeddedSamplersEXT-pipelineBindPoint-parameter
  `pipelineBindPoint` must be a valid VkPipelineBindPoint value

- VUID-vkCmdBindDescriptorBufferEmbeddedSamplersEXT-layout-parameter
  `layout` must be a valid VkPipelineLayout handle

- VUID-vkCmdBindDescriptorBufferEmbeddedSamplersEXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdBindDescriptorBufferEmbeddedSamplersEXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, or VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdBindDescriptorBufferEmbeddedSamplersEXT-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdBindDescriptorBufferEmbeddedSamplersEXT-commonparent
  Both of `commandBuffer`, and `layout` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdBindDescriptorBufferEmbeddedSamplersEXT is not affected by conditional rendering

To bind an embedded immutable sampler set to a command buffer, call:

Warning | This functionality is superseded by VK_EXT_descriptor_heap. See Legacy Functionality for more information.

    // Provided by VK_KHR_maintenance6 with VK_EXT_descriptor_buffer
    void vkCmdBindDescriptorBufferEmbeddedSamplers2EXT(
        VkCommandBuffer                             commandBuffer,
        const VkBindDescriptorBufferEmbeddedSamplersInfoEXT* pBindDescriptorBufferEmbeddedSamplersInfo);

- `commandBuffer` is the command buffer that the embedded immutable samplers will be bound to.

- `pBindDescriptorBufferEmbeddedSamplersInfo` is a pointer to a `VkBindDescriptorBufferEmbeddedSamplersInfoEXT` structure.

Valid Usage

- VUID-vkCmdBindDescriptorBufferEmbeddedSamplers2EXT-commandBuffer-11295
  If `commandBuffer` is a secondary command buffer, it must have begun with VkCommandBufferInheritanceDescriptorHeapInfoEXT::`pSamplerHeapBindInfo` equal to `NULL`

- VUID-vkCmdBindDescriptorBufferEmbeddedSamplers2EXT-commandBuffer-11296
  If `commandBuffer` is a secondary command buffer, it must have begun with VkCommandBufferInheritanceDescriptorHeapInfoEXT::`pResourceHeapBindInfo` equal to `NULL`

- VUID-vkCmdBindDescriptorBufferEmbeddedSamplers2EXT-descriptorBuffer-09472
  The `descriptorBuffer` feature must be enabled

- VUID-vkCmdBindDescriptorBufferEmbeddedSamplers2EXT-pBindDescriptorBufferEmbeddedSamplersInfo-09473
  Each bit in `pBindDescriptorBufferEmbeddedSamplersInfo->stageFlags` must be a stage supported by the `commandBuffer`’s parent `VkCommandPool`’s queue family

Valid Usage (Implicit)

- VUID-vkCmdBindDescriptorBufferEmbeddedSamplers2EXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdBindDescriptorBufferEmbeddedSamplers2EXT-pBindDescriptorBufferEmbeddedSamplersInfo-parameter
  `pBindDescriptorBufferEmbeddedSamplersInfo` must be a valid pointer to a valid VkBindDescriptorBufferEmbeddedSamplersInfoEXT structure

- VUID-vkCmdBindDescriptorBufferEmbeddedSamplers2EXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdBindDescriptorBufferEmbeddedSamplers2EXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, or VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdBindDescriptorBufferEmbeddedSamplers2EXT-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdBindDescriptorBufferEmbeddedSamplers2EXT is not affected by conditional rendering

The `VkBindDescriptorBufferEmbeddedSamplersInfoEXT` structure is defined as:

    // Provided by VK_KHR_maintenance6 with VK_EXT_descriptor_buffer
    typedef struct VkBindDescriptorBufferEmbeddedSamplersInfoEXT {
        VkStructureType       sType;
        const void*           pNext;
        VkShaderStageFlags    stageFlags;
        VkPipelineLayout      layout;
        uint32_t              set;
    } VkBindDescriptorBufferEmbeddedSamplersInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `stageFlags` is a bitmask of VkShaderStageFlagBits specifying the shader stages that will use the embedded immutable samplers.

- `layout` is a VkPipelineLayout object used to program the bindings. If the `dynamicPipelineLayout` feature is enabled, `layout` can be VK_NULL_HANDLE and the layout must be specified by chaining VkPipelineLayoutCreateInfo structure off the `pNext`

- `set` is the number of the set to be bound.

If `stageFlags` specifies a subset of all stages corresponding to one or more pipeline bind points, the binding operation still affects all stages corresponding to the given pipeline bind point(s) as if the equivalent original version of this command had been called with the same parameters. For example, specifying a `stageFlags` value of VK_SHADER_STAGE_VERTEX_BIT | VK_SHADER_STAGE_FRAGMENT_BIT | VK_SHADER_STAGE_COMPUTE_BIT is equivalent to calling the original version of this command once with VK_PIPELINE_BIND_POINT_GRAPHICS and once with VK_PIPELINE_BIND_POINT_COMPUTE.

Valid Usage

- VUID-VkBindDescriptorBufferEmbeddedSamplersInfoEXT-set-08070
  The VkDescriptorSetLayout at index `set` when `layout` was created must have been created with the VK_DESCRIPTOR_SET_LAYOUT_CREATE_EMBEDDED_IMMUTABLE_SAMPLERS_BIT_EXT bit set

- VUID-VkBindDescriptorBufferEmbeddedSamplersInfoEXT-set-08071
  `set` must be less than or equal to VkPipelineLayoutCreateInfo::`setLayoutCount` provided when `layout` was created

- VUID-VkBindDescriptorBufferEmbeddedSamplersInfoEXT-None-09495
  If the `dynamicPipelineLayout` feature is not enabled, `layout` must be a valid VkPipelineLayout handle

- VUID-VkBindDescriptorBufferEmbeddedSamplersInfoEXT-layout-09496
  If `layout` is VK_NULL_HANDLE, the `pNext` chain must include a valid VkPipelineLayoutCreateInfo structure

Valid Usage (Implicit)

- VUID-VkBindDescriptorBufferEmbeddedSamplersInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_BIND_DESCRIPTOR_BUFFER_EMBEDDED_SAMPLERS_INFO_EXT

- VUID-VkBindDescriptorBufferEmbeddedSamplersInfoEXT-pNext-pNext
  `pNext` must be `NULL` or a pointer to a valid instance of VkPipelineLayoutCreateInfo

- VUID-VkBindDescriptorBufferEmbeddedSamplersInfoEXT-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkBindDescriptorBufferEmbeddedSamplersInfoEXT-stageFlags-parameter
  `stageFlags` must be a valid combination of VkShaderStageFlagBits values

- VUID-VkBindDescriptorBufferEmbeddedSamplersInfoEXT-stageFlags-requiredbitmask
  `stageFlags` must not be `0`

- VUID-VkBindDescriptorBufferEmbeddedSamplersInfoEXT-layout-parameter
  If `layout` is not VK_NULL_HANDLE, `layout` must be a valid VkPipelineLayout handle

### 18.3. Updating Descriptor Buffers

Updates to descriptor data in buffers can be performed by any operation on either the host or device that can access memory.

Descriptor buffer reads can be synchronized using VK_ACCESS_2_DESCRIPTOR_BUFFER_READ_BIT_EXT in the relevant shader stage.

### 18.4. Push Descriptors With Descriptor Buffers

If the `descriptorBufferPushDescriptors` feature is enabled, push descriptors can be used with descriptor buffers in the same way as with descriptor sets.

The `VkPhysicalDeviceDescriptorBufferPropertiesEXT`::`bufferlessPushDescriptors` property indicates whether the implementation requires a buffer to back push descriptors. If the property is VK_FALSE then before recording any push descriptors, the application must bind exactly `1` descriptor buffer that was created with the VK_BUFFER_USAGE_PUSH_DESCRIPTORS_DESCRIPTOR_BUFFER_BIT_EXT usage flag set. When this buffer is bound, any previously recorded push descriptors that are required for a subsequent command must be recorded again.

### 18.5. Capture and Replay

In a similar way to `bufferDeviceAddressCaptureReplay`, the `descriptorBufferCaptureReplay` feature allows the creation of opaque handles for objects at capture time that can be passed into object creation calls in a future replay, causing descriptors to be created with the same data. The opaque memory address for any memory used by these resources must have been captured using vkGetDeviceMemoryOpaqueCaptureAddress and be replayed using VkMemoryOpaqueCaptureAddressAllocateInfo.

To get the opaque descriptor data for a buffer, call:

Warning | This functionality is superseded by VK_EXT_descriptor_heap. See Legacy Functionality for more information.

    // Provided by VK_EXT_descriptor_buffer
    VkResult vkGetBufferOpaqueCaptureDescriptorDataEXT(
        VkDevice                                    device,
        const VkBufferCaptureDescriptorDataInfoEXT* pInfo,
        void*                                       pData);

- `device` is the logical device that gets the data.

- `pInfo` is a pointer to a VkBufferCaptureDescriptorDataInfoEXT structure specifying the buffer.

- `pData` is a pointer to an application-allocated buffer where the data will be written.

Valid Usage

- VUID-vkGetBufferOpaqueCaptureDescriptorDataEXT-None-08072
  The `descriptorBufferCaptureReplay` feature must be enabled

- VUID-vkGetBufferOpaqueCaptureDescriptorDataEXT-pData-08073
  `pData` must point to a buffer that is at least VkPhysicalDeviceDescriptorBufferPropertiesEXT::`bufferCaptureReplayDescriptorDataSize` bytes in size

- VUID-vkGetBufferOpaqueCaptureDescriptorDataEXT-device-08074
  If `device` was created with multiple physical devices, then the `bufferDeviceAddressMultiDevice` feature must be enabled

Valid Usage (Implicit)

- VUID-vkGetBufferOpaqueCaptureDescriptorDataEXT-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetBufferOpaqueCaptureDescriptorDataEXT-pInfo-parameter
  `pInfo` must be a valid pointer to a valid VkBufferCaptureDescriptorDataInfoEXT structure

- VUID-vkGetBufferOpaqueCaptureDescriptorDataEXT-pData-parameter
  `pData` must be a pointer value

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

Information about the buffer to get descriptor buffer capture data for is passed in a `VkBufferCaptureDescriptorDataInfoEXT` structure:

Warning | This functionality is superseded by VK_EXT_descriptor_heap. See Legacy Functionality for more information.

    // Provided by VK_EXT_descriptor_buffer
    typedef struct VkBufferCaptureDescriptorDataInfoEXT {
        VkStructureType    sType;
        const void*        pNext;
        VkBuffer           buffer;
    } VkBufferCaptureDescriptorDataInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `buffer` is the `VkBuffer` handle of the buffer to get opaque capture data for.

Valid Usage

- VUID-VkBufferCaptureDescriptorDataInfoEXT-buffer-08075
  `buffer` must have been created with VK_BUFFER_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT set in VkBufferCreateInfo::`flags`

Valid Usage (Implicit)

- VUID-VkBufferCaptureDescriptorDataInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_BUFFER_CAPTURE_DESCRIPTOR_DATA_INFO_EXT

- VUID-VkBufferCaptureDescriptorDataInfoEXT-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkBufferCaptureDescriptorDataInfoEXT-buffer-parameter
  `buffer` must be a valid VkBuffer handle

To get the opaque capture descriptor data for an image, call:

Warning | This functionality is superseded by VK_EXT_descriptor_heap. See Legacy Functionality for more information.

    // Provided by VK_EXT_descriptor_buffer
    VkResult vkGetImageOpaqueCaptureDescriptorDataEXT(
        VkDevice                                    device,
        const VkImageCaptureDescriptorDataInfoEXT*  pInfo,
        void*                                       pData);

- `device` is the logical device that gets the data.

- `pInfo` is a pointer to a VkImageCaptureDescriptorDataInfoEXT structure specifying the image.

- `pData` is a pointer to an application-allocated buffer where the data will be written.

Valid Usage

- VUID-vkGetImageOpaqueCaptureDescriptorDataEXT-None-08076
  The `descriptorBufferCaptureReplay` feature must be enabled

- VUID-vkGetImageOpaqueCaptureDescriptorDataEXT-pData-08077
  `pData` must point to a buffer that is at least VkPhysicalDeviceDescriptorBufferPropertiesEXT::`imageCaptureReplayDescriptorDataSize` bytes in size

- VUID-vkGetImageOpaqueCaptureDescriptorDataEXT-device-08078
  If `device` was created with multiple physical devices, then the `bufferDeviceAddressMultiDevice` feature must be enabled

Valid Usage (Implicit)

- VUID-vkGetImageOpaqueCaptureDescriptorDataEXT-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetImageOpaqueCaptureDescriptorDataEXT-pInfo-parameter
  `pInfo` must be a valid pointer to a valid VkImageCaptureDescriptorDataInfoEXT structure

- VUID-vkGetImageOpaqueCaptureDescriptorDataEXT-pData-parameter
  `pData` must be a pointer value

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

Information about the image to get descriptor buffer capture data for is passed in a `VkImageCaptureDescriptorDataInfoEXT` structure:

Warning | This functionality is superseded by VK_EXT_descriptor_heap. See Legacy Functionality for more information.

    // Provided by VK_EXT_descriptor_buffer
    typedef struct VkImageCaptureDescriptorDataInfoEXT {
        VkStructureType    sType;
        const void*        pNext;
        VkImage            image;
    } VkImageCaptureDescriptorDataInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `image` is the `VkImage` handle of the image to get opaque capture data for.

Valid Usage

- VUID-VkImageCaptureDescriptorDataInfoEXT-image-08079
  `image` must have been created with VK_IMAGE_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT set in VkImageCreateInfo::`flags`

Valid Usage (Implicit)

- VUID-VkImageCaptureDescriptorDataInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_IMAGE_CAPTURE_DESCRIPTOR_DATA_INFO_EXT

- VUID-VkImageCaptureDescriptorDataInfoEXT-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkImageCaptureDescriptorDataInfoEXT-image-parameter
  `image` must be a valid VkImage handle

To get the opaque capture descriptor data for an image view, call:

Warning | This functionality is superseded by VK_EXT_descriptor_heap. See Legacy Functionality for more information.

    // Provided by VK_EXT_descriptor_buffer
    VkResult vkGetImageViewOpaqueCaptureDescriptorDataEXT(
        VkDevice                                    device,
        const VkImageViewCaptureDescriptorDataInfoEXT* pInfo,
        void*                                       pData);

- `device` is the logical device that gets the data.

- `pInfo` is a pointer to a VkImageViewCaptureDescriptorDataInfoEXT structure specifying the image view.

- `pData` is a pointer to an application-allocated buffer where the data will be written.

Valid Usage

- VUID-vkGetImageViewOpaqueCaptureDescriptorDataEXT-None-08080
  The `descriptorBufferCaptureReplay` feature must be enabled

- VUID-vkGetImageViewOpaqueCaptureDescriptorDataEXT-pData-08081
  `pData` must point to a buffer that is at least VkPhysicalDeviceDescriptorBufferPropertiesEXT::`imageViewCaptureReplayDescriptorDataSize` bytes in size

- VUID-vkGetImageViewOpaqueCaptureDescriptorDataEXT-device-08082
  If `device` was created with multiple physical devices, then the `bufferDeviceAddressMultiDevice` feature must be enabled

Valid Usage (Implicit)

- VUID-vkGetImageViewOpaqueCaptureDescriptorDataEXT-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetImageViewOpaqueCaptureDescriptorDataEXT-pInfo-parameter
  `pInfo` must be a valid pointer to a valid VkImageViewCaptureDescriptorDataInfoEXT structure

- VUID-vkGetImageViewOpaqueCaptureDescriptorDataEXT-pData-parameter
  `pData` must be a pointer value

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

Information about the image view to get descriptor buffer capture data for is passed in a `VkImageViewCaptureDescriptorDataInfoEXT` structure:

Warning | This functionality is superseded by VK_EXT_descriptor_heap. See Legacy Functionality for more information.

    // Provided by VK_EXT_descriptor_buffer
    typedef struct VkImageViewCaptureDescriptorDataInfoEXT {
        VkStructureType    sType;
        const void*        pNext;
        VkImageView        imageView;
    } VkImageViewCaptureDescriptorDataInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `imageView` is the `VkImageView` handle of the image view to get opaque capture data for.

Valid Usage

- VUID-VkImageViewCaptureDescriptorDataInfoEXT-imageView-08083
  `imageView` must have been created with VK_IMAGE_VIEW_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT set in VkImageViewCreateInfo::`flags`

Valid Usage (Implicit)

- VUID-VkImageViewCaptureDescriptorDataInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_IMAGE_VIEW_CAPTURE_DESCRIPTOR_DATA_INFO_EXT

- VUID-VkImageViewCaptureDescriptorDataInfoEXT-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkImageViewCaptureDescriptorDataInfoEXT-imageView-parameter
  `imageView` must be a valid VkImageView handle

To get the opaque capture descriptor data for a sampler, call:

Warning | This functionality is superseded by VK_EXT_descriptor_heap. See Legacy Functionality for more information.

    // Provided by VK_EXT_descriptor_buffer
    VkResult vkGetSamplerOpaqueCaptureDescriptorDataEXT(
        VkDevice                                    device,
        const VkSamplerCaptureDescriptorDataInfoEXT* pInfo,
        void*                                       pData);

- `device` is the logical device that gets the data.

- `pInfo` is a pointer to a VkSamplerCaptureDescriptorDataInfoEXT structure specifying the sampler.

- `pData` is a pointer to an application-allocated buffer where the data will be written.

Valid Usage

- VUID-vkGetSamplerOpaqueCaptureDescriptorDataEXT-None-08084
  The `descriptorBufferCaptureReplay` feature must be enabled

- VUID-vkGetSamplerOpaqueCaptureDescriptorDataEXT-pData-08085
  `pData` must point to a buffer that is at least VkPhysicalDeviceDescriptorBufferPropertiesEXT::`samplerCaptureReplayDescriptorDataSize` bytes in size

- VUID-vkGetSamplerOpaqueCaptureDescriptorDataEXT-device-08086
  If `device` was created with multiple physical devices, then the `bufferDeviceAddressMultiDevice` feature must be enabled

Valid Usage (Implicit)

- VUID-vkGetSamplerOpaqueCaptureDescriptorDataEXT-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetSamplerOpaqueCaptureDescriptorDataEXT-pInfo-parameter
  `pInfo` must be a valid pointer to a valid VkSamplerCaptureDescriptorDataInfoEXT structure

- VUID-vkGetSamplerOpaqueCaptureDescriptorDataEXT-pData-parameter
  `pData` must be a pointer value

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

Information about the sampler to get descriptor buffer capture data for is passed in a `VkSamplerCaptureDescriptorDataInfoEXT` structure:

Warning | This functionality is superseded by VK_EXT_descriptor_heap. See Legacy Functionality for more information.

    // Provided by VK_EXT_descriptor_buffer
    typedef struct VkSamplerCaptureDescriptorDataInfoEXT {
        VkStructureType    sType;
        const void*        pNext;
        VkSampler          sampler;
    } VkSamplerCaptureDescriptorDataInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `sampler` is the `VkSampler` handle of the sampler to get opaque capture data for.

Valid Usage

- VUID-VkSamplerCaptureDescriptorDataInfoEXT-sampler-08087
  `sampler` must have been created with VK_SAMPLER_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT set in VkSamplerCreateInfo::`flags`

Valid Usage (Implicit)

- VUID-VkSamplerCaptureDescriptorDataInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SAMPLER_CAPTURE_DESCRIPTOR_DATA_INFO_EXT

- VUID-VkSamplerCaptureDescriptorDataInfoEXT-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkSamplerCaptureDescriptorDataInfoEXT-sampler-parameter
  `sampler` must be a valid VkSampler handle

To get the opaque capture descriptor data for an acceleration structure, call:

Warning | This functionality is superseded by VK_EXT_descriptor_heap. See Legacy Functionality for more information.

    // Provided by VK_EXT_descriptor_buffer with VK_KHR_acceleration_structure or VK_NV_ray_tracing
    VkResult vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT(
        VkDevice                                    device,
        const VkAccelerationStructureCaptureDescriptorDataInfoEXT* pInfo,
        void*                                       pData);

- `device` is the logical device that gets the data.

- `pInfo` is a pointer to a VkAccelerationStructureCaptureDescriptorDataInfoEXT structure specifying the acceleration structure.

- `pData` is a pointer to an application-allocated buffer where the data will be written.

Valid Usage

- VUID-vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT-None-08088
  The `descriptorBufferCaptureReplay` feature must be enabled

- VUID-vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT-pData-08089
  `pData` must point to a buffer that is at least VkPhysicalDeviceDescriptorBufferPropertiesEXT::`accelerationStructureCaptureReplayDescriptorDataSize` bytes in size

- VUID-vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT-device-08090
  If `device` was created with multiple physical devices, then the `bufferDeviceAddressMultiDevice` feature must be enabled

Valid Usage (Implicit)

- VUID-vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT-pInfo-parameter
  `pInfo` must be a valid pointer to a valid VkAccelerationStructureCaptureDescriptorDataInfoEXT structure

- VUID-vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT-pData-parameter
  `pData` must be a pointer value

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

Information about the acceleration structure to get descriptor buffer capture data for is passed in a `VkAccelerationStructureCaptureDescriptorDataInfoEXT` structure:

Warning | This functionality is superseded by VK_EXT_descriptor_heap. See Legacy Functionality for more information.

    // Provided by VK_EXT_descriptor_buffer with VK_KHR_acceleration_structure or VK_NV_ray_tracing
    typedef struct VkAccelerationStructureCaptureDescriptorDataInfoEXT {
        VkStructureType               sType;
        const void*                   pNext;
        VkAccelerationStructureKHR    accelerationStructure;
        VkAccelerationStructureNV     accelerationStructureNV;
    } VkAccelerationStructureCaptureDescriptorDataInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `accelerationStructure` is the `VkAccelerationStructureKHR` handle of the acceleration structure to get opaque capture data for.

- `accelerationStructureNV` is the `VkAccelerationStructureNV` handle of the acceleration structure to get opaque capture data for.

Valid Usage

- VUID-VkAccelerationStructureCaptureDescriptorDataInfoEXT-accelerationStructure-08091
  If `accelerationStructure` is not VK_NULL_HANDLE then `accelerationStructure` must have been created with VK_ACCELERATION_STRUCTURE_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT set in VkAccelerationStructureCreateInfoKHR::`createFlags`

- VUID-VkAccelerationStructureCaptureDescriptorDataInfoEXT-accelerationStructureNV-08092
  If `accelerationStructureNV` is not VK_NULL_HANDLE then `accelerationStructureNV` must have been created with VK_ACCELERATION_STRUCTURE_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT set in VkAccelerationStructureCreateInfoNV::`info.flags`

- VUID-VkAccelerationStructureCaptureDescriptorDataInfoEXT-accelerationStructure-08093
  If `accelerationStructure` is not VK_NULL_HANDLE then `accelerationStructureNV` must be VK_NULL_HANDLE

- VUID-VkAccelerationStructureCaptureDescriptorDataInfoEXT-accelerationStructureNV-08094
  If `accelerationStructureNV` is not VK_NULL_HANDLE then `accelerationStructure` must be VK_NULL_HANDLE

- VUID-VkAccelerationStructureCaptureDescriptorDataInfoEXT-None-12430
  If the `accelerationStructure` feature is not enabled, `accelerationStructure` must be VK_NULL_HANDLE

- VUID-VkAccelerationStructureCaptureDescriptorDataInfoEXT-accelerationStructureNV-12431
  If the `VK_NV_ray_tracing extension` is not enabled, then `accelerationStructureNV` must be VK_NULL_HANDLE

Valid Usage (Implicit)

- VUID-VkAccelerationStructureCaptureDescriptorDataInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CAPTURE_DESCRIPTOR_DATA_INFO_EXT

- VUID-VkAccelerationStructureCaptureDescriptorDataInfoEXT-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkAccelerationStructureCaptureDescriptorDataInfoEXT-accelerationStructure-parameter
  If `accelerationStructure` is not VK_NULL_HANDLE, `accelerationStructure` must be a valid VkAccelerationStructureKHR handle

- VUID-VkAccelerationStructureCaptureDescriptorDataInfoEXT-accelerationStructureNV-parameter
  If `accelerationStructureNV` is not VK_NULL_HANDLE, `accelerationStructureNV` must be a valid VkAccelerationStructureNV handle

- VUID-VkAccelerationStructureCaptureDescriptorDataInfoEXT-commonparent
  Both of `accelerationStructure`, and `accelerationStructureNV` that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevice

The `VkOpaqueCaptureDescriptorDataCreateInfoEXT` structure is defined as:

Warning | This functionality is superseded by VK_EXT_descriptor_heap. See Legacy Functionality for more information.

    // Provided by VK_EXT_descriptor_buffer
    typedef struct VkOpaqueCaptureDescriptorDataCreateInfoEXT {
        VkStructureType    sType;
        const void*        pNext;
        const void*        opaqueCaptureDescriptorData;
    } VkOpaqueCaptureDescriptorDataCreateInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `opaqueCaptureDescriptorData` is a pointer to an application-allocated buffer containing opaque capture data retrieved using vkGetBufferOpaqueCaptureDescriptorDataEXT, vkGetImageOpaqueCaptureDescriptorDataEXT, vkGetImageViewOpaqueCaptureDescriptorDataEXT, vkGetTensorOpaqueCaptureDescriptorDataARM, vkGetTensorViewOpaqueCaptureDescriptorDataARM, vkGetSamplerOpaqueCaptureDescriptorDataEXT, or vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT.

During replay, opaque descriptor capture data can be specified by adding a `VkOpaqueCaptureDescriptorDataCreateInfoEXT` structure to the relevant `pNext` chain of a VkAccelerationStructureCreateInfoKHR, VkAccelerationStructureCreateInfoNV, VkTensorCreateInfoARM, VkTensorViewCreateInfoARM, VkBufferCreateInfo, VkImageCreateInfo, VkImageViewCreateInfo, or VkSamplerCreateInfo structure.

When providing opaque capture data for an image, if the `pNext` chain of VkImageCreateInfo or VkTensorCreateInfoARM contains an instance of both this structure and VkOpaqueCaptureDataCreateInfoEXT, they should both specify data from the same original resource. If they have capture data from different original resources, resource creation is much more likely to fail.

Valid Usage (Implicit)

- VUID-VkOpaqueCaptureDescriptorDataCreateInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_OPAQUE_CAPTURE_DESCRIPTOR_DATA_CREATE_INFO_EXT

- VUID-VkOpaqueCaptureDescriptorDataCreateInfoEXT-opaqueCaptureDescriptorData-parameter
  `opaqueCaptureDescriptorData` must be a pointer value

Structure Chaining

Extends the structures

  - VkAccelerationStructureCreateInfo2KHR

  - VkAccelerationStructureCreateInfoKHR

  - VkAccelerationStructureCreateInfoNV

  - VkBufferCreateInfo

  - VkImageCreateInfo

  - VkImageViewCreateInfo

  - VkSamplerCreateInfo

  - VkTensorCreateInfoARM

  - VkTensorViewCreateInfoARM

To get the opaque capture descriptor data for a tensor, call:

    // Provided by VK_EXT_descriptor_buffer with VK_ARM_tensors
    VkResult vkGetTensorOpaqueCaptureDescriptorDataARM(
        VkDevice                                    device,
        const VkTensorCaptureDescriptorDataInfoARM* pInfo,
        void*                                       pData);

- `device` is the logical device that gets the data.

- `pInfo` is a pointer to a VkTensorCaptureDescriptorDataInfoARM structure specifying the tensor.

- `pData` is a pointer to a user-allocated buffer where the data will be written.

Valid Usage

- VUID-vkGetTensorOpaqueCaptureDescriptorDataARM-descriptorBufferCaptureReplay-09702
  The `descriptorBufferCaptureReplay` and `descriptorBufferTensorDescriptors` features must be enabled

- VUID-vkGetTensorOpaqueCaptureDescriptorDataARM-pData-09703
  `pData` must point to a buffer that is at least VkPhysicalDeviceDescriptorBufferTensorPropertiesARM::`tensorCaptureReplayDescriptorDataSize` bytes in size

- VUID-vkGetTensorOpaqueCaptureDescriptorDataARM-device-09704
  If `device` was created with multiple physical devices, then the `bufferDeviceAddressMultiDevice` feature must be enabled

Valid Usage (Implicit)

- VUID-vkGetTensorOpaqueCaptureDescriptorDataARM-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetTensorOpaqueCaptureDescriptorDataARM-pInfo-parameter
  `pInfo` must be a valid pointer to a valid VkTensorCaptureDescriptorDataInfoARM structure

- VUID-vkGetTensorOpaqueCaptureDescriptorDataARM-pData-parameter
  `pData` must be a pointer value

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

Information about the tensor to get descriptor buffer capture data for is passed in a `VkTensorCaptureDescriptorDataInfoARM` structure:

    // Provided by VK_EXT_descriptor_buffer with VK_ARM_tensors
    typedef struct VkTensorCaptureDescriptorDataInfoARM {
        VkStructureType    sType;
        const void*        pNext;
        VkTensorARM        tensor;
    } VkTensorCaptureDescriptorDataInfoARM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `tensor` is the `VkTensorARM` handle of the tensor to get opaque capture data for.

Valid Usage

- VUID-VkTensorCaptureDescriptorDataInfoARM-tensor-09705
  If `tensor` is not VK_NULL_HANDLE then `tensor` must have been created with VK_TENSOR_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_ARM set in VkTensorCreateInfoARM::`flags`

Valid Usage (Implicit)

- VUID-VkTensorCaptureDescriptorDataInfoARM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_TENSOR_CAPTURE_DESCRIPTOR_DATA_INFO_ARM

- VUID-VkTensorCaptureDescriptorDataInfoARM-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkTensorCaptureDescriptorDataInfoARM-tensor-parameter
  `tensor` must be a valid VkTensorARM handle

To get the opaque capture descriptor data for a tensor view, call:

    // Provided by VK_EXT_descriptor_buffer with VK_ARM_tensors
    VkResult vkGetTensorViewOpaqueCaptureDescriptorDataARM(
        VkDevice                                    device,
        const VkTensorViewCaptureDescriptorDataInfoARM* pInfo,
        void*                                       pData);

- `device` is the logical device that gets the data.

- `pInfo` is a pointer to a VkTensorViewCaptureDescriptorDataInfoARM structure specifying the tensor view.

- `pData` is a pointer to a user-allocated buffer where the data will be written.

Valid Usage

- VUID-vkGetTensorViewOpaqueCaptureDescriptorDataARM-descriptorBufferCaptureReplay-09706
  The `descriptorBufferCaptureReplay` and `descriptorBufferTensorDescriptors` features must be enabled

- VUID-vkGetTensorViewOpaqueCaptureDescriptorDataARM-pData-09707
  `pData` must point to a buffer that is at least VkPhysicalDeviceDescriptorBufferTensorPropertiesARM::`tensorViewCaptureReplayDescriptorDataSize` bytes in size

- VUID-vkGetTensorViewOpaqueCaptureDescriptorDataARM-device-09708
  If `device` was created with multiple physical devices, then the `bufferDeviceAddressMultiDevice` feature must be enabled

Valid Usage (Implicit)

- VUID-vkGetTensorViewOpaqueCaptureDescriptorDataARM-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetTensorViewOpaqueCaptureDescriptorDataARM-pInfo-parameter
  `pInfo` must be a valid pointer to a valid VkTensorViewCaptureDescriptorDataInfoARM structure

- VUID-vkGetTensorViewOpaqueCaptureDescriptorDataARM-pData-parameter
  `pData` must be a pointer value

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

Information about the tensor view to get descriptor buffer capture data for is passed in a `VkTensorViewCaptureDescriptorDataInfoARM` structure:

    // Provided by VK_EXT_descriptor_buffer with VK_ARM_tensors
    typedef struct VkTensorViewCaptureDescriptorDataInfoARM {
        VkStructureType    sType;
        const void*        pNext;
        VkTensorViewARM    tensorView;
    } VkTensorViewCaptureDescriptorDataInfoARM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `tensorView` is the `VkTensorViewARM` handle of the tensor view to get opaque capture data for.

Valid Usage

- VUID-VkTensorViewCaptureDescriptorDataInfoARM-tensorView-09709
  If `tensorView` is not VK_NULL_HANDLE then `tensorView` must have been created with VK_TENSOR_VIEW_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_ARM set in VkTensorViewCreateInfoARM::`flags`

Valid Usage (Implicit)

- VUID-VkTensorViewCaptureDescriptorDataInfoARM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_TENSOR_VIEW_CAPTURE_DESCRIPTOR_DATA_INFO_ARM

- VUID-VkTensorViewCaptureDescriptorDataInfoARM-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkTensorViewCaptureDescriptorDataInfoARM-tensorView-parameter
  `tensorView` must be a valid VkTensorViewARM handle

## 19. Shader Interfaces

When a pipeline is created, the set of shaders specified in the corresponding `VkPipelineCreateInfo` structure are implicitly linked at a number of different interfaces.

- Shader Input and Output Interface

- Vertex Input Interface

- Fragment Output Interface

- Fragment Tile Image Interface

- Fragment Input Attachment Interface

- Ray Tracing Pipeline Interface

- Shader Resource Interface

- Geometry Shader Passthrough

This chapter describes valid uses for a set of SPIR-V decorations. Any other use of one of these decorations is invalid, with the exception that, when using SPIR-V versions 1.4 and earlier: `Block`, `BufferBlock`, `Offset`, `ArrayStride`, and `MatrixStride` can also decorate types and type members used by variables in the `Private` and `Function` storage classes.

Note | In this chapter, there are references to SPIR-V terms such as the `MeshNV` execution model. These terms will appear even in a build of the specification which does not support any extensions. This is as intended, since these terms appear in the unified SPIR-V specification without such qualifiers.

### 19.1. Shader Input and Output Interfaces

When multiple stages are present in a pipeline, the outputs of one stage form an interface with the inputs of the next stage. When such an interface involves a shader, shader outputs are matched against the inputs of the next stage, and shader inputs are matched against the outputs of the previous stage.

All the variables forming the shader input and output interfaces are listed as operands to the `OpEntryPoint` instruction and are declared with the `Input` or `Output` storage classes, respectively, in the SPIR-V module. These generally form the interfaces between consecutive shader stages, regardless of any non-shader stages between the consecutive shader stages.

There are two classes of variables that can be matched between shader stages, built-in variables and user-defined variables. Each class has a different set of matching criteria.

For compute shaders, the input interface is formed by the built-in interface. The output interface is empty.

#### 19.1.1. Built-In Interface Block

Shader built-in variables meeting the following requirements define the built-in interface block. They must

- be explicitly declared (there are no implicit built-ins),

- be identified with a `BuiltIn` decoration,

- form object types as described in the Built-in Variables section, and

- be declared in a block whose top-level members are the built-ins.

There must be no more than one built-in interface block per shader per interface , except for the mesh output interface where there must be at most one built-in interface block decorated with the `PerPrimitiveEXT` decoration and at most one built-in interface block without this decoration .

Built-ins must not have any `Location` or `Component` decorations.

#### 19.1.2. User-Defined Variable Interface

The non-built-in variables listed by `OpEntryPoint` with the `Input` or `Output` storage class form the user-defined variable interface. These must have numeric type or, recursively, composite types of such types. If an implementation supports `storageInputOutput16`, components can have a width of 16 bits. These variables must be identified with a `Location` decoration and can also be identified with a `Component` decoration.

#### 19.1.3. Interface Matching

An output variable, block, or structure member in a given shader stage has an interface match with an input variable, block, or structure member in a subsequent shader stage if they both adhere to the following conditions:

- They have equivalent decorations, other than:

  - `XfbBuffer`, `XfbStride`, `Offset`, and `Stream`

  - one is not decorated with `Component` and the other is declared with a `Component` of `0`

  - Interpolation decorations

  - `RelaxedPrecision` if one is an input variable and the other an output variable

- Their types match as follows:

  - if the input is declared in a tessellation control or geometry shader as an `OpTypeArray` with an `Element` `Type` equivalent to the `OpType*` declaration of the output, and neither is a structure member; or

  - if the `maintenance4` feature is enabled, they are declared as `OpTypeVector` variables, and the output has a `Component` `Count` value higher than that of the input but the same `Component` `Type`; or

  - if the output is declared in a mesh shader as an `OpTypeArray` with an `Element` `Type` equivalent to the `OpType*` declaration of the input, and neither is a structure member; or

  - if the input is decorated with `PerVertexKHR`, and is declared in a fragment shader as an `OpTypeArray` with an `Element` `Type` equivalent to the `OpType*` declaration of the output, and neither the input nor the output is a structure member; or

  - if in any other case they are declared with an equivalent `OpType*` declaration.

- If both are structures and every member has an interface match.

Note | The word “structure” above refers to both variables that have an `OpTypeStruct` type and interface blocks (which are also declared as `OpTypeStruct`).

If the pipeline is compiled as separate graphics pipeline libraries and the `graphicsPipelineLibraryIndependentInterpolationDecoration` limit is not supported, matches are not found if the interpolation decorations differ between the last pre-rasterization shader stage and the fragment shader stage.

All input variables and blocks must have an interface match in the preceding shader stage, except for built-in variables in fragment shaders. Shaders can declare and write to output variables that are not declared or read by the subsequent stage.

Matching rules for passthrough geometry shaders are slightly different and are described in the Passthrough Interface Matching section.

The value of an input variable is undefined if the preceding stage does not write to a matching output variable, as described above.

#### 19.1.4. Location and Component Assignment

User-defined variables in interfaces between shader stages in the graphics pipeline consume a unique set of `Location` and `Component` values.

Available space for user-defined interface variables is partitioned into a number of 32-bit four-component vectors, each identified by a `Location` value. Each individual 32-bit component of a vector is then further identified by a `Component` value.

16-bit scalar or vector values consume one `Component` slot per 16-bit component and must be specified within a single `Location`. 32-bit scalar or vector values consume one `Component` slot per 32-bit component and must be specified within a single `Location`. 64-bit scalar or vector values consume two consecutive `Component` slots per 64-bit component from up to two consecutive `Location` slots.

For any shader interface variable where one level of the array is disregarded for type matching, the outer array level is also disregarded when assigning `Location` slots.

An array of size n with elements consuming l `Location` slots each will consume l × n `Location` slots. Each element of the array will consume `Component` slots in each `Location` slot identically to a declaration using the element type.

Note | Applications running on Vulkan implementations advertising a VkPhysicalDeviceDriverProperties::`conformanceVersion` less than 1.4.6.0 should be aware that arrays may consume all four `Component` slots in each `Location` slot.

Matrices of size n × m are assigned locations identically to arrays of size n of vectors of length m with an identical element type.

When a variable with a structure type is decorated with a `Location`, the members in the structure type must not be decorated with a `Location`. The variable’s members are assigned consecutive locations in declaration order, starting from the first member, which is assigned the location decoration from the variable. The `Location` slots consumed by structure members are determined by applying the rules above in a depth-first traversal of the instantiated members as though the structure or block member were declared as an input or output variable of the same type.

A variable with a structure type that is not decorated with `Block` must be decorated with a `Location`.

When a variable with a structure type decorated with `Block` is declared without a `Location` decoration, each member in the structure must be decorated with a `Location`. Types nested deeper than the top-level members must not have `Location` decorations.

Multiple variable declarations in the same storage class must not have overlapping `Component` slots within the same `Location`.

The number of input and output locations available for a shader input or output interface depend on the shader stage as described in Shader Input and Output Locations. All variables in both the built-in interface block and the user-defined variable interface count against these limits. Each effective `Location` must have a value less than the number of `Location` slots available for the given interface, as specified in the “Locations Available” column in Shader Input and Output Locations.

Table 20. Shader Input and Output Locations
Shader Interface | Locations Available
--- | ---
vertex input | `maxVertexInputAttributes`
vertex output | `maxVertexOutputComponents` / 4
tessellation control input | `maxTessellationControlPerVertexInputComponents` / 4
tessellation control output | `maxTessellationControlPerVertexOutputComponents` / 4
tessellation evaluation input | `maxTessellationEvaluationInputComponents` / 4
tessellation evaluation output | `maxTessellationEvaluationOutputComponents` / 4
geometry input | `maxGeometryInputComponents` / 4
geometry output | `maxGeometryOutputComponents` / 4
fragment input | `maxFragmentInputComponents` / 4
fragment output | `maxFragmentOutputAttachments`
mesh output | `maxMeshOutputComponents` / 4
cluster culling output | `maxOutputClusterCount`

### 19.2. Vertex Input Interface

When the vertex stage is present in a pipeline, the vertex shader input variables form an interface with the vertex input attributes. The vertex shader input variables are matched by the `Location` and `Component` decorations to the vertex input attributes specified in the `pVertexInputState` member of the VkGraphicsPipelineCreateInfo structure.

The vertex shader input variables listed by `OpEntryPoint` with the `Input` storage class form the vertex input interface. These variables must be identified with a `Location` decoration and can also be identified with a `Component` decoration.

For the purposes of interface matching: variables declared without a `Component` decoration are considered to have a `Component` decoration of zero. The number of available vertex input `Location` slots is given by the `maxVertexInputAttributes` member of the `VkPhysicalDeviceLimits` structure.

See Attribute Location and Component Assignment for details.

All vertex shader inputs declared as above must have a corresponding attribute and binding in the pipeline.

Components and locations are consumed as defined for Location and Component Assignment. Multiple user-defined input variable declarations must not have overlapping `Component` slots within the same `Location`.

### 19.3. Fragment Output Interface

When the fragment stage is present in a pipeline, the fragment shader outputs form an interface with the output attachments defined by a render pass instance. The fragment shader output variables are matched by the `Location` and `Component` decorations to specified color attachments.

The fragment shader output variables listed by `OpEntryPoint` with the `Output` storage class form the fragment output interface. These variables must be identified with a `Location` decoration. They can also be identified with a `Component` decoration and/or an `Index` decoration. For the purposes of interface matching: variables declared without a `Component` decoration are considered to have a `Component` decoration of zero, and variables declared without an `Index` decoration are considered to have an `Index` decoration of zero.

A fragment shader output variable identified with a `Location` decoration of i is associated with the color attachment indicated by VkRenderingInfo::`pColorAttachments`[i]. When using render pass objects, it is associated with the color attachment indicated by VkSubpassDescription::`pColorAttachments`[i]. Values are written to those attachments after passing through the blending unit as described in Blending, if enabled. The number of available fragment output `Location` slots is given by the `maxFragmentOutputAttachments` member of the `VkPhysicalDeviceLimits` structure.

If the `dynamicRenderingLocalRead` feature is supported, fragment output locations can be remapped when using dynamic rendering.

To set the fragment output location mappings during rendering, call:

    // Provided by VK_VERSION_1_4
    void vkCmdSetRenderingAttachmentLocations(
        VkCommandBuffer                             commandBuffer,
        const VkRenderingAttachmentLocationInfo*    pLocationInfo);

    // Provided by VK_KHR_dynamic_rendering_local_read
    // Equivalent to vkCmdSetRenderingAttachmentLocations
    void vkCmdSetRenderingAttachmentLocationsKHR(
        VkCommandBuffer                             commandBuffer,
        const VkRenderingAttachmentLocationInfo*    pLocationInfo);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `pLocationInfo` is a VkRenderingAttachmentLocationInfo structure indicating the new mappings.

This command sets the attachment location mappings for subsequent drawing commands, and must match the mappings provided to the bound pipeline, if one is bound, which can be set by chaining VkRenderingAttachmentLocationInfo to VkGraphicsPipelineCreateInfo.

Until this command is called, mappings in the command buffer state are treated as each color attachment specified in vkCmdBeginRendering having a location equal to its index in VkRenderingInfo::`pColorAttachments`. This state is reset whenever vkCmdBeginRendering is called.

Valid Usage

- VUID-vkCmdSetRenderingAttachmentLocations-dynamicRenderingLocalRead-09509
  `dynamicRenderingLocalRead` must be enabled

- VUID-vkCmdSetRenderingAttachmentLocations-pLocationInfo-09510
  `pLocationInfo->colorAttachmentCount` must be equal to the value of VkRenderingInfo::`colorAttachmentCount` used to begin the current render pass instance

- VUID-vkCmdSetRenderingAttachmentLocations-commandBuffer-09511
  The current render pass instance must have been started or resumed by vkCmdBeginRendering in this `commandBuffer`

Valid Usage (Implicit)

- VUID-vkCmdSetRenderingAttachmentLocations-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetRenderingAttachmentLocations-pLocationInfo-parameter
  `pLocationInfo` must be a valid pointer to a valid VkRenderingAttachmentLocationInfo structure

- VUID-vkCmdSetRenderingAttachmentLocations-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetRenderingAttachmentLocations-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetRenderingAttachmentLocations-renderpass
  This command must only be called inside of a render pass instance

- VUID-vkCmdSetRenderingAttachmentLocations-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Inside | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetRenderingAttachmentLocations is not affected by conditional rendering

The `VkRenderingAttachmentLocationInfo` structure is defined as:

    // Provided by VK_VERSION_1_4
    typedef struct VkRenderingAttachmentLocationInfo {
        VkStructureType    sType;
        const void*        pNext;
        uint32_t           colorAttachmentCount;
        const uint32_t*    pColorAttachmentLocations;
    } VkRenderingAttachmentLocationInfo;

    // Provided by VK_KHR_dynamic_rendering_local_read
    // Equivalent to VkRenderingAttachmentLocationInfo
    typedef VkRenderingAttachmentLocationInfo VkRenderingAttachmentLocationInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `colorAttachmentCount` is the number of elements in `pColorAttachmentLocations`.

- `pColorAttachmentLocations` is a pointer to an array of `colorAttachmentCount` `uint32_t` values defining remapped locations for color attachments.

This structure allows applications to remap the locations of color attachments to different fragment shader output locations.

Each element of `pColorAttachmentLocations` set to VK_ATTACHMENT_UNUSED will be inaccessible to this pipeline as a color attachment; no location will map to it. Each element of `pColorAttachmentLocations` set to any other value will map the specified location value to the color attachment specified in the render pass at the corresponding index in the `pColorAttachmentLocations` array. Any writes to a fragment output location that is not mapped to an attachment must be discarded.

If `pColorAttachmentLocations` is `NULL`, it is equivalent to setting each element to its index within the array.

This structure can be included in the `pNext` chain of a VkGraphicsPipelineCreateInfo structure to set this state for a pipeline. If this structure is not included in the `pNext` chain of VkGraphicsPipelineCreateInfo, it is equivalent to specifying this structure with the following properties:

- `colorAttachmentCount` set to VkPipelineRenderingCreateInfo::`colorAttachmentCount`.

- `pColorAttachmentLocations` set to `NULL`.

This structure can be included in the `pNext` chain of a VkCommandBufferInheritanceInfo structure to specify inherited state from the primary command buffer. If VkCommandBufferInheritanceInfo::`renderPass` is not VK_NULL_HANDLE, or VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT is not specified in VkCommandBufferBeginInfo::`flags`, members of this structure are ignored. If this structure is not included in the `pNext` chain of VkCommandBufferInheritanceInfo, it is equivalent to specifying this structure with the following properties:

- `colorAttachmentCount` set to VkCommandBufferInheritanceRenderingInfo::`colorAttachmentCount`.

- `pColorAttachmentLocations` set to `NULL`.

Valid Usage

- VUID-VkRenderingAttachmentLocationInfo-dynamicRenderingLocalRead-09512
  If the `dynamicRenderingLocalRead` feature is not enabled, and `pColorAttachmentLocations` is not `NULL`, each element must be the value of its index within the array

- VUID-VkRenderingAttachmentLocationInfo-pColorAttachmentLocations-09513
  Elements of `pColorAttachmentLocations` that are not VK_ATTACHMENT_UNUSED must each be unique

- VUID-VkRenderingAttachmentLocationInfo-colorAttachmentCount-09514
  `colorAttachmentCount` must be less than or equal to `maxColorAttachments`

- VUID-VkRenderingAttachmentLocationInfo-pColorAttachmentLocations-09515
  Each element of `pColorAttachmentLocations` must be less than `maxColorAttachments`

Valid Usage (Implicit)

- VUID-VkRenderingAttachmentLocationInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_RENDERING_ATTACHMENT_LOCATION_INFO

Structure Chaining

Extends the structures

  - VkCommandBufferInheritanceInfo

  - VkGraphicsPipelineCreateInfo

When an active fragment shader invocation finishes, the values of all fragment shader outputs are copied out and used as blend inputs or color attachments writes. If an output variable is declared, but there is no color attachment at that `Location`, any values written to it are discarded. If a color attachment at a given `Location` does not have an output variable declared, the values must not be modified.

Output `Component` words identified as 0, 1, 2, and 3 will be directed to the R, G, B, and A inputs to the blending unit, respectively, or to the output attachment if blending is disabled. If two variables are placed within the same `Location`, they must have the same numeric type. `Component` words which do not correspond to any fragment shader output will also result in undefined values for blending or color attachment writes.

Fragment outputs identified with an `Index` of zero are directed to the first input of the blending unit associated with the corresponding `Location`. Outputs identified with an `Index` of one are directed to the second input of the corresponding blending unit.

Components and locations are consumed as defined for Location and Component Assignment. Output variable declarations must not consume any of the same `Component` slots within the same `Location` and with the same `Index` value as any other output variable declaration.

Output values written by a fragment shader must be declared with either `OpTypeFloat` or `OpTypeInt`, and a `Width` of 32. If `storageInputOutput16` is supported, output values written by a fragment shader can be also declared with either `OpTypeFloat` or `OpTypeInt` and a `Width` of 16. Composites of these types are also permitted. If the color attachment has a signed or unsigned normalized fixed-point format, color values are assumed to be floating-point and are converted to fixed-point as described in Conversion From Floating-Point to Normalized Fixed-Point; If the color attachment has an integer format, color values are assumed to be integers and converted to the bit-depth of the target. Any value that cannot be represented in the attachment’s format is undefined. For any other attachment format no conversion is performed. If the type of the values written by the fragment shader do not match the format of the corresponding color attachment, the resulting values are undefined for those components.

### 19.4. Legacy Dithering

The application can enable dithering to be applied to the color output of a subpass, by using the VK_SUBPASS_DESCRIPTION_ENABLE_LEGACY_DITHERING_BIT_EXT flag. For use in a dynamic render pass, the VK_RENDERING_ENABLE_LEGACY_DITHERING_BIT_EXT flag must be used. In that case, the pipelines used must have been created with VK_PIPELINE_CREATE_2_ENABLE_LEGACY_DITHERING_BIT_EXT.

When dithering is enabled, the implementation may modify the output color value c by one ULP. This modification must only depend on the framebuffer coordinates (xf,yf) of the sample, as well as on the value of c.

The exact details of the dithering algorithm are unspecified, including the algorithm itself, the formats dithering is applied to, and the stage in which it is applied.

Note | This extension is intended only for use by OpenGL emulation layers, and as such the dithering algorithm applied to the subpass should be equivalent to the vendor’s OpenGL implementation, if any.

### 19.5. Fragment Tile Image Interface

When a fragment stage is present in a pipeline, the fragment shader tile image variables decorated with `Location` form an interface with the color attachments defined by the render pass instance. The fragment shader tile image variables are matched by `Location` decorations to the color attachments specified in the `pColorAttachments` array of the VkRenderingInfoKHR structure describing the render pass instance the fragment shader is executed in.

The fragment shader variables listed by `OpEntryPoint` with the `TileImageEXT` storage class and a decoration of `Location` form the fragment tile image interface. These variables must be declared with a type of `OpTypeImage`, and a `Dim` operand of `TileImageDataEXT`. The `Component` decoration is not supported for these variables.

Reading from a tile image variable with a `Location` decoration of i reads from the color attachment identified by the element of VkRenderingInfoKHR::`pColorAttachments` with a `location` equal to i. If the tile image variable is declared as an array of size N, it consumes N consecutive tile image locations, starting with the index specified. There must not be more than one tile image variable with the same `Location` whether explicitly declared or implied by an array declaration. The number of available tile image locations is the same as the number of available fragment output locations as given by the `maxFragmentOutputAttachments` member of the `VkPhysicalDeviceLimits` structure.

The basic data type (floating-point, integer, unsigned integer) of the tile image variable must match the basic format of the corresponding color attachment, or the values read from the tile image variables are poison.

### 19.6. Tile Attachment Interface

The image variables declared with `TileAttachmentQCOM` storage class form the tile attachment interface.

These tile attachment variables correspond to a per-tile view of the color, depth, or input attachment of the current subpass or render pass instance.

Such variables must only be declared and accessed in compute and fragment shaders invoked within a render pass instance that enables tile shading. Access of such variables in a fragment shader, additionally requires that the tileShadingFragmentStage feature must be enabled.

Tile attachment variables must not include a `Component` decoration. Tile attachment variables must not be consumed by `OpImageQuery*` instructions. Tile attachment variables can be declared as either single-sampled with `MS` operand of `0`, or as multi-sampled with `MS` operand of `1`. The image subresources of the tile attachment image must not be in VK_IMAGE_LAYOUT_UNDEFINED or VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT layout in order to access its data in a shader.

Tile attachment variables statically accessed by a fragment or compute shader must be backed by a descriptor that is equivalent to the VkImageView in the VkFramebuffer or the VkRenderingAttachmentInfo except for `subresourceRange.aspectMask`. The `aspectMask` must be equal to the aspect accessed by the shader.

Tile attachment variables are further subdivided into storage tile attachment, sampled tile attachment, and input tile attachment variables.

- Sampled tile attachment variables must be declared with a `Sampled` operand of `1`, must be backed by a descriptor of type VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM, or VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, and can be used with `OpImageFetch`, `OpImageSparseFetch`, or used to construct an `OpTypeSampledImage` that is subsequently consumed by `OpImageSample*`, `OpImageSparseSample*`, `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatch*QCOM`, `OpImage*Gather`, `OpImageGatherQCOM`, or `OpImageSparse*Gather`. Sampled tile attachment variables are managed by the Descriptor Set Interface as sampled images.

- Storage tile attachment variables must be declared with a `Sampled` operand of `2`, must be backed by a descriptor of type VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, and can be used with `OpImageRead`, `OpImageSparseRead`, and `OpImageWrite` instructions. Storage tile attachment variables can be consumed by `OpImageTexelPointer` for compatibility with atomic operations. Sampled tile attachment variables are managed by the Descriptor Set Interface as storage images.

- Input tile attachment variables must be declared with a `Sampled` operand of `2`, must be backed by a descriptor of type VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, and can be used with `OpImageRead` instructions. Input tile attachment variables are managed by the Descriptor Set Interface as input attachment images.

Tile attachment access using `OpImageWrite` instructions must be used only in the compute stage. Tile attachment access using `OpImageWrite` instructions must not be used on a variable whose underlying descriptor references the same VkImageView bound as a depth or stencil attachment.

The basic data type (floating-point, integer, unsigned integer) of the tile attachment variable must match the basic format of the corresponding input, depth, or color attachment, otherwise the result of loads/stores for tile attachment variables is poison. If the render pass attachment contains both depth and stencil aspects, the basic data type of the tile attachment variable determines if depth or stencil aspect is accessed by the shader.

### 19.7. Fragment Input Attachment Interface

When a fragment stage is present in a pipeline, the fragment shader subpass inputs form an interface with the input attachments of the current subpass. The fragment shader subpass input variables are matched by `InputAttachmentIndex` decorations to the input attachments specified in the `pInputAttachments` array of the VkSubpassDescription structure describing the subpass that the fragment shader is executed in.

The fragment shader subpass input variables with the `UniformConstant` storage class and a decoration of `InputAttachmentIndex` that are statically used by `OpEntryPoint` form the fragment input attachment interface. These variables must be declared with a type of `OpTypeImage`, a `Dim` operand of `SubpassData`, an `Arrayed` operand of 0, and a `Sampled` operand of 2. The `MS` operand of the `OpTypeImage` must be 0 if the `samples` field of the corresponding VkAttachmentDescription is VK_SAMPLE_COUNT_1_BIT and multisampled-render-to-single-sampled is not enabled, and 1 otherwise.

A subpass input variable identified with an `InputAttachmentIndex` decoration of i reads from the input attachment indicated by `pInputAttachments`[i] member of `VkSubpassDescription`. If the subpass input variable is declared as an array of size N, or a runtime-sized array, it consumes consecutive input attachments, starting with the index specified. For runtime-sized arrays, the number of input attachment indices consumed is equal to VkDescriptorSetLayoutBinding::`descriptorCount`. There must not be more than one input variable with the same `InputAttachmentIndex` whether explicitly declared or implied by an array declaration per image aspect. A multi-aspect image (e.g. a depth/stencil format) can use the same input variable. The number of available input attachment indices is given by the `maxPerStageDescriptorInputAttachments` member of the `VkPhysicalDeviceLimits` structure.

When using dynamic rendering with the `dynamicRenderingLocalRead` feature enabled, a subpass input variable with a `InputAttachmentIndex` decoration of i can be mapped to a color, depth, or stencil attachment.

To set the input attachment index mappings during dynamic rendering, call:

    // Provided by VK_VERSION_1_4
    void vkCmdSetRenderingInputAttachmentIndices(
        VkCommandBuffer                             commandBuffer,
        const VkRenderingInputAttachmentIndexInfo*  pInputAttachmentIndexInfo);

    // Provided by VK_KHR_dynamic_rendering_local_read
    // Equivalent to vkCmdSetRenderingInputAttachmentIndices
    void vkCmdSetRenderingInputAttachmentIndicesKHR(
        VkCommandBuffer                             commandBuffer,
        const VkRenderingInputAttachmentIndexInfo*  pInputAttachmentIndexInfo);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `pInputAttachmentIndexInfo` is a VkRenderingInputAttachmentIndexInfo structure indicating the new mappings.

This command sets the input attachment index mappings for subsequent drawing commands, and must match the mappings provided to the bound pipeline, if one is bound, which can be set by chaining VkRenderingInputAttachmentIndexInfo to VkGraphicsPipelineCreateInfo.

Until this command is called, mappings in the command buffer state are treated as each color attachment specified in vkCmdBeginRendering mapping to subpass inputs with a `InputAttachmentIndex` equal to its index in VkRenderingInfo::`pColorAttachments`, and depth/stencil attachments mapping to input attachments without these decorations. This state is reset whenever vkCmdBeginRendering is called.

Valid Usage

- VUID-vkCmdSetRenderingInputAttachmentIndices-dynamicRenderingLocalRead-09516
  `dynamicRenderingLocalRead` must be enabled

- VUID-vkCmdSetRenderingInputAttachmentIndices-pInputAttachmentIndexInfo-09517
  `pInputAttachmentIndexInfo->colorAttachmentCount` must be equal to the value of VkRenderingInfo::`colorAttachmentCount` used to begin the current render pass instance

- VUID-vkCmdSetRenderingInputAttachmentIndices-commandBuffer-09518
  The current render pass instance must have been started or resumed by vkCmdBeginRendering in this `commandBuffer`

Valid Usage (Implicit)

- VUID-vkCmdSetRenderingInputAttachmentIndices-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetRenderingInputAttachmentIndices-pInputAttachmentIndexInfo-parameter
  `pInputAttachmentIndexInfo` must be a valid pointer to a valid VkRenderingInputAttachmentIndexInfo structure

- VUID-vkCmdSetRenderingInputAttachmentIndices-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetRenderingInputAttachmentIndices-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetRenderingInputAttachmentIndices-renderpass
  This command must only be called inside of a render pass instance

- VUID-vkCmdSetRenderingInputAttachmentIndices-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Inside | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetRenderingInputAttachmentIndices is not affected by conditional rendering

The `VkRenderingInputAttachmentIndexInfo` structure is defined as:

    // Provided by VK_VERSION_1_4
    typedef struct VkRenderingInputAttachmentIndexInfo {
        VkStructureType    sType;
        const void*        pNext;
        uint32_t           colorAttachmentCount;
        const uint32_t*    pColorAttachmentInputIndices;
        const uint32_t*    pDepthInputAttachmentIndex;
        const uint32_t*    pStencilInputAttachmentIndex;
    } VkRenderingInputAttachmentIndexInfo;

    // Provided by VK_KHR_dynamic_rendering_local_read
    // Equivalent to VkRenderingInputAttachmentIndexInfo
    typedef VkRenderingInputAttachmentIndexInfo VkRenderingInputAttachmentIndexInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `colorAttachmentCount` is the number of elements in `pColorAttachmentInputIndices`.

- `pColorAttachmentInputIndices` is a pointer to an array of `colorAttachmentCount` `uint32_t` values defining indices for color attachments to be used as input attachments.

- `pDepthInputAttachmentIndex` is either `NULL`, or a pointer to a `uint32_t` value defining the index for the depth attachment to be used as an input attachment.

- `pStencilInputAttachmentIndex` is either `NULL`, or a pointer to a `uint32_t` value defining the index for the stencil attachment to be used as an input attachment.

This structure allows applications to remap attachments to different input attachment indices.

Each element of `pColorAttachmentInputIndices` set to a value of VK_ATTACHMENT_UNUSED indicates that the corresponding attachment will not be used as an input attachment in this pipeline. Any other value in each of those elements will map the corresponding attachment to a `InputAttachmentIndex` value defined in shader code.

If `pColorAttachmentInputIndices` is `NULL`, it is equivalent to setting each element to its index within the array.

If `pDepthInputAttachmentIndex` or `pStencilInputAttachmentIndex` are set to `NULL`, they map to input attachments without a `InputAttachmentIndex` decoration. If they point to a value of VK_ATTACHMENT_UNUSED, it indicates that the corresponding attachment will not be used as an input attachment in this pipeline. If they point to any other value it maps the corresponding attachment to a `InputAttachmentIndex` value defined in shader code.

This structure can be included in the `pNext` chain of a VkGraphicsPipelineCreateInfo structure to set this state for a pipeline. If this structure is not included in the `pNext` chain of VkGraphicsPipelineCreateInfo, it is equivalent to specifying this structure with the following properties:

- `colorAttachmentCount` set to VkPipelineRenderingCreateInfo::`colorAttachmentCount`.

- `pColorAttachmentInputIndices` set to `NULL`.

- `pDepthInputAttachmentIndex` set to `NULL`.

- `pStencilInputAttachmentIndex` set to `NULL`.

This structure can be included in the `pNext` chain of a VkCommandBufferInheritanceInfo structure to specify inherited state from the primary command buffer. If this structure is not included in the `pNext` chain of VkCommandBufferInheritanceInfo, it is equivalent to specifying this structure with the following properties:

- `colorAttachmentCount` set to VkCommandBufferInheritanceRenderingInfo::`colorAttachmentCount`.

- `pColorAttachmentInputIndices` set to `NULL`.

- `pDepthInputAttachmentIndex` set to `NULL`.

- `pStencilInputAttachmentIndex` set to `NULL`.

Valid Usage

- VUID-VkRenderingInputAttachmentIndexInfo-dynamicRenderingLocalRead-09519
  If the `dynamicRenderingLocalRead` feature is not enabled, and `pColorAttachmentInputIndices` is not `NULL`, each element must be VK_ATTACHMENT_UNUSED

- VUID-VkRenderingInputAttachmentIndexInfo-dynamicRenderingLocalRead-09520
  If the `dynamicRenderingLocalRead` feature is not enabled, `pDepthInputAttachmentIndex` must be a valid pointer to a value of VK_ATTACHMENT_UNUSED

- VUID-VkRenderingInputAttachmentIndexInfo-dynamicRenderingLocalRead-09521
  If the `dynamicRenderingLocalRead` feature is not enabled, `pStencilInputAttachmentIndex` must be a valid pointer to a value of VK_ATTACHMENT_UNUSED

- VUID-VkRenderingInputAttachmentIndexInfo-pColorAttachmentInputIndices-09522
  Elements of `pColorAttachmentInputIndices` that are not VK_ATTACHMENT_UNUSED must each be unique

- VUID-VkRenderingInputAttachmentIndexInfo-pColorAttachmentInputIndices-09523
  Elements of `pColorAttachmentInputIndices` that are not VK_ATTACHMENT_UNUSED must not take the same value as the content of `pDepthInputAttachmentIndex`

- VUID-VkRenderingInputAttachmentIndexInfo-pColorAttachmentInputIndices-09524
  Elements of `pColorAttachmentInputIndices` that are not VK_ATTACHMENT_UNUSED must not take the same value as the content of `pStencilInputAttachmentIndex`

- VUID-VkRenderingInputAttachmentIndexInfo-colorAttachmentCount-09525
  `colorAttachmentCount` must be less than or equal to `maxColorAttachments`

- VUID-VkRenderingInputAttachmentIndexInfo-pDepthInputAttachmentIndex-12274
  Elements of `pDepthInputAttachmentIndex`, `pStencilInputAttachmentIndex`, and `pColorAttachmentInputIndices` that are not VK_ATTACHMENT_UNUSED must be less than `maxPerStageDescriptorInputAttachments`

Valid Usage (Implicit)

- VUID-VkRenderingInputAttachmentIndexInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_RENDERING_INPUT_ATTACHMENT_INDEX_INFO

- VUID-VkRenderingInputAttachmentIndexInfo-pColorAttachmentInputIndices-parameter
  If `colorAttachmentCount` is not `0`, and `pColorAttachmentInputIndices` is not `NULL`, `pColorAttachmentInputIndices` must be a valid pointer to an array of `colorAttachmentCount` `uint32_t` values

- VUID-VkRenderingInputAttachmentIndexInfo-pDepthInputAttachmentIndex-parameter
  If `pDepthInputAttachmentIndex` is not `NULL`, `pDepthInputAttachmentIndex` must be a valid pointer to a valid `uint32_t` value

- VUID-VkRenderingInputAttachmentIndexInfo-pStencilInputAttachmentIndex-parameter
  If `pStencilInputAttachmentIndex` is not `NULL`, `pStencilInputAttachmentIndex` must be a valid pointer to a valid `uint32_t` value

Structure Chaining

Extends the structures

  - VkCommandBufferInheritanceInfo

  - VkGraphicsPipelineCreateInfo

Variables identified with the `InputAttachmentIndex` must only be used by a fragment stage. The numeric format of the subpass input must match the format of the corresponding input attachment, or the values of subpass loads from these variables are poison. If the framebuffer attachment contains both depth and stencil aspects, the numeric format of the subpass input determines if depth or stencil aspect is accessed by the shader.

See Input Attachment for more details.

#### 19.7.1. Fragment Input Attachment Compatibility

An input attachment that is statically accessed by a fragment shader must be backed by a descriptor that is equivalent to the VkImageView in the VkFramebuffer, except for `subresourceRange.aspectMask`. The `aspectMask` must be equal to the aspect accessed by the shader.

### 19.8. Ray Tracing Pipeline Interface

Ray tracing pipelines may have more stages than other pipelines with multiple instances of each stage and more dynamic interactions between the stages, but still have interface structures that obey the same general rules as interfaces between shader stages in other pipelines. The three types of inter-stage interface variables for ray tracing pipelines are:

- Ray payloads containing data preserved for the entire lifetime of the ray.

- Hit attributes containing data about a specific hit for the duration of its processing.

- Callable data for passing data into and out of a callable shader.

Ray payloads and callable data are used in explicit shader call instructions, so they have an incoming variant to distinguish the parameter passed to the invocation from any other payloads or data being used by subsequent shader call instructions.

An interface structure between stages must match between the stages using it. Specifically:

- If an intersection shader is present, the hit attribute structure read in an any-hit or closest hit shader must be the same structure as the hit attribute structure written in the corresponding intersection shader in the same hit group.

- If an intersection shader is not present, the hit attribute structure read in an any-hit or closest hit shader must be a vector of 2 32-bit floating-point values that accepts the barycentric coordinates for triangle hits.

- The incoming callable data for a callable shader must be the same structure as the callable data referenced by the execute callable instruction in the calling shader.

- The ray payload for a shader invoked by a ray tracing command must be the same structure for all shader stages using the payload for that ray, and must be declared in the shader even if it is not referenced.

Any shader with an incoming ray payload, incoming callable data, or hit attribute must only declare one variable of that type.

Table 21. Ray Pipeline Shader Interface
Shader Stage | Ray Payload | Incoming Ray Payload | Hit Attribute | Callable Data | Incoming Callable Data
--- | --- | --- | --- | --- | ---
Ray Generation | r/w |  |  | r/w |
Intersection |  |  | r/w |  |
Any-Hit |  | r/w | r |  |
Closest Hit | r/w | r/w | r | r/w |
Miss | r/w | r/w |  | r/w |
Callable |  |  |  | r/w | r/w

### 19.9. Shader Resource Interface

Shaders can access resources and samplers through Resource Descriptors created in the API, via the Descriptor Heap Interface or the Descriptor Set Interface.

The set of shader variables that form the shader resource interface for a stage are the variables statically used by that stage’s `OpEntryPoint` with a storage class of `Uniform`, `UniformConstant`, `TileAttachmentQCOM`, `StorageBuffer`, or `PushConstant`. For the fragment shader, this includes the fragment input attachment interface.

The shader resource interface is made up of the sub-interfaces defined in the following sections.

#### 19.9.1. Push Constant Interface

The shader variables defined with a storage class of `PushConstant` that are statically used by the shader entry points for the pipeline define the push constant interface. They must be:

- typed as `OpTypeStruct`,

- identified with a `Block` decoration, and

- laid out explicitly using the `Offset`, `ArrayStride`, and `MatrixStride` decorations as specified in Offset and Stride Assignment.

There must be no more than one push constant block statically used per shader entry point.

When using descriptor heaps, each statically used member of a push constant block must be placed at an `Offset` such that the entire member is entirely contained within the range specified by vkCmdPushDataEXT in the command buffer. The `Offset` decoration for any member of a push constant block must not cause the space required for that member to extend outside the range [0, `maxPushDataSize`).

When using descriptor buffers or descriptor sets, each statically used member of a push constant block must be placed at an `Offset` such that the entire member is entirely contained within the VkPushConstantRange for each `OpEntryPoint` that uses it, and the `stageFlags` for that range must specify the appropriate VkShaderStageFlagBits for that stage. The `Offset` decoration for any member of a push constant block must not cause the space required for that member to extend outside the range [0, `maxPushConstantsSize`).

Push constant variables or blocks can be decorated with `BankNV` and `MemberOffsetNV` decorations to control their placement within push constant banks. The `BankNV` decoration specifies which hardware bank the push constant data should be placed in or accessed from, while `MemberOffsetNV` provides additional offset control within the specified bank. When these decorations are used, the push constant data placement is determined by both the API-specified ranges and the shader-specified bank and offset decorations, allowing for more flexible push constant management on implementations where multiple banks are available.

Any member of a push constant block that is declared as an array must only be accessed with dynamically uniform indices.

#### 19.9.2. Descriptor Heap Interface

The descriptor heap interface provides access to resources through pointers to heaps of different types, without many of the restrictions that apply to the descriptor set interface.

Two built-in pointers are available to shaders:

- `SamplerHeapEXT` for samplers

- `ResourceHeapEXT` for resources

These built-ins must be declared as pointers in the `UniformConstant` `Storage` `Class`. These built-ins must not be used to access data outside of the heap bound to them.

These built-ins can be accessed non-uniformly, with no further decoration required, and with no dependency on other features or properties. The `UniformId` decoration can be applied to the result of accesses to indicate that the data will be accessed uniformly to a given scope, as a hint to improve performance on some implementations.

Resources retrieved from each heap must have been created with descriptors that match the variable being declared, as follows:

Table 22. Heap Resource Type Correspondence
Descriptor Type | Heap | SPIR-V Type
--- | --- | ---
VK_DESCRIPTOR_TYPE_SAMPLER | `SamplerHeapEXT` | `OpTypeSampler`
VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE | `ResourceHeapEXT` | `OpTypeImage`
VK_DESCRIPTOR_TYPE_STORAGE_IMAGE | `ResourceHeapEXT` | `OpTypeImage`
VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM | `ResourceHeapEXT` | `OpTypeImage`
VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM | `ResourceHeapEXT` | `OpTypeImage`
VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT | `ResourceHeapEXT` | `OpTypeImage`
VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER | `ResourceHeapEXT` | `OpTypeImage`
VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER | `ResourceHeapEXT` | `OpTypeImage`
VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER | `ResourceHeapEXT` | `OpTypeBufferEXT` with the `Uniform` `Storage` `Class`
VK_DESCRIPTOR_TYPE_STORAGE_BUFFER | `ResourceHeapEXT` | `OpTypeBufferEXT` with the `StorageBuffer` `Storage` `Class`
VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR | `ResourceHeapEXT` | `OpTypeAccelerationStructureKHR`
VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV | `ResourceHeapEXT` | `OpTypeAccelerationStructureNV`
VK_DESCRIPTOR_TYPE_PARTITIONED_ACCELERATION_STRUCTURE_NV | `ResourceHeapEXT` | `OpTypeAccelerationStructureKHR`
VK_DESCRIPTOR_TYPE_TENSOR_ARM | `ResourceHeapEXT` | `OpTypeTensorARM`

While the built-in heap pointers can be declared and dereferenced as pointing to any type, applications must not access data types valid for one heap from any other heap.

When one of the types above is read from a heap in the shader, it will read a number of bytes equal to value advertised for the VkDescriptorType as returned by vkGetPhysicalDeviceDescriptorSizeEXT.

For image types, there are further restrictions on the operands used for the type, according to the descriptor type:

Table 23. Heap Image Operand Correspondence
Descriptor Type | `Dim` | `Arrayed` | `MS` | `Sampled`
--- | --- | --- | --- | ---
VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE | * | * | 0 | 1
VK_DESCRIPTOR_TYPE_STORAGE_IMAGE | * | * | 0 or 1 | 2
VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT | `SubpassData` | 0 | 0 or 1 | 2
VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER | `Buffer` | 0 | 0 | 2
VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER | `Buffer` | 0 | 0 | 2
VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM | `2D` | 1 | 0 | 1
VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM | `2D` | 0 | 0 | 1

For storage images and input attachments, `MS` is 0 if the image has one sample per pixel, or 1 otherwise. For sampled and storage images, the `Dim` and `Arrayed` qualifiers depend on the VkImageViewType specified when writing the descriptor:

Table 24. Heap Image View Type Dimensionality
Image View Type | `Dim` | `Arrayed`
--- | --- | ---
VK_IMAGE_VIEW_TYPE_1D | `1D` | 0
VK_IMAGE_VIEW_TYPE_2D | `2D` | 0
VK_IMAGE_VIEW_TYPE_3D | `3D` | 0
VK_IMAGE_VIEW_TYPE_CUBE | `Cube` | 0
VK_IMAGE_VIEW_TYPE_1D_ARRAY | `1D` | 1
VK_IMAGE_VIEW_TYPE_2D_ARRAY | `2D` | 1
VK_IMAGE_VIEW_TYPE_CUBE_ARRAY | `Cube` | 1

The type and format of the image resource must also match between the API and SPIR-V.

Descriptors accessed via the `ResourceHeapEXT` built-in must be explicitly laid out.

There is no further limit to the number of resources that can be accessed by a shader through a heap pointer beyond the size of the bound range for each heap.

#### 19.9.3. Descriptor Set Interface

The descriptor set interface is comprised of the shader variables with the storage class of `StorageBuffer`, `TileAttachmentQCOM`, `Uniform`, or `UniformConstant` (including the variables in the fragment input attachment interface) that are statically used by the shader entry points for the pipeline.

When using descriptor heaps, this interface is not used directly to access heaps, but may be accessed by specifying Shader Bindings to map to the descriptor heaps.

These variables must have `DescriptorSet` and `Binding` decorations specified, which are assigned and matched with the `VkDescriptorSetLayout` objects in the pipeline layout as described in DescriptorSet and Binding Assignment.

The `Image` `Format` of an `OpTypeImage` declaration must not be Unknown, for variables which are used for `OpImageRead`, `OpImageSparseRead`, or `OpImageWrite` operations, except under the following conditions:

- For `OpImageWrite`, if the image format is listed in the storage without format list and if the `shaderStorageImageWriteWithoutFormat` feature is enabled and the shader module declares the `StorageImageWriteWithoutFormat` capability.

- For `OpImageWrite`, if the image format supports VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT and the shader module declares the `StorageImageWriteWithoutFormat` capability.

- For `OpImageRead` or `OpImageSparseRead`, if the image format is listed in the storage without format list and if the `shaderStorageImageReadWithoutFormat` feature is enabled and the shader module declares the `StorageImageReadWithoutFormat` capability.

- For `OpImageRead` or `OpImageSparseRead`, if the image format supports VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT and the shader module declares the `StorageImageReadWithoutFormat` capability.

- For `OpImageRead`, if `Dim` is `SubpassData` (indicating a read from an input attachment).

The `Image` `Format` of an `OpTypeImage` declaration must not be Unknown, for variables which are used for `OpAtomic*` operations.

Variables identified with the `Uniform` storage class are used to access transparent buffer backed resources. Such variables must be:

- typed as `OpTypeStruct`, or an array of this type,

- identified with a `Block` or `BufferBlock` decoration, and

- laid out explicitly using the `Offset`, `ArrayStride`, and `MatrixStride` decorations as specified in Offset and Stride Assignment.

Variables identified with the `StorageBuffer` storage class are used to access transparent buffer backed resources. Such variables must be:

- typed as `OpTypeStruct`, or an array of this type,

- identified with a `Block` decoration, and

- laid out explicitly using the `Offset`, `ArrayStride`, and `MatrixStride` decorations as specified in Offset and Stride Assignment.

The `Offset` decoration for any member of a `Block`-decorated variable in the `Uniform` storage class must not cause the space required for that variable to extend outside the range [0, `maxUniformBufferRange`). The `Offset` decoration for any member of a `Block`-decorated variable in the `StorageBuffer` storage class must not cause the space required for that variable to extend outside the range [0, `maxStorageBufferRange`).

Variables identified with the `Uniform` storage class can also be used to access transparent descriptor set backed resources when the variable is assigned to a descriptor set layout binding with a `descriptorType` of VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK. In this case the variable must be typed as `OpTypeStruct` and cannot be aggregated into arrays of that type. Further, the `Offset` decoration for any member of such a variable must not cause the space required for that variable to extend outside the range [0,`maxInlineUniformBlockSize`).

Storage tile attachment and sampled tile attachment variables declared as described in the tile attachment interface are also managed by this interface. The requirements in this section for storage image variables also applies to storage tile attachment variables. The requirements in this section for sampled image variables also applies to sampled tile attachment variables. The requirements in this section for input attachment variables also applies to input tile attachment variables.

Variables identified with a storage class of `UniformConstant` and a decoration of `InputAttachmentIndex` must be declared as described in Fragment Input Attachment Interface.

SPIR-V variables decorated with a descriptor set and binding that identify a combined image sampler descriptor can have a type of `OpTypeImage`, `OpTypeSampler` (`Sampled`=1), or `OpTypeSampledImage`.

Note | When using descriptor heaps, there is no combined image sampler descriptor type, but shader variables of `OpTypeSampledImage` can be mapped to a separate image and sampler for compatibility.

When accessing a resource through such a variable, the resource must be selected via compile time constant expressions unless features are enabled to allow dynamically uniform or non-uniform expressions, as described below:

- Storage images (except storage texel buffers and input attachments):

  - Dynamically uniform: `shaderStorageImageArrayDynamicIndexing` and `StorageImageArrayDynamicIndexing`

  - Non-uniform: `shaderStorageImageArrayNonUniformIndexing` and `StorageImageArrayNonUniformIndexing`

- Storage texel buffers:

  - Dynamically uniform: `shaderStorageTexelBufferArrayDynamicIndexing` and `StorageTexelBufferArrayDynamicIndexing`

  - Non-uniform: `shaderStorageTexelBufferArrayNonUniformIndexing` and `StorageTexelBufferArrayNonUniformIndexing`

- Input attachments:

  - Dynamically uniform: `shaderInputAttachmentArrayDynamicIndexing` and `InputAttachmentArrayDynamicIndexing`

  - Non-uniform: `shaderInputAttachmentArrayNonUniformIndexing` and `InputAttachmentArrayNonUniformIndexing`

- Sampled images (except uniform texel buffers), samplers and combined image samplers:

  - Dynamically uniform: `shaderSampledImageArrayDynamicIndexing` and `SampledImageArrayDynamicIndexing`

  - Non-uniform: `shaderSampledImageArrayNonUniformIndexing` and `SampledImageArrayNonUniformIndexing`

- Uniform texel buffers:

  - Dynamically uniform: `shaderUniformTexelBufferArrayDynamicIndexing` and `UniformTexelBufferArrayDynamicIndexing`

  - Non-uniform: `shaderUniformTexelBufferArrayNonUniformIndexing` and `UniformTexelBufferArrayNonUniformIndexing`

- Uniform buffers:

  - Dynamically uniform: `shaderUniformBufferArrayDynamicIndexing` and `UniformBufferArrayDynamicIndexing`

  - Non-uniform: `shaderUniformBufferArrayNonUniformIndexing` and `UniformBufferArrayNonUniformIndexing`

- Storage buffers:

  - Dynamically uniform: `shaderStorageBufferArrayDynamicIndexing` and `StorageBufferArrayDynamicIndexing`

  - Non-uniform: `shaderStorageBufferArrayNonUniformIndexing` and `StorageBufferArrayNonUniformIndexing`

- Acceleration structures:

  - Dynamically uniform: Always supported.

  - Non-uniform: Always supported.

- weight image:

  - Dynamically uniform: Always supported.

  - Non-uniform: Never supported.

- Block matching image:

  - Dynamically uniform: Always supported.

  - Non-uniform: Never supported.

- Storage tensors:

  - Dynamically uniform: `shaderStorageTensorArrayDynamicIndexing` and `StorageTensorArrayDynamicIndexingARM`

  - Non-uniform: `shaderStorageTensorArrayNonUniformIndexing` and `StorageTensorArrayNonUniformIndexingARM`

Note | Implementations must take care when implementing this if subgroups are not necessarily a subset of the invocation group for their hardware (e.g. if multiple draw calls are packed together). If such an implementation needs uniformity across the subgroup for any resource access, the implementation is responsible for ensuring that indices that are only dynamically uniform across the invocation group still function as expected if they advertise the respective feature.

A combined image sampler in an array that enables sampler Y′CBCR conversion or samples a subsampled image must only be indexed by constant integral expressions.

Table 25. Shader Resource and Descriptor Type Correspondence
Resource type | Descriptor Type
--- | ---
sampler | VK_DESCRIPTOR_TYPE_SAMPLER or VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER
sampled image | VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE or VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER
storage image | VK_DESCRIPTOR_TYPE_STORAGE_IMAGE
combined image sampler | VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER or both VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE and VK_DESCRIPTOR_TYPE_SAMPLER when using heaps
uniform texel buffer | VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER
storage texel buffer | VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER
uniform buffer | VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER or VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC
storage buffer | VK_DESCRIPTOR_TYPE_STORAGE_BUFFER or VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC
input attachment | VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT
inline uniform block | VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK
acceleration structure | VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR or VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV
weight image | VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM
block matching image | VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM
storage tensor | VK_DESCRIPTOR_TYPE_TENSOR_ARM

Table 26. Shader Resource and Storage Class Correspondence
Resource type | Storage Class | Type1 | Decoration(s)2
--- | --- | --- | ---
sampler | `UniformConstant` | `OpTypeSampler` |
sampled image | `UniformConstant` or `TileAttachmentQCOM` | `OpTypeImage` (`Sampled`=1) |
storage image | `UniformConstant` or `TileAttachmentQCOM` | `OpTypeImage` (`Sampled`=2) |
combined image sampler | `UniformConstant` or `TileAttachmentQCOM` | `OpTypeSampledImage` `OpTypeImage` (`Sampled`=1) `OpTypeSampler` |
uniform texel buffer | `UniformConstant` | `OpTypeImage` (`Dim`=`Buffer`, `Sampled`=1) |
storage texel buffer | `UniformConstant` | `OpTypeImage` (`Dim`=`Buffer`, `Sampled`=2) |
uniform buffer | `Uniform` | `OpTypeStruct` | `Block`, `Offset`, (`ArrayStride`), (`MatrixStride`)
storage buffer | `Uniform` | `OpTypeStruct` | `BufferBlock`, `Offset`, (`ArrayStride`), (`MatrixStride`)
`StorageBuffer` | `Block`, `Offset`, (`ArrayStride`), (`MatrixStride`)
input attachment | `UniformConstant` or `TileAttachmentQCOM` | `OpTypeImage` (`Dim`=`SubpassData`, `Sampled`=2) | `InputAttachmentIndex`
inline uniform block | `Uniform` | `OpTypeStruct` | `Block`, `Offset`, (`ArrayStride`), (`MatrixStride`)
acceleration structure | `UniformConstant` | `OpTypeAccelerationStructureKHR` |
sample weight image | `UniformConstant` or `TileAttachmentQCOM` | `OpTypeImage` (`Depth`=0, `Dim`=`2D`, `Arrayed`=1, `MS`=0, `Sampled`=1) | `WeightTextureQCOM`
block matching image | `UniformConstant` or `TileAttachmentQCOM` | `OpTypeImage` (`Depth`=0, `Dim`=`2D`, `Arrayed`=0, `MS`=0, `Sampled`=1) | `BlockMatchTextureQCOM`
storage tensor | `UniformConstant` | `OpTypeTensorARM` |

1

  Where `OpTypeImage` is referenced, the `Dim` values `Buffer` and `Subpassdata` are only accepted where they are specifically referenced. They do not correspond to resource types where a generic `OpTypeImage` is specified.

2

  In addition to `DescriptorSet` and `Binding`.

#### 19.9.4. DescriptorSet and Binding Assignment

A variable decorated with a `DescriptorSet` decoration of s and a `Binding` decoration of b indicates that this variable is associated with the VkDescriptorSetLayoutBinding that has a `binding` equal to b in `pSetLayouts`[s] that was specified in VkPipelineLayoutCreateInfo. If using descriptor heaps, such a variable will instead be associated with a shader binding.

If not using descriptor heaps, `DescriptorSet` decoration values must be between zero and `maxBoundDescriptorSets` minus one, inclusive. If a pipeline is created with VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT, or a shader is created with VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT, `DescriptorSet` decorations can be any 32-bit unsigned integer value. `Binding` decoration values can be any 32-bit unsigned integer value. Each descriptor set has its own binding name space.

If the `Binding` decoration is used with an array, the entire array is assigned that binding value. The decorated array must have an `Element` `Type` corresponding to a descriptor type, and the size of the array must be no larger than the number of descriptors in the binding. If the array is runtime-sized, then array elements greater than or equal to the size of that binding in the bound descriptor set must not be used. If the array is runtime-sized, the `runtimeDescriptorArray` feature must be enabled and the `RuntimeDescriptorArray` capability must be declared. The index of each element of the array is referred to as the arrayElement. For the purposes of interface matching and descriptor set operations, if a resource variable is not an array, it is treated as if it has an arrayElement of zero.

Note | Even though an array is assigned to a single `Binding`, when using descriptor heap mappings, each element will be assigned a consecutive offset according to the stride for that type. Applications should take care to set subsequent bindings with this in mind to avoid unintentional overlap.

There is a limit on the number of resources of each type that can be accessed by a pipeline stage as shown in Shader Resource Limits. The “Resources Per Stage” column gives the limit on the number each type of resource that can be statically used for an entry point in any given stage in a pipeline. The “Resource Types” column lists which resource types are counted against the limit. Some resource types count against multiple limits. The VK_DESCRIPTOR_TYPE_MUTABLE_EXT descriptor type counts as one individual resource and one for every unique resource limit per descriptor set type that is present in the associated binding’s VkMutableDescriptorTypeListEXT. If multiple descriptor types in VkMutableDescriptorTypeListEXT map to the same resource limit, only one descriptor is consumed for purposes of computing resource limits. These limits only apply to resources accessed with `DescriptorSet` and `Binding` values.

A pipeline layout may include descriptor sets and bindings which are not referenced by any variables statically used by the entry points for the shader stages in the binding’s `stageFlags`. Similarly, descriptor heap bindings may include mappings that are unused by the shader.

However, if a variable assigned to a given `DescriptorSet` and `Binding` is statically used by the entry point for a shader stage, the heap bindings must specify a mapping for it when using heaps, or the pipeline layout must contain a descriptor set layout binding in that descriptor set layout and for that binding number, and that binding’s `stageFlags` must include the appropriate VkShaderStageFlagBits for that stage. The variable must be of a valid resource type determined by its SPIR-V type and storage class, as defined in Shader Resource and Storage Class Correspondence. The descriptor set layout binding must be of a corresponding descriptor type, as defined in Shader Resource and Descriptor Type Correspondence.

Note | There are no limits on the number of shader variables that can have overlapping set and binding values in a shader; but which resources are statically used has an impact. If any shader variable identifying a resource is statically used in a shader, then the underlying descriptor bound at the declared set and binding must support the declared type in the shader when the shader executes. If multiple shader variables are declared with the same set and binding values, and with the same underlying descriptor type, they can all be statically used within the same shader. However, accesses are not automatically synchronized, and `Aliased` decorations should be used to avoid data hazards (see section 2.18.2 Aliasing in the SPIR-V specification). If multiple shader variables with the same set and binding values are declared in a single shader, but with different declared types, where any of those are not supported by the relevant bound descriptor, that shader can only be executed if the variables with the unsupported type are not statically used. A noteworthy example of using multiple statically-used shader variables sharing the same descriptor set and binding values is a descriptor of type VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER that has multiple corresponding shader variables in the `UniformConstant` storage class, where some could be `OpTypeImage` (`Sampled`=1), some could be `OpTypeSampler`, and some could be `OpTypeSampledImage`.

Table 27. Shader Resource Limits
Resources per Stage | Resource Types
--- | ---
`maxPerStageDescriptorSamplers` or `maxPerStageDescriptorUpdateAfterBindSamplers` | sampler
combined image sampler
`maxPerStageDescriptorSampledImages` or `maxPerStageDescriptorUpdateAfterBindSampledImages` | sampled image
combined image sampler
uniform texel buffer
sample weight image
block matching image
`maxPerStageDescriptorStorageImages` or `maxPerStageDescriptorUpdateAfterBindStorageImages` | storage image
storage texel buffer
`maxPerStageDescriptorUniformBuffers` or `maxPerStageDescriptorUpdateAfterBindUniformBuffers` | uniform buffer
uniform buffer dynamic
`maxPerStageDescriptorStorageBuffers` or `maxPerStageDescriptorUpdateAfterBindStorageBuffers` | storage buffer
storage buffer dynamic
`maxPerStageDescriptorInputAttachments` or `maxPerStageDescriptorUpdateAfterBindInputAttachments` | input attachment1
`maxPerStageDescriptorInlineUniformBlocks` or `maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks` | inline uniform block
`VkPhysicalDeviceRayTracingPropertiesNV`::`maxDescriptorSetAccelerationStructures` or `maxPerStageDescriptorAccelerationStructures` or `maxPerStageDescriptorUpdateAfterBindAccelerationStructures` | acceleration structure

Note | Resources accessed directly through the descriptor heap interface do not count towards these limits.

1

  Input attachments can only be used in the fragment shader stage

#### 19.9.5. Offset and Stride Assignment

When a SPIR-V object is declared using an explicit layout, it must be laid out according to the following additional requirements.

Note | The numeric order of `Offset` decorations does not need to follow member declaration order.

Alignment Requirements

There are different alignment requirements depending on the specific resources and on the features enabled.

Matrix types are defined in terms of arrays as follows:

- A column-major matrix with C columns and R rows is equivalent to a C element array of vectors with R components.

- A row-major matrix with C columns and R rows is equivalent to an R element array of vectors with C components.

The scalar alignment of the type of an `OpTypeStruct` member is defined recursively as follows:

- A scalar of size N has a scalar alignment of N.

- A vector type has a scalar alignment equal to that of its component type.

- An array type has a scalar alignment equal to that of its element type.

- A structure has a scalar alignment equal to the largest scalar alignment of any of its members.

- A matrix type inherits scalar alignment from the equivalent array declaration.

- `OpTypeImage` has a scalar alignment equal to the value of `imageDescriptorAlignment`

- `OpTypeBufferEXT` has a scalar alignment equal to the value of `bufferDescriptorAlignment`

- `OpTypeSampler` has a scalar alignment equal to the value of `samplerDescriptorAlignment`

- `OpTypeTensorARM` has a scalar alignment equal to the value of `tensorDescriptorAlignment`

The aligned size of a `OpTypeImage`, `OpTypeBufferEXT`, or `OpTypeSampler` can be queried from within SPIR-V using `OpConstantSizeOfEXT`, which can be used with the `OffsetIdEXT` or `ArrayStrideIdEXT` decorations to lay out types in a descriptor heap. `OpConstantSizeOfEXT` returns the following for values for each type:

Table 28. Shader Descriptor Sizes
Type | Size
--- | ---
`OpTypeSampler` | `samplerDescriptorSize` aligned to `samplerDescriptorAlignment`
`OpTypeImage` | `imageDescriptorSize` aligned to `imageDescriptorAlignment`
`OpTypeBufferEXT` | `bufferDescriptorSize` aligned to `bufferDescriptorAlignment`
`OpTypeAccelerationStructureKHR` | `bufferDescriptorSize` aligned to `bufferDescriptorAlignment`

The base alignment of the type of an `OpTypeStruct` member is defined recursively as follows:

- A scalar has a base alignment equal to its scalar alignment.

- A two-component vector has a base alignment equal to twice its scalar alignment.

- A three- or four-component vector has a base alignment equal to four times its scalar alignment.

- An array has a base alignment equal to the base alignment of its element type.

- A structure has a base alignment equal to the largest base alignment of any of its members. An empty structure has a base alignment equal to the size of the smallest scalar type permitted by the capabilities declared in the SPIR-V module. (e.g., for a 1 byte aligned empty structure in the `StorageBuffer` storage class, `StorageBuffer8BitAccess` or `UniformAndStorageBuffer8BitAccess` must be declared in the SPIR-V module.)

- A matrix type inherits base alignment from the equivalent array declaration.

The extended alignment of the type of an `OpTypeStruct` member is similarly defined as follows:

- A scalar or vector type has an extended alignment equal to its base alignment.

- An array or structure type has an extended alignment equal to the largest extended alignment of any of its members, rounded up to a multiple of 16.

- A matrix type inherits extended alignment from the equivalent array declaration.

A member is defined to improperly straddle if either of the following are true:

- It is a vector with total size less than or equal to 16 bytes, and has `Offset` decorations placing its first byte at F and its last byte at L, where floor(F / 16) != floor(L / 16).

- It is a vector with total size greater than 16 bytes and has its `Offset` decorations placing its first byte at a non-integer multiple of 16.

Standard Buffer Layout

Every member of an `OpTypeStruct` that is required to be explicitly laid out must be aligned according to the first matching rule as follows. If the structure is contained in pointer types of multiple storage classes, it must satisfy the requirements for every storage class used to reference it.

1. If the `scalarBlockLayout` feature is enabled and the storage class is `Uniform`, `StorageBuffer`, `PhysicalStorageBuffer`, `ShaderRecordBufferKHR`, or `PushConstant`, or the storage class is `UniformConstant` and the type is decorated with either `SamplerHeapEXT` or `ResourceHeapEXT`, then every member must be aligned according to its scalar alignment.

2. If the `workgroupMemoryExplicitLayoutScalarBlockLayout` feature is enabled and the storage class is `Workgroup` then every member must be aligned according to its scalar alignment.

3. All vectors must be aligned according to their scalar alignment.

4. If the `uniformBufferStandardLayout` feature is not enabled, then any member of an `OpTypeStruct` with a storage class of `Uniform` and a decoration of `Block` must be aligned according to its extended alignment.

5. Every other member must be aligned according to its base alignment.

Note | Even if scalar alignment is supported, it is generally more performant to use the base alignment.

The memory layout must obey the following rules:

- The `Offset` or `OffsetIdEXT` decoration of any member must be a multiple of its alignment.

- Any `ArrayStride`, or `ArrayStrideIdEXT`, or `MatrixStride` decoration must be a multiple of the alignment of the array or matrix as defined above.

If one of the conditions below applies

- The storage class is `Uniform`, `StorageBuffer`, `PhysicalStorageBuffer`, `ShaderRecordBufferKHR`, or `PushConstant`, and the `scalarBlockLayout` feature is not enabled.

- The storage class is `Workgroup`, and either the structure member is not part of a `Block` or the `workgroupMemoryExplicitLayoutScalarBlockLayout` feature is not enabled.

- The storage class is any other storage class.

the memory layout must also obey the following rules:

- Vectors must not improperly straddle, as defined above.

- The `Offset` decoration of a member must not place it between the end of a structure, an array, or a matrix and the next multiple of the alignment of that structure, array, or matrix.

Note | The std430 layout in GLSL satisfies these rules for types using the base alignment. The std140 layout satisfies the rules for types using the extended alignment.

Note | An alternate explanation of the shader memory requirements, discussing the underlying extensions and core versions which affect them, is found in the Vulkan Guide.

### 19.10. Built-In Variables

Built-in variables are accessed in shaders by declaring a variable decorated with a `BuiltIn` SPIR-V decoration. The meaning of each `BuiltIn` decoration is as follows. In the remainder of this section, the name of a built-in is used interchangeably with a term equivalent to a variable decorated with that particular built-in. Built-ins that represent integer values can be declared as either signed or unsigned 32-bit integers.

As mentioned above, some inputs and outputs have an additional level of arrayness relative to other shader inputs and outputs. This level of arrayness is not included in the type descriptions below, but must be included when declaring the built-in.

Any two variables declared in the `Input` storage class listed as operands on the same `OpEntryPoint` must not have the same `BuiltIn` decoration. Any two variables declared in the `Output` storage class listed as operands on the same `OpEntryPoint` must not have the same `BuiltIn` decoration.

Built-in values for descriptor heaps are listed in the descriptor heap chapter:

- [SamplerHeapEXT]

- [ResourceHeapEXT]

Types used to access these built-ins must be laid out explicitly using the `Offset`, `OffsetIdEXT`, `ArrayStride`, `ArrayStrideIdEXT`, and `MatrixStride` decorations as specified in Offset and Stride Assignment.

`BaryCoordKHR`

  The `BaryCoordKHR` decoration can be used to decorate a fragment shader input variable. This variable will contain a three-component floating-point vector with barycentric weights that indicate the location of the fragment relative to the screen-space locations of vertices of its primitive, obtained using perspective interpolation.

Valid Usage

- VUID-BaryCoordKHR-BaryCoordKHR-04154
  The `BaryCoordKHR` decoration must be used only within the `Fragment` `Execution` `Model`

- VUID-BaryCoordKHR-BaryCoordKHR-04155
  The variable decorated with `BaryCoordKHR` must be declared using the `Input` `Storage` `Class`

- VUID-BaryCoordKHR-BaryCoordKHR-04156
  The variable decorated with `BaryCoordKHR` must be declared as a three-component vector of 32-bit floating-point values

`BaryCoordNoPerspAMD`

  The `BaryCoordNoPerspAMD` decoration can be used to decorate a fragment shader input variable. This variable will contain the (I,J) pair of the barycentric coordinates corresponding to the fragment evaluated using linear interpolation at the fragment’s center. The K coordinate of the barycentric coordinates can be derived given the identity I + J + K = 1.0.

Valid Usage

- VUID-BaryCoordNoPerspAMD-BaryCoordNoPerspAMD-04157
  The `BaryCoordNoPerspAMD` decoration must be used only within the `Fragment` `Execution` `Model`

- VUID-BaryCoordNoPerspAMD-BaryCoordNoPerspAMD-04158
  The variable decorated with `BaryCoordNoPerspAMD` must be declared using the `Input` `Storage` `Class`

- VUID-BaryCoordNoPerspAMD-BaryCoordNoPerspAMD-04159
  The variable decorated with `BaryCoordNoPerspAMD` must be declared as a two-component vector of 32-bit floating-point values

`BaryCoordNoPerspKHR`

  The `BaryCoordNoPerspKHR` decoration can be used to decorate a fragment shader input variable. This variable will contain a three-component floating-point vector with barycentric weights that indicate the location of the fragment relative to the screen-space locations of vertices of its primitive, obtained using linear interpolation.

Valid Usage

- VUID-BaryCoordNoPerspKHR-BaryCoordNoPerspKHR-04160
  The `BaryCoordNoPerspKHR` decoration must be used only within the `Fragment` `Execution` `Model`

- VUID-BaryCoordNoPerspKHR-BaryCoordNoPerspKHR-04161
  The variable decorated with `BaryCoordNoPerspKHR` must be declared using the `Input` `Storage` `Class`

- VUID-BaryCoordNoPerspKHR-BaryCoordNoPerspKHR-04162
  The variable decorated with `BaryCoordNoPerspKHR` must be declared as a three-component vector of 32-bit floating-point values

`BaryCoordNoPerspCentroidAMD`

  The `BaryCoordNoPerspCentroidAMD` decoration can be used to decorate a fragment shader input variable. This variable will contain the (I,J) pair of the barycentric coordinates corresponding to the fragment evaluated using linear interpolation at the centroid. The K coordinate of the barycentric coordinates can be derived given the identity I + J + K = 1.0.

Valid Usage

- VUID-BaryCoordNoPerspCentroidAMD-BaryCoordNoPerspCentroidAMD-04163
  The `BaryCoordNoPerspCentroidAMD` decoration must be used only within the `Fragment` `Execution` `Model`

- VUID-BaryCoordNoPerspCentroidAMD-BaryCoordNoPerspCentroidAMD-04164
  The variable decorated with `BaryCoordNoPerspCentroidAMD` must be declared using the `Input` `Storage` `Class`

- VUID-BaryCoordNoPerspCentroidAMD-BaryCoordNoPerspCentroidAMD-04165
  The variable decorated with `BaryCoordNoPerspCentroidAMD` must be declared as a three-component vector of 32-bit floating-point values

`BaryCoordNoPerspSampleAMD`

  The `BaryCoordNoPerspSampleAMD` decoration can be used to decorate a fragment shader input variable. This variable will contain the (I,J) pair of the barycentric coordinates corresponding to the fragment evaluated using linear interpolation at each covered sample. The K coordinate of the barycentric coordinates can be derived given the identity I + J + K = 1.0.

Valid Usage

- VUID-BaryCoordNoPerspSampleAMD-BaryCoordNoPerspSampleAMD-04166
  The `BaryCoordNoPerspSampleAMD` decoration must be used only within the `Fragment` `Execution` `Model`

- VUID-BaryCoordNoPerspSampleAMD-BaryCoordNoPerspSampleAMD-04167
  The variable decorated with `BaryCoordNoPerspSampleAMD` must be declared using the `Input` `Storage` `Class`

- VUID-BaryCoordNoPerspSampleAMD-BaryCoordNoPerspSampleAMD-04168
  The variable decorated with `BaryCoordNoPerspSampleAMD` must be declared as a two-component vector of 32-bit floating-point values

`BaryCoordPullModelAMD`

  The `BaryCoordPullModelAMD` decoration can be used to decorate a fragment shader input variable. This variable will contain (1/W, 1/I, 1/J) evaluated at the fragment center and can be used to calculate gradients and then interpolate I, J, and W at any desired sample location.

Valid Usage

- VUID-BaryCoordPullModelAMD-BaryCoordPullModelAMD-04169
  The `BaryCoordPullModelAMD` decoration must be used only within the `Fragment` `Execution` `Model`

- VUID-BaryCoordPullModelAMD-BaryCoordPullModelAMD-04170
  The variable decorated with `BaryCoordPullModelAMD` must be declared using the `Input` `Storage` `Class`

- VUID-BaryCoordPullModelAMD-BaryCoordPullModelAMD-04171
  The variable decorated with `BaryCoordPullModelAMD` must be declared as a three-component vector of 32-bit floating-point values

`BaryCoordSmoothAMD`

  The `BaryCoordSmoothAMD` decoration can be used to decorate a fragment shader input variable. This variable will contain the (I,J) pair of the barycentric coordinates corresponding to the fragment evaluated using perspective interpolation at the fragment’s center. The K coordinate of the barycentric coordinates can be derived given the identity I + J + K = 1.0.

Valid Usage

- VUID-BaryCoordSmoothAMD-BaryCoordSmoothAMD-04172
  The `BaryCoordSmoothAMD` decoration must be used only within the `Fragment` `Execution` `Model`

- VUID-BaryCoordSmoothAMD-BaryCoordSmoothAMD-04173
  The variable decorated with `BaryCoordSmoothAMD` must be declared using the `Input` `Storage` `Class`

- VUID-BaryCoordSmoothAMD-BaryCoordSmoothAMD-04174
  The variable decorated with `BaryCoordSmoothAMD` must be declared as a two-component vector of 32-bit floating-point values

`BaryCoordSmoothCentroidAMD`

  The `BaryCoordSmoothCentroidAMD` decoration can be used to decorate a fragment shader input variable. This variable will contain the (I,J) pair of the barycentric coordinates corresponding to the fragment evaluated using perspective interpolation at the centroid. The K coordinate of the barycentric coordinates can be derived given the identity I + J + K = 1.0.

Valid Usage

- VUID-BaryCoordSmoothCentroidAMD-BaryCoordSmoothCentroidAMD-04175
  The `BaryCoordSmoothCentroidAMD` decoration must be used only within the `Fragment` `Execution` `Model`

- VUID-BaryCoordSmoothCentroidAMD-BaryCoordSmoothCentroidAMD-04176
  The variable decorated with `BaryCoordSmoothCentroidAMD` must be declared using the `Input` `Storage` `Class`

- VUID-BaryCoordSmoothCentroidAMD-BaryCoordSmoothCentroidAMD-04177
  The variable decorated with `BaryCoordSmoothCentroidAMD` must be declared as a two-component vector of 32-bit floating-point values

`BaryCoordSmoothSampleAMD`

  The `BaryCoordSmoothSampleAMD` decoration can be used to decorate a fragment shader input variable. This variable will contain the (I,J) pair of the barycentric coordinates corresponding to the fragment evaluated using perspective interpolation at each covered sample. The K coordinate of the barycentric coordinates can be derived given the identity I + J + K = 1.0.

Valid Usage

- VUID-BaryCoordSmoothSampleAMD-BaryCoordSmoothSampleAMD-04178
  The `BaryCoordSmoothSampleAMD` decoration must be used only within the `Fragment` `Execution` `Model`

- VUID-BaryCoordSmoothSampleAMD-BaryCoordSmoothSampleAMD-04179
  The variable decorated with `BaryCoordSmoothSampleAMD` must be declared using the `Input` `Storage` `Class`

- VUID-BaryCoordSmoothSampleAMD-BaryCoordSmoothSampleAMD-04180
  The variable decorated with `BaryCoordSmoothSampleAMD` must be declared as a two-component vector of 32-bit floating-point values

`BaseInstance`

  Decorating a variable with the `BaseInstance` built-in will make that variable contain the integer value corresponding to the first instance that was passed to the command that invoked the current vertex shader invocation. `BaseInstance` is the `firstInstance` parameter to a direct drawing command or the `firstInstance` member of a structure consumed by an indirect drawing command.

Valid Usage

- VUID-BaseInstance-BaseInstance-04181
  The `BaseInstance` decoration must be used only within the `Vertex` `Execution` `Model`

- VUID-BaseInstance-BaseInstance-04182
  The variable decorated with `BaseInstance` must be declared using the `Input` `Storage` `Class`

- VUID-BaseInstance-BaseInstance-04183
  The variable decorated with `BaseInstance` must be declared as a scalar 32-bit integer value

`BaseVertex`

  Decorating a variable with the `BaseVertex` built-in will make that variable contain the integer value corresponding to the first vertex or vertex offset that was passed to the command that invoked the current vertex shader invocation. For non-indexed drawing commands, this variable is the `firstVertex` parameter to a direct drawing command or the `firstVertex` member of the structure consumed by an indirect drawing command. For indexed drawing commands, this variable is the `vertexOffset` parameter to a direct drawing command or the `vertexOffset` member of the structure consumed by an indirect drawing command.

Valid Usage

- VUID-BaseVertex-BaseVertex-04184
  The `BaseVertex` decoration must be used only within the `Vertex` `Execution` `Model`

- VUID-BaseVertex-BaseVertex-04185
  The variable decorated with `BaseVertex` must be declared using the `Input` `Storage` `Class`

- VUID-BaseVertex-BaseVertex-04186
  The variable decorated with `BaseVertex` must be declared as a scalar 32-bit integer value

`ClipDistance`

  Decorating a variable with the `ClipDistance` built-in decoration will make that variable contain the mechanism for controlling user clipping. `ClipDistance` is an array such that the ith element of the array specifies the clip distance for plane i. A clip distance of 0 means the vertex is on the plane, a positive distance means the vertex is inside the clip half-space, and a negative distance means the vertex is outside the clip half-space.

Note | The array variable decorated with `ClipDistance` is explicitly sized by the shader.

Note | In the last pre-rasterization shader stage, these values will be linearly interpolated across the primitive and the portion of the primitive with interpolated distances less than 0 will be considered outside the clip volume. If `ClipDistance` is then used by a fragment shader, `ClipDistance` contains these linearly interpolated values.

Valid Usage

- VUID-ClipDistance-ClipDistance-04187
  The `ClipDistance` decoration must be used only within the `MeshEXT`, `MeshNV`, `Vertex`, `Fragment`, `TessellationControl`, `TessellationEvaluation`, or `Geometry` `Execution` `Model`

- VUID-ClipDistance-ClipDistance-04188
  The variable decorated with `ClipDistance` within the `MeshEXT`, `MeshNV`, or `Vertex` `Execution` `Model` must be declared using the `Output` `Storage` `Class`

- VUID-ClipDistance-ClipDistance-04189
  The variable decorated with `ClipDistance` within the `Fragment` `Execution` `Model` must be declared using the `Input` `Storage` `Class`

- VUID-ClipDistance-ClipDistance-04190
  The variable decorated with `ClipDistance` within the `TessellationControl`, `TessellationEvaluation`, or `Geometry` `Execution` `Model` must not be declared in a `Storage` `Class` other than `Input` or `Output`

- VUID-ClipDistance-ClipDistance-04191
  The variable decorated with `ClipDistance` must be declared as an array of 32-bit floating-point values

`ClipDistancePerViewNV`

  Decorating a variable with the `ClipDistancePerViewNV` built-in decoration will make that variable contain the per-view clip distances. The per-view clip distances have the same semantics as `ClipDistance`.

Valid Usage

- VUID-ClipDistancePerViewNV-ClipDistancePerViewNV-04192
  The `ClipDistancePerViewNV` decoration must be used only within the `MeshNV` `Execution` `Model`

- VUID-ClipDistancePerViewNV-ClipDistancePerViewNV-04193
  The variable decorated with `ClipDistancePerViewNV` must be declared using the `Output` `Storage` `Class`

- VUID-ClipDistancePerViewNV-ClipDistancePerViewNV-04194
  The variable decorated with `ClipDistancePerViewNV` must also be decorated with the `PerViewNV` decoration

- VUID-ClipDistancePerViewNV-ClipDistancePerViewNV-04195
  The variable decorated with `ClipDistancePerViewNV` must be declared as a two-dimensional array of 32-bit floating-point values

`ClusterIDHUAWEI`

  The `ClusterIDHUAWEI` decoration can be used to decorate a cluster culling shader output variable,this variable will contain an integer value that specifies the id of cluster being rendered by this drawing command. When Cluster Culling Shader enable, `ClusterIDHUAWEI` will replace gl_DrawID pass to vertex shader for cluster-related information fetching.

Valid Usage

- VUID-ClusterIDHUAWEI-ClusterIDHUAWEI-07797
  The `ClusterIDHUAWEI` decoration must be used only within the `ClusterCullingHUAWEI` `Execution` `Model`

- VUID-ClusterIDHUAWEI-ClusterIDHUAWEI-07798
  The variable decorated with `ClusterIDHUAWEI` must be declared as a scalar 32-bit integer value

`ClusterShadingRateHUAWEI`

  The `ClusterShadingRateHUAWEI` decoration can be used to decorate a cluster culling shader output variable. This variable will contain an integer value specifying the shading rate of a rendering cluster.

Valid Usage

- VUID-ClusterShadingRateHUAWEI-ClusterShadingRateHUAWEI-09448
  The `ClusterShadingRateHUAWEI` decoration must be used only within the `ClusterCullingHUAWEI` `Execution` `Model`

- VUID-ClusterShadingRateHUAWEI-ClusterShadingRateHUAWEI-09449
  The variable decorated with `ClusterShadingRateHUAWEI` must be declared as a scalar 32-bit integer value

`CullDistance`

  Decorating a variable with the `CullDistance` built-in decoration will make that variable contain the mechanism for controlling user culling. If any member of this array is assigned a negative value for all vertices belonging to a primitive, then the primitive is discarded before rasterization.

Note | In fragment shaders, the values of the `CullDistance` array are linearly interpolated across each primitive.

Note | If `CullDistance` decorates an input variable, that variable will contain the corresponding value from the `CullDistance` decorated output variable from the previous shader stage.

Valid Usage

- VUID-CullDistance-CullDistance-04196
  The `CullDistance` decoration must be used only within the `MeshEXT`, `MeshNV`, `Vertex`, `Fragment`, `TessellationControl`, `TessellationEvaluation`, or `Geometry` `Execution` `Model`

- VUID-CullDistance-CullDistance-04197
  The variable decorated with `CullDistance` within the `MeshEXT`, `MeshNV` or `Vertex` `Execution` `Model` must be declared using the `Output` `Storage` `Class`

- VUID-CullDistance-CullDistance-04198
  The variable decorated with `CullDistance` within the `Fragment` `Execution` `Model` must be declared using the `Input` `Storage` `Class`

- VUID-CullDistance-CullDistance-04199
  The variable decorated with `CullDistance` within the `TessellationControl`, `TessellationEvaluation`, or `Geometry` `Execution` `Model` must not be declared using a `Storage` `Class` other than `Input` or `Output`

- VUID-CullDistance-CullDistance-04200
  The variable decorated with `CullDistance` must be declared as an array of 32-bit floating-point values

`CullDistancePerViewNV`

  Decorating a variable with the `CullDistancePerViewNV` built-in decoration will make that variable contain the per-view cull distances. The per-view cull distances have the same semantics as `CullDistance`.

Valid Usage

- VUID-CullDistancePerViewNV-CullDistancePerViewNV-04201
  The `CullDistancePerViewNV` decoration must be used only within the `MeshNV` `Execution` `Model`

- VUID-CullDistancePerViewNV-CullDistancePerViewNV-04202
  The variable decorated with `CullDistancePerViewNV` must be declared using the `Output` `Storage` `Class`

- VUID-CullDistancePerViewNV-CullDistancePerViewNV-04203
  The variable decorated with `CullDistancePerViewNV` must also be decorated with the `PerViewNV` decoration

- VUID-CullDistancePerViewNV-CullDistancePerViewNV-04204
  The variable decorated with `CullDistancePerViewNV` must be declared as a two-dimensional array of 32-bit floating-point values

`CullPrimitiveEXT`

  Decorating a variable with the `CullPrimitiveEXT` built-in decoration will make that variable contain the culling state of output primitives. If the per-primitive boolean value is `true`, the primitive will be culled, if it is `false` it will not be culled.

Valid Usage

- VUID-CullPrimitiveEXT-CullPrimitiveEXT-07034
  The `CullPrimitiveEXT` decoration must be used only within the `MeshEXT` `Execution` `Model`

- VUID-CullPrimitiveEXT-CullPrimitiveEXT-07035
  The variable decorated with `CullPrimitiveEXT` must be declared using the `Output` `Storage` `Class`

- VUID-CullPrimitiveEXT-CullPrimitiveEXT-07036
  `CullPrimitiveEXT` must decorate a scalar boolean member of a structure decorated as `Block`, or decorate a variable of type `OpTypeArray` of boolean values

- VUID-CullPrimitiveEXT-CullPrimitiveEXT-10589
  If `CullPrimitiveEXT` is declared as an array of boolean values, the size of the array must match the value specified by `OutputPrimitivesEXT`

- VUID-CullPrimitiveEXT-CullPrimitiveEXT-10590
  If `CullPrimitiveEXT` decorates a member of a structure, the variable declaration of the containing `Block` type must have an array size that matches the value specified by `OutputPrimitivesEXT`

- VUID-CullPrimitiveEXT-CullPrimitiveEXT-10591
  There must be only one declaration of the `CullPrimitiveEXT` associated with a entry point’s interface

- VUID-CullPrimitiveEXT-CullPrimitiveEXT-07038
  The variable decorated with `CullPrimitiveEXT` within the `MeshEXT` `Execution` `Model` must also be decorated with the `PerPrimitiveEXT` decoration

`CullMaskKHR`

  A variable decorated with the `CullMaskKHR` decoration will specify the cull mask of the ray being processed. The value is given by the `Cull Mask` parameter passed into one of the `OpTrace*` instructions.

Valid Usage

- VUID-CullMaskKHR-CullMaskKHR-06735
  The `CullMaskKHR` decoration must be used only within the `IntersectionKHR`, `AnyHitKHR`, `ClosestHitKHR`, or `MissKHR` `Execution` `Model`

- VUID-CullMaskKHR-CullMaskKHR-06736
  The variable decorated with `CullMaskKHR` must be declared using the `Input` `Storage` `Class`

- VUID-CullMaskKHR-CullMaskKHR-06737
  The variable decorated with `CullMaskKHR` must be declared as a scalar 32-bit integer value

`CurrentRayTimeNV`

  A variable decorated with the `CurrentRayTimeNV` decoration contains the time value passed in to `OpTraceRayMotionNV` which called this shader.

Valid Usage

- VUID-CurrentRayTimeNV-CurrentRayTimeNV-04942
  The `CurrentRayTimeNV` decoration must be used only within the `IntersectionKHR`, `AnyHitKHR`, `ClosestHitKHR`, or `MissKHR` `Execution` `Model`

- VUID-CurrentRayTimeNV-CurrentRayTimeNV-04943
  The variable decorated with `CurrentRayTimeNV` must be declared using the `Input` `Storage` `Class`

- VUID-CurrentRayTimeNV-CurrentRayTimeNV-04944
  The variable decorated with `CurrentRayTimeNV` must be declared as a scalar 32-bit floating-point value

`DeviceIndex`

  The `DeviceIndex` decoration can be applied to a shader input which will be filled with the device index of the physical device that is executing the current shader invocation. This value will be in the range [0, max(1, physica l De v ice C ount)), where physicalDeviceCount is the `physicalDeviceCount` member of VkDeviceGroupDeviceCreateInfo.

Valid Usage

- VUID-DeviceIndex-DeviceIndex-04205
  The variable decorated with `DeviceIndex` must be declared using the `Input` `Storage` `Class`

- VUID-DeviceIndex-DeviceIndex-04206
  The variable decorated with `DeviceIndex` must be declared as a scalar 32-bit integer value

`DrawIndex`

  Decorating a variable with the `DrawIndex` built-in will make that variable contain the integer value corresponding to the zero-based index of the draw that invoked the current task, mesh, or vertex shader invocation. For indirect drawing commands, `DrawIndex` begins at zero and increments by one for each draw executed. The number of draws is given by the `drawCount` parameter. For direct drawing commands, if vkCmdDrawMultiEXT or vkCmdDrawMultiIndexedEXT is used, this variable contains the integer value corresponding to the zero-based index of the draw. Otherwise `DrawIndex` is always zero. `DrawIndex` is dynamically uniform.

When task or mesh shaders are used, only the first active stage will have proper access to the variable. The value read by other stages is poison.

Valid Usage

- VUID-DrawIndex-DrawIndex-04207
  The `DrawIndex` decoration must be used only within the `Vertex`, `MeshEXT`, `TaskEXT`, `MeshNV`, or `TaskNV` `Execution` `Model`

- VUID-DrawIndex-DrawIndex-04208
  The variable decorated with `DrawIndex` must be declared using the `Input` `Storage` `Class`

- VUID-DrawIndex-DrawIndex-04209
  The variable decorated with `DrawIndex` must be declared as a scalar 32-bit integer value

`FirstIndexHUAWEI`

  The `FirstIndexHUAWEI` decoration can be used to decorate a cluster culling shader output variable,this indexed mode specific variable will contain an integer value that specifies the base index within the index buffer corresponding to a cluster.

Valid Usage

- VUID-FirstIndexHUAWEI-FirstIndexHUAWEI-07799
  The `FirstIndexHUAWEI` decoration must be used only within the `ClusterCullingHUAWEI` `Execution` `Model`

- VUID-FirstIndexHUAWEI-FirstIndexHUAWEI-07800
  The variable decorated with `FirstIndexHUAWEI` must be declared as a scalar 32-bit integer value

`FragCoord`

  Decorating a variable with the `FragCoord` built-in decoration will make that variable contain the coordinates (x,y,z,1/w) of the fragment being processed.

  The (x,y) values are the framebuffer coordinates (xf,yf) of the fragment.

  When Sample Shading is enabled, the x and y components of `FragCoord` reflect the location of one of the samples corresponding to the shader invocation.

  Otherwise, the x and y components of `FragCoord` reflect the location of the center of the fragment.

  The z component of `FragCoord` is the interpolated depth value of the primitive.

  The w component is the interpolated w 1​.

  The `Centroid` interpolation decoration is ignored, but allowed, on `FragCoord`.

Valid Usage

- VUID-FragCoord-FragCoord-04210
  The `FragCoord` decoration must be used only within the `Fragment` `Execution` `Model`

- VUID-FragCoord-FragCoord-04211
  The variable decorated with `FragCoord` must be declared using the `Input` `Storage` `Class`

- VUID-FragCoord-FragCoord-04212
  The variable decorated with `FragCoord` must be declared as a four-component vector of 32-bit floating-point values

`FragDepth`

  To have a shader supply a fragment-depth value, the shader must declare the `DepthReplacing` execution mode. Such a shader’s fragment-depth value will come from the variable decorated with the `FragDepth` built-in decoration.

  This value will be used for any subsequent depth testing performed by the implementation or writes to the depth attachment. See fragment shader depth replacement for details.

Valid Usage

- VUID-FragDepth-FragDepth-04213
  The `FragDepth` decoration must be used only within the `Fragment` `Execution` `Model`

- VUID-FragDepth-FragDepth-04214
  The variable decorated with `FragDepth` must be declared using the `Output` `Storage` `Class`

- VUID-FragDepth-FragDepth-04215
  The variable decorated with `FragDepth` must be declared as a scalar 32-bit floating-point value

- VUID-FragDepth-FragDepth-04216
  If the shader dynamically writes to the variable decorated with `FragDepth`, the `DepthReplacing` `Execution` `Mode` must be declared

`FirstInstanceHUAWEI`

  The `FirstInstanceHUAWEI` decoration can be used to decorate a cluster culling shader output variable,this variable will contain an integer value that specifies the instance ID of the first instance to draw.

Valid Usage

- VUID-FirstInstanceHUAWEI-FirstInstanceHUAWEI-07801
  The `FirstInstanceHUAWEI` decoration must be used only within the `ClusterCullingHUAWEI` `Execution` `Model`

- VUID-FirstInstanceHUAWEI-FirstInstanceHUAWEI-07802
  The variable decorated with `FirstInstanceHUAWEI` must be declared as a scalar 32-bit integer value

`FirstVertexHUAWEI`

  The `FirstVertexHUAWEI` decoration can be used to decorate a cluster culling shader output variable,this non-indexed mode specific variable will contain an integer value that specifies the index of the first vertex in a cluster to draw.

Valid Usage

- VUID-FirstVertexHUAWEI-FirstVertexHUAWEI-07803
  The `FirstVertexHUAWEI` decoration must be used only within the `FirstVertexHUAWEI` `Execution` `Model`

- VUID-FirstVertexHUAWEI-FirstVertexHUAWEI-07804
  The variable decorated with `FirstVertexHUAWEI` must be declared as a scalar 32-bit integer value

`FragInvocationCountEXT`

  Decorating a variable with the `FragInvocationCountEXT` built-in decoration will make that variable contain the maximum number of fragment shader invocations for the fragment, as determined by `minSampleShading`.

  If Sample Shading is not enabled, `FragInvocationCountEXT` will be filled with a value of 1.

Valid Usage

- VUID-FragInvocationCountEXT-FragInvocationCountEXT-04217
  The `FragInvocationCountEXT` decoration must be used only within the `Fragment` `Execution` `Model`

- VUID-FragInvocationCountEXT-FragInvocationCountEXT-04218
  The variable decorated with `FragInvocationCountEXT` must be declared using the `Input` `Storage` `Class`

- VUID-FragInvocationCountEXT-FragInvocationCountEXT-04219
  The variable decorated with `FragInvocationCountEXT` must be declared as a scalar 32-bit integer value

`FragSizeEXT`

  Decorating a variable with the `FragSizeEXT` built-in decoration will make that variable contain the dimensions in pixels of the area that the fragment covers for that invocation.

  Note | When used in a custom resolve operation and the `customResolve` feature is enabled, the dimensions in pixels returned may be (1,1) if the fragment area was reduced.

  If fragment density map is not enabled, `FragSizeEXT` will be filled with a value of (1,1).

Valid Usage

- VUID-FragSizeEXT-FragSizeEXT-04220
  The `FragSizeEXT` decoration must be used only within the `Fragment` `Execution` `Model`

- VUID-FragSizeEXT-FragSizeEXT-04221
  The variable decorated with `FragSizeEXT` must be declared using the `Input` `Storage` `Class`

- VUID-FragSizeEXT-FragSizeEXT-04222
  The variable decorated with `FragSizeEXT` must be declared as a two-component vector of 32-bit integer values

`FragStencilRefEXT`

  Decorating a variable with the `FragStencilRefEXT` built-in decoration will make that variable contain the new stencil reference value for all samples covered by the fragment. This value will be used as the stencil reference value used in stencil testing.

  To write to `FragStencilRefEXT`, a shader must declare the `StencilRefReplacingEXT` execution mode. If a shader declares the `StencilRefReplacingEXT` execution mode and there is an execution path through the shader that does not set `FragStencilRefEXT`, then the fragment’s stencil reference value is undefined for executions of the shader that take that path.

  Only the least significant s bits of the integer value of the variable decorated with `FragStencilRefEXT` are considered for stencil testing, where s is the number of bits in the stencil framebuffer attachment, and higher order bits are discarded.

  See fragment shader stencil reference replacement for more details.

Valid Usage

- VUID-FragStencilRefEXT-FragStencilRefEXT-04223
  The `FragStencilRefEXT` decoration must be used only within the `Fragment` `Execution` `Model`

- VUID-FragStencilRefEXT-FragStencilRefEXT-04224
  The variable decorated with `FragStencilRefEXT` must be declared using the `Output` `Storage` `Class`

- VUID-FragStencilRefEXT-FragStencilRefEXT-04225
  The variable decorated with `FragStencilRefEXT` must be declared as a scalar integer value

`FragmentSizeNV`

  Decorating a variable with the `FragmentSizeNV` built-in decoration will make that variable contain the width and height of the fragment.

Valid Usage

- VUID-FragmentSizeNV-FragmentSizeNV-04226
  The `FragmentSizeNV` decoration must be used only within the `Fragment` `Execution` `Model`

- VUID-FragmentSizeNV-FragmentSizeNV-04227
  The variable decorated with `FragmentSizeNV` must be declared using the `Input` `Storage` `Class`

- VUID-FragmentSizeNV-FragmentSizeNV-04228
  The variable decorated with `FragmentSizeNV` must be declared as a two-component vector of 32-bit integer values

`FrontFacing`

  Decorating a variable with the `FrontFacing` built-in decoration will make that variable contain whether the fragment is front or back facing. This variable is non-zero if the current fragment is considered to be part of a front-facing polygon primitive or of a non-polygon primitive and is zero if the fragment is considered to be part of a back-facing polygon primitive.

Valid Usage

- VUID-FrontFacing-FrontFacing-04229
  The `FrontFacing` decoration must be used only within the `Fragment` `Execution` `Model`

- VUID-FrontFacing-FrontFacing-04230
  The variable decorated with `FrontFacing` must be declared using the `Input` `Storage` `Class`

- VUID-FrontFacing-FrontFacing-04231
  The variable decorated with `FrontFacing` must be declared as a boolean value

`FullyCoveredEXT`

  Decorating a variable with the `FullyCoveredEXT` built-in decoration will make that variable indicate whether the fragment area is fully covered by the generating primitive. This variable is non-zero if conservative rasterization is enabled and the current fragment area is fully covered by the generating primitive, and is zero if the fragment is not covered or partially covered, or conservative rasterization is disabled.

Valid Usage

- VUID-FullyCoveredEXT-FullyCoveredEXT-04232
  The `FullyCoveredEXT` decoration must be used only within the `Fragment` `Execution` `Model`

- VUID-FullyCoveredEXT-FullyCoveredEXT-04233
  The variable decorated with `FullyCoveredEXT` must be declared using the `Input` `Storage` `Class`

- VUID-FullyCoveredEXT-FullyCoveredEXT-04234
  The variable decorated with `FullyCoveredEXT` must be declared as a boolean value

- VUID-FullyCoveredEXT-conservativeRasterizationPostDepthCoverage-04235
  If `VkPhysicalDeviceConservativeRasterizationPropertiesEXT`::`conservativeRasterizationPostDepthCoverage` is not supported the `PostDepthCoverage` `Execution` `Mode` must not be declared, when a variable with the `FullyCoveredEXT` decoration is declared

`GlobalInvocationId`

  Decorating a variable with the `GlobalInvocationId` built-in decoration will make that variable contain the location of the current invocation within the global workgroup. Each component is equal to the index of the local workgroup multiplied by the size of the local workgroup plus `LocalInvocationId`.

Valid Usage

- VUID-GlobalInvocationId-GlobalInvocationId-04236
  The `GlobalInvocationId` decoration must be used only within the `GLCompute`, `MeshEXT`, `TaskEXT`, `MeshNV`, or `TaskNV` `Execution` `Model`

- VUID-GlobalInvocationId-GlobalInvocationId-04237
  The variable decorated with `GlobalInvocationId` must be declared using the `Input` `Storage` `Class`

- VUID-GlobalInvocationId-GlobalInvocationId-04238
  The variable decorated with `GlobalInvocationId` must be declared as a three-component vector of 32-bit integer values

`HelperInvocation`

  Decorating a variable with the `HelperInvocation` built-in decoration will make that variable contain whether the current invocation is a helper invocation. This variable is non-zero if the current fragment being shaded is a helper invocation and zero otherwise. A helper invocation is an invocation of the shader that is produced to satisfy internal requirements such as the generation of derivatives.

Note | It is very likely that a helper invocation will have a value of `SampleMask` fragment shader input value that is zero.

Valid Usage

- VUID-HelperInvocation-HelperInvocation-04239
  The `HelperInvocation` decoration must be used only within the `Fragment` `Execution` `Model`

- VUID-HelperInvocation-HelperInvocation-04240
  The variable decorated with `HelperInvocation` must be declared using the `Input` `Storage` `Class`

- VUID-HelperInvocation-HelperInvocation-04241
  The variable decorated with `HelperInvocation` must be declared as a boolean value

`HitKindKHR`

  A variable decorated with the `HitKindKHR` decoration will describe the intersection that triggered the execution of the current shader. The values are determined by the intersection shader. For user-defined intersection shaders this is the value that was passed to the “Hit Kind” operand of `OpReportIntersectionKHR`. For triangle intersection candidates, this will be one of `HitKindFrontFacingTriangleKHR` or `HitKindBackFacingTriangleKHR`.

Valid Usage

- VUID-HitKindKHR-HitKindKHR-04242
  The `HitKindKHR` decoration must be used only within the `AnyHitKHR` or `ClosestHitKHR` `Execution` `Model`

- VUID-HitKindKHR-HitKindKHR-04243
  The variable decorated with `HitKindKHR` must be declared using the `Input` `Storage` `Class`

- VUID-HitKindKHR-HitKindKHR-04244
  The variable decorated with `HitKindKHR` must be declared as a scalar 32-bit integer value

`HitTNV`

  A variable decorated with the `HitTNV` decoration is equivalent to a variable decorated with the `RayTmaxKHR` decoration.

Valid Usage

- VUID-HitTNV-HitTNV-04245
  The `HitTNV` decoration must be used only within the `AnyHitNV` or `ClosestHitNV` `Execution` `Model`

- VUID-HitTNV-HitTNV-04246
  The variable decorated with `HitTNV` must be declared using the `Input` `Storage` `Class`

- VUID-HitTNV-HitTNV-04247
  The variable decorated with `HitTNV` must be declared as a scalar 32-bit floating-point value

`HitTriangleVertexPositionsKHR`

  A variable decorated with the `HitTriangleVertexPositionsKHR` decoration will specify the object space vertices of the triangle at the current intersection in application-provided order. The positions returned are transformed by the geometry transform, which is performed at standard floating-point precision, but without a specifically defined order of floating-point operations to perform the matrix multiplication.

Valid Usage

- VUID-HitTriangleVertexPositionsKHR-HitTriangleVertexPositionsKHR-08747
  The `HitTriangleVertexPositionsKHR` decoration must be used only within the `AnyHitKHR` or `ClosestHitKHR` `Execution` `Model`

- VUID-HitTriangleVertexPositionsKHR-HitTriangleVertexPositionsKHR-08748
  The variable decorated with `HitTriangleVertexPositionsKHR` must be declared using the `Input` `Storage` `Class`

- VUID-HitTriangleVertexPositionsKHR-HitTriangleVertexPositionsKHR-08749
  The variable decorated with `HitTriangleVertexPositionsKHR` must be declared as an array of three vectors of three 32-bit float values

- VUID-HitTriangleVertexPositionsKHR-HitTriangleVertexPositionsKHR-08750
  The variable decorated with `HitTriangleVertexPositionsKHR` must be used only if the value of `HitKindKHR` is `HitKindFrontFacingTriangleKHR` or `HitKindBackFacingTriangleKHR`

- VUID-HitTriangleVertexPositionsKHR-None-08751
  The acceleration structure corresponding to the current intersection must have been built with VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DATA_ACCESS_BIT_KHR

`IncomingRayFlagsKHR`

  A variable with the `IncomingRayFlagsKHR` decoration will contain the ray flags passed in to the trace call that invoked this particular shader. Setting pipeline flags on the ray tracing pipeline must not cause any corresponding flags to be set in variables with this decoration.

Valid Usage

- VUID-IncomingRayFlagsKHR-IncomingRayFlagsKHR-04248
  The `IncomingRayFlagsKHR` decoration must be used only within the `IntersectionKHR`, `AnyHitKHR`, `ClosestHitKHR`, or `MissKHR` `Execution` `Model`

- VUID-IncomingRayFlagsKHR-IncomingRayFlagsKHR-04249
  The variable decorated with `IncomingRayFlagsKHR` must be declared using the `Input` `Storage` `Class`

- VUID-IncomingRayFlagsKHR-IncomingRayFlagsKHR-04250
  The variable decorated with `IncomingRayFlagsKHR` must be declared as a scalar 32-bit integer value

`IndexCountHUAWEI`

  The `IndexCountHUAWEI` decoration can be used to decorate a cluster culling shader output variable,this indexed mode specific variable will contain an integer value that specifies the number of indexed vertices in a cluster to draw.

Valid Usage

- VUID-IndexCountHUAWEI-IndexCountHUAWEI-07805
  The `IndexCountHUAWEI` decoration must be used only within the `ClusterCullingHUAWEI` `Execution` `Model`

- VUID-IndexCountHUAWEI-IndexCountHUAWEI-07806
  The variable decorated with `IndexCountHUAWEI` must be declared as a scalar 32-bit integer value

`InstanceCountHUAWEI`

  The `InstanceCountHUAWEI` decoration can be used to decorate a cluster culling shader output variable,this variable will contain an integer value that specifies the number of instance to draw in a cluster.

Valid Usage

- VUID-InstanceCountHUAWEI-InstanceCountHUAWEI-07807
  The `InstanceCountHUAWEI` decoration must be used only within the `ClusterCullingHUAWEI` `Execution` `Model`

- VUID-InstanceCountHUAWEI-InstanceCountHUAWEI-07808
  The variable decorated with `InstanceCountHUAWEI` must be declared as a scalar 32-bit integer value

`InstanceCustomIndexKHR`

  A variable decorated with the `InstanceCustomIndexKHR` decoration will contain the application-defined value of the instance that intersects the current ray. This variable contains the value that was specified in VkAccelerationStructureInstanceKHR::`instanceCustomIndex` for the current acceleration structure instance in the lower 24 bits and the upper 8 bits will be zero.

Valid Usage

- VUID-InstanceCustomIndexKHR-InstanceCustomIndexKHR-04251
  The `InstanceCustomIndexKHR` decoration must be used only within the `IntersectionKHR`, `AnyHitKHR`, or `ClosestHitKHR` `Execution` `Model`

- VUID-InstanceCustomIndexKHR-InstanceCustomIndexKHR-04252
  The variable decorated with `InstanceCustomIndexKHR` must be declared using the `Input` `Storage` `Class`

- VUID-InstanceCustomIndexKHR-InstanceCustomIndexKHR-04253
  The variable decorated with `InstanceCustomIndexKHR` must be declared as a scalar 32-bit integer value

`InstanceId`

  Decorating a variable in an intersection, any-hit, or closest hit shader with the `InstanceId` decoration will make that variable contain the index of the instance that intersects the current ray.

Valid Usage

- VUID-InstanceId-InstanceId-04254
  The `InstanceId` decoration must be used only within the `IntersectionKHR`, `AnyHitKHR`, or `ClosestHitKHR` `Execution` `Model`

- VUID-InstanceId-InstanceId-04255
  The variable decorated with `InstanceId` must be declared using the `Input` `Storage` `Class`

- VUID-InstanceId-InstanceId-04256
  The variable decorated with `InstanceId` must be declared as a scalar 32-bit integer value

`InvocationId`

  Decorating a variable with the `InvocationId` built-in decoration will make that variable contain the index of the current shader invocation in a geometry shader, or the index of the output patch vertex in a tessellation control shader.

  In a geometry shader, the index of the current shader invocation ranges from zero to the number of instances declared in the shader minus one. If the instance count of the geometry shader is one or is not specified, then `InvocationId` will be zero.

Valid Usage

- VUID-InvocationId-InvocationId-04257
  The `InvocationId` decoration must be used only within the `TessellationControl` or `Geometry` `Execution` `Model`

- VUID-InvocationId-InvocationId-04258
  The variable decorated with `InvocationId` must be declared using the `Input` `Storage` `Class`

- VUID-InvocationId-InvocationId-04259
  The variable decorated with `InvocationId` must be declared as a scalar 32-bit integer value

`InvocationsPerPixelNV`

  Decorating a variable with the `InvocationsPerPixelNV` built-in decoration will make that variable contain the maximum number of fragment shader invocations per pixel, as derived from the effective shading rate for the fragment. If a primitive does not fully cover a pixel, the number of fragment shader invocations for that pixel may be less than the value of `InvocationsPerPixelNV`. If the shading rate indicates a fragment covering multiple pixels, then `InvocationsPerPixelNV` will be one.

Valid Usage

- VUID-InvocationsPerPixelNV-InvocationsPerPixelNV-04260
  The `InvocationsPerPixelNV` decoration must be used only within the `Fragment` `Execution` `Model`

- VUID-InvocationsPerPixelNV-InvocationsPerPixelNV-04261
  The variable decorated with `InvocationsPerPixelNV` must be declared using the `Input` `Storage` `Class`

- VUID-InvocationsPerPixelNV-InvocationsPerPixelNV-04262
  The variable decorated with `InvocationsPerPixelNV` must be declared as a scalar 32-bit integer value

`InstanceIndex`

  Decorating a variable in a vertex shader with the `InstanceIndex` built-in decoration will make that variable contain the index of the instance that is being processed by the current vertex shader invocation. `InstanceIndex` begins at the `firstInstance` parameter to vkCmdDraw or vkCmdDrawIndexed or at the `firstInstance` member of a structure consumed by vkCmdDrawIndirect or vkCmdDrawIndexedIndirect.

Valid Usage

- VUID-InstanceIndex-InstanceIndex-04263
  The `InstanceIndex` decoration must be used only within the `Vertex` `Execution` `Model`

- VUID-InstanceIndex-InstanceIndex-04264
  The variable decorated with `InstanceIndex` must be declared using the `Input` `Storage` `Class`

- VUID-InstanceIndex-InstanceIndex-04265
  The variable decorated with `InstanceIndex` must be declared as a scalar 32-bit integer value

`LaunchIdKHR`

  A variable decorated with the `LaunchIdKHR` decoration will specify the index of the work item being processed. One work item is generated for each of the `width` × `height` × `depth` items dispatched by a vkCmdTraceRaysKHR or vkCmdTraceRaysNV command. All shader invocations inherit the same value for variables decorated with `LaunchIdKHR`.

Valid Usage

- VUID-LaunchIdKHR-LaunchIdKHR-04266
  The `LaunchIdKHR` decoration must be used only within the `RayGenerationKHR`, `IntersectionKHR`, `AnyHitKHR`, `ClosestHitKHR`, `MissKHR`, or `CallableKHR` `Execution` `Model`

- VUID-LaunchIdKHR-LaunchIdKHR-04267
  The variable decorated with `LaunchIdKHR` must be declared using the `Input` `Storage` `Class`

- VUID-LaunchIdKHR-LaunchIdKHR-04268
  The variable decorated with `LaunchIdKHR` must be declared as a three-component vector of 32-bit integer values

`LaunchSizeKHR`

  A variable decorated with the `LaunchSizeKHR` decoration will contain the `width`, `height`, and `depth` dimensions passed to the vkCmdTraceRaysKHR or vkCmdTraceRaysNV command that initiated this shader execution. The `width` is in the first component, the `height` is in the second component, and the `depth` is in the third component.

Valid Usage

- VUID-LaunchSizeKHR-LaunchSizeKHR-04269
  The `LaunchSizeKHR` decoration must be used only within the `RayGenerationKHR`, `IntersectionKHR`, `AnyHitKHR`, `ClosestHitKHR`, `MissKHR`, or `CallableKHR` `Execution` `Model`

- VUID-LaunchSizeKHR-LaunchSizeKHR-04270
  The variable decorated with `LaunchSizeKHR` must be declared using the `Input` `Storage` `Class`

- VUID-LaunchSizeKHR-LaunchSizeKHR-04271
  The variable decorated with `LaunchSizeKHR` must be declared as a three-component vector of 32-bit integer values

`Layer`

  Decorating a variable with the `Layer` built-in decoration will make that variable contain the select layer of a multi-layer framebuffer attachment.

  In a mesh, vertex, tessellation evaluation, or geometry shader, any variable decorated with `Layer` can be written with the framebuffer layer index to which the primitive produced by that shader will be directed.

  The last active pre-rasterization shader stage (in pipeline order) controls the `Layer` that is used. Outputs in previous shader stages are not used, even if the last stage fails to write the `Layer`.

  If the last active pre-rasterization shader stage shader entry point’s interface does not include a variable decorated with `Layer`, then the first layer is used. If a pre-rasterization shader stage shader entry point’s interface includes a variable decorated with `Layer`, it must write the same value to `Layer` for all output vertices of a given primitive. If the `Layer` value is less than 0 or greater than or equal to the number of layers in the framebuffer, then primitives may still be rasterized, fragment shaders may be executed, and the framebuffer values for all layers are undefined. In a mesh shader this also applies when the `Layer` value is greater than or equal to the `maxMeshOutputLayers` limit.

  If a variable with the `Layer` decoration is also decorated with `ViewportRelativeNV`, then the `ViewportIndex` is added to the layer that is used for rendering and that is made available in the fragment shader.

  If the shader writes to a variable decorated `ViewportMaskNV`, then the layer selected has a different value for each viewport a primitive is rendered to.

  In a fragment shader, a variable decorated with `Layer` contains the layer index of the primitive that the fragment invocation belongs to.

Valid Usage

- VUID-Layer-Layer-04272
  The `Layer` decoration must be used only within the `MeshEXT`, `MeshNV`, `Vertex`, `TessellationEvaluation`, `Geometry`, or `Fragment` `Execution` `Model`

- VUID-Layer-Layer-04273
  If the `shaderOutputLayer` feature is not enabled then the `Layer` decoration must be used only within the `Geometry` or `Fragment` `Execution` `Model`

- VUID-Layer-Layer-04274
  The variable decorated with `Layer` within the `MeshEXT`, `MeshNV`, `Vertex`, `TessellationEvaluation`, or `Geometry` `Execution` `Model` must be declared using the `Output` `Storage` `Class`

- VUID-Layer-Layer-04275
  The variable decorated with `Layer` within the `Fragment` `Execution` `Model` must be declared using the `Input` `Storage` `Class`

- VUID-Layer-Layer-04276
  The variable decorated with `Layer` must be declared as a scalar 32-bit integer value for all supported execution models except `MeshEXT`

- VUID-Layer-Layer-07039
  The variable decorated with `Layer` within the `MeshEXT` `Execution` `Model` must also be decorated with the `PerPrimitiveEXT` decoration

- VUID-Layer-Layer-10592
  `Layer` within the `MeshEXT` `Execution` `Model` must decorate a scalar 32-bit integer member of a structure decorated as `Block`, or decorate a variable of type `OpTypeArray` of scalar 32-bit integer values

- VUID-Layer-Layer-10593
  If `Layer` is declared as an array of 32-bit integer values, within the `MeshEXT` `Execution` `Model`, size of the array must match the value specified by `OutputPrimitivesEXT`

- VUID-Layer-Layer-10594
  If `Layer` decorates a member of a structure, the variable declaration of the containing `Block` type must have an array size that matches the value specified by `OutputPrimitivesEXT`

`LayerPerViewNV`

  Decorating a variable with the `LayerPerViewNV` built-in decoration will make that variable contain the per-view layer information. The per-view layer has the same semantics as `Layer`, for each view.

Valid Usage

- VUID-LayerPerViewNV-LayerPerViewNV-04277
  The `LayerPerViewNV` decoration must be used only within the `MeshNV` `Execution` `Model`

- VUID-LayerPerViewNV-LayerPerViewNV-04278
  The variable decorated with `LayerPerViewNV` must be declared using the `Output` `Storage` `Class`

- VUID-LayerPerViewNV-LayerPerViewNV-04279
  The variable decorated with `LayerPerViewNV` must also be decorated with the `PerViewNV` decoration

- VUID-LayerPerViewNV-LayerPerViewNV-04280
  The variable decorated with `LayerPerViewNV` must be declared as an array of scalar 32-bit integer values

`LocalInvocationId`

  Decorating a variable with the `LocalInvocationId` built-in decoration will make that variable contain the location of the current cluster culling, task, mesh, or compute shader invocation within the local workgroup. Each component ranges from zero through to the size of the workgroup in that dimension minus one.

Note | If the size of the workgroup in a particular dimension is one, then the `LocalInvocationId` in that dimension will be zero. If the workgroup is effectively two-dimensional, then `LocalInvocationId.z` will be zero. If the workgroup is effectively one-dimensional, then both `LocalInvocationId.y` and `LocalInvocationId.z` will be zero.

Valid Usage

- VUID-LocalInvocationId-LocalInvocationId-04281
  The `LocalInvocationId` decoration must be used only within the `GLCompute`, `MeshEXT`, `TaskEXT`, `MeshNV`, or `TaskNV` `Execution` `Model`

- VUID-LocalInvocationId-LocalInvocationId-04282
  The variable decorated with `LocalInvocationId` must be declared using the `Input` `Storage` `Class`

- VUID-LocalInvocationId-LocalInvocationId-04283
  The variable decorated with `LocalInvocationId` must be declared as a three-component vector of 32-bit integer values

`LocalInvocationIndex`

  Decorating a variable with the `LocalInvocationIndex` built-in decoration will make that variable contain a one-dimensional representation of `LocalInvocationId`. This is computed as:

      LocalInvocationIndex =
          LocalInvocationId.z * WorkgroupSize.x * WorkgroupSize.y +
          LocalInvocationId.y * WorkgroupSize.x +
          LocalInvocationId.x;

Valid Usage

- VUID-LocalInvocationIndex-LocalInvocationIndex-04284
  The `LocalInvocationIndex` decoration must be used only within the `GLCompute`, `MeshEXT`, `TaskEXT`, `MeshNV`, or `TaskNV` `Execution` `Model`

- VUID-LocalInvocationIndex-LocalInvocationIndex-04285
  The variable decorated with `LocalInvocationIndex` must be declared using the `Input` `Storage` `Class`

- VUID-LocalInvocationIndex-LocalInvocationIndex-04286
  The variable decorated with `LocalInvocationIndex` must be declared as a scalar 32-bit integer value

`MeshViewCountNV`

  Decorating a variable with the `MeshViewCountNV` built-in decoration will make that variable contain the number of views processed by the current mesh or task shader invocations.

Valid Usage

- VUID-MeshViewCountNV-MeshViewCountNV-04287
  The `MeshViewCountNV` decoration must be used only within the `MeshNV` or `TaskNV` `Execution` `Model`

- VUID-MeshViewCountNV-MeshViewCountNV-04288
  The variable decorated with `MeshViewCountNV` must be declared using the `Input` `Storage` `Class`

- VUID-MeshViewCountNV-MeshViewCountNV-04289
  The variable decorated with `MeshViewCountNV` must be declared as a scalar 32-bit integer value

`MeshViewIndicesNV`

  Decorating a variable with the `MeshViewIndicesNV` built-in decoration will make that variable contain the mesh view indices. The mesh view indices is an array of values where each element holds the view number of one of the views being processed by the current mesh or task shader invocations. The values of array elements with indices greater than or equal to `MeshViewCountNV` are poison. If the value of `MeshViewIndicesNV`[i] is j, then any outputs decorated with `PerViewNV` will take on the value of array element i when processing primitives for view index j.

Valid Usage

- VUID-MeshViewIndicesNV-MeshViewIndicesNV-04290
  The `MeshViewIndicesNV` decoration must be used only within the `MeshNV` or `TaskNV` `Execution` `Model`

- VUID-MeshViewIndicesNV-MeshViewIndicesNV-04291
  The variable decorated with `MeshViewIndicesNV` must be declared using the `Input` `Storage` `Class`

- VUID-MeshViewIndicesNV-MeshViewIndicesNV-04292
  The variable decorated with `MeshViewIndicesNV` must be declared as an array of scalar 32-bit integer values

`NumSubgroups`

  Decorating a variable with the `NumSubgroups` built-in decoration will make that variable contain the number of subgroups in the local workgroup.

Valid Usage

- VUID-NumSubgroups-NumSubgroups-04293
  The `NumSubgroups` decoration must be used only within the `GLCompute`, `MeshEXT`, `TaskEXT`, `MeshNV`, or `TaskNV` `Execution` `Model`

- VUID-NumSubgroups-NumSubgroups-04294
  The variable decorated with `NumSubgroups` must be declared using the `Input` `Storage` `Class`

- VUID-NumSubgroups-NumSubgroups-04295
  The variable decorated with `NumSubgroups` must be declared as a scalar 32-bit integer value

`NumWorkgroups`

  Decorating a variable with the `NumWorkgroups` built-in decoration will make that variable contain the number of local workgroups that are part of the dispatch that the invocation belongs to. Each component is equal to the values of the workgroup count parameters passed into the dispatching commands.

Valid Usage

- VUID-NumWorkgroups-NumWorkgroups-04296
  The `NumWorkgroups` decoration must be used only within the `GLCompute`, `MeshEXT`, or `TaskEXT` `Execution` `Model`

- VUID-NumWorkgroups-NumWorkgroups-04297
  The variable decorated with `NumWorkgroups` must be declared using the `Input` `Storage` `Class`

- VUID-NumWorkgroups-NumWorkgroups-04298
  The variable decorated with `NumWorkgroups` must be declared as a three-component vector of 32-bit integer values

`ObjectRayDirectionKHR`

  A variable decorated with the `ObjectRayDirectionKHR` decoration will specify the direction of the ray being processed, in object space.

Valid Usage

- VUID-ObjectRayDirectionKHR-ObjectRayDirectionKHR-04299
  The `ObjectRayDirectionKHR` decoration must be used only within the `IntersectionKHR`, `AnyHitKHR`, or `ClosestHitKHR` `Execution` `Model`

- VUID-ObjectRayDirectionKHR-ObjectRayDirectionKHR-04300
  The variable decorated with `ObjectRayDirectionKHR` must be declared using the `Input` `Storage` `Class`

- VUID-ObjectRayDirectionKHR-ObjectRayDirectionKHR-04301
  The variable decorated with `ObjectRayDirectionKHR` must be declared as a three-component vector of 32-bit floating-point values

`ObjectRayOriginKHR`

  A variable decorated with the `ObjectRayOriginKHR` decoration will specify the origin of the ray being processed, in object space.

Valid Usage

- VUID-ObjectRayOriginKHR-ObjectRayOriginKHR-04302
  The `ObjectRayOriginKHR` decoration must be used only within the `IntersectionKHR`, `AnyHitKHR`, or `ClosestHitKHR` `Execution` `Model`

- VUID-ObjectRayOriginKHR-ObjectRayOriginKHR-04303
  The variable decorated with `ObjectRayOriginKHR` must be declared using the `Input` `Storage` `Class`

- VUID-ObjectRayOriginKHR-ObjectRayOriginKHR-04304
  The variable decorated with `ObjectRayOriginKHR` must be declared as a three-component vector of 32-bit floating-point values

`ObjectToWorldKHR`

  A variable decorated with the `ObjectToWorldKHR` decoration will contain the current object-to-world transformation matrix, which is determined by the instance of the current intersection.

Valid Usage

- VUID-ObjectToWorldKHR-ObjectToWorldKHR-04305
  The `ObjectToWorldKHR` decoration must be used only within the `IntersectionKHR`, `AnyHitKHR`, or `ClosestHitKHR` `Execution` `Model`

- VUID-ObjectToWorldKHR-ObjectToWorldKHR-04306
  The variable decorated with `ObjectToWorldKHR` must be declared using the `Input` `Storage` `Class`

- VUID-ObjectToWorldKHR-ObjectToWorldKHR-04307
  The variable decorated with `ObjectToWorldKHR` must be declared as a matrix with four columns of three-component vectors of 32-bit floating-point values

`PatchVertices`

  Decorating a variable with the `PatchVertices` built-in decoration will make that variable contain the number of vertices in the input patch being processed by the shader. In a Tessellation Control Shader, this is the same as the name:patchControlPoints member of VkPipelineTessellationStateCreateInfo. In a Tessellation Evaluation Shader, `PatchVertices` is equal to the tessellation control output patch size. When the same shader is used in different pipelines where the patch sizes are configured differently, the value of the `PatchVertices` variable will also differ.

Valid Usage

- VUID-PatchVertices-PatchVertices-04308
  The `PatchVertices` decoration must be used only within the `TessellationControl` or `TessellationEvaluation` `Execution` `Model`

- VUID-PatchVertices-PatchVertices-04309
  The variable decorated with `PatchVertices` must be declared using the `Input` `Storage` `Class`

- VUID-PatchVertices-PatchVertices-04310
  The variable decorated with `PatchVertices` must be declared as a scalar 32-bit integer value

`PointCoord`

  Decorating a variable with the `PointCoord` built-in decoration will make that variable contain the coordinate of the current fragment within the point being rasterized, normalized to the size of the point with origin in the upper left corner of the point, as described in Basic Point Rasterization. If the primitive the fragment shader invocation belongs to is not a point, then the variable decorated with `PointCoord` contains poison.

Note | Depending on how the point is rasterized, `PointCoord` may never reach (0,0) or (1,1).

Valid Usage

- VUID-PointCoord-PointCoord-04311
  The `PointCoord` decoration must be used only within the `Fragment` `Execution` `Model`

- VUID-PointCoord-PointCoord-04312
  The variable decorated with `PointCoord` must be declared using the `Input` `Storage` `Class`

- VUID-PointCoord-PointCoord-04313
  The variable decorated with `PointCoord` must be declared as a two-component vector of 32-bit floating-point values

`PointSize`

  Decorating a variable with the `PointSize` built-in decoration will make that variable contain the size of point primitives or the final rasterization of polygons if polygon mode is VK_POLYGON_MODE_POINT when `VkPhysicalDeviceMaintenance5Properties`::`polygonModePointSize` is set to VK_TRUE . The value written to the variable decorated with `PointSize` by the last pre-rasterization shader stage in the pipeline is used as the framebuffer-space size of points produced by rasterization. If the `maintenance5` feature is enabled and a value is not written to a variable decorated with `PointSize`, a value of 1.0 is used as the size of points.

Note | When `PointSize` decorates a variable in the `Input` `Storage` `Class`, it contains the data written to the output variable decorated with `PointSize` from the previous shader stage.

Valid Usage

- VUID-PointSize-PointSize-04314
  The `PointSize` decoration must be used only within the `MeshEXT`, `MeshNV`, `Vertex`, `TessellationControl`, `TessellationEvaluation`, or `Geometry` `Execution` `Model`

- VUID-PointSize-PointSize-04315
  The variable decorated with `PointSize` within the `MeshEXT`, `MeshNV`, or `Vertex` `Execution` `Model` must be declared using the `Output` `Storage` `Class`

- VUID-PointSize-PointSize-04316
  The variable decorated with `PointSize` within the `TessellationControl`, `TessellationEvaluation`, or `Geometry` `Execution` `Model` must not be declared using a `Storage` `Class` other than `Input` or `Output`

- VUID-PointSize-PointSize-04317
  The variable decorated with `PointSize` must be declared as a scalar 32-bit floating-point value

`Position`

  Decorating a variable with the `Position` built-in decoration will make that variable contain the position of the current vertex. In the last pre-rasterization shader stage, the value of the variable decorated with `Position` is used in subsequent primitive assembly, clipping, and rasterization operations.

Note | When `Position` decorates a variable in the `Input` `Storage` `Class`, it contains the data written to the output variable decorated with `Position` from the previous shader stage.

Valid Usage

- VUID-Position-Position-04318
  The `Position` decoration must be used only within the `MeshEXT`, `MeshNV`, `Vertex`, `TessellationControl`, `TessellationEvaluation`, or `Geometry` `Execution` `Model`

- VUID-Position-Position-04319
  The variable decorated with `Position` within the `MeshEXT`, `MeshNV`, or `Vertex` `Execution` `Model` must be declared using the `Output` `Storage` `Class`

- VUID-Position-Position-04320
  The variable decorated with `Position` within the `TessellationControl`, `TessellationEvaluation`, or `Geometry` `Execution` `Model` must not be declared using a `Storage` `Class` other than `Input` or `Output`

- VUID-Position-Position-04321
  The variable decorated with `Position` must be declared as a four-component vector of 32-bit floating-point values

`PositionPerViewNV`

  Decorating a variable with the `PositionPerViewNV` built-in decoration will make that variable contain the position of the current vertex, for each view.

  Elements of the array correspond to views in a multiview subpass, and those elements corresponding to views in the view mask of the subpass the shader is compiled against will be used as the position value for those views. For the final pre-rasterization shader stage in the pipeline, values written to an output variable decorated with `PositionPerViewNV` are used in subsequent primitive assembly, clipping, and rasterization operations, as with `Position`. `PositionPerViewNV` output in an earlier pre-rasterization shader stage is available as an input in the subsequent pre-rasterization shader stage.

  If a shader is compiled against a subpass that has the VK_SUBPASS_DESCRIPTION_PER_VIEW_POSITION_X_ONLY_BIT_NVX bit set, then the position values for each view must not differ in any component other than the X component. If the values do differ, one will be chosen in an implementation-dependent manner.

Valid Usage

- VUID-PositionPerViewNV-PositionPerViewNV-04322
  The `PositionPerViewNV` decoration must be used only within the `MeshNV`, `Vertex`, `TessellationControl`, `TessellationEvaluation`, or `Geometry` `Execution` `Model`

- VUID-PositionPerViewNV-PositionPerViewNV-04323
  The variable decorated with `PositionPerViewNV` within the `Vertex`, or `MeshNV` `Execution` `Model` must be declared using the `Output` `Storage` `Class`

- VUID-PositionPerViewNV-PositionPerViewNV-04324
  The variable decorated with `PositionPerViewNV` within the `TessellationControl`, `TessellationEvaluation`, or `Geometry` `Execution` `Model` must not be declared using a `Storage` `Class` other than `Input` or `Output`

- VUID-PositionPerViewNV-PositionPerViewNV-04325
  The variable decorated with `PositionPerViewNV` must be declared as an array of four-component vector of 32-bit floating-point values with at least as many elements as the maximum view in the subpass’s view mask plus one

- VUID-PositionPerViewNV-PositionPerViewNV-04326
  The array variable decorated with `PositionPerViewNV` must only be indexed by a constant or specialization constant

`PrimitiveCountNV`

  Decorating a variable with the `PrimitiveCountNV` decoration will make that variable contain the primitive count. The primitive count specifies the number of primitives in the output mesh produced by the mesh shader that will be processed by subsequent pipeline stages.

Valid Usage

- VUID-PrimitiveCountNV-PrimitiveCountNV-04327
  The `PrimitiveCountNV` decoration must be used only within the `MeshNV` `Execution` `Model`

- VUID-PrimitiveCountNV-PrimitiveCountNV-04328
  The variable decorated with `PrimitiveCountNV` must be declared using the `Output` `Storage` `Class`

- VUID-PrimitiveCountNV-PrimitiveCountNV-04329
  The variable decorated with `PrimitiveCountNV` must be declared as a scalar 32-bit integer value

`PrimitiveId`

  Decorating a variable with the `PrimitiveId` built-in decoration will make that variable contain the index of the current primitive.

  The index of the first primitive generated by a drawing command is zero, and the index is incremented after every individual point, line, or triangle primitive is processed.

  For triangles drawn as points or line segments (see Polygon Mode), the primitive index is incremented only once, even if multiple points or lines are eventually drawn.

  Variables decorated with `PrimitiveId` are reset to zero between each instance drawn.

  Restarting a primitive topology using primitive restart has no effect on the value of variables decorated with `PrimitiveId`.

  In tessellation control and tessellation evaluation shaders, it will contain the index of the patch within the current set of rendering primitives that corresponds to the shader invocation.

  In a geometry shader, it will contain the number of primitives presented as input to the shader since the current set of rendering primitives was started.

  In a fragment shader, it will contain the primitive index written by the mesh shader if a mesh shader is present, or the primitive index written by the geometry shader if a geometry shader is present, or with the value that would have been presented as input to the geometry shader had it been present.

  In an intersection, any-hit, or closest hit shader, it will contain the index within the geometry of the triangle or bounding box being processed.

Note | When the `PrimitiveId` decoration is applied to an output variable in the mesh shader or geometry shader, the resulting value is seen through the `PrimitiveId` decorated input variable in the fragment shader. The fragment shader using `PrimitiveId` will need to declare either the `MeshShadingNV`, `MeshShadingEXT`, `Geometry` or `Tessellation` capability to satisfy the requirement SPIR-V has to use `PrimitiveId`.

Valid Usage

- VUID-PrimitiveId-PrimitiveId-04330
  The `PrimitiveId` decoration must be used only within the `MeshEXT`, `MeshNV`, `IntersectionKHR`, `AnyHitKHR`, `ClosestHitKHR`, `TessellationControl`, `TessellationEvaluation`, `Geometry`, or `Fragment` `Execution` `Model`

- VUID-PrimitiveId-Fragment-04331
  If pipeline contains both the `Fragment` and `Geometry` `Execution` `Model` and a variable decorated with `PrimitiveId` is read from `Fragment` shader, then the `Geometry` shader must write to the output variables decorated with `PrimitiveId` in all execution paths

- VUID-PrimitiveId-Fragment-04332
  If pipeline contains both the `Fragment` and `MeshEXT` or `MeshNV` `Execution` `Model` and a variable decorated with `PrimitiveId` is read from `Fragment` shader, then the `MeshEXT` or `MeshNV` shader must write to the output variables decorated with `PrimitiveId` in all execution paths

- VUID-PrimitiveId-Fragment-04333
  If `Fragment` `Execution` `Model` contains a variable decorated with `PrimitiveId`, then either the `MeshShadingEXT`, `MeshShadingNV`, `Geometry` or `Tessellation` capability must also be declared

- VUID-PrimitiveId-PrimitiveId-04334
  The variable decorated with `PrimitiveId` within the `TessellationControl`, `TessellationEvaluation`, `Fragment`, `IntersectionKHR`, `AnyHitKHR`, or `ClosestHitKHR` `Execution` `Model` must be declared using the `Input` `Storage` `Class`

- VUID-PrimitiveId-PrimitiveId-04335
  The variable decorated with `PrimitiveId` within the `Geometry` `Execution` `Model` must be declared using the `Input` or `Output` `Storage` `Class`

- VUID-PrimitiveId-PrimitiveId-04336
  The variable decorated with `PrimitiveId` within the `MeshEXT` or `MeshNV` `Execution` `Model` must be declared using the `Output` `Storage` `Class`

- VUID-PrimitiveId-PrimitiveId-04337
  The variable decorated with `PrimitiveId` must be declared as a scalar 32-bit integer value for all supported execution models except `MeshEXT`

- VUID-PrimitiveId-PrimitiveId-07040
  The variable decorated with `PrimitiveId` within the `MeshEXT` `Execution` `Model` must also be decorated with the `PerPrimitiveEXT` decoration

- VUID-PrimitiveId-PrimitiveId-10595
  `PrimitiveId` within the `MeshEXT` `Execution` `Model` must decorate a scalar 32-bit integer member of a structure decorated as `Block`, or decorate a variable of type `OpTypeArray` of 32-bit integer values

- VUID-PrimitiveId-PrimitiveId-10596
  If `PrimitiveId` is declared as an array of 32-bit integer values, within the `MeshEXT` `Execution` `Model`, size of the array must match the value specified by `OutputPrimitivesEXT`

- VUID-PrimitiveId-PrimitiveId-10597
  If `PrimitiveId` decorates a member of a structure, the variable declaration of the containing `Block` type must have an array size that matches the value specified by `OutputPrimitivesEXT`

`PrimitiveIndicesNV`

  Decorating a variable with the `PrimitiveIndicesNV` decoration will make that variable contain the output array of vertex index values. Depending on the output primitive type declared using the execution mode, the indices are split into groups of one (`OutputPoints`), two (`OutputLinesNV`), or three (`OutputTrianglesNV`) indices and each group generates a primitive.

Valid Usage

- VUID-PrimitiveIndicesNV-PrimitiveIndicesNV-04338
  The `PrimitiveIndicesNV` decoration must be used only within the `MeshNV` `Execution` `Model`

- VUID-PrimitiveIndicesNV-PrimitiveIndicesNV-04339
  The variable decorated with `PrimitiveIndicesNV` must be declared using the `Output` `Storage` `Class`

- VUID-PrimitiveIndicesNV-PrimitiveIndicesNV-04340
  The variable decorated with `PrimitiveIndicesNV` must be declared as an array of scalar 32-bit integer values

- VUID-PrimitiveIndicesNV-PrimitiveIndicesNV-04341
  All index values of the array decorated with `PrimitiveIndicesNV` must be in the range [0, N-1], where N is the value specified by the `OutputVertices` `Execution` `Mode`

- VUID-PrimitiveIndicesNV-OutputPoints-04342
  If the `Execution` `Mode` is `OutputPoints`, then the array decorated with `PrimitiveIndicesNV` must be the size of the value specified by `OutputPrimitivesNV`

- VUID-PrimitiveIndicesNV-OutputLinesNV-04343
  If the `Execution` `Mode` is `OutputLinesNV`, then the array decorated with `PrimitiveIndicesNV` must be the size of two times the value specified by `OutputPrimitivesNV`

- VUID-PrimitiveIndicesNV-OutputTrianglesNV-04344
  If the `Execution` `Mode` is `OutputTrianglesNV`, then the array decorated with `PrimitiveIndicesNV` must be the size of three times the value specified by `OutputPrimitivesNV`

`PrimitivePointIndicesEXT`

  Decorating a variable with the `PrimitivePointIndicesEXT` decoration will make that variable contain the output array of vertex index values for point primitives.

Valid Usage

- VUID-PrimitivePointIndicesEXT-PrimitivePointIndicesEXT-07041
  The `PrimitivePointIndicesEXT` decoration must be used only within the `MeshEXT` `Execution` `Model`

- VUID-PrimitivePointIndicesEXT-PrimitivePointIndicesEXT-07042
  The `PrimitivePointIndicesEXT` decoration must be used with the `OutputPoints` `Execution` `Mode`

- VUID-PrimitivePointIndicesEXT-PrimitivePointIndicesEXT-07043
  The variable decorated with `PrimitivePointIndicesEXT` must be declared using the `Output` `Storage` `Class`

- VUID-PrimitivePointIndicesEXT-PrimitivePointIndicesEXT-07044
  The variable decorated with `PrimitivePointIndicesEXT` must be declared as an array of scalar 32-bit integer values

- VUID-PrimitivePointIndicesEXT-PrimitivePointIndicesEXT-07045
  The index to access the array decorated with `PrimitivePointIndicesEXT` must be in the range [0, N-1], where N is the value specified by the “Primitive Count” operand of `OpSetMeshOutputsEXT`

- VUID-PrimitivePointIndicesEXT-PrimitivePointIndicesEXT-12335
  All index values written to the array decorated with `PrimitivePointIndicesEXT` must be in the range [0, N-1], where N is the value specified by the “Vertex Count” operand of `OpSetMeshOutputsEXT`

- VUID-PrimitivePointIndicesEXT-PrimitivePointIndicesEXT-07046
  The size of the array decorated with `PrimitivePointIndicesEXT` must match the value specified by `OutputPrimitivesEXT`

`PrimitiveLineIndicesEXT`

  Decorating a variable with the `PrimitiveLineIndicesEXT` decoration will make that variable contain the output array of vertex index values for line primitives.

Valid Usage

- VUID-PrimitiveLineIndicesEXT-PrimitiveLineIndicesEXT-07047
  The `PrimitiveLineIndicesEXT` decoration must be used only within the `MeshEXT` `Execution` `Model`

- VUID-PrimitiveLineIndicesEXT-PrimitiveLineIndicesEXT-07048
  The `PrimitiveLineIndicesEXT` decoration must be used with the `OutputLinesEXT` `Execution` `Mode`

- VUID-PrimitiveLineIndicesEXT-PrimitiveLineIndicesEXT-07049
  The variable decorated with `PrimitiveLineIndicesEXT` must be declared using the `Output` `Storage` `Class`

- VUID-PrimitiveLineIndicesEXT-PrimitiveLineIndicesEXT-07050
  The variable decorated with `PrimitiveLineIndicesEXT` must be declared as an array of two component vector 32-bit integer values

- VUID-PrimitiveLineIndicesEXT-PrimitiveLineIndicesEXT-07051
  The index to access the array decorated with `PrimitiveLineIndicesEXT` must be in the range [0, N-1], where N is the value specified by the “Primitive Count” operand of `OpSetMeshOutputsEXT`

- VUID-PrimitiveLineIndicesEXT-PrimitiveLineIndicesEXT-12336
  All index values written to the array decorated with `PrimitiveLineIndicesEXT` must be in the range [0, N-1], where N is the value specified by the “Vertex Count” operand of `OpSetMeshOutputsEXT`

- VUID-PrimitiveLineIndicesEXT-PrimitiveLineIndicesEXT-07052
  The size of the array decorated with `PrimitiveLineIndicesEXT` must match the value specified by `OutputPrimitivesEXT`

`PrimitiveTriangleIndicesEXT`

  Decorating a variable with the `PrimitiveTriangleIndicesEXT` decoration will make that variable contain the output array of vertex index values for triangle primitives.

Valid Usage

- VUID-PrimitiveTriangleIndicesEXT-PrimitiveTriangleIndicesEXT-07053
  The `PrimitiveTriangleIndicesEXT` decoration must be used only within the `MeshEXT` `Execution` `Model`

- VUID-PrimitiveTriangleIndicesEXT-PrimitiveTriangleIndicesEXT-07054
  The `PrimitiveTriangleIndicesEXT` decoration must be used with the `OutputTrianglesEXT` `Execution` `Mode`

- VUID-PrimitiveTriangleIndicesEXT-PrimitiveTriangleIndicesEXT-07055
  The variable decorated with `PrimitiveTriangleIndicesEXT` must be declared using the `Output` `Storage` `Class`

- VUID-PrimitiveTriangleIndicesEXT-PrimitiveTriangleIndicesEXT-07056
  The variable decorated with `PrimitiveTriangleIndicesEXT` must be declared as an array of three component vector 32-bit integer values

- VUID-PrimitiveTriangleIndicesEXT-PrimitiveTriangleIndicesEXT-07057
  The index to access the array decorated with `PrimitiveTriangleIndicesEXT` must be in the range [0, N-1], where N is the value specified by the “Primitive Count” operand of `OpSetMeshOutputsEXT`

- VUID-PrimitiveTriangleIndicesEXT-PrimitiveTriangleIndicesEXT-12337
  All index values written to the array decorated with `PrimitiveTriangleIndicesEXT` must be in the range [0, N-1], where N is the value specified by the “Vertex Count” operand of `OpSetMeshOutputsEXT`

- VUID-PrimitiveTriangleIndicesEXT-PrimitiveTriangleIndicesEXT-07058
  The size of the array decorated with `PrimitiveTriangleIndicesEXT` must match the value specified by `OutputPrimitivesEXT`

`PrimitiveShadingRateKHR`

  Decorating a variable with the `PrimitiveShadingRateKHR` built-in decoration will make that variable contain the primitive fragment shading rate.

  The value written to the variable decorated with `PrimitiveShadingRateKHR` by the last pre-rasterization shader stage in the pipeline is used as the primitive fragment shading rate. Outputs in previous shader stages are ignored.

  If the last active pre-rasterization shader stage shader entry point’s interface does not include a variable decorated with `PrimitiveShadingRateKHR`, then it is as if the shader specified a fragment shading rate value of 0, indicating a horizontal and vertical rate of 1 pixel.

Valid Usage

- VUID-PrimitiveShadingRateKHR-PrimitiveShadingRateKHR-04484
  The `PrimitiveShadingRateKHR` decoration must be used only within the `MeshEXT`, `MeshNV`, `Vertex`, or `Geometry` `Execution` `Model`

- VUID-PrimitiveShadingRateKHR-PrimitiveShadingRateKHR-04485
  The variable decorated with `PrimitiveShadingRateKHR` must be declared using the `Output` `Storage` `Class`

- VUID-PrimitiveShadingRateKHR-PrimitiveShadingRateKHR-04486
  The variable decorated with `PrimitiveShadingRateKHR` must be declared as a scalar 32-bit integer value for all supported execution models except `MeshEXT`

- VUID-PrimitiveShadingRateKHR-PrimitiveShadingRateKHR-04487
  The value written to `PrimitiveShadingRateKHR` must include no more than one of `Vertical2Pixels` and `Vertical4Pixels`

- VUID-PrimitiveShadingRateKHR-PrimitiveShadingRateKHR-04488
  The value written to `PrimitiveShadingRateKHR` must include no more than one of `Horizontal2Pixels` and `Horizontal4Pixels`

- VUID-PrimitiveShadingRateKHR-PrimitiveShadingRateKHR-04489
  The value written to `PrimitiveShadingRateKHR` must not have any bits set other than those defined by Fragment Shading Rate Flags enumerants in the SPIR-V specification

- VUID-PrimitiveShadingRateKHR-PrimitiveShadingRateKHR-07059
  The variable decorated with `PrimitiveShadingRateKHR` within the `MeshEXT` `Execution` `Model` must also be decorated with the `PerPrimitiveEXT` decoration

- VUID-PrimitiveShadingRateKHR-PrimitiveShadingRateKHR-10598
  `PrimitiveShadingRateKHR` within the `MeshEXT` `Execution` `Model` must decorate a scalar 32-bit integer member of a structure decorated as `Block`, or decorate a variable of type `OpTypeArray` of 32-bit integer values

- VUID-PrimitiveShadingRateKHR-PrimitiveShadingRateKHR-10599
  If `PrimitiveShadingRateKHR` is declared as an array of 32-bit integer values, within the `MeshEXT` `Execution` `Model`, size of the array must match the value specified by `OutputPrimitivesEXT`

- VUID-PrimitiveShadingRateKHR-PrimitiveShadingRateKHR-10600
  If `PrimitiveShadingRateKHR` decorates a member of a structure, the variable declaration of the containing `Block` type must have an array size that matches the value specified by `OutputPrimitivesEXT`

- VUID-PrimitiveShadingRateKHR-PrimitiveShadingRateKHR-12275
  If `PrimitiveShadingRateKHR` is declared in the `MeshEXT` `Execution` `Model`, the primitiveFragmentShadingRateMeshShader feature must be enabled

`RayGeometryIndexKHR`

  A variable decorated with the `RayGeometryIndexKHR` decoration will contain the geometry index for the acceleration structure geometry currently being shaded.

Valid Usage

- VUID-RayGeometryIndexKHR-RayGeometryIndexKHR-04345
  The `RayGeometryIndexKHR` decoration must be used only within the `IntersectionKHR`, `AnyHitKHR`, or `ClosestHitKHR` `Execution` `Model`

- VUID-RayGeometryIndexKHR-RayGeometryIndexKHR-04346
  The variable decorated with `RayGeometryIndexKHR` must be declared using the `Input` `Storage` `Class`

- VUID-RayGeometryIndexKHR-RayGeometryIndexKHR-04347
  The variable decorated with `RayGeometryIndexKHR` must be declared as a scalar 32-bit integer value

`RayTmaxKHR`

  A variable decorated with the `RayTmaxKHR` decoration will contain the parametric tmax value of the ray being processed. The value is independent of the space in which the ray origin and direction exist. The value is initialized to the parameter passed into the pipeline trace ray instruction.

  The tmax value changes throughout the lifetime of the ray that produced the intersection. In the closest hit shader, the value reflects the closest distance to the intersected primitive. In the any-hit shader, it reflects the distance to the primitive currently being intersected. In the intersection shader, it reflects the distance to the closest primitive intersected so far or the initial value. The value can change in the intersection shader after calling `OpReportIntersectionKHR` if the corresponding any-hit shader does not ignore the intersection. In a miss shader, the value is identical to the parameter passed into the pipeline trace ray instruction.

Valid Usage

- VUID-RayTmaxKHR-RayTmaxKHR-04348
  The `RayTmaxKHR` decoration must be used only within the `IntersectionKHR`, `AnyHitKHR`, `ClosestHitKHR`, or `MissKHR` `Execution` `Model`

- VUID-RayTmaxKHR-RayTmaxKHR-04349
  The variable decorated with `RayTmaxKHR` must be declared using the `Input` `Storage` `Class`

- VUID-RayTmaxKHR-RayTmaxKHR-04350
  The variable decorated with `RayTmaxKHR` must be declared as a scalar 32-bit floating-point value

`RayTminKHR`

  A variable decorated with the `RayTminKHR` decoration will contain the parametric tmin value of the ray being processed. The value is independent of the space in which the ray origin and direction exist. The value is the parameter passed into the pipeline trace ray instruction.

  The tmin value remains constant for the duration of the ray query.

Valid Usage

- VUID-RayTminKHR-RayTminKHR-04351
  The `RayTminKHR` decoration must be used only within the `IntersectionKHR`, `AnyHitKHR`, `ClosestHitKHR`, or `MissKHR` `Execution` `Model`

- VUID-RayTminKHR-RayTminKHR-04352
  The variable decorated with `RayTminKHR` must be declared using the `Input` `Storage` `Class`

- VUID-RayTminKHR-RayTminKHR-04353
  The variable decorated with `RayTminKHR` must be declared as a scalar 32-bit floating-point value

`SampleId`

  Decorating a variable with the `SampleId` built-in decoration will make that variable contain the coverage index for the current fragment shader invocation. `SampleId` ranges from zero to the number of samples in the framebuffer minus one. If a fragment shader entry point’s interface includes an input variable decorated with `SampleId`, Sample Shading is considered enabled with a `minSampleShading` value of 1.0.

Valid Usage

- VUID-SampleId-SampleId-04354
  The `SampleId` decoration must be used only within the `Fragment` `Execution` `Model`

- VUID-SampleId-SampleId-04355
  The variable decorated with `SampleId` must be declared using the `Input` `Storage` `Class`

- VUID-SampleId-SampleId-04356
  The variable decorated with `SampleId` must be declared as a scalar 32-bit integer value

`SampleMask`

  Decorating a variable with the `SampleMask` built-in decoration will make any variable contain the sample mask for the current fragment shader invocation.

  A variable in the `Input` storage class decorated with `SampleMask` will contain a bitmask of the set of samples covered by the primitive generating the fragment during rasterization. It has a sample bit set if and only if the sample is considered covered for this fragment shader invocation. `SampleMask`[] is an array of integers. Bits are mapped to samples in a manner where bit B of mask M (`SampleMask[M]`) corresponds to sample 32 × M + B.

  A variable in the `Output` storage class decorated with `SampleMask` is an array of integers forming a bit array in a manner similar to an input variable decorated with `SampleMask`, but where each bit represents coverage as computed by the shader. This computed `SampleMask` is combined with the generated coverage mask in the multisample coverage operation.

  Variables decorated with `SampleMask` must be either an unsized array, or explicitly sized to be no larger than the implementation-dependent maximum sample-mask (as an array of 32-bit elements), determined by the maximum number of samples.

  If a fragment shader entry point’s interface does not include an output variable decorated with `SampleMask`, the sample mask has no effect on the processing of a fragment.

Valid Usage

- VUID-SampleMask-SampleMask-04357
  The `SampleMask` decoration must be used only within the `Fragment` `Execution` `Model`

- VUID-SampleMask-SampleMask-04358
  The variable decorated with `SampleMask` must be declared using the `Input` or `Output` `Storage` `Class`

- VUID-SampleMask-SampleMask-04359
  The variable decorated with `SampleMask` must be declared as an array of 32-bit integer values

`SamplePosition`

  Decorating a variable with the `SamplePosition` built-in decoration will make that variable contain the sub-pixel position of the sample being shaded. The top left of the pixel is considered to be at coordinate (0,0) and the bottom right of the pixel is considered to be at coordinate (1,1).

  If the render pass has a fragment density map attachment, the variable will instead contain the sub-fragment position of the sample being shaded. The top left of the fragment is considered to be at coordinate (0,0) and the bottom right of the fragment is considered to be at coordinate (1,1) for any fragment area.

  If a fragment shader entry point’s interface includes an input variable decorated with `SamplePosition`, Sample Shading is considered enabled with a `minSampleShading` value of 1.0.

  If the current pipeline uses custom sample locations the value of any variable decorated with the `SamplePosition` built-in decoration is poison.

Valid Usage

- VUID-SamplePosition-SamplePosition-04360
  The `SamplePosition` decoration must be used only within the `Fragment` `Execution` `Model`

- VUID-SamplePosition-SamplePosition-04361
  The variable decorated with `SamplePosition` must be declared using the `Input` `Storage` `Class`

- VUID-SamplePosition-SamplePosition-04362
  The variable decorated with `SamplePosition` must be declared as a two-component vector of 32-bit floating-point values

`ShadingRateKHR`

  Decorating a variable with the `ShadingRateKHR` built-in decoration will make that variable contain the fragment shading rate for the current fragment invocation.

Valid Usage

- VUID-ShadingRateKHR-ShadingRateKHR-04490
  The `ShadingRateKHR` decoration must be used only within the `Fragment` `Execution` `Model`

- VUID-ShadingRateKHR-ShadingRateKHR-04491
  The variable decorated with `ShadingRateKHR` must be declared using the `Input` `Storage` `Class`

- VUID-ShadingRateKHR-ShadingRateKHR-04492
  The variable decorated with `ShadingRateKHR` must be declared as a scalar 32-bit integer value

`SMCountNV`

  Decorating a variable with the `SMCountNV` built-in decoration will make that variable contain the number of SMs on the device.

Valid Usage

- VUID-SMCountNV-SMCountNV-04363
  The variable decorated with `SMCountNV` must be declared using the `Input` `Storage` `Class`

- VUID-SMCountNV-SMCountNV-04364
  The variable decorated with `SMCountNV` must be declared as a scalar 32-bit integer value

`SMIDNV`

  Decorating a variable with the `SMIDNV` built-in decoration will make that variable contain the ID of the SM on which the current shader invocation is running. This variable is in the range [0, `SMCountNV`-1].

Valid Usage

- VUID-SMIDNV-SMIDNV-04365
  The variable decorated with `SMIDNV` must be declared using the `Input` `Storage` `Class`

- VUID-SMIDNV-SMIDNV-04366
  The variable decorated with `SMIDNV` must be declared as a scalar 32-bit integer value

`SubgroupId`

  Decorating a variable with the `SubgroupId` built-in decoration will make that variable contain the index of the subgroup within the local workgroup. This variable is in range [0, `NumSubgroups`-1].

Valid Usage

- VUID-SubgroupId-SubgroupId-04367
  The `SubgroupId` decoration must be used only within the `GLCompute`, `MeshEXT`, `TaskEXT`, `MeshNV`, or `TaskNV` `Execution` `Model`

- VUID-SubgroupId-SubgroupId-04368
  The variable decorated with `SubgroupId` must be declared using the `Input` `Storage` `Class`

- VUID-SubgroupId-SubgroupId-04369
  The variable decorated with `SubgroupId` must be declared as a scalar 32-bit integer value

`SubgroupEqMask`

  Decorating a variable with the `SubgroupEqMask` builtin decoration will make that variable contain the subgroup mask of the current subgroup invocation. The bit corresponding to the `SubgroupLocalInvocationId` is set in the variable decorated with `SubgroupEqMask`. All other bits are set to zero.

  `SubgroupEqMaskKHR` is an alias of `SubgroupEqMask`.

Valid Usage

- VUID-SubgroupEqMask-SubgroupEqMask-04370
  The variable decorated with `SubgroupEqMask` must be declared using the `Input` `Storage` `Class`

- VUID-SubgroupEqMask-SubgroupEqMask-04371
  The variable decorated with `SubgroupEqMask` must be declared as a four-component vector of 32-bit integer values

`SubgroupGeMask`

  Decorating a variable with the `SubgroupGeMask` builtin decoration will make that variable contain the subgroup mask of the current subgroup invocation. The bits corresponding to the invocations greater than or equal to `SubgroupLocalInvocationId` through `SubgroupSize`-1 are set in the variable decorated with `SubgroupGeMask`. All other bits are set to zero.

  `SubgroupGeMaskKHR` is an alias of `SubgroupGeMask`.

Valid Usage

- VUID-SubgroupGeMask-SubgroupGeMask-04372
  The variable decorated with `SubgroupGeMask` must be declared using the `Input` `Storage` `Class`

- VUID-SubgroupGeMask-SubgroupGeMask-04373
  The variable decorated with `SubgroupGeMask` must be declared as a four-component vector of 32-bit integer values

`SubgroupGtMask`

  Decorating a variable with the `SubgroupGtMask` builtin decoration will make that variable contain the subgroup mask of the current subgroup invocation. The bits corresponding to the invocations greater than `SubgroupLocalInvocationId` through `SubgroupSize`-1 are set in the variable decorated with `SubgroupGtMask`. All other bits are set to zero.

  `SubgroupGtMaskKHR` is an alias of `SubgroupGtMask`.

Valid Usage

- VUID-SubgroupGtMask-SubgroupGtMask-04374
  The variable decorated with `SubgroupGtMask` must be declared using the `Input` `Storage` `Class`

- VUID-SubgroupGtMask-SubgroupGtMask-04375
  The variable decorated with `SubgroupGtMask` must be declared as a four-component vector of 32-bit integer values

`SubgroupLeMask`

  Decorating a variable with the `SubgroupLeMask` builtin decoration will make that variable contain the subgroup mask of the current subgroup invocation. The bits corresponding to the invocations less than or equal to `SubgroupLocalInvocationId` are set in the variable decorated with `SubgroupLeMask`. All other bits are set to zero.

  `SubgroupLeMaskKHR` is an alias of `SubgroupLeMask`.

Valid Usage

- VUID-SubgroupLeMask-SubgroupLeMask-04376
  The variable decorated with `SubgroupLeMask` must be declared using the `Input` `Storage` `Class`

- VUID-SubgroupLeMask-SubgroupLeMask-04377
  The variable decorated with `SubgroupLeMask` must be declared as a four-component vector of 32-bit integer values

`SubgroupLtMask`

  Decorating a variable with the `SubgroupLtMask` builtin decoration will make that variable contain the subgroup mask of the current subgroup invocation. The bits corresponding to the invocations less than `SubgroupLocalInvocationId` are set in the variable decorated with `SubgroupLtMask`. All other bits are set to zero.

  `SubgroupLtMaskKHR` is an alias of `SubgroupLtMask`.

Valid Usage

- VUID-SubgroupLtMask-SubgroupLtMask-04378
  The variable decorated with `SubgroupLtMask` must be declared using the `Input` `Storage` `Class`

- VUID-SubgroupLtMask-SubgroupLtMask-04379
  The variable decorated with `SubgroupLtMask` must be declared as a four-component vector of 32-bit integer values

`SubgroupLocalInvocationId`

  Decorating a variable with the `SubgroupLocalInvocationId` builtin decoration will make that variable contain the index of the invocation within the subgroup. This variable is in range [0,`SubgroupSize`-1].

Note | There is no direct relationship between `SubgroupLocalInvocationId` and `LocalInvocationId` or `LocalInvocationIndex`. If the shader was created with full subgroups, applications can compute their own local invocation index to serve the same purpose: index = `SubgroupLocalInvocationId` + `SubgroupId` × `SubgroupSize` If full subgroups are not enabled, some subgroups may be dispatched with inactive invocations that do not correspond to a local workgroup invocation, making the value of index unreliable.

Valid Usage

- VUID-SubgroupLocalInvocationId-SubgroupLocalInvocationId-04380
  The variable decorated with `SubgroupLocalInvocationId` must be declared using the `Input` `Storage` `Class`

- VUID-SubgroupLocalInvocationId-SubgroupLocalInvocationId-04381
  The variable decorated with `SubgroupLocalInvocationId` must be declared as a scalar 32-bit integer value

`SubgroupSize`

  Decorating a variable with the `SubgroupSize` builtin decoration will make that variable contain the implementation-dependent number of invocations in a subgroup. This value must be a power-of-two integer.

  If the shader was created with varying subgroup size allowed, the `SubgroupSize` decorated variable will contain the subgroup size for each subgroup that gets dispatched. This value must be between `minSubgroupSize` and `maxSubgroupSize` and must be uniform with subgroup scope.

  If the shader was created with a required subgroup size, the `SubgroupSize` decorated variable will match that value.

  If the shader does not allow varying subgroup sizes, the variable decorated with `SubgroupSize` will match `subgroupSize`.

  The maximum number of invocations that an implementation can support per subgroup is 128.

Valid Usage

- VUID-SubgroupSize-SubgroupSize-04382
  The variable decorated with `SubgroupSize` must be declared using the `Input` `Storage` `Class`

- VUID-SubgroupSize-SubgroupSize-04383
  The variable decorated with `SubgroupSize` must be declared as a scalar 32-bit integer value

`TaskCountNV`

  Decorating a variable with the `TaskCountNV` decoration will make that variable contain the task count. The task count specifies the number of subsequent mesh shader workgroups that get generated upon completion of the task shader.

Valid Usage

- VUID-TaskCountNV-TaskCountNV-04384
  The `TaskCountNV` decoration must be used only within the `TaskNV` `Execution` `Model`

- VUID-TaskCountNV-TaskCountNV-04385
  The variable decorated with `TaskCountNV` must be declared using the `Output` `Storage` `Class`

- VUID-TaskCountNV-TaskCountNV-04386
  The variable decorated with `TaskCountNV` must be declared as a scalar 32-bit integer value

`TessCoord`

  Decorating a variable with the `TessCoord` built-in decoration will make that variable contain the three-dimensional (u,v,w) barycentric coordinate of the tessellated vertex within the patch. u, v, and w are in the range [0,1] and vary linearly across the primitive being subdivided. For the tessellation modes of `Quads` or `IsoLines`, the third component is always zero.

Valid Usage

- VUID-TessCoord-TessCoord-04387
  The `TessCoord` decoration must be used only within the `TessellationEvaluation` `Execution` `Model`

- VUID-TessCoord-TessCoord-04388
  The variable decorated with `TessCoord` must be declared using the `Input` `Storage` `Class`

- VUID-TessCoord-TessCoord-04389
  The variable decorated with `TessCoord` must be declared as a three-component vector of 32-bit floating-point values

`TessLevelOuter`

  Decorating a variable with the `TessLevelOuter` built-in decoration will make that variable contain the outer tessellation levels for the current patch.

  In tessellation control shaders, the variable decorated with `TessLevelOuter` can be written to, controlling the tessellation factors for the resulting patch. These values are used by the tessellator to control primitive tessellation and can be read by tessellation evaluation shaders.

  In tessellation evaluation shaders, the variable decorated with `TessLevelOuter` can read the values written by the tessellation control shader.

Valid Usage

- VUID-TessLevelOuter-TessLevelOuter-04390
  The `TessLevelOuter` decoration must be used only within the `TessellationControl` or `TessellationEvaluation` `Execution` `Model`

- VUID-TessLevelOuter-TessLevelOuter-04391
  The variable decorated with `TessLevelOuter` within the `TessellationControl` `Execution` `Model` must be declared using the `Output` `Storage` `Class`

- VUID-TessLevelOuter-TessLevelOuter-04392
  The variable decorated with `TessLevelOuter` within the `TessellationEvaluation` `Execution` `Model` must be declared using the `Input` `Storage` `Class`

- VUID-TessLevelOuter-TessLevelOuter-04393
  The variable decorated with `TessLevelOuter` must be declared as an array of size four, containing 32-bit floating-point values

`TessLevelInner`

  Decorating a variable with the `TessLevelInner` built-in decoration will make that variable contain the inner tessellation levels for the current patch.

  In tessellation control shaders, the variable decorated with `TessLevelInner` can be written to, controlling the tessellation factors for the resulting patch. These values are used by the tessellator to control primitive tessellation and can be read by tessellation evaluation shaders.

  In tessellation evaluation shaders, the variable decorated with `TessLevelInner` can read the values written by the tessellation control shader.

Valid Usage

- VUID-TessLevelInner-TessLevelInner-04394
  The `TessLevelInner` decoration must be used only within the `TessellationControl` or `TessellationEvaluation` `Execution` `Model`

- VUID-TessLevelInner-TessLevelInner-04395
  The variable decorated with `TessLevelInner` within the `TessellationControl` `Execution` `Model` must be declared using the `Output` `Storage` `Class`

- VUID-TessLevelInner-TessLevelInner-04396
  The variable decorated with `TessLevelInner` within the `TessellationEvaluation` `Execution` `Model` must be declared using the `Input` `Storage` `Class`

- VUID-TessLevelInner-TessLevelInner-04397
  The variable decorated with `TessLevelInner` must be declared as an array of size two, containing 32-bit floating-point values

`TileOffsetQCOM`

  The `TileOffsetQCOM` decoration can be applied to a shader input which will be filled with the framebuffer coordinates of the active tile.

  When per-tile execution model is enabled, for the current shader invocation x and y components of `TileOffsetQCOM` reflect the framebuffer integer coordinates of the top-left texel of the tile corresponding to the shader invocation.

  Otherwise, the x and y components of `TileOffsetQCOM` are filled with (0,0).

Valid Usage

- VUID-TileOffsetQCOM-TileOffsetQCOM-10626
  The `TileOffsetQCOM` decoration must be used only within the `Fragment` `Execution` `Model` or `GLCompute` `Execution` `Model`

- VUID-TileOffsetQCOM-TileOffsetQCOM-10627
  The variable decorated with `TileOffsetQCOM` must be declared using the `Input` `Storage` `Class`

- VUID-TileOffsetQCOM-TileOffsetQCOM-10628
  The variable decorated with `TileOffsetQCOM` must be declared as a two-component vector of 32-bit integer values

`TileDimensionQCOM`

  The `TileDimensionQCOM` decoration can be applied to a shader input which will be filled with the width and height of the active tile.

  When per-tile execution model is enabled, for the current shader invocation x and y components of `TileDimensionQCOM` reflect the with and height of the tile corresponding to the shader invocation.

  Otherwise, the x and y components of `TileDimensionQCOM` are filled with (0,0).

Valid Usage

- VUID-TileDimensionQCOM-TileDimensionQCOM-10629
  The `TileDimensionQCOM` decoration must be used only within the `Fragment` `Execution` `Model` or `GLCompute` `Execution` `Model`

- VUID-TileDimensionQCOM-TileDimensionQCOM-10630
  The variable decorated with `TileDimensionQCOM` must be declared using the `Input` `Storage` `Class`

- VUID-TileDimensionQCOM-TileDimensionQCOM-10631
  The variable decorated with `TileDimensionQCOM` must be declared as a two-component vector of 32-bit integer values

`TileApronSizeQCOM`

  The `TileApronSizeQCOM` decoration can be applied to a shader input which will be filled with the width and height of the active tile’s apron.

  If per-tile execution model is enabled for the current shader invocation, and is executing in a dynamic render pass or is executing in a subpass where VK_SUBPASS_DESCRIPTION_TILE_SHADING_APRON_BIT_QCOM is included in its `flags`, x and y components of `TileApronSizeQCOM` reflect the with and height of the tile apron corresponding to the shader invocation.

  Otherwise, the x and y components of `TileApronSizeQCOM` are filled with (0,0).

Valid Usage

- VUID-TileApronSizeQCOM-TileApronSizeQCOM-10632
  The `TileApronSizeQCOM` decoration must be used only within the `Fragment` `Execution` `Model` or `GLCompute` `Execution` `Model`

- VUID-TileApronSizeQCOM-TileApronSizeQCOM-10633
  The variable decorated with `TileApronSizeQCOM` must be declared using the `Input` `Storage` `Class`

- VUID-TileApronSizeQCOM-TileApronSizeQCOM-10634
  The variable decorated with `TileApronSizeQCOM` must be declared as a two-component vector of 32-bit integer values

`VertexCountHUAWEI`

  The `VertexCountHUAWEI` decoration can be used to decorate a cluster culling shader output variable,this non-indexed mode specific variable will contain an integer value that specifies the number of vertices in a cluster to draw.

Valid Usage

- VUID-VertexCountHUAWEI-VertexCountHUAWEI-07809
  The `VertexCountHUAWEI` decoration must be used only within the `ClusterCullingHUAWEI` `Execution` `Model`

- VUID-VertexCountHUAWEI-VertexCountHUAWEI-07810
  The variable decorated with `VertexCountHUAWEI` must be declared as a scalar 32-bit integer value

`VertexIndex`

  Decorating a variable with the `VertexIndex` built-in decoration will make that variable contain the index of the vertex that is being processed by the current vertex shader invocation. For non-indexed draws, this variable begins at the `firstVertex` parameter to vkCmdDraw or the `firstVertex` member of a structure consumed by vkCmdDrawIndirect and increments by one for each vertex in the draw. For indexed draws, its value is the content of the index buffer for the vertex plus the `vertexOffset` parameter to vkCmdDrawIndexed or the `vertexOffset` member of the structure consumed by vkCmdDrawIndexedIndirect.

Note | `VertexIndex` starts at the same starting value for each instance.

Valid Usage

- VUID-VertexIndex-VertexIndex-04398
  The `VertexIndex` decoration must be used only within the `Vertex` `Execution` `Model`

- VUID-VertexIndex-VertexIndex-04399
  The variable decorated with `VertexIndex` must be declared using the `Input` `Storage` `Class`

- VUID-VertexIndex-VertexIndex-04400
  The variable decorated with `VertexIndex` must be declared as a scalar 32-bit integer value

`VertexOffsetHUAWEI`

  The `VertexOffsetHUAWEI` decoration can be used to decorate a cluster culling shader output variable,this indexed mode specific variable will contain an integer value that specifies an offset value added to the vertex index of a cluster before indexing into the vertex buffer.

Valid Usage

- VUID-VertexOffsetHUAWEI-VertexOffsetHUAWEI-07811
  The `VertexOffsetHUAWEI` decoration must be used only within the `ClusterCullingHUAWEI` `Execution` `Model`

- VUID-VertexOffsetHUAWEI-VertexOffsetHUAWEI-07812
  The variable decorated with `VertexOffsetHUAWEI` must be declared as a scalar 32-bit integer value

`ViewIndex`

  The `ViewIndex` decoration can be applied to a shader input which will be filled with the index of the view that is being processed by the current shader invocation.

  If multiview is enabled in the render pass, this value will be the index of one of the bits set in the view mask of the subpass the pipeline is compiled against. If multiview is not enabled in the render pass, this value will be zero.

Valid Usage

- VUID-ViewIndex-ViewIndex-04401
  The `ViewIndex` decoration must be used only within the `MeshEXT`, `Vertex`, `Geometry`, `TessellationControl`, `TessellationEvaluation` or `Fragment` `Execution` `Model`

- VUID-ViewIndex-ViewIndex-04402
  The variable decorated with `ViewIndex` must be declared using the `Input` `Storage` `Class`

- VUID-ViewIndex-ViewIndex-04403
  The variable decorated with `ViewIndex` must be declared as a scalar 32-bit integer value

`ViewportIndex`

  Decorating a variable with the `ViewportIndex` built-in decoration will make that variable contain the index of the viewport.

  In a mesh, vertex, tessellation evaluation, or geometry shader, the variable decorated with `ViewportIndex` can be written to with the viewport index to which the primitive produced by that shader will be directed.

  The selected viewport index is used to select the viewport transform, scissor rectangle, and exclusive scissor rectangle.

  The last active pre-rasterization shader stage (in pipeline order) controls the `ViewportIndex` that is used. Outputs in previous shader stages are not used, even if the last stage fails to write the `ViewportIndex`.

  If the last active pre-rasterization shader stage shader entry point’s interface does not include a variable decorated with `ViewportIndex` , and if the multiviewPerViewViewports feature is not enabled, then the first viewport is used. If a pre-rasterization shader stage shader entry point’s interface includes a variable decorated with `ViewportIndex`, it must write the same value to `ViewportIndex` for all output vertices of a given primitive.

  In a fragment shader, the variable decorated with `ViewportIndex` contains the viewport index of the primitive that the fragment invocation belongs to.

  If the `multiviewPerViewViewports` feature is enabled, and if the last active pre-rasterization shader stage shader entry point’s interface does not include a variable decorated with `ViewportIndex`, then the value of `ViewIndex` is used as an index to select the viewport transform and scissor rectangle, and the value of `ViewportIndex` in the fragment shader is poison.

Valid Usage

- VUID-ViewportIndex-ViewportIndex-04404
  The `ViewportIndex` decoration must be used only within the `MeshEXT`, `MeshNV`, `Vertex`, `TessellationEvaluation`, `Geometry`, or `Fragment` `Execution` `Model`

- VUID-ViewportIndex-ViewportIndex-04405
  If the `shaderOutputViewportIndex` feature is not enabled then the `ViewportIndex` decoration must be used only within the `Geometry` or `Fragment` `Execution` `Model`

- VUID-ViewportIndex-ViewportIndex-04406
  The variable decorated with `ViewportIndex` within the `MeshEXT`, `MeshNV`, `Vertex`, `TessellationEvaluation`, or `Geometry` `Execution` `Model` must be declared using the `Output` `Storage` `Class`

- VUID-ViewportIndex-ViewportIndex-04407
  The variable decorated with `ViewportIndex` within the `Fragment` `Execution` `Model` must be declared using the `Input` `Storage` `Class`

- VUID-ViewportIndex-ViewportIndex-04408
  The variable decorated with `ViewportIndex` must be declared as a scalar 32-bit integer value for all supported execution models except `MeshEXT`

- VUID-ViewportIndex-ViewportIndex-07060
  The variable decorated with `ViewportIndex` within the `MeshEXT` `Execution` `Model` must also be decorated with the `PerPrimitiveEXT` decoration

- VUID-ViewportIndex-ViewportIndex-10601
  `ViewportIndex` within the `MeshEXT` `Execution` `Model` must decorate a scalar 32-bit integer member of a structure decorated as `Block`, or decorate a variable of type `OpTypeArray` of scalar 32-bit integer values

- VUID-ViewportIndex-ViewportIndex-10602
  If `ViewportIndex` is declared as an array of 32-bit integer values, within the `MeshEXT` `Execution` `Model`, size of the array must match the value specified by `OutputPrimitivesEXT`

- VUID-ViewportIndex-ViewportIndex-10603
  If `ViewportIndex` decorates a member of a structure, the variable declaration of the containing `Block` type must have an array size that matches the value specified by `OutputPrimitivesEXT`

`ViewportMaskNV`

  Decorating a variable with the `ViewportMaskNV` built-in decoration will make that variable contain the viewport mask.

  In a mesh, vertex, tessellation evaluation, or geometry shader, the variable decorated with `ViewportMaskNV` can be written to with the mask of which viewports the primitive produced by that shader will directed.

  The `ViewportMaskNV` variable must be an array that has ⌈(`VkPhysicalDeviceLimits`::`maxViewports` / 32)⌉ elements. When a shader writes to this variable, bit B of element M controls whether a primitive is emitted to viewport 32 × M + B. The viewports indicated by the mask are used to select the viewport transform, scissor rectangle, and exclusive scissor rectangle that a primitive will be transformed by.

  The last active pre-rasterization shader stage (in pipeline order) controls the `ViewportMaskNV` that is used. Outputs in previous shader stages are not used, even if the last stage fails to write the `ViewportMaskNV`. When `ViewportMaskNV` is written by the final pre-rasterization shader stage, any variable decorated with `ViewportIndex` in the fragment shader will have the index of the viewport that was used in generating that fragment.

  If a pre-rasterization shader stage shader entry point’s interface includes a variable decorated with `ViewportMaskNV`, it must write the same value to `ViewportMaskNV` for all output vertices of a given primitive.

Valid Usage

- VUID-ViewportMaskNV-ViewportMaskNV-04409
  The `ViewportMaskNV` decoration must be used only within the `Vertex`, `MeshNV`, `TessellationEvaluation`, or `Geometry` `Execution` `Model`

- VUID-ViewportMaskNV-ViewportMaskNV-04410
  The variable decorated with `ViewportMaskNV` must be declared using the `Output` `Storage` `Class`

- VUID-ViewportMaskNV-ViewportMaskNV-04411
  The variable decorated with `ViewportMaskNV` must be declared as an array of 32-bit integer values

`ViewportMaskPerViewNV`

  Decorating a variable with the `ViewportMaskPerViewNV` built-in decoration will make that variable contain the mask of viewports primitives are broadcast to, for each view.

  The value written to an element of `ViewportMaskPerViewNV` in the last pre-rasterization shader stage is a bitmask indicating which viewports the primitive will be directed to. The primitive will be broadcast to the viewport corresponding to each non-zero bit of the bitmask, and that viewport index is used to select the viewport transform, scissor rectangle, and exclusive scissor rectangle, for each view. The same values must be written to all vertices in a given primitive, or else the set of viewports used for that primitive is undefined.

  Elements of the array correspond to views in a multiview subpass, and those elements corresponding to views in the view mask of the subpass the shader is compiled against will be used as the viewport mask value for those views. `ViewportMaskPerViewNV` output in an earlier pre-rasterization shader stage is not available as an input in the subsequent pre-rasterization shader stage.

  Although `ViewportMaskNV` is an array, `ViewportMaskPerViewNV` is not a two-dimensional array. Instead, `ViewportMaskPerViewNV` is limited to 32 viewports.

Valid Usage

- VUID-ViewportMaskPerViewNV-ViewportMaskPerViewNV-04412
  The `ViewportMaskPerViewNV` decoration must be used only within the `Vertex`, `MeshNV`, `TessellationControl`, `TessellationEvaluation`, or `Geometry` `Execution` `Model`

- VUID-ViewportMaskPerViewNV-ViewportMaskPerViewNV-04413
  The variable decorated with `ViewportMaskPerViewNV` must be declared using the `Output` `Storage` `Class`

- VUID-ViewportMaskPerViewNV-ViewportMaskPerViewNV-04414
  The variable decorated with `ViewportMaskPerViewNV` must be declared as an array of 32-bit integer values

- VUID-ViewportMaskPerViewNV-ViewportMaskPerViewNV-04415
  The array decorated with `ViewportMaskPerViewNV` must be a size less than or equal to 32

- VUID-ViewportMaskPerViewNV-ViewportMaskPerViewNV-04416
  The array decorated with `ViewportMaskPerViewNV` must be a size greater than the maximum view in the subpass’s view mask

- VUID-ViewportMaskPerViewNV-ViewportMaskPerViewNV-04417
  The array variable decorated with `ViewportMaskPerViewNV` must only be indexed by a constant or specialization constant

`WarpsPerSMNV`

  Decorating a variable with the `WarpsPerSMNV` built-in decoration will make that variable contain the maximum number of warps executing on a SM.

Valid Usage

- VUID-WarpsPerSMNV-WarpsPerSMNV-04418
  The variable decorated with `WarpsPerSMNV` must be declared using the `Input` `Storage` `Class`

- VUID-WarpsPerSMNV-WarpsPerSMNV-04419
  The variable decorated with `WarpsPerSMNV` must be declared as a scalar 32-bit integer value

`WarpIDNV`

  Decorating a variable with the `WarpIDNV` built-in decoration will make that variable contain the ID of the warp on a SM on which the current shader invocation is running. This variable is in the range [0, `WarpsPerSMNV`-1].

Valid Usage

- VUID-WarpIDNV-WarpIDNV-04420
  The variable decorated with `WarpIDNV` must be declared using the `Input` `Storage` `Class`

- VUID-WarpIDNV-WarpIDNV-04421
  The variable decorated with `WarpIDNV` must be declared as a scalar 32-bit integer value

`WorkgroupId`

  Decorating a variable with the `WorkgroupId` built-in decoration will make that variable contain the global coordinate of the local workgroup that the current invocation is a member of. Each component is in the range [base,base + count), where base and count are based on the parameters passed into the dispatching or drawing commands in each dimension.

Valid Usage

- VUID-WorkgroupId-WorkgroupId-04422
  The `WorkgroupId` decoration must be used only within the `GLCompute`, `MeshEXT`, `TaskEXT`, `MeshNV`, or `TaskNV` `Execution` `Model`

- VUID-WorkgroupId-WorkgroupId-04423
  The variable decorated with `WorkgroupId` must be declared using the `Input` `Storage` `Class`

- VUID-WorkgroupId-WorkgroupId-04424
  The variable decorated with `WorkgroupId` must be declared as a three-component vector of 32-bit integer values

`WorkgroupSize`

Note | SPIR-V 1.6 deprecated `WorkgroupSize` in favor of using the `LocalSizeId` Execution Mode instead. Support for `LocalSizeId` was added with `VK_KHR_maintenance4` and promoted to core in Version 1.3.

Decorating an object with the `WorkgroupSize` built-in decoration will make that object contain the dimensions of a local workgroup. If an object is decorated with the `WorkgroupSize` decoration, this takes precedence over any `LocalSize` or `LocalSizeId` execution mode.

Valid Usage

- VUID-WorkgroupSize-WorkgroupSize-04425
  The `WorkgroupSize` decoration must be used only within the `GLCompute`, `MeshEXT`, `TaskEXT`, `MeshNV`, or `TaskNV` `Execution` `Model`

- VUID-WorkgroupSize-WorkgroupSize-04426
  The variable decorated with `WorkgroupSize` must be a specialization constant or a constant

- VUID-WorkgroupSize-WorkgroupSize-04427
  The variable decorated with `WorkgroupSize` must be declared as a three-component vector of 32-bit integer values

- VUID-WorkgroupSize-TileShadingRateQCOM-10635
  If the `TileShadingRateQCOM` `Execution` `Mode` is used, variables decorated with `WorkgroupSize` must be declared using the `Input` `Storage` `Class`

`WorldRayDirectionKHR`

  A variable decorated with the `WorldRayDirectionKHR` decoration will specify the direction of the ray being processed, in world space. The value is the parameter passed into the pipeline trace ray instruction.

Valid Usage

- VUID-WorldRayDirectionKHR-WorldRayDirectionKHR-04428
  The `WorldRayDirectionKHR` decoration must be used only within the `IntersectionKHR`, `AnyHitKHR`, `ClosestHitKHR`, or `MissKHR` `Execution` `Model`

- VUID-WorldRayDirectionKHR-WorldRayDirectionKHR-04429
  The variable decorated with `WorldRayDirectionKHR` must be declared using the `Input` `Storage` `Class`

- VUID-WorldRayDirectionKHR-WorldRayDirectionKHR-04430
  The variable decorated with `WorldRayDirectionKHR` must be declared as a three-component vector of 32-bit floating-point values

`WorldRayOriginKHR`

  A variable decorated with the `WorldRayOriginKHR` decoration will specify the origin of the ray being processed, in world space. The value is the parameter passed into the pipeline trace ray instruction.

Valid Usage

- VUID-WorldRayOriginKHR-WorldRayOriginKHR-04431
  The `WorldRayOriginKHR` decoration must be used only within the `IntersectionKHR`, `AnyHitKHR`, `ClosestHitKHR`, or `MissKHR` `Execution` `Model`

- VUID-WorldRayOriginKHR-WorldRayOriginKHR-04432
  The variable decorated with `WorldRayOriginKHR` must be declared using the `Input` `Storage` `Class`

- VUID-WorldRayOriginKHR-WorldRayOriginKHR-04433
  The variable decorated with `WorldRayOriginKHR` must be declared as a three-component vector of 32-bit floating-point values

`WorldToObjectKHR`

  A variable decorated with the `WorldToObjectKHR` decoration will contain the current world-to-object transformation matrix, which is determined by the instance of the current intersection.

Valid Usage

- VUID-WorldToObjectKHR-WorldToObjectKHR-04434
  The `WorldToObjectKHR` decoration must be used only within the `IntersectionKHR`, `AnyHitKHR`, or `ClosestHitKHR` `Execution` `Model`

- VUID-WorldToObjectKHR-WorldToObjectKHR-04435
  The variable decorated with `WorldToObjectKHR` must be declared using the `Input` `Storage` `Class`

- VUID-WorldToObjectKHR-WorldToObjectKHR-04436
  The variable decorated with `WorldToObjectKHR` must be declared as a matrix with four columns of three-component vectors of 32-bit floating-point values

`HitIsSphereNV`

  A variable decorated with the `HitIsSphereNV` decoration will contain a non-zero value if the current ray hit a sphere primitive or zero otherwise.

Valid Usage

- VUID-HitIsSphereNV-HitIsSphereNV-10513
  The `HitIsSphereNV` decoration must be used only within the `AnyHitKHR`, or `ClosestHitKHR` `Execution` `Model`

- VUID-HitIsSphereNV-HitIsSphereNV-10514
  The variable decorated with `HitIsSphereNV` must be declared using the `Input` `Storage` `Class`

- VUID-HitIsSphereNV-HitIsSphereNV-10515
  The variable decorated with `HitIsSphereNV` must be declared as a boolean value

`HitIsLSSNV`

  A variable decorated with the `HitIsLSSNV` decoration will contain a non-zero value if the current ray hit a LSS primitive or zero otherwise.

Valid Usage

- VUID-HitIsLSSNV-HitIsLSSNV-10516
  The `HitIsLSSNV` decoration must be used only within the `AnyHitKHR`, or `ClosestHitKHR` `Execution` `Model`

- VUID-HitIsLSSNV-HitIsLSSNV-10517
  The variable decorated with `HitIsLSSNV` must be declared using the `Input` `Storage` `Class`

- VUID-HitIsLSSNV-HitIsLSSNV-10518
  The variable decorated with `HitIsLSSNV` must be declared as a boolean value

`HitSpherePositionNV`

  A variable decorated with the `HitSpherePositionNV` decoration will contain the position of sphere primitive intersected by current ray.

Valid Usage

- VUID-HitSpherePositionNV-HitSpherePositionNV-10519
  The `HitSpherePositionNV` decoration must be used only within the `AnyHitKHR`, or `ClosestHitKHR` `Execution` `Model`

- VUID-HitSpherePositionNV-HitSpherePositionNV-10520
  The variable decorated with `HitSpherePositionNV` must be declared using the `Input` `Storage` `Class`

- VUID-HitSpherePositionNV-HitSpherePositionNV-10521
  The variable decorated with `HitSpherePositionNV` must be declared as a three-component vector of 32-bit floating-point values

`HitSphereRadiusNV`

  A variable decorated with the `HitSphereRadiusNV` decoration will contain the radius of sphere primitive intersected by current ray.

Valid Usage

- VUID-HitSphereRadiusNV-HitSphereRadiusNV-10522
  The `HitSphereRadiusNV` decoration must be used only within the `AnyHitKHR`, or `ClosestHitKHR` `Execution` `Model`

- VUID-HitSphereRadiusNV-HitSphereRadiusNV-10523
  The variable decorated with `HitSphereRadiusNV` must be declared using the `Input` `Storage` `Class`

- VUID-HitSphereRadiusNV-HitSphereRadiusNV-10524
  The variable decorated with `HitSphereRadiusNV` must be declared as a scalar 32-bit floating-point value

`HitLSSPositionsNV`

  A variable decorated with the `HitLSSPositionsNV` decoration will contain the position of the LSS primitive intersected by current ray.

Valid Usage

- VUID-HitLSSPositionsNV-HitLSSPositionsNV-10525
  The `HitLSSPositionsNV` decoration must be used only within the `AnyHitKHR`, or `ClosestHitKHR` `Execution` `Model`

- VUID-HitLSSPositionsNV-HitLSSPositionsNV-10526
  The variable decorated with `HitLSSPositionsNV` must be declared using the `Input` `Storage` `Class`

- VUID-HitLSSPositionsNV-HitLSSPositionsNV-10527
  The variable decorated with `HitLSSPositionsNV` must be declared as an array of size two, containing three-component vector of 32-bit floating-point values

`HitLSSRadiiNV`

  A variable decorated with the `HitLSSRadiiNV` decoration will contain the radii of LSS primitive intersected by current ray.

Valid Usage

- VUID-HitLSSRadiiNV-HitLSSRadiiNV-10528
  The `HitLSSRadiiNV` decoration must be used only within the `AnyHitKHR`, or `ClosestHitKHR` `Execution` `Model`

- VUID-HitLSSRadiiNV-HitLSSRadiiNV-10529
  The variable decorated with `HitLSSRadiiNV` must be declared using the `Input` `Storage` `Class`

- VUID-HitLSSRadiiNV-HitLSSRadiiNV-10530
  The variable decorated with `HitLSSRadiiNV` must be declared as an array of size two, containing 32-bit floating-point values

`CoreCountARM`

  Decorating a variable with the `CoreCountARM` built-in decoration will make that variable contain the number of cores on the device.

Valid Usage

- VUID-CoreCountARM-CoreCountARM-07595
  The variable decorated with `CoreCountARM` must be declared using the `Input` `Storage` `Class`

- VUID-CoreCountARM-CoreCountARM-07596
  The variable decorated with `CoreCountARM` must be declared as a scalar 32-bit integer value

`CoreMaxIDARM`

  Decorating a variable with the `CoreMaxIDARM` built-in decoration will make that variable contain the max ID of any shader core on the device on which the current shader invocation is running.

Valid Usage

- VUID-CoreMaxIDARM-CoreMaxIDARM-07597
  The variable decorated with `CoreMaxIDARM` must be declared using the `Input` `Storage` `Class`

- VUID-CoreMaxIDARM-CoreMaxIDARM-07598
  The variable decorated with `CoreMaxIDARM` must be declared as a scalar 32-bit integer value

`CoreIDARM`

  Decorating a variable with the `CoreIDARM` built-in decoration will make that variable contain the ID of the core on which the current shader invocation is running. This variable is in the range [0, `CoreMaxIDARM`].

Valid Usage

- VUID-CoreIDARM-CoreIDARM-07599
  The variable decorated with `CoreIDARM` must be declared using the `Input` `Storage` `Class`

- VUID-CoreIDARM-CoreIDARM-07600
  The variable decorated with `CoreIDARM` must be declared as a scalar 32-bit integer value

`WarpMaxIDARM`

  Decorating a variable with the `WarpMaxIDARM` built-in decoration will make that variable contain the maximum warp ID for the core on which the current invocation is running.

Valid Usage

- VUID-WarpMaxIDARM-WarpMaxIDARM-07601
  The variable decorated with `WarpMaxIDARM` must be declared using the `Input` `Storage` `Class`

- VUID-WarpMaxIDARM-WarpMaxIDARM-07602
  The variable decorated with `WarpMaxIDARM` must be declared as a scalar 32-bit integer value

`WarpIDARM`

  Decorating a variable with the `WarpIDARM` built-in decoration will make that variable contain the ID of the warp on a core on which the current shader invocation is running. This variable is in the range [0, `WarpMaxIDARM`].

Valid Usage

- VUID-WarpIDARM-WarpIDARM-07603
  The variable decorated with `WarpIDARM` must be declared using the `Input` `Storage` `Class`

- VUID-WarpIDARM-WarpIDARM-07604
  The variable decorated with `WarpIDARM` must be declared as a scalar 32-bit integer value

`CoalescedInputCountAMDX`

  Decorating a variable with the `CoalescedInputCountAMDX` built-in decoration will make that variable contain the number of node dispatches that the implementation coalesced into the input for the current shader. This variable will take a value in the range [1, arraySize), where arraySize is the maximum size of the input payload array for the shader.

Valid Usage

- VUID-CoalescedInputCountAMDX-CoalescedInputCountAMDX-09172
  The variable decorated with `CoalescedInputCountAMDX` must be declared using the `Input` `Storage` `Class`

- VUID-CoalescedInputCountAMDX-CoalescedInputCountAMDX-09173
  If a variable is decorated with `CoalescedInputCountAMDX`, the `CoalescingAMDX` execution mode must be declared

- VUID-CoalescedInputCountAMDX-CoalescedInputCountAMDX-09174
  The variable decorated with `CoalescedInputCountAMDX` must be declared as a scalar 32-bit integer value

`ShaderIndexAMDX`

  Decorating a variable with the `ShaderIndexAMDX` built-in decoration will make that variable contain the index of the shader specified when it was compiled, either via VkPipelineShaderStageNodeCreateInfoAMDX::`index` or by the `ShaderIndexAMDX` execution mode.

Valid Usage

- VUID-ShaderIndexAMDX-ShaderIndexAMDX-09175
  The variable decorated with `ShaderIndexAMDX` must be declared using the `Input` `Storage` `Class`

- VUID-ShaderIndexAMDX-ShaderIndexAMDX-09176
  The variable decorated with `ShaderIndexAMDX` must be declared as a scalar 32-bit integer value

`ClusterIDNV`

  A variable decorated with the `ClusterIDNV` decoration will contain the triangle cluster ID of a hit triangle in a cluster acceleration structure if the current ray hit a triangle primitive or `-1` otherwise.

Valid Usage

- VUID-ClusterIDNV-ClusterIDNV-10531
  The `ClusterIDNV` decoration must be used only within the `AnyHitKHR`, or `ClosestHitKHR` `Execution` `Model`

- VUID-ClusterIDNV-ClusterIDNV-10532
  The variable decorated with `ClusterIDNV` must be declared using the `Input` `Storage` `Class`

- VUID-ClusterIDNV-ClusterIDNV-10533
  The variable decorated with `ClusterIDNV` must be declared as a scalar 32-bit integer value

## 20. Sampling

Sampling is performed on images, typically in conjunction with a sampler, to return a value based on a neighborhood of texels in an image.

Sampling instructions include the functionality of the following SPIR-V Image Instructions:

- `OpImageSample*` and `OpImageSparseSample*` read one or more neighboring texels of the image, and filter the texel values based on the state of the sampler.

  - Instructions with `ImplicitLod` in the name determine the LOD used in the sampling operation based on the coordinates used in neighboring fragments.

  - Instructions with `ExplicitLod` in the name determine the LOD used in the sampling operation based on additional coordinates.

  - Instructions with `Proj` in the name apply homogeneous projection to the coordinates.

- `OpImageFetch` and `OpImageSparseFetch` return a single texel of the image. No sampler is used.

- `OpImage*Gather`, `OpImageGatherQCOM`, and `OpImageSparse*Gather` read neighboring texels and return a single component of each.

- `OpImageSampleFootprintNV` identifies and returns information about the set of texels in the image that would be accessed by an equivalent `OpImageSample*` instruction.

- `OpImage*Dref*` instructions apply depth comparison on the texel values.

- `OpImageSparse*` instructions additionally return a sparse residency code.

- `OpImageQueryLod` returns the LOD parameters that would be used in a sample operation. The actual operation is not performed.

- `OpImageSampleWeightedQCOM` reads a 2D neighborhood of texels and computes a weighted average using weight values from a separate weight texture.

- `opImageBlockMatchSADQCOM` and `opTextureBlockMatchSSD` compare 2D neighborhoods of texels from two textures.

- `OpImageBoxFilterQCOM` reads a 2D neighborhood of texels and computes a weighted average of the texels.

- `opImageBlockMatchWindowSADQCOM` and `opImageBlockMatchWindowSSDQCOM` compare 2D neighborhoods of texels from two textures with the comparison repeated across a window region in the target texture.

- `opImageBlockMatchGatherSADQCOM` and `opImageBlockMatchWindowSSDQCOM` compares four 2D neighborhoods of texels from a target texture with a single 2D neighborhood in the reference texture. The R component of each comparison is gathered and returned in the output.

### 20.1. Sampling Coordinate Systems

There are three sampling coordinate systems used in this chapter:

- Normalized Sampling Coordinates

- Unnormalized Sampling Coordinates

- Integer Sampling Coordinates

SPIR-V `opImageBlockMatchSADQCOM`, `opImageBlockMatchSSDQCOM`, `opImageBlockMatchWindowSADQCOM`, `opImageBlockMatchWindowSSDQCOM`, `OpImageFetch`, and `OpImageSparseFetch` instructions use integer sampling coordinates.

Other image instructions can use either normalized or unnormalized sampling coordinates (selected by the `unnormalizedCoordinates` state of the sampler used in the instruction), but there are limitations on what operations, image state, and sampler state is supported. Normalized coordinates are logically converted to unnormalized as part of image operations, and certain steps are only performed on normalized coordinates. The array layer coordinate is always treated as unnormalized even when other coordinates are normalized.

#### 20.1.1. Normalized Sampling Coordinates

Normalized sampling coordinates are referred to as (s,t,r,q,a), with the coordinates having the following meanings:

- s: Coordinate in the first dimension of an image.

- t: Coordinate in the second dimension of an image.

- r: Coordinate in the third dimension of an image.

  - (s,t,r) are interpreted as a direction vector for Cube images.

- q: Fourth coordinate, for homogeneous (projective) coordinates.

- a: Coordinate for array layer.

The values s,t,r,q,a are all floating-point values. Values of s,t,r in the normalized range [0.0,1.0] and a in the range [0.0, layers - 1] correspond to locations in the image being sampled, where layers is the dimension of the image with the same name. The value q is used as a divisor for each of s,t,r, rather than directly corresponding to a location in an image.

The coordinates are extracted from the SPIR-V operand based on the dimensionality of the image variable and type of instruction. For `Proj` instructions, the components are in order (s, [t,] [r,] q), with t and r being conditionally present based on the `Dim` of the image. For non-`Proj` instructions, the coordinates are (s [,t] [,r] [,a]), with t and r being conditionally present based on the `Dim` of the image and a being conditionally present based on the `Arrayed` property of the image. Projective image instructions are not supported on `Arrayed` images.

#### 20.1.2. Unnormalized Sampling Coordinates

Unnormalized sampling coordinates are referred to as (u,v,w,a), with the coordinates having the following meanings:

- u: Coordinate in the first dimension of an image.

- v: Coordinate in the second dimension of an image.

- w: Coordinate in the third dimension of an image.

- a: Coordinate for array layer.

The values u,v,w,a are all floating-point values, with values in the ranges [0.0,width), [0.0, height), [0.0, depth), and [0,layers-1] corresponding to locations in the image being sampled. The values width, height, depth, and layers are the dimensions of the accessed image.

Only the u and v coordinates are directly extracted from the SPIR-V operand, because only 1D and 2D (non-`Arrayed`) dimensionalities support unnormalized coordinates. The components are in order (u [,v]), with v being conditionally present when the dimensionality is 2D. When normalized coordinates are converted to unnormalized coordinates, all four coordinates are used.

#### 20.1.3. Integer Sampling Coordinates

Integer sampling coordinates are referred to as (i,j,k,l,n), with the coordinates having the following meanings:

- i: Coordinate in the first dimension of an image.

- j: Coordinate in the second dimension of an image.

- k: Coordinate in the third dimension of an image.

- l: Coordinate for array layer.

- n: Index of the sample within the texel.

The values i,j,k,l,n are all integer values, with values in the ranges [0,width), [0, height), [0, depth), [0,layers), and [0,samples) corresponding to locations in the image being sampled. The values width, height, depth, layers, and samples are the dimensions of the accessed image.

They are extracted from the SPIR-V operand in order (i [,j] [,k] [,l] [,n]), with j and k conditionally present based on the `Dim` of the image, and l conditionally present based on the `Arrayed` property of the image. n is conditionally present and is taken from the `Sample` image operand.

Integer coordinates are used as image coordinates to perform an image read after sampling calculations, directly translating each coordinate as follows:

- i → x

- j → y

- k → z

- l → layer

- n → sample

level is calculated separately via the `Lod` image operand if present, or is set to 0 otherwise.

Integer sampling coordinates are used as image coordinates to perform an image read after sampling calculations, directly translating each coordinate as follows:

- x = i

- y = j

- z = k

- layer = l + VkImageSubresourceRange::`baseArrayLayer`

- sample = n

#### 20.1.4. Sampling Coordinate Diagrams

The following diagrams illustrate the different sampling coordinate systems for 2D images.

Figure 3. Texel Coordinate Systems, Linear Filtering

The Texel Coordinate Systems - For the example shown of an 8×4 texel two dimensional image.

- Normalized texel coordinates:

  - The s coordinate goes from 0.0 to 1.0.

  - The t coordinate goes from 0.0 to 1.0.

- Unnormalized texel coordinates:

  - The u coordinate within the range 0.0 to 8.0 is within the image, otherwise it is outside the image.

  - The v coordinate within the range 0.0 to 4.0 is within the image, otherwise it is outside the image.

- Integer texel coordinates:

  - The i coordinate within the range 0 to 7 addresses texels within the image, otherwise it is outside the image.

  - The j coordinate within the range 0 to 3 addresses texels within the image, otherwise it is outside the image.

- Also shown for linear filtering:

  - Given the unnormalized coordinates (u,v), the four texels selected are i0j0, i1j0, i0j1, and i1j1.

  - The fractions α and β.

  - Given the offset Δi and Δj, the four texels selected by the offset are i0j'0, i1j'0, i0j'1, and i1j'1.

Note | For formats with reduced-resolution components, Δi and Δj are relative to the resolution of the highest-resolution component, and therefore may be divided by two relative to the unnormalized coordinate space of the lower-resolution components.

Figure 4. Texel Coordinate Systems, Nearest Filtering

The Texel Coordinate Systems - For the example shown of an 8×4 texel two dimensional image.

- Texel coordinates as above. Also shown for nearest filtering:

  - Given the unnormalized coordinates (u,v), the texel selected is ij.

  - Given the offset Δi and Δj, the texel selected by the offset is ij'.

For corner-sampled images, the texel samples are located at the grid intersections instead of the texel centers.

Figure 5. Texel Coordinate Systems, Corner Sampling

### 20.2. Sampling Operations

Sampling instructions are SPIR-V image instructions that read from an image with a sampler. Sampling operations are a set of steps that are performed on state, coordinates, and texel values while processing a sampling instruction, and which are common to some or all sampling instructions. They include the following steps, which are performed in the listed order:

- Validation operations

  - Instruction/Format/Sampler/Image validation

  - Coordinate validation

  - Layout validation

  - Cube Map Edge Handling

- Border Replacement

- Texel Reads

- Depth comparison

- Component swizzle

- Y′CBCR degamma

- Chroma reconstruction

- Y′CBCR conversion

For sampling instructions involving multiple texels (for sampling or gathering), these steps are applied for each texel that is used in the instruction. Depending on the type of sampling instruction, other steps are conditionally performed between these steps or involving multiple coordinate or texel values.

If Chroma Reconstruction is implicit, Texel Filtering instead takes place during chroma reconstruction, before sampler Y′CBCR conversion occurs.

The operations described in block matching are performed before Component Substitution during texel read.

The operations described in weight image sampling are performed before Component swizzle.

#### 20.2.1. Texel Input Validation Operations

Texel input validation operations inspect instruction/image/sampler state or coordinates, and in certain circumstances cause the texel value to be replaced or become undefined. There are a series of validations that the texel undergoes.

##### Instruction/Format/Sampler/Image View Validation

There are a number of cases where a SPIR-V instruction can mismatch with the sampler, the image view, or both, and a number of further cases where the sampler can mismatch with the image view. In such cases the value of the texel returned is poison.

These cases include:

- The sampler `borderColor` is an integer type and the image view `format` is not one of the VkFormat integer types or a stencil component of a depth/stencil format.

- The sampler `borderColor` is a float type and the image view `format` is not one of the VkFormat float types or a depth component of a depth/stencil format.

- The sampler `borderColor` is one of the opaque black colors (VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK or VK_BORDER_COLOR_INT_OPAQUE_BLACK) and the image view VkComponentSwizzle for any of the VkComponentMapping components is not the identity swizzle, and VkPhysicalDeviceBorderColorSwizzleFeaturesEXT::`borderColorSwizzleFromImage` feature is not enabled, and VkSamplerBorderColorComponentMappingCreateInfoEXT is not specified.

- VkSamplerBorderColorComponentMappingCreateInfoEXT::`components`, if specified, has a component swizzle that does not match the component swizzle of the image view, and either component swizzle is not a form of identity swizzle.

- VkSamplerBorderColorComponentMappingCreateInfoEXT::`srgb`, if specified, does not match the sRGB encoding of the image view.

- The sampler `borderColor` is a custom color (VK_BORDER_COLOR_FLOAT_CUSTOM_EXT or VK_BORDER_COLOR_INT_CUSTOM_EXT) and the supplied VkSamplerCustomBorderColorCreateInfoEXT::`customBorderColor` is outside the bounds of the values representable in the image view’s `format`.

- The sampler `borderColor` is a custom color (VK_BORDER_COLOR_FLOAT_CUSTOM_EXT or VK_BORDER_COLOR_INT_CUSTOM_EXT) and the image view VkComponentSwizzle for any of the VkComponentMapping components is not the identity swizzle, and VkPhysicalDeviceBorderColorSwizzleFeaturesEXT::`borderColorSwizzleFromImage` feature is not enabled, and VkSamplerBorderColorComponentMappingCreateInfoEXT is not specified.

- The VkImageLayout of any subresource in the image view does not match the VkDescriptorImageInfo::`imageLayout` used to write the image descriptor.

- The SPIR-V Image Format is not compatible with the image view’s or buffer view’s `format`.

- The sampler `unnormalizedCoordinates` is VK_TRUE and any of the limitations of unnormalized coordinates are violated.

- The sampler was created with `flags` containing VK_SAMPLER_CREATE_SUBSAMPLED_BIT_EXT and the image was not created with `flags` containing VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT.

- The sampler was not created with `flags` containing VK_SAMPLER_CREATE_SUBSAMPLED_BIT_EXT and the image was created with `flags` containing VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT.

- The sampler was created with `flags` containing VK_SAMPLER_CREATE_SUBSAMPLED_BIT_EXT and is used with a function that is not `OpImageSampleImplicitLod` or `OpImageSampleExplicitLod`, or is used with operands `Offset` or `ConstOffsets`.

- The SPIR-V instruction is one of the `OpImage*Dref*` instructions and the sampler `compareEnable` is VK_FALSE

- The SPIR-V instruction is not one of the `OpImage*Dref*` instructions and the sampler `compareEnable` is VK_TRUE

- The SPIR-V instruction is one of the `OpImage*Dref*` instructions, the image view `format` is one of the depth/stencil formats, and the image view aspect is not VK_IMAGE_ASPECT_DEPTH_BIT.

- The SPIR-V instruction’s image variable’s properties are not compatible with the image view:

  - If the image view’s `viewType` is VK_IMAGE_VIEW_TYPE_1D_ARRAY or VK_IMAGE_VIEW_TYPE_2D_ARRAY, and the image was not created with VK_IMAGE_CREATE_ALIAS_SINGLE_LAYER_DESCRIPTOR_BIT_KHR, then the instruction must have `Arrayed` = 1.

  - If the image view’s `viewType` is VK_IMAGE_VIEW_TYPE_1D or VK_IMAGE_VIEW_TYPE_2D, and the image was not created with VK_IMAGE_CREATE_ALIAS_SINGLE_LAYER_DESCRIPTOR_BIT_KHR, the instruction must have `Arrayed` = 0.

  - If the image view’s `viewType` is VK_IMAGE_VIEW_TYPE_1D_ARRAY or VK_IMAGE_VIEW_TYPE_2D_ARRAY and `Arrayed` = 0, the image view must have been created with a single layer.

  - If the image view’s `viewType` is VK_IMAGE_VIEW_TYPE_CUBE_ARRAY then the instruction must have `Arrayed` = 1.

  - If the image view’s `viewType` is VK_IMAGE_VIEW_TYPE_CUBE then the instruction must have `Arrayed` = 0.

  - If the image was created with VkImageCreateInfo::`samples` equal to VK_SAMPLE_COUNT_1_BIT, the instruction must have `MS` = 0.

  - If the image was created with VkImageCreateInfo::`samples` not equal to VK_SAMPLE_COUNT_1_BIT, the instruction must have `MS` = 1.

  - If the `Sampled` `Type` of the `OpTypeImage` does not match the SPIR-V Type.

  - If the signedness of any read or sample operation does not match the signedness of the image’s format.

- If the image was created with VkImageCreateInfo::`flags` containing VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV, the sampler addressing modes must only use a VkSamplerAddressMode of VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE.

- The SPIR-V instruction is `OpImageSampleFootprintNV` with `Dim` = 2D and `addressModeU` or `addressModeV` in the sampler is not VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE.

- The SPIR-V instruction is `OpImageSampleFootprintNV` with `Dim` = 3D and `addressModeU`, `addressModeV`, or `addressModeW` in the sampler is not VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE.

- The sampler was created with a specified VkSamplerCustomBorderColorCreateInfoEXT::`format` which does not match the VkFormat of the image view(s) it is sampling.

- The sampler is sampling an image view of VK_FORMAT_B4G4R4A4_UNORM_PACK16, VK_FORMAT_B5G6R5_UNORM_PACK16, or VK_FORMAT_B5G5R5A1_UNORM_PACK16 format without a specified VkSamplerCustomBorderColorCreateInfoEXT::`format`.

If the underlying `VkImage` format has an X component in its format description, undefined values are read from those bits.

Note | If the `VkImage` format and `VkImageView` format are the same, these bits will be unused by format conversion and this will have no effect. However, if the `VkImageView` format is different, then some bits of the result may be undefined. For example, when a VK_FORMAT_R10X6_UNORM_PACK16 `VkImage` is sampled via a VK_FORMAT_R16_UNORM `VkImageView`, the low 6 bits of the value before format conversion are undefined and format conversion may return a range of different values.

Note | When accessing storage images or texel buffers, there are many valid usage statements that prevent the `OpTypeImage` and VkFormat from being different with respect to things such as numeric type, number of components, etc. Texel output validation covers cases such as using `R32ui` with VK_FORMAT_R8_UINT that for historical reasons are not considered invalid usage, but still result in undefined values. Validation layers will provide a warning in these undefined value cases.

Note | Some implementations will return undefined values in the case where a sampler uses a VkSamplerAddressMode of VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT, the sampler is used with operands `Offset`, `ConstOffset`, or `ConstOffsets`, and the value of the offset is larger than or equal to the corresponding width, height, or depth of any accessed image level. This behavior was not tested prior to Vulkan conformance test suite version 1.3.8.0. Affected implementations will have a conformance test waiver for this issue.

##### Layout Validation

If all planes of a disjoint multi-planar image are not in the same image layout, the image must not be sampled with sampler Y′CBCR conversion enabled.

##### Coordinate Validation

Once the normalized or unnormalized coordinates have been converted to integer image coordinates, the integer coordinates are validated as image coordinates, as outlined in Image Coordinate Validation, converted as follows:

- x = i

- y = j

- z = k

- layer = l

- sample = n

- level = d

##### Cube Map Edge Handling

When sampling a cube map, if the image coordinates are out of bounds of the selected cube map face, the following steps are performed.

Note | This does not occur when using VK_FILTER_NEAREST filtering within a mip level, since VK_FILTER_NEAREST is treated as using VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE.

- Cube Map Edge Texel

  - If the texel lies beyond the selected cube map face in either only x or only y, then the coordinates (x,y,layer) are transformed to select the adjacent texel from the appropriate neighboring face.

- Cube Map Corner Texel

  - If the texel lies beyond the selected cube map face in both x and y, then there is no unique neighboring face from which to read that texel. The texel should be replaced by the average of the three values of the adjacent texels in each incident face. However, implementations may replace the cube map corner texel by other methods. The methods are subject to the constraint that for linear filtering if the three available texels have the same value, the resulting filtered texel must have that value, and for cubic filtering if the twelve available samples have the same value, the resulting filtered texel must have that value.

#### 20.2.2. Border Replacement

If the sampler includes a border, out of bounds texels are replaced with a value based on the image format and the `borderColor` of the sampler. The border color is:

Table 29. Border Color B, Custom Border Color VkSamplerCustomBorderColorCreateInfoEXT::`customBorderColor` U
Sampler `borderColor` | Corresponding Border Color
--- | ---
VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK | [Br, Bg, Bb, Ba] = [0.0, 0.0, 0.0, 0.0]
VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK | [Br, Bg, Bb, Ba] = [0.0, 0.0, 0.0, 1.0]
VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE | [Br, Bg, Bb, Ba] = [1.0, 1.0, 1.0, 1.0]
VK_BORDER_COLOR_INT_TRANSPARENT_BLACK | [Br, Bg, Bb, Ba] = [0, 0, 0, 0]
VK_BORDER_COLOR_INT_OPAQUE_BLACK | [Br, Bg, Bb, Ba] = [0, 0, 0, 1]
VK_BORDER_COLOR_INT_OPAQUE_WHITE | [Br, Bg, Bb, Ba] = [1, 1, 1, 1]
VK_BORDER_COLOR_FLOAT_CUSTOM_EXT | [Br, Bg, Bb, Ba] = [Ur, Ug, Ub, Ua]
VK_BORDER_COLOR_INT_CUSTOM_EXT | [Br, Bg, Bb, Ba] = [Ur, Ug, Ub, Ua]

The custom border color (U) may be rounded by implementations prior to texel replacement, but the error introduced by such a rounding must not exceed one ULP of the image’s `format`.

Note | The names `VK_BORDER_COLOR_*_TRANSPARENT_BLACK`, `VK_BORDER_COLOR_*_OPAQUE_BLACK`, and `VK_BORDER_COLOR_*_OPAQUE_WHITE` are meant to describe which components are zeros and ones in the vocabulary of compositing, and are not meant to imply that the numerical value of VK_BORDER_COLOR_INT_OPAQUE_WHITE is a saturating value for integers.

This is substituted for the texel value by replacing the number of components in the image format

Table 30. Border Texel Components After Replacement
Texel Aspect or Format | Component Assignment
--- | ---
Depth aspect | D = Br
Stencil aspect | S = Br†
One component color format | Colorr = Br
Two component color format | [Colorr,Colorg] = [Br,Bg]
Three component color format | [Colorr,Colorg,Colorb] = [Br,Bg,Bb]
Four component color format | [Colorr,Colorg,Colorb,Colora] = [Br,Bg,Bb,Ba]
Single component alpha format | [Colorr,Colorg,Colorb, Colora] = [0,0,0,Ba]

† S = Bg may be substituted as the replacement method by the implementation when VkSamplerCreateInfo::`borderColor` is VK_BORDER_COLOR_INT_CUSTOM_EXT and VkSamplerCustomBorderColorCreateInfoEXT::`format` is VK_FORMAT_UNDEFINED. Implementations should use S = Br as the replacement method.

If `rgba4OpaqueBlackSwizzled` is VK_FALSE, the implementation may swap the blue and alpha channels when sampling non-custom border colors with the VK_FORMAT_B4G4R4A4_UNORM_PACK16 format, or the red and alpha channels with the VK_FORMAT_R4G4B4A4_UNORM_PACK16 format.

Note | As VK_FORMAT_B4G4R4A4_UNORM_PACK16 is required by Vulkan, support must be advertised for this format. Some Vulkan implementations on Apple hardware implement these formats through a hardware format with a different channel order, swizzled to match Vulkan’s expectations. Unfortunately the swizzle cannot be readily applied to the fixed border colors - resulting in the apparent channel swap. For most standard border colors this does not result in a modification to the sampled output. However, `VK_BORDER_COLOR_*_OPAQUE_BLACK` will instead be sampled as transparent red or blue. If the `customBorderColorWithoutFormat` feature is supported and enabled, this functionality is expected to work without issue, but this feature may come with a performance cost.

When border color replacement occurs, texel reads are skipped, and the replaced color is used for ongoing operations instead.

#### 20.2.3. Texel Reads

A texel is read from an image, performed as outlined in Image Reads, using the converted image coordinates.

The returned components of each texel are then processed by further input operations.

#### 20.2.4. Depth Compare Operation

If the image view has a depth/stencil format, the depth component is selected by the `aspectMask`, and the operation is an `OpImage*Dref*` instruction, a depth comparison is performed. The result is 1.0 if the comparison evaluates to true, and 0.0 otherwise. This value replaces the depth component D.

The compare operation is selected by the VkCompareOp value set by VkSamplerCreateInfo::`compareOp`. The reference value from the SPIR-V operand Dref and the texel depth value Dtex are used as the reference and test values, respectively, in that operation.

If the image being sampled has an unsigned normalized fixed-point format, then Dref is clamped to [0,1] before the compare operation.

If the value of `magFilter` is VK_FILTER_LINEAR, or the value of `minFilter` is VK_FILTER_LINEAR, then D may be computed in an implementation-dependent manner which differs from the normal rules of linear filtering. The resulting value must be in the range [0,1] and should be proportional to, or a weighted average of, the number of comparison passes or failures.

#### 20.2.5. Component Swizzle

All texel input instructions apply a swizzle based on:

- the VkComponentSwizzle enums in the `components` member of the VkImageViewCreateInfo structure for the image being read if sampler Y′CBCR conversion is not enabled, and

- the VkComponentSwizzle enums in the `components` member of the VkSamplerYcbcrConversionCreateInfo structure for the sampler Y′CBCR conversion if sampler Y′CBCR conversion is enabled.

The swizzle can rearrange the components of the texel, or substitute zero or one for any components. It is defined as follows for each color component:

C o l o r component′​​=⎩
⎨
⎧​C o l o r r​C o l o r g​C o l o r b​C o l o r a​0 one identit y​for RED swizzle for GREEN swizzle for BLUE swizzle for ALPHA swizzle for ZERO swizzle for ONE swizzle for IDENTITY swizzle​​

where:

one identit y​={​1.0f 1​for floating-point components for integer components​=⎩
⎨
⎧​​C o l o r r​C o l o r g​C o l o r b​C o l o r a​​for component=r for component=g for component=b for component=a​​

If the border color is one of the `VK_BORDER_COLOR_*_OPAQUE_BLACK` enums and the VkComponentSwizzle is not the identity swizzle for all components, the value of the texel after swizzle is undefined.

If the image view has a depth/stencil format and the VkComponentSwizzle is VK_COMPONENT_SWIZZLE_ONE, and `VkPhysicalDeviceMaintenance5Properties`::`depthStencilSwizzleOneSupport` is not VK_TRUE, the value of the texel after swizzle is undefined.

#### 20.2.6. Sparse Residency

`OpImageSparse*` instructions return a structure which includes a residency code indicating whether any texels accessed by the instruction are sparse unbound texels. This code can be interpreted by the `OpImageSparseTexelsResident` instruction which converts the residency code to a boolean value.

#### 20.2.7. Y′CBCR Degamma

If VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM::`enableYDegamma` is equal to VK_TRUE, then sRGB to linear conversion is applied to the G component of the sampled values as described in the “sRGB EOTF” section of the Khronos Data Format Specification.

If VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM::`enableCbCrDegamma` is equal to VK_TRUE, then sRGB to linear conversion is applied to the R and B components of the sampled values as described in the “sRGB EOTF” section of the Khronos Data Format Specification.

#### 20.2.8. Chroma Reconstruction

In some color models, the color representation is defined in terms of monochromatic light intensity (often called “luma”) and color differences relative to this intensity, often called “chroma”. It is common for color models other than RGB to represent the chroma components at lower spatial resolution than the luma component. This approach is used to take advantage of the eye’s lower spatial sensitivity to color compared with its sensitivity to brightness. Less commonly, the same approach is used with additive color, since the green component dominates the eye’s sensitivity to light intensity and the spatial sensitivity to color introduced by red and blue is lower.

Lower-resolution components are “downsampled” by resizing them to a lower spatial resolution than the component representing luminance. This process is also commonly known as “chroma subsampling”. There is one luminance sample in each texture texel, but each chrominance sample may be shared among several texels in one or both texture dimensions.

- “`_444`” formats do not spatially downsample chroma values compared with luma: there are unique chroma samples for each texel.

- “`_422`” formats have downsampling in the x dimension (corresponding to u or s coordinates): they are sampled at half the resolution of luma in that dimension.

- “`_420`” formats have downsampling in the x dimension (corresponding to u or s coordinates) and the y dimension (corresponding to v or t coordinates): they are sampled at half the resolution of luma in both dimensions.

The process of reconstructing a full color value for texture access involves accessing both chroma and luma values at the same location. To generate the color accurately, the values of the lower-resolution components at the location of the luma samples are reconstructed from the lower-resolution sample locations, an operation known here as “chroma reconstruction” irrespective of the actual color model.

The location of the chroma samples relative to the luma coordinates is determined by the `xChromaOffset` and `yChromaOffset` members of the VkSamplerYcbcrConversionCreateInfo structure used to create the sampler Y′CBCR conversion.

The following diagrams show the relationship between unnormalized (u,v) coordinates and (i,j) integer texel positions in the luma component (shown in black, with circles showing integer sample positions) and the texel coordinates of reduced-resolution chroma components, shown as crosses in red.

Note | If the chroma values are reconstructed at the locations of the luma samples by means of interpolation, chroma samples from outside the image bounds are needed; these are determined according to Wrapping Operation. These diagrams represent this by showing the bounds of the “chroma texel” extending beyond the image bounds, and including additional chroma sample positions where required for interpolation. The limits of a sample for `NEAREST` sampling is shown as a grid.

Figure 6. 422 downsampling, xChromaOffset=COSITED_EVEN
Figure 7. 422 downsampling, xChromaOffset=MIDPOINT
Figure 8. 420 downsampling, xChromaOffset=COSITED_EVEN, yChromaOffset=COSITED_EVEN
Figure 9. 420 downsampling, xChromaOffset=MIDPOINT, yChromaOffset=COSITED_EVEN
Figure 10. 420 downsampling, xChromaOffset=COSITED_EVEN, yChromaOffset=MIDPOINT
Figure 11. 420 downsampling, xChromaOffset=MIDPOINT, yChromaOffset=MIDPOINT

Reconstruction is implemented in one of two ways:

If the format of the image that is to be sampled sets VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT, or the VkSamplerYcbcrConversionCreateInfo’s `forceExplicitReconstruction` is VK_TRUE, reconstruction is performed as an explicit step independent of filtering, described in the Explicit Reconstruction section.

If the format of the image that is to be sampled does not set VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT and if the VkSamplerYcbcrConversionCreateInfo’s `forceExplicitReconstruction` is VK_FALSE, reconstruction is performed as an implicit part of filtering prior to color model conversion, with no separate post-conversion texel filtering step, as described in the Implicit Reconstruction section.

##### Explicit Reconstruction

- If the `chromaFilter` member of the VkSamplerYcbcrConversionCreateInfo structure is VK_FILTER_NEAREST:

  - If the format’s R and B components are reduced in resolution in just width by a factor of two relative to the G component (i.e. this is a “`_422`” format), the τ ijk​[l e v e l] values accessed by texel filtering are reconstructed as follows:

    τ R′​(i, j)τ B′​(i, j)​=τ R​(⌊i×0.5⌋,j)[l e v e l]=τ B​(⌊i×0.5⌋,j)[l e v e l]​

  - If the format’s R and B components are reduced in resolution in width and height by a factor of two relative to the G component (i.e. this is a “`_420`” format), the τ ijk​[l e v e l] values accessed by texel filtering are reconstructed as follows:

    τ R′​(i, j)τ B′​(i, j)​=τ R​(⌊i×0.5⌋,⌊j×0.5⌋)[l e v e l]=τ B​(⌊i×0.5⌋,⌊j×0.5⌋)[l e v e l]​

    Note | `xChromaOffset` and `yChromaOffset` have no effect if `chromaFilter` is VK_FILTER_NEAREST for explicit reconstruction.

- If the `chromaFilter` member of the VkSamplerYcbcrConversionCreateInfo structure is VK_FILTER_LINEAR:

  - If the format’s R and B components are reduced in resolution in just width by a factor of two relative to the G component (i.e. this is a “`_422`” format):

    - If `xChromaOffset` is VK_CHROMA_LOCATION_COSITED_EVEN:

      τ RB′​(i, j)=⎩
      ⎨
      ⎧​τ RB​(⌊i×0.5⌋,j)[l e v e l],0.5×τ RB​(⌊i×0.5⌋,j)[l e v e l]+0.5×τ RB​(⌊i×0.5⌋+1, j)[l e v e l],​0.5×i=⌊0.5×i⌋0.5×i=⌊0.5×i⌋​

    - If `xChromaOffset` is VK_CHROMA_LOCATION_MIDPOINT:

      τ RB′​(i, j)=⎩
      ⎨
      ⎧​0.25×τ RB​(⌊i×0.5⌋−1, j)[l e v e l]+0.75×τ RB​(⌊i×0.5⌋,j)[l e v e l],0.75×τ RB​(⌊i×0.5⌋,j)[l e v e l]+0.25×τ RB​(⌊i×0.5⌋+1, j)[l e v e l],​0.5×i=⌊0.5×i⌋0.5×i=⌊0.5×i⌋​

  - If the format’s R and B components are reduced in resolution in width and height by a factor of two relative to the G component (i.e. this is a “`_420`” format), a similar relationship applies. Due to the number of options, these formulae are expressed more concisely as follows:

    i RB​j RB​i f l oor​j f l oor​i f r ac​j f r ac​​={0.5×(i)0.5×(i−0.5)​xChromaOffset = COSITED _ EVEN xChromaOffset = MIDPOINT​={0.5×(j)0.5×(j−0.5)​yChromaOffset = COSITED _ EVEN yChromaOffset = MIDPOINT​=⌊i RB​⌋=⌊j RB​⌋=i RB​−i f l oor​=j RB​−j f l oor​​
    τ RB′​(i, j)=​τ RB​(i f l oor​,j f l oor​)[l e v e l]τ RB​(1+i f l oor​,j f l oor​)[l e v e l]τ RB​(i f l oor​,1+j f l oor​)[l e v e l]τ RB​(1+i f l oor​,1+j f l oor​)[l e v e l]​××××​(1−i f r ac​)(i f r ac​)(1−i f r ac​)(i f r ac​)​​××××​(1−j f r ac​)(1−j f r ac​)(j f r ac​)(j f r ac​)​+++​

Note | In the case where the texture itself is bilinearly interpolated as described in Texel Filtering, thus requiring four full-color samples for the filtering operation, and where the reconstruction of these samples uses bilinear interpolation in the chroma components due to `chromaFilter`=VK_FILTER_LINEAR, up to nine chroma samples may be required, depending on the sample location.

##### Implicit Reconstruction

Implicit reconstruction takes place by the samples being interpolated, as required by the filter settings of the sampler, except that `chromaFilter` takes precedence for the chroma samples.

If `chromaFilter` is VK_FILTER_NEAREST, an implementation may behave as if `xChromaOffset` and `yChromaOffset` were both VK_CHROMA_LOCATION_MIDPOINT, irrespective of the values set.

Note | This will not have any visible effect if the locations of the luma samples coincide with the location of the samples used for rasterization.

The sample coordinates are adjusted by the downsample factor of the component (such that, for example, the sample coordinates are divided by two if the component has a downsample factor of two relative to the luma component):

u RB′​(422/420)v RB′​(420)​={0.5×(u+0.5),0.5×u,​xChromaOffset = COSITED _ EVEN xChromaOffset = MIDPOINT​={0.5×(v+0.5),0.5×v,​yChromaOffset = COSITED _ EVEN yChromaOffset = MIDPOINT​​

#### 20.2.9. Sampler Y′CBCR Conversion

Sampler Y′CBCR conversion performs the following operations on sampled data, in order:

1. Sampler Y′CBCR Component Swizzle

2. Sampler Y′CBCR Range Expansion

3. Sampler Y′CBCR Model Conversion

An implementation may combine the range expansion and model conversion into a single mathematical operation.

These operations are applied to color component values after sampling operations which are not specific to sampler Y′CBCR conversion have completed.

##### Sampler Y′CBCR Component Swizzle

Rather than the component swizzle performed as part of sampling, which is banned for Y′CBCR image views used with sampler Y′CBCR conversion, the component swizzle specified by VkSamplerYcbcrConversionCreateInfo::`components` is applied to the sampled data instead. This is applied in the same way as the component swizzle usually performed during sampling.

##### Sampler Y′CBCR Range Expansion

Sampler Y′CBCR range expansion is not applied if `ycbcrModel` is VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY.

For other values of `ycbcrModel`, range expansion applies independently to each component of the sampled data. For the purposes of range expansion and Y′CBCR model conversion, the R and B components contain color difference (chroma) values and the G component contains luma. The A component is not modified by sampler Y′CBCR range expansion.

The range expansion to be applied is defined by the `ycbcrRange` member of the VkSamplerYcbcrConversionCreateInfo structure:

- If `ycbcrRange` is VK_SAMPLER_YCBCR_RANGE_ITU_FULL, the following transformations are applied:

  Y′C B​C R​​=C r g ba′​[G]=C r g ba′​[B]−(2 n)−1 2(n−1)​=C r g ba′​[R]−(2 n)−1 2(n−1)​​

  Note | These formulae correspond to the “full range” encoding in the “Quantization schemes” chapter of the Khronos Data Format Specification. Should any future amendments be made to the ITU specifications from which these equations are derived, the formulae used by Vulkan may also be updated to maintain parity.

- If `ycbcrRange` is VK_SAMPLER_YCBCR_RANGE_ITU_NARROW, the following transformations are applied:

  Y′C B​C R​​=219×2 n−8 C r g ba′​[G]×(2 n−1)−16×2 n−8​=224×2 n−8 C r g ba′​[B]×(2 n−1)−128×2 n−8​=224×2 n−8 C r g ba′​[R]×(2 n−1)−128×2 n−8​​

  Note | These formulae correspond to the “narrow range” encoding in the “Quantization schemes” chapter of the Khronos Data Format Specification.

- n is the bit-depth of the components in the format.

The precision of the operations performed during range expansion must be at least that of the source format.

An implementation may clamp the results of these range expansion operations such that Y′ falls in the range [0,1], and/or such that CB and CR fall in the range [-0.5,0.5].

##### Sampler Y′CBCR Model Conversion

The range-expanded values are converted between color models, according to the color model conversion specified in the `ycbcrModel` member:

VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY

  The color components are not modified by the color model conversion since they are assumed already to represent the desired color model in which the shader is operating; Y′CBCR range expansion is also ignored.

VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY

  The color components are not modified by the color model conversion and are assumed to be treated as though in Y′CBCR form both in memory and in the shader; Y′CBCR range expansion is applied to the components as for other Y′CBCR models, with the vector (CR,Y′,CB,A) provided to the shader.

VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709

  The color components are transformed from a Y′CBCR representation to an R′G′B′ representation as described in the “BT.709 Y′CBCR conversion” section of the Khronos Data Format Specification.

VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601

  The color components are transformed from a Y′CBCR representation to an R′G′B′ representation as described in the “BT.601 Y′CBCR conversion” section of the Khronos Data Format Specification.

VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020

  The color components are transformed from a Y′CBCR representation to an R′G′B′ representation as described in the “BT.2020 Y′CBCR conversion” section of the Khronos Data Format Specification.

In this operation, each output component is dependent on each input component.

An implementation may clamp the R′G′B′ results of these conversions to the range [0,1].

The precision of the operations performed during model conversion must be at least that of the source format.

The alpha component is not modified by these model conversions.

Note | Sampling operations in a non-linear color space can introduce color and intensity shifts at sharp transition boundaries. To avoid this issue, the technically precise color correction sequence described in the “Introduction to Color Conversions” chapter of the Khronos Data Format Specification may be performed as follows: Calculate the unnormalized texel coordinates corresponding to the desired sample position. For a `minFilter` or `magFilter` of VK_FILTER_NEAREST: Calculate (i,j) for the sample location as described under the “nearest filtering” formulae in (u,v,w,a) to (i,j,k,l,n) Transformation and Array Layer Selection Calculate the normalized texel coordinates corresponding to these integer coordinates. Sample using sampler Y′CBCR conversion at this location. For a `minFilter` or `magFilter` of VK_FILTER_LINEAR: Calculate (i[0,1],j[0,1]) for the sample location as described under the “linear filtering” formulae in (u,v,w,a) to (i,j,k,l,n) Transformation and Array Layer Selection Calculate the normalized texel coordinates corresponding to these integer coordinates. Sample using sampler Y′CBCR conversion at each of these locations. Convert the non-linear A′R′G′B′ outputs of the Y′CBCR conversions to linear ARGB values as described in the “Transfer Functions” chapter of the Khronos Data Format Specification. Interpolate the linear ARGB values using the α and β values described in the “linear filtering” section of (u,v,w,a) to (i,j,k,l,n) Transformation and Array Layer Selection and the equations in Texel Filtering. The additional calculations and, especially, additional number of sampling operations in the VK_FILTER_LINEAR case can be expected to have a performance impact compared with using the outputs directly. Since the variations from “correct” results are subtle for most content, the application author should determine whether a more costly implementation is strictly necessary. If `chromaFilter`, and `minFilter` or `magFilter` are both VK_FILTER_NEAREST, these operations are redundant and sampling using sampler Y′CBCR conversion at the desired sample coordinates will produce the “correct” results without further processing.

### 20.3. Normalized Texel Coordinate Operations

If the image sampler instruction provides normalized texel coordinates, some of the following operations are performed.

#### 20.3.1. Projection Operation

For `Proj` image operations, the normalized texel coordinates (s,t,r,q,a) and (if present) the Dref coordinate are transformed as follows:

s t r D ref​​=q s​,=q t​,=q r​,=q D ref​​,​for 1D, 2D, or 3D image for 2D or 3D image for 3D image if provided​

#### 20.3.2. Derivative Image Operations

Derivatives are used for LOD selection. These derivatives are either implicit (in an `ImplicitLod` image instruction in a mesh, task, compute, or fragment shader) or explicit (provided explicitly by shader to the image instruction in any shader).

For implicit derivatives image instructions, the derivatives of texel coordinates are calculated in the same manner as derivative operations. That is:

∂s/∂x∂t/∂x∂r/∂x​=d P dx(s),=d P dx(t),=d P dx(r),​∂s/∂y∂t/∂y∂r/∂y​=d P d y(s),=d P d y(t),=d P d y(r),​for 1D, 2D, Cube, or 3D image for 2D, Cube, or 3D image for Cube or 3D image​

Partial derivatives not defined above for certain image dimensionalities are set to zero.

For explicit LOD image instructions, if the optional SPIR-V operand `Grad` is provided, then the operand values are used for the derivatives. The number of components present in each derivative for a given image dimensionality matches the number of partial derivatives computed above.

If the optional SPIR-V operand `Lod` is provided, then derivatives are set to zero, the cube map derivative transformation is skipped, and the scale factor operation is skipped. Instead, the floating-point scalar coordinate is directly assigned to λbase as described in LOD Operation.

If the image or sampler object used by an implicit derivative image instruction is not uniform across the quad and `quadDivergentImplicitLod` is not supported, then the derivative and LOD values are undefined. Implicit derivatives are well-defined when the image and sampler and control flow are uniform across the quad, even if they diverge between different quads.

If `quadDivergentImplicitLod` is supported, then derivatives and implicit LOD values are well-defined even if the image or sampler object are not uniform within a quad. The derivatives are computed as specified above, and the implicit LOD calculation proceeds for each shader invocation using its respective image and sampler object.

#### 20.3.3. Cube Map Face Selection and Transformations

For cube map image instructions, the (s,t,r) coordinates are treated as a direction vector (rx,ry,rz). The direction vector is used to select a cube map face. The direction vector is transformed to a per-face texel coordinate system (sface,tface), The direction vector is also used to transform the derivatives to per-face derivatives.

#### 20.3.4. Cube Map Face Selection

The direction vector selects one of the cube map’s faces based on the largest magnitude coordinate direction (the major axis direction). Since two or more coordinates can have identical magnitude, the implementation must have rules to disambiguate this situation.

The rules should have as the first rule that rz wins over ry and rx, and the second rule that ry wins over rx. An implementation may choose other rules, but the rules must be deterministic and depend only on (rx,ry,rz).

The layer number (corresponding to a cube map face), the coordinate selections for sc, tc, rc, and the selection of derivatives, are determined by the major axis direction as specified in the following two tables.

Table 31. Cube Map Face and Coordinate Selection
Major Axis Direction | Layer Number | Cube Map Face | sc | tc | rc
--- | --- | --- | --- | --- | ---
+rx | 0 | Positive X | -rz | -ry | rx
-rx | 1 | Negative X | +rz | -ry | rx
+ry | 2 | Positive Y | +rx | +rz | ry
-ry | 3 | Negative Y | +rx | -rz | ry
+rz | 4 | Positive Z | +rx | -ry | rz
-rz | 5 | Negative Z | -rx | -ry | rz

Table 32. Cube Map Derivative Selection
Major Axis Direction | ∂sc / ∂x | ∂sc / ∂y | ∂tc / ∂x | ∂tc / ∂y | ∂rc / ∂x | ∂rc / ∂y
--- | --- | --- | --- | --- | --- | ---
+rx | -∂rz / ∂x | -∂rz / ∂y | -∂ry / ∂x | -∂ry / ∂y | +∂rx / ∂x | +∂rx / ∂y
-rx | +∂rz / ∂x | +∂rz / ∂y | -∂ry / ∂x | -∂ry / ∂y | -∂rx / ∂x | -∂rx / ∂y
+ry | +∂rx / ∂x | +∂rx / ∂y | +∂rz / ∂x | +∂rz / ∂y | +∂ry / ∂x | +∂ry / ∂y
-ry | +∂rx / ∂x | +∂rx / ∂y | -∂rz / ∂x | -∂rz / ∂y | -∂ry / ∂x | -∂ry / ∂y
+rz | +∂rx / ∂x | +∂rx / ∂y | -∂ry / ∂x | -∂ry / ∂y | +∂rz / ∂x | +∂rz / ∂y
-rz | -∂rx / ∂x | -∂rx / ∂y | -∂ry / ∂x | -∂ry / ∂y | -∂rz / ∂x | -∂rz / ∂y

#### 20.3.5. Cube Map Coordinate Transformation

s face​t face​​=2 1​×∣r c​∣s c​​+2 1​=2 1​×∣r c​∣t c​​+2 1​​

#### 20.3.6. Cube Map Derivative Transformation

The partial derivatives of the Cube Map Coordinate Transformations can be computed as:

∂x∂s face​​​=∂x∂​(2 1​×∣r c​∣s c​​+2 1​)=2 1​×∂x∂​(∣r c​∣s c​​)=2 1​×((r c​)2∣r c​∣×∂s c​/∂x−s c​×∂r c​/∂x​)​

The other derivatives are simplified similarly, resulting in

∂y∂s face​​∂x∂t face​​∂y∂t face​​​=2 1​×((r c​)2∣r c​∣×∂s c​/∂y−s c​×∂r c​/∂y​)=2 1​×((r c​)2∣r c​∣×∂t c​/∂x−t c​×∂r c​/∂x​)=2 1​×((r c​)2∣r c​∣×∂t c​/∂y−t c​×∂r c​/∂y​)​

#### 20.3.7. Scale Factor Operation, LOD Operation and Image Level(s) Selection

LOD selection can be either explicit (provided explicitly by the image instruction) or implicit (determined from a scale factor calculated from the derivatives). The LOD must be computed with `mipmapPrecisionBits` of accuracy.

##### Scale Factor Operation

The magnitude of the derivatives are calculated by:

  mux = |∂s/∂x| × wbase

  mvx = |∂t/∂x| × hbase

  mwx = |∂r/∂x| × dbase

  muy = |∂s/∂y| × wbase

  mvy = |∂t/∂y| × hbase

  mwy = |∂r/∂y| × dbase

where:

  ∂t/∂x = ∂t/∂y = 0 (for 1D images)

  ∂r/∂x = ∂r/∂y = 0 (for 1D, 2D, or Cube images)

and:

  wbase = image.w

  hbase = image.h

  dbase = image.d

(for the `baseMipLevel`, from the image descriptor).

For corner-sampled images, the wbase, hbase, and dbase are instead:

  wbase = image.w - 1

  hbase = image.h - 1

  dbase = image.d - 1

A point sampled in screen space has an elliptical footprint in texture space. The minimum and maximum scale factors (ρmin, ρmax) should be the minor and major axes of this ellipse.

The scale factors ρx and ρy, calculated from the magnitude of the derivatives in x and y, are used to compute the minimum and maximum scale factors.

ρx and ρy may be approximated with functions fx and fy, subject to the following constraints:

​f x​ is continuous and monotonically increasing in each of m ux​,m vx​, and m w x​f y​ is continuous and monotonically increasing in each of m u y​,m v y​, and m w y​​
max(∣m ux​∣,∣m vx​∣,∣m w x​∣)≤f x​≤2
​(∣m ux​∣+∣m vx​∣+∣m w x​∣)max(∣m u y​∣,∣m v y​∣,∣m w y​∣)≤f y​≤2
​(∣m u y​∣+∣m v y​∣+∣m w y​∣)​

The minimum and maximum scale factors (ρmin,ρmax) are determined by:

  ρmax = max(ρx, ρy)

  ρmin = min(ρx, ρy)

The ratio of anisotropy is determined by:

  η = min(ρmax/ρmin, maxAniso)

where:

  sampler.maxAniso = `maxAnisotropy` (from sampler descriptor)

  limits.maxAniso = `maxSamplerAnisotropy` (from physical device limits)

  maxAniso = min(sampler.maxAniso, limits.maxAniso)

If ρmax = ρmin = 0, then all the partial derivatives are zero, the fragment’s footprint in texel space is a point, and η should be treated as 1. If ρmax ≠ 0 and ρmin = 0 then all partial derivatives along one axis are zero, the fragment’s footprint in texel space is a line segment, and η should be treated as maxAniso. However, anytime the footprint is small in texel space the implementation may use a smaller value of η, even when ρmin is zero or close to zero. If either VkPhysicalDeviceFeatures::`samplerAnisotropy` or VkSamplerCreateInfo::`anisotropyEnable` are VK_FALSE, maxAniso is set to 1.

If η = 1, sampling is isotropic. If η > 1, sampling is anisotropic.

The sampling rate (N) is derived as:

  N = ⌈η⌉

An implementation may round N up to the nearest supported sampling rate. An implementation may use the value of N as an approximation of η.

##### LOD Operation

The LOD parameter λ is computed as follows:

λ base​(x, y)λ′(x, y)λ​={shad er Op.Lod log 2​(η ρ max​​)​(from optional SPIR-V operand)otherwise​=λ base​+c l amp(sam pl er.bias+shad er Op.bias,−max S am pl er Lod B ias, max S am pl er Lod B ias)=⎩
⎨
⎧​l od max​,λ′,l od min​,undefined,​λ′>l od max​l od min​≤λ′≤l od max​λ′<l od min​l od min​>l od max​​​

where:

sam pl er.bias shad er Op.bias sam pl er. l od min​shad er Op. l od min​l od min​l od max​​=mipLod B ias={B ias 0​(from optional SPIR-V operand)otherwise​=minLod={M inLod 0​(from optional SPIR-V operand)otherwise​=max(sam pl er. l od min​,shad er Op. l od min​)=maxLod​(from sampler descriptor)(from sampler descriptor)(from sampler descriptor)​

and maxSamplerLodBias is the value of the VkPhysicalDeviceLimits feature `maxSamplerLodBias`.

##### Image Level(s) Selection

The image level(s) d, dhi, and dlo which texels are read from are determined by an image-level parameter dl, which is computed based on the LOD parameter, as follows:

d l​={nearest(d′),d′,​mipmapMode is VK_SAMPLER_MIPMAP_MODE_NEAREST otherwise​​

where:

d′=max(l e v e l base​+clamp(λ, 0, q),minLod ima g eVie w​)​
nearest(d′)​={⌈d′+0.5⌉−1,⌊d′+0.5⌋,​preferred alternative​​

and:

minLod ima g eVie w​l e v e l base​q​={minLod Fl oat ima g eVie w​,minLod I nte g e r ima g eVie w​,​preferred alternative​=base M ipLe v e l=l e v e lC ount−1​

`baseMipLevel` and `levelCount` are taken from the `subresourceRange` of the image view.

minLodimageView must be less or equal to levelbase + q.

If the sampler’s `mipmapMode` is VK_SAMPLER_MIPMAP_MODE_NEAREST, then the level selected is d = dl.

If the sampler’s `mipmapMode` is VK_SAMPLER_MIPMAP_MODE_LINEAR, two neighboring levels are selected:

d hi​d l o​δ​=⌊d l​⌋=min(d hi​+1, l e v e l base​+q)=d l​−d hi​​

δ is the fractional value, quantized to the number of mipmap precision bits, used for linear filtering between levels.

#### 20.3.8. (s,t,r,q,a) to (u,v,w,a) Transformation

The normalized texel coordinates are scaled by the image level dimensions and the array layer is selected.

This transformation is performed once for each level used in filtering (either d, or dhi and dlo).

u(x, y)v(x, y)w(x, y)a(x, y)​=s(x, y)×w idth sca l e​+Δ i​={0 t(x, y)×hei g ht sca l e​+Δ j​​for 1D images otherwise​={0 r(x, y)×depth sca l e​+Δ k​​for 2D or Cube images otherwise​={a(x, y)0​for array images otherwise​​

where:

  widthscale = widthlevel

  heightscale = heightlevel

  depthscale = depthlevel

for conventional images, and:

  widthscale = widthlevel - 1

  heightscale = heightlevel - 1

  depthscale = depthlevel - 1

for corner-sampled images.

and where (Δi, Δj, Δk) are taken from the image instruction if it includes a `ConstOffset` or `Offset` operand, otherwise they are taken to be zero.

Operations then proceed to Unnormalized Texel Coordinate Operations.

### 20.4. Unnormalized Texel Coordinate Operations

#### 20.4.1. (u,v,w,a) to (i,j,k,l,n) Transformation and Array Layer Selection

The unnormalized texel coordinates are transformed to integer texel coordinates relative to the selected mipmap level.

The layer index l is computed as:

  l = clamp(RNE(a), 0, `layerCount` - 1) + `baseArrayLayer`

where `layerCount` is the number of layers in the image subresource range of the image view, `baseArrayLayer` is the first layer from the subresource range, and where:

RNE(a)​={round T ies T o E v en(a)⌊a+0.5⌋​preferred, from IEEE Std 754-2008 Floating-Point Arithmetic alternative​​

The sample index n is assigned the value 0.

Nearest filtering (VK_FILTER_NEAREST) computes the integer texel coordinates that the unnormalized coordinates lie within:

i j k​=⌊u+shi f t⌋=⌊v+shi f t⌋=⌊w+shi f t⌋​

where:

  shift = 0.0

for conventional images, and:

  shift = 0.5

for corner-sampled images.

Linear filtering (VK_FILTER_LINEAR) computes a set of neighboring coordinates which bound the unnormalized coordinates. The integer texel coordinates are combinations of i0 or i1, j0 or j1, k0 or k1, as well as weights α, β, and γ.

i 0​i 1​j 0​j 1​k 0​k 1​​=⌊u−shi f t⌋=i 0​+1=⌊v−shi f t⌋=j 0​+1=⌊w−shi f t⌋=k 0​+1​
α β γ​=f r ac(u−shi f t)=f r ac(v−shi f t)=f r ac(w−shi f t)​

where:

  shift = 0.5

for conventional images, and:

  shift = 0.0

for corner-sampled images, and where:

f r ac(x)=x−⌊x⌋

where the number of fraction bits retained is specified by `VkPhysicalDeviceLimits`::`subTexelPrecisionBits`.

Cubic filtering (VK_FILTER_CUBIC_EXT) computes a set of neighboring coordinates which bound the unnormalized coordinates. The integer texel coordinates are combinations of i0, i1, i2 or i3, j0, j1, j2 or j3, k0, k1, k2 or k3, as well as weights α, β, and γ.

i 0​j 0​k 0​​=⌊u−2 3​⌋=⌊v−2 3​⌋=⌊w−2 3​⌋​i 1​j 1​k 1​​=i 0​+1=j 0​+1=k 0​+1​i 2​j 2​k 2​​=i 1​+1=j 1​+1=k 1​+1​i 3​j 3​k 3​​=i 2​+1=j 2​+1=k 2​+1​
α β γ​=f r ac(u−2 1​)=f r ac(v−2 1​)=f r ac(w−2 1​)​

where:

f r ac(x)=x−⌊x⌋

where the number of fraction bits retained is specified by `VkPhysicalDeviceLimits`::`subTexelPrecisionBits`.

### 20.5. Integer Texel Coordinate Operations

Integer texel coordinate operations may supply a LOD which texels are to be read from or written to using the optional SPIR-V operand `Lod`. If the `Lod` is provided then it must be an integer.

The image level selected is:

d​=l e v e l base​+{Lod 0​(from optional SPIR-V operand)otherwise​​

If d does not lie in the range [`baseMipLevel`, `baseMipLevel` + `levelCount`) or d is less than minLodIntegerimageView, then any values fetched are zero if the `robustImageAccess2` feature is enabled, otherwise are undefined, and any writes (if supported) are discarded.

### 20.6. Image Sample Operations

#### 20.6.1. Wrapping Operation

If the used sampler was created without VK_SAMPLER_CREATE_NON_SEAMLESS_CUBE_MAP_BIT_EXT, `Cube` images ignore the wrap modes specified in the sampler. Instead, if VK_FILTER_NEAREST is used within a mip level then VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE is used, and if VK_FILTER_LINEAR is used within a mip level then sampling at the edges is performed as described earlier in the Cube map edge handling section.

The first integer texel coordinate i is transformed based on the `addressModeU` parameter of the sampler.

i​=⎩
⎨
⎧​i mod size(size−1)−mi rror((i mod(2×size))−size)c l amp(i, 0, size−1)c l amp(i,−1, size)c l amp(mi rror(i),0, size−1)​for repeat for mirrored repeat for clamp to edge for clamp to border for mirror clamp to edge​​

where:

​mi rror(n)={n−(1+n)​for n≥0 otherwise​​

j (for 2D and Cube image) and k (for 3D image) are similarly transformed based on the `addressModeV` and `addressModeW` parameters of the sampler, respectively.

#### 20.6.2. Texel Gathering

SPIR-V instructions with `Gather` in the name return a vector derived from 4 texels in the base level of the image view.

The rules for the VK_FILTER_LINEAR minification filter are applied to identify the four selected texels for `OpImage*Gather` , and `OpImageGatherQCOM` with modes `GatherH2QCOM` and `GatherV2QCOM` .

If an `OpImage*Gather` operation does not use the `ConstOffsets` image operand then the four texels form the 2 × 2 rectangle used for texture filtering:

τ[R]τ[G]τ[B]τ[A]​=τ i0 j 1​[l e v e l base​][comp]=τ i1 j 1​[l e v e l base​][comp]=τ i1 j 0​[l e v e l base​][comp]=τ i0 j 0​[l e v e l base​][comp]​

If an `OpImage*Gather` operation uses the `ConstOffsets` image operand then the offsets allow a custom filter to be defined:

τ[R]τ[G]τ[B]τ[A]​=τ i0 j 0+Δ 0​​[l e v e l base​][comp]=τ i0 j 0+Δ 1​​[l e v e l base​][comp]=τ i0 j 0+Δ 2​​[l e v e l base​][comp]=τ i0 j 0+Δ 3​​[l e v e l base​][comp]​

If an `OpImageGatherQCOM` operation has a `Mode` equal to `GatherH2QCOM` or `GatherV2QCOM`, then it uses a predefined set of `ConstOffsets`.

The offsets used for `GatherH2QCOM` are:

Δ 0​Δ 1​Δ 2​Δ 3​​=(−1, 1)=(2, 1)=(2, 0)=(−1, 0)​

The offsets used for `GatherV2QCOM` are:

Δ 0​Δ 1​Δ 2​Δ 3​​=(0, 2)=(1, 2)=(1,−1)=(0,−1)​

The rules for the VK_FILTER_NEAREST minification filter are applied to identify the origin texel \tau_{{ij}} for `OpImageGatherQCOM` with modes equal to `Gather4x1QCOM` and `GatherDQCOM`. The filter used for these modes is defined as:

τ[R]τ[G]τ[B]τ[A]​=τ ij+Δ 0​​[l e v e l base​][comp]=τ ij+Δ 1​​[l e v e l base​][comp]=τ ij+Δ 2​​[l e v e l base​][comp]=τ ij+Δ 3​​[l e v e l base​][comp]​

The offsets used for `Gather4x1QCOM` are:

Δ 0​Δ 1​Δ 2​Δ 3​​=(0, 0)=(1, 0)=(2, 0)=(3, 0)​

The offsets used for `GatherDQCOM` are:

Δ 0​Δ 1​Δ 2​Δ 3​​=(0, 1)=(1, 0)=(0,−1)=(−1, 0)​

where:

τ[l e v e l base​][comp]comp​=⎩
⎨
⎧​τ[l e v e l base​][R],τ[l e v e l base​][G],τ[l e v e l base​][B],τ[l e v e l base​][A],​for comp=0 for comp=1 for comp=2 for comp=3​from SPIR-V operand Component​

Each texel is then converted to an RGBA value according to component substitution and then swizzled.

`OpImage*Gather` and `OpImageGatherQCOM` must not be used on a sampled image with sampler Y′CBCR conversion enabled.

If levelbase < minLodIntegerimageView, then any values fetched are zero if the `robustImageAccess2` feature is enabled. Otherwise values are undefined.

#### 20.6.3. Texel Filtering

Texel filtering is first performed for each level (either d or dhi and dlo).

If λ is less than or equal to zero, the texture is said to be magnified, and the filter mode within a mip level is selected by the `magFilter` in the sampler. If λ is greater than zero, the texture is said to be minified, and the filter mode within a mip level is selected by the `minFilter` in the sampler.

##### Texel Nearest Filtering

Within a mip level, VK_FILTER_NEAREST filtering selects a single value using the (i, j, k) texel coordinates, with all texels taken from layer l.

τ[l e v e l]​=⎩
⎨
⎧​τ ijk​[l e v e l],τ ij​[l e v e l],τ i​[l e v e l],​for 3D image for 2D or Cube image for 1D image​​

##### Texel Linear Filtering

Within a mip level, VK_FILTER_LINEAR filtering combines 8 (for 3D), 4 (for 2D or Cube), or 2 (for 1D) texel values, together with their linear weights. The linear weights are derived from the fractions computed earlier:

w i 0​​w i 1​​w j 0​​w j 1​​w k 0​​w k 1​​​=(1−α)=(α)=(1−β)=(β)=(1−γ)=(γ)​

The values of multiple texels, together with their weights, are combined to produce a filtered value.

The VkSamplerReductionModeCreateInfo::`reductionMode` can control the process by which multiple texels, together with their weights, are combined to produce a filtered texture value.

When the `reductionMode` is set (explicitly or implicitly) to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, a weighted average is computed:

τ 3 D​τ 2 D​τ 1 D​​=k=k 0​∑k 1​​j=j 0​∑j 1​​i=i 0​∑i 1​​(w i​)(w j​)(w k​)τ ijk​=j=j 0​∑j 1​​i=i 0​∑i 1​​(w i​)(w j​)τ ij​=i=i 0​∑i 1​​(w i​)τ i​​

However, if the reduction mode is VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX, the process operates on the above set of multiple texels, together with their weights, computing a component-wise minimum or maximum, respectively, of the components of the set of texels with non-zero weights.

##### Texel Cubic Filtering

Within a mip level, VK_FILTER_CUBIC_EXT, filtering computes a weighted average of 64 (for 3D), 16 (for 2D), or 4 (for 1D) texel values, together with their Catmull-Rom, Zero Tangent Cardinal, B-Spline, or Mitchell-Netravali weights as specified by VkSamplerCubicWeightsCreateInfoQCOM.

Catmull-Rom weights specified by VK_CUBIC_FILTER_WEIGHTS_CATMULL_ROM_QCOM are derived from the fractions computed earlier.

[w i 0​​,w i 1​​,w i 2​​,w i 3​​​]=2 1​[1​α​α 2​α 3​]
​−0−1−2−1​−2−0−5−3​−0−1−4−3​−0−0−1−1​
​[w j 0​​,w j 1​​,w j 2​​,w j 3​​​]=2 1​[1​β​β 2​β 3​]
​−0−1−2−1​−2−0−5−3​−0−1−4−3​−0−0−1−1​
​[w k 0​​,w k 1​​,w k 2​​,w k 3​​​]=2 1​[1​γ​γ 2​γ 3​]
​−0−1−2−1​−2−0−5−3​−0−1−4−3​−0−0−1−1​
​​

Zero Tangent Cardinal weights specified by VK_CUBIC_FILTER_WEIGHTS_ZERO_TANGENT_CARDINAL_QCOM are derived from the fractions computed earlier.

[w i 0​​,w i 1​​,w i 2​​,w i 3​​​]=2 1​[1​α​α 2​α 3​]
​−0−2−4−2​−2−0−4−2​−0−2−2−2​−0−0−2−1​
​[w j 0​​,w j 1​​,w j 2​​,w j 3​​​]=2 1​[1​β​β 2​β 3​]
​−0−2−4−2​−2−0−4−2​−0−2−2−2​−0−0−2−1​
​[w k 0​​,w k 1​​,w k 2​​,w k 3​​​]=2 1​[1​γ​γ 2​γ 3​]
​−0−2−4−2​−2−0−4−2​−0−2−2−2​−0−0−2−1​
​​

B-Spline weights specified by VK_CUBIC_FILTER_WEIGHTS_B_SPLINE_QCOM are derived from the fractions computed earlier.

[w i 0​​,w i 1​​,w i 2​​,w i 3​​​]=6 1​[1​α​α 2​α 3​]
​−1−3−3−1​−4−0−6−3​−1−3−3−3​−0−0−0−1​
​[w j 0​​,w j 1​​,w j 2​​,w j 3​​​]=6 1​[1​β​β 2​β 3​]
​−1−3−3−1​−4−0−6−3​−1−3−3−3​−0−0−0−1​
​[w k 0​​,w k 1​​,w k 2​​,w k 3​​​]=6 1​[1​γ​γ 2​γ 3​]
​−1−3−3−1​−4−0−6−3​−1−3−3−3​−0−0−0−1​
​​

Mitchell-Netravali weights specified by VK_CUBIC_FILTER_WEIGHTS_MITCHELL_NETRAVALI_QCOM are derived from the fractions computed earlier.

[w i 0​​,w i 1​​,w i 2​​,w i 3​​​]=18 1​[1​α​α 2​α 3​]
​−1−9−15−7​−16−0−36−21​−1−9−27−21​−0−0−6−7​
​[w j 0​​,w j 1​​,w j 2​​,w j 3​​​]=18 1​[1​β​β 2​β 3​]
​−1−9−15−7​−16−0−36−21​−1−9−27−21​−0−0−6−7​
​[w k 0​​,w k 1​​,w k 2​​,w k 3​​​]=18 1​[1​γ​γ 2​γ 3​]
​−1−9−15−7​−16−0−36−21​−1−9−27−21​−0−0−6−7​
​​

The values of multiple texels, together with their weights, are combined to produce a filtered value.

The VkSamplerReductionModeCreateInfo::`reductionMode` can control the process by which multiple texels, together with their weights, are combined to produce a filtered texture value.

When the `reductionMode` is set (explicitly or implicitly) to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE or VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM , a weighted average is computed:

τ 3 D​τ 2 D​τ 1 D​​=k=j 0​∑k 3​​j=j 0​∑j 3​​i=i 0​∑i 3​​(w i​)(w j​)(w k​)τ ijk​=j=j 0​∑j 3​​i=i 0​∑i 3​​(w i​)(w j​)τ ij​=i=i 0​∑i 3​​(w i​)τ i​​

However, if the reduction mode is VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX, the process operates on the above set of multiple texels, together with their weights, computing a component-wise minimum or maximum, respectively, of the components of the set of texels with non-zero weights.

##### Texel Range Clamp

When `reductionMode` is VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM, the weighted average is clamped to be within the component-wise minimum and maximum of the set of texels with non-zero weights.

##### Texel Mipmap Filtering

VK_SAMPLER_MIPMAP_MODE_NEAREST filtering returns the value of a single mipmap level,

τ = τ[d].

VK_SAMPLER_MIPMAP_MODE_LINEAR filtering combines the values of multiple mipmap levels (τ[hi] and τ[lo]), together with their linear weights.

The linear weights are derived from the fraction computed earlier:

w hi​w l o​​=(1−δ)=(δ)​

The values of multiple mipmap levels, together with their weights, are combined to produce a final filtered value.

The VkSamplerReductionModeCreateInfo::`reductionMode` can control the process by which multiple texels, together with their weights, are combined to produce a filtered texture value.

When the `reductionMode` is set (explicitly or implicitly) to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, a weighted average is computed:

τ​=(w hi​)τ[hi]+(w l o​)τ[l o]​

However, if the reduction mode is VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX, the process operates on the above values, together with their weights, computing a component-wise minimum or maximum, respectively, of the components of the values with non-zero weights.

##### Texel Anisotropic Filtering

Anisotropic filtering is enabled by the `anisotropyEnable` in the sampler. When enabled, the image filtering scheme accounts for a degree of anisotropy.

The particular scheme for anisotropic texture filtering is implementation-dependent. Implementations should consider the `magFilter`, `minFilter` and `mipmapMode` of the sampler to control the specifics of the anisotropic filtering scheme used. In addition, implementations should consider `minLod` and `maxLod` of the sampler.

Note | For historical reasons, vendor implementations of anisotropic filtering interpret these sampler parameters in different ways, particularly in corner cases such as `magFilter`, `minFilter` of VK_FILTER_NEAREST or `maxAnisotropy` equal to 1.0. Applications should not expect consistent behavior in such cases, and should use anisotropic filtering only with parameters which are expected to give a quality improvement relative to `LINEAR` filtering. The following describes one particular approach to implementing anisotropic filtering for the 2D Image case; implementations may choose other methods: Given a `magFilter`, `minFilter` of VK_FILTER_LINEAR and a `mipmapMode` of VK_SAMPLER_MIPMAP_MODE_NEAREST: Instead of a single isotropic sample, N isotropic samples are sampled within the image footprint of the image level d to approximate an anisotropic filter. The sum τ2Daniso is defined using the single isotropic τ2D(u,v) at level d. τ 2 D aniso​τ 2 D aniso​​=N 1​i=1∑N​τ 2 D​(u(x−2 1​+N+1 i​,y),v(x−2 1​+N+1 i​,y)),=N 1​i=1∑N​τ 2 D​(u(x, y−2 1​+N+1 i​),v(x, y−2 1​+N+1 i​)),​when ρ x​>ρ y​when ρ y​≥ρ x​​ When VkSamplerReductionModeCreateInfo::`reductionMode` is VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, the above summation is used. However, if the reduction mode is VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX, the process operates on the above values, together with their weights, computing a component-wise minimum or maximum, respectively, of the components of the values with non-zero weights.

### 20.7. Texel Footprint Evaluation

The SPIR-V instruction `OpImageSampleFootprintNV` evaluates the set of texels from a single mip level that would be accessed during a texel filtering operation. In addition to the inputs that would be accepted by an equivalent `OpImageSample*` instruction, `OpImageSampleFootprintNV` accepts two additional inputs. The `Granularity` input is an integer identifying the size of texel groups used to evaluate the footprint. Each bit in the returned footprint mask corresponds to an aligned block of texels whose size is given by the following table:

Table 33. Texel Footprint Granularity Values
`Granularity` | `Dim` = 2D | `Dim` = 3D
--- | --- | ---
0 | unsupported | unsupported
1 | 2x2 | 2x2x2
2 | 4x2 | unsupported
3 | 4x4 | 4x4x2
4 | 8x4 | unsupported
5 | 8x8 | unsupported
6 | 16x8 | unsupported
7 | 16x16 | unsupported
8 | unsupported | unsupported
9 | unsupported | unsupported
10 | unsupported | 16x16x16
11 | 64x64 | 32x16x16
12 | 128x64 | 32x32x16
13 | 128x128 | 32x32x32
14 | 256x128 | 64x32x32
15 | 256x256 | unsupported

The `Coarse` input is used to select between the two mip levels that may be accessed during texel filtering when using a `mipmapMode` of VK_SAMPLER_MIPMAP_MODE_LINEAR. When filtering between two mip levels, a `Coarse` value of `true` requests the footprint in the lower-resolution mip level (higher level number), while `false` requests the footprint in the higher-resolution mip level. If texel filtering would access only a single mip level, the footprint in that level would be returned when `Coarse` is `false`; an empty footprint would be returned when `Coarse` is `true`.

The footprint for `OpImageSampleFootprintNV` is returned in a structure with six members:

- The first member is a boolean value that is true if the texel filtering operation would access only a single mip level.

- The second member is a two- or three-component integer vector holding the footprint anchor location. For two-dimensional images, the returned components are in units of eight texel groups. For three-dimensional images, the returned components are in units of four texel groups.

- The third member is a two- or three-component integer vector holding a footprint offset relative to the anchor. All returned components are in units of texel groups.

- The fourth member is a two-component integer vector mask, which holds a bitfield identifying the set of texel groups in an 8x8 or 4x4x4 neighborhood relative to the anchor and offset.

- The fifth member is an integer identifying the mip level containing the footprint identified by the anchor, offset, and mask.

- The sixth member is an integer identifying the granularity of the returned footprint.

For footprints in two-dimensional images (`Dim2D`), the mask returned by `OpImageSampleFootprintNV` indicates whether each texel group in a 8x8 local neighborhood of texel groups would have one or more texels accessed during texel filtering. In the mask, the texel group with local group coordinates (l gx, l g y) is considered covered if and only if

0=((mas k.x+(mas k. y<<32)) & (1<<(l g y×8+l gx)))​

where:

- 0≤l gx<8 and 0≤l g y<8; and

- mas k is the returned two-component mask.

The local group with coordinates (l gx, l g y) in the mask is considered covered if and only if the texel filtering operation would access one or more texels τ ij​ in the returned mip level where:

i0 i1 j 0 j 1​={g r an.x×(8×anch or.x+l gx),g r an.x×(8×(anch or.x−1)+l gx),​if l gx+o ff set.x<8 otherwise​=i0+g r an.x−1={g r an. y×(8×anch or. y+l g y),g r an. y×(8×(anch or. y−1)+l g y),​if l g y+o ff set. y<8 oth er w ise​=j 0+g r an. y−1​

and

- i0≤i≤i1 and j 0≤j≤j 1;

- g r an is a two-component vector holding the width and height of the texel group identified by the granularity;

- anch or is the returned two-component anchor vector; and

- o ff set is the returned two-component offset vector.

For footprints in three-dimensional images (`Dim3D`), the mask returned by `OpImageSampleFootprintNV` indicates whether each texel group in a 4x4x4 local neighborhood of texel groups would have one or more texels accessed during texel filtering. In the mask, the texel group with local group coordinates (l gx, l g y, l g z), is considered covered if and only if:

0=((mas k.x+(mas k. y<<32)) & (1<<(l g z×16+l g y×4+l gx)))​

where:

- 0≤l gx<4, 0≤l g y<4, and 0≤l g z<4; and

- mas k is the returned two-component mask.

The local group with coordinates (l gx, l g y, l g z) in the mask is considered covered if and only if the texel filtering operation would access one or more texels τ ijk​ in the returned mip level where:

i0 i1 j 0 j 1 k 0 k 1​={g r an.x×(4×anch or.x+l gx),g r an.x×(4×(anch or.x−1)+l gx),​if l gx+o ff set.x<4 otherwise​=i0+g r an.x−1={g r an. y×(4×anch or. y+l g y),g r an. y×(4×(anch or. y−1)+l g y),​if l g y+o ff set. y<4 oth er w ise​=j 0+g r an. y−1={g r an. z×(4×anch or. z+l g z),g r an. z×(4×(anch or. z−1)+l g z),​if l g z+o ff set. z<4 oth er w ise​=k 0+g r an. z−1​

and

- i0≤i≤i1, j 0≤j≤j 1, k 0≤k≤k 1;

- g r an is a three-component vector holding the width, height, and depth of the texel group identified by the granularity;

- anch or is the returned three-component anchor vector; and

- o ff set is the returned three-component offset vector.

If the sampler used by `OpImageSampleFootprintNV` enables anisotropic texel filtering via `anisotropyEnable`, it is possible that the set of texel groups accessed in a mip level may be too large to be expressed using an 8x8 or 4x4x4 mask using the granularity requested in the instruction. In this case, the implementation uses a texel group larger than the requested granularity. When a larger texel group size is used, `OpImageSampleFootprintNV` returns an integer granularity value that can be interpreted in the same manner as the granularity value provided to the instruction to determine the texel group size used. If anisotropic texel filtering is disabled in the sampler, or if an anisotropic footprint can be represented as an 8x8 or 4x4x4 mask with the requested granularity, `OpImageSampleFootprintNV` will use the requested granularity as-is and return a granularity value of zero.

`OpImageSampleFootprintNV` supports only two- and three-dimensional image accesses (`Dim2D` and `Dim3D`), and the footprint returned is undefined if a sampler uses an addressing mode other than VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE.

### 20.8. Weight Image Sampling

The SPIR-V instruction `OpImageSampleWeightedQCOM` specifies a texture sampling operation involving two images: the sampled image and the weight image. It is similar to bilinear filtering except more than 2x2 texels may participate in the filter and the filter weights are application-specified rather than computed by fixed-function hardware. The weight image view defines a 2D kernel weights used during sampling.

The `OpImageSampleWeightedQCOM` support normalized or unnormalized texel coordinates. In addition to the inputs that would be accepted by an equivalent `OpImageSample*` instruction, `OpImageSampleWeightedQCOM` accepts a `weight` input that specifies the view of a sample weight image

The input `weight` must be a view of a 2D or 1D image with `miplevels` equal to `1`, `samples` equal to VK_SAMPLE_COUNT_1_BIT, created with an identity swizzle, and created with the VK_IMAGE_USAGE_SAMPLE_WEIGHT_BIT_QCOM usage flag set. The VkImageViewSampleWeightCreateInfoQCOM specifies additional parameters of the view: `filterCenter`, `filterSize`, and `numPhases`. described in more detail below.

The `weight` input must be bound using a sample weight image descriptor type. The `weight` view defines a filtering kernel that is a region of view’s subresource range. The kernel spans a region from integer texel coordinate (0,0) to (`filterSize.x`-1, `filterSize.y`-1). It is valid for the view’s subresource to have dimensions larger than the kernel but the texels with integer coordinates greater than (`filterSize.width`-1, `filterSize.height`-1) are ignored by weight sampling.

`filterCenter` designates an integer texel coordinate within the filter kernel as being the 'center' of the kernel. The center must be in the range (0,0) to (`filterSize.x`-1, `filterSize.y`-1). `numPhases` describes the number of filter phases used to provide sub-pixel filtering. Both are described in more detail below.

#### 20.8.1. Weight Image Layout

The weight image specifies filtering kernel weight values. A 2D image view can be used to specify a 2D matrix of filter weights. For separable filters, a 1D image view can be used to specify the horizontal and vertical weights.

##### 2D Non-Separable Weight Filters

A 2D image view defined with VkImageViewSampleWeightCreateInfoQCOM describes a 2D matrix (`filterSize.width` × `filterSize.height`) of weight elements with filter’s center point at `filterCenter`. Note that `filterSize` can be smaller than the view’s subresource, but the filter will always be located starting at integer texel coordinate (0,0).

The following figure illustrates a 2D convolution filter having `filterSize` of (4,3) and `filterCenter` at (1, 1).

Figure 12. 2D Convolution Filter

For a 2D weight filter, the phases are stored as layers of a 2D array image. The width and height of the view’s subresource range must be less than or equal to VkPhysicalDeviceImageProcessingPropertiesQCOM::`maxWeightFilterDimension`. The layers are stored in horizontal phase major order. Expressed as a formula, the layer index for each filter phase is computed as:

    layerIndex(horizPhase,vertPhase,horizPhaseCount) = (vertPhase * horizPhaseCount) + horizPhase

##### 1D Separable Weight Filters

A separable weight filter is a 2D filter that can be specified by two 1D filters in the x and y directions such that their product yields the 2D filter. The following example shows a 2D filter and its associated separable 1D horizontal and vertical filters.

Figure 13. Separable 2D Convolution Filter

A 1D array image view defined with VkImageViewSampleWeightCreateInfoQCOM and with `layerCount` equal to '2' describes a separable weight filter. The horizontal weights are specified in slice '0' and the vertical weights in slice '1'. The `filterSize` and `filterCenter` specify the size and origin of the of the horizontal and vertical filters. For many use cases, 1D separable filters can offer a performance advantage over 2D filters.

For a 1D separable weight filter, the phases are arranged into a 1D array image with two layers. The horizontal weights are stored in layer 0 and the vertical weights in layer 1. Within each layer of the 1D array image, the weights are arranged into groups of 4, and then arranged by phase. Expressed as a formula, the 1D texel offset for each weight within each layer is computed as:

    // Let horizontal weights have a weightIndex of [0, filterSize.width - 1]
    // Let vertical weights have a weightIndex of [0, filterSize.height - 1]
    // Let phaseCount be the number of phases in either the vertical or horizontal direction.

    texelOffset(phaseIndex,weightIndex,phaseCount) = (phaseCount * 4 * (weightIndex / 4)) + (phaseIndex * 4) + (weightIndex % 4)

#### 20.8.2. Weight Sampling Phases

When using weight image sampling, the texture coordinates may not align with a texel center in the sampled image. In this case, the filter weights can be adjusted based on the subpixel location. This is termed “subpixel filtering” to indicate that the origin of the filter lies at a subpixel location other than the texel center. Conceptually, this means that the weight filter is positioned such that filter taps do not align with sampled texels exactly. In such a case, modified filter weights may be needed to adjust for the off-center filter taps. Unlike bilinear filtering where the subpixel weights are computed by the implementation, subpixel weight image sampling requires that the per-phase filter weights are pre-computed by the application and stored in an array where each slice of the array is a “filter phase”. The array is indexed by the implementation based on subpixel positioning. Rather than a single 2D kernel of filter weights, the application provides an array of kernels, one set of filter weights per phase.

The number of phases are restricted by following requirements, which apply to both separable and non-separable filters:

- The number of phases in the vertical direction, phaseCountvert, must be a power of two (i.e., 1, 2, 4, etc.).

- The number of phases in the horizontal direction phaseCounthoriz, must equal phaseCountvert.

- The total number of phases, phaseCountvert × phaseCounthoriz, must be less than or equal to VkPhysicalDeviceImageProcessingPropertiesQCOM::`maxWeightFilterPhases`.

#### 20.8.3. Weight Sampler Parameters

Weight sampling requires `VkSamplerCreateInfo` `addressModeU` and `addressModeV` must be VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE or VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER. If VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER is used, then the border color must be VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK.

#### 20.8.4. Weight Sampling Operation

The 2D unnormalized texel coordinates (u, v) are transformed by f ilt er C ent er to specify coordinates i 0​,j 0​.

i 0​j 0​​=⌊u−f ilt er C ente r x​⌋=⌊v−f ilt er C ente r y​⌋​

where f ilt er C ent er is specified by VkImageViewSampleWeightCreateInfoQCOM::`filterCenter`.

Two sets of neighboring integer 2D texel coordinates are generated. The first set is used for selecting texels from the sampled image τ and the second set used for selecting texels from the weight image w. The first set of neighboring coordinates are combinations of i 0​ to i f ilt er Width−1​ and j 0​ to j f ilterHei g ht−1​. The second set of neighboring coordinates are combinations of k 0​ to k f ilt er Width−1​ and l 0​ to l f ilterHei g ht−1​. The first and second sets each contain (f ilt er Width×f ilterHei g ht) of pairs of (i, j) and (k, l) coordinates respectively.

{i q​}q=0 q=f ilt er Width−1​{j q​}q=0 q=f ilterHei g ht−1​{k q​}q=0 q=f ilt er Width−1​{l q​}q=0 q=f ilterHei g ht−1​​=i 0​+q=j 0​+q=q=q​

where f ilt er Width and f ilterHei g ht are specified by VkImageViewSampleWeightCreateInfoQCOM::`filterSize`.

Each of the generated integer coordinates (i q​,j q​) is transformed by texture wrapping operation, followed by integer texel coordinate validation, If any coordinate fails coordinate validation, it is a Border Texel and border replacement is performed.

The phase index ψ is computed from the fraction bits of the unnormalized 2D texel coordinates:

phase C ount h​=phase C ount v​h P hase v P hase ψ​=num P hases
​=⌊f r ac(u−0.5)×phase C ount h​⌋=⌊f r ac(v−0.5)×phase C ount v​⌋=(v P hase×phase C ount h​)+h P hase​

where the number of fraction bits retained is l o g 2(num P hases
​) specified by VkImageViewSampleWeightCreateInfoQCOM::`numPhases`

Each pair of texel coordinates (i, j) in the first set selects a single texel value τ ij​ from the sampled image. Each pair of texel coordinates (k, l) in the second set, combined with phaseIndex ψ, selects a single weight from the weight image w(k, l, ψ) .

w(k, l, ψ)​={w k l​[ψ](ψ as layer index)w ei g ht h​×w ei g ht v​​for 2D array view (non-separable filter) for 1D array view (separable filter) ​​

If w is a 2D array view, then non-separable filtering is specified, and integer coordinates (k, l) are used to select texels from layer ψ of (w). If w is a 1D array view, then separable filtering is specified and integer coordinates (k, l) are transformed to (k pac k ed​,l pac k ed​), and used to select horizontal weight (w ei g ht h​) and vertical weight (w ei g ht v​) texels from layer 0 and layer 1 of (w) respectively.

k pac k ed​l pac k ed​w ei g ht h​w ei g ht v​​=(phase C ount h​×4×⌊k/4⌋)+(h P hase×4)+(k%4)=(phase C ount v​×4×⌊l/4⌋)+(v P hase×4)+(l%4)=w k pac k ed​​[0]=w l pac k ed​​[1]​(horizontal weights packed in layer 0)(vertical weights packed in layer 1)​

Where % refers to the integer modulo operator.

Each selected texel is read with the operations specified in Texel Reads, and their values are combined to produce a filtered value.

τ w ei g h tS am pl in g​​=l=l 0​j=j 0​​∑l f ilterHei g ht−1​j f ilterHei g ht−1​​​k=k 0​i=i 0​​∑k f ilt er Width−1​i f ilt er Width−1​​​w(k, l, ψ)τ ij​​

When VkSamplerReductionModeCreateInfo::`reductionMode` is VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, the above summation is used. However, if the reduction mode is VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX, the process operates on the above values, computing a component-wise minimum or maximum of the texels with non-zero weights. If the reduction mode is VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX, each w(k, l, ψ) weight must be equal to 0.0 or 1.0, otherwise the undefined values are returned.

Finally, the operations described in Component swizzle are performed and the final result is returned to the shader.

### 20.9. Block Matching

The SPIR-V instruction `opImageBlockMatchSAD` and `opImageBlockMatchSSD` specify texture block matching operations where a block or region of texels within a target image is compared with a same-sized region in a reference image. The instructions make use of two image views: the target view and the reference view. The target view and reference view can be the same view, allowing block matching of two blocks within a single image.

Similar to an equivalent `OpImageFetch` instruction, `opImageBlockMatchSAD` and `opImageBlockMatchSAD` specify an `image` and an integer texel `coordinate` which describes the bottom-left texel of the target block. There are three additional inputs. The `reference` and `refCoodinate` specifies bottom-left texel of the reference block. The `blockSize` specifies the integer width and height of the target and reference blocks to be compared, and must not be greater than VkPhysicalDeviceImageProcessingPropertiesQCOM.`maxBlockMatchRegion`. If `blockSize` is specified with either dimension `0`, `Result` will return an undefined value.

`opImageBlockMatchWindowSAD` and `opImageBlockMatchWindowSAD` take the same input parameters as the corresponding non-window instructions. The block matching comparison is performed for all pixel values within a 2D window whose dimensions are specified in the sampler.

#### 20.9.1. Block Matching Sampler Parameters

Block matching operations must be specified with identical samplers to use with the target and reference images, which is defined as the input sampler.

The input sampler must be created with: * For `opImageBlockMatchSAD` and `opImageBlockMatchSSD`, `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, or VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER with VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK * For `opImageBlockMatchWindowSAD`, `opImageBlockMatchWindowSSD`, `opImageBlockMatchGatherSAD`, or `opImageBlockMatchGatherSSD` instructions, `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER with VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK , or if the `blockMatchExtendedClampToEdge` feature is enabled, equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE * For `opImageBlockMatchWindowSAD`, `opImageBlockMatchWindowSSD`, `opImageBlockMatchGatherSAD`, or `opImageBlockMatchGatherSSD` instructions, with either `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE * `unnormalizedCoordinates` equal to VK_TRUE * `components` equal to VK_COMPONENT_SWIZZLE_IDENTITY * `minFilter` equal to VK_FILTER_NEAREST * `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_NEAREST * `minLod` and `maxLod` equal to `0` * `anisotropyEnable` equal to VK_FALSE * `compareEnable` equal to VK_FALSE * For `opImageBlockMatchWindowSAD` and `opImageBlockMatchWindowSSD` instructions, VkSamplerBlockMatchWindowCreateInfoQCOM must be included in the `pNext` chain.

Other sampler states are ignored.

Note | Reference image does not support wrap modes and the coordinates must remain inside the image. Application must specify wrap modes in the sampler object because it must be identical with the target image’s sampler object, which does support wrap modes.

The target and reference images must be created with: * `imageType` equal to VK_IMAGE_TYPE_2D * `mipLevels` equal to `1` * `arrayLayers` equal to `1` * `samples` equal to VK_SAMPLE_COUNT_1_BIT * `format` equal to a compatible block matching format * `usage` equal to `VK_IMAGE_USAGE_SAMPLE_BLOCK_MATCH_BIT_QCOM`

#### 20.9.2. Block Matching Operation

Block matching SPIR-V instructions `opImageBlockMatchSAD` and `opImageBlockMatchSSD` specify two sets of 2D integer texel coordinates: target coordinates (u, v) and reference coordinates (s, t).

The coordinates define the bottom-left texel of the target block (i 0​,j 0​) and the reference block (k 0​,l 0​).

i 0​j 0​k 0​l 0​​=u=v=s=t​

For the target block, a set of neighboring integer texel coordinates are generated. The neighboring coordinates are combinations of i 0​ to i b l ockWidth−1​ and j 0​ to j b l oc k Hei g ht−1​. The set is of size b l ockWidth×b l oc k Hei g ht.

{i q​}q=0 q=b l ockWidth−1​{j q​}q=0 q=b l oc k Hei g ht−1​​=i 0​+q=j 0​+q​

where b l ockWidth and b l oc k Hei g ht is specified by the `blockSize` operand.

If any target integer texel coordinate (i, j) in the set fails integer texel coordinate validation, then the texel is an invalid texel and border replacement is performed.

Similarly for the reference block, a set of neighboring integer texel coordinates are generated.

{k q​}q=0 q=b l ockWidth−1​{l q​}q=0 q=b l oc k Hei g ht−1​​=k 0​+q=l 0​+q​

If the `blockMatchExtendedClampToEdge` feature is enabled, and the input sampler was created with `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, then any reference texel coordinate (k, l) in the set that fails integer texel coordinate validation is an invalid texel and border replacement is performed. Otherwise, each reference texel coordinate (k, l) in the set must not fail integer texel coordinate validation. To avoid undefined behavior, application shader must guarantee that the reference block is fully within the bounds of the reference image.

Each pair of texel coordinates (i, j) in the set selects a single texel from the target image τ ij​. Each pair of texel coordinates (k, l) in the set selects a single texel from the reference image υ k l​.

Each selected texel is read with the operations specified in Texel Reads, without performing Component Substitution.

The difference between target and reference texel values is summed to compute a difference metric. The `opTextureBlockMatchSAD` computes the sum of absolute differences.

τ S A D​​=l=l 0​j=j 0​​∑l b l oc k Hei g ht−1​j b l oc k Hei g ht−1​​​k=k 0​i=i 0​​∑k b l ockWidth−1​i b l ockWidth−1​​​∣υ k l​−τ ij​∣​

The `opImageBlockMatchSSD` computes the sum of the squared differences.

τ SS D​​=l=l 0​j=j 0​​∑l b l oc k Hei g ht−1​j b l oc k Hei g ht−1​​​k=k 0​i=i 0​​∑k b l ockWidth−1​i b l ockWidth−1​​​∣υ k l​−τ ij​∣2​

When VkSamplerReductionModeCreateInfo::`reductionMode` is VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, the above summation is used. However, if the reduction mode is VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX, the process operates on the above values, computing a component-wise minimum or maximum of ∣υ k l​−τ ij​∣, respectively. For τ S A D​, the minimum or maximum difference is computed and for τ SS D​, the square of the minimum or maximum is computed.

Finally, the operations described in Component Substitution and Component swizzle are performed and the final result is returned to the shader. The component swizzle is specified by the target image descriptor; any swizzle specified by the reference image descriptor is ignored.

##### Block Matching Window Operation

Window block matching SPIR-V instructions `opImageBlockMatchWindowSAD` and `opImageBlockMatchWindowSSD` specify two sets of 2D integer texel coordinates: target coordinates (u, v) and reference coordinates (s, t). The block matching operation is performed repeatedly, for multiple sets of target integer coordinates within the specified window. These instructions effectively search a region or “window” within the target texture and identify the window coordinates where the minimum or maximum error metric is found. These instructions only support single component image formats.

The target coordinates are combinations of coordinates from (u, v) to (u+w indo w Width−1, v+w indo w Hei g ht−1) where w indo w Hei g ht and w indo w Width are specified by VkSamplerBlockMatchWindowCreateInfoQCOM::`windowExtent`. At each target coordinate, a block matching operation is performed, resulting in a difference metric. The reference coordinate (s, t) is fixed. The block matching operation is repeated w indo w Width×w indo w Hei g ht times.

The resulting minimum or maximum error is returned in the R component of the output. The integer window coordinates (x, y) are returned in the G and B components of the output. The A component is 0. The minimum or maximum behavior is selected by VkSamplerBlockMatchWindowCreateInfoQCOM::`windowCompareMode`.

The following pseudocode describes the operation `opImageBlockMatchWindowSAD`. The pseudocode for `opImageBlockMatchWindowSSD` follows an identical pattern.

    vec4 opImageBlockMatchGatherSAD( sampler2D target,
                                     uvec2 targetCoord,
                                     sampler2D reference,
                                     uvec2 refCoord,
                                     uvec2 blocksize) {
        // Two parameters are sourced from the VkSampler associated with
        // `target`:
        //    compareMode  (which can be either `MIN` or `MAX`)
        //    uvec2 window (which defines the search window)

        minSAD = INF;
        maxSAD = -INF;
        uvec2 minCoord;
        uvec2 maxCoord;

        for (uint x=0, x<window.width; x++) {
            for (uint y=0; y<window.height; y++) {
                float SAD = textureBlockMatchSAD(target,
                                                 targetCoord + uvec2(x, y),
                                                 reference,
                                                 refCoord,
                                                 blocksize).x;
                if (SAD < minSAD) {
                    minSAD = SAD;
                    minCoord = uvec2(x,y);
                }
                if (SAD > maxSAD) {
                    maxSAD = SAD;
                    maxCoord = uvec2(x,y);
                }
            }
        }
        if (compareMode==MIN) {
            return vec4(minSAD, minCoord.x, minCoord.y, 0.0);
        } else {
            return vec4(maxSAD, maxCoord.x, maxCoord.y, 0.0);
        }
    }

##### Block Matching Gather Operation

Block matching Gather SPIR-V instructions `opImageBlockMatchGatherSAD` and `opImageBlockMatchGatherSSD` specify two sets of 2D integer texel coordinates: target coordinates (u, v) and reference coordinates (s, t).

These instructions perform the block matching operation 4 times, using integer target coordinates (u, v), (u+1, v), (u+2, v), and (u+3, v). The R component from each of those 4 operations is gathered and returned in the R, G, B, and A components of the output respectively. For each block match operation, the reference coordinate is (s, t). For each block match operation, only the R component of the target and reference images are compared. The following pseudocode describes the operation opImageBlockMatchGatherSAD. The pseudocode for opImageBlockMatchGatherSSD follows an identical pattern.

    vec4 opImageBlockMatchGatherSAD(sampler2D target,
                                    uvec2 targetCoord,
                                    sampler2D reference,
                                    uvec2 refCoord,
                                    uvec2 blocksize) {
        vec4 out;
        for (uint x=0, x<4; x++) {
                float SAD = textureBlockMatchSAD(target,
                                                 targetCoord + uvec2(x, 0),
                                                 reference,
                                                 refCoord,
                                                 blocksize).x;
                if (x == 0) {
                    out.x = SAD;
                }
                if (x == 1) {
                    out.y = SAD;
                }
                if (x == 2) {
                    out.z = SAD;
                }
                if (x == 3) {
                    out.w = SAD;
                }
        }
        return out;
    }

### 20.10. Box Filter Sampling

The SPIR-V instruction `OpImageBoxFilterQCOM` specifies texture box filtering operation where a weighted average of a region of texels is computed, with the weights proportional to the coverage of each of the texels.

In addition to the inputs that would be accepted by an equivalent `OpImageSample*` instruction, `OpImageBoxFilterQCOM` accepts one additional input, `boxSize` which specifies the width and height in texels of the region to be averaged.

The figure below shows an example of using `OpImageBoxFilterQCOM` to sample from a 8 × 4 texel two-dimensional image, with unnormalized texture coordinates (4.125, 2.625) and `boxSize` of (2.75, 2.25). The filter will read 12 texel values and compute a weights based portion of each texel covered by the box.

Figure 14. Box Filter Sampling Example

If `boxSize` has height and width both equal to 1.0, then this instruction will behave as traditional bilinear filtering. The `boxSize` parameter must be greater than or equal to 1.0 and must not be greater than VkPhysicalDeviceImageProcessingPropertiesQCOM.`maxBoxFilterBlockSize`.

#### 20.10.1. Box Filter Sampler Parameters

The input `sampler` must be created with `addressModeU` and `addressModeV`, equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, or VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER with VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK.

#### 20.10.2. Box Filter Operation

The 2D unnormalized texel coordinates (u, v) are transformed by box S ize to specify integer texel coordinates (i 0​,j 0​) of the bottom left texel for the filter.

i 0​j 0​​=⌊u−2 boxWidth​⌋=⌊v−2 boxHei g ht​⌋​

where boxWidth and boxHei g ht are specified by the code:(x,y) components of the `boxSize` operand.

The filter dimensions (f ilt er Width×f ilterHei g ht) are computed from the fractional portion of the (u, v) coordinates and the box S ize.

sta r tF r ac U sta r tF r ac V end F r ac U end F r ac V f ilt er Width f ilterHei g ht​=f r ac(u−2 boxWidth​)=f r ac(v−2 boxHei g ht​)=f r ac(sta r tF r ac U+boxWidth)=f r ac(sta r tF r ac V+boxHei g ht)=⌈sta r tF r ac U+boxWidth⌉=⌈sta r tF r ac V+boxHei g ht⌉​

where the number of fraction bits retained by f r ac() is specified by `VkPhysicalDeviceLimits`::`subTexelPrecisionBits`.

A set of neighboring integer texel coordinates are generated. The neighboring coordinates are combinations of i 0​ to i f ilt er Width−1​ and j 0​ to j f ilterHei g ht−1​, with i 0​,j 0​ being the top-left coordinate of this set. The set is of size (f ilt er Width×f ilterHei g ht).

{i q​}q=0 q=f ilt er Width−1​{j q​}q=0 q=f ilterHei g ht−1​​=i 0​+q=j 0​+q​

Each of the generated integer coordinates (i q​,j q​) is transformed by texture wrapping operation, followed by integer texel coordinate validation, If any coordinate fails coordinate validation, it is a Border Texel and border replacement is performed.

Horizontal weights h or i z W ei g ht 0​ to h or i z W ei g ht boxWidth−1​ and vertical weights v er t W ei g ht 0​ to v er t W ei g ht boxHei g ht−1​ are computed. Texels that are fully covered by the box will have a horizontal and vertical weight of 1. Texels partially covered by the box will have will have a reduced weights proportional to the coverage.

h or i z W ei g ht i​​=⎩
⎨
⎧​(1−sta r tF r ac U),(end F r ac U),(1),​for (i==0)for (i==f ilt er Width−1) and (end F r ac U!=0)otherwise​​
v er t W ei g ht j​​=⎩
⎨
⎧​(1−sta r tF r ac V),(end F r ac V),(1),​for (j==0)for (j==f ilterHei g ht−1) and (end F r ac V!=0)otherwise​​

The values of multiple texels, together with their horizontal and vertical weights, are combined to produce a box filtered value.

τ box F ilt er​​=boxHei g ht×boxWidth 1​j=j 0​∑j f ilterHei g ht−1​​i=i 0​∑i f ilt er Width−1​​(h or i z W ei g ht i​)(v er t W ei g ht j​)τ ij​​

When VkSamplerReductionModeCreateInfo::`reductionMode` is VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, the above summation is used. However, if the reduction mode is VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX, the process operates on the above values, computing a component-wise minimum or maximum of the texels.

### 20.11. Image Operation Steps

Each step described in this chapter is performed by a subset of the image instructions:

- Texel Input Validation Operations, Format Conversion, Texel Replacement, Conversion to RGBA, and Component Swizzle: Performed by all sampling instructions.

- Depth Comparison: Performed by `OpImage*Dref` instructions.

- Projection: Performed by all `OpImage*Proj` instructions.

- Derivative Image Operations, Cube Map Operations, Scale Factor Operation, LOD Operation and Image Level(s) Selection, and Texel Anisotropic Filtering: Performed by all `OpImageSample*` and `OpImageSparseSample*` instructions.

- (s,t,r,q,a) to (u,v,w,a) Transformation, Wrapping, and (u,v,w,a) to (i,j,k,l,n) Transformation And Array Layer Selection: Performed by all `OpImageSample`, `OpImageSparseSample`, `OpImageGatherQCOM`, and `OpImage*Gather` instructions.

- Texel Gathering: Performed by `OpImage*Gather` and `OpImageGatherQCOM` instructions.

- Texel Footprint Evaluation: Performed by `OpImageSampleFootprint` instructions.

- Texel Filtering: Performed by all `OpImageSample*` and `OpImageSparseSample*` instructions.

- Sparse Residency: Performed by all `OpImageSparse*` instructions.

- (s,t,r,q,a) to (u,v,w,a) Transformation, Wrapping, and Weight Image Sampling: Performed by `OpImageWeightedSample*` instructions.

- (s,t,r,q,a) to (u,v,w,a) Transformation, Wrapping, and Block Matching: Performed by `opImageBlockMatch*` instructions.

- (s,t,r,q,a) to (u,v,w,a) Transformation, Wrapping, and Box Filter Sampling: Performed by `OpImageBoxFilter*` instructions.

### 20.12. LOD Query

`OpImageQueryLod` returns the LOD parameters that would be used in a sampling instruction with the given image and coordinates. If the descriptor that would be accessed is a null descriptor then (0,0) is returned. Otherwise, the steps described in this chapter are performed as if for `OpImageSampleImplicitLod`, up to Scale Factor Operation, LOD Operation and Image Level(s) Selection. The return value is the vector (λ', dl - levelbase). These values may be subject to implementation-specific maxima and minima for very large, out-of-range values.

If the image is a weight image, the value returned by `OpImageQueryLod` is undefined.

## 21. Fragment Density Map Operations

### 21.1. Fragment Density Map Operations Overview

When a fragment is generated in a render pass that has a fragment density map attachment, its area is determined by the properties of the local framebuffer region that the fragment occupies. The framebuffer is divided into a uniform grid of these local regions, and their fragment area property is derived from the density map with the following operations:

- Fetch density value

  - Component swizzle

  - Component mapping

- Fragment area conversion

  - Fragment area filter

  - Fragment area clamp

### 21.2. Fetch Density Value

Each local framebuffer region at center coordinate (x,y) reads a texel from the fragment density map.

First, the local framebuffer region center coordinate (x,y) is offset by the value specified in VkRenderPassFragmentDensityMapOffsetEndInfoEXT. If no offset is specified, then the default offset (0,0) is used. The offset coordinate (x',y') is computed as follows:

x′y′​=x−pF r a g mentDensit y O ff sets[l a yer]x​=y−pF r a g mentDensit y O ff sets[l a yer]y​​

Note | The offset is relative to the fragment density map, so it is subtracted from the framebuffer coordinates to make the adjustment relative to the framebuffer. In other words, applying a positive offset in the x component will shift the fragment density map to the right relative to the framebuffer. This means the framebuffer coordinates need to undergo a shift to the left.

The offset fragment coordinate (x',y') reads a texel from the fragment density map at image coordinates (x,y,0,layer,0,0), where (x,y) are calculated as:

  x=c l amp(⌊f r a g mentDensit y T exe lS i z e w idth​x′​⌋,0, f r a g mentDensit y M ap w idth​−1)

  y=c l amp(⌊f r a g mentDensit y T exe lS i z e hei g ht​y′​⌋,0, f r a g mentDensit y M ap hei g ht​−1)

Where the size of each region in the framebuffer is:

  f r a g mentDensit y T exe lS i z e w idth′​=2⌈lo g 2​(⌊f r a g mentDensit y M ap w idth​f r amebu ff e r w idth​​⌋)⌉

  f r a g mentDensit y T exe lS i z e hei g ht′​=2⌈lo g 2​(⌊f r a g mentDensit y M ap hei g ht​f r amebu ff e r hei g ht​​⌋)⌉

Note | The original spec did not include the floor in the equation above. Implementations have shipped with and without the floor. Given that the earliest implementations shipped with the floor, the spec now reflects that as most content was written with this behavior. All implementations exposing support for version 3 or greater of the extension must implement with the floor included.

If using vkCmdBeginRendering, then f r amebu ff e r w idth​ and f r amebu ff e r hei g ht​ are defined as:

  f r amebu ff e r w idth​=rend er Area O ff set x​pl usrend er Area E xtent w idth​

  f r amebu ff e r hei g ht​=rend er Area O ff set y​pl usrend er Area E xtent hei g ht​

using VkRenderingInfo::`renderArea`.

This region is subject to the limits in `VkPhysicalDeviceFragmentDensityMapPropertiesEXT` and therefore the final region size is clamped:

  f r a g mentDensit y T exe lS i z e w idth​=c l amp(f r a g mentDensit y T exe lS i z e w idth′​,min F r a g mentDensit y T exe lS i z e w idth​,max F r a g mentDensit y T exe lS i z e w idth​)

  f r a g mentDensit y T exe lS i z e hei g ht​=c l amp(f r a g mentDensit y T exe lS i z e hei g ht′​,min F r a g mentDensit y T exe lS i z e hei g ht​,max F r a g mentDensit y T exe lS i z e hei g ht​)

When multiview is enabled for the render pass and the fragment density map attachment view was created with `layerCount` greater than `1`, the layer used for offsets and for fetching from the fragment density map is:

  l a yer=baseA rr a y La yer+Vie w I ndex

Otherwise, if the render pass was created with VK_RENDER_PASS_CREATE_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE specified, or the dynamic render pass was begun with VK_RENDERING_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE specified, then the layer used is:

  l a yer=baseA rr a y La yer+La yer

Otherwise:

  l a yer=baseA rr a y La yer

The texel fetched from the density map at (x,y,0,layer,0,0) is next converted to density with the following operations.

#### 21.2.1. Component Swizzle

The `components` member of VkImageViewCreateInfo is applied to the fetched texel as defined in Image component swizzle.

#### 21.2.2. Component Mapping

The swizzled texel’s components are mapped to a density value:

  densit y Va l ue x y​=(C r′​,C g′​)

### 21.3. Fragment Area Conversion

Fragment area for the framebuffer region is undefined if the density fetched is not a normalized floating-point value greater than `0.0`. Otherwise, the fetched fragment area for that region is derived as:

  f r a g mentArea w h​=densit y Va l ue x y​1.0​

#### 21.3.1. Fragment Area Filter

Optionally, the implementation may fetch additional density map texels in an implementation defined window around (i,j). The texels follow the standard conversion steps up to and including fragment area conversion.

A single fetched fragment area for the framebuffer region is chosen by the implementation and must have an area between the min and max areas of the fetched set.

#### 21.3.2. Fragment Area Clamp

The implementation may clamp the fetched fragment area to one that it supports. The clamped fragment area must have a size less than or equal to the original fetched value. Implementations may vary the supported set of fragment areas per framebuffer region. Fragment area (1,1) must always be in the supported set.

Note | For example, if the fetched fragment area is (1,4) but the implementation only supports areas of {(1,1),(2,2)}, it could choose to clamp the area to (2,2) since it has the same size as (1,4). While this would produce fragments that have lower quality strictly in the x-axis, the overall density is maintained.

The clamped fragment area is assigned to the corresponding framebuffer region.

## 22. Tensor Operations

### 22.1. Tensor Operations Overview

Vulkan Tensor Operations are operations performed by those SPIR-V Tensor Instructions which take an `OpTypeTensorARM` (representing a `VkTensorViewARM`). Read and write operations take tensor element coordinates as operands, and return elements from the tensor. Query operations return properties of the bound tensor.

Tensor Operations include the functionality of the following SPIR-V Tensor Instructions:

- `OpTensorReadARM` reads one or more elements from the tensor.

- `OpTensorWriteARM` writes one or more elements to the tensor.

- `OpTensorQuerySizeARM` returns the size of the tensor descriptor that would be accessed. The tensor itself is not accessed.

#### 22.1.1. Tensor Coordinate System

Each elements in a tensor can be addressed using a set of N integer coordinates where N is equal to the rank, i.e. number of dimensions, of the tensor.

### 22.2. Tensor Element Input Operations

Tensor element input instructions are SPIR-V tensor instructions that read from a tensor. Tensor element input operations are a set of steps that are performed on state, coordinates, and tensor element values while processing a tensor element input instruction, and which are common to some or all tensor element input instructions. They include the following steps, which are performed in the listed order:

- Validation operations

  - Instruction/Tensor validation

  - Coordinate validation

- Format conversion

- Tensor Element replacement

For tensor element input instructions involving multiple tensor elements, these steps are applied for each tensor element that is used in the instruction.

#### 22.2.1. Tensor Element Input Validation Operations

Tensor element input validation operations inspect instruction/tensor state or coordinates, and in certain circumstances cause the tensor element value to be replaced or become undefined. There are a series of validations that the tensor element undergoes.

##### Instruction/Tensor View Validation

There are a number of cases where a SPIR-V instruction can mismatch with the tensor view. In such cases the value of the tensor element returned is poison.

These cases include:

- The SPIR-V instruction’s tensor variable’s properties are not compatible with the tensor view:

  - The SPIR-V Tensor `Element` `Type` is not compatible with the tensor view’s `format`.

  - The SPIR-V Tensor `Rank` is not present.

  - The SPIR-V Tensor `Rank` is not the same as the value provided for VkTensorDescriptionARM::`dimensionCount` when creating the tensor used by the tensor view.

  - The SPIR-V Tensor `Shape`, if present, does not match the set of values provided for VkTensorDescriptionARM::`pDimensions` when creating the tensor used by the tensor view.

##### Tensor Element Coordinate Validation

Tensor element coordinates are validated against the size of the tensor.

If the tensor element coordinates do not satisfy all of the conditions

  0 ≤ Coordinates[i] < Size[i] for 0 ≤ i < dimensionCount

where:

  Size[i] is the size of the tensor along dimension i as provided via VkTensorDescriptionARM::`pDimensions`[i] when the tensor was created.

  dimensionCount is the number of dimensions of the tensor as provided via VkTensorDescriptionARM::`dimensionCount` when the tensor was created.

, or the tensor descriptor is a null descriptor,

then the tensor element fails coordinate validation.

There are two cases to consider:

1. Valid Tensor Element Coordinates

   - If the tensor element coordinates pass validation (that is, the coordinates lie within the tensor),

     then the tensor element value comes from the value in tensor memory.

2. Out-of-Bounds Tensor Element

   - If the tensor element coordinates fail validation,

     then the tensor element is an invalid tensor element and tensor element replacement is performed.

#### 22.2.2. Format Conversion

If required, tensor elements undergo a format conversion from the VkFormat of the tensor view to the element type of the tensor resource variable on which a read operation is performed.

Each element is converted based on its type and size (as defined in the Format Definition section for each VkFormat), using the appropriate equations in 16-Bit Floating-Point Numbers, Unsigned 11-Bit Floating-Point Numbers, Unsigned 10-Bit Floating-Point Numbers, Fixed-Point Data Conversion, and 8-bit booleans.

The compatibility between SPIR-V tensor element types and VkFormat is specified under Compatibility Between SPIR-V Tensor Element Types And Vulkan Formats.

#### 22.2.3. Tensor Element Replacement

A tensor element is replaced if it is an invalid tensor element.

Invalid tensor elements are replaced as follows:

- If the `OpTensorReadARM` instruction that caused an invalid tensor element to be accessed did not have a `OutOfBoundsValueARM` tensor operand present, then the value returned is the same as that produced by `OpConstantNull` for the type returned.

- If the `OpTensorReadARM` instruction that caused an invalid tensor element to be accessed had a `OutOfBoundsValueARM` tensor operand present, then the value provided using `OutOfBoundsValueARM` is returned.

### 22.3. Tensor Element Output Operations

Tensor element output instructions are SPIR-V tensor instructions that write to a tensor. Tensor element output operations are a set of steps that are performed on state, coordinates, and tensor element values while processing a tensor element output instruction, and which are common to some or all tensor element output instructions. They include the following steps, which are performed in the listed order:

- Validation operations

  - Format validation

  - Coordinate validation

- Tensor element output format conversion

#### 22.3.1. Tensor Element Output Validation Operations

Tensor element output validation operations inspect instruction/tensor state or coordinates, and in certain circumstances cause the write to have no effect. There are a series of validations that the tensor element undergoes.

##### Tensor Element Format Validation

If one of the following conditions is met, then an operation writing to the tensor causes the tensor’s memory to become undefined .

- The SPIR-V instruction’s tensor variable’s properties are not compatible with the tensor view:

  - The SPIR-V Tensor Element Type is not compatible with the tensor view’s `format`.

  - The SPIR-V Tensor Rank is not present.

  - The SPIR-V Tensor Rank is not the same as the value provided for VkTensorDescriptionARM::`dimensionCount` when creating the tensor used by the tensor view.

  - The SPIR-V Tensor Shape, if present, does not match the set of values provided for VkTensorDescriptionARM::`pDimensions` when creating the tensor used by the tensor view.

#### 22.3.2. Tensor Element Coordinate Validation

The tensor element coordinates are validated according to the same rules as for tensor element input coordinate validation.

If the tensor element fails coordinate validation, then the write has no effect.

#### 22.3.3. Tensor Element Output Format Conversion

If required, tensor elements undergo a format conversion from the element type of the tensor resource variable on which a write operation is performed to the VkFormat of the tensor view.

Each element is converted based on its type and size (as defined in the Format Definition section for each VkFormat). Floating-point outputs are converted as described in Floating-Point Format Conversions and Fixed-Point Data Conversion. Boolean outputs are converted as described in 8-bit boolean. Integer outputs are converted such that their value is preserved.

The compatibility between SPIR-V tensor element types and VkFormat is specified under Compatibility Between SPIR-V Tensor Element Types And Vulkan Formats.

### 22.4. Tensor Query Instructions

`OpTensorQuerySizeARM` queries the size of a tensor whose descriptor would be accessed by a shader tensor operation.

It always returns 0 if the bound descriptor is a null descriptor.

## 23. Queries

Queries provide a mechanism to return information about the processing of a sequence of Vulkan commands. Query operations are asynchronous, and as such, their results are not returned immediately. Instead, their results, and their availability status are stored in a Query Pool. The state of these queries can be read back on the host, or copied to a buffer object on the device.

The supported query types are:

- Occlusion Queries

- Pipeline Statistics Queries

- Timestamp Queries

- Result Status Queries

- Video Encode Feedback Queries

- Performance Queries

- Transform Feedback Queries

- Intel Performance Queries

- Mesh Shader Queries

- Elapsed Timer Queries

Several additional queries with specific purposes associated with ray tracing are available if the corresponding extensions are supported, as described for VkQueryType.

### 23.1. Query Pools

Queries are managed using query pool objects. Each query pool is a collection of a specific number of queries of a particular type.

Query pools are represented by `VkQueryPool` handles:

    // Provided by VK_VERSION_1_0
    VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkQueryPool)

To create a query pool, call:

    // Provided by VK_VERSION_1_0
    VkResult vkCreateQueryPool(
        VkDevice                                    device,
        const VkQueryPoolCreateInfo*                pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkQueryPool*                                pQueryPool);

- `device` is the logical device that creates the query pool.

- `pCreateInfo` is a pointer to a VkQueryPoolCreateInfo structure containing the number and type of queries to be managed by the pool.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

- `pQueryPool` is a pointer to a VkQueryPool handle in which the resulting query pool object is returned.

Valid Usage

- VUID-vkCreateQueryPool-device-09663
  `device` must support at least one queue family with one of the VK_QUEUE_VIDEO_ENCODE_BIT_KHR, VK_QUEUE_VIDEO_DECODE_BIT_KHR, VK_QUEUE_COMPUTE_BIT, or VK_QUEUE_GRAPHICS_BIT capabilities

Valid Usage (Implicit)

- VUID-vkCreateQueryPool-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkCreateQueryPool-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkQueryPoolCreateInfo structure

- VUID-vkCreateQueryPool-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateQueryPool-pQueryPool-parameter
  `pQueryPool` must be a valid pointer to a VkQueryPool handle

- VUID-vkCreateQueryPool-device-queuecount
  The device must have been created with at least `1` queue

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkQueryPoolCreateInfo` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkQueryPoolCreateInfo {
        VkStructureType                  sType;
        const void*                      pNext;
        VkQueryPoolCreateFlags           flags;
        VkQueryType                      queryType;
        uint32_t                         queryCount;
        VkQueryPipelineStatisticFlags    pipelineStatistics;
    } VkQueryPoolCreateInfo;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask of VkQueryPoolCreateFlagBits

- `queryType` is a VkQueryType value specifying the type of queries managed by the pool.

- `queryCount` is the number of queries managed by the pool.

- `pipelineStatistics` is a bitmask of VkQueryPipelineStatisticFlagBits specifying which counters will be returned in queries on the new pool, as described below in Pipeline Statistics Queries. `pipelineStatistics` is ignored if `queryType` is not VK_QUERY_TYPE_PIPELINE_STATISTICS.

Valid Usage

- VUID-VkQueryPoolCreateInfo-queryType-00791
  If the `pipelineStatisticsQuery` feature is not enabled, `queryType` must not be VK_QUERY_TYPE_PIPELINE_STATISTICS

- VUID-VkQueryPoolCreateInfo-queryType-12416
  If the elapsedTimerQuery feature is not enabled, `queryType` must not be VK_QUERY_TYPE_TIME_ELAPSED_QCOM

- VUID-VkQueryPoolCreateInfo-meshShaderQueries-07068
  If the `meshShaderQueries` feature is not enabled, `queryType` must not be VK_QUERY_TYPE_MESH_PRIMITIVES_GENERATED_EXT

- VUID-VkQueryPoolCreateInfo-meshShaderQueries-07069
  If the `meshShaderQueries` feature is not enabled, and `queryType` is VK_QUERY_TYPE_PIPELINE_STATISTICS, `pipelineStatistics` must not contain VK_QUERY_PIPELINE_STATISTIC_TASK_SHADER_INVOCATIONS_BIT_EXT or VK_QUERY_PIPELINE_STATISTIC_MESH_SHADER_INVOCATIONS_BIT_EXT

- VUID-VkQueryPoolCreateInfo-queryType-00792
  If `queryType` is VK_QUERY_TYPE_PIPELINE_STATISTICS, `pipelineStatistics` must be a valid combination of VkQueryPipelineStatisticFlagBits values

- VUID-VkQueryPoolCreateInfo-queryType-09534
  If `queryType` is VK_QUERY_TYPE_PIPELINE_STATISTICS, `pipelineStatistics` must not be zero

- VUID-VkQueryPoolCreateInfo-queryType-03222
  If `queryType` is VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR, the `pNext` chain must include a VkQueryPoolPerformanceCreateInfoKHR structure

- VUID-VkQueryPoolCreateInfo-queryCount-02763
  `queryCount` must be greater than 0

- VUID-VkQueryPoolCreateInfo-queryType-11839
  If `queryType` is VK_QUERY_TYPE_RESULT_STATUS_ONLY_KHR, then at least one of the queue families of the device must support result status queries, as indicated by VkQueueFamilyQueryResultStatusPropertiesKHR::`queryResultStatusSupport`

- VUID-VkQueryPoolCreateInfo-pNext-10779
  If the `pNext` chain includes a VkVideoProfileInfoKHR structure and its `videoCodecOperation` member is VK_VIDEO_CODEC_OPERATION_DECODE_VP9_BIT_KHR, then the `videoDecodeVP9` feature must be enabled

- VUID-VkQueryPoolCreateInfo-queryType-07133
  If `queryType` is VK_QUERY_TYPE_VIDEO_ENCODE_FEEDBACK_KHR, then the `pNext` chain must include a VkVideoProfileInfoKHR structure with `videoCodecOperation` specifying an encode operation

- VUID-VkQueryPoolCreateInfo-queryType-07906
  If `queryType` is VK_QUERY_TYPE_VIDEO_ENCODE_FEEDBACK_KHR, then the `pNext` chain must include a VkQueryPoolVideoEncodeFeedbackCreateInfoKHR structure

- VUID-VkQueryPoolCreateInfo-queryType-07907
  If `queryType` is VK_QUERY_TYPE_VIDEO_ENCODE_FEEDBACK_KHR, and the `pNext` chain includes a VkVideoProfileInfoKHR structure and a VkQueryPoolVideoEncodeFeedbackCreateInfoKHR structure, then VkQueryPoolVideoEncodeFeedbackCreateInfoKHR::`encodeFeedbackFlags` must not contain any bits that are not set in VkVideoEncodeCapabilitiesKHR::`supportedEncodeFeedbackFlags`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile described by VkVideoProfileInfoKHR and its `pNext` chain

- VUID-VkQueryPoolCreateInfo-queryType-12437
  If `queryType` is VK_QUERY_TYPE_VIDEO_ENCODE_FEEDBACK_KHR and the `pNext` chain includes a VkQueryPoolVideoEncodeFeedbackCreateInfoKHR structure with its `encodeFeedbackFlags` member containing VK_VIDEO_ENCODE_FEEDBACK_AVERAGE_QUANTIZATION_BIT_KHR, VK_VIDEO_ENCODE_FEEDBACK_MIN_QUANTIZATION_BIT_KHR, VK_VIDEO_ENCODE_FEEDBACK_MAX_QUANTIZATION_BIT_KHR, VK_VIDEO_ENCODE_FEEDBACK_INTRA_PIXELS_BIT_KHR, VK_VIDEO_ENCODE_FEEDBACK_INTER_PIXELS_BIT_KHR, VK_VIDEO_ENCODE_FEEDBACK_SKIPPED_PIXELS_BIT_KHR, or VK_VIDEO_ENCODE_FEEDBACK_PICTURE_PARTITION_COUNT_BIT_KHR, then `videoEncodeFeedback2` must be enabled

- VUID-VkQueryPoolCreateInfo-queryType-12438
  If `queryType` is VK_QUERY_TYPE_VIDEO_ENCODE_FEEDBACK_KHR and the `pNext` chain includes a VkQueryPoolVideoEncodePerPartitionFeedbackCreateInfoKHR structure with a non-zero `maxPerPartitionFeedbackEntries` member, then `videoEncodeFeedback2` must be enabled

- VUID-VkQueryPoolCreateInfo-queryType-12439
  If `queryType` is VK_QUERY_TYPE_VIDEO_ENCODE_FEEDBACK_KHR and the `pNext` chain includes a VkQueryPoolVideoEncodePerPartitionFeedbackCreateInfoKHR structure with a non-zero `maxPerPartitionFeedbackEntries` member, then VkQueryPoolVideoEncodePerPartitionFeedbackCreateInfoKHR::`perPartitionEncodeFeedbackFlags` must not be zero

- VUID-VkQueryPoolCreateInfo-queryType-12440
  If `queryType` is VK_QUERY_TYPE_VIDEO_ENCODE_FEEDBACK_KHR and the `pNext` chain includes a VkQueryPoolVideoEncodePerPartitionFeedbackCreateInfoKHR structure, then its `maxPerPartitionFeedbackEntries` must be less than or equal to VkVideoEncodeFeedback2CapabilitiesKHR::`maxPerPartitionFeedbackEntries`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile described by VkVideoProfileInfoKHR and its `pNext` chain

- VUID-VkQueryPoolCreateInfo-queryType-12441
  If `queryType` is VK_QUERY_TYPE_VIDEO_ENCODE_FEEDBACK_KHR and the `pNext` chain includes a VkQueryPoolVideoEncodePerPartitionFeedbackCreateInfoKHR structure, then its `perPartitionEncodeFeedbackFlags` must not contain any bits that are not set in VkVideoEncodeFeedback2CapabilitiesKHR::`supportedPerPartitionEncodeFeedbackFlags`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile described by VkVideoProfileInfoKHR and its `pNext` chain

- VUID-VkQueryPoolCreateInfo-pNext-10248
  If the `pNext` chain includes a VkVideoProfileInfoKHR structure and its `videoCodecOperation` member is VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR, then the `videoEncodeAV1` feature must be enabled

- VUID-VkQueryPoolCreateInfo-pNext-10918
  If the `pNext` chain includes a VkVideoEncodeProfileRgbConversionInfoVALVE structure, then the `videoEncodeRgbConversion` feature must be enabled

Valid Usage (Implicit)

- VUID-VkQueryPoolCreateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO

- VUID-VkQueryPoolCreateInfo-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkQueryPoolPerformanceCreateInfoKHR, VkQueryPoolPerformanceQueryCreateInfoINTEL, VkQueryPoolVideoEncodeFeedbackCreateInfoKHR, VkQueryPoolVideoEncodePerPartitionFeedbackCreateInfoKHR, VkVideoDecodeAV1ProfileInfoKHR, VkVideoDecodeH264ProfileInfoKHR, VkVideoDecodeH265ProfileInfoKHR, VkVideoDecodeUsageInfoKHR, VkVideoDecodeVP9ProfileInfoKHR, VkVideoEncodeAV1ProfileInfoKHR, VkVideoEncodeH264ProfileInfoKHR, VkVideoEncodeH265ProfileInfoKHR, VkVideoEncodeUsageInfoKHR, or VkVideoProfileInfoKHR

- VUID-VkQueryPoolCreateInfo-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkQueryPoolCreateInfo-flags-parameter
  `flags` must be a valid combination of VkQueryPoolCreateFlagBits values

- VUID-VkQueryPoolCreateInfo-queryType-parameter
  `queryType` must be a valid VkQueryType value

Bits which can be set in VkQueryPoolCreateInfo::`flags`, specifying options for query pools, are:

    // Provided by VK_VERSION_1_0
    typedef enum VkQueryPoolCreateFlagBits {
      // Provided by VK_KHR_maintenance9
        VK_QUERY_POOL_CREATE_RESET_BIT_KHR = 0x00000001,
    } VkQueryPoolCreateFlagBits;

- VK_QUERY_POOL_CREATE_RESET_BIT_KHR specifies that queries in the query pool are initialized on creation and do not need to be reset before first use.

    // Provided by VK_VERSION_1_0
    typedef VkFlags VkQueryPoolCreateFlags;

`VkQueryPoolCreateFlags` is a bitmask type for setting a mask of zero or more VkQueryPoolCreateFlagBits.

The `VkQueryPoolPerformanceCreateInfoKHR` structure is defined as:

    // Provided by VK_KHR_performance_query
    typedef struct VkQueryPoolPerformanceCreateInfoKHR {
        VkStructureType    sType;
        const void*        pNext;
        uint32_t           queueFamilyIndex;
        uint32_t           counterIndexCount;
        const uint32_t*    pCounterIndices;
    } VkQueryPoolPerformanceCreateInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `queueFamilyIndex` is the queue family index to create this performance query pool for.

- `counterIndexCount` is the length of the `pCounterIndices` array.

- `pCounterIndices` is a pointer to an array of indices into the vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR::`pCounters` to enable in this performance query pool.

Valid Usage

- VUID-VkQueryPoolPerformanceCreateInfoKHR-queueFamilyIndex-03236
  `queueFamilyIndex` must be a valid queue family index of the device

- VUID-VkQueryPoolPerformanceCreateInfoKHR-performanceCounterQueryPools-03237
  The `performanceCounterQueryPools` feature must be enabled

- VUID-VkQueryPoolPerformanceCreateInfoKHR-pCounterIndices-03321
  Each element of `pCounterIndices` must be in the range of counters reported by `vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR` for the queue family specified in `queueFamilyIndex`

Valid Usage (Implicit)

- VUID-VkQueryPoolPerformanceCreateInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_QUERY_POOL_PERFORMANCE_CREATE_INFO_KHR

- VUID-VkQueryPoolPerformanceCreateInfoKHR-pCounterIndices-parameter
  `pCounterIndices` must be a valid pointer to an array of `counterIndexCount` `uint32_t` values

- VUID-VkQueryPoolPerformanceCreateInfoKHR-counterIndexCount-arraylength
  `counterIndexCount` must be greater than `0`

Structure Chaining

Extends the structure

  - VkQueryPoolCreateInfo

To query the number of passes required to query a performance query pool on a physical device, call:

    // Provided by VK_KHR_performance_query
    void vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR(
        VkPhysicalDevice                            physicalDevice,
        const VkQueryPoolPerformanceCreateInfoKHR*  pPerformanceQueryCreateInfo,
        uint32_t*                                   pNumPasses);

- `physicalDevice` is the handle to the physical device whose queue family performance query counter properties will be queried.

- `pPerformanceQueryCreateInfo` is a pointer to a `VkQueryPoolPerformanceCreateInfoKHR` of the performance query that is to be created.

- `pNumPasses` is a pointer to an integer related to the number of passes required to query the performance query pool, as described below.

The `pPerformanceQueryCreateInfo` member `VkQueryPoolPerformanceCreateInfoKHR`::`queueFamilyIndex` must be a queue family of `physicalDevice`. The number of passes required to capture the counters specified in the `pPerformanceQueryCreateInfo` member `VkQueryPoolPerformanceCreateInfoKHR`::`pCounters` is returned in `pNumPasses`.

Valid Usage (Implicit)

- VUID-vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR-physicalDevice-parameter
  `physicalDevice` must be a valid VkPhysicalDevice handle

- VUID-vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR-pPerformanceQueryCreateInfo-parameter
  `pPerformanceQueryCreateInfo` must be a valid pointer to a valid VkQueryPoolPerformanceCreateInfoKHR structure

- VUID-vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR-pNumPasses-parameter
  `pNumPasses` must be a valid pointer to a `uint32_t` value

To destroy a query pool, call:

    // Provided by VK_VERSION_1_0
    void vkDestroyQueryPool(
        VkDevice                                    device,
        VkQueryPool                                 queryPool,
        const VkAllocationCallbacks*                pAllocator);

- `device` is the logical device that destroys the query pool.

- `queryPool` is the query pool to destroy.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

Valid Usage

- VUID-vkDestroyQueryPool-queryPool-00793
  All submitted commands that refer to `queryPool` must have completed execution

- VUID-vkDestroyQueryPool-queryPool-00794
  If `VkAllocationCallbacks` were provided when `queryPool` was created, a compatible set of callbacks must be provided here

- VUID-vkDestroyQueryPool-queryPool-00795
  If no `VkAllocationCallbacks` were provided when `queryPool` was created, `pAllocator` must be `NULL`

Note | Applications can verify that `queryPool` can be destroyed by checking that `vkGetQueryPoolResults`() without the VK_QUERY_RESULT_PARTIAL_BIT flag returns VK_SUCCESS for all queries that are used in command buffers submitted for execution.

Valid Usage (Implicit)

- VUID-vkDestroyQueryPool-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkDestroyQueryPool-queryPool-parameter
  If `queryPool` is not VK_NULL_HANDLE, `queryPool` must be a valid VkQueryPool handle

- VUID-vkDestroyQueryPool-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkDestroyQueryPool-queryPool-parent
  If `queryPool` is a valid handle, it must have been created, allocated, or retrieved from `device`

Host Synchronization

- Host access to `queryPool` must be externally synchronized

Possible values of VkQueryPoolCreateInfo::`queryType`, specifying the type of queries managed by the pool, are:

    // Provided by VK_VERSION_1_0
    typedef enum VkQueryType {
        VK_QUERY_TYPE_OCCLUSION = 0,
        VK_QUERY_TYPE_PIPELINE_STATISTICS = 1,
        VK_QUERY_TYPE_TIMESTAMP = 2,
      // Provided by VK_KHR_video_queue
        VK_QUERY_TYPE_RESULT_STATUS_ONLY_KHR = 1000023000,
      // Provided by VK_EXT_transform_feedback
        VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT = 1000028004,
      // Provided by VK_KHR_performance_query
        VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR = 1000116000,
      // Provided by VK_KHR_acceleration_structure
        VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_KHR = 1000150000,
      // Provided by VK_KHR_acceleration_structure
        VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_SIZE_KHR = 1000150001,
      // Provided by VK_NV_ray_tracing
        VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_NV = 1000165000,
      // Provided by VK_QCOM_elapsed_timer_query
        VK_QUERY_TYPE_TIME_ELAPSED_QCOM = 1000173000,
      // Provided by VK_INTEL_performance_query
        VK_QUERY_TYPE_PERFORMANCE_QUERY_INTEL = 1000210000,
      // Provided by VK_KHR_video_encode_queue
        VK_QUERY_TYPE_VIDEO_ENCODE_FEEDBACK_KHR = 1000299000,
      // Provided by VK_EXT_mesh_shader
        VK_QUERY_TYPE_MESH_PRIMITIVES_GENERATED_EXT = 1000328000,
      // Provided by VK_EXT_primitives_generated_query
        VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT = 1000382000,
      // Provided by VK_KHR_ray_tracing_maintenance1
        VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_BOTTOM_LEVEL_POINTERS_KHR = 1000386000,
      // Provided by VK_KHR_ray_tracing_maintenance1
        VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SIZE_KHR = 1000386001,
      // Provided by VK_EXT_opacity_micromap
        VK_QUERY_TYPE_MICROMAP_SERIALIZATION_SIZE_EXT = 1000396000,
      // Provided by VK_EXT_opacity_micromap
        VK_QUERY_TYPE_MICROMAP_COMPACTED_SIZE_EXT = 1000396001,
    } VkQueryType;

- VK_QUERY_TYPE_OCCLUSION specifies an occlusion query.

- VK_QUERY_TYPE_PIPELINE_STATISTICS specifies a pipeline statistics query.

- VK_QUERY_TYPE_TIMESTAMP specifies a timestamp query.

- VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR specifies a performance query.

- VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT specifies a transform feedback query.

- VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT specifies a primitives generated query.

- VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_KHR specifies a acceleration structure size query for use with vkCmdWriteAccelerationStructuresPropertiesKHR or vkWriteAccelerationStructuresPropertiesKHR.

- VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_SIZE_KHR specifies a serialization acceleration structure size query.

- VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SIZE_KHR specifies an acceleration structure size query for use with vkCmdWriteAccelerationStructuresPropertiesKHR or vkWriteAccelerationStructuresPropertiesKHR.

- VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_BOTTOM_LEVEL_POINTERS_KHR specifies a serialization acceleration structure pointer count query.

- VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_NV specifies an acceleration structure size query for use with vkCmdWriteAccelerationStructuresPropertiesNV.

- VK_QUERY_TYPE_PERFORMANCE_QUERY_INTEL specifies a Intel performance query.

- VK_QUERY_TYPE_RESULT_STATUS_ONLY_KHR specifies a result status query.

- VK_QUERY_TYPE_VIDEO_ENCODE_FEEDBACK_KHR specifies a video encode feedback query.

- VK_QUERY_TYPE_MESH_PRIMITIVES_GENERATED_EXT specifies a generated mesh primitives query.

- VK_QUERY_TYPE_TIME_ELAPSED_QCOM specifies an elapsed timer query.

- VK_QUERY_TYPE_MICROMAP_SERIALIZATION_SIZE_EXT specifies a micromap query to get the size required by a serialized micromap.

- VK_QUERY_TYPE_MICROMAP_COMPACTED_SIZE_EXT specifies a micromap query to get the size required by a compacted micromap.

### 23.2. Query Operation

The operation of queries is controlled by the commands vkCmdBeginQuery, vkCmdEndQuery, vkCmdBeginQueryIndexedEXT, vkCmdEndQueryIndexedEXT, vkCmdResetQueryPool, vkCmdCopyQueryPoolResults, vkCmdWriteAccelerationStructuresPropertiesKHR, vkCmdWriteAccelerationStructuresPropertiesNV, vkCmdWriteMicromapsPropertiesEXT, vkCmdCopyQueryPoolResultsToMemoryKHR, vkCmdWriteTimestamp2, and vkCmdWriteTimestamp.

In order for a `VkCommandBuffer` to record query management commands, the queue family for which its `VkCommandPool` was created must support the appropriate type of operations (graphics, compute) suitable for the query type of a given query pool.

Each query in a query pool has a status that is either unavailable or available, and also has state to store the numerical results of a query operation of the type requested when the query pool was created. Resetting a query via vkCmdResetQueryPool or vkResetQueryPool sets the status to unavailable and makes the numerical results undefined. A query is made available by the operation of vkCmdEndQuery, vkCmdEndQueryIndexedEXT, vkCmdWriteAccelerationStructuresPropertiesKHR, vkCmdWriteAccelerationStructuresPropertiesNV, vkCmdWriteMicromapsPropertiesEXT, vkCmdWriteTimestamp2, or vkCmdWriteTimestamp. Both the availability status and numerical results can be retrieved by calling either vkGetQueryPoolResults or vkCmdCopyQueryPoolResults.

After query pool creation, where VK_QUERY_POOL_CREATE_RESET_BIT_KHR was not set in VkQueryPoolCreateInfo::`flags` each query is in an uninitialized state and must be reset before it is used. Queries must also be reset between uses.

If a logical device includes multiple physical devices, then each command that writes a query must execute on a single physical device, and any call to vkCmdBeginQuery must execute the corresponding vkCmdEndQuery command on the same physical device.

To reset a range of queries in a query pool on a queue, call:

    // Provided by VK_VERSION_1_0
    void vkCmdResetQueryPool(
        VkCommandBuffer                             commandBuffer,
        VkQueryPool                                 queryPool,
        uint32_t                                    firstQuery,
        uint32_t                                    queryCount);

- `commandBuffer` is the command buffer into which this command will be recorded.

- `queryPool` is the handle of the query pool managing the queries being reset.

- `firstQuery` is the initial query index to reset.

- `queryCount` is the number of queries to reset.

When executed on a queue, this command sets the status of query indices [`firstQuery`, `firstQuery` + `queryCount` - 1] to unavailable.

This command defines an execution dependency between other query commands that reference the same query.

The first synchronization scope includes all commands which reference the queries in `queryPool` indicated by `firstQuery` and `queryCount` that occur earlier in submission order.

The second synchronization scope includes all commands which reference the queries in `queryPool` indicated by `firstQuery` and `queryCount` that occur later in submission order.

The operation of this command happens after the first scope and happens before the second scope.

If the `queryType` used to create `queryPool` was VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR, this command sets the status of query indices [`firstQuery`, `firstQuery` + `queryCount` - 1] to unavailable for each pass of `queryPool`, as indicated by a call to vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR.

Note | Because `vkCmdResetQueryPool` resets all the passes of the indicated queries, applications must not record a `vkCmdResetQueryPool` command for a `queryPool` created with VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR in a command buffer that needs to be submitted multiple times as indicated by a call to vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR. Otherwise applications will never be able to complete the recorded queries.

Valid Usage

- VUID-vkCmdResetQueryPool-firstQuery-09436
  `firstQuery` must be less than the number of queries in `queryPool`

- VUID-vkCmdResetQueryPool-firstQuery-09437
  The sum of `firstQuery` and `queryCount` must be less than or equal to the number of queries in `queryPool`

- VUID-vkCmdResetQueryPool-None-02841
  All queries used by the command must not be active

- VUID-vkCmdResetQueryPool-firstQuery-02862
  If `queryPool` was created with VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR, this command must not be recorded in a command buffer that, either directly or through secondary command buffers, also contains begin commands for a query from the set of queries [`firstQuery`, `firstQuery` + `queryCount` - 1]

Valid Usage (Implicit)

- VUID-vkCmdResetQueryPool-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdResetQueryPool-queryPool-parameter
  `queryPool` must be a valid VkQueryPool handle

- VUID-vkCmdResetQueryPool-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdResetQueryPool-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, VK_QUEUE_GRAPHICS_BIT, VK_QUEUE_OPTICAL_FLOW_BIT_NV, VK_QUEUE_VIDEO_DECODE_BIT_KHR, or VK_QUEUE_VIDEO_ENCODE_BIT_KHR operations

- VUID-vkCmdResetQueryPool-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdResetQueryPool-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdResetQueryPool-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdResetQueryPool-commonparent
  Both of `commandBuffer`, and `queryPool` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT VK_QUEUE_OPTICAL_FLOW_BIT_NV VK_QUEUE_VIDEO_DECODE_BIT_KHR VK_QUEUE_VIDEO_ENCODE_BIT_KHR | Action

Conditional Rendering

vkCmdResetQueryPool is not affected by conditional rendering

To reset a range of queries in a query pool on the host, call:

    // Provided by VK_VERSION_1_2
    void vkResetQueryPool(
        VkDevice                                    device,
        VkQueryPool                                 queryPool,
        uint32_t                                    firstQuery,
        uint32_t                                    queryCount);

    // Provided by VK_EXT_host_query_reset
    // Equivalent to vkResetQueryPool
    void vkResetQueryPoolEXT(
        VkDevice                                    device,
        VkQueryPool                                 queryPool,
        uint32_t                                    firstQuery,
        uint32_t                                    queryCount);

- `device` is the logical device that owns the query pool.

- `queryPool` is the handle of the query pool managing the queries being reset.

- `firstQuery` is the initial query index to reset.

- `queryCount` is the number of queries to reset.

This command sets the status of query indices [`firstQuery`, `firstQuery` + `queryCount` - 1] to unavailable.

If `queryPool` is VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR this command sets the status of query indices [`firstQuery`, `firstQuery` + `queryCount` - 1] to unavailable for each pass.

Valid Usage

- VUID-vkResetQueryPool-firstQuery-09436
  `firstQuery` must be less than the number of queries in `queryPool`

- VUID-vkResetQueryPool-firstQuery-09437
  The sum of `firstQuery` and `queryCount` must be less than or equal to the number of queries in `queryPool`

- VUID-vkResetQueryPool-None-02665
  The `hostQueryReset` feature must be enabled

- VUID-vkResetQueryPool-firstQuery-02741
  Submitted commands that refer to the range specified by `firstQuery` and `queryCount` in `queryPool` must have completed execution

- VUID-vkResetQueryPool-firstQuery-02742
  The range of queries specified by `firstQuery` and `queryCount` in `queryPool` must not be in use by calls to vkGetQueryPoolResults or `vkResetQueryPool` in other threads

Valid Usage (Implicit)

- VUID-vkResetQueryPool-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkResetQueryPool-queryPool-parameter
  `queryPool` must be a valid VkQueryPool handle

- VUID-vkResetQueryPool-queryPool-parent
  `queryPool` must have been created, allocated, or retrieved from `device`

Once queries are reset and ready for use, query commands can be issued to a command buffer. Pipeline statistics queries count pipeline stage invocations, occlusion queries count drawn samples, elapsed timer queries count elapsed time resulting from commands that are recorded between a vkCmdBeginQuery command and a vkCmdEndQuery command within a specified command buffer, effectively scoping a set of dispatching and/or drawing commands. Timestamp queries write timestamps to a query pool. Performance queries record performance counters to a query pool.

A query must begin and end in the same command buffer, although if it is a primary command buffer, and the `inheritedQueries` feature is enabled, it can execute secondary command buffers during the query operation. For a secondary command buffer to be executed while an occlusion query or pipeline statistics query is active, it must set the `occlusionQueryEnable`, `queryFlags`, and/or `pipelineStatistics` members of VkCommandBufferInheritanceInfo to conservative values, as described in the Command Buffer Recording section. A query must either begin and end inside the same subpass of a render pass instance, or must both begin and end outside of a render pass instance (i.e. contain entire render pass instances).

If queries are used while executing a render pass instance that has multiview enabled, the query uses N consecutive query indices in the query pool (starting at `query`) where N is the number of bits set in the view mask in the subpass the query is used in. How the numerical results of the query are distributed among the queries is implementation-dependent. For example, some implementations may write each view’s results to a distinct query, while other implementations may write the total result to the first query and write zero to the other queries. However, the sum of the results in all the queries must accurately reflect the total result of the query summed over all views. Applications can sum the results from all the queries to compute the total result.

Queries used with multiview rendering must not span subpasses, i.e. they must begin and end in the same subpass.

A query must either begin and end inside the same video coding scope, or must both begin and end outside of a video coding scope and must not contain entire video coding scopes.

To begin a query, call:

    // Provided by VK_VERSION_1_0
    void vkCmdBeginQuery(
        VkCommandBuffer                             commandBuffer,
        VkQueryPool                                 queryPool,
        uint32_t                                    query,
        VkQueryControlFlags                         flags);

- `commandBuffer` is the command buffer into which this command will be recorded.

- `queryPool` is the query pool that will manage the results of the query.

- `query` is the query index within the query pool that will contain the results.

- `flags` is a bitmask of VkQueryControlFlagBits specifying constraints on the types of queries that can be performed.

If the `queryType` of the pool is VK_QUERY_TYPE_OCCLUSION and `flags` contains VK_QUERY_CONTROL_PRECISE_BIT, an implementation must return a result that matches the actual number of samples passed. This is described in more detail in Occlusion Queries.

Calling `vkCmdBeginQuery` is equivalent to calling vkCmdBeginQueryIndexedEXT with the `index` parameter set to zero.

After beginning a query, that query is considered active within the command buffer it was called in until that same query is ended. Queries active in a primary command buffer when secondary command buffers are executed are considered active for those secondary command buffers.

Furthermore, if the query is started within a video coding scope, the following command buffer states are initialized for the query type:

- The active_query_index is set to the value specified by `query`.

- The last activatable query index is also set to the value specified by `query`.

Each video coding operation stores a result to the query corresponding to the current active query index, followed by incrementing the active query index. If the active query index gets incremented past the last activatable query index, issuing any further video coding operations results in undefined behavior.

Note | In practice, this means that currently no more than a single video coding operation must be issued between a begin and end query pair.

This command defines an execution dependency between other query commands that reference the same query.

The first synchronization scope includes all commands which reference the queries in `queryPool` indicated by `query` that occur earlier in submission order.

The second synchronization scope includes all commands which reference the queries in `queryPool` indicated by `query` that occur later in submission order.

The operation of this command happens after the first scope and happens before the second scope.

If the `queryType` of the pool is VK_QUERY_TYPE_TIME_ELAPSED_QCOM, this command also defines an execution dependency on commands that were submitted before it, and starting the timer.

The first synchronization scope includes all commands that occur earlier in submission order.

The second synchronization scope includes only the starting of the timer.

Valid Usage

- VUID-vkCmdBeginQuery-None-00807
  All queries used by the command must be unavailable

- VUID-vkCmdBeginQuery-queryType-02804
  The `queryType` used to create `queryPool` must not be VK_QUERY_TYPE_TIMESTAMP

- VUID-vkCmdBeginQuery-queryType-04728
  The `queryType` used to create `queryPool` must not be VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_KHR or VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_SIZE_KHR

- VUID-vkCmdBeginQuery-queryType-06741
  The `queryType` used to create `queryPool` must not be VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SIZE_KHR or VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_BOTTOM_LEVEL_POINTERS_KHR

- VUID-vkCmdBeginQuery-queryType-04729
  The `queryType` used to create `queryPool` must not be VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_NV

- VUID-vkCmdBeginQuery-queryType-08972
  The `queryType` used to create `queryPool` must not be VK_QUERY_TYPE_MICROMAP_SERIALIZATION_SIZE_EXT, or VK_QUERY_TYPE_MICROMAP_COMPACTED_SIZE_EXT

- VUID-vkCmdBeginQuery-queryType-00800
  If the `occlusionQueryPrecise` feature is not enabled, or the `queryType` used to create `queryPool` was not VK_QUERY_TYPE_OCCLUSION, `flags` must not contain VK_QUERY_CONTROL_PRECISE_BIT

- VUID-vkCmdBeginQuery-query-00802
  `query` must be less than the number of queries in `queryPool`

- VUID-vkCmdBeginQuery-queryType-00803
  If the `queryType` used to create `queryPool` was VK_QUERY_TYPE_OCCLUSION, the `VkCommandPool` that `commandBuffer` was allocated from must support graphics operations

- VUID-vkCmdBeginQuery-queryType-00804
  If the `queryType` used to create `queryPool` was VK_QUERY_TYPE_PIPELINE_STATISTICS and any of the `pipelineStatistics` indicate graphics operations, the `VkCommandPool` that `commandBuffer` was allocated from must support graphics operations

- VUID-vkCmdBeginQuery-queryType-00805
  If the `queryType` used to create `queryPool` was VK_QUERY_TYPE_PIPELINE_STATISTICS and any of the `pipelineStatistics` indicate compute operations, the `VkCommandPool` that `commandBuffer` was allocated from must support compute operations

- VUID-vkCmdBeginQuery-commandBuffer-01885
  `commandBuffer` must not be a protected command buffer

- VUID-vkCmdBeginQuery-query-00808
  If called within a render pass instance, the sum of `query` and the number of bits set in the current subpass’s view mask must be less than or equal to the number of queries in `queryPool`

- VUID-vkCmdBeginQuery-queryType-07126
  If the `queryType` used to create `queryPool` was VK_QUERY_TYPE_RESULT_STATUS_ONLY_KHR, then the `VkCommandPool` that `commandBuffer` was allocated from must have been created with a queue family index that supports result status queries, as indicated by VkQueueFamilyQueryResultStatusPropertiesKHR::`queryResultStatusSupport`

- VUID-vkCmdBeginQuery-None-07127
  If there is a bound video session, then there must be no active queries

- VUID-vkCmdBeginQuery-None-08370
  If there is a bound video session, then it must not have been created with VK_VIDEO_SESSION_CREATE_INLINE_QUERIES_BIT_KHR

- VUID-vkCmdBeginQuery-queryType-07128
  If the `queryType` used to create `queryPool` was VK_QUERY_TYPE_RESULT_STATUS_ONLY_KHR and there is a bound video session, then `queryPool` must have been created with a VkVideoProfileInfoKHR structure included in the `pNext` chain of VkQueryPoolCreateInfo identical to the one specified in VkVideoSessionCreateInfoKHR::`pVideoProfile` the bound video session was created with

- VUID-vkCmdBeginQuery-queryType-07129
  If the `queryType` used to create `queryPool` was VK_QUERY_TYPE_VIDEO_ENCODE_FEEDBACK_KHR, then there must be a bound video session

- VUID-vkCmdBeginQuery-queryType-07130
  If the `queryType` used to create `queryPool` was VK_QUERY_TYPE_VIDEO_ENCODE_FEEDBACK_KHR and there is a bound video session, then `queryPool` must have been created with a VkVideoProfileInfoKHR structure included in the `pNext` chain of VkQueryPoolCreateInfo identical to the one specified in VkVideoSessionCreateInfoKHR::`pVideoProfile` the bound video session was created with

- VUID-vkCmdBeginQuery-queryType-07131
  If the `queryType` used to create `queryPool` was not VK_QUERY_TYPE_RESULT_STATUS_ONLY_KHR or VK_QUERY_TYPE_VIDEO_ENCODE_FEEDBACK_KHR, then there must be no bound video session

- VUID-vkCmdBeginQuery-None-10681
  This command must not be recorded when per-tile execution model is enabled

- VUID-vkCmdBeginQuery-queryType-12423
  If the `queryType` used to create `queryPool` was VK_QUERY_TYPE_TIME_ELAPSED_QCOM, the command pool’s queue family must support a non-zero `timestampValidBits`

- VUID-vkCmdBeginQuery-queryPool-01922
  `queryPool` must have been created with a `queryType` that differs from that of any queries that are active within `commandBuffer`

- VUID-vkCmdBeginQuery-queryType-07070
  If the `queryType` used to create `queryPool` was VK_QUERY_TYPE_MESH_PRIMITIVES_GENERATED_EXT the `VkCommandPool` that `commandBuffer` was allocated from must support graphics operations

- VUID-vkCmdBeginQuery-queryType-02327
  If the `queryType` used to create `queryPool` was VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT the `VkCommandPool` that `commandBuffer` was allocated from must support graphics operations

- VUID-vkCmdBeginQuery-queryType-02328
  If the `queryType` used to create `queryPool` was VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT then `VkPhysicalDeviceTransformFeedbackPropertiesEXT`::`transformFeedbackQueries` must be supported

- VUID-vkCmdBeginQuery-queryType-06687
  If the `queryType` used to create `queryPool` was VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT the `VkCommandPool` that `commandBuffer` was allocated from must support graphics operations

- VUID-vkCmdBeginQuery-queryType-06688
  If the `queryType` used to create `queryPool` was VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT then `primitivesGeneratedQuery` must be enabled

- VUID-vkCmdBeginQuery-queryPool-07289
  If `queryPool` was created with a `queryType` of VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR, then the VkQueryPoolPerformanceCreateInfoKHR::`queueFamilyIndex` `queryPool` was created with must equal the queue family index of the `VkCommandPool` that `commandBuffer` was allocated from

- VUID-vkCmdBeginQuery-queryPool-03223
  If `queryPool` was created with a `queryType` of VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR, the profiling lock must have been held before vkBeginCommandBuffer was called on `commandBuffer`

- VUID-vkCmdBeginQuery-queryPool-03224
  If `queryPool` was created with a `queryType` of VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR and one of the counters used to create `queryPool` was VK_PERFORMANCE_COUNTER_SCOPE_COMMAND_BUFFER_KHR, the query begin must be the first recorded command in `commandBuffer`

- VUID-vkCmdBeginQuery-queryPool-03225
  If `queryPool` was created with a `queryType` of VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR and one of the counters used to create `queryPool` was VK_PERFORMANCE_COUNTER_SCOPE_RENDER_PASS_KHR, the begin command must not be recorded within a render pass instance

- VUID-vkCmdBeginQuery-queryPool-03226
  If `queryPool` was created with a `queryType` of VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR and another query pool with a `queryType` VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR has been used within `commandBuffer`, its parent primary command buffer or secondary command buffer recorded within the same parent primary command buffer as `commandBuffer`, the `performanceCounterMultipleQueryPools` feature must be enabled

- VUID-vkCmdBeginQuery-None-02863
  If `queryPool` was created with a `queryType` of VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR, this command must not be recorded in a command buffer that, either directly or through secondary command buffers, also contains a `vkCmdResetQueryPool` command affecting the same query

Valid Usage (Implicit)

- VUID-vkCmdBeginQuery-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdBeginQuery-queryPool-parameter
  `queryPool` must be a valid VkQueryPool handle

- VUID-vkCmdBeginQuery-flags-parameter
  `flags` must be a valid combination of VkQueryControlFlagBits values

- VUID-vkCmdBeginQuery-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdBeginQuery-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, VK_QUEUE_GRAPHICS_BIT, VK_QUEUE_VIDEO_DECODE_BIT_KHR, or VK_QUEUE_VIDEO_ENCODE_BIT_KHR operations

- VUID-vkCmdBeginQuery-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdBeginQuery-commonparent
  Both of `commandBuffer`, and `queryPool` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Both | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT VK_QUEUE_VIDEO_DECODE_BIT_KHR VK_QUEUE_VIDEO_ENCODE_BIT_KHR | Action State

Conditional Rendering

vkCmdBeginQuery is not affected by conditional rendering

To begin an indexed query, call:

    // Provided by VK_EXT_transform_feedback
    void vkCmdBeginQueryIndexedEXT(
        VkCommandBuffer                             commandBuffer,
        VkQueryPool                                 queryPool,
        uint32_t                                    query,
        VkQueryControlFlags                         flags,
        uint32_t                                    index);

- `commandBuffer` is the command buffer into which this command will be recorded.

- `queryPool` is the query pool that will manage the results of the query.

- `query` is the query index within the query pool that will contain the results.

- `flags` is a bitmask of VkQueryControlFlagBits specifying constraints on the types of queries that can be performed.

- `index` is the query type specific index. When the query type is VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT or VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT, the index represents the vertex stream.

The `vkCmdBeginQueryIndexedEXT` command operates the same as the vkCmdBeginQuery command, except that it also accepts a query type specific `index` parameter.

This command defines an execution dependency between other query commands that reference the same query index.

The first synchronization scope includes all commands which reference the queries in `queryPool` indicated by `query` and `index` that occur earlier in submission order.

The second synchronization scope includes all commands which reference the queries in `queryPool` indicated by `query` and `index` that occur later in submission order.

The operation of this command happens after the first scope and happens before the second scope.

Valid Usage

- VUID-vkCmdBeginQueryIndexedEXT-None-00807
  All queries used by the command must be unavailable

- VUID-vkCmdBeginQueryIndexedEXT-queryType-02804
  The `queryType` used to create `queryPool` must not be VK_QUERY_TYPE_TIMESTAMP

- VUID-vkCmdBeginQueryIndexedEXT-queryType-04728
  The `queryType` used to create `queryPool` must not be VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_KHR or VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_SIZE_KHR

- VUID-vkCmdBeginQueryIndexedEXT-queryType-06741
  The `queryType` used to create `queryPool` must not be VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SIZE_KHR or VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_BOTTOM_LEVEL_POINTERS_KHR

- VUID-vkCmdBeginQueryIndexedEXT-queryType-04729
  The `queryType` used to create `queryPool` must not be VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_NV

- VUID-vkCmdBeginQueryIndexedEXT-queryType-08972
  The `queryType` used to create `queryPool` must not be VK_QUERY_TYPE_MICROMAP_SERIALIZATION_SIZE_EXT, or VK_QUERY_TYPE_MICROMAP_COMPACTED_SIZE_EXT

- VUID-vkCmdBeginQueryIndexedEXT-queryType-00800
  If the `occlusionQueryPrecise` feature is not enabled, or the `queryType` used to create `queryPool` was not VK_QUERY_TYPE_OCCLUSION, `flags` must not contain VK_QUERY_CONTROL_PRECISE_BIT

- VUID-vkCmdBeginQueryIndexedEXT-query-00802
  `query` must be less than the number of queries in `queryPool`

- VUID-vkCmdBeginQueryIndexedEXT-queryType-00803
  If the `queryType` used to create `queryPool` was VK_QUERY_TYPE_OCCLUSION, the `VkCommandPool` that `commandBuffer` was allocated from must support graphics operations

- VUID-vkCmdBeginQueryIndexedEXT-queryType-00804
  If the `queryType` used to create `queryPool` was VK_QUERY_TYPE_PIPELINE_STATISTICS and any of the `pipelineStatistics` indicate graphics operations, the `VkCommandPool` that `commandBuffer` was allocated from must support graphics operations

- VUID-vkCmdBeginQueryIndexedEXT-queryType-00805
  If the `queryType` used to create `queryPool` was VK_QUERY_TYPE_PIPELINE_STATISTICS and any of the `pipelineStatistics` indicate compute operations, the `VkCommandPool` that `commandBuffer` was allocated from must support compute operations

- VUID-vkCmdBeginQueryIndexedEXT-commandBuffer-01885
  `commandBuffer` must not be a protected command buffer

- VUID-vkCmdBeginQueryIndexedEXT-query-00808
  If called within a render pass instance, the sum of `query` and the number of bits set in the current subpass’s view mask must be less than or equal to the number of queries in `queryPool`

- VUID-vkCmdBeginQueryIndexedEXT-queryType-07126
  If the `queryType` used to create `queryPool` was VK_QUERY_TYPE_RESULT_STATUS_ONLY_KHR, then the `VkCommandPool` that `commandBuffer` was allocated from must have been created with a queue family index that supports result status queries, as indicated by VkQueueFamilyQueryResultStatusPropertiesKHR::`queryResultStatusSupport`

- VUID-vkCmdBeginQueryIndexedEXT-None-07127
  If there is a bound video session, then there must be no active queries

- VUID-vkCmdBeginQueryIndexedEXT-None-08370
  If there is a bound video session, then it must not have been created with VK_VIDEO_SESSION_CREATE_INLINE_QUERIES_BIT_KHR

- VUID-vkCmdBeginQueryIndexedEXT-queryType-07128
  If the `queryType` used to create `queryPool` was VK_QUERY_TYPE_RESULT_STATUS_ONLY_KHR and there is a bound video session, then `queryPool` must have been created with a VkVideoProfileInfoKHR structure included in the `pNext` chain of VkQueryPoolCreateInfo identical to the one specified in VkVideoSessionCreateInfoKHR::`pVideoProfile` the bound video session was created with

- VUID-vkCmdBeginQueryIndexedEXT-queryType-07129
  If the `queryType` used to create `queryPool` was VK_QUERY_TYPE_VIDEO_ENCODE_FEEDBACK_KHR, then there must be a bound video session

- VUID-vkCmdBeginQueryIndexedEXT-queryType-07130
  If the `queryType` used to create `queryPool` was VK_QUERY_TYPE_VIDEO_ENCODE_FEEDBACK_KHR and there is a bound video session, then `queryPool` must have been created with a VkVideoProfileInfoKHR structure included in the `pNext` chain of VkQueryPoolCreateInfo identical to the one specified in VkVideoSessionCreateInfoKHR::`pVideoProfile` the bound video session was created with

- VUID-vkCmdBeginQueryIndexedEXT-queryType-07131
  If the `queryType` used to create `queryPool` was not VK_QUERY_TYPE_RESULT_STATUS_ONLY_KHR or VK_QUERY_TYPE_VIDEO_ENCODE_FEEDBACK_KHR, then there must be no bound video session

- VUID-vkCmdBeginQueryIndexedEXT-None-10681
  This command must not be recorded when per-tile execution model is enabled

- VUID-vkCmdBeginQueryIndexedEXT-queryType-12423
  If the `queryType` used to create `queryPool` was VK_QUERY_TYPE_TIME_ELAPSED_QCOM, the command pool’s queue family must support a non-zero `timestampValidBits`

- VUID-vkCmdBeginQueryIndexedEXT-queryPool-04753
  If the `queryPool` was created with the same `queryType` as that of another active query within `commandBuffer`, then `index` must not match the index used for the active query

- VUID-vkCmdBeginQueryIndexedEXT-queryType-02338
  If the `queryType` used to create `queryPool` was VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT the `VkCommandPool` that `commandBuffer` was allocated from must support graphics operations

- VUID-vkCmdBeginQueryIndexedEXT-queryType-02339
  If the `queryType` used to create `queryPool` was VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT the `index` parameter must be less than `VkPhysicalDeviceTransformFeedbackPropertiesEXT`::`maxTransformFeedbackStreams`

- VUID-vkCmdBeginQueryIndexedEXT-queryType-06692
  If the `queryType` used to create `queryPool` was not VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT and not VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT, the `index` must be zero

- VUID-vkCmdBeginQueryIndexedEXT-queryType-06689
  If the `queryType` used to create `queryPool` was VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT the `VkCommandPool` that `commandBuffer` was allocated from must support graphics operations

- VUID-vkCmdBeginQueryIndexedEXT-queryType-06690
  If the `queryType` used to create `queryPool` was VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT the `index` parameter must be less than `VkPhysicalDeviceTransformFeedbackPropertiesEXT`::`maxTransformFeedbackStreams`

- VUID-vkCmdBeginQueryIndexedEXT-queryType-06691
  If the `queryType` used to create `queryPool` was VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT and the `primitivesGeneratedQueryWithNonZeroStreams` feature is not enabled, the `index` parameter must be zero

- VUID-vkCmdBeginQueryIndexedEXT-queryType-06693
  If the `queryType` used to create `queryPool` was VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT then `primitivesGeneratedQuery` must be enabled

- VUID-vkCmdBeginQueryIndexedEXT-queryType-02341
  If the `queryType` used to create `queryPool` was VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT then `VkPhysicalDeviceTransformFeedbackPropertiesEXT`::`transformFeedbackQueries` must be supported

- VUID-vkCmdBeginQueryIndexedEXT-queryType-07071
  The `queryType` used to create `queryPool` must not be VK_QUERY_TYPE_MESH_PRIMITIVES_GENERATED_EXT

- VUID-vkCmdBeginQueryIndexedEXT-queryPool-07289
  If `queryPool` was created with a `queryType` of VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR, then the VkQueryPoolPerformanceCreateInfoKHR::`queueFamilyIndex` `queryPool` was created with must equal the queue family index of the `VkCommandPool` that `commandBuffer` was allocated from

- VUID-vkCmdBeginQueryIndexedEXT-queryPool-03223
  If `queryPool` was created with a `queryType` of VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR, the profiling lock must have been held before vkBeginCommandBuffer was called on `commandBuffer`

- VUID-vkCmdBeginQueryIndexedEXT-queryPool-03224
  If `queryPool` was created with a `queryType` of VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR and one of the counters used to create `queryPool` was VK_PERFORMANCE_COUNTER_SCOPE_COMMAND_BUFFER_KHR, the query begin must be the first recorded command in `commandBuffer`

- VUID-vkCmdBeginQueryIndexedEXT-queryPool-03225
  If `queryPool` was created with a `queryType` of VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR and one of the counters used to create `queryPool` was VK_PERFORMANCE_COUNTER_SCOPE_RENDER_PASS_KHR, the begin command must not be recorded within a render pass instance

- VUID-vkCmdBeginQueryIndexedEXT-queryPool-03226
  If `queryPool` was created with a `queryType` of VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR and another query pool with a `queryType` VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR has been used within `commandBuffer`, its parent primary command buffer or secondary command buffer recorded within the same parent primary command buffer as `commandBuffer`, the `performanceCounterMultipleQueryPools` feature must be enabled

- VUID-vkCmdBeginQueryIndexedEXT-None-02863
  If `queryPool` was created with a `queryType` of VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR, this command must not be recorded in a command buffer that, either directly or through secondary command buffers, also contains a `vkCmdResetQueryPool` command affecting the same query

Valid Usage (Implicit)

- VUID-vkCmdBeginQueryIndexedEXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdBeginQueryIndexedEXT-queryPool-parameter
  `queryPool` must be a valid VkQueryPool handle

- VUID-vkCmdBeginQueryIndexedEXT-flags-parameter
  `flags` must be a valid combination of VkQueryControlFlagBits values

- VUID-vkCmdBeginQueryIndexedEXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdBeginQueryIndexedEXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, VK_QUEUE_GRAPHICS_BIT, VK_QUEUE_VIDEO_DECODE_BIT_KHR, or VK_QUEUE_VIDEO_ENCODE_BIT_KHR operations

- VUID-vkCmdBeginQueryIndexedEXT-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdBeginQueryIndexedEXT-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdBeginQueryIndexedEXT-commonparent
  Both of `commandBuffer`, and `queryPool` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT VK_QUEUE_VIDEO_DECODE_BIT_KHR VK_QUEUE_VIDEO_ENCODE_BIT_KHR | Action State

Conditional Rendering

vkCmdBeginQueryIndexedEXT is not affected by conditional rendering

Bits which can be set in vkCmdBeginQuery::`flags`, specifying constraints on the types of queries that can be performed, are:

    // Provided by VK_VERSION_1_0
    typedef enum VkQueryControlFlagBits {
        VK_QUERY_CONTROL_PRECISE_BIT = 0x00000001,
    } VkQueryControlFlagBits;

- VK_QUERY_CONTROL_PRECISE_BIT specifies the precision of occlusion queries.

    // Provided by VK_VERSION_1_0
    typedef VkFlags VkQueryControlFlags;

`VkQueryControlFlags` is a bitmask type for setting a mask of zero or more VkQueryControlFlagBits.

To end a query after the set of desired commands is recorded, call:

    // Provided by VK_VERSION_1_0
    void vkCmdEndQuery(
        VkCommandBuffer                             commandBuffer,
        VkQueryPool                                 queryPool,
        uint32_t                                    query);

- `commandBuffer` is the command buffer into which this command will be recorded.

- `queryPool` is the query pool that is managing the results of the query.

- `query` is the query index within the query pool where the result is stored.

The command completes the query in `queryPool` identified by `query`, and marks it as available.

This command defines an execution dependency between other query commands that reference the same query.

The first synchronization scope includes all commands which reference the queries in `queryPool` indicated by `query` that occur earlier in submission order.

The second synchronization scope includes only the operation of this command.

If the `queryType` of the pool is VK_QUERY_TYPE_TIME_ELAPSED_QCOM, this command also defines an execution dependency on commands that were submitted before it, and ending the timer.

The first synchronization scope includes all commands that occur earlier in submission order.

The second synchronization scope includes only the ending of the timer.

Calling `vkCmdEndQuery` is equivalent to calling vkCmdEndQueryIndexedEXT with the `index` parameter set to zero.

Valid Usage

- VUID-vkCmdEndQuery-None-01923
  All queries used by the command must be active

- VUID-vkCmdEndQuery-query-00810
  `query` must be less than the number of queries in `queryPool`

- VUID-vkCmdEndQuery-commandBuffer-01886
  `commandBuffer` must not be a protected command buffer

- VUID-vkCmdEndQuery-query-00812
  If `vkCmdEndQuery` is called within a render pass instance, the sum of `query` and the number of bits set in the current subpass’s view mask must be less than or equal to the number of queries in `queryPool`

- VUID-vkCmdEndQuery-queryPool-03227
  If `queryPool` was created with a `queryType` of VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR and one or more of the counters used to create `queryPool` was VK_PERFORMANCE_COUNTER_SCOPE_COMMAND_BUFFER_KHR, the vkCmdEndQuery must be the last recorded command in `commandBuffer`

- VUID-vkCmdEndQuery-queryPool-03228
  If `queryPool` was created with a `queryType` of VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR and one or more of the counters used to create `queryPool` was VK_PERFORMANCE_COUNTER_SCOPE_RENDER_PASS_KHR, the vkCmdEndQuery must not be recorded within a render pass instance

- VUID-vkCmdEndQuery-None-07007
  If called within a subpass of a render pass instance, the corresponding `vkCmdBeginQuery`* command must have been called previously within the same subpass

- VUID-vkCmdEndQuery-None-10682
  This command must not be recorded when per-tile execution model is enabled

Valid Usage (Implicit)

- VUID-vkCmdEndQuery-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdEndQuery-queryPool-parameter
  `queryPool` must be a valid VkQueryPool handle

- VUID-vkCmdEndQuery-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdEndQuery-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, VK_QUEUE_GRAPHICS_BIT, VK_QUEUE_VIDEO_DECODE_BIT_KHR, or VK_QUEUE_VIDEO_ENCODE_BIT_KHR operations

- VUID-vkCmdEndQuery-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdEndQuery-commonparent
  Both of `commandBuffer`, and `queryPool` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Both | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT VK_QUEUE_VIDEO_DECODE_BIT_KHR VK_QUEUE_VIDEO_ENCODE_BIT_KHR | Action State

Conditional Rendering

vkCmdEndQuery is not affected by conditional rendering

To end an indexed query after the set of desired drawing or dispatching commands is recorded, call:

    // Provided by VK_EXT_transform_feedback
    void vkCmdEndQueryIndexedEXT(
        VkCommandBuffer                             commandBuffer,
        VkQueryPool                                 queryPool,
        uint32_t                                    query,
        uint32_t                                    index);

- `commandBuffer` is the command buffer into which this command will be recorded.

- `queryPool` is the query pool that is managing the results of the query.

- `query` is the query index within the query pool where the result is stored.

- `index` is the query type specific index.

The command completes the query in `queryPool` identified by `query` and `index`, and marks it as available.

The `vkCmdEndQueryIndexedEXT` command operates the same as the vkCmdEndQuery command, except that it also accepts a query type specific `index` parameter.

This command defines an execution dependency between other query commands that reference the same query index.

The first synchronization scope includes all commands which reference the queries in `queryPool` indicated by `query` that occur earlier in submission order.

The second synchronization scope includes only the operation of this command.

Valid Usage

- VUID-vkCmdEndQueryIndexedEXT-None-02342
  All queries used by the command must be active

- VUID-vkCmdEndQueryIndexedEXT-query-02343
  `query` must be less than the number of queries in `queryPool`

- VUID-vkCmdEndQueryIndexedEXT-commandBuffer-02344
  `commandBuffer` must not be a protected command buffer

- VUID-vkCmdEndQueryIndexedEXT-query-02345
  If `vkCmdEndQueryIndexedEXT` is called within a render pass instance, the sum of `query` and the number of bits set in the current subpass’s view mask must be less than or equal to the number of queries in `queryPool`

- VUID-vkCmdEndQueryIndexedEXT-queryType-06694
  If the `queryType` used to create `queryPool` was VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT or VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT, the `index` parameter must be less than `VkPhysicalDeviceTransformFeedbackPropertiesEXT`::`maxTransformFeedbackStreams`

- VUID-vkCmdEndQueryIndexedEXT-queryType-06695
  If the `queryType` used to create `queryPool` was not VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT and not VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT, the `index` must be zero

- VUID-vkCmdEndQueryIndexedEXT-queryType-06696
  If the `queryType` used to create `queryPool` was VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT or VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT, `index` must equal the `index` used to begin the query

- VUID-vkCmdEndQueryIndexedEXT-None-07007
  If called within a subpass of a render pass instance, the corresponding `vkCmdBeginQuery`* command must have been called previously within the same subpass

- VUID-vkCmdEndQueryIndexedEXT-None-10682
  This command must not be recorded when per-tile execution model is enabled

Valid Usage (Implicit)

- VUID-vkCmdEndQueryIndexedEXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdEndQueryIndexedEXT-queryPool-parameter
  `queryPool` must be a valid VkQueryPool handle

- VUID-vkCmdEndQueryIndexedEXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdEndQueryIndexedEXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, VK_QUEUE_GRAPHICS_BIT, VK_QUEUE_VIDEO_DECODE_BIT_KHR, or VK_QUEUE_VIDEO_ENCODE_BIT_KHR operations

- VUID-vkCmdEndQueryIndexedEXT-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdEndQueryIndexedEXT-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdEndQueryIndexedEXT-commonparent
  Both of `commandBuffer`, and `queryPool` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT VK_QUEUE_VIDEO_DECODE_BIT_KHR VK_QUEUE_VIDEO_ENCODE_BIT_KHR | Action State

Conditional Rendering

vkCmdEndQueryIndexedEXT is not affected by conditional rendering

An application can retrieve results either by requesting they be written into application-provided memory, or by requesting they be copied into a `VkBuffer`. In either case, the layout in memory is defined as follows:

- The first query’s result is written starting at the first byte requested by the command, and each subsequent query’s result begins `stride` bytes later.

- Each query writes results in a tightly packed array of result values as follows:

  - Occlusion queries write one unsigned integer value - the number of samples passed.

  - Pipeline statistics queries write one unsigned integer value for each bit that is enabled in the `pipelineStatistics` when the pool is created, and the statistics values are written in bit order starting from the least significant bit.

  - Timestamp queries write one unsigned integer value.

  - Elapsed timer queries write one integer value - the elapsed time between `vkCmdBeginQuery` and `vkCmdEndQuery`.

  - Performance queries write one VkPerformanceCounterResultKHR value for each VkPerformanceCounterKHR in the query.

  - Transform feedback queries write two unsigned integer values; the first integer is the number of primitives successfully written to the corresponding transform feedback buffer and the second is the number of primitives output to the vertex stream, regardless of whether they were successfully captured or not. In other words, if the transform feedback buffer was sized too small for the number of primitives output by the vertex stream, the first integer represents the number of primitives actually written and the second is the number that would have been written if all the transform feedback buffers associated with that vertex stream were large enough.

  - Primitives generated queries write one unsigned integer value: the number of primitives output to the vertex stream, regardless of whether transform feedback is active or not, or whether they were successfully captured by transform feedback or not. This is identical to the second integer result value produced by transform feedback queries if transform feedback is active.

  - Mesh shader queries write a single unsigned integer.

  - Video encode feedback queries write one or more signed or unsigned integer values for each bit that is enabled in VkQueryPoolVideoEncodeFeedbackCreateInfoKHR::`encodeFeedbackFlags` when the pool is created, and the feedback values are written in bit order starting from the least significant bit, as described here.

- If VK_QUERY_RESULT_WITH_AVAILABILITY_BIT is specified, an additional unsigned integer result value is written indicating whether the query’s result is available, with any non-zero value indicating that it is available.

- If VK_QUERY_RESULT_WITH_STATUS_BIT_KHR is specified, an additional signed integer result value is written indicating the status of the query result. Positive values indicate success, negative values indicate failure, and zero indicates that the result is not yet available. Specific error codes are as defined in the VkQueryResultStatusKHR enumeration.

- Depending on the query type, additional results are written for each query in a tightly packed array of result values as follows:

  - If per picture partition feedback is requested, video encode feedback queries write one or more integer values after the primary query results for each encoded picture partition for each bit that is enabled in VkQueryPoolVideoEncodePerPartitionFeedbackCreateInfoKHR::`perPartitionEncodeFeedbackFlags` when the pool is created. The feedback values are written in picture-partition-major order and, for each encoded picture partition but at most for VkQueryPoolVideoEncodePerPartitionFeedbackCreateInfoKHR::`maxPerPartitionFeedbackEntries` number of picture partitions, in bit order starting from the least significant bit.

    Note | Per picture partition feedback values follow all primary query results, including the availability or result status written as the final element of the primary query results in response to VK_QUERY_RESULT_WITH_AVAILABILITY_BIT or VK_QUERY_RESULT_WITH_STATUS_BIT_KHR, respectively. Implementations will never write more per picture partition results than the `maxPerPartitionFeedbackEntries` requested when the query pool was created.

- The bit width of all integer result values written by all query types is either 32- or 64-bits, as requested by the command. The only exceptions are the VkPerformanceCounterResultKHR values written by performance queries whose type is determined by the `unit` member of the corresponding VkPerformanceCounterKHR.

- If more than one query is retrieved and `stride` is not at least as large as the size of the array of values corresponding to a single query, the values written to memory are undefined.

To retrieve status and results for a set of queries, call:

    // Provided by VK_VERSION_1_0
    VkResult vkGetQueryPoolResults(
        VkDevice                                    device,
        VkQueryPool                                 queryPool,
        uint32_t                                    firstQuery,
        uint32_t                                    queryCount,
        size_t                                      dataSize,
        void*                                       pData,
        VkDeviceSize                                stride,
        VkQueryResultFlags                          flags);

- `device` is the logical device that owns the query pool.

- `queryPool` is the query pool managing the queries containing the desired results.

- `firstQuery` is the initial query index.

- `queryCount` is the number of queries to read.

- `dataSize` is the size in bytes of the buffer pointed to by `pData`.

- `pData` is a pointer to an application-allocated buffer where the results will be written

- `stride` is the stride in bytes between results for individual queries within `pData`.

- `flags` is a bitmask of VkQueryResultFlagBits specifying how and when results are returned.

Any results written for a query are written according to a layout dependent on the query type.

If no bits are set in `flags`, and all requested queries are in the available state, results are written as an array of 32-bit unsigned integer values. Behavior when not all queries are available is described below.

If VK_QUERY_RESULT_WITH_AVAILABILITY_BIT is set, results for all queries in `queryPool` identified by `firstQuery` and `queryCount` are copied to `pData`, along with an extra availability or status value written directly after the results of each query and interpreted as an unsigned integer. A value of zero indicates that the results are not yet available, otherwise the query is complete and results are available. The size of the availability or status values is 64 bits if VK_QUERY_RESULT_64_BIT is set in `flags`. Otherwise, it is 32 bits.

If VK_QUERY_RESULT_WITH_STATUS_BIT_KHR is set, results for all queries in `queryPool` identified by `firstQuery` and `queryCount` are copied to `pData`, along with an extra status value written directly after the results of each query and interpreted as a signed integer. A value of zero indicates that the results are not yet available. Positive values indicate that the operations within the query completed successfully, and the query results are valid. Negative values indicate that the operations within the query completed unsuccessfully.

VkQueryResultStatusKHR defines specific meaning for values returned here, though implementations are free to return other values.

If the status value written is negative, indicating that the operations within the query completed unsuccessfully, then all other results written by this command are undefined unless otherwise specified for any of the results of the used query type.

Note | If VK_QUERY_RESULT_WITH_AVAILABILITY_BIT or VK_QUERY_RESULT_WITH_STATUS_BIT_KHR is set, the layout of data in the buffer is a (result,availability) or (result,status) pair for each query returned, and `stride` is the stride between each pair.

Results for any available query written by this command are final and represent the final result of the query. If VK_QUERY_RESULT_PARTIAL_BIT is set, then for any query that is unavailable, an intermediate result between zero and the final result value is written for that query. Otherwise, any result written by this command is undefined.

If VK_QUERY_RESULT_64_BIT is set, results and, if returned, availability or status values for all queries are written as an array of 64-bit values. If the `queryPool` was created with VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR, results for each query are written as an array of the type indicated by VkPerformanceCounterKHR::`storage` for the counter being queried. Otherwise, results and availability or status values are written as an array of 32-bit values. If an unsigned integer query’s value overflows the result type, the value may either wrap or saturate. If the `maintenance7` feature is enabled, for an unsigned integer query, the 32-bit result value must be equal to the 32 least significant bits of the equivalent 64-bit result value. If a signed integer query’s value overflows the result type, the value is undefined. If a floating-point query’s value is not representable as the result type, the value is undefined.

If VK_QUERY_RESULT_WAIT_BIT is set, this command defines an execution dependency with any earlier commands that writes one of the identified queries. The first synchronization scope includes all instances of vkCmdEndQuery, vkCmdEndQueryIndexedEXT, vkCmdWriteAccelerationStructuresPropertiesKHR, vkCmdWriteAccelerationStructuresPropertiesNV, vkCmdWriteMicromapsPropertiesEXT, vkCmdWriteTimestamp2, and vkCmdWriteTimestamp that reference any query in `queryPool` indicated by `firstQuery` and `queryCount`. The second synchronization scope includes the host operations of this command.

If VK_QUERY_RESULT_WAIT_BIT is not set, `vkGetQueryPoolResults` may return VK_NOT_READY if there are queries in the unavailable state.

Note | Applications must take care to ensure that use of the VK_QUERY_RESULT_WAIT_BIT bit has the desired effect. For example, if a query has been used previously and a command buffer records the commands `vkCmdResetQueryPool`, `vkCmdBeginQuery`, and `vkCmdEndQuery` for that query, then the query will remain in the available state until `vkResetQueryPool` is called or the `vkCmdResetQueryPool` command executes on a queue. Applications can use fences or events to ensure that a query has already been reset before checking for its results or availability status. Otherwise, a stale value could be returned from a previous use of the query. The above also applies when VK_QUERY_RESULT_WAIT_BIT is used in combination with VK_QUERY_RESULT_WITH_AVAILABILITY_BIT. In this case, the returned availability status may reflect the result of a previous use of the query unless `vkResetQueryPool` is called or the `vkCmdResetQueryPool` command has been executed since the last use of the query. A similar situation can arise with the VK_QUERY_RESULT_WITH_STATUS_BIT_KHR flag.

Note | Applications can double-buffer query pool usage, with a pool per frame, and reset queries at the end of the frame in which they are read.

Valid Usage

- VUID-vkGetQueryPoolResults-firstQuery-09436
  `firstQuery` must be less than the number of queries in `queryPool`

- VUID-vkGetQueryPoolResults-firstQuery-09437
  The sum of `firstQuery` and `queryCount` must be less than or equal to the number of queries in `queryPool`

- VUID-vkGetQueryPoolResults-queryCount-09438
  If `queryCount` is greater than 1, `stride` must not be zero

- VUID-vkGetQueryPoolResults-queryType-09439
  If the `queryType` used to create `queryPool` was VK_QUERY_TYPE_TIMESTAMP, `flags` must not contain VK_QUERY_RESULT_PARTIAL_BIT

- VUID-vkGetQueryPoolResults-queryType-12424
  If the `queryType` used to create `queryPool` was VK_QUERY_TYPE_TIME_ELAPSED_QCOM, `flags` must not contain VK_QUERY_RESULT_PARTIAL_BIT or VK_QUERY_RESULT_WITH_STATUS_BIT_KHR

- VUID-vkGetQueryPoolResults-queryType-09440
  If the `queryType` used to create `queryPool` was VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR, `flags` must not contain VK_QUERY_RESULT_WITH_AVAILABILITY_BIT, VK_QUERY_RESULT_WITH_STATUS_BIT_KHR, VK_QUERY_RESULT_PARTIAL_BIT, or VK_QUERY_RESULT_64_BIT

- VUID-vkGetQueryPoolResults-queryType-09441
  If the `queryType` used to create `queryPool` was VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR, the `queryPool` must have been recorded once for each pass as retrieved via a call to vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR

- VUID-vkGetQueryPoolResults-queryType-11874
  If the `queryType` used to create `queryPool` was not VK_QUERY_TYPE_RESULT_STATUS_ONLY_KHR or VK_QUERY_TYPE_VIDEO_ENCODE_FEEDBACK_KHR, then `flags` must not include VK_QUERY_RESULT_WITH_STATUS_BIT_KHR

- VUID-vkGetQueryPoolResults-queryType-09442
  If the `queryType` used to create `queryPool` was VK_QUERY_TYPE_RESULT_STATUS_ONLY_KHR, then `flags` must include VK_QUERY_RESULT_WITH_STATUS_BIT_KHR

- VUID-vkGetQueryPoolResults-flags-09443
  If `flags` includes VK_QUERY_RESULT_WITH_STATUS_BIT_KHR, then it must not include VK_QUERY_RESULT_WITH_AVAILABILITY_BIT

- VUID-vkGetQueryPoolResults-None-09401
  All queries used by the command must not be uninitialized

- VUID-vkGetQueryPoolResults-flags-02828
  If VK_QUERY_RESULT_64_BIT is not set in `flags` and the `queryType` used to create `queryPool` was not VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR, then `pData` must be aligned to a multiple of `4`

- VUID-vkGetQueryPoolResults-queryCount-12251
  If `queryCount` is greater than 1, VK_QUERY_RESULT_64_BIT is not set in `flags` and the `queryType` used to create `queryPool` was not VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR, then `stride` must be a multiple of `4`

- VUID-vkGetQueryPoolResults-flags-00815
  If VK_QUERY_RESULT_64_BIT is set in `flags` then `pData` must be aligned to a multiple of `8`

- VUID-vkGetQueryPoolResults-queryCount-12252
  If `queryCount` is greater than 1 and VK_QUERY_RESULT_64_BIT is set in `flags`, then `stride` must be a multiple of `8`

- VUID-vkGetQueryPoolResults-stride-08993
  If `queryCount` is greater than 1 and VK_QUERY_RESULT_WITH_AVAILABILITY_BIT is set, `stride` must be large enough to contain the unsigned integer representing availability or status in addition to the query result

- VUID-vkGetQueryPoolResults-queryType-03229
  If the `queryType` used to create `queryPool` was VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR, then `pData` must be aligned to a multiple of the size of VkPerformanceCounterResultKHR

- VUID-vkGetQueryPoolResults-queryCount-12253
  If `queryCount` is greater than 1 and the `queryType` used to create `queryPool` was VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR, then `stride` must be a multiple of the size of VkPerformanceCounterResultKHR

- VUID-vkGetQueryPoolResults-queryType-04519
  If `queryCount` is greater than 1 and the `queryType` used to create `queryPool` was VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR, then `stride` must be large enough to contain the VkQueryPoolPerformanceCreateInfoKHR::`counterIndexCount` used to create `queryPool` times the size of VkPerformanceCounterResultKHR

- VUID-vkGetQueryPoolResults-dataSize-00817
  `dataSize` must be large enough to contain the result of each query, as described here

Valid Usage (Implicit)

- VUID-vkGetQueryPoolResults-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetQueryPoolResults-queryPool-parameter
  `queryPool` must be a valid VkQueryPool handle

- VUID-vkGetQueryPoolResults-pData-parameter
  `pData` must be a valid pointer to an array of `dataSize` bytes

- VUID-vkGetQueryPoolResults-flags-parameter
  `flags` must be a valid combination of VkQueryResultFlagBits values

- VUID-vkGetQueryPoolResults-dataSize-arraylength
  `dataSize` must be greater than `0`

- VUID-vkGetQueryPoolResults-queryPool-parent
  `queryPool` must have been created, allocated, or retrieved from `device`

Return Codes

Success

  - VK_NOT_READY

  - VK_SUCCESS

Failure

  - VK_ERROR_DEVICE_LOST

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

Bits which can be set in vkGetQueryPoolResults::`flags` and vkCmdCopyQueryPoolResults::`flags`, specifying how and when results are returned, are:

    // Provided by VK_VERSION_1_0
    typedef enum VkQueryResultFlagBits {
        VK_QUERY_RESULT_64_BIT = 0x00000001,
        VK_QUERY_RESULT_WAIT_BIT = 0x00000002,
        VK_QUERY_RESULT_WITH_AVAILABILITY_BIT = 0x00000004,
        VK_QUERY_RESULT_PARTIAL_BIT = 0x00000008,
      // Provided by VK_KHR_video_queue
        VK_QUERY_RESULT_WITH_STATUS_BIT_KHR = 0x00000010,
    } VkQueryResultFlagBits;

- VK_QUERY_RESULT_64_BIT specifies the results will be written as an array of 64-bit unsigned integer values. If this bit is not set, the results will be written as an array of 32-bit unsigned integer values.

- VK_QUERY_RESULT_WAIT_BIT specifies that Vulkan will wait for each query’s status to become available before retrieving its results.

- VK_QUERY_RESULT_WITH_AVAILABILITY_BIT specifies that the availability status accompanies the results.

- VK_QUERY_RESULT_PARTIAL_BIT specifies that returning partial results is acceptable.

- VK_QUERY_RESULT_WITH_STATUS_BIT_KHR specifies that the last value returned in the query is a VkQueryResultStatusKHR value. See result status query for information on how an application can determine whether the use of this flag bit is supported.

    // Provided by VK_VERSION_1_0
    typedef VkFlags VkQueryResultFlags;

`VkQueryResultFlags` is a bitmask type for setting a mask of zero or more VkQueryResultFlagBits.

Specific status codes that can be returned from a query are:

    // Provided by VK_KHR_video_queue
    typedef enum VkQueryResultStatusKHR {
        VK_QUERY_RESULT_STATUS_ERROR_KHR = -1,
        VK_QUERY_RESULT_STATUS_NOT_READY_KHR = 0,
        VK_QUERY_RESULT_STATUS_COMPLETE_KHR = 1,
      // Provided by VK_KHR_video_encode_queue
        VK_QUERY_RESULT_STATUS_INSUFFICIENT_BITSTREAM_BUFFER_RANGE_KHR = -1000299000,
    } VkQueryResultStatusKHR;

- VK_QUERY_RESULT_STATUS_NOT_READY_KHR specifies that the query result is not yet available.

- VK_QUERY_RESULT_STATUS_ERROR_KHR specifies that operations did not complete successfully.

- VK_QUERY_RESULT_STATUS_COMPLETE_KHR specifies that operations completed successfully and the query result is available.

- VK_QUERY_RESULT_STATUS_INSUFFICIENT_BITSTREAM_BUFFER_RANGE_KHR specifies that a video encode operation did not complete successfully due to the destination video bitstream buffer range not being sufficiently large to fit the encoded bitstream data.

To copy query statuses and numerical results directly to buffer memory, call:

    // Provided by VK_KHR_device_address_commands
    void vkCmdCopyQueryPoolResultsToMemoryKHR(
        VkCommandBuffer                             commandBuffer,
        VkQueryPool                                 queryPool,
        uint32_t                                    firstQuery,
        uint32_t                                    queryCount,
        const VkStridedDeviceAddressRangeKHR*       pDstRange,
        VkAddressCommandFlagsKHR                    dstFlags,
        VkQueryResultFlags                          queryResultFlags);

- `commandBuffer` is the command buffer into which this command will be recorded.

- `queryPool` is the query pool managing the queries containing the desired results.

- `firstQuery` is the initial query index.

- `queryCount` is the number of queries. `firstQuery` and `queryCount` together define a range of queries.

- `pDstRange` is a pointer to a VkStridedDeviceAddressRangeKHR describing a range of memory addressed with a stride that will receive the results of the copy command.

- `dstFlags` is a VkAddressCommandFlagsKHR value defining the flags for the destination address range.

- `queryResultFlags` is a bitmask of VkQueryResultFlagBits specifying how and when results are returned.

Any results written for a query are written according to a layout dependent on the query type.

Results for any query in `queryPool` identified by `firstQuery` and `queryCount` that is available are copied to `pDstRange`.

If VK_QUERY_RESULT_WITH_AVAILABILITY_BIT is set, results for all queries in `queryPool` identified by `firstQuery` and `queryCount` are copied to `pDstRange`, along with an extra availability value written directly after the results of each query and interpreted as an unsigned integer. A value of zero indicates that the results are not yet available, otherwise the query is complete and results are available.

If VK_QUERY_RESULT_WITH_STATUS_BIT_KHR is set, results for all queries in `queryPool` identified by `firstQuery` and `queryCount` are copied to `pDstRange`, along with an extra status value written directly after the results of each query and interpreted as a signed integer. A value of zero indicates that the results are not yet available. Positive values indicate that the operations within the query completed successfully, and the query results are valid. Negative values indicate that the operations within the query completed unsuccessfully.

VkQueryResultStatusKHR defines specific meaning for values returned here, though implementations are free to return other values.

If the status value written is negative, indicating that the operations within the query completed unsuccessfully, then all other results written by this command are undefined unless otherwise specified for any of the results of the used query type.

Results for any available query written by this command are final and represent the final result of the query. If VK_QUERY_RESULT_PARTIAL_BIT is set, then for any query that is unavailable, an intermediate result between zero and the final result value is written for that query. Otherwise, any result written by this command is undefined.

If VK_QUERY_RESULT_64_BIT is set, results and availability or status values for all queries are written as an array of 64-bit values. If the `queryPool` was created with VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR, results for each query are written as an array of the type indicated by VkPerformanceCounterKHR::`storage` for the counter being queried. Otherwise, results and availability or status values are written as an array of 32-bit values. If an unsigned integer query’s value overflows the result type, the value may either wrap or saturate. If the `maintenance7` feature is enabled, for an unsigned integer query, the 32-bit result value must be equal to the 32 least significant bits of the equivalent 64-bit result value. If a signed integer query’s value overflows the result type, the value is undefined. If a floating-point query’s value is not representable as the result type, the value is undefined.

This command defines an execution dependency between other query commands that reference the same query.

The first synchronization scope includes all commands which reference the queries in `queryPool` indicated by `query` that occur earlier in submission order. If `flags` does not include VK_QUERY_RESULT_WAIT_BIT, vkCmdEndQueryIndexedEXT, vkCmdWriteTimestamp2, vkCmdEndQuery, and vkCmdWriteTimestamp are excluded from this scope.

The second synchronization scope includes all commands which reference the queries in `queryPool` indicated by `query` that occur later in submission order.

The operation of this command happens after the first scope and happens before the second scope.

`vkCmdCopyQueryPoolResultsToMemoryKHR` is considered to be a transfer operation, and its writes to buffer memory must be synchronized using VK_PIPELINE_STAGE_TRANSFER_BIT and VK_ACCESS_TRANSFER_WRITE_BIT before using the results.

Valid Usage

- VUID-vkCmdCopyQueryPoolResultsToMemoryKHR-pDstRange-13097
  If the range specified by `pDstRange` is not bound completely to memory when accessed, `dstFlags` must not include VK_ADDRESS_COMMAND_FULLY_BOUND_BIT_KHR

- VUID-vkCmdCopyQueryPoolResultsToMemoryKHR-pDstRange-13098
  If the buffer from which the range specified by `pDstRange` was created with VK_BUFFER_CREATE_PROTECTED_BIT, and `protectedNoFault` is not supported, `dstFlags` must include VK_ADDRESS_COMMAND_PROTECTED_BIT_KHR

- VUID-vkCmdCopyQueryPoolResultsToMemoryKHR-pDstRange-13099
  If the buffer from which the range specified by `pDstRange` was created without VK_BUFFER_CREATE_PROTECTED_BIT, and `protectedNoFault` is not supported, `dstFlags` must not include VK_ADDRESS_COMMAND_PROTECTED_BIT_KHR

- VUID-vkCmdCopyQueryPoolResultsToMemoryKHR-dstFlags-13100
  `dstFlags` must not include both VK_ADDRESS_COMMAND_STORAGE_BUFFER_USAGE_BIT_KHR and VK_ADDRESS_COMMAND_UNKNOWN_STORAGE_BUFFER_USAGE_BIT_KHR

- VUID-vkCmdCopyQueryPoolResultsToMemoryKHR-pDstRange-13122
  If any buffer, which is bound to a range of VkDeviceMemory that overlaps the range backing `pDstRange`, was created with VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, `dstFlags` must include VK_ADDRESS_COMMAND_STORAGE_BUFFER_USAGE_BIT_KHR or VK_ADDRESS_COMMAND_UNKNOWN_STORAGE_BUFFER_USAGE_BIT_KHR

- VUID-vkCmdCopyQueryPoolResultsToMemoryKHR-pDstRange-13123
  If any buffer, which is bound to a range of VkDeviceMemory that overlaps the range backing `pDstRange`, was created without VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, `dstFlags` must not include VK_ADDRESS_COMMAND_STORAGE_BUFFER_USAGE_BIT_KHR

- VUID-vkCmdCopyQueryPoolResultsToMemoryKHR-dstFlags-13101
  `dstFlags` must not include both VK_ADDRESS_COMMAND_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR and VK_ADDRESS_COMMAND_UNKNOWN_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR

- VUID-vkCmdCopyQueryPoolResultsToMemoryKHR-pDstRange-13124
  If any buffer, which is bound to a range of VkDeviceMemory that overlaps the range backing `pDstRange`, was created with VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT, `dstFlags` must include VK_ADDRESS_COMMAND_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR or VK_ADDRESS_COMMAND_UNKNOWN_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR

- VUID-vkCmdCopyQueryPoolResultsToMemoryKHR-pDstRange-13125
  If any buffer, which is bound to a range of VkDeviceMemory that overlaps the range backing `pDstRange`, was created without VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT, `dstFlags` must not include VK_ADDRESS_COMMAND_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR

- VUID-vkCmdCopyQueryPoolResultsToMemoryKHR-firstQuery-09436
  `firstQuery` must be less than the number of queries in `queryPool`

- VUID-vkCmdCopyQueryPoolResultsToMemoryKHR-firstQuery-09437
  The sum of `firstQuery` and `queryCount` must be less than or equal to the number of queries in `queryPool`

- VUID-vkCmdCopyQueryPoolResultsToMemoryKHR-queryCount-09438
  If `queryCount` is greater than 1, `stride` must not be zero

- VUID-vkCmdCopyQueryPoolResultsToMemoryKHR-queryType-09439
  If the `queryType` used to create `queryPool` was VK_QUERY_TYPE_TIMESTAMP, `queryResultFlags` must not contain VK_QUERY_RESULT_PARTIAL_BIT

- VUID-vkCmdCopyQueryPoolResultsToMemoryKHR-queryType-12424
  If the `queryType` used to create `queryPool` was VK_QUERY_TYPE_TIME_ELAPSED_QCOM, `flags` must not contain VK_QUERY_RESULT_PARTIAL_BIT or VK_QUERY_RESULT_WITH_STATUS_BIT_KHR

- VUID-vkCmdCopyQueryPoolResultsToMemoryKHR-queryType-09440
  If the `queryType` used to create `queryPool` was VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR, `queryResultFlags` must not contain VK_QUERY_RESULT_WITH_AVAILABILITY_BIT, VK_QUERY_RESULT_WITH_STATUS_BIT_KHR, VK_QUERY_RESULT_PARTIAL_BIT, or VK_QUERY_RESULT_64_BIT

- VUID-vkCmdCopyQueryPoolResultsToMemoryKHR-queryType-09441
  If the `queryType` used to create `queryPool` was VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR, the `queryPool` must have been recorded once for each pass as retrieved via a call to vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR

- VUID-vkCmdCopyQueryPoolResultsToMemoryKHR-queryType-11874
  If the `queryType` used to create `queryPool` was not VK_QUERY_TYPE_RESULT_STATUS_ONLY_KHR or VK_QUERY_TYPE_VIDEO_ENCODE_FEEDBACK_KHR, then `queryResultFlags` must not include VK_QUERY_RESULT_WITH_STATUS_BIT_KHR

- VUID-vkCmdCopyQueryPoolResultsToMemoryKHR-queryType-09442
  If the `queryType` used to create `queryPool` was VK_QUERY_TYPE_RESULT_STATUS_ONLY_KHR, then `queryResultFlags` must include VK_QUERY_RESULT_WITH_STATUS_BIT_KHR

- VUID-vkCmdCopyQueryPoolResultsToMemoryKHR-flags-09443
  If `queryResultFlags` includes VK_QUERY_RESULT_WITH_STATUS_BIT_KHR, then it must not include VK_QUERY_RESULT_WITH_AVAILABILITY_BIT

- VUID-vkCmdCopyQueryPoolResultsToMemoryKHR-None-13076
  All queries used by the command must not be uninitialized when the command is executed

- VUID-vkCmdCopyQueryPoolResultsToMemoryKHR-flags-13077
  If VK_QUERY_RESULT_64_BIT is not set in `flags` then `pDstRange->address` and `pDstRange->stride` must be multiples of 4

- VUID-vkCmdCopyQueryPoolResultsToMemoryKHR-flags-13078
  If VK_QUERY_RESULT_64_BIT is set in `flags` then `pDstRange->address` and `pDstRange->stride` must be multiples of 8

- VUID-vkCmdCopyQueryPoolResultsToMemoryKHR-pDstRange-13079
  `pDstRange->size` must be large enough to contain the result of each query, as described here

- VUID-vkCmdCopyQueryPoolResultsToMemoryKHR-pDstRange-13080
  The buffer from which the range defined by `pDstRange` was queried must have been created with VK_BUFFER_USAGE_TRANSFER_DST_BIT usage flag

- VUID-vkCmdCopyQueryPoolResultsToMemoryKHR-queryType-13081
  If the `queryType` used to create `queryPool` was VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR, VkPhysicalDevicePerformanceQueryPropertiesKHR::`allowCommandBufferQueryCopies` must be VK_TRUE

- VUID-vkCmdCopyQueryPoolResultsToMemoryKHR-queryType-13082
  `vkCmdCopyQueryPoolResultsToMemoryKHR` must not be called if the `queryType` used to create `queryPool` was VK_QUERY_TYPE_PERFORMANCE_QUERY_INTEL

- VUID-vkCmdCopyQueryPoolResultsToMemoryKHR-None-13083
  All queries used by the command must not be active

- VUID-vkCmdCopyQueryPoolResultsToMemoryKHR-None-13084
  All queries used by the command must have been made available by prior executed commands

- VUID-vkCmdCopyQueryPoolResultsToMemoryKHR-dstFlags-13085
  `dstFlags` must not include VK_ADDRESS_COMMAND_PROTECTED_BIT_KHR

Valid Usage (Implicit)

- VUID-vkCmdCopyQueryPoolResultsToMemoryKHR-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdCopyQueryPoolResultsToMemoryKHR-queryPool-parameter
  `queryPool` must be a valid VkQueryPool handle

- VUID-vkCmdCopyQueryPoolResultsToMemoryKHR-pDstRange-parameter
  `pDstRange` must be a valid pointer to a valid VkStridedDeviceAddressRangeKHR structure

- VUID-vkCmdCopyQueryPoolResultsToMemoryKHR-dstFlags-parameter
  `dstFlags` must be a valid combination of VkAddressCommandFlagBitsKHR values

- VUID-vkCmdCopyQueryPoolResultsToMemoryKHR-queryResultFlags-parameter
  `queryResultFlags` must be a valid combination of VkQueryResultFlagBits values

- VUID-vkCmdCopyQueryPoolResultsToMemoryKHR-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdCopyQueryPoolResultsToMemoryKHR-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_TRANSFER_BIT operations

- VUID-vkCmdCopyQueryPoolResultsToMemoryKHR-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdCopyQueryPoolResultsToMemoryKHR-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdCopyQueryPoolResultsToMemoryKHR-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdCopyQueryPoolResultsToMemoryKHR-commonparent
  Both of `commandBuffer`, and `queryPool` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Outside | VK_QUEUE_TRANSFER_BIT | Action

Conditional Rendering

vkCmdCopyQueryPoolResultsToMemoryKHR is not affected by conditional rendering

To copy query statuses and numerical results directly to buffer memory, call:

    // Provided by VK_VERSION_1_0
    void vkCmdCopyQueryPoolResults(
        VkCommandBuffer                             commandBuffer,
        VkQueryPool                                 queryPool,
        uint32_t                                    firstQuery,
        uint32_t                                    queryCount,
        VkBuffer                                    dstBuffer,
        VkDeviceSize                                dstOffset,
        VkDeviceSize                                stride,
        VkQueryResultFlags                          flags);

- `commandBuffer` is the command buffer into which this command will be recorded.

- `queryPool` is the query pool managing the queries containing the desired results.

- `firstQuery` is the initial query index.

- `queryCount` is the number of queries. `firstQuery` and `queryCount` together define a range of queries.

- `dstBuffer` is a VkBuffer object that will receive the results of the copy command.

- `dstOffset` is an offset into `dstBuffer`.

- `stride` is the stride in bytes between results for individual queries within `dstBuffer`. The required size of the backing memory for `dstBuffer` is determined as described above for vkGetQueryPoolResults.

- `flags` is a bitmask of VkQueryResultFlagBits specifying how and when results are returned.

Any results written for a query are written according to a layout dependent on the query type.

Results for any query in `queryPool` identified by `firstQuery` and `queryCount` that is available are copied to `dstBuffer`.

If VK_QUERY_RESULT_WITH_AVAILABILITY_BIT is set, results for all queries in `queryPool` identified by `firstQuery` and `queryCount` are copied to `dstBuffer`, along with an extra availability value written directly after the results of each query and interpreted as an unsigned integer. A value of zero indicates that the results are not yet available, otherwise the query is complete and results are available.

If VK_QUERY_RESULT_WITH_STATUS_BIT_KHR is set, results for all queries in `queryPool` identified by `firstQuery` and `queryCount` are copied to `dstBuffer`, along with an extra status value written directly after the results of each query and interpreted as a signed integer. A value of zero indicates that the results are not yet available. Positive values indicate that the operations within the query completed successfully, and the query results are valid. Negative values indicate that the operations within the query completed unsuccessfully.

VkQueryResultStatusKHR defines specific meaning for values returned here, though implementations are free to return other values.

If the status value written is negative, indicating that the operations within the query completed unsuccessfully, then all other results written by this command are undefined unless otherwise specified for any of the results of the used query type.

Results for any available query written by this command are final and represent the final result of the query. If VK_QUERY_RESULT_PARTIAL_BIT is set, then for any query that is unavailable, an intermediate result between zero and the final result value is written for that query. Otherwise, any result written by this command is undefined.

If VK_QUERY_RESULT_64_BIT is set, results and availability or status values for all queries are written as an array of 64-bit values. If the `queryPool` was created with VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR, results for each query are written as an array of the type indicated by VkPerformanceCounterKHR::`storage` for the counter being queried. Otherwise, results and availability or status values are written as an array of 32-bit values. If an unsigned integer query’s value overflows the result type, the value may either wrap or saturate. If the `maintenance7` feature is enabled, for an unsigned integer query, the 32-bit result value must be equal to the 32 least significant bits of the equivalent 64-bit result value. If a signed integer query’s value overflows the result type, the value is undefined. If a floating-point query’s value is not representable as the result type, the value is undefined.

This command defines an execution dependency between other query commands that reference the same query.

The first synchronization scope includes all commands which reference the queries in `queryPool` indicated by `query` that occur earlier in submission order. If `flags` does not include VK_QUERY_RESULT_WAIT_BIT, vkCmdEndQuery, vkCmdEndQueryIndexedEXT, vkCmdWriteAccelerationStructuresPropertiesKHR, vkCmdWriteAccelerationStructuresPropertiesNV, vkCmdWriteMicromapsPropertiesEXT, vkCmdWriteTimestamp2, and vkCmdWriteTimestamp are excluded from this scope.

The second synchronization scope includes all commands which reference the queries in `queryPool` indicated by `query` that occur later in submission order.

The operation of this command happens after the first scope and happens before the second scope.

`vkCmdCopyQueryPoolResults` is considered to be a transfer operation, and its writes to buffer memory must be synchronized using VK_PIPELINE_STAGE_TRANSFER_BIT and VK_ACCESS_TRANSFER_WRITE_BIT before using the results.

Valid Usage

- VUID-vkCmdCopyQueryPoolResults-firstQuery-09436
  `firstQuery` must be less than the number of queries in `queryPool`

- VUID-vkCmdCopyQueryPoolResults-firstQuery-09437
  The sum of `firstQuery` and `queryCount` must be less than or equal to the number of queries in `queryPool`

- VUID-vkCmdCopyQueryPoolResults-queryCount-09438
  If `queryCount` is greater than 1, `stride` must not be zero

- VUID-vkCmdCopyQueryPoolResults-queryType-09439
  If the `queryType` used to create `queryPool` was VK_QUERY_TYPE_TIMESTAMP, `flags` must not contain VK_QUERY_RESULT_PARTIAL_BIT

- VUID-vkCmdCopyQueryPoolResults-queryType-12424
  If the `queryType` used to create `queryPool` was VK_QUERY_TYPE_TIME_ELAPSED_QCOM, `flags` must not contain VK_QUERY_RESULT_PARTIAL_BIT or VK_QUERY_RESULT_WITH_STATUS_BIT_KHR

- VUID-vkCmdCopyQueryPoolResults-queryType-09440
  If the `queryType` used to create `queryPool` was VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR, `flags` must not contain VK_QUERY_RESULT_WITH_AVAILABILITY_BIT, VK_QUERY_RESULT_WITH_STATUS_BIT_KHR, VK_QUERY_RESULT_PARTIAL_BIT, or VK_QUERY_RESULT_64_BIT

- VUID-vkCmdCopyQueryPoolResults-queryType-09441
  If the `queryType` used to create `queryPool` was VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR, the `queryPool` must have been recorded once for each pass as retrieved via a call to vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR

- VUID-vkCmdCopyQueryPoolResults-queryType-11874
  If the `queryType` used to create `queryPool` was not VK_QUERY_TYPE_RESULT_STATUS_ONLY_KHR or VK_QUERY_TYPE_VIDEO_ENCODE_FEEDBACK_KHR, then `flags` must not include VK_QUERY_RESULT_WITH_STATUS_BIT_KHR

- VUID-vkCmdCopyQueryPoolResults-queryType-09442
  If the `queryType` used to create `queryPool` was VK_QUERY_TYPE_RESULT_STATUS_ONLY_KHR, then `flags` must include VK_QUERY_RESULT_WITH_STATUS_BIT_KHR

- VUID-vkCmdCopyQueryPoolResults-flags-09443
  If `flags` includes VK_QUERY_RESULT_WITH_STATUS_BIT_KHR, then it must not include VK_QUERY_RESULT_WITH_AVAILABILITY_BIT

- VUID-vkCmdCopyQueryPoolResults-None-09402
  All queries used by the command must not be uninitialized when the command is executed

- VUID-vkCmdCopyQueryPoolResults-dstOffset-00819
  `dstOffset` must be less than the size of `dstBuffer`

- VUID-vkCmdCopyQueryPoolResults-flags-00822
  If VK_QUERY_RESULT_64_BIT is not set in `flags` then `dstOffset` must be a multiple of `4`

- VUID-vkCmdCopyQueryPoolResults-queryCount-12254
  If `queryCount` is greater than 1 and VK_QUERY_RESULT_64_BIT is not set in `flags` then `stride` must be a multiple of `4`

- VUID-vkCmdCopyQueryPoolResults-flags-00823
  If VK_QUERY_RESULT_64_BIT is set in `flags` then `dstOffset` must be a multiple of `8`

- VUID-vkCmdCopyQueryPoolResults-queryCount-12255
  If `queryCount` is greater than 1 and VK_QUERY_RESULT_64_BIT is set in `flags` then `stride` must be a multiple of `8`

- VUID-vkCmdCopyQueryPoolResults-dstBuffer-00824
  `dstBuffer` must have enough storage, from `dstOffset`, to contain the result of each query, as described here

- VUID-vkCmdCopyQueryPoolResults-dstBuffer-00825
  `dstBuffer` must have been created with the VK_BUFFER_USAGE_TRANSFER_DST_BIT usage flag set

- VUID-vkCmdCopyQueryPoolResults-dstBuffer-00826
  If `dstBuffer` is non-sparse then it must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-vkCmdCopyQueryPoolResults-queryType-03232
  If the `queryType` used to create `queryPool` was VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR, VkPhysicalDevicePerformanceQueryPropertiesKHR::`allowCommandBufferQueryCopies` must be VK_TRUE

- VUID-vkCmdCopyQueryPoolResults-queryType-02734
  vkCmdCopyQueryPoolResults must not be called if the `queryType` used to create `queryPool` was VK_QUERY_TYPE_PERFORMANCE_QUERY_INTEL

- VUID-vkCmdCopyQueryPoolResults-None-07429
  All queries used by the command must not be active

- VUID-vkCmdCopyQueryPoolResults-None-08752
  All queries used by the command must have been made available by prior executed commands

Valid Usage (Implicit)

- VUID-vkCmdCopyQueryPoolResults-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdCopyQueryPoolResults-queryPool-parameter
  `queryPool` must be a valid VkQueryPool handle

- VUID-vkCmdCopyQueryPoolResults-dstBuffer-parameter
  `dstBuffer` must be a valid VkBuffer handle

- VUID-vkCmdCopyQueryPoolResults-flags-parameter
  `flags` must be a valid combination of VkQueryResultFlagBits values

- VUID-vkCmdCopyQueryPoolResults-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdCopyQueryPoolResults-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, or VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdCopyQueryPoolResults-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdCopyQueryPoolResults-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdCopyQueryPoolResults-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdCopyQueryPoolResults-commonparent
  Each of `commandBuffer`, `dstBuffer`, and `queryPool` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT | Action

Conditional Rendering

vkCmdCopyQueryPoolResults is not affected by conditional rendering

Rendering operations such as clears, MSAA resolves, attachment load/store operations, and blits may count towards the results of queries. This behavior is implementation-dependent and may vary depending on the path used within an implementation. For example, some implementations have several types of clears, some of which may include vertices and some not. Elapsed timer queries must count the device execution time for all operations performed between the start and end of the query.

### 23.3. Occlusion Queries

Occlusion queries track the number of samples that pass the per-fragment tests for a set of drawing commands. As such, occlusion queries are only available on queue families supporting graphics operations. The application can then use these results to inform future rendering decisions. An occlusion query is begun and ended by calling `vkCmdBeginQuery` and `vkCmdEndQuery`, respectively. When an occlusion query begins, the count of passing samples always starts at zero. For each drawing command, the count is incremented as described in Sample Counting. If `flags` does not contain VK_QUERY_CONTROL_PRECISE_BIT an implementation may generate any non-zero result value for the query if the count of passing samples is non-zero.

Note | Not setting VK_QUERY_CONTROL_PRECISE_BIT mode may be more efficient on some implementations, and should be used where it is sufficient to know a boolean result on whether any samples passed the per-fragment tests. In this case, some implementations may only return zero or one, regardless of the actual number of samples passing the per-fragment tests. Setting VK_QUERY_CONTROL_PRECISE_BIT does not guarantee that different implementations return the same number of samples in an occlusion query. Some implementations may kill fragments in the pre-rasterization shader stage, and these killed fragments do not contribute to the final result of the query. It is possible that some implementations generate a zero result value for the query, while others generate a non-zero value.

When an occlusion query finishes, the result for that query is marked as available. The application can then either copy the result to a buffer (via `vkCmdCopyQueryPoolResults`) or request it be put into host memory (via `vkGetQueryPoolResults`).

Note | If occluding geometry is not drawn first, samples can pass the depth test, but still not be visible in a final image.

### 23.4. Pipeline Statistics Queries

Pipeline statistics queries allow the application to sample a specified set of `VkPipeline` counters. These counters are accumulated by Vulkan for a set of either drawing or dispatching commands while a pipeline statistics query is active. As such, pipeline statistics queries are available on queue families supporting either graphics or compute operations. The availability of pipeline statistics queries is indicated by the `pipelineStatisticsQuery` member of the `VkPhysicalDeviceFeatures` object (see `vkGetPhysicalDeviceFeatures` and `vkCreateDevice` for detecting and requesting this query type on a `VkDevice`).

A pipeline statistics query is begun and ended by calling `vkCmdBeginQuery` and `vkCmdEndQuery`, respectively. When a pipeline statistics query begins, all statistics counters are set to zero. While the query is active, the pipeline type determines which set of statistics are available, but these must be configured on the query pool when it is created. If a statistic counter is issued on a command buffer that does not support the corresponding operation, or the counter corresponds to a shading stage which is missing from any of the pipelines used while the query is active, the value of that counter is undefined after the query has been made available. At least one statistic counter relevant to the operations supported on the recording command buffer must be enabled.

Bits which can be set in VkQueryPoolCreateInfo::`pipelineStatistics` for query pools and in VkCommandBufferInheritanceInfo::`pipelineStatistics` for secondary command buffers, individually enabling pipeline statistics counters, are:

    // Provided by VK_VERSION_1_0
    typedef enum VkQueryPipelineStatisticFlagBits {
        VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT = 0x00000001,
        VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT = 0x00000002,
        VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT = 0x00000004,
        VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT = 0x00000008,
        VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT = 0x00000010,
        VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT = 0x00000020,
        VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT = 0x00000040,
        VK_QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT = 0x00000080,
        VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT = 0x00000100,
        VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT = 0x00000200,
        VK_QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT = 0x00000400,
      // Provided by VK_EXT_mesh_shader
        VK_QUERY_PIPELINE_STATISTIC_TASK_SHADER_INVOCATIONS_BIT_EXT = 0x00000800,
      // Provided by VK_EXT_mesh_shader
        VK_QUERY_PIPELINE_STATISTIC_MESH_SHADER_INVOCATIONS_BIT_EXT = 0x00001000,
      // Provided by VK_HUAWEI_cluster_culling_shader
        VK_QUERY_PIPELINE_STATISTIC_CLUSTER_CULLING_SHADER_INVOCATIONS_BIT_HUAWEI = 0x00002000,
    } VkQueryPipelineStatisticFlagBits;

- VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT specifies that queries managed by the pool will count the number of vertices processed by the input assembly stage. Vertices corresponding to incomplete primitives may contribute to the count.

- VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT specifies that queries managed by the pool will count the number of primitives processed by the input assembly stage. If primitive restart is enabled, restarting the primitive topology has no effect on the count. Incomplete primitives may be counted.

- VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT specifies that queries managed by the pool will count the number of vertex shader invocations. This counter’s value is incremented each time a vertex shader is invoked.

- VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT specifies that queries managed by the pool will count the number of geometry shader invocations. This counter’s value is incremented each time a geometry shader is invoked. In the case of instanced geometry shaders, the geometry shader invocations count is incremented for each separate instanced invocation.

- VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT specifies that queries managed by the pool will count the number of primitives generated by geometry shader invocations. The counter’s value is incremented each time the geometry shader emits a primitive. Restarting primitive topology using the SPIR-V instructions `OpEndPrimitive` or `OpEndStreamPrimitive` has no effect on the geometry shader output primitives count.

- VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT specifies that queries managed by the pool will count the number of primitives processed by the Primitive Clipping stage of the pipeline. The counter’s value is incremented each time a primitive reaches the primitive clipping stage.

- VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT specifies that queries managed by the pool will count the number of primitives output by the Primitive Clipping stage of the pipeline. The counter’s value is incremented each time a primitive passes the primitive clipping stage. The actual number of primitives output by the primitive clipping stage for a particular input primitive is implementation-dependent but must satisfy the following conditions:

  - If at least one vertex of the input primitive lies inside the clipping volume, the counter is incremented by one or more.

  - Otherwise, the counter is incremented by zero or more.

- VK_QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT specifies that queries managed by the pool will count the number of fragment shader invocations. The counter’s value is incremented each time the fragment shader is invoked.

- VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT specifies that queries managed by the pool will count the number of patches processed by the tessellation control shader. The counter’s value is incremented once for each patch for which a tessellation control shader is invoked.

- VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT specifies that queries managed by the pool will count the number of invocations of the tessellation evaluation shader. The counter’s value is incremented each time the tessellation evaluation shader is invoked.

- VK_QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT specifies that queries managed by the pool will count the number of compute shader invocations. The counter’s value is incremented every time the compute shader is invoked. Implementations may skip the execution of certain compute shader invocations or execute additional compute shader invocations for implementation-dependent reasons as long as the results of rendering otherwise remain unchanged.

- VK_QUERY_PIPELINE_STATISTIC_TASK_SHADER_INVOCATIONS_BIT_EXT specifies that queries managed by the pool will count the number of task shader invocations. The counter’s value is incremented every time the task shader is invoked.

- VK_QUERY_PIPELINE_STATISTIC_MESH_SHADER_INVOCATIONS_BIT_EXT specifies that queries managed by the pool will count the number of mesh shader invocations. The counter’s value is incremented every time the mesh shader is invoked.

These values are intended to measure relative statistics on one implementation. Various device architectures will count these values differently. Any or all counters may be affected by the issues described in Query Operation.

This counting difference is especially true if the pipeline contains mesh or task shaders, which may affect several of the counters in unexpected ways.

Note | For example, tile-based rendering devices may need to replay the scene multiple times, affecting some of the counts.

If a pipeline has `rasterizerDiscardEnable` enabled, implementations may discard primitives after the final pre-rasterization shader stage. As a result, if `rasterizerDiscardEnable` is enabled, the clipping input and output primitives counters may not be incremented.

When a pipeline statistics query finishes, the result for that query is marked as available. The application can copy the result to a buffer (via `vkCmdCopyQueryPoolResults`), or request it be put into host memory (via `vkGetQueryPoolResults`).

    // Provided by VK_VERSION_1_0
    typedef VkFlags VkQueryPipelineStatisticFlags;

`VkQueryPipelineStatisticFlags` is a bitmask type for setting a mask of zero or more VkQueryPipelineStatisticFlagBits.

### 23.5. Timestamp Queries

Timestamps provide applications with a mechanism for monotonically tracking the execution of commands. A timestamp is an integer value generated by the `VkPhysicalDevice`. Unlike other queries, timestamps do not operate over a range, and so do not use vkCmdBeginQuery or vkCmdEndQuery. The mechanism is built around a set of commands that allow the application to tell the `VkPhysicalDevice` to write timestamp values to a query pool and then either read timestamp values on the host (using vkGetQueryPoolResults) or copy timestamp values to a `VkBuffer` (using vkCmdCopyQueryPoolResults).

The number of valid bits in a timestamp value is determined by the `VkQueueFamilyProperties`::`timestampValidBits` property of the queue on which the timestamp is written. Timestamps are supported on any queue which reports a non-zero value for `timestampValidBits` via vkGetPhysicalDeviceQueueFamilyProperties. If the `timestampComputeAndGraphics` limit is VK_TRUE, timestamps are supported by every queue family that supports either graphics or compute operations (see VkQueueFamilyProperties).

The number of nanoseconds it takes for a timestamp value to be incremented by 1 can be obtained from `VkPhysicalDeviceLimits`::`timestampPeriod` after a call to `vkGetPhysicalDeviceProperties`.

To request a timestamp and write the value to memory, call:

    // Provided by VK_VERSION_1_3
    void vkCmdWriteTimestamp2(
        VkCommandBuffer                             commandBuffer,
        VkPipelineStageFlags2                       stage,
        VkQueryPool                                 queryPool,
        uint32_t                                    query);

    // Provided by VK_KHR_synchronization2
    // Equivalent to vkCmdWriteTimestamp2
    void vkCmdWriteTimestamp2KHR(
        VkCommandBuffer                             commandBuffer,
        VkPipelineStageFlags2                       stage,
        VkQueryPool                                 queryPool,
        uint32_t                                    query);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `stage` specifies a stage of the pipeline.

- `queryPool` is the query pool that will manage the timestamp.

- `query` is the query within the query pool that will contain the timestamp.

When `vkCmdWriteTimestamp2` is submitted to a queue, it defines an execution dependency on commands that were submitted before it, and writes a timestamp to a query pool.

The first synchronization scope includes all commands that occur earlier in submission order. The synchronization scope is limited to operations on the pipeline stage specified by `stage`.

The second synchronization scope includes only the timestamp write operation.

Note | Implementations may write the timestamp at any stage that is logically later than `stage`.

Any timestamp write that happens-after another timestamp write in the same submission must not have a lower value unless its value overflows the maximum supported integer bit width of the query. If `VK_KHR_calibrated_timestamps` or `VK_EXT_calibrated_timestamps` is enabled, this extends to timestamp writes across all submissions on the same logical device: any timestamp write that happens-after another must not have a lower value unless its value overflows the maximum supported integer bit width of the query. Timestamps written by this command must be in the VK_TIME_DOMAIN_DEVICE_KHR time domain. If an overflow occurs, the timestamp value must wrap back to zero.

If `vkCmdWriteTimestamp2` is called while executing a render pass instance that has multiview enabled, the timestamp uses N consecutive query indices in the query pool (starting at `query`) where N is the number of bits set in the view mask of the subpass or dynamic render pass the command is executed in. The resulting query values are determined by an implementation-dependent choice of one of the following behaviors:

- The first query is a timestamp value and (if more than one bit is set in the view mask) zero is written to the remaining queries.

- All N queries are timestamp values.

Either way, if two timestamps are written in the same subpass or dynamic render pass with multiview enabled, each of the N consecutive queries written for a timestamp must not have a lower value than the queries with corresponding indices written by the timestamp that happens-before unless the value overflows the maximum supported integer bit width of the query.

Valid Usage

- VUID-vkCmdWriteTimestamp2-stage-03929
  If the `geometryShader` feature is not enabled, `stage` must not contain VK_PIPELINE_STAGE_2_GEOMETRY_SHADER_BIT

- VUID-vkCmdWriteTimestamp2-stage-03930
  If the `tessellationShader` feature is not enabled, `stage` must not contain VK_PIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT or VK_PIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT

- VUID-vkCmdWriteTimestamp2-stage-03931
  If the `conditionalRendering` feature is not enabled, `stage` must not contain VK_PIPELINE_STAGE_2_CONDITIONAL_RENDERING_BIT_EXT

- VUID-vkCmdWriteTimestamp2-stage-03932
  If the `fragmentDensityMap` feature is not enabled, `stage` must not contain VK_PIPELINE_STAGE_2_FRAGMENT_DENSITY_PROCESS_BIT_EXT

- VUID-vkCmdWriteTimestamp2-stage-03933
  If the `transformFeedback` feature is not enabled, `stage` must not contain VK_PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT

- VUID-vkCmdWriteTimestamp2-stage-03934
  If the `meshShader` feature is not enabled, `stage` must not contain VK_PIPELINE_STAGE_2_MESH_SHADER_BIT_EXT

- VUID-vkCmdWriteTimestamp2-stage-03935
  If the `taskShader` feature is not enabled, `stage` must not contain VK_PIPELINE_STAGE_2_TASK_SHADER_BIT_EXT

- VUID-vkCmdWriteTimestamp2-stage-07316
  If neither of the `shadingRateImage` or the `attachmentFragmentShadingRate` features are enabled, `stage` must not contain VK_PIPELINE_STAGE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

- VUID-vkCmdWriteTimestamp2-stage-04957
  If the `subpassShading` feature is not enabled, `stage` must not contain VK_PIPELINE_STAGE_2_SUBPASS_SHADER_BIT_HUAWEI

- VUID-vkCmdWriteTimestamp2-stage-04995
  If the `invocationMask` feature is not enabled, `stage` must not contain VK_PIPELINE_STAGE_2_INVOCATION_MASK_BIT_HUAWEI

- VUID-vkCmdWriteTimestamp2-stage-07946
  If neither the VK_NV_ray_tracing extension or the `rayTracingPipeline` feature are enabled, `stage` must not contain VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR

- VUID-vkCmdWriteTimestamp2-stage-10751
  If the `accelerationStructure` feature is not enabled, `stage` must not contain VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR

- VUID-vkCmdWriteTimestamp2-stage-10752
  If the `rayTracingMaintenance1` feature is not enabled, `stage` must not contain VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR

- VUID-vkCmdWriteTimestamp2-stage-11541
  If the `VkPhysicalDeviceOpacityMicromapFeaturesEXT`::`micromap` feature is not enabled, `stage` must not contain VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT

- VUID-vkCmdWriteTimestamp2-synchronization2-03858
  The `synchronization2` feature must be enabled

- VUID-vkCmdWriteTimestamp2-stage-03859
  `stage` must only include a single pipeline stage

- VUID-vkCmdWriteTimestamp2-stage-03860
  `stage` must only include stages valid for the queue family that was used to create the command pool that `commandBuffer` was allocated from

- VUID-vkCmdWriteTimestamp2-queryPool-03861
  `queryPool` must have been created with a `queryType` of VK_QUERY_TYPE_TIMESTAMP

- VUID-vkCmdWriteTimestamp2-timestampValidBits-03863
  The command pool’s queue family must support a non-zero `timestampValidBits`

- VUID-vkCmdWriteTimestamp2-query-04903
  `query` must be less than the number of queries in `queryPool`

- VUID-vkCmdWriteTimestamp2-None-03864
  All queries used by the command must be unavailable

- VUID-vkCmdWriteTimestamp2-query-03865
  If `vkCmdWriteTimestamp2` is called within a render pass instance, the sum of `query` and the number of bits set in the current subpass’s view mask must be less than or equal to the number of queries in `queryPool`

- VUID-vkCmdWriteTimestamp2-None-10639
  This command must not be recorded when per-tile execution model is enabled

Valid Usage (Implicit)

- VUID-vkCmdWriteTimestamp2-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdWriteTimestamp2-stage-parameter
  `stage` must be a valid combination of VkPipelineStageFlagBits2 values

- VUID-vkCmdWriteTimestamp2-queryPool-parameter
  `queryPool` must be a valid VkQueryPool handle

- VUID-vkCmdWriteTimestamp2-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdWriteTimestamp2-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, VK_QUEUE_GRAPHICS_BIT, VK_QUEUE_TRANSFER_BIT, VK_QUEUE_VIDEO_DECODE_BIT_KHR, or VK_QUEUE_VIDEO_ENCODE_BIT_KHR operations

- VUID-vkCmdWriteTimestamp2-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdWriteTimestamp2-commonparent
  Both of `commandBuffer`, and `queryPool` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Both | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT VK_QUEUE_TRANSFER_BIT VK_QUEUE_VIDEO_DECODE_BIT_KHR VK_QUEUE_VIDEO_ENCODE_BIT_KHR | Action

Conditional Rendering

vkCmdWriteTimestamp2 is not affected by conditional rendering

To request a timestamp and write the value to memory, call:

Warning | This functionality is superseded by vkCmdWriteTimestamp2. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_0
    void vkCmdWriteTimestamp(
        VkCommandBuffer                             commandBuffer,
        VkPipelineStageFlagBits                     pipelineStage,
        VkQueryPool                                 queryPool,
        uint32_t                                    query);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `pipelineStage` is a VkPipelineStageFlagBits value, specifying a stage of the pipeline.

- `queryPool` is the query pool that will manage the timestamp.

- `query` is the query within the query pool that will contain the timestamp.

When `vkCmdWriteTimestamp` is submitted to a queue, it defines an execution dependency on commands that were submitted before it, and writes a timestamp to a query pool.

The first synchronization scope includes all commands that occur earlier in submission order. The synchronization scope is limited to operations on the pipeline stage specified by `pipelineStage`.

The second synchronization scope includes only the timestamp write operation.

Note | Implementations may write the timestamp at any stage that is logically later than `stage`.

Any timestamp write that happens-after another timestamp write in the same submission must not have a lower value unless its value overflows the maximum supported integer bit width of the query. If `VK_KHR_calibrated_timestamps` or `VK_EXT_calibrated_timestamps` is enabled, this extends to timestamp writes across all submissions on the same logical device: any timestamp write that happens-after another must not have a lower value unless its value overflows the maximum supported integer bit width of the query. Timestamps written by this command must be in the VK_TIME_DOMAIN_DEVICE_KHR time domain. If an overflow occurs, the timestamp value must wrap back to zero.

If `vkCmdWriteTimestamp` is called while executing a render pass instance that has multiview enabled, the timestamp uses N consecutive query indices in the query pool (starting at `query`) where N is the number of bits set in the view mask of the subpass or dynamic render pass the command is executed in. The resulting query values are determined by an implementation-dependent choice of one of the following behaviors:

- The first query is a timestamp value and (if more than one bit is set in the view mask) zero is written to the remaining queries.

- All N queries are timestamp values.

Either way, if two timestamps are written in the same subpass or dynamic render pass with multiview enabled, each of the N consecutive queries written for a timestamp must not have a lower value than the queries with corresponding indices written by the timestamp that happens-before unless the value overflows the maximum supported integer bit width of the query.

Valid Usage

- VUID-vkCmdWriteTimestamp-pipelineStage-04074
  `pipelineStage` must be a valid stage for the queue family that was used to create the command pool that `commandBuffer` was allocated from

- VUID-vkCmdWriteTimestamp-pipelineStage-04075
  If the `geometryShader` feature is not enabled, `pipelineStage` must not be VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT

- VUID-vkCmdWriteTimestamp-pipelineStage-04076
  If the `tessellationShader` feature is not enabled, `pipelineStage` must not be VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT or VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT

- VUID-vkCmdWriteTimestamp-pipelineStage-04077
  If the `conditionalRendering` feature is not enabled, `pipelineStage` must not be VK_PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT

- VUID-vkCmdWriteTimestamp-pipelineStage-04078
  If the `fragmentDensityMap` feature is not enabled, `pipelineStage` must not be VK_PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT

- VUID-vkCmdWriteTimestamp-pipelineStage-04079
  If the `transformFeedback` feature is not enabled, `pipelineStage` must not be VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT

- VUID-vkCmdWriteTimestamp-pipelineStage-04080
  If the `meshShader` feature is not enabled, `pipelineStage` must not be VK_PIPELINE_STAGE_MESH_SHADER_BIT_EXT

- VUID-vkCmdWriteTimestamp-pipelineStage-07077
  If the `taskShader` feature is not enabled, `pipelineStage` must not be VK_PIPELINE_STAGE_TASK_SHADER_BIT_EXT

- VUID-vkCmdWriteTimestamp-shadingRateImage-07314
  If neither of the `shadingRateImage` or the `attachmentFragmentShadingRate` features are enabled, `pipelineStage` must not be VK_PIPELINE_STAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

- VUID-vkCmdWriteTimestamp-synchronization2-06489
  If the `synchronization2` feature is not enabled, `pipelineStage` must not be VK_PIPELINE_STAGE_NONE

- VUID-vkCmdWriteTimestamp-rayTracingPipeline-07943
  If neither of the VK_NV_ray_tracing extension or the `rayTracingPipeline` feature are enabled, `pipelineStage` must not be VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_KHR

- VUID-vkCmdWriteTimestamp-queryPool-01416
  `queryPool` must have been created with a `queryType` of VK_QUERY_TYPE_TIMESTAMP

- VUID-vkCmdWriteTimestamp-timestampValidBits-00829
  The command pool’s queue family must support a non-zero `timestampValidBits`

- VUID-vkCmdWriteTimestamp-query-04904
  `query` must be less than the number of queries in `queryPool`

- VUID-vkCmdWriteTimestamp-None-00830
  All queries used by the command must be unavailable

- VUID-vkCmdWriteTimestamp-query-00831
  If `vkCmdWriteTimestamp` is called within a render pass instance, the sum of `query` and the number of bits set in the current subpass’s view mask must be less than or equal to the number of queries in `queryPool`

- VUID-vkCmdWriteTimestamp-None-10640
  This command must not be recorded when per-tile execution model is enabled

Valid Usage (Implicit)

- VUID-vkCmdWriteTimestamp-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdWriteTimestamp-pipelineStage-parameter
  `pipelineStage` must be a valid VkPipelineStageFlagBits value

- VUID-vkCmdWriteTimestamp-queryPool-parameter
  `queryPool` must be a valid VkQueryPool handle

- VUID-vkCmdWriteTimestamp-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdWriteTimestamp-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, VK_QUEUE_GRAPHICS_BIT, VK_QUEUE_OPTICAL_FLOW_BIT_NV, VK_QUEUE_TRANSFER_BIT, VK_QUEUE_VIDEO_DECODE_BIT_KHR, or VK_QUEUE_VIDEO_ENCODE_BIT_KHR operations

- VUID-vkCmdWriteTimestamp-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdWriteTimestamp-commonparent
  Both of `commandBuffer`, and `queryPool` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Both | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT VK_QUEUE_OPTICAL_FLOW_BIT_NV VK_QUEUE_TRANSFER_BIT VK_QUEUE_VIDEO_DECODE_BIT_KHR VK_QUEUE_VIDEO_ENCODE_BIT_KHR | Action

Conditional Rendering

vkCmdWriteTimestamp is not affected by conditional rendering

### 23.6. Elapsed Timer Queries

Elapsed timer queries provide a mechanism to query the elapsed time between a vkCmdBeginQuery and a vkCmdEndQuery command. The time calculated is generated by the `VkPhysicalDevice`, and can be read from the host (using vkGetQueryPoolResults) or copied to a `VkBuffer` (using vkCmdCopyQueryPoolResults).

The implementation uses timestamps to calculate the elapsed time, therefore these queries are supported on any queue which reports a non-zero value for `timestampValidBits` via vkGetPhysicalDeviceQueueFamilyProperties. If the `timestampComputeAndGraphics` limit is VK_TRUE, elapsed timer queries are supported by every queue family that supports either graphics or compute operations (see VkQueueFamilyProperties).

If `VK_KHR_calibrated_timestamps` or `VK_EXT_calibrated_timestamps` is enabled, the timestamps used by the start and end commands must be in the VK_TIME_DOMAIN_DEVICE_KHR time domain.

The number of valid bits when measuring the start and stop times is determined by the `VkQueueFamilyProperties`::`timestampValidBits` property of the queue on which the query is recorded.

However, the implementation may internally use scratch memory of a size other than `timestampValidBits` to perform the elapsed time calculation. The scratch memory should use enough bits to make overflows unlikely to happen. If an overflow occurs while measuring the elapsed time, the resulting value is undefined.

If an overflow does not occur, the implementation must not produce a result from a calculation using timestamps where the start time is greater than the stop time. The start time must be recorded by the device with a time that is less than or equal to the stop time.

The result is given in timestamp units which the application can convert to nanoseconds by multiplying it with the `VkPhysicalDeviceLimits`::`timestampPeriod`.

### 23.7. Performance Queries

Performance queries provide applications with a mechanism for getting performance counter information about the execution of command buffers, render passes, and commands.

Each queue family advertises the performance counters that can be queried on a queue of that family via a call to vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR. Implementations may limit access to performance counters based on platform requirements or only to specialized drivers for development purposes.

Note | This may include no performance counters being enumerated, or a reduced set. Please refer to platform-specific documentation for guidance on any such restrictions.

Performance queries use the existing vkCmdBeginQuery and vkCmdEndQuery to control what command buffers, render passes, or commands to get performance information for.

Implementations may require multiple passes where the command buffer, render passes, or commands being recorded are the same and are executed on the same queue to record performance counter data. This is achieved by submitting the same batch and providing a VkPerformanceQuerySubmitInfoKHR structure containing a counter pass index. The number of passes required for a given performance query pool can be queried via a call to vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR.

Note | Command buffers recorded with VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT must not be re-submitted. Changing command buffer usage bits may affect performance. To avoid this, the application should re-record any command buffers with the VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT when multiple counter passes are required.

Performance counter results from a performance query pool can be obtained with the command vkGetQueryPoolResults.

The `VkPerformanceCounterResultKHR` union is defined as:

    // Provided by VK_KHR_performance_query
    typedef union VkPerformanceCounterResultKHR {
        int32_t     int32;
        int64_t     int64;
        uint32_t    uint32;
        uint64_t    uint64;
        float       float32;
        double      float64;
    } VkPerformanceCounterResultKHR;

- `int32` is a 32-bit signed integer value.

- `int64` is a 64-bit signed integer value.

- `uint32` is a 32-bit unsigned integer value.

- `uint64` is a 64-bit unsigned integer value.

- `float32` is a 32-bit floating-point value.

- `float64` is a 64-bit floating-point value.

Performance query results are returned in an array of `VkPerformanceCounterResultKHR` unions containing the data associated with each counter in the query, stored in the same order as the counters supplied in `pCounterIndices` when creating the performance query. VkPerformanceCounterKHR::`storage` specifies how to parse the counter data.

#### 23.7.1. Profiling Lock

To record and submit a command buffer containing a performance query pool the profiling lock must be held. The profiling lock must be acquired prior to any call to vkBeginCommandBuffer that will be using a performance query pool. The profiling lock must be held while any command buffer containing a performance query pool is in the recording, executable, or pending state. To acquire the profiling lock, call:

    // Provided by VK_KHR_performance_query
    VkResult vkAcquireProfilingLockKHR(
        VkDevice                                    device,
        const VkAcquireProfilingLockInfoKHR*        pInfo);

- `device` is the logical device to profile.

- `pInfo` is a pointer to a VkAcquireProfilingLockInfoKHR structure containing information about how the profiling is to be acquired.

Implementations may allow multiple actors to hold the profiling lock concurrently.

Valid Usage (Implicit)

- VUID-vkAcquireProfilingLockKHR-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkAcquireProfilingLockKHR-pInfo-parameter
  `pInfo` must be a valid pointer to a valid VkAcquireProfilingLockInfoKHR structure

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

  - VK_TIMEOUT

The `VkAcquireProfilingLockInfoKHR` structure is defined as:

    // Provided by VK_KHR_performance_query
    typedef struct VkAcquireProfilingLockInfoKHR {
        VkStructureType                   sType;
        const void*                       pNext;
        VkAcquireProfilingLockFlagsKHR    flags;
        uint64_t                          timeout;
    } VkAcquireProfilingLockInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is reserved for future use.

- `timeout` indicates how long the function waits, in nanoseconds, if the profiling lock is not available.

Valid Usage (Implicit)

- VUID-VkAcquireProfilingLockInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_ACQUIRE_PROFILING_LOCK_INFO_KHR

- VUID-VkAcquireProfilingLockInfoKHR-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkAcquireProfilingLockInfoKHR-flags-zerobitmask
  `flags` must be `0`

If `timeout` is 0, `vkAcquireProfilingLockKHR` will not block while attempting to acquire the profiling lock. If `timeout` is `UINT64_MAX`, the function will not return until the profiling lock was acquired.

    // Provided by VK_KHR_performance_query
    typedef enum VkAcquireProfilingLockFlagBitsKHR {
    } VkAcquireProfilingLockFlagBitsKHR;

    // Provided by VK_KHR_performance_query
    typedef VkFlags VkAcquireProfilingLockFlagsKHR;

VkAcquireProfilingLockFlagsKHR is a bitmask type for setting a mask, but is currently reserved for future use.

To release the profiling lock, call:

    // Provided by VK_KHR_performance_query
    void vkReleaseProfilingLockKHR(
        VkDevice                                    device);

- `device` is the logical device to cease profiling on.

Valid Usage

- VUID-vkReleaseProfilingLockKHR-device-03235
  The profiling lock of `device` must have been held via a previous successful call to vkAcquireProfilingLockKHR

Valid Usage (Implicit)

- VUID-vkReleaseProfilingLockKHR-device-parameter
  `device` must be a valid VkDevice handle

### 23.8. Transform Feedback Queries

Transform feedback queries track the number of primitives attempted to be written and actually written, by the vertex stream being captured, to a transform feedback buffer. This query is updated during drawing commands while transform feedback is active. The number of primitives actually written will be less than the number attempted to be written if the bound transform feedback buffer size was too small for the number of primitives actually drawn. Primitives are not written beyond the bound range of the transform feedback buffer. A transform feedback query is begun and ended by calling `vkCmdBeginQuery` and `vkCmdEndQuery`, respectively to query for vertex stream zero. `vkCmdBeginQueryIndexedEXT` and `vkCmdEndQueryIndexedEXT` can be used to begin and end transform feedback queries for any supported vertex stream. When a transform feedback query begins, the count of primitives written and primitives needed starts from zero. For each drawing command, the count is incremented as vertex attribute outputs are captured to the transform feedback buffers while transform feedback is active.

When a transform feedback query finishes, the result for that query is marked as available. The application can then either copy the result to a buffer (via `vkCmdCopyQueryPoolResults`) or request it be put into host memory (via `vkGetQueryPoolResults`).

### 23.9. Primitives Generated Queries

When a generated primitive query for a vertex stream is active, the primitives-generated count is incremented every time a primitive emitted to that stream reaches the transform feedback stage, whether or not transform feedback is active. A primitives generated query is begun and ended by calling `vkCmdBeginQuery` and `vkCmdEndQuery`, respectively to query for vertex stream zero. `vkCmdBeginQueryIndexedEXT` and `vkCmdEndQueryIndexedEXT` can be used to begin and end primitives generated queries for any supported vertex stream. When a primitives generated query begins, the count of primitives generated starts from zero.

When a primitives generated query finishes, the result for that query is marked as available. The application can then either copy the result to a buffer (via `vkCmdCopyQueryPoolResults`) or request it be put into host memory (via `vkGetQueryPoolResults`).

Note | The result of this query is typically identical to VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT, but the primitives generated query is deterministic, i.e. it must be identical to the number of primitives processed. VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT may vary for implementation-dependent reasons, e.g. the same primitive may be processed multiple times for purposes of clipping.

### 23.10. Mesh Shader Queries

When a generated mesh primitives query is active, the mesh-primitives-generated count is incremented every time a primitive emitted from the mesh shader stage reaches the fragment shader stage. When a generated mesh primitives query begins, the mesh-primitives-generated count starts from zero.

Mesh and task shader pipeline statistics queries function the same way that invocation queries work for other shader stages, counting the number of times the respective shader stage has been run. When the statistics query begins, the invocation counters start from zero.

### 23.11. Intel Performance Queries

Intel performance queries allow an application to capture performance data for a set of commands. Performance queries are used in a similar way than other types of queries. A main difference with existing queries is that the resulting data should be handed over to a library capable to produce human readable results rather than being read directly by an application.

Prior to creating a performance query pool, initialize the device for performance queries with the call:

    // Provided by VK_INTEL_performance_query
    VkResult vkInitializePerformanceApiINTEL(
        VkDevice                                    device,
        const VkInitializePerformanceApiInfoINTEL*  pInitializeInfo);

- `device` is the logical device used for the queries.

- `pInitializeInfo` is a pointer to a VkInitializePerformanceApiInfoINTEL structure specifying initialization parameters.

Valid Usage (Implicit)

- VUID-vkInitializePerformanceApiINTEL-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkInitializePerformanceApiINTEL-pInitializeInfo-parameter
  `pInitializeInfo` must be a valid pointer to a valid VkInitializePerformanceApiInfoINTEL structure

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_TOO_MANY_OBJECTS

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkInitializePerformanceApiInfoINTEL` structure is defined as :

    // Provided by VK_INTEL_performance_query
    typedef struct VkInitializePerformanceApiInfoINTEL {
        VkStructureType    sType;
        const void*        pNext;
        void*              pUserData;
    } VkInitializePerformanceApiInfoINTEL;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `pUserData` is NULL or a pointer for application data.

Valid Usage (Implicit)

- VUID-VkInitializePerformanceApiInfoINTEL-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_INITIALIZE_PERFORMANCE_API_INFO_INTEL

- VUID-VkInitializePerformanceApiInfoINTEL-pNext-pNext
  `pNext` must be `NULL`

Once performance query operations have completed, uninitialize the device for performance queries with the call:

    // Provided by VK_INTEL_performance_query
    void vkUninitializePerformanceApiINTEL(
        VkDevice                                    device);

- `device` is the logical device used for the queries.

Valid Usage (Implicit)

- VUID-vkUninitializePerformanceApiINTEL-device-parameter
  `device` must be a valid VkDevice handle

Some performance query features of a device can be discovered with the call:

    // Provided by VK_INTEL_performance_query
    VkResult vkGetPerformanceParameterINTEL(
        VkDevice                                    device,
        VkPerformanceParameterTypeINTEL             parameter,
        VkPerformanceValueINTEL*                    pValue);

- `device` is the logical device to query.

- `parameter` is the parameter to query.

- `pValue` is a pointer to a VkPerformanceValueINTEL structure in which the type and value of the parameter are returned.

Valid Usage (Implicit)

- VUID-vkGetPerformanceParameterINTEL-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetPerformanceParameterINTEL-parameter-parameter
  `parameter` must be a valid VkPerformanceParameterTypeINTEL value

- VUID-vkGetPerformanceParameterINTEL-pValue-parameter
  `pValue` must be a valid pointer to a VkPerformanceValueINTEL structure

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_TOO_MANY_OBJECTS

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

Possible values of vkGetPerformanceParameterINTEL::`parameter`, specifying a performance query feature, are:

    // Provided by VK_INTEL_performance_query
    typedef enum VkPerformanceParameterTypeINTEL {
        VK_PERFORMANCE_PARAMETER_TYPE_HW_COUNTERS_SUPPORTED_INTEL = 0,
        VK_PERFORMANCE_PARAMETER_TYPE_STREAM_MARKER_VALID_BITS_INTEL = 1,
    } VkPerformanceParameterTypeINTEL;

- VK_PERFORMANCE_PARAMETER_TYPE_HW_COUNTERS_SUPPORTED_INTEL has a boolean result which tells whether hardware counters can be captured.

- VK_PERFORMANCE_PARAMETER_TYPE_STREAM_MARKER_VALID_BITS_INTEL has a 32 bits integer result which tells how many bits can be written into the `VkPerformanceValueINTEL` value.

The `VkPerformanceValueINTEL` structure is defined as:

    // Provided by VK_INTEL_performance_query
    typedef struct VkPerformanceValueINTEL {
        VkPerformanceValueTypeINTEL    type;
        VkPerformanceValueDataINTEL    data;
    } VkPerformanceValueINTEL;

- `type` is a VkPerformanceValueTypeINTEL value specifying the type of the returned data.

- `data` is a VkPerformanceValueDataINTEL union specifying the value of the returned data.

Possible values of VkPerformanceValueINTEL::`type`, specifying the type of the data returned in VkPerformanceValueINTEL::`data`, are:

- VK_PERFORMANCE_VALUE_TYPE_UINT32_INTEL specifies that unsigned 32-bit integer data is returned in `data.value32`.

- VK_PERFORMANCE_VALUE_TYPE_UINT64_INTEL specifies that unsigned 64-bit integer data is returned in `data.value64`.

- VK_PERFORMANCE_VALUE_TYPE_FLOAT_INTEL specifies that floating-point data is returned in `data.valueFloat`.

- VK_PERFORMANCE_VALUE_TYPE_BOOL_INTEL specifies that VkBool32 data is returned in `data.valueBool`.

- VK_PERFORMANCE_VALUE_TYPE_STRING_INTEL specifies that a pointer to a null-terminated UTF-8 string is returned in `data.valueString`. The pointer is valid for the lifetime of the `device` parameter passed to vkGetPerformanceParameterINTEL.

    // Provided by VK_INTEL_performance_query
    typedef enum VkPerformanceValueTypeINTEL {
        VK_PERFORMANCE_VALUE_TYPE_UINT32_INTEL = 0,
        VK_PERFORMANCE_VALUE_TYPE_UINT64_INTEL = 1,
        VK_PERFORMANCE_VALUE_TYPE_FLOAT_INTEL = 2,
        VK_PERFORMANCE_VALUE_TYPE_BOOL_INTEL = 3,
        VK_PERFORMANCE_VALUE_TYPE_STRING_INTEL = 4,
    } VkPerformanceValueTypeINTEL;

The `VkPerformanceValueDataINTEL` union is defined as:

    // Provided by VK_INTEL_performance_query
    typedef union VkPerformanceValueDataINTEL {
        uint32_t       value32;
        uint64_t       value64;
        float          valueFloat;
        VkBool32       valueBool;
        const char*    valueString;
    } VkPerformanceValueDataINTEL;

- `value32` represents 32-bit integer data.

- `value64` represents 64-bit integer data.

- `valueFloat` represents floating-point data.

- `valueBool` represents VkBool32 data.

- `valueString` represents a pointer to a null-terminated UTF-8 string.

The correct member of the union is determined by the associated VkPerformanceValueTypeINTEL value.

The `VkQueryPoolPerformanceQueryCreateInfoINTEL` structure is defined as:

    // Provided by VK_INTEL_performance_query
    typedef struct VkQueryPoolPerformanceQueryCreateInfoINTEL {
        VkStructureType                 sType;
        const void*                     pNext;
        VkQueryPoolSamplingModeINTEL    performanceCountersSampling;
    } VkQueryPoolPerformanceQueryCreateInfoINTEL;

    // Provided by VK_INTEL_performance_query
    // Equivalent to VkQueryPoolPerformanceQueryCreateInfoINTEL
    typedef VkQueryPoolPerformanceQueryCreateInfoINTEL VkQueryPoolCreateInfoINTEL;

To create a pool for Intel performance queries, set VkQueryPoolCreateInfo::`queryType` to VK_QUERY_TYPE_PERFORMANCE_QUERY_INTEL and add a `VkQueryPoolPerformanceQueryCreateInfoINTEL` structure to the `pNext` chain of the VkQueryPoolCreateInfo structure.

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `performanceCountersSampling` describe how performance queries should be captured.

Valid Usage (Implicit)

- VUID-VkQueryPoolPerformanceQueryCreateInfoINTEL-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_QUERY_POOL_PERFORMANCE_QUERY_CREATE_INFO_INTEL

- VUID-VkQueryPoolPerformanceQueryCreateInfoINTEL-performanceCountersSampling-parameter
  `performanceCountersSampling` must be a valid VkQueryPoolSamplingModeINTEL value

Structure Chaining

Extends the structure

  - VkQueryPoolCreateInfo

Possible values of VkQueryPoolPerformanceQueryCreateInfoINTEL::`performanceCountersSampling` are:

    // Provided by VK_INTEL_performance_query
    typedef enum VkQueryPoolSamplingModeINTEL {
        VK_QUERY_POOL_SAMPLING_MODE_MANUAL_INTEL = 0,
    } VkQueryPoolSamplingModeINTEL;

- VK_QUERY_POOL_SAMPLING_MODE_MANUAL_INTEL is the default mode in which the application calls vkCmdBeginQuery and vkCmdEndQuery to record performance data.

To help associate query results with a particular point at which an application emitted commands, markers can be set into the command buffers with the call:

    // Provided by VK_INTEL_performance_query
    VkResult vkCmdSetPerformanceMarkerINTEL(
        VkCommandBuffer                             commandBuffer,
        const VkPerformanceMarkerInfoINTEL*         pMarkerInfo);

The last marker set onto a command buffer before the end of a query will be part of the query result.

Valid Usage (Implicit)

- VUID-vkCmdSetPerformanceMarkerINTEL-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetPerformanceMarkerINTEL-pMarkerInfo-parameter
  `pMarkerInfo` must be a valid pointer to a valid VkPerformanceMarkerInfoINTEL structure

- VUID-vkCmdSetPerformanceMarkerINTEL-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetPerformanceMarkerINTEL-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, VK_QUEUE_GRAPHICS_BIT, or VK_QUEUE_TRANSFER_BIT operations

- VUID-vkCmdSetPerformanceMarkerINTEL-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdSetPerformanceMarkerINTEL-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT VK_QUEUE_TRANSFER_BIT | Action State

Conditional Rendering

vkCmdSetPerformanceMarkerINTEL is not affected by conditional rendering

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_TOO_MANY_OBJECTS

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkPerformanceMarkerInfoINTEL` structure is defined as:

    // Provided by VK_INTEL_performance_query
    typedef struct VkPerformanceMarkerInfoINTEL {
        VkStructureType    sType;
        const void*        pNext;
        uint64_t           marker;
    } VkPerformanceMarkerInfoINTEL;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `marker` is the marker value that will be recorded into the opaque query results.

Valid Usage (Implicit)

- VUID-VkPerformanceMarkerInfoINTEL-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PERFORMANCE_MARKER_INFO_INTEL

- VUID-VkPerformanceMarkerInfoINTEL-pNext-pNext
  `pNext` must be `NULL`

When monitoring the behavior of an application within the dataset generated by the entire set of applications running on the system, it is useful to identify draw calls within a potentially huge amount of performance data. To do so, application can generate stream markers that will be used to trace back a particular draw call with a particular performance data item.

    // Provided by VK_INTEL_performance_query
    VkResult vkCmdSetPerformanceStreamMarkerINTEL(
        VkCommandBuffer                             commandBuffer,
        const VkPerformanceStreamMarkerInfoINTEL*   pMarkerInfo);

- `commandBuffer` is a VkCommandBuffer into which a stream marker is added.

- `pMarkerInfo` is a pointer to a VkPerformanceStreamMarkerInfoINTEL structure describing the marker to insert.

Valid Usage (Implicit)

- VUID-vkCmdSetPerformanceStreamMarkerINTEL-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetPerformanceStreamMarkerINTEL-pMarkerInfo-parameter
  `pMarkerInfo` must be a valid pointer to a valid VkPerformanceStreamMarkerInfoINTEL structure

- VUID-vkCmdSetPerformanceStreamMarkerINTEL-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetPerformanceStreamMarkerINTEL-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, VK_QUEUE_GRAPHICS_BIT, or VK_QUEUE_TRANSFER_BIT operations

- VUID-vkCmdSetPerformanceStreamMarkerINTEL-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdSetPerformanceStreamMarkerINTEL-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT VK_QUEUE_TRANSFER_BIT | Action State

Conditional Rendering

vkCmdSetPerformanceStreamMarkerINTEL is not affected by conditional rendering

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_TOO_MANY_OBJECTS

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkPerformanceStreamMarkerInfoINTEL` structure is defined as:

    // Provided by VK_INTEL_performance_query
    typedef struct VkPerformanceStreamMarkerInfoINTEL {
        VkStructureType    sType;
        const void*        pNext;
        uint32_t           marker;
    } VkPerformanceStreamMarkerInfoINTEL;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `marker` is the marker value that will be recorded into the reports consumed by an external application.

Valid Usage

- VUID-VkPerformanceStreamMarkerInfoINTEL-marker-02735
  The value written by the application into `marker` must only used the valid bits as reported by vkGetPerformanceParameterINTEL with the VK_PERFORMANCE_PARAMETER_TYPE_STREAM_MARKER_VALID_BITS_INTEL

Valid Usage (Implicit)

- VUID-VkPerformanceStreamMarkerInfoINTEL-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PERFORMANCE_STREAM_MARKER_INFO_INTEL

- VUID-VkPerformanceStreamMarkerInfoINTEL-pNext-pNext
  `pNext` must be `NULL`

Some applications might want measure the effect of a set of commands with a different settings. It is possible to override a particular settings using :

    // Provided by VK_INTEL_performance_query
    VkResult vkCmdSetPerformanceOverrideINTEL(
        VkCommandBuffer                             commandBuffer,
        const VkPerformanceOverrideInfoINTEL*       pOverrideInfo);

- `commandBuffer` is the command buffer where the override takes place.

- `pOverrideInfo` is a pointer to a VkPerformanceOverrideInfoINTEL structure selecting the parameter to override.

Valid Usage

- VUID-vkCmdSetPerformanceOverrideINTEL-pOverrideInfo-02736
  `pOverrideInfo` must not be used with a VkPerformanceOverrideTypeINTEL that is not reported available by `vkGetPerformanceParameterINTEL`

Valid Usage (Implicit)

- VUID-vkCmdSetPerformanceOverrideINTEL-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetPerformanceOverrideINTEL-pOverrideInfo-parameter
  `pOverrideInfo` must be a valid pointer to a valid VkPerformanceOverrideInfoINTEL structure

- VUID-vkCmdSetPerformanceOverrideINTEL-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetPerformanceOverrideINTEL-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, VK_QUEUE_GRAPHICS_BIT, or VK_QUEUE_TRANSFER_BIT operations

- VUID-vkCmdSetPerformanceOverrideINTEL-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT VK_QUEUE_TRANSFER_BIT | State

Conditional Rendering

vkCmdSetPerformanceOverrideINTEL is not affected by conditional rendering

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_TOO_MANY_OBJECTS

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkPerformanceOverrideInfoINTEL` structure is defined as:

    // Provided by VK_INTEL_performance_query
    typedef struct VkPerformanceOverrideInfoINTEL {
        VkStructureType                   sType;
        const void*                       pNext;
        VkPerformanceOverrideTypeINTEL    type;
        VkBool32                          enable;
        uint64_t                          parameter;
    } VkPerformanceOverrideInfoINTEL;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `type` is the particular VkPerformanceOverrideTypeINTEL to set.

- `enable` defines whether the override is enabled.

- `parameter` is a potential required parameter for the override.

Valid Usage (Implicit)

- VUID-VkPerformanceOverrideInfoINTEL-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PERFORMANCE_OVERRIDE_INFO_INTEL

- VUID-VkPerformanceOverrideInfoINTEL-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkPerformanceOverrideInfoINTEL-type-parameter
  `type` must be a valid VkPerformanceOverrideTypeINTEL value

Possible values of VkPerformanceOverrideInfoINTEL::`type`, specifying performance override types, are:

    // Provided by VK_INTEL_performance_query
    typedef enum VkPerformanceOverrideTypeINTEL {
        VK_PERFORMANCE_OVERRIDE_TYPE_NULL_HARDWARE_INTEL = 0,
        VK_PERFORMANCE_OVERRIDE_TYPE_FLUSH_GPU_CACHES_INTEL = 1,
    } VkPerformanceOverrideTypeINTEL;

- VK_PERFORMANCE_OVERRIDE_TYPE_NULL_HARDWARE_INTEL turns all rendering operations into noop.

- VK_PERFORMANCE_OVERRIDE_TYPE_FLUSH_GPU_CACHES_INTEL stalls the stream of commands until all previously emitted commands have completed and all caches been flushed and invalidated.

Before submitting command buffers containing performance queries commands to a device queue, the application must acquire and set a performance query configuration. The configuration can be released once all command buffers containing performance query commands are not in a pending state.

    // Provided by VK_INTEL_performance_query
    VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPerformanceConfigurationINTEL)

To acquire a device performance configuration, call:

    // Provided by VK_INTEL_performance_query
    VkResult vkAcquirePerformanceConfigurationINTEL(
        VkDevice                                    device,
        const VkPerformanceConfigurationAcquireInfoINTEL* pAcquireInfo,
        VkPerformanceConfigurationINTEL*            pConfiguration);

- `device` is the logical device that the performance query commands will be submitted to.

- `pAcquireInfo` is a pointer to a VkPerformanceConfigurationAcquireInfoINTEL structure, specifying the performance configuration to acquire.

- `pConfiguration` is a pointer to a `VkPerformanceConfigurationINTEL` handle in which the resulting configuration object is returned.

Valid Usage (Implicit)

- VUID-vkAcquirePerformanceConfigurationINTEL-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkAcquirePerformanceConfigurationINTEL-pAcquireInfo-parameter
  `pAcquireInfo` must be a valid pointer to a valid VkPerformanceConfigurationAcquireInfoINTEL structure

- VUID-vkAcquirePerformanceConfigurationINTEL-pConfiguration-parameter
  `pConfiguration` must be a valid pointer to a VkPerformanceConfigurationINTEL handle

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_TOO_MANY_OBJECTS

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkPerformanceConfigurationAcquireInfoINTEL` structure is defined as:

    // Provided by VK_INTEL_performance_query
    typedef struct VkPerformanceConfigurationAcquireInfoINTEL {
        VkStructureType                        sType;
        const void*                            pNext;
        VkPerformanceConfigurationTypeINTEL    type;
    } VkPerformanceConfigurationAcquireInfoINTEL;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `type` is one of the VkPerformanceConfigurationTypeINTEL type of performance configuration that will be acquired.

Valid Usage (Implicit)

- VUID-VkPerformanceConfigurationAcquireInfoINTEL-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PERFORMANCE_CONFIGURATION_ACQUIRE_INFO_INTEL

- VUID-VkPerformanceConfigurationAcquireInfoINTEL-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkPerformanceConfigurationAcquireInfoINTEL-type-parameter
  `type` must be a valid VkPerformanceConfigurationTypeINTEL value

Possible values of VkPerformanceConfigurationAcquireInfoINTEL::`type`, specifying performance configuration types, are:

    // Provided by VK_INTEL_performance_query
    typedef enum VkPerformanceConfigurationTypeINTEL {
        VK_PERFORMANCE_CONFIGURATION_TYPE_COMMAND_QUEUE_METRICS_DISCOVERY_ACTIVATED_INTEL = 0,
    } VkPerformanceConfigurationTypeINTEL;

To set a performance configuration, call:

    // Provided by VK_INTEL_performance_query
    VkResult vkQueueSetPerformanceConfigurationINTEL(
        VkQueue                                     queue,
        VkPerformanceConfigurationINTEL             configuration);

- `queue` is the queue on which the configuration will be used.

- `configuration` is the configuration to use.

Valid Usage (Implicit)

- VUID-vkQueueSetPerformanceConfigurationINTEL-queue-parameter
  `queue` must be a valid VkQueue handle

- VUID-vkQueueSetPerformanceConfigurationINTEL-configuration-parameter
  `configuration` must be a valid VkPerformanceConfigurationINTEL handle

- VUID-vkQueueSetPerformanceConfigurationINTEL-commonparent
  Both of `configuration`, and `queue` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `queue` must be externally synchronized if it was not created with VK_DEVICE_QUEUE_CREATE_INTERNALLY_SYNCHRONIZED_BIT_KHR

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
- | - | - | Any | -

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_TOO_MANY_OBJECTS

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

To release a device performance configuration, call:

    // Provided by VK_INTEL_performance_query
    VkResult vkReleasePerformanceConfigurationINTEL(
        VkDevice                                    device,
        VkPerformanceConfigurationINTEL             configuration);

- `device` is the device associated to the configuration object to release.

- `configuration` is the configuration object to release.

Valid Usage

- VUID-vkReleasePerformanceConfigurationINTEL-configuration-02737
  `configuration` must not be released before all command buffers submitted while the configuration was set are in pending state

Valid Usage (Implicit)

- VUID-vkReleasePerformanceConfigurationINTEL-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkReleasePerformanceConfigurationINTEL-configuration-parameter
  If `configuration` is not VK_NULL_HANDLE, `configuration` must be a valid VkPerformanceConfigurationINTEL handle

- VUID-vkReleasePerformanceConfigurationINTEL-configuration-parent
  If `configuration` is a valid handle, it must have been created, allocated, or retrieved from `device`

Host Synchronization

- Host access to `configuration` must be externally synchronized

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_TOO_MANY_OBJECTS

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

### 23.12. Result Status Queries

Result status queries serve a single purpose: allowing the application to determine whether a set of operations have completed successfully or not, as indicated by the VkQueryResultStatusKHR value written when retrieving the result of a query using the VK_QUERY_RESULT_WITH_STATUS_BIT_KHR flag.

Unlike other query types, result status queries do not track or maintain any other data beyond the completion status, thus no other data is written when retrieving their results.

Support for result status queries is indicated by VkQueueFamilyQueryResultStatusPropertiesKHR::`queryResultStatusSupport` , as returned by vkGetPhysicalDeviceQueueFamilyProperties2 for the queue family in question.

### 23.13. Video Encode Feedback Queries

Video encode feedback queries allow the application to capture feedback values generated by video encode operations. As such, video encode feedback queries are available on queue families supporting video encode operations. The availability of individual video encode feedback values is indicated by the bits of VkVideoEncodeCapabilitiesKHR::`supportedEncodeFeedbackFlags`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile the queries are intended to be used with.

The set of enabled video encode feedback values must be configured on the query pool when it is created using the `encodeFeedbackFlags` member of the VkQueryPoolVideoEncodeFeedbackCreateInfoKHR structure included in the `pNext` chain of VkQueryPoolCreateInfo.

The `VkQueryPoolVideoEncodeFeedbackCreateInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_encode_queue
    typedef struct VkQueryPoolVideoEncodeFeedbackCreateInfoKHR {
        VkStructureType                  sType;
        const void*                      pNext;
        VkVideoEncodeFeedbackFlagsKHR    encodeFeedbackFlags;
    } VkQueryPoolVideoEncodeFeedbackCreateInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `encodeFeedbackFlags` is a bitmask of VkVideoEncodeFeedbackFlagBitsKHR values specifying the set of enabled video encode feedback values captured by queries of the new pool.

Valid Usage (Implicit)

- VUID-VkQueryPoolVideoEncodeFeedbackCreateInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_QUERY_POOL_VIDEO_ENCODE_FEEDBACK_CREATE_INFO_KHR

- VUID-VkQueryPoolVideoEncodeFeedbackCreateInfoKHR-encodeFeedbackFlags-parameter
  `encodeFeedbackFlags` must be a valid combination of VkVideoEncodeFeedbackFlagBitsKHR values

- VUID-VkQueryPoolVideoEncodeFeedbackCreateInfoKHR-encodeFeedbackFlags-requiredbitmask
  `encodeFeedbackFlags` must not be `0`

Structure Chaining

Extends the structure

  - VkQueryPoolCreateInfo

Bits which can be set in VkQueryPoolVideoEncodeFeedbackCreateInfoKHR::`encodeFeedbackFlags` for video encode feedback query pools are:

    // Provided by VK_KHR_video_encode_queue
    typedef enum VkVideoEncodeFeedbackFlagBitsKHR {
        VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_BUFFER_OFFSET_BIT_KHR = 0x00000001,
        VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_BYTES_WRITTEN_BIT_KHR = 0x00000002,
        VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_HAS_OVERRIDES_BIT_KHR = 0x00000004,
      // Provided by VK_KHR_video_encode_feedback2
        VK_VIDEO_ENCODE_FEEDBACK_AVERAGE_QUANTIZATION_BIT_KHR = 0x00000008,
      // Provided by VK_KHR_video_encode_feedback2
        VK_VIDEO_ENCODE_FEEDBACK_MIN_QUANTIZATION_BIT_KHR = 0x00000010,
      // Provided by VK_KHR_video_encode_feedback2
        VK_VIDEO_ENCODE_FEEDBACK_MAX_QUANTIZATION_BIT_KHR = 0x00000020,
      // Provided by VK_KHR_video_encode_feedback2
        VK_VIDEO_ENCODE_FEEDBACK_INTRA_PIXELS_BIT_KHR = 0x00000040,
      // Provided by VK_KHR_video_encode_feedback2
        VK_VIDEO_ENCODE_FEEDBACK_INTER_PIXELS_BIT_KHR = 0x00000080,
      // Provided by VK_KHR_video_encode_feedback2
        VK_VIDEO_ENCODE_FEEDBACK_SKIPPED_PIXELS_BIT_KHR = 0x00000100,
      // Provided by VK_KHR_video_encode_feedback2
        VK_VIDEO_ENCODE_FEEDBACK_PICTURE_PARTITION_COUNT_BIT_KHR = 0x00000200,
    } VkVideoEncodeFeedbackFlagBitsKHR;

- VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_BUFFER_OFFSET_BIT_KHR specifies that queries managed by the pool will capture the byte offset of the bitstream data written by the video encode operation to the bitstream buffer specified in VkVideoEncodeInfoKHR::`dstBuffer` relative to the offset specified in VkVideoEncodeInfoKHR::`dstBufferOffset`. For the first video encode operation issued by any video encode command, this value will always be zero, meaning that bitstream data is always written to the buffer specified in VkVideoEncodeInfoKHR::`dstBuffer` starting from the offset specified in VkVideoEncodeInfoKHR::`dstBufferOffset`.

- VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_BYTES_WRITTEN_BIT_KHR specifies that queries managed by the pool will capture the number of bytes written by the video encode operation to the bitstream buffer specified in VkVideoEncodeInfoKHR::`dstBuffer`.

- VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_HAS_OVERRIDES_BIT_KHR specifies that queries managed by the pool will capture a boolean value indicating that the data written to the bitstream buffer specified in VkVideoEncodeInfoKHR::`dstBuffer` contains overridden parameters.

- VK_VIDEO_ENCODE_FEEDBACK_AVERAGE_QUANTIZATION_BIT_KHR specifies that queries managed by the pool will capture the average quantization used across the encoded coding blocks.

- VK_VIDEO_ENCODE_FEEDBACK_MIN_QUANTIZATION_BIT_KHR specifies that queries managed by the pool will capture the minimum quantization used across the encoded coding blocks.

- VK_VIDEO_ENCODE_FEEDBACK_MAX_QUANTIZATION_BIT_KHR specifies that queries managed by the pool will capture the maximum quantization used across the encoded coding blocks.

- VK_VIDEO_ENCODE_FEEDBACK_INTRA_PIXELS_BIT_KHR specifies that queries managed by the pool will capture the number of pixels encoded as intra blocks, including or excluding any skipped blocks, as described below.

- VK_VIDEO_ENCODE_FEEDBACK_INTER_PIXELS_BIT_KHR specifies that queries managed by the pool will capture the number of pixels encoded as inter blocks, including or excluding any skipped blocks, as described below.

- VK_VIDEO_ENCODE_FEEDBACK_SKIPPED_PIXELS_BIT_KHR specifies that queries managed by the pool will capture the number of pixels encoded as skipped blocks.

- VK_VIDEO_ENCODE_FEEDBACK_PICTURE_PARTITION_COUNT_BIT_KHR specifies that queries managed by the pool will capture the number of encoded picture partitions.

The average, minimum, and maximum quantization values captured when VK_VIDEO_ENCODE_FEEDBACK_AVERAGE_QUANTIZATION_BIT_KHR, VK_VIDEO_ENCODE_FEEDBACK_MIN_QUANTIZATION_BIT_KHR, and/or VK_VIDEO_ENCODE_FEEDBACK_MAX_QUANTIZATION_BIT_KHR are specified, respectively, depend on the used video profile:

- In case of H.264 encode profiles, this value is a signed integer indicating the average, minimum, or maximum QP used across the encoded coding blocks, respectively.

- In case of H.265 encode profiles this value is a signed integer indicating the average, minimum, or maximum QP used across the encoded coding blocks, respectively.

- In case of AV1 encode profiles this value is an unsigned integer indicating the average, minimum, or maximum quantizer index used across the encoded coding blocks, respectively.

The rounding mode used to calculate the average value captured when VK_VIDEO_ENCODE_FEEDBACK_AVERAGE_QUANTIZATION_BIT_KHR is specified is undefined.

The number of pixels captured when VK_VIDEO_ENCODE_FEEDBACK_INTRA_PIXELS_BIT_KHR, VK_VIDEO_ENCODE_FEEDBACK_INTER_PIXELS_BIT_KHR, and/or VK_VIDEO_ENCODE_FEEDBACK_SKIPPED_PIXELS_BIT_KHR are specified include padding pixels beyond the requested coded extent that are part of the complete coding blocks encoded for the picture.

If VK_VIDEO_ENCODE_FEEDBACK_SKIPPED_PIXELS_BIT_KHR is not supported for a video encode profile, then the results captured for VK_VIDEO_ENCODE_FEEDBACK_INTRA_PIXELS_BIT_KHR and VK_VIDEO_ENCODE_FEEDBACK_INTER_PIXELS_BIT_KHR will always include pixels in any intra or inter blocks, respectively, that are encoded as skipped blocks. Otherwise, the behavior depends on the used video profile:

- In case of H.264 encode profiles, skipped blocks are always inter blocks and the results captured for VK_VIDEO_ENCODE_FEEDBACK_INTER_PIXELS_BIT_KHR will always include pixels encoded as skipped blocks.

  Note | Implementations that would otherwise not count skipped pixels as inter pixels can simply sum the captured non-skipped inter pixel count and skipped pixel counts in the reported value for VK_VIDEO_ENCODE_FEEDBACK_INTER_PIXELS_BIT_KHR.

- In case of H.265 encode profiles, skipped blocks are always inter blocks and the results captured for VK_VIDEO_ENCODE_FEEDBACK_INTER_PIXELS_BIT_KHR will always include pixels encoded as skipped blocks.

  Note | Implementations that would otherwise not count skipped pixels as inter pixels can simply sum the captured non-skipped inter pixel count and skipped pixel counts in the reported value for VK_VIDEO_ENCODE_FEEDBACK_INTER_PIXELS_BIT_KHR.

- In case of AV1 encode profiles, both inter and intra blocks can be skipped blocks. Implementations should include any pixels encoded as skipped intra or inter blocks in the results captured for VK_VIDEO_ENCODE_FEEDBACK_INTRA_PIXELS_BIT_KHR and VK_VIDEO_ENCODE_FEEDBACK_INTER_PIXELS_BIT_KHR, respectively, if possible. However, some implementations may not be able to do so if they do not differentiate between skipped intra and inter blocks. Therefore, in case of AV1 encode profiles that do support VK_VIDEO_ENCODE_FEEDBACK_SKIPPED_PIXELS_BIT_KHR implementations must either include skipped pixels part of intra and inter blocks in both or neither of the results captured by VK_VIDEO_ENCODE_FEEDBACK_INTRA_PIXELS_BIT_KHR and VK_VIDEO_ENCODE_FEEDBACK_INTER_PIXELS_BIT_KHR, respectively.

  Note | Applications can detect whether the reported intra and inter pixel counts include the skipped pixels or not, by checking whether the sum of the intra and pixel pixels adds up to the coded extent padded to entire coding blocks.

When retrieving the results of video encode feedback queries, the values corresponding to each enabled video encode feedback are written in the order of the bits defined above, followed by an optional value indicating availability or result status if VK_QUERY_RESULT_WITH_AVAILABILITY_BIT or VK_QUERY_RESULT_WITH_STATUS_BIT_KHR is specified, respectively. If per picture partition feedback is enabled, this is followed by the values corresponding to each enabled per picture partition video encode feedback for each encoded picture partition but at most for VkQueryPoolVideoEncodePerPartitionFeedbackCreateInfoKHR::`maxPerPartitionFeedbackEntries` number of picture partitions, in picture-partition-major order.

If the result status of a video encode feedback query is negative, then the results of all enabled video encode feedback values will be undefined.

Note | Applications should always specify VK_QUERY_RESULT_WITH_STATUS_BIT_KHR when retrieving the results of video encode feedback queries and ignore such undefined video encode feedback values for any unsuccessfully completed video encode operations.

    // Provided by VK_KHR_video_encode_queue
    typedef VkFlags VkVideoEncodeFeedbackFlagsKHR;

`VkVideoEncodeFeedbackFlagsKHR` is a bitmask type for setting a mask of zero or more VkVideoEncodeFeedbackFlagBitsKHR.

#### 23.13.1. Per Picture Partition Feedback

If the `videoEncodeFeedback2` feature is enabled, video encode feedback queries also allow the application to capture additional feedback values for each picture partition generated by video encode operations. The availability of individual per picture partition video encode feedback values is indicated by the bits of VkVideoEncodeFeedback2CapabilitiesKHR::`supportedPerPartitionEncodeFeedbackFlags`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile the queries are intended to be used with.

The set of enabled per picture partition video encode feedback values must be configured on the query pool at the time of its creation by using the `perPartitionEncodeFeedbackFlags` member of the VkQueryPoolVideoEncodePerPartitionFeedbackCreateInfoKHR structure included in the `pNext` chain of VkQueryPoolCreateInfo.

The `VkQueryPoolVideoEncodePerPartitionFeedbackCreateInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_encode_feedback2
    typedef struct VkQueryPoolVideoEncodePerPartitionFeedbackCreateInfoKHR {
        VkStructureType                              sType;
        const void*                                  pNext;
        uint32_t                                     maxPerPartitionFeedbackEntries;
        VkVideoEncodePerPartitionFeedbackFlagsKHR    perPartitionEncodeFeedbackFlags;
    } VkQueryPoolVideoEncodePerPartitionFeedbackCreateInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `maxPerPartitionFeedbackEntries` specifies the maximum number of picture partitions for which per picture partition video encode feedback values can be captured by queries of the new pool.

- `perPartitionEncodeFeedbackFlags` is a bitmask of VkVideoEncodePerPartitionFeedbackFlagBitsKHR values specifying the set of enabled per picture partition video encode feedback values captured by queries of the new pool.

Valid Usage (Implicit)

- VUID-VkQueryPoolVideoEncodePerPartitionFeedbackCreateInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_QUERY_POOL_VIDEO_ENCODE_PER_PARTITION_FEEDBACK_CREATE_INFO_KHR

- VUID-VkQueryPoolVideoEncodePerPartitionFeedbackCreateInfoKHR-perPartitionEncodeFeedbackFlags-parameter
  `perPartitionEncodeFeedbackFlags` must be a valid combination of VkVideoEncodePerPartitionFeedbackFlagBitsKHR values

Structure Chaining

Extends the structure

  - VkQueryPoolCreateInfo

Bits which can be set in VkQueryPoolVideoEncodePerPartitionFeedbackCreateInfoKHR::`perPartitionEncodeFeedbackFlags` for video encode feedback query pools are:

    // Provided by VK_KHR_video_encode_feedback2
    typedef enum VkVideoEncodePerPartitionFeedbackFlagBitsKHR {
        VK_VIDEO_ENCODE_PER_PARTITION_FEEDBACK_STATUS_BIT_KHR = 0x00000001,
        VK_VIDEO_ENCODE_PER_PARTITION_FEEDBACK_BITSTREAM_BUFFER_OFFSET_BIT_KHR = 0x00000002,
        VK_VIDEO_ENCODE_PER_PARTITION_FEEDBACK_BITSTREAM_BYTES_WRITTEN_BIT_KHR = 0x00000004,
    } VkVideoEncodePerPartitionFeedbackFlagBitsKHR;

- VK_VIDEO_ENCODE_PER_PARTITION_FEEDBACK_STATUS_BIT_KHR specifies that queries managed by the pool will capture the result status of each encoded picture partition. These result status values are reported as VkQueryResultStatusKHR values, similar to result status queries but indicate the result status of the encoding of individual picture partitions instead of that of the whole video encode operation.

- VK_VIDEO_ENCODE_PER_PARTITION_FEEDBACK_BITSTREAM_BUFFER_OFFSET_BIT_KHR specifies that queries managed by the pool will capture the byte offset of the bitstream data of the corresponding picture partition written to the bitstream buffer specified in VkVideoEncodeInfoKHR::`dstBuffer` relative to the offset specified in VkVideoEncodeInfoKHR::`dstBufferOffset`.

- VK_VIDEO_ENCODE_PER_PARTITION_FEEDBACK_BITSTREAM_BYTES_WRITTEN_BIT_KHR specifies that queries managed by the pool will capture the number of bytes written by the video encode operation for the corresponding picture partition to the bitstream buffer specified in VkVideoEncodeInfoKHR::`dstBuffer`.

The bitstream offsets reported for subsequent picture partitions are always monotonically increasing and the bitstream buffer ranges corresponding to individual picture partitions do not overlap.

Note | The bitstream range corresponding to the entire frame, as reported through the VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_BUFFER_OFFSET_BIT_KHR and VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_BYTES_WRITTEN_BIT_KHR feedback values may contain additional data such as frame headers. In addition, certain implementations or video compression standards may have additional payloads in between subsequent picture partitions. For example, AV1 bitstreams contain the `tile_size_minus_1` syntax element in between subsequent tiles that are not part of the actual tile data. Therefore the specification only guarantees monotonically increasing offsets and non-overlapping ranges for picture partitions but does not guarantee that the picture partition ranges are tightly packed or that the union of the picture partition ranges covers the entire range of the bitstream output.

When retrieving the results of video encode feedback queries with per picture partition video encode feedback values, the values corresponding to each enabled per picture partition video encode feedback are written for each encoded picture partition in the order of the bits defined above, in picture-partition-major order.

If the video encode operation results in more encoded picture partitions than the `maxPerPartitionFeedbackEntries` specified in the VkQueryPoolVideoEncodePerPartitionFeedbackCreateInfoKHR structure the query pool was created with, then the per picture partition feedback values corresponding to additional picture partitions are not available for retrieval.

If the per picture partition feedback status is negative, then all other per partition feedback values corresponding to that picture partition will be undefined. Specifically, implementations may report a per picture partition feedback status of VK_QUERY_RESULT_STATUS_INSUFFICIENT_BITSTREAM_BUFFER_RANGE_KHR for the picture partition(s) whose encoded bitstream data no longer fit into the destination video bitstream buffer range.

    // Provided by VK_KHR_video_encode_feedback2
    typedef VkFlags VkVideoEncodePerPartitionFeedbackFlagsKHR;

`VkVideoEncodePerPartitionFeedbackFlagsKHR` is a bitmask type for setting a mask of zero or more VkVideoEncodePerPartitionFeedbackFlagBitsKHR.

## 24. GPU Performance API Interface

The GPU Performance API (GPA) interface gives access to GPU performance counters, streaming performance monitors (SPM), and thread traces (SQTT), which help analyze the performance and execution characteristics of applications.

### 24.1. GPU Performance API Objects

GPU Performance API (GPA) session objects hold the results of sampled performance counters and are represented by `VkGpaSessionAMD` handles:

    // Provided by VK_AMD_gpa_interface
    VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkGpaSessionAMD)

To create a GPA session object, call:

    // Provided by VK_AMD_gpa_interface
    VkResult vkCreateGpaSessionAMD(
        VkDevice                                    device,
        const VkGpaSessionCreateInfoAMD*            pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkGpaSessionAMD*                            pGpaSession);

- `device` is the logical device that creates the GPA session object.

- `pCreateInfo` is a pointer to a VkGpaSessionCreateInfoAMD structure containing information about how the GPA session object is to be created.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

- `pGpaSession` is a pointer to a handle in which the resulting GPA session object is returned.

Valid Usage (Implicit)

- VUID-vkCreateGpaSessionAMD-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkCreateGpaSessionAMD-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkGpaSessionCreateInfoAMD structure

- VUID-vkCreateGpaSessionAMD-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateGpaSessionAMD-pGpaSession-parameter
  `pGpaSession` must be a valid pointer to a VkGpaSessionAMD handle

- VUID-vkCreateGpaSessionAMD-device-queuecount
  The device must have been created with at least `1` queue

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkGpaSessionCreateInfoAMD` structure is defined as:

    // Provided by VK_AMD_gpa_interface
    typedef struct VkGpaSessionCreateInfoAMD {
        VkStructureType    sType;
        const void*        pNext;
        VkGpaSessionAMD    secondaryCopySource;
    } VkGpaSessionCreateInfoAMD;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `secondaryCopySource` is a `VkGpaSessionAMD` handle whose results can be copied into this session.

When sampling counters inside secondary command buffers, repeated invocations of the same secondary command buffer causes the previous results to be overwritten. To avoid this a GPA session object’s memory layout can be cloned for use with multiple secondary invocations by specifying its handle in `secondaryCopySource`, allowing the new GPA session object to be the target of a copy using vkCmdCopyGpaSessionResultsAMD.

Valid Usage

- VUID-VkGpaSessionCreateInfoAMD-secondaryCopySource-12461
  `secondaryCopySource` must have been used previously to begin and end a session, and it must not have been reset since then

Valid Usage (Implicit)

- VUID-VkGpaSessionCreateInfoAMD-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_GPA_SESSION_CREATE_INFO_AMD

- VUID-VkGpaSessionCreateInfoAMD-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkGpaSessionCreateInfoAMD-secondaryCopySource-parameter
  If `secondaryCopySource` is not VK_NULL_HANDLE, `secondaryCopySource` must be a valid VkGpaSessionAMD handle

To destroy a GPA session object, call:

    // Provided by VK_AMD_gpa_interface
    void vkDestroyGpaSessionAMD(
        VkDevice                                    device,
        VkGpaSessionAMD                             gpaSession,
        const VkAllocationCallbacks*                pAllocator);

- `device` is the logical device that destroys the GPA session.

- `gpaSession` is the handle of the GPA session to destroy.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

Valid Usage

- VUID-vkDestroyGpaSessionAMD-gpaSession-12408
  All submitted commands that refer to `gpaSession` must have completed execution

Valid Usage (Implicit)

- VUID-vkDestroyGpaSessionAMD-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkDestroyGpaSessionAMD-gpaSession-parameter
  If `gpaSession` is not VK_NULL_HANDLE, `gpaSession` must be a valid VkGpaSessionAMD handle

- VUID-vkDestroyGpaSessionAMD-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkDestroyGpaSessionAMD-gpaSession-parent
  If `gpaSession` is a valid handle, it must have been created, allocated, or retrieved from `device`

Host Synchronization

- Host access to `gpaSession` must be externally synchronized

### 24.2. Beginning, ending, copying, and resetting a session

Performance counters are sampled between calls to vkCmdBeginGpaSessionAMD and vkCmdEndGpaSessionAMD. As long as they are executed in order, vkCmdBeginGpaSessionAMD and vkCmdEndGpaSessionAMD can span multiple command buffers.

If a session is reused after calling vkCmdEndGpaSessionAMD, the session must first be reset using vkResetGpaSessionAMD.

To begin a GPA session, call:

    // Provided by VK_AMD_gpa_interface
    VkResult vkCmdBeginGpaSessionAMD(
        VkCommandBuffer                             commandBuffer,
        VkGpaSessionAMD                             gpaSession);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `gpaSession` is the handle of the GPA session to begin.

Valid Usage

- VUID-vkCmdBeginGpaSessionAMD-gpaSession-12409
  If `gpaSession` has been used previously to begin and end a session, vkResetGpaSessionAMD must have first been called

- VUID-vkCmdBeginGpaSessionAMD-commandBuffer-12410
  If another GPA session has been started with `vkCmdBeginGpaSessionAMD` in `commandBuffer`, it must have been ended using vkCmdEndGpaSessionAMD before this call

Valid Usage (Implicit)

- VUID-vkCmdBeginGpaSessionAMD-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdBeginGpaSessionAMD-gpaSession-parameter
  `gpaSession` must be a valid VkGpaSessionAMD handle

- VUID-vkCmdBeginGpaSessionAMD-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdBeginGpaSessionAMD-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, or VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdBeginGpaSessionAMD-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdBeginGpaSessionAMD-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdBeginGpaSessionAMD-commonparent
  Both of `commandBuffer`, and `gpaSession` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT | Action State

Conditional Rendering

vkCmdBeginGpaSessionAMD is not affected by conditional rendering

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

To end a GPA session, call:

    // Provided by VK_AMD_gpa_interface
    VkResult vkCmdEndGpaSessionAMD(
        VkCommandBuffer                             commandBuffer,
        VkGpaSessionAMD                             gpaSession);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `gpaSession` is the handle of the GPA session to end.

Valid Usage

- VUID-vkCmdEndGpaSessionAMD-gpaSession-12411
  `gpaSession` must have previously begun using vkCmdBeginGpaSessionAMD

Valid Usage (Implicit)

- VUID-vkCmdEndGpaSessionAMD-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdEndGpaSessionAMD-gpaSession-parameter
  `gpaSession` must be a valid VkGpaSessionAMD handle

- VUID-vkCmdEndGpaSessionAMD-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdEndGpaSessionAMD-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, or VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdEndGpaSessionAMD-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdEndGpaSessionAMD-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdEndGpaSessionAMD-commonparent
  Both of `commandBuffer`, and `gpaSession` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT | Action State

Conditional Rendering

vkCmdEndGpaSessionAMD is not affected by conditional rendering

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

Executing secondary command buffers multiple times, that themselves record results into sessions, causes their results to be overwritten. To prevent results from being lost due to subsequent executions, the results can be copied into another session.

To copy the results of a GPA session into another, call:

    // Provided by VK_AMD_gpa_interface
    void vkCmdCopyGpaSessionResultsAMD(
        VkCommandBuffer                             commandBuffer,
        VkGpaSessionAMD                             gpaSession);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `gpaSession` is the handle of the GPA session that is the destination of the copy.

Valid Usage (Implicit)

- VUID-vkCmdCopyGpaSessionResultsAMD-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdCopyGpaSessionResultsAMD-gpaSession-parameter
  `gpaSession` must be a valid VkGpaSessionAMD handle

- VUID-vkCmdCopyGpaSessionResultsAMD-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdCopyGpaSessionResultsAMD-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, VK_QUEUE_GRAPHICS_BIT, or VK_QUEUE_TRANSFER_BIT operations

- VUID-vkCmdCopyGpaSessionResultsAMD-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdCopyGpaSessionResultsAMD-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdCopyGpaSessionResultsAMD-commonparent
  Both of `commandBuffer`, and `gpaSession` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT VK_QUEUE_TRANSFER_BIT | Action State

Conditional Rendering

vkCmdCopyGpaSessionResultsAMD is not affected by conditional rendering

The source of the copy is the GPA session handle provided when `gpaSession` was created.

To reset a GPA session for reuse, call:

    // Provided by VK_AMD_gpa_interface
    VkResult vkResetGpaSessionAMD(
        VkDevice                                    device,
        VkGpaSessionAMD                             gpaSession);

- `device` is the logical device the GPA session was created from.

- `gpaSession` is the handle of the GPA session to reset.

Valid Usage (Implicit)

- VUID-vkResetGpaSessionAMD-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkResetGpaSessionAMD-gpaSession-parameter
  `gpaSession` must be a valid VkGpaSessionAMD handle

- VUID-vkResetGpaSessionAMD-gpaSession-parent
  `gpaSession` must have been created, allocated, or retrieved from `device`

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

Resetting a session object has less overhead than destroying and then creating a new one.

### 24.3. Beginning and ending sampling

Once a session has begun, samples can then be captured during the command buffer execution.

To begin a GPA sample, call:

    // Provided by VK_AMD_gpa_interface
    VkResult vkCmdBeginGpaSampleAMD(
        VkCommandBuffer                             commandBuffer,
        VkGpaSessionAMD                             gpaSession,
        const VkGpaSampleBeginInfoAMD*              pGpaSampleBeginInfo,
        uint32_t*                                   pSampleID);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `gpaSession` is the handle of the GPA session to record the sample.

- `pGpaSampleBeginInfo` is a pointer to a VkGpaSampleBeginInfoAMD structure describing the sample parameters.

- `pSampleID` is the unique sample ID returned for this sample.

Valid Usage (Implicit)

- VUID-vkCmdBeginGpaSampleAMD-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdBeginGpaSampleAMD-gpaSession-parameter
  `gpaSession` must be a valid VkGpaSessionAMD handle

- VUID-vkCmdBeginGpaSampleAMD-pGpaSampleBeginInfo-parameter
  `pGpaSampleBeginInfo` must be a valid pointer to a valid VkGpaSampleBeginInfoAMD structure

- VUID-vkCmdBeginGpaSampleAMD-pSampleID-parameter
  `pSampleID` must be a valid pointer to a `uint32_t` value

- VUID-vkCmdBeginGpaSampleAMD-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdBeginGpaSampleAMD-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, or VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdBeginGpaSampleAMD-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdBeginGpaSampleAMD-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdBeginGpaSampleAMD-commonparent
  Both of `commandBuffer`, and `gpaSession` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT | Action State

Conditional Rendering

vkCmdBeginGpaSampleAMD is not affected by conditional rendering

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkGpaSampleBeginInfoAMD` structure is defined as:

    // Provided by VK_AMD_gpa_interface
    typedef struct VkGpaSampleBeginInfoAMD {
        VkStructureType               sType;
        const void*                   pNext;
        VkGpaSampleTypeAMD            sampleType;
        VkBool32                      sampleInternalOperations;
        VkBool32                      cacheFlushOnCounterCollection;
        VkBool32                      sqShaderMaskEnable;
        VkGpaSqShaderStageFlagsAMD    sqShaderMask;
        uint32_t                      perfCounterCount;
        const VkGpaPerfCounterAMD*    pPerfCounters;
        uint32_t                      streamingPerfTraceSampleInterval;
        VkDeviceSize                  perfCounterDeviceMemoryLimit;
        VkBool32                      sqThreadTraceEnable;
        VkBool32                      sqThreadTraceSuppressInstructionTokens;
        VkDeviceSize                  sqThreadTraceDeviceMemoryLimit;
        VkPipelineStageFlags          timingPreSample;
        VkPipelineStageFlags          timingPostSample;
    } VkGpaSampleBeginInfoAMD;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `sampleType` is a VkGpaSampleTypeAMD value specifying the type of sample.

- `sampleInternalOperations` is a boolean indicating whether internal driver operations are included in the results.

- `cacheFlushOnCounterCollection` is a boolean indicating whether the driver should insert cache flush and invalidate events before and after every sample.

- `sqShaderMaskEnable` is a boolean indicating whether `sqShaderMask` specifies the shader stages to sample. If VK_FALSE, all shader stages are sampled.

- `sqShaderMask` is a bitmask of VkGpaSqShaderStageFlagBitsAMD values specifying which shader stages to sample. Shader stage bits that are not relevant to the specific device are ignored.

- `perfCounterCount` is the number of counters in the `pPerfCounters` array

- `pPerfCounters` is a pointer to an array of VkGpaPerfCounterAMD structures specifying the counters to be sampled. If `sampleType` is VK_GPA_SAMPLE_TYPE_CUMULATIVE_AMD `pPerfCounters` specifies the counters that are sampled at the beginning and at end of the sample period. If `sampleType` is VK_GPA_SAMPLE_TYPE_TRACE_AMD then the SPM data will be added to the samples RGP data blob.

- `streamingPerfTraceSampleInterval` is a value specifying the period for SPM samples in cycles, and is ignored if `sampleType` is not VK_GPA_SAMPLE_TYPE_TRACE_AMD.

- `perfCounterDeviceMemoryLimit` is a value specifying the maximum amount of GPU memory that this sample can allocate for SPM data. If `sampleType` is not VK_GPA_SAMPLE_TYPE_TRACE_AMD this value is ignored.

- `sqThreadTraceEnable` is a boolean specifying whether SQTT data should be included. If `sampleType` is not VK_GPA_SAMPLE_TYPE_TRACE_AMD this value is ignored.

- `sqThreadTraceSuppressInstructionTokens` is a boolean specifying whether instruction-level SQTT tokens should be captured. If VK_FALSE, the amount of sample data is significantly reduced. If `sampleType` is not VK_GPA_SAMPLE_TYPE_TRACE_AMD this value is ignored.

- `sqThreadTraceDeviceMemoryLimit` is a value specifying the maximum amount of GPU memory in bytes that this sample can allocate for the SQTT buffer. If `0`, the maximum size to prevent dropping tokens towards the end of the sample is allocated. If `sampleType` is not VK_GPA_SAMPLE_TYPE_TRACE_AMD this value is ignored.

- `timingPreSample` is a VkPipelineStageFlags2 mask of pipeline stages specifying where the begin timestamp should take place. If `sampleType` is not VK_GPA_SAMPLE_TYPE_TIMING_AMD this value is ignored.

- `timingPostSample` is a VkPipelineStageFlags2 mask of pipeline stages specifying where the end timestamp should take place. If `sampleType` is not VK_GPA_SAMPLE_TYPE_TIMING_AMD this value is ignored.

Valid Usage

- VUID-VkGpaSampleBeginInfoAMD-sampleType-12412
  If `sampleType` is VK_GPA_SAMPLE_TYPE_CUMULATIVE_AMD, the `VkPhysicalDeviceGpaFeaturesAMD`::`perfCounters` feature must be enabled

- VUID-VkGpaSampleBeginInfoAMD-sampleType-12413
  If `sampleType` is VK_GPA_SAMPLE_TYPE_TRACE_AMD, at least one of the `VkPhysicalDeviceGpaFeaturesAMD`::`streamingPerfCounters` or `VkPhysicalDeviceGpaFeaturesAMD`::`sqThreadTracing` features must be enabled

- VUID-VkGpaSampleBeginInfoAMD-sqThreadTraceEnable-12414
  If `sqThreadTraceEnable` is VK_TRUE, the `VkPhysicalDeviceGpaFeaturesAMD`::`sqThreadTracing` feature must be enabled

Valid Usage (Implicit)

- VUID-VkGpaSampleBeginInfoAMD-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_GPA_SAMPLE_BEGIN_INFO_AMD

- VUID-VkGpaSampleBeginInfoAMD-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkGpaSampleBeginInfoAMD-sampleType-parameter
  `sampleType` must be a valid VkGpaSampleTypeAMD value

- VUID-VkGpaSampleBeginInfoAMD-sqShaderMask-parameter
  `sqShaderMask` must be a valid combination of VkGpaSqShaderStageFlagBitsAMD values

- VUID-VkGpaSampleBeginInfoAMD-pPerfCounters-parameter
  `pPerfCounters` must be a valid pointer to an array of `perfCounterCount` valid VkGpaPerfCounterAMD structures

- VUID-VkGpaSampleBeginInfoAMD-timingPreSample-parameter
  `timingPreSample` must be a valid combination of VkPipelineStageFlagBits values

- VUID-VkGpaSampleBeginInfoAMD-timingPostSample-parameter
  `timingPostSample` must be a valid combination of VkPipelineStageFlagBits values

- VUID-VkGpaSampleBeginInfoAMD-perfCounterCount-arraylength
  `perfCounterCount` must be greater than `0`

Values which can be set in VkGpaSampleBeginInfoAMD::`sampleType` are:

    // Provided by VK_AMD_gpa_interface
    typedef enum VkGpaSampleTypeAMD {
        VK_GPA_SAMPLE_TYPE_CUMULATIVE_AMD = 0,
        VK_GPA_SAMPLE_TYPE_TRACE_AMD = 1,
        VK_GPA_SAMPLE_TYPE_TIMING_AMD = 2,
    } VkGpaSampleTypeAMD;

- VK_GPA_SAMPLE_TYPE_CUMULATIVE_AMD specifies that one 64-bit result will be returned per global performance counter, representing the cumulative delta for that counter over the sample period. Cumulative samples must begin and end in the same command buffer.

- VK_GPA_SAMPLE_TYPE_TRACE_AMD specifies that a buffer will be filled with SQTT results data in RGP file format, and/or streaming performance monitor data. Trace samples may span multiple command buffers.

- VK_GPA_SAMPLE_TYPE_TIMING_AMD specifies that two 64-bit results will be recorded to gather timestamp data.

Bits which can be set to control which GPU shader stages are sampled, are:

    // Provided by VK_AMD_gpa_interface
    typedef enum VkGpaSqShaderStageFlagBitsAMD {
        VK_GPA_SQ_SHADER_STAGE_PS_BIT_AMD = 0x00000001,
        VK_GPA_SQ_SHADER_STAGE_VS_BIT_AMD = 0x00000002,
        VK_GPA_SQ_SHADER_STAGE_GS_BIT_AMD = 0x00000004,
        VK_GPA_SQ_SHADER_STAGE_ES_BIT_AMD = 0x00000008,
        VK_GPA_SQ_SHADER_STAGE_HS_BIT_AMD = 0x00000010,
        VK_GPA_SQ_SHADER_STAGE_LS_BIT_AMD = 0x00000020,
        VK_GPA_SQ_SHADER_STAGE_CS_BIT_AMD = 0x00000040,
    } VkGpaSqShaderStageFlagBitsAMD;

- VK_GPA_SQ_SHADER_STAGE_PS_BIT_AMD specifies the pixel shader stage.

- VK_GPA_SQ_SHADER_STAGE_VS_BIT_AMD specifies the vertex shader stage.

- VK_GPA_SQ_SHADER_STAGE_GS_BIT_AMD specifies the geometry shader stage.

- VK_GPA_SQ_SHADER_STAGE_ES_BIT_AMD specifies the export shader stage.

- VK_GPA_SQ_SHADER_STAGE_HS_BIT_AMD specifies the hull shader stage.

- VK_GPA_SQ_SHADER_STAGE_LS_BIT_AMD specifies the local shader stage.

- VK_GPA_SQ_SHADER_STAGE_CS_BIT_AMD specifies the compute shader stage.

    // Provided by VK_AMD_gpa_interface
    typedef VkFlags VkGpaSqShaderStageFlagsAMD;

`VkGpaSqShaderStageFlagsAMD` is a bitmask type for setting a mask of zero or more VkGpaSqShaderStageFlagBitsAMD.

The `VkGpaPerfCounterAMD` structure is defined as:

    // Provided by VK_AMD_gpa_interface
    typedef struct VkGpaPerfCounterAMD {
        VkGpaPerfBlockAMD    blockType;
        uint32_t             blockInstance;
        uint32_t             eventID;
    } VkGpaPerfCounterAMD;

- `blockType` is a VkGpaPerfBlockAMD value specifying the GPU block type to sample.

- `blockInstance` is a value specifying which instance of the GPU block to sample.

- `eventID` is a value specifying the hardware-specific identifier of the performance counter to sample.

Valid Usage (Implicit)

- VUID-VkGpaPerfCounterAMD-blockType-parameter
  `blockType` must be a valid VkGpaPerfBlockAMD value

Values which can be set in VkGpaPerfCounterAMD::`blockType` are:

    // Provided by VK_AMD_gpa_interface
    typedef enum VkGpaPerfBlockAMD {
        VK_GPA_PERF_BLOCK_CPF_AMD = 0,
        VK_GPA_PERF_BLOCK_IA_AMD = 1,
        VK_GPA_PERF_BLOCK_VGT_AMD = 2,
        VK_GPA_PERF_BLOCK_PA_AMD = 3,
        VK_GPA_PERF_BLOCK_SC_AMD = 4,
        VK_GPA_PERF_BLOCK_SPI_AMD = 5,
        VK_GPA_PERF_BLOCK_SQ_AMD = 6,
        VK_GPA_PERF_BLOCK_SX_AMD = 7,
        VK_GPA_PERF_BLOCK_TA_AMD = 8,
        VK_GPA_PERF_BLOCK_TD_AMD = 9,
        VK_GPA_PERF_BLOCK_TCP_AMD = 10,
        VK_GPA_PERF_BLOCK_TCC_AMD = 11,
        VK_GPA_PERF_BLOCK_TCA_AMD = 12,
        VK_GPA_PERF_BLOCK_DB_AMD = 13,
        VK_GPA_PERF_BLOCK_CB_AMD = 14,
        VK_GPA_PERF_BLOCK_GDS_AMD = 15,
        VK_GPA_PERF_BLOCK_SRBM_AMD = 16,
        VK_GPA_PERF_BLOCK_GRBM_AMD = 17,
        VK_GPA_PERF_BLOCK_GRBM_SE_AMD = 18,
        VK_GPA_PERF_BLOCK_RLC_AMD = 19,
        VK_GPA_PERF_BLOCK_DMA_AMD = 20,
        VK_GPA_PERF_BLOCK_MC_AMD = 21,
        VK_GPA_PERF_BLOCK_CPG_AMD = 22,
        VK_GPA_PERF_BLOCK_CPC_AMD = 23,
        VK_GPA_PERF_BLOCK_WD_AMD = 24,
        VK_GPA_PERF_BLOCK_TCS_AMD = 25,
        VK_GPA_PERF_BLOCK_ATC_AMD = 26,
        VK_GPA_PERF_BLOCK_ATC_L2_AMD = 27,
        VK_GPA_PERF_BLOCK_MC_VM_L2_AMD = 28,
        VK_GPA_PERF_BLOCK_EA_AMD = 29,
        VK_GPA_PERF_BLOCK_RPB_AMD = 30,
        VK_GPA_PERF_BLOCK_RMI_AMD = 31,
        VK_GPA_PERF_BLOCK_UMCCH_AMD = 32,
        VK_GPA_PERF_BLOCK_GE_AMD = 33,
        VK_GPA_PERF_BLOCK_GL1A_AMD = 34,
        VK_GPA_PERF_BLOCK_GL1C_AMD = 35,
        VK_GPA_PERF_BLOCK_GL1CG_AMD = 36,
        VK_GPA_PERF_BLOCK_GL2A_AMD = 37,
        VK_GPA_PERF_BLOCK_GL2C_AMD = 38,
        VK_GPA_PERF_BLOCK_CHA_AMD = 39,
        VK_GPA_PERF_BLOCK_CHC_AMD = 40,
        VK_GPA_PERF_BLOCK_CHCG_AMD = 41,
        VK_GPA_PERF_BLOCK_GUS_AMD = 42,
        VK_GPA_PERF_BLOCK_GCR_AMD = 43,
        VK_GPA_PERF_BLOCK_PH_AMD = 44,
        VK_GPA_PERF_BLOCK_UTCL1_AMD = 45,
        VK_GPA_PERF_BLOCK_GE_DIST_AMD = 46,
        VK_GPA_PERF_BLOCK_GE_SE_AMD = 47,
        VK_GPA_PERF_BLOCK_DF_MALL_AMD = 48,
        VK_GPA_PERF_BLOCK_SQ_WGP_AMD = 49,
        VK_GPA_PERF_BLOCK_PC_AMD = 50,
        VK_GPA_PERF_BLOCK_GL1XA_AMD = 51,
        VK_GPA_PERF_BLOCK_GL1XC_AMD = 52,
        VK_GPA_PERF_BLOCK_WGS_AMD = 53,
        VK_GPA_PERF_BLOCK_EACPWD_AMD = 54,
        VK_GPA_PERF_BLOCK_EASE_AMD = 55,
        VK_GPA_PERF_BLOCK_RLCUSER_AMD = 56,
        VK_GPA_PERF_BLOCK_GE1_AMD = VK_GPA_PERF_BLOCK_GE_AMD,
        VK_GPA_PERF_BLOCK_RLCLOCAL_AMD = VK_GPA_PERF_BLOCK_RLCUSER_AMD,
    } VkGpaPerfBlockAMD;

To end a GPA sample, call:

    // Provided by VK_AMD_gpa_interface
    void vkCmdEndGpaSampleAMD(
        VkCommandBuffer                             commandBuffer,
        VkGpaSessionAMD                             gpaSession,
        uint32_t                                    sampleID);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `gpaSession` is the handle of the GPA session that is recording the sample.

- `sampleID` is a unique sample ID returned by a previous call to vkCmdBeginGpaSampleAMD.

Valid Usage (Implicit)

- VUID-vkCmdEndGpaSampleAMD-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdEndGpaSampleAMD-gpaSession-parameter
  `gpaSession` must be a valid VkGpaSessionAMD handle

- VUID-vkCmdEndGpaSampleAMD-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdEndGpaSampleAMD-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, or VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdEndGpaSampleAMD-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdEndGpaSampleAMD-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdEndGpaSampleAMD-commonparent
  Both of `commandBuffer`, and `gpaSession` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT | Action State

Conditional Rendering

vkCmdEndGpaSampleAMD is not affected by conditional rendering

### 24.4. Controlling GPU clocks

For performance counters and thread tracing to produce meaningful results, clock control and querying is available.

To set or query GPU clocks, call:

    // Provided by VK_AMD_gpa_interface
    VkResult vkSetGpaDeviceClockModeAMD(
        VkDevice                                    device,
        VkGpaDeviceClockModeInfoAMD*                pInfo);

- `device` is the logical device that sets the clocks.

- `pInfo` is a pointer to a VkGpaDeviceClockModeInfoAMD structure specifying the clock mode to set or query.

Valid Usage

- VUID-vkSetGpaDeviceClockModeAMD-clockModes-12415
  The `VkPhysicalDeviceGpaFeaturesAMD`::`clockModes` feature must be enabled

Valid Usage (Implicit)

- VUID-vkSetGpaDeviceClockModeAMD-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkSetGpaDeviceClockModeAMD-pInfo-parameter
  `pInfo` must be a valid pointer to a VkGpaDeviceClockModeInfoAMD structure

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkGpaDeviceClockModeInfoAMD` structure is defined as:

    // Provided by VK_AMD_gpa_interface
    typedef struct VkGpaDeviceClockModeInfoAMD {
        VkStructureType            sType;
        const void*                pNext;
        VkGpaDeviceClockModeAMD    clockMode;
        float                      memoryClockRatioToPeak;
        float                      engineClockRatioToPeak;
    } VkGpaDeviceClockModeInfoAMD;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `clockMode` is a enum:VkGpaDeviceClockModeAMD value specify which clock mode to set, or whether to query the current clocks.

- `memoryClockRatioToPeak` is the returned ratio of the current memory clock to the maximum memory clock, if `clockMode` is VK_GPA_DEVICE_CLOCK_MODE_QUERY_AMD.

- `engineClockRatioToPeak` is the returned ratio of the current engine clock to the maximum engine clock, if `clockMode` is VK_GPA_DEVICE_CLOCK_MODE_QUERY_AMD.

If `clockMode` is VK_GPA_DEVICE_CLOCK_MODE_QUERY_AMD, `memoryClockRatioToPeak` and `engineClockRatioToPeak` are filled with the ratios of their current values to their maximums respectively, otherwise they are left unchanged.

Valid Usage (Implicit)

- VUID-VkGpaDeviceClockModeInfoAMD-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_GPA_DEVICE_CLOCK_MODE_INFO_AMD

- VUID-VkGpaDeviceClockModeInfoAMD-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkGpaDeviceClockModeInfoAMD-clockMode-parameter
  `clockMode` must be a valid VkGpaDeviceClockModeAMD value

Values which can be set in VkGpaDeviceClockModeAMD are:

    // Provided by VK_AMD_gpa_interface
    typedef enum VkGpaDeviceClockModeAMD {
        VK_GPA_DEVICE_CLOCK_MODE_DEFAULT_AMD = 0,
        VK_GPA_DEVICE_CLOCK_MODE_QUERY_AMD = 1,
        VK_GPA_DEVICE_CLOCK_MODE_PROFILING_AMD = 2,
        VK_GPA_DEVICE_CLOCK_MODE_MIN_MEMORY_AMD = 3,
        VK_GPA_DEVICE_CLOCK_MODE_MIN_ENGINE_AMD = 4,
        VK_GPA_DEVICE_CLOCK_MODE_PEAK_AMD = 5,
    } VkGpaDeviceClockModeAMD;

- VK_GPA_DEVICE_CLOCK_MODE_DEFAULT_AMD specifies that device clocks and other power settings are restored to their default values.

- VK_GPA_DEVICE_CLOCK_MODE_QUERY_AMD specifies that the current clock values should be queried, with no new values set.

- VK_GPA_DEVICE_CLOCK_MODE_PROFILING_AMD specifies that clocks are set to a constant amount which is known to be power and thermal sustainable. The engine/memory clock ratio will be kept the same as much as possible.

- VK_GPA_DEVICE_CLOCK_MODE_MIN_MEMORY_AMD specifies that the memory clock is set to the lowest available level and the engine clock is set to a thermal and power sustainable level.

- VK_GPA_DEVICE_CLOCK_MODE_MIN_ENGINE_AMD specifies that the engine clock is set to the lowest available level and the memory clock is set to a thermal and power sustainable level.

- VK_GPA_DEVICE_CLOCK_MODE_PEAK_AMD specifies that the clocks set to maximum when possible and fans set to maximum. Under power and thermal constraints device will clock down.

To query the GPU clock current values and their ratios to their maximums, call:

    // Provided by VK_AMD_gpa_interface
    VkResult vkGetGpaDeviceClockInfoAMD(
        VkDevice                                    device,
        VkGpaDeviceGetClockInfoAMD*                 pInfo);

- `device` is the logical device to get clock information from.

- `pInfo` is a pointer to a VkGpaDeviceGetClockInfoAMD structure in which the clock values are returned.

Valid Usage (Implicit)

- VUID-vkGetGpaDeviceClockInfoAMD-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetGpaDeviceClockInfoAMD-pInfo-parameter
  `pInfo` must be a valid pointer to a VkGpaDeviceGetClockInfoAMD structure

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkGpaDeviceGetClockInfoAMD` structure is defined as:

    // Provided by VK_AMD_gpa_interface
    typedef struct VkGpaDeviceGetClockInfoAMD {
        VkStructureType    sType;
        void*              pNext;
        float              memoryClockRatioToPeak;
        float              engineClockRatioToPeak;
        uint32_t           memoryClockFrequency;
        uint32_t           engineClockFrequency;
    } VkGpaDeviceGetClockInfoAMD;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `memoryClockRatioToPeak` is the returned ratio of the current memory clock to the maximum memory clock.

- `engineClockRatioToPeak` is the returned ratio of the current engine clock to the maximum engine clock.

- `memoryClockFrequency` is the current memory clock frequency in MHz.

- `engineClockFrequency` is the current engine clock frequency in MHz.

Valid Usage (Implicit)

- VUID-VkGpaDeviceGetClockInfoAMD-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_GPA_DEVICE_GET_CLOCK_INFO_AMD

- VUID-VkGpaDeviceGetClockInfoAMD-pNext-pNext
  `pNext` must be `NULL`

### 24.5. Session status and results querying

Once a GPA session has ended, its status can be queried by:

    // Provided by VK_AMD_gpa_interface
    VkResult vkGetGpaSessionStatusAMD(
        VkDevice                                    device,
        VkGpaSessionAMD                             gpaSession);

- `device` is the logical device used to create the GPA session.

- `gpaSession` is the session whose status is queried.

Valid Usage (Implicit)

- VUID-vkGetGpaSessionStatusAMD-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetGpaSessionStatusAMD-gpaSession-parameter
  `gpaSession` must be a valid VkGpaSessionAMD handle

- VUID-vkGetGpaSessionStatusAMD-gpaSession-parent
  `gpaSession` must have been created, allocated, or retrieved from `device`

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

A return value of VK_SUCCESS indicates that the results are available to be read using vkGetGpaSessionResultsAMD. If results are not available, VK_NOT_READY is returned.

Once a GPA session’s results are available, they can be obtained by:

    // Provided by VK_AMD_gpa_interface
    VkResult vkGetGpaSessionResultsAMD(
        VkDevice                                    device,
        VkGpaSessionAMD                             gpaSession,
        uint32_t                                    sampleID,
        size_t*                                     pSizeInBytes,
        void*                                       pData);

- `device` is the logical device used to create the GPA session.

- `gpaSession` is the session whose results are queried.

- `sampleID` is the sample ID, returned by vkCmdBeginGpaSampleAMD, whose results are to be queried.

- `pSizeInBytes` is a pointer to a `size_t` value related to the size of the results data, as described below.

- `pData` is either `NULL` or a pointer to an array of `pSizeInBytes` bytes where the results will be written.

Valid Usage (Implicit)

- VUID-vkGetGpaSessionResultsAMD-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetGpaSessionResultsAMD-gpaSession-parameter
  `gpaSession` must be a valid VkGpaSessionAMD handle

- VUID-vkGetGpaSessionResultsAMD-pSizeInBytes-parameter
  `pSizeInBytes` must be a valid pointer to a `size_t` value

- VUID-vkGetGpaSessionResultsAMD-pData-parameter
  If the value referenced by `pSizeInBytes` is not `0`, and `pData` is not `NULL`, `pData` must be a valid pointer to an array of `pSizeInBytes` bytes

- VUID-vkGetGpaSessionResultsAMD-gpaSession-parent
  `gpaSession` must have been created, allocated, or retrieved from `device`

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

If `pData` is `NULL`, then the number of bytes of data in the results is returned in `pSizeInBytes`. Otherwise, `pSizeInBytes` must point to a variable set by the application to the number of elements in the `pData` array, and on return the variable is overwritten with the number of bytes written to `pData`. If the value of `pSizeInBytes` is less than the size required to write the results VK_INCOMPLETE will be returned instead of VK_SUCCESS, to indicate that the results were not written.

## 25. Clear Commands

### 25.1. Clearing Images Outside a Render Pass Instance

Color and depth/stencil images can be cleared outside a render pass instance using vkCmdClearColorImage or vkCmdClearDepthStencilImage, respectively. These commands are only allowed outside of a render pass instance.

To clear one or more subranges of a color image, call:

    // Provided by VK_VERSION_1_0
    void vkCmdClearColorImage(
        VkCommandBuffer                             commandBuffer,
        VkImage                                     image,
        VkImageLayout                               imageLayout,
        const VkClearColorValue*                    pColor,
        uint32_t                                    rangeCount,
        const VkImageSubresourceRange*              pRanges);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `image` is the image to be cleared.

- `imageLayout` specifies the current layout of the image subresource ranges to be cleared, and must be VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR, VK_IMAGE_LAYOUT_GENERAL or VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL.

- `pColor` is a pointer to a VkClearColorValue structure containing the values that the image subresource ranges will be cleared to (see Clear Values below).

- `rangeCount` is the number of image subresource range structures in `pRanges`.

- `pRanges` is a pointer to an array of VkImageSubresourceRange structures describing a range of mipmap levels, array layers, and aspects to be cleared, as described in Image Views.

Each specified range in `pRanges` is cleared to the value specified by `pColor`.

Valid Usage

- VUID-vkCmdClearColorImage-image-01993
  The format features of `image` must contain VK_FORMAT_FEATURE_TRANSFER_DST_BIT

- VUID-vkCmdClearColorImage-image-00002
  `image` must have been created with the VK_IMAGE_USAGE_TRANSFER_DST_BIT usage flag set

- VUID-vkCmdClearColorImage-image-01545
  `image` must not use any of the formats that require a sampler Y′CBCR conversion

- VUID-vkCmdClearColorImage-image-00003
  If `image` is non-sparse then it must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-vkCmdClearColorImage-imageLayout-00004
  `imageLayout` must specify the layout of the image subresource ranges of `image` specified in `pRanges` at the time this command is executed on a `VkDevice`

- VUID-vkCmdClearColorImage-imageLayout-01394
  `imageLayout` must be VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL

- VUID-vkCmdClearColorImage-aspectMask-02498
  The VkImageSubresourceRange::`aspectMask` members of the elements of the `pRanges` array must each only include VK_IMAGE_ASPECT_COLOR_BIT

- VUID-vkCmdClearColorImage-baseMipLevel-01470
  The VkImageSubresourceRange::`baseMipLevel` members of the elements of the `pRanges` array must each be less than the `mipLevels` specified in VkImageCreateInfo when `image` was created

- VUID-vkCmdClearColorImage-pRanges-01692
  For each VkImageSubresourceRange element of `pRanges`, if the `levelCount` member is not VK_REMAINING_MIP_LEVELS, then `baseMipLevel` + `levelCount` must be less than or equal to the `mipLevels` specified in VkImageCreateInfo when `image` was created

- VUID-vkCmdClearColorImage-baseArrayLayer-01472
  The VkImageSubresourceRange::`baseArrayLayer` members of the elements of the `pRanges` array must each be less than the `arrayLayers` specified in VkImageCreateInfo when `image` was created

- VUID-vkCmdClearColorImage-pRanges-01693
  For each VkImageSubresourceRange element of `pRanges`, if the `layerCount` member is not VK_REMAINING_ARRAY_LAYERS, then `baseArrayLayer` + `layerCount` must be less than or equal to the `arrayLayers` specified in VkImageCreateInfo when `image` was created

- VUID-vkCmdClearColorImage-image-00007
  `image` must not have a compressed or depth/stencil format

- VUID-vkCmdClearColorImage-pColor-04961
  `pColor` must be a valid pointer to a VkClearColorValue union

- VUID-vkCmdClearColorImage-commandBuffer-01805
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, `image` must not be a protected image

- VUID-vkCmdClearColorImage-commandBuffer-01806
  If `commandBuffer` is a protected command buffer and `protectedNoFault` is not supported, must not be an unprotected image

- VUID-vkCmdClearColorImage-image-09678
  If `image`’s format has components other than R and G, it must not have a 64-bit component width

Valid Usage (Implicit)

- VUID-vkCmdClearColorImage-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdClearColorImage-image-parameter
  `image` must be a valid VkImage handle

- VUID-vkCmdClearColorImage-imageLayout-parameter
  `imageLayout` must be a valid VkImageLayout value

- VUID-vkCmdClearColorImage-pRanges-parameter
  `pRanges` must be a valid pointer to an array of `rangeCount` valid VkImageSubresourceRange structures

- VUID-vkCmdClearColorImage-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdClearColorImage-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, or VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdClearColorImage-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdClearColorImage-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdClearColorImage-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdClearColorImage-rangeCount-arraylength
  `rangeCount` must be greater than `0`

- VUID-vkCmdClearColorImage-commonparent
  Both of `commandBuffer`, and `image` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT | Action

Conditional Rendering

vkCmdClearColorImage is not affected by conditional rendering

To clear one or more subranges of a depth/stencil image, call:

    // Provided by VK_VERSION_1_0
    void vkCmdClearDepthStencilImage(
        VkCommandBuffer                             commandBuffer,
        VkImage                                     image,
        VkImageLayout                               imageLayout,
        const VkClearDepthStencilValue*             pDepthStencil,
        uint32_t                                    rangeCount,
        const VkImageSubresourceRange*              pRanges);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `image` is the image to be cleared.

- `imageLayout` specifies the current layout of the image subresource ranges to be cleared, and must be VK_IMAGE_LAYOUT_GENERAL or VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL.

- `pDepthStencil` is a pointer to a VkClearDepthStencilValue structure containing the values that the depth and stencil image subresource ranges will be cleared to (see Clear Values below).

- `rangeCount` is the number of image subresource range structures in `pRanges`.

- `pRanges` is a pointer to an array of VkImageSubresourceRange structures describing a range of mipmap levels, array layers, and aspects to be cleared, as described in Image Views.

Valid Usage

- VUID-vkCmdClearDepthStencilImage-image-01994
  The format features of `image` must contain VK_FORMAT_FEATURE_TRANSFER_DST_BIT

- VUID-vkCmdClearDepthStencilImage-pRanges-02658
  If the `aspect` member of any element of `pRanges` includes VK_IMAGE_ASPECT_STENCIL_BIT, and `image` was created with separate stencil usage, it must have been created with the VK_IMAGE_USAGE_TRANSFER_DST_BIT usage flag set

- VUID-vkCmdClearDepthStencilImage-pRanges-02659
  If the `aspect` member of any element of `pRanges` includes VK_IMAGE_ASPECT_STENCIL_BIT, and `image` was not created with separate stencil usage, the VK_IMAGE_USAGE_TRANSFER_DST_BIT usage flag must have been set in the VkImageCreateInfo::`usage` used to create `image`

- VUID-vkCmdClearDepthStencilImage-pRanges-02660
  If the `aspect` member of any element of `pRanges` includes VK_IMAGE_ASPECT_DEPTH_BIT, `image` must have been created with the VK_IMAGE_USAGE_TRANSFER_DST_BIT usage flag set

- VUID-vkCmdClearDepthStencilImage-image-00010
  If `image` is non-sparse then it must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-vkCmdClearDepthStencilImage-imageLayout-00011
  `imageLayout` must specify the layout of the image subresource ranges of `image` specified in `pRanges` at the time this command is executed on a `VkDevice`

- VUID-vkCmdClearDepthStencilImage-imageLayout-00012
  `imageLayout` must be either of VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL

- VUID-vkCmdClearDepthStencilImage-aspectMask-02824
  The VkImageSubresourceRange::`aspectMask` member of each element of the `pRanges` array must not include bits other than VK_IMAGE_ASPECT_DEPTH_BIT or VK_IMAGE_ASPECT_STENCIL_BIT

- VUID-vkCmdClearDepthStencilImage-image-02825
  If the `image`’s format does not have a stencil component, then the VkImageSubresourceRange::`aspectMask` member of each element of the `pRanges` array must not include the VK_IMAGE_ASPECT_STENCIL_BIT bit

- VUID-vkCmdClearDepthStencilImage-image-02826
  If the `image`’s format does not have a depth component, then the VkImageSubresourceRange::`aspectMask` member of each element of the `pRanges` array must not include the VK_IMAGE_ASPECT_DEPTH_BIT bit

- VUID-vkCmdClearDepthStencilImage-baseMipLevel-01474
  The VkImageSubresourceRange::`baseMipLevel` members of the elements of the `pRanges` array must each be less than the `mipLevels` specified in VkImageCreateInfo when `image` was created

- VUID-vkCmdClearDepthStencilImage-pRanges-01694
  For each VkImageSubresourceRange element of `pRanges`, if the `levelCount` member is not VK_REMAINING_MIP_LEVELS, then `baseMipLevel` + `levelCount` must be less than or equal to the `mipLevels` specified in VkImageCreateInfo when `image` was created

- VUID-vkCmdClearDepthStencilImage-baseArrayLayer-01476
  The VkImageSubresourceRange::`baseArrayLayer` members of the elements of the `pRanges` array must each be less than the `arrayLayers` specified in VkImageCreateInfo when `image` was created

- VUID-vkCmdClearDepthStencilImage-pRanges-01695
  For each VkImageSubresourceRange element of `pRanges`, if the `layerCount` member is not VK_REMAINING_ARRAY_LAYERS, then `baseArrayLayer` + `layerCount` must be less than or equal to the `arrayLayers` specified in VkImageCreateInfo when `image` was created

- VUID-vkCmdClearDepthStencilImage-image-00014
  `image` must have a depth/stencil format

- VUID-vkCmdClearDepthStencilImage-commandBuffer-01807
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, `image` must not be a protected image

- VUID-vkCmdClearDepthStencilImage-commandBuffer-01808
  If `commandBuffer` is a protected command buffer and `protectedNoFault` is not supported, `image` must not be an unprotected image

Valid Usage (Implicit)

- VUID-vkCmdClearDepthStencilImage-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdClearDepthStencilImage-image-parameter
  `image` must be a valid VkImage handle

- VUID-vkCmdClearDepthStencilImage-imageLayout-parameter
  `imageLayout` must be a valid VkImageLayout value

- VUID-vkCmdClearDepthStencilImage-pDepthStencil-parameter
  `pDepthStencil` must be a valid pointer to a valid VkClearDepthStencilValue structure

- VUID-vkCmdClearDepthStencilImage-pRanges-parameter
  `pRanges` must be a valid pointer to an array of `rangeCount` valid VkImageSubresourceRange structures

- VUID-vkCmdClearDepthStencilImage-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdClearDepthStencilImage-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdClearDepthStencilImage-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdClearDepthStencilImage-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdClearDepthStencilImage-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdClearDepthStencilImage-rangeCount-arraylength
  `rangeCount` must be greater than `0`

- VUID-vkCmdClearDepthStencilImage-commonparent
  Both of `commandBuffer`, and `image` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Outside | VK_QUEUE_GRAPHICS_BIT | Action

Conditional Rendering

vkCmdClearDepthStencilImage is not affected by conditional rendering

Clears outside render pass instances are treated as transfer operations for the purposes of memory barriers.

### 25.2. Clearing Images Inside a Render Pass Instance

To clear one or more regions of color and depth/stencil attachments inside a render pass instance, call:

    // Provided by VK_VERSION_1_0
    void vkCmdClearAttachments(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    attachmentCount,
        const VkClearAttachment*                    pAttachments,
        uint32_t                                    rectCount,
        const VkClearRect*                          pRects);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `attachmentCount` is the number of entries in the `pAttachments` array.

- `pAttachments` is a pointer to an array of VkClearAttachment structures defining the attachments to clear and the clear values to use.

- `rectCount` is the number of entries in the `pRects` array.

- `pRects` is a pointer to an array of VkClearRect structures defining regions to clear for every attachment in `pAttachments`.

If the render pass has a fragment density map attachment, clears follow the operations of fragment density maps as if each clear region was a primitive which generates fragments. The clear color is applied to all pixels inside each fragment’s area regardless if the pixels lie outside of the clear region. Clears may have a different set of supported fragment areas than draws.

Unlike other clear commands, vkCmdClearAttachments is not a transfer command. It performs its operations in rasterization order. For color attachments, the operations are executed as color attachment writes, by the VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT stage. For depth/stencil attachments, the operations are executed as depth writes and stencil writes by the VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT and VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT stages.

`vkCmdClearAttachments` is not affected by the bound pipeline state.

Note | It is generally preferable to clear attachments by using the VK_ATTACHMENT_LOAD_OP_CLEAR load operation at the start of rendering, as it is more efficient on some implementations.

If any attachment’s `aspectMask` to be cleared is not backed by an image view, the clear has no effect on that aspect.

If an attachment being cleared refers to an image view created with an `aspectMask` equal to one of VK_IMAGE_ASPECT_PLANE_0_BIT, VK_IMAGE_ASPECT_PLANE_1_BIT or VK_IMAGE_ASPECT_PLANE_2_BIT, it is considered to be VK_IMAGE_ASPECT_COLOR_BIT for purposes of this command, and must be cleared with the VK_IMAGE_ASPECT_COLOR_BIT aspect as specified by image view creation.

Valid Usage

- VUID-vkCmdClearAttachments-aspectMask-07884
  If the current render pass instance does not use dynamic rendering, and the `aspectMask` member of any element of `pAttachments` contains VK_IMAGE_ASPECT_DEPTH_BIT, the current subpass instance’s depth-stencil attachment must be either VK_ATTACHMENT_UNUSED or the attachment `format` must contain a depth component

- VUID-vkCmdClearAttachments-aspectMask-07885
  If the current render pass instance does not use dynamic rendering, and the `aspectMask` member of any element of `pAttachments` contains VK_IMAGE_ASPECT_STENCIL_BIT, the current subpass instance’s depth-stencil attachment must be either VK_ATTACHMENT_UNUSED or the attachment `format` must contain a stencil component

- VUID-vkCmdClearAttachments-aspectMask-07271
  If the `aspectMask` member of any element of `pAttachments` contains VK_IMAGE_ASPECT_COLOR_BIT, the `colorAttachment` must be a valid color attachment index in the current render pass instance

- VUID-vkCmdClearAttachments-rect-02682
  The `rect` member of each element of `pRects` must have an `extent.width` greater than `0`

- VUID-vkCmdClearAttachments-rect-02683
  The `rect` member of each element of `pRects` must have an `extent.height` greater than `0`

- VUID-vkCmdClearAttachments-pRects-00016
  The rectangular region specified by each element of `pRects` must be contained within the render area of the current render pass instance

- VUID-vkCmdClearAttachments-pRects-06937
  The layers specified by each element of `pRects` must be contained within every attachment that `pAttachments` refers to, i.e. for each element of `pRects`, VkClearRect::`baseArrayLayer` + VkClearRect::`layerCount` must be less than or equal to the number of layers rendered to in the current render pass instance

- VUID-vkCmdClearAttachments-layerCount-01934
  The `layerCount` member of each element of `pRects` must not be `0`

- VUID-vkCmdClearAttachments-commandBuffer-02504
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, each attachment to be cleared must not be a protected image

- VUID-vkCmdClearAttachments-commandBuffer-02505
  If `commandBuffer` is a protected command buffer and `protectedNoFault` is not supported, each attachment to be cleared must not be an unprotected image

- VUID-vkCmdClearAttachments-baseArrayLayer-00018
  If the render pass instance this is recorded in uses multiview, then `baseArrayLayer` must be zero and `layerCount` must be one

- VUID-vkCmdClearAttachments-colorAttachment-09503
  The `colorAttachment` member of each element of `pAttachments` must not identify a color attachment that is currently mapped to VK_ATTACHMENT_UNUSED in `commandBuffer` via VkRenderingAttachmentLocationInfo

- VUID-vkCmdClearAttachments-aspectMask-09298
  If the subpass this is recorded in performs an external format resolve, the `aspectMask` member of any element of `pAttachments` must not include `VK_IMAGE_ASPECT_PLANE_i_BIT` for any index i

- VUID-vkCmdClearAttachments-None-09679
  If the attachment format has components other than R and G, it must not have a 64-bit component width

- VUID-vkCmdClearAttachments-None-10616
  This command must not be recorded when per-tile execution model is enabled

Valid Usage (Implicit)

- VUID-vkCmdClearAttachments-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdClearAttachments-pAttachments-parameter
  `pAttachments` must be a valid pointer to an array of `attachmentCount` valid VkClearAttachment structures

- VUID-vkCmdClearAttachments-pRects-parameter
  `pRects` must be a valid pointer to an array of `rectCount` VkClearRect structures

- VUID-vkCmdClearAttachments-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdClearAttachments-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdClearAttachments-renderpass
  This command must only be called inside of a render pass instance

- VUID-vkCmdClearAttachments-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdClearAttachments-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdClearAttachments-attachmentCount-arraylength
  `attachmentCount` must be greater than `0`

- VUID-vkCmdClearAttachments-rectCount-arraylength
  `rectCount` must be greater than `0`

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Inside | Outside | VK_QUEUE_GRAPHICS_BIT | Action

Conditional Rendering

vkCmdClearAttachments is affected by conditional rendering

The `VkClearRect` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkClearRect {
        VkRect2D    rect;
        uint32_t    baseArrayLayer;
        uint32_t    layerCount;
    } VkClearRect;

- `rect` is the two-dimensional region to be cleared.

- `baseArrayLayer` is the first layer to be cleared.

- `layerCount` is the number of layers to clear.

The layers [`baseArrayLayer`, `baseArrayLayer` + `layerCount`) counting from the base layer of the attachment image view are cleared.

The `VkClearAttachment` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkClearAttachment {
        VkImageAspectFlags    aspectMask;
        uint32_t              colorAttachment;
        VkClearValue          clearValue;
    } VkClearAttachment;

- `aspectMask` is a mask selecting the color, depth and/or stencil aspects of the attachment to be cleared.

- `colorAttachment` is only meaningful if VK_IMAGE_ASPECT_COLOR_BIT is set in `aspectMask`, in which case it is an index into the bound color attachments.

- `clearValue` is the color or depth/stencil value to clear the attachment to, as described in Clear Values below.

Valid Usage

- VUID-VkClearAttachment-aspectMask-00019
  If `aspectMask` includes VK_IMAGE_ASPECT_COLOR_BIT, it must not include VK_IMAGE_ASPECT_DEPTH_BIT or VK_IMAGE_ASPECT_STENCIL_BIT

- VUID-VkClearAttachment-aspectMask-00020
  `aspectMask` must not include VK_IMAGE_ASPECT_METADATA_BIT

- VUID-VkClearAttachment-aspectMask-02246
  `aspectMask` must not include `VK_IMAGE_ASPECT_MEMORY_PLANE_i_BIT_EXT` for any index i

Valid Usage (Implicit)

- VUID-VkClearAttachment-aspectMask-parameter
  `aspectMask` must be a valid combination of VkImageAspectFlagBits values

- VUID-VkClearAttachment-aspectMask-requiredbitmask
  `aspectMask` must not be `0`

### 25.3. Clear Values

The `VkClearColorValue` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef union VkClearColorValue {
        float       float32[4];
        int32_t     int32[4];
        uint32_t    uint32[4];
    } VkClearColorValue;

- `float32` are the color clear values when the format of the image or attachment is one of the numeric formats with a numeric type that is floating-point. Floating-point values are automatically converted to the format of the image, with the clear value being treated as linear if the image is sRGB.

- `int32` are the color clear values when the format of the image or attachment has a numeric type that is signed integer (`SINT`). Signed integer values are converted to the format of the image by casting to the smaller type (with negative 32-bit values mapping to negative values in the smaller type). If the integer clear value is not representable in the target type (e.g. would overflow in conversion to that type), the clear value is undefined.

- `uint32` are the color clear values when the format of the image or attachment has a numeric type that is unsigned integer (`UINT`). Unsigned integer values are converted to the format of the image by casting to the integer type with fewer bits.

The four array elements of the clear color map to R, G, B, and A components of image formats, in order.

If the image has more than one sample, the same value is written to all samples for any pixels being cleared.

If the image or attachment format has a 64-bit component width, the first 2 array elements of each of the arrays above are reinterpreted as a single 64-bit element for the R component. The next 2 array elements are used in the same way for the G component. In other words, the union behaves as if it had the following additional members:

    double float64[2];
    int64_t int64[2];
    uint64_t uint64[2];

The `VkClearDepthStencilValue` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkClearDepthStencilValue {
        float       depth;
        uint32_t    stencil;
    } VkClearDepthStencilValue;

- `depth` is the clear value for the depth aspect of the depth/stencil attachment. It is a floating-point value which is automatically converted to the attachment’s format.

- `stencil` is the clear value for the stencil aspect of the depth/stencil attachment. It is a 32-bit integer value which is converted to the attachment’s format by taking the appropriate number of LSBs.

Valid Usage

- VUID-VkClearDepthStencilValue-depth-00022
  Unless the `VK_EXT_depth_range_unrestricted` extension is enabled `depth` must be between `0.0` and `1.0`, inclusive

The `VkClearValue` union is defined as:

    // Provided by VK_VERSION_1_0
    typedef union VkClearValue {
        VkClearColorValue           color;
        VkClearDepthStencilValue    depthStencil;
    } VkClearValue;

- `color` specifies the color image clear values to use when clearing a color image or attachment.

- `depthStencil` specifies the depth and stencil clear values to use when clearing a depth/stencil image or attachment.

This union is used where part of the API requires either color or depth/stencil clear values, depending on the attachment, and defines the initial clear values in the VkRenderPassBeginInfo structure.

### 25.4. Filling Memory

To fill a memory range with a fixed 4-byte bit pattern, call:

    // Provided by VK_KHR_device_address_commands
    void vkCmdFillMemoryKHR(
        VkCommandBuffer                             commandBuffer,
        const VkDeviceAddressRangeKHR*              pDstRange,
        VkAddressCommandFlagsKHR                    dstFlags,
        uint32_t                                    data);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `pDstRange` is a pointer to the VkDeviceAddressRangeKHR selecting the memory range to be filled.

- `dstFlags` is a VkAddressCommandFlagsKHR value defining the copy flags for the destination address range.

- `data` is the 4-byte word written repeatedly to the destination range to fill `size` bytes of data.

Note | The bit pattern of `data` is determined by the host endianness. For example, an unsigned integer value of `1` will result in a different bit pattern on a little endian machine compared to a big endian machine.

Valid Usage

- VUID-vkCmdFillMemoryKHR-pDstRange-13097
  If the range specified by `pDstRange` is not bound completely to memory when accessed, `dstFlags` must not include VK_ADDRESS_COMMAND_FULLY_BOUND_BIT_KHR

- VUID-vkCmdFillMemoryKHR-pDstRange-13098
  If the buffer from which the range specified by `pDstRange` was created with VK_BUFFER_CREATE_PROTECTED_BIT, and `protectedNoFault` is not supported, `dstFlags` must include VK_ADDRESS_COMMAND_PROTECTED_BIT_KHR

- VUID-vkCmdFillMemoryKHR-pDstRange-13099
  If the buffer from which the range specified by `pDstRange` was created without VK_BUFFER_CREATE_PROTECTED_BIT, and `protectedNoFault` is not supported, `dstFlags` must not include VK_ADDRESS_COMMAND_PROTECTED_BIT_KHR

- VUID-vkCmdFillMemoryKHR-dstFlags-13100
  `dstFlags` must not include both VK_ADDRESS_COMMAND_STORAGE_BUFFER_USAGE_BIT_KHR and VK_ADDRESS_COMMAND_UNKNOWN_STORAGE_BUFFER_USAGE_BIT_KHR

- VUID-vkCmdFillMemoryKHR-pDstRange-13122
  If any buffer, which is bound to a range of VkDeviceMemory that overlaps the range backing `pDstRange`, was created with VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, `dstFlags` must include VK_ADDRESS_COMMAND_STORAGE_BUFFER_USAGE_BIT_KHR or VK_ADDRESS_COMMAND_UNKNOWN_STORAGE_BUFFER_USAGE_BIT_KHR

- VUID-vkCmdFillMemoryKHR-pDstRange-13123
  If any buffer, which is bound to a range of VkDeviceMemory that overlaps the range backing `pDstRange`, was created without VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, `dstFlags` must not include VK_ADDRESS_COMMAND_STORAGE_BUFFER_USAGE_BIT_KHR

- VUID-vkCmdFillMemoryKHR-dstFlags-13101
  `dstFlags` must not include both VK_ADDRESS_COMMAND_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR and VK_ADDRESS_COMMAND_UNKNOWN_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR

- VUID-vkCmdFillMemoryKHR-pDstRange-13124
  If any buffer, which is bound to a range of VkDeviceMemory that overlaps the range backing `pDstRange`, was created with VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT, `dstFlags` must include VK_ADDRESS_COMMAND_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR or VK_ADDRESS_COMMAND_UNKNOWN_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR

- VUID-vkCmdFillMemoryKHR-pDstRange-13125
  If any buffer, which is bound to a range of VkDeviceMemory that overlaps the range backing `pDstRange`, was created without VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT, `dstFlags` must not include VK_ADDRESS_COMMAND_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR

- VUID-vkCmdFillMemoryKHR-dstRange-13000
  The buffer from which `dstRange` was queried must have been created with VK_BUFFER_USAGE_TRANSFER_DST_BIT usage flag

- VUID-vkCmdFillMemoryKHR-pDstRange-13001
  `pDstRange->address` must be a multiple of 4

- VUID-vkCmdFillMemoryKHR-pDstRange-13002
  `pDstRange->size` must be a multiple of 4

- VUID-vkCmdFillMemoryKHR-commandBuffer-13003
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, `dstFlags` must not include VK_ADDRESS_COMMAND_PROTECTED_BIT_KHR

- VUID-vkCmdFillMemoryKHR-commandBuffer-13004
  If `commandBuffer` is a protected command buffer and `protectedNoFault` is not supported, `dstFlags` must include VK_ADDRESS_COMMAND_PROTECTED_BIT_KHR

Valid Usage (Implicit)

- VUID-vkCmdFillMemoryKHR-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdFillMemoryKHR-pDstRange-parameter
  `pDstRange` must be a valid pointer to a valid VkDeviceAddressRangeKHR structure

- VUID-vkCmdFillMemoryKHR-dstFlags-parameter
  `dstFlags` must be a valid combination of VkAddressCommandFlagBitsKHR values

- VUID-vkCmdFillMemoryKHR-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdFillMemoryKHR-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_TRANSFER_BIT operations

- VUID-vkCmdFillMemoryKHR-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdFillMemoryKHR-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdFillMemoryKHR-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Outside | VK_QUEUE_TRANSFER_BIT | Action

Conditional Rendering

vkCmdFillMemoryKHR is not affected by conditional rendering

### 25.5. Updating Memory

To update device memory inline in a command buffer, call:

    // Provided by VK_KHR_device_address_commands
    void vkCmdUpdateMemoryKHR(
        VkCommandBuffer                             commandBuffer,
        const VkDeviceAddressRangeKHR*              pDstRange,
        VkAddressCommandFlagsKHR                    dstFlags,
        VkDeviceSize                                dataSize,
        const void*                                 pData);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `pDstRange` is a pointer to the VkDeviceAddressRangeKHR selecting the memory range to be updated.

- `dstFlags` is a VkAddressCommandFlagsKHR value defining the copy flags for the destination address range.

- `dataSize` is the number of bytes to update, and must be a multiple of 4.

- `pData` is a pointer to the source data for the buffer update, and must be at least `dataSize` bytes in size.

The source data is copied from `pData` to the command buffer when the command is called, and then copied to `dstRange` when the command is executed on a device.

Note | Due to the data being copied into command buffers, memory range copies are recommended for larger data transfers, to avoid excessive memory consumption.

Valid Usage

- VUID-vkCmdUpdateMemoryKHR-pDstRange-13097
  If the range specified by `pDstRange` is not bound completely to memory when accessed, `dstFlags` must not include VK_ADDRESS_COMMAND_FULLY_BOUND_BIT_KHR

- VUID-vkCmdUpdateMemoryKHR-pDstRange-13098
  If the buffer from which the range specified by `pDstRange` was created with VK_BUFFER_CREATE_PROTECTED_BIT, and `protectedNoFault` is not supported, `dstFlags` must include VK_ADDRESS_COMMAND_PROTECTED_BIT_KHR

- VUID-vkCmdUpdateMemoryKHR-pDstRange-13099
  If the buffer from which the range specified by `pDstRange` was created without VK_BUFFER_CREATE_PROTECTED_BIT, and `protectedNoFault` is not supported, `dstFlags` must not include VK_ADDRESS_COMMAND_PROTECTED_BIT_KHR

- VUID-vkCmdUpdateMemoryKHR-dstFlags-13100
  `dstFlags` must not include both VK_ADDRESS_COMMAND_STORAGE_BUFFER_USAGE_BIT_KHR and VK_ADDRESS_COMMAND_UNKNOWN_STORAGE_BUFFER_USAGE_BIT_KHR

- VUID-vkCmdUpdateMemoryKHR-pDstRange-13122
  If any buffer, which is bound to a range of VkDeviceMemory that overlaps the range backing `pDstRange`, was created with VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, `dstFlags` must include VK_ADDRESS_COMMAND_STORAGE_BUFFER_USAGE_BIT_KHR or VK_ADDRESS_COMMAND_UNKNOWN_STORAGE_BUFFER_USAGE_BIT_KHR

- VUID-vkCmdUpdateMemoryKHR-pDstRange-13123
  If any buffer, which is bound to a range of VkDeviceMemory that overlaps the range backing `pDstRange`, was created without VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, `dstFlags` must not include VK_ADDRESS_COMMAND_STORAGE_BUFFER_USAGE_BIT_KHR

- VUID-vkCmdUpdateMemoryKHR-dstFlags-13101
  `dstFlags` must not include both VK_ADDRESS_COMMAND_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR and VK_ADDRESS_COMMAND_UNKNOWN_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR

- VUID-vkCmdUpdateMemoryKHR-pDstRange-13124
  If any buffer, which is bound to a range of VkDeviceMemory that overlaps the range backing `pDstRange`, was created with VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT, `dstFlags` must include VK_ADDRESS_COMMAND_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR or VK_ADDRESS_COMMAND_UNKNOWN_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR

- VUID-vkCmdUpdateMemoryKHR-pDstRange-13125
  If any buffer, which is bound to a range of VkDeviceMemory that overlaps the range backing `pDstRange`, was created without VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT, `dstFlags` must not include VK_ADDRESS_COMMAND_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR

- VUID-vkCmdUpdateMemoryKHR-dstRange-13005
  The buffer from which `dstRange` was queried must have been created with VK_BUFFER_USAGE_TRANSFER_DST_BIT usage flag

- VUID-vkCmdUpdateMemoryKHR-pDstRange-13006
  `pDstRange->address` must be a multiple of 4

- VUID-vkCmdUpdateMemoryKHR-pDstRange-13007
  `pDstRange->size` must be less than or equal to 65536

- VUID-vkCmdUpdateMemoryKHR-dataSize-13008
  `dataSize` must be less than or equal to `pDstRange->size`

- VUID-vkCmdUpdateMemoryKHR-dataSize-13009
  `dataSize` must be a multiple of 4

- VUID-vkCmdUpdateMemoryKHR-commandBuffer-13010
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, `dstFlags` must not include VK_ADDRESS_COMMAND_PROTECTED_BIT_KHR

- VUID-vkCmdUpdateMemoryKHR-commandBuffer-13011
  If `commandBuffer` is a protected command buffer and `protectedNoFault` is not supported, `dstFlags` must include VK_ADDRESS_COMMAND_PROTECTED_BIT_KHR

Valid Usage (Implicit)

- VUID-vkCmdUpdateMemoryKHR-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdUpdateMemoryKHR-pDstRange-parameter
  `pDstRange` must be a valid pointer to a valid VkDeviceAddressRangeKHR structure

- VUID-vkCmdUpdateMemoryKHR-dstFlags-parameter
  `dstFlags` must be a valid combination of VkAddressCommandFlagBitsKHR values

- VUID-vkCmdUpdateMemoryKHR-pData-parameter
  `pData` must be a valid pointer to an array of `dataSize` bytes

- VUID-vkCmdUpdateMemoryKHR-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdUpdateMemoryKHR-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_TRANSFER_BIT operations

- VUID-vkCmdUpdateMemoryKHR-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdUpdateMemoryKHR-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdUpdateMemoryKHR-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdUpdateMemoryKHR-dataSize-arraylength
  `dataSize` must be greater than `0`

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Outside | VK_QUEUE_TRANSFER_BIT | Action

Conditional Rendering

vkCmdUpdateMemoryKHR is not affected by conditional rendering

### 25.6. Filling Buffers

To clear buffer data, call:

    // Provided by VK_VERSION_1_0
    void vkCmdFillBuffer(
        VkCommandBuffer                             commandBuffer,
        VkBuffer                                    dstBuffer,
        VkDeviceSize                                dstOffset,
        VkDeviceSize                                size,
        uint32_t                                    data);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `dstBuffer` is the buffer to be filled.

- `dstOffset` is the byte offset into the buffer at which to start filling, and must be a multiple of 4.

- `size` is the number of bytes to fill, and must be either a multiple of 4, or VK_WHOLE_SIZE to fill the range from `offset` to the end of the buffer. If VK_WHOLE_SIZE is used and the remaining size of the buffer is not a multiple of 4, then the nearest smaller multiple is used.

- `data` is the 4-byte word written repeatedly to the buffer to fill `size` bytes of data. The data word is written to memory according to the host endianness.

`vkCmdFillBuffer` is treated as a “transfer” operation for the purposes of synchronization barriers. It is only compatible with buffers created with the VK_BUFFER_USAGE_TRANSFER_DST_BIT usage flag set.

Valid Usage

- VUID-vkCmdFillBuffer-dstOffset-00024
  `dstOffset` must be less than the size of `dstBuffer`

- VUID-vkCmdFillBuffer-dstOffset-00025
  `dstOffset` must be a multiple of `4`

- VUID-vkCmdFillBuffer-size-00026
  If `size` is not equal to VK_WHOLE_SIZE, `size` must be greater than `0`

- VUID-vkCmdFillBuffer-size-00027
  If `size` is not equal to VK_WHOLE_SIZE, `size` must be less than or equal to the size of `dstBuffer` minus `dstOffset`

- VUID-vkCmdFillBuffer-size-00028
  If `size` is not equal to VK_WHOLE_SIZE, `size` must be a multiple of `4`

- VUID-vkCmdFillBuffer-dstBuffer-00029
  `dstBuffer` must have been created with the VK_BUFFER_USAGE_TRANSFER_DST_BIT usage flag set

- VUID-vkCmdFillBuffer-apiVersion-07894
  If the VK_KHR_maintenance1 extension is not enabled and VkPhysicalDeviceProperties::`apiVersion` is less than Vulkan 1.1, the VkCommandPool that `commandBuffer` was allocated from must support graphics or compute operations

- VUID-vkCmdFillBuffer-dstBuffer-00031
  If `dstBuffer` is non-sparse then it must be bound completely and contiguously to a single VkDeviceMemory object

- VUID-vkCmdFillBuffer-commandBuffer-01811
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, `dstBuffer` must not be a protected buffer

- VUID-vkCmdFillBuffer-commandBuffer-01812
  If `commandBuffer` is a protected command buffer and `protectedNoFault` is not supported, `dstBuffer` must not be an unprotected buffer

Valid Usage (Implicit)

- VUID-vkCmdFillBuffer-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdFillBuffer-dstBuffer-parameter
  `dstBuffer` must be a valid VkBuffer handle

- VUID-vkCmdFillBuffer-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdFillBuffer-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, VK_QUEUE_GRAPHICS_BIT, or VK_QUEUE_TRANSFER_BIT operations

- VUID-vkCmdFillBuffer-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdFillBuffer-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdFillBuffer-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdFillBuffer-commonparent
  Both of `commandBuffer`, and `dstBuffer` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT VK_QUEUE_TRANSFER_BIT | Action

Conditional Rendering

vkCmdFillBuffer is not affected by conditional rendering

### 25.7. Updating Buffers

To update buffer data inline in a command buffer, call:

    // Provided by VK_VERSION_1_0
    void vkCmdUpdateBuffer(
        VkCommandBuffer                             commandBuffer,
        VkBuffer                                    dstBuffer,
        VkDeviceSize                                dstOffset,
        VkDeviceSize                                dataSize,
        const void*                                 pData);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `dstBuffer` is a handle to the buffer to be updated.

- `dstOffset` is the byte offset into the buffer to start updating, and must be a multiple of 4.

- `dataSize` is the number of bytes to update, and must be a multiple of 4.

- `pData` is a pointer to the source data for the buffer update, and must be at least `dataSize` bytes in size.

`dataSize` must be less than or equal to 65536 bytes. For larger updates, applications can use buffer to buffer copies.

Note | Buffer updates performed with `vkCmdUpdateBuffer` first copy the data into command buffer memory when the command is recorded (which requires additional storage and may incur an additional allocation), and then copy the data from the command buffer into `dstBuffer` when the command is executed on a device. The additional cost of this functionality compared to buffer to buffer copies means it should only be used for very small amounts of data, and is why it is limited to at most 65536 bytes. Applications can work around this restriction by issuing multiple `vkCmdUpdateBuffer` commands to different ranges of the same buffer, but doing so is not recommended.

The source data is copied from `pData` to the command buffer when the command is called.

`vkCmdUpdateBuffer` is only allowed outside of a render pass. This command is treated as a “transfer” operation for the purposes of synchronization barriers. The VK_BUFFER_USAGE_TRANSFER_DST_BIT must be specified in `usage` of VkBufferCreateInfo in order for the buffer to be compatible with `vkCmdUpdateBuffer`.

Valid Usage

- VUID-vkCmdUpdateBuffer-dstOffset-00032
  `dstOffset` must be less than the size of `dstBuffer`

- VUID-vkCmdUpdateBuffer-dataSize-00033
  `dataSize` must be less than or equal to the size of `dstBuffer` minus `dstOffset`

- VUID-vkCmdUpdateBuffer-dstBuffer-00034
  `dstBuffer` must have been created with the VK_BUFFER_USAGE_TRANSFER_DST_BIT usage flag set

- VUID-vkCmdUpdateBuffer-dstBuffer-00035
  If `dstBuffer` is non-sparse then it must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-vkCmdUpdateBuffer-dstOffset-00036
  `dstOffset` must be a multiple of `4`

- VUID-vkCmdUpdateBuffer-dataSize-00037
  `dataSize` must be less than or equal to `65536`

- VUID-vkCmdUpdateBuffer-dataSize-00038
  `dataSize` must be a multiple of `4`

- VUID-vkCmdUpdateBuffer-commandBuffer-01813
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, `dstBuffer` must not be a protected buffer

- VUID-vkCmdUpdateBuffer-commandBuffer-01814
  If `commandBuffer` is a protected command buffer and `protectedNoFault` is not supported, `dstBuffer` must not be an unprotected buffer

Valid Usage (Implicit)

- VUID-vkCmdUpdateBuffer-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdUpdateBuffer-dstBuffer-parameter
  `dstBuffer` must be a valid VkBuffer handle

- VUID-vkCmdUpdateBuffer-pData-parameter
  `pData` must be a valid pointer to an array of `dataSize` bytes

- VUID-vkCmdUpdateBuffer-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdUpdateBuffer-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, VK_QUEUE_GRAPHICS_BIT, or VK_QUEUE_TRANSFER_BIT operations

- VUID-vkCmdUpdateBuffer-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdUpdateBuffer-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdUpdateBuffer-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdUpdateBuffer-dataSize-arraylength
  `dataSize` must be greater than `0`

- VUID-vkCmdUpdateBuffer-commonparent
  Both of `commandBuffer`, and `dstBuffer` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT VK_QUEUE_TRANSFER_BIT | Action

Conditional Rendering

vkCmdUpdateBuffer is not affected by conditional rendering

Note | The `pData` parameter was of type `uint32_t*` instead of `void*` prior to version 1.0.19 of the Specification and VK_HEADER_VERSION 19 of the Vulkan Header Files. This was a historical anomaly, as the source data may be of other types.

## 26. Copy Commands

An application can copy buffer and image data using several methods described in this chapter, depending on the type of data transfer.

All copy commands are treated as “transfer” operations for the purposes of synchronization barriers.

All copy commands that have a source format with an X component in its format description read undefined values from those bits.

All copy commands that have a destination format with an X component in its format description write undefined values to those bits.

### 26.1. Copying Data Between Memory Ranges

To copy data between memory ranges, call:

    // Provided by VK_KHR_device_address_commands
    void vkCmdCopyMemoryKHR(
        VkCommandBuffer                             commandBuffer,
        const VkCopyDeviceMemoryInfoKHR*            pCopyMemoryInfo);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `pCopyMemoryInfo` a pointer to a VkCopyDeviceMemoryInfoKHR structure describing the copies to perform.

Valid Usage

- VUID-vkCmdCopyMemoryKHR-commandBuffer-13012
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, the `srcCopyFlags` member of all elements of `pCopyMemoryInfo->pRegions` must not include VK_ADDRESS_COMMAND_PROTECTED_BIT_KHR

- VUID-vkCmdCopyMemoryKHR-commandBuffer-13013
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, the `dstCopyFlags` member of all elements of `pCopyMemoryInfo->pRegions` must not include VK_ADDRESS_COMMAND_PROTECTED_BIT_KHR

- VUID-vkCmdCopyMemoryKHR-commandBuffer-13014
  If `commandBuffer` is a protected command buffer and `protectedNoFault` is not supported, the `dstCopyFlags` member of all elements of `pCopyMemoryInfo->pRegions` must include VK_ADDRESS_COMMAND_PROTECTED_BIT_KHR

Valid Usage (Implicit)

- VUID-vkCmdCopyMemoryKHR-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdCopyMemoryKHR-pCopyMemoryInfo-parameter
  If `pCopyMemoryInfo` is not `NULL`, `pCopyMemoryInfo` must be a valid pointer to a valid VkCopyDeviceMemoryInfoKHR structure

- VUID-vkCmdCopyMemoryKHR-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdCopyMemoryKHR-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_TRANSFER_BIT operations

- VUID-vkCmdCopyMemoryKHR-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdCopyMemoryKHR-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdCopyMemoryKHR-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Outside | VK_QUEUE_TRANSFER_BIT | Action

Conditional Rendering

vkCmdCopyMemoryKHR is not affected by conditional rendering

The `VkCopyDeviceMemoryInfoKHR` structure is defined as:

    // Provided by VK_KHR_device_address_commands
    typedef struct VkCopyDeviceMemoryInfoKHR {
        VkStructureType                 sType;
        const void*                     pNext;
        uint32_t                        regionCount;
        const VkDeviceMemoryCopyKHR*    pRegions;
    } VkCopyDeviceMemoryInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `regionCount` is the number of copies to be performed.

- `pRegions` is a pointer to an array of VkDeviceMemoryCopyKHR structures describing individual copy operations between two memory ranges.

Valid Usage

- VUID-VkCopyDeviceMemoryInfoKHR-srcRange-13015
  The range of memory backing the address range defined by the `srcRange` member of any element of `pRegions` must not overlap the memory backing the address range defined by the `srcRange` or `dstRange` of any element of `pRegions`

Valid Usage (Implicit)

- VUID-VkCopyDeviceMemoryInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_COPY_DEVICE_MEMORY_INFO_KHR

- VUID-VkCopyDeviceMemoryInfoKHR-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkCopyDeviceMemoryInfoKHR-pRegions-parameter
  `pRegions` must be a valid pointer to an array of `regionCount` valid VkDeviceMemoryCopyKHR structures

- VUID-VkCopyDeviceMemoryInfoKHR-regionCount-arraylength
  `regionCount` must be greater than `0`

The `VkDeviceMemoryCopyKHR` structure is defined as:

    // Provided by VK_KHR_device_address_commands
    typedef struct VkDeviceMemoryCopyKHR {
        VkStructureType             sType;
        const void*                 pNext;
        VkDeviceAddressRangeKHR     srcRange;
        VkAddressCommandFlagsKHR    srcFlags;
        VkDeviceAddressRangeKHR     dstRange;
        VkAddressCommandFlagsKHR    dstFlags;
    } VkDeviceMemoryCopyKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `srcRange` is a VkDeviceAddressRangeKHR structure defining the source memory to copy from.

- `srcFlags` is a VkAddressCommandFlagsKHR value defining the copy flags for the source address range.

- `dstRange` is a VkDeviceAddressRangeKHR structure defining the destination memory to copy to.

- `dstFlags` is a VkAddressCommandFlagsKHR value defining the copy flags for the destination address range.

This structure defines a copy operation where `srcRange.size` bytes will be copied from `srcRange.address` to `dstRange.address`.

Valid Usage

- VUID-VkDeviceMemoryCopyKHR-srcRange-13097
  If the range specified by `srcRange` is not bound completely to memory when accessed, `srcFlags` must not include VK_ADDRESS_COMMAND_FULLY_BOUND_BIT_KHR

- VUID-VkDeviceMemoryCopyKHR-srcRange-13098
  If the buffer from which the range specified by `srcRange` was created with VK_BUFFER_CREATE_PROTECTED_BIT, and `protectedNoFault` is not supported, `srcFlags` must include VK_ADDRESS_COMMAND_PROTECTED_BIT_KHR

- VUID-VkDeviceMemoryCopyKHR-srcRange-13099
  If the buffer from which the range specified by `srcRange` was created without VK_BUFFER_CREATE_PROTECTED_BIT, and `protectedNoFault` is not supported, `srcFlags` must not include VK_ADDRESS_COMMAND_PROTECTED_BIT_KHR

- VUID-VkDeviceMemoryCopyKHR-srcFlags-13100
  `srcFlags` must not include both VK_ADDRESS_COMMAND_STORAGE_BUFFER_USAGE_BIT_KHR and VK_ADDRESS_COMMAND_UNKNOWN_STORAGE_BUFFER_USAGE_BIT_KHR

- VUID-VkDeviceMemoryCopyKHR-srcRange-13122
  If any buffer, which is bound to a range of VkDeviceMemory that overlaps the range backing `srcRange`, was created with VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, `srcFlags` must include VK_ADDRESS_COMMAND_STORAGE_BUFFER_USAGE_BIT_KHR or VK_ADDRESS_COMMAND_UNKNOWN_STORAGE_BUFFER_USAGE_BIT_KHR

- VUID-VkDeviceMemoryCopyKHR-srcRange-13123
  If any buffer, which is bound to a range of VkDeviceMemory that overlaps the range backing `srcRange`, was created without VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, `srcFlags` must not include VK_ADDRESS_COMMAND_STORAGE_BUFFER_USAGE_BIT_KHR

- VUID-VkDeviceMemoryCopyKHR-srcFlags-13101
  `srcFlags` must not include both VK_ADDRESS_COMMAND_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR and VK_ADDRESS_COMMAND_UNKNOWN_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR

- VUID-VkDeviceMemoryCopyKHR-srcRange-13124
  If any buffer, which is bound to a range of VkDeviceMemory that overlaps the range backing `srcRange`, was created with VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT, `srcFlags` must include VK_ADDRESS_COMMAND_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR or VK_ADDRESS_COMMAND_UNKNOWN_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR

- VUID-VkDeviceMemoryCopyKHR-srcRange-13125
  If any buffer, which is bound to a range of VkDeviceMemory that overlaps the range backing `srcRange`, was created without VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT, `srcFlags` must not include VK_ADDRESS_COMMAND_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR

- VUID-VkDeviceMemoryCopyKHR-dstRange-13097
  If the range specified by `dstRange` is not bound completely to memory when accessed, `dstFlags` must not include VK_ADDRESS_COMMAND_FULLY_BOUND_BIT_KHR

- VUID-VkDeviceMemoryCopyKHR-dstRange-13098
  If the buffer from which the range specified by `dstRange` was created with VK_BUFFER_CREATE_PROTECTED_BIT, and `protectedNoFault` is not supported, `dstFlags` must include VK_ADDRESS_COMMAND_PROTECTED_BIT_KHR

- VUID-VkDeviceMemoryCopyKHR-dstRange-13099
  If the buffer from which the range specified by `dstRange` was created without VK_BUFFER_CREATE_PROTECTED_BIT, and `protectedNoFault` is not supported, `dstFlags` must not include VK_ADDRESS_COMMAND_PROTECTED_BIT_KHR

- VUID-VkDeviceMemoryCopyKHR-dstFlags-13100
  `dstFlags` must not include both VK_ADDRESS_COMMAND_STORAGE_BUFFER_USAGE_BIT_KHR and VK_ADDRESS_COMMAND_UNKNOWN_STORAGE_BUFFER_USAGE_BIT_KHR

- VUID-VkDeviceMemoryCopyKHR-dstRange-13122
  If any buffer, which is bound to a range of VkDeviceMemory that overlaps the range backing `dstRange`, was created with VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, `dstFlags` must include VK_ADDRESS_COMMAND_STORAGE_BUFFER_USAGE_BIT_KHR or VK_ADDRESS_COMMAND_UNKNOWN_STORAGE_BUFFER_USAGE_BIT_KHR

- VUID-VkDeviceMemoryCopyKHR-dstRange-13123
  If any buffer, which is bound to a range of VkDeviceMemory that overlaps the range backing `dstRange`, was created without VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, `dstFlags` must not include VK_ADDRESS_COMMAND_STORAGE_BUFFER_USAGE_BIT_KHR

- VUID-VkDeviceMemoryCopyKHR-dstFlags-13101
  `dstFlags` must not include both VK_ADDRESS_COMMAND_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR and VK_ADDRESS_COMMAND_UNKNOWN_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR

- VUID-VkDeviceMemoryCopyKHR-dstRange-13124
  If any buffer, which is bound to a range of VkDeviceMemory that overlaps the range backing `dstRange`, was created with VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT, `dstFlags` must include VK_ADDRESS_COMMAND_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR or VK_ADDRESS_COMMAND_UNKNOWN_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR

- VUID-VkDeviceMemoryCopyKHR-dstRange-13125
  If any buffer, which is bound to a range of VkDeviceMemory that overlaps the range backing `dstRange`, was created without VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT, `dstFlags` must not include VK_ADDRESS_COMMAND_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR

- VUID-VkDeviceMemoryCopyKHR-size-13016
  The `size` member of `dstRange` must be greater than or equal to the `size` member of `srcRange`

- VUID-VkDeviceMemoryCopyKHR-srcRange-13017
  The buffer from which `srcRange` was queried must have been created with VK_BUFFER_USAGE_TRANSFER_SRC_BIT

- VUID-VkDeviceMemoryCopyKHR-dstRange-13018
  The buffer from which `dstRange` was queried must have been created with VK_BUFFER_USAGE_TRANSFER_DST_BIT

Valid Usage (Implicit)

- VUID-VkDeviceMemoryCopyKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DEVICE_MEMORY_COPY_KHR

- VUID-VkDeviceMemoryCopyKHR-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkDeviceMemoryCopyKHR-srcFlags-parameter
  `srcFlags` must be a valid combination of VkAddressCommandFlagBitsKHR values

- VUID-VkDeviceMemoryCopyKHR-dstFlags-parameter
  `dstFlags` must be a valid combination of VkAddressCommandFlagBitsKHR values

### 26.2. Copying Data Between Buffers

To copy data between buffer objects, call:

    // Provided by VK_VERSION_1_0
    void vkCmdCopyBuffer(
        VkCommandBuffer                             commandBuffer,
        VkBuffer                                    srcBuffer,
        VkBuffer                                    dstBuffer,
        uint32_t                                    regionCount,
        const VkBufferCopy*                         pRegions);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `srcBuffer` is the source buffer.

- `dstBuffer` is the destination buffer.

- `regionCount` is the number of regions to copy.

- `pRegions` is a pointer to an array of VkBufferCopy structures specifying the regions to copy.

Each source region specified by `pRegions` is copied from the source buffer to the destination region of the destination buffer. If any of the specified regions in `srcBuffer` overlaps in memory with any of the specified regions in `dstBuffer`, values read from those overlapping regions are undefined.

Valid Usage

- VUID-vkCmdCopyBuffer-commandBuffer-01822
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, `srcBuffer` must not be a protected buffer

- VUID-vkCmdCopyBuffer-commandBuffer-01823
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, `dstBuffer` must not be a protected buffer

- VUID-vkCmdCopyBuffer-commandBuffer-01824
  If `commandBuffer` is a protected command buffer and `protectedNoFault` is not supported, `dstBuffer` must not be an unprotected buffer

- VUID-vkCmdCopyBuffer-srcOffset-00113
  The `srcOffset` member of each element of `pRegions` must be less than the size of `srcBuffer`

- VUID-vkCmdCopyBuffer-dstOffset-00114
  The `dstOffset` member of each element of `pRegions` must be less than the size of `dstBuffer`

- VUID-vkCmdCopyBuffer-size-00115
  The `size` member of each element of `pRegions` must be less than or equal to the size of `srcBuffer` minus `srcOffset`

- VUID-vkCmdCopyBuffer-size-00116
  The `size` member of each element of `pRegions` must be less than or equal to the size of `dstBuffer` minus `dstOffset`

- VUID-vkCmdCopyBuffer-pRegions-00117
  The union of the source regions, and the union of the destination regions, specified by the elements of `pRegions`, must not overlap in memory

- VUID-vkCmdCopyBuffer-srcBuffer-00118
  `srcBuffer` must have been created with the VK_BUFFER_USAGE_TRANSFER_SRC_BIT usage flag set

- VUID-vkCmdCopyBuffer-srcBuffer-00119
  If `srcBuffer` is non-sparse then it must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-vkCmdCopyBuffer-dstBuffer-00120
  `dstBuffer` must have been created with the VK_BUFFER_USAGE_TRANSFER_DST_BIT usage flag set

- VUID-vkCmdCopyBuffer-dstBuffer-00121
  If `dstBuffer` is non-sparse then it must be bound completely and contiguously to a single `VkDeviceMemory` object

Valid Usage (Implicit)

- VUID-vkCmdCopyBuffer-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdCopyBuffer-srcBuffer-parameter
  `srcBuffer` must be a valid VkBuffer handle

- VUID-vkCmdCopyBuffer-dstBuffer-parameter
  `dstBuffer` must be a valid VkBuffer handle

- VUID-vkCmdCopyBuffer-pRegions-parameter
  `pRegions` must be a valid pointer to an array of `regionCount` valid VkBufferCopy structures

- VUID-vkCmdCopyBuffer-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdCopyBuffer-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, VK_QUEUE_GRAPHICS_BIT, or VK_QUEUE_TRANSFER_BIT operations

- VUID-vkCmdCopyBuffer-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdCopyBuffer-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdCopyBuffer-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdCopyBuffer-regionCount-arraylength
  `regionCount` must be greater than `0`

- VUID-vkCmdCopyBuffer-commonparent
  Each of `commandBuffer`, `dstBuffer`, and `srcBuffer` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT VK_QUEUE_TRANSFER_BIT | Action

Conditional Rendering

vkCmdCopyBuffer is not affected by conditional rendering

The `VkBufferCopy` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkBufferCopy {
        VkDeviceSize    srcOffset;
        VkDeviceSize    dstOffset;
        VkDeviceSize    size;
    } VkBufferCopy;

- `srcOffset` is the starting offset in bytes from the start of `srcBuffer`.

- `dstOffset` is the starting offset in bytes from the start of `dstBuffer`.

- `size` is the number of bytes to copy.

Valid Usage

- VUID-VkBufferCopy-size-01988
  The `size` must be greater than `0`

A more extensible version of the copy buffer command is defined below.

To copy data between buffer objects, call:

    // Provided by VK_VERSION_1_3
    void vkCmdCopyBuffer2(
        VkCommandBuffer                             commandBuffer,
        const VkCopyBufferInfo2*                    pCopyBufferInfo);

    // Provided by VK_KHR_copy_commands2
    // Equivalent to vkCmdCopyBuffer2
    void vkCmdCopyBuffer2KHR(
        VkCommandBuffer                             commandBuffer,
        const VkCopyBufferInfo2*                    pCopyBufferInfo);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `pCopyBufferInfo` is a pointer to a VkCopyBufferInfo2 structure describing the copy parameters.

Each source region specified by `pCopyBufferInfo->pRegions` is copied from the source buffer to the destination region of the destination buffer. If any of the specified regions in `pCopyBufferInfo->srcBuffer` overlaps in memory with any of the specified regions in `pCopyBufferInfo->dstBuffer`, values read from those overlapping regions are undefined.

Valid Usage

- VUID-vkCmdCopyBuffer2-commandBuffer-01822
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, `srcBuffer` must not be a protected buffer

- VUID-vkCmdCopyBuffer2-commandBuffer-01823
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, `dstBuffer` must not be a protected buffer

- VUID-vkCmdCopyBuffer2-commandBuffer-01824
  If `commandBuffer` is a protected command buffer and `protectedNoFault` is not supported, `dstBuffer` must not be an unprotected buffer

Valid Usage (Implicit)

- VUID-vkCmdCopyBuffer2-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdCopyBuffer2-pCopyBufferInfo-parameter
  `pCopyBufferInfo` must be a valid pointer to a valid VkCopyBufferInfo2 structure

- VUID-vkCmdCopyBuffer2-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdCopyBuffer2-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, VK_QUEUE_GRAPHICS_BIT, or VK_QUEUE_TRANSFER_BIT operations

- VUID-vkCmdCopyBuffer2-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdCopyBuffer2-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdCopyBuffer2-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT VK_QUEUE_TRANSFER_BIT | Action

Conditional Rendering

vkCmdCopyBuffer2 is not affected by conditional rendering

The `VkCopyBufferInfo2` structure is defined as:

    // Provided by VK_VERSION_1_3
    typedef struct VkCopyBufferInfo2 {
        VkStructureType         sType;
        const void*             pNext;
        VkBuffer                srcBuffer;
        VkBuffer                dstBuffer;
        uint32_t                regionCount;
        const VkBufferCopy2*    pRegions;
    } VkCopyBufferInfo2;

    // Provided by VK_KHR_copy_commands2
    // Equivalent to VkCopyBufferInfo2
    typedef VkCopyBufferInfo2 VkCopyBufferInfo2KHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `srcBuffer` is the source buffer.

- `dstBuffer` is the destination buffer.

- `regionCount` is the number of regions to copy.

- `pRegions` is a pointer to an array of VkBufferCopy2 structures specifying the regions to copy.

Valid Usage

- VUID-VkCopyBufferInfo2-srcOffset-00113
  The `srcOffset` member of each element of `pRegions` must be less than the size of `srcBuffer`

- VUID-VkCopyBufferInfo2-dstOffset-00114
  The `dstOffset` member of each element of `pRegions` must be less than the size of `dstBuffer`

- VUID-VkCopyBufferInfo2-size-00115
  The `size` member of each element of `pRegions` must be less than or equal to the size of `srcBuffer` minus `srcOffset`

- VUID-VkCopyBufferInfo2-size-00116
  The `size` member of each element of `pRegions` must be less than or equal to the size of `dstBuffer` minus `dstOffset`

- VUID-VkCopyBufferInfo2-pRegions-00117
  The union of the source regions, and the union of the destination regions, specified by the elements of `pRegions`, must not overlap in memory

- VUID-VkCopyBufferInfo2-srcBuffer-00118
  `srcBuffer` must have been created with the VK_BUFFER_USAGE_TRANSFER_SRC_BIT usage flag set

- VUID-VkCopyBufferInfo2-srcBuffer-00119
  If `srcBuffer` is non-sparse then it must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-VkCopyBufferInfo2-dstBuffer-00120
  `dstBuffer` must have been created with the VK_BUFFER_USAGE_TRANSFER_DST_BIT usage flag set

- VUID-VkCopyBufferInfo2-dstBuffer-00121
  If `dstBuffer` is non-sparse then it must be bound completely and contiguously to a single `VkDeviceMemory` object

Valid Usage (Implicit)

- VUID-VkCopyBufferInfo2-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_COPY_BUFFER_INFO_2

- VUID-VkCopyBufferInfo2-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkCopyBufferInfo2-srcBuffer-parameter
  `srcBuffer` must be a valid VkBuffer handle

- VUID-VkCopyBufferInfo2-dstBuffer-parameter
  `dstBuffer` must be a valid VkBuffer handle

- VUID-VkCopyBufferInfo2-pRegions-parameter
  `pRegions` must be a valid pointer to an array of `regionCount` valid VkBufferCopy2 structures

- VUID-VkCopyBufferInfo2-regionCount-arraylength
  `regionCount` must be greater than `0`

- VUID-VkCopyBufferInfo2-commonparent
  Both of `dstBuffer`, and `srcBuffer` must have been created, allocated, or retrieved from the same VkDevice

The `VkBufferCopy2` structure is defined as:

    // Provided by VK_VERSION_1_3
    typedef struct VkBufferCopy2 {
        VkStructureType    sType;
        const void*        pNext;
        VkDeviceSize       srcOffset;
        VkDeviceSize       dstOffset;
        VkDeviceSize       size;
    } VkBufferCopy2;

    // Provided by VK_KHR_copy_commands2
    // Equivalent to VkBufferCopy2
    typedef VkBufferCopy2 VkBufferCopy2KHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `srcOffset` is the starting offset in bytes from the start of `srcBuffer`.

- `dstOffset` is the starting offset in bytes from the start of `dstBuffer`.

- `size` is the number of bytes to copy.

Valid Usage

- VUID-VkBufferCopy2-size-01988
  The `size` must be greater than `0`

Valid Usage (Implicit)

- VUID-VkBufferCopy2-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_BUFFER_COPY_2

- VUID-VkBufferCopy2-pNext-pNext
  `pNext` must be `NULL`

### 26.3. Copying Data Between Images

To copy data between image objects, call:

    // Provided by VK_VERSION_1_0
    void vkCmdCopyImage(
        VkCommandBuffer                             commandBuffer,
        VkImage                                     srcImage,
        VkImageLayout                               srcImageLayout,
        VkImage                                     dstImage,
        VkImageLayout                               dstImageLayout,
        uint32_t                                    regionCount,
        const VkImageCopy*                          pRegions);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `srcImage` is the source image.

- `srcImageLayout` is the current layout of the source image subresource.

- `dstImage` is the destination image.

- `dstImageLayout` is the current layout of the destination image subresource.

- `regionCount` is the number of regions to copy.

- `pRegions` is a pointer to an array of VkImageCopy structures specifying the regions to copy.

Each source region specified by `pRegions` is copied from the source image to the destination region of the destination image. If any of the specified regions in `srcImage` overlaps in memory with any of the specified regions in `dstImage`, values read from those overlapping regions are undefined. If any region accesses a depth aspect in `dstImage` and the `VK_EXT_depth_range_unrestricted` extension is not enabled, values copied from `srcImage` outside of the range [0,1] will be written as undefined values to the destination image.

Multi-planar images can only be copied on a per-plane basis, and the subresources used in each region when copying to or from such images must specify only one plane, though different regions can specify different planes. When copying planes of multi-planar images, the format considered is the compatible format for that plane, rather than the format of the multi-planar image.

If the format of the destination image has a different block extent than the source image (e.g. one is a compressed format), the offset and extent for each of the regions specified is scaled according to the block extents of each format to match in size. Copy regions for each image must be aligned to a multiple of the texel block extent in each dimension, except at the edges of the image, where region extents must match the edge of the image.

Image data can be copied between images with different image types. If one image is VK_IMAGE_TYPE_3D and the other image is VK_IMAGE_TYPE_2D with multiple layers, then each slice is copied to or from a different layer; `depth` slices in the 3D image correspond to `layerCount` layers in the 2D image, with an effective `depth` of `1` used for the 2D image. If the `maintenance5` feature is enabled, all other combinations are allowed and function as if 1D images are 2D images with a height of 1. Otherwise, other combinations of image types are disallowed.

Valid Usage

- VUID-vkCmdCopyImage-commandBuffer-01825
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, `srcImage` must not be a protected image

- VUID-vkCmdCopyImage-commandBuffer-01826
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, `dstImage` must not be a protected image

- VUID-vkCmdCopyImage-commandBuffer-01827
  If `commandBuffer` is a protected command buffer and `protectedNoFault` is not supported, `dstImage` must not be an unprotected image

- VUID-vkCmdCopyImage-commandBuffer-10217
  If the queue family used to create the VkCommandPool which `commandBuffer` was allocated from does not support VK_QUEUE_GRAPHICS_BIT, and the `maintenance10` feature is not enabled, for each element of `pRegions`, where the `aspectMask` member of `srcSubresource` is VK_IMAGE_ASPECT_COLOR_BIT, the `aspectMask` of `dstSubresource` must not be VK_IMAGE_ASPECT_DEPTH_BIT or VK_IMAGE_ASPECT_STENCIL_BIT

- VUID-vkCmdCopyImage-commandBuffer-11782
  If the queue family used to create the VkCommandPool which `commandBuffer` was allocated from does not support VK_QUEUE_GRAPHICS_BIT but does support VK_QUEUE_COMPUTE_BIT, and in any element of `pRegions` the `aspectMask` member of `srcSubresource` is VK_IMAGE_ASPECT_COLOR_BIT and the `aspectMask` of `dstSubresource` is VK_IMAGE_ASPECT_DEPTH_BIT, then the format features of `dstImage` must contain VK_FORMAT_FEATURE_2_DEPTH_COPY_ON_COMPUTE_QUEUE_BIT_KHR

- VUID-vkCmdCopyImage-commandBuffer-11783
  If the queue family used to create the VkCommandPool which `commandBuffer` was allocated from does not support VK_QUEUE_GRAPHICS_BIT and VK_QUEUE_COMPUTE_BIT, but does support VK_QUEUE_TRANSFER_BIT, and in any element of `pRegions` the `aspectMask` member of `srcSubresource` is VK_IMAGE_ASPECT_COLOR_BIT and the `aspectMask` of `dstSubresource` is VK_IMAGE_ASPECT_DEPTH_BIT, then the format features of `dstImage` must contain VK_FORMAT_FEATURE_2_DEPTH_COPY_ON_TRANSFER_QUEUE_BIT_KHR

- VUID-vkCmdCopyImage-commandBuffer-11784
  If the queue family used to create the VkCommandPool which `commandBuffer` was allocated from does not support VK_QUEUE_GRAPHICS_BIT but does support VK_QUEUE_COMPUTE_BIT, and in any element of `pRegions` the `aspectMask` member of `srcSubresource` is VK_IMAGE_ASPECT_COLOR_BIT and the `aspectMask` of `dstSubresource` is VK_IMAGE_ASPECT_STENCIL_BIT, then the format features of `dstImage` must contain VK_FORMAT_FEATURE_2_STENCIL_COPY_ON_COMPUTE_QUEUE_BIT_KHR

- VUID-vkCmdCopyImage-commandBuffer-11785
  If the queue family used to create the VkCommandPool which `commandBuffer` was allocated from does not support VK_QUEUE_GRAPHICS_BIT and VK_QUEUE_COMPUTE_BIT, but does support VK_QUEUE_TRANSFER_BIT, and in any element of `pRegions` the `aspectMask` member of `srcSubresource` is VK_IMAGE_ASPECT_COLOR_BIT and the `aspectMask` of `dstSubresource` is VK_IMAGE_ASPECT_STENCIL_BIT, then the format features of `dstImage` must contain VK_FORMAT_FEATURE_2_STENCIL_COPY_ON_TRANSFER_QUEUE_BIT_KHR

- VUID-vkCmdCopyImage-commandBuffer-12449
  If the queue family used to create the VkCommandPool which `commandBuffer` was allocated from does not support VK_QUEUE_GRAPHICS_BIT and `srcSubresource.aspectMask` or `dstSubresource.aspectMask` of any element of `pRegions` contain VK_IMAGE_ASPECT_DEPTH_BIT or VK_IMAGE_ASPECT_STENCIL_BIT, then both `srcImage` and `dstImage` must have a sample count equal to VK_SAMPLE_COUNT_1_BIT

- VUID-vkCmdCopyImage-commandBuffer-10218
  If the queue family used to create the VkCommandPool which `commandBuffer` was allocated from does not support VK_QUEUE_GRAPHICS_BIT, and the `maintenance10` feature is not enabled, for each element of `pRegions`, where the `aspectMask` member of `dstSubresource` is VK_IMAGE_ASPECT_COLOR_BIT then the `aspectMask` of `srcSubresource` must not be VK_IMAGE_ASPECT_DEPTH_BIT or VK_IMAGE_ASPECT_STENCIL_BIT

- VUID-vkCmdCopyImage-commandBuffer-11786
  If the queue family used to create the VkCommandPool which `commandBuffer` was allocated from does not support VK_QUEUE_GRAPHICS_BIT but does support VK_QUEUE_COMPUTE_BIT, and in any element of `pRegions` the `aspectMask` member of `dstSubresource` is VK_IMAGE_ASPECT_COLOR_BIT and the `aspectMask` of `srcSubresource` is VK_IMAGE_ASPECT_DEPTH_BIT, then the format features of `srcImage` must contain VK_FORMAT_FEATURE_2_DEPTH_COPY_ON_COMPUTE_QUEUE_BIT_KHR

- VUID-vkCmdCopyImage-commandBuffer-11787
  If the queue family used to create the VkCommandPool which `commandBuffer` was allocated from does not support VK_QUEUE_GRAPHICS_BIT and VK_QUEUE_COMPUTE_BIT, but does support VK_QUEUE_TRANSFER_BIT, and in any element of `pRegions` the `aspectMask` member of `dstSubresource` is VK_IMAGE_ASPECT_COLOR_BIT and the `aspectMask` of `srcSubresource` is VK_IMAGE_ASPECT_DEPTH_BIT, then the format features of `srcImage` must contain VK_FORMAT_FEATURE_2_DEPTH_COPY_ON_TRANSFER_QUEUE_BIT_KHR

- VUID-vkCmdCopyImage-commandBuffer-11788
  If the queue family used to create the VkCommandPool which `commandBuffer` was allocated from does not support VK_QUEUE_GRAPHICS_BIT but does support VK_QUEUE_COMPUTE_BIT, and in any element of `pRegions` the `aspectMask` member of `dstSubresource` is VK_IMAGE_ASPECT_COLOR_BIT and the `aspectMask` of `srcSubresource` is VK_IMAGE_ASPECT_STENCIL_BIT, then the format features of `srcImage` must contain VK_FORMAT_FEATURE_2_STENCIL_COPY_ON_COMPUTE_QUEUE_BIT_KHR

- VUID-vkCmdCopyImage-commandBuffer-11789
  If the queue family used to create the VkCommandPool which `commandBuffer` was allocated from does not support VK_QUEUE_GRAPHICS_BIT and VK_QUEUE_COMPUTE_BIT, but does support VK_QUEUE_TRANSFER_BIT, and in any element of `pRegions` the `aspectMask` member of `dstSubresource` is VK_IMAGE_ASPECT_COLOR_BIT and the `aspectMask` of `srcSubresource` is VK_IMAGE_ASPECT_STENCIL_BIT, then the format features of `srcImage` must contain VK_FORMAT_FEATURE_2_STENCIL_COPY_ON_TRANSFER_QUEUE_BIT_KHR

- VUID-vkCmdCopyImage-pRegions-00124
  The union of all source regions, and the union of all destination regions, specified by the elements of `pRegions`, must not overlap in memory

- VUID-vkCmdCopyImage-srcImage-01995
  The format features of `srcImage` must contain VK_FORMAT_FEATURE_TRANSFER_SRC_BIT

- VUID-vkCmdCopyImage-srcImageLayout-00128
  `srcImageLayout` must specify the layout of the image subresources of `srcImage` specified in `pRegions` at the time this command is executed on a `VkDevice`

- VUID-vkCmdCopyImage-srcImageLayout-01917
  `srcImageLayout` must be VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, or VK_IMAGE_LAYOUT_GENERAL

- VUID-vkCmdCopyImage-srcImage-09460
  If `srcImage` and `dstImage` are the same, and any elements of `pRegions` contains the `srcSubresource` and `dstSubresource` with matching `mipLevel` and overlapping array layers, then the `srcImageLayout` and `dstImageLayout` must be VK_IMAGE_LAYOUT_GENERAL or VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR

- VUID-vkCmdCopyImage-dstImage-01996
  The format features of `dstImage` must contain VK_FORMAT_FEATURE_TRANSFER_DST_BIT

- VUID-vkCmdCopyImage-dstImageLayout-00133
  `dstImageLayout` must specify the layout of the image subresources of `dstImage` specified in `pRegions` at the time this command is executed on a `VkDevice`

- VUID-vkCmdCopyImage-dstImageLayout-01395
  `dstImageLayout` must be VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, or VK_IMAGE_LAYOUT_GENERAL

- VUID-vkCmdCopyImage-srcImage-01548
  If the VkFormat of each of `srcImage` and `dstImage` is not a multi-planar format, the VkFormat of each of `srcImage` and `dstImage` must be size-compatible

- VUID-vkCmdCopyImage-None-01549
  In a copy to or from a plane of a multi-planar image, the VkFormat of the image and plane must be compatible according to the description of compatible planes for the plane being copied

- VUID-vkCmdCopyImage-srcImage-09247
  If the VkFormat of each of `srcImage` and `dstImage` is a compressed image format, the formats must have the same texel block extent

- VUID-vkCmdCopyImage-srcImage-00136
  The sample count of `srcImage` and `dstImage` must match

- VUID-vkCmdCopyImage-srcOffset-01783
  The `srcOffset` and `extent` members of each element of `pRegions` must respect the image transfer granularity requirements of `commandBuffer`’s command pool’s queue family, as described in VkQueueFamilyProperties

- VUID-vkCmdCopyImage-dstOffset-01784
  The `dstOffset` and `extent` members of each element of `pRegions` must respect the image transfer granularity requirements of `commandBuffer`’s command pool’s queue family, as described in VkQueueFamilyProperties

- VUID-vkCmdCopyImage-srcImage-01551
  If neither `srcImage` nor `dstImage` has a multi-planar format and the `maintenance8` feature is not enabled then for each element of `pRegions`, `srcSubresource.aspectMask` and `dstSubresource.aspectMask` must match

- VUID-vkCmdCopyImage-pRegions-12201
  For each element of `pRegions` where `srcSubresource.aspectMask` and `dstSubresource.aspectMask` each contain at least one of VK_IMAGE_ASPECT_DEPTH_BIT or VK_IMAGE_ASPECT_STENCIL_BIT, `srcSubresource.aspectMask` and `dstSubresource.aspectMask` must match

- VUID-vkCmdCopyImage-srcSubresource-10214
  If `srcSubresource.aspectMask` is VK_IMAGE_ASPECT_COLOR_BIT, then `dstSubresource.aspectMask` must not contain both VK_IMAGE_ASPECT_DEPTH_BIT and VK_IMAGE_ASPECT_STENCIL_BIT

- VUID-vkCmdCopyImage-dstSubresource-10215
  If `dstSubresource.aspectMask` is VK_IMAGE_ASPECT_COLOR_BIT, then `srcSubresource.aspectMask` must not contain both VK_IMAGE_ASPECT_DEPTH_BIT and VK_IMAGE_ASPECT_STENCIL_BIT

- VUID-vkCmdCopyImage-srcImage-08713
  If `srcImage` has a multi-planar format, then for each element of `pRegions`, `srcSubresource.aspectMask` must be a single valid multi-planar aspect mask bit

- VUID-vkCmdCopyImage-dstImage-08714
  If `dstImage` has a multi-planar format, then for each element of `pRegions`, `dstSubresource.aspectMask` must be a single valid multi-planar aspect mask bit

- VUID-vkCmdCopyImage-srcImage-01556
  If `srcImage` has a multi-planar format and the `dstImage` does not have a multi-planar image format, then for each element of `pRegions`, `dstSubresource.aspectMask` must be VK_IMAGE_ASPECT_COLOR_BIT

- VUID-vkCmdCopyImage-dstImage-01557
  If `dstImage` has a multi-planar format and the `srcImage` does not have a multi-planar image format, then for each element of `pRegions`, `srcSubresource.aspectMask` must be VK_IMAGE_ASPECT_COLOR_BIT

- VUID-vkCmdCopyImage-srcSubresource-10211
  If `srcSubresource.aspectMask` is VK_IMAGE_ASPECT_COLOR_BIT and `dstSubresource.aspectMask` is VK_IMAGE_ASPECT_DEPTH_BIT or VK_IMAGE_ASPECT_STENCIL_BIT, then the VkFormat values of `srcImage` and `dstImage` must be compatible according to the list of compatible depth-stencil and color formats

- VUID-vkCmdCopyImage-srcSubresource-10212
  If `srcSubresource.aspectMask` is VK_IMAGE_ASPECT_DEPTH_BIT or VK_IMAGE_ASPECT_STENCIL_BIT and `dstSubresource.aspectMask` is VK_IMAGE_ASPECT_COLOR_BIT, then the VkFormat values of `srcImage` and `dstImage` must be compatible according to the list of compatible depth-stencil and color formats

- VUID-vkCmdCopyImage-apiVersion-07932
  If the VK_KHR_maintenance1 extension is not enabled, or VkPhysicalDeviceProperties::`apiVersion` is less than Vulkan 1.1, and either `srcImage` or `dstImage` is of type VK_IMAGE_TYPE_3D, then for each element of `pRegions`, `srcSubresource.baseArrayLayer` and `dstSubresource.baseArrayLayer` must both be `0`, and `srcSubresource.layerCount` and `dstSubresource.layerCount` must both be `1`

- VUID-vkCmdCopyImage-srcImage-04443
  If `srcImage` is of type VK_IMAGE_TYPE_3D, then for each element of `pRegions`, `srcSubresource.baseArrayLayer` must be `0` and `srcSubresource.layerCount` must be `1`

- VUID-vkCmdCopyImage-dstImage-04444
  If `dstImage` is of type VK_IMAGE_TYPE_3D, then for each element of `pRegions`, `dstSubresource.baseArrayLayer` must be `0` and `dstSubresource.layerCount` must be `1`

- VUID-vkCmdCopyImage-aspectMask-00142
  For each element of `pRegions`, `srcSubresource.aspectMask` must specify aspects present in `srcImage`

- VUID-vkCmdCopyImage-aspectMask-00143
  For each element of `pRegions`, `dstSubresource.aspectMask` must specify aspects present in `dstImage`

- VUID-vkCmdCopyImage-srcOffset-00144
  For each element of `pRegions`, `srcOffset.x` and (`extent.width` + `srcOffset.x`) must both be greater than or equal to `0` and less than or equal to the width of the specified `srcSubresource` of `srcImage`

- VUID-vkCmdCopyImage-srcOffset-00145
  For each element of `pRegions`, `srcOffset.y` and (`extent.height` + `srcOffset.y`) must both be greater than or equal to `0` and less than or equal to the height of the specified `srcSubresource` of `srcImage`

- VUID-vkCmdCopyImage-srcImage-00146
  If `srcImage` is of type VK_IMAGE_TYPE_1D, then for each element of `pRegions`, `srcOffset.y` must be `0` and `extent.height` must be `1`

- VUID-vkCmdCopyImage-srcOffset-00147
  If `srcImage` is of type VK_IMAGE_TYPE_3D, then for each element of `pRegions`, `srcOffset.z` and (`extent.depth` + `srcOffset.z`) must both be greater than or equal to `0` and less than or equal to the depth of the specified `srcSubresource` of `srcImage`

- VUID-vkCmdCopyImage-srcImage-01785
  If `srcImage` is of type VK_IMAGE_TYPE_1D, then for each element of `pRegions`, `srcOffset.z` must be `0` and `extent.depth` must be `1`

- VUID-vkCmdCopyImage-dstImage-01786
  If `dstImage` is of type VK_IMAGE_TYPE_1D, then for each element of `pRegions`, `dstOffset.z` must be `0`

- VUID-vkCmdCopyImage-srcImage-10907
  If either the VkFormat of each of `srcImage` and `dstImage` is not a compressed image format, and `dstImage` is of type VK_IMAGE_TYPE_1D, then for each element of `pRegions`, `extent.depth` must be `1`

- VUID-vkCmdCopyImage-srcImage-01787
  If `srcImage` is of type VK_IMAGE_TYPE_2D, then for each element of `pRegions`, `srcOffset.z` must be `0`

- VUID-vkCmdCopyImage-dstImage-01788
  If `dstImage` is of type VK_IMAGE_TYPE_2D, then for each element of `pRegions`, `dstOffset.z` must be `0`

- VUID-vkCmdCopyImage-apiVersion-07933
  If the VK_KHR_maintenance1 extension is not enabled, and VkPhysicalDeviceProperties::`apiVersion` is less than Vulkan 1.1, `srcImage` and `dstImage` must have the same VkImageType

- VUID-vkCmdCopyImage-apiVersion-08969
  If the VK_KHR_maintenance1 extension is not enabled, and VkPhysicalDeviceProperties::`apiVersion` is less than Vulkan 1.1, `srcImage` or `dstImage` is of type VK_IMAGE_TYPE_2D, then for each element of `pRegions`, `extent.depth` must be `1`

- VUID-vkCmdCopyImage-srcImage-07743
  If `srcImage` and `dstImage` have a different VkImageType, and the `maintenance5` feature is not enabled, one must be VK_IMAGE_TYPE_3D and the other must be VK_IMAGE_TYPE_2D

- VUID-vkCmdCopyImage-srcImage-08793
  If `srcImage` and `dstImage` have the same VkImageType, for each element of `pRegions`, if neither of the `layerCount` members of `srcSubresource` or `dstSubresource` are VK_REMAINING_ARRAY_LAYERS, the `layerCount` members of `srcSubresource` or `dstSubresource` must match

- VUID-vkCmdCopyImage-srcImage-08794
  If `srcImage` and `dstImage` have the same VkImageType, and one of the `layerCount` members of `srcSubresource` or `dstSubresource` is VK_REMAINING_ARRAY_LAYERS, the other member must be either VK_REMAINING_ARRAY_LAYERS or equal to the `arrayLayers` member of the VkImageCreateInfo used to create the image minus `baseArrayLayer`

- VUID-vkCmdCopyImage-srcImage-01790
  If `srcImage` and `dstImage` are both of type VK_IMAGE_TYPE_2D, then for each element of `pRegions`, `extent.depth` must be `1`

- VUID-vkCmdCopyImage-srcImage-01791
  If `srcImage` is of type VK_IMAGE_TYPE_2D, and `dstImage` is of type VK_IMAGE_TYPE_3D, then for each element of `pRegions`, `extent.depth` must equal `srcSubresource.layerCount`

- VUID-vkCmdCopyImage-dstImage-01792
  If `dstImage` is of type VK_IMAGE_TYPE_2D, and `srcImage` is of type VK_IMAGE_TYPE_3D, then for each element of `pRegions`, `extent.depth` must equal `dstSubresource.layerCount`

- VUID-vkCmdCopyImage-dstOffset-00150
  For each element of `pRegions`, `dstOffset.x` and (`extent.width` + `dstOffset.x`), where `extent` is adjusted for size-compatibility, must both be greater than or equal to `0` and less than or equal to the width of the specified `dstSubresource` of `dstImage`

- VUID-vkCmdCopyImage-dstOffset-00151
  For each element of `pRegions`, `dstOffset.y` and (`extent.height` + `dstOffset.y`), where `extent` is adjusted for size-compatibility, must both be greater than or equal to `0` and less than or equal to the height of the specified `dstSubresource` of `dstImage`

- VUID-vkCmdCopyImage-dstImage-00152
  If `dstImage` is of type VK_IMAGE_TYPE_1D, then for each element of `pRegions`, `dstOffset.y` must be `0`

- VUID-vkCmdCopyImage-srcImage-10908
  If either the VkFormat of each of `srcImage` and `dstImage` is not a compressed image format, and `dstImage` is of type VK_IMAGE_TYPE_1D, then for each element of `pRegions`, `extent.height` must be `1`, where `extent` is adjusted for size-compatibility

- VUID-vkCmdCopyImage-dstOffset-00153
  If `dstImage` is of type VK_IMAGE_TYPE_3D, then for each element of `pRegions`, `dstOffset.z` and (`extent.depth` + `dstOffset.z`), where `extent` is adjusted for size-compatibility, must both be greater than or equal to `0` and less than or equal to the depth of the specified `dstSubresource` of `dstImage`

- VUID-vkCmdCopyImage-pRegions-07278
  For each element of `pRegions`, `srcOffset.x` must be a multiple of the texel block extent width of the VkFormat of `srcImage`

- VUID-vkCmdCopyImage-pRegions-07279
  For each element of `pRegions`, `srcOffset.y` must be a multiple of the texel block extent height of the VkFormat of `srcImage`

- VUID-vkCmdCopyImage-pRegions-07280
  For each element of `pRegions`, `srcOffset.z` must be a multiple of the texel block extent depth of the VkFormat of `srcImage`

- VUID-vkCmdCopyImage-pRegions-07281
  For each element of `pRegions`, `dstOffset.x` must be a multiple of the texel block extent width of the VkFormat of `dstImage`

- VUID-vkCmdCopyImage-pRegions-07282
  For each element of `pRegions`, `dstOffset.y` must be a multiple of the texel block extent height of the VkFormat of `dstImage`

- VUID-vkCmdCopyImage-pRegions-07283
  For each element of `pRegions`, `dstOffset.z` must be a multiple of the texel block extent depth of the VkFormat of `dstImage`

- VUID-vkCmdCopyImage-srcImage-01728
  For each element of `pRegions`, if the sum of `srcOffset.x` and `extent.width` does not equal the width of the subresource specified by `srcSubresource`, `extent.width` must be a multiple of the texel block extent width of the VkFormat of `srcImage`

- VUID-vkCmdCopyImage-srcImage-01729
  For each element of `pRegions`, if the sum of `srcOffset.y` and `extent.height` does not equal the height of the subresource specified by `srcSubresource`, `extent.height` must be a multiple of the texel block extent height of the VkFormat of `srcImage`

- VUID-vkCmdCopyImage-srcImage-01730
  For each element of `pRegions`, if the sum of `srcOffset.z` and `extent.depth` does not equal the depth of the subresource specified by `srcSubresource`, `extent.depth` must be a multiple of the texel block extent depth of the VkFormat of `srcImage`

- VUID-vkCmdCopyImage-aspect-06662
  If the `aspect` member of any element of `pRegions` includes any flag other than VK_IMAGE_ASPECT_STENCIL_BIT or `srcImage` was not created with separate stencil usage, `srcImage` must have been created with the VK_IMAGE_USAGE_TRANSFER_SRC_BIT usage flag set

- VUID-vkCmdCopyImage-aspect-06663
  If the `aspect` member of any element of `pRegions` includes any flag other than VK_IMAGE_ASPECT_STENCIL_BIT or `dstImage` was not created with separate stencil usage, `dstImage` must have been created with the VK_IMAGE_USAGE_TRANSFER_DST_BIT usage flag set

- VUID-vkCmdCopyImage-aspect-06664
  If the `aspect` member of any element of `pRegions` includes VK_IMAGE_ASPECT_STENCIL_BIT, and `srcImage` was created with separate stencil usage, `srcImage` must have been created with the VK_IMAGE_USAGE_TRANSFER_SRC_BIT usage flag set

- VUID-vkCmdCopyImage-aspect-06665
  If the `aspect` member of any element of `pRegions` includes VK_IMAGE_ASPECT_STENCIL_BIT, and `dstImage` was created with separate stencil usage, `srcImage` must have been created with the VK_IMAGE_USAGE_TRANSFER_DST_BIT usage flag set

- VUID-vkCmdCopyImage-srcImage-07966
  If `srcImage` is non-sparse then the image or each specified disjoint plane must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-vkCmdCopyImage-srcSubresource-07967
  The `srcSubresource.mipLevel` member of each element of `pRegions` must be less than the `mipLevels` specified in VkImageCreateInfo when `srcImage` was created

- VUID-vkCmdCopyImage-srcSubresource-07968
  If `srcSubresource.layerCount` is not VK_REMAINING_ARRAY_LAYERS, `srcSubresource.baseArrayLayer` + `srcSubresource.layerCount` of each element of `pRegions` must be less than or equal to the `arrayLayers` specified in VkImageCreateInfo when `srcImage` was created

- VUID-vkCmdCopyImage-srcImage-07969
  `srcImage` must not have been created with `flags` containing VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT

- VUID-vkCmdCopyImage-dstImage-07966
  If `dstImage` is non-sparse then the image or each specified disjoint plane must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-vkCmdCopyImage-dstSubresource-07967
  The `dstSubresource.mipLevel` member of each element of `pRegions` must be less than the `mipLevels` specified in VkImageCreateInfo when `dstImage` was created

- VUID-vkCmdCopyImage-dstSubresource-07968
  If `dstSubresource.layerCount` is not VK_REMAINING_ARRAY_LAYERS, `dstSubresource.baseArrayLayer` + `dstSubresource.layerCount` of each element of `pRegions` must be less than or equal to the `arrayLayers` specified in VkImageCreateInfo when `dstImage` was created

- VUID-vkCmdCopyImage-dstImage-07969
  `dstImage` must not have been created with `flags` containing VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT

Valid Usage (Implicit)

- VUID-vkCmdCopyImage-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdCopyImage-srcImage-parameter
  `srcImage` must be a valid VkImage handle

- VUID-vkCmdCopyImage-srcImageLayout-parameter
  `srcImageLayout` must be a valid VkImageLayout value

- VUID-vkCmdCopyImage-dstImage-parameter
  `dstImage` must be a valid VkImage handle

- VUID-vkCmdCopyImage-dstImageLayout-parameter
  `dstImageLayout` must be a valid VkImageLayout value

- VUID-vkCmdCopyImage-pRegions-parameter
  `pRegions` must be a valid pointer to an array of `regionCount` valid VkImageCopy structures

- VUID-vkCmdCopyImage-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdCopyImage-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, VK_QUEUE_GRAPHICS_BIT, or VK_QUEUE_TRANSFER_BIT operations

- VUID-vkCmdCopyImage-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdCopyImage-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdCopyImage-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdCopyImage-regionCount-arraylength
  `regionCount` must be greater than `0`

- VUID-vkCmdCopyImage-commonparent
  Each of `commandBuffer`, `dstImage`, and `srcImage` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT VK_QUEUE_TRANSFER_BIT | Action

Conditional Rendering

vkCmdCopyImage is not affected by conditional rendering

The `VkImageCopy` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkImageCopy {
        VkImageSubresourceLayers    srcSubresource;
        VkOffset3D                  srcOffset;
        VkImageSubresourceLayers    dstSubresource;
        VkOffset3D                  dstOffset;
        VkExtent3D                  extent;
    } VkImageCopy;

- `srcSubresource` and `dstSubresource` are VkImageSubresourceLayers structures specifying the image subresources of the images used for the source and destination image data, respectively.

- `srcOffset` and `dstOffset` select the initial `x`, `y`, and `z` offsets in texels of the sub-regions of the source and destination image data.

- `extent` is the size in texels of the image to copy in `width`, `height` and `depth`.

Valid Usage

- VUID-VkImageCopy-apiVersion-07940
  If the VK_KHR_sampler_ycbcr_conversion extension is not enabled, and VkPhysicalDeviceProperties::`apiVersion` is less than Vulkan 1.1, the `aspectMask` member of `srcSubresource` and `dstSubresource` must match

- VUID-VkImageCopy-apiVersion-07941
  If the VK_KHR_maintenance1 extension is not enabled, and VkPhysicalDeviceProperties::`apiVersion` is less than Vulkan 1.1, the `layerCount` member of `srcSubresource` and `dstSubresource` must match

- VUID-VkImageCopy-extent-06668
  `extent.width` must not be 0

- VUID-VkImageCopy-extent-06669
  `extent.height` must not be 0

- VUID-VkImageCopy-extent-06670
  `extent.depth` must not be 0

Valid Usage (Implicit)

- VUID-VkImageCopy-srcSubresource-parameter
  `srcSubresource` must be a valid VkImageSubresourceLayers structure

- VUID-VkImageCopy-dstSubresource-parameter
  `dstSubresource` must be a valid VkImageSubresourceLayers structure

The `VkImageSubresourceLayers` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkImageSubresourceLayers {
        VkImageAspectFlags    aspectMask;
        uint32_t              mipLevel;
        uint32_t              baseArrayLayer;
        uint32_t              layerCount;
    } VkImageSubresourceLayers;

- `aspectMask` is a combination of VkImageAspectFlagBits, selecting the color, depth and/or stencil aspects to be copied.

- `mipLevel` is the mipmap level to copy

- `baseArrayLayer` and `layerCount` are the starting layer and number of layers to copy.

Valid Usage

- VUID-VkImageSubresourceLayers-aspectMask-00167
  If `aspectMask` contains VK_IMAGE_ASPECT_COLOR_BIT, it must not contain either of VK_IMAGE_ASPECT_DEPTH_BIT or VK_IMAGE_ASPECT_STENCIL_BIT

- VUID-VkImageSubresourceLayers-aspectMask-00168
  `aspectMask` must not contain VK_IMAGE_ASPECT_METADATA_BIT

- VUID-VkImageSubresourceLayers-aspectMask-02247
  `aspectMask` must not include `VK_IMAGE_ASPECT_MEMORY_PLANE_i_BIT_EXT` for any index i

- VUID-VkImageSubresourceLayers-layerCount-09243
  If the `maintenance5` feature is not enabled, `layerCount` must not be VK_REMAINING_ARRAY_LAYERS

- VUID-VkImageSubresourceLayers-layerCount-01700
  If `layerCount` is not VK_REMAINING_ARRAY_LAYERS, it must be greater than 0

Valid Usage (Implicit)

- VUID-VkImageSubresourceLayers-aspectMask-parameter
  `aspectMask` must be a valid combination of VkImageAspectFlagBits values

- VUID-VkImageSubresourceLayers-aspectMask-requiredbitmask
  `aspectMask` must not be `0`

A more extensible version of the copy image command is defined below.

To copy data between image objects, call:

    // Provided by VK_VERSION_1_3
    void vkCmdCopyImage2(
        VkCommandBuffer                             commandBuffer,
        const VkCopyImageInfo2*                     pCopyImageInfo);

    // Provided by VK_KHR_copy_commands2
    // Equivalent to vkCmdCopyImage2
    void vkCmdCopyImage2KHR(
        VkCommandBuffer                             commandBuffer,
        const VkCopyImageInfo2*                     pCopyImageInfo);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `pCopyImageInfo` is a pointer to a VkCopyImageInfo2 structure describing the copy parameters.

This command is functionally identical to vkCmdCopyImage, but includes extensible sub-structures that include `sType` and `pNext` parameters, allowing them to be more easily extended.

Valid Usage

- VUID-vkCmdCopyImage2-commandBuffer-01825
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, `srcImage` must not be a protected image

- VUID-vkCmdCopyImage2-commandBuffer-01826
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, `dstImage` must not be a protected image

- VUID-vkCmdCopyImage2-commandBuffer-01827
  If `commandBuffer` is a protected command buffer and `protectedNoFault` is not supported, `dstImage` must not be an unprotected image

- VUID-vkCmdCopyImage2-commandBuffer-10217
  If the queue family used to create the VkCommandPool which `commandBuffer` was allocated from does not support VK_QUEUE_GRAPHICS_BIT, and the `maintenance10` feature is not enabled, for each element of `pCopyImageInfo->pRegions`, where the `aspectMask` member of `srcSubresource` is VK_IMAGE_ASPECT_COLOR_BIT, the `aspectMask` of `dstSubresource` must not be VK_IMAGE_ASPECT_DEPTH_BIT or VK_IMAGE_ASPECT_STENCIL_BIT

- VUID-vkCmdCopyImage2-commandBuffer-11782
  If the queue family used to create the VkCommandPool which `commandBuffer` was allocated from does not support VK_QUEUE_GRAPHICS_BIT but does support VK_QUEUE_COMPUTE_BIT, and in any element of `pCopyImageInfo->pRegions` the `aspectMask` member of `srcSubresource` is VK_IMAGE_ASPECT_COLOR_BIT and the `aspectMask` of `dstSubresource` is VK_IMAGE_ASPECT_DEPTH_BIT, then the format features of `dstImage` must contain VK_FORMAT_FEATURE_2_DEPTH_COPY_ON_COMPUTE_QUEUE_BIT_KHR

- VUID-vkCmdCopyImage2-commandBuffer-11783
  If the queue family used to create the VkCommandPool which `commandBuffer` was allocated from does not support VK_QUEUE_GRAPHICS_BIT and VK_QUEUE_COMPUTE_BIT, but does support VK_QUEUE_TRANSFER_BIT, and in any element of `pCopyImageInfo->pRegions` the `aspectMask` member of `srcSubresource` is VK_IMAGE_ASPECT_COLOR_BIT and the `aspectMask` of `dstSubresource` is VK_IMAGE_ASPECT_DEPTH_BIT, then the format features of `dstImage` must contain VK_FORMAT_FEATURE_2_DEPTH_COPY_ON_TRANSFER_QUEUE_BIT_KHR

- VUID-vkCmdCopyImage2-commandBuffer-11784
  If the queue family used to create the VkCommandPool which `commandBuffer` was allocated from does not support VK_QUEUE_GRAPHICS_BIT but does support VK_QUEUE_COMPUTE_BIT, and in any element of `pCopyImageInfo->pRegions` the `aspectMask` member of `srcSubresource` is VK_IMAGE_ASPECT_COLOR_BIT and the `aspectMask` of `dstSubresource` is VK_IMAGE_ASPECT_STENCIL_BIT, then the format features of `dstImage` must contain VK_FORMAT_FEATURE_2_STENCIL_COPY_ON_COMPUTE_QUEUE_BIT_KHR

- VUID-vkCmdCopyImage2-commandBuffer-11785
  If the queue family used to create the VkCommandPool which `commandBuffer` was allocated from does not support VK_QUEUE_GRAPHICS_BIT and VK_QUEUE_COMPUTE_BIT, but does support VK_QUEUE_TRANSFER_BIT, and in any element of `pCopyImageInfo->pRegions` the `aspectMask` member of `srcSubresource` is VK_IMAGE_ASPECT_COLOR_BIT and the `aspectMask` of `dstSubresource` is VK_IMAGE_ASPECT_STENCIL_BIT, then the format features of `dstImage` must contain VK_FORMAT_FEATURE_2_STENCIL_COPY_ON_TRANSFER_QUEUE_BIT_KHR

- VUID-vkCmdCopyImage2-commandBuffer-12449
  If the queue family used to create the VkCommandPool which `commandBuffer` was allocated from does not support VK_QUEUE_GRAPHICS_BIT and `srcSubresource.aspectMask` or `dstSubresource.aspectMask` of any element of `pCopyImageInfo->pRegions` contain VK_IMAGE_ASPECT_DEPTH_BIT or VK_IMAGE_ASPECT_STENCIL_BIT, then both `srcImage` and `dstImage` must have a sample count equal to VK_SAMPLE_COUNT_1_BIT

- VUID-vkCmdCopyImage2-commandBuffer-10218
  If the queue family used to create the VkCommandPool which `commandBuffer` was allocated from does not support VK_QUEUE_GRAPHICS_BIT, and the `maintenance10` feature is not enabled, for each element of `pCopyImageInfo->pRegions`, where the `aspectMask` member of `dstSubresource` is VK_IMAGE_ASPECT_COLOR_BIT then the `aspectMask` of `srcSubresource` must not be VK_IMAGE_ASPECT_DEPTH_BIT or VK_IMAGE_ASPECT_STENCIL_BIT

- VUID-vkCmdCopyImage2-commandBuffer-11786
  If the queue family used to create the VkCommandPool which `commandBuffer` was allocated from does not support VK_QUEUE_GRAPHICS_BIT but does support VK_QUEUE_COMPUTE_BIT, and in any element of `pCopyImageInfo->pRegions` the `aspectMask` member of `dstSubresource` is VK_IMAGE_ASPECT_COLOR_BIT and the `aspectMask` of `srcSubresource` is VK_IMAGE_ASPECT_DEPTH_BIT, then the format features of `srcImage` must contain VK_FORMAT_FEATURE_2_DEPTH_COPY_ON_COMPUTE_QUEUE_BIT_KHR

- VUID-vkCmdCopyImage2-commandBuffer-11787
  If the queue family used to create the VkCommandPool which `commandBuffer` was allocated from does not support VK_QUEUE_GRAPHICS_BIT and VK_QUEUE_COMPUTE_BIT, but does support VK_QUEUE_TRANSFER_BIT, and in any element of `pCopyImageInfo->pRegions` the `aspectMask` member of `dstSubresource` is VK_IMAGE_ASPECT_COLOR_BIT and the `aspectMask` of `srcSubresource` is VK_IMAGE_ASPECT_DEPTH_BIT, then the format features of `srcImage` must contain VK_FORMAT_FEATURE_2_DEPTH_COPY_ON_TRANSFER_QUEUE_BIT_KHR

- VUID-vkCmdCopyImage2-commandBuffer-11788
  If the queue family used to create the VkCommandPool which `commandBuffer` was allocated from does not support VK_QUEUE_GRAPHICS_BIT but does support VK_QUEUE_COMPUTE_BIT, and in any element of `pCopyImageInfo->pRegions` the `aspectMask` member of `dstSubresource` is VK_IMAGE_ASPECT_COLOR_BIT and the `aspectMask` of `srcSubresource` is VK_IMAGE_ASPECT_STENCIL_BIT, then the format features of `srcImage` must contain VK_FORMAT_FEATURE_2_STENCIL_COPY_ON_COMPUTE_QUEUE_BIT_KHR

- VUID-vkCmdCopyImage2-commandBuffer-11789
  If the queue family used to create the VkCommandPool which `commandBuffer` was allocated from does not support VK_QUEUE_GRAPHICS_BIT and VK_QUEUE_COMPUTE_BIT, but does support VK_QUEUE_TRANSFER_BIT, and in any element of `pCopyImageInfo->pRegions` the `aspectMask` member of `dstSubresource` is VK_IMAGE_ASPECT_COLOR_BIT and the `aspectMask` of `srcSubresource` is VK_IMAGE_ASPECT_STENCIL_BIT, then the format features of `srcImage` must contain VK_FORMAT_FEATURE_2_STENCIL_COPY_ON_TRANSFER_QUEUE_BIT_KHR

Valid Usage (Implicit)

- VUID-vkCmdCopyImage2-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdCopyImage2-pCopyImageInfo-parameter
  `pCopyImageInfo` must be a valid pointer to a valid VkCopyImageInfo2 structure

- VUID-vkCmdCopyImage2-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdCopyImage2-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, VK_QUEUE_GRAPHICS_BIT, or VK_QUEUE_TRANSFER_BIT operations

- VUID-vkCmdCopyImage2-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdCopyImage2-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdCopyImage2-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT VK_QUEUE_TRANSFER_BIT | Action

Conditional Rendering

vkCmdCopyImage2 is not affected by conditional rendering

The `VkCopyImageInfo2` structure is defined as:

    // Provided by VK_VERSION_1_3
    typedef struct VkCopyImageInfo2 {
        VkStructureType        sType;
        const void*            pNext;
        VkImage                srcImage;
        VkImageLayout          srcImageLayout;
        VkImage                dstImage;
        VkImageLayout          dstImageLayout;
        uint32_t               regionCount;
        const VkImageCopy2*    pRegions;
    } VkCopyImageInfo2;

    // Provided by VK_KHR_copy_commands2
    // Equivalent to VkCopyImageInfo2
    typedef VkCopyImageInfo2 VkCopyImageInfo2KHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `srcImage` is the source image.

- `srcImageLayout` is the current layout of the source image subresource.

- `dstImage` is the destination image.

- `dstImageLayout` is the current layout of the destination image subresource.

- `regionCount` is the number of regions to copy.

- `pRegions` is a pointer to an array of VkImageCopy2 structures specifying the regions to copy.

Valid Usage

- VUID-VkCopyImageInfo2-pRegions-00124
  The union of all source regions, and the union of all destination regions, specified by the elements of `pRegions`, must not overlap in memory

- VUID-VkCopyImageInfo2-srcImage-01995
  The format features of `srcImage` must contain VK_FORMAT_FEATURE_TRANSFER_SRC_BIT

- VUID-VkCopyImageInfo2-srcImageLayout-00128
  `srcImageLayout` must specify the layout of the image subresources of `srcImage` specified in `pRegions` at the time this command is executed on a `VkDevice`

- VUID-VkCopyImageInfo2-srcImageLayout-01917
  `srcImageLayout` must be VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, or VK_IMAGE_LAYOUT_GENERAL

- VUID-VkCopyImageInfo2-srcImage-09460
  If `srcImage` and `dstImage` are the same, and any elements of `pRegions` contains the `srcSubresource` and `dstSubresource` with matching `mipLevel` and overlapping array layers, then the `srcImageLayout` and `dstImageLayout` must be VK_IMAGE_LAYOUT_GENERAL or VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR

- VUID-VkCopyImageInfo2-dstImage-01996
  The format features of `dstImage` must contain VK_FORMAT_FEATURE_TRANSFER_DST_BIT

- VUID-VkCopyImageInfo2-dstImageLayout-00133
  `dstImageLayout` must specify the layout of the image subresources of `dstImage` specified in `pRegions` at the time this command is executed on a `VkDevice`

- VUID-VkCopyImageInfo2-dstImageLayout-01395
  `dstImageLayout` must be VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, or VK_IMAGE_LAYOUT_GENERAL

- VUID-VkCopyImageInfo2-srcImage-01548
  If the VkFormat of each of `srcImage` and `dstImage` is not a multi-planar format, the VkFormat of each of `srcImage` and `dstImage` must be size-compatible

- VUID-VkCopyImageInfo2-None-01549
  In a copy to or from a plane of a multi-planar image, the VkFormat of the image and plane must be compatible according to the description of compatible planes for the plane being copied

- VUID-VkCopyImageInfo2-srcImage-09247
  If the VkFormat of each of `srcImage` and `dstImage` is a compressed image format, the formats must have the same texel block extent

- VUID-VkCopyImageInfo2-srcImage-00136
  The sample count of `srcImage` and `dstImage` must match

- VUID-VkCopyImageInfo2-srcOffset-01783
  The `srcOffset` and `extent` members of each element of `pRegions` must respect the image transfer granularity requirements of `commandBuffer`’s command pool’s queue family, as described in VkQueueFamilyProperties

- VUID-VkCopyImageInfo2-dstOffset-01784
  The `dstOffset` and `extent` members of each element of `pRegions` must respect the image transfer granularity requirements of `commandBuffer`’s command pool’s queue family, as described in VkQueueFamilyProperties

- VUID-VkCopyImageInfo2-srcImage-01551
  If neither `srcImage` nor `dstImage` has a multi-planar format and the `maintenance8` feature is not enabled then for each element of `pRegions`, `srcSubresource.aspectMask` and `dstSubresource.aspectMask` must match

- VUID-VkCopyImageInfo2-pRegions-12201
  For each element of `pRegions` where `srcSubresource.aspectMask` and `dstSubresource.aspectMask` each contain at least one of VK_IMAGE_ASPECT_DEPTH_BIT or VK_IMAGE_ASPECT_STENCIL_BIT, `srcSubresource.aspectMask` and `dstSubresource.aspectMask` must match

- VUID-VkCopyImageInfo2-srcSubresource-10214
  If `srcSubresource.aspectMask` is VK_IMAGE_ASPECT_COLOR_BIT, then `dstSubresource.aspectMask` must not contain both VK_IMAGE_ASPECT_DEPTH_BIT and VK_IMAGE_ASPECT_STENCIL_BIT

- VUID-VkCopyImageInfo2-dstSubresource-10215
  If `dstSubresource.aspectMask` is VK_IMAGE_ASPECT_COLOR_BIT, then `srcSubresource.aspectMask` must not contain both VK_IMAGE_ASPECT_DEPTH_BIT and VK_IMAGE_ASPECT_STENCIL_BIT

- VUID-VkCopyImageInfo2-srcImage-08713
  If `srcImage` has a multi-planar format, then for each element of `pRegions`, `srcSubresource.aspectMask` must be a single valid multi-planar aspect mask bit

- VUID-VkCopyImageInfo2-dstImage-08714
  If `dstImage` has a multi-planar format, then for each element of `pRegions`, `dstSubresource.aspectMask` must be a single valid multi-planar aspect mask bit

- VUID-VkCopyImageInfo2-srcImage-01556
  If `srcImage` has a multi-planar format and the `dstImage` does not have a multi-planar image format, then for each element of `pRegions`, `dstSubresource.aspectMask` must be VK_IMAGE_ASPECT_COLOR_BIT

- VUID-VkCopyImageInfo2-dstImage-01557
  If `dstImage` has a multi-planar format and the `srcImage` does not have a multi-planar image format, then for each element of `pRegions`, `srcSubresource.aspectMask` must be VK_IMAGE_ASPECT_COLOR_BIT

- VUID-VkCopyImageInfo2-srcSubresource-10211
  If `srcSubresource.aspectMask` is VK_IMAGE_ASPECT_COLOR_BIT and `dstSubresource.aspectMask` is VK_IMAGE_ASPECT_DEPTH_BIT or VK_IMAGE_ASPECT_STENCIL_BIT, then the VkFormat values of `srcImage` and `dstImage` must be compatible according to the list of compatible depth-stencil and color formats

- VUID-VkCopyImageInfo2-srcSubresource-10212
  If `srcSubresource.aspectMask` is VK_IMAGE_ASPECT_DEPTH_BIT or VK_IMAGE_ASPECT_STENCIL_BIT and `dstSubresource.aspectMask` is VK_IMAGE_ASPECT_COLOR_BIT, then the VkFormat values of `srcImage` and `dstImage` must be compatible according to the list of compatible depth-stencil and color formats

- VUID-VkCopyImageInfo2-apiVersion-07932
  If the VK_KHR_maintenance1 extension is not enabled, or VkPhysicalDeviceProperties::`apiVersion` is less than Vulkan 1.1, and either `srcImage` or `dstImage` is of type VK_IMAGE_TYPE_3D, then for each element of `pRegions`, `srcSubresource.baseArrayLayer` and `dstSubresource.baseArrayLayer` must both be `0`, and `srcSubresource.layerCount` and `dstSubresource.layerCount` must both be `1`

- VUID-VkCopyImageInfo2-srcImage-04443
  If `srcImage` is of type VK_IMAGE_TYPE_3D, then for each element of `pRegions`, `srcSubresource.baseArrayLayer` must be `0` and `srcSubresource.layerCount` must be `1`

- VUID-VkCopyImageInfo2-dstImage-04444
  If `dstImage` is of type VK_IMAGE_TYPE_3D, then for each element of `pRegions`, `dstSubresource.baseArrayLayer` must be `0` and `dstSubresource.layerCount` must be `1`

- VUID-VkCopyImageInfo2-aspectMask-00142
  For each element of `pRegions`, `srcSubresource.aspectMask` must specify aspects present in `srcImage`

- VUID-VkCopyImageInfo2-aspectMask-00143
  For each element of `pRegions`, `dstSubresource.aspectMask` must specify aspects present in `dstImage`

- VUID-VkCopyImageInfo2-srcOffset-00144
  For each element of `pRegions`, `srcOffset.x` and (`extent.width` + `srcOffset.x`) must both be greater than or equal to `0` and less than or equal to the width of the specified `srcSubresource` of `srcImage`

- VUID-VkCopyImageInfo2-srcOffset-00145
  For each element of `pRegions`, `srcOffset.y` and (`extent.height` + `srcOffset.y`) must both be greater than or equal to `0` and less than or equal to the height of the specified `srcSubresource` of `srcImage`

- VUID-VkCopyImageInfo2-srcImage-00146
  If `srcImage` is of type VK_IMAGE_TYPE_1D, then for each element of `pRegions`, `srcOffset.y` must be `0` and `extent.height` must be `1`

- VUID-VkCopyImageInfo2-srcOffset-00147
  If `srcImage` is of type VK_IMAGE_TYPE_3D, then for each element of `pRegions`, `srcOffset.z` and (`extent.depth` + `srcOffset.z`) must both be greater than or equal to `0` and less than or equal to the depth of the specified `srcSubresource` of `srcImage`

- VUID-VkCopyImageInfo2-srcImage-01785
  If `srcImage` is of type VK_IMAGE_TYPE_1D, then for each element of `pRegions`, `srcOffset.z` must be `0` and `extent.depth` must be `1`

- VUID-VkCopyImageInfo2-dstImage-01786
  If `dstImage` is of type VK_IMAGE_TYPE_1D, then for each element of `pRegions`, `dstOffset.z` must be `0`

- VUID-VkCopyImageInfo2-srcImage-10907
  If either the VkFormat of each of `srcImage` and `dstImage` is not a compressed image format, and `dstImage` is of type VK_IMAGE_TYPE_1D, then for each element of `pRegions`, `extent.depth` must be `1`

- VUID-VkCopyImageInfo2-srcImage-01787
  If `srcImage` is of type VK_IMAGE_TYPE_2D, then for each element of `pRegions`, `srcOffset.z` must be `0`

- VUID-VkCopyImageInfo2-dstImage-01788
  If `dstImage` is of type VK_IMAGE_TYPE_2D, then for each element of `pRegions`, `dstOffset.z` must be `0`

- VUID-VkCopyImageInfo2-apiVersion-07933
  If the VK_KHR_maintenance1 extension is not enabled, and VkPhysicalDeviceProperties::`apiVersion` is less than Vulkan 1.1, `srcImage` and `dstImage` must have the same VkImageType

- VUID-VkCopyImageInfo2-apiVersion-08969
  If the VK_KHR_maintenance1 extension is not enabled, and VkPhysicalDeviceProperties::`apiVersion` is less than Vulkan 1.1, `srcImage` or `dstImage` is of type VK_IMAGE_TYPE_2D, then for each element of `pRegions`, `extent.depth` must be `1`

- VUID-VkCopyImageInfo2-srcImage-07743
  If `srcImage` and `dstImage` have a different VkImageType, and the `maintenance5` feature is not enabled, one must be VK_IMAGE_TYPE_3D and the other must be VK_IMAGE_TYPE_2D

- VUID-VkCopyImageInfo2-srcImage-08793
  If `srcImage` and `dstImage` have the same VkImageType, for each element of `pRegions`, if neither of the `layerCount` members of `srcSubresource` or `dstSubresource` are VK_REMAINING_ARRAY_LAYERS, the `layerCount` members of `srcSubresource` or `dstSubresource` must match

- VUID-VkCopyImageInfo2-srcImage-08794
  If `srcImage` and `dstImage` have the same VkImageType, and one of the `layerCount` members of `srcSubresource` or `dstSubresource` is VK_REMAINING_ARRAY_LAYERS, the other member must be either VK_REMAINING_ARRAY_LAYERS or equal to the `arrayLayers` member of the VkImageCreateInfo used to create the image minus `baseArrayLayer`

- VUID-VkCopyImageInfo2-srcImage-01790
  If `srcImage` and `dstImage` are both of type VK_IMAGE_TYPE_2D, then for each element of `pRegions`, `extent.depth` must be `1`

- VUID-VkCopyImageInfo2-srcImage-01791
  If `srcImage` is of type VK_IMAGE_TYPE_2D, and `dstImage` is of type VK_IMAGE_TYPE_3D, then for each element of `pRegions`, `extent.depth` must equal `srcSubresource.layerCount`

- VUID-VkCopyImageInfo2-dstImage-01792
  If `dstImage` is of type VK_IMAGE_TYPE_2D, and `srcImage` is of type VK_IMAGE_TYPE_3D, then for each element of `pRegions`, `extent.depth` must equal `dstSubresource.layerCount`

- VUID-VkCopyImageInfo2-dstOffset-00150
  For each element of `pRegions`, `dstOffset.x` and (`extent.width` + `dstOffset.x`), where `extent` is adjusted for size-compatibility, must both be greater than or equal to `0` and less than or equal to the width of the specified `dstSubresource` of `dstImage`

- VUID-VkCopyImageInfo2-dstOffset-00151
  For each element of `pRegions`, `dstOffset.y` and (`extent.height` + `dstOffset.y`), where `extent` is adjusted for size-compatibility, must both be greater than or equal to `0` and less than or equal to the height of the specified `dstSubresource` of `dstImage`

- VUID-VkCopyImageInfo2-dstImage-00152
  If `dstImage` is of type VK_IMAGE_TYPE_1D, then for each element of `pRegions`, `dstOffset.y` must be `0`

- VUID-VkCopyImageInfo2-srcImage-10908
  If either the VkFormat of each of `srcImage` and `dstImage` is not a compressed image format, and `dstImage` is of type VK_IMAGE_TYPE_1D, then for each element of `pRegions`, `extent.height` must be `1`, where `extent` is adjusted for size-compatibility

- VUID-VkCopyImageInfo2-dstOffset-00153
  If `dstImage` is of type VK_IMAGE_TYPE_3D, then for each element of `pRegions`, `dstOffset.z` and (`extent.depth` + `dstOffset.z`), where `extent` is adjusted for size-compatibility, must both be greater than or equal to `0` and less than or equal to the depth of the specified `dstSubresource` of `dstImage`

- VUID-VkCopyImageInfo2-pRegions-07278
  For each element of `pRegions`, `srcOffset.x` must be a multiple of the texel block extent width of the VkFormat of `srcImage`

- VUID-VkCopyImageInfo2-pRegions-07279
  For each element of `pRegions`, `srcOffset.y` must be a multiple of the texel block extent height of the VkFormat of `srcImage`

- VUID-VkCopyImageInfo2-pRegions-07280
  For each element of `pRegions`, `srcOffset.z` must be a multiple of the texel block extent depth of the VkFormat of `srcImage`

- VUID-VkCopyImageInfo2-pRegions-07281
  For each element of `pRegions`, `dstOffset.x` must be a multiple of the texel block extent width of the VkFormat of `dstImage`

- VUID-VkCopyImageInfo2-pRegions-07282
  For each element of `pRegions`, `dstOffset.y` must be a multiple of the texel block extent height of the VkFormat of `dstImage`

- VUID-VkCopyImageInfo2-pRegions-07283
  For each element of `pRegions`, `dstOffset.z` must be a multiple of the texel block extent depth of the VkFormat of `dstImage`

- VUID-VkCopyImageInfo2-srcImage-01728
  For each element of `pRegions`, if the sum of `srcOffset.x` and `extent.width` does not equal the width of the subresource specified by `srcSubresource`, `extent.width` must be a multiple of the texel block extent width of the VkFormat of `srcImage`

- VUID-VkCopyImageInfo2-srcImage-01729
  For each element of `pRegions`, if the sum of `srcOffset.y` and `extent.height` does not equal the height of the subresource specified by `srcSubresource`, `extent.height` must be a multiple of the texel block extent height of the VkFormat of `srcImage`

- VUID-VkCopyImageInfo2-srcImage-01730
  For each element of `pRegions`, if the sum of `srcOffset.z` and `extent.depth` does not equal the depth of the subresource specified by `srcSubresource`, `extent.depth` must be a multiple of the texel block extent depth of the VkFormat of `srcImage`

- VUID-VkCopyImageInfo2-aspect-06662
  If the `aspect` member of any element of `pRegions` includes any flag other than VK_IMAGE_ASPECT_STENCIL_BIT or `srcImage` was not created with separate stencil usage, `srcImage` must have been created with the VK_IMAGE_USAGE_TRANSFER_SRC_BIT usage flag set

- VUID-VkCopyImageInfo2-aspect-06663
  If the `aspect` member of any element of `pRegions` includes any flag other than VK_IMAGE_ASPECT_STENCIL_BIT or `dstImage` was not created with separate stencil usage, `dstImage` must have been created with the VK_IMAGE_USAGE_TRANSFER_DST_BIT usage flag set

- VUID-VkCopyImageInfo2-aspect-06664
  If the `aspect` member of any element of `pRegions` includes VK_IMAGE_ASPECT_STENCIL_BIT, and `srcImage` was created with separate stencil usage, `srcImage` must have been created with the VK_IMAGE_USAGE_TRANSFER_SRC_BIT usage flag set

- VUID-VkCopyImageInfo2-aspect-06665
  If the `aspect` member of any element of `pRegions` includes VK_IMAGE_ASPECT_STENCIL_BIT, and `dstImage` was created with separate stencil usage, `srcImage` must have been created with the VK_IMAGE_USAGE_TRANSFER_DST_BIT usage flag set

- VUID-VkCopyImageInfo2-srcImage-07966
  If `srcImage` is non-sparse then the image or each specified disjoint plane must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-VkCopyImageInfo2-srcSubresource-07967
  The `srcSubresource.mipLevel` member of each element of `pRegions` must be less than the `mipLevels` specified in VkImageCreateInfo when `srcImage` was created

- VUID-VkCopyImageInfo2-srcSubresource-07968
  If `srcSubresource.layerCount` is not VK_REMAINING_ARRAY_LAYERS, `srcSubresource.baseArrayLayer` + `srcSubresource.layerCount` of each element of `pRegions` must be less than or equal to the `arrayLayers` specified in VkImageCreateInfo when `srcImage` was created

- VUID-VkCopyImageInfo2-srcImage-07969
  `srcImage` must not have been created with `flags` containing VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT

- VUID-VkCopyImageInfo2-dstImage-07966
  If `dstImage` is non-sparse then the image or each specified disjoint plane must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-VkCopyImageInfo2-dstSubresource-07967
  The `dstSubresource.mipLevel` member of each element of `pRegions` must be less than the `mipLevels` specified in VkImageCreateInfo when `dstImage` was created

- VUID-VkCopyImageInfo2-dstSubresource-07968
  If `dstSubresource.layerCount` is not VK_REMAINING_ARRAY_LAYERS, `dstSubresource.baseArrayLayer` + `dstSubresource.layerCount` of each element of `pRegions` must be less than or equal to the `arrayLayers` specified in VkImageCreateInfo when `dstImage` was created

- VUID-VkCopyImageInfo2-dstImage-07969
  `dstImage` must not have been created with `flags` containing VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT

Valid Usage (Implicit)

- VUID-VkCopyImageInfo2-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_COPY_IMAGE_INFO_2

- VUID-VkCopyImageInfo2-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkCopyImageInfo2-srcImage-parameter
  `srcImage` must be a valid VkImage handle

- VUID-VkCopyImageInfo2-srcImageLayout-parameter
  `srcImageLayout` must be a valid VkImageLayout value

- VUID-VkCopyImageInfo2-dstImage-parameter
  `dstImage` must be a valid VkImage handle

- VUID-VkCopyImageInfo2-dstImageLayout-parameter
  `dstImageLayout` must be a valid VkImageLayout value

- VUID-VkCopyImageInfo2-pRegions-parameter
  `pRegions` must be a valid pointer to an array of `regionCount` valid VkImageCopy2 structures

- VUID-VkCopyImageInfo2-regionCount-arraylength
  `regionCount` must be greater than `0`

- VUID-VkCopyImageInfo2-commonparent
  Both of `dstImage`, and `srcImage` must have been created, allocated, or retrieved from the same VkDevice

The `VkImageCopy2` structure is defined as:

    // Provided by VK_VERSION_1_3
    typedef struct VkImageCopy2 {
        VkStructureType             sType;
        const void*                 pNext;
        VkImageSubresourceLayers    srcSubresource;
        VkOffset3D                  srcOffset;
        VkImageSubresourceLayers    dstSubresource;
        VkOffset3D                  dstOffset;
        VkExtent3D                  extent;
    } VkImageCopy2;

    // Provided by VK_KHR_copy_commands2
    // Equivalent to VkImageCopy2
    typedef VkImageCopy2 VkImageCopy2KHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `srcSubresource` and `dstSubresource` are VkImageSubresourceLayers structures specifying the image subresources of the images used for the source and destination image data, respectively.

- `srcOffset` and `dstOffset` select the initial `x`, `y`, and `z` offsets in texels of the sub-regions of the source and destination image data.

- `extent` is the size in texels of the image to copy in `width`, `height` and `depth`.

Valid Usage

- VUID-VkImageCopy2-apiVersion-07940
  If the VK_KHR_sampler_ycbcr_conversion extension is not enabled, and VkPhysicalDeviceProperties::`apiVersion` is less than Vulkan 1.1, the `aspectMask` member of `srcSubresource` and `dstSubresource` must match

- VUID-VkImageCopy2-apiVersion-07941
  If the VK_KHR_maintenance1 extension is not enabled, and VkPhysicalDeviceProperties::`apiVersion` is less than Vulkan 1.1, the `layerCount` member of `srcSubresource` and `dstSubresource` must match

- VUID-VkImageCopy2-extent-06668
  `extent.width` must not be 0

- VUID-VkImageCopy2-extent-06669
  `extent.height` must not be 0

- VUID-VkImageCopy2-extent-06670
  `extent.depth` must not be 0

Valid Usage (Implicit)

- VUID-VkImageCopy2-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_IMAGE_COPY_2

- VUID-VkImageCopy2-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkImageCopy2-srcSubresource-parameter
  `srcSubresource` must be a valid VkImageSubresourceLayers structure

- VUID-VkImageCopy2-dstSubresource-parameter
  `dstSubresource` must be a valid VkImageSubresourceLayers structure

### 26.4. Copying Data Between Memory Ranges and Images

To copy data from an image to memory ranges, call:

    // Provided by VK_KHR_device_address_commands
    void vkCmdCopyMemoryToImageKHR(
        VkCommandBuffer                             commandBuffer,
        const VkCopyDeviceMemoryImageInfoKHR*       pCopyMemoryInfo);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `pCopyMemoryInfo` a pointer to a VkCopyDeviceMemoryImageInfoKHR structure describing the copies to perform.

Valid Usage

- VUID-vkCmdCopyMemoryToImageKHR-commandBuffer-13102
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, the `addressCopyFlags` member of all elements of `pCopyMemoryInfo->pRegions` must not include VK_ADDRESS_COMMAND_PROTECTED_BIT_KHR

- VUID-vkCmdCopyMemoryToImageKHR-commandBuffer-13103
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, `pCopyMemoryInfo->image` must not have been created with VK_IMAGE_CREATE_PROTECTED_BIT

- VUID-vkCmdCopyMemoryToImageKHR-commandBuffer-13104
  If the queue family used to create the VkCommandPool which `commandBuffer` was allocated from does not support VK_QUEUE_GRAPHICS_BIT or VK_QUEUE_COMPUTE_BIT, the `addressRange.pname`:address member of any element of `pCopyMemoryInfo->pRegions` must be a multiple of 4

- VUID-vkCmdCopyMemoryToImageKHR-imageOffset-13105
  The `imageOffset` and `imageExtent` members of each element of `pCopyMemoryInfo->pRegions` must respect the image transfer granularity requirements of `commandBuffer`’s command pool’s queue family, as described in VkQueueFamilyProperties

- VUID-vkCmdCopyMemoryToImageKHR-commandBuffer-13106
  If the queue family used to create the VkCommandPool which `commandBuffer` was allocated from does not support VK_QUEUE_GRAPHICS_BIT, for each element of `pCopyMemoryInfo->pRegions`, the `aspectMask` member of `imageSubresource` must not be VK_IMAGE_ASPECT_DEPTH_BIT or VK_IMAGE_ASPECT_STENCIL_BIT

- VUID-vkCmdCopyMemoryToImageKHR-imageLayout-13019
  The `imageLayout` member of each element of `pCopyMemoryInfo->pRegions` must be VK_IMAGE_LAYOUT_GENERAL, VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR, or VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL

- VUID-vkCmdCopyMemoryToImageKHR-pCopyMemoryInfo-13020
  `pCopyMemoryInfo->image` must have been created with VK_IMAGE_USAGE_TRANSFER_DST_BIT

- VUID-vkCmdCopyMemoryToImageKHR-commandBuffer-13021
  If `commandBuffer` is a protected command buffer and `protectedNoFault` is not supported, `pCopyMemoryInfo->image` must have been created with VK_IMAGE_CREATE_PROTECTED_BIT

- VUID-vkCmdCopyMemoryToImageKHR-None-13022
  If VK_EXT_depth_range_unrestricted is not enabled, for each element of `pCopyMemoryInfo->pRegions` whose `imageSubresource` contains a depth aspect, each data element in its `addressRange` must be in the range [0,1]

- VUID-vkCmdCopyMemoryToImageKHR-addressRange-13128
  At least one buffer containing the total address range specified by the `addressRange` member of each element of `pCopyMemoryInfo->pRegions` must have been created with VK_BUFFER_USAGE_TRANSFER_SRC_BIT

Valid Usage (Implicit)

- VUID-vkCmdCopyMemoryToImageKHR-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdCopyMemoryToImageKHR-pCopyMemoryInfo-parameter
  If `pCopyMemoryInfo` is not `NULL`, `pCopyMemoryInfo` must be a valid pointer to a valid VkCopyDeviceMemoryImageInfoKHR structure

- VUID-vkCmdCopyMemoryToImageKHR-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdCopyMemoryToImageKHR-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_TRANSFER_BIT operations

- VUID-vkCmdCopyMemoryToImageKHR-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdCopyMemoryToImageKHR-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdCopyMemoryToImageKHR-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Outside | VK_QUEUE_TRANSFER_BIT | Action

Conditional Rendering

vkCmdCopyMemoryToImageKHR is not affected by conditional rendering

To copy data from an image to memory ranges, call:

    // Provided by VK_KHR_device_address_commands
    void vkCmdCopyImageToMemoryKHR(
        VkCommandBuffer                             commandBuffer,
        const VkCopyDeviceMemoryImageInfoKHR*       pCopyMemoryInfo);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `pCopyMemoryInfo` a pointer to a VkCopyDeviceMemoryImageInfoKHR structure describing the copies to perform.

Valid Usage

- VUID-vkCmdCopyImageToMemoryKHR-commandBuffer-13102
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, the `addressCopyFlags` member of all elements of `pCopyMemoryInfo->pRegions` must not include VK_ADDRESS_COMMAND_PROTECTED_BIT_KHR

- VUID-vkCmdCopyImageToMemoryKHR-commandBuffer-13103
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, `pCopyMemoryInfo->image` must not have been created with VK_IMAGE_CREATE_PROTECTED_BIT

- VUID-vkCmdCopyImageToMemoryKHR-commandBuffer-13104
  If the queue family used to create the VkCommandPool which `commandBuffer` was allocated from does not support VK_QUEUE_GRAPHICS_BIT or VK_QUEUE_COMPUTE_BIT, the `addressRange.pname`:address member of any element of `pCopyMemoryInfo->pRegions` must be a multiple of 4

- VUID-vkCmdCopyImageToMemoryKHR-imageOffset-13105
  The `imageOffset` and `imageExtent` members of each element of `pCopyMemoryInfo->pRegions` must respect the image transfer granularity requirements of `commandBuffer`’s command pool’s queue family, as described in VkQueueFamilyProperties

- VUID-vkCmdCopyImageToMemoryKHR-commandBuffer-13106
  If the queue family used to create the VkCommandPool which `commandBuffer` was allocated from does not support VK_QUEUE_GRAPHICS_BIT, for each element of `pCopyMemoryInfo->pRegions`, the `aspectMask` member of `imageSubresource` must not be VK_IMAGE_ASPECT_DEPTH_BIT or VK_IMAGE_ASPECT_STENCIL_BIT

- VUID-vkCmdCopyImageToMemoryKHR-imageLayout-13023
  The `imageLayout` member of each element of `pCopyMemoryInfo->pRegions` must be VK_IMAGE_LAYOUT_GENERAL, VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR, or VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL

- VUID-vkCmdCopyImageToMemoryKHR-pCopyMemoryInfo-13024
  `pCopyMemoryInfo->image` must have been created with VK_IMAGE_USAGE_TRANSFER_SRC_BIT

- VUID-vkCmdCopyImageToMemoryKHR-commandBuffer-13025
  If `commandBuffer` is a protected command buffer and `protectedNoFault` is not supported, the `addressCopyFlags` member of all elements of `pCopyMemoryInfo->pRegions` must include VK_ADDRESS_COMMAND_PROTECTED_BIT_KHR

- VUID-vkCmdCopyImageToMemoryKHR-addressRange-13129
  At least one buffer containing the total address range specified by the `addressRange` member of each element of `pCopyMemoryInfo->pRegions` must have been created with VK_BUFFER_USAGE_TRANSFER_DST_BIT

Valid Usage (Implicit)

- VUID-vkCmdCopyImageToMemoryKHR-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdCopyImageToMemoryKHR-pCopyMemoryInfo-parameter
  If `pCopyMemoryInfo` is not `NULL`, `pCopyMemoryInfo` must be a valid pointer to a valid VkCopyDeviceMemoryImageInfoKHR structure

- VUID-vkCmdCopyImageToMemoryKHR-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdCopyImageToMemoryKHR-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_TRANSFER_BIT operations

- VUID-vkCmdCopyImageToMemoryKHR-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdCopyImageToMemoryKHR-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdCopyImageToMemoryKHR-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Outside | VK_QUEUE_TRANSFER_BIT | Action

Conditional Rendering

vkCmdCopyImageToMemoryKHR is not affected by conditional rendering

The `VkCopyDeviceMemoryImageInfoKHR` structure is defined as:

    // Provided by VK_KHR_device_address_commands
    typedef struct VkCopyDeviceMemoryImageInfoKHR {
        VkStructureType                      sType;
        const void*                          pNext;
        VkImage                              image;
        uint32_t                             regionCount;
        const VkDeviceMemoryImageCopyKHR*    pRegions;
    } VkCopyDeviceMemoryImageInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `image` is the base image accessed by the copy command.

- `regionCount` is the number of copies to be performed.

- `pRegions` is a pointer to an array of VkDeviceMemoryImageCopyKHR structures describing individual copy operations between two memory ranges.

Valid Usage

- VUID-VkCopyDeviceMemoryImageInfoKHR-addressRange-13026
  The range of memory backing the address range defined by the `addressRange` member of any element of `pRegions` must not overlap the memory backing the address range defined by the `addressRange` of any other element of `pRegions`

- VUID-VkCopyDeviceMemoryImageInfoKHR-addressRange-13027
  The range of memory backing the address range defined by the `addressRange` member of any element of `pRegions` must not overlap the memory backing any texels in `image` defined by the `imageSubresource`, `imageOffset`, and `imageExtent` members of any element of `pRegions`

- VUID-VkCopyDeviceMemoryImageInfoKHR-imageLayout-13028
  The `imageLayout` member of each element of `pRegions` must specify the layout of the image subresource specified for that element of `pRegions` at the time this command is executed on a VkDevice

- VUID-VkCopyDeviceMemoryImageInfoKHR-image-07966
  If `image` is non-sparse then the image or each specified disjoint plane must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-VkCopyDeviceMemoryImageInfoKHR-imageSubresource-07967
  The `imageSubresource.mipLevel` member of each element of `pRegions` must be less than the `mipLevels` specified in VkImageCreateInfo when `image` was created

- VUID-VkCopyDeviceMemoryImageInfoKHR-imageSubresource-07968
  If `imageSubresource.layerCount` is not VK_REMAINING_ARRAY_LAYERS, `imageSubresource.baseArrayLayer` + `imageSubresource.layerCount` of each element of `pRegions` must be less than or equal to the `arrayLayers` specified in VkImageCreateInfo when `image` was created

- VUID-VkCopyDeviceMemoryImageInfoKHR-image-07969
  `image` must not have been created with `flags` containing VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT

- VUID-VkCopyDeviceMemoryImageInfoKHR-image-07973
  `image` must have a sample count equal to VK_SAMPLE_COUNT_1_BIT

- VUID-VkCopyDeviceMemoryImageInfoKHR-image-07979
  If `image` is of type VK_IMAGE_TYPE_1D, then for each element of `pRegions`, `imageOffset.y` must be `0` and `imageExtent.height` must be `1`

- VUID-VkCopyDeviceMemoryImageInfoKHR-imageOffset-09104
  For each element of `pRegions`, `imageOffset.z` and (`imageExtent.depth` + `imageOffset.z`) must both be greater than or equal to `0` and less than or equal to the depth of the specified `imageSubresource` of `image`

- VUID-VkCopyDeviceMemoryImageInfoKHR-image-07980
  If `image` is of type VK_IMAGE_TYPE_1D or VK_IMAGE_TYPE_2D, then for each element of `pRegions`, `imageOffset.z` must be `0` and `imageExtent.depth` must be `1`

- VUID-VkCopyDeviceMemoryImageInfoKHR-image-07274
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR or VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR, `imageOffset.x` must be a multiple of the texel block extent width of the VkFormat of `image`

- VUID-VkCopyDeviceMemoryImageInfoKHR-imageOffset-10051
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR or VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR, and `imageOffset.x` does not equal the width of the subresource specified by `imageSubresource`, `imageOffset.x` must be a multiple of the texel block extent width of the VkFormat of `image`

- VUID-VkCopyDeviceMemoryImageInfoKHR-image-07275
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR or VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR, `imageOffset.y` must be a multiple of the texel block extent height of the VkFormat of `image`

- VUID-VkCopyDeviceMemoryImageInfoKHR-imageOffset-10052
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR or VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR, and `imageOffset.y` does not equal the height of the subresource specified by `imageSubresource`, `imageOffset.y` must be a multiple of the texel block extent height of the VkFormat of `image`

- VUID-VkCopyDeviceMemoryImageInfoKHR-image-07276
  For each element of `pRegions`, `imageOffset.z` must be a multiple of the texel block extent depth of the VkFormat of `image`

- VUID-VkCopyDeviceMemoryImageInfoKHR-image-00207
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR, the sum of `imageOffset.x` and `extent.width` does not equal the width of the subresource specified by `imageSubresource`, `extent.width` must be a multiple of the texel block extent width of the VkFormat of `image`

- VUID-VkCopyDeviceMemoryImageInfoKHR-imageOffset-10053
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR, the difference of `imageOffset.x` and `extent.height` must be a multiple of the texel block extent width of the VkFormat of `image`

- VUID-VkCopyDeviceMemoryImageInfoKHR-imageOffset-10054
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR, the difference of `imageOffset.x` and `extent.width` must be a multiple of the texel block extent width of the VkFormat of `image`

- VUID-VkCopyDeviceMemoryImageInfoKHR-imageOffset-10055
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR, the sum of `imageOffset.x` and `extent.height` does not equal the width of the subresource specified by `imageSubresource`, `extent.height` must be a multiple of the texel block extent width of the VkFormat of `image`

- VUID-VkCopyDeviceMemoryImageInfoKHR-image-00208
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR, and the sum of `imageOffset.y` and `extent.height` does not equal the height of the subresource specified by `imageSubresource`, `extent.height` must be a multiple of the texel block extent height of the VkFormat of `image`

- VUID-VkCopyDeviceMemoryImageInfoKHR-imageOffset-10056
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR, the sum of `imageOffset.y` and `extent.width` does not equal the height of the subresource specified by `imageSubresource`, `extent.width` must be a multiple of the texel block extent height of the VkFormat of `image`

- VUID-VkCopyDeviceMemoryImageInfoKHR-imageOffset-10057
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR, the difference of `imageOffset.y` and `extent.height` must be a multiple of the texel block extent height of the VkFormat of `image`

- VUID-VkCopyDeviceMemoryImageInfoKHR-imageOffset-10058
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR, the difference of `imageOffset.y` and `extent.width` must be a multiple of the texel block extent height of the VkFormat of `image`

- VUID-VkCopyDeviceMemoryImageInfoKHR-image-00209
  For each element of `pRegions`, if the sum of `imageOffset.z` and `extent.depth` does not equal the depth of the subresource specified by `srcSubresource`, `extent.depth` must be a multiple of the texel block extent depth of the VkFormat of `image`

- VUID-VkCopyDeviceMemoryImageInfoKHR-imageSubresource-09105
  For each element of `pRegions`, `imageSubresource.aspectMask` must specify aspects present in `image`

- VUID-VkCopyDeviceMemoryImageInfoKHR-image-07981
  If `image` has a multi-planar format, then for each element of `pRegions`, `imageSubresource.aspectMask` must be a single valid multi-planar aspect mask bit

- VUID-VkCopyDeviceMemoryImageInfoKHR-image-07983
  If `image` is of type VK_IMAGE_TYPE_3D, for each element of `pRegions`, `imageSubresource.baseArrayLayer` must be `0` and `imageSubresource.layerCount` must be `1`

- VUID-VkCopyDeviceMemoryImageInfoKHR-addressRowLength-09106
  For each element of `pRegions`, `addressRowLength` must be a multiple of the texel block extent width of the VkFormat of `image`

- VUID-VkCopyDeviceMemoryImageInfoKHR-addressImageHeight-09107
  For each element of `pRegions`, `addressImageHeight` must be a multiple of the texel block extent height of the VkFormat of `image`

- VUID-VkCopyDeviceMemoryImageInfoKHR-addressRowLength-09108
  For each element of `pRegions`, `addressRowLength` divided by the texel block extent width and then multiplied by the texel block size of `image` must be less than or equal to 231-1

- VUID-VkCopyDeviceMemoryImageInfoKHR-image-13029
  If `image` does not have either a depth/stencil format or a multi-planar format, then for each element of `pRegions`, `addressRange.address` must be a multiple of the texel block size

- VUID-VkCopyDeviceMemoryImageInfoKHR-image-13030
  If `image` has a multi-planar format, then for each element of `pRegions`, `addressRange.address` must be a multiple of the element size of the compatible format for the format and the `aspectMask` of the `imageSubresource` as defined in Compatible Formats of Planes of Multi-Planar Formats

- VUID-VkCopyDeviceMemoryImageInfoKHR-image-13031
  If `image` has a depth/stencil format, the `addressRange.address` member of any element of `pRegions` must be a multiple of `4`

- VUID-VkCopyDeviceMemoryImageInfoKHR-pRegions-13032
  The image region specified by each element of `pRegions` that does not contain VkCopyCommandTransformInfoQCOM in its `pNext` chain must be contained within the specified `imageSubresource` of `image`

- VUID-VkCopyDeviceMemoryImageInfoKHR-pRegions-13033
  If the image region specified by each element of `pRegions` contains VkCopyCommandTransformInfoQCOM in its `pNext` chain, the rotated image region must be contained within `image`

- VUID-VkCopyDeviceMemoryImageInfoKHR-pRegions-13034
  If any element of `pRegions` contains VkCopyCommandTransformInfoQCOM in its `pNext` chain, then `image` must have a 1x1x1 texel block extent

- VUID-VkCopyDeviceMemoryImageInfoKHR-pRegions-13035
  If any element of `pRegions` contains VkCopyCommandTransformInfoQCOM in its `pNext` chain, then `image` must be of type VK_IMAGE_TYPE_2D

- VUID-VkCopyDeviceMemoryImageInfoKHR-pRegions-13036
  If any element of `pRegions` contains VkCopyCommandTransformInfoQCOM in its `pNext` chain, then `image` must not have a multi-planar format

Valid Usage (Implicit)

- VUID-VkCopyDeviceMemoryImageInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_COPY_DEVICE_MEMORY_IMAGE_INFO_KHR

- VUID-VkCopyDeviceMemoryImageInfoKHR-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkCopyDeviceMemoryImageInfoKHR-image-parameter
  `image` must be a valid VkImage handle

- VUID-VkCopyDeviceMemoryImageInfoKHR-pRegions-parameter
  `pRegions` must be a valid pointer to an array of `regionCount` valid VkDeviceMemoryImageCopyKHR structures

- VUID-VkCopyDeviceMemoryImageInfoKHR-regionCount-arraylength
  `regionCount` must be greater than `0`

The `VkDeviceMemoryImageCopyKHR` structure is defined as:

    // Provided by VK_KHR_device_address_commands
    typedef struct VkDeviceMemoryImageCopyKHR {
        VkStructureType             sType;
        const void*                 pNext;
        VkDeviceAddressRangeKHR     addressRange;
        VkAddressCommandFlagsKHR    addressFlags;
        uint32_t                    addressRowLength;
        uint32_t                    addressImageHeight;
        VkImageSubresourceLayers    imageSubresource;
        VkImageLayout               imageLayout;
        VkOffset3D                  imageOffset;
        VkExtent3D                  imageExtent;
    } VkDeviceMemoryImageCopyKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `addressRange` is a VkDeviceAddressRangeKHR structure defining the address range accessed by the copy operation.

- `addressFlags` is a VkAddressCommandFlagsKHR value defining the copy flags for the source address range.

- `addressRowLength` specifies the total number of texels in the address range representing a row of texels in the x dimension. Each new row of pixels in the copy will be read at an offset increment by this number of texels.

- `addressImageHeight` specifies the total number of rows of texels in the address range representing a 2D slice of texels in the x and y dimensions. Each new 2D slice of pixels in the copy will be read at an offset increment by this number of rows of texels.

- `imageSubresource` is a VkImageSubresourceLayers used to specify the specific image subresources of the image used for the source or destination image data.

- `imageLayout` is the VkImageLayout of the image subresource accessed by this copy.

- `imageOffset` selects the initial `x`, `y`, `z` offsets in texels of the sub-region of the source or destination image data.

- `imageExtent` is the size in texels of the image to copy in `width`, `height` and `depth`.

This structure defines a copy operation where `srcRange.size` bytes will be copied from `srcRange.address` to `dstRange.address`.

Valid Usage

- VUID-VkDeviceMemoryImageCopyKHR-addressRange-13097
  If the range specified by `addressRange` is not bound completely to memory when accessed, `addressFlags` must not include VK_ADDRESS_COMMAND_FULLY_BOUND_BIT_KHR

- VUID-VkDeviceMemoryImageCopyKHR-addressRange-13098
  If the buffer from which the range specified by `addressRange` was created with VK_BUFFER_CREATE_PROTECTED_BIT, and `protectedNoFault` is not supported, `addressFlags` must include VK_ADDRESS_COMMAND_PROTECTED_BIT_KHR

- VUID-VkDeviceMemoryImageCopyKHR-addressRange-13099
  If the buffer from which the range specified by `addressRange` was created without VK_BUFFER_CREATE_PROTECTED_BIT, and `protectedNoFault` is not supported, `addressFlags` must not include VK_ADDRESS_COMMAND_PROTECTED_BIT_KHR

- VUID-VkDeviceMemoryImageCopyKHR-addressFlags-13100
  `addressFlags` must not include both VK_ADDRESS_COMMAND_STORAGE_BUFFER_USAGE_BIT_KHR and VK_ADDRESS_COMMAND_UNKNOWN_STORAGE_BUFFER_USAGE_BIT_KHR

- VUID-VkDeviceMemoryImageCopyKHR-addressRange-13122
  If any buffer, which is bound to a range of VkDeviceMemory that overlaps the range backing `addressRange`, was created with VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, `addressFlags` must include VK_ADDRESS_COMMAND_STORAGE_BUFFER_USAGE_BIT_KHR or VK_ADDRESS_COMMAND_UNKNOWN_STORAGE_BUFFER_USAGE_BIT_KHR

- VUID-VkDeviceMemoryImageCopyKHR-addressRange-13123
  If any buffer, which is bound to a range of VkDeviceMemory that overlaps the range backing `addressRange`, was created without VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, `addressFlags` must not include VK_ADDRESS_COMMAND_STORAGE_BUFFER_USAGE_BIT_KHR

- VUID-VkDeviceMemoryImageCopyKHR-addressFlags-13101
  `addressFlags` must not include both VK_ADDRESS_COMMAND_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR and VK_ADDRESS_COMMAND_UNKNOWN_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR

- VUID-VkDeviceMemoryImageCopyKHR-addressRange-13124
  If any buffer, which is bound to a range of VkDeviceMemory that overlaps the range backing `addressRange`, was created with VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT, `addressFlags` must include VK_ADDRESS_COMMAND_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR or VK_ADDRESS_COMMAND_UNKNOWN_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR

- VUID-VkDeviceMemoryImageCopyKHR-addressRange-13125
  If any buffer, which is bound to a range of VkDeviceMemory that overlaps the range backing `addressRange`, was created without VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT, `addressFlags` must not include VK_ADDRESS_COMMAND_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR

- VUID-VkDeviceMemoryImageCopyKHR-size-13037
  The `size` member of `addressRange` must be large enough to contain all address locations that are accessed by this copy according to Buffer and Image Addressing

- VUID-VkDeviceMemoryImageCopyKHR-addressRowLength-09101
  `addressRowLength` must be `0`, or greater than or equal to the `width` member of `imageExtent`

- VUID-VkDeviceMemoryImageCopyKHR-addressImageHeight-09102
  `addressImageHeight` must be `0`, or greater than or equal to the `height` member of `imageExtent`

- VUID-VkDeviceMemoryImageCopyKHR-aspectMask-09103
  The `aspectMask` member of `imageSubresource` must only have a single bit set

- VUID-VkDeviceMemoryImageCopyKHR-imageExtent-06659
  `imageExtent.width` must not be 0

- VUID-VkDeviceMemoryImageCopyKHR-imageExtent-06660
  `imageExtent.height` must not be 0

- VUID-VkDeviceMemoryImageCopyKHR-imageExtent-06661
  `imageExtent.depth` must not be 0

Valid Usage (Implicit)

- VUID-VkDeviceMemoryImageCopyKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DEVICE_MEMORY_IMAGE_COPY_KHR

- VUID-VkDeviceMemoryImageCopyKHR-pNext-pNext
  `pNext` must be `NULL` or a pointer to a valid instance of VkCopyCommandTransformInfoQCOM

- VUID-VkDeviceMemoryImageCopyKHR-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkDeviceMemoryImageCopyKHR-addressFlags-parameter
  `addressFlags` must be a valid combination of VkAddressCommandFlagBitsKHR values

- VUID-VkDeviceMemoryImageCopyKHR-imageSubresource-parameter
  `imageSubresource` must be a valid VkImageSubresourceLayers structure

- VUID-VkDeviceMemoryImageCopyKHR-imageLayout-parameter
  `imageLayout` must be a valid VkImageLayout value

### 26.5. Copying Data Between Buffers and Images

Data can be copied between buffers and images, enabling applications to load and store data between images and application-defined offsets in buffer memory.

When copying between an address or a buffer and an image, texels in the image and bytes in memory are accessed as follows.

Texels at each coordinate (x,y,z,layer) in the image subresource are accessed, where:

  x is in the range [`imageOffset.x`, `imageOffset.x` + `imageExtent.width`),

  y is in the range [`imageOffset.y`, `imageOffset.y` + `imageExtent.height`),

  z is in the range [`imageOffset.z`, `imageOffset.z` + `imageExtent.depth`),

  layer is in the range [`imageSubresource.baseArrayLayer`, `imageSubresource.baseArrayLayer` + `imageSubresource.layerCount`)

For each (x,y,z,layer) coordinate in the image, bytes in memory are accessed at offsets in the range [texelOffset, texelOffset + blockSize), where:

  texelOffset = baseAddress + (⌊(x - imageOffset.x) / blockWidth⌋ × blockSize) + (⌊(y - imageOffset.y) / blockHeight⌋ × rowExtent) + (⌊(z - imageOffset.z) / blockDepth⌋ × sliceExtent) + ((layer - `imageSubresource.baseArrayLayer`) × layerExtent)

  rowExtent = ⌈ max(`bufferRowLength`, `imageExtent.width`) / blockWidth ⌉ × blockSize

  sliceExtent = ⌈ max(`bufferImageHeight`, `imageExtent.height`) / blockHeight ⌉ × rowExtent

  layerExtent = ⌈ `imageExtent.depth` / blockDepth ⌉ × sliceExtent

and where blockSize, blockWidth, blockHeight, and blockDepth are the texel block size and extents of the image’s format, and baseAddress is either the supplied address for the copy, or the address of the buffer plus any supplied `bufferOffset` value.

#### Image Rotation Addressing

If a rotation is specified by VkCopyCommandTransformInfoQCOM, the 2D region of the image being addressed is rotated around the offset, and texels at each coordinate (x',y',z',layer) are accessed in the image subresource instead, where:

- If VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR is specified, no rotation is performed:

    x' is in the same range as x

    y' is in the same range as y

- If VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR is specified

    x' is in the range [`imageOffset.x` - `imageExtent.height`, `imageOffset.x`)

    y' is in the range [`imageOffset.y`, `imageOffset.y` + `imageExtent.width`)

- If VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR is specified:

    x' is in the range [`imageOffset.x` - `imageExtent.width`, `imageOffset.x`)

    y' is in the range [`imageOffset.y` - `imageExtent.height`, `imageOffset.y`)

- If VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR is specified:

    x' is in the range [`imageOffset.x`, `imageOffset.x` + `imageExtent.height`)

    y' is in the range [`imageOffset.y` - `imageExtent.width`, `imageOffset.y`)

Buffer addressing calculations are unaffected by this rotation.

When copying between a buffer and the depth or stencil aspect of an image, data in the buffer is assumed to be laid out as separate planes rather than interleaved. Addressing calculations are thus performed for a different format than the base image, according to the aspect, as described in the following table:

Table 34. Depth/Stencil Aspect Copy
Base Format | Depth Aspect Format | Stencil Aspect Format
--- | --- | ---
VK_FORMAT_D16_UNORM | VK_FORMAT_D16_UNORM | -
VK_FORMAT_X8_D24_UNORM_PACK32 | VK_FORMAT_X8_D24_UNORM_PACK32 | -
VK_FORMAT_D32_SFLOAT | VK_FORMAT_D32_SFLOAT | -
VK_FORMAT_S8_UINT | - | VK_FORMAT_S8_UINT
VK_FORMAT_D16_UNORM_S8_UINT | VK_FORMAT_D16_UNORM | VK_FORMAT_S8_UINT
VK_FORMAT_D24_UNORM_S8_UINT | VK_FORMAT_X8_D24_UNORM_PACK32 | VK_FORMAT_S8_UINT
VK_FORMAT_D32_SFLOAT_S8_UINT | VK_FORMAT_D32_SFLOAT | VK_FORMAT_S8_UINT

When copying between a buffer and any plane of a multi-planar image, addressing calculations are performed using the compatible format for that plane, rather than the format of the multi-planar image.

Each texel block is copied from one resource to the other according to the above addressing equations.

To copy data from a buffer object to an image object, call:

    // Provided by VK_VERSION_1_0
    void vkCmdCopyBufferToImage(
        VkCommandBuffer                             commandBuffer,
        VkBuffer                                    srcBuffer,
        VkImage                                     dstImage,
        VkImageLayout                               dstImageLayout,
        uint32_t                                    regionCount,
        const VkBufferImageCopy*                    pRegions);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `srcBuffer` is the source buffer.

- `dstImage` is the destination image.

- `dstImageLayout` is the layout of the destination image subresources for the copy.

- `regionCount` is the number of regions to copy.

- `pRegions` is a pointer to an array of VkBufferImageCopy structures specifying the regions to copy.

Each source region specified by `pRegions` is copied from the source buffer to the destination region of the destination image according to the addressing calculations for each resource. If any of the specified regions in `srcBuffer` overlaps in memory with any of the specified regions in `dstImage`, values read from those overlapping regions are undefined. If any region accesses a depth aspect in `dstImage` and the `VK_EXT_depth_range_unrestricted` extension is not enabled, values copied from `srcBuffer` outside of the range [0,1] will be written as undefined values to the destination image.

Copy regions for the image must be aligned to a multiple of the texel block extent in each dimension, except at the edges of the image, where region extents must match the edge of the image.

Valid Usage

- VUID-vkCmdCopyBufferToImage-dstImage-07966
  If `dstImage` is non-sparse then the image or each specified disjoint plane must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-vkCmdCopyBufferToImage-imageSubresource-07967
  The `imageSubresource.mipLevel` member of each element of `pRegions` must be less than the `mipLevels` specified in VkImageCreateInfo when `dstImage` was created

- VUID-vkCmdCopyBufferToImage-imageSubresource-07968
  If `imageSubresource.layerCount` is not VK_REMAINING_ARRAY_LAYERS, `imageSubresource.baseArrayLayer` + `imageSubresource.layerCount` of each element of `pRegions` must be less than or equal to the `arrayLayers` specified in VkImageCreateInfo when `dstImage` was created

- VUID-vkCmdCopyBufferToImage-dstImage-07969
  `dstImage` must not have been created with `flags` containing VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT

- VUID-vkCmdCopyBufferToImage-imageSubresource-07971
  For each element of `pRegions`, `imageOffset.x` and (`imageExtent.width` + `imageOffset.x`) must both be greater than or equal to `0` and less than or equal to the width of the specified `imageSubresource` of `dstImage`

- VUID-vkCmdCopyBufferToImage-imageSubresource-07972
  For each element of `pRegions`, `imageOffset.y` and (`imageExtent.height` + `imageOffset.y`) must both be greater than or equal to `0` and less than or equal to the height of the specified `imageSubresource` of `dstImage`

- VUID-vkCmdCopyBufferToImage-dstImage-07973
  `dstImage` must have a sample count equal to VK_SAMPLE_COUNT_1_BIT

- VUID-vkCmdCopyBufferToImage-commandBuffer-01828
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, `srcBuffer` must not be a protected buffer

- VUID-vkCmdCopyBufferToImage-commandBuffer-01829
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, `dstImage` must not be a protected image

- VUID-vkCmdCopyBufferToImage-commandBuffer-01830
  If `commandBuffer` is a protected command buffer and `protectedNoFault` is not supported, `dstImage` must not be an unprotected image

- VUID-vkCmdCopyBufferToImage-commandBuffer-07737
  If the `maintenance11` feature is not enabled, and the queue family used to create the VkCommandPool which `commandBuffer` was allocated from does not support VK_QUEUE_GRAPHICS_BIT or VK_QUEUE_COMPUTE_BIT, the `bufferOffset` member of any element of `pRegions` must be a multiple of `4`

- VUID-vkCmdCopyBufferToImage-imageOffset-07738
  The `imageOffset` and `imageExtent` members of each element of `pRegions` must respect the image transfer granularity requirements of `commandBuffer`’s command pool’s queue family, as described in VkQueueFamilyProperties

- VUID-vkCmdCopyBufferToImage-commandBuffer-07739
  If the queue family used to create the VkCommandPool which `commandBuffer` was allocated from does not support VK_QUEUE_GRAPHICS_BIT, and the `maintenance10` feature is not enabled, for each element of `pRegions`, the `aspectMask` member of `imageSubresource` must not be VK_IMAGE_ASPECT_DEPTH_BIT or VK_IMAGE_ASPECT_STENCIL_BIT

- VUID-vkCmdCopyBufferToImage-commandBuffer-11778
  If the queue family used to create the VkCommandPool which `commandBuffer` was allocated from does not support VK_QUEUE_GRAPHICS_BIT but does support VK_QUEUE_COMPUTE_BIT, and in any element of `pRegions` the `aspectMask` member of `imageSubresource` is VK_IMAGE_ASPECT_DEPTH_BIT, then the format features of `dstImage` must contain VK_FORMAT_FEATURE_2_DEPTH_COPY_ON_COMPUTE_QUEUE_BIT_KHR

- VUID-vkCmdCopyBufferToImage-commandBuffer-11779
  If the queue family used to create the VkCommandPool which `commandBuffer` was allocated from does not support VK_QUEUE_GRAPHICS_BIT and VK_QUEUE_COMPUTE_BIT, but does support VK_QUEUE_TRANSFER_BIT, and in any element of `pRegions` the `aspectMask` member of `imageSubresource` is VK_IMAGE_ASPECT_DEPTH_BIT, then the format features of `dstImage` must contain VK_FORMAT_FEATURE_2_DEPTH_COPY_ON_TRANSFER_QUEUE_BIT_KHR

- VUID-vkCmdCopyBufferToImage-commandBuffer-11780
  If the queue family used to create the VkCommandPool which `commandBuffer` was allocated from does not support VK_QUEUE_GRAPHICS_BIT but does support VK_QUEUE_COMPUTE_BIT, and in any element of `pRegions` the `aspectMask` member of `imageSubresource` is VK_IMAGE_ASPECT_STENCIL_BIT, then the format features of `dstImage` must contain VK_FORMAT_FEATURE_2_STENCIL_COPY_ON_COMPUTE_QUEUE_BIT_KHR

- VUID-vkCmdCopyBufferToImage-commandBuffer-11781
  If the queue family used to create the VkCommandPool which `commandBuffer` was allocated from does not support VK_QUEUE_GRAPHICS_BIT and VK_QUEUE_COMPUTE_BIT, but does support VK_QUEUE_TRANSFER_BIT, and in any element of `pRegions` the `aspectMask` member of `imageSubresource` is VK_IMAGE_ASPECT_STENCIL_BIT, then the format features of `dstImage` must contain VK_FORMAT_FEATURE_2_STENCIL_COPY_ON_TRANSFER_QUEUE_BIT_KHR

- VUID-vkCmdCopyBufferToImage-pRegions-00171
  `srcBuffer` must be large enough to contain all buffer locations that are accessed according to Buffer and Image Addressing, for each element of `pRegions`

- VUID-vkCmdCopyBufferToImage-pRegions-00173
  The union of all source regions, and the union of all destination regions, specified by the elements of `pRegions`, must not overlap in memory

- VUID-vkCmdCopyBufferToImage-srcBuffer-00174
  `srcBuffer` must have been created with the VK_BUFFER_USAGE_TRANSFER_SRC_BIT usage flag set

- VUID-vkCmdCopyBufferToImage-dstImage-01997
  The format features of `dstImage` must contain VK_FORMAT_FEATURE_TRANSFER_DST_BIT

- VUID-vkCmdCopyBufferToImage-srcBuffer-00176
  If `srcBuffer` is non-sparse then it must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-vkCmdCopyBufferToImage-dstImage-00177
  `dstImage` must have been created with the VK_IMAGE_USAGE_TRANSFER_DST_BIT usage flag set

- VUID-vkCmdCopyBufferToImage-dstImageLayout-00180
  `dstImageLayout` must specify the layout of the image subresources of `dstImage` specified in `pRegions` at the time this command is executed on a `VkDevice`

- VUID-vkCmdCopyBufferToImage-dstImageLayout-01396
  `dstImageLayout` must be VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, or VK_IMAGE_LAYOUT_GENERAL

- VUID-vkCmdCopyBufferToImage-pRegions-07931
  If VK_EXT_depth_range_unrestricted is not enabled, for each element of `pRegions` whose `imageSubresource` contains a depth aspect, the data in `srcBuffer` must be in the range [0,1]

- VUID-vkCmdCopyBufferToImage-dstImage-07979
  If `dstImage` is of type VK_IMAGE_TYPE_1D, then for each element of `pRegions`, `imageOffset.y` must be `0` and `imageExtent.height` must be `1`

- VUID-vkCmdCopyBufferToImage-imageOffset-09104
  For each element of `pRegions`, `imageOffset.z` and (`imageExtent.depth` + `imageOffset.z`) must both be greater than or equal to `0` and less than or equal to the depth of the specified `imageSubresource` of `dstImage`

- VUID-vkCmdCopyBufferToImage-dstImage-07980
  If `dstImage` is of type VK_IMAGE_TYPE_1D or VK_IMAGE_TYPE_2D, then for each element of `pRegions`, `imageOffset.z` must be `0` and `imageExtent.depth` must be `1`

- VUID-vkCmdCopyBufferToImage-dstImage-07274
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR or VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR, `imageOffset.x` must be a multiple of the texel block extent width of the VkFormat of `dstImage`

- VUID-vkCmdCopyBufferToImage-imageOffset-10051
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR or VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR, and `imageOffset.x` does not equal the width of the subresource specified by `imageSubresource`, `imageOffset.x` must be a multiple of the texel block extent width of the VkFormat of `dstImage`

- VUID-vkCmdCopyBufferToImage-dstImage-07275
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR or VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR, `imageOffset.y` must be a multiple of the texel block extent height of the VkFormat of `dstImage`

- VUID-vkCmdCopyBufferToImage-imageOffset-10052
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR or VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR, and `imageOffset.y` does not equal the height of the subresource specified by `imageSubresource`, `imageOffset.y` must be a multiple of the texel block extent height of the VkFormat of `dstImage`

- VUID-vkCmdCopyBufferToImage-dstImage-07276
  For each element of `pRegions`, `imageOffset.z` must be a multiple of the texel block extent depth of the VkFormat of `dstImage`

- VUID-vkCmdCopyBufferToImage-dstImage-00207
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR, the sum of `imageOffset.x` and `extent.width` does not equal the width of the subresource specified by `imageSubresource`, `extent.width` must be a multiple of the texel block extent width of the VkFormat of `dstImage`

- VUID-vkCmdCopyBufferToImage-imageOffset-10053
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR, the difference of `imageOffset.x` and `extent.height` must be a multiple of the texel block extent width of the VkFormat of `dstImage`

- VUID-vkCmdCopyBufferToImage-imageOffset-10054
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR, the difference of `imageOffset.x` and `extent.width` must be a multiple of the texel block extent width of the VkFormat of `dstImage`

- VUID-vkCmdCopyBufferToImage-imageOffset-10055
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR, the sum of `imageOffset.x` and `extent.height` does not equal the width of the subresource specified by `imageSubresource`, `extent.height` must be a multiple of the texel block extent width of the VkFormat of `dstImage`

- VUID-vkCmdCopyBufferToImage-dstImage-00208
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR, and the sum of `imageOffset.y` and `extent.height` does not equal the height of the subresource specified by `imageSubresource`, `extent.height` must be a multiple of the texel block extent height of the VkFormat of `dstImage`

- VUID-vkCmdCopyBufferToImage-imageOffset-10056
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR, the sum of `imageOffset.y` and `extent.width` does not equal the height of the subresource specified by `imageSubresource`, `extent.width` must be a multiple of the texel block extent height of the VkFormat of `dstImage`

- VUID-vkCmdCopyBufferToImage-imageOffset-10057
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR, the difference of `imageOffset.y` and `extent.height` must be a multiple of the texel block extent height of the VkFormat of `dstImage`

- VUID-vkCmdCopyBufferToImage-imageOffset-10058
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR, the difference of `imageOffset.y` and `extent.width` must be a multiple of the texel block extent height of the VkFormat of `dstImage`

- VUID-vkCmdCopyBufferToImage-dstImage-00209
  For each element of `pRegions`, if the sum of `imageOffset.z` and `extent.depth` does not equal the depth of the subresource specified by `srcSubresource`, `extent.depth` must be a multiple of the texel block extent depth of the VkFormat of `dstImage`

- VUID-vkCmdCopyBufferToImage-imageSubresource-09105
  For each element of `pRegions`, `imageSubresource.aspectMask` must specify aspects present in `dstImage`

- VUID-vkCmdCopyBufferToImage-dstImage-07981
  If `dstImage` has a multi-planar format, then for each element of `pRegions`, `imageSubresource.aspectMask` must be a single valid multi-planar aspect mask bit

- VUID-vkCmdCopyBufferToImage-dstImage-07983
  If `dstImage` is of type VK_IMAGE_TYPE_3D, for each element of `pRegions`, `imageSubresource.baseArrayLayer` must be `0` and `imageSubresource.layerCount` must be `1`

- VUID-vkCmdCopyBufferToImage-bufferRowLength-09106
  For each element of `pRegions`, `bufferRowLength` must be a multiple of the texel block extent width of the VkFormat of `dstImage`

- VUID-vkCmdCopyBufferToImage-bufferImageHeight-09107
  For each element of `pRegions`, `bufferImageHeight` must be a multiple of the texel block extent height of the VkFormat of `dstImage`

- VUID-vkCmdCopyBufferToImage-bufferRowLength-09108
  For each element of `pRegions`, `bufferRowLength` divided by the texel block extent width and then multiplied by the texel block size of `dstImage` must be less than or equal to 231-1

- VUID-vkCmdCopyBufferToImage-dstImage-07975
  If `dstImage` does not have either a depth/stencil format or a multi-planar format, then for each element of `pRegions`, `bufferOffset` must be a multiple of the texel block size

- VUID-vkCmdCopyBufferToImage-dstImage-07976
  If `dstImage` has a multi-planar format, then for each element of `pRegions`, `bufferOffset` must be a multiple of the element size of the compatible format for the format and the `aspectMask` of the `imageSubresource` as defined in Compatible Formats of Planes of Multi-Planar Formats

- VUID-vkCmdCopyBufferToImage-dstImage-07978
  If `dstImage` has a depth/stencil format, the `bufferOffset` member of any element of `pRegions` must be a multiple of `4`

Valid Usage (Implicit)

- VUID-vkCmdCopyBufferToImage-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdCopyBufferToImage-srcBuffer-parameter
  `srcBuffer` must be a valid VkBuffer handle

- VUID-vkCmdCopyBufferToImage-dstImage-parameter
  `dstImage` must be a valid VkImage handle

- VUID-vkCmdCopyBufferToImage-dstImageLayout-parameter
  `dstImageLayout` must be a valid VkImageLayout value

- VUID-vkCmdCopyBufferToImage-pRegions-parameter
  `pRegions` must be a valid pointer to an array of `regionCount` valid VkBufferImageCopy structures

- VUID-vkCmdCopyBufferToImage-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdCopyBufferToImage-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, VK_QUEUE_GRAPHICS_BIT, or VK_QUEUE_TRANSFER_BIT operations

- VUID-vkCmdCopyBufferToImage-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdCopyBufferToImage-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdCopyBufferToImage-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdCopyBufferToImage-regionCount-arraylength
  `regionCount` must be greater than `0`

- VUID-vkCmdCopyBufferToImage-commonparent
  Each of `commandBuffer`, `dstImage`, and `srcBuffer` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT VK_QUEUE_TRANSFER_BIT | Action

Conditional Rendering

vkCmdCopyBufferToImage is not affected by conditional rendering

To copy data from an image object to a buffer object, call:

    // Provided by VK_VERSION_1_0
    void vkCmdCopyImageToBuffer(
        VkCommandBuffer                             commandBuffer,
        VkImage                                     srcImage,
        VkImageLayout                               srcImageLayout,
        VkBuffer                                    dstBuffer,
        uint32_t                                    regionCount,
        const VkBufferImageCopy*                    pRegions);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `srcImage` is the source image.

- `srcImageLayout` is the layout of the source image subresources for the copy.

- `dstBuffer` is the destination buffer.

- `regionCount` is the number of regions to copy.

- `pRegions` is a pointer to an array of VkBufferImageCopy structures specifying the regions to copy.

Each source region specified by `pRegions` is copied from the source image to the destination region of the destination buffer according to the addressing calculations for each resource. If any of the specified regions in `srcImage` overlaps in memory with any of the specified regions in `dstBuffer`, values read from those overlapping regions are undefined.

Copy regions for the image must be aligned to a multiple of the texel block extent in each dimension, except at the edges of the image, where region extents must match the edge of the image.

Valid Usage

- VUID-vkCmdCopyImageToBuffer-srcImage-07966
  If `srcImage` is non-sparse then the image or each specified disjoint plane must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-vkCmdCopyImageToBuffer-imageSubresource-07967
  The `imageSubresource.mipLevel` member of each element of `pRegions` must be less than the `mipLevels` specified in VkImageCreateInfo when `srcImage` was created

- VUID-vkCmdCopyImageToBuffer-imageSubresource-07968
  If `imageSubresource.layerCount` is not VK_REMAINING_ARRAY_LAYERS, `imageSubresource.baseArrayLayer` + `imageSubresource.layerCount` of each element of `pRegions` must be less than or equal to the `arrayLayers` specified in VkImageCreateInfo when `srcImage` was created

- VUID-vkCmdCopyImageToBuffer-srcImage-07969
  `srcImage` must not have been created with `flags` containing VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT

- VUID-vkCmdCopyImageToBuffer-imageSubresource-07971
  For each element of `pRegions`, `imageOffset.x` and (`imageExtent.width` + `imageOffset.x`) must both be greater than or equal to `0` and less than or equal to the width of the specified `imageSubresource` of `srcImage`

- VUID-vkCmdCopyImageToBuffer-imageSubresource-07972
  For each element of `pRegions`, `imageOffset.y` and (`imageExtent.height` + `imageOffset.y`) must both be greater than or equal to `0` and less than or equal to the height of the specified `imageSubresource` of `srcImage`

- VUID-vkCmdCopyImageToBuffer-srcImage-07973
  `srcImage` must have a sample count equal to VK_SAMPLE_COUNT_1_BIT

- VUID-vkCmdCopyImageToBuffer-commandBuffer-01831
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, `srcImage` must not be a protected image

- VUID-vkCmdCopyImageToBuffer-commandBuffer-01832
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, `dstBuffer` must not be a protected buffer

- VUID-vkCmdCopyImageToBuffer-commandBuffer-01833
  If `commandBuffer` is a protected command buffer and `protectedNoFault` is not supported, `dstBuffer` must not be an unprotected buffer

- VUID-vkCmdCopyImageToBuffer-commandBuffer-07746
  If the `maintenance11` feature is not enabled, and the queue family used to create the VkCommandPool which `commandBuffer` was allocated from does not support VK_QUEUE_GRAPHICS_BIT or VK_QUEUE_COMPUTE_BIT, the `bufferOffset` member of any element of `pRegions` must be a multiple of `4`

- VUID-vkCmdCopyImageToBuffer-imageOffset-07747
  The `imageOffset` and `imageExtent` members of each element of `pRegions` must respect the image transfer granularity requirements of `commandBuffer`’s command pool’s queue family, as described in VkQueueFamilyProperties

- VUID-vkCmdCopyImageToBuffer-commandBuffer-10216
  If the queue family used to create the VkCommandPool which `commandBuffer` was allocated from does not support VK_QUEUE_GRAPHICS_BIT, and the `maintenance10` feature is not enabled, for each element of `pRegions`, the `aspectMask` member of `imageSubresource` must not be VK_IMAGE_ASPECT_DEPTH_BIT or VK_IMAGE_ASPECT_STENCIL_BIT

- VUID-vkCmdCopyImageToBuffer-commandBuffer-11790
  If the queue family used to create the VkCommandPool which `commandBuffer` was allocated from does not support VK_QUEUE_GRAPHICS_BIT but does support VK_QUEUE_COMPUTE_BIT, and in any element of `pRegions` the `aspectMask` member of `imageSubresource` is VK_IMAGE_ASPECT_DEPTH_BIT, then the format features of `srcImage` must contain VK_FORMAT_FEATURE_2_DEPTH_COPY_ON_COMPUTE_QUEUE_BIT_KHR

- VUID-vkCmdCopyImageToBuffer-commandBuffer-11791
  If the queue family used to create the VkCommandPool which `commandBuffer` was allocated from does not support VK_QUEUE_GRAPHICS_BIT and VK_QUEUE_COMPUTE_BIT, but does support VK_QUEUE_TRANSFER_BIT, and in any element of `pRegions` the `aspectMask` member of `imageSubresource` is VK_IMAGE_ASPECT_DEPTH_BIT, then the format features of `srcImage` must contain VK_FORMAT_FEATURE_2_DEPTH_COPY_ON_TRANSFER_QUEUE_BIT_KHR

- VUID-vkCmdCopyImageToBuffer-commandBuffer-11792
  If the queue family used to create the VkCommandPool which `commandBuffer` was allocated from does not support VK_QUEUE_GRAPHICS_BIT but does support VK_QUEUE_COMPUTE_BIT, and in any element of `pRegions` the `aspectMask` member of `imageSubresource` is VK_IMAGE_ASPECT_STENCIL_BIT, then the format features of `srcImage` must contain VK_FORMAT_FEATURE_2_STENCIL_COPY_ON_COMPUTE_QUEUE_BIT_KHR

- VUID-vkCmdCopyImageToBuffer-commandBuffer-11793
  If the queue family used to create the VkCommandPool which `commandBuffer` was allocated from does not support VK_QUEUE_GRAPHICS_BIT and VK_QUEUE_COMPUTE_BIT, but does support VK_QUEUE_TRANSFER_BIT, and in any element of `pRegions` the `aspectMask` member of `imageSubresource` is VK_IMAGE_ASPECT_STENCIL_BIT, then the format features of `srcImage` must contain VK_FORMAT_FEATURE_2_STENCIL_COPY_ON_TRANSFER_QUEUE_BIT_KHR

- VUID-vkCmdCopyImageToBuffer-pRegions-00183
  `dstBuffer` must be large enough to contain all buffer locations that are accessed according to Buffer and Image Addressing, for each element of `pRegions`

- VUID-vkCmdCopyImageToBuffer-pRegions-00184
  The union of all source regions, and the union of all destination regions, specified by the elements of `pRegions`, must not overlap in memory

- VUID-vkCmdCopyImageToBuffer-srcImage-00186
  `srcImage` must have been created with the VK_IMAGE_USAGE_TRANSFER_SRC_BIT usage flag set

- VUID-vkCmdCopyImageToBuffer-srcImage-01998
  The format features of `srcImage` must contain VK_FORMAT_FEATURE_TRANSFER_SRC_BIT

- VUID-vkCmdCopyImageToBuffer-dstBuffer-00191
  `dstBuffer` must have been created with the VK_BUFFER_USAGE_TRANSFER_DST_BIT usage flag set

- VUID-vkCmdCopyImageToBuffer-dstBuffer-00192
  If `dstBuffer` is non-sparse then it must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-vkCmdCopyImageToBuffer-srcImageLayout-00189
  `srcImageLayout` must specify the layout of the image subresources of `srcImage` specified in `pRegions` at the time this command is executed on a `VkDevice`

- VUID-vkCmdCopyImageToBuffer-srcImageLayout-01397
  `srcImageLayout` must be VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, or VK_IMAGE_LAYOUT_GENERAL

- VUID-vkCmdCopyImageToBuffer-srcImage-07979
  If `srcImage` is of type VK_IMAGE_TYPE_1D, then for each element of `pRegions`, `imageOffset.y` must be `0` and `imageExtent.height` must be `1`

- VUID-vkCmdCopyImageToBuffer-imageOffset-09104
  For each element of `pRegions`, `imageOffset.z` and (`imageExtent.depth` + `imageOffset.z`) must both be greater than or equal to `0` and less than or equal to the depth of the specified `imageSubresource` of `srcImage`

- VUID-vkCmdCopyImageToBuffer-srcImage-07980
  If `srcImage` is of type VK_IMAGE_TYPE_1D or VK_IMAGE_TYPE_2D, then for each element of `pRegions`, `imageOffset.z` must be `0` and `imageExtent.depth` must be `1`

- VUID-vkCmdCopyImageToBuffer-srcImage-07274
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR or VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR, `imageOffset.x` must be a multiple of the texel block extent width of the VkFormat of `srcImage`

- VUID-vkCmdCopyImageToBuffer-imageOffset-10051
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR or VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR, and `imageOffset.x` does not equal the width of the subresource specified by `imageSubresource`, `imageOffset.x` must be a multiple of the texel block extent width of the VkFormat of `srcImage`

- VUID-vkCmdCopyImageToBuffer-srcImage-07275
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR or VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR, `imageOffset.y` must be a multiple of the texel block extent height of the VkFormat of `srcImage`

- VUID-vkCmdCopyImageToBuffer-imageOffset-10052
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR or VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR, and `imageOffset.y` does not equal the height of the subresource specified by `imageSubresource`, `imageOffset.y` must be a multiple of the texel block extent height of the VkFormat of `srcImage`

- VUID-vkCmdCopyImageToBuffer-srcImage-07276
  For each element of `pRegions`, `imageOffset.z` must be a multiple of the texel block extent depth of the VkFormat of `srcImage`

- VUID-vkCmdCopyImageToBuffer-srcImage-00207
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR, the sum of `imageOffset.x` and `extent.width` does not equal the width of the subresource specified by `imageSubresource`, `extent.width` must be a multiple of the texel block extent width of the VkFormat of `srcImage`

- VUID-vkCmdCopyImageToBuffer-imageOffset-10053
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR, the difference of `imageOffset.x` and `extent.height` must be a multiple of the texel block extent width of the VkFormat of `srcImage`

- VUID-vkCmdCopyImageToBuffer-imageOffset-10054
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR, the difference of `imageOffset.x` and `extent.width` must be a multiple of the texel block extent width of the VkFormat of `srcImage`

- VUID-vkCmdCopyImageToBuffer-imageOffset-10055
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR, the sum of `imageOffset.x` and `extent.height` does not equal the width of the subresource specified by `imageSubresource`, `extent.height` must be a multiple of the texel block extent width of the VkFormat of `srcImage`

- VUID-vkCmdCopyImageToBuffer-srcImage-00208
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR, and the sum of `imageOffset.y` and `extent.height` does not equal the height of the subresource specified by `imageSubresource`, `extent.height` must be a multiple of the texel block extent height of the VkFormat of `srcImage`

- VUID-vkCmdCopyImageToBuffer-imageOffset-10056
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR, the sum of `imageOffset.y` and `extent.width` does not equal the height of the subresource specified by `imageSubresource`, `extent.width` must be a multiple of the texel block extent height of the VkFormat of `srcImage`

- VUID-vkCmdCopyImageToBuffer-imageOffset-10057
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR, the difference of `imageOffset.y` and `extent.height` must be a multiple of the texel block extent height of the VkFormat of `srcImage`

- VUID-vkCmdCopyImageToBuffer-imageOffset-10058
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR, the difference of `imageOffset.y` and `extent.width` must be a multiple of the texel block extent height of the VkFormat of `srcImage`

- VUID-vkCmdCopyImageToBuffer-srcImage-00209
  For each element of `pRegions`, if the sum of `imageOffset.z` and `extent.depth` does not equal the depth of the subresource specified by `srcSubresource`, `extent.depth` must be a multiple of the texel block extent depth of the VkFormat of `srcImage`

- VUID-vkCmdCopyImageToBuffer-imageSubresource-09105
  For each element of `pRegions`, `imageSubresource.aspectMask` must specify aspects present in `srcImage`

- VUID-vkCmdCopyImageToBuffer-srcImage-07981
  If `srcImage` has a multi-planar format, then for each element of `pRegions`, `imageSubresource.aspectMask` must be a single valid multi-planar aspect mask bit

- VUID-vkCmdCopyImageToBuffer-srcImage-07983
  If `srcImage` is of type VK_IMAGE_TYPE_3D, for each element of `pRegions`, `imageSubresource.baseArrayLayer` must be `0` and `imageSubresource.layerCount` must be `1`

- VUID-vkCmdCopyImageToBuffer-bufferRowLength-09106
  For each element of `pRegions`, `bufferRowLength` must be a multiple of the texel block extent width of the VkFormat of `srcImage`

- VUID-vkCmdCopyImageToBuffer-bufferImageHeight-09107
  For each element of `pRegions`, `bufferImageHeight` must be a multiple of the texel block extent height of the VkFormat of `srcImage`

- VUID-vkCmdCopyImageToBuffer-bufferRowLength-09108
  For each element of `pRegions`, `bufferRowLength` divided by the texel block extent width and then multiplied by the texel block size of `srcImage` must be less than or equal to 231-1

- VUID-vkCmdCopyImageToBuffer-srcImage-07975
  If `srcImage` does not have either a depth/stencil format or a multi-planar format, then for each element of `pRegions`, `bufferOffset` must be a multiple of the texel block size

- VUID-vkCmdCopyImageToBuffer-srcImage-07976
  If `srcImage` has a multi-planar format, then for each element of `pRegions`, `bufferOffset` must be a multiple of the element size of the compatible format for the format and the `aspectMask` of the `imageSubresource` as defined in Compatible Formats of Planes of Multi-Planar Formats

- VUID-vkCmdCopyImageToBuffer-srcImage-07978
  If `srcImage` has a depth/stencil format, the `bufferOffset` member of any element of `pRegions` must be a multiple of `4`

Valid Usage (Implicit)

- VUID-vkCmdCopyImageToBuffer-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdCopyImageToBuffer-srcImage-parameter
  `srcImage` must be a valid VkImage handle

- VUID-vkCmdCopyImageToBuffer-srcImageLayout-parameter
  `srcImageLayout` must be a valid VkImageLayout value

- VUID-vkCmdCopyImageToBuffer-dstBuffer-parameter
  `dstBuffer` must be a valid VkBuffer handle

- VUID-vkCmdCopyImageToBuffer-pRegions-parameter
  `pRegions` must be a valid pointer to an array of `regionCount` valid VkBufferImageCopy structures

- VUID-vkCmdCopyImageToBuffer-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdCopyImageToBuffer-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, VK_QUEUE_GRAPHICS_BIT, or VK_QUEUE_TRANSFER_BIT operations

- VUID-vkCmdCopyImageToBuffer-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdCopyImageToBuffer-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdCopyImageToBuffer-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdCopyImageToBuffer-regionCount-arraylength
  `regionCount` must be greater than `0`

- VUID-vkCmdCopyImageToBuffer-commonparent
  Each of `commandBuffer`, `dstBuffer`, and `srcImage` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT VK_QUEUE_TRANSFER_BIT | Action

Conditional Rendering

vkCmdCopyImageToBuffer is not affected by conditional rendering

For both vkCmdCopyBufferToImage and vkCmdCopyImageToBuffer, each element of `pRegions` is a structure defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkBufferImageCopy {
        VkDeviceSize                bufferOffset;
        uint32_t                    bufferRowLength;
        uint32_t                    bufferImageHeight;
        VkImageSubresourceLayers    imageSubresource;
        VkOffset3D                  imageOffset;
        VkExtent3D                  imageExtent;
    } VkBufferImageCopy;

- `bufferOffset` is the offset in bytes from the start of the buffer object where the image data is copied from or to.

- `bufferRowLength` and `bufferImageHeight` specify in texels a subregion of a larger two- or three-dimensional image in buffer memory, and control the addressing calculations. If either of these values is zero, that aspect of the buffer memory is considered to be tightly packed according to the `imageExtent`.

- `imageSubresource` is a VkImageSubresourceLayers used to specify the specific image subresources of the image used for the source or destination image data.

- `imageOffset` selects the initial `x`, `y`, `z` offsets in texels of the sub-region of the source or destination image data.

- `imageExtent` is the size in texels of the image to copy in `width`, `height` and `depth`.

Valid Usage

- VUID-VkBufferImageCopy-bufferRowLength-09101
  `bufferRowLength` must be `0`, or greater than or equal to the `width` member of `imageExtent`

- VUID-VkBufferImageCopy-bufferImageHeight-09102
  `bufferImageHeight` must be `0`, or greater than or equal to the `height` member of `imageExtent`

- VUID-VkBufferImageCopy-aspectMask-09103
  The `aspectMask` member of `imageSubresource` must only have a single bit set

- VUID-VkBufferImageCopy-imageExtent-06659
  `imageExtent.width` must not be 0

- VUID-VkBufferImageCopy-imageExtent-06660
  `imageExtent.height` must not be 0

- VUID-VkBufferImageCopy-imageExtent-06661
  `imageExtent.depth` must not be 0

Valid Usage (Implicit)

- VUID-VkBufferImageCopy-imageSubresource-parameter
  `imageSubresource` must be a valid VkImageSubresourceLayers structure

More extensible versions of the commands to copy between buffers and images are defined below.

To copy data from a buffer object to an image object, call:

    // Provided by VK_VERSION_1_3
    void vkCmdCopyBufferToImage2(
        VkCommandBuffer                             commandBuffer,
        const VkCopyBufferToImageInfo2*             pCopyBufferToImageInfo);

    // Provided by VK_KHR_copy_commands2
    // Equivalent to vkCmdCopyBufferToImage2
    void vkCmdCopyBufferToImage2KHR(
        VkCommandBuffer                             commandBuffer,
        const VkCopyBufferToImageInfo2*             pCopyBufferToImageInfo);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `pCopyBufferToImageInfo` is a pointer to a VkCopyBufferToImageInfo2 structure describing the copy parameters.

This command is functionally identical to vkCmdCopyBufferToImage, but includes extensible sub-structures that include `sType` and `pNext` parameters, allowing them to be more easily extended.

Valid Usage

- VUID-vkCmdCopyBufferToImage2-commandBuffer-01828
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, `srcBuffer` must not be a protected buffer

- VUID-vkCmdCopyBufferToImage2-commandBuffer-01829
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, `dstImage` must not be a protected image

- VUID-vkCmdCopyBufferToImage2-commandBuffer-01830
  If `commandBuffer` is a protected command buffer and `protectedNoFault` is not supported, `dstImage` must not be an unprotected image

- VUID-vkCmdCopyBufferToImage2-commandBuffer-07737
  If the `maintenance11` feature is not enabled, and the queue family used to create the VkCommandPool which `commandBuffer` was allocated from does not support VK_QUEUE_GRAPHICS_BIT or VK_QUEUE_COMPUTE_BIT, the `bufferOffset` member of any element of `pCopyBufferToImageInfo->pRegions` must be a multiple of `4`

- VUID-vkCmdCopyBufferToImage2-imageOffset-07738
  The `imageOffset` and `imageExtent` members of each element of `pCopyBufferToImageInfo->pRegions` must respect the image transfer granularity requirements of `commandBuffer`’s command pool’s queue family, as described in VkQueueFamilyProperties

- VUID-vkCmdCopyBufferToImage2-commandBuffer-07739
  If the queue family used to create the VkCommandPool which `commandBuffer` was allocated from does not support VK_QUEUE_GRAPHICS_BIT, and the `maintenance10` feature is not enabled, for each element of `pCopyBufferToImageInfo->pRegions`, the `aspectMask` member of `imageSubresource` must not be VK_IMAGE_ASPECT_DEPTH_BIT or VK_IMAGE_ASPECT_STENCIL_BIT

- VUID-vkCmdCopyBufferToImage2-commandBuffer-11778
  If the queue family used to create the VkCommandPool which `commandBuffer` was allocated from does not support VK_QUEUE_GRAPHICS_BIT but does support VK_QUEUE_COMPUTE_BIT, and in any element of `pCopyBufferToImageInfo->pRegions` the `aspectMask` member of `imageSubresource` is VK_IMAGE_ASPECT_DEPTH_BIT, then the format features of `dstImage` must contain VK_FORMAT_FEATURE_2_DEPTH_COPY_ON_COMPUTE_QUEUE_BIT_KHR

- VUID-vkCmdCopyBufferToImage2-commandBuffer-11779
  If the queue family used to create the VkCommandPool which `commandBuffer` was allocated from does not support VK_QUEUE_GRAPHICS_BIT and VK_QUEUE_COMPUTE_BIT, but does support VK_QUEUE_TRANSFER_BIT, and in any element of `pCopyBufferToImageInfo->pRegions` the `aspectMask` member of `imageSubresource` is VK_IMAGE_ASPECT_DEPTH_BIT, then the format features of `dstImage` must contain VK_FORMAT_FEATURE_2_DEPTH_COPY_ON_TRANSFER_QUEUE_BIT_KHR

- VUID-vkCmdCopyBufferToImage2-commandBuffer-11780
  If the queue family used to create the VkCommandPool which `commandBuffer` was allocated from does not support VK_QUEUE_GRAPHICS_BIT but does support VK_QUEUE_COMPUTE_BIT, and in any element of `pCopyBufferToImageInfo->pRegions` the `aspectMask` member of `imageSubresource` is VK_IMAGE_ASPECT_STENCIL_BIT, then the format features of `dstImage` must contain VK_FORMAT_FEATURE_2_STENCIL_COPY_ON_COMPUTE_QUEUE_BIT_KHR

- VUID-vkCmdCopyBufferToImage2-commandBuffer-11781
  If the queue family used to create the VkCommandPool which `commandBuffer` was allocated from does not support VK_QUEUE_GRAPHICS_BIT and VK_QUEUE_COMPUTE_BIT, but does support VK_QUEUE_TRANSFER_BIT, and in any element of `pCopyBufferToImageInfo->pRegions` the `aspectMask` member of `imageSubresource` is VK_IMAGE_ASPECT_STENCIL_BIT, then the format features of `dstImage` must contain VK_FORMAT_FEATURE_2_STENCIL_COPY_ON_TRANSFER_QUEUE_BIT_KHR

Valid Usage (Implicit)

- VUID-vkCmdCopyBufferToImage2-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdCopyBufferToImage2-pCopyBufferToImageInfo-parameter
  `pCopyBufferToImageInfo` must be a valid pointer to a valid VkCopyBufferToImageInfo2 structure

- VUID-vkCmdCopyBufferToImage2-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdCopyBufferToImage2-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, VK_QUEUE_GRAPHICS_BIT, or VK_QUEUE_TRANSFER_BIT operations

- VUID-vkCmdCopyBufferToImage2-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdCopyBufferToImage2-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdCopyBufferToImage2-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT VK_QUEUE_TRANSFER_BIT | Action

Conditional Rendering

vkCmdCopyBufferToImage2 is not affected by conditional rendering

The `VkCopyBufferToImageInfo2` structure is defined as:

    // Provided by VK_VERSION_1_3
    typedef struct VkCopyBufferToImageInfo2 {
        VkStructureType              sType;
        const void*                  pNext;
        VkBuffer                     srcBuffer;
        VkImage                      dstImage;
        VkImageLayout                dstImageLayout;
        uint32_t                     regionCount;
        const VkBufferImageCopy2*    pRegions;
    } VkCopyBufferToImageInfo2;

    // Provided by VK_KHR_copy_commands2
    // Equivalent to VkCopyBufferToImageInfo2
    typedef VkCopyBufferToImageInfo2 VkCopyBufferToImageInfo2KHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `srcBuffer` is the source buffer.

- `dstImage` is the destination image.

- `dstImageLayout` is the layout of the destination image subresources for the copy.

- `regionCount` is the number of regions to copy.

- `pRegions` is a pointer to an array of VkBufferImageCopy2 structures specifying the regions to copy.

Valid Usage

- VUID-VkCopyBufferToImageInfo2-pRegions-04565
  The image region specified by each element of `pRegions` that does not contain VkCopyCommandTransformInfoQCOM in its `pNext` chain must be contained within the specified `imageSubresource` of `dstImage`

- VUID-VkCopyBufferToImageInfo2KHR-pRegions-04554
  If the image region specified by each element of `pRegions` contains VkCopyCommandTransformInfoQCOM in its `pNext` chain, the rotated destination region must be contained within `dstImage`

- VUID-VkCopyBufferToImageInfo2KHR-pRegions-04555
  If any element of `pRegions` contains VkCopyCommandTransformInfoQCOM in its `pNext` chain, then `dstImage` must have a 1x1x1 texel block extent

- VUID-VkCopyBufferToImageInfo2KHR-pRegions-06203
  If any element of `pRegions` contains VkCopyCommandTransformInfoQCOM in its `pNext` chain, then `dstImage` must be of type VK_IMAGE_TYPE_2D

- VUID-VkCopyBufferToImageInfo2KHR-pRegions-06204
  If any element of `pRegions` contains VkCopyCommandTransformInfoQCOM in its `pNext` chain, then `dstImage` must not have a multi-planar format

- VUID-VkCopyBufferToImageInfo2-pRegions-00171
  `srcBuffer` must be large enough to contain all buffer locations that are accessed according to Buffer and Image Addressing, for each element of `pRegions`

- VUID-VkCopyBufferToImageInfo2-pRegions-00173
  The union of all source regions, and the union of all destination regions, specified by the elements of `pRegions`, must not overlap in memory

- VUID-VkCopyBufferToImageInfo2-srcBuffer-00174
  `srcBuffer` must have been created with the VK_BUFFER_USAGE_TRANSFER_SRC_BIT usage flag set

- VUID-VkCopyBufferToImageInfo2-dstImage-01997
  The format features of `dstImage` must contain VK_FORMAT_FEATURE_TRANSFER_DST_BIT

- VUID-VkCopyBufferToImageInfo2-srcBuffer-00176
  If `srcBuffer` is non-sparse then it must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-VkCopyBufferToImageInfo2-dstImage-00177
  `dstImage` must have been created with the VK_IMAGE_USAGE_TRANSFER_DST_BIT usage flag set

- VUID-VkCopyBufferToImageInfo2-dstImageLayout-00180
  `dstImageLayout` must specify the layout of the image subresources of `dstImage` specified in `pRegions` at the time this command is executed on a `VkDevice`

- VUID-VkCopyBufferToImageInfo2-dstImageLayout-01396
  `dstImageLayout` must be VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, or VK_IMAGE_LAYOUT_GENERAL

- VUID-VkCopyBufferToImageInfo2-pRegions-07931
  If VK_EXT_depth_range_unrestricted is not enabled, for each element of `pRegions` whose `imageSubresource` contains a depth aspect, the data in `srcBuffer` must be in the range [0,1]

- VUID-VkCopyBufferToImageInfo2-dstImage-07966
  If `dstImage` is non-sparse then the image or each specified disjoint plane must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-VkCopyBufferToImageInfo2-imageSubresource-07967
  The `imageSubresource.mipLevel` member of each element of `pRegions` must be less than the `mipLevels` specified in VkImageCreateInfo when `dstImage` was created

- VUID-VkCopyBufferToImageInfo2-imageSubresource-07968
  If `imageSubresource.layerCount` is not VK_REMAINING_ARRAY_LAYERS, `imageSubresource.baseArrayLayer` + `imageSubresource.layerCount` of each element of `pRegions` must be less than or equal to the `arrayLayers` specified in VkImageCreateInfo when `dstImage` was created

- VUID-VkCopyBufferToImageInfo2-dstImage-07969
  `dstImage` must not have been created with `flags` containing VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT

- VUID-VkCopyBufferToImageInfo2-dstImage-07973
  `dstImage` must have a sample count equal to VK_SAMPLE_COUNT_1_BIT

- VUID-VkCopyBufferToImageInfo2-dstImage-07979
  If `dstImage` is of type VK_IMAGE_TYPE_1D, then for each element of `pRegions`, `imageOffset.y` must be `0` and `imageExtent.height` must be `1`

- VUID-VkCopyBufferToImageInfo2-imageOffset-09104
  For each element of `pRegions`, `imageOffset.z` and (`imageExtent.depth` + `imageOffset.z`) must both be greater than or equal to `0` and less than or equal to the depth of the specified `imageSubresource` of `dstImage`

- VUID-VkCopyBufferToImageInfo2-dstImage-07980
  If `dstImage` is of type VK_IMAGE_TYPE_1D or VK_IMAGE_TYPE_2D, then for each element of `pRegions`, `imageOffset.z` must be `0` and `imageExtent.depth` must be `1`

- VUID-VkCopyBufferToImageInfo2-dstImage-07274
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR or VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR, `imageOffset.x` must be a multiple of the texel block extent width of the VkFormat of `dstImage`

- VUID-VkCopyBufferToImageInfo2-imageOffset-10051
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR or VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR, and `imageOffset.x` does not equal the width of the subresource specified by `imageSubresource`, `imageOffset.x` must be a multiple of the texel block extent width of the VkFormat of `dstImage`

- VUID-VkCopyBufferToImageInfo2-dstImage-07275
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR or VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR, `imageOffset.y` must be a multiple of the texel block extent height of the VkFormat of `dstImage`

- VUID-VkCopyBufferToImageInfo2-imageOffset-10052
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR or VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR, and `imageOffset.y` does not equal the height of the subresource specified by `imageSubresource`, `imageOffset.y` must be a multiple of the texel block extent height of the VkFormat of `dstImage`

- VUID-VkCopyBufferToImageInfo2-dstImage-07276
  For each element of `pRegions`, `imageOffset.z` must be a multiple of the texel block extent depth of the VkFormat of `dstImage`

- VUID-VkCopyBufferToImageInfo2-dstImage-00207
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR, the sum of `imageOffset.x` and `extent.width` does not equal the width of the subresource specified by `imageSubresource`, `extent.width` must be a multiple of the texel block extent width of the VkFormat of `dstImage`

- VUID-VkCopyBufferToImageInfo2-imageOffset-10053
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR, the difference of `imageOffset.x` and `extent.height` must be a multiple of the texel block extent width of the VkFormat of `dstImage`

- VUID-VkCopyBufferToImageInfo2-imageOffset-10054
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR, the difference of `imageOffset.x` and `extent.width` must be a multiple of the texel block extent width of the VkFormat of `dstImage`

- VUID-VkCopyBufferToImageInfo2-imageOffset-10055
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR, the sum of `imageOffset.x` and `extent.height` does not equal the width of the subresource specified by `imageSubresource`, `extent.height` must be a multiple of the texel block extent width of the VkFormat of `dstImage`

- VUID-VkCopyBufferToImageInfo2-dstImage-00208
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR, and the sum of `imageOffset.y` and `extent.height` does not equal the height of the subresource specified by `imageSubresource`, `extent.height` must be a multiple of the texel block extent height of the VkFormat of `dstImage`

- VUID-VkCopyBufferToImageInfo2-imageOffset-10056
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR, the sum of `imageOffset.y` and `extent.width` does not equal the height of the subresource specified by `imageSubresource`, `extent.width` must be a multiple of the texel block extent height of the VkFormat of `dstImage`

- VUID-VkCopyBufferToImageInfo2-imageOffset-10057
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR, the difference of `imageOffset.y` and `extent.height` must be a multiple of the texel block extent height of the VkFormat of `dstImage`

- VUID-VkCopyBufferToImageInfo2-imageOffset-10058
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR, the difference of `imageOffset.y` and `extent.width` must be a multiple of the texel block extent height of the VkFormat of `dstImage`

- VUID-VkCopyBufferToImageInfo2-dstImage-00209
  For each element of `pRegions`, if the sum of `imageOffset.z` and `extent.depth` does not equal the depth of the subresource specified by `srcSubresource`, `extent.depth` must be a multiple of the texel block extent depth of the VkFormat of `dstImage`

- VUID-VkCopyBufferToImageInfo2-imageSubresource-09105
  For each element of `pRegions`, `imageSubresource.aspectMask` must specify aspects present in `dstImage`

- VUID-VkCopyBufferToImageInfo2-dstImage-07981
  If `dstImage` has a multi-planar format, then for each element of `pRegions`, `imageSubresource.aspectMask` must be a single valid multi-planar aspect mask bit

- VUID-VkCopyBufferToImageInfo2-dstImage-07983
  If `dstImage` is of type VK_IMAGE_TYPE_3D, for each element of `pRegions`, `imageSubresource.baseArrayLayer` must be `0` and `imageSubresource.layerCount` must be `1`

- VUID-VkCopyBufferToImageInfo2-bufferRowLength-09106
  For each element of `pRegions`, `bufferRowLength` must be a multiple of the texel block extent width of the VkFormat of `dstImage`

- VUID-VkCopyBufferToImageInfo2-bufferImageHeight-09107
  For each element of `pRegions`, `bufferImageHeight` must be a multiple of the texel block extent height of the VkFormat of `dstImage`

- VUID-VkCopyBufferToImageInfo2-bufferRowLength-09108
  For each element of `pRegions`, `bufferRowLength` divided by the texel block extent width and then multiplied by the texel block size of `dstImage` must be less than or equal to 231-1

- VUID-VkCopyBufferToImageInfo2-dstImage-07975
  If `dstImage` does not have either a depth/stencil format or a multi-planar format, then for each element of `pRegions`, `bufferOffset` must be a multiple of the texel block size

- VUID-VkCopyBufferToImageInfo2-dstImage-07976
  If `dstImage` has a multi-planar format, then for each element of `pRegions`, `bufferOffset` must be a multiple of the element size of the compatible format for the format and the `aspectMask` of the `imageSubresource` as defined in Compatible Formats of Planes of Multi-Planar Formats

- VUID-VkCopyBufferToImageInfo2-dstImage-07978
  If `dstImage` has a depth/stencil format, the `bufferOffset` member of any element of `pRegions` must be a multiple of `4`

- VUID-VkCopyBufferToImageInfo2-pRegions-06223
  For each element of `pRegions` not containing `VkCopyCommandTransformInfoQCOM` in its `pNext` chain, `imageOffset.x` and (`imageExtent.width` + `imageOffset.x`) must both be greater than or equal to `0` and less than or equal to the width of the specified `imageSubresource` of `dstImage`

- VUID-VkCopyBufferToImageInfo2-pRegions-06224
  For each element of `pRegions` not containing `VkCopyCommandTransformInfoQCOM` in its `pNext` chain, `imageOffset.y` and (`imageExtent.height` + `imageOffset.y`) must both be greater than or equal to `0` and less than or equal to the height of the specified `imageSubresource` of `dstImage`

Valid Usage (Implicit)

- VUID-VkCopyBufferToImageInfo2-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_COPY_BUFFER_TO_IMAGE_INFO_2

- VUID-VkCopyBufferToImageInfo2-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkCopyBufferToImageInfo2-srcBuffer-parameter
  `srcBuffer` must be a valid VkBuffer handle

- VUID-VkCopyBufferToImageInfo2-dstImage-parameter
  `dstImage` must be a valid VkImage handle

- VUID-VkCopyBufferToImageInfo2-dstImageLayout-parameter
  `dstImageLayout` must be a valid VkImageLayout value

- VUID-VkCopyBufferToImageInfo2-pRegions-parameter
  `pRegions` must be a valid pointer to an array of `regionCount` valid VkBufferImageCopy2 structures

- VUID-VkCopyBufferToImageInfo2-regionCount-arraylength
  `regionCount` must be greater than `0`

- VUID-VkCopyBufferToImageInfo2-commonparent
  Both of `dstImage`, and `srcBuffer` must have been created, allocated, or retrieved from the same VkDevice

To copy data from an image object to a buffer object, call:

    // Provided by VK_VERSION_1_3
    void vkCmdCopyImageToBuffer2(
        VkCommandBuffer                             commandBuffer,
        const VkCopyImageToBufferInfo2*             pCopyImageToBufferInfo);

    // Provided by VK_KHR_copy_commands2
    // Equivalent to vkCmdCopyImageToBuffer2
    void vkCmdCopyImageToBuffer2KHR(
        VkCommandBuffer                             commandBuffer,
        const VkCopyImageToBufferInfo2*             pCopyImageToBufferInfo);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `pCopyImageToBufferInfo` is a pointer to a VkCopyImageToBufferInfo2 structure describing the copy parameters.

This command is functionally identical to vkCmdCopyImageToBuffer, but includes extensible sub-structures that include `sType` and `pNext` parameters, allowing them to be more easily extended.

Valid Usage

- VUID-vkCmdCopyImageToBuffer2-commandBuffer-01831
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, `srcImage` must not be a protected image

- VUID-vkCmdCopyImageToBuffer2-commandBuffer-01832
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, `dstBuffer` must not be a protected buffer

- VUID-vkCmdCopyImageToBuffer2-commandBuffer-01833
  If `commandBuffer` is a protected command buffer and `protectedNoFault` is not supported, `dstBuffer` must not be an unprotected buffer

- VUID-vkCmdCopyImageToBuffer2-commandBuffer-07746
  If the `maintenance11` feature is not enabled, and the queue family used to create the VkCommandPool which `commandBuffer` was allocated from does not support VK_QUEUE_GRAPHICS_BIT or VK_QUEUE_COMPUTE_BIT, the `bufferOffset` member of any element of `pCopyImageToBufferInfo->pRegions` must be a multiple of `4`

- VUID-vkCmdCopyImageToBuffer2-imageOffset-07747
  The `imageOffset` and `imageExtent` members of each element of `pCopyImageToBufferInfo->pRegions` must respect the image transfer granularity requirements of `commandBuffer`’s command pool’s queue family, as described in VkQueueFamilyProperties

- VUID-vkCmdCopyImageToBuffer2-commandBuffer-10216
  If the queue family used to create the VkCommandPool which `commandBuffer` was allocated from does not support VK_QUEUE_GRAPHICS_BIT, and the `maintenance10` feature is not enabled, for each element of `pCopyImageToBufferInfo->pRegions`, the `aspectMask` member of `imageSubresource` must not be VK_IMAGE_ASPECT_DEPTH_BIT or VK_IMAGE_ASPECT_STENCIL_BIT

- VUID-vkCmdCopyImageToBuffer2-commandBuffer-11790
  If the queue family used to create the VkCommandPool which `commandBuffer` was allocated from does not support VK_QUEUE_GRAPHICS_BIT but does support VK_QUEUE_COMPUTE_BIT, and in any element of `pCopyImageToBufferInfo->pRegions` the `aspectMask` member of `imageSubresource` is VK_IMAGE_ASPECT_DEPTH_BIT, then the format features of `srcImage` must contain VK_FORMAT_FEATURE_2_DEPTH_COPY_ON_COMPUTE_QUEUE_BIT_KHR

- VUID-vkCmdCopyImageToBuffer2-commandBuffer-11791
  If the queue family used to create the VkCommandPool which `commandBuffer` was allocated from does not support VK_QUEUE_GRAPHICS_BIT and VK_QUEUE_COMPUTE_BIT, but does support VK_QUEUE_TRANSFER_BIT, and in any element of `pCopyImageToBufferInfo->pRegions` the `aspectMask` member of `imageSubresource` is VK_IMAGE_ASPECT_DEPTH_BIT, then the format features of `srcImage` must contain VK_FORMAT_FEATURE_2_DEPTH_COPY_ON_TRANSFER_QUEUE_BIT_KHR

- VUID-vkCmdCopyImageToBuffer2-commandBuffer-11792
  If the queue family used to create the VkCommandPool which `commandBuffer` was allocated from does not support VK_QUEUE_GRAPHICS_BIT but does support VK_QUEUE_COMPUTE_BIT, and in any element of `pCopyImageToBufferInfo->pRegions` the `aspectMask` member of `imageSubresource` is VK_IMAGE_ASPECT_STENCIL_BIT, then the format features of `srcImage` must contain VK_FORMAT_FEATURE_2_STENCIL_COPY_ON_COMPUTE_QUEUE_BIT_KHR

- VUID-vkCmdCopyImageToBuffer2-commandBuffer-11793
  If the queue family used to create the VkCommandPool which `commandBuffer` was allocated from does not support VK_QUEUE_GRAPHICS_BIT and VK_QUEUE_COMPUTE_BIT, but does support VK_QUEUE_TRANSFER_BIT, and in any element of `pCopyImageToBufferInfo->pRegions` the `aspectMask` member of `imageSubresource` is VK_IMAGE_ASPECT_STENCIL_BIT, then the format features of `srcImage` must contain VK_FORMAT_FEATURE_2_STENCIL_COPY_ON_TRANSFER_QUEUE_BIT_KHR

Valid Usage (Implicit)

- VUID-vkCmdCopyImageToBuffer2-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdCopyImageToBuffer2-pCopyImageToBufferInfo-parameter
  `pCopyImageToBufferInfo` must be a valid pointer to a valid VkCopyImageToBufferInfo2 structure

- VUID-vkCmdCopyImageToBuffer2-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdCopyImageToBuffer2-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, VK_QUEUE_GRAPHICS_BIT, or VK_QUEUE_TRANSFER_BIT operations

- VUID-vkCmdCopyImageToBuffer2-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdCopyImageToBuffer2-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdCopyImageToBuffer2-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT VK_QUEUE_TRANSFER_BIT | Action

Conditional Rendering

vkCmdCopyImageToBuffer2 is not affected by conditional rendering

The `VkCopyImageToBufferInfo2` structure is defined as:

    // Provided by VK_VERSION_1_3
    typedef struct VkCopyImageToBufferInfo2 {
        VkStructureType              sType;
        const void*                  pNext;
        VkImage                      srcImage;
        VkImageLayout                srcImageLayout;
        VkBuffer                     dstBuffer;
        uint32_t                     regionCount;
        const VkBufferImageCopy2*    pRegions;
    } VkCopyImageToBufferInfo2;

    // Provided by VK_KHR_copy_commands2
    // Equivalent to VkCopyImageToBufferInfo2
    typedef VkCopyImageToBufferInfo2 VkCopyImageToBufferInfo2KHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `srcImage` is the source image.

- `srcImageLayout` is the layout of the source image subresources for the copy.

- `dstBuffer` is the destination buffer.

- `regionCount` is the number of regions to copy.

- `pRegions` is a pointer to an array of VkBufferImageCopy2 structures specifying the regions to copy.

Valid Usage

- VUID-VkCopyImageToBufferInfo2-pRegions-04566
  The image region specified by each element of `pRegions` that does not contain VkCopyCommandTransformInfoQCOM in its `pNext` chain must be contained within the specified `imageSubresource` of `srcImage`

- VUID-VkCopyImageToBufferInfo2KHR-pRegions-04557
  If the image region specified by each element of `pRegions` contains VkCopyCommandTransformInfoQCOM in its `pNext` chain, the rotated source region must be contained within `srcImage`

- VUID-VkCopyImageToBufferInfo2KHR-pRegions-04558
  If any element of `pRegions` contains VkCopyCommandTransformInfoQCOM in its `pNext` chain, then `srcImage` must have a 1x1x1 texel block extent

- VUID-VkCopyImageToBufferInfo2KHR-pRegions-06205
  If any element of `pRegions` contains VkCopyCommandTransformInfoQCOM in its `pNext` chain, then `srcImage` must be of type VK_IMAGE_TYPE_2D

- VUID-VkCopyImageToBufferInfo2KHR-pRegions-06206
  If any element of `pRegions` contains VkCopyCommandTransformInfoQCOM in its `pNext` chain, then `srcImage` must not have a multi-planar format

- VUID-VkCopyImageToBufferInfo2-pRegions-00183
  `dstBuffer` must be large enough to contain all buffer locations that are accessed according to Buffer and Image Addressing, for each element of `pRegions`

- VUID-VkCopyImageToBufferInfo2-pRegions-00184
  The union of all source regions, and the union of all destination regions, specified by the elements of `pRegions`, must not overlap in memory

- VUID-VkCopyImageToBufferInfo2-srcImage-00186
  `srcImage` must have been created with the VK_IMAGE_USAGE_TRANSFER_SRC_BIT usage flag set

- VUID-VkCopyImageToBufferInfo2-srcImage-01998
  The format features of `srcImage` must contain VK_FORMAT_FEATURE_TRANSFER_SRC_BIT

- VUID-VkCopyImageToBufferInfo2-dstBuffer-00191
  `dstBuffer` must have been created with the VK_BUFFER_USAGE_TRANSFER_DST_BIT usage flag set

- VUID-VkCopyImageToBufferInfo2-dstBuffer-00192
  If `dstBuffer` is non-sparse then it must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-VkCopyImageToBufferInfo2-srcImageLayout-00189
  `srcImageLayout` must specify the layout of the image subresources of `srcImage` specified in `pRegions` at the time this command is executed on a `VkDevice`

- VUID-VkCopyImageToBufferInfo2-srcImageLayout-01397
  `srcImageLayout` must be VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, or VK_IMAGE_LAYOUT_GENERAL

- VUID-VkCopyImageToBufferInfo2-srcImage-07966
  If `srcImage` is non-sparse then the image or each specified disjoint plane must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-VkCopyImageToBufferInfo2-imageSubresource-07967
  The `imageSubresource.mipLevel` member of each element of `pRegions` must be less than the `mipLevels` specified in VkImageCreateInfo when `srcImage` was created

- VUID-VkCopyImageToBufferInfo2-imageSubresource-07968
  If `imageSubresource.layerCount` is not VK_REMAINING_ARRAY_LAYERS, `imageSubresource.baseArrayLayer` + `imageSubresource.layerCount` of each element of `pRegions` must be less than or equal to the `arrayLayers` specified in VkImageCreateInfo when `srcImage` was created

- VUID-VkCopyImageToBufferInfo2-srcImage-07969
  `srcImage` must not have been created with `flags` containing VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT

- VUID-VkCopyImageToBufferInfo2-srcImage-07973
  `srcImage` must have a sample count equal to VK_SAMPLE_COUNT_1_BIT

- VUID-VkCopyImageToBufferInfo2-srcImage-07979
  If `srcImage` is of type VK_IMAGE_TYPE_1D, then for each element of `pRegions`, `imageOffset.y` must be `0` and `imageExtent.height` must be `1`

- VUID-VkCopyImageToBufferInfo2-imageOffset-09104
  For each element of `pRegions`, `imageOffset.z` and (`imageExtent.depth` + `imageOffset.z`) must both be greater than or equal to `0` and less than or equal to the depth of the specified `imageSubresource` of `srcImage`

- VUID-VkCopyImageToBufferInfo2-srcImage-07980
  If `srcImage` is of type VK_IMAGE_TYPE_1D or VK_IMAGE_TYPE_2D, then for each element of `pRegions`, `imageOffset.z` must be `0` and `imageExtent.depth` must be `1`

- VUID-VkCopyImageToBufferInfo2-srcImage-07274
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR or VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR, `imageOffset.x` must be a multiple of the texel block extent width of the VkFormat of `srcImage`

- VUID-VkCopyImageToBufferInfo2-imageOffset-10051
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR or VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR, and `imageOffset.x` does not equal the width of the subresource specified by `imageSubresource`, `imageOffset.x` must be a multiple of the texel block extent width of the VkFormat of `srcImage`

- VUID-VkCopyImageToBufferInfo2-srcImage-07275
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR or VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR, `imageOffset.y` must be a multiple of the texel block extent height of the VkFormat of `srcImage`

- VUID-VkCopyImageToBufferInfo2-imageOffset-10052
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR or VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR, and `imageOffset.y` does not equal the height of the subresource specified by `imageSubresource`, `imageOffset.y` must be a multiple of the texel block extent height of the VkFormat of `srcImage`

- VUID-VkCopyImageToBufferInfo2-srcImage-07276
  For each element of `pRegions`, `imageOffset.z` must be a multiple of the texel block extent depth of the VkFormat of `srcImage`

- VUID-VkCopyImageToBufferInfo2-srcImage-00207
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR, the sum of `imageOffset.x` and `extent.width` does not equal the width of the subresource specified by `imageSubresource`, `extent.width` must be a multiple of the texel block extent width of the VkFormat of `srcImage`

- VUID-VkCopyImageToBufferInfo2-imageOffset-10053
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR, the difference of `imageOffset.x` and `extent.height` must be a multiple of the texel block extent width of the VkFormat of `srcImage`

- VUID-VkCopyImageToBufferInfo2-imageOffset-10054
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR, the difference of `imageOffset.x` and `extent.width` must be a multiple of the texel block extent width of the VkFormat of `srcImage`

- VUID-VkCopyImageToBufferInfo2-imageOffset-10055
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR, the sum of `imageOffset.x` and `extent.height` does not equal the width of the subresource specified by `imageSubresource`, `extent.height` must be a multiple of the texel block extent width of the VkFormat of `srcImage`

- VUID-VkCopyImageToBufferInfo2-srcImage-00208
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR, and the sum of `imageOffset.y` and `extent.height` does not equal the height of the subresource specified by `imageSubresource`, `extent.height` must be a multiple of the texel block extent height of the VkFormat of `srcImage`

- VUID-VkCopyImageToBufferInfo2-imageOffset-10056
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR, the sum of `imageOffset.y` and `extent.width` does not equal the height of the subresource specified by `imageSubresource`, `extent.width` must be a multiple of the texel block extent height of the VkFormat of `srcImage`

- VUID-VkCopyImageToBufferInfo2-imageOffset-10057
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR, the difference of `imageOffset.y` and `extent.height` must be a multiple of the texel block extent height of the VkFormat of `srcImage`

- VUID-VkCopyImageToBufferInfo2-imageOffset-10058
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR, the difference of `imageOffset.y` and `extent.width` must be a multiple of the texel block extent height of the VkFormat of `srcImage`

- VUID-VkCopyImageToBufferInfo2-srcImage-00209
  For each element of `pRegions`, if the sum of `imageOffset.z` and `extent.depth` does not equal the depth of the subresource specified by `srcSubresource`, `extent.depth` must be a multiple of the texel block extent depth of the VkFormat of `srcImage`

- VUID-VkCopyImageToBufferInfo2-imageSubresource-09105
  For each element of `pRegions`, `imageSubresource.aspectMask` must specify aspects present in `srcImage`

- VUID-VkCopyImageToBufferInfo2-srcImage-07981
  If `srcImage` has a multi-planar format, then for each element of `pRegions`, `imageSubresource.aspectMask` must be a single valid multi-planar aspect mask bit

- VUID-VkCopyImageToBufferInfo2-srcImage-07983
  If `srcImage` is of type VK_IMAGE_TYPE_3D, for each element of `pRegions`, `imageSubresource.baseArrayLayer` must be `0` and `imageSubresource.layerCount` must be `1`

- VUID-VkCopyImageToBufferInfo2-bufferRowLength-09106
  For each element of `pRegions`, `bufferRowLength` must be a multiple of the texel block extent width of the VkFormat of `srcImage`

- VUID-VkCopyImageToBufferInfo2-bufferImageHeight-09107
  For each element of `pRegions`, `bufferImageHeight` must be a multiple of the texel block extent height of the VkFormat of `srcImage`

- VUID-VkCopyImageToBufferInfo2-bufferRowLength-09108
  For each element of `pRegions`, `bufferRowLength` divided by the texel block extent width and then multiplied by the texel block size of `srcImage` must be less than or equal to 231-1

- VUID-VkCopyImageToBufferInfo2-srcImage-07975
  If `srcImage` does not have either a depth/stencil format or a multi-planar format, then for each element of `pRegions`, `bufferOffset` must be a multiple of the texel block size

- VUID-VkCopyImageToBufferInfo2-srcImage-07976
  If `srcImage` has a multi-planar format, then for each element of `pRegions`, `bufferOffset` must be a multiple of the element size of the compatible format for the format and the `aspectMask` of the `imageSubresource` as defined in Compatible Formats of Planes of Multi-Planar Formats

- VUID-VkCopyImageToBufferInfo2-srcImage-07978
  If `srcImage` has a depth/stencil format, the `bufferOffset` member of any element of `pRegions` must be a multiple of `4`

- VUID-VkCopyImageToBufferInfo2-imageOffset-00197
  For each element of `pRegions` not containing `VkCopyCommandTransformInfoQCOM` in its `pNext` chain, `imageOffset.x` and (`imageExtent.width` + `imageOffset.x`) must both be greater than or equal to `0` and less than or equal to the width of the specified `imageSubresource` of `srcImage`

- VUID-VkCopyImageToBufferInfo2-imageOffset-00198
  For each element of `pRegions` not containing `VkCopyCommandTransformInfoQCOM` in its `pNext` chain, `imageOffset.y` and (`imageExtent.height` + `imageOffset.y`) must both be greater than or equal to `0` and less than or equal to the height of the specified `imageSubresource` of `srcImage`

Valid Usage (Implicit)

- VUID-VkCopyImageToBufferInfo2-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_COPY_IMAGE_TO_BUFFER_INFO_2

- VUID-VkCopyImageToBufferInfo2-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkCopyImageToBufferInfo2-srcImage-parameter
  `srcImage` must be a valid VkImage handle

- VUID-VkCopyImageToBufferInfo2-srcImageLayout-parameter
  `srcImageLayout` must be a valid VkImageLayout value

- VUID-VkCopyImageToBufferInfo2-dstBuffer-parameter
  `dstBuffer` must be a valid VkBuffer handle

- VUID-VkCopyImageToBufferInfo2-pRegions-parameter
  `pRegions` must be a valid pointer to an array of `regionCount` valid VkBufferImageCopy2 structures

- VUID-VkCopyImageToBufferInfo2-regionCount-arraylength
  `regionCount` must be greater than `0`

- VUID-VkCopyImageToBufferInfo2-commonparent
  Both of `dstBuffer`, and `srcImage` must have been created, allocated, or retrieved from the same VkDevice

For both vkCmdCopyBufferToImage2 and vkCmdCopyImageToBuffer2, each element of `pRegions` is a structure defined as:

    // Provided by VK_VERSION_1_3
    typedef struct VkBufferImageCopy2 {
        VkStructureType             sType;
        const void*                 pNext;
        VkDeviceSize                bufferOffset;
        uint32_t                    bufferRowLength;
        uint32_t                    bufferImageHeight;
        VkImageSubresourceLayers    imageSubresource;
        VkOffset3D                  imageOffset;
        VkExtent3D                  imageExtent;
    } VkBufferImageCopy2;

    // Provided by VK_KHR_copy_commands2
    // Equivalent to VkBufferImageCopy2
    typedef VkBufferImageCopy2 VkBufferImageCopy2KHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `bufferOffset` is the offset in bytes from the start of the buffer object where the image data is copied from or to.

- `bufferRowLength` and `bufferImageHeight` specify in texels a subregion of a larger two- or three-dimensional image in buffer memory, and control the addressing calculations. If either of these values is zero, that aspect of the buffer memory is considered to be tightly packed according to the `imageExtent`.

- `imageSubresource` is a VkImageSubresourceLayers used to specify the specific image subresources of the image used for the source or destination image data.

- `imageOffset` selects the initial `x`, `y`, `z` offsets in texels of the sub-region of the source or destination image data.

- `imageExtent` is the size in texels of the image to copy in `width`, `height` and `depth`.

This structure is functionally identical to VkBufferImageCopy, but adds `sType` and `pNext` parameters, allowing it to be more easily extended.

Valid Usage

- VUID-VkBufferImageCopy2-bufferRowLength-09101
  `bufferRowLength` must be `0`, or greater than or equal to the `width` member of `imageExtent`

- VUID-VkBufferImageCopy2-bufferImageHeight-09102
  `bufferImageHeight` must be `0`, or greater than or equal to the `height` member of `imageExtent`

- VUID-VkBufferImageCopy2-aspectMask-09103
  The `aspectMask` member of `imageSubresource` must only have a single bit set

- VUID-VkBufferImageCopy2-imageExtent-06659
  `imageExtent.width` must not be 0

- VUID-VkBufferImageCopy2-imageExtent-06660
  `imageExtent.height` must not be 0

- VUID-VkBufferImageCopy2-imageExtent-06661
  `imageExtent.depth` must not be 0

Valid Usage (Implicit)

- VUID-VkBufferImageCopy2-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_BUFFER_IMAGE_COPY_2

- VUID-VkBufferImageCopy2-pNext-pNext
  `pNext` must be `NULL` or a pointer to a valid instance of VkCopyCommandTransformInfoQCOM

- VUID-VkBufferImageCopy2-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkBufferImageCopy2-imageSubresource-parameter
  `imageSubresource` must be a valid VkImageSubresourceLayers structure

The `VkCopyCommandTransformInfoQCOM` structure is defined as:

    // Provided by VK_QCOM_rotated_copy_commands
    typedef struct VkCopyCommandTransformInfoQCOM {
        VkStructureType                  sType;
        const void*                      pNext;
        VkSurfaceTransformFlagBitsKHR    transform;
    } VkCopyCommandTransformInfoQCOM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `transform` is a VkSurfaceTransformFlagBitsKHR value describing the transform to be applied.

Including this structure in the `pNext` chain of VkBufferImageCopy2 defines a rotation to be performed when copying between an image and a buffer. Including this structure in the `pNext` chain of VkBlitImageInfo2 defines a rotation to be performed when blitting between two images. If this structure is not specified in either case, the implementation behaves as if it was specified with a `transform` equal to VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR.

Specifying a transform for a copy between an image and a buffer rotates the region accessed in the image around the offset. Specifying a transform for a blit performs a similar transform as described in Image Blits with Scaling and Rotation.

Rotations other than VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR can only be specified for single-plane 2D images with a 1x1x1 texel block extent.

Valid Usage

- VUID-VkCopyCommandTransformInfoQCOM-transform-04560
  `transform` must be VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR, VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR, VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR, or VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR

Valid Usage (Implicit)

- VUID-VkCopyCommandTransformInfoQCOM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_COPY_COMMAND_TRANSFORM_INFO_QCOM

Structure Chaining

Extends the structures

  - VkBufferImageCopy2

  - VkDeviceMemoryImageCopyKHR

  - VkImageBlit2

The following commands can be used to copy between host memory and images. Bytes in host memory and texels in images are accessed as specified in Copying Data Between Buffers and Images, with buffers replaced with host memory.

Note | Copies to and from an image on the host are not internally synchronized. Simultaneous access (involving writes) to overlapping image memory on the host constitutes a data race.

To copy data from host memory to an image object, call:

    // Provided by VK_VERSION_1_4
    VkResult vkCopyMemoryToImage(
        VkDevice                                    device,
        const VkCopyMemoryToImageInfo*              pCopyMemoryToImageInfo);

    // Provided by VK_EXT_host_image_copy
    // Equivalent to vkCopyMemoryToImage
    VkResult vkCopyMemoryToImageEXT(
        VkDevice                                    device,
        const VkCopyMemoryToImageInfo*              pCopyMemoryToImageInfo);

- `device` is the device which owns `pCopyMemoryToImageInfo->dstImage`.

- `pCopyMemoryToImageInfo` is a pointer to a VkCopyMemoryToImageInfo structure describing the copy parameters.

This command is functionally similar to vkCmdCopyBufferToImage2, except it is executed on the host and reads from host memory instead of a buffer. The memory of `pCopyMemoryToImageInfo->dstImage` is accessed by the host as if coherent.

Note | Because queue submissions automatically make host memory visible to the device, there would not be a need for a memory barrier before using the results of this copy operation on the device.

Valid Usage (Implicit)

- VUID-vkCopyMemoryToImage-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkCopyMemoryToImage-pCopyMemoryToImageInfo-parameter
  `pCopyMemoryToImageInfo` must be a valid pointer to a valid VkCopyMemoryToImageInfo structure

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_INITIALIZATION_FAILED

  - VK_ERROR_MEMORY_MAP_FAILED

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkCopyMemoryToImageInfo` structure is defined as:

    // Provided by VK_VERSION_1_4
    typedef struct VkCopyMemoryToImageInfo {
        VkStructureType               sType;
        const void*                   pNext;
        VkHostImageCopyFlags          flags;
        VkImage                       dstImage;
        VkImageLayout                 dstImageLayout;
        uint32_t                      regionCount;
        const VkMemoryToImageCopy*    pRegions;
    } VkCopyMemoryToImageInfo;

    // Provided by VK_EXT_host_image_copy
    // Equivalent to VkCopyMemoryToImageInfo
    typedef VkCopyMemoryToImageInfo VkCopyMemoryToImageInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask of VkHostImageCopyFlagBits values describing additional copy parameters.

- `dstImage` is the destination image.

- `dstImageLayout` is the layout of the destination image subresources for the copy.

- `regionCount` is the number of regions to copy.

- `pRegions` is a pointer to an array of VkMemoryToImageCopy structures specifying the regions to copy.

`vkCopyMemoryToImage` does not check whether the device memory associated with `dstImage` is currently in use before performing the copy. The application must guarantee that any previously submitted command that reads from or writes to the copy regions has completed before the host performs the copy.

Copy regions for the image must be aligned to a multiple of the texel block extent in each dimension, except at the edges of the image, where region extents must match the edge of the image.

Valid Usage

- VUID-VkCopyMemoryToImageInfo-dstImage-09109
  If `dstImage` is sparse then all memory ranges accessed by the copy command must be bound as described in Binding Resource Memory

- VUID-VkCopyMemoryToImageInfo-dstImage-09111
  If the stencil aspect of `dstImage` is accessed, and `dstImage` was not created with separate stencil usage, `dstImage` must have been created with the VK_IMAGE_USAGE_HOST_TRANSFER_BIT usage flag set

- VUID-VkCopyMemoryToImageInfo-dstImage-09112
  If the stencil aspect of `dstImage` is accessed, and `dstImage` was created with separate stencil usage, `dstImage` must have been created with the VK_IMAGE_USAGE_HOST_TRANSFER_BIT usage flag set

- VUID-VkCopyMemoryToImageInfo-dstImage-09113
  If non-stencil aspects of `dstImage` are accessed, `dstImage` must have been created with the VK_IMAGE_USAGE_HOST_TRANSFER_BIT usage flag set

- VUID-VkCopyMemoryToImageInfo-imageOffset-09114
  If `flags` contains VK_HOST_IMAGE_COPY_MEMCPY_BIT, the `x`, `y`, and `z` members of the `imageOffset` member of each element of `pRegions` must be `0`

- VUID-VkCopyMemoryToImageInfo-dstImage-09115
  If `flags` contains VK_HOST_IMAGE_COPY_MEMCPY_BIT, the `imageExtent` member of each element of `pRegions` must equal the extents of `dstImage` identified by `imageSubresource`

- VUID-VkCopyMemoryToImageInfo-dstImage-07966
  If `dstImage` is non-sparse then the image or each specified disjoint plane must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-VkCopyMemoryToImageInfo-imageSubresource-07967
  The `imageSubresource.mipLevel` member of each element of `pRegions` must be less than the `mipLevels` specified in VkImageCreateInfo when `dstImage` was created

- VUID-VkCopyMemoryToImageInfo-imageSubresource-07968
  If `imageSubresource.layerCount` is not VK_REMAINING_ARRAY_LAYERS, `imageSubresource.baseArrayLayer` + `imageSubresource.layerCount` of each element of `pRegions` must be less than or equal to the `arrayLayers` specified in VkImageCreateInfo when `dstImage` was created

- VUID-VkCopyMemoryToImageInfo-dstImage-07969
  `dstImage` must not have been created with `flags` containing VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT

- VUID-VkCopyMemoryToImageInfo-imageSubresource-07971
  For each element of `pRegions`, `imageOffset.x` and (`imageExtent.width` + `imageOffset.x`) must both be greater than or equal to `0` and less than or equal to the width of the specified `imageSubresource` of `dstImage`

- VUID-VkCopyMemoryToImageInfo-imageSubresource-07972
  For each element of `pRegions`, `imageOffset.y` and (`imageExtent.height` + `imageOffset.y`) must both be greater than or equal to `0` and less than or equal to the height of the specified `imageSubresource` of `dstImage`

- VUID-VkCopyMemoryToImageInfo-dstImage-07973
  `dstImage` must have a sample count equal to VK_SAMPLE_COUNT_1_BIT

- VUID-VkCopyMemoryToImageInfo-dstImage-07979
  If `dstImage` is of type VK_IMAGE_TYPE_1D, then for each element of `pRegions`, `imageOffset.y` must be `0` and `imageExtent.height` must be `1`

- VUID-VkCopyMemoryToImageInfo-imageOffset-09104
  For each element of `pRegions`, `imageOffset.z` and (`imageExtent.depth` + `imageOffset.z`) must both be greater than or equal to `0` and less than or equal to the depth of the specified `imageSubresource` of `dstImage`

- VUID-VkCopyMemoryToImageInfo-dstImage-07980
  If `dstImage` is of type VK_IMAGE_TYPE_1D or VK_IMAGE_TYPE_2D, then for each element of `pRegions`, `imageOffset.z` must be `0` and `imageExtent.depth` must be `1`

- VUID-VkCopyMemoryToImageInfo-dstImage-07274
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR or VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR, `imageOffset.x` must be a multiple of the texel block extent width of the VkFormat of `dstImage`

- VUID-VkCopyMemoryToImageInfo-imageOffset-10051
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR or VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR, and `imageOffset.x` does not equal the width of the subresource specified by `imageSubresource`, `imageOffset.x` must be a multiple of the texel block extent width of the VkFormat of `dstImage`

- VUID-VkCopyMemoryToImageInfo-dstImage-07275
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR or VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR, `imageOffset.y` must be a multiple of the texel block extent height of the VkFormat of `dstImage`

- VUID-VkCopyMemoryToImageInfo-imageOffset-10052
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR or VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR, and `imageOffset.y` does not equal the height of the subresource specified by `imageSubresource`, `imageOffset.y` must be a multiple of the texel block extent height of the VkFormat of `dstImage`

- VUID-VkCopyMemoryToImageInfo-dstImage-07276
  For each element of `pRegions`, `imageOffset.z` must be a multiple of the texel block extent depth of the VkFormat of `dstImage`

- VUID-VkCopyMemoryToImageInfo-dstImage-00207
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR, the sum of `imageOffset.x` and `extent.width` does not equal the width of the subresource specified by `imageSubresource`, `extent.width` must be a multiple of the texel block extent width of the VkFormat of `dstImage`

- VUID-VkCopyMemoryToImageInfo-imageOffset-10053
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR, the difference of `imageOffset.x` and `extent.height` must be a multiple of the texel block extent width of the VkFormat of `dstImage`

- VUID-VkCopyMemoryToImageInfo-imageOffset-10054
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR, the difference of `imageOffset.x` and `extent.width` must be a multiple of the texel block extent width of the VkFormat of `dstImage`

- VUID-VkCopyMemoryToImageInfo-imageOffset-10055
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR, the sum of `imageOffset.x` and `extent.height` does not equal the width of the subresource specified by `imageSubresource`, `extent.height` must be a multiple of the texel block extent width of the VkFormat of `dstImage`

- VUID-VkCopyMemoryToImageInfo-dstImage-00208
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR, and the sum of `imageOffset.y` and `extent.height` does not equal the height of the subresource specified by `imageSubresource`, `extent.height` must be a multiple of the texel block extent height of the VkFormat of `dstImage`

- VUID-VkCopyMemoryToImageInfo-imageOffset-10056
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR, the sum of `imageOffset.y` and `extent.width` does not equal the height of the subresource specified by `imageSubresource`, `extent.width` must be a multiple of the texel block extent height of the VkFormat of `dstImage`

- VUID-VkCopyMemoryToImageInfo-imageOffset-10057
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR, the difference of `imageOffset.y` and `extent.height` must be a multiple of the texel block extent height of the VkFormat of `dstImage`

- VUID-VkCopyMemoryToImageInfo-imageOffset-10058
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR, the difference of `imageOffset.y` and `extent.width` must be a multiple of the texel block extent height of the VkFormat of `dstImage`

- VUID-VkCopyMemoryToImageInfo-dstImage-00209
  For each element of `pRegions`, if the sum of `imageOffset.z` and `extent.depth` does not equal the depth of the subresource specified by `srcSubresource`, `extent.depth` must be a multiple of the texel block extent depth of the VkFormat of `dstImage`

- VUID-VkCopyMemoryToImageInfo-imageSubresource-09105
  For each element of `pRegions`, `imageSubresource.aspectMask` must specify aspects present in `dstImage`

- VUID-VkCopyMemoryToImageInfo-dstImage-07981
  If `dstImage` has a multi-planar format, then for each element of `pRegions`, `imageSubresource.aspectMask` must be a single valid multi-planar aspect mask bit

- VUID-VkCopyMemoryToImageInfo-dstImage-07983
  If `dstImage` is of type VK_IMAGE_TYPE_3D, for each element of `pRegions`, `imageSubresource.baseArrayLayer` must be `0` and `imageSubresource.layerCount` must be `1`

- VUID-VkCopyMemoryToImageInfo-memoryRowLength-09106
  For each element of `pRegions`, `memoryRowLength` must be a multiple of the texel block extent width of the VkFormat of `dstImage`

- VUID-VkCopyMemoryToImageInfo-memoryImageHeight-09107
  For each element of `pRegions`, `memoryImageHeight` must be a multiple of the texel block extent height of the VkFormat of `dstImage`

- VUID-VkCopyMemoryToImageInfo-memoryRowLength-09108
  For each element of `pRegions`, `memoryRowLength` divided by the texel block extent width and then multiplied by the texel block size of `dstImage` must be less than or equal to 231-1

- VUID-VkCopyMemoryToImageInfo-dstImageLayout-09059
  `dstImageLayout` must specify the current layout of the image subresources of `dstImage` specified in `pRegions`

- VUID-VkCopyMemoryToImageInfo-dstImageLayout-09060
  `dstImageLayout` must be one of the image layouts returned in VkPhysicalDeviceHostImageCopyProperties::`pCopyDstLayouts`

- VUID-VkCopyMemoryToImageInfo-flags-09393
  If `flags` includes VK_HOST_IMAGE_COPY_MEMCPY_BIT, for each region in `pRegions`, `memoryRowLength` and `memoryImageHeight` must both be 0

Valid Usage (Implicit)

- VUID-VkCopyMemoryToImageInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_COPY_MEMORY_TO_IMAGE_INFO

- VUID-VkCopyMemoryToImageInfo-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkCopyMemoryToImageInfo-flags-parameter
  `flags` must be a valid combination of VkHostImageCopyFlagBits values

- VUID-VkCopyMemoryToImageInfo-dstImage-parameter
  `dstImage` must be a valid VkImage handle

- VUID-VkCopyMemoryToImageInfo-dstImageLayout-parameter
  `dstImageLayout` must be a valid VkImageLayout value

- VUID-VkCopyMemoryToImageInfo-pRegions-parameter
  `pRegions` must be a valid pointer to an array of `regionCount` valid VkMemoryToImageCopy structures

- VUID-VkCopyMemoryToImageInfo-regionCount-arraylength
  `regionCount` must be greater than `0`

Each element of VkCopyMemoryToImageInfo::`pRegions` is a structure defined as:

    // Provided by VK_VERSION_1_4
    typedef struct VkMemoryToImageCopy {
        VkStructureType             sType;
        const void*                 pNext;
        const void*                 pHostPointer;
        uint32_t                    memoryRowLength;
        uint32_t                    memoryImageHeight;
        VkImageSubresourceLayers    imageSubresource;
        VkOffset3D                  imageOffset;
        VkExtent3D                  imageExtent;
    } VkMemoryToImageCopy;

    // Provided by VK_EXT_host_image_copy
    // Equivalent to VkMemoryToImageCopy
    typedef VkMemoryToImageCopy VkMemoryToImageCopyEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `pHostPointer` is the host memory address which is the source of the copy.

- `memoryRowLength` and `memoryImageHeight` specify in texels a subregion of a larger two- or three-dimensional image in host memory, and control the addressing calculations. If either of these values is zero, that aspect of the host memory is considered to be tightly packed according to the `imageExtent`.

- `imageSubresource` is a VkImageSubresourceLayers used to specify the specific image subresources of the image used for the source or destination image data.

- `imageOffset` selects the initial `x`, `y`, `z` offsets in texels of the sub-region of the destination image data.

- `imageExtent` is the size in texels of the image to copy in `width`, `height` and `depth`.

This structure is functionally similar to VkBufferImageCopy2, except it defines host memory as the source of copy instead of a buffer. In particular, the same data packing rules and restrictions as that structure apply here as well.

Valid Usage

- VUID-VkMemoryToImageCopy-pHostPointer-09061
  `pHostPointer` must point to memory that is large enough to contain all memory locations that are accessed according to Buffer and Image Addressing, for each element of `pRegions`

- VUID-VkMemoryToImageCopy-pRegions-09062
  The union of all source regions, and the union of all destination regions, specified by the elements of `pRegions`, must not overlap in memory

- VUID-VkMemoryToImageCopy-memoryRowLength-09101
  `memoryRowLength` must be `0`, or greater than or equal to the `width` member of `imageExtent`

- VUID-VkMemoryToImageCopy-memoryImageHeight-09102
  `memoryImageHeight` must be `0`, or greater than or equal to the `height` member of `imageExtent`

- VUID-VkMemoryToImageCopy-aspectMask-09103
  The `aspectMask` member of `imageSubresource` must only have a single bit set

- VUID-VkMemoryToImageCopy-imageExtent-06659
  `imageExtent.width` must not be 0

- VUID-VkMemoryToImageCopy-imageExtent-06660
  `imageExtent.height` must not be 0

- VUID-VkMemoryToImageCopy-imageExtent-06661
  `imageExtent.depth` must not be 0

Valid Usage (Implicit)

- VUID-VkMemoryToImageCopy-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_MEMORY_TO_IMAGE_COPY

- VUID-VkMemoryToImageCopy-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkMemoryToImageCopy-pHostPointer-parameter
  `pHostPointer` must be a pointer value

- VUID-VkMemoryToImageCopy-imageSubresource-parameter
  `imageSubresource` must be a valid VkImageSubresourceLayers structure

To copy data from an image object to host memory, call:

    // Provided by VK_VERSION_1_4
    VkResult vkCopyImageToMemory(
        VkDevice                                    device,
        const VkCopyImageToMemoryInfo*              pCopyImageToMemoryInfo);

    // Provided by VK_EXT_host_image_copy
    // Equivalent to vkCopyImageToMemory
    VkResult vkCopyImageToMemoryEXT(
        VkDevice                                    device,
        const VkCopyImageToMemoryInfo*              pCopyImageToMemoryInfo);

- `device` is the device which owns `pCopyImageToMemoryInfo->srcImage`.

- `pCopyImageToMemoryInfo` is a pointer to a VkCopyImageToMemoryInfo structure describing the copy parameters.

This command is functionally similar to vkCmdCopyImageToBuffer2, except it is executed on the host and writes to host memory instead of a buffer. The memory of `pCopyImageToMemoryInfo->srcImage` is accessed by the host as if coherent.

Note | If the device has written to the image memory, it is not automatically made available to the host. Before this copy command can be called, a memory barrier for this image must have been issued on the device with the second synchronization scope including VK_PIPELINE_STAGE_HOST_BIT and VK_ACCESS_HOST_READ_BIT.

Valid Usage (Implicit)

- VUID-vkCopyImageToMemory-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkCopyImageToMemory-pCopyImageToMemoryInfo-parameter
  `pCopyImageToMemoryInfo` must be a valid pointer to a valid VkCopyImageToMemoryInfo structure

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_INITIALIZATION_FAILED

  - VK_ERROR_MEMORY_MAP_FAILED

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkCopyImageToMemoryInfo` structure is defined as:

    // Provided by VK_VERSION_1_4
    typedef struct VkCopyImageToMemoryInfo {
        VkStructureType               sType;
        const void*                   pNext;
        VkHostImageCopyFlags          flags;
        VkImage                       srcImage;
        VkImageLayout                 srcImageLayout;
        uint32_t                      regionCount;
        const VkImageToMemoryCopy*    pRegions;
    } VkCopyImageToMemoryInfo;

    // Provided by VK_EXT_host_image_copy
    // Equivalent to VkCopyImageToMemoryInfo
    typedef VkCopyImageToMemoryInfo VkCopyImageToMemoryInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask of VkHostImageCopyFlagBits values describing additional copy parameters.

- `srcImage` is the source image.

- `srcImageLayout` is the layout of the source image subresources for the copy.

- `regionCount` is the number of regions to copy.

- `pRegions` is a pointer to an array of VkImageToMemoryCopy structures specifying the regions to copy.

`vkCopyImageToMemory` does not check whether the device memory associated with `srcImage` is currently in use before performing the copy. The application must guarantee that any previously submitted command that writes to the copy regions has completed before the host performs the copy.

Copy regions for the image must be aligned to a multiple of the texel block extent in each dimension, except at the edges of the image, where region extents must match the edge of the image.

Valid Usage

- VUID-VkCopyImageToMemoryInfo-srcImage-09109
  If `srcImage` is sparse then all memory ranges accessed by the copy command must be bound as described in Binding Resource Memory

- VUID-VkCopyImageToMemoryInfo-srcImage-09111
  If the stencil aspect of `srcImage` is accessed, and `srcImage` was not created with separate stencil usage, `srcImage` must have been created with the VK_IMAGE_USAGE_HOST_TRANSFER_BIT usage flag set

- VUID-VkCopyImageToMemoryInfo-srcImage-09112
  If the stencil aspect of `srcImage` is accessed, and `srcImage` was created with separate stencil usage, `srcImage` must have been created with the VK_IMAGE_USAGE_HOST_TRANSFER_BIT usage flag set

- VUID-VkCopyImageToMemoryInfo-srcImage-09113
  If non-stencil aspects of `srcImage` are accessed, `srcImage` must have been created with the VK_IMAGE_USAGE_HOST_TRANSFER_BIT usage flag set

- VUID-VkCopyImageToMemoryInfo-imageOffset-09114
  If `flags` contains VK_HOST_IMAGE_COPY_MEMCPY_BIT, the `x`, `y`, and `z` members of the `imageOffset` member of each element of `pRegions` must be `0`

- VUID-VkCopyImageToMemoryInfo-srcImage-09115
  If `flags` contains VK_HOST_IMAGE_COPY_MEMCPY_BIT, the `imageExtent` member of each element of `pRegions` must equal the extents of `srcImage` identified by `imageSubresource`

- VUID-VkCopyImageToMemoryInfo-srcImage-07966
  If `srcImage` is non-sparse then the image or each specified disjoint plane must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-VkCopyImageToMemoryInfo-imageSubresource-07967
  The `imageSubresource.mipLevel` member of each element of `pRegions` must be less than the `mipLevels` specified in VkImageCreateInfo when `srcImage` was created

- VUID-VkCopyImageToMemoryInfo-imageSubresource-07968
  If `imageSubresource.layerCount` is not VK_REMAINING_ARRAY_LAYERS, `imageSubresource.baseArrayLayer` + `imageSubresource.layerCount` of each element of `pRegions` must be less than or equal to the `arrayLayers` specified in VkImageCreateInfo when `srcImage` was created

- VUID-VkCopyImageToMemoryInfo-srcImage-07969
  `srcImage` must not have been created with `flags` containing VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT

- VUID-VkCopyImageToMemoryInfo-imageSubresource-07971
  For each element of `pRegions`, `imageOffset.x` and (`imageExtent.width` + `imageOffset.x`) must both be greater than or equal to `0` and less than or equal to the width of the specified `imageSubresource` of `srcImage`

- VUID-VkCopyImageToMemoryInfo-imageSubresource-07972
  For each element of `pRegions`, `imageOffset.y` and (`imageExtent.height` + `imageOffset.y`) must both be greater than or equal to `0` and less than or equal to the height of the specified `imageSubresource` of `srcImage`

- VUID-VkCopyImageToMemoryInfo-srcImage-07973
  `srcImage` must have a sample count equal to VK_SAMPLE_COUNT_1_BIT

- VUID-VkCopyImageToMemoryInfo-srcImage-07979
  If `srcImage` is of type VK_IMAGE_TYPE_1D, then for each element of `pRegions`, `imageOffset.y` must be `0` and `imageExtent.height` must be `1`

- VUID-VkCopyImageToMemoryInfo-imageOffset-09104
  For each element of `pRegions`, `imageOffset.z` and (`imageExtent.depth` + `imageOffset.z`) must both be greater than or equal to `0` and less than or equal to the depth of the specified `imageSubresource` of `srcImage`

- VUID-VkCopyImageToMemoryInfo-srcImage-07980
  If `srcImage` is of type VK_IMAGE_TYPE_1D or VK_IMAGE_TYPE_2D, then for each element of `pRegions`, `imageOffset.z` must be `0` and `imageExtent.depth` must be `1`

- VUID-VkCopyImageToMemoryInfo-srcImage-07274
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR or VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR, `imageOffset.x` must be a multiple of the texel block extent width of the VkFormat of `srcImage`

- VUID-VkCopyImageToMemoryInfo-imageOffset-10051
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR or VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR, and `imageOffset.x` does not equal the width of the subresource specified by `imageSubresource`, `imageOffset.x` must be a multiple of the texel block extent width of the VkFormat of `srcImage`

- VUID-VkCopyImageToMemoryInfo-srcImage-07275
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR or VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR, `imageOffset.y` must be a multiple of the texel block extent height of the VkFormat of `srcImage`

- VUID-VkCopyImageToMemoryInfo-imageOffset-10052
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR or VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR, and `imageOffset.y` does not equal the height of the subresource specified by `imageSubresource`, `imageOffset.y` must be a multiple of the texel block extent height of the VkFormat of `srcImage`

- VUID-VkCopyImageToMemoryInfo-srcImage-07276
  For each element of `pRegions`, `imageOffset.z` must be a multiple of the texel block extent depth of the VkFormat of `srcImage`

- VUID-VkCopyImageToMemoryInfo-srcImage-00207
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR, the sum of `imageOffset.x` and `extent.width` does not equal the width of the subresource specified by `imageSubresource`, `extent.width` must be a multiple of the texel block extent width of the VkFormat of `srcImage`

- VUID-VkCopyImageToMemoryInfo-imageOffset-10053
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR, the difference of `imageOffset.x` and `extent.height` must be a multiple of the texel block extent width of the VkFormat of `srcImage`

- VUID-VkCopyImageToMemoryInfo-imageOffset-10054
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR, the difference of `imageOffset.x` and `extent.width` must be a multiple of the texel block extent width of the VkFormat of `srcImage`

- VUID-VkCopyImageToMemoryInfo-imageOffset-10055
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR, the sum of `imageOffset.x` and `extent.height` does not equal the width of the subresource specified by `imageSubresource`, `extent.height` must be a multiple of the texel block extent width of the VkFormat of `srcImage`

- VUID-VkCopyImageToMemoryInfo-srcImage-00208
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR, and the sum of `imageOffset.y` and `extent.height` does not equal the height of the subresource specified by `imageSubresource`, `extent.height` must be a multiple of the texel block extent height of the VkFormat of `srcImage`

- VUID-VkCopyImageToMemoryInfo-imageOffset-10056
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR, the sum of `imageOffset.y` and `extent.width` does not equal the height of the subresource specified by `imageSubresource`, `extent.width` must be a multiple of the texel block extent height of the VkFormat of `srcImage`

- VUID-VkCopyImageToMemoryInfo-imageOffset-10057
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR, the difference of `imageOffset.y` and `extent.height` must be a multiple of the texel block extent height of the VkFormat of `srcImage`

- VUID-VkCopyImageToMemoryInfo-imageOffset-10058
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR, the difference of `imageOffset.y` and `extent.width` must be a multiple of the texel block extent height of the VkFormat of `srcImage`

- VUID-VkCopyImageToMemoryInfo-srcImage-00209
  For each element of `pRegions`, if the sum of `imageOffset.z` and `extent.depth` does not equal the depth of the subresource specified by `srcSubresource`, `extent.depth` must be a multiple of the texel block extent depth of the VkFormat of `srcImage`

- VUID-VkCopyImageToMemoryInfo-imageSubresource-09105
  For each element of `pRegions`, `imageSubresource.aspectMask` must specify aspects present in `srcImage`

- VUID-VkCopyImageToMemoryInfo-srcImage-07981
  If `srcImage` has a multi-planar format, then for each element of `pRegions`, `imageSubresource.aspectMask` must be a single valid multi-planar aspect mask bit

- VUID-VkCopyImageToMemoryInfo-srcImage-07983
  If `srcImage` is of type VK_IMAGE_TYPE_3D, for each element of `pRegions`, `imageSubresource.baseArrayLayer` must be `0` and `imageSubresource.layerCount` must be `1`

- VUID-VkCopyImageToMemoryInfo-memoryRowLength-09106
  For each element of `pRegions`, `memoryRowLength` must be a multiple of the texel block extent width of the VkFormat of `srcImage`

- VUID-VkCopyImageToMemoryInfo-memoryImageHeight-09107
  For each element of `pRegions`, `memoryImageHeight` must be a multiple of the texel block extent height of the VkFormat of `srcImage`

- VUID-VkCopyImageToMemoryInfo-memoryRowLength-09108
  For each element of `pRegions`, `memoryRowLength` divided by the texel block extent width and then multiplied by the texel block size of `srcImage` must be less than or equal to 231-1

- VUID-VkCopyImageToMemoryInfo-srcImageLayout-09064
  `srcImageLayout` must specify the current layout of the image subresources of `srcImage` specified in `pRegions`

- VUID-VkCopyImageToMemoryInfo-srcImageLayout-09065
  `srcImageLayout` must be one of the image layouts returned in VkPhysicalDeviceHostImageCopyProperties::`pCopySrcLayouts`

- VUID-VkCopyImageToMemoryInfo-flags-09394
  If `flags` includes VK_HOST_IMAGE_COPY_MEMCPY_BIT, for each region in `pRegions`, `memoryRowLength` and `memoryImageHeight` must both be 0

Valid Usage (Implicit)

- VUID-VkCopyImageToMemoryInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_COPY_IMAGE_TO_MEMORY_INFO

- VUID-VkCopyImageToMemoryInfo-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkCopyImageToMemoryInfo-flags-parameter
  `flags` must be a valid combination of VkHostImageCopyFlagBits values

- VUID-VkCopyImageToMemoryInfo-srcImage-parameter
  `srcImage` must be a valid VkImage handle

- VUID-VkCopyImageToMemoryInfo-srcImageLayout-parameter
  `srcImageLayout` must be a valid VkImageLayout value

- VUID-VkCopyImageToMemoryInfo-pRegions-parameter
  `pRegions` must be a valid pointer to an array of `regionCount` valid VkImageToMemoryCopy structures

- VUID-VkCopyImageToMemoryInfo-regionCount-arraylength
  `regionCount` must be greater than `0`

Each element of VkCopyImageToMemoryInfo::`pRegions` is a structure defined as:

    // Provided by VK_VERSION_1_4
    typedef struct VkImageToMemoryCopy {
        VkStructureType             sType;
        const void*                 pNext;
        void*                       pHostPointer;
        uint32_t                    memoryRowLength;
        uint32_t                    memoryImageHeight;
        VkImageSubresourceLayers    imageSubresource;
        VkOffset3D                  imageOffset;
        VkExtent3D                  imageExtent;
    } VkImageToMemoryCopy;

    // Provided by VK_EXT_host_image_copy
    // Equivalent to VkImageToMemoryCopy
    typedef VkImageToMemoryCopy VkImageToMemoryCopyEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `pHostPointer` is the host memory address which is the destination of the copy.

- `memoryRowLength` and `memoryImageHeight` specify in texels a subregion of a larger two- or three-dimensional image in host memory, and control the addressing calculations. If either of these values is zero, that aspect of the host memory is considered to be tightly packed according to the `imageExtent`.

- `imageSubresource` is a VkImageSubresourceLayers used to specify the specific image subresources of the image used for the source or destination image data.

- `imageOffset` selects the initial `x`, `y`, `z` offsets in texels of the sub-region of the source image data.

- `imageExtent` is the size in texels of the image to copy in `width`, `height` and `depth`.

This structure is functionally similar to VkBufferImageCopy2, except it defines host memory as the target of copy instead of a buffer. In particular, the same data packing rules and restrictions as that structure apply here as well.

Valid Usage

- VUID-VkImageToMemoryCopy-pHostPointer-09066
  `pHostPointer` must point to memory that is large enough to contain all memory locations that are accessed according to Buffer and Image Addressing, for each element of `pRegions`

- VUID-VkImageToMemoryCopy-pRegions-09067
  The union of all source regions, and the union of all destination regions, specified by the elements of `pRegions`, must not overlap in memory

- VUID-VkImageToMemoryCopy-memoryRowLength-09101
  `memoryRowLength` must be `0`, or greater than or equal to the `width` member of `imageExtent`

- VUID-VkImageToMemoryCopy-memoryImageHeight-09102
  `memoryImageHeight` must be `0`, or greater than or equal to the `height` member of `imageExtent`

- VUID-VkImageToMemoryCopy-aspectMask-09103
  The `aspectMask` member of `imageSubresource` must only have a single bit set

- VUID-VkImageToMemoryCopy-imageExtent-06659
  `imageExtent.width` must not be 0

- VUID-VkImageToMemoryCopy-imageExtent-06660
  `imageExtent.height` must not be 0

- VUID-VkImageToMemoryCopy-imageExtent-06661
  `imageExtent.depth` must not be 0

Valid Usage (Implicit)

- VUID-VkImageToMemoryCopy-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_IMAGE_TO_MEMORY_COPY

- VUID-VkImageToMemoryCopy-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkImageToMemoryCopy-pHostPointer-parameter
  `pHostPointer` must be a pointer value

- VUID-VkImageToMemoryCopy-imageSubresource-parameter
  `imageSubresource` must be a valid VkImageSubresourceLayers structure

Bits which can be set in VkCopyMemoryToImageInfo::`flags`, VkCopyImageToMemoryInfo::`flags`, and VkCopyImageToImageInfo::`flags`, specifying additional copy parameters are:

    // Provided by VK_VERSION_1_4
    typedef enum VkHostImageCopyFlagBits {
        VK_HOST_IMAGE_COPY_MEMCPY_BIT = 0x00000001,
      // VK_HOST_IMAGE_COPY_MEMCPY is a legacy alias
        VK_HOST_IMAGE_COPY_MEMCPY = VK_HOST_IMAGE_COPY_MEMCPY_BIT,
      // Provided by VK_EXT_host_image_copy
        VK_HOST_IMAGE_COPY_MEMCPY_BIT_EXT = VK_HOST_IMAGE_COPY_MEMCPY_BIT,
      // Provided by VK_EXT_host_image_copy
      // VK_HOST_IMAGE_COPY_MEMCPY_EXT is a legacy alias
        VK_HOST_IMAGE_COPY_MEMCPY_EXT = VK_HOST_IMAGE_COPY_MEMCPY_BIT,
    } VkHostImageCopyFlagBits;

    // Provided by VK_EXT_host_image_copy
    // Equivalent to VkHostImageCopyFlagBits
    typedef VkHostImageCopyFlagBits VkHostImageCopyFlagBitsEXT;

- VK_HOST_IMAGE_COPY_MEMCPY_BIT specifies that no memory layout swizzling is to be applied during data copy. For copies between memory and images, this flag indicates that image data in host memory is swizzled in exactly the same way as the image data on the device. Using this flag indicates that the implementations may use a simple memory copy to transfer the data between the host memory and the device memory. The format of the swizzled data in host memory is platform dependent and is not defined in this specification.

    // Provided by VK_VERSION_1_4
    typedef VkFlags VkHostImageCopyFlags;

    // Provided by VK_EXT_host_image_copy
    // Equivalent to VkHostImageCopyFlags
    typedef VkHostImageCopyFlags VkHostImageCopyFlagsEXT;

`VkHostImageCopyFlags` is a bitmask type for setting a mask of zero or more VkHostImageCopyFlagBits.

To copy data from an image object to another image object using the host, call:

    // Provided by VK_VERSION_1_4
    VkResult vkCopyImageToImage(
        VkDevice                                    device,
        const VkCopyImageToImageInfo*               pCopyImageToImageInfo);

    // Provided by VK_EXT_host_image_copy
    // Equivalent to vkCopyImageToImage
    VkResult vkCopyImageToImageEXT(
        VkDevice                                    device,
        const VkCopyImageToImageInfo*               pCopyImageToImageInfo);

- `device` is the device which owns `pCopyImageToImageInfo->srcImage` and `pCopyImageToImageInfo->dstImage`.

- `pCopyImageToImageInfo` is a pointer to a VkCopyImageToImageInfo structure describing the copy parameters.

This command is functionally similar to vkCmdCopyImage2, except it is executed on the host. The memory of `pCopyImageToImageInfo->srcImage` and `pCopyImageToImageInfo->dstImage` is accessed by the host as if coherent.

Note | If the device has written to the memory of `pCopyImageToImageInfo->srcImage`, it is not automatically made available to the host. Before this copy command can be called, a memory barrier for this image must have been issued on the device with the second synchronization scope including VK_PIPELINE_STAGE_HOST_BIT and VK_ACCESS_HOST_READ_BIT. Because queue submissions automatically make host memory visible to the device, there would not be a need for a memory barrier before using the results of this copy operation in `pCopyMemoryToImageInfo->dstImage` on the device.

Valid Usage (Implicit)

- VUID-vkCopyImageToImage-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkCopyImageToImage-pCopyImageToImageInfo-parameter
  `pCopyImageToImageInfo` must be a valid pointer to a valid VkCopyImageToImageInfo structure

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_INITIALIZATION_FAILED

  - VK_ERROR_MEMORY_MAP_FAILED

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkCopyImageToImageInfo` structure is defined as:

    // Provided by VK_VERSION_1_4
    typedef struct VkCopyImageToImageInfo {
        VkStructureType         sType;
        const void*             pNext;
        VkHostImageCopyFlags    flags;
        VkImage                 srcImage;
        VkImageLayout           srcImageLayout;
        VkImage                 dstImage;
        VkImageLayout           dstImageLayout;
        uint32_t                regionCount;
        const VkImageCopy2*     pRegions;
    } VkCopyImageToImageInfo;

    // Provided by VK_EXT_host_image_copy
    // Equivalent to VkCopyImageToImageInfo
    typedef VkCopyImageToImageInfo VkCopyImageToImageInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask of VkHostImageCopyFlagBits values describing additional copy parameters.

- `srcImage` is the source image.

- `srcImageLayout` is the layout of the source image subresources for the copy.

- `dstImage` is the destination image.

- `dstImageLayout` is the layout of the destination image subresources for the copy.

- `regionCount` is the number of regions to copy.

- `pRegions` is a pointer to an array of VkImageCopy2 structures specifying the regions to copy.

`vkCopyImageToImage` does not check whether the device memory associated with `srcImage` or `dstImage` is currently in use before performing the copy. The application must guarantee that any previously submitted command that writes to the copy regions has completed before the host performs the copy.

Valid Usage

- VUID-VkCopyImageToImageInfo-srcImage-09069
  `srcImage` and `dstImage` must have been created with identical image creation parameters

- VUID-VkCopyImageToImageInfo-srcImage-09109
  If `srcImage` is sparse then all memory ranges accessed by the copy command must be bound as described in Binding Resource Memory

- VUID-VkCopyImageToImageInfo-srcImage-09111
  If the stencil aspect of `srcImage` is accessed, and `srcImage` was not created with separate stencil usage, `srcImage` must have been created with the VK_IMAGE_USAGE_HOST_TRANSFER_BIT usage flag set

- VUID-VkCopyImageToImageInfo-srcImage-09112
  If the stencil aspect of `srcImage` is accessed, and `srcImage` was created with separate stencil usage, `srcImage` must have been created with the VK_IMAGE_USAGE_HOST_TRANSFER_BIT usage flag set

- VUID-VkCopyImageToImageInfo-srcImage-09113
  If non-stencil aspects of `srcImage` are accessed, `srcImage` must have been created with the VK_IMAGE_USAGE_HOST_TRANSFER_BIT usage flag set

- VUID-VkCopyImageToImageInfo-srcOffset-09114
  If `flags` contains VK_HOST_IMAGE_COPY_MEMCPY_BIT, the `x`, `y`, and `z` members of the `srcOffset` member of each element of `pRegions` must be `0`

- VUID-VkCopyImageToImageInfo-srcImage-09115
  If `flags` contains VK_HOST_IMAGE_COPY_MEMCPY_BIT, the `extent` member of each element of `pRegions` must equal the extents of `srcImage` identified by `srcSubresource`

- VUID-VkCopyImageToImageInfo-srcImage-07966
  If `srcImage` is non-sparse then the image or each specified disjoint plane must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-VkCopyImageToImageInfo-srcSubresource-07967
  The `srcSubresource.mipLevel` member of each element of `pRegions` must be less than the `mipLevels` specified in VkImageCreateInfo when `srcImage` was created

- VUID-VkCopyImageToImageInfo-srcSubresource-07968
  If `srcSubresource.layerCount` is not VK_REMAINING_ARRAY_LAYERS, `srcSubresource.baseArrayLayer` + `srcSubresource.layerCount` of each element of `pRegions` must be less than or equal to the `arrayLayers` specified in VkImageCreateInfo when `srcImage` was created

- VUID-VkCopyImageToImageInfo-srcImage-07969
  `srcImage` must not have been created with `flags` containing VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT

- VUID-VkCopyImageToImageInfo-srcSubresource-07971
  For each element of `pRegions`, `srcOffset.x` and (`extent.width` + `srcOffset.x`) must both be greater than or equal to `0` and less than or equal to the width of the specified `srcSubresource` of `srcImage`

- VUID-VkCopyImageToImageInfo-srcSubresource-07972
  For each element of `pRegions`, `srcOffset.y` and (`extent.height` + `srcOffset.y`) must both be greater than or equal to `0` and less than or equal to the height of the specified `srcSubresource` of `srcImage`

- VUID-VkCopyImageToImageInfo-srcImage-07979
  If `srcImage` is of type VK_IMAGE_TYPE_1D, then for each element of `pRegions`, `srcOffset.y` must be `0` and `extent.height` must be `1`

- VUID-VkCopyImageToImageInfo-srcOffset-09104
  For each element of `pRegions`, `srcOffset.z` and (`extent.depth` + `srcOffset.z`) must both be greater than or equal to `0` and less than or equal to the depth of the specified `srcSubresource` of `srcImage`

- VUID-VkCopyImageToImageInfo-srcImage-07980
  If `srcImage` is of type VK_IMAGE_TYPE_1D or VK_IMAGE_TYPE_2D, then for each element of `pRegions`, `srcOffset.z` must be `0` and `extent.depth` must be `1`

- VUID-VkCopyImageToImageInfo-srcImage-07274
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR or VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR, `srcOffset.x` must be a multiple of the texel block extent width of the VkFormat of `srcImage`

- VUID-VkCopyImageToImageInfo-srcOffset-10051
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR or VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR, and `srcOffset.x` does not equal the width of the subresource specified by `srcSubresource`, `srcOffset.x` must be a multiple of the texel block extent width of the VkFormat of `srcImage`

- VUID-VkCopyImageToImageInfo-srcImage-07275
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR or VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR, `srcOffset.y` must be a multiple of the texel block extent height of the VkFormat of `srcImage`

- VUID-VkCopyImageToImageInfo-srcOffset-10052
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR or VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR, and `srcOffset.y` does not equal the height of the subresource specified by `srcSubresource`, `srcOffset.y` must be a multiple of the texel block extent height of the VkFormat of `srcImage`

- VUID-VkCopyImageToImageInfo-srcImage-07276
  For each element of `pRegions`, `srcOffset.z` must be a multiple of the texel block extent depth of the VkFormat of `srcImage`

- VUID-VkCopyImageToImageInfo-srcImage-00207
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR, the sum of `srcOffset.x` and `extent.width` does not equal the width of the subresource specified by `srcSubresource`, `extent.width` must be a multiple of the texel block extent width of the VkFormat of `srcImage`

- VUID-VkCopyImageToImageInfo-srcOffset-10053
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR, the difference of `srcOffset.x` and `extent.height` must be a multiple of the texel block extent width of the VkFormat of `srcImage`

- VUID-VkCopyImageToImageInfo-srcOffset-10054
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR, the difference of `srcOffset.x` and `extent.width` must be a multiple of the texel block extent width of the VkFormat of `srcImage`

- VUID-VkCopyImageToImageInfo-srcOffset-10055
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR, the sum of `srcOffset.x` and `extent.height` does not equal the width of the subresource specified by `srcSubresource`, `extent.height` must be a multiple of the texel block extent width of the VkFormat of `srcImage`

- VUID-VkCopyImageToImageInfo-srcImage-00208
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR, and the sum of `srcOffset.y` and `extent.height` does not equal the height of the subresource specified by `srcSubresource`, `extent.height` must be a multiple of the texel block extent height of the VkFormat of `srcImage`

- VUID-VkCopyImageToImageInfo-srcOffset-10056
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR, the sum of `srcOffset.y` and `extent.width` does not equal the height of the subresource specified by `srcSubresource`, `extent.width` must be a multiple of the texel block extent height of the VkFormat of `srcImage`

- VUID-VkCopyImageToImageInfo-srcOffset-10057
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR, the difference of `srcOffset.y` and `extent.height` must be a multiple of the texel block extent height of the VkFormat of `srcImage`

- VUID-VkCopyImageToImageInfo-srcOffset-10058
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR, the difference of `srcOffset.y` and `extent.width` must be a multiple of the texel block extent height of the VkFormat of `srcImage`

- VUID-VkCopyImageToImageInfo-srcImage-00209
  For each element of `pRegions`, if the sum of `srcOffset.z` and `extent.depth` does not equal the depth of the subresource specified by `srcSubresource`, `extent.depth` must be a multiple of the texel block extent depth of the VkFormat of `srcImage`

- VUID-VkCopyImageToImageInfo-srcSubresource-09105
  For each element of `pRegions`, `srcSubresource.aspectMask` must specify aspects present in `srcImage`

- VUID-VkCopyImageToImageInfo-srcImage-07981
  If `srcImage` has a multi-planar format, then for each element of `pRegions`, `srcSubresource.aspectMask` must be a single valid multi-planar aspect mask bit

- VUID-VkCopyImageToImageInfo-srcImage-07983
  If `srcImage` is of type VK_IMAGE_TYPE_3D, for each element of `pRegions`, `srcSubresource.baseArrayLayer` must be `0` and `srcSubresource.layerCount` must be `1`

- VUID-VkCopyImageToImageInfo-dstImage-09109
  If `dstImage` is sparse then all memory ranges accessed by the copy command must be bound as described in Binding Resource Memory

- VUID-VkCopyImageToImageInfo-dstImage-09111
  If the stencil aspect of `dstImage` is accessed, and `dstImage` was not created with separate stencil usage, `dstImage` must have been created with the VK_IMAGE_USAGE_HOST_TRANSFER_BIT usage flag set

- VUID-VkCopyImageToImageInfo-dstImage-09112
  If the stencil aspect of `dstImage` is accessed, and `dstImage` was created with separate stencil usage, `dstImage` must have been created with the VK_IMAGE_USAGE_HOST_TRANSFER_BIT usage flag set

- VUID-VkCopyImageToImageInfo-dstImage-09113
  If non-stencil aspects of `dstImage` are accessed, `dstImage` must have been created with the VK_IMAGE_USAGE_HOST_TRANSFER_BIT usage flag set

- VUID-VkCopyImageToImageInfo-dstOffset-09114
  If `flags` contains VK_HOST_IMAGE_COPY_MEMCPY_BIT, the `x`, `y`, and `z` members of the `dstOffset` member of each element of `pRegions` must be `0`

- VUID-VkCopyImageToImageInfo-dstImage-09115
  If `flags` contains VK_HOST_IMAGE_COPY_MEMCPY_BIT, the `extent` member of each element of `pRegions` must equal the extents of `dstImage` identified by `dstSubresource`

- VUID-VkCopyImageToImageInfo-dstImage-07966
  If `dstImage` is non-sparse then the image or each specified disjoint plane must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-VkCopyImageToImageInfo-dstSubresource-07967
  The `dstSubresource.mipLevel` member of each element of `pRegions` must be less than the `mipLevels` specified in VkImageCreateInfo when `dstImage` was created

- VUID-VkCopyImageToImageInfo-dstSubresource-07968
  If `dstSubresource.layerCount` is not VK_REMAINING_ARRAY_LAYERS, `dstSubresource.baseArrayLayer` + `dstSubresource.layerCount` of each element of `pRegions` must be less than or equal to the `arrayLayers` specified in VkImageCreateInfo when `dstImage` was created

- VUID-VkCopyImageToImageInfo-dstImage-07969
  `dstImage` must not have been created with `flags` containing VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT

- VUID-VkCopyImageToImageInfo-dstSubresource-07971
  For each element of `pRegions`, `dstOffset.x` and (`extent.width` + `dstOffset.x`) must both be greater than or equal to `0` and less than or equal to the width of the specified `dstSubresource` of `dstImage`

- VUID-VkCopyImageToImageInfo-dstSubresource-07972
  For each element of `pRegions`, `dstOffset.y` and (`extent.height` + `dstOffset.y`) must both be greater than or equal to `0` and less than or equal to the height of the specified `dstSubresource` of `dstImage`

- VUID-VkCopyImageToImageInfo-dstImage-07979
  If `dstImage` is of type VK_IMAGE_TYPE_1D, then for each element of `pRegions`, `dstOffset.y` must be `0` and `extent.height` must be `1`

- VUID-VkCopyImageToImageInfo-dstOffset-09104
  For each element of `pRegions`, `dstOffset.z` and (`extent.depth` + `dstOffset.z`) must both be greater than or equal to `0` and less than or equal to the depth of the specified `dstSubresource` of `dstImage`

- VUID-VkCopyImageToImageInfo-dstImage-07980
  If `dstImage` is of type VK_IMAGE_TYPE_1D or VK_IMAGE_TYPE_2D, then for each element of `pRegions`, `dstOffset.z` must be `0` and `extent.depth` must be `1`

- VUID-VkCopyImageToImageInfo-dstImage-07274
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR or VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR, `dstOffset.x` must be a multiple of the texel block extent width of the VkFormat of `dstImage`

- VUID-VkCopyImageToImageInfo-dstOffset-10051
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR or VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR, and `dstOffset.x` does not equal the width of the subresource specified by `dstSubresource`, `dstOffset.x` must be a multiple of the texel block extent width of the VkFormat of `dstImage`

- VUID-VkCopyImageToImageInfo-dstImage-07275
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR or VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR, `dstOffset.y` must be a multiple of the texel block extent height of the VkFormat of `dstImage`

- VUID-VkCopyImageToImageInfo-dstOffset-10052
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR or VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR, and `dstOffset.y` does not equal the height of the subresource specified by `dstSubresource`, `dstOffset.y` must be a multiple of the texel block extent height of the VkFormat of `dstImage`

- VUID-VkCopyImageToImageInfo-dstImage-07276
  For each element of `pRegions`, `dstOffset.z` must be a multiple of the texel block extent depth of the VkFormat of `dstImage`

- VUID-VkCopyImageToImageInfo-dstImage-00207
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR, the sum of `dstOffset.x` and `extent.width` does not equal the width of the subresource specified by `dstSubresource`, `extent.width` must be a multiple of the texel block extent width of the VkFormat of `dstImage`

- VUID-VkCopyImageToImageInfo-dstOffset-10053
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR, the difference of `dstOffset.x` and `extent.height` must be a multiple of the texel block extent width of the VkFormat of `dstImage`

- VUID-VkCopyImageToImageInfo-dstOffset-10054
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR, the difference of `dstOffset.x` and `extent.width` must be a multiple of the texel block extent width of the VkFormat of `dstImage`

- VUID-VkCopyImageToImageInfo-dstOffset-10055
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR, the sum of `dstOffset.x` and `extent.height` does not equal the width of the subresource specified by `dstSubresource`, `extent.height` must be a multiple of the texel block extent width of the VkFormat of `dstImage`

- VUID-VkCopyImageToImageInfo-dstImage-00208
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR, and the sum of `dstOffset.y` and `extent.height` does not equal the height of the subresource specified by `dstSubresource`, `extent.height` must be a multiple of the texel block extent height of the VkFormat of `dstImage`

- VUID-VkCopyImageToImageInfo-dstOffset-10056
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR, the sum of `dstOffset.y` and `extent.width` does not equal the height of the subresource specified by `dstSubresource`, `extent.width` must be a multiple of the texel block extent height of the VkFormat of `dstImage`

- VUID-VkCopyImageToImageInfo-dstOffset-10057
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR, the difference of `dstOffset.y` and `extent.height` must be a multiple of the texel block extent height of the VkFormat of `dstImage`

- VUID-VkCopyImageToImageInfo-dstOffset-10058
  For each element of `pRegions`, if VkCopyCommandTransformInfoQCOM::`transform` is equal to VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR, the difference of `dstOffset.y` and `extent.width` must be a multiple of the texel block extent height of the VkFormat of `dstImage`

- VUID-VkCopyImageToImageInfo-dstImage-00209
  For each element of `pRegions`, if the sum of `dstOffset.z` and `extent.depth` does not equal the depth of the subresource specified by `srcSubresource`, `extent.depth` must be a multiple of the texel block extent depth of the VkFormat of `dstImage`

- VUID-VkCopyImageToImageInfo-dstSubresource-09105
  For each element of `pRegions`, `dstSubresource.aspectMask` must specify aspects present in `dstImage`

- VUID-VkCopyImageToImageInfo-dstImage-07981
  If `dstImage` has a multi-planar format, then for each element of `pRegions`, `dstSubresource.aspectMask` must be a single valid multi-planar aspect mask bit

- VUID-VkCopyImageToImageInfo-dstImage-07983
  If `dstImage` is of type VK_IMAGE_TYPE_3D, for each element of `pRegions`, `dstSubresource.baseArrayLayer` must be `0` and `dstSubresource.layerCount` must be `1`

- VUID-VkCopyImageToImageInfo-srcImageLayout-09070
  `srcImageLayout` must specify the current layout of the image subresources of `srcImage` specified in `pRegions`

- VUID-VkCopyImageToImageInfo-dstImageLayout-09071
  `dstImageLayout` must specify the current layout of the image subresources of `dstImage` specified in `pRegions`

- VUID-VkCopyImageToImageInfo-srcImageLayout-09072
  `srcImageLayout` must be one of the image layouts returned in VkPhysicalDeviceHostImageCopyProperties::`pCopySrcLayouts`

- VUID-VkCopyImageToImageInfo-dstImageLayout-09073
  `dstImageLayout` must be one of the image layouts returned in VkPhysicalDeviceHostImageCopyProperties::`pCopyDstLayouts`

Valid Usage (Implicit)

- VUID-VkCopyImageToImageInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_COPY_IMAGE_TO_IMAGE_INFO

- VUID-VkCopyImageToImageInfo-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkCopyImageToImageInfo-flags-parameter
  `flags` must be a valid combination of VkHostImageCopyFlagBits values

- VUID-VkCopyImageToImageInfo-srcImage-parameter
  `srcImage` must be a valid VkImage handle

- VUID-VkCopyImageToImageInfo-srcImageLayout-parameter
  `srcImageLayout` must be a valid VkImageLayout value

- VUID-VkCopyImageToImageInfo-dstImage-parameter
  `dstImage` must be a valid VkImage handle

- VUID-VkCopyImageToImageInfo-dstImageLayout-parameter
  `dstImageLayout` must be a valid VkImageLayout value

- VUID-VkCopyImageToImageInfo-pRegions-parameter
  `pRegions` must be a valid pointer to an array of `regionCount` valid VkImageCopy2 structures

- VUID-VkCopyImageToImageInfo-regionCount-arraylength
  `regionCount` must be greater than `0`

- VUID-VkCopyImageToImageInfo-commonparent
  Both of `dstImage`, and `srcImage` must have been created, allocated, or retrieved from the same VkDevice

### 26.6. Indirect Copies

An application can use indirect copies when the copy parameters are not known during the command buffer creation time.

To copy data between two memory regions by specifying copy parameters indirectly in memory, call:

    // Provided by VK_KHR_copy_memory_indirect
    void vkCmdCopyMemoryIndirectKHR(
        VkCommandBuffer                             commandBuffer,
        const VkCopyMemoryIndirectInfoKHR*          pCopyMemoryIndirectInfo);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `pCopyMemoryIndirectInfo` is a pointer to a VkCopyMemoryIndirectInfoKHR structure containing the copy parameters, including the number of copies to execute and a strided array of VkCopyMemoryIndirectCommandKHR structures.

Each region specified in the memory referenced by `pCopyMemoryIndirectInfo->copyAddressRange` is copied from the source region to the specified destination region. The results are undefined if any of the source and destination regions overlap in memory.

Valid Usage

- VUID-vkCmdCopyMemoryIndirectKHR-indirectMemoryCopy-10935
  The `indirectMemoryCopy` feature must be enabled

- VUID-vkCmdCopyMemoryIndirectKHR-commandBuffer-10936
  The VkCommandPool that `commandBuffer` was allocated from must support at least one of the queue types specified in VkPhysicalDeviceCopyMemoryIndirectPropertiesKHR::`supportedQueues`

- VUID-vkCmdCopyMemoryIndirectKHR-commandBuffer-10937
  `commandBuffer` must not be a protected command buffer

Valid Usage (Implicit)

- VUID-vkCmdCopyMemoryIndirectKHR-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdCopyMemoryIndirectKHR-pCopyMemoryIndirectInfo-parameter
  `pCopyMemoryIndirectInfo` must be a valid pointer to a valid VkCopyMemoryIndirectInfoKHR structure

- VUID-vkCmdCopyMemoryIndirectKHR-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdCopyMemoryIndirectKHR-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, VK_QUEUE_GRAPHICS_BIT, or VK_QUEUE_TRANSFER_BIT operations

- VUID-vkCmdCopyMemoryIndirectKHR-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdCopyMemoryIndirectKHR-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdCopyMemoryIndirectKHR-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT VK_QUEUE_TRANSFER_BIT | Action

Conditional Rendering

vkCmdCopyMemoryIndirectKHR is not affected by conditional rendering

The VkCopyMemoryIndirectInfoKHR structure is defined as:

    // Provided by VK_KHR_copy_memory_indirect
    typedef struct VkCopyMemoryIndirectInfoKHR {
        VkStructureType                   sType;
        const void*                       pNext;
        VkAddressCopyFlagsKHR             srcCopyFlags;
        VkAddressCopyFlagsKHR             dstCopyFlags;
        uint32_t                          copyCount;
        VkStridedDeviceAddressRangeKHR    copyAddressRange;
    } VkCopyMemoryIndirectInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `srcCopyFlags` is a VkAddressCopyFlagsKHR value defining the copy flags for the source address range.

- `dstCopyFlags` is a VkAddressCopyFlagsKHR value defining the copy flags for the destination address range.

- `copyCount` is the number of copies to execute, and can be zero.

- `copyAddressRange` is a memory region specifying the copy parameters. It is laid out as an array of VkCopyMemoryIndirectCommandKHR structures.

Valid Usage

- VUID-VkCopyMemoryIndirectInfoKHR-srcCopyFlags-10938
  If `srcCopyFlags` contains VK_ADDRESS_COPY_SPARSE_BIT_KHR, the source memory regions accessed must be bound to memory

- VUID-VkCopyMemoryIndirectInfoKHR-dstCopyFlags-10939
  If `dstCopyFlags` contains VK_ADDRESS_COPY_SPARSE_BIT_KHR, the destination memory regions accessed must be bound to memory

- VUID-VkCopyMemoryIndirectInfoKHR-srcCopyFlags-10940
  `srcCopyFlags` must not contain VK_ADDRESS_COPY_PROTECTED_BIT_KHR

- VUID-VkCopyMemoryIndirectInfoKHR-dstCopyFlags-10941
  `dstCopyFlags` must not contain VK_ADDRESS_COPY_PROTECTED_BIT_KHR

- VUID-VkCopyMemoryIndirectInfoKHR-copyAddressRange-10942
  `copyAddressRange.address` must be 4 byte aligned

- VUID-VkCopyMemoryIndirectInfoKHR-copyAddressRange-10943
  `copyAddressRange.stride` must be a multiple of `4` and must be greater than or equal to sizeof(VkCopyMemoryIndirectCommandKHR)

- VUID-VkCopyMemoryIndirectInfoKHR-copyCount-10944
  `copyCount` must be less than or equal to `copyAddressRange.size` / `copyAddressRange.stride`

- VUID-VkCopyMemoryIndirectInfoKHR-copyAddressRange-10945
  Any of the source or destination memory regions specified in `copyAddressRange` must not overlap with any of the specified destination memory regions

- VUID-VkCopyMemoryIndirectInfoKHR-copyAddressRange-12210
  `copyAddressRange` must be a device address range allocated to the application from a buffer created with the VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT usage flag set

Valid Usage (Implicit)

- VUID-VkCopyMemoryIndirectInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_COPY_MEMORY_INDIRECT_INFO_KHR

- VUID-VkCopyMemoryIndirectInfoKHR-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkCopyMemoryIndirectInfoKHR-srcCopyFlags-parameter
  `srcCopyFlags` must be a valid combination of VkAddressCopyFlagBitsKHR values

- VUID-VkCopyMemoryIndirectInfoKHR-dstCopyFlags-parameter
  `dstCopyFlags` must be a valid combination of VkAddressCopyFlagBitsKHR values

The structure describing source and destination memory regions, `VkCopyMemoryIndirectCommandKHR` is defined as:

    // Provided by VK_KHR_copy_memory_indirect
    typedef struct VkCopyMemoryIndirectCommandKHR {
        VkDeviceAddress    srcAddress;
        VkDeviceAddress    dstAddress;
        VkDeviceSize       size;
    } VkCopyMemoryIndirectCommandKHR;

    // Provided by VK_NV_copy_memory_indirect
    // Equivalent to VkCopyMemoryIndirectCommandKHR
    typedef VkCopyMemoryIndirectCommandKHR VkCopyMemoryIndirectCommandNV;

- `srcAddress` is the starting address of the source device memory to copy from.

- `dstAddress` is the starting address of the destination device memory to copy to.

- `size` is the size of the copy in bytes.

Valid Usage

- VUID-VkCopyMemoryIndirectCommandKHR-srcAddress-10958
  The `srcAddress` must be 4 byte aligned

- VUID-VkCopyMemoryIndirectCommandKHR-dstAddress-10959
  The `dstAddress` must be 4 byte aligned

- VUID-VkCopyMemoryIndirectCommandKHR-size-10960
  The `size` must be 4 byte aligned

- VUID-VkCopyMemoryIndirectCommandKHR-srcAddress-10961
  The memory in range [`srcAddress`, `srcAddress` + `size` - 1] must be within the bounds of the memory allocation backing `srcAddress`

- VUID-VkCopyMemoryIndirectCommandKHR-dstAddress-10962
  The memory in range [`dstAddress`, `dstAddress` + `size` - 1] must be within the bounds of the memory allocation backing `dstAddress`

- VUID-VkCopyMemoryIndirectCommandKHR-srcAddress-12211
  The range of memory defined by `srcAddress` and `size` must be a device address range allocated to the application from a buffer created with the VK_BUFFER_USAGE_TRANSFER_SRC_BIT usage flag set

- VUID-VkCopyMemoryIndirectCommandKHR-dstAddress-12212
  The range of memory defined by `dstAddress` and `size` must be a device address range allocated to the application from a buffer created with the VK_BUFFER_USAGE_TRANSFER_DST_BIT usage flag set

Valid Usage (Implicit)

- VUID-VkCopyMemoryIndirectCommandKHR-srcAddress-parameter
  `srcAddress` must be a valid VkDeviceAddress value

- VUID-VkCopyMemoryIndirectCommandKHR-dstAddress-parameter
  `dstAddress` must be a valid VkDeviceAddress value

Bits which can be set in a VkAddressCopyFlagsKHR mask are:

    // Provided by VK_KHR_copy_memory_indirect
    typedef enum VkAddressCopyFlagBitsKHR {
        VK_ADDRESS_COPY_DEVICE_LOCAL_BIT_KHR = 0x00000001,
        VK_ADDRESS_COPY_SPARSE_BIT_KHR = 0x00000002,
        VK_ADDRESS_COPY_PROTECTED_BIT_KHR = 0x00000004,
    } VkAddressCopyFlagBitsKHR;

- VK_ADDRESS_COPY_DEVICE_LOCAL_BIT_KHR specifies that the address range is expected to be resident in device local memory. Specifying this value is optional, but may lead to improved performance if set accurately.

- VK_ADDRESS_COPY_PROTECTED_BIT_KHR specifies that the address range is allocated from protected memory.

- VK_ADDRESS_COPY_SPARSE_BIT_KHR specifies that the address range may not be fully bound to physical memory when accessed.

    // Provided by VK_KHR_copy_memory_indirect
    typedef VkFlags VkAddressCopyFlagsKHR;

`VkAddressCopyFlagsKHR` is a bitmask type for setting a mask of zero or more VkAddressCopyFlagBitsKHR.

To copy data between two memory regions by specifying copy parameters indirectly in memory, call:

    // Provided by VK_NV_copy_memory_indirect
    void vkCmdCopyMemoryIndirectNV(
        VkCommandBuffer                             commandBuffer,
        VkDeviceAddress                             copyBufferAddress,
        uint32_t                                    copyCount,
        uint32_t                                    stride);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `copyBufferAddress` is the memory address specifying the copy parameters. It is laid out as an array of VkCopyMemoryIndirectCommandNV structures.

- `copyCount` is the number of copies to execute, and can be zero.

- `stride` is the stride in bytes between successive sets of copy parameters.

Each region read from `copyBufferAddress` is copied from the source region to the specified destination region. The results are undefined if any of the source and destination regions overlap in memory.

Valid Usage

- VUID-vkCmdCopyMemoryIndirectNV-None-07653
  The `indirectCopy` feature must be enabled

- VUID-vkCmdCopyMemoryIndirectNV-copyBufferAddress-07654
  `copyBufferAddress` must be 4 byte aligned

- VUID-vkCmdCopyMemoryIndirectNV-stride-07655
  `stride` must be a multiple of `4` and must be greater than or equal to sizeof(VkCopyMemoryIndirectCommandNV)

- VUID-vkCmdCopyMemoryIndirectNV-commandBuffer-07656
  The VkCommandPool that `commandBuffer` was allocated from must support at least one of the queue types specified in VkPhysicalDeviceCopyMemoryIndirectPropertiesKHR::`supportedQueues`

- VUID-vkCmdCopyMemoryIndirectNV-copyBufferAddress-10946
  Any of the source or destination memory regions specified in `copyBufferAddress` must not overlap with any of the specified destination memory regions

Valid Usage (Implicit)

- VUID-vkCmdCopyMemoryIndirectNV-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdCopyMemoryIndirectNV-copyBufferAddress-parameter
  `copyBufferAddress` must be a valid VkDeviceAddress value

- VUID-vkCmdCopyMemoryIndirectNV-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdCopyMemoryIndirectNV-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, VK_QUEUE_GRAPHICS_BIT, or VK_QUEUE_TRANSFER_BIT operations

- VUID-vkCmdCopyMemoryIndirectNV-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdCopyMemoryIndirectNV-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdCopyMemoryIndirectNV-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT VK_QUEUE_TRANSFER_BIT | Action

Conditional Rendering

vkCmdCopyMemoryIndirectNV is not affected by conditional rendering

To copy data from a memory region to an image object by specifying copy parameters in memory, call:

    // Provided by VK_KHR_copy_memory_indirect
    void vkCmdCopyMemoryToImageIndirectKHR(
        VkCommandBuffer                             commandBuffer,
        const VkCopyMemoryToImageIndirectInfoKHR*   pCopyMemoryToImageIndirectInfo);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `pCopyMemoryToImageIndirectInfo` is a pointer to a VkCopyMemoryToImageIndirectInfoKHR structure which contains the copy parameters, including the number of copies to execute and a strided array of VkCopyMemoryToImageIndirectCommandKHR structures.

Each region specified in the memory referenced by `pCopyMemoryToImageIndirectInfo->copyAddressRange` is copied from the source region to an image region in the destination image. If the destination image is of type VK_IMAGE_TYPE_3D, the starting slice and number of slices to copy are specified in `pImageSubresources->baseArrayLayer` and `pImageSubresources->layerCount` respectively as `imageOffset` and `imageExtent` from VkCopyMemoryToImageIndirectCommandKHR are only available at device execution time. The results are undefined if any of the source and destination regions overlap in memory.

Valid Usage

- VUID-vkCmdCopyMemoryToImageIndirectKHR-indirectMemoryToImageCopy-10947
  The `indirectMemoryToImageCopy` feature must be enabled

- VUID-vkCmdCopyMemoryToImageIndirectKHR-commandBuffer-10948
  The VkCommandPool that `commandBuffer` was allocated from must support at least one of the queue types specified in VkPhysicalDeviceCopyMemoryIndirectPropertiesKHR::`supportedQueues`

- VUID-vkCmdCopyMemoryToImageIndirectKHR-commandBuffer-10949
  `commandBuffer` must not be a protected command buffer

Valid Usage (Implicit)

- VUID-vkCmdCopyMemoryToImageIndirectKHR-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdCopyMemoryToImageIndirectKHR-pCopyMemoryToImageIndirectInfo-parameter
  `pCopyMemoryToImageIndirectInfo` must be a valid pointer to a valid VkCopyMemoryToImageIndirectInfoKHR structure

- VUID-vkCmdCopyMemoryToImageIndirectKHR-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdCopyMemoryToImageIndirectKHR-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, VK_QUEUE_GRAPHICS_BIT, or VK_QUEUE_TRANSFER_BIT operations

- VUID-vkCmdCopyMemoryToImageIndirectKHR-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdCopyMemoryToImageIndirectKHR-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdCopyMemoryToImageIndirectKHR-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT VK_QUEUE_TRANSFER_BIT | Action

Conditional Rendering

vkCmdCopyMemoryToImageIndirectKHR is not affected by conditional rendering

The VkCopyMemoryToImageIndirectInfoKHR structure is defined as:

    // Provided by VK_KHR_copy_memory_indirect
    typedef struct VkCopyMemoryToImageIndirectInfoKHR {
        VkStructureType                    sType;
        const void*                        pNext;
        VkAddressCopyFlagsKHR              srcCopyFlags;
        uint32_t                           copyCount;
        VkStridedDeviceAddressRangeKHR     copyAddressRange;
        VkImage                            dstImage;
        VkImageLayout                      dstImageLayout;
        const VkImageSubresourceLayers*    pImageSubresources;
    } VkCopyMemoryToImageIndirectInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `srcCopyFlags` is a VkAddressCopyFlagsKHR value defining the copy flags for the source address range.

- `copyCount` is the number of copies to execute, and can be zero.

- `copyAddressRange` is a memory region specifying the copy parameters. It is laid out as an array of VkCopyMemoryToImageIndirectCommandKHR structures.

- `dstImage` is the destination image.

- `dstImageLayout` is the layout of the destination image subresources for the copy.

- `pImageSubresources` is a pointer to an array of `copyCount` VkImageSubresourceLayers structures, specifying the image subresources of the destination image data for the copy operation.

Valid Usage

- VUID-VkCopyMemoryToImageIndirectInfoKHR-srcCopyFlags-10950
  If `srcCopyFlags` contains VK_ADDRESS_COPY_SPARSE_BIT_KHR, the source memory regions accessed must be bound to memory

- VUID-VkCopyMemoryToImageIndirectInfoKHR-copyCount-10951
  `copyCount` must be less than or equal to `copyAddressRange.size` / `copyAddressRange.stride`

- VUID-VkCopyMemoryToImageIndirectInfoKHR-copyAddressRange-10952
  `copyAddressRange.address` must be 4 byte aligned

- VUID-VkCopyMemoryToImageIndirectInfoKHR-copyAddressRange-10953
  `copyAddressRange.stride` must be a multiple of `4` and must be greater than or equal to sizeof(VkCopyMemoryToImageIndirectCommandKHR)

- VUID-VkCopyMemoryToImageIndirectInfoKHR-dstImage-10955
  The format features of `dstImage` must contain VK_FORMAT_FEATURE_2_COPY_IMAGE_INDIRECT_DST_BIT_KHR

- VUID-VkCopyMemoryToImageIndirectInfoKHR-copyAddressRange-12213
  `copyAddressRange` must be a device address range allocated to the application from a buffer created with the VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT usage flag set

- VUID-VkCopyMemoryToImageIndirectInfoKHR-dstImage-07661
  `dstImage` must not be a protected image

- VUID-VkCopyMemoryToImageIndirectInfoKHR-aspectMask-07662
  The `aspectMask` member for every subresource in `pImageSubresources` must only have a single bit set

- VUID-VkCopyMemoryToImageIndirectInfoKHR-aspectMask-12287
  The `aspectMask` member for every subresource in `pImageSubresources` must specify an aspect present in `dstImage`

- VUID-VkCopyMemoryToImageIndirectInfoKHR-dstImage-07664
  `dstImage` must have been created with the VK_IMAGE_USAGE_TRANSFER_DST_BIT usage flag set

- VUID-VkCopyMemoryToImageIndirectInfoKHR-dstImage-07665
  If `dstImage` is non-sparse then the image or each specified disjoint plane must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-VkCopyMemoryToImageIndirectInfoKHR-dstImage-07973
  `dstImage` must have a sample count equal to VK_SAMPLE_COUNT_1_BIT

- VUID-VkCopyMemoryToImageIndirectInfoKHR-dstImageLayout-07667
  `dstImageLayout` must specify the layout of the image subresources of `dstImage` at the time this command is executed on a `VkDevice`

- VUID-VkCopyMemoryToImageIndirectInfoKHR-dstImageLayout-07669
  `dstImageLayout` must be VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR, or VK_IMAGE_LAYOUT_GENERAL

- VUID-VkCopyMemoryToImageIndirectInfoKHR-mipLevel-07670
  The specified `mipLevel` of each region in `pImageSubresources` must be less than the `mipLevels` specified in VkImageCreateInfo when `dstImage` was created

- VUID-VkCopyMemoryToImageIndirectInfoKHR-dstImage-12288
  If `dstImage` is not of type VK_IMAGE_TYPE_3D, and the specified `layerCount` of each region in `pImageSubresources` is not VK_REMAINING_ARRAY_LAYERS, the specified `baseArrayLayer` + `layerCount` of each region in `pImageSubresources` must be less than or equal to the `arrayLayers` specified in VkImageCreateInfo when `dstImage` was created

- VUID-VkCopyMemoryToImageIndirectInfoKHR-dstImage-12289
  If `dstImage` is of type VK_IMAGE_TYPE_3D, and the specified `layerCount` of each region in `pImageSubresources` is not VK_REMAINING_ARRAY_LAYERS, for each destination region, (`imageSubresource.baseArrayLayer` + `imageSubresource.layerCount`) must be less than or equal to the depth of the specified subresource

- VUID-VkCopyMemoryToImageIndirectInfoKHR-dstImage-12290
  If `dstImage` is of type VK_IMAGE_TYPE_3D, and the specified `layerCount` of each region in `pImageSubresources` is not VK_REMAINING_ARRAY_LAYERS, for each destination region, if (`imageSubresource.baseArrayLayer` + `imageSubresource.layerCount`) does not equal the depth of the specified subresource, `imageSubresource.layerCount` must be a multiple of the texel block extent depth of the VkFormat of `dstImage`

- VUID-VkCopyMemoryToImageIndirectInfoKHR-dstImage-12291
  If `dstImage` is of type VK_IMAGE_TYPE_3D, for each destination region, `imageSubresource.baseArrayLayer` must be a multiple of the texel block extent depth of the VkFormat of `dstImage`

- VUID-VkCopyMemoryToImageIndirectInfoKHR-dstImage-12292
  If `dstImage` is of type VK_IMAGE_TYPE_3D, for each destination region, `imageSubresource.baseArrayLayer` must be less than or equal to the depth of the specified subresource

- VUID-VkCopyMemoryToImageIndirectInfoKHR-dstImage-07673
  `dstImage` must not have been created with `flags` containing VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT

- VUID-VkCopyMemoryToImageIndirectInfoKHR-commandBuffer-07674
  If the queue family used to create the VkCommandPool which `commandBuffer` was allocated from does not support VK_QUEUE_GRAPHICS_BIT, for each region, the `aspectMask` member of `pImageSubresources` must not be VK_IMAGE_ASPECT_DEPTH_BIT or VK_IMAGE_ASPECT_STENCIL_BIT

- VUID-VkCopyMemoryToImageIndirectInfoKHR-dstImage-10974
  The format features of `dstImage` must contain VK_FORMAT_FEATURE_TRANSFER_DST_BIT

- VUID-VkCopyMemoryToImageIndirectInfoKHR-copyAddressRange-10975
  Any of the source or destination memory regions specified in `copyAddressRange` must not overlap with any of the specified destination memory regions at the time this command is executed on device

Valid Usage (Implicit)

- VUID-VkCopyMemoryToImageIndirectInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_COPY_MEMORY_TO_IMAGE_INDIRECT_INFO_KHR

- VUID-VkCopyMemoryToImageIndirectInfoKHR-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkCopyMemoryToImageIndirectInfoKHR-srcCopyFlags-parameter
  `srcCopyFlags` must be a valid combination of VkAddressCopyFlagBitsKHR values

- VUID-VkCopyMemoryToImageIndirectInfoKHR-dstImage-parameter
  `dstImage` must be a valid VkImage handle

- VUID-VkCopyMemoryToImageIndirectInfoKHR-dstImageLayout-parameter
  `dstImageLayout` must be a valid VkImageLayout value

- VUID-VkCopyMemoryToImageIndirectInfoKHR-pImageSubresources-parameter
  `pImageSubresources` must be a valid pointer to an array of `copyCount` valid VkImageSubresourceLayers structures

- VUID-VkCopyMemoryToImageIndirectInfoKHR-copyCount-arraylength
  `copyCount` must be greater than `0`

The structure describing source and destination memory regions, `VkCopyMemoryToImageIndirectCommandKHR` is defined as:

    // Provided by VK_KHR_copy_memory_indirect
    typedef struct VkCopyMemoryToImageIndirectCommandKHR {
        VkDeviceAddress             srcAddress;
        uint32_t                    bufferRowLength;
        uint32_t                    bufferImageHeight;
        VkImageSubresourceLayers    imageSubresource;
        VkOffset3D                  imageOffset;
        VkExtent3D                  imageExtent;
    } VkCopyMemoryToImageIndirectCommandKHR;

    // Provided by VK_NV_copy_memory_indirect
    // Equivalent to VkCopyMemoryToImageIndirectCommandKHR
    typedef VkCopyMemoryToImageIndirectCommandKHR VkCopyMemoryToImageIndirectCommandNV;

- `srcAddress` is the starting address of the source device memory to copy from.

- `bufferRowLength` and `bufferImageHeight` specify in texels a subregion of a larger two- or three-dimensional image in buffer memory, and control the addressing calculations. If either of these values is zero, that aspect of the buffer memory is considered to be tightly packed according to the `imageExtent`.

- `imageSubresource` is a VkImageSubresourceLayers structure used to specify the specific image subresources of the image used for the destination image data, which must match the value specified in corresponding index of the `pCopyMemoryToImageIndirectInfo->pImageSubresources` array of vkCmdCopyMemoryToImageIndirectKHR during command recording.

- `imageOffset` selects the initial `x`, `y`, `z` offsets in texels of the sub-region of the destination image data.

- `imageExtent` is the size in texels of the destination image in `width`, `height` and `depth`.

Valid Usage

- VUID-VkCopyMemoryToImageIndirectCommandKHR-srcAddress-10963
  The `srcAddress` must be 4 byte aligned

- VUID-VkCopyMemoryToImageIndirectCommandKHR-dstImage-12282
  If `dstImage` does not have either a depth/stencil format or a multi-planar format, `srcAddress` must be a multiple of the texel block size

- VUID-VkCopyMemoryToImageIndirectCommandKHR-dstImage-12283
  If `dstImage` has a multi-planar format, `srcAddress` must be a multiple of the element size of the compatible format for the format and the `aspectMask` of the `imageSubresource` as defined in Compatible Formats of Planes of Multi-Planar Formats

- VUID-VkCopyMemoryToImageIndirectCommandKHR-bufferRowLength-10964
  `bufferRowLength` must be `0`, or greater than or equal to the `width` member of `imageExtent`

- VUID-VkCopyMemoryToImageIndirectCommandKHR-bufferImageHeight-10965
  `bufferImageHeight` must be `0`, or greater than or equal to the `height` member of `imageExtent`

- VUID-VkCopyMemoryToImageIndirectCommandKHR-imageOffset-10966
  `imageOffset` must specify a valid offset in the destination image

- VUID-VkCopyMemoryToImageIndirectCommandKHR-imageExtent-10967
  `imageExtent` must specify a valid region in the destination image and can be `0`

- VUID-VkCopyMemoryToImageIndirectCommandKHR-srcAddress-10968
  The memory region starting at `srcAddress` and described by `bufferRowLength` and `bufferImageHeight` must not exceed the bounds of the memory allocation backing memory at `srcAddress`

- VUID-VkCopyMemoryToImageIndirectCommandKHR-imageOffset-10969
  The `imageOffset` and `imageExtent` members of each region must respect the image transfer granularity requirements of `commandBuffer`’s command pool’s queue family, as described in VkQueueFamilyProperties

- VUID-VkCopyMemoryToImageIndirectCommandKHR-imageOffset-10970
  For each destination region, `imageOffset.x` and (`imageExtent.width` + `imageOffset.x`) must both be greater than or equal to `0` and less than or equal to the width of the specified subresource

- VUID-VkCopyMemoryToImageIndirectCommandKHR-imageOffset-10971
  For each destination region, `imageOffset.y` and (`imageExtent.height` + `imageOffset.y`) must both be greater than or equal to `0` and less than or equal to the height of the specified subresource

- VUID-VkCopyMemoryToImageIndirectCommandKHR-imageSubresource-12284
  The members of `imageSubresource` must be identical to the members of the VkImageSubresourceLayers structure specified in the corresponding index of the `pCopyMemoryToImageIndirectInfo->pImageSubresources` array of vkCmdCopyMemoryToImageIndirectKHR during command recording

- VUID-VkCopyMemoryToImageIndirectCommandKHR-dstImage-12285
  If `dstImage` is of type VK_IMAGE_TYPE_1D, `imageOffset.y` must be `0` and `imageExtent.height` must be `1`

- VUID-VkCopyMemoryToImageIndirectCommandKHR-dstImage-12286
  If `dstImage` is of type VK_IMAGE_TYPE_1D or VK_IMAGE_TYPE_2D, `imageOffset.z` must be `0` and `imageExtent.depth` must be `1`

- VUID-VkCopyMemoryToImageIndirectCommandKHR-srcAddress-12214
  `srcAddress` must be a device address allocated to the application from a buffer created with the VK_BUFFER_USAGE_TRANSFER_SRC_BIT usage flag set

Valid Usage (Implicit)

- VUID-VkCopyMemoryToImageIndirectCommandKHR-srcAddress-parameter
  `srcAddress` must be a valid VkDeviceAddress value

- VUID-VkCopyMemoryToImageIndirectCommandKHR-imageSubresource-parameter
  `imageSubresource` must be a valid VkImageSubresourceLayers structure

To copy data from a memory region to an image object by specifying copy parameters in memory, call:

    // Provided by VK_NV_copy_memory_indirect
    void vkCmdCopyMemoryToImageIndirectNV(
        VkCommandBuffer                             commandBuffer,
        VkDeviceAddress                             copyBufferAddress,
        uint32_t                                    copyCount,
        uint32_t                                    stride,
        VkImage                                     dstImage,
        VkImageLayout                               dstImageLayout,
        const VkImageSubresourceLayers*             pImageSubresources);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `copyBufferAddress` is the address specifying the copy parameters which are laid out in memory as an array of VkCopyMemoryToImageIndirectCommandNV structures.

- `copyCount` is the number of copies to execute, and can be zero.

- `stride` is the byte stride between successive sets of copy parameters.

- `dstImage` is the destination image.

- `dstImageLayout` is the layout of the destination image subresources for the copy.

- `pImageSubresources` is a pointer to an array of `copyCount` VkImageSubresourceLayers structures, specifying the image subresources of the destination image data for the copy operation.

Each region in `copyBufferAddress` is copied from the source memory region to an image region in the destination image. If the destination image is of type VK_IMAGE_TYPE_3D, the starting slice and number of slices to copy are specified in `pImageSubresources->baseArrayLayer` and `pImageSubresources->layerCount` respectively.

Valid Usage

- VUID-vkCmdCopyMemoryToImageIndirectNV-None-07660
  The `indirectCopy` feature must be enabled

- VUID-vkCmdCopyMemoryToImageIndirectNV-offset-07676
  `copyBufferAddress` must be 4 byte aligned

- VUID-vkCmdCopyMemoryToImageIndirectNV-stride-07677
  `stride` must be a multiple of `4` and must be greater than or equal to sizeof(VkCopyMemoryToImageIndirectCommandNV)

- VUID-vkCmdCopyMemoryToImageIndirectNV-commandBuffer-10956
  The VkCommandPool that `commandBuffer` was allocated from must support at least one of the queue types specified in VkPhysicalDeviceCopyMemoryIndirectPropertiesKHR::`supportedQueues`

- VUID-vkCmdCopyMemoryToImageIndirectNV-dstImage-07661
  `dstImage` must not be a protected image

- VUID-vkCmdCopyMemoryToImageIndirectNV-aspectMask-07662
  The `aspectMask` member for every subresource in `pImageSubresources` must only have a single bit set

- VUID-vkCmdCopyMemoryToImageIndirectNV-aspectMask-12287
  The `aspectMask` member for every subresource in `pImageSubresources` must specify an aspect present in `dstImage`

- VUID-vkCmdCopyMemoryToImageIndirectNV-dstImage-07664
  `dstImage` must have been created with the VK_IMAGE_USAGE_TRANSFER_DST_BIT usage flag set

- VUID-vkCmdCopyMemoryToImageIndirectNV-dstImage-07665
  If `dstImage` is non-sparse then the image or each specified disjoint plane must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-vkCmdCopyMemoryToImageIndirectNV-dstImage-07973
  `dstImage` must have a sample count equal to VK_SAMPLE_COUNT_1_BIT

- VUID-vkCmdCopyMemoryToImageIndirectNV-dstImageLayout-07667
  `dstImageLayout` must specify the layout of the image subresources of `dstImage` at the time this command is executed on a `VkDevice`

- VUID-vkCmdCopyMemoryToImageIndirectNV-dstImageLayout-07669
  `dstImageLayout` must be VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR, or VK_IMAGE_LAYOUT_GENERAL

- VUID-vkCmdCopyMemoryToImageIndirectNV-mipLevel-07670
  The specified `mipLevel` of each region in `pImageSubresources` must be less than the `mipLevels` specified in VkImageCreateInfo when `dstImage` was created

- VUID-vkCmdCopyMemoryToImageIndirectNV-dstImage-12288
  If `dstImage` is not of type VK_IMAGE_TYPE_3D, and the specified `layerCount` of each region in `pImageSubresources` is not VK_REMAINING_ARRAY_LAYERS, the specified `baseArrayLayer` + `layerCount` of each region in `pImageSubresources` must be less than or equal to the `arrayLayers` specified in VkImageCreateInfo when `dstImage` was created

- VUID-vkCmdCopyMemoryToImageIndirectNV-dstImage-12289
  If `dstImage` is of type VK_IMAGE_TYPE_3D, and the specified `layerCount` of each region in `pImageSubresources` is not VK_REMAINING_ARRAY_LAYERS, for each destination region, (`imageSubresource.baseArrayLayer` + `imageSubresource.layerCount`) must be less than or equal to the depth of the specified subresource

- VUID-vkCmdCopyMemoryToImageIndirectNV-dstImage-12290
  If `dstImage` is of type VK_IMAGE_TYPE_3D, and the specified `layerCount` of each region in `pImageSubresources` is not VK_REMAINING_ARRAY_LAYERS, for each destination region, if (`imageSubresource.baseArrayLayer` + `imageSubresource.layerCount`) does not equal the depth of the specified subresource, `imageSubresource.layerCount` must be a multiple of the texel block extent depth of the VkFormat of `dstImage`

- VUID-vkCmdCopyMemoryToImageIndirectNV-dstImage-12291
  If `dstImage` is of type VK_IMAGE_TYPE_3D, for each destination region, `imageSubresource.baseArrayLayer` must be a multiple of the texel block extent depth of the VkFormat of `dstImage`

- VUID-vkCmdCopyMemoryToImageIndirectNV-dstImage-12292
  If `dstImage` is of type VK_IMAGE_TYPE_3D, for each destination region, `imageSubresource.baseArrayLayer` must be less than or equal to the depth of the specified subresource

- VUID-vkCmdCopyMemoryToImageIndirectNV-dstImage-07673
  `dstImage` must not have been created with `flags` containing VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT

- VUID-vkCmdCopyMemoryToImageIndirectNV-commandBuffer-07674
  If the queue family used to create the VkCommandPool which `commandBuffer` was allocated from does not support VK_QUEUE_GRAPHICS_BIT, for each region, the `aspectMask` member of `pImageSubresources` must not be VK_IMAGE_ASPECT_DEPTH_BIT or VK_IMAGE_ASPECT_STENCIL_BIT

- VUID-vkCmdCopyMemoryToImageIndirectNV-dstImage-10974
  The format features of `dstImage` must contain VK_FORMAT_FEATURE_TRANSFER_DST_BIT

- VUID-vkCmdCopyMemoryToImageIndirectNV-copyBufferAddress-10975
  Any of the source or destination memory regions specified in `copyBufferAddress` must not overlap with any of the specified destination memory regions at the time this command is executed on device

Valid Usage (Implicit)

- VUID-vkCmdCopyMemoryToImageIndirectNV-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdCopyMemoryToImageIndirectNV-copyBufferAddress-parameter
  `copyBufferAddress` must be a valid VkDeviceAddress value

- VUID-vkCmdCopyMemoryToImageIndirectNV-dstImage-parameter
  `dstImage` must be a valid VkImage handle

- VUID-vkCmdCopyMemoryToImageIndirectNV-dstImageLayout-parameter
  `dstImageLayout` must be a valid VkImageLayout value

- VUID-vkCmdCopyMemoryToImageIndirectNV-pImageSubresources-parameter
  `pImageSubresources` must be a valid pointer to an array of `copyCount` valid VkImageSubresourceLayers structures

- VUID-vkCmdCopyMemoryToImageIndirectNV-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdCopyMemoryToImageIndirectNV-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, VK_QUEUE_GRAPHICS_BIT, or VK_QUEUE_TRANSFER_BIT operations

- VUID-vkCmdCopyMemoryToImageIndirectNV-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdCopyMemoryToImageIndirectNV-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdCopyMemoryToImageIndirectNV-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdCopyMemoryToImageIndirectNV-copyCount-arraylength
  `copyCount` must be greater than `0`

- VUID-vkCmdCopyMemoryToImageIndirectNV-commonparent
  Both of `commandBuffer`, and `dstImage` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT VK_QUEUE_TRANSFER_BIT | Action

Conditional Rendering

vkCmdCopyMemoryToImageIndirectNV is not affected by conditional rendering

### 26.7. Image Copies With Scaling

To copy regions of a source image into a destination image, potentially performing format conversion, arbitrary scaling, and filtering, call:

    // Provided by VK_VERSION_1_0
    void vkCmdBlitImage(
        VkCommandBuffer                             commandBuffer,
        VkImage                                     srcImage,
        VkImageLayout                               srcImageLayout,
        VkImage                                     dstImage,
        VkImageLayout                               dstImageLayout,
        uint32_t                                    regionCount,
        const VkImageBlit*                          pRegions,
        VkFilter                                    filter);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `srcImage` is the source image.

- `srcImageLayout` is the layout of the source image subresources for the blit.

- `dstImage` is the destination image.

- `dstImageLayout` is the layout of the destination image subresources for the blit.

- `regionCount` is the number of regions to blit.

- `pRegions` is a pointer to an array of VkImageBlit structures specifying the regions to blit.

- `filter` is a VkFilter specifying the filter to apply if the blits require scaling.

`vkCmdBlitImage` must not be used for multisampled source or destination images. Use vkCmdResolveImage for this purpose.

As the sizes of the source and destination extents can differ in any dimension, texels in the source extent are scaled and filtered to the destination extent. Scaling occurs via the following operations:

- For each destination texel, the integer coordinate of that texel is converted to an unnormalized texture coordinate, using the effective inverse of the equations described in unnormalized to integer conversion:

    ubase = i + ½

    vbase = j + ½

    wbase = k + ½

- These base coordinates are then offset by the first destination offset:

    uoffset = ubase - xdst0

    voffset = vbase - ydst0

    woffset = wbase - zdst0

    aoffset = a - `baseArrayCount`dst

- The scale is determined from the source and destination regions, and applied to the offset coordinates:

    scaleu = (xsrc1 - xsrc0) / (xdst1 - xdst0)

    scalev = (ysrc1 - ysrc0) / (ydst1 - ydst0)

    scalew = (zsrc1 - zsrc0) / (zdst1 - zdst0)

    uscaled = uoffset × scaleu

    vscaled = voffset × scalev

    wscaled = woffset × scalew

- Finally the source offset is added to the scaled coordinates, to determine the final unnormalized coordinates used to sample from `srcImage`:

    u = uscaled + xsrc0

    v = vscaled + ysrc0

    w = wscaled + zsrc0

    q = `mipLevel`

    a = aoffset + `baseArrayCount`src

These coordinates are used to sample from the source image, as described in Image Operations chapter, with the filter mode equal to that of `filter`, a mipmap mode of VK_SAMPLER_MIPMAP_MODE_NEAREST and an address mode of VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE. Implementations must clamp at the edge of the source image, and may additionally clamp to the edge of the source region.

Note | Due to allowable rounding errors in the generation of the source texture coordinates, it is not always possible to guarantee exactly which source texels will be sampled for a given blit. As rounding errors are implementation-dependent, the exact results of a blitting operation are also implementation-dependent.

Blits are done layer by layer starting with the `baseArrayLayer` member of `srcSubresource` for the source and `dstSubresource` for the destination. `layerCount` layers are blitted to the destination image.

When blitting 3D textures, slices in the destination region bounded by `dstOffsets`[0].z and `dstOffsets`[1].z are sampled from slices in the source region bounded by `srcOffsets`[0].z and `srcOffsets`[1].z. If the `filter` parameter is VK_FILTER_LINEAR then the value sampled from the source image is taken by doing linear filtering using the interpolated z coordinate represented by w in the previous equations. If the `filter` parameter is VK_FILTER_NEAREST then the value sampled from the source image is taken from the single nearest slice, with an implementation-dependent arithmetic rounding mode.

The following filtering and conversion rules apply:

- Integer formats can only be converted to other integer formats with the same signedness.

- No format conversion is supported between depth/stencil images. The formats must match.

- Format conversions on unorm, snorm, scaled and packed float formats of the copied aspect of the image are performed by first converting the pixels to float values.

- For sRGB source formats, nonlinear RGB values are converted to linear representation prior to filtering.

- After filtering, the float values are first clamped and then cast to the destination image format. In case of sRGB destination format, linear RGB values are converted to nonlinear representation before writing the pixel to the image.

Signed and unsigned integers are converted by first clamping to the representable range of the destination format, then casting the value.

Valid Usage

- VUID-vkCmdBlitImage-commandBuffer-01834
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, `srcImage` must not be a protected image

- VUID-vkCmdBlitImage-commandBuffer-01835
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, `dstImage` must not be a protected image

- VUID-vkCmdBlitImage-commandBuffer-01836
  If `commandBuffer` is a protected command buffer and `protectedNoFault` is not supported, `dstImage` must not be an unprotected image

- VUID-vkCmdBlitImage-pRegions-00217
  The union of all destination regions, specified by the elements of `pRegions`, must not overlap in memory with any texel that may be sampled during the blit operation

- VUID-vkCmdBlitImage-srcImage-01999
  The format features of `srcImage` must contain VK_FORMAT_FEATURE_BLIT_SRC_BIT

- VUID-vkCmdBlitImage-srcImage-06421
  `srcImage` must not use a format that requires a sampler Y′CBCR conversion

- VUID-vkCmdBlitImage-srcImage-00219
  `srcImage` must have been created with the VK_IMAGE_USAGE_TRANSFER_SRC_BIT usage flag set

- VUID-vkCmdBlitImage-srcImage-00220
  If `srcImage` is non-sparse then it must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-vkCmdBlitImage-srcImageLayout-00221
  `srcImageLayout` must specify the layout of the image subresources of `srcImage` specified in `pRegions` at the time this command is executed on a `VkDevice`

- VUID-vkCmdBlitImage-srcImageLayout-01398
  `srcImageLayout` must be VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL

- VUID-vkCmdBlitImage-srcImage-09459
  If `srcImage` and `dstImage` are the same, and an element of `pRegions` contains the `srcSubresource` and `dstSubresource` with matching `mipLevel` and overlapping array layers, then the `srcImageLayout` and `dstImageLayout` must be VK_IMAGE_LAYOUT_GENERAL or VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR

- VUID-vkCmdBlitImage-dstImage-02000
  The format features of `dstImage` must contain VK_FORMAT_FEATURE_BLIT_DST_BIT

- VUID-vkCmdBlitImage-dstImage-06422
  `dstImage` must not use a format that requires a sampler Y′CBCR conversion

- VUID-vkCmdBlitImage-dstImage-00224
  `dstImage` must have been created with the VK_IMAGE_USAGE_TRANSFER_DST_BIT usage flag set

- VUID-vkCmdBlitImage-dstImage-00225
  If `dstImage` is non-sparse then it must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-vkCmdBlitImage-dstImageLayout-00226
  `dstImageLayout` must specify the layout of the image subresources of `dstImage` specified in `pRegions` at the time this command is executed on a `VkDevice`

- VUID-vkCmdBlitImage-dstImageLayout-01399
  `dstImageLayout` must be VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL

- VUID-vkCmdBlitImage-srcImage-00229
  If either of `srcImage` or `dstImage` was created with a signed integer VkFormat, the other must also have been created with a signed integer VkFormat

- VUID-vkCmdBlitImage-srcImage-00230
  If either of `srcImage` or `dstImage` was created with an unsigned integer color VkFormat, the other must also have been created with an unsigned integer color VkFormat

- VUID-vkCmdBlitImage-srcImage-00231
  If either of `srcImage` or `dstImage` was created with a depth/stencil format, the other must have exactly the same format

- VUID-vkCmdBlitImage-srcImage-00232
  If `srcImage` was created with a depth/stencil format, `filter` must be VK_FILTER_NEAREST

- VUID-vkCmdBlitImage-srcImage-00233
  `srcImage` must have been created with a `samples` value of VK_SAMPLE_COUNT_1_BIT

- VUID-vkCmdBlitImage-dstImage-00234
  `dstImage` must have been created with a `samples` value of VK_SAMPLE_COUNT_1_BIT

- VUID-vkCmdBlitImage-filter-02001
  If `filter` is VK_FILTER_LINEAR, then the format features of `srcImage` must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdBlitImage-filter-02002
  If `filter` is VK_FILTER_CUBIC_EXT, then the format features of `srcImage` must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT

- VUID-vkCmdBlitImage-filter-00237
  If `filter` is VK_FILTER_CUBIC_EXT, `srcImage` must be of type VK_IMAGE_TYPE_2D

- VUID-vkCmdBlitImage-srcSubresource-01705
  The `srcSubresource.mipLevel` member of each element of `pRegions` must be less than the `mipLevels` specified in VkImageCreateInfo when `srcImage` was created

- VUID-vkCmdBlitImage-dstSubresource-01706
  The `dstSubresource.mipLevel` member of each element of `pRegions` must be less than the `mipLevels` specified in VkImageCreateInfo when `dstImage` was created

- VUID-vkCmdBlitImage-srcSubresource-01707
  If `srcSubresource.layerCount` is not VK_REMAINING_ARRAY_LAYERS, `srcSubresource.baseArrayLayer` + `srcSubresource.layerCount` of each element of `pRegions` must be less than or equal to the `arrayLayers` specified in VkImageCreateInfo when `srcImage` was created

- VUID-vkCmdBlitImage-dstSubresource-01708
  If `dstSubresource.layerCount` is not VK_REMAINING_ARRAY_LAYERS, `dstSubresource.baseArrayLayer` + `dstSubresource.layerCount` of each element of `pRegions` must be less than or equal to the `arrayLayers` specified in VkImageCreateInfo when `dstImage` was created

- VUID-vkCmdBlitImage-dstImage-02545
  `dstImage` and `srcImage` must not have been created with `flags` containing VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT

- VUID-vkCmdBlitImage-maintenance8-10207
  If the `maintenance8` feature is enabled and `srcImage` is of type VK_IMAGE_TYPE_3D, then for each element of `pRegions`, `srcSubresource.baseArrayLayer` must be `0`, and `srcSubresource.layerCount` and `dstSubresource.layerCount` must each be `1`

- VUID-vkCmdBlitImage-maintenance8-10208
  If the `maintenance8` feature is enabled and `dstImage` is of type VK_IMAGE_TYPE_3D, then for each element of `pRegions`, `dstSubresource.baseArrayLayer` must be `0`, and `srcSubresource.layerCount` and `dstSubresource.layerCount` must each be `1`

- VUID-vkCmdBlitImage-maintenance8-10579
  If the `maintenance8` feature is enabled, `dstImage` is VK_IMAGE_TYPE_3D, and `srcImage` is not of type VK_IMAGE_TYPE_3D, then for each element of `pRegions`, the absolute difference of the `z` member of each member of `dstOffsets` must equal `srcSubresource.layerCount`

- VUID-vkCmdBlitImage-maintenance8-10580
  If the `maintenance8` feature is enabled, `srcImage` is VK_IMAGE_TYPE_3D, and `dstImage` is not of type VK_IMAGE_TYPE_3D, then for each element of `pRegions`, the absolute difference of the `z` member of each member of `srcOffsets` must equal `dstSubresource.layerCount`

- VUID-vkCmdBlitImage-srcImage-00240
  If the `maintenance8` feature is not enabled and either `srcImage` or `dstImage` is of type VK_IMAGE_TYPE_3D, then for each element of `pRegions`, `srcSubresource.baseArrayLayer` and `dstSubresource.baseArrayLayer` must each be `0`, and `srcSubresource.layerCount` and `dstSubresource.layerCount` must each be `1`

- VUID-vkCmdBlitImage-aspectMask-00241
  For each element of `pRegions`, `srcSubresource.aspectMask` must specify aspects present in `srcImage`

- VUID-vkCmdBlitImage-aspectMask-00242
  For each element of `pRegions`, `dstSubresource.aspectMask` must specify aspects present in `dstImage`

- VUID-vkCmdBlitImage-srcOffset-00243
  For each element of `pRegions`, `srcOffsets`[0].x and `srcOffsets`[1].x must both be greater than or equal to `0` and less than or equal to the width of the specified `srcSubresource` of `srcImage`

- VUID-vkCmdBlitImage-srcOffset-00244
  For each element of `pRegions`, `srcOffsets`[0].y and `srcOffsets`[1].y must both be greater than or equal to `0` and less than or equal to the height of the specified `srcSubresource` of `srcImage`

- VUID-vkCmdBlitImage-srcImage-00245
  If `srcImage` is of type VK_IMAGE_TYPE_1D, then for each element of `pRegions`, `srcOffsets`[0].y must be `0` and `srcOffsets`[1].y must be `1`

- VUID-vkCmdBlitImage-srcOffset-00246
  For each element of `pRegions`, `srcOffsets`[0].z and `srcOffsets`[1].z must both be greater than or equal to `0` and less than or equal to the depth of the specified `srcSubresource` of `srcImage`

- VUID-vkCmdBlitImage-srcImage-00247
  If `srcImage` is of type VK_IMAGE_TYPE_1D or VK_IMAGE_TYPE_2D, then for each element of `pRegions`, `srcOffsets`[0].z must be `0` and `srcOffsets`[1].z must be `1`

- VUID-vkCmdBlitImage-dstOffset-00248
  For each element of `pRegions`, `dstOffsets`[0].x and `dstOffsets`[1].x must both be greater than or equal to `0` and less than or equal to the width of the specified `dstSubresource` of `dstImage`

- VUID-vkCmdBlitImage-dstOffset-00249
  For each element of `pRegions`, `dstOffsets`[0].y and `dstOffsets`[1].y must both be greater than or equal to `0` and less than or equal to the height of the specified `dstSubresource` of `dstImage`

- VUID-vkCmdBlitImage-dstImage-00250
  If `dstImage` is of type VK_IMAGE_TYPE_1D, then for each element of `pRegions`, `dstOffsets`[0].y must be `0` and `dstOffsets`[1].y must be `1`

- VUID-vkCmdBlitImage-dstOffset-00251
  For each element of `pRegions`, `dstOffsets`[0].z and `dstOffsets`[1].z must both be greater than or equal to `0` and less than or equal to the depth of the specified `dstSubresource` of `dstImage`

- VUID-vkCmdBlitImage-dstImage-00252
  If `dstImage` is of type VK_IMAGE_TYPE_1D or VK_IMAGE_TYPE_2D, then for each element of `pRegions`, `dstOffsets`[0].z must be `0` and `dstOffsets`[1].z must be `1`

Valid Usage (Implicit)

- VUID-vkCmdBlitImage-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdBlitImage-srcImage-parameter
  `srcImage` must be a valid VkImage handle

- VUID-vkCmdBlitImage-srcImageLayout-parameter
  `srcImageLayout` must be a valid VkImageLayout value

- VUID-vkCmdBlitImage-dstImage-parameter
  `dstImage` must be a valid VkImage handle

- VUID-vkCmdBlitImage-dstImageLayout-parameter
  `dstImageLayout` must be a valid VkImageLayout value

- VUID-vkCmdBlitImage-pRegions-parameter
  `pRegions` must be a valid pointer to an array of `regionCount` valid VkImageBlit structures

- VUID-vkCmdBlitImage-filter-parameter
  `filter` must be a valid VkFilter value

- VUID-vkCmdBlitImage-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdBlitImage-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdBlitImage-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdBlitImage-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdBlitImage-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdBlitImage-regionCount-arraylength
  `regionCount` must be greater than `0`

- VUID-vkCmdBlitImage-commonparent
  Each of `commandBuffer`, `dstImage`, and `srcImage` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Outside | VK_QUEUE_GRAPHICS_BIT | Action

Conditional Rendering

vkCmdBlitImage is not affected by conditional rendering

The `VkImageBlit` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkImageBlit {
        VkImageSubresourceLayers    srcSubresource;
        VkOffset3D                  srcOffsets[2];
        VkImageSubresourceLayers    dstSubresource;
        VkOffset3D                  dstOffsets[2];
    } VkImageBlit;

- `srcSubresource` is the subresource to blit from.

- `srcOffsets` is a pointer to an array of two VkOffset3D structures specifying the bounds of the source region within `srcSubresource`.

- `dstSubresource` is the subresource to blit into.

- `dstOffsets` is a pointer to an array of two VkOffset3D structures specifying the bounds of the destination region within `dstSubresource`.

For each element of the `pRegions` array, a blit operation is performed for the specified source and destination regions.

Valid Usage

- VUID-VkImageBlit-aspectMask-00238
  The `aspectMask` member of `srcSubresource` and `dstSubresource` must match

- VUID-VkImageBlit-layerCount-08800
  If neither of the `layerCount` members of `srcSubresource` or `dstSubresource` are VK_REMAINING_ARRAY_LAYERS, the `layerCount` members of `srcSubresource` or `dstSubresource` must match

- VUID-VkImageBlit-layerCount-08801
  If one of the `layerCount` members of `srcSubresource` or `dstSubresource` is VK_REMAINING_ARRAY_LAYERS, the other member must be either VK_REMAINING_ARRAY_LAYERS or equal to the `arrayLayers` member of the VkImageCreateInfo used to create the image minus `baseArrayLayer`

Valid Usage (Implicit)

- VUID-VkImageBlit-srcSubresource-parameter
  `srcSubresource` must be a valid VkImageSubresourceLayers structure

- VUID-VkImageBlit-dstSubresource-parameter
  `dstSubresource` must be a valid VkImageSubresourceLayers structure

A more extensible version of the blit image command is defined below.

To copy regions of a source image into a destination image, potentially performing format conversion, arbitrary scaling, and filtering, call:

    // Provided by VK_VERSION_1_3
    void vkCmdBlitImage2(
        VkCommandBuffer                             commandBuffer,
        const VkBlitImageInfo2*                     pBlitImageInfo);

    // Provided by VK_KHR_copy_commands2
    // Equivalent to vkCmdBlitImage2
    void vkCmdBlitImage2KHR(
        VkCommandBuffer                             commandBuffer,
        const VkBlitImageInfo2*                     pBlitImageInfo);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `pBlitImageInfo` is a pointer to a VkBlitImageInfo2 structure describing the blit parameters.

This command is functionally identical to vkCmdBlitImage, but includes extensible sub-structures that include `sType` and `pNext` parameters, allowing them to be more easily extended.

Valid Usage

- VUID-vkCmdBlitImage2-commandBuffer-01834
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, `srcImage` must not be a protected image

- VUID-vkCmdBlitImage2-commandBuffer-01835
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, `dstImage` must not be a protected image

- VUID-vkCmdBlitImage2-commandBuffer-01836
  If `commandBuffer` is a protected command buffer and `protectedNoFault` is not supported, `dstImage` must not be an unprotected image

Valid Usage (Implicit)

- VUID-vkCmdBlitImage2-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdBlitImage2-pBlitImageInfo-parameter
  `pBlitImageInfo` must be a valid pointer to a valid VkBlitImageInfo2 structure

- VUID-vkCmdBlitImage2-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdBlitImage2-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdBlitImage2-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdBlitImage2-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdBlitImage2-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Outside | VK_QUEUE_GRAPHICS_BIT | Action

Conditional Rendering

vkCmdBlitImage2 is not affected by conditional rendering

The `VkBlitImageInfo2` structure is defined as:

    // Provided by VK_VERSION_1_3
    typedef struct VkBlitImageInfo2 {
        VkStructureType        sType;
        const void*            pNext;
        VkImage                srcImage;
        VkImageLayout          srcImageLayout;
        VkImage                dstImage;
        VkImageLayout          dstImageLayout;
        uint32_t               regionCount;
        const VkImageBlit2*    pRegions;
        VkFilter               filter;
    } VkBlitImageInfo2;

    // Provided by VK_KHR_copy_commands2
    // Equivalent to VkBlitImageInfo2
    typedef VkBlitImageInfo2 VkBlitImageInfo2KHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `srcImage` is the source image.

- `srcImageLayout` is the layout of the source image subresources for the blit.

- `dstImage` is the destination image.

- `dstImageLayout` is the layout of the destination image subresources for the blit.

- `regionCount` is the number of regions to blit.

- `pRegions` is a pointer to an array of VkImageBlit2 structures specifying the regions to blit.

- `filter` is a VkFilter specifying the filter to apply if the blits require scaling.

Valid Usage

- VUID-VkBlitImageInfo2-pRegions-00217
  The union of all destination regions, specified by the elements of `pRegions`, must not overlap in memory with any texel that may be sampled during the blit operation

- VUID-VkBlitImageInfo2-srcImage-01999
  The format features of `srcImage` must contain VK_FORMAT_FEATURE_BLIT_SRC_BIT

- VUID-VkBlitImageInfo2-srcImage-06421
  `srcImage` must not use a format that requires a sampler Y′CBCR conversion

- VUID-VkBlitImageInfo2-srcImage-00219
  `srcImage` must have been created with the VK_IMAGE_USAGE_TRANSFER_SRC_BIT usage flag set

- VUID-VkBlitImageInfo2-srcImage-00220
  If `srcImage` is non-sparse then it must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-VkBlitImageInfo2-srcImageLayout-00221
  `srcImageLayout` must specify the layout of the image subresources of `srcImage` specified in `pRegions` at the time this command is executed on a `VkDevice`

- VUID-VkBlitImageInfo2-srcImageLayout-01398
  `srcImageLayout` must be VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL

- VUID-VkBlitImageInfo2-srcImage-09459
  If `srcImage` and `dstImage` are the same, and an element of `pRegions` contains the `srcSubresource` and `dstSubresource` with matching `mipLevel` and overlapping array layers, then the `srcImageLayout` and `dstImageLayout` must be VK_IMAGE_LAYOUT_GENERAL or VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR

- VUID-VkBlitImageInfo2-dstImage-02000
  The format features of `dstImage` must contain VK_FORMAT_FEATURE_BLIT_DST_BIT

- VUID-VkBlitImageInfo2-dstImage-06422
  `dstImage` must not use a format that requires a sampler Y′CBCR conversion

- VUID-VkBlitImageInfo2-dstImage-00224
  `dstImage` must have been created with the VK_IMAGE_USAGE_TRANSFER_DST_BIT usage flag set

- VUID-VkBlitImageInfo2-dstImage-00225
  If `dstImage` is non-sparse then it must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-VkBlitImageInfo2-dstImageLayout-00226
  `dstImageLayout` must specify the layout of the image subresources of `dstImage` specified in `pRegions` at the time this command is executed on a `VkDevice`

- VUID-VkBlitImageInfo2-dstImageLayout-01399
  `dstImageLayout` must be VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL

- VUID-VkBlitImageInfo2-srcImage-00229
  If either of `srcImage` or `dstImage` was created with a signed integer VkFormat, the other must also have been created with a signed integer VkFormat

- VUID-VkBlitImageInfo2-srcImage-00230
  If either of `srcImage` or `dstImage` was created with an unsigned integer color VkFormat, the other must also have been created with an unsigned integer color VkFormat

- VUID-VkBlitImageInfo2-srcImage-00231
  If either of `srcImage` or `dstImage` was created with a depth/stencil format, the other must have exactly the same format

- VUID-VkBlitImageInfo2-srcImage-00232
  If `srcImage` was created with a depth/stencil format, `filter` must be VK_FILTER_NEAREST

- VUID-VkBlitImageInfo2-srcImage-00233
  `srcImage` must have been created with a `samples` value of VK_SAMPLE_COUNT_1_BIT

- VUID-VkBlitImageInfo2-dstImage-00234
  `dstImage` must have been created with a `samples` value of VK_SAMPLE_COUNT_1_BIT

- VUID-VkBlitImageInfo2-filter-02001
  If `filter` is VK_FILTER_LINEAR, then the format features of `srcImage` must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-VkBlitImageInfo2-filter-02002
  If `filter` is VK_FILTER_CUBIC_EXT, then the format features of `srcImage` must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT

- VUID-VkBlitImageInfo2-filter-00237
  If `filter` is VK_FILTER_CUBIC_EXT, `srcImage` must be of type VK_IMAGE_TYPE_2D

- VUID-VkBlitImageInfo2-srcSubresource-01705
  The `srcSubresource.mipLevel` member of each element of `pRegions` must be less than the `mipLevels` specified in VkImageCreateInfo when `srcImage` was created

- VUID-VkBlitImageInfo2-dstSubresource-01706
  The `dstSubresource.mipLevel` member of each element of `pRegions` must be less than the `mipLevels` specified in VkImageCreateInfo when `dstImage` was created

- VUID-VkBlitImageInfo2-srcSubresource-01707
  If `srcSubresource.layerCount` is not VK_REMAINING_ARRAY_LAYERS, `srcSubresource.baseArrayLayer` + `srcSubresource.layerCount` of each element of `pRegions` must be less than or equal to the `arrayLayers` specified in VkImageCreateInfo when `srcImage` was created

- VUID-VkBlitImageInfo2-dstSubresource-01708
  If `dstSubresource.layerCount` is not VK_REMAINING_ARRAY_LAYERS, `dstSubresource.baseArrayLayer` + `dstSubresource.layerCount` of each element of `pRegions` must be less than or equal to the `arrayLayers` specified in VkImageCreateInfo when `dstImage` was created

- VUID-VkBlitImageInfo2-dstImage-02545
  `dstImage` and `srcImage` must not have been created with `flags` containing VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT

- VUID-VkBlitImageInfo2-maintenance8-10207
  If the `maintenance8` feature is enabled and `srcImage` is of type VK_IMAGE_TYPE_3D, then for each element of `pRegions`, `srcSubresource.baseArrayLayer` must be `0`, and `srcSubresource.layerCount` and `dstSubresource.layerCount` must each be `1`

- VUID-VkBlitImageInfo2-maintenance8-10208
  If the `maintenance8` feature is enabled and `dstImage` is of type VK_IMAGE_TYPE_3D, then for each element of `pRegions`, `dstSubresource.baseArrayLayer` must be `0`, and `srcSubresource.layerCount` and `dstSubresource.layerCount` must each be `1`

- VUID-VkBlitImageInfo2-maintenance8-10579
  If the `maintenance8` feature is enabled, `dstImage` is VK_IMAGE_TYPE_3D, and `srcImage` is not of type VK_IMAGE_TYPE_3D, then for each element of `pRegions`, the absolute difference of the `z` member of each member of `dstOffsets` must equal `srcSubresource.layerCount`

- VUID-VkBlitImageInfo2-maintenance8-10580
  If the `maintenance8` feature is enabled, `srcImage` is VK_IMAGE_TYPE_3D, and `dstImage` is not of type VK_IMAGE_TYPE_3D, then for each element of `pRegions`, the absolute difference of the `z` member of each member of `srcOffsets` must equal `dstSubresource.layerCount`

- VUID-VkBlitImageInfo2-srcImage-00240
  If the `maintenance8` feature is not enabled and either `srcImage` or `dstImage` is of type VK_IMAGE_TYPE_3D, then for each element of `pRegions`, `srcSubresource.baseArrayLayer` and `dstSubresource.baseArrayLayer` must each be `0`, and `srcSubresource.layerCount` and `dstSubresource.layerCount` must each be `1`

- VUID-VkBlitImageInfo2-aspectMask-00241
  For each element of `pRegions`, `srcSubresource.aspectMask` must specify aspects present in `srcImage`

- VUID-VkBlitImageInfo2-aspectMask-00242
  For each element of `pRegions`, `dstSubresource.aspectMask` must specify aspects present in `dstImage`

- VUID-VkBlitImageInfo2-srcOffset-00243
  For each element of `pRegions`, `srcOffsets`[0].x and `srcOffsets`[1].x must both be greater than or equal to `0` and less than or equal to the width of the specified `srcSubresource` of `srcImage`

- VUID-VkBlitImageInfo2-srcOffset-00244
  For each element of `pRegions`, `srcOffsets`[0].y and `srcOffsets`[1].y must both be greater than or equal to `0` and less than or equal to the height of the specified `srcSubresource` of `srcImage`

- VUID-VkBlitImageInfo2-srcImage-00245
  If `srcImage` is of type VK_IMAGE_TYPE_1D, then for each element of `pRegions`, `srcOffsets`[0].y must be `0` and `srcOffsets`[1].y must be `1`

- VUID-VkBlitImageInfo2-srcOffset-00246
  For each element of `pRegions`, `srcOffsets`[0].z and `srcOffsets`[1].z must both be greater than or equal to `0` and less than or equal to the depth of the specified `srcSubresource` of `srcImage`

- VUID-VkBlitImageInfo2-srcImage-00247
  If `srcImage` is of type VK_IMAGE_TYPE_1D or VK_IMAGE_TYPE_2D, then for each element of `pRegions`, `srcOffsets`[0].z must be `0` and `srcOffsets`[1].z must be `1`

- VUID-VkBlitImageInfo2-dstOffset-00248
  For each element of `pRegions`, `dstOffsets`[0].x and `dstOffsets`[1].x must both be greater than or equal to `0` and less than or equal to the width of the specified `dstSubresource` of `dstImage`

- VUID-VkBlitImageInfo2-dstOffset-00249
  For each element of `pRegions`, `dstOffsets`[0].y and `dstOffsets`[1].y must both be greater than or equal to `0` and less than or equal to the height of the specified `dstSubresource` of `dstImage`

- VUID-VkBlitImageInfo2-dstImage-00250
  If `dstImage` is of type VK_IMAGE_TYPE_1D, then for each element of `pRegions`, `dstOffsets`[0].y must be `0` and `dstOffsets`[1].y must be `1`

- VUID-VkBlitImageInfo2-dstOffset-00251
  For each element of `pRegions`, `dstOffsets`[0].z and `dstOffsets`[1].z must both be greater than or equal to `0` and less than or equal to the depth of the specified `dstSubresource` of `dstImage`

- VUID-VkBlitImageInfo2-dstImage-00252
  If `dstImage` is of type VK_IMAGE_TYPE_1D or VK_IMAGE_TYPE_2D, then for each element of `pRegions`, `dstOffsets`[0].z must be `0` and `dstOffsets`[1].z must be `1`

- VUID-VkBlitImageInfo2-pRegions-04561
  If any element of `pRegions` contains VkCopyCommandTransformInfoQCOM in its `pNext` chain, then `srcImage` and `dstImage` must not be block-compressed images

- VUID-VkBlitImageInfo2KHR-pRegions-06207
  If any element of `pRegions` contains VkCopyCommandTransformInfoQCOM in its `pNext` chain, then `srcImage` must be of type VK_IMAGE_TYPE_2D

- VUID-VkBlitImageInfo2KHR-pRegions-06208
  If any element of `pRegions` contains VkCopyCommandTransformInfoQCOM in its `pNext` chain, then `srcImage` must not have a multi-planar format

- VUID-VkBlitImageInfo2-filter-09204
  If `filter` is VK_FILTER_CUBIC_EXT and if the selectableCubicWeights feature is not enabled then the cubic weights must be VK_CUBIC_FILTER_WEIGHTS_CATMULL_ROM_QCOM

Valid Usage (Implicit)

- VUID-VkBlitImageInfo2-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_BLIT_IMAGE_INFO_2

- VUID-VkBlitImageInfo2-pNext-pNext
  `pNext` must be `NULL` or a pointer to a valid instance of VkBlitImageCubicWeightsInfoQCOM

- VUID-VkBlitImageInfo2-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkBlitImageInfo2-srcImage-parameter
  `srcImage` must be a valid VkImage handle

- VUID-VkBlitImageInfo2-srcImageLayout-parameter
  `srcImageLayout` must be a valid VkImageLayout value

- VUID-VkBlitImageInfo2-dstImage-parameter
  `dstImage` must be a valid VkImage handle

- VUID-VkBlitImageInfo2-dstImageLayout-parameter
  `dstImageLayout` must be a valid VkImageLayout value

- VUID-VkBlitImageInfo2-pRegions-parameter
  `pRegions` must be a valid pointer to an array of `regionCount` valid VkImageBlit2 structures

- VUID-VkBlitImageInfo2-filter-parameter
  `filter` must be a valid VkFilter value

- VUID-VkBlitImageInfo2-regionCount-arraylength
  `regionCount` must be greater than `0`

- VUID-VkBlitImageInfo2-commonparent
  Both of `dstImage`, and `srcImage` must have been created, allocated, or retrieved from the same VkDevice

If `filter` is VK_FILTER_CUBIC_EXT and if the `pNext` chain of VkBlitImageInfo2 includes a `VkBlitImageCubicWeightsInfoQCOM` structure, then that structure specifies cubic weights are used in the blit. If that structure is not present, then cubic weights are considered to be VK_CUBIC_FILTER_WEIGHTS_CATMULL_ROM_QCOM.

The `VkBlitImageCubicWeightsInfoQCOM` structure is defined as:

    // Provided by VK_QCOM_filter_cubic_weights
    typedef struct VkBlitImageCubicWeightsInfoQCOM {
        VkStructureType             sType;
        const void*                 pNext;
        VkCubicFilterWeightsQCOM    cubicWeights;
    } VkBlitImageCubicWeightsInfoQCOM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `cubicWeights` is a VkCubicFilterWeightsQCOM value controlling cubic filter weights for the blit.

Valid Usage (Implicit)

- VUID-VkBlitImageCubicWeightsInfoQCOM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_BLIT_IMAGE_CUBIC_WEIGHTS_INFO_QCOM

- VUID-VkBlitImageCubicWeightsInfoQCOM-cubicWeights-parameter
  `cubicWeights` must be a valid VkCubicFilterWeightsQCOM value

Structure Chaining

Extends the structure

  - VkBlitImageInfo2

The `VkImageBlit2` structure is defined as:

    // Provided by VK_VERSION_1_3
    typedef struct VkImageBlit2 {
        VkStructureType             sType;
        const void*                 pNext;
        VkImageSubresourceLayers    srcSubresource;
        VkOffset3D                  srcOffsets[2];
        VkImageSubresourceLayers    dstSubresource;
        VkOffset3D                  dstOffsets[2];
    } VkImageBlit2;

    // Provided by VK_KHR_copy_commands2
    // Equivalent to VkImageBlit2
    typedef VkImageBlit2 VkImageBlit2KHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `srcSubresource` is the subresource to blit from.

- `srcOffsets` is a pointer to an array of two VkOffset3D structures specifying the bounds of the source region within `srcSubresource`.

- `dstSubresource` is the subresource to blit into.

- `dstOffsets` is a pointer to an array of two VkOffset3D structures specifying the bounds of the destination region within `dstSubresource`.

For each element of the `pRegions` array, a blit operation is performed for the specified source and destination regions.

Valid Usage

- VUID-VkImageBlit2-aspectMask-00238
  The `aspectMask` member of `srcSubresource` and `dstSubresource` must match

- VUID-VkImageBlit2-layerCount-08800
  If neither of the `layerCount` members of `srcSubresource` or `dstSubresource` are VK_REMAINING_ARRAY_LAYERS, the `layerCount` members of `srcSubresource` or `dstSubresource` must match

- VUID-VkImageBlit2-layerCount-08801
  If one of the `layerCount` members of `srcSubresource` or `dstSubresource` is VK_REMAINING_ARRAY_LAYERS, the other member must be either VK_REMAINING_ARRAY_LAYERS or equal to the `arrayLayers` member of the VkImageCreateInfo used to create the image minus `baseArrayLayer`

Valid Usage (Implicit)

- VUID-VkImageBlit2-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_IMAGE_BLIT_2

- VUID-VkImageBlit2-pNext-pNext
  `pNext` must be `NULL` or a pointer to a valid instance of VkCopyCommandTransformInfoQCOM

- VUID-VkImageBlit2-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkImageBlit2-srcSubresource-parameter
  `srcSubresource` must be a valid VkImageSubresourceLayers structure

- VUID-VkImageBlit2-dstSubresource-parameter
  `dstSubresource` must be a valid VkImageSubresourceLayers structure

For vkCmdBlitImage2, each region copied can include a rotation. To specify a rotated region, add VkCopyCommandTransformInfoQCOM to the `pNext` chain of VkImageBlit2. For each region with a rotation specified, Image Blits with Scaling and Rotation specifies how coordinates are rotated prior to sampling from the source image. When rotation is specified, the source and destination images must each be 2D images, have a 1x1x1 texel block extent, and only one plane.

#### 26.7.1. Image Blits With Scaling and Rotation

When VkCopyCommandTransformInfoQCOM is in the `pNext` chain of VkImageBlit2, the specified region is rotated during the blit. The following description of rotated addressing replaces the description in vkCmdBlitImage.

The following code computes rotation of normalized coordinates.

    // rotation of normalized coordinates
    VkOffset2D RotateNormUV(VkOffset2D in, VkSurfaceTransformFlagBitsKHR flags)
    {
        VkOffset2D output;
        switch (flags)
        {
            case VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR:
                out.x = in.x;
                out.y = in.y;
                break;
            case VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR:
                out.x = in.y;
                out.y = 1.0 - in.x;
                break;
            case VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR:
                out.x = 1.0 - in.x;
                out.y = 1.0 - in.y;
                break;
            case VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR:
                out.x = 1.0 - in.y;
                out.y = in.x;
                break;
        }
        return out;
    }

- For each destination texel, the integer coordinate of that texel is converted to an unnormalized texture coordinate, using the effective inverse of the equations described in unnormalized to integer conversion:

    ubase = i + ½

    vbase = j + ½

    wbase = k + ½

- These base coordinates are then offset by the first destination offset:

    uoffset = ubase - xdst0

    voffset = vbase - ydst0

    woffset = wbase - zdst0

    aoffset = a - `baseArrayCount`dst

- The UV destination coordinates are scaled by the destination region, rotated, and scaled by the source region.

    udest_scaled = uoffset / (xdst1 - xdst0)

    vdest_scaled = voffset / (ydst1 - ydst0)

    (usrc_scaled, vsrc_scaled) = `RotateNormUV`(udest_scaled, vdest_scaled, `transform`)

    uscaled = usrc_scaled × (xSrc1 - xSrc0)

    vscaled = vsrc_scaled × (ySrc1 - ySrc0)

- The W coordinate is unaffected by rotation. The scale is determined from the ratio of source and destination regions, and applied to the offset coordinate:

    scalew = (zSrc1 - zSrc0) / (zdst1 - zdst0)

    wscaled = woffset × scalew

- Finally the source offset is added to the scaled source coordinates, to determine the final unnormalized coordinates used to sample from `srcImage`:

    u = uscaled + xSrc0

    v = vscaled + ySrc0

    w = wscaled + zSrc0

    q = `mipLevel`

    a = aoffset + `baseArrayCount`src

These coordinates are used to sample from the source image as described for Image Operations, with the filter mode equal to that of `filter`; a mipmap mode of VK_SAMPLER_MIPMAP_MODE_NEAREST; and an address mode of VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE. Implementations must clamp at the edge of the source image, and may additionally clamp to the edge of the source region.

### 26.8. Resolving Multisample Images

To resolve a multisample color image to a non-multisample color image, call:

    // Provided by VK_VERSION_1_0
    void vkCmdResolveImage(
        VkCommandBuffer                             commandBuffer,
        VkImage                                     srcImage,
        VkImageLayout                               srcImageLayout,
        VkImage                                     dstImage,
        VkImageLayout                               dstImageLayout,
        uint32_t                                    regionCount,
        const VkImageResolve*                       pRegions);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `srcImage` is the source image.

- `srcImageLayout` is the layout of the source image subresources for the resolve.

- `dstImage` is the destination image.

- `dstImageLayout` is the layout of the destination image subresources for the resolve.

- `regionCount` is the number of regions to resolve.

- `pRegions` is a pointer to an array of VkImageResolve structures specifying the regions to resolve.

During the resolve the samples corresponding to each pixel location in the source are converted to a single sample before being written to the destination.

If the source format is a floating-point or normalized type, the resolve mode is chosen as implementation-dependent behavior. If the resolve mode requires to calculate the result from multiple samples, such as by computing an average or weighted average of the samples, the values for each pixel are resolved with implementation-defined numerical precision.

If the numeric format of `srcImage` uses sRGB encoding and the resolve mode requires the implementation to convert the samples to floating-point to perform the calculations, the implementation should convert samples from nonlinear to linear before resolving the samples as described in the “sRGB EOTF” section of the Khronos Data Format Specification. In this case, the implementation must convert the linear averaged value to nonlinear before writing the resolved result to `dstImage`. If the `maintenance10` feature is enabled, whether a nonlinear to linear conversion happens for sRGB encoded resolve is controlled by `resolveSrgbFormatAppliesTransferFunction`.

If the source format is an integer type, a single sample’s value is selected for each pixel.

`srcOffset` and `dstOffset` select the initial `x`, `y`, and `z` offsets in texels of the sub-regions of the source and destination image data. `extent` is the size in texels of the source image to resolve in `width`, `height` and `depth`. Each element of `pRegions` must be a region that is contained within its corresponding image.

Resolves are done layer by layer starting with `baseArrayLayer` member of `srcSubresource` for the source and `dstSubresource` for the destination. `layerCount` layers are resolved to the destination image.

Valid Usage

- VUID-vkCmdResolveImage-commandBuffer-01837
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, `srcImage` must not be a protected image

- VUID-vkCmdResolveImage-commandBuffer-01838
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, `dstImage` must not be a protected image

- VUID-vkCmdResolveImage-commandBuffer-01839
  If `commandBuffer` is a protected command buffer and `protectedNoFault` is not supported, `dstImage` must not be an unprotected image

- VUID-vkCmdResolveImage-pRegions-00255
  The union of all source regions, and the union of all destination regions, specified by the elements of `pRegions`, must not overlap in memory

- VUID-vkCmdResolveImage-srcImage-00256
  If `srcImage` is non-sparse then it must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-vkCmdResolveImage-srcImage-00257
  `srcImage` must have a sample count equal to any valid sample count value other than VK_SAMPLE_COUNT_1_BIT

- VUID-vkCmdResolveImage-dstImage-00258
  If `dstImage` is non-sparse then it must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-vkCmdResolveImage-dstImage-00259
  `dstImage` must have a sample count equal to VK_SAMPLE_COUNT_1_BIT

- VUID-vkCmdResolveImage-srcImageLayout-00260
  `srcImageLayout` must specify the layout of the image subresources of `srcImage` specified in `pRegions` at the time this command is executed on a `VkDevice`

- VUID-vkCmdResolveImage-srcImageLayout-01400
  `srcImageLayout` must be VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL

- VUID-vkCmdResolveImage-dstImageLayout-00262
  `dstImageLayout` must specify the layout of the image subresources of `dstImage` specified in `pRegions` at the time this command is executed on a `VkDevice`

- VUID-vkCmdResolveImage-dstImageLayout-01401
  `dstImageLayout` must be VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL

- VUID-vkCmdResolveImage-maintenance10-11799
  If the `maintenance10` feature is enabled, the format features of `dstImage` must contain VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT or VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT

- VUID-vkCmdResolveImage-dstImage-02003
  The format features of `dstImage` must contain VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT if the `maintenance10` feature is not enabled

- VUID-vkCmdResolveImage-linearColorAttachment-06519
  If the `linearColorAttachment` feature is enabled and the image is created with VK_IMAGE_TILING_LINEAR, the format features of `dstImage` must contain VK_FORMAT_FEATURE_2_LINEAR_COLOR_ATTACHMENT_BIT_NV

- VUID-vkCmdResolveImage-srcImage-01386
  `srcImage` and `dstImage` must have been created with the same image format

- VUID-vkCmdResolveImage-srcSubresource-01709
  The `srcSubresource.mipLevel` member of each element of `pRegions` must be less than the `mipLevels` specified in VkImageCreateInfo when `srcImage` was created

- VUID-vkCmdResolveImage-dstSubresource-01710
  The `dstSubresource.mipLevel` member of each element of `pRegions` must be less than the `mipLevels` specified in VkImageCreateInfo when `dstImage` was created

- VUID-vkCmdResolveImage-srcSubresource-01711
  If `srcSubresource.layerCount` is not VK_REMAINING_ARRAY_LAYERS, `srcSubresource.baseArrayLayer` + `srcSubresource.layerCount` of each element of `pRegions` must be less than or equal to the `arrayLayers` specified in VkImageCreateInfo when `srcImage` was created

- VUID-vkCmdResolveImage-dstSubresource-01712
  If `dstSubresource.layerCount` is not VK_REMAINING_ARRAY_LAYERS, `dstSubresource.baseArrayLayer` + `dstSubresource.layerCount` of each element of `pRegions` must be less than or equal to the `arrayLayers` specified in VkImageCreateInfo when `dstImage` was created

- VUID-vkCmdResolveImage-dstImage-02546
  `dstImage` and `srcImage` must not have been created with `flags` containing VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT

- VUID-vkCmdResolveImage-srcImage-04446
  If `dstImage` is of type VK_IMAGE_TYPE_3D, then for each element of `pRegions`, `srcSubresource.layerCount` must be `1`

- VUID-vkCmdResolveImage-srcImage-04447
  If `dstImage` is of type VK_IMAGE_TYPE_3D, then for each element of `pRegions`, `dstSubresource.baseArrayLayer` must be `0` and `dstSubresource.layerCount` must be `1`

- VUID-vkCmdResolveImage-srcOffset-00269
  For each element of `pRegions`, `srcOffset.x` and (`extent.width` + `srcOffset.x`) must both be greater than or equal to `0` and less than or equal to the width of the specified `srcSubresource` of `srcImage`

- VUID-vkCmdResolveImage-srcOffset-00270
  For each element of `pRegions`, `srcOffset.y` and (`extent.height` + `srcOffset.y`) must both be greater than or equal to `0` and less than or equal to the height of the specified `srcSubresource` of `srcImage`

- VUID-vkCmdResolveImage-srcImage-00271
  If `srcImage` is of type VK_IMAGE_TYPE_1D, then for each element of `pRegions`, `srcOffset.y` must be `0` and `extent.height` must be `1`

- VUID-vkCmdResolveImage-srcOffset-00272
  For each element of `pRegions`, `srcOffset.z` and (`extent.depth` + `srcOffset.z`) must both be greater than or equal to `0` and less than or equal to the depth of the specified `srcSubresource` of `srcImage`

- VUID-vkCmdResolveImage-srcImage-00273
  If `srcImage` is of type VK_IMAGE_TYPE_1D or VK_IMAGE_TYPE_2D, then for each element of `pRegions`, `srcOffset.z` must be `0` and `extent.depth` must be `1`

- VUID-vkCmdResolveImage-dstOffset-00274
  For each element of `pRegions`, `dstOffset.x` and (`extent.width` + `dstOffset.x`) must both be greater than or equal to `0` and less than or equal to the width of the specified `dstSubresource` of `dstImage`

- VUID-vkCmdResolveImage-dstOffset-00275
  For each element of `pRegions`, `dstOffset.y` and (`extent.height` + `dstOffset.y`) must both be greater than or equal to `0` and less than or equal to the height of the specified `dstSubresource` of `dstImage`

- VUID-vkCmdResolveImage-dstImage-00276
  If `dstImage` is of type VK_IMAGE_TYPE_1D, then for each element of `pRegions`, `dstOffset.y` must be `0` and `extent.height` must be `1`

- VUID-vkCmdResolveImage-dstOffset-00277
  For each element of `pRegions`, `dstOffset.z` and (`extent.depth` + `dstOffset.z`) must both be greater than or equal to `0` and less than or equal to the depth of the specified `dstSubresource` of `dstImage`

- VUID-vkCmdResolveImage-dstImage-00278
  If `dstImage` is of type VK_IMAGE_TYPE_1D or VK_IMAGE_TYPE_2D, then for each element of `pRegions`, `dstOffset.z` must be `0` and `extent.depth` must be `1`

- VUID-vkCmdResolveImage-srcImage-06762
  `srcImage` must have been created with the VK_IMAGE_USAGE_TRANSFER_SRC_BIT usage flag set

- VUID-vkCmdResolveImage-srcImage-06763
  The format features of `srcImage` must contain VK_FORMAT_FEATURE_TRANSFER_SRC_BIT

- VUID-vkCmdResolveImage-dstImage-06764
  `dstImage` must have been created with the VK_IMAGE_USAGE_TRANSFER_DST_BIT usage flag set

- VUID-vkCmdResolveImage-dstImage-06765
  The format features of `dstImage` must contain VK_FORMAT_FEATURE_TRANSFER_DST_BIT

- VUID-vkCmdResolveImage-srcSubresource-11800
  `srcSubresource.aspectMask` for each element in `pRegions` must not specify an aspect which is not part of the image format of `srcImage`

- VUID-vkCmdResolveImage-dstSubresource-11801
  `dstSubresource.aspectMask` for each element in `pRegions` must not specify an aspect which is not part of the image format of `dstImage`

- VUID-vkCmdResolveImage-srcSubresource-11802
  `srcSubresource.aspectMask` must equal `dstSubresource.aspectMask` for each element in `pRegions`

Valid Usage (Implicit)

- VUID-vkCmdResolveImage-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdResolveImage-srcImage-parameter
  `srcImage` must be a valid VkImage handle

- VUID-vkCmdResolveImage-srcImageLayout-parameter
  `srcImageLayout` must be a valid VkImageLayout value

- VUID-vkCmdResolveImage-dstImage-parameter
  `dstImage` must be a valid VkImage handle

- VUID-vkCmdResolveImage-dstImageLayout-parameter
  `dstImageLayout` must be a valid VkImageLayout value

- VUID-vkCmdResolveImage-pRegions-parameter
  `pRegions` must be a valid pointer to an array of `regionCount` valid VkImageResolve structures

- VUID-vkCmdResolveImage-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdResolveImage-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdResolveImage-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdResolveImage-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdResolveImage-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdResolveImage-regionCount-arraylength
  `regionCount` must be greater than `0`

- VUID-vkCmdResolveImage-commonparent
  Each of `commandBuffer`, `dstImage`, and `srcImage` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Outside | VK_QUEUE_GRAPHICS_BIT | Action

Conditional Rendering

vkCmdResolveImage is not affected by conditional rendering

The `VkImageResolve` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkImageResolve {
        VkImageSubresourceLayers    srcSubresource;
        VkOffset3D                  srcOffset;
        VkImageSubresourceLayers    dstSubresource;
        VkOffset3D                  dstOffset;
        VkExtent3D                  extent;
    } VkImageResolve;

- `srcSubresource` and `dstSubresource` are VkImageSubresourceLayers structures specifying the image subresources of the images used for the source and destination image data, respectively. Resolve of depth/stencil images is not supported. VkImageResolve2 can support resolve of depth/stencil images with `maintenance10` instead.

- `srcOffset` and `dstOffset` select the initial `x`, `y`, and `z` offsets in texels of the sub-regions of the source and destination image data.

- `extent` is the size in texels of the source image to resolve in `width`, `height` and `depth`.

Valid Usage

- VUID-VkImageResolve-aspectMask-10981
  The `aspectMask` member of `srcSubresource` and `dstSubresource` must only contain VK_IMAGE_ASPECT_COLOR_BIT

- VUID-VkImageResolve-layerCount-08803
  If neither of the `layerCount` members of `srcSubresource` or `dstSubresource` are VK_REMAINING_ARRAY_LAYERS, the `layerCount` member of `srcSubresource` and `dstSubresource` must match

- VUID-VkImageResolve-layerCount-08804
  If one of the `layerCount` members of `srcSubresource` or `dstSubresource` is VK_REMAINING_ARRAY_LAYERS, the other member must be either VK_REMAINING_ARRAY_LAYERS or equal to the `arrayLayers` member of the VkImageCreateInfo used to create the image minus `baseArrayLayer`

Valid Usage (Implicit)

- VUID-VkImageResolve-srcSubresource-parameter
  `srcSubresource` must be a valid VkImageSubresourceLayers structure

- VUID-VkImageResolve-dstSubresource-parameter
  `dstSubresource` must be a valid VkImageSubresourceLayers structure

A more extensible version of the resolve image command is defined below.

To resolve a multisample image to a non-multisample image, call:

    // Provided by VK_VERSION_1_3
    void vkCmdResolveImage2(
        VkCommandBuffer                             commandBuffer,
        const VkResolveImageInfo2*                  pResolveImageInfo);

    // Provided by VK_KHR_copy_commands2
    // Equivalent to vkCmdResolveImage2
    void vkCmdResolveImage2KHR(
        VkCommandBuffer                             commandBuffer,
        const VkResolveImageInfo2*                  pResolveImageInfo);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `pResolveImageInfo` is a pointer to a VkResolveImageInfo2 structure describing the resolve parameters.

This command is functionally identical to vkCmdResolveImage, but includes extensible sub-structures that include `sType` and `pNext` parameters, allowing them to be more easily extended.

Valid Usage

- VUID-vkCmdResolveImage2-commandBuffer-01837
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, `srcImage` must not be a protected image

- VUID-vkCmdResolveImage2-commandBuffer-01838
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, `dstImage` must not be a protected image

- VUID-vkCmdResolveImage2-commandBuffer-01839
  If `commandBuffer` is a protected command buffer and `protectedNoFault` is not supported, `dstImage` must not be an unprotected image

Valid Usage (Implicit)

- VUID-vkCmdResolveImage2-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdResolveImage2-pResolveImageInfo-parameter
  `pResolveImageInfo` must be a valid pointer to a valid VkResolveImageInfo2 structure

- VUID-vkCmdResolveImage2-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdResolveImage2-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdResolveImage2-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdResolveImage2-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdResolveImage2-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Outside | VK_QUEUE_GRAPHICS_BIT | Action

Conditional Rendering

vkCmdResolveImage2 is not affected by conditional rendering

The `VkResolveImageInfo2` structure is defined as:

    // Provided by VK_VERSION_1_3
    typedef struct VkResolveImageInfo2 {
        VkStructureType           sType;
        const void*               pNext;
        VkImage                   srcImage;
        VkImageLayout             srcImageLayout;
        VkImage                   dstImage;
        VkImageLayout             dstImageLayout;
        uint32_t                  regionCount;
        const VkImageResolve2*    pRegions;
    } VkResolveImageInfo2;

    // Provided by VK_KHR_copy_commands2
    // Equivalent to VkResolveImageInfo2
    typedef VkResolveImageInfo2 VkResolveImageInfo2KHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `srcImage` is the source image.

- `srcImageLayout` is the layout of the source image subresources for the resolve.

- `dstImage` is the destination image.

- `dstImageLayout` is the layout of the destination image subresources for the resolve.

- `regionCount` is the number of regions to resolve.

- `pRegions` is a pointer to an array of VkImageResolve2 structures specifying the regions to resolve.

If the source format is a floating-point or normalized type, the resolve mode is chosen as implementation-dependent behavior, unless VkResolveImageModeInfoKHR is included in the `pNext` chain, in which case it is defined by VkResolveImageModeInfoKHR::`resolveMode`. If the resolve mode requires to calculate the result from multiple samples, such as by computing an average or weighted average of the samples, the values for each pixel are resolved with implementation-defined numerical precision.

If the numeric format of `srcImage` uses sRGB encoding and the resolve mode requires the implementation to convert the samples to floating-point to perform the calculations, the implementation should convert samples from nonlinear to linear before resolving the samples as described in the “sRGB EOTF” section of the Khronos Data Format Specification. In this case, the implementation must convert the linear averaged value to nonlinear before writing the resolved result to `dstImage`. If the `maintenance10` feature is enabled, whether a nonlinear to linear conversion happens for sRGB encoded resolve is controlled by `resolveSrgbFormatAppliesTransferFunction`. If VkResolveImageModeInfoKHR is included in the `pNext` chain, this default behavior can be overridden with VK_RESOLVE_IMAGE_SKIP_TRANSFER_FUNCTION_BIT_KHR or VK_RESOLVE_IMAGE_ENABLE_TRANSFER_FUNCTION_BIT_KHR flags.

If the source format is an integer type, a single sample’s value is selected for each pixel, unless VkResolveImageModeInfoKHR is included in the `pNext` chain, in which case it is defined by VkResolveImageModeInfoKHR::`resolveMode` or VkResolveImageModeInfoKHR::`stencilResolveMode` depending on which aspect is being resolved.

Valid Usage

- VUID-VkResolveImageInfo2-pRegions-00255
  The union of all source regions, and the union of all destination regions, specified by the elements of `pRegions`, must not overlap in memory

- VUID-VkResolveImageInfo2-srcImage-00256
  If `srcImage` is non-sparse then it must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-VkResolveImageInfo2-srcImage-00257
  `srcImage` must have a sample count equal to any valid sample count value other than VK_SAMPLE_COUNT_1_BIT

- VUID-VkResolveImageInfo2-dstImage-00258
  If `dstImage` is non-sparse then it must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-VkResolveImageInfo2-dstImage-00259
  `dstImage` must have a sample count equal to VK_SAMPLE_COUNT_1_BIT

- VUID-VkResolveImageInfo2-srcImageLayout-00260
  `srcImageLayout` must specify the layout of the image subresources of `srcImage` specified in `pRegions` at the time this command is executed on a `VkDevice`

- VUID-VkResolveImageInfo2-srcImageLayout-01400
  `srcImageLayout` must be VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL

- VUID-VkResolveImageInfo2-dstImageLayout-00262
  `dstImageLayout` must specify the layout of the image subresources of `dstImage` specified in `pRegions` at the time this command is executed on a `VkDevice`

- VUID-VkResolveImageInfo2-dstImageLayout-01401
  `dstImageLayout` must be VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL

- VUID-VkResolveImageInfo2-maintenance10-11799
  If the `maintenance10` feature is enabled, the format features of `dstImage` must contain VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT or VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT

- VUID-VkResolveImageInfo2-dstImage-02003
  The format features of `dstImage` must contain VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT if the `maintenance10` feature is not enabled

- VUID-VkResolveImageInfo2-linearColorAttachment-06519
  If the `linearColorAttachment` feature is enabled and the image is created with VK_IMAGE_TILING_LINEAR, the format features of `dstImage` must contain VK_FORMAT_FEATURE_2_LINEAR_COLOR_ATTACHMENT_BIT_NV

- VUID-VkResolveImageInfo2-srcImage-01386
  `srcImage` and `dstImage` must have been created with the same image format

- VUID-VkResolveImageInfo2-srcSubresource-01709
  The `srcSubresource.mipLevel` member of each element of `pRegions` must be less than the `mipLevels` specified in VkImageCreateInfo when `srcImage` was created

- VUID-VkResolveImageInfo2-dstSubresource-01710
  The `dstSubresource.mipLevel` member of each element of `pRegions` must be less than the `mipLevels` specified in VkImageCreateInfo when `dstImage` was created

- VUID-VkResolveImageInfo2-srcSubresource-01711
  If `srcSubresource.layerCount` is not VK_REMAINING_ARRAY_LAYERS, `srcSubresource.baseArrayLayer` + `srcSubresource.layerCount` of each element of `pRegions` must be less than or equal to the `arrayLayers` specified in VkImageCreateInfo when `srcImage` was created

- VUID-VkResolveImageInfo2-dstSubresource-01712
  If `dstSubresource.layerCount` is not VK_REMAINING_ARRAY_LAYERS, `dstSubresource.baseArrayLayer` + `dstSubresource.layerCount` of each element of `pRegions` must be less than or equal to the `arrayLayers` specified in VkImageCreateInfo when `dstImage` was created

- VUID-VkResolveImageInfo2-dstImage-02546
  `dstImage` and `srcImage` must not have been created with `flags` containing VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT

- VUID-VkResolveImageInfo2-srcImage-04446
  If `dstImage` is of type VK_IMAGE_TYPE_3D, then for each element of `pRegions`, `srcSubresource.layerCount` must be `1`

- VUID-VkResolveImageInfo2-srcImage-04447
  If `dstImage` is of type VK_IMAGE_TYPE_3D, then for each element of `pRegions`, `dstSubresource.baseArrayLayer` must be `0` and `dstSubresource.layerCount` must be `1`

- VUID-VkResolveImageInfo2-srcOffset-00269
  For each element of `pRegions`, `srcOffset.x` and (`extent.width` + `srcOffset.x`) must both be greater than or equal to `0` and less than or equal to the width of the specified `srcSubresource` of `srcImage`

- VUID-VkResolveImageInfo2-srcOffset-00270
  For each element of `pRegions`, `srcOffset.y` and (`extent.height` + `srcOffset.y`) must both be greater than or equal to `0` and less than or equal to the height of the specified `srcSubresource` of `srcImage`

- VUID-VkResolveImageInfo2-srcImage-00271
  If `srcImage` is of type VK_IMAGE_TYPE_1D, then for each element of `pRegions`, `srcOffset.y` must be `0` and `extent.height` must be `1`

- VUID-VkResolveImageInfo2-srcOffset-00272
  For each element of `pRegions`, `srcOffset.z` and (`extent.depth` + `srcOffset.z`) must both be greater than or equal to `0` and less than or equal to the depth of the specified `srcSubresource` of `srcImage`

- VUID-VkResolveImageInfo2-srcImage-00273
  If `srcImage` is of type VK_IMAGE_TYPE_1D or VK_IMAGE_TYPE_2D, then for each element of `pRegions`, `srcOffset.z` must be `0` and `extent.depth` must be `1`

- VUID-VkResolveImageInfo2-dstOffset-00274
  For each element of `pRegions`, `dstOffset.x` and (`extent.width` + `dstOffset.x`) must both be greater than or equal to `0` and less than or equal to the width of the specified `dstSubresource` of `dstImage`

- VUID-VkResolveImageInfo2-dstOffset-00275
  For each element of `pRegions`, `dstOffset.y` and (`extent.height` + `dstOffset.y`) must both be greater than or equal to `0` and less than or equal to the height of the specified `dstSubresource` of `dstImage`

- VUID-VkResolveImageInfo2-dstImage-00276
  If `dstImage` is of type VK_IMAGE_TYPE_1D, then for each element of `pRegions`, `dstOffset.y` must be `0` and `extent.height` must be `1`

- VUID-VkResolveImageInfo2-dstOffset-00277
  For each element of `pRegions`, `dstOffset.z` and (`extent.depth` + `dstOffset.z`) must both be greater than or equal to `0` and less than or equal to the depth of the specified `dstSubresource` of `dstImage`

- VUID-VkResolveImageInfo2-dstImage-00278
  If `dstImage` is of type VK_IMAGE_TYPE_1D or VK_IMAGE_TYPE_2D, then for each element of `pRegions`, `dstOffset.z` must be `0` and `extent.depth` must be `1`

- VUID-VkResolveImageInfo2-srcImage-06762
  `srcImage` must have been created with the VK_IMAGE_USAGE_TRANSFER_SRC_BIT usage flag set

- VUID-VkResolveImageInfo2-srcImage-06763
  The format features of `srcImage` must contain VK_FORMAT_FEATURE_TRANSFER_SRC_BIT

- VUID-VkResolveImageInfo2-dstImage-06764
  `dstImage` must have been created with the VK_IMAGE_USAGE_TRANSFER_DST_BIT usage flag set

- VUID-VkResolveImageInfo2-dstImage-06765
  The format features of `dstImage` must contain VK_FORMAT_FEATURE_TRANSFER_DST_BIT

- VUID-VkResolveImageInfo2-srcSubresource-11800
  `srcSubresource.aspectMask` for each element in `pRegions` must not specify an aspect which is not part of the image format of `srcImage`

- VUID-VkResolveImageInfo2-dstSubresource-11801
  `dstSubresource.aspectMask` for each element in `pRegions` must not specify an aspect which is not part of the image format of `dstImage`

- VUID-VkResolveImageInfo2-srcSubresource-11802
  `srcSubresource.aspectMask` must equal `dstSubresource.aspectMask` for each element in `pRegions`

- VUID-VkResolveImageInfo2-pNext-10982
  If VkResolveImageModeInfoKHR is included in the `pNext` chain, `flags` includes VK_RESOLVE_IMAGE_SKIP_TRANSFER_FUNCTION_BIT_KHR or VK_RESOLVE_IMAGE_ENABLE_TRANSFER_FUNCTION_BIT_KHR, then the format of `srcImage` and `dstImage` must use sRGB encoding

- VUID-VkResolveImageInfo2-srcImage-10983
  If `srcImage` has a color format and VkResolveImageModeInfoKHR is included in the `pNext` chain, its `resolveMode` must not be VK_RESOLVE_MODE_NONE

- VUID-VkResolveImageInfo2-srcImage-10984
  If `srcImage` has a non-integer color format, and VkResolveImageModeInfoKHR is included in the `pNext` chain, its `resolveMode` must be VK_RESOLVE_MODE_AVERAGE_BIT

- VUID-VkResolveImageInfo2-srcImage-10985
  If `srcImage` has an integer color format, and VkResolveImageModeInfoKHR is included in the `pNext` chain, its `resolveMode` must be VK_RESOLVE_MODE_SAMPLE_ZERO_BIT

- VUID-VkResolveImageInfo2-srcImage-10986
  If `srcImage` has a depth-stencil format, VkResolveImageModeInfoKHR must be included in the `pNext` chain

- VUID-VkResolveImageInfo2-srcImage-10987
  If `srcImage` has a depth-stencil format, and a depth aspect is referenced by `pRegions`, VkResolveImageModeInfoKHR::`resolveMode` must not be VK_RESOLVE_MODE_NONE

- VUID-VkResolveImageInfo2-srcImage-10988
  If `srcImage` has a depth-stencil format, and a stencil aspect is referenced by `pRegions`, VkResolveImageModeInfoKHR::`stencilResolveMode` must not be VK_RESOLVE_MODE_NONE

- VUID-VkResolveImageInfo2-srcImage-10989
  If `srcImage` has a depth-stencil format, and a depth aspect is referenced by `pRegions`, VkResolveImageModeInfoKHR::`resolveMode` must be one of the bits set in VkPhysicalDeviceDepthStencilResolveProperties::`supportedDepthResolveModes`

- VUID-VkResolveImageInfo2-srcImage-10990
  If `srcImage` has a depth-stencil format, and a stencil aspect is referenced by `pRegions`, VkResolveImageModeInfoKHR::`stencilResolveMode` must be one of the bits set in VkPhysicalDeviceDepthStencilResolveProperties::`supportedStencilResolveModes`

- VUID-VkResolveImageInfo2-srcImage-10991
  If `srcImage` has a depth-stencil format, and both a depth aspect and stencil aspect is referenced by `pRegions`, and VkPhysicalDeviceDepthStencilResolveProperties::`indepdendentResolve` is VK_FALSE, VkResolveImageModeInfoKHR::`resolveMode` must be equal to VkResolveImageModeInfoKHR::`stencilResolveMode`

- VUID-VkResolveImageInfo2-srcImage-10992
  If `srcImage` has a depth-stencil format containing both a depth aspect and stencil aspect, and VkPhysicalDeviceDepthStencilResolveProperties::`indepdendentResolveNone` is VK_FALSE, every element of `pRegions` must contain both depth and stencil aspects

Valid Usage (Implicit)

- VUID-VkResolveImageInfo2-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_RESOLVE_IMAGE_INFO_2

- VUID-VkResolveImageInfo2-pNext-pNext
  `pNext` must be `NULL` or a pointer to a valid instance of VkResolveImageModeInfoKHR

- VUID-VkResolveImageInfo2-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkResolveImageInfo2-srcImage-parameter
  `srcImage` must be a valid VkImage handle

- VUID-VkResolveImageInfo2-srcImageLayout-parameter
  `srcImageLayout` must be a valid VkImageLayout value

- VUID-VkResolveImageInfo2-dstImage-parameter
  `dstImage` must be a valid VkImage handle

- VUID-VkResolveImageInfo2-dstImageLayout-parameter
  `dstImageLayout` must be a valid VkImageLayout value

- VUID-VkResolveImageInfo2-pRegions-parameter
  `pRegions` must be a valid pointer to an array of `regionCount` valid VkImageResolve2 structures

- VUID-VkResolveImageInfo2-regionCount-arraylength
  `regionCount` must be greater than `0`

- VUID-VkResolveImageInfo2-commonparent
  Both of `dstImage`, and `srcImage` must have been created, allocated, or retrieved from the same VkDevice

The `VkImageResolve2` structure is defined as:

    // Provided by VK_VERSION_1_3
    typedef struct VkImageResolve2 {
        VkStructureType             sType;
        const void*                 pNext;
        VkImageSubresourceLayers    srcSubresource;
        VkOffset3D                  srcOffset;
        VkImageSubresourceLayers    dstSubresource;
        VkOffset3D                  dstOffset;
        VkExtent3D                  extent;
    } VkImageResolve2;

    // Provided by VK_KHR_copy_commands2
    // Equivalent to VkImageResolve2
    typedef VkImageResolve2 VkImageResolve2KHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `srcSubresource` and `dstSubresource` are VkImageSubresourceLayers structures specifying the image subresources of the images used for the source and destination image data, respectively.

- `srcOffset` and `dstOffset` select the initial `x`, `y`, and `z` offsets in texels of the sub-regions of the source and destination image data.

- `extent` is the size in texels of the source image to resolve in `width`, `height` and `depth`.

Valid Usage

- VUID-VkImageResolve2-aspectMask-10993
  The `aspectMask` member of `srcSubresource` and `dstSubresource` must only contain VK_IMAGE_ASPECT_DEPTH_BIT, VK_IMAGE_ASPECT_STENCIL_BIT, or VK_IMAGE_ASPECT_COLOR_BIT

- VUID-VkImageResolve2-maintenance10-10994
  If `maintenance10` feature is not enabled, `srcSubresource` and `dstSubresource` must not contain VK_IMAGE_ASPECT_DEPTH_BIT or VK_IMAGE_ASPECT_STENCIL_BIT

- VUID-VkImageResolve2-layerCount-08803
  If neither of the `layerCount` members of `srcSubresource` or `dstSubresource` are VK_REMAINING_ARRAY_LAYERS, the `layerCount` member of `srcSubresource` and `dstSubresource` must match

- VUID-VkImageResolve2-layerCount-08804
  If one of the `layerCount` members of `srcSubresource` or `dstSubresource` is VK_REMAINING_ARRAY_LAYERS, the other member must be either VK_REMAINING_ARRAY_LAYERS or equal to the `arrayLayers` member of the VkImageCreateInfo used to create the image minus `baseArrayLayer`

Valid Usage (Implicit)

- VUID-VkImageResolve2-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_IMAGE_RESOLVE_2

- VUID-VkImageResolve2-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkImageResolve2-srcSubresource-parameter
  `srcSubresource` must be a valid VkImageSubresourceLayers structure

- VUID-VkImageResolve2-dstSubresource-parameter
  `dstSubresource` must be a valid VkImageSubresourceLayers structure

The `VkResolveImageModeInfoKHR` structure is defined as:

    // Provided by VK_KHR_maintenance10
    typedef struct VkResolveImageModeInfoKHR {
        VkStructureType           sType;
        const void*               pNext;
        VkResolveImageFlagsKHR    flags;
        VkResolveModeFlagBits     resolveMode;
        VkResolveModeFlagBits     stencilResolveMode;
    } VkResolveImageModeInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask of VkResolveImageFlagBitsKHR.

- `resolveMode` is a VkResolveModeFlagBits value defining how `srcImage` will be resolved into `dstImage` when resolving non-stencil values.

- `stencilResolveMode` is a VkResolveModeFlagBits value defining how `srcImage` will be resolved into `dstImage` when resolving stencil values.

Valid Usage

- VUID-VkResolveImageModeInfoKHR-flags-10995
  If `flags` includes VK_RESOLVE_IMAGE_SKIP_TRANSFER_FUNCTION_BIT_KHR, `flags` must not include VK_RESOLVE_IMAGE_ENABLE_TRANSFER_FUNCTION_BIT_KHR

- VUID-VkResolveImageModeInfoKHR-flags-10996
  If `flags` includes VK_RESOLVE_IMAGE_SKIP_TRANSFER_FUNCTION_BIT_KHR or VK_RESOLVE_IMAGE_ENABLE_TRANSFER_FUNCTION_BIT_KHR, `resolveSrgbFormatSupportsTransferFunctionControl` must be VK_TRUE

- VUID-VkResolveImageModeInfoKHR-flags-10997
  If `flags` includes VK_RESOLVE_IMAGE_SKIP_TRANSFER_FUNCTION_BIT_KHR or VK_RESOLVE_IMAGE_ENABLE_TRANSFER_FUNCTION_BIT_KHR, `resolveMode` must be equal to VK_RESOLVE_MODE_AVERAGE_BIT

Valid Usage (Implicit)

- VUID-VkResolveImageModeInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_RESOLVE_IMAGE_MODE_INFO_KHR

- VUID-VkResolveImageModeInfoKHR-flags-parameter
  `flags` must be a valid combination of VkResolveImageFlagBitsKHR values

- VUID-VkResolveImageModeInfoKHR-resolveMode-parameter
  If `resolveMode` is not `0`, `resolveMode` must be a valid VkResolveModeFlagBits value

- VUID-VkResolveImageModeInfoKHR-stencilResolveMode-parameter
  If `stencilResolveMode` is not `0`, `stencilResolveMode` must be a valid VkResolveModeFlagBits value

Structure Chaining

Extends the structure

  - VkResolveImageInfo2

Bits which can be set in VkResolveImageModeInfoKHR::`flags`, describing additional properties of a resolve operation, are:

    // Provided by VK_KHR_maintenance10
    typedef enum VkResolveImageFlagBitsKHR {
      // Provided by VK_KHR_maintenance10 with VK_VERSION_1_3 or VK_KHR_copy_commands2
        VK_RESOLVE_IMAGE_SKIP_TRANSFER_FUNCTION_BIT_KHR = 0x00000001,
      // Provided by VK_KHR_maintenance10 with VK_VERSION_1_3 or VK_KHR_copy_commands2
        VK_RESOLVE_IMAGE_ENABLE_TRANSFER_FUNCTION_BIT_KHR = 0x00000002,
    } VkResolveImageFlagBitsKHR;

- VK_RESOLVE_IMAGE_SKIP_TRANSFER_FUNCTION_BIT_KHR specifies that resolve operations happening to an sRGB encoded image must not convert samples from nonlinear to linear before averaging.

- VK_RESOLVE_IMAGE_ENABLE_TRANSFER_FUNCTION_BIT_KHR specifies that resolve operations happening to an sRGB encoded image must convert samples from nonlinear to linear before averaging.

    // Provided by VK_KHR_maintenance10
    typedef VkFlags VkResolveImageFlagsKHR;

`VkResolveImageFlagsKHR` is a bitmask type for setting a mask of zero or more VkResolveImageFlagBitsKHR.

### 26.9. Buffer Markers

Buffer marker write commands are as follows:

`VkMemoryMarkerInfoAMD` is defined as:

    // Provided by VK_KHR_device_address_commands with VK_AMD_buffer_marker
    typedef struct VkMemoryMarkerInfoAMD {
        VkStructureType             sType;
        const void*                 pNext;
        VkPipelineStageFlags2KHR    stage;
        VkDeviceAddressRangeKHR     dstRange;
        VkAddressCommandFlagsKHR    dstFlags;
        uint32_t                    marker;
    } VkMemoryMarkerInfoAMD;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `stage` specifies the pipeline stage whose completion triggers the marker write.

- `dstRange` is the VkDeviceAddressRangeKHR where the marker will be written.

- `dstFlags` is a VkAddressCommandFlagsKHR value defining the copy flags for the destination address range.

- `marker` is the 32-bit value of the marker.

Valid Usage

- VUID-VkMemoryMarkerInfoAMD-dstRange-13097
  If the range specified by `dstRange` is not bound completely to memory when accessed, `dstFlags` must not include VK_ADDRESS_COMMAND_FULLY_BOUND_BIT_KHR

- VUID-VkMemoryMarkerInfoAMD-dstRange-13098
  If the buffer from which the range specified by `dstRange` was created with VK_BUFFER_CREATE_PROTECTED_BIT, and `protectedNoFault` is not supported, `dstFlags` must include VK_ADDRESS_COMMAND_PROTECTED_BIT_KHR

- VUID-VkMemoryMarkerInfoAMD-dstRange-13099
  If the buffer from which the range specified by `dstRange` was created without VK_BUFFER_CREATE_PROTECTED_BIT, and `protectedNoFault` is not supported, `dstFlags` must not include VK_ADDRESS_COMMAND_PROTECTED_BIT_KHR

- VUID-VkMemoryMarkerInfoAMD-dstFlags-13100
  `dstFlags` must not include both VK_ADDRESS_COMMAND_STORAGE_BUFFER_USAGE_BIT_KHR and VK_ADDRESS_COMMAND_UNKNOWN_STORAGE_BUFFER_USAGE_BIT_KHR

- VUID-VkMemoryMarkerInfoAMD-dstRange-13122
  If any buffer, which is bound to a range of VkDeviceMemory that overlaps the range backing `dstRange`, was created with VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, `dstFlags` must include VK_ADDRESS_COMMAND_STORAGE_BUFFER_USAGE_BIT_KHR or VK_ADDRESS_COMMAND_UNKNOWN_STORAGE_BUFFER_USAGE_BIT_KHR

- VUID-VkMemoryMarkerInfoAMD-dstRange-13123
  If any buffer, which is bound to a range of VkDeviceMemory that overlaps the range backing `dstRange`, was created without VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, `dstFlags` must not include VK_ADDRESS_COMMAND_STORAGE_BUFFER_USAGE_BIT_KHR

- VUID-VkMemoryMarkerInfoAMD-dstFlags-13101
  `dstFlags` must not include both VK_ADDRESS_COMMAND_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR and VK_ADDRESS_COMMAND_UNKNOWN_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR

- VUID-VkMemoryMarkerInfoAMD-dstRange-13124
  If any buffer, which is bound to a range of VkDeviceMemory that overlaps the range backing `dstRange`, was created with VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT, `dstFlags` must include VK_ADDRESS_COMMAND_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR or VK_ADDRESS_COMMAND_UNKNOWN_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR

- VUID-VkMemoryMarkerInfoAMD-dstRange-13125
  If any buffer, which is bound to a range of VkDeviceMemory that overlaps the range backing `dstRange`, was created without VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT, `dstFlags` must not include VK_ADDRESS_COMMAND_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR

- VUID-VkMemoryMarkerInfoAMD-stage-03929
  If the `geometryShader` feature is not enabled, `stage` must not contain VK_PIPELINE_STAGE_2_GEOMETRY_SHADER_BIT

- VUID-VkMemoryMarkerInfoAMD-stage-03930
  If the `tessellationShader` feature is not enabled, `stage` must not contain VK_PIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT or VK_PIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT

- VUID-VkMemoryMarkerInfoAMD-stage-03931
  If the `conditionalRendering` feature is not enabled, `stage` must not contain VK_PIPELINE_STAGE_2_CONDITIONAL_RENDERING_BIT_EXT

- VUID-VkMemoryMarkerInfoAMD-stage-03932
  If the `fragmentDensityMap` feature is not enabled, `stage` must not contain VK_PIPELINE_STAGE_2_FRAGMENT_DENSITY_PROCESS_BIT_EXT

- VUID-VkMemoryMarkerInfoAMD-stage-03933
  If the `transformFeedback` feature is not enabled, `stage` must not contain VK_PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT

- VUID-VkMemoryMarkerInfoAMD-stage-03934
  If the `meshShader` feature is not enabled, `stage` must not contain VK_PIPELINE_STAGE_2_MESH_SHADER_BIT_EXT

- VUID-VkMemoryMarkerInfoAMD-stage-03935
  If the `taskShader` feature is not enabled, `stage` must not contain VK_PIPELINE_STAGE_2_TASK_SHADER_BIT_EXT

- VUID-VkMemoryMarkerInfoAMD-stage-07316
  If neither of the `shadingRateImage` or the `attachmentFragmentShadingRate` features are enabled, `stage` must not contain VK_PIPELINE_STAGE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

- VUID-VkMemoryMarkerInfoAMD-stage-04957
  If the `subpassShading` feature is not enabled, `stage` must not contain VK_PIPELINE_STAGE_2_SUBPASS_SHADER_BIT_HUAWEI

- VUID-VkMemoryMarkerInfoAMD-stage-04995
  If the `invocationMask` feature is not enabled, `stage` must not contain VK_PIPELINE_STAGE_2_INVOCATION_MASK_BIT_HUAWEI

- VUID-VkMemoryMarkerInfoAMD-stage-07946
  If neither the VK_NV_ray_tracing extension or the `rayTracingPipeline` feature are enabled, `stage` must not contain VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR

- VUID-VkMemoryMarkerInfoAMD-stage-10751
  If the `accelerationStructure` feature is not enabled, `stage` must not contain VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR

- VUID-VkMemoryMarkerInfoAMD-stage-10752
  If the `rayTracingMaintenance1` feature is not enabled, `stage` must not contain VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR

- VUID-VkMemoryMarkerInfoAMD-stage-11541
  If the `VkPhysicalDeviceOpacityMicromapFeaturesEXT`::`micromap` feature is not enabled, `stage` must not contain VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT

- VUID-VkMemoryMarkerInfoAMD-stage-13038
  `stage` must include only a single pipeline stage

- VUID-VkMemoryMarkerInfoAMD-dstRange-13039
  The buffer from which `dstRange` was queried must have been created with VK_BUFFER_USAGE_TRANSFER_DST_BIT usage flag

- VUID-VkMemoryMarkerInfoAMD-dstRange-13040
  `dstRange.address` must be a multiple of 4

- VUID-VkMemoryMarkerInfoAMD-dstRange-13041
  `dstRange.size` must be greater than or equal to 4

Valid Usage (Implicit)

- VUID-VkMemoryMarkerInfoAMD-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_MEMORY_MARKER_INFO_AMD

- VUID-VkMemoryMarkerInfoAMD-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkMemoryMarkerInfoAMD-stage-parameter
  `stage` must be a valid combination of VkPipelineStageFlagBits2KHR values

- VUID-VkMemoryMarkerInfoAMD-stage-requiredbitmask
  `stage` must not be `0`

- VUID-VkMemoryMarkerInfoAMD-dstFlags-parameter
  `dstFlags` must be a valid combination of VkAddressCommandFlagBitsKHR values

To write a 32-bit marker value into memory as a pipelined operation, call:

    // Provided by VK_KHR_device_address_commands with VK_AMD_buffer_marker
    void vkCmdWriteMarkerToMemoryAMD(
        VkCommandBuffer                             commandBuffer,
        const VkMemoryMarkerInfoAMD*                pInfo);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `pInfo` specifies a pointer to an VkMemoryMarkerInfoAMD structure defining parameters of this command.

When `vkCmdWriteMarkerToMemoryAMD` is submitted to a queue, it defines an execution dependency between prior operations and writing the marker value, as well as a memory dependency from earlier buffer marker write commands.

The first synchronization scope includes operations performed by operations that occur earlier in submission order in the pipeline stage identified by `pInfo->stage`. It additionally includes other buffer marker write commands that occur earlier in submission order that specified either the same `pInfo->stage` or a stage that is logically earlier.

The second synchronization scope includes only the buffer marker write.

The first access scope includes only accesses performed by other buffer marker write commands.

The second access scope is empty.

The access scope for buffer marker writes falls under the VK_ACCESS_TRANSFER_WRITE_BIT flag, and is performed by either `pInfo->stage` or VK_PIPELINE_STAGE_TRANSFER_BIT. Synchronization commands should specify this access flag and both pipeline stages when defining dependencies with this command.

Note | Similar to `vkCmdWriteTimestamp2`, if an implementation is unable to write a marker at any specific pipeline stage, it may instead do so at any logically later stage.

Note | Implementations may only support a limited number of pipelined marker write operations in flight at a given time. Thus an excessive number of marker write operations may degrade command execution performance.

Valid Usage

- VUID-vkCmdWriteMarkerToMemoryAMD-synchronization2-13042
  The `synchronization2` feature must be enabled

- VUID-vkCmdWriteMarkerToMemoryAMD-pInfo-13043
  `pInfo->stage` must include only stages that are valid for the queue family that was used to create the command pool that `commandBuffer` was allocated from

- VUID-vkCmdWriteMarkerToMemoryAMD-commandBuffer-13044
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, `pInfo->dstFlags` must not include VK_ADDRESS_COMMAND_PROTECTED_BIT_KHR

- VUID-vkCmdWriteMarkerToMemoryAMD-commandBuffer-13045
  If `commandBuffer` is a protected command buffer and `protectedNoFault` is not supported, `pInfo->dstFlags` must include VK_ADDRESS_COMMAND_PROTECTED_BIT_KHR

- VUID-vkCmdWriteMarkerToMemoryAMD-pInfo-13046
  If `pInfo->dstFlags` includes VK_ADDRESS_COMMAND_PROTECTED_BIT_KHR, the buffer from which `pInfo->dstRange` was queried must have been created with VK_BUFFER_CREATE_PROTECTED_BIT

- VUID-vkCmdWriteMarkerToMemoryAMD-pInfo-13047
  If `pInfo->dstFlags` does not include VK_ADDRESS_COMMAND_PROTECTED_BIT_KHR, the buffer from which `pInfo->dstRange` was queried must have been created without VK_BUFFER_CREATE_PROTECTED_BIT

Valid Usage (Implicit)

- VUID-vkCmdWriteMarkerToMemoryAMD-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdWriteMarkerToMemoryAMD-pInfo-parameter
  `pInfo` must be a valid pointer to a valid VkMemoryMarkerInfoAMD structure

- VUID-vkCmdWriteMarkerToMemoryAMD-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdWriteMarkerToMemoryAMD-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, VK_QUEUE_GRAPHICS_BIT, or VK_QUEUE_TRANSFER_BIT operations

- VUID-vkCmdWriteMarkerToMemoryAMD-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdWriteMarkerToMemoryAMD-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT VK_QUEUE_TRANSFER_BIT | Action

Conditional Rendering

vkCmdWriteMarkerToMemoryAMD is not affected by conditional rendering

To write a 32-bit marker value into a buffer as a pipelined operation, call:

Warning | This functionality is superseded by vkCmdWriteMarkerToMemoryAMD. See Legacy Functionality for more information.

    // Provided by VK_AMD_buffer_marker with VK_VERSION_1_3 or VK_KHR_synchronization2
    void vkCmdWriteBufferMarker2AMD(
        VkCommandBuffer                             commandBuffer,
        VkPipelineStageFlags2                       stage,
        VkBuffer                                    dstBuffer,
        VkDeviceSize                                dstOffset,
        uint32_t                                    marker);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `stage` specifies the pipeline stage whose completion triggers the marker write.

- `dstBuffer` is the buffer where the marker will be written.

- `dstOffset` is the byte offset into the buffer where the marker will be written.

- `marker` is the 32-bit value of the marker.

When `vkCmdWriteBufferMarker2AMD` is submitted to a queue, it defines an execution dependency between prior operations and writing the marker value, as well as a memory dependency from earlier buffer marker write commands.

The first synchronization scope includes operations performed by operations that occur earlier in submission order in the pipeline stage identified by `pipelineStage`. It additionally includes other buffer marker write commands that occur earlier in submission order that specified either the same `pipelineStage` or a stage that is logically earlier.

The second synchronization scope includes only the buffer marker write.

The first access scope includes only accesses performed by other buffer marker write commands.

The second access scope is empty.

The access scope for buffer marker writes falls under the VK_ACCESS_TRANSFER_WRITE_BIT flag, and is performed by either `pipelineStage` or VK_PIPELINE_STAGE_TRANSFER_BIT. Synchronization commands should specify this access flag and both pipeline stages when defining dependencies with this command.

Note | Similar to `vkCmdWriteTimestamp2`, if an implementation is unable to write a marker at any specific pipeline stage, it may instead do so at any logically later stage.

Note | Implementations may only support a limited number of pipelined marker write operations in flight at a given time. Thus an excessive number of marker write operations may degrade command execution performance.

Valid Usage

- VUID-vkCmdWriteBufferMarker2AMD-stage-03929
  If the `geometryShader` feature is not enabled, `stage` must not contain VK_PIPELINE_STAGE_2_GEOMETRY_SHADER_BIT

- VUID-vkCmdWriteBufferMarker2AMD-stage-03930
  If the `tessellationShader` feature is not enabled, `stage` must not contain VK_PIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT or VK_PIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT

- VUID-vkCmdWriteBufferMarker2AMD-stage-03931
  If the `conditionalRendering` feature is not enabled, `stage` must not contain VK_PIPELINE_STAGE_2_CONDITIONAL_RENDERING_BIT_EXT

- VUID-vkCmdWriteBufferMarker2AMD-stage-03932
  If the `fragmentDensityMap` feature is not enabled, `stage` must not contain VK_PIPELINE_STAGE_2_FRAGMENT_DENSITY_PROCESS_BIT_EXT

- VUID-vkCmdWriteBufferMarker2AMD-stage-03933
  If the `transformFeedback` feature is not enabled, `stage` must not contain VK_PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT

- VUID-vkCmdWriteBufferMarker2AMD-stage-03934
  If the `meshShader` feature is not enabled, `stage` must not contain VK_PIPELINE_STAGE_2_MESH_SHADER_BIT_EXT

- VUID-vkCmdWriteBufferMarker2AMD-stage-03935
  If the `taskShader` feature is not enabled, `stage` must not contain VK_PIPELINE_STAGE_2_TASK_SHADER_BIT_EXT

- VUID-vkCmdWriteBufferMarker2AMD-stage-07316
  If neither of the `shadingRateImage` or the `attachmentFragmentShadingRate` features are enabled, `stage` must not contain VK_PIPELINE_STAGE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

- VUID-vkCmdWriteBufferMarker2AMD-stage-04957
  If the `subpassShading` feature is not enabled, `stage` must not contain VK_PIPELINE_STAGE_2_SUBPASS_SHADER_BIT_HUAWEI

- VUID-vkCmdWriteBufferMarker2AMD-stage-04995
  If the `invocationMask` feature is not enabled, `stage` must not contain VK_PIPELINE_STAGE_2_INVOCATION_MASK_BIT_HUAWEI

- VUID-vkCmdWriteBufferMarker2AMD-stage-07946
  If neither the VK_NV_ray_tracing extension or the `rayTracingPipeline` feature are enabled, `stage` must not contain VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR

- VUID-vkCmdWriteBufferMarker2AMD-stage-10751
  If the `accelerationStructure` feature is not enabled, `stage` must not contain VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR

- VUID-vkCmdWriteBufferMarker2AMD-stage-10752
  If the `rayTracingMaintenance1` feature is not enabled, `stage` must not contain VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR

- VUID-vkCmdWriteBufferMarker2AMD-stage-11541
  If the `VkPhysicalDeviceOpacityMicromapFeaturesEXT`::`micromap` feature is not enabled, `stage` must not contain VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT

- VUID-vkCmdWriteBufferMarker2AMD-synchronization2-03893
  The `synchronization2` feature must be enabled

- VUID-vkCmdWriteBufferMarker2AMD-stage-03894
  `stage` must include only a single pipeline stage

- VUID-vkCmdWriteBufferMarker2AMD-stage-03895
  `stage` must include only stages that are valid for the queue family that was used to create the command pool that `commandBuffer` was allocated from

- VUID-vkCmdWriteBufferMarker2AMD-dstOffset-03896
  `dstOffset` must be less than or equal to the size of `dstBuffer` minus `4`

- VUID-vkCmdWriteBufferMarker2AMD-dstBuffer-03897
  `dstBuffer` must have been created with the VK_BUFFER_USAGE_TRANSFER_DST_BIT usage flag set

- VUID-vkCmdWriteBufferMarker2AMD-dstBuffer-03898
  If `dstBuffer` is non-sparse then it must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-vkCmdWriteBufferMarker2AMD-dstOffset-03899
  `dstOffset` must be a multiple of `4`

Valid Usage (Implicit)

- VUID-vkCmdWriteBufferMarker2AMD-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdWriteBufferMarker2AMD-stage-parameter
  `stage` must be a valid combination of VkPipelineStageFlagBits2 values

- VUID-vkCmdWriteBufferMarker2AMD-dstBuffer-parameter
  `dstBuffer` must be a valid VkBuffer handle

- VUID-vkCmdWriteBufferMarker2AMD-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdWriteBufferMarker2AMD-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, VK_QUEUE_GRAPHICS_BIT, or VK_QUEUE_TRANSFER_BIT operations

- VUID-vkCmdWriteBufferMarker2AMD-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdWriteBufferMarker2AMD-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdWriteBufferMarker2AMD-commonparent
  Both of `commandBuffer`, and `dstBuffer` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT VK_QUEUE_TRANSFER_BIT | Action

Conditional Rendering

vkCmdWriteBufferMarker2AMD is not affected by conditional rendering

To write a 32-bit marker value into a buffer as a pipelined operation, call:

    // Provided by VK_AMD_buffer_marker
    void vkCmdWriteBufferMarkerAMD(
        VkCommandBuffer                             commandBuffer,
        VkPipelineStageFlagBits                     pipelineStage,
        VkBuffer                                    dstBuffer,
        VkDeviceSize                                dstOffset,
        uint32_t                                    marker);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `pipelineStage` is a VkPipelineStageFlagBits value specifying the pipeline stage whose completion triggers the marker write.

- `dstBuffer` is the buffer where the marker will be written to.

- `dstOffset` is the byte offset into the buffer where the marker will be written to.

- `marker` is the 32-bit value of the marker.

When `vkCmdWriteBufferMarkerAMD` is submitted to a queue, it defines an execution dependency between prior operations and writing the marker value, as well as a memory dependency from earlier buffer marker write commands.

The first synchronization scope includes operations performed by operations that occur earlier in submission order in the pipeline stage identified by `pipelineStage`. It additionally includes other buffer marker write commands that occur earlier in submission order that specified either the same `pipelineStage` or a stage that is logically earlier.

The second synchronization scope includes only the buffer marker write.

The first access scope includes only accesses performed by other buffer marker write commands.

The second access scope is empty.

The access scope for buffer marker writes falls under the VK_ACCESS_TRANSFER_WRITE_BIT flag, and is performed by either `pipelineStage` or VK_PIPELINE_STAGE_TRANSFER_BIT. Synchronization commands should specify this access flag and both pipeline stages when defining dependencies with this command.

Note | Similar to `vkCmdWriteTimestamp`, if an implementation is unable to write a marker at any specific pipeline stage, it may instead do so at any logically later stage.

Note | Implementations may only support a limited number of pipelined marker write operations in flight at a given time, thus excessive number of marker write operations may degrade command execution performance.

Valid Usage

- VUID-vkCmdWriteBufferMarkerAMD-pipelineStage-04074
  `pipelineStage` must be a valid stage for the queue family that was used to create the command pool that `commandBuffer` was allocated from

- VUID-vkCmdWriteBufferMarkerAMD-pipelineStage-04075
  If the `geometryShader` feature is not enabled, `pipelineStage` must not be VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT

- VUID-vkCmdWriteBufferMarkerAMD-pipelineStage-04076
  If the `tessellationShader` feature is not enabled, `pipelineStage` must not be VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT or VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT

- VUID-vkCmdWriteBufferMarkerAMD-pipelineStage-04077
  If the `conditionalRendering` feature is not enabled, `pipelineStage` must not be VK_PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT

- VUID-vkCmdWriteBufferMarkerAMD-pipelineStage-04078
  If the `fragmentDensityMap` feature is not enabled, `pipelineStage` must not be VK_PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT

- VUID-vkCmdWriteBufferMarkerAMD-pipelineStage-04079
  If the `transformFeedback` feature is not enabled, `pipelineStage` must not be VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT

- VUID-vkCmdWriteBufferMarkerAMD-pipelineStage-04080
  If the `meshShader` feature is not enabled, `pipelineStage` must not be VK_PIPELINE_STAGE_MESH_SHADER_BIT_EXT

- VUID-vkCmdWriteBufferMarkerAMD-pipelineStage-07077
  If the `taskShader` feature is not enabled, `pipelineStage` must not be VK_PIPELINE_STAGE_TASK_SHADER_BIT_EXT

- VUID-vkCmdWriteBufferMarkerAMD-shadingRateImage-07314
  If neither of the `shadingRateImage` or the `attachmentFragmentShadingRate` features are enabled, `pipelineStage` must not be VK_PIPELINE_STAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

- VUID-vkCmdWriteBufferMarkerAMD-synchronization2-06489
  If the `synchronization2` feature is not enabled, `pipelineStage` must not be VK_PIPELINE_STAGE_NONE

- VUID-vkCmdWriteBufferMarkerAMD-rayTracingPipeline-07943
  If neither of the VK_NV_ray_tracing extension or the `rayTracingPipeline` feature are enabled, `pipelineStage` must not be VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_KHR

- VUID-vkCmdWriteBufferMarkerAMD-dstOffset-01798
  `dstOffset` must be less than or equal to the size of `dstBuffer` minus `4`

- VUID-vkCmdWriteBufferMarkerAMD-dstBuffer-01799
  `dstBuffer` must have been created with the VK_BUFFER_USAGE_TRANSFER_DST_BIT usage flag set

- VUID-vkCmdWriteBufferMarkerAMD-dstBuffer-01800
  If `dstBuffer` is non-sparse then it must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-vkCmdWriteBufferMarkerAMD-dstOffset-01801
  `dstOffset` must be a multiple of `4`

Valid Usage (Implicit)

- VUID-vkCmdWriteBufferMarkerAMD-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdWriteBufferMarkerAMD-pipelineStage-parameter
  If `pipelineStage` is not `0`, `pipelineStage` must be a valid VkPipelineStageFlagBits value

- VUID-vkCmdWriteBufferMarkerAMD-dstBuffer-parameter
  `dstBuffer` must be a valid VkBuffer handle

- VUID-vkCmdWriteBufferMarkerAMD-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdWriteBufferMarkerAMD-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, VK_QUEUE_GRAPHICS_BIT, or VK_QUEUE_TRANSFER_BIT operations

- VUID-vkCmdWriteBufferMarkerAMD-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdWriteBufferMarkerAMD-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdWriteBufferMarkerAMD-commonparent
  Both of `commandBuffer`, and `dstBuffer` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT VK_QUEUE_TRANSFER_BIT | Action

Conditional Rendering

vkCmdWriteBufferMarkerAMD is not affected by conditional rendering

### 26.10. Copying Data Between Tensors

vkCmdCopyTensorARM performs tensor copies in a similar manner to a host memcpy. It does not perform general-purpose conversions such as scaling, resizing, or format conversions. Rather, it simply copies raw tensor data. vkCmdCopyTensorARM can copy between tensors with different formats, provided the formats are compatible. Tensor formats are compatible if they share the same class, as shown in the Compatible Formats.

To copy data between tensor objects, call:

    // Provided by VK_ARM_tensors
    void vkCmdCopyTensorARM(
        VkCommandBuffer                             commandBuffer,
        const VkCopyTensorInfoARM*                  pCopyTensorInfo);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `pCopyTensorInfo` is a pointer to VkCopyTensorInfoARM structure describing the copy parameters.

Valid Usage (Implicit)

- VUID-vkCmdCopyTensorARM-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdCopyTensorARM-pCopyTensorInfo-parameter
  `pCopyTensorInfo` must be a valid pointer to a valid VkCopyTensorInfoARM structure

- VUID-vkCmdCopyTensorARM-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdCopyTensorARM-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, VK_QUEUE_GRAPHICS_BIT, or VK_QUEUE_TRANSFER_BIT operations

- VUID-vkCmdCopyTensorARM-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdCopyTensorARM-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdCopyTensorARM-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT VK_QUEUE_TRANSFER_BIT | Action

Conditional Rendering

vkCmdCopyTensorARM is not affected by conditional rendering

The `VkCopyTensorInfoARM` structure is defined as:

    // Provided by VK_ARM_tensors
    typedef struct VkCopyTensorInfoARM {
        VkStructureType           sType;
        const void*               pNext;
        VkTensorARM               srcTensor;
        VkTensorARM               dstTensor;
        uint32_t                  regionCount;
        const VkTensorCopyARM*    pRegions;
    } VkCopyTensorInfoARM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is NULL or a pointer to a structure extending this structure.

- `srcTensor` is the source tensor.

- `dstTensor` is the destination tensor.

- `regionCount` is the number of regions to copy.

- `pRegions` is a pointer to an array of VkTensorCopyARM structures specifying the regions to copy.

Each region in `pRegions` describes a region to be copied from the source tensor to a corresponding region of the destination tensor. `srcTensor` and `dstTensor` can be the same tensor or alias the same memory.

The formats of `srcTensor` and `dstTensor` must be compatible. Formats are compatible if they share the same class, as shown in the Compatible Formats table.

Note | editing-note The valid usage rules restrict copies to copying whole tensors of equal sizes. That is, only a single region can be copied and this region must be the entire tensor. This means the entire tensor must be copied. These restrictions may be relaxed in future extensions.

`vkCmdCopyTensorARM` allows copying between size-compatible internal formats.

Valid Usage

- VUID-VkCopyTensorInfoARM-dimensionCount-09684
  `srcTensor` and `dstTensor` must have been created with equal values for VkTensorDescriptionARM::`dimensionCount`

- VUID-VkCopyTensorInfoARM-pDimensions-09685
  For each of the elements of VkTensorDescriptionARM::`pDimensions`, `srcTensor` and `dstTensor` must be the same size

- VUID-VkCopyTensorInfoARM-regionCount-09686
  `regionCount` must be equal to 1

- VUID-VkCopyTensorInfoARM-pRegions-09687
  Each element of `pRegions` must be a VkTensorCopyARM structure whose `pSrcOffset` is `NULL` or has all its elements equal to `0`

- VUID-VkCopyTensorInfoARM-pRegions-09688
  Each element of `pRegions` must be a VkTensorCopyARM structure whose `pDstOffset` is `NULL` or has all its elements equal to `0`

- VUID-VkCopyTensorInfoARM-pRegions-09689
  Each element of `pRegions` must be a VkTensorCopyARM structure whose `pExtent` is `NULL` or equal to the VkTensorDescriptionARM::`pDimensions` array specified when `srcTensor` and `dstTensor` were created

- VUID-VkCopyTensorInfoARM-pRegions-09954
  Each element of `pRegions` must be a VkTensorCopyARM structure whose `dimensionCount`, if it is not equal to 0, is equal to the largest of the VkTensorDescriptionARM::`dimensionCount` of `srcTensor` or `dstTensor`

- VUID-VkCopyTensorInfoARM-srcTensor-09690
  The format features of `srcTensor` must contain VK_FORMAT_FEATURE_2_TRANSFER_SRC_BIT

- VUID-VkCopyTensorInfoARM-srcTensor-09691
  `srcTensor` must have been created with the VK_TENSOR_USAGE_TRANSFER_SRC_BIT_ARM usage flag set

- VUID-VkCopyTensorInfoARM-dstTensor-09692
  The format features of `dstTensor` must contain VK_FORMAT_FEATURE_2_TRANSFER_DST_BIT

- VUID-VkCopyTensorInfoARM-dstTensor-09693
  `dstTensor` must have been created with the VK_TENSOR_USAGE_TRANSFER_DST_BIT_ARM usage flag set

- VUID-VkCopyTensorInfoARM-srcTensor-09694
  If `srcTensor` is non-sparse then it must be bound completely and contiguously to a single VkDeviceMemory object

- VUID-VkCopyTensorInfoARM-dstTensor-09695
  If `dstTensor` is non-sparse then it must be bound completely and contiguously to a single VkDeviceMemory object

Valid Usage (Implicit)

- VUID-VkCopyTensorInfoARM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_COPY_TENSOR_INFO_ARM

- VUID-VkCopyTensorInfoARM-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkCopyTensorInfoARM-srcTensor-parameter
  `srcTensor` must be a valid VkTensorARM handle

- VUID-VkCopyTensorInfoARM-dstTensor-parameter
  `dstTensor` must be a valid VkTensorARM handle

- VUID-VkCopyTensorInfoARM-pRegions-parameter
  `pRegions` must be a valid pointer to an array of `regionCount` valid VkTensorCopyARM structures

- VUID-VkCopyTensorInfoARM-regionCount-arraylength
  `regionCount` must be greater than `0`

- VUID-VkCopyTensorInfoARM-commonparent
  Both of `dstTensor`, and `srcTensor` must have been created, allocated, or retrieved from the same VkDevice

The `VkTensorCopyARM` structure is defined as:

    // Provided by VK_ARM_tensors
    typedef struct VkTensorCopyARM {
        VkStructureType    sType;
        const void*        pNext;
        uint32_t           dimensionCount;
        const uint64_t*    pSrcOffset;
        const uint64_t*    pDstOffset;
        const uint64_t*    pExtent;
    } VkTensorCopyARM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `dimensionCount` is the number of elements in the `pSrcOffset`, `pDstOffset` and `pExtent` arrays.

- `pSrcOffset` is `NULL` or an array of size `dimensionCount` providing an offset into the source tensor. When `pSrcOffset` is `NULL`, the offset into the source tensor is `0` in all dimensions.

- `pDstOffset` is `NULL` or an array of size `dimensionCount` providing an offset into the destination tensor. When `pDstOffset` is `NULL`, the offset into the destination tensor is `0` in all dimensions.

- `pExtent` is `NULL` or an array of size `dimensionCount` providing the number of elements to copy in each dimension. When `pExtent` is `NULL`, the number of elements to copy is taken as the total number of elements in each dimension of the source tensor.

Valid Usage

- VUID-VkTensorCopyARM-dimensionCount-09955
  `dimensionCount` must be greater than 0 if `pSrcOffset`, `pDstOffset`, or `pExtent` is not `NULL`

Valid Usage (Implicit)

- VUID-VkTensorCopyARM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_TENSOR_COPY_ARM

- VUID-VkTensorCopyARM-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkTensorCopyARM-pSrcOffset-parameter
  If `dimensionCount` is not `0`, and `pSrcOffset` is not `NULL`, `pSrcOffset` must be a valid pointer to an array of `dimensionCount` `uint64_t` values

- VUID-VkTensorCopyARM-pDstOffset-parameter
  If `dimensionCount` is not `0`, and `pDstOffset` is not `NULL`, `pDstOffset` must be a valid pointer to an array of `dimensionCount` `uint64_t` values

- VUID-VkTensorCopyARM-pExtent-parameter
  If `dimensionCount` is not `0`, and `pExtent` is not `NULL`, `pExtent` must be a valid pointer to an array of `dimensionCount` `uint64_t` values

## 27. Drawing Commands

Drawing commands (commands with `Draw` in the name) provoke work in a graphics pipeline. Drawing commands are recorded into a command buffer and when executed by a queue, will produce work which executes according to the bound graphics pipeline, or if the `shaderObject` feature is enabled, any shader objects bound to graphics stages. A graphics pipeline or a combination of one or more graphics shader objects must be bound to a command buffer before any drawing commands are recorded in that command buffer.

Drawing can be achieved in two modes:

- Programmable Mesh Shading, the mesh shader assembles primitives, or

- Programmable Primitive Shading, the input primitives are assembled as follows.

Each draw is made up of zero or more vertices and zero or more instances, which are processed by the device and result in the assembly of primitives. Primitives are assembled according to the `pInputAssemblyState` member of the VkGraphicsPipelineCreateInfo structure, which is of type `VkPipelineInputAssemblyStateCreateInfo`:

    // Provided by VK_VERSION_1_0
    typedef struct VkPipelineInputAssemblyStateCreateInfo {
        VkStructureType                            sType;
        const void*                                pNext;
        VkPipelineInputAssemblyStateCreateFlags    flags;
        VkPrimitiveTopology                        topology;
        VkBool32                                   primitiveRestartEnable;
    } VkPipelineInputAssemblyStateCreateInfo;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is reserved for future use.

- `topology` is a VkPrimitiveTopology defining the primitive topology, as described below.

- `primitiveRestartEnable` controls whether a special vertex index value is treated as restarting the assembly of primitives. This enable only applies to indexed draws (vkCmdDrawIndexed, vkCmdDrawMultiIndexedEXT, and vkCmdDrawIndexedIndirect), and the special index value is either 0xFFFFFFFF when the `indexType` parameter of Vulkan 1.4 or `vkCmdBindIndexBuffer2` or `vkCmdBindIndexBuffer` is equal to VK_INDEX_TYPE_UINT32; 0xFF when `indexType` is equal to VK_INDEX_TYPE_UINT8; or 0xFFFF when `indexType` is equal to VK_INDEX_TYPE_UINT16. Primitive restart is not allowed for “list” topologies, unless one of the features `primitiveTopologyPatchListRestart` (for VK_PRIMITIVE_TOPOLOGY_PATCH_LIST) or `primitiveTopologyListRestart` (for all other list topologies) is enabled. If the `primitiveRestartIndex` feature is enabled, vkCmdSetPrimitiveRestartIndexEXT can be used to set a custom index for primitive restart.

Restarting the assembly of primitives discards the most recent index values if those elements formed an incomplete primitive, and restarts the primitive assembly using the subsequent indices, but only assembling the immediately following element through the end of the originally specified elements. The primitive restart index value comparison is performed before adding the `vertexOffset` value to the index value.

Valid Usage

- VUID-VkPipelineInputAssemblyStateCreateInfo-topology-06252
  If the `primitiveTopologyListRestart` feature is not enabled, and `topology` is VK_PRIMITIVE_TOPOLOGY_POINT_LIST, VK_PRIMITIVE_TOPOLOGY_LINE_LIST, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY, or VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY, `primitiveRestartEnable` must be VK_FALSE

- VUID-VkPipelineInputAssemblyStateCreateInfo-topology-06253
  If the `primitiveTopologyPatchListRestart` feature is not enabled, and `topology` is VK_PRIMITIVE_TOPOLOGY_PATCH_LIST, `primitiveRestartEnable` must be VK_FALSE

- VUID-VkPipelineInputAssemblyStateCreateInfo-topology-00429
  If the `geometryShader` feature is not enabled, `topology` must not be any of VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY, VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY or VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY

- VUID-VkPipelineInputAssemblyStateCreateInfo-topology-00430
  If the `tessellationShader` feature is not enabled, `topology` must not be VK_PRIMITIVE_TOPOLOGY_PATCH_LIST

- VUID-VkPipelineInputAssemblyStateCreateInfo-triangleFans-04452
  If the `VK_KHR_portability_subset` extension is enabled, and VkPhysicalDevicePortabilitySubsetFeaturesKHR::`triangleFans` is VK_FALSE, `topology` must not be VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN

Valid Usage (Implicit)

- VUID-VkPipelineInputAssemblyStateCreateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO

- VUID-VkPipelineInputAssemblyStateCreateInfo-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkPipelineInputAssemblyStateCreateInfo-flags-zerobitmask
  `flags` must be `0`

- VUID-VkPipelineInputAssemblyStateCreateInfo-topology-parameter
  `topology` must be a valid VkPrimitiveTopology value

    // Provided by VK_VERSION_1_0
    typedef VkFlags VkPipelineInputAssemblyStateCreateFlags;

`VkPipelineInputAssemblyStateCreateFlags` is a bitmask type for setting a mask, but is currently reserved for future use.

To dynamically control whether a special vertex index value is treated as restarting the assembly of primitives, call:

    // Provided by VK_VERSION_1_3
    void vkCmdSetPrimitiveRestartEnable(
        VkCommandBuffer                             commandBuffer,
        VkBool32                                    primitiveRestartEnable);

    // Provided by VK_EXT_extended_dynamic_state2, VK_EXT_shader_object
    // Equivalent to vkCmdSetPrimitiveRestartEnable
    void vkCmdSetPrimitiveRestartEnableEXT(
        VkCommandBuffer                             commandBuffer,
        VkBool32                                    primitiveRestartEnable);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `primitiveRestartEnable` controls whether a special vertex index value is treated as restarting the assembly of primitives. It behaves in the same way as `VkPipelineInputAssemblyStateCreateInfo`::`primitiveRestartEnable`

This command sets the primitive restart enable for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the VkPipelineInputAssemblyStateCreateInfo::`primitiveRestartEnable` value used to create the currently active pipeline.

Valid Usage

- VUID-vkCmdSetPrimitiveRestartEnable-None-08970
  At least one of the following must be true:

  - the `extendedDynamicState2` feature is enabled

  - the `shaderObject` feature is enabled

  - the value of VkApplicationInfo::`apiVersion` used to create the VkInstance parent of `commandBuffer` is greater than or equal to Version 1.3

Valid Usage (Implicit)

- VUID-vkCmdSetPrimitiveRestartEnable-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetPrimitiveRestartEnable-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetPrimitiveRestartEnable-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetPrimitiveRestartEnable-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetPrimitiveRestartEnable is not affected by conditional rendering

To dynamically control which special vertex index value is treated as restarting the assembly of primitives, call:

    // Provided by VK_EXT_primitive_restart_index
    void vkCmdSetPrimitiveRestartIndexEXT(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    primitiveRestartIndex);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `primitiveRestartIndex` controls which special vertex index value is treated as restarting the assembly of primitives. This overrides the default restart index value as defined as part of the description of the VkPipelineInputAssemblyStateCreateInfo::`primitiveRestartEnable` state. Default values are applied when binding an index buffer.

This command sets a custom primitive restart index for subsequent drawing commands. Binding an index buffer invalidates the custom index value.

Valid Usage

- VUID-vkCmdSetPrimitiveRestartIndexEXT-primitiveRestartIndex-12395
  The `primitiveRestartIndex` feature must be enabled

Valid Usage (Implicit)

- VUID-vkCmdSetPrimitiveRestartIndexEXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetPrimitiveRestartIndexEXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetPrimitiveRestartIndexEXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetPrimitiveRestartIndexEXT-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetPrimitiveRestartIndexEXT is not affected by conditional rendering

### 27.1. Primitive Topologies

Primitive topology determines how consecutive vertices are organized into primitives, and determines the type of primitive that is used at the beginning of the graphics pipeline. The effective topology for later stages of the pipeline is altered by tessellation or geometry shading (if either is in use) and depends on the execution modes of those shaders. In the case of mesh shading the only effective topology is defined by the execution mode of the mesh shader.

The primitive topologies defined by VkPrimitiveTopology are:

    // Provided by VK_VERSION_1_0
    typedef enum VkPrimitiveTopology {
        VK_PRIMITIVE_TOPOLOGY_POINT_LIST = 0,
        VK_PRIMITIVE_TOPOLOGY_LINE_LIST = 1,
        VK_PRIMITIVE_TOPOLOGY_LINE_STRIP = 2,
        VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST = 3,
        VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP = 4,
        VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN = 5,
        VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY = 6,
        VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY = 7,
        VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY = 8,
        VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY = 9,
        VK_PRIMITIVE_TOPOLOGY_PATCH_LIST = 10,
    } VkPrimitiveTopology;

- VK_PRIMITIVE_TOPOLOGY_POINT_LIST specifies a series of separate point primitives.

- VK_PRIMITIVE_TOPOLOGY_LINE_LIST specifies a series of separate line primitives.

- VK_PRIMITIVE_TOPOLOGY_LINE_STRIP specifies a series of connected line primitives with consecutive lines sharing a vertex.

- VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST specifies a series of separate triangle primitives.

- VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP specifies a series of connected triangle primitives with consecutive triangles sharing an edge.

- VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN specifies a series of connected triangle primitives with all triangles sharing a common vertex. If the `VK_KHR_portability_subset` extension is enabled, and VkPhysicalDevicePortabilitySubsetFeaturesKHR::`triangleFans` is VK_FALSE, then triangle fans are not supported by the implementation, and VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN must not be used.

- VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY specifies a series of separate line primitives with adjacency.

- VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY specifies a series of connected line primitives with adjacency, with consecutive primitives sharing three vertices.

- VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY specifies a series of separate triangle primitives with adjacency.

- VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY specifies connected triangle primitives with adjacency, with consecutive triangles sharing an edge.

- VK_PRIMITIVE_TOPOLOGY_PATCH_LIST specifies separate patch primitives.

Each primitive topology, and its construction from a list of vertices, is described in detail below with a supporting diagram, according to the following key:

| Vertex | A point in 3-dimensional space. Positions chosen within the diagrams are arbitrary and for illustration only.
| Vertex Number | Sequence position of a vertex within the provided vertex data.
| Provoking Vertex | Provoking vertex within the main primitive. The tail is angled towards the relevant primitive. Used in flat shading.
| Primitive Edge | An edge connecting the points of a main primitive.
| Adjacency Edge | Points connected by these lines do not contribute to a main primitive, and are only accessible in a geometry shader.
| Winding Order | The relative order in which vertices are defined within a primitive, used in the facing determination. This ordering has no specific start or end point.

The diagrams are supported with mathematical definitions where the vertices (v) and primitives (p) are numbered starting from 0; v0 is the first vertex in the provided data and p0 is the first primitive in the set of primitives defined by the vertices and topology.

To dynamically set primitive topology, call:

    // Provided by VK_VERSION_1_3
    void vkCmdSetPrimitiveTopology(
        VkCommandBuffer                             commandBuffer,
        VkPrimitiveTopology                         primitiveTopology);

    // Provided by VK_EXT_extended_dynamic_state, VK_EXT_shader_object
    // Equivalent to vkCmdSetPrimitiveTopology
    void vkCmdSetPrimitiveTopologyEXT(
        VkCommandBuffer                             commandBuffer,
        VkPrimitiveTopology                         primitiveTopology);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `primitiveTopology` specifies the primitive topology to use for drawing.

This command sets the primitive topology for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the VkPipelineInputAssemblyStateCreateInfo::`topology` value used to create the currently active pipeline.

Valid Usage

- VUID-vkCmdSetPrimitiveTopology-None-08971
  At least one of the following must be true:

  - the `extendedDynamicState` feature is enabled

  - the `shaderObject` feature is enabled

  - the value of VkApplicationInfo::`apiVersion` used to create the VkInstance parent of `commandBuffer` is greater than or equal to Version 1.3

Valid Usage (Implicit)

- VUID-vkCmdSetPrimitiveTopology-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetPrimitiveTopology-primitiveTopology-parameter
  `primitiveTopology` must be a valid VkPrimitiveTopology value

- VUID-vkCmdSetPrimitiveTopology-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetPrimitiveTopology-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetPrimitiveTopology-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetPrimitiveTopology is not affected by conditional rendering

#### 27.1.1. Topology Class

The primitive topologies are grouped into the following topology classes:

Table 35. Topology Classes
Topology Class | Primitive Topology
--- | ---
Point | VK_PRIMITIVE_TOPOLOGY_POINT_LIST
Line | VK_PRIMITIVE_TOPOLOGY_LINE_LIST, VK_PRIMITIVE_TOPOLOGY_LINE_STRIP, VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY, VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY
Triangle | VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY
Patch | VK_PRIMITIVE_TOPOLOGY_PATCH_LIST

#### 27.1.2. Point Lists

When the topology is VK_PRIMITIVE_TOPOLOGY_POINT_LIST, each consecutive vertex defines a single point primitive, according to the equation:

  pi = {vi}

As there is only one vertex, that vertex is the provoking vertex. The number of primitives generated is equal to `vertexCount`.

#### 27.1.3. Line Lists

When the primitive topology is VK_PRIMITIVE_TOPOLOGY_LINE_LIST, each consecutive pair of vertices defines a single line primitive, according to the equation:

  pi = {v2i, v2i+1}

The number of primitives generated is equal to ⌊`vertexCount`/2⌋.

When the `provokingVertexMode` is VK_PROVOKING_VERTEX_MODE_FIRST_VERTEX_EXT, the provoking vertex for pi is v2i.

When the `provokingVertexMode` is VK_PROVOKING_VERTEX_MODE_LAST_VERTEX_EXT, the provoking vertex for pi is v2i+1.

#### 27.1.4. Line Strips

When the primitive topology is VK_PRIMITIVE_TOPOLOGY_LINE_STRIP, one line primitive is defined by each vertex and the following vertex, according to the equation:

  pi = {vi, vi+1}

The number of primitives generated is equal to max(0,`vertexCount`-1).

When the `provokingVertexMode` is VK_PROVOKING_VERTEX_MODE_FIRST_VERTEX_EXT, the provoking vertex for pi is vi.

When the `provokingVertexMode` is VK_PROVOKING_VERTEX_MODE_LAST_VERTEX_EXT, the provoking vertex for pi is vi+1.

#### 27.1.5. Triangle Lists

When the primitive topology is VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, each consecutive set of three vertices defines a single triangle primitive, according to the equation:

  pi = {v3i, v3i+1, v3i+2}

The number of primitives generated is equal to ⌊`vertexCount`/3⌋.

When the `provokingVertexMode` is VK_PROVOKING_VERTEX_MODE_FIRST_VERTEX_EXT, the provoking vertex for pi is v3i.

When the `provokingVertexMode` is VK_PROVOKING_VERTEX_MODE_LAST_VERTEX_EXT, the provoking vertex for pi is v3i+2.

#### 27.1.6. Triangle Strips

When the primitive topology is VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP, one triangle primitive is defined by each vertex and the two vertices that follow it, according to the equation:

  pi = {vi, vi+(1+i%2), vi+(2-i%2)}

The number of primitives generated is equal to max(0,`vertexCount`-2).

When the `provokingVertexMode` is VK_PROVOKING_VERTEX_MODE_FIRST_VERTEX_EXT, the provoking vertex for pi is vi.

When the `provokingVertexMode` is VK_PROVOKING_VERTEX_MODE_LAST_VERTEX_EXT, the provoking vertex for pi is vi+2.

Note | The ordering of the vertices in each successive triangle is reversed, so that the winding order is consistent throughout the strip.

#### 27.1.7. Triangle Fans

When the primitive topology is VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN, triangle primitives are defined around a shared common vertex, according to the equation:

  pi = {vi+1, vi+2, v0}

The number of primitives generated is equal to max(0,`vertexCount`-2).

When the `provokingVertexMode` is VK_PROVOKING_VERTEX_MODE_FIRST_VERTEX_EXT, the provoking vertex for pi is vi+1.

When the `provokingVertexMode` is VK_PROVOKING_VERTEX_MODE_LAST_VERTEX_EXT, the provoking vertex for pi is vi+2.

Note | If the `VK_KHR_portability_subset` extension is enabled, and VkPhysicalDevicePortabilitySubsetFeaturesKHR::`triangleFans` is VK_FALSE, then triangle fans are not supported by the implementation, and VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN must not be used.

#### 27.1.8. Line Lists With Adjacency

When the primitive topology is VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY, each consecutive set of four vertices defines a single line primitive with adjacency, according to the equation:

  pi = {v4i, v4i+1, v4i+2,v4i+3}

A line primitive is described by the second and third vertices of the total primitive, with the remaining two vertices only accessible in a geometry shader.

The number of primitives generated is equal to ⌊`vertexCount`/4⌋.

When the `provokingVertexMode` is VK_PROVOKING_VERTEX_MODE_FIRST_VERTEX_EXT, the provoking vertex for pi is v4i+1.

When the `provokingVertexMode` is VK_PROVOKING_VERTEX_MODE_LAST_VERTEX_EXT, the provoking vertex for pi is v4i+2.

#### 27.1.9. Line Strips With Adjacency

When the primitive topology is VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY, one line primitive with adjacency is defined by each vertex and the following vertex, according to the equation:

  pi = {vi, vi+1, vi+2, vi+3}

A line primitive is described by the second and third vertices of the total primitive, with the remaining two vertices only accessible in a geometry shader.

The number of primitives generated is equal to max(0,`vertexCount`-3).

When the `provokingVertexMode` is VK_PROVOKING_VERTEX_MODE_FIRST_VERTEX_EXT, the provoking vertex for pi is vi+1.

When the `provokingVertexMode` is VK_PROVOKING_VERTEX_MODE_LAST_VERTEX_EXT, the provoking vertex for pi is vi+2.

#### 27.1.10. Triangle Lists With Adjacency

When the primitive topology is VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY, each consecutive set of six vertices defines a single triangle primitive with adjacency, according to the equations:

  pi = {v6i, v6i+1, v6i+2, v6i+3, v6i+4, v6i+5}

A triangle primitive is described by the first, third, and fifth vertices of the total primitive, with the remaining three vertices only accessible in a geometry shader.

The number of primitives generated is equal to ⌊`vertexCount`/6⌋.

When the `provokingVertexMode` is VK_PROVOKING_VERTEX_MODE_FIRST_VERTEX_EXT, the provoking vertex for pi is v6i.

When the `provokingVertexMode` is VK_PROVOKING_VERTEX_MODE_LAST_VERTEX_EXT, the provoking vertex for pi is v6i+4.

#### 27.1.11. Triangle Strips With Adjacency

When the primitive topology is VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY, one triangle primitive with adjacency is defined by each vertex and the following 5 vertices.

The number of primitives generated, n, is equal to ⌊max(0, `vertexCount` - 4)/2⌋.

If n=1, the primitive is defined as:

  p = {v0, v1, v2, v5, v4, v3}

If n>1, the total primitive consists of different vertices according to where it is in the strip:

  pi = {v2i, v2i+1, v2i+2, v2i+6, v2i+4, v2i+3} when i=0

  pi = {v2i, v2i+3, v2i+4, v2i+6, v2i+2, v2i-2} when i>0, i<n-1, and i%2=1

  pi = {v2i, v2i-2, v2i+2, v2i+6, v2i+4, v2i+3} when i>0, i<n-1, and i%2=0

  pi = {v2i, v2i+3, v2i+4, v2i+5, v2i+2, v2i-2} when i=n-1 and i%2=1

  pi = {v2i, v2i-2, v2i+2, v2i+5, v2i+4, v2i+3} when i=n-1 and i%2=0

A triangle primitive is described by the first, third, and fifth vertices of the total primitive in all cases, with the remaining three vertices only accessible in a geometry shader.

Note | The ordering of the vertices in each successive triangle is altered so that the winding order is consistent throughout the strip.

When the `provokingVertexMode` is VK_PROVOKING_VERTEX_MODE_FIRST_VERTEX_EXT, the provoking vertex for pi is always v2i.

When the `provokingVertexMode` is VK_PROVOKING_VERTEX_MODE_LAST_VERTEX_EXT, the provoking vertex for pi is always v2i+4.

#### 27.1.12. Patch Lists

When the primitive topology is VK_PRIMITIVE_TOPOLOGY_PATCH_LIST, each consecutive set of m vertices defines a single patch primitive, according to the equation:

  pi = {vmi, vmi+1, …​, vmi+(m-2), vmi+(m-1)}

where m is equal to VkPipelineTessellationStateCreateInfo::`patchControlPoints`.

Patch lists are never passed to vertex post-processing, and as such no provoking vertex is defined for patch primitives. The number of primitives generated is equal to ⌊`vertexCount`/m⌋.

The vertices comprising a patch have no implied geometry, and are used as inputs to tessellation shaders and the fixed-function tessellator to generate new point, line, or triangle primitives.

### 27.2. Effective Primitive Topology

The effective primitive topology is the primitive topology that is consumed or produced by a given stage of the graphics pipeline. The interpretation of this topology depends on the active shader stages and other state set in the graphics pipeline.

#### 27.2.1. Vertex Input Assembler Topology

This is the topology set when the VK_SHADER_STAGE_VERTEX_BIT stage is used and Programmable Primitive Shading occurs. It can be set with VkPipelineInputAssemblyStateCreateInfo::`topology` or vkCmdSetPrimitiveTopology.

#### 27.2.2. Clip Space Topology

This is the output of the last pre-rasterization shader stage involved.

- If VK_SHADER_STAGE_VERTEX_BIT is the last pre-rasterization stage, the topology is not changed from what was set in the input assembly.

- If VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT is the last pre-rasterization stage, the topology depends on the `OpExecutionMode` found in either tessellation stage.

  - The `Isolines` `Execution` `Mode` is in line topology class.

  - The `Triangles` and `Quads` `Execution` `Mode` is in triangle topology class.

  - The `PointMode` `Execution` `Mode` is in point topology class and will take precedence over the other tessellation stage `Execution` `Mode`.

- If VK_SHADER_STAGE_GEOMETRY_BIT is the last pre-rasterization stage, the topology depends on the `OpExecutionMode` found in this shader stage.

  - The `OutputPoints` `Execution` `Mode` is in point topology class.

  - The `OutputLineStrip` `Execution` `Mode` is in line topology class.

  - The `OutputTriangleStrip` `Execution` `Mode` is in triangle topology class.

- If VK_SHADER_STAGE_MESH_BIT_EXT is the last pre-rasterization stage, the topology depends on the `OpExecutionMode` found in this shader stage.

  - The `OutputPoints` `Execution` `Mode` is in point topology class.

  - The `OutputLinesEXT` `Execution` `Mode` is in line topology class.

  - The `OutputTrianglesEXT` `Execution` `Mode` is in triangle topology class.

#### 27.2.3. Rasterization Input Topology

After clipping and viewport transformations, the Polygon Mode can set a topology as an input for rasterization. This can be different from what was used in Clip Space Topology.

If VkPipelineRasterizationStateCreateInfo::`rasterizerDiscardEnable` or vkCmdSetRasterizerDiscardEnable::`rasterizerDiscardEnable` is set to VK_FALSE, then this Rasterization Input Topology is not observed.

If the clip space topology is in triangle topology class then VK_POLYGON_MODE_LINE will turn it into line topology and VK_POLYGON_MODE_POINT will turn it into point topology.

If the clip space topology is in line topology class then VK_POLYGON_MODE_POINT will turn it into point topology.

### 27.3. Primitive Order

Primitives generated by drawing commands progress through the stages of the graphics pipeline in primitive order. Primitive order is initially determined in the following way:

1. Submission order determines the initial ordering

2. For indirect drawing commands, the order in which accessed instances of the VkDrawIndirectCommand are stored in `buffer`, from lower indirect buffer addresses to higher addresses.

3. If a drawing command includes multiple instances, the order in which instances are executed, from lower numbered instances to higher.

4. The order in which primitives are specified by a drawing command:

   - For non-indexed draws, from vertices with a lower numbered `vertexIndex` to a higher numbered `vertexIndex`.

   - For indexed draws, vertices sourced from a lower index buffer addresses to higher addresses.

   - For draws using mesh shaders, the order is provided by mesh shading.

   - For draws using cluster culling shaders, the order is provided by cluster culling shading.

Within this order implementations further sort primitives:

5. If tessellation shading is active, by an implementation-dependent order of new primitives generated by tessellation.

6. If geometry shading is active, by the order new primitives are generated by geometry shading.

7. If the polygon mode is not VK_POLYGON_MODE_FILL, or VK_POLYGON_MODE_FILL_RECTANGLE_NV, by an implementation-dependent ordering of the new primitives generated within the original primitive.

Primitive order is later used to define rasterization order, which determines the order in which fragments output results to a framebuffer.

### 27.4. Programmable Primitive Shading

Once primitives are assembled, they proceed to the vertex shading stage of the pipeline. If the draw includes multiple instances, then the set of primitives is sent to the vertex shading stage multiple times, once for each instance.

It is implementation-dependent whether vertex shading occurs on vertices that are discarded as part of incomplete primitives, but if it does occur then it operates as if they were vertices in complete primitives and such invocations can have side effects.

Vertex shading receives two per-vertex inputs from the primitive assembly stage - the `vertexIndex` and the `instanceIndex`. How these values are generated is defined below, with each command.

Drawing commands fall roughly into two categories:

- Non-indexed drawing commands present a sequential `vertexIndex` to the vertex shader. The sequential index is generated automatically by the device (see Fixed-Function Vertex Processing for details on both specifying the vertex attributes indexed by `vertexIndex`, as well as binding vertex buffers containing those attributes to a command buffer). These commands are:

  - vkCmdDraw

  - vkCmdDrawIndirect

  - vkCmdDrawIndirectCount

  - vkCmdDrawIndirectCountKHR

  - vkCmdDrawIndirectCountAMD

  - vkCmdDrawMultiEXT

- Indexed drawing commands read index values from an index buffer and use this to compute the `vertexIndex` value for the vertex shader. These commands are:

  - vkCmdDrawIndexed

  - vkCmdDrawIndexedIndirect

  - vkCmdDrawIndexedIndirectCount

  - vkCmdDrawIndexedIndirectCountKHR

  - vkCmdDrawIndexedIndirectCountAMD

  - vkCmdDrawMultiIndexedEXT

For indexed drawing commands, indices are sourced from a range of memory bound to the command buffer, referred to as the bound index buffer range, and specified by one of the following commands.

To bind an address range as an index buffer to a command buffer, call:

    // Provided by VK_KHR_device_address_commands
    void vkCmdBindIndexBuffer3KHR(
        VkCommandBuffer                             commandBuffer,
        const VkBindIndexBuffer3InfoKHR*            pInfo);

- `commandBuffer` is the command buffer into which the command is recorded.

- `pInfo` is a pointer to a VkBindIndexBuffer3InfoKHR structure defining parameters of this command.

The bound index buffer range is set to the range of memory indicated by `pInfo->addressRange`.

If the `nullDescriptor` feature is enabled, `pInfo->addressRange.size` and `pInfo->addressRange.address` can be 0. When the size and address are 0, every index read from this binding will return a value of zero.

Valid Usage (Implicit)

- VUID-vkCmdBindIndexBuffer3KHR-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdBindIndexBuffer3KHR-pInfo-parameter
  `pInfo` must be a valid pointer to a valid VkBindIndexBuffer3InfoKHR structure

- VUID-vkCmdBindIndexBuffer3KHR-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdBindIndexBuffer3KHR-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdBindIndexBuffer3KHR-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdBindIndexBuffer3KHR is not affected by conditional rendering

`VkBindIndexBuffer3InfoKHR` is defined as:

    // Provided by VK_KHR_device_address_commands
    typedef struct VkBindIndexBuffer3InfoKHR {
        VkStructureType             sType;
        const void*                 pNext;
        VkDeviceAddressRangeKHR     addressRange;
        VkAddressCommandFlagsKHR    addressFlags;
        VkIndexType                 indexType;
    } VkBindIndexBuffer3InfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `addressRange` is the VkDeviceAddressRangeKHR of the address range to bind.

- `addressFlags` is a VkAddressCommandFlagsKHR value defining the flags for the address range.

- `indexType` is a VkIndexType value specifying the size of the indices.

Valid Usage

- VUID-VkBindIndexBuffer3InfoKHR-addressRange-13097
  If the range specified by `addressRange` is not bound completely to memory when accessed, `addressFlags` must not include VK_ADDRESS_COMMAND_FULLY_BOUND_BIT_KHR

- VUID-VkBindIndexBuffer3InfoKHR-addressRange-13098
  If the buffer from which the range specified by `addressRange` was created with VK_BUFFER_CREATE_PROTECTED_BIT, and `protectedNoFault` is not supported, `addressFlags` must include VK_ADDRESS_COMMAND_PROTECTED_BIT_KHR

- VUID-VkBindIndexBuffer3InfoKHR-addressRange-13099
  If the buffer from which the range specified by `addressRange` was created without VK_BUFFER_CREATE_PROTECTED_BIT, and `protectedNoFault` is not supported, `addressFlags` must not include VK_ADDRESS_COMMAND_PROTECTED_BIT_KHR

- VUID-VkBindIndexBuffer3InfoKHR-addressFlags-13100
  `addressFlags` must not include both VK_ADDRESS_COMMAND_STORAGE_BUFFER_USAGE_BIT_KHR and VK_ADDRESS_COMMAND_UNKNOWN_STORAGE_BUFFER_USAGE_BIT_KHR

- VUID-VkBindIndexBuffer3InfoKHR-addressRange-13122
  If any buffer, which is bound to a range of VkDeviceMemory that overlaps the range backing `addressRange`, was created with VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, `addressFlags` must include VK_ADDRESS_COMMAND_STORAGE_BUFFER_USAGE_BIT_KHR or VK_ADDRESS_COMMAND_UNKNOWN_STORAGE_BUFFER_USAGE_BIT_KHR

- VUID-VkBindIndexBuffer3InfoKHR-addressRange-13123
  If any buffer, which is bound to a range of VkDeviceMemory that overlaps the range backing `addressRange`, was created without VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, `addressFlags` must not include VK_ADDRESS_COMMAND_STORAGE_BUFFER_USAGE_BIT_KHR

- VUID-VkBindIndexBuffer3InfoKHR-addressFlags-13101
  `addressFlags` must not include both VK_ADDRESS_COMMAND_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR and VK_ADDRESS_COMMAND_UNKNOWN_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR

- VUID-VkBindIndexBuffer3InfoKHR-addressRange-13124
  If any buffer, which is bound to a range of VkDeviceMemory that overlaps the range backing `addressRange`, was created with VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT, `addressFlags` must include VK_ADDRESS_COMMAND_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR or VK_ADDRESS_COMMAND_UNKNOWN_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR

- VUID-VkBindIndexBuffer3InfoKHR-addressRange-13125
  If any buffer, which is bound to a range of VkDeviceMemory that overlaps the range backing `addressRange`, was created without VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT, `addressFlags` must not include VK_ADDRESS_COMMAND_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR

- VUID-VkBindIndexBuffer3InfoKHR-addressRange-13051
  If `addressRange.address` is not 0, the buffer from which `addressRange` was queried must have been created with VK_BUFFER_USAGE_INDEX_BUFFER_BIT

- VUID-VkBindIndexBuffer3InfoKHR-addressRange-13052
  `addressRange.address` must be a multiple of the size of the type indicated by `indexType`

- VUID-VkBindIndexBuffer3InfoKHR-indexType-13053
  `indexType` must not be VK_INDEX_TYPE_NONE_KHR

- VUID-VkBindIndexBuffer3InfoKHR-indexType-13054
  If `indexType` is VK_INDEX_TYPE_UINT8_KHR, the `indexTypeUint8` feature must be enabled

- VUID-VkBindIndexBuffer3InfoKHR-None-13055
  If the `nullDescriptor` feature is not enabled, `addressRange.size` must be greater than 0

- VUID-VkBindIndexBuffer3InfoKHR-addressRange-13056
  If `addressRange.size` is 0, `addressRange.address` must be 0

Valid Usage (Implicit)

- VUID-VkBindIndexBuffer3InfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_BIND_INDEX_BUFFER_3_INFO_KHR

- VUID-VkBindIndexBuffer3InfoKHR-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkBindIndexBuffer3InfoKHR-addressFlags-parameter
  `addressFlags` must be a valid combination of VkAddressCommandFlagBitsKHR values

- VUID-VkBindIndexBuffer3InfoKHR-indexType-parameter
  `indexType` must be a valid VkIndexType value

To bind an index buffer, along with its size, to a command buffer, call:

    // Provided by VK_VERSION_1_4
    void vkCmdBindIndexBuffer2(
        VkCommandBuffer                             commandBuffer,
        VkBuffer                                    buffer,
        VkDeviceSize                                offset,
        VkDeviceSize                                size,
        VkIndexType                                 indexType);

    // Provided by VK_KHR_maintenance5
    // Equivalent to vkCmdBindIndexBuffer2
    void vkCmdBindIndexBuffer2KHR(
        VkCommandBuffer                             commandBuffer,
        VkBuffer                                    buffer,
        VkDeviceSize                                offset,
        VkDeviceSize                                size,
        VkIndexType                                 indexType);

- `commandBuffer` is the command buffer into which the command is recorded.

- `buffer` is the buffer being bound.

- `offset` is the starting offset in bytes within `buffer` used in index buffer address calculations.

- `size` is the size in bytes of index data bound from `buffer`.

- `indexType` is a VkIndexType value specifying the size of the indices.

`buffer`, `offset`, and `size` specify the bound index buffer range, with a range of memory bound from [`base` + `offset`, `base` + `offset` + `size`), where `base` is the start of `buffer`. If `size` is VK_WHOLE_SIZE then the range is from `offset` to the end of the `buffer`.

If the `maintenance6` feature is enabled, `buffer` can be VK_NULL_HANDLE. If `buffer` is VK_NULL_HANDLE and the `nullDescriptor` feature is enabled, every index fetched results in a value of zero.

Valid Usage

- VUID-vkCmdBindIndexBuffer2-offset-08782
  `offset` must be less than the size of `buffer`

- VUID-vkCmdBindIndexBuffer2-offset-08783
  The sum of `offset` and the base address of the range of `VkDeviceMemory` object that is backing `buffer`, must be a multiple of the size of the type indicated by `indexType`

- VUID-vkCmdBindIndexBuffer2-buffer-08784
  `buffer` must have been created with the VK_BUFFER_USAGE_INDEX_BUFFER_BIT usage flag set

- VUID-vkCmdBindIndexBuffer2-buffer-08785
  If `buffer` is non-sparse then it must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-vkCmdBindIndexBuffer2-indexType-08786
  `indexType` must not be VK_INDEX_TYPE_NONE_KHR

- VUID-vkCmdBindIndexBuffer2-indexType-08787
  If `indexType` is VK_INDEX_TYPE_UINT8, the `indexTypeUint8` feature must be enabled

- VUID-vkCmdBindIndexBuffer2-None-09493
  If the `maintenance6` feature is not enabled, `buffer` must not be VK_NULL_HANDLE

- VUID-vkCmdBindIndexBuffer2-buffer-09494
  If `buffer` is VK_NULL_HANDLE, offset must be zero

- VUID-vkCmdBindIndexBuffer2-size-08767
  If `size` is not VK_WHOLE_SIZE, `size` must be a multiple of the size of the type indicated by `indexType`

- VUID-vkCmdBindIndexBuffer2-size-08768
  If `size` is not VK_WHOLE_SIZE, the sum of `offset` and `size` must be less than or equal to the size of `buffer`

Valid Usage (Implicit)

- VUID-vkCmdBindIndexBuffer2-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdBindIndexBuffer2-buffer-parameter
  If `buffer` is not VK_NULL_HANDLE, `buffer` must be a valid VkBuffer handle

- VUID-vkCmdBindIndexBuffer2-indexType-parameter
  `indexType` must be a valid VkIndexType value

- VUID-vkCmdBindIndexBuffer2-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdBindIndexBuffer2-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdBindIndexBuffer2-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdBindIndexBuffer2-commonparent
  Both of `buffer`, and `commandBuffer` that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdBindIndexBuffer2 is not affected by conditional rendering

To bind an index buffer to a command buffer, call:

    // Provided by VK_VERSION_1_0
    void vkCmdBindIndexBuffer(
        VkCommandBuffer                             commandBuffer,
        VkBuffer                                    buffer,
        VkDeviceSize                                offset,
        VkIndexType                                 indexType);

- `commandBuffer` is the command buffer into which the command is recorded.

- `buffer` is the buffer being bound.

- `offset` is the starting offset in bytes within `buffer` used in index buffer address calculations.

- `indexType` is a VkIndexType value specifying the size of the indices.

`buffer` and `offset` specify the bound index buffer range, with a range of memory bound from [`base` + `offset`, `base` + `offset` + `size`), where `size` is from `offset` to the end of the `buffer`.

If the `maintenance6` feature is enabled, `buffer` can be VK_NULL_HANDLE. If `buffer` is VK_NULL_HANDLE and the `nullDescriptor` feature is enabled, every index fetched results in a value of zero.

Valid Usage

- VUID-vkCmdBindIndexBuffer-offset-08782
  `offset` must be less than the size of `buffer`

- VUID-vkCmdBindIndexBuffer-offset-08783
  The sum of `offset` and the base address of the range of `VkDeviceMemory` object that is backing `buffer`, must be a multiple of the size of the type indicated by `indexType`

- VUID-vkCmdBindIndexBuffer-buffer-08784
  `buffer` must have been created with the VK_BUFFER_USAGE_INDEX_BUFFER_BIT usage flag set

- VUID-vkCmdBindIndexBuffer-buffer-08785
  If `buffer` is non-sparse then it must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-vkCmdBindIndexBuffer-indexType-08786
  `indexType` must not be VK_INDEX_TYPE_NONE_KHR

- VUID-vkCmdBindIndexBuffer-indexType-08787
  If `indexType` is VK_INDEX_TYPE_UINT8, the `indexTypeUint8` feature must be enabled

- VUID-vkCmdBindIndexBuffer-None-09493
  If the `maintenance6` feature is not enabled, `buffer` must not be VK_NULL_HANDLE

- VUID-vkCmdBindIndexBuffer-buffer-09494
  If `buffer` is VK_NULL_HANDLE, offset must be zero

Valid Usage (Implicit)

- VUID-vkCmdBindIndexBuffer-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdBindIndexBuffer-buffer-parameter
  If `buffer` is not VK_NULL_HANDLE, `buffer` must be a valid VkBuffer handle

- VUID-vkCmdBindIndexBuffer-indexType-parameter
  `indexType` must be a valid VkIndexType value

- VUID-vkCmdBindIndexBuffer-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdBindIndexBuffer-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdBindIndexBuffer-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdBindIndexBuffer-commonparent
  Both of `buffer`, and `commandBuffer` that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdBindIndexBuffer is not affected by conditional rendering

Possible values of vkCmdBindIndexBuffer2::`indexType` and vkCmdBindIndexBuffer::`indexType`, specifying the size of indices, are:

    // Provided by VK_VERSION_1_0
    typedef enum VkIndexType {
        VK_INDEX_TYPE_UINT16 = 0,
        VK_INDEX_TYPE_UINT32 = 1,
      // Provided by VK_VERSION_1_4
        VK_INDEX_TYPE_UINT8 = 1000265000,
      // Provided by VK_KHR_acceleration_structure
        VK_INDEX_TYPE_NONE_KHR = 1000165000,
      // Provided by VK_NV_ray_tracing
        VK_INDEX_TYPE_NONE_NV = VK_INDEX_TYPE_NONE_KHR,
      // Provided by VK_EXT_index_type_uint8
        VK_INDEX_TYPE_UINT8_EXT = VK_INDEX_TYPE_UINT8,
      // Provided by VK_KHR_index_type_uint8
        VK_INDEX_TYPE_UINT8_KHR = VK_INDEX_TYPE_UINT8,
    } VkIndexType;

- VK_INDEX_TYPE_UINT16 specifies that indices are 16-bit unsigned integer values.

- VK_INDEX_TYPE_UINT32 specifies that indices are 32-bit unsigned integer values.

- VK_INDEX_TYPE_NONE_KHR specifies that no indices are provided.

- VK_INDEX_TYPE_UINT8 specifies that indices are 8-bit unsigned integer values.

The parameters for each drawing command are specified directly in the command or read from buffer memory, depending on the command. Drawing commands that source their parameters from buffer memory are known as indirect drawing commands.

All drawing commands interact with the `robustBufferAccess` feature.

To record a non-indexed draw, call:

    // Provided by VK_VERSION_1_0
    void vkCmdDraw(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    vertexCount,
        uint32_t                                    instanceCount,
        uint32_t                                    firstVertex,
        uint32_t                                    firstInstance);

- `commandBuffer` is the command buffer into which the command is recorded.

- `vertexCount` is the number of vertices to draw.

- `instanceCount` is the number of instances to draw.

- `firstVertex` is the index of the first vertex to draw.

- `firstInstance` is the instance ID of the first instance to draw.

When the command is executed, primitives are assembled using the current primitive topology and `vertexCount` consecutive vertex indices with the first `vertexIndex` value equal to `firstVertex`. The primitives are drawn `instanceCount` times with `instanceIndex` starting with `firstInstance` and increasing sequentially for each instance. The assembled primitives execute the bound graphics pipeline.

Valid Usage

- VUID-vkCmdDraw-magFilter-04553
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdDraw-magFilter-09598
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdDraw-mipmapMode-04770
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdDraw-mipmapMode-09599
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdDraw-unnormalizedCoordinates-09635
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `levelCount` and `layerCount` must be 1

- VUID-vkCmdDraw-None-08609
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `viewType` must be VK_IMAGE_VIEW_TYPE_1D or VK_IMAGE_VIEW_TYPE_2D

- VUID-vkCmdDraw-None-08610
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions with `ImplicitLod`, `Dref` or `Proj` in their name

- VUID-vkCmdDraw-None-08611
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions that includes a LOD bias or any offset values

- VUID-vkCmdDraw-None-06479
  If a VkImageView is sampled with depth comparison, the image view’s format features must contain VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT

- VUID-vkCmdDraw-None-02691
  If a VkImageView is accessed using atomic operations as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT

- VUID-vkCmdDraw-None-07888
  If a VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER descriptor is accessed using atomic operations as a result of this command, then the storage texel buffer’s format features must contain VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT

- VUID-vkCmdDraw-None-02692
  If a VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT

- VUID-vkCmdDraw-None-02693
  If the VK_EXT_filter_cubic extension is not enabled and any VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, it must not have a VkImageViewType of VK_IMAGE_VIEW_TYPE_3D, VK_IMAGE_VIEW_TYPE_CUBE, or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY

- VUID-vkCmdDraw-filterCubic-02694
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have a VkImageViewType and format that supports cubic filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubic` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdDraw-filterCubicMinmax-02695
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX as a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubicMinmax` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdDraw-cubicRangeClamp-09212
  If the `cubicRangeClamp` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must not have a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM

- VUID-vkCmdDraw-reductionMode-09213
  Any VkImageView being sampled with a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM as a result of this command must sample with VK_FILTER_CUBIC_EXT

- VUID-vkCmdDraw-selectableCubicWeights-09214
  If the `selectableCubicWeights` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have VkSamplerCubicWeightsCreateInfoQCOM::`cubicWeights` equal to VK_CUBIC_FILTER_WEIGHTS_CATMULL_ROM_QCOM

- VUID-vkCmdDraw-flags-02696
  Any VkImage created with a VkImageCreateInfo::`flags` containing VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV sampled as a result of this command must only be sampled using a VkSamplerAddressMode of VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDraw-OpTypeImage-07027
  For any VkImageView being written as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdDraw-OpTypeImage-07028
  For any VkImageView being read as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdDraw-OpTypeImage-07029
  For any VkBufferView being written as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown`, the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdDraw-OpTypeImage-07030
  Any VkBufferView being read as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown` then the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdDraw-None-08600
  If a a bound shader was created with a pipeline layout and statically uses a set n, a descriptor set must have been bound to n at the same pipeline bind point, with layouts compatible for set n with the layout(s) used to create the shader, as described in Pipeline Layout Compatibility

- VUID-vkCmdDraw-None-08601
  If a a bound shader was created with a pipeline layout or specified push constant ranges and statically uses a push constant value, that value must have been set for the same pipeline bind point, with push constant ranges that are compatible with the push constant range used to create the shader

- VUID-vkCmdDraw-None-10068
  For each array of resources that is used by a bound shader, the indices used to access members of the array must be less than the descriptor count for the identified binding in the descriptor sets used by this command

- VUID-vkCmdDraw-None-08114
  Descriptors in each bound descriptor set, specified via vkCmdBindDescriptorSets, must be valid if they are accessed as described by descriptor validity by the VkPipeline bound to the pipeline bind point used by this command and the bound VkPipeline was not created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDraw-imageLayout-00344
  If an image descriptor is accessed by a shader, the VkImageLayout must match the subresource accessible from the VkImageView as defined by the image layout matching rules

- VUID-vkCmdDraw-None-08115
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdBindDescriptorSets, the bound VkPipeline must have been created without VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDraw-None-08116
  Descriptors in bound descriptor buffers, specified via vkCmdSetDescriptorBufferOffsetsEXT, must be valid if they are dynamically accessed

- VUID-vkCmdDraw-None-08117
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdSetDescriptorBufferOffsetsEXT, the bound VkPipeline must have been created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDraw-None-08119
  If a descriptor is dynamically used with a VkPipeline created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdDraw-None-08605
  If a descriptor is dynamically used with a VkShaderEXT created with a `VkDescriptorSetLayout` that was created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdDraw-None-08606
  If the `shaderObject` feature is not enabled, a valid pipeline must be bound to the pipeline bind point used by this command

- VUID-vkCmdDraw-None-08608
  If a pipeline is bound to the pipeline bind point used by this command, there must not have been any calls to dynamic state setting commands for any state specified statically in the VkPipeline object bound to the pipeline bind point used by this command, since that pipeline was bound

- VUID-vkCmdDraw-uniformBuffers-06935
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDraw-None-08612
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDraw-storageBuffers-06936
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDraw-None-08613
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a storage buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDraw-commandBuffer-02707
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, any resource accessed by bound shaders must not be a protected resource

- VUID-vkCmdDraw-viewType-07752
  If a VkImageView is accessed as a result of this command, then the image view’s `viewType` must match the `Dim` operand of the `OpTypeImage` as described in Compatibility Between SPIR-V Image Dimensions and Vulkan ImageView Types

- VUID-vkCmdDraw-format-07753
  If a VkImageView or VkBufferView is accessed as a result of this command, then the numeric type of the view’s `format` and the `Sampled` `Type` operand of the `OpTypeImage` must match

- VUID-vkCmdDraw-OpImageWrite-08795
  If a VkImageView created with a format other than VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the image view’s format

- VUID-vkCmdDraw-OpImageWrite-08796
  If a VkImageView created with the format VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have four components

- VUID-vkCmdDraw-OpImageWrite-04469
  If a VkBufferView is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the buffer view’s format

- VUID-vkCmdDraw-SampledType-04470
  If a VkImageView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdDraw-SampledType-04471
  If a VkImageView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdDraw-SampledType-04472
  If a VkBufferView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdDraw-SampledType-04473
  If a VkBufferView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdDraw-sparseImageInt64Atomics-04474
  If the `sparseImageInt64Atomics` feature is not enabled, VkImage objects created with the VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdDraw-sparseImageInt64Atomics-04475
  If the `sparseImageInt64Atomics` feature is not enabled, VkBuffer objects created with the VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdDraw-OpImageSampleWeightedQCOM-06971
  If `OpImageSampleWeightedQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_SAMPLED_IMAGE_BIT_QCOM

- VUID-vkCmdDraw-OpImageSampleWeightedQCOM-06972
  If `OpImageSampleWeightedQCOM` uses a VkImageView as a sample weight image as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_IMAGE_BIT_QCOM

- VUID-vkCmdDraw-OpImageBoxFilterQCOM-06973
  If `OpImageBoxFilterQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BOX_FILTER_SAMPLED_BIT_QCOM

- VUID-vkCmdDraw-OpImageBlockMatchSSDQCOM-06974
  If `OpImageBlockMatchSSDQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdDraw-OpImageBlockMatchSADQCOM-12420
  If `OpImageBlockMatchSADQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdDraw-OpImageBlockMatchSADQCOM-06976
  If `OpImageBlockMatchSADQCOM` or OpImageBlockMatchSSDQCOM is used to read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdDraw-OpImageSampleWeightedQCOM-06977
  If `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdDraw-OpImageSampleWeightedQCOM-06978
  If any command other than `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must not have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdDraw-OpImageBlockMatchWindow-09215
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM

- VUID-vkCmdDraw-OpImageBlockMatchWindow-09216
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format must be a single-component format

- VUID-vkCmdDraw-OpImageBlockMatchWindow-09217
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdDraw-OpImageBlockMatchWindow-12421
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the `blockMatchExtendedClampToEdge` feature is not enabled, the input sampler must not have been created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDraw-addressModeU-12422
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the input sampler was created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, then the sampler must have been created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDraw-None-07288
  Any shader invocation executed by this command must terminate

- VUID-vkCmdDraw-None-09600
  If a descriptor with type equal to any of VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, or VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT is accessed as a result of this command, all image subresources identified by that descriptor must be in the image layout identified when the descriptor was written

- VUID-vkCmdDraw-micromap-11636
  If an acceleration structure is accessed as a result of this command through an `OpRayQueryProceedKHR` operation , the `VK_EXT_opacity_micromap` extension is not enabled, and the acceleration structure is built using geometry with a VkAccelerationStructureTrianglesOpacityMicromapKHR structure included in its `pNext` chain, the shader must have specified a `OpacityMicromapIdKHR` execution mode with its specialization constant operand equal to VK_TRUE

- VUID-vkCmdDraw-micromap-11637
  If an acceleration structure is accessed as a result of this command and the acceleration structure was constructed through deserialization, all micromap arrays referenced by the acceleration structure that were not replaced by an acceleration structure update command must have been deserialized using the serialized data of the corresponding micromaps used to originally build the acceleration structure prior to the execution of this command on the device

- VUID-vkCmdDraw-micromap-11638
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkPipeline bound to the pipeline bind point used by this command must not have been created with `flags` that includes VK_PIPELINE_CREATE_2_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_KHR

- VUID-vkCmdDraw-micromap-11639
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkShaderEXT that accessed the descriptor must not have been created with `flags` that includes VK_SHADER_CREATE_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_EXT

- VUID-vkCmdDraw-commandBuffer-10746
  The `VkDeviceMemory` object allocated from a `VkMemoryHeap` with the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property that is bound to a resource accessed as a result of this command must be the active bound tile memory object in `commandBuffer`

- VUID-vkCmdDraw-None-10678
  If this command is recorded inside a tile shading render pass instance, the stages corresponding to the pipeline bind point used by this command must only include VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_FRAGMENT_BIT, and/or VK_SHADER_STAGE_COMPUTE_BIT

- VUID-vkCmdDraw-None-10679
  If this command is recorded where per-tile execution model is enabled, there must be no access to any image while the image was be transitioned to the VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT layout

- VUID-vkCmdDraw-pDescription-09900
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the underlying VkTensorARM object must have been created with the VK_TENSOR_USAGE_SHADER_BIT_ARM usage flag set

- VUID-vkCmdDraw-dimensionCount-09905
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the `Rank` of the `OpTypeTensorARM` of the tensor resource variable must be equal to the `dimensionCount` provided via VkTensorCreateInfoARM::`pDescription` when creating the underlying VkTensorARM object

- VUID-vkCmdDraw-OpTypeTensorARM-09906
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the element type of the `OpTypeTensorARM` of the tensor resource variable must be compatible with the VkFormat of the VkTensorViewARM used for the access

- VUID-vkCmdDraw-OpTensorReadARM-12462
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, using `OpTensorReadARM` or `OpTensorWriteARM`, and the underlying VkTensorARM object was created with a VK_TENSOR_TILING_BRICK_16_WIDE_ARM, VK_TENSOR_TILING_BRICK_8_WIDE_ARM, VK_TENSOR_TILING_BRICK_4_WIDE_ARM, VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_ARM, or VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_64K_ARM VkTensorTilingARM, and the object read or written is an array, then the innermost coordinate provided to `OpTensorReadARM` or `OpTensorWriteARM` via the `Coordinates` operand must be a multiple of the largest power of 2 that is less than or equal to the number of components of the array

- VUID-vkCmdDraw-pNext-12463
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command and the corresponding VkTensorARM object was created with a VkTensorRollingBackingCreateInfoARM structure in the `pNext` chain of VkTensorCreateInfoARM, then the number of elements accessed with one `OpTensorReadARM` or `OpTensorWriteARM`, must be less than or equal to the number of elements available from the starting coordinate in the rolling backing along the innermost dimension, defined as `wraps`[`dimensionCount` - 1] - InnermostCoordinate % `wraps`[`dimensionCount` - 1] where InnermostCoordinate is the last component of the coordinates array provided via the `Coordinates` operand

- VUID-vkCmdDraw-None-12472
  Descriptors dynamically accessed in bound descriptor heaps must be valid

- VUID-vkCmdDraw-None-11297
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a `OpTypeStruct` decorated with `Block` or `BufferBlock` using that mapping, the calculated offset for the resource heap must be a multiple of `bufferDescriptorAlignment`

- VUID-vkCmdDraw-None-11298
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeImage` or `OpTypeSampledImage` using that mapping, the calculated offset for the resource heap must be a multiple of `imageDescriptorAlignment`

- VUID-vkCmdDraw-None-11299
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeSampler` or `OpTypeSampledImage` using that mapping, the calculated offset for the sampler heap must be a multiple of `samplerDescriptorAlignment`

- VUID-vkCmdDraw-None-11397
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeTensorARM` using that mapping, the calculated offset for the resource heap must be a multiple of `tensorDescriptorAlignment`

- VUID-vkCmdDraw-None-11300
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 4

- VUID-vkCmdDraw-None-11301
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdDraw-None-11302
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress

- VUID-vkCmdDraw-None-11304
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 8

- VUID-vkCmdDraw-None-11305
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdDraw-None-11306
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address pointed to by the address in push data must be a valid VkDeviceAddress

- VUID-vkCmdDraw-None-11308
  For each descriptor heap that is statically used by a bound shader, either directly or via a descriptor mapping, a valid descriptor heap must be bound

- VUID-vkCmdDraw-None-11309
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, execution of this command must not result in any descriptor read accessing data outside of the user range of the respective heap bound by `vkCmdBind*HeapEXT` commands

- VUID-vkCmdDraw-None-11372
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer or uniform texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified via VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDraw-None-11373
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer or storage texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDraw-None-11374
  If the `robustBufferAccess2` feature is not enabled, the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, uniform texel buffer, storage buffer, or storage texel buffer, that shader must not access values outside of the range of the buffer as specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDraw-pBindInfo-11375
  If any bound shader uses an embedded sampler via a descriptor mapping, the value of `pBindInfo->reservedRangeSize` set for vkCmdBindSamplerHeapEXT must be greater than or equal to `minSamplerHeapReservedRangeWithEmbedded`

- VUID-vkCmdDraw-None-11376
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, and that shader statically uses a push constant value, that value must have been set by vkCmdPushDataEXT

- VUID-vkCmdDraw-None-11398
  If a bound shader was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the access must not be out of bounds

- VUID-vkCmdDraw-None-11437
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the buffer from which the address in push data was queried must have been created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdDraw-None-11438
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdDraw-None-11441
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must be aligned to `minUniformBufferOffsetAlignment`

- VUID-vkCmdDraw-None-11439
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_STORAGE_BUFFER_BIT usage flag set

- VUID-vkCmdDraw-None-11442
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must be aligned to `minStorageBufferOffsetAlignment`

- VUID-vkCmdDraw-None-11485
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses an acceleration structure using that mapping, the address that the acceleration structure is mapped to must be an acceleration structure address retrieved from a VkAccelerationStructureKHR object via vkGetAccelerationStructureDeviceAddressKHR or handle retrieved from a VkAccelerationStructureNV object via vkGetAccelerationStructureHandleNV

- VUID-vkCmdDraw-index-11450
  If a shader uses a sampler descriptor to sample an image as a result of this command, and that sampler descriptor uses a custom border color with an index defined by VkSamplerCustomBorderColorIndexCreateInfoEXT, the value of VkSamplerCustomBorderColorIndexCreateInfoEXT::`index` must have been registered before this command was recorded, and still be registered during the sampling operation, with an identically defined color

- VUID-vkCmdDraw-protectedNoFault-11455
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, the address that the resource is mapped to must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdDraw-protectedNoFault-11456
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, the address of the indirect memory must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdDraw-renderPass-02684
  The current render pass must be compatible with the `renderPass` member of the `VkGraphicsPipelineCreateInfo` structure specified when creating the `VkPipeline` bound to VK_PIPELINE_BIND_POINT_GRAPHICS

- VUID-vkCmdDraw-subpass-02685
  The subpass index of the current render pass must be equal to the `subpass` member of the `VkGraphicsPipelineCreateInfo` structure specified when creating the `VkPipeline` bound to VK_PIPELINE_BIND_POINT_GRAPHICS

- VUID-vkCmdDraw-OpTypeImage-07468
  If any shader executed by this pipeline accesses an `OpTypeImage` variable with a `Dim` operand of `SubpassData`, it must be decorated with an `InputAttachmentIndex` that corresponds to a valid input attachment in the current subpass

- VUID-vkCmdDraw-None-07469
  Input attachment views accessed in a subpass must be created with the same VkFormat as the corresponding subpass definition, and be created with a VkImageView that is compatible with the attachment referenced by the subpass' `pInputAttachments`[`InputAttachmentIndex`] in the bound VkFramebuffer as specified by Fragment Input Attachment Compatibility

- VUID-vkCmdDraw-pDepthInputAttachmentIndex-09595
  Input attachment views accessed in a dynamic render pass with a `InputAttachmentIndex` referenced by VkRenderingInputAttachmentIndexInfo, or no `InputAttachmentIndex` if VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` or VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` are `NULL`, must be created with a VkImageView that is compatible with the corresponding color, depth, or stencil attachment in VkRenderingInfo

- VUID-vkCmdDraw-pDepthInputAttachmentIndex-09596
  Input attachment views accessed in a dynamic render pass via a shader object must have an `InputAttachmentIndex` if both VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` and VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` are non-`NULL`

- VUID-vkCmdDraw-InputAttachmentIndex-09597
  If an input attachment view accessed in a dynamic render pass via a shader object has an `InputAttachmentIndex`, the `InputAttachmentIndex` must match an index in VkRenderingInputAttachmentIndexInfo

- VUID-vkCmdDraw-None-06537
  Memory backing image subresources used as attachments in the current render pass must not be written in any way other than as an attachment by this command

- VUID-vkCmdDraw-None-10795
  If a color attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_COLOR_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDraw-None-10796
  If a depth attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_DEPTH_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDraw-None-10797
  If a stencil attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_STENCIL_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDraw-None-12338
  If a color attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_COLOR_BIT on that attachment, the color attachment must not be written to by this command

- VUID-vkCmdDraw-None-12339
  If a depth attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_DEPTH_BIT on that attachment, the depth attachment must not be written to by this command

- VUID-vkCmdDraw-None-12340
  If a stencil attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_STENCIL_BIT on that attachment, the stencil attachment must not be written to by this command

- VUID-vkCmdDraw-None-09003
  If an attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, it must not be accessed in any way other than as an attachment, storage image, or sampled image by this command

- VUID-vkCmdDraw-None-06886
  If the current render pass instance uses a depth/stencil attachment with a read-only layout for the depth aspect, depth writes must be disabled

- VUID-vkCmdDraw-None-06887
  If the current render pass instance uses a depth/stencil attachment with a read-only layout for the stencil aspect, both front and back `writeMask` are not zero, and stencil test is enabled, all stencil ops must be VK_STENCIL_OP_KEEP

- VUID-vkCmdDraw-None-07831
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT dynamic state enabled then vkCmdSetViewport must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDraw-None-07832
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SCISSOR dynamic state enabled then vkCmdSetScissor must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDraw-None-08617
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_WIDTH dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineWidth must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDraw-None-07834
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BIAS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthBiasEnable` is VK_TRUE, then vkCmdSetDepthBias or vkCmdSetDepthBias2EXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDraw-None-07835
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_BLEND_CONSTANTS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and an active color attachment current value of `blendEnable` is VK_TRUE with a blend equations where any VkBlendFactor member is VK_BLEND_FACTOR_CONSTANT_COLOR, VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR, VK_BLEND_FACTOR_CONSTANT_ALPHA, or VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA, then vkCmdSetBlendConstants must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDraw-None-07836
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BOUNDS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthBoundsTestEnable` is VK_TRUE, then vkCmdSetDepthBounds must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDraw-None-07837
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilCompareMask must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDraw-None-07838
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_WRITE_MASK dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilWriteMask must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDraw-None-07839
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_REFERENCE dynamic state enabled, the current value of and `rasterizerDiscardEnable` is VK_FALSE, the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilReference must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDraw-maxMultiviewInstanceIndex-02688
  If the draw is recorded in a render pass instance with multiview enabled, the maximum instance index must be less than or equal to VkPhysicalDeviceMultiviewProperties::`maxMultiviewInstanceIndex`

- VUID-vkCmdDraw-sampleLocationsEnable-02689
  If the bound graphics pipeline was created with VkPipelineSampleLocationsStateCreateInfoEXT::`sampleLocationsEnable` set to VK_TRUE, then the active depth attachment must have been created with the VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit set

- VUID-vkCmdDraw-None-07634
  If the `VK_EXT_sample_locations` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetSampleLocationsEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDraw-None-06666
  If the `VK_EXT_sample_locations` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `sampleLocationsEnable` is VK_TRUE, then vkCmdSetSampleLocationsEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDraw-None-07840
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_CULL_MODE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCullMode must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDraw-None-07841
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRONT_FACE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetFrontFace must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDraw-None-07843
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, vkCmdSetDepthTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDraw-None-07844
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthTestEnable` is VK_TRUE, then vkCmdSetDepthWriteEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDraw-None-07845
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_COMPARE_OP dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthTestEnable` is VK_TRUE, then vkCmdSetDepthCompareOp must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDraw-None-07846
  If the `depthBounds` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthBoundsTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDraw-None-07847
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetStencilTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDraw-None-07848
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_OP dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilOp must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDraw-viewportCount-03417
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, and the state is not inherited, then vkCmdSetViewportWithCount must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDraw-scissorCount-03418
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT dynamic state enabled, and the state is not inherited, then vkCmdSetScissorWithCount must have been called and not subsequently invalidated in the current command buffer prior to this drawing

- VUID-vkCmdDraw-viewportCount-03419
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with both the VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic states enabled, and the state is not inherited, then the `viewportCount` parameter of `vkCmdSetViewportWithCount` must match the `scissorCount` parameter of `vkCmdSetScissorWithCount`

- VUID-vkCmdDraw-viewportCount-04137
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportWScalingStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDraw-viewportCount-04138
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, the current value of `viewportWScalingEnable` is VK_TRUE, then vkCmdSetViewportWScalingNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDraw-None-08636
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, the current value of `viewportWScalingEnable` is VK_TRUE, then the `viewportCount` parameter in the last call to vkCmdSetViewportWScalingNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDraw-viewportCount-04139
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportShadingRateImageStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDraw-shadingRateImage-09233
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_COARSE_SAMPLE_ORDER_NV and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoarseSampleOrderNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDraw-shadingRateImage-09234
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `shadingRateImageEnable` is VK_TRUE, then vkCmdSetViewportShadingRatePaletteNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDraw-None-08637
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `shadingRateImageEnable` is VK_TRUE, then the `viewportCount` parameter in the last call to vkCmdSetViewportShadingRatePaletteNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDraw-VkPipelineVieportCreateInfo-04141
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled and a VkPipelineViewportSwizzleStateCreateInfoNV structure chained from VkPipelineViewportStateCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportSwizzleStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDraw-VkPipelineVieportCreateInfo-04142
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled and a VkPipelineViewportExclusiveScissorStateCreateInfoNV structure chained from VkPipelineViewportStateCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportExclusiveScissorStateCreateInfoNV::`exclusiveScissorCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDraw-None-07878
  If the `exclusiveScissor` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_ENABLE_NV dynamic state enabled, then vkCmdSetExclusiveScissorEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDraw-None-07879
  If the `exclusiveScissor` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_NV dynamic state enabled, and the most recent call to vkCmdSetExclusiveScissorEnableNV in the current command buffer set any element of `pExclusiveScissorEnables` to VK_TRUE, then vkCmdSetExclusiveScissorNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDraw-None-04876
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE dynamic state enabled, then vkCmdSetRasterizerDiscardEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDraw-None-04877
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthBiasEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDraw-logicOp-04878
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LOGIC_OP_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `logicOpEnable` is VK_TRUE, then vkCmdSetLogicOpEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDraw-primitiveFragmentShadingRateWithMultipleViewports-04552
  If the `primitiveFragmentShadingRateWithMultipleViewports` limit is not supported, the bound graphics pipeline was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, and any of the shader stages of the bound graphics pipeline write to the `PrimitiveShadingRateKHR` built-in, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and the `viewportCount` parameter of `vkCmdSetViewportWithCount` must be `1`

- VUID-vkCmdDraw-primitiveFragmentShadingRateWithMultipleViewports-08642
  If the `primitiveFragmentShadingRateWithMultipleViewports` limit is not supported, and any shader object bound to a graphics stage writes to the `PrimitiveShadingRateKHR` built-in, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and the `viewportCount` parameter of `vkCmdSetViewportWithCount` must be `1`

- VUID-vkCmdDraw-blendEnable-04727
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, then for each color attachment, if the corresponding image view’s format features do not contain VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT, then the corresponding current value of `blendEnable` must be VK_FALSE

- VUID-vkCmdDraw-None-08644
  If a shader object is bound to any graphics stage or a graphics pipeline is bound, the current value of `rasterizerDiscardEnable` is VK_FALSE, and none of the following is enabled:

  - the `VK_AMD_mixed_attachment_samples` extension

  - the `VK_NV_framebuffer_mixed_samples` extension

  - the `multisampledRenderToSingleSampled` feature

  then the current value of `rasterizationSamples` must be the same as the current color and/or depth/stencil attachments

- VUID-vkCmdDraw-None-08876
  If a shader object is bound to any graphics stage, the current render pass instance must have been begun with vkCmdBeginRendering

- VUID-vkCmdDraw-imageView-06172
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDraw-imageView-06173
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDraw-imageView-06174
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDraw-imageView-06175
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDraw-imageView-06176
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDraw-imageView-06177
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDraw-viewMask-06178
  If the current render pass instance was begun with vkCmdBeginRendering, the bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::`viewMask` equal to VkRenderingInfo::`viewMask`

- VUID-vkCmdDraw-colorAttachmentCount-06179
  If the `dynamicRenderingUnusedAttachments` feature is not enabled and the current render pass instance was begun with vkCmdBeginRendering, the bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::`colorAttachmentCount` equal to VkRenderingInfo::`colorAttachmentCount`

- VUID-vkCmdDraw-dynamicRenderingUnusedAttachments-08910
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound graphics pipeline

- VUID-vkCmdDraw-dynamicRenderingUnusedAttachments-08912
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` equal to VK_NULL_HANDLE must have the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound pipeline equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDraw-dynamicRenderingUnusedAttachments-08911
  If the `dynamicRenderingUnusedAttachments` feature is enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound graphics pipeline, or the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats`, if it exists, must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDraw-colorAttachmentCount-09362
  If the current render pass instance was begun with vkCmdBeginRendering, with a VkRenderingInfo::`colorAttachmentCount` equal to `1`, there is no shader object bound to any graphics stage, and a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, each element of the VkRenderingInfo::`pColorAttachments` array with a `resolveImageView` not equal to VK_NULL_HANDLE must have been created with an image created with a VkExternalFormatANDROID::`externalFormat` value equal to the VkExternalFormatANDROID::`externalFormat` value used to create the bound graphics pipeline

- VUID-vkCmdDraw-None-09363
  If there is no shader object bound to any graphics stage, the current render pass instance was begun with vkCmdBeginRendering and a VkRenderingInfo::`colorAttachmentCount` equal to `1`, and a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with an image created with a VkExternalFormatANDROID::`externalFormat` value equal to the VkExternalFormatANDROID::`externalFormat` value used to create the bound graphics pipeline

- VUID-vkCmdDraw-None-09364
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetColorBlendEnableEXT must have set the blend enable to VK_FALSE prior to this drawing command

- VUID-vkCmdDraw-None-09365
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetRasterizationSamplesEXT must have set `rasterizationSamples` to VK_SAMPLE_COUNT_1_BIT prior to this drawing command

- VUID-vkCmdDraw-None-09368
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetFragmentShadingRateKHR must have set `pFragmentSize->width` to `1` prior to this drawing command

- VUID-vkCmdDraw-None-09369
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetFragmentShadingRateKHR must have set `pFragmentSize->height` to `1` prior to this drawing command

- VUID-vkCmdDraw-None-07749
  If the `colorWriteEnable` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorWriteEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDraw-attachmentCount-07750
  If the `colorWriteEnable` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the `attachmentCount` parameter of most recent call to `vkCmdSetColorWriteEnableEXT` in the current command buffer must be greater than or equal to the number of active color attachments

- VUID-vkCmdDraw-None-07751
  If the `VK_EXT_discard_rectangles` extension is enabled, a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT dynamic state enabled and the `pNext` chain of VkGraphicsPipelineCreateInfo included a VkPipelineDiscardRectangleStateCreateInfoEXT structure, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for each discard rectangle in VkPipelineDiscardRectangleStateCreateInfoEXT::`discardRectangleCount`

- VUID-vkCmdDraw-rasterizerDiscardEnable-09236
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT dynamic state enabled and the `pNext` chain of VkGraphicsPipelineCreateInfo did not include a VkPipelineDiscardRectangleStateCreateInfoEXT structure, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for each discard rectangle in VkPhysicalDeviceDiscardRectanglePropertiesEXT::`maxDiscardRectangles`

- VUID-vkCmdDraw-None-07880
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDiscardRectangleEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDraw-None-07881
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_MODE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDraw-dynamicRenderingUnusedAttachments-08913
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->imageView` was VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDraw-dynamicRenderingUnusedAttachments-08914
  If current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDraw-dynamicRenderingUnusedAttachments-08915
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, and the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->imageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDraw-dynamicRenderingUnusedAttachments-08916
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->imageView` was VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDraw-dynamicRenderingUnusedAttachments-08917
  If current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDraw-dynamicRenderingUnusedAttachments-08918
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, and the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->imageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDraw-imageView-06183
  If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentShadingRateAttachmentInfoKHR::`imageView` was not VK_NULL_HANDLE, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

- VUID-vkCmdDraw-dynamicRenderingLocalRead-11797
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingLocalRead` feature is enabled, the VK_RENDERING_LOCAL_READ_CONCURRENT_ACCESS_CONTROL_BIT_KHR flag is specified, and an attachment is being used as a feedback loop as specified by VK_RENDERING_ATTACHMENT_INPUT_ATTACHMENT_FEEDBACK_BIT_KHR, VkRenderingAttachmentFlagsInfoKHR::`flags` for that attachment must include VK_RENDERING_ATTACHMENT_INPUT_ATTACHMENT_FEEDBACK_BIT_KHR

- VUID-vkCmdDraw-imageView-06184
  If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentDensityMapAttachmentInfoEXT::`imageView` was not VK_NULL_HANDLE, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT

- VUID-vkCmdDraw-layers-10831
  If the current render pass instance was created with VK_RENDERING_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE or VK_RENDER_PASS_CREATE_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE, and the bound graphics pipeline was created with VK_PIPELINE_CREATE_2_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE, then the current render pass instance must have a `layers` value less than or equal to VkPipelineFragmentDensityMapLayeredCreateInfoVALVE::`maxFragmentDensityMapLayers`

- VUID-vkCmdDraw-colorAttachmentCount-06185
  If the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with a sample count equal to the corresponding element of the `pColorAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline

- VUID-vkCmdDraw-pDepthAttachment-06186
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of the `depthStencilAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDraw-pStencilAttachment-06187
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of the `depthStencilAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDraw-multisampledRenderToSingleSampled-07285
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with a sample count equal to the value of `rasterizationSamples` for the bound graphics pipeline

- VUID-vkCmdDraw-multisampledRenderToSingleSampled-07286
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDraw-multisampledRenderToSingleSampled-07287
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDraw-pNext-07935
  If this command is called inside a render pass instance started with vkCmdBeginRendering, and the `pNext` chain of VkRenderingInfo includes a VkMultisampledRenderToSingleSampledInfoEXT structure with `multisampledRenderToSingleSampledEnable` equal to VK_TRUE, then the value of `rasterizationSamples` for the bound graphics pipeline must be equal to VkMultisampledRenderToSingleSampledInfoEXT::`rasterizationSamples`

- VUID-vkCmdDraw-renderPass-06198
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline must have been created with a VkGraphicsPipelineCreateInfo::`renderPass` equal to VK_NULL_HANDLE

- VUID-vkCmdDraw-pColorAttachments-08963
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound with a fragment shader that statically writes to a color attachment, the color write mask is not zero, color writes are enabled, and the corresponding element of the VkRenderingInfo::`pColorAttachments->imageView` was not VK_NULL_HANDLE, then the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDraw-pColorAttachments-11539
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound with a fragment shader that statically writes to a color attachment, the color write mask is not zero, color writes are enabled, and the corresponding element of the VkRenderingInfo::`pColorAttachments->resolveImageView` was not VK_NULL_HANDLE, then the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDraw-pDepthAttachment-08964
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound, depth test is enabled, and the VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, then the VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDraw-pDepthAttachment-11540
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound, depth test is enabled, and the VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, then the VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDraw-pStencilAttachment-08965
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound, stencil test is enabled and the VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, then the VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDraw-pStencilAttachment-11860
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound, stencil test is enabled and the VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, then the VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDraw-flags-10582
  If the current render pass instance was begun with a vkCmdBeginRendering call in `commandBuffer`, its VkRenderingInfo::`flags` parameter must not have VK_RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT set unless VK_RENDERING_CONTENTS_INLINE_BIT_KHR is also set

- VUID-vkCmdDraw-primitivesGeneratedQueryWithRasterizerDiscard-06708
  If the `primitivesGeneratedQueryWithRasterizerDiscard` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, rasterization discard must not be enabled

- VUID-vkCmdDraw-primitivesGeneratedQueryWithNonZeroStreams-06709
  If the `primitivesGeneratedQueryWithNonZeroStreams` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, the bound graphics pipeline must not have been created with a non-zero value in `VkPipelineRasterizationStateStreamCreateInfoEXT`::`rasterizationStream`

- VUID-vkCmdDraw-None-07620
  If the `depthClamp` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLAMP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthClampEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDraw-None-07621
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_POLYGON_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetPolygonModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDraw-None-07622
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetRasterizationSamplesEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDraw-None-07623
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetSampleMaskEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDraw-alphaToCoverageEnable-08919
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT dynamic state enabled, and `alphaToCoverageEnable` was VK_TRUE in the last call to vkCmdSetAlphaToCoverageEnableEXT, then the Fragment Output Interface must contain a variable for the alpha `Component` word in `Location` 0 at `Index` 0

- VUID-vkCmdDraw-alphaToCoverageEnable-08920
  If a shader object is bound to any graphics stage, and the most recent call to vkCmdSetAlphaToCoverageEnableEXT in the current command buffer set `alphaToCoverageEnable` to VK_TRUE, then the Fragment Output Interface must contain a variable for the alpha `Component` word in `Location` 0 at `Index` 0

- VUID-vkCmdDraw-None-07624
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAlphaToCoverageEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDraw-None-07625
  If the `alphaToOne` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ALPHA_TO_ONE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAlphaToOneEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDraw-None-07626
  If the `logicOp` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LOGIC_OP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetLogicOpEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDraw-None-07627
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and there are color attachments bound, then vkCmdSetColorBlendEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDraw-None-07629
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and there are color attachments bound, then vkCmdSetColorWriteMaskEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDraw-None-07630
  If the `geometryStreams` feature is enabled, and a shader object is bound to the VK_SHADER_STAGE_GEOMETRY_BIT stage or a graphics pipeline is bound which was created with both a VK_SHADER_STAGE_GEOMETRY_BIT stage and the VK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXT dynamic state enabled, then vkCmdSetRasterizationStreamEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDraw-None-07631
  If the `VK_EXT_conservative_rasterization` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_CONSERVATIVE_RASTERIZATION_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetConservativeRasterizationModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDraw-None-07632
  If the `VK_EXT_conservative_rasterization` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXTRA_PRIMITIVE_OVERESTIMATION_SIZE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `conservativeRasterizationMode` is VK_CONSERVATIVE_RASTERIZATION_MODE_OVERESTIMATE_EXT, then vkCmdSetExtraPrimitiveOverestimationSizeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDraw-conservativePointAndLineRasterization-07499
  If the `VK_EXT_conservative_rasterization` extension is enabled, `conservativePointAndLineRasterization` is not supported, a shader object is bound to any graphics stage or a graphics pipeline is bound, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line or point topology class, then the current value of `conservativeRasterizationMode` must be VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT

- VUID-vkCmdDraw-None-07633
  If the `depthClipEnable` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLIP_ENABLE_EXT dynamic state, then vkCmdSetDepthClipEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDraw-None-07636
  If the `VK_EXT_provoking_vertex` extension is enabled, a shader object is bound to the VK_SHADER_STAGE_VERTEX_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_PROVOKING_VERTEX_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetProvokingVertexModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDraw-None-08666
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineRasterizationModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDraw-None-08669
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineStippleEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDraw-None-07849
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled and a shader object is bound to any graphics stage, or a bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stippledLineEnable` is VK_TRUE, then vkCmdSetLineStipple must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDraw-None-10608
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic state enabled, the effective rasterization input topology is in the line topology class, and the current `lineRasterizationMode` is VK_LINE_RASTERIZATION_MODE_BRESENHAM or VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH, then the current `alphaToCoverageEnable`, `alphaToOneEnable` and `sampleShadingEnable` states must all be VK_FALSE

- VUID-vkCmdDraw-None-07639
  If the `depthClipControl` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLIP_NEGATIVE_ONE_TO_ONE_EXT dynamic state enabled, then vkCmdSetDepthClipNegativeOneToOneEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDraw-None-09650
  If the `depthClampControl` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLAMP_RANGE_EXT dynamic state enabled, and the current value of `depthClampEnable` is VK_TRUE, then vkCmdSetDepthClampRangeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDraw-None-07640
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_ENABLE_NV dynamic state enabled, then vkCmdSetViewportWScalingEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDraw-None-07641
  If the `VK_NV_viewport_swizzle` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic state enabled, then vkCmdSetViewportSwizzleNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDraw-None-07642
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageToColorEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDraw-None-07643
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_LOCATION_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageToColorEnable` is VK_TRUE, then vkCmdSetCoverageToColorLocationNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDraw-None-07644
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_MODE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageModulationModeNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDraw-None-07645
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageModulationMode` is any value other than VK_COVERAGE_MODULATION_MODE_NONE_NV, then vkCmdSetCoverageModulationTableEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDraw-None-07646
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageModulationTableEnable` is VK_TRUE, then vkCmdSetCoverageModulationTableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDraw-None-07647
  If the `shadingRateImage` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SHADING_RATE_IMAGE_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetShadingRateImageEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDraw-pipelineFragmentShadingRate-09238
  If the `pipelineFragmentShadingRate` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetFragmentShadingRateKHR must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDraw-None-07648
  If the `representativeFragmentTest` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_REPRESENTATIVE_FRAGMENT_TEST_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetRepresentativeFragmentTestEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDraw-None-07649
  If the `coverageReductionMode` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageReductionModeNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDraw-rasterizationSamples-07471
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current subpass does not use any color and/or depth/stencil attachments, then the `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT must follow the rules for a zero-attachment subpass

- VUID-vkCmdDraw-samples-07472
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state disabled, then the `samples` parameter in the last call to vkCmdSetSampleMaskEXT must be greater or equal to the VkPipelineMultisampleStateCreateInfo::`rasterizationSamples` parameter used to create the bound graphics pipeline

- VUID-vkCmdDraw-samples-07473
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT state and VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT states enabled, then the `samples` parameter in the last call to vkCmdSetSampleMaskEXT must be greater or equal to the `rasterizationSamples` parameter in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDraw-None-09211
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, or a shader object is bound to any graphics stage, and the current render pass instance includes a VkMultisampledRenderToSingleSampledInfoEXT structure with `multisampledRenderToSingleSampledEnable` equal to VK_TRUE, then the `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT must be the same as the `rasterizationSamples` member of that structure

- VUID-vkCmdDraw-firstAttachment-07476
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic states enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the last call to vkCmdSetColorBlendEnableEXT in the current command buffer prior to this drawing command must have set a value for all active color attachments

- VUID-vkCmdDraw-firstAttachment-07478
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT dynamic states enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the last call to vkCmdSetColorWriteMaskEXT in the current command buffer prior to this drawing command must have set a value for all active color attachments

- VUID-vkCmdDraw-advancedBlendMaxColorAttachments-07480
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT and VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic states enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and an active color attachment current value of `blendEnable` is VK_TRUE, then the number of active color attachments must not exceed `advancedBlendMaxColorAttachments`

- VUID-vkCmdDraw-None-10862
  If a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT , but not the VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorBlendEquationEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDraw-rasterizerDiscardEnable-10863
  If a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT, but not the VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorBlendAdvancedEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDraw-None-10864
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT and VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then either vkCmdSetColorBlendAdvancedEXT or vkCmdSetColorBlendEquationEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDraw-primitivesGeneratedQueryWithNonZeroStreams-07481
  If the `primitivesGeneratedQueryWithNonZeroStreams` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, and the bound graphics pipeline was created with VK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXT state enabled, the last call to vkCmdSetRasterizationStreamEXT must have set the `rasterizationStream` to zero

- VUID-vkCmdDraw-sampleLocationsPerPixel-07482
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state disabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then the `sampleLocationsPerPixel` member of `pSampleLocationsInfo` in the last call to vkCmdSetSampleLocationsEXT must equal the `rasterizationSamples` member of the VkPipelineMultisampleStateCreateInfo structure the bound graphics pipeline has been created with

- VUID-vkCmdDraw-sampleLocationsPerPixel-07483
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then the `sampleLocationsPerPixel` member of `pSampleLocationsInfo` in the last call to vkCmdSetSampleLocationsEXT must equal the `rasterizationSamples` parameter of the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDraw-sampleLocationsEnable-07484
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT then the current active depth attachment must have been created with the VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit set

- VUID-vkCmdDraw-sampleLocationsEnable-07485
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, then the `sampleLocationsInfo.maxSampleLocationGridSize.width` in the last call to vkCmdSetSampleLocationsEXT must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.width` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling `rasterizationSamples`

- VUID-vkCmdDraw-sampleLocationsEnable-07486
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, then the `sampleLocationsInfo.maxSampleLocationGridSize.height` in the last call to vkCmdSetSampleLocationsEXT must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.height` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling `rasterizationSamples`

- VUID-vkCmdDraw-sampleLocationsEnable-07487
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, the fragment shader code must not statically use the extended instruction `InterpolateAtSample`

- VUID-vkCmdDraw-sampleLocationsEnable-07936
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationGridSize.width` must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.width` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling the value of `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDraw-sampleLocationsEnable-07937
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationGridSize.height` must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.height` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling the value of `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDraw-sampleLocationsEnable-07938
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationsPerPixel` must equal `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDraw-coverageModulationTableEnable-07488
  If a shader object is bound to any graphics stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NV state enabled, and the last call to vkCmdSetCoverageModulationTableEnableNV set `coverageModulationTableEnable` to VK_TRUE, then the `coverageModulationTableCount` parameter in the last call to vkCmdSetCoverageModulationTableNV must equal the current `rasterizationSamples` divided by the number of color samples in the current active color attachment

- VUID-vkCmdDraw-rasterizationSamples-07489
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, and if current subpass has a depth/stencil attachment and depth test, stencil test, or depth bounds test are enabled in the bound pipeline, then the current `rasterizationSamples` must be the same as the sample count of the depth/stencil attachment

- VUID-vkCmdDraw-coverageToColorEnable-07490
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV state enabled and the last call to vkCmdSetCoverageToColorEnableNV set the `coverageToColorEnable` to VK_TRUE, then there must be an active color attachment at the location selected by the last call to vkCmdSetCoverageToColorLocationNV `coverageToColorLocation`, with a VkFormat of VK_FORMAT_R8_UINT, VK_FORMAT_R8_SINT, VK_FORMAT_R16_UINT, VK_FORMAT_R16_SINT, VK_FORMAT_R32_UINT, or VK_FORMAT_R32_SINT

- VUID-vkCmdDraw-rasterizerDiscardEnable-09420
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, and a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, and the most recent call to vkCmdSetRasterizerDiscardEnable in the current command buffer set `rasterizerDiscardEnable` to VK_FALSE, and the last call to vkCmdSetCoverageToColorEnableNV set the `coverageToColorEnable` to VK_TRUE, then there must be an active color attachment at the location selected by the last call to vkCmdSetCoverageToColorLocationNV `coverageToColorLocation`, with a VkFormat of VK_FORMAT_R8_UINT, VK_FORMAT_R8_SINT, VK_FORMAT_R16_UINT, VK_FORMAT_R16_SINT, VK_FORMAT_R32_UINT, or VK_FORMAT_R32_SINT

- VUID-vkCmdDraw-coverageReductionMode-07491
  If the `coverageReductionMode` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV or VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic states enabled, then the current values of `coverageReductionMode`, `rasterizationSamples`, the sample counts for the color and depth/stencil attachments (if the subpass has them) must be a valid combination returned by vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV

- VUID-vkCmdDraw-viewportCount-07492
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportSwizzleStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDraw-viewportCount-07493
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic states enabled then the `viewportCount` parameter in the last call to vkCmdSetViewportSwizzleNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDraw-viewportCount-09421
  If the `VK_NV_viewport_swizzle` extension is enabled, and a shader object is bound to any graphics stage, then the `viewportCount` parameter in the last call to vkCmdSetViewportSwizzleNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDraw-rasterizationSamples-07494
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, and the `coverageReductionMode` feature is not enabled, or the current value of `coverageReductionMode` is not VK_COVERAGE_REDUCTION_MODE_TRUNCATE_NV, and the current value of `rasterizationSamples` is greater than sample count of the color attachment, then sample shading must be disabled

- VUID-vkCmdDraw-stippledLineEnable-07495
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_RECTANGULAR, then the `stippledRectangularLines` feature must be enabled

- VUID-vkCmdDraw-stippledLineEnable-07496
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_BRESENHAM, then the `stippledBresenhamLines` feature must be enabled

- VUID-vkCmdDraw-stippledLineEnable-07497
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH, then the `stippledSmoothLines` feature must be enabled

- VUID-vkCmdDraw-stippledLineEnable-07498
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_DEFAULT, then the `stippledRectangularLines` feature must be enabled and VkPhysicalDeviceLimits::`strictLines` must be VK_TRUE

- VUID-vkCmdDraw-stage-07073
  If the bound pipeline was created with the VkPipelineShaderStageCreateInfo::`stage` member of an element of VkGraphicsPipelineCreateInfo::`pStages` set to VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT, then Mesh Shader Queries must not be active

- VUID-vkCmdDraw-None-08877
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ATTACHMENT_FEEDBACK_LOOP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAttachmentFeedbackLoopEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDraw-None-07850
  If dynamic state was inherited from VkCommandBufferInheritanceViewportScissorInfoNV, it must be set in the current command buffer prior to this drawing command

- VUID-vkCmdDraw-nextStage-10745
  For each shader object bound to a graphics stage, except for shader object bound to the last graphics stage in the logical pipeline, it must have been created with a `nextStage` including the corresponding bit to the shader object bound to the following graphics stage in the logical pipeline

- VUID-vkCmdDraw-None-08684
  If there is no bound graphics pipeline, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_VERTEX_BIT

- VUID-vkCmdDraw-None-08685
  If there is no bound graphics pipeline, and the `tessellationShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT

- VUID-vkCmdDraw-None-08686
  If there is no bound graphics pipeline, and the `tessellationShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT

- VUID-vkCmdDraw-None-08687
  If there is no bound graphics pipeline, and the `geometryShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_GEOMETRY_BIT

- VUID-vkCmdDraw-None-08688
  If there is no bound graphics pipeline, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_FRAGMENT_BIT

- VUID-vkCmdDraw-None-08689
  If there is no bound graphics pipeline, and the `taskShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TASK_BIT_EXT

- VUID-vkCmdDraw-None-08690
  If there is no bound graphics pipeline, and the `meshShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-vkCmdDraw-None-08693
  If there is no bound graphics pipeline, and at least one of the `taskShader` and `meshShader` features is enabled, one of the VK_SHADER_STAGE_VERTEX_BIT or VK_SHADER_STAGE_MESH_BIT_EXT stages must have a valid `VkShaderEXT` bound, and the other must have no `VkShaderEXT` bound

- VUID-vkCmdDraw-None-08696
  If there is no bound graphics pipeline, and a valid `VkShaderEXT` is bound to the VK_SHADER_STAGE_VERTEX_BIT stage, there must be no `VkShaderEXT` bound to either the VK_SHADER_STAGE_TASK_BIT_EXT stage or the VK_SHADER_STAGE_MESH_BIT_EXT stage

- VUID-vkCmdDraw-None-08698
  If any graphics shader is bound which was created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag, then all shaders created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag in the same vkCreateShadersEXT call must also be bound

- VUID-vkCmdDraw-None-08699
  If any graphics shader is bound which was created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag, any stages in between stages whose shaders which did not create a shader with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag as part of the same vkCreateShadersEXT call must not have any `VkShaderEXT` bound

- VUID-vkCmdDraw-None-08878
  All bound graphics shader objects must have been created with identical or identically defined push constant ranges

- VUID-vkCmdDraw-None-08879
  All bound graphics shader objects must have either been created with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag set, or with identical or identically defined arrays of descriptor set layouts

- VUID-vkCmdDraw-colorAttachmentCount-09372
  If the current render pass instance was begun with vkCmdBeginRendering and a VkRenderingInfo::`colorAttachmentCount` equal to `1`, a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, and a fragment shader is bound, it must not declare the `DepthReplacing` or `StencilRefReplacingEXT` execution modes

- VUID-vkCmdDraw-pDynamicStates-08715
  If the bound graphics pipeline state includes a fragment shader stage, was created with VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`, and the fragment shader declares the `EarlyFragmentTests` execution mode and uses `OpDepthAttachmentReadEXT`, the `depthWriteEnable` parameter in the last call to vkCmdSetDepthWriteEnable must be VK_FALSE

- VUID-vkCmdDraw-pDynamicStates-08716
  If the bound graphics pipeline state includes a fragment shader stage, was created with VK_DYNAMIC_STATE_STENCIL_WRITE_MASK set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`, and the fragment shader declares the `EarlyFragmentTests` execution mode and uses `OpStencilAttachmentReadEXT`, the `writeMask` parameter in the last call to vkCmdSetStencilWriteMask must be `0`

- VUID-vkCmdDraw-None-09116
  If a shader object is bound to any graphics stage or the bound graphics pipeline was created with VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT, and the format of any color attachment is VK_FORMAT_E5B9G9R9_UFLOAT_PACK32, the corresponding element of the `pColorWriteMasks` parameter of vkCmdSetColorWriteMaskEXT must either include all of VK_COLOR_COMPONENT_R_BIT, VK_COLOR_COMPONENT_G_BIT, VK_COLOR_COMPONENT_B_BIT, and VK_COLOR_COMPONENT_A_BIT, or none of them

- VUID-vkCmdDraw-maxFragmentDualSrcAttachments-09239
  If blending is enabled for any attachment where either the source or destination blend factors for that attachment use the secondary color input, the maximum value of `Location` for any output attachment statically used in the `Fragment` `Execution` `Model` executed by this command must be less than `maxFragmentDualSrcAttachments`

- VUID-vkCmdDraw-None-09548
  If the current render pass was begun with vkCmdBeginRendering, there is no shader object bound to any graphics stage, the value of each element of VkRenderingAttachmentLocationInfo::`pColorAttachmentLocations` in the bound pipeline must match the value for the corresponding locations set currently in the current render pass instance

- VUID-vkCmdDraw-None-09549
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of each element of VkRenderingInputAttachmentIndexInfo::`pColorAttachmentInputIndices` in the bound pipeline must match the value for the corresponding index set currently in the current render pass instance

- VUID-vkCmdDraw-None-10927
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` in the bound pipeline must match the value set currently in the current render pass instance

- VUID-vkCmdDraw-None-10928
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` in the bound pipeline must match the value set currently in the current render pass instance

- VUID-vkCmdDraw-None-09642
  If the current render pass was begun with vkCmdBeginRendering with the VK_RENDERING_ENABLE_LEGACY_DITHERING_BIT_EXT flag, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_2_ENABLE_LEGACY_DITHERING_BIT_EXT

- VUID-vkCmdDraw-None-09643
  If the bound graphics pipeline was created with VK_PIPELINE_CREATE_2_ENABLE_LEGACY_DITHERING_BIT_EXT, the current render pass must have begun with vkCmdBeginRendering with the VK_RENDERING_ENABLE_LEGACY_DITHERING_BIT_EXT flag

- VUID-vkCmdDraw-None-10677
  If the per-tile execution model is enabled, the tileShadingPerTileDraw feature must be enabled

- VUID-vkCmdDraw-None-10772
  If a shader object is bound to any graphics stage, multiview functionality must not be enabled in the current render pass

- VUID-vkCmdDraw-multiviewPerViewViewports-12262
  If the `multiviewPerViewViewports` feature is enabled, then the index of the most significant bit in current render pass instance `viewMask` must be less than the current value of `viewportCount`

- VUID-vkCmdDraw-multiviewPerViewViewports-12263
  If the `multiviewPerViewViewports` feature is enabled, then the index of the most significant bit in current render pass instance `viewMask` must be less than the current value of `scissorCount`

- VUID-vkCmdDraw-flags-11521
  If current render pass instance was begun with vkCmdBeginRendering with VkRenderingInfo::`flags` which includes VK_RENDERING_FRAGMENT_REGION_BIT_EXT, and if sample shading is enabled (explicitly or implicitly), then the minimum fraction for sample shading must equal 0.0

- VUID-vkCmdDraw-None-11522
  If the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, and the `dynamicRenderingUnusedAttachments` feature is not enabled, the graphics pipeline bound must have been created with a VkCustomResolveCreateInfoEXT

- VUID-vkCmdDraw-None-11523
  If the current render pass instance was begun with vkCmdBeginRendering and does not contain a custom resolve, and the `dynamicRenderingUnusedAttachments` feature is not enabled, the graphics pipeline bound must not have been created with a VkCustomResolveCreateInfoEXT

- VUID-vkCmdDraw-customResolve-11524
  If the current render pass instance was begun with vkCmdBeginRendering and vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, the graphics pipeline bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_TRUE

- VUID-vkCmdDraw-customResolve-11525
  If the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, and vkCmdBeginCustomResolveEXT has not been recorded in the render pass instance, the graphics pipeline bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_FALSE

- VUID-vkCmdDraw-None-11861
  If the `dynamicRenderingUnusedAttachments` feature is not enabled and the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, the bound graphics pipeline must have been created with a VkCustomResolveCreateInfoEXT::`colorAttachmentCount` equal to VkRenderingInfo::`colorAttachmentCount`

- VUID-vkCmdDraw-None-11862
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound graphics pipeline

- VUID-vkCmdDraw-None-11863
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` equal to VK_NULL_HANDLE must have the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound pipeline equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDraw-dynamicRenderingUnusedAttachments-11864
  If the `dynamicRenderingUnusedAttachments` feature is enabled, the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound graphics pipeline, or the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats`, if it exists, must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDraw-None-11865
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDraw-None-11866
  If current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`

- VUID-vkCmdDraw-dynamicRenderingUnusedAttachments-11867
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, and the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDraw-None-11868
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->resolveImageView` was VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDraw-None-11869
  If current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`

- VUID-vkCmdDraw-dynamicRenderingUnusedAttachments-11870
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, and the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDraw-colorAttachmentCount-11871
  If the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0` and vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, then for each element of the VkRenderingInfo::`pColorAttachments` array with a `resolveImageView` not equal to VK_NULL_HANDLE, the `resolveImageView` must have been created with a sample count equal to the value of `rasterizationSamples` for the bound graphics pipeline

- VUID-vkCmdDraw-pDepthAttachment-11872
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`

- VUID-vkCmdDraw-pStencilAttachment-11873
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`

- VUID-vkCmdDraw-customResolve-11529
  If a shader object is bound to the fragment stage, the current render pass instance was begun with vkCmdBeginRendering, a fragment density map attachment is active, and vkCmdBeginCustomResolveEXT has been called, then the fragment shader object bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_TRUE

- VUID-vkCmdDraw-customResolve-11530
  If a shader object is bound to the fragment stage, the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, a fragment density map attachment is active, and vkCmdBeginCustomResolveEXT has not yet been called, then the fragment shader object bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_FALSE

- VUID-vkCmdDraw-flags-13361
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, then all bound shader objects must have been created with the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit

- VUID-vkCmdDraw-flags-13362
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, then the pipeline layout of the bound descriptor sets must have been created with VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT set

- VUID-vkCmdDraw-flags-13363
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, and any of the descriptor set layouts used to create the pipeline layout of the bound descriptor sets were created with any binding’s VkDescriptorSetLayoutBinding::`stageFlags` set with VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT, then there must be no binding with VkDescriptorSetLayoutBinding::`stageFlags` set with VK_SHADER_STAGE_TASK_BIT_EXT or VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-vkCmdDraw-flags-13364
  If there are any shader objects bound that were created with `flags` that includes both the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR and VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT bits, the pipeline layout of the bound descriptor sets must have been created with VK_PIPELINE_LAYOUT_CREATE_NO_TASK_SHADER_BIT_KHR set

- VUID-vkCmdDraw-flags-13365
  If there are any shader objects bound that were created with `flags` that includes both the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR and VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT bits, there must be no shader object bound to the VK_SHADER_STAGE_TASK_BIT_EXT stage

- VUID-vkCmdDraw-commandBuffer-02712
  If `commandBuffer` is a protected command buffer and `protectedNoFault` is not supported, any resource written to by the `VkPipeline` object bound to the pipeline bind point used by this command must not be an unprotected resource

- VUID-vkCmdDraw-commandBuffer-02713
  If `commandBuffer` is a protected command buffer and `protectedNoFault` is not supported, pipeline stages other than the framebuffer-space and compute stages in the `VkPipeline` object bound to the pipeline bind point used by this command must not write to any resource

- VUID-vkCmdDraw-commandBuffer-04617
  If any of the shader stages of the `VkPipeline` bound to the pipeline bind point used by this command uses the `RayQueryKHR` capability, then `commandBuffer` must not be a protected command buffer

- VUID-vkCmdDraw-None-04007
  All vertex input bindings accessed via vertex input variables declared in the vertex shader entry point’s interface must have either valid or VK_NULL_HANDLE buffers bound

- VUID-vkCmdDraw-None-04008
  If the `nullDescriptor` feature is not enabled, all vertex input bindings accessed via vertex input variables declared in the vertex shader entry point’s interface must not be VK_NULL_HANDLE

- VUID-vkCmdDraw-None-02721
  If the `robustBufferAccess` feature is not enabled, and that pipeline was created without enabling VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS for `vertexInputs`, then for a given vertex buffer binding, any attribute data fetched must be entirely contained within the corresponding vertex buffer binding, as described in Vertex Input Description

- VUID-vkCmdDraw-format-10389
  For each vertex attribute accessed by this command, if its VkVertexInputAttributeDescription::`format` or VkVertexInputAttributeDescription2EXT::`format` is a packed format, and the `legacyVertexAttributes` feature is not enabled, the value of `attribAddress`, calculated as described in Vertex Input Calculation, must be a multiple of the size of the `format`

- VUID-vkCmdDraw-format-10390
  For each vertex attribute accessed by this command, if its VkVertexInputAttributeDescription::`format` or VkVertexInputAttributeDescription2EXT::`format` is not a packed format, and either the `legacyVertexAttributes` feature is not enabled or `format` has 64-bit components, the value of `attribAddress`, calculated as described in Vertex Input Calculation, must be a multiple of the component size of the `format`

- VUID-vkCmdDraw-None-07842
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY dynamic state enabled then vkCmdSetPrimitiveTopology must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDraw-dynamicPrimitiveTopologyUnrestricted-07500
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY dynamic state enabled and the `dynamicPrimitiveTopologyUnrestricted` is VK_FALSE, then the `primitiveTopology` parameter of `vkCmdSetPrimitiveTopology` must be of the same topology class as the pipeline VkPipelineInputAssemblyStateCreateInfo::`topology` state

- VUID-vkCmdDraw-primitiveTopology-10286
  If a VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage is bound, then the current value of `primitiveTopology` must be VK_PRIMITIVE_TOPOLOGY_PATCH_LIST prior to this drawing command

- VUID-vkCmdDraw-primitiveTopology-10747
  If vkCmdSetPrimitiveTopology set `primitiveTopology` to VK_PRIMITIVE_TOPOLOGY_PATCH_LIST prior to this drawing command, then a VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage must be bound

- VUID-vkCmdDraw-primitiveTopology-10748
  If vkCmdSetPrimitiveTopology set `primitiveTopology` to VK_PRIMITIVE_TOPOLOGY_POINT_LIST prior to this drawing command, the `maintenance5` feature is not enabled, both a VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT and VK_SHADER_STAGE_GEOMETRY_BIT stage are not bound, then the `Vertex` `Execution` `Model` must have a `PointSize` decorated variable that is statically written to

- VUID-vkCmdDraw-pStrides-04913
  If the bound graphics pipeline was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE dynamic state enabled, but without the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled, then vkCmdBindVertexBuffers2 with a non-`NULL` `pStrides` parameter or vkCmdBindVertexBuffers3KHR with `setStride` set to VK_TRUE must have been called and not subsequently invalidated in the current command buffer prior to this draw command

- VUID-vkCmdDraw-None-13118
  If the bound graphics pipeline was created without the VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE dynamic state enabled, without the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled, and vkCmdBindVertexBuffers3KHR was called and not subsequently invalidated in the current command buffer prior to this draw command, the value of `setStride` in each of its `pBindInfos` elements must have been VK_FALSE

- VUID-vkCmdDraw-None-04914
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled then vkCmdSetVertexInputEXT must have been called and not subsequently invalidated in the current command buffer prior to this draw command

- VUID-vkCmdDraw-Input-07939
  If the `vertexAttributeRobustness` feature is not enabled, and the `maintenance9` feature is not enabled, and there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled then all variables with the `Input` storage class decorated with `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` must contain a location in VkVertexInputAttributeDescription2EXT::`location`

- VUID-vkCmdDraw-Input-08734
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled and either the `legacyVertexAttributes` feature is not enabled or the SPIR-V Type associated with a given `Input` variable of the corresponding `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` is 64-bit, then the numeric type associated with all `Input` variables of the corresponding `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` must be the same as VkVertexInputAttributeDescription2EXT::`format`

- VUID-vkCmdDraw-format-08936
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled and VkVertexInputAttributeDescription2EXT::`format` has a 64-bit component, then the scalar width associated with all `Input` variables of the corresponding `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` must be 64-bit

- VUID-vkCmdDraw-format-08937
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled and the scalar width associated with a `Location` decorated `Input` variable in the `Vertex` `Execution` `Model` `OpEntryPoint` is 64-bit, then the corresponding VkVertexInputAttributeDescription2EXT::`format` must have a 64-bit component

- VUID-vkCmdDraw-None-09203
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled and VkVertexInputAttributeDescription2EXT::`format` has a 64-bit component, then all `Input` variables at the corresponding `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` must not use components that are not present in the format

- VUID-vkCmdDraw-None-04875
  If there is a shader object bound to the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage or the bound graphics pipeline state was created with both a VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage and the VK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT dynamic state enabled, and the current value of `primitiveTopology` is VK_PRIMITIVE_TOPOLOGY_PATCH_LIST, then vkCmdSetPatchControlPointsEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDraw-None-04879
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE dynamic state enabled then vkCmdSetPrimitiveRestartEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDraw-None-09637
  If the `primitiveTopologyListRestart` feature is not enabled, the input assembly is VK_PRIMITIVE_TOPOLOGY_POINT_LIST, VK_PRIMITIVE_TOPOLOGY_LINE_LIST, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY, or VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY, there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE dynamic state enabled, then vkCmdSetPrimitiveRestartEnable must be VK_FALSE

- VUID-vkCmdDraw-None-10909
  If the `primitiveTopologyPatchListRestart` feature is not enabled, the input assembly is VK_PRIMITIVE_TOPOLOGY_PATCH_LIST, there is a shader object bound to the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE dynamic state enabled then vkCmdSetPrimitiveRestartEnable must be VK_FALSE

- VUID-vkCmdDraw-stage-06481
  The bound graphics pipeline must not have been created with the VkPipelineShaderStageCreateInfo::`stage` member of any element of VkGraphicsPipelineCreateInfo::`pStages` set to VK_SHADER_STAGE_TASK_BIT_EXT or VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-vkCmdDraw-None-08885
  There must be no shader object bound to either of the VK_SHADER_STAGE_TASK_BIT_EXT or VK_SHADER_STAGE_MESH_BIT_EXT stages

- VUID-vkCmdDraw-None-07619
  If a shader object is bound to the VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stage or a graphics pipeline is bound which was created with both a VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stage and the VK_DYNAMIC_STATE_TESSELLATION_DOMAIN_ORIGIN_EXT dynamic state enabled, then vkCmdSetTessellationDomainOriginEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDraw-OpExecutionMode-12239
  If a shader is bound to both the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stages, and if both stages contain an `OpExecutionMode` instruction specifying the type of subdivision, they must be the same

- VUID-vkCmdDraw-OpExecutionMode-12240
  If a shader is bound to both the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stages, and if both stages contain an `OpExecutionMode` instruction specifying the orientation of triangles, they must be the same

- VUID-vkCmdDraw-OpExecutionMode-12241
  If a shader is bound to both the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stages, and if both stages contain an `OpExecutionMode` instruction specifying the segment spacing, they must be the same

- VUID-vkCmdDraw-OpExecutionMode-12242
  If a shader is bound to both the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stages, and if both stages contain an `OpExecutionMode` instruction specifying the output patch size, they must be the same

- VUID-vkCmdDraw-pNext-09461
  If the bound graphics pipeline state was created with VkPipelineVertexInputDivisorStateCreateInfo in the `pNext` chain of VkGraphicsPipelineCreateInfo::`pVertexInputState`, any member of VkPipelineVertexInputDivisorStateCreateInfo::`pVertexBindingDivisors` has a value other than `1` in `divisor`, and VkPhysicalDeviceVertexAttributeDivisorProperties::`supportsNonZeroFirstInstance` is VK_FALSE, then `firstInstance` must be `0`

- VUID-vkCmdDraw-None-09462
  If shader objects are used for drawing or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled, any member of the `pVertexBindingDescriptions` parameter to the vkCmdSetVertexInputEXT call that sets this dynamic state has a value other than `1` in `divisor`, and VkPhysicalDeviceVertexAttributeDivisorProperties::`supportsNonZeroFirstInstance` is VK_FALSE, then `firstInstance` must be `0`

Valid Usage (Implicit)

- VUID-vkCmdDraw-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdDraw-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdDraw-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdDraw-renderpass
  This command must only be called inside of a render pass instance

- VUID-vkCmdDraw-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdDraw-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Inside | Outside | VK_QUEUE_GRAPHICS_BIT | Action

Conditional Rendering

vkCmdDraw is affected by conditional rendering

To record an indexed draw, call:

    // Provided by VK_VERSION_1_0
    void vkCmdDrawIndexed(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    indexCount,
        uint32_t                                    instanceCount,
        uint32_t                                    firstIndex,
        int32_t                                     vertexOffset,
        uint32_t                                    firstInstance);

- `commandBuffer` is the command buffer into which the command is recorded.

- `indexCount` is the number of vertices to draw.

- `instanceCount` is the number of instances to draw.

- `firstIndex` is the base index within the index buffer.

- `vertexOffset` is the value added to the vertex index before indexing into the vertex buffer.

- `firstInstance` is the instance ID of the first instance to draw.

When the command is executed, primitives are assembled using the current primitive topology and `indexCount` vertices whose indices are retrieved from the index buffer. The index buffer is treated as an array of tightly packed unsigned integers of size defined by the vkCmdBindIndexBuffer2::`indexType` or the vkCmdBindIndexBuffer::`indexType` parameter with which the buffer was bound.

The first vertex index is read from `indexAddress` + (`firstIndex` × `indexSize`), where `indexAddress` is the effective address specified for the index buffer by vkCmdBindIndexBuffer3KHR, vkCmdBindIndexBuffer2, or vkCmdBindIndexBuffer, and `indexSize` is the byte size of the type specified by `indexType`. Subsequent index values are retrieved from consecutive locations in the index buffer. Indices are first compared to the primitive restart value, then zero extended to 32 bits (if the `indexType` is VK_INDEX_TYPE_UINT8 or VK_INDEX_TYPE_UINT16) and have `vertexOffset` added to them, before being supplied as the `vertexIndex` value.

The primitives are drawn `instanceCount` times with `instanceIndex` starting with `firstInstance` and increasing sequentially for each instance. The assembled primitives execute the bound graphics pipeline.

Valid Usage

- VUID-vkCmdDrawIndexed-magFilter-04553
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdDrawIndexed-magFilter-09598
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdDrawIndexed-mipmapMode-04770
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdDrawIndexed-mipmapMode-09599
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdDrawIndexed-unnormalizedCoordinates-09635
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `levelCount` and `layerCount` must be 1

- VUID-vkCmdDrawIndexed-None-08609
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `viewType` must be VK_IMAGE_VIEW_TYPE_1D or VK_IMAGE_VIEW_TYPE_2D

- VUID-vkCmdDrawIndexed-None-08610
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions with `ImplicitLod`, `Dref` or `Proj` in their name

- VUID-vkCmdDrawIndexed-None-08611
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions that includes a LOD bias or any offset values

- VUID-vkCmdDrawIndexed-None-06479
  If a VkImageView is sampled with depth comparison, the image view’s format features must contain VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT

- VUID-vkCmdDrawIndexed-None-02691
  If a VkImageView is accessed using atomic operations as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT

- VUID-vkCmdDrawIndexed-None-07888
  If a VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER descriptor is accessed using atomic operations as a result of this command, then the storage texel buffer’s format features must contain VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT

- VUID-vkCmdDrawIndexed-None-02692
  If a VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT

- VUID-vkCmdDrawIndexed-None-02693
  If the VK_EXT_filter_cubic extension is not enabled and any VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, it must not have a VkImageViewType of VK_IMAGE_VIEW_TYPE_3D, VK_IMAGE_VIEW_TYPE_CUBE, or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY

- VUID-vkCmdDrawIndexed-filterCubic-02694
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have a VkImageViewType and format that supports cubic filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubic` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdDrawIndexed-filterCubicMinmax-02695
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX as a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubicMinmax` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdDrawIndexed-cubicRangeClamp-09212
  If the `cubicRangeClamp` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must not have a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM

- VUID-vkCmdDrawIndexed-reductionMode-09213
  Any VkImageView being sampled with a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM as a result of this command must sample with VK_FILTER_CUBIC_EXT

- VUID-vkCmdDrawIndexed-selectableCubicWeights-09214
  If the `selectableCubicWeights` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have VkSamplerCubicWeightsCreateInfoQCOM::`cubicWeights` equal to VK_CUBIC_FILTER_WEIGHTS_CATMULL_ROM_QCOM

- VUID-vkCmdDrawIndexed-flags-02696
  Any VkImage created with a VkImageCreateInfo::`flags` containing VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV sampled as a result of this command must only be sampled using a VkSamplerAddressMode of VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawIndexed-OpTypeImage-07027
  For any VkImageView being written as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawIndexed-OpTypeImage-07028
  For any VkImageView being read as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawIndexed-OpTypeImage-07029
  For any VkBufferView being written as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown`, the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawIndexed-OpTypeImage-07030
  Any VkBufferView being read as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown` then the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawIndexed-None-08600
  If a a bound shader was created with a pipeline layout and statically uses a set n, a descriptor set must have been bound to n at the same pipeline bind point, with layouts compatible for set n with the layout(s) used to create the shader, as described in Pipeline Layout Compatibility

- VUID-vkCmdDrawIndexed-None-08601
  If a a bound shader was created with a pipeline layout or specified push constant ranges and statically uses a push constant value, that value must have been set for the same pipeline bind point, with push constant ranges that are compatible with the push constant range used to create the shader

- VUID-vkCmdDrawIndexed-None-10068
  For each array of resources that is used by a bound shader, the indices used to access members of the array must be less than the descriptor count for the identified binding in the descriptor sets used by this command

- VUID-vkCmdDrawIndexed-None-08114
  Descriptors in each bound descriptor set, specified via vkCmdBindDescriptorSets, must be valid if they are accessed as described by descriptor validity by the VkPipeline bound to the pipeline bind point used by this command and the bound VkPipeline was not created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawIndexed-imageLayout-00344
  If an image descriptor is accessed by a shader, the VkImageLayout must match the subresource accessible from the VkImageView as defined by the image layout matching rules

- VUID-vkCmdDrawIndexed-None-08115
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdBindDescriptorSets, the bound VkPipeline must have been created without VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawIndexed-None-08116
  Descriptors in bound descriptor buffers, specified via vkCmdSetDescriptorBufferOffsetsEXT, must be valid if they are dynamically accessed

- VUID-vkCmdDrawIndexed-None-08117
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdSetDescriptorBufferOffsetsEXT, the bound VkPipeline must have been created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawIndexed-None-08119
  If a descriptor is dynamically used with a VkPipeline created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdDrawIndexed-None-08605
  If a descriptor is dynamically used with a VkShaderEXT created with a `VkDescriptorSetLayout` that was created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdDrawIndexed-None-08606
  If the `shaderObject` feature is not enabled, a valid pipeline must be bound to the pipeline bind point used by this command

- VUID-vkCmdDrawIndexed-None-08608
  If a pipeline is bound to the pipeline bind point used by this command, there must not have been any calls to dynamic state setting commands for any state specified statically in the VkPipeline object bound to the pipeline bind point used by this command, since that pipeline was bound

- VUID-vkCmdDrawIndexed-uniformBuffers-06935
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawIndexed-None-08612
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawIndexed-storageBuffers-06936
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawIndexed-None-08613
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a storage buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawIndexed-commandBuffer-02707
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, any resource accessed by bound shaders must not be a protected resource

- VUID-vkCmdDrawIndexed-viewType-07752
  If a VkImageView is accessed as a result of this command, then the image view’s `viewType` must match the `Dim` operand of the `OpTypeImage` as described in Compatibility Between SPIR-V Image Dimensions and Vulkan ImageView Types

- VUID-vkCmdDrawIndexed-format-07753
  If a VkImageView or VkBufferView is accessed as a result of this command, then the numeric type of the view’s `format` and the `Sampled` `Type` operand of the `OpTypeImage` must match

- VUID-vkCmdDrawIndexed-OpImageWrite-08795
  If a VkImageView created with a format other than VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the image view’s format

- VUID-vkCmdDrawIndexed-OpImageWrite-08796
  If a VkImageView created with the format VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have four components

- VUID-vkCmdDrawIndexed-OpImageWrite-04469
  If a VkBufferView is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the buffer view’s format

- VUID-vkCmdDrawIndexed-SampledType-04470
  If a VkImageView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdDrawIndexed-SampledType-04471
  If a VkImageView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdDrawIndexed-SampledType-04472
  If a VkBufferView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdDrawIndexed-SampledType-04473
  If a VkBufferView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdDrawIndexed-sparseImageInt64Atomics-04474
  If the `sparseImageInt64Atomics` feature is not enabled, VkImage objects created with the VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdDrawIndexed-sparseImageInt64Atomics-04475
  If the `sparseImageInt64Atomics` feature is not enabled, VkBuffer objects created with the VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdDrawIndexed-OpImageSampleWeightedQCOM-06971
  If `OpImageSampleWeightedQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_SAMPLED_IMAGE_BIT_QCOM

- VUID-vkCmdDrawIndexed-OpImageSampleWeightedQCOM-06972
  If `OpImageSampleWeightedQCOM` uses a VkImageView as a sample weight image as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_IMAGE_BIT_QCOM

- VUID-vkCmdDrawIndexed-OpImageBoxFilterQCOM-06973
  If `OpImageBoxFilterQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BOX_FILTER_SAMPLED_BIT_QCOM

- VUID-vkCmdDrawIndexed-OpImageBlockMatchSSDQCOM-06974
  If `OpImageBlockMatchSSDQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdDrawIndexed-OpImageBlockMatchSADQCOM-12420
  If `OpImageBlockMatchSADQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdDrawIndexed-OpImageBlockMatchSADQCOM-06976
  If `OpImageBlockMatchSADQCOM` or OpImageBlockMatchSSDQCOM is used to read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdDrawIndexed-OpImageSampleWeightedQCOM-06977
  If `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdDrawIndexed-OpImageSampleWeightedQCOM-06978
  If any command other than `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must not have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdDrawIndexed-OpImageBlockMatchWindow-09215
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM

- VUID-vkCmdDrawIndexed-OpImageBlockMatchWindow-09216
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format must be a single-component format

- VUID-vkCmdDrawIndexed-OpImageBlockMatchWindow-09217
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdDrawIndexed-OpImageBlockMatchWindow-12421
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the `blockMatchExtendedClampToEdge` feature is not enabled, the input sampler must not have been created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawIndexed-addressModeU-12422
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the input sampler was created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, then the sampler must have been created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawIndexed-None-07288
  Any shader invocation executed by this command must terminate

- VUID-vkCmdDrawIndexed-None-09600
  If a descriptor with type equal to any of VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, or VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT is accessed as a result of this command, all image subresources identified by that descriptor must be in the image layout identified when the descriptor was written

- VUID-vkCmdDrawIndexed-micromap-11636
  If an acceleration structure is accessed as a result of this command through an `OpRayQueryProceedKHR` operation , the `VK_EXT_opacity_micromap` extension is not enabled, and the acceleration structure is built using geometry with a VkAccelerationStructureTrianglesOpacityMicromapKHR structure included in its `pNext` chain, the shader must have specified a `OpacityMicromapIdKHR` execution mode with its specialization constant operand equal to VK_TRUE

- VUID-vkCmdDrawIndexed-micromap-11637
  If an acceleration structure is accessed as a result of this command and the acceleration structure was constructed through deserialization, all micromap arrays referenced by the acceleration structure that were not replaced by an acceleration structure update command must have been deserialized using the serialized data of the corresponding micromaps used to originally build the acceleration structure prior to the execution of this command on the device

- VUID-vkCmdDrawIndexed-micromap-11638
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkPipeline bound to the pipeline bind point used by this command must not have been created with `flags` that includes VK_PIPELINE_CREATE_2_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_KHR

- VUID-vkCmdDrawIndexed-micromap-11639
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkShaderEXT that accessed the descriptor must not have been created with `flags` that includes VK_SHADER_CREATE_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_EXT

- VUID-vkCmdDrawIndexed-commandBuffer-10746
  The `VkDeviceMemory` object allocated from a `VkMemoryHeap` with the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property that is bound to a resource accessed as a result of this command must be the active bound tile memory object in `commandBuffer`

- VUID-vkCmdDrawIndexed-None-10678
  If this command is recorded inside a tile shading render pass instance, the stages corresponding to the pipeline bind point used by this command must only include VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_FRAGMENT_BIT, and/or VK_SHADER_STAGE_COMPUTE_BIT

- VUID-vkCmdDrawIndexed-None-10679
  If this command is recorded where per-tile execution model is enabled, there must be no access to any image while the image was be transitioned to the VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT layout

- VUID-vkCmdDrawIndexed-pDescription-09900
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the underlying VkTensorARM object must have been created with the VK_TENSOR_USAGE_SHADER_BIT_ARM usage flag set

- VUID-vkCmdDrawIndexed-dimensionCount-09905
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the `Rank` of the `OpTypeTensorARM` of the tensor resource variable must be equal to the `dimensionCount` provided via VkTensorCreateInfoARM::`pDescription` when creating the underlying VkTensorARM object

- VUID-vkCmdDrawIndexed-OpTypeTensorARM-09906
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the element type of the `OpTypeTensorARM` of the tensor resource variable must be compatible with the VkFormat of the VkTensorViewARM used for the access

- VUID-vkCmdDrawIndexed-OpTensorReadARM-12462
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, using `OpTensorReadARM` or `OpTensorWriteARM`, and the underlying VkTensorARM object was created with a VK_TENSOR_TILING_BRICK_16_WIDE_ARM, VK_TENSOR_TILING_BRICK_8_WIDE_ARM, VK_TENSOR_TILING_BRICK_4_WIDE_ARM, VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_ARM, or VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_64K_ARM VkTensorTilingARM, and the object read or written is an array, then the innermost coordinate provided to `OpTensorReadARM` or `OpTensorWriteARM` via the `Coordinates` operand must be a multiple of the largest power of 2 that is less than or equal to the number of components of the array

- VUID-vkCmdDrawIndexed-pNext-12463
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command and the corresponding VkTensorARM object was created with a VkTensorRollingBackingCreateInfoARM structure in the `pNext` chain of VkTensorCreateInfoARM, then the number of elements accessed with one `OpTensorReadARM` or `OpTensorWriteARM`, must be less than or equal to the number of elements available from the starting coordinate in the rolling backing along the innermost dimension, defined as `wraps`[`dimensionCount` - 1] - InnermostCoordinate % `wraps`[`dimensionCount` - 1] where InnermostCoordinate is the last component of the coordinates array provided via the `Coordinates` operand

- VUID-vkCmdDrawIndexed-None-12472
  Descriptors dynamically accessed in bound descriptor heaps must be valid

- VUID-vkCmdDrawIndexed-None-11297
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a `OpTypeStruct` decorated with `Block` or `BufferBlock` using that mapping, the calculated offset for the resource heap must be a multiple of `bufferDescriptorAlignment`

- VUID-vkCmdDrawIndexed-None-11298
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeImage` or `OpTypeSampledImage` using that mapping, the calculated offset for the resource heap must be a multiple of `imageDescriptorAlignment`

- VUID-vkCmdDrawIndexed-None-11299
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeSampler` or `OpTypeSampledImage` using that mapping, the calculated offset for the sampler heap must be a multiple of `samplerDescriptorAlignment`

- VUID-vkCmdDrawIndexed-None-11397
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeTensorARM` using that mapping, the calculated offset for the resource heap must be a multiple of `tensorDescriptorAlignment`

- VUID-vkCmdDrawIndexed-None-11300
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 4

- VUID-vkCmdDrawIndexed-None-11301
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdDrawIndexed-None-11302
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress

- VUID-vkCmdDrawIndexed-None-11304
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 8

- VUID-vkCmdDrawIndexed-None-11305
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdDrawIndexed-None-11306
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address pointed to by the address in push data must be a valid VkDeviceAddress

- VUID-vkCmdDrawIndexed-None-11308
  For each descriptor heap that is statically used by a bound shader, either directly or via a descriptor mapping, a valid descriptor heap must be bound

- VUID-vkCmdDrawIndexed-None-11309
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, execution of this command must not result in any descriptor read accessing data outside of the user range of the respective heap bound by `vkCmdBind*HeapEXT` commands

- VUID-vkCmdDrawIndexed-None-11372
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer or uniform texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified via VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawIndexed-None-11373
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer or storage texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawIndexed-None-11374
  If the `robustBufferAccess2` feature is not enabled, the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, uniform texel buffer, storage buffer, or storage texel buffer, that shader must not access values outside of the range of the buffer as specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawIndexed-pBindInfo-11375
  If any bound shader uses an embedded sampler via a descriptor mapping, the value of `pBindInfo->reservedRangeSize` set for vkCmdBindSamplerHeapEXT must be greater than or equal to `minSamplerHeapReservedRangeWithEmbedded`

- VUID-vkCmdDrawIndexed-None-11376
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, and that shader statically uses a push constant value, that value must have been set by vkCmdPushDataEXT

- VUID-vkCmdDrawIndexed-None-11398
  If a bound shader was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the access must not be out of bounds

- VUID-vkCmdDrawIndexed-None-11437
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the buffer from which the address in push data was queried must have been created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdDrawIndexed-None-11438
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdDrawIndexed-None-11441
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must be aligned to `minUniformBufferOffsetAlignment`

- VUID-vkCmdDrawIndexed-None-11439
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_STORAGE_BUFFER_BIT usage flag set

- VUID-vkCmdDrawIndexed-None-11442
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must be aligned to `minStorageBufferOffsetAlignment`

- VUID-vkCmdDrawIndexed-None-11485
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses an acceleration structure using that mapping, the address that the acceleration structure is mapped to must be an acceleration structure address retrieved from a VkAccelerationStructureKHR object via vkGetAccelerationStructureDeviceAddressKHR or handle retrieved from a VkAccelerationStructureNV object via vkGetAccelerationStructureHandleNV

- VUID-vkCmdDrawIndexed-index-11450
  If a shader uses a sampler descriptor to sample an image as a result of this command, and that sampler descriptor uses a custom border color with an index defined by VkSamplerCustomBorderColorIndexCreateInfoEXT, the value of VkSamplerCustomBorderColorIndexCreateInfoEXT::`index` must have been registered before this command was recorded, and still be registered during the sampling operation, with an identically defined color

- VUID-vkCmdDrawIndexed-protectedNoFault-11455
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, the address that the resource is mapped to must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdDrawIndexed-protectedNoFault-11456
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, the address of the indirect memory must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdDrawIndexed-renderPass-02684
  The current render pass must be compatible with the `renderPass` member of the `VkGraphicsPipelineCreateInfo` structure specified when creating the `VkPipeline` bound to VK_PIPELINE_BIND_POINT_GRAPHICS

- VUID-vkCmdDrawIndexed-subpass-02685
  The subpass index of the current render pass must be equal to the `subpass` member of the `VkGraphicsPipelineCreateInfo` structure specified when creating the `VkPipeline` bound to VK_PIPELINE_BIND_POINT_GRAPHICS

- VUID-vkCmdDrawIndexed-OpTypeImage-07468
  If any shader executed by this pipeline accesses an `OpTypeImage` variable with a `Dim` operand of `SubpassData`, it must be decorated with an `InputAttachmentIndex` that corresponds to a valid input attachment in the current subpass

- VUID-vkCmdDrawIndexed-None-07469
  Input attachment views accessed in a subpass must be created with the same VkFormat as the corresponding subpass definition, and be created with a VkImageView that is compatible with the attachment referenced by the subpass' `pInputAttachments`[`InputAttachmentIndex`] in the bound VkFramebuffer as specified by Fragment Input Attachment Compatibility

- VUID-vkCmdDrawIndexed-pDepthInputAttachmentIndex-09595
  Input attachment views accessed in a dynamic render pass with a `InputAttachmentIndex` referenced by VkRenderingInputAttachmentIndexInfo, or no `InputAttachmentIndex` if VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` or VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` are `NULL`, must be created with a VkImageView that is compatible with the corresponding color, depth, or stencil attachment in VkRenderingInfo

- VUID-vkCmdDrawIndexed-pDepthInputAttachmentIndex-09596
  Input attachment views accessed in a dynamic render pass via a shader object must have an `InputAttachmentIndex` if both VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` and VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` are non-`NULL`

- VUID-vkCmdDrawIndexed-InputAttachmentIndex-09597
  If an input attachment view accessed in a dynamic render pass via a shader object has an `InputAttachmentIndex`, the `InputAttachmentIndex` must match an index in VkRenderingInputAttachmentIndexInfo

- VUID-vkCmdDrawIndexed-None-06537
  Memory backing image subresources used as attachments in the current render pass must not be written in any way other than as an attachment by this command

- VUID-vkCmdDrawIndexed-None-10795
  If a color attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_COLOR_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawIndexed-None-10796
  If a depth attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_DEPTH_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawIndexed-None-10797
  If a stencil attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_STENCIL_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawIndexed-None-12338
  If a color attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_COLOR_BIT on that attachment, the color attachment must not be written to by this command

- VUID-vkCmdDrawIndexed-None-12339
  If a depth attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_DEPTH_BIT on that attachment, the depth attachment must not be written to by this command

- VUID-vkCmdDrawIndexed-None-12340
  If a stencil attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_STENCIL_BIT on that attachment, the stencil attachment must not be written to by this command

- VUID-vkCmdDrawIndexed-None-09003
  If an attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, it must not be accessed in any way other than as an attachment, storage image, or sampled image by this command

- VUID-vkCmdDrawIndexed-None-06886
  If the current render pass instance uses a depth/stencil attachment with a read-only layout for the depth aspect, depth writes must be disabled

- VUID-vkCmdDrawIndexed-None-06887
  If the current render pass instance uses a depth/stencil attachment with a read-only layout for the stencil aspect, both front and back `writeMask` are not zero, and stencil test is enabled, all stencil ops must be VK_STENCIL_OP_KEEP

- VUID-vkCmdDrawIndexed-None-07831
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT dynamic state enabled then vkCmdSetViewport must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexed-None-07832
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SCISSOR dynamic state enabled then vkCmdSetScissor must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexed-None-08617
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_WIDTH dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineWidth must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexed-None-07834
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BIAS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthBiasEnable` is VK_TRUE, then vkCmdSetDepthBias or vkCmdSetDepthBias2EXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexed-None-07835
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_BLEND_CONSTANTS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and an active color attachment current value of `blendEnable` is VK_TRUE with a blend equations where any VkBlendFactor member is VK_BLEND_FACTOR_CONSTANT_COLOR, VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR, VK_BLEND_FACTOR_CONSTANT_ALPHA, or VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA, then vkCmdSetBlendConstants must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexed-None-07836
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BOUNDS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthBoundsTestEnable` is VK_TRUE, then vkCmdSetDepthBounds must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexed-None-07837
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilCompareMask must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexed-None-07838
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_WRITE_MASK dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilWriteMask must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexed-None-07839
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_REFERENCE dynamic state enabled, the current value of and `rasterizerDiscardEnable` is VK_FALSE, the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilReference must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexed-maxMultiviewInstanceIndex-02688
  If the draw is recorded in a render pass instance with multiview enabled, the maximum instance index must be less than or equal to VkPhysicalDeviceMultiviewProperties::`maxMultiviewInstanceIndex`

- VUID-vkCmdDrawIndexed-sampleLocationsEnable-02689
  If the bound graphics pipeline was created with VkPipelineSampleLocationsStateCreateInfoEXT::`sampleLocationsEnable` set to VK_TRUE, then the active depth attachment must have been created with the VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit set

- VUID-vkCmdDrawIndexed-None-07634
  If the `VK_EXT_sample_locations` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetSampleLocationsEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexed-None-06666
  If the `VK_EXT_sample_locations` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `sampleLocationsEnable` is VK_TRUE, then vkCmdSetSampleLocationsEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexed-None-07840
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_CULL_MODE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCullMode must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexed-None-07841
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRONT_FACE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetFrontFace must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexed-None-07843
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, vkCmdSetDepthTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexed-None-07844
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthTestEnable` is VK_TRUE, then vkCmdSetDepthWriteEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexed-None-07845
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_COMPARE_OP dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthTestEnable` is VK_TRUE, then vkCmdSetDepthCompareOp must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexed-None-07846
  If the `depthBounds` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthBoundsTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexed-None-07847
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetStencilTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexed-None-07848
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_OP dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilOp must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexed-viewportCount-03417
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, and the state is not inherited, then vkCmdSetViewportWithCount must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexed-scissorCount-03418
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT dynamic state enabled, and the state is not inherited, then vkCmdSetScissorWithCount must have been called and not subsequently invalidated in the current command buffer prior to this drawing

- VUID-vkCmdDrawIndexed-viewportCount-03419
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with both the VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic states enabled, and the state is not inherited, then the `viewportCount` parameter of `vkCmdSetViewportWithCount` must match the `scissorCount` parameter of `vkCmdSetScissorWithCount`

- VUID-vkCmdDrawIndexed-viewportCount-04137
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportWScalingStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndexed-viewportCount-04138
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, the current value of `viewportWScalingEnable` is VK_TRUE, then vkCmdSetViewportWScalingNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexed-None-08636
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, the current value of `viewportWScalingEnable` is VK_TRUE, then the `viewportCount` parameter in the last call to vkCmdSetViewportWScalingNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndexed-viewportCount-04139
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportShadingRateImageStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndexed-shadingRateImage-09233
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_COARSE_SAMPLE_ORDER_NV and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoarseSampleOrderNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexed-shadingRateImage-09234
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `shadingRateImageEnable` is VK_TRUE, then vkCmdSetViewportShadingRatePaletteNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexed-None-08637
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `shadingRateImageEnable` is VK_TRUE, then the `viewportCount` parameter in the last call to vkCmdSetViewportShadingRatePaletteNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndexed-VkPipelineVieportCreateInfo-04141
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled and a VkPipelineViewportSwizzleStateCreateInfoNV structure chained from VkPipelineViewportStateCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportSwizzleStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndexed-VkPipelineVieportCreateInfo-04142
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled and a VkPipelineViewportExclusiveScissorStateCreateInfoNV structure chained from VkPipelineViewportStateCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportExclusiveScissorStateCreateInfoNV::`exclusiveScissorCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndexed-None-07878
  If the `exclusiveScissor` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_ENABLE_NV dynamic state enabled, then vkCmdSetExclusiveScissorEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexed-None-07879
  If the `exclusiveScissor` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_NV dynamic state enabled, and the most recent call to vkCmdSetExclusiveScissorEnableNV in the current command buffer set any element of `pExclusiveScissorEnables` to VK_TRUE, then vkCmdSetExclusiveScissorNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexed-None-04876
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE dynamic state enabled, then vkCmdSetRasterizerDiscardEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexed-None-04877
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthBiasEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexed-logicOp-04878
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LOGIC_OP_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `logicOpEnable` is VK_TRUE, then vkCmdSetLogicOpEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexed-primitiveFragmentShadingRateWithMultipleViewports-04552
  If the `primitiveFragmentShadingRateWithMultipleViewports` limit is not supported, the bound graphics pipeline was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, and any of the shader stages of the bound graphics pipeline write to the `PrimitiveShadingRateKHR` built-in, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and the `viewportCount` parameter of `vkCmdSetViewportWithCount` must be `1`

- VUID-vkCmdDrawIndexed-primitiveFragmentShadingRateWithMultipleViewports-08642
  If the `primitiveFragmentShadingRateWithMultipleViewports` limit is not supported, and any shader object bound to a graphics stage writes to the `PrimitiveShadingRateKHR` built-in, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and the `viewportCount` parameter of `vkCmdSetViewportWithCount` must be `1`

- VUID-vkCmdDrawIndexed-blendEnable-04727
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, then for each color attachment, if the corresponding image view’s format features do not contain VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT, then the corresponding current value of `blendEnable` must be VK_FALSE

- VUID-vkCmdDrawIndexed-None-08644
  If a shader object is bound to any graphics stage or a graphics pipeline is bound, the current value of `rasterizerDiscardEnable` is VK_FALSE, and none of the following is enabled:

  - the `VK_AMD_mixed_attachment_samples` extension

  - the `VK_NV_framebuffer_mixed_samples` extension

  - the `multisampledRenderToSingleSampled` feature

  then the current value of `rasterizationSamples` must be the same as the current color and/or depth/stencil attachments

- VUID-vkCmdDrawIndexed-None-08876
  If a shader object is bound to any graphics stage, the current render pass instance must have been begun with vkCmdBeginRendering

- VUID-vkCmdDrawIndexed-imageView-06172
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawIndexed-imageView-06173
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawIndexed-imageView-06174
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawIndexed-imageView-06175
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawIndexed-imageView-06176
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawIndexed-imageView-06177
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawIndexed-viewMask-06178
  If the current render pass instance was begun with vkCmdBeginRendering, the bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::`viewMask` equal to VkRenderingInfo::`viewMask`

- VUID-vkCmdDrawIndexed-colorAttachmentCount-06179
  If the `dynamicRenderingUnusedAttachments` feature is not enabled and the current render pass instance was begun with vkCmdBeginRendering, the bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::`colorAttachmentCount` equal to VkRenderingInfo::`colorAttachmentCount`

- VUID-vkCmdDrawIndexed-dynamicRenderingUnusedAttachments-08910
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound graphics pipeline

- VUID-vkCmdDrawIndexed-dynamicRenderingUnusedAttachments-08912
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` equal to VK_NULL_HANDLE must have the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound pipeline equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexed-dynamicRenderingUnusedAttachments-08911
  If the `dynamicRenderingUnusedAttachments` feature is enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound graphics pipeline, or the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats`, if it exists, must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexed-colorAttachmentCount-09362
  If the current render pass instance was begun with vkCmdBeginRendering, with a VkRenderingInfo::`colorAttachmentCount` equal to `1`, there is no shader object bound to any graphics stage, and a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, each element of the VkRenderingInfo::`pColorAttachments` array with a `resolveImageView` not equal to VK_NULL_HANDLE must have been created with an image created with a VkExternalFormatANDROID::`externalFormat` value equal to the VkExternalFormatANDROID::`externalFormat` value used to create the bound graphics pipeline

- VUID-vkCmdDrawIndexed-None-09363
  If there is no shader object bound to any graphics stage, the current render pass instance was begun with vkCmdBeginRendering and a VkRenderingInfo::`colorAttachmentCount` equal to `1`, and a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with an image created with a VkExternalFormatANDROID::`externalFormat` value equal to the VkExternalFormatANDROID::`externalFormat` value used to create the bound graphics pipeline

- VUID-vkCmdDrawIndexed-None-09364
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetColorBlendEnableEXT must have set the blend enable to VK_FALSE prior to this drawing command

- VUID-vkCmdDrawIndexed-None-09365
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetRasterizationSamplesEXT must have set `rasterizationSamples` to VK_SAMPLE_COUNT_1_BIT prior to this drawing command

- VUID-vkCmdDrawIndexed-None-09368
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetFragmentShadingRateKHR must have set `pFragmentSize->width` to `1` prior to this drawing command

- VUID-vkCmdDrawIndexed-None-09369
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetFragmentShadingRateKHR must have set `pFragmentSize->height` to `1` prior to this drawing command

- VUID-vkCmdDrawIndexed-None-07749
  If the `colorWriteEnable` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorWriteEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexed-attachmentCount-07750
  If the `colorWriteEnable` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the `attachmentCount` parameter of most recent call to `vkCmdSetColorWriteEnableEXT` in the current command buffer must be greater than or equal to the number of active color attachments

- VUID-vkCmdDrawIndexed-None-07751
  If the `VK_EXT_discard_rectangles` extension is enabled, a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT dynamic state enabled and the `pNext` chain of VkGraphicsPipelineCreateInfo included a VkPipelineDiscardRectangleStateCreateInfoEXT structure, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for each discard rectangle in VkPipelineDiscardRectangleStateCreateInfoEXT::`discardRectangleCount`

- VUID-vkCmdDrawIndexed-rasterizerDiscardEnable-09236
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT dynamic state enabled and the `pNext` chain of VkGraphicsPipelineCreateInfo did not include a VkPipelineDiscardRectangleStateCreateInfoEXT structure, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for each discard rectangle in VkPhysicalDeviceDiscardRectanglePropertiesEXT::`maxDiscardRectangles`

- VUID-vkCmdDrawIndexed-None-07880
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDiscardRectangleEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexed-None-07881
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_MODE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexed-dynamicRenderingUnusedAttachments-08913
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->imageView` was VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexed-dynamicRenderingUnusedAttachments-08914
  If current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawIndexed-dynamicRenderingUnusedAttachments-08915
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, and the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->imageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexed-dynamicRenderingUnusedAttachments-08916
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->imageView` was VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexed-dynamicRenderingUnusedAttachments-08917
  If current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawIndexed-dynamicRenderingUnusedAttachments-08918
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, and the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->imageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexed-imageView-06183
  If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentShadingRateAttachmentInfoKHR::`imageView` was not VK_NULL_HANDLE, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

- VUID-vkCmdDrawIndexed-dynamicRenderingLocalRead-11797
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingLocalRead` feature is enabled, the VK_RENDERING_LOCAL_READ_CONCURRENT_ACCESS_CONTROL_BIT_KHR flag is specified, and an attachment is being used as a feedback loop as specified by VK_RENDERING_ATTACHMENT_INPUT_ATTACHMENT_FEEDBACK_BIT_KHR, VkRenderingAttachmentFlagsInfoKHR::`flags` for that attachment must include VK_RENDERING_ATTACHMENT_INPUT_ATTACHMENT_FEEDBACK_BIT_KHR

- VUID-vkCmdDrawIndexed-imageView-06184
  If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentDensityMapAttachmentInfoEXT::`imageView` was not VK_NULL_HANDLE, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT

- VUID-vkCmdDrawIndexed-layers-10831
  If the current render pass instance was created with VK_RENDERING_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE or VK_RENDER_PASS_CREATE_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE, and the bound graphics pipeline was created with VK_PIPELINE_CREATE_2_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE, then the current render pass instance must have a `layers` value less than or equal to VkPipelineFragmentDensityMapLayeredCreateInfoVALVE::`maxFragmentDensityMapLayers`

- VUID-vkCmdDrawIndexed-colorAttachmentCount-06185
  If the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with a sample count equal to the corresponding element of the `pColorAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline

- VUID-vkCmdDrawIndexed-pDepthAttachment-06186
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of the `depthStencilAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawIndexed-pStencilAttachment-06187
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of the `depthStencilAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawIndexed-multisampledRenderToSingleSampled-07285
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with a sample count equal to the value of `rasterizationSamples` for the bound graphics pipeline

- VUID-vkCmdDrawIndexed-multisampledRenderToSingleSampled-07286
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawIndexed-multisampledRenderToSingleSampled-07287
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawIndexed-pNext-07935
  If this command is called inside a render pass instance started with vkCmdBeginRendering, and the `pNext` chain of VkRenderingInfo includes a VkMultisampledRenderToSingleSampledInfoEXT structure with `multisampledRenderToSingleSampledEnable` equal to VK_TRUE, then the value of `rasterizationSamples` for the bound graphics pipeline must be equal to VkMultisampledRenderToSingleSampledInfoEXT::`rasterizationSamples`

- VUID-vkCmdDrawIndexed-renderPass-06198
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline must have been created with a VkGraphicsPipelineCreateInfo::`renderPass` equal to VK_NULL_HANDLE

- VUID-vkCmdDrawIndexed-pColorAttachments-08963
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound with a fragment shader that statically writes to a color attachment, the color write mask is not zero, color writes are enabled, and the corresponding element of the VkRenderingInfo::`pColorAttachments->imageView` was not VK_NULL_HANDLE, then the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexed-pColorAttachments-11539
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound with a fragment shader that statically writes to a color attachment, the color write mask is not zero, color writes are enabled, and the corresponding element of the VkRenderingInfo::`pColorAttachments->resolveImageView` was not VK_NULL_HANDLE, then the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexed-pDepthAttachment-08964
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound, depth test is enabled, and the VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, then the VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexed-pDepthAttachment-11540
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound, depth test is enabled, and the VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, then the VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexed-pStencilAttachment-08965
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound, stencil test is enabled and the VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, then the VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexed-pStencilAttachment-11860
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound, stencil test is enabled and the VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, then the VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexed-flags-10582
  If the current render pass instance was begun with a vkCmdBeginRendering call in `commandBuffer`, its VkRenderingInfo::`flags` parameter must not have VK_RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT set unless VK_RENDERING_CONTENTS_INLINE_BIT_KHR is also set

- VUID-vkCmdDrawIndexed-primitivesGeneratedQueryWithRasterizerDiscard-06708
  If the `primitivesGeneratedQueryWithRasterizerDiscard` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, rasterization discard must not be enabled

- VUID-vkCmdDrawIndexed-primitivesGeneratedQueryWithNonZeroStreams-06709
  If the `primitivesGeneratedQueryWithNonZeroStreams` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, the bound graphics pipeline must not have been created with a non-zero value in `VkPipelineRasterizationStateStreamCreateInfoEXT`::`rasterizationStream`

- VUID-vkCmdDrawIndexed-None-07620
  If the `depthClamp` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLAMP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthClampEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexed-None-07621
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_POLYGON_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetPolygonModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexed-None-07622
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetRasterizationSamplesEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexed-None-07623
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetSampleMaskEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexed-alphaToCoverageEnable-08919
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT dynamic state enabled, and `alphaToCoverageEnable` was VK_TRUE in the last call to vkCmdSetAlphaToCoverageEnableEXT, then the Fragment Output Interface must contain a variable for the alpha `Component` word in `Location` 0 at `Index` 0

- VUID-vkCmdDrawIndexed-alphaToCoverageEnable-08920
  If a shader object is bound to any graphics stage, and the most recent call to vkCmdSetAlphaToCoverageEnableEXT in the current command buffer set `alphaToCoverageEnable` to VK_TRUE, then the Fragment Output Interface must contain a variable for the alpha `Component` word in `Location` 0 at `Index` 0

- VUID-vkCmdDrawIndexed-None-07624
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAlphaToCoverageEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexed-None-07625
  If the `alphaToOne` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ALPHA_TO_ONE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAlphaToOneEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexed-None-07626
  If the `logicOp` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LOGIC_OP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetLogicOpEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexed-None-07627
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and there are color attachments bound, then vkCmdSetColorBlendEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexed-None-07629
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and there are color attachments bound, then vkCmdSetColorWriteMaskEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexed-None-07630
  If the `geometryStreams` feature is enabled, and a shader object is bound to the VK_SHADER_STAGE_GEOMETRY_BIT stage or a graphics pipeline is bound which was created with both a VK_SHADER_STAGE_GEOMETRY_BIT stage and the VK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXT dynamic state enabled, then vkCmdSetRasterizationStreamEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexed-None-07631
  If the `VK_EXT_conservative_rasterization` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_CONSERVATIVE_RASTERIZATION_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetConservativeRasterizationModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexed-None-07632
  If the `VK_EXT_conservative_rasterization` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXTRA_PRIMITIVE_OVERESTIMATION_SIZE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `conservativeRasterizationMode` is VK_CONSERVATIVE_RASTERIZATION_MODE_OVERESTIMATE_EXT, then vkCmdSetExtraPrimitiveOverestimationSizeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexed-conservativePointAndLineRasterization-07499
  If the `VK_EXT_conservative_rasterization` extension is enabled, `conservativePointAndLineRasterization` is not supported, a shader object is bound to any graphics stage or a graphics pipeline is bound, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line or point topology class, then the current value of `conservativeRasterizationMode` must be VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT

- VUID-vkCmdDrawIndexed-None-07633
  If the `depthClipEnable` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLIP_ENABLE_EXT dynamic state, then vkCmdSetDepthClipEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexed-None-07636
  If the `VK_EXT_provoking_vertex` extension is enabled, a shader object is bound to the VK_SHADER_STAGE_VERTEX_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_PROVOKING_VERTEX_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetProvokingVertexModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexed-None-08666
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineRasterizationModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexed-None-08669
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineStippleEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexed-None-07849
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled and a shader object is bound to any graphics stage, or a bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stippledLineEnable` is VK_TRUE, then vkCmdSetLineStipple must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexed-None-10608
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic state enabled, the effective rasterization input topology is in the line topology class, and the current `lineRasterizationMode` is VK_LINE_RASTERIZATION_MODE_BRESENHAM or VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH, then the current `alphaToCoverageEnable`, `alphaToOneEnable` and `sampleShadingEnable` states must all be VK_FALSE

- VUID-vkCmdDrawIndexed-None-07639
  If the `depthClipControl` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLIP_NEGATIVE_ONE_TO_ONE_EXT dynamic state enabled, then vkCmdSetDepthClipNegativeOneToOneEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexed-None-09650
  If the `depthClampControl` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLAMP_RANGE_EXT dynamic state enabled, and the current value of `depthClampEnable` is VK_TRUE, then vkCmdSetDepthClampRangeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexed-None-07640
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_ENABLE_NV dynamic state enabled, then vkCmdSetViewportWScalingEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexed-None-07641
  If the `VK_NV_viewport_swizzle` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic state enabled, then vkCmdSetViewportSwizzleNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexed-None-07642
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageToColorEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexed-None-07643
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_LOCATION_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageToColorEnable` is VK_TRUE, then vkCmdSetCoverageToColorLocationNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexed-None-07644
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_MODE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageModulationModeNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexed-None-07645
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageModulationMode` is any value other than VK_COVERAGE_MODULATION_MODE_NONE_NV, then vkCmdSetCoverageModulationTableEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexed-None-07646
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageModulationTableEnable` is VK_TRUE, then vkCmdSetCoverageModulationTableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexed-None-07647
  If the `shadingRateImage` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SHADING_RATE_IMAGE_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetShadingRateImageEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexed-pipelineFragmentShadingRate-09238
  If the `pipelineFragmentShadingRate` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetFragmentShadingRateKHR must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexed-None-07648
  If the `representativeFragmentTest` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_REPRESENTATIVE_FRAGMENT_TEST_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetRepresentativeFragmentTestEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexed-None-07649
  If the `coverageReductionMode` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageReductionModeNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexed-rasterizationSamples-07471
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current subpass does not use any color and/or depth/stencil attachments, then the `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT must follow the rules for a zero-attachment subpass

- VUID-vkCmdDrawIndexed-samples-07472
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state disabled, then the `samples` parameter in the last call to vkCmdSetSampleMaskEXT must be greater or equal to the VkPipelineMultisampleStateCreateInfo::`rasterizationSamples` parameter used to create the bound graphics pipeline

- VUID-vkCmdDrawIndexed-samples-07473
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT state and VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT states enabled, then the `samples` parameter in the last call to vkCmdSetSampleMaskEXT must be greater or equal to the `rasterizationSamples` parameter in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawIndexed-None-09211
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, or a shader object is bound to any graphics stage, and the current render pass instance includes a VkMultisampledRenderToSingleSampledInfoEXT structure with `multisampledRenderToSingleSampledEnable` equal to VK_TRUE, then the `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT must be the same as the `rasterizationSamples` member of that structure

- VUID-vkCmdDrawIndexed-firstAttachment-07476
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic states enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the last call to vkCmdSetColorBlendEnableEXT in the current command buffer prior to this drawing command must have set a value for all active color attachments

- VUID-vkCmdDrawIndexed-firstAttachment-07478
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT dynamic states enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the last call to vkCmdSetColorWriteMaskEXT in the current command buffer prior to this drawing command must have set a value for all active color attachments

- VUID-vkCmdDrawIndexed-advancedBlendMaxColorAttachments-07480
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT and VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic states enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and an active color attachment current value of `blendEnable` is VK_TRUE, then the number of active color attachments must not exceed `advancedBlendMaxColorAttachments`

- VUID-vkCmdDrawIndexed-None-10862
  If a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT , but not the VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorBlendEquationEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawIndexed-rasterizerDiscardEnable-10863
  If a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT, but not the VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorBlendAdvancedEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawIndexed-None-10864
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT and VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then either vkCmdSetColorBlendAdvancedEXT or vkCmdSetColorBlendEquationEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawIndexed-primitivesGeneratedQueryWithNonZeroStreams-07481
  If the `primitivesGeneratedQueryWithNonZeroStreams` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, and the bound graphics pipeline was created with VK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXT state enabled, the last call to vkCmdSetRasterizationStreamEXT must have set the `rasterizationStream` to zero

- VUID-vkCmdDrawIndexed-sampleLocationsPerPixel-07482
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state disabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then the `sampleLocationsPerPixel` member of `pSampleLocationsInfo` in the last call to vkCmdSetSampleLocationsEXT must equal the `rasterizationSamples` member of the VkPipelineMultisampleStateCreateInfo structure the bound graphics pipeline has been created with

- VUID-vkCmdDrawIndexed-sampleLocationsPerPixel-07483
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then the `sampleLocationsPerPixel` member of `pSampleLocationsInfo` in the last call to vkCmdSetSampleLocationsEXT must equal the `rasterizationSamples` parameter of the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawIndexed-sampleLocationsEnable-07484
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT then the current active depth attachment must have been created with the VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit set

- VUID-vkCmdDrawIndexed-sampleLocationsEnable-07485
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, then the `sampleLocationsInfo.maxSampleLocationGridSize.width` in the last call to vkCmdSetSampleLocationsEXT must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.width` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling `rasterizationSamples`

- VUID-vkCmdDrawIndexed-sampleLocationsEnable-07486
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, then the `sampleLocationsInfo.maxSampleLocationGridSize.height` in the last call to vkCmdSetSampleLocationsEXT must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.height` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling `rasterizationSamples`

- VUID-vkCmdDrawIndexed-sampleLocationsEnable-07487
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, the fragment shader code must not statically use the extended instruction `InterpolateAtSample`

- VUID-vkCmdDrawIndexed-sampleLocationsEnable-07936
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationGridSize.width` must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.width` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling the value of `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawIndexed-sampleLocationsEnable-07937
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationGridSize.height` must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.height` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling the value of `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawIndexed-sampleLocationsEnable-07938
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationsPerPixel` must equal `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawIndexed-coverageModulationTableEnable-07488
  If a shader object is bound to any graphics stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NV state enabled, and the last call to vkCmdSetCoverageModulationTableEnableNV set `coverageModulationTableEnable` to VK_TRUE, then the `coverageModulationTableCount` parameter in the last call to vkCmdSetCoverageModulationTableNV must equal the current `rasterizationSamples` divided by the number of color samples in the current active color attachment

- VUID-vkCmdDrawIndexed-rasterizationSamples-07489
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, and if current subpass has a depth/stencil attachment and depth test, stencil test, or depth bounds test are enabled in the bound pipeline, then the current `rasterizationSamples` must be the same as the sample count of the depth/stencil attachment

- VUID-vkCmdDrawIndexed-coverageToColorEnable-07490
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV state enabled and the last call to vkCmdSetCoverageToColorEnableNV set the `coverageToColorEnable` to VK_TRUE, then there must be an active color attachment at the location selected by the last call to vkCmdSetCoverageToColorLocationNV `coverageToColorLocation`, with a VkFormat of VK_FORMAT_R8_UINT, VK_FORMAT_R8_SINT, VK_FORMAT_R16_UINT, VK_FORMAT_R16_SINT, VK_FORMAT_R32_UINT, or VK_FORMAT_R32_SINT

- VUID-vkCmdDrawIndexed-rasterizerDiscardEnable-09420
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, and a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, and the most recent call to vkCmdSetRasterizerDiscardEnable in the current command buffer set `rasterizerDiscardEnable` to VK_FALSE, and the last call to vkCmdSetCoverageToColorEnableNV set the `coverageToColorEnable` to VK_TRUE, then there must be an active color attachment at the location selected by the last call to vkCmdSetCoverageToColorLocationNV `coverageToColorLocation`, with a VkFormat of VK_FORMAT_R8_UINT, VK_FORMAT_R8_SINT, VK_FORMAT_R16_UINT, VK_FORMAT_R16_SINT, VK_FORMAT_R32_UINT, or VK_FORMAT_R32_SINT

- VUID-vkCmdDrawIndexed-coverageReductionMode-07491
  If the `coverageReductionMode` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV or VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic states enabled, then the current values of `coverageReductionMode`, `rasterizationSamples`, the sample counts for the color and depth/stencil attachments (if the subpass has them) must be a valid combination returned by vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV

- VUID-vkCmdDrawIndexed-viewportCount-07492
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportSwizzleStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndexed-viewportCount-07493
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic states enabled then the `viewportCount` parameter in the last call to vkCmdSetViewportSwizzleNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndexed-viewportCount-09421
  If the `VK_NV_viewport_swizzle` extension is enabled, and a shader object is bound to any graphics stage, then the `viewportCount` parameter in the last call to vkCmdSetViewportSwizzleNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndexed-rasterizationSamples-07494
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, and the `coverageReductionMode` feature is not enabled, or the current value of `coverageReductionMode` is not VK_COVERAGE_REDUCTION_MODE_TRUNCATE_NV, and the current value of `rasterizationSamples` is greater than sample count of the color attachment, then sample shading must be disabled

- VUID-vkCmdDrawIndexed-stippledLineEnable-07495
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_RECTANGULAR, then the `stippledRectangularLines` feature must be enabled

- VUID-vkCmdDrawIndexed-stippledLineEnable-07496
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_BRESENHAM, then the `stippledBresenhamLines` feature must be enabled

- VUID-vkCmdDrawIndexed-stippledLineEnable-07497
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH, then the `stippledSmoothLines` feature must be enabled

- VUID-vkCmdDrawIndexed-stippledLineEnable-07498
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_DEFAULT, then the `stippledRectangularLines` feature must be enabled and VkPhysicalDeviceLimits::`strictLines` must be VK_TRUE

- VUID-vkCmdDrawIndexed-stage-07073
  If the bound pipeline was created with the VkPipelineShaderStageCreateInfo::`stage` member of an element of VkGraphicsPipelineCreateInfo::`pStages` set to VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT, then Mesh Shader Queries must not be active

- VUID-vkCmdDrawIndexed-None-08877
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ATTACHMENT_FEEDBACK_LOOP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAttachmentFeedbackLoopEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexed-None-07850
  If dynamic state was inherited from VkCommandBufferInheritanceViewportScissorInfoNV, it must be set in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexed-nextStage-10745
  For each shader object bound to a graphics stage, except for shader object bound to the last graphics stage in the logical pipeline, it must have been created with a `nextStage` including the corresponding bit to the shader object bound to the following graphics stage in the logical pipeline

- VUID-vkCmdDrawIndexed-None-08684
  If there is no bound graphics pipeline, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_VERTEX_BIT

- VUID-vkCmdDrawIndexed-None-08685
  If there is no bound graphics pipeline, and the `tessellationShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT

- VUID-vkCmdDrawIndexed-None-08686
  If there is no bound graphics pipeline, and the `tessellationShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT

- VUID-vkCmdDrawIndexed-None-08687
  If there is no bound graphics pipeline, and the `geometryShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_GEOMETRY_BIT

- VUID-vkCmdDrawIndexed-None-08688
  If there is no bound graphics pipeline, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_FRAGMENT_BIT

- VUID-vkCmdDrawIndexed-None-08689
  If there is no bound graphics pipeline, and the `taskShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TASK_BIT_EXT

- VUID-vkCmdDrawIndexed-None-08690
  If there is no bound graphics pipeline, and the `meshShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-vkCmdDrawIndexed-None-08693
  If there is no bound graphics pipeline, and at least one of the `taskShader` and `meshShader` features is enabled, one of the VK_SHADER_STAGE_VERTEX_BIT or VK_SHADER_STAGE_MESH_BIT_EXT stages must have a valid `VkShaderEXT` bound, and the other must have no `VkShaderEXT` bound

- VUID-vkCmdDrawIndexed-None-08696
  If there is no bound graphics pipeline, and a valid `VkShaderEXT` is bound to the VK_SHADER_STAGE_VERTEX_BIT stage, there must be no `VkShaderEXT` bound to either the VK_SHADER_STAGE_TASK_BIT_EXT stage or the VK_SHADER_STAGE_MESH_BIT_EXT stage

- VUID-vkCmdDrawIndexed-None-08698
  If any graphics shader is bound which was created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag, then all shaders created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag in the same vkCreateShadersEXT call must also be bound

- VUID-vkCmdDrawIndexed-None-08699
  If any graphics shader is bound which was created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag, any stages in between stages whose shaders which did not create a shader with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag as part of the same vkCreateShadersEXT call must not have any `VkShaderEXT` bound

- VUID-vkCmdDrawIndexed-None-08878
  All bound graphics shader objects must have been created with identical or identically defined push constant ranges

- VUID-vkCmdDrawIndexed-None-08879
  All bound graphics shader objects must have either been created with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag set, or with identical or identically defined arrays of descriptor set layouts

- VUID-vkCmdDrawIndexed-colorAttachmentCount-09372
  If the current render pass instance was begun with vkCmdBeginRendering and a VkRenderingInfo::`colorAttachmentCount` equal to `1`, a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, and a fragment shader is bound, it must not declare the `DepthReplacing` or `StencilRefReplacingEXT` execution modes

- VUID-vkCmdDrawIndexed-pDynamicStates-08715
  If the bound graphics pipeline state includes a fragment shader stage, was created with VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`, and the fragment shader declares the `EarlyFragmentTests` execution mode and uses `OpDepthAttachmentReadEXT`, the `depthWriteEnable` parameter in the last call to vkCmdSetDepthWriteEnable must be VK_FALSE

- VUID-vkCmdDrawIndexed-pDynamicStates-08716
  If the bound graphics pipeline state includes a fragment shader stage, was created with VK_DYNAMIC_STATE_STENCIL_WRITE_MASK set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`, and the fragment shader declares the `EarlyFragmentTests` execution mode and uses `OpStencilAttachmentReadEXT`, the `writeMask` parameter in the last call to vkCmdSetStencilWriteMask must be `0`

- VUID-vkCmdDrawIndexed-None-09116
  If a shader object is bound to any graphics stage or the bound graphics pipeline was created with VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT, and the format of any color attachment is VK_FORMAT_E5B9G9R9_UFLOAT_PACK32, the corresponding element of the `pColorWriteMasks` parameter of vkCmdSetColorWriteMaskEXT must either include all of VK_COLOR_COMPONENT_R_BIT, VK_COLOR_COMPONENT_G_BIT, VK_COLOR_COMPONENT_B_BIT, and VK_COLOR_COMPONENT_A_BIT, or none of them

- VUID-vkCmdDrawIndexed-maxFragmentDualSrcAttachments-09239
  If blending is enabled for any attachment where either the source or destination blend factors for that attachment use the secondary color input, the maximum value of `Location` for any output attachment statically used in the `Fragment` `Execution` `Model` executed by this command must be less than `maxFragmentDualSrcAttachments`

- VUID-vkCmdDrawIndexed-None-09548
  If the current render pass was begun with vkCmdBeginRendering, there is no shader object bound to any graphics stage, the value of each element of VkRenderingAttachmentLocationInfo::`pColorAttachmentLocations` in the bound pipeline must match the value for the corresponding locations set currently in the current render pass instance

- VUID-vkCmdDrawIndexed-None-09549
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of each element of VkRenderingInputAttachmentIndexInfo::`pColorAttachmentInputIndices` in the bound pipeline must match the value for the corresponding index set currently in the current render pass instance

- VUID-vkCmdDrawIndexed-None-10927
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` in the bound pipeline must match the value set currently in the current render pass instance

- VUID-vkCmdDrawIndexed-None-10928
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` in the bound pipeline must match the value set currently in the current render pass instance

- VUID-vkCmdDrawIndexed-None-09642
  If the current render pass was begun with vkCmdBeginRendering with the VK_RENDERING_ENABLE_LEGACY_DITHERING_BIT_EXT flag, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_2_ENABLE_LEGACY_DITHERING_BIT_EXT

- VUID-vkCmdDrawIndexed-None-09643
  If the bound graphics pipeline was created with VK_PIPELINE_CREATE_2_ENABLE_LEGACY_DITHERING_BIT_EXT, the current render pass must have begun with vkCmdBeginRendering with the VK_RENDERING_ENABLE_LEGACY_DITHERING_BIT_EXT flag

- VUID-vkCmdDrawIndexed-None-10677
  If the per-tile execution model is enabled, the tileShadingPerTileDraw feature must be enabled

- VUID-vkCmdDrawIndexed-None-10772
  If a shader object is bound to any graphics stage, multiview functionality must not be enabled in the current render pass

- VUID-vkCmdDrawIndexed-multiviewPerViewViewports-12262
  If the `multiviewPerViewViewports` feature is enabled, then the index of the most significant bit in current render pass instance `viewMask` must be less than the current value of `viewportCount`

- VUID-vkCmdDrawIndexed-multiviewPerViewViewports-12263
  If the `multiviewPerViewViewports` feature is enabled, then the index of the most significant bit in current render pass instance `viewMask` must be less than the current value of `scissorCount`

- VUID-vkCmdDrawIndexed-flags-11521
  If current render pass instance was begun with vkCmdBeginRendering with VkRenderingInfo::`flags` which includes VK_RENDERING_FRAGMENT_REGION_BIT_EXT, and if sample shading is enabled (explicitly or implicitly), then the minimum fraction for sample shading must equal 0.0

- VUID-vkCmdDrawIndexed-None-11522
  If the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, and the `dynamicRenderingUnusedAttachments` feature is not enabled, the graphics pipeline bound must have been created with a VkCustomResolveCreateInfoEXT

- VUID-vkCmdDrawIndexed-None-11523
  If the current render pass instance was begun with vkCmdBeginRendering and does not contain a custom resolve, and the `dynamicRenderingUnusedAttachments` feature is not enabled, the graphics pipeline bound must not have been created with a VkCustomResolveCreateInfoEXT

- VUID-vkCmdDrawIndexed-customResolve-11524
  If the current render pass instance was begun with vkCmdBeginRendering and vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, the graphics pipeline bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_TRUE

- VUID-vkCmdDrawIndexed-customResolve-11525
  If the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, and vkCmdBeginCustomResolveEXT has not been recorded in the render pass instance, the graphics pipeline bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_FALSE

- VUID-vkCmdDrawIndexed-None-11861
  If the `dynamicRenderingUnusedAttachments` feature is not enabled and the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, the bound graphics pipeline must have been created with a VkCustomResolveCreateInfoEXT::`colorAttachmentCount` equal to VkRenderingInfo::`colorAttachmentCount`

- VUID-vkCmdDrawIndexed-None-11862
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound graphics pipeline

- VUID-vkCmdDrawIndexed-None-11863
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` equal to VK_NULL_HANDLE must have the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound pipeline equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexed-dynamicRenderingUnusedAttachments-11864
  If the `dynamicRenderingUnusedAttachments` feature is enabled, the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound graphics pipeline, or the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats`, if it exists, must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexed-None-11865
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexed-None-11866
  If current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`

- VUID-vkCmdDrawIndexed-dynamicRenderingUnusedAttachments-11867
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, and the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexed-None-11868
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->resolveImageView` was VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexed-None-11869
  If current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`

- VUID-vkCmdDrawIndexed-dynamicRenderingUnusedAttachments-11870
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, and the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexed-colorAttachmentCount-11871
  If the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0` and vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, then for each element of the VkRenderingInfo::`pColorAttachments` array with a `resolveImageView` not equal to VK_NULL_HANDLE, the `resolveImageView` must have been created with a sample count equal to the value of `rasterizationSamples` for the bound graphics pipeline

- VUID-vkCmdDrawIndexed-pDepthAttachment-11872
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`

- VUID-vkCmdDrawIndexed-pStencilAttachment-11873
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`

- VUID-vkCmdDrawIndexed-customResolve-11529
  If a shader object is bound to the fragment stage, the current render pass instance was begun with vkCmdBeginRendering, a fragment density map attachment is active, and vkCmdBeginCustomResolveEXT has been called, then the fragment shader object bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_TRUE

- VUID-vkCmdDrawIndexed-customResolve-11530
  If a shader object is bound to the fragment stage, the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, a fragment density map attachment is active, and vkCmdBeginCustomResolveEXT has not yet been called, then the fragment shader object bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_FALSE

- VUID-vkCmdDrawIndexed-flags-13361
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, then all bound shader objects must have been created with the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit

- VUID-vkCmdDrawIndexed-flags-13362
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, then the pipeline layout of the bound descriptor sets must have been created with VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT set

- VUID-vkCmdDrawIndexed-flags-13363
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, and any of the descriptor set layouts used to create the pipeline layout of the bound descriptor sets were created with any binding’s VkDescriptorSetLayoutBinding::`stageFlags` set with VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT, then there must be no binding with VkDescriptorSetLayoutBinding::`stageFlags` set with VK_SHADER_STAGE_TASK_BIT_EXT or VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-vkCmdDrawIndexed-flags-13364
  If there are any shader objects bound that were created with `flags` that includes both the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR and VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT bits, the pipeline layout of the bound descriptor sets must have been created with VK_PIPELINE_LAYOUT_CREATE_NO_TASK_SHADER_BIT_KHR set

- VUID-vkCmdDrawIndexed-flags-13365
  If there are any shader objects bound that were created with `flags` that includes both the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR and VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT bits, there must be no shader object bound to the VK_SHADER_STAGE_TASK_BIT_EXT stage

- VUID-vkCmdDrawIndexed-commandBuffer-02712
  If `commandBuffer` is a protected command buffer and `protectedNoFault` is not supported, any resource written to by the `VkPipeline` object bound to the pipeline bind point used by this command must not be an unprotected resource

- VUID-vkCmdDrawIndexed-commandBuffer-02713
  If `commandBuffer` is a protected command buffer and `protectedNoFault` is not supported, pipeline stages other than the framebuffer-space and compute stages in the `VkPipeline` object bound to the pipeline bind point used by this command must not write to any resource

- VUID-vkCmdDrawIndexed-commandBuffer-04617
  If any of the shader stages of the `VkPipeline` bound to the pipeline bind point used by this command uses the `RayQueryKHR` capability, then `commandBuffer` must not be a protected command buffer

- VUID-vkCmdDrawIndexed-None-04007
  All vertex input bindings accessed via vertex input variables declared in the vertex shader entry point’s interface must have either valid or VK_NULL_HANDLE buffers bound

- VUID-vkCmdDrawIndexed-None-04008
  If the `nullDescriptor` feature is not enabled, all vertex input bindings accessed via vertex input variables declared in the vertex shader entry point’s interface must not be VK_NULL_HANDLE

- VUID-vkCmdDrawIndexed-None-02721
  If the `robustBufferAccess` feature is not enabled, and that pipeline was created without enabling VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS for `vertexInputs`, then for a given vertex buffer binding, any attribute data fetched must be entirely contained within the corresponding vertex buffer binding, as described in Vertex Input Description

- VUID-vkCmdDrawIndexed-format-10389
  For each vertex attribute accessed by this command, if its VkVertexInputAttributeDescription::`format` or VkVertexInputAttributeDescription2EXT::`format` is a packed format, and the `legacyVertexAttributes` feature is not enabled, the value of `attribAddress`, calculated as described in Vertex Input Calculation, must be a multiple of the size of the `format`

- VUID-vkCmdDrawIndexed-format-10390
  For each vertex attribute accessed by this command, if its VkVertexInputAttributeDescription::`format` or VkVertexInputAttributeDescription2EXT::`format` is not a packed format, and either the `legacyVertexAttributes` feature is not enabled or `format` has 64-bit components, the value of `attribAddress`, calculated as described in Vertex Input Calculation, must be a multiple of the component size of the `format`

- VUID-vkCmdDrawIndexed-None-07842
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY dynamic state enabled then vkCmdSetPrimitiveTopology must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexed-dynamicPrimitiveTopologyUnrestricted-07500
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY dynamic state enabled and the `dynamicPrimitiveTopologyUnrestricted` is VK_FALSE, then the `primitiveTopology` parameter of `vkCmdSetPrimitiveTopology` must be of the same topology class as the pipeline VkPipelineInputAssemblyStateCreateInfo::`topology` state

- VUID-vkCmdDrawIndexed-primitiveTopology-10286
  If a VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage is bound, then the current value of `primitiveTopology` must be VK_PRIMITIVE_TOPOLOGY_PATCH_LIST prior to this drawing command

- VUID-vkCmdDrawIndexed-primitiveTopology-10747
  If vkCmdSetPrimitiveTopology set `primitiveTopology` to VK_PRIMITIVE_TOPOLOGY_PATCH_LIST prior to this drawing command, then a VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage must be bound

- VUID-vkCmdDrawIndexed-primitiveTopology-10748
  If vkCmdSetPrimitiveTopology set `primitiveTopology` to VK_PRIMITIVE_TOPOLOGY_POINT_LIST prior to this drawing command, the `maintenance5` feature is not enabled, both a VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT and VK_SHADER_STAGE_GEOMETRY_BIT stage are not bound, then the `Vertex` `Execution` `Model` must have a `PointSize` decorated variable that is statically written to

- VUID-vkCmdDrawIndexed-pStrides-04913
  If the bound graphics pipeline was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE dynamic state enabled, but without the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled, then vkCmdBindVertexBuffers2 with a non-`NULL` `pStrides` parameter or vkCmdBindVertexBuffers3KHR with `setStride` set to VK_TRUE must have been called and not subsequently invalidated in the current command buffer prior to this draw command

- VUID-vkCmdDrawIndexed-None-13118
  If the bound graphics pipeline was created without the VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE dynamic state enabled, without the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled, and vkCmdBindVertexBuffers3KHR was called and not subsequently invalidated in the current command buffer prior to this draw command, the value of `setStride` in each of its `pBindInfos` elements must have been VK_FALSE

- VUID-vkCmdDrawIndexed-None-04914
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled then vkCmdSetVertexInputEXT must have been called and not subsequently invalidated in the current command buffer prior to this draw command

- VUID-vkCmdDrawIndexed-Input-07939
  If the `vertexAttributeRobustness` feature is not enabled, and the `maintenance9` feature is not enabled, and there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled then all variables with the `Input` storage class decorated with `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` must contain a location in VkVertexInputAttributeDescription2EXT::`location`

- VUID-vkCmdDrawIndexed-Input-08734
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled and either the `legacyVertexAttributes` feature is not enabled or the SPIR-V Type associated with a given `Input` variable of the corresponding `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` is 64-bit, then the numeric type associated with all `Input` variables of the corresponding `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` must be the same as VkVertexInputAttributeDescription2EXT::`format`

- VUID-vkCmdDrawIndexed-format-08936
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled and VkVertexInputAttributeDescription2EXT::`format` has a 64-bit component, then the scalar width associated with all `Input` variables of the corresponding `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` must be 64-bit

- VUID-vkCmdDrawIndexed-format-08937
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled and the scalar width associated with a `Location` decorated `Input` variable in the `Vertex` `Execution` `Model` `OpEntryPoint` is 64-bit, then the corresponding VkVertexInputAttributeDescription2EXT::`format` must have a 64-bit component

- VUID-vkCmdDrawIndexed-None-09203
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled and VkVertexInputAttributeDescription2EXT::`format` has a 64-bit component, then all `Input` variables at the corresponding `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` must not use components that are not present in the format

- VUID-vkCmdDrawIndexed-None-04875
  If there is a shader object bound to the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage or the bound graphics pipeline state was created with both a VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage and the VK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT dynamic state enabled, and the current value of `primitiveTopology` is VK_PRIMITIVE_TOPOLOGY_PATCH_LIST, then vkCmdSetPatchControlPointsEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexed-None-04879
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE dynamic state enabled then vkCmdSetPrimitiveRestartEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexed-None-09637
  If the `primitiveTopologyListRestart` feature is not enabled, the input assembly is VK_PRIMITIVE_TOPOLOGY_POINT_LIST, VK_PRIMITIVE_TOPOLOGY_LINE_LIST, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY, or VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY, there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE dynamic state enabled, then vkCmdSetPrimitiveRestartEnable must be VK_FALSE

- VUID-vkCmdDrawIndexed-None-10909
  If the `primitiveTopologyPatchListRestart` feature is not enabled, the input assembly is VK_PRIMITIVE_TOPOLOGY_PATCH_LIST, there is a shader object bound to the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE dynamic state enabled then vkCmdSetPrimitiveRestartEnable must be VK_FALSE

- VUID-vkCmdDrawIndexed-stage-06481
  The bound graphics pipeline must not have been created with the VkPipelineShaderStageCreateInfo::`stage` member of any element of VkGraphicsPipelineCreateInfo::`pStages` set to VK_SHADER_STAGE_TASK_BIT_EXT or VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-vkCmdDrawIndexed-None-08885
  There must be no shader object bound to either of the VK_SHADER_STAGE_TASK_BIT_EXT or VK_SHADER_STAGE_MESH_BIT_EXT stages

- VUID-vkCmdDrawIndexed-None-07619
  If a shader object is bound to the VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stage or a graphics pipeline is bound which was created with both a VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stage and the VK_DYNAMIC_STATE_TESSELLATION_DOMAIN_ORIGIN_EXT dynamic state enabled, then vkCmdSetTessellationDomainOriginEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexed-OpExecutionMode-12239
  If a shader is bound to both the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stages, and if both stages contain an `OpExecutionMode` instruction specifying the type of subdivision, they must be the same

- VUID-vkCmdDrawIndexed-OpExecutionMode-12240
  If a shader is bound to both the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stages, and if both stages contain an `OpExecutionMode` instruction specifying the orientation of triangles, they must be the same

- VUID-vkCmdDrawIndexed-OpExecutionMode-12241
  If a shader is bound to both the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stages, and if both stages contain an `OpExecutionMode` instruction specifying the segment spacing, they must be the same

- VUID-vkCmdDrawIndexed-OpExecutionMode-12242
  If a shader is bound to both the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stages, and if both stages contain an `OpExecutionMode` instruction specifying the output patch size, they must be the same

- VUID-vkCmdDrawIndexed-None-07312
  If the `maintenance6` feature is not enabled, a valid index buffer must be bound

- VUID-vkCmdDrawIndexed-primitiveRestartIndex-12401
  If the primitive restart index for this draw operation was set with vkCmdSetPrimitiveRestartIndexEXT, then `primitiveRestartIndex` must not be greater than the maximum representable value for the bound VkIndexType

- VUID-vkCmdDrawIndexed-pNext-09461
  If the bound graphics pipeline state was created with VkPipelineVertexInputDivisorStateCreateInfo in the `pNext` chain of VkGraphicsPipelineCreateInfo::`pVertexInputState`, any member of VkPipelineVertexInputDivisorStateCreateInfo::`pVertexBindingDivisors` has a value other than `1` in `divisor`, and VkPhysicalDeviceVertexAttributeDivisorProperties::`supportsNonZeroFirstInstance` is VK_FALSE, then `firstInstance` must be `0`

- VUID-vkCmdDrawIndexed-None-09462
  If shader objects are used for drawing or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled, any member of the `pVertexBindingDescriptions` parameter to the vkCmdSetVertexInputEXT call that sets this dynamic state has a value other than `1` in `divisor`, and VkPhysicalDeviceVertexAttributeDivisorProperties::`supportsNonZeroFirstInstance` is VK_FALSE, then `firstInstance` must be `0`

- VUID-vkCmdDrawIndexed-robustBufferAccess2-08798
  If the `robustBufferAccess2` feature is not enabled, (`indexSize` × (`firstIndex` + `indexCount`)) must be less than or equal to the size of the bound index buffer range, with `indexSize` being based on the type specified by `indexType`, and the other parameters sourced from this command

Valid Usage (Implicit)

- VUID-vkCmdDrawIndexed-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdDrawIndexed-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdDrawIndexed-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdDrawIndexed-renderpass
  This command must only be called inside of a render pass instance

- VUID-vkCmdDrawIndexed-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdDrawIndexed-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Inside | Outside | VK_QUEUE_GRAPHICS_BIT | Action

Conditional Rendering

vkCmdDrawIndexed is affected by conditional rendering

To record an ordered sequence of draws which have no state changes between them, call:

    // Provided by VK_EXT_multi_draw
    void vkCmdDrawMultiEXT(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    drawCount,
        const VkMultiDrawInfoEXT*                   pVertexInfo,
        uint32_t                                    instanceCount,
        uint32_t                                    firstInstance,
        uint32_t                                    stride);

- `commandBuffer` is the command buffer into which the command is recorded.

- `drawCount` is the number of draws to execute, and can be zero.

- `pVertexInfo` is a pointer to an array of VkMultiDrawInfoEXT with vertex information to be drawn.

- `instanceCount` is the number of instances per draw.

- `firstInstance` is the instance ID of the first instance in each draw.

- `stride` is the byte stride between consecutive elements of `pVertexInfo`.

The number of draws recorded is `drawCount`, with each draw reading, sequentially, a `firstVertex` and a `vertexCount` from `pVertexInfo`. For each recorded draw, primitives are assembled as for vkCmdDraw, and drawn `instanceCount` times with `instanceIndex` starting with `firstInstance` and sequentially for each instance.

Valid Usage

- VUID-vkCmdDrawMultiEXT-magFilter-04553
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdDrawMultiEXT-magFilter-09598
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdDrawMultiEXT-mipmapMode-04770
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdDrawMultiEXT-mipmapMode-09599
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdDrawMultiEXT-unnormalizedCoordinates-09635
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `levelCount` and `layerCount` must be 1

- VUID-vkCmdDrawMultiEXT-None-08609
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `viewType` must be VK_IMAGE_VIEW_TYPE_1D or VK_IMAGE_VIEW_TYPE_2D

- VUID-vkCmdDrawMultiEXT-None-08610
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions with `ImplicitLod`, `Dref` or `Proj` in their name

- VUID-vkCmdDrawMultiEXT-None-08611
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions that includes a LOD bias or any offset values

- VUID-vkCmdDrawMultiEXT-None-06479
  If a VkImageView is sampled with depth comparison, the image view’s format features must contain VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT

- VUID-vkCmdDrawMultiEXT-None-02691
  If a VkImageView is accessed using atomic operations as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT

- VUID-vkCmdDrawMultiEXT-None-07888
  If a VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER descriptor is accessed using atomic operations as a result of this command, then the storage texel buffer’s format features must contain VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT

- VUID-vkCmdDrawMultiEXT-None-02692
  If a VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT

- VUID-vkCmdDrawMultiEXT-None-02693
  If the VK_EXT_filter_cubic extension is not enabled and any VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, it must not have a VkImageViewType of VK_IMAGE_VIEW_TYPE_3D, VK_IMAGE_VIEW_TYPE_CUBE, or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY

- VUID-vkCmdDrawMultiEXT-filterCubic-02694
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have a VkImageViewType and format that supports cubic filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubic` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdDrawMultiEXT-filterCubicMinmax-02695
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX as a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubicMinmax` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdDrawMultiEXT-cubicRangeClamp-09212
  If the `cubicRangeClamp` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must not have a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM

- VUID-vkCmdDrawMultiEXT-reductionMode-09213
  Any VkImageView being sampled with a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM as a result of this command must sample with VK_FILTER_CUBIC_EXT

- VUID-vkCmdDrawMultiEXT-selectableCubicWeights-09214
  If the `selectableCubicWeights` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have VkSamplerCubicWeightsCreateInfoQCOM::`cubicWeights` equal to VK_CUBIC_FILTER_WEIGHTS_CATMULL_ROM_QCOM

- VUID-vkCmdDrawMultiEXT-flags-02696
  Any VkImage created with a VkImageCreateInfo::`flags` containing VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV sampled as a result of this command must only be sampled using a VkSamplerAddressMode of VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawMultiEXT-OpTypeImage-07027
  For any VkImageView being written as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawMultiEXT-OpTypeImage-07028
  For any VkImageView being read as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawMultiEXT-OpTypeImage-07029
  For any VkBufferView being written as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown`, the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawMultiEXT-OpTypeImage-07030
  Any VkBufferView being read as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown` then the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawMultiEXT-None-08600
  If a a bound shader was created with a pipeline layout and statically uses a set n, a descriptor set must have been bound to n at the same pipeline bind point, with layouts compatible for set n with the layout(s) used to create the shader, as described in Pipeline Layout Compatibility

- VUID-vkCmdDrawMultiEXT-None-08601
  If a a bound shader was created with a pipeline layout or specified push constant ranges and statically uses a push constant value, that value must have been set for the same pipeline bind point, with push constant ranges that are compatible with the push constant range used to create the shader

- VUID-vkCmdDrawMultiEXT-None-10068
  For each array of resources that is used by a bound shader, the indices used to access members of the array must be less than the descriptor count for the identified binding in the descriptor sets used by this command

- VUID-vkCmdDrawMultiEXT-None-08114
  Descriptors in each bound descriptor set, specified via vkCmdBindDescriptorSets, must be valid if they are accessed as described by descriptor validity by the VkPipeline bound to the pipeline bind point used by this command and the bound VkPipeline was not created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawMultiEXT-imageLayout-00344
  If an image descriptor is accessed by a shader, the VkImageLayout must match the subresource accessible from the VkImageView as defined by the image layout matching rules

- VUID-vkCmdDrawMultiEXT-None-08115
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdBindDescriptorSets, the bound VkPipeline must have been created without VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawMultiEXT-None-08116
  Descriptors in bound descriptor buffers, specified via vkCmdSetDescriptorBufferOffsetsEXT, must be valid if they are dynamically accessed

- VUID-vkCmdDrawMultiEXT-None-08117
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdSetDescriptorBufferOffsetsEXT, the bound VkPipeline must have been created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawMultiEXT-None-08119
  If a descriptor is dynamically used with a VkPipeline created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdDrawMultiEXT-None-08605
  If a descriptor is dynamically used with a VkShaderEXT created with a `VkDescriptorSetLayout` that was created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdDrawMultiEXT-None-08606
  If the `shaderObject` feature is not enabled, a valid pipeline must be bound to the pipeline bind point used by this command

- VUID-vkCmdDrawMultiEXT-None-08608
  If a pipeline is bound to the pipeline bind point used by this command, there must not have been any calls to dynamic state setting commands for any state specified statically in the VkPipeline object bound to the pipeline bind point used by this command, since that pipeline was bound

- VUID-vkCmdDrawMultiEXT-uniformBuffers-06935
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawMultiEXT-None-08612
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawMultiEXT-storageBuffers-06936
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawMultiEXT-None-08613
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a storage buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawMultiEXT-commandBuffer-02707
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, any resource accessed by bound shaders must not be a protected resource

- VUID-vkCmdDrawMultiEXT-viewType-07752
  If a VkImageView is accessed as a result of this command, then the image view’s `viewType` must match the `Dim` operand of the `OpTypeImage` as described in Compatibility Between SPIR-V Image Dimensions and Vulkan ImageView Types

- VUID-vkCmdDrawMultiEXT-format-07753
  If a VkImageView or VkBufferView is accessed as a result of this command, then the numeric type of the view’s `format` and the `Sampled` `Type` operand of the `OpTypeImage` must match

- VUID-vkCmdDrawMultiEXT-OpImageWrite-08795
  If a VkImageView created with a format other than VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the image view’s format

- VUID-vkCmdDrawMultiEXT-OpImageWrite-08796
  If a VkImageView created with the format VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have four components

- VUID-vkCmdDrawMultiEXT-OpImageWrite-04469
  If a VkBufferView is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the buffer view’s format

- VUID-vkCmdDrawMultiEXT-SampledType-04470
  If a VkImageView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdDrawMultiEXT-SampledType-04471
  If a VkImageView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdDrawMultiEXT-SampledType-04472
  If a VkBufferView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdDrawMultiEXT-SampledType-04473
  If a VkBufferView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdDrawMultiEXT-sparseImageInt64Atomics-04474
  If the `sparseImageInt64Atomics` feature is not enabled, VkImage objects created with the VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdDrawMultiEXT-sparseImageInt64Atomics-04475
  If the `sparseImageInt64Atomics` feature is not enabled, VkBuffer objects created with the VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdDrawMultiEXT-OpImageSampleWeightedQCOM-06971
  If `OpImageSampleWeightedQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_SAMPLED_IMAGE_BIT_QCOM

- VUID-vkCmdDrawMultiEXT-OpImageSampleWeightedQCOM-06972
  If `OpImageSampleWeightedQCOM` uses a VkImageView as a sample weight image as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_IMAGE_BIT_QCOM

- VUID-vkCmdDrawMultiEXT-OpImageBoxFilterQCOM-06973
  If `OpImageBoxFilterQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BOX_FILTER_SAMPLED_BIT_QCOM

- VUID-vkCmdDrawMultiEXT-OpImageBlockMatchSSDQCOM-06974
  If `OpImageBlockMatchSSDQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdDrawMultiEXT-OpImageBlockMatchSADQCOM-12420
  If `OpImageBlockMatchSADQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdDrawMultiEXT-OpImageBlockMatchSADQCOM-06976
  If `OpImageBlockMatchSADQCOM` or OpImageBlockMatchSSDQCOM is used to read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdDrawMultiEXT-OpImageSampleWeightedQCOM-06977
  If `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdDrawMultiEXT-OpImageSampleWeightedQCOM-06978
  If any command other than `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must not have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdDrawMultiEXT-OpImageBlockMatchWindow-09215
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM

- VUID-vkCmdDrawMultiEXT-OpImageBlockMatchWindow-09216
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format must be a single-component format

- VUID-vkCmdDrawMultiEXT-OpImageBlockMatchWindow-09217
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdDrawMultiEXT-OpImageBlockMatchWindow-12421
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the `blockMatchExtendedClampToEdge` feature is not enabled, the input sampler must not have been created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawMultiEXT-addressModeU-12422
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the input sampler was created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, then the sampler must have been created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawMultiEXT-None-07288
  Any shader invocation executed by this command must terminate

- VUID-vkCmdDrawMultiEXT-None-09600
  If a descriptor with type equal to any of VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, or VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT is accessed as a result of this command, all image subresources identified by that descriptor must be in the image layout identified when the descriptor was written

- VUID-vkCmdDrawMultiEXT-micromap-11636
  If an acceleration structure is accessed as a result of this command through an `OpRayQueryProceedKHR` operation , the `VK_EXT_opacity_micromap` extension is not enabled, and the acceleration structure is built using geometry with a VkAccelerationStructureTrianglesOpacityMicromapKHR structure included in its `pNext` chain, the shader must have specified a `OpacityMicromapIdKHR` execution mode with its specialization constant operand equal to VK_TRUE

- VUID-vkCmdDrawMultiEXT-micromap-11637
  If an acceleration structure is accessed as a result of this command and the acceleration structure was constructed through deserialization, all micromap arrays referenced by the acceleration structure that were not replaced by an acceleration structure update command must have been deserialized using the serialized data of the corresponding micromaps used to originally build the acceleration structure prior to the execution of this command on the device

- VUID-vkCmdDrawMultiEXT-micromap-11638
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkPipeline bound to the pipeline bind point used by this command must not have been created with `flags` that includes VK_PIPELINE_CREATE_2_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_KHR

- VUID-vkCmdDrawMultiEXT-micromap-11639
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkShaderEXT that accessed the descriptor must not have been created with `flags` that includes VK_SHADER_CREATE_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_EXT

- VUID-vkCmdDrawMultiEXT-commandBuffer-10746
  The `VkDeviceMemory` object allocated from a `VkMemoryHeap` with the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property that is bound to a resource accessed as a result of this command must be the active bound tile memory object in `commandBuffer`

- VUID-vkCmdDrawMultiEXT-None-10678
  If this command is recorded inside a tile shading render pass instance, the stages corresponding to the pipeline bind point used by this command must only include VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_FRAGMENT_BIT, and/or VK_SHADER_STAGE_COMPUTE_BIT

- VUID-vkCmdDrawMultiEXT-None-10679
  If this command is recorded where per-tile execution model is enabled, there must be no access to any image while the image was be transitioned to the VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT layout

- VUID-vkCmdDrawMultiEXT-pDescription-09900
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the underlying VkTensorARM object must have been created with the VK_TENSOR_USAGE_SHADER_BIT_ARM usage flag set

- VUID-vkCmdDrawMultiEXT-dimensionCount-09905
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the `Rank` of the `OpTypeTensorARM` of the tensor resource variable must be equal to the `dimensionCount` provided via VkTensorCreateInfoARM::`pDescription` when creating the underlying VkTensorARM object

- VUID-vkCmdDrawMultiEXT-OpTypeTensorARM-09906
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the element type of the `OpTypeTensorARM` of the tensor resource variable must be compatible with the VkFormat of the VkTensorViewARM used for the access

- VUID-vkCmdDrawMultiEXT-OpTensorReadARM-12462
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, using `OpTensorReadARM` or `OpTensorWriteARM`, and the underlying VkTensorARM object was created with a VK_TENSOR_TILING_BRICK_16_WIDE_ARM, VK_TENSOR_TILING_BRICK_8_WIDE_ARM, VK_TENSOR_TILING_BRICK_4_WIDE_ARM, VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_ARM, or VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_64K_ARM VkTensorTilingARM, and the object read or written is an array, then the innermost coordinate provided to `OpTensorReadARM` or `OpTensorWriteARM` via the `Coordinates` operand must be a multiple of the largest power of 2 that is less than or equal to the number of components of the array

- VUID-vkCmdDrawMultiEXT-pNext-12463
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command and the corresponding VkTensorARM object was created with a VkTensorRollingBackingCreateInfoARM structure in the `pNext` chain of VkTensorCreateInfoARM, then the number of elements accessed with one `OpTensorReadARM` or `OpTensorWriteARM`, must be less than or equal to the number of elements available from the starting coordinate in the rolling backing along the innermost dimension, defined as `wraps`[`dimensionCount` - 1] - InnermostCoordinate % `wraps`[`dimensionCount` - 1] where InnermostCoordinate is the last component of the coordinates array provided via the `Coordinates` operand

- VUID-vkCmdDrawMultiEXT-None-12472
  Descriptors dynamically accessed in bound descriptor heaps must be valid

- VUID-vkCmdDrawMultiEXT-None-11297
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a `OpTypeStruct` decorated with `Block` or `BufferBlock` using that mapping, the calculated offset for the resource heap must be a multiple of `bufferDescriptorAlignment`

- VUID-vkCmdDrawMultiEXT-None-11298
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeImage` or `OpTypeSampledImage` using that mapping, the calculated offset for the resource heap must be a multiple of `imageDescriptorAlignment`

- VUID-vkCmdDrawMultiEXT-None-11299
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeSampler` or `OpTypeSampledImage` using that mapping, the calculated offset for the sampler heap must be a multiple of `samplerDescriptorAlignment`

- VUID-vkCmdDrawMultiEXT-None-11397
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeTensorARM` using that mapping, the calculated offset for the resource heap must be a multiple of `tensorDescriptorAlignment`

- VUID-vkCmdDrawMultiEXT-None-11300
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 4

- VUID-vkCmdDrawMultiEXT-None-11301
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdDrawMultiEXT-None-11302
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress

- VUID-vkCmdDrawMultiEXT-None-11304
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 8

- VUID-vkCmdDrawMultiEXT-None-11305
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdDrawMultiEXT-None-11306
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address pointed to by the address in push data must be a valid VkDeviceAddress

- VUID-vkCmdDrawMultiEXT-None-11308
  For each descriptor heap that is statically used by a bound shader, either directly or via a descriptor mapping, a valid descriptor heap must be bound

- VUID-vkCmdDrawMultiEXT-None-11309
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, execution of this command must not result in any descriptor read accessing data outside of the user range of the respective heap bound by `vkCmdBind*HeapEXT` commands

- VUID-vkCmdDrawMultiEXT-None-11372
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer or uniform texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified via VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawMultiEXT-None-11373
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer or storage texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawMultiEXT-None-11374
  If the `robustBufferAccess2` feature is not enabled, the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, uniform texel buffer, storage buffer, or storage texel buffer, that shader must not access values outside of the range of the buffer as specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawMultiEXT-pBindInfo-11375
  If any bound shader uses an embedded sampler via a descriptor mapping, the value of `pBindInfo->reservedRangeSize` set for vkCmdBindSamplerHeapEXT must be greater than or equal to `minSamplerHeapReservedRangeWithEmbedded`

- VUID-vkCmdDrawMultiEXT-None-11376
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, and that shader statically uses a push constant value, that value must have been set by vkCmdPushDataEXT

- VUID-vkCmdDrawMultiEXT-None-11398
  If a bound shader was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the access must not be out of bounds

- VUID-vkCmdDrawMultiEXT-None-11437
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the buffer from which the address in push data was queried must have been created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdDrawMultiEXT-None-11438
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdDrawMultiEXT-None-11441
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must be aligned to `minUniformBufferOffsetAlignment`

- VUID-vkCmdDrawMultiEXT-None-11439
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_STORAGE_BUFFER_BIT usage flag set

- VUID-vkCmdDrawMultiEXT-None-11442
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must be aligned to `minStorageBufferOffsetAlignment`

- VUID-vkCmdDrawMultiEXT-None-11485
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses an acceleration structure using that mapping, the address that the acceleration structure is mapped to must be an acceleration structure address retrieved from a VkAccelerationStructureKHR object via vkGetAccelerationStructureDeviceAddressKHR or handle retrieved from a VkAccelerationStructureNV object via vkGetAccelerationStructureHandleNV

- VUID-vkCmdDrawMultiEXT-index-11450
  If a shader uses a sampler descriptor to sample an image as a result of this command, and that sampler descriptor uses a custom border color with an index defined by VkSamplerCustomBorderColorIndexCreateInfoEXT, the value of VkSamplerCustomBorderColorIndexCreateInfoEXT::`index` must have been registered before this command was recorded, and still be registered during the sampling operation, with an identically defined color

- VUID-vkCmdDrawMultiEXT-protectedNoFault-11455
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, the address that the resource is mapped to must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdDrawMultiEXT-protectedNoFault-11456
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, the address of the indirect memory must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdDrawMultiEXT-renderPass-02684
  The current render pass must be compatible with the `renderPass` member of the `VkGraphicsPipelineCreateInfo` structure specified when creating the `VkPipeline` bound to VK_PIPELINE_BIND_POINT_GRAPHICS

- VUID-vkCmdDrawMultiEXT-subpass-02685
  The subpass index of the current render pass must be equal to the `subpass` member of the `VkGraphicsPipelineCreateInfo` structure specified when creating the `VkPipeline` bound to VK_PIPELINE_BIND_POINT_GRAPHICS

- VUID-vkCmdDrawMultiEXT-OpTypeImage-07468
  If any shader executed by this pipeline accesses an `OpTypeImage` variable with a `Dim` operand of `SubpassData`, it must be decorated with an `InputAttachmentIndex` that corresponds to a valid input attachment in the current subpass

- VUID-vkCmdDrawMultiEXT-None-07469
  Input attachment views accessed in a subpass must be created with the same VkFormat as the corresponding subpass definition, and be created with a VkImageView that is compatible with the attachment referenced by the subpass' `pInputAttachments`[`InputAttachmentIndex`] in the bound VkFramebuffer as specified by Fragment Input Attachment Compatibility

- VUID-vkCmdDrawMultiEXT-pDepthInputAttachmentIndex-09595
  Input attachment views accessed in a dynamic render pass with a `InputAttachmentIndex` referenced by VkRenderingInputAttachmentIndexInfo, or no `InputAttachmentIndex` if VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` or VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` are `NULL`, must be created with a VkImageView that is compatible with the corresponding color, depth, or stencil attachment in VkRenderingInfo

- VUID-vkCmdDrawMultiEXT-pDepthInputAttachmentIndex-09596
  Input attachment views accessed in a dynamic render pass via a shader object must have an `InputAttachmentIndex` if both VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` and VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` are non-`NULL`

- VUID-vkCmdDrawMultiEXT-InputAttachmentIndex-09597
  If an input attachment view accessed in a dynamic render pass via a shader object has an `InputAttachmentIndex`, the `InputAttachmentIndex` must match an index in VkRenderingInputAttachmentIndexInfo

- VUID-vkCmdDrawMultiEXT-None-06537
  Memory backing image subresources used as attachments in the current render pass must not be written in any way other than as an attachment by this command

- VUID-vkCmdDrawMultiEXT-None-10795
  If a color attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_COLOR_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawMultiEXT-None-10796
  If a depth attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_DEPTH_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawMultiEXT-None-10797
  If a stencil attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_STENCIL_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawMultiEXT-None-12338
  If a color attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_COLOR_BIT on that attachment, the color attachment must not be written to by this command

- VUID-vkCmdDrawMultiEXT-None-12339
  If a depth attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_DEPTH_BIT on that attachment, the depth attachment must not be written to by this command

- VUID-vkCmdDrawMultiEXT-None-12340
  If a stencil attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_STENCIL_BIT on that attachment, the stencil attachment must not be written to by this command

- VUID-vkCmdDrawMultiEXT-None-09003
  If an attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, it must not be accessed in any way other than as an attachment, storage image, or sampled image by this command

- VUID-vkCmdDrawMultiEXT-None-06886
  If the current render pass instance uses a depth/stencil attachment with a read-only layout for the depth aspect, depth writes must be disabled

- VUID-vkCmdDrawMultiEXT-None-06887
  If the current render pass instance uses a depth/stencil attachment with a read-only layout for the stencil aspect, both front and back `writeMask` are not zero, and stencil test is enabled, all stencil ops must be VK_STENCIL_OP_KEEP

- VUID-vkCmdDrawMultiEXT-None-07831
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT dynamic state enabled then vkCmdSetViewport must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiEXT-None-07832
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SCISSOR dynamic state enabled then vkCmdSetScissor must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiEXT-None-08617
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_WIDTH dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineWidth must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiEXT-None-07834
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BIAS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthBiasEnable` is VK_TRUE, then vkCmdSetDepthBias or vkCmdSetDepthBias2EXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiEXT-None-07835
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_BLEND_CONSTANTS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and an active color attachment current value of `blendEnable` is VK_TRUE with a blend equations where any VkBlendFactor member is VK_BLEND_FACTOR_CONSTANT_COLOR, VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR, VK_BLEND_FACTOR_CONSTANT_ALPHA, or VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA, then vkCmdSetBlendConstants must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiEXT-None-07836
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BOUNDS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthBoundsTestEnable` is VK_TRUE, then vkCmdSetDepthBounds must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiEXT-None-07837
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilCompareMask must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiEXT-None-07838
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_WRITE_MASK dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilWriteMask must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiEXT-None-07839
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_REFERENCE dynamic state enabled, the current value of and `rasterizerDiscardEnable` is VK_FALSE, the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilReference must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiEXT-maxMultiviewInstanceIndex-02688
  If the draw is recorded in a render pass instance with multiview enabled, the maximum instance index must be less than or equal to VkPhysicalDeviceMultiviewProperties::`maxMultiviewInstanceIndex`

- VUID-vkCmdDrawMultiEXT-sampleLocationsEnable-02689
  If the bound graphics pipeline was created with VkPipelineSampleLocationsStateCreateInfoEXT::`sampleLocationsEnable` set to VK_TRUE, then the active depth attachment must have been created with the VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit set

- VUID-vkCmdDrawMultiEXT-None-07634
  If the `VK_EXT_sample_locations` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetSampleLocationsEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiEXT-None-06666
  If the `VK_EXT_sample_locations` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `sampleLocationsEnable` is VK_TRUE, then vkCmdSetSampleLocationsEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiEXT-None-07840
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_CULL_MODE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCullMode must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiEXT-None-07841
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRONT_FACE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetFrontFace must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiEXT-None-07843
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, vkCmdSetDepthTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiEXT-None-07844
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthTestEnable` is VK_TRUE, then vkCmdSetDepthWriteEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiEXT-None-07845
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_COMPARE_OP dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthTestEnable` is VK_TRUE, then vkCmdSetDepthCompareOp must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiEXT-None-07846
  If the `depthBounds` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthBoundsTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiEXT-None-07847
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetStencilTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiEXT-None-07848
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_OP dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilOp must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiEXT-viewportCount-03417
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, and the state is not inherited, then vkCmdSetViewportWithCount must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiEXT-scissorCount-03418
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT dynamic state enabled, and the state is not inherited, then vkCmdSetScissorWithCount must have been called and not subsequently invalidated in the current command buffer prior to this drawing

- VUID-vkCmdDrawMultiEXT-viewportCount-03419
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with both the VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic states enabled, and the state is not inherited, then the `viewportCount` parameter of `vkCmdSetViewportWithCount` must match the `scissorCount` parameter of `vkCmdSetScissorWithCount`

- VUID-vkCmdDrawMultiEXT-viewportCount-04137
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportWScalingStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMultiEXT-viewportCount-04138
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, the current value of `viewportWScalingEnable` is VK_TRUE, then vkCmdSetViewportWScalingNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiEXT-None-08636
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, the current value of `viewportWScalingEnable` is VK_TRUE, then the `viewportCount` parameter in the last call to vkCmdSetViewportWScalingNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMultiEXT-viewportCount-04139
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportShadingRateImageStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMultiEXT-shadingRateImage-09233
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_COARSE_SAMPLE_ORDER_NV and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoarseSampleOrderNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiEXT-shadingRateImage-09234
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `shadingRateImageEnable` is VK_TRUE, then vkCmdSetViewportShadingRatePaletteNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiEXT-None-08637
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `shadingRateImageEnable` is VK_TRUE, then the `viewportCount` parameter in the last call to vkCmdSetViewportShadingRatePaletteNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMultiEXT-VkPipelineVieportCreateInfo-04141
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled and a VkPipelineViewportSwizzleStateCreateInfoNV structure chained from VkPipelineViewportStateCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportSwizzleStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMultiEXT-VkPipelineVieportCreateInfo-04142
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled and a VkPipelineViewportExclusiveScissorStateCreateInfoNV structure chained from VkPipelineViewportStateCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportExclusiveScissorStateCreateInfoNV::`exclusiveScissorCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMultiEXT-None-07878
  If the `exclusiveScissor` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_ENABLE_NV dynamic state enabled, then vkCmdSetExclusiveScissorEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiEXT-None-07879
  If the `exclusiveScissor` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_NV dynamic state enabled, and the most recent call to vkCmdSetExclusiveScissorEnableNV in the current command buffer set any element of `pExclusiveScissorEnables` to VK_TRUE, then vkCmdSetExclusiveScissorNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiEXT-None-04876
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE dynamic state enabled, then vkCmdSetRasterizerDiscardEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiEXT-None-04877
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthBiasEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiEXT-logicOp-04878
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LOGIC_OP_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `logicOpEnable` is VK_TRUE, then vkCmdSetLogicOpEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiEXT-primitiveFragmentShadingRateWithMultipleViewports-04552
  If the `primitiveFragmentShadingRateWithMultipleViewports` limit is not supported, the bound graphics pipeline was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, and any of the shader stages of the bound graphics pipeline write to the `PrimitiveShadingRateKHR` built-in, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and the `viewportCount` parameter of `vkCmdSetViewportWithCount` must be `1`

- VUID-vkCmdDrawMultiEXT-primitiveFragmentShadingRateWithMultipleViewports-08642
  If the `primitiveFragmentShadingRateWithMultipleViewports` limit is not supported, and any shader object bound to a graphics stage writes to the `PrimitiveShadingRateKHR` built-in, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and the `viewportCount` parameter of `vkCmdSetViewportWithCount` must be `1`

- VUID-vkCmdDrawMultiEXT-blendEnable-04727
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, then for each color attachment, if the corresponding image view’s format features do not contain VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT, then the corresponding current value of `blendEnable` must be VK_FALSE

- VUID-vkCmdDrawMultiEXT-None-08644
  If a shader object is bound to any graphics stage or a graphics pipeline is bound, the current value of `rasterizerDiscardEnable` is VK_FALSE, and none of the following is enabled:

  - the `VK_AMD_mixed_attachment_samples` extension

  - the `VK_NV_framebuffer_mixed_samples` extension

  - the `multisampledRenderToSingleSampled` feature

  then the current value of `rasterizationSamples` must be the same as the current color and/or depth/stencil attachments

- VUID-vkCmdDrawMultiEXT-None-08876
  If a shader object is bound to any graphics stage, the current render pass instance must have been begun with vkCmdBeginRendering

- VUID-vkCmdDrawMultiEXT-imageView-06172
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawMultiEXT-imageView-06173
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawMultiEXT-imageView-06174
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawMultiEXT-imageView-06175
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawMultiEXT-imageView-06176
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawMultiEXT-imageView-06177
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawMultiEXT-viewMask-06178
  If the current render pass instance was begun with vkCmdBeginRendering, the bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::`viewMask` equal to VkRenderingInfo::`viewMask`

- VUID-vkCmdDrawMultiEXT-colorAttachmentCount-06179
  If the `dynamicRenderingUnusedAttachments` feature is not enabled and the current render pass instance was begun with vkCmdBeginRendering, the bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::`colorAttachmentCount` equal to VkRenderingInfo::`colorAttachmentCount`

- VUID-vkCmdDrawMultiEXT-dynamicRenderingUnusedAttachments-08910
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound graphics pipeline

- VUID-vkCmdDrawMultiEXT-dynamicRenderingUnusedAttachments-08912
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` equal to VK_NULL_HANDLE must have the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound pipeline equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMultiEXT-dynamicRenderingUnusedAttachments-08911
  If the `dynamicRenderingUnusedAttachments` feature is enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound graphics pipeline, or the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats`, if it exists, must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMultiEXT-colorAttachmentCount-09362
  If the current render pass instance was begun with vkCmdBeginRendering, with a VkRenderingInfo::`colorAttachmentCount` equal to `1`, there is no shader object bound to any graphics stage, and a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, each element of the VkRenderingInfo::`pColorAttachments` array with a `resolveImageView` not equal to VK_NULL_HANDLE must have been created with an image created with a VkExternalFormatANDROID::`externalFormat` value equal to the VkExternalFormatANDROID::`externalFormat` value used to create the bound graphics pipeline

- VUID-vkCmdDrawMultiEXT-None-09363
  If there is no shader object bound to any graphics stage, the current render pass instance was begun with vkCmdBeginRendering and a VkRenderingInfo::`colorAttachmentCount` equal to `1`, and a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with an image created with a VkExternalFormatANDROID::`externalFormat` value equal to the VkExternalFormatANDROID::`externalFormat` value used to create the bound graphics pipeline

- VUID-vkCmdDrawMultiEXT-None-09364
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetColorBlendEnableEXT must have set the blend enable to VK_FALSE prior to this drawing command

- VUID-vkCmdDrawMultiEXT-None-09365
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetRasterizationSamplesEXT must have set `rasterizationSamples` to VK_SAMPLE_COUNT_1_BIT prior to this drawing command

- VUID-vkCmdDrawMultiEXT-None-09368
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetFragmentShadingRateKHR must have set `pFragmentSize->width` to `1` prior to this drawing command

- VUID-vkCmdDrawMultiEXT-None-09369
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetFragmentShadingRateKHR must have set `pFragmentSize->height` to `1` prior to this drawing command

- VUID-vkCmdDrawMultiEXT-None-07749
  If the `colorWriteEnable` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorWriteEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiEXT-attachmentCount-07750
  If the `colorWriteEnable` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the `attachmentCount` parameter of most recent call to `vkCmdSetColorWriteEnableEXT` in the current command buffer must be greater than or equal to the number of active color attachments

- VUID-vkCmdDrawMultiEXT-None-07751
  If the `VK_EXT_discard_rectangles` extension is enabled, a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT dynamic state enabled and the `pNext` chain of VkGraphicsPipelineCreateInfo included a VkPipelineDiscardRectangleStateCreateInfoEXT structure, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for each discard rectangle in VkPipelineDiscardRectangleStateCreateInfoEXT::`discardRectangleCount`

- VUID-vkCmdDrawMultiEXT-rasterizerDiscardEnable-09236
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT dynamic state enabled and the `pNext` chain of VkGraphicsPipelineCreateInfo did not include a VkPipelineDiscardRectangleStateCreateInfoEXT structure, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for each discard rectangle in VkPhysicalDeviceDiscardRectanglePropertiesEXT::`maxDiscardRectangles`

- VUID-vkCmdDrawMultiEXT-None-07880
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDiscardRectangleEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiEXT-None-07881
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_MODE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiEXT-dynamicRenderingUnusedAttachments-08913
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->imageView` was VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMultiEXT-dynamicRenderingUnusedAttachments-08914
  If current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawMultiEXT-dynamicRenderingUnusedAttachments-08915
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, and the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->imageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMultiEXT-dynamicRenderingUnusedAttachments-08916
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->imageView` was VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMultiEXT-dynamicRenderingUnusedAttachments-08917
  If current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawMultiEXT-dynamicRenderingUnusedAttachments-08918
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, and the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->imageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMultiEXT-imageView-06183
  If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentShadingRateAttachmentInfoKHR::`imageView` was not VK_NULL_HANDLE, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

- VUID-vkCmdDrawMultiEXT-dynamicRenderingLocalRead-11797
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingLocalRead` feature is enabled, the VK_RENDERING_LOCAL_READ_CONCURRENT_ACCESS_CONTROL_BIT_KHR flag is specified, and an attachment is being used as a feedback loop as specified by VK_RENDERING_ATTACHMENT_INPUT_ATTACHMENT_FEEDBACK_BIT_KHR, VkRenderingAttachmentFlagsInfoKHR::`flags` for that attachment must include VK_RENDERING_ATTACHMENT_INPUT_ATTACHMENT_FEEDBACK_BIT_KHR

- VUID-vkCmdDrawMultiEXT-imageView-06184
  If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentDensityMapAttachmentInfoEXT::`imageView` was not VK_NULL_HANDLE, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT

- VUID-vkCmdDrawMultiEXT-layers-10831
  If the current render pass instance was created with VK_RENDERING_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE or VK_RENDER_PASS_CREATE_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE, and the bound graphics pipeline was created with VK_PIPELINE_CREATE_2_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE, then the current render pass instance must have a `layers` value less than or equal to VkPipelineFragmentDensityMapLayeredCreateInfoVALVE::`maxFragmentDensityMapLayers`

- VUID-vkCmdDrawMultiEXT-colorAttachmentCount-06185
  If the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with a sample count equal to the corresponding element of the `pColorAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline

- VUID-vkCmdDrawMultiEXT-pDepthAttachment-06186
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of the `depthStencilAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawMultiEXT-pStencilAttachment-06187
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of the `depthStencilAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawMultiEXT-multisampledRenderToSingleSampled-07285
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with a sample count equal to the value of `rasterizationSamples` for the bound graphics pipeline

- VUID-vkCmdDrawMultiEXT-multisampledRenderToSingleSampled-07286
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawMultiEXT-multisampledRenderToSingleSampled-07287
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawMultiEXT-pNext-07935
  If this command is called inside a render pass instance started with vkCmdBeginRendering, and the `pNext` chain of VkRenderingInfo includes a VkMultisampledRenderToSingleSampledInfoEXT structure with `multisampledRenderToSingleSampledEnable` equal to VK_TRUE, then the value of `rasterizationSamples` for the bound graphics pipeline must be equal to VkMultisampledRenderToSingleSampledInfoEXT::`rasterizationSamples`

- VUID-vkCmdDrawMultiEXT-renderPass-06198
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline must have been created with a VkGraphicsPipelineCreateInfo::`renderPass` equal to VK_NULL_HANDLE

- VUID-vkCmdDrawMultiEXT-pColorAttachments-08963
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound with a fragment shader that statically writes to a color attachment, the color write mask is not zero, color writes are enabled, and the corresponding element of the VkRenderingInfo::`pColorAttachments->imageView` was not VK_NULL_HANDLE, then the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMultiEXT-pColorAttachments-11539
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound with a fragment shader that statically writes to a color attachment, the color write mask is not zero, color writes are enabled, and the corresponding element of the VkRenderingInfo::`pColorAttachments->resolveImageView` was not VK_NULL_HANDLE, then the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMultiEXT-pDepthAttachment-08964
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound, depth test is enabled, and the VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, then the VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMultiEXT-pDepthAttachment-11540
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound, depth test is enabled, and the VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, then the VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMultiEXT-pStencilAttachment-08965
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound, stencil test is enabled and the VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, then the VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMultiEXT-pStencilAttachment-11860
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound, stencil test is enabled and the VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, then the VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMultiEXT-flags-10582
  If the current render pass instance was begun with a vkCmdBeginRendering call in `commandBuffer`, its VkRenderingInfo::`flags` parameter must not have VK_RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT set unless VK_RENDERING_CONTENTS_INLINE_BIT_KHR is also set

- VUID-vkCmdDrawMultiEXT-primitivesGeneratedQueryWithRasterizerDiscard-06708
  If the `primitivesGeneratedQueryWithRasterizerDiscard` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, rasterization discard must not be enabled

- VUID-vkCmdDrawMultiEXT-primitivesGeneratedQueryWithNonZeroStreams-06709
  If the `primitivesGeneratedQueryWithNonZeroStreams` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, the bound graphics pipeline must not have been created with a non-zero value in `VkPipelineRasterizationStateStreamCreateInfoEXT`::`rasterizationStream`

- VUID-vkCmdDrawMultiEXT-None-07620
  If the `depthClamp` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLAMP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthClampEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiEXT-None-07621
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_POLYGON_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetPolygonModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiEXT-None-07622
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetRasterizationSamplesEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiEXT-None-07623
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetSampleMaskEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiEXT-alphaToCoverageEnable-08919
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT dynamic state enabled, and `alphaToCoverageEnable` was VK_TRUE in the last call to vkCmdSetAlphaToCoverageEnableEXT, then the Fragment Output Interface must contain a variable for the alpha `Component` word in `Location` 0 at `Index` 0

- VUID-vkCmdDrawMultiEXT-alphaToCoverageEnable-08920
  If a shader object is bound to any graphics stage, and the most recent call to vkCmdSetAlphaToCoverageEnableEXT in the current command buffer set `alphaToCoverageEnable` to VK_TRUE, then the Fragment Output Interface must contain a variable for the alpha `Component` word in `Location` 0 at `Index` 0

- VUID-vkCmdDrawMultiEXT-None-07624
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAlphaToCoverageEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiEXT-None-07625
  If the `alphaToOne` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ALPHA_TO_ONE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAlphaToOneEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiEXT-None-07626
  If the `logicOp` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LOGIC_OP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetLogicOpEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiEXT-None-07627
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and there are color attachments bound, then vkCmdSetColorBlendEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiEXT-None-07629
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and there are color attachments bound, then vkCmdSetColorWriteMaskEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiEXT-None-07630
  If the `geometryStreams` feature is enabled, and a shader object is bound to the VK_SHADER_STAGE_GEOMETRY_BIT stage or a graphics pipeline is bound which was created with both a VK_SHADER_STAGE_GEOMETRY_BIT stage and the VK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXT dynamic state enabled, then vkCmdSetRasterizationStreamEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiEXT-None-07631
  If the `VK_EXT_conservative_rasterization` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_CONSERVATIVE_RASTERIZATION_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetConservativeRasterizationModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiEXT-None-07632
  If the `VK_EXT_conservative_rasterization` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXTRA_PRIMITIVE_OVERESTIMATION_SIZE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `conservativeRasterizationMode` is VK_CONSERVATIVE_RASTERIZATION_MODE_OVERESTIMATE_EXT, then vkCmdSetExtraPrimitiveOverestimationSizeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiEXT-conservativePointAndLineRasterization-07499
  If the `VK_EXT_conservative_rasterization` extension is enabled, `conservativePointAndLineRasterization` is not supported, a shader object is bound to any graphics stage or a graphics pipeline is bound, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line or point topology class, then the current value of `conservativeRasterizationMode` must be VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT

- VUID-vkCmdDrawMultiEXT-None-07633
  If the `depthClipEnable` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLIP_ENABLE_EXT dynamic state, then vkCmdSetDepthClipEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiEXT-None-07636
  If the `VK_EXT_provoking_vertex` extension is enabled, a shader object is bound to the VK_SHADER_STAGE_VERTEX_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_PROVOKING_VERTEX_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetProvokingVertexModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiEXT-None-08666
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineRasterizationModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiEXT-None-08669
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineStippleEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiEXT-None-07849
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled and a shader object is bound to any graphics stage, or a bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stippledLineEnable` is VK_TRUE, then vkCmdSetLineStipple must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiEXT-None-10608
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic state enabled, the effective rasterization input topology is in the line topology class, and the current `lineRasterizationMode` is VK_LINE_RASTERIZATION_MODE_BRESENHAM or VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH, then the current `alphaToCoverageEnable`, `alphaToOneEnable` and `sampleShadingEnable` states must all be VK_FALSE

- VUID-vkCmdDrawMultiEXT-None-07639
  If the `depthClipControl` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLIP_NEGATIVE_ONE_TO_ONE_EXT dynamic state enabled, then vkCmdSetDepthClipNegativeOneToOneEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiEXT-None-09650
  If the `depthClampControl` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLAMP_RANGE_EXT dynamic state enabled, and the current value of `depthClampEnable` is VK_TRUE, then vkCmdSetDepthClampRangeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiEXT-None-07640
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_ENABLE_NV dynamic state enabled, then vkCmdSetViewportWScalingEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiEXT-None-07641
  If the `VK_NV_viewport_swizzle` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic state enabled, then vkCmdSetViewportSwizzleNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiEXT-None-07642
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageToColorEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiEXT-None-07643
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_LOCATION_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageToColorEnable` is VK_TRUE, then vkCmdSetCoverageToColorLocationNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiEXT-None-07644
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_MODE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageModulationModeNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiEXT-None-07645
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageModulationMode` is any value other than VK_COVERAGE_MODULATION_MODE_NONE_NV, then vkCmdSetCoverageModulationTableEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiEXT-None-07646
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageModulationTableEnable` is VK_TRUE, then vkCmdSetCoverageModulationTableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiEXT-None-07647
  If the `shadingRateImage` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SHADING_RATE_IMAGE_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetShadingRateImageEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiEXT-pipelineFragmentShadingRate-09238
  If the `pipelineFragmentShadingRate` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetFragmentShadingRateKHR must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiEXT-None-07648
  If the `representativeFragmentTest` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_REPRESENTATIVE_FRAGMENT_TEST_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetRepresentativeFragmentTestEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiEXT-None-07649
  If the `coverageReductionMode` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageReductionModeNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiEXT-rasterizationSamples-07471
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current subpass does not use any color and/or depth/stencil attachments, then the `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT must follow the rules for a zero-attachment subpass

- VUID-vkCmdDrawMultiEXT-samples-07472
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state disabled, then the `samples` parameter in the last call to vkCmdSetSampleMaskEXT must be greater or equal to the VkPipelineMultisampleStateCreateInfo::`rasterizationSamples` parameter used to create the bound graphics pipeline

- VUID-vkCmdDrawMultiEXT-samples-07473
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT state and VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT states enabled, then the `samples` parameter in the last call to vkCmdSetSampleMaskEXT must be greater or equal to the `rasterizationSamples` parameter in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawMultiEXT-None-09211
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, or a shader object is bound to any graphics stage, and the current render pass instance includes a VkMultisampledRenderToSingleSampledInfoEXT structure with `multisampledRenderToSingleSampledEnable` equal to VK_TRUE, then the `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT must be the same as the `rasterizationSamples` member of that structure

- VUID-vkCmdDrawMultiEXT-firstAttachment-07476
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic states enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the last call to vkCmdSetColorBlendEnableEXT in the current command buffer prior to this drawing command must have set a value for all active color attachments

- VUID-vkCmdDrawMultiEXT-firstAttachment-07478
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT dynamic states enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the last call to vkCmdSetColorWriteMaskEXT in the current command buffer prior to this drawing command must have set a value for all active color attachments

- VUID-vkCmdDrawMultiEXT-advancedBlendMaxColorAttachments-07480
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT and VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic states enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and an active color attachment current value of `blendEnable` is VK_TRUE, then the number of active color attachments must not exceed `advancedBlendMaxColorAttachments`

- VUID-vkCmdDrawMultiEXT-None-10862
  If a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT , but not the VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorBlendEquationEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawMultiEXT-rasterizerDiscardEnable-10863
  If a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT, but not the VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorBlendAdvancedEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawMultiEXT-None-10864
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT and VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then either vkCmdSetColorBlendAdvancedEXT or vkCmdSetColorBlendEquationEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawMultiEXT-primitivesGeneratedQueryWithNonZeroStreams-07481
  If the `primitivesGeneratedQueryWithNonZeroStreams` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, and the bound graphics pipeline was created with VK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXT state enabled, the last call to vkCmdSetRasterizationStreamEXT must have set the `rasterizationStream` to zero

- VUID-vkCmdDrawMultiEXT-sampleLocationsPerPixel-07482
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state disabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then the `sampleLocationsPerPixel` member of `pSampleLocationsInfo` in the last call to vkCmdSetSampleLocationsEXT must equal the `rasterizationSamples` member of the VkPipelineMultisampleStateCreateInfo structure the bound graphics pipeline has been created with

- VUID-vkCmdDrawMultiEXT-sampleLocationsPerPixel-07483
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then the `sampleLocationsPerPixel` member of `pSampleLocationsInfo` in the last call to vkCmdSetSampleLocationsEXT must equal the `rasterizationSamples` parameter of the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawMultiEXT-sampleLocationsEnable-07484
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT then the current active depth attachment must have been created with the VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit set

- VUID-vkCmdDrawMultiEXT-sampleLocationsEnable-07485
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, then the `sampleLocationsInfo.maxSampleLocationGridSize.width` in the last call to vkCmdSetSampleLocationsEXT must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.width` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling `rasterizationSamples`

- VUID-vkCmdDrawMultiEXT-sampleLocationsEnable-07486
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, then the `sampleLocationsInfo.maxSampleLocationGridSize.height` in the last call to vkCmdSetSampleLocationsEXT must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.height` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling `rasterizationSamples`

- VUID-vkCmdDrawMultiEXT-sampleLocationsEnable-07487
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, the fragment shader code must not statically use the extended instruction `InterpolateAtSample`

- VUID-vkCmdDrawMultiEXT-sampleLocationsEnable-07936
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationGridSize.width` must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.width` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling the value of `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawMultiEXT-sampleLocationsEnable-07937
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationGridSize.height` must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.height` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling the value of `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawMultiEXT-sampleLocationsEnable-07938
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationsPerPixel` must equal `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawMultiEXT-coverageModulationTableEnable-07488
  If a shader object is bound to any graphics stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NV state enabled, and the last call to vkCmdSetCoverageModulationTableEnableNV set `coverageModulationTableEnable` to VK_TRUE, then the `coverageModulationTableCount` parameter in the last call to vkCmdSetCoverageModulationTableNV must equal the current `rasterizationSamples` divided by the number of color samples in the current active color attachment

- VUID-vkCmdDrawMultiEXT-rasterizationSamples-07489
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, and if current subpass has a depth/stencil attachment and depth test, stencil test, or depth bounds test are enabled in the bound pipeline, then the current `rasterizationSamples` must be the same as the sample count of the depth/stencil attachment

- VUID-vkCmdDrawMultiEXT-coverageToColorEnable-07490
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV state enabled and the last call to vkCmdSetCoverageToColorEnableNV set the `coverageToColorEnable` to VK_TRUE, then there must be an active color attachment at the location selected by the last call to vkCmdSetCoverageToColorLocationNV `coverageToColorLocation`, with a VkFormat of VK_FORMAT_R8_UINT, VK_FORMAT_R8_SINT, VK_FORMAT_R16_UINT, VK_FORMAT_R16_SINT, VK_FORMAT_R32_UINT, or VK_FORMAT_R32_SINT

- VUID-vkCmdDrawMultiEXT-rasterizerDiscardEnable-09420
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, and a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, and the most recent call to vkCmdSetRasterizerDiscardEnable in the current command buffer set `rasterizerDiscardEnable` to VK_FALSE, and the last call to vkCmdSetCoverageToColorEnableNV set the `coverageToColorEnable` to VK_TRUE, then there must be an active color attachment at the location selected by the last call to vkCmdSetCoverageToColorLocationNV `coverageToColorLocation`, with a VkFormat of VK_FORMAT_R8_UINT, VK_FORMAT_R8_SINT, VK_FORMAT_R16_UINT, VK_FORMAT_R16_SINT, VK_FORMAT_R32_UINT, or VK_FORMAT_R32_SINT

- VUID-vkCmdDrawMultiEXT-coverageReductionMode-07491
  If the `coverageReductionMode` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV or VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic states enabled, then the current values of `coverageReductionMode`, `rasterizationSamples`, the sample counts for the color and depth/stencil attachments (if the subpass has them) must be a valid combination returned by vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV

- VUID-vkCmdDrawMultiEXT-viewportCount-07492
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportSwizzleStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMultiEXT-viewportCount-07493
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic states enabled then the `viewportCount` parameter in the last call to vkCmdSetViewportSwizzleNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMultiEXT-viewportCount-09421
  If the `VK_NV_viewport_swizzle` extension is enabled, and a shader object is bound to any graphics stage, then the `viewportCount` parameter in the last call to vkCmdSetViewportSwizzleNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMultiEXT-rasterizationSamples-07494
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, and the `coverageReductionMode` feature is not enabled, or the current value of `coverageReductionMode` is not VK_COVERAGE_REDUCTION_MODE_TRUNCATE_NV, and the current value of `rasterizationSamples` is greater than sample count of the color attachment, then sample shading must be disabled

- VUID-vkCmdDrawMultiEXT-stippledLineEnable-07495
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_RECTANGULAR, then the `stippledRectangularLines` feature must be enabled

- VUID-vkCmdDrawMultiEXT-stippledLineEnable-07496
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_BRESENHAM, then the `stippledBresenhamLines` feature must be enabled

- VUID-vkCmdDrawMultiEXT-stippledLineEnable-07497
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH, then the `stippledSmoothLines` feature must be enabled

- VUID-vkCmdDrawMultiEXT-stippledLineEnable-07498
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_DEFAULT, then the `stippledRectangularLines` feature must be enabled and VkPhysicalDeviceLimits::`strictLines` must be VK_TRUE

- VUID-vkCmdDrawMultiEXT-stage-07073
  If the bound pipeline was created with the VkPipelineShaderStageCreateInfo::`stage` member of an element of VkGraphicsPipelineCreateInfo::`pStages` set to VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT, then Mesh Shader Queries must not be active

- VUID-vkCmdDrawMultiEXT-None-08877
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ATTACHMENT_FEEDBACK_LOOP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAttachmentFeedbackLoopEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiEXT-None-07850
  If dynamic state was inherited from VkCommandBufferInheritanceViewportScissorInfoNV, it must be set in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiEXT-nextStage-10745
  For each shader object bound to a graphics stage, except for shader object bound to the last graphics stage in the logical pipeline, it must have been created with a `nextStage` including the corresponding bit to the shader object bound to the following graphics stage in the logical pipeline

- VUID-vkCmdDrawMultiEXT-None-08684
  If there is no bound graphics pipeline, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_VERTEX_BIT

- VUID-vkCmdDrawMultiEXT-None-08685
  If there is no bound graphics pipeline, and the `tessellationShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT

- VUID-vkCmdDrawMultiEXT-None-08686
  If there is no bound graphics pipeline, and the `tessellationShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT

- VUID-vkCmdDrawMultiEXT-None-08687
  If there is no bound graphics pipeline, and the `geometryShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_GEOMETRY_BIT

- VUID-vkCmdDrawMultiEXT-None-08688
  If there is no bound graphics pipeline, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_FRAGMENT_BIT

- VUID-vkCmdDrawMultiEXT-None-08689
  If there is no bound graphics pipeline, and the `taskShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TASK_BIT_EXT

- VUID-vkCmdDrawMultiEXT-None-08690
  If there is no bound graphics pipeline, and the `meshShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-vkCmdDrawMultiEXT-None-08693
  If there is no bound graphics pipeline, and at least one of the `taskShader` and `meshShader` features is enabled, one of the VK_SHADER_STAGE_VERTEX_BIT or VK_SHADER_STAGE_MESH_BIT_EXT stages must have a valid `VkShaderEXT` bound, and the other must have no `VkShaderEXT` bound

- VUID-vkCmdDrawMultiEXT-None-08696
  If there is no bound graphics pipeline, and a valid `VkShaderEXT` is bound to the VK_SHADER_STAGE_VERTEX_BIT stage, there must be no `VkShaderEXT` bound to either the VK_SHADER_STAGE_TASK_BIT_EXT stage or the VK_SHADER_STAGE_MESH_BIT_EXT stage

- VUID-vkCmdDrawMultiEXT-None-08698
  If any graphics shader is bound which was created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag, then all shaders created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag in the same vkCreateShadersEXT call must also be bound

- VUID-vkCmdDrawMultiEXT-None-08699
  If any graphics shader is bound which was created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag, any stages in between stages whose shaders which did not create a shader with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag as part of the same vkCreateShadersEXT call must not have any `VkShaderEXT` bound

- VUID-vkCmdDrawMultiEXT-None-08878
  All bound graphics shader objects must have been created with identical or identically defined push constant ranges

- VUID-vkCmdDrawMultiEXT-None-08879
  All bound graphics shader objects must have either been created with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag set, or with identical or identically defined arrays of descriptor set layouts

- VUID-vkCmdDrawMultiEXT-colorAttachmentCount-09372
  If the current render pass instance was begun with vkCmdBeginRendering and a VkRenderingInfo::`colorAttachmentCount` equal to `1`, a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, and a fragment shader is bound, it must not declare the `DepthReplacing` or `StencilRefReplacingEXT` execution modes

- VUID-vkCmdDrawMultiEXT-pDynamicStates-08715
  If the bound graphics pipeline state includes a fragment shader stage, was created with VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`, and the fragment shader declares the `EarlyFragmentTests` execution mode and uses `OpDepthAttachmentReadEXT`, the `depthWriteEnable` parameter in the last call to vkCmdSetDepthWriteEnable must be VK_FALSE

- VUID-vkCmdDrawMultiEXT-pDynamicStates-08716
  If the bound graphics pipeline state includes a fragment shader stage, was created with VK_DYNAMIC_STATE_STENCIL_WRITE_MASK set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`, and the fragment shader declares the `EarlyFragmentTests` execution mode and uses `OpStencilAttachmentReadEXT`, the `writeMask` parameter in the last call to vkCmdSetStencilWriteMask must be `0`

- VUID-vkCmdDrawMultiEXT-None-09116
  If a shader object is bound to any graphics stage or the bound graphics pipeline was created with VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT, and the format of any color attachment is VK_FORMAT_E5B9G9R9_UFLOAT_PACK32, the corresponding element of the `pColorWriteMasks` parameter of vkCmdSetColorWriteMaskEXT must either include all of VK_COLOR_COMPONENT_R_BIT, VK_COLOR_COMPONENT_G_BIT, VK_COLOR_COMPONENT_B_BIT, and VK_COLOR_COMPONENT_A_BIT, or none of them

- VUID-vkCmdDrawMultiEXT-maxFragmentDualSrcAttachments-09239
  If blending is enabled for any attachment where either the source or destination blend factors for that attachment use the secondary color input, the maximum value of `Location` for any output attachment statically used in the `Fragment` `Execution` `Model` executed by this command must be less than `maxFragmentDualSrcAttachments`

- VUID-vkCmdDrawMultiEXT-None-09548
  If the current render pass was begun with vkCmdBeginRendering, there is no shader object bound to any graphics stage, the value of each element of VkRenderingAttachmentLocationInfo::`pColorAttachmentLocations` in the bound pipeline must match the value for the corresponding locations set currently in the current render pass instance

- VUID-vkCmdDrawMultiEXT-None-09549
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of each element of VkRenderingInputAttachmentIndexInfo::`pColorAttachmentInputIndices` in the bound pipeline must match the value for the corresponding index set currently in the current render pass instance

- VUID-vkCmdDrawMultiEXT-None-10927
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` in the bound pipeline must match the value set currently in the current render pass instance

- VUID-vkCmdDrawMultiEXT-None-10928
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` in the bound pipeline must match the value set currently in the current render pass instance

- VUID-vkCmdDrawMultiEXT-None-09642
  If the current render pass was begun with vkCmdBeginRendering with the VK_RENDERING_ENABLE_LEGACY_DITHERING_BIT_EXT flag, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_2_ENABLE_LEGACY_DITHERING_BIT_EXT

- VUID-vkCmdDrawMultiEXT-None-09643
  If the bound graphics pipeline was created with VK_PIPELINE_CREATE_2_ENABLE_LEGACY_DITHERING_BIT_EXT, the current render pass must have begun with vkCmdBeginRendering with the VK_RENDERING_ENABLE_LEGACY_DITHERING_BIT_EXT flag

- VUID-vkCmdDrawMultiEXT-None-10677
  If the per-tile execution model is enabled, the tileShadingPerTileDraw feature must be enabled

- VUID-vkCmdDrawMultiEXT-None-10772
  If a shader object is bound to any graphics stage, multiview functionality must not be enabled in the current render pass

- VUID-vkCmdDrawMultiEXT-multiviewPerViewViewports-12262
  If the `multiviewPerViewViewports` feature is enabled, then the index of the most significant bit in current render pass instance `viewMask` must be less than the current value of `viewportCount`

- VUID-vkCmdDrawMultiEXT-multiviewPerViewViewports-12263
  If the `multiviewPerViewViewports` feature is enabled, then the index of the most significant bit in current render pass instance `viewMask` must be less than the current value of `scissorCount`

- VUID-vkCmdDrawMultiEXT-flags-11521
  If current render pass instance was begun with vkCmdBeginRendering with VkRenderingInfo::`flags` which includes VK_RENDERING_FRAGMENT_REGION_BIT_EXT, and if sample shading is enabled (explicitly or implicitly), then the minimum fraction for sample shading must equal 0.0

- VUID-vkCmdDrawMultiEXT-None-11522
  If the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, and the `dynamicRenderingUnusedAttachments` feature is not enabled, the graphics pipeline bound must have been created with a VkCustomResolveCreateInfoEXT

- VUID-vkCmdDrawMultiEXT-None-11523
  If the current render pass instance was begun with vkCmdBeginRendering and does not contain a custom resolve, and the `dynamicRenderingUnusedAttachments` feature is not enabled, the graphics pipeline bound must not have been created with a VkCustomResolveCreateInfoEXT

- VUID-vkCmdDrawMultiEXT-customResolve-11524
  If the current render pass instance was begun with vkCmdBeginRendering and vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, the graphics pipeline bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_TRUE

- VUID-vkCmdDrawMultiEXT-customResolve-11525
  If the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, and vkCmdBeginCustomResolveEXT has not been recorded in the render pass instance, the graphics pipeline bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_FALSE

- VUID-vkCmdDrawMultiEXT-None-11861
  If the `dynamicRenderingUnusedAttachments` feature is not enabled and the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, the bound graphics pipeline must have been created with a VkCustomResolveCreateInfoEXT::`colorAttachmentCount` equal to VkRenderingInfo::`colorAttachmentCount`

- VUID-vkCmdDrawMultiEXT-None-11862
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound graphics pipeline

- VUID-vkCmdDrawMultiEXT-None-11863
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` equal to VK_NULL_HANDLE must have the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound pipeline equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMultiEXT-dynamicRenderingUnusedAttachments-11864
  If the `dynamicRenderingUnusedAttachments` feature is enabled, the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound graphics pipeline, or the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats`, if it exists, must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMultiEXT-None-11865
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMultiEXT-None-11866
  If current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`

- VUID-vkCmdDrawMultiEXT-dynamicRenderingUnusedAttachments-11867
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, and the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMultiEXT-None-11868
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->resolveImageView` was VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMultiEXT-None-11869
  If current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`

- VUID-vkCmdDrawMultiEXT-dynamicRenderingUnusedAttachments-11870
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, and the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMultiEXT-colorAttachmentCount-11871
  If the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0` and vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, then for each element of the VkRenderingInfo::`pColorAttachments` array with a `resolveImageView` not equal to VK_NULL_HANDLE, the `resolveImageView` must have been created with a sample count equal to the value of `rasterizationSamples` for the bound graphics pipeline

- VUID-vkCmdDrawMultiEXT-pDepthAttachment-11872
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`

- VUID-vkCmdDrawMultiEXT-pStencilAttachment-11873
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`

- VUID-vkCmdDrawMultiEXT-customResolve-11529
  If a shader object is bound to the fragment stage, the current render pass instance was begun with vkCmdBeginRendering, a fragment density map attachment is active, and vkCmdBeginCustomResolveEXT has been called, then the fragment shader object bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_TRUE

- VUID-vkCmdDrawMultiEXT-customResolve-11530
  If a shader object is bound to the fragment stage, the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, a fragment density map attachment is active, and vkCmdBeginCustomResolveEXT has not yet been called, then the fragment shader object bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_FALSE

- VUID-vkCmdDrawMultiEXT-flags-13361
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, then all bound shader objects must have been created with the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit

- VUID-vkCmdDrawMultiEXT-flags-13362
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, then the pipeline layout of the bound descriptor sets must have been created with VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT set

- VUID-vkCmdDrawMultiEXT-flags-13363
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, and any of the descriptor set layouts used to create the pipeline layout of the bound descriptor sets were created with any binding’s VkDescriptorSetLayoutBinding::`stageFlags` set with VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT, then there must be no binding with VkDescriptorSetLayoutBinding::`stageFlags` set with VK_SHADER_STAGE_TASK_BIT_EXT or VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-vkCmdDrawMultiEXT-flags-13364
  If there are any shader objects bound that were created with `flags` that includes both the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR and VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT bits, the pipeline layout of the bound descriptor sets must have been created with VK_PIPELINE_LAYOUT_CREATE_NO_TASK_SHADER_BIT_KHR set

- VUID-vkCmdDrawMultiEXT-flags-13365
  If there are any shader objects bound that were created with `flags` that includes both the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR and VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT bits, there must be no shader object bound to the VK_SHADER_STAGE_TASK_BIT_EXT stage

- VUID-vkCmdDrawMultiEXT-commandBuffer-02712
  If `commandBuffer` is a protected command buffer and `protectedNoFault` is not supported, any resource written to by the `VkPipeline` object bound to the pipeline bind point used by this command must not be an unprotected resource

- VUID-vkCmdDrawMultiEXT-commandBuffer-02713
  If `commandBuffer` is a protected command buffer and `protectedNoFault` is not supported, pipeline stages other than the framebuffer-space and compute stages in the `VkPipeline` object bound to the pipeline bind point used by this command must not write to any resource

- VUID-vkCmdDrawMultiEXT-commandBuffer-04617
  If any of the shader stages of the `VkPipeline` bound to the pipeline bind point used by this command uses the `RayQueryKHR` capability, then `commandBuffer` must not be a protected command buffer

- VUID-vkCmdDrawMultiEXT-None-04007
  All vertex input bindings accessed via vertex input variables declared in the vertex shader entry point’s interface must have either valid or VK_NULL_HANDLE buffers bound

- VUID-vkCmdDrawMultiEXT-None-04008
  If the `nullDescriptor` feature is not enabled, all vertex input bindings accessed via vertex input variables declared in the vertex shader entry point’s interface must not be VK_NULL_HANDLE

- VUID-vkCmdDrawMultiEXT-None-02721
  If the `robustBufferAccess` feature is not enabled, and that pipeline was created without enabling VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS for `vertexInputs`, then for a given vertex buffer binding, any attribute data fetched must be entirely contained within the corresponding vertex buffer binding, as described in Vertex Input Description

- VUID-vkCmdDrawMultiEXT-format-10389
  For each vertex attribute accessed by this command, if its VkVertexInputAttributeDescription::`format` or VkVertexInputAttributeDescription2EXT::`format` is a packed format, and the `legacyVertexAttributes` feature is not enabled, the value of `attribAddress`, calculated as described in Vertex Input Calculation, must be a multiple of the size of the `format`

- VUID-vkCmdDrawMultiEXT-format-10390
  For each vertex attribute accessed by this command, if its VkVertexInputAttributeDescription::`format` or VkVertexInputAttributeDescription2EXT::`format` is not a packed format, and either the `legacyVertexAttributes` feature is not enabled or `format` has 64-bit components, the value of `attribAddress`, calculated as described in Vertex Input Calculation, must be a multiple of the component size of the `format`

- VUID-vkCmdDrawMultiEXT-None-07842
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY dynamic state enabled then vkCmdSetPrimitiveTopology must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiEXT-dynamicPrimitiveTopologyUnrestricted-07500
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY dynamic state enabled and the `dynamicPrimitiveTopologyUnrestricted` is VK_FALSE, then the `primitiveTopology` parameter of `vkCmdSetPrimitiveTopology` must be of the same topology class as the pipeline VkPipelineInputAssemblyStateCreateInfo::`topology` state

- VUID-vkCmdDrawMultiEXT-primitiveTopology-10286
  If a VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage is bound, then the current value of `primitiveTopology` must be VK_PRIMITIVE_TOPOLOGY_PATCH_LIST prior to this drawing command

- VUID-vkCmdDrawMultiEXT-primitiveTopology-10747
  If vkCmdSetPrimitiveTopology set `primitiveTopology` to VK_PRIMITIVE_TOPOLOGY_PATCH_LIST prior to this drawing command, then a VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage must be bound

- VUID-vkCmdDrawMultiEXT-primitiveTopology-10748
  If vkCmdSetPrimitiveTopology set `primitiveTopology` to VK_PRIMITIVE_TOPOLOGY_POINT_LIST prior to this drawing command, the `maintenance5` feature is not enabled, both a VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT and VK_SHADER_STAGE_GEOMETRY_BIT stage are not bound, then the `Vertex` `Execution` `Model` must have a `PointSize` decorated variable that is statically written to

- VUID-vkCmdDrawMultiEXT-pStrides-04913
  If the bound graphics pipeline was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE dynamic state enabled, but without the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled, then vkCmdBindVertexBuffers2 with a non-`NULL` `pStrides` parameter or vkCmdBindVertexBuffers3KHR with `setStride` set to VK_TRUE must have been called and not subsequently invalidated in the current command buffer prior to this draw command

- VUID-vkCmdDrawMultiEXT-None-13118
  If the bound graphics pipeline was created without the VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE dynamic state enabled, without the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled, and vkCmdBindVertexBuffers3KHR was called and not subsequently invalidated in the current command buffer prior to this draw command, the value of `setStride` in each of its `pBindInfos` elements must have been VK_FALSE

- VUID-vkCmdDrawMultiEXT-None-04914
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled then vkCmdSetVertexInputEXT must have been called and not subsequently invalidated in the current command buffer prior to this draw command

- VUID-vkCmdDrawMultiEXT-Input-07939
  If the `vertexAttributeRobustness` feature is not enabled, and the `maintenance9` feature is not enabled, and there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled then all variables with the `Input` storage class decorated with `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` must contain a location in VkVertexInputAttributeDescription2EXT::`location`

- VUID-vkCmdDrawMultiEXT-Input-08734
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled and either the `legacyVertexAttributes` feature is not enabled or the SPIR-V Type associated with a given `Input` variable of the corresponding `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` is 64-bit, then the numeric type associated with all `Input` variables of the corresponding `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` must be the same as VkVertexInputAttributeDescription2EXT::`format`

- VUID-vkCmdDrawMultiEXT-format-08936
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled and VkVertexInputAttributeDescription2EXT::`format` has a 64-bit component, then the scalar width associated with all `Input` variables of the corresponding `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` must be 64-bit

- VUID-vkCmdDrawMultiEXT-format-08937
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled and the scalar width associated with a `Location` decorated `Input` variable in the `Vertex` `Execution` `Model` `OpEntryPoint` is 64-bit, then the corresponding VkVertexInputAttributeDescription2EXT::`format` must have a 64-bit component

- VUID-vkCmdDrawMultiEXT-None-09203
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled and VkVertexInputAttributeDescription2EXT::`format` has a 64-bit component, then all `Input` variables at the corresponding `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` must not use components that are not present in the format

- VUID-vkCmdDrawMultiEXT-None-04875
  If there is a shader object bound to the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage or the bound graphics pipeline state was created with both a VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage and the VK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT dynamic state enabled, and the current value of `primitiveTopology` is VK_PRIMITIVE_TOPOLOGY_PATCH_LIST, then vkCmdSetPatchControlPointsEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiEXT-None-04879
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE dynamic state enabled then vkCmdSetPrimitiveRestartEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiEXT-None-09637
  If the `primitiveTopologyListRestart` feature is not enabled, the input assembly is VK_PRIMITIVE_TOPOLOGY_POINT_LIST, VK_PRIMITIVE_TOPOLOGY_LINE_LIST, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY, or VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY, there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE dynamic state enabled, then vkCmdSetPrimitiveRestartEnable must be VK_FALSE

- VUID-vkCmdDrawMultiEXT-None-10909
  If the `primitiveTopologyPatchListRestart` feature is not enabled, the input assembly is VK_PRIMITIVE_TOPOLOGY_PATCH_LIST, there is a shader object bound to the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE dynamic state enabled then vkCmdSetPrimitiveRestartEnable must be VK_FALSE

- VUID-vkCmdDrawMultiEXT-stage-06481
  The bound graphics pipeline must not have been created with the VkPipelineShaderStageCreateInfo::`stage` member of any element of VkGraphicsPipelineCreateInfo::`pStages` set to VK_SHADER_STAGE_TASK_BIT_EXT or VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-vkCmdDrawMultiEXT-None-08885
  There must be no shader object bound to either of the VK_SHADER_STAGE_TASK_BIT_EXT or VK_SHADER_STAGE_MESH_BIT_EXT stages

- VUID-vkCmdDrawMultiEXT-None-07619
  If a shader object is bound to the VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stage or a graphics pipeline is bound which was created with both a VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stage and the VK_DYNAMIC_STATE_TESSELLATION_DOMAIN_ORIGIN_EXT dynamic state enabled, then vkCmdSetTessellationDomainOriginEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiEXT-OpExecutionMode-12239
  If a shader is bound to both the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stages, and if both stages contain an `OpExecutionMode` instruction specifying the type of subdivision, they must be the same

- VUID-vkCmdDrawMultiEXT-OpExecutionMode-12240
  If a shader is bound to both the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stages, and if both stages contain an `OpExecutionMode` instruction specifying the orientation of triangles, they must be the same

- VUID-vkCmdDrawMultiEXT-OpExecutionMode-12241
  If a shader is bound to both the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stages, and if both stages contain an `OpExecutionMode` instruction specifying the segment spacing, they must be the same

- VUID-vkCmdDrawMultiEXT-OpExecutionMode-12242
  If a shader is bound to both the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stages, and if both stages contain an `OpExecutionMode` instruction specifying the output patch size, they must be the same

- VUID-vkCmdDrawMultiEXT-pNext-09461
  If the bound graphics pipeline state was created with VkPipelineVertexInputDivisorStateCreateInfo in the `pNext` chain of VkGraphicsPipelineCreateInfo::`pVertexInputState`, any member of VkPipelineVertexInputDivisorStateCreateInfo::`pVertexBindingDivisors` has a value other than `1` in `divisor`, and VkPhysicalDeviceVertexAttributeDivisorProperties::`supportsNonZeroFirstInstance` is VK_FALSE, then `firstInstance` must be `0`

- VUID-vkCmdDrawMultiEXT-None-09462
  If shader objects are used for drawing or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled, any member of the `pVertexBindingDescriptions` parameter to the vkCmdSetVertexInputEXT call that sets this dynamic state has a value other than `1` in `divisor`, and VkPhysicalDeviceVertexAttributeDivisorProperties::`supportsNonZeroFirstInstance` is VK_FALSE, then `firstInstance` must be `0`

- VUID-vkCmdDrawMultiEXT-None-04933
  The `multiDraw` feature must be enabled

- VUID-vkCmdDrawMultiEXT-drawCount-04934
  `drawCount` must be less than `VkPhysicalDeviceMultiDrawPropertiesEXT`::`maxMultiDrawCount`

- VUID-vkCmdDrawMultiEXT-drawCount-04935
  If `drawCount` is greater than zero, `pVertexInfo` must be a valid pointer to memory containing one or more valid instances of VkMultiDrawInfoEXT structures

- VUID-vkCmdDrawMultiEXT-drawCount-09628
  If `drawCount` is greater than `1`, `stride` must be a multiple of `4` and must be greater than or equal to `sizeof`(`VkMultiDrawInfoEXT`)

Valid Usage (Implicit)

- VUID-vkCmdDrawMultiEXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdDrawMultiEXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdDrawMultiEXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdDrawMultiEXT-renderpass
  This command must only be called inside of a render pass instance

- VUID-vkCmdDrawMultiEXT-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdDrawMultiEXT-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Inside | Outside | VK_QUEUE_GRAPHICS_BIT | Action

Conditional Rendering

vkCmdDrawMultiEXT is affected by conditional rendering

To record an ordered sequence of indexed draws which have no state changes between them, call:

    // Provided by VK_EXT_multi_draw
    void vkCmdDrawMultiIndexedEXT(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    drawCount,
        const VkMultiDrawIndexedInfoEXT*            pIndexInfo,
        uint32_t                                    instanceCount,
        uint32_t                                    firstInstance,
        uint32_t                                    stride,
        const int32_t*                              pVertexOffset);

- `commandBuffer` is the command buffer into which the command is recorded.

- `drawCount` is the number of draws to execute, and can be zero.

- `pIndexInfo` is a pointer to an array of VkMultiDrawIndexedInfoEXT with index information to be drawn.

- `instanceCount` is the number of instances per draw.

- `firstInstance` is the instance ID of the first instance in each draw.

- `stride` is the byte stride between consecutive elements of `pIndexInfo`.

- `pVertexOffset` is `NULL` or a pointer to the value added to the vertex index before indexing into the vertex buffer. When specified, `VkMultiDrawIndexedInfoEXT`::`offset` is ignored.

The number of draws recorded is `drawCount`, with each draw reading, sequentially, a `firstIndex` and an `indexCount` from `pIndexInfo`. For each recorded draw, primitives are assembled as for vkCmdDrawIndexed, and drawn `instanceCount` times with `instanceIndex` starting with `firstInstance` and sequentially for each instance. If `pVertexOffset` is `NULL`, a `vertexOffset` is also read from `pIndexInfo`, otherwise the value from dereferencing `pVertexOffset` is used.

Valid Usage

- VUID-vkCmdDrawMultiIndexedEXT-magFilter-04553
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdDrawMultiIndexedEXT-magFilter-09598
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdDrawMultiIndexedEXT-mipmapMode-04770
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdDrawMultiIndexedEXT-mipmapMode-09599
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdDrawMultiIndexedEXT-unnormalizedCoordinates-09635
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `levelCount` and `layerCount` must be 1

- VUID-vkCmdDrawMultiIndexedEXT-None-08609
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `viewType` must be VK_IMAGE_VIEW_TYPE_1D or VK_IMAGE_VIEW_TYPE_2D

- VUID-vkCmdDrawMultiIndexedEXT-None-08610
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions with `ImplicitLod`, `Dref` or `Proj` in their name

- VUID-vkCmdDrawMultiIndexedEXT-None-08611
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions that includes a LOD bias or any offset values

- VUID-vkCmdDrawMultiIndexedEXT-None-06479
  If a VkImageView is sampled with depth comparison, the image view’s format features must contain VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT

- VUID-vkCmdDrawMultiIndexedEXT-None-02691
  If a VkImageView is accessed using atomic operations as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT

- VUID-vkCmdDrawMultiIndexedEXT-None-07888
  If a VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER descriptor is accessed using atomic operations as a result of this command, then the storage texel buffer’s format features must contain VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT

- VUID-vkCmdDrawMultiIndexedEXT-None-02692
  If a VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT

- VUID-vkCmdDrawMultiIndexedEXT-None-02693
  If the VK_EXT_filter_cubic extension is not enabled and any VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, it must not have a VkImageViewType of VK_IMAGE_VIEW_TYPE_3D, VK_IMAGE_VIEW_TYPE_CUBE, or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY

- VUID-vkCmdDrawMultiIndexedEXT-filterCubic-02694
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have a VkImageViewType and format that supports cubic filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubic` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdDrawMultiIndexedEXT-filterCubicMinmax-02695
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX as a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubicMinmax` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdDrawMultiIndexedEXT-cubicRangeClamp-09212
  If the `cubicRangeClamp` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must not have a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM

- VUID-vkCmdDrawMultiIndexedEXT-reductionMode-09213
  Any VkImageView being sampled with a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM as a result of this command must sample with VK_FILTER_CUBIC_EXT

- VUID-vkCmdDrawMultiIndexedEXT-selectableCubicWeights-09214
  If the `selectableCubicWeights` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have VkSamplerCubicWeightsCreateInfoQCOM::`cubicWeights` equal to VK_CUBIC_FILTER_WEIGHTS_CATMULL_ROM_QCOM

- VUID-vkCmdDrawMultiIndexedEXT-flags-02696
  Any VkImage created with a VkImageCreateInfo::`flags` containing VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV sampled as a result of this command must only be sampled using a VkSamplerAddressMode of VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawMultiIndexedEXT-OpTypeImage-07027
  For any VkImageView being written as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawMultiIndexedEXT-OpTypeImage-07028
  For any VkImageView being read as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawMultiIndexedEXT-OpTypeImage-07029
  For any VkBufferView being written as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown`, the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawMultiIndexedEXT-OpTypeImage-07030
  Any VkBufferView being read as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown` then the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawMultiIndexedEXT-None-08600
  If a a bound shader was created with a pipeline layout and statically uses a set n, a descriptor set must have been bound to n at the same pipeline bind point, with layouts compatible for set n with the layout(s) used to create the shader, as described in Pipeline Layout Compatibility

- VUID-vkCmdDrawMultiIndexedEXT-None-08601
  If a a bound shader was created with a pipeline layout or specified push constant ranges and statically uses a push constant value, that value must have been set for the same pipeline bind point, with push constant ranges that are compatible with the push constant range used to create the shader

- VUID-vkCmdDrawMultiIndexedEXT-None-10068
  For each array of resources that is used by a bound shader, the indices used to access members of the array must be less than the descriptor count for the identified binding in the descriptor sets used by this command

- VUID-vkCmdDrawMultiIndexedEXT-None-08114
  Descriptors in each bound descriptor set, specified via vkCmdBindDescriptorSets, must be valid if they are accessed as described by descriptor validity by the VkPipeline bound to the pipeline bind point used by this command and the bound VkPipeline was not created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawMultiIndexedEXT-imageLayout-00344
  If an image descriptor is accessed by a shader, the VkImageLayout must match the subresource accessible from the VkImageView as defined by the image layout matching rules

- VUID-vkCmdDrawMultiIndexedEXT-None-08115
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdBindDescriptorSets, the bound VkPipeline must have been created without VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawMultiIndexedEXT-None-08116
  Descriptors in bound descriptor buffers, specified via vkCmdSetDescriptorBufferOffsetsEXT, must be valid if they are dynamically accessed

- VUID-vkCmdDrawMultiIndexedEXT-None-08117
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdSetDescriptorBufferOffsetsEXT, the bound VkPipeline must have been created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawMultiIndexedEXT-None-08119
  If a descriptor is dynamically used with a VkPipeline created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdDrawMultiIndexedEXT-None-08605
  If a descriptor is dynamically used with a VkShaderEXT created with a `VkDescriptorSetLayout` that was created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdDrawMultiIndexedEXT-None-08606
  If the `shaderObject` feature is not enabled, a valid pipeline must be bound to the pipeline bind point used by this command

- VUID-vkCmdDrawMultiIndexedEXT-None-08608
  If a pipeline is bound to the pipeline bind point used by this command, there must not have been any calls to dynamic state setting commands for any state specified statically in the VkPipeline object bound to the pipeline bind point used by this command, since that pipeline was bound

- VUID-vkCmdDrawMultiIndexedEXT-uniformBuffers-06935
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawMultiIndexedEXT-None-08612
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawMultiIndexedEXT-storageBuffers-06936
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawMultiIndexedEXT-None-08613
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a storage buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawMultiIndexedEXT-commandBuffer-02707
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, any resource accessed by bound shaders must not be a protected resource

- VUID-vkCmdDrawMultiIndexedEXT-viewType-07752
  If a VkImageView is accessed as a result of this command, then the image view’s `viewType` must match the `Dim` operand of the `OpTypeImage` as described in Compatibility Between SPIR-V Image Dimensions and Vulkan ImageView Types

- VUID-vkCmdDrawMultiIndexedEXT-format-07753
  If a VkImageView or VkBufferView is accessed as a result of this command, then the numeric type of the view’s `format` and the `Sampled` `Type` operand of the `OpTypeImage` must match

- VUID-vkCmdDrawMultiIndexedEXT-OpImageWrite-08795
  If a VkImageView created with a format other than VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the image view’s format

- VUID-vkCmdDrawMultiIndexedEXT-OpImageWrite-08796
  If a VkImageView created with the format VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have four components

- VUID-vkCmdDrawMultiIndexedEXT-OpImageWrite-04469
  If a VkBufferView is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the buffer view’s format

- VUID-vkCmdDrawMultiIndexedEXT-SampledType-04470
  If a VkImageView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdDrawMultiIndexedEXT-SampledType-04471
  If a VkImageView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdDrawMultiIndexedEXT-SampledType-04472
  If a VkBufferView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdDrawMultiIndexedEXT-SampledType-04473
  If a VkBufferView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdDrawMultiIndexedEXT-sparseImageInt64Atomics-04474
  If the `sparseImageInt64Atomics` feature is not enabled, VkImage objects created with the VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdDrawMultiIndexedEXT-sparseImageInt64Atomics-04475
  If the `sparseImageInt64Atomics` feature is not enabled, VkBuffer objects created with the VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdDrawMultiIndexedEXT-OpImageSampleWeightedQCOM-06971
  If `OpImageSampleWeightedQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_SAMPLED_IMAGE_BIT_QCOM

- VUID-vkCmdDrawMultiIndexedEXT-OpImageSampleWeightedQCOM-06972
  If `OpImageSampleWeightedQCOM` uses a VkImageView as a sample weight image as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_IMAGE_BIT_QCOM

- VUID-vkCmdDrawMultiIndexedEXT-OpImageBoxFilterQCOM-06973
  If `OpImageBoxFilterQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BOX_FILTER_SAMPLED_BIT_QCOM

- VUID-vkCmdDrawMultiIndexedEXT-OpImageBlockMatchSSDQCOM-06974
  If `OpImageBlockMatchSSDQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdDrawMultiIndexedEXT-OpImageBlockMatchSADQCOM-12420
  If `OpImageBlockMatchSADQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdDrawMultiIndexedEXT-OpImageBlockMatchSADQCOM-06976
  If `OpImageBlockMatchSADQCOM` or OpImageBlockMatchSSDQCOM is used to read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdDrawMultiIndexedEXT-OpImageSampleWeightedQCOM-06977
  If `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdDrawMultiIndexedEXT-OpImageSampleWeightedQCOM-06978
  If any command other than `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must not have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdDrawMultiIndexedEXT-OpImageBlockMatchWindow-09215
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM

- VUID-vkCmdDrawMultiIndexedEXT-OpImageBlockMatchWindow-09216
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format must be a single-component format

- VUID-vkCmdDrawMultiIndexedEXT-OpImageBlockMatchWindow-09217
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdDrawMultiIndexedEXT-OpImageBlockMatchWindow-12421
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the `blockMatchExtendedClampToEdge` feature is not enabled, the input sampler must not have been created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawMultiIndexedEXT-addressModeU-12422
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the input sampler was created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, then the sampler must have been created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawMultiIndexedEXT-None-07288
  Any shader invocation executed by this command must terminate

- VUID-vkCmdDrawMultiIndexedEXT-None-09600
  If a descriptor with type equal to any of VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, or VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT is accessed as a result of this command, all image subresources identified by that descriptor must be in the image layout identified when the descriptor was written

- VUID-vkCmdDrawMultiIndexedEXT-micromap-11636
  If an acceleration structure is accessed as a result of this command through an `OpRayQueryProceedKHR` operation , the `VK_EXT_opacity_micromap` extension is not enabled, and the acceleration structure is built using geometry with a VkAccelerationStructureTrianglesOpacityMicromapKHR structure included in its `pNext` chain, the shader must have specified a `OpacityMicromapIdKHR` execution mode with its specialization constant operand equal to VK_TRUE

- VUID-vkCmdDrawMultiIndexedEXT-micromap-11637
  If an acceleration structure is accessed as a result of this command and the acceleration structure was constructed through deserialization, all micromap arrays referenced by the acceleration structure that were not replaced by an acceleration structure update command must have been deserialized using the serialized data of the corresponding micromaps used to originally build the acceleration structure prior to the execution of this command on the device

- VUID-vkCmdDrawMultiIndexedEXT-micromap-11638
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkPipeline bound to the pipeline bind point used by this command must not have been created with `flags` that includes VK_PIPELINE_CREATE_2_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_KHR

- VUID-vkCmdDrawMultiIndexedEXT-micromap-11639
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkShaderEXT that accessed the descriptor must not have been created with `flags` that includes VK_SHADER_CREATE_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_EXT

- VUID-vkCmdDrawMultiIndexedEXT-commandBuffer-10746
  The `VkDeviceMemory` object allocated from a `VkMemoryHeap` with the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property that is bound to a resource accessed as a result of this command must be the active bound tile memory object in `commandBuffer`

- VUID-vkCmdDrawMultiIndexedEXT-None-10678
  If this command is recorded inside a tile shading render pass instance, the stages corresponding to the pipeline bind point used by this command must only include VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_FRAGMENT_BIT, and/or VK_SHADER_STAGE_COMPUTE_BIT

- VUID-vkCmdDrawMultiIndexedEXT-None-10679
  If this command is recorded where per-tile execution model is enabled, there must be no access to any image while the image was be transitioned to the VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT layout

- VUID-vkCmdDrawMultiIndexedEXT-pDescription-09900
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the underlying VkTensorARM object must have been created with the VK_TENSOR_USAGE_SHADER_BIT_ARM usage flag set

- VUID-vkCmdDrawMultiIndexedEXT-dimensionCount-09905
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the `Rank` of the `OpTypeTensorARM` of the tensor resource variable must be equal to the `dimensionCount` provided via VkTensorCreateInfoARM::`pDescription` when creating the underlying VkTensorARM object

- VUID-vkCmdDrawMultiIndexedEXT-OpTypeTensorARM-09906
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the element type of the `OpTypeTensorARM` of the tensor resource variable must be compatible with the VkFormat of the VkTensorViewARM used for the access

- VUID-vkCmdDrawMultiIndexedEXT-OpTensorReadARM-12462
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, using `OpTensorReadARM` or `OpTensorWriteARM`, and the underlying VkTensorARM object was created with a VK_TENSOR_TILING_BRICK_16_WIDE_ARM, VK_TENSOR_TILING_BRICK_8_WIDE_ARM, VK_TENSOR_TILING_BRICK_4_WIDE_ARM, VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_ARM, or VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_64K_ARM VkTensorTilingARM, and the object read or written is an array, then the innermost coordinate provided to `OpTensorReadARM` or `OpTensorWriteARM` via the `Coordinates` operand must be a multiple of the largest power of 2 that is less than or equal to the number of components of the array

- VUID-vkCmdDrawMultiIndexedEXT-pNext-12463
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command and the corresponding VkTensorARM object was created with a VkTensorRollingBackingCreateInfoARM structure in the `pNext` chain of VkTensorCreateInfoARM, then the number of elements accessed with one `OpTensorReadARM` or `OpTensorWriteARM`, must be less than or equal to the number of elements available from the starting coordinate in the rolling backing along the innermost dimension, defined as `wraps`[`dimensionCount` - 1] - InnermostCoordinate % `wraps`[`dimensionCount` - 1] where InnermostCoordinate is the last component of the coordinates array provided via the `Coordinates` operand

- VUID-vkCmdDrawMultiIndexedEXT-None-12472
  Descriptors dynamically accessed in bound descriptor heaps must be valid

- VUID-vkCmdDrawMultiIndexedEXT-None-11297
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a `OpTypeStruct` decorated with `Block` or `BufferBlock` using that mapping, the calculated offset for the resource heap must be a multiple of `bufferDescriptorAlignment`

- VUID-vkCmdDrawMultiIndexedEXT-None-11298
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeImage` or `OpTypeSampledImage` using that mapping, the calculated offset for the resource heap must be a multiple of `imageDescriptorAlignment`

- VUID-vkCmdDrawMultiIndexedEXT-None-11299
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeSampler` or `OpTypeSampledImage` using that mapping, the calculated offset for the sampler heap must be a multiple of `samplerDescriptorAlignment`

- VUID-vkCmdDrawMultiIndexedEXT-None-11397
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeTensorARM` using that mapping, the calculated offset for the resource heap must be a multiple of `tensorDescriptorAlignment`

- VUID-vkCmdDrawMultiIndexedEXT-None-11300
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 4

- VUID-vkCmdDrawMultiIndexedEXT-None-11301
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdDrawMultiIndexedEXT-None-11302
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress

- VUID-vkCmdDrawMultiIndexedEXT-None-11304
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 8

- VUID-vkCmdDrawMultiIndexedEXT-None-11305
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdDrawMultiIndexedEXT-None-11306
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address pointed to by the address in push data must be a valid VkDeviceAddress

- VUID-vkCmdDrawMultiIndexedEXT-None-11308
  For each descriptor heap that is statically used by a bound shader, either directly or via a descriptor mapping, a valid descriptor heap must be bound

- VUID-vkCmdDrawMultiIndexedEXT-None-11309
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, execution of this command must not result in any descriptor read accessing data outside of the user range of the respective heap bound by `vkCmdBind*HeapEXT` commands

- VUID-vkCmdDrawMultiIndexedEXT-None-11372
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer or uniform texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified via VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawMultiIndexedEXT-None-11373
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer or storage texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawMultiIndexedEXT-None-11374
  If the `robustBufferAccess2` feature is not enabled, the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, uniform texel buffer, storage buffer, or storage texel buffer, that shader must not access values outside of the range of the buffer as specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawMultiIndexedEXT-pBindInfo-11375
  If any bound shader uses an embedded sampler via a descriptor mapping, the value of `pBindInfo->reservedRangeSize` set for vkCmdBindSamplerHeapEXT must be greater than or equal to `minSamplerHeapReservedRangeWithEmbedded`

- VUID-vkCmdDrawMultiIndexedEXT-None-11376
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, and that shader statically uses a push constant value, that value must have been set by vkCmdPushDataEXT

- VUID-vkCmdDrawMultiIndexedEXT-None-11398
  If a bound shader was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the access must not be out of bounds

- VUID-vkCmdDrawMultiIndexedEXT-None-11437
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the buffer from which the address in push data was queried must have been created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdDrawMultiIndexedEXT-None-11438
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdDrawMultiIndexedEXT-None-11441
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must be aligned to `minUniformBufferOffsetAlignment`

- VUID-vkCmdDrawMultiIndexedEXT-None-11439
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_STORAGE_BUFFER_BIT usage flag set

- VUID-vkCmdDrawMultiIndexedEXT-None-11442
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must be aligned to `minStorageBufferOffsetAlignment`

- VUID-vkCmdDrawMultiIndexedEXT-None-11485
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses an acceleration structure using that mapping, the address that the acceleration structure is mapped to must be an acceleration structure address retrieved from a VkAccelerationStructureKHR object via vkGetAccelerationStructureDeviceAddressKHR or handle retrieved from a VkAccelerationStructureNV object via vkGetAccelerationStructureHandleNV

- VUID-vkCmdDrawMultiIndexedEXT-index-11450
  If a shader uses a sampler descriptor to sample an image as a result of this command, and that sampler descriptor uses a custom border color with an index defined by VkSamplerCustomBorderColorIndexCreateInfoEXT, the value of VkSamplerCustomBorderColorIndexCreateInfoEXT::`index` must have been registered before this command was recorded, and still be registered during the sampling operation, with an identically defined color

- VUID-vkCmdDrawMultiIndexedEXT-protectedNoFault-11455
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, the address that the resource is mapped to must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdDrawMultiIndexedEXT-protectedNoFault-11456
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, the address of the indirect memory must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdDrawMultiIndexedEXT-renderPass-02684
  The current render pass must be compatible with the `renderPass` member of the `VkGraphicsPipelineCreateInfo` structure specified when creating the `VkPipeline` bound to VK_PIPELINE_BIND_POINT_GRAPHICS

- VUID-vkCmdDrawMultiIndexedEXT-subpass-02685
  The subpass index of the current render pass must be equal to the `subpass` member of the `VkGraphicsPipelineCreateInfo` structure specified when creating the `VkPipeline` bound to VK_PIPELINE_BIND_POINT_GRAPHICS

- VUID-vkCmdDrawMultiIndexedEXT-OpTypeImage-07468
  If any shader executed by this pipeline accesses an `OpTypeImage` variable with a `Dim` operand of `SubpassData`, it must be decorated with an `InputAttachmentIndex` that corresponds to a valid input attachment in the current subpass

- VUID-vkCmdDrawMultiIndexedEXT-None-07469
  Input attachment views accessed in a subpass must be created with the same VkFormat as the corresponding subpass definition, and be created with a VkImageView that is compatible with the attachment referenced by the subpass' `pInputAttachments`[`InputAttachmentIndex`] in the bound VkFramebuffer as specified by Fragment Input Attachment Compatibility

- VUID-vkCmdDrawMultiIndexedEXT-pDepthInputAttachmentIndex-09595
  Input attachment views accessed in a dynamic render pass with a `InputAttachmentIndex` referenced by VkRenderingInputAttachmentIndexInfo, or no `InputAttachmentIndex` if VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` or VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` are `NULL`, must be created with a VkImageView that is compatible with the corresponding color, depth, or stencil attachment in VkRenderingInfo

- VUID-vkCmdDrawMultiIndexedEXT-pDepthInputAttachmentIndex-09596
  Input attachment views accessed in a dynamic render pass via a shader object must have an `InputAttachmentIndex` if both VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` and VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` are non-`NULL`

- VUID-vkCmdDrawMultiIndexedEXT-InputAttachmentIndex-09597
  If an input attachment view accessed in a dynamic render pass via a shader object has an `InputAttachmentIndex`, the `InputAttachmentIndex` must match an index in VkRenderingInputAttachmentIndexInfo

- VUID-vkCmdDrawMultiIndexedEXT-None-06537
  Memory backing image subresources used as attachments in the current render pass must not be written in any way other than as an attachment by this command

- VUID-vkCmdDrawMultiIndexedEXT-None-10795
  If a color attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_COLOR_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawMultiIndexedEXT-None-10796
  If a depth attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_DEPTH_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawMultiIndexedEXT-None-10797
  If a stencil attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_STENCIL_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawMultiIndexedEXT-None-12338
  If a color attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_COLOR_BIT on that attachment, the color attachment must not be written to by this command

- VUID-vkCmdDrawMultiIndexedEXT-None-12339
  If a depth attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_DEPTH_BIT on that attachment, the depth attachment must not be written to by this command

- VUID-vkCmdDrawMultiIndexedEXT-None-12340
  If a stencil attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_STENCIL_BIT on that attachment, the stencil attachment must not be written to by this command

- VUID-vkCmdDrawMultiIndexedEXT-None-09003
  If an attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, it must not be accessed in any way other than as an attachment, storage image, or sampled image by this command

- VUID-vkCmdDrawMultiIndexedEXT-None-06886
  If the current render pass instance uses a depth/stencil attachment with a read-only layout for the depth aspect, depth writes must be disabled

- VUID-vkCmdDrawMultiIndexedEXT-None-06887
  If the current render pass instance uses a depth/stencil attachment with a read-only layout for the stencil aspect, both front and back `writeMask` are not zero, and stencil test is enabled, all stencil ops must be VK_STENCIL_OP_KEEP

- VUID-vkCmdDrawMultiIndexedEXT-None-07831
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT dynamic state enabled then vkCmdSetViewport must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-None-07832
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SCISSOR dynamic state enabled then vkCmdSetScissor must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-None-08617
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_WIDTH dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineWidth must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-None-07834
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BIAS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthBiasEnable` is VK_TRUE, then vkCmdSetDepthBias or vkCmdSetDepthBias2EXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-None-07835
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_BLEND_CONSTANTS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and an active color attachment current value of `blendEnable` is VK_TRUE with a blend equations where any VkBlendFactor member is VK_BLEND_FACTOR_CONSTANT_COLOR, VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR, VK_BLEND_FACTOR_CONSTANT_ALPHA, or VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA, then vkCmdSetBlendConstants must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-None-07836
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BOUNDS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthBoundsTestEnable` is VK_TRUE, then vkCmdSetDepthBounds must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-None-07837
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilCompareMask must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-None-07838
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_WRITE_MASK dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilWriteMask must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-None-07839
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_REFERENCE dynamic state enabled, the current value of and `rasterizerDiscardEnable` is VK_FALSE, the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilReference must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-maxMultiviewInstanceIndex-02688
  If the draw is recorded in a render pass instance with multiview enabled, the maximum instance index must be less than or equal to VkPhysicalDeviceMultiviewProperties::`maxMultiviewInstanceIndex`

- VUID-vkCmdDrawMultiIndexedEXT-sampleLocationsEnable-02689
  If the bound graphics pipeline was created with VkPipelineSampleLocationsStateCreateInfoEXT::`sampleLocationsEnable` set to VK_TRUE, then the active depth attachment must have been created with the VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit set

- VUID-vkCmdDrawMultiIndexedEXT-None-07634
  If the `VK_EXT_sample_locations` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetSampleLocationsEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-None-06666
  If the `VK_EXT_sample_locations` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `sampleLocationsEnable` is VK_TRUE, then vkCmdSetSampleLocationsEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-None-07840
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_CULL_MODE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCullMode must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-None-07841
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRONT_FACE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetFrontFace must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-None-07843
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, vkCmdSetDepthTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-None-07844
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthTestEnable` is VK_TRUE, then vkCmdSetDepthWriteEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-None-07845
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_COMPARE_OP dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthTestEnable` is VK_TRUE, then vkCmdSetDepthCompareOp must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-None-07846
  If the `depthBounds` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthBoundsTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-None-07847
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetStencilTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-None-07848
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_OP dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilOp must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-viewportCount-03417
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, and the state is not inherited, then vkCmdSetViewportWithCount must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-scissorCount-03418
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT dynamic state enabled, and the state is not inherited, then vkCmdSetScissorWithCount must have been called and not subsequently invalidated in the current command buffer prior to this drawing

- VUID-vkCmdDrawMultiIndexedEXT-viewportCount-03419
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with both the VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic states enabled, and the state is not inherited, then the `viewportCount` parameter of `vkCmdSetViewportWithCount` must match the `scissorCount` parameter of `vkCmdSetScissorWithCount`

- VUID-vkCmdDrawMultiIndexedEXT-viewportCount-04137
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportWScalingStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMultiIndexedEXT-viewportCount-04138
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, the current value of `viewportWScalingEnable` is VK_TRUE, then vkCmdSetViewportWScalingNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-None-08636
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, the current value of `viewportWScalingEnable` is VK_TRUE, then the `viewportCount` parameter in the last call to vkCmdSetViewportWScalingNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMultiIndexedEXT-viewportCount-04139
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportShadingRateImageStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMultiIndexedEXT-shadingRateImage-09233
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_COARSE_SAMPLE_ORDER_NV and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoarseSampleOrderNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-shadingRateImage-09234
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `shadingRateImageEnable` is VK_TRUE, then vkCmdSetViewportShadingRatePaletteNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-None-08637
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `shadingRateImageEnable` is VK_TRUE, then the `viewportCount` parameter in the last call to vkCmdSetViewportShadingRatePaletteNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMultiIndexedEXT-VkPipelineVieportCreateInfo-04141
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled and a VkPipelineViewportSwizzleStateCreateInfoNV structure chained from VkPipelineViewportStateCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportSwizzleStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMultiIndexedEXT-VkPipelineVieportCreateInfo-04142
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled and a VkPipelineViewportExclusiveScissorStateCreateInfoNV structure chained from VkPipelineViewportStateCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportExclusiveScissorStateCreateInfoNV::`exclusiveScissorCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMultiIndexedEXT-None-07878
  If the `exclusiveScissor` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_ENABLE_NV dynamic state enabled, then vkCmdSetExclusiveScissorEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-None-07879
  If the `exclusiveScissor` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_NV dynamic state enabled, and the most recent call to vkCmdSetExclusiveScissorEnableNV in the current command buffer set any element of `pExclusiveScissorEnables` to VK_TRUE, then vkCmdSetExclusiveScissorNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-None-04876
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE dynamic state enabled, then vkCmdSetRasterizerDiscardEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-None-04877
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthBiasEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-logicOp-04878
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LOGIC_OP_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `logicOpEnable` is VK_TRUE, then vkCmdSetLogicOpEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-primitiveFragmentShadingRateWithMultipleViewports-04552
  If the `primitiveFragmentShadingRateWithMultipleViewports` limit is not supported, the bound graphics pipeline was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, and any of the shader stages of the bound graphics pipeline write to the `PrimitiveShadingRateKHR` built-in, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and the `viewportCount` parameter of `vkCmdSetViewportWithCount` must be `1`

- VUID-vkCmdDrawMultiIndexedEXT-primitiveFragmentShadingRateWithMultipleViewports-08642
  If the `primitiveFragmentShadingRateWithMultipleViewports` limit is not supported, and any shader object bound to a graphics stage writes to the `PrimitiveShadingRateKHR` built-in, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and the `viewportCount` parameter of `vkCmdSetViewportWithCount` must be `1`

- VUID-vkCmdDrawMultiIndexedEXT-blendEnable-04727
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, then for each color attachment, if the corresponding image view’s format features do not contain VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT, then the corresponding current value of `blendEnable` must be VK_FALSE

- VUID-vkCmdDrawMultiIndexedEXT-None-08644
  If a shader object is bound to any graphics stage or a graphics pipeline is bound, the current value of `rasterizerDiscardEnable` is VK_FALSE, and none of the following is enabled:

  - the `VK_AMD_mixed_attachment_samples` extension

  - the `VK_NV_framebuffer_mixed_samples` extension

  - the `multisampledRenderToSingleSampled` feature

  then the current value of `rasterizationSamples` must be the same as the current color and/or depth/stencil attachments

- VUID-vkCmdDrawMultiIndexedEXT-None-08876
  If a shader object is bound to any graphics stage, the current render pass instance must have been begun with vkCmdBeginRendering

- VUID-vkCmdDrawMultiIndexedEXT-imageView-06172
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawMultiIndexedEXT-imageView-06173
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawMultiIndexedEXT-imageView-06174
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawMultiIndexedEXT-imageView-06175
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawMultiIndexedEXT-imageView-06176
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawMultiIndexedEXT-imageView-06177
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawMultiIndexedEXT-viewMask-06178
  If the current render pass instance was begun with vkCmdBeginRendering, the bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::`viewMask` equal to VkRenderingInfo::`viewMask`

- VUID-vkCmdDrawMultiIndexedEXT-colorAttachmentCount-06179
  If the `dynamicRenderingUnusedAttachments` feature is not enabled and the current render pass instance was begun with vkCmdBeginRendering, the bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::`colorAttachmentCount` equal to VkRenderingInfo::`colorAttachmentCount`

- VUID-vkCmdDrawMultiIndexedEXT-dynamicRenderingUnusedAttachments-08910
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound graphics pipeline

- VUID-vkCmdDrawMultiIndexedEXT-dynamicRenderingUnusedAttachments-08912
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` equal to VK_NULL_HANDLE must have the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound pipeline equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMultiIndexedEXT-dynamicRenderingUnusedAttachments-08911
  If the `dynamicRenderingUnusedAttachments` feature is enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound graphics pipeline, or the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats`, if it exists, must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMultiIndexedEXT-colorAttachmentCount-09362
  If the current render pass instance was begun with vkCmdBeginRendering, with a VkRenderingInfo::`colorAttachmentCount` equal to `1`, there is no shader object bound to any graphics stage, and a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, each element of the VkRenderingInfo::`pColorAttachments` array with a `resolveImageView` not equal to VK_NULL_HANDLE must have been created with an image created with a VkExternalFormatANDROID::`externalFormat` value equal to the VkExternalFormatANDROID::`externalFormat` value used to create the bound graphics pipeline

- VUID-vkCmdDrawMultiIndexedEXT-None-09363
  If there is no shader object bound to any graphics stage, the current render pass instance was begun with vkCmdBeginRendering and a VkRenderingInfo::`colorAttachmentCount` equal to `1`, and a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with an image created with a VkExternalFormatANDROID::`externalFormat` value equal to the VkExternalFormatANDROID::`externalFormat` value used to create the bound graphics pipeline

- VUID-vkCmdDrawMultiIndexedEXT-None-09364
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetColorBlendEnableEXT must have set the blend enable to VK_FALSE prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-None-09365
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetRasterizationSamplesEXT must have set `rasterizationSamples` to VK_SAMPLE_COUNT_1_BIT prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-None-09368
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetFragmentShadingRateKHR must have set `pFragmentSize->width` to `1` prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-None-09369
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetFragmentShadingRateKHR must have set `pFragmentSize->height` to `1` prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-None-07749
  If the `colorWriteEnable` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorWriteEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-attachmentCount-07750
  If the `colorWriteEnable` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the `attachmentCount` parameter of most recent call to `vkCmdSetColorWriteEnableEXT` in the current command buffer must be greater than or equal to the number of active color attachments

- VUID-vkCmdDrawMultiIndexedEXT-None-07751
  If the `VK_EXT_discard_rectangles` extension is enabled, a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT dynamic state enabled and the `pNext` chain of VkGraphicsPipelineCreateInfo included a VkPipelineDiscardRectangleStateCreateInfoEXT structure, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for each discard rectangle in VkPipelineDiscardRectangleStateCreateInfoEXT::`discardRectangleCount`

- VUID-vkCmdDrawMultiIndexedEXT-rasterizerDiscardEnable-09236
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT dynamic state enabled and the `pNext` chain of VkGraphicsPipelineCreateInfo did not include a VkPipelineDiscardRectangleStateCreateInfoEXT structure, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for each discard rectangle in VkPhysicalDeviceDiscardRectanglePropertiesEXT::`maxDiscardRectangles`

- VUID-vkCmdDrawMultiIndexedEXT-None-07880
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDiscardRectangleEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-None-07881
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_MODE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-dynamicRenderingUnusedAttachments-08913
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->imageView` was VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMultiIndexedEXT-dynamicRenderingUnusedAttachments-08914
  If current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawMultiIndexedEXT-dynamicRenderingUnusedAttachments-08915
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, and the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->imageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMultiIndexedEXT-dynamicRenderingUnusedAttachments-08916
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->imageView` was VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMultiIndexedEXT-dynamicRenderingUnusedAttachments-08917
  If current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawMultiIndexedEXT-dynamicRenderingUnusedAttachments-08918
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, and the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->imageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMultiIndexedEXT-imageView-06183
  If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentShadingRateAttachmentInfoKHR::`imageView` was not VK_NULL_HANDLE, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

- VUID-vkCmdDrawMultiIndexedEXT-dynamicRenderingLocalRead-11797
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingLocalRead` feature is enabled, the VK_RENDERING_LOCAL_READ_CONCURRENT_ACCESS_CONTROL_BIT_KHR flag is specified, and an attachment is being used as a feedback loop as specified by VK_RENDERING_ATTACHMENT_INPUT_ATTACHMENT_FEEDBACK_BIT_KHR, VkRenderingAttachmentFlagsInfoKHR::`flags` for that attachment must include VK_RENDERING_ATTACHMENT_INPUT_ATTACHMENT_FEEDBACK_BIT_KHR

- VUID-vkCmdDrawMultiIndexedEXT-imageView-06184
  If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentDensityMapAttachmentInfoEXT::`imageView` was not VK_NULL_HANDLE, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT

- VUID-vkCmdDrawMultiIndexedEXT-layers-10831
  If the current render pass instance was created with VK_RENDERING_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE or VK_RENDER_PASS_CREATE_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE, and the bound graphics pipeline was created with VK_PIPELINE_CREATE_2_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE, then the current render pass instance must have a `layers` value less than or equal to VkPipelineFragmentDensityMapLayeredCreateInfoVALVE::`maxFragmentDensityMapLayers`

- VUID-vkCmdDrawMultiIndexedEXT-colorAttachmentCount-06185
  If the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with a sample count equal to the corresponding element of the `pColorAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline

- VUID-vkCmdDrawMultiIndexedEXT-pDepthAttachment-06186
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of the `depthStencilAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawMultiIndexedEXT-pStencilAttachment-06187
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of the `depthStencilAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawMultiIndexedEXT-multisampledRenderToSingleSampled-07285
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with a sample count equal to the value of `rasterizationSamples` for the bound graphics pipeline

- VUID-vkCmdDrawMultiIndexedEXT-multisampledRenderToSingleSampled-07286
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawMultiIndexedEXT-multisampledRenderToSingleSampled-07287
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawMultiIndexedEXT-pNext-07935
  If this command is called inside a render pass instance started with vkCmdBeginRendering, and the `pNext` chain of VkRenderingInfo includes a VkMultisampledRenderToSingleSampledInfoEXT structure with `multisampledRenderToSingleSampledEnable` equal to VK_TRUE, then the value of `rasterizationSamples` for the bound graphics pipeline must be equal to VkMultisampledRenderToSingleSampledInfoEXT::`rasterizationSamples`

- VUID-vkCmdDrawMultiIndexedEXT-renderPass-06198
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline must have been created with a VkGraphicsPipelineCreateInfo::`renderPass` equal to VK_NULL_HANDLE

- VUID-vkCmdDrawMultiIndexedEXT-pColorAttachments-08963
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound with a fragment shader that statically writes to a color attachment, the color write mask is not zero, color writes are enabled, and the corresponding element of the VkRenderingInfo::`pColorAttachments->imageView` was not VK_NULL_HANDLE, then the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMultiIndexedEXT-pColorAttachments-11539
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound with a fragment shader that statically writes to a color attachment, the color write mask is not zero, color writes are enabled, and the corresponding element of the VkRenderingInfo::`pColorAttachments->resolveImageView` was not VK_NULL_HANDLE, then the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMultiIndexedEXT-pDepthAttachment-08964
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound, depth test is enabled, and the VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, then the VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMultiIndexedEXT-pDepthAttachment-11540
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound, depth test is enabled, and the VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, then the VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMultiIndexedEXT-pStencilAttachment-08965
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound, stencil test is enabled and the VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, then the VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMultiIndexedEXT-pStencilAttachment-11860
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound, stencil test is enabled and the VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, then the VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMultiIndexedEXT-flags-10582
  If the current render pass instance was begun with a vkCmdBeginRendering call in `commandBuffer`, its VkRenderingInfo::`flags` parameter must not have VK_RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT set unless VK_RENDERING_CONTENTS_INLINE_BIT_KHR is also set

- VUID-vkCmdDrawMultiIndexedEXT-primitivesGeneratedQueryWithRasterizerDiscard-06708
  If the `primitivesGeneratedQueryWithRasterizerDiscard` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, rasterization discard must not be enabled

- VUID-vkCmdDrawMultiIndexedEXT-primitivesGeneratedQueryWithNonZeroStreams-06709
  If the `primitivesGeneratedQueryWithNonZeroStreams` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, the bound graphics pipeline must not have been created with a non-zero value in `VkPipelineRasterizationStateStreamCreateInfoEXT`::`rasterizationStream`

- VUID-vkCmdDrawMultiIndexedEXT-None-07620
  If the `depthClamp` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLAMP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthClampEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-None-07621
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_POLYGON_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetPolygonModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-None-07622
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetRasterizationSamplesEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-None-07623
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetSampleMaskEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-alphaToCoverageEnable-08919
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT dynamic state enabled, and `alphaToCoverageEnable` was VK_TRUE in the last call to vkCmdSetAlphaToCoverageEnableEXT, then the Fragment Output Interface must contain a variable for the alpha `Component` word in `Location` 0 at `Index` 0

- VUID-vkCmdDrawMultiIndexedEXT-alphaToCoverageEnable-08920
  If a shader object is bound to any graphics stage, and the most recent call to vkCmdSetAlphaToCoverageEnableEXT in the current command buffer set `alphaToCoverageEnable` to VK_TRUE, then the Fragment Output Interface must contain a variable for the alpha `Component` word in `Location` 0 at `Index` 0

- VUID-vkCmdDrawMultiIndexedEXT-None-07624
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAlphaToCoverageEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-None-07625
  If the `alphaToOne` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ALPHA_TO_ONE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAlphaToOneEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-None-07626
  If the `logicOp` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LOGIC_OP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetLogicOpEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-None-07627
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and there are color attachments bound, then vkCmdSetColorBlendEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-None-07629
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and there are color attachments bound, then vkCmdSetColorWriteMaskEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-None-07630
  If the `geometryStreams` feature is enabled, and a shader object is bound to the VK_SHADER_STAGE_GEOMETRY_BIT stage or a graphics pipeline is bound which was created with both a VK_SHADER_STAGE_GEOMETRY_BIT stage and the VK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXT dynamic state enabled, then vkCmdSetRasterizationStreamEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-None-07631
  If the `VK_EXT_conservative_rasterization` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_CONSERVATIVE_RASTERIZATION_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetConservativeRasterizationModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-None-07632
  If the `VK_EXT_conservative_rasterization` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXTRA_PRIMITIVE_OVERESTIMATION_SIZE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `conservativeRasterizationMode` is VK_CONSERVATIVE_RASTERIZATION_MODE_OVERESTIMATE_EXT, then vkCmdSetExtraPrimitiveOverestimationSizeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-conservativePointAndLineRasterization-07499
  If the `VK_EXT_conservative_rasterization` extension is enabled, `conservativePointAndLineRasterization` is not supported, a shader object is bound to any graphics stage or a graphics pipeline is bound, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line or point topology class, then the current value of `conservativeRasterizationMode` must be VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT

- VUID-vkCmdDrawMultiIndexedEXT-None-07633
  If the `depthClipEnable` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLIP_ENABLE_EXT dynamic state, then vkCmdSetDepthClipEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-None-07636
  If the `VK_EXT_provoking_vertex` extension is enabled, a shader object is bound to the VK_SHADER_STAGE_VERTEX_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_PROVOKING_VERTEX_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetProvokingVertexModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-None-08666
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineRasterizationModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-None-08669
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineStippleEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-None-07849
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled and a shader object is bound to any graphics stage, or a bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stippledLineEnable` is VK_TRUE, then vkCmdSetLineStipple must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-None-10608
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic state enabled, the effective rasterization input topology is in the line topology class, and the current `lineRasterizationMode` is VK_LINE_RASTERIZATION_MODE_BRESENHAM or VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH, then the current `alphaToCoverageEnable`, `alphaToOneEnable` and `sampleShadingEnable` states must all be VK_FALSE

- VUID-vkCmdDrawMultiIndexedEXT-None-07639
  If the `depthClipControl` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLIP_NEGATIVE_ONE_TO_ONE_EXT dynamic state enabled, then vkCmdSetDepthClipNegativeOneToOneEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-None-09650
  If the `depthClampControl` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLAMP_RANGE_EXT dynamic state enabled, and the current value of `depthClampEnable` is VK_TRUE, then vkCmdSetDepthClampRangeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-None-07640
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_ENABLE_NV dynamic state enabled, then vkCmdSetViewportWScalingEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-None-07641
  If the `VK_NV_viewport_swizzle` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic state enabled, then vkCmdSetViewportSwizzleNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-None-07642
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageToColorEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-None-07643
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_LOCATION_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageToColorEnable` is VK_TRUE, then vkCmdSetCoverageToColorLocationNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-None-07644
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_MODE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageModulationModeNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-None-07645
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageModulationMode` is any value other than VK_COVERAGE_MODULATION_MODE_NONE_NV, then vkCmdSetCoverageModulationTableEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-None-07646
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageModulationTableEnable` is VK_TRUE, then vkCmdSetCoverageModulationTableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-None-07647
  If the `shadingRateImage` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SHADING_RATE_IMAGE_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetShadingRateImageEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-pipelineFragmentShadingRate-09238
  If the `pipelineFragmentShadingRate` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetFragmentShadingRateKHR must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-None-07648
  If the `representativeFragmentTest` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_REPRESENTATIVE_FRAGMENT_TEST_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetRepresentativeFragmentTestEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-None-07649
  If the `coverageReductionMode` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageReductionModeNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-rasterizationSamples-07471
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current subpass does not use any color and/or depth/stencil attachments, then the `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT must follow the rules for a zero-attachment subpass

- VUID-vkCmdDrawMultiIndexedEXT-samples-07472
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state disabled, then the `samples` parameter in the last call to vkCmdSetSampleMaskEXT must be greater or equal to the VkPipelineMultisampleStateCreateInfo::`rasterizationSamples` parameter used to create the bound graphics pipeline

- VUID-vkCmdDrawMultiIndexedEXT-samples-07473
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT state and VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT states enabled, then the `samples` parameter in the last call to vkCmdSetSampleMaskEXT must be greater or equal to the `rasterizationSamples` parameter in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawMultiIndexedEXT-None-09211
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, or a shader object is bound to any graphics stage, and the current render pass instance includes a VkMultisampledRenderToSingleSampledInfoEXT structure with `multisampledRenderToSingleSampledEnable` equal to VK_TRUE, then the `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT must be the same as the `rasterizationSamples` member of that structure

- VUID-vkCmdDrawMultiIndexedEXT-firstAttachment-07476
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic states enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the last call to vkCmdSetColorBlendEnableEXT in the current command buffer prior to this drawing command must have set a value for all active color attachments

- VUID-vkCmdDrawMultiIndexedEXT-firstAttachment-07478
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT dynamic states enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the last call to vkCmdSetColorWriteMaskEXT in the current command buffer prior to this drawing command must have set a value for all active color attachments

- VUID-vkCmdDrawMultiIndexedEXT-advancedBlendMaxColorAttachments-07480
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT and VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic states enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and an active color attachment current value of `blendEnable` is VK_TRUE, then the number of active color attachments must not exceed `advancedBlendMaxColorAttachments`

- VUID-vkCmdDrawMultiIndexedEXT-None-10862
  If a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT , but not the VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorBlendEquationEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawMultiIndexedEXT-rasterizerDiscardEnable-10863
  If a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT, but not the VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorBlendAdvancedEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawMultiIndexedEXT-None-10864
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT and VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then either vkCmdSetColorBlendAdvancedEXT or vkCmdSetColorBlendEquationEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawMultiIndexedEXT-primitivesGeneratedQueryWithNonZeroStreams-07481
  If the `primitivesGeneratedQueryWithNonZeroStreams` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, and the bound graphics pipeline was created with VK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXT state enabled, the last call to vkCmdSetRasterizationStreamEXT must have set the `rasterizationStream` to zero

- VUID-vkCmdDrawMultiIndexedEXT-sampleLocationsPerPixel-07482
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state disabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then the `sampleLocationsPerPixel` member of `pSampleLocationsInfo` in the last call to vkCmdSetSampleLocationsEXT must equal the `rasterizationSamples` member of the VkPipelineMultisampleStateCreateInfo structure the bound graphics pipeline has been created with

- VUID-vkCmdDrawMultiIndexedEXT-sampleLocationsPerPixel-07483
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then the `sampleLocationsPerPixel` member of `pSampleLocationsInfo` in the last call to vkCmdSetSampleLocationsEXT must equal the `rasterizationSamples` parameter of the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawMultiIndexedEXT-sampleLocationsEnable-07484
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT then the current active depth attachment must have been created with the VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit set

- VUID-vkCmdDrawMultiIndexedEXT-sampleLocationsEnable-07485
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, then the `sampleLocationsInfo.maxSampleLocationGridSize.width` in the last call to vkCmdSetSampleLocationsEXT must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.width` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling `rasterizationSamples`

- VUID-vkCmdDrawMultiIndexedEXT-sampleLocationsEnable-07486
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, then the `sampleLocationsInfo.maxSampleLocationGridSize.height` in the last call to vkCmdSetSampleLocationsEXT must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.height` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling `rasterizationSamples`

- VUID-vkCmdDrawMultiIndexedEXT-sampleLocationsEnable-07487
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, the fragment shader code must not statically use the extended instruction `InterpolateAtSample`

- VUID-vkCmdDrawMultiIndexedEXT-sampleLocationsEnable-07936
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationGridSize.width` must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.width` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling the value of `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawMultiIndexedEXT-sampleLocationsEnable-07937
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationGridSize.height` must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.height` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling the value of `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawMultiIndexedEXT-sampleLocationsEnable-07938
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationsPerPixel` must equal `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawMultiIndexedEXT-coverageModulationTableEnable-07488
  If a shader object is bound to any graphics stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NV state enabled, and the last call to vkCmdSetCoverageModulationTableEnableNV set `coverageModulationTableEnable` to VK_TRUE, then the `coverageModulationTableCount` parameter in the last call to vkCmdSetCoverageModulationTableNV must equal the current `rasterizationSamples` divided by the number of color samples in the current active color attachment

- VUID-vkCmdDrawMultiIndexedEXT-rasterizationSamples-07489
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, and if current subpass has a depth/stencil attachment and depth test, stencil test, or depth bounds test are enabled in the bound pipeline, then the current `rasterizationSamples` must be the same as the sample count of the depth/stencil attachment

- VUID-vkCmdDrawMultiIndexedEXT-coverageToColorEnable-07490
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV state enabled and the last call to vkCmdSetCoverageToColorEnableNV set the `coverageToColorEnable` to VK_TRUE, then there must be an active color attachment at the location selected by the last call to vkCmdSetCoverageToColorLocationNV `coverageToColorLocation`, with a VkFormat of VK_FORMAT_R8_UINT, VK_FORMAT_R8_SINT, VK_FORMAT_R16_UINT, VK_FORMAT_R16_SINT, VK_FORMAT_R32_UINT, or VK_FORMAT_R32_SINT

- VUID-vkCmdDrawMultiIndexedEXT-rasterizerDiscardEnable-09420
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, and a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, and the most recent call to vkCmdSetRasterizerDiscardEnable in the current command buffer set `rasterizerDiscardEnable` to VK_FALSE, and the last call to vkCmdSetCoverageToColorEnableNV set the `coverageToColorEnable` to VK_TRUE, then there must be an active color attachment at the location selected by the last call to vkCmdSetCoverageToColorLocationNV `coverageToColorLocation`, with a VkFormat of VK_FORMAT_R8_UINT, VK_FORMAT_R8_SINT, VK_FORMAT_R16_UINT, VK_FORMAT_R16_SINT, VK_FORMAT_R32_UINT, or VK_FORMAT_R32_SINT

- VUID-vkCmdDrawMultiIndexedEXT-coverageReductionMode-07491
  If the `coverageReductionMode` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV or VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic states enabled, then the current values of `coverageReductionMode`, `rasterizationSamples`, the sample counts for the color and depth/stencil attachments (if the subpass has them) must be a valid combination returned by vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV

- VUID-vkCmdDrawMultiIndexedEXT-viewportCount-07492
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportSwizzleStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMultiIndexedEXT-viewportCount-07493
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic states enabled then the `viewportCount` parameter in the last call to vkCmdSetViewportSwizzleNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMultiIndexedEXT-viewportCount-09421
  If the `VK_NV_viewport_swizzle` extension is enabled, and a shader object is bound to any graphics stage, then the `viewportCount` parameter in the last call to vkCmdSetViewportSwizzleNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMultiIndexedEXT-rasterizationSamples-07494
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, and the `coverageReductionMode` feature is not enabled, or the current value of `coverageReductionMode` is not VK_COVERAGE_REDUCTION_MODE_TRUNCATE_NV, and the current value of `rasterizationSamples` is greater than sample count of the color attachment, then sample shading must be disabled

- VUID-vkCmdDrawMultiIndexedEXT-stippledLineEnable-07495
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_RECTANGULAR, then the `stippledRectangularLines` feature must be enabled

- VUID-vkCmdDrawMultiIndexedEXT-stippledLineEnable-07496
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_BRESENHAM, then the `stippledBresenhamLines` feature must be enabled

- VUID-vkCmdDrawMultiIndexedEXT-stippledLineEnable-07497
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH, then the `stippledSmoothLines` feature must be enabled

- VUID-vkCmdDrawMultiIndexedEXT-stippledLineEnable-07498
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_DEFAULT, then the `stippledRectangularLines` feature must be enabled and VkPhysicalDeviceLimits::`strictLines` must be VK_TRUE

- VUID-vkCmdDrawMultiIndexedEXT-stage-07073
  If the bound pipeline was created with the VkPipelineShaderStageCreateInfo::`stage` member of an element of VkGraphicsPipelineCreateInfo::`pStages` set to VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT, then Mesh Shader Queries must not be active

- VUID-vkCmdDrawMultiIndexedEXT-None-08877
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ATTACHMENT_FEEDBACK_LOOP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAttachmentFeedbackLoopEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-None-07850
  If dynamic state was inherited from VkCommandBufferInheritanceViewportScissorInfoNV, it must be set in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-nextStage-10745
  For each shader object bound to a graphics stage, except for shader object bound to the last graphics stage in the logical pipeline, it must have been created with a `nextStage` including the corresponding bit to the shader object bound to the following graphics stage in the logical pipeline

- VUID-vkCmdDrawMultiIndexedEXT-None-08684
  If there is no bound graphics pipeline, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_VERTEX_BIT

- VUID-vkCmdDrawMultiIndexedEXT-None-08685
  If there is no bound graphics pipeline, and the `tessellationShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT

- VUID-vkCmdDrawMultiIndexedEXT-None-08686
  If there is no bound graphics pipeline, and the `tessellationShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT

- VUID-vkCmdDrawMultiIndexedEXT-None-08687
  If there is no bound graphics pipeline, and the `geometryShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_GEOMETRY_BIT

- VUID-vkCmdDrawMultiIndexedEXT-None-08688
  If there is no bound graphics pipeline, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_FRAGMENT_BIT

- VUID-vkCmdDrawMultiIndexedEXT-None-08689
  If there is no bound graphics pipeline, and the `taskShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TASK_BIT_EXT

- VUID-vkCmdDrawMultiIndexedEXT-None-08690
  If there is no bound graphics pipeline, and the `meshShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-vkCmdDrawMultiIndexedEXT-None-08693
  If there is no bound graphics pipeline, and at least one of the `taskShader` and `meshShader` features is enabled, one of the VK_SHADER_STAGE_VERTEX_BIT or VK_SHADER_STAGE_MESH_BIT_EXT stages must have a valid `VkShaderEXT` bound, and the other must have no `VkShaderEXT` bound

- VUID-vkCmdDrawMultiIndexedEXT-None-08696
  If there is no bound graphics pipeline, and a valid `VkShaderEXT` is bound to the VK_SHADER_STAGE_VERTEX_BIT stage, there must be no `VkShaderEXT` bound to either the VK_SHADER_STAGE_TASK_BIT_EXT stage or the VK_SHADER_STAGE_MESH_BIT_EXT stage

- VUID-vkCmdDrawMultiIndexedEXT-None-08698
  If any graphics shader is bound which was created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag, then all shaders created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag in the same vkCreateShadersEXT call must also be bound

- VUID-vkCmdDrawMultiIndexedEXT-None-08699
  If any graphics shader is bound which was created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag, any stages in between stages whose shaders which did not create a shader with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag as part of the same vkCreateShadersEXT call must not have any `VkShaderEXT` bound

- VUID-vkCmdDrawMultiIndexedEXT-None-08878
  All bound graphics shader objects must have been created with identical or identically defined push constant ranges

- VUID-vkCmdDrawMultiIndexedEXT-None-08879
  All bound graphics shader objects must have either been created with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag set, or with identical or identically defined arrays of descriptor set layouts

- VUID-vkCmdDrawMultiIndexedEXT-colorAttachmentCount-09372
  If the current render pass instance was begun with vkCmdBeginRendering and a VkRenderingInfo::`colorAttachmentCount` equal to `1`, a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, and a fragment shader is bound, it must not declare the `DepthReplacing` or `StencilRefReplacingEXT` execution modes

- VUID-vkCmdDrawMultiIndexedEXT-pDynamicStates-08715
  If the bound graphics pipeline state includes a fragment shader stage, was created with VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`, and the fragment shader declares the `EarlyFragmentTests` execution mode and uses `OpDepthAttachmentReadEXT`, the `depthWriteEnable` parameter in the last call to vkCmdSetDepthWriteEnable must be VK_FALSE

- VUID-vkCmdDrawMultiIndexedEXT-pDynamicStates-08716
  If the bound graphics pipeline state includes a fragment shader stage, was created with VK_DYNAMIC_STATE_STENCIL_WRITE_MASK set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`, and the fragment shader declares the `EarlyFragmentTests` execution mode and uses `OpStencilAttachmentReadEXT`, the `writeMask` parameter in the last call to vkCmdSetStencilWriteMask must be `0`

- VUID-vkCmdDrawMultiIndexedEXT-None-09116
  If a shader object is bound to any graphics stage or the bound graphics pipeline was created with VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT, and the format of any color attachment is VK_FORMAT_E5B9G9R9_UFLOAT_PACK32, the corresponding element of the `pColorWriteMasks` parameter of vkCmdSetColorWriteMaskEXT must either include all of VK_COLOR_COMPONENT_R_BIT, VK_COLOR_COMPONENT_G_BIT, VK_COLOR_COMPONENT_B_BIT, and VK_COLOR_COMPONENT_A_BIT, or none of them

- VUID-vkCmdDrawMultiIndexedEXT-maxFragmentDualSrcAttachments-09239
  If blending is enabled for any attachment where either the source or destination blend factors for that attachment use the secondary color input, the maximum value of `Location` for any output attachment statically used in the `Fragment` `Execution` `Model` executed by this command must be less than `maxFragmentDualSrcAttachments`

- VUID-vkCmdDrawMultiIndexedEXT-None-09548
  If the current render pass was begun with vkCmdBeginRendering, there is no shader object bound to any graphics stage, the value of each element of VkRenderingAttachmentLocationInfo::`pColorAttachmentLocations` in the bound pipeline must match the value for the corresponding locations set currently in the current render pass instance

- VUID-vkCmdDrawMultiIndexedEXT-None-09549
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of each element of VkRenderingInputAttachmentIndexInfo::`pColorAttachmentInputIndices` in the bound pipeline must match the value for the corresponding index set currently in the current render pass instance

- VUID-vkCmdDrawMultiIndexedEXT-None-10927
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` in the bound pipeline must match the value set currently in the current render pass instance

- VUID-vkCmdDrawMultiIndexedEXT-None-10928
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` in the bound pipeline must match the value set currently in the current render pass instance

- VUID-vkCmdDrawMultiIndexedEXT-None-09642
  If the current render pass was begun with vkCmdBeginRendering with the VK_RENDERING_ENABLE_LEGACY_DITHERING_BIT_EXT flag, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_2_ENABLE_LEGACY_DITHERING_BIT_EXT

- VUID-vkCmdDrawMultiIndexedEXT-None-09643
  If the bound graphics pipeline was created with VK_PIPELINE_CREATE_2_ENABLE_LEGACY_DITHERING_BIT_EXT, the current render pass must have begun with vkCmdBeginRendering with the VK_RENDERING_ENABLE_LEGACY_DITHERING_BIT_EXT flag

- VUID-vkCmdDrawMultiIndexedEXT-None-10677
  If the per-tile execution model is enabled, the tileShadingPerTileDraw feature must be enabled

- VUID-vkCmdDrawMultiIndexedEXT-None-10772
  If a shader object is bound to any graphics stage, multiview functionality must not be enabled in the current render pass

- VUID-vkCmdDrawMultiIndexedEXT-multiviewPerViewViewports-12262
  If the `multiviewPerViewViewports` feature is enabled, then the index of the most significant bit in current render pass instance `viewMask` must be less than the current value of `viewportCount`

- VUID-vkCmdDrawMultiIndexedEXT-multiviewPerViewViewports-12263
  If the `multiviewPerViewViewports` feature is enabled, then the index of the most significant bit in current render pass instance `viewMask` must be less than the current value of `scissorCount`

- VUID-vkCmdDrawMultiIndexedEXT-flags-11521
  If current render pass instance was begun with vkCmdBeginRendering with VkRenderingInfo::`flags` which includes VK_RENDERING_FRAGMENT_REGION_BIT_EXT, and if sample shading is enabled (explicitly or implicitly), then the minimum fraction for sample shading must equal 0.0

- VUID-vkCmdDrawMultiIndexedEXT-None-11522
  If the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, and the `dynamicRenderingUnusedAttachments` feature is not enabled, the graphics pipeline bound must have been created with a VkCustomResolveCreateInfoEXT

- VUID-vkCmdDrawMultiIndexedEXT-None-11523
  If the current render pass instance was begun with vkCmdBeginRendering and does not contain a custom resolve, and the `dynamicRenderingUnusedAttachments` feature is not enabled, the graphics pipeline bound must not have been created with a VkCustomResolveCreateInfoEXT

- VUID-vkCmdDrawMultiIndexedEXT-customResolve-11524
  If the current render pass instance was begun with vkCmdBeginRendering and vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, the graphics pipeline bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_TRUE

- VUID-vkCmdDrawMultiIndexedEXT-customResolve-11525
  If the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, and vkCmdBeginCustomResolveEXT has not been recorded in the render pass instance, the graphics pipeline bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_FALSE

- VUID-vkCmdDrawMultiIndexedEXT-None-11861
  If the `dynamicRenderingUnusedAttachments` feature is not enabled and the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, the bound graphics pipeline must have been created with a VkCustomResolveCreateInfoEXT::`colorAttachmentCount` equal to VkRenderingInfo::`colorAttachmentCount`

- VUID-vkCmdDrawMultiIndexedEXT-None-11862
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound graphics pipeline

- VUID-vkCmdDrawMultiIndexedEXT-None-11863
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` equal to VK_NULL_HANDLE must have the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound pipeline equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMultiIndexedEXT-dynamicRenderingUnusedAttachments-11864
  If the `dynamicRenderingUnusedAttachments` feature is enabled, the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound graphics pipeline, or the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats`, if it exists, must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMultiIndexedEXT-None-11865
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMultiIndexedEXT-None-11866
  If current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`

- VUID-vkCmdDrawMultiIndexedEXT-dynamicRenderingUnusedAttachments-11867
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, and the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMultiIndexedEXT-None-11868
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->resolveImageView` was VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMultiIndexedEXT-None-11869
  If current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`

- VUID-vkCmdDrawMultiIndexedEXT-dynamicRenderingUnusedAttachments-11870
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, and the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMultiIndexedEXT-colorAttachmentCount-11871
  If the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0` and vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, then for each element of the VkRenderingInfo::`pColorAttachments` array with a `resolveImageView` not equal to VK_NULL_HANDLE, the `resolveImageView` must have been created with a sample count equal to the value of `rasterizationSamples` for the bound graphics pipeline

- VUID-vkCmdDrawMultiIndexedEXT-pDepthAttachment-11872
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`

- VUID-vkCmdDrawMultiIndexedEXT-pStencilAttachment-11873
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`

- VUID-vkCmdDrawMultiIndexedEXT-customResolve-11529
  If a shader object is bound to the fragment stage, the current render pass instance was begun with vkCmdBeginRendering, a fragment density map attachment is active, and vkCmdBeginCustomResolveEXT has been called, then the fragment shader object bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_TRUE

- VUID-vkCmdDrawMultiIndexedEXT-customResolve-11530
  If a shader object is bound to the fragment stage, the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, a fragment density map attachment is active, and vkCmdBeginCustomResolveEXT has not yet been called, then the fragment shader object bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_FALSE

- VUID-vkCmdDrawMultiIndexedEXT-flags-13361
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, then all bound shader objects must have been created with the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit

- VUID-vkCmdDrawMultiIndexedEXT-flags-13362
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, then the pipeline layout of the bound descriptor sets must have been created with VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT set

- VUID-vkCmdDrawMultiIndexedEXT-flags-13363
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, and any of the descriptor set layouts used to create the pipeline layout of the bound descriptor sets were created with any binding’s VkDescriptorSetLayoutBinding::`stageFlags` set with VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT, then there must be no binding with VkDescriptorSetLayoutBinding::`stageFlags` set with VK_SHADER_STAGE_TASK_BIT_EXT or VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-vkCmdDrawMultiIndexedEXT-flags-13364
  If there are any shader objects bound that were created with `flags` that includes both the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR and VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT bits, the pipeline layout of the bound descriptor sets must have been created with VK_PIPELINE_LAYOUT_CREATE_NO_TASK_SHADER_BIT_KHR set

- VUID-vkCmdDrawMultiIndexedEXT-flags-13365
  If there are any shader objects bound that were created with `flags` that includes both the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR and VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT bits, there must be no shader object bound to the VK_SHADER_STAGE_TASK_BIT_EXT stage

- VUID-vkCmdDrawMultiIndexedEXT-commandBuffer-02712
  If `commandBuffer` is a protected command buffer and `protectedNoFault` is not supported, any resource written to by the `VkPipeline` object bound to the pipeline bind point used by this command must not be an unprotected resource

- VUID-vkCmdDrawMultiIndexedEXT-commandBuffer-02713
  If `commandBuffer` is a protected command buffer and `protectedNoFault` is not supported, pipeline stages other than the framebuffer-space and compute stages in the `VkPipeline` object bound to the pipeline bind point used by this command must not write to any resource

- VUID-vkCmdDrawMultiIndexedEXT-commandBuffer-04617
  If any of the shader stages of the `VkPipeline` bound to the pipeline bind point used by this command uses the `RayQueryKHR` capability, then `commandBuffer` must not be a protected command buffer

- VUID-vkCmdDrawMultiIndexedEXT-None-04007
  All vertex input bindings accessed via vertex input variables declared in the vertex shader entry point’s interface must have either valid or VK_NULL_HANDLE buffers bound

- VUID-vkCmdDrawMultiIndexedEXT-None-04008
  If the `nullDescriptor` feature is not enabled, all vertex input bindings accessed via vertex input variables declared in the vertex shader entry point’s interface must not be VK_NULL_HANDLE

- VUID-vkCmdDrawMultiIndexedEXT-None-02721
  If the `robustBufferAccess` feature is not enabled, and that pipeline was created without enabling VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS for `vertexInputs`, then for a given vertex buffer binding, any attribute data fetched must be entirely contained within the corresponding vertex buffer binding, as described in Vertex Input Description

- VUID-vkCmdDrawMultiIndexedEXT-format-10389
  For each vertex attribute accessed by this command, if its VkVertexInputAttributeDescription::`format` or VkVertexInputAttributeDescription2EXT::`format` is a packed format, and the `legacyVertexAttributes` feature is not enabled, the value of `attribAddress`, calculated as described in Vertex Input Calculation, must be a multiple of the size of the `format`

- VUID-vkCmdDrawMultiIndexedEXT-format-10390
  For each vertex attribute accessed by this command, if its VkVertexInputAttributeDescription::`format` or VkVertexInputAttributeDescription2EXT::`format` is not a packed format, and either the `legacyVertexAttributes` feature is not enabled or `format` has 64-bit components, the value of `attribAddress`, calculated as described in Vertex Input Calculation, must be a multiple of the component size of the `format`

- VUID-vkCmdDrawMultiIndexedEXT-None-07842
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY dynamic state enabled then vkCmdSetPrimitiveTopology must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-dynamicPrimitiveTopologyUnrestricted-07500
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY dynamic state enabled and the `dynamicPrimitiveTopologyUnrestricted` is VK_FALSE, then the `primitiveTopology` parameter of `vkCmdSetPrimitiveTopology` must be of the same topology class as the pipeline VkPipelineInputAssemblyStateCreateInfo::`topology` state

- VUID-vkCmdDrawMultiIndexedEXT-primitiveTopology-10286
  If a VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage is bound, then the current value of `primitiveTopology` must be VK_PRIMITIVE_TOPOLOGY_PATCH_LIST prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-primitiveTopology-10747
  If vkCmdSetPrimitiveTopology set `primitiveTopology` to VK_PRIMITIVE_TOPOLOGY_PATCH_LIST prior to this drawing command, then a VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage must be bound

- VUID-vkCmdDrawMultiIndexedEXT-primitiveTopology-10748
  If vkCmdSetPrimitiveTopology set `primitiveTopology` to VK_PRIMITIVE_TOPOLOGY_POINT_LIST prior to this drawing command, the `maintenance5` feature is not enabled, both a VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT and VK_SHADER_STAGE_GEOMETRY_BIT stage are not bound, then the `Vertex` `Execution` `Model` must have a `PointSize` decorated variable that is statically written to

- VUID-vkCmdDrawMultiIndexedEXT-pStrides-04913
  If the bound graphics pipeline was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE dynamic state enabled, but without the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled, then vkCmdBindVertexBuffers2 with a non-`NULL` `pStrides` parameter or vkCmdBindVertexBuffers3KHR with `setStride` set to VK_TRUE must have been called and not subsequently invalidated in the current command buffer prior to this draw command

- VUID-vkCmdDrawMultiIndexedEXT-None-13118
  If the bound graphics pipeline was created without the VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE dynamic state enabled, without the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled, and vkCmdBindVertexBuffers3KHR was called and not subsequently invalidated in the current command buffer prior to this draw command, the value of `setStride` in each of its `pBindInfos` elements must have been VK_FALSE

- VUID-vkCmdDrawMultiIndexedEXT-None-04914
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled then vkCmdSetVertexInputEXT must have been called and not subsequently invalidated in the current command buffer prior to this draw command

- VUID-vkCmdDrawMultiIndexedEXT-Input-07939
  If the `vertexAttributeRobustness` feature is not enabled, and the `maintenance9` feature is not enabled, and there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled then all variables with the `Input` storage class decorated with `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` must contain a location in VkVertexInputAttributeDescription2EXT::`location`

- VUID-vkCmdDrawMultiIndexedEXT-Input-08734
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled and either the `legacyVertexAttributes` feature is not enabled or the SPIR-V Type associated with a given `Input` variable of the corresponding `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` is 64-bit, then the numeric type associated with all `Input` variables of the corresponding `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` must be the same as VkVertexInputAttributeDescription2EXT::`format`

- VUID-vkCmdDrawMultiIndexedEXT-format-08936
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled and VkVertexInputAttributeDescription2EXT::`format` has a 64-bit component, then the scalar width associated with all `Input` variables of the corresponding `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` must be 64-bit

- VUID-vkCmdDrawMultiIndexedEXT-format-08937
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled and the scalar width associated with a `Location` decorated `Input` variable in the `Vertex` `Execution` `Model` `OpEntryPoint` is 64-bit, then the corresponding VkVertexInputAttributeDescription2EXT::`format` must have a 64-bit component

- VUID-vkCmdDrawMultiIndexedEXT-None-09203
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled and VkVertexInputAttributeDescription2EXT::`format` has a 64-bit component, then all `Input` variables at the corresponding `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` must not use components that are not present in the format

- VUID-vkCmdDrawMultiIndexedEXT-None-04875
  If there is a shader object bound to the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage or the bound graphics pipeline state was created with both a VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage and the VK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT dynamic state enabled, and the current value of `primitiveTopology` is VK_PRIMITIVE_TOPOLOGY_PATCH_LIST, then vkCmdSetPatchControlPointsEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-None-04879
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE dynamic state enabled then vkCmdSetPrimitiveRestartEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-None-09637
  If the `primitiveTopologyListRestart` feature is not enabled, the input assembly is VK_PRIMITIVE_TOPOLOGY_POINT_LIST, VK_PRIMITIVE_TOPOLOGY_LINE_LIST, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY, or VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY, there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE dynamic state enabled, then vkCmdSetPrimitiveRestartEnable must be VK_FALSE

- VUID-vkCmdDrawMultiIndexedEXT-None-10909
  If the `primitiveTopologyPatchListRestart` feature is not enabled, the input assembly is VK_PRIMITIVE_TOPOLOGY_PATCH_LIST, there is a shader object bound to the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE dynamic state enabled then vkCmdSetPrimitiveRestartEnable must be VK_FALSE

- VUID-vkCmdDrawMultiIndexedEXT-stage-06481
  The bound graphics pipeline must not have been created with the VkPipelineShaderStageCreateInfo::`stage` member of any element of VkGraphicsPipelineCreateInfo::`pStages` set to VK_SHADER_STAGE_TASK_BIT_EXT or VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-vkCmdDrawMultiIndexedEXT-None-08885
  There must be no shader object bound to either of the VK_SHADER_STAGE_TASK_BIT_EXT or VK_SHADER_STAGE_MESH_BIT_EXT stages

- VUID-vkCmdDrawMultiIndexedEXT-None-07619
  If a shader object is bound to the VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stage or a graphics pipeline is bound which was created with both a VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stage and the VK_DYNAMIC_STATE_TESSELLATION_DOMAIN_ORIGIN_EXT dynamic state enabled, then vkCmdSetTessellationDomainOriginEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMultiIndexedEXT-OpExecutionMode-12239
  If a shader is bound to both the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stages, and if both stages contain an `OpExecutionMode` instruction specifying the type of subdivision, they must be the same

- VUID-vkCmdDrawMultiIndexedEXT-OpExecutionMode-12240
  If a shader is bound to both the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stages, and if both stages contain an `OpExecutionMode` instruction specifying the orientation of triangles, they must be the same

- VUID-vkCmdDrawMultiIndexedEXT-OpExecutionMode-12241
  If a shader is bound to both the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stages, and if both stages contain an `OpExecutionMode` instruction specifying the segment spacing, they must be the same

- VUID-vkCmdDrawMultiIndexedEXT-OpExecutionMode-12242
  If a shader is bound to both the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stages, and if both stages contain an `OpExecutionMode` instruction specifying the output patch size, they must be the same

- VUID-vkCmdDrawMultiIndexedEXT-None-07312
  If the `maintenance6` feature is not enabled, a valid index buffer must be bound

- VUID-vkCmdDrawMultiIndexedEXT-primitiveRestartIndex-12401
  If the primitive restart index for this draw operation was set with vkCmdSetPrimitiveRestartIndexEXT, then `primitiveRestartIndex` must not be greater than the maximum representable value for the bound VkIndexType

- VUID-vkCmdDrawMultiIndexedEXT-pNext-09461
  If the bound graphics pipeline state was created with VkPipelineVertexInputDivisorStateCreateInfo in the `pNext` chain of VkGraphicsPipelineCreateInfo::`pVertexInputState`, any member of VkPipelineVertexInputDivisorStateCreateInfo::`pVertexBindingDivisors` has a value other than `1` in `divisor`, and VkPhysicalDeviceVertexAttributeDivisorProperties::`supportsNonZeroFirstInstance` is VK_FALSE, then `firstInstance` must be `0`

- VUID-vkCmdDrawMultiIndexedEXT-None-09462
  If shader objects are used for drawing or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled, any member of the `pVertexBindingDescriptions` parameter to the vkCmdSetVertexInputEXT call that sets this dynamic state has a value other than `1` in `divisor`, and VkPhysicalDeviceVertexAttributeDivisorProperties::`supportsNonZeroFirstInstance` is VK_FALSE, then `firstInstance` must be `0`

- VUID-vkCmdDrawMultiIndexedEXT-robustBufferAccess2-08798
  If the `robustBufferAccess2` feature is not enabled, (`indexSize` × (`firstIndex` + `indexCount`)) must be less than or equal to the size of the bound index buffer range, with `indexSize` being based on the type specified by `indexType`, and the other parameters sourced from this command

- VUID-vkCmdDrawMultiIndexedEXT-None-04937
  The `multiDraw` feature must be enabled

- VUID-vkCmdDrawMultiIndexedEXT-drawCount-04939
  `drawCount` must be less than `VkPhysicalDeviceMultiDrawPropertiesEXT`::`maxMultiDrawCount`

- VUID-vkCmdDrawMultiIndexedEXT-drawCount-04940
  If `drawCount` is greater than zero, `pIndexInfo` must be a valid pointer to memory containing one or more valid instances of VkMultiDrawIndexedInfoEXT structures

- VUID-vkCmdDrawMultiIndexedEXT-drawCount-09629
  If `drawCount` is greater than `1`, `stride` must be a multiple of `4` and must be greater than or equal to `sizeof`(`VkMultiDrawIndexedInfoEXT`)

Valid Usage (Implicit)

- VUID-vkCmdDrawMultiIndexedEXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdDrawMultiIndexedEXT-pVertexOffset-parameter
  If `pVertexOffset` is not `NULL`, `pVertexOffset` must be a valid pointer to a valid `int32_t` value

- VUID-vkCmdDrawMultiIndexedEXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdDrawMultiIndexedEXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdDrawMultiIndexedEXT-renderpass
  This command must only be called inside of a render pass instance

- VUID-vkCmdDrawMultiIndexedEXT-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdDrawMultiIndexedEXT-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Inside | Outside | VK_QUEUE_GRAPHICS_BIT | Action

Conditional Rendering

vkCmdDrawMultiIndexedEXT is affected by conditional rendering

The `VkMultiDrawInfoEXT` structure is defined as:

    // Provided by VK_EXT_multi_draw
    typedef struct VkMultiDrawInfoEXT {
        uint32_t    firstVertex;
        uint32_t    vertexCount;
    } VkMultiDrawInfoEXT;

- `firstVertex` is the first vertex to draw.

- `vertexCount` is the number of vertices to draw.

The members of `VkMultiDrawInfoEXT` have the same meaning as the `firstVertex` and `vertexCount` parameters in vkCmdDraw.

The `VkMultiDrawIndexedInfoEXT` structure is defined as:

    // Provided by VK_EXT_multi_draw
    typedef struct VkMultiDrawIndexedInfoEXT {
        uint32_t    firstIndex;
        uint32_t    indexCount;
        int32_t     vertexOffset;
    } VkMultiDrawIndexedInfoEXT;

- `firstIndex` is the first index to draw.

- `indexCount` is the number of vertices to draw.

- `vertexOffset` is the value added to the vertex index before indexing into the vertex buffer for indexed multidraws.

The `firstIndex`, `indexCount`, and `vertexOffset` members of `VkMultiDrawIndexedInfoEXT` have the same meaning as the `firstIndex`, `indexCount`, and `vertexOffset` parameters, respectively, of vkCmdDrawIndexed.

`VkDrawIndirect2InfoKHR` is defined as:

    // Provided by VK_KHR_device_address_commands
    typedef struct VkDrawIndirect2InfoKHR {
        VkStructureType                   sType;
        const void*                       pNext;
        VkStridedDeviceAddressRangeKHR    addressRange;
        VkAddressCommandFlagsKHR          addressFlags;
        uint32_t                          drawCount;
    } VkDrawIndirect2InfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `addressRange` is the VkStridedDeviceAddressRangeKHR containing draw parameters.

- `addressFlags` is a VkAddressCommandFlagsKHR value defining the flags for the address range.

- `drawCount` is the number of draws to execute, and can be zero.

Valid Usage

- VUID-VkDrawIndirect2InfoKHR-addressRange-13097
  If the range specified by `addressRange` is not bound completely to memory when accessed, `addressFlags` must not include VK_ADDRESS_COMMAND_FULLY_BOUND_BIT_KHR

- VUID-VkDrawIndirect2InfoKHR-addressRange-13098
  If the buffer from which the range specified by `addressRange` was created with VK_BUFFER_CREATE_PROTECTED_BIT, and `protectedNoFault` is not supported, `addressFlags` must include VK_ADDRESS_COMMAND_PROTECTED_BIT_KHR

- VUID-VkDrawIndirect2InfoKHR-addressRange-13099
  If the buffer from which the range specified by `addressRange` was created without VK_BUFFER_CREATE_PROTECTED_BIT, and `protectedNoFault` is not supported, `addressFlags` must not include VK_ADDRESS_COMMAND_PROTECTED_BIT_KHR

- VUID-VkDrawIndirect2InfoKHR-addressFlags-13100
  `addressFlags` must not include both VK_ADDRESS_COMMAND_STORAGE_BUFFER_USAGE_BIT_KHR and VK_ADDRESS_COMMAND_UNKNOWN_STORAGE_BUFFER_USAGE_BIT_KHR

- VUID-VkDrawIndirect2InfoKHR-addressRange-13122
  If any buffer, which is bound to a range of VkDeviceMemory that overlaps the range backing `addressRange`, was created with VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, `addressFlags` must include VK_ADDRESS_COMMAND_STORAGE_BUFFER_USAGE_BIT_KHR or VK_ADDRESS_COMMAND_UNKNOWN_STORAGE_BUFFER_USAGE_BIT_KHR

- VUID-VkDrawIndirect2InfoKHR-addressRange-13123
  If any buffer, which is bound to a range of VkDeviceMemory that overlaps the range backing `addressRange`, was created without VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, `addressFlags` must not include VK_ADDRESS_COMMAND_STORAGE_BUFFER_USAGE_BIT_KHR

- VUID-VkDrawIndirect2InfoKHR-addressFlags-13101
  `addressFlags` must not include both VK_ADDRESS_COMMAND_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR and VK_ADDRESS_COMMAND_UNKNOWN_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR

- VUID-VkDrawIndirect2InfoKHR-addressRange-13124
  If any buffer, which is bound to a range of VkDeviceMemory that overlaps the range backing `addressRange`, was created with VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT, `addressFlags` must include VK_ADDRESS_COMMAND_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR or VK_ADDRESS_COMMAND_UNKNOWN_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR

- VUID-VkDrawIndirect2InfoKHR-addressRange-13125
  If any buffer, which is bound to a range of VkDeviceMemory that overlaps the range backing `addressRange`, was created without VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT, `addressFlags` must not include VK_ADDRESS_COMMAND_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR

- VUID-VkDrawIndirect2InfoKHR-addressRange-13107
  The buffer from which `addressRange` was queried must have been created with VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT usage flag

- VUID-VkDrawIndirect2InfoKHR-protectedNoFault-13108
  If `protectedNoFault` is not supported, the buffer from which `addressRange` was queried must not have been created with VK_BUFFER_CREATE_PROTECTED_BIT

- VUID-VkDrawIndirect2InfoKHR-addressRange-13109
  `addressRange.address` must be a multiple of 4

- VUID-VkDrawIndirect2InfoKHR-drawCount-02718
  If the `multiDrawIndirect` feature is not enabled, `drawCount` must be `0` or `1`

- VUID-VkDrawIndirect2InfoKHR-drawCount-02719
  `drawCount` must be less than or equal to `VkPhysicalDeviceLimits`::`maxDrawIndirectCount`

Valid Usage (Implicit)

- VUID-VkDrawIndirect2InfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DRAW_INDIRECT_2_INFO_KHR

- VUID-VkDrawIndirect2InfoKHR-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkDrawIndirect2InfoKHR-addressFlags-parameter
  `addressFlags` must be a valid combination of VkAddressCommandFlagBitsKHR values

To record a non-indexed indirect drawing command, call:

    // Provided by VK_KHR_device_address_commands
    void vkCmdDrawIndirect2KHR(
        VkCommandBuffer                             commandBuffer,
        const VkDrawIndirect2InfoKHR*               pInfo);

- `commandBuffer` is the command buffer into which the command is recorded.

- `pInfo` is a pointer to a VkDrawIndirect2InfoKHR structure defining parameters of this command.

`vkCmdDrawIndirect2KHR` behaves similarly to vkCmdDraw except that the parameters are read by the device from an address range during execution. `pInfo->drawCount` draws are executed by the command, with parameters taken from `pInfo->addressRange` starting at `addressRange.address` and increasing by `addressRange.stride` bytes for each successive draw. The parameters of each draw are encoded in an array of VkDrawIndirectCommand structures.

Valid Usage

- VUID-vkCmdDrawIndirect2KHR-magFilter-04553
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdDrawIndirect2KHR-magFilter-09598
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdDrawIndirect2KHR-mipmapMode-04770
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdDrawIndirect2KHR-mipmapMode-09599
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdDrawIndirect2KHR-unnormalizedCoordinates-09635
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `levelCount` and `layerCount` must be 1

- VUID-vkCmdDrawIndirect2KHR-None-08609
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `viewType` must be VK_IMAGE_VIEW_TYPE_1D or VK_IMAGE_VIEW_TYPE_2D

- VUID-vkCmdDrawIndirect2KHR-None-08610
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions with `ImplicitLod`, `Dref` or `Proj` in their name

- VUID-vkCmdDrawIndirect2KHR-None-08611
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions that includes a LOD bias or any offset values

- VUID-vkCmdDrawIndirect2KHR-None-06479
  If a VkImageView is sampled with depth comparison, the image view’s format features must contain VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT

- VUID-vkCmdDrawIndirect2KHR-None-02691
  If a VkImageView is accessed using atomic operations as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT

- VUID-vkCmdDrawIndirect2KHR-None-07888
  If a VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER descriptor is accessed using atomic operations as a result of this command, then the storage texel buffer’s format features must contain VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT

- VUID-vkCmdDrawIndirect2KHR-None-02692
  If a VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT

- VUID-vkCmdDrawIndirect2KHR-None-02693
  If the VK_EXT_filter_cubic extension is not enabled and any VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, it must not have a VkImageViewType of VK_IMAGE_VIEW_TYPE_3D, VK_IMAGE_VIEW_TYPE_CUBE, or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY

- VUID-vkCmdDrawIndirect2KHR-filterCubic-02694
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have a VkImageViewType and format that supports cubic filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubic` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdDrawIndirect2KHR-filterCubicMinmax-02695
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX as a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubicMinmax` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdDrawIndirect2KHR-cubicRangeClamp-09212
  If the `cubicRangeClamp` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must not have a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM

- VUID-vkCmdDrawIndirect2KHR-reductionMode-09213
  Any VkImageView being sampled with a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM as a result of this command must sample with VK_FILTER_CUBIC_EXT

- VUID-vkCmdDrawIndirect2KHR-selectableCubicWeights-09214
  If the `selectableCubicWeights` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have VkSamplerCubicWeightsCreateInfoQCOM::`cubicWeights` equal to VK_CUBIC_FILTER_WEIGHTS_CATMULL_ROM_QCOM

- VUID-vkCmdDrawIndirect2KHR-flags-02696
  Any VkImage created with a VkImageCreateInfo::`flags` containing VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV sampled as a result of this command must only be sampled using a VkSamplerAddressMode of VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawIndirect2KHR-OpTypeImage-07027
  For any VkImageView being written as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawIndirect2KHR-OpTypeImage-07028
  For any VkImageView being read as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawIndirect2KHR-OpTypeImage-07029
  For any VkBufferView being written as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown`, the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawIndirect2KHR-OpTypeImage-07030
  Any VkBufferView being read as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown` then the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawIndirect2KHR-None-08600
  If a a bound shader was created with a pipeline layout and statically uses a set n, a descriptor set must have been bound to n at the same pipeline bind point, with layouts compatible for set n with the layout(s) used to create the shader, as described in Pipeline Layout Compatibility

- VUID-vkCmdDrawIndirect2KHR-None-08601
  If a a bound shader was created with a pipeline layout or specified push constant ranges and statically uses a push constant value, that value must have been set for the same pipeline bind point, with push constant ranges that are compatible with the push constant range used to create the shader

- VUID-vkCmdDrawIndirect2KHR-None-10068
  For each array of resources that is used by a bound shader, the indices used to access members of the array must be less than the descriptor count for the identified binding in the descriptor sets used by this command

- VUID-vkCmdDrawIndirect2KHR-None-08114
  Descriptors in each bound descriptor set, specified via vkCmdBindDescriptorSets, must be valid if they are accessed as described by descriptor validity by the VkPipeline bound to the pipeline bind point used by this command and the bound VkPipeline was not created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawIndirect2KHR-imageLayout-00344
  If an image descriptor is accessed by a shader, the VkImageLayout must match the subresource accessible from the VkImageView as defined by the image layout matching rules

- VUID-vkCmdDrawIndirect2KHR-None-08115
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdBindDescriptorSets, the bound VkPipeline must have been created without VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawIndirect2KHR-None-08116
  Descriptors in bound descriptor buffers, specified via vkCmdSetDescriptorBufferOffsetsEXT, must be valid if they are dynamically accessed

- VUID-vkCmdDrawIndirect2KHR-None-08117
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdSetDescriptorBufferOffsetsEXT, the bound VkPipeline must have been created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawIndirect2KHR-None-08119
  If a descriptor is dynamically used with a VkPipeline created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdDrawIndirect2KHR-None-08605
  If a descriptor is dynamically used with a VkShaderEXT created with a `VkDescriptorSetLayout` that was created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdDrawIndirect2KHR-None-08606
  If the `shaderObject` feature is not enabled, a valid pipeline must be bound to the pipeline bind point used by this command

- VUID-vkCmdDrawIndirect2KHR-None-08608
  If a pipeline is bound to the pipeline bind point used by this command, there must not have been any calls to dynamic state setting commands for any state specified statically in the VkPipeline object bound to the pipeline bind point used by this command, since that pipeline was bound

- VUID-vkCmdDrawIndirect2KHR-uniformBuffers-06935
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawIndirect2KHR-None-08612
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawIndirect2KHR-storageBuffers-06936
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawIndirect2KHR-None-08613
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a storage buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawIndirect2KHR-commandBuffer-02707
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, any resource accessed by bound shaders must not be a protected resource

- VUID-vkCmdDrawIndirect2KHR-viewType-07752
  If a VkImageView is accessed as a result of this command, then the image view’s `viewType` must match the `Dim` operand of the `OpTypeImage` as described in Compatibility Between SPIR-V Image Dimensions and Vulkan ImageView Types

- VUID-vkCmdDrawIndirect2KHR-format-07753
  If a VkImageView or VkBufferView is accessed as a result of this command, then the numeric type of the view’s `format` and the `Sampled` `Type` operand of the `OpTypeImage` must match

- VUID-vkCmdDrawIndirect2KHR-OpImageWrite-08795
  If a VkImageView created with a format other than VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the image view’s format

- VUID-vkCmdDrawIndirect2KHR-OpImageWrite-08796
  If a VkImageView created with the format VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have four components

- VUID-vkCmdDrawIndirect2KHR-OpImageWrite-04469
  If a VkBufferView is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the buffer view’s format

- VUID-vkCmdDrawIndirect2KHR-SampledType-04470
  If a VkImageView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdDrawIndirect2KHR-SampledType-04471
  If a VkImageView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdDrawIndirect2KHR-SampledType-04472
  If a VkBufferView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdDrawIndirect2KHR-SampledType-04473
  If a VkBufferView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdDrawIndirect2KHR-sparseImageInt64Atomics-04474
  If the `sparseImageInt64Atomics` feature is not enabled, VkImage objects created with the VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdDrawIndirect2KHR-sparseImageInt64Atomics-04475
  If the `sparseImageInt64Atomics` feature is not enabled, VkBuffer objects created with the VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdDrawIndirect2KHR-OpImageSampleWeightedQCOM-06971
  If `OpImageSampleWeightedQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_SAMPLED_IMAGE_BIT_QCOM

- VUID-vkCmdDrawIndirect2KHR-OpImageSampleWeightedQCOM-06972
  If `OpImageSampleWeightedQCOM` uses a VkImageView as a sample weight image as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_IMAGE_BIT_QCOM

- VUID-vkCmdDrawIndirect2KHR-OpImageBoxFilterQCOM-06973
  If `OpImageBoxFilterQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BOX_FILTER_SAMPLED_BIT_QCOM

- VUID-vkCmdDrawIndirect2KHR-OpImageBlockMatchSSDQCOM-06974
  If `OpImageBlockMatchSSDQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdDrawIndirect2KHR-OpImageBlockMatchSADQCOM-12420
  If `OpImageBlockMatchSADQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdDrawIndirect2KHR-OpImageBlockMatchSADQCOM-06976
  If `OpImageBlockMatchSADQCOM` or OpImageBlockMatchSSDQCOM is used to read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdDrawIndirect2KHR-OpImageSampleWeightedQCOM-06977
  If `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdDrawIndirect2KHR-OpImageSampleWeightedQCOM-06978
  If any command other than `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must not have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdDrawIndirect2KHR-OpImageBlockMatchWindow-09215
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM

- VUID-vkCmdDrawIndirect2KHR-OpImageBlockMatchWindow-09216
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format must be a single-component format

- VUID-vkCmdDrawIndirect2KHR-OpImageBlockMatchWindow-09217
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdDrawIndirect2KHR-OpImageBlockMatchWindow-12421
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the `blockMatchExtendedClampToEdge` feature is not enabled, the input sampler must not have been created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawIndirect2KHR-addressModeU-12422
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the input sampler was created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, then the sampler must have been created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawIndirect2KHR-None-07288
  Any shader invocation executed by this command must terminate

- VUID-vkCmdDrawIndirect2KHR-None-09600
  If a descriptor with type equal to any of VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, or VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT is accessed as a result of this command, all image subresources identified by that descriptor must be in the image layout identified when the descriptor was written

- VUID-vkCmdDrawIndirect2KHR-micromap-11636
  If an acceleration structure is accessed as a result of this command through an `OpRayQueryProceedKHR` operation , the `VK_EXT_opacity_micromap` extension is not enabled, and the acceleration structure is built using geometry with a VkAccelerationStructureTrianglesOpacityMicromapKHR structure included in its `pNext` chain, the shader must have specified a `OpacityMicromapIdKHR` execution mode with its specialization constant operand equal to VK_TRUE

- VUID-vkCmdDrawIndirect2KHR-micromap-11637
  If an acceleration structure is accessed as a result of this command and the acceleration structure was constructed through deserialization, all micromap arrays referenced by the acceleration structure that were not replaced by an acceleration structure update command must have been deserialized using the serialized data of the corresponding micromaps used to originally build the acceleration structure prior to the execution of this command on the device

- VUID-vkCmdDrawIndirect2KHR-micromap-11638
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkPipeline bound to the pipeline bind point used by this command must not have been created with `flags` that includes VK_PIPELINE_CREATE_2_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_KHR

- VUID-vkCmdDrawIndirect2KHR-micromap-11639
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkShaderEXT that accessed the descriptor must not have been created with `flags` that includes VK_SHADER_CREATE_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_EXT

- VUID-vkCmdDrawIndirect2KHR-commandBuffer-10746
  The `VkDeviceMemory` object allocated from a `VkMemoryHeap` with the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property that is bound to a resource accessed as a result of this command must be the active bound tile memory object in `commandBuffer`

- VUID-vkCmdDrawIndirect2KHR-None-10678
  If this command is recorded inside a tile shading render pass instance, the stages corresponding to the pipeline bind point used by this command must only include VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_FRAGMENT_BIT, and/or VK_SHADER_STAGE_COMPUTE_BIT

- VUID-vkCmdDrawIndirect2KHR-None-10679
  If this command is recorded where per-tile execution model is enabled, there must be no access to any image while the image was be transitioned to the VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT layout

- VUID-vkCmdDrawIndirect2KHR-pDescription-09900
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the underlying VkTensorARM object must have been created with the VK_TENSOR_USAGE_SHADER_BIT_ARM usage flag set

- VUID-vkCmdDrawIndirect2KHR-dimensionCount-09905
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the `Rank` of the `OpTypeTensorARM` of the tensor resource variable must be equal to the `dimensionCount` provided via VkTensorCreateInfoARM::`pDescription` when creating the underlying VkTensorARM object

- VUID-vkCmdDrawIndirect2KHR-OpTypeTensorARM-09906
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the element type of the `OpTypeTensorARM` of the tensor resource variable must be compatible with the VkFormat of the VkTensorViewARM used for the access

- VUID-vkCmdDrawIndirect2KHR-OpTensorReadARM-12462
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, using `OpTensorReadARM` or `OpTensorWriteARM`, and the underlying VkTensorARM object was created with a VK_TENSOR_TILING_BRICK_16_WIDE_ARM, VK_TENSOR_TILING_BRICK_8_WIDE_ARM, VK_TENSOR_TILING_BRICK_4_WIDE_ARM, VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_ARM, or VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_64K_ARM VkTensorTilingARM, and the object read or written is an array, then the innermost coordinate provided to `OpTensorReadARM` or `OpTensorWriteARM` via the `Coordinates` operand must be a multiple of the largest power of 2 that is less than or equal to the number of components of the array

- VUID-vkCmdDrawIndirect2KHR-pNext-12463
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command and the corresponding VkTensorARM object was created with a VkTensorRollingBackingCreateInfoARM structure in the `pNext` chain of VkTensorCreateInfoARM, then the number of elements accessed with one `OpTensorReadARM` or `OpTensorWriteARM`, must be less than or equal to the number of elements available from the starting coordinate in the rolling backing along the innermost dimension, defined as `wraps`[`dimensionCount` - 1] - InnermostCoordinate % `wraps`[`dimensionCount` - 1] where InnermostCoordinate is the last component of the coordinates array provided via the `Coordinates` operand

- VUID-vkCmdDrawIndirect2KHR-None-12472
  Descriptors dynamically accessed in bound descriptor heaps must be valid

- VUID-vkCmdDrawIndirect2KHR-None-11297
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a `OpTypeStruct` decorated with `Block` or `BufferBlock` using that mapping, the calculated offset for the resource heap must be a multiple of `bufferDescriptorAlignment`

- VUID-vkCmdDrawIndirect2KHR-None-11298
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeImage` or `OpTypeSampledImage` using that mapping, the calculated offset for the resource heap must be a multiple of `imageDescriptorAlignment`

- VUID-vkCmdDrawIndirect2KHR-None-11299
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeSampler` or `OpTypeSampledImage` using that mapping, the calculated offset for the sampler heap must be a multiple of `samplerDescriptorAlignment`

- VUID-vkCmdDrawIndirect2KHR-None-11397
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeTensorARM` using that mapping, the calculated offset for the resource heap must be a multiple of `tensorDescriptorAlignment`

- VUID-vkCmdDrawIndirect2KHR-None-11300
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 4

- VUID-vkCmdDrawIndirect2KHR-None-11301
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdDrawIndirect2KHR-None-11302
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress

- VUID-vkCmdDrawIndirect2KHR-None-11304
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 8

- VUID-vkCmdDrawIndirect2KHR-None-11305
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdDrawIndirect2KHR-None-11306
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address pointed to by the address in push data must be a valid VkDeviceAddress

- VUID-vkCmdDrawIndirect2KHR-None-11308
  For each descriptor heap that is statically used by a bound shader, either directly or via a descriptor mapping, a valid descriptor heap must be bound

- VUID-vkCmdDrawIndirect2KHR-None-11309
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, execution of this command must not result in any descriptor read accessing data outside of the user range of the respective heap bound by `vkCmdBind*HeapEXT` commands

- VUID-vkCmdDrawIndirect2KHR-None-11372
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer or uniform texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified via VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawIndirect2KHR-None-11373
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer or storage texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawIndirect2KHR-None-11374
  If the `robustBufferAccess2` feature is not enabled, the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, uniform texel buffer, storage buffer, or storage texel buffer, that shader must not access values outside of the range of the buffer as specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawIndirect2KHR-pBindInfo-11375
  If any bound shader uses an embedded sampler via a descriptor mapping, the value of `pBindInfo->reservedRangeSize` set for vkCmdBindSamplerHeapEXT must be greater than or equal to `minSamplerHeapReservedRangeWithEmbedded`

- VUID-vkCmdDrawIndirect2KHR-None-11376
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, and that shader statically uses a push constant value, that value must have been set by vkCmdPushDataEXT

- VUID-vkCmdDrawIndirect2KHR-None-11398
  If a bound shader was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the access must not be out of bounds

- VUID-vkCmdDrawIndirect2KHR-None-11437
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the buffer from which the address in push data was queried must have been created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdDrawIndirect2KHR-None-11438
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdDrawIndirect2KHR-None-11441
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must be aligned to `minUniformBufferOffsetAlignment`

- VUID-vkCmdDrawIndirect2KHR-None-11439
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_STORAGE_BUFFER_BIT usage flag set

- VUID-vkCmdDrawIndirect2KHR-None-11442
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must be aligned to `minStorageBufferOffsetAlignment`

- VUID-vkCmdDrawIndirect2KHR-None-11485
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses an acceleration structure using that mapping, the address that the acceleration structure is mapped to must be an acceleration structure address retrieved from a VkAccelerationStructureKHR object via vkGetAccelerationStructureDeviceAddressKHR or handle retrieved from a VkAccelerationStructureNV object via vkGetAccelerationStructureHandleNV

- VUID-vkCmdDrawIndirect2KHR-index-11450
  If a shader uses a sampler descriptor to sample an image as a result of this command, and that sampler descriptor uses a custom border color with an index defined by VkSamplerCustomBorderColorIndexCreateInfoEXT, the value of VkSamplerCustomBorderColorIndexCreateInfoEXT::`index` must have been registered before this command was recorded, and still be registered during the sampling operation, with an identically defined color

- VUID-vkCmdDrawIndirect2KHR-protectedNoFault-11455
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, the address that the resource is mapped to must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdDrawIndirect2KHR-protectedNoFault-11456
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, the address of the indirect memory must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdDrawIndirect2KHR-renderPass-02684
  The current render pass must be compatible with the `renderPass` member of the `VkGraphicsPipelineCreateInfo` structure specified when creating the `VkPipeline` bound to VK_PIPELINE_BIND_POINT_GRAPHICS

- VUID-vkCmdDrawIndirect2KHR-subpass-02685
  The subpass index of the current render pass must be equal to the `subpass` member of the `VkGraphicsPipelineCreateInfo` structure specified when creating the `VkPipeline` bound to VK_PIPELINE_BIND_POINT_GRAPHICS

- VUID-vkCmdDrawIndirect2KHR-OpTypeImage-07468
  If any shader executed by this pipeline accesses an `OpTypeImage` variable with a `Dim` operand of `SubpassData`, it must be decorated with an `InputAttachmentIndex` that corresponds to a valid input attachment in the current subpass

- VUID-vkCmdDrawIndirect2KHR-None-07469
  Input attachment views accessed in a subpass must be created with the same VkFormat as the corresponding subpass definition, and be created with a VkImageView that is compatible with the attachment referenced by the subpass' `pInputAttachments`[`InputAttachmentIndex`] in the bound VkFramebuffer as specified by Fragment Input Attachment Compatibility

- VUID-vkCmdDrawIndirect2KHR-pDepthInputAttachmentIndex-09595
  Input attachment views accessed in a dynamic render pass with a `InputAttachmentIndex` referenced by VkRenderingInputAttachmentIndexInfo, or no `InputAttachmentIndex` if VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` or VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` are `NULL`, must be created with a VkImageView that is compatible with the corresponding color, depth, or stencil attachment in VkRenderingInfo

- VUID-vkCmdDrawIndirect2KHR-pDepthInputAttachmentIndex-09596
  Input attachment views accessed in a dynamic render pass via a shader object must have an `InputAttachmentIndex` if both VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` and VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` are non-`NULL`

- VUID-vkCmdDrawIndirect2KHR-InputAttachmentIndex-09597
  If an input attachment view accessed in a dynamic render pass via a shader object has an `InputAttachmentIndex`, the `InputAttachmentIndex` must match an index in VkRenderingInputAttachmentIndexInfo

- VUID-vkCmdDrawIndirect2KHR-None-06537
  Memory backing image subresources used as attachments in the current render pass must not be written in any way other than as an attachment by this command

- VUID-vkCmdDrawIndirect2KHR-None-10795
  If a color attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_COLOR_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawIndirect2KHR-None-10796
  If a depth attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_DEPTH_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawIndirect2KHR-None-10797
  If a stencil attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_STENCIL_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawIndirect2KHR-None-12338
  If a color attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_COLOR_BIT on that attachment, the color attachment must not be written to by this command

- VUID-vkCmdDrawIndirect2KHR-None-12339
  If a depth attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_DEPTH_BIT on that attachment, the depth attachment must not be written to by this command

- VUID-vkCmdDrawIndirect2KHR-None-12340
  If a stencil attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_STENCIL_BIT on that attachment, the stencil attachment must not be written to by this command

- VUID-vkCmdDrawIndirect2KHR-None-09003
  If an attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, it must not be accessed in any way other than as an attachment, storage image, or sampled image by this command

- VUID-vkCmdDrawIndirect2KHR-None-06886
  If the current render pass instance uses a depth/stencil attachment with a read-only layout for the depth aspect, depth writes must be disabled

- VUID-vkCmdDrawIndirect2KHR-None-06887
  If the current render pass instance uses a depth/stencil attachment with a read-only layout for the stencil aspect, both front and back `writeMask` are not zero, and stencil test is enabled, all stencil ops must be VK_STENCIL_OP_KEEP

- VUID-vkCmdDrawIndirect2KHR-None-07831
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT dynamic state enabled then vkCmdSetViewport must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-None-07832
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SCISSOR dynamic state enabled then vkCmdSetScissor must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-None-08617
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_WIDTH dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineWidth must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-None-07834
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BIAS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthBiasEnable` is VK_TRUE, then vkCmdSetDepthBias or vkCmdSetDepthBias2EXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-None-07835
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_BLEND_CONSTANTS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and an active color attachment current value of `blendEnable` is VK_TRUE with a blend equations where any VkBlendFactor member is VK_BLEND_FACTOR_CONSTANT_COLOR, VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR, VK_BLEND_FACTOR_CONSTANT_ALPHA, or VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA, then vkCmdSetBlendConstants must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-None-07836
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BOUNDS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthBoundsTestEnable` is VK_TRUE, then vkCmdSetDepthBounds must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-None-07837
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilCompareMask must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-None-07838
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_WRITE_MASK dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilWriteMask must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-None-07839
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_REFERENCE dynamic state enabled, the current value of and `rasterizerDiscardEnable` is VK_FALSE, the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilReference must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-maxMultiviewInstanceIndex-02688
  If the draw is recorded in a render pass instance with multiview enabled, the maximum instance index must be less than or equal to VkPhysicalDeviceMultiviewProperties::`maxMultiviewInstanceIndex`

- VUID-vkCmdDrawIndirect2KHR-sampleLocationsEnable-02689
  If the bound graphics pipeline was created with VkPipelineSampleLocationsStateCreateInfoEXT::`sampleLocationsEnable` set to VK_TRUE, then the active depth attachment must have been created with the VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit set

- VUID-vkCmdDrawIndirect2KHR-None-07634
  If the `VK_EXT_sample_locations` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetSampleLocationsEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-None-06666
  If the `VK_EXT_sample_locations` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `sampleLocationsEnable` is VK_TRUE, then vkCmdSetSampleLocationsEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-None-07840
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_CULL_MODE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCullMode must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-None-07841
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRONT_FACE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetFrontFace must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-None-07843
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, vkCmdSetDepthTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-None-07844
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthTestEnable` is VK_TRUE, then vkCmdSetDepthWriteEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-None-07845
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_COMPARE_OP dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthTestEnable` is VK_TRUE, then vkCmdSetDepthCompareOp must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-None-07846
  If the `depthBounds` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthBoundsTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-None-07847
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetStencilTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-None-07848
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_OP dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilOp must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-viewportCount-03417
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, and the state is not inherited, then vkCmdSetViewportWithCount must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-scissorCount-03418
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT dynamic state enabled, and the state is not inherited, then vkCmdSetScissorWithCount must have been called and not subsequently invalidated in the current command buffer prior to this drawing

- VUID-vkCmdDrawIndirect2KHR-viewportCount-03419
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with both the VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic states enabled, and the state is not inherited, then the `viewportCount` parameter of `vkCmdSetViewportWithCount` must match the `scissorCount` parameter of `vkCmdSetScissorWithCount`

- VUID-vkCmdDrawIndirect2KHR-viewportCount-04137
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportWScalingStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndirect2KHR-viewportCount-04138
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, the current value of `viewportWScalingEnable` is VK_TRUE, then vkCmdSetViewportWScalingNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-None-08636
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, the current value of `viewportWScalingEnable` is VK_TRUE, then the `viewportCount` parameter in the last call to vkCmdSetViewportWScalingNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndirect2KHR-viewportCount-04139
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportShadingRateImageStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndirect2KHR-shadingRateImage-09233
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_COARSE_SAMPLE_ORDER_NV and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoarseSampleOrderNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-shadingRateImage-09234
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `shadingRateImageEnable` is VK_TRUE, then vkCmdSetViewportShadingRatePaletteNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-None-08637
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `shadingRateImageEnable` is VK_TRUE, then the `viewportCount` parameter in the last call to vkCmdSetViewportShadingRatePaletteNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndirect2KHR-VkPipelineVieportCreateInfo-04141
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled and a VkPipelineViewportSwizzleStateCreateInfoNV structure chained from VkPipelineViewportStateCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportSwizzleStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndirect2KHR-VkPipelineVieportCreateInfo-04142
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled and a VkPipelineViewportExclusiveScissorStateCreateInfoNV structure chained from VkPipelineViewportStateCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportExclusiveScissorStateCreateInfoNV::`exclusiveScissorCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndirect2KHR-None-07878
  If the `exclusiveScissor` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_ENABLE_NV dynamic state enabled, then vkCmdSetExclusiveScissorEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-None-07879
  If the `exclusiveScissor` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_NV dynamic state enabled, and the most recent call to vkCmdSetExclusiveScissorEnableNV in the current command buffer set any element of `pExclusiveScissorEnables` to VK_TRUE, then vkCmdSetExclusiveScissorNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-None-04876
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE dynamic state enabled, then vkCmdSetRasterizerDiscardEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-None-04877
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthBiasEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-logicOp-04878
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LOGIC_OP_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `logicOpEnable` is VK_TRUE, then vkCmdSetLogicOpEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-primitiveFragmentShadingRateWithMultipleViewports-04552
  If the `primitiveFragmentShadingRateWithMultipleViewports` limit is not supported, the bound graphics pipeline was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, and any of the shader stages of the bound graphics pipeline write to the `PrimitiveShadingRateKHR` built-in, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and the `viewportCount` parameter of `vkCmdSetViewportWithCount` must be `1`

- VUID-vkCmdDrawIndirect2KHR-primitiveFragmentShadingRateWithMultipleViewports-08642
  If the `primitiveFragmentShadingRateWithMultipleViewports` limit is not supported, and any shader object bound to a graphics stage writes to the `PrimitiveShadingRateKHR` built-in, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and the `viewportCount` parameter of `vkCmdSetViewportWithCount` must be `1`

- VUID-vkCmdDrawIndirect2KHR-blendEnable-04727
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, then for each color attachment, if the corresponding image view’s format features do not contain VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT, then the corresponding current value of `blendEnable` must be VK_FALSE

- VUID-vkCmdDrawIndirect2KHR-None-08644
  If a shader object is bound to any graphics stage or a graphics pipeline is bound, the current value of `rasterizerDiscardEnable` is VK_FALSE, and none of the following is enabled:

  - the `VK_AMD_mixed_attachment_samples` extension

  - the `VK_NV_framebuffer_mixed_samples` extension

  - the `multisampledRenderToSingleSampled` feature

  then the current value of `rasterizationSamples` must be the same as the current color and/or depth/stencil attachments

- VUID-vkCmdDrawIndirect2KHR-None-08876
  If a shader object is bound to any graphics stage, the current render pass instance must have been begun with vkCmdBeginRendering

- VUID-vkCmdDrawIndirect2KHR-imageView-06172
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawIndirect2KHR-imageView-06173
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawIndirect2KHR-imageView-06174
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawIndirect2KHR-imageView-06175
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawIndirect2KHR-imageView-06176
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawIndirect2KHR-imageView-06177
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawIndirect2KHR-viewMask-06178
  If the current render pass instance was begun with vkCmdBeginRendering, the bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::`viewMask` equal to VkRenderingInfo::`viewMask`

- VUID-vkCmdDrawIndirect2KHR-colorAttachmentCount-06179
  If the `dynamicRenderingUnusedAttachments` feature is not enabled and the current render pass instance was begun with vkCmdBeginRendering, the bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::`colorAttachmentCount` equal to VkRenderingInfo::`colorAttachmentCount`

- VUID-vkCmdDrawIndirect2KHR-dynamicRenderingUnusedAttachments-08910
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound graphics pipeline

- VUID-vkCmdDrawIndirect2KHR-dynamicRenderingUnusedAttachments-08912
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` equal to VK_NULL_HANDLE must have the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound pipeline equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirect2KHR-dynamicRenderingUnusedAttachments-08911
  If the `dynamicRenderingUnusedAttachments` feature is enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound graphics pipeline, or the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats`, if it exists, must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirect2KHR-colorAttachmentCount-09362
  If the current render pass instance was begun with vkCmdBeginRendering, with a VkRenderingInfo::`colorAttachmentCount` equal to `1`, there is no shader object bound to any graphics stage, and a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, each element of the VkRenderingInfo::`pColorAttachments` array with a `resolveImageView` not equal to VK_NULL_HANDLE must have been created with an image created with a VkExternalFormatANDROID::`externalFormat` value equal to the VkExternalFormatANDROID::`externalFormat` value used to create the bound graphics pipeline

- VUID-vkCmdDrawIndirect2KHR-None-09363
  If there is no shader object bound to any graphics stage, the current render pass instance was begun with vkCmdBeginRendering and a VkRenderingInfo::`colorAttachmentCount` equal to `1`, and a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with an image created with a VkExternalFormatANDROID::`externalFormat` value equal to the VkExternalFormatANDROID::`externalFormat` value used to create the bound graphics pipeline

- VUID-vkCmdDrawIndirect2KHR-None-09364
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetColorBlendEnableEXT must have set the blend enable to VK_FALSE prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-None-09365
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetRasterizationSamplesEXT must have set `rasterizationSamples` to VK_SAMPLE_COUNT_1_BIT prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-None-09368
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetFragmentShadingRateKHR must have set `pFragmentSize->width` to `1` prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-None-09369
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetFragmentShadingRateKHR must have set `pFragmentSize->height` to `1` prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-None-07749
  If the `colorWriteEnable` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorWriteEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-attachmentCount-07750
  If the `colorWriteEnable` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the `attachmentCount` parameter of most recent call to `vkCmdSetColorWriteEnableEXT` in the current command buffer must be greater than or equal to the number of active color attachments

- VUID-vkCmdDrawIndirect2KHR-None-07751
  If the `VK_EXT_discard_rectangles` extension is enabled, a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT dynamic state enabled and the `pNext` chain of VkGraphicsPipelineCreateInfo included a VkPipelineDiscardRectangleStateCreateInfoEXT structure, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for each discard rectangle in VkPipelineDiscardRectangleStateCreateInfoEXT::`discardRectangleCount`

- VUID-vkCmdDrawIndirect2KHR-rasterizerDiscardEnable-09236
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT dynamic state enabled and the `pNext` chain of VkGraphicsPipelineCreateInfo did not include a VkPipelineDiscardRectangleStateCreateInfoEXT structure, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for each discard rectangle in VkPhysicalDeviceDiscardRectanglePropertiesEXT::`maxDiscardRectangles`

- VUID-vkCmdDrawIndirect2KHR-None-07880
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDiscardRectangleEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-None-07881
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_MODE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-dynamicRenderingUnusedAttachments-08913
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->imageView` was VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirect2KHR-dynamicRenderingUnusedAttachments-08914
  If current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawIndirect2KHR-dynamicRenderingUnusedAttachments-08915
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, and the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->imageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirect2KHR-dynamicRenderingUnusedAttachments-08916
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->imageView` was VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirect2KHR-dynamicRenderingUnusedAttachments-08917
  If current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawIndirect2KHR-dynamicRenderingUnusedAttachments-08918
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, and the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->imageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirect2KHR-imageView-06183
  If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentShadingRateAttachmentInfoKHR::`imageView` was not VK_NULL_HANDLE, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

- VUID-vkCmdDrawIndirect2KHR-dynamicRenderingLocalRead-11797
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingLocalRead` feature is enabled, the VK_RENDERING_LOCAL_READ_CONCURRENT_ACCESS_CONTROL_BIT_KHR flag is specified, and an attachment is being used as a feedback loop as specified by VK_RENDERING_ATTACHMENT_INPUT_ATTACHMENT_FEEDBACK_BIT_KHR, VkRenderingAttachmentFlagsInfoKHR::`flags` for that attachment must include VK_RENDERING_ATTACHMENT_INPUT_ATTACHMENT_FEEDBACK_BIT_KHR

- VUID-vkCmdDrawIndirect2KHR-imageView-06184
  If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentDensityMapAttachmentInfoEXT::`imageView` was not VK_NULL_HANDLE, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT

- VUID-vkCmdDrawIndirect2KHR-layers-10831
  If the current render pass instance was created with VK_RENDERING_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE or VK_RENDER_PASS_CREATE_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE, and the bound graphics pipeline was created with VK_PIPELINE_CREATE_2_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE, then the current render pass instance must have a `layers` value less than or equal to VkPipelineFragmentDensityMapLayeredCreateInfoVALVE::`maxFragmentDensityMapLayers`

- VUID-vkCmdDrawIndirect2KHR-colorAttachmentCount-06185
  If the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with a sample count equal to the corresponding element of the `pColorAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline

- VUID-vkCmdDrawIndirect2KHR-pDepthAttachment-06186
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of the `depthStencilAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawIndirect2KHR-pStencilAttachment-06187
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of the `depthStencilAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawIndirect2KHR-multisampledRenderToSingleSampled-07285
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with a sample count equal to the value of `rasterizationSamples` for the bound graphics pipeline

- VUID-vkCmdDrawIndirect2KHR-multisampledRenderToSingleSampled-07286
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawIndirect2KHR-multisampledRenderToSingleSampled-07287
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawIndirect2KHR-pNext-07935
  If this command is called inside a render pass instance started with vkCmdBeginRendering, and the `pNext` chain of VkRenderingInfo includes a VkMultisampledRenderToSingleSampledInfoEXT structure with `multisampledRenderToSingleSampledEnable` equal to VK_TRUE, then the value of `rasterizationSamples` for the bound graphics pipeline must be equal to VkMultisampledRenderToSingleSampledInfoEXT::`rasterizationSamples`

- VUID-vkCmdDrawIndirect2KHR-renderPass-06198
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline must have been created with a VkGraphicsPipelineCreateInfo::`renderPass` equal to VK_NULL_HANDLE

- VUID-vkCmdDrawIndirect2KHR-pColorAttachments-08963
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound with a fragment shader that statically writes to a color attachment, the color write mask is not zero, color writes are enabled, and the corresponding element of the VkRenderingInfo::`pColorAttachments->imageView` was not VK_NULL_HANDLE, then the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirect2KHR-pColorAttachments-11539
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound with a fragment shader that statically writes to a color attachment, the color write mask is not zero, color writes are enabled, and the corresponding element of the VkRenderingInfo::`pColorAttachments->resolveImageView` was not VK_NULL_HANDLE, then the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirect2KHR-pDepthAttachment-08964
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound, depth test is enabled, and the VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, then the VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirect2KHR-pDepthAttachment-11540
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound, depth test is enabled, and the VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, then the VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirect2KHR-pStencilAttachment-08965
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound, stencil test is enabled and the VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, then the VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirect2KHR-pStencilAttachment-11860
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound, stencil test is enabled and the VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, then the VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirect2KHR-flags-10582
  If the current render pass instance was begun with a vkCmdBeginRendering call in `commandBuffer`, its VkRenderingInfo::`flags` parameter must not have VK_RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT set unless VK_RENDERING_CONTENTS_INLINE_BIT_KHR is also set

- VUID-vkCmdDrawIndirect2KHR-primitivesGeneratedQueryWithRasterizerDiscard-06708
  If the `primitivesGeneratedQueryWithRasterizerDiscard` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, rasterization discard must not be enabled

- VUID-vkCmdDrawIndirect2KHR-primitivesGeneratedQueryWithNonZeroStreams-06709
  If the `primitivesGeneratedQueryWithNonZeroStreams` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, the bound graphics pipeline must not have been created with a non-zero value in `VkPipelineRasterizationStateStreamCreateInfoEXT`::`rasterizationStream`

- VUID-vkCmdDrawIndirect2KHR-None-07620
  If the `depthClamp` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLAMP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthClampEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-None-07621
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_POLYGON_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetPolygonModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-None-07622
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetRasterizationSamplesEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-None-07623
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetSampleMaskEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-alphaToCoverageEnable-08919
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT dynamic state enabled, and `alphaToCoverageEnable` was VK_TRUE in the last call to vkCmdSetAlphaToCoverageEnableEXT, then the Fragment Output Interface must contain a variable for the alpha `Component` word in `Location` 0 at `Index` 0

- VUID-vkCmdDrawIndirect2KHR-alphaToCoverageEnable-08920
  If a shader object is bound to any graphics stage, and the most recent call to vkCmdSetAlphaToCoverageEnableEXT in the current command buffer set `alphaToCoverageEnable` to VK_TRUE, then the Fragment Output Interface must contain a variable for the alpha `Component` word in `Location` 0 at `Index` 0

- VUID-vkCmdDrawIndirect2KHR-None-07624
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAlphaToCoverageEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-None-07625
  If the `alphaToOne` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ALPHA_TO_ONE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAlphaToOneEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-None-07626
  If the `logicOp` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LOGIC_OP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetLogicOpEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-None-07627
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and there are color attachments bound, then vkCmdSetColorBlendEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-None-07629
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and there are color attachments bound, then vkCmdSetColorWriteMaskEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-None-07630
  If the `geometryStreams` feature is enabled, and a shader object is bound to the VK_SHADER_STAGE_GEOMETRY_BIT stage or a graphics pipeline is bound which was created with both a VK_SHADER_STAGE_GEOMETRY_BIT stage and the VK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXT dynamic state enabled, then vkCmdSetRasterizationStreamEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-None-07631
  If the `VK_EXT_conservative_rasterization` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_CONSERVATIVE_RASTERIZATION_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetConservativeRasterizationModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-None-07632
  If the `VK_EXT_conservative_rasterization` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXTRA_PRIMITIVE_OVERESTIMATION_SIZE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `conservativeRasterizationMode` is VK_CONSERVATIVE_RASTERIZATION_MODE_OVERESTIMATE_EXT, then vkCmdSetExtraPrimitiveOverestimationSizeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-conservativePointAndLineRasterization-07499
  If the `VK_EXT_conservative_rasterization` extension is enabled, `conservativePointAndLineRasterization` is not supported, a shader object is bound to any graphics stage or a graphics pipeline is bound, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line or point topology class, then the current value of `conservativeRasterizationMode` must be VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT

- VUID-vkCmdDrawIndirect2KHR-None-07633
  If the `depthClipEnable` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLIP_ENABLE_EXT dynamic state, then vkCmdSetDepthClipEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-None-07636
  If the `VK_EXT_provoking_vertex` extension is enabled, a shader object is bound to the VK_SHADER_STAGE_VERTEX_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_PROVOKING_VERTEX_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetProvokingVertexModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-None-08666
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineRasterizationModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-None-08669
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineStippleEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-None-07849
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled and a shader object is bound to any graphics stage, or a bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stippledLineEnable` is VK_TRUE, then vkCmdSetLineStipple must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-None-10608
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic state enabled, the effective rasterization input topology is in the line topology class, and the current `lineRasterizationMode` is VK_LINE_RASTERIZATION_MODE_BRESENHAM or VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH, then the current `alphaToCoverageEnable`, `alphaToOneEnable` and `sampleShadingEnable` states must all be VK_FALSE

- VUID-vkCmdDrawIndirect2KHR-None-07639
  If the `depthClipControl` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLIP_NEGATIVE_ONE_TO_ONE_EXT dynamic state enabled, then vkCmdSetDepthClipNegativeOneToOneEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-None-09650
  If the `depthClampControl` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLAMP_RANGE_EXT dynamic state enabled, and the current value of `depthClampEnable` is VK_TRUE, then vkCmdSetDepthClampRangeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-None-07640
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_ENABLE_NV dynamic state enabled, then vkCmdSetViewportWScalingEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-None-07641
  If the `VK_NV_viewport_swizzle` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic state enabled, then vkCmdSetViewportSwizzleNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-None-07642
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageToColorEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-None-07643
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_LOCATION_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageToColorEnable` is VK_TRUE, then vkCmdSetCoverageToColorLocationNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-None-07644
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_MODE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageModulationModeNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-None-07645
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageModulationMode` is any value other than VK_COVERAGE_MODULATION_MODE_NONE_NV, then vkCmdSetCoverageModulationTableEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-None-07646
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageModulationTableEnable` is VK_TRUE, then vkCmdSetCoverageModulationTableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-None-07647
  If the `shadingRateImage` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SHADING_RATE_IMAGE_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetShadingRateImageEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-pipelineFragmentShadingRate-09238
  If the `pipelineFragmentShadingRate` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetFragmentShadingRateKHR must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-None-07648
  If the `representativeFragmentTest` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_REPRESENTATIVE_FRAGMENT_TEST_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetRepresentativeFragmentTestEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-None-07649
  If the `coverageReductionMode` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageReductionModeNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-rasterizationSamples-07471
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current subpass does not use any color and/or depth/stencil attachments, then the `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT must follow the rules for a zero-attachment subpass

- VUID-vkCmdDrawIndirect2KHR-samples-07472
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state disabled, then the `samples` parameter in the last call to vkCmdSetSampleMaskEXT must be greater or equal to the VkPipelineMultisampleStateCreateInfo::`rasterizationSamples` parameter used to create the bound graphics pipeline

- VUID-vkCmdDrawIndirect2KHR-samples-07473
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT state and VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT states enabled, then the `samples` parameter in the last call to vkCmdSetSampleMaskEXT must be greater or equal to the `rasterizationSamples` parameter in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawIndirect2KHR-None-09211
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, or a shader object is bound to any graphics stage, and the current render pass instance includes a VkMultisampledRenderToSingleSampledInfoEXT structure with `multisampledRenderToSingleSampledEnable` equal to VK_TRUE, then the `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT must be the same as the `rasterizationSamples` member of that structure

- VUID-vkCmdDrawIndirect2KHR-firstAttachment-07476
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic states enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the last call to vkCmdSetColorBlendEnableEXT in the current command buffer prior to this drawing command must have set a value for all active color attachments

- VUID-vkCmdDrawIndirect2KHR-firstAttachment-07478
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT dynamic states enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the last call to vkCmdSetColorWriteMaskEXT in the current command buffer prior to this drawing command must have set a value for all active color attachments

- VUID-vkCmdDrawIndirect2KHR-advancedBlendMaxColorAttachments-07480
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT and VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic states enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and an active color attachment current value of `blendEnable` is VK_TRUE, then the number of active color attachments must not exceed `advancedBlendMaxColorAttachments`

- VUID-vkCmdDrawIndirect2KHR-None-10862
  If a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT , but not the VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorBlendEquationEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawIndirect2KHR-rasterizerDiscardEnable-10863
  If a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT, but not the VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorBlendAdvancedEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawIndirect2KHR-None-10864
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT and VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then either vkCmdSetColorBlendAdvancedEXT or vkCmdSetColorBlendEquationEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawIndirect2KHR-primitivesGeneratedQueryWithNonZeroStreams-07481
  If the `primitivesGeneratedQueryWithNonZeroStreams` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, and the bound graphics pipeline was created with VK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXT state enabled, the last call to vkCmdSetRasterizationStreamEXT must have set the `rasterizationStream` to zero

- VUID-vkCmdDrawIndirect2KHR-sampleLocationsPerPixel-07482
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state disabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then the `sampleLocationsPerPixel` member of `pSampleLocationsInfo` in the last call to vkCmdSetSampleLocationsEXT must equal the `rasterizationSamples` member of the VkPipelineMultisampleStateCreateInfo structure the bound graphics pipeline has been created with

- VUID-vkCmdDrawIndirect2KHR-sampleLocationsPerPixel-07483
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then the `sampleLocationsPerPixel` member of `pSampleLocationsInfo` in the last call to vkCmdSetSampleLocationsEXT must equal the `rasterizationSamples` parameter of the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawIndirect2KHR-sampleLocationsEnable-07484
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT then the current active depth attachment must have been created with the VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit set

- VUID-vkCmdDrawIndirect2KHR-sampleLocationsEnable-07485
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, then the `sampleLocationsInfo.maxSampleLocationGridSize.width` in the last call to vkCmdSetSampleLocationsEXT must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.width` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling `rasterizationSamples`

- VUID-vkCmdDrawIndirect2KHR-sampleLocationsEnable-07486
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, then the `sampleLocationsInfo.maxSampleLocationGridSize.height` in the last call to vkCmdSetSampleLocationsEXT must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.height` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling `rasterizationSamples`

- VUID-vkCmdDrawIndirect2KHR-sampleLocationsEnable-07487
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, the fragment shader code must not statically use the extended instruction `InterpolateAtSample`

- VUID-vkCmdDrawIndirect2KHR-sampleLocationsEnable-07936
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationGridSize.width` must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.width` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling the value of `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawIndirect2KHR-sampleLocationsEnable-07937
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationGridSize.height` must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.height` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling the value of `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawIndirect2KHR-sampleLocationsEnable-07938
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationsPerPixel` must equal `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawIndirect2KHR-coverageModulationTableEnable-07488
  If a shader object is bound to any graphics stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NV state enabled, and the last call to vkCmdSetCoverageModulationTableEnableNV set `coverageModulationTableEnable` to VK_TRUE, then the `coverageModulationTableCount` parameter in the last call to vkCmdSetCoverageModulationTableNV must equal the current `rasterizationSamples` divided by the number of color samples in the current active color attachment

- VUID-vkCmdDrawIndirect2KHR-rasterizationSamples-07489
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, and if current subpass has a depth/stencil attachment and depth test, stencil test, or depth bounds test are enabled in the bound pipeline, then the current `rasterizationSamples` must be the same as the sample count of the depth/stencil attachment

- VUID-vkCmdDrawIndirect2KHR-coverageToColorEnable-07490
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV state enabled and the last call to vkCmdSetCoverageToColorEnableNV set the `coverageToColorEnable` to VK_TRUE, then there must be an active color attachment at the location selected by the last call to vkCmdSetCoverageToColorLocationNV `coverageToColorLocation`, with a VkFormat of VK_FORMAT_R8_UINT, VK_FORMAT_R8_SINT, VK_FORMAT_R16_UINT, VK_FORMAT_R16_SINT, VK_FORMAT_R32_UINT, or VK_FORMAT_R32_SINT

- VUID-vkCmdDrawIndirect2KHR-rasterizerDiscardEnable-09420
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, and a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, and the most recent call to vkCmdSetRasterizerDiscardEnable in the current command buffer set `rasterizerDiscardEnable` to VK_FALSE, and the last call to vkCmdSetCoverageToColorEnableNV set the `coverageToColorEnable` to VK_TRUE, then there must be an active color attachment at the location selected by the last call to vkCmdSetCoverageToColorLocationNV `coverageToColorLocation`, with a VkFormat of VK_FORMAT_R8_UINT, VK_FORMAT_R8_SINT, VK_FORMAT_R16_UINT, VK_FORMAT_R16_SINT, VK_FORMAT_R32_UINT, or VK_FORMAT_R32_SINT

- VUID-vkCmdDrawIndirect2KHR-coverageReductionMode-07491
  If the `coverageReductionMode` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV or VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic states enabled, then the current values of `coverageReductionMode`, `rasterizationSamples`, the sample counts for the color and depth/stencil attachments (if the subpass has them) must be a valid combination returned by vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV

- VUID-vkCmdDrawIndirect2KHR-viewportCount-07492
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportSwizzleStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndirect2KHR-viewportCount-07493
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic states enabled then the `viewportCount` parameter in the last call to vkCmdSetViewportSwizzleNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndirect2KHR-viewportCount-09421
  If the `VK_NV_viewport_swizzle` extension is enabled, and a shader object is bound to any graphics stage, then the `viewportCount` parameter in the last call to vkCmdSetViewportSwizzleNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndirect2KHR-rasterizationSamples-07494
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, and the `coverageReductionMode` feature is not enabled, or the current value of `coverageReductionMode` is not VK_COVERAGE_REDUCTION_MODE_TRUNCATE_NV, and the current value of `rasterizationSamples` is greater than sample count of the color attachment, then sample shading must be disabled

- VUID-vkCmdDrawIndirect2KHR-stippledLineEnable-07495
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_RECTANGULAR, then the `stippledRectangularLines` feature must be enabled

- VUID-vkCmdDrawIndirect2KHR-stippledLineEnable-07496
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_BRESENHAM, then the `stippledBresenhamLines` feature must be enabled

- VUID-vkCmdDrawIndirect2KHR-stippledLineEnable-07497
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH, then the `stippledSmoothLines` feature must be enabled

- VUID-vkCmdDrawIndirect2KHR-stippledLineEnable-07498
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_DEFAULT, then the `stippledRectangularLines` feature must be enabled and VkPhysicalDeviceLimits::`strictLines` must be VK_TRUE

- VUID-vkCmdDrawIndirect2KHR-stage-07073
  If the bound pipeline was created with the VkPipelineShaderStageCreateInfo::`stage` member of an element of VkGraphicsPipelineCreateInfo::`pStages` set to VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT, then Mesh Shader Queries must not be active

- VUID-vkCmdDrawIndirect2KHR-None-08877
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ATTACHMENT_FEEDBACK_LOOP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAttachmentFeedbackLoopEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-None-07850
  If dynamic state was inherited from VkCommandBufferInheritanceViewportScissorInfoNV, it must be set in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-nextStage-10745
  For each shader object bound to a graphics stage, except for shader object bound to the last graphics stage in the logical pipeline, it must have been created with a `nextStage` including the corresponding bit to the shader object bound to the following graphics stage in the logical pipeline

- VUID-vkCmdDrawIndirect2KHR-None-08684
  If there is no bound graphics pipeline, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_VERTEX_BIT

- VUID-vkCmdDrawIndirect2KHR-None-08685
  If there is no bound graphics pipeline, and the `tessellationShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT

- VUID-vkCmdDrawIndirect2KHR-None-08686
  If there is no bound graphics pipeline, and the `tessellationShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT

- VUID-vkCmdDrawIndirect2KHR-None-08687
  If there is no bound graphics pipeline, and the `geometryShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_GEOMETRY_BIT

- VUID-vkCmdDrawIndirect2KHR-None-08688
  If there is no bound graphics pipeline, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_FRAGMENT_BIT

- VUID-vkCmdDrawIndirect2KHR-None-08689
  If there is no bound graphics pipeline, and the `taskShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TASK_BIT_EXT

- VUID-vkCmdDrawIndirect2KHR-None-08690
  If there is no bound graphics pipeline, and the `meshShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-vkCmdDrawIndirect2KHR-None-08693
  If there is no bound graphics pipeline, and at least one of the `taskShader` and `meshShader` features is enabled, one of the VK_SHADER_STAGE_VERTEX_BIT or VK_SHADER_STAGE_MESH_BIT_EXT stages must have a valid `VkShaderEXT` bound, and the other must have no `VkShaderEXT` bound

- VUID-vkCmdDrawIndirect2KHR-None-08696
  If there is no bound graphics pipeline, and a valid `VkShaderEXT` is bound to the VK_SHADER_STAGE_VERTEX_BIT stage, there must be no `VkShaderEXT` bound to either the VK_SHADER_STAGE_TASK_BIT_EXT stage or the VK_SHADER_STAGE_MESH_BIT_EXT stage

- VUID-vkCmdDrawIndirect2KHR-None-08698
  If any graphics shader is bound which was created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag, then all shaders created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag in the same vkCreateShadersEXT call must also be bound

- VUID-vkCmdDrawIndirect2KHR-None-08699
  If any graphics shader is bound which was created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag, any stages in between stages whose shaders which did not create a shader with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag as part of the same vkCreateShadersEXT call must not have any `VkShaderEXT` bound

- VUID-vkCmdDrawIndirect2KHR-None-08878
  All bound graphics shader objects must have been created with identical or identically defined push constant ranges

- VUID-vkCmdDrawIndirect2KHR-None-08879
  All bound graphics shader objects must have either been created with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag set, or with identical or identically defined arrays of descriptor set layouts

- VUID-vkCmdDrawIndirect2KHR-colorAttachmentCount-09372
  If the current render pass instance was begun with vkCmdBeginRendering and a VkRenderingInfo::`colorAttachmentCount` equal to `1`, a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, and a fragment shader is bound, it must not declare the `DepthReplacing` or `StencilRefReplacingEXT` execution modes

- VUID-vkCmdDrawIndirect2KHR-pDynamicStates-08715
  If the bound graphics pipeline state includes a fragment shader stage, was created with VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`, and the fragment shader declares the `EarlyFragmentTests` execution mode and uses `OpDepthAttachmentReadEXT`, the `depthWriteEnable` parameter in the last call to vkCmdSetDepthWriteEnable must be VK_FALSE

- VUID-vkCmdDrawIndirect2KHR-pDynamicStates-08716
  If the bound graphics pipeline state includes a fragment shader stage, was created with VK_DYNAMIC_STATE_STENCIL_WRITE_MASK set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`, and the fragment shader declares the `EarlyFragmentTests` execution mode and uses `OpStencilAttachmentReadEXT`, the `writeMask` parameter in the last call to vkCmdSetStencilWriteMask must be `0`

- VUID-vkCmdDrawIndirect2KHR-None-09116
  If a shader object is bound to any graphics stage or the bound graphics pipeline was created with VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT, and the format of any color attachment is VK_FORMAT_E5B9G9R9_UFLOAT_PACK32, the corresponding element of the `pColorWriteMasks` parameter of vkCmdSetColorWriteMaskEXT must either include all of VK_COLOR_COMPONENT_R_BIT, VK_COLOR_COMPONENT_G_BIT, VK_COLOR_COMPONENT_B_BIT, and VK_COLOR_COMPONENT_A_BIT, or none of them

- VUID-vkCmdDrawIndirect2KHR-maxFragmentDualSrcAttachments-09239
  If blending is enabled for any attachment where either the source or destination blend factors for that attachment use the secondary color input, the maximum value of `Location` for any output attachment statically used in the `Fragment` `Execution` `Model` executed by this command must be less than `maxFragmentDualSrcAttachments`

- VUID-vkCmdDrawIndirect2KHR-None-09548
  If the current render pass was begun with vkCmdBeginRendering, there is no shader object bound to any graphics stage, the value of each element of VkRenderingAttachmentLocationInfo::`pColorAttachmentLocations` in the bound pipeline must match the value for the corresponding locations set currently in the current render pass instance

- VUID-vkCmdDrawIndirect2KHR-None-09549
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of each element of VkRenderingInputAttachmentIndexInfo::`pColorAttachmentInputIndices` in the bound pipeline must match the value for the corresponding index set currently in the current render pass instance

- VUID-vkCmdDrawIndirect2KHR-None-10927
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` in the bound pipeline must match the value set currently in the current render pass instance

- VUID-vkCmdDrawIndirect2KHR-None-10928
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` in the bound pipeline must match the value set currently in the current render pass instance

- VUID-vkCmdDrawIndirect2KHR-None-09642
  If the current render pass was begun with vkCmdBeginRendering with the VK_RENDERING_ENABLE_LEGACY_DITHERING_BIT_EXT flag, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_2_ENABLE_LEGACY_DITHERING_BIT_EXT

- VUID-vkCmdDrawIndirect2KHR-None-09643
  If the bound graphics pipeline was created with VK_PIPELINE_CREATE_2_ENABLE_LEGACY_DITHERING_BIT_EXT, the current render pass must have begun with vkCmdBeginRendering with the VK_RENDERING_ENABLE_LEGACY_DITHERING_BIT_EXT flag

- VUID-vkCmdDrawIndirect2KHR-None-10677
  If the per-tile execution model is enabled, the tileShadingPerTileDraw feature must be enabled

- VUID-vkCmdDrawIndirect2KHR-None-10772
  If a shader object is bound to any graphics stage, multiview functionality must not be enabled in the current render pass

- VUID-vkCmdDrawIndirect2KHR-multiviewPerViewViewports-12262
  If the `multiviewPerViewViewports` feature is enabled, then the index of the most significant bit in current render pass instance `viewMask` must be less than the current value of `viewportCount`

- VUID-vkCmdDrawIndirect2KHR-multiviewPerViewViewports-12263
  If the `multiviewPerViewViewports` feature is enabled, then the index of the most significant bit in current render pass instance `viewMask` must be less than the current value of `scissorCount`

- VUID-vkCmdDrawIndirect2KHR-flags-11521
  If current render pass instance was begun with vkCmdBeginRendering with VkRenderingInfo::`flags` which includes VK_RENDERING_FRAGMENT_REGION_BIT_EXT, and if sample shading is enabled (explicitly or implicitly), then the minimum fraction for sample shading must equal 0.0

- VUID-vkCmdDrawIndirect2KHR-None-11522
  If the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, and the `dynamicRenderingUnusedAttachments` feature is not enabled, the graphics pipeline bound must have been created with a VkCustomResolveCreateInfoEXT

- VUID-vkCmdDrawIndirect2KHR-None-11523
  If the current render pass instance was begun with vkCmdBeginRendering and does not contain a custom resolve, and the `dynamicRenderingUnusedAttachments` feature is not enabled, the graphics pipeline bound must not have been created with a VkCustomResolveCreateInfoEXT

- VUID-vkCmdDrawIndirect2KHR-customResolve-11524
  If the current render pass instance was begun with vkCmdBeginRendering and vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, the graphics pipeline bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_TRUE

- VUID-vkCmdDrawIndirect2KHR-customResolve-11525
  If the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, and vkCmdBeginCustomResolveEXT has not been recorded in the render pass instance, the graphics pipeline bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_FALSE

- VUID-vkCmdDrawIndirect2KHR-None-11861
  If the `dynamicRenderingUnusedAttachments` feature is not enabled and the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, the bound graphics pipeline must have been created with a VkCustomResolveCreateInfoEXT::`colorAttachmentCount` equal to VkRenderingInfo::`colorAttachmentCount`

- VUID-vkCmdDrawIndirect2KHR-None-11862
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound graphics pipeline

- VUID-vkCmdDrawIndirect2KHR-None-11863
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` equal to VK_NULL_HANDLE must have the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound pipeline equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirect2KHR-dynamicRenderingUnusedAttachments-11864
  If the `dynamicRenderingUnusedAttachments` feature is enabled, the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound graphics pipeline, or the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats`, if it exists, must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirect2KHR-None-11865
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirect2KHR-None-11866
  If current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`

- VUID-vkCmdDrawIndirect2KHR-dynamicRenderingUnusedAttachments-11867
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, and the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirect2KHR-None-11868
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->resolveImageView` was VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirect2KHR-None-11869
  If current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`

- VUID-vkCmdDrawIndirect2KHR-dynamicRenderingUnusedAttachments-11870
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, and the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirect2KHR-colorAttachmentCount-11871
  If the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0` and vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, then for each element of the VkRenderingInfo::`pColorAttachments` array with a `resolveImageView` not equal to VK_NULL_HANDLE, the `resolveImageView` must have been created with a sample count equal to the value of `rasterizationSamples` for the bound graphics pipeline

- VUID-vkCmdDrawIndirect2KHR-pDepthAttachment-11872
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`

- VUID-vkCmdDrawIndirect2KHR-pStencilAttachment-11873
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`

- VUID-vkCmdDrawIndirect2KHR-customResolve-11529
  If a shader object is bound to the fragment stage, the current render pass instance was begun with vkCmdBeginRendering, a fragment density map attachment is active, and vkCmdBeginCustomResolveEXT has been called, then the fragment shader object bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_TRUE

- VUID-vkCmdDrawIndirect2KHR-customResolve-11530
  If a shader object is bound to the fragment stage, the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, a fragment density map attachment is active, and vkCmdBeginCustomResolveEXT has not yet been called, then the fragment shader object bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_FALSE

- VUID-vkCmdDrawIndirect2KHR-flags-13361
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, then all bound shader objects must have been created with the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit

- VUID-vkCmdDrawIndirect2KHR-flags-13362
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, then the pipeline layout of the bound descriptor sets must have been created with VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT set

- VUID-vkCmdDrawIndirect2KHR-flags-13363
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, and any of the descriptor set layouts used to create the pipeline layout of the bound descriptor sets were created with any binding’s VkDescriptorSetLayoutBinding::`stageFlags` set with VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT, then there must be no binding with VkDescriptorSetLayoutBinding::`stageFlags` set with VK_SHADER_STAGE_TASK_BIT_EXT or VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-vkCmdDrawIndirect2KHR-flags-13364
  If there are any shader objects bound that were created with `flags` that includes both the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR and VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT bits, the pipeline layout of the bound descriptor sets must have been created with VK_PIPELINE_LAYOUT_CREATE_NO_TASK_SHADER_BIT_KHR set

- VUID-vkCmdDrawIndirect2KHR-flags-13365
  If there are any shader objects bound that were created with `flags` that includes both the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR and VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT bits, there must be no shader object bound to the VK_SHADER_STAGE_TASK_BIT_EXT stage

- VUID-vkCmdDrawIndirect2KHR-None-04007
  All vertex input bindings accessed via vertex input variables declared in the vertex shader entry point’s interface must have either valid or VK_NULL_HANDLE buffers bound

- VUID-vkCmdDrawIndirect2KHR-None-04008
  If the `nullDescriptor` feature is not enabled, all vertex input bindings accessed via vertex input variables declared in the vertex shader entry point’s interface must not be VK_NULL_HANDLE

- VUID-vkCmdDrawIndirect2KHR-None-02721
  If the `robustBufferAccess` feature is not enabled, and that pipeline was created without enabling VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS for `vertexInputs`, then for a given vertex buffer binding, any attribute data fetched must be entirely contained within the corresponding vertex buffer binding, as described in Vertex Input Description

- VUID-vkCmdDrawIndirect2KHR-format-10389
  For each vertex attribute accessed by this command, if its VkVertexInputAttributeDescription::`format` or VkVertexInputAttributeDescription2EXT::`format` is a packed format, and the `legacyVertexAttributes` feature is not enabled, the value of `attribAddress`, calculated as described in Vertex Input Calculation, must be a multiple of the size of the `format`

- VUID-vkCmdDrawIndirect2KHR-format-10390
  For each vertex attribute accessed by this command, if its VkVertexInputAttributeDescription::`format` or VkVertexInputAttributeDescription2EXT::`format` is not a packed format, and either the `legacyVertexAttributes` feature is not enabled or `format` has 64-bit components, the value of `attribAddress`, calculated as described in Vertex Input Calculation, must be a multiple of the component size of the `format`

- VUID-vkCmdDrawIndirect2KHR-None-07842
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY dynamic state enabled then vkCmdSetPrimitiveTopology must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-dynamicPrimitiveTopologyUnrestricted-07500
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY dynamic state enabled and the `dynamicPrimitiveTopologyUnrestricted` is VK_FALSE, then the `primitiveTopology` parameter of `vkCmdSetPrimitiveTopology` must be of the same topology class as the pipeline VkPipelineInputAssemblyStateCreateInfo::`topology` state

- VUID-vkCmdDrawIndirect2KHR-primitiveTopology-10286
  If a VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage is bound, then the current value of `primitiveTopology` must be VK_PRIMITIVE_TOPOLOGY_PATCH_LIST prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-primitiveTopology-10747
  If vkCmdSetPrimitiveTopology set `primitiveTopology` to VK_PRIMITIVE_TOPOLOGY_PATCH_LIST prior to this drawing command, then a VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage must be bound

- VUID-vkCmdDrawIndirect2KHR-primitiveTopology-10748
  If vkCmdSetPrimitiveTopology set `primitiveTopology` to VK_PRIMITIVE_TOPOLOGY_POINT_LIST prior to this drawing command, the `maintenance5` feature is not enabled, both a VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT and VK_SHADER_STAGE_GEOMETRY_BIT stage are not bound, then the `Vertex` `Execution` `Model` must have a `PointSize` decorated variable that is statically written to

- VUID-vkCmdDrawIndirect2KHR-pStrides-04913
  If the bound graphics pipeline was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE dynamic state enabled, but without the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled, then vkCmdBindVertexBuffers2 with a non-`NULL` `pStrides` parameter or vkCmdBindVertexBuffers3KHR with `setStride` set to VK_TRUE must have been called and not subsequently invalidated in the current command buffer prior to this draw command

- VUID-vkCmdDrawIndirect2KHR-None-13118
  If the bound graphics pipeline was created without the VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE dynamic state enabled, without the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled, and vkCmdBindVertexBuffers3KHR was called and not subsequently invalidated in the current command buffer prior to this draw command, the value of `setStride` in each of its `pBindInfos` elements must have been VK_FALSE

- VUID-vkCmdDrawIndirect2KHR-None-04914
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled then vkCmdSetVertexInputEXT must have been called and not subsequently invalidated in the current command buffer prior to this draw command

- VUID-vkCmdDrawIndirect2KHR-Input-07939
  If the `vertexAttributeRobustness` feature is not enabled, and the `maintenance9` feature is not enabled, and there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled then all variables with the `Input` storage class decorated with `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` must contain a location in VkVertexInputAttributeDescription2EXT::`location`

- VUID-vkCmdDrawIndirect2KHR-Input-08734
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled and either the `legacyVertexAttributes` feature is not enabled or the SPIR-V Type associated with a given `Input` variable of the corresponding `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` is 64-bit, then the numeric type associated with all `Input` variables of the corresponding `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` must be the same as VkVertexInputAttributeDescription2EXT::`format`

- VUID-vkCmdDrawIndirect2KHR-format-08936
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled and VkVertexInputAttributeDescription2EXT::`format` has a 64-bit component, then the scalar width associated with all `Input` variables of the corresponding `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` must be 64-bit

- VUID-vkCmdDrawIndirect2KHR-format-08937
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled and the scalar width associated with a `Location` decorated `Input` variable in the `Vertex` `Execution` `Model` `OpEntryPoint` is 64-bit, then the corresponding VkVertexInputAttributeDescription2EXT::`format` must have a 64-bit component

- VUID-vkCmdDrawIndirect2KHR-None-09203
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled and VkVertexInputAttributeDescription2EXT::`format` has a 64-bit component, then all `Input` variables at the corresponding `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` must not use components that are not present in the format

- VUID-vkCmdDrawIndirect2KHR-None-04875
  If there is a shader object bound to the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage or the bound graphics pipeline state was created with both a VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage and the VK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT dynamic state enabled, and the current value of `primitiveTopology` is VK_PRIMITIVE_TOPOLOGY_PATCH_LIST, then vkCmdSetPatchControlPointsEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-None-04879
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE dynamic state enabled then vkCmdSetPrimitiveRestartEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-None-09637
  If the `primitiveTopologyListRestart` feature is not enabled, the input assembly is VK_PRIMITIVE_TOPOLOGY_POINT_LIST, VK_PRIMITIVE_TOPOLOGY_LINE_LIST, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY, or VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY, there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE dynamic state enabled, then vkCmdSetPrimitiveRestartEnable must be VK_FALSE

- VUID-vkCmdDrawIndirect2KHR-None-10909
  If the `primitiveTopologyPatchListRestart` feature is not enabled, the input assembly is VK_PRIMITIVE_TOPOLOGY_PATCH_LIST, there is a shader object bound to the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE dynamic state enabled then vkCmdSetPrimitiveRestartEnable must be VK_FALSE

- VUID-vkCmdDrawIndirect2KHR-stage-06481
  The bound graphics pipeline must not have been created with the VkPipelineShaderStageCreateInfo::`stage` member of any element of VkGraphicsPipelineCreateInfo::`pStages` set to VK_SHADER_STAGE_TASK_BIT_EXT or VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-vkCmdDrawIndirect2KHR-None-08885
  There must be no shader object bound to either of the VK_SHADER_STAGE_TASK_BIT_EXT or VK_SHADER_STAGE_MESH_BIT_EXT stages

- VUID-vkCmdDrawIndirect2KHR-None-07619
  If a shader object is bound to the VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stage or a graphics pipeline is bound which was created with both a VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stage and the VK_DYNAMIC_STATE_TESSELLATION_DOMAIN_ORIGIN_EXT dynamic state enabled, then vkCmdSetTessellationDomainOriginEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect2KHR-OpExecutionMode-12239
  If a shader is bound to both the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stages, and if both stages contain an `OpExecutionMode` instruction specifying the type of subdivision, they must be the same

- VUID-vkCmdDrawIndirect2KHR-OpExecutionMode-12240
  If a shader is bound to both the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stages, and if both stages contain an `OpExecutionMode` instruction specifying the orientation of triangles, they must be the same

- VUID-vkCmdDrawIndirect2KHR-OpExecutionMode-12241
  If a shader is bound to both the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stages, and if both stages contain an `OpExecutionMode` instruction specifying the segment spacing, they must be the same

- VUID-vkCmdDrawIndirect2KHR-OpExecutionMode-12242
  If a shader is bound to both the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stages, and if both stages contain an `OpExecutionMode` instruction specifying the output patch size, they must be the same

- VUID-vkCmdDrawIndirect2KHR-pInfo-13110
  If `pInfo->drawCount` is greater than `0`, `pInfo->addressRange.size` must be greater than or equal to (`pInfo->drawCount` - 1) × `pInfo->addressRange.stride` + `sizeof`(VkDrawIndirectCommand)

- VUID-vkCmdDrawIndirect2KHR-pInfo-13111
  If `pInfo->drawCount` is greater than 1, `pInfo->addressRange.stride` must not be 0

- VUID-vkCmdDrawIndirect2KHR-pInfo-13112
  If `pInfo->addressRange.stride` is not 0, `pInfo->addressRange.stride` must be greater than or equal to `sizeof`(VkDrawIndirectCommand)

- VUID-vkCmdDrawIndirect2KHR-pInfo-13113
  If `pInfo->addressRange.stride` is not 0, `pInfo->addressRange.stride` must be a multiple of `4`

- VUID-vkCmdDrawIndirect2KHR-commandBuffer-13057
  `commandBuffer` must not be a protected command buffer

Valid Usage (Implicit)

- VUID-vkCmdDrawIndirect2KHR-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdDrawIndirect2KHR-pInfo-parameter
  `pInfo` must be a valid pointer to a valid VkDrawIndirect2InfoKHR structure

- VUID-vkCmdDrawIndirect2KHR-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdDrawIndirect2KHR-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdDrawIndirect2KHR-renderpass
  This command must only be called inside of a render pass instance

- VUID-vkCmdDrawIndirect2KHR-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdDrawIndirect2KHR-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Inside | Outside | VK_QUEUE_GRAPHICS_BIT | Action

Conditional Rendering

vkCmdDrawIndirect2KHR is affected by conditional rendering

To record a non-indexed indirect drawing command, call:

    // Provided by VK_VERSION_1_0
    void vkCmdDrawIndirect(
        VkCommandBuffer                             commandBuffer,
        VkBuffer                                    buffer,
        VkDeviceSize                                offset,
        uint32_t                                    drawCount,
        uint32_t                                    stride);

- `commandBuffer` is the command buffer into which the command is recorded.

- `buffer` is the buffer containing draw parameters.

- `offset` is the byte offset into `buffer` where parameters begin.

- `drawCount` is the number of draws to execute, and can be zero.

- `stride` is the byte stride between successive sets of draw parameters.

`vkCmdDrawIndirect` behaves similarly to vkCmdDraw except that the parameters are read by the device from a buffer during execution. `drawCount` draws are executed by the command, with parameters taken from `buffer` starting at `offset` and increasing by `stride` bytes for each successive draw. The parameters of each draw are encoded in an array of VkDrawIndirectCommand structures. If `drawCount` is less than or equal to one, `stride` is ignored.

Valid Usage

- VUID-vkCmdDrawIndirect-magFilter-04553
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdDrawIndirect-magFilter-09598
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdDrawIndirect-mipmapMode-04770
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdDrawIndirect-mipmapMode-09599
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdDrawIndirect-unnormalizedCoordinates-09635
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `levelCount` and `layerCount` must be 1

- VUID-vkCmdDrawIndirect-None-08609
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `viewType` must be VK_IMAGE_VIEW_TYPE_1D or VK_IMAGE_VIEW_TYPE_2D

- VUID-vkCmdDrawIndirect-None-08610
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions with `ImplicitLod`, `Dref` or `Proj` in their name

- VUID-vkCmdDrawIndirect-None-08611
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions that includes a LOD bias or any offset values

- VUID-vkCmdDrawIndirect-None-06479
  If a VkImageView is sampled with depth comparison, the image view’s format features must contain VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT

- VUID-vkCmdDrawIndirect-None-02691
  If a VkImageView is accessed using atomic operations as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT

- VUID-vkCmdDrawIndirect-None-07888
  If a VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER descriptor is accessed using atomic operations as a result of this command, then the storage texel buffer’s format features must contain VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT

- VUID-vkCmdDrawIndirect-None-02692
  If a VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT

- VUID-vkCmdDrawIndirect-None-02693
  If the VK_EXT_filter_cubic extension is not enabled and any VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, it must not have a VkImageViewType of VK_IMAGE_VIEW_TYPE_3D, VK_IMAGE_VIEW_TYPE_CUBE, or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY

- VUID-vkCmdDrawIndirect-filterCubic-02694
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have a VkImageViewType and format that supports cubic filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubic` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdDrawIndirect-filterCubicMinmax-02695
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX as a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubicMinmax` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdDrawIndirect-cubicRangeClamp-09212
  If the `cubicRangeClamp` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must not have a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM

- VUID-vkCmdDrawIndirect-reductionMode-09213
  Any VkImageView being sampled with a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM as a result of this command must sample with VK_FILTER_CUBIC_EXT

- VUID-vkCmdDrawIndirect-selectableCubicWeights-09214
  If the `selectableCubicWeights` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have VkSamplerCubicWeightsCreateInfoQCOM::`cubicWeights` equal to VK_CUBIC_FILTER_WEIGHTS_CATMULL_ROM_QCOM

- VUID-vkCmdDrawIndirect-flags-02696
  Any VkImage created with a VkImageCreateInfo::`flags` containing VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV sampled as a result of this command must only be sampled using a VkSamplerAddressMode of VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawIndirect-OpTypeImage-07027
  For any VkImageView being written as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawIndirect-OpTypeImage-07028
  For any VkImageView being read as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawIndirect-OpTypeImage-07029
  For any VkBufferView being written as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown`, the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawIndirect-OpTypeImage-07030
  Any VkBufferView being read as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown` then the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawIndirect-None-08600
  If a a bound shader was created with a pipeline layout and statically uses a set n, a descriptor set must have been bound to n at the same pipeline bind point, with layouts compatible for set n with the layout(s) used to create the shader, as described in Pipeline Layout Compatibility

- VUID-vkCmdDrawIndirect-None-08601
  If a a bound shader was created with a pipeline layout or specified push constant ranges and statically uses a push constant value, that value must have been set for the same pipeline bind point, with push constant ranges that are compatible with the push constant range used to create the shader

- VUID-vkCmdDrawIndirect-None-10068
  For each array of resources that is used by a bound shader, the indices used to access members of the array must be less than the descriptor count for the identified binding in the descriptor sets used by this command

- VUID-vkCmdDrawIndirect-None-08114
  Descriptors in each bound descriptor set, specified via vkCmdBindDescriptorSets, must be valid if they are accessed as described by descriptor validity by the VkPipeline bound to the pipeline bind point used by this command and the bound VkPipeline was not created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawIndirect-imageLayout-00344
  If an image descriptor is accessed by a shader, the VkImageLayout must match the subresource accessible from the VkImageView as defined by the image layout matching rules

- VUID-vkCmdDrawIndirect-None-08115
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdBindDescriptorSets, the bound VkPipeline must have been created without VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawIndirect-None-08116
  Descriptors in bound descriptor buffers, specified via vkCmdSetDescriptorBufferOffsetsEXT, must be valid if they are dynamically accessed

- VUID-vkCmdDrawIndirect-None-08117
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdSetDescriptorBufferOffsetsEXT, the bound VkPipeline must have been created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawIndirect-None-08119
  If a descriptor is dynamically used with a VkPipeline created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdDrawIndirect-None-08605
  If a descriptor is dynamically used with a VkShaderEXT created with a `VkDescriptorSetLayout` that was created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdDrawIndirect-None-08606
  If the `shaderObject` feature is not enabled, a valid pipeline must be bound to the pipeline bind point used by this command

- VUID-vkCmdDrawIndirect-None-08608
  If a pipeline is bound to the pipeline bind point used by this command, there must not have been any calls to dynamic state setting commands for any state specified statically in the VkPipeline object bound to the pipeline bind point used by this command, since that pipeline was bound

- VUID-vkCmdDrawIndirect-uniformBuffers-06935
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawIndirect-None-08612
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawIndirect-storageBuffers-06936
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawIndirect-None-08613
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a storage buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawIndirect-commandBuffer-02707
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, any resource accessed by bound shaders must not be a protected resource

- VUID-vkCmdDrawIndirect-viewType-07752
  If a VkImageView is accessed as a result of this command, then the image view’s `viewType` must match the `Dim` operand of the `OpTypeImage` as described in Compatibility Between SPIR-V Image Dimensions and Vulkan ImageView Types

- VUID-vkCmdDrawIndirect-format-07753
  If a VkImageView or VkBufferView is accessed as a result of this command, then the numeric type of the view’s `format` and the `Sampled` `Type` operand of the `OpTypeImage` must match

- VUID-vkCmdDrawIndirect-OpImageWrite-08795
  If a VkImageView created with a format other than VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the image view’s format

- VUID-vkCmdDrawIndirect-OpImageWrite-08796
  If a VkImageView created with the format VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have four components

- VUID-vkCmdDrawIndirect-OpImageWrite-04469
  If a VkBufferView is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the buffer view’s format

- VUID-vkCmdDrawIndirect-SampledType-04470
  If a VkImageView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdDrawIndirect-SampledType-04471
  If a VkImageView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdDrawIndirect-SampledType-04472
  If a VkBufferView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdDrawIndirect-SampledType-04473
  If a VkBufferView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdDrawIndirect-sparseImageInt64Atomics-04474
  If the `sparseImageInt64Atomics` feature is not enabled, VkImage objects created with the VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdDrawIndirect-sparseImageInt64Atomics-04475
  If the `sparseImageInt64Atomics` feature is not enabled, VkBuffer objects created with the VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdDrawIndirect-OpImageSampleWeightedQCOM-06971
  If `OpImageSampleWeightedQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_SAMPLED_IMAGE_BIT_QCOM

- VUID-vkCmdDrawIndirect-OpImageSampleWeightedQCOM-06972
  If `OpImageSampleWeightedQCOM` uses a VkImageView as a sample weight image as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_IMAGE_BIT_QCOM

- VUID-vkCmdDrawIndirect-OpImageBoxFilterQCOM-06973
  If `OpImageBoxFilterQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BOX_FILTER_SAMPLED_BIT_QCOM

- VUID-vkCmdDrawIndirect-OpImageBlockMatchSSDQCOM-06974
  If `OpImageBlockMatchSSDQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdDrawIndirect-OpImageBlockMatchSADQCOM-12420
  If `OpImageBlockMatchSADQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdDrawIndirect-OpImageBlockMatchSADQCOM-06976
  If `OpImageBlockMatchSADQCOM` or OpImageBlockMatchSSDQCOM is used to read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdDrawIndirect-OpImageSampleWeightedQCOM-06977
  If `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdDrawIndirect-OpImageSampleWeightedQCOM-06978
  If any command other than `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must not have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdDrawIndirect-OpImageBlockMatchWindow-09215
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM

- VUID-vkCmdDrawIndirect-OpImageBlockMatchWindow-09216
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format must be a single-component format

- VUID-vkCmdDrawIndirect-OpImageBlockMatchWindow-09217
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdDrawIndirect-OpImageBlockMatchWindow-12421
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the `blockMatchExtendedClampToEdge` feature is not enabled, the input sampler must not have been created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawIndirect-addressModeU-12422
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the input sampler was created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, then the sampler must have been created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawIndirect-None-07288
  Any shader invocation executed by this command must terminate

- VUID-vkCmdDrawIndirect-None-09600
  If a descriptor with type equal to any of VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, or VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT is accessed as a result of this command, all image subresources identified by that descriptor must be in the image layout identified when the descriptor was written

- VUID-vkCmdDrawIndirect-micromap-11636
  If an acceleration structure is accessed as a result of this command through an `OpRayQueryProceedKHR` operation , the `VK_EXT_opacity_micromap` extension is not enabled, and the acceleration structure is built using geometry with a VkAccelerationStructureTrianglesOpacityMicromapKHR structure included in its `pNext` chain, the shader must have specified a `OpacityMicromapIdKHR` execution mode with its specialization constant operand equal to VK_TRUE

- VUID-vkCmdDrawIndirect-micromap-11637
  If an acceleration structure is accessed as a result of this command and the acceleration structure was constructed through deserialization, all micromap arrays referenced by the acceleration structure that were not replaced by an acceleration structure update command must have been deserialized using the serialized data of the corresponding micromaps used to originally build the acceleration structure prior to the execution of this command on the device

- VUID-vkCmdDrawIndirect-micromap-11638
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkPipeline bound to the pipeline bind point used by this command must not have been created with `flags` that includes VK_PIPELINE_CREATE_2_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_KHR

- VUID-vkCmdDrawIndirect-micromap-11639
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkShaderEXT that accessed the descriptor must not have been created with `flags` that includes VK_SHADER_CREATE_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_EXT

- VUID-vkCmdDrawIndirect-commandBuffer-10746
  The `VkDeviceMemory` object allocated from a `VkMemoryHeap` with the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property that is bound to a resource accessed as a result of this command must be the active bound tile memory object in `commandBuffer`

- VUID-vkCmdDrawIndirect-None-10678
  If this command is recorded inside a tile shading render pass instance, the stages corresponding to the pipeline bind point used by this command must only include VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_FRAGMENT_BIT, and/or VK_SHADER_STAGE_COMPUTE_BIT

- VUID-vkCmdDrawIndirect-None-10679
  If this command is recorded where per-tile execution model is enabled, there must be no access to any image while the image was be transitioned to the VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT layout

- VUID-vkCmdDrawIndirect-pDescription-09900
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the underlying VkTensorARM object must have been created with the VK_TENSOR_USAGE_SHADER_BIT_ARM usage flag set

- VUID-vkCmdDrawIndirect-dimensionCount-09905
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the `Rank` of the `OpTypeTensorARM` of the tensor resource variable must be equal to the `dimensionCount` provided via VkTensorCreateInfoARM::`pDescription` when creating the underlying VkTensorARM object

- VUID-vkCmdDrawIndirect-OpTypeTensorARM-09906
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the element type of the `OpTypeTensorARM` of the tensor resource variable must be compatible with the VkFormat of the VkTensorViewARM used for the access

- VUID-vkCmdDrawIndirect-OpTensorReadARM-12462
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, using `OpTensorReadARM` or `OpTensorWriteARM`, and the underlying VkTensorARM object was created with a VK_TENSOR_TILING_BRICK_16_WIDE_ARM, VK_TENSOR_TILING_BRICK_8_WIDE_ARM, VK_TENSOR_TILING_BRICK_4_WIDE_ARM, VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_ARM, or VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_64K_ARM VkTensorTilingARM, and the object read or written is an array, then the innermost coordinate provided to `OpTensorReadARM` or `OpTensorWriteARM` via the `Coordinates` operand must be a multiple of the largest power of 2 that is less than or equal to the number of components of the array

- VUID-vkCmdDrawIndirect-pNext-12463
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command and the corresponding VkTensorARM object was created with a VkTensorRollingBackingCreateInfoARM structure in the `pNext` chain of VkTensorCreateInfoARM, then the number of elements accessed with one `OpTensorReadARM` or `OpTensorWriteARM`, must be less than or equal to the number of elements available from the starting coordinate in the rolling backing along the innermost dimension, defined as `wraps`[`dimensionCount` - 1] - InnermostCoordinate % `wraps`[`dimensionCount` - 1] where InnermostCoordinate is the last component of the coordinates array provided via the `Coordinates` operand

- VUID-vkCmdDrawIndirect-None-12472
  Descriptors dynamically accessed in bound descriptor heaps must be valid

- VUID-vkCmdDrawIndirect-None-11297
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a `OpTypeStruct` decorated with `Block` or `BufferBlock` using that mapping, the calculated offset for the resource heap must be a multiple of `bufferDescriptorAlignment`

- VUID-vkCmdDrawIndirect-None-11298
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeImage` or `OpTypeSampledImage` using that mapping, the calculated offset for the resource heap must be a multiple of `imageDescriptorAlignment`

- VUID-vkCmdDrawIndirect-None-11299
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeSampler` or `OpTypeSampledImage` using that mapping, the calculated offset for the sampler heap must be a multiple of `samplerDescriptorAlignment`

- VUID-vkCmdDrawIndirect-None-11397
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeTensorARM` using that mapping, the calculated offset for the resource heap must be a multiple of `tensorDescriptorAlignment`

- VUID-vkCmdDrawIndirect-None-11300
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 4

- VUID-vkCmdDrawIndirect-None-11301
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdDrawIndirect-None-11302
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress

- VUID-vkCmdDrawIndirect-None-11304
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 8

- VUID-vkCmdDrawIndirect-None-11305
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdDrawIndirect-None-11306
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address pointed to by the address in push data must be a valid VkDeviceAddress

- VUID-vkCmdDrawIndirect-None-11308
  For each descriptor heap that is statically used by a bound shader, either directly or via a descriptor mapping, a valid descriptor heap must be bound

- VUID-vkCmdDrawIndirect-None-11309
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, execution of this command must not result in any descriptor read accessing data outside of the user range of the respective heap bound by `vkCmdBind*HeapEXT` commands

- VUID-vkCmdDrawIndirect-None-11372
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer or uniform texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified via VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawIndirect-None-11373
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer or storage texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawIndirect-None-11374
  If the `robustBufferAccess2` feature is not enabled, the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, uniform texel buffer, storage buffer, or storage texel buffer, that shader must not access values outside of the range of the buffer as specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawIndirect-pBindInfo-11375
  If any bound shader uses an embedded sampler via a descriptor mapping, the value of `pBindInfo->reservedRangeSize` set for vkCmdBindSamplerHeapEXT must be greater than or equal to `minSamplerHeapReservedRangeWithEmbedded`

- VUID-vkCmdDrawIndirect-None-11376
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, and that shader statically uses a push constant value, that value must have been set by vkCmdPushDataEXT

- VUID-vkCmdDrawIndirect-None-11398
  If a bound shader was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the access must not be out of bounds

- VUID-vkCmdDrawIndirect-None-11437
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the buffer from which the address in push data was queried must have been created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdDrawIndirect-None-11438
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdDrawIndirect-None-11441
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must be aligned to `minUniformBufferOffsetAlignment`

- VUID-vkCmdDrawIndirect-None-11439
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_STORAGE_BUFFER_BIT usage flag set

- VUID-vkCmdDrawIndirect-None-11442
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must be aligned to `minStorageBufferOffsetAlignment`

- VUID-vkCmdDrawIndirect-None-11485
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses an acceleration structure using that mapping, the address that the acceleration structure is mapped to must be an acceleration structure address retrieved from a VkAccelerationStructureKHR object via vkGetAccelerationStructureDeviceAddressKHR or handle retrieved from a VkAccelerationStructureNV object via vkGetAccelerationStructureHandleNV

- VUID-vkCmdDrawIndirect-index-11450
  If a shader uses a sampler descriptor to sample an image as a result of this command, and that sampler descriptor uses a custom border color with an index defined by VkSamplerCustomBorderColorIndexCreateInfoEXT, the value of VkSamplerCustomBorderColorIndexCreateInfoEXT::`index` must have been registered before this command was recorded, and still be registered during the sampling operation, with an identically defined color

- VUID-vkCmdDrawIndirect-protectedNoFault-11455
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, the address that the resource is mapped to must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdDrawIndirect-protectedNoFault-11456
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, the address of the indirect memory must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdDrawIndirect-renderPass-02684
  The current render pass must be compatible with the `renderPass` member of the `VkGraphicsPipelineCreateInfo` structure specified when creating the `VkPipeline` bound to VK_PIPELINE_BIND_POINT_GRAPHICS

- VUID-vkCmdDrawIndirect-subpass-02685
  The subpass index of the current render pass must be equal to the `subpass` member of the `VkGraphicsPipelineCreateInfo` structure specified when creating the `VkPipeline` bound to VK_PIPELINE_BIND_POINT_GRAPHICS

- VUID-vkCmdDrawIndirect-OpTypeImage-07468
  If any shader executed by this pipeline accesses an `OpTypeImage` variable with a `Dim` operand of `SubpassData`, it must be decorated with an `InputAttachmentIndex` that corresponds to a valid input attachment in the current subpass

- VUID-vkCmdDrawIndirect-None-07469
  Input attachment views accessed in a subpass must be created with the same VkFormat as the corresponding subpass definition, and be created with a VkImageView that is compatible with the attachment referenced by the subpass' `pInputAttachments`[`InputAttachmentIndex`] in the bound VkFramebuffer as specified by Fragment Input Attachment Compatibility

- VUID-vkCmdDrawIndirect-pDepthInputAttachmentIndex-09595
  Input attachment views accessed in a dynamic render pass with a `InputAttachmentIndex` referenced by VkRenderingInputAttachmentIndexInfo, or no `InputAttachmentIndex` if VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` or VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` are `NULL`, must be created with a VkImageView that is compatible with the corresponding color, depth, or stencil attachment in VkRenderingInfo

- VUID-vkCmdDrawIndirect-pDepthInputAttachmentIndex-09596
  Input attachment views accessed in a dynamic render pass via a shader object must have an `InputAttachmentIndex` if both VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` and VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` are non-`NULL`

- VUID-vkCmdDrawIndirect-InputAttachmentIndex-09597
  If an input attachment view accessed in a dynamic render pass via a shader object has an `InputAttachmentIndex`, the `InputAttachmentIndex` must match an index in VkRenderingInputAttachmentIndexInfo

- VUID-vkCmdDrawIndirect-None-06537
  Memory backing image subresources used as attachments in the current render pass must not be written in any way other than as an attachment by this command

- VUID-vkCmdDrawIndirect-None-10795
  If a color attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_COLOR_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawIndirect-None-10796
  If a depth attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_DEPTH_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawIndirect-None-10797
  If a stencil attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_STENCIL_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawIndirect-None-12338
  If a color attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_COLOR_BIT on that attachment, the color attachment must not be written to by this command

- VUID-vkCmdDrawIndirect-None-12339
  If a depth attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_DEPTH_BIT on that attachment, the depth attachment must not be written to by this command

- VUID-vkCmdDrawIndirect-None-12340
  If a stencil attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_STENCIL_BIT on that attachment, the stencil attachment must not be written to by this command

- VUID-vkCmdDrawIndirect-None-09003
  If an attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, it must not be accessed in any way other than as an attachment, storage image, or sampled image by this command

- VUID-vkCmdDrawIndirect-None-06886
  If the current render pass instance uses a depth/stencil attachment with a read-only layout for the depth aspect, depth writes must be disabled

- VUID-vkCmdDrawIndirect-None-06887
  If the current render pass instance uses a depth/stencil attachment with a read-only layout for the stencil aspect, both front and back `writeMask` are not zero, and stencil test is enabled, all stencil ops must be VK_STENCIL_OP_KEEP

- VUID-vkCmdDrawIndirect-None-07831
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT dynamic state enabled then vkCmdSetViewport must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect-None-07832
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SCISSOR dynamic state enabled then vkCmdSetScissor must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect-None-08617
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_WIDTH dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineWidth must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect-None-07834
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BIAS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthBiasEnable` is VK_TRUE, then vkCmdSetDepthBias or vkCmdSetDepthBias2EXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect-None-07835
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_BLEND_CONSTANTS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and an active color attachment current value of `blendEnable` is VK_TRUE with a blend equations where any VkBlendFactor member is VK_BLEND_FACTOR_CONSTANT_COLOR, VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR, VK_BLEND_FACTOR_CONSTANT_ALPHA, or VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA, then vkCmdSetBlendConstants must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect-None-07836
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BOUNDS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthBoundsTestEnable` is VK_TRUE, then vkCmdSetDepthBounds must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect-None-07837
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilCompareMask must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect-None-07838
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_WRITE_MASK dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilWriteMask must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect-None-07839
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_REFERENCE dynamic state enabled, the current value of and `rasterizerDiscardEnable` is VK_FALSE, the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilReference must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect-maxMultiviewInstanceIndex-02688
  If the draw is recorded in a render pass instance with multiview enabled, the maximum instance index must be less than or equal to VkPhysicalDeviceMultiviewProperties::`maxMultiviewInstanceIndex`

- VUID-vkCmdDrawIndirect-sampleLocationsEnable-02689
  If the bound graphics pipeline was created with VkPipelineSampleLocationsStateCreateInfoEXT::`sampleLocationsEnable` set to VK_TRUE, then the active depth attachment must have been created with the VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit set

- VUID-vkCmdDrawIndirect-None-07634
  If the `VK_EXT_sample_locations` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetSampleLocationsEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect-None-06666
  If the `VK_EXT_sample_locations` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `sampleLocationsEnable` is VK_TRUE, then vkCmdSetSampleLocationsEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect-None-07840
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_CULL_MODE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCullMode must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect-None-07841
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRONT_FACE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetFrontFace must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect-None-07843
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, vkCmdSetDepthTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect-None-07844
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthTestEnable` is VK_TRUE, then vkCmdSetDepthWriteEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect-None-07845
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_COMPARE_OP dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthTestEnable` is VK_TRUE, then vkCmdSetDepthCompareOp must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect-None-07846
  If the `depthBounds` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthBoundsTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect-None-07847
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetStencilTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect-None-07848
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_OP dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilOp must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect-viewportCount-03417
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, and the state is not inherited, then vkCmdSetViewportWithCount must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect-scissorCount-03418
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT dynamic state enabled, and the state is not inherited, then vkCmdSetScissorWithCount must have been called and not subsequently invalidated in the current command buffer prior to this drawing

- VUID-vkCmdDrawIndirect-viewportCount-03419
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with both the VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic states enabled, and the state is not inherited, then the `viewportCount` parameter of `vkCmdSetViewportWithCount` must match the `scissorCount` parameter of `vkCmdSetScissorWithCount`

- VUID-vkCmdDrawIndirect-viewportCount-04137
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportWScalingStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndirect-viewportCount-04138
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, the current value of `viewportWScalingEnable` is VK_TRUE, then vkCmdSetViewportWScalingNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect-None-08636
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, the current value of `viewportWScalingEnable` is VK_TRUE, then the `viewportCount` parameter in the last call to vkCmdSetViewportWScalingNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndirect-viewportCount-04139
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportShadingRateImageStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndirect-shadingRateImage-09233
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_COARSE_SAMPLE_ORDER_NV and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoarseSampleOrderNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect-shadingRateImage-09234
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `shadingRateImageEnable` is VK_TRUE, then vkCmdSetViewportShadingRatePaletteNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect-None-08637
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `shadingRateImageEnable` is VK_TRUE, then the `viewportCount` parameter in the last call to vkCmdSetViewportShadingRatePaletteNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndirect-VkPipelineVieportCreateInfo-04141
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled and a VkPipelineViewportSwizzleStateCreateInfoNV structure chained from VkPipelineViewportStateCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportSwizzleStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndirect-VkPipelineVieportCreateInfo-04142
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled and a VkPipelineViewportExclusiveScissorStateCreateInfoNV structure chained from VkPipelineViewportStateCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportExclusiveScissorStateCreateInfoNV::`exclusiveScissorCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndirect-None-07878
  If the `exclusiveScissor` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_ENABLE_NV dynamic state enabled, then vkCmdSetExclusiveScissorEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect-None-07879
  If the `exclusiveScissor` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_NV dynamic state enabled, and the most recent call to vkCmdSetExclusiveScissorEnableNV in the current command buffer set any element of `pExclusiveScissorEnables` to VK_TRUE, then vkCmdSetExclusiveScissorNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect-None-04876
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE dynamic state enabled, then vkCmdSetRasterizerDiscardEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect-None-04877
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthBiasEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect-logicOp-04878
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LOGIC_OP_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `logicOpEnable` is VK_TRUE, then vkCmdSetLogicOpEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect-primitiveFragmentShadingRateWithMultipleViewports-04552
  If the `primitiveFragmentShadingRateWithMultipleViewports` limit is not supported, the bound graphics pipeline was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, and any of the shader stages of the bound graphics pipeline write to the `PrimitiveShadingRateKHR` built-in, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and the `viewportCount` parameter of `vkCmdSetViewportWithCount` must be `1`

- VUID-vkCmdDrawIndirect-primitiveFragmentShadingRateWithMultipleViewports-08642
  If the `primitiveFragmentShadingRateWithMultipleViewports` limit is not supported, and any shader object bound to a graphics stage writes to the `PrimitiveShadingRateKHR` built-in, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and the `viewportCount` parameter of `vkCmdSetViewportWithCount` must be `1`

- VUID-vkCmdDrawIndirect-blendEnable-04727
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, then for each color attachment, if the corresponding image view’s format features do not contain VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT, then the corresponding current value of `blendEnable` must be VK_FALSE

- VUID-vkCmdDrawIndirect-None-08644
  If a shader object is bound to any graphics stage or a graphics pipeline is bound, the current value of `rasterizerDiscardEnable` is VK_FALSE, and none of the following is enabled:

  - the `VK_AMD_mixed_attachment_samples` extension

  - the `VK_NV_framebuffer_mixed_samples` extension

  - the `multisampledRenderToSingleSampled` feature

  then the current value of `rasterizationSamples` must be the same as the current color and/or depth/stencil attachments

- VUID-vkCmdDrawIndirect-None-08876
  If a shader object is bound to any graphics stage, the current render pass instance must have been begun with vkCmdBeginRendering

- VUID-vkCmdDrawIndirect-imageView-06172
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawIndirect-imageView-06173
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawIndirect-imageView-06174
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawIndirect-imageView-06175
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawIndirect-imageView-06176
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawIndirect-imageView-06177
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawIndirect-viewMask-06178
  If the current render pass instance was begun with vkCmdBeginRendering, the bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::`viewMask` equal to VkRenderingInfo::`viewMask`

- VUID-vkCmdDrawIndirect-colorAttachmentCount-06179
  If the `dynamicRenderingUnusedAttachments` feature is not enabled and the current render pass instance was begun with vkCmdBeginRendering, the bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::`colorAttachmentCount` equal to VkRenderingInfo::`colorAttachmentCount`

- VUID-vkCmdDrawIndirect-dynamicRenderingUnusedAttachments-08910
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound graphics pipeline

- VUID-vkCmdDrawIndirect-dynamicRenderingUnusedAttachments-08912
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` equal to VK_NULL_HANDLE must have the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound pipeline equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirect-dynamicRenderingUnusedAttachments-08911
  If the `dynamicRenderingUnusedAttachments` feature is enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound graphics pipeline, or the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats`, if it exists, must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirect-colorAttachmentCount-09362
  If the current render pass instance was begun with vkCmdBeginRendering, with a VkRenderingInfo::`colorAttachmentCount` equal to `1`, there is no shader object bound to any graphics stage, and a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, each element of the VkRenderingInfo::`pColorAttachments` array with a `resolveImageView` not equal to VK_NULL_HANDLE must have been created with an image created with a VkExternalFormatANDROID::`externalFormat` value equal to the VkExternalFormatANDROID::`externalFormat` value used to create the bound graphics pipeline

- VUID-vkCmdDrawIndirect-None-09363
  If there is no shader object bound to any graphics stage, the current render pass instance was begun with vkCmdBeginRendering and a VkRenderingInfo::`colorAttachmentCount` equal to `1`, and a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with an image created with a VkExternalFormatANDROID::`externalFormat` value equal to the VkExternalFormatANDROID::`externalFormat` value used to create the bound graphics pipeline

- VUID-vkCmdDrawIndirect-None-09364
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetColorBlendEnableEXT must have set the blend enable to VK_FALSE prior to this drawing command

- VUID-vkCmdDrawIndirect-None-09365
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetRasterizationSamplesEXT must have set `rasterizationSamples` to VK_SAMPLE_COUNT_1_BIT prior to this drawing command

- VUID-vkCmdDrawIndirect-None-09368
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetFragmentShadingRateKHR must have set `pFragmentSize->width` to `1` prior to this drawing command

- VUID-vkCmdDrawIndirect-None-09369
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetFragmentShadingRateKHR must have set `pFragmentSize->height` to `1` prior to this drawing command

- VUID-vkCmdDrawIndirect-None-07749
  If the `colorWriteEnable` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorWriteEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect-attachmentCount-07750
  If the `colorWriteEnable` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the `attachmentCount` parameter of most recent call to `vkCmdSetColorWriteEnableEXT` in the current command buffer must be greater than or equal to the number of active color attachments

- VUID-vkCmdDrawIndirect-None-07751
  If the `VK_EXT_discard_rectangles` extension is enabled, a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT dynamic state enabled and the `pNext` chain of VkGraphicsPipelineCreateInfo included a VkPipelineDiscardRectangleStateCreateInfoEXT structure, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for each discard rectangle in VkPipelineDiscardRectangleStateCreateInfoEXT::`discardRectangleCount`

- VUID-vkCmdDrawIndirect-rasterizerDiscardEnable-09236
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT dynamic state enabled and the `pNext` chain of VkGraphicsPipelineCreateInfo did not include a VkPipelineDiscardRectangleStateCreateInfoEXT structure, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for each discard rectangle in VkPhysicalDeviceDiscardRectanglePropertiesEXT::`maxDiscardRectangles`

- VUID-vkCmdDrawIndirect-None-07880
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDiscardRectangleEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect-None-07881
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_MODE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect-dynamicRenderingUnusedAttachments-08913
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->imageView` was VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirect-dynamicRenderingUnusedAttachments-08914
  If current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawIndirect-dynamicRenderingUnusedAttachments-08915
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, and the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->imageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirect-dynamicRenderingUnusedAttachments-08916
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->imageView` was VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirect-dynamicRenderingUnusedAttachments-08917
  If current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawIndirect-dynamicRenderingUnusedAttachments-08918
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, and the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->imageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirect-imageView-06183
  If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentShadingRateAttachmentInfoKHR::`imageView` was not VK_NULL_HANDLE, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

- VUID-vkCmdDrawIndirect-dynamicRenderingLocalRead-11797
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingLocalRead` feature is enabled, the VK_RENDERING_LOCAL_READ_CONCURRENT_ACCESS_CONTROL_BIT_KHR flag is specified, and an attachment is being used as a feedback loop as specified by VK_RENDERING_ATTACHMENT_INPUT_ATTACHMENT_FEEDBACK_BIT_KHR, VkRenderingAttachmentFlagsInfoKHR::`flags` for that attachment must include VK_RENDERING_ATTACHMENT_INPUT_ATTACHMENT_FEEDBACK_BIT_KHR

- VUID-vkCmdDrawIndirect-imageView-06184
  If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentDensityMapAttachmentInfoEXT::`imageView` was not VK_NULL_HANDLE, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT

- VUID-vkCmdDrawIndirect-layers-10831
  If the current render pass instance was created with VK_RENDERING_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE or VK_RENDER_PASS_CREATE_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE, and the bound graphics pipeline was created with VK_PIPELINE_CREATE_2_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE, then the current render pass instance must have a `layers` value less than or equal to VkPipelineFragmentDensityMapLayeredCreateInfoVALVE::`maxFragmentDensityMapLayers`

- VUID-vkCmdDrawIndirect-colorAttachmentCount-06185
  If the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with a sample count equal to the corresponding element of the `pColorAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline

- VUID-vkCmdDrawIndirect-pDepthAttachment-06186
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of the `depthStencilAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawIndirect-pStencilAttachment-06187
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of the `depthStencilAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawIndirect-multisampledRenderToSingleSampled-07285
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with a sample count equal to the value of `rasterizationSamples` for the bound graphics pipeline

- VUID-vkCmdDrawIndirect-multisampledRenderToSingleSampled-07286
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawIndirect-multisampledRenderToSingleSampled-07287
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawIndirect-pNext-07935
  If this command is called inside a render pass instance started with vkCmdBeginRendering, and the `pNext` chain of VkRenderingInfo includes a VkMultisampledRenderToSingleSampledInfoEXT structure with `multisampledRenderToSingleSampledEnable` equal to VK_TRUE, then the value of `rasterizationSamples` for the bound graphics pipeline must be equal to VkMultisampledRenderToSingleSampledInfoEXT::`rasterizationSamples`

- VUID-vkCmdDrawIndirect-renderPass-06198
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline must have been created with a VkGraphicsPipelineCreateInfo::`renderPass` equal to VK_NULL_HANDLE

- VUID-vkCmdDrawIndirect-pColorAttachments-08963
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound with a fragment shader that statically writes to a color attachment, the color write mask is not zero, color writes are enabled, and the corresponding element of the VkRenderingInfo::`pColorAttachments->imageView` was not VK_NULL_HANDLE, then the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirect-pColorAttachments-11539
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound with a fragment shader that statically writes to a color attachment, the color write mask is not zero, color writes are enabled, and the corresponding element of the VkRenderingInfo::`pColorAttachments->resolveImageView` was not VK_NULL_HANDLE, then the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirect-pDepthAttachment-08964
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound, depth test is enabled, and the VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, then the VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirect-pDepthAttachment-11540
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound, depth test is enabled, and the VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, then the VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirect-pStencilAttachment-08965
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound, stencil test is enabled and the VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, then the VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirect-pStencilAttachment-11860
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound, stencil test is enabled and the VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, then the VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirect-flags-10582
  If the current render pass instance was begun with a vkCmdBeginRendering call in `commandBuffer`, its VkRenderingInfo::`flags` parameter must not have VK_RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT set unless VK_RENDERING_CONTENTS_INLINE_BIT_KHR is also set

- VUID-vkCmdDrawIndirect-primitivesGeneratedQueryWithRasterizerDiscard-06708
  If the `primitivesGeneratedQueryWithRasterizerDiscard` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, rasterization discard must not be enabled

- VUID-vkCmdDrawIndirect-primitivesGeneratedQueryWithNonZeroStreams-06709
  If the `primitivesGeneratedQueryWithNonZeroStreams` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, the bound graphics pipeline must not have been created with a non-zero value in `VkPipelineRasterizationStateStreamCreateInfoEXT`::`rasterizationStream`

- VUID-vkCmdDrawIndirect-None-07620
  If the `depthClamp` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLAMP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthClampEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect-None-07621
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_POLYGON_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetPolygonModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect-None-07622
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetRasterizationSamplesEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect-None-07623
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetSampleMaskEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect-alphaToCoverageEnable-08919
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT dynamic state enabled, and `alphaToCoverageEnable` was VK_TRUE in the last call to vkCmdSetAlphaToCoverageEnableEXT, then the Fragment Output Interface must contain a variable for the alpha `Component` word in `Location` 0 at `Index` 0

- VUID-vkCmdDrawIndirect-alphaToCoverageEnable-08920
  If a shader object is bound to any graphics stage, and the most recent call to vkCmdSetAlphaToCoverageEnableEXT in the current command buffer set `alphaToCoverageEnable` to VK_TRUE, then the Fragment Output Interface must contain a variable for the alpha `Component` word in `Location` 0 at `Index` 0

- VUID-vkCmdDrawIndirect-None-07624
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAlphaToCoverageEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect-None-07625
  If the `alphaToOne` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ALPHA_TO_ONE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAlphaToOneEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect-None-07626
  If the `logicOp` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LOGIC_OP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetLogicOpEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect-None-07627
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and there are color attachments bound, then vkCmdSetColorBlendEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect-None-07629
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and there are color attachments bound, then vkCmdSetColorWriteMaskEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect-None-07630
  If the `geometryStreams` feature is enabled, and a shader object is bound to the VK_SHADER_STAGE_GEOMETRY_BIT stage or a graphics pipeline is bound which was created with both a VK_SHADER_STAGE_GEOMETRY_BIT stage and the VK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXT dynamic state enabled, then vkCmdSetRasterizationStreamEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect-None-07631
  If the `VK_EXT_conservative_rasterization` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_CONSERVATIVE_RASTERIZATION_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetConservativeRasterizationModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect-None-07632
  If the `VK_EXT_conservative_rasterization` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXTRA_PRIMITIVE_OVERESTIMATION_SIZE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `conservativeRasterizationMode` is VK_CONSERVATIVE_RASTERIZATION_MODE_OVERESTIMATE_EXT, then vkCmdSetExtraPrimitiveOverestimationSizeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect-conservativePointAndLineRasterization-07499
  If the `VK_EXT_conservative_rasterization` extension is enabled, `conservativePointAndLineRasterization` is not supported, a shader object is bound to any graphics stage or a graphics pipeline is bound, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line or point topology class, then the current value of `conservativeRasterizationMode` must be VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT

- VUID-vkCmdDrawIndirect-None-07633
  If the `depthClipEnable` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLIP_ENABLE_EXT dynamic state, then vkCmdSetDepthClipEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect-None-07636
  If the `VK_EXT_provoking_vertex` extension is enabled, a shader object is bound to the VK_SHADER_STAGE_VERTEX_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_PROVOKING_VERTEX_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetProvokingVertexModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect-None-08666
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineRasterizationModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect-None-08669
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineStippleEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect-None-07849
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled and a shader object is bound to any graphics stage, or a bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stippledLineEnable` is VK_TRUE, then vkCmdSetLineStipple must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect-None-10608
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic state enabled, the effective rasterization input topology is in the line topology class, and the current `lineRasterizationMode` is VK_LINE_RASTERIZATION_MODE_BRESENHAM or VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH, then the current `alphaToCoverageEnable`, `alphaToOneEnable` and `sampleShadingEnable` states must all be VK_FALSE

- VUID-vkCmdDrawIndirect-None-07639
  If the `depthClipControl` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLIP_NEGATIVE_ONE_TO_ONE_EXT dynamic state enabled, then vkCmdSetDepthClipNegativeOneToOneEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect-None-09650
  If the `depthClampControl` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLAMP_RANGE_EXT dynamic state enabled, and the current value of `depthClampEnable` is VK_TRUE, then vkCmdSetDepthClampRangeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect-None-07640
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_ENABLE_NV dynamic state enabled, then vkCmdSetViewportWScalingEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect-None-07641
  If the `VK_NV_viewport_swizzle` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic state enabled, then vkCmdSetViewportSwizzleNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect-None-07642
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageToColorEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect-None-07643
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_LOCATION_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageToColorEnable` is VK_TRUE, then vkCmdSetCoverageToColorLocationNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect-None-07644
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_MODE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageModulationModeNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect-None-07645
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageModulationMode` is any value other than VK_COVERAGE_MODULATION_MODE_NONE_NV, then vkCmdSetCoverageModulationTableEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect-None-07646
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageModulationTableEnable` is VK_TRUE, then vkCmdSetCoverageModulationTableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect-None-07647
  If the `shadingRateImage` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SHADING_RATE_IMAGE_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetShadingRateImageEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect-pipelineFragmentShadingRate-09238
  If the `pipelineFragmentShadingRate` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetFragmentShadingRateKHR must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect-None-07648
  If the `representativeFragmentTest` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_REPRESENTATIVE_FRAGMENT_TEST_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetRepresentativeFragmentTestEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect-None-07649
  If the `coverageReductionMode` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageReductionModeNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect-rasterizationSamples-07471
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current subpass does not use any color and/or depth/stencil attachments, then the `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT must follow the rules for a zero-attachment subpass

- VUID-vkCmdDrawIndirect-samples-07472
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state disabled, then the `samples` parameter in the last call to vkCmdSetSampleMaskEXT must be greater or equal to the VkPipelineMultisampleStateCreateInfo::`rasterizationSamples` parameter used to create the bound graphics pipeline

- VUID-vkCmdDrawIndirect-samples-07473
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT state and VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT states enabled, then the `samples` parameter in the last call to vkCmdSetSampleMaskEXT must be greater or equal to the `rasterizationSamples` parameter in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawIndirect-None-09211
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, or a shader object is bound to any graphics stage, and the current render pass instance includes a VkMultisampledRenderToSingleSampledInfoEXT structure with `multisampledRenderToSingleSampledEnable` equal to VK_TRUE, then the `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT must be the same as the `rasterizationSamples` member of that structure

- VUID-vkCmdDrawIndirect-firstAttachment-07476
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic states enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the last call to vkCmdSetColorBlendEnableEXT in the current command buffer prior to this drawing command must have set a value for all active color attachments

- VUID-vkCmdDrawIndirect-firstAttachment-07478
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT dynamic states enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the last call to vkCmdSetColorWriteMaskEXT in the current command buffer prior to this drawing command must have set a value for all active color attachments

- VUID-vkCmdDrawIndirect-advancedBlendMaxColorAttachments-07480
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT and VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic states enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and an active color attachment current value of `blendEnable` is VK_TRUE, then the number of active color attachments must not exceed `advancedBlendMaxColorAttachments`

- VUID-vkCmdDrawIndirect-None-10862
  If a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT , but not the VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorBlendEquationEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawIndirect-rasterizerDiscardEnable-10863
  If a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT, but not the VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorBlendAdvancedEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawIndirect-None-10864
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT and VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then either vkCmdSetColorBlendAdvancedEXT or vkCmdSetColorBlendEquationEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawIndirect-primitivesGeneratedQueryWithNonZeroStreams-07481
  If the `primitivesGeneratedQueryWithNonZeroStreams` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, and the bound graphics pipeline was created with VK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXT state enabled, the last call to vkCmdSetRasterizationStreamEXT must have set the `rasterizationStream` to zero

- VUID-vkCmdDrawIndirect-sampleLocationsPerPixel-07482
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state disabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then the `sampleLocationsPerPixel` member of `pSampleLocationsInfo` in the last call to vkCmdSetSampleLocationsEXT must equal the `rasterizationSamples` member of the VkPipelineMultisampleStateCreateInfo structure the bound graphics pipeline has been created with

- VUID-vkCmdDrawIndirect-sampleLocationsPerPixel-07483
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then the `sampleLocationsPerPixel` member of `pSampleLocationsInfo` in the last call to vkCmdSetSampleLocationsEXT must equal the `rasterizationSamples` parameter of the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawIndirect-sampleLocationsEnable-07484
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT then the current active depth attachment must have been created with the VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit set

- VUID-vkCmdDrawIndirect-sampleLocationsEnable-07485
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, then the `sampleLocationsInfo.maxSampleLocationGridSize.width` in the last call to vkCmdSetSampleLocationsEXT must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.width` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling `rasterizationSamples`

- VUID-vkCmdDrawIndirect-sampleLocationsEnable-07486
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, then the `sampleLocationsInfo.maxSampleLocationGridSize.height` in the last call to vkCmdSetSampleLocationsEXT must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.height` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling `rasterizationSamples`

- VUID-vkCmdDrawIndirect-sampleLocationsEnable-07487
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, the fragment shader code must not statically use the extended instruction `InterpolateAtSample`

- VUID-vkCmdDrawIndirect-sampleLocationsEnable-07936
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationGridSize.width` must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.width` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling the value of `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawIndirect-sampleLocationsEnable-07937
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationGridSize.height` must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.height` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling the value of `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawIndirect-sampleLocationsEnable-07938
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationsPerPixel` must equal `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawIndirect-coverageModulationTableEnable-07488
  If a shader object is bound to any graphics stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NV state enabled, and the last call to vkCmdSetCoverageModulationTableEnableNV set `coverageModulationTableEnable` to VK_TRUE, then the `coverageModulationTableCount` parameter in the last call to vkCmdSetCoverageModulationTableNV must equal the current `rasterizationSamples` divided by the number of color samples in the current active color attachment

- VUID-vkCmdDrawIndirect-rasterizationSamples-07489
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, and if current subpass has a depth/stencil attachment and depth test, stencil test, or depth bounds test are enabled in the bound pipeline, then the current `rasterizationSamples` must be the same as the sample count of the depth/stencil attachment

- VUID-vkCmdDrawIndirect-coverageToColorEnable-07490
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV state enabled and the last call to vkCmdSetCoverageToColorEnableNV set the `coverageToColorEnable` to VK_TRUE, then there must be an active color attachment at the location selected by the last call to vkCmdSetCoverageToColorLocationNV `coverageToColorLocation`, with a VkFormat of VK_FORMAT_R8_UINT, VK_FORMAT_R8_SINT, VK_FORMAT_R16_UINT, VK_FORMAT_R16_SINT, VK_FORMAT_R32_UINT, or VK_FORMAT_R32_SINT

- VUID-vkCmdDrawIndirect-rasterizerDiscardEnable-09420
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, and a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, and the most recent call to vkCmdSetRasterizerDiscardEnable in the current command buffer set `rasterizerDiscardEnable` to VK_FALSE, and the last call to vkCmdSetCoverageToColorEnableNV set the `coverageToColorEnable` to VK_TRUE, then there must be an active color attachment at the location selected by the last call to vkCmdSetCoverageToColorLocationNV `coverageToColorLocation`, with a VkFormat of VK_FORMAT_R8_UINT, VK_FORMAT_R8_SINT, VK_FORMAT_R16_UINT, VK_FORMAT_R16_SINT, VK_FORMAT_R32_UINT, or VK_FORMAT_R32_SINT

- VUID-vkCmdDrawIndirect-coverageReductionMode-07491
  If the `coverageReductionMode` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV or VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic states enabled, then the current values of `coverageReductionMode`, `rasterizationSamples`, the sample counts for the color and depth/stencil attachments (if the subpass has them) must be a valid combination returned by vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV

- VUID-vkCmdDrawIndirect-viewportCount-07492
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportSwizzleStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndirect-viewportCount-07493
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic states enabled then the `viewportCount` parameter in the last call to vkCmdSetViewportSwizzleNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndirect-viewportCount-09421
  If the `VK_NV_viewport_swizzle` extension is enabled, and a shader object is bound to any graphics stage, then the `viewportCount` parameter in the last call to vkCmdSetViewportSwizzleNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndirect-rasterizationSamples-07494
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, and the `coverageReductionMode` feature is not enabled, or the current value of `coverageReductionMode` is not VK_COVERAGE_REDUCTION_MODE_TRUNCATE_NV, and the current value of `rasterizationSamples` is greater than sample count of the color attachment, then sample shading must be disabled

- VUID-vkCmdDrawIndirect-stippledLineEnable-07495
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_RECTANGULAR, then the `stippledRectangularLines` feature must be enabled

- VUID-vkCmdDrawIndirect-stippledLineEnable-07496
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_BRESENHAM, then the `stippledBresenhamLines` feature must be enabled

- VUID-vkCmdDrawIndirect-stippledLineEnable-07497
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH, then the `stippledSmoothLines` feature must be enabled

- VUID-vkCmdDrawIndirect-stippledLineEnable-07498
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_DEFAULT, then the `stippledRectangularLines` feature must be enabled and VkPhysicalDeviceLimits::`strictLines` must be VK_TRUE

- VUID-vkCmdDrawIndirect-stage-07073
  If the bound pipeline was created with the VkPipelineShaderStageCreateInfo::`stage` member of an element of VkGraphicsPipelineCreateInfo::`pStages` set to VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT, then Mesh Shader Queries must not be active

- VUID-vkCmdDrawIndirect-None-08877
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ATTACHMENT_FEEDBACK_LOOP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAttachmentFeedbackLoopEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect-None-07850
  If dynamic state was inherited from VkCommandBufferInheritanceViewportScissorInfoNV, it must be set in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect-nextStage-10745
  For each shader object bound to a graphics stage, except for shader object bound to the last graphics stage in the logical pipeline, it must have been created with a `nextStage` including the corresponding bit to the shader object bound to the following graphics stage in the logical pipeline

- VUID-vkCmdDrawIndirect-None-08684
  If there is no bound graphics pipeline, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_VERTEX_BIT

- VUID-vkCmdDrawIndirect-None-08685
  If there is no bound graphics pipeline, and the `tessellationShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT

- VUID-vkCmdDrawIndirect-None-08686
  If there is no bound graphics pipeline, and the `tessellationShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT

- VUID-vkCmdDrawIndirect-None-08687
  If there is no bound graphics pipeline, and the `geometryShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_GEOMETRY_BIT

- VUID-vkCmdDrawIndirect-None-08688
  If there is no bound graphics pipeline, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_FRAGMENT_BIT

- VUID-vkCmdDrawIndirect-None-08689
  If there is no bound graphics pipeline, and the `taskShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TASK_BIT_EXT

- VUID-vkCmdDrawIndirect-None-08690
  If there is no bound graphics pipeline, and the `meshShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-vkCmdDrawIndirect-None-08693
  If there is no bound graphics pipeline, and at least one of the `taskShader` and `meshShader` features is enabled, one of the VK_SHADER_STAGE_VERTEX_BIT or VK_SHADER_STAGE_MESH_BIT_EXT stages must have a valid `VkShaderEXT` bound, and the other must have no `VkShaderEXT` bound

- VUID-vkCmdDrawIndirect-None-08696
  If there is no bound graphics pipeline, and a valid `VkShaderEXT` is bound to the VK_SHADER_STAGE_VERTEX_BIT stage, there must be no `VkShaderEXT` bound to either the VK_SHADER_STAGE_TASK_BIT_EXT stage or the VK_SHADER_STAGE_MESH_BIT_EXT stage

- VUID-vkCmdDrawIndirect-None-08698
  If any graphics shader is bound which was created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag, then all shaders created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag in the same vkCreateShadersEXT call must also be bound

- VUID-vkCmdDrawIndirect-None-08699
  If any graphics shader is bound which was created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag, any stages in between stages whose shaders which did not create a shader with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag as part of the same vkCreateShadersEXT call must not have any `VkShaderEXT` bound

- VUID-vkCmdDrawIndirect-None-08878
  All bound graphics shader objects must have been created with identical or identically defined push constant ranges

- VUID-vkCmdDrawIndirect-None-08879
  All bound graphics shader objects must have either been created with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag set, or with identical or identically defined arrays of descriptor set layouts

- VUID-vkCmdDrawIndirect-colorAttachmentCount-09372
  If the current render pass instance was begun with vkCmdBeginRendering and a VkRenderingInfo::`colorAttachmentCount` equal to `1`, a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, and a fragment shader is bound, it must not declare the `DepthReplacing` or `StencilRefReplacingEXT` execution modes

- VUID-vkCmdDrawIndirect-pDynamicStates-08715
  If the bound graphics pipeline state includes a fragment shader stage, was created with VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`, and the fragment shader declares the `EarlyFragmentTests` execution mode and uses `OpDepthAttachmentReadEXT`, the `depthWriteEnable` parameter in the last call to vkCmdSetDepthWriteEnable must be VK_FALSE

- VUID-vkCmdDrawIndirect-pDynamicStates-08716
  If the bound graphics pipeline state includes a fragment shader stage, was created with VK_DYNAMIC_STATE_STENCIL_WRITE_MASK set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`, and the fragment shader declares the `EarlyFragmentTests` execution mode and uses `OpStencilAttachmentReadEXT`, the `writeMask` parameter in the last call to vkCmdSetStencilWriteMask must be `0`

- VUID-vkCmdDrawIndirect-None-09116
  If a shader object is bound to any graphics stage or the bound graphics pipeline was created with VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT, and the format of any color attachment is VK_FORMAT_E5B9G9R9_UFLOAT_PACK32, the corresponding element of the `pColorWriteMasks` parameter of vkCmdSetColorWriteMaskEXT must either include all of VK_COLOR_COMPONENT_R_BIT, VK_COLOR_COMPONENT_G_BIT, VK_COLOR_COMPONENT_B_BIT, and VK_COLOR_COMPONENT_A_BIT, or none of them

- VUID-vkCmdDrawIndirect-maxFragmentDualSrcAttachments-09239
  If blending is enabled for any attachment where either the source or destination blend factors for that attachment use the secondary color input, the maximum value of `Location` for any output attachment statically used in the `Fragment` `Execution` `Model` executed by this command must be less than `maxFragmentDualSrcAttachments`

- VUID-vkCmdDrawIndirect-None-09548
  If the current render pass was begun with vkCmdBeginRendering, there is no shader object bound to any graphics stage, the value of each element of VkRenderingAttachmentLocationInfo::`pColorAttachmentLocations` in the bound pipeline must match the value for the corresponding locations set currently in the current render pass instance

- VUID-vkCmdDrawIndirect-None-09549
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of each element of VkRenderingInputAttachmentIndexInfo::`pColorAttachmentInputIndices` in the bound pipeline must match the value for the corresponding index set currently in the current render pass instance

- VUID-vkCmdDrawIndirect-None-10927
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` in the bound pipeline must match the value set currently in the current render pass instance

- VUID-vkCmdDrawIndirect-None-10928
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` in the bound pipeline must match the value set currently in the current render pass instance

- VUID-vkCmdDrawIndirect-None-09642
  If the current render pass was begun with vkCmdBeginRendering with the VK_RENDERING_ENABLE_LEGACY_DITHERING_BIT_EXT flag, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_2_ENABLE_LEGACY_DITHERING_BIT_EXT

- VUID-vkCmdDrawIndirect-None-09643
  If the bound graphics pipeline was created with VK_PIPELINE_CREATE_2_ENABLE_LEGACY_DITHERING_BIT_EXT, the current render pass must have begun with vkCmdBeginRendering with the VK_RENDERING_ENABLE_LEGACY_DITHERING_BIT_EXT flag

- VUID-vkCmdDrawIndirect-None-10677
  If the per-tile execution model is enabled, the tileShadingPerTileDraw feature must be enabled

- VUID-vkCmdDrawIndirect-None-10772
  If a shader object is bound to any graphics stage, multiview functionality must not be enabled in the current render pass

- VUID-vkCmdDrawIndirect-multiviewPerViewViewports-12262
  If the `multiviewPerViewViewports` feature is enabled, then the index of the most significant bit in current render pass instance `viewMask` must be less than the current value of `viewportCount`

- VUID-vkCmdDrawIndirect-multiviewPerViewViewports-12263
  If the `multiviewPerViewViewports` feature is enabled, then the index of the most significant bit in current render pass instance `viewMask` must be less than the current value of `scissorCount`

- VUID-vkCmdDrawIndirect-flags-11521
  If current render pass instance was begun with vkCmdBeginRendering with VkRenderingInfo::`flags` which includes VK_RENDERING_FRAGMENT_REGION_BIT_EXT, and if sample shading is enabled (explicitly or implicitly), then the minimum fraction for sample shading must equal 0.0

- VUID-vkCmdDrawIndirect-None-11522
  If the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, and the `dynamicRenderingUnusedAttachments` feature is not enabled, the graphics pipeline bound must have been created with a VkCustomResolveCreateInfoEXT

- VUID-vkCmdDrawIndirect-None-11523
  If the current render pass instance was begun with vkCmdBeginRendering and does not contain a custom resolve, and the `dynamicRenderingUnusedAttachments` feature is not enabled, the graphics pipeline bound must not have been created with a VkCustomResolveCreateInfoEXT

- VUID-vkCmdDrawIndirect-customResolve-11524
  If the current render pass instance was begun with vkCmdBeginRendering and vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, the graphics pipeline bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_TRUE

- VUID-vkCmdDrawIndirect-customResolve-11525
  If the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, and vkCmdBeginCustomResolveEXT has not been recorded in the render pass instance, the graphics pipeline bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_FALSE

- VUID-vkCmdDrawIndirect-None-11861
  If the `dynamicRenderingUnusedAttachments` feature is not enabled and the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, the bound graphics pipeline must have been created with a VkCustomResolveCreateInfoEXT::`colorAttachmentCount` equal to VkRenderingInfo::`colorAttachmentCount`

- VUID-vkCmdDrawIndirect-None-11862
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound graphics pipeline

- VUID-vkCmdDrawIndirect-None-11863
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` equal to VK_NULL_HANDLE must have the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound pipeline equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirect-dynamicRenderingUnusedAttachments-11864
  If the `dynamicRenderingUnusedAttachments` feature is enabled, the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound graphics pipeline, or the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats`, if it exists, must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirect-None-11865
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirect-None-11866
  If current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`

- VUID-vkCmdDrawIndirect-dynamicRenderingUnusedAttachments-11867
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, and the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirect-None-11868
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->resolveImageView` was VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirect-None-11869
  If current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`

- VUID-vkCmdDrawIndirect-dynamicRenderingUnusedAttachments-11870
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, and the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirect-colorAttachmentCount-11871
  If the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0` and vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, then for each element of the VkRenderingInfo::`pColorAttachments` array with a `resolveImageView` not equal to VK_NULL_HANDLE, the `resolveImageView` must have been created with a sample count equal to the value of `rasterizationSamples` for the bound graphics pipeline

- VUID-vkCmdDrawIndirect-pDepthAttachment-11872
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`

- VUID-vkCmdDrawIndirect-pStencilAttachment-11873
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`

- VUID-vkCmdDrawIndirect-customResolve-11529
  If a shader object is bound to the fragment stage, the current render pass instance was begun with vkCmdBeginRendering, a fragment density map attachment is active, and vkCmdBeginCustomResolveEXT has been called, then the fragment shader object bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_TRUE

- VUID-vkCmdDrawIndirect-customResolve-11530
  If a shader object is bound to the fragment stage, the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, a fragment density map attachment is active, and vkCmdBeginCustomResolveEXT has not yet been called, then the fragment shader object bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_FALSE

- VUID-vkCmdDrawIndirect-flags-13361
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, then all bound shader objects must have been created with the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit

- VUID-vkCmdDrawIndirect-flags-13362
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, then the pipeline layout of the bound descriptor sets must have been created with VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT set

- VUID-vkCmdDrawIndirect-flags-13363
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, and any of the descriptor set layouts used to create the pipeline layout of the bound descriptor sets were created with any binding’s VkDescriptorSetLayoutBinding::`stageFlags` set with VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT, then there must be no binding with VkDescriptorSetLayoutBinding::`stageFlags` set with VK_SHADER_STAGE_TASK_BIT_EXT or VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-vkCmdDrawIndirect-flags-13364
  If there are any shader objects bound that were created with `flags` that includes both the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR and VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT bits, the pipeline layout of the bound descriptor sets must have been created with VK_PIPELINE_LAYOUT_CREATE_NO_TASK_SHADER_BIT_KHR set

- VUID-vkCmdDrawIndirect-flags-13365
  If there are any shader objects bound that were created with `flags` that includes both the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR and VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT bits, there must be no shader object bound to the VK_SHADER_STAGE_TASK_BIT_EXT stage

- VUID-vkCmdDrawIndirect-None-04007
  All vertex input bindings accessed via vertex input variables declared in the vertex shader entry point’s interface must have either valid or VK_NULL_HANDLE buffers bound

- VUID-vkCmdDrawIndirect-None-04008
  If the `nullDescriptor` feature is not enabled, all vertex input bindings accessed via vertex input variables declared in the vertex shader entry point’s interface must not be VK_NULL_HANDLE

- VUID-vkCmdDrawIndirect-None-02721
  If the `robustBufferAccess` feature is not enabled, and that pipeline was created without enabling VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS for `vertexInputs`, then for a given vertex buffer binding, any attribute data fetched must be entirely contained within the corresponding vertex buffer binding, as described in Vertex Input Description

- VUID-vkCmdDrawIndirect-format-10389
  For each vertex attribute accessed by this command, if its VkVertexInputAttributeDescription::`format` or VkVertexInputAttributeDescription2EXT::`format` is a packed format, and the `legacyVertexAttributes` feature is not enabled, the value of `attribAddress`, calculated as described in Vertex Input Calculation, must be a multiple of the size of the `format`

- VUID-vkCmdDrawIndirect-format-10390
  For each vertex attribute accessed by this command, if its VkVertexInputAttributeDescription::`format` or VkVertexInputAttributeDescription2EXT::`format` is not a packed format, and either the `legacyVertexAttributes` feature is not enabled or `format` has 64-bit components, the value of `attribAddress`, calculated as described in Vertex Input Calculation, must be a multiple of the component size of the `format`

- VUID-vkCmdDrawIndirect-None-07842
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY dynamic state enabled then vkCmdSetPrimitiveTopology must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect-dynamicPrimitiveTopologyUnrestricted-07500
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY dynamic state enabled and the `dynamicPrimitiveTopologyUnrestricted` is VK_FALSE, then the `primitiveTopology` parameter of `vkCmdSetPrimitiveTopology` must be of the same topology class as the pipeline VkPipelineInputAssemblyStateCreateInfo::`topology` state

- VUID-vkCmdDrawIndirect-primitiveTopology-10286
  If a VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage is bound, then the current value of `primitiveTopology` must be VK_PRIMITIVE_TOPOLOGY_PATCH_LIST prior to this drawing command

- VUID-vkCmdDrawIndirect-primitiveTopology-10747
  If vkCmdSetPrimitiveTopology set `primitiveTopology` to VK_PRIMITIVE_TOPOLOGY_PATCH_LIST prior to this drawing command, then a VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage must be bound

- VUID-vkCmdDrawIndirect-primitiveTopology-10748
  If vkCmdSetPrimitiveTopology set `primitiveTopology` to VK_PRIMITIVE_TOPOLOGY_POINT_LIST prior to this drawing command, the `maintenance5` feature is not enabled, both a VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT and VK_SHADER_STAGE_GEOMETRY_BIT stage are not bound, then the `Vertex` `Execution` `Model` must have a `PointSize` decorated variable that is statically written to

- VUID-vkCmdDrawIndirect-pStrides-04913
  If the bound graphics pipeline was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE dynamic state enabled, but without the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled, then vkCmdBindVertexBuffers2 with a non-`NULL` `pStrides` parameter or vkCmdBindVertexBuffers3KHR with `setStride` set to VK_TRUE must have been called and not subsequently invalidated in the current command buffer prior to this draw command

- VUID-vkCmdDrawIndirect-None-13118
  If the bound graphics pipeline was created without the VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE dynamic state enabled, without the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled, and vkCmdBindVertexBuffers3KHR was called and not subsequently invalidated in the current command buffer prior to this draw command, the value of `setStride` in each of its `pBindInfos` elements must have been VK_FALSE

- VUID-vkCmdDrawIndirect-None-04914
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled then vkCmdSetVertexInputEXT must have been called and not subsequently invalidated in the current command buffer prior to this draw command

- VUID-vkCmdDrawIndirect-Input-07939
  If the `vertexAttributeRobustness` feature is not enabled, and the `maintenance9` feature is not enabled, and there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled then all variables with the `Input` storage class decorated with `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` must contain a location in VkVertexInputAttributeDescription2EXT::`location`

- VUID-vkCmdDrawIndirect-Input-08734
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled and either the `legacyVertexAttributes` feature is not enabled or the SPIR-V Type associated with a given `Input` variable of the corresponding `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` is 64-bit, then the numeric type associated with all `Input` variables of the corresponding `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` must be the same as VkVertexInputAttributeDescription2EXT::`format`

- VUID-vkCmdDrawIndirect-format-08936
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled and VkVertexInputAttributeDescription2EXT::`format` has a 64-bit component, then the scalar width associated with all `Input` variables of the corresponding `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` must be 64-bit

- VUID-vkCmdDrawIndirect-format-08937
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled and the scalar width associated with a `Location` decorated `Input` variable in the `Vertex` `Execution` `Model` `OpEntryPoint` is 64-bit, then the corresponding VkVertexInputAttributeDescription2EXT::`format` must have a 64-bit component

- VUID-vkCmdDrawIndirect-None-09203
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled and VkVertexInputAttributeDescription2EXT::`format` has a 64-bit component, then all `Input` variables at the corresponding `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` must not use components that are not present in the format

- VUID-vkCmdDrawIndirect-None-04875
  If there is a shader object bound to the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage or the bound graphics pipeline state was created with both a VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage and the VK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT dynamic state enabled, and the current value of `primitiveTopology` is VK_PRIMITIVE_TOPOLOGY_PATCH_LIST, then vkCmdSetPatchControlPointsEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect-None-04879
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE dynamic state enabled then vkCmdSetPrimitiveRestartEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect-None-09637
  If the `primitiveTopologyListRestart` feature is not enabled, the input assembly is VK_PRIMITIVE_TOPOLOGY_POINT_LIST, VK_PRIMITIVE_TOPOLOGY_LINE_LIST, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY, or VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY, there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE dynamic state enabled, then vkCmdSetPrimitiveRestartEnable must be VK_FALSE

- VUID-vkCmdDrawIndirect-None-10909
  If the `primitiveTopologyPatchListRestart` feature is not enabled, the input assembly is VK_PRIMITIVE_TOPOLOGY_PATCH_LIST, there is a shader object bound to the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE dynamic state enabled then vkCmdSetPrimitiveRestartEnable must be VK_FALSE

- VUID-vkCmdDrawIndirect-stage-06481
  The bound graphics pipeline must not have been created with the VkPipelineShaderStageCreateInfo::`stage` member of any element of VkGraphicsPipelineCreateInfo::`pStages` set to VK_SHADER_STAGE_TASK_BIT_EXT or VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-vkCmdDrawIndirect-None-08885
  There must be no shader object bound to either of the VK_SHADER_STAGE_TASK_BIT_EXT or VK_SHADER_STAGE_MESH_BIT_EXT stages

- VUID-vkCmdDrawIndirect-None-07619
  If a shader object is bound to the VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stage or a graphics pipeline is bound which was created with both a VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stage and the VK_DYNAMIC_STATE_TESSELLATION_DOMAIN_ORIGIN_EXT dynamic state enabled, then vkCmdSetTessellationDomainOriginEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirect-OpExecutionMode-12239
  If a shader is bound to both the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stages, and if both stages contain an `OpExecutionMode` instruction specifying the type of subdivision, they must be the same

- VUID-vkCmdDrawIndirect-OpExecutionMode-12240
  If a shader is bound to both the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stages, and if both stages contain an `OpExecutionMode` instruction specifying the orientation of triangles, they must be the same

- VUID-vkCmdDrawIndirect-OpExecutionMode-12241
  If a shader is bound to both the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stages, and if both stages contain an `OpExecutionMode` instruction specifying the segment spacing, they must be the same

- VUID-vkCmdDrawIndirect-OpExecutionMode-12242
  If a shader is bound to both the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stages, and if both stages contain an `OpExecutionMode` instruction specifying the output patch size, they must be the same

- VUID-vkCmdDrawIndirect-buffer-02708
  If `buffer` is non-sparse then it must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-vkCmdDrawIndirect-buffer-02709
  `buffer` must have been created with the VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT usage flag set

- VUID-vkCmdDrawIndirect-offset-02710
  `offset` must be a multiple of `4`

- VUID-vkCmdDrawIndirect-commandBuffer-02711
  `commandBuffer` must not be a protected command buffer

- VUID-vkCmdDrawIndirect-drawCount-02718
  If the `multiDrawIndirect` feature is not enabled, `drawCount` must be `0` or `1`

- VUID-vkCmdDrawIndirect-drawCount-02719
  `drawCount` must be less than or equal to `VkPhysicalDeviceLimits`::`maxDrawIndirectCount`

- VUID-vkCmdDrawIndirect-drawCount-00476
  If `drawCount` is greater than `1`, `stride` must be a multiple of `4` and must be greater than or equal to `sizeof`(`VkDrawIndirectCommand`)

- VUID-vkCmdDrawIndirect-drawCount-00487
  If `drawCount` is equal to `1`, (`offset` + `sizeof`(VkDrawIndirectCommand)) must be less than or equal to the size of `buffer`

- VUID-vkCmdDrawIndirect-drawCount-00488
  If `drawCount` is greater than `1`, (`stride` × (`drawCount` - 1) + `offset` + `sizeof`(VkDrawIndirectCommand)) must be less than or equal to the size of `buffer`

Valid Usage (Implicit)

- VUID-vkCmdDrawIndirect-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdDrawIndirect-buffer-parameter
  `buffer` must be a valid VkBuffer handle

- VUID-vkCmdDrawIndirect-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdDrawIndirect-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdDrawIndirect-renderpass
  This command must only be called inside of a render pass instance

- VUID-vkCmdDrawIndirect-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdDrawIndirect-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdDrawIndirect-commonparent
  Both of `buffer`, and `commandBuffer` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Inside | Outside | VK_QUEUE_GRAPHICS_BIT | Action

Conditional Rendering

vkCmdDrawIndirect is affected by conditional rendering

The `VkDrawIndirectCommand` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkDrawIndirectCommand {
        uint32_t    vertexCount;
        uint32_t    instanceCount;
        uint32_t    firstVertex;
        uint32_t    firstInstance;
    } VkDrawIndirectCommand;

- `vertexCount` is the number of vertices to draw.

- `instanceCount` is the number of instances to draw.

- `firstVertex` is the index of the first vertex to draw.

- `firstInstance` is the instance ID of the first instance to draw.

The members of `VkDrawIndirectCommand` have the same meaning as the similarly named parameters of vkCmdDraw.

Valid Usage

- VUID-VkDrawIndirectCommand-pNext-09461
  If the bound graphics pipeline state was created with VkPipelineVertexInputDivisorStateCreateInfo in the `pNext` chain of VkGraphicsPipelineCreateInfo::`pVertexInputState`, any member of VkPipelineVertexInputDivisorStateCreateInfo::`pVertexBindingDivisors` has a value other than `1` in `divisor`, and VkPhysicalDeviceVertexAttributeDivisorProperties::`supportsNonZeroFirstInstance` is VK_FALSE, then `firstInstance` must be `0`

- VUID-VkDrawIndirectCommand-None-09462
  If shader objects are used for drawing or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled, any member of the `pVertexBindingDescriptions` parameter to the vkCmdSetVertexInputEXT call that sets this dynamic state has a value other than `1` in `divisor`, and VkPhysicalDeviceVertexAttributeDivisorProperties::`supportsNonZeroFirstInstance` is VK_FALSE, then `firstInstance` must be `0`

- VUID-VkDrawIndirectCommand-firstInstance-00501
  If the `drawIndirectFirstInstance` feature is not enabled, `firstInstance` must be `0`

`VkDrawIndirectCount2InfoKHR` is defined as:

    // Provided by VK_KHR_device_address_commands
    typedef struct VkDrawIndirectCount2InfoKHR {
        VkStructureType                   sType;
        const void*                       pNext;
        VkStridedDeviceAddressRangeKHR    addressRange;
        VkAddressCommandFlagsKHR          addressFlags;
        VkDeviceAddressRangeKHR           countAddressRange;
        VkAddressCommandFlagsKHR          countAddressFlags;
        uint32_t                          maxDrawCount;
    } VkDrawIndirectCount2InfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `addressRange` is the VkStridedDeviceAddressRangeKHR containing draw parameters.

- `addressFlags` is a VkAddressCommandFlagsKHR value defining the flags for the address range.

- `countAddressRange` is the VkDeviceAddressRangeKHR containing the draw count.

- `countAddressFlags` is a VkAddressCommandFlagsKHR value defining the flags for the count address range.

- `maxDrawCount` specifies the maximum number of draws that will be executed. The actual number of executed draw calls is the minimum of the count specified in `countAddressRange` and `maxDrawCount`.

Valid Usage

- VUID-VkDrawIndirectCount2InfoKHR-addressRange-13097
  If the range specified by `addressRange` is not bound completely to memory when accessed, `addressFlags` must not include VK_ADDRESS_COMMAND_FULLY_BOUND_BIT_KHR

- VUID-VkDrawIndirectCount2InfoKHR-addressRange-13098
  If the buffer from which the range specified by `addressRange` was created with VK_BUFFER_CREATE_PROTECTED_BIT, and `protectedNoFault` is not supported, `addressFlags` must include VK_ADDRESS_COMMAND_PROTECTED_BIT_KHR

- VUID-VkDrawIndirectCount2InfoKHR-addressRange-13099
  If the buffer from which the range specified by `addressRange` was created without VK_BUFFER_CREATE_PROTECTED_BIT, and `protectedNoFault` is not supported, `addressFlags` must not include VK_ADDRESS_COMMAND_PROTECTED_BIT_KHR

- VUID-VkDrawIndirectCount2InfoKHR-addressFlags-13100
  `addressFlags` must not include both VK_ADDRESS_COMMAND_STORAGE_BUFFER_USAGE_BIT_KHR and VK_ADDRESS_COMMAND_UNKNOWN_STORAGE_BUFFER_USAGE_BIT_KHR

- VUID-VkDrawIndirectCount2InfoKHR-addressRange-13122
  If any buffer, which is bound to a range of VkDeviceMemory that overlaps the range backing `addressRange`, was created with VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, `addressFlags` must include VK_ADDRESS_COMMAND_STORAGE_BUFFER_USAGE_BIT_KHR or VK_ADDRESS_COMMAND_UNKNOWN_STORAGE_BUFFER_USAGE_BIT_KHR

- VUID-VkDrawIndirectCount2InfoKHR-addressRange-13123
  If any buffer, which is bound to a range of VkDeviceMemory that overlaps the range backing `addressRange`, was created without VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, `addressFlags` must not include VK_ADDRESS_COMMAND_STORAGE_BUFFER_USAGE_BIT_KHR

- VUID-VkDrawIndirectCount2InfoKHR-addressFlags-13101
  `addressFlags` must not include both VK_ADDRESS_COMMAND_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR and VK_ADDRESS_COMMAND_UNKNOWN_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR

- VUID-VkDrawIndirectCount2InfoKHR-addressRange-13124
  If any buffer, which is bound to a range of VkDeviceMemory that overlaps the range backing `addressRange`, was created with VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT, `addressFlags` must include VK_ADDRESS_COMMAND_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR or VK_ADDRESS_COMMAND_UNKNOWN_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR

- VUID-VkDrawIndirectCount2InfoKHR-addressRange-13125
  If any buffer, which is bound to a range of VkDeviceMemory that overlaps the range backing `addressRange`, was created without VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT, `addressFlags` must not include VK_ADDRESS_COMMAND_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR

- VUID-VkDrawIndirectCount2InfoKHR-addressRange-13107
  The buffer from which `addressRange` was queried must have been created with VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT usage flag

- VUID-VkDrawIndirectCount2InfoKHR-protectedNoFault-13108
  If `protectedNoFault` is not supported, the buffer from which `addressRange` was queried must not have been created with VK_BUFFER_CREATE_PROTECTED_BIT

- VUID-VkDrawIndirectCount2InfoKHR-addressRange-13109
  `addressRange.address` must be a multiple of 4

- VUID-VkDrawIndirectCount2InfoKHR-countAddressRange-13097
  If the range specified by `countAddressRange` is not bound completely to memory when accessed, `countAddressFlags` must not include VK_ADDRESS_COMMAND_FULLY_BOUND_BIT_KHR

- VUID-VkDrawIndirectCount2InfoKHR-countAddressRange-13098
  If the buffer from which the range specified by `countAddressRange` was created with VK_BUFFER_CREATE_PROTECTED_BIT, and `protectedNoFault` is not supported, `countAddressFlags` must include VK_ADDRESS_COMMAND_PROTECTED_BIT_KHR

- VUID-VkDrawIndirectCount2InfoKHR-countAddressRange-13099
  If the buffer from which the range specified by `countAddressRange` was created without VK_BUFFER_CREATE_PROTECTED_BIT, and `protectedNoFault` is not supported, `countAddressFlags` must not include VK_ADDRESS_COMMAND_PROTECTED_BIT_KHR

- VUID-VkDrawIndirectCount2InfoKHR-countAddressFlags-13100
  `countAddressFlags` must not include both VK_ADDRESS_COMMAND_STORAGE_BUFFER_USAGE_BIT_KHR and VK_ADDRESS_COMMAND_UNKNOWN_STORAGE_BUFFER_USAGE_BIT_KHR

- VUID-VkDrawIndirectCount2InfoKHR-countAddressRange-13122
  If any buffer, which is bound to a range of VkDeviceMemory that overlaps the range backing `countAddressRange`, was created with VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, `countAddressFlags` must include VK_ADDRESS_COMMAND_STORAGE_BUFFER_USAGE_BIT_KHR or VK_ADDRESS_COMMAND_UNKNOWN_STORAGE_BUFFER_USAGE_BIT_KHR

- VUID-VkDrawIndirectCount2InfoKHR-countAddressRange-13123
  If any buffer, which is bound to a range of VkDeviceMemory that overlaps the range backing `countAddressRange`, was created without VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, `countAddressFlags` must not include VK_ADDRESS_COMMAND_STORAGE_BUFFER_USAGE_BIT_KHR

- VUID-VkDrawIndirectCount2InfoKHR-countAddressFlags-13101
  `countAddressFlags` must not include both VK_ADDRESS_COMMAND_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR and VK_ADDRESS_COMMAND_UNKNOWN_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR

- VUID-VkDrawIndirectCount2InfoKHR-countAddressRange-13124
  If any buffer, which is bound to a range of VkDeviceMemory that overlaps the range backing `countAddressRange`, was created with VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT, `countAddressFlags` must include VK_ADDRESS_COMMAND_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR or VK_ADDRESS_COMMAND_UNKNOWN_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR

- VUID-VkDrawIndirectCount2InfoKHR-countAddressRange-13125
  If any buffer, which is bound to a range of VkDeviceMemory that overlaps the range backing `countAddressRange`, was created without VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT, `countAddressFlags` must not include VK_ADDRESS_COMMAND_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR

- VUID-VkDrawIndirectCount2InfoKHR-countAddressRange-13114
  The buffer from which `countAddressRange` was queried must have been created with VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT usage flag

- VUID-VkDrawIndirectCount2InfoKHR-countAddressRange-13115
  `countAddressRange.address` must be a multiple of `4`

- VUID-VkDrawIndirectCount2InfoKHR-countAddressRange-13116
  The count stored in `countAddressRange` must be less than or equal to VkPhysicalDeviceLimits::`maxDrawIndirectCount`

- VUID-VkDrawIndirectCount2InfoKHR-countAddressRange-13117
  `countAddressRange.size` must be greater than or equal to 4

Valid Usage (Implicit)

- VUID-VkDrawIndirectCount2InfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DRAW_INDIRECT_COUNT_2_INFO_KHR

- VUID-VkDrawIndirectCount2InfoKHR-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkDrawIndirectCount2InfoKHR-addressFlags-parameter
  `addressFlags` must be a valid combination of VkAddressCommandFlagBitsKHR values

- VUID-VkDrawIndirectCount2InfoKHR-countAddressFlags-parameter
  `countAddressFlags` must be a valid combination of VkAddressCommandFlagBitsKHR values

To record a non-indexed indirect drawing command, call:

    // Provided by VK_KHR_device_address_commands with VK_KHR_draw_indirect_count or VK_VERSION_1_2
    void vkCmdDrawIndirectCount2KHR(
        VkCommandBuffer                             commandBuffer,
        const VkDrawIndirectCount2InfoKHR*          pInfo);

- `commandBuffer` is the command buffer into which the command is recorded.

- `pInfo` is a pointer to a VkDrawIndirectCount2InfoKHR structure defining parameters of this command.

`vkCmdDrawIndirectCount2KHR` behaves similarly to vkCmdDrawIndirect2KHR except that the draw count is read by the device from an address range during execution. The command will read an unsigned 32-bit integer from `pInfo->countAddressRange` and use this as the draw count.

Valid Usage

- VUID-vkCmdDrawIndirectCount2KHR-magFilter-04553
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdDrawIndirectCount2KHR-magFilter-09598
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdDrawIndirectCount2KHR-mipmapMode-04770
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdDrawIndirectCount2KHR-mipmapMode-09599
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdDrawIndirectCount2KHR-unnormalizedCoordinates-09635
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `levelCount` and `layerCount` must be 1

- VUID-vkCmdDrawIndirectCount2KHR-None-08609
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `viewType` must be VK_IMAGE_VIEW_TYPE_1D or VK_IMAGE_VIEW_TYPE_2D

- VUID-vkCmdDrawIndirectCount2KHR-None-08610
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions with `ImplicitLod`, `Dref` or `Proj` in their name

- VUID-vkCmdDrawIndirectCount2KHR-None-08611
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions that includes a LOD bias or any offset values

- VUID-vkCmdDrawIndirectCount2KHR-None-06479
  If a VkImageView is sampled with depth comparison, the image view’s format features must contain VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT

- VUID-vkCmdDrawIndirectCount2KHR-None-02691
  If a VkImageView is accessed using atomic operations as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT

- VUID-vkCmdDrawIndirectCount2KHR-None-07888
  If a VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER descriptor is accessed using atomic operations as a result of this command, then the storage texel buffer’s format features must contain VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT

- VUID-vkCmdDrawIndirectCount2KHR-None-02692
  If a VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT

- VUID-vkCmdDrawIndirectCount2KHR-None-02693
  If the VK_EXT_filter_cubic extension is not enabled and any VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, it must not have a VkImageViewType of VK_IMAGE_VIEW_TYPE_3D, VK_IMAGE_VIEW_TYPE_CUBE, or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY

- VUID-vkCmdDrawIndirectCount2KHR-filterCubic-02694
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have a VkImageViewType and format that supports cubic filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubic` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdDrawIndirectCount2KHR-filterCubicMinmax-02695
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX as a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubicMinmax` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdDrawIndirectCount2KHR-cubicRangeClamp-09212
  If the `cubicRangeClamp` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must not have a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM

- VUID-vkCmdDrawIndirectCount2KHR-reductionMode-09213
  Any VkImageView being sampled with a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM as a result of this command must sample with VK_FILTER_CUBIC_EXT

- VUID-vkCmdDrawIndirectCount2KHR-selectableCubicWeights-09214
  If the `selectableCubicWeights` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have VkSamplerCubicWeightsCreateInfoQCOM::`cubicWeights` equal to VK_CUBIC_FILTER_WEIGHTS_CATMULL_ROM_QCOM

- VUID-vkCmdDrawIndirectCount2KHR-flags-02696
  Any VkImage created with a VkImageCreateInfo::`flags` containing VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV sampled as a result of this command must only be sampled using a VkSamplerAddressMode of VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawIndirectCount2KHR-OpTypeImage-07027
  For any VkImageView being written as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawIndirectCount2KHR-OpTypeImage-07028
  For any VkImageView being read as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawIndirectCount2KHR-OpTypeImage-07029
  For any VkBufferView being written as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown`, the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawIndirectCount2KHR-OpTypeImage-07030
  Any VkBufferView being read as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown` then the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawIndirectCount2KHR-None-08600
  If a a bound shader was created with a pipeline layout and statically uses a set n, a descriptor set must have been bound to n at the same pipeline bind point, with layouts compatible for set n with the layout(s) used to create the shader, as described in Pipeline Layout Compatibility

- VUID-vkCmdDrawIndirectCount2KHR-None-08601
  If a a bound shader was created with a pipeline layout or specified push constant ranges and statically uses a push constant value, that value must have been set for the same pipeline bind point, with push constant ranges that are compatible with the push constant range used to create the shader

- VUID-vkCmdDrawIndirectCount2KHR-None-10068
  For each array of resources that is used by a bound shader, the indices used to access members of the array must be less than the descriptor count for the identified binding in the descriptor sets used by this command

- VUID-vkCmdDrawIndirectCount2KHR-None-08114
  Descriptors in each bound descriptor set, specified via vkCmdBindDescriptorSets, must be valid if they are accessed as described by descriptor validity by the VkPipeline bound to the pipeline bind point used by this command and the bound VkPipeline was not created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawIndirectCount2KHR-imageLayout-00344
  If an image descriptor is accessed by a shader, the VkImageLayout must match the subresource accessible from the VkImageView as defined by the image layout matching rules

- VUID-vkCmdDrawIndirectCount2KHR-None-08115
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdBindDescriptorSets, the bound VkPipeline must have been created without VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawIndirectCount2KHR-None-08116
  Descriptors in bound descriptor buffers, specified via vkCmdSetDescriptorBufferOffsetsEXT, must be valid if they are dynamically accessed

- VUID-vkCmdDrawIndirectCount2KHR-None-08117
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdSetDescriptorBufferOffsetsEXT, the bound VkPipeline must have been created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawIndirectCount2KHR-None-08119
  If a descriptor is dynamically used with a VkPipeline created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdDrawIndirectCount2KHR-None-08605
  If a descriptor is dynamically used with a VkShaderEXT created with a `VkDescriptorSetLayout` that was created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdDrawIndirectCount2KHR-None-08606
  If the `shaderObject` feature is not enabled, a valid pipeline must be bound to the pipeline bind point used by this command

- VUID-vkCmdDrawIndirectCount2KHR-None-08608
  If a pipeline is bound to the pipeline bind point used by this command, there must not have been any calls to dynamic state setting commands for any state specified statically in the VkPipeline object bound to the pipeline bind point used by this command, since that pipeline was bound

- VUID-vkCmdDrawIndirectCount2KHR-uniformBuffers-06935
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawIndirectCount2KHR-None-08612
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawIndirectCount2KHR-storageBuffers-06936
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawIndirectCount2KHR-None-08613
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a storage buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawIndirectCount2KHR-commandBuffer-02707
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, any resource accessed by bound shaders must not be a protected resource

- VUID-vkCmdDrawIndirectCount2KHR-viewType-07752
  If a VkImageView is accessed as a result of this command, then the image view’s `viewType` must match the `Dim` operand of the `OpTypeImage` as described in Compatibility Between SPIR-V Image Dimensions and Vulkan ImageView Types

- VUID-vkCmdDrawIndirectCount2KHR-format-07753
  If a VkImageView or VkBufferView is accessed as a result of this command, then the numeric type of the view’s `format` and the `Sampled` `Type` operand of the `OpTypeImage` must match

- VUID-vkCmdDrawIndirectCount2KHR-OpImageWrite-08795
  If a VkImageView created with a format other than VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the image view’s format

- VUID-vkCmdDrawIndirectCount2KHR-OpImageWrite-08796
  If a VkImageView created with the format VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have four components

- VUID-vkCmdDrawIndirectCount2KHR-OpImageWrite-04469
  If a VkBufferView is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the buffer view’s format

- VUID-vkCmdDrawIndirectCount2KHR-SampledType-04470
  If a VkImageView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdDrawIndirectCount2KHR-SampledType-04471
  If a VkImageView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdDrawIndirectCount2KHR-SampledType-04472
  If a VkBufferView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdDrawIndirectCount2KHR-SampledType-04473
  If a VkBufferView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdDrawIndirectCount2KHR-sparseImageInt64Atomics-04474
  If the `sparseImageInt64Atomics` feature is not enabled, VkImage objects created with the VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdDrawIndirectCount2KHR-sparseImageInt64Atomics-04475
  If the `sparseImageInt64Atomics` feature is not enabled, VkBuffer objects created with the VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdDrawIndirectCount2KHR-OpImageSampleWeightedQCOM-06971
  If `OpImageSampleWeightedQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_SAMPLED_IMAGE_BIT_QCOM

- VUID-vkCmdDrawIndirectCount2KHR-OpImageSampleWeightedQCOM-06972
  If `OpImageSampleWeightedQCOM` uses a VkImageView as a sample weight image as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_IMAGE_BIT_QCOM

- VUID-vkCmdDrawIndirectCount2KHR-OpImageBoxFilterQCOM-06973
  If `OpImageBoxFilterQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BOX_FILTER_SAMPLED_BIT_QCOM

- VUID-vkCmdDrawIndirectCount2KHR-OpImageBlockMatchSSDQCOM-06974
  If `OpImageBlockMatchSSDQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdDrawIndirectCount2KHR-OpImageBlockMatchSADQCOM-12420
  If `OpImageBlockMatchSADQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdDrawIndirectCount2KHR-OpImageBlockMatchSADQCOM-06976
  If `OpImageBlockMatchSADQCOM` or OpImageBlockMatchSSDQCOM is used to read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdDrawIndirectCount2KHR-OpImageSampleWeightedQCOM-06977
  If `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdDrawIndirectCount2KHR-OpImageSampleWeightedQCOM-06978
  If any command other than `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must not have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdDrawIndirectCount2KHR-OpImageBlockMatchWindow-09215
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM

- VUID-vkCmdDrawIndirectCount2KHR-OpImageBlockMatchWindow-09216
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format must be a single-component format

- VUID-vkCmdDrawIndirectCount2KHR-OpImageBlockMatchWindow-09217
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdDrawIndirectCount2KHR-OpImageBlockMatchWindow-12421
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the `blockMatchExtendedClampToEdge` feature is not enabled, the input sampler must not have been created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawIndirectCount2KHR-addressModeU-12422
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the input sampler was created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, then the sampler must have been created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawIndirectCount2KHR-None-07288
  Any shader invocation executed by this command must terminate

- VUID-vkCmdDrawIndirectCount2KHR-None-09600
  If a descriptor with type equal to any of VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, or VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT is accessed as a result of this command, all image subresources identified by that descriptor must be in the image layout identified when the descriptor was written

- VUID-vkCmdDrawIndirectCount2KHR-micromap-11636
  If an acceleration structure is accessed as a result of this command through an `OpRayQueryProceedKHR` operation , the `VK_EXT_opacity_micromap` extension is not enabled, and the acceleration structure is built using geometry with a VkAccelerationStructureTrianglesOpacityMicromapKHR structure included in its `pNext` chain, the shader must have specified a `OpacityMicromapIdKHR` execution mode with its specialization constant operand equal to VK_TRUE

- VUID-vkCmdDrawIndirectCount2KHR-micromap-11637
  If an acceleration structure is accessed as a result of this command and the acceleration structure was constructed through deserialization, all micromap arrays referenced by the acceleration structure that were not replaced by an acceleration structure update command must have been deserialized using the serialized data of the corresponding micromaps used to originally build the acceleration structure prior to the execution of this command on the device

- VUID-vkCmdDrawIndirectCount2KHR-micromap-11638
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkPipeline bound to the pipeline bind point used by this command must not have been created with `flags` that includes VK_PIPELINE_CREATE_2_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_KHR

- VUID-vkCmdDrawIndirectCount2KHR-micromap-11639
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkShaderEXT that accessed the descriptor must not have been created with `flags` that includes VK_SHADER_CREATE_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_EXT

- VUID-vkCmdDrawIndirectCount2KHR-commandBuffer-10746
  The `VkDeviceMemory` object allocated from a `VkMemoryHeap` with the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property that is bound to a resource accessed as a result of this command must be the active bound tile memory object in `commandBuffer`

- VUID-vkCmdDrawIndirectCount2KHR-None-10678
  If this command is recorded inside a tile shading render pass instance, the stages corresponding to the pipeline bind point used by this command must only include VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_FRAGMENT_BIT, and/or VK_SHADER_STAGE_COMPUTE_BIT

- VUID-vkCmdDrawIndirectCount2KHR-None-10679
  If this command is recorded where per-tile execution model is enabled, there must be no access to any image while the image was be transitioned to the VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT layout

- VUID-vkCmdDrawIndirectCount2KHR-pDescription-09900
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the underlying VkTensorARM object must have been created with the VK_TENSOR_USAGE_SHADER_BIT_ARM usage flag set

- VUID-vkCmdDrawIndirectCount2KHR-dimensionCount-09905
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the `Rank` of the `OpTypeTensorARM` of the tensor resource variable must be equal to the `dimensionCount` provided via VkTensorCreateInfoARM::`pDescription` when creating the underlying VkTensorARM object

- VUID-vkCmdDrawIndirectCount2KHR-OpTypeTensorARM-09906
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the element type of the `OpTypeTensorARM` of the tensor resource variable must be compatible with the VkFormat of the VkTensorViewARM used for the access

- VUID-vkCmdDrawIndirectCount2KHR-OpTensorReadARM-12462
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, using `OpTensorReadARM` or `OpTensorWriteARM`, and the underlying VkTensorARM object was created with a VK_TENSOR_TILING_BRICK_16_WIDE_ARM, VK_TENSOR_TILING_BRICK_8_WIDE_ARM, VK_TENSOR_TILING_BRICK_4_WIDE_ARM, VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_ARM, or VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_64K_ARM VkTensorTilingARM, and the object read or written is an array, then the innermost coordinate provided to `OpTensorReadARM` or `OpTensorWriteARM` via the `Coordinates` operand must be a multiple of the largest power of 2 that is less than or equal to the number of components of the array

- VUID-vkCmdDrawIndirectCount2KHR-pNext-12463
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command and the corresponding VkTensorARM object was created with a VkTensorRollingBackingCreateInfoARM structure in the `pNext` chain of VkTensorCreateInfoARM, then the number of elements accessed with one `OpTensorReadARM` or `OpTensorWriteARM`, must be less than or equal to the number of elements available from the starting coordinate in the rolling backing along the innermost dimension, defined as `wraps`[`dimensionCount` - 1] - InnermostCoordinate % `wraps`[`dimensionCount` - 1] where InnermostCoordinate is the last component of the coordinates array provided via the `Coordinates` operand

- VUID-vkCmdDrawIndirectCount2KHR-None-12472
  Descriptors dynamically accessed in bound descriptor heaps must be valid

- VUID-vkCmdDrawIndirectCount2KHR-None-11297
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a `OpTypeStruct` decorated with `Block` or `BufferBlock` using that mapping, the calculated offset for the resource heap must be a multiple of `bufferDescriptorAlignment`

- VUID-vkCmdDrawIndirectCount2KHR-None-11298
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeImage` or `OpTypeSampledImage` using that mapping, the calculated offset for the resource heap must be a multiple of `imageDescriptorAlignment`

- VUID-vkCmdDrawIndirectCount2KHR-None-11299
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeSampler` or `OpTypeSampledImage` using that mapping, the calculated offset for the sampler heap must be a multiple of `samplerDescriptorAlignment`

- VUID-vkCmdDrawIndirectCount2KHR-None-11397
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeTensorARM` using that mapping, the calculated offset for the resource heap must be a multiple of `tensorDescriptorAlignment`

- VUID-vkCmdDrawIndirectCount2KHR-None-11300
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 4

- VUID-vkCmdDrawIndirectCount2KHR-None-11301
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdDrawIndirectCount2KHR-None-11302
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress

- VUID-vkCmdDrawIndirectCount2KHR-None-11304
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 8

- VUID-vkCmdDrawIndirectCount2KHR-None-11305
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdDrawIndirectCount2KHR-None-11306
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address pointed to by the address in push data must be a valid VkDeviceAddress

- VUID-vkCmdDrawIndirectCount2KHR-None-11308
  For each descriptor heap that is statically used by a bound shader, either directly or via a descriptor mapping, a valid descriptor heap must be bound

- VUID-vkCmdDrawIndirectCount2KHR-None-11309
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, execution of this command must not result in any descriptor read accessing data outside of the user range of the respective heap bound by `vkCmdBind*HeapEXT` commands

- VUID-vkCmdDrawIndirectCount2KHR-None-11372
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer or uniform texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified via VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawIndirectCount2KHR-None-11373
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer or storage texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawIndirectCount2KHR-None-11374
  If the `robustBufferAccess2` feature is not enabled, the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, uniform texel buffer, storage buffer, or storage texel buffer, that shader must not access values outside of the range of the buffer as specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawIndirectCount2KHR-pBindInfo-11375
  If any bound shader uses an embedded sampler via a descriptor mapping, the value of `pBindInfo->reservedRangeSize` set for vkCmdBindSamplerHeapEXT must be greater than or equal to `minSamplerHeapReservedRangeWithEmbedded`

- VUID-vkCmdDrawIndirectCount2KHR-None-11376
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, and that shader statically uses a push constant value, that value must have been set by vkCmdPushDataEXT

- VUID-vkCmdDrawIndirectCount2KHR-None-11398
  If a bound shader was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the access must not be out of bounds

- VUID-vkCmdDrawIndirectCount2KHR-None-11437
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the buffer from which the address in push data was queried must have been created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdDrawIndirectCount2KHR-None-11438
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdDrawIndirectCount2KHR-None-11441
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must be aligned to `minUniformBufferOffsetAlignment`

- VUID-vkCmdDrawIndirectCount2KHR-None-11439
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_STORAGE_BUFFER_BIT usage flag set

- VUID-vkCmdDrawIndirectCount2KHR-None-11442
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must be aligned to `minStorageBufferOffsetAlignment`

- VUID-vkCmdDrawIndirectCount2KHR-None-11485
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses an acceleration structure using that mapping, the address that the acceleration structure is mapped to must be an acceleration structure address retrieved from a VkAccelerationStructureKHR object via vkGetAccelerationStructureDeviceAddressKHR or handle retrieved from a VkAccelerationStructureNV object via vkGetAccelerationStructureHandleNV

- VUID-vkCmdDrawIndirectCount2KHR-index-11450
  If a shader uses a sampler descriptor to sample an image as a result of this command, and that sampler descriptor uses a custom border color with an index defined by VkSamplerCustomBorderColorIndexCreateInfoEXT, the value of VkSamplerCustomBorderColorIndexCreateInfoEXT::`index` must have been registered before this command was recorded, and still be registered during the sampling operation, with an identically defined color

- VUID-vkCmdDrawIndirectCount2KHR-protectedNoFault-11455
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, the address that the resource is mapped to must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdDrawIndirectCount2KHR-protectedNoFault-11456
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, the address of the indirect memory must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdDrawIndirectCount2KHR-renderPass-02684
  The current render pass must be compatible with the `renderPass` member of the `VkGraphicsPipelineCreateInfo` structure specified when creating the `VkPipeline` bound to VK_PIPELINE_BIND_POINT_GRAPHICS

- VUID-vkCmdDrawIndirectCount2KHR-subpass-02685
  The subpass index of the current render pass must be equal to the `subpass` member of the `VkGraphicsPipelineCreateInfo` structure specified when creating the `VkPipeline` bound to VK_PIPELINE_BIND_POINT_GRAPHICS

- VUID-vkCmdDrawIndirectCount2KHR-OpTypeImage-07468
  If any shader executed by this pipeline accesses an `OpTypeImage` variable with a `Dim` operand of `SubpassData`, it must be decorated with an `InputAttachmentIndex` that corresponds to a valid input attachment in the current subpass

- VUID-vkCmdDrawIndirectCount2KHR-None-07469
  Input attachment views accessed in a subpass must be created with the same VkFormat as the corresponding subpass definition, and be created with a VkImageView that is compatible with the attachment referenced by the subpass' `pInputAttachments`[`InputAttachmentIndex`] in the bound VkFramebuffer as specified by Fragment Input Attachment Compatibility

- VUID-vkCmdDrawIndirectCount2KHR-pDepthInputAttachmentIndex-09595
  Input attachment views accessed in a dynamic render pass with a `InputAttachmentIndex` referenced by VkRenderingInputAttachmentIndexInfo, or no `InputAttachmentIndex` if VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` or VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` are `NULL`, must be created with a VkImageView that is compatible with the corresponding color, depth, or stencil attachment in VkRenderingInfo

- VUID-vkCmdDrawIndirectCount2KHR-pDepthInputAttachmentIndex-09596
  Input attachment views accessed in a dynamic render pass via a shader object must have an `InputAttachmentIndex` if both VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` and VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` are non-`NULL`

- VUID-vkCmdDrawIndirectCount2KHR-InputAttachmentIndex-09597
  If an input attachment view accessed in a dynamic render pass via a shader object has an `InputAttachmentIndex`, the `InputAttachmentIndex` must match an index in VkRenderingInputAttachmentIndexInfo

- VUID-vkCmdDrawIndirectCount2KHR-None-06537
  Memory backing image subresources used as attachments in the current render pass must not be written in any way other than as an attachment by this command

- VUID-vkCmdDrawIndirectCount2KHR-None-10795
  If a color attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_COLOR_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawIndirectCount2KHR-None-10796
  If a depth attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_DEPTH_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawIndirectCount2KHR-None-10797
  If a stencil attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_STENCIL_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawIndirectCount2KHR-None-12338
  If a color attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_COLOR_BIT on that attachment, the color attachment must not be written to by this command

- VUID-vkCmdDrawIndirectCount2KHR-None-12339
  If a depth attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_DEPTH_BIT on that attachment, the depth attachment must not be written to by this command

- VUID-vkCmdDrawIndirectCount2KHR-None-12340
  If a stencil attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_STENCIL_BIT on that attachment, the stencil attachment must not be written to by this command

- VUID-vkCmdDrawIndirectCount2KHR-None-09003
  If an attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, it must not be accessed in any way other than as an attachment, storage image, or sampled image by this command

- VUID-vkCmdDrawIndirectCount2KHR-None-06886
  If the current render pass instance uses a depth/stencil attachment with a read-only layout for the depth aspect, depth writes must be disabled

- VUID-vkCmdDrawIndirectCount2KHR-None-06887
  If the current render pass instance uses a depth/stencil attachment with a read-only layout for the stencil aspect, both front and back `writeMask` are not zero, and stencil test is enabled, all stencil ops must be VK_STENCIL_OP_KEEP

- VUID-vkCmdDrawIndirectCount2KHR-None-07831
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT dynamic state enabled then vkCmdSetViewport must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-None-07832
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SCISSOR dynamic state enabled then vkCmdSetScissor must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-None-08617
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_WIDTH dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineWidth must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-None-07834
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BIAS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthBiasEnable` is VK_TRUE, then vkCmdSetDepthBias or vkCmdSetDepthBias2EXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-None-07835
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_BLEND_CONSTANTS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and an active color attachment current value of `blendEnable` is VK_TRUE with a blend equations where any VkBlendFactor member is VK_BLEND_FACTOR_CONSTANT_COLOR, VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR, VK_BLEND_FACTOR_CONSTANT_ALPHA, or VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA, then vkCmdSetBlendConstants must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-None-07836
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BOUNDS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthBoundsTestEnable` is VK_TRUE, then vkCmdSetDepthBounds must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-None-07837
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilCompareMask must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-None-07838
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_WRITE_MASK dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilWriteMask must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-None-07839
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_REFERENCE dynamic state enabled, the current value of and `rasterizerDiscardEnable` is VK_FALSE, the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilReference must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-maxMultiviewInstanceIndex-02688
  If the draw is recorded in a render pass instance with multiview enabled, the maximum instance index must be less than or equal to VkPhysicalDeviceMultiviewProperties::`maxMultiviewInstanceIndex`

- VUID-vkCmdDrawIndirectCount2KHR-sampleLocationsEnable-02689
  If the bound graphics pipeline was created with VkPipelineSampleLocationsStateCreateInfoEXT::`sampleLocationsEnable` set to VK_TRUE, then the active depth attachment must have been created with the VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit set

- VUID-vkCmdDrawIndirectCount2KHR-None-07634
  If the `VK_EXT_sample_locations` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetSampleLocationsEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-None-06666
  If the `VK_EXT_sample_locations` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `sampleLocationsEnable` is VK_TRUE, then vkCmdSetSampleLocationsEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-None-07840
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_CULL_MODE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCullMode must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-None-07841
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRONT_FACE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetFrontFace must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-None-07843
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, vkCmdSetDepthTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-None-07844
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthTestEnable` is VK_TRUE, then vkCmdSetDepthWriteEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-None-07845
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_COMPARE_OP dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthTestEnable` is VK_TRUE, then vkCmdSetDepthCompareOp must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-None-07846
  If the `depthBounds` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthBoundsTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-None-07847
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetStencilTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-None-07848
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_OP dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilOp must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-viewportCount-03417
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, and the state is not inherited, then vkCmdSetViewportWithCount must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-scissorCount-03418
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT dynamic state enabled, and the state is not inherited, then vkCmdSetScissorWithCount must have been called and not subsequently invalidated in the current command buffer prior to this drawing

- VUID-vkCmdDrawIndirectCount2KHR-viewportCount-03419
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with both the VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic states enabled, and the state is not inherited, then the `viewportCount` parameter of `vkCmdSetViewportWithCount` must match the `scissorCount` parameter of `vkCmdSetScissorWithCount`

- VUID-vkCmdDrawIndirectCount2KHR-viewportCount-04137
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportWScalingStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndirectCount2KHR-viewportCount-04138
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, the current value of `viewportWScalingEnable` is VK_TRUE, then vkCmdSetViewportWScalingNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-None-08636
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, the current value of `viewportWScalingEnable` is VK_TRUE, then the `viewportCount` parameter in the last call to vkCmdSetViewportWScalingNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndirectCount2KHR-viewportCount-04139
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportShadingRateImageStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndirectCount2KHR-shadingRateImage-09233
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_COARSE_SAMPLE_ORDER_NV and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoarseSampleOrderNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-shadingRateImage-09234
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `shadingRateImageEnable` is VK_TRUE, then vkCmdSetViewportShadingRatePaletteNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-None-08637
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `shadingRateImageEnable` is VK_TRUE, then the `viewportCount` parameter in the last call to vkCmdSetViewportShadingRatePaletteNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndirectCount2KHR-VkPipelineVieportCreateInfo-04141
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled and a VkPipelineViewportSwizzleStateCreateInfoNV structure chained from VkPipelineViewportStateCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportSwizzleStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndirectCount2KHR-VkPipelineVieportCreateInfo-04142
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled and a VkPipelineViewportExclusiveScissorStateCreateInfoNV structure chained from VkPipelineViewportStateCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportExclusiveScissorStateCreateInfoNV::`exclusiveScissorCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndirectCount2KHR-None-07878
  If the `exclusiveScissor` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_ENABLE_NV dynamic state enabled, then vkCmdSetExclusiveScissorEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-None-07879
  If the `exclusiveScissor` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_NV dynamic state enabled, and the most recent call to vkCmdSetExclusiveScissorEnableNV in the current command buffer set any element of `pExclusiveScissorEnables` to VK_TRUE, then vkCmdSetExclusiveScissorNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-None-04876
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE dynamic state enabled, then vkCmdSetRasterizerDiscardEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-None-04877
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthBiasEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-logicOp-04878
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LOGIC_OP_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `logicOpEnable` is VK_TRUE, then vkCmdSetLogicOpEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-primitiveFragmentShadingRateWithMultipleViewports-04552
  If the `primitiveFragmentShadingRateWithMultipleViewports` limit is not supported, the bound graphics pipeline was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, and any of the shader stages of the bound graphics pipeline write to the `PrimitiveShadingRateKHR` built-in, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and the `viewportCount` parameter of `vkCmdSetViewportWithCount` must be `1`

- VUID-vkCmdDrawIndirectCount2KHR-primitiveFragmentShadingRateWithMultipleViewports-08642
  If the `primitiveFragmentShadingRateWithMultipleViewports` limit is not supported, and any shader object bound to a graphics stage writes to the `PrimitiveShadingRateKHR` built-in, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and the `viewportCount` parameter of `vkCmdSetViewportWithCount` must be `1`

- VUID-vkCmdDrawIndirectCount2KHR-blendEnable-04727
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, then for each color attachment, if the corresponding image view’s format features do not contain VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT, then the corresponding current value of `blendEnable` must be VK_FALSE

- VUID-vkCmdDrawIndirectCount2KHR-None-08644
  If a shader object is bound to any graphics stage or a graphics pipeline is bound, the current value of `rasterizerDiscardEnable` is VK_FALSE, and none of the following is enabled:

  - the `VK_AMD_mixed_attachment_samples` extension

  - the `VK_NV_framebuffer_mixed_samples` extension

  - the `multisampledRenderToSingleSampled` feature

  then the current value of `rasterizationSamples` must be the same as the current color and/or depth/stencil attachments

- VUID-vkCmdDrawIndirectCount2KHR-None-08876
  If a shader object is bound to any graphics stage, the current render pass instance must have been begun with vkCmdBeginRendering

- VUID-vkCmdDrawIndirectCount2KHR-imageView-06172
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawIndirectCount2KHR-imageView-06173
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawIndirectCount2KHR-imageView-06174
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawIndirectCount2KHR-imageView-06175
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawIndirectCount2KHR-imageView-06176
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawIndirectCount2KHR-imageView-06177
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawIndirectCount2KHR-viewMask-06178
  If the current render pass instance was begun with vkCmdBeginRendering, the bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::`viewMask` equal to VkRenderingInfo::`viewMask`

- VUID-vkCmdDrawIndirectCount2KHR-colorAttachmentCount-06179
  If the `dynamicRenderingUnusedAttachments` feature is not enabled and the current render pass instance was begun with vkCmdBeginRendering, the bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::`colorAttachmentCount` equal to VkRenderingInfo::`colorAttachmentCount`

- VUID-vkCmdDrawIndirectCount2KHR-dynamicRenderingUnusedAttachments-08910
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound graphics pipeline

- VUID-vkCmdDrawIndirectCount2KHR-dynamicRenderingUnusedAttachments-08912
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` equal to VK_NULL_HANDLE must have the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound pipeline equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectCount2KHR-dynamicRenderingUnusedAttachments-08911
  If the `dynamicRenderingUnusedAttachments` feature is enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound graphics pipeline, or the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats`, if it exists, must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectCount2KHR-colorAttachmentCount-09362
  If the current render pass instance was begun with vkCmdBeginRendering, with a VkRenderingInfo::`colorAttachmentCount` equal to `1`, there is no shader object bound to any graphics stage, and a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, each element of the VkRenderingInfo::`pColorAttachments` array with a `resolveImageView` not equal to VK_NULL_HANDLE must have been created with an image created with a VkExternalFormatANDROID::`externalFormat` value equal to the VkExternalFormatANDROID::`externalFormat` value used to create the bound graphics pipeline

- VUID-vkCmdDrawIndirectCount2KHR-None-09363
  If there is no shader object bound to any graphics stage, the current render pass instance was begun with vkCmdBeginRendering and a VkRenderingInfo::`colorAttachmentCount` equal to `1`, and a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with an image created with a VkExternalFormatANDROID::`externalFormat` value equal to the VkExternalFormatANDROID::`externalFormat` value used to create the bound graphics pipeline

- VUID-vkCmdDrawIndirectCount2KHR-None-09364
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetColorBlendEnableEXT must have set the blend enable to VK_FALSE prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-None-09365
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetRasterizationSamplesEXT must have set `rasterizationSamples` to VK_SAMPLE_COUNT_1_BIT prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-None-09368
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetFragmentShadingRateKHR must have set `pFragmentSize->width` to `1` prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-None-09369
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetFragmentShadingRateKHR must have set `pFragmentSize->height` to `1` prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-None-07749
  If the `colorWriteEnable` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorWriteEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-attachmentCount-07750
  If the `colorWriteEnable` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the `attachmentCount` parameter of most recent call to `vkCmdSetColorWriteEnableEXT` in the current command buffer must be greater than or equal to the number of active color attachments

- VUID-vkCmdDrawIndirectCount2KHR-None-07751
  If the `VK_EXT_discard_rectangles` extension is enabled, a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT dynamic state enabled and the `pNext` chain of VkGraphicsPipelineCreateInfo included a VkPipelineDiscardRectangleStateCreateInfoEXT structure, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for each discard rectangle in VkPipelineDiscardRectangleStateCreateInfoEXT::`discardRectangleCount`

- VUID-vkCmdDrawIndirectCount2KHR-rasterizerDiscardEnable-09236
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT dynamic state enabled and the `pNext` chain of VkGraphicsPipelineCreateInfo did not include a VkPipelineDiscardRectangleStateCreateInfoEXT structure, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for each discard rectangle in VkPhysicalDeviceDiscardRectanglePropertiesEXT::`maxDiscardRectangles`

- VUID-vkCmdDrawIndirectCount2KHR-None-07880
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDiscardRectangleEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-None-07881
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_MODE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-dynamicRenderingUnusedAttachments-08913
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->imageView` was VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectCount2KHR-dynamicRenderingUnusedAttachments-08914
  If current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawIndirectCount2KHR-dynamicRenderingUnusedAttachments-08915
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, and the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->imageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectCount2KHR-dynamicRenderingUnusedAttachments-08916
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->imageView` was VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectCount2KHR-dynamicRenderingUnusedAttachments-08917
  If current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawIndirectCount2KHR-dynamicRenderingUnusedAttachments-08918
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, and the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->imageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectCount2KHR-imageView-06183
  If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentShadingRateAttachmentInfoKHR::`imageView` was not VK_NULL_HANDLE, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

- VUID-vkCmdDrawIndirectCount2KHR-dynamicRenderingLocalRead-11797
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingLocalRead` feature is enabled, the VK_RENDERING_LOCAL_READ_CONCURRENT_ACCESS_CONTROL_BIT_KHR flag is specified, and an attachment is being used as a feedback loop as specified by VK_RENDERING_ATTACHMENT_INPUT_ATTACHMENT_FEEDBACK_BIT_KHR, VkRenderingAttachmentFlagsInfoKHR::`flags` for that attachment must include VK_RENDERING_ATTACHMENT_INPUT_ATTACHMENT_FEEDBACK_BIT_KHR

- VUID-vkCmdDrawIndirectCount2KHR-imageView-06184
  If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentDensityMapAttachmentInfoEXT::`imageView` was not VK_NULL_HANDLE, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT

- VUID-vkCmdDrawIndirectCount2KHR-layers-10831
  If the current render pass instance was created with VK_RENDERING_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE or VK_RENDER_PASS_CREATE_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE, and the bound graphics pipeline was created with VK_PIPELINE_CREATE_2_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE, then the current render pass instance must have a `layers` value less than or equal to VkPipelineFragmentDensityMapLayeredCreateInfoVALVE::`maxFragmentDensityMapLayers`

- VUID-vkCmdDrawIndirectCount2KHR-colorAttachmentCount-06185
  If the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with a sample count equal to the corresponding element of the `pColorAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline

- VUID-vkCmdDrawIndirectCount2KHR-pDepthAttachment-06186
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of the `depthStencilAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawIndirectCount2KHR-pStencilAttachment-06187
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of the `depthStencilAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawIndirectCount2KHR-multisampledRenderToSingleSampled-07285
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with a sample count equal to the value of `rasterizationSamples` for the bound graphics pipeline

- VUID-vkCmdDrawIndirectCount2KHR-multisampledRenderToSingleSampled-07286
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawIndirectCount2KHR-multisampledRenderToSingleSampled-07287
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawIndirectCount2KHR-pNext-07935
  If this command is called inside a render pass instance started with vkCmdBeginRendering, and the `pNext` chain of VkRenderingInfo includes a VkMultisampledRenderToSingleSampledInfoEXT structure with `multisampledRenderToSingleSampledEnable` equal to VK_TRUE, then the value of `rasterizationSamples` for the bound graphics pipeline must be equal to VkMultisampledRenderToSingleSampledInfoEXT::`rasterizationSamples`

- VUID-vkCmdDrawIndirectCount2KHR-renderPass-06198
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline must have been created with a VkGraphicsPipelineCreateInfo::`renderPass` equal to VK_NULL_HANDLE

- VUID-vkCmdDrawIndirectCount2KHR-pColorAttachments-08963
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound with a fragment shader that statically writes to a color attachment, the color write mask is not zero, color writes are enabled, and the corresponding element of the VkRenderingInfo::`pColorAttachments->imageView` was not VK_NULL_HANDLE, then the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectCount2KHR-pColorAttachments-11539
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound with a fragment shader that statically writes to a color attachment, the color write mask is not zero, color writes are enabled, and the corresponding element of the VkRenderingInfo::`pColorAttachments->resolveImageView` was not VK_NULL_HANDLE, then the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectCount2KHR-pDepthAttachment-08964
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound, depth test is enabled, and the VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, then the VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectCount2KHR-pDepthAttachment-11540
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound, depth test is enabled, and the VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, then the VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectCount2KHR-pStencilAttachment-08965
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound, stencil test is enabled and the VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, then the VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectCount2KHR-pStencilAttachment-11860
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound, stencil test is enabled and the VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, then the VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectCount2KHR-flags-10582
  If the current render pass instance was begun with a vkCmdBeginRendering call in `commandBuffer`, its VkRenderingInfo::`flags` parameter must not have VK_RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT set unless VK_RENDERING_CONTENTS_INLINE_BIT_KHR is also set

- VUID-vkCmdDrawIndirectCount2KHR-primitivesGeneratedQueryWithRasterizerDiscard-06708
  If the `primitivesGeneratedQueryWithRasterizerDiscard` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, rasterization discard must not be enabled

- VUID-vkCmdDrawIndirectCount2KHR-primitivesGeneratedQueryWithNonZeroStreams-06709
  If the `primitivesGeneratedQueryWithNonZeroStreams` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, the bound graphics pipeline must not have been created with a non-zero value in `VkPipelineRasterizationStateStreamCreateInfoEXT`::`rasterizationStream`

- VUID-vkCmdDrawIndirectCount2KHR-None-07620
  If the `depthClamp` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLAMP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthClampEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-None-07621
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_POLYGON_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetPolygonModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-None-07622
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetRasterizationSamplesEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-None-07623
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetSampleMaskEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-alphaToCoverageEnable-08919
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT dynamic state enabled, and `alphaToCoverageEnable` was VK_TRUE in the last call to vkCmdSetAlphaToCoverageEnableEXT, then the Fragment Output Interface must contain a variable for the alpha `Component` word in `Location` 0 at `Index` 0

- VUID-vkCmdDrawIndirectCount2KHR-alphaToCoverageEnable-08920
  If a shader object is bound to any graphics stage, and the most recent call to vkCmdSetAlphaToCoverageEnableEXT in the current command buffer set `alphaToCoverageEnable` to VK_TRUE, then the Fragment Output Interface must contain a variable for the alpha `Component` word in `Location` 0 at `Index` 0

- VUID-vkCmdDrawIndirectCount2KHR-None-07624
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAlphaToCoverageEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-None-07625
  If the `alphaToOne` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ALPHA_TO_ONE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAlphaToOneEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-None-07626
  If the `logicOp` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LOGIC_OP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetLogicOpEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-None-07627
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and there are color attachments bound, then vkCmdSetColorBlendEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-None-07629
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and there are color attachments bound, then vkCmdSetColorWriteMaskEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-None-07630
  If the `geometryStreams` feature is enabled, and a shader object is bound to the VK_SHADER_STAGE_GEOMETRY_BIT stage or a graphics pipeline is bound which was created with both a VK_SHADER_STAGE_GEOMETRY_BIT stage and the VK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXT dynamic state enabled, then vkCmdSetRasterizationStreamEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-None-07631
  If the `VK_EXT_conservative_rasterization` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_CONSERVATIVE_RASTERIZATION_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetConservativeRasterizationModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-None-07632
  If the `VK_EXT_conservative_rasterization` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXTRA_PRIMITIVE_OVERESTIMATION_SIZE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `conservativeRasterizationMode` is VK_CONSERVATIVE_RASTERIZATION_MODE_OVERESTIMATE_EXT, then vkCmdSetExtraPrimitiveOverestimationSizeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-conservativePointAndLineRasterization-07499
  If the `VK_EXT_conservative_rasterization` extension is enabled, `conservativePointAndLineRasterization` is not supported, a shader object is bound to any graphics stage or a graphics pipeline is bound, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line or point topology class, then the current value of `conservativeRasterizationMode` must be VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT

- VUID-vkCmdDrawIndirectCount2KHR-None-07633
  If the `depthClipEnable` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLIP_ENABLE_EXT dynamic state, then vkCmdSetDepthClipEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-None-07636
  If the `VK_EXT_provoking_vertex` extension is enabled, a shader object is bound to the VK_SHADER_STAGE_VERTEX_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_PROVOKING_VERTEX_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetProvokingVertexModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-None-08666
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineRasterizationModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-None-08669
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineStippleEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-None-07849
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled and a shader object is bound to any graphics stage, or a bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stippledLineEnable` is VK_TRUE, then vkCmdSetLineStipple must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-None-10608
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic state enabled, the effective rasterization input topology is in the line topology class, and the current `lineRasterizationMode` is VK_LINE_RASTERIZATION_MODE_BRESENHAM or VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH, then the current `alphaToCoverageEnable`, `alphaToOneEnable` and `sampleShadingEnable` states must all be VK_FALSE

- VUID-vkCmdDrawIndirectCount2KHR-None-07639
  If the `depthClipControl` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLIP_NEGATIVE_ONE_TO_ONE_EXT dynamic state enabled, then vkCmdSetDepthClipNegativeOneToOneEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-None-09650
  If the `depthClampControl` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLAMP_RANGE_EXT dynamic state enabled, and the current value of `depthClampEnable` is VK_TRUE, then vkCmdSetDepthClampRangeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-None-07640
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_ENABLE_NV dynamic state enabled, then vkCmdSetViewportWScalingEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-None-07641
  If the `VK_NV_viewport_swizzle` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic state enabled, then vkCmdSetViewportSwizzleNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-None-07642
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageToColorEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-None-07643
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_LOCATION_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageToColorEnable` is VK_TRUE, then vkCmdSetCoverageToColorLocationNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-None-07644
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_MODE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageModulationModeNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-None-07645
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageModulationMode` is any value other than VK_COVERAGE_MODULATION_MODE_NONE_NV, then vkCmdSetCoverageModulationTableEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-None-07646
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageModulationTableEnable` is VK_TRUE, then vkCmdSetCoverageModulationTableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-None-07647
  If the `shadingRateImage` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SHADING_RATE_IMAGE_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetShadingRateImageEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-pipelineFragmentShadingRate-09238
  If the `pipelineFragmentShadingRate` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetFragmentShadingRateKHR must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-None-07648
  If the `representativeFragmentTest` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_REPRESENTATIVE_FRAGMENT_TEST_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetRepresentativeFragmentTestEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-None-07649
  If the `coverageReductionMode` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageReductionModeNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-rasterizationSamples-07471
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current subpass does not use any color and/or depth/stencil attachments, then the `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT must follow the rules for a zero-attachment subpass

- VUID-vkCmdDrawIndirectCount2KHR-samples-07472
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state disabled, then the `samples` parameter in the last call to vkCmdSetSampleMaskEXT must be greater or equal to the VkPipelineMultisampleStateCreateInfo::`rasterizationSamples` parameter used to create the bound graphics pipeline

- VUID-vkCmdDrawIndirectCount2KHR-samples-07473
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT state and VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT states enabled, then the `samples` parameter in the last call to vkCmdSetSampleMaskEXT must be greater or equal to the `rasterizationSamples` parameter in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawIndirectCount2KHR-None-09211
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, or a shader object is bound to any graphics stage, and the current render pass instance includes a VkMultisampledRenderToSingleSampledInfoEXT structure with `multisampledRenderToSingleSampledEnable` equal to VK_TRUE, then the `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT must be the same as the `rasterizationSamples` member of that structure

- VUID-vkCmdDrawIndirectCount2KHR-firstAttachment-07476
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic states enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the last call to vkCmdSetColorBlendEnableEXT in the current command buffer prior to this drawing command must have set a value for all active color attachments

- VUID-vkCmdDrawIndirectCount2KHR-firstAttachment-07478
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT dynamic states enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the last call to vkCmdSetColorWriteMaskEXT in the current command buffer prior to this drawing command must have set a value for all active color attachments

- VUID-vkCmdDrawIndirectCount2KHR-advancedBlendMaxColorAttachments-07480
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT and VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic states enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and an active color attachment current value of `blendEnable` is VK_TRUE, then the number of active color attachments must not exceed `advancedBlendMaxColorAttachments`

- VUID-vkCmdDrawIndirectCount2KHR-None-10862
  If a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT , but not the VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorBlendEquationEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawIndirectCount2KHR-rasterizerDiscardEnable-10863
  If a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT, but not the VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorBlendAdvancedEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawIndirectCount2KHR-None-10864
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT and VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then either vkCmdSetColorBlendAdvancedEXT or vkCmdSetColorBlendEquationEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawIndirectCount2KHR-primitivesGeneratedQueryWithNonZeroStreams-07481
  If the `primitivesGeneratedQueryWithNonZeroStreams` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, and the bound graphics pipeline was created with VK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXT state enabled, the last call to vkCmdSetRasterizationStreamEXT must have set the `rasterizationStream` to zero

- VUID-vkCmdDrawIndirectCount2KHR-sampleLocationsPerPixel-07482
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state disabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then the `sampleLocationsPerPixel` member of `pSampleLocationsInfo` in the last call to vkCmdSetSampleLocationsEXT must equal the `rasterizationSamples` member of the VkPipelineMultisampleStateCreateInfo structure the bound graphics pipeline has been created with

- VUID-vkCmdDrawIndirectCount2KHR-sampleLocationsPerPixel-07483
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then the `sampleLocationsPerPixel` member of `pSampleLocationsInfo` in the last call to vkCmdSetSampleLocationsEXT must equal the `rasterizationSamples` parameter of the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawIndirectCount2KHR-sampleLocationsEnable-07484
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT then the current active depth attachment must have been created with the VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit set

- VUID-vkCmdDrawIndirectCount2KHR-sampleLocationsEnable-07485
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, then the `sampleLocationsInfo.maxSampleLocationGridSize.width` in the last call to vkCmdSetSampleLocationsEXT must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.width` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling `rasterizationSamples`

- VUID-vkCmdDrawIndirectCount2KHR-sampleLocationsEnable-07486
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, then the `sampleLocationsInfo.maxSampleLocationGridSize.height` in the last call to vkCmdSetSampleLocationsEXT must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.height` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling `rasterizationSamples`

- VUID-vkCmdDrawIndirectCount2KHR-sampleLocationsEnable-07487
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, the fragment shader code must not statically use the extended instruction `InterpolateAtSample`

- VUID-vkCmdDrawIndirectCount2KHR-sampleLocationsEnable-07936
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationGridSize.width` must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.width` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling the value of `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawIndirectCount2KHR-sampleLocationsEnable-07937
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationGridSize.height` must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.height` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling the value of `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawIndirectCount2KHR-sampleLocationsEnable-07938
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationsPerPixel` must equal `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawIndirectCount2KHR-coverageModulationTableEnable-07488
  If a shader object is bound to any graphics stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NV state enabled, and the last call to vkCmdSetCoverageModulationTableEnableNV set `coverageModulationTableEnable` to VK_TRUE, then the `coverageModulationTableCount` parameter in the last call to vkCmdSetCoverageModulationTableNV must equal the current `rasterizationSamples` divided by the number of color samples in the current active color attachment

- VUID-vkCmdDrawIndirectCount2KHR-rasterizationSamples-07489
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, and if current subpass has a depth/stencil attachment and depth test, stencil test, or depth bounds test are enabled in the bound pipeline, then the current `rasterizationSamples` must be the same as the sample count of the depth/stencil attachment

- VUID-vkCmdDrawIndirectCount2KHR-coverageToColorEnable-07490
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV state enabled and the last call to vkCmdSetCoverageToColorEnableNV set the `coverageToColorEnable` to VK_TRUE, then there must be an active color attachment at the location selected by the last call to vkCmdSetCoverageToColorLocationNV `coverageToColorLocation`, with a VkFormat of VK_FORMAT_R8_UINT, VK_FORMAT_R8_SINT, VK_FORMAT_R16_UINT, VK_FORMAT_R16_SINT, VK_FORMAT_R32_UINT, or VK_FORMAT_R32_SINT

- VUID-vkCmdDrawIndirectCount2KHR-rasterizerDiscardEnable-09420
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, and a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, and the most recent call to vkCmdSetRasterizerDiscardEnable in the current command buffer set `rasterizerDiscardEnable` to VK_FALSE, and the last call to vkCmdSetCoverageToColorEnableNV set the `coverageToColorEnable` to VK_TRUE, then there must be an active color attachment at the location selected by the last call to vkCmdSetCoverageToColorLocationNV `coverageToColorLocation`, with a VkFormat of VK_FORMAT_R8_UINT, VK_FORMAT_R8_SINT, VK_FORMAT_R16_UINT, VK_FORMAT_R16_SINT, VK_FORMAT_R32_UINT, or VK_FORMAT_R32_SINT

- VUID-vkCmdDrawIndirectCount2KHR-coverageReductionMode-07491
  If the `coverageReductionMode` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV or VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic states enabled, then the current values of `coverageReductionMode`, `rasterizationSamples`, the sample counts for the color and depth/stencil attachments (if the subpass has them) must be a valid combination returned by vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV

- VUID-vkCmdDrawIndirectCount2KHR-viewportCount-07492
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportSwizzleStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndirectCount2KHR-viewportCount-07493
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic states enabled then the `viewportCount` parameter in the last call to vkCmdSetViewportSwizzleNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndirectCount2KHR-viewportCount-09421
  If the `VK_NV_viewport_swizzle` extension is enabled, and a shader object is bound to any graphics stage, then the `viewportCount` parameter in the last call to vkCmdSetViewportSwizzleNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndirectCount2KHR-rasterizationSamples-07494
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, and the `coverageReductionMode` feature is not enabled, or the current value of `coverageReductionMode` is not VK_COVERAGE_REDUCTION_MODE_TRUNCATE_NV, and the current value of `rasterizationSamples` is greater than sample count of the color attachment, then sample shading must be disabled

- VUID-vkCmdDrawIndirectCount2KHR-stippledLineEnable-07495
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_RECTANGULAR, then the `stippledRectangularLines` feature must be enabled

- VUID-vkCmdDrawIndirectCount2KHR-stippledLineEnable-07496
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_BRESENHAM, then the `stippledBresenhamLines` feature must be enabled

- VUID-vkCmdDrawIndirectCount2KHR-stippledLineEnable-07497
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH, then the `stippledSmoothLines` feature must be enabled

- VUID-vkCmdDrawIndirectCount2KHR-stippledLineEnable-07498
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_DEFAULT, then the `stippledRectangularLines` feature must be enabled and VkPhysicalDeviceLimits::`strictLines` must be VK_TRUE

- VUID-vkCmdDrawIndirectCount2KHR-stage-07073
  If the bound pipeline was created with the VkPipelineShaderStageCreateInfo::`stage` member of an element of VkGraphicsPipelineCreateInfo::`pStages` set to VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT, then Mesh Shader Queries must not be active

- VUID-vkCmdDrawIndirectCount2KHR-None-08877
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ATTACHMENT_FEEDBACK_LOOP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAttachmentFeedbackLoopEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-None-07850
  If dynamic state was inherited from VkCommandBufferInheritanceViewportScissorInfoNV, it must be set in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-nextStage-10745
  For each shader object bound to a graphics stage, except for shader object bound to the last graphics stage in the logical pipeline, it must have been created with a `nextStage` including the corresponding bit to the shader object bound to the following graphics stage in the logical pipeline

- VUID-vkCmdDrawIndirectCount2KHR-None-08684
  If there is no bound graphics pipeline, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_VERTEX_BIT

- VUID-vkCmdDrawIndirectCount2KHR-None-08685
  If there is no bound graphics pipeline, and the `tessellationShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT

- VUID-vkCmdDrawIndirectCount2KHR-None-08686
  If there is no bound graphics pipeline, and the `tessellationShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT

- VUID-vkCmdDrawIndirectCount2KHR-None-08687
  If there is no bound graphics pipeline, and the `geometryShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_GEOMETRY_BIT

- VUID-vkCmdDrawIndirectCount2KHR-None-08688
  If there is no bound graphics pipeline, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_FRAGMENT_BIT

- VUID-vkCmdDrawIndirectCount2KHR-None-08689
  If there is no bound graphics pipeline, and the `taskShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TASK_BIT_EXT

- VUID-vkCmdDrawIndirectCount2KHR-None-08690
  If there is no bound graphics pipeline, and the `meshShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-vkCmdDrawIndirectCount2KHR-None-08693
  If there is no bound graphics pipeline, and at least one of the `taskShader` and `meshShader` features is enabled, one of the VK_SHADER_STAGE_VERTEX_BIT or VK_SHADER_STAGE_MESH_BIT_EXT stages must have a valid `VkShaderEXT` bound, and the other must have no `VkShaderEXT` bound

- VUID-vkCmdDrawIndirectCount2KHR-None-08696
  If there is no bound graphics pipeline, and a valid `VkShaderEXT` is bound to the VK_SHADER_STAGE_VERTEX_BIT stage, there must be no `VkShaderEXT` bound to either the VK_SHADER_STAGE_TASK_BIT_EXT stage or the VK_SHADER_STAGE_MESH_BIT_EXT stage

- VUID-vkCmdDrawIndirectCount2KHR-None-08698
  If any graphics shader is bound which was created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag, then all shaders created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag in the same vkCreateShadersEXT call must also be bound

- VUID-vkCmdDrawIndirectCount2KHR-None-08699
  If any graphics shader is bound which was created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag, any stages in between stages whose shaders which did not create a shader with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag as part of the same vkCreateShadersEXT call must not have any `VkShaderEXT` bound

- VUID-vkCmdDrawIndirectCount2KHR-None-08878
  All bound graphics shader objects must have been created with identical or identically defined push constant ranges

- VUID-vkCmdDrawIndirectCount2KHR-None-08879
  All bound graphics shader objects must have either been created with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag set, or with identical or identically defined arrays of descriptor set layouts

- VUID-vkCmdDrawIndirectCount2KHR-colorAttachmentCount-09372
  If the current render pass instance was begun with vkCmdBeginRendering and a VkRenderingInfo::`colorAttachmentCount` equal to `1`, a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, and a fragment shader is bound, it must not declare the `DepthReplacing` or `StencilRefReplacingEXT` execution modes

- VUID-vkCmdDrawIndirectCount2KHR-pDynamicStates-08715
  If the bound graphics pipeline state includes a fragment shader stage, was created with VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`, and the fragment shader declares the `EarlyFragmentTests` execution mode and uses `OpDepthAttachmentReadEXT`, the `depthWriteEnable` parameter in the last call to vkCmdSetDepthWriteEnable must be VK_FALSE

- VUID-vkCmdDrawIndirectCount2KHR-pDynamicStates-08716
  If the bound graphics pipeline state includes a fragment shader stage, was created with VK_DYNAMIC_STATE_STENCIL_WRITE_MASK set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`, and the fragment shader declares the `EarlyFragmentTests` execution mode and uses `OpStencilAttachmentReadEXT`, the `writeMask` parameter in the last call to vkCmdSetStencilWriteMask must be `0`

- VUID-vkCmdDrawIndirectCount2KHR-None-09116
  If a shader object is bound to any graphics stage or the bound graphics pipeline was created with VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT, and the format of any color attachment is VK_FORMAT_E5B9G9R9_UFLOAT_PACK32, the corresponding element of the `pColorWriteMasks` parameter of vkCmdSetColorWriteMaskEXT must either include all of VK_COLOR_COMPONENT_R_BIT, VK_COLOR_COMPONENT_G_BIT, VK_COLOR_COMPONENT_B_BIT, and VK_COLOR_COMPONENT_A_BIT, or none of them

- VUID-vkCmdDrawIndirectCount2KHR-maxFragmentDualSrcAttachments-09239
  If blending is enabled for any attachment where either the source or destination blend factors for that attachment use the secondary color input, the maximum value of `Location` for any output attachment statically used in the `Fragment` `Execution` `Model` executed by this command must be less than `maxFragmentDualSrcAttachments`

- VUID-vkCmdDrawIndirectCount2KHR-None-09548
  If the current render pass was begun with vkCmdBeginRendering, there is no shader object bound to any graphics stage, the value of each element of VkRenderingAttachmentLocationInfo::`pColorAttachmentLocations` in the bound pipeline must match the value for the corresponding locations set currently in the current render pass instance

- VUID-vkCmdDrawIndirectCount2KHR-None-09549
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of each element of VkRenderingInputAttachmentIndexInfo::`pColorAttachmentInputIndices` in the bound pipeline must match the value for the corresponding index set currently in the current render pass instance

- VUID-vkCmdDrawIndirectCount2KHR-None-10927
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` in the bound pipeline must match the value set currently in the current render pass instance

- VUID-vkCmdDrawIndirectCount2KHR-None-10928
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` in the bound pipeline must match the value set currently in the current render pass instance

- VUID-vkCmdDrawIndirectCount2KHR-None-09642
  If the current render pass was begun with vkCmdBeginRendering with the VK_RENDERING_ENABLE_LEGACY_DITHERING_BIT_EXT flag, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_2_ENABLE_LEGACY_DITHERING_BIT_EXT

- VUID-vkCmdDrawIndirectCount2KHR-None-09643
  If the bound graphics pipeline was created with VK_PIPELINE_CREATE_2_ENABLE_LEGACY_DITHERING_BIT_EXT, the current render pass must have begun with vkCmdBeginRendering with the VK_RENDERING_ENABLE_LEGACY_DITHERING_BIT_EXT flag

- VUID-vkCmdDrawIndirectCount2KHR-None-10677
  If the per-tile execution model is enabled, the tileShadingPerTileDraw feature must be enabled

- VUID-vkCmdDrawIndirectCount2KHR-None-10772
  If a shader object is bound to any graphics stage, multiview functionality must not be enabled in the current render pass

- VUID-vkCmdDrawIndirectCount2KHR-multiviewPerViewViewports-12262
  If the `multiviewPerViewViewports` feature is enabled, then the index of the most significant bit in current render pass instance `viewMask` must be less than the current value of `viewportCount`

- VUID-vkCmdDrawIndirectCount2KHR-multiviewPerViewViewports-12263
  If the `multiviewPerViewViewports` feature is enabled, then the index of the most significant bit in current render pass instance `viewMask` must be less than the current value of `scissorCount`

- VUID-vkCmdDrawIndirectCount2KHR-flags-11521
  If current render pass instance was begun with vkCmdBeginRendering with VkRenderingInfo::`flags` which includes VK_RENDERING_FRAGMENT_REGION_BIT_EXT, and if sample shading is enabled (explicitly or implicitly), then the minimum fraction for sample shading must equal 0.0

- VUID-vkCmdDrawIndirectCount2KHR-None-11522
  If the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, and the `dynamicRenderingUnusedAttachments` feature is not enabled, the graphics pipeline bound must have been created with a VkCustomResolveCreateInfoEXT

- VUID-vkCmdDrawIndirectCount2KHR-None-11523
  If the current render pass instance was begun with vkCmdBeginRendering and does not contain a custom resolve, and the `dynamicRenderingUnusedAttachments` feature is not enabled, the graphics pipeline bound must not have been created with a VkCustomResolveCreateInfoEXT

- VUID-vkCmdDrawIndirectCount2KHR-customResolve-11524
  If the current render pass instance was begun with vkCmdBeginRendering and vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, the graphics pipeline bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_TRUE

- VUID-vkCmdDrawIndirectCount2KHR-customResolve-11525
  If the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, and vkCmdBeginCustomResolveEXT has not been recorded in the render pass instance, the graphics pipeline bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_FALSE

- VUID-vkCmdDrawIndirectCount2KHR-None-11861
  If the `dynamicRenderingUnusedAttachments` feature is not enabled and the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, the bound graphics pipeline must have been created with a VkCustomResolveCreateInfoEXT::`colorAttachmentCount` equal to VkRenderingInfo::`colorAttachmentCount`

- VUID-vkCmdDrawIndirectCount2KHR-None-11862
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound graphics pipeline

- VUID-vkCmdDrawIndirectCount2KHR-None-11863
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` equal to VK_NULL_HANDLE must have the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound pipeline equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectCount2KHR-dynamicRenderingUnusedAttachments-11864
  If the `dynamicRenderingUnusedAttachments` feature is enabled, the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound graphics pipeline, or the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats`, if it exists, must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectCount2KHR-None-11865
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectCount2KHR-None-11866
  If current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`

- VUID-vkCmdDrawIndirectCount2KHR-dynamicRenderingUnusedAttachments-11867
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, and the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectCount2KHR-None-11868
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->resolveImageView` was VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectCount2KHR-None-11869
  If current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`

- VUID-vkCmdDrawIndirectCount2KHR-dynamicRenderingUnusedAttachments-11870
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, and the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectCount2KHR-colorAttachmentCount-11871
  If the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0` and vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, then for each element of the VkRenderingInfo::`pColorAttachments` array with a `resolveImageView` not equal to VK_NULL_HANDLE, the `resolveImageView` must have been created with a sample count equal to the value of `rasterizationSamples` for the bound graphics pipeline

- VUID-vkCmdDrawIndirectCount2KHR-pDepthAttachment-11872
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`

- VUID-vkCmdDrawIndirectCount2KHR-pStencilAttachment-11873
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`

- VUID-vkCmdDrawIndirectCount2KHR-customResolve-11529
  If a shader object is bound to the fragment stage, the current render pass instance was begun with vkCmdBeginRendering, a fragment density map attachment is active, and vkCmdBeginCustomResolveEXT has been called, then the fragment shader object bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_TRUE

- VUID-vkCmdDrawIndirectCount2KHR-customResolve-11530
  If a shader object is bound to the fragment stage, the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, a fragment density map attachment is active, and vkCmdBeginCustomResolveEXT has not yet been called, then the fragment shader object bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_FALSE

- VUID-vkCmdDrawIndirectCount2KHR-flags-13361
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, then all bound shader objects must have been created with the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit

- VUID-vkCmdDrawIndirectCount2KHR-flags-13362
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, then the pipeline layout of the bound descriptor sets must have been created with VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT set

- VUID-vkCmdDrawIndirectCount2KHR-flags-13363
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, and any of the descriptor set layouts used to create the pipeline layout of the bound descriptor sets were created with any binding’s VkDescriptorSetLayoutBinding::`stageFlags` set with VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT, then there must be no binding with VkDescriptorSetLayoutBinding::`stageFlags` set with VK_SHADER_STAGE_TASK_BIT_EXT or VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-vkCmdDrawIndirectCount2KHR-flags-13364
  If there are any shader objects bound that were created with `flags` that includes both the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR and VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT bits, the pipeline layout of the bound descriptor sets must have been created with VK_PIPELINE_LAYOUT_CREATE_NO_TASK_SHADER_BIT_KHR set

- VUID-vkCmdDrawIndirectCount2KHR-flags-13365
  If there are any shader objects bound that were created with `flags` that includes both the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR and VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT bits, there must be no shader object bound to the VK_SHADER_STAGE_TASK_BIT_EXT stage

- VUID-vkCmdDrawIndirectCount2KHR-None-04007
  All vertex input bindings accessed via vertex input variables declared in the vertex shader entry point’s interface must have either valid or VK_NULL_HANDLE buffers bound

- VUID-vkCmdDrawIndirectCount2KHR-None-04008
  If the `nullDescriptor` feature is not enabled, all vertex input bindings accessed via vertex input variables declared in the vertex shader entry point’s interface must not be VK_NULL_HANDLE

- VUID-vkCmdDrawIndirectCount2KHR-None-02721
  If the `robustBufferAccess` feature is not enabled, and that pipeline was created without enabling VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS for `vertexInputs`, then for a given vertex buffer binding, any attribute data fetched must be entirely contained within the corresponding vertex buffer binding, as described in Vertex Input Description

- VUID-vkCmdDrawIndirectCount2KHR-format-10389
  For each vertex attribute accessed by this command, if its VkVertexInputAttributeDescription::`format` or VkVertexInputAttributeDescription2EXT::`format` is a packed format, and the `legacyVertexAttributes` feature is not enabled, the value of `attribAddress`, calculated as described in Vertex Input Calculation, must be a multiple of the size of the `format`

- VUID-vkCmdDrawIndirectCount2KHR-format-10390
  For each vertex attribute accessed by this command, if its VkVertexInputAttributeDescription::`format` or VkVertexInputAttributeDescription2EXT::`format` is not a packed format, and either the `legacyVertexAttributes` feature is not enabled or `format` has 64-bit components, the value of `attribAddress`, calculated as described in Vertex Input Calculation, must be a multiple of the component size of the `format`

- VUID-vkCmdDrawIndirectCount2KHR-None-07842
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY dynamic state enabled then vkCmdSetPrimitiveTopology must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-dynamicPrimitiveTopologyUnrestricted-07500
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY dynamic state enabled and the `dynamicPrimitiveTopologyUnrestricted` is VK_FALSE, then the `primitiveTopology` parameter of `vkCmdSetPrimitiveTopology` must be of the same topology class as the pipeline VkPipelineInputAssemblyStateCreateInfo::`topology` state

- VUID-vkCmdDrawIndirectCount2KHR-primitiveTopology-10286
  If a VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage is bound, then the current value of `primitiveTopology` must be VK_PRIMITIVE_TOPOLOGY_PATCH_LIST prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-primitiveTopology-10747
  If vkCmdSetPrimitiveTopology set `primitiveTopology` to VK_PRIMITIVE_TOPOLOGY_PATCH_LIST prior to this drawing command, then a VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage must be bound

- VUID-vkCmdDrawIndirectCount2KHR-primitiveTopology-10748
  If vkCmdSetPrimitiveTopology set `primitiveTopology` to VK_PRIMITIVE_TOPOLOGY_POINT_LIST prior to this drawing command, the `maintenance5` feature is not enabled, both a VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT and VK_SHADER_STAGE_GEOMETRY_BIT stage are not bound, then the `Vertex` `Execution` `Model` must have a `PointSize` decorated variable that is statically written to

- VUID-vkCmdDrawIndirectCount2KHR-pStrides-04913
  If the bound graphics pipeline was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE dynamic state enabled, but without the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled, then vkCmdBindVertexBuffers2 with a non-`NULL` `pStrides` parameter or vkCmdBindVertexBuffers3KHR with `setStride` set to VK_TRUE must have been called and not subsequently invalidated in the current command buffer prior to this draw command

- VUID-vkCmdDrawIndirectCount2KHR-None-13118
  If the bound graphics pipeline was created without the VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE dynamic state enabled, without the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled, and vkCmdBindVertexBuffers3KHR was called and not subsequently invalidated in the current command buffer prior to this draw command, the value of `setStride` in each of its `pBindInfos` elements must have been VK_FALSE

- VUID-vkCmdDrawIndirectCount2KHR-None-04914
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled then vkCmdSetVertexInputEXT must have been called and not subsequently invalidated in the current command buffer prior to this draw command

- VUID-vkCmdDrawIndirectCount2KHR-Input-07939
  If the `vertexAttributeRobustness` feature is not enabled, and the `maintenance9` feature is not enabled, and there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled then all variables with the `Input` storage class decorated with `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` must contain a location in VkVertexInputAttributeDescription2EXT::`location`

- VUID-vkCmdDrawIndirectCount2KHR-Input-08734
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled and either the `legacyVertexAttributes` feature is not enabled or the SPIR-V Type associated with a given `Input` variable of the corresponding `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` is 64-bit, then the numeric type associated with all `Input` variables of the corresponding `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` must be the same as VkVertexInputAttributeDescription2EXT::`format`

- VUID-vkCmdDrawIndirectCount2KHR-format-08936
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled and VkVertexInputAttributeDescription2EXT::`format` has a 64-bit component, then the scalar width associated with all `Input` variables of the corresponding `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` must be 64-bit

- VUID-vkCmdDrawIndirectCount2KHR-format-08937
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled and the scalar width associated with a `Location` decorated `Input` variable in the `Vertex` `Execution` `Model` `OpEntryPoint` is 64-bit, then the corresponding VkVertexInputAttributeDescription2EXT::`format` must have a 64-bit component

- VUID-vkCmdDrawIndirectCount2KHR-None-09203
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled and VkVertexInputAttributeDescription2EXT::`format` has a 64-bit component, then all `Input` variables at the corresponding `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` must not use components that are not present in the format

- VUID-vkCmdDrawIndirectCount2KHR-None-04875
  If there is a shader object bound to the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage or the bound graphics pipeline state was created with both a VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage and the VK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT dynamic state enabled, and the current value of `primitiveTopology` is VK_PRIMITIVE_TOPOLOGY_PATCH_LIST, then vkCmdSetPatchControlPointsEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-None-04879
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE dynamic state enabled then vkCmdSetPrimitiveRestartEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-None-09637
  If the `primitiveTopologyListRestart` feature is not enabled, the input assembly is VK_PRIMITIVE_TOPOLOGY_POINT_LIST, VK_PRIMITIVE_TOPOLOGY_LINE_LIST, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY, or VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY, there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE dynamic state enabled, then vkCmdSetPrimitiveRestartEnable must be VK_FALSE

- VUID-vkCmdDrawIndirectCount2KHR-None-10909
  If the `primitiveTopologyPatchListRestart` feature is not enabled, the input assembly is VK_PRIMITIVE_TOPOLOGY_PATCH_LIST, there is a shader object bound to the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE dynamic state enabled then vkCmdSetPrimitiveRestartEnable must be VK_FALSE

- VUID-vkCmdDrawIndirectCount2KHR-stage-06481
  The bound graphics pipeline must not have been created with the VkPipelineShaderStageCreateInfo::`stage` member of any element of VkGraphicsPipelineCreateInfo::`pStages` set to VK_SHADER_STAGE_TASK_BIT_EXT or VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-vkCmdDrawIndirectCount2KHR-None-08885
  There must be no shader object bound to either of the VK_SHADER_STAGE_TASK_BIT_EXT or VK_SHADER_STAGE_MESH_BIT_EXT stages

- VUID-vkCmdDrawIndirectCount2KHR-None-07619
  If a shader object is bound to the VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stage or a graphics pipeline is bound which was created with both a VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stage and the VK_DYNAMIC_STATE_TESSELLATION_DOMAIN_ORIGIN_EXT dynamic state enabled, then vkCmdSetTessellationDomainOriginEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount2KHR-OpExecutionMode-12239
  If a shader is bound to both the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stages, and if both stages contain an `OpExecutionMode` instruction specifying the type of subdivision, they must be the same

- VUID-vkCmdDrawIndirectCount2KHR-OpExecutionMode-12240
  If a shader is bound to both the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stages, and if both stages contain an `OpExecutionMode` instruction specifying the orientation of triangles, they must be the same

- VUID-vkCmdDrawIndirectCount2KHR-OpExecutionMode-12241
  If a shader is bound to both the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stages, and if both stages contain an `OpExecutionMode` instruction specifying the segment spacing, they must be the same

- VUID-vkCmdDrawIndirectCount2KHR-OpExecutionMode-12242
  If a shader is bound to both the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stages, and if both stages contain an `OpExecutionMode` instruction specifying the output patch size, they must be the same

- VUID-vkCmdDrawIndirectCount2KHR-pInfo-13110
  If `pInfo->maxDrawCount` is greater than `0`, `pInfo->addressRange.size` must be greater than or equal to (`pInfo->maxDrawCount` - 1) × `pInfo->addressRange.stride` + `sizeof`(VkDrawIndirectCommand)

- VUID-vkCmdDrawIndirectCount2KHR-pInfo-13111
  If `pInfo->maxDrawCount` is greater than 1, `pInfo->addressRange.stride` must not be 0

- VUID-vkCmdDrawIndirectCount2KHR-pInfo-13112
  If `pInfo->addressRange.stride` is not 0, `pInfo->addressRange.stride` must be greater than or equal to `sizeof`(VkDrawIndirectCommand)

- VUID-vkCmdDrawIndirectCount2KHR-pInfo-13113
  If `pInfo->addressRange.stride` is not 0, `pInfo->addressRange.stride` must be a multiple of `4`

- VUID-vkCmdDrawIndirectCount2KHR-commandBuffer-13058
  `commandBuffer` must not be a protected command buffer

- VUID-vkCmdDrawIndirectCount2KHR-drawIndirectCount-13119
  If the `drawIndirectCount` feature is not enabled this function must not be used

Valid Usage (Implicit)

- VUID-vkCmdDrawIndirectCount2KHR-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdDrawIndirectCount2KHR-pInfo-parameter
  `pInfo` must be a valid pointer to a valid VkDrawIndirectCount2InfoKHR structure

- VUID-vkCmdDrawIndirectCount2KHR-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdDrawIndirectCount2KHR-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdDrawIndirectCount2KHR-renderpass
  This command must only be called inside of a render pass instance

- VUID-vkCmdDrawIndirectCount2KHR-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdDrawIndirectCount2KHR-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Inside | Outside | VK_QUEUE_GRAPHICS_BIT | Action

Conditional Rendering

vkCmdDrawIndirectCount2KHR is affected by conditional rendering

To record a non-indexed draw call with a draw call count sourced from a buffer, call:

    // Provided by VK_VERSION_1_2
    void vkCmdDrawIndirectCount(
        VkCommandBuffer                             commandBuffer,
        VkBuffer                                    buffer,
        VkDeviceSize                                offset,
        VkBuffer                                    countBuffer,
        VkDeviceSize                                countBufferOffset,
        uint32_t                                    maxDrawCount,
        uint32_t                                    stride);

    // Provided by VK_KHR_draw_indirect_count
    // Equivalent to vkCmdDrawIndirectCount
    void vkCmdDrawIndirectCountKHR(
        VkCommandBuffer                             commandBuffer,
        VkBuffer                                    buffer,
        VkDeviceSize                                offset,
        VkBuffer                                    countBuffer,
        VkDeviceSize                                countBufferOffset,
        uint32_t                                    maxDrawCount,
        uint32_t                                    stride);

    // Provided by VK_AMD_draw_indirect_count
    // Equivalent to vkCmdDrawIndirectCount
    void vkCmdDrawIndirectCountAMD(
        VkCommandBuffer                             commandBuffer,
        VkBuffer                                    buffer,
        VkDeviceSize                                offset,
        VkBuffer                                    countBuffer,
        VkDeviceSize                                countBufferOffset,
        uint32_t                                    maxDrawCount,
        uint32_t                                    stride);

- `commandBuffer` is the command buffer into which the command is recorded.

- `buffer` is the buffer containing draw parameters.

- `offset` is the byte offset into `buffer` where parameters begin.

- `countBuffer` is the buffer containing the draw count.

- `countBufferOffset` is the byte offset into `countBuffer` where the draw count begins.

- `maxDrawCount` specifies the maximum number of draws that will be executed. The actual number of executed draw calls is the minimum of the count specified in `countBuffer` and `maxDrawCount`.

- `stride` is the byte stride between successive sets of draw parameters.

`vkCmdDrawIndirectCount` behaves similarly to vkCmdDrawIndirect except that the draw count is read by the device from a buffer during execution. The command will read an unsigned 32-bit integer from `countBuffer` located at `countBufferOffset` and use this as the draw count.

Valid Usage

- VUID-vkCmdDrawIndirectCount-magFilter-04553
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdDrawIndirectCount-magFilter-09598
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdDrawIndirectCount-mipmapMode-04770
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdDrawIndirectCount-mipmapMode-09599
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdDrawIndirectCount-unnormalizedCoordinates-09635
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `levelCount` and `layerCount` must be 1

- VUID-vkCmdDrawIndirectCount-None-08609
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `viewType` must be VK_IMAGE_VIEW_TYPE_1D or VK_IMAGE_VIEW_TYPE_2D

- VUID-vkCmdDrawIndirectCount-None-08610
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions with `ImplicitLod`, `Dref` or `Proj` in their name

- VUID-vkCmdDrawIndirectCount-None-08611
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions that includes a LOD bias or any offset values

- VUID-vkCmdDrawIndirectCount-None-06479
  If a VkImageView is sampled with depth comparison, the image view’s format features must contain VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT

- VUID-vkCmdDrawIndirectCount-None-02691
  If a VkImageView is accessed using atomic operations as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT

- VUID-vkCmdDrawIndirectCount-None-07888
  If a VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER descriptor is accessed using atomic operations as a result of this command, then the storage texel buffer’s format features must contain VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT

- VUID-vkCmdDrawIndirectCount-None-02692
  If a VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT

- VUID-vkCmdDrawIndirectCount-None-02693
  If the VK_EXT_filter_cubic extension is not enabled and any VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, it must not have a VkImageViewType of VK_IMAGE_VIEW_TYPE_3D, VK_IMAGE_VIEW_TYPE_CUBE, or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY

- VUID-vkCmdDrawIndirectCount-filterCubic-02694
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have a VkImageViewType and format that supports cubic filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubic` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdDrawIndirectCount-filterCubicMinmax-02695
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX as a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubicMinmax` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdDrawIndirectCount-cubicRangeClamp-09212
  If the `cubicRangeClamp` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must not have a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM

- VUID-vkCmdDrawIndirectCount-reductionMode-09213
  Any VkImageView being sampled with a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM as a result of this command must sample with VK_FILTER_CUBIC_EXT

- VUID-vkCmdDrawIndirectCount-selectableCubicWeights-09214
  If the `selectableCubicWeights` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have VkSamplerCubicWeightsCreateInfoQCOM::`cubicWeights` equal to VK_CUBIC_FILTER_WEIGHTS_CATMULL_ROM_QCOM

- VUID-vkCmdDrawIndirectCount-flags-02696
  Any VkImage created with a VkImageCreateInfo::`flags` containing VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV sampled as a result of this command must only be sampled using a VkSamplerAddressMode of VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawIndirectCount-OpTypeImage-07027
  For any VkImageView being written as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawIndirectCount-OpTypeImage-07028
  For any VkImageView being read as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawIndirectCount-OpTypeImage-07029
  For any VkBufferView being written as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown`, the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawIndirectCount-OpTypeImage-07030
  Any VkBufferView being read as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown` then the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawIndirectCount-None-08600
  If a a bound shader was created with a pipeline layout and statically uses a set n, a descriptor set must have been bound to n at the same pipeline bind point, with layouts compatible for set n with the layout(s) used to create the shader, as described in Pipeline Layout Compatibility

- VUID-vkCmdDrawIndirectCount-None-08601
  If a a bound shader was created with a pipeline layout or specified push constant ranges and statically uses a push constant value, that value must have been set for the same pipeline bind point, with push constant ranges that are compatible with the push constant range used to create the shader

- VUID-vkCmdDrawIndirectCount-None-10068
  For each array of resources that is used by a bound shader, the indices used to access members of the array must be less than the descriptor count for the identified binding in the descriptor sets used by this command

- VUID-vkCmdDrawIndirectCount-None-08114
  Descriptors in each bound descriptor set, specified via vkCmdBindDescriptorSets, must be valid if they are accessed as described by descriptor validity by the VkPipeline bound to the pipeline bind point used by this command and the bound VkPipeline was not created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawIndirectCount-imageLayout-00344
  If an image descriptor is accessed by a shader, the VkImageLayout must match the subresource accessible from the VkImageView as defined by the image layout matching rules

- VUID-vkCmdDrawIndirectCount-None-08115
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdBindDescriptorSets, the bound VkPipeline must have been created without VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawIndirectCount-None-08116
  Descriptors in bound descriptor buffers, specified via vkCmdSetDescriptorBufferOffsetsEXT, must be valid if they are dynamically accessed

- VUID-vkCmdDrawIndirectCount-None-08117
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdSetDescriptorBufferOffsetsEXT, the bound VkPipeline must have been created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawIndirectCount-None-08119
  If a descriptor is dynamically used with a VkPipeline created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdDrawIndirectCount-None-08605
  If a descriptor is dynamically used with a VkShaderEXT created with a `VkDescriptorSetLayout` that was created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdDrawIndirectCount-None-08606
  If the `shaderObject` feature is not enabled, a valid pipeline must be bound to the pipeline bind point used by this command

- VUID-vkCmdDrawIndirectCount-None-08608
  If a pipeline is bound to the pipeline bind point used by this command, there must not have been any calls to dynamic state setting commands for any state specified statically in the VkPipeline object bound to the pipeline bind point used by this command, since that pipeline was bound

- VUID-vkCmdDrawIndirectCount-uniformBuffers-06935
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawIndirectCount-None-08612
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawIndirectCount-storageBuffers-06936
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawIndirectCount-None-08613
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a storage buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawIndirectCount-commandBuffer-02707
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, any resource accessed by bound shaders must not be a protected resource

- VUID-vkCmdDrawIndirectCount-viewType-07752
  If a VkImageView is accessed as a result of this command, then the image view’s `viewType` must match the `Dim` operand of the `OpTypeImage` as described in Compatibility Between SPIR-V Image Dimensions and Vulkan ImageView Types

- VUID-vkCmdDrawIndirectCount-format-07753
  If a VkImageView or VkBufferView is accessed as a result of this command, then the numeric type of the view’s `format` and the `Sampled` `Type` operand of the `OpTypeImage` must match

- VUID-vkCmdDrawIndirectCount-OpImageWrite-08795
  If a VkImageView created with a format other than VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the image view’s format

- VUID-vkCmdDrawIndirectCount-OpImageWrite-08796
  If a VkImageView created with the format VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have four components

- VUID-vkCmdDrawIndirectCount-OpImageWrite-04469
  If a VkBufferView is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the buffer view’s format

- VUID-vkCmdDrawIndirectCount-SampledType-04470
  If a VkImageView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdDrawIndirectCount-SampledType-04471
  If a VkImageView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdDrawIndirectCount-SampledType-04472
  If a VkBufferView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdDrawIndirectCount-SampledType-04473
  If a VkBufferView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdDrawIndirectCount-sparseImageInt64Atomics-04474
  If the `sparseImageInt64Atomics` feature is not enabled, VkImage objects created with the VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdDrawIndirectCount-sparseImageInt64Atomics-04475
  If the `sparseImageInt64Atomics` feature is not enabled, VkBuffer objects created with the VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdDrawIndirectCount-OpImageSampleWeightedQCOM-06971
  If `OpImageSampleWeightedQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_SAMPLED_IMAGE_BIT_QCOM

- VUID-vkCmdDrawIndirectCount-OpImageSampleWeightedQCOM-06972
  If `OpImageSampleWeightedQCOM` uses a VkImageView as a sample weight image as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_IMAGE_BIT_QCOM

- VUID-vkCmdDrawIndirectCount-OpImageBoxFilterQCOM-06973
  If `OpImageBoxFilterQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BOX_FILTER_SAMPLED_BIT_QCOM

- VUID-vkCmdDrawIndirectCount-OpImageBlockMatchSSDQCOM-06974
  If `OpImageBlockMatchSSDQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdDrawIndirectCount-OpImageBlockMatchSADQCOM-12420
  If `OpImageBlockMatchSADQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdDrawIndirectCount-OpImageBlockMatchSADQCOM-06976
  If `OpImageBlockMatchSADQCOM` or OpImageBlockMatchSSDQCOM is used to read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdDrawIndirectCount-OpImageSampleWeightedQCOM-06977
  If `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdDrawIndirectCount-OpImageSampleWeightedQCOM-06978
  If any command other than `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must not have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdDrawIndirectCount-OpImageBlockMatchWindow-09215
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM

- VUID-vkCmdDrawIndirectCount-OpImageBlockMatchWindow-09216
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format must be a single-component format

- VUID-vkCmdDrawIndirectCount-OpImageBlockMatchWindow-09217
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdDrawIndirectCount-OpImageBlockMatchWindow-12421
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the `blockMatchExtendedClampToEdge` feature is not enabled, the input sampler must not have been created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawIndirectCount-addressModeU-12422
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the input sampler was created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, then the sampler must have been created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawIndirectCount-None-07288
  Any shader invocation executed by this command must terminate

- VUID-vkCmdDrawIndirectCount-None-09600
  If a descriptor with type equal to any of VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, or VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT is accessed as a result of this command, all image subresources identified by that descriptor must be in the image layout identified when the descriptor was written

- VUID-vkCmdDrawIndirectCount-micromap-11636
  If an acceleration structure is accessed as a result of this command through an `OpRayQueryProceedKHR` operation , the `VK_EXT_opacity_micromap` extension is not enabled, and the acceleration structure is built using geometry with a VkAccelerationStructureTrianglesOpacityMicromapKHR structure included in its `pNext` chain, the shader must have specified a `OpacityMicromapIdKHR` execution mode with its specialization constant operand equal to VK_TRUE

- VUID-vkCmdDrawIndirectCount-micromap-11637
  If an acceleration structure is accessed as a result of this command and the acceleration structure was constructed through deserialization, all micromap arrays referenced by the acceleration structure that were not replaced by an acceleration structure update command must have been deserialized using the serialized data of the corresponding micromaps used to originally build the acceleration structure prior to the execution of this command on the device

- VUID-vkCmdDrawIndirectCount-micromap-11638
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkPipeline bound to the pipeline bind point used by this command must not have been created with `flags` that includes VK_PIPELINE_CREATE_2_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_KHR

- VUID-vkCmdDrawIndirectCount-micromap-11639
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkShaderEXT that accessed the descriptor must not have been created with `flags` that includes VK_SHADER_CREATE_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_EXT

- VUID-vkCmdDrawIndirectCount-commandBuffer-10746
  The `VkDeviceMemory` object allocated from a `VkMemoryHeap` with the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property that is bound to a resource accessed as a result of this command must be the active bound tile memory object in `commandBuffer`

- VUID-vkCmdDrawIndirectCount-None-10678
  If this command is recorded inside a tile shading render pass instance, the stages corresponding to the pipeline bind point used by this command must only include VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_FRAGMENT_BIT, and/or VK_SHADER_STAGE_COMPUTE_BIT

- VUID-vkCmdDrawIndirectCount-None-10679
  If this command is recorded where per-tile execution model is enabled, there must be no access to any image while the image was be transitioned to the VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT layout

- VUID-vkCmdDrawIndirectCount-pDescription-09900
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the underlying VkTensorARM object must have been created with the VK_TENSOR_USAGE_SHADER_BIT_ARM usage flag set

- VUID-vkCmdDrawIndirectCount-dimensionCount-09905
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the `Rank` of the `OpTypeTensorARM` of the tensor resource variable must be equal to the `dimensionCount` provided via VkTensorCreateInfoARM::`pDescription` when creating the underlying VkTensorARM object

- VUID-vkCmdDrawIndirectCount-OpTypeTensorARM-09906
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the element type of the `OpTypeTensorARM` of the tensor resource variable must be compatible with the VkFormat of the VkTensorViewARM used for the access

- VUID-vkCmdDrawIndirectCount-OpTensorReadARM-12462
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, using `OpTensorReadARM` or `OpTensorWriteARM`, and the underlying VkTensorARM object was created with a VK_TENSOR_TILING_BRICK_16_WIDE_ARM, VK_TENSOR_TILING_BRICK_8_WIDE_ARM, VK_TENSOR_TILING_BRICK_4_WIDE_ARM, VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_ARM, or VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_64K_ARM VkTensorTilingARM, and the object read or written is an array, then the innermost coordinate provided to `OpTensorReadARM` or `OpTensorWriteARM` via the `Coordinates` operand must be a multiple of the largest power of 2 that is less than or equal to the number of components of the array

- VUID-vkCmdDrawIndirectCount-pNext-12463
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command and the corresponding VkTensorARM object was created with a VkTensorRollingBackingCreateInfoARM structure in the `pNext` chain of VkTensorCreateInfoARM, then the number of elements accessed with one `OpTensorReadARM` or `OpTensorWriteARM`, must be less than or equal to the number of elements available from the starting coordinate in the rolling backing along the innermost dimension, defined as `wraps`[`dimensionCount` - 1] - InnermostCoordinate % `wraps`[`dimensionCount` - 1] where InnermostCoordinate is the last component of the coordinates array provided via the `Coordinates` operand

- VUID-vkCmdDrawIndirectCount-None-12472
  Descriptors dynamically accessed in bound descriptor heaps must be valid

- VUID-vkCmdDrawIndirectCount-None-11297
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a `OpTypeStruct` decorated with `Block` or `BufferBlock` using that mapping, the calculated offset for the resource heap must be a multiple of `bufferDescriptorAlignment`

- VUID-vkCmdDrawIndirectCount-None-11298
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeImage` or `OpTypeSampledImage` using that mapping, the calculated offset for the resource heap must be a multiple of `imageDescriptorAlignment`

- VUID-vkCmdDrawIndirectCount-None-11299
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeSampler` or `OpTypeSampledImage` using that mapping, the calculated offset for the sampler heap must be a multiple of `samplerDescriptorAlignment`

- VUID-vkCmdDrawIndirectCount-None-11397
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeTensorARM` using that mapping, the calculated offset for the resource heap must be a multiple of `tensorDescriptorAlignment`

- VUID-vkCmdDrawIndirectCount-None-11300
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 4

- VUID-vkCmdDrawIndirectCount-None-11301
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdDrawIndirectCount-None-11302
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress

- VUID-vkCmdDrawIndirectCount-None-11304
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 8

- VUID-vkCmdDrawIndirectCount-None-11305
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdDrawIndirectCount-None-11306
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address pointed to by the address in push data must be a valid VkDeviceAddress

- VUID-vkCmdDrawIndirectCount-None-11308
  For each descriptor heap that is statically used by a bound shader, either directly or via a descriptor mapping, a valid descriptor heap must be bound

- VUID-vkCmdDrawIndirectCount-None-11309
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, execution of this command must not result in any descriptor read accessing data outside of the user range of the respective heap bound by `vkCmdBind*HeapEXT` commands

- VUID-vkCmdDrawIndirectCount-None-11372
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer or uniform texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified via VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawIndirectCount-None-11373
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer or storage texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawIndirectCount-None-11374
  If the `robustBufferAccess2` feature is not enabled, the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, uniform texel buffer, storage buffer, or storage texel buffer, that shader must not access values outside of the range of the buffer as specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawIndirectCount-pBindInfo-11375
  If any bound shader uses an embedded sampler via a descriptor mapping, the value of `pBindInfo->reservedRangeSize` set for vkCmdBindSamplerHeapEXT must be greater than or equal to `minSamplerHeapReservedRangeWithEmbedded`

- VUID-vkCmdDrawIndirectCount-None-11376
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, and that shader statically uses a push constant value, that value must have been set by vkCmdPushDataEXT

- VUID-vkCmdDrawIndirectCount-None-11398
  If a bound shader was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the access must not be out of bounds

- VUID-vkCmdDrawIndirectCount-None-11437
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the buffer from which the address in push data was queried must have been created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdDrawIndirectCount-None-11438
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdDrawIndirectCount-None-11441
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must be aligned to `minUniformBufferOffsetAlignment`

- VUID-vkCmdDrawIndirectCount-None-11439
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_STORAGE_BUFFER_BIT usage flag set

- VUID-vkCmdDrawIndirectCount-None-11442
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must be aligned to `minStorageBufferOffsetAlignment`

- VUID-vkCmdDrawIndirectCount-None-11485
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses an acceleration structure using that mapping, the address that the acceleration structure is mapped to must be an acceleration structure address retrieved from a VkAccelerationStructureKHR object via vkGetAccelerationStructureDeviceAddressKHR or handle retrieved from a VkAccelerationStructureNV object via vkGetAccelerationStructureHandleNV

- VUID-vkCmdDrawIndirectCount-index-11450
  If a shader uses a sampler descriptor to sample an image as a result of this command, and that sampler descriptor uses a custom border color with an index defined by VkSamplerCustomBorderColorIndexCreateInfoEXT, the value of VkSamplerCustomBorderColorIndexCreateInfoEXT::`index` must have been registered before this command was recorded, and still be registered during the sampling operation, with an identically defined color

- VUID-vkCmdDrawIndirectCount-protectedNoFault-11455
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, the address that the resource is mapped to must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdDrawIndirectCount-protectedNoFault-11456
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, the address of the indirect memory must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdDrawIndirectCount-renderPass-02684
  The current render pass must be compatible with the `renderPass` member of the `VkGraphicsPipelineCreateInfo` structure specified when creating the `VkPipeline` bound to VK_PIPELINE_BIND_POINT_GRAPHICS

- VUID-vkCmdDrawIndirectCount-subpass-02685
  The subpass index of the current render pass must be equal to the `subpass` member of the `VkGraphicsPipelineCreateInfo` structure specified when creating the `VkPipeline` bound to VK_PIPELINE_BIND_POINT_GRAPHICS

- VUID-vkCmdDrawIndirectCount-OpTypeImage-07468
  If any shader executed by this pipeline accesses an `OpTypeImage` variable with a `Dim` operand of `SubpassData`, it must be decorated with an `InputAttachmentIndex` that corresponds to a valid input attachment in the current subpass

- VUID-vkCmdDrawIndirectCount-None-07469
  Input attachment views accessed in a subpass must be created with the same VkFormat as the corresponding subpass definition, and be created with a VkImageView that is compatible with the attachment referenced by the subpass' `pInputAttachments`[`InputAttachmentIndex`] in the bound VkFramebuffer as specified by Fragment Input Attachment Compatibility

- VUID-vkCmdDrawIndirectCount-pDepthInputAttachmentIndex-09595
  Input attachment views accessed in a dynamic render pass with a `InputAttachmentIndex` referenced by VkRenderingInputAttachmentIndexInfo, or no `InputAttachmentIndex` if VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` or VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` are `NULL`, must be created with a VkImageView that is compatible with the corresponding color, depth, or stencil attachment in VkRenderingInfo

- VUID-vkCmdDrawIndirectCount-pDepthInputAttachmentIndex-09596
  Input attachment views accessed in a dynamic render pass via a shader object must have an `InputAttachmentIndex` if both VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` and VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` are non-`NULL`

- VUID-vkCmdDrawIndirectCount-InputAttachmentIndex-09597
  If an input attachment view accessed in a dynamic render pass via a shader object has an `InputAttachmentIndex`, the `InputAttachmentIndex` must match an index in VkRenderingInputAttachmentIndexInfo

- VUID-vkCmdDrawIndirectCount-None-06537
  Memory backing image subresources used as attachments in the current render pass must not be written in any way other than as an attachment by this command

- VUID-vkCmdDrawIndirectCount-None-10795
  If a color attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_COLOR_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawIndirectCount-None-10796
  If a depth attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_DEPTH_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawIndirectCount-None-10797
  If a stencil attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_STENCIL_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawIndirectCount-None-12338
  If a color attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_COLOR_BIT on that attachment, the color attachment must not be written to by this command

- VUID-vkCmdDrawIndirectCount-None-12339
  If a depth attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_DEPTH_BIT on that attachment, the depth attachment must not be written to by this command

- VUID-vkCmdDrawIndirectCount-None-12340
  If a stencil attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_STENCIL_BIT on that attachment, the stencil attachment must not be written to by this command

- VUID-vkCmdDrawIndirectCount-None-09003
  If an attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, it must not be accessed in any way other than as an attachment, storage image, or sampled image by this command

- VUID-vkCmdDrawIndirectCount-None-06886
  If the current render pass instance uses a depth/stencil attachment with a read-only layout for the depth aspect, depth writes must be disabled

- VUID-vkCmdDrawIndirectCount-None-06887
  If the current render pass instance uses a depth/stencil attachment with a read-only layout for the stencil aspect, both front and back `writeMask` are not zero, and stencil test is enabled, all stencil ops must be VK_STENCIL_OP_KEEP

- VUID-vkCmdDrawIndirectCount-None-07831
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT dynamic state enabled then vkCmdSetViewport must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount-None-07832
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SCISSOR dynamic state enabled then vkCmdSetScissor must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount-None-08617
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_WIDTH dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineWidth must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount-None-07834
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BIAS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthBiasEnable` is VK_TRUE, then vkCmdSetDepthBias or vkCmdSetDepthBias2EXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount-None-07835
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_BLEND_CONSTANTS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and an active color attachment current value of `blendEnable` is VK_TRUE with a blend equations where any VkBlendFactor member is VK_BLEND_FACTOR_CONSTANT_COLOR, VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR, VK_BLEND_FACTOR_CONSTANT_ALPHA, or VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA, then vkCmdSetBlendConstants must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount-None-07836
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BOUNDS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthBoundsTestEnable` is VK_TRUE, then vkCmdSetDepthBounds must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount-None-07837
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilCompareMask must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount-None-07838
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_WRITE_MASK dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilWriteMask must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount-None-07839
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_REFERENCE dynamic state enabled, the current value of and `rasterizerDiscardEnable` is VK_FALSE, the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilReference must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount-maxMultiviewInstanceIndex-02688
  If the draw is recorded in a render pass instance with multiview enabled, the maximum instance index must be less than or equal to VkPhysicalDeviceMultiviewProperties::`maxMultiviewInstanceIndex`

- VUID-vkCmdDrawIndirectCount-sampleLocationsEnable-02689
  If the bound graphics pipeline was created with VkPipelineSampleLocationsStateCreateInfoEXT::`sampleLocationsEnable` set to VK_TRUE, then the active depth attachment must have been created with the VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit set

- VUID-vkCmdDrawIndirectCount-None-07634
  If the `VK_EXT_sample_locations` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetSampleLocationsEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount-None-06666
  If the `VK_EXT_sample_locations` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `sampleLocationsEnable` is VK_TRUE, then vkCmdSetSampleLocationsEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount-None-07840
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_CULL_MODE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCullMode must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount-None-07841
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRONT_FACE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetFrontFace must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount-None-07843
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, vkCmdSetDepthTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount-None-07844
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthTestEnable` is VK_TRUE, then vkCmdSetDepthWriteEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount-None-07845
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_COMPARE_OP dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthTestEnable` is VK_TRUE, then vkCmdSetDepthCompareOp must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount-None-07846
  If the `depthBounds` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthBoundsTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount-None-07847
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetStencilTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount-None-07848
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_OP dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilOp must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount-viewportCount-03417
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, and the state is not inherited, then vkCmdSetViewportWithCount must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount-scissorCount-03418
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT dynamic state enabled, and the state is not inherited, then vkCmdSetScissorWithCount must have been called and not subsequently invalidated in the current command buffer prior to this drawing

- VUID-vkCmdDrawIndirectCount-viewportCount-03419
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with both the VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic states enabled, and the state is not inherited, then the `viewportCount` parameter of `vkCmdSetViewportWithCount` must match the `scissorCount` parameter of `vkCmdSetScissorWithCount`

- VUID-vkCmdDrawIndirectCount-viewportCount-04137
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportWScalingStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndirectCount-viewportCount-04138
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, the current value of `viewportWScalingEnable` is VK_TRUE, then vkCmdSetViewportWScalingNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount-None-08636
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, the current value of `viewportWScalingEnable` is VK_TRUE, then the `viewportCount` parameter in the last call to vkCmdSetViewportWScalingNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndirectCount-viewportCount-04139
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportShadingRateImageStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndirectCount-shadingRateImage-09233
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_COARSE_SAMPLE_ORDER_NV and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoarseSampleOrderNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount-shadingRateImage-09234
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `shadingRateImageEnable` is VK_TRUE, then vkCmdSetViewportShadingRatePaletteNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount-None-08637
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `shadingRateImageEnable` is VK_TRUE, then the `viewportCount` parameter in the last call to vkCmdSetViewportShadingRatePaletteNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndirectCount-VkPipelineVieportCreateInfo-04141
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled and a VkPipelineViewportSwizzleStateCreateInfoNV structure chained from VkPipelineViewportStateCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportSwizzleStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndirectCount-VkPipelineVieportCreateInfo-04142
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled and a VkPipelineViewportExclusiveScissorStateCreateInfoNV structure chained from VkPipelineViewportStateCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportExclusiveScissorStateCreateInfoNV::`exclusiveScissorCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndirectCount-None-07878
  If the `exclusiveScissor` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_ENABLE_NV dynamic state enabled, then vkCmdSetExclusiveScissorEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount-None-07879
  If the `exclusiveScissor` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_NV dynamic state enabled, and the most recent call to vkCmdSetExclusiveScissorEnableNV in the current command buffer set any element of `pExclusiveScissorEnables` to VK_TRUE, then vkCmdSetExclusiveScissorNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount-None-04876
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE dynamic state enabled, then vkCmdSetRasterizerDiscardEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount-None-04877
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthBiasEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount-logicOp-04878
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LOGIC_OP_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `logicOpEnable` is VK_TRUE, then vkCmdSetLogicOpEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount-primitiveFragmentShadingRateWithMultipleViewports-04552
  If the `primitiveFragmentShadingRateWithMultipleViewports` limit is not supported, the bound graphics pipeline was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, and any of the shader stages of the bound graphics pipeline write to the `PrimitiveShadingRateKHR` built-in, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and the `viewportCount` parameter of `vkCmdSetViewportWithCount` must be `1`

- VUID-vkCmdDrawIndirectCount-primitiveFragmentShadingRateWithMultipleViewports-08642
  If the `primitiveFragmentShadingRateWithMultipleViewports` limit is not supported, and any shader object bound to a graphics stage writes to the `PrimitiveShadingRateKHR` built-in, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and the `viewportCount` parameter of `vkCmdSetViewportWithCount` must be `1`

- VUID-vkCmdDrawIndirectCount-blendEnable-04727
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, then for each color attachment, if the corresponding image view’s format features do not contain VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT, then the corresponding current value of `blendEnable` must be VK_FALSE

- VUID-vkCmdDrawIndirectCount-None-08644
  If a shader object is bound to any graphics stage or a graphics pipeline is bound, the current value of `rasterizerDiscardEnable` is VK_FALSE, and none of the following is enabled:

  - the `VK_AMD_mixed_attachment_samples` extension

  - the `VK_NV_framebuffer_mixed_samples` extension

  - the `multisampledRenderToSingleSampled` feature

  then the current value of `rasterizationSamples` must be the same as the current color and/or depth/stencil attachments

- VUID-vkCmdDrawIndirectCount-None-08876
  If a shader object is bound to any graphics stage, the current render pass instance must have been begun with vkCmdBeginRendering

- VUID-vkCmdDrawIndirectCount-imageView-06172
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawIndirectCount-imageView-06173
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawIndirectCount-imageView-06174
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawIndirectCount-imageView-06175
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawIndirectCount-imageView-06176
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawIndirectCount-imageView-06177
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawIndirectCount-viewMask-06178
  If the current render pass instance was begun with vkCmdBeginRendering, the bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::`viewMask` equal to VkRenderingInfo::`viewMask`

- VUID-vkCmdDrawIndirectCount-colorAttachmentCount-06179
  If the `dynamicRenderingUnusedAttachments` feature is not enabled and the current render pass instance was begun with vkCmdBeginRendering, the bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::`colorAttachmentCount` equal to VkRenderingInfo::`colorAttachmentCount`

- VUID-vkCmdDrawIndirectCount-dynamicRenderingUnusedAttachments-08910
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound graphics pipeline

- VUID-vkCmdDrawIndirectCount-dynamicRenderingUnusedAttachments-08912
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` equal to VK_NULL_HANDLE must have the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound pipeline equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectCount-dynamicRenderingUnusedAttachments-08911
  If the `dynamicRenderingUnusedAttachments` feature is enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound graphics pipeline, or the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats`, if it exists, must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectCount-colorAttachmentCount-09362
  If the current render pass instance was begun with vkCmdBeginRendering, with a VkRenderingInfo::`colorAttachmentCount` equal to `1`, there is no shader object bound to any graphics stage, and a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, each element of the VkRenderingInfo::`pColorAttachments` array with a `resolveImageView` not equal to VK_NULL_HANDLE must have been created with an image created with a VkExternalFormatANDROID::`externalFormat` value equal to the VkExternalFormatANDROID::`externalFormat` value used to create the bound graphics pipeline

- VUID-vkCmdDrawIndirectCount-None-09363
  If there is no shader object bound to any graphics stage, the current render pass instance was begun with vkCmdBeginRendering and a VkRenderingInfo::`colorAttachmentCount` equal to `1`, and a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with an image created with a VkExternalFormatANDROID::`externalFormat` value equal to the VkExternalFormatANDROID::`externalFormat` value used to create the bound graphics pipeline

- VUID-vkCmdDrawIndirectCount-None-09364
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetColorBlendEnableEXT must have set the blend enable to VK_FALSE prior to this drawing command

- VUID-vkCmdDrawIndirectCount-None-09365
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetRasterizationSamplesEXT must have set `rasterizationSamples` to VK_SAMPLE_COUNT_1_BIT prior to this drawing command

- VUID-vkCmdDrawIndirectCount-None-09368
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetFragmentShadingRateKHR must have set `pFragmentSize->width` to `1` prior to this drawing command

- VUID-vkCmdDrawIndirectCount-None-09369
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetFragmentShadingRateKHR must have set `pFragmentSize->height` to `1` prior to this drawing command

- VUID-vkCmdDrawIndirectCount-None-07749
  If the `colorWriteEnable` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorWriteEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount-attachmentCount-07750
  If the `colorWriteEnable` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the `attachmentCount` parameter of most recent call to `vkCmdSetColorWriteEnableEXT` in the current command buffer must be greater than or equal to the number of active color attachments

- VUID-vkCmdDrawIndirectCount-None-07751
  If the `VK_EXT_discard_rectangles` extension is enabled, a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT dynamic state enabled and the `pNext` chain of VkGraphicsPipelineCreateInfo included a VkPipelineDiscardRectangleStateCreateInfoEXT structure, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for each discard rectangle in VkPipelineDiscardRectangleStateCreateInfoEXT::`discardRectangleCount`

- VUID-vkCmdDrawIndirectCount-rasterizerDiscardEnable-09236
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT dynamic state enabled and the `pNext` chain of VkGraphicsPipelineCreateInfo did not include a VkPipelineDiscardRectangleStateCreateInfoEXT structure, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for each discard rectangle in VkPhysicalDeviceDiscardRectanglePropertiesEXT::`maxDiscardRectangles`

- VUID-vkCmdDrawIndirectCount-None-07880
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDiscardRectangleEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount-None-07881
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_MODE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount-dynamicRenderingUnusedAttachments-08913
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->imageView` was VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectCount-dynamicRenderingUnusedAttachments-08914
  If current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawIndirectCount-dynamicRenderingUnusedAttachments-08915
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, and the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->imageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectCount-dynamicRenderingUnusedAttachments-08916
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->imageView` was VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectCount-dynamicRenderingUnusedAttachments-08917
  If current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawIndirectCount-dynamicRenderingUnusedAttachments-08918
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, and the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->imageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectCount-imageView-06183
  If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentShadingRateAttachmentInfoKHR::`imageView` was not VK_NULL_HANDLE, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

- VUID-vkCmdDrawIndirectCount-dynamicRenderingLocalRead-11797
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingLocalRead` feature is enabled, the VK_RENDERING_LOCAL_READ_CONCURRENT_ACCESS_CONTROL_BIT_KHR flag is specified, and an attachment is being used as a feedback loop as specified by VK_RENDERING_ATTACHMENT_INPUT_ATTACHMENT_FEEDBACK_BIT_KHR, VkRenderingAttachmentFlagsInfoKHR::`flags` for that attachment must include VK_RENDERING_ATTACHMENT_INPUT_ATTACHMENT_FEEDBACK_BIT_KHR

- VUID-vkCmdDrawIndirectCount-imageView-06184
  If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentDensityMapAttachmentInfoEXT::`imageView` was not VK_NULL_HANDLE, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT

- VUID-vkCmdDrawIndirectCount-layers-10831
  If the current render pass instance was created with VK_RENDERING_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE or VK_RENDER_PASS_CREATE_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE, and the bound graphics pipeline was created with VK_PIPELINE_CREATE_2_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE, then the current render pass instance must have a `layers` value less than or equal to VkPipelineFragmentDensityMapLayeredCreateInfoVALVE::`maxFragmentDensityMapLayers`

- VUID-vkCmdDrawIndirectCount-colorAttachmentCount-06185
  If the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with a sample count equal to the corresponding element of the `pColorAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline

- VUID-vkCmdDrawIndirectCount-pDepthAttachment-06186
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of the `depthStencilAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawIndirectCount-pStencilAttachment-06187
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of the `depthStencilAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawIndirectCount-multisampledRenderToSingleSampled-07285
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with a sample count equal to the value of `rasterizationSamples` for the bound graphics pipeline

- VUID-vkCmdDrawIndirectCount-multisampledRenderToSingleSampled-07286
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawIndirectCount-multisampledRenderToSingleSampled-07287
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawIndirectCount-pNext-07935
  If this command is called inside a render pass instance started with vkCmdBeginRendering, and the `pNext` chain of VkRenderingInfo includes a VkMultisampledRenderToSingleSampledInfoEXT structure with `multisampledRenderToSingleSampledEnable` equal to VK_TRUE, then the value of `rasterizationSamples` for the bound graphics pipeline must be equal to VkMultisampledRenderToSingleSampledInfoEXT::`rasterizationSamples`

- VUID-vkCmdDrawIndirectCount-renderPass-06198
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline must have been created with a VkGraphicsPipelineCreateInfo::`renderPass` equal to VK_NULL_HANDLE

- VUID-vkCmdDrawIndirectCount-pColorAttachments-08963
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound with a fragment shader that statically writes to a color attachment, the color write mask is not zero, color writes are enabled, and the corresponding element of the VkRenderingInfo::`pColorAttachments->imageView` was not VK_NULL_HANDLE, then the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectCount-pColorAttachments-11539
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound with a fragment shader that statically writes to a color attachment, the color write mask is not zero, color writes are enabled, and the corresponding element of the VkRenderingInfo::`pColorAttachments->resolveImageView` was not VK_NULL_HANDLE, then the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectCount-pDepthAttachment-08964
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound, depth test is enabled, and the VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, then the VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectCount-pDepthAttachment-11540
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound, depth test is enabled, and the VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, then the VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectCount-pStencilAttachment-08965
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound, stencil test is enabled and the VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, then the VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectCount-pStencilAttachment-11860
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound, stencil test is enabled and the VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, then the VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectCount-flags-10582
  If the current render pass instance was begun with a vkCmdBeginRendering call in `commandBuffer`, its VkRenderingInfo::`flags` parameter must not have VK_RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT set unless VK_RENDERING_CONTENTS_INLINE_BIT_KHR is also set

- VUID-vkCmdDrawIndirectCount-primitivesGeneratedQueryWithRasterizerDiscard-06708
  If the `primitivesGeneratedQueryWithRasterizerDiscard` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, rasterization discard must not be enabled

- VUID-vkCmdDrawIndirectCount-primitivesGeneratedQueryWithNonZeroStreams-06709
  If the `primitivesGeneratedQueryWithNonZeroStreams` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, the bound graphics pipeline must not have been created with a non-zero value in `VkPipelineRasterizationStateStreamCreateInfoEXT`::`rasterizationStream`

- VUID-vkCmdDrawIndirectCount-None-07620
  If the `depthClamp` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLAMP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthClampEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount-None-07621
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_POLYGON_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetPolygonModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount-None-07622
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetRasterizationSamplesEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount-None-07623
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetSampleMaskEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount-alphaToCoverageEnable-08919
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT dynamic state enabled, and `alphaToCoverageEnable` was VK_TRUE in the last call to vkCmdSetAlphaToCoverageEnableEXT, then the Fragment Output Interface must contain a variable for the alpha `Component` word in `Location` 0 at `Index` 0

- VUID-vkCmdDrawIndirectCount-alphaToCoverageEnable-08920
  If a shader object is bound to any graphics stage, and the most recent call to vkCmdSetAlphaToCoverageEnableEXT in the current command buffer set `alphaToCoverageEnable` to VK_TRUE, then the Fragment Output Interface must contain a variable for the alpha `Component` word in `Location` 0 at `Index` 0

- VUID-vkCmdDrawIndirectCount-None-07624
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAlphaToCoverageEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount-None-07625
  If the `alphaToOne` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ALPHA_TO_ONE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAlphaToOneEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount-None-07626
  If the `logicOp` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LOGIC_OP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetLogicOpEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount-None-07627
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and there are color attachments bound, then vkCmdSetColorBlendEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount-None-07629
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and there are color attachments bound, then vkCmdSetColorWriteMaskEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount-None-07630
  If the `geometryStreams` feature is enabled, and a shader object is bound to the VK_SHADER_STAGE_GEOMETRY_BIT stage or a graphics pipeline is bound which was created with both a VK_SHADER_STAGE_GEOMETRY_BIT stage and the VK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXT dynamic state enabled, then vkCmdSetRasterizationStreamEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount-None-07631
  If the `VK_EXT_conservative_rasterization` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_CONSERVATIVE_RASTERIZATION_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetConservativeRasterizationModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount-None-07632
  If the `VK_EXT_conservative_rasterization` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXTRA_PRIMITIVE_OVERESTIMATION_SIZE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `conservativeRasterizationMode` is VK_CONSERVATIVE_RASTERIZATION_MODE_OVERESTIMATE_EXT, then vkCmdSetExtraPrimitiveOverestimationSizeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount-conservativePointAndLineRasterization-07499
  If the `VK_EXT_conservative_rasterization` extension is enabled, `conservativePointAndLineRasterization` is not supported, a shader object is bound to any graphics stage or a graphics pipeline is bound, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line or point topology class, then the current value of `conservativeRasterizationMode` must be VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT

- VUID-vkCmdDrawIndirectCount-None-07633
  If the `depthClipEnable` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLIP_ENABLE_EXT dynamic state, then vkCmdSetDepthClipEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount-None-07636
  If the `VK_EXT_provoking_vertex` extension is enabled, a shader object is bound to the VK_SHADER_STAGE_VERTEX_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_PROVOKING_VERTEX_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetProvokingVertexModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount-None-08666
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineRasterizationModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount-None-08669
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineStippleEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount-None-07849
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled and a shader object is bound to any graphics stage, or a bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stippledLineEnable` is VK_TRUE, then vkCmdSetLineStipple must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount-None-10608
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic state enabled, the effective rasterization input topology is in the line topology class, and the current `lineRasterizationMode` is VK_LINE_RASTERIZATION_MODE_BRESENHAM or VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH, then the current `alphaToCoverageEnable`, `alphaToOneEnable` and `sampleShadingEnable` states must all be VK_FALSE

- VUID-vkCmdDrawIndirectCount-None-07639
  If the `depthClipControl` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLIP_NEGATIVE_ONE_TO_ONE_EXT dynamic state enabled, then vkCmdSetDepthClipNegativeOneToOneEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount-None-09650
  If the `depthClampControl` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLAMP_RANGE_EXT dynamic state enabled, and the current value of `depthClampEnable` is VK_TRUE, then vkCmdSetDepthClampRangeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount-None-07640
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_ENABLE_NV dynamic state enabled, then vkCmdSetViewportWScalingEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount-None-07641
  If the `VK_NV_viewport_swizzle` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic state enabled, then vkCmdSetViewportSwizzleNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount-None-07642
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageToColorEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount-None-07643
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_LOCATION_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageToColorEnable` is VK_TRUE, then vkCmdSetCoverageToColorLocationNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount-None-07644
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_MODE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageModulationModeNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount-None-07645
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageModulationMode` is any value other than VK_COVERAGE_MODULATION_MODE_NONE_NV, then vkCmdSetCoverageModulationTableEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount-None-07646
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageModulationTableEnable` is VK_TRUE, then vkCmdSetCoverageModulationTableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount-None-07647
  If the `shadingRateImage` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SHADING_RATE_IMAGE_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetShadingRateImageEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount-pipelineFragmentShadingRate-09238
  If the `pipelineFragmentShadingRate` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetFragmentShadingRateKHR must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount-None-07648
  If the `representativeFragmentTest` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_REPRESENTATIVE_FRAGMENT_TEST_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetRepresentativeFragmentTestEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount-None-07649
  If the `coverageReductionMode` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageReductionModeNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount-rasterizationSamples-07471
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current subpass does not use any color and/or depth/stencil attachments, then the `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT must follow the rules for a zero-attachment subpass

- VUID-vkCmdDrawIndirectCount-samples-07472
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state disabled, then the `samples` parameter in the last call to vkCmdSetSampleMaskEXT must be greater or equal to the VkPipelineMultisampleStateCreateInfo::`rasterizationSamples` parameter used to create the bound graphics pipeline

- VUID-vkCmdDrawIndirectCount-samples-07473
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT state and VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT states enabled, then the `samples` parameter in the last call to vkCmdSetSampleMaskEXT must be greater or equal to the `rasterizationSamples` parameter in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawIndirectCount-None-09211
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, or a shader object is bound to any graphics stage, and the current render pass instance includes a VkMultisampledRenderToSingleSampledInfoEXT structure with `multisampledRenderToSingleSampledEnable` equal to VK_TRUE, then the `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT must be the same as the `rasterizationSamples` member of that structure

- VUID-vkCmdDrawIndirectCount-firstAttachment-07476
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic states enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the last call to vkCmdSetColorBlendEnableEXT in the current command buffer prior to this drawing command must have set a value for all active color attachments

- VUID-vkCmdDrawIndirectCount-firstAttachment-07478
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT dynamic states enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the last call to vkCmdSetColorWriteMaskEXT in the current command buffer prior to this drawing command must have set a value for all active color attachments

- VUID-vkCmdDrawIndirectCount-advancedBlendMaxColorAttachments-07480
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT and VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic states enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and an active color attachment current value of `blendEnable` is VK_TRUE, then the number of active color attachments must not exceed `advancedBlendMaxColorAttachments`

- VUID-vkCmdDrawIndirectCount-None-10862
  If a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT , but not the VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorBlendEquationEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawIndirectCount-rasterizerDiscardEnable-10863
  If a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT, but not the VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorBlendAdvancedEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawIndirectCount-None-10864
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT and VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then either vkCmdSetColorBlendAdvancedEXT or vkCmdSetColorBlendEquationEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawIndirectCount-primitivesGeneratedQueryWithNonZeroStreams-07481
  If the `primitivesGeneratedQueryWithNonZeroStreams` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, and the bound graphics pipeline was created with VK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXT state enabled, the last call to vkCmdSetRasterizationStreamEXT must have set the `rasterizationStream` to zero

- VUID-vkCmdDrawIndirectCount-sampleLocationsPerPixel-07482
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state disabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then the `sampleLocationsPerPixel` member of `pSampleLocationsInfo` in the last call to vkCmdSetSampleLocationsEXT must equal the `rasterizationSamples` member of the VkPipelineMultisampleStateCreateInfo structure the bound graphics pipeline has been created with

- VUID-vkCmdDrawIndirectCount-sampleLocationsPerPixel-07483
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then the `sampleLocationsPerPixel` member of `pSampleLocationsInfo` in the last call to vkCmdSetSampleLocationsEXT must equal the `rasterizationSamples` parameter of the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawIndirectCount-sampleLocationsEnable-07484
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT then the current active depth attachment must have been created with the VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit set

- VUID-vkCmdDrawIndirectCount-sampleLocationsEnable-07485
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, then the `sampleLocationsInfo.maxSampleLocationGridSize.width` in the last call to vkCmdSetSampleLocationsEXT must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.width` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling `rasterizationSamples`

- VUID-vkCmdDrawIndirectCount-sampleLocationsEnable-07486
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, then the `sampleLocationsInfo.maxSampleLocationGridSize.height` in the last call to vkCmdSetSampleLocationsEXT must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.height` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling `rasterizationSamples`

- VUID-vkCmdDrawIndirectCount-sampleLocationsEnable-07487
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, the fragment shader code must not statically use the extended instruction `InterpolateAtSample`

- VUID-vkCmdDrawIndirectCount-sampleLocationsEnable-07936
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationGridSize.width` must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.width` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling the value of `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawIndirectCount-sampleLocationsEnable-07937
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationGridSize.height` must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.height` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling the value of `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawIndirectCount-sampleLocationsEnable-07938
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationsPerPixel` must equal `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawIndirectCount-coverageModulationTableEnable-07488
  If a shader object is bound to any graphics stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NV state enabled, and the last call to vkCmdSetCoverageModulationTableEnableNV set `coverageModulationTableEnable` to VK_TRUE, then the `coverageModulationTableCount` parameter in the last call to vkCmdSetCoverageModulationTableNV must equal the current `rasterizationSamples` divided by the number of color samples in the current active color attachment

- VUID-vkCmdDrawIndirectCount-rasterizationSamples-07489
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, and if current subpass has a depth/stencil attachment and depth test, stencil test, or depth bounds test are enabled in the bound pipeline, then the current `rasterizationSamples` must be the same as the sample count of the depth/stencil attachment

- VUID-vkCmdDrawIndirectCount-coverageToColorEnable-07490
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV state enabled and the last call to vkCmdSetCoverageToColorEnableNV set the `coverageToColorEnable` to VK_TRUE, then there must be an active color attachment at the location selected by the last call to vkCmdSetCoverageToColorLocationNV `coverageToColorLocation`, with a VkFormat of VK_FORMAT_R8_UINT, VK_FORMAT_R8_SINT, VK_FORMAT_R16_UINT, VK_FORMAT_R16_SINT, VK_FORMAT_R32_UINT, or VK_FORMAT_R32_SINT

- VUID-vkCmdDrawIndirectCount-rasterizerDiscardEnable-09420
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, and a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, and the most recent call to vkCmdSetRasterizerDiscardEnable in the current command buffer set `rasterizerDiscardEnable` to VK_FALSE, and the last call to vkCmdSetCoverageToColorEnableNV set the `coverageToColorEnable` to VK_TRUE, then there must be an active color attachment at the location selected by the last call to vkCmdSetCoverageToColorLocationNV `coverageToColorLocation`, with a VkFormat of VK_FORMAT_R8_UINT, VK_FORMAT_R8_SINT, VK_FORMAT_R16_UINT, VK_FORMAT_R16_SINT, VK_FORMAT_R32_UINT, or VK_FORMAT_R32_SINT

- VUID-vkCmdDrawIndirectCount-coverageReductionMode-07491
  If the `coverageReductionMode` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV or VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic states enabled, then the current values of `coverageReductionMode`, `rasterizationSamples`, the sample counts for the color and depth/stencil attachments (if the subpass has them) must be a valid combination returned by vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV

- VUID-vkCmdDrawIndirectCount-viewportCount-07492
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportSwizzleStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndirectCount-viewportCount-07493
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic states enabled then the `viewportCount` parameter in the last call to vkCmdSetViewportSwizzleNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndirectCount-viewportCount-09421
  If the `VK_NV_viewport_swizzle` extension is enabled, and a shader object is bound to any graphics stage, then the `viewportCount` parameter in the last call to vkCmdSetViewportSwizzleNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndirectCount-rasterizationSamples-07494
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, and the `coverageReductionMode` feature is not enabled, or the current value of `coverageReductionMode` is not VK_COVERAGE_REDUCTION_MODE_TRUNCATE_NV, and the current value of `rasterizationSamples` is greater than sample count of the color attachment, then sample shading must be disabled

- VUID-vkCmdDrawIndirectCount-stippledLineEnable-07495
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_RECTANGULAR, then the `stippledRectangularLines` feature must be enabled

- VUID-vkCmdDrawIndirectCount-stippledLineEnable-07496
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_BRESENHAM, then the `stippledBresenhamLines` feature must be enabled

- VUID-vkCmdDrawIndirectCount-stippledLineEnable-07497
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH, then the `stippledSmoothLines` feature must be enabled

- VUID-vkCmdDrawIndirectCount-stippledLineEnable-07498
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_DEFAULT, then the `stippledRectangularLines` feature must be enabled and VkPhysicalDeviceLimits::`strictLines` must be VK_TRUE

- VUID-vkCmdDrawIndirectCount-stage-07073
  If the bound pipeline was created with the VkPipelineShaderStageCreateInfo::`stage` member of an element of VkGraphicsPipelineCreateInfo::`pStages` set to VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT, then Mesh Shader Queries must not be active

- VUID-vkCmdDrawIndirectCount-None-08877
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ATTACHMENT_FEEDBACK_LOOP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAttachmentFeedbackLoopEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount-None-07850
  If dynamic state was inherited from VkCommandBufferInheritanceViewportScissorInfoNV, it must be set in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount-nextStage-10745
  For each shader object bound to a graphics stage, except for shader object bound to the last graphics stage in the logical pipeline, it must have been created with a `nextStage` including the corresponding bit to the shader object bound to the following graphics stage in the logical pipeline

- VUID-vkCmdDrawIndirectCount-None-08684
  If there is no bound graphics pipeline, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_VERTEX_BIT

- VUID-vkCmdDrawIndirectCount-None-08685
  If there is no bound graphics pipeline, and the `tessellationShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT

- VUID-vkCmdDrawIndirectCount-None-08686
  If there is no bound graphics pipeline, and the `tessellationShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT

- VUID-vkCmdDrawIndirectCount-None-08687
  If there is no bound graphics pipeline, and the `geometryShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_GEOMETRY_BIT

- VUID-vkCmdDrawIndirectCount-None-08688
  If there is no bound graphics pipeline, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_FRAGMENT_BIT

- VUID-vkCmdDrawIndirectCount-None-08689
  If there is no bound graphics pipeline, and the `taskShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TASK_BIT_EXT

- VUID-vkCmdDrawIndirectCount-None-08690
  If there is no bound graphics pipeline, and the `meshShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-vkCmdDrawIndirectCount-None-08693
  If there is no bound graphics pipeline, and at least one of the `taskShader` and `meshShader` features is enabled, one of the VK_SHADER_STAGE_VERTEX_BIT or VK_SHADER_STAGE_MESH_BIT_EXT stages must have a valid `VkShaderEXT` bound, and the other must have no `VkShaderEXT` bound

- VUID-vkCmdDrawIndirectCount-None-08696
  If there is no bound graphics pipeline, and a valid `VkShaderEXT` is bound to the VK_SHADER_STAGE_VERTEX_BIT stage, there must be no `VkShaderEXT` bound to either the VK_SHADER_STAGE_TASK_BIT_EXT stage or the VK_SHADER_STAGE_MESH_BIT_EXT stage

- VUID-vkCmdDrawIndirectCount-None-08698
  If any graphics shader is bound which was created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag, then all shaders created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag in the same vkCreateShadersEXT call must also be bound

- VUID-vkCmdDrawIndirectCount-None-08699
  If any graphics shader is bound which was created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag, any stages in between stages whose shaders which did not create a shader with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag as part of the same vkCreateShadersEXT call must not have any `VkShaderEXT` bound

- VUID-vkCmdDrawIndirectCount-None-08878
  All bound graphics shader objects must have been created with identical or identically defined push constant ranges

- VUID-vkCmdDrawIndirectCount-None-08879
  All bound graphics shader objects must have either been created with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag set, or with identical or identically defined arrays of descriptor set layouts

- VUID-vkCmdDrawIndirectCount-colorAttachmentCount-09372
  If the current render pass instance was begun with vkCmdBeginRendering and a VkRenderingInfo::`colorAttachmentCount` equal to `1`, a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, and a fragment shader is bound, it must not declare the `DepthReplacing` or `StencilRefReplacingEXT` execution modes

- VUID-vkCmdDrawIndirectCount-pDynamicStates-08715
  If the bound graphics pipeline state includes a fragment shader stage, was created with VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`, and the fragment shader declares the `EarlyFragmentTests` execution mode and uses `OpDepthAttachmentReadEXT`, the `depthWriteEnable` parameter in the last call to vkCmdSetDepthWriteEnable must be VK_FALSE

- VUID-vkCmdDrawIndirectCount-pDynamicStates-08716
  If the bound graphics pipeline state includes a fragment shader stage, was created with VK_DYNAMIC_STATE_STENCIL_WRITE_MASK set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`, and the fragment shader declares the `EarlyFragmentTests` execution mode and uses `OpStencilAttachmentReadEXT`, the `writeMask` parameter in the last call to vkCmdSetStencilWriteMask must be `0`

- VUID-vkCmdDrawIndirectCount-None-09116
  If a shader object is bound to any graphics stage or the bound graphics pipeline was created with VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT, and the format of any color attachment is VK_FORMAT_E5B9G9R9_UFLOAT_PACK32, the corresponding element of the `pColorWriteMasks` parameter of vkCmdSetColorWriteMaskEXT must either include all of VK_COLOR_COMPONENT_R_BIT, VK_COLOR_COMPONENT_G_BIT, VK_COLOR_COMPONENT_B_BIT, and VK_COLOR_COMPONENT_A_BIT, or none of them

- VUID-vkCmdDrawIndirectCount-maxFragmentDualSrcAttachments-09239
  If blending is enabled for any attachment where either the source or destination blend factors for that attachment use the secondary color input, the maximum value of `Location` for any output attachment statically used in the `Fragment` `Execution` `Model` executed by this command must be less than `maxFragmentDualSrcAttachments`

- VUID-vkCmdDrawIndirectCount-None-09548
  If the current render pass was begun with vkCmdBeginRendering, there is no shader object bound to any graphics stage, the value of each element of VkRenderingAttachmentLocationInfo::`pColorAttachmentLocations` in the bound pipeline must match the value for the corresponding locations set currently in the current render pass instance

- VUID-vkCmdDrawIndirectCount-None-09549
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of each element of VkRenderingInputAttachmentIndexInfo::`pColorAttachmentInputIndices` in the bound pipeline must match the value for the corresponding index set currently in the current render pass instance

- VUID-vkCmdDrawIndirectCount-None-10927
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` in the bound pipeline must match the value set currently in the current render pass instance

- VUID-vkCmdDrawIndirectCount-None-10928
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` in the bound pipeline must match the value set currently in the current render pass instance

- VUID-vkCmdDrawIndirectCount-None-09642
  If the current render pass was begun with vkCmdBeginRendering with the VK_RENDERING_ENABLE_LEGACY_DITHERING_BIT_EXT flag, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_2_ENABLE_LEGACY_DITHERING_BIT_EXT

- VUID-vkCmdDrawIndirectCount-None-09643
  If the bound graphics pipeline was created with VK_PIPELINE_CREATE_2_ENABLE_LEGACY_DITHERING_BIT_EXT, the current render pass must have begun with vkCmdBeginRendering with the VK_RENDERING_ENABLE_LEGACY_DITHERING_BIT_EXT flag

- VUID-vkCmdDrawIndirectCount-None-10677
  If the per-tile execution model is enabled, the tileShadingPerTileDraw feature must be enabled

- VUID-vkCmdDrawIndirectCount-None-10772
  If a shader object is bound to any graphics stage, multiview functionality must not be enabled in the current render pass

- VUID-vkCmdDrawIndirectCount-multiviewPerViewViewports-12262
  If the `multiviewPerViewViewports` feature is enabled, then the index of the most significant bit in current render pass instance `viewMask` must be less than the current value of `viewportCount`

- VUID-vkCmdDrawIndirectCount-multiviewPerViewViewports-12263
  If the `multiviewPerViewViewports` feature is enabled, then the index of the most significant bit in current render pass instance `viewMask` must be less than the current value of `scissorCount`

- VUID-vkCmdDrawIndirectCount-flags-11521
  If current render pass instance was begun with vkCmdBeginRendering with VkRenderingInfo::`flags` which includes VK_RENDERING_FRAGMENT_REGION_BIT_EXT, and if sample shading is enabled (explicitly or implicitly), then the minimum fraction for sample shading must equal 0.0

- VUID-vkCmdDrawIndirectCount-None-11522
  If the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, and the `dynamicRenderingUnusedAttachments` feature is not enabled, the graphics pipeline bound must have been created with a VkCustomResolveCreateInfoEXT

- VUID-vkCmdDrawIndirectCount-None-11523
  If the current render pass instance was begun with vkCmdBeginRendering and does not contain a custom resolve, and the `dynamicRenderingUnusedAttachments` feature is not enabled, the graphics pipeline bound must not have been created with a VkCustomResolveCreateInfoEXT

- VUID-vkCmdDrawIndirectCount-customResolve-11524
  If the current render pass instance was begun with vkCmdBeginRendering and vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, the graphics pipeline bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_TRUE

- VUID-vkCmdDrawIndirectCount-customResolve-11525
  If the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, and vkCmdBeginCustomResolveEXT has not been recorded in the render pass instance, the graphics pipeline bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_FALSE

- VUID-vkCmdDrawIndirectCount-None-11861
  If the `dynamicRenderingUnusedAttachments` feature is not enabled and the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, the bound graphics pipeline must have been created with a VkCustomResolveCreateInfoEXT::`colorAttachmentCount` equal to VkRenderingInfo::`colorAttachmentCount`

- VUID-vkCmdDrawIndirectCount-None-11862
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound graphics pipeline

- VUID-vkCmdDrawIndirectCount-None-11863
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` equal to VK_NULL_HANDLE must have the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound pipeline equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectCount-dynamicRenderingUnusedAttachments-11864
  If the `dynamicRenderingUnusedAttachments` feature is enabled, the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound graphics pipeline, or the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats`, if it exists, must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectCount-None-11865
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectCount-None-11866
  If current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`

- VUID-vkCmdDrawIndirectCount-dynamicRenderingUnusedAttachments-11867
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, and the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectCount-None-11868
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->resolveImageView` was VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectCount-None-11869
  If current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`

- VUID-vkCmdDrawIndirectCount-dynamicRenderingUnusedAttachments-11870
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, and the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectCount-colorAttachmentCount-11871
  If the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0` and vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, then for each element of the VkRenderingInfo::`pColorAttachments` array with a `resolveImageView` not equal to VK_NULL_HANDLE, the `resolveImageView` must have been created with a sample count equal to the value of `rasterizationSamples` for the bound graphics pipeline

- VUID-vkCmdDrawIndirectCount-pDepthAttachment-11872
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`

- VUID-vkCmdDrawIndirectCount-pStencilAttachment-11873
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`

- VUID-vkCmdDrawIndirectCount-customResolve-11529
  If a shader object is bound to the fragment stage, the current render pass instance was begun with vkCmdBeginRendering, a fragment density map attachment is active, and vkCmdBeginCustomResolveEXT has been called, then the fragment shader object bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_TRUE

- VUID-vkCmdDrawIndirectCount-customResolve-11530
  If a shader object is bound to the fragment stage, the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, a fragment density map attachment is active, and vkCmdBeginCustomResolveEXT has not yet been called, then the fragment shader object bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_FALSE

- VUID-vkCmdDrawIndirectCount-flags-13361
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, then all bound shader objects must have been created with the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit

- VUID-vkCmdDrawIndirectCount-flags-13362
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, then the pipeline layout of the bound descriptor sets must have been created with VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT set

- VUID-vkCmdDrawIndirectCount-flags-13363
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, and any of the descriptor set layouts used to create the pipeline layout of the bound descriptor sets were created with any binding’s VkDescriptorSetLayoutBinding::`stageFlags` set with VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT, then there must be no binding with VkDescriptorSetLayoutBinding::`stageFlags` set with VK_SHADER_STAGE_TASK_BIT_EXT or VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-vkCmdDrawIndirectCount-flags-13364
  If there are any shader objects bound that were created with `flags` that includes both the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR and VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT bits, the pipeline layout of the bound descriptor sets must have been created with VK_PIPELINE_LAYOUT_CREATE_NO_TASK_SHADER_BIT_KHR set

- VUID-vkCmdDrawIndirectCount-flags-13365
  If there are any shader objects bound that were created with `flags` that includes both the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR and VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT bits, there must be no shader object bound to the VK_SHADER_STAGE_TASK_BIT_EXT stage

- VUID-vkCmdDrawIndirectCount-None-04007
  All vertex input bindings accessed via vertex input variables declared in the vertex shader entry point’s interface must have either valid or VK_NULL_HANDLE buffers bound

- VUID-vkCmdDrawIndirectCount-None-04008
  If the `nullDescriptor` feature is not enabled, all vertex input bindings accessed via vertex input variables declared in the vertex shader entry point’s interface must not be VK_NULL_HANDLE

- VUID-vkCmdDrawIndirectCount-None-02721
  If the `robustBufferAccess` feature is not enabled, and that pipeline was created without enabling VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS for `vertexInputs`, then for a given vertex buffer binding, any attribute data fetched must be entirely contained within the corresponding vertex buffer binding, as described in Vertex Input Description

- VUID-vkCmdDrawIndirectCount-format-10389
  For each vertex attribute accessed by this command, if its VkVertexInputAttributeDescription::`format` or VkVertexInputAttributeDescription2EXT::`format` is a packed format, and the `legacyVertexAttributes` feature is not enabled, the value of `attribAddress`, calculated as described in Vertex Input Calculation, must be a multiple of the size of the `format`

- VUID-vkCmdDrawIndirectCount-format-10390
  For each vertex attribute accessed by this command, if its VkVertexInputAttributeDescription::`format` or VkVertexInputAttributeDescription2EXT::`format` is not a packed format, and either the `legacyVertexAttributes` feature is not enabled or `format` has 64-bit components, the value of `attribAddress`, calculated as described in Vertex Input Calculation, must be a multiple of the component size of the `format`

- VUID-vkCmdDrawIndirectCount-None-07842
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY dynamic state enabled then vkCmdSetPrimitiveTopology must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount-dynamicPrimitiveTopologyUnrestricted-07500
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY dynamic state enabled and the `dynamicPrimitiveTopologyUnrestricted` is VK_FALSE, then the `primitiveTopology` parameter of `vkCmdSetPrimitiveTopology` must be of the same topology class as the pipeline VkPipelineInputAssemblyStateCreateInfo::`topology` state

- VUID-vkCmdDrawIndirectCount-primitiveTopology-10286
  If a VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage is bound, then the current value of `primitiveTopology` must be VK_PRIMITIVE_TOPOLOGY_PATCH_LIST prior to this drawing command

- VUID-vkCmdDrawIndirectCount-primitiveTopology-10747
  If vkCmdSetPrimitiveTopology set `primitiveTopology` to VK_PRIMITIVE_TOPOLOGY_PATCH_LIST prior to this drawing command, then a VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage must be bound

- VUID-vkCmdDrawIndirectCount-primitiveTopology-10748
  If vkCmdSetPrimitiveTopology set `primitiveTopology` to VK_PRIMITIVE_TOPOLOGY_POINT_LIST prior to this drawing command, the `maintenance5` feature is not enabled, both a VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT and VK_SHADER_STAGE_GEOMETRY_BIT stage are not bound, then the `Vertex` `Execution` `Model` must have a `PointSize` decorated variable that is statically written to

- VUID-vkCmdDrawIndirectCount-pStrides-04913
  If the bound graphics pipeline was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE dynamic state enabled, but without the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled, then vkCmdBindVertexBuffers2 with a non-`NULL` `pStrides` parameter or vkCmdBindVertexBuffers3KHR with `setStride` set to VK_TRUE must have been called and not subsequently invalidated in the current command buffer prior to this draw command

- VUID-vkCmdDrawIndirectCount-None-13118
  If the bound graphics pipeline was created without the VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE dynamic state enabled, without the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled, and vkCmdBindVertexBuffers3KHR was called and not subsequently invalidated in the current command buffer prior to this draw command, the value of `setStride` in each of its `pBindInfos` elements must have been VK_FALSE

- VUID-vkCmdDrawIndirectCount-None-04914
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled then vkCmdSetVertexInputEXT must have been called and not subsequently invalidated in the current command buffer prior to this draw command

- VUID-vkCmdDrawIndirectCount-Input-07939
  If the `vertexAttributeRobustness` feature is not enabled, and the `maintenance9` feature is not enabled, and there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled then all variables with the `Input` storage class decorated with `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` must contain a location in VkVertexInputAttributeDescription2EXT::`location`

- VUID-vkCmdDrawIndirectCount-Input-08734
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled and either the `legacyVertexAttributes` feature is not enabled or the SPIR-V Type associated with a given `Input` variable of the corresponding `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` is 64-bit, then the numeric type associated with all `Input` variables of the corresponding `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` must be the same as VkVertexInputAttributeDescription2EXT::`format`

- VUID-vkCmdDrawIndirectCount-format-08936
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled and VkVertexInputAttributeDescription2EXT::`format` has a 64-bit component, then the scalar width associated with all `Input` variables of the corresponding `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` must be 64-bit

- VUID-vkCmdDrawIndirectCount-format-08937
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled and the scalar width associated with a `Location` decorated `Input` variable in the `Vertex` `Execution` `Model` `OpEntryPoint` is 64-bit, then the corresponding VkVertexInputAttributeDescription2EXT::`format` must have a 64-bit component

- VUID-vkCmdDrawIndirectCount-None-09203
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled and VkVertexInputAttributeDescription2EXT::`format` has a 64-bit component, then all `Input` variables at the corresponding `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` must not use components that are not present in the format

- VUID-vkCmdDrawIndirectCount-None-04875
  If there is a shader object bound to the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage or the bound graphics pipeline state was created with both a VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage and the VK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT dynamic state enabled, and the current value of `primitiveTopology` is VK_PRIMITIVE_TOPOLOGY_PATCH_LIST, then vkCmdSetPatchControlPointsEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount-None-04879
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE dynamic state enabled then vkCmdSetPrimitiveRestartEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount-None-09637
  If the `primitiveTopologyListRestart` feature is not enabled, the input assembly is VK_PRIMITIVE_TOPOLOGY_POINT_LIST, VK_PRIMITIVE_TOPOLOGY_LINE_LIST, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY, or VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY, there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE dynamic state enabled, then vkCmdSetPrimitiveRestartEnable must be VK_FALSE

- VUID-vkCmdDrawIndirectCount-None-10909
  If the `primitiveTopologyPatchListRestart` feature is not enabled, the input assembly is VK_PRIMITIVE_TOPOLOGY_PATCH_LIST, there is a shader object bound to the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE dynamic state enabled then vkCmdSetPrimitiveRestartEnable must be VK_FALSE

- VUID-vkCmdDrawIndirectCount-stage-06481
  The bound graphics pipeline must not have been created with the VkPipelineShaderStageCreateInfo::`stage` member of any element of VkGraphicsPipelineCreateInfo::`pStages` set to VK_SHADER_STAGE_TASK_BIT_EXT or VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-vkCmdDrawIndirectCount-None-08885
  There must be no shader object bound to either of the VK_SHADER_STAGE_TASK_BIT_EXT or VK_SHADER_STAGE_MESH_BIT_EXT stages

- VUID-vkCmdDrawIndirectCount-None-07619
  If a shader object is bound to the VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stage or a graphics pipeline is bound which was created with both a VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stage and the VK_DYNAMIC_STATE_TESSELLATION_DOMAIN_ORIGIN_EXT dynamic state enabled, then vkCmdSetTessellationDomainOriginEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectCount-OpExecutionMode-12239
  If a shader is bound to both the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stages, and if both stages contain an `OpExecutionMode` instruction specifying the type of subdivision, they must be the same

- VUID-vkCmdDrawIndirectCount-OpExecutionMode-12240
  If a shader is bound to both the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stages, and if both stages contain an `OpExecutionMode` instruction specifying the orientation of triangles, they must be the same

- VUID-vkCmdDrawIndirectCount-OpExecutionMode-12241
  If a shader is bound to both the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stages, and if both stages contain an `OpExecutionMode` instruction specifying the segment spacing, they must be the same

- VUID-vkCmdDrawIndirectCount-OpExecutionMode-12242
  If a shader is bound to both the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stages, and if both stages contain an `OpExecutionMode` instruction specifying the output patch size, they must be the same

- VUID-vkCmdDrawIndirectCount-buffer-02708
  If `buffer` is non-sparse then it must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-vkCmdDrawIndirectCount-buffer-02709
  `buffer` must have been created with the VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT usage flag set

- VUID-vkCmdDrawIndirectCount-offset-02710
  `offset` must be a multiple of `4`

- VUID-vkCmdDrawIndirectCount-commandBuffer-02711
  `commandBuffer` must not be a protected command buffer

- VUID-vkCmdDrawIndirectCount-countBuffer-02714
  If `countBuffer` is non-sparse then it must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-vkCmdDrawIndirectCount-countBuffer-02715
  `countBuffer` must have been created with the VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT usage flag set

- VUID-vkCmdDrawIndirectCount-countBufferOffset-02716
  `countBufferOffset` must be a multiple of `4`

- VUID-vkCmdDrawIndirectCount-countBuffer-02717
  The count stored in `countBuffer` must be less than or equal to `VkPhysicalDeviceLimits`::`maxDrawIndirectCount`

- VUID-vkCmdDrawIndirectCount-countBufferOffset-04129
  (`countBufferOffset` + `sizeof`(uint32_t)) must be less than or equal to the size of `countBuffer`

- VUID-vkCmdDrawIndirectCount-None-04445
  If the `drawIndirectCount` feature is not enabled this function must not be used

- VUID-vkCmdDrawIndirectCount-stride-03110
  `stride` must be a multiple of `4` and must be greater than or equal to sizeof(`VkDrawIndirectCommand`)

- VUID-vkCmdDrawIndirectCount-maxDrawCount-03111
  If `maxDrawCount` is greater than or equal to `1`, (`stride` × (`maxDrawCount` - 1) + `offset` + sizeof(`VkDrawIndirectCommand`)) must be less than or equal to the size of `buffer`

Valid Usage (Implicit)

- VUID-vkCmdDrawIndirectCount-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdDrawIndirectCount-buffer-parameter
  `buffer` must be a valid VkBuffer handle

- VUID-vkCmdDrawIndirectCount-countBuffer-parameter
  `countBuffer` must be a valid VkBuffer handle

- VUID-vkCmdDrawIndirectCount-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdDrawIndirectCount-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdDrawIndirectCount-renderpass
  This command must only be called inside of a render pass instance

- VUID-vkCmdDrawIndirectCount-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdDrawIndirectCount-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdDrawIndirectCount-commonparent
  Each of `buffer`, `commandBuffer`, and `countBuffer` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Inside | Outside | VK_QUEUE_GRAPHICS_BIT | Action

Conditional Rendering

vkCmdDrawIndirectCount is affected by conditional rendering

To record an indexed indirect drawing command, call:

    // Provided by VK_KHR_device_address_commands
    void vkCmdDrawIndexedIndirect2KHR(
        VkCommandBuffer                             commandBuffer,
        const VkDrawIndirect2InfoKHR*               pInfo);

- `commandBuffer` is the command buffer into which the command is recorded.

- `pInfo` is a pointer to a VkDrawIndirect2InfoKHR structure defining parameters of this command.

`vkCmdDrawIndexedIndirect2KHR` behaves similarly to vkCmdDrawIndexed except that the parameters are read by the device from an address range during execution. `pInfo->drawCount` draws are executed by the command, with parameters taken from `pInfo->addressRange` starting at `addressRange.address` and increasing by `addressRange.stride` bytes for each successive draw. The parameters of each draw are encoded in an array of VkDrawIndexedIndirectCommand structures.

Valid Usage

- VUID-vkCmdDrawIndexedIndirect2KHR-magFilter-04553
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdDrawIndexedIndirect2KHR-magFilter-09598
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdDrawIndexedIndirect2KHR-mipmapMode-04770
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdDrawIndexedIndirect2KHR-mipmapMode-09599
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdDrawIndexedIndirect2KHR-unnormalizedCoordinates-09635
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `levelCount` and `layerCount` must be 1

- VUID-vkCmdDrawIndexedIndirect2KHR-None-08609
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `viewType` must be VK_IMAGE_VIEW_TYPE_1D or VK_IMAGE_VIEW_TYPE_2D

- VUID-vkCmdDrawIndexedIndirect2KHR-None-08610
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions with `ImplicitLod`, `Dref` or `Proj` in their name

- VUID-vkCmdDrawIndexedIndirect2KHR-None-08611
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions that includes a LOD bias or any offset values

- VUID-vkCmdDrawIndexedIndirect2KHR-None-06479
  If a VkImageView is sampled with depth comparison, the image view’s format features must contain VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT

- VUID-vkCmdDrawIndexedIndirect2KHR-None-02691
  If a VkImageView is accessed using atomic operations as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT

- VUID-vkCmdDrawIndexedIndirect2KHR-None-07888
  If a VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER descriptor is accessed using atomic operations as a result of this command, then the storage texel buffer’s format features must contain VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT

- VUID-vkCmdDrawIndexedIndirect2KHR-None-02692
  If a VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT

- VUID-vkCmdDrawIndexedIndirect2KHR-None-02693
  If the VK_EXT_filter_cubic extension is not enabled and any VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, it must not have a VkImageViewType of VK_IMAGE_VIEW_TYPE_3D, VK_IMAGE_VIEW_TYPE_CUBE, or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY

- VUID-vkCmdDrawIndexedIndirect2KHR-filterCubic-02694
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have a VkImageViewType and format that supports cubic filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubic` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdDrawIndexedIndirect2KHR-filterCubicMinmax-02695
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX as a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubicMinmax` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdDrawIndexedIndirect2KHR-cubicRangeClamp-09212
  If the `cubicRangeClamp` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must not have a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM

- VUID-vkCmdDrawIndexedIndirect2KHR-reductionMode-09213
  Any VkImageView being sampled with a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM as a result of this command must sample with VK_FILTER_CUBIC_EXT

- VUID-vkCmdDrawIndexedIndirect2KHR-selectableCubicWeights-09214
  If the `selectableCubicWeights` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have VkSamplerCubicWeightsCreateInfoQCOM::`cubicWeights` equal to VK_CUBIC_FILTER_WEIGHTS_CATMULL_ROM_QCOM

- VUID-vkCmdDrawIndexedIndirect2KHR-flags-02696
  Any VkImage created with a VkImageCreateInfo::`flags` containing VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV sampled as a result of this command must only be sampled using a VkSamplerAddressMode of VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawIndexedIndirect2KHR-OpTypeImage-07027
  For any VkImageView being written as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawIndexedIndirect2KHR-OpTypeImage-07028
  For any VkImageView being read as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawIndexedIndirect2KHR-OpTypeImage-07029
  For any VkBufferView being written as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown`, the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawIndexedIndirect2KHR-OpTypeImage-07030
  Any VkBufferView being read as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown` then the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawIndexedIndirect2KHR-None-08600
  If a a bound shader was created with a pipeline layout and statically uses a set n, a descriptor set must have been bound to n at the same pipeline bind point, with layouts compatible for set n with the layout(s) used to create the shader, as described in Pipeline Layout Compatibility

- VUID-vkCmdDrawIndexedIndirect2KHR-None-08601
  If a a bound shader was created with a pipeline layout or specified push constant ranges and statically uses a push constant value, that value must have been set for the same pipeline bind point, with push constant ranges that are compatible with the push constant range used to create the shader

- VUID-vkCmdDrawIndexedIndirect2KHR-None-10068
  For each array of resources that is used by a bound shader, the indices used to access members of the array must be less than the descriptor count for the identified binding in the descriptor sets used by this command

- VUID-vkCmdDrawIndexedIndirect2KHR-None-08114
  Descriptors in each bound descriptor set, specified via vkCmdBindDescriptorSets, must be valid if they are accessed as described by descriptor validity by the VkPipeline bound to the pipeline bind point used by this command and the bound VkPipeline was not created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawIndexedIndirect2KHR-imageLayout-00344
  If an image descriptor is accessed by a shader, the VkImageLayout must match the subresource accessible from the VkImageView as defined by the image layout matching rules

- VUID-vkCmdDrawIndexedIndirect2KHR-None-08115
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdBindDescriptorSets, the bound VkPipeline must have been created without VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawIndexedIndirect2KHR-None-08116
  Descriptors in bound descriptor buffers, specified via vkCmdSetDescriptorBufferOffsetsEXT, must be valid if they are dynamically accessed

- VUID-vkCmdDrawIndexedIndirect2KHR-None-08117
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdSetDescriptorBufferOffsetsEXT, the bound VkPipeline must have been created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawIndexedIndirect2KHR-None-08119
  If a descriptor is dynamically used with a VkPipeline created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdDrawIndexedIndirect2KHR-None-08605
  If a descriptor is dynamically used with a VkShaderEXT created with a `VkDescriptorSetLayout` that was created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdDrawIndexedIndirect2KHR-None-08606
  If the `shaderObject` feature is not enabled, a valid pipeline must be bound to the pipeline bind point used by this command

- VUID-vkCmdDrawIndexedIndirect2KHR-None-08608
  If a pipeline is bound to the pipeline bind point used by this command, there must not have been any calls to dynamic state setting commands for any state specified statically in the VkPipeline object bound to the pipeline bind point used by this command, since that pipeline was bound

- VUID-vkCmdDrawIndexedIndirect2KHR-uniformBuffers-06935
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawIndexedIndirect2KHR-None-08612
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawIndexedIndirect2KHR-storageBuffers-06936
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawIndexedIndirect2KHR-None-08613
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a storage buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawIndexedIndirect2KHR-commandBuffer-02707
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, any resource accessed by bound shaders must not be a protected resource

- VUID-vkCmdDrawIndexedIndirect2KHR-viewType-07752
  If a VkImageView is accessed as a result of this command, then the image view’s `viewType` must match the `Dim` operand of the `OpTypeImage` as described in Compatibility Between SPIR-V Image Dimensions and Vulkan ImageView Types

- VUID-vkCmdDrawIndexedIndirect2KHR-format-07753
  If a VkImageView or VkBufferView is accessed as a result of this command, then the numeric type of the view’s `format` and the `Sampled` `Type` operand of the `OpTypeImage` must match

- VUID-vkCmdDrawIndexedIndirect2KHR-OpImageWrite-08795
  If a VkImageView created with a format other than VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the image view’s format

- VUID-vkCmdDrawIndexedIndirect2KHR-OpImageWrite-08796
  If a VkImageView created with the format VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have four components

- VUID-vkCmdDrawIndexedIndirect2KHR-OpImageWrite-04469
  If a VkBufferView is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the buffer view’s format

- VUID-vkCmdDrawIndexedIndirect2KHR-SampledType-04470
  If a VkImageView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdDrawIndexedIndirect2KHR-SampledType-04471
  If a VkImageView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdDrawIndexedIndirect2KHR-SampledType-04472
  If a VkBufferView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdDrawIndexedIndirect2KHR-SampledType-04473
  If a VkBufferView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdDrawIndexedIndirect2KHR-sparseImageInt64Atomics-04474
  If the `sparseImageInt64Atomics` feature is not enabled, VkImage objects created with the VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdDrawIndexedIndirect2KHR-sparseImageInt64Atomics-04475
  If the `sparseImageInt64Atomics` feature is not enabled, VkBuffer objects created with the VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdDrawIndexedIndirect2KHR-OpImageSampleWeightedQCOM-06971
  If `OpImageSampleWeightedQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_SAMPLED_IMAGE_BIT_QCOM

- VUID-vkCmdDrawIndexedIndirect2KHR-OpImageSampleWeightedQCOM-06972
  If `OpImageSampleWeightedQCOM` uses a VkImageView as a sample weight image as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_IMAGE_BIT_QCOM

- VUID-vkCmdDrawIndexedIndirect2KHR-OpImageBoxFilterQCOM-06973
  If `OpImageBoxFilterQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BOX_FILTER_SAMPLED_BIT_QCOM

- VUID-vkCmdDrawIndexedIndirect2KHR-OpImageBlockMatchSSDQCOM-06974
  If `OpImageBlockMatchSSDQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdDrawIndexedIndirect2KHR-OpImageBlockMatchSADQCOM-12420
  If `OpImageBlockMatchSADQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdDrawIndexedIndirect2KHR-OpImageBlockMatchSADQCOM-06976
  If `OpImageBlockMatchSADQCOM` or OpImageBlockMatchSSDQCOM is used to read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdDrawIndexedIndirect2KHR-OpImageSampleWeightedQCOM-06977
  If `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdDrawIndexedIndirect2KHR-OpImageSampleWeightedQCOM-06978
  If any command other than `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must not have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdDrawIndexedIndirect2KHR-OpImageBlockMatchWindow-09215
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM

- VUID-vkCmdDrawIndexedIndirect2KHR-OpImageBlockMatchWindow-09216
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format must be a single-component format

- VUID-vkCmdDrawIndexedIndirect2KHR-OpImageBlockMatchWindow-09217
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdDrawIndexedIndirect2KHR-OpImageBlockMatchWindow-12421
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the `blockMatchExtendedClampToEdge` feature is not enabled, the input sampler must not have been created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawIndexedIndirect2KHR-addressModeU-12422
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the input sampler was created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, then the sampler must have been created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawIndexedIndirect2KHR-None-07288
  Any shader invocation executed by this command must terminate

- VUID-vkCmdDrawIndexedIndirect2KHR-None-09600
  If a descriptor with type equal to any of VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, or VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT is accessed as a result of this command, all image subresources identified by that descriptor must be in the image layout identified when the descriptor was written

- VUID-vkCmdDrawIndexedIndirect2KHR-micromap-11636
  If an acceleration structure is accessed as a result of this command through an `OpRayQueryProceedKHR` operation , the `VK_EXT_opacity_micromap` extension is not enabled, and the acceleration structure is built using geometry with a VkAccelerationStructureTrianglesOpacityMicromapKHR structure included in its `pNext` chain, the shader must have specified a `OpacityMicromapIdKHR` execution mode with its specialization constant operand equal to VK_TRUE

- VUID-vkCmdDrawIndexedIndirect2KHR-micromap-11637
  If an acceleration structure is accessed as a result of this command and the acceleration structure was constructed through deserialization, all micromap arrays referenced by the acceleration structure that were not replaced by an acceleration structure update command must have been deserialized using the serialized data of the corresponding micromaps used to originally build the acceleration structure prior to the execution of this command on the device

- VUID-vkCmdDrawIndexedIndirect2KHR-micromap-11638
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkPipeline bound to the pipeline bind point used by this command must not have been created with `flags` that includes VK_PIPELINE_CREATE_2_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_KHR

- VUID-vkCmdDrawIndexedIndirect2KHR-micromap-11639
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkShaderEXT that accessed the descriptor must not have been created with `flags` that includes VK_SHADER_CREATE_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_EXT

- VUID-vkCmdDrawIndexedIndirect2KHR-commandBuffer-10746
  The `VkDeviceMemory` object allocated from a `VkMemoryHeap` with the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property that is bound to a resource accessed as a result of this command must be the active bound tile memory object in `commandBuffer`

- VUID-vkCmdDrawIndexedIndirect2KHR-None-10678
  If this command is recorded inside a tile shading render pass instance, the stages corresponding to the pipeline bind point used by this command must only include VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_FRAGMENT_BIT, and/or VK_SHADER_STAGE_COMPUTE_BIT

- VUID-vkCmdDrawIndexedIndirect2KHR-None-10679
  If this command is recorded where per-tile execution model is enabled, there must be no access to any image while the image was be transitioned to the VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT layout

- VUID-vkCmdDrawIndexedIndirect2KHR-pDescription-09900
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the underlying VkTensorARM object must have been created with the VK_TENSOR_USAGE_SHADER_BIT_ARM usage flag set

- VUID-vkCmdDrawIndexedIndirect2KHR-dimensionCount-09905
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the `Rank` of the `OpTypeTensorARM` of the tensor resource variable must be equal to the `dimensionCount` provided via VkTensorCreateInfoARM::`pDescription` when creating the underlying VkTensorARM object

- VUID-vkCmdDrawIndexedIndirect2KHR-OpTypeTensorARM-09906
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the element type of the `OpTypeTensorARM` of the tensor resource variable must be compatible with the VkFormat of the VkTensorViewARM used for the access

- VUID-vkCmdDrawIndexedIndirect2KHR-OpTensorReadARM-12462
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, using `OpTensorReadARM` or `OpTensorWriteARM`, and the underlying VkTensorARM object was created with a VK_TENSOR_TILING_BRICK_16_WIDE_ARM, VK_TENSOR_TILING_BRICK_8_WIDE_ARM, VK_TENSOR_TILING_BRICK_4_WIDE_ARM, VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_ARM, or VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_64K_ARM VkTensorTilingARM, and the object read or written is an array, then the innermost coordinate provided to `OpTensorReadARM` or `OpTensorWriteARM` via the `Coordinates` operand must be a multiple of the largest power of 2 that is less than or equal to the number of components of the array

- VUID-vkCmdDrawIndexedIndirect2KHR-pNext-12463
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command and the corresponding VkTensorARM object was created with a VkTensorRollingBackingCreateInfoARM structure in the `pNext` chain of VkTensorCreateInfoARM, then the number of elements accessed with one `OpTensorReadARM` or `OpTensorWriteARM`, must be less than or equal to the number of elements available from the starting coordinate in the rolling backing along the innermost dimension, defined as `wraps`[`dimensionCount` - 1] - InnermostCoordinate % `wraps`[`dimensionCount` - 1] where InnermostCoordinate is the last component of the coordinates array provided via the `Coordinates` operand

- VUID-vkCmdDrawIndexedIndirect2KHR-None-12472
  Descriptors dynamically accessed in bound descriptor heaps must be valid

- VUID-vkCmdDrawIndexedIndirect2KHR-None-11297
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a `OpTypeStruct` decorated with `Block` or `BufferBlock` using that mapping, the calculated offset for the resource heap must be a multiple of `bufferDescriptorAlignment`

- VUID-vkCmdDrawIndexedIndirect2KHR-None-11298
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeImage` or `OpTypeSampledImage` using that mapping, the calculated offset for the resource heap must be a multiple of `imageDescriptorAlignment`

- VUID-vkCmdDrawIndexedIndirect2KHR-None-11299
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeSampler` or `OpTypeSampledImage` using that mapping, the calculated offset for the sampler heap must be a multiple of `samplerDescriptorAlignment`

- VUID-vkCmdDrawIndexedIndirect2KHR-None-11397
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeTensorARM` using that mapping, the calculated offset for the resource heap must be a multiple of `tensorDescriptorAlignment`

- VUID-vkCmdDrawIndexedIndirect2KHR-None-11300
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 4

- VUID-vkCmdDrawIndexedIndirect2KHR-None-11301
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdDrawIndexedIndirect2KHR-None-11302
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress

- VUID-vkCmdDrawIndexedIndirect2KHR-None-11304
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 8

- VUID-vkCmdDrawIndexedIndirect2KHR-None-11305
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdDrawIndexedIndirect2KHR-None-11306
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address pointed to by the address in push data must be a valid VkDeviceAddress

- VUID-vkCmdDrawIndexedIndirect2KHR-None-11308
  For each descriptor heap that is statically used by a bound shader, either directly or via a descriptor mapping, a valid descriptor heap must be bound

- VUID-vkCmdDrawIndexedIndirect2KHR-None-11309
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, execution of this command must not result in any descriptor read accessing data outside of the user range of the respective heap bound by `vkCmdBind*HeapEXT` commands

- VUID-vkCmdDrawIndexedIndirect2KHR-None-11372
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer or uniform texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified via VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawIndexedIndirect2KHR-None-11373
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer or storage texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawIndexedIndirect2KHR-None-11374
  If the `robustBufferAccess2` feature is not enabled, the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, uniform texel buffer, storage buffer, or storage texel buffer, that shader must not access values outside of the range of the buffer as specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawIndexedIndirect2KHR-pBindInfo-11375
  If any bound shader uses an embedded sampler via a descriptor mapping, the value of `pBindInfo->reservedRangeSize` set for vkCmdBindSamplerHeapEXT must be greater than or equal to `minSamplerHeapReservedRangeWithEmbedded`

- VUID-vkCmdDrawIndexedIndirect2KHR-None-11376
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, and that shader statically uses a push constant value, that value must have been set by vkCmdPushDataEXT

- VUID-vkCmdDrawIndexedIndirect2KHR-None-11398
  If a bound shader was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the access must not be out of bounds

- VUID-vkCmdDrawIndexedIndirect2KHR-None-11437
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the buffer from which the address in push data was queried must have been created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdDrawIndexedIndirect2KHR-None-11438
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdDrawIndexedIndirect2KHR-None-11441
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must be aligned to `minUniformBufferOffsetAlignment`

- VUID-vkCmdDrawIndexedIndirect2KHR-None-11439
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_STORAGE_BUFFER_BIT usage flag set

- VUID-vkCmdDrawIndexedIndirect2KHR-None-11442
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must be aligned to `minStorageBufferOffsetAlignment`

- VUID-vkCmdDrawIndexedIndirect2KHR-None-11485
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses an acceleration structure using that mapping, the address that the acceleration structure is mapped to must be an acceleration structure address retrieved from a VkAccelerationStructureKHR object via vkGetAccelerationStructureDeviceAddressKHR or handle retrieved from a VkAccelerationStructureNV object via vkGetAccelerationStructureHandleNV

- VUID-vkCmdDrawIndexedIndirect2KHR-index-11450
  If a shader uses a sampler descriptor to sample an image as a result of this command, and that sampler descriptor uses a custom border color with an index defined by VkSamplerCustomBorderColorIndexCreateInfoEXT, the value of VkSamplerCustomBorderColorIndexCreateInfoEXT::`index` must have been registered before this command was recorded, and still be registered during the sampling operation, with an identically defined color

- VUID-vkCmdDrawIndexedIndirect2KHR-protectedNoFault-11455
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, the address that the resource is mapped to must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdDrawIndexedIndirect2KHR-protectedNoFault-11456
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, the address of the indirect memory must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdDrawIndexedIndirect2KHR-renderPass-02684
  The current render pass must be compatible with the `renderPass` member of the `VkGraphicsPipelineCreateInfo` structure specified when creating the `VkPipeline` bound to VK_PIPELINE_BIND_POINT_GRAPHICS

- VUID-vkCmdDrawIndexedIndirect2KHR-subpass-02685
  The subpass index of the current render pass must be equal to the `subpass` member of the `VkGraphicsPipelineCreateInfo` structure specified when creating the `VkPipeline` bound to VK_PIPELINE_BIND_POINT_GRAPHICS

- VUID-vkCmdDrawIndexedIndirect2KHR-OpTypeImage-07468
  If any shader executed by this pipeline accesses an `OpTypeImage` variable with a `Dim` operand of `SubpassData`, it must be decorated with an `InputAttachmentIndex` that corresponds to a valid input attachment in the current subpass

- VUID-vkCmdDrawIndexedIndirect2KHR-None-07469
  Input attachment views accessed in a subpass must be created with the same VkFormat as the corresponding subpass definition, and be created with a VkImageView that is compatible with the attachment referenced by the subpass' `pInputAttachments`[`InputAttachmentIndex`] in the bound VkFramebuffer as specified by Fragment Input Attachment Compatibility

- VUID-vkCmdDrawIndexedIndirect2KHR-pDepthInputAttachmentIndex-09595
  Input attachment views accessed in a dynamic render pass with a `InputAttachmentIndex` referenced by VkRenderingInputAttachmentIndexInfo, or no `InputAttachmentIndex` if VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` or VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` are `NULL`, must be created with a VkImageView that is compatible with the corresponding color, depth, or stencil attachment in VkRenderingInfo

- VUID-vkCmdDrawIndexedIndirect2KHR-pDepthInputAttachmentIndex-09596
  Input attachment views accessed in a dynamic render pass via a shader object must have an `InputAttachmentIndex` if both VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` and VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` are non-`NULL`

- VUID-vkCmdDrawIndexedIndirect2KHR-InputAttachmentIndex-09597
  If an input attachment view accessed in a dynamic render pass via a shader object has an `InputAttachmentIndex`, the `InputAttachmentIndex` must match an index in VkRenderingInputAttachmentIndexInfo

- VUID-vkCmdDrawIndexedIndirect2KHR-None-06537
  Memory backing image subresources used as attachments in the current render pass must not be written in any way other than as an attachment by this command

- VUID-vkCmdDrawIndexedIndirect2KHR-None-10795
  If a color attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_COLOR_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawIndexedIndirect2KHR-None-10796
  If a depth attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_DEPTH_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawIndexedIndirect2KHR-None-10797
  If a stencil attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_STENCIL_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawIndexedIndirect2KHR-None-12338
  If a color attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_COLOR_BIT on that attachment, the color attachment must not be written to by this command

- VUID-vkCmdDrawIndexedIndirect2KHR-None-12339
  If a depth attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_DEPTH_BIT on that attachment, the depth attachment must not be written to by this command

- VUID-vkCmdDrawIndexedIndirect2KHR-None-12340
  If a stencil attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_STENCIL_BIT on that attachment, the stencil attachment must not be written to by this command

- VUID-vkCmdDrawIndexedIndirect2KHR-None-09003
  If an attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, it must not be accessed in any way other than as an attachment, storage image, or sampled image by this command

- VUID-vkCmdDrawIndexedIndirect2KHR-None-06886
  If the current render pass instance uses a depth/stencil attachment with a read-only layout for the depth aspect, depth writes must be disabled

- VUID-vkCmdDrawIndexedIndirect2KHR-None-06887
  If the current render pass instance uses a depth/stencil attachment with a read-only layout for the stencil aspect, both front and back `writeMask` are not zero, and stencil test is enabled, all stencil ops must be VK_STENCIL_OP_KEEP

- VUID-vkCmdDrawIndexedIndirect2KHR-None-07831
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT dynamic state enabled then vkCmdSetViewport must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-None-07832
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SCISSOR dynamic state enabled then vkCmdSetScissor must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-None-08617
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_WIDTH dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineWidth must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-None-07834
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BIAS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthBiasEnable` is VK_TRUE, then vkCmdSetDepthBias or vkCmdSetDepthBias2EXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-None-07835
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_BLEND_CONSTANTS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and an active color attachment current value of `blendEnable` is VK_TRUE with a blend equations where any VkBlendFactor member is VK_BLEND_FACTOR_CONSTANT_COLOR, VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR, VK_BLEND_FACTOR_CONSTANT_ALPHA, or VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA, then vkCmdSetBlendConstants must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-None-07836
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BOUNDS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthBoundsTestEnable` is VK_TRUE, then vkCmdSetDepthBounds must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-None-07837
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilCompareMask must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-None-07838
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_WRITE_MASK dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilWriteMask must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-None-07839
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_REFERENCE dynamic state enabled, the current value of and `rasterizerDiscardEnable` is VK_FALSE, the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilReference must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-maxMultiviewInstanceIndex-02688
  If the draw is recorded in a render pass instance with multiview enabled, the maximum instance index must be less than or equal to VkPhysicalDeviceMultiviewProperties::`maxMultiviewInstanceIndex`

- VUID-vkCmdDrawIndexedIndirect2KHR-sampleLocationsEnable-02689
  If the bound graphics pipeline was created with VkPipelineSampleLocationsStateCreateInfoEXT::`sampleLocationsEnable` set to VK_TRUE, then the active depth attachment must have been created with the VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit set

- VUID-vkCmdDrawIndexedIndirect2KHR-None-07634
  If the `VK_EXT_sample_locations` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetSampleLocationsEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-None-06666
  If the `VK_EXT_sample_locations` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `sampleLocationsEnable` is VK_TRUE, then vkCmdSetSampleLocationsEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-None-07840
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_CULL_MODE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCullMode must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-None-07841
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRONT_FACE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetFrontFace must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-None-07843
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, vkCmdSetDepthTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-None-07844
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthTestEnable` is VK_TRUE, then vkCmdSetDepthWriteEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-None-07845
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_COMPARE_OP dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthTestEnable` is VK_TRUE, then vkCmdSetDepthCompareOp must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-None-07846
  If the `depthBounds` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthBoundsTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-None-07847
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetStencilTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-None-07848
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_OP dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilOp must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-viewportCount-03417
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, and the state is not inherited, then vkCmdSetViewportWithCount must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-scissorCount-03418
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT dynamic state enabled, and the state is not inherited, then vkCmdSetScissorWithCount must have been called and not subsequently invalidated in the current command buffer prior to this drawing

- VUID-vkCmdDrawIndexedIndirect2KHR-viewportCount-03419
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with both the VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic states enabled, and the state is not inherited, then the `viewportCount` parameter of `vkCmdSetViewportWithCount` must match the `scissorCount` parameter of `vkCmdSetScissorWithCount`

- VUID-vkCmdDrawIndexedIndirect2KHR-viewportCount-04137
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportWScalingStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndexedIndirect2KHR-viewportCount-04138
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, the current value of `viewportWScalingEnable` is VK_TRUE, then vkCmdSetViewportWScalingNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-None-08636
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, the current value of `viewportWScalingEnable` is VK_TRUE, then the `viewportCount` parameter in the last call to vkCmdSetViewportWScalingNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndexedIndirect2KHR-viewportCount-04139
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportShadingRateImageStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndexedIndirect2KHR-shadingRateImage-09233
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_COARSE_SAMPLE_ORDER_NV and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoarseSampleOrderNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-shadingRateImage-09234
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `shadingRateImageEnable` is VK_TRUE, then vkCmdSetViewportShadingRatePaletteNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-None-08637
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `shadingRateImageEnable` is VK_TRUE, then the `viewportCount` parameter in the last call to vkCmdSetViewportShadingRatePaletteNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndexedIndirect2KHR-VkPipelineVieportCreateInfo-04141
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled and a VkPipelineViewportSwizzleStateCreateInfoNV structure chained from VkPipelineViewportStateCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportSwizzleStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndexedIndirect2KHR-VkPipelineVieportCreateInfo-04142
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled and a VkPipelineViewportExclusiveScissorStateCreateInfoNV structure chained from VkPipelineViewportStateCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportExclusiveScissorStateCreateInfoNV::`exclusiveScissorCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndexedIndirect2KHR-None-07878
  If the `exclusiveScissor` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_ENABLE_NV dynamic state enabled, then vkCmdSetExclusiveScissorEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-None-07879
  If the `exclusiveScissor` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_NV dynamic state enabled, and the most recent call to vkCmdSetExclusiveScissorEnableNV in the current command buffer set any element of `pExclusiveScissorEnables` to VK_TRUE, then vkCmdSetExclusiveScissorNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-None-04876
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE dynamic state enabled, then vkCmdSetRasterizerDiscardEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-None-04877
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthBiasEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-logicOp-04878
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LOGIC_OP_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `logicOpEnable` is VK_TRUE, then vkCmdSetLogicOpEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-primitiveFragmentShadingRateWithMultipleViewports-04552
  If the `primitiveFragmentShadingRateWithMultipleViewports` limit is not supported, the bound graphics pipeline was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, and any of the shader stages of the bound graphics pipeline write to the `PrimitiveShadingRateKHR` built-in, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and the `viewportCount` parameter of `vkCmdSetViewportWithCount` must be `1`

- VUID-vkCmdDrawIndexedIndirect2KHR-primitiveFragmentShadingRateWithMultipleViewports-08642
  If the `primitiveFragmentShadingRateWithMultipleViewports` limit is not supported, and any shader object bound to a graphics stage writes to the `PrimitiveShadingRateKHR` built-in, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and the `viewportCount` parameter of `vkCmdSetViewportWithCount` must be `1`

- VUID-vkCmdDrawIndexedIndirect2KHR-blendEnable-04727
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, then for each color attachment, if the corresponding image view’s format features do not contain VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT, then the corresponding current value of `blendEnable` must be VK_FALSE

- VUID-vkCmdDrawIndexedIndirect2KHR-None-08644
  If a shader object is bound to any graphics stage or a graphics pipeline is bound, the current value of `rasterizerDiscardEnable` is VK_FALSE, and none of the following is enabled:

  - the `VK_AMD_mixed_attachment_samples` extension

  - the `VK_NV_framebuffer_mixed_samples` extension

  - the `multisampledRenderToSingleSampled` feature

  then the current value of `rasterizationSamples` must be the same as the current color and/or depth/stencil attachments

- VUID-vkCmdDrawIndexedIndirect2KHR-None-08876
  If a shader object is bound to any graphics stage, the current render pass instance must have been begun with vkCmdBeginRendering

- VUID-vkCmdDrawIndexedIndirect2KHR-imageView-06172
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawIndexedIndirect2KHR-imageView-06173
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawIndexedIndirect2KHR-imageView-06174
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawIndexedIndirect2KHR-imageView-06175
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawIndexedIndirect2KHR-imageView-06176
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawIndexedIndirect2KHR-imageView-06177
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawIndexedIndirect2KHR-viewMask-06178
  If the current render pass instance was begun with vkCmdBeginRendering, the bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::`viewMask` equal to VkRenderingInfo::`viewMask`

- VUID-vkCmdDrawIndexedIndirect2KHR-colorAttachmentCount-06179
  If the `dynamicRenderingUnusedAttachments` feature is not enabled and the current render pass instance was begun with vkCmdBeginRendering, the bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::`colorAttachmentCount` equal to VkRenderingInfo::`colorAttachmentCount`

- VUID-vkCmdDrawIndexedIndirect2KHR-dynamicRenderingUnusedAttachments-08910
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound graphics pipeline

- VUID-vkCmdDrawIndexedIndirect2KHR-dynamicRenderingUnusedAttachments-08912
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` equal to VK_NULL_HANDLE must have the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound pipeline equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirect2KHR-dynamicRenderingUnusedAttachments-08911
  If the `dynamicRenderingUnusedAttachments` feature is enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound graphics pipeline, or the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats`, if it exists, must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirect2KHR-colorAttachmentCount-09362
  If the current render pass instance was begun with vkCmdBeginRendering, with a VkRenderingInfo::`colorAttachmentCount` equal to `1`, there is no shader object bound to any graphics stage, and a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, each element of the VkRenderingInfo::`pColorAttachments` array with a `resolveImageView` not equal to VK_NULL_HANDLE must have been created with an image created with a VkExternalFormatANDROID::`externalFormat` value equal to the VkExternalFormatANDROID::`externalFormat` value used to create the bound graphics pipeline

- VUID-vkCmdDrawIndexedIndirect2KHR-None-09363
  If there is no shader object bound to any graphics stage, the current render pass instance was begun with vkCmdBeginRendering and a VkRenderingInfo::`colorAttachmentCount` equal to `1`, and a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with an image created with a VkExternalFormatANDROID::`externalFormat` value equal to the VkExternalFormatANDROID::`externalFormat` value used to create the bound graphics pipeline

- VUID-vkCmdDrawIndexedIndirect2KHR-None-09364
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetColorBlendEnableEXT must have set the blend enable to VK_FALSE prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-None-09365
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetRasterizationSamplesEXT must have set `rasterizationSamples` to VK_SAMPLE_COUNT_1_BIT prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-None-09368
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetFragmentShadingRateKHR must have set `pFragmentSize->width` to `1` prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-None-09369
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetFragmentShadingRateKHR must have set `pFragmentSize->height` to `1` prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-None-07749
  If the `colorWriteEnable` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorWriteEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-attachmentCount-07750
  If the `colorWriteEnable` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the `attachmentCount` parameter of most recent call to `vkCmdSetColorWriteEnableEXT` in the current command buffer must be greater than or equal to the number of active color attachments

- VUID-vkCmdDrawIndexedIndirect2KHR-None-07751
  If the `VK_EXT_discard_rectangles` extension is enabled, a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT dynamic state enabled and the `pNext` chain of VkGraphicsPipelineCreateInfo included a VkPipelineDiscardRectangleStateCreateInfoEXT structure, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for each discard rectangle in VkPipelineDiscardRectangleStateCreateInfoEXT::`discardRectangleCount`

- VUID-vkCmdDrawIndexedIndirect2KHR-rasterizerDiscardEnable-09236
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT dynamic state enabled and the `pNext` chain of VkGraphicsPipelineCreateInfo did not include a VkPipelineDiscardRectangleStateCreateInfoEXT structure, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for each discard rectangle in VkPhysicalDeviceDiscardRectanglePropertiesEXT::`maxDiscardRectangles`

- VUID-vkCmdDrawIndexedIndirect2KHR-None-07880
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDiscardRectangleEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-None-07881
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_MODE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-dynamicRenderingUnusedAttachments-08913
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->imageView` was VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirect2KHR-dynamicRenderingUnusedAttachments-08914
  If current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawIndexedIndirect2KHR-dynamicRenderingUnusedAttachments-08915
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, and the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->imageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirect2KHR-dynamicRenderingUnusedAttachments-08916
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->imageView` was VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirect2KHR-dynamicRenderingUnusedAttachments-08917
  If current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawIndexedIndirect2KHR-dynamicRenderingUnusedAttachments-08918
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, and the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->imageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirect2KHR-imageView-06183
  If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentShadingRateAttachmentInfoKHR::`imageView` was not VK_NULL_HANDLE, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

- VUID-vkCmdDrawIndexedIndirect2KHR-dynamicRenderingLocalRead-11797
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingLocalRead` feature is enabled, the VK_RENDERING_LOCAL_READ_CONCURRENT_ACCESS_CONTROL_BIT_KHR flag is specified, and an attachment is being used as a feedback loop as specified by VK_RENDERING_ATTACHMENT_INPUT_ATTACHMENT_FEEDBACK_BIT_KHR, VkRenderingAttachmentFlagsInfoKHR::`flags` for that attachment must include VK_RENDERING_ATTACHMENT_INPUT_ATTACHMENT_FEEDBACK_BIT_KHR

- VUID-vkCmdDrawIndexedIndirect2KHR-imageView-06184
  If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentDensityMapAttachmentInfoEXT::`imageView` was not VK_NULL_HANDLE, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT

- VUID-vkCmdDrawIndexedIndirect2KHR-layers-10831
  If the current render pass instance was created with VK_RENDERING_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE or VK_RENDER_PASS_CREATE_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE, and the bound graphics pipeline was created with VK_PIPELINE_CREATE_2_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE, then the current render pass instance must have a `layers` value less than or equal to VkPipelineFragmentDensityMapLayeredCreateInfoVALVE::`maxFragmentDensityMapLayers`

- VUID-vkCmdDrawIndexedIndirect2KHR-colorAttachmentCount-06185
  If the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with a sample count equal to the corresponding element of the `pColorAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline

- VUID-vkCmdDrawIndexedIndirect2KHR-pDepthAttachment-06186
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of the `depthStencilAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawIndexedIndirect2KHR-pStencilAttachment-06187
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of the `depthStencilAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawIndexedIndirect2KHR-multisampledRenderToSingleSampled-07285
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with a sample count equal to the value of `rasterizationSamples` for the bound graphics pipeline

- VUID-vkCmdDrawIndexedIndirect2KHR-multisampledRenderToSingleSampled-07286
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawIndexedIndirect2KHR-multisampledRenderToSingleSampled-07287
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawIndexedIndirect2KHR-pNext-07935
  If this command is called inside a render pass instance started with vkCmdBeginRendering, and the `pNext` chain of VkRenderingInfo includes a VkMultisampledRenderToSingleSampledInfoEXT structure with `multisampledRenderToSingleSampledEnable` equal to VK_TRUE, then the value of `rasterizationSamples` for the bound graphics pipeline must be equal to VkMultisampledRenderToSingleSampledInfoEXT::`rasterizationSamples`

- VUID-vkCmdDrawIndexedIndirect2KHR-renderPass-06198
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline must have been created with a VkGraphicsPipelineCreateInfo::`renderPass` equal to VK_NULL_HANDLE

- VUID-vkCmdDrawIndexedIndirect2KHR-pColorAttachments-08963
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound with a fragment shader that statically writes to a color attachment, the color write mask is not zero, color writes are enabled, and the corresponding element of the VkRenderingInfo::`pColorAttachments->imageView` was not VK_NULL_HANDLE, then the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirect2KHR-pColorAttachments-11539
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound with a fragment shader that statically writes to a color attachment, the color write mask is not zero, color writes are enabled, and the corresponding element of the VkRenderingInfo::`pColorAttachments->resolveImageView` was not VK_NULL_HANDLE, then the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirect2KHR-pDepthAttachment-08964
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound, depth test is enabled, and the VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, then the VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirect2KHR-pDepthAttachment-11540
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound, depth test is enabled, and the VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, then the VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirect2KHR-pStencilAttachment-08965
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound, stencil test is enabled and the VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, then the VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirect2KHR-pStencilAttachment-11860
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound, stencil test is enabled and the VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, then the VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirect2KHR-flags-10582
  If the current render pass instance was begun with a vkCmdBeginRendering call in `commandBuffer`, its VkRenderingInfo::`flags` parameter must not have VK_RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT set unless VK_RENDERING_CONTENTS_INLINE_BIT_KHR is also set

- VUID-vkCmdDrawIndexedIndirect2KHR-primitivesGeneratedQueryWithRasterizerDiscard-06708
  If the `primitivesGeneratedQueryWithRasterizerDiscard` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, rasterization discard must not be enabled

- VUID-vkCmdDrawIndexedIndirect2KHR-primitivesGeneratedQueryWithNonZeroStreams-06709
  If the `primitivesGeneratedQueryWithNonZeroStreams` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, the bound graphics pipeline must not have been created with a non-zero value in `VkPipelineRasterizationStateStreamCreateInfoEXT`::`rasterizationStream`

- VUID-vkCmdDrawIndexedIndirect2KHR-None-07620
  If the `depthClamp` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLAMP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthClampEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-None-07621
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_POLYGON_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetPolygonModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-None-07622
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetRasterizationSamplesEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-None-07623
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetSampleMaskEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-alphaToCoverageEnable-08919
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT dynamic state enabled, and `alphaToCoverageEnable` was VK_TRUE in the last call to vkCmdSetAlphaToCoverageEnableEXT, then the Fragment Output Interface must contain a variable for the alpha `Component` word in `Location` 0 at `Index` 0

- VUID-vkCmdDrawIndexedIndirect2KHR-alphaToCoverageEnable-08920
  If a shader object is bound to any graphics stage, and the most recent call to vkCmdSetAlphaToCoverageEnableEXT in the current command buffer set `alphaToCoverageEnable` to VK_TRUE, then the Fragment Output Interface must contain a variable for the alpha `Component` word in `Location` 0 at `Index` 0

- VUID-vkCmdDrawIndexedIndirect2KHR-None-07624
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAlphaToCoverageEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-None-07625
  If the `alphaToOne` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ALPHA_TO_ONE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAlphaToOneEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-None-07626
  If the `logicOp` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LOGIC_OP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetLogicOpEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-None-07627
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and there are color attachments bound, then vkCmdSetColorBlendEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-None-07629
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and there are color attachments bound, then vkCmdSetColorWriteMaskEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-None-07630
  If the `geometryStreams` feature is enabled, and a shader object is bound to the VK_SHADER_STAGE_GEOMETRY_BIT stage or a graphics pipeline is bound which was created with both a VK_SHADER_STAGE_GEOMETRY_BIT stage and the VK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXT dynamic state enabled, then vkCmdSetRasterizationStreamEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-None-07631
  If the `VK_EXT_conservative_rasterization` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_CONSERVATIVE_RASTERIZATION_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetConservativeRasterizationModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-None-07632
  If the `VK_EXT_conservative_rasterization` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXTRA_PRIMITIVE_OVERESTIMATION_SIZE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `conservativeRasterizationMode` is VK_CONSERVATIVE_RASTERIZATION_MODE_OVERESTIMATE_EXT, then vkCmdSetExtraPrimitiveOverestimationSizeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-conservativePointAndLineRasterization-07499
  If the `VK_EXT_conservative_rasterization` extension is enabled, `conservativePointAndLineRasterization` is not supported, a shader object is bound to any graphics stage or a graphics pipeline is bound, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line or point topology class, then the current value of `conservativeRasterizationMode` must be VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT

- VUID-vkCmdDrawIndexedIndirect2KHR-None-07633
  If the `depthClipEnable` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLIP_ENABLE_EXT dynamic state, then vkCmdSetDepthClipEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-None-07636
  If the `VK_EXT_provoking_vertex` extension is enabled, a shader object is bound to the VK_SHADER_STAGE_VERTEX_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_PROVOKING_VERTEX_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetProvokingVertexModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-None-08666
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineRasterizationModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-None-08669
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineStippleEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-None-07849
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled and a shader object is bound to any graphics stage, or a bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stippledLineEnable` is VK_TRUE, then vkCmdSetLineStipple must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-None-10608
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic state enabled, the effective rasterization input topology is in the line topology class, and the current `lineRasterizationMode` is VK_LINE_RASTERIZATION_MODE_BRESENHAM or VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH, then the current `alphaToCoverageEnable`, `alphaToOneEnable` and `sampleShadingEnable` states must all be VK_FALSE

- VUID-vkCmdDrawIndexedIndirect2KHR-None-07639
  If the `depthClipControl` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLIP_NEGATIVE_ONE_TO_ONE_EXT dynamic state enabled, then vkCmdSetDepthClipNegativeOneToOneEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-None-09650
  If the `depthClampControl` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLAMP_RANGE_EXT dynamic state enabled, and the current value of `depthClampEnable` is VK_TRUE, then vkCmdSetDepthClampRangeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-None-07640
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_ENABLE_NV dynamic state enabled, then vkCmdSetViewportWScalingEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-None-07641
  If the `VK_NV_viewport_swizzle` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic state enabled, then vkCmdSetViewportSwizzleNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-None-07642
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageToColorEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-None-07643
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_LOCATION_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageToColorEnable` is VK_TRUE, then vkCmdSetCoverageToColorLocationNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-None-07644
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_MODE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageModulationModeNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-None-07645
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageModulationMode` is any value other than VK_COVERAGE_MODULATION_MODE_NONE_NV, then vkCmdSetCoverageModulationTableEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-None-07646
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageModulationTableEnable` is VK_TRUE, then vkCmdSetCoverageModulationTableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-None-07647
  If the `shadingRateImage` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SHADING_RATE_IMAGE_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetShadingRateImageEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-pipelineFragmentShadingRate-09238
  If the `pipelineFragmentShadingRate` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetFragmentShadingRateKHR must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-None-07648
  If the `representativeFragmentTest` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_REPRESENTATIVE_FRAGMENT_TEST_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetRepresentativeFragmentTestEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-None-07649
  If the `coverageReductionMode` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageReductionModeNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-rasterizationSamples-07471
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current subpass does not use any color and/or depth/stencil attachments, then the `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT must follow the rules for a zero-attachment subpass

- VUID-vkCmdDrawIndexedIndirect2KHR-samples-07472
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state disabled, then the `samples` parameter in the last call to vkCmdSetSampleMaskEXT must be greater or equal to the VkPipelineMultisampleStateCreateInfo::`rasterizationSamples` parameter used to create the bound graphics pipeline

- VUID-vkCmdDrawIndexedIndirect2KHR-samples-07473
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT state and VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT states enabled, then the `samples` parameter in the last call to vkCmdSetSampleMaskEXT must be greater or equal to the `rasterizationSamples` parameter in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawIndexedIndirect2KHR-None-09211
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, or a shader object is bound to any graphics stage, and the current render pass instance includes a VkMultisampledRenderToSingleSampledInfoEXT structure with `multisampledRenderToSingleSampledEnable` equal to VK_TRUE, then the `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT must be the same as the `rasterizationSamples` member of that structure

- VUID-vkCmdDrawIndexedIndirect2KHR-firstAttachment-07476
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic states enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the last call to vkCmdSetColorBlendEnableEXT in the current command buffer prior to this drawing command must have set a value for all active color attachments

- VUID-vkCmdDrawIndexedIndirect2KHR-firstAttachment-07478
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT dynamic states enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the last call to vkCmdSetColorWriteMaskEXT in the current command buffer prior to this drawing command must have set a value for all active color attachments

- VUID-vkCmdDrawIndexedIndirect2KHR-advancedBlendMaxColorAttachments-07480
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT and VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic states enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and an active color attachment current value of `blendEnable` is VK_TRUE, then the number of active color attachments must not exceed `advancedBlendMaxColorAttachments`

- VUID-vkCmdDrawIndexedIndirect2KHR-None-10862
  If a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT , but not the VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorBlendEquationEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawIndexedIndirect2KHR-rasterizerDiscardEnable-10863
  If a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT, but not the VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorBlendAdvancedEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawIndexedIndirect2KHR-None-10864
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT and VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then either vkCmdSetColorBlendAdvancedEXT or vkCmdSetColorBlendEquationEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawIndexedIndirect2KHR-primitivesGeneratedQueryWithNonZeroStreams-07481
  If the `primitivesGeneratedQueryWithNonZeroStreams` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, and the bound graphics pipeline was created with VK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXT state enabled, the last call to vkCmdSetRasterizationStreamEXT must have set the `rasterizationStream` to zero

- VUID-vkCmdDrawIndexedIndirect2KHR-sampleLocationsPerPixel-07482
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state disabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then the `sampleLocationsPerPixel` member of `pSampleLocationsInfo` in the last call to vkCmdSetSampleLocationsEXT must equal the `rasterizationSamples` member of the VkPipelineMultisampleStateCreateInfo structure the bound graphics pipeline has been created with

- VUID-vkCmdDrawIndexedIndirect2KHR-sampleLocationsPerPixel-07483
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then the `sampleLocationsPerPixel` member of `pSampleLocationsInfo` in the last call to vkCmdSetSampleLocationsEXT must equal the `rasterizationSamples` parameter of the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawIndexedIndirect2KHR-sampleLocationsEnable-07484
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT then the current active depth attachment must have been created with the VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit set

- VUID-vkCmdDrawIndexedIndirect2KHR-sampleLocationsEnable-07485
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, then the `sampleLocationsInfo.maxSampleLocationGridSize.width` in the last call to vkCmdSetSampleLocationsEXT must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.width` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling `rasterizationSamples`

- VUID-vkCmdDrawIndexedIndirect2KHR-sampleLocationsEnable-07486
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, then the `sampleLocationsInfo.maxSampleLocationGridSize.height` in the last call to vkCmdSetSampleLocationsEXT must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.height` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling `rasterizationSamples`

- VUID-vkCmdDrawIndexedIndirect2KHR-sampleLocationsEnable-07487
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, the fragment shader code must not statically use the extended instruction `InterpolateAtSample`

- VUID-vkCmdDrawIndexedIndirect2KHR-sampleLocationsEnable-07936
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationGridSize.width` must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.width` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling the value of `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawIndexedIndirect2KHR-sampleLocationsEnable-07937
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationGridSize.height` must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.height` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling the value of `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawIndexedIndirect2KHR-sampleLocationsEnable-07938
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationsPerPixel` must equal `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawIndexedIndirect2KHR-coverageModulationTableEnable-07488
  If a shader object is bound to any graphics stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NV state enabled, and the last call to vkCmdSetCoverageModulationTableEnableNV set `coverageModulationTableEnable` to VK_TRUE, then the `coverageModulationTableCount` parameter in the last call to vkCmdSetCoverageModulationTableNV must equal the current `rasterizationSamples` divided by the number of color samples in the current active color attachment

- VUID-vkCmdDrawIndexedIndirect2KHR-rasterizationSamples-07489
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, and if current subpass has a depth/stencil attachment and depth test, stencil test, or depth bounds test are enabled in the bound pipeline, then the current `rasterizationSamples` must be the same as the sample count of the depth/stencil attachment

- VUID-vkCmdDrawIndexedIndirect2KHR-coverageToColorEnable-07490
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV state enabled and the last call to vkCmdSetCoverageToColorEnableNV set the `coverageToColorEnable` to VK_TRUE, then there must be an active color attachment at the location selected by the last call to vkCmdSetCoverageToColorLocationNV `coverageToColorLocation`, with a VkFormat of VK_FORMAT_R8_UINT, VK_FORMAT_R8_SINT, VK_FORMAT_R16_UINT, VK_FORMAT_R16_SINT, VK_FORMAT_R32_UINT, or VK_FORMAT_R32_SINT

- VUID-vkCmdDrawIndexedIndirect2KHR-rasterizerDiscardEnable-09420
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, and a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, and the most recent call to vkCmdSetRasterizerDiscardEnable in the current command buffer set `rasterizerDiscardEnable` to VK_FALSE, and the last call to vkCmdSetCoverageToColorEnableNV set the `coverageToColorEnable` to VK_TRUE, then there must be an active color attachment at the location selected by the last call to vkCmdSetCoverageToColorLocationNV `coverageToColorLocation`, with a VkFormat of VK_FORMAT_R8_UINT, VK_FORMAT_R8_SINT, VK_FORMAT_R16_UINT, VK_FORMAT_R16_SINT, VK_FORMAT_R32_UINT, or VK_FORMAT_R32_SINT

- VUID-vkCmdDrawIndexedIndirect2KHR-coverageReductionMode-07491
  If the `coverageReductionMode` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV or VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic states enabled, then the current values of `coverageReductionMode`, `rasterizationSamples`, the sample counts for the color and depth/stencil attachments (if the subpass has them) must be a valid combination returned by vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV

- VUID-vkCmdDrawIndexedIndirect2KHR-viewportCount-07492
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportSwizzleStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndexedIndirect2KHR-viewportCount-07493
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic states enabled then the `viewportCount` parameter in the last call to vkCmdSetViewportSwizzleNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndexedIndirect2KHR-viewportCount-09421
  If the `VK_NV_viewport_swizzle` extension is enabled, and a shader object is bound to any graphics stage, then the `viewportCount` parameter in the last call to vkCmdSetViewportSwizzleNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndexedIndirect2KHR-rasterizationSamples-07494
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, and the `coverageReductionMode` feature is not enabled, or the current value of `coverageReductionMode` is not VK_COVERAGE_REDUCTION_MODE_TRUNCATE_NV, and the current value of `rasterizationSamples` is greater than sample count of the color attachment, then sample shading must be disabled

- VUID-vkCmdDrawIndexedIndirect2KHR-stippledLineEnable-07495
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_RECTANGULAR, then the `stippledRectangularLines` feature must be enabled

- VUID-vkCmdDrawIndexedIndirect2KHR-stippledLineEnable-07496
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_BRESENHAM, then the `stippledBresenhamLines` feature must be enabled

- VUID-vkCmdDrawIndexedIndirect2KHR-stippledLineEnable-07497
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH, then the `stippledSmoothLines` feature must be enabled

- VUID-vkCmdDrawIndexedIndirect2KHR-stippledLineEnable-07498
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_DEFAULT, then the `stippledRectangularLines` feature must be enabled and VkPhysicalDeviceLimits::`strictLines` must be VK_TRUE

- VUID-vkCmdDrawIndexedIndirect2KHR-stage-07073
  If the bound pipeline was created with the VkPipelineShaderStageCreateInfo::`stage` member of an element of VkGraphicsPipelineCreateInfo::`pStages` set to VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT, then Mesh Shader Queries must not be active

- VUID-vkCmdDrawIndexedIndirect2KHR-None-08877
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ATTACHMENT_FEEDBACK_LOOP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAttachmentFeedbackLoopEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-None-07850
  If dynamic state was inherited from VkCommandBufferInheritanceViewportScissorInfoNV, it must be set in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-nextStage-10745
  For each shader object bound to a graphics stage, except for shader object bound to the last graphics stage in the logical pipeline, it must have been created with a `nextStage` including the corresponding bit to the shader object bound to the following graphics stage in the logical pipeline

- VUID-vkCmdDrawIndexedIndirect2KHR-None-08684
  If there is no bound graphics pipeline, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_VERTEX_BIT

- VUID-vkCmdDrawIndexedIndirect2KHR-None-08685
  If there is no bound graphics pipeline, and the `tessellationShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT

- VUID-vkCmdDrawIndexedIndirect2KHR-None-08686
  If there is no bound graphics pipeline, and the `tessellationShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT

- VUID-vkCmdDrawIndexedIndirect2KHR-None-08687
  If there is no bound graphics pipeline, and the `geometryShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_GEOMETRY_BIT

- VUID-vkCmdDrawIndexedIndirect2KHR-None-08688
  If there is no bound graphics pipeline, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_FRAGMENT_BIT

- VUID-vkCmdDrawIndexedIndirect2KHR-None-08689
  If there is no bound graphics pipeline, and the `taskShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TASK_BIT_EXT

- VUID-vkCmdDrawIndexedIndirect2KHR-None-08690
  If there is no bound graphics pipeline, and the `meshShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-vkCmdDrawIndexedIndirect2KHR-None-08693
  If there is no bound graphics pipeline, and at least one of the `taskShader` and `meshShader` features is enabled, one of the VK_SHADER_STAGE_VERTEX_BIT or VK_SHADER_STAGE_MESH_BIT_EXT stages must have a valid `VkShaderEXT` bound, and the other must have no `VkShaderEXT` bound

- VUID-vkCmdDrawIndexedIndirect2KHR-None-08696
  If there is no bound graphics pipeline, and a valid `VkShaderEXT` is bound to the VK_SHADER_STAGE_VERTEX_BIT stage, there must be no `VkShaderEXT` bound to either the VK_SHADER_STAGE_TASK_BIT_EXT stage or the VK_SHADER_STAGE_MESH_BIT_EXT stage

- VUID-vkCmdDrawIndexedIndirect2KHR-None-08698
  If any graphics shader is bound which was created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag, then all shaders created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag in the same vkCreateShadersEXT call must also be bound

- VUID-vkCmdDrawIndexedIndirect2KHR-None-08699
  If any graphics shader is bound which was created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag, any stages in between stages whose shaders which did not create a shader with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag as part of the same vkCreateShadersEXT call must not have any `VkShaderEXT` bound

- VUID-vkCmdDrawIndexedIndirect2KHR-None-08878
  All bound graphics shader objects must have been created with identical or identically defined push constant ranges

- VUID-vkCmdDrawIndexedIndirect2KHR-None-08879
  All bound graphics shader objects must have either been created with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag set, or with identical or identically defined arrays of descriptor set layouts

- VUID-vkCmdDrawIndexedIndirect2KHR-colorAttachmentCount-09372
  If the current render pass instance was begun with vkCmdBeginRendering and a VkRenderingInfo::`colorAttachmentCount` equal to `1`, a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, and a fragment shader is bound, it must not declare the `DepthReplacing` or `StencilRefReplacingEXT` execution modes

- VUID-vkCmdDrawIndexedIndirect2KHR-pDynamicStates-08715
  If the bound graphics pipeline state includes a fragment shader stage, was created with VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`, and the fragment shader declares the `EarlyFragmentTests` execution mode and uses `OpDepthAttachmentReadEXT`, the `depthWriteEnable` parameter in the last call to vkCmdSetDepthWriteEnable must be VK_FALSE

- VUID-vkCmdDrawIndexedIndirect2KHR-pDynamicStates-08716
  If the bound graphics pipeline state includes a fragment shader stage, was created with VK_DYNAMIC_STATE_STENCIL_WRITE_MASK set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`, and the fragment shader declares the `EarlyFragmentTests` execution mode and uses `OpStencilAttachmentReadEXT`, the `writeMask` parameter in the last call to vkCmdSetStencilWriteMask must be `0`

- VUID-vkCmdDrawIndexedIndirect2KHR-None-09116
  If a shader object is bound to any graphics stage or the bound graphics pipeline was created with VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT, and the format of any color attachment is VK_FORMAT_E5B9G9R9_UFLOAT_PACK32, the corresponding element of the `pColorWriteMasks` parameter of vkCmdSetColorWriteMaskEXT must either include all of VK_COLOR_COMPONENT_R_BIT, VK_COLOR_COMPONENT_G_BIT, VK_COLOR_COMPONENT_B_BIT, and VK_COLOR_COMPONENT_A_BIT, or none of them

- VUID-vkCmdDrawIndexedIndirect2KHR-maxFragmentDualSrcAttachments-09239
  If blending is enabled for any attachment where either the source or destination blend factors for that attachment use the secondary color input, the maximum value of `Location` for any output attachment statically used in the `Fragment` `Execution` `Model` executed by this command must be less than `maxFragmentDualSrcAttachments`

- VUID-vkCmdDrawIndexedIndirect2KHR-None-09548
  If the current render pass was begun with vkCmdBeginRendering, there is no shader object bound to any graphics stage, the value of each element of VkRenderingAttachmentLocationInfo::`pColorAttachmentLocations` in the bound pipeline must match the value for the corresponding locations set currently in the current render pass instance

- VUID-vkCmdDrawIndexedIndirect2KHR-None-09549
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of each element of VkRenderingInputAttachmentIndexInfo::`pColorAttachmentInputIndices` in the bound pipeline must match the value for the corresponding index set currently in the current render pass instance

- VUID-vkCmdDrawIndexedIndirect2KHR-None-10927
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` in the bound pipeline must match the value set currently in the current render pass instance

- VUID-vkCmdDrawIndexedIndirect2KHR-None-10928
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` in the bound pipeline must match the value set currently in the current render pass instance

- VUID-vkCmdDrawIndexedIndirect2KHR-None-09642
  If the current render pass was begun with vkCmdBeginRendering with the VK_RENDERING_ENABLE_LEGACY_DITHERING_BIT_EXT flag, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_2_ENABLE_LEGACY_DITHERING_BIT_EXT

- VUID-vkCmdDrawIndexedIndirect2KHR-None-09643
  If the bound graphics pipeline was created with VK_PIPELINE_CREATE_2_ENABLE_LEGACY_DITHERING_BIT_EXT, the current render pass must have begun with vkCmdBeginRendering with the VK_RENDERING_ENABLE_LEGACY_DITHERING_BIT_EXT flag

- VUID-vkCmdDrawIndexedIndirect2KHR-None-10677
  If the per-tile execution model is enabled, the tileShadingPerTileDraw feature must be enabled

- VUID-vkCmdDrawIndexedIndirect2KHR-None-10772
  If a shader object is bound to any graphics stage, multiview functionality must not be enabled in the current render pass

- VUID-vkCmdDrawIndexedIndirect2KHR-multiviewPerViewViewports-12262
  If the `multiviewPerViewViewports` feature is enabled, then the index of the most significant bit in current render pass instance `viewMask` must be less than the current value of `viewportCount`

- VUID-vkCmdDrawIndexedIndirect2KHR-multiviewPerViewViewports-12263
  If the `multiviewPerViewViewports` feature is enabled, then the index of the most significant bit in current render pass instance `viewMask` must be less than the current value of `scissorCount`

- VUID-vkCmdDrawIndexedIndirect2KHR-flags-11521
  If current render pass instance was begun with vkCmdBeginRendering with VkRenderingInfo::`flags` which includes VK_RENDERING_FRAGMENT_REGION_BIT_EXT, and if sample shading is enabled (explicitly or implicitly), then the minimum fraction for sample shading must equal 0.0

- VUID-vkCmdDrawIndexedIndirect2KHR-None-11522
  If the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, and the `dynamicRenderingUnusedAttachments` feature is not enabled, the graphics pipeline bound must have been created with a VkCustomResolveCreateInfoEXT

- VUID-vkCmdDrawIndexedIndirect2KHR-None-11523
  If the current render pass instance was begun with vkCmdBeginRendering and does not contain a custom resolve, and the `dynamicRenderingUnusedAttachments` feature is not enabled, the graphics pipeline bound must not have been created with a VkCustomResolveCreateInfoEXT

- VUID-vkCmdDrawIndexedIndirect2KHR-customResolve-11524
  If the current render pass instance was begun with vkCmdBeginRendering and vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, the graphics pipeline bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_TRUE

- VUID-vkCmdDrawIndexedIndirect2KHR-customResolve-11525
  If the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, and vkCmdBeginCustomResolveEXT has not been recorded in the render pass instance, the graphics pipeline bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_FALSE

- VUID-vkCmdDrawIndexedIndirect2KHR-None-11861
  If the `dynamicRenderingUnusedAttachments` feature is not enabled and the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, the bound graphics pipeline must have been created with a VkCustomResolveCreateInfoEXT::`colorAttachmentCount` equal to VkRenderingInfo::`colorAttachmentCount`

- VUID-vkCmdDrawIndexedIndirect2KHR-None-11862
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound graphics pipeline

- VUID-vkCmdDrawIndexedIndirect2KHR-None-11863
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` equal to VK_NULL_HANDLE must have the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound pipeline equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirect2KHR-dynamicRenderingUnusedAttachments-11864
  If the `dynamicRenderingUnusedAttachments` feature is enabled, the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound graphics pipeline, or the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats`, if it exists, must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirect2KHR-None-11865
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirect2KHR-None-11866
  If current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`

- VUID-vkCmdDrawIndexedIndirect2KHR-dynamicRenderingUnusedAttachments-11867
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, and the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirect2KHR-None-11868
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->resolveImageView` was VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirect2KHR-None-11869
  If current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`

- VUID-vkCmdDrawIndexedIndirect2KHR-dynamicRenderingUnusedAttachments-11870
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, and the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirect2KHR-colorAttachmentCount-11871
  If the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0` and vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, then for each element of the VkRenderingInfo::`pColorAttachments` array with a `resolveImageView` not equal to VK_NULL_HANDLE, the `resolveImageView` must have been created with a sample count equal to the value of `rasterizationSamples` for the bound graphics pipeline

- VUID-vkCmdDrawIndexedIndirect2KHR-pDepthAttachment-11872
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`

- VUID-vkCmdDrawIndexedIndirect2KHR-pStencilAttachment-11873
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`

- VUID-vkCmdDrawIndexedIndirect2KHR-customResolve-11529
  If a shader object is bound to the fragment stage, the current render pass instance was begun with vkCmdBeginRendering, a fragment density map attachment is active, and vkCmdBeginCustomResolveEXT has been called, then the fragment shader object bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_TRUE

- VUID-vkCmdDrawIndexedIndirect2KHR-customResolve-11530
  If a shader object is bound to the fragment stage, the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, a fragment density map attachment is active, and vkCmdBeginCustomResolveEXT has not yet been called, then the fragment shader object bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_FALSE

- VUID-vkCmdDrawIndexedIndirect2KHR-flags-13361
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, then all bound shader objects must have been created with the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit

- VUID-vkCmdDrawIndexedIndirect2KHR-flags-13362
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, then the pipeline layout of the bound descriptor sets must have been created with VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT set

- VUID-vkCmdDrawIndexedIndirect2KHR-flags-13363
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, and any of the descriptor set layouts used to create the pipeline layout of the bound descriptor sets were created with any binding’s VkDescriptorSetLayoutBinding::`stageFlags` set with VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT, then there must be no binding with VkDescriptorSetLayoutBinding::`stageFlags` set with VK_SHADER_STAGE_TASK_BIT_EXT or VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-vkCmdDrawIndexedIndirect2KHR-flags-13364
  If there are any shader objects bound that were created with `flags` that includes both the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR and VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT bits, the pipeline layout of the bound descriptor sets must have been created with VK_PIPELINE_LAYOUT_CREATE_NO_TASK_SHADER_BIT_KHR set

- VUID-vkCmdDrawIndexedIndirect2KHR-flags-13365
  If there are any shader objects bound that were created with `flags` that includes both the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR and VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT bits, there must be no shader object bound to the VK_SHADER_STAGE_TASK_BIT_EXT stage

- VUID-vkCmdDrawIndexedIndirect2KHR-None-04007
  All vertex input bindings accessed via vertex input variables declared in the vertex shader entry point’s interface must have either valid or VK_NULL_HANDLE buffers bound

- VUID-vkCmdDrawIndexedIndirect2KHR-None-04008
  If the `nullDescriptor` feature is not enabled, all vertex input bindings accessed via vertex input variables declared in the vertex shader entry point’s interface must not be VK_NULL_HANDLE

- VUID-vkCmdDrawIndexedIndirect2KHR-None-02721
  If the `robustBufferAccess` feature is not enabled, and that pipeline was created without enabling VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS for `vertexInputs`, then for a given vertex buffer binding, any attribute data fetched must be entirely contained within the corresponding vertex buffer binding, as described in Vertex Input Description

- VUID-vkCmdDrawIndexedIndirect2KHR-format-10389
  For each vertex attribute accessed by this command, if its VkVertexInputAttributeDescription::`format` or VkVertexInputAttributeDescription2EXT::`format` is a packed format, and the `legacyVertexAttributes` feature is not enabled, the value of `attribAddress`, calculated as described in Vertex Input Calculation, must be a multiple of the size of the `format`

- VUID-vkCmdDrawIndexedIndirect2KHR-format-10390
  For each vertex attribute accessed by this command, if its VkVertexInputAttributeDescription::`format` or VkVertexInputAttributeDescription2EXT::`format` is not a packed format, and either the `legacyVertexAttributes` feature is not enabled or `format` has 64-bit components, the value of `attribAddress`, calculated as described in Vertex Input Calculation, must be a multiple of the component size of the `format`

- VUID-vkCmdDrawIndexedIndirect2KHR-None-07842
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY dynamic state enabled then vkCmdSetPrimitiveTopology must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-dynamicPrimitiveTopologyUnrestricted-07500
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY dynamic state enabled and the `dynamicPrimitiveTopologyUnrestricted` is VK_FALSE, then the `primitiveTopology` parameter of `vkCmdSetPrimitiveTopology` must be of the same topology class as the pipeline VkPipelineInputAssemblyStateCreateInfo::`topology` state

- VUID-vkCmdDrawIndexedIndirect2KHR-primitiveTopology-10286
  If a VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage is bound, then the current value of `primitiveTopology` must be VK_PRIMITIVE_TOPOLOGY_PATCH_LIST prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-primitiveTopology-10747
  If vkCmdSetPrimitiveTopology set `primitiveTopology` to VK_PRIMITIVE_TOPOLOGY_PATCH_LIST prior to this drawing command, then a VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage must be bound

- VUID-vkCmdDrawIndexedIndirect2KHR-primitiveTopology-10748
  If vkCmdSetPrimitiveTopology set `primitiveTopology` to VK_PRIMITIVE_TOPOLOGY_POINT_LIST prior to this drawing command, the `maintenance5` feature is not enabled, both a VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT and VK_SHADER_STAGE_GEOMETRY_BIT stage are not bound, then the `Vertex` `Execution` `Model` must have a `PointSize` decorated variable that is statically written to

- VUID-vkCmdDrawIndexedIndirect2KHR-pStrides-04913
  If the bound graphics pipeline was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE dynamic state enabled, but without the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled, then vkCmdBindVertexBuffers2 with a non-`NULL` `pStrides` parameter or vkCmdBindVertexBuffers3KHR with `setStride` set to VK_TRUE must have been called and not subsequently invalidated in the current command buffer prior to this draw command

- VUID-vkCmdDrawIndexedIndirect2KHR-None-13118
  If the bound graphics pipeline was created without the VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE dynamic state enabled, without the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled, and vkCmdBindVertexBuffers3KHR was called and not subsequently invalidated in the current command buffer prior to this draw command, the value of `setStride` in each of its `pBindInfos` elements must have been VK_FALSE

- VUID-vkCmdDrawIndexedIndirect2KHR-None-04914
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled then vkCmdSetVertexInputEXT must have been called and not subsequently invalidated in the current command buffer prior to this draw command

- VUID-vkCmdDrawIndexedIndirect2KHR-Input-07939
  If the `vertexAttributeRobustness` feature is not enabled, and the `maintenance9` feature is not enabled, and there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled then all variables with the `Input` storage class decorated with `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` must contain a location in VkVertexInputAttributeDescription2EXT::`location`

- VUID-vkCmdDrawIndexedIndirect2KHR-Input-08734
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled and either the `legacyVertexAttributes` feature is not enabled or the SPIR-V Type associated with a given `Input` variable of the corresponding `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` is 64-bit, then the numeric type associated with all `Input` variables of the corresponding `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` must be the same as VkVertexInputAttributeDescription2EXT::`format`

- VUID-vkCmdDrawIndexedIndirect2KHR-format-08936
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled and VkVertexInputAttributeDescription2EXT::`format` has a 64-bit component, then the scalar width associated with all `Input` variables of the corresponding `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` must be 64-bit

- VUID-vkCmdDrawIndexedIndirect2KHR-format-08937
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled and the scalar width associated with a `Location` decorated `Input` variable in the `Vertex` `Execution` `Model` `OpEntryPoint` is 64-bit, then the corresponding VkVertexInputAttributeDescription2EXT::`format` must have a 64-bit component

- VUID-vkCmdDrawIndexedIndirect2KHR-None-09203
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled and VkVertexInputAttributeDescription2EXT::`format` has a 64-bit component, then all `Input` variables at the corresponding `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` must not use components that are not present in the format

- VUID-vkCmdDrawIndexedIndirect2KHR-None-04875
  If there is a shader object bound to the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage or the bound graphics pipeline state was created with both a VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage and the VK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT dynamic state enabled, and the current value of `primitiveTopology` is VK_PRIMITIVE_TOPOLOGY_PATCH_LIST, then vkCmdSetPatchControlPointsEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-None-04879
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE dynamic state enabled then vkCmdSetPrimitiveRestartEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-None-09637
  If the `primitiveTopologyListRestart` feature is not enabled, the input assembly is VK_PRIMITIVE_TOPOLOGY_POINT_LIST, VK_PRIMITIVE_TOPOLOGY_LINE_LIST, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY, or VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY, there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE dynamic state enabled, then vkCmdSetPrimitiveRestartEnable must be VK_FALSE

- VUID-vkCmdDrawIndexedIndirect2KHR-None-10909
  If the `primitiveTopologyPatchListRestart` feature is not enabled, the input assembly is VK_PRIMITIVE_TOPOLOGY_PATCH_LIST, there is a shader object bound to the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE dynamic state enabled then vkCmdSetPrimitiveRestartEnable must be VK_FALSE

- VUID-vkCmdDrawIndexedIndirect2KHR-stage-06481
  The bound graphics pipeline must not have been created with the VkPipelineShaderStageCreateInfo::`stage` member of any element of VkGraphicsPipelineCreateInfo::`pStages` set to VK_SHADER_STAGE_TASK_BIT_EXT or VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-vkCmdDrawIndexedIndirect2KHR-None-08885
  There must be no shader object bound to either of the VK_SHADER_STAGE_TASK_BIT_EXT or VK_SHADER_STAGE_MESH_BIT_EXT stages

- VUID-vkCmdDrawIndexedIndirect2KHR-None-07619
  If a shader object is bound to the VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stage or a graphics pipeline is bound which was created with both a VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stage and the VK_DYNAMIC_STATE_TESSELLATION_DOMAIN_ORIGIN_EXT dynamic state enabled, then vkCmdSetTessellationDomainOriginEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect2KHR-OpExecutionMode-12239
  If a shader is bound to both the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stages, and if both stages contain an `OpExecutionMode` instruction specifying the type of subdivision, they must be the same

- VUID-vkCmdDrawIndexedIndirect2KHR-OpExecutionMode-12240
  If a shader is bound to both the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stages, and if both stages contain an `OpExecutionMode` instruction specifying the orientation of triangles, they must be the same

- VUID-vkCmdDrawIndexedIndirect2KHR-OpExecutionMode-12241
  If a shader is bound to both the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stages, and if both stages contain an `OpExecutionMode` instruction specifying the segment spacing, they must be the same

- VUID-vkCmdDrawIndexedIndirect2KHR-OpExecutionMode-12242
  If a shader is bound to both the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stages, and if both stages contain an `OpExecutionMode` instruction specifying the output patch size, they must be the same

- VUID-vkCmdDrawIndexedIndirect2KHR-None-07312
  If the `maintenance6` feature is not enabled, a valid index buffer must be bound

- VUID-vkCmdDrawIndexedIndirect2KHR-primitiveRestartIndex-12401
  If the primitive restart index for this draw operation was set with vkCmdSetPrimitiveRestartIndexEXT, then `primitiveRestartIndex` must not be greater than the maximum representable value for the bound VkIndexType

- VUID-vkCmdDrawIndexedIndirect2KHR-pInfo-13110
  If `pInfo->drawCount` is greater than `0`, `pInfo->addressRange.size` must be greater than or equal to (`pInfo->drawCount` - 1) × `pInfo->addressRange.stride` + `sizeof`(VkDrawIndexedIndirectCommand)

- VUID-vkCmdDrawIndexedIndirect2KHR-pInfo-13111
  If `pInfo->drawCount` is greater than 1, `pInfo->addressRange.stride` must not be 0

- VUID-vkCmdDrawIndexedIndirect2KHR-pInfo-13112
  If `pInfo->addressRange.stride` is not 0, `pInfo->addressRange.stride` must be greater than or equal to `sizeof`(VkDrawIndexedIndirectCommand)

- VUID-vkCmdDrawIndexedIndirect2KHR-pInfo-13113
  If `pInfo->addressRange.stride` is not 0, `pInfo->addressRange.stride` must be a multiple of `4`

- VUID-vkCmdDrawIndexedIndirect2KHR-commandBuffer-13059
  `commandBuffer` must not be a protected command buffer

Valid Usage (Implicit)

- VUID-vkCmdDrawIndexedIndirect2KHR-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdDrawIndexedIndirect2KHR-pInfo-parameter
  `pInfo` must be a valid pointer to a valid VkDrawIndirect2InfoKHR structure

- VUID-vkCmdDrawIndexedIndirect2KHR-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdDrawIndexedIndirect2KHR-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdDrawIndexedIndirect2KHR-renderpass
  This command must only be called inside of a render pass instance

- VUID-vkCmdDrawIndexedIndirect2KHR-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdDrawIndexedIndirect2KHR-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Inside | Outside | VK_QUEUE_GRAPHICS_BIT | Action

Conditional Rendering

vkCmdDrawIndexedIndirect2KHR is affected by conditional rendering

To record an indexed indirect drawing command, call:

    // Provided by VK_VERSION_1_0
    void vkCmdDrawIndexedIndirect(
        VkCommandBuffer                             commandBuffer,
        VkBuffer                                    buffer,
        VkDeviceSize                                offset,
        uint32_t                                    drawCount,
        uint32_t                                    stride);

- `commandBuffer` is the command buffer into which the command is recorded.

- `buffer` is the buffer containing draw parameters.

- `offset` is the byte offset into `buffer` where parameters begin.

- `drawCount` is the number of draws to execute, and can be zero.

- `stride` is the byte stride between successive sets of draw parameters.

`vkCmdDrawIndexedIndirect` behaves similarly to vkCmdDrawIndexed except that the parameters are read by the device from a buffer during execution. `drawCount` draws are executed by the command, with parameters taken from `buffer` starting at `offset` and increasing by `stride` bytes for each successive draw. The parameters of each draw are encoded in an array of VkDrawIndexedIndirectCommand structures. If `drawCount` is less than or equal to one, `stride` is ignored.

Valid Usage

- VUID-vkCmdDrawIndexedIndirect-magFilter-04553
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdDrawIndexedIndirect-magFilter-09598
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdDrawIndexedIndirect-mipmapMode-04770
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdDrawIndexedIndirect-mipmapMode-09599
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdDrawIndexedIndirect-unnormalizedCoordinates-09635
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `levelCount` and `layerCount` must be 1

- VUID-vkCmdDrawIndexedIndirect-None-08609
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `viewType` must be VK_IMAGE_VIEW_TYPE_1D or VK_IMAGE_VIEW_TYPE_2D

- VUID-vkCmdDrawIndexedIndirect-None-08610
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions with `ImplicitLod`, `Dref` or `Proj` in their name

- VUID-vkCmdDrawIndexedIndirect-None-08611
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions that includes a LOD bias or any offset values

- VUID-vkCmdDrawIndexedIndirect-None-06479
  If a VkImageView is sampled with depth comparison, the image view’s format features must contain VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT

- VUID-vkCmdDrawIndexedIndirect-None-02691
  If a VkImageView is accessed using atomic operations as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT

- VUID-vkCmdDrawIndexedIndirect-None-07888
  If a VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER descriptor is accessed using atomic operations as a result of this command, then the storage texel buffer’s format features must contain VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT

- VUID-vkCmdDrawIndexedIndirect-None-02692
  If a VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT

- VUID-vkCmdDrawIndexedIndirect-None-02693
  If the VK_EXT_filter_cubic extension is not enabled and any VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, it must not have a VkImageViewType of VK_IMAGE_VIEW_TYPE_3D, VK_IMAGE_VIEW_TYPE_CUBE, or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY

- VUID-vkCmdDrawIndexedIndirect-filterCubic-02694
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have a VkImageViewType and format that supports cubic filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubic` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdDrawIndexedIndirect-filterCubicMinmax-02695
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX as a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubicMinmax` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdDrawIndexedIndirect-cubicRangeClamp-09212
  If the `cubicRangeClamp` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must not have a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM

- VUID-vkCmdDrawIndexedIndirect-reductionMode-09213
  Any VkImageView being sampled with a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM as a result of this command must sample with VK_FILTER_CUBIC_EXT

- VUID-vkCmdDrawIndexedIndirect-selectableCubicWeights-09214
  If the `selectableCubicWeights` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have VkSamplerCubicWeightsCreateInfoQCOM::`cubicWeights` equal to VK_CUBIC_FILTER_WEIGHTS_CATMULL_ROM_QCOM

- VUID-vkCmdDrawIndexedIndirect-flags-02696
  Any VkImage created with a VkImageCreateInfo::`flags` containing VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV sampled as a result of this command must only be sampled using a VkSamplerAddressMode of VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawIndexedIndirect-OpTypeImage-07027
  For any VkImageView being written as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawIndexedIndirect-OpTypeImage-07028
  For any VkImageView being read as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawIndexedIndirect-OpTypeImage-07029
  For any VkBufferView being written as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown`, the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawIndexedIndirect-OpTypeImage-07030
  Any VkBufferView being read as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown` then the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawIndexedIndirect-None-08600
  If a a bound shader was created with a pipeline layout and statically uses a set n, a descriptor set must have been bound to n at the same pipeline bind point, with layouts compatible for set n with the layout(s) used to create the shader, as described in Pipeline Layout Compatibility

- VUID-vkCmdDrawIndexedIndirect-None-08601
  If a a bound shader was created with a pipeline layout or specified push constant ranges and statically uses a push constant value, that value must have been set for the same pipeline bind point, with push constant ranges that are compatible with the push constant range used to create the shader

- VUID-vkCmdDrawIndexedIndirect-None-10068
  For each array of resources that is used by a bound shader, the indices used to access members of the array must be less than the descriptor count for the identified binding in the descriptor sets used by this command

- VUID-vkCmdDrawIndexedIndirect-None-08114
  Descriptors in each bound descriptor set, specified via vkCmdBindDescriptorSets, must be valid if they are accessed as described by descriptor validity by the VkPipeline bound to the pipeline bind point used by this command and the bound VkPipeline was not created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawIndexedIndirect-imageLayout-00344
  If an image descriptor is accessed by a shader, the VkImageLayout must match the subresource accessible from the VkImageView as defined by the image layout matching rules

- VUID-vkCmdDrawIndexedIndirect-None-08115
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdBindDescriptorSets, the bound VkPipeline must have been created without VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawIndexedIndirect-None-08116
  Descriptors in bound descriptor buffers, specified via vkCmdSetDescriptorBufferOffsetsEXT, must be valid if they are dynamically accessed

- VUID-vkCmdDrawIndexedIndirect-None-08117
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdSetDescriptorBufferOffsetsEXT, the bound VkPipeline must have been created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawIndexedIndirect-None-08119
  If a descriptor is dynamically used with a VkPipeline created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdDrawIndexedIndirect-None-08605
  If a descriptor is dynamically used with a VkShaderEXT created with a `VkDescriptorSetLayout` that was created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdDrawIndexedIndirect-None-08606
  If the `shaderObject` feature is not enabled, a valid pipeline must be bound to the pipeline bind point used by this command

- VUID-vkCmdDrawIndexedIndirect-None-08608
  If a pipeline is bound to the pipeline bind point used by this command, there must not have been any calls to dynamic state setting commands for any state specified statically in the VkPipeline object bound to the pipeline bind point used by this command, since that pipeline was bound

- VUID-vkCmdDrawIndexedIndirect-uniformBuffers-06935
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawIndexedIndirect-None-08612
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawIndexedIndirect-storageBuffers-06936
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawIndexedIndirect-None-08613
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a storage buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawIndexedIndirect-commandBuffer-02707
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, any resource accessed by bound shaders must not be a protected resource

- VUID-vkCmdDrawIndexedIndirect-viewType-07752
  If a VkImageView is accessed as a result of this command, then the image view’s `viewType` must match the `Dim` operand of the `OpTypeImage` as described in Compatibility Between SPIR-V Image Dimensions and Vulkan ImageView Types

- VUID-vkCmdDrawIndexedIndirect-format-07753
  If a VkImageView or VkBufferView is accessed as a result of this command, then the numeric type of the view’s `format` and the `Sampled` `Type` operand of the `OpTypeImage` must match

- VUID-vkCmdDrawIndexedIndirect-OpImageWrite-08795
  If a VkImageView created with a format other than VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the image view’s format

- VUID-vkCmdDrawIndexedIndirect-OpImageWrite-08796
  If a VkImageView created with the format VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have four components

- VUID-vkCmdDrawIndexedIndirect-OpImageWrite-04469
  If a VkBufferView is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the buffer view’s format

- VUID-vkCmdDrawIndexedIndirect-SampledType-04470
  If a VkImageView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdDrawIndexedIndirect-SampledType-04471
  If a VkImageView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdDrawIndexedIndirect-SampledType-04472
  If a VkBufferView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdDrawIndexedIndirect-SampledType-04473
  If a VkBufferView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdDrawIndexedIndirect-sparseImageInt64Atomics-04474
  If the `sparseImageInt64Atomics` feature is not enabled, VkImage objects created with the VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdDrawIndexedIndirect-sparseImageInt64Atomics-04475
  If the `sparseImageInt64Atomics` feature is not enabled, VkBuffer objects created with the VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdDrawIndexedIndirect-OpImageSampleWeightedQCOM-06971
  If `OpImageSampleWeightedQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_SAMPLED_IMAGE_BIT_QCOM

- VUID-vkCmdDrawIndexedIndirect-OpImageSampleWeightedQCOM-06972
  If `OpImageSampleWeightedQCOM` uses a VkImageView as a sample weight image as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_IMAGE_BIT_QCOM

- VUID-vkCmdDrawIndexedIndirect-OpImageBoxFilterQCOM-06973
  If `OpImageBoxFilterQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BOX_FILTER_SAMPLED_BIT_QCOM

- VUID-vkCmdDrawIndexedIndirect-OpImageBlockMatchSSDQCOM-06974
  If `OpImageBlockMatchSSDQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdDrawIndexedIndirect-OpImageBlockMatchSADQCOM-12420
  If `OpImageBlockMatchSADQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdDrawIndexedIndirect-OpImageBlockMatchSADQCOM-06976
  If `OpImageBlockMatchSADQCOM` or OpImageBlockMatchSSDQCOM is used to read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdDrawIndexedIndirect-OpImageSampleWeightedQCOM-06977
  If `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdDrawIndexedIndirect-OpImageSampleWeightedQCOM-06978
  If any command other than `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must not have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdDrawIndexedIndirect-OpImageBlockMatchWindow-09215
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM

- VUID-vkCmdDrawIndexedIndirect-OpImageBlockMatchWindow-09216
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format must be a single-component format

- VUID-vkCmdDrawIndexedIndirect-OpImageBlockMatchWindow-09217
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdDrawIndexedIndirect-OpImageBlockMatchWindow-12421
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the `blockMatchExtendedClampToEdge` feature is not enabled, the input sampler must not have been created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawIndexedIndirect-addressModeU-12422
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the input sampler was created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, then the sampler must have been created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawIndexedIndirect-None-07288
  Any shader invocation executed by this command must terminate

- VUID-vkCmdDrawIndexedIndirect-None-09600
  If a descriptor with type equal to any of VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, or VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT is accessed as a result of this command, all image subresources identified by that descriptor must be in the image layout identified when the descriptor was written

- VUID-vkCmdDrawIndexedIndirect-micromap-11636
  If an acceleration structure is accessed as a result of this command through an `OpRayQueryProceedKHR` operation , the `VK_EXT_opacity_micromap` extension is not enabled, and the acceleration structure is built using geometry with a VkAccelerationStructureTrianglesOpacityMicromapKHR structure included in its `pNext` chain, the shader must have specified a `OpacityMicromapIdKHR` execution mode with its specialization constant operand equal to VK_TRUE

- VUID-vkCmdDrawIndexedIndirect-micromap-11637
  If an acceleration structure is accessed as a result of this command and the acceleration structure was constructed through deserialization, all micromap arrays referenced by the acceleration structure that were not replaced by an acceleration structure update command must have been deserialized using the serialized data of the corresponding micromaps used to originally build the acceleration structure prior to the execution of this command on the device

- VUID-vkCmdDrawIndexedIndirect-micromap-11638
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkPipeline bound to the pipeline bind point used by this command must not have been created with `flags` that includes VK_PIPELINE_CREATE_2_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_KHR

- VUID-vkCmdDrawIndexedIndirect-micromap-11639
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkShaderEXT that accessed the descriptor must not have been created with `flags` that includes VK_SHADER_CREATE_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_EXT

- VUID-vkCmdDrawIndexedIndirect-commandBuffer-10746
  The `VkDeviceMemory` object allocated from a `VkMemoryHeap` with the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property that is bound to a resource accessed as a result of this command must be the active bound tile memory object in `commandBuffer`

- VUID-vkCmdDrawIndexedIndirect-None-10678
  If this command is recorded inside a tile shading render pass instance, the stages corresponding to the pipeline bind point used by this command must only include VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_FRAGMENT_BIT, and/or VK_SHADER_STAGE_COMPUTE_BIT

- VUID-vkCmdDrawIndexedIndirect-None-10679
  If this command is recorded where per-tile execution model is enabled, there must be no access to any image while the image was be transitioned to the VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT layout

- VUID-vkCmdDrawIndexedIndirect-pDescription-09900
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the underlying VkTensorARM object must have been created with the VK_TENSOR_USAGE_SHADER_BIT_ARM usage flag set

- VUID-vkCmdDrawIndexedIndirect-dimensionCount-09905
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the `Rank` of the `OpTypeTensorARM` of the tensor resource variable must be equal to the `dimensionCount` provided via VkTensorCreateInfoARM::`pDescription` when creating the underlying VkTensorARM object

- VUID-vkCmdDrawIndexedIndirect-OpTypeTensorARM-09906
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the element type of the `OpTypeTensorARM` of the tensor resource variable must be compatible with the VkFormat of the VkTensorViewARM used for the access

- VUID-vkCmdDrawIndexedIndirect-OpTensorReadARM-12462
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, using `OpTensorReadARM` or `OpTensorWriteARM`, and the underlying VkTensorARM object was created with a VK_TENSOR_TILING_BRICK_16_WIDE_ARM, VK_TENSOR_TILING_BRICK_8_WIDE_ARM, VK_TENSOR_TILING_BRICK_4_WIDE_ARM, VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_ARM, or VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_64K_ARM VkTensorTilingARM, and the object read or written is an array, then the innermost coordinate provided to `OpTensorReadARM` or `OpTensorWriteARM` via the `Coordinates` operand must be a multiple of the largest power of 2 that is less than or equal to the number of components of the array

- VUID-vkCmdDrawIndexedIndirect-pNext-12463
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command and the corresponding VkTensorARM object was created with a VkTensorRollingBackingCreateInfoARM structure in the `pNext` chain of VkTensorCreateInfoARM, then the number of elements accessed with one `OpTensorReadARM` or `OpTensorWriteARM`, must be less than or equal to the number of elements available from the starting coordinate in the rolling backing along the innermost dimension, defined as `wraps`[`dimensionCount` - 1] - InnermostCoordinate % `wraps`[`dimensionCount` - 1] where InnermostCoordinate is the last component of the coordinates array provided via the `Coordinates` operand

- VUID-vkCmdDrawIndexedIndirect-None-12472
  Descriptors dynamically accessed in bound descriptor heaps must be valid

- VUID-vkCmdDrawIndexedIndirect-None-11297
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a `OpTypeStruct` decorated with `Block` or `BufferBlock` using that mapping, the calculated offset for the resource heap must be a multiple of `bufferDescriptorAlignment`

- VUID-vkCmdDrawIndexedIndirect-None-11298
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeImage` or `OpTypeSampledImage` using that mapping, the calculated offset for the resource heap must be a multiple of `imageDescriptorAlignment`

- VUID-vkCmdDrawIndexedIndirect-None-11299
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeSampler` or `OpTypeSampledImage` using that mapping, the calculated offset for the sampler heap must be a multiple of `samplerDescriptorAlignment`

- VUID-vkCmdDrawIndexedIndirect-None-11397
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeTensorARM` using that mapping, the calculated offset for the resource heap must be a multiple of `tensorDescriptorAlignment`

- VUID-vkCmdDrawIndexedIndirect-None-11300
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 4

- VUID-vkCmdDrawIndexedIndirect-None-11301
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdDrawIndexedIndirect-None-11302
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress

- VUID-vkCmdDrawIndexedIndirect-None-11304
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 8

- VUID-vkCmdDrawIndexedIndirect-None-11305
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdDrawIndexedIndirect-None-11306
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address pointed to by the address in push data must be a valid VkDeviceAddress

- VUID-vkCmdDrawIndexedIndirect-None-11308
  For each descriptor heap that is statically used by a bound shader, either directly or via a descriptor mapping, a valid descriptor heap must be bound

- VUID-vkCmdDrawIndexedIndirect-None-11309
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, execution of this command must not result in any descriptor read accessing data outside of the user range of the respective heap bound by `vkCmdBind*HeapEXT` commands

- VUID-vkCmdDrawIndexedIndirect-None-11372
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer or uniform texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified via VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawIndexedIndirect-None-11373
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer or storage texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawIndexedIndirect-None-11374
  If the `robustBufferAccess2` feature is not enabled, the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, uniform texel buffer, storage buffer, or storage texel buffer, that shader must not access values outside of the range of the buffer as specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawIndexedIndirect-pBindInfo-11375
  If any bound shader uses an embedded sampler via a descriptor mapping, the value of `pBindInfo->reservedRangeSize` set for vkCmdBindSamplerHeapEXT must be greater than or equal to `minSamplerHeapReservedRangeWithEmbedded`

- VUID-vkCmdDrawIndexedIndirect-None-11376
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, and that shader statically uses a push constant value, that value must have been set by vkCmdPushDataEXT

- VUID-vkCmdDrawIndexedIndirect-None-11398
  If a bound shader was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the access must not be out of bounds

- VUID-vkCmdDrawIndexedIndirect-None-11437
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the buffer from which the address in push data was queried must have been created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdDrawIndexedIndirect-None-11438
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdDrawIndexedIndirect-None-11441
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must be aligned to `minUniformBufferOffsetAlignment`

- VUID-vkCmdDrawIndexedIndirect-None-11439
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_STORAGE_BUFFER_BIT usage flag set

- VUID-vkCmdDrawIndexedIndirect-None-11442
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must be aligned to `minStorageBufferOffsetAlignment`

- VUID-vkCmdDrawIndexedIndirect-None-11485
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses an acceleration structure using that mapping, the address that the acceleration structure is mapped to must be an acceleration structure address retrieved from a VkAccelerationStructureKHR object via vkGetAccelerationStructureDeviceAddressKHR or handle retrieved from a VkAccelerationStructureNV object via vkGetAccelerationStructureHandleNV

- VUID-vkCmdDrawIndexedIndirect-index-11450
  If a shader uses a sampler descriptor to sample an image as a result of this command, and that sampler descriptor uses a custom border color with an index defined by VkSamplerCustomBorderColorIndexCreateInfoEXT, the value of VkSamplerCustomBorderColorIndexCreateInfoEXT::`index` must have been registered before this command was recorded, and still be registered during the sampling operation, with an identically defined color

- VUID-vkCmdDrawIndexedIndirect-protectedNoFault-11455
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, the address that the resource is mapped to must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdDrawIndexedIndirect-protectedNoFault-11456
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, the address of the indirect memory must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdDrawIndexedIndirect-renderPass-02684
  The current render pass must be compatible with the `renderPass` member of the `VkGraphicsPipelineCreateInfo` structure specified when creating the `VkPipeline` bound to VK_PIPELINE_BIND_POINT_GRAPHICS

- VUID-vkCmdDrawIndexedIndirect-subpass-02685
  The subpass index of the current render pass must be equal to the `subpass` member of the `VkGraphicsPipelineCreateInfo` structure specified when creating the `VkPipeline` bound to VK_PIPELINE_BIND_POINT_GRAPHICS

- VUID-vkCmdDrawIndexedIndirect-OpTypeImage-07468
  If any shader executed by this pipeline accesses an `OpTypeImage` variable with a `Dim` operand of `SubpassData`, it must be decorated with an `InputAttachmentIndex` that corresponds to a valid input attachment in the current subpass

- VUID-vkCmdDrawIndexedIndirect-None-07469
  Input attachment views accessed in a subpass must be created with the same VkFormat as the corresponding subpass definition, and be created with a VkImageView that is compatible with the attachment referenced by the subpass' `pInputAttachments`[`InputAttachmentIndex`] in the bound VkFramebuffer as specified by Fragment Input Attachment Compatibility

- VUID-vkCmdDrawIndexedIndirect-pDepthInputAttachmentIndex-09595
  Input attachment views accessed in a dynamic render pass with a `InputAttachmentIndex` referenced by VkRenderingInputAttachmentIndexInfo, or no `InputAttachmentIndex` if VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` or VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` are `NULL`, must be created with a VkImageView that is compatible with the corresponding color, depth, or stencil attachment in VkRenderingInfo

- VUID-vkCmdDrawIndexedIndirect-pDepthInputAttachmentIndex-09596
  Input attachment views accessed in a dynamic render pass via a shader object must have an `InputAttachmentIndex` if both VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` and VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` are non-`NULL`

- VUID-vkCmdDrawIndexedIndirect-InputAttachmentIndex-09597
  If an input attachment view accessed in a dynamic render pass via a shader object has an `InputAttachmentIndex`, the `InputAttachmentIndex` must match an index in VkRenderingInputAttachmentIndexInfo

- VUID-vkCmdDrawIndexedIndirect-None-06537
  Memory backing image subresources used as attachments in the current render pass must not be written in any way other than as an attachment by this command

- VUID-vkCmdDrawIndexedIndirect-None-10795
  If a color attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_COLOR_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawIndexedIndirect-None-10796
  If a depth attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_DEPTH_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawIndexedIndirect-None-10797
  If a stencil attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_STENCIL_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawIndexedIndirect-None-12338
  If a color attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_COLOR_BIT on that attachment, the color attachment must not be written to by this command

- VUID-vkCmdDrawIndexedIndirect-None-12339
  If a depth attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_DEPTH_BIT on that attachment, the depth attachment must not be written to by this command

- VUID-vkCmdDrawIndexedIndirect-None-12340
  If a stencil attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_STENCIL_BIT on that attachment, the stencil attachment must not be written to by this command

- VUID-vkCmdDrawIndexedIndirect-None-09003
  If an attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, it must not be accessed in any way other than as an attachment, storage image, or sampled image by this command

- VUID-vkCmdDrawIndexedIndirect-None-06886
  If the current render pass instance uses a depth/stencil attachment with a read-only layout for the depth aspect, depth writes must be disabled

- VUID-vkCmdDrawIndexedIndirect-None-06887
  If the current render pass instance uses a depth/stencil attachment with a read-only layout for the stencil aspect, both front and back `writeMask` are not zero, and stencil test is enabled, all stencil ops must be VK_STENCIL_OP_KEEP

- VUID-vkCmdDrawIndexedIndirect-None-07831
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT dynamic state enabled then vkCmdSetViewport must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-None-07832
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SCISSOR dynamic state enabled then vkCmdSetScissor must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-None-08617
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_WIDTH dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineWidth must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-None-07834
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BIAS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthBiasEnable` is VK_TRUE, then vkCmdSetDepthBias or vkCmdSetDepthBias2EXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-None-07835
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_BLEND_CONSTANTS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and an active color attachment current value of `blendEnable` is VK_TRUE with a blend equations where any VkBlendFactor member is VK_BLEND_FACTOR_CONSTANT_COLOR, VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR, VK_BLEND_FACTOR_CONSTANT_ALPHA, or VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA, then vkCmdSetBlendConstants must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-None-07836
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BOUNDS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthBoundsTestEnable` is VK_TRUE, then vkCmdSetDepthBounds must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-None-07837
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilCompareMask must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-None-07838
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_WRITE_MASK dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilWriteMask must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-None-07839
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_REFERENCE dynamic state enabled, the current value of and `rasterizerDiscardEnable` is VK_FALSE, the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilReference must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-maxMultiviewInstanceIndex-02688
  If the draw is recorded in a render pass instance with multiview enabled, the maximum instance index must be less than or equal to VkPhysicalDeviceMultiviewProperties::`maxMultiviewInstanceIndex`

- VUID-vkCmdDrawIndexedIndirect-sampleLocationsEnable-02689
  If the bound graphics pipeline was created with VkPipelineSampleLocationsStateCreateInfoEXT::`sampleLocationsEnable` set to VK_TRUE, then the active depth attachment must have been created with the VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit set

- VUID-vkCmdDrawIndexedIndirect-None-07634
  If the `VK_EXT_sample_locations` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetSampleLocationsEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-None-06666
  If the `VK_EXT_sample_locations` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `sampleLocationsEnable` is VK_TRUE, then vkCmdSetSampleLocationsEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-None-07840
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_CULL_MODE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCullMode must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-None-07841
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRONT_FACE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetFrontFace must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-None-07843
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, vkCmdSetDepthTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-None-07844
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthTestEnable` is VK_TRUE, then vkCmdSetDepthWriteEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-None-07845
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_COMPARE_OP dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthTestEnable` is VK_TRUE, then vkCmdSetDepthCompareOp must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-None-07846
  If the `depthBounds` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthBoundsTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-None-07847
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetStencilTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-None-07848
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_OP dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilOp must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-viewportCount-03417
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, and the state is not inherited, then vkCmdSetViewportWithCount must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-scissorCount-03418
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT dynamic state enabled, and the state is not inherited, then vkCmdSetScissorWithCount must have been called and not subsequently invalidated in the current command buffer prior to this drawing

- VUID-vkCmdDrawIndexedIndirect-viewportCount-03419
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with both the VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic states enabled, and the state is not inherited, then the `viewportCount` parameter of `vkCmdSetViewportWithCount` must match the `scissorCount` parameter of `vkCmdSetScissorWithCount`

- VUID-vkCmdDrawIndexedIndirect-viewportCount-04137
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportWScalingStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndexedIndirect-viewportCount-04138
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, the current value of `viewportWScalingEnable` is VK_TRUE, then vkCmdSetViewportWScalingNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-None-08636
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, the current value of `viewportWScalingEnable` is VK_TRUE, then the `viewportCount` parameter in the last call to vkCmdSetViewportWScalingNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndexedIndirect-viewportCount-04139
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportShadingRateImageStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndexedIndirect-shadingRateImage-09233
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_COARSE_SAMPLE_ORDER_NV and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoarseSampleOrderNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-shadingRateImage-09234
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `shadingRateImageEnable` is VK_TRUE, then vkCmdSetViewportShadingRatePaletteNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-None-08637
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `shadingRateImageEnable` is VK_TRUE, then the `viewportCount` parameter in the last call to vkCmdSetViewportShadingRatePaletteNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndexedIndirect-VkPipelineVieportCreateInfo-04141
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled and a VkPipelineViewportSwizzleStateCreateInfoNV structure chained from VkPipelineViewportStateCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportSwizzleStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndexedIndirect-VkPipelineVieportCreateInfo-04142
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled and a VkPipelineViewportExclusiveScissorStateCreateInfoNV structure chained from VkPipelineViewportStateCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportExclusiveScissorStateCreateInfoNV::`exclusiveScissorCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndexedIndirect-None-07878
  If the `exclusiveScissor` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_ENABLE_NV dynamic state enabled, then vkCmdSetExclusiveScissorEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-None-07879
  If the `exclusiveScissor` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_NV dynamic state enabled, and the most recent call to vkCmdSetExclusiveScissorEnableNV in the current command buffer set any element of `pExclusiveScissorEnables` to VK_TRUE, then vkCmdSetExclusiveScissorNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-None-04876
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE dynamic state enabled, then vkCmdSetRasterizerDiscardEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-None-04877
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthBiasEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-logicOp-04878
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LOGIC_OP_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `logicOpEnable` is VK_TRUE, then vkCmdSetLogicOpEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-primitiveFragmentShadingRateWithMultipleViewports-04552
  If the `primitiveFragmentShadingRateWithMultipleViewports` limit is not supported, the bound graphics pipeline was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, and any of the shader stages of the bound graphics pipeline write to the `PrimitiveShadingRateKHR` built-in, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and the `viewportCount` parameter of `vkCmdSetViewportWithCount` must be `1`

- VUID-vkCmdDrawIndexedIndirect-primitiveFragmentShadingRateWithMultipleViewports-08642
  If the `primitiveFragmentShadingRateWithMultipleViewports` limit is not supported, and any shader object bound to a graphics stage writes to the `PrimitiveShadingRateKHR` built-in, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and the `viewportCount` parameter of `vkCmdSetViewportWithCount` must be `1`

- VUID-vkCmdDrawIndexedIndirect-blendEnable-04727
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, then for each color attachment, if the corresponding image view’s format features do not contain VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT, then the corresponding current value of `blendEnable` must be VK_FALSE

- VUID-vkCmdDrawIndexedIndirect-None-08644
  If a shader object is bound to any graphics stage or a graphics pipeline is bound, the current value of `rasterizerDiscardEnable` is VK_FALSE, and none of the following is enabled:

  - the `VK_AMD_mixed_attachment_samples` extension

  - the `VK_NV_framebuffer_mixed_samples` extension

  - the `multisampledRenderToSingleSampled` feature

  then the current value of `rasterizationSamples` must be the same as the current color and/or depth/stencil attachments

- VUID-vkCmdDrawIndexedIndirect-None-08876
  If a shader object is bound to any graphics stage, the current render pass instance must have been begun with vkCmdBeginRendering

- VUID-vkCmdDrawIndexedIndirect-imageView-06172
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawIndexedIndirect-imageView-06173
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawIndexedIndirect-imageView-06174
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawIndexedIndirect-imageView-06175
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawIndexedIndirect-imageView-06176
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawIndexedIndirect-imageView-06177
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawIndexedIndirect-viewMask-06178
  If the current render pass instance was begun with vkCmdBeginRendering, the bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::`viewMask` equal to VkRenderingInfo::`viewMask`

- VUID-vkCmdDrawIndexedIndirect-colorAttachmentCount-06179
  If the `dynamicRenderingUnusedAttachments` feature is not enabled and the current render pass instance was begun with vkCmdBeginRendering, the bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::`colorAttachmentCount` equal to VkRenderingInfo::`colorAttachmentCount`

- VUID-vkCmdDrawIndexedIndirect-dynamicRenderingUnusedAttachments-08910
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound graphics pipeline

- VUID-vkCmdDrawIndexedIndirect-dynamicRenderingUnusedAttachments-08912
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` equal to VK_NULL_HANDLE must have the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound pipeline equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirect-dynamicRenderingUnusedAttachments-08911
  If the `dynamicRenderingUnusedAttachments` feature is enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound graphics pipeline, or the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats`, if it exists, must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirect-colorAttachmentCount-09362
  If the current render pass instance was begun with vkCmdBeginRendering, with a VkRenderingInfo::`colorAttachmentCount` equal to `1`, there is no shader object bound to any graphics stage, and a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, each element of the VkRenderingInfo::`pColorAttachments` array with a `resolveImageView` not equal to VK_NULL_HANDLE must have been created with an image created with a VkExternalFormatANDROID::`externalFormat` value equal to the VkExternalFormatANDROID::`externalFormat` value used to create the bound graphics pipeline

- VUID-vkCmdDrawIndexedIndirect-None-09363
  If there is no shader object bound to any graphics stage, the current render pass instance was begun with vkCmdBeginRendering and a VkRenderingInfo::`colorAttachmentCount` equal to `1`, and a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with an image created with a VkExternalFormatANDROID::`externalFormat` value equal to the VkExternalFormatANDROID::`externalFormat` value used to create the bound graphics pipeline

- VUID-vkCmdDrawIndexedIndirect-None-09364
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetColorBlendEnableEXT must have set the blend enable to VK_FALSE prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-None-09365
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetRasterizationSamplesEXT must have set `rasterizationSamples` to VK_SAMPLE_COUNT_1_BIT prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-None-09368
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetFragmentShadingRateKHR must have set `pFragmentSize->width` to `1` prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-None-09369
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetFragmentShadingRateKHR must have set `pFragmentSize->height` to `1` prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-None-07749
  If the `colorWriteEnable` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorWriteEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-attachmentCount-07750
  If the `colorWriteEnable` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the `attachmentCount` parameter of most recent call to `vkCmdSetColorWriteEnableEXT` in the current command buffer must be greater than or equal to the number of active color attachments

- VUID-vkCmdDrawIndexedIndirect-None-07751
  If the `VK_EXT_discard_rectangles` extension is enabled, a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT dynamic state enabled and the `pNext` chain of VkGraphicsPipelineCreateInfo included a VkPipelineDiscardRectangleStateCreateInfoEXT structure, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for each discard rectangle in VkPipelineDiscardRectangleStateCreateInfoEXT::`discardRectangleCount`

- VUID-vkCmdDrawIndexedIndirect-rasterizerDiscardEnable-09236
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT dynamic state enabled and the `pNext` chain of VkGraphicsPipelineCreateInfo did not include a VkPipelineDiscardRectangleStateCreateInfoEXT structure, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for each discard rectangle in VkPhysicalDeviceDiscardRectanglePropertiesEXT::`maxDiscardRectangles`

- VUID-vkCmdDrawIndexedIndirect-None-07880
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDiscardRectangleEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-None-07881
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_MODE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-dynamicRenderingUnusedAttachments-08913
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->imageView` was VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirect-dynamicRenderingUnusedAttachments-08914
  If current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawIndexedIndirect-dynamicRenderingUnusedAttachments-08915
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, and the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->imageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirect-dynamicRenderingUnusedAttachments-08916
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->imageView` was VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirect-dynamicRenderingUnusedAttachments-08917
  If current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawIndexedIndirect-dynamicRenderingUnusedAttachments-08918
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, and the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->imageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirect-imageView-06183
  If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentShadingRateAttachmentInfoKHR::`imageView` was not VK_NULL_HANDLE, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

- VUID-vkCmdDrawIndexedIndirect-dynamicRenderingLocalRead-11797
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingLocalRead` feature is enabled, the VK_RENDERING_LOCAL_READ_CONCURRENT_ACCESS_CONTROL_BIT_KHR flag is specified, and an attachment is being used as a feedback loop as specified by VK_RENDERING_ATTACHMENT_INPUT_ATTACHMENT_FEEDBACK_BIT_KHR, VkRenderingAttachmentFlagsInfoKHR::`flags` for that attachment must include VK_RENDERING_ATTACHMENT_INPUT_ATTACHMENT_FEEDBACK_BIT_KHR

- VUID-vkCmdDrawIndexedIndirect-imageView-06184
  If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentDensityMapAttachmentInfoEXT::`imageView` was not VK_NULL_HANDLE, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT

- VUID-vkCmdDrawIndexedIndirect-layers-10831
  If the current render pass instance was created with VK_RENDERING_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE or VK_RENDER_PASS_CREATE_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE, and the bound graphics pipeline was created with VK_PIPELINE_CREATE_2_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE, then the current render pass instance must have a `layers` value less than or equal to VkPipelineFragmentDensityMapLayeredCreateInfoVALVE::`maxFragmentDensityMapLayers`

- VUID-vkCmdDrawIndexedIndirect-colorAttachmentCount-06185
  If the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with a sample count equal to the corresponding element of the `pColorAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline

- VUID-vkCmdDrawIndexedIndirect-pDepthAttachment-06186
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of the `depthStencilAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawIndexedIndirect-pStencilAttachment-06187
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of the `depthStencilAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawIndexedIndirect-multisampledRenderToSingleSampled-07285
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with a sample count equal to the value of `rasterizationSamples` for the bound graphics pipeline

- VUID-vkCmdDrawIndexedIndirect-multisampledRenderToSingleSampled-07286
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawIndexedIndirect-multisampledRenderToSingleSampled-07287
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawIndexedIndirect-pNext-07935
  If this command is called inside a render pass instance started with vkCmdBeginRendering, and the `pNext` chain of VkRenderingInfo includes a VkMultisampledRenderToSingleSampledInfoEXT structure with `multisampledRenderToSingleSampledEnable` equal to VK_TRUE, then the value of `rasterizationSamples` for the bound graphics pipeline must be equal to VkMultisampledRenderToSingleSampledInfoEXT::`rasterizationSamples`

- VUID-vkCmdDrawIndexedIndirect-renderPass-06198
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline must have been created with a VkGraphicsPipelineCreateInfo::`renderPass` equal to VK_NULL_HANDLE

- VUID-vkCmdDrawIndexedIndirect-pColorAttachments-08963
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound with a fragment shader that statically writes to a color attachment, the color write mask is not zero, color writes are enabled, and the corresponding element of the VkRenderingInfo::`pColorAttachments->imageView` was not VK_NULL_HANDLE, then the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirect-pColorAttachments-11539
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound with a fragment shader that statically writes to a color attachment, the color write mask is not zero, color writes are enabled, and the corresponding element of the VkRenderingInfo::`pColorAttachments->resolveImageView` was not VK_NULL_HANDLE, then the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirect-pDepthAttachment-08964
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound, depth test is enabled, and the VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, then the VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirect-pDepthAttachment-11540
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound, depth test is enabled, and the VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, then the VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirect-pStencilAttachment-08965
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound, stencil test is enabled and the VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, then the VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirect-pStencilAttachment-11860
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound, stencil test is enabled and the VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, then the VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirect-flags-10582
  If the current render pass instance was begun with a vkCmdBeginRendering call in `commandBuffer`, its VkRenderingInfo::`flags` parameter must not have VK_RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT set unless VK_RENDERING_CONTENTS_INLINE_BIT_KHR is also set

- VUID-vkCmdDrawIndexedIndirect-primitivesGeneratedQueryWithRasterizerDiscard-06708
  If the `primitivesGeneratedQueryWithRasterizerDiscard` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, rasterization discard must not be enabled

- VUID-vkCmdDrawIndexedIndirect-primitivesGeneratedQueryWithNonZeroStreams-06709
  If the `primitivesGeneratedQueryWithNonZeroStreams` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, the bound graphics pipeline must not have been created with a non-zero value in `VkPipelineRasterizationStateStreamCreateInfoEXT`::`rasterizationStream`

- VUID-vkCmdDrawIndexedIndirect-None-07620
  If the `depthClamp` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLAMP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthClampEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-None-07621
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_POLYGON_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetPolygonModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-None-07622
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetRasterizationSamplesEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-None-07623
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetSampleMaskEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-alphaToCoverageEnable-08919
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT dynamic state enabled, and `alphaToCoverageEnable` was VK_TRUE in the last call to vkCmdSetAlphaToCoverageEnableEXT, then the Fragment Output Interface must contain a variable for the alpha `Component` word in `Location` 0 at `Index` 0

- VUID-vkCmdDrawIndexedIndirect-alphaToCoverageEnable-08920
  If a shader object is bound to any graphics stage, and the most recent call to vkCmdSetAlphaToCoverageEnableEXT in the current command buffer set `alphaToCoverageEnable` to VK_TRUE, then the Fragment Output Interface must contain a variable for the alpha `Component` word in `Location` 0 at `Index` 0

- VUID-vkCmdDrawIndexedIndirect-None-07624
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAlphaToCoverageEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-None-07625
  If the `alphaToOne` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ALPHA_TO_ONE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAlphaToOneEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-None-07626
  If the `logicOp` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LOGIC_OP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetLogicOpEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-None-07627
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and there are color attachments bound, then vkCmdSetColorBlendEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-None-07629
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and there are color attachments bound, then vkCmdSetColorWriteMaskEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-None-07630
  If the `geometryStreams` feature is enabled, and a shader object is bound to the VK_SHADER_STAGE_GEOMETRY_BIT stage or a graphics pipeline is bound which was created with both a VK_SHADER_STAGE_GEOMETRY_BIT stage and the VK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXT dynamic state enabled, then vkCmdSetRasterizationStreamEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-None-07631
  If the `VK_EXT_conservative_rasterization` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_CONSERVATIVE_RASTERIZATION_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetConservativeRasterizationModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-None-07632
  If the `VK_EXT_conservative_rasterization` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXTRA_PRIMITIVE_OVERESTIMATION_SIZE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `conservativeRasterizationMode` is VK_CONSERVATIVE_RASTERIZATION_MODE_OVERESTIMATE_EXT, then vkCmdSetExtraPrimitiveOverestimationSizeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-conservativePointAndLineRasterization-07499
  If the `VK_EXT_conservative_rasterization` extension is enabled, `conservativePointAndLineRasterization` is not supported, a shader object is bound to any graphics stage or a graphics pipeline is bound, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line or point topology class, then the current value of `conservativeRasterizationMode` must be VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT

- VUID-vkCmdDrawIndexedIndirect-None-07633
  If the `depthClipEnable` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLIP_ENABLE_EXT dynamic state, then vkCmdSetDepthClipEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-None-07636
  If the `VK_EXT_provoking_vertex` extension is enabled, a shader object is bound to the VK_SHADER_STAGE_VERTEX_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_PROVOKING_VERTEX_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetProvokingVertexModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-None-08666
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineRasterizationModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-None-08669
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineStippleEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-None-07849
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled and a shader object is bound to any graphics stage, or a bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stippledLineEnable` is VK_TRUE, then vkCmdSetLineStipple must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-None-10608
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic state enabled, the effective rasterization input topology is in the line topology class, and the current `lineRasterizationMode` is VK_LINE_RASTERIZATION_MODE_BRESENHAM or VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH, then the current `alphaToCoverageEnable`, `alphaToOneEnable` and `sampleShadingEnable` states must all be VK_FALSE

- VUID-vkCmdDrawIndexedIndirect-None-07639
  If the `depthClipControl` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLIP_NEGATIVE_ONE_TO_ONE_EXT dynamic state enabled, then vkCmdSetDepthClipNegativeOneToOneEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-None-09650
  If the `depthClampControl` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLAMP_RANGE_EXT dynamic state enabled, and the current value of `depthClampEnable` is VK_TRUE, then vkCmdSetDepthClampRangeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-None-07640
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_ENABLE_NV dynamic state enabled, then vkCmdSetViewportWScalingEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-None-07641
  If the `VK_NV_viewport_swizzle` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic state enabled, then vkCmdSetViewportSwizzleNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-None-07642
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageToColorEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-None-07643
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_LOCATION_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageToColorEnable` is VK_TRUE, then vkCmdSetCoverageToColorLocationNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-None-07644
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_MODE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageModulationModeNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-None-07645
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageModulationMode` is any value other than VK_COVERAGE_MODULATION_MODE_NONE_NV, then vkCmdSetCoverageModulationTableEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-None-07646
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageModulationTableEnable` is VK_TRUE, then vkCmdSetCoverageModulationTableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-None-07647
  If the `shadingRateImage` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SHADING_RATE_IMAGE_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetShadingRateImageEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-pipelineFragmentShadingRate-09238
  If the `pipelineFragmentShadingRate` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetFragmentShadingRateKHR must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-None-07648
  If the `representativeFragmentTest` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_REPRESENTATIVE_FRAGMENT_TEST_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetRepresentativeFragmentTestEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-None-07649
  If the `coverageReductionMode` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageReductionModeNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-rasterizationSamples-07471
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current subpass does not use any color and/or depth/stencil attachments, then the `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT must follow the rules for a zero-attachment subpass

- VUID-vkCmdDrawIndexedIndirect-samples-07472
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state disabled, then the `samples` parameter in the last call to vkCmdSetSampleMaskEXT must be greater or equal to the VkPipelineMultisampleStateCreateInfo::`rasterizationSamples` parameter used to create the bound graphics pipeline

- VUID-vkCmdDrawIndexedIndirect-samples-07473
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT state and VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT states enabled, then the `samples` parameter in the last call to vkCmdSetSampleMaskEXT must be greater or equal to the `rasterizationSamples` parameter in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawIndexedIndirect-None-09211
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, or a shader object is bound to any graphics stage, and the current render pass instance includes a VkMultisampledRenderToSingleSampledInfoEXT structure with `multisampledRenderToSingleSampledEnable` equal to VK_TRUE, then the `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT must be the same as the `rasterizationSamples` member of that structure

- VUID-vkCmdDrawIndexedIndirect-firstAttachment-07476
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic states enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the last call to vkCmdSetColorBlendEnableEXT in the current command buffer prior to this drawing command must have set a value for all active color attachments

- VUID-vkCmdDrawIndexedIndirect-firstAttachment-07478
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT dynamic states enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the last call to vkCmdSetColorWriteMaskEXT in the current command buffer prior to this drawing command must have set a value for all active color attachments

- VUID-vkCmdDrawIndexedIndirect-advancedBlendMaxColorAttachments-07480
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT and VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic states enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and an active color attachment current value of `blendEnable` is VK_TRUE, then the number of active color attachments must not exceed `advancedBlendMaxColorAttachments`

- VUID-vkCmdDrawIndexedIndirect-None-10862
  If a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT , but not the VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorBlendEquationEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawIndexedIndirect-rasterizerDiscardEnable-10863
  If a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT, but not the VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorBlendAdvancedEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawIndexedIndirect-None-10864
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT and VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then either vkCmdSetColorBlendAdvancedEXT or vkCmdSetColorBlendEquationEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawIndexedIndirect-primitivesGeneratedQueryWithNonZeroStreams-07481
  If the `primitivesGeneratedQueryWithNonZeroStreams` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, and the bound graphics pipeline was created with VK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXT state enabled, the last call to vkCmdSetRasterizationStreamEXT must have set the `rasterizationStream` to zero

- VUID-vkCmdDrawIndexedIndirect-sampleLocationsPerPixel-07482
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state disabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then the `sampleLocationsPerPixel` member of `pSampleLocationsInfo` in the last call to vkCmdSetSampleLocationsEXT must equal the `rasterizationSamples` member of the VkPipelineMultisampleStateCreateInfo structure the bound graphics pipeline has been created with

- VUID-vkCmdDrawIndexedIndirect-sampleLocationsPerPixel-07483
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then the `sampleLocationsPerPixel` member of `pSampleLocationsInfo` in the last call to vkCmdSetSampleLocationsEXT must equal the `rasterizationSamples` parameter of the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawIndexedIndirect-sampleLocationsEnable-07484
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT then the current active depth attachment must have been created with the VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit set

- VUID-vkCmdDrawIndexedIndirect-sampleLocationsEnable-07485
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, then the `sampleLocationsInfo.maxSampleLocationGridSize.width` in the last call to vkCmdSetSampleLocationsEXT must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.width` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling `rasterizationSamples`

- VUID-vkCmdDrawIndexedIndirect-sampleLocationsEnable-07486
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, then the `sampleLocationsInfo.maxSampleLocationGridSize.height` in the last call to vkCmdSetSampleLocationsEXT must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.height` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling `rasterizationSamples`

- VUID-vkCmdDrawIndexedIndirect-sampleLocationsEnable-07487
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, the fragment shader code must not statically use the extended instruction `InterpolateAtSample`

- VUID-vkCmdDrawIndexedIndirect-sampleLocationsEnable-07936
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationGridSize.width` must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.width` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling the value of `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawIndexedIndirect-sampleLocationsEnable-07937
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationGridSize.height` must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.height` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling the value of `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawIndexedIndirect-sampleLocationsEnable-07938
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationsPerPixel` must equal `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawIndexedIndirect-coverageModulationTableEnable-07488
  If a shader object is bound to any graphics stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NV state enabled, and the last call to vkCmdSetCoverageModulationTableEnableNV set `coverageModulationTableEnable` to VK_TRUE, then the `coverageModulationTableCount` parameter in the last call to vkCmdSetCoverageModulationTableNV must equal the current `rasterizationSamples` divided by the number of color samples in the current active color attachment

- VUID-vkCmdDrawIndexedIndirect-rasterizationSamples-07489
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, and if current subpass has a depth/stencil attachment and depth test, stencil test, or depth bounds test are enabled in the bound pipeline, then the current `rasterizationSamples` must be the same as the sample count of the depth/stencil attachment

- VUID-vkCmdDrawIndexedIndirect-coverageToColorEnable-07490
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV state enabled and the last call to vkCmdSetCoverageToColorEnableNV set the `coverageToColorEnable` to VK_TRUE, then there must be an active color attachment at the location selected by the last call to vkCmdSetCoverageToColorLocationNV `coverageToColorLocation`, with a VkFormat of VK_FORMAT_R8_UINT, VK_FORMAT_R8_SINT, VK_FORMAT_R16_UINT, VK_FORMAT_R16_SINT, VK_FORMAT_R32_UINT, or VK_FORMAT_R32_SINT

- VUID-vkCmdDrawIndexedIndirect-rasterizerDiscardEnable-09420
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, and a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, and the most recent call to vkCmdSetRasterizerDiscardEnable in the current command buffer set `rasterizerDiscardEnable` to VK_FALSE, and the last call to vkCmdSetCoverageToColorEnableNV set the `coverageToColorEnable` to VK_TRUE, then there must be an active color attachment at the location selected by the last call to vkCmdSetCoverageToColorLocationNV `coverageToColorLocation`, with a VkFormat of VK_FORMAT_R8_UINT, VK_FORMAT_R8_SINT, VK_FORMAT_R16_UINT, VK_FORMAT_R16_SINT, VK_FORMAT_R32_UINT, or VK_FORMAT_R32_SINT

- VUID-vkCmdDrawIndexedIndirect-coverageReductionMode-07491
  If the `coverageReductionMode` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV or VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic states enabled, then the current values of `coverageReductionMode`, `rasterizationSamples`, the sample counts for the color and depth/stencil attachments (if the subpass has them) must be a valid combination returned by vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV

- VUID-vkCmdDrawIndexedIndirect-viewportCount-07492
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportSwizzleStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndexedIndirect-viewportCount-07493
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic states enabled then the `viewportCount` parameter in the last call to vkCmdSetViewportSwizzleNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndexedIndirect-viewportCount-09421
  If the `VK_NV_viewport_swizzle` extension is enabled, and a shader object is bound to any graphics stage, then the `viewportCount` parameter in the last call to vkCmdSetViewportSwizzleNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndexedIndirect-rasterizationSamples-07494
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, and the `coverageReductionMode` feature is not enabled, or the current value of `coverageReductionMode` is not VK_COVERAGE_REDUCTION_MODE_TRUNCATE_NV, and the current value of `rasterizationSamples` is greater than sample count of the color attachment, then sample shading must be disabled

- VUID-vkCmdDrawIndexedIndirect-stippledLineEnable-07495
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_RECTANGULAR, then the `stippledRectangularLines` feature must be enabled

- VUID-vkCmdDrawIndexedIndirect-stippledLineEnable-07496
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_BRESENHAM, then the `stippledBresenhamLines` feature must be enabled

- VUID-vkCmdDrawIndexedIndirect-stippledLineEnable-07497
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH, then the `stippledSmoothLines` feature must be enabled

- VUID-vkCmdDrawIndexedIndirect-stippledLineEnable-07498
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_DEFAULT, then the `stippledRectangularLines` feature must be enabled and VkPhysicalDeviceLimits::`strictLines` must be VK_TRUE

- VUID-vkCmdDrawIndexedIndirect-stage-07073
  If the bound pipeline was created with the VkPipelineShaderStageCreateInfo::`stage` member of an element of VkGraphicsPipelineCreateInfo::`pStages` set to VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT, then Mesh Shader Queries must not be active

- VUID-vkCmdDrawIndexedIndirect-None-08877
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ATTACHMENT_FEEDBACK_LOOP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAttachmentFeedbackLoopEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-None-07850
  If dynamic state was inherited from VkCommandBufferInheritanceViewportScissorInfoNV, it must be set in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-nextStage-10745
  For each shader object bound to a graphics stage, except for shader object bound to the last graphics stage in the logical pipeline, it must have been created with a `nextStage` including the corresponding bit to the shader object bound to the following graphics stage in the logical pipeline

- VUID-vkCmdDrawIndexedIndirect-None-08684
  If there is no bound graphics pipeline, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_VERTEX_BIT

- VUID-vkCmdDrawIndexedIndirect-None-08685
  If there is no bound graphics pipeline, and the `tessellationShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT

- VUID-vkCmdDrawIndexedIndirect-None-08686
  If there is no bound graphics pipeline, and the `tessellationShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT

- VUID-vkCmdDrawIndexedIndirect-None-08687
  If there is no bound graphics pipeline, and the `geometryShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_GEOMETRY_BIT

- VUID-vkCmdDrawIndexedIndirect-None-08688
  If there is no bound graphics pipeline, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_FRAGMENT_BIT

- VUID-vkCmdDrawIndexedIndirect-None-08689
  If there is no bound graphics pipeline, and the `taskShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TASK_BIT_EXT

- VUID-vkCmdDrawIndexedIndirect-None-08690
  If there is no bound graphics pipeline, and the `meshShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-vkCmdDrawIndexedIndirect-None-08693
  If there is no bound graphics pipeline, and at least one of the `taskShader` and `meshShader` features is enabled, one of the VK_SHADER_STAGE_VERTEX_BIT or VK_SHADER_STAGE_MESH_BIT_EXT stages must have a valid `VkShaderEXT` bound, and the other must have no `VkShaderEXT` bound

- VUID-vkCmdDrawIndexedIndirect-None-08696
  If there is no bound graphics pipeline, and a valid `VkShaderEXT` is bound to the VK_SHADER_STAGE_VERTEX_BIT stage, there must be no `VkShaderEXT` bound to either the VK_SHADER_STAGE_TASK_BIT_EXT stage or the VK_SHADER_STAGE_MESH_BIT_EXT stage

- VUID-vkCmdDrawIndexedIndirect-None-08698
  If any graphics shader is bound which was created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag, then all shaders created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag in the same vkCreateShadersEXT call must also be bound

- VUID-vkCmdDrawIndexedIndirect-None-08699
  If any graphics shader is bound which was created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag, any stages in between stages whose shaders which did not create a shader with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag as part of the same vkCreateShadersEXT call must not have any `VkShaderEXT` bound

- VUID-vkCmdDrawIndexedIndirect-None-08878
  All bound graphics shader objects must have been created with identical or identically defined push constant ranges

- VUID-vkCmdDrawIndexedIndirect-None-08879
  All bound graphics shader objects must have either been created with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag set, or with identical or identically defined arrays of descriptor set layouts

- VUID-vkCmdDrawIndexedIndirect-colorAttachmentCount-09372
  If the current render pass instance was begun with vkCmdBeginRendering and a VkRenderingInfo::`colorAttachmentCount` equal to `1`, a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, and a fragment shader is bound, it must not declare the `DepthReplacing` or `StencilRefReplacingEXT` execution modes

- VUID-vkCmdDrawIndexedIndirect-pDynamicStates-08715
  If the bound graphics pipeline state includes a fragment shader stage, was created with VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`, and the fragment shader declares the `EarlyFragmentTests` execution mode and uses `OpDepthAttachmentReadEXT`, the `depthWriteEnable` parameter in the last call to vkCmdSetDepthWriteEnable must be VK_FALSE

- VUID-vkCmdDrawIndexedIndirect-pDynamicStates-08716
  If the bound graphics pipeline state includes a fragment shader stage, was created with VK_DYNAMIC_STATE_STENCIL_WRITE_MASK set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`, and the fragment shader declares the `EarlyFragmentTests` execution mode and uses `OpStencilAttachmentReadEXT`, the `writeMask` parameter in the last call to vkCmdSetStencilWriteMask must be `0`

- VUID-vkCmdDrawIndexedIndirect-None-09116
  If a shader object is bound to any graphics stage or the bound graphics pipeline was created with VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT, and the format of any color attachment is VK_FORMAT_E5B9G9R9_UFLOAT_PACK32, the corresponding element of the `pColorWriteMasks` parameter of vkCmdSetColorWriteMaskEXT must either include all of VK_COLOR_COMPONENT_R_BIT, VK_COLOR_COMPONENT_G_BIT, VK_COLOR_COMPONENT_B_BIT, and VK_COLOR_COMPONENT_A_BIT, or none of them

- VUID-vkCmdDrawIndexedIndirect-maxFragmentDualSrcAttachments-09239
  If blending is enabled for any attachment where either the source or destination blend factors for that attachment use the secondary color input, the maximum value of `Location` for any output attachment statically used in the `Fragment` `Execution` `Model` executed by this command must be less than `maxFragmentDualSrcAttachments`

- VUID-vkCmdDrawIndexedIndirect-None-09548
  If the current render pass was begun with vkCmdBeginRendering, there is no shader object bound to any graphics stage, the value of each element of VkRenderingAttachmentLocationInfo::`pColorAttachmentLocations` in the bound pipeline must match the value for the corresponding locations set currently in the current render pass instance

- VUID-vkCmdDrawIndexedIndirect-None-09549
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of each element of VkRenderingInputAttachmentIndexInfo::`pColorAttachmentInputIndices` in the bound pipeline must match the value for the corresponding index set currently in the current render pass instance

- VUID-vkCmdDrawIndexedIndirect-None-10927
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` in the bound pipeline must match the value set currently in the current render pass instance

- VUID-vkCmdDrawIndexedIndirect-None-10928
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` in the bound pipeline must match the value set currently in the current render pass instance

- VUID-vkCmdDrawIndexedIndirect-None-09642
  If the current render pass was begun with vkCmdBeginRendering with the VK_RENDERING_ENABLE_LEGACY_DITHERING_BIT_EXT flag, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_2_ENABLE_LEGACY_DITHERING_BIT_EXT

- VUID-vkCmdDrawIndexedIndirect-None-09643
  If the bound graphics pipeline was created with VK_PIPELINE_CREATE_2_ENABLE_LEGACY_DITHERING_BIT_EXT, the current render pass must have begun with vkCmdBeginRendering with the VK_RENDERING_ENABLE_LEGACY_DITHERING_BIT_EXT flag

- VUID-vkCmdDrawIndexedIndirect-None-10677
  If the per-tile execution model is enabled, the tileShadingPerTileDraw feature must be enabled

- VUID-vkCmdDrawIndexedIndirect-None-10772
  If a shader object is bound to any graphics stage, multiview functionality must not be enabled in the current render pass

- VUID-vkCmdDrawIndexedIndirect-multiviewPerViewViewports-12262
  If the `multiviewPerViewViewports` feature is enabled, then the index of the most significant bit in current render pass instance `viewMask` must be less than the current value of `viewportCount`

- VUID-vkCmdDrawIndexedIndirect-multiviewPerViewViewports-12263
  If the `multiviewPerViewViewports` feature is enabled, then the index of the most significant bit in current render pass instance `viewMask` must be less than the current value of `scissorCount`

- VUID-vkCmdDrawIndexedIndirect-flags-11521
  If current render pass instance was begun with vkCmdBeginRendering with VkRenderingInfo::`flags` which includes VK_RENDERING_FRAGMENT_REGION_BIT_EXT, and if sample shading is enabled (explicitly or implicitly), then the minimum fraction for sample shading must equal 0.0

- VUID-vkCmdDrawIndexedIndirect-None-11522
  If the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, and the `dynamicRenderingUnusedAttachments` feature is not enabled, the graphics pipeline bound must have been created with a VkCustomResolveCreateInfoEXT

- VUID-vkCmdDrawIndexedIndirect-None-11523
  If the current render pass instance was begun with vkCmdBeginRendering and does not contain a custom resolve, and the `dynamicRenderingUnusedAttachments` feature is not enabled, the graphics pipeline bound must not have been created with a VkCustomResolveCreateInfoEXT

- VUID-vkCmdDrawIndexedIndirect-customResolve-11524
  If the current render pass instance was begun with vkCmdBeginRendering and vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, the graphics pipeline bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_TRUE

- VUID-vkCmdDrawIndexedIndirect-customResolve-11525
  If the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, and vkCmdBeginCustomResolveEXT has not been recorded in the render pass instance, the graphics pipeline bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_FALSE

- VUID-vkCmdDrawIndexedIndirect-None-11861
  If the `dynamicRenderingUnusedAttachments` feature is not enabled and the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, the bound graphics pipeline must have been created with a VkCustomResolveCreateInfoEXT::`colorAttachmentCount` equal to VkRenderingInfo::`colorAttachmentCount`

- VUID-vkCmdDrawIndexedIndirect-None-11862
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound graphics pipeline

- VUID-vkCmdDrawIndexedIndirect-None-11863
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` equal to VK_NULL_HANDLE must have the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound pipeline equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirect-dynamicRenderingUnusedAttachments-11864
  If the `dynamicRenderingUnusedAttachments` feature is enabled, the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound graphics pipeline, or the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats`, if it exists, must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirect-None-11865
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirect-None-11866
  If current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`

- VUID-vkCmdDrawIndexedIndirect-dynamicRenderingUnusedAttachments-11867
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, and the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirect-None-11868
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->resolveImageView` was VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirect-None-11869
  If current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`

- VUID-vkCmdDrawIndexedIndirect-dynamicRenderingUnusedAttachments-11870
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, and the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirect-colorAttachmentCount-11871
  If the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0` and vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, then for each element of the VkRenderingInfo::`pColorAttachments` array with a `resolveImageView` not equal to VK_NULL_HANDLE, the `resolveImageView` must have been created with a sample count equal to the value of `rasterizationSamples` for the bound graphics pipeline

- VUID-vkCmdDrawIndexedIndirect-pDepthAttachment-11872
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`

- VUID-vkCmdDrawIndexedIndirect-pStencilAttachment-11873
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`

- VUID-vkCmdDrawIndexedIndirect-customResolve-11529
  If a shader object is bound to the fragment stage, the current render pass instance was begun with vkCmdBeginRendering, a fragment density map attachment is active, and vkCmdBeginCustomResolveEXT has been called, then the fragment shader object bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_TRUE

- VUID-vkCmdDrawIndexedIndirect-customResolve-11530
  If a shader object is bound to the fragment stage, the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, a fragment density map attachment is active, and vkCmdBeginCustomResolveEXT has not yet been called, then the fragment shader object bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_FALSE

- VUID-vkCmdDrawIndexedIndirect-flags-13361
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, then all bound shader objects must have been created with the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit

- VUID-vkCmdDrawIndexedIndirect-flags-13362
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, then the pipeline layout of the bound descriptor sets must have been created with VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT set

- VUID-vkCmdDrawIndexedIndirect-flags-13363
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, and any of the descriptor set layouts used to create the pipeline layout of the bound descriptor sets were created with any binding’s VkDescriptorSetLayoutBinding::`stageFlags` set with VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT, then there must be no binding with VkDescriptorSetLayoutBinding::`stageFlags` set with VK_SHADER_STAGE_TASK_BIT_EXT or VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-vkCmdDrawIndexedIndirect-flags-13364
  If there are any shader objects bound that were created with `flags` that includes both the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR and VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT bits, the pipeline layout of the bound descriptor sets must have been created with VK_PIPELINE_LAYOUT_CREATE_NO_TASK_SHADER_BIT_KHR set

- VUID-vkCmdDrawIndexedIndirect-flags-13365
  If there are any shader objects bound that were created with `flags` that includes both the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR and VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT bits, there must be no shader object bound to the VK_SHADER_STAGE_TASK_BIT_EXT stage

- VUID-vkCmdDrawIndexedIndirect-None-04007
  All vertex input bindings accessed via vertex input variables declared in the vertex shader entry point’s interface must have either valid or VK_NULL_HANDLE buffers bound

- VUID-vkCmdDrawIndexedIndirect-None-04008
  If the `nullDescriptor` feature is not enabled, all vertex input bindings accessed via vertex input variables declared in the vertex shader entry point’s interface must not be VK_NULL_HANDLE

- VUID-vkCmdDrawIndexedIndirect-None-02721
  If the `robustBufferAccess` feature is not enabled, and that pipeline was created without enabling VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS for `vertexInputs`, then for a given vertex buffer binding, any attribute data fetched must be entirely contained within the corresponding vertex buffer binding, as described in Vertex Input Description

- VUID-vkCmdDrawIndexedIndirect-format-10389
  For each vertex attribute accessed by this command, if its VkVertexInputAttributeDescription::`format` or VkVertexInputAttributeDescription2EXT::`format` is a packed format, and the `legacyVertexAttributes` feature is not enabled, the value of `attribAddress`, calculated as described in Vertex Input Calculation, must be a multiple of the size of the `format`

- VUID-vkCmdDrawIndexedIndirect-format-10390
  For each vertex attribute accessed by this command, if its VkVertexInputAttributeDescription::`format` or VkVertexInputAttributeDescription2EXT::`format` is not a packed format, and either the `legacyVertexAttributes` feature is not enabled or `format` has 64-bit components, the value of `attribAddress`, calculated as described in Vertex Input Calculation, must be a multiple of the component size of the `format`

- VUID-vkCmdDrawIndexedIndirect-None-07842
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY dynamic state enabled then vkCmdSetPrimitiveTopology must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-dynamicPrimitiveTopologyUnrestricted-07500
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY dynamic state enabled and the `dynamicPrimitiveTopologyUnrestricted` is VK_FALSE, then the `primitiveTopology` parameter of `vkCmdSetPrimitiveTopology` must be of the same topology class as the pipeline VkPipelineInputAssemblyStateCreateInfo::`topology` state

- VUID-vkCmdDrawIndexedIndirect-primitiveTopology-10286
  If a VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage is bound, then the current value of `primitiveTopology` must be VK_PRIMITIVE_TOPOLOGY_PATCH_LIST prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-primitiveTopology-10747
  If vkCmdSetPrimitiveTopology set `primitiveTopology` to VK_PRIMITIVE_TOPOLOGY_PATCH_LIST prior to this drawing command, then a VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage must be bound

- VUID-vkCmdDrawIndexedIndirect-primitiveTopology-10748
  If vkCmdSetPrimitiveTopology set `primitiveTopology` to VK_PRIMITIVE_TOPOLOGY_POINT_LIST prior to this drawing command, the `maintenance5` feature is not enabled, both a VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT and VK_SHADER_STAGE_GEOMETRY_BIT stage are not bound, then the `Vertex` `Execution` `Model` must have a `PointSize` decorated variable that is statically written to

- VUID-vkCmdDrawIndexedIndirect-pStrides-04913
  If the bound graphics pipeline was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE dynamic state enabled, but without the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled, then vkCmdBindVertexBuffers2 with a non-`NULL` `pStrides` parameter or vkCmdBindVertexBuffers3KHR with `setStride` set to VK_TRUE must have been called and not subsequently invalidated in the current command buffer prior to this draw command

- VUID-vkCmdDrawIndexedIndirect-None-13118
  If the bound graphics pipeline was created without the VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE dynamic state enabled, without the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled, and vkCmdBindVertexBuffers3KHR was called and not subsequently invalidated in the current command buffer prior to this draw command, the value of `setStride` in each of its `pBindInfos` elements must have been VK_FALSE

- VUID-vkCmdDrawIndexedIndirect-None-04914
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled then vkCmdSetVertexInputEXT must have been called and not subsequently invalidated in the current command buffer prior to this draw command

- VUID-vkCmdDrawIndexedIndirect-Input-07939
  If the `vertexAttributeRobustness` feature is not enabled, and the `maintenance9` feature is not enabled, and there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled then all variables with the `Input` storage class decorated with `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` must contain a location in VkVertexInputAttributeDescription2EXT::`location`

- VUID-vkCmdDrawIndexedIndirect-Input-08734
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled and either the `legacyVertexAttributes` feature is not enabled or the SPIR-V Type associated with a given `Input` variable of the corresponding `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` is 64-bit, then the numeric type associated with all `Input` variables of the corresponding `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` must be the same as VkVertexInputAttributeDescription2EXT::`format`

- VUID-vkCmdDrawIndexedIndirect-format-08936
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled and VkVertexInputAttributeDescription2EXT::`format` has a 64-bit component, then the scalar width associated with all `Input` variables of the corresponding `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` must be 64-bit

- VUID-vkCmdDrawIndexedIndirect-format-08937
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled and the scalar width associated with a `Location` decorated `Input` variable in the `Vertex` `Execution` `Model` `OpEntryPoint` is 64-bit, then the corresponding VkVertexInputAttributeDescription2EXT::`format` must have a 64-bit component

- VUID-vkCmdDrawIndexedIndirect-None-09203
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled and VkVertexInputAttributeDescription2EXT::`format` has a 64-bit component, then all `Input` variables at the corresponding `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` must not use components that are not present in the format

- VUID-vkCmdDrawIndexedIndirect-None-04875
  If there is a shader object bound to the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage or the bound graphics pipeline state was created with both a VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage and the VK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT dynamic state enabled, and the current value of `primitiveTopology` is VK_PRIMITIVE_TOPOLOGY_PATCH_LIST, then vkCmdSetPatchControlPointsEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-None-04879
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE dynamic state enabled then vkCmdSetPrimitiveRestartEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-None-09637
  If the `primitiveTopologyListRestart` feature is not enabled, the input assembly is VK_PRIMITIVE_TOPOLOGY_POINT_LIST, VK_PRIMITIVE_TOPOLOGY_LINE_LIST, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY, or VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY, there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE dynamic state enabled, then vkCmdSetPrimitiveRestartEnable must be VK_FALSE

- VUID-vkCmdDrawIndexedIndirect-None-10909
  If the `primitiveTopologyPatchListRestart` feature is not enabled, the input assembly is VK_PRIMITIVE_TOPOLOGY_PATCH_LIST, there is a shader object bound to the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE dynamic state enabled then vkCmdSetPrimitiveRestartEnable must be VK_FALSE

- VUID-vkCmdDrawIndexedIndirect-stage-06481
  The bound graphics pipeline must not have been created with the VkPipelineShaderStageCreateInfo::`stage` member of any element of VkGraphicsPipelineCreateInfo::`pStages` set to VK_SHADER_STAGE_TASK_BIT_EXT or VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-vkCmdDrawIndexedIndirect-None-08885
  There must be no shader object bound to either of the VK_SHADER_STAGE_TASK_BIT_EXT or VK_SHADER_STAGE_MESH_BIT_EXT stages

- VUID-vkCmdDrawIndexedIndirect-None-07619
  If a shader object is bound to the VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stage or a graphics pipeline is bound which was created with both a VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stage and the VK_DYNAMIC_STATE_TESSELLATION_DOMAIN_ORIGIN_EXT dynamic state enabled, then vkCmdSetTessellationDomainOriginEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirect-OpExecutionMode-12239
  If a shader is bound to both the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stages, and if both stages contain an `OpExecutionMode` instruction specifying the type of subdivision, they must be the same

- VUID-vkCmdDrawIndexedIndirect-OpExecutionMode-12240
  If a shader is bound to both the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stages, and if both stages contain an `OpExecutionMode` instruction specifying the orientation of triangles, they must be the same

- VUID-vkCmdDrawIndexedIndirect-OpExecutionMode-12241
  If a shader is bound to both the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stages, and if both stages contain an `OpExecutionMode` instruction specifying the segment spacing, they must be the same

- VUID-vkCmdDrawIndexedIndirect-OpExecutionMode-12242
  If a shader is bound to both the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stages, and if both stages contain an `OpExecutionMode` instruction specifying the output patch size, they must be the same

- VUID-vkCmdDrawIndexedIndirect-buffer-02708
  If `buffer` is non-sparse then it must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-vkCmdDrawIndexedIndirect-buffer-02709
  `buffer` must have been created with the VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT usage flag set

- VUID-vkCmdDrawIndexedIndirect-offset-02710
  `offset` must be a multiple of `4`

- VUID-vkCmdDrawIndexedIndirect-commandBuffer-02711
  `commandBuffer` must not be a protected command buffer

- VUID-vkCmdDrawIndexedIndirect-drawCount-02718
  If the `multiDrawIndirect` feature is not enabled, `drawCount` must be `0` or `1`

- VUID-vkCmdDrawIndexedIndirect-drawCount-02719
  `drawCount` must be less than or equal to `VkPhysicalDeviceLimits`::`maxDrawIndirectCount`

- VUID-vkCmdDrawIndexedIndirect-None-07312
  If the `maintenance6` feature is not enabled, a valid index buffer must be bound

- VUID-vkCmdDrawIndexedIndirect-primitiveRestartIndex-12401
  If the primitive restart index for this draw operation was set with vkCmdSetPrimitiveRestartIndexEXT, then `primitiveRestartIndex` must not be greater than the maximum representable value for the bound VkIndexType

- VUID-vkCmdDrawIndexedIndirect-drawCount-00528
  If `drawCount` is greater than `1`, `stride` must be a multiple of `4` and must be greater than or equal to `sizeof`(`VkDrawIndexedIndirectCommand`)

- VUID-vkCmdDrawIndexedIndirect-drawCount-00539
  If `drawCount` is equal to `1`, (`offset` + `sizeof`(`VkDrawIndexedIndirectCommand`)) must be less than or equal to the size of `buffer`

- VUID-vkCmdDrawIndexedIndirect-drawCount-00540
  If `drawCount` is greater than `1`, (`stride` × (`drawCount` - 1) + `offset` + `sizeof`(`VkDrawIndexedIndirectCommand`)) must be less than or equal to the size of `buffer`

Valid Usage (Implicit)

- VUID-vkCmdDrawIndexedIndirect-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdDrawIndexedIndirect-buffer-parameter
  `buffer` must be a valid VkBuffer handle

- VUID-vkCmdDrawIndexedIndirect-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdDrawIndexedIndirect-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdDrawIndexedIndirect-renderpass
  This command must only be called inside of a render pass instance

- VUID-vkCmdDrawIndexedIndirect-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdDrawIndexedIndirect-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdDrawIndexedIndirect-commonparent
  Both of `buffer`, and `commandBuffer` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Inside | Outside | VK_QUEUE_GRAPHICS_BIT | Action

Conditional Rendering

vkCmdDrawIndexedIndirect is affected by conditional rendering

The `VkDrawIndexedIndirectCommand` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkDrawIndexedIndirectCommand {
        uint32_t    indexCount;
        uint32_t    instanceCount;
        uint32_t    firstIndex;
        int32_t     vertexOffset;
        uint32_t    firstInstance;
    } VkDrawIndexedIndirectCommand;

- `indexCount` is the number of vertices to draw.

- `instanceCount` is the number of instances to draw.

- `firstIndex` is the base index within the index buffer.

- `vertexOffset` is the value added to the vertex index before indexing into the vertex buffer.

- `firstInstance` is the instance ID of the first instance to draw.

The members of `VkDrawIndexedIndirectCommand` have the same meaning as the similarly named parameters of vkCmdDrawIndexed.

Valid Usage

- VUID-VkDrawIndexedIndirectCommand-pNext-09461
  If the bound graphics pipeline state was created with VkPipelineVertexInputDivisorStateCreateInfo in the `pNext` chain of VkGraphicsPipelineCreateInfo::`pVertexInputState`, any member of VkPipelineVertexInputDivisorStateCreateInfo::`pVertexBindingDivisors` has a value other than `1` in `divisor`, and VkPhysicalDeviceVertexAttributeDivisorProperties::`supportsNonZeroFirstInstance` is VK_FALSE, then `firstInstance` must be `0`

- VUID-VkDrawIndexedIndirectCommand-None-09462
  If shader objects are used for drawing or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled, any member of the `pVertexBindingDescriptions` parameter to the vkCmdSetVertexInputEXT call that sets this dynamic state has a value other than `1` in `divisor`, and VkPhysicalDeviceVertexAttributeDivisorProperties::`supportsNonZeroFirstInstance` is VK_FALSE, then `firstInstance` must be `0`

- VUID-VkDrawIndexedIndirectCommand-robustBufferAccess2-08798
  If the `robustBufferAccess2` feature is not enabled, (`indexSize` × (`firstIndex` + `indexCount`)) must be less than or equal to the size of the bound index buffer range, with `indexSize` being based on the type specified by `indexType`, and the other parameters sourced from this command

- VUID-VkDrawIndexedIndirectCommand-firstInstance-00554
  If the `drawIndirectFirstInstance` feature is not enabled, `firstInstance` must be `0`

To record a non-indexed indirect drawing command, call:

    // Provided by VK_KHR_device_address_commands with VK_KHR_draw_indirect_count or VK_VERSION_1_2
    void vkCmdDrawIndexedIndirectCount2KHR(
        VkCommandBuffer                             commandBuffer,
        const VkDrawIndirectCount2InfoKHR*          pInfo);

- `commandBuffer` is the command buffer into which the command is recorded.

- `pInfo` is a pointer to a VkDrawIndirectCount2InfoKHR structure defining parameters of this command.

`vkCmdDrawIndexedIndirectCount2KHR` behaves similarly to vkCmdDrawIndexedIndirect2KHR except that the draw count is read by the device from an address range during execution. The command will read an unsigned 32-bit integer from `pInfo->countAddressRange` and use this as the draw count.

Valid Usage

- VUID-vkCmdDrawIndexedIndirectCount2KHR-magFilter-04553
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdDrawIndexedIndirectCount2KHR-magFilter-09598
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdDrawIndexedIndirectCount2KHR-mipmapMode-04770
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdDrawIndexedIndirectCount2KHR-mipmapMode-09599
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdDrawIndexedIndirectCount2KHR-unnormalizedCoordinates-09635
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `levelCount` and `layerCount` must be 1

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-08609
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `viewType` must be VK_IMAGE_VIEW_TYPE_1D or VK_IMAGE_VIEW_TYPE_2D

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-08610
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions with `ImplicitLod`, `Dref` or `Proj` in their name

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-08611
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions that includes a LOD bias or any offset values

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-06479
  If a VkImageView is sampled with depth comparison, the image view’s format features must contain VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-02691
  If a VkImageView is accessed using atomic operations as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-07888
  If a VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER descriptor is accessed using atomic operations as a result of this command, then the storage texel buffer’s format features must contain VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-02692
  If a VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-02693
  If the VK_EXT_filter_cubic extension is not enabled and any VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, it must not have a VkImageViewType of VK_IMAGE_VIEW_TYPE_3D, VK_IMAGE_VIEW_TYPE_CUBE, or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY

- VUID-vkCmdDrawIndexedIndirectCount2KHR-filterCubic-02694
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have a VkImageViewType and format that supports cubic filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubic` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdDrawIndexedIndirectCount2KHR-filterCubicMinmax-02695
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX as a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubicMinmax` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdDrawIndexedIndirectCount2KHR-cubicRangeClamp-09212
  If the `cubicRangeClamp` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must not have a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM

- VUID-vkCmdDrawIndexedIndirectCount2KHR-reductionMode-09213
  Any VkImageView being sampled with a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM as a result of this command must sample with VK_FILTER_CUBIC_EXT

- VUID-vkCmdDrawIndexedIndirectCount2KHR-selectableCubicWeights-09214
  If the `selectableCubicWeights` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have VkSamplerCubicWeightsCreateInfoQCOM::`cubicWeights` equal to VK_CUBIC_FILTER_WEIGHTS_CATMULL_ROM_QCOM

- VUID-vkCmdDrawIndexedIndirectCount2KHR-flags-02696
  Any VkImage created with a VkImageCreateInfo::`flags` containing VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV sampled as a result of this command must only be sampled using a VkSamplerAddressMode of VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawIndexedIndirectCount2KHR-OpTypeImage-07027
  For any VkImageView being written as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawIndexedIndirectCount2KHR-OpTypeImage-07028
  For any VkImageView being read as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawIndexedIndirectCount2KHR-OpTypeImage-07029
  For any VkBufferView being written as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown`, the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawIndexedIndirectCount2KHR-OpTypeImage-07030
  Any VkBufferView being read as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown` then the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-08600
  If a a bound shader was created with a pipeline layout and statically uses a set n, a descriptor set must have been bound to n at the same pipeline bind point, with layouts compatible for set n with the layout(s) used to create the shader, as described in Pipeline Layout Compatibility

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-08601
  If a a bound shader was created with a pipeline layout or specified push constant ranges and statically uses a push constant value, that value must have been set for the same pipeline bind point, with push constant ranges that are compatible with the push constant range used to create the shader

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-10068
  For each array of resources that is used by a bound shader, the indices used to access members of the array must be less than the descriptor count for the identified binding in the descriptor sets used by this command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-08114
  Descriptors in each bound descriptor set, specified via vkCmdBindDescriptorSets, must be valid if they are accessed as described by descriptor validity by the VkPipeline bound to the pipeline bind point used by this command and the bound VkPipeline was not created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawIndexedIndirectCount2KHR-imageLayout-00344
  If an image descriptor is accessed by a shader, the VkImageLayout must match the subresource accessible from the VkImageView as defined by the image layout matching rules

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-08115
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdBindDescriptorSets, the bound VkPipeline must have been created without VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-08116
  Descriptors in bound descriptor buffers, specified via vkCmdSetDescriptorBufferOffsetsEXT, must be valid if they are dynamically accessed

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-08117
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdSetDescriptorBufferOffsetsEXT, the bound VkPipeline must have been created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-08119
  If a descriptor is dynamically used with a VkPipeline created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-08605
  If a descriptor is dynamically used with a VkShaderEXT created with a `VkDescriptorSetLayout` that was created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-08606
  If the `shaderObject` feature is not enabled, a valid pipeline must be bound to the pipeline bind point used by this command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-08608
  If a pipeline is bound to the pipeline bind point used by this command, there must not have been any calls to dynamic state setting commands for any state specified statically in the VkPipeline object bound to the pipeline bind point used by this command, since that pipeline was bound

- VUID-vkCmdDrawIndexedIndirectCount2KHR-uniformBuffers-06935
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-08612
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawIndexedIndirectCount2KHR-storageBuffers-06936
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-08613
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a storage buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawIndexedIndirectCount2KHR-commandBuffer-02707
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, any resource accessed by bound shaders must not be a protected resource

- VUID-vkCmdDrawIndexedIndirectCount2KHR-viewType-07752
  If a VkImageView is accessed as a result of this command, then the image view’s `viewType` must match the `Dim` operand of the `OpTypeImage` as described in Compatibility Between SPIR-V Image Dimensions and Vulkan ImageView Types

- VUID-vkCmdDrawIndexedIndirectCount2KHR-format-07753
  If a VkImageView or VkBufferView is accessed as a result of this command, then the numeric type of the view’s `format` and the `Sampled` `Type` operand of the `OpTypeImage` must match

- VUID-vkCmdDrawIndexedIndirectCount2KHR-OpImageWrite-08795
  If a VkImageView created with a format other than VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the image view’s format

- VUID-vkCmdDrawIndexedIndirectCount2KHR-OpImageWrite-08796
  If a VkImageView created with the format VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have four components

- VUID-vkCmdDrawIndexedIndirectCount2KHR-OpImageWrite-04469
  If a VkBufferView is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the buffer view’s format

- VUID-vkCmdDrawIndexedIndirectCount2KHR-SampledType-04470
  If a VkImageView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdDrawIndexedIndirectCount2KHR-SampledType-04471
  If a VkImageView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdDrawIndexedIndirectCount2KHR-SampledType-04472
  If a VkBufferView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdDrawIndexedIndirectCount2KHR-SampledType-04473
  If a VkBufferView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdDrawIndexedIndirectCount2KHR-sparseImageInt64Atomics-04474
  If the `sparseImageInt64Atomics` feature is not enabled, VkImage objects created with the VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-sparseImageInt64Atomics-04475
  If the `sparseImageInt64Atomics` feature is not enabled, VkBuffer objects created with the VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-OpImageSampleWeightedQCOM-06971
  If `OpImageSampleWeightedQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_SAMPLED_IMAGE_BIT_QCOM

- VUID-vkCmdDrawIndexedIndirectCount2KHR-OpImageSampleWeightedQCOM-06972
  If `OpImageSampleWeightedQCOM` uses a VkImageView as a sample weight image as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_IMAGE_BIT_QCOM

- VUID-vkCmdDrawIndexedIndirectCount2KHR-OpImageBoxFilterQCOM-06973
  If `OpImageBoxFilterQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BOX_FILTER_SAMPLED_BIT_QCOM

- VUID-vkCmdDrawIndexedIndirectCount2KHR-OpImageBlockMatchSSDQCOM-06974
  If `OpImageBlockMatchSSDQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdDrawIndexedIndirectCount2KHR-OpImageBlockMatchSADQCOM-12420
  If `OpImageBlockMatchSADQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdDrawIndexedIndirectCount2KHR-OpImageBlockMatchSADQCOM-06976
  If `OpImageBlockMatchSADQCOM` or OpImageBlockMatchSSDQCOM is used to read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdDrawIndexedIndirectCount2KHR-OpImageSampleWeightedQCOM-06977
  If `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdDrawIndexedIndirectCount2KHR-OpImageSampleWeightedQCOM-06978
  If any command other than `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must not have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdDrawIndexedIndirectCount2KHR-OpImageBlockMatchWindow-09215
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM

- VUID-vkCmdDrawIndexedIndirectCount2KHR-OpImageBlockMatchWindow-09216
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format must be a single-component format

- VUID-vkCmdDrawIndexedIndirectCount2KHR-OpImageBlockMatchWindow-09217
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdDrawIndexedIndirectCount2KHR-OpImageBlockMatchWindow-12421
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the `blockMatchExtendedClampToEdge` feature is not enabled, the input sampler must not have been created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawIndexedIndirectCount2KHR-addressModeU-12422
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the input sampler was created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, then the sampler must have been created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-07288
  Any shader invocation executed by this command must terminate

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-09600
  If a descriptor with type equal to any of VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, or VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT is accessed as a result of this command, all image subresources identified by that descriptor must be in the image layout identified when the descriptor was written

- VUID-vkCmdDrawIndexedIndirectCount2KHR-micromap-11636
  If an acceleration structure is accessed as a result of this command through an `OpRayQueryProceedKHR` operation , the `VK_EXT_opacity_micromap` extension is not enabled, and the acceleration structure is built using geometry with a VkAccelerationStructureTrianglesOpacityMicromapKHR structure included in its `pNext` chain, the shader must have specified a `OpacityMicromapIdKHR` execution mode with its specialization constant operand equal to VK_TRUE

- VUID-vkCmdDrawIndexedIndirectCount2KHR-micromap-11637
  If an acceleration structure is accessed as a result of this command and the acceleration structure was constructed through deserialization, all micromap arrays referenced by the acceleration structure that were not replaced by an acceleration structure update command must have been deserialized using the serialized data of the corresponding micromaps used to originally build the acceleration structure prior to the execution of this command on the device

- VUID-vkCmdDrawIndexedIndirectCount2KHR-micromap-11638
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkPipeline bound to the pipeline bind point used by this command must not have been created with `flags` that includes VK_PIPELINE_CREATE_2_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_KHR

- VUID-vkCmdDrawIndexedIndirectCount2KHR-micromap-11639
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkShaderEXT that accessed the descriptor must not have been created with `flags` that includes VK_SHADER_CREATE_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_EXT

- VUID-vkCmdDrawIndexedIndirectCount2KHR-commandBuffer-10746
  The `VkDeviceMemory` object allocated from a `VkMemoryHeap` with the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property that is bound to a resource accessed as a result of this command must be the active bound tile memory object in `commandBuffer`

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-10678
  If this command is recorded inside a tile shading render pass instance, the stages corresponding to the pipeline bind point used by this command must only include VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_FRAGMENT_BIT, and/or VK_SHADER_STAGE_COMPUTE_BIT

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-10679
  If this command is recorded where per-tile execution model is enabled, there must be no access to any image while the image was be transitioned to the VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT layout

- VUID-vkCmdDrawIndexedIndirectCount2KHR-pDescription-09900
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the underlying VkTensorARM object must have been created with the VK_TENSOR_USAGE_SHADER_BIT_ARM usage flag set

- VUID-vkCmdDrawIndexedIndirectCount2KHR-dimensionCount-09905
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the `Rank` of the `OpTypeTensorARM` of the tensor resource variable must be equal to the `dimensionCount` provided via VkTensorCreateInfoARM::`pDescription` when creating the underlying VkTensorARM object

- VUID-vkCmdDrawIndexedIndirectCount2KHR-OpTypeTensorARM-09906
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the element type of the `OpTypeTensorARM` of the tensor resource variable must be compatible with the VkFormat of the VkTensorViewARM used for the access

- VUID-vkCmdDrawIndexedIndirectCount2KHR-OpTensorReadARM-12462
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, using `OpTensorReadARM` or `OpTensorWriteARM`, and the underlying VkTensorARM object was created with a VK_TENSOR_TILING_BRICK_16_WIDE_ARM, VK_TENSOR_TILING_BRICK_8_WIDE_ARM, VK_TENSOR_TILING_BRICK_4_WIDE_ARM, VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_ARM, or VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_64K_ARM VkTensorTilingARM, and the object read or written is an array, then the innermost coordinate provided to `OpTensorReadARM` or `OpTensorWriteARM` via the `Coordinates` operand must be a multiple of the largest power of 2 that is less than or equal to the number of components of the array

- VUID-vkCmdDrawIndexedIndirectCount2KHR-pNext-12463
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command and the corresponding VkTensorARM object was created with a VkTensorRollingBackingCreateInfoARM structure in the `pNext` chain of VkTensorCreateInfoARM, then the number of elements accessed with one `OpTensorReadARM` or `OpTensorWriteARM`, must be less than or equal to the number of elements available from the starting coordinate in the rolling backing along the innermost dimension, defined as `wraps`[`dimensionCount` - 1] - InnermostCoordinate % `wraps`[`dimensionCount` - 1] where InnermostCoordinate is the last component of the coordinates array provided via the `Coordinates` operand

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-12472
  Descriptors dynamically accessed in bound descriptor heaps must be valid

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-11297
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a `OpTypeStruct` decorated with `Block` or `BufferBlock` using that mapping, the calculated offset for the resource heap must be a multiple of `bufferDescriptorAlignment`

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-11298
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeImage` or `OpTypeSampledImage` using that mapping, the calculated offset for the resource heap must be a multiple of `imageDescriptorAlignment`

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-11299
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeSampler` or `OpTypeSampledImage` using that mapping, the calculated offset for the sampler heap must be a multiple of `samplerDescriptorAlignment`

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-11397
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeTensorARM` using that mapping, the calculated offset for the resource heap must be a multiple of `tensorDescriptorAlignment`

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-11300
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 4

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-11301
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-11302
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-11304
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 8

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-11305
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-11306
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address pointed to by the address in push data must be a valid VkDeviceAddress

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-11308
  For each descriptor heap that is statically used by a bound shader, either directly or via a descriptor mapping, a valid descriptor heap must be bound

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-11309
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, execution of this command must not result in any descriptor read accessing data outside of the user range of the respective heap bound by `vkCmdBind*HeapEXT` commands

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-11372
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer or uniform texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified via VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-11373
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer or storage texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-11374
  If the `robustBufferAccess2` feature is not enabled, the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, uniform texel buffer, storage buffer, or storage texel buffer, that shader must not access values outside of the range of the buffer as specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawIndexedIndirectCount2KHR-pBindInfo-11375
  If any bound shader uses an embedded sampler via a descriptor mapping, the value of `pBindInfo->reservedRangeSize` set for vkCmdBindSamplerHeapEXT must be greater than or equal to `minSamplerHeapReservedRangeWithEmbedded`

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-11376
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, and that shader statically uses a push constant value, that value must have been set by vkCmdPushDataEXT

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-11398
  If a bound shader was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the access must not be out of bounds

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-11437
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the buffer from which the address in push data was queried must have been created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-11438
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-11441
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must be aligned to `minUniformBufferOffsetAlignment`

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-11439
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_STORAGE_BUFFER_BIT usage flag set

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-11442
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must be aligned to `minStorageBufferOffsetAlignment`

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-11485
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses an acceleration structure using that mapping, the address that the acceleration structure is mapped to must be an acceleration structure address retrieved from a VkAccelerationStructureKHR object via vkGetAccelerationStructureDeviceAddressKHR or handle retrieved from a VkAccelerationStructureNV object via vkGetAccelerationStructureHandleNV

- VUID-vkCmdDrawIndexedIndirectCount2KHR-index-11450
  If a shader uses a sampler descriptor to sample an image as a result of this command, and that sampler descriptor uses a custom border color with an index defined by VkSamplerCustomBorderColorIndexCreateInfoEXT, the value of VkSamplerCustomBorderColorIndexCreateInfoEXT::`index` must have been registered before this command was recorded, and still be registered during the sampling operation, with an identically defined color

- VUID-vkCmdDrawIndexedIndirectCount2KHR-protectedNoFault-11455
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, the address that the resource is mapped to must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdDrawIndexedIndirectCount2KHR-protectedNoFault-11456
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, the address of the indirect memory must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdDrawIndexedIndirectCount2KHR-renderPass-02684
  The current render pass must be compatible with the `renderPass` member of the `VkGraphicsPipelineCreateInfo` structure specified when creating the `VkPipeline` bound to VK_PIPELINE_BIND_POINT_GRAPHICS

- VUID-vkCmdDrawIndexedIndirectCount2KHR-subpass-02685
  The subpass index of the current render pass must be equal to the `subpass` member of the `VkGraphicsPipelineCreateInfo` structure specified when creating the `VkPipeline` bound to VK_PIPELINE_BIND_POINT_GRAPHICS

- VUID-vkCmdDrawIndexedIndirectCount2KHR-OpTypeImage-07468
  If any shader executed by this pipeline accesses an `OpTypeImage` variable with a `Dim` operand of `SubpassData`, it must be decorated with an `InputAttachmentIndex` that corresponds to a valid input attachment in the current subpass

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-07469
  Input attachment views accessed in a subpass must be created with the same VkFormat as the corresponding subpass definition, and be created with a VkImageView that is compatible with the attachment referenced by the subpass' `pInputAttachments`[`InputAttachmentIndex`] in the bound VkFramebuffer as specified by Fragment Input Attachment Compatibility

- VUID-vkCmdDrawIndexedIndirectCount2KHR-pDepthInputAttachmentIndex-09595
  Input attachment views accessed in a dynamic render pass with a `InputAttachmentIndex` referenced by VkRenderingInputAttachmentIndexInfo, or no `InputAttachmentIndex` if VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` or VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` are `NULL`, must be created with a VkImageView that is compatible with the corresponding color, depth, or stencil attachment in VkRenderingInfo

- VUID-vkCmdDrawIndexedIndirectCount2KHR-pDepthInputAttachmentIndex-09596
  Input attachment views accessed in a dynamic render pass via a shader object must have an `InputAttachmentIndex` if both VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` and VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` are non-`NULL`

- VUID-vkCmdDrawIndexedIndirectCount2KHR-InputAttachmentIndex-09597
  If an input attachment view accessed in a dynamic render pass via a shader object has an `InputAttachmentIndex`, the `InputAttachmentIndex` must match an index in VkRenderingInputAttachmentIndexInfo

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-06537
  Memory backing image subresources used as attachments in the current render pass must not be written in any way other than as an attachment by this command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-10795
  If a color attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_COLOR_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-10796
  If a depth attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_DEPTH_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-10797
  If a stencil attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_STENCIL_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-12338
  If a color attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_COLOR_BIT on that attachment, the color attachment must not be written to by this command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-12339
  If a depth attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_DEPTH_BIT on that attachment, the depth attachment must not be written to by this command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-12340
  If a stencil attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_STENCIL_BIT on that attachment, the stencil attachment must not be written to by this command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-09003
  If an attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, it must not be accessed in any way other than as an attachment, storage image, or sampled image by this command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-06886
  If the current render pass instance uses a depth/stencil attachment with a read-only layout for the depth aspect, depth writes must be disabled

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-06887
  If the current render pass instance uses a depth/stencil attachment with a read-only layout for the stencil aspect, both front and back `writeMask` are not zero, and stencil test is enabled, all stencil ops must be VK_STENCIL_OP_KEEP

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-07831
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT dynamic state enabled then vkCmdSetViewport must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-07832
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SCISSOR dynamic state enabled then vkCmdSetScissor must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-08617
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_WIDTH dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineWidth must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-07834
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BIAS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthBiasEnable` is VK_TRUE, then vkCmdSetDepthBias or vkCmdSetDepthBias2EXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-07835
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_BLEND_CONSTANTS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and an active color attachment current value of `blendEnable` is VK_TRUE with a blend equations where any VkBlendFactor member is VK_BLEND_FACTOR_CONSTANT_COLOR, VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR, VK_BLEND_FACTOR_CONSTANT_ALPHA, or VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA, then vkCmdSetBlendConstants must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-07836
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BOUNDS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthBoundsTestEnable` is VK_TRUE, then vkCmdSetDepthBounds must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-07837
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilCompareMask must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-07838
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_WRITE_MASK dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilWriteMask must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-07839
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_REFERENCE dynamic state enabled, the current value of and `rasterizerDiscardEnable` is VK_FALSE, the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilReference must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-maxMultiviewInstanceIndex-02688
  If the draw is recorded in a render pass instance with multiview enabled, the maximum instance index must be less than or equal to VkPhysicalDeviceMultiviewProperties::`maxMultiviewInstanceIndex`

- VUID-vkCmdDrawIndexedIndirectCount2KHR-sampleLocationsEnable-02689
  If the bound graphics pipeline was created with VkPipelineSampleLocationsStateCreateInfoEXT::`sampleLocationsEnable` set to VK_TRUE, then the active depth attachment must have been created with the VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit set

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-07634
  If the `VK_EXT_sample_locations` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetSampleLocationsEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-06666
  If the `VK_EXT_sample_locations` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `sampleLocationsEnable` is VK_TRUE, then vkCmdSetSampleLocationsEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-07840
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_CULL_MODE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCullMode must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-07841
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRONT_FACE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetFrontFace must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-07843
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, vkCmdSetDepthTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-07844
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthTestEnable` is VK_TRUE, then vkCmdSetDepthWriteEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-07845
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_COMPARE_OP dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthTestEnable` is VK_TRUE, then vkCmdSetDepthCompareOp must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-07846
  If the `depthBounds` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthBoundsTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-07847
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetStencilTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-07848
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_OP dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilOp must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-viewportCount-03417
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, and the state is not inherited, then vkCmdSetViewportWithCount must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-scissorCount-03418
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT dynamic state enabled, and the state is not inherited, then vkCmdSetScissorWithCount must have been called and not subsequently invalidated in the current command buffer prior to this drawing

- VUID-vkCmdDrawIndexedIndirectCount2KHR-viewportCount-03419
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with both the VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic states enabled, and the state is not inherited, then the `viewportCount` parameter of `vkCmdSetViewportWithCount` must match the `scissorCount` parameter of `vkCmdSetScissorWithCount`

- VUID-vkCmdDrawIndexedIndirectCount2KHR-viewportCount-04137
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportWScalingStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndexedIndirectCount2KHR-viewportCount-04138
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, the current value of `viewportWScalingEnable` is VK_TRUE, then vkCmdSetViewportWScalingNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-08636
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, the current value of `viewportWScalingEnable` is VK_TRUE, then the `viewportCount` parameter in the last call to vkCmdSetViewportWScalingNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndexedIndirectCount2KHR-viewportCount-04139
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportShadingRateImageStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndexedIndirectCount2KHR-shadingRateImage-09233
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_COARSE_SAMPLE_ORDER_NV and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoarseSampleOrderNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-shadingRateImage-09234
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `shadingRateImageEnable` is VK_TRUE, then vkCmdSetViewportShadingRatePaletteNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-08637
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `shadingRateImageEnable` is VK_TRUE, then the `viewportCount` parameter in the last call to vkCmdSetViewportShadingRatePaletteNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndexedIndirectCount2KHR-VkPipelineVieportCreateInfo-04141
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled and a VkPipelineViewportSwizzleStateCreateInfoNV structure chained from VkPipelineViewportStateCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportSwizzleStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndexedIndirectCount2KHR-VkPipelineVieportCreateInfo-04142
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled and a VkPipelineViewportExclusiveScissorStateCreateInfoNV structure chained from VkPipelineViewportStateCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportExclusiveScissorStateCreateInfoNV::`exclusiveScissorCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-07878
  If the `exclusiveScissor` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_ENABLE_NV dynamic state enabled, then vkCmdSetExclusiveScissorEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-07879
  If the `exclusiveScissor` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_NV dynamic state enabled, and the most recent call to vkCmdSetExclusiveScissorEnableNV in the current command buffer set any element of `pExclusiveScissorEnables` to VK_TRUE, then vkCmdSetExclusiveScissorNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-04876
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE dynamic state enabled, then vkCmdSetRasterizerDiscardEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-04877
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthBiasEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-logicOp-04878
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LOGIC_OP_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `logicOpEnable` is VK_TRUE, then vkCmdSetLogicOpEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-primitiveFragmentShadingRateWithMultipleViewports-04552
  If the `primitiveFragmentShadingRateWithMultipleViewports` limit is not supported, the bound graphics pipeline was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, and any of the shader stages of the bound graphics pipeline write to the `PrimitiveShadingRateKHR` built-in, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and the `viewportCount` parameter of `vkCmdSetViewportWithCount` must be `1`

- VUID-vkCmdDrawIndexedIndirectCount2KHR-primitiveFragmentShadingRateWithMultipleViewports-08642
  If the `primitiveFragmentShadingRateWithMultipleViewports` limit is not supported, and any shader object bound to a graphics stage writes to the `PrimitiveShadingRateKHR` built-in, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and the `viewportCount` parameter of `vkCmdSetViewportWithCount` must be `1`

- VUID-vkCmdDrawIndexedIndirectCount2KHR-blendEnable-04727
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, then for each color attachment, if the corresponding image view’s format features do not contain VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT, then the corresponding current value of `blendEnable` must be VK_FALSE

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-08644
  If a shader object is bound to any graphics stage or a graphics pipeline is bound, the current value of `rasterizerDiscardEnable` is VK_FALSE, and none of the following is enabled:

  - the `VK_AMD_mixed_attachment_samples` extension

  - the `VK_NV_framebuffer_mixed_samples` extension

  - the `multisampledRenderToSingleSampled` feature

  then the current value of `rasterizationSamples` must be the same as the current color and/or depth/stencil attachments

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-08876
  If a shader object is bound to any graphics stage, the current render pass instance must have been begun with vkCmdBeginRendering

- VUID-vkCmdDrawIndexedIndirectCount2KHR-imageView-06172
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawIndexedIndirectCount2KHR-imageView-06173
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawIndexedIndirectCount2KHR-imageView-06174
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawIndexedIndirectCount2KHR-imageView-06175
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawIndexedIndirectCount2KHR-imageView-06176
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawIndexedIndirectCount2KHR-imageView-06177
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawIndexedIndirectCount2KHR-viewMask-06178
  If the current render pass instance was begun with vkCmdBeginRendering, the bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::`viewMask` equal to VkRenderingInfo::`viewMask`

- VUID-vkCmdDrawIndexedIndirectCount2KHR-colorAttachmentCount-06179
  If the `dynamicRenderingUnusedAttachments` feature is not enabled and the current render pass instance was begun with vkCmdBeginRendering, the bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::`colorAttachmentCount` equal to VkRenderingInfo::`colorAttachmentCount`

- VUID-vkCmdDrawIndexedIndirectCount2KHR-dynamicRenderingUnusedAttachments-08910
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound graphics pipeline

- VUID-vkCmdDrawIndexedIndirectCount2KHR-dynamicRenderingUnusedAttachments-08912
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` equal to VK_NULL_HANDLE must have the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound pipeline equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirectCount2KHR-dynamicRenderingUnusedAttachments-08911
  If the `dynamicRenderingUnusedAttachments` feature is enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound graphics pipeline, or the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats`, if it exists, must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirectCount2KHR-colorAttachmentCount-09362
  If the current render pass instance was begun with vkCmdBeginRendering, with a VkRenderingInfo::`colorAttachmentCount` equal to `1`, there is no shader object bound to any graphics stage, and a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, each element of the VkRenderingInfo::`pColorAttachments` array with a `resolveImageView` not equal to VK_NULL_HANDLE must have been created with an image created with a VkExternalFormatANDROID::`externalFormat` value equal to the VkExternalFormatANDROID::`externalFormat` value used to create the bound graphics pipeline

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-09363
  If there is no shader object bound to any graphics stage, the current render pass instance was begun with vkCmdBeginRendering and a VkRenderingInfo::`colorAttachmentCount` equal to `1`, and a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with an image created with a VkExternalFormatANDROID::`externalFormat` value equal to the VkExternalFormatANDROID::`externalFormat` value used to create the bound graphics pipeline

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-09364
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetColorBlendEnableEXT must have set the blend enable to VK_FALSE prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-09365
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetRasterizationSamplesEXT must have set `rasterizationSamples` to VK_SAMPLE_COUNT_1_BIT prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-09368
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetFragmentShadingRateKHR must have set `pFragmentSize->width` to `1` prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-09369
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetFragmentShadingRateKHR must have set `pFragmentSize->height` to `1` prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-07749
  If the `colorWriteEnable` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorWriteEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-attachmentCount-07750
  If the `colorWriteEnable` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the `attachmentCount` parameter of most recent call to `vkCmdSetColorWriteEnableEXT` in the current command buffer must be greater than or equal to the number of active color attachments

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-07751
  If the `VK_EXT_discard_rectangles` extension is enabled, a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT dynamic state enabled and the `pNext` chain of VkGraphicsPipelineCreateInfo included a VkPipelineDiscardRectangleStateCreateInfoEXT structure, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for each discard rectangle in VkPipelineDiscardRectangleStateCreateInfoEXT::`discardRectangleCount`

- VUID-vkCmdDrawIndexedIndirectCount2KHR-rasterizerDiscardEnable-09236
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT dynamic state enabled and the `pNext` chain of VkGraphicsPipelineCreateInfo did not include a VkPipelineDiscardRectangleStateCreateInfoEXT structure, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for each discard rectangle in VkPhysicalDeviceDiscardRectanglePropertiesEXT::`maxDiscardRectangles`

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-07880
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDiscardRectangleEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-07881
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_MODE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-dynamicRenderingUnusedAttachments-08913
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->imageView` was VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirectCount2KHR-dynamicRenderingUnusedAttachments-08914
  If current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawIndexedIndirectCount2KHR-dynamicRenderingUnusedAttachments-08915
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, and the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->imageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirectCount2KHR-dynamicRenderingUnusedAttachments-08916
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->imageView` was VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirectCount2KHR-dynamicRenderingUnusedAttachments-08917
  If current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawIndexedIndirectCount2KHR-dynamicRenderingUnusedAttachments-08918
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, and the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->imageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirectCount2KHR-imageView-06183
  If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentShadingRateAttachmentInfoKHR::`imageView` was not VK_NULL_HANDLE, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

- VUID-vkCmdDrawIndexedIndirectCount2KHR-dynamicRenderingLocalRead-11797
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingLocalRead` feature is enabled, the VK_RENDERING_LOCAL_READ_CONCURRENT_ACCESS_CONTROL_BIT_KHR flag is specified, and an attachment is being used as a feedback loop as specified by VK_RENDERING_ATTACHMENT_INPUT_ATTACHMENT_FEEDBACK_BIT_KHR, VkRenderingAttachmentFlagsInfoKHR::`flags` for that attachment must include VK_RENDERING_ATTACHMENT_INPUT_ATTACHMENT_FEEDBACK_BIT_KHR

- VUID-vkCmdDrawIndexedIndirectCount2KHR-imageView-06184
  If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentDensityMapAttachmentInfoEXT::`imageView` was not VK_NULL_HANDLE, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT

- VUID-vkCmdDrawIndexedIndirectCount2KHR-layers-10831
  If the current render pass instance was created with VK_RENDERING_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE or VK_RENDER_PASS_CREATE_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE, and the bound graphics pipeline was created with VK_PIPELINE_CREATE_2_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE, then the current render pass instance must have a `layers` value less than or equal to VkPipelineFragmentDensityMapLayeredCreateInfoVALVE::`maxFragmentDensityMapLayers`

- VUID-vkCmdDrawIndexedIndirectCount2KHR-colorAttachmentCount-06185
  If the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with a sample count equal to the corresponding element of the `pColorAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline

- VUID-vkCmdDrawIndexedIndirectCount2KHR-pDepthAttachment-06186
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of the `depthStencilAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawIndexedIndirectCount2KHR-pStencilAttachment-06187
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of the `depthStencilAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawIndexedIndirectCount2KHR-multisampledRenderToSingleSampled-07285
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with a sample count equal to the value of `rasterizationSamples` for the bound graphics pipeline

- VUID-vkCmdDrawIndexedIndirectCount2KHR-multisampledRenderToSingleSampled-07286
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawIndexedIndirectCount2KHR-multisampledRenderToSingleSampled-07287
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawIndexedIndirectCount2KHR-pNext-07935
  If this command is called inside a render pass instance started with vkCmdBeginRendering, and the `pNext` chain of VkRenderingInfo includes a VkMultisampledRenderToSingleSampledInfoEXT structure with `multisampledRenderToSingleSampledEnable` equal to VK_TRUE, then the value of `rasterizationSamples` for the bound graphics pipeline must be equal to VkMultisampledRenderToSingleSampledInfoEXT::`rasterizationSamples`

- VUID-vkCmdDrawIndexedIndirectCount2KHR-renderPass-06198
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline must have been created with a VkGraphicsPipelineCreateInfo::`renderPass` equal to VK_NULL_HANDLE

- VUID-vkCmdDrawIndexedIndirectCount2KHR-pColorAttachments-08963
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound with a fragment shader that statically writes to a color attachment, the color write mask is not zero, color writes are enabled, and the corresponding element of the VkRenderingInfo::`pColorAttachments->imageView` was not VK_NULL_HANDLE, then the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirectCount2KHR-pColorAttachments-11539
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound with a fragment shader that statically writes to a color attachment, the color write mask is not zero, color writes are enabled, and the corresponding element of the VkRenderingInfo::`pColorAttachments->resolveImageView` was not VK_NULL_HANDLE, then the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirectCount2KHR-pDepthAttachment-08964
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound, depth test is enabled, and the VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, then the VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirectCount2KHR-pDepthAttachment-11540
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound, depth test is enabled, and the VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, then the VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirectCount2KHR-pStencilAttachment-08965
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound, stencil test is enabled and the VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, then the VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirectCount2KHR-pStencilAttachment-11860
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound, stencil test is enabled and the VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, then the VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirectCount2KHR-flags-10582
  If the current render pass instance was begun with a vkCmdBeginRendering call in `commandBuffer`, its VkRenderingInfo::`flags` parameter must not have VK_RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT set unless VK_RENDERING_CONTENTS_INLINE_BIT_KHR is also set

- VUID-vkCmdDrawIndexedIndirectCount2KHR-primitivesGeneratedQueryWithRasterizerDiscard-06708
  If the `primitivesGeneratedQueryWithRasterizerDiscard` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, rasterization discard must not be enabled

- VUID-vkCmdDrawIndexedIndirectCount2KHR-primitivesGeneratedQueryWithNonZeroStreams-06709
  If the `primitivesGeneratedQueryWithNonZeroStreams` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, the bound graphics pipeline must not have been created with a non-zero value in `VkPipelineRasterizationStateStreamCreateInfoEXT`::`rasterizationStream`

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-07620
  If the `depthClamp` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLAMP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthClampEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-07621
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_POLYGON_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetPolygonModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-07622
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetRasterizationSamplesEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-07623
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetSampleMaskEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-alphaToCoverageEnable-08919
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT dynamic state enabled, and `alphaToCoverageEnable` was VK_TRUE in the last call to vkCmdSetAlphaToCoverageEnableEXT, then the Fragment Output Interface must contain a variable for the alpha `Component` word in `Location` 0 at `Index` 0

- VUID-vkCmdDrawIndexedIndirectCount2KHR-alphaToCoverageEnable-08920
  If a shader object is bound to any graphics stage, and the most recent call to vkCmdSetAlphaToCoverageEnableEXT in the current command buffer set `alphaToCoverageEnable` to VK_TRUE, then the Fragment Output Interface must contain a variable for the alpha `Component` word in `Location` 0 at `Index` 0

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-07624
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAlphaToCoverageEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-07625
  If the `alphaToOne` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ALPHA_TO_ONE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAlphaToOneEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-07626
  If the `logicOp` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LOGIC_OP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetLogicOpEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-07627
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and there are color attachments bound, then vkCmdSetColorBlendEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-07629
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and there are color attachments bound, then vkCmdSetColorWriteMaskEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-07630
  If the `geometryStreams` feature is enabled, and a shader object is bound to the VK_SHADER_STAGE_GEOMETRY_BIT stage or a graphics pipeline is bound which was created with both a VK_SHADER_STAGE_GEOMETRY_BIT stage and the VK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXT dynamic state enabled, then vkCmdSetRasterizationStreamEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-07631
  If the `VK_EXT_conservative_rasterization` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_CONSERVATIVE_RASTERIZATION_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetConservativeRasterizationModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-07632
  If the `VK_EXT_conservative_rasterization` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXTRA_PRIMITIVE_OVERESTIMATION_SIZE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `conservativeRasterizationMode` is VK_CONSERVATIVE_RASTERIZATION_MODE_OVERESTIMATE_EXT, then vkCmdSetExtraPrimitiveOverestimationSizeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-conservativePointAndLineRasterization-07499
  If the `VK_EXT_conservative_rasterization` extension is enabled, `conservativePointAndLineRasterization` is not supported, a shader object is bound to any graphics stage or a graphics pipeline is bound, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line or point topology class, then the current value of `conservativeRasterizationMode` must be VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-07633
  If the `depthClipEnable` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLIP_ENABLE_EXT dynamic state, then vkCmdSetDepthClipEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-07636
  If the `VK_EXT_provoking_vertex` extension is enabled, a shader object is bound to the VK_SHADER_STAGE_VERTEX_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_PROVOKING_VERTEX_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetProvokingVertexModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-08666
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineRasterizationModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-08669
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineStippleEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-07849
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled and a shader object is bound to any graphics stage, or a bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stippledLineEnable` is VK_TRUE, then vkCmdSetLineStipple must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-10608
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic state enabled, the effective rasterization input topology is in the line topology class, and the current `lineRasterizationMode` is VK_LINE_RASTERIZATION_MODE_BRESENHAM or VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH, then the current `alphaToCoverageEnable`, `alphaToOneEnable` and `sampleShadingEnable` states must all be VK_FALSE

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-07639
  If the `depthClipControl` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLIP_NEGATIVE_ONE_TO_ONE_EXT dynamic state enabled, then vkCmdSetDepthClipNegativeOneToOneEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-09650
  If the `depthClampControl` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLAMP_RANGE_EXT dynamic state enabled, and the current value of `depthClampEnable` is VK_TRUE, then vkCmdSetDepthClampRangeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-07640
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_ENABLE_NV dynamic state enabled, then vkCmdSetViewportWScalingEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-07641
  If the `VK_NV_viewport_swizzle` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic state enabled, then vkCmdSetViewportSwizzleNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-07642
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageToColorEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-07643
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_LOCATION_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageToColorEnable` is VK_TRUE, then vkCmdSetCoverageToColorLocationNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-07644
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_MODE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageModulationModeNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-07645
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageModulationMode` is any value other than VK_COVERAGE_MODULATION_MODE_NONE_NV, then vkCmdSetCoverageModulationTableEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-07646
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageModulationTableEnable` is VK_TRUE, then vkCmdSetCoverageModulationTableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-07647
  If the `shadingRateImage` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SHADING_RATE_IMAGE_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetShadingRateImageEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-pipelineFragmentShadingRate-09238
  If the `pipelineFragmentShadingRate` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetFragmentShadingRateKHR must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-07648
  If the `representativeFragmentTest` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_REPRESENTATIVE_FRAGMENT_TEST_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetRepresentativeFragmentTestEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-07649
  If the `coverageReductionMode` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageReductionModeNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-rasterizationSamples-07471
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current subpass does not use any color and/or depth/stencil attachments, then the `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT must follow the rules for a zero-attachment subpass

- VUID-vkCmdDrawIndexedIndirectCount2KHR-samples-07472
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state disabled, then the `samples` parameter in the last call to vkCmdSetSampleMaskEXT must be greater or equal to the VkPipelineMultisampleStateCreateInfo::`rasterizationSamples` parameter used to create the bound graphics pipeline

- VUID-vkCmdDrawIndexedIndirectCount2KHR-samples-07473
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT state and VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT states enabled, then the `samples` parameter in the last call to vkCmdSetSampleMaskEXT must be greater or equal to the `rasterizationSamples` parameter in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-09211
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, or a shader object is bound to any graphics stage, and the current render pass instance includes a VkMultisampledRenderToSingleSampledInfoEXT structure with `multisampledRenderToSingleSampledEnable` equal to VK_TRUE, then the `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT must be the same as the `rasterizationSamples` member of that structure

- VUID-vkCmdDrawIndexedIndirectCount2KHR-firstAttachment-07476
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic states enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the last call to vkCmdSetColorBlendEnableEXT in the current command buffer prior to this drawing command must have set a value for all active color attachments

- VUID-vkCmdDrawIndexedIndirectCount2KHR-firstAttachment-07478
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT dynamic states enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the last call to vkCmdSetColorWriteMaskEXT in the current command buffer prior to this drawing command must have set a value for all active color attachments

- VUID-vkCmdDrawIndexedIndirectCount2KHR-advancedBlendMaxColorAttachments-07480
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT and VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic states enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and an active color attachment current value of `blendEnable` is VK_TRUE, then the number of active color attachments must not exceed `advancedBlendMaxColorAttachments`

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-10862
  If a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT , but not the VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorBlendEquationEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawIndexedIndirectCount2KHR-rasterizerDiscardEnable-10863
  If a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT, but not the VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorBlendAdvancedEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-10864
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT and VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then either vkCmdSetColorBlendAdvancedEXT or vkCmdSetColorBlendEquationEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawIndexedIndirectCount2KHR-primitivesGeneratedQueryWithNonZeroStreams-07481
  If the `primitivesGeneratedQueryWithNonZeroStreams` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, and the bound graphics pipeline was created with VK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXT state enabled, the last call to vkCmdSetRasterizationStreamEXT must have set the `rasterizationStream` to zero

- VUID-vkCmdDrawIndexedIndirectCount2KHR-sampleLocationsPerPixel-07482
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state disabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then the `sampleLocationsPerPixel` member of `pSampleLocationsInfo` in the last call to vkCmdSetSampleLocationsEXT must equal the `rasterizationSamples` member of the VkPipelineMultisampleStateCreateInfo structure the bound graphics pipeline has been created with

- VUID-vkCmdDrawIndexedIndirectCount2KHR-sampleLocationsPerPixel-07483
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then the `sampleLocationsPerPixel` member of `pSampleLocationsInfo` in the last call to vkCmdSetSampleLocationsEXT must equal the `rasterizationSamples` parameter of the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawIndexedIndirectCount2KHR-sampleLocationsEnable-07484
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT then the current active depth attachment must have been created with the VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit set

- VUID-vkCmdDrawIndexedIndirectCount2KHR-sampleLocationsEnable-07485
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, then the `sampleLocationsInfo.maxSampleLocationGridSize.width` in the last call to vkCmdSetSampleLocationsEXT must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.width` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling `rasterizationSamples`

- VUID-vkCmdDrawIndexedIndirectCount2KHR-sampleLocationsEnable-07486
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, then the `sampleLocationsInfo.maxSampleLocationGridSize.height` in the last call to vkCmdSetSampleLocationsEXT must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.height` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling `rasterizationSamples`

- VUID-vkCmdDrawIndexedIndirectCount2KHR-sampleLocationsEnable-07487
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, the fragment shader code must not statically use the extended instruction `InterpolateAtSample`

- VUID-vkCmdDrawIndexedIndirectCount2KHR-sampleLocationsEnable-07936
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationGridSize.width` must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.width` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling the value of `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawIndexedIndirectCount2KHR-sampleLocationsEnable-07937
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationGridSize.height` must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.height` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling the value of `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawIndexedIndirectCount2KHR-sampleLocationsEnable-07938
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationsPerPixel` must equal `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawIndexedIndirectCount2KHR-coverageModulationTableEnable-07488
  If a shader object is bound to any graphics stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NV state enabled, and the last call to vkCmdSetCoverageModulationTableEnableNV set `coverageModulationTableEnable` to VK_TRUE, then the `coverageModulationTableCount` parameter in the last call to vkCmdSetCoverageModulationTableNV must equal the current `rasterizationSamples` divided by the number of color samples in the current active color attachment

- VUID-vkCmdDrawIndexedIndirectCount2KHR-rasterizationSamples-07489
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, and if current subpass has a depth/stencil attachment and depth test, stencil test, or depth bounds test are enabled in the bound pipeline, then the current `rasterizationSamples` must be the same as the sample count of the depth/stencil attachment

- VUID-vkCmdDrawIndexedIndirectCount2KHR-coverageToColorEnable-07490
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV state enabled and the last call to vkCmdSetCoverageToColorEnableNV set the `coverageToColorEnable` to VK_TRUE, then there must be an active color attachment at the location selected by the last call to vkCmdSetCoverageToColorLocationNV `coverageToColorLocation`, with a VkFormat of VK_FORMAT_R8_UINT, VK_FORMAT_R8_SINT, VK_FORMAT_R16_UINT, VK_FORMAT_R16_SINT, VK_FORMAT_R32_UINT, or VK_FORMAT_R32_SINT

- VUID-vkCmdDrawIndexedIndirectCount2KHR-rasterizerDiscardEnable-09420
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, and a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, and the most recent call to vkCmdSetRasterizerDiscardEnable in the current command buffer set `rasterizerDiscardEnable` to VK_FALSE, and the last call to vkCmdSetCoverageToColorEnableNV set the `coverageToColorEnable` to VK_TRUE, then there must be an active color attachment at the location selected by the last call to vkCmdSetCoverageToColorLocationNV `coverageToColorLocation`, with a VkFormat of VK_FORMAT_R8_UINT, VK_FORMAT_R8_SINT, VK_FORMAT_R16_UINT, VK_FORMAT_R16_SINT, VK_FORMAT_R32_UINT, or VK_FORMAT_R32_SINT

- VUID-vkCmdDrawIndexedIndirectCount2KHR-coverageReductionMode-07491
  If the `coverageReductionMode` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV or VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic states enabled, then the current values of `coverageReductionMode`, `rasterizationSamples`, the sample counts for the color and depth/stencil attachments (if the subpass has them) must be a valid combination returned by vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV

- VUID-vkCmdDrawIndexedIndirectCount2KHR-viewportCount-07492
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportSwizzleStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndexedIndirectCount2KHR-viewportCount-07493
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic states enabled then the `viewportCount` parameter in the last call to vkCmdSetViewportSwizzleNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndexedIndirectCount2KHR-viewportCount-09421
  If the `VK_NV_viewport_swizzle` extension is enabled, and a shader object is bound to any graphics stage, then the `viewportCount` parameter in the last call to vkCmdSetViewportSwizzleNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndexedIndirectCount2KHR-rasterizationSamples-07494
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, and the `coverageReductionMode` feature is not enabled, or the current value of `coverageReductionMode` is not VK_COVERAGE_REDUCTION_MODE_TRUNCATE_NV, and the current value of `rasterizationSamples` is greater than sample count of the color attachment, then sample shading must be disabled

- VUID-vkCmdDrawIndexedIndirectCount2KHR-stippledLineEnable-07495
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_RECTANGULAR, then the `stippledRectangularLines` feature must be enabled

- VUID-vkCmdDrawIndexedIndirectCount2KHR-stippledLineEnable-07496
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_BRESENHAM, then the `stippledBresenhamLines` feature must be enabled

- VUID-vkCmdDrawIndexedIndirectCount2KHR-stippledLineEnable-07497
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH, then the `stippledSmoothLines` feature must be enabled

- VUID-vkCmdDrawIndexedIndirectCount2KHR-stippledLineEnable-07498
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_DEFAULT, then the `stippledRectangularLines` feature must be enabled and VkPhysicalDeviceLimits::`strictLines` must be VK_TRUE

- VUID-vkCmdDrawIndexedIndirectCount2KHR-stage-07073
  If the bound pipeline was created with the VkPipelineShaderStageCreateInfo::`stage` member of an element of VkGraphicsPipelineCreateInfo::`pStages` set to VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT, then Mesh Shader Queries must not be active

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-08877
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ATTACHMENT_FEEDBACK_LOOP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAttachmentFeedbackLoopEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-07850
  If dynamic state was inherited from VkCommandBufferInheritanceViewportScissorInfoNV, it must be set in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-nextStage-10745
  For each shader object bound to a graphics stage, except for shader object bound to the last graphics stage in the logical pipeline, it must have been created with a `nextStage` including the corresponding bit to the shader object bound to the following graphics stage in the logical pipeline

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-08684
  If there is no bound graphics pipeline, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_VERTEX_BIT

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-08685
  If there is no bound graphics pipeline, and the `tessellationShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-08686
  If there is no bound graphics pipeline, and the `tessellationShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-08687
  If there is no bound graphics pipeline, and the `geometryShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_GEOMETRY_BIT

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-08688
  If there is no bound graphics pipeline, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_FRAGMENT_BIT

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-08689
  If there is no bound graphics pipeline, and the `taskShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TASK_BIT_EXT

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-08690
  If there is no bound graphics pipeline, and the `meshShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-08693
  If there is no bound graphics pipeline, and at least one of the `taskShader` and `meshShader` features is enabled, one of the VK_SHADER_STAGE_VERTEX_BIT or VK_SHADER_STAGE_MESH_BIT_EXT stages must have a valid `VkShaderEXT` bound, and the other must have no `VkShaderEXT` bound

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-08696
  If there is no bound graphics pipeline, and a valid `VkShaderEXT` is bound to the VK_SHADER_STAGE_VERTEX_BIT stage, there must be no `VkShaderEXT` bound to either the VK_SHADER_STAGE_TASK_BIT_EXT stage or the VK_SHADER_STAGE_MESH_BIT_EXT stage

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-08698
  If any graphics shader is bound which was created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag, then all shaders created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag in the same vkCreateShadersEXT call must also be bound

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-08699
  If any graphics shader is bound which was created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag, any stages in between stages whose shaders which did not create a shader with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag as part of the same vkCreateShadersEXT call must not have any `VkShaderEXT` bound

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-08878
  All bound graphics shader objects must have been created with identical or identically defined push constant ranges

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-08879
  All bound graphics shader objects must have either been created with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag set, or with identical or identically defined arrays of descriptor set layouts

- VUID-vkCmdDrawIndexedIndirectCount2KHR-colorAttachmentCount-09372
  If the current render pass instance was begun with vkCmdBeginRendering and a VkRenderingInfo::`colorAttachmentCount` equal to `1`, a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, and a fragment shader is bound, it must not declare the `DepthReplacing` or `StencilRefReplacingEXT` execution modes

- VUID-vkCmdDrawIndexedIndirectCount2KHR-pDynamicStates-08715
  If the bound graphics pipeline state includes a fragment shader stage, was created with VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`, and the fragment shader declares the `EarlyFragmentTests` execution mode and uses `OpDepthAttachmentReadEXT`, the `depthWriteEnable` parameter in the last call to vkCmdSetDepthWriteEnable must be VK_FALSE

- VUID-vkCmdDrawIndexedIndirectCount2KHR-pDynamicStates-08716
  If the bound graphics pipeline state includes a fragment shader stage, was created with VK_DYNAMIC_STATE_STENCIL_WRITE_MASK set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`, and the fragment shader declares the `EarlyFragmentTests` execution mode and uses `OpStencilAttachmentReadEXT`, the `writeMask` parameter in the last call to vkCmdSetStencilWriteMask must be `0`

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-09116
  If a shader object is bound to any graphics stage or the bound graphics pipeline was created with VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT, and the format of any color attachment is VK_FORMAT_E5B9G9R9_UFLOAT_PACK32, the corresponding element of the `pColorWriteMasks` parameter of vkCmdSetColorWriteMaskEXT must either include all of VK_COLOR_COMPONENT_R_BIT, VK_COLOR_COMPONENT_G_BIT, VK_COLOR_COMPONENT_B_BIT, and VK_COLOR_COMPONENT_A_BIT, or none of them

- VUID-vkCmdDrawIndexedIndirectCount2KHR-maxFragmentDualSrcAttachments-09239
  If blending is enabled for any attachment where either the source or destination blend factors for that attachment use the secondary color input, the maximum value of `Location` for any output attachment statically used in the `Fragment` `Execution` `Model` executed by this command must be less than `maxFragmentDualSrcAttachments`

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-09548
  If the current render pass was begun with vkCmdBeginRendering, there is no shader object bound to any graphics stage, the value of each element of VkRenderingAttachmentLocationInfo::`pColorAttachmentLocations` in the bound pipeline must match the value for the corresponding locations set currently in the current render pass instance

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-09549
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of each element of VkRenderingInputAttachmentIndexInfo::`pColorAttachmentInputIndices` in the bound pipeline must match the value for the corresponding index set currently in the current render pass instance

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-10927
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` in the bound pipeline must match the value set currently in the current render pass instance

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-10928
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` in the bound pipeline must match the value set currently in the current render pass instance

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-09642
  If the current render pass was begun with vkCmdBeginRendering with the VK_RENDERING_ENABLE_LEGACY_DITHERING_BIT_EXT flag, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_2_ENABLE_LEGACY_DITHERING_BIT_EXT

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-09643
  If the bound graphics pipeline was created with VK_PIPELINE_CREATE_2_ENABLE_LEGACY_DITHERING_BIT_EXT, the current render pass must have begun with vkCmdBeginRendering with the VK_RENDERING_ENABLE_LEGACY_DITHERING_BIT_EXT flag

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-10677
  If the per-tile execution model is enabled, the tileShadingPerTileDraw feature must be enabled

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-10772
  If a shader object is bound to any graphics stage, multiview functionality must not be enabled in the current render pass

- VUID-vkCmdDrawIndexedIndirectCount2KHR-multiviewPerViewViewports-12262
  If the `multiviewPerViewViewports` feature is enabled, then the index of the most significant bit in current render pass instance `viewMask` must be less than the current value of `viewportCount`

- VUID-vkCmdDrawIndexedIndirectCount2KHR-multiviewPerViewViewports-12263
  If the `multiviewPerViewViewports` feature is enabled, then the index of the most significant bit in current render pass instance `viewMask` must be less than the current value of `scissorCount`

- VUID-vkCmdDrawIndexedIndirectCount2KHR-flags-11521
  If current render pass instance was begun with vkCmdBeginRendering with VkRenderingInfo::`flags` which includes VK_RENDERING_FRAGMENT_REGION_BIT_EXT, and if sample shading is enabled (explicitly or implicitly), then the minimum fraction for sample shading must equal 0.0

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-11522
  If the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, and the `dynamicRenderingUnusedAttachments` feature is not enabled, the graphics pipeline bound must have been created with a VkCustomResolveCreateInfoEXT

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-11523
  If the current render pass instance was begun with vkCmdBeginRendering and does not contain a custom resolve, and the `dynamicRenderingUnusedAttachments` feature is not enabled, the graphics pipeline bound must not have been created with a VkCustomResolveCreateInfoEXT

- VUID-vkCmdDrawIndexedIndirectCount2KHR-customResolve-11524
  If the current render pass instance was begun with vkCmdBeginRendering and vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, the graphics pipeline bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_TRUE

- VUID-vkCmdDrawIndexedIndirectCount2KHR-customResolve-11525
  If the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, and vkCmdBeginCustomResolveEXT has not been recorded in the render pass instance, the graphics pipeline bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_FALSE

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-11861
  If the `dynamicRenderingUnusedAttachments` feature is not enabled and the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, the bound graphics pipeline must have been created with a VkCustomResolveCreateInfoEXT::`colorAttachmentCount` equal to VkRenderingInfo::`colorAttachmentCount`

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-11862
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound graphics pipeline

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-11863
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` equal to VK_NULL_HANDLE must have the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound pipeline equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirectCount2KHR-dynamicRenderingUnusedAttachments-11864
  If the `dynamicRenderingUnusedAttachments` feature is enabled, the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound graphics pipeline, or the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats`, if it exists, must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-11865
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-11866
  If current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`

- VUID-vkCmdDrawIndexedIndirectCount2KHR-dynamicRenderingUnusedAttachments-11867
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, and the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-11868
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->resolveImageView` was VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-11869
  If current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`

- VUID-vkCmdDrawIndexedIndirectCount2KHR-dynamicRenderingUnusedAttachments-11870
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, and the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirectCount2KHR-colorAttachmentCount-11871
  If the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0` and vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, then for each element of the VkRenderingInfo::`pColorAttachments` array with a `resolveImageView` not equal to VK_NULL_HANDLE, the `resolveImageView` must have been created with a sample count equal to the value of `rasterizationSamples` for the bound graphics pipeline

- VUID-vkCmdDrawIndexedIndirectCount2KHR-pDepthAttachment-11872
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`

- VUID-vkCmdDrawIndexedIndirectCount2KHR-pStencilAttachment-11873
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`

- VUID-vkCmdDrawIndexedIndirectCount2KHR-customResolve-11529
  If a shader object is bound to the fragment stage, the current render pass instance was begun with vkCmdBeginRendering, a fragment density map attachment is active, and vkCmdBeginCustomResolveEXT has been called, then the fragment shader object bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_TRUE

- VUID-vkCmdDrawIndexedIndirectCount2KHR-customResolve-11530
  If a shader object is bound to the fragment stage, the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, a fragment density map attachment is active, and vkCmdBeginCustomResolveEXT has not yet been called, then the fragment shader object bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_FALSE

- VUID-vkCmdDrawIndexedIndirectCount2KHR-flags-13361
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, then all bound shader objects must have been created with the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit

- VUID-vkCmdDrawIndexedIndirectCount2KHR-flags-13362
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, then the pipeline layout of the bound descriptor sets must have been created with VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT set

- VUID-vkCmdDrawIndexedIndirectCount2KHR-flags-13363
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, and any of the descriptor set layouts used to create the pipeline layout of the bound descriptor sets were created with any binding’s VkDescriptorSetLayoutBinding::`stageFlags` set with VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT, then there must be no binding with VkDescriptorSetLayoutBinding::`stageFlags` set with VK_SHADER_STAGE_TASK_BIT_EXT or VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-vkCmdDrawIndexedIndirectCount2KHR-flags-13364
  If there are any shader objects bound that were created with `flags` that includes both the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR and VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT bits, the pipeline layout of the bound descriptor sets must have been created with VK_PIPELINE_LAYOUT_CREATE_NO_TASK_SHADER_BIT_KHR set

- VUID-vkCmdDrawIndexedIndirectCount2KHR-flags-13365
  If there are any shader objects bound that were created with `flags` that includes both the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR and VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT bits, there must be no shader object bound to the VK_SHADER_STAGE_TASK_BIT_EXT stage

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-04007
  All vertex input bindings accessed via vertex input variables declared in the vertex shader entry point’s interface must have either valid or VK_NULL_HANDLE buffers bound

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-04008
  If the `nullDescriptor` feature is not enabled, all vertex input bindings accessed via vertex input variables declared in the vertex shader entry point’s interface must not be VK_NULL_HANDLE

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-02721
  If the `robustBufferAccess` feature is not enabled, and that pipeline was created without enabling VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS for `vertexInputs`, then for a given vertex buffer binding, any attribute data fetched must be entirely contained within the corresponding vertex buffer binding, as described in Vertex Input Description

- VUID-vkCmdDrawIndexedIndirectCount2KHR-format-10389
  For each vertex attribute accessed by this command, if its VkVertexInputAttributeDescription::`format` or VkVertexInputAttributeDescription2EXT::`format` is a packed format, and the `legacyVertexAttributes` feature is not enabled, the value of `attribAddress`, calculated as described in Vertex Input Calculation, must be a multiple of the size of the `format`

- VUID-vkCmdDrawIndexedIndirectCount2KHR-format-10390
  For each vertex attribute accessed by this command, if its VkVertexInputAttributeDescription::`format` or VkVertexInputAttributeDescription2EXT::`format` is not a packed format, and either the `legacyVertexAttributes` feature is not enabled or `format` has 64-bit components, the value of `attribAddress`, calculated as described in Vertex Input Calculation, must be a multiple of the component size of the `format`

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-07842
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY dynamic state enabled then vkCmdSetPrimitiveTopology must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-dynamicPrimitiveTopologyUnrestricted-07500
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY dynamic state enabled and the `dynamicPrimitiveTopologyUnrestricted` is VK_FALSE, then the `primitiveTopology` parameter of `vkCmdSetPrimitiveTopology` must be of the same topology class as the pipeline VkPipelineInputAssemblyStateCreateInfo::`topology` state

- VUID-vkCmdDrawIndexedIndirectCount2KHR-primitiveTopology-10286
  If a VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage is bound, then the current value of `primitiveTopology` must be VK_PRIMITIVE_TOPOLOGY_PATCH_LIST prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-primitiveTopology-10747
  If vkCmdSetPrimitiveTopology set `primitiveTopology` to VK_PRIMITIVE_TOPOLOGY_PATCH_LIST prior to this drawing command, then a VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage must be bound

- VUID-vkCmdDrawIndexedIndirectCount2KHR-primitiveTopology-10748
  If vkCmdSetPrimitiveTopology set `primitiveTopology` to VK_PRIMITIVE_TOPOLOGY_POINT_LIST prior to this drawing command, the `maintenance5` feature is not enabled, both a VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT and VK_SHADER_STAGE_GEOMETRY_BIT stage are not bound, then the `Vertex` `Execution` `Model` must have a `PointSize` decorated variable that is statically written to

- VUID-vkCmdDrawIndexedIndirectCount2KHR-pStrides-04913
  If the bound graphics pipeline was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE dynamic state enabled, but without the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled, then vkCmdBindVertexBuffers2 with a non-`NULL` `pStrides` parameter or vkCmdBindVertexBuffers3KHR with `setStride` set to VK_TRUE must have been called and not subsequently invalidated in the current command buffer prior to this draw command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-13118
  If the bound graphics pipeline was created without the VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE dynamic state enabled, without the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled, and vkCmdBindVertexBuffers3KHR was called and not subsequently invalidated in the current command buffer prior to this draw command, the value of `setStride` in each of its `pBindInfos` elements must have been VK_FALSE

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-04914
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled then vkCmdSetVertexInputEXT must have been called and not subsequently invalidated in the current command buffer prior to this draw command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-Input-07939
  If the `vertexAttributeRobustness` feature is not enabled, and the `maintenance9` feature is not enabled, and there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled then all variables with the `Input` storage class decorated with `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` must contain a location in VkVertexInputAttributeDescription2EXT::`location`

- VUID-vkCmdDrawIndexedIndirectCount2KHR-Input-08734
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled and either the `legacyVertexAttributes` feature is not enabled or the SPIR-V Type associated with a given `Input` variable of the corresponding `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` is 64-bit, then the numeric type associated with all `Input` variables of the corresponding `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` must be the same as VkVertexInputAttributeDescription2EXT::`format`

- VUID-vkCmdDrawIndexedIndirectCount2KHR-format-08936
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled and VkVertexInputAttributeDescription2EXT::`format` has a 64-bit component, then the scalar width associated with all `Input` variables of the corresponding `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` must be 64-bit

- VUID-vkCmdDrawIndexedIndirectCount2KHR-format-08937
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled and the scalar width associated with a `Location` decorated `Input` variable in the `Vertex` `Execution` `Model` `OpEntryPoint` is 64-bit, then the corresponding VkVertexInputAttributeDescription2EXT::`format` must have a 64-bit component

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-09203
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled and VkVertexInputAttributeDescription2EXT::`format` has a 64-bit component, then all `Input` variables at the corresponding `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` must not use components that are not present in the format

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-04875
  If there is a shader object bound to the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage or the bound graphics pipeline state was created with both a VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage and the VK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT dynamic state enabled, and the current value of `primitiveTopology` is VK_PRIMITIVE_TOPOLOGY_PATCH_LIST, then vkCmdSetPatchControlPointsEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-04879
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE dynamic state enabled then vkCmdSetPrimitiveRestartEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-09637
  If the `primitiveTopologyListRestart` feature is not enabled, the input assembly is VK_PRIMITIVE_TOPOLOGY_POINT_LIST, VK_PRIMITIVE_TOPOLOGY_LINE_LIST, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY, or VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY, there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE dynamic state enabled, then vkCmdSetPrimitiveRestartEnable must be VK_FALSE

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-10909
  If the `primitiveTopologyPatchListRestart` feature is not enabled, the input assembly is VK_PRIMITIVE_TOPOLOGY_PATCH_LIST, there is a shader object bound to the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE dynamic state enabled then vkCmdSetPrimitiveRestartEnable must be VK_FALSE

- VUID-vkCmdDrawIndexedIndirectCount2KHR-stage-06481
  The bound graphics pipeline must not have been created with the VkPipelineShaderStageCreateInfo::`stage` member of any element of VkGraphicsPipelineCreateInfo::`pStages` set to VK_SHADER_STAGE_TASK_BIT_EXT or VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-08885
  There must be no shader object bound to either of the VK_SHADER_STAGE_TASK_BIT_EXT or VK_SHADER_STAGE_MESH_BIT_EXT stages

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-07619
  If a shader object is bound to the VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stage or a graphics pipeline is bound which was created with both a VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stage and the VK_DYNAMIC_STATE_TESSELLATION_DOMAIN_ORIGIN_EXT dynamic state enabled, then vkCmdSetTessellationDomainOriginEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount2KHR-OpExecutionMode-12239
  If a shader is bound to both the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stages, and if both stages contain an `OpExecutionMode` instruction specifying the type of subdivision, they must be the same

- VUID-vkCmdDrawIndexedIndirectCount2KHR-OpExecutionMode-12240
  If a shader is bound to both the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stages, and if both stages contain an `OpExecutionMode` instruction specifying the orientation of triangles, they must be the same

- VUID-vkCmdDrawIndexedIndirectCount2KHR-OpExecutionMode-12241
  If a shader is bound to both the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stages, and if both stages contain an `OpExecutionMode` instruction specifying the segment spacing, they must be the same

- VUID-vkCmdDrawIndexedIndirectCount2KHR-OpExecutionMode-12242
  If a shader is bound to both the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stages, and if both stages contain an `OpExecutionMode` instruction specifying the output patch size, they must be the same

- VUID-vkCmdDrawIndexedIndirectCount2KHR-pInfo-13110
  If `pInfo->maxDrawCount` is greater than `0`, `pInfo->addressRange.size` must be greater than or equal to (`pInfo->maxDrawCount` - 1) × `pInfo->addressRange.stride` + `sizeof`(VkDrawIndexedIndirectCommand)

- VUID-vkCmdDrawIndexedIndirectCount2KHR-pInfo-13111
  If `pInfo->maxDrawCount` is greater than 1, `pInfo->addressRange.stride` must not be 0

- VUID-vkCmdDrawIndexedIndirectCount2KHR-pInfo-13112
  If `pInfo->addressRange.stride` is not 0, `pInfo->addressRange.stride` must be greater than or equal to `sizeof`(VkDrawIndexedIndirectCommand)

- VUID-vkCmdDrawIndexedIndirectCount2KHR-pInfo-13113
  If `pInfo->addressRange.stride` is not 0, `pInfo->addressRange.stride` must be a multiple of `4`

- VUID-vkCmdDrawIndexedIndirectCount2KHR-None-07312
  If the `maintenance6` feature is not enabled, a valid index buffer must be bound

- VUID-vkCmdDrawIndexedIndirectCount2KHR-primitiveRestartIndex-12401
  If the primitive restart index for this draw operation was set with vkCmdSetPrimitiveRestartIndexEXT, then `primitiveRestartIndex` must not be greater than the maximum representable value for the bound VkIndexType

- VUID-vkCmdDrawIndexedIndirectCount2KHR-commandBuffer-13060
  `commandBuffer` must not be a protected command buffer

- VUID-vkCmdDrawIndexedIndirectCount2KHR-drawIndirectCount-13120
  If the `drawIndirectCount` feature is not enabled this function must not be used

Valid Usage (Implicit)

- VUID-vkCmdDrawIndexedIndirectCount2KHR-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdDrawIndexedIndirectCount2KHR-pInfo-parameter
  `pInfo` must be a valid pointer to a valid VkDrawIndirectCount2InfoKHR structure

- VUID-vkCmdDrawIndexedIndirectCount2KHR-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdDrawIndexedIndirectCount2KHR-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdDrawIndexedIndirectCount2KHR-renderpass
  This command must only be called inside of a render pass instance

- VUID-vkCmdDrawIndexedIndirectCount2KHR-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdDrawIndexedIndirectCount2KHR-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Inside | Outside | VK_QUEUE_GRAPHICS_BIT | Action

Conditional Rendering

vkCmdDrawIndexedIndirectCount2KHR is affected by conditional rendering

To record an indexed draw call with a draw call count sourced from a buffer, call:

    // Provided by VK_VERSION_1_2
    void vkCmdDrawIndexedIndirectCount(
        VkCommandBuffer                             commandBuffer,
        VkBuffer                                    buffer,
        VkDeviceSize                                offset,
        VkBuffer                                    countBuffer,
        VkDeviceSize                                countBufferOffset,
        uint32_t                                    maxDrawCount,
        uint32_t                                    stride);

    // Provided by VK_KHR_draw_indirect_count
    // Equivalent to vkCmdDrawIndexedIndirectCount
    void vkCmdDrawIndexedIndirectCountKHR(
        VkCommandBuffer                             commandBuffer,
        VkBuffer                                    buffer,
        VkDeviceSize                                offset,
        VkBuffer                                    countBuffer,
        VkDeviceSize                                countBufferOffset,
        uint32_t                                    maxDrawCount,
        uint32_t                                    stride);

    // Provided by VK_AMD_draw_indirect_count
    // Equivalent to vkCmdDrawIndexedIndirectCount
    void vkCmdDrawIndexedIndirectCountAMD(
        VkCommandBuffer                             commandBuffer,
        VkBuffer                                    buffer,
        VkDeviceSize                                offset,
        VkBuffer                                    countBuffer,
        VkDeviceSize                                countBufferOffset,
        uint32_t                                    maxDrawCount,
        uint32_t                                    stride);

- `commandBuffer` is the command buffer into which the command is recorded.

- `buffer` is the buffer containing draw parameters.

- `offset` is the byte offset into `buffer` where parameters begin.

- `countBuffer` is the buffer containing the draw count.

- `countBufferOffset` is the byte offset into `countBuffer` where the draw count begins.

- `maxDrawCount` specifies the maximum number of draws that will be executed. The actual number of executed draw calls is the minimum of the count specified in `countBuffer` and `maxDrawCount`.

- `stride` is the byte stride between successive sets of draw parameters.

`vkCmdDrawIndexedIndirectCount` behaves similarly to vkCmdDrawIndexedIndirect except that the draw count is read by the device from a buffer during execution. The command will read an unsigned 32-bit integer from `countBuffer` located at `countBufferOffset` and use this as the draw count.

Valid Usage

- VUID-vkCmdDrawIndexedIndirectCount-magFilter-04553
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdDrawIndexedIndirectCount-magFilter-09598
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdDrawIndexedIndirectCount-mipmapMode-04770
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdDrawIndexedIndirectCount-mipmapMode-09599
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdDrawIndexedIndirectCount-unnormalizedCoordinates-09635
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `levelCount` and `layerCount` must be 1

- VUID-vkCmdDrawIndexedIndirectCount-None-08609
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `viewType` must be VK_IMAGE_VIEW_TYPE_1D or VK_IMAGE_VIEW_TYPE_2D

- VUID-vkCmdDrawIndexedIndirectCount-None-08610
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions with `ImplicitLod`, `Dref` or `Proj` in their name

- VUID-vkCmdDrawIndexedIndirectCount-None-08611
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions that includes a LOD bias or any offset values

- VUID-vkCmdDrawIndexedIndirectCount-None-06479
  If a VkImageView is sampled with depth comparison, the image view’s format features must contain VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT

- VUID-vkCmdDrawIndexedIndirectCount-None-02691
  If a VkImageView is accessed using atomic operations as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT

- VUID-vkCmdDrawIndexedIndirectCount-None-07888
  If a VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER descriptor is accessed using atomic operations as a result of this command, then the storage texel buffer’s format features must contain VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT

- VUID-vkCmdDrawIndexedIndirectCount-None-02692
  If a VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT

- VUID-vkCmdDrawIndexedIndirectCount-None-02693
  If the VK_EXT_filter_cubic extension is not enabled and any VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, it must not have a VkImageViewType of VK_IMAGE_VIEW_TYPE_3D, VK_IMAGE_VIEW_TYPE_CUBE, or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY

- VUID-vkCmdDrawIndexedIndirectCount-filterCubic-02694
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have a VkImageViewType and format that supports cubic filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubic` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdDrawIndexedIndirectCount-filterCubicMinmax-02695
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX as a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubicMinmax` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdDrawIndexedIndirectCount-cubicRangeClamp-09212
  If the `cubicRangeClamp` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must not have a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM

- VUID-vkCmdDrawIndexedIndirectCount-reductionMode-09213
  Any VkImageView being sampled with a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM as a result of this command must sample with VK_FILTER_CUBIC_EXT

- VUID-vkCmdDrawIndexedIndirectCount-selectableCubicWeights-09214
  If the `selectableCubicWeights` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have VkSamplerCubicWeightsCreateInfoQCOM::`cubicWeights` equal to VK_CUBIC_FILTER_WEIGHTS_CATMULL_ROM_QCOM

- VUID-vkCmdDrawIndexedIndirectCount-flags-02696
  Any VkImage created with a VkImageCreateInfo::`flags` containing VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV sampled as a result of this command must only be sampled using a VkSamplerAddressMode of VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawIndexedIndirectCount-OpTypeImage-07027
  For any VkImageView being written as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawIndexedIndirectCount-OpTypeImage-07028
  For any VkImageView being read as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawIndexedIndirectCount-OpTypeImage-07029
  For any VkBufferView being written as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown`, the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawIndexedIndirectCount-OpTypeImage-07030
  Any VkBufferView being read as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown` then the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawIndexedIndirectCount-None-08600
  If a a bound shader was created with a pipeline layout and statically uses a set n, a descriptor set must have been bound to n at the same pipeline bind point, with layouts compatible for set n with the layout(s) used to create the shader, as described in Pipeline Layout Compatibility

- VUID-vkCmdDrawIndexedIndirectCount-None-08601
  If a a bound shader was created with a pipeline layout or specified push constant ranges and statically uses a push constant value, that value must have been set for the same pipeline bind point, with push constant ranges that are compatible with the push constant range used to create the shader

- VUID-vkCmdDrawIndexedIndirectCount-None-10068
  For each array of resources that is used by a bound shader, the indices used to access members of the array must be less than the descriptor count for the identified binding in the descriptor sets used by this command

- VUID-vkCmdDrawIndexedIndirectCount-None-08114
  Descriptors in each bound descriptor set, specified via vkCmdBindDescriptorSets, must be valid if they are accessed as described by descriptor validity by the VkPipeline bound to the pipeline bind point used by this command and the bound VkPipeline was not created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawIndexedIndirectCount-imageLayout-00344
  If an image descriptor is accessed by a shader, the VkImageLayout must match the subresource accessible from the VkImageView as defined by the image layout matching rules

- VUID-vkCmdDrawIndexedIndirectCount-None-08115
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdBindDescriptorSets, the bound VkPipeline must have been created without VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawIndexedIndirectCount-None-08116
  Descriptors in bound descriptor buffers, specified via vkCmdSetDescriptorBufferOffsetsEXT, must be valid if they are dynamically accessed

- VUID-vkCmdDrawIndexedIndirectCount-None-08117
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdSetDescriptorBufferOffsetsEXT, the bound VkPipeline must have been created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawIndexedIndirectCount-None-08119
  If a descriptor is dynamically used with a VkPipeline created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdDrawIndexedIndirectCount-None-08605
  If a descriptor is dynamically used with a VkShaderEXT created with a `VkDescriptorSetLayout` that was created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdDrawIndexedIndirectCount-None-08606
  If the `shaderObject` feature is not enabled, a valid pipeline must be bound to the pipeline bind point used by this command

- VUID-vkCmdDrawIndexedIndirectCount-None-08608
  If a pipeline is bound to the pipeline bind point used by this command, there must not have been any calls to dynamic state setting commands for any state specified statically in the VkPipeline object bound to the pipeline bind point used by this command, since that pipeline was bound

- VUID-vkCmdDrawIndexedIndirectCount-uniformBuffers-06935
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawIndexedIndirectCount-None-08612
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawIndexedIndirectCount-storageBuffers-06936
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawIndexedIndirectCount-None-08613
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a storage buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawIndexedIndirectCount-commandBuffer-02707
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, any resource accessed by bound shaders must not be a protected resource

- VUID-vkCmdDrawIndexedIndirectCount-viewType-07752
  If a VkImageView is accessed as a result of this command, then the image view’s `viewType` must match the `Dim` operand of the `OpTypeImage` as described in Compatibility Between SPIR-V Image Dimensions and Vulkan ImageView Types

- VUID-vkCmdDrawIndexedIndirectCount-format-07753
  If a VkImageView or VkBufferView is accessed as a result of this command, then the numeric type of the view’s `format` and the `Sampled` `Type` operand of the `OpTypeImage` must match

- VUID-vkCmdDrawIndexedIndirectCount-OpImageWrite-08795
  If a VkImageView created with a format other than VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the image view’s format

- VUID-vkCmdDrawIndexedIndirectCount-OpImageWrite-08796
  If a VkImageView created with the format VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have four components

- VUID-vkCmdDrawIndexedIndirectCount-OpImageWrite-04469
  If a VkBufferView is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the buffer view’s format

- VUID-vkCmdDrawIndexedIndirectCount-SampledType-04470
  If a VkImageView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdDrawIndexedIndirectCount-SampledType-04471
  If a VkImageView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdDrawIndexedIndirectCount-SampledType-04472
  If a VkBufferView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdDrawIndexedIndirectCount-SampledType-04473
  If a VkBufferView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdDrawIndexedIndirectCount-sparseImageInt64Atomics-04474
  If the `sparseImageInt64Atomics` feature is not enabled, VkImage objects created with the VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdDrawIndexedIndirectCount-sparseImageInt64Atomics-04475
  If the `sparseImageInt64Atomics` feature is not enabled, VkBuffer objects created with the VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdDrawIndexedIndirectCount-OpImageSampleWeightedQCOM-06971
  If `OpImageSampleWeightedQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_SAMPLED_IMAGE_BIT_QCOM

- VUID-vkCmdDrawIndexedIndirectCount-OpImageSampleWeightedQCOM-06972
  If `OpImageSampleWeightedQCOM` uses a VkImageView as a sample weight image as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_IMAGE_BIT_QCOM

- VUID-vkCmdDrawIndexedIndirectCount-OpImageBoxFilterQCOM-06973
  If `OpImageBoxFilterQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BOX_FILTER_SAMPLED_BIT_QCOM

- VUID-vkCmdDrawIndexedIndirectCount-OpImageBlockMatchSSDQCOM-06974
  If `OpImageBlockMatchSSDQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdDrawIndexedIndirectCount-OpImageBlockMatchSADQCOM-12420
  If `OpImageBlockMatchSADQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdDrawIndexedIndirectCount-OpImageBlockMatchSADQCOM-06976
  If `OpImageBlockMatchSADQCOM` or OpImageBlockMatchSSDQCOM is used to read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdDrawIndexedIndirectCount-OpImageSampleWeightedQCOM-06977
  If `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdDrawIndexedIndirectCount-OpImageSampleWeightedQCOM-06978
  If any command other than `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must not have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdDrawIndexedIndirectCount-OpImageBlockMatchWindow-09215
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM

- VUID-vkCmdDrawIndexedIndirectCount-OpImageBlockMatchWindow-09216
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format must be a single-component format

- VUID-vkCmdDrawIndexedIndirectCount-OpImageBlockMatchWindow-09217
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdDrawIndexedIndirectCount-OpImageBlockMatchWindow-12421
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the `blockMatchExtendedClampToEdge` feature is not enabled, the input sampler must not have been created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawIndexedIndirectCount-addressModeU-12422
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the input sampler was created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, then the sampler must have been created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawIndexedIndirectCount-None-07288
  Any shader invocation executed by this command must terminate

- VUID-vkCmdDrawIndexedIndirectCount-None-09600
  If a descriptor with type equal to any of VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, or VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT is accessed as a result of this command, all image subresources identified by that descriptor must be in the image layout identified when the descriptor was written

- VUID-vkCmdDrawIndexedIndirectCount-micromap-11636
  If an acceleration structure is accessed as a result of this command through an `OpRayQueryProceedKHR` operation , the `VK_EXT_opacity_micromap` extension is not enabled, and the acceleration structure is built using geometry with a VkAccelerationStructureTrianglesOpacityMicromapKHR structure included in its `pNext` chain, the shader must have specified a `OpacityMicromapIdKHR` execution mode with its specialization constant operand equal to VK_TRUE

- VUID-vkCmdDrawIndexedIndirectCount-micromap-11637
  If an acceleration structure is accessed as a result of this command and the acceleration structure was constructed through deserialization, all micromap arrays referenced by the acceleration structure that were not replaced by an acceleration structure update command must have been deserialized using the serialized data of the corresponding micromaps used to originally build the acceleration structure prior to the execution of this command on the device

- VUID-vkCmdDrawIndexedIndirectCount-micromap-11638
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkPipeline bound to the pipeline bind point used by this command must not have been created with `flags` that includes VK_PIPELINE_CREATE_2_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_KHR

- VUID-vkCmdDrawIndexedIndirectCount-micromap-11639
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkShaderEXT that accessed the descriptor must not have been created with `flags` that includes VK_SHADER_CREATE_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_EXT

- VUID-vkCmdDrawIndexedIndirectCount-commandBuffer-10746
  The `VkDeviceMemory` object allocated from a `VkMemoryHeap` with the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property that is bound to a resource accessed as a result of this command must be the active bound tile memory object in `commandBuffer`

- VUID-vkCmdDrawIndexedIndirectCount-None-10678
  If this command is recorded inside a tile shading render pass instance, the stages corresponding to the pipeline bind point used by this command must only include VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_FRAGMENT_BIT, and/or VK_SHADER_STAGE_COMPUTE_BIT

- VUID-vkCmdDrawIndexedIndirectCount-None-10679
  If this command is recorded where per-tile execution model is enabled, there must be no access to any image while the image was be transitioned to the VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT layout

- VUID-vkCmdDrawIndexedIndirectCount-pDescription-09900
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the underlying VkTensorARM object must have been created with the VK_TENSOR_USAGE_SHADER_BIT_ARM usage flag set

- VUID-vkCmdDrawIndexedIndirectCount-dimensionCount-09905
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the `Rank` of the `OpTypeTensorARM` of the tensor resource variable must be equal to the `dimensionCount` provided via VkTensorCreateInfoARM::`pDescription` when creating the underlying VkTensorARM object

- VUID-vkCmdDrawIndexedIndirectCount-OpTypeTensorARM-09906
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the element type of the `OpTypeTensorARM` of the tensor resource variable must be compatible with the VkFormat of the VkTensorViewARM used for the access

- VUID-vkCmdDrawIndexedIndirectCount-OpTensorReadARM-12462
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, using `OpTensorReadARM` or `OpTensorWriteARM`, and the underlying VkTensorARM object was created with a VK_TENSOR_TILING_BRICK_16_WIDE_ARM, VK_TENSOR_TILING_BRICK_8_WIDE_ARM, VK_TENSOR_TILING_BRICK_4_WIDE_ARM, VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_ARM, or VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_64K_ARM VkTensorTilingARM, and the object read or written is an array, then the innermost coordinate provided to `OpTensorReadARM` or `OpTensorWriteARM` via the `Coordinates` operand must be a multiple of the largest power of 2 that is less than or equal to the number of components of the array

- VUID-vkCmdDrawIndexedIndirectCount-pNext-12463
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command and the corresponding VkTensorARM object was created with a VkTensorRollingBackingCreateInfoARM structure in the `pNext` chain of VkTensorCreateInfoARM, then the number of elements accessed with one `OpTensorReadARM` or `OpTensorWriteARM`, must be less than or equal to the number of elements available from the starting coordinate in the rolling backing along the innermost dimension, defined as `wraps`[`dimensionCount` - 1] - InnermostCoordinate % `wraps`[`dimensionCount` - 1] where InnermostCoordinate is the last component of the coordinates array provided via the `Coordinates` operand

- VUID-vkCmdDrawIndexedIndirectCount-None-12472
  Descriptors dynamically accessed in bound descriptor heaps must be valid

- VUID-vkCmdDrawIndexedIndirectCount-None-11297
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a `OpTypeStruct` decorated with `Block` or `BufferBlock` using that mapping, the calculated offset for the resource heap must be a multiple of `bufferDescriptorAlignment`

- VUID-vkCmdDrawIndexedIndirectCount-None-11298
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeImage` or `OpTypeSampledImage` using that mapping, the calculated offset for the resource heap must be a multiple of `imageDescriptorAlignment`

- VUID-vkCmdDrawIndexedIndirectCount-None-11299
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeSampler` or `OpTypeSampledImage` using that mapping, the calculated offset for the sampler heap must be a multiple of `samplerDescriptorAlignment`

- VUID-vkCmdDrawIndexedIndirectCount-None-11397
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeTensorARM` using that mapping, the calculated offset for the resource heap must be a multiple of `tensorDescriptorAlignment`

- VUID-vkCmdDrawIndexedIndirectCount-None-11300
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 4

- VUID-vkCmdDrawIndexedIndirectCount-None-11301
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdDrawIndexedIndirectCount-None-11302
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress

- VUID-vkCmdDrawIndexedIndirectCount-None-11304
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 8

- VUID-vkCmdDrawIndexedIndirectCount-None-11305
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdDrawIndexedIndirectCount-None-11306
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address pointed to by the address in push data must be a valid VkDeviceAddress

- VUID-vkCmdDrawIndexedIndirectCount-None-11308
  For each descriptor heap that is statically used by a bound shader, either directly or via a descriptor mapping, a valid descriptor heap must be bound

- VUID-vkCmdDrawIndexedIndirectCount-None-11309
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, execution of this command must not result in any descriptor read accessing data outside of the user range of the respective heap bound by `vkCmdBind*HeapEXT` commands

- VUID-vkCmdDrawIndexedIndirectCount-None-11372
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer or uniform texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified via VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawIndexedIndirectCount-None-11373
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer or storage texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawIndexedIndirectCount-None-11374
  If the `robustBufferAccess2` feature is not enabled, the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, uniform texel buffer, storage buffer, or storage texel buffer, that shader must not access values outside of the range of the buffer as specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawIndexedIndirectCount-pBindInfo-11375
  If any bound shader uses an embedded sampler via a descriptor mapping, the value of `pBindInfo->reservedRangeSize` set for vkCmdBindSamplerHeapEXT must be greater than or equal to `minSamplerHeapReservedRangeWithEmbedded`

- VUID-vkCmdDrawIndexedIndirectCount-None-11376
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, and that shader statically uses a push constant value, that value must have been set by vkCmdPushDataEXT

- VUID-vkCmdDrawIndexedIndirectCount-None-11398
  If a bound shader was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the access must not be out of bounds

- VUID-vkCmdDrawIndexedIndirectCount-None-11437
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the buffer from which the address in push data was queried must have been created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdDrawIndexedIndirectCount-None-11438
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdDrawIndexedIndirectCount-None-11441
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must be aligned to `minUniformBufferOffsetAlignment`

- VUID-vkCmdDrawIndexedIndirectCount-None-11439
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_STORAGE_BUFFER_BIT usage flag set

- VUID-vkCmdDrawIndexedIndirectCount-None-11442
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must be aligned to `minStorageBufferOffsetAlignment`

- VUID-vkCmdDrawIndexedIndirectCount-None-11485
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses an acceleration structure using that mapping, the address that the acceleration structure is mapped to must be an acceleration structure address retrieved from a VkAccelerationStructureKHR object via vkGetAccelerationStructureDeviceAddressKHR or handle retrieved from a VkAccelerationStructureNV object via vkGetAccelerationStructureHandleNV

- VUID-vkCmdDrawIndexedIndirectCount-index-11450
  If a shader uses a sampler descriptor to sample an image as a result of this command, and that sampler descriptor uses a custom border color with an index defined by VkSamplerCustomBorderColorIndexCreateInfoEXT, the value of VkSamplerCustomBorderColorIndexCreateInfoEXT::`index` must have been registered before this command was recorded, and still be registered during the sampling operation, with an identically defined color

- VUID-vkCmdDrawIndexedIndirectCount-protectedNoFault-11455
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, the address that the resource is mapped to must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdDrawIndexedIndirectCount-protectedNoFault-11456
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, the address of the indirect memory must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdDrawIndexedIndirectCount-renderPass-02684
  The current render pass must be compatible with the `renderPass` member of the `VkGraphicsPipelineCreateInfo` structure specified when creating the `VkPipeline` bound to VK_PIPELINE_BIND_POINT_GRAPHICS

- VUID-vkCmdDrawIndexedIndirectCount-subpass-02685
  The subpass index of the current render pass must be equal to the `subpass` member of the `VkGraphicsPipelineCreateInfo` structure specified when creating the `VkPipeline` bound to VK_PIPELINE_BIND_POINT_GRAPHICS

- VUID-vkCmdDrawIndexedIndirectCount-OpTypeImage-07468
  If any shader executed by this pipeline accesses an `OpTypeImage` variable with a `Dim` operand of `SubpassData`, it must be decorated with an `InputAttachmentIndex` that corresponds to a valid input attachment in the current subpass

- VUID-vkCmdDrawIndexedIndirectCount-None-07469
  Input attachment views accessed in a subpass must be created with the same VkFormat as the corresponding subpass definition, and be created with a VkImageView that is compatible with the attachment referenced by the subpass' `pInputAttachments`[`InputAttachmentIndex`] in the bound VkFramebuffer as specified by Fragment Input Attachment Compatibility

- VUID-vkCmdDrawIndexedIndirectCount-pDepthInputAttachmentIndex-09595
  Input attachment views accessed in a dynamic render pass with a `InputAttachmentIndex` referenced by VkRenderingInputAttachmentIndexInfo, or no `InputAttachmentIndex` if VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` or VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` are `NULL`, must be created with a VkImageView that is compatible with the corresponding color, depth, or stencil attachment in VkRenderingInfo

- VUID-vkCmdDrawIndexedIndirectCount-pDepthInputAttachmentIndex-09596
  Input attachment views accessed in a dynamic render pass via a shader object must have an `InputAttachmentIndex` if both VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` and VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` are non-`NULL`

- VUID-vkCmdDrawIndexedIndirectCount-InputAttachmentIndex-09597
  If an input attachment view accessed in a dynamic render pass via a shader object has an `InputAttachmentIndex`, the `InputAttachmentIndex` must match an index in VkRenderingInputAttachmentIndexInfo

- VUID-vkCmdDrawIndexedIndirectCount-None-06537
  Memory backing image subresources used as attachments in the current render pass must not be written in any way other than as an attachment by this command

- VUID-vkCmdDrawIndexedIndirectCount-None-10795
  If a color attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_COLOR_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawIndexedIndirectCount-None-10796
  If a depth attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_DEPTH_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawIndexedIndirectCount-None-10797
  If a stencil attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_STENCIL_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawIndexedIndirectCount-None-12338
  If a color attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_COLOR_BIT on that attachment, the color attachment must not be written to by this command

- VUID-vkCmdDrawIndexedIndirectCount-None-12339
  If a depth attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_DEPTH_BIT on that attachment, the depth attachment must not be written to by this command

- VUID-vkCmdDrawIndexedIndirectCount-None-12340
  If a stencil attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_STENCIL_BIT on that attachment, the stencil attachment must not be written to by this command

- VUID-vkCmdDrawIndexedIndirectCount-None-09003
  If an attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, it must not be accessed in any way other than as an attachment, storage image, or sampled image by this command

- VUID-vkCmdDrawIndexedIndirectCount-None-06886
  If the current render pass instance uses a depth/stencil attachment with a read-only layout for the depth aspect, depth writes must be disabled

- VUID-vkCmdDrawIndexedIndirectCount-None-06887
  If the current render pass instance uses a depth/stencil attachment with a read-only layout for the stencil aspect, both front and back `writeMask` are not zero, and stencil test is enabled, all stencil ops must be VK_STENCIL_OP_KEEP

- VUID-vkCmdDrawIndexedIndirectCount-None-07831
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT dynamic state enabled then vkCmdSetViewport must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-None-07832
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SCISSOR dynamic state enabled then vkCmdSetScissor must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-None-08617
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_WIDTH dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineWidth must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-None-07834
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BIAS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthBiasEnable` is VK_TRUE, then vkCmdSetDepthBias or vkCmdSetDepthBias2EXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-None-07835
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_BLEND_CONSTANTS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and an active color attachment current value of `blendEnable` is VK_TRUE with a blend equations where any VkBlendFactor member is VK_BLEND_FACTOR_CONSTANT_COLOR, VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR, VK_BLEND_FACTOR_CONSTANT_ALPHA, or VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA, then vkCmdSetBlendConstants must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-None-07836
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BOUNDS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthBoundsTestEnable` is VK_TRUE, then vkCmdSetDepthBounds must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-None-07837
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilCompareMask must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-None-07838
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_WRITE_MASK dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilWriteMask must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-None-07839
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_REFERENCE dynamic state enabled, the current value of and `rasterizerDiscardEnable` is VK_FALSE, the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilReference must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-maxMultiviewInstanceIndex-02688
  If the draw is recorded in a render pass instance with multiview enabled, the maximum instance index must be less than or equal to VkPhysicalDeviceMultiviewProperties::`maxMultiviewInstanceIndex`

- VUID-vkCmdDrawIndexedIndirectCount-sampleLocationsEnable-02689
  If the bound graphics pipeline was created with VkPipelineSampleLocationsStateCreateInfoEXT::`sampleLocationsEnable` set to VK_TRUE, then the active depth attachment must have been created with the VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit set

- VUID-vkCmdDrawIndexedIndirectCount-None-07634
  If the `VK_EXT_sample_locations` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetSampleLocationsEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-None-06666
  If the `VK_EXT_sample_locations` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `sampleLocationsEnable` is VK_TRUE, then vkCmdSetSampleLocationsEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-None-07840
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_CULL_MODE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCullMode must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-None-07841
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRONT_FACE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetFrontFace must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-None-07843
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, vkCmdSetDepthTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-None-07844
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthTestEnable` is VK_TRUE, then vkCmdSetDepthWriteEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-None-07845
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_COMPARE_OP dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthTestEnable` is VK_TRUE, then vkCmdSetDepthCompareOp must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-None-07846
  If the `depthBounds` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthBoundsTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-None-07847
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetStencilTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-None-07848
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_OP dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilOp must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-viewportCount-03417
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, and the state is not inherited, then vkCmdSetViewportWithCount must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-scissorCount-03418
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT dynamic state enabled, and the state is not inherited, then vkCmdSetScissorWithCount must have been called and not subsequently invalidated in the current command buffer prior to this drawing

- VUID-vkCmdDrawIndexedIndirectCount-viewportCount-03419
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with both the VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic states enabled, and the state is not inherited, then the `viewportCount` parameter of `vkCmdSetViewportWithCount` must match the `scissorCount` parameter of `vkCmdSetScissorWithCount`

- VUID-vkCmdDrawIndexedIndirectCount-viewportCount-04137
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportWScalingStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndexedIndirectCount-viewportCount-04138
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, the current value of `viewportWScalingEnable` is VK_TRUE, then vkCmdSetViewportWScalingNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-None-08636
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, the current value of `viewportWScalingEnable` is VK_TRUE, then the `viewportCount` parameter in the last call to vkCmdSetViewportWScalingNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndexedIndirectCount-viewportCount-04139
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportShadingRateImageStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndexedIndirectCount-shadingRateImage-09233
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_COARSE_SAMPLE_ORDER_NV and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoarseSampleOrderNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-shadingRateImage-09234
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `shadingRateImageEnable` is VK_TRUE, then vkCmdSetViewportShadingRatePaletteNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-None-08637
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `shadingRateImageEnable` is VK_TRUE, then the `viewportCount` parameter in the last call to vkCmdSetViewportShadingRatePaletteNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndexedIndirectCount-VkPipelineVieportCreateInfo-04141
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled and a VkPipelineViewportSwizzleStateCreateInfoNV structure chained from VkPipelineViewportStateCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportSwizzleStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndexedIndirectCount-VkPipelineVieportCreateInfo-04142
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled and a VkPipelineViewportExclusiveScissorStateCreateInfoNV structure chained from VkPipelineViewportStateCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportExclusiveScissorStateCreateInfoNV::`exclusiveScissorCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndexedIndirectCount-None-07878
  If the `exclusiveScissor` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_ENABLE_NV dynamic state enabled, then vkCmdSetExclusiveScissorEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-None-07879
  If the `exclusiveScissor` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_NV dynamic state enabled, and the most recent call to vkCmdSetExclusiveScissorEnableNV in the current command buffer set any element of `pExclusiveScissorEnables` to VK_TRUE, then vkCmdSetExclusiveScissorNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-None-04876
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE dynamic state enabled, then vkCmdSetRasterizerDiscardEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-None-04877
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthBiasEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-logicOp-04878
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LOGIC_OP_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `logicOpEnable` is VK_TRUE, then vkCmdSetLogicOpEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-primitiveFragmentShadingRateWithMultipleViewports-04552
  If the `primitiveFragmentShadingRateWithMultipleViewports` limit is not supported, the bound graphics pipeline was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, and any of the shader stages of the bound graphics pipeline write to the `PrimitiveShadingRateKHR` built-in, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and the `viewportCount` parameter of `vkCmdSetViewportWithCount` must be `1`

- VUID-vkCmdDrawIndexedIndirectCount-primitiveFragmentShadingRateWithMultipleViewports-08642
  If the `primitiveFragmentShadingRateWithMultipleViewports` limit is not supported, and any shader object bound to a graphics stage writes to the `PrimitiveShadingRateKHR` built-in, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and the `viewportCount` parameter of `vkCmdSetViewportWithCount` must be `1`

- VUID-vkCmdDrawIndexedIndirectCount-blendEnable-04727
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, then for each color attachment, if the corresponding image view’s format features do not contain VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT, then the corresponding current value of `blendEnable` must be VK_FALSE

- VUID-vkCmdDrawIndexedIndirectCount-None-08644
  If a shader object is bound to any graphics stage or a graphics pipeline is bound, the current value of `rasterizerDiscardEnable` is VK_FALSE, and none of the following is enabled:

  - the `VK_AMD_mixed_attachment_samples` extension

  - the `VK_NV_framebuffer_mixed_samples` extension

  - the `multisampledRenderToSingleSampled` feature

  then the current value of `rasterizationSamples` must be the same as the current color and/or depth/stencil attachments

- VUID-vkCmdDrawIndexedIndirectCount-None-08876
  If a shader object is bound to any graphics stage, the current render pass instance must have been begun with vkCmdBeginRendering

- VUID-vkCmdDrawIndexedIndirectCount-imageView-06172
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawIndexedIndirectCount-imageView-06173
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawIndexedIndirectCount-imageView-06174
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawIndexedIndirectCount-imageView-06175
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawIndexedIndirectCount-imageView-06176
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawIndexedIndirectCount-imageView-06177
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawIndexedIndirectCount-viewMask-06178
  If the current render pass instance was begun with vkCmdBeginRendering, the bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::`viewMask` equal to VkRenderingInfo::`viewMask`

- VUID-vkCmdDrawIndexedIndirectCount-colorAttachmentCount-06179
  If the `dynamicRenderingUnusedAttachments` feature is not enabled and the current render pass instance was begun with vkCmdBeginRendering, the bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::`colorAttachmentCount` equal to VkRenderingInfo::`colorAttachmentCount`

- VUID-vkCmdDrawIndexedIndirectCount-dynamicRenderingUnusedAttachments-08910
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound graphics pipeline

- VUID-vkCmdDrawIndexedIndirectCount-dynamicRenderingUnusedAttachments-08912
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` equal to VK_NULL_HANDLE must have the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound pipeline equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirectCount-dynamicRenderingUnusedAttachments-08911
  If the `dynamicRenderingUnusedAttachments` feature is enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound graphics pipeline, or the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats`, if it exists, must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirectCount-colorAttachmentCount-09362
  If the current render pass instance was begun with vkCmdBeginRendering, with a VkRenderingInfo::`colorAttachmentCount` equal to `1`, there is no shader object bound to any graphics stage, and a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, each element of the VkRenderingInfo::`pColorAttachments` array with a `resolveImageView` not equal to VK_NULL_HANDLE must have been created with an image created with a VkExternalFormatANDROID::`externalFormat` value equal to the VkExternalFormatANDROID::`externalFormat` value used to create the bound graphics pipeline

- VUID-vkCmdDrawIndexedIndirectCount-None-09363
  If there is no shader object bound to any graphics stage, the current render pass instance was begun with vkCmdBeginRendering and a VkRenderingInfo::`colorAttachmentCount` equal to `1`, and a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with an image created with a VkExternalFormatANDROID::`externalFormat` value equal to the VkExternalFormatANDROID::`externalFormat` value used to create the bound graphics pipeline

- VUID-vkCmdDrawIndexedIndirectCount-None-09364
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetColorBlendEnableEXT must have set the blend enable to VK_FALSE prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-None-09365
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetRasterizationSamplesEXT must have set `rasterizationSamples` to VK_SAMPLE_COUNT_1_BIT prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-None-09368
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetFragmentShadingRateKHR must have set `pFragmentSize->width` to `1` prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-None-09369
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetFragmentShadingRateKHR must have set `pFragmentSize->height` to `1` prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-None-07749
  If the `colorWriteEnable` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorWriteEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-attachmentCount-07750
  If the `colorWriteEnable` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the `attachmentCount` parameter of most recent call to `vkCmdSetColorWriteEnableEXT` in the current command buffer must be greater than or equal to the number of active color attachments

- VUID-vkCmdDrawIndexedIndirectCount-None-07751
  If the `VK_EXT_discard_rectangles` extension is enabled, a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT dynamic state enabled and the `pNext` chain of VkGraphicsPipelineCreateInfo included a VkPipelineDiscardRectangleStateCreateInfoEXT structure, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for each discard rectangle in VkPipelineDiscardRectangleStateCreateInfoEXT::`discardRectangleCount`

- VUID-vkCmdDrawIndexedIndirectCount-rasterizerDiscardEnable-09236
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT dynamic state enabled and the `pNext` chain of VkGraphicsPipelineCreateInfo did not include a VkPipelineDiscardRectangleStateCreateInfoEXT structure, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for each discard rectangle in VkPhysicalDeviceDiscardRectanglePropertiesEXT::`maxDiscardRectangles`

- VUID-vkCmdDrawIndexedIndirectCount-None-07880
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDiscardRectangleEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-None-07881
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_MODE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-dynamicRenderingUnusedAttachments-08913
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->imageView` was VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirectCount-dynamicRenderingUnusedAttachments-08914
  If current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawIndexedIndirectCount-dynamicRenderingUnusedAttachments-08915
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, and the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->imageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirectCount-dynamicRenderingUnusedAttachments-08916
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->imageView` was VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirectCount-dynamicRenderingUnusedAttachments-08917
  If current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawIndexedIndirectCount-dynamicRenderingUnusedAttachments-08918
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, and the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->imageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirectCount-imageView-06183
  If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentShadingRateAttachmentInfoKHR::`imageView` was not VK_NULL_HANDLE, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

- VUID-vkCmdDrawIndexedIndirectCount-dynamicRenderingLocalRead-11797
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingLocalRead` feature is enabled, the VK_RENDERING_LOCAL_READ_CONCURRENT_ACCESS_CONTROL_BIT_KHR flag is specified, and an attachment is being used as a feedback loop as specified by VK_RENDERING_ATTACHMENT_INPUT_ATTACHMENT_FEEDBACK_BIT_KHR, VkRenderingAttachmentFlagsInfoKHR::`flags` for that attachment must include VK_RENDERING_ATTACHMENT_INPUT_ATTACHMENT_FEEDBACK_BIT_KHR

- VUID-vkCmdDrawIndexedIndirectCount-imageView-06184
  If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentDensityMapAttachmentInfoEXT::`imageView` was not VK_NULL_HANDLE, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT

- VUID-vkCmdDrawIndexedIndirectCount-layers-10831
  If the current render pass instance was created with VK_RENDERING_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE or VK_RENDER_PASS_CREATE_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE, and the bound graphics pipeline was created with VK_PIPELINE_CREATE_2_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE, then the current render pass instance must have a `layers` value less than or equal to VkPipelineFragmentDensityMapLayeredCreateInfoVALVE::`maxFragmentDensityMapLayers`

- VUID-vkCmdDrawIndexedIndirectCount-colorAttachmentCount-06185
  If the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with a sample count equal to the corresponding element of the `pColorAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline

- VUID-vkCmdDrawIndexedIndirectCount-pDepthAttachment-06186
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of the `depthStencilAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawIndexedIndirectCount-pStencilAttachment-06187
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of the `depthStencilAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawIndexedIndirectCount-multisampledRenderToSingleSampled-07285
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with a sample count equal to the value of `rasterizationSamples` for the bound graphics pipeline

- VUID-vkCmdDrawIndexedIndirectCount-multisampledRenderToSingleSampled-07286
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawIndexedIndirectCount-multisampledRenderToSingleSampled-07287
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawIndexedIndirectCount-pNext-07935
  If this command is called inside a render pass instance started with vkCmdBeginRendering, and the `pNext` chain of VkRenderingInfo includes a VkMultisampledRenderToSingleSampledInfoEXT structure with `multisampledRenderToSingleSampledEnable` equal to VK_TRUE, then the value of `rasterizationSamples` for the bound graphics pipeline must be equal to VkMultisampledRenderToSingleSampledInfoEXT::`rasterizationSamples`

- VUID-vkCmdDrawIndexedIndirectCount-renderPass-06198
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline must have been created with a VkGraphicsPipelineCreateInfo::`renderPass` equal to VK_NULL_HANDLE

- VUID-vkCmdDrawIndexedIndirectCount-pColorAttachments-08963
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound with a fragment shader that statically writes to a color attachment, the color write mask is not zero, color writes are enabled, and the corresponding element of the VkRenderingInfo::`pColorAttachments->imageView` was not VK_NULL_HANDLE, then the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirectCount-pColorAttachments-11539
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound with a fragment shader that statically writes to a color attachment, the color write mask is not zero, color writes are enabled, and the corresponding element of the VkRenderingInfo::`pColorAttachments->resolveImageView` was not VK_NULL_HANDLE, then the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirectCount-pDepthAttachment-08964
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound, depth test is enabled, and the VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, then the VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirectCount-pDepthAttachment-11540
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound, depth test is enabled, and the VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, then the VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirectCount-pStencilAttachment-08965
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound, stencil test is enabled and the VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, then the VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirectCount-pStencilAttachment-11860
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound, stencil test is enabled and the VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, then the VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirectCount-flags-10582
  If the current render pass instance was begun with a vkCmdBeginRendering call in `commandBuffer`, its VkRenderingInfo::`flags` parameter must not have VK_RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT set unless VK_RENDERING_CONTENTS_INLINE_BIT_KHR is also set

- VUID-vkCmdDrawIndexedIndirectCount-primitivesGeneratedQueryWithRasterizerDiscard-06708
  If the `primitivesGeneratedQueryWithRasterizerDiscard` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, rasterization discard must not be enabled

- VUID-vkCmdDrawIndexedIndirectCount-primitivesGeneratedQueryWithNonZeroStreams-06709
  If the `primitivesGeneratedQueryWithNonZeroStreams` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, the bound graphics pipeline must not have been created with a non-zero value in `VkPipelineRasterizationStateStreamCreateInfoEXT`::`rasterizationStream`

- VUID-vkCmdDrawIndexedIndirectCount-None-07620
  If the `depthClamp` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLAMP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthClampEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-None-07621
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_POLYGON_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetPolygonModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-None-07622
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetRasterizationSamplesEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-None-07623
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetSampleMaskEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-alphaToCoverageEnable-08919
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT dynamic state enabled, and `alphaToCoverageEnable` was VK_TRUE in the last call to vkCmdSetAlphaToCoverageEnableEXT, then the Fragment Output Interface must contain a variable for the alpha `Component` word in `Location` 0 at `Index` 0

- VUID-vkCmdDrawIndexedIndirectCount-alphaToCoverageEnable-08920
  If a shader object is bound to any graphics stage, and the most recent call to vkCmdSetAlphaToCoverageEnableEXT in the current command buffer set `alphaToCoverageEnable` to VK_TRUE, then the Fragment Output Interface must contain a variable for the alpha `Component` word in `Location` 0 at `Index` 0

- VUID-vkCmdDrawIndexedIndirectCount-None-07624
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAlphaToCoverageEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-None-07625
  If the `alphaToOne` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ALPHA_TO_ONE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAlphaToOneEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-None-07626
  If the `logicOp` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LOGIC_OP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetLogicOpEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-None-07627
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and there are color attachments bound, then vkCmdSetColorBlendEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-None-07629
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and there are color attachments bound, then vkCmdSetColorWriteMaskEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-None-07630
  If the `geometryStreams` feature is enabled, and a shader object is bound to the VK_SHADER_STAGE_GEOMETRY_BIT stage or a graphics pipeline is bound which was created with both a VK_SHADER_STAGE_GEOMETRY_BIT stage and the VK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXT dynamic state enabled, then vkCmdSetRasterizationStreamEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-None-07631
  If the `VK_EXT_conservative_rasterization` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_CONSERVATIVE_RASTERIZATION_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetConservativeRasterizationModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-None-07632
  If the `VK_EXT_conservative_rasterization` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXTRA_PRIMITIVE_OVERESTIMATION_SIZE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `conservativeRasterizationMode` is VK_CONSERVATIVE_RASTERIZATION_MODE_OVERESTIMATE_EXT, then vkCmdSetExtraPrimitiveOverestimationSizeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-conservativePointAndLineRasterization-07499
  If the `VK_EXT_conservative_rasterization` extension is enabled, `conservativePointAndLineRasterization` is not supported, a shader object is bound to any graphics stage or a graphics pipeline is bound, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line or point topology class, then the current value of `conservativeRasterizationMode` must be VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT

- VUID-vkCmdDrawIndexedIndirectCount-None-07633
  If the `depthClipEnable` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLIP_ENABLE_EXT dynamic state, then vkCmdSetDepthClipEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-None-07636
  If the `VK_EXT_provoking_vertex` extension is enabled, a shader object is bound to the VK_SHADER_STAGE_VERTEX_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_PROVOKING_VERTEX_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetProvokingVertexModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-None-08666
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineRasterizationModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-None-08669
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineStippleEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-None-07849
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled and a shader object is bound to any graphics stage, or a bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stippledLineEnable` is VK_TRUE, then vkCmdSetLineStipple must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-None-10608
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic state enabled, the effective rasterization input topology is in the line topology class, and the current `lineRasterizationMode` is VK_LINE_RASTERIZATION_MODE_BRESENHAM or VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH, then the current `alphaToCoverageEnable`, `alphaToOneEnable` and `sampleShadingEnable` states must all be VK_FALSE

- VUID-vkCmdDrawIndexedIndirectCount-None-07639
  If the `depthClipControl` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLIP_NEGATIVE_ONE_TO_ONE_EXT dynamic state enabled, then vkCmdSetDepthClipNegativeOneToOneEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-None-09650
  If the `depthClampControl` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLAMP_RANGE_EXT dynamic state enabled, and the current value of `depthClampEnable` is VK_TRUE, then vkCmdSetDepthClampRangeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-None-07640
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_ENABLE_NV dynamic state enabled, then vkCmdSetViewportWScalingEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-None-07641
  If the `VK_NV_viewport_swizzle` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic state enabled, then vkCmdSetViewportSwizzleNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-None-07642
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageToColorEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-None-07643
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_LOCATION_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageToColorEnable` is VK_TRUE, then vkCmdSetCoverageToColorLocationNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-None-07644
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_MODE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageModulationModeNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-None-07645
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageModulationMode` is any value other than VK_COVERAGE_MODULATION_MODE_NONE_NV, then vkCmdSetCoverageModulationTableEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-None-07646
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageModulationTableEnable` is VK_TRUE, then vkCmdSetCoverageModulationTableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-None-07647
  If the `shadingRateImage` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SHADING_RATE_IMAGE_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetShadingRateImageEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-pipelineFragmentShadingRate-09238
  If the `pipelineFragmentShadingRate` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetFragmentShadingRateKHR must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-None-07648
  If the `representativeFragmentTest` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_REPRESENTATIVE_FRAGMENT_TEST_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetRepresentativeFragmentTestEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-None-07649
  If the `coverageReductionMode` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageReductionModeNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-rasterizationSamples-07471
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current subpass does not use any color and/or depth/stencil attachments, then the `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT must follow the rules for a zero-attachment subpass

- VUID-vkCmdDrawIndexedIndirectCount-samples-07472
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state disabled, then the `samples` parameter in the last call to vkCmdSetSampleMaskEXT must be greater or equal to the VkPipelineMultisampleStateCreateInfo::`rasterizationSamples` parameter used to create the bound graphics pipeline

- VUID-vkCmdDrawIndexedIndirectCount-samples-07473
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT state and VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT states enabled, then the `samples` parameter in the last call to vkCmdSetSampleMaskEXT must be greater or equal to the `rasterizationSamples` parameter in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawIndexedIndirectCount-None-09211
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, or a shader object is bound to any graphics stage, and the current render pass instance includes a VkMultisampledRenderToSingleSampledInfoEXT structure with `multisampledRenderToSingleSampledEnable` equal to VK_TRUE, then the `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT must be the same as the `rasterizationSamples` member of that structure

- VUID-vkCmdDrawIndexedIndirectCount-firstAttachment-07476
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic states enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the last call to vkCmdSetColorBlendEnableEXT in the current command buffer prior to this drawing command must have set a value for all active color attachments

- VUID-vkCmdDrawIndexedIndirectCount-firstAttachment-07478
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT dynamic states enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the last call to vkCmdSetColorWriteMaskEXT in the current command buffer prior to this drawing command must have set a value for all active color attachments

- VUID-vkCmdDrawIndexedIndirectCount-advancedBlendMaxColorAttachments-07480
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT and VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic states enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and an active color attachment current value of `blendEnable` is VK_TRUE, then the number of active color attachments must not exceed `advancedBlendMaxColorAttachments`

- VUID-vkCmdDrawIndexedIndirectCount-None-10862
  If a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT , but not the VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorBlendEquationEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawIndexedIndirectCount-rasterizerDiscardEnable-10863
  If a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT, but not the VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorBlendAdvancedEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawIndexedIndirectCount-None-10864
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT and VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then either vkCmdSetColorBlendAdvancedEXT or vkCmdSetColorBlendEquationEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawIndexedIndirectCount-primitivesGeneratedQueryWithNonZeroStreams-07481
  If the `primitivesGeneratedQueryWithNonZeroStreams` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, and the bound graphics pipeline was created with VK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXT state enabled, the last call to vkCmdSetRasterizationStreamEXT must have set the `rasterizationStream` to zero

- VUID-vkCmdDrawIndexedIndirectCount-sampleLocationsPerPixel-07482
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state disabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then the `sampleLocationsPerPixel` member of `pSampleLocationsInfo` in the last call to vkCmdSetSampleLocationsEXT must equal the `rasterizationSamples` member of the VkPipelineMultisampleStateCreateInfo structure the bound graphics pipeline has been created with

- VUID-vkCmdDrawIndexedIndirectCount-sampleLocationsPerPixel-07483
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then the `sampleLocationsPerPixel` member of `pSampleLocationsInfo` in the last call to vkCmdSetSampleLocationsEXT must equal the `rasterizationSamples` parameter of the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawIndexedIndirectCount-sampleLocationsEnable-07484
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT then the current active depth attachment must have been created with the VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit set

- VUID-vkCmdDrawIndexedIndirectCount-sampleLocationsEnable-07485
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, then the `sampleLocationsInfo.maxSampleLocationGridSize.width` in the last call to vkCmdSetSampleLocationsEXT must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.width` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling `rasterizationSamples`

- VUID-vkCmdDrawIndexedIndirectCount-sampleLocationsEnable-07486
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, then the `sampleLocationsInfo.maxSampleLocationGridSize.height` in the last call to vkCmdSetSampleLocationsEXT must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.height` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling `rasterizationSamples`

- VUID-vkCmdDrawIndexedIndirectCount-sampleLocationsEnable-07487
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, the fragment shader code must not statically use the extended instruction `InterpolateAtSample`

- VUID-vkCmdDrawIndexedIndirectCount-sampleLocationsEnable-07936
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationGridSize.width` must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.width` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling the value of `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawIndexedIndirectCount-sampleLocationsEnable-07937
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationGridSize.height` must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.height` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling the value of `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawIndexedIndirectCount-sampleLocationsEnable-07938
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationsPerPixel` must equal `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawIndexedIndirectCount-coverageModulationTableEnable-07488
  If a shader object is bound to any graphics stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NV state enabled, and the last call to vkCmdSetCoverageModulationTableEnableNV set `coverageModulationTableEnable` to VK_TRUE, then the `coverageModulationTableCount` parameter in the last call to vkCmdSetCoverageModulationTableNV must equal the current `rasterizationSamples` divided by the number of color samples in the current active color attachment

- VUID-vkCmdDrawIndexedIndirectCount-rasterizationSamples-07489
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, and if current subpass has a depth/stencil attachment and depth test, stencil test, or depth bounds test are enabled in the bound pipeline, then the current `rasterizationSamples` must be the same as the sample count of the depth/stencil attachment

- VUID-vkCmdDrawIndexedIndirectCount-coverageToColorEnable-07490
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV state enabled and the last call to vkCmdSetCoverageToColorEnableNV set the `coverageToColorEnable` to VK_TRUE, then there must be an active color attachment at the location selected by the last call to vkCmdSetCoverageToColorLocationNV `coverageToColorLocation`, with a VkFormat of VK_FORMAT_R8_UINT, VK_FORMAT_R8_SINT, VK_FORMAT_R16_UINT, VK_FORMAT_R16_SINT, VK_FORMAT_R32_UINT, or VK_FORMAT_R32_SINT

- VUID-vkCmdDrawIndexedIndirectCount-rasterizerDiscardEnable-09420
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, and a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, and the most recent call to vkCmdSetRasterizerDiscardEnable in the current command buffer set `rasterizerDiscardEnable` to VK_FALSE, and the last call to vkCmdSetCoverageToColorEnableNV set the `coverageToColorEnable` to VK_TRUE, then there must be an active color attachment at the location selected by the last call to vkCmdSetCoverageToColorLocationNV `coverageToColorLocation`, with a VkFormat of VK_FORMAT_R8_UINT, VK_FORMAT_R8_SINT, VK_FORMAT_R16_UINT, VK_FORMAT_R16_SINT, VK_FORMAT_R32_UINT, or VK_FORMAT_R32_SINT

- VUID-vkCmdDrawIndexedIndirectCount-coverageReductionMode-07491
  If the `coverageReductionMode` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV or VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic states enabled, then the current values of `coverageReductionMode`, `rasterizationSamples`, the sample counts for the color and depth/stencil attachments (if the subpass has them) must be a valid combination returned by vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV

- VUID-vkCmdDrawIndexedIndirectCount-viewportCount-07492
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportSwizzleStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndexedIndirectCount-viewportCount-07493
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic states enabled then the `viewportCount` parameter in the last call to vkCmdSetViewportSwizzleNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndexedIndirectCount-viewportCount-09421
  If the `VK_NV_viewport_swizzle` extension is enabled, and a shader object is bound to any graphics stage, then the `viewportCount` parameter in the last call to vkCmdSetViewportSwizzleNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndexedIndirectCount-rasterizationSamples-07494
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, and the `coverageReductionMode` feature is not enabled, or the current value of `coverageReductionMode` is not VK_COVERAGE_REDUCTION_MODE_TRUNCATE_NV, and the current value of `rasterizationSamples` is greater than sample count of the color attachment, then sample shading must be disabled

- VUID-vkCmdDrawIndexedIndirectCount-stippledLineEnable-07495
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_RECTANGULAR, then the `stippledRectangularLines` feature must be enabled

- VUID-vkCmdDrawIndexedIndirectCount-stippledLineEnable-07496
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_BRESENHAM, then the `stippledBresenhamLines` feature must be enabled

- VUID-vkCmdDrawIndexedIndirectCount-stippledLineEnable-07497
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH, then the `stippledSmoothLines` feature must be enabled

- VUID-vkCmdDrawIndexedIndirectCount-stippledLineEnable-07498
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_DEFAULT, then the `stippledRectangularLines` feature must be enabled and VkPhysicalDeviceLimits::`strictLines` must be VK_TRUE

- VUID-vkCmdDrawIndexedIndirectCount-stage-07073
  If the bound pipeline was created with the VkPipelineShaderStageCreateInfo::`stage` member of an element of VkGraphicsPipelineCreateInfo::`pStages` set to VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT, then Mesh Shader Queries must not be active

- VUID-vkCmdDrawIndexedIndirectCount-None-08877
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ATTACHMENT_FEEDBACK_LOOP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAttachmentFeedbackLoopEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-None-07850
  If dynamic state was inherited from VkCommandBufferInheritanceViewportScissorInfoNV, it must be set in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-nextStage-10745
  For each shader object bound to a graphics stage, except for shader object bound to the last graphics stage in the logical pipeline, it must have been created with a `nextStage` including the corresponding bit to the shader object bound to the following graphics stage in the logical pipeline

- VUID-vkCmdDrawIndexedIndirectCount-None-08684
  If there is no bound graphics pipeline, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_VERTEX_BIT

- VUID-vkCmdDrawIndexedIndirectCount-None-08685
  If there is no bound graphics pipeline, and the `tessellationShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT

- VUID-vkCmdDrawIndexedIndirectCount-None-08686
  If there is no bound graphics pipeline, and the `tessellationShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT

- VUID-vkCmdDrawIndexedIndirectCount-None-08687
  If there is no bound graphics pipeline, and the `geometryShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_GEOMETRY_BIT

- VUID-vkCmdDrawIndexedIndirectCount-None-08688
  If there is no bound graphics pipeline, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_FRAGMENT_BIT

- VUID-vkCmdDrawIndexedIndirectCount-None-08689
  If there is no bound graphics pipeline, and the `taskShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TASK_BIT_EXT

- VUID-vkCmdDrawIndexedIndirectCount-None-08690
  If there is no bound graphics pipeline, and the `meshShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-vkCmdDrawIndexedIndirectCount-None-08693
  If there is no bound graphics pipeline, and at least one of the `taskShader` and `meshShader` features is enabled, one of the VK_SHADER_STAGE_VERTEX_BIT or VK_SHADER_STAGE_MESH_BIT_EXT stages must have a valid `VkShaderEXT` bound, and the other must have no `VkShaderEXT` bound

- VUID-vkCmdDrawIndexedIndirectCount-None-08696
  If there is no bound graphics pipeline, and a valid `VkShaderEXT` is bound to the VK_SHADER_STAGE_VERTEX_BIT stage, there must be no `VkShaderEXT` bound to either the VK_SHADER_STAGE_TASK_BIT_EXT stage or the VK_SHADER_STAGE_MESH_BIT_EXT stage

- VUID-vkCmdDrawIndexedIndirectCount-None-08698
  If any graphics shader is bound which was created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag, then all shaders created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag in the same vkCreateShadersEXT call must also be bound

- VUID-vkCmdDrawIndexedIndirectCount-None-08699
  If any graphics shader is bound which was created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag, any stages in between stages whose shaders which did not create a shader with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag as part of the same vkCreateShadersEXT call must not have any `VkShaderEXT` bound

- VUID-vkCmdDrawIndexedIndirectCount-None-08878
  All bound graphics shader objects must have been created with identical or identically defined push constant ranges

- VUID-vkCmdDrawIndexedIndirectCount-None-08879
  All bound graphics shader objects must have either been created with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag set, or with identical or identically defined arrays of descriptor set layouts

- VUID-vkCmdDrawIndexedIndirectCount-colorAttachmentCount-09372
  If the current render pass instance was begun with vkCmdBeginRendering and a VkRenderingInfo::`colorAttachmentCount` equal to `1`, a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, and a fragment shader is bound, it must not declare the `DepthReplacing` or `StencilRefReplacingEXT` execution modes

- VUID-vkCmdDrawIndexedIndirectCount-pDynamicStates-08715
  If the bound graphics pipeline state includes a fragment shader stage, was created with VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`, and the fragment shader declares the `EarlyFragmentTests` execution mode and uses `OpDepthAttachmentReadEXT`, the `depthWriteEnable` parameter in the last call to vkCmdSetDepthWriteEnable must be VK_FALSE

- VUID-vkCmdDrawIndexedIndirectCount-pDynamicStates-08716
  If the bound graphics pipeline state includes a fragment shader stage, was created with VK_DYNAMIC_STATE_STENCIL_WRITE_MASK set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`, and the fragment shader declares the `EarlyFragmentTests` execution mode and uses `OpStencilAttachmentReadEXT`, the `writeMask` parameter in the last call to vkCmdSetStencilWriteMask must be `0`

- VUID-vkCmdDrawIndexedIndirectCount-None-09116
  If a shader object is bound to any graphics stage or the bound graphics pipeline was created with VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT, and the format of any color attachment is VK_FORMAT_E5B9G9R9_UFLOAT_PACK32, the corresponding element of the `pColorWriteMasks` parameter of vkCmdSetColorWriteMaskEXT must either include all of VK_COLOR_COMPONENT_R_BIT, VK_COLOR_COMPONENT_G_BIT, VK_COLOR_COMPONENT_B_BIT, and VK_COLOR_COMPONENT_A_BIT, or none of them

- VUID-vkCmdDrawIndexedIndirectCount-maxFragmentDualSrcAttachments-09239
  If blending is enabled for any attachment where either the source or destination blend factors for that attachment use the secondary color input, the maximum value of `Location` for any output attachment statically used in the `Fragment` `Execution` `Model` executed by this command must be less than `maxFragmentDualSrcAttachments`

- VUID-vkCmdDrawIndexedIndirectCount-None-09548
  If the current render pass was begun with vkCmdBeginRendering, there is no shader object bound to any graphics stage, the value of each element of VkRenderingAttachmentLocationInfo::`pColorAttachmentLocations` in the bound pipeline must match the value for the corresponding locations set currently in the current render pass instance

- VUID-vkCmdDrawIndexedIndirectCount-None-09549
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of each element of VkRenderingInputAttachmentIndexInfo::`pColorAttachmentInputIndices` in the bound pipeline must match the value for the corresponding index set currently in the current render pass instance

- VUID-vkCmdDrawIndexedIndirectCount-None-10927
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` in the bound pipeline must match the value set currently in the current render pass instance

- VUID-vkCmdDrawIndexedIndirectCount-None-10928
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` in the bound pipeline must match the value set currently in the current render pass instance

- VUID-vkCmdDrawIndexedIndirectCount-None-09642
  If the current render pass was begun with vkCmdBeginRendering with the VK_RENDERING_ENABLE_LEGACY_DITHERING_BIT_EXT flag, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_2_ENABLE_LEGACY_DITHERING_BIT_EXT

- VUID-vkCmdDrawIndexedIndirectCount-None-09643
  If the bound graphics pipeline was created with VK_PIPELINE_CREATE_2_ENABLE_LEGACY_DITHERING_BIT_EXT, the current render pass must have begun with vkCmdBeginRendering with the VK_RENDERING_ENABLE_LEGACY_DITHERING_BIT_EXT flag

- VUID-vkCmdDrawIndexedIndirectCount-None-10677
  If the per-tile execution model is enabled, the tileShadingPerTileDraw feature must be enabled

- VUID-vkCmdDrawIndexedIndirectCount-None-10772
  If a shader object is bound to any graphics stage, multiview functionality must not be enabled in the current render pass

- VUID-vkCmdDrawIndexedIndirectCount-multiviewPerViewViewports-12262
  If the `multiviewPerViewViewports` feature is enabled, then the index of the most significant bit in current render pass instance `viewMask` must be less than the current value of `viewportCount`

- VUID-vkCmdDrawIndexedIndirectCount-multiviewPerViewViewports-12263
  If the `multiviewPerViewViewports` feature is enabled, then the index of the most significant bit in current render pass instance `viewMask` must be less than the current value of `scissorCount`

- VUID-vkCmdDrawIndexedIndirectCount-flags-11521
  If current render pass instance was begun with vkCmdBeginRendering with VkRenderingInfo::`flags` which includes VK_RENDERING_FRAGMENT_REGION_BIT_EXT, and if sample shading is enabled (explicitly or implicitly), then the minimum fraction for sample shading must equal 0.0

- VUID-vkCmdDrawIndexedIndirectCount-None-11522
  If the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, and the `dynamicRenderingUnusedAttachments` feature is not enabled, the graphics pipeline bound must have been created with a VkCustomResolveCreateInfoEXT

- VUID-vkCmdDrawIndexedIndirectCount-None-11523
  If the current render pass instance was begun with vkCmdBeginRendering and does not contain a custom resolve, and the `dynamicRenderingUnusedAttachments` feature is not enabled, the graphics pipeline bound must not have been created with a VkCustomResolveCreateInfoEXT

- VUID-vkCmdDrawIndexedIndirectCount-customResolve-11524
  If the current render pass instance was begun with vkCmdBeginRendering and vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, the graphics pipeline bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_TRUE

- VUID-vkCmdDrawIndexedIndirectCount-customResolve-11525
  If the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, and vkCmdBeginCustomResolveEXT has not been recorded in the render pass instance, the graphics pipeline bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_FALSE

- VUID-vkCmdDrawIndexedIndirectCount-None-11861
  If the `dynamicRenderingUnusedAttachments` feature is not enabled and the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, the bound graphics pipeline must have been created with a VkCustomResolveCreateInfoEXT::`colorAttachmentCount` equal to VkRenderingInfo::`colorAttachmentCount`

- VUID-vkCmdDrawIndexedIndirectCount-None-11862
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound graphics pipeline

- VUID-vkCmdDrawIndexedIndirectCount-None-11863
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` equal to VK_NULL_HANDLE must have the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound pipeline equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirectCount-dynamicRenderingUnusedAttachments-11864
  If the `dynamicRenderingUnusedAttachments` feature is enabled, the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound graphics pipeline, or the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats`, if it exists, must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirectCount-None-11865
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirectCount-None-11866
  If current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`

- VUID-vkCmdDrawIndexedIndirectCount-dynamicRenderingUnusedAttachments-11867
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, and the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirectCount-None-11868
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->resolveImageView` was VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirectCount-None-11869
  If current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`

- VUID-vkCmdDrawIndexedIndirectCount-dynamicRenderingUnusedAttachments-11870
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, and the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndexedIndirectCount-colorAttachmentCount-11871
  If the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0` and vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, then for each element of the VkRenderingInfo::`pColorAttachments` array with a `resolveImageView` not equal to VK_NULL_HANDLE, the `resolveImageView` must have been created with a sample count equal to the value of `rasterizationSamples` for the bound graphics pipeline

- VUID-vkCmdDrawIndexedIndirectCount-pDepthAttachment-11872
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`

- VUID-vkCmdDrawIndexedIndirectCount-pStencilAttachment-11873
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`

- VUID-vkCmdDrawIndexedIndirectCount-customResolve-11529
  If a shader object is bound to the fragment stage, the current render pass instance was begun with vkCmdBeginRendering, a fragment density map attachment is active, and vkCmdBeginCustomResolveEXT has been called, then the fragment shader object bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_TRUE

- VUID-vkCmdDrawIndexedIndirectCount-customResolve-11530
  If a shader object is bound to the fragment stage, the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, a fragment density map attachment is active, and vkCmdBeginCustomResolveEXT has not yet been called, then the fragment shader object bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_FALSE

- VUID-vkCmdDrawIndexedIndirectCount-flags-13361
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, then all bound shader objects must have been created with the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit

- VUID-vkCmdDrawIndexedIndirectCount-flags-13362
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, then the pipeline layout of the bound descriptor sets must have been created with VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT set

- VUID-vkCmdDrawIndexedIndirectCount-flags-13363
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, and any of the descriptor set layouts used to create the pipeline layout of the bound descriptor sets were created with any binding’s VkDescriptorSetLayoutBinding::`stageFlags` set with VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT, then there must be no binding with VkDescriptorSetLayoutBinding::`stageFlags` set with VK_SHADER_STAGE_TASK_BIT_EXT or VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-vkCmdDrawIndexedIndirectCount-flags-13364
  If there are any shader objects bound that were created with `flags` that includes both the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR and VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT bits, the pipeline layout of the bound descriptor sets must have been created with VK_PIPELINE_LAYOUT_CREATE_NO_TASK_SHADER_BIT_KHR set

- VUID-vkCmdDrawIndexedIndirectCount-flags-13365
  If there are any shader objects bound that were created with `flags` that includes both the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR and VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT bits, there must be no shader object bound to the VK_SHADER_STAGE_TASK_BIT_EXT stage

- VUID-vkCmdDrawIndexedIndirectCount-None-04007
  All vertex input bindings accessed via vertex input variables declared in the vertex shader entry point’s interface must have either valid or VK_NULL_HANDLE buffers bound

- VUID-vkCmdDrawIndexedIndirectCount-None-04008
  If the `nullDescriptor` feature is not enabled, all vertex input bindings accessed via vertex input variables declared in the vertex shader entry point’s interface must not be VK_NULL_HANDLE

- VUID-vkCmdDrawIndexedIndirectCount-None-02721
  If the `robustBufferAccess` feature is not enabled, and that pipeline was created without enabling VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS for `vertexInputs`, then for a given vertex buffer binding, any attribute data fetched must be entirely contained within the corresponding vertex buffer binding, as described in Vertex Input Description

- VUID-vkCmdDrawIndexedIndirectCount-format-10389
  For each vertex attribute accessed by this command, if its VkVertexInputAttributeDescription::`format` or VkVertexInputAttributeDescription2EXT::`format` is a packed format, and the `legacyVertexAttributes` feature is not enabled, the value of `attribAddress`, calculated as described in Vertex Input Calculation, must be a multiple of the size of the `format`

- VUID-vkCmdDrawIndexedIndirectCount-format-10390
  For each vertex attribute accessed by this command, if its VkVertexInputAttributeDescription::`format` or VkVertexInputAttributeDescription2EXT::`format` is not a packed format, and either the `legacyVertexAttributes` feature is not enabled or `format` has 64-bit components, the value of `attribAddress`, calculated as described in Vertex Input Calculation, must be a multiple of the component size of the `format`

- VUID-vkCmdDrawIndexedIndirectCount-None-07842
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY dynamic state enabled then vkCmdSetPrimitiveTopology must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-dynamicPrimitiveTopologyUnrestricted-07500
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY dynamic state enabled and the `dynamicPrimitiveTopologyUnrestricted` is VK_FALSE, then the `primitiveTopology` parameter of `vkCmdSetPrimitiveTopology` must be of the same topology class as the pipeline VkPipelineInputAssemblyStateCreateInfo::`topology` state

- VUID-vkCmdDrawIndexedIndirectCount-primitiveTopology-10286
  If a VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage is bound, then the current value of `primitiveTopology` must be VK_PRIMITIVE_TOPOLOGY_PATCH_LIST prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-primitiveTopology-10747
  If vkCmdSetPrimitiveTopology set `primitiveTopology` to VK_PRIMITIVE_TOPOLOGY_PATCH_LIST prior to this drawing command, then a VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage must be bound

- VUID-vkCmdDrawIndexedIndirectCount-primitiveTopology-10748
  If vkCmdSetPrimitiveTopology set `primitiveTopology` to VK_PRIMITIVE_TOPOLOGY_POINT_LIST prior to this drawing command, the `maintenance5` feature is not enabled, both a VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT and VK_SHADER_STAGE_GEOMETRY_BIT stage are not bound, then the `Vertex` `Execution` `Model` must have a `PointSize` decorated variable that is statically written to

- VUID-vkCmdDrawIndexedIndirectCount-pStrides-04913
  If the bound graphics pipeline was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE dynamic state enabled, but without the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled, then vkCmdBindVertexBuffers2 with a non-`NULL` `pStrides` parameter or vkCmdBindVertexBuffers3KHR with `setStride` set to VK_TRUE must have been called and not subsequently invalidated in the current command buffer prior to this draw command

- VUID-vkCmdDrawIndexedIndirectCount-None-13118
  If the bound graphics pipeline was created without the VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE dynamic state enabled, without the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled, and vkCmdBindVertexBuffers3KHR was called and not subsequently invalidated in the current command buffer prior to this draw command, the value of `setStride` in each of its `pBindInfos` elements must have been VK_FALSE

- VUID-vkCmdDrawIndexedIndirectCount-None-04914
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled then vkCmdSetVertexInputEXT must have been called and not subsequently invalidated in the current command buffer prior to this draw command

- VUID-vkCmdDrawIndexedIndirectCount-Input-07939
  If the `vertexAttributeRobustness` feature is not enabled, and the `maintenance9` feature is not enabled, and there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled then all variables with the `Input` storage class decorated with `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` must contain a location in VkVertexInputAttributeDescription2EXT::`location`

- VUID-vkCmdDrawIndexedIndirectCount-Input-08734
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled and either the `legacyVertexAttributes` feature is not enabled or the SPIR-V Type associated with a given `Input` variable of the corresponding `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` is 64-bit, then the numeric type associated with all `Input` variables of the corresponding `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` must be the same as VkVertexInputAttributeDescription2EXT::`format`

- VUID-vkCmdDrawIndexedIndirectCount-format-08936
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled and VkVertexInputAttributeDescription2EXT::`format` has a 64-bit component, then the scalar width associated with all `Input` variables of the corresponding `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` must be 64-bit

- VUID-vkCmdDrawIndexedIndirectCount-format-08937
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled and the scalar width associated with a `Location` decorated `Input` variable in the `Vertex` `Execution` `Model` `OpEntryPoint` is 64-bit, then the corresponding VkVertexInputAttributeDescription2EXT::`format` must have a 64-bit component

- VUID-vkCmdDrawIndexedIndirectCount-None-09203
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled and VkVertexInputAttributeDescription2EXT::`format` has a 64-bit component, then all `Input` variables at the corresponding `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` must not use components that are not present in the format

- VUID-vkCmdDrawIndexedIndirectCount-None-04875
  If there is a shader object bound to the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage or the bound graphics pipeline state was created with both a VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage and the VK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT dynamic state enabled, and the current value of `primitiveTopology` is VK_PRIMITIVE_TOPOLOGY_PATCH_LIST, then vkCmdSetPatchControlPointsEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-None-04879
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE dynamic state enabled then vkCmdSetPrimitiveRestartEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-None-09637
  If the `primitiveTopologyListRestart` feature is not enabled, the input assembly is VK_PRIMITIVE_TOPOLOGY_POINT_LIST, VK_PRIMITIVE_TOPOLOGY_LINE_LIST, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY, or VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY, there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE dynamic state enabled, then vkCmdSetPrimitiveRestartEnable must be VK_FALSE

- VUID-vkCmdDrawIndexedIndirectCount-None-10909
  If the `primitiveTopologyPatchListRestart` feature is not enabled, the input assembly is VK_PRIMITIVE_TOPOLOGY_PATCH_LIST, there is a shader object bound to the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE dynamic state enabled then vkCmdSetPrimitiveRestartEnable must be VK_FALSE

- VUID-vkCmdDrawIndexedIndirectCount-stage-06481
  The bound graphics pipeline must not have been created with the VkPipelineShaderStageCreateInfo::`stage` member of any element of VkGraphicsPipelineCreateInfo::`pStages` set to VK_SHADER_STAGE_TASK_BIT_EXT or VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-vkCmdDrawIndexedIndirectCount-None-08885
  There must be no shader object bound to either of the VK_SHADER_STAGE_TASK_BIT_EXT or VK_SHADER_STAGE_MESH_BIT_EXT stages

- VUID-vkCmdDrawIndexedIndirectCount-None-07619
  If a shader object is bound to the VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stage or a graphics pipeline is bound which was created with both a VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stage and the VK_DYNAMIC_STATE_TESSELLATION_DOMAIN_ORIGIN_EXT dynamic state enabled, then vkCmdSetTessellationDomainOriginEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndexedIndirectCount-OpExecutionMode-12239
  If a shader is bound to both the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stages, and if both stages contain an `OpExecutionMode` instruction specifying the type of subdivision, they must be the same

- VUID-vkCmdDrawIndexedIndirectCount-OpExecutionMode-12240
  If a shader is bound to both the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stages, and if both stages contain an `OpExecutionMode` instruction specifying the orientation of triangles, they must be the same

- VUID-vkCmdDrawIndexedIndirectCount-OpExecutionMode-12241
  If a shader is bound to both the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stages, and if both stages contain an `OpExecutionMode` instruction specifying the segment spacing, they must be the same

- VUID-vkCmdDrawIndexedIndirectCount-OpExecutionMode-12242
  If a shader is bound to both the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stages, and if both stages contain an `OpExecutionMode` instruction specifying the output patch size, they must be the same

- VUID-vkCmdDrawIndexedIndirectCount-buffer-02708
  If `buffer` is non-sparse then it must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-vkCmdDrawIndexedIndirectCount-buffer-02709
  `buffer` must have been created with the VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT usage flag set

- VUID-vkCmdDrawIndexedIndirectCount-offset-02710
  `offset` must be a multiple of `4`

- VUID-vkCmdDrawIndexedIndirectCount-commandBuffer-02711
  `commandBuffer` must not be a protected command buffer

- VUID-vkCmdDrawIndexedIndirectCount-countBuffer-02714
  If `countBuffer` is non-sparse then it must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-vkCmdDrawIndexedIndirectCount-countBuffer-02715
  `countBuffer` must have been created with the VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT usage flag set

- VUID-vkCmdDrawIndexedIndirectCount-countBufferOffset-02716
  `countBufferOffset` must be a multiple of `4`

- VUID-vkCmdDrawIndexedIndirectCount-countBuffer-02717
  The count stored in `countBuffer` must be less than or equal to `VkPhysicalDeviceLimits`::`maxDrawIndirectCount`

- VUID-vkCmdDrawIndexedIndirectCount-countBufferOffset-04129
  (`countBufferOffset` + `sizeof`(uint32_t)) must be less than or equal to the size of `countBuffer`

- VUID-vkCmdDrawIndexedIndirectCount-None-04445
  If the `drawIndirectCount` feature is not enabled this function must not be used

- VUID-vkCmdDrawIndexedIndirectCount-None-07312
  If the `maintenance6` feature is not enabled, a valid index buffer must be bound

- VUID-vkCmdDrawIndexedIndirectCount-primitiveRestartIndex-12401
  If the primitive restart index for this draw operation was set with vkCmdSetPrimitiveRestartIndexEXT, then `primitiveRestartIndex` must not be greater than the maximum representable value for the bound VkIndexType

- VUID-vkCmdDrawIndexedIndirectCount-stride-03142
  `stride` must be a multiple of `4` and must be greater than or equal to sizeof(`VkDrawIndexedIndirectCommand`)

- VUID-vkCmdDrawIndexedIndirectCount-maxDrawCount-03143
  If `maxDrawCount` is greater than or equal to `1`, (`stride` × (`maxDrawCount` - 1) + `offset` + sizeof(`VkDrawIndexedIndirectCommand`)) must be less than or equal to the size of `buffer`

Valid Usage (Implicit)

- VUID-vkCmdDrawIndexedIndirectCount-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdDrawIndexedIndirectCount-buffer-parameter
  `buffer` must be a valid VkBuffer handle

- VUID-vkCmdDrawIndexedIndirectCount-countBuffer-parameter
  `countBuffer` must be a valid VkBuffer handle

- VUID-vkCmdDrawIndexedIndirectCount-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdDrawIndexedIndirectCount-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdDrawIndexedIndirectCount-renderpass
  This command must only be called inside of a render pass instance

- VUID-vkCmdDrawIndexedIndirectCount-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdDrawIndexedIndirectCount-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdDrawIndexedIndirectCount-commonparent
  Each of `buffer`, `commandBuffer`, and `countBuffer` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Inside | Outside | VK_QUEUE_GRAPHICS_BIT | Action

Conditional Rendering

vkCmdDrawIndexedIndirectCount is affected by conditional rendering

#### 27.4.1. Drawing Transform Feedback

It is possible to draw vertex data that was previously captured during active transform feedback by binding one or more of the transform feedback buffers as vertex buffers. A pipeline barrier is required between using the buffers as transform feedback buffers and vertex buffers to ensure all writes to the transform feedback buffers are visible when the data is read as vertex attributes. The source access is VK_ACCESS_TRANSFORM_FEEDBACK_WRITE_BIT_EXT and the destination access is VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT for the pipeline stages VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT and VK_PIPELINE_STAGE_VERTEX_INPUT_BIT respectively. The value written to the counter buffer by vkCmdEndTransformFeedbackEXT can be used to determine the vertex count for the draw. A pipeline barrier is required between using the counter buffer for `vkCmdEndTransformFeedbackEXT` and `vkCmdDrawIndirectByteCountEXT` where the source access is VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT and the destination access is VK_ACCESS_INDIRECT_COMMAND_READ_BIT for the pipeline stages VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT and VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT respectively.

To record a non-indexed draw call, where the vertex count is based on a byte count read from a memory range and the passed in vertex stride parameter, call:

    // Provided by VK_KHR_device_address_commands with VK_EXT_transform_feedback
    void vkCmdDrawIndirectByteCount2EXT(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    instanceCount,
        uint32_t                                    firstInstance,
        const VkBindTransformFeedbackBuffer2InfoEXT* pCounterInfo,
        uint32_t                                    counterOffset,
        uint32_t                                    vertexStride);

- `commandBuffer` is the command buffer into which the command is recorded.

- `instanceCount` is the number of instances to draw.

- `firstInstance` is the instance ID of the first instance to draw.

- `pCounterInfo` is a pointer to a VkBindTransformFeedbackBuffer2InfoEXT defining the range of memory that the byte count is read from.

- `counterOffset` is subtracted from the byte count.

- `vertexStride` is the stride in bytes between each element of the vertex data that is used to calculate the vertex count from the counter value. This value is typically the same value that was used in the graphics pipeline state when the transform feedback was captured as the `XfbStride`.

When the command is executed, primitives are assembled in the same way as done with vkCmdDraw except the `vertexCount` is calculated based on the byte count read from `counterBuffer` at offset `counterBufferOffset`. The assembled primitives execute the bound graphics pipeline.

The effective `vertexCount` is calculated as follows:

    const uint32_t * counterBufferPtr = (const uint8_t *)counterRange.address;
    vertexCount = floor(max(0, (*counterBufferPtr - counterOffset)) / vertexStride);

The effective `firstVertex` is zero.

Valid Usage

- VUID-vkCmdDrawIndirectByteCount2EXT-magFilter-04553
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdDrawIndirectByteCount2EXT-magFilter-09598
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdDrawIndirectByteCount2EXT-mipmapMode-04770
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdDrawIndirectByteCount2EXT-mipmapMode-09599
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdDrawIndirectByteCount2EXT-unnormalizedCoordinates-09635
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `levelCount` and `layerCount` must be 1

- VUID-vkCmdDrawIndirectByteCount2EXT-None-08609
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `viewType` must be VK_IMAGE_VIEW_TYPE_1D or VK_IMAGE_VIEW_TYPE_2D

- VUID-vkCmdDrawIndirectByteCount2EXT-None-08610
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions with `ImplicitLod`, `Dref` or `Proj` in their name

- VUID-vkCmdDrawIndirectByteCount2EXT-None-08611
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions that includes a LOD bias or any offset values

- VUID-vkCmdDrawIndirectByteCount2EXT-None-06479
  If a VkImageView is sampled with depth comparison, the image view’s format features must contain VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT

- VUID-vkCmdDrawIndirectByteCount2EXT-None-02691
  If a VkImageView is accessed using atomic operations as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT

- VUID-vkCmdDrawIndirectByteCount2EXT-None-07888
  If a VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER descriptor is accessed using atomic operations as a result of this command, then the storage texel buffer’s format features must contain VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT

- VUID-vkCmdDrawIndirectByteCount2EXT-None-02692
  If a VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT

- VUID-vkCmdDrawIndirectByteCount2EXT-None-02693
  If the VK_EXT_filter_cubic extension is not enabled and any VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, it must not have a VkImageViewType of VK_IMAGE_VIEW_TYPE_3D, VK_IMAGE_VIEW_TYPE_CUBE, or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY

- VUID-vkCmdDrawIndirectByteCount2EXT-filterCubic-02694
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have a VkImageViewType and format that supports cubic filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubic` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdDrawIndirectByteCount2EXT-filterCubicMinmax-02695
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX as a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubicMinmax` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdDrawIndirectByteCount2EXT-cubicRangeClamp-09212
  If the `cubicRangeClamp` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must not have a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM

- VUID-vkCmdDrawIndirectByteCount2EXT-reductionMode-09213
  Any VkImageView being sampled with a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM as a result of this command must sample with VK_FILTER_CUBIC_EXT

- VUID-vkCmdDrawIndirectByteCount2EXT-selectableCubicWeights-09214
  If the `selectableCubicWeights` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have VkSamplerCubicWeightsCreateInfoQCOM::`cubicWeights` equal to VK_CUBIC_FILTER_WEIGHTS_CATMULL_ROM_QCOM

- VUID-vkCmdDrawIndirectByteCount2EXT-flags-02696
  Any VkImage created with a VkImageCreateInfo::`flags` containing VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV sampled as a result of this command must only be sampled using a VkSamplerAddressMode of VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawIndirectByteCount2EXT-OpTypeImage-07027
  For any VkImageView being written as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawIndirectByteCount2EXT-OpTypeImage-07028
  For any VkImageView being read as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawIndirectByteCount2EXT-OpTypeImage-07029
  For any VkBufferView being written as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown`, the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawIndirectByteCount2EXT-OpTypeImage-07030
  Any VkBufferView being read as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown` then the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawIndirectByteCount2EXT-None-08600
  If a a bound shader was created with a pipeline layout and statically uses a set n, a descriptor set must have been bound to n at the same pipeline bind point, with layouts compatible for set n with the layout(s) used to create the shader, as described in Pipeline Layout Compatibility

- VUID-vkCmdDrawIndirectByteCount2EXT-None-08601
  If a a bound shader was created with a pipeline layout or specified push constant ranges and statically uses a push constant value, that value must have been set for the same pipeline bind point, with push constant ranges that are compatible with the push constant range used to create the shader

- VUID-vkCmdDrawIndirectByteCount2EXT-None-10068
  For each array of resources that is used by a bound shader, the indices used to access members of the array must be less than the descriptor count for the identified binding in the descriptor sets used by this command

- VUID-vkCmdDrawIndirectByteCount2EXT-None-08114
  Descriptors in each bound descriptor set, specified via vkCmdBindDescriptorSets, must be valid if they are accessed as described by descriptor validity by the VkPipeline bound to the pipeline bind point used by this command and the bound VkPipeline was not created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawIndirectByteCount2EXT-imageLayout-00344
  If an image descriptor is accessed by a shader, the VkImageLayout must match the subresource accessible from the VkImageView as defined by the image layout matching rules

- VUID-vkCmdDrawIndirectByteCount2EXT-None-08115
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdBindDescriptorSets, the bound VkPipeline must have been created without VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawIndirectByteCount2EXT-None-08116
  Descriptors in bound descriptor buffers, specified via vkCmdSetDescriptorBufferOffsetsEXT, must be valid if they are dynamically accessed

- VUID-vkCmdDrawIndirectByteCount2EXT-None-08117
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdSetDescriptorBufferOffsetsEXT, the bound VkPipeline must have been created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawIndirectByteCount2EXT-None-08119
  If a descriptor is dynamically used with a VkPipeline created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdDrawIndirectByteCount2EXT-None-08605
  If a descriptor is dynamically used with a VkShaderEXT created with a `VkDescriptorSetLayout` that was created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdDrawIndirectByteCount2EXT-None-08606
  If the `shaderObject` feature is not enabled, a valid pipeline must be bound to the pipeline bind point used by this command

- VUID-vkCmdDrawIndirectByteCount2EXT-None-08608
  If a pipeline is bound to the pipeline bind point used by this command, there must not have been any calls to dynamic state setting commands for any state specified statically in the VkPipeline object bound to the pipeline bind point used by this command, since that pipeline was bound

- VUID-vkCmdDrawIndirectByteCount2EXT-uniformBuffers-06935
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawIndirectByteCount2EXT-None-08612
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawIndirectByteCount2EXT-storageBuffers-06936
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawIndirectByteCount2EXT-None-08613
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a storage buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawIndirectByteCount2EXT-commandBuffer-02707
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, any resource accessed by bound shaders must not be a protected resource

- VUID-vkCmdDrawIndirectByteCount2EXT-viewType-07752
  If a VkImageView is accessed as a result of this command, then the image view’s `viewType` must match the `Dim` operand of the `OpTypeImage` as described in Compatibility Between SPIR-V Image Dimensions and Vulkan ImageView Types

- VUID-vkCmdDrawIndirectByteCount2EXT-format-07753
  If a VkImageView or VkBufferView is accessed as a result of this command, then the numeric type of the view’s `format` and the `Sampled` `Type` operand of the `OpTypeImage` must match

- VUID-vkCmdDrawIndirectByteCount2EXT-OpImageWrite-08795
  If a VkImageView created with a format other than VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the image view’s format

- VUID-vkCmdDrawIndirectByteCount2EXT-OpImageWrite-08796
  If a VkImageView created with the format VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have four components

- VUID-vkCmdDrawIndirectByteCount2EXT-OpImageWrite-04469
  If a VkBufferView is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the buffer view’s format

- VUID-vkCmdDrawIndirectByteCount2EXT-SampledType-04470
  If a VkImageView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdDrawIndirectByteCount2EXT-SampledType-04471
  If a VkImageView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdDrawIndirectByteCount2EXT-SampledType-04472
  If a VkBufferView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdDrawIndirectByteCount2EXT-SampledType-04473
  If a VkBufferView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdDrawIndirectByteCount2EXT-sparseImageInt64Atomics-04474
  If the `sparseImageInt64Atomics` feature is not enabled, VkImage objects created with the VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdDrawIndirectByteCount2EXT-sparseImageInt64Atomics-04475
  If the `sparseImageInt64Atomics` feature is not enabled, VkBuffer objects created with the VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdDrawIndirectByteCount2EXT-OpImageSampleWeightedQCOM-06971
  If `OpImageSampleWeightedQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_SAMPLED_IMAGE_BIT_QCOM

- VUID-vkCmdDrawIndirectByteCount2EXT-OpImageSampleWeightedQCOM-06972
  If `OpImageSampleWeightedQCOM` uses a VkImageView as a sample weight image as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_IMAGE_BIT_QCOM

- VUID-vkCmdDrawIndirectByteCount2EXT-OpImageBoxFilterQCOM-06973
  If `OpImageBoxFilterQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BOX_FILTER_SAMPLED_BIT_QCOM

- VUID-vkCmdDrawIndirectByteCount2EXT-OpImageBlockMatchSSDQCOM-06974
  If `OpImageBlockMatchSSDQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdDrawIndirectByteCount2EXT-OpImageBlockMatchSADQCOM-12420
  If `OpImageBlockMatchSADQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdDrawIndirectByteCount2EXT-OpImageBlockMatchSADQCOM-06976
  If `OpImageBlockMatchSADQCOM` or OpImageBlockMatchSSDQCOM is used to read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdDrawIndirectByteCount2EXT-OpImageSampleWeightedQCOM-06977
  If `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdDrawIndirectByteCount2EXT-OpImageSampleWeightedQCOM-06978
  If any command other than `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must not have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdDrawIndirectByteCount2EXT-OpImageBlockMatchWindow-09215
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM

- VUID-vkCmdDrawIndirectByteCount2EXT-OpImageBlockMatchWindow-09216
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format must be a single-component format

- VUID-vkCmdDrawIndirectByteCount2EXT-OpImageBlockMatchWindow-09217
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdDrawIndirectByteCount2EXT-OpImageBlockMatchWindow-12421
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the `blockMatchExtendedClampToEdge` feature is not enabled, the input sampler must not have been created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawIndirectByteCount2EXT-addressModeU-12422
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the input sampler was created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, then the sampler must have been created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawIndirectByteCount2EXT-None-07288
  Any shader invocation executed by this command must terminate

- VUID-vkCmdDrawIndirectByteCount2EXT-None-09600
  If a descriptor with type equal to any of VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, or VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT is accessed as a result of this command, all image subresources identified by that descriptor must be in the image layout identified when the descriptor was written

- VUID-vkCmdDrawIndirectByteCount2EXT-micromap-11636
  If an acceleration structure is accessed as a result of this command through an `OpRayQueryProceedKHR` operation , the `VK_EXT_opacity_micromap` extension is not enabled, and the acceleration structure is built using geometry with a VkAccelerationStructureTrianglesOpacityMicromapKHR structure included in its `pNext` chain, the shader must have specified a `OpacityMicromapIdKHR` execution mode with its specialization constant operand equal to VK_TRUE

- VUID-vkCmdDrawIndirectByteCount2EXT-micromap-11637
  If an acceleration structure is accessed as a result of this command and the acceleration structure was constructed through deserialization, all micromap arrays referenced by the acceleration structure that were not replaced by an acceleration structure update command must have been deserialized using the serialized data of the corresponding micromaps used to originally build the acceleration structure prior to the execution of this command on the device

- VUID-vkCmdDrawIndirectByteCount2EXT-micromap-11638
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkPipeline bound to the pipeline bind point used by this command must not have been created with `flags` that includes VK_PIPELINE_CREATE_2_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_KHR

- VUID-vkCmdDrawIndirectByteCount2EXT-micromap-11639
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkShaderEXT that accessed the descriptor must not have been created with `flags` that includes VK_SHADER_CREATE_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_EXT

- VUID-vkCmdDrawIndirectByteCount2EXT-commandBuffer-10746
  The `VkDeviceMemory` object allocated from a `VkMemoryHeap` with the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property that is bound to a resource accessed as a result of this command must be the active bound tile memory object in `commandBuffer`

- VUID-vkCmdDrawIndirectByteCount2EXT-None-10678
  If this command is recorded inside a tile shading render pass instance, the stages corresponding to the pipeline bind point used by this command must only include VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_FRAGMENT_BIT, and/or VK_SHADER_STAGE_COMPUTE_BIT

- VUID-vkCmdDrawIndirectByteCount2EXT-None-10679
  If this command is recorded where per-tile execution model is enabled, there must be no access to any image while the image was be transitioned to the VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT layout

- VUID-vkCmdDrawIndirectByteCount2EXT-pDescription-09900
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the underlying VkTensorARM object must have been created with the VK_TENSOR_USAGE_SHADER_BIT_ARM usage flag set

- VUID-vkCmdDrawIndirectByteCount2EXT-dimensionCount-09905
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the `Rank` of the `OpTypeTensorARM` of the tensor resource variable must be equal to the `dimensionCount` provided via VkTensorCreateInfoARM::`pDescription` when creating the underlying VkTensorARM object

- VUID-vkCmdDrawIndirectByteCount2EXT-OpTypeTensorARM-09906
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the element type of the `OpTypeTensorARM` of the tensor resource variable must be compatible with the VkFormat of the VkTensorViewARM used for the access

- VUID-vkCmdDrawIndirectByteCount2EXT-OpTensorReadARM-12462
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, using `OpTensorReadARM` or `OpTensorWriteARM`, and the underlying VkTensorARM object was created with a VK_TENSOR_TILING_BRICK_16_WIDE_ARM, VK_TENSOR_TILING_BRICK_8_WIDE_ARM, VK_TENSOR_TILING_BRICK_4_WIDE_ARM, VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_ARM, or VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_64K_ARM VkTensorTilingARM, and the object read or written is an array, then the innermost coordinate provided to `OpTensorReadARM` or `OpTensorWriteARM` via the `Coordinates` operand must be a multiple of the largest power of 2 that is less than or equal to the number of components of the array

- VUID-vkCmdDrawIndirectByteCount2EXT-pNext-12463
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command and the corresponding VkTensorARM object was created with a VkTensorRollingBackingCreateInfoARM structure in the `pNext` chain of VkTensorCreateInfoARM, then the number of elements accessed with one `OpTensorReadARM` or `OpTensorWriteARM`, must be less than or equal to the number of elements available from the starting coordinate in the rolling backing along the innermost dimension, defined as `wraps`[`dimensionCount` - 1] - InnermostCoordinate % `wraps`[`dimensionCount` - 1] where InnermostCoordinate is the last component of the coordinates array provided via the `Coordinates` operand

- VUID-vkCmdDrawIndirectByteCount2EXT-None-12472
  Descriptors dynamically accessed in bound descriptor heaps must be valid

- VUID-vkCmdDrawIndirectByteCount2EXT-None-11297
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a `OpTypeStruct` decorated with `Block` or `BufferBlock` using that mapping, the calculated offset for the resource heap must be a multiple of `bufferDescriptorAlignment`

- VUID-vkCmdDrawIndirectByteCount2EXT-None-11298
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeImage` or `OpTypeSampledImage` using that mapping, the calculated offset for the resource heap must be a multiple of `imageDescriptorAlignment`

- VUID-vkCmdDrawIndirectByteCount2EXT-None-11299
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeSampler` or `OpTypeSampledImage` using that mapping, the calculated offset for the sampler heap must be a multiple of `samplerDescriptorAlignment`

- VUID-vkCmdDrawIndirectByteCount2EXT-None-11397
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeTensorARM` using that mapping, the calculated offset for the resource heap must be a multiple of `tensorDescriptorAlignment`

- VUID-vkCmdDrawIndirectByteCount2EXT-None-11300
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 4

- VUID-vkCmdDrawIndirectByteCount2EXT-None-11301
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdDrawIndirectByteCount2EXT-None-11302
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress

- VUID-vkCmdDrawIndirectByteCount2EXT-None-11304
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 8

- VUID-vkCmdDrawIndirectByteCount2EXT-None-11305
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdDrawIndirectByteCount2EXT-None-11306
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address pointed to by the address in push data must be a valid VkDeviceAddress

- VUID-vkCmdDrawIndirectByteCount2EXT-None-11308
  For each descriptor heap that is statically used by a bound shader, either directly or via a descriptor mapping, a valid descriptor heap must be bound

- VUID-vkCmdDrawIndirectByteCount2EXT-None-11309
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, execution of this command must not result in any descriptor read accessing data outside of the user range of the respective heap bound by `vkCmdBind*HeapEXT` commands

- VUID-vkCmdDrawIndirectByteCount2EXT-None-11372
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer or uniform texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified via VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawIndirectByteCount2EXT-None-11373
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer or storage texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawIndirectByteCount2EXT-None-11374
  If the `robustBufferAccess2` feature is not enabled, the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, uniform texel buffer, storage buffer, or storage texel buffer, that shader must not access values outside of the range of the buffer as specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawIndirectByteCount2EXT-pBindInfo-11375
  If any bound shader uses an embedded sampler via a descriptor mapping, the value of `pBindInfo->reservedRangeSize` set for vkCmdBindSamplerHeapEXT must be greater than or equal to `minSamplerHeapReservedRangeWithEmbedded`

- VUID-vkCmdDrawIndirectByteCount2EXT-None-11376
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, and that shader statically uses a push constant value, that value must have been set by vkCmdPushDataEXT

- VUID-vkCmdDrawIndirectByteCount2EXT-None-11398
  If a bound shader was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the access must not be out of bounds

- VUID-vkCmdDrawIndirectByteCount2EXT-None-11437
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the buffer from which the address in push data was queried must have been created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdDrawIndirectByteCount2EXT-None-11438
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdDrawIndirectByteCount2EXT-None-11441
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must be aligned to `minUniformBufferOffsetAlignment`

- VUID-vkCmdDrawIndirectByteCount2EXT-None-11439
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_STORAGE_BUFFER_BIT usage flag set

- VUID-vkCmdDrawIndirectByteCount2EXT-None-11442
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must be aligned to `minStorageBufferOffsetAlignment`

- VUID-vkCmdDrawIndirectByteCount2EXT-None-11485
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses an acceleration structure using that mapping, the address that the acceleration structure is mapped to must be an acceleration structure address retrieved from a VkAccelerationStructureKHR object via vkGetAccelerationStructureDeviceAddressKHR or handle retrieved from a VkAccelerationStructureNV object via vkGetAccelerationStructureHandleNV

- VUID-vkCmdDrawIndirectByteCount2EXT-index-11450
  If a shader uses a sampler descriptor to sample an image as a result of this command, and that sampler descriptor uses a custom border color with an index defined by VkSamplerCustomBorderColorIndexCreateInfoEXT, the value of VkSamplerCustomBorderColorIndexCreateInfoEXT::`index` must have been registered before this command was recorded, and still be registered during the sampling operation, with an identically defined color

- VUID-vkCmdDrawIndirectByteCount2EXT-protectedNoFault-11455
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, the address that the resource is mapped to must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdDrawIndirectByteCount2EXT-protectedNoFault-11456
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, the address of the indirect memory must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdDrawIndirectByteCount2EXT-renderPass-02684
  The current render pass must be compatible with the `renderPass` member of the `VkGraphicsPipelineCreateInfo` structure specified when creating the `VkPipeline` bound to VK_PIPELINE_BIND_POINT_GRAPHICS

- VUID-vkCmdDrawIndirectByteCount2EXT-subpass-02685
  The subpass index of the current render pass must be equal to the `subpass` member of the `VkGraphicsPipelineCreateInfo` structure specified when creating the `VkPipeline` bound to VK_PIPELINE_BIND_POINT_GRAPHICS

- VUID-vkCmdDrawIndirectByteCount2EXT-OpTypeImage-07468
  If any shader executed by this pipeline accesses an `OpTypeImage` variable with a `Dim` operand of `SubpassData`, it must be decorated with an `InputAttachmentIndex` that corresponds to a valid input attachment in the current subpass

- VUID-vkCmdDrawIndirectByteCount2EXT-None-07469
  Input attachment views accessed in a subpass must be created with the same VkFormat as the corresponding subpass definition, and be created with a VkImageView that is compatible with the attachment referenced by the subpass' `pInputAttachments`[`InputAttachmentIndex`] in the bound VkFramebuffer as specified by Fragment Input Attachment Compatibility

- VUID-vkCmdDrawIndirectByteCount2EXT-pDepthInputAttachmentIndex-09595
  Input attachment views accessed in a dynamic render pass with a `InputAttachmentIndex` referenced by VkRenderingInputAttachmentIndexInfo, or no `InputAttachmentIndex` if VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` or VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` are `NULL`, must be created with a VkImageView that is compatible with the corresponding color, depth, or stencil attachment in VkRenderingInfo

- VUID-vkCmdDrawIndirectByteCount2EXT-pDepthInputAttachmentIndex-09596
  Input attachment views accessed in a dynamic render pass via a shader object must have an `InputAttachmentIndex` if both VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` and VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` are non-`NULL`

- VUID-vkCmdDrawIndirectByteCount2EXT-InputAttachmentIndex-09597
  If an input attachment view accessed in a dynamic render pass via a shader object has an `InputAttachmentIndex`, the `InputAttachmentIndex` must match an index in VkRenderingInputAttachmentIndexInfo

- VUID-vkCmdDrawIndirectByteCount2EXT-None-06537
  Memory backing image subresources used as attachments in the current render pass must not be written in any way other than as an attachment by this command

- VUID-vkCmdDrawIndirectByteCount2EXT-None-10795
  If a color attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_COLOR_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawIndirectByteCount2EXT-None-10796
  If a depth attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_DEPTH_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawIndirectByteCount2EXT-None-10797
  If a stencil attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_STENCIL_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawIndirectByteCount2EXT-None-12338
  If a color attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_COLOR_BIT on that attachment, the color attachment must not be written to by this command

- VUID-vkCmdDrawIndirectByteCount2EXT-None-12339
  If a depth attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_DEPTH_BIT on that attachment, the depth attachment must not be written to by this command

- VUID-vkCmdDrawIndirectByteCount2EXT-None-12340
  If a stencil attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_STENCIL_BIT on that attachment, the stencil attachment must not be written to by this command

- VUID-vkCmdDrawIndirectByteCount2EXT-None-09003
  If an attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, it must not be accessed in any way other than as an attachment, storage image, or sampled image by this command

- VUID-vkCmdDrawIndirectByteCount2EXT-None-06886
  If the current render pass instance uses a depth/stencil attachment with a read-only layout for the depth aspect, depth writes must be disabled

- VUID-vkCmdDrawIndirectByteCount2EXT-None-06887
  If the current render pass instance uses a depth/stencil attachment with a read-only layout for the stencil aspect, both front and back `writeMask` are not zero, and stencil test is enabled, all stencil ops must be VK_STENCIL_OP_KEEP

- VUID-vkCmdDrawIndirectByteCount2EXT-None-07831
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT dynamic state enabled then vkCmdSetViewport must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-None-07832
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SCISSOR dynamic state enabled then vkCmdSetScissor must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-None-08617
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_WIDTH dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineWidth must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-None-07834
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BIAS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthBiasEnable` is VK_TRUE, then vkCmdSetDepthBias or vkCmdSetDepthBias2EXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-None-07835
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_BLEND_CONSTANTS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and an active color attachment current value of `blendEnable` is VK_TRUE with a blend equations where any VkBlendFactor member is VK_BLEND_FACTOR_CONSTANT_COLOR, VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR, VK_BLEND_FACTOR_CONSTANT_ALPHA, or VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA, then vkCmdSetBlendConstants must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-None-07836
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BOUNDS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthBoundsTestEnable` is VK_TRUE, then vkCmdSetDepthBounds must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-None-07837
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilCompareMask must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-None-07838
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_WRITE_MASK dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilWriteMask must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-None-07839
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_REFERENCE dynamic state enabled, the current value of and `rasterizerDiscardEnable` is VK_FALSE, the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilReference must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-maxMultiviewInstanceIndex-02688
  If the draw is recorded in a render pass instance with multiview enabled, the maximum instance index must be less than or equal to VkPhysicalDeviceMultiviewProperties::`maxMultiviewInstanceIndex`

- VUID-vkCmdDrawIndirectByteCount2EXT-sampleLocationsEnable-02689
  If the bound graphics pipeline was created with VkPipelineSampleLocationsStateCreateInfoEXT::`sampleLocationsEnable` set to VK_TRUE, then the active depth attachment must have been created with the VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit set

- VUID-vkCmdDrawIndirectByteCount2EXT-None-07634
  If the `VK_EXT_sample_locations` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetSampleLocationsEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-None-06666
  If the `VK_EXT_sample_locations` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `sampleLocationsEnable` is VK_TRUE, then vkCmdSetSampleLocationsEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-None-07840
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_CULL_MODE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCullMode must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-None-07841
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRONT_FACE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetFrontFace must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-None-07843
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, vkCmdSetDepthTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-None-07844
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthTestEnable` is VK_TRUE, then vkCmdSetDepthWriteEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-None-07845
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_COMPARE_OP dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthTestEnable` is VK_TRUE, then vkCmdSetDepthCompareOp must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-None-07846
  If the `depthBounds` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthBoundsTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-None-07847
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetStencilTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-None-07848
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_OP dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilOp must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-viewportCount-03417
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, and the state is not inherited, then vkCmdSetViewportWithCount must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-scissorCount-03418
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT dynamic state enabled, and the state is not inherited, then vkCmdSetScissorWithCount must have been called and not subsequently invalidated in the current command buffer prior to this drawing

- VUID-vkCmdDrawIndirectByteCount2EXT-viewportCount-03419
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with both the VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic states enabled, and the state is not inherited, then the `viewportCount` parameter of `vkCmdSetViewportWithCount` must match the `scissorCount` parameter of `vkCmdSetScissorWithCount`

- VUID-vkCmdDrawIndirectByteCount2EXT-viewportCount-04137
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportWScalingStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndirectByteCount2EXT-viewportCount-04138
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, the current value of `viewportWScalingEnable` is VK_TRUE, then vkCmdSetViewportWScalingNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-None-08636
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, the current value of `viewportWScalingEnable` is VK_TRUE, then the `viewportCount` parameter in the last call to vkCmdSetViewportWScalingNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndirectByteCount2EXT-viewportCount-04139
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportShadingRateImageStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndirectByteCount2EXT-shadingRateImage-09233
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_COARSE_SAMPLE_ORDER_NV and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoarseSampleOrderNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-shadingRateImage-09234
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `shadingRateImageEnable` is VK_TRUE, then vkCmdSetViewportShadingRatePaletteNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-None-08637
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `shadingRateImageEnable` is VK_TRUE, then the `viewportCount` parameter in the last call to vkCmdSetViewportShadingRatePaletteNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndirectByteCount2EXT-VkPipelineVieportCreateInfo-04141
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled and a VkPipelineViewportSwizzleStateCreateInfoNV structure chained from VkPipelineViewportStateCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportSwizzleStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndirectByteCount2EXT-VkPipelineVieportCreateInfo-04142
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled and a VkPipelineViewportExclusiveScissorStateCreateInfoNV structure chained from VkPipelineViewportStateCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportExclusiveScissorStateCreateInfoNV::`exclusiveScissorCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndirectByteCount2EXT-None-07878
  If the `exclusiveScissor` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_ENABLE_NV dynamic state enabled, then vkCmdSetExclusiveScissorEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-None-07879
  If the `exclusiveScissor` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_NV dynamic state enabled, and the most recent call to vkCmdSetExclusiveScissorEnableNV in the current command buffer set any element of `pExclusiveScissorEnables` to VK_TRUE, then vkCmdSetExclusiveScissorNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-None-04876
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE dynamic state enabled, then vkCmdSetRasterizerDiscardEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-None-04877
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthBiasEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-logicOp-04878
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LOGIC_OP_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `logicOpEnable` is VK_TRUE, then vkCmdSetLogicOpEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-primitiveFragmentShadingRateWithMultipleViewports-04552
  If the `primitiveFragmentShadingRateWithMultipleViewports` limit is not supported, the bound graphics pipeline was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, and any of the shader stages of the bound graphics pipeline write to the `PrimitiveShadingRateKHR` built-in, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and the `viewportCount` parameter of `vkCmdSetViewportWithCount` must be `1`

- VUID-vkCmdDrawIndirectByteCount2EXT-primitiveFragmentShadingRateWithMultipleViewports-08642
  If the `primitiveFragmentShadingRateWithMultipleViewports` limit is not supported, and any shader object bound to a graphics stage writes to the `PrimitiveShadingRateKHR` built-in, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and the `viewportCount` parameter of `vkCmdSetViewportWithCount` must be `1`

- VUID-vkCmdDrawIndirectByteCount2EXT-blendEnable-04727
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, then for each color attachment, if the corresponding image view’s format features do not contain VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT, then the corresponding current value of `blendEnable` must be VK_FALSE

- VUID-vkCmdDrawIndirectByteCount2EXT-None-08644
  If a shader object is bound to any graphics stage or a graphics pipeline is bound, the current value of `rasterizerDiscardEnable` is VK_FALSE, and none of the following is enabled:

  - the `VK_AMD_mixed_attachment_samples` extension

  - the `VK_NV_framebuffer_mixed_samples` extension

  - the `multisampledRenderToSingleSampled` feature

  then the current value of `rasterizationSamples` must be the same as the current color and/or depth/stencil attachments

- VUID-vkCmdDrawIndirectByteCount2EXT-None-08876
  If a shader object is bound to any graphics stage, the current render pass instance must have been begun with vkCmdBeginRendering

- VUID-vkCmdDrawIndirectByteCount2EXT-imageView-06172
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawIndirectByteCount2EXT-imageView-06173
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawIndirectByteCount2EXT-imageView-06174
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawIndirectByteCount2EXT-imageView-06175
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawIndirectByteCount2EXT-imageView-06176
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawIndirectByteCount2EXT-imageView-06177
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawIndirectByteCount2EXT-viewMask-06178
  If the current render pass instance was begun with vkCmdBeginRendering, the bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::`viewMask` equal to VkRenderingInfo::`viewMask`

- VUID-vkCmdDrawIndirectByteCount2EXT-colorAttachmentCount-06179
  If the `dynamicRenderingUnusedAttachments` feature is not enabled and the current render pass instance was begun with vkCmdBeginRendering, the bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::`colorAttachmentCount` equal to VkRenderingInfo::`colorAttachmentCount`

- VUID-vkCmdDrawIndirectByteCount2EXT-dynamicRenderingUnusedAttachments-08910
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound graphics pipeline

- VUID-vkCmdDrawIndirectByteCount2EXT-dynamicRenderingUnusedAttachments-08912
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` equal to VK_NULL_HANDLE must have the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound pipeline equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectByteCount2EXT-dynamicRenderingUnusedAttachments-08911
  If the `dynamicRenderingUnusedAttachments` feature is enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound graphics pipeline, or the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats`, if it exists, must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectByteCount2EXT-colorAttachmentCount-09362
  If the current render pass instance was begun with vkCmdBeginRendering, with a VkRenderingInfo::`colorAttachmentCount` equal to `1`, there is no shader object bound to any graphics stage, and a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, each element of the VkRenderingInfo::`pColorAttachments` array with a `resolveImageView` not equal to VK_NULL_HANDLE must have been created with an image created with a VkExternalFormatANDROID::`externalFormat` value equal to the VkExternalFormatANDROID::`externalFormat` value used to create the bound graphics pipeline

- VUID-vkCmdDrawIndirectByteCount2EXT-None-09363
  If there is no shader object bound to any graphics stage, the current render pass instance was begun with vkCmdBeginRendering and a VkRenderingInfo::`colorAttachmentCount` equal to `1`, and a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with an image created with a VkExternalFormatANDROID::`externalFormat` value equal to the VkExternalFormatANDROID::`externalFormat` value used to create the bound graphics pipeline

- VUID-vkCmdDrawIndirectByteCount2EXT-None-09364
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetColorBlendEnableEXT must have set the blend enable to VK_FALSE prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-None-09365
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetRasterizationSamplesEXT must have set `rasterizationSamples` to VK_SAMPLE_COUNT_1_BIT prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-None-09368
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetFragmentShadingRateKHR must have set `pFragmentSize->width` to `1` prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-None-09369
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetFragmentShadingRateKHR must have set `pFragmentSize->height` to `1` prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-None-07749
  If the `colorWriteEnable` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorWriteEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-attachmentCount-07750
  If the `colorWriteEnable` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the `attachmentCount` parameter of most recent call to `vkCmdSetColorWriteEnableEXT` in the current command buffer must be greater than or equal to the number of active color attachments

- VUID-vkCmdDrawIndirectByteCount2EXT-None-07751
  If the `VK_EXT_discard_rectangles` extension is enabled, a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT dynamic state enabled and the `pNext` chain of VkGraphicsPipelineCreateInfo included a VkPipelineDiscardRectangleStateCreateInfoEXT structure, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for each discard rectangle in VkPipelineDiscardRectangleStateCreateInfoEXT::`discardRectangleCount`

- VUID-vkCmdDrawIndirectByteCount2EXT-rasterizerDiscardEnable-09236
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT dynamic state enabled and the `pNext` chain of VkGraphicsPipelineCreateInfo did not include a VkPipelineDiscardRectangleStateCreateInfoEXT structure, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for each discard rectangle in VkPhysicalDeviceDiscardRectanglePropertiesEXT::`maxDiscardRectangles`

- VUID-vkCmdDrawIndirectByteCount2EXT-None-07880
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDiscardRectangleEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-None-07881
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_MODE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-dynamicRenderingUnusedAttachments-08913
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->imageView` was VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectByteCount2EXT-dynamicRenderingUnusedAttachments-08914
  If current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawIndirectByteCount2EXT-dynamicRenderingUnusedAttachments-08915
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, and the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->imageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectByteCount2EXT-dynamicRenderingUnusedAttachments-08916
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->imageView` was VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectByteCount2EXT-dynamicRenderingUnusedAttachments-08917
  If current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawIndirectByteCount2EXT-dynamicRenderingUnusedAttachments-08918
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, and the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->imageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectByteCount2EXT-imageView-06183
  If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentShadingRateAttachmentInfoKHR::`imageView` was not VK_NULL_HANDLE, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

- VUID-vkCmdDrawIndirectByteCount2EXT-dynamicRenderingLocalRead-11797
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingLocalRead` feature is enabled, the VK_RENDERING_LOCAL_READ_CONCURRENT_ACCESS_CONTROL_BIT_KHR flag is specified, and an attachment is being used as a feedback loop as specified by VK_RENDERING_ATTACHMENT_INPUT_ATTACHMENT_FEEDBACK_BIT_KHR, VkRenderingAttachmentFlagsInfoKHR::`flags` for that attachment must include VK_RENDERING_ATTACHMENT_INPUT_ATTACHMENT_FEEDBACK_BIT_KHR

- VUID-vkCmdDrawIndirectByteCount2EXT-imageView-06184
  If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentDensityMapAttachmentInfoEXT::`imageView` was not VK_NULL_HANDLE, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT

- VUID-vkCmdDrawIndirectByteCount2EXT-layers-10831
  If the current render pass instance was created with VK_RENDERING_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE or VK_RENDER_PASS_CREATE_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE, and the bound graphics pipeline was created with VK_PIPELINE_CREATE_2_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE, then the current render pass instance must have a `layers` value less than or equal to VkPipelineFragmentDensityMapLayeredCreateInfoVALVE::`maxFragmentDensityMapLayers`

- VUID-vkCmdDrawIndirectByteCount2EXT-colorAttachmentCount-06185
  If the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with a sample count equal to the corresponding element of the `pColorAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline

- VUID-vkCmdDrawIndirectByteCount2EXT-pDepthAttachment-06186
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of the `depthStencilAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawIndirectByteCount2EXT-pStencilAttachment-06187
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of the `depthStencilAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawIndirectByteCount2EXT-multisampledRenderToSingleSampled-07285
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with a sample count equal to the value of `rasterizationSamples` for the bound graphics pipeline

- VUID-vkCmdDrawIndirectByteCount2EXT-multisampledRenderToSingleSampled-07286
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawIndirectByteCount2EXT-multisampledRenderToSingleSampled-07287
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawIndirectByteCount2EXT-pNext-07935
  If this command is called inside a render pass instance started with vkCmdBeginRendering, and the `pNext` chain of VkRenderingInfo includes a VkMultisampledRenderToSingleSampledInfoEXT structure with `multisampledRenderToSingleSampledEnable` equal to VK_TRUE, then the value of `rasterizationSamples` for the bound graphics pipeline must be equal to VkMultisampledRenderToSingleSampledInfoEXT::`rasterizationSamples`

- VUID-vkCmdDrawIndirectByteCount2EXT-renderPass-06198
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline must have been created with a VkGraphicsPipelineCreateInfo::`renderPass` equal to VK_NULL_HANDLE

- VUID-vkCmdDrawIndirectByteCount2EXT-pColorAttachments-08963
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound with a fragment shader that statically writes to a color attachment, the color write mask is not zero, color writes are enabled, and the corresponding element of the VkRenderingInfo::`pColorAttachments->imageView` was not VK_NULL_HANDLE, then the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectByteCount2EXT-pColorAttachments-11539
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound with a fragment shader that statically writes to a color attachment, the color write mask is not zero, color writes are enabled, and the corresponding element of the VkRenderingInfo::`pColorAttachments->resolveImageView` was not VK_NULL_HANDLE, then the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectByteCount2EXT-pDepthAttachment-08964
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound, depth test is enabled, and the VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, then the VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectByteCount2EXT-pDepthAttachment-11540
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound, depth test is enabled, and the VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, then the VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectByteCount2EXT-pStencilAttachment-08965
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound, stencil test is enabled and the VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, then the VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectByteCount2EXT-pStencilAttachment-11860
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound, stencil test is enabled and the VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, then the VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectByteCount2EXT-flags-10582
  If the current render pass instance was begun with a vkCmdBeginRendering call in `commandBuffer`, its VkRenderingInfo::`flags` parameter must not have VK_RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT set unless VK_RENDERING_CONTENTS_INLINE_BIT_KHR is also set

- VUID-vkCmdDrawIndirectByteCount2EXT-primitivesGeneratedQueryWithRasterizerDiscard-06708
  If the `primitivesGeneratedQueryWithRasterizerDiscard` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, rasterization discard must not be enabled

- VUID-vkCmdDrawIndirectByteCount2EXT-primitivesGeneratedQueryWithNonZeroStreams-06709
  If the `primitivesGeneratedQueryWithNonZeroStreams` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, the bound graphics pipeline must not have been created with a non-zero value in `VkPipelineRasterizationStateStreamCreateInfoEXT`::`rasterizationStream`

- VUID-vkCmdDrawIndirectByteCount2EXT-None-07620
  If the `depthClamp` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLAMP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthClampEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-None-07621
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_POLYGON_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetPolygonModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-None-07622
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetRasterizationSamplesEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-None-07623
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetSampleMaskEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-alphaToCoverageEnable-08919
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT dynamic state enabled, and `alphaToCoverageEnable` was VK_TRUE in the last call to vkCmdSetAlphaToCoverageEnableEXT, then the Fragment Output Interface must contain a variable for the alpha `Component` word in `Location` 0 at `Index` 0

- VUID-vkCmdDrawIndirectByteCount2EXT-alphaToCoverageEnable-08920
  If a shader object is bound to any graphics stage, and the most recent call to vkCmdSetAlphaToCoverageEnableEXT in the current command buffer set `alphaToCoverageEnable` to VK_TRUE, then the Fragment Output Interface must contain a variable for the alpha `Component` word in `Location` 0 at `Index` 0

- VUID-vkCmdDrawIndirectByteCount2EXT-None-07624
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAlphaToCoverageEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-None-07625
  If the `alphaToOne` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ALPHA_TO_ONE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAlphaToOneEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-None-07626
  If the `logicOp` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LOGIC_OP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetLogicOpEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-None-07627
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and there are color attachments bound, then vkCmdSetColorBlendEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-None-07629
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and there are color attachments bound, then vkCmdSetColorWriteMaskEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-None-07630
  If the `geometryStreams` feature is enabled, and a shader object is bound to the VK_SHADER_STAGE_GEOMETRY_BIT stage or a graphics pipeline is bound which was created with both a VK_SHADER_STAGE_GEOMETRY_BIT stage and the VK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXT dynamic state enabled, then vkCmdSetRasterizationStreamEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-None-07631
  If the `VK_EXT_conservative_rasterization` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_CONSERVATIVE_RASTERIZATION_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetConservativeRasterizationModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-None-07632
  If the `VK_EXT_conservative_rasterization` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXTRA_PRIMITIVE_OVERESTIMATION_SIZE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `conservativeRasterizationMode` is VK_CONSERVATIVE_RASTERIZATION_MODE_OVERESTIMATE_EXT, then vkCmdSetExtraPrimitiveOverestimationSizeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-conservativePointAndLineRasterization-07499
  If the `VK_EXT_conservative_rasterization` extension is enabled, `conservativePointAndLineRasterization` is not supported, a shader object is bound to any graphics stage or a graphics pipeline is bound, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line or point topology class, then the current value of `conservativeRasterizationMode` must be VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT

- VUID-vkCmdDrawIndirectByteCount2EXT-None-07633
  If the `depthClipEnable` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLIP_ENABLE_EXT dynamic state, then vkCmdSetDepthClipEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-None-07636
  If the `VK_EXT_provoking_vertex` extension is enabled, a shader object is bound to the VK_SHADER_STAGE_VERTEX_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_PROVOKING_VERTEX_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetProvokingVertexModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-None-08666
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineRasterizationModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-None-08669
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineStippleEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-None-07849
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled and a shader object is bound to any graphics stage, or a bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stippledLineEnable` is VK_TRUE, then vkCmdSetLineStipple must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-None-10608
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic state enabled, the effective rasterization input topology is in the line topology class, and the current `lineRasterizationMode` is VK_LINE_RASTERIZATION_MODE_BRESENHAM or VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH, then the current `alphaToCoverageEnable`, `alphaToOneEnable` and `sampleShadingEnable` states must all be VK_FALSE

- VUID-vkCmdDrawIndirectByteCount2EXT-None-07639
  If the `depthClipControl` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLIP_NEGATIVE_ONE_TO_ONE_EXT dynamic state enabled, then vkCmdSetDepthClipNegativeOneToOneEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-None-09650
  If the `depthClampControl` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLAMP_RANGE_EXT dynamic state enabled, and the current value of `depthClampEnable` is VK_TRUE, then vkCmdSetDepthClampRangeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-None-07640
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_ENABLE_NV dynamic state enabled, then vkCmdSetViewportWScalingEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-None-07641
  If the `VK_NV_viewport_swizzle` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic state enabled, then vkCmdSetViewportSwizzleNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-None-07642
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageToColorEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-None-07643
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_LOCATION_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageToColorEnable` is VK_TRUE, then vkCmdSetCoverageToColorLocationNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-None-07644
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_MODE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageModulationModeNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-None-07645
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageModulationMode` is any value other than VK_COVERAGE_MODULATION_MODE_NONE_NV, then vkCmdSetCoverageModulationTableEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-None-07646
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageModulationTableEnable` is VK_TRUE, then vkCmdSetCoverageModulationTableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-None-07647
  If the `shadingRateImage` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SHADING_RATE_IMAGE_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetShadingRateImageEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-pipelineFragmentShadingRate-09238
  If the `pipelineFragmentShadingRate` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetFragmentShadingRateKHR must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-None-07648
  If the `representativeFragmentTest` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_REPRESENTATIVE_FRAGMENT_TEST_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetRepresentativeFragmentTestEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-None-07649
  If the `coverageReductionMode` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageReductionModeNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-rasterizationSamples-07471
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current subpass does not use any color and/or depth/stencil attachments, then the `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT must follow the rules for a zero-attachment subpass

- VUID-vkCmdDrawIndirectByteCount2EXT-samples-07472
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state disabled, then the `samples` parameter in the last call to vkCmdSetSampleMaskEXT must be greater or equal to the VkPipelineMultisampleStateCreateInfo::`rasterizationSamples` parameter used to create the bound graphics pipeline

- VUID-vkCmdDrawIndirectByteCount2EXT-samples-07473
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT state and VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT states enabled, then the `samples` parameter in the last call to vkCmdSetSampleMaskEXT must be greater or equal to the `rasterizationSamples` parameter in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawIndirectByteCount2EXT-None-09211
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, or a shader object is bound to any graphics stage, and the current render pass instance includes a VkMultisampledRenderToSingleSampledInfoEXT structure with `multisampledRenderToSingleSampledEnable` equal to VK_TRUE, then the `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT must be the same as the `rasterizationSamples` member of that structure

- VUID-vkCmdDrawIndirectByteCount2EXT-firstAttachment-07476
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic states enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the last call to vkCmdSetColorBlendEnableEXT in the current command buffer prior to this drawing command must have set a value for all active color attachments

- VUID-vkCmdDrawIndirectByteCount2EXT-firstAttachment-07478
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT dynamic states enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the last call to vkCmdSetColorWriteMaskEXT in the current command buffer prior to this drawing command must have set a value for all active color attachments

- VUID-vkCmdDrawIndirectByteCount2EXT-advancedBlendMaxColorAttachments-07480
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT and VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic states enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and an active color attachment current value of `blendEnable` is VK_TRUE, then the number of active color attachments must not exceed `advancedBlendMaxColorAttachments`

- VUID-vkCmdDrawIndirectByteCount2EXT-None-10862
  If a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT , but not the VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorBlendEquationEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawIndirectByteCount2EXT-rasterizerDiscardEnable-10863
  If a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT, but not the VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorBlendAdvancedEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawIndirectByteCount2EXT-None-10864
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT and VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then either vkCmdSetColorBlendAdvancedEXT or vkCmdSetColorBlendEquationEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawIndirectByteCount2EXT-primitivesGeneratedQueryWithNonZeroStreams-07481
  If the `primitivesGeneratedQueryWithNonZeroStreams` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, and the bound graphics pipeline was created with VK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXT state enabled, the last call to vkCmdSetRasterizationStreamEXT must have set the `rasterizationStream` to zero

- VUID-vkCmdDrawIndirectByteCount2EXT-sampleLocationsPerPixel-07482
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state disabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then the `sampleLocationsPerPixel` member of `pSampleLocationsInfo` in the last call to vkCmdSetSampleLocationsEXT must equal the `rasterizationSamples` member of the VkPipelineMultisampleStateCreateInfo structure the bound graphics pipeline has been created with

- VUID-vkCmdDrawIndirectByteCount2EXT-sampleLocationsPerPixel-07483
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then the `sampleLocationsPerPixel` member of `pSampleLocationsInfo` in the last call to vkCmdSetSampleLocationsEXT must equal the `rasterizationSamples` parameter of the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawIndirectByteCount2EXT-sampleLocationsEnable-07484
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT then the current active depth attachment must have been created with the VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit set

- VUID-vkCmdDrawIndirectByteCount2EXT-sampleLocationsEnable-07485
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, then the `sampleLocationsInfo.maxSampleLocationGridSize.width` in the last call to vkCmdSetSampleLocationsEXT must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.width` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling `rasterizationSamples`

- VUID-vkCmdDrawIndirectByteCount2EXT-sampleLocationsEnable-07486
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, then the `sampleLocationsInfo.maxSampleLocationGridSize.height` in the last call to vkCmdSetSampleLocationsEXT must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.height` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling `rasterizationSamples`

- VUID-vkCmdDrawIndirectByteCount2EXT-sampleLocationsEnable-07487
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, the fragment shader code must not statically use the extended instruction `InterpolateAtSample`

- VUID-vkCmdDrawIndirectByteCount2EXT-sampleLocationsEnable-07936
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationGridSize.width` must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.width` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling the value of `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawIndirectByteCount2EXT-sampleLocationsEnable-07937
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationGridSize.height` must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.height` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling the value of `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawIndirectByteCount2EXT-sampleLocationsEnable-07938
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationsPerPixel` must equal `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawIndirectByteCount2EXT-coverageModulationTableEnable-07488
  If a shader object is bound to any graphics stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NV state enabled, and the last call to vkCmdSetCoverageModulationTableEnableNV set `coverageModulationTableEnable` to VK_TRUE, then the `coverageModulationTableCount` parameter in the last call to vkCmdSetCoverageModulationTableNV must equal the current `rasterizationSamples` divided by the number of color samples in the current active color attachment

- VUID-vkCmdDrawIndirectByteCount2EXT-rasterizationSamples-07489
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, and if current subpass has a depth/stencil attachment and depth test, stencil test, or depth bounds test are enabled in the bound pipeline, then the current `rasterizationSamples` must be the same as the sample count of the depth/stencil attachment

- VUID-vkCmdDrawIndirectByteCount2EXT-coverageToColorEnable-07490
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV state enabled and the last call to vkCmdSetCoverageToColorEnableNV set the `coverageToColorEnable` to VK_TRUE, then there must be an active color attachment at the location selected by the last call to vkCmdSetCoverageToColorLocationNV `coverageToColorLocation`, with a VkFormat of VK_FORMAT_R8_UINT, VK_FORMAT_R8_SINT, VK_FORMAT_R16_UINT, VK_FORMAT_R16_SINT, VK_FORMAT_R32_UINT, or VK_FORMAT_R32_SINT

- VUID-vkCmdDrawIndirectByteCount2EXT-rasterizerDiscardEnable-09420
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, and a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, and the most recent call to vkCmdSetRasterizerDiscardEnable in the current command buffer set `rasterizerDiscardEnable` to VK_FALSE, and the last call to vkCmdSetCoverageToColorEnableNV set the `coverageToColorEnable` to VK_TRUE, then there must be an active color attachment at the location selected by the last call to vkCmdSetCoverageToColorLocationNV `coverageToColorLocation`, with a VkFormat of VK_FORMAT_R8_UINT, VK_FORMAT_R8_SINT, VK_FORMAT_R16_UINT, VK_FORMAT_R16_SINT, VK_FORMAT_R32_UINT, or VK_FORMAT_R32_SINT

- VUID-vkCmdDrawIndirectByteCount2EXT-coverageReductionMode-07491
  If the `coverageReductionMode` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV or VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic states enabled, then the current values of `coverageReductionMode`, `rasterizationSamples`, the sample counts for the color and depth/stencil attachments (if the subpass has them) must be a valid combination returned by vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV

- VUID-vkCmdDrawIndirectByteCount2EXT-viewportCount-07492
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportSwizzleStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndirectByteCount2EXT-viewportCount-07493
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic states enabled then the `viewportCount` parameter in the last call to vkCmdSetViewportSwizzleNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndirectByteCount2EXT-viewportCount-09421
  If the `VK_NV_viewport_swizzle` extension is enabled, and a shader object is bound to any graphics stage, then the `viewportCount` parameter in the last call to vkCmdSetViewportSwizzleNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndirectByteCount2EXT-rasterizationSamples-07494
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, and the `coverageReductionMode` feature is not enabled, or the current value of `coverageReductionMode` is not VK_COVERAGE_REDUCTION_MODE_TRUNCATE_NV, and the current value of `rasterizationSamples` is greater than sample count of the color attachment, then sample shading must be disabled

- VUID-vkCmdDrawIndirectByteCount2EXT-stippledLineEnable-07495
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_RECTANGULAR, then the `stippledRectangularLines` feature must be enabled

- VUID-vkCmdDrawIndirectByteCount2EXT-stippledLineEnable-07496
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_BRESENHAM, then the `stippledBresenhamLines` feature must be enabled

- VUID-vkCmdDrawIndirectByteCount2EXT-stippledLineEnable-07497
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH, then the `stippledSmoothLines` feature must be enabled

- VUID-vkCmdDrawIndirectByteCount2EXT-stippledLineEnable-07498
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_DEFAULT, then the `stippledRectangularLines` feature must be enabled and VkPhysicalDeviceLimits::`strictLines` must be VK_TRUE

- VUID-vkCmdDrawIndirectByteCount2EXT-stage-07073
  If the bound pipeline was created with the VkPipelineShaderStageCreateInfo::`stage` member of an element of VkGraphicsPipelineCreateInfo::`pStages` set to VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT, then Mesh Shader Queries must not be active

- VUID-vkCmdDrawIndirectByteCount2EXT-None-08877
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ATTACHMENT_FEEDBACK_LOOP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAttachmentFeedbackLoopEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-None-07850
  If dynamic state was inherited from VkCommandBufferInheritanceViewportScissorInfoNV, it must be set in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-nextStage-10745
  For each shader object bound to a graphics stage, except for shader object bound to the last graphics stage in the logical pipeline, it must have been created with a `nextStage` including the corresponding bit to the shader object bound to the following graphics stage in the logical pipeline

- VUID-vkCmdDrawIndirectByteCount2EXT-None-08684
  If there is no bound graphics pipeline, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_VERTEX_BIT

- VUID-vkCmdDrawIndirectByteCount2EXT-None-08685
  If there is no bound graphics pipeline, and the `tessellationShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT

- VUID-vkCmdDrawIndirectByteCount2EXT-None-08686
  If there is no bound graphics pipeline, and the `tessellationShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT

- VUID-vkCmdDrawIndirectByteCount2EXT-None-08687
  If there is no bound graphics pipeline, and the `geometryShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_GEOMETRY_BIT

- VUID-vkCmdDrawIndirectByteCount2EXT-None-08688
  If there is no bound graphics pipeline, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_FRAGMENT_BIT

- VUID-vkCmdDrawIndirectByteCount2EXT-None-08689
  If there is no bound graphics pipeline, and the `taskShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TASK_BIT_EXT

- VUID-vkCmdDrawIndirectByteCount2EXT-None-08690
  If there is no bound graphics pipeline, and the `meshShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-vkCmdDrawIndirectByteCount2EXT-None-08693
  If there is no bound graphics pipeline, and at least one of the `taskShader` and `meshShader` features is enabled, one of the VK_SHADER_STAGE_VERTEX_BIT or VK_SHADER_STAGE_MESH_BIT_EXT stages must have a valid `VkShaderEXT` bound, and the other must have no `VkShaderEXT` bound

- VUID-vkCmdDrawIndirectByteCount2EXT-None-08696
  If there is no bound graphics pipeline, and a valid `VkShaderEXT` is bound to the VK_SHADER_STAGE_VERTEX_BIT stage, there must be no `VkShaderEXT` bound to either the VK_SHADER_STAGE_TASK_BIT_EXT stage or the VK_SHADER_STAGE_MESH_BIT_EXT stage

- VUID-vkCmdDrawIndirectByteCount2EXT-None-08698
  If any graphics shader is bound which was created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag, then all shaders created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag in the same vkCreateShadersEXT call must also be bound

- VUID-vkCmdDrawIndirectByteCount2EXT-None-08699
  If any graphics shader is bound which was created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag, any stages in between stages whose shaders which did not create a shader with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag as part of the same vkCreateShadersEXT call must not have any `VkShaderEXT` bound

- VUID-vkCmdDrawIndirectByteCount2EXT-None-08878
  All bound graphics shader objects must have been created with identical or identically defined push constant ranges

- VUID-vkCmdDrawIndirectByteCount2EXT-None-08879
  All bound graphics shader objects must have either been created with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag set, or with identical or identically defined arrays of descriptor set layouts

- VUID-vkCmdDrawIndirectByteCount2EXT-colorAttachmentCount-09372
  If the current render pass instance was begun with vkCmdBeginRendering and a VkRenderingInfo::`colorAttachmentCount` equal to `1`, a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, and a fragment shader is bound, it must not declare the `DepthReplacing` or `StencilRefReplacingEXT` execution modes

- VUID-vkCmdDrawIndirectByteCount2EXT-pDynamicStates-08715
  If the bound graphics pipeline state includes a fragment shader stage, was created with VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`, and the fragment shader declares the `EarlyFragmentTests` execution mode and uses `OpDepthAttachmentReadEXT`, the `depthWriteEnable` parameter in the last call to vkCmdSetDepthWriteEnable must be VK_FALSE

- VUID-vkCmdDrawIndirectByteCount2EXT-pDynamicStates-08716
  If the bound graphics pipeline state includes a fragment shader stage, was created with VK_DYNAMIC_STATE_STENCIL_WRITE_MASK set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`, and the fragment shader declares the `EarlyFragmentTests` execution mode and uses `OpStencilAttachmentReadEXT`, the `writeMask` parameter in the last call to vkCmdSetStencilWriteMask must be `0`

- VUID-vkCmdDrawIndirectByteCount2EXT-None-09116
  If a shader object is bound to any graphics stage or the bound graphics pipeline was created with VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT, and the format of any color attachment is VK_FORMAT_E5B9G9R9_UFLOAT_PACK32, the corresponding element of the `pColorWriteMasks` parameter of vkCmdSetColorWriteMaskEXT must either include all of VK_COLOR_COMPONENT_R_BIT, VK_COLOR_COMPONENT_G_BIT, VK_COLOR_COMPONENT_B_BIT, and VK_COLOR_COMPONENT_A_BIT, or none of them

- VUID-vkCmdDrawIndirectByteCount2EXT-maxFragmentDualSrcAttachments-09239
  If blending is enabled for any attachment where either the source or destination blend factors for that attachment use the secondary color input, the maximum value of `Location` for any output attachment statically used in the `Fragment` `Execution` `Model` executed by this command must be less than `maxFragmentDualSrcAttachments`

- VUID-vkCmdDrawIndirectByteCount2EXT-None-09548
  If the current render pass was begun with vkCmdBeginRendering, there is no shader object bound to any graphics stage, the value of each element of VkRenderingAttachmentLocationInfo::`pColorAttachmentLocations` in the bound pipeline must match the value for the corresponding locations set currently in the current render pass instance

- VUID-vkCmdDrawIndirectByteCount2EXT-None-09549
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of each element of VkRenderingInputAttachmentIndexInfo::`pColorAttachmentInputIndices` in the bound pipeline must match the value for the corresponding index set currently in the current render pass instance

- VUID-vkCmdDrawIndirectByteCount2EXT-None-10927
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` in the bound pipeline must match the value set currently in the current render pass instance

- VUID-vkCmdDrawIndirectByteCount2EXT-None-10928
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` in the bound pipeline must match the value set currently in the current render pass instance

- VUID-vkCmdDrawIndirectByteCount2EXT-None-09642
  If the current render pass was begun with vkCmdBeginRendering with the VK_RENDERING_ENABLE_LEGACY_DITHERING_BIT_EXT flag, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_2_ENABLE_LEGACY_DITHERING_BIT_EXT

- VUID-vkCmdDrawIndirectByteCount2EXT-None-09643
  If the bound graphics pipeline was created with VK_PIPELINE_CREATE_2_ENABLE_LEGACY_DITHERING_BIT_EXT, the current render pass must have begun with vkCmdBeginRendering with the VK_RENDERING_ENABLE_LEGACY_DITHERING_BIT_EXT flag

- VUID-vkCmdDrawIndirectByteCount2EXT-None-10677
  If the per-tile execution model is enabled, the tileShadingPerTileDraw feature must be enabled

- VUID-vkCmdDrawIndirectByteCount2EXT-None-10772
  If a shader object is bound to any graphics stage, multiview functionality must not be enabled in the current render pass

- VUID-vkCmdDrawIndirectByteCount2EXT-multiviewPerViewViewports-12262
  If the `multiviewPerViewViewports` feature is enabled, then the index of the most significant bit in current render pass instance `viewMask` must be less than the current value of `viewportCount`

- VUID-vkCmdDrawIndirectByteCount2EXT-multiviewPerViewViewports-12263
  If the `multiviewPerViewViewports` feature is enabled, then the index of the most significant bit in current render pass instance `viewMask` must be less than the current value of `scissorCount`

- VUID-vkCmdDrawIndirectByteCount2EXT-flags-11521
  If current render pass instance was begun with vkCmdBeginRendering with VkRenderingInfo::`flags` which includes VK_RENDERING_FRAGMENT_REGION_BIT_EXT, and if sample shading is enabled (explicitly or implicitly), then the minimum fraction for sample shading must equal 0.0

- VUID-vkCmdDrawIndirectByteCount2EXT-None-11522
  If the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, and the `dynamicRenderingUnusedAttachments` feature is not enabled, the graphics pipeline bound must have been created with a VkCustomResolveCreateInfoEXT

- VUID-vkCmdDrawIndirectByteCount2EXT-None-11523
  If the current render pass instance was begun with vkCmdBeginRendering and does not contain a custom resolve, and the `dynamicRenderingUnusedAttachments` feature is not enabled, the graphics pipeline bound must not have been created with a VkCustomResolveCreateInfoEXT

- VUID-vkCmdDrawIndirectByteCount2EXT-customResolve-11524
  If the current render pass instance was begun with vkCmdBeginRendering and vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, the graphics pipeline bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_TRUE

- VUID-vkCmdDrawIndirectByteCount2EXT-customResolve-11525
  If the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, and vkCmdBeginCustomResolveEXT has not been recorded in the render pass instance, the graphics pipeline bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_FALSE

- VUID-vkCmdDrawIndirectByteCount2EXT-None-11861
  If the `dynamicRenderingUnusedAttachments` feature is not enabled and the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, the bound graphics pipeline must have been created with a VkCustomResolveCreateInfoEXT::`colorAttachmentCount` equal to VkRenderingInfo::`colorAttachmentCount`

- VUID-vkCmdDrawIndirectByteCount2EXT-None-11862
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound graphics pipeline

- VUID-vkCmdDrawIndirectByteCount2EXT-None-11863
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` equal to VK_NULL_HANDLE must have the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound pipeline equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectByteCount2EXT-dynamicRenderingUnusedAttachments-11864
  If the `dynamicRenderingUnusedAttachments` feature is enabled, the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound graphics pipeline, or the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats`, if it exists, must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectByteCount2EXT-None-11865
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectByteCount2EXT-None-11866
  If current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`

- VUID-vkCmdDrawIndirectByteCount2EXT-dynamicRenderingUnusedAttachments-11867
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, and the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectByteCount2EXT-None-11868
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->resolveImageView` was VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectByteCount2EXT-None-11869
  If current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`

- VUID-vkCmdDrawIndirectByteCount2EXT-dynamicRenderingUnusedAttachments-11870
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, and the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectByteCount2EXT-colorAttachmentCount-11871
  If the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0` and vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, then for each element of the VkRenderingInfo::`pColorAttachments` array with a `resolveImageView` not equal to VK_NULL_HANDLE, the `resolveImageView` must have been created with a sample count equal to the value of `rasterizationSamples` for the bound graphics pipeline

- VUID-vkCmdDrawIndirectByteCount2EXT-pDepthAttachment-11872
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`

- VUID-vkCmdDrawIndirectByteCount2EXT-pStencilAttachment-11873
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`

- VUID-vkCmdDrawIndirectByteCount2EXT-customResolve-11529
  If a shader object is bound to the fragment stage, the current render pass instance was begun with vkCmdBeginRendering, a fragment density map attachment is active, and vkCmdBeginCustomResolveEXT has been called, then the fragment shader object bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_TRUE

- VUID-vkCmdDrawIndirectByteCount2EXT-customResolve-11530
  If a shader object is bound to the fragment stage, the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, a fragment density map attachment is active, and vkCmdBeginCustomResolveEXT has not yet been called, then the fragment shader object bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_FALSE

- VUID-vkCmdDrawIndirectByteCount2EXT-flags-13361
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, then all bound shader objects must have been created with the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit

- VUID-vkCmdDrawIndirectByteCount2EXT-flags-13362
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, then the pipeline layout of the bound descriptor sets must have been created with VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT set

- VUID-vkCmdDrawIndirectByteCount2EXT-flags-13363
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, and any of the descriptor set layouts used to create the pipeline layout of the bound descriptor sets were created with any binding’s VkDescriptorSetLayoutBinding::`stageFlags` set with VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT, then there must be no binding with VkDescriptorSetLayoutBinding::`stageFlags` set with VK_SHADER_STAGE_TASK_BIT_EXT or VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-vkCmdDrawIndirectByteCount2EXT-flags-13364
  If there are any shader objects bound that were created with `flags` that includes both the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR and VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT bits, the pipeline layout of the bound descriptor sets must have been created with VK_PIPELINE_LAYOUT_CREATE_NO_TASK_SHADER_BIT_KHR set

- VUID-vkCmdDrawIndirectByteCount2EXT-flags-13365
  If there are any shader objects bound that were created with `flags` that includes both the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR and VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT bits, there must be no shader object bound to the VK_SHADER_STAGE_TASK_BIT_EXT stage

- VUID-vkCmdDrawIndirectByteCount2EXT-None-04007
  All vertex input bindings accessed via vertex input variables declared in the vertex shader entry point’s interface must have either valid or VK_NULL_HANDLE buffers bound

- VUID-vkCmdDrawIndirectByteCount2EXT-None-04008
  If the `nullDescriptor` feature is not enabled, all vertex input bindings accessed via vertex input variables declared in the vertex shader entry point’s interface must not be VK_NULL_HANDLE

- VUID-vkCmdDrawIndirectByteCount2EXT-None-02721
  If the `robustBufferAccess` feature is not enabled, and that pipeline was created without enabling VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS for `vertexInputs`, then for a given vertex buffer binding, any attribute data fetched must be entirely contained within the corresponding vertex buffer binding, as described in Vertex Input Description

- VUID-vkCmdDrawIndirectByteCount2EXT-format-10389
  For each vertex attribute accessed by this command, if its VkVertexInputAttributeDescription::`format` or VkVertexInputAttributeDescription2EXT::`format` is a packed format, and the `legacyVertexAttributes` feature is not enabled, the value of `attribAddress`, calculated as described in Vertex Input Calculation, must be a multiple of the size of the `format`

- VUID-vkCmdDrawIndirectByteCount2EXT-format-10390
  For each vertex attribute accessed by this command, if its VkVertexInputAttributeDescription::`format` or VkVertexInputAttributeDescription2EXT::`format` is not a packed format, and either the `legacyVertexAttributes` feature is not enabled or `format` has 64-bit components, the value of `attribAddress`, calculated as described in Vertex Input Calculation, must be a multiple of the component size of the `format`

- VUID-vkCmdDrawIndirectByteCount2EXT-None-07842
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY dynamic state enabled then vkCmdSetPrimitiveTopology must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-dynamicPrimitiveTopologyUnrestricted-07500
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY dynamic state enabled and the `dynamicPrimitiveTopologyUnrestricted` is VK_FALSE, then the `primitiveTopology` parameter of `vkCmdSetPrimitiveTopology` must be of the same topology class as the pipeline VkPipelineInputAssemblyStateCreateInfo::`topology` state

- VUID-vkCmdDrawIndirectByteCount2EXT-primitiveTopology-10286
  If a VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage is bound, then the current value of `primitiveTopology` must be VK_PRIMITIVE_TOPOLOGY_PATCH_LIST prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-primitiveTopology-10747
  If vkCmdSetPrimitiveTopology set `primitiveTopology` to VK_PRIMITIVE_TOPOLOGY_PATCH_LIST prior to this drawing command, then a VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage must be bound

- VUID-vkCmdDrawIndirectByteCount2EXT-primitiveTopology-10748
  If vkCmdSetPrimitiveTopology set `primitiveTopology` to VK_PRIMITIVE_TOPOLOGY_POINT_LIST prior to this drawing command, the `maintenance5` feature is not enabled, both a VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT and VK_SHADER_STAGE_GEOMETRY_BIT stage are not bound, then the `Vertex` `Execution` `Model` must have a `PointSize` decorated variable that is statically written to

- VUID-vkCmdDrawIndirectByteCount2EXT-pStrides-04913
  If the bound graphics pipeline was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE dynamic state enabled, but without the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled, then vkCmdBindVertexBuffers2 with a non-`NULL` `pStrides` parameter or vkCmdBindVertexBuffers3KHR with `setStride` set to VK_TRUE must have been called and not subsequently invalidated in the current command buffer prior to this draw command

- VUID-vkCmdDrawIndirectByteCount2EXT-None-13118
  If the bound graphics pipeline was created without the VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE dynamic state enabled, without the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled, and vkCmdBindVertexBuffers3KHR was called and not subsequently invalidated in the current command buffer prior to this draw command, the value of `setStride` in each of its `pBindInfos` elements must have been VK_FALSE

- VUID-vkCmdDrawIndirectByteCount2EXT-None-04914
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled then vkCmdSetVertexInputEXT must have been called and not subsequently invalidated in the current command buffer prior to this draw command

- VUID-vkCmdDrawIndirectByteCount2EXT-Input-07939
  If the `vertexAttributeRobustness` feature is not enabled, and the `maintenance9` feature is not enabled, and there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled then all variables with the `Input` storage class decorated with `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` must contain a location in VkVertexInputAttributeDescription2EXT::`location`

- VUID-vkCmdDrawIndirectByteCount2EXT-Input-08734
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled and either the `legacyVertexAttributes` feature is not enabled or the SPIR-V Type associated with a given `Input` variable of the corresponding `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` is 64-bit, then the numeric type associated with all `Input` variables of the corresponding `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` must be the same as VkVertexInputAttributeDescription2EXT::`format`

- VUID-vkCmdDrawIndirectByteCount2EXT-format-08936
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled and VkVertexInputAttributeDescription2EXT::`format` has a 64-bit component, then the scalar width associated with all `Input` variables of the corresponding `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` must be 64-bit

- VUID-vkCmdDrawIndirectByteCount2EXT-format-08937
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled and the scalar width associated with a `Location` decorated `Input` variable in the `Vertex` `Execution` `Model` `OpEntryPoint` is 64-bit, then the corresponding VkVertexInputAttributeDescription2EXT::`format` must have a 64-bit component

- VUID-vkCmdDrawIndirectByteCount2EXT-None-09203
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled and VkVertexInputAttributeDescription2EXT::`format` has a 64-bit component, then all `Input` variables at the corresponding `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` must not use components that are not present in the format

- VUID-vkCmdDrawIndirectByteCount2EXT-None-04875
  If there is a shader object bound to the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage or the bound graphics pipeline state was created with both a VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage and the VK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT dynamic state enabled, and the current value of `primitiveTopology` is VK_PRIMITIVE_TOPOLOGY_PATCH_LIST, then vkCmdSetPatchControlPointsEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-None-04879
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE dynamic state enabled then vkCmdSetPrimitiveRestartEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-None-09637
  If the `primitiveTopologyListRestart` feature is not enabled, the input assembly is VK_PRIMITIVE_TOPOLOGY_POINT_LIST, VK_PRIMITIVE_TOPOLOGY_LINE_LIST, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY, or VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY, there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE dynamic state enabled, then vkCmdSetPrimitiveRestartEnable must be VK_FALSE

- VUID-vkCmdDrawIndirectByteCount2EXT-None-10909
  If the `primitiveTopologyPatchListRestart` feature is not enabled, the input assembly is VK_PRIMITIVE_TOPOLOGY_PATCH_LIST, there is a shader object bound to the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE dynamic state enabled then vkCmdSetPrimitiveRestartEnable must be VK_FALSE

- VUID-vkCmdDrawIndirectByteCount2EXT-stage-06481
  The bound graphics pipeline must not have been created with the VkPipelineShaderStageCreateInfo::`stage` member of any element of VkGraphicsPipelineCreateInfo::`pStages` set to VK_SHADER_STAGE_TASK_BIT_EXT or VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-vkCmdDrawIndirectByteCount2EXT-None-08885
  There must be no shader object bound to either of the VK_SHADER_STAGE_TASK_BIT_EXT or VK_SHADER_STAGE_MESH_BIT_EXT stages

- VUID-vkCmdDrawIndirectByteCount2EXT-None-07619
  If a shader object is bound to the VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stage or a graphics pipeline is bound which was created with both a VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stage and the VK_DYNAMIC_STATE_TESSELLATION_DOMAIN_ORIGIN_EXT dynamic state enabled, then vkCmdSetTessellationDomainOriginEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCount2EXT-OpExecutionMode-12239
  If a shader is bound to both the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stages, and if both stages contain an `OpExecutionMode` instruction specifying the type of subdivision, they must be the same

- VUID-vkCmdDrawIndirectByteCount2EXT-OpExecutionMode-12240
  If a shader is bound to both the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stages, and if both stages contain an `OpExecutionMode` instruction specifying the orientation of triangles, they must be the same

- VUID-vkCmdDrawIndirectByteCount2EXT-OpExecutionMode-12241
  If a shader is bound to both the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stages, and if both stages contain an `OpExecutionMode` instruction specifying the segment spacing, they must be the same

- VUID-vkCmdDrawIndirectByteCount2EXT-OpExecutionMode-12242
  If a shader is bound to both the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stages, and if both stages contain an `OpExecutionMode` instruction specifying the output patch size, they must be the same

- VUID-vkCmdDrawIndirectByteCount2EXT-pNext-09461
  If the bound graphics pipeline state was created with VkPipelineVertexInputDivisorStateCreateInfo in the `pNext` chain of VkGraphicsPipelineCreateInfo::`pVertexInputState`, any member of VkPipelineVertexInputDivisorStateCreateInfo::`pVertexBindingDivisors` has a value other than `1` in `divisor`, and VkPhysicalDeviceVertexAttributeDivisorProperties::`supportsNonZeroFirstInstance` is VK_FALSE, then `firstInstance` must be `0`

- VUID-vkCmdDrawIndirectByteCount2EXT-None-09462
  If shader objects are used for drawing or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled, any member of the `pVertexBindingDescriptions` parameter to the vkCmdSetVertexInputEXT call that sets this dynamic state has a value other than `1` in `divisor`, and VkPhysicalDeviceVertexAttributeDivisorProperties::`supportsNonZeroFirstInstance` is VK_FALSE, then `firstInstance` must be `0`

- VUID-vkCmdDrawIndirectByteCount2EXT-counterOffset-09474
  `counterOffset` must be a multiple of `4`

- VUID-vkCmdDrawIndirectByteCount2EXT-transformFeedback-02287
  `VkPhysicalDeviceTransformFeedbackFeaturesEXT`::`transformFeedback` must be enabled

- VUID-vkCmdDrawIndirectByteCount2EXT-transformFeedbackDraw-02288
  The implementation must support `VkPhysicalDeviceTransformFeedbackPropertiesEXT`::`transformFeedbackDraw`

- VUID-vkCmdDrawIndirectByteCount2EXT-vertexStride-02289
  `vertexStride` must be greater than 0 and less than or equal to `VkPhysicalDeviceTransformFeedbackPropertiesEXT`::`maxTransformFeedbackBufferDataStride`

- VUID-vkCmdDrawIndirectByteCount2EXT-vertexStride-09475
  `vertexStride` must be a multiple of `4`

- VUID-vkCmdDrawIndirectByteCount2EXT-commandBuffer-02646
  `commandBuffer` must not be a protected command buffer

- VUID-vkCmdDrawIndirectByteCount2EXT-pInfo-13061
  The VkBuffer that `pInfo->counterRange` was queried from must have been created with the VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT bit set

- VUID-vkCmdDrawIndirectByteCount2EXT-pInfo-13062
  `pInfo->counterRange.address` must be a multiple of `4`

Valid Usage (Implicit)

- VUID-vkCmdDrawIndirectByteCount2EXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdDrawIndirectByteCount2EXT-pCounterInfo-parameter
  `pCounterInfo` must be a valid pointer to a valid VkBindTransformFeedbackBuffer2InfoEXT structure

- VUID-vkCmdDrawIndirectByteCount2EXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdDrawIndirectByteCount2EXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdDrawIndirectByteCount2EXT-renderpass
  This command must only be called inside of a render pass instance

- VUID-vkCmdDrawIndirectByteCount2EXT-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdDrawIndirectByteCount2EXT-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Inside | Outside | VK_QUEUE_GRAPHICS_BIT | Action

Conditional Rendering

vkCmdDrawIndirectByteCount2EXT is affected by conditional rendering

To record a non-indexed draw call, where the vertex count is based on a byte count read from a buffer and the passed in vertex stride parameter, call:

Warning | This functionality is superseded by vkCmdDrawIndirectByteCount2EXT. See Legacy Functionality for more information.

    // Provided by VK_EXT_transform_feedback
    void vkCmdDrawIndirectByteCountEXT(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    instanceCount,
        uint32_t                                    firstInstance,
        VkBuffer                                    counterBuffer,
        VkDeviceSize                                counterBufferOffset,
        uint32_t                                    counterOffset,
        uint32_t                                    vertexStride);

- `commandBuffer` is the command buffer into which the command is recorded.

- `instanceCount` is the number of instances to draw.

- `firstInstance` is the instance ID of the first instance to draw.

- `counterBuffer` is the buffer handle from where the byte count is read.

- `counterBufferOffset` is the offset into the buffer used to read the byte count, which is used to calculate the vertex count for this draw call.

- `counterOffset` is subtracted from the byte count read from the `counterBuffer` at the `counterBufferOffset`

- `vertexStride` is the stride in bytes between each element of the vertex data that is used to calculate the vertex count from the counter value. This value is typically the same value that was used in the graphics pipeline state when the transform feedback was captured as the `XfbStride`.

When the command is executed, primitives are assembled in the same way as done with vkCmdDraw except the `vertexCount` is calculated based on the byte count read from `counterBuffer` at offset `counterBufferOffset`. The assembled primitives execute the bound graphics pipeline.

The effective `vertexCount` is calculated as follows:

    const uint32_t * counterBufferPtr = (const uint8_t *)counterBuffer.address + counterBufferOffset;
    vertexCount = floor(max(0, (*counterBufferPtr - counterOffset)) / vertexStride);

The effective `firstVertex` is zero.

Valid Usage

- VUID-vkCmdDrawIndirectByteCountEXT-magFilter-04553
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdDrawIndirectByteCountEXT-magFilter-09598
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdDrawIndirectByteCountEXT-mipmapMode-04770
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdDrawIndirectByteCountEXT-mipmapMode-09599
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdDrawIndirectByteCountEXT-unnormalizedCoordinates-09635
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `levelCount` and `layerCount` must be 1

- VUID-vkCmdDrawIndirectByteCountEXT-None-08609
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `viewType` must be VK_IMAGE_VIEW_TYPE_1D or VK_IMAGE_VIEW_TYPE_2D

- VUID-vkCmdDrawIndirectByteCountEXT-None-08610
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions with `ImplicitLod`, `Dref` or `Proj` in their name

- VUID-vkCmdDrawIndirectByteCountEXT-None-08611
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions that includes a LOD bias or any offset values

- VUID-vkCmdDrawIndirectByteCountEXT-None-06479
  If a VkImageView is sampled with depth comparison, the image view’s format features must contain VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT

- VUID-vkCmdDrawIndirectByteCountEXT-None-02691
  If a VkImageView is accessed using atomic operations as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT

- VUID-vkCmdDrawIndirectByteCountEXT-None-07888
  If a VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER descriptor is accessed using atomic operations as a result of this command, then the storage texel buffer’s format features must contain VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT

- VUID-vkCmdDrawIndirectByteCountEXT-None-02692
  If a VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT

- VUID-vkCmdDrawIndirectByteCountEXT-None-02693
  If the VK_EXT_filter_cubic extension is not enabled and any VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, it must not have a VkImageViewType of VK_IMAGE_VIEW_TYPE_3D, VK_IMAGE_VIEW_TYPE_CUBE, or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY

- VUID-vkCmdDrawIndirectByteCountEXT-filterCubic-02694
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have a VkImageViewType and format that supports cubic filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubic` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdDrawIndirectByteCountEXT-filterCubicMinmax-02695
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX as a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubicMinmax` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdDrawIndirectByteCountEXT-cubicRangeClamp-09212
  If the `cubicRangeClamp` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must not have a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM

- VUID-vkCmdDrawIndirectByteCountEXT-reductionMode-09213
  Any VkImageView being sampled with a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM as a result of this command must sample with VK_FILTER_CUBIC_EXT

- VUID-vkCmdDrawIndirectByteCountEXT-selectableCubicWeights-09214
  If the `selectableCubicWeights` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have VkSamplerCubicWeightsCreateInfoQCOM::`cubicWeights` equal to VK_CUBIC_FILTER_WEIGHTS_CATMULL_ROM_QCOM

- VUID-vkCmdDrawIndirectByteCountEXT-flags-02696
  Any VkImage created with a VkImageCreateInfo::`flags` containing VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV sampled as a result of this command must only be sampled using a VkSamplerAddressMode of VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawIndirectByteCountEXT-OpTypeImage-07027
  For any VkImageView being written as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawIndirectByteCountEXT-OpTypeImage-07028
  For any VkImageView being read as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawIndirectByteCountEXT-OpTypeImage-07029
  For any VkBufferView being written as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown`, the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawIndirectByteCountEXT-OpTypeImage-07030
  Any VkBufferView being read as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown` then the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawIndirectByteCountEXT-None-08600
  If a a bound shader was created with a pipeline layout and statically uses a set n, a descriptor set must have been bound to n at the same pipeline bind point, with layouts compatible for set n with the layout(s) used to create the shader, as described in Pipeline Layout Compatibility

- VUID-vkCmdDrawIndirectByteCountEXT-None-08601
  If a a bound shader was created with a pipeline layout or specified push constant ranges and statically uses a push constant value, that value must have been set for the same pipeline bind point, with push constant ranges that are compatible with the push constant range used to create the shader

- VUID-vkCmdDrawIndirectByteCountEXT-None-10068
  For each array of resources that is used by a bound shader, the indices used to access members of the array must be less than the descriptor count for the identified binding in the descriptor sets used by this command

- VUID-vkCmdDrawIndirectByteCountEXT-None-08114
  Descriptors in each bound descriptor set, specified via vkCmdBindDescriptorSets, must be valid if they are accessed as described by descriptor validity by the VkPipeline bound to the pipeline bind point used by this command and the bound VkPipeline was not created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawIndirectByteCountEXT-imageLayout-00344
  If an image descriptor is accessed by a shader, the VkImageLayout must match the subresource accessible from the VkImageView as defined by the image layout matching rules

- VUID-vkCmdDrawIndirectByteCountEXT-None-08115
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdBindDescriptorSets, the bound VkPipeline must have been created without VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawIndirectByteCountEXT-None-08116
  Descriptors in bound descriptor buffers, specified via vkCmdSetDescriptorBufferOffsetsEXT, must be valid if they are dynamically accessed

- VUID-vkCmdDrawIndirectByteCountEXT-None-08117
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdSetDescriptorBufferOffsetsEXT, the bound VkPipeline must have been created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawIndirectByteCountEXT-None-08119
  If a descriptor is dynamically used with a VkPipeline created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdDrawIndirectByteCountEXT-None-08605
  If a descriptor is dynamically used with a VkShaderEXT created with a `VkDescriptorSetLayout` that was created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdDrawIndirectByteCountEXT-None-08606
  If the `shaderObject` feature is not enabled, a valid pipeline must be bound to the pipeline bind point used by this command

- VUID-vkCmdDrawIndirectByteCountEXT-None-08608
  If a pipeline is bound to the pipeline bind point used by this command, there must not have been any calls to dynamic state setting commands for any state specified statically in the VkPipeline object bound to the pipeline bind point used by this command, since that pipeline was bound

- VUID-vkCmdDrawIndirectByteCountEXT-uniformBuffers-06935
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawIndirectByteCountEXT-None-08612
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawIndirectByteCountEXT-storageBuffers-06936
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawIndirectByteCountEXT-None-08613
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a storage buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawIndirectByteCountEXT-commandBuffer-02707
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, any resource accessed by bound shaders must not be a protected resource

- VUID-vkCmdDrawIndirectByteCountEXT-viewType-07752
  If a VkImageView is accessed as a result of this command, then the image view’s `viewType` must match the `Dim` operand of the `OpTypeImage` as described in Compatibility Between SPIR-V Image Dimensions and Vulkan ImageView Types

- VUID-vkCmdDrawIndirectByteCountEXT-format-07753
  If a VkImageView or VkBufferView is accessed as a result of this command, then the numeric type of the view’s `format` and the `Sampled` `Type` operand of the `OpTypeImage` must match

- VUID-vkCmdDrawIndirectByteCountEXT-OpImageWrite-08795
  If a VkImageView created with a format other than VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the image view’s format

- VUID-vkCmdDrawIndirectByteCountEXT-OpImageWrite-08796
  If a VkImageView created with the format VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have four components

- VUID-vkCmdDrawIndirectByteCountEXT-OpImageWrite-04469
  If a VkBufferView is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the buffer view’s format

- VUID-vkCmdDrawIndirectByteCountEXT-SampledType-04470
  If a VkImageView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdDrawIndirectByteCountEXT-SampledType-04471
  If a VkImageView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdDrawIndirectByteCountEXT-SampledType-04472
  If a VkBufferView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdDrawIndirectByteCountEXT-SampledType-04473
  If a VkBufferView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdDrawIndirectByteCountEXT-sparseImageInt64Atomics-04474
  If the `sparseImageInt64Atomics` feature is not enabled, VkImage objects created with the VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdDrawIndirectByteCountEXT-sparseImageInt64Atomics-04475
  If the `sparseImageInt64Atomics` feature is not enabled, VkBuffer objects created with the VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdDrawIndirectByteCountEXT-OpImageSampleWeightedQCOM-06971
  If `OpImageSampleWeightedQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_SAMPLED_IMAGE_BIT_QCOM

- VUID-vkCmdDrawIndirectByteCountEXT-OpImageSampleWeightedQCOM-06972
  If `OpImageSampleWeightedQCOM` uses a VkImageView as a sample weight image as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_IMAGE_BIT_QCOM

- VUID-vkCmdDrawIndirectByteCountEXT-OpImageBoxFilterQCOM-06973
  If `OpImageBoxFilterQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BOX_FILTER_SAMPLED_BIT_QCOM

- VUID-vkCmdDrawIndirectByteCountEXT-OpImageBlockMatchSSDQCOM-06974
  If `OpImageBlockMatchSSDQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdDrawIndirectByteCountEXT-OpImageBlockMatchSADQCOM-12420
  If `OpImageBlockMatchSADQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdDrawIndirectByteCountEXT-OpImageBlockMatchSADQCOM-06976
  If `OpImageBlockMatchSADQCOM` or OpImageBlockMatchSSDQCOM is used to read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdDrawIndirectByteCountEXT-OpImageSampleWeightedQCOM-06977
  If `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdDrawIndirectByteCountEXT-OpImageSampleWeightedQCOM-06978
  If any command other than `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must not have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdDrawIndirectByteCountEXT-OpImageBlockMatchWindow-09215
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM

- VUID-vkCmdDrawIndirectByteCountEXT-OpImageBlockMatchWindow-09216
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format must be a single-component format

- VUID-vkCmdDrawIndirectByteCountEXT-OpImageBlockMatchWindow-09217
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdDrawIndirectByteCountEXT-OpImageBlockMatchWindow-12421
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the `blockMatchExtendedClampToEdge` feature is not enabled, the input sampler must not have been created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawIndirectByteCountEXT-addressModeU-12422
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the input sampler was created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, then the sampler must have been created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawIndirectByteCountEXT-None-07288
  Any shader invocation executed by this command must terminate

- VUID-vkCmdDrawIndirectByteCountEXT-None-09600
  If a descriptor with type equal to any of VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, or VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT is accessed as a result of this command, all image subresources identified by that descriptor must be in the image layout identified when the descriptor was written

- VUID-vkCmdDrawIndirectByteCountEXT-micromap-11636
  If an acceleration structure is accessed as a result of this command through an `OpRayQueryProceedKHR` operation , the `VK_EXT_opacity_micromap` extension is not enabled, and the acceleration structure is built using geometry with a VkAccelerationStructureTrianglesOpacityMicromapKHR structure included in its `pNext` chain, the shader must have specified a `OpacityMicromapIdKHR` execution mode with its specialization constant operand equal to VK_TRUE

- VUID-vkCmdDrawIndirectByteCountEXT-micromap-11637
  If an acceleration structure is accessed as a result of this command and the acceleration structure was constructed through deserialization, all micromap arrays referenced by the acceleration structure that were not replaced by an acceleration structure update command must have been deserialized using the serialized data of the corresponding micromaps used to originally build the acceleration structure prior to the execution of this command on the device

- VUID-vkCmdDrawIndirectByteCountEXT-micromap-11638
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkPipeline bound to the pipeline bind point used by this command must not have been created with `flags` that includes VK_PIPELINE_CREATE_2_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_KHR

- VUID-vkCmdDrawIndirectByteCountEXT-micromap-11639
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkShaderEXT that accessed the descriptor must not have been created with `flags` that includes VK_SHADER_CREATE_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_EXT

- VUID-vkCmdDrawIndirectByteCountEXT-commandBuffer-10746
  The `VkDeviceMemory` object allocated from a `VkMemoryHeap` with the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property that is bound to a resource accessed as a result of this command must be the active bound tile memory object in `commandBuffer`

- VUID-vkCmdDrawIndirectByteCountEXT-None-10678
  If this command is recorded inside a tile shading render pass instance, the stages corresponding to the pipeline bind point used by this command must only include VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_FRAGMENT_BIT, and/or VK_SHADER_STAGE_COMPUTE_BIT

- VUID-vkCmdDrawIndirectByteCountEXT-None-10679
  If this command is recorded where per-tile execution model is enabled, there must be no access to any image while the image was be transitioned to the VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT layout

- VUID-vkCmdDrawIndirectByteCountEXT-pDescription-09900
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the underlying VkTensorARM object must have been created with the VK_TENSOR_USAGE_SHADER_BIT_ARM usage flag set

- VUID-vkCmdDrawIndirectByteCountEXT-dimensionCount-09905
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the `Rank` of the `OpTypeTensorARM` of the tensor resource variable must be equal to the `dimensionCount` provided via VkTensorCreateInfoARM::`pDescription` when creating the underlying VkTensorARM object

- VUID-vkCmdDrawIndirectByteCountEXT-OpTypeTensorARM-09906
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the element type of the `OpTypeTensorARM` of the tensor resource variable must be compatible with the VkFormat of the VkTensorViewARM used for the access

- VUID-vkCmdDrawIndirectByteCountEXT-OpTensorReadARM-12462
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, using `OpTensorReadARM` or `OpTensorWriteARM`, and the underlying VkTensorARM object was created with a VK_TENSOR_TILING_BRICK_16_WIDE_ARM, VK_TENSOR_TILING_BRICK_8_WIDE_ARM, VK_TENSOR_TILING_BRICK_4_WIDE_ARM, VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_ARM, or VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_64K_ARM VkTensorTilingARM, and the object read or written is an array, then the innermost coordinate provided to `OpTensorReadARM` or `OpTensorWriteARM` via the `Coordinates` operand must be a multiple of the largest power of 2 that is less than or equal to the number of components of the array

- VUID-vkCmdDrawIndirectByteCountEXT-pNext-12463
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command and the corresponding VkTensorARM object was created with a VkTensorRollingBackingCreateInfoARM structure in the `pNext` chain of VkTensorCreateInfoARM, then the number of elements accessed with one `OpTensorReadARM` or `OpTensorWriteARM`, must be less than or equal to the number of elements available from the starting coordinate in the rolling backing along the innermost dimension, defined as `wraps`[`dimensionCount` - 1] - InnermostCoordinate % `wraps`[`dimensionCount` - 1] where InnermostCoordinate is the last component of the coordinates array provided via the `Coordinates` operand

- VUID-vkCmdDrawIndirectByteCountEXT-None-12472
  Descriptors dynamically accessed in bound descriptor heaps must be valid

- VUID-vkCmdDrawIndirectByteCountEXT-None-11297
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a `OpTypeStruct` decorated with `Block` or `BufferBlock` using that mapping, the calculated offset for the resource heap must be a multiple of `bufferDescriptorAlignment`

- VUID-vkCmdDrawIndirectByteCountEXT-None-11298
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeImage` or `OpTypeSampledImage` using that mapping, the calculated offset for the resource heap must be a multiple of `imageDescriptorAlignment`

- VUID-vkCmdDrawIndirectByteCountEXT-None-11299
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeSampler` or `OpTypeSampledImage` using that mapping, the calculated offset for the sampler heap must be a multiple of `samplerDescriptorAlignment`

- VUID-vkCmdDrawIndirectByteCountEXT-None-11397
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeTensorARM` using that mapping, the calculated offset for the resource heap must be a multiple of `tensorDescriptorAlignment`

- VUID-vkCmdDrawIndirectByteCountEXT-None-11300
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 4

- VUID-vkCmdDrawIndirectByteCountEXT-None-11301
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdDrawIndirectByteCountEXT-None-11302
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress

- VUID-vkCmdDrawIndirectByteCountEXT-None-11304
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 8

- VUID-vkCmdDrawIndirectByteCountEXT-None-11305
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdDrawIndirectByteCountEXT-None-11306
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address pointed to by the address in push data must be a valid VkDeviceAddress

- VUID-vkCmdDrawIndirectByteCountEXT-None-11308
  For each descriptor heap that is statically used by a bound shader, either directly or via a descriptor mapping, a valid descriptor heap must be bound

- VUID-vkCmdDrawIndirectByteCountEXT-None-11309
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, execution of this command must not result in any descriptor read accessing data outside of the user range of the respective heap bound by `vkCmdBind*HeapEXT` commands

- VUID-vkCmdDrawIndirectByteCountEXT-None-11372
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer or uniform texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified via VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawIndirectByteCountEXT-None-11373
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer or storage texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawIndirectByteCountEXT-None-11374
  If the `robustBufferAccess2` feature is not enabled, the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, uniform texel buffer, storage buffer, or storage texel buffer, that shader must not access values outside of the range of the buffer as specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawIndirectByteCountEXT-pBindInfo-11375
  If any bound shader uses an embedded sampler via a descriptor mapping, the value of `pBindInfo->reservedRangeSize` set for vkCmdBindSamplerHeapEXT must be greater than or equal to `minSamplerHeapReservedRangeWithEmbedded`

- VUID-vkCmdDrawIndirectByteCountEXT-None-11376
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, and that shader statically uses a push constant value, that value must have been set by vkCmdPushDataEXT

- VUID-vkCmdDrawIndirectByteCountEXT-None-11398
  If a bound shader was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the access must not be out of bounds

- VUID-vkCmdDrawIndirectByteCountEXT-None-11437
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the buffer from which the address in push data was queried must have been created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdDrawIndirectByteCountEXT-None-11438
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdDrawIndirectByteCountEXT-None-11441
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must be aligned to `minUniformBufferOffsetAlignment`

- VUID-vkCmdDrawIndirectByteCountEXT-None-11439
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_STORAGE_BUFFER_BIT usage flag set

- VUID-vkCmdDrawIndirectByteCountEXT-None-11442
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must be aligned to `minStorageBufferOffsetAlignment`

- VUID-vkCmdDrawIndirectByteCountEXT-None-11485
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses an acceleration structure using that mapping, the address that the acceleration structure is mapped to must be an acceleration structure address retrieved from a VkAccelerationStructureKHR object via vkGetAccelerationStructureDeviceAddressKHR or handle retrieved from a VkAccelerationStructureNV object via vkGetAccelerationStructureHandleNV

- VUID-vkCmdDrawIndirectByteCountEXT-index-11450
  If a shader uses a sampler descriptor to sample an image as a result of this command, and that sampler descriptor uses a custom border color with an index defined by VkSamplerCustomBorderColorIndexCreateInfoEXT, the value of VkSamplerCustomBorderColorIndexCreateInfoEXT::`index` must have been registered before this command was recorded, and still be registered during the sampling operation, with an identically defined color

- VUID-vkCmdDrawIndirectByteCountEXT-protectedNoFault-11455
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, the address that the resource is mapped to must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdDrawIndirectByteCountEXT-protectedNoFault-11456
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, the address of the indirect memory must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdDrawIndirectByteCountEXT-renderPass-02684
  The current render pass must be compatible with the `renderPass` member of the `VkGraphicsPipelineCreateInfo` structure specified when creating the `VkPipeline` bound to VK_PIPELINE_BIND_POINT_GRAPHICS

- VUID-vkCmdDrawIndirectByteCountEXT-subpass-02685
  The subpass index of the current render pass must be equal to the `subpass` member of the `VkGraphicsPipelineCreateInfo` structure specified when creating the `VkPipeline` bound to VK_PIPELINE_BIND_POINT_GRAPHICS

- VUID-vkCmdDrawIndirectByteCountEXT-OpTypeImage-07468
  If any shader executed by this pipeline accesses an `OpTypeImage` variable with a `Dim` operand of `SubpassData`, it must be decorated with an `InputAttachmentIndex` that corresponds to a valid input attachment in the current subpass

- VUID-vkCmdDrawIndirectByteCountEXT-None-07469
  Input attachment views accessed in a subpass must be created with the same VkFormat as the corresponding subpass definition, and be created with a VkImageView that is compatible with the attachment referenced by the subpass' `pInputAttachments`[`InputAttachmentIndex`] in the bound VkFramebuffer as specified by Fragment Input Attachment Compatibility

- VUID-vkCmdDrawIndirectByteCountEXT-pDepthInputAttachmentIndex-09595
  Input attachment views accessed in a dynamic render pass with a `InputAttachmentIndex` referenced by VkRenderingInputAttachmentIndexInfo, or no `InputAttachmentIndex` if VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` or VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` are `NULL`, must be created with a VkImageView that is compatible with the corresponding color, depth, or stencil attachment in VkRenderingInfo

- VUID-vkCmdDrawIndirectByteCountEXT-pDepthInputAttachmentIndex-09596
  Input attachment views accessed in a dynamic render pass via a shader object must have an `InputAttachmentIndex` if both VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` and VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` are non-`NULL`

- VUID-vkCmdDrawIndirectByteCountEXT-InputAttachmentIndex-09597
  If an input attachment view accessed in a dynamic render pass via a shader object has an `InputAttachmentIndex`, the `InputAttachmentIndex` must match an index in VkRenderingInputAttachmentIndexInfo

- VUID-vkCmdDrawIndirectByteCountEXT-None-06537
  Memory backing image subresources used as attachments in the current render pass must not be written in any way other than as an attachment by this command

- VUID-vkCmdDrawIndirectByteCountEXT-None-10795
  If a color attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_COLOR_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawIndirectByteCountEXT-None-10796
  If a depth attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_DEPTH_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawIndirectByteCountEXT-None-10797
  If a stencil attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_STENCIL_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawIndirectByteCountEXT-None-12338
  If a color attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_COLOR_BIT on that attachment, the color attachment must not be written to by this command

- VUID-vkCmdDrawIndirectByteCountEXT-None-12339
  If a depth attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_DEPTH_BIT on that attachment, the depth attachment must not be written to by this command

- VUID-vkCmdDrawIndirectByteCountEXT-None-12340
  If a stencil attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_STENCIL_BIT on that attachment, the stencil attachment must not be written to by this command

- VUID-vkCmdDrawIndirectByteCountEXT-None-09003
  If an attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, it must not be accessed in any way other than as an attachment, storage image, or sampled image by this command

- VUID-vkCmdDrawIndirectByteCountEXT-None-06886
  If the current render pass instance uses a depth/stencil attachment with a read-only layout for the depth aspect, depth writes must be disabled

- VUID-vkCmdDrawIndirectByteCountEXT-None-06887
  If the current render pass instance uses a depth/stencil attachment with a read-only layout for the stencil aspect, both front and back `writeMask` are not zero, and stencil test is enabled, all stencil ops must be VK_STENCIL_OP_KEEP

- VUID-vkCmdDrawIndirectByteCountEXT-None-07831
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT dynamic state enabled then vkCmdSetViewport must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-None-07832
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SCISSOR dynamic state enabled then vkCmdSetScissor must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-None-08617
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_WIDTH dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineWidth must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-None-07834
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BIAS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthBiasEnable` is VK_TRUE, then vkCmdSetDepthBias or vkCmdSetDepthBias2EXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-None-07835
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_BLEND_CONSTANTS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and an active color attachment current value of `blendEnable` is VK_TRUE with a blend equations where any VkBlendFactor member is VK_BLEND_FACTOR_CONSTANT_COLOR, VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR, VK_BLEND_FACTOR_CONSTANT_ALPHA, or VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA, then vkCmdSetBlendConstants must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-None-07836
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BOUNDS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthBoundsTestEnable` is VK_TRUE, then vkCmdSetDepthBounds must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-None-07837
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilCompareMask must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-None-07838
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_WRITE_MASK dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilWriteMask must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-None-07839
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_REFERENCE dynamic state enabled, the current value of and `rasterizerDiscardEnable` is VK_FALSE, the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilReference must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-maxMultiviewInstanceIndex-02688
  If the draw is recorded in a render pass instance with multiview enabled, the maximum instance index must be less than or equal to VkPhysicalDeviceMultiviewProperties::`maxMultiviewInstanceIndex`

- VUID-vkCmdDrawIndirectByteCountEXT-sampleLocationsEnable-02689
  If the bound graphics pipeline was created with VkPipelineSampleLocationsStateCreateInfoEXT::`sampleLocationsEnable` set to VK_TRUE, then the active depth attachment must have been created with the VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit set

- VUID-vkCmdDrawIndirectByteCountEXT-None-07634
  If the `VK_EXT_sample_locations` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetSampleLocationsEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-None-06666
  If the `VK_EXT_sample_locations` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `sampleLocationsEnable` is VK_TRUE, then vkCmdSetSampleLocationsEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-None-07840
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_CULL_MODE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCullMode must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-None-07841
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRONT_FACE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetFrontFace must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-None-07843
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, vkCmdSetDepthTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-None-07844
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthTestEnable` is VK_TRUE, then vkCmdSetDepthWriteEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-None-07845
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_COMPARE_OP dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthTestEnable` is VK_TRUE, then vkCmdSetDepthCompareOp must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-None-07846
  If the `depthBounds` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthBoundsTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-None-07847
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetStencilTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-None-07848
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_OP dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilOp must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-viewportCount-03417
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, and the state is not inherited, then vkCmdSetViewportWithCount must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-scissorCount-03418
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT dynamic state enabled, and the state is not inherited, then vkCmdSetScissorWithCount must have been called and not subsequently invalidated in the current command buffer prior to this drawing

- VUID-vkCmdDrawIndirectByteCountEXT-viewportCount-03419
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with both the VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic states enabled, and the state is not inherited, then the `viewportCount` parameter of `vkCmdSetViewportWithCount` must match the `scissorCount` parameter of `vkCmdSetScissorWithCount`

- VUID-vkCmdDrawIndirectByteCountEXT-viewportCount-04137
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportWScalingStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndirectByteCountEXT-viewportCount-04138
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, the current value of `viewportWScalingEnable` is VK_TRUE, then vkCmdSetViewportWScalingNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-None-08636
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, the current value of `viewportWScalingEnable` is VK_TRUE, then the `viewportCount` parameter in the last call to vkCmdSetViewportWScalingNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndirectByteCountEXT-viewportCount-04139
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportShadingRateImageStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndirectByteCountEXT-shadingRateImage-09233
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_COARSE_SAMPLE_ORDER_NV and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoarseSampleOrderNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-shadingRateImage-09234
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `shadingRateImageEnable` is VK_TRUE, then vkCmdSetViewportShadingRatePaletteNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-None-08637
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `shadingRateImageEnable` is VK_TRUE, then the `viewportCount` parameter in the last call to vkCmdSetViewportShadingRatePaletteNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndirectByteCountEXT-VkPipelineVieportCreateInfo-04141
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled and a VkPipelineViewportSwizzleStateCreateInfoNV structure chained from VkPipelineViewportStateCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportSwizzleStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndirectByteCountEXT-VkPipelineVieportCreateInfo-04142
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled and a VkPipelineViewportExclusiveScissorStateCreateInfoNV structure chained from VkPipelineViewportStateCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportExclusiveScissorStateCreateInfoNV::`exclusiveScissorCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndirectByteCountEXT-None-07878
  If the `exclusiveScissor` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_ENABLE_NV dynamic state enabled, then vkCmdSetExclusiveScissorEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-None-07879
  If the `exclusiveScissor` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_NV dynamic state enabled, and the most recent call to vkCmdSetExclusiveScissorEnableNV in the current command buffer set any element of `pExclusiveScissorEnables` to VK_TRUE, then vkCmdSetExclusiveScissorNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-None-04876
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE dynamic state enabled, then vkCmdSetRasterizerDiscardEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-None-04877
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthBiasEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-logicOp-04878
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LOGIC_OP_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `logicOpEnable` is VK_TRUE, then vkCmdSetLogicOpEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-primitiveFragmentShadingRateWithMultipleViewports-04552
  If the `primitiveFragmentShadingRateWithMultipleViewports` limit is not supported, the bound graphics pipeline was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, and any of the shader stages of the bound graphics pipeline write to the `PrimitiveShadingRateKHR` built-in, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and the `viewportCount` parameter of `vkCmdSetViewportWithCount` must be `1`

- VUID-vkCmdDrawIndirectByteCountEXT-primitiveFragmentShadingRateWithMultipleViewports-08642
  If the `primitiveFragmentShadingRateWithMultipleViewports` limit is not supported, and any shader object bound to a graphics stage writes to the `PrimitiveShadingRateKHR` built-in, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and the `viewportCount` parameter of `vkCmdSetViewportWithCount` must be `1`

- VUID-vkCmdDrawIndirectByteCountEXT-blendEnable-04727
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, then for each color attachment, if the corresponding image view’s format features do not contain VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT, then the corresponding current value of `blendEnable` must be VK_FALSE

- VUID-vkCmdDrawIndirectByteCountEXT-None-08644
  If a shader object is bound to any graphics stage or a graphics pipeline is bound, the current value of `rasterizerDiscardEnable` is VK_FALSE, and none of the following is enabled:

  - the `VK_AMD_mixed_attachment_samples` extension

  - the `VK_NV_framebuffer_mixed_samples` extension

  - the `multisampledRenderToSingleSampled` feature

  then the current value of `rasterizationSamples` must be the same as the current color and/or depth/stencil attachments

- VUID-vkCmdDrawIndirectByteCountEXT-None-08876
  If a shader object is bound to any graphics stage, the current render pass instance must have been begun with vkCmdBeginRendering

- VUID-vkCmdDrawIndirectByteCountEXT-imageView-06172
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawIndirectByteCountEXT-imageView-06173
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawIndirectByteCountEXT-imageView-06174
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawIndirectByteCountEXT-imageView-06175
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawIndirectByteCountEXT-imageView-06176
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawIndirectByteCountEXT-imageView-06177
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawIndirectByteCountEXT-viewMask-06178
  If the current render pass instance was begun with vkCmdBeginRendering, the bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::`viewMask` equal to VkRenderingInfo::`viewMask`

- VUID-vkCmdDrawIndirectByteCountEXT-colorAttachmentCount-06179
  If the `dynamicRenderingUnusedAttachments` feature is not enabled and the current render pass instance was begun with vkCmdBeginRendering, the bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::`colorAttachmentCount` equal to VkRenderingInfo::`colorAttachmentCount`

- VUID-vkCmdDrawIndirectByteCountEXT-dynamicRenderingUnusedAttachments-08910
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound graphics pipeline

- VUID-vkCmdDrawIndirectByteCountEXT-dynamicRenderingUnusedAttachments-08912
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` equal to VK_NULL_HANDLE must have the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound pipeline equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectByteCountEXT-dynamicRenderingUnusedAttachments-08911
  If the `dynamicRenderingUnusedAttachments` feature is enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound graphics pipeline, or the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats`, if it exists, must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectByteCountEXT-colorAttachmentCount-09362
  If the current render pass instance was begun with vkCmdBeginRendering, with a VkRenderingInfo::`colorAttachmentCount` equal to `1`, there is no shader object bound to any graphics stage, and a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, each element of the VkRenderingInfo::`pColorAttachments` array with a `resolveImageView` not equal to VK_NULL_HANDLE must have been created with an image created with a VkExternalFormatANDROID::`externalFormat` value equal to the VkExternalFormatANDROID::`externalFormat` value used to create the bound graphics pipeline

- VUID-vkCmdDrawIndirectByteCountEXT-None-09363
  If there is no shader object bound to any graphics stage, the current render pass instance was begun with vkCmdBeginRendering and a VkRenderingInfo::`colorAttachmentCount` equal to `1`, and a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with an image created with a VkExternalFormatANDROID::`externalFormat` value equal to the VkExternalFormatANDROID::`externalFormat` value used to create the bound graphics pipeline

- VUID-vkCmdDrawIndirectByteCountEXT-None-09364
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetColorBlendEnableEXT must have set the blend enable to VK_FALSE prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-None-09365
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetRasterizationSamplesEXT must have set `rasterizationSamples` to VK_SAMPLE_COUNT_1_BIT prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-None-09368
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetFragmentShadingRateKHR must have set `pFragmentSize->width` to `1` prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-None-09369
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetFragmentShadingRateKHR must have set `pFragmentSize->height` to `1` prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-None-07749
  If the `colorWriteEnable` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorWriteEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-attachmentCount-07750
  If the `colorWriteEnable` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the `attachmentCount` parameter of most recent call to `vkCmdSetColorWriteEnableEXT` in the current command buffer must be greater than or equal to the number of active color attachments

- VUID-vkCmdDrawIndirectByteCountEXT-None-07751
  If the `VK_EXT_discard_rectangles` extension is enabled, a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT dynamic state enabled and the `pNext` chain of VkGraphicsPipelineCreateInfo included a VkPipelineDiscardRectangleStateCreateInfoEXT structure, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for each discard rectangle in VkPipelineDiscardRectangleStateCreateInfoEXT::`discardRectangleCount`

- VUID-vkCmdDrawIndirectByteCountEXT-rasterizerDiscardEnable-09236
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT dynamic state enabled and the `pNext` chain of VkGraphicsPipelineCreateInfo did not include a VkPipelineDiscardRectangleStateCreateInfoEXT structure, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for each discard rectangle in VkPhysicalDeviceDiscardRectanglePropertiesEXT::`maxDiscardRectangles`

- VUID-vkCmdDrawIndirectByteCountEXT-None-07880
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDiscardRectangleEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-None-07881
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_MODE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-dynamicRenderingUnusedAttachments-08913
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->imageView` was VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectByteCountEXT-dynamicRenderingUnusedAttachments-08914
  If current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawIndirectByteCountEXT-dynamicRenderingUnusedAttachments-08915
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, and the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->imageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectByteCountEXT-dynamicRenderingUnusedAttachments-08916
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->imageView` was VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectByteCountEXT-dynamicRenderingUnusedAttachments-08917
  If current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawIndirectByteCountEXT-dynamicRenderingUnusedAttachments-08918
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, and the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->imageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectByteCountEXT-imageView-06183
  If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentShadingRateAttachmentInfoKHR::`imageView` was not VK_NULL_HANDLE, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

- VUID-vkCmdDrawIndirectByteCountEXT-dynamicRenderingLocalRead-11797
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingLocalRead` feature is enabled, the VK_RENDERING_LOCAL_READ_CONCURRENT_ACCESS_CONTROL_BIT_KHR flag is specified, and an attachment is being used as a feedback loop as specified by VK_RENDERING_ATTACHMENT_INPUT_ATTACHMENT_FEEDBACK_BIT_KHR, VkRenderingAttachmentFlagsInfoKHR::`flags` for that attachment must include VK_RENDERING_ATTACHMENT_INPUT_ATTACHMENT_FEEDBACK_BIT_KHR

- VUID-vkCmdDrawIndirectByteCountEXT-imageView-06184
  If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentDensityMapAttachmentInfoEXT::`imageView` was not VK_NULL_HANDLE, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT

- VUID-vkCmdDrawIndirectByteCountEXT-layers-10831
  If the current render pass instance was created with VK_RENDERING_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE or VK_RENDER_PASS_CREATE_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE, and the bound graphics pipeline was created with VK_PIPELINE_CREATE_2_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE, then the current render pass instance must have a `layers` value less than or equal to VkPipelineFragmentDensityMapLayeredCreateInfoVALVE::`maxFragmentDensityMapLayers`

- VUID-vkCmdDrawIndirectByteCountEXT-colorAttachmentCount-06185
  If the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with a sample count equal to the corresponding element of the `pColorAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline

- VUID-vkCmdDrawIndirectByteCountEXT-pDepthAttachment-06186
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of the `depthStencilAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawIndirectByteCountEXT-pStencilAttachment-06187
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of the `depthStencilAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawIndirectByteCountEXT-multisampledRenderToSingleSampled-07285
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with a sample count equal to the value of `rasterizationSamples` for the bound graphics pipeline

- VUID-vkCmdDrawIndirectByteCountEXT-multisampledRenderToSingleSampled-07286
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawIndirectByteCountEXT-multisampledRenderToSingleSampled-07287
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawIndirectByteCountEXT-pNext-07935
  If this command is called inside a render pass instance started with vkCmdBeginRendering, and the `pNext` chain of VkRenderingInfo includes a VkMultisampledRenderToSingleSampledInfoEXT structure with `multisampledRenderToSingleSampledEnable` equal to VK_TRUE, then the value of `rasterizationSamples` for the bound graphics pipeline must be equal to VkMultisampledRenderToSingleSampledInfoEXT::`rasterizationSamples`

- VUID-vkCmdDrawIndirectByteCountEXT-renderPass-06198
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline must have been created with a VkGraphicsPipelineCreateInfo::`renderPass` equal to VK_NULL_HANDLE

- VUID-vkCmdDrawIndirectByteCountEXT-pColorAttachments-08963
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound with a fragment shader that statically writes to a color attachment, the color write mask is not zero, color writes are enabled, and the corresponding element of the VkRenderingInfo::`pColorAttachments->imageView` was not VK_NULL_HANDLE, then the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectByteCountEXT-pColorAttachments-11539
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound with a fragment shader that statically writes to a color attachment, the color write mask is not zero, color writes are enabled, and the corresponding element of the VkRenderingInfo::`pColorAttachments->resolveImageView` was not VK_NULL_HANDLE, then the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectByteCountEXT-pDepthAttachment-08964
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound, depth test is enabled, and the VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, then the VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectByteCountEXT-pDepthAttachment-11540
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound, depth test is enabled, and the VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, then the VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectByteCountEXT-pStencilAttachment-08965
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound, stencil test is enabled and the VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, then the VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectByteCountEXT-pStencilAttachment-11860
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound, stencil test is enabled and the VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, then the VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectByteCountEXT-flags-10582
  If the current render pass instance was begun with a vkCmdBeginRendering call in `commandBuffer`, its VkRenderingInfo::`flags` parameter must not have VK_RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT set unless VK_RENDERING_CONTENTS_INLINE_BIT_KHR is also set

- VUID-vkCmdDrawIndirectByteCountEXT-primitivesGeneratedQueryWithRasterizerDiscard-06708
  If the `primitivesGeneratedQueryWithRasterizerDiscard` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, rasterization discard must not be enabled

- VUID-vkCmdDrawIndirectByteCountEXT-primitivesGeneratedQueryWithNonZeroStreams-06709
  If the `primitivesGeneratedQueryWithNonZeroStreams` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, the bound graphics pipeline must not have been created with a non-zero value in `VkPipelineRasterizationStateStreamCreateInfoEXT`::`rasterizationStream`

- VUID-vkCmdDrawIndirectByteCountEXT-None-07620
  If the `depthClamp` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLAMP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthClampEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-None-07621
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_POLYGON_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetPolygonModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-None-07622
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetRasterizationSamplesEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-None-07623
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetSampleMaskEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-alphaToCoverageEnable-08919
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT dynamic state enabled, and `alphaToCoverageEnable` was VK_TRUE in the last call to vkCmdSetAlphaToCoverageEnableEXT, then the Fragment Output Interface must contain a variable for the alpha `Component` word in `Location` 0 at `Index` 0

- VUID-vkCmdDrawIndirectByteCountEXT-alphaToCoverageEnable-08920
  If a shader object is bound to any graphics stage, and the most recent call to vkCmdSetAlphaToCoverageEnableEXT in the current command buffer set `alphaToCoverageEnable` to VK_TRUE, then the Fragment Output Interface must contain a variable for the alpha `Component` word in `Location` 0 at `Index` 0

- VUID-vkCmdDrawIndirectByteCountEXT-None-07624
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAlphaToCoverageEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-None-07625
  If the `alphaToOne` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ALPHA_TO_ONE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAlphaToOneEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-None-07626
  If the `logicOp` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LOGIC_OP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetLogicOpEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-None-07627
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and there are color attachments bound, then vkCmdSetColorBlendEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-None-07629
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and there are color attachments bound, then vkCmdSetColorWriteMaskEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-None-07630
  If the `geometryStreams` feature is enabled, and a shader object is bound to the VK_SHADER_STAGE_GEOMETRY_BIT stage or a graphics pipeline is bound which was created with both a VK_SHADER_STAGE_GEOMETRY_BIT stage and the VK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXT dynamic state enabled, then vkCmdSetRasterizationStreamEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-None-07631
  If the `VK_EXT_conservative_rasterization` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_CONSERVATIVE_RASTERIZATION_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetConservativeRasterizationModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-None-07632
  If the `VK_EXT_conservative_rasterization` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXTRA_PRIMITIVE_OVERESTIMATION_SIZE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `conservativeRasterizationMode` is VK_CONSERVATIVE_RASTERIZATION_MODE_OVERESTIMATE_EXT, then vkCmdSetExtraPrimitiveOverestimationSizeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-conservativePointAndLineRasterization-07499
  If the `VK_EXT_conservative_rasterization` extension is enabled, `conservativePointAndLineRasterization` is not supported, a shader object is bound to any graphics stage or a graphics pipeline is bound, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line or point topology class, then the current value of `conservativeRasterizationMode` must be VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT

- VUID-vkCmdDrawIndirectByteCountEXT-None-07633
  If the `depthClipEnable` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLIP_ENABLE_EXT dynamic state, then vkCmdSetDepthClipEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-None-07636
  If the `VK_EXT_provoking_vertex` extension is enabled, a shader object is bound to the VK_SHADER_STAGE_VERTEX_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_PROVOKING_VERTEX_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetProvokingVertexModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-None-08666
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineRasterizationModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-None-08669
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineStippleEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-None-07849
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled and a shader object is bound to any graphics stage, or a bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stippledLineEnable` is VK_TRUE, then vkCmdSetLineStipple must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-None-10608
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic state enabled, the effective rasterization input topology is in the line topology class, and the current `lineRasterizationMode` is VK_LINE_RASTERIZATION_MODE_BRESENHAM or VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH, then the current `alphaToCoverageEnable`, `alphaToOneEnable` and `sampleShadingEnable` states must all be VK_FALSE

- VUID-vkCmdDrawIndirectByteCountEXT-None-07639
  If the `depthClipControl` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLIP_NEGATIVE_ONE_TO_ONE_EXT dynamic state enabled, then vkCmdSetDepthClipNegativeOneToOneEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-None-09650
  If the `depthClampControl` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLAMP_RANGE_EXT dynamic state enabled, and the current value of `depthClampEnable` is VK_TRUE, then vkCmdSetDepthClampRangeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-None-07640
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_ENABLE_NV dynamic state enabled, then vkCmdSetViewportWScalingEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-None-07641
  If the `VK_NV_viewport_swizzle` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic state enabled, then vkCmdSetViewportSwizzleNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-None-07642
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageToColorEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-None-07643
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_LOCATION_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageToColorEnable` is VK_TRUE, then vkCmdSetCoverageToColorLocationNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-None-07644
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_MODE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageModulationModeNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-None-07645
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageModulationMode` is any value other than VK_COVERAGE_MODULATION_MODE_NONE_NV, then vkCmdSetCoverageModulationTableEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-None-07646
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageModulationTableEnable` is VK_TRUE, then vkCmdSetCoverageModulationTableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-None-07647
  If the `shadingRateImage` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SHADING_RATE_IMAGE_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetShadingRateImageEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-pipelineFragmentShadingRate-09238
  If the `pipelineFragmentShadingRate` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetFragmentShadingRateKHR must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-None-07648
  If the `representativeFragmentTest` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_REPRESENTATIVE_FRAGMENT_TEST_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetRepresentativeFragmentTestEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-None-07649
  If the `coverageReductionMode` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageReductionModeNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-rasterizationSamples-07471
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current subpass does not use any color and/or depth/stencil attachments, then the `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT must follow the rules for a zero-attachment subpass

- VUID-vkCmdDrawIndirectByteCountEXT-samples-07472
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state disabled, then the `samples` parameter in the last call to vkCmdSetSampleMaskEXT must be greater or equal to the VkPipelineMultisampleStateCreateInfo::`rasterizationSamples` parameter used to create the bound graphics pipeline

- VUID-vkCmdDrawIndirectByteCountEXT-samples-07473
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT state and VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT states enabled, then the `samples` parameter in the last call to vkCmdSetSampleMaskEXT must be greater or equal to the `rasterizationSamples` parameter in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawIndirectByteCountEXT-None-09211
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, or a shader object is bound to any graphics stage, and the current render pass instance includes a VkMultisampledRenderToSingleSampledInfoEXT structure with `multisampledRenderToSingleSampledEnable` equal to VK_TRUE, then the `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT must be the same as the `rasterizationSamples` member of that structure

- VUID-vkCmdDrawIndirectByteCountEXT-firstAttachment-07476
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic states enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the last call to vkCmdSetColorBlendEnableEXT in the current command buffer prior to this drawing command must have set a value for all active color attachments

- VUID-vkCmdDrawIndirectByteCountEXT-firstAttachment-07478
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT dynamic states enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the last call to vkCmdSetColorWriteMaskEXT in the current command buffer prior to this drawing command must have set a value for all active color attachments

- VUID-vkCmdDrawIndirectByteCountEXT-advancedBlendMaxColorAttachments-07480
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT and VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic states enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and an active color attachment current value of `blendEnable` is VK_TRUE, then the number of active color attachments must not exceed `advancedBlendMaxColorAttachments`

- VUID-vkCmdDrawIndirectByteCountEXT-None-10862
  If a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT , but not the VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorBlendEquationEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawIndirectByteCountEXT-rasterizerDiscardEnable-10863
  If a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT, but not the VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorBlendAdvancedEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawIndirectByteCountEXT-None-10864
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT and VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then either vkCmdSetColorBlendAdvancedEXT or vkCmdSetColorBlendEquationEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawIndirectByteCountEXT-primitivesGeneratedQueryWithNonZeroStreams-07481
  If the `primitivesGeneratedQueryWithNonZeroStreams` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, and the bound graphics pipeline was created with VK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXT state enabled, the last call to vkCmdSetRasterizationStreamEXT must have set the `rasterizationStream` to zero

- VUID-vkCmdDrawIndirectByteCountEXT-sampleLocationsPerPixel-07482
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state disabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then the `sampleLocationsPerPixel` member of `pSampleLocationsInfo` in the last call to vkCmdSetSampleLocationsEXT must equal the `rasterizationSamples` member of the VkPipelineMultisampleStateCreateInfo structure the bound graphics pipeline has been created with

- VUID-vkCmdDrawIndirectByteCountEXT-sampleLocationsPerPixel-07483
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then the `sampleLocationsPerPixel` member of `pSampleLocationsInfo` in the last call to vkCmdSetSampleLocationsEXT must equal the `rasterizationSamples` parameter of the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawIndirectByteCountEXT-sampleLocationsEnable-07484
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT then the current active depth attachment must have been created with the VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit set

- VUID-vkCmdDrawIndirectByteCountEXT-sampleLocationsEnable-07485
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, then the `sampleLocationsInfo.maxSampleLocationGridSize.width` in the last call to vkCmdSetSampleLocationsEXT must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.width` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling `rasterizationSamples`

- VUID-vkCmdDrawIndirectByteCountEXT-sampleLocationsEnable-07486
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, then the `sampleLocationsInfo.maxSampleLocationGridSize.height` in the last call to vkCmdSetSampleLocationsEXT must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.height` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling `rasterizationSamples`

- VUID-vkCmdDrawIndirectByteCountEXT-sampleLocationsEnable-07487
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, the fragment shader code must not statically use the extended instruction `InterpolateAtSample`

- VUID-vkCmdDrawIndirectByteCountEXT-sampleLocationsEnable-07936
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationGridSize.width` must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.width` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling the value of `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawIndirectByteCountEXT-sampleLocationsEnable-07937
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationGridSize.height` must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.height` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling the value of `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawIndirectByteCountEXT-sampleLocationsEnable-07938
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationsPerPixel` must equal `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawIndirectByteCountEXT-coverageModulationTableEnable-07488
  If a shader object is bound to any graphics stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NV state enabled, and the last call to vkCmdSetCoverageModulationTableEnableNV set `coverageModulationTableEnable` to VK_TRUE, then the `coverageModulationTableCount` parameter in the last call to vkCmdSetCoverageModulationTableNV must equal the current `rasterizationSamples` divided by the number of color samples in the current active color attachment

- VUID-vkCmdDrawIndirectByteCountEXT-rasterizationSamples-07489
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, and if current subpass has a depth/stencil attachment and depth test, stencil test, or depth bounds test are enabled in the bound pipeline, then the current `rasterizationSamples` must be the same as the sample count of the depth/stencil attachment

- VUID-vkCmdDrawIndirectByteCountEXT-coverageToColorEnable-07490
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV state enabled and the last call to vkCmdSetCoverageToColorEnableNV set the `coverageToColorEnable` to VK_TRUE, then there must be an active color attachment at the location selected by the last call to vkCmdSetCoverageToColorLocationNV `coverageToColorLocation`, with a VkFormat of VK_FORMAT_R8_UINT, VK_FORMAT_R8_SINT, VK_FORMAT_R16_UINT, VK_FORMAT_R16_SINT, VK_FORMAT_R32_UINT, or VK_FORMAT_R32_SINT

- VUID-vkCmdDrawIndirectByteCountEXT-rasterizerDiscardEnable-09420
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, and a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, and the most recent call to vkCmdSetRasterizerDiscardEnable in the current command buffer set `rasterizerDiscardEnable` to VK_FALSE, and the last call to vkCmdSetCoverageToColorEnableNV set the `coverageToColorEnable` to VK_TRUE, then there must be an active color attachment at the location selected by the last call to vkCmdSetCoverageToColorLocationNV `coverageToColorLocation`, with a VkFormat of VK_FORMAT_R8_UINT, VK_FORMAT_R8_SINT, VK_FORMAT_R16_UINT, VK_FORMAT_R16_SINT, VK_FORMAT_R32_UINT, or VK_FORMAT_R32_SINT

- VUID-vkCmdDrawIndirectByteCountEXT-coverageReductionMode-07491
  If the `coverageReductionMode` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV or VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic states enabled, then the current values of `coverageReductionMode`, `rasterizationSamples`, the sample counts for the color and depth/stencil attachments (if the subpass has them) must be a valid combination returned by vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV

- VUID-vkCmdDrawIndirectByteCountEXT-viewportCount-07492
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportSwizzleStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndirectByteCountEXT-viewportCount-07493
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic states enabled then the `viewportCount` parameter in the last call to vkCmdSetViewportSwizzleNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndirectByteCountEXT-viewportCount-09421
  If the `VK_NV_viewport_swizzle` extension is enabled, and a shader object is bound to any graphics stage, then the `viewportCount` parameter in the last call to vkCmdSetViewportSwizzleNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawIndirectByteCountEXT-rasterizationSamples-07494
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, and the `coverageReductionMode` feature is not enabled, or the current value of `coverageReductionMode` is not VK_COVERAGE_REDUCTION_MODE_TRUNCATE_NV, and the current value of `rasterizationSamples` is greater than sample count of the color attachment, then sample shading must be disabled

- VUID-vkCmdDrawIndirectByteCountEXT-stippledLineEnable-07495
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_RECTANGULAR, then the `stippledRectangularLines` feature must be enabled

- VUID-vkCmdDrawIndirectByteCountEXT-stippledLineEnable-07496
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_BRESENHAM, then the `stippledBresenhamLines` feature must be enabled

- VUID-vkCmdDrawIndirectByteCountEXT-stippledLineEnable-07497
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH, then the `stippledSmoothLines` feature must be enabled

- VUID-vkCmdDrawIndirectByteCountEXT-stippledLineEnable-07498
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_DEFAULT, then the `stippledRectangularLines` feature must be enabled and VkPhysicalDeviceLimits::`strictLines` must be VK_TRUE

- VUID-vkCmdDrawIndirectByteCountEXT-stage-07073
  If the bound pipeline was created with the VkPipelineShaderStageCreateInfo::`stage` member of an element of VkGraphicsPipelineCreateInfo::`pStages` set to VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT, then Mesh Shader Queries must not be active

- VUID-vkCmdDrawIndirectByteCountEXT-None-08877
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ATTACHMENT_FEEDBACK_LOOP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAttachmentFeedbackLoopEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-None-07850
  If dynamic state was inherited from VkCommandBufferInheritanceViewportScissorInfoNV, it must be set in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-nextStage-10745
  For each shader object bound to a graphics stage, except for shader object bound to the last graphics stage in the logical pipeline, it must have been created with a `nextStage` including the corresponding bit to the shader object bound to the following graphics stage in the logical pipeline

- VUID-vkCmdDrawIndirectByteCountEXT-None-08684
  If there is no bound graphics pipeline, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_VERTEX_BIT

- VUID-vkCmdDrawIndirectByteCountEXT-None-08685
  If there is no bound graphics pipeline, and the `tessellationShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT

- VUID-vkCmdDrawIndirectByteCountEXT-None-08686
  If there is no bound graphics pipeline, and the `tessellationShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT

- VUID-vkCmdDrawIndirectByteCountEXT-None-08687
  If there is no bound graphics pipeline, and the `geometryShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_GEOMETRY_BIT

- VUID-vkCmdDrawIndirectByteCountEXT-None-08688
  If there is no bound graphics pipeline, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_FRAGMENT_BIT

- VUID-vkCmdDrawIndirectByteCountEXT-None-08689
  If there is no bound graphics pipeline, and the `taskShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TASK_BIT_EXT

- VUID-vkCmdDrawIndirectByteCountEXT-None-08690
  If there is no bound graphics pipeline, and the `meshShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-vkCmdDrawIndirectByteCountEXT-None-08693
  If there is no bound graphics pipeline, and at least one of the `taskShader` and `meshShader` features is enabled, one of the VK_SHADER_STAGE_VERTEX_BIT or VK_SHADER_STAGE_MESH_BIT_EXT stages must have a valid `VkShaderEXT` bound, and the other must have no `VkShaderEXT` bound

- VUID-vkCmdDrawIndirectByteCountEXT-None-08696
  If there is no bound graphics pipeline, and a valid `VkShaderEXT` is bound to the VK_SHADER_STAGE_VERTEX_BIT stage, there must be no `VkShaderEXT` bound to either the VK_SHADER_STAGE_TASK_BIT_EXT stage or the VK_SHADER_STAGE_MESH_BIT_EXT stage

- VUID-vkCmdDrawIndirectByteCountEXT-None-08698
  If any graphics shader is bound which was created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag, then all shaders created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag in the same vkCreateShadersEXT call must also be bound

- VUID-vkCmdDrawIndirectByteCountEXT-None-08699
  If any graphics shader is bound which was created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag, any stages in between stages whose shaders which did not create a shader with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag as part of the same vkCreateShadersEXT call must not have any `VkShaderEXT` bound

- VUID-vkCmdDrawIndirectByteCountEXT-None-08878
  All bound graphics shader objects must have been created with identical or identically defined push constant ranges

- VUID-vkCmdDrawIndirectByteCountEXT-None-08879
  All bound graphics shader objects must have either been created with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag set, or with identical or identically defined arrays of descriptor set layouts

- VUID-vkCmdDrawIndirectByteCountEXT-colorAttachmentCount-09372
  If the current render pass instance was begun with vkCmdBeginRendering and a VkRenderingInfo::`colorAttachmentCount` equal to `1`, a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, and a fragment shader is bound, it must not declare the `DepthReplacing` or `StencilRefReplacingEXT` execution modes

- VUID-vkCmdDrawIndirectByteCountEXT-pDynamicStates-08715
  If the bound graphics pipeline state includes a fragment shader stage, was created with VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`, and the fragment shader declares the `EarlyFragmentTests` execution mode and uses `OpDepthAttachmentReadEXT`, the `depthWriteEnable` parameter in the last call to vkCmdSetDepthWriteEnable must be VK_FALSE

- VUID-vkCmdDrawIndirectByteCountEXT-pDynamicStates-08716
  If the bound graphics pipeline state includes a fragment shader stage, was created with VK_DYNAMIC_STATE_STENCIL_WRITE_MASK set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`, and the fragment shader declares the `EarlyFragmentTests` execution mode and uses `OpStencilAttachmentReadEXT`, the `writeMask` parameter in the last call to vkCmdSetStencilWriteMask must be `0`

- VUID-vkCmdDrawIndirectByteCountEXT-None-09116
  If a shader object is bound to any graphics stage or the bound graphics pipeline was created with VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT, and the format of any color attachment is VK_FORMAT_E5B9G9R9_UFLOAT_PACK32, the corresponding element of the `pColorWriteMasks` parameter of vkCmdSetColorWriteMaskEXT must either include all of VK_COLOR_COMPONENT_R_BIT, VK_COLOR_COMPONENT_G_BIT, VK_COLOR_COMPONENT_B_BIT, and VK_COLOR_COMPONENT_A_BIT, or none of them

- VUID-vkCmdDrawIndirectByteCountEXT-maxFragmentDualSrcAttachments-09239
  If blending is enabled for any attachment where either the source or destination blend factors for that attachment use the secondary color input, the maximum value of `Location` for any output attachment statically used in the `Fragment` `Execution` `Model` executed by this command must be less than `maxFragmentDualSrcAttachments`

- VUID-vkCmdDrawIndirectByteCountEXT-None-09548
  If the current render pass was begun with vkCmdBeginRendering, there is no shader object bound to any graphics stage, the value of each element of VkRenderingAttachmentLocationInfo::`pColorAttachmentLocations` in the bound pipeline must match the value for the corresponding locations set currently in the current render pass instance

- VUID-vkCmdDrawIndirectByteCountEXT-None-09549
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of each element of VkRenderingInputAttachmentIndexInfo::`pColorAttachmentInputIndices` in the bound pipeline must match the value for the corresponding index set currently in the current render pass instance

- VUID-vkCmdDrawIndirectByteCountEXT-None-10927
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` in the bound pipeline must match the value set currently in the current render pass instance

- VUID-vkCmdDrawIndirectByteCountEXT-None-10928
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` in the bound pipeline must match the value set currently in the current render pass instance

- VUID-vkCmdDrawIndirectByteCountEXT-None-09642
  If the current render pass was begun with vkCmdBeginRendering with the VK_RENDERING_ENABLE_LEGACY_DITHERING_BIT_EXT flag, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_2_ENABLE_LEGACY_DITHERING_BIT_EXT

- VUID-vkCmdDrawIndirectByteCountEXT-None-09643
  If the bound graphics pipeline was created with VK_PIPELINE_CREATE_2_ENABLE_LEGACY_DITHERING_BIT_EXT, the current render pass must have begun with vkCmdBeginRendering with the VK_RENDERING_ENABLE_LEGACY_DITHERING_BIT_EXT flag

- VUID-vkCmdDrawIndirectByteCountEXT-None-10677
  If the per-tile execution model is enabled, the tileShadingPerTileDraw feature must be enabled

- VUID-vkCmdDrawIndirectByteCountEXT-None-10772
  If a shader object is bound to any graphics stage, multiview functionality must not be enabled in the current render pass

- VUID-vkCmdDrawIndirectByteCountEXT-multiviewPerViewViewports-12262
  If the `multiviewPerViewViewports` feature is enabled, then the index of the most significant bit in current render pass instance `viewMask` must be less than the current value of `viewportCount`

- VUID-vkCmdDrawIndirectByteCountEXT-multiviewPerViewViewports-12263
  If the `multiviewPerViewViewports` feature is enabled, then the index of the most significant bit in current render pass instance `viewMask` must be less than the current value of `scissorCount`

- VUID-vkCmdDrawIndirectByteCountEXT-flags-11521
  If current render pass instance was begun with vkCmdBeginRendering with VkRenderingInfo::`flags` which includes VK_RENDERING_FRAGMENT_REGION_BIT_EXT, and if sample shading is enabled (explicitly or implicitly), then the minimum fraction for sample shading must equal 0.0

- VUID-vkCmdDrawIndirectByteCountEXT-None-11522
  If the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, and the `dynamicRenderingUnusedAttachments` feature is not enabled, the graphics pipeline bound must have been created with a VkCustomResolveCreateInfoEXT

- VUID-vkCmdDrawIndirectByteCountEXT-None-11523
  If the current render pass instance was begun with vkCmdBeginRendering and does not contain a custom resolve, and the `dynamicRenderingUnusedAttachments` feature is not enabled, the graphics pipeline bound must not have been created with a VkCustomResolveCreateInfoEXT

- VUID-vkCmdDrawIndirectByteCountEXT-customResolve-11524
  If the current render pass instance was begun with vkCmdBeginRendering and vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, the graphics pipeline bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_TRUE

- VUID-vkCmdDrawIndirectByteCountEXT-customResolve-11525
  If the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, and vkCmdBeginCustomResolveEXT has not been recorded in the render pass instance, the graphics pipeline bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_FALSE

- VUID-vkCmdDrawIndirectByteCountEXT-None-11861
  If the `dynamicRenderingUnusedAttachments` feature is not enabled and the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, the bound graphics pipeline must have been created with a VkCustomResolveCreateInfoEXT::`colorAttachmentCount` equal to VkRenderingInfo::`colorAttachmentCount`

- VUID-vkCmdDrawIndirectByteCountEXT-None-11862
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound graphics pipeline

- VUID-vkCmdDrawIndirectByteCountEXT-None-11863
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` equal to VK_NULL_HANDLE must have the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound pipeline equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectByteCountEXT-dynamicRenderingUnusedAttachments-11864
  If the `dynamicRenderingUnusedAttachments` feature is enabled, the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound graphics pipeline, or the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats`, if it exists, must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectByteCountEXT-None-11865
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectByteCountEXT-None-11866
  If current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`

- VUID-vkCmdDrawIndirectByteCountEXT-dynamicRenderingUnusedAttachments-11867
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, and the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectByteCountEXT-None-11868
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->resolveImageView` was VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectByteCountEXT-None-11869
  If current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`

- VUID-vkCmdDrawIndirectByteCountEXT-dynamicRenderingUnusedAttachments-11870
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, and the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawIndirectByteCountEXT-colorAttachmentCount-11871
  If the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0` and vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, then for each element of the VkRenderingInfo::`pColorAttachments` array with a `resolveImageView` not equal to VK_NULL_HANDLE, the `resolveImageView` must have been created with a sample count equal to the value of `rasterizationSamples` for the bound graphics pipeline

- VUID-vkCmdDrawIndirectByteCountEXT-pDepthAttachment-11872
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`

- VUID-vkCmdDrawIndirectByteCountEXT-pStencilAttachment-11873
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`

- VUID-vkCmdDrawIndirectByteCountEXT-customResolve-11529
  If a shader object is bound to the fragment stage, the current render pass instance was begun with vkCmdBeginRendering, a fragment density map attachment is active, and vkCmdBeginCustomResolveEXT has been called, then the fragment shader object bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_TRUE

- VUID-vkCmdDrawIndirectByteCountEXT-customResolve-11530
  If a shader object is bound to the fragment stage, the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, a fragment density map attachment is active, and vkCmdBeginCustomResolveEXT has not yet been called, then the fragment shader object bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_FALSE

- VUID-vkCmdDrawIndirectByteCountEXT-flags-13361
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, then all bound shader objects must have been created with the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit

- VUID-vkCmdDrawIndirectByteCountEXT-flags-13362
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, then the pipeline layout of the bound descriptor sets must have been created with VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT set

- VUID-vkCmdDrawIndirectByteCountEXT-flags-13363
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, and any of the descriptor set layouts used to create the pipeline layout of the bound descriptor sets were created with any binding’s VkDescriptorSetLayoutBinding::`stageFlags` set with VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT, then there must be no binding with VkDescriptorSetLayoutBinding::`stageFlags` set with VK_SHADER_STAGE_TASK_BIT_EXT or VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-vkCmdDrawIndirectByteCountEXT-flags-13364
  If there are any shader objects bound that were created with `flags` that includes both the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR and VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT bits, the pipeline layout of the bound descriptor sets must have been created with VK_PIPELINE_LAYOUT_CREATE_NO_TASK_SHADER_BIT_KHR set

- VUID-vkCmdDrawIndirectByteCountEXT-flags-13365
  If there are any shader objects bound that were created with `flags` that includes both the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR and VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT bits, there must be no shader object bound to the VK_SHADER_STAGE_TASK_BIT_EXT stage

- VUID-vkCmdDrawIndirectByteCountEXT-None-04007
  All vertex input bindings accessed via vertex input variables declared in the vertex shader entry point’s interface must have either valid or VK_NULL_HANDLE buffers bound

- VUID-vkCmdDrawIndirectByteCountEXT-None-04008
  If the `nullDescriptor` feature is not enabled, all vertex input bindings accessed via vertex input variables declared in the vertex shader entry point’s interface must not be VK_NULL_HANDLE

- VUID-vkCmdDrawIndirectByteCountEXT-None-02721
  If the `robustBufferAccess` feature is not enabled, and that pipeline was created without enabling VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS for `vertexInputs`, then for a given vertex buffer binding, any attribute data fetched must be entirely contained within the corresponding vertex buffer binding, as described in Vertex Input Description

- VUID-vkCmdDrawIndirectByteCountEXT-format-10389
  For each vertex attribute accessed by this command, if its VkVertexInputAttributeDescription::`format` or VkVertexInputAttributeDescription2EXT::`format` is a packed format, and the `legacyVertexAttributes` feature is not enabled, the value of `attribAddress`, calculated as described in Vertex Input Calculation, must be a multiple of the size of the `format`

- VUID-vkCmdDrawIndirectByteCountEXT-format-10390
  For each vertex attribute accessed by this command, if its VkVertexInputAttributeDescription::`format` or VkVertexInputAttributeDescription2EXT::`format` is not a packed format, and either the `legacyVertexAttributes` feature is not enabled or `format` has 64-bit components, the value of `attribAddress`, calculated as described in Vertex Input Calculation, must be a multiple of the component size of the `format`

- VUID-vkCmdDrawIndirectByteCountEXT-None-07842
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY dynamic state enabled then vkCmdSetPrimitiveTopology must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-dynamicPrimitiveTopologyUnrestricted-07500
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY dynamic state enabled and the `dynamicPrimitiveTopologyUnrestricted` is VK_FALSE, then the `primitiveTopology` parameter of `vkCmdSetPrimitiveTopology` must be of the same topology class as the pipeline VkPipelineInputAssemblyStateCreateInfo::`topology` state

- VUID-vkCmdDrawIndirectByteCountEXT-primitiveTopology-10286
  If a VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage is bound, then the current value of `primitiveTopology` must be VK_PRIMITIVE_TOPOLOGY_PATCH_LIST prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-primitiveTopology-10747
  If vkCmdSetPrimitiveTopology set `primitiveTopology` to VK_PRIMITIVE_TOPOLOGY_PATCH_LIST prior to this drawing command, then a VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage must be bound

- VUID-vkCmdDrawIndirectByteCountEXT-primitiveTopology-10748
  If vkCmdSetPrimitiveTopology set `primitiveTopology` to VK_PRIMITIVE_TOPOLOGY_POINT_LIST prior to this drawing command, the `maintenance5` feature is not enabled, both a VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT and VK_SHADER_STAGE_GEOMETRY_BIT stage are not bound, then the `Vertex` `Execution` `Model` must have a `PointSize` decorated variable that is statically written to

- VUID-vkCmdDrawIndirectByteCountEXT-pStrides-04913
  If the bound graphics pipeline was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE dynamic state enabled, but without the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled, then vkCmdBindVertexBuffers2 with a non-`NULL` `pStrides` parameter or vkCmdBindVertexBuffers3KHR with `setStride` set to VK_TRUE must have been called and not subsequently invalidated in the current command buffer prior to this draw command

- VUID-vkCmdDrawIndirectByteCountEXT-None-13118
  If the bound graphics pipeline was created without the VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE dynamic state enabled, without the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled, and vkCmdBindVertexBuffers3KHR was called and not subsequently invalidated in the current command buffer prior to this draw command, the value of `setStride` in each of its `pBindInfos` elements must have been VK_FALSE

- VUID-vkCmdDrawIndirectByteCountEXT-None-04914
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled then vkCmdSetVertexInputEXT must have been called and not subsequently invalidated in the current command buffer prior to this draw command

- VUID-vkCmdDrawIndirectByteCountEXT-Input-07939
  If the `vertexAttributeRobustness` feature is not enabled, and the `maintenance9` feature is not enabled, and there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled then all variables with the `Input` storage class decorated with `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` must contain a location in VkVertexInputAttributeDescription2EXT::`location`

- VUID-vkCmdDrawIndirectByteCountEXT-Input-08734
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled and either the `legacyVertexAttributes` feature is not enabled or the SPIR-V Type associated with a given `Input` variable of the corresponding `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` is 64-bit, then the numeric type associated with all `Input` variables of the corresponding `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` must be the same as VkVertexInputAttributeDescription2EXT::`format`

- VUID-vkCmdDrawIndirectByteCountEXT-format-08936
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled and VkVertexInputAttributeDescription2EXT::`format` has a 64-bit component, then the scalar width associated with all `Input` variables of the corresponding `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` must be 64-bit

- VUID-vkCmdDrawIndirectByteCountEXT-format-08937
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled and the scalar width associated with a `Location` decorated `Input` variable in the `Vertex` `Execution` `Model` `OpEntryPoint` is 64-bit, then the corresponding VkVertexInputAttributeDescription2EXT::`format` must have a 64-bit component

- VUID-vkCmdDrawIndirectByteCountEXT-None-09203
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled and VkVertexInputAttributeDescription2EXT::`format` has a 64-bit component, then all `Input` variables at the corresponding `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` must not use components that are not present in the format

- VUID-vkCmdDrawIndirectByteCountEXT-None-04875
  If there is a shader object bound to the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage or the bound graphics pipeline state was created with both a VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage and the VK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT dynamic state enabled, and the current value of `primitiveTopology` is VK_PRIMITIVE_TOPOLOGY_PATCH_LIST, then vkCmdSetPatchControlPointsEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-None-04879
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE dynamic state enabled then vkCmdSetPrimitiveRestartEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-None-09637
  If the `primitiveTopologyListRestart` feature is not enabled, the input assembly is VK_PRIMITIVE_TOPOLOGY_POINT_LIST, VK_PRIMITIVE_TOPOLOGY_LINE_LIST, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY, or VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY, there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE dynamic state enabled, then vkCmdSetPrimitiveRestartEnable must be VK_FALSE

- VUID-vkCmdDrawIndirectByteCountEXT-None-10909
  If the `primitiveTopologyPatchListRestart` feature is not enabled, the input assembly is VK_PRIMITIVE_TOPOLOGY_PATCH_LIST, there is a shader object bound to the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE dynamic state enabled then vkCmdSetPrimitiveRestartEnable must be VK_FALSE

- VUID-vkCmdDrawIndirectByteCountEXT-stage-06481
  The bound graphics pipeline must not have been created with the VkPipelineShaderStageCreateInfo::`stage` member of any element of VkGraphicsPipelineCreateInfo::`pStages` set to VK_SHADER_STAGE_TASK_BIT_EXT or VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-vkCmdDrawIndirectByteCountEXT-None-08885
  There must be no shader object bound to either of the VK_SHADER_STAGE_TASK_BIT_EXT or VK_SHADER_STAGE_MESH_BIT_EXT stages

- VUID-vkCmdDrawIndirectByteCountEXT-None-07619
  If a shader object is bound to the VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stage or a graphics pipeline is bound which was created with both a VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stage and the VK_DYNAMIC_STATE_TESSELLATION_DOMAIN_ORIGIN_EXT dynamic state enabled, then vkCmdSetTessellationDomainOriginEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawIndirectByteCountEXT-OpExecutionMode-12239
  If a shader is bound to both the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stages, and if both stages contain an `OpExecutionMode` instruction specifying the type of subdivision, they must be the same

- VUID-vkCmdDrawIndirectByteCountEXT-OpExecutionMode-12240
  If a shader is bound to both the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stages, and if both stages contain an `OpExecutionMode` instruction specifying the orientation of triangles, they must be the same

- VUID-vkCmdDrawIndirectByteCountEXT-OpExecutionMode-12241
  If a shader is bound to both the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stages, and if both stages contain an `OpExecutionMode` instruction specifying the segment spacing, they must be the same

- VUID-vkCmdDrawIndirectByteCountEXT-OpExecutionMode-12242
  If a shader is bound to both the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stages, and if both stages contain an `OpExecutionMode` instruction specifying the output patch size, they must be the same

- VUID-vkCmdDrawIndirectByteCountEXT-pNext-09461
  If the bound graphics pipeline state was created with VkPipelineVertexInputDivisorStateCreateInfo in the `pNext` chain of VkGraphicsPipelineCreateInfo::`pVertexInputState`, any member of VkPipelineVertexInputDivisorStateCreateInfo::`pVertexBindingDivisors` has a value other than `1` in `divisor`, and VkPhysicalDeviceVertexAttributeDivisorProperties::`supportsNonZeroFirstInstance` is VK_FALSE, then `firstInstance` must be `0`

- VUID-vkCmdDrawIndirectByteCountEXT-None-09462
  If shader objects are used for drawing or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled, any member of the `pVertexBindingDescriptions` parameter to the vkCmdSetVertexInputEXT call that sets this dynamic state has a value other than `1` in `divisor`, and VkPhysicalDeviceVertexAttributeDivisorProperties::`supportsNonZeroFirstInstance` is VK_FALSE, then `firstInstance` must be `0`

- VUID-vkCmdDrawIndirectByteCountEXT-counterOffset-09474
  `counterOffset` must be a multiple of `4`

- VUID-vkCmdDrawIndirectByteCountEXT-transformFeedback-02287
  `VkPhysicalDeviceTransformFeedbackFeaturesEXT`::`transformFeedback` must be enabled

- VUID-vkCmdDrawIndirectByteCountEXT-transformFeedbackDraw-02288
  The implementation must support `VkPhysicalDeviceTransformFeedbackPropertiesEXT`::`transformFeedbackDraw`

- VUID-vkCmdDrawIndirectByteCountEXT-vertexStride-02289
  `vertexStride` must be greater than 0 and less than or equal to `VkPhysicalDeviceTransformFeedbackPropertiesEXT`::`maxTransformFeedbackBufferDataStride`

- VUID-vkCmdDrawIndirectByteCountEXT-vertexStride-09475
  `vertexStride` must be a multiple of `4`

- VUID-vkCmdDrawIndirectByteCountEXT-commandBuffer-02646
  `commandBuffer` must not be a protected command buffer

- VUID-vkCmdDrawIndirectByteCountEXT-counterBuffer-04567
  If `counterBuffer` is non-sparse then it must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-vkCmdDrawIndirectByteCountEXT-counterBuffer-02290
  `counterBuffer` must have been created with the VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT usage flag set

- VUID-vkCmdDrawIndirectByteCountEXT-counterBufferOffset-04568
  `counterBufferOffset` must be a multiple of `4`

Valid Usage (Implicit)

- VUID-vkCmdDrawIndirectByteCountEXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdDrawIndirectByteCountEXT-counterBuffer-parameter
  `counterBuffer` must be a valid VkBuffer handle

- VUID-vkCmdDrawIndirectByteCountEXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdDrawIndirectByteCountEXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdDrawIndirectByteCountEXT-renderpass
  This command must only be called inside of a render pass instance

- VUID-vkCmdDrawIndirectByteCountEXT-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdDrawIndirectByteCountEXT-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdDrawIndirectByteCountEXT-commonparent
  Both of `commandBuffer`, and `counterBuffer` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Inside | Outside | VK_QUEUE_GRAPHICS_BIT | Action

Conditional Rendering

vkCmdDrawIndirectByteCountEXT is affected by conditional rendering

### 27.5. Conditional Rendering

Certain rendering commands can be executed conditionally based on a value in buffer memory. These rendering commands are limited to drawing commands, dispatching commands, and clearing attachments with vkCmdClearAttachments within a conditional rendering block which is defined by commands vkCmdBeginConditionalRenderingEXT and vkCmdEndConditionalRenderingEXT. Other rendering commands remain unaffected by conditional rendering.

The complete list of commands affected by conditional rendering is:

Commands Affected by Conditional Rendering

- vkCmdBeginCustomResolveEXT

- vkCmdClearAttachments

- vkCmdDispatch

- vkCmdDispatchBase

- vkCmdDispatchBaseKHR

- vkCmdDispatchDataGraphARM

- vkCmdDispatchGraphAMDX

- vkCmdDispatchGraphIndirectAMDX

- vkCmdDispatchGraphIndirectCountAMDX

- vkCmdDispatchIndirect

- vkCmdDispatchIndirect2KHR

- vkCmdDispatchTileQCOM

- vkCmdDraw

- vkCmdDrawClusterHUAWEI

- vkCmdDrawClusterIndirectHUAWEI

- vkCmdDrawIndexed

- vkCmdDrawIndexedIndirect

- vkCmdDrawIndexedIndirect2KHR

- vkCmdDrawIndexedIndirectCount

- vkCmdDrawIndexedIndirectCount2KHR

- vkCmdDrawIndexedIndirectCountAMD

- vkCmdDrawIndexedIndirectCountKHR

- vkCmdDrawIndirect

- vkCmdDrawIndirect2KHR

- vkCmdDrawIndirectByteCount2EXT

- vkCmdDrawIndirectByteCountEXT

- vkCmdDrawIndirectCount

- vkCmdDrawIndirectCount2KHR

- vkCmdDrawIndirectCountAMD

- vkCmdDrawIndirectCountKHR

- vkCmdDrawMeshTasksEXT

- vkCmdDrawMeshTasksIndirect2EXT

- vkCmdDrawMeshTasksIndirectCount2EXT

- vkCmdDrawMeshTasksIndirectCountEXT

- vkCmdDrawMeshTasksIndirectCountNV

- vkCmdDrawMeshTasksIndirectEXT

- vkCmdDrawMeshTasksIndirectNV

- vkCmdDrawMeshTasksNV

- vkCmdDrawMultiEXT

- vkCmdDrawMultiIndexedEXT

- vkCmdExecuteGeneratedCommandsEXT

- vkCmdExecuteGeneratedCommandsNV

After beginning conditional rendering, it is considered active within the command buffer it was called until it is ended with vkCmdEndConditionalRenderingEXT.

Conditional rendering must begin and end in the same command buffer. When conditional rendering is active, a primary command buffer can execute secondary command buffers if the `inheritedConditionalRendering` feature is enabled. For a secondary command buffer to be executed while conditional rendering is active in the primary command buffer, it must set the `conditionalRenderingEnable` flag of VkCommandBufferInheritanceConditionalRenderingInfoEXT, as described in the Command Buffer Recording section.

Conditional rendering must also either begin and end inside the same subpass of a render pass instance, or must both begin and end outside of a render pass instance (i.e. contain entire render pass instances).

To begin conditional rendering, call:

Warning | This functionality is superseded by vkCmdBeginConditionalRendering2EXT. See Legacy Functionality for more information.

    // Provided by VK_EXT_conditional_rendering
    void vkCmdBeginConditionalRenderingEXT(
        VkCommandBuffer                             commandBuffer,
        const VkConditionalRenderingBeginInfoEXT*   pConditionalRenderingBegin);

- `commandBuffer` is the command buffer into which this command will be recorded.

- `pConditionalRenderingBegin` is a pointer to a VkConditionalRenderingBeginInfoEXT structure specifying parameters of conditional rendering.

Valid Usage

- VUID-vkCmdBeginConditionalRenderingEXT-None-01980
  Conditional rendering must not already be active

Valid Usage (Implicit)

- VUID-vkCmdBeginConditionalRenderingEXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdBeginConditionalRenderingEXT-pConditionalRenderingBegin-parameter
  `pConditionalRenderingBegin` must be a valid pointer to a valid VkConditionalRenderingBeginInfoEXT structure

- VUID-vkCmdBeginConditionalRenderingEXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdBeginConditionalRenderingEXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, or VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdBeginConditionalRenderingEXT-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdBeginConditionalRenderingEXT-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT | Action State

Conditional Rendering

vkCmdBeginConditionalRenderingEXT is not affected by conditional rendering

The `VkConditionalRenderingBeginInfoEXT` structure is defined as:

Warning | This functionality is superseded by VkConditionalRenderingBeginInfo2EXT. See Legacy Functionality for more information.

    // Provided by VK_EXT_conditional_rendering
    typedef struct VkConditionalRenderingBeginInfoEXT {
        VkStructureType                   sType;
        const void*                       pNext;
        VkBuffer                          buffer;
        VkDeviceSize                      offset;
        VkConditionalRenderingFlagsEXT    flags;
    } VkConditionalRenderingBeginInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `buffer` is a buffer containing the predicate for conditional rendering.

- `offset` is the byte offset into `buffer` where the predicate is located.

- `flags` is a bitmask of VkConditionalRenderingFlagsEXT specifying the behavior of conditional rendering.

If the 32-bit value at `offset` in `buffer` memory is zero, then the rendering commands are discarded, otherwise they are executed as normal. If the value of the predicate in buffer memory changes while conditional rendering is active, the rendering commands may be discarded in an implementation-dependent way. Some implementations may latch the value of the predicate upon beginning conditional rendering while others may read it before every rendering command.

Valid Usage

- VUID-VkConditionalRenderingBeginInfoEXT-buffer-01981
  If `buffer` is non-sparse then it must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-VkConditionalRenderingBeginInfoEXT-buffer-01982
  `buffer` must have been created with the VK_BUFFER_USAGE_CONDITIONAL_RENDERING_BIT_EXT usage flag set

- VUID-VkConditionalRenderingBeginInfoEXT-offset-01983
  `offset` must be less than the size of `buffer` by at least 32 bits

- VUID-VkConditionalRenderingBeginInfoEXT-offset-01984
  `offset` must be a multiple of 4

Valid Usage (Implicit)

- VUID-VkConditionalRenderingBeginInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_CONDITIONAL_RENDERING_BEGIN_INFO_EXT

- VUID-VkConditionalRenderingBeginInfoEXT-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkConditionalRenderingBeginInfoEXT-buffer-parameter
  `buffer` must be a valid VkBuffer handle

- VUID-VkConditionalRenderingBeginInfoEXT-flags-parameter
  `flags` must be a valid combination of VkConditionalRenderingFlagBitsEXT values

To begin conditional rendering, call:

    // Provided by VK_KHR_device_address_commands with VK_EXT_conditional_rendering
    void vkCmdBeginConditionalRendering2EXT(
        VkCommandBuffer                             commandBuffer,
        const VkConditionalRenderingBeginInfo2EXT*  pConditionalRenderingBegin);

- `commandBuffer` is the command buffer into which this command will be recorded.

- `pConditionalRenderingBegin` is a pointer to a VkConditionalRenderingBeginInfo2EXT structure specifying parameters of conditional rendering.

Valid Usage

- VUID-vkCmdBeginConditionalRendering2EXT-None-13063
  Conditional rendering must not already be active

Valid Usage (Implicit)

- VUID-vkCmdBeginConditionalRendering2EXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdBeginConditionalRendering2EXT-pConditionalRenderingBegin-parameter
  `pConditionalRenderingBegin` must be a valid pointer to a valid VkConditionalRenderingBeginInfo2EXT structure

- VUID-vkCmdBeginConditionalRendering2EXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdBeginConditionalRendering2EXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, or VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdBeginConditionalRendering2EXT-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdBeginConditionalRendering2EXT-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT | Action State

Conditional Rendering

vkCmdBeginConditionalRendering2EXT is not affected by conditional rendering

The `VkConditionalRenderingBeginInfo2EXT` structure is defined as:

    // Provided by VK_KHR_device_address_commands with VK_EXT_conditional_rendering
    typedef struct VkConditionalRenderingBeginInfo2EXT {
        VkStructureType                   sType;
        const void*                       pNext;
        VkDeviceAddressRangeKHR           addressRange;
        VkAddressCommandFlagsKHR          addressFlags;
        VkConditionalRenderingFlagsEXT    flags;
    } VkConditionalRenderingBeginInfo2EXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `addressRange` is the VkDeviceAddressRangeKHR containing the predicate for conditional rendering.

- `addressFlags` is a VkAddressCommandFlagsKHR value defining the flags for the address range.

- `flags` is a bitmask of VkConditionalRenderingFlagsEXT specifying the behavior of conditional rendering.

If the 32-bit value at `addressRange.address` is zero, then the rendering commands are discarded, otherwise they are executed as normal. If the value of the predicate in memory changes while conditional rendering is active, the rendering commands may be discarded in an implementation-dependent way. Some implementations may latch the value of the predicate upon beginning conditional rendering while others may read it before every rendering command.

Valid Usage

- VUID-VkConditionalRenderingBeginInfo2EXT-addressRange-13097
  If the range specified by `addressRange` is not bound completely to memory when accessed, `addressFlags` must not include VK_ADDRESS_COMMAND_FULLY_BOUND_BIT_KHR

- VUID-VkConditionalRenderingBeginInfo2EXT-addressRange-13098
  If the buffer from which the range specified by `addressRange` was created with VK_BUFFER_CREATE_PROTECTED_BIT, and `protectedNoFault` is not supported, `addressFlags` must include VK_ADDRESS_COMMAND_PROTECTED_BIT_KHR

- VUID-VkConditionalRenderingBeginInfo2EXT-addressRange-13099
  If the buffer from which the range specified by `addressRange` was created without VK_BUFFER_CREATE_PROTECTED_BIT, and `protectedNoFault` is not supported, `addressFlags` must not include VK_ADDRESS_COMMAND_PROTECTED_BIT_KHR

- VUID-VkConditionalRenderingBeginInfo2EXT-addressFlags-13100
  `addressFlags` must not include both VK_ADDRESS_COMMAND_STORAGE_BUFFER_USAGE_BIT_KHR and VK_ADDRESS_COMMAND_UNKNOWN_STORAGE_BUFFER_USAGE_BIT_KHR

- VUID-VkConditionalRenderingBeginInfo2EXT-addressRange-13122
  If any buffer, which is bound to a range of VkDeviceMemory that overlaps the range backing `addressRange`, was created with VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, `addressFlags` must include VK_ADDRESS_COMMAND_STORAGE_BUFFER_USAGE_BIT_KHR or VK_ADDRESS_COMMAND_UNKNOWN_STORAGE_BUFFER_USAGE_BIT_KHR

- VUID-VkConditionalRenderingBeginInfo2EXT-addressRange-13123
  If any buffer, which is bound to a range of VkDeviceMemory that overlaps the range backing `addressRange`, was created without VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, `addressFlags` must not include VK_ADDRESS_COMMAND_STORAGE_BUFFER_USAGE_BIT_KHR

- VUID-VkConditionalRenderingBeginInfo2EXT-addressFlags-13101
  `addressFlags` must not include both VK_ADDRESS_COMMAND_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR and VK_ADDRESS_COMMAND_UNKNOWN_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR

- VUID-VkConditionalRenderingBeginInfo2EXT-addressRange-13124
  If any buffer, which is bound to a range of VkDeviceMemory that overlaps the range backing `addressRange`, was created with VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT, `addressFlags` must include VK_ADDRESS_COMMAND_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR or VK_ADDRESS_COMMAND_UNKNOWN_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR

- VUID-VkConditionalRenderingBeginInfo2EXT-addressRange-13125
  If any buffer, which is bound to a range of VkDeviceMemory that overlaps the range backing `addressRange`, was created without VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT, `addressFlags` must not include VK_ADDRESS_COMMAND_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR

- VUID-VkConditionalRenderingBeginInfo2EXT-addressRange-13064
  The VkBuffer that `addressRange` was queried from must have been created with VK_BUFFER_USAGE_CONDITIONAL_RENDERING_BIT_EXT

- VUID-VkConditionalRenderingBeginInfo2EXT-addressRange-13065
  `addressRange.address` must be a multiple of 4

- VUID-VkConditionalRenderingBeginInfo2EXT-addressRange-13066
  `addressRange.size` must be greater than or equal to 4

Valid Usage (Implicit)

- VUID-VkConditionalRenderingBeginInfo2EXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_CONDITIONAL_RENDERING_BEGIN_INFO_2_EXT

- VUID-VkConditionalRenderingBeginInfo2EXT-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkConditionalRenderingBeginInfo2EXT-addressFlags-parameter
  `addressFlags` must be a valid combination of VkAddressCommandFlagBitsKHR values

- VUID-VkConditionalRenderingBeginInfo2EXT-flags-parameter
  `flags` must be a valid combination of VkConditionalRenderingFlagBitsEXT values

Bits which can be set in vkCmdBeginConditionalRenderingEXT::`flags`, specifying the behavior of conditional rendering, are:

    // Provided by VK_EXT_conditional_rendering
    typedef enum VkConditionalRenderingFlagBitsEXT {
        VK_CONDITIONAL_RENDERING_INVERTED_BIT_EXT = 0x00000001,
    } VkConditionalRenderingFlagBitsEXT;

- VK_CONDITIONAL_RENDERING_INVERTED_BIT_EXT specifies the condition used to determine whether to discard rendering commands or not. That is, if the 32-bit predicate read from `buffer` memory at `offset` is zero, the rendering commands are not discarded, and if non zero, then they are discarded.

    // Provided by VK_EXT_conditional_rendering
    typedef VkFlags VkConditionalRenderingFlagsEXT;

`VkConditionalRenderingFlagsEXT` is a bitmask type for setting a mask of zero or more VkConditionalRenderingFlagBitsEXT.

To end conditional rendering, call:

    // Provided by VK_EXT_conditional_rendering
    void vkCmdEndConditionalRenderingEXT(
        VkCommandBuffer                             commandBuffer);

- `commandBuffer` is the command buffer into which this command will be recorded.

Once ended, conditional rendering becomes inactive.

Valid Usage

- VUID-vkCmdEndConditionalRenderingEXT-None-01985
  Conditional rendering must be active

- VUID-vkCmdEndConditionalRenderingEXT-None-01986
  If conditional rendering was made active outside of a render pass instance, it must not be ended inside a render pass instance

- VUID-vkCmdEndConditionalRenderingEXT-None-01987
  If conditional rendering was made active within a subpass it must be ended in the same subpass

Valid Usage (Implicit)

- VUID-vkCmdEndConditionalRenderingEXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdEndConditionalRenderingEXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdEndConditionalRenderingEXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, or VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdEndConditionalRenderingEXT-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdEndConditionalRenderingEXT-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT | Action State

Conditional Rendering

vkCmdEndConditionalRenderingEXT is not affected by conditional rendering

### 27.6. Programmable Mesh Shading

In this drawing approach, primitives are assembled by the mesh shader stage. Mesh shading operates similarly to dispatching compute as the shaders make use of workgroups.

To record a mesh tasks drawing command, call:

    // Provided by VK_NV_mesh_shader
    void vkCmdDrawMeshTasksNV(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    taskCount,
        uint32_t                                    firstTask);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `taskCount` is the number of local workgroups to dispatch in the X dimension. Y and Z dimension are implicitly set to one.

- `firstTask` is the X component of the first workgroup ID.

When the command is executed, a global workgroup consisting of `taskCount` local workgroups is assembled.

Valid Usage

- VUID-vkCmdDrawMeshTasksNV-magFilter-04553
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdDrawMeshTasksNV-magFilter-09598
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdDrawMeshTasksNV-mipmapMode-04770
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdDrawMeshTasksNV-mipmapMode-09599
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdDrawMeshTasksNV-unnormalizedCoordinates-09635
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `levelCount` and `layerCount` must be 1

- VUID-vkCmdDrawMeshTasksNV-None-08609
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `viewType` must be VK_IMAGE_VIEW_TYPE_1D or VK_IMAGE_VIEW_TYPE_2D

- VUID-vkCmdDrawMeshTasksNV-None-08610
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions with `ImplicitLod`, `Dref` or `Proj` in their name

- VUID-vkCmdDrawMeshTasksNV-None-08611
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions that includes a LOD bias or any offset values

- VUID-vkCmdDrawMeshTasksNV-None-06479
  If a VkImageView is sampled with depth comparison, the image view’s format features must contain VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT

- VUID-vkCmdDrawMeshTasksNV-None-02691
  If a VkImageView is accessed using atomic operations as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT

- VUID-vkCmdDrawMeshTasksNV-None-07888
  If a VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER descriptor is accessed using atomic operations as a result of this command, then the storage texel buffer’s format features must contain VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT

- VUID-vkCmdDrawMeshTasksNV-None-02692
  If a VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT

- VUID-vkCmdDrawMeshTasksNV-None-02693
  If the VK_EXT_filter_cubic extension is not enabled and any VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, it must not have a VkImageViewType of VK_IMAGE_VIEW_TYPE_3D, VK_IMAGE_VIEW_TYPE_CUBE, or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY

- VUID-vkCmdDrawMeshTasksNV-filterCubic-02694
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have a VkImageViewType and format that supports cubic filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubic` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdDrawMeshTasksNV-filterCubicMinmax-02695
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX as a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubicMinmax` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdDrawMeshTasksNV-cubicRangeClamp-09212
  If the `cubicRangeClamp` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must not have a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM

- VUID-vkCmdDrawMeshTasksNV-reductionMode-09213
  Any VkImageView being sampled with a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM as a result of this command must sample with VK_FILTER_CUBIC_EXT

- VUID-vkCmdDrawMeshTasksNV-selectableCubicWeights-09214
  If the `selectableCubicWeights` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have VkSamplerCubicWeightsCreateInfoQCOM::`cubicWeights` equal to VK_CUBIC_FILTER_WEIGHTS_CATMULL_ROM_QCOM

- VUID-vkCmdDrawMeshTasksNV-flags-02696
  Any VkImage created with a VkImageCreateInfo::`flags` containing VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV sampled as a result of this command must only be sampled using a VkSamplerAddressMode of VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawMeshTasksNV-OpTypeImage-07027
  For any VkImageView being written as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawMeshTasksNV-OpTypeImage-07028
  For any VkImageView being read as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawMeshTasksNV-OpTypeImage-07029
  For any VkBufferView being written as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown`, the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawMeshTasksNV-OpTypeImage-07030
  Any VkBufferView being read as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown` then the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawMeshTasksNV-None-08600
  If a a bound shader was created with a pipeline layout and statically uses a set n, a descriptor set must have been bound to n at the same pipeline bind point, with layouts compatible for set n with the layout(s) used to create the shader, as described in Pipeline Layout Compatibility

- VUID-vkCmdDrawMeshTasksNV-None-08601
  If a a bound shader was created with a pipeline layout or specified push constant ranges and statically uses a push constant value, that value must have been set for the same pipeline bind point, with push constant ranges that are compatible with the push constant range used to create the shader

- VUID-vkCmdDrawMeshTasksNV-None-10068
  For each array of resources that is used by a bound shader, the indices used to access members of the array must be less than the descriptor count for the identified binding in the descriptor sets used by this command

- VUID-vkCmdDrawMeshTasksNV-None-08114
  Descriptors in each bound descriptor set, specified via vkCmdBindDescriptorSets, must be valid if they are accessed as described by descriptor validity by the VkPipeline bound to the pipeline bind point used by this command and the bound VkPipeline was not created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawMeshTasksNV-imageLayout-00344
  If an image descriptor is accessed by a shader, the VkImageLayout must match the subresource accessible from the VkImageView as defined by the image layout matching rules

- VUID-vkCmdDrawMeshTasksNV-None-08115
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdBindDescriptorSets, the bound VkPipeline must have been created without VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawMeshTasksNV-None-08116
  Descriptors in bound descriptor buffers, specified via vkCmdSetDescriptorBufferOffsetsEXT, must be valid if they are dynamically accessed

- VUID-vkCmdDrawMeshTasksNV-None-08117
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdSetDescriptorBufferOffsetsEXT, the bound VkPipeline must have been created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawMeshTasksNV-None-08119
  If a descriptor is dynamically used with a VkPipeline created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdDrawMeshTasksNV-None-08605
  If a descriptor is dynamically used with a VkShaderEXT created with a `VkDescriptorSetLayout` that was created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdDrawMeshTasksNV-None-08606
  If the `shaderObject` feature is not enabled, a valid pipeline must be bound to the pipeline bind point used by this command

- VUID-vkCmdDrawMeshTasksNV-None-08608
  If a pipeline is bound to the pipeline bind point used by this command, there must not have been any calls to dynamic state setting commands for any state specified statically in the VkPipeline object bound to the pipeline bind point used by this command, since that pipeline was bound

- VUID-vkCmdDrawMeshTasksNV-uniformBuffers-06935
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawMeshTasksNV-None-08612
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawMeshTasksNV-storageBuffers-06936
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawMeshTasksNV-None-08613
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a storage buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawMeshTasksNV-commandBuffer-02707
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, any resource accessed by bound shaders must not be a protected resource

- VUID-vkCmdDrawMeshTasksNV-viewType-07752
  If a VkImageView is accessed as a result of this command, then the image view’s `viewType` must match the `Dim` operand of the `OpTypeImage` as described in Compatibility Between SPIR-V Image Dimensions and Vulkan ImageView Types

- VUID-vkCmdDrawMeshTasksNV-format-07753
  If a VkImageView or VkBufferView is accessed as a result of this command, then the numeric type of the view’s `format` and the `Sampled` `Type` operand of the `OpTypeImage` must match

- VUID-vkCmdDrawMeshTasksNV-OpImageWrite-08795
  If a VkImageView created with a format other than VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the image view’s format

- VUID-vkCmdDrawMeshTasksNV-OpImageWrite-08796
  If a VkImageView created with the format VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have four components

- VUID-vkCmdDrawMeshTasksNV-OpImageWrite-04469
  If a VkBufferView is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the buffer view’s format

- VUID-vkCmdDrawMeshTasksNV-SampledType-04470
  If a VkImageView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdDrawMeshTasksNV-SampledType-04471
  If a VkImageView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdDrawMeshTasksNV-SampledType-04472
  If a VkBufferView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdDrawMeshTasksNV-SampledType-04473
  If a VkBufferView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdDrawMeshTasksNV-sparseImageInt64Atomics-04474
  If the `sparseImageInt64Atomics` feature is not enabled, VkImage objects created with the VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdDrawMeshTasksNV-sparseImageInt64Atomics-04475
  If the `sparseImageInt64Atomics` feature is not enabled, VkBuffer objects created with the VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdDrawMeshTasksNV-OpImageSampleWeightedQCOM-06971
  If `OpImageSampleWeightedQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_SAMPLED_IMAGE_BIT_QCOM

- VUID-vkCmdDrawMeshTasksNV-OpImageSampleWeightedQCOM-06972
  If `OpImageSampleWeightedQCOM` uses a VkImageView as a sample weight image as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_IMAGE_BIT_QCOM

- VUID-vkCmdDrawMeshTasksNV-OpImageBoxFilterQCOM-06973
  If `OpImageBoxFilterQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BOX_FILTER_SAMPLED_BIT_QCOM

- VUID-vkCmdDrawMeshTasksNV-OpImageBlockMatchSSDQCOM-06974
  If `OpImageBlockMatchSSDQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdDrawMeshTasksNV-OpImageBlockMatchSADQCOM-12420
  If `OpImageBlockMatchSADQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdDrawMeshTasksNV-OpImageBlockMatchSADQCOM-06976
  If `OpImageBlockMatchSADQCOM` or OpImageBlockMatchSSDQCOM is used to read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdDrawMeshTasksNV-OpImageSampleWeightedQCOM-06977
  If `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdDrawMeshTasksNV-OpImageSampleWeightedQCOM-06978
  If any command other than `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must not have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdDrawMeshTasksNV-OpImageBlockMatchWindow-09215
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM

- VUID-vkCmdDrawMeshTasksNV-OpImageBlockMatchWindow-09216
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format must be a single-component format

- VUID-vkCmdDrawMeshTasksNV-OpImageBlockMatchWindow-09217
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdDrawMeshTasksNV-OpImageBlockMatchWindow-12421
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the `blockMatchExtendedClampToEdge` feature is not enabled, the input sampler must not have been created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawMeshTasksNV-addressModeU-12422
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the input sampler was created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, then the sampler must have been created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawMeshTasksNV-None-07288
  Any shader invocation executed by this command must terminate

- VUID-vkCmdDrawMeshTasksNV-None-09600
  If a descriptor with type equal to any of VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, or VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT is accessed as a result of this command, all image subresources identified by that descriptor must be in the image layout identified when the descriptor was written

- VUID-vkCmdDrawMeshTasksNV-micromap-11636
  If an acceleration structure is accessed as a result of this command through an `OpRayQueryProceedKHR` operation , the `VK_EXT_opacity_micromap` extension is not enabled, and the acceleration structure is built using geometry with a VkAccelerationStructureTrianglesOpacityMicromapKHR structure included in its `pNext` chain, the shader must have specified a `OpacityMicromapIdKHR` execution mode with its specialization constant operand equal to VK_TRUE

- VUID-vkCmdDrawMeshTasksNV-micromap-11637
  If an acceleration structure is accessed as a result of this command and the acceleration structure was constructed through deserialization, all micromap arrays referenced by the acceleration structure that were not replaced by an acceleration structure update command must have been deserialized using the serialized data of the corresponding micromaps used to originally build the acceleration structure prior to the execution of this command on the device

- VUID-vkCmdDrawMeshTasksNV-micromap-11638
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkPipeline bound to the pipeline bind point used by this command must not have been created with `flags` that includes VK_PIPELINE_CREATE_2_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_KHR

- VUID-vkCmdDrawMeshTasksNV-micromap-11639
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkShaderEXT that accessed the descriptor must not have been created with `flags` that includes VK_SHADER_CREATE_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_EXT

- VUID-vkCmdDrawMeshTasksNV-commandBuffer-10746
  The `VkDeviceMemory` object allocated from a `VkMemoryHeap` with the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property that is bound to a resource accessed as a result of this command must be the active bound tile memory object in `commandBuffer`

- VUID-vkCmdDrawMeshTasksNV-None-10678
  If this command is recorded inside a tile shading render pass instance, the stages corresponding to the pipeline bind point used by this command must only include VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_FRAGMENT_BIT, and/or VK_SHADER_STAGE_COMPUTE_BIT

- VUID-vkCmdDrawMeshTasksNV-None-10679
  If this command is recorded where per-tile execution model is enabled, there must be no access to any image while the image was be transitioned to the VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT layout

- VUID-vkCmdDrawMeshTasksNV-pDescription-09900
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the underlying VkTensorARM object must have been created with the VK_TENSOR_USAGE_SHADER_BIT_ARM usage flag set

- VUID-vkCmdDrawMeshTasksNV-dimensionCount-09905
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the `Rank` of the `OpTypeTensorARM` of the tensor resource variable must be equal to the `dimensionCount` provided via VkTensorCreateInfoARM::`pDescription` when creating the underlying VkTensorARM object

- VUID-vkCmdDrawMeshTasksNV-OpTypeTensorARM-09906
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the element type of the `OpTypeTensorARM` of the tensor resource variable must be compatible with the VkFormat of the VkTensorViewARM used for the access

- VUID-vkCmdDrawMeshTasksNV-OpTensorReadARM-12462
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, using `OpTensorReadARM` or `OpTensorWriteARM`, and the underlying VkTensorARM object was created with a VK_TENSOR_TILING_BRICK_16_WIDE_ARM, VK_TENSOR_TILING_BRICK_8_WIDE_ARM, VK_TENSOR_TILING_BRICK_4_WIDE_ARM, VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_ARM, or VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_64K_ARM VkTensorTilingARM, and the object read or written is an array, then the innermost coordinate provided to `OpTensorReadARM` or `OpTensorWriteARM` via the `Coordinates` operand must be a multiple of the largest power of 2 that is less than or equal to the number of components of the array

- VUID-vkCmdDrawMeshTasksNV-pNext-12463
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command and the corresponding VkTensorARM object was created with a VkTensorRollingBackingCreateInfoARM structure in the `pNext` chain of VkTensorCreateInfoARM, then the number of elements accessed with one `OpTensorReadARM` or `OpTensorWriteARM`, must be less than or equal to the number of elements available from the starting coordinate in the rolling backing along the innermost dimension, defined as `wraps`[`dimensionCount` - 1] - InnermostCoordinate % `wraps`[`dimensionCount` - 1] where InnermostCoordinate is the last component of the coordinates array provided via the `Coordinates` operand

- VUID-vkCmdDrawMeshTasksNV-None-12472
  Descriptors dynamically accessed in bound descriptor heaps must be valid

- VUID-vkCmdDrawMeshTasksNV-None-11297
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a `OpTypeStruct` decorated with `Block` or `BufferBlock` using that mapping, the calculated offset for the resource heap must be a multiple of `bufferDescriptorAlignment`

- VUID-vkCmdDrawMeshTasksNV-None-11298
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeImage` or `OpTypeSampledImage` using that mapping, the calculated offset for the resource heap must be a multiple of `imageDescriptorAlignment`

- VUID-vkCmdDrawMeshTasksNV-None-11299
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeSampler` or `OpTypeSampledImage` using that mapping, the calculated offset for the sampler heap must be a multiple of `samplerDescriptorAlignment`

- VUID-vkCmdDrawMeshTasksNV-None-11397
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeTensorARM` using that mapping, the calculated offset for the resource heap must be a multiple of `tensorDescriptorAlignment`

- VUID-vkCmdDrawMeshTasksNV-None-11300
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 4

- VUID-vkCmdDrawMeshTasksNV-None-11301
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdDrawMeshTasksNV-None-11302
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress

- VUID-vkCmdDrawMeshTasksNV-None-11304
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 8

- VUID-vkCmdDrawMeshTasksNV-None-11305
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdDrawMeshTasksNV-None-11306
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address pointed to by the address in push data must be a valid VkDeviceAddress

- VUID-vkCmdDrawMeshTasksNV-None-11308
  For each descriptor heap that is statically used by a bound shader, either directly or via a descriptor mapping, a valid descriptor heap must be bound

- VUID-vkCmdDrawMeshTasksNV-None-11309
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, execution of this command must not result in any descriptor read accessing data outside of the user range of the respective heap bound by `vkCmdBind*HeapEXT` commands

- VUID-vkCmdDrawMeshTasksNV-None-11372
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer or uniform texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified via VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawMeshTasksNV-None-11373
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer or storage texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawMeshTasksNV-None-11374
  If the `robustBufferAccess2` feature is not enabled, the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, uniform texel buffer, storage buffer, or storage texel buffer, that shader must not access values outside of the range of the buffer as specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawMeshTasksNV-pBindInfo-11375
  If any bound shader uses an embedded sampler via a descriptor mapping, the value of `pBindInfo->reservedRangeSize` set for vkCmdBindSamplerHeapEXT must be greater than or equal to `minSamplerHeapReservedRangeWithEmbedded`

- VUID-vkCmdDrawMeshTasksNV-None-11376
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, and that shader statically uses a push constant value, that value must have been set by vkCmdPushDataEXT

- VUID-vkCmdDrawMeshTasksNV-None-11398
  If a bound shader was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the access must not be out of bounds

- VUID-vkCmdDrawMeshTasksNV-None-11437
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the buffer from which the address in push data was queried must have been created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdDrawMeshTasksNV-None-11438
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdDrawMeshTasksNV-None-11441
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must be aligned to `minUniformBufferOffsetAlignment`

- VUID-vkCmdDrawMeshTasksNV-None-11439
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_STORAGE_BUFFER_BIT usage flag set

- VUID-vkCmdDrawMeshTasksNV-None-11442
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must be aligned to `minStorageBufferOffsetAlignment`

- VUID-vkCmdDrawMeshTasksNV-None-11485
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses an acceleration structure using that mapping, the address that the acceleration structure is mapped to must be an acceleration structure address retrieved from a VkAccelerationStructureKHR object via vkGetAccelerationStructureDeviceAddressKHR or handle retrieved from a VkAccelerationStructureNV object via vkGetAccelerationStructureHandleNV

- VUID-vkCmdDrawMeshTasksNV-index-11450
  If a shader uses a sampler descriptor to sample an image as a result of this command, and that sampler descriptor uses a custom border color with an index defined by VkSamplerCustomBorderColorIndexCreateInfoEXT, the value of VkSamplerCustomBorderColorIndexCreateInfoEXT::`index` must have been registered before this command was recorded, and still be registered during the sampling operation, with an identically defined color

- VUID-vkCmdDrawMeshTasksNV-protectedNoFault-11455
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, the address that the resource is mapped to must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdDrawMeshTasksNV-protectedNoFault-11456
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, the address of the indirect memory must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdDrawMeshTasksNV-renderPass-02684
  The current render pass must be compatible with the `renderPass` member of the `VkGraphicsPipelineCreateInfo` structure specified when creating the `VkPipeline` bound to VK_PIPELINE_BIND_POINT_GRAPHICS

- VUID-vkCmdDrawMeshTasksNV-subpass-02685
  The subpass index of the current render pass must be equal to the `subpass` member of the `VkGraphicsPipelineCreateInfo` structure specified when creating the `VkPipeline` bound to VK_PIPELINE_BIND_POINT_GRAPHICS

- VUID-vkCmdDrawMeshTasksNV-OpTypeImage-07468
  If any shader executed by this pipeline accesses an `OpTypeImage` variable with a `Dim` operand of `SubpassData`, it must be decorated with an `InputAttachmentIndex` that corresponds to a valid input attachment in the current subpass

- VUID-vkCmdDrawMeshTasksNV-None-07469
  Input attachment views accessed in a subpass must be created with the same VkFormat as the corresponding subpass definition, and be created with a VkImageView that is compatible with the attachment referenced by the subpass' `pInputAttachments`[`InputAttachmentIndex`] in the bound VkFramebuffer as specified by Fragment Input Attachment Compatibility

- VUID-vkCmdDrawMeshTasksNV-pDepthInputAttachmentIndex-09595
  Input attachment views accessed in a dynamic render pass with a `InputAttachmentIndex` referenced by VkRenderingInputAttachmentIndexInfo, or no `InputAttachmentIndex` if VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` or VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` are `NULL`, must be created with a VkImageView that is compatible with the corresponding color, depth, or stencil attachment in VkRenderingInfo

- VUID-vkCmdDrawMeshTasksNV-pDepthInputAttachmentIndex-09596
  Input attachment views accessed in a dynamic render pass via a shader object must have an `InputAttachmentIndex` if both VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` and VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` are non-`NULL`

- VUID-vkCmdDrawMeshTasksNV-InputAttachmentIndex-09597
  If an input attachment view accessed in a dynamic render pass via a shader object has an `InputAttachmentIndex`, the `InputAttachmentIndex` must match an index in VkRenderingInputAttachmentIndexInfo

- VUID-vkCmdDrawMeshTasksNV-None-06537
  Memory backing image subresources used as attachments in the current render pass must not be written in any way other than as an attachment by this command

- VUID-vkCmdDrawMeshTasksNV-None-10795
  If a color attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_COLOR_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawMeshTasksNV-None-10796
  If a depth attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_DEPTH_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawMeshTasksNV-None-10797
  If a stencil attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_STENCIL_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawMeshTasksNV-None-12338
  If a color attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_COLOR_BIT on that attachment, the color attachment must not be written to by this command

- VUID-vkCmdDrawMeshTasksNV-None-12339
  If a depth attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_DEPTH_BIT on that attachment, the depth attachment must not be written to by this command

- VUID-vkCmdDrawMeshTasksNV-None-12340
  If a stencil attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_STENCIL_BIT on that attachment, the stencil attachment must not be written to by this command

- VUID-vkCmdDrawMeshTasksNV-None-09003
  If an attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, it must not be accessed in any way other than as an attachment, storage image, or sampled image by this command

- VUID-vkCmdDrawMeshTasksNV-None-06886
  If the current render pass instance uses a depth/stencil attachment with a read-only layout for the depth aspect, depth writes must be disabled

- VUID-vkCmdDrawMeshTasksNV-None-06887
  If the current render pass instance uses a depth/stencil attachment with a read-only layout for the stencil aspect, both front and back `writeMask` are not zero, and stencil test is enabled, all stencil ops must be VK_STENCIL_OP_KEEP

- VUID-vkCmdDrawMeshTasksNV-None-07831
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT dynamic state enabled then vkCmdSetViewport must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksNV-None-07832
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SCISSOR dynamic state enabled then vkCmdSetScissor must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksNV-None-08617
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_WIDTH dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineWidth must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksNV-None-07834
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BIAS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthBiasEnable` is VK_TRUE, then vkCmdSetDepthBias or vkCmdSetDepthBias2EXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksNV-None-07835
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_BLEND_CONSTANTS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and an active color attachment current value of `blendEnable` is VK_TRUE with a blend equations where any VkBlendFactor member is VK_BLEND_FACTOR_CONSTANT_COLOR, VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR, VK_BLEND_FACTOR_CONSTANT_ALPHA, or VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA, then vkCmdSetBlendConstants must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksNV-None-07836
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BOUNDS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthBoundsTestEnable` is VK_TRUE, then vkCmdSetDepthBounds must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksNV-None-07837
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilCompareMask must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksNV-None-07838
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_WRITE_MASK dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilWriteMask must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksNV-None-07839
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_REFERENCE dynamic state enabled, the current value of and `rasterizerDiscardEnable` is VK_FALSE, the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilReference must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksNV-maxMultiviewInstanceIndex-02688
  If the draw is recorded in a render pass instance with multiview enabled, the maximum instance index must be less than or equal to VkPhysicalDeviceMultiviewProperties::`maxMultiviewInstanceIndex`

- VUID-vkCmdDrawMeshTasksNV-sampleLocationsEnable-02689
  If the bound graphics pipeline was created with VkPipelineSampleLocationsStateCreateInfoEXT::`sampleLocationsEnable` set to VK_TRUE, then the active depth attachment must have been created with the VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit set

- VUID-vkCmdDrawMeshTasksNV-None-07634
  If the `VK_EXT_sample_locations` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetSampleLocationsEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksNV-None-06666
  If the `VK_EXT_sample_locations` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `sampleLocationsEnable` is VK_TRUE, then vkCmdSetSampleLocationsEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksNV-None-07840
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_CULL_MODE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCullMode must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksNV-None-07841
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRONT_FACE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetFrontFace must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksNV-None-07843
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, vkCmdSetDepthTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksNV-None-07844
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthTestEnable` is VK_TRUE, then vkCmdSetDepthWriteEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksNV-None-07845
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_COMPARE_OP dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthTestEnable` is VK_TRUE, then vkCmdSetDepthCompareOp must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksNV-None-07846
  If the `depthBounds` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthBoundsTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksNV-None-07847
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetStencilTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksNV-None-07848
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_OP dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilOp must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksNV-viewportCount-03417
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, and the state is not inherited, then vkCmdSetViewportWithCount must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksNV-scissorCount-03418
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT dynamic state enabled, and the state is not inherited, then vkCmdSetScissorWithCount must have been called and not subsequently invalidated in the current command buffer prior to this drawing

- VUID-vkCmdDrawMeshTasksNV-viewportCount-03419
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with both the VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic states enabled, and the state is not inherited, then the `viewportCount` parameter of `vkCmdSetViewportWithCount` must match the `scissorCount` parameter of `vkCmdSetScissorWithCount`

- VUID-vkCmdDrawMeshTasksNV-viewportCount-04137
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportWScalingStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksNV-viewportCount-04138
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, the current value of `viewportWScalingEnable` is VK_TRUE, then vkCmdSetViewportWScalingNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksNV-None-08636
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, the current value of `viewportWScalingEnable` is VK_TRUE, then the `viewportCount` parameter in the last call to vkCmdSetViewportWScalingNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksNV-viewportCount-04139
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportShadingRateImageStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksNV-shadingRateImage-09233
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_COARSE_SAMPLE_ORDER_NV and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoarseSampleOrderNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksNV-shadingRateImage-09234
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `shadingRateImageEnable` is VK_TRUE, then vkCmdSetViewportShadingRatePaletteNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksNV-None-08637
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `shadingRateImageEnable` is VK_TRUE, then the `viewportCount` parameter in the last call to vkCmdSetViewportShadingRatePaletteNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksNV-VkPipelineVieportCreateInfo-04141
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled and a VkPipelineViewportSwizzleStateCreateInfoNV structure chained from VkPipelineViewportStateCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportSwizzleStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksNV-VkPipelineVieportCreateInfo-04142
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled and a VkPipelineViewportExclusiveScissorStateCreateInfoNV structure chained from VkPipelineViewportStateCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportExclusiveScissorStateCreateInfoNV::`exclusiveScissorCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksNV-None-07878
  If the `exclusiveScissor` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_ENABLE_NV dynamic state enabled, then vkCmdSetExclusiveScissorEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksNV-None-07879
  If the `exclusiveScissor` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_NV dynamic state enabled, and the most recent call to vkCmdSetExclusiveScissorEnableNV in the current command buffer set any element of `pExclusiveScissorEnables` to VK_TRUE, then vkCmdSetExclusiveScissorNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksNV-None-04876
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE dynamic state enabled, then vkCmdSetRasterizerDiscardEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksNV-None-04877
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthBiasEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksNV-logicOp-04878
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LOGIC_OP_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `logicOpEnable` is VK_TRUE, then vkCmdSetLogicOpEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksNV-primitiveFragmentShadingRateWithMultipleViewports-04552
  If the `primitiveFragmentShadingRateWithMultipleViewports` limit is not supported, the bound graphics pipeline was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, and any of the shader stages of the bound graphics pipeline write to the `PrimitiveShadingRateKHR` built-in, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and the `viewportCount` parameter of `vkCmdSetViewportWithCount` must be `1`

- VUID-vkCmdDrawMeshTasksNV-primitiveFragmentShadingRateWithMultipleViewports-08642
  If the `primitiveFragmentShadingRateWithMultipleViewports` limit is not supported, and any shader object bound to a graphics stage writes to the `PrimitiveShadingRateKHR` built-in, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and the `viewportCount` parameter of `vkCmdSetViewportWithCount` must be `1`

- VUID-vkCmdDrawMeshTasksNV-blendEnable-04727
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, then for each color attachment, if the corresponding image view’s format features do not contain VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT, then the corresponding current value of `blendEnable` must be VK_FALSE

- VUID-vkCmdDrawMeshTasksNV-None-08644
  If a shader object is bound to any graphics stage or a graphics pipeline is bound, the current value of `rasterizerDiscardEnable` is VK_FALSE, and none of the following is enabled:

  - the `VK_AMD_mixed_attachment_samples` extension

  - the `VK_NV_framebuffer_mixed_samples` extension

  - the `multisampledRenderToSingleSampled` feature

  then the current value of `rasterizationSamples` must be the same as the current color and/or depth/stencil attachments

- VUID-vkCmdDrawMeshTasksNV-None-08876
  If a shader object is bound to any graphics stage, the current render pass instance must have been begun with vkCmdBeginRendering

- VUID-vkCmdDrawMeshTasksNV-imageView-06172
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawMeshTasksNV-imageView-06173
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawMeshTasksNV-imageView-06174
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawMeshTasksNV-imageView-06175
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawMeshTasksNV-imageView-06176
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawMeshTasksNV-imageView-06177
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawMeshTasksNV-viewMask-06178
  If the current render pass instance was begun with vkCmdBeginRendering, the bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::`viewMask` equal to VkRenderingInfo::`viewMask`

- VUID-vkCmdDrawMeshTasksNV-colorAttachmentCount-06179
  If the `dynamicRenderingUnusedAttachments` feature is not enabled and the current render pass instance was begun with vkCmdBeginRendering, the bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::`colorAttachmentCount` equal to VkRenderingInfo::`colorAttachmentCount`

- VUID-vkCmdDrawMeshTasksNV-dynamicRenderingUnusedAttachments-08910
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound graphics pipeline

- VUID-vkCmdDrawMeshTasksNV-dynamicRenderingUnusedAttachments-08912
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` equal to VK_NULL_HANDLE must have the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound pipeline equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksNV-dynamicRenderingUnusedAttachments-08911
  If the `dynamicRenderingUnusedAttachments` feature is enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound graphics pipeline, or the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats`, if it exists, must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksNV-colorAttachmentCount-09362
  If the current render pass instance was begun with vkCmdBeginRendering, with a VkRenderingInfo::`colorAttachmentCount` equal to `1`, there is no shader object bound to any graphics stage, and a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, each element of the VkRenderingInfo::`pColorAttachments` array with a `resolveImageView` not equal to VK_NULL_HANDLE must have been created with an image created with a VkExternalFormatANDROID::`externalFormat` value equal to the VkExternalFormatANDROID::`externalFormat` value used to create the bound graphics pipeline

- VUID-vkCmdDrawMeshTasksNV-None-09363
  If there is no shader object bound to any graphics stage, the current render pass instance was begun with vkCmdBeginRendering and a VkRenderingInfo::`colorAttachmentCount` equal to `1`, and a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with an image created with a VkExternalFormatANDROID::`externalFormat` value equal to the VkExternalFormatANDROID::`externalFormat` value used to create the bound graphics pipeline

- VUID-vkCmdDrawMeshTasksNV-None-09364
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetColorBlendEnableEXT must have set the blend enable to VK_FALSE prior to this drawing command

- VUID-vkCmdDrawMeshTasksNV-None-09365
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetRasterizationSamplesEXT must have set `rasterizationSamples` to VK_SAMPLE_COUNT_1_BIT prior to this drawing command

- VUID-vkCmdDrawMeshTasksNV-None-09368
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetFragmentShadingRateKHR must have set `pFragmentSize->width` to `1` prior to this drawing command

- VUID-vkCmdDrawMeshTasksNV-None-09369
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetFragmentShadingRateKHR must have set `pFragmentSize->height` to `1` prior to this drawing command

- VUID-vkCmdDrawMeshTasksNV-None-07749
  If the `colorWriteEnable` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorWriteEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksNV-attachmentCount-07750
  If the `colorWriteEnable` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the `attachmentCount` parameter of most recent call to `vkCmdSetColorWriteEnableEXT` in the current command buffer must be greater than or equal to the number of active color attachments

- VUID-vkCmdDrawMeshTasksNV-None-07751
  If the `VK_EXT_discard_rectangles` extension is enabled, a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT dynamic state enabled and the `pNext` chain of VkGraphicsPipelineCreateInfo included a VkPipelineDiscardRectangleStateCreateInfoEXT structure, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for each discard rectangle in VkPipelineDiscardRectangleStateCreateInfoEXT::`discardRectangleCount`

- VUID-vkCmdDrawMeshTasksNV-rasterizerDiscardEnable-09236
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT dynamic state enabled and the `pNext` chain of VkGraphicsPipelineCreateInfo did not include a VkPipelineDiscardRectangleStateCreateInfoEXT structure, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for each discard rectangle in VkPhysicalDeviceDiscardRectanglePropertiesEXT::`maxDiscardRectangles`

- VUID-vkCmdDrawMeshTasksNV-None-07880
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDiscardRectangleEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksNV-None-07881
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_MODE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksNV-dynamicRenderingUnusedAttachments-08913
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->imageView` was VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksNV-dynamicRenderingUnusedAttachments-08914
  If current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawMeshTasksNV-dynamicRenderingUnusedAttachments-08915
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, and the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->imageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksNV-dynamicRenderingUnusedAttachments-08916
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->imageView` was VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksNV-dynamicRenderingUnusedAttachments-08917
  If current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawMeshTasksNV-dynamicRenderingUnusedAttachments-08918
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, and the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->imageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksNV-imageView-06183
  If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentShadingRateAttachmentInfoKHR::`imageView` was not VK_NULL_HANDLE, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

- VUID-vkCmdDrawMeshTasksNV-dynamicRenderingLocalRead-11797
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingLocalRead` feature is enabled, the VK_RENDERING_LOCAL_READ_CONCURRENT_ACCESS_CONTROL_BIT_KHR flag is specified, and an attachment is being used as a feedback loop as specified by VK_RENDERING_ATTACHMENT_INPUT_ATTACHMENT_FEEDBACK_BIT_KHR, VkRenderingAttachmentFlagsInfoKHR::`flags` for that attachment must include VK_RENDERING_ATTACHMENT_INPUT_ATTACHMENT_FEEDBACK_BIT_KHR

- VUID-vkCmdDrawMeshTasksNV-imageView-06184
  If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentDensityMapAttachmentInfoEXT::`imageView` was not VK_NULL_HANDLE, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT

- VUID-vkCmdDrawMeshTasksNV-layers-10831
  If the current render pass instance was created with VK_RENDERING_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE or VK_RENDER_PASS_CREATE_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE, and the bound graphics pipeline was created with VK_PIPELINE_CREATE_2_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE, then the current render pass instance must have a `layers` value less than or equal to VkPipelineFragmentDensityMapLayeredCreateInfoVALVE::`maxFragmentDensityMapLayers`

- VUID-vkCmdDrawMeshTasksNV-colorAttachmentCount-06185
  If the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with a sample count equal to the corresponding element of the `pColorAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline

- VUID-vkCmdDrawMeshTasksNV-pDepthAttachment-06186
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of the `depthStencilAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawMeshTasksNV-pStencilAttachment-06187
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of the `depthStencilAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawMeshTasksNV-multisampledRenderToSingleSampled-07285
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with a sample count equal to the value of `rasterizationSamples` for the bound graphics pipeline

- VUID-vkCmdDrawMeshTasksNV-multisampledRenderToSingleSampled-07286
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawMeshTasksNV-multisampledRenderToSingleSampled-07287
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawMeshTasksNV-pNext-07935
  If this command is called inside a render pass instance started with vkCmdBeginRendering, and the `pNext` chain of VkRenderingInfo includes a VkMultisampledRenderToSingleSampledInfoEXT structure with `multisampledRenderToSingleSampledEnable` equal to VK_TRUE, then the value of `rasterizationSamples` for the bound graphics pipeline must be equal to VkMultisampledRenderToSingleSampledInfoEXT::`rasterizationSamples`

- VUID-vkCmdDrawMeshTasksNV-renderPass-06198
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline must have been created with a VkGraphicsPipelineCreateInfo::`renderPass` equal to VK_NULL_HANDLE

- VUID-vkCmdDrawMeshTasksNV-pColorAttachments-08963
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound with a fragment shader that statically writes to a color attachment, the color write mask is not zero, color writes are enabled, and the corresponding element of the VkRenderingInfo::`pColorAttachments->imageView` was not VK_NULL_HANDLE, then the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksNV-pColorAttachments-11539
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound with a fragment shader that statically writes to a color attachment, the color write mask is not zero, color writes are enabled, and the corresponding element of the VkRenderingInfo::`pColorAttachments->resolveImageView` was not VK_NULL_HANDLE, then the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksNV-pDepthAttachment-08964
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound, depth test is enabled, and the VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, then the VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksNV-pDepthAttachment-11540
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound, depth test is enabled, and the VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, then the VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksNV-pStencilAttachment-08965
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound, stencil test is enabled and the VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, then the VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksNV-pStencilAttachment-11860
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound, stencil test is enabled and the VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, then the VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksNV-flags-10582
  If the current render pass instance was begun with a vkCmdBeginRendering call in `commandBuffer`, its VkRenderingInfo::`flags` parameter must not have VK_RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT set unless VK_RENDERING_CONTENTS_INLINE_BIT_KHR is also set

- VUID-vkCmdDrawMeshTasksNV-primitivesGeneratedQueryWithRasterizerDiscard-06708
  If the `primitivesGeneratedQueryWithRasterizerDiscard` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, rasterization discard must not be enabled

- VUID-vkCmdDrawMeshTasksNV-primitivesGeneratedQueryWithNonZeroStreams-06709
  If the `primitivesGeneratedQueryWithNonZeroStreams` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, the bound graphics pipeline must not have been created with a non-zero value in `VkPipelineRasterizationStateStreamCreateInfoEXT`::`rasterizationStream`

- VUID-vkCmdDrawMeshTasksNV-None-07620
  If the `depthClamp` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLAMP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthClampEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksNV-None-07621
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_POLYGON_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetPolygonModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksNV-None-07622
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetRasterizationSamplesEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksNV-None-07623
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetSampleMaskEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksNV-alphaToCoverageEnable-08919
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT dynamic state enabled, and `alphaToCoverageEnable` was VK_TRUE in the last call to vkCmdSetAlphaToCoverageEnableEXT, then the Fragment Output Interface must contain a variable for the alpha `Component` word in `Location` 0 at `Index` 0

- VUID-vkCmdDrawMeshTasksNV-alphaToCoverageEnable-08920
  If a shader object is bound to any graphics stage, and the most recent call to vkCmdSetAlphaToCoverageEnableEXT in the current command buffer set `alphaToCoverageEnable` to VK_TRUE, then the Fragment Output Interface must contain a variable for the alpha `Component` word in `Location` 0 at `Index` 0

- VUID-vkCmdDrawMeshTasksNV-None-07624
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAlphaToCoverageEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksNV-None-07625
  If the `alphaToOne` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ALPHA_TO_ONE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAlphaToOneEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksNV-None-07626
  If the `logicOp` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LOGIC_OP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetLogicOpEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksNV-None-07627
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and there are color attachments bound, then vkCmdSetColorBlendEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksNV-None-07629
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and there are color attachments bound, then vkCmdSetColorWriteMaskEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksNV-None-07630
  If the `geometryStreams` feature is enabled, and a shader object is bound to the VK_SHADER_STAGE_GEOMETRY_BIT stage or a graphics pipeline is bound which was created with both a VK_SHADER_STAGE_GEOMETRY_BIT stage and the VK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXT dynamic state enabled, then vkCmdSetRasterizationStreamEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksNV-None-07631
  If the `VK_EXT_conservative_rasterization` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_CONSERVATIVE_RASTERIZATION_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetConservativeRasterizationModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksNV-None-07632
  If the `VK_EXT_conservative_rasterization` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXTRA_PRIMITIVE_OVERESTIMATION_SIZE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `conservativeRasterizationMode` is VK_CONSERVATIVE_RASTERIZATION_MODE_OVERESTIMATE_EXT, then vkCmdSetExtraPrimitiveOverestimationSizeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksNV-conservativePointAndLineRasterization-07499
  If the `VK_EXT_conservative_rasterization` extension is enabled, `conservativePointAndLineRasterization` is not supported, a shader object is bound to any graphics stage or a graphics pipeline is bound, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line or point topology class, then the current value of `conservativeRasterizationMode` must be VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT

- VUID-vkCmdDrawMeshTasksNV-None-07633
  If the `depthClipEnable` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLIP_ENABLE_EXT dynamic state, then vkCmdSetDepthClipEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksNV-None-07636
  If the `VK_EXT_provoking_vertex` extension is enabled, a shader object is bound to the VK_SHADER_STAGE_VERTEX_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_PROVOKING_VERTEX_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetProvokingVertexModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksNV-None-08666
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineRasterizationModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksNV-None-08669
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineStippleEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksNV-None-07849
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled and a shader object is bound to any graphics stage, or a bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stippledLineEnable` is VK_TRUE, then vkCmdSetLineStipple must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksNV-None-10608
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic state enabled, the effective rasterization input topology is in the line topology class, and the current `lineRasterizationMode` is VK_LINE_RASTERIZATION_MODE_BRESENHAM or VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH, then the current `alphaToCoverageEnable`, `alphaToOneEnable` and `sampleShadingEnable` states must all be VK_FALSE

- VUID-vkCmdDrawMeshTasksNV-None-07639
  If the `depthClipControl` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLIP_NEGATIVE_ONE_TO_ONE_EXT dynamic state enabled, then vkCmdSetDepthClipNegativeOneToOneEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksNV-None-09650
  If the `depthClampControl` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLAMP_RANGE_EXT dynamic state enabled, and the current value of `depthClampEnable` is VK_TRUE, then vkCmdSetDepthClampRangeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksNV-None-07640
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_ENABLE_NV dynamic state enabled, then vkCmdSetViewportWScalingEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksNV-None-07641
  If the `VK_NV_viewport_swizzle` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic state enabled, then vkCmdSetViewportSwizzleNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksNV-None-07642
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageToColorEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksNV-None-07643
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_LOCATION_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageToColorEnable` is VK_TRUE, then vkCmdSetCoverageToColorLocationNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksNV-None-07644
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_MODE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageModulationModeNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksNV-None-07645
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageModulationMode` is any value other than VK_COVERAGE_MODULATION_MODE_NONE_NV, then vkCmdSetCoverageModulationTableEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksNV-None-07646
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageModulationTableEnable` is VK_TRUE, then vkCmdSetCoverageModulationTableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksNV-None-07647
  If the `shadingRateImage` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SHADING_RATE_IMAGE_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetShadingRateImageEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksNV-pipelineFragmentShadingRate-09238
  If the `pipelineFragmentShadingRate` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetFragmentShadingRateKHR must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksNV-None-07648
  If the `representativeFragmentTest` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_REPRESENTATIVE_FRAGMENT_TEST_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetRepresentativeFragmentTestEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksNV-None-07649
  If the `coverageReductionMode` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageReductionModeNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksNV-rasterizationSamples-07471
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current subpass does not use any color and/or depth/stencil attachments, then the `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT must follow the rules for a zero-attachment subpass

- VUID-vkCmdDrawMeshTasksNV-samples-07472
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state disabled, then the `samples` parameter in the last call to vkCmdSetSampleMaskEXT must be greater or equal to the VkPipelineMultisampleStateCreateInfo::`rasterizationSamples` parameter used to create the bound graphics pipeline

- VUID-vkCmdDrawMeshTasksNV-samples-07473
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT state and VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT states enabled, then the `samples` parameter in the last call to vkCmdSetSampleMaskEXT must be greater or equal to the `rasterizationSamples` parameter in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawMeshTasksNV-None-09211
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, or a shader object is bound to any graphics stage, and the current render pass instance includes a VkMultisampledRenderToSingleSampledInfoEXT structure with `multisampledRenderToSingleSampledEnable` equal to VK_TRUE, then the `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT must be the same as the `rasterizationSamples` member of that structure

- VUID-vkCmdDrawMeshTasksNV-firstAttachment-07476
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic states enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the last call to vkCmdSetColorBlendEnableEXT in the current command buffer prior to this drawing command must have set a value for all active color attachments

- VUID-vkCmdDrawMeshTasksNV-firstAttachment-07478
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT dynamic states enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the last call to vkCmdSetColorWriteMaskEXT in the current command buffer prior to this drawing command must have set a value for all active color attachments

- VUID-vkCmdDrawMeshTasksNV-advancedBlendMaxColorAttachments-07480
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT and VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic states enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and an active color attachment current value of `blendEnable` is VK_TRUE, then the number of active color attachments must not exceed `advancedBlendMaxColorAttachments`

- VUID-vkCmdDrawMeshTasksNV-None-10862
  If a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT , but not the VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorBlendEquationEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawMeshTasksNV-rasterizerDiscardEnable-10863
  If a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT, but not the VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorBlendAdvancedEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawMeshTasksNV-None-10864
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT and VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then either vkCmdSetColorBlendAdvancedEXT or vkCmdSetColorBlendEquationEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawMeshTasksNV-primitivesGeneratedQueryWithNonZeroStreams-07481
  If the `primitivesGeneratedQueryWithNonZeroStreams` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, and the bound graphics pipeline was created with VK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXT state enabled, the last call to vkCmdSetRasterizationStreamEXT must have set the `rasterizationStream` to zero

- VUID-vkCmdDrawMeshTasksNV-sampleLocationsPerPixel-07482
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state disabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then the `sampleLocationsPerPixel` member of `pSampleLocationsInfo` in the last call to vkCmdSetSampleLocationsEXT must equal the `rasterizationSamples` member of the VkPipelineMultisampleStateCreateInfo structure the bound graphics pipeline has been created with

- VUID-vkCmdDrawMeshTasksNV-sampleLocationsPerPixel-07483
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then the `sampleLocationsPerPixel` member of `pSampleLocationsInfo` in the last call to vkCmdSetSampleLocationsEXT must equal the `rasterizationSamples` parameter of the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawMeshTasksNV-sampleLocationsEnable-07484
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT then the current active depth attachment must have been created with the VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit set

- VUID-vkCmdDrawMeshTasksNV-sampleLocationsEnable-07485
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, then the `sampleLocationsInfo.maxSampleLocationGridSize.width` in the last call to vkCmdSetSampleLocationsEXT must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.width` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling `rasterizationSamples`

- VUID-vkCmdDrawMeshTasksNV-sampleLocationsEnable-07486
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, then the `sampleLocationsInfo.maxSampleLocationGridSize.height` in the last call to vkCmdSetSampleLocationsEXT must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.height` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling `rasterizationSamples`

- VUID-vkCmdDrawMeshTasksNV-sampleLocationsEnable-07487
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, the fragment shader code must not statically use the extended instruction `InterpolateAtSample`

- VUID-vkCmdDrawMeshTasksNV-sampleLocationsEnable-07936
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationGridSize.width` must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.width` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling the value of `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawMeshTasksNV-sampleLocationsEnable-07937
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationGridSize.height` must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.height` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling the value of `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawMeshTasksNV-sampleLocationsEnable-07938
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationsPerPixel` must equal `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawMeshTasksNV-coverageModulationTableEnable-07488
  If a shader object is bound to any graphics stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NV state enabled, and the last call to vkCmdSetCoverageModulationTableEnableNV set `coverageModulationTableEnable` to VK_TRUE, then the `coverageModulationTableCount` parameter in the last call to vkCmdSetCoverageModulationTableNV must equal the current `rasterizationSamples` divided by the number of color samples in the current active color attachment

- VUID-vkCmdDrawMeshTasksNV-rasterizationSamples-07489
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, and if current subpass has a depth/stencil attachment and depth test, stencil test, or depth bounds test are enabled in the bound pipeline, then the current `rasterizationSamples` must be the same as the sample count of the depth/stencil attachment

- VUID-vkCmdDrawMeshTasksNV-coverageToColorEnable-07490
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV state enabled and the last call to vkCmdSetCoverageToColorEnableNV set the `coverageToColorEnable` to VK_TRUE, then there must be an active color attachment at the location selected by the last call to vkCmdSetCoverageToColorLocationNV `coverageToColorLocation`, with a VkFormat of VK_FORMAT_R8_UINT, VK_FORMAT_R8_SINT, VK_FORMAT_R16_UINT, VK_FORMAT_R16_SINT, VK_FORMAT_R32_UINT, or VK_FORMAT_R32_SINT

- VUID-vkCmdDrawMeshTasksNV-rasterizerDiscardEnable-09420
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, and a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, and the most recent call to vkCmdSetRasterizerDiscardEnable in the current command buffer set `rasterizerDiscardEnable` to VK_FALSE, and the last call to vkCmdSetCoverageToColorEnableNV set the `coverageToColorEnable` to VK_TRUE, then there must be an active color attachment at the location selected by the last call to vkCmdSetCoverageToColorLocationNV `coverageToColorLocation`, with a VkFormat of VK_FORMAT_R8_UINT, VK_FORMAT_R8_SINT, VK_FORMAT_R16_UINT, VK_FORMAT_R16_SINT, VK_FORMAT_R32_UINT, or VK_FORMAT_R32_SINT

- VUID-vkCmdDrawMeshTasksNV-coverageReductionMode-07491
  If the `coverageReductionMode` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV or VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic states enabled, then the current values of `coverageReductionMode`, `rasterizationSamples`, the sample counts for the color and depth/stencil attachments (if the subpass has them) must be a valid combination returned by vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV

- VUID-vkCmdDrawMeshTasksNV-viewportCount-07492
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportSwizzleStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksNV-viewportCount-07493
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic states enabled then the `viewportCount` parameter in the last call to vkCmdSetViewportSwizzleNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksNV-viewportCount-09421
  If the `VK_NV_viewport_swizzle` extension is enabled, and a shader object is bound to any graphics stage, then the `viewportCount` parameter in the last call to vkCmdSetViewportSwizzleNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksNV-rasterizationSamples-07494
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, and the `coverageReductionMode` feature is not enabled, or the current value of `coverageReductionMode` is not VK_COVERAGE_REDUCTION_MODE_TRUNCATE_NV, and the current value of `rasterizationSamples` is greater than sample count of the color attachment, then sample shading must be disabled

- VUID-vkCmdDrawMeshTasksNV-stippledLineEnable-07495
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_RECTANGULAR, then the `stippledRectangularLines` feature must be enabled

- VUID-vkCmdDrawMeshTasksNV-stippledLineEnable-07496
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_BRESENHAM, then the `stippledBresenhamLines` feature must be enabled

- VUID-vkCmdDrawMeshTasksNV-stippledLineEnable-07497
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH, then the `stippledSmoothLines` feature must be enabled

- VUID-vkCmdDrawMeshTasksNV-stippledLineEnable-07498
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_DEFAULT, then the `stippledRectangularLines` feature must be enabled and VkPhysicalDeviceLimits::`strictLines` must be VK_TRUE

- VUID-vkCmdDrawMeshTasksNV-stage-07073
  If the bound pipeline was created with the VkPipelineShaderStageCreateInfo::`stage` member of an element of VkGraphicsPipelineCreateInfo::`pStages` set to VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT, then Mesh Shader Queries must not be active

- VUID-vkCmdDrawMeshTasksNV-None-08877
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ATTACHMENT_FEEDBACK_LOOP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAttachmentFeedbackLoopEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksNV-None-07850
  If dynamic state was inherited from VkCommandBufferInheritanceViewportScissorInfoNV, it must be set in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksNV-nextStage-10745
  For each shader object bound to a graphics stage, except for shader object bound to the last graphics stage in the logical pipeline, it must have been created with a `nextStage` including the corresponding bit to the shader object bound to the following graphics stage in the logical pipeline

- VUID-vkCmdDrawMeshTasksNV-None-08684
  If there is no bound graphics pipeline, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_VERTEX_BIT

- VUID-vkCmdDrawMeshTasksNV-None-08685
  If there is no bound graphics pipeline, and the `tessellationShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT

- VUID-vkCmdDrawMeshTasksNV-None-08686
  If there is no bound graphics pipeline, and the `tessellationShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT

- VUID-vkCmdDrawMeshTasksNV-None-08687
  If there is no bound graphics pipeline, and the `geometryShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_GEOMETRY_BIT

- VUID-vkCmdDrawMeshTasksNV-None-08688
  If there is no bound graphics pipeline, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_FRAGMENT_BIT

- VUID-vkCmdDrawMeshTasksNV-None-08689
  If there is no bound graphics pipeline, and the `taskShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TASK_BIT_EXT

- VUID-vkCmdDrawMeshTasksNV-None-08690
  If there is no bound graphics pipeline, and the `meshShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-vkCmdDrawMeshTasksNV-None-08693
  If there is no bound graphics pipeline, and at least one of the `taskShader` and `meshShader` features is enabled, one of the VK_SHADER_STAGE_VERTEX_BIT or VK_SHADER_STAGE_MESH_BIT_EXT stages must have a valid `VkShaderEXT` bound, and the other must have no `VkShaderEXT` bound

- VUID-vkCmdDrawMeshTasksNV-None-08696
  If there is no bound graphics pipeline, and a valid `VkShaderEXT` is bound to the VK_SHADER_STAGE_VERTEX_BIT stage, there must be no `VkShaderEXT` bound to either the VK_SHADER_STAGE_TASK_BIT_EXT stage or the VK_SHADER_STAGE_MESH_BIT_EXT stage

- VUID-vkCmdDrawMeshTasksNV-None-08698
  If any graphics shader is bound which was created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag, then all shaders created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag in the same vkCreateShadersEXT call must also be bound

- VUID-vkCmdDrawMeshTasksNV-None-08699
  If any graphics shader is bound which was created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag, any stages in between stages whose shaders which did not create a shader with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag as part of the same vkCreateShadersEXT call must not have any `VkShaderEXT` bound

- VUID-vkCmdDrawMeshTasksNV-None-08878
  All bound graphics shader objects must have been created with identical or identically defined push constant ranges

- VUID-vkCmdDrawMeshTasksNV-None-08879
  All bound graphics shader objects must have either been created with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag set, or with identical or identically defined arrays of descriptor set layouts

- VUID-vkCmdDrawMeshTasksNV-colorAttachmentCount-09372
  If the current render pass instance was begun with vkCmdBeginRendering and a VkRenderingInfo::`colorAttachmentCount` equal to `1`, a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, and a fragment shader is bound, it must not declare the `DepthReplacing` or `StencilRefReplacingEXT` execution modes

- VUID-vkCmdDrawMeshTasksNV-pDynamicStates-08715
  If the bound graphics pipeline state includes a fragment shader stage, was created with VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`, and the fragment shader declares the `EarlyFragmentTests` execution mode and uses `OpDepthAttachmentReadEXT`, the `depthWriteEnable` parameter in the last call to vkCmdSetDepthWriteEnable must be VK_FALSE

- VUID-vkCmdDrawMeshTasksNV-pDynamicStates-08716
  If the bound graphics pipeline state includes a fragment shader stage, was created with VK_DYNAMIC_STATE_STENCIL_WRITE_MASK set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`, and the fragment shader declares the `EarlyFragmentTests` execution mode and uses `OpStencilAttachmentReadEXT`, the `writeMask` parameter in the last call to vkCmdSetStencilWriteMask must be `0`

- VUID-vkCmdDrawMeshTasksNV-None-09116
  If a shader object is bound to any graphics stage or the bound graphics pipeline was created with VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT, and the format of any color attachment is VK_FORMAT_E5B9G9R9_UFLOAT_PACK32, the corresponding element of the `pColorWriteMasks` parameter of vkCmdSetColorWriteMaskEXT must either include all of VK_COLOR_COMPONENT_R_BIT, VK_COLOR_COMPONENT_G_BIT, VK_COLOR_COMPONENT_B_BIT, and VK_COLOR_COMPONENT_A_BIT, or none of them

- VUID-vkCmdDrawMeshTasksNV-maxFragmentDualSrcAttachments-09239
  If blending is enabled for any attachment where either the source or destination blend factors for that attachment use the secondary color input, the maximum value of `Location` for any output attachment statically used in the `Fragment` `Execution` `Model` executed by this command must be less than `maxFragmentDualSrcAttachments`

- VUID-vkCmdDrawMeshTasksNV-None-09548
  If the current render pass was begun with vkCmdBeginRendering, there is no shader object bound to any graphics stage, the value of each element of VkRenderingAttachmentLocationInfo::`pColorAttachmentLocations` in the bound pipeline must match the value for the corresponding locations set currently in the current render pass instance

- VUID-vkCmdDrawMeshTasksNV-None-09549
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of each element of VkRenderingInputAttachmentIndexInfo::`pColorAttachmentInputIndices` in the bound pipeline must match the value for the corresponding index set currently in the current render pass instance

- VUID-vkCmdDrawMeshTasksNV-None-10927
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` in the bound pipeline must match the value set currently in the current render pass instance

- VUID-vkCmdDrawMeshTasksNV-None-10928
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` in the bound pipeline must match the value set currently in the current render pass instance

- VUID-vkCmdDrawMeshTasksNV-None-09642
  If the current render pass was begun with vkCmdBeginRendering with the VK_RENDERING_ENABLE_LEGACY_DITHERING_BIT_EXT flag, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_2_ENABLE_LEGACY_DITHERING_BIT_EXT

- VUID-vkCmdDrawMeshTasksNV-None-09643
  If the bound graphics pipeline was created with VK_PIPELINE_CREATE_2_ENABLE_LEGACY_DITHERING_BIT_EXT, the current render pass must have begun with vkCmdBeginRendering with the VK_RENDERING_ENABLE_LEGACY_DITHERING_BIT_EXT flag

- VUID-vkCmdDrawMeshTasksNV-None-10677
  If the per-tile execution model is enabled, the tileShadingPerTileDraw feature must be enabled

- VUID-vkCmdDrawMeshTasksNV-None-10772
  If a shader object is bound to any graphics stage, multiview functionality must not be enabled in the current render pass

- VUID-vkCmdDrawMeshTasksNV-multiviewPerViewViewports-12262
  If the `multiviewPerViewViewports` feature is enabled, then the index of the most significant bit in current render pass instance `viewMask` must be less than the current value of `viewportCount`

- VUID-vkCmdDrawMeshTasksNV-multiviewPerViewViewports-12263
  If the `multiviewPerViewViewports` feature is enabled, then the index of the most significant bit in current render pass instance `viewMask` must be less than the current value of `scissorCount`

- VUID-vkCmdDrawMeshTasksNV-flags-11521
  If current render pass instance was begun with vkCmdBeginRendering with VkRenderingInfo::`flags` which includes VK_RENDERING_FRAGMENT_REGION_BIT_EXT, and if sample shading is enabled (explicitly or implicitly), then the minimum fraction for sample shading must equal 0.0

- VUID-vkCmdDrawMeshTasksNV-None-11522
  If the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, and the `dynamicRenderingUnusedAttachments` feature is not enabled, the graphics pipeline bound must have been created with a VkCustomResolveCreateInfoEXT

- VUID-vkCmdDrawMeshTasksNV-None-11523
  If the current render pass instance was begun with vkCmdBeginRendering and does not contain a custom resolve, and the `dynamicRenderingUnusedAttachments` feature is not enabled, the graphics pipeline bound must not have been created with a VkCustomResolveCreateInfoEXT

- VUID-vkCmdDrawMeshTasksNV-customResolve-11524
  If the current render pass instance was begun with vkCmdBeginRendering and vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, the graphics pipeline bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_TRUE

- VUID-vkCmdDrawMeshTasksNV-customResolve-11525
  If the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, and vkCmdBeginCustomResolveEXT has not been recorded in the render pass instance, the graphics pipeline bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_FALSE

- VUID-vkCmdDrawMeshTasksNV-None-11861
  If the `dynamicRenderingUnusedAttachments` feature is not enabled and the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, the bound graphics pipeline must have been created with a VkCustomResolveCreateInfoEXT::`colorAttachmentCount` equal to VkRenderingInfo::`colorAttachmentCount`

- VUID-vkCmdDrawMeshTasksNV-None-11862
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound graphics pipeline

- VUID-vkCmdDrawMeshTasksNV-None-11863
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` equal to VK_NULL_HANDLE must have the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound pipeline equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksNV-dynamicRenderingUnusedAttachments-11864
  If the `dynamicRenderingUnusedAttachments` feature is enabled, the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound graphics pipeline, or the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats`, if it exists, must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksNV-None-11865
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksNV-None-11866
  If current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`

- VUID-vkCmdDrawMeshTasksNV-dynamicRenderingUnusedAttachments-11867
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, and the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksNV-None-11868
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->resolveImageView` was VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksNV-None-11869
  If current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`

- VUID-vkCmdDrawMeshTasksNV-dynamicRenderingUnusedAttachments-11870
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, and the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksNV-colorAttachmentCount-11871
  If the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0` and vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, then for each element of the VkRenderingInfo::`pColorAttachments` array with a `resolveImageView` not equal to VK_NULL_HANDLE, the `resolveImageView` must have been created with a sample count equal to the value of `rasterizationSamples` for the bound graphics pipeline

- VUID-vkCmdDrawMeshTasksNV-pDepthAttachment-11872
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`

- VUID-vkCmdDrawMeshTasksNV-pStencilAttachment-11873
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`

- VUID-vkCmdDrawMeshTasksNV-customResolve-11529
  If a shader object is bound to the fragment stage, the current render pass instance was begun with vkCmdBeginRendering, a fragment density map attachment is active, and vkCmdBeginCustomResolveEXT has been called, then the fragment shader object bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_TRUE

- VUID-vkCmdDrawMeshTasksNV-customResolve-11530
  If a shader object is bound to the fragment stage, the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, a fragment density map attachment is active, and vkCmdBeginCustomResolveEXT has not yet been called, then the fragment shader object bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_FALSE

- VUID-vkCmdDrawMeshTasksNV-flags-13361
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, then all bound shader objects must have been created with the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit

- VUID-vkCmdDrawMeshTasksNV-flags-13362
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, then the pipeline layout of the bound descriptor sets must have been created with VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT set

- VUID-vkCmdDrawMeshTasksNV-flags-13363
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, and any of the descriptor set layouts used to create the pipeline layout of the bound descriptor sets were created with any binding’s VkDescriptorSetLayoutBinding::`stageFlags` set with VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT, then there must be no binding with VkDescriptorSetLayoutBinding::`stageFlags` set with VK_SHADER_STAGE_TASK_BIT_EXT or VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-vkCmdDrawMeshTasksNV-flags-13364
  If there are any shader objects bound that were created with `flags` that includes both the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR and VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT bits, the pipeline layout of the bound descriptor sets must have been created with VK_PIPELINE_LAYOUT_CREATE_NO_TASK_SHADER_BIT_KHR set

- VUID-vkCmdDrawMeshTasksNV-flags-13365
  If there are any shader objects bound that were created with `flags` that includes both the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR and VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT bits, there must be no shader object bound to the VK_SHADER_STAGE_TASK_BIT_EXT stage

- VUID-vkCmdDrawMeshTasksNV-stage-06480
  The bound graphics pipeline must not have been created with the VkPipelineShaderStageCreateInfo::`stage` member of any element of VkGraphicsPipelineCreateInfo::`pStages` set to VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT

- VUID-vkCmdDrawMeshTasksNV-pStages-10680
  If there is no bound graphics pipeline, `vkCmdBindShadersEXT` must not have last bound the `pStages` element of VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT with a valid shader object other than VK_NULL_HANDLE

- VUID-vkCmdDrawMeshTasksNV-None-07074
  Transform Feedback Queries must not be active

- VUID-vkCmdDrawMeshTasksNV-None-07075
  Primitives Generated Queries must not be active

- VUID-vkCmdDrawMeshTasksNV-pipelineStatistics-07076
  The `pipelineStatistics` member used to create any active Pipeline Statistics Query must not contain VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT, VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT, VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT, VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT, VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT, VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT, VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT, VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT, or VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT

- VUID-vkCmdDrawMeshTasksNV-None-08694
  If there is no bound graphics pipeline, and both the `taskShader` and `meshShader` features are enabled, and a valid `VkShaderEXT` is bound the to the VK_SHADER_STAGE_MESH_BIT_EXT stage, and that `VkShaderEXT` was created without the VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT flag, a valid `VkShaderEXT` must be bound to the VK_SHADER_STAGE_TASK_BIT_EXT stage

- VUID-vkCmdDrawMeshTasksNV-None-08695
  If there is no bound graphics pipeline, and both the `taskShader` and `meshShader` features are enabled, and a valid `VkShaderEXT` is bound the to the VK_SHADER_STAGE_MESH_BIT_EXT stage, and that `VkShaderEXT` was created with the VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT flag, there must be no `VkShaderEXT` bound to the VK_SHADER_STAGE_TASK_BIT_EXT stage

- VUID-vkCmdDrawMeshTasksNV-taskCount-02119
  `taskCount` must be less than or equal to `VkPhysicalDeviceMeshShaderPropertiesNV`::`maxDrawMeshTasksCount`

- VUID-vkCmdDrawMeshTasksNV-MeshNV-07080
  The current pipeline bound to VK_PIPELINE_BIND_POINT_GRAPHICS must contain a shader stage using the `MeshNV` `Execution` `Model`

Valid Usage (Implicit)

- VUID-vkCmdDrawMeshTasksNV-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdDrawMeshTasksNV-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdDrawMeshTasksNV-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdDrawMeshTasksNV-renderpass
  This command must only be called inside of a render pass instance

- VUID-vkCmdDrawMeshTasksNV-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdDrawMeshTasksNV-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Inside | Outside | VK_QUEUE_GRAPHICS_BIT | Action

Conditional Rendering

vkCmdDrawMeshTasksNV is affected by conditional rendering

To record an indirect mesh tasks drawing command, call:

    // Provided by VK_NV_mesh_shader
    void vkCmdDrawMeshTasksIndirectNV(
        VkCommandBuffer                             commandBuffer,
        VkBuffer                                    buffer,
        VkDeviceSize                                offset,
        uint32_t                                    drawCount,
        uint32_t                                    stride);

- `commandBuffer` is the command buffer into which the command is recorded.

- `buffer` is the buffer containing draw parameters.

- `offset` is the byte offset into `buffer` where parameters begin.

- `drawCount` is the number of draws to execute, and can be zero.

- `stride` is the byte stride between successive sets of draw parameters.

`vkCmdDrawMeshTasksIndirectNV` behaves similarly to vkCmdDrawMeshTasksNV except that the parameters are read by the device from a buffer during execution. `drawCount` draws are executed by the command, with parameters taken from `buffer` starting at `offset` and increasing by `stride` bytes for each successive draw. The parameters of each draw are encoded in an array of VkDrawMeshTasksIndirectCommandNV structures. If `drawCount` is less than or equal to one, `stride` is ignored.

Valid Usage

- VUID-vkCmdDrawMeshTasksIndirectNV-magFilter-04553
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdDrawMeshTasksIndirectNV-magFilter-09598
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdDrawMeshTasksIndirectNV-mipmapMode-04770
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdDrawMeshTasksIndirectNV-mipmapMode-09599
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdDrawMeshTasksIndirectNV-unnormalizedCoordinates-09635
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `levelCount` and `layerCount` must be 1

- VUID-vkCmdDrawMeshTasksIndirectNV-None-08609
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `viewType` must be VK_IMAGE_VIEW_TYPE_1D or VK_IMAGE_VIEW_TYPE_2D

- VUID-vkCmdDrawMeshTasksIndirectNV-None-08610
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions with `ImplicitLod`, `Dref` or `Proj` in their name

- VUID-vkCmdDrawMeshTasksIndirectNV-None-08611
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions that includes a LOD bias or any offset values

- VUID-vkCmdDrawMeshTasksIndirectNV-None-06479
  If a VkImageView is sampled with depth comparison, the image view’s format features must contain VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT

- VUID-vkCmdDrawMeshTasksIndirectNV-None-02691
  If a VkImageView is accessed using atomic operations as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT

- VUID-vkCmdDrawMeshTasksIndirectNV-None-07888
  If a VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER descriptor is accessed using atomic operations as a result of this command, then the storage texel buffer’s format features must contain VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT

- VUID-vkCmdDrawMeshTasksIndirectNV-None-02692
  If a VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT

- VUID-vkCmdDrawMeshTasksIndirectNV-None-02693
  If the VK_EXT_filter_cubic extension is not enabled and any VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, it must not have a VkImageViewType of VK_IMAGE_VIEW_TYPE_3D, VK_IMAGE_VIEW_TYPE_CUBE, or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY

- VUID-vkCmdDrawMeshTasksIndirectNV-filterCubic-02694
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have a VkImageViewType and format that supports cubic filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubic` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdDrawMeshTasksIndirectNV-filterCubicMinmax-02695
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX as a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubicMinmax` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdDrawMeshTasksIndirectNV-cubicRangeClamp-09212
  If the `cubicRangeClamp` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must not have a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM

- VUID-vkCmdDrawMeshTasksIndirectNV-reductionMode-09213
  Any VkImageView being sampled with a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM as a result of this command must sample with VK_FILTER_CUBIC_EXT

- VUID-vkCmdDrawMeshTasksIndirectNV-selectableCubicWeights-09214
  If the `selectableCubicWeights` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have VkSamplerCubicWeightsCreateInfoQCOM::`cubicWeights` equal to VK_CUBIC_FILTER_WEIGHTS_CATMULL_ROM_QCOM

- VUID-vkCmdDrawMeshTasksIndirectNV-flags-02696
  Any VkImage created with a VkImageCreateInfo::`flags` containing VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV sampled as a result of this command must only be sampled using a VkSamplerAddressMode of VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawMeshTasksIndirectNV-OpTypeImage-07027
  For any VkImageView being written as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawMeshTasksIndirectNV-OpTypeImage-07028
  For any VkImageView being read as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawMeshTasksIndirectNV-OpTypeImage-07029
  For any VkBufferView being written as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown`, the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawMeshTasksIndirectNV-OpTypeImage-07030
  Any VkBufferView being read as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown` then the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawMeshTasksIndirectNV-None-08600
  If a a bound shader was created with a pipeline layout and statically uses a set n, a descriptor set must have been bound to n at the same pipeline bind point, with layouts compatible for set n with the layout(s) used to create the shader, as described in Pipeline Layout Compatibility

- VUID-vkCmdDrawMeshTasksIndirectNV-None-08601
  If a a bound shader was created with a pipeline layout or specified push constant ranges and statically uses a push constant value, that value must have been set for the same pipeline bind point, with push constant ranges that are compatible with the push constant range used to create the shader

- VUID-vkCmdDrawMeshTasksIndirectNV-None-10068
  For each array of resources that is used by a bound shader, the indices used to access members of the array must be less than the descriptor count for the identified binding in the descriptor sets used by this command

- VUID-vkCmdDrawMeshTasksIndirectNV-None-08114
  Descriptors in each bound descriptor set, specified via vkCmdBindDescriptorSets, must be valid if they are accessed as described by descriptor validity by the VkPipeline bound to the pipeline bind point used by this command and the bound VkPipeline was not created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawMeshTasksIndirectNV-imageLayout-00344
  If an image descriptor is accessed by a shader, the VkImageLayout must match the subresource accessible from the VkImageView as defined by the image layout matching rules

- VUID-vkCmdDrawMeshTasksIndirectNV-None-08115
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdBindDescriptorSets, the bound VkPipeline must have been created without VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawMeshTasksIndirectNV-None-08116
  Descriptors in bound descriptor buffers, specified via vkCmdSetDescriptorBufferOffsetsEXT, must be valid if they are dynamically accessed

- VUID-vkCmdDrawMeshTasksIndirectNV-None-08117
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdSetDescriptorBufferOffsetsEXT, the bound VkPipeline must have been created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawMeshTasksIndirectNV-None-08119
  If a descriptor is dynamically used with a VkPipeline created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdDrawMeshTasksIndirectNV-None-08605
  If a descriptor is dynamically used with a VkShaderEXT created with a `VkDescriptorSetLayout` that was created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdDrawMeshTasksIndirectNV-None-08606
  If the `shaderObject` feature is not enabled, a valid pipeline must be bound to the pipeline bind point used by this command

- VUID-vkCmdDrawMeshTasksIndirectNV-None-08608
  If a pipeline is bound to the pipeline bind point used by this command, there must not have been any calls to dynamic state setting commands for any state specified statically in the VkPipeline object bound to the pipeline bind point used by this command, since that pipeline was bound

- VUID-vkCmdDrawMeshTasksIndirectNV-uniformBuffers-06935
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawMeshTasksIndirectNV-None-08612
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawMeshTasksIndirectNV-storageBuffers-06936
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawMeshTasksIndirectNV-None-08613
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a storage buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawMeshTasksIndirectNV-commandBuffer-02707
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, any resource accessed by bound shaders must not be a protected resource

- VUID-vkCmdDrawMeshTasksIndirectNV-viewType-07752
  If a VkImageView is accessed as a result of this command, then the image view’s `viewType` must match the `Dim` operand of the `OpTypeImage` as described in Compatibility Between SPIR-V Image Dimensions and Vulkan ImageView Types

- VUID-vkCmdDrawMeshTasksIndirectNV-format-07753
  If a VkImageView or VkBufferView is accessed as a result of this command, then the numeric type of the view’s `format` and the `Sampled` `Type` operand of the `OpTypeImage` must match

- VUID-vkCmdDrawMeshTasksIndirectNV-OpImageWrite-08795
  If a VkImageView created with a format other than VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the image view’s format

- VUID-vkCmdDrawMeshTasksIndirectNV-OpImageWrite-08796
  If a VkImageView created with the format VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have four components

- VUID-vkCmdDrawMeshTasksIndirectNV-OpImageWrite-04469
  If a VkBufferView is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the buffer view’s format

- VUID-vkCmdDrawMeshTasksIndirectNV-SampledType-04470
  If a VkImageView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdDrawMeshTasksIndirectNV-SampledType-04471
  If a VkImageView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdDrawMeshTasksIndirectNV-SampledType-04472
  If a VkBufferView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdDrawMeshTasksIndirectNV-SampledType-04473
  If a VkBufferView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdDrawMeshTasksIndirectNV-sparseImageInt64Atomics-04474
  If the `sparseImageInt64Atomics` feature is not enabled, VkImage objects created with the VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdDrawMeshTasksIndirectNV-sparseImageInt64Atomics-04475
  If the `sparseImageInt64Atomics` feature is not enabled, VkBuffer objects created with the VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdDrawMeshTasksIndirectNV-OpImageSampleWeightedQCOM-06971
  If `OpImageSampleWeightedQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_SAMPLED_IMAGE_BIT_QCOM

- VUID-vkCmdDrawMeshTasksIndirectNV-OpImageSampleWeightedQCOM-06972
  If `OpImageSampleWeightedQCOM` uses a VkImageView as a sample weight image as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_IMAGE_BIT_QCOM

- VUID-vkCmdDrawMeshTasksIndirectNV-OpImageBoxFilterQCOM-06973
  If `OpImageBoxFilterQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BOX_FILTER_SAMPLED_BIT_QCOM

- VUID-vkCmdDrawMeshTasksIndirectNV-OpImageBlockMatchSSDQCOM-06974
  If `OpImageBlockMatchSSDQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdDrawMeshTasksIndirectNV-OpImageBlockMatchSADQCOM-12420
  If `OpImageBlockMatchSADQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdDrawMeshTasksIndirectNV-OpImageBlockMatchSADQCOM-06976
  If `OpImageBlockMatchSADQCOM` or OpImageBlockMatchSSDQCOM is used to read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdDrawMeshTasksIndirectNV-OpImageSampleWeightedQCOM-06977
  If `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdDrawMeshTasksIndirectNV-OpImageSampleWeightedQCOM-06978
  If any command other than `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must not have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdDrawMeshTasksIndirectNV-OpImageBlockMatchWindow-09215
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM

- VUID-vkCmdDrawMeshTasksIndirectNV-OpImageBlockMatchWindow-09216
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format must be a single-component format

- VUID-vkCmdDrawMeshTasksIndirectNV-OpImageBlockMatchWindow-09217
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdDrawMeshTasksIndirectNV-OpImageBlockMatchWindow-12421
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the `blockMatchExtendedClampToEdge` feature is not enabled, the input sampler must not have been created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawMeshTasksIndirectNV-addressModeU-12422
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the input sampler was created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, then the sampler must have been created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawMeshTasksIndirectNV-None-07288
  Any shader invocation executed by this command must terminate

- VUID-vkCmdDrawMeshTasksIndirectNV-None-09600
  If a descriptor with type equal to any of VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, or VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT is accessed as a result of this command, all image subresources identified by that descriptor must be in the image layout identified when the descriptor was written

- VUID-vkCmdDrawMeshTasksIndirectNV-micromap-11636
  If an acceleration structure is accessed as a result of this command through an `OpRayQueryProceedKHR` operation , the `VK_EXT_opacity_micromap` extension is not enabled, and the acceleration structure is built using geometry with a VkAccelerationStructureTrianglesOpacityMicromapKHR structure included in its `pNext` chain, the shader must have specified a `OpacityMicromapIdKHR` execution mode with its specialization constant operand equal to VK_TRUE

- VUID-vkCmdDrawMeshTasksIndirectNV-micromap-11637
  If an acceleration structure is accessed as a result of this command and the acceleration structure was constructed through deserialization, all micromap arrays referenced by the acceleration structure that were not replaced by an acceleration structure update command must have been deserialized using the serialized data of the corresponding micromaps used to originally build the acceleration structure prior to the execution of this command on the device

- VUID-vkCmdDrawMeshTasksIndirectNV-micromap-11638
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkPipeline bound to the pipeline bind point used by this command must not have been created with `flags` that includes VK_PIPELINE_CREATE_2_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_KHR

- VUID-vkCmdDrawMeshTasksIndirectNV-micromap-11639
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkShaderEXT that accessed the descriptor must not have been created with `flags` that includes VK_SHADER_CREATE_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_EXT

- VUID-vkCmdDrawMeshTasksIndirectNV-commandBuffer-10746
  The `VkDeviceMemory` object allocated from a `VkMemoryHeap` with the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property that is bound to a resource accessed as a result of this command must be the active bound tile memory object in `commandBuffer`

- VUID-vkCmdDrawMeshTasksIndirectNV-None-10678
  If this command is recorded inside a tile shading render pass instance, the stages corresponding to the pipeline bind point used by this command must only include VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_FRAGMENT_BIT, and/or VK_SHADER_STAGE_COMPUTE_BIT

- VUID-vkCmdDrawMeshTasksIndirectNV-None-10679
  If this command is recorded where per-tile execution model is enabled, there must be no access to any image while the image was be transitioned to the VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT layout

- VUID-vkCmdDrawMeshTasksIndirectNV-pDescription-09900
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the underlying VkTensorARM object must have been created with the VK_TENSOR_USAGE_SHADER_BIT_ARM usage flag set

- VUID-vkCmdDrawMeshTasksIndirectNV-dimensionCount-09905
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the `Rank` of the `OpTypeTensorARM` of the tensor resource variable must be equal to the `dimensionCount` provided via VkTensorCreateInfoARM::`pDescription` when creating the underlying VkTensorARM object

- VUID-vkCmdDrawMeshTasksIndirectNV-OpTypeTensorARM-09906
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the element type of the `OpTypeTensorARM` of the tensor resource variable must be compatible with the VkFormat of the VkTensorViewARM used for the access

- VUID-vkCmdDrawMeshTasksIndirectNV-OpTensorReadARM-12462
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, using `OpTensorReadARM` or `OpTensorWriteARM`, and the underlying VkTensorARM object was created with a VK_TENSOR_TILING_BRICK_16_WIDE_ARM, VK_TENSOR_TILING_BRICK_8_WIDE_ARM, VK_TENSOR_TILING_BRICK_4_WIDE_ARM, VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_ARM, or VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_64K_ARM VkTensorTilingARM, and the object read or written is an array, then the innermost coordinate provided to `OpTensorReadARM` or `OpTensorWriteARM` via the `Coordinates` operand must be a multiple of the largest power of 2 that is less than or equal to the number of components of the array

- VUID-vkCmdDrawMeshTasksIndirectNV-pNext-12463
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command and the corresponding VkTensorARM object was created with a VkTensorRollingBackingCreateInfoARM structure in the `pNext` chain of VkTensorCreateInfoARM, then the number of elements accessed with one `OpTensorReadARM` or `OpTensorWriteARM`, must be less than or equal to the number of elements available from the starting coordinate in the rolling backing along the innermost dimension, defined as `wraps`[`dimensionCount` - 1] - InnermostCoordinate % `wraps`[`dimensionCount` - 1] where InnermostCoordinate is the last component of the coordinates array provided via the `Coordinates` operand

- VUID-vkCmdDrawMeshTasksIndirectNV-None-12472
  Descriptors dynamically accessed in bound descriptor heaps must be valid

- VUID-vkCmdDrawMeshTasksIndirectNV-None-11297
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a `OpTypeStruct` decorated with `Block` or `BufferBlock` using that mapping, the calculated offset for the resource heap must be a multiple of `bufferDescriptorAlignment`

- VUID-vkCmdDrawMeshTasksIndirectNV-None-11298
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeImage` or `OpTypeSampledImage` using that mapping, the calculated offset for the resource heap must be a multiple of `imageDescriptorAlignment`

- VUID-vkCmdDrawMeshTasksIndirectNV-None-11299
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeSampler` or `OpTypeSampledImage` using that mapping, the calculated offset for the sampler heap must be a multiple of `samplerDescriptorAlignment`

- VUID-vkCmdDrawMeshTasksIndirectNV-None-11397
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeTensorARM` using that mapping, the calculated offset for the resource heap must be a multiple of `tensorDescriptorAlignment`

- VUID-vkCmdDrawMeshTasksIndirectNV-None-11300
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 4

- VUID-vkCmdDrawMeshTasksIndirectNV-None-11301
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdDrawMeshTasksIndirectNV-None-11302
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress

- VUID-vkCmdDrawMeshTasksIndirectNV-None-11304
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 8

- VUID-vkCmdDrawMeshTasksIndirectNV-None-11305
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdDrawMeshTasksIndirectNV-None-11306
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address pointed to by the address in push data must be a valid VkDeviceAddress

- VUID-vkCmdDrawMeshTasksIndirectNV-None-11308
  For each descriptor heap that is statically used by a bound shader, either directly or via a descriptor mapping, a valid descriptor heap must be bound

- VUID-vkCmdDrawMeshTasksIndirectNV-None-11309
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, execution of this command must not result in any descriptor read accessing data outside of the user range of the respective heap bound by `vkCmdBind*HeapEXT` commands

- VUID-vkCmdDrawMeshTasksIndirectNV-None-11372
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer or uniform texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified via VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawMeshTasksIndirectNV-None-11373
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer or storage texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawMeshTasksIndirectNV-None-11374
  If the `robustBufferAccess2` feature is not enabled, the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, uniform texel buffer, storage buffer, or storage texel buffer, that shader must not access values outside of the range of the buffer as specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawMeshTasksIndirectNV-pBindInfo-11375
  If any bound shader uses an embedded sampler via a descriptor mapping, the value of `pBindInfo->reservedRangeSize` set for vkCmdBindSamplerHeapEXT must be greater than or equal to `minSamplerHeapReservedRangeWithEmbedded`

- VUID-vkCmdDrawMeshTasksIndirectNV-None-11376
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, and that shader statically uses a push constant value, that value must have been set by vkCmdPushDataEXT

- VUID-vkCmdDrawMeshTasksIndirectNV-None-11398
  If a bound shader was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the access must not be out of bounds

- VUID-vkCmdDrawMeshTasksIndirectNV-None-11437
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the buffer from which the address in push data was queried must have been created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdDrawMeshTasksIndirectNV-None-11438
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdDrawMeshTasksIndirectNV-None-11441
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must be aligned to `minUniformBufferOffsetAlignment`

- VUID-vkCmdDrawMeshTasksIndirectNV-None-11439
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_STORAGE_BUFFER_BIT usage flag set

- VUID-vkCmdDrawMeshTasksIndirectNV-None-11442
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must be aligned to `minStorageBufferOffsetAlignment`

- VUID-vkCmdDrawMeshTasksIndirectNV-None-11485
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses an acceleration structure using that mapping, the address that the acceleration structure is mapped to must be an acceleration structure address retrieved from a VkAccelerationStructureKHR object via vkGetAccelerationStructureDeviceAddressKHR or handle retrieved from a VkAccelerationStructureNV object via vkGetAccelerationStructureHandleNV

- VUID-vkCmdDrawMeshTasksIndirectNV-index-11450
  If a shader uses a sampler descriptor to sample an image as a result of this command, and that sampler descriptor uses a custom border color with an index defined by VkSamplerCustomBorderColorIndexCreateInfoEXT, the value of VkSamplerCustomBorderColorIndexCreateInfoEXT::`index` must have been registered before this command was recorded, and still be registered during the sampling operation, with an identically defined color

- VUID-vkCmdDrawMeshTasksIndirectNV-protectedNoFault-11455
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, the address that the resource is mapped to must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdDrawMeshTasksIndirectNV-protectedNoFault-11456
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, the address of the indirect memory must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdDrawMeshTasksIndirectNV-renderPass-02684
  The current render pass must be compatible with the `renderPass` member of the `VkGraphicsPipelineCreateInfo` structure specified when creating the `VkPipeline` bound to VK_PIPELINE_BIND_POINT_GRAPHICS

- VUID-vkCmdDrawMeshTasksIndirectNV-subpass-02685
  The subpass index of the current render pass must be equal to the `subpass` member of the `VkGraphicsPipelineCreateInfo` structure specified when creating the `VkPipeline` bound to VK_PIPELINE_BIND_POINT_GRAPHICS

- VUID-vkCmdDrawMeshTasksIndirectNV-OpTypeImage-07468
  If any shader executed by this pipeline accesses an `OpTypeImage` variable with a `Dim` operand of `SubpassData`, it must be decorated with an `InputAttachmentIndex` that corresponds to a valid input attachment in the current subpass

- VUID-vkCmdDrawMeshTasksIndirectNV-None-07469
  Input attachment views accessed in a subpass must be created with the same VkFormat as the corresponding subpass definition, and be created with a VkImageView that is compatible with the attachment referenced by the subpass' `pInputAttachments`[`InputAttachmentIndex`] in the bound VkFramebuffer as specified by Fragment Input Attachment Compatibility

- VUID-vkCmdDrawMeshTasksIndirectNV-pDepthInputAttachmentIndex-09595
  Input attachment views accessed in a dynamic render pass with a `InputAttachmentIndex` referenced by VkRenderingInputAttachmentIndexInfo, or no `InputAttachmentIndex` if VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` or VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` are `NULL`, must be created with a VkImageView that is compatible with the corresponding color, depth, or stencil attachment in VkRenderingInfo

- VUID-vkCmdDrawMeshTasksIndirectNV-pDepthInputAttachmentIndex-09596
  Input attachment views accessed in a dynamic render pass via a shader object must have an `InputAttachmentIndex` if both VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` and VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` are non-`NULL`

- VUID-vkCmdDrawMeshTasksIndirectNV-InputAttachmentIndex-09597
  If an input attachment view accessed in a dynamic render pass via a shader object has an `InputAttachmentIndex`, the `InputAttachmentIndex` must match an index in VkRenderingInputAttachmentIndexInfo

- VUID-vkCmdDrawMeshTasksIndirectNV-None-06537
  Memory backing image subresources used as attachments in the current render pass must not be written in any way other than as an attachment by this command

- VUID-vkCmdDrawMeshTasksIndirectNV-None-10795
  If a color attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_COLOR_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawMeshTasksIndirectNV-None-10796
  If a depth attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_DEPTH_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawMeshTasksIndirectNV-None-10797
  If a stencil attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_STENCIL_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawMeshTasksIndirectNV-None-12338
  If a color attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_COLOR_BIT on that attachment, the color attachment must not be written to by this command

- VUID-vkCmdDrawMeshTasksIndirectNV-None-12339
  If a depth attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_DEPTH_BIT on that attachment, the depth attachment must not be written to by this command

- VUID-vkCmdDrawMeshTasksIndirectNV-None-12340
  If a stencil attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_STENCIL_BIT on that attachment, the stencil attachment must not be written to by this command

- VUID-vkCmdDrawMeshTasksIndirectNV-None-09003
  If an attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, it must not be accessed in any way other than as an attachment, storage image, or sampled image by this command

- VUID-vkCmdDrawMeshTasksIndirectNV-None-06886
  If the current render pass instance uses a depth/stencil attachment with a read-only layout for the depth aspect, depth writes must be disabled

- VUID-vkCmdDrawMeshTasksIndirectNV-None-06887
  If the current render pass instance uses a depth/stencil attachment with a read-only layout for the stencil aspect, both front and back `writeMask` are not zero, and stencil test is enabled, all stencil ops must be VK_STENCIL_OP_KEEP

- VUID-vkCmdDrawMeshTasksIndirectNV-None-07831
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT dynamic state enabled then vkCmdSetViewport must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectNV-None-07832
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SCISSOR dynamic state enabled then vkCmdSetScissor must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectNV-None-08617
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_WIDTH dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineWidth must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectNV-None-07834
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BIAS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthBiasEnable` is VK_TRUE, then vkCmdSetDepthBias or vkCmdSetDepthBias2EXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectNV-None-07835
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_BLEND_CONSTANTS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and an active color attachment current value of `blendEnable` is VK_TRUE with a blend equations where any VkBlendFactor member is VK_BLEND_FACTOR_CONSTANT_COLOR, VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR, VK_BLEND_FACTOR_CONSTANT_ALPHA, or VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA, then vkCmdSetBlendConstants must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectNV-None-07836
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BOUNDS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthBoundsTestEnable` is VK_TRUE, then vkCmdSetDepthBounds must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectNV-None-07837
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilCompareMask must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectNV-None-07838
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_WRITE_MASK dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilWriteMask must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectNV-None-07839
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_REFERENCE dynamic state enabled, the current value of and `rasterizerDiscardEnable` is VK_FALSE, the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilReference must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectNV-maxMultiviewInstanceIndex-02688
  If the draw is recorded in a render pass instance with multiview enabled, the maximum instance index must be less than or equal to VkPhysicalDeviceMultiviewProperties::`maxMultiviewInstanceIndex`

- VUID-vkCmdDrawMeshTasksIndirectNV-sampleLocationsEnable-02689
  If the bound graphics pipeline was created with VkPipelineSampleLocationsStateCreateInfoEXT::`sampleLocationsEnable` set to VK_TRUE, then the active depth attachment must have been created with the VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit set

- VUID-vkCmdDrawMeshTasksIndirectNV-None-07634
  If the `VK_EXT_sample_locations` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetSampleLocationsEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectNV-None-06666
  If the `VK_EXT_sample_locations` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `sampleLocationsEnable` is VK_TRUE, then vkCmdSetSampleLocationsEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectNV-None-07840
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_CULL_MODE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCullMode must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectNV-None-07841
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRONT_FACE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetFrontFace must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectNV-None-07843
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, vkCmdSetDepthTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectNV-None-07844
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthTestEnable` is VK_TRUE, then vkCmdSetDepthWriteEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectNV-None-07845
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_COMPARE_OP dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthTestEnable` is VK_TRUE, then vkCmdSetDepthCompareOp must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectNV-None-07846
  If the `depthBounds` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthBoundsTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectNV-None-07847
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetStencilTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectNV-None-07848
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_OP dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilOp must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectNV-viewportCount-03417
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, and the state is not inherited, then vkCmdSetViewportWithCount must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectNV-scissorCount-03418
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT dynamic state enabled, and the state is not inherited, then vkCmdSetScissorWithCount must have been called and not subsequently invalidated in the current command buffer prior to this drawing

- VUID-vkCmdDrawMeshTasksIndirectNV-viewportCount-03419
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with both the VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic states enabled, and the state is not inherited, then the `viewportCount` parameter of `vkCmdSetViewportWithCount` must match the `scissorCount` parameter of `vkCmdSetScissorWithCount`

- VUID-vkCmdDrawMeshTasksIndirectNV-viewportCount-04137
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportWScalingStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksIndirectNV-viewportCount-04138
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, the current value of `viewportWScalingEnable` is VK_TRUE, then vkCmdSetViewportWScalingNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectNV-None-08636
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, the current value of `viewportWScalingEnable` is VK_TRUE, then the `viewportCount` parameter in the last call to vkCmdSetViewportWScalingNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksIndirectNV-viewportCount-04139
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportShadingRateImageStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksIndirectNV-shadingRateImage-09233
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_COARSE_SAMPLE_ORDER_NV and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoarseSampleOrderNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectNV-shadingRateImage-09234
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `shadingRateImageEnable` is VK_TRUE, then vkCmdSetViewportShadingRatePaletteNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectNV-None-08637
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `shadingRateImageEnable` is VK_TRUE, then the `viewportCount` parameter in the last call to vkCmdSetViewportShadingRatePaletteNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksIndirectNV-VkPipelineVieportCreateInfo-04141
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled and a VkPipelineViewportSwizzleStateCreateInfoNV structure chained from VkPipelineViewportStateCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportSwizzleStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksIndirectNV-VkPipelineVieportCreateInfo-04142
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled and a VkPipelineViewportExclusiveScissorStateCreateInfoNV structure chained from VkPipelineViewportStateCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportExclusiveScissorStateCreateInfoNV::`exclusiveScissorCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksIndirectNV-None-07878
  If the `exclusiveScissor` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_ENABLE_NV dynamic state enabled, then vkCmdSetExclusiveScissorEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectNV-None-07879
  If the `exclusiveScissor` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_NV dynamic state enabled, and the most recent call to vkCmdSetExclusiveScissorEnableNV in the current command buffer set any element of `pExclusiveScissorEnables` to VK_TRUE, then vkCmdSetExclusiveScissorNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectNV-None-04876
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE dynamic state enabled, then vkCmdSetRasterizerDiscardEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectNV-None-04877
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthBiasEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectNV-logicOp-04878
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LOGIC_OP_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `logicOpEnable` is VK_TRUE, then vkCmdSetLogicOpEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectNV-primitiveFragmentShadingRateWithMultipleViewports-04552
  If the `primitiveFragmentShadingRateWithMultipleViewports` limit is not supported, the bound graphics pipeline was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, and any of the shader stages of the bound graphics pipeline write to the `PrimitiveShadingRateKHR` built-in, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and the `viewportCount` parameter of `vkCmdSetViewportWithCount` must be `1`

- VUID-vkCmdDrawMeshTasksIndirectNV-primitiveFragmentShadingRateWithMultipleViewports-08642
  If the `primitiveFragmentShadingRateWithMultipleViewports` limit is not supported, and any shader object bound to a graphics stage writes to the `PrimitiveShadingRateKHR` built-in, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and the `viewportCount` parameter of `vkCmdSetViewportWithCount` must be `1`

- VUID-vkCmdDrawMeshTasksIndirectNV-blendEnable-04727
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, then for each color attachment, if the corresponding image view’s format features do not contain VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT, then the corresponding current value of `blendEnable` must be VK_FALSE

- VUID-vkCmdDrawMeshTasksIndirectNV-None-08644
  If a shader object is bound to any graphics stage or a graphics pipeline is bound, the current value of `rasterizerDiscardEnable` is VK_FALSE, and none of the following is enabled:

  - the `VK_AMD_mixed_attachment_samples` extension

  - the `VK_NV_framebuffer_mixed_samples` extension

  - the `multisampledRenderToSingleSampled` feature

  then the current value of `rasterizationSamples` must be the same as the current color and/or depth/stencil attachments

- VUID-vkCmdDrawMeshTasksIndirectNV-None-08876
  If a shader object is bound to any graphics stage, the current render pass instance must have been begun with vkCmdBeginRendering

- VUID-vkCmdDrawMeshTasksIndirectNV-imageView-06172
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawMeshTasksIndirectNV-imageView-06173
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawMeshTasksIndirectNV-imageView-06174
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawMeshTasksIndirectNV-imageView-06175
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawMeshTasksIndirectNV-imageView-06176
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawMeshTasksIndirectNV-imageView-06177
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawMeshTasksIndirectNV-viewMask-06178
  If the current render pass instance was begun with vkCmdBeginRendering, the bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::`viewMask` equal to VkRenderingInfo::`viewMask`

- VUID-vkCmdDrawMeshTasksIndirectNV-colorAttachmentCount-06179
  If the `dynamicRenderingUnusedAttachments` feature is not enabled and the current render pass instance was begun with vkCmdBeginRendering, the bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::`colorAttachmentCount` equal to VkRenderingInfo::`colorAttachmentCount`

- VUID-vkCmdDrawMeshTasksIndirectNV-dynamicRenderingUnusedAttachments-08910
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound graphics pipeline

- VUID-vkCmdDrawMeshTasksIndirectNV-dynamicRenderingUnusedAttachments-08912
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` equal to VK_NULL_HANDLE must have the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound pipeline equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectNV-dynamicRenderingUnusedAttachments-08911
  If the `dynamicRenderingUnusedAttachments` feature is enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound graphics pipeline, or the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats`, if it exists, must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectNV-colorAttachmentCount-09362
  If the current render pass instance was begun with vkCmdBeginRendering, with a VkRenderingInfo::`colorAttachmentCount` equal to `1`, there is no shader object bound to any graphics stage, and a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, each element of the VkRenderingInfo::`pColorAttachments` array with a `resolveImageView` not equal to VK_NULL_HANDLE must have been created with an image created with a VkExternalFormatANDROID::`externalFormat` value equal to the VkExternalFormatANDROID::`externalFormat` value used to create the bound graphics pipeline

- VUID-vkCmdDrawMeshTasksIndirectNV-None-09363
  If there is no shader object bound to any graphics stage, the current render pass instance was begun with vkCmdBeginRendering and a VkRenderingInfo::`colorAttachmentCount` equal to `1`, and a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with an image created with a VkExternalFormatANDROID::`externalFormat` value equal to the VkExternalFormatANDROID::`externalFormat` value used to create the bound graphics pipeline

- VUID-vkCmdDrawMeshTasksIndirectNV-None-09364
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetColorBlendEnableEXT must have set the blend enable to VK_FALSE prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectNV-None-09365
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetRasterizationSamplesEXT must have set `rasterizationSamples` to VK_SAMPLE_COUNT_1_BIT prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectNV-None-09368
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetFragmentShadingRateKHR must have set `pFragmentSize->width` to `1` prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectNV-None-09369
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetFragmentShadingRateKHR must have set `pFragmentSize->height` to `1` prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectNV-None-07749
  If the `colorWriteEnable` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorWriteEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectNV-attachmentCount-07750
  If the `colorWriteEnable` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the `attachmentCount` parameter of most recent call to `vkCmdSetColorWriteEnableEXT` in the current command buffer must be greater than or equal to the number of active color attachments

- VUID-vkCmdDrawMeshTasksIndirectNV-None-07751
  If the `VK_EXT_discard_rectangles` extension is enabled, a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT dynamic state enabled and the `pNext` chain of VkGraphicsPipelineCreateInfo included a VkPipelineDiscardRectangleStateCreateInfoEXT structure, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for each discard rectangle in VkPipelineDiscardRectangleStateCreateInfoEXT::`discardRectangleCount`

- VUID-vkCmdDrawMeshTasksIndirectNV-rasterizerDiscardEnable-09236
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT dynamic state enabled and the `pNext` chain of VkGraphicsPipelineCreateInfo did not include a VkPipelineDiscardRectangleStateCreateInfoEXT structure, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for each discard rectangle in VkPhysicalDeviceDiscardRectanglePropertiesEXT::`maxDiscardRectangles`

- VUID-vkCmdDrawMeshTasksIndirectNV-None-07880
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDiscardRectangleEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectNV-None-07881
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_MODE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectNV-dynamicRenderingUnusedAttachments-08913
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->imageView` was VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectNV-dynamicRenderingUnusedAttachments-08914
  If current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawMeshTasksIndirectNV-dynamicRenderingUnusedAttachments-08915
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, and the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->imageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectNV-dynamicRenderingUnusedAttachments-08916
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->imageView` was VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectNV-dynamicRenderingUnusedAttachments-08917
  If current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawMeshTasksIndirectNV-dynamicRenderingUnusedAttachments-08918
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, and the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->imageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectNV-imageView-06183
  If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentShadingRateAttachmentInfoKHR::`imageView` was not VK_NULL_HANDLE, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

- VUID-vkCmdDrawMeshTasksIndirectNV-dynamicRenderingLocalRead-11797
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingLocalRead` feature is enabled, the VK_RENDERING_LOCAL_READ_CONCURRENT_ACCESS_CONTROL_BIT_KHR flag is specified, and an attachment is being used as a feedback loop as specified by VK_RENDERING_ATTACHMENT_INPUT_ATTACHMENT_FEEDBACK_BIT_KHR, VkRenderingAttachmentFlagsInfoKHR::`flags` for that attachment must include VK_RENDERING_ATTACHMENT_INPUT_ATTACHMENT_FEEDBACK_BIT_KHR

- VUID-vkCmdDrawMeshTasksIndirectNV-imageView-06184
  If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentDensityMapAttachmentInfoEXT::`imageView` was not VK_NULL_HANDLE, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT

- VUID-vkCmdDrawMeshTasksIndirectNV-layers-10831
  If the current render pass instance was created with VK_RENDERING_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE or VK_RENDER_PASS_CREATE_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE, and the bound graphics pipeline was created with VK_PIPELINE_CREATE_2_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE, then the current render pass instance must have a `layers` value less than or equal to VkPipelineFragmentDensityMapLayeredCreateInfoVALVE::`maxFragmentDensityMapLayers`

- VUID-vkCmdDrawMeshTasksIndirectNV-colorAttachmentCount-06185
  If the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with a sample count equal to the corresponding element of the `pColorAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline

- VUID-vkCmdDrawMeshTasksIndirectNV-pDepthAttachment-06186
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of the `depthStencilAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawMeshTasksIndirectNV-pStencilAttachment-06187
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of the `depthStencilAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawMeshTasksIndirectNV-multisampledRenderToSingleSampled-07285
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with a sample count equal to the value of `rasterizationSamples` for the bound graphics pipeline

- VUID-vkCmdDrawMeshTasksIndirectNV-multisampledRenderToSingleSampled-07286
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawMeshTasksIndirectNV-multisampledRenderToSingleSampled-07287
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawMeshTasksIndirectNV-pNext-07935
  If this command is called inside a render pass instance started with vkCmdBeginRendering, and the `pNext` chain of VkRenderingInfo includes a VkMultisampledRenderToSingleSampledInfoEXT structure with `multisampledRenderToSingleSampledEnable` equal to VK_TRUE, then the value of `rasterizationSamples` for the bound graphics pipeline must be equal to VkMultisampledRenderToSingleSampledInfoEXT::`rasterizationSamples`

- VUID-vkCmdDrawMeshTasksIndirectNV-renderPass-06198
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline must have been created with a VkGraphicsPipelineCreateInfo::`renderPass` equal to VK_NULL_HANDLE

- VUID-vkCmdDrawMeshTasksIndirectNV-pColorAttachments-08963
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound with a fragment shader that statically writes to a color attachment, the color write mask is not zero, color writes are enabled, and the corresponding element of the VkRenderingInfo::`pColorAttachments->imageView` was not VK_NULL_HANDLE, then the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectNV-pColorAttachments-11539
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound with a fragment shader that statically writes to a color attachment, the color write mask is not zero, color writes are enabled, and the corresponding element of the VkRenderingInfo::`pColorAttachments->resolveImageView` was not VK_NULL_HANDLE, then the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectNV-pDepthAttachment-08964
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound, depth test is enabled, and the VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, then the VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectNV-pDepthAttachment-11540
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound, depth test is enabled, and the VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, then the VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectNV-pStencilAttachment-08965
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound, stencil test is enabled and the VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, then the VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectNV-pStencilAttachment-11860
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound, stencil test is enabled and the VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, then the VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectNV-flags-10582
  If the current render pass instance was begun with a vkCmdBeginRendering call in `commandBuffer`, its VkRenderingInfo::`flags` parameter must not have VK_RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT set unless VK_RENDERING_CONTENTS_INLINE_BIT_KHR is also set

- VUID-vkCmdDrawMeshTasksIndirectNV-primitivesGeneratedQueryWithRasterizerDiscard-06708
  If the `primitivesGeneratedQueryWithRasterizerDiscard` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, rasterization discard must not be enabled

- VUID-vkCmdDrawMeshTasksIndirectNV-primitivesGeneratedQueryWithNonZeroStreams-06709
  If the `primitivesGeneratedQueryWithNonZeroStreams` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, the bound graphics pipeline must not have been created with a non-zero value in `VkPipelineRasterizationStateStreamCreateInfoEXT`::`rasterizationStream`

- VUID-vkCmdDrawMeshTasksIndirectNV-None-07620
  If the `depthClamp` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLAMP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthClampEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectNV-None-07621
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_POLYGON_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetPolygonModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectNV-None-07622
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetRasterizationSamplesEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectNV-None-07623
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetSampleMaskEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectNV-alphaToCoverageEnable-08919
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT dynamic state enabled, and `alphaToCoverageEnable` was VK_TRUE in the last call to vkCmdSetAlphaToCoverageEnableEXT, then the Fragment Output Interface must contain a variable for the alpha `Component` word in `Location` 0 at `Index` 0

- VUID-vkCmdDrawMeshTasksIndirectNV-alphaToCoverageEnable-08920
  If a shader object is bound to any graphics stage, and the most recent call to vkCmdSetAlphaToCoverageEnableEXT in the current command buffer set `alphaToCoverageEnable` to VK_TRUE, then the Fragment Output Interface must contain a variable for the alpha `Component` word in `Location` 0 at `Index` 0

- VUID-vkCmdDrawMeshTasksIndirectNV-None-07624
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAlphaToCoverageEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectNV-None-07625
  If the `alphaToOne` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ALPHA_TO_ONE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAlphaToOneEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectNV-None-07626
  If the `logicOp` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LOGIC_OP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetLogicOpEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectNV-None-07627
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and there are color attachments bound, then vkCmdSetColorBlendEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectNV-None-07629
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and there are color attachments bound, then vkCmdSetColorWriteMaskEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectNV-None-07630
  If the `geometryStreams` feature is enabled, and a shader object is bound to the VK_SHADER_STAGE_GEOMETRY_BIT stage or a graphics pipeline is bound which was created with both a VK_SHADER_STAGE_GEOMETRY_BIT stage and the VK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXT dynamic state enabled, then vkCmdSetRasterizationStreamEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectNV-None-07631
  If the `VK_EXT_conservative_rasterization` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_CONSERVATIVE_RASTERIZATION_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetConservativeRasterizationModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectNV-None-07632
  If the `VK_EXT_conservative_rasterization` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXTRA_PRIMITIVE_OVERESTIMATION_SIZE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `conservativeRasterizationMode` is VK_CONSERVATIVE_RASTERIZATION_MODE_OVERESTIMATE_EXT, then vkCmdSetExtraPrimitiveOverestimationSizeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectNV-conservativePointAndLineRasterization-07499
  If the `VK_EXT_conservative_rasterization` extension is enabled, `conservativePointAndLineRasterization` is not supported, a shader object is bound to any graphics stage or a graphics pipeline is bound, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line or point topology class, then the current value of `conservativeRasterizationMode` must be VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT

- VUID-vkCmdDrawMeshTasksIndirectNV-None-07633
  If the `depthClipEnable` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLIP_ENABLE_EXT dynamic state, then vkCmdSetDepthClipEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectNV-None-07636
  If the `VK_EXT_provoking_vertex` extension is enabled, a shader object is bound to the VK_SHADER_STAGE_VERTEX_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_PROVOKING_VERTEX_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetProvokingVertexModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectNV-None-08666
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineRasterizationModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectNV-None-08669
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineStippleEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectNV-None-07849
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled and a shader object is bound to any graphics stage, or a bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stippledLineEnable` is VK_TRUE, then vkCmdSetLineStipple must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectNV-None-10608
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic state enabled, the effective rasterization input topology is in the line topology class, and the current `lineRasterizationMode` is VK_LINE_RASTERIZATION_MODE_BRESENHAM or VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH, then the current `alphaToCoverageEnable`, `alphaToOneEnable` and `sampleShadingEnable` states must all be VK_FALSE

- VUID-vkCmdDrawMeshTasksIndirectNV-None-07639
  If the `depthClipControl` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLIP_NEGATIVE_ONE_TO_ONE_EXT dynamic state enabled, then vkCmdSetDepthClipNegativeOneToOneEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectNV-None-09650
  If the `depthClampControl` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLAMP_RANGE_EXT dynamic state enabled, and the current value of `depthClampEnable` is VK_TRUE, then vkCmdSetDepthClampRangeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectNV-None-07640
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_ENABLE_NV dynamic state enabled, then vkCmdSetViewportWScalingEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectNV-None-07641
  If the `VK_NV_viewport_swizzle` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic state enabled, then vkCmdSetViewportSwizzleNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectNV-None-07642
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageToColorEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectNV-None-07643
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_LOCATION_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageToColorEnable` is VK_TRUE, then vkCmdSetCoverageToColorLocationNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectNV-None-07644
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_MODE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageModulationModeNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectNV-None-07645
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageModulationMode` is any value other than VK_COVERAGE_MODULATION_MODE_NONE_NV, then vkCmdSetCoverageModulationTableEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectNV-None-07646
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageModulationTableEnable` is VK_TRUE, then vkCmdSetCoverageModulationTableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectNV-None-07647
  If the `shadingRateImage` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SHADING_RATE_IMAGE_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetShadingRateImageEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectNV-pipelineFragmentShadingRate-09238
  If the `pipelineFragmentShadingRate` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetFragmentShadingRateKHR must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectNV-None-07648
  If the `representativeFragmentTest` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_REPRESENTATIVE_FRAGMENT_TEST_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetRepresentativeFragmentTestEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectNV-None-07649
  If the `coverageReductionMode` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageReductionModeNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectNV-rasterizationSamples-07471
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current subpass does not use any color and/or depth/stencil attachments, then the `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT must follow the rules for a zero-attachment subpass

- VUID-vkCmdDrawMeshTasksIndirectNV-samples-07472
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state disabled, then the `samples` parameter in the last call to vkCmdSetSampleMaskEXT must be greater or equal to the VkPipelineMultisampleStateCreateInfo::`rasterizationSamples` parameter used to create the bound graphics pipeline

- VUID-vkCmdDrawMeshTasksIndirectNV-samples-07473
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT state and VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT states enabled, then the `samples` parameter in the last call to vkCmdSetSampleMaskEXT must be greater or equal to the `rasterizationSamples` parameter in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawMeshTasksIndirectNV-None-09211
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, or a shader object is bound to any graphics stage, and the current render pass instance includes a VkMultisampledRenderToSingleSampledInfoEXT structure with `multisampledRenderToSingleSampledEnable` equal to VK_TRUE, then the `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT must be the same as the `rasterizationSamples` member of that structure

- VUID-vkCmdDrawMeshTasksIndirectNV-firstAttachment-07476
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic states enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the last call to vkCmdSetColorBlendEnableEXT in the current command buffer prior to this drawing command must have set a value for all active color attachments

- VUID-vkCmdDrawMeshTasksIndirectNV-firstAttachment-07478
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT dynamic states enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the last call to vkCmdSetColorWriteMaskEXT in the current command buffer prior to this drawing command must have set a value for all active color attachments

- VUID-vkCmdDrawMeshTasksIndirectNV-advancedBlendMaxColorAttachments-07480
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT and VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic states enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and an active color attachment current value of `blendEnable` is VK_TRUE, then the number of active color attachments must not exceed `advancedBlendMaxColorAttachments`

- VUID-vkCmdDrawMeshTasksIndirectNV-None-10862
  If a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT , but not the VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorBlendEquationEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawMeshTasksIndirectNV-rasterizerDiscardEnable-10863
  If a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT, but not the VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorBlendAdvancedEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawMeshTasksIndirectNV-None-10864
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT and VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then either vkCmdSetColorBlendAdvancedEXT or vkCmdSetColorBlendEquationEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawMeshTasksIndirectNV-primitivesGeneratedQueryWithNonZeroStreams-07481
  If the `primitivesGeneratedQueryWithNonZeroStreams` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, and the bound graphics pipeline was created with VK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXT state enabled, the last call to vkCmdSetRasterizationStreamEXT must have set the `rasterizationStream` to zero

- VUID-vkCmdDrawMeshTasksIndirectNV-sampleLocationsPerPixel-07482
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state disabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then the `sampleLocationsPerPixel` member of `pSampleLocationsInfo` in the last call to vkCmdSetSampleLocationsEXT must equal the `rasterizationSamples` member of the VkPipelineMultisampleStateCreateInfo structure the bound graphics pipeline has been created with

- VUID-vkCmdDrawMeshTasksIndirectNV-sampleLocationsPerPixel-07483
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then the `sampleLocationsPerPixel` member of `pSampleLocationsInfo` in the last call to vkCmdSetSampleLocationsEXT must equal the `rasterizationSamples` parameter of the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawMeshTasksIndirectNV-sampleLocationsEnable-07484
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT then the current active depth attachment must have been created with the VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit set

- VUID-vkCmdDrawMeshTasksIndirectNV-sampleLocationsEnable-07485
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, then the `sampleLocationsInfo.maxSampleLocationGridSize.width` in the last call to vkCmdSetSampleLocationsEXT must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.width` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling `rasterizationSamples`

- VUID-vkCmdDrawMeshTasksIndirectNV-sampleLocationsEnable-07486
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, then the `sampleLocationsInfo.maxSampleLocationGridSize.height` in the last call to vkCmdSetSampleLocationsEXT must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.height` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling `rasterizationSamples`

- VUID-vkCmdDrawMeshTasksIndirectNV-sampleLocationsEnable-07487
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, the fragment shader code must not statically use the extended instruction `InterpolateAtSample`

- VUID-vkCmdDrawMeshTasksIndirectNV-sampleLocationsEnable-07936
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationGridSize.width` must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.width` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling the value of `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawMeshTasksIndirectNV-sampleLocationsEnable-07937
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationGridSize.height` must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.height` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling the value of `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawMeshTasksIndirectNV-sampleLocationsEnable-07938
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationsPerPixel` must equal `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawMeshTasksIndirectNV-coverageModulationTableEnable-07488
  If a shader object is bound to any graphics stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NV state enabled, and the last call to vkCmdSetCoverageModulationTableEnableNV set `coverageModulationTableEnable` to VK_TRUE, then the `coverageModulationTableCount` parameter in the last call to vkCmdSetCoverageModulationTableNV must equal the current `rasterizationSamples` divided by the number of color samples in the current active color attachment

- VUID-vkCmdDrawMeshTasksIndirectNV-rasterizationSamples-07489
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, and if current subpass has a depth/stencil attachment and depth test, stencil test, or depth bounds test are enabled in the bound pipeline, then the current `rasterizationSamples` must be the same as the sample count of the depth/stencil attachment

- VUID-vkCmdDrawMeshTasksIndirectNV-coverageToColorEnable-07490
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV state enabled and the last call to vkCmdSetCoverageToColorEnableNV set the `coverageToColorEnable` to VK_TRUE, then there must be an active color attachment at the location selected by the last call to vkCmdSetCoverageToColorLocationNV `coverageToColorLocation`, with a VkFormat of VK_FORMAT_R8_UINT, VK_FORMAT_R8_SINT, VK_FORMAT_R16_UINT, VK_FORMAT_R16_SINT, VK_FORMAT_R32_UINT, or VK_FORMAT_R32_SINT

- VUID-vkCmdDrawMeshTasksIndirectNV-rasterizerDiscardEnable-09420
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, and a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, and the most recent call to vkCmdSetRasterizerDiscardEnable in the current command buffer set `rasterizerDiscardEnable` to VK_FALSE, and the last call to vkCmdSetCoverageToColorEnableNV set the `coverageToColorEnable` to VK_TRUE, then there must be an active color attachment at the location selected by the last call to vkCmdSetCoverageToColorLocationNV `coverageToColorLocation`, with a VkFormat of VK_FORMAT_R8_UINT, VK_FORMAT_R8_SINT, VK_FORMAT_R16_UINT, VK_FORMAT_R16_SINT, VK_FORMAT_R32_UINT, or VK_FORMAT_R32_SINT

- VUID-vkCmdDrawMeshTasksIndirectNV-coverageReductionMode-07491
  If the `coverageReductionMode` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV or VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic states enabled, then the current values of `coverageReductionMode`, `rasterizationSamples`, the sample counts for the color and depth/stencil attachments (if the subpass has them) must be a valid combination returned by vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV

- VUID-vkCmdDrawMeshTasksIndirectNV-viewportCount-07492
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportSwizzleStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksIndirectNV-viewportCount-07493
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic states enabled then the `viewportCount` parameter in the last call to vkCmdSetViewportSwizzleNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksIndirectNV-viewportCount-09421
  If the `VK_NV_viewport_swizzle` extension is enabled, and a shader object is bound to any graphics stage, then the `viewportCount` parameter in the last call to vkCmdSetViewportSwizzleNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksIndirectNV-rasterizationSamples-07494
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, and the `coverageReductionMode` feature is not enabled, or the current value of `coverageReductionMode` is not VK_COVERAGE_REDUCTION_MODE_TRUNCATE_NV, and the current value of `rasterizationSamples` is greater than sample count of the color attachment, then sample shading must be disabled

- VUID-vkCmdDrawMeshTasksIndirectNV-stippledLineEnable-07495
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_RECTANGULAR, then the `stippledRectangularLines` feature must be enabled

- VUID-vkCmdDrawMeshTasksIndirectNV-stippledLineEnable-07496
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_BRESENHAM, then the `stippledBresenhamLines` feature must be enabled

- VUID-vkCmdDrawMeshTasksIndirectNV-stippledLineEnable-07497
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH, then the `stippledSmoothLines` feature must be enabled

- VUID-vkCmdDrawMeshTasksIndirectNV-stippledLineEnable-07498
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_DEFAULT, then the `stippledRectangularLines` feature must be enabled and VkPhysicalDeviceLimits::`strictLines` must be VK_TRUE

- VUID-vkCmdDrawMeshTasksIndirectNV-stage-07073
  If the bound pipeline was created with the VkPipelineShaderStageCreateInfo::`stage` member of an element of VkGraphicsPipelineCreateInfo::`pStages` set to VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT, then Mesh Shader Queries must not be active

- VUID-vkCmdDrawMeshTasksIndirectNV-None-08877
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ATTACHMENT_FEEDBACK_LOOP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAttachmentFeedbackLoopEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectNV-None-07850
  If dynamic state was inherited from VkCommandBufferInheritanceViewportScissorInfoNV, it must be set in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectNV-nextStage-10745
  For each shader object bound to a graphics stage, except for shader object bound to the last graphics stage in the logical pipeline, it must have been created with a `nextStage` including the corresponding bit to the shader object bound to the following graphics stage in the logical pipeline

- VUID-vkCmdDrawMeshTasksIndirectNV-None-08684
  If there is no bound graphics pipeline, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_VERTEX_BIT

- VUID-vkCmdDrawMeshTasksIndirectNV-None-08685
  If there is no bound graphics pipeline, and the `tessellationShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT

- VUID-vkCmdDrawMeshTasksIndirectNV-None-08686
  If there is no bound graphics pipeline, and the `tessellationShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT

- VUID-vkCmdDrawMeshTasksIndirectNV-None-08687
  If there is no bound graphics pipeline, and the `geometryShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_GEOMETRY_BIT

- VUID-vkCmdDrawMeshTasksIndirectNV-None-08688
  If there is no bound graphics pipeline, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_FRAGMENT_BIT

- VUID-vkCmdDrawMeshTasksIndirectNV-None-08689
  If there is no bound graphics pipeline, and the `taskShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TASK_BIT_EXT

- VUID-vkCmdDrawMeshTasksIndirectNV-None-08690
  If there is no bound graphics pipeline, and the `meshShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-vkCmdDrawMeshTasksIndirectNV-None-08693
  If there is no bound graphics pipeline, and at least one of the `taskShader` and `meshShader` features is enabled, one of the VK_SHADER_STAGE_VERTEX_BIT or VK_SHADER_STAGE_MESH_BIT_EXT stages must have a valid `VkShaderEXT` bound, and the other must have no `VkShaderEXT` bound

- VUID-vkCmdDrawMeshTasksIndirectNV-None-08696
  If there is no bound graphics pipeline, and a valid `VkShaderEXT` is bound to the VK_SHADER_STAGE_VERTEX_BIT stage, there must be no `VkShaderEXT` bound to either the VK_SHADER_STAGE_TASK_BIT_EXT stage or the VK_SHADER_STAGE_MESH_BIT_EXT stage

- VUID-vkCmdDrawMeshTasksIndirectNV-None-08698
  If any graphics shader is bound which was created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag, then all shaders created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag in the same vkCreateShadersEXT call must also be bound

- VUID-vkCmdDrawMeshTasksIndirectNV-None-08699
  If any graphics shader is bound which was created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag, any stages in between stages whose shaders which did not create a shader with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag as part of the same vkCreateShadersEXT call must not have any `VkShaderEXT` bound

- VUID-vkCmdDrawMeshTasksIndirectNV-None-08878
  All bound graphics shader objects must have been created with identical or identically defined push constant ranges

- VUID-vkCmdDrawMeshTasksIndirectNV-None-08879
  All bound graphics shader objects must have either been created with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag set, or with identical or identically defined arrays of descriptor set layouts

- VUID-vkCmdDrawMeshTasksIndirectNV-colorAttachmentCount-09372
  If the current render pass instance was begun with vkCmdBeginRendering and a VkRenderingInfo::`colorAttachmentCount` equal to `1`, a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, and a fragment shader is bound, it must not declare the `DepthReplacing` or `StencilRefReplacingEXT` execution modes

- VUID-vkCmdDrawMeshTasksIndirectNV-pDynamicStates-08715
  If the bound graphics pipeline state includes a fragment shader stage, was created with VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`, and the fragment shader declares the `EarlyFragmentTests` execution mode and uses `OpDepthAttachmentReadEXT`, the `depthWriteEnable` parameter in the last call to vkCmdSetDepthWriteEnable must be VK_FALSE

- VUID-vkCmdDrawMeshTasksIndirectNV-pDynamicStates-08716
  If the bound graphics pipeline state includes a fragment shader stage, was created with VK_DYNAMIC_STATE_STENCIL_WRITE_MASK set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`, and the fragment shader declares the `EarlyFragmentTests` execution mode and uses `OpStencilAttachmentReadEXT`, the `writeMask` parameter in the last call to vkCmdSetStencilWriteMask must be `0`

- VUID-vkCmdDrawMeshTasksIndirectNV-None-09116
  If a shader object is bound to any graphics stage or the bound graphics pipeline was created with VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT, and the format of any color attachment is VK_FORMAT_E5B9G9R9_UFLOAT_PACK32, the corresponding element of the `pColorWriteMasks` parameter of vkCmdSetColorWriteMaskEXT must either include all of VK_COLOR_COMPONENT_R_BIT, VK_COLOR_COMPONENT_G_BIT, VK_COLOR_COMPONENT_B_BIT, and VK_COLOR_COMPONENT_A_BIT, or none of them

- VUID-vkCmdDrawMeshTasksIndirectNV-maxFragmentDualSrcAttachments-09239
  If blending is enabled for any attachment where either the source or destination blend factors for that attachment use the secondary color input, the maximum value of `Location` for any output attachment statically used in the `Fragment` `Execution` `Model` executed by this command must be less than `maxFragmentDualSrcAttachments`

- VUID-vkCmdDrawMeshTasksIndirectNV-None-09548
  If the current render pass was begun with vkCmdBeginRendering, there is no shader object bound to any graphics stage, the value of each element of VkRenderingAttachmentLocationInfo::`pColorAttachmentLocations` in the bound pipeline must match the value for the corresponding locations set currently in the current render pass instance

- VUID-vkCmdDrawMeshTasksIndirectNV-None-09549
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of each element of VkRenderingInputAttachmentIndexInfo::`pColorAttachmentInputIndices` in the bound pipeline must match the value for the corresponding index set currently in the current render pass instance

- VUID-vkCmdDrawMeshTasksIndirectNV-None-10927
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` in the bound pipeline must match the value set currently in the current render pass instance

- VUID-vkCmdDrawMeshTasksIndirectNV-None-10928
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` in the bound pipeline must match the value set currently in the current render pass instance

- VUID-vkCmdDrawMeshTasksIndirectNV-None-09642
  If the current render pass was begun with vkCmdBeginRendering with the VK_RENDERING_ENABLE_LEGACY_DITHERING_BIT_EXT flag, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_2_ENABLE_LEGACY_DITHERING_BIT_EXT

- VUID-vkCmdDrawMeshTasksIndirectNV-None-09643
  If the bound graphics pipeline was created with VK_PIPELINE_CREATE_2_ENABLE_LEGACY_DITHERING_BIT_EXT, the current render pass must have begun with vkCmdBeginRendering with the VK_RENDERING_ENABLE_LEGACY_DITHERING_BIT_EXT flag

- VUID-vkCmdDrawMeshTasksIndirectNV-None-10677
  If the per-tile execution model is enabled, the tileShadingPerTileDraw feature must be enabled

- VUID-vkCmdDrawMeshTasksIndirectNV-None-10772
  If a shader object is bound to any graphics stage, multiview functionality must not be enabled in the current render pass

- VUID-vkCmdDrawMeshTasksIndirectNV-multiviewPerViewViewports-12262
  If the `multiviewPerViewViewports` feature is enabled, then the index of the most significant bit in current render pass instance `viewMask` must be less than the current value of `viewportCount`

- VUID-vkCmdDrawMeshTasksIndirectNV-multiviewPerViewViewports-12263
  If the `multiviewPerViewViewports` feature is enabled, then the index of the most significant bit in current render pass instance `viewMask` must be less than the current value of `scissorCount`

- VUID-vkCmdDrawMeshTasksIndirectNV-flags-11521
  If current render pass instance was begun with vkCmdBeginRendering with VkRenderingInfo::`flags` which includes VK_RENDERING_FRAGMENT_REGION_BIT_EXT, and if sample shading is enabled (explicitly or implicitly), then the minimum fraction for sample shading must equal 0.0

- VUID-vkCmdDrawMeshTasksIndirectNV-None-11522
  If the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, and the `dynamicRenderingUnusedAttachments` feature is not enabled, the graphics pipeline bound must have been created with a VkCustomResolveCreateInfoEXT

- VUID-vkCmdDrawMeshTasksIndirectNV-None-11523
  If the current render pass instance was begun with vkCmdBeginRendering and does not contain a custom resolve, and the `dynamicRenderingUnusedAttachments` feature is not enabled, the graphics pipeline bound must not have been created with a VkCustomResolveCreateInfoEXT

- VUID-vkCmdDrawMeshTasksIndirectNV-customResolve-11524
  If the current render pass instance was begun with vkCmdBeginRendering and vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, the graphics pipeline bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_TRUE

- VUID-vkCmdDrawMeshTasksIndirectNV-customResolve-11525
  If the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, and vkCmdBeginCustomResolveEXT has not been recorded in the render pass instance, the graphics pipeline bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_FALSE

- VUID-vkCmdDrawMeshTasksIndirectNV-None-11861
  If the `dynamicRenderingUnusedAttachments` feature is not enabled and the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, the bound graphics pipeline must have been created with a VkCustomResolveCreateInfoEXT::`colorAttachmentCount` equal to VkRenderingInfo::`colorAttachmentCount`

- VUID-vkCmdDrawMeshTasksIndirectNV-None-11862
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound graphics pipeline

- VUID-vkCmdDrawMeshTasksIndirectNV-None-11863
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` equal to VK_NULL_HANDLE must have the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound pipeline equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectNV-dynamicRenderingUnusedAttachments-11864
  If the `dynamicRenderingUnusedAttachments` feature is enabled, the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound graphics pipeline, or the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats`, if it exists, must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectNV-None-11865
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectNV-None-11866
  If current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`

- VUID-vkCmdDrawMeshTasksIndirectNV-dynamicRenderingUnusedAttachments-11867
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, and the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectNV-None-11868
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->resolveImageView` was VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectNV-None-11869
  If current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`

- VUID-vkCmdDrawMeshTasksIndirectNV-dynamicRenderingUnusedAttachments-11870
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, and the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectNV-colorAttachmentCount-11871
  If the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0` and vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, then for each element of the VkRenderingInfo::`pColorAttachments` array with a `resolveImageView` not equal to VK_NULL_HANDLE, the `resolveImageView` must have been created with a sample count equal to the value of `rasterizationSamples` for the bound graphics pipeline

- VUID-vkCmdDrawMeshTasksIndirectNV-pDepthAttachment-11872
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`

- VUID-vkCmdDrawMeshTasksIndirectNV-pStencilAttachment-11873
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`

- VUID-vkCmdDrawMeshTasksIndirectNV-customResolve-11529
  If a shader object is bound to the fragment stage, the current render pass instance was begun with vkCmdBeginRendering, a fragment density map attachment is active, and vkCmdBeginCustomResolveEXT has been called, then the fragment shader object bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_TRUE

- VUID-vkCmdDrawMeshTasksIndirectNV-customResolve-11530
  If a shader object is bound to the fragment stage, the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, a fragment density map attachment is active, and vkCmdBeginCustomResolveEXT has not yet been called, then the fragment shader object bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_FALSE

- VUID-vkCmdDrawMeshTasksIndirectNV-flags-13361
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, then all bound shader objects must have been created with the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit

- VUID-vkCmdDrawMeshTasksIndirectNV-flags-13362
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, then the pipeline layout of the bound descriptor sets must have been created with VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT set

- VUID-vkCmdDrawMeshTasksIndirectNV-flags-13363
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, and any of the descriptor set layouts used to create the pipeline layout of the bound descriptor sets were created with any binding’s VkDescriptorSetLayoutBinding::`stageFlags` set with VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT, then there must be no binding with VkDescriptorSetLayoutBinding::`stageFlags` set with VK_SHADER_STAGE_TASK_BIT_EXT or VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-vkCmdDrawMeshTasksIndirectNV-flags-13364
  If there are any shader objects bound that were created with `flags` that includes both the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR and VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT bits, the pipeline layout of the bound descriptor sets must have been created with VK_PIPELINE_LAYOUT_CREATE_NO_TASK_SHADER_BIT_KHR set

- VUID-vkCmdDrawMeshTasksIndirectNV-flags-13365
  If there are any shader objects bound that were created with `flags` that includes both the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR and VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT bits, there must be no shader object bound to the VK_SHADER_STAGE_TASK_BIT_EXT stage

- VUID-vkCmdDrawMeshTasksIndirectNV-stage-06480
  The bound graphics pipeline must not have been created with the VkPipelineShaderStageCreateInfo::`stage` member of any element of VkGraphicsPipelineCreateInfo::`pStages` set to VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT

- VUID-vkCmdDrawMeshTasksIndirectNV-pStages-10680
  If there is no bound graphics pipeline, `vkCmdBindShadersEXT` must not have last bound the `pStages` element of VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT with a valid shader object other than VK_NULL_HANDLE

- VUID-vkCmdDrawMeshTasksIndirectNV-None-07074
  Transform Feedback Queries must not be active

- VUID-vkCmdDrawMeshTasksIndirectNV-None-07075
  Primitives Generated Queries must not be active

- VUID-vkCmdDrawMeshTasksIndirectNV-pipelineStatistics-07076
  The `pipelineStatistics` member used to create any active Pipeline Statistics Query must not contain VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT, VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT, VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT, VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT, VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT, VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT, VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT, VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT, or VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT

- VUID-vkCmdDrawMeshTasksIndirectNV-None-08694
  If there is no bound graphics pipeline, and both the `taskShader` and `meshShader` features are enabled, and a valid `VkShaderEXT` is bound the to the VK_SHADER_STAGE_MESH_BIT_EXT stage, and that `VkShaderEXT` was created without the VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT flag, a valid `VkShaderEXT` must be bound to the VK_SHADER_STAGE_TASK_BIT_EXT stage

- VUID-vkCmdDrawMeshTasksIndirectNV-None-08695
  If there is no bound graphics pipeline, and both the `taskShader` and `meshShader` features are enabled, and a valid `VkShaderEXT` is bound the to the VK_SHADER_STAGE_MESH_BIT_EXT stage, and that `VkShaderEXT` was created with the VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT flag, there must be no `VkShaderEXT` bound to the VK_SHADER_STAGE_TASK_BIT_EXT stage

- VUID-vkCmdDrawMeshTasksIndirectNV-buffer-02708
  If `buffer` is non-sparse then it must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-vkCmdDrawMeshTasksIndirectNV-buffer-02709
  `buffer` must have been created with the VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT usage flag set

- VUID-vkCmdDrawMeshTasksIndirectNV-offset-02710
  `offset` must be a multiple of `4`

- VUID-vkCmdDrawMeshTasksIndirectNV-commandBuffer-02711
  `commandBuffer` must not be a protected command buffer

- VUID-vkCmdDrawMeshTasksIndirectNV-drawCount-02718
  If the `multiDrawIndirect` feature is not enabled, `drawCount` must be `0` or `1`

- VUID-vkCmdDrawMeshTasksIndirectNV-drawCount-02719
  `drawCount` must be less than or equal to `VkPhysicalDeviceLimits`::`maxDrawIndirectCount`

- VUID-vkCmdDrawMeshTasksIndirectNV-drawCount-02146
  If `drawCount` is greater than `1`, `stride` must be a multiple of `4` and must be greater than or equal to `sizeof`(`VkDrawMeshTasksIndirectCommandNV`)

- VUID-vkCmdDrawMeshTasksIndirectNV-drawCount-02156
  If `drawCount` is equal to `1`, (`offset` + `sizeof`(VkDrawMeshTasksIndirectCommandNV)) must be less than or equal to the size of `buffer`

- VUID-vkCmdDrawMeshTasksIndirectNV-drawCount-02157
  If `drawCount` is greater than `1`, (`stride` × (`drawCount` - 1) + `offset` + `sizeof`(VkDrawMeshTasksIndirectCommandNV)) must be less than or equal to the size of `buffer`

- VUID-vkCmdDrawMeshTasksIndirectNV-MeshNV-07081
  The current pipeline bound to VK_PIPELINE_BIND_POINT_GRAPHICS must contain a shader stage using the `MeshNV` `Execution` `Model`

Valid Usage (Implicit)

- VUID-vkCmdDrawMeshTasksIndirectNV-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdDrawMeshTasksIndirectNV-buffer-parameter
  `buffer` must be a valid VkBuffer handle

- VUID-vkCmdDrawMeshTasksIndirectNV-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdDrawMeshTasksIndirectNV-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdDrawMeshTasksIndirectNV-renderpass
  This command must only be called inside of a render pass instance

- VUID-vkCmdDrawMeshTasksIndirectNV-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdDrawMeshTasksIndirectNV-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdDrawMeshTasksIndirectNV-commonparent
  Both of `buffer`, and `commandBuffer` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Inside | Outside | VK_QUEUE_GRAPHICS_BIT | Action

Conditional Rendering

vkCmdDrawMeshTasksIndirectNV is affected by conditional rendering

The `VkDrawMeshTasksIndirectCommandNV` structure is defined as:

    // Provided by VK_NV_mesh_shader
    typedef struct VkDrawMeshTasksIndirectCommandNV {
        uint32_t    taskCount;
        uint32_t    firstTask;
    } VkDrawMeshTasksIndirectCommandNV;

- `taskCount` is the number of local workgroups to dispatch in the X dimension. Y and Z dimension are implicitly set to one.

- `firstTask` is the X component of the first workgroup ID.

The members of `VkDrawMeshTasksIndirectCommandNV` have the same meaning as the similarly named parameters of vkCmdDrawMeshTasksNV.

Valid Usage

- VUID-VkDrawMeshTasksIndirectCommandNV-taskCount-02175
  `taskCount` must be less than or equal to `VkPhysicalDeviceMeshShaderPropertiesNV`::`maxDrawMeshTasksCount`

To record an indirect mesh tasks drawing command with the draw count sourced from a buffer, call:

    // Provided by VK_NV_mesh_shader with VK_VERSION_1_2 or VK_KHR_draw_indirect_count or VK_AMD_draw_indirect_count
    void vkCmdDrawMeshTasksIndirectCountNV(
        VkCommandBuffer                             commandBuffer,
        VkBuffer                                    buffer,
        VkDeviceSize                                offset,
        VkBuffer                                    countBuffer,
        VkDeviceSize                                countBufferOffset,
        uint32_t                                    maxDrawCount,
        uint32_t                                    stride);

- `commandBuffer` is the command buffer into which the command is recorded.

- `buffer` is the buffer containing draw parameters.

- `offset` is the byte offset into `buffer` where parameters begin.

- `countBuffer` is the buffer containing the draw count.

- `countBufferOffset` is the byte offset into `countBuffer` where the draw count begins.

- `maxDrawCount` specifies the maximum number of draws that will be executed. The actual number of executed draw calls is the minimum of the count specified in `countBuffer` and `maxDrawCount`.

- `stride` is the byte stride between successive sets of draw parameters.

`vkCmdDrawMeshTasksIndirectCountNV` behaves similarly to vkCmdDrawMeshTasksIndirectNV except that the draw count is read by the device from a buffer during execution. The command will read an unsigned 32-bit integer from `countBuffer` located at `countBufferOffset` and use this as the draw count.

Valid Usage

- VUID-vkCmdDrawMeshTasksIndirectCountNV-magFilter-04553
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdDrawMeshTasksIndirectCountNV-magFilter-09598
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdDrawMeshTasksIndirectCountNV-mipmapMode-04770
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdDrawMeshTasksIndirectCountNV-mipmapMode-09599
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdDrawMeshTasksIndirectCountNV-unnormalizedCoordinates-09635
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `levelCount` and `layerCount` must be 1

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-08609
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `viewType` must be VK_IMAGE_VIEW_TYPE_1D or VK_IMAGE_VIEW_TYPE_2D

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-08610
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions with `ImplicitLod`, `Dref` or `Proj` in their name

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-08611
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions that includes a LOD bias or any offset values

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-06479
  If a VkImageView is sampled with depth comparison, the image view’s format features must contain VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-02691
  If a VkImageView is accessed using atomic operations as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-07888
  If a VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER descriptor is accessed using atomic operations as a result of this command, then the storage texel buffer’s format features must contain VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-02692
  If a VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-02693
  If the VK_EXT_filter_cubic extension is not enabled and any VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, it must not have a VkImageViewType of VK_IMAGE_VIEW_TYPE_3D, VK_IMAGE_VIEW_TYPE_CUBE, or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY

- VUID-vkCmdDrawMeshTasksIndirectCountNV-filterCubic-02694
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have a VkImageViewType and format that supports cubic filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubic` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdDrawMeshTasksIndirectCountNV-filterCubicMinmax-02695
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX as a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubicMinmax` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdDrawMeshTasksIndirectCountNV-cubicRangeClamp-09212
  If the `cubicRangeClamp` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must not have a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM

- VUID-vkCmdDrawMeshTasksIndirectCountNV-reductionMode-09213
  Any VkImageView being sampled with a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM as a result of this command must sample with VK_FILTER_CUBIC_EXT

- VUID-vkCmdDrawMeshTasksIndirectCountNV-selectableCubicWeights-09214
  If the `selectableCubicWeights` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have VkSamplerCubicWeightsCreateInfoQCOM::`cubicWeights` equal to VK_CUBIC_FILTER_WEIGHTS_CATMULL_ROM_QCOM

- VUID-vkCmdDrawMeshTasksIndirectCountNV-flags-02696
  Any VkImage created with a VkImageCreateInfo::`flags` containing VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV sampled as a result of this command must only be sampled using a VkSamplerAddressMode of VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawMeshTasksIndirectCountNV-OpTypeImage-07027
  For any VkImageView being written as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawMeshTasksIndirectCountNV-OpTypeImage-07028
  For any VkImageView being read as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawMeshTasksIndirectCountNV-OpTypeImage-07029
  For any VkBufferView being written as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown`, the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawMeshTasksIndirectCountNV-OpTypeImage-07030
  Any VkBufferView being read as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown` then the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-08600
  If a a bound shader was created with a pipeline layout and statically uses a set n, a descriptor set must have been bound to n at the same pipeline bind point, with layouts compatible for set n with the layout(s) used to create the shader, as described in Pipeline Layout Compatibility

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-08601
  If a a bound shader was created with a pipeline layout or specified push constant ranges and statically uses a push constant value, that value must have been set for the same pipeline bind point, with push constant ranges that are compatible with the push constant range used to create the shader

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-10068
  For each array of resources that is used by a bound shader, the indices used to access members of the array must be less than the descriptor count for the identified binding in the descriptor sets used by this command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-08114
  Descriptors in each bound descriptor set, specified via vkCmdBindDescriptorSets, must be valid if they are accessed as described by descriptor validity by the VkPipeline bound to the pipeline bind point used by this command and the bound VkPipeline was not created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawMeshTasksIndirectCountNV-imageLayout-00344
  If an image descriptor is accessed by a shader, the VkImageLayout must match the subresource accessible from the VkImageView as defined by the image layout matching rules

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-08115
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdBindDescriptorSets, the bound VkPipeline must have been created without VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-08116
  Descriptors in bound descriptor buffers, specified via vkCmdSetDescriptorBufferOffsetsEXT, must be valid if they are dynamically accessed

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-08117
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdSetDescriptorBufferOffsetsEXT, the bound VkPipeline must have been created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-08119
  If a descriptor is dynamically used with a VkPipeline created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-08605
  If a descriptor is dynamically used with a VkShaderEXT created with a `VkDescriptorSetLayout` that was created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-08606
  If the `shaderObject` feature is not enabled, a valid pipeline must be bound to the pipeline bind point used by this command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-08608
  If a pipeline is bound to the pipeline bind point used by this command, there must not have been any calls to dynamic state setting commands for any state specified statically in the VkPipeline object bound to the pipeline bind point used by this command, since that pipeline was bound

- VUID-vkCmdDrawMeshTasksIndirectCountNV-uniformBuffers-06935
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-08612
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawMeshTasksIndirectCountNV-storageBuffers-06936
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-08613
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a storage buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawMeshTasksIndirectCountNV-commandBuffer-02707
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, any resource accessed by bound shaders must not be a protected resource

- VUID-vkCmdDrawMeshTasksIndirectCountNV-viewType-07752
  If a VkImageView is accessed as a result of this command, then the image view’s `viewType` must match the `Dim` operand of the `OpTypeImage` as described in Compatibility Between SPIR-V Image Dimensions and Vulkan ImageView Types

- VUID-vkCmdDrawMeshTasksIndirectCountNV-format-07753
  If a VkImageView or VkBufferView is accessed as a result of this command, then the numeric type of the view’s `format` and the `Sampled` `Type` operand of the `OpTypeImage` must match

- VUID-vkCmdDrawMeshTasksIndirectCountNV-OpImageWrite-08795
  If a VkImageView created with a format other than VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the image view’s format

- VUID-vkCmdDrawMeshTasksIndirectCountNV-OpImageWrite-08796
  If a VkImageView created with the format VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have four components

- VUID-vkCmdDrawMeshTasksIndirectCountNV-OpImageWrite-04469
  If a VkBufferView is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the buffer view’s format

- VUID-vkCmdDrawMeshTasksIndirectCountNV-SampledType-04470
  If a VkImageView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdDrawMeshTasksIndirectCountNV-SampledType-04471
  If a VkImageView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdDrawMeshTasksIndirectCountNV-SampledType-04472
  If a VkBufferView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdDrawMeshTasksIndirectCountNV-SampledType-04473
  If a VkBufferView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdDrawMeshTasksIndirectCountNV-sparseImageInt64Atomics-04474
  If the `sparseImageInt64Atomics` feature is not enabled, VkImage objects created with the VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-sparseImageInt64Atomics-04475
  If the `sparseImageInt64Atomics` feature is not enabled, VkBuffer objects created with the VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-OpImageSampleWeightedQCOM-06971
  If `OpImageSampleWeightedQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_SAMPLED_IMAGE_BIT_QCOM

- VUID-vkCmdDrawMeshTasksIndirectCountNV-OpImageSampleWeightedQCOM-06972
  If `OpImageSampleWeightedQCOM` uses a VkImageView as a sample weight image as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_IMAGE_BIT_QCOM

- VUID-vkCmdDrawMeshTasksIndirectCountNV-OpImageBoxFilterQCOM-06973
  If `OpImageBoxFilterQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BOX_FILTER_SAMPLED_BIT_QCOM

- VUID-vkCmdDrawMeshTasksIndirectCountNV-OpImageBlockMatchSSDQCOM-06974
  If `OpImageBlockMatchSSDQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdDrawMeshTasksIndirectCountNV-OpImageBlockMatchSADQCOM-12420
  If `OpImageBlockMatchSADQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdDrawMeshTasksIndirectCountNV-OpImageBlockMatchSADQCOM-06976
  If `OpImageBlockMatchSADQCOM` or OpImageBlockMatchSSDQCOM is used to read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdDrawMeshTasksIndirectCountNV-OpImageSampleWeightedQCOM-06977
  If `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdDrawMeshTasksIndirectCountNV-OpImageSampleWeightedQCOM-06978
  If any command other than `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must not have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdDrawMeshTasksIndirectCountNV-OpImageBlockMatchWindow-09215
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM

- VUID-vkCmdDrawMeshTasksIndirectCountNV-OpImageBlockMatchWindow-09216
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format must be a single-component format

- VUID-vkCmdDrawMeshTasksIndirectCountNV-OpImageBlockMatchWindow-09217
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdDrawMeshTasksIndirectCountNV-OpImageBlockMatchWindow-12421
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the `blockMatchExtendedClampToEdge` feature is not enabled, the input sampler must not have been created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawMeshTasksIndirectCountNV-addressModeU-12422
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the input sampler was created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, then the sampler must have been created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-07288
  Any shader invocation executed by this command must terminate

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-09600
  If a descriptor with type equal to any of VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, or VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT is accessed as a result of this command, all image subresources identified by that descriptor must be in the image layout identified when the descriptor was written

- VUID-vkCmdDrawMeshTasksIndirectCountNV-micromap-11636
  If an acceleration structure is accessed as a result of this command through an `OpRayQueryProceedKHR` operation , the `VK_EXT_opacity_micromap` extension is not enabled, and the acceleration structure is built using geometry with a VkAccelerationStructureTrianglesOpacityMicromapKHR structure included in its `pNext` chain, the shader must have specified a `OpacityMicromapIdKHR` execution mode with its specialization constant operand equal to VK_TRUE

- VUID-vkCmdDrawMeshTasksIndirectCountNV-micromap-11637
  If an acceleration structure is accessed as a result of this command and the acceleration structure was constructed through deserialization, all micromap arrays referenced by the acceleration structure that were not replaced by an acceleration structure update command must have been deserialized using the serialized data of the corresponding micromaps used to originally build the acceleration structure prior to the execution of this command on the device

- VUID-vkCmdDrawMeshTasksIndirectCountNV-micromap-11638
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkPipeline bound to the pipeline bind point used by this command must not have been created with `flags` that includes VK_PIPELINE_CREATE_2_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_KHR

- VUID-vkCmdDrawMeshTasksIndirectCountNV-micromap-11639
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkShaderEXT that accessed the descriptor must not have been created with `flags` that includes VK_SHADER_CREATE_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_EXT

- VUID-vkCmdDrawMeshTasksIndirectCountNV-commandBuffer-10746
  The `VkDeviceMemory` object allocated from a `VkMemoryHeap` with the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property that is bound to a resource accessed as a result of this command must be the active bound tile memory object in `commandBuffer`

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-10678
  If this command is recorded inside a tile shading render pass instance, the stages corresponding to the pipeline bind point used by this command must only include VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_FRAGMENT_BIT, and/or VK_SHADER_STAGE_COMPUTE_BIT

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-10679
  If this command is recorded where per-tile execution model is enabled, there must be no access to any image while the image was be transitioned to the VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT layout

- VUID-vkCmdDrawMeshTasksIndirectCountNV-pDescription-09900
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the underlying VkTensorARM object must have been created with the VK_TENSOR_USAGE_SHADER_BIT_ARM usage flag set

- VUID-vkCmdDrawMeshTasksIndirectCountNV-dimensionCount-09905
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the `Rank` of the `OpTypeTensorARM` of the tensor resource variable must be equal to the `dimensionCount` provided via VkTensorCreateInfoARM::`pDescription` when creating the underlying VkTensorARM object

- VUID-vkCmdDrawMeshTasksIndirectCountNV-OpTypeTensorARM-09906
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the element type of the `OpTypeTensorARM` of the tensor resource variable must be compatible with the VkFormat of the VkTensorViewARM used for the access

- VUID-vkCmdDrawMeshTasksIndirectCountNV-OpTensorReadARM-12462
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, using `OpTensorReadARM` or `OpTensorWriteARM`, and the underlying VkTensorARM object was created with a VK_TENSOR_TILING_BRICK_16_WIDE_ARM, VK_TENSOR_TILING_BRICK_8_WIDE_ARM, VK_TENSOR_TILING_BRICK_4_WIDE_ARM, VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_ARM, or VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_64K_ARM VkTensorTilingARM, and the object read or written is an array, then the innermost coordinate provided to `OpTensorReadARM` or `OpTensorWriteARM` via the `Coordinates` operand must be a multiple of the largest power of 2 that is less than or equal to the number of components of the array

- VUID-vkCmdDrawMeshTasksIndirectCountNV-pNext-12463
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command and the corresponding VkTensorARM object was created with a VkTensorRollingBackingCreateInfoARM structure in the `pNext` chain of VkTensorCreateInfoARM, then the number of elements accessed with one `OpTensorReadARM` or `OpTensorWriteARM`, must be less than or equal to the number of elements available from the starting coordinate in the rolling backing along the innermost dimension, defined as `wraps`[`dimensionCount` - 1] - InnermostCoordinate % `wraps`[`dimensionCount` - 1] where InnermostCoordinate is the last component of the coordinates array provided via the `Coordinates` operand

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-12472
  Descriptors dynamically accessed in bound descriptor heaps must be valid

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-11297
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a `OpTypeStruct` decorated with `Block` or `BufferBlock` using that mapping, the calculated offset for the resource heap must be a multiple of `bufferDescriptorAlignment`

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-11298
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeImage` or `OpTypeSampledImage` using that mapping, the calculated offset for the resource heap must be a multiple of `imageDescriptorAlignment`

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-11299
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeSampler` or `OpTypeSampledImage` using that mapping, the calculated offset for the sampler heap must be a multiple of `samplerDescriptorAlignment`

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-11397
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeTensorARM` using that mapping, the calculated offset for the resource heap must be a multiple of `tensorDescriptorAlignment`

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-11300
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 4

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-11301
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-11302
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-11304
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 8

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-11305
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-11306
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address pointed to by the address in push data must be a valid VkDeviceAddress

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-11308
  For each descriptor heap that is statically used by a bound shader, either directly or via a descriptor mapping, a valid descriptor heap must be bound

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-11309
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, execution of this command must not result in any descriptor read accessing data outside of the user range of the respective heap bound by `vkCmdBind*HeapEXT` commands

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-11372
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer or uniform texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified via VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-11373
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer or storage texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-11374
  If the `robustBufferAccess2` feature is not enabled, the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, uniform texel buffer, storage buffer, or storage texel buffer, that shader must not access values outside of the range of the buffer as specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawMeshTasksIndirectCountNV-pBindInfo-11375
  If any bound shader uses an embedded sampler via a descriptor mapping, the value of `pBindInfo->reservedRangeSize` set for vkCmdBindSamplerHeapEXT must be greater than or equal to `minSamplerHeapReservedRangeWithEmbedded`

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-11376
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, and that shader statically uses a push constant value, that value must have been set by vkCmdPushDataEXT

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-11398
  If a bound shader was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the access must not be out of bounds

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-11437
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the buffer from which the address in push data was queried must have been created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-11438
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-11441
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must be aligned to `minUniformBufferOffsetAlignment`

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-11439
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_STORAGE_BUFFER_BIT usage flag set

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-11442
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must be aligned to `minStorageBufferOffsetAlignment`

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-11485
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses an acceleration structure using that mapping, the address that the acceleration structure is mapped to must be an acceleration structure address retrieved from a VkAccelerationStructureKHR object via vkGetAccelerationStructureDeviceAddressKHR or handle retrieved from a VkAccelerationStructureNV object via vkGetAccelerationStructureHandleNV

- VUID-vkCmdDrawMeshTasksIndirectCountNV-index-11450
  If a shader uses a sampler descriptor to sample an image as a result of this command, and that sampler descriptor uses a custom border color with an index defined by VkSamplerCustomBorderColorIndexCreateInfoEXT, the value of VkSamplerCustomBorderColorIndexCreateInfoEXT::`index` must have been registered before this command was recorded, and still be registered during the sampling operation, with an identically defined color

- VUID-vkCmdDrawMeshTasksIndirectCountNV-protectedNoFault-11455
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, the address that the resource is mapped to must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdDrawMeshTasksIndirectCountNV-protectedNoFault-11456
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, the address of the indirect memory must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdDrawMeshTasksIndirectCountNV-renderPass-02684
  The current render pass must be compatible with the `renderPass` member of the `VkGraphicsPipelineCreateInfo` structure specified when creating the `VkPipeline` bound to VK_PIPELINE_BIND_POINT_GRAPHICS

- VUID-vkCmdDrawMeshTasksIndirectCountNV-subpass-02685
  The subpass index of the current render pass must be equal to the `subpass` member of the `VkGraphicsPipelineCreateInfo` structure specified when creating the `VkPipeline` bound to VK_PIPELINE_BIND_POINT_GRAPHICS

- VUID-vkCmdDrawMeshTasksIndirectCountNV-OpTypeImage-07468
  If any shader executed by this pipeline accesses an `OpTypeImage` variable with a `Dim` operand of `SubpassData`, it must be decorated with an `InputAttachmentIndex` that corresponds to a valid input attachment in the current subpass

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-07469
  Input attachment views accessed in a subpass must be created with the same VkFormat as the corresponding subpass definition, and be created with a VkImageView that is compatible with the attachment referenced by the subpass' `pInputAttachments`[`InputAttachmentIndex`] in the bound VkFramebuffer as specified by Fragment Input Attachment Compatibility

- VUID-vkCmdDrawMeshTasksIndirectCountNV-pDepthInputAttachmentIndex-09595
  Input attachment views accessed in a dynamic render pass with a `InputAttachmentIndex` referenced by VkRenderingInputAttachmentIndexInfo, or no `InputAttachmentIndex` if VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` or VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` are `NULL`, must be created with a VkImageView that is compatible with the corresponding color, depth, or stencil attachment in VkRenderingInfo

- VUID-vkCmdDrawMeshTasksIndirectCountNV-pDepthInputAttachmentIndex-09596
  Input attachment views accessed in a dynamic render pass via a shader object must have an `InputAttachmentIndex` if both VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` and VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` are non-`NULL`

- VUID-vkCmdDrawMeshTasksIndirectCountNV-InputAttachmentIndex-09597
  If an input attachment view accessed in a dynamic render pass via a shader object has an `InputAttachmentIndex`, the `InputAttachmentIndex` must match an index in VkRenderingInputAttachmentIndexInfo

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-06537
  Memory backing image subresources used as attachments in the current render pass must not be written in any way other than as an attachment by this command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-10795
  If a color attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_COLOR_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-10796
  If a depth attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_DEPTH_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-10797
  If a stencil attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_STENCIL_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-12338
  If a color attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_COLOR_BIT on that attachment, the color attachment must not be written to by this command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-12339
  If a depth attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_DEPTH_BIT on that attachment, the depth attachment must not be written to by this command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-12340
  If a stencil attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_STENCIL_BIT on that attachment, the stencil attachment must not be written to by this command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-09003
  If an attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, it must not be accessed in any way other than as an attachment, storage image, or sampled image by this command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-06886
  If the current render pass instance uses a depth/stencil attachment with a read-only layout for the depth aspect, depth writes must be disabled

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-06887
  If the current render pass instance uses a depth/stencil attachment with a read-only layout for the stencil aspect, both front and back `writeMask` are not zero, and stencil test is enabled, all stencil ops must be VK_STENCIL_OP_KEEP

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-07831
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT dynamic state enabled then vkCmdSetViewport must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-07832
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SCISSOR dynamic state enabled then vkCmdSetScissor must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-08617
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_WIDTH dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineWidth must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-07834
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BIAS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthBiasEnable` is VK_TRUE, then vkCmdSetDepthBias or vkCmdSetDepthBias2EXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-07835
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_BLEND_CONSTANTS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and an active color attachment current value of `blendEnable` is VK_TRUE with a blend equations where any VkBlendFactor member is VK_BLEND_FACTOR_CONSTANT_COLOR, VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR, VK_BLEND_FACTOR_CONSTANT_ALPHA, or VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA, then vkCmdSetBlendConstants must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-07836
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BOUNDS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthBoundsTestEnable` is VK_TRUE, then vkCmdSetDepthBounds must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-07837
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilCompareMask must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-07838
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_WRITE_MASK dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilWriteMask must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-07839
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_REFERENCE dynamic state enabled, the current value of and `rasterizerDiscardEnable` is VK_FALSE, the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilReference must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-maxMultiviewInstanceIndex-02688
  If the draw is recorded in a render pass instance with multiview enabled, the maximum instance index must be less than or equal to VkPhysicalDeviceMultiviewProperties::`maxMultiviewInstanceIndex`

- VUID-vkCmdDrawMeshTasksIndirectCountNV-sampleLocationsEnable-02689
  If the bound graphics pipeline was created with VkPipelineSampleLocationsStateCreateInfoEXT::`sampleLocationsEnable` set to VK_TRUE, then the active depth attachment must have been created with the VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit set

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-07634
  If the `VK_EXT_sample_locations` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetSampleLocationsEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-06666
  If the `VK_EXT_sample_locations` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `sampleLocationsEnable` is VK_TRUE, then vkCmdSetSampleLocationsEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-07840
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_CULL_MODE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCullMode must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-07841
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRONT_FACE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetFrontFace must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-07843
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, vkCmdSetDepthTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-07844
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthTestEnable` is VK_TRUE, then vkCmdSetDepthWriteEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-07845
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_COMPARE_OP dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthTestEnable` is VK_TRUE, then vkCmdSetDepthCompareOp must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-07846
  If the `depthBounds` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthBoundsTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-07847
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetStencilTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-07848
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_OP dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilOp must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-viewportCount-03417
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, and the state is not inherited, then vkCmdSetViewportWithCount must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-scissorCount-03418
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT dynamic state enabled, and the state is not inherited, then vkCmdSetScissorWithCount must have been called and not subsequently invalidated in the current command buffer prior to this drawing

- VUID-vkCmdDrawMeshTasksIndirectCountNV-viewportCount-03419
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with both the VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic states enabled, and the state is not inherited, then the `viewportCount` parameter of `vkCmdSetViewportWithCount` must match the `scissorCount` parameter of `vkCmdSetScissorWithCount`

- VUID-vkCmdDrawMeshTasksIndirectCountNV-viewportCount-04137
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportWScalingStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksIndirectCountNV-viewportCount-04138
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, the current value of `viewportWScalingEnable` is VK_TRUE, then vkCmdSetViewportWScalingNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-08636
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, the current value of `viewportWScalingEnable` is VK_TRUE, then the `viewportCount` parameter in the last call to vkCmdSetViewportWScalingNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksIndirectCountNV-viewportCount-04139
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportShadingRateImageStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksIndirectCountNV-shadingRateImage-09233
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_COARSE_SAMPLE_ORDER_NV and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoarseSampleOrderNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-shadingRateImage-09234
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `shadingRateImageEnable` is VK_TRUE, then vkCmdSetViewportShadingRatePaletteNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-08637
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `shadingRateImageEnable` is VK_TRUE, then the `viewportCount` parameter in the last call to vkCmdSetViewportShadingRatePaletteNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksIndirectCountNV-VkPipelineVieportCreateInfo-04141
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled and a VkPipelineViewportSwizzleStateCreateInfoNV structure chained from VkPipelineViewportStateCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportSwizzleStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksIndirectCountNV-VkPipelineVieportCreateInfo-04142
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled and a VkPipelineViewportExclusiveScissorStateCreateInfoNV structure chained from VkPipelineViewportStateCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportExclusiveScissorStateCreateInfoNV::`exclusiveScissorCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-07878
  If the `exclusiveScissor` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_ENABLE_NV dynamic state enabled, then vkCmdSetExclusiveScissorEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-07879
  If the `exclusiveScissor` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_NV dynamic state enabled, and the most recent call to vkCmdSetExclusiveScissorEnableNV in the current command buffer set any element of `pExclusiveScissorEnables` to VK_TRUE, then vkCmdSetExclusiveScissorNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-04876
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE dynamic state enabled, then vkCmdSetRasterizerDiscardEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-04877
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthBiasEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-logicOp-04878
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LOGIC_OP_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `logicOpEnable` is VK_TRUE, then vkCmdSetLogicOpEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-primitiveFragmentShadingRateWithMultipleViewports-04552
  If the `primitiveFragmentShadingRateWithMultipleViewports` limit is not supported, the bound graphics pipeline was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, and any of the shader stages of the bound graphics pipeline write to the `PrimitiveShadingRateKHR` built-in, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and the `viewportCount` parameter of `vkCmdSetViewportWithCount` must be `1`

- VUID-vkCmdDrawMeshTasksIndirectCountNV-primitiveFragmentShadingRateWithMultipleViewports-08642
  If the `primitiveFragmentShadingRateWithMultipleViewports` limit is not supported, and any shader object bound to a graphics stage writes to the `PrimitiveShadingRateKHR` built-in, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and the `viewportCount` parameter of `vkCmdSetViewportWithCount` must be `1`

- VUID-vkCmdDrawMeshTasksIndirectCountNV-blendEnable-04727
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, then for each color attachment, if the corresponding image view’s format features do not contain VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT, then the corresponding current value of `blendEnable` must be VK_FALSE

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-08644
  If a shader object is bound to any graphics stage or a graphics pipeline is bound, the current value of `rasterizerDiscardEnable` is VK_FALSE, and none of the following is enabled:

  - the `VK_AMD_mixed_attachment_samples` extension

  - the `VK_NV_framebuffer_mixed_samples` extension

  - the `multisampledRenderToSingleSampled` feature

  then the current value of `rasterizationSamples` must be the same as the current color and/or depth/stencil attachments

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-08876
  If a shader object is bound to any graphics stage, the current render pass instance must have been begun with vkCmdBeginRendering

- VUID-vkCmdDrawMeshTasksIndirectCountNV-imageView-06172
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawMeshTasksIndirectCountNV-imageView-06173
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawMeshTasksIndirectCountNV-imageView-06174
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawMeshTasksIndirectCountNV-imageView-06175
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawMeshTasksIndirectCountNV-imageView-06176
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawMeshTasksIndirectCountNV-imageView-06177
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawMeshTasksIndirectCountNV-viewMask-06178
  If the current render pass instance was begun with vkCmdBeginRendering, the bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::`viewMask` equal to VkRenderingInfo::`viewMask`

- VUID-vkCmdDrawMeshTasksIndirectCountNV-colorAttachmentCount-06179
  If the `dynamicRenderingUnusedAttachments` feature is not enabled and the current render pass instance was begun with vkCmdBeginRendering, the bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::`colorAttachmentCount` equal to VkRenderingInfo::`colorAttachmentCount`

- VUID-vkCmdDrawMeshTasksIndirectCountNV-dynamicRenderingUnusedAttachments-08910
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound graphics pipeline

- VUID-vkCmdDrawMeshTasksIndirectCountNV-dynamicRenderingUnusedAttachments-08912
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` equal to VK_NULL_HANDLE must have the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound pipeline equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectCountNV-dynamicRenderingUnusedAttachments-08911
  If the `dynamicRenderingUnusedAttachments` feature is enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound graphics pipeline, or the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats`, if it exists, must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectCountNV-colorAttachmentCount-09362
  If the current render pass instance was begun with vkCmdBeginRendering, with a VkRenderingInfo::`colorAttachmentCount` equal to `1`, there is no shader object bound to any graphics stage, and a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, each element of the VkRenderingInfo::`pColorAttachments` array with a `resolveImageView` not equal to VK_NULL_HANDLE must have been created with an image created with a VkExternalFormatANDROID::`externalFormat` value equal to the VkExternalFormatANDROID::`externalFormat` value used to create the bound graphics pipeline

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-09363
  If there is no shader object bound to any graphics stage, the current render pass instance was begun with vkCmdBeginRendering and a VkRenderingInfo::`colorAttachmentCount` equal to `1`, and a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with an image created with a VkExternalFormatANDROID::`externalFormat` value equal to the VkExternalFormatANDROID::`externalFormat` value used to create the bound graphics pipeline

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-09364
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetColorBlendEnableEXT must have set the blend enable to VK_FALSE prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-09365
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetRasterizationSamplesEXT must have set `rasterizationSamples` to VK_SAMPLE_COUNT_1_BIT prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-09368
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetFragmentShadingRateKHR must have set `pFragmentSize->width` to `1` prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-09369
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetFragmentShadingRateKHR must have set `pFragmentSize->height` to `1` prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-07749
  If the `colorWriteEnable` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorWriteEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-attachmentCount-07750
  If the `colorWriteEnable` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the `attachmentCount` parameter of most recent call to `vkCmdSetColorWriteEnableEXT` in the current command buffer must be greater than or equal to the number of active color attachments

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-07751
  If the `VK_EXT_discard_rectangles` extension is enabled, a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT dynamic state enabled and the `pNext` chain of VkGraphicsPipelineCreateInfo included a VkPipelineDiscardRectangleStateCreateInfoEXT structure, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for each discard rectangle in VkPipelineDiscardRectangleStateCreateInfoEXT::`discardRectangleCount`

- VUID-vkCmdDrawMeshTasksIndirectCountNV-rasterizerDiscardEnable-09236
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT dynamic state enabled and the `pNext` chain of VkGraphicsPipelineCreateInfo did not include a VkPipelineDiscardRectangleStateCreateInfoEXT structure, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for each discard rectangle in VkPhysicalDeviceDiscardRectanglePropertiesEXT::`maxDiscardRectangles`

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-07880
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDiscardRectangleEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-07881
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_MODE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-dynamicRenderingUnusedAttachments-08913
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->imageView` was VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectCountNV-dynamicRenderingUnusedAttachments-08914
  If current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawMeshTasksIndirectCountNV-dynamicRenderingUnusedAttachments-08915
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, and the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->imageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectCountNV-dynamicRenderingUnusedAttachments-08916
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->imageView` was VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectCountNV-dynamicRenderingUnusedAttachments-08917
  If current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawMeshTasksIndirectCountNV-dynamicRenderingUnusedAttachments-08918
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, and the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->imageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectCountNV-imageView-06183
  If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentShadingRateAttachmentInfoKHR::`imageView` was not VK_NULL_HANDLE, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

- VUID-vkCmdDrawMeshTasksIndirectCountNV-dynamicRenderingLocalRead-11797
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingLocalRead` feature is enabled, the VK_RENDERING_LOCAL_READ_CONCURRENT_ACCESS_CONTROL_BIT_KHR flag is specified, and an attachment is being used as a feedback loop as specified by VK_RENDERING_ATTACHMENT_INPUT_ATTACHMENT_FEEDBACK_BIT_KHR, VkRenderingAttachmentFlagsInfoKHR::`flags` for that attachment must include VK_RENDERING_ATTACHMENT_INPUT_ATTACHMENT_FEEDBACK_BIT_KHR

- VUID-vkCmdDrawMeshTasksIndirectCountNV-imageView-06184
  If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentDensityMapAttachmentInfoEXT::`imageView` was not VK_NULL_HANDLE, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT

- VUID-vkCmdDrawMeshTasksIndirectCountNV-layers-10831
  If the current render pass instance was created with VK_RENDERING_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE or VK_RENDER_PASS_CREATE_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE, and the bound graphics pipeline was created with VK_PIPELINE_CREATE_2_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE, then the current render pass instance must have a `layers` value less than or equal to VkPipelineFragmentDensityMapLayeredCreateInfoVALVE::`maxFragmentDensityMapLayers`

- VUID-vkCmdDrawMeshTasksIndirectCountNV-colorAttachmentCount-06185
  If the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with a sample count equal to the corresponding element of the `pColorAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline

- VUID-vkCmdDrawMeshTasksIndirectCountNV-pDepthAttachment-06186
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of the `depthStencilAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawMeshTasksIndirectCountNV-pStencilAttachment-06187
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of the `depthStencilAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawMeshTasksIndirectCountNV-multisampledRenderToSingleSampled-07285
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with a sample count equal to the value of `rasterizationSamples` for the bound graphics pipeline

- VUID-vkCmdDrawMeshTasksIndirectCountNV-multisampledRenderToSingleSampled-07286
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawMeshTasksIndirectCountNV-multisampledRenderToSingleSampled-07287
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawMeshTasksIndirectCountNV-pNext-07935
  If this command is called inside a render pass instance started with vkCmdBeginRendering, and the `pNext` chain of VkRenderingInfo includes a VkMultisampledRenderToSingleSampledInfoEXT structure with `multisampledRenderToSingleSampledEnable` equal to VK_TRUE, then the value of `rasterizationSamples` for the bound graphics pipeline must be equal to VkMultisampledRenderToSingleSampledInfoEXT::`rasterizationSamples`

- VUID-vkCmdDrawMeshTasksIndirectCountNV-renderPass-06198
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline must have been created with a VkGraphicsPipelineCreateInfo::`renderPass` equal to VK_NULL_HANDLE

- VUID-vkCmdDrawMeshTasksIndirectCountNV-pColorAttachments-08963
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound with a fragment shader that statically writes to a color attachment, the color write mask is not zero, color writes are enabled, and the corresponding element of the VkRenderingInfo::`pColorAttachments->imageView` was not VK_NULL_HANDLE, then the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectCountNV-pColorAttachments-11539
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound with a fragment shader that statically writes to a color attachment, the color write mask is not zero, color writes are enabled, and the corresponding element of the VkRenderingInfo::`pColorAttachments->resolveImageView` was not VK_NULL_HANDLE, then the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectCountNV-pDepthAttachment-08964
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound, depth test is enabled, and the VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, then the VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectCountNV-pDepthAttachment-11540
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound, depth test is enabled, and the VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, then the VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectCountNV-pStencilAttachment-08965
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound, stencil test is enabled and the VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, then the VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectCountNV-pStencilAttachment-11860
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound, stencil test is enabled and the VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, then the VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectCountNV-flags-10582
  If the current render pass instance was begun with a vkCmdBeginRendering call in `commandBuffer`, its VkRenderingInfo::`flags` parameter must not have VK_RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT set unless VK_RENDERING_CONTENTS_INLINE_BIT_KHR is also set

- VUID-vkCmdDrawMeshTasksIndirectCountNV-primitivesGeneratedQueryWithRasterizerDiscard-06708
  If the `primitivesGeneratedQueryWithRasterizerDiscard` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, rasterization discard must not be enabled

- VUID-vkCmdDrawMeshTasksIndirectCountNV-primitivesGeneratedQueryWithNonZeroStreams-06709
  If the `primitivesGeneratedQueryWithNonZeroStreams` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, the bound graphics pipeline must not have been created with a non-zero value in `VkPipelineRasterizationStateStreamCreateInfoEXT`::`rasterizationStream`

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-07620
  If the `depthClamp` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLAMP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthClampEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-07621
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_POLYGON_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetPolygonModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-07622
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetRasterizationSamplesEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-07623
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetSampleMaskEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-alphaToCoverageEnable-08919
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT dynamic state enabled, and `alphaToCoverageEnable` was VK_TRUE in the last call to vkCmdSetAlphaToCoverageEnableEXT, then the Fragment Output Interface must contain a variable for the alpha `Component` word in `Location` 0 at `Index` 0

- VUID-vkCmdDrawMeshTasksIndirectCountNV-alphaToCoverageEnable-08920
  If a shader object is bound to any graphics stage, and the most recent call to vkCmdSetAlphaToCoverageEnableEXT in the current command buffer set `alphaToCoverageEnable` to VK_TRUE, then the Fragment Output Interface must contain a variable for the alpha `Component` word in `Location` 0 at `Index` 0

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-07624
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAlphaToCoverageEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-07625
  If the `alphaToOne` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ALPHA_TO_ONE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAlphaToOneEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-07626
  If the `logicOp` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LOGIC_OP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetLogicOpEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-07627
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and there are color attachments bound, then vkCmdSetColorBlendEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-07629
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and there are color attachments bound, then vkCmdSetColorWriteMaskEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-07630
  If the `geometryStreams` feature is enabled, and a shader object is bound to the VK_SHADER_STAGE_GEOMETRY_BIT stage or a graphics pipeline is bound which was created with both a VK_SHADER_STAGE_GEOMETRY_BIT stage and the VK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXT dynamic state enabled, then vkCmdSetRasterizationStreamEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-07631
  If the `VK_EXT_conservative_rasterization` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_CONSERVATIVE_RASTERIZATION_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetConservativeRasterizationModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-07632
  If the `VK_EXT_conservative_rasterization` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXTRA_PRIMITIVE_OVERESTIMATION_SIZE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `conservativeRasterizationMode` is VK_CONSERVATIVE_RASTERIZATION_MODE_OVERESTIMATE_EXT, then vkCmdSetExtraPrimitiveOverestimationSizeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-conservativePointAndLineRasterization-07499
  If the `VK_EXT_conservative_rasterization` extension is enabled, `conservativePointAndLineRasterization` is not supported, a shader object is bound to any graphics stage or a graphics pipeline is bound, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line or point topology class, then the current value of `conservativeRasterizationMode` must be VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-07633
  If the `depthClipEnable` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLIP_ENABLE_EXT dynamic state, then vkCmdSetDepthClipEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-07636
  If the `VK_EXT_provoking_vertex` extension is enabled, a shader object is bound to the VK_SHADER_STAGE_VERTEX_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_PROVOKING_VERTEX_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetProvokingVertexModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-08666
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineRasterizationModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-08669
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineStippleEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-07849
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled and a shader object is bound to any graphics stage, or a bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stippledLineEnable` is VK_TRUE, then vkCmdSetLineStipple must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-10608
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic state enabled, the effective rasterization input topology is in the line topology class, and the current `lineRasterizationMode` is VK_LINE_RASTERIZATION_MODE_BRESENHAM or VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH, then the current `alphaToCoverageEnable`, `alphaToOneEnable` and `sampleShadingEnable` states must all be VK_FALSE

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-07639
  If the `depthClipControl` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLIP_NEGATIVE_ONE_TO_ONE_EXT dynamic state enabled, then vkCmdSetDepthClipNegativeOneToOneEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-09650
  If the `depthClampControl` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLAMP_RANGE_EXT dynamic state enabled, and the current value of `depthClampEnable` is VK_TRUE, then vkCmdSetDepthClampRangeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-07640
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_ENABLE_NV dynamic state enabled, then vkCmdSetViewportWScalingEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-07641
  If the `VK_NV_viewport_swizzle` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic state enabled, then vkCmdSetViewportSwizzleNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-07642
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageToColorEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-07643
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_LOCATION_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageToColorEnable` is VK_TRUE, then vkCmdSetCoverageToColorLocationNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-07644
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_MODE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageModulationModeNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-07645
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageModulationMode` is any value other than VK_COVERAGE_MODULATION_MODE_NONE_NV, then vkCmdSetCoverageModulationTableEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-07646
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageModulationTableEnable` is VK_TRUE, then vkCmdSetCoverageModulationTableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-07647
  If the `shadingRateImage` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SHADING_RATE_IMAGE_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetShadingRateImageEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-pipelineFragmentShadingRate-09238
  If the `pipelineFragmentShadingRate` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetFragmentShadingRateKHR must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-07648
  If the `representativeFragmentTest` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_REPRESENTATIVE_FRAGMENT_TEST_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetRepresentativeFragmentTestEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-07649
  If the `coverageReductionMode` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageReductionModeNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-rasterizationSamples-07471
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current subpass does not use any color and/or depth/stencil attachments, then the `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT must follow the rules for a zero-attachment subpass

- VUID-vkCmdDrawMeshTasksIndirectCountNV-samples-07472
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state disabled, then the `samples` parameter in the last call to vkCmdSetSampleMaskEXT must be greater or equal to the VkPipelineMultisampleStateCreateInfo::`rasterizationSamples` parameter used to create the bound graphics pipeline

- VUID-vkCmdDrawMeshTasksIndirectCountNV-samples-07473
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT state and VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT states enabled, then the `samples` parameter in the last call to vkCmdSetSampleMaskEXT must be greater or equal to the `rasterizationSamples` parameter in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-09211
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, or a shader object is bound to any graphics stage, and the current render pass instance includes a VkMultisampledRenderToSingleSampledInfoEXT structure with `multisampledRenderToSingleSampledEnable` equal to VK_TRUE, then the `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT must be the same as the `rasterizationSamples` member of that structure

- VUID-vkCmdDrawMeshTasksIndirectCountNV-firstAttachment-07476
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic states enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the last call to vkCmdSetColorBlendEnableEXT in the current command buffer prior to this drawing command must have set a value for all active color attachments

- VUID-vkCmdDrawMeshTasksIndirectCountNV-firstAttachment-07478
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT dynamic states enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the last call to vkCmdSetColorWriteMaskEXT in the current command buffer prior to this drawing command must have set a value for all active color attachments

- VUID-vkCmdDrawMeshTasksIndirectCountNV-advancedBlendMaxColorAttachments-07480
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT and VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic states enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and an active color attachment current value of `blendEnable` is VK_TRUE, then the number of active color attachments must not exceed `advancedBlendMaxColorAttachments`

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-10862
  If a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT , but not the VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorBlendEquationEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawMeshTasksIndirectCountNV-rasterizerDiscardEnable-10863
  If a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT, but not the VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorBlendAdvancedEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-10864
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT and VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then either vkCmdSetColorBlendAdvancedEXT or vkCmdSetColorBlendEquationEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawMeshTasksIndirectCountNV-primitivesGeneratedQueryWithNonZeroStreams-07481
  If the `primitivesGeneratedQueryWithNonZeroStreams` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, and the bound graphics pipeline was created with VK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXT state enabled, the last call to vkCmdSetRasterizationStreamEXT must have set the `rasterizationStream` to zero

- VUID-vkCmdDrawMeshTasksIndirectCountNV-sampleLocationsPerPixel-07482
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state disabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then the `sampleLocationsPerPixel` member of `pSampleLocationsInfo` in the last call to vkCmdSetSampleLocationsEXT must equal the `rasterizationSamples` member of the VkPipelineMultisampleStateCreateInfo structure the bound graphics pipeline has been created with

- VUID-vkCmdDrawMeshTasksIndirectCountNV-sampleLocationsPerPixel-07483
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then the `sampleLocationsPerPixel` member of `pSampleLocationsInfo` in the last call to vkCmdSetSampleLocationsEXT must equal the `rasterizationSamples` parameter of the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawMeshTasksIndirectCountNV-sampleLocationsEnable-07484
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT then the current active depth attachment must have been created with the VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit set

- VUID-vkCmdDrawMeshTasksIndirectCountNV-sampleLocationsEnable-07485
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, then the `sampleLocationsInfo.maxSampleLocationGridSize.width` in the last call to vkCmdSetSampleLocationsEXT must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.width` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling `rasterizationSamples`

- VUID-vkCmdDrawMeshTasksIndirectCountNV-sampleLocationsEnable-07486
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, then the `sampleLocationsInfo.maxSampleLocationGridSize.height` in the last call to vkCmdSetSampleLocationsEXT must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.height` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling `rasterizationSamples`

- VUID-vkCmdDrawMeshTasksIndirectCountNV-sampleLocationsEnable-07487
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, the fragment shader code must not statically use the extended instruction `InterpolateAtSample`

- VUID-vkCmdDrawMeshTasksIndirectCountNV-sampleLocationsEnable-07936
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationGridSize.width` must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.width` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling the value of `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawMeshTasksIndirectCountNV-sampleLocationsEnable-07937
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationGridSize.height` must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.height` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling the value of `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawMeshTasksIndirectCountNV-sampleLocationsEnable-07938
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationsPerPixel` must equal `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawMeshTasksIndirectCountNV-coverageModulationTableEnable-07488
  If a shader object is bound to any graphics stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NV state enabled, and the last call to vkCmdSetCoverageModulationTableEnableNV set `coverageModulationTableEnable` to VK_TRUE, then the `coverageModulationTableCount` parameter in the last call to vkCmdSetCoverageModulationTableNV must equal the current `rasterizationSamples` divided by the number of color samples in the current active color attachment

- VUID-vkCmdDrawMeshTasksIndirectCountNV-rasterizationSamples-07489
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, and if current subpass has a depth/stencil attachment and depth test, stencil test, or depth bounds test are enabled in the bound pipeline, then the current `rasterizationSamples` must be the same as the sample count of the depth/stencil attachment

- VUID-vkCmdDrawMeshTasksIndirectCountNV-coverageToColorEnable-07490
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV state enabled and the last call to vkCmdSetCoverageToColorEnableNV set the `coverageToColorEnable` to VK_TRUE, then there must be an active color attachment at the location selected by the last call to vkCmdSetCoverageToColorLocationNV `coverageToColorLocation`, with a VkFormat of VK_FORMAT_R8_UINT, VK_FORMAT_R8_SINT, VK_FORMAT_R16_UINT, VK_FORMAT_R16_SINT, VK_FORMAT_R32_UINT, or VK_FORMAT_R32_SINT

- VUID-vkCmdDrawMeshTasksIndirectCountNV-rasterizerDiscardEnable-09420
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, and a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, and the most recent call to vkCmdSetRasterizerDiscardEnable in the current command buffer set `rasterizerDiscardEnable` to VK_FALSE, and the last call to vkCmdSetCoverageToColorEnableNV set the `coverageToColorEnable` to VK_TRUE, then there must be an active color attachment at the location selected by the last call to vkCmdSetCoverageToColorLocationNV `coverageToColorLocation`, with a VkFormat of VK_FORMAT_R8_UINT, VK_FORMAT_R8_SINT, VK_FORMAT_R16_UINT, VK_FORMAT_R16_SINT, VK_FORMAT_R32_UINT, or VK_FORMAT_R32_SINT

- VUID-vkCmdDrawMeshTasksIndirectCountNV-coverageReductionMode-07491
  If the `coverageReductionMode` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV or VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic states enabled, then the current values of `coverageReductionMode`, `rasterizationSamples`, the sample counts for the color and depth/stencil attachments (if the subpass has them) must be a valid combination returned by vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV

- VUID-vkCmdDrawMeshTasksIndirectCountNV-viewportCount-07492
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportSwizzleStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksIndirectCountNV-viewportCount-07493
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic states enabled then the `viewportCount` parameter in the last call to vkCmdSetViewportSwizzleNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksIndirectCountNV-viewportCount-09421
  If the `VK_NV_viewport_swizzle` extension is enabled, and a shader object is bound to any graphics stage, then the `viewportCount` parameter in the last call to vkCmdSetViewportSwizzleNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksIndirectCountNV-rasterizationSamples-07494
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, and the `coverageReductionMode` feature is not enabled, or the current value of `coverageReductionMode` is not VK_COVERAGE_REDUCTION_MODE_TRUNCATE_NV, and the current value of `rasterizationSamples` is greater than sample count of the color attachment, then sample shading must be disabled

- VUID-vkCmdDrawMeshTasksIndirectCountNV-stippledLineEnable-07495
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_RECTANGULAR, then the `stippledRectangularLines` feature must be enabled

- VUID-vkCmdDrawMeshTasksIndirectCountNV-stippledLineEnable-07496
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_BRESENHAM, then the `stippledBresenhamLines` feature must be enabled

- VUID-vkCmdDrawMeshTasksIndirectCountNV-stippledLineEnable-07497
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH, then the `stippledSmoothLines` feature must be enabled

- VUID-vkCmdDrawMeshTasksIndirectCountNV-stippledLineEnable-07498
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_DEFAULT, then the `stippledRectangularLines` feature must be enabled and VkPhysicalDeviceLimits::`strictLines` must be VK_TRUE

- VUID-vkCmdDrawMeshTasksIndirectCountNV-stage-07073
  If the bound pipeline was created with the VkPipelineShaderStageCreateInfo::`stage` member of an element of VkGraphicsPipelineCreateInfo::`pStages` set to VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT, then Mesh Shader Queries must not be active

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-08877
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ATTACHMENT_FEEDBACK_LOOP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAttachmentFeedbackLoopEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-07850
  If dynamic state was inherited from VkCommandBufferInheritanceViewportScissorInfoNV, it must be set in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountNV-nextStage-10745
  For each shader object bound to a graphics stage, except for shader object bound to the last graphics stage in the logical pipeline, it must have been created with a `nextStage` including the corresponding bit to the shader object bound to the following graphics stage in the logical pipeline

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-08684
  If there is no bound graphics pipeline, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_VERTEX_BIT

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-08685
  If there is no bound graphics pipeline, and the `tessellationShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-08686
  If there is no bound graphics pipeline, and the `tessellationShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-08687
  If there is no bound graphics pipeline, and the `geometryShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_GEOMETRY_BIT

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-08688
  If there is no bound graphics pipeline, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_FRAGMENT_BIT

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-08689
  If there is no bound graphics pipeline, and the `taskShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TASK_BIT_EXT

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-08690
  If there is no bound graphics pipeline, and the `meshShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-08693
  If there is no bound graphics pipeline, and at least one of the `taskShader` and `meshShader` features is enabled, one of the VK_SHADER_STAGE_VERTEX_BIT or VK_SHADER_STAGE_MESH_BIT_EXT stages must have a valid `VkShaderEXT` bound, and the other must have no `VkShaderEXT` bound

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-08696
  If there is no bound graphics pipeline, and a valid `VkShaderEXT` is bound to the VK_SHADER_STAGE_VERTEX_BIT stage, there must be no `VkShaderEXT` bound to either the VK_SHADER_STAGE_TASK_BIT_EXT stage or the VK_SHADER_STAGE_MESH_BIT_EXT stage

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-08698
  If any graphics shader is bound which was created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag, then all shaders created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag in the same vkCreateShadersEXT call must also be bound

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-08699
  If any graphics shader is bound which was created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag, any stages in between stages whose shaders which did not create a shader with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag as part of the same vkCreateShadersEXT call must not have any `VkShaderEXT` bound

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-08878
  All bound graphics shader objects must have been created with identical or identically defined push constant ranges

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-08879
  All bound graphics shader objects must have either been created with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag set, or with identical or identically defined arrays of descriptor set layouts

- VUID-vkCmdDrawMeshTasksIndirectCountNV-colorAttachmentCount-09372
  If the current render pass instance was begun with vkCmdBeginRendering and a VkRenderingInfo::`colorAttachmentCount` equal to `1`, a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, and a fragment shader is bound, it must not declare the `DepthReplacing` or `StencilRefReplacingEXT` execution modes

- VUID-vkCmdDrawMeshTasksIndirectCountNV-pDynamicStates-08715
  If the bound graphics pipeline state includes a fragment shader stage, was created with VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`, and the fragment shader declares the `EarlyFragmentTests` execution mode and uses `OpDepthAttachmentReadEXT`, the `depthWriteEnable` parameter in the last call to vkCmdSetDepthWriteEnable must be VK_FALSE

- VUID-vkCmdDrawMeshTasksIndirectCountNV-pDynamicStates-08716
  If the bound graphics pipeline state includes a fragment shader stage, was created with VK_DYNAMIC_STATE_STENCIL_WRITE_MASK set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`, and the fragment shader declares the `EarlyFragmentTests` execution mode and uses `OpStencilAttachmentReadEXT`, the `writeMask` parameter in the last call to vkCmdSetStencilWriteMask must be `0`

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-09116
  If a shader object is bound to any graphics stage or the bound graphics pipeline was created with VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT, and the format of any color attachment is VK_FORMAT_E5B9G9R9_UFLOAT_PACK32, the corresponding element of the `pColorWriteMasks` parameter of vkCmdSetColorWriteMaskEXT must either include all of VK_COLOR_COMPONENT_R_BIT, VK_COLOR_COMPONENT_G_BIT, VK_COLOR_COMPONENT_B_BIT, and VK_COLOR_COMPONENT_A_BIT, or none of them

- VUID-vkCmdDrawMeshTasksIndirectCountNV-maxFragmentDualSrcAttachments-09239
  If blending is enabled for any attachment where either the source or destination blend factors for that attachment use the secondary color input, the maximum value of `Location` for any output attachment statically used in the `Fragment` `Execution` `Model` executed by this command must be less than `maxFragmentDualSrcAttachments`

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-09548
  If the current render pass was begun with vkCmdBeginRendering, there is no shader object bound to any graphics stage, the value of each element of VkRenderingAttachmentLocationInfo::`pColorAttachmentLocations` in the bound pipeline must match the value for the corresponding locations set currently in the current render pass instance

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-09549
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of each element of VkRenderingInputAttachmentIndexInfo::`pColorAttachmentInputIndices` in the bound pipeline must match the value for the corresponding index set currently in the current render pass instance

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-10927
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` in the bound pipeline must match the value set currently in the current render pass instance

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-10928
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` in the bound pipeline must match the value set currently in the current render pass instance

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-09642
  If the current render pass was begun with vkCmdBeginRendering with the VK_RENDERING_ENABLE_LEGACY_DITHERING_BIT_EXT flag, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_2_ENABLE_LEGACY_DITHERING_BIT_EXT

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-09643
  If the bound graphics pipeline was created with VK_PIPELINE_CREATE_2_ENABLE_LEGACY_DITHERING_BIT_EXT, the current render pass must have begun with vkCmdBeginRendering with the VK_RENDERING_ENABLE_LEGACY_DITHERING_BIT_EXT flag

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-10677
  If the per-tile execution model is enabled, the tileShadingPerTileDraw feature must be enabled

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-10772
  If a shader object is bound to any graphics stage, multiview functionality must not be enabled in the current render pass

- VUID-vkCmdDrawMeshTasksIndirectCountNV-multiviewPerViewViewports-12262
  If the `multiviewPerViewViewports` feature is enabled, then the index of the most significant bit in current render pass instance `viewMask` must be less than the current value of `viewportCount`

- VUID-vkCmdDrawMeshTasksIndirectCountNV-multiviewPerViewViewports-12263
  If the `multiviewPerViewViewports` feature is enabled, then the index of the most significant bit in current render pass instance `viewMask` must be less than the current value of `scissorCount`

- VUID-vkCmdDrawMeshTasksIndirectCountNV-flags-11521
  If current render pass instance was begun with vkCmdBeginRendering with VkRenderingInfo::`flags` which includes VK_RENDERING_FRAGMENT_REGION_BIT_EXT, and if sample shading is enabled (explicitly or implicitly), then the minimum fraction for sample shading must equal 0.0

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-11522
  If the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, and the `dynamicRenderingUnusedAttachments` feature is not enabled, the graphics pipeline bound must have been created with a VkCustomResolveCreateInfoEXT

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-11523
  If the current render pass instance was begun with vkCmdBeginRendering and does not contain a custom resolve, and the `dynamicRenderingUnusedAttachments` feature is not enabled, the graphics pipeline bound must not have been created with a VkCustomResolveCreateInfoEXT

- VUID-vkCmdDrawMeshTasksIndirectCountNV-customResolve-11524
  If the current render pass instance was begun with vkCmdBeginRendering and vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, the graphics pipeline bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_TRUE

- VUID-vkCmdDrawMeshTasksIndirectCountNV-customResolve-11525
  If the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, and vkCmdBeginCustomResolveEXT has not been recorded in the render pass instance, the graphics pipeline bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_FALSE

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-11861
  If the `dynamicRenderingUnusedAttachments` feature is not enabled and the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, the bound graphics pipeline must have been created with a VkCustomResolveCreateInfoEXT::`colorAttachmentCount` equal to VkRenderingInfo::`colorAttachmentCount`

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-11862
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound graphics pipeline

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-11863
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` equal to VK_NULL_HANDLE must have the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound pipeline equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectCountNV-dynamicRenderingUnusedAttachments-11864
  If the `dynamicRenderingUnusedAttachments` feature is enabled, the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound graphics pipeline, or the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats`, if it exists, must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-11865
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-11866
  If current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`

- VUID-vkCmdDrawMeshTasksIndirectCountNV-dynamicRenderingUnusedAttachments-11867
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, and the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-11868
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->resolveImageView` was VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-11869
  If current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`

- VUID-vkCmdDrawMeshTasksIndirectCountNV-dynamicRenderingUnusedAttachments-11870
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, and the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectCountNV-colorAttachmentCount-11871
  If the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0` and vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, then for each element of the VkRenderingInfo::`pColorAttachments` array with a `resolveImageView` not equal to VK_NULL_HANDLE, the `resolveImageView` must have been created with a sample count equal to the value of `rasterizationSamples` for the bound graphics pipeline

- VUID-vkCmdDrawMeshTasksIndirectCountNV-pDepthAttachment-11872
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`

- VUID-vkCmdDrawMeshTasksIndirectCountNV-pStencilAttachment-11873
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`

- VUID-vkCmdDrawMeshTasksIndirectCountNV-customResolve-11529
  If a shader object is bound to the fragment stage, the current render pass instance was begun with vkCmdBeginRendering, a fragment density map attachment is active, and vkCmdBeginCustomResolveEXT has been called, then the fragment shader object bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_TRUE

- VUID-vkCmdDrawMeshTasksIndirectCountNV-customResolve-11530
  If a shader object is bound to the fragment stage, the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, a fragment density map attachment is active, and vkCmdBeginCustomResolveEXT has not yet been called, then the fragment shader object bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_FALSE

- VUID-vkCmdDrawMeshTasksIndirectCountNV-flags-13361
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, then all bound shader objects must have been created with the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit

- VUID-vkCmdDrawMeshTasksIndirectCountNV-flags-13362
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, then the pipeline layout of the bound descriptor sets must have been created with VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT set

- VUID-vkCmdDrawMeshTasksIndirectCountNV-flags-13363
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, and any of the descriptor set layouts used to create the pipeline layout of the bound descriptor sets were created with any binding’s VkDescriptorSetLayoutBinding::`stageFlags` set with VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT, then there must be no binding with VkDescriptorSetLayoutBinding::`stageFlags` set with VK_SHADER_STAGE_TASK_BIT_EXT or VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-vkCmdDrawMeshTasksIndirectCountNV-flags-13364
  If there are any shader objects bound that were created with `flags` that includes both the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR and VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT bits, the pipeline layout of the bound descriptor sets must have been created with VK_PIPELINE_LAYOUT_CREATE_NO_TASK_SHADER_BIT_KHR set

- VUID-vkCmdDrawMeshTasksIndirectCountNV-flags-13365
  If there are any shader objects bound that were created with `flags` that includes both the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR and VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT bits, there must be no shader object bound to the VK_SHADER_STAGE_TASK_BIT_EXT stage

- VUID-vkCmdDrawMeshTasksIndirectCountNV-stage-06480
  The bound graphics pipeline must not have been created with the VkPipelineShaderStageCreateInfo::`stage` member of any element of VkGraphicsPipelineCreateInfo::`pStages` set to VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT

- VUID-vkCmdDrawMeshTasksIndirectCountNV-pStages-10680
  If there is no bound graphics pipeline, `vkCmdBindShadersEXT` must not have last bound the `pStages` element of VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT with a valid shader object other than VK_NULL_HANDLE

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-07074
  Transform Feedback Queries must not be active

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-07075
  Primitives Generated Queries must not be active

- VUID-vkCmdDrawMeshTasksIndirectCountNV-pipelineStatistics-07076
  The `pipelineStatistics` member used to create any active Pipeline Statistics Query must not contain VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT, VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT, VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT, VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT, VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT, VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT, VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT, VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT, or VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-08694
  If there is no bound graphics pipeline, and both the `taskShader` and `meshShader` features are enabled, and a valid `VkShaderEXT` is bound the to the VK_SHADER_STAGE_MESH_BIT_EXT stage, and that `VkShaderEXT` was created without the VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT flag, a valid `VkShaderEXT` must be bound to the VK_SHADER_STAGE_TASK_BIT_EXT stage

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-08695
  If there is no bound graphics pipeline, and both the `taskShader` and `meshShader` features are enabled, and a valid `VkShaderEXT` is bound the to the VK_SHADER_STAGE_MESH_BIT_EXT stage, and that `VkShaderEXT` was created with the VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT flag, there must be no `VkShaderEXT` bound to the VK_SHADER_STAGE_TASK_BIT_EXT stage

- VUID-vkCmdDrawMeshTasksIndirectCountNV-buffer-02708
  If `buffer` is non-sparse then it must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-vkCmdDrawMeshTasksIndirectCountNV-buffer-02709
  `buffer` must have been created with the VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT usage flag set

- VUID-vkCmdDrawMeshTasksIndirectCountNV-offset-02710
  `offset` must be a multiple of `4`

- VUID-vkCmdDrawMeshTasksIndirectCountNV-commandBuffer-02711
  `commandBuffer` must not be a protected command buffer

- VUID-vkCmdDrawMeshTasksIndirectCountNV-countBuffer-02714
  If `countBuffer` is non-sparse then it must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-vkCmdDrawMeshTasksIndirectCountNV-countBuffer-02715
  `countBuffer` must have been created with the VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT usage flag set

- VUID-vkCmdDrawMeshTasksIndirectCountNV-countBufferOffset-02716
  `countBufferOffset` must be a multiple of `4`

- VUID-vkCmdDrawMeshTasksIndirectCountNV-countBuffer-02717
  The count stored in `countBuffer` must be less than or equal to `VkPhysicalDeviceLimits`::`maxDrawIndirectCount`

- VUID-vkCmdDrawMeshTasksIndirectCountNV-countBufferOffset-04129
  (`countBufferOffset` + `sizeof`(uint32_t)) must be less than or equal to the size of `countBuffer`

- VUID-vkCmdDrawMeshTasksIndirectCountNV-None-04445
  If the `drawIndirectCount` feature is not enabled this function must not be used

- VUID-vkCmdDrawMeshTasksIndirectCountNV-stride-02182
  `stride` must be a multiple of `4` and must be greater than or equal to `sizeof`(`VkDrawMeshTasksIndirectCommandNV`)

- VUID-vkCmdDrawMeshTasksIndirectCountNV-maxDrawCount-02183
  If `maxDrawCount` is greater than or equal to `1`, (`stride` × (`maxDrawCount` - 1) + `offset` + `sizeof`(`VkDrawMeshTasksIndirectCommandNV`)) must be less than or equal to the size of `buffer`

- VUID-vkCmdDrawMeshTasksIndirectCountNV-MeshNV-07082
  The current pipeline bound to VK_PIPELINE_BIND_POINT_GRAPHICS must contain a shader stage using the `MeshNV` `Execution` `Model`

Valid Usage (Implicit)

- VUID-vkCmdDrawMeshTasksIndirectCountNV-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdDrawMeshTasksIndirectCountNV-buffer-parameter
  `buffer` must be a valid VkBuffer handle

- VUID-vkCmdDrawMeshTasksIndirectCountNV-countBuffer-parameter
  `countBuffer` must be a valid VkBuffer handle

- VUID-vkCmdDrawMeshTasksIndirectCountNV-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdDrawMeshTasksIndirectCountNV-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdDrawMeshTasksIndirectCountNV-renderpass
  This command must only be called inside of a render pass instance

- VUID-vkCmdDrawMeshTasksIndirectCountNV-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdDrawMeshTasksIndirectCountNV-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdDrawMeshTasksIndirectCountNV-commonparent
  Each of `buffer`, `commandBuffer`, and `countBuffer` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Inside | Outside | VK_QUEUE_GRAPHICS_BIT | Action

Conditional Rendering

vkCmdDrawMeshTasksIndirectCountNV is affected by conditional rendering

To record a mesh tasks drawing command, call:

    // Provided by VK_EXT_mesh_shader
    void vkCmdDrawMeshTasksEXT(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    groupCountX,
        uint32_t                                    groupCountY,
        uint32_t                                    groupCountZ);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `groupCountX` is the number of local workgroups to dispatch in the X dimension.

- `groupCountY` is the number of local workgroups to dispatch in the Y dimension.

- `groupCountZ` is the number of local workgroups to dispatch in the Z dimension.

When the command is executed, a global workgroup consisting of `groupCountX` × `groupCountY` × `groupCountZ` local workgroups is assembled.

Valid Usage

- VUID-vkCmdDrawMeshTasksEXT-magFilter-04553
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdDrawMeshTasksEXT-magFilter-09598
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdDrawMeshTasksEXT-mipmapMode-04770
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdDrawMeshTasksEXT-mipmapMode-09599
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdDrawMeshTasksEXT-unnormalizedCoordinates-09635
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `levelCount` and `layerCount` must be 1

- VUID-vkCmdDrawMeshTasksEXT-None-08609
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `viewType` must be VK_IMAGE_VIEW_TYPE_1D or VK_IMAGE_VIEW_TYPE_2D

- VUID-vkCmdDrawMeshTasksEXT-None-08610
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions with `ImplicitLod`, `Dref` or `Proj` in their name

- VUID-vkCmdDrawMeshTasksEXT-None-08611
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions that includes a LOD bias or any offset values

- VUID-vkCmdDrawMeshTasksEXT-None-06479
  If a VkImageView is sampled with depth comparison, the image view’s format features must contain VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT

- VUID-vkCmdDrawMeshTasksEXT-None-02691
  If a VkImageView is accessed using atomic operations as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT

- VUID-vkCmdDrawMeshTasksEXT-None-07888
  If a VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER descriptor is accessed using atomic operations as a result of this command, then the storage texel buffer’s format features must contain VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT

- VUID-vkCmdDrawMeshTasksEXT-None-02692
  If a VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT

- VUID-vkCmdDrawMeshTasksEXT-None-02693
  If the VK_EXT_filter_cubic extension is not enabled and any VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, it must not have a VkImageViewType of VK_IMAGE_VIEW_TYPE_3D, VK_IMAGE_VIEW_TYPE_CUBE, or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY

- VUID-vkCmdDrawMeshTasksEXT-filterCubic-02694
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have a VkImageViewType and format that supports cubic filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubic` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdDrawMeshTasksEXT-filterCubicMinmax-02695
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX as a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubicMinmax` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdDrawMeshTasksEXT-cubicRangeClamp-09212
  If the `cubicRangeClamp` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must not have a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM

- VUID-vkCmdDrawMeshTasksEXT-reductionMode-09213
  Any VkImageView being sampled with a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM as a result of this command must sample with VK_FILTER_CUBIC_EXT

- VUID-vkCmdDrawMeshTasksEXT-selectableCubicWeights-09214
  If the `selectableCubicWeights` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have VkSamplerCubicWeightsCreateInfoQCOM::`cubicWeights` equal to VK_CUBIC_FILTER_WEIGHTS_CATMULL_ROM_QCOM

- VUID-vkCmdDrawMeshTasksEXT-flags-02696
  Any VkImage created with a VkImageCreateInfo::`flags` containing VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV sampled as a result of this command must only be sampled using a VkSamplerAddressMode of VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawMeshTasksEXT-OpTypeImage-07027
  For any VkImageView being written as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawMeshTasksEXT-OpTypeImage-07028
  For any VkImageView being read as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawMeshTasksEXT-OpTypeImage-07029
  For any VkBufferView being written as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown`, the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawMeshTasksEXT-OpTypeImage-07030
  Any VkBufferView being read as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown` then the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawMeshTasksEXT-None-08600
  If a a bound shader was created with a pipeline layout and statically uses a set n, a descriptor set must have been bound to n at the same pipeline bind point, with layouts compatible for set n with the layout(s) used to create the shader, as described in Pipeline Layout Compatibility

- VUID-vkCmdDrawMeshTasksEXT-None-08601
  If a a bound shader was created with a pipeline layout or specified push constant ranges and statically uses a push constant value, that value must have been set for the same pipeline bind point, with push constant ranges that are compatible with the push constant range used to create the shader

- VUID-vkCmdDrawMeshTasksEXT-None-10068
  For each array of resources that is used by a bound shader, the indices used to access members of the array must be less than the descriptor count for the identified binding in the descriptor sets used by this command

- VUID-vkCmdDrawMeshTasksEXT-None-08114
  Descriptors in each bound descriptor set, specified via vkCmdBindDescriptorSets, must be valid if they are accessed as described by descriptor validity by the VkPipeline bound to the pipeline bind point used by this command and the bound VkPipeline was not created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawMeshTasksEXT-imageLayout-00344
  If an image descriptor is accessed by a shader, the VkImageLayout must match the subresource accessible from the VkImageView as defined by the image layout matching rules

- VUID-vkCmdDrawMeshTasksEXT-None-08115
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdBindDescriptorSets, the bound VkPipeline must have been created without VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawMeshTasksEXT-None-08116
  Descriptors in bound descriptor buffers, specified via vkCmdSetDescriptorBufferOffsetsEXT, must be valid if they are dynamically accessed

- VUID-vkCmdDrawMeshTasksEXT-None-08117
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdSetDescriptorBufferOffsetsEXT, the bound VkPipeline must have been created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawMeshTasksEXT-None-08119
  If a descriptor is dynamically used with a VkPipeline created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdDrawMeshTasksEXT-None-08605
  If a descriptor is dynamically used with a VkShaderEXT created with a `VkDescriptorSetLayout` that was created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdDrawMeshTasksEXT-None-08606
  If the `shaderObject` feature is not enabled, a valid pipeline must be bound to the pipeline bind point used by this command

- VUID-vkCmdDrawMeshTasksEXT-None-08608
  If a pipeline is bound to the pipeline bind point used by this command, there must not have been any calls to dynamic state setting commands for any state specified statically in the VkPipeline object bound to the pipeline bind point used by this command, since that pipeline was bound

- VUID-vkCmdDrawMeshTasksEXT-uniformBuffers-06935
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawMeshTasksEXT-None-08612
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawMeshTasksEXT-storageBuffers-06936
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawMeshTasksEXT-None-08613
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a storage buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawMeshTasksEXT-commandBuffer-02707
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, any resource accessed by bound shaders must not be a protected resource

- VUID-vkCmdDrawMeshTasksEXT-viewType-07752
  If a VkImageView is accessed as a result of this command, then the image view’s `viewType` must match the `Dim` operand of the `OpTypeImage` as described in Compatibility Between SPIR-V Image Dimensions and Vulkan ImageView Types

- VUID-vkCmdDrawMeshTasksEXT-format-07753
  If a VkImageView or VkBufferView is accessed as a result of this command, then the numeric type of the view’s `format` and the `Sampled` `Type` operand of the `OpTypeImage` must match

- VUID-vkCmdDrawMeshTasksEXT-OpImageWrite-08795
  If a VkImageView created with a format other than VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the image view’s format

- VUID-vkCmdDrawMeshTasksEXT-OpImageWrite-08796
  If a VkImageView created with the format VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have four components

- VUID-vkCmdDrawMeshTasksEXT-OpImageWrite-04469
  If a VkBufferView is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the buffer view’s format

- VUID-vkCmdDrawMeshTasksEXT-SampledType-04470
  If a VkImageView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdDrawMeshTasksEXT-SampledType-04471
  If a VkImageView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdDrawMeshTasksEXT-SampledType-04472
  If a VkBufferView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdDrawMeshTasksEXT-SampledType-04473
  If a VkBufferView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdDrawMeshTasksEXT-sparseImageInt64Atomics-04474
  If the `sparseImageInt64Atomics` feature is not enabled, VkImage objects created with the VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdDrawMeshTasksEXT-sparseImageInt64Atomics-04475
  If the `sparseImageInt64Atomics` feature is not enabled, VkBuffer objects created with the VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdDrawMeshTasksEXT-OpImageSampleWeightedQCOM-06971
  If `OpImageSampleWeightedQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_SAMPLED_IMAGE_BIT_QCOM

- VUID-vkCmdDrawMeshTasksEXT-OpImageSampleWeightedQCOM-06972
  If `OpImageSampleWeightedQCOM` uses a VkImageView as a sample weight image as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_IMAGE_BIT_QCOM

- VUID-vkCmdDrawMeshTasksEXT-OpImageBoxFilterQCOM-06973
  If `OpImageBoxFilterQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BOX_FILTER_SAMPLED_BIT_QCOM

- VUID-vkCmdDrawMeshTasksEXT-OpImageBlockMatchSSDQCOM-06974
  If `OpImageBlockMatchSSDQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdDrawMeshTasksEXT-OpImageBlockMatchSADQCOM-12420
  If `OpImageBlockMatchSADQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdDrawMeshTasksEXT-OpImageBlockMatchSADQCOM-06976
  If `OpImageBlockMatchSADQCOM` or OpImageBlockMatchSSDQCOM is used to read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdDrawMeshTasksEXT-OpImageSampleWeightedQCOM-06977
  If `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdDrawMeshTasksEXT-OpImageSampleWeightedQCOM-06978
  If any command other than `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must not have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdDrawMeshTasksEXT-OpImageBlockMatchWindow-09215
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM

- VUID-vkCmdDrawMeshTasksEXT-OpImageBlockMatchWindow-09216
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format must be a single-component format

- VUID-vkCmdDrawMeshTasksEXT-OpImageBlockMatchWindow-09217
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdDrawMeshTasksEXT-OpImageBlockMatchWindow-12421
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the `blockMatchExtendedClampToEdge` feature is not enabled, the input sampler must not have been created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawMeshTasksEXT-addressModeU-12422
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the input sampler was created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, then the sampler must have been created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawMeshTasksEXT-None-07288
  Any shader invocation executed by this command must terminate

- VUID-vkCmdDrawMeshTasksEXT-None-09600
  If a descriptor with type equal to any of VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, or VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT is accessed as a result of this command, all image subresources identified by that descriptor must be in the image layout identified when the descriptor was written

- VUID-vkCmdDrawMeshTasksEXT-micromap-11636
  If an acceleration structure is accessed as a result of this command through an `OpRayQueryProceedKHR` operation , the `VK_EXT_opacity_micromap` extension is not enabled, and the acceleration structure is built using geometry with a VkAccelerationStructureTrianglesOpacityMicromapKHR structure included in its `pNext` chain, the shader must have specified a `OpacityMicromapIdKHR` execution mode with its specialization constant operand equal to VK_TRUE

- VUID-vkCmdDrawMeshTasksEXT-micromap-11637
  If an acceleration structure is accessed as a result of this command and the acceleration structure was constructed through deserialization, all micromap arrays referenced by the acceleration structure that were not replaced by an acceleration structure update command must have been deserialized using the serialized data of the corresponding micromaps used to originally build the acceleration structure prior to the execution of this command on the device

- VUID-vkCmdDrawMeshTasksEXT-micromap-11638
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkPipeline bound to the pipeline bind point used by this command must not have been created with `flags` that includes VK_PIPELINE_CREATE_2_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_KHR

- VUID-vkCmdDrawMeshTasksEXT-micromap-11639
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkShaderEXT that accessed the descriptor must not have been created with `flags` that includes VK_SHADER_CREATE_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_EXT

- VUID-vkCmdDrawMeshTasksEXT-commandBuffer-10746
  The `VkDeviceMemory` object allocated from a `VkMemoryHeap` with the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property that is bound to a resource accessed as a result of this command must be the active bound tile memory object in `commandBuffer`

- VUID-vkCmdDrawMeshTasksEXT-None-10678
  If this command is recorded inside a tile shading render pass instance, the stages corresponding to the pipeline bind point used by this command must only include VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_FRAGMENT_BIT, and/or VK_SHADER_STAGE_COMPUTE_BIT

- VUID-vkCmdDrawMeshTasksEXT-None-10679
  If this command is recorded where per-tile execution model is enabled, there must be no access to any image while the image was be transitioned to the VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT layout

- VUID-vkCmdDrawMeshTasksEXT-pDescription-09900
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the underlying VkTensorARM object must have been created with the VK_TENSOR_USAGE_SHADER_BIT_ARM usage flag set

- VUID-vkCmdDrawMeshTasksEXT-dimensionCount-09905
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the `Rank` of the `OpTypeTensorARM` of the tensor resource variable must be equal to the `dimensionCount` provided via VkTensorCreateInfoARM::`pDescription` when creating the underlying VkTensorARM object

- VUID-vkCmdDrawMeshTasksEXT-OpTypeTensorARM-09906
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the element type of the `OpTypeTensorARM` of the tensor resource variable must be compatible with the VkFormat of the VkTensorViewARM used for the access

- VUID-vkCmdDrawMeshTasksEXT-OpTensorReadARM-12462
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, using `OpTensorReadARM` or `OpTensorWriteARM`, and the underlying VkTensorARM object was created with a VK_TENSOR_TILING_BRICK_16_WIDE_ARM, VK_TENSOR_TILING_BRICK_8_WIDE_ARM, VK_TENSOR_TILING_BRICK_4_WIDE_ARM, VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_ARM, or VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_64K_ARM VkTensorTilingARM, and the object read or written is an array, then the innermost coordinate provided to `OpTensorReadARM` or `OpTensorWriteARM` via the `Coordinates` operand must be a multiple of the largest power of 2 that is less than or equal to the number of components of the array

- VUID-vkCmdDrawMeshTasksEXT-pNext-12463
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command and the corresponding VkTensorARM object was created with a VkTensorRollingBackingCreateInfoARM structure in the `pNext` chain of VkTensorCreateInfoARM, then the number of elements accessed with one `OpTensorReadARM` or `OpTensorWriteARM`, must be less than or equal to the number of elements available from the starting coordinate in the rolling backing along the innermost dimension, defined as `wraps`[`dimensionCount` - 1] - InnermostCoordinate % `wraps`[`dimensionCount` - 1] where InnermostCoordinate is the last component of the coordinates array provided via the `Coordinates` operand

- VUID-vkCmdDrawMeshTasksEXT-None-12472
  Descriptors dynamically accessed in bound descriptor heaps must be valid

- VUID-vkCmdDrawMeshTasksEXT-None-11297
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a `OpTypeStruct` decorated with `Block` or `BufferBlock` using that mapping, the calculated offset for the resource heap must be a multiple of `bufferDescriptorAlignment`

- VUID-vkCmdDrawMeshTasksEXT-None-11298
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeImage` or `OpTypeSampledImage` using that mapping, the calculated offset for the resource heap must be a multiple of `imageDescriptorAlignment`

- VUID-vkCmdDrawMeshTasksEXT-None-11299
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeSampler` or `OpTypeSampledImage` using that mapping, the calculated offset for the sampler heap must be a multiple of `samplerDescriptorAlignment`

- VUID-vkCmdDrawMeshTasksEXT-None-11397
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeTensorARM` using that mapping, the calculated offset for the resource heap must be a multiple of `tensorDescriptorAlignment`

- VUID-vkCmdDrawMeshTasksEXT-None-11300
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 4

- VUID-vkCmdDrawMeshTasksEXT-None-11301
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdDrawMeshTasksEXT-None-11302
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress

- VUID-vkCmdDrawMeshTasksEXT-None-11304
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 8

- VUID-vkCmdDrawMeshTasksEXT-None-11305
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdDrawMeshTasksEXT-None-11306
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address pointed to by the address in push data must be a valid VkDeviceAddress

- VUID-vkCmdDrawMeshTasksEXT-None-11308
  For each descriptor heap that is statically used by a bound shader, either directly or via a descriptor mapping, a valid descriptor heap must be bound

- VUID-vkCmdDrawMeshTasksEXT-None-11309
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, execution of this command must not result in any descriptor read accessing data outside of the user range of the respective heap bound by `vkCmdBind*HeapEXT` commands

- VUID-vkCmdDrawMeshTasksEXT-None-11372
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer or uniform texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified via VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawMeshTasksEXT-None-11373
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer or storage texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawMeshTasksEXT-None-11374
  If the `robustBufferAccess2` feature is not enabled, the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, uniform texel buffer, storage buffer, or storage texel buffer, that shader must not access values outside of the range of the buffer as specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawMeshTasksEXT-pBindInfo-11375
  If any bound shader uses an embedded sampler via a descriptor mapping, the value of `pBindInfo->reservedRangeSize` set for vkCmdBindSamplerHeapEXT must be greater than or equal to `minSamplerHeapReservedRangeWithEmbedded`

- VUID-vkCmdDrawMeshTasksEXT-None-11376
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, and that shader statically uses a push constant value, that value must have been set by vkCmdPushDataEXT

- VUID-vkCmdDrawMeshTasksEXT-None-11398
  If a bound shader was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the access must not be out of bounds

- VUID-vkCmdDrawMeshTasksEXT-None-11437
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the buffer from which the address in push data was queried must have been created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdDrawMeshTasksEXT-None-11438
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdDrawMeshTasksEXT-None-11441
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must be aligned to `minUniformBufferOffsetAlignment`

- VUID-vkCmdDrawMeshTasksEXT-None-11439
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_STORAGE_BUFFER_BIT usage flag set

- VUID-vkCmdDrawMeshTasksEXT-None-11442
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must be aligned to `minStorageBufferOffsetAlignment`

- VUID-vkCmdDrawMeshTasksEXT-None-11485
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses an acceleration structure using that mapping, the address that the acceleration structure is mapped to must be an acceleration structure address retrieved from a VkAccelerationStructureKHR object via vkGetAccelerationStructureDeviceAddressKHR or handle retrieved from a VkAccelerationStructureNV object via vkGetAccelerationStructureHandleNV

- VUID-vkCmdDrawMeshTasksEXT-index-11450
  If a shader uses a sampler descriptor to sample an image as a result of this command, and that sampler descriptor uses a custom border color with an index defined by VkSamplerCustomBorderColorIndexCreateInfoEXT, the value of VkSamplerCustomBorderColorIndexCreateInfoEXT::`index` must have been registered before this command was recorded, and still be registered during the sampling operation, with an identically defined color

- VUID-vkCmdDrawMeshTasksEXT-protectedNoFault-11455
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, the address that the resource is mapped to must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdDrawMeshTasksEXT-protectedNoFault-11456
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, the address of the indirect memory must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdDrawMeshTasksEXT-renderPass-02684
  The current render pass must be compatible with the `renderPass` member of the `VkGraphicsPipelineCreateInfo` structure specified when creating the `VkPipeline` bound to VK_PIPELINE_BIND_POINT_GRAPHICS

- VUID-vkCmdDrawMeshTasksEXT-subpass-02685
  The subpass index of the current render pass must be equal to the `subpass` member of the `VkGraphicsPipelineCreateInfo` structure specified when creating the `VkPipeline` bound to VK_PIPELINE_BIND_POINT_GRAPHICS

- VUID-vkCmdDrawMeshTasksEXT-OpTypeImage-07468
  If any shader executed by this pipeline accesses an `OpTypeImage` variable with a `Dim` operand of `SubpassData`, it must be decorated with an `InputAttachmentIndex` that corresponds to a valid input attachment in the current subpass

- VUID-vkCmdDrawMeshTasksEXT-None-07469
  Input attachment views accessed in a subpass must be created with the same VkFormat as the corresponding subpass definition, and be created with a VkImageView that is compatible with the attachment referenced by the subpass' `pInputAttachments`[`InputAttachmentIndex`] in the bound VkFramebuffer as specified by Fragment Input Attachment Compatibility

- VUID-vkCmdDrawMeshTasksEXT-pDepthInputAttachmentIndex-09595
  Input attachment views accessed in a dynamic render pass with a `InputAttachmentIndex` referenced by VkRenderingInputAttachmentIndexInfo, or no `InputAttachmentIndex` if VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` or VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` are `NULL`, must be created with a VkImageView that is compatible with the corresponding color, depth, or stencil attachment in VkRenderingInfo

- VUID-vkCmdDrawMeshTasksEXT-pDepthInputAttachmentIndex-09596
  Input attachment views accessed in a dynamic render pass via a shader object must have an `InputAttachmentIndex` if both VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` and VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` are non-`NULL`

- VUID-vkCmdDrawMeshTasksEXT-InputAttachmentIndex-09597
  If an input attachment view accessed in a dynamic render pass via a shader object has an `InputAttachmentIndex`, the `InputAttachmentIndex` must match an index in VkRenderingInputAttachmentIndexInfo

- VUID-vkCmdDrawMeshTasksEXT-None-06537
  Memory backing image subresources used as attachments in the current render pass must not be written in any way other than as an attachment by this command

- VUID-vkCmdDrawMeshTasksEXT-None-10795
  If a color attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_COLOR_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawMeshTasksEXT-None-10796
  If a depth attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_DEPTH_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawMeshTasksEXT-None-10797
  If a stencil attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_STENCIL_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawMeshTasksEXT-None-12338
  If a color attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_COLOR_BIT on that attachment, the color attachment must not be written to by this command

- VUID-vkCmdDrawMeshTasksEXT-None-12339
  If a depth attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_DEPTH_BIT on that attachment, the depth attachment must not be written to by this command

- VUID-vkCmdDrawMeshTasksEXT-None-12340
  If a stencil attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_STENCIL_BIT on that attachment, the stencil attachment must not be written to by this command

- VUID-vkCmdDrawMeshTasksEXT-None-09003
  If an attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, it must not be accessed in any way other than as an attachment, storage image, or sampled image by this command

- VUID-vkCmdDrawMeshTasksEXT-None-06886
  If the current render pass instance uses a depth/stencil attachment with a read-only layout for the depth aspect, depth writes must be disabled

- VUID-vkCmdDrawMeshTasksEXT-None-06887
  If the current render pass instance uses a depth/stencil attachment with a read-only layout for the stencil aspect, both front and back `writeMask` are not zero, and stencil test is enabled, all stencil ops must be VK_STENCIL_OP_KEEP

- VUID-vkCmdDrawMeshTasksEXT-None-07831
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT dynamic state enabled then vkCmdSetViewport must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksEXT-None-07832
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SCISSOR dynamic state enabled then vkCmdSetScissor must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksEXT-None-08617
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_WIDTH dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineWidth must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksEXT-None-07834
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BIAS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthBiasEnable` is VK_TRUE, then vkCmdSetDepthBias or vkCmdSetDepthBias2EXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksEXT-None-07835
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_BLEND_CONSTANTS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and an active color attachment current value of `blendEnable` is VK_TRUE with a blend equations where any VkBlendFactor member is VK_BLEND_FACTOR_CONSTANT_COLOR, VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR, VK_BLEND_FACTOR_CONSTANT_ALPHA, or VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA, then vkCmdSetBlendConstants must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksEXT-None-07836
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BOUNDS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthBoundsTestEnable` is VK_TRUE, then vkCmdSetDepthBounds must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksEXT-None-07837
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilCompareMask must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksEXT-None-07838
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_WRITE_MASK dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilWriteMask must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksEXT-None-07839
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_REFERENCE dynamic state enabled, the current value of and `rasterizerDiscardEnable` is VK_FALSE, the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilReference must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksEXT-maxMultiviewInstanceIndex-02688
  If the draw is recorded in a render pass instance with multiview enabled, the maximum instance index must be less than or equal to VkPhysicalDeviceMultiviewProperties::`maxMultiviewInstanceIndex`

- VUID-vkCmdDrawMeshTasksEXT-sampleLocationsEnable-02689
  If the bound graphics pipeline was created with VkPipelineSampleLocationsStateCreateInfoEXT::`sampleLocationsEnable` set to VK_TRUE, then the active depth attachment must have been created with the VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit set

- VUID-vkCmdDrawMeshTasksEXT-None-07634
  If the `VK_EXT_sample_locations` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetSampleLocationsEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksEXT-None-06666
  If the `VK_EXT_sample_locations` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `sampleLocationsEnable` is VK_TRUE, then vkCmdSetSampleLocationsEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksEXT-None-07840
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_CULL_MODE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCullMode must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksEXT-None-07841
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRONT_FACE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetFrontFace must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksEXT-None-07843
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, vkCmdSetDepthTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksEXT-None-07844
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthTestEnable` is VK_TRUE, then vkCmdSetDepthWriteEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksEXT-None-07845
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_COMPARE_OP dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthTestEnable` is VK_TRUE, then vkCmdSetDepthCompareOp must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksEXT-None-07846
  If the `depthBounds` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthBoundsTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksEXT-None-07847
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetStencilTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksEXT-None-07848
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_OP dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilOp must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksEXT-viewportCount-03417
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, and the state is not inherited, then vkCmdSetViewportWithCount must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksEXT-scissorCount-03418
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT dynamic state enabled, and the state is not inherited, then vkCmdSetScissorWithCount must have been called and not subsequently invalidated in the current command buffer prior to this drawing

- VUID-vkCmdDrawMeshTasksEXT-viewportCount-03419
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with both the VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic states enabled, and the state is not inherited, then the `viewportCount` parameter of `vkCmdSetViewportWithCount` must match the `scissorCount` parameter of `vkCmdSetScissorWithCount`

- VUID-vkCmdDrawMeshTasksEXT-viewportCount-04137
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportWScalingStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksEXT-viewportCount-04138
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, the current value of `viewportWScalingEnable` is VK_TRUE, then vkCmdSetViewportWScalingNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksEXT-None-08636
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, the current value of `viewportWScalingEnable` is VK_TRUE, then the `viewportCount` parameter in the last call to vkCmdSetViewportWScalingNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksEXT-viewportCount-04139
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportShadingRateImageStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksEXT-shadingRateImage-09233
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_COARSE_SAMPLE_ORDER_NV and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoarseSampleOrderNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksEXT-shadingRateImage-09234
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `shadingRateImageEnable` is VK_TRUE, then vkCmdSetViewportShadingRatePaletteNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksEXT-None-08637
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `shadingRateImageEnable` is VK_TRUE, then the `viewportCount` parameter in the last call to vkCmdSetViewportShadingRatePaletteNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksEXT-VkPipelineVieportCreateInfo-04141
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled and a VkPipelineViewportSwizzleStateCreateInfoNV structure chained from VkPipelineViewportStateCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportSwizzleStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksEXT-VkPipelineVieportCreateInfo-04142
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled and a VkPipelineViewportExclusiveScissorStateCreateInfoNV structure chained from VkPipelineViewportStateCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportExclusiveScissorStateCreateInfoNV::`exclusiveScissorCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksEXT-None-07878
  If the `exclusiveScissor` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_ENABLE_NV dynamic state enabled, then vkCmdSetExclusiveScissorEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksEXT-None-07879
  If the `exclusiveScissor` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_NV dynamic state enabled, and the most recent call to vkCmdSetExclusiveScissorEnableNV in the current command buffer set any element of `pExclusiveScissorEnables` to VK_TRUE, then vkCmdSetExclusiveScissorNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksEXT-None-04876
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE dynamic state enabled, then vkCmdSetRasterizerDiscardEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksEXT-None-04877
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthBiasEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksEXT-logicOp-04878
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LOGIC_OP_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `logicOpEnable` is VK_TRUE, then vkCmdSetLogicOpEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksEXT-primitiveFragmentShadingRateWithMultipleViewports-04552
  If the `primitiveFragmentShadingRateWithMultipleViewports` limit is not supported, the bound graphics pipeline was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, and any of the shader stages of the bound graphics pipeline write to the `PrimitiveShadingRateKHR` built-in, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and the `viewportCount` parameter of `vkCmdSetViewportWithCount` must be `1`

- VUID-vkCmdDrawMeshTasksEXT-primitiveFragmentShadingRateWithMultipleViewports-08642
  If the `primitiveFragmentShadingRateWithMultipleViewports` limit is not supported, and any shader object bound to a graphics stage writes to the `PrimitiveShadingRateKHR` built-in, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and the `viewportCount` parameter of `vkCmdSetViewportWithCount` must be `1`

- VUID-vkCmdDrawMeshTasksEXT-blendEnable-04727
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, then for each color attachment, if the corresponding image view’s format features do not contain VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT, then the corresponding current value of `blendEnable` must be VK_FALSE

- VUID-vkCmdDrawMeshTasksEXT-None-08644
  If a shader object is bound to any graphics stage or a graphics pipeline is bound, the current value of `rasterizerDiscardEnable` is VK_FALSE, and none of the following is enabled:

  - the `VK_AMD_mixed_attachment_samples` extension

  - the `VK_NV_framebuffer_mixed_samples` extension

  - the `multisampledRenderToSingleSampled` feature

  then the current value of `rasterizationSamples` must be the same as the current color and/or depth/stencil attachments

- VUID-vkCmdDrawMeshTasksEXT-None-08876
  If a shader object is bound to any graphics stage, the current render pass instance must have been begun with vkCmdBeginRendering

- VUID-vkCmdDrawMeshTasksEXT-imageView-06172
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawMeshTasksEXT-imageView-06173
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawMeshTasksEXT-imageView-06174
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawMeshTasksEXT-imageView-06175
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawMeshTasksEXT-imageView-06176
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawMeshTasksEXT-imageView-06177
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawMeshTasksEXT-viewMask-06178
  If the current render pass instance was begun with vkCmdBeginRendering, the bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::`viewMask` equal to VkRenderingInfo::`viewMask`

- VUID-vkCmdDrawMeshTasksEXT-colorAttachmentCount-06179
  If the `dynamicRenderingUnusedAttachments` feature is not enabled and the current render pass instance was begun with vkCmdBeginRendering, the bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::`colorAttachmentCount` equal to VkRenderingInfo::`colorAttachmentCount`

- VUID-vkCmdDrawMeshTasksEXT-dynamicRenderingUnusedAttachments-08910
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound graphics pipeline

- VUID-vkCmdDrawMeshTasksEXT-dynamicRenderingUnusedAttachments-08912
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` equal to VK_NULL_HANDLE must have the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound pipeline equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksEXT-dynamicRenderingUnusedAttachments-08911
  If the `dynamicRenderingUnusedAttachments` feature is enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound graphics pipeline, or the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats`, if it exists, must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksEXT-colorAttachmentCount-09362
  If the current render pass instance was begun with vkCmdBeginRendering, with a VkRenderingInfo::`colorAttachmentCount` equal to `1`, there is no shader object bound to any graphics stage, and a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, each element of the VkRenderingInfo::`pColorAttachments` array with a `resolveImageView` not equal to VK_NULL_HANDLE must have been created with an image created with a VkExternalFormatANDROID::`externalFormat` value equal to the VkExternalFormatANDROID::`externalFormat` value used to create the bound graphics pipeline

- VUID-vkCmdDrawMeshTasksEXT-None-09363
  If there is no shader object bound to any graphics stage, the current render pass instance was begun with vkCmdBeginRendering and a VkRenderingInfo::`colorAttachmentCount` equal to `1`, and a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with an image created with a VkExternalFormatANDROID::`externalFormat` value equal to the VkExternalFormatANDROID::`externalFormat` value used to create the bound graphics pipeline

- VUID-vkCmdDrawMeshTasksEXT-None-09364
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetColorBlendEnableEXT must have set the blend enable to VK_FALSE prior to this drawing command

- VUID-vkCmdDrawMeshTasksEXT-None-09365
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetRasterizationSamplesEXT must have set `rasterizationSamples` to VK_SAMPLE_COUNT_1_BIT prior to this drawing command

- VUID-vkCmdDrawMeshTasksEXT-None-09368
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetFragmentShadingRateKHR must have set `pFragmentSize->width` to `1` prior to this drawing command

- VUID-vkCmdDrawMeshTasksEXT-None-09369
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetFragmentShadingRateKHR must have set `pFragmentSize->height` to `1` prior to this drawing command

- VUID-vkCmdDrawMeshTasksEXT-None-07749
  If the `colorWriteEnable` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorWriteEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksEXT-attachmentCount-07750
  If the `colorWriteEnable` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the `attachmentCount` parameter of most recent call to `vkCmdSetColorWriteEnableEXT` in the current command buffer must be greater than or equal to the number of active color attachments

- VUID-vkCmdDrawMeshTasksEXT-None-07751
  If the `VK_EXT_discard_rectangles` extension is enabled, a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT dynamic state enabled and the `pNext` chain of VkGraphicsPipelineCreateInfo included a VkPipelineDiscardRectangleStateCreateInfoEXT structure, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for each discard rectangle in VkPipelineDiscardRectangleStateCreateInfoEXT::`discardRectangleCount`

- VUID-vkCmdDrawMeshTasksEXT-rasterizerDiscardEnable-09236
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT dynamic state enabled and the `pNext` chain of VkGraphicsPipelineCreateInfo did not include a VkPipelineDiscardRectangleStateCreateInfoEXT structure, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for each discard rectangle in VkPhysicalDeviceDiscardRectanglePropertiesEXT::`maxDiscardRectangles`

- VUID-vkCmdDrawMeshTasksEXT-None-07880
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDiscardRectangleEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksEXT-None-07881
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_MODE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksEXT-dynamicRenderingUnusedAttachments-08913
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->imageView` was VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksEXT-dynamicRenderingUnusedAttachments-08914
  If current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawMeshTasksEXT-dynamicRenderingUnusedAttachments-08915
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, and the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->imageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksEXT-dynamicRenderingUnusedAttachments-08916
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->imageView` was VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksEXT-dynamicRenderingUnusedAttachments-08917
  If current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawMeshTasksEXT-dynamicRenderingUnusedAttachments-08918
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, and the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->imageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksEXT-imageView-06183
  If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentShadingRateAttachmentInfoKHR::`imageView` was not VK_NULL_HANDLE, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

- VUID-vkCmdDrawMeshTasksEXT-dynamicRenderingLocalRead-11797
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingLocalRead` feature is enabled, the VK_RENDERING_LOCAL_READ_CONCURRENT_ACCESS_CONTROL_BIT_KHR flag is specified, and an attachment is being used as a feedback loop as specified by VK_RENDERING_ATTACHMENT_INPUT_ATTACHMENT_FEEDBACK_BIT_KHR, VkRenderingAttachmentFlagsInfoKHR::`flags` for that attachment must include VK_RENDERING_ATTACHMENT_INPUT_ATTACHMENT_FEEDBACK_BIT_KHR

- VUID-vkCmdDrawMeshTasksEXT-imageView-06184
  If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentDensityMapAttachmentInfoEXT::`imageView` was not VK_NULL_HANDLE, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT

- VUID-vkCmdDrawMeshTasksEXT-layers-10831
  If the current render pass instance was created with VK_RENDERING_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE or VK_RENDER_PASS_CREATE_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE, and the bound graphics pipeline was created with VK_PIPELINE_CREATE_2_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE, then the current render pass instance must have a `layers` value less than or equal to VkPipelineFragmentDensityMapLayeredCreateInfoVALVE::`maxFragmentDensityMapLayers`

- VUID-vkCmdDrawMeshTasksEXT-colorAttachmentCount-06185
  If the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with a sample count equal to the corresponding element of the `pColorAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline

- VUID-vkCmdDrawMeshTasksEXT-pDepthAttachment-06186
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of the `depthStencilAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawMeshTasksEXT-pStencilAttachment-06187
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of the `depthStencilAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawMeshTasksEXT-multisampledRenderToSingleSampled-07285
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with a sample count equal to the value of `rasterizationSamples` for the bound graphics pipeline

- VUID-vkCmdDrawMeshTasksEXT-multisampledRenderToSingleSampled-07286
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawMeshTasksEXT-multisampledRenderToSingleSampled-07287
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawMeshTasksEXT-pNext-07935
  If this command is called inside a render pass instance started with vkCmdBeginRendering, and the `pNext` chain of VkRenderingInfo includes a VkMultisampledRenderToSingleSampledInfoEXT structure with `multisampledRenderToSingleSampledEnable` equal to VK_TRUE, then the value of `rasterizationSamples` for the bound graphics pipeline must be equal to VkMultisampledRenderToSingleSampledInfoEXT::`rasterizationSamples`

- VUID-vkCmdDrawMeshTasksEXT-renderPass-06198
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline must have been created with a VkGraphicsPipelineCreateInfo::`renderPass` equal to VK_NULL_HANDLE

- VUID-vkCmdDrawMeshTasksEXT-pColorAttachments-08963
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound with a fragment shader that statically writes to a color attachment, the color write mask is not zero, color writes are enabled, and the corresponding element of the VkRenderingInfo::`pColorAttachments->imageView` was not VK_NULL_HANDLE, then the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksEXT-pColorAttachments-11539
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound with a fragment shader that statically writes to a color attachment, the color write mask is not zero, color writes are enabled, and the corresponding element of the VkRenderingInfo::`pColorAttachments->resolveImageView` was not VK_NULL_HANDLE, then the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksEXT-pDepthAttachment-08964
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound, depth test is enabled, and the VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, then the VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksEXT-pDepthAttachment-11540
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound, depth test is enabled, and the VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, then the VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksEXT-pStencilAttachment-08965
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound, stencil test is enabled and the VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, then the VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksEXT-pStencilAttachment-11860
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound, stencil test is enabled and the VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, then the VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksEXT-flags-10582
  If the current render pass instance was begun with a vkCmdBeginRendering call in `commandBuffer`, its VkRenderingInfo::`flags` parameter must not have VK_RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT set unless VK_RENDERING_CONTENTS_INLINE_BIT_KHR is also set

- VUID-vkCmdDrawMeshTasksEXT-primitivesGeneratedQueryWithRasterizerDiscard-06708
  If the `primitivesGeneratedQueryWithRasterizerDiscard` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, rasterization discard must not be enabled

- VUID-vkCmdDrawMeshTasksEXT-primitivesGeneratedQueryWithNonZeroStreams-06709
  If the `primitivesGeneratedQueryWithNonZeroStreams` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, the bound graphics pipeline must not have been created with a non-zero value in `VkPipelineRasterizationStateStreamCreateInfoEXT`::`rasterizationStream`

- VUID-vkCmdDrawMeshTasksEXT-None-07620
  If the `depthClamp` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLAMP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthClampEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksEXT-None-07621
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_POLYGON_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetPolygonModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksEXT-None-07622
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetRasterizationSamplesEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksEXT-None-07623
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetSampleMaskEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksEXT-alphaToCoverageEnable-08919
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT dynamic state enabled, and `alphaToCoverageEnable` was VK_TRUE in the last call to vkCmdSetAlphaToCoverageEnableEXT, then the Fragment Output Interface must contain a variable for the alpha `Component` word in `Location` 0 at `Index` 0

- VUID-vkCmdDrawMeshTasksEXT-alphaToCoverageEnable-08920
  If a shader object is bound to any graphics stage, and the most recent call to vkCmdSetAlphaToCoverageEnableEXT in the current command buffer set `alphaToCoverageEnable` to VK_TRUE, then the Fragment Output Interface must contain a variable for the alpha `Component` word in `Location` 0 at `Index` 0

- VUID-vkCmdDrawMeshTasksEXT-None-07624
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAlphaToCoverageEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksEXT-None-07625
  If the `alphaToOne` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ALPHA_TO_ONE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAlphaToOneEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksEXT-None-07626
  If the `logicOp` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LOGIC_OP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetLogicOpEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksEXT-None-07627
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and there are color attachments bound, then vkCmdSetColorBlendEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksEXT-None-07629
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and there are color attachments bound, then vkCmdSetColorWriteMaskEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksEXT-None-07630
  If the `geometryStreams` feature is enabled, and a shader object is bound to the VK_SHADER_STAGE_GEOMETRY_BIT stage or a graphics pipeline is bound which was created with both a VK_SHADER_STAGE_GEOMETRY_BIT stage and the VK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXT dynamic state enabled, then vkCmdSetRasterizationStreamEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksEXT-None-07631
  If the `VK_EXT_conservative_rasterization` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_CONSERVATIVE_RASTERIZATION_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetConservativeRasterizationModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksEXT-None-07632
  If the `VK_EXT_conservative_rasterization` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXTRA_PRIMITIVE_OVERESTIMATION_SIZE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `conservativeRasterizationMode` is VK_CONSERVATIVE_RASTERIZATION_MODE_OVERESTIMATE_EXT, then vkCmdSetExtraPrimitiveOverestimationSizeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksEXT-conservativePointAndLineRasterization-07499
  If the `VK_EXT_conservative_rasterization` extension is enabled, `conservativePointAndLineRasterization` is not supported, a shader object is bound to any graphics stage or a graphics pipeline is bound, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line or point topology class, then the current value of `conservativeRasterizationMode` must be VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT

- VUID-vkCmdDrawMeshTasksEXT-None-07633
  If the `depthClipEnable` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLIP_ENABLE_EXT dynamic state, then vkCmdSetDepthClipEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksEXT-None-07636
  If the `VK_EXT_provoking_vertex` extension is enabled, a shader object is bound to the VK_SHADER_STAGE_VERTEX_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_PROVOKING_VERTEX_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetProvokingVertexModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksEXT-None-08666
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineRasterizationModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksEXT-None-08669
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineStippleEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksEXT-None-07849
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled and a shader object is bound to any graphics stage, or a bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stippledLineEnable` is VK_TRUE, then vkCmdSetLineStipple must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksEXT-None-10608
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic state enabled, the effective rasterization input topology is in the line topology class, and the current `lineRasterizationMode` is VK_LINE_RASTERIZATION_MODE_BRESENHAM or VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH, then the current `alphaToCoverageEnable`, `alphaToOneEnable` and `sampleShadingEnable` states must all be VK_FALSE

- VUID-vkCmdDrawMeshTasksEXT-None-07639
  If the `depthClipControl` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLIP_NEGATIVE_ONE_TO_ONE_EXT dynamic state enabled, then vkCmdSetDepthClipNegativeOneToOneEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksEXT-None-09650
  If the `depthClampControl` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLAMP_RANGE_EXT dynamic state enabled, and the current value of `depthClampEnable` is VK_TRUE, then vkCmdSetDepthClampRangeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksEXT-None-07640
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_ENABLE_NV dynamic state enabled, then vkCmdSetViewportWScalingEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksEXT-None-07641
  If the `VK_NV_viewport_swizzle` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic state enabled, then vkCmdSetViewportSwizzleNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksEXT-None-07642
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageToColorEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksEXT-None-07643
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_LOCATION_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageToColorEnable` is VK_TRUE, then vkCmdSetCoverageToColorLocationNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksEXT-None-07644
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_MODE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageModulationModeNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksEXT-None-07645
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageModulationMode` is any value other than VK_COVERAGE_MODULATION_MODE_NONE_NV, then vkCmdSetCoverageModulationTableEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksEXT-None-07646
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageModulationTableEnable` is VK_TRUE, then vkCmdSetCoverageModulationTableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksEXT-None-07647
  If the `shadingRateImage` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SHADING_RATE_IMAGE_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetShadingRateImageEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksEXT-pipelineFragmentShadingRate-09238
  If the `pipelineFragmentShadingRate` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetFragmentShadingRateKHR must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksEXT-None-07648
  If the `representativeFragmentTest` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_REPRESENTATIVE_FRAGMENT_TEST_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetRepresentativeFragmentTestEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksEXT-None-07649
  If the `coverageReductionMode` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageReductionModeNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksEXT-rasterizationSamples-07471
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current subpass does not use any color and/or depth/stencil attachments, then the `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT must follow the rules for a zero-attachment subpass

- VUID-vkCmdDrawMeshTasksEXT-samples-07472
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state disabled, then the `samples` parameter in the last call to vkCmdSetSampleMaskEXT must be greater or equal to the VkPipelineMultisampleStateCreateInfo::`rasterizationSamples` parameter used to create the bound graphics pipeline

- VUID-vkCmdDrawMeshTasksEXT-samples-07473
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT state and VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT states enabled, then the `samples` parameter in the last call to vkCmdSetSampleMaskEXT must be greater or equal to the `rasterizationSamples` parameter in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawMeshTasksEXT-None-09211
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, or a shader object is bound to any graphics stage, and the current render pass instance includes a VkMultisampledRenderToSingleSampledInfoEXT structure with `multisampledRenderToSingleSampledEnable` equal to VK_TRUE, then the `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT must be the same as the `rasterizationSamples` member of that structure

- VUID-vkCmdDrawMeshTasksEXT-firstAttachment-07476
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic states enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the last call to vkCmdSetColorBlendEnableEXT in the current command buffer prior to this drawing command must have set a value for all active color attachments

- VUID-vkCmdDrawMeshTasksEXT-firstAttachment-07478
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT dynamic states enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the last call to vkCmdSetColorWriteMaskEXT in the current command buffer prior to this drawing command must have set a value for all active color attachments

- VUID-vkCmdDrawMeshTasksEXT-advancedBlendMaxColorAttachments-07480
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT and VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic states enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and an active color attachment current value of `blendEnable` is VK_TRUE, then the number of active color attachments must not exceed `advancedBlendMaxColorAttachments`

- VUID-vkCmdDrawMeshTasksEXT-None-10862
  If a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT , but not the VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorBlendEquationEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawMeshTasksEXT-rasterizerDiscardEnable-10863
  If a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT, but not the VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorBlendAdvancedEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawMeshTasksEXT-None-10864
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT and VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then either vkCmdSetColorBlendAdvancedEXT or vkCmdSetColorBlendEquationEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawMeshTasksEXT-primitivesGeneratedQueryWithNonZeroStreams-07481
  If the `primitivesGeneratedQueryWithNonZeroStreams` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, and the bound graphics pipeline was created with VK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXT state enabled, the last call to vkCmdSetRasterizationStreamEXT must have set the `rasterizationStream` to zero

- VUID-vkCmdDrawMeshTasksEXT-sampleLocationsPerPixel-07482
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state disabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then the `sampleLocationsPerPixel` member of `pSampleLocationsInfo` in the last call to vkCmdSetSampleLocationsEXT must equal the `rasterizationSamples` member of the VkPipelineMultisampleStateCreateInfo structure the bound graphics pipeline has been created with

- VUID-vkCmdDrawMeshTasksEXT-sampleLocationsPerPixel-07483
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then the `sampleLocationsPerPixel` member of `pSampleLocationsInfo` in the last call to vkCmdSetSampleLocationsEXT must equal the `rasterizationSamples` parameter of the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawMeshTasksEXT-sampleLocationsEnable-07484
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT then the current active depth attachment must have been created with the VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit set

- VUID-vkCmdDrawMeshTasksEXT-sampleLocationsEnable-07485
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, then the `sampleLocationsInfo.maxSampleLocationGridSize.width` in the last call to vkCmdSetSampleLocationsEXT must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.width` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling `rasterizationSamples`

- VUID-vkCmdDrawMeshTasksEXT-sampleLocationsEnable-07486
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, then the `sampleLocationsInfo.maxSampleLocationGridSize.height` in the last call to vkCmdSetSampleLocationsEXT must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.height` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling `rasterizationSamples`

- VUID-vkCmdDrawMeshTasksEXT-sampleLocationsEnable-07487
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, the fragment shader code must not statically use the extended instruction `InterpolateAtSample`

- VUID-vkCmdDrawMeshTasksEXT-sampleLocationsEnable-07936
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationGridSize.width` must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.width` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling the value of `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawMeshTasksEXT-sampleLocationsEnable-07937
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationGridSize.height` must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.height` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling the value of `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawMeshTasksEXT-sampleLocationsEnable-07938
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationsPerPixel` must equal `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawMeshTasksEXT-coverageModulationTableEnable-07488
  If a shader object is bound to any graphics stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NV state enabled, and the last call to vkCmdSetCoverageModulationTableEnableNV set `coverageModulationTableEnable` to VK_TRUE, then the `coverageModulationTableCount` parameter in the last call to vkCmdSetCoverageModulationTableNV must equal the current `rasterizationSamples` divided by the number of color samples in the current active color attachment

- VUID-vkCmdDrawMeshTasksEXT-rasterizationSamples-07489
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, and if current subpass has a depth/stencil attachment and depth test, stencil test, or depth bounds test are enabled in the bound pipeline, then the current `rasterizationSamples` must be the same as the sample count of the depth/stencil attachment

- VUID-vkCmdDrawMeshTasksEXT-coverageToColorEnable-07490
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV state enabled and the last call to vkCmdSetCoverageToColorEnableNV set the `coverageToColorEnable` to VK_TRUE, then there must be an active color attachment at the location selected by the last call to vkCmdSetCoverageToColorLocationNV `coverageToColorLocation`, with a VkFormat of VK_FORMAT_R8_UINT, VK_FORMAT_R8_SINT, VK_FORMAT_R16_UINT, VK_FORMAT_R16_SINT, VK_FORMAT_R32_UINT, or VK_FORMAT_R32_SINT

- VUID-vkCmdDrawMeshTasksEXT-rasterizerDiscardEnable-09420
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, and a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, and the most recent call to vkCmdSetRasterizerDiscardEnable in the current command buffer set `rasterizerDiscardEnable` to VK_FALSE, and the last call to vkCmdSetCoverageToColorEnableNV set the `coverageToColorEnable` to VK_TRUE, then there must be an active color attachment at the location selected by the last call to vkCmdSetCoverageToColorLocationNV `coverageToColorLocation`, with a VkFormat of VK_FORMAT_R8_UINT, VK_FORMAT_R8_SINT, VK_FORMAT_R16_UINT, VK_FORMAT_R16_SINT, VK_FORMAT_R32_UINT, or VK_FORMAT_R32_SINT

- VUID-vkCmdDrawMeshTasksEXT-coverageReductionMode-07491
  If the `coverageReductionMode` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV or VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic states enabled, then the current values of `coverageReductionMode`, `rasterizationSamples`, the sample counts for the color and depth/stencil attachments (if the subpass has them) must be a valid combination returned by vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV

- VUID-vkCmdDrawMeshTasksEXT-viewportCount-07492
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportSwizzleStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksEXT-viewportCount-07493
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic states enabled then the `viewportCount` parameter in the last call to vkCmdSetViewportSwizzleNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksEXT-viewportCount-09421
  If the `VK_NV_viewport_swizzle` extension is enabled, and a shader object is bound to any graphics stage, then the `viewportCount` parameter in the last call to vkCmdSetViewportSwizzleNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksEXT-rasterizationSamples-07494
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, and the `coverageReductionMode` feature is not enabled, or the current value of `coverageReductionMode` is not VK_COVERAGE_REDUCTION_MODE_TRUNCATE_NV, and the current value of `rasterizationSamples` is greater than sample count of the color attachment, then sample shading must be disabled

- VUID-vkCmdDrawMeshTasksEXT-stippledLineEnable-07495
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_RECTANGULAR, then the `stippledRectangularLines` feature must be enabled

- VUID-vkCmdDrawMeshTasksEXT-stippledLineEnable-07496
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_BRESENHAM, then the `stippledBresenhamLines` feature must be enabled

- VUID-vkCmdDrawMeshTasksEXT-stippledLineEnable-07497
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH, then the `stippledSmoothLines` feature must be enabled

- VUID-vkCmdDrawMeshTasksEXT-stippledLineEnable-07498
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_DEFAULT, then the `stippledRectangularLines` feature must be enabled and VkPhysicalDeviceLimits::`strictLines` must be VK_TRUE

- VUID-vkCmdDrawMeshTasksEXT-stage-07073
  If the bound pipeline was created with the VkPipelineShaderStageCreateInfo::`stage` member of an element of VkGraphicsPipelineCreateInfo::`pStages` set to VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT, then Mesh Shader Queries must not be active

- VUID-vkCmdDrawMeshTasksEXT-None-08877
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ATTACHMENT_FEEDBACK_LOOP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAttachmentFeedbackLoopEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksEXT-None-07850
  If dynamic state was inherited from VkCommandBufferInheritanceViewportScissorInfoNV, it must be set in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksEXT-nextStage-10745
  For each shader object bound to a graphics stage, except for shader object bound to the last graphics stage in the logical pipeline, it must have been created with a `nextStage` including the corresponding bit to the shader object bound to the following graphics stage in the logical pipeline

- VUID-vkCmdDrawMeshTasksEXT-None-08684
  If there is no bound graphics pipeline, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_VERTEX_BIT

- VUID-vkCmdDrawMeshTasksEXT-None-08685
  If there is no bound graphics pipeline, and the `tessellationShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT

- VUID-vkCmdDrawMeshTasksEXT-None-08686
  If there is no bound graphics pipeline, and the `tessellationShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT

- VUID-vkCmdDrawMeshTasksEXT-None-08687
  If there is no bound graphics pipeline, and the `geometryShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_GEOMETRY_BIT

- VUID-vkCmdDrawMeshTasksEXT-None-08688
  If there is no bound graphics pipeline, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_FRAGMENT_BIT

- VUID-vkCmdDrawMeshTasksEXT-None-08689
  If there is no bound graphics pipeline, and the `taskShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TASK_BIT_EXT

- VUID-vkCmdDrawMeshTasksEXT-None-08690
  If there is no bound graphics pipeline, and the `meshShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-vkCmdDrawMeshTasksEXT-None-08693
  If there is no bound graphics pipeline, and at least one of the `taskShader` and `meshShader` features is enabled, one of the VK_SHADER_STAGE_VERTEX_BIT or VK_SHADER_STAGE_MESH_BIT_EXT stages must have a valid `VkShaderEXT` bound, and the other must have no `VkShaderEXT` bound

- VUID-vkCmdDrawMeshTasksEXT-None-08696
  If there is no bound graphics pipeline, and a valid `VkShaderEXT` is bound to the VK_SHADER_STAGE_VERTEX_BIT stage, there must be no `VkShaderEXT` bound to either the VK_SHADER_STAGE_TASK_BIT_EXT stage or the VK_SHADER_STAGE_MESH_BIT_EXT stage

- VUID-vkCmdDrawMeshTasksEXT-None-08698
  If any graphics shader is bound which was created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag, then all shaders created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag in the same vkCreateShadersEXT call must also be bound

- VUID-vkCmdDrawMeshTasksEXT-None-08699
  If any graphics shader is bound which was created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag, any stages in between stages whose shaders which did not create a shader with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag as part of the same vkCreateShadersEXT call must not have any `VkShaderEXT` bound

- VUID-vkCmdDrawMeshTasksEXT-None-08878
  All bound graphics shader objects must have been created with identical or identically defined push constant ranges

- VUID-vkCmdDrawMeshTasksEXT-None-08879
  All bound graphics shader objects must have either been created with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag set, or with identical or identically defined arrays of descriptor set layouts

- VUID-vkCmdDrawMeshTasksEXT-colorAttachmentCount-09372
  If the current render pass instance was begun with vkCmdBeginRendering and a VkRenderingInfo::`colorAttachmentCount` equal to `1`, a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, and a fragment shader is bound, it must not declare the `DepthReplacing` or `StencilRefReplacingEXT` execution modes

- VUID-vkCmdDrawMeshTasksEXT-pDynamicStates-08715
  If the bound graphics pipeline state includes a fragment shader stage, was created with VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`, and the fragment shader declares the `EarlyFragmentTests` execution mode and uses `OpDepthAttachmentReadEXT`, the `depthWriteEnable` parameter in the last call to vkCmdSetDepthWriteEnable must be VK_FALSE

- VUID-vkCmdDrawMeshTasksEXT-pDynamicStates-08716
  If the bound graphics pipeline state includes a fragment shader stage, was created with VK_DYNAMIC_STATE_STENCIL_WRITE_MASK set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`, and the fragment shader declares the `EarlyFragmentTests` execution mode and uses `OpStencilAttachmentReadEXT`, the `writeMask` parameter in the last call to vkCmdSetStencilWriteMask must be `0`

- VUID-vkCmdDrawMeshTasksEXT-None-09116
  If a shader object is bound to any graphics stage or the bound graphics pipeline was created with VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT, and the format of any color attachment is VK_FORMAT_E5B9G9R9_UFLOAT_PACK32, the corresponding element of the `pColorWriteMasks` parameter of vkCmdSetColorWriteMaskEXT must either include all of VK_COLOR_COMPONENT_R_BIT, VK_COLOR_COMPONENT_G_BIT, VK_COLOR_COMPONENT_B_BIT, and VK_COLOR_COMPONENT_A_BIT, or none of them

- VUID-vkCmdDrawMeshTasksEXT-maxFragmentDualSrcAttachments-09239
  If blending is enabled for any attachment where either the source or destination blend factors for that attachment use the secondary color input, the maximum value of `Location` for any output attachment statically used in the `Fragment` `Execution` `Model` executed by this command must be less than `maxFragmentDualSrcAttachments`

- VUID-vkCmdDrawMeshTasksEXT-None-09548
  If the current render pass was begun with vkCmdBeginRendering, there is no shader object bound to any graphics stage, the value of each element of VkRenderingAttachmentLocationInfo::`pColorAttachmentLocations` in the bound pipeline must match the value for the corresponding locations set currently in the current render pass instance

- VUID-vkCmdDrawMeshTasksEXT-None-09549
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of each element of VkRenderingInputAttachmentIndexInfo::`pColorAttachmentInputIndices` in the bound pipeline must match the value for the corresponding index set currently in the current render pass instance

- VUID-vkCmdDrawMeshTasksEXT-None-10927
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` in the bound pipeline must match the value set currently in the current render pass instance

- VUID-vkCmdDrawMeshTasksEXT-None-10928
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` in the bound pipeline must match the value set currently in the current render pass instance

- VUID-vkCmdDrawMeshTasksEXT-None-09642
  If the current render pass was begun with vkCmdBeginRendering with the VK_RENDERING_ENABLE_LEGACY_DITHERING_BIT_EXT flag, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_2_ENABLE_LEGACY_DITHERING_BIT_EXT

- VUID-vkCmdDrawMeshTasksEXT-None-09643
  If the bound graphics pipeline was created with VK_PIPELINE_CREATE_2_ENABLE_LEGACY_DITHERING_BIT_EXT, the current render pass must have begun with vkCmdBeginRendering with the VK_RENDERING_ENABLE_LEGACY_DITHERING_BIT_EXT flag

- VUID-vkCmdDrawMeshTasksEXT-None-10677
  If the per-tile execution model is enabled, the tileShadingPerTileDraw feature must be enabled

- VUID-vkCmdDrawMeshTasksEXT-None-10772
  If a shader object is bound to any graphics stage, multiview functionality must not be enabled in the current render pass

- VUID-vkCmdDrawMeshTasksEXT-multiviewPerViewViewports-12262
  If the `multiviewPerViewViewports` feature is enabled, then the index of the most significant bit in current render pass instance `viewMask` must be less than the current value of `viewportCount`

- VUID-vkCmdDrawMeshTasksEXT-multiviewPerViewViewports-12263
  If the `multiviewPerViewViewports` feature is enabled, then the index of the most significant bit in current render pass instance `viewMask` must be less than the current value of `scissorCount`

- VUID-vkCmdDrawMeshTasksEXT-flags-11521
  If current render pass instance was begun with vkCmdBeginRendering with VkRenderingInfo::`flags` which includes VK_RENDERING_FRAGMENT_REGION_BIT_EXT, and if sample shading is enabled (explicitly or implicitly), then the minimum fraction for sample shading must equal 0.0

- VUID-vkCmdDrawMeshTasksEXT-None-11522
  If the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, and the `dynamicRenderingUnusedAttachments` feature is not enabled, the graphics pipeline bound must have been created with a VkCustomResolveCreateInfoEXT

- VUID-vkCmdDrawMeshTasksEXT-None-11523
  If the current render pass instance was begun with vkCmdBeginRendering and does not contain a custom resolve, and the `dynamicRenderingUnusedAttachments` feature is not enabled, the graphics pipeline bound must not have been created with a VkCustomResolveCreateInfoEXT

- VUID-vkCmdDrawMeshTasksEXT-customResolve-11524
  If the current render pass instance was begun with vkCmdBeginRendering and vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, the graphics pipeline bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_TRUE

- VUID-vkCmdDrawMeshTasksEXT-customResolve-11525
  If the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, and vkCmdBeginCustomResolveEXT has not been recorded in the render pass instance, the graphics pipeline bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_FALSE

- VUID-vkCmdDrawMeshTasksEXT-None-11861
  If the `dynamicRenderingUnusedAttachments` feature is not enabled and the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, the bound graphics pipeline must have been created with a VkCustomResolveCreateInfoEXT::`colorAttachmentCount` equal to VkRenderingInfo::`colorAttachmentCount`

- VUID-vkCmdDrawMeshTasksEXT-None-11862
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound graphics pipeline

- VUID-vkCmdDrawMeshTasksEXT-None-11863
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` equal to VK_NULL_HANDLE must have the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound pipeline equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksEXT-dynamicRenderingUnusedAttachments-11864
  If the `dynamicRenderingUnusedAttachments` feature is enabled, the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound graphics pipeline, or the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats`, if it exists, must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksEXT-None-11865
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksEXT-None-11866
  If current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`

- VUID-vkCmdDrawMeshTasksEXT-dynamicRenderingUnusedAttachments-11867
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, and the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksEXT-None-11868
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->resolveImageView` was VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksEXT-None-11869
  If current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`

- VUID-vkCmdDrawMeshTasksEXT-dynamicRenderingUnusedAttachments-11870
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, and the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksEXT-colorAttachmentCount-11871
  If the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0` and vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, then for each element of the VkRenderingInfo::`pColorAttachments` array with a `resolveImageView` not equal to VK_NULL_HANDLE, the `resolveImageView` must have been created with a sample count equal to the value of `rasterizationSamples` for the bound graphics pipeline

- VUID-vkCmdDrawMeshTasksEXT-pDepthAttachment-11872
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`

- VUID-vkCmdDrawMeshTasksEXT-pStencilAttachment-11873
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`

- VUID-vkCmdDrawMeshTasksEXT-customResolve-11529
  If a shader object is bound to the fragment stage, the current render pass instance was begun with vkCmdBeginRendering, a fragment density map attachment is active, and vkCmdBeginCustomResolveEXT has been called, then the fragment shader object bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_TRUE

- VUID-vkCmdDrawMeshTasksEXT-customResolve-11530
  If a shader object is bound to the fragment stage, the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, a fragment density map attachment is active, and vkCmdBeginCustomResolveEXT has not yet been called, then the fragment shader object bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_FALSE

- VUID-vkCmdDrawMeshTasksEXT-flags-13361
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, then all bound shader objects must have been created with the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit

- VUID-vkCmdDrawMeshTasksEXT-flags-13362
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, then the pipeline layout of the bound descriptor sets must have been created with VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT set

- VUID-vkCmdDrawMeshTasksEXT-flags-13363
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, and any of the descriptor set layouts used to create the pipeline layout of the bound descriptor sets were created with any binding’s VkDescriptorSetLayoutBinding::`stageFlags` set with VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT, then there must be no binding with VkDescriptorSetLayoutBinding::`stageFlags` set with VK_SHADER_STAGE_TASK_BIT_EXT or VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-vkCmdDrawMeshTasksEXT-flags-13364
  If there are any shader objects bound that were created with `flags` that includes both the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR and VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT bits, the pipeline layout of the bound descriptor sets must have been created with VK_PIPELINE_LAYOUT_CREATE_NO_TASK_SHADER_BIT_KHR set

- VUID-vkCmdDrawMeshTasksEXT-flags-13365
  If there are any shader objects bound that were created with `flags` that includes both the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR and VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT bits, there must be no shader object bound to the VK_SHADER_STAGE_TASK_BIT_EXT stage

- VUID-vkCmdDrawMeshTasksEXT-stage-06480
  The bound graphics pipeline must not have been created with the VkPipelineShaderStageCreateInfo::`stage` member of any element of VkGraphicsPipelineCreateInfo::`pStages` set to VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT

- VUID-vkCmdDrawMeshTasksEXT-pStages-10680
  If there is no bound graphics pipeline, `vkCmdBindShadersEXT` must not have last bound the `pStages` element of VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT with a valid shader object other than VK_NULL_HANDLE

- VUID-vkCmdDrawMeshTasksEXT-None-07074
  Transform Feedback Queries must not be active

- VUID-vkCmdDrawMeshTasksEXT-None-07075
  Primitives Generated Queries must not be active

- VUID-vkCmdDrawMeshTasksEXT-pipelineStatistics-07076
  The `pipelineStatistics` member used to create any active Pipeline Statistics Query must not contain VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT, VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT, VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT, VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT, VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT, VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT, VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT, VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT, or VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT

- VUID-vkCmdDrawMeshTasksEXT-None-08694
  If there is no bound graphics pipeline, and both the `taskShader` and `meshShader` features are enabled, and a valid `VkShaderEXT` is bound the to the VK_SHADER_STAGE_MESH_BIT_EXT stage, and that `VkShaderEXT` was created without the VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT flag, a valid `VkShaderEXT` must be bound to the VK_SHADER_STAGE_TASK_BIT_EXT stage

- VUID-vkCmdDrawMeshTasksEXT-None-08695
  If there is no bound graphics pipeline, and both the `taskShader` and `meshShader` features are enabled, and a valid `VkShaderEXT` is bound the to the VK_SHADER_STAGE_MESH_BIT_EXT stage, and that `VkShaderEXT` was created with the VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT flag, there must be no `VkShaderEXT` bound to the VK_SHADER_STAGE_TASK_BIT_EXT stage

- VUID-vkCmdDrawMeshTasksEXT-TaskEXT-07322
  If the current pipeline bound to VK_PIPELINE_BIND_POINT_GRAPHICS contains a shader using the `TaskEXT` `Execution` `Model`, `groupCountX` must be less than or equal to `VkPhysicalDeviceMeshShaderPropertiesEXT`::`maxTaskWorkGroupCount`[0]

- VUID-vkCmdDrawMeshTasksEXT-TaskEXT-07323
  If the current pipeline bound to VK_PIPELINE_BIND_POINT_GRAPHICS contains a shader using the `TaskEXT` `Execution` `Model`, `groupCountY` must be less than or equal to `VkPhysicalDeviceMeshShaderPropertiesEXT`::`maxTaskWorkGroupCount`[1]

- VUID-vkCmdDrawMeshTasksEXT-TaskEXT-07324
  If the current pipeline bound to VK_PIPELINE_BIND_POINT_GRAPHICS contains a shader using the `TaskEXT` `Execution` `Model`, `groupCountZ` must be less than or equal to `VkPhysicalDeviceMeshShaderPropertiesEXT`::`maxTaskWorkGroupCount`[2]

- VUID-vkCmdDrawMeshTasksEXT-TaskEXT-07325
  If the current pipeline bound to VK_PIPELINE_BIND_POINT_GRAPHICS contains a shader using the `TaskEXT` `Execution` `Model`, The product of `groupCountX`, `groupCountY` and `groupCountZ` must be less than or equal to `VkPhysicalDeviceMeshShaderPropertiesEXT`::`maxTaskWorkGroupTotalCount`

- VUID-vkCmdDrawMeshTasksEXT-TaskEXT-07326
  If the current pipeline bound to VK_PIPELINE_BIND_POINT_GRAPHICS does not contain a shader using the `TaskEXT` `Execution` `Model`, `groupCountX` must be less than or equal to `VkPhysicalDeviceMeshShaderPropertiesEXT`::`maxMeshWorkGroupCount`[0]

- VUID-vkCmdDrawMeshTasksEXT-TaskEXT-07327
  If the current pipeline bound to VK_PIPELINE_BIND_POINT_GRAPHICS does not contain a shader using the `TaskEXT` `Execution` `Model`, `groupCountY` must be less than or equal to `VkPhysicalDeviceMeshShaderPropertiesEXT`::`maxMeshWorkGroupCount`[1]

- VUID-vkCmdDrawMeshTasksEXT-TaskEXT-07328
  If the current pipeline bound to VK_PIPELINE_BIND_POINT_GRAPHICS does not contain a shader using the `TaskEXT` `Execution` `Model`, `groupCountZ` must be less than or equal to `VkPhysicalDeviceMeshShaderPropertiesEXT`::`maxMeshWorkGroupCount`[2]

- VUID-vkCmdDrawMeshTasksEXT-TaskEXT-07329
  If the current pipeline bound to VK_PIPELINE_BIND_POINT_GRAPHICS does not contain a shader using the `TaskEXT` `Execution` `Model`, The product of `groupCountX`, `groupCountY` and `groupCountZ` must be less than or equal to `VkPhysicalDeviceMeshShaderPropertiesEXT`::`maxMeshWorkGroupTotalCount`

- VUID-vkCmdDrawMeshTasksEXT-MeshEXT-07087
  The current pipeline bound to VK_PIPELINE_BIND_POINT_GRAPHICS must contain a shader stage using the `MeshEXT` `Execution` `Model`

Valid Usage (Implicit)

- VUID-vkCmdDrawMeshTasksEXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdDrawMeshTasksEXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdDrawMeshTasksEXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdDrawMeshTasksEXT-renderpass
  This command must only be called inside of a render pass instance

- VUID-vkCmdDrawMeshTasksEXT-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdDrawMeshTasksEXT-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Inside | Outside | VK_QUEUE_GRAPHICS_BIT | Action

Conditional Rendering

vkCmdDrawMeshTasksEXT is affected by conditional rendering

To record an indirect mesh tasks drawing command, call:

    // Provided by VK_KHR_device_address_commands with VK_EXT_mesh_shader
    void vkCmdDrawMeshTasksIndirect2EXT(
        VkCommandBuffer                             commandBuffer,
        const VkDrawIndirect2InfoKHR*               pInfo);

- `commandBuffer` is the command buffer into which the command is recorded.

- `pInfo` is a pointer to a VkDrawIndirect2InfoKHR structure defining parameters of this command.

`vkCmdDrawMeshTasksIndirect2EXT` behaves similarly to vkCmdDrawMeshTasksEXT except that the parameters are read by the device from an address range during execution. `pInfo->drawCount` draws are executed by the command, with parameters taken from `pInfo->addressRange` starting at `addressRange.address` and increasing by `addressRange.stride` bytes for each successive draw. The parameters of each draw are encoded in an array of VkDrawMeshTasksIndirectCommandEXT structures.

Valid Usage

- VUID-vkCmdDrawMeshTasksIndirect2EXT-magFilter-04553
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdDrawMeshTasksIndirect2EXT-magFilter-09598
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdDrawMeshTasksIndirect2EXT-mipmapMode-04770
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdDrawMeshTasksIndirect2EXT-mipmapMode-09599
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdDrawMeshTasksIndirect2EXT-unnormalizedCoordinates-09635
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `levelCount` and `layerCount` must be 1

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-08609
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `viewType` must be VK_IMAGE_VIEW_TYPE_1D or VK_IMAGE_VIEW_TYPE_2D

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-08610
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions with `ImplicitLod`, `Dref` or `Proj` in their name

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-08611
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions that includes a LOD bias or any offset values

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-06479
  If a VkImageView is sampled with depth comparison, the image view’s format features must contain VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-02691
  If a VkImageView is accessed using atomic operations as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-07888
  If a VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER descriptor is accessed using atomic operations as a result of this command, then the storage texel buffer’s format features must contain VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-02692
  If a VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-02693
  If the VK_EXT_filter_cubic extension is not enabled and any VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, it must not have a VkImageViewType of VK_IMAGE_VIEW_TYPE_3D, VK_IMAGE_VIEW_TYPE_CUBE, or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY

- VUID-vkCmdDrawMeshTasksIndirect2EXT-filterCubic-02694
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have a VkImageViewType and format that supports cubic filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubic` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdDrawMeshTasksIndirect2EXT-filterCubicMinmax-02695
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX as a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubicMinmax` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdDrawMeshTasksIndirect2EXT-cubicRangeClamp-09212
  If the `cubicRangeClamp` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must not have a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM

- VUID-vkCmdDrawMeshTasksIndirect2EXT-reductionMode-09213
  Any VkImageView being sampled with a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM as a result of this command must sample with VK_FILTER_CUBIC_EXT

- VUID-vkCmdDrawMeshTasksIndirect2EXT-selectableCubicWeights-09214
  If the `selectableCubicWeights` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have VkSamplerCubicWeightsCreateInfoQCOM::`cubicWeights` equal to VK_CUBIC_FILTER_WEIGHTS_CATMULL_ROM_QCOM

- VUID-vkCmdDrawMeshTasksIndirect2EXT-flags-02696
  Any VkImage created with a VkImageCreateInfo::`flags` containing VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV sampled as a result of this command must only be sampled using a VkSamplerAddressMode of VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawMeshTasksIndirect2EXT-OpTypeImage-07027
  For any VkImageView being written as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawMeshTasksIndirect2EXT-OpTypeImage-07028
  For any VkImageView being read as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawMeshTasksIndirect2EXT-OpTypeImage-07029
  For any VkBufferView being written as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown`, the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawMeshTasksIndirect2EXT-OpTypeImage-07030
  Any VkBufferView being read as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown` then the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-08600
  If a a bound shader was created with a pipeline layout and statically uses a set n, a descriptor set must have been bound to n at the same pipeline bind point, with layouts compatible for set n with the layout(s) used to create the shader, as described in Pipeline Layout Compatibility

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-08601
  If a a bound shader was created with a pipeline layout or specified push constant ranges and statically uses a push constant value, that value must have been set for the same pipeline bind point, with push constant ranges that are compatible with the push constant range used to create the shader

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-10068
  For each array of resources that is used by a bound shader, the indices used to access members of the array must be less than the descriptor count for the identified binding in the descriptor sets used by this command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-08114
  Descriptors in each bound descriptor set, specified via vkCmdBindDescriptorSets, must be valid if they are accessed as described by descriptor validity by the VkPipeline bound to the pipeline bind point used by this command and the bound VkPipeline was not created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawMeshTasksIndirect2EXT-imageLayout-00344
  If an image descriptor is accessed by a shader, the VkImageLayout must match the subresource accessible from the VkImageView as defined by the image layout matching rules

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-08115
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdBindDescriptorSets, the bound VkPipeline must have been created without VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-08116
  Descriptors in bound descriptor buffers, specified via vkCmdSetDescriptorBufferOffsetsEXT, must be valid if they are dynamically accessed

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-08117
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdSetDescriptorBufferOffsetsEXT, the bound VkPipeline must have been created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-08119
  If a descriptor is dynamically used with a VkPipeline created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-08605
  If a descriptor is dynamically used with a VkShaderEXT created with a `VkDescriptorSetLayout` that was created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-08606
  If the `shaderObject` feature is not enabled, a valid pipeline must be bound to the pipeline bind point used by this command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-08608
  If a pipeline is bound to the pipeline bind point used by this command, there must not have been any calls to dynamic state setting commands for any state specified statically in the VkPipeline object bound to the pipeline bind point used by this command, since that pipeline was bound

- VUID-vkCmdDrawMeshTasksIndirect2EXT-uniformBuffers-06935
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-08612
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawMeshTasksIndirect2EXT-storageBuffers-06936
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-08613
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a storage buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawMeshTasksIndirect2EXT-commandBuffer-02707
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, any resource accessed by bound shaders must not be a protected resource

- VUID-vkCmdDrawMeshTasksIndirect2EXT-viewType-07752
  If a VkImageView is accessed as a result of this command, then the image view’s `viewType` must match the `Dim` operand of the `OpTypeImage` as described in Compatibility Between SPIR-V Image Dimensions and Vulkan ImageView Types

- VUID-vkCmdDrawMeshTasksIndirect2EXT-format-07753
  If a VkImageView or VkBufferView is accessed as a result of this command, then the numeric type of the view’s `format` and the `Sampled` `Type` operand of the `OpTypeImage` must match

- VUID-vkCmdDrawMeshTasksIndirect2EXT-OpImageWrite-08795
  If a VkImageView created with a format other than VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the image view’s format

- VUID-vkCmdDrawMeshTasksIndirect2EXT-OpImageWrite-08796
  If a VkImageView created with the format VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have four components

- VUID-vkCmdDrawMeshTasksIndirect2EXT-OpImageWrite-04469
  If a VkBufferView is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the buffer view’s format

- VUID-vkCmdDrawMeshTasksIndirect2EXT-SampledType-04470
  If a VkImageView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdDrawMeshTasksIndirect2EXT-SampledType-04471
  If a VkImageView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdDrawMeshTasksIndirect2EXT-SampledType-04472
  If a VkBufferView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdDrawMeshTasksIndirect2EXT-SampledType-04473
  If a VkBufferView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdDrawMeshTasksIndirect2EXT-sparseImageInt64Atomics-04474
  If the `sparseImageInt64Atomics` feature is not enabled, VkImage objects created with the VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-sparseImageInt64Atomics-04475
  If the `sparseImageInt64Atomics` feature is not enabled, VkBuffer objects created with the VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-OpImageSampleWeightedQCOM-06971
  If `OpImageSampleWeightedQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_SAMPLED_IMAGE_BIT_QCOM

- VUID-vkCmdDrawMeshTasksIndirect2EXT-OpImageSampleWeightedQCOM-06972
  If `OpImageSampleWeightedQCOM` uses a VkImageView as a sample weight image as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_IMAGE_BIT_QCOM

- VUID-vkCmdDrawMeshTasksIndirect2EXT-OpImageBoxFilterQCOM-06973
  If `OpImageBoxFilterQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BOX_FILTER_SAMPLED_BIT_QCOM

- VUID-vkCmdDrawMeshTasksIndirect2EXT-OpImageBlockMatchSSDQCOM-06974
  If `OpImageBlockMatchSSDQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdDrawMeshTasksIndirect2EXT-OpImageBlockMatchSADQCOM-12420
  If `OpImageBlockMatchSADQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdDrawMeshTasksIndirect2EXT-OpImageBlockMatchSADQCOM-06976
  If `OpImageBlockMatchSADQCOM` or OpImageBlockMatchSSDQCOM is used to read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdDrawMeshTasksIndirect2EXT-OpImageSampleWeightedQCOM-06977
  If `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdDrawMeshTasksIndirect2EXT-OpImageSampleWeightedQCOM-06978
  If any command other than `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must not have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdDrawMeshTasksIndirect2EXT-OpImageBlockMatchWindow-09215
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM

- VUID-vkCmdDrawMeshTasksIndirect2EXT-OpImageBlockMatchWindow-09216
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format must be a single-component format

- VUID-vkCmdDrawMeshTasksIndirect2EXT-OpImageBlockMatchWindow-09217
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdDrawMeshTasksIndirect2EXT-OpImageBlockMatchWindow-12421
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the `blockMatchExtendedClampToEdge` feature is not enabled, the input sampler must not have been created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawMeshTasksIndirect2EXT-addressModeU-12422
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the input sampler was created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, then the sampler must have been created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-07288
  Any shader invocation executed by this command must terminate

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-09600
  If a descriptor with type equal to any of VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, or VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT is accessed as a result of this command, all image subresources identified by that descriptor must be in the image layout identified when the descriptor was written

- VUID-vkCmdDrawMeshTasksIndirect2EXT-micromap-11636
  If an acceleration structure is accessed as a result of this command through an `OpRayQueryProceedKHR` operation , the `VK_EXT_opacity_micromap` extension is not enabled, and the acceleration structure is built using geometry with a VkAccelerationStructureTrianglesOpacityMicromapKHR structure included in its `pNext` chain, the shader must have specified a `OpacityMicromapIdKHR` execution mode with its specialization constant operand equal to VK_TRUE

- VUID-vkCmdDrawMeshTasksIndirect2EXT-micromap-11637
  If an acceleration structure is accessed as a result of this command and the acceleration structure was constructed through deserialization, all micromap arrays referenced by the acceleration structure that were not replaced by an acceleration structure update command must have been deserialized using the serialized data of the corresponding micromaps used to originally build the acceleration structure prior to the execution of this command on the device

- VUID-vkCmdDrawMeshTasksIndirect2EXT-micromap-11638
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkPipeline bound to the pipeline bind point used by this command must not have been created with `flags` that includes VK_PIPELINE_CREATE_2_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_KHR

- VUID-vkCmdDrawMeshTasksIndirect2EXT-micromap-11639
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkShaderEXT that accessed the descriptor must not have been created with `flags` that includes VK_SHADER_CREATE_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_EXT

- VUID-vkCmdDrawMeshTasksIndirect2EXT-commandBuffer-10746
  The `VkDeviceMemory` object allocated from a `VkMemoryHeap` with the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property that is bound to a resource accessed as a result of this command must be the active bound tile memory object in `commandBuffer`

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-10678
  If this command is recorded inside a tile shading render pass instance, the stages corresponding to the pipeline bind point used by this command must only include VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_FRAGMENT_BIT, and/or VK_SHADER_STAGE_COMPUTE_BIT

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-10679
  If this command is recorded where per-tile execution model is enabled, there must be no access to any image while the image was be transitioned to the VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT layout

- VUID-vkCmdDrawMeshTasksIndirect2EXT-pDescription-09900
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the underlying VkTensorARM object must have been created with the VK_TENSOR_USAGE_SHADER_BIT_ARM usage flag set

- VUID-vkCmdDrawMeshTasksIndirect2EXT-dimensionCount-09905
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the `Rank` of the `OpTypeTensorARM` of the tensor resource variable must be equal to the `dimensionCount` provided via VkTensorCreateInfoARM::`pDescription` when creating the underlying VkTensorARM object

- VUID-vkCmdDrawMeshTasksIndirect2EXT-OpTypeTensorARM-09906
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the element type of the `OpTypeTensorARM` of the tensor resource variable must be compatible with the VkFormat of the VkTensorViewARM used for the access

- VUID-vkCmdDrawMeshTasksIndirect2EXT-OpTensorReadARM-12462
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, using `OpTensorReadARM` or `OpTensorWriteARM`, and the underlying VkTensorARM object was created with a VK_TENSOR_TILING_BRICK_16_WIDE_ARM, VK_TENSOR_TILING_BRICK_8_WIDE_ARM, VK_TENSOR_TILING_BRICK_4_WIDE_ARM, VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_ARM, or VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_64K_ARM VkTensorTilingARM, and the object read or written is an array, then the innermost coordinate provided to `OpTensorReadARM` or `OpTensorWriteARM` via the `Coordinates` operand must be a multiple of the largest power of 2 that is less than or equal to the number of components of the array

- VUID-vkCmdDrawMeshTasksIndirect2EXT-pNext-12463
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command and the corresponding VkTensorARM object was created with a VkTensorRollingBackingCreateInfoARM structure in the `pNext` chain of VkTensorCreateInfoARM, then the number of elements accessed with one `OpTensorReadARM` or `OpTensorWriteARM`, must be less than or equal to the number of elements available from the starting coordinate in the rolling backing along the innermost dimension, defined as `wraps`[`dimensionCount` - 1] - InnermostCoordinate % `wraps`[`dimensionCount` - 1] where InnermostCoordinate is the last component of the coordinates array provided via the `Coordinates` operand

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-12472
  Descriptors dynamically accessed in bound descriptor heaps must be valid

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-11297
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a `OpTypeStruct` decorated with `Block` or `BufferBlock` using that mapping, the calculated offset for the resource heap must be a multiple of `bufferDescriptorAlignment`

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-11298
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeImage` or `OpTypeSampledImage` using that mapping, the calculated offset for the resource heap must be a multiple of `imageDescriptorAlignment`

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-11299
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeSampler` or `OpTypeSampledImage` using that mapping, the calculated offset for the sampler heap must be a multiple of `samplerDescriptorAlignment`

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-11397
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeTensorARM` using that mapping, the calculated offset for the resource heap must be a multiple of `tensorDescriptorAlignment`

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-11300
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 4

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-11301
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-11302
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-11304
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 8

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-11305
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-11306
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address pointed to by the address in push data must be a valid VkDeviceAddress

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-11308
  For each descriptor heap that is statically used by a bound shader, either directly or via a descriptor mapping, a valid descriptor heap must be bound

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-11309
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, execution of this command must not result in any descriptor read accessing data outside of the user range of the respective heap bound by `vkCmdBind*HeapEXT` commands

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-11372
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer or uniform texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified via VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-11373
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer or storage texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-11374
  If the `robustBufferAccess2` feature is not enabled, the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, uniform texel buffer, storage buffer, or storage texel buffer, that shader must not access values outside of the range of the buffer as specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawMeshTasksIndirect2EXT-pBindInfo-11375
  If any bound shader uses an embedded sampler via a descriptor mapping, the value of `pBindInfo->reservedRangeSize` set for vkCmdBindSamplerHeapEXT must be greater than or equal to `minSamplerHeapReservedRangeWithEmbedded`

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-11376
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, and that shader statically uses a push constant value, that value must have been set by vkCmdPushDataEXT

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-11398
  If a bound shader was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the access must not be out of bounds

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-11437
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the buffer from which the address in push data was queried must have been created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-11438
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-11441
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must be aligned to `minUniformBufferOffsetAlignment`

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-11439
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_STORAGE_BUFFER_BIT usage flag set

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-11442
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must be aligned to `minStorageBufferOffsetAlignment`

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-11485
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses an acceleration structure using that mapping, the address that the acceleration structure is mapped to must be an acceleration structure address retrieved from a VkAccelerationStructureKHR object via vkGetAccelerationStructureDeviceAddressKHR or handle retrieved from a VkAccelerationStructureNV object via vkGetAccelerationStructureHandleNV

- VUID-vkCmdDrawMeshTasksIndirect2EXT-index-11450
  If a shader uses a sampler descriptor to sample an image as a result of this command, and that sampler descriptor uses a custom border color with an index defined by VkSamplerCustomBorderColorIndexCreateInfoEXT, the value of VkSamplerCustomBorderColorIndexCreateInfoEXT::`index` must have been registered before this command was recorded, and still be registered during the sampling operation, with an identically defined color

- VUID-vkCmdDrawMeshTasksIndirect2EXT-protectedNoFault-11455
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, the address that the resource is mapped to must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdDrawMeshTasksIndirect2EXT-protectedNoFault-11456
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, the address of the indirect memory must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdDrawMeshTasksIndirect2EXT-renderPass-02684
  The current render pass must be compatible with the `renderPass` member of the `VkGraphicsPipelineCreateInfo` structure specified when creating the `VkPipeline` bound to VK_PIPELINE_BIND_POINT_GRAPHICS

- VUID-vkCmdDrawMeshTasksIndirect2EXT-subpass-02685
  The subpass index of the current render pass must be equal to the `subpass` member of the `VkGraphicsPipelineCreateInfo` structure specified when creating the `VkPipeline` bound to VK_PIPELINE_BIND_POINT_GRAPHICS

- VUID-vkCmdDrawMeshTasksIndirect2EXT-OpTypeImage-07468
  If any shader executed by this pipeline accesses an `OpTypeImage` variable with a `Dim` operand of `SubpassData`, it must be decorated with an `InputAttachmentIndex` that corresponds to a valid input attachment in the current subpass

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-07469
  Input attachment views accessed in a subpass must be created with the same VkFormat as the corresponding subpass definition, and be created with a VkImageView that is compatible with the attachment referenced by the subpass' `pInputAttachments`[`InputAttachmentIndex`] in the bound VkFramebuffer as specified by Fragment Input Attachment Compatibility

- VUID-vkCmdDrawMeshTasksIndirect2EXT-pDepthInputAttachmentIndex-09595
  Input attachment views accessed in a dynamic render pass with a `InputAttachmentIndex` referenced by VkRenderingInputAttachmentIndexInfo, or no `InputAttachmentIndex` if VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` or VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` are `NULL`, must be created with a VkImageView that is compatible with the corresponding color, depth, or stencil attachment in VkRenderingInfo

- VUID-vkCmdDrawMeshTasksIndirect2EXT-pDepthInputAttachmentIndex-09596
  Input attachment views accessed in a dynamic render pass via a shader object must have an `InputAttachmentIndex` if both VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` and VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` are non-`NULL`

- VUID-vkCmdDrawMeshTasksIndirect2EXT-InputAttachmentIndex-09597
  If an input attachment view accessed in a dynamic render pass via a shader object has an `InputAttachmentIndex`, the `InputAttachmentIndex` must match an index in VkRenderingInputAttachmentIndexInfo

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-06537
  Memory backing image subresources used as attachments in the current render pass must not be written in any way other than as an attachment by this command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-10795
  If a color attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_COLOR_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-10796
  If a depth attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_DEPTH_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-10797
  If a stencil attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_STENCIL_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-12338
  If a color attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_COLOR_BIT on that attachment, the color attachment must not be written to by this command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-12339
  If a depth attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_DEPTH_BIT on that attachment, the depth attachment must not be written to by this command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-12340
  If a stencil attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_STENCIL_BIT on that attachment, the stencil attachment must not be written to by this command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-09003
  If an attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, it must not be accessed in any way other than as an attachment, storage image, or sampled image by this command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-06886
  If the current render pass instance uses a depth/stencil attachment with a read-only layout for the depth aspect, depth writes must be disabled

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-06887
  If the current render pass instance uses a depth/stencil attachment with a read-only layout for the stencil aspect, both front and back `writeMask` are not zero, and stencil test is enabled, all stencil ops must be VK_STENCIL_OP_KEEP

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-07831
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT dynamic state enabled then vkCmdSetViewport must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-07832
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SCISSOR dynamic state enabled then vkCmdSetScissor must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-08617
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_WIDTH dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineWidth must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-07834
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BIAS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthBiasEnable` is VK_TRUE, then vkCmdSetDepthBias or vkCmdSetDepthBias2EXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-07835
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_BLEND_CONSTANTS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and an active color attachment current value of `blendEnable` is VK_TRUE with a blend equations where any VkBlendFactor member is VK_BLEND_FACTOR_CONSTANT_COLOR, VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR, VK_BLEND_FACTOR_CONSTANT_ALPHA, or VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA, then vkCmdSetBlendConstants must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-07836
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BOUNDS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthBoundsTestEnable` is VK_TRUE, then vkCmdSetDepthBounds must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-07837
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilCompareMask must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-07838
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_WRITE_MASK dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilWriteMask must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-07839
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_REFERENCE dynamic state enabled, the current value of and `rasterizerDiscardEnable` is VK_FALSE, the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilReference must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-maxMultiviewInstanceIndex-02688
  If the draw is recorded in a render pass instance with multiview enabled, the maximum instance index must be less than or equal to VkPhysicalDeviceMultiviewProperties::`maxMultiviewInstanceIndex`

- VUID-vkCmdDrawMeshTasksIndirect2EXT-sampleLocationsEnable-02689
  If the bound graphics pipeline was created with VkPipelineSampleLocationsStateCreateInfoEXT::`sampleLocationsEnable` set to VK_TRUE, then the active depth attachment must have been created with the VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit set

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-07634
  If the `VK_EXT_sample_locations` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetSampleLocationsEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-06666
  If the `VK_EXT_sample_locations` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `sampleLocationsEnable` is VK_TRUE, then vkCmdSetSampleLocationsEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-07840
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_CULL_MODE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCullMode must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-07841
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRONT_FACE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetFrontFace must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-07843
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, vkCmdSetDepthTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-07844
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthTestEnable` is VK_TRUE, then vkCmdSetDepthWriteEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-07845
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_COMPARE_OP dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthTestEnable` is VK_TRUE, then vkCmdSetDepthCompareOp must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-07846
  If the `depthBounds` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthBoundsTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-07847
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetStencilTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-07848
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_OP dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilOp must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-viewportCount-03417
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, and the state is not inherited, then vkCmdSetViewportWithCount must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-scissorCount-03418
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT dynamic state enabled, and the state is not inherited, then vkCmdSetScissorWithCount must have been called and not subsequently invalidated in the current command buffer prior to this drawing

- VUID-vkCmdDrawMeshTasksIndirect2EXT-viewportCount-03419
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with both the VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic states enabled, and the state is not inherited, then the `viewportCount` parameter of `vkCmdSetViewportWithCount` must match the `scissorCount` parameter of `vkCmdSetScissorWithCount`

- VUID-vkCmdDrawMeshTasksIndirect2EXT-viewportCount-04137
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportWScalingStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksIndirect2EXT-viewportCount-04138
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, the current value of `viewportWScalingEnable` is VK_TRUE, then vkCmdSetViewportWScalingNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-08636
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, the current value of `viewportWScalingEnable` is VK_TRUE, then the `viewportCount` parameter in the last call to vkCmdSetViewportWScalingNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksIndirect2EXT-viewportCount-04139
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportShadingRateImageStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksIndirect2EXT-shadingRateImage-09233
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_COARSE_SAMPLE_ORDER_NV and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoarseSampleOrderNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-shadingRateImage-09234
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `shadingRateImageEnable` is VK_TRUE, then vkCmdSetViewportShadingRatePaletteNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-08637
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `shadingRateImageEnable` is VK_TRUE, then the `viewportCount` parameter in the last call to vkCmdSetViewportShadingRatePaletteNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksIndirect2EXT-VkPipelineVieportCreateInfo-04141
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled and a VkPipelineViewportSwizzleStateCreateInfoNV structure chained from VkPipelineViewportStateCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportSwizzleStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksIndirect2EXT-VkPipelineVieportCreateInfo-04142
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled and a VkPipelineViewportExclusiveScissorStateCreateInfoNV structure chained from VkPipelineViewportStateCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportExclusiveScissorStateCreateInfoNV::`exclusiveScissorCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-07878
  If the `exclusiveScissor` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_ENABLE_NV dynamic state enabled, then vkCmdSetExclusiveScissorEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-07879
  If the `exclusiveScissor` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_NV dynamic state enabled, and the most recent call to vkCmdSetExclusiveScissorEnableNV in the current command buffer set any element of `pExclusiveScissorEnables` to VK_TRUE, then vkCmdSetExclusiveScissorNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-04876
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE dynamic state enabled, then vkCmdSetRasterizerDiscardEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-04877
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthBiasEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-logicOp-04878
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LOGIC_OP_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `logicOpEnable` is VK_TRUE, then vkCmdSetLogicOpEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-primitiveFragmentShadingRateWithMultipleViewports-04552
  If the `primitiveFragmentShadingRateWithMultipleViewports` limit is not supported, the bound graphics pipeline was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, and any of the shader stages of the bound graphics pipeline write to the `PrimitiveShadingRateKHR` built-in, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and the `viewportCount` parameter of `vkCmdSetViewportWithCount` must be `1`

- VUID-vkCmdDrawMeshTasksIndirect2EXT-primitiveFragmentShadingRateWithMultipleViewports-08642
  If the `primitiveFragmentShadingRateWithMultipleViewports` limit is not supported, and any shader object bound to a graphics stage writes to the `PrimitiveShadingRateKHR` built-in, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and the `viewportCount` parameter of `vkCmdSetViewportWithCount` must be `1`

- VUID-vkCmdDrawMeshTasksIndirect2EXT-blendEnable-04727
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, then for each color attachment, if the corresponding image view’s format features do not contain VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT, then the corresponding current value of `blendEnable` must be VK_FALSE

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-08644
  If a shader object is bound to any graphics stage or a graphics pipeline is bound, the current value of `rasterizerDiscardEnable` is VK_FALSE, and none of the following is enabled:

  - the `VK_AMD_mixed_attachment_samples` extension

  - the `VK_NV_framebuffer_mixed_samples` extension

  - the `multisampledRenderToSingleSampled` feature

  then the current value of `rasterizationSamples` must be the same as the current color and/or depth/stencil attachments

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-08876
  If a shader object is bound to any graphics stage, the current render pass instance must have been begun with vkCmdBeginRendering

- VUID-vkCmdDrawMeshTasksIndirect2EXT-imageView-06172
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawMeshTasksIndirect2EXT-imageView-06173
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawMeshTasksIndirect2EXT-imageView-06174
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawMeshTasksIndirect2EXT-imageView-06175
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawMeshTasksIndirect2EXT-imageView-06176
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawMeshTasksIndirect2EXT-imageView-06177
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawMeshTasksIndirect2EXT-viewMask-06178
  If the current render pass instance was begun with vkCmdBeginRendering, the bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::`viewMask` equal to VkRenderingInfo::`viewMask`

- VUID-vkCmdDrawMeshTasksIndirect2EXT-colorAttachmentCount-06179
  If the `dynamicRenderingUnusedAttachments` feature is not enabled and the current render pass instance was begun with vkCmdBeginRendering, the bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::`colorAttachmentCount` equal to VkRenderingInfo::`colorAttachmentCount`

- VUID-vkCmdDrawMeshTasksIndirect2EXT-dynamicRenderingUnusedAttachments-08910
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound graphics pipeline

- VUID-vkCmdDrawMeshTasksIndirect2EXT-dynamicRenderingUnusedAttachments-08912
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` equal to VK_NULL_HANDLE must have the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound pipeline equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirect2EXT-dynamicRenderingUnusedAttachments-08911
  If the `dynamicRenderingUnusedAttachments` feature is enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound graphics pipeline, or the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats`, if it exists, must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirect2EXT-colorAttachmentCount-09362
  If the current render pass instance was begun with vkCmdBeginRendering, with a VkRenderingInfo::`colorAttachmentCount` equal to `1`, there is no shader object bound to any graphics stage, and a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, each element of the VkRenderingInfo::`pColorAttachments` array with a `resolveImageView` not equal to VK_NULL_HANDLE must have been created with an image created with a VkExternalFormatANDROID::`externalFormat` value equal to the VkExternalFormatANDROID::`externalFormat` value used to create the bound graphics pipeline

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-09363
  If there is no shader object bound to any graphics stage, the current render pass instance was begun with vkCmdBeginRendering and a VkRenderingInfo::`colorAttachmentCount` equal to `1`, and a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with an image created with a VkExternalFormatANDROID::`externalFormat` value equal to the VkExternalFormatANDROID::`externalFormat` value used to create the bound graphics pipeline

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-09364
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetColorBlendEnableEXT must have set the blend enable to VK_FALSE prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-09365
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetRasterizationSamplesEXT must have set `rasterizationSamples` to VK_SAMPLE_COUNT_1_BIT prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-09368
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetFragmentShadingRateKHR must have set `pFragmentSize->width` to `1` prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-09369
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetFragmentShadingRateKHR must have set `pFragmentSize->height` to `1` prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-07749
  If the `colorWriteEnable` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorWriteEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-attachmentCount-07750
  If the `colorWriteEnable` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the `attachmentCount` parameter of most recent call to `vkCmdSetColorWriteEnableEXT` in the current command buffer must be greater than or equal to the number of active color attachments

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-07751
  If the `VK_EXT_discard_rectangles` extension is enabled, a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT dynamic state enabled and the `pNext` chain of VkGraphicsPipelineCreateInfo included a VkPipelineDiscardRectangleStateCreateInfoEXT structure, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for each discard rectangle in VkPipelineDiscardRectangleStateCreateInfoEXT::`discardRectangleCount`

- VUID-vkCmdDrawMeshTasksIndirect2EXT-rasterizerDiscardEnable-09236
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT dynamic state enabled and the `pNext` chain of VkGraphicsPipelineCreateInfo did not include a VkPipelineDiscardRectangleStateCreateInfoEXT structure, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for each discard rectangle in VkPhysicalDeviceDiscardRectanglePropertiesEXT::`maxDiscardRectangles`

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-07880
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDiscardRectangleEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-07881
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_MODE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-dynamicRenderingUnusedAttachments-08913
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->imageView` was VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirect2EXT-dynamicRenderingUnusedAttachments-08914
  If current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawMeshTasksIndirect2EXT-dynamicRenderingUnusedAttachments-08915
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, and the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->imageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirect2EXT-dynamicRenderingUnusedAttachments-08916
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->imageView` was VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirect2EXT-dynamicRenderingUnusedAttachments-08917
  If current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawMeshTasksIndirect2EXT-dynamicRenderingUnusedAttachments-08918
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, and the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->imageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirect2EXT-imageView-06183
  If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentShadingRateAttachmentInfoKHR::`imageView` was not VK_NULL_HANDLE, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

- VUID-vkCmdDrawMeshTasksIndirect2EXT-dynamicRenderingLocalRead-11797
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingLocalRead` feature is enabled, the VK_RENDERING_LOCAL_READ_CONCURRENT_ACCESS_CONTROL_BIT_KHR flag is specified, and an attachment is being used as a feedback loop as specified by VK_RENDERING_ATTACHMENT_INPUT_ATTACHMENT_FEEDBACK_BIT_KHR, VkRenderingAttachmentFlagsInfoKHR::`flags` for that attachment must include VK_RENDERING_ATTACHMENT_INPUT_ATTACHMENT_FEEDBACK_BIT_KHR

- VUID-vkCmdDrawMeshTasksIndirect2EXT-imageView-06184
  If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentDensityMapAttachmentInfoEXT::`imageView` was not VK_NULL_HANDLE, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT

- VUID-vkCmdDrawMeshTasksIndirect2EXT-layers-10831
  If the current render pass instance was created with VK_RENDERING_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE or VK_RENDER_PASS_CREATE_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE, and the bound graphics pipeline was created with VK_PIPELINE_CREATE_2_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE, then the current render pass instance must have a `layers` value less than or equal to VkPipelineFragmentDensityMapLayeredCreateInfoVALVE::`maxFragmentDensityMapLayers`

- VUID-vkCmdDrawMeshTasksIndirect2EXT-colorAttachmentCount-06185
  If the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with a sample count equal to the corresponding element of the `pColorAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline

- VUID-vkCmdDrawMeshTasksIndirect2EXT-pDepthAttachment-06186
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of the `depthStencilAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawMeshTasksIndirect2EXT-pStencilAttachment-06187
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of the `depthStencilAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawMeshTasksIndirect2EXT-multisampledRenderToSingleSampled-07285
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with a sample count equal to the value of `rasterizationSamples` for the bound graphics pipeline

- VUID-vkCmdDrawMeshTasksIndirect2EXT-multisampledRenderToSingleSampled-07286
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawMeshTasksIndirect2EXT-multisampledRenderToSingleSampled-07287
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawMeshTasksIndirect2EXT-pNext-07935
  If this command is called inside a render pass instance started with vkCmdBeginRendering, and the `pNext` chain of VkRenderingInfo includes a VkMultisampledRenderToSingleSampledInfoEXT structure with `multisampledRenderToSingleSampledEnable` equal to VK_TRUE, then the value of `rasterizationSamples` for the bound graphics pipeline must be equal to VkMultisampledRenderToSingleSampledInfoEXT::`rasterizationSamples`

- VUID-vkCmdDrawMeshTasksIndirect2EXT-renderPass-06198
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline must have been created with a VkGraphicsPipelineCreateInfo::`renderPass` equal to VK_NULL_HANDLE

- VUID-vkCmdDrawMeshTasksIndirect2EXT-pColorAttachments-08963
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound with a fragment shader that statically writes to a color attachment, the color write mask is not zero, color writes are enabled, and the corresponding element of the VkRenderingInfo::`pColorAttachments->imageView` was not VK_NULL_HANDLE, then the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirect2EXT-pColorAttachments-11539
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound with a fragment shader that statically writes to a color attachment, the color write mask is not zero, color writes are enabled, and the corresponding element of the VkRenderingInfo::`pColorAttachments->resolveImageView` was not VK_NULL_HANDLE, then the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirect2EXT-pDepthAttachment-08964
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound, depth test is enabled, and the VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, then the VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirect2EXT-pDepthAttachment-11540
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound, depth test is enabled, and the VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, then the VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirect2EXT-pStencilAttachment-08965
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound, stencil test is enabled and the VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, then the VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirect2EXT-pStencilAttachment-11860
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound, stencil test is enabled and the VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, then the VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirect2EXT-flags-10582
  If the current render pass instance was begun with a vkCmdBeginRendering call in `commandBuffer`, its VkRenderingInfo::`flags` parameter must not have VK_RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT set unless VK_RENDERING_CONTENTS_INLINE_BIT_KHR is also set

- VUID-vkCmdDrawMeshTasksIndirect2EXT-primitivesGeneratedQueryWithRasterizerDiscard-06708
  If the `primitivesGeneratedQueryWithRasterizerDiscard` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, rasterization discard must not be enabled

- VUID-vkCmdDrawMeshTasksIndirect2EXT-primitivesGeneratedQueryWithNonZeroStreams-06709
  If the `primitivesGeneratedQueryWithNonZeroStreams` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, the bound graphics pipeline must not have been created with a non-zero value in `VkPipelineRasterizationStateStreamCreateInfoEXT`::`rasterizationStream`

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-07620
  If the `depthClamp` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLAMP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthClampEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-07621
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_POLYGON_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetPolygonModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-07622
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetRasterizationSamplesEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-07623
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetSampleMaskEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-alphaToCoverageEnable-08919
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT dynamic state enabled, and `alphaToCoverageEnable` was VK_TRUE in the last call to vkCmdSetAlphaToCoverageEnableEXT, then the Fragment Output Interface must contain a variable for the alpha `Component` word in `Location` 0 at `Index` 0

- VUID-vkCmdDrawMeshTasksIndirect2EXT-alphaToCoverageEnable-08920
  If a shader object is bound to any graphics stage, and the most recent call to vkCmdSetAlphaToCoverageEnableEXT in the current command buffer set `alphaToCoverageEnable` to VK_TRUE, then the Fragment Output Interface must contain a variable for the alpha `Component` word in `Location` 0 at `Index` 0

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-07624
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAlphaToCoverageEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-07625
  If the `alphaToOne` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ALPHA_TO_ONE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAlphaToOneEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-07626
  If the `logicOp` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LOGIC_OP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetLogicOpEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-07627
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and there are color attachments bound, then vkCmdSetColorBlendEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-07629
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and there are color attachments bound, then vkCmdSetColorWriteMaskEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-07630
  If the `geometryStreams` feature is enabled, and a shader object is bound to the VK_SHADER_STAGE_GEOMETRY_BIT stage or a graphics pipeline is bound which was created with both a VK_SHADER_STAGE_GEOMETRY_BIT stage and the VK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXT dynamic state enabled, then vkCmdSetRasterizationStreamEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-07631
  If the `VK_EXT_conservative_rasterization` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_CONSERVATIVE_RASTERIZATION_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetConservativeRasterizationModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-07632
  If the `VK_EXT_conservative_rasterization` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXTRA_PRIMITIVE_OVERESTIMATION_SIZE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `conservativeRasterizationMode` is VK_CONSERVATIVE_RASTERIZATION_MODE_OVERESTIMATE_EXT, then vkCmdSetExtraPrimitiveOverestimationSizeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-conservativePointAndLineRasterization-07499
  If the `VK_EXT_conservative_rasterization` extension is enabled, `conservativePointAndLineRasterization` is not supported, a shader object is bound to any graphics stage or a graphics pipeline is bound, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line or point topology class, then the current value of `conservativeRasterizationMode` must be VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-07633
  If the `depthClipEnable` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLIP_ENABLE_EXT dynamic state, then vkCmdSetDepthClipEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-07636
  If the `VK_EXT_provoking_vertex` extension is enabled, a shader object is bound to the VK_SHADER_STAGE_VERTEX_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_PROVOKING_VERTEX_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetProvokingVertexModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-08666
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineRasterizationModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-08669
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineStippleEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-07849
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled and a shader object is bound to any graphics stage, or a bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stippledLineEnable` is VK_TRUE, then vkCmdSetLineStipple must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-10608
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic state enabled, the effective rasterization input topology is in the line topology class, and the current `lineRasterizationMode` is VK_LINE_RASTERIZATION_MODE_BRESENHAM or VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH, then the current `alphaToCoverageEnable`, `alphaToOneEnable` and `sampleShadingEnable` states must all be VK_FALSE

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-07639
  If the `depthClipControl` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLIP_NEGATIVE_ONE_TO_ONE_EXT dynamic state enabled, then vkCmdSetDepthClipNegativeOneToOneEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-09650
  If the `depthClampControl` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLAMP_RANGE_EXT dynamic state enabled, and the current value of `depthClampEnable` is VK_TRUE, then vkCmdSetDepthClampRangeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-07640
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_ENABLE_NV dynamic state enabled, then vkCmdSetViewportWScalingEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-07641
  If the `VK_NV_viewport_swizzle` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic state enabled, then vkCmdSetViewportSwizzleNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-07642
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageToColorEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-07643
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_LOCATION_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageToColorEnable` is VK_TRUE, then vkCmdSetCoverageToColorLocationNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-07644
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_MODE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageModulationModeNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-07645
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageModulationMode` is any value other than VK_COVERAGE_MODULATION_MODE_NONE_NV, then vkCmdSetCoverageModulationTableEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-07646
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageModulationTableEnable` is VK_TRUE, then vkCmdSetCoverageModulationTableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-07647
  If the `shadingRateImage` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SHADING_RATE_IMAGE_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetShadingRateImageEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-pipelineFragmentShadingRate-09238
  If the `pipelineFragmentShadingRate` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetFragmentShadingRateKHR must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-07648
  If the `representativeFragmentTest` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_REPRESENTATIVE_FRAGMENT_TEST_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetRepresentativeFragmentTestEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-07649
  If the `coverageReductionMode` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageReductionModeNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-rasterizationSamples-07471
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current subpass does not use any color and/or depth/stencil attachments, then the `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT must follow the rules for a zero-attachment subpass

- VUID-vkCmdDrawMeshTasksIndirect2EXT-samples-07472
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state disabled, then the `samples` parameter in the last call to vkCmdSetSampleMaskEXT must be greater or equal to the VkPipelineMultisampleStateCreateInfo::`rasterizationSamples` parameter used to create the bound graphics pipeline

- VUID-vkCmdDrawMeshTasksIndirect2EXT-samples-07473
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT state and VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT states enabled, then the `samples` parameter in the last call to vkCmdSetSampleMaskEXT must be greater or equal to the `rasterizationSamples` parameter in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-09211
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, or a shader object is bound to any graphics stage, and the current render pass instance includes a VkMultisampledRenderToSingleSampledInfoEXT structure with `multisampledRenderToSingleSampledEnable` equal to VK_TRUE, then the `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT must be the same as the `rasterizationSamples` member of that structure

- VUID-vkCmdDrawMeshTasksIndirect2EXT-firstAttachment-07476
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic states enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the last call to vkCmdSetColorBlendEnableEXT in the current command buffer prior to this drawing command must have set a value for all active color attachments

- VUID-vkCmdDrawMeshTasksIndirect2EXT-firstAttachment-07478
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT dynamic states enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the last call to vkCmdSetColorWriteMaskEXT in the current command buffer prior to this drawing command must have set a value for all active color attachments

- VUID-vkCmdDrawMeshTasksIndirect2EXT-advancedBlendMaxColorAttachments-07480
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT and VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic states enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and an active color attachment current value of `blendEnable` is VK_TRUE, then the number of active color attachments must not exceed `advancedBlendMaxColorAttachments`

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-10862
  If a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT , but not the VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorBlendEquationEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawMeshTasksIndirect2EXT-rasterizerDiscardEnable-10863
  If a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT, but not the VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorBlendAdvancedEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-10864
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT and VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then either vkCmdSetColorBlendAdvancedEXT or vkCmdSetColorBlendEquationEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawMeshTasksIndirect2EXT-primitivesGeneratedQueryWithNonZeroStreams-07481
  If the `primitivesGeneratedQueryWithNonZeroStreams` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, and the bound graphics pipeline was created with VK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXT state enabled, the last call to vkCmdSetRasterizationStreamEXT must have set the `rasterizationStream` to zero

- VUID-vkCmdDrawMeshTasksIndirect2EXT-sampleLocationsPerPixel-07482
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state disabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then the `sampleLocationsPerPixel` member of `pSampleLocationsInfo` in the last call to vkCmdSetSampleLocationsEXT must equal the `rasterizationSamples` member of the VkPipelineMultisampleStateCreateInfo structure the bound graphics pipeline has been created with

- VUID-vkCmdDrawMeshTasksIndirect2EXT-sampleLocationsPerPixel-07483
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then the `sampleLocationsPerPixel` member of `pSampleLocationsInfo` in the last call to vkCmdSetSampleLocationsEXT must equal the `rasterizationSamples` parameter of the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawMeshTasksIndirect2EXT-sampleLocationsEnable-07484
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT then the current active depth attachment must have been created with the VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit set

- VUID-vkCmdDrawMeshTasksIndirect2EXT-sampleLocationsEnable-07485
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, then the `sampleLocationsInfo.maxSampleLocationGridSize.width` in the last call to vkCmdSetSampleLocationsEXT must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.width` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling `rasterizationSamples`

- VUID-vkCmdDrawMeshTasksIndirect2EXT-sampleLocationsEnable-07486
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, then the `sampleLocationsInfo.maxSampleLocationGridSize.height` in the last call to vkCmdSetSampleLocationsEXT must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.height` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling `rasterizationSamples`

- VUID-vkCmdDrawMeshTasksIndirect2EXT-sampleLocationsEnable-07487
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, the fragment shader code must not statically use the extended instruction `InterpolateAtSample`

- VUID-vkCmdDrawMeshTasksIndirect2EXT-sampleLocationsEnable-07936
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationGridSize.width` must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.width` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling the value of `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawMeshTasksIndirect2EXT-sampleLocationsEnable-07937
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationGridSize.height` must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.height` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling the value of `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawMeshTasksIndirect2EXT-sampleLocationsEnable-07938
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationsPerPixel` must equal `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawMeshTasksIndirect2EXT-coverageModulationTableEnable-07488
  If a shader object is bound to any graphics stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NV state enabled, and the last call to vkCmdSetCoverageModulationTableEnableNV set `coverageModulationTableEnable` to VK_TRUE, then the `coverageModulationTableCount` parameter in the last call to vkCmdSetCoverageModulationTableNV must equal the current `rasterizationSamples` divided by the number of color samples in the current active color attachment

- VUID-vkCmdDrawMeshTasksIndirect2EXT-rasterizationSamples-07489
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, and if current subpass has a depth/stencil attachment and depth test, stencil test, or depth bounds test are enabled in the bound pipeline, then the current `rasterizationSamples` must be the same as the sample count of the depth/stencil attachment

- VUID-vkCmdDrawMeshTasksIndirect2EXT-coverageToColorEnable-07490
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV state enabled and the last call to vkCmdSetCoverageToColorEnableNV set the `coverageToColorEnable` to VK_TRUE, then there must be an active color attachment at the location selected by the last call to vkCmdSetCoverageToColorLocationNV `coverageToColorLocation`, with a VkFormat of VK_FORMAT_R8_UINT, VK_FORMAT_R8_SINT, VK_FORMAT_R16_UINT, VK_FORMAT_R16_SINT, VK_FORMAT_R32_UINT, or VK_FORMAT_R32_SINT

- VUID-vkCmdDrawMeshTasksIndirect2EXT-rasterizerDiscardEnable-09420
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, and a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, and the most recent call to vkCmdSetRasterizerDiscardEnable in the current command buffer set `rasterizerDiscardEnable` to VK_FALSE, and the last call to vkCmdSetCoverageToColorEnableNV set the `coverageToColorEnable` to VK_TRUE, then there must be an active color attachment at the location selected by the last call to vkCmdSetCoverageToColorLocationNV `coverageToColorLocation`, with a VkFormat of VK_FORMAT_R8_UINT, VK_FORMAT_R8_SINT, VK_FORMAT_R16_UINT, VK_FORMAT_R16_SINT, VK_FORMAT_R32_UINT, or VK_FORMAT_R32_SINT

- VUID-vkCmdDrawMeshTasksIndirect2EXT-coverageReductionMode-07491
  If the `coverageReductionMode` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV or VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic states enabled, then the current values of `coverageReductionMode`, `rasterizationSamples`, the sample counts for the color and depth/stencil attachments (if the subpass has them) must be a valid combination returned by vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV

- VUID-vkCmdDrawMeshTasksIndirect2EXT-viewportCount-07492
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportSwizzleStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksIndirect2EXT-viewportCount-07493
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic states enabled then the `viewportCount` parameter in the last call to vkCmdSetViewportSwizzleNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksIndirect2EXT-viewportCount-09421
  If the `VK_NV_viewport_swizzle` extension is enabled, and a shader object is bound to any graphics stage, then the `viewportCount` parameter in the last call to vkCmdSetViewportSwizzleNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksIndirect2EXT-rasterizationSamples-07494
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, and the `coverageReductionMode` feature is not enabled, or the current value of `coverageReductionMode` is not VK_COVERAGE_REDUCTION_MODE_TRUNCATE_NV, and the current value of `rasterizationSamples` is greater than sample count of the color attachment, then sample shading must be disabled

- VUID-vkCmdDrawMeshTasksIndirect2EXT-stippledLineEnable-07495
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_RECTANGULAR, then the `stippledRectangularLines` feature must be enabled

- VUID-vkCmdDrawMeshTasksIndirect2EXT-stippledLineEnable-07496
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_BRESENHAM, then the `stippledBresenhamLines` feature must be enabled

- VUID-vkCmdDrawMeshTasksIndirect2EXT-stippledLineEnable-07497
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH, then the `stippledSmoothLines` feature must be enabled

- VUID-vkCmdDrawMeshTasksIndirect2EXT-stippledLineEnable-07498
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_DEFAULT, then the `stippledRectangularLines` feature must be enabled and VkPhysicalDeviceLimits::`strictLines` must be VK_TRUE

- VUID-vkCmdDrawMeshTasksIndirect2EXT-stage-07073
  If the bound pipeline was created with the VkPipelineShaderStageCreateInfo::`stage` member of an element of VkGraphicsPipelineCreateInfo::`pStages` set to VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT, then Mesh Shader Queries must not be active

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-08877
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ATTACHMENT_FEEDBACK_LOOP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAttachmentFeedbackLoopEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-07850
  If dynamic state was inherited from VkCommandBufferInheritanceViewportScissorInfoNV, it must be set in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirect2EXT-nextStage-10745
  For each shader object bound to a graphics stage, except for shader object bound to the last graphics stage in the logical pipeline, it must have been created with a `nextStage` including the corresponding bit to the shader object bound to the following graphics stage in the logical pipeline

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-08684
  If there is no bound graphics pipeline, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_VERTEX_BIT

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-08685
  If there is no bound graphics pipeline, and the `tessellationShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-08686
  If there is no bound graphics pipeline, and the `tessellationShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-08687
  If there is no bound graphics pipeline, and the `geometryShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_GEOMETRY_BIT

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-08688
  If there is no bound graphics pipeline, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_FRAGMENT_BIT

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-08689
  If there is no bound graphics pipeline, and the `taskShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TASK_BIT_EXT

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-08690
  If there is no bound graphics pipeline, and the `meshShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-08693
  If there is no bound graphics pipeline, and at least one of the `taskShader` and `meshShader` features is enabled, one of the VK_SHADER_STAGE_VERTEX_BIT or VK_SHADER_STAGE_MESH_BIT_EXT stages must have a valid `VkShaderEXT` bound, and the other must have no `VkShaderEXT` bound

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-08696
  If there is no bound graphics pipeline, and a valid `VkShaderEXT` is bound to the VK_SHADER_STAGE_VERTEX_BIT stage, there must be no `VkShaderEXT` bound to either the VK_SHADER_STAGE_TASK_BIT_EXT stage or the VK_SHADER_STAGE_MESH_BIT_EXT stage

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-08698
  If any graphics shader is bound which was created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag, then all shaders created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag in the same vkCreateShadersEXT call must also be bound

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-08699
  If any graphics shader is bound which was created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag, any stages in between stages whose shaders which did not create a shader with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag as part of the same vkCreateShadersEXT call must not have any `VkShaderEXT` bound

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-08878
  All bound graphics shader objects must have been created with identical or identically defined push constant ranges

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-08879
  All bound graphics shader objects must have either been created with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag set, or with identical or identically defined arrays of descriptor set layouts

- VUID-vkCmdDrawMeshTasksIndirect2EXT-colorAttachmentCount-09372
  If the current render pass instance was begun with vkCmdBeginRendering and a VkRenderingInfo::`colorAttachmentCount` equal to `1`, a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, and a fragment shader is bound, it must not declare the `DepthReplacing` or `StencilRefReplacingEXT` execution modes

- VUID-vkCmdDrawMeshTasksIndirect2EXT-pDynamicStates-08715
  If the bound graphics pipeline state includes a fragment shader stage, was created with VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`, and the fragment shader declares the `EarlyFragmentTests` execution mode and uses `OpDepthAttachmentReadEXT`, the `depthWriteEnable` parameter in the last call to vkCmdSetDepthWriteEnable must be VK_FALSE

- VUID-vkCmdDrawMeshTasksIndirect2EXT-pDynamicStates-08716
  If the bound graphics pipeline state includes a fragment shader stage, was created with VK_DYNAMIC_STATE_STENCIL_WRITE_MASK set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`, and the fragment shader declares the `EarlyFragmentTests` execution mode and uses `OpStencilAttachmentReadEXT`, the `writeMask` parameter in the last call to vkCmdSetStencilWriteMask must be `0`

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-09116
  If a shader object is bound to any graphics stage or the bound graphics pipeline was created with VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT, and the format of any color attachment is VK_FORMAT_E5B9G9R9_UFLOAT_PACK32, the corresponding element of the `pColorWriteMasks` parameter of vkCmdSetColorWriteMaskEXT must either include all of VK_COLOR_COMPONENT_R_BIT, VK_COLOR_COMPONENT_G_BIT, VK_COLOR_COMPONENT_B_BIT, and VK_COLOR_COMPONENT_A_BIT, or none of them

- VUID-vkCmdDrawMeshTasksIndirect2EXT-maxFragmentDualSrcAttachments-09239
  If blending is enabled for any attachment where either the source or destination blend factors for that attachment use the secondary color input, the maximum value of `Location` for any output attachment statically used in the `Fragment` `Execution` `Model` executed by this command must be less than `maxFragmentDualSrcAttachments`

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-09548
  If the current render pass was begun with vkCmdBeginRendering, there is no shader object bound to any graphics stage, the value of each element of VkRenderingAttachmentLocationInfo::`pColorAttachmentLocations` in the bound pipeline must match the value for the corresponding locations set currently in the current render pass instance

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-09549
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of each element of VkRenderingInputAttachmentIndexInfo::`pColorAttachmentInputIndices` in the bound pipeline must match the value for the corresponding index set currently in the current render pass instance

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-10927
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` in the bound pipeline must match the value set currently in the current render pass instance

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-10928
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` in the bound pipeline must match the value set currently in the current render pass instance

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-09642
  If the current render pass was begun with vkCmdBeginRendering with the VK_RENDERING_ENABLE_LEGACY_DITHERING_BIT_EXT flag, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_2_ENABLE_LEGACY_DITHERING_BIT_EXT

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-09643
  If the bound graphics pipeline was created with VK_PIPELINE_CREATE_2_ENABLE_LEGACY_DITHERING_BIT_EXT, the current render pass must have begun with vkCmdBeginRendering with the VK_RENDERING_ENABLE_LEGACY_DITHERING_BIT_EXT flag

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-10677
  If the per-tile execution model is enabled, the tileShadingPerTileDraw feature must be enabled

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-10772
  If a shader object is bound to any graphics stage, multiview functionality must not be enabled in the current render pass

- VUID-vkCmdDrawMeshTasksIndirect2EXT-multiviewPerViewViewports-12262
  If the `multiviewPerViewViewports` feature is enabled, then the index of the most significant bit in current render pass instance `viewMask` must be less than the current value of `viewportCount`

- VUID-vkCmdDrawMeshTasksIndirect2EXT-multiviewPerViewViewports-12263
  If the `multiviewPerViewViewports` feature is enabled, then the index of the most significant bit in current render pass instance `viewMask` must be less than the current value of `scissorCount`

- VUID-vkCmdDrawMeshTasksIndirect2EXT-flags-11521
  If current render pass instance was begun with vkCmdBeginRendering with VkRenderingInfo::`flags` which includes VK_RENDERING_FRAGMENT_REGION_BIT_EXT, and if sample shading is enabled (explicitly or implicitly), then the minimum fraction for sample shading must equal 0.0

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-11522
  If the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, and the `dynamicRenderingUnusedAttachments` feature is not enabled, the graphics pipeline bound must have been created with a VkCustomResolveCreateInfoEXT

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-11523
  If the current render pass instance was begun with vkCmdBeginRendering and does not contain a custom resolve, and the `dynamicRenderingUnusedAttachments` feature is not enabled, the graphics pipeline bound must not have been created with a VkCustomResolveCreateInfoEXT

- VUID-vkCmdDrawMeshTasksIndirect2EXT-customResolve-11524
  If the current render pass instance was begun with vkCmdBeginRendering and vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, the graphics pipeline bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_TRUE

- VUID-vkCmdDrawMeshTasksIndirect2EXT-customResolve-11525
  If the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, and vkCmdBeginCustomResolveEXT has not been recorded in the render pass instance, the graphics pipeline bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_FALSE

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-11861
  If the `dynamicRenderingUnusedAttachments` feature is not enabled and the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, the bound graphics pipeline must have been created with a VkCustomResolveCreateInfoEXT::`colorAttachmentCount` equal to VkRenderingInfo::`colorAttachmentCount`

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-11862
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound graphics pipeline

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-11863
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` equal to VK_NULL_HANDLE must have the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound pipeline equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirect2EXT-dynamicRenderingUnusedAttachments-11864
  If the `dynamicRenderingUnusedAttachments` feature is enabled, the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound graphics pipeline, or the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats`, if it exists, must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-11865
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-11866
  If current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`

- VUID-vkCmdDrawMeshTasksIndirect2EXT-dynamicRenderingUnusedAttachments-11867
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, and the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-11868
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->resolveImageView` was VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-11869
  If current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`

- VUID-vkCmdDrawMeshTasksIndirect2EXT-dynamicRenderingUnusedAttachments-11870
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, and the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirect2EXT-colorAttachmentCount-11871
  If the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0` and vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, then for each element of the VkRenderingInfo::`pColorAttachments` array with a `resolveImageView` not equal to VK_NULL_HANDLE, the `resolveImageView` must have been created with a sample count equal to the value of `rasterizationSamples` for the bound graphics pipeline

- VUID-vkCmdDrawMeshTasksIndirect2EXT-pDepthAttachment-11872
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`

- VUID-vkCmdDrawMeshTasksIndirect2EXT-pStencilAttachment-11873
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`

- VUID-vkCmdDrawMeshTasksIndirect2EXT-customResolve-11529
  If a shader object is bound to the fragment stage, the current render pass instance was begun with vkCmdBeginRendering, a fragment density map attachment is active, and vkCmdBeginCustomResolveEXT has been called, then the fragment shader object bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_TRUE

- VUID-vkCmdDrawMeshTasksIndirect2EXT-customResolve-11530
  If a shader object is bound to the fragment stage, the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, a fragment density map attachment is active, and vkCmdBeginCustomResolveEXT has not yet been called, then the fragment shader object bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_FALSE

- VUID-vkCmdDrawMeshTasksIndirect2EXT-flags-13361
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, then all bound shader objects must have been created with the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit

- VUID-vkCmdDrawMeshTasksIndirect2EXT-flags-13362
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, then the pipeline layout of the bound descriptor sets must have been created with VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT set

- VUID-vkCmdDrawMeshTasksIndirect2EXT-flags-13363
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, and any of the descriptor set layouts used to create the pipeline layout of the bound descriptor sets were created with any binding’s VkDescriptorSetLayoutBinding::`stageFlags` set with VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT, then there must be no binding with VkDescriptorSetLayoutBinding::`stageFlags` set with VK_SHADER_STAGE_TASK_BIT_EXT or VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-vkCmdDrawMeshTasksIndirect2EXT-flags-13364
  If there are any shader objects bound that were created with `flags` that includes both the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR and VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT bits, the pipeline layout of the bound descriptor sets must have been created with VK_PIPELINE_LAYOUT_CREATE_NO_TASK_SHADER_BIT_KHR set

- VUID-vkCmdDrawMeshTasksIndirect2EXT-flags-13365
  If there are any shader objects bound that were created with `flags` that includes both the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR and VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT bits, there must be no shader object bound to the VK_SHADER_STAGE_TASK_BIT_EXT stage

- VUID-vkCmdDrawMeshTasksIndirect2EXT-stage-06480
  The bound graphics pipeline must not have been created with the VkPipelineShaderStageCreateInfo::`stage` member of any element of VkGraphicsPipelineCreateInfo::`pStages` set to VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT

- VUID-vkCmdDrawMeshTasksIndirect2EXT-pStages-10680
  If there is no bound graphics pipeline, `vkCmdBindShadersEXT` must not have last bound the `pStages` element of VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT with a valid shader object other than VK_NULL_HANDLE

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-07074
  Transform Feedback Queries must not be active

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-07075
  Primitives Generated Queries must not be active

- VUID-vkCmdDrawMeshTasksIndirect2EXT-pipelineStatistics-07076
  The `pipelineStatistics` member used to create any active Pipeline Statistics Query must not contain VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT, VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT, VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT, VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT, VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT, VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT, VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT, VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT, or VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-08694
  If there is no bound graphics pipeline, and both the `taskShader` and `meshShader` features are enabled, and a valid `VkShaderEXT` is bound the to the VK_SHADER_STAGE_MESH_BIT_EXT stage, and that `VkShaderEXT` was created without the VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT flag, a valid `VkShaderEXT` must be bound to the VK_SHADER_STAGE_TASK_BIT_EXT stage

- VUID-vkCmdDrawMeshTasksIndirect2EXT-None-08695
  If there is no bound graphics pipeline, and both the `taskShader` and `meshShader` features are enabled, and a valid `VkShaderEXT` is bound the to the VK_SHADER_STAGE_MESH_BIT_EXT stage, and that `VkShaderEXT` was created with the VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT flag, there must be no `VkShaderEXT` bound to the VK_SHADER_STAGE_TASK_BIT_EXT stage

- VUID-vkCmdDrawMeshTasksIndirect2EXT-commandBuffer-13067
  `commandBuffer` must not be a protected command buffer

Valid Usage (Implicit)

- VUID-vkCmdDrawMeshTasksIndirect2EXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdDrawMeshTasksIndirect2EXT-pInfo-parameter
  `pInfo` must be a valid pointer to a valid VkDrawIndirect2InfoKHR structure

- VUID-vkCmdDrawMeshTasksIndirect2EXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdDrawMeshTasksIndirect2EXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdDrawMeshTasksIndirect2EXT-renderpass
  This command must only be called inside of a render pass instance

- VUID-vkCmdDrawMeshTasksIndirect2EXT-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdDrawMeshTasksIndirect2EXT-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Inside | Outside | VK_QUEUE_GRAPHICS_BIT | Action

Conditional Rendering

vkCmdDrawMeshTasksIndirect2EXT is affected by conditional rendering

To record an indirect mesh tasks drawing command, call:

Warning | This functionality is superseded by vkCmdDrawMeshTasksIndirect2EXT. See Legacy Functionality for more information.

    // Provided by VK_EXT_mesh_shader
    void vkCmdDrawMeshTasksIndirectEXT(
        VkCommandBuffer                             commandBuffer,
        VkBuffer                                    buffer,
        VkDeviceSize                                offset,
        uint32_t                                    drawCount,
        uint32_t                                    stride);

- `commandBuffer` is the command buffer into which the command is recorded.

- `buffer` is the buffer containing draw parameters.

- `offset` is the byte offset into `buffer` where parameters begin.

- `drawCount` is the number of draws to execute, and can be zero.

- `stride` is the byte stride between successive sets of draw parameters.

`vkCmdDrawMeshTasksIndirectEXT` behaves similarly to vkCmdDrawMeshTasksEXT except that the parameters are read by the device from a buffer during execution. `drawCount` draws are executed by the command, with parameters taken from `buffer` starting at `offset` and increasing by `stride` bytes for each successive draw. The parameters of each draw are encoded in an array of VkDrawMeshTasksIndirectCommandEXT structures. If `drawCount` is less than or equal to one, `stride` is ignored.

Valid Usage

- VUID-vkCmdDrawMeshTasksIndirectEXT-magFilter-04553
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdDrawMeshTasksIndirectEXT-magFilter-09598
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdDrawMeshTasksIndirectEXT-mipmapMode-04770
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdDrawMeshTasksIndirectEXT-mipmapMode-09599
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdDrawMeshTasksIndirectEXT-unnormalizedCoordinates-09635
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `levelCount` and `layerCount` must be 1

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-08609
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `viewType` must be VK_IMAGE_VIEW_TYPE_1D or VK_IMAGE_VIEW_TYPE_2D

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-08610
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions with `ImplicitLod`, `Dref` or `Proj` in their name

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-08611
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions that includes a LOD bias or any offset values

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-06479
  If a VkImageView is sampled with depth comparison, the image view’s format features must contain VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-02691
  If a VkImageView is accessed using atomic operations as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-07888
  If a VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER descriptor is accessed using atomic operations as a result of this command, then the storage texel buffer’s format features must contain VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-02692
  If a VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-02693
  If the VK_EXT_filter_cubic extension is not enabled and any VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, it must not have a VkImageViewType of VK_IMAGE_VIEW_TYPE_3D, VK_IMAGE_VIEW_TYPE_CUBE, or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY

- VUID-vkCmdDrawMeshTasksIndirectEXT-filterCubic-02694
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have a VkImageViewType and format that supports cubic filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubic` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdDrawMeshTasksIndirectEXT-filterCubicMinmax-02695
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX as a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubicMinmax` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdDrawMeshTasksIndirectEXT-cubicRangeClamp-09212
  If the `cubicRangeClamp` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must not have a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM

- VUID-vkCmdDrawMeshTasksIndirectEXT-reductionMode-09213
  Any VkImageView being sampled with a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM as a result of this command must sample with VK_FILTER_CUBIC_EXT

- VUID-vkCmdDrawMeshTasksIndirectEXT-selectableCubicWeights-09214
  If the `selectableCubicWeights` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have VkSamplerCubicWeightsCreateInfoQCOM::`cubicWeights` equal to VK_CUBIC_FILTER_WEIGHTS_CATMULL_ROM_QCOM

- VUID-vkCmdDrawMeshTasksIndirectEXT-flags-02696
  Any VkImage created with a VkImageCreateInfo::`flags` containing VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV sampled as a result of this command must only be sampled using a VkSamplerAddressMode of VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawMeshTasksIndirectEXT-OpTypeImage-07027
  For any VkImageView being written as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawMeshTasksIndirectEXT-OpTypeImage-07028
  For any VkImageView being read as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawMeshTasksIndirectEXT-OpTypeImage-07029
  For any VkBufferView being written as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown`, the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawMeshTasksIndirectEXT-OpTypeImage-07030
  Any VkBufferView being read as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown` then the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-08600
  If a a bound shader was created with a pipeline layout and statically uses a set n, a descriptor set must have been bound to n at the same pipeline bind point, with layouts compatible for set n with the layout(s) used to create the shader, as described in Pipeline Layout Compatibility

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-08601
  If a a bound shader was created with a pipeline layout or specified push constant ranges and statically uses a push constant value, that value must have been set for the same pipeline bind point, with push constant ranges that are compatible with the push constant range used to create the shader

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-10068
  For each array of resources that is used by a bound shader, the indices used to access members of the array must be less than the descriptor count for the identified binding in the descriptor sets used by this command

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-08114
  Descriptors in each bound descriptor set, specified via vkCmdBindDescriptorSets, must be valid if they are accessed as described by descriptor validity by the VkPipeline bound to the pipeline bind point used by this command and the bound VkPipeline was not created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawMeshTasksIndirectEXT-imageLayout-00344
  If an image descriptor is accessed by a shader, the VkImageLayout must match the subresource accessible from the VkImageView as defined by the image layout matching rules

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-08115
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdBindDescriptorSets, the bound VkPipeline must have been created without VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-08116
  Descriptors in bound descriptor buffers, specified via vkCmdSetDescriptorBufferOffsetsEXT, must be valid if they are dynamically accessed

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-08117
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdSetDescriptorBufferOffsetsEXT, the bound VkPipeline must have been created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-08119
  If a descriptor is dynamically used with a VkPipeline created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-08605
  If a descriptor is dynamically used with a VkShaderEXT created with a `VkDescriptorSetLayout` that was created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-08606
  If the `shaderObject` feature is not enabled, a valid pipeline must be bound to the pipeline bind point used by this command

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-08608
  If a pipeline is bound to the pipeline bind point used by this command, there must not have been any calls to dynamic state setting commands for any state specified statically in the VkPipeline object bound to the pipeline bind point used by this command, since that pipeline was bound

- VUID-vkCmdDrawMeshTasksIndirectEXT-uniformBuffers-06935
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-08612
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawMeshTasksIndirectEXT-storageBuffers-06936
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-08613
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a storage buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawMeshTasksIndirectEXT-commandBuffer-02707
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, any resource accessed by bound shaders must not be a protected resource

- VUID-vkCmdDrawMeshTasksIndirectEXT-viewType-07752
  If a VkImageView is accessed as a result of this command, then the image view’s `viewType` must match the `Dim` operand of the `OpTypeImage` as described in Compatibility Between SPIR-V Image Dimensions and Vulkan ImageView Types

- VUID-vkCmdDrawMeshTasksIndirectEXT-format-07753
  If a VkImageView or VkBufferView is accessed as a result of this command, then the numeric type of the view’s `format` and the `Sampled` `Type` operand of the `OpTypeImage` must match

- VUID-vkCmdDrawMeshTasksIndirectEXT-OpImageWrite-08795
  If a VkImageView created with a format other than VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the image view’s format

- VUID-vkCmdDrawMeshTasksIndirectEXT-OpImageWrite-08796
  If a VkImageView created with the format VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have four components

- VUID-vkCmdDrawMeshTasksIndirectEXT-OpImageWrite-04469
  If a VkBufferView is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the buffer view’s format

- VUID-vkCmdDrawMeshTasksIndirectEXT-SampledType-04470
  If a VkImageView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdDrawMeshTasksIndirectEXT-SampledType-04471
  If a VkImageView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdDrawMeshTasksIndirectEXT-SampledType-04472
  If a VkBufferView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdDrawMeshTasksIndirectEXT-SampledType-04473
  If a VkBufferView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdDrawMeshTasksIndirectEXT-sparseImageInt64Atomics-04474
  If the `sparseImageInt64Atomics` feature is not enabled, VkImage objects created with the VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdDrawMeshTasksIndirectEXT-sparseImageInt64Atomics-04475
  If the `sparseImageInt64Atomics` feature is not enabled, VkBuffer objects created with the VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdDrawMeshTasksIndirectEXT-OpImageSampleWeightedQCOM-06971
  If `OpImageSampleWeightedQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_SAMPLED_IMAGE_BIT_QCOM

- VUID-vkCmdDrawMeshTasksIndirectEXT-OpImageSampleWeightedQCOM-06972
  If `OpImageSampleWeightedQCOM` uses a VkImageView as a sample weight image as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_IMAGE_BIT_QCOM

- VUID-vkCmdDrawMeshTasksIndirectEXT-OpImageBoxFilterQCOM-06973
  If `OpImageBoxFilterQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BOX_FILTER_SAMPLED_BIT_QCOM

- VUID-vkCmdDrawMeshTasksIndirectEXT-OpImageBlockMatchSSDQCOM-06974
  If `OpImageBlockMatchSSDQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdDrawMeshTasksIndirectEXT-OpImageBlockMatchSADQCOM-12420
  If `OpImageBlockMatchSADQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdDrawMeshTasksIndirectEXT-OpImageBlockMatchSADQCOM-06976
  If `OpImageBlockMatchSADQCOM` or OpImageBlockMatchSSDQCOM is used to read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdDrawMeshTasksIndirectEXT-OpImageSampleWeightedQCOM-06977
  If `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdDrawMeshTasksIndirectEXT-OpImageSampleWeightedQCOM-06978
  If any command other than `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must not have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdDrawMeshTasksIndirectEXT-OpImageBlockMatchWindow-09215
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM

- VUID-vkCmdDrawMeshTasksIndirectEXT-OpImageBlockMatchWindow-09216
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format must be a single-component format

- VUID-vkCmdDrawMeshTasksIndirectEXT-OpImageBlockMatchWindow-09217
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdDrawMeshTasksIndirectEXT-OpImageBlockMatchWindow-12421
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the `blockMatchExtendedClampToEdge` feature is not enabled, the input sampler must not have been created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawMeshTasksIndirectEXT-addressModeU-12422
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the input sampler was created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, then the sampler must have been created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-07288
  Any shader invocation executed by this command must terminate

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-09600
  If a descriptor with type equal to any of VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, or VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT is accessed as a result of this command, all image subresources identified by that descriptor must be in the image layout identified when the descriptor was written

- VUID-vkCmdDrawMeshTasksIndirectEXT-micromap-11636
  If an acceleration structure is accessed as a result of this command through an `OpRayQueryProceedKHR` operation , the `VK_EXT_opacity_micromap` extension is not enabled, and the acceleration structure is built using geometry with a VkAccelerationStructureTrianglesOpacityMicromapKHR structure included in its `pNext` chain, the shader must have specified a `OpacityMicromapIdKHR` execution mode with its specialization constant operand equal to VK_TRUE

- VUID-vkCmdDrawMeshTasksIndirectEXT-micromap-11637
  If an acceleration structure is accessed as a result of this command and the acceleration structure was constructed through deserialization, all micromap arrays referenced by the acceleration structure that were not replaced by an acceleration structure update command must have been deserialized using the serialized data of the corresponding micromaps used to originally build the acceleration structure prior to the execution of this command on the device

- VUID-vkCmdDrawMeshTasksIndirectEXT-micromap-11638
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkPipeline bound to the pipeline bind point used by this command must not have been created with `flags` that includes VK_PIPELINE_CREATE_2_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_KHR

- VUID-vkCmdDrawMeshTasksIndirectEXT-micromap-11639
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkShaderEXT that accessed the descriptor must not have been created with `flags` that includes VK_SHADER_CREATE_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_EXT

- VUID-vkCmdDrawMeshTasksIndirectEXT-commandBuffer-10746
  The `VkDeviceMemory` object allocated from a `VkMemoryHeap` with the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property that is bound to a resource accessed as a result of this command must be the active bound tile memory object in `commandBuffer`

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-10678
  If this command is recorded inside a tile shading render pass instance, the stages corresponding to the pipeline bind point used by this command must only include VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_FRAGMENT_BIT, and/or VK_SHADER_STAGE_COMPUTE_BIT

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-10679
  If this command is recorded where per-tile execution model is enabled, there must be no access to any image while the image was be transitioned to the VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT layout

- VUID-vkCmdDrawMeshTasksIndirectEXT-pDescription-09900
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the underlying VkTensorARM object must have been created with the VK_TENSOR_USAGE_SHADER_BIT_ARM usage flag set

- VUID-vkCmdDrawMeshTasksIndirectEXT-dimensionCount-09905
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the `Rank` of the `OpTypeTensorARM` of the tensor resource variable must be equal to the `dimensionCount` provided via VkTensorCreateInfoARM::`pDescription` when creating the underlying VkTensorARM object

- VUID-vkCmdDrawMeshTasksIndirectEXT-OpTypeTensorARM-09906
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the element type of the `OpTypeTensorARM` of the tensor resource variable must be compatible with the VkFormat of the VkTensorViewARM used for the access

- VUID-vkCmdDrawMeshTasksIndirectEXT-OpTensorReadARM-12462
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, using `OpTensorReadARM` or `OpTensorWriteARM`, and the underlying VkTensorARM object was created with a VK_TENSOR_TILING_BRICK_16_WIDE_ARM, VK_TENSOR_TILING_BRICK_8_WIDE_ARM, VK_TENSOR_TILING_BRICK_4_WIDE_ARM, VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_ARM, or VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_64K_ARM VkTensorTilingARM, and the object read or written is an array, then the innermost coordinate provided to `OpTensorReadARM` or `OpTensorWriteARM` via the `Coordinates` operand must be a multiple of the largest power of 2 that is less than or equal to the number of components of the array

- VUID-vkCmdDrawMeshTasksIndirectEXT-pNext-12463
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command and the corresponding VkTensorARM object was created with a VkTensorRollingBackingCreateInfoARM structure in the `pNext` chain of VkTensorCreateInfoARM, then the number of elements accessed with one `OpTensorReadARM` or `OpTensorWriteARM`, must be less than or equal to the number of elements available from the starting coordinate in the rolling backing along the innermost dimension, defined as `wraps`[`dimensionCount` - 1] - InnermostCoordinate % `wraps`[`dimensionCount` - 1] where InnermostCoordinate is the last component of the coordinates array provided via the `Coordinates` operand

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-12472
  Descriptors dynamically accessed in bound descriptor heaps must be valid

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-11297
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a `OpTypeStruct` decorated with `Block` or `BufferBlock` using that mapping, the calculated offset for the resource heap must be a multiple of `bufferDescriptorAlignment`

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-11298
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeImage` or `OpTypeSampledImage` using that mapping, the calculated offset for the resource heap must be a multiple of `imageDescriptorAlignment`

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-11299
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeSampler` or `OpTypeSampledImage` using that mapping, the calculated offset for the sampler heap must be a multiple of `samplerDescriptorAlignment`

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-11397
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeTensorARM` using that mapping, the calculated offset for the resource heap must be a multiple of `tensorDescriptorAlignment`

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-11300
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 4

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-11301
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-11302
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-11304
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 8

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-11305
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-11306
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address pointed to by the address in push data must be a valid VkDeviceAddress

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-11308
  For each descriptor heap that is statically used by a bound shader, either directly or via a descriptor mapping, a valid descriptor heap must be bound

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-11309
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, execution of this command must not result in any descriptor read accessing data outside of the user range of the respective heap bound by `vkCmdBind*HeapEXT` commands

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-11372
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer or uniform texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified via VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-11373
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer or storage texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-11374
  If the `robustBufferAccess2` feature is not enabled, the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, uniform texel buffer, storage buffer, or storage texel buffer, that shader must not access values outside of the range of the buffer as specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawMeshTasksIndirectEXT-pBindInfo-11375
  If any bound shader uses an embedded sampler via a descriptor mapping, the value of `pBindInfo->reservedRangeSize` set for vkCmdBindSamplerHeapEXT must be greater than or equal to `minSamplerHeapReservedRangeWithEmbedded`

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-11376
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, and that shader statically uses a push constant value, that value must have been set by vkCmdPushDataEXT

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-11398
  If a bound shader was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the access must not be out of bounds

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-11437
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the buffer from which the address in push data was queried must have been created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-11438
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-11441
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must be aligned to `minUniformBufferOffsetAlignment`

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-11439
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_STORAGE_BUFFER_BIT usage flag set

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-11442
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must be aligned to `minStorageBufferOffsetAlignment`

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-11485
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses an acceleration structure using that mapping, the address that the acceleration structure is mapped to must be an acceleration structure address retrieved from a VkAccelerationStructureKHR object via vkGetAccelerationStructureDeviceAddressKHR or handle retrieved from a VkAccelerationStructureNV object via vkGetAccelerationStructureHandleNV

- VUID-vkCmdDrawMeshTasksIndirectEXT-index-11450
  If a shader uses a sampler descriptor to sample an image as a result of this command, and that sampler descriptor uses a custom border color with an index defined by VkSamplerCustomBorderColorIndexCreateInfoEXT, the value of VkSamplerCustomBorderColorIndexCreateInfoEXT::`index` must have been registered before this command was recorded, and still be registered during the sampling operation, with an identically defined color

- VUID-vkCmdDrawMeshTasksIndirectEXT-protectedNoFault-11455
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, the address that the resource is mapped to must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdDrawMeshTasksIndirectEXT-protectedNoFault-11456
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, the address of the indirect memory must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdDrawMeshTasksIndirectEXT-renderPass-02684
  The current render pass must be compatible with the `renderPass` member of the `VkGraphicsPipelineCreateInfo` structure specified when creating the `VkPipeline` bound to VK_PIPELINE_BIND_POINT_GRAPHICS

- VUID-vkCmdDrawMeshTasksIndirectEXT-subpass-02685
  The subpass index of the current render pass must be equal to the `subpass` member of the `VkGraphicsPipelineCreateInfo` structure specified when creating the `VkPipeline` bound to VK_PIPELINE_BIND_POINT_GRAPHICS

- VUID-vkCmdDrawMeshTasksIndirectEXT-OpTypeImage-07468
  If any shader executed by this pipeline accesses an `OpTypeImage` variable with a `Dim` operand of `SubpassData`, it must be decorated with an `InputAttachmentIndex` that corresponds to a valid input attachment in the current subpass

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-07469
  Input attachment views accessed in a subpass must be created with the same VkFormat as the corresponding subpass definition, and be created with a VkImageView that is compatible with the attachment referenced by the subpass' `pInputAttachments`[`InputAttachmentIndex`] in the bound VkFramebuffer as specified by Fragment Input Attachment Compatibility

- VUID-vkCmdDrawMeshTasksIndirectEXT-pDepthInputAttachmentIndex-09595
  Input attachment views accessed in a dynamic render pass with a `InputAttachmentIndex` referenced by VkRenderingInputAttachmentIndexInfo, or no `InputAttachmentIndex` if VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` or VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` are `NULL`, must be created with a VkImageView that is compatible with the corresponding color, depth, or stencil attachment in VkRenderingInfo

- VUID-vkCmdDrawMeshTasksIndirectEXT-pDepthInputAttachmentIndex-09596
  Input attachment views accessed in a dynamic render pass via a shader object must have an `InputAttachmentIndex` if both VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` and VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` are non-`NULL`

- VUID-vkCmdDrawMeshTasksIndirectEXT-InputAttachmentIndex-09597
  If an input attachment view accessed in a dynamic render pass via a shader object has an `InputAttachmentIndex`, the `InputAttachmentIndex` must match an index in VkRenderingInputAttachmentIndexInfo

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-06537
  Memory backing image subresources used as attachments in the current render pass must not be written in any way other than as an attachment by this command

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-10795
  If a color attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_COLOR_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-10796
  If a depth attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_DEPTH_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-10797
  If a stencil attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_STENCIL_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-12338
  If a color attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_COLOR_BIT on that attachment, the color attachment must not be written to by this command

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-12339
  If a depth attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_DEPTH_BIT on that attachment, the depth attachment must not be written to by this command

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-12340
  If a stencil attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_STENCIL_BIT on that attachment, the stencil attachment must not be written to by this command

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-09003
  If an attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, it must not be accessed in any way other than as an attachment, storage image, or sampled image by this command

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-06886
  If the current render pass instance uses a depth/stencil attachment with a read-only layout for the depth aspect, depth writes must be disabled

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-06887
  If the current render pass instance uses a depth/stencil attachment with a read-only layout for the stencil aspect, both front and back `writeMask` are not zero, and stencil test is enabled, all stencil ops must be VK_STENCIL_OP_KEEP

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-07831
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT dynamic state enabled then vkCmdSetViewport must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-07832
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SCISSOR dynamic state enabled then vkCmdSetScissor must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-08617
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_WIDTH dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineWidth must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-07834
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BIAS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthBiasEnable` is VK_TRUE, then vkCmdSetDepthBias or vkCmdSetDepthBias2EXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-07835
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_BLEND_CONSTANTS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and an active color attachment current value of `blendEnable` is VK_TRUE with a blend equations where any VkBlendFactor member is VK_BLEND_FACTOR_CONSTANT_COLOR, VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR, VK_BLEND_FACTOR_CONSTANT_ALPHA, or VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA, then vkCmdSetBlendConstants must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-07836
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BOUNDS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthBoundsTestEnable` is VK_TRUE, then vkCmdSetDepthBounds must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-07837
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilCompareMask must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-07838
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_WRITE_MASK dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilWriteMask must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-07839
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_REFERENCE dynamic state enabled, the current value of and `rasterizerDiscardEnable` is VK_FALSE, the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilReference must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectEXT-maxMultiviewInstanceIndex-02688
  If the draw is recorded in a render pass instance with multiview enabled, the maximum instance index must be less than or equal to VkPhysicalDeviceMultiviewProperties::`maxMultiviewInstanceIndex`

- VUID-vkCmdDrawMeshTasksIndirectEXT-sampleLocationsEnable-02689
  If the bound graphics pipeline was created with VkPipelineSampleLocationsStateCreateInfoEXT::`sampleLocationsEnable` set to VK_TRUE, then the active depth attachment must have been created with the VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit set

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-07634
  If the `VK_EXT_sample_locations` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetSampleLocationsEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-06666
  If the `VK_EXT_sample_locations` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `sampleLocationsEnable` is VK_TRUE, then vkCmdSetSampleLocationsEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-07840
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_CULL_MODE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCullMode must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-07841
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRONT_FACE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetFrontFace must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-07843
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, vkCmdSetDepthTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-07844
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthTestEnable` is VK_TRUE, then vkCmdSetDepthWriteEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-07845
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_COMPARE_OP dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthTestEnable` is VK_TRUE, then vkCmdSetDepthCompareOp must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-07846
  If the `depthBounds` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthBoundsTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-07847
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetStencilTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-07848
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_OP dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilOp must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectEXT-viewportCount-03417
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, and the state is not inherited, then vkCmdSetViewportWithCount must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectEXT-scissorCount-03418
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT dynamic state enabled, and the state is not inherited, then vkCmdSetScissorWithCount must have been called and not subsequently invalidated in the current command buffer prior to this drawing

- VUID-vkCmdDrawMeshTasksIndirectEXT-viewportCount-03419
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with both the VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic states enabled, and the state is not inherited, then the `viewportCount` parameter of `vkCmdSetViewportWithCount` must match the `scissorCount` parameter of `vkCmdSetScissorWithCount`

- VUID-vkCmdDrawMeshTasksIndirectEXT-viewportCount-04137
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportWScalingStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksIndirectEXT-viewportCount-04138
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, the current value of `viewportWScalingEnable` is VK_TRUE, then vkCmdSetViewportWScalingNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-08636
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, the current value of `viewportWScalingEnable` is VK_TRUE, then the `viewportCount` parameter in the last call to vkCmdSetViewportWScalingNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksIndirectEXT-viewportCount-04139
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportShadingRateImageStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksIndirectEXT-shadingRateImage-09233
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_COARSE_SAMPLE_ORDER_NV and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoarseSampleOrderNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectEXT-shadingRateImage-09234
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `shadingRateImageEnable` is VK_TRUE, then vkCmdSetViewportShadingRatePaletteNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-08637
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `shadingRateImageEnable` is VK_TRUE, then the `viewportCount` parameter in the last call to vkCmdSetViewportShadingRatePaletteNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksIndirectEXT-VkPipelineVieportCreateInfo-04141
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled and a VkPipelineViewportSwizzleStateCreateInfoNV structure chained from VkPipelineViewportStateCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportSwizzleStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksIndirectEXT-VkPipelineVieportCreateInfo-04142
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled and a VkPipelineViewportExclusiveScissorStateCreateInfoNV structure chained from VkPipelineViewportStateCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportExclusiveScissorStateCreateInfoNV::`exclusiveScissorCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-07878
  If the `exclusiveScissor` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_ENABLE_NV dynamic state enabled, then vkCmdSetExclusiveScissorEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-07879
  If the `exclusiveScissor` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_NV dynamic state enabled, and the most recent call to vkCmdSetExclusiveScissorEnableNV in the current command buffer set any element of `pExclusiveScissorEnables` to VK_TRUE, then vkCmdSetExclusiveScissorNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-04876
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE dynamic state enabled, then vkCmdSetRasterizerDiscardEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-04877
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthBiasEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectEXT-logicOp-04878
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LOGIC_OP_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `logicOpEnable` is VK_TRUE, then vkCmdSetLogicOpEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectEXT-primitiveFragmentShadingRateWithMultipleViewports-04552
  If the `primitiveFragmentShadingRateWithMultipleViewports` limit is not supported, the bound graphics pipeline was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, and any of the shader stages of the bound graphics pipeline write to the `PrimitiveShadingRateKHR` built-in, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and the `viewportCount` parameter of `vkCmdSetViewportWithCount` must be `1`

- VUID-vkCmdDrawMeshTasksIndirectEXT-primitiveFragmentShadingRateWithMultipleViewports-08642
  If the `primitiveFragmentShadingRateWithMultipleViewports` limit is not supported, and any shader object bound to a graphics stage writes to the `PrimitiveShadingRateKHR` built-in, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and the `viewportCount` parameter of `vkCmdSetViewportWithCount` must be `1`

- VUID-vkCmdDrawMeshTasksIndirectEXT-blendEnable-04727
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, then for each color attachment, if the corresponding image view’s format features do not contain VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT, then the corresponding current value of `blendEnable` must be VK_FALSE

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-08644
  If a shader object is bound to any graphics stage or a graphics pipeline is bound, the current value of `rasterizerDiscardEnable` is VK_FALSE, and none of the following is enabled:

  - the `VK_AMD_mixed_attachment_samples` extension

  - the `VK_NV_framebuffer_mixed_samples` extension

  - the `multisampledRenderToSingleSampled` feature

  then the current value of `rasterizationSamples` must be the same as the current color and/or depth/stencil attachments

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-08876
  If a shader object is bound to any graphics stage, the current render pass instance must have been begun with vkCmdBeginRendering

- VUID-vkCmdDrawMeshTasksIndirectEXT-imageView-06172
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawMeshTasksIndirectEXT-imageView-06173
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawMeshTasksIndirectEXT-imageView-06174
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawMeshTasksIndirectEXT-imageView-06175
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawMeshTasksIndirectEXT-imageView-06176
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawMeshTasksIndirectEXT-imageView-06177
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawMeshTasksIndirectEXT-viewMask-06178
  If the current render pass instance was begun with vkCmdBeginRendering, the bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::`viewMask` equal to VkRenderingInfo::`viewMask`

- VUID-vkCmdDrawMeshTasksIndirectEXT-colorAttachmentCount-06179
  If the `dynamicRenderingUnusedAttachments` feature is not enabled and the current render pass instance was begun with vkCmdBeginRendering, the bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::`colorAttachmentCount` equal to VkRenderingInfo::`colorAttachmentCount`

- VUID-vkCmdDrawMeshTasksIndirectEXT-dynamicRenderingUnusedAttachments-08910
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound graphics pipeline

- VUID-vkCmdDrawMeshTasksIndirectEXT-dynamicRenderingUnusedAttachments-08912
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` equal to VK_NULL_HANDLE must have the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound pipeline equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectEXT-dynamicRenderingUnusedAttachments-08911
  If the `dynamicRenderingUnusedAttachments` feature is enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound graphics pipeline, or the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats`, if it exists, must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectEXT-colorAttachmentCount-09362
  If the current render pass instance was begun with vkCmdBeginRendering, with a VkRenderingInfo::`colorAttachmentCount` equal to `1`, there is no shader object bound to any graphics stage, and a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, each element of the VkRenderingInfo::`pColorAttachments` array with a `resolveImageView` not equal to VK_NULL_HANDLE must have been created with an image created with a VkExternalFormatANDROID::`externalFormat` value equal to the VkExternalFormatANDROID::`externalFormat` value used to create the bound graphics pipeline

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-09363
  If there is no shader object bound to any graphics stage, the current render pass instance was begun with vkCmdBeginRendering and a VkRenderingInfo::`colorAttachmentCount` equal to `1`, and a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with an image created with a VkExternalFormatANDROID::`externalFormat` value equal to the VkExternalFormatANDROID::`externalFormat` value used to create the bound graphics pipeline

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-09364
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetColorBlendEnableEXT must have set the blend enable to VK_FALSE prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-09365
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetRasterizationSamplesEXT must have set `rasterizationSamples` to VK_SAMPLE_COUNT_1_BIT prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-09368
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetFragmentShadingRateKHR must have set `pFragmentSize->width` to `1` prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-09369
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetFragmentShadingRateKHR must have set `pFragmentSize->height` to `1` prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-07749
  If the `colorWriteEnable` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorWriteEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectEXT-attachmentCount-07750
  If the `colorWriteEnable` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the `attachmentCount` parameter of most recent call to `vkCmdSetColorWriteEnableEXT` in the current command buffer must be greater than or equal to the number of active color attachments

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-07751
  If the `VK_EXT_discard_rectangles` extension is enabled, a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT dynamic state enabled and the `pNext` chain of VkGraphicsPipelineCreateInfo included a VkPipelineDiscardRectangleStateCreateInfoEXT structure, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for each discard rectangle in VkPipelineDiscardRectangleStateCreateInfoEXT::`discardRectangleCount`

- VUID-vkCmdDrawMeshTasksIndirectEXT-rasterizerDiscardEnable-09236
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT dynamic state enabled and the `pNext` chain of VkGraphicsPipelineCreateInfo did not include a VkPipelineDiscardRectangleStateCreateInfoEXT structure, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for each discard rectangle in VkPhysicalDeviceDiscardRectanglePropertiesEXT::`maxDiscardRectangles`

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-07880
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDiscardRectangleEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-07881
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_MODE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectEXT-dynamicRenderingUnusedAttachments-08913
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->imageView` was VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectEXT-dynamicRenderingUnusedAttachments-08914
  If current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawMeshTasksIndirectEXT-dynamicRenderingUnusedAttachments-08915
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, and the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->imageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectEXT-dynamicRenderingUnusedAttachments-08916
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->imageView` was VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectEXT-dynamicRenderingUnusedAttachments-08917
  If current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawMeshTasksIndirectEXT-dynamicRenderingUnusedAttachments-08918
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, and the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->imageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectEXT-imageView-06183
  If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentShadingRateAttachmentInfoKHR::`imageView` was not VK_NULL_HANDLE, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

- VUID-vkCmdDrawMeshTasksIndirectEXT-dynamicRenderingLocalRead-11797
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingLocalRead` feature is enabled, the VK_RENDERING_LOCAL_READ_CONCURRENT_ACCESS_CONTROL_BIT_KHR flag is specified, and an attachment is being used as a feedback loop as specified by VK_RENDERING_ATTACHMENT_INPUT_ATTACHMENT_FEEDBACK_BIT_KHR, VkRenderingAttachmentFlagsInfoKHR::`flags` for that attachment must include VK_RENDERING_ATTACHMENT_INPUT_ATTACHMENT_FEEDBACK_BIT_KHR

- VUID-vkCmdDrawMeshTasksIndirectEXT-imageView-06184
  If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentDensityMapAttachmentInfoEXT::`imageView` was not VK_NULL_HANDLE, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT

- VUID-vkCmdDrawMeshTasksIndirectEXT-layers-10831
  If the current render pass instance was created with VK_RENDERING_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE or VK_RENDER_PASS_CREATE_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE, and the bound graphics pipeline was created with VK_PIPELINE_CREATE_2_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE, then the current render pass instance must have a `layers` value less than or equal to VkPipelineFragmentDensityMapLayeredCreateInfoVALVE::`maxFragmentDensityMapLayers`

- VUID-vkCmdDrawMeshTasksIndirectEXT-colorAttachmentCount-06185
  If the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with a sample count equal to the corresponding element of the `pColorAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline

- VUID-vkCmdDrawMeshTasksIndirectEXT-pDepthAttachment-06186
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of the `depthStencilAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawMeshTasksIndirectEXT-pStencilAttachment-06187
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of the `depthStencilAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawMeshTasksIndirectEXT-multisampledRenderToSingleSampled-07285
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with a sample count equal to the value of `rasterizationSamples` for the bound graphics pipeline

- VUID-vkCmdDrawMeshTasksIndirectEXT-multisampledRenderToSingleSampled-07286
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawMeshTasksIndirectEXT-multisampledRenderToSingleSampled-07287
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawMeshTasksIndirectEXT-pNext-07935
  If this command is called inside a render pass instance started with vkCmdBeginRendering, and the `pNext` chain of VkRenderingInfo includes a VkMultisampledRenderToSingleSampledInfoEXT structure with `multisampledRenderToSingleSampledEnable` equal to VK_TRUE, then the value of `rasterizationSamples` for the bound graphics pipeline must be equal to VkMultisampledRenderToSingleSampledInfoEXT::`rasterizationSamples`

- VUID-vkCmdDrawMeshTasksIndirectEXT-renderPass-06198
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline must have been created with a VkGraphicsPipelineCreateInfo::`renderPass` equal to VK_NULL_HANDLE

- VUID-vkCmdDrawMeshTasksIndirectEXT-pColorAttachments-08963
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound with a fragment shader that statically writes to a color attachment, the color write mask is not zero, color writes are enabled, and the corresponding element of the VkRenderingInfo::`pColorAttachments->imageView` was not VK_NULL_HANDLE, then the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectEXT-pColorAttachments-11539
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound with a fragment shader that statically writes to a color attachment, the color write mask is not zero, color writes are enabled, and the corresponding element of the VkRenderingInfo::`pColorAttachments->resolveImageView` was not VK_NULL_HANDLE, then the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectEXT-pDepthAttachment-08964
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound, depth test is enabled, and the VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, then the VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectEXT-pDepthAttachment-11540
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound, depth test is enabled, and the VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, then the VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectEXT-pStencilAttachment-08965
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound, stencil test is enabled and the VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, then the VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectEXT-pStencilAttachment-11860
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound, stencil test is enabled and the VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, then the VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectEXT-flags-10582
  If the current render pass instance was begun with a vkCmdBeginRendering call in `commandBuffer`, its VkRenderingInfo::`flags` parameter must not have VK_RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT set unless VK_RENDERING_CONTENTS_INLINE_BIT_KHR is also set

- VUID-vkCmdDrawMeshTasksIndirectEXT-primitivesGeneratedQueryWithRasterizerDiscard-06708
  If the `primitivesGeneratedQueryWithRasterizerDiscard` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, rasterization discard must not be enabled

- VUID-vkCmdDrawMeshTasksIndirectEXT-primitivesGeneratedQueryWithNonZeroStreams-06709
  If the `primitivesGeneratedQueryWithNonZeroStreams` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, the bound graphics pipeline must not have been created with a non-zero value in `VkPipelineRasterizationStateStreamCreateInfoEXT`::`rasterizationStream`

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-07620
  If the `depthClamp` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLAMP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthClampEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-07621
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_POLYGON_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetPolygonModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-07622
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetRasterizationSamplesEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-07623
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetSampleMaskEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectEXT-alphaToCoverageEnable-08919
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT dynamic state enabled, and `alphaToCoverageEnable` was VK_TRUE in the last call to vkCmdSetAlphaToCoverageEnableEXT, then the Fragment Output Interface must contain a variable for the alpha `Component` word in `Location` 0 at `Index` 0

- VUID-vkCmdDrawMeshTasksIndirectEXT-alphaToCoverageEnable-08920
  If a shader object is bound to any graphics stage, and the most recent call to vkCmdSetAlphaToCoverageEnableEXT in the current command buffer set `alphaToCoverageEnable` to VK_TRUE, then the Fragment Output Interface must contain a variable for the alpha `Component` word in `Location` 0 at `Index` 0

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-07624
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAlphaToCoverageEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-07625
  If the `alphaToOne` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ALPHA_TO_ONE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAlphaToOneEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-07626
  If the `logicOp` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LOGIC_OP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetLogicOpEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-07627
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and there are color attachments bound, then vkCmdSetColorBlendEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-07629
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and there are color attachments bound, then vkCmdSetColorWriteMaskEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-07630
  If the `geometryStreams` feature is enabled, and a shader object is bound to the VK_SHADER_STAGE_GEOMETRY_BIT stage or a graphics pipeline is bound which was created with both a VK_SHADER_STAGE_GEOMETRY_BIT stage and the VK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXT dynamic state enabled, then vkCmdSetRasterizationStreamEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-07631
  If the `VK_EXT_conservative_rasterization` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_CONSERVATIVE_RASTERIZATION_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetConservativeRasterizationModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-07632
  If the `VK_EXT_conservative_rasterization` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXTRA_PRIMITIVE_OVERESTIMATION_SIZE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `conservativeRasterizationMode` is VK_CONSERVATIVE_RASTERIZATION_MODE_OVERESTIMATE_EXT, then vkCmdSetExtraPrimitiveOverestimationSizeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectEXT-conservativePointAndLineRasterization-07499
  If the `VK_EXT_conservative_rasterization` extension is enabled, `conservativePointAndLineRasterization` is not supported, a shader object is bound to any graphics stage or a graphics pipeline is bound, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line or point topology class, then the current value of `conservativeRasterizationMode` must be VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-07633
  If the `depthClipEnable` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLIP_ENABLE_EXT dynamic state, then vkCmdSetDepthClipEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-07636
  If the `VK_EXT_provoking_vertex` extension is enabled, a shader object is bound to the VK_SHADER_STAGE_VERTEX_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_PROVOKING_VERTEX_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetProvokingVertexModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-08666
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineRasterizationModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-08669
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineStippleEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-07849
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled and a shader object is bound to any graphics stage, or a bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stippledLineEnable` is VK_TRUE, then vkCmdSetLineStipple must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-10608
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic state enabled, the effective rasterization input topology is in the line topology class, and the current `lineRasterizationMode` is VK_LINE_RASTERIZATION_MODE_BRESENHAM or VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH, then the current `alphaToCoverageEnable`, `alphaToOneEnable` and `sampleShadingEnable` states must all be VK_FALSE

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-07639
  If the `depthClipControl` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLIP_NEGATIVE_ONE_TO_ONE_EXT dynamic state enabled, then vkCmdSetDepthClipNegativeOneToOneEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-09650
  If the `depthClampControl` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLAMP_RANGE_EXT dynamic state enabled, and the current value of `depthClampEnable` is VK_TRUE, then vkCmdSetDepthClampRangeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-07640
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_ENABLE_NV dynamic state enabled, then vkCmdSetViewportWScalingEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-07641
  If the `VK_NV_viewport_swizzle` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic state enabled, then vkCmdSetViewportSwizzleNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-07642
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageToColorEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-07643
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_LOCATION_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageToColorEnable` is VK_TRUE, then vkCmdSetCoverageToColorLocationNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-07644
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_MODE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageModulationModeNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-07645
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageModulationMode` is any value other than VK_COVERAGE_MODULATION_MODE_NONE_NV, then vkCmdSetCoverageModulationTableEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-07646
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageModulationTableEnable` is VK_TRUE, then vkCmdSetCoverageModulationTableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-07647
  If the `shadingRateImage` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SHADING_RATE_IMAGE_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetShadingRateImageEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectEXT-pipelineFragmentShadingRate-09238
  If the `pipelineFragmentShadingRate` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetFragmentShadingRateKHR must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-07648
  If the `representativeFragmentTest` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_REPRESENTATIVE_FRAGMENT_TEST_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetRepresentativeFragmentTestEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-07649
  If the `coverageReductionMode` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageReductionModeNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectEXT-rasterizationSamples-07471
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current subpass does not use any color and/or depth/stencil attachments, then the `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT must follow the rules for a zero-attachment subpass

- VUID-vkCmdDrawMeshTasksIndirectEXT-samples-07472
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state disabled, then the `samples` parameter in the last call to vkCmdSetSampleMaskEXT must be greater or equal to the VkPipelineMultisampleStateCreateInfo::`rasterizationSamples` parameter used to create the bound graphics pipeline

- VUID-vkCmdDrawMeshTasksIndirectEXT-samples-07473
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT state and VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT states enabled, then the `samples` parameter in the last call to vkCmdSetSampleMaskEXT must be greater or equal to the `rasterizationSamples` parameter in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-09211
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, or a shader object is bound to any graphics stage, and the current render pass instance includes a VkMultisampledRenderToSingleSampledInfoEXT structure with `multisampledRenderToSingleSampledEnable` equal to VK_TRUE, then the `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT must be the same as the `rasterizationSamples` member of that structure

- VUID-vkCmdDrawMeshTasksIndirectEXT-firstAttachment-07476
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic states enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the last call to vkCmdSetColorBlendEnableEXT in the current command buffer prior to this drawing command must have set a value for all active color attachments

- VUID-vkCmdDrawMeshTasksIndirectEXT-firstAttachment-07478
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT dynamic states enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the last call to vkCmdSetColorWriteMaskEXT in the current command buffer prior to this drawing command must have set a value for all active color attachments

- VUID-vkCmdDrawMeshTasksIndirectEXT-advancedBlendMaxColorAttachments-07480
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT and VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic states enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and an active color attachment current value of `blendEnable` is VK_TRUE, then the number of active color attachments must not exceed `advancedBlendMaxColorAttachments`

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-10862
  If a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT , but not the VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorBlendEquationEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawMeshTasksIndirectEXT-rasterizerDiscardEnable-10863
  If a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT, but not the VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorBlendAdvancedEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-10864
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT and VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then either vkCmdSetColorBlendAdvancedEXT or vkCmdSetColorBlendEquationEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawMeshTasksIndirectEXT-primitivesGeneratedQueryWithNonZeroStreams-07481
  If the `primitivesGeneratedQueryWithNonZeroStreams` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, and the bound graphics pipeline was created with VK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXT state enabled, the last call to vkCmdSetRasterizationStreamEXT must have set the `rasterizationStream` to zero

- VUID-vkCmdDrawMeshTasksIndirectEXT-sampleLocationsPerPixel-07482
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state disabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then the `sampleLocationsPerPixel` member of `pSampleLocationsInfo` in the last call to vkCmdSetSampleLocationsEXT must equal the `rasterizationSamples` member of the VkPipelineMultisampleStateCreateInfo structure the bound graphics pipeline has been created with

- VUID-vkCmdDrawMeshTasksIndirectEXT-sampleLocationsPerPixel-07483
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then the `sampleLocationsPerPixel` member of `pSampleLocationsInfo` in the last call to vkCmdSetSampleLocationsEXT must equal the `rasterizationSamples` parameter of the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawMeshTasksIndirectEXT-sampleLocationsEnable-07484
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT then the current active depth attachment must have been created with the VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit set

- VUID-vkCmdDrawMeshTasksIndirectEXT-sampleLocationsEnable-07485
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, then the `sampleLocationsInfo.maxSampleLocationGridSize.width` in the last call to vkCmdSetSampleLocationsEXT must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.width` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling `rasterizationSamples`

- VUID-vkCmdDrawMeshTasksIndirectEXT-sampleLocationsEnable-07486
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, then the `sampleLocationsInfo.maxSampleLocationGridSize.height` in the last call to vkCmdSetSampleLocationsEXT must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.height` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling `rasterizationSamples`

- VUID-vkCmdDrawMeshTasksIndirectEXT-sampleLocationsEnable-07487
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, the fragment shader code must not statically use the extended instruction `InterpolateAtSample`

- VUID-vkCmdDrawMeshTasksIndirectEXT-sampleLocationsEnable-07936
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationGridSize.width` must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.width` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling the value of `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawMeshTasksIndirectEXT-sampleLocationsEnable-07937
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationGridSize.height` must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.height` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling the value of `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawMeshTasksIndirectEXT-sampleLocationsEnable-07938
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationsPerPixel` must equal `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawMeshTasksIndirectEXT-coverageModulationTableEnable-07488
  If a shader object is bound to any graphics stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NV state enabled, and the last call to vkCmdSetCoverageModulationTableEnableNV set `coverageModulationTableEnable` to VK_TRUE, then the `coverageModulationTableCount` parameter in the last call to vkCmdSetCoverageModulationTableNV must equal the current `rasterizationSamples` divided by the number of color samples in the current active color attachment

- VUID-vkCmdDrawMeshTasksIndirectEXT-rasterizationSamples-07489
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, and if current subpass has a depth/stencil attachment and depth test, stencil test, or depth bounds test are enabled in the bound pipeline, then the current `rasterizationSamples` must be the same as the sample count of the depth/stencil attachment

- VUID-vkCmdDrawMeshTasksIndirectEXT-coverageToColorEnable-07490
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV state enabled and the last call to vkCmdSetCoverageToColorEnableNV set the `coverageToColorEnable` to VK_TRUE, then there must be an active color attachment at the location selected by the last call to vkCmdSetCoverageToColorLocationNV `coverageToColorLocation`, with a VkFormat of VK_FORMAT_R8_UINT, VK_FORMAT_R8_SINT, VK_FORMAT_R16_UINT, VK_FORMAT_R16_SINT, VK_FORMAT_R32_UINT, or VK_FORMAT_R32_SINT

- VUID-vkCmdDrawMeshTasksIndirectEXT-rasterizerDiscardEnable-09420
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, and a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, and the most recent call to vkCmdSetRasterizerDiscardEnable in the current command buffer set `rasterizerDiscardEnable` to VK_FALSE, and the last call to vkCmdSetCoverageToColorEnableNV set the `coverageToColorEnable` to VK_TRUE, then there must be an active color attachment at the location selected by the last call to vkCmdSetCoverageToColorLocationNV `coverageToColorLocation`, with a VkFormat of VK_FORMAT_R8_UINT, VK_FORMAT_R8_SINT, VK_FORMAT_R16_UINT, VK_FORMAT_R16_SINT, VK_FORMAT_R32_UINT, or VK_FORMAT_R32_SINT

- VUID-vkCmdDrawMeshTasksIndirectEXT-coverageReductionMode-07491
  If the `coverageReductionMode` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV or VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic states enabled, then the current values of `coverageReductionMode`, `rasterizationSamples`, the sample counts for the color and depth/stencil attachments (if the subpass has them) must be a valid combination returned by vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV

- VUID-vkCmdDrawMeshTasksIndirectEXT-viewportCount-07492
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportSwizzleStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksIndirectEXT-viewportCount-07493
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic states enabled then the `viewportCount` parameter in the last call to vkCmdSetViewportSwizzleNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksIndirectEXT-viewportCount-09421
  If the `VK_NV_viewport_swizzle` extension is enabled, and a shader object is bound to any graphics stage, then the `viewportCount` parameter in the last call to vkCmdSetViewportSwizzleNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksIndirectEXT-rasterizationSamples-07494
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, and the `coverageReductionMode` feature is not enabled, or the current value of `coverageReductionMode` is not VK_COVERAGE_REDUCTION_MODE_TRUNCATE_NV, and the current value of `rasterizationSamples` is greater than sample count of the color attachment, then sample shading must be disabled

- VUID-vkCmdDrawMeshTasksIndirectEXT-stippledLineEnable-07495
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_RECTANGULAR, then the `stippledRectangularLines` feature must be enabled

- VUID-vkCmdDrawMeshTasksIndirectEXT-stippledLineEnable-07496
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_BRESENHAM, then the `stippledBresenhamLines` feature must be enabled

- VUID-vkCmdDrawMeshTasksIndirectEXT-stippledLineEnable-07497
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH, then the `stippledSmoothLines` feature must be enabled

- VUID-vkCmdDrawMeshTasksIndirectEXT-stippledLineEnable-07498
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_DEFAULT, then the `stippledRectangularLines` feature must be enabled and VkPhysicalDeviceLimits::`strictLines` must be VK_TRUE

- VUID-vkCmdDrawMeshTasksIndirectEXT-stage-07073
  If the bound pipeline was created with the VkPipelineShaderStageCreateInfo::`stage` member of an element of VkGraphicsPipelineCreateInfo::`pStages` set to VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT, then Mesh Shader Queries must not be active

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-08877
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ATTACHMENT_FEEDBACK_LOOP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAttachmentFeedbackLoopEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-07850
  If dynamic state was inherited from VkCommandBufferInheritanceViewportScissorInfoNV, it must be set in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectEXT-nextStage-10745
  For each shader object bound to a graphics stage, except for shader object bound to the last graphics stage in the logical pipeline, it must have been created with a `nextStage` including the corresponding bit to the shader object bound to the following graphics stage in the logical pipeline

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-08684
  If there is no bound graphics pipeline, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_VERTEX_BIT

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-08685
  If there is no bound graphics pipeline, and the `tessellationShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-08686
  If there is no bound graphics pipeline, and the `tessellationShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-08687
  If there is no bound graphics pipeline, and the `geometryShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_GEOMETRY_BIT

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-08688
  If there is no bound graphics pipeline, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_FRAGMENT_BIT

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-08689
  If there is no bound graphics pipeline, and the `taskShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TASK_BIT_EXT

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-08690
  If there is no bound graphics pipeline, and the `meshShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-08693
  If there is no bound graphics pipeline, and at least one of the `taskShader` and `meshShader` features is enabled, one of the VK_SHADER_STAGE_VERTEX_BIT or VK_SHADER_STAGE_MESH_BIT_EXT stages must have a valid `VkShaderEXT` bound, and the other must have no `VkShaderEXT` bound

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-08696
  If there is no bound graphics pipeline, and a valid `VkShaderEXT` is bound to the VK_SHADER_STAGE_VERTEX_BIT stage, there must be no `VkShaderEXT` bound to either the VK_SHADER_STAGE_TASK_BIT_EXT stage or the VK_SHADER_STAGE_MESH_BIT_EXT stage

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-08698
  If any graphics shader is bound which was created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag, then all shaders created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag in the same vkCreateShadersEXT call must also be bound

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-08699
  If any graphics shader is bound which was created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag, any stages in between stages whose shaders which did not create a shader with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag as part of the same vkCreateShadersEXT call must not have any `VkShaderEXT` bound

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-08878
  All bound graphics shader objects must have been created with identical or identically defined push constant ranges

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-08879
  All bound graphics shader objects must have either been created with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag set, or with identical or identically defined arrays of descriptor set layouts

- VUID-vkCmdDrawMeshTasksIndirectEXT-colorAttachmentCount-09372
  If the current render pass instance was begun with vkCmdBeginRendering and a VkRenderingInfo::`colorAttachmentCount` equal to `1`, a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, and a fragment shader is bound, it must not declare the `DepthReplacing` or `StencilRefReplacingEXT` execution modes

- VUID-vkCmdDrawMeshTasksIndirectEXT-pDynamicStates-08715
  If the bound graphics pipeline state includes a fragment shader stage, was created with VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`, and the fragment shader declares the `EarlyFragmentTests` execution mode and uses `OpDepthAttachmentReadEXT`, the `depthWriteEnable` parameter in the last call to vkCmdSetDepthWriteEnable must be VK_FALSE

- VUID-vkCmdDrawMeshTasksIndirectEXT-pDynamicStates-08716
  If the bound graphics pipeline state includes a fragment shader stage, was created with VK_DYNAMIC_STATE_STENCIL_WRITE_MASK set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`, and the fragment shader declares the `EarlyFragmentTests` execution mode and uses `OpStencilAttachmentReadEXT`, the `writeMask` parameter in the last call to vkCmdSetStencilWriteMask must be `0`

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-09116
  If a shader object is bound to any graphics stage or the bound graphics pipeline was created with VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT, and the format of any color attachment is VK_FORMAT_E5B9G9R9_UFLOAT_PACK32, the corresponding element of the `pColorWriteMasks` parameter of vkCmdSetColorWriteMaskEXT must either include all of VK_COLOR_COMPONENT_R_BIT, VK_COLOR_COMPONENT_G_BIT, VK_COLOR_COMPONENT_B_BIT, and VK_COLOR_COMPONENT_A_BIT, or none of them

- VUID-vkCmdDrawMeshTasksIndirectEXT-maxFragmentDualSrcAttachments-09239
  If blending is enabled for any attachment where either the source or destination blend factors for that attachment use the secondary color input, the maximum value of `Location` for any output attachment statically used in the `Fragment` `Execution` `Model` executed by this command must be less than `maxFragmentDualSrcAttachments`

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-09548
  If the current render pass was begun with vkCmdBeginRendering, there is no shader object bound to any graphics stage, the value of each element of VkRenderingAttachmentLocationInfo::`pColorAttachmentLocations` in the bound pipeline must match the value for the corresponding locations set currently in the current render pass instance

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-09549
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of each element of VkRenderingInputAttachmentIndexInfo::`pColorAttachmentInputIndices` in the bound pipeline must match the value for the corresponding index set currently in the current render pass instance

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-10927
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` in the bound pipeline must match the value set currently in the current render pass instance

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-10928
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` in the bound pipeline must match the value set currently in the current render pass instance

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-09642
  If the current render pass was begun with vkCmdBeginRendering with the VK_RENDERING_ENABLE_LEGACY_DITHERING_BIT_EXT flag, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_2_ENABLE_LEGACY_DITHERING_BIT_EXT

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-09643
  If the bound graphics pipeline was created with VK_PIPELINE_CREATE_2_ENABLE_LEGACY_DITHERING_BIT_EXT, the current render pass must have begun with vkCmdBeginRendering with the VK_RENDERING_ENABLE_LEGACY_DITHERING_BIT_EXT flag

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-10677
  If the per-tile execution model is enabled, the tileShadingPerTileDraw feature must be enabled

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-10772
  If a shader object is bound to any graphics stage, multiview functionality must not be enabled in the current render pass

- VUID-vkCmdDrawMeshTasksIndirectEXT-multiviewPerViewViewports-12262
  If the `multiviewPerViewViewports` feature is enabled, then the index of the most significant bit in current render pass instance `viewMask` must be less than the current value of `viewportCount`

- VUID-vkCmdDrawMeshTasksIndirectEXT-multiviewPerViewViewports-12263
  If the `multiviewPerViewViewports` feature is enabled, then the index of the most significant bit in current render pass instance `viewMask` must be less than the current value of `scissorCount`

- VUID-vkCmdDrawMeshTasksIndirectEXT-flags-11521
  If current render pass instance was begun with vkCmdBeginRendering with VkRenderingInfo::`flags` which includes VK_RENDERING_FRAGMENT_REGION_BIT_EXT, and if sample shading is enabled (explicitly or implicitly), then the minimum fraction for sample shading must equal 0.0

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-11522
  If the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, and the `dynamicRenderingUnusedAttachments` feature is not enabled, the graphics pipeline bound must have been created with a VkCustomResolveCreateInfoEXT

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-11523
  If the current render pass instance was begun with vkCmdBeginRendering and does not contain a custom resolve, and the `dynamicRenderingUnusedAttachments` feature is not enabled, the graphics pipeline bound must not have been created with a VkCustomResolveCreateInfoEXT

- VUID-vkCmdDrawMeshTasksIndirectEXT-customResolve-11524
  If the current render pass instance was begun with vkCmdBeginRendering and vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, the graphics pipeline bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_TRUE

- VUID-vkCmdDrawMeshTasksIndirectEXT-customResolve-11525
  If the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, and vkCmdBeginCustomResolveEXT has not been recorded in the render pass instance, the graphics pipeline bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_FALSE

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-11861
  If the `dynamicRenderingUnusedAttachments` feature is not enabled and the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, the bound graphics pipeline must have been created with a VkCustomResolveCreateInfoEXT::`colorAttachmentCount` equal to VkRenderingInfo::`colorAttachmentCount`

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-11862
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound graphics pipeline

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-11863
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` equal to VK_NULL_HANDLE must have the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound pipeline equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectEXT-dynamicRenderingUnusedAttachments-11864
  If the `dynamicRenderingUnusedAttachments` feature is enabled, the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound graphics pipeline, or the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats`, if it exists, must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-11865
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-11866
  If current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`

- VUID-vkCmdDrawMeshTasksIndirectEXT-dynamicRenderingUnusedAttachments-11867
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, and the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-11868
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->resolveImageView` was VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-11869
  If current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`

- VUID-vkCmdDrawMeshTasksIndirectEXT-dynamicRenderingUnusedAttachments-11870
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, and the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectEXT-colorAttachmentCount-11871
  If the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0` and vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, then for each element of the VkRenderingInfo::`pColorAttachments` array with a `resolveImageView` not equal to VK_NULL_HANDLE, the `resolveImageView` must have been created with a sample count equal to the value of `rasterizationSamples` for the bound graphics pipeline

- VUID-vkCmdDrawMeshTasksIndirectEXT-pDepthAttachment-11872
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`

- VUID-vkCmdDrawMeshTasksIndirectEXT-pStencilAttachment-11873
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`

- VUID-vkCmdDrawMeshTasksIndirectEXT-customResolve-11529
  If a shader object is bound to the fragment stage, the current render pass instance was begun with vkCmdBeginRendering, a fragment density map attachment is active, and vkCmdBeginCustomResolveEXT has been called, then the fragment shader object bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_TRUE

- VUID-vkCmdDrawMeshTasksIndirectEXT-customResolve-11530
  If a shader object is bound to the fragment stage, the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, a fragment density map attachment is active, and vkCmdBeginCustomResolveEXT has not yet been called, then the fragment shader object bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_FALSE

- VUID-vkCmdDrawMeshTasksIndirectEXT-flags-13361
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, then all bound shader objects must have been created with the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit

- VUID-vkCmdDrawMeshTasksIndirectEXT-flags-13362
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, then the pipeline layout of the bound descriptor sets must have been created with VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT set

- VUID-vkCmdDrawMeshTasksIndirectEXT-flags-13363
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, and any of the descriptor set layouts used to create the pipeline layout of the bound descriptor sets were created with any binding’s VkDescriptorSetLayoutBinding::`stageFlags` set with VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT, then there must be no binding with VkDescriptorSetLayoutBinding::`stageFlags` set with VK_SHADER_STAGE_TASK_BIT_EXT or VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-vkCmdDrawMeshTasksIndirectEXT-flags-13364
  If there are any shader objects bound that were created with `flags` that includes both the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR and VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT bits, the pipeline layout of the bound descriptor sets must have been created with VK_PIPELINE_LAYOUT_CREATE_NO_TASK_SHADER_BIT_KHR set

- VUID-vkCmdDrawMeshTasksIndirectEXT-flags-13365
  If there are any shader objects bound that were created with `flags` that includes both the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR and VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT bits, there must be no shader object bound to the VK_SHADER_STAGE_TASK_BIT_EXT stage

- VUID-vkCmdDrawMeshTasksIndirectEXT-stage-06480
  The bound graphics pipeline must not have been created with the VkPipelineShaderStageCreateInfo::`stage` member of any element of VkGraphicsPipelineCreateInfo::`pStages` set to VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT

- VUID-vkCmdDrawMeshTasksIndirectEXT-pStages-10680
  If there is no bound graphics pipeline, `vkCmdBindShadersEXT` must not have last bound the `pStages` element of VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT with a valid shader object other than VK_NULL_HANDLE

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-07074
  Transform Feedback Queries must not be active

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-07075
  Primitives Generated Queries must not be active

- VUID-vkCmdDrawMeshTasksIndirectEXT-pipelineStatistics-07076
  The `pipelineStatistics` member used to create any active Pipeline Statistics Query must not contain VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT, VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT, VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT, VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT, VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT, VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT, VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT, VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT, or VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-08694
  If there is no bound graphics pipeline, and both the `taskShader` and `meshShader` features are enabled, and a valid `VkShaderEXT` is bound the to the VK_SHADER_STAGE_MESH_BIT_EXT stage, and that `VkShaderEXT` was created without the VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT flag, a valid `VkShaderEXT` must be bound to the VK_SHADER_STAGE_TASK_BIT_EXT stage

- VUID-vkCmdDrawMeshTasksIndirectEXT-None-08695
  If there is no bound graphics pipeline, and both the `taskShader` and `meshShader` features are enabled, and a valid `VkShaderEXT` is bound the to the VK_SHADER_STAGE_MESH_BIT_EXT stage, and that `VkShaderEXT` was created with the VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT flag, there must be no `VkShaderEXT` bound to the VK_SHADER_STAGE_TASK_BIT_EXT stage

- VUID-vkCmdDrawMeshTasksIndirectEXT-buffer-02708
  If `buffer` is non-sparse then it must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-vkCmdDrawMeshTasksIndirectEXT-buffer-02709
  `buffer` must have been created with the VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT usage flag set

- VUID-vkCmdDrawMeshTasksIndirectEXT-offset-02710
  `offset` must be a multiple of `4`

- VUID-vkCmdDrawMeshTasksIndirectEXT-commandBuffer-02711
  `commandBuffer` must not be a protected command buffer

- VUID-vkCmdDrawMeshTasksIndirectEXT-drawCount-02718
  If the `multiDrawIndirect` feature is not enabled, `drawCount` must be `0` or `1`

- VUID-vkCmdDrawMeshTasksIndirectEXT-drawCount-02719
  `drawCount` must be less than or equal to `VkPhysicalDeviceLimits`::`maxDrawIndirectCount`

- VUID-vkCmdDrawMeshTasksIndirectEXT-drawCount-07088
  If `drawCount` is greater than `1`, `stride` must be a multiple of `4` and must be greater than or equal to `sizeof`(`VkDrawMeshTasksIndirectCommandEXT`)

- VUID-vkCmdDrawMeshTasksIndirectEXT-drawCount-07089
  If `drawCount` is equal to `1`, (`offset` + `sizeof`(VkDrawMeshTasksIndirectCommandEXT)) must be less than or equal to the size of `buffer`

- VUID-vkCmdDrawMeshTasksIndirectEXT-drawCount-07090
  If `drawCount` is greater than `1`, (`stride` × (`drawCount` - 1) + `offset` + `sizeof`(VkDrawMeshTasksIndirectCommandEXT)) must be less than or equal to the size of `buffer`

- VUID-vkCmdDrawMeshTasksIndirectEXT-MeshEXT-07091
  The current pipeline bound to VK_PIPELINE_BIND_POINT_GRAPHICS must contain a shader stage using the `MeshEXT` `Execution` `Model`

Valid Usage (Implicit)

- VUID-vkCmdDrawMeshTasksIndirectEXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdDrawMeshTasksIndirectEXT-buffer-parameter
  `buffer` must be a valid VkBuffer handle

- VUID-vkCmdDrawMeshTasksIndirectEXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdDrawMeshTasksIndirectEXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdDrawMeshTasksIndirectEXT-renderpass
  This command must only be called inside of a render pass instance

- VUID-vkCmdDrawMeshTasksIndirectEXT-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdDrawMeshTasksIndirectEXT-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdDrawMeshTasksIndirectEXT-commonparent
  Both of `buffer`, and `commandBuffer` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Inside | Outside | VK_QUEUE_GRAPHICS_BIT | Action

Conditional Rendering

vkCmdDrawMeshTasksIndirectEXT is affected by conditional rendering

The `VkDrawMeshTasksIndirectCommandEXT` structure is defined as:

    // Provided by VK_EXT_mesh_shader
    typedef struct VkDrawMeshTasksIndirectCommandEXT {
        uint32_t    groupCountX;
        uint32_t    groupCountY;
        uint32_t    groupCountZ;
    } VkDrawMeshTasksIndirectCommandEXT;

- `groupCountX` is the number of local workgroups to dispatch in the X dimension.

- `groupCountY` is the number of local workgroups to dispatch in the Y dimension.

- `groupCountZ` is the number of local workgroups to dispatch in the Z dimension.

The members of `VkDrawMeshTasksIndirectCommandEXT` have the same meaning as the similarly named parameters of vkCmdDrawMeshTasksEXT.

Valid Usage

- VUID-VkDrawMeshTasksIndirectCommandEXT-TaskEXT-07322
  If the current pipeline bound to VK_PIPELINE_BIND_POINT_GRAPHICS contains a shader using the `TaskEXT` `Execution` `Model`, `groupCountX` must be less than or equal to `VkPhysicalDeviceMeshShaderPropertiesEXT`::`maxTaskWorkGroupCount`[0]

- VUID-VkDrawMeshTasksIndirectCommandEXT-TaskEXT-07323
  If the current pipeline bound to VK_PIPELINE_BIND_POINT_GRAPHICS contains a shader using the `TaskEXT` `Execution` `Model`, `groupCountY` must be less than or equal to `VkPhysicalDeviceMeshShaderPropertiesEXT`::`maxTaskWorkGroupCount`[1]

- VUID-VkDrawMeshTasksIndirectCommandEXT-TaskEXT-07324
  If the current pipeline bound to VK_PIPELINE_BIND_POINT_GRAPHICS contains a shader using the `TaskEXT` `Execution` `Model`, `groupCountZ` must be less than or equal to `VkPhysicalDeviceMeshShaderPropertiesEXT`::`maxTaskWorkGroupCount`[2]

- VUID-VkDrawMeshTasksIndirectCommandEXT-TaskEXT-07325
  If the current pipeline bound to VK_PIPELINE_BIND_POINT_GRAPHICS contains a shader using the `TaskEXT` `Execution` `Model`, The product of `groupCountX`, `groupCountY` and `groupCountZ` must be less than or equal to `VkPhysicalDeviceMeshShaderPropertiesEXT`::`maxTaskWorkGroupTotalCount`

- VUID-VkDrawMeshTasksIndirectCommandEXT-TaskEXT-07326
  If the current pipeline bound to VK_PIPELINE_BIND_POINT_GRAPHICS does not contain a shader using the `TaskEXT` `Execution` `Model`, `groupCountX` must be less than or equal to `VkPhysicalDeviceMeshShaderPropertiesEXT`::`maxMeshWorkGroupCount`[0]

- VUID-VkDrawMeshTasksIndirectCommandEXT-TaskEXT-07327
  If the current pipeline bound to VK_PIPELINE_BIND_POINT_GRAPHICS does not contain a shader using the `TaskEXT` `Execution` `Model`, `groupCountY` must be less than or equal to `VkPhysicalDeviceMeshShaderPropertiesEXT`::`maxMeshWorkGroupCount`[1]

- VUID-VkDrawMeshTasksIndirectCommandEXT-TaskEXT-07328
  If the current pipeline bound to VK_PIPELINE_BIND_POINT_GRAPHICS does not contain a shader using the `TaskEXT` `Execution` `Model`, `groupCountZ` must be less than or equal to `VkPhysicalDeviceMeshShaderPropertiesEXT`::`maxMeshWorkGroupCount`[2]

- VUID-VkDrawMeshTasksIndirectCommandEXT-TaskEXT-07329
  If the current pipeline bound to VK_PIPELINE_BIND_POINT_GRAPHICS does not contain a shader using the `TaskEXT` `Execution` `Model`, The product of `groupCountX`, `groupCountY` and `groupCountZ` must be less than or equal to `VkPhysicalDeviceMeshShaderPropertiesEXT`::`maxMeshWorkGroupTotalCount`

To record an indirect mesh tasks drawing command with the draw count sourced from an address range, call:

    // Provided by VK_KHR_device_address_commands with (VK_KHR_draw_indirect_count or VK_VERSION_1_2) and VK_EXT_mesh_shader
    void vkCmdDrawMeshTasksIndirectCount2EXT(
        VkCommandBuffer                             commandBuffer,
        const VkDrawIndirectCount2InfoKHR*          pInfo);

- `commandBuffer` is the command buffer into which the command is recorded.

- `pInfo` is a pointer to a VkDrawIndirectCount2InfoKHR structure defining parameters of this command.

`vkCmdDrawMeshTasksIndirectCount2EXT` behaves similarly to vkCmdDrawMeshTasksIndirect2EXT except that the draw count is read by the device from an address range during execution. The command will read an unsigned 32-bit integer from `pInfo->countAddressRange` and use this as the draw count.

Valid Usage

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-magFilter-04553
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-magFilter-09598
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-mipmapMode-04770
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-mipmapMode-09599
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-unnormalizedCoordinates-09635
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `levelCount` and `layerCount` must be 1

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-08609
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `viewType` must be VK_IMAGE_VIEW_TYPE_1D or VK_IMAGE_VIEW_TYPE_2D

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-08610
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions with `ImplicitLod`, `Dref` or `Proj` in their name

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-08611
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions that includes a LOD bias or any offset values

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-06479
  If a VkImageView is sampled with depth comparison, the image view’s format features must contain VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-02691
  If a VkImageView is accessed using atomic operations as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-07888
  If a VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER descriptor is accessed using atomic operations as a result of this command, then the storage texel buffer’s format features must contain VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-02692
  If a VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-02693
  If the VK_EXT_filter_cubic extension is not enabled and any VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, it must not have a VkImageViewType of VK_IMAGE_VIEW_TYPE_3D, VK_IMAGE_VIEW_TYPE_CUBE, or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-filterCubic-02694
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have a VkImageViewType and format that supports cubic filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubic` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-filterCubicMinmax-02695
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX as a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubicMinmax` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-cubicRangeClamp-09212
  If the `cubicRangeClamp` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must not have a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-reductionMode-09213
  Any VkImageView being sampled with a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM as a result of this command must sample with VK_FILTER_CUBIC_EXT

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-selectableCubicWeights-09214
  If the `selectableCubicWeights` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have VkSamplerCubicWeightsCreateInfoQCOM::`cubicWeights` equal to VK_CUBIC_FILTER_WEIGHTS_CATMULL_ROM_QCOM

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-flags-02696
  Any VkImage created with a VkImageCreateInfo::`flags` containing VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV sampled as a result of this command must only be sampled using a VkSamplerAddressMode of VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-OpTypeImage-07027
  For any VkImageView being written as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-OpTypeImage-07028
  For any VkImageView being read as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-OpTypeImage-07029
  For any VkBufferView being written as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown`, the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-OpTypeImage-07030
  Any VkBufferView being read as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown` then the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-08600
  If a a bound shader was created with a pipeline layout and statically uses a set n, a descriptor set must have been bound to n at the same pipeline bind point, with layouts compatible for set n with the layout(s) used to create the shader, as described in Pipeline Layout Compatibility

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-08601
  If a a bound shader was created with a pipeline layout or specified push constant ranges and statically uses a push constant value, that value must have been set for the same pipeline bind point, with push constant ranges that are compatible with the push constant range used to create the shader

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-10068
  For each array of resources that is used by a bound shader, the indices used to access members of the array must be less than the descriptor count for the identified binding in the descriptor sets used by this command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-08114
  Descriptors in each bound descriptor set, specified via vkCmdBindDescriptorSets, must be valid if they are accessed as described by descriptor validity by the VkPipeline bound to the pipeline bind point used by this command and the bound VkPipeline was not created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-imageLayout-00344
  If an image descriptor is accessed by a shader, the VkImageLayout must match the subresource accessible from the VkImageView as defined by the image layout matching rules

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-08115
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdBindDescriptorSets, the bound VkPipeline must have been created without VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-08116
  Descriptors in bound descriptor buffers, specified via vkCmdSetDescriptorBufferOffsetsEXT, must be valid if they are dynamically accessed

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-08117
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdSetDescriptorBufferOffsetsEXT, the bound VkPipeline must have been created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-08119
  If a descriptor is dynamically used with a VkPipeline created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-08605
  If a descriptor is dynamically used with a VkShaderEXT created with a `VkDescriptorSetLayout` that was created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-08606
  If the `shaderObject` feature is not enabled, a valid pipeline must be bound to the pipeline bind point used by this command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-08608
  If a pipeline is bound to the pipeline bind point used by this command, there must not have been any calls to dynamic state setting commands for any state specified statically in the VkPipeline object bound to the pipeline bind point used by this command, since that pipeline was bound

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-uniformBuffers-06935
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-08612
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-storageBuffers-06936
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-08613
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a storage buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-commandBuffer-02707
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, any resource accessed by bound shaders must not be a protected resource

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-viewType-07752
  If a VkImageView is accessed as a result of this command, then the image view’s `viewType` must match the `Dim` operand of the `OpTypeImage` as described in Compatibility Between SPIR-V Image Dimensions and Vulkan ImageView Types

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-format-07753
  If a VkImageView or VkBufferView is accessed as a result of this command, then the numeric type of the view’s `format` and the `Sampled` `Type` operand of the `OpTypeImage` must match

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-OpImageWrite-08795
  If a VkImageView created with a format other than VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the image view’s format

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-OpImageWrite-08796
  If a VkImageView created with the format VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have four components

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-OpImageWrite-04469
  If a VkBufferView is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the buffer view’s format

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-SampledType-04470
  If a VkImageView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-SampledType-04471
  If a VkImageView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-SampledType-04472
  If a VkBufferView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-SampledType-04473
  If a VkBufferView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-sparseImageInt64Atomics-04474
  If the `sparseImageInt64Atomics` feature is not enabled, VkImage objects created with the VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-sparseImageInt64Atomics-04475
  If the `sparseImageInt64Atomics` feature is not enabled, VkBuffer objects created with the VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-OpImageSampleWeightedQCOM-06971
  If `OpImageSampleWeightedQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_SAMPLED_IMAGE_BIT_QCOM

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-OpImageSampleWeightedQCOM-06972
  If `OpImageSampleWeightedQCOM` uses a VkImageView as a sample weight image as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_IMAGE_BIT_QCOM

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-OpImageBoxFilterQCOM-06973
  If `OpImageBoxFilterQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BOX_FILTER_SAMPLED_BIT_QCOM

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-OpImageBlockMatchSSDQCOM-06974
  If `OpImageBlockMatchSSDQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-OpImageBlockMatchSADQCOM-12420
  If `OpImageBlockMatchSADQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-OpImageBlockMatchSADQCOM-06976
  If `OpImageBlockMatchSADQCOM` or OpImageBlockMatchSSDQCOM is used to read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-OpImageSampleWeightedQCOM-06977
  If `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-OpImageSampleWeightedQCOM-06978
  If any command other than `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must not have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-OpImageBlockMatchWindow-09215
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-OpImageBlockMatchWindow-09216
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format must be a single-component format

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-OpImageBlockMatchWindow-09217
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-OpImageBlockMatchWindow-12421
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the `blockMatchExtendedClampToEdge` feature is not enabled, the input sampler must not have been created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-addressModeU-12422
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the input sampler was created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, then the sampler must have been created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-07288
  Any shader invocation executed by this command must terminate

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-09600
  If a descriptor with type equal to any of VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, or VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT is accessed as a result of this command, all image subresources identified by that descriptor must be in the image layout identified when the descriptor was written

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-micromap-11636
  If an acceleration structure is accessed as a result of this command through an `OpRayQueryProceedKHR` operation , the `VK_EXT_opacity_micromap` extension is not enabled, and the acceleration structure is built using geometry with a VkAccelerationStructureTrianglesOpacityMicromapKHR structure included in its `pNext` chain, the shader must have specified a `OpacityMicromapIdKHR` execution mode with its specialization constant operand equal to VK_TRUE

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-micromap-11637
  If an acceleration structure is accessed as a result of this command and the acceleration structure was constructed through deserialization, all micromap arrays referenced by the acceleration structure that were not replaced by an acceleration structure update command must have been deserialized using the serialized data of the corresponding micromaps used to originally build the acceleration structure prior to the execution of this command on the device

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-micromap-11638
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkPipeline bound to the pipeline bind point used by this command must not have been created with `flags` that includes VK_PIPELINE_CREATE_2_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_KHR

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-micromap-11639
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkShaderEXT that accessed the descriptor must not have been created with `flags` that includes VK_SHADER_CREATE_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_EXT

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-commandBuffer-10746
  The `VkDeviceMemory` object allocated from a `VkMemoryHeap` with the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property that is bound to a resource accessed as a result of this command must be the active bound tile memory object in `commandBuffer`

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-10678
  If this command is recorded inside a tile shading render pass instance, the stages corresponding to the pipeline bind point used by this command must only include VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_FRAGMENT_BIT, and/or VK_SHADER_STAGE_COMPUTE_BIT

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-10679
  If this command is recorded where per-tile execution model is enabled, there must be no access to any image while the image was be transitioned to the VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT layout

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-pDescription-09900
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the underlying VkTensorARM object must have been created with the VK_TENSOR_USAGE_SHADER_BIT_ARM usage flag set

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-dimensionCount-09905
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the `Rank` of the `OpTypeTensorARM` of the tensor resource variable must be equal to the `dimensionCount` provided via VkTensorCreateInfoARM::`pDescription` when creating the underlying VkTensorARM object

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-OpTypeTensorARM-09906
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the element type of the `OpTypeTensorARM` of the tensor resource variable must be compatible with the VkFormat of the VkTensorViewARM used for the access

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-OpTensorReadARM-12462
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, using `OpTensorReadARM` or `OpTensorWriteARM`, and the underlying VkTensorARM object was created with a VK_TENSOR_TILING_BRICK_16_WIDE_ARM, VK_TENSOR_TILING_BRICK_8_WIDE_ARM, VK_TENSOR_TILING_BRICK_4_WIDE_ARM, VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_ARM, or VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_64K_ARM VkTensorTilingARM, and the object read or written is an array, then the innermost coordinate provided to `OpTensorReadARM` or `OpTensorWriteARM` via the `Coordinates` operand must be a multiple of the largest power of 2 that is less than or equal to the number of components of the array

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-pNext-12463
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command and the corresponding VkTensorARM object was created with a VkTensorRollingBackingCreateInfoARM structure in the `pNext` chain of VkTensorCreateInfoARM, then the number of elements accessed with one `OpTensorReadARM` or `OpTensorWriteARM`, must be less than or equal to the number of elements available from the starting coordinate in the rolling backing along the innermost dimension, defined as `wraps`[`dimensionCount` - 1] - InnermostCoordinate % `wraps`[`dimensionCount` - 1] where InnermostCoordinate is the last component of the coordinates array provided via the `Coordinates` operand

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-12472
  Descriptors dynamically accessed in bound descriptor heaps must be valid

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-11297
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a `OpTypeStruct` decorated with `Block` or `BufferBlock` using that mapping, the calculated offset for the resource heap must be a multiple of `bufferDescriptorAlignment`

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-11298
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeImage` or `OpTypeSampledImage` using that mapping, the calculated offset for the resource heap must be a multiple of `imageDescriptorAlignment`

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-11299
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeSampler` or `OpTypeSampledImage` using that mapping, the calculated offset for the sampler heap must be a multiple of `samplerDescriptorAlignment`

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-11397
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeTensorARM` using that mapping, the calculated offset for the resource heap must be a multiple of `tensorDescriptorAlignment`

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-11300
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 4

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-11301
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-11302
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-11304
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 8

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-11305
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-11306
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address pointed to by the address in push data must be a valid VkDeviceAddress

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-11308
  For each descriptor heap that is statically used by a bound shader, either directly or via a descriptor mapping, a valid descriptor heap must be bound

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-11309
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, execution of this command must not result in any descriptor read accessing data outside of the user range of the respective heap bound by `vkCmdBind*HeapEXT` commands

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-11372
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer or uniform texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified via VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-11373
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer or storage texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-11374
  If the `robustBufferAccess2` feature is not enabled, the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, uniform texel buffer, storage buffer, or storage texel buffer, that shader must not access values outside of the range of the buffer as specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-pBindInfo-11375
  If any bound shader uses an embedded sampler via a descriptor mapping, the value of `pBindInfo->reservedRangeSize` set for vkCmdBindSamplerHeapEXT must be greater than or equal to `minSamplerHeapReservedRangeWithEmbedded`

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-11376
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, and that shader statically uses a push constant value, that value must have been set by vkCmdPushDataEXT

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-11398
  If a bound shader was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the access must not be out of bounds

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-11437
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the buffer from which the address in push data was queried must have been created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-11438
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-11441
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must be aligned to `minUniformBufferOffsetAlignment`

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-11439
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_STORAGE_BUFFER_BIT usage flag set

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-11442
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must be aligned to `minStorageBufferOffsetAlignment`

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-11485
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses an acceleration structure using that mapping, the address that the acceleration structure is mapped to must be an acceleration structure address retrieved from a VkAccelerationStructureKHR object via vkGetAccelerationStructureDeviceAddressKHR or handle retrieved from a VkAccelerationStructureNV object via vkGetAccelerationStructureHandleNV

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-index-11450
  If a shader uses a sampler descriptor to sample an image as a result of this command, and that sampler descriptor uses a custom border color with an index defined by VkSamplerCustomBorderColorIndexCreateInfoEXT, the value of VkSamplerCustomBorderColorIndexCreateInfoEXT::`index` must have been registered before this command was recorded, and still be registered during the sampling operation, with an identically defined color

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-protectedNoFault-11455
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, the address that the resource is mapped to must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-protectedNoFault-11456
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, the address of the indirect memory must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-renderPass-02684
  The current render pass must be compatible with the `renderPass` member of the `VkGraphicsPipelineCreateInfo` structure specified when creating the `VkPipeline` bound to VK_PIPELINE_BIND_POINT_GRAPHICS

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-subpass-02685
  The subpass index of the current render pass must be equal to the `subpass` member of the `VkGraphicsPipelineCreateInfo` structure specified when creating the `VkPipeline` bound to VK_PIPELINE_BIND_POINT_GRAPHICS

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-OpTypeImage-07468
  If any shader executed by this pipeline accesses an `OpTypeImage` variable with a `Dim` operand of `SubpassData`, it must be decorated with an `InputAttachmentIndex` that corresponds to a valid input attachment in the current subpass

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-07469
  Input attachment views accessed in a subpass must be created with the same VkFormat as the corresponding subpass definition, and be created with a VkImageView that is compatible with the attachment referenced by the subpass' `pInputAttachments`[`InputAttachmentIndex`] in the bound VkFramebuffer as specified by Fragment Input Attachment Compatibility

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-pDepthInputAttachmentIndex-09595
  Input attachment views accessed in a dynamic render pass with a `InputAttachmentIndex` referenced by VkRenderingInputAttachmentIndexInfo, or no `InputAttachmentIndex` if VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` or VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` are `NULL`, must be created with a VkImageView that is compatible with the corresponding color, depth, or stencil attachment in VkRenderingInfo

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-pDepthInputAttachmentIndex-09596
  Input attachment views accessed in a dynamic render pass via a shader object must have an `InputAttachmentIndex` if both VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` and VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` are non-`NULL`

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-InputAttachmentIndex-09597
  If an input attachment view accessed in a dynamic render pass via a shader object has an `InputAttachmentIndex`, the `InputAttachmentIndex` must match an index in VkRenderingInputAttachmentIndexInfo

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-06537
  Memory backing image subresources used as attachments in the current render pass must not be written in any way other than as an attachment by this command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-10795
  If a color attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_COLOR_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-10796
  If a depth attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_DEPTH_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-10797
  If a stencil attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_STENCIL_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-12338
  If a color attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_COLOR_BIT on that attachment, the color attachment must not be written to by this command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-12339
  If a depth attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_DEPTH_BIT on that attachment, the depth attachment must not be written to by this command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-12340
  If a stencil attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_STENCIL_BIT on that attachment, the stencil attachment must not be written to by this command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-09003
  If an attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, it must not be accessed in any way other than as an attachment, storage image, or sampled image by this command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-06886
  If the current render pass instance uses a depth/stencil attachment with a read-only layout for the depth aspect, depth writes must be disabled

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-06887
  If the current render pass instance uses a depth/stencil attachment with a read-only layout for the stencil aspect, both front and back `writeMask` are not zero, and stencil test is enabled, all stencil ops must be VK_STENCIL_OP_KEEP

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-07831
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT dynamic state enabled then vkCmdSetViewport must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-07832
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SCISSOR dynamic state enabled then vkCmdSetScissor must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-08617
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_WIDTH dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineWidth must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-07834
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BIAS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthBiasEnable` is VK_TRUE, then vkCmdSetDepthBias or vkCmdSetDepthBias2EXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-07835
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_BLEND_CONSTANTS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and an active color attachment current value of `blendEnable` is VK_TRUE with a blend equations where any VkBlendFactor member is VK_BLEND_FACTOR_CONSTANT_COLOR, VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR, VK_BLEND_FACTOR_CONSTANT_ALPHA, or VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA, then vkCmdSetBlendConstants must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-07836
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BOUNDS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthBoundsTestEnable` is VK_TRUE, then vkCmdSetDepthBounds must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-07837
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilCompareMask must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-07838
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_WRITE_MASK dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilWriteMask must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-07839
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_REFERENCE dynamic state enabled, the current value of and `rasterizerDiscardEnable` is VK_FALSE, the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilReference must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-maxMultiviewInstanceIndex-02688
  If the draw is recorded in a render pass instance with multiview enabled, the maximum instance index must be less than or equal to VkPhysicalDeviceMultiviewProperties::`maxMultiviewInstanceIndex`

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-sampleLocationsEnable-02689
  If the bound graphics pipeline was created with VkPipelineSampleLocationsStateCreateInfoEXT::`sampleLocationsEnable` set to VK_TRUE, then the active depth attachment must have been created with the VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit set

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-07634
  If the `VK_EXT_sample_locations` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetSampleLocationsEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-06666
  If the `VK_EXT_sample_locations` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `sampleLocationsEnable` is VK_TRUE, then vkCmdSetSampleLocationsEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-07840
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_CULL_MODE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCullMode must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-07841
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRONT_FACE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetFrontFace must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-07843
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, vkCmdSetDepthTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-07844
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthTestEnable` is VK_TRUE, then vkCmdSetDepthWriteEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-07845
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_COMPARE_OP dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthTestEnable` is VK_TRUE, then vkCmdSetDepthCompareOp must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-07846
  If the `depthBounds` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthBoundsTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-07847
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetStencilTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-07848
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_OP dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilOp must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-viewportCount-03417
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, and the state is not inherited, then vkCmdSetViewportWithCount must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-scissorCount-03418
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT dynamic state enabled, and the state is not inherited, then vkCmdSetScissorWithCount must have been called and not subsequently invalidated in the current command buffer prior to this drawing

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-viewportCount-03419
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with both the VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic states enabled, and the state is not inherited, then the `viewportCount` parameter of `vkCmdSetViewportWithCount` must match the `scissorCount` parameter of `vkCmdSetScissorWithCount`

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-viewportCount-04137
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportWScalingStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-viewportCount-04138
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, the current value of `viewportWScalingEnable` is VK_TRUE, then vkCmdSetViewportWScalingNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-08636
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, the current value of `viewportWScalingEnable` is VK_TRUE, then the `viewportCount` parameter in the last call to vkCmdSetViewportWScalingNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-viewportCount-04139
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportShadingRateImageStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-shadingRateImage-09233
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_COARSE_SAMPLE_ORDER_NV and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoarseSampleOrderNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-shadingRateImage-09234
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `shadingRateImageEnable` is VK_TRUE, then vkCmdSetViewportShadingRatePaletteNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-08637
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `shadingRateImageEnable` is VK_TRUE, then the `viewportCount` parameter in the last call to vkCmdSetViewportShadingRatePaletteNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-VkPipelineVieportCreateInfo-04141
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled and a VkPipelineViewportSwizzleStateCreateInfoNV structure chained from VkPipelineViewportStateCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportSwizzleStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-VkPipelineVieportCreateInfo-04142
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled and a VkPipelineViewportExclusiveScissorStateCreateInfoNV structure chained from VkPipelineViewportStateCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportExclusiveScissorStateCreateInfoNV::`exclusiveScissorCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-07878
  If the `exclusiveScissor` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_ENABLE_NV dynamic state enabled, then vkCmdSetExclusiveScissorEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-07879
  If the `exclusiveScissor` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_NV dynamic state enabled, and the most recent call to vkCmdSetExclusiveScissorEnableNV in the current command buffer set any element of `pExclusiveScissorEnables` to VK_TRUE, then vkCmdSetExclusiveScissorNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-04876
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE dynamic state enabled, then vkCmdSetRasterizerDiscardEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-04877
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthBiasEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-logicOp-04878
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LOGIC_OP_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `logicOpEnable` is VK_TRUE, then vkCmdSetLogicOpEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-primitiveFragmentShadingRateWithMultipleViewports-04552
  If the `primitiveFragmentShadingRateWithMultipleViewports` limit is not supported, the bound graphics pipeline was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, and any of the shader stages of the bound graphics pipeline write to the `PrimitiveShadingRateKHR` built-in, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and the `viewportCount` parameter of `vkCmdSetViewportWithCount` must be `1`

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-primitiveFragmentShadingRateWithMultipleViewports-08642
  If the `primitiveFragmentShadingRateWithMultipleViewports` limit is not supported, and any shader object bound to a graphics stage writes to the `PrimitiveShadingRateKHR` built-in, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and the `viewportCount` parameter of `vkCmdSetViewportWithCount` must be `1`

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-blendEnable-04727
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, then for each color attachment, if the corresponding image view’s format features do not contain VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT, then the corresponding current value of `blendEnable` must be VK_FALSE

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-08644
  If a shader object is bound to any graphics stage or a graphics pipeline is bound, the current value of `rasterizerDiscardEnable` is VK_FALSE, and none of the following is enabled:

  - the `VK_AMD_mixed_attachment_samples` extension

  - the `VK_NV_framebuffer_mixed_samples` extension

  - the `multisampledRenderToSingleSampled` feature

  then the current value of `rasterizationSamples` must be the same as the current color and/or depth/stencil attachments

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-08876
  If a shader object is bound to any graphics stage, the current render pass instance must have been begun with vkCmdBeginRendering

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-imageView-06172
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-imageView-06173
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-imageView-06174
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-imageView-06175
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-imageView-06176
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-imageView-06177
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-viewMask-06178
  If the current render pass instance was begun with vkCmdBeginRendering, the bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::`viewMask` equal to VkRenderingInfo::`viewMask`

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-colorAttachmentCount-06179
  If the `dynamicRenderingUnusedAttachments` feature is not enabled and the current render pass instance was begun with vkCmdBeginRendering, the bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::`colorAttachmentCount` equal to VkRenderingInfo::`colorAttachmentCount`

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-dynamicRenderingUnusedAttachments-08910
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound graphics pipeline

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-dynamicRenderingUnusedAttachments-08912
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` equal to VK_NULL_HANDLE must have the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound pipeline equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-dynamicRenderingUnusedAttachments-08911
  If the `dynamicRenderingUnusedAttachments` feature is enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound graphics pipeline, or the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats`, if it exists, must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-colorAttachmentCount-09362
  If the current render pass instance was begun with vkCmdBeginRendering, with a VkRenderingInfo::`colorAttachmentCount` equal to `1`, there is no shader object bound to any graphics stage, and a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, each element of the VkRenderingInfo::`pColorAttachments` array with a `resolveImageView` not equal to VK_NULL_HANDLE must have been created with an image created with a VkExternalFormatANDROID::`externalFormat` value equal to the VkExternalFormatANDROID::`externalFormat` value used to create the bound graphics pipeline

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-09363
  If there is no shader object bound to any graphics stage, the current render pass instance was begun with vkCmdBeginRendering and a VkRenderingInfo::`colorAttachmentCount` equal to `1`, and a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with an image created with a VkExternalFormatANDROID::`externalFormat` value equal to the VkExternalFormatANDROID::`externalFormat` value used to create the bound graphics pipeline

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-09364
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetColorBlendEnableEXT must have set the blend enable to VK_FALSE prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-09365
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetRasterizationSamplesEXT must have set `rasterizationSamples` to VK_SAMPLE_COUNT_1_BIT prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-09368
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetFragmentShadingRateKHR must have set `pFragmentSize->width` to `1` prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-09369
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetFragmentShadingRateKHR must have set `pFragmentSize->height` to `1` prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-07749
  If the `colorWriteEnable` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorWriteEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-attachmentCount-07750
  If the `colorWriteEnable` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the `attachmentCount` parameter of most recent call to `vkCmdSetColorWriteEnableEXT` in the current command buffer must be greater than or equal to the number of active color attachments

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-07751
  If the `VK_EXT_discard_rectangles` extension is enabled, a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT dynamic state enabled and the `pNext` chain of VkGraphicsPipelineCreateInfo included a VkPipelineDiscardRectangleStateCreateInfoEXT structure, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for each discard rectangle in VkPipelineDiscardRectangleStateCreateInfoEXT::`discardRectangleCount`

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-rasterizerDiscardEnable-09236
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT dynamic state enabled and the `pNext` chain of VkGraphicsPipelineCreateInfo did not include a VkPipelineDiscardRectangleStateCreateInfoEXT structure, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for each discard rectangle in VkPhysicalDeviceDiscardRectanglePropertiesEXT::`maxDiscardRectangles`

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-07880
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDiscardRectangleEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-07881
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_MODE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-dynamicRenderingUnusedAttachments-08913
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->imageView` was VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-dynamicRenderingUnusedAttachments-08914
  If current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-dynamicRenderingUnusedAttachments-08915
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, and the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->imageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-dynamicRenderingUnusedAttachments-08916
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->imageView` was VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-dynamicRenderingUnusedAttachments-08917
  If current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-dynamicRenderingUnusedAttachments-08918
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, and the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->imageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-imageView-06183
  If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentShadingRateAttachmentInfoKHR::`imageView` was not VK_NULL_HANDLE, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-dynamicRenderingLocalRead-11797
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingLocalRead` feature is enabled, the VK_RENDERING_LOCAL_READ_CONCURRENT_ACCESS_CONTROL_BIT_KHR flag is specified, and an attachment is being used as a feedback loop as specified by VK_RENDERING_ATTACHMENT_INPUT_ATTACHMENT_FEEDBACK_BIT_KHR, VkRenderingAttachmentFlagsInfoKHR::`flags` for that attachment must include VK_RENDERING_ATTACHMENT_INPUT_ATTACHMENT_FEEDBACK_BIT_KHR

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-imageView-06184
  If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentDensityMapAttachmentInfoEXT::`imageView` was not VK_NULL_HANDLE, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-layers-10831
  If the current render pass instance was created with VK_RENDERING_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE or VK_RENDER_PASS_CREATE_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE, and the bound graphics pipeline was created with VK_PIPELINE_CREATE_2_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE, then the current render pass instance must have a `layers` value less than or equal to VkPipelineFragmentDensityMapLayeredCreateInfoVALVE::`maxFragmentDensityMapLayers`

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-colorAttachmentCount-06185
  If the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with a sample count equal to the corresponding element of the `pColorAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-pDepthAttachment-06186
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of the `depthStencilAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-pStencilAttachment-06187
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of the `depthStencilAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-multisampledRenderToSingleSampled-07285
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with a sample count equal to the value of `rasterizationSamples` for the bound graphics pipeline

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-multisampledRenderToSingleSampled-07286
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-multisampledRenderToSingleSampled-07287
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-pNext-07935
  If this command is called inside a render pass instance started with vkCmdBeginRendering, and the `pNext` chain of VkRenderingInfo includes a VkMultisampledRenderToSingleSampledInfoEXT structure with `multisampledRenderToSingleSampledEnable` equal to VK_TRUE, then the value of `rasterizationSamples` for the bound graphics pipeline must be equal to VkMultisampledRenderToSingleSampledInfoEXT::`rasterizationSamples`

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-renderPass-06198
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline must have been created with a VkGraphicsPipelineCreateInfo::`renderPass` equal to VK_NULL_HANDLE

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-pColorAttachments-08963
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound with a fragment shader that statically writes to a color attachment, the color write mask is not zero, color writes are enabled, and the corresponding element of the VkRenderingInfo::`pColorAttachments->imageView` was not VK_NULL_HANDLE, then the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-pColorAttachments-11539
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound with a fragment shader that statically writes to a color attachment, the color write mask is not zero, color writes are enabled, and the corresponding element of the VkRenderingInfo::`pColorAttachments->resolveImageView` was not VK_NULL_HANDLE, then the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-pDepthAttachment-08964
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound, depth test is enabled, and the VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, then the VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-pDepthAttachment-11540
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound, depth test is enabled, and the VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, then the VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-pStencilAttachment-08965
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound, stencil test is enabled and the VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, then the VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-pStencilAttachment-11860
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound, stencil test is enabled and the VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, then the VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-flags-10582
  If the current render pass instance was begun with a vkCmdBeginRendering call in `commandBuffer`, its VkRenderingInfo::`flags` parameter must not have VK_RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT set unless VK_RENDERING_CONTENTS_INLINE_BIT_KHR is also set

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-primitivesGeneratedQueryWithRasterizerDiscard-06708
  If the `primitivesGeneratedQueryWithRasterizerDiscard` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, rasterization discard must not be enabled

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-primitivesGeneratedQueryWithNonZeroStreams-06709
  If the `primitivesGeneratedQueryWithNonZeroStreams` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, the bound graphics pipeline must not have been created with a non-zero value in `VkPipelineRasterizationStateStreamCreateInfoEXT`::`rasterizationStream`

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-07620
  If the `depthClamp` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLAMP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthClampEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-07621
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_POLYGON_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetPolygonModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-07622
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetRasterizationSamplesEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-07623
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetSampleMaskEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-alphaToCoverageEnable-08919
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT dynamic state enabled, and `alphaToCoverageEnable` was VK_TRUE in the last call to vkCmdSetAlphaToCoverageEnableEXT, then the Fragment Output Interface must contain a variable for the alpha `Component` word in `Location` 0 at `Index` 0

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-alphaToCoverageEnable-08920
  If a shader object is bound to any graphics stage, and the most recent call to vkCmdSetAlphaToCoverageEnableEXT in the current command buffer set `alphaToCoverageEnable` to VK_TRUE, then the Fragment Output Interface must contain a variable for the alpha `Component` word in `Location` 0 at `Index` 0

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-07624
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAlphaToCoverageEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-07625
  If the `alphaToOne` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ALPHA_TO_ONE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAlphaToOneEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-07626
  If the `logicOp` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LOGIC_OP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetLogicOpEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-07627
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and there are color attachments bound, then vkCmdSetColorBlendEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-07629
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and there are color attachments bound, then vkCmdSetColorWriteMaskEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-07630
  If the `geometryStreams` feature is enabled, and a shader object is bound to the VK_SHADER_STAGE_GEOMETRY_BIT stage or a graphics pipeline is bound which was created with both a VK_SHADER_STAGE_GEOMETRY_BIT stage and the VK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXT dynamic state enabled, then vkCmdSetRasterizationStreamEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-07631
  If the `VK_EXT_conservative_rasterization` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_CONSERVATIVE_RASTERIZATION_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetConservativeRasterizationModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-07632
  If the `VK_EXT_conservative_rasterization` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXTRA_PRIMITIVE_OVERESTIMATION_SIZE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `conservativeRasterizationMode` is VK_CONSERVATIVE_RASTERIZATION_MODE_OVERESTIMATE_EXT, then vkCmdSetExtraPrimitiveOverestimationSizeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-conservativePointAndLineRasterization-07499
  If the `VK_EXT_conservative_rasterization` extension is enabled, `conservativePointAndLineRasterization` is not supported, a shader object is bound to any graphics stage or a graphics pipeline is bound, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line or point topology class, then the current value of `conservativeRasterizationMode` must be VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-07633
  If the `depthClipEnable` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLIP_ENABLE_EXT dynamic state, then vkCmdSetDepthClipEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-07636
  If the `VK_EXT_provoking_vertex` extension is enabled, a shader object is bound to the VK_SHADER_STAGE_VERTEX_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_PROVOKING_VERTEX_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetProvokingVertexModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-08666
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineRasterizationModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-08669
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineStippleEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-07849
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled and a shader object is bound to any graphics stage, or a bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stippledLineEnable` is VK_TRUE, then vkCmdSetLineStipple must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-10608
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic state enabled, the effective rasterization input topology is in the line topology class, and the current `lineRasterizationMode` is VK_LINE_RASTERIZATION_MODE_BRESENHAM or VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH, then the current `alphaToCoverageEnable`, `alphaToOneEnable` and `sampleShadingEnable` states must all be VK_FALSE

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-07639
  If the `depthClipControl` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLIP_NEGATIVE_ONE_TO_ONE_EXT dynamic state enabled, then vkCmdSetDepthClipNegativeOneToOneEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-09650
  If the `depthClampControl` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLAMP_RANGE_EXT dynamic state enabled, and the current value of `depthClampEnable` is VK_TRUE, then vkCmdSetDepthClampRangeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-07640
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_ENABLE_NV dynamic state enabled, then vkCmdSetViewportWScalingEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-07641
  If the `VK_NV_viewport_swizzle` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic state enabled, then vkCmdSetViewportSwizzleNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-07642
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageToColorEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-07643
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_LOCATION_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageToColorEnable` is VK_TRUE, then vkCmdSetCoverageToColorLocationNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-07644
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_MODE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageModulationModeNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-07645
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageModulationMode` is any value other than VK_COVERAGE_MODULATION_MODE_NONE_NV, then vkCmdSetCoverageModulationTableEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-07646
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageModulationTableEnable` is VK_TRUE, then vkCmdSetCoverageModulationTableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-07647
  If the `shadingRateImage` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SHADING_RATE_IMAGE_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetShadingRateImageEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-pipelineFragmentShadingRate-09238
  If the `pipelineFragmentShadingRate` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetFragmentShadingRateKHR must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-07648
  If the `representativeFragmentTest` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_REPRESENTATIVE_FRAGMENT_TEST_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetRepresentativeFragmentTestEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-07649
  If the `coverageReductionMode` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageReductionModeNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-rasterizationSamples-07471
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current subpass does not use any color and/or depth/stencil attachments, then the `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT must follow the rules for a zero-attachment subpass

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-samples-07472
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state disabled, then the `samples` parameter in the last call to vkCmdSetSampleMaskEXT must be greater or equal to the VkPipelineMultisampleStateCreateInfo::`rasterizationSamples` parameter used to create the bound graphics pipeline

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-samples-07473
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT state and VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT states enabled, then the `samples` parameter in the last call to vkCmdSetSampleMaskEXT must be greater or equal to the `rasterizationSamples` parameter in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-09211
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, or a shader object is bound to any graphics stage, and the current render pass instance includes a VkMultisampledRenderToSingleSampledInfoEXT structure with `multisampledRenderToSingleSampledEnable` equal to VK_TRUE, then the `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT must be the same as the `rasterizationSamples` member of that structure

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-firstAttachment-07476
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic states enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the last call to vkCmdSetColorBlendEnableEXT in the current command buffer prior to this drawing command must have set a value for all active color attachments

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-firstAttachment-07478
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT dynamic states enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the last call to vkCmdSetColorWriteMaskEXT in the current command buffer prior to this drawing command must have set a value for all active color attachments

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-advancedBlendMaxColorAttachments-07480
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT and VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic states enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and an active color attachment current value of `blendEnable` is VK_TRUE, then the number of active color attachments must not exceed `advancedBlendMaxColorAttachments`

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-10862
  If a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT , but not the VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorBlendEquationEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-rasterizerDiscardEnable-10863
  If a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT, but not the VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorBlendAdvancedEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-10864
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT and VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then either vkCmdSetColorBlendAdvancedEXT or vkCmdSetColorBlendEquationEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-primitivesGeneratedQueryWithNonZeroStreams-07481
  If the `primitivesGeneratedQueryWithNonZeroStreams` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, and the bound graphics pipeline was created with VK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXT state enabled, the last call to vkCmdSetRasterizationStreamEXT must have set the `rasterizationStream` to zero

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-sampleLocationsPerPixel-07482
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state disabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then the `sampleLocationsPerPixel` member of `pSampleLocationsInfo` in the last call to vkCmdSetSampleLocationsEXT must equal the `rasterizationSamples` member of the VkPipelineMultisampleStateCreateInfo structure the bound graphics pipeline has been created with

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-sampleLocationsPerPixel-07483
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then the `sampleLocationsPerPixel` member of `pSampleLocationsInfo` in the last call to vkCmdSetSampleLocationsEXT must equal the `rasterizationSamples` parameter of the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-sampleLocationsEnable-07484
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT then the current active depth attachment must have been created with the VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit set

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-sampleLocationsEnable-07485
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, then the `sampleLocationsInfo.maxSampleLocationGridSize.width` in the last call to vkCmdSetSampleLocationsEXT must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.width` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling `rasterizationSamples`

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-sampleLocationsEnable-07486
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, then the `sampleLocationsInfo.maxSampleLocationGridSize.height` in the last call to vkCmdSetSampleLocationsEXT must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.height` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling `rasterizationSamples`

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-sampleLocationsEnable-07487
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, the fragment shader code must not statically use the extended instruction `InterpolateAtSample`

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-sampleLocationsEnable-07936
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationGridSize.width` must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.width` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling the value of `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-sampleLocationsEnable-07937
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationGridSize.height` must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.height` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling the value of `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-sampleLocationsEnable-07938
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationsPerPixel` must equal `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-coverageModulationTableEnable-07488
  If a shader object is bound to any graphics stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NV state enabled, and the last call to vkCmdSetCoverageModulationTableEnableNV set `coverageModulationTableEnable` to VK_TRUE, then the `coverageModulationTableCount` parameter in the last call to vkCmdSetCoverageModulationTableNV must equal the current `rasterizationSamples` divided by the number of color samples in the current active color attachment

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-rasterizationSamples-07489
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, and if current subpass has a depth/stencil attachment and depth test, stencil test, or depth bounds test are enabled in the bound pipeline, then the current `rasterizationSamples` must be the same as the sample count of the depth/stencil attachment

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-coverageToColorEnable-07490
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV state enabled and the last call to vkCmdSetCoverageToColorEnableNV set the `coverageToColorEnable` to VK_TRUE, then there must be an active color attachment at the location selected by the last call to vkCmdSetCoverageToColorLocationNV `coverageToColorLocation`, with a VkFormat of VK_FORMAT_R8_UINT, VK_FORMAT_R8_SINT, VK_FORMAT_R16_UINT, VK_FORMAT_R16_SINT, VK_FORMAT_R32_UINT, or VK_FORMAT_R32_SINT

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-rasterizerDiscardEnable-09420
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, and a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, and the most recent call to vkCmdSetRasterizerDiscardEnable in the current command buffer set `rasterizerDiscardEnable` to VK_FALSE, and the last call to vkCmdSetCoverageToColorEnableNV set the `coverageToColorEnable` to VK_TRUE, then there must be an active color attachment at the location selected by the last call to vkCmdSetCoverageToColorLocationNV `coverageToColorLocation`, with a VkFormat of VK_FORMAT_R8_UINT, VK_FORMAT_R8_SINT, VK_FORMAT_R16_UINT, VK_FORMAT_R16_SINT, VK_FORMAT_R32_UINT, or VK_FORMAT_R32_SINT

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-coverageReductionMode-07491
  If the `coverageReductionMode` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV or VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic states enabled, then the current values of `coverageReductionMode`, `rasterizationSamples`, the sample counts for the color and depth/stencil attachments (if the subpass has them) must be a valid combination returned by vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-viewportCount-07492
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportSwizzleStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-viewportCount-07493
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic states enabled then the `viewportCount` parameter in the last call to vkCmdSetViewportSwizzleNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-viewportCount-09421
  If the `VK_NV_viewport_swizzle` extension is enabled, and a shader object is bound to any graphics stage, then the `viewportCount` parameter in the last call to vkCmdSetViewportSwizzleNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-rasterizationSamples-07494
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, and the `coverageReductionMode` feature is not enabled, or the current value of `coverageReductionMode` is not VK_COVERAGE_REDUCTION_MODE_TRUNCATE_NV, and the current value of `rasterizationSamples` is greater than sample count of the color attachment, then sample shading must be disabled

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-stippledLineEnable-07495
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_RECTANGULAR, then the `stippledRectangularLines` feature must be enabled

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-stippledLineEnable-07496
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_BRESENHAM, then the `stippledBresenhamLines` feature must be enabled

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-stippledLineEnable-07497
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH, then the `stippledSmoothLines` feature must be enabled

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-stippledLineEnable-07498
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_DEFAULT, then the `stippledRectangularLines` feature must be enabled and VkPhysicalDeviceLimits::`strictLines` must be VK_TRUE

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-stage-07073
  If the bound pipeline was created with the VkPipelineShaderStageCreateInfo::`stage` member of an element of VkGraphicsPipelineCreateInfo::`pStages` set to VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT, then Mesh Shader Queries must not be active

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-08877
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ATTACHMENT_FEEDBACK_LOOP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAttachmentFeedbackLoopEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-07850
  If dynamic state was inherited from VkCommandBufferInheritanceViewportScissorInfoNV, it must be set in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-nextStage-10745
  For each shader object bound to a graphics stage, except for shader object bound to the last graphics stage in the logical pipeline, it must have been created with a `nextStage` including the corresponding bit to the shader object bound to the following graphics stage in the logical pipeline

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-08684
  If there is no bound graphics pipeline, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_VERTEX_BIT

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-08685
  If there is no bound graphics pipeline, and the `tessellationShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-08686
  If there is no bound graphics pipeline, and the `tessellationShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-08687
  If there is no bound graphics pipeline, and the `geometryShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_GEOMETRY_BIT

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-08688
  If there is no bound graphics pipeline, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_FRAGMENT_BIT

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-08689
  If there is no bound graphics pipeline, and the `taskShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TASK_BIT_EXT

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-08690
  If there is no bound graphics pipeline, and the `meshShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-08693
  If there is no bound graphics pipeline, and at least one of the `taskShader` and `meshShader` features is enabled, one of the VK_SHADER_STAGE_VERTEX_BIT or VK_SHADER_STAGE_MESH_BIT_EXT stages must have a valid `VkShaderEXT` bound, and the other must have no `VkShaderEXT` bound

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-08696
  If there is no bound graphics pipeline, and a valid `VkShaderEXT` is bound to the VK_SHADER_STAGE_VERTEX_BIT stage, there must be no `VkShaderEXT` bound to either the VK_SHADER_STAGE_TASK_BIT_EXT stage or the VK_SHADER_STAGE_MESH_BIT_EXT stage

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-08698
  If any graphics shader is bound which was created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag, then all shaders created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag in the same vkCreateShadersEXT call must also be bound

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-08699
  If any graphics shader is bound which was created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag, any stages in between stages whose shaders which did not create a shader with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag as part of the same vkCreateShadersEXT call must not have any `VkShaderEXT` bound

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-08878
  All bound graphics shader objects must have been created with identical or identically defined push constant ranges

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-08879
  All bound graphics shader objects must have either been created with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag set, or with identical or identically defined arrays of descriptor set layouts

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-colorAttachmentCount-09372
  If the current render pass instance was begun with vkCmdBeginRendering and a VkRenderingInfo::`colorAttachmentCount` equal to `1`, a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, and a fragment shader is bound, it must not declare the `DepthReplacing` or `StencilRefReplacingEXT` execution modes

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-pDynamicStates-08715
  If the bound graphics pipeline state includes a fragment shader stage, was created with VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`, and the fragment shader declares the `EarlyFragmentTests` execution mode and uses `OpDepthAttachmentReadEXT`, the `depthWriteEnable` parameter in the last call to vkCmdSetDepthWriteEnable must be VK_FALSE

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-pDynamicStates-08716
  If the bound graphics pipeline state includes a fragment shader stage, was created with VK_DYNAMIC_STATE_STENCIL_WRITE_MASK set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`, and the fragment shader declares the `EarlyFragmentTests` execution mode and uses `OpStencilAttachmentReadEXT`, the `writeMask` parameter in the last call to vkCmdSetStencilWriteMask must be `0`

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-09116
  If a shader object is bound to any graphics stage or the bound graphics pipeline was created with VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT, and the format of any color attachment is VK_FORMAT_E5B9G9R9_UFLOAT_PACK32, the corresponding element of the `pColorWriteMasks` parameter of vkCmdSetColorWriteMaskEXT must either include all of VK_COLOR_COMPONENT_R_BIT, VK_COLOR_COMPONENT_G_BIT, VK_COLOR_COMPONENT_B_BIT, and VK_COLOR_COMPONENT_A_BIT, or none of them

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-maxFragmentDualSrcAttachments-09239
  If blending is enabled for any attachment where either the source or destination blend factors for that attachment use the secondary color input, the maximum value of `Location` for any output attachment statically used in the `Fragment` `Execution` `Model` executed by this command must be less than `maxFragmentDualSrcAttachments`

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-09548
  If the current render pass was begun with vkCmdBeginRendering, there is no shader object bound to any graphics stage, the value of each element of VkRenderingAttachmentLocationInfo::`pColorAttachmentLocations` in the bound pipeline must match the value for the corresponding locations set currently in the current render pass instance

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-09549
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of each element of VkRenderingInputAttachmentIndexInfo::`pColorAttachmentInputIndices` in the bound pipeline must match the value for the corresponding index set currently in the current render pass instance

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-10927
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` in the bound pipeline must match the value set currently in the current render pass instance

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-10928
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` in the bound pipeline must match the value set currently in the current render pass instance

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-09642
  If the current render pass was begun with vkCmdBeginRendering with the VK_RENDERING_ENABLE_LEGACY_DITHERING_BIT_EXT flag, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_2_ENABLE_LEGACY_DITHERING_BIT_EXT

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-09643
  If the bound graphics pipeline was created with VK_PIPELINE_CREATE_2_ENABLE_LEGACY_DITHERING_BIT_EXT, the current render pass must have begun with vkCmdBeginRendering with the VK_RENDERING_ENABLE_LEGACY_DITHERING_BIT_EXT flag

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-10677
  If the per-tile execution model is enabled, the tileShadingPerTileDraw feature must be enabled

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-10772
  If a shader object is bound to any graphics stage, multiview functionality must not be enabled in the current render pass

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-multiviewPerViewViewports-12262
  If the `multiviewPerViewViewports` feature is enabled, then the index of the most significant bit in current render pass instance `viewMask` must be less than the current value of `viewportCount`

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-multiviewPerViewViewports-12263
  If the `multiviewPerViewViewports` feature is enabled, then the index of the most significant bit in current render pass instance `viewMask` must be less than the current value of `scissorCount`

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-flags-11521
  If current render pass instance was begun with vkCmdBeginRendering with VkRenderingInfo::`flags` which includes VK_RENDERING_FRAGMENT_REGION_BIT_EXT, and if sample shading is enabled (explicitly or implicitly), then the minimum fraction for sample shading must equal 0.0

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-11522
  If the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, and the `dynamicRenderingUnusedAttachments` feature is not enabled, the graphics pipeline bound must have been created with a VkCustomResolveCreateInfoEXT

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-11523
  If the current render pass instance was begun with vkCmdBeginRendering and does not contain a custom resolve, and the `dynamicRenderingUnusedAttachments` feature is not enabled, the graphics pipeline bound must not have been created with a VkCustomResolveCreateInfoEXT

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-customResolve-11524
  If the current render pass instance was begun with vkCmdBeginRendering and vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, the graphics pipeline bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_TRUE

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-customResolve-11525
  If the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, and vkCmdBeginCustomResolveEXT has not been recorded in the render pass instance, the graphics pipeline bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_FALSE

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-11861
  If the `dynamicRenderingUnusedAttachments` feature is not enabled and the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, the bound graphics pipeline must have been created with a VkCustomResolveCreateInfoEXT::`colorAttachmentCount` equal to VkRenderingInfo::`colorAttachmentCount`

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-11862
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound graphics pipeline

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-11863
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` equal to VK_NULL_HANDLE must have the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound pipeline equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-dynamicRenderingUnusedAttachments-11864
  If the `dynamicRenderingUnusedAttachments` feature is enabled, the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound graphics pipeline, or the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats`, if it exists, must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-11865
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-11866
  If current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-dynamicRenderingUnusedAttachments-11867
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, and the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-11868
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->resolveImageView` was VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-11869
  If current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-dynamicRenderingUnusedAttachments-11870
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, and the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-colorAttachmentCount-11871
  If the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0` and vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, then for each element of the VkRenderingInfo::`pColorAttachments` array with a `resolveImageView` not equal to VK_NULL_HANDLE, the `resolveImageView` must have been created with a sample count equal to the value of `rasterizationSamples` for the bound graphics pipeline

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-pDepthAttachment-11872
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-pStencilAttachment-11873
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-customResolve-11529
  If a shader object is bound to the fragment stage, the current render pass instance was begun with vkCmdBeginRendering, a fragment density map attachment is active, and vkCmdBeginCustomResolveEXT has been called, then the fragment shader object bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_TRUE

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-customResolve-11530
  If a shader object is bound to the fragment stage, the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, a fragment density map attachment is active, and vkCmdBeginCustomResolveEXT has not yet been called, then the fragment shader object bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_FALSE

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-flags-13361
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, then all bound shader objects must have been created with the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-flags-13362
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, then the pipeline layout of the bound descriptor sets must have been created with VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT set

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-flags-13363
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, and any of the descriptor set layouts used to create the pipeline layout of the bound descriptor sets were created with any binding’s VkDescriptorSetLayoutBinding::`stageFlags` set with VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT, then there must be no binding with VkDescriptorSetLayoutBinding::`stageFlags` set with VK_SHADER_STAGE_TASK_BIT_EXT or VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-flags-13364
  If there are any shader objects bound that were created with `flags` that includes both the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR and VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT bits, the pipeline layout of the bound descriptor sets must have been created with VK_PIPELINE_LAYOUT_CREATE_NO_TASK_SHADER_BIT_KHR set

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-flags-13365
  If there are any shader objects bound that were created with `flags` that includes both the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR and VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT bits, there must be no shader object bound to the VK_SHADER_STAGE_TASK_BIT_EXT stage

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-stage-06480
  The bound graphics pipeline must not have been created with the VkPipelineShaderStageCreateInfo::`stage` member of any element of VkGraphicsPipelineCreateInfo::`pStages` set to VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-pStages-10680
  If there is no bound graphics pipeline, `vkCmdBindShadersEXT` must not have last bound the `pStages` element of VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT with a valid shader object other than VK_NULL_HANDLE

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-07074
  Transform Feedback Queries must not be active

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-07075
  Primitives Generated Queries must not be active

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-pipelineStatistics-07076
  The `pipelineStatistics` member used to create any active Pipeline Statistics Query must not contain VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT, VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT, VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT, VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT, VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT, VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT, VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT, VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT, or VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-08694
  If there is no bound graphics pipeline, and both the `taskShader` and `meshShader` features are enabled, and a valid `VkShaderEXT` is bound the to the VK_SHADER_STAGE_MESH_BIT_EXT stage, and that `VkShaderEXT` was created without the VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT flag, a valid `VkShaderEXT` must be bound to the VK_SHADER_STAGE_TASK_BIT_EXT stage

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-None-08695
  If there is no bound graphics pipeline, and both the `taskShader` and `meshShader` features are enabled, and a valid `VkShaderEXT` is bound the to the VK_SHADER_STAGE_MESH_BIT_EXT stage, and that `VkShaderEXT` was created with the VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT flag, there must be no `VkShaderEXT` bound to the VK_SHADER_STAGE_TASK_BIT_EXT stage

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-commandBuffer-13068
  `commandBuffer` must not be a protected command buffer

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-drawIndirectCount-13069
  If the `drawIndirectCount` feature is not enabled this function must not be used

Valid Usage (Implicit)

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-pInfo-parameter
  `pInfo` must be a valid pointer to a valid VkDrawIndirectCount2InfoKHR structure

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-renderpass
  This command must only be called inside of a render pass instance

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdDrawMeshTasksIndirectCount2EXT-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Inside | Outside | VK_QUEUE_GRAPHICS_BIT | Action

Conditional Rendering

vkCmdDrawMeshTasksIndirectCount2EXT is affected by conditional rendering

To record an indirect mesh tasks drawing command with the draw count sourced from a buffer, call:

Warning | This functionality is superseded by vkCmdDrawMeshTasksIndirectCount2EXT. See Legacy Functionality for more information.

    // Provided by VK_EXT_mesh_shader with VK_VERSION_1_2 or VK_KHR_draw_indirect_count or VK_AMD_draw_indirect_count
    void vkCmdDrawMeshTasksIndirectCountEXT(
        VkCommandBuffer                             commandBuffer,
        VkBuffer                                    buffer,
        VkDeviceSize                                offset,
        VkBuffer                                    countBuffer,
        VkDeviceSize                                countBufferOffset,
        uint32_t                                    maxDrawCount,
        uint32_t                                    stride);

- `commandBuffer` is the command buffer into which the command is recorded.

- `buffer` is the buffer containing draw parameters.

- `offset` is the byte offset into `buffer` where parameters begin.

- `countBuffer` is the buffer containing the draw count.

- `countBufferOffset` is the byte offset into `countBuffer` where the draw count begins.

- `maxDrawCount` specifies the maximum number of draws that will be executed. The actual number of executed draw calls is the minimum of the count specified in `countBuffer` and `maxDrawCount`.

- `stride` is the byte stride between successive sets of draw parameters.

`vkCmdDrawMeshTasksIndirectCountEXT` behaves similarly to vkCmdDrawMeshTasksIndirectEXT except that the draw count is read by the device from a buffer during execution. The command will read an unsigned 32-bit integer from `countBuffer` located at `countBufferOffset` and use this as the draw count.

Valid Usage

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-magFilter-04553
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-magFilter-09598
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-mipmapMode-04770
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-mipmapMode-09599
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-unnormalizedCoordinates-09635
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `levelCount` and `layerCount` must be 1

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-08609
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `viewType` must be VK_IMAGE_VIEW_TYPE_1D or VK_IMAGE_VIEW_TYPE_2D

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-08610
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions with `ImplicitLod`, `Dref` or `Proj` in their name

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-08611
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions that includes a LOD bias or any offset values

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-06479
  If a VkImageView is sampled with depth comparison, the image view’s format features must contain VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-02691
  If a VkImageView is accessed using atomic operations as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-07888
  If a VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER descriptor is accessed using atomic operations as a result of this command, then the storage texel buffer’s format features must contain VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-02692
  If a VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-02693
  If the VK_EXT_filter_cubic extension is not enabled and any VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, it must not have a VkImageViewType of VK_IMAGE_VIEW_TYPE_3D, VK_IMAGE_VIEW_TYPE_CUBE, or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-filterCubic-02694
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have a VkImageViewType and format that supports cubic filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubic` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-filterCubicMinmax-02695
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX as a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubicMinmax` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-cubicRangeClamp-09212
  If the `cubicRangeClamp` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must not have a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-reductionMode-09213
  Any VkImageView being sampled with a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM as a result of this command must sample with VK_FILTER_CUBIC_EXT

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-selectableCubicWeights-09214
  If the `selectableCubicWeights` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have VkSamplerCubicWeightsCreateInfoQCOM::`cubicWeights` equal to VK_CUBIC_FILTER_WEIGHTS_CATMULL_ROM_QCOM

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-flags-02696
  Any VkImage created with a VkImageCreateInfo::`flags` containing VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV sampled as a result of this command must only be sampled using a VkSamplerAddressMode of VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-OpTypeImage-07027
  For any VkImageView being written as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-OpTypeImage-07028
  For any VkImageView being read as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-OpTypeImage-07029
  For any VkBufferView being written as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown`, the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-OpTypeImage-07030
  Any VkBufferView being read as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown` then the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-08600
  If a a bound shader was created with a pipeline layout and statically uses a set n, a descriptor set must have been bound to n at the same pipeline bind point, with layouts compatible for set n with the layout(s) used to create the shader, as described in Pipeline Layout Compatibility

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-08601
  If a a bound shader was created with a pipeline layout or specified push constant ranges and statically uses a push constant value, that value must have been set for the same pipeline bind point, with push constant ranges that are compatible with the push constant range used to create the shader

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-10068
  For each array of resources that is used by a bound shader, the indices used to access members of the array must be less than the descriptor count for the identified binding in the descriptor sets used by this command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-08114
  Descriptors in each bound descriptor set, specified via vkCmdBindDescriptorSets, must be valid if they are accessed as described by descriptor validity by the VkPipeline bound to the pipeline bind point used by this command and the bound VkPipeline was not created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-imageLayout-00344
  If an image descriptor is accessed by a shader, the VkImageLayout must match the subresource accessible from the VkImageView as defined by the image layout matching rules

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-08115
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdBindDescriptorSets, the bound VkPipeline must have been created without VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-08116
  Descriptors in bound descriptor buffers, specified via vkCmdSetDescriptorBufferOffsetsEXT, must be valid if they are dynamically accessed

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-08117
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdSetDescriptorBufferOffsetsEXT, the bound VkPipeline must have been created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-08119
  If a descriptor is dynamically used with a VkPipeline created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-08605
  If a descriptor is dynamically used with a VkShaderEXT created with a `VkDescriptorSetLayout` that was created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-08606
  If the `shaderObject` feature is not enabled, a valid pipeline must be bound to the pipeline bind point used by this command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-08608
  If a pipeline is bound to the pipeline bind point used by this command, there must not have been any calls to dynamic state setting commands for any state specified statically in the VkPipeline object bound to the pipeline bind point used by this command, since that pipeline was bound

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-uniformBuffers-06935
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-08612
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-storageBuffers-06936
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-08613
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a storage buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-commandBuffer-02707
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, any resource accessed by bound shaders must not be a protected resource

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-viewType-07752
  If a VkImageView is accessed as a result of this command, then the image view’s `viewType` must match the `Dim` operand of the `OpTypeImage` as described in Compatibility Between SPIR-V Image Dimensions and Vulkan ImageView Types

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-format-07753
  If a VkImageView or VkBufferView is accessed as a result of this command, then the numeric type of the view’s `format` and the `Sampled` `Type` operand of the `OpTypeImage` must match

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-OpImageWrite-08795
  If a VkImageView created with a format other than VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the image view’s format

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-OpImageWrite-08796
  If a VkImageView created with the format VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have four components

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-OpImageWrite-04469
  If a VkBufferView is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the buffer view’s format

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-SampledType-04470
  If a VkImageView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-SampledType-04471
  If a VkImageView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-SampledType-04472
  If a VkBufferView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-SampledType-04473
  If a VkBufferView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-sparseImageInt64Atomics-04474
  If the `sparseImageInt64Atomics` feature is not enabled, VkImage objects created with the VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-sparseImageInt64Atomics-04475
  If the `sparseImageInt64Atomics` feature is not enabled, VkBuffer objects created with the VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-OpImageSampleWeightedQCOM-06971
  If `OpImageSampleWeightedQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_SAMPLED_IMAGE_BIT_QCOM

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-OpImageSampleWeightedQCOM-06972
  If `OpImageSampleWeightedQCOM` uses a VkImageView as a sample weight image as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_IMAGE_BIT_QCOM

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-OpImageBoxFilterQCOM-06973
  If `OpImageBoxFilterQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BOX_FILTER_SAMPLED_BIT_QCOM

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-OpImageBlockMatchSSDQCOM-06974
  If `OpImageBlockMatchSSDQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-OpImageBlockMatchSADQCOM-12420
  If `OpImageBlockMatchSADQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-OpImageBlockMatchSADQCOM-06976
  If `OpImageBlockMatchSADQCOM` or OpImageBlockMatchSSDQCOM is used to read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-OpImageSampleWeightedQCOM-06977
  If `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-OpImageSampleWeightedQCOM-06978
  If any command other than `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must not have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-OpImageBlockMatchWindow-09215
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-OpImageBlockMatchWindow-09216
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format must be a single-component format

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-OpImageBlockMatchWindow-09217
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-OpImageBlockMatchWindow-12421
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the `blockMatchExtendedClampToEdge` feature is not enabled, the input sampler must not have been created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-addressModeU-12422
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the input sampler was created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, then the sampler must have been created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-07288
  Any shader invocation executed by this command must terminate

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-09600
  If a descriptor with type equal to any of VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, or VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT is accessed as a result of this command, all image subresources identified by that descriptor must be in the image layout identified when the descriptor was written

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-micromap-11636
  If an acceleration structure is accessed as a result of this command through an `OpRayQueryProceedKHR` operation , the `VK_EXT_opacity_micromap` extension is not enabled, and the acceleration structure is built using geometry with a VkAccelerationStructureTrianglesOpacityMicromapKHR structure included in its `pNext` chain, the shader must have specified a `OpacityMicromapIdKHR` execution mode with its specialization constant operand equal to VK_TRUE

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-micromap-11637
  If an acceleration structure is accessed as a result of this command and the acceleration structure was constructed through deserialization, all micromap arrays referenced by the acceleration structure that were not replaced by an acceleration structure update command must have been deserialized using the serialized data of the corresponding micromaps used to originally build the acceleration structure prior to the execution of this command on the device

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-micromap-11638
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkPipeline bound to the pipeline bind point used by this command must not have been created with `flags` that includes VK_PIPELINE_CREATE_2_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_KHR

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-micromap-11639
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkShaderEXT that accessed the descriptor must not have been created with `flags` that includes VK_SHADER_CREATE_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_EXT

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-commandBuffer-10746
  The `VkDeviceMemory` object allocated from a `VkMemoryHeap` with the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property that is bound to a resource accessed as a result of this command must be the active bound tile memory object in `commandBuffer`

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-10678
  If this command is recorded inside a tile shading render pass instance, the stages corresponding to the pipeline bind point used by this command must only include VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_FRAGMENT_BIT, and/or VK_SHADER_STAGE_COMPUTE_BIT

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-10679
  If this command is recorded where per-tile execution model is enabled, there must be no access to any image while the image was be transitioned to the VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT layout

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-pDescription-09900
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the underlying VkTensorARM object must have been created with the VK_TENSOR_USAGE_SHADER_BIT_ARM usage flag set

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-dimensionCount-09905
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the `Rank` of the `OpTypeTensorARM` of the tensor resource variable must be equal to the `dimensionCount` provided via VkTensorCreateInfoARM::`pDescription` when creating the underlying VkTensorARM object

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-OpTypeTensorARM-09906
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the element type of the `OpTypeTensorARM` of the tensor resource variable must be compatible with the VkFormat of the VkTensorViewARM used for the access

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-OpTensorReadARM-12462
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, using `OpTensorReadARM` or `OpTensorWriteARM`, and the underlying VkTensorARM object was created with a VK_TENSOR_TILING_BRICK_16_WIDE_ARM, VK_TENSOR_TILING_BRICK_8_WIDE_ARM, VK_TENSOR_TILING_BRICK_4_WIDE_ARM, VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_ARM, or VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_64K_ARM VkTensorTilingARM, and the object read or written is an array, then the innermost coordinate provided to `OpTensorReadARM` or `OpTensorWriteARM` via the `Coordinates` operand must be a multiple of the largest power of 2 that is less than or equal to the number of components of the array

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-pNext-12463
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command and the corresponding VkTensorARM object was created with a VkTensorRollingBackingCreateInfoARM structure in the `pNext` chain of VkTensorCreateInfoARM, then the number of elements accessed with one `OpTensorReadARM` or `OpTensorWriteARM`, must be less than or equal to the number of elements available from the starting coordinate in the rolling backing along the innermost dimension, defined as `wraps`[`dimensionCount` - 1] - InnermostCoordinate % `wraps`[`dimensionCount` - 1] where InnermostCoordinate is the last component of the coordinates array provided via the `Coordinates` operand

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-12472
  Descriptors dynamically accessed in bound descriptor heaps must be valid

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-11297
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a `OpTypeStruct` decorated with `Block` or `BufferBlock` using that mapping, the calculated offset for the resource heap must be a multiple of `bufferDescriptorAlignment`

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-11298
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeImage` or `OpTypeSampledImage` using that mapping, the calculated offset for the resource heap must be a multiple of `imageDescriptorAlignment`

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-11299
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeSampler` or `OpTypeSampledImage` using that mapping, the calculated offset for the sampler heap must be a multiple of `samplerDescriptorAlignment`

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-11397
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeTensorARM` using that mapping, the calculated offset for the resource heap must be a multiple of `tensorDescriptorAlignment`

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-11300
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 4

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-11301
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-11302
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-11304
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 8

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-11305
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-11306
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address pointed to by the address in push data must be a valid VkDeviceAddress

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-11308
  For each descriptor heap that is statically used by a bound shader, either directly or via a descriptor mapping, a valid descriptor heap must be bound

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-11309
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, execution of this command must not result in any descriptor read accessing data outside of the user range of the respective heap bound by `vkCmdBind*HeapEXT` commands

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-11372
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer or uniform texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified via VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-11373
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer or storage texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-11374
  If the `robustBufferAccess2` feature is not enabled, the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, uniform texel buffer, storage buffer, or storage texel buffer, that shader must not access values outside of the range of the buffer as specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-pBindInfo-11375
  If any bound shader uses an embedded sampler via a descriptor mapping, the value of `pBindInfo->reservedRangeSize` set for vkCmdBindSamplerHeapEXT must be greater than or equal to `minSamplerHeapReservedRangeWithEmbedded`

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-11376
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, and that shader statically uses a push constant value, that value must have been set by vkCmdPushDataEXT

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-11398
  If a bound shader was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the access must not be out of bounds

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-11437
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the buffer from which the address in push data was queried must have been created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-11438
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-11441
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must be aligned to `minUniformBufferOffsetAlignment`

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-11439
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_STORAGE_BUFFER_BIT usage flag set

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-11442
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must be aligned to `minStorageBufferOffsetAlignment`

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-11485
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses an acceleration structure using that mapping, the address that the acceleration structure is mapped to must be an acceleration structure address retrieved from a VkAccelerationStructureKHR object via vkGetAccelerationStructureDeviceAddressKHR or handle retrieved from a VkAccelerationStructureNV object via vkGetAccelerationStructureHandleNV

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-index-11450
  If a shader uses a sampler descriptor to sample an image as a result of this command, and that sampler descriptor uses a custom border color with an index defined by VkSamplerCustomBorderColorIndexCreateInfoEXT, the value of VkSamplerCustomBorderColorIndexCreateInfoEXT::`index` must have been registered before this command was recorded, and still be registered during the sampling operation, with an identically defined color

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-protectedNoFault-11455
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, the address that the resource is mapped to must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-protectedNoFault-11456
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, the address of the indirect memory must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-renderPass-02684
  The current render pass must be compatible with the `renderPass` member of the `VkGraphicsPipelineCreateInfo` structure specified when creating the `VkPipeline` bound to VK_PIPELINE_BIND_POINT_GRAPHICS

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-subpass-02685
  The subpass index of the current render pass must be equal to the `subpass` member of the `VkGraphicsPipelineCreateInfo` structure specified when creating the `VkPipeline` bound to VK_PIPELINE_BIND_POINT_GRAPHICS

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-OpTypeImage-07468
  If any shader executed by this pipeline accesses an `OpTypeImage` variable with a `Dim` operand of `SubpassData`, it must be decorated with an `InputAttachmentIndex` that corresponds to a valid input attachment in the current subpass

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-07469
  Input attachment views accessed in a subpass must be created with the same VkFormat as the corresponding subpass definition, and be created with a VkImageView that is compatible with the attachment referenced by the subpass' `pInputAttachments`[`InputAttachmentIndex`] in the bound VkFramebuffer as specified by Fragment Input Attachment Compatibility

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-pDepthInputAttachmentIndex-09595
  Input attachment views accessed in a dynamic render pass with a `InputAttachmentIndex` referenced by VkRenderingInputAttachmentIndexInfo, or no `InputAttachmentIndex` if VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` or VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` are `NULL`, must be created with a VkImageView that is compatible with the corresponding color, depth, or stencil attachment in VkRenderingInfo

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-pDepthInputAttachmentIndex-09596
  Input attachment views accessed in a dynamic render pass via a shader object must have an `InputAttachmentIndex` if both VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` and VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` are non-`NULL`

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-InputAttachmentIndex-09597
  If an input attachment view accessed in a dynamic render pass via a shader object has an `InputAttachmentIndex`, the `InputAttachmentIndex` must match an index in VkRenderingInputAttachmentIndexInfo

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-06537
  Memory backing image subresources used as attachments in the current render pass must not be written in any way other than as an attachment by this command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-10795
  If a color attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_COLOR_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-10796
  If a depth attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_DEPTH_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-10797
  If a stencil attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_STENCIL_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-12338
  If a color attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_COLOR_BIT on that attachment, the color attachment must not be written to by this command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-12339
  If a depth attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_DEPTH_BIT on that attachment, the depth attachment must not be written to by this command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-12340
  If a stencil attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_STENCIL_BIT on that attachment, the stencil attachment must not be written to by this command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-09003
  If an attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, it must not be accessed in any way other than as an attachment, storage image, or sampled image by this command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-06886
  If the current render pass instance uses a depth/stencil attachment with a read-only layout for the depth aspect, depth writes must be disabled

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-06887
  If the current render pass instance uses a depth/stencil attachment with a read-only layout for the stencil aspect, both front and back `writeMask` are not zero, and stencil test is enabled, all stencil ops must be VK_STENCIL_OP_KEEP

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-07831
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT dynamic state enabled then vkCmdSetViewport must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-07832
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SCISSOR dynamic state enabled then vkCmdSetScissor must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-08617
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_WIDTH dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineWidth must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-07834
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BIAS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthBiasEnable` is VK_TRUE, then vkCmdSetDepthBias or vkCmdSetDepthBias2EXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-07835
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_BLEND_CONSTANTS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and an active color attachment current value of `blendEnable` is VK_TRUE with a blend equations where any VkBlendFactor member is VK_BLEND_FACTOR_CONSTANT_COLOR, VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR, VK_BLEND_FACTOR_CONSTANT_ALPHA, or VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA, then vkCmdSetBlendConstants must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-07836
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BOUNDS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthBoundsTestEnable` is VK_TRUE, then vkCmdSetDepthBounds must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-07837
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilCompareMask must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-07838
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_WRITE_MASK dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilWriteMask must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-07839
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_REFERENCE dynamic state enabled, the current value of and `rasterizerDiscardEnable` is VK_FALSE, the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilReference must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-maxMultiviewInstanceIndex-02688
  If the draw is recorded in a render pass instance with multiview enabled, the maximum instance index must be less than or equal to VkPhysicalDeviceMultiviewProperties::`maxMultiviewInstanceIndex`

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-sampleLocationsEnable-02689
  If the bound graphics pipeline was created with VkPipelineSampleLocationsStateCreateInfoEXT::`sampleLocationsEnable` set to VK_TRUE, then the active depth attachment must have been created with the VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit set

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-07634
  If the `VK_EXT_sample_locations` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetSampleLocationsEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-06666
  If the `VK_EXT_sample_locations` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `sampleLocationsEnable` is VK_TRUE, then vkCmdSetSampleLocationsEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-07840
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_CULL_MODE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCullMode must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-07841
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRONT_FACE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetFrontFace must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-07843
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, vkCmdSetDepthTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-07844
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthTestEnable` is VK_TRUE, then vkCmdSetDepthWriteEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-07845
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_COMPARE_OP dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthTestEnable` is VK_TRUE, then vkCmdSetDepthCompareOp must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-07846
  If the `depthBounds` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthBoundsTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-07847
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetStencilTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-07848
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_OP dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilOp must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-viewportCount-03417
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, and the state is not inherited, then vkCmdSetViewportWithCount must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-scissorCount-03418
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT dynamic state enabled, and the state is not inherited, then vkCmdSetScissorWithCount must have been called and not subsequently invalidated in the current command buffer prior to this drawing

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-viewportCount-03419
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with both the VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic states enabled, and the state is not inherited, then the `viewportCount` parameter of `vkCmdSetViewportWithCount` must match the `scissorCount` parameter of `vkCmdSetScissorWithCount`

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-viewportCount-04137
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportWScalingStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-viewportCount-04138
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, the current value of `viewportWScalingEnable` is VK_TRUE, then vkCmdSetViewportWScalingNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-08636
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, the current value of `viewportWScalingEnable` is VK_TRUE, then the `viewportCount` parameter in the last call to vkCmdSetViewportWScalingNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-viewportCount-04139
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportShadingRateImageStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-shadingRateImage-09233
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_COARSE_SAMPLE_ORDER_NV and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoarseSampleOrderNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-shadingRateImage-09234
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `shadingRateImageEnable` is VK_TRUE, then vkCmdSetViewportShadingRatePaletteNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-08637
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `shadingRateImageEnable` is VK_TRUE, then the `viewportCount` parameter in the last call to vkCmdSetViewportShadingRatePaletteNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-VkPipelineVieportCreateInfo-04141
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled and a VkPipelineViewportSwizzleStateCreateInfoNV structure chained from VkPipelineViewportStateCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportSwizzleStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-VkPipelineVieportCreateInfo-04142
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled and a VkPipelineViewportExclusiveScissorStateCreateInfoNV structure chained from VkPipelineViewportStateCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportExclusiveScissorStateCreateInfoNV::`exclusiveScissorCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-07878
  If the `exclusiveScissor` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_ENABLE_NV dynamic state enabled, then vkCmdSetExclusiveScissorEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-07879
  If the `exclusiveScissor` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_NV dynamic state enabled, and the most recent call to vkCmdSetExclusiveScissorEnableNV in the current command buffer set any element of `pExclusiveScissorEnables` to VK_TRUE, then vkCmdSetExclusiveScissorNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-04876
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE dynamic state enabled, then vkCmdSetRasterizerDiscardEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-04877
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthBiasEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-logicOp-04878
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LOGIC_OP_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `logicOpEnable` is VK_TRUE, then vkCmdSetLogicOpEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-primitiveFragmentShadingRateWithMultipleViewports-04552
  If the `primitiveFragmentShadingRateWithMultipleViewports` limit is not supported, the bound graphics pipeline was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, and any of the shader stages of the bound graphics pipeline write to the `PrimitiveShadingRateKHR` built-in, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and the `viewportCount` parameter of `vkCmdSetViewportWithCount` must be `1`

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-primitiveFragmentShadingRateWithMultipleViewports-08642
  If the `primitiveFragmentShadingRateWithMultipleViewports` limit is not supported, and any shader object bound to a graphics stage writes to the `PrimitiveShadingRateKHR` built-in, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and the `viewportCount` parameter of `vkCmdSetViewportWithCount` must be `1`

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-blendEnable-04727
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, then for each color attachment, if the corresponding image view’s format features do not contain VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT, then the corresponding current value of `blendEnable` must be VK_FALSE

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-08644
  If a shader object is bound to any graphics stage or a graphics pipeline is bound, the current value of `rasterizerDiscardEnable` is VK_FALSE, and none of the following is enabled:

  - the `VK_AMD_mixed_attachment_samples` extension

  - the `VK_NV_framebuffer_mixed_samples` extension

  - the `multisampledRenderToSingleSampled` feature

  then the current value of `rasterizationSamples` must be the same as the current color and/or depth/stencil attachments

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-08876
  If a shader object is bound to any graphics stage, the current render pass instance must have been begun with vkCmdBeginRendering

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-imageView-06172
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-imageView-06173
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-imageView-06174
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-imageView-06175
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-imageView-06176
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-imageView-06177
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-viewMask-06178
  If the current render pass instance was begun with vkCmdBeginRendering, the bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::`viewMask` equal to VkRenderingInfo::`viewMask`

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-colorAttachmentCount-06179
  If the `dynamicRenderingUnusedAttachments` feature is not enabled and the current render pass instance was begun with vkCmdBeginRendering, the bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::`colorAttachmentCount` equal to VkRenderingInfo::`colorAttachmentCount`

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-dynamicRenderingUnusedAttachments-08910
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound graphics pipeline

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-dynamicRenderingUnusedAttachments-08912
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` equal to VK_NULL_HANDLE must have the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound pipeline equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-dynamicRenderingUnusedAttachments-08911
  If the `dynamicRenderingUnusedAttachments` feature is enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound graphics pipeline, or the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats`, if it exists, must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-colorAttachmentCount-09362
  If the current render pass instance was begun with vkCmdBeginRendering, with a VkRenderingInfo::`colorAttachmentCount` equal to `1`, there is no shader object bound to any graphics stage, and a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, each element of the VkRenderingInfo::`pColorAttachments` array with a `resolveImageView` not equal to VK_NULL_HANDLE must have been created with an image created with a VkExternalFormatANDROID::`externalFormat` value equal to the VkExternalFormatANDROID::`externalFormat` value used to create the bound graphics pipeline

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-09363
  If there is no shader object bound to any graphics stage, the current render pass instance was begun with vkCmdBeginRendering and a VkRenderingInfo::`colorAttachmentCount` equal to `1`, and a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with an image created with a VkExternalFormatANDROID::`externalFormat` value equal to the VkExternalFormatANDROID::`externalFormat` value used to create the bound graphics pipeline

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-09364
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetColorBlendEnableEXT must have set the blend enable to VK_FALSE prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-09365
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetRasterizationSamplesEXT must have set `rasterizationSamples` to VK_SAMPLE_COUNT_1_BIT prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-09368
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetFragmentShadingRateKHR must have set `pFragmentSize->width` to `1` prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-09369
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetFragmentShadingRateKHR must have set `pFragmentSize->height` to `1` prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-07749
  If the `colorWriteEnable` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorWriteEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-attachmentCount-07750
  If the `colorWriteEnable` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the `attachmentCount` parameter of most recent call to `vkCmdSetColorWriteEnableEXT` in the current command buffer must be greater than or equal to the number of active color attachments

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-07751
  If the `VK_EXT_discard_rectangles` extension is enabled, a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT dynamic state enabled and the `pNext` chain of VkGraphicsPipelineCreateInfo included a VkPipelineDiscardRectangleStateCreateInfoEXT structure, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for each discard rectangle in VkPipelineDiscardRectangleStateCreateInfoEXT::`discardRectangleCount`

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-rasterizerDiscardEnable-09236
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT dynamic state enabled and the `pNext` chain of VkGraphicsPipelineCreateInfo did not include a VkPipelineDiscardRectangleStateCreateInfoEXT structure, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for each discard rectangle in VkPhysicalDeviceDiscardRectanglePropertiesEXT::`maxDiscardRectangles`

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-07880
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDiscardRectangleEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-07881
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_MODE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-dynamicRenderingUnusedAttachments-08913
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->imageView` was VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-dynamicRenderingUnusedAttachments-08914
  If current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-dynamicRenderingUnusedAttachments-08915
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, and the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->imageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-dynamicRenderingUnusedAttachments-08916
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->imageView` was VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-dynamicRenderingUnusedAttachments-08917
  If current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-dynamicRenderingUnusedAttachments-08918
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, and the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->imageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-imageView-06183
  If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentShadingRateAttachmentInfoKHR::`imageView` was not VK_NULL_HANDLE, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-dynamicRenderingLocalRead-11797
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingLocalRead` feature is enabled, the VK_RENDERING_LOCAL_READ_CONCURRENT_ACCESS_CONTROL_BIT_KHR flag is specified, and an attachment is being used as a feedback loop as specified by VK_RENDERING_ATTACHMENT_INPUT_ATTACHMENT_FEEDBACK_BIT_KHR, VkRenderingAttachmentFlagsInfoKHR::`flags` for that attachment must include VK_RENDERING_ATTACHMENT_INPUT_ATTACHMENT_FEEDBACK_BIT_KHR

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-imageView-06184
  If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentDensityMapAttachmentInfoEXT::`imageView` was not VK_NULL_HANDLE, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-layers-10831
  If the current render pass instance was created with VK_RENDERING_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE or VK_RENDER_PASS_CREATE_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE, and the bound graphics pipeline was created with VK_PIPELINE_CREATE_2_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE, then the current render pass instance must have a `layers` value less than or equal to VkPipelineFragmentDensityMapLayeredCreateInfoVALVE::`maxFragmentDensityMapLayers`

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-colorAttachmentCount-06185
  If the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with a sample count equal to the corresponding element of the `pColorAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-pDepthAttachment-06186
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of the `depthStencilAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-pStencilAttachment-06187
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of the `depthStencilAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-multisampledRenderToSingleSampled-07285
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with a sample count equal to the value of `rasterizationSamples` for the bound graphics pipeline

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-multisampledRenderToSingleSampled-07286
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-multisampledRenderToSingleSampled-07287
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-pNext-07935
  If this command is called inside a render pass instance started with vkCmdBeginRendering, and the `pNext` chain of VkRenderingInfo includes a VkMultisampledRenderToSingleSampledInfoEXT structure with `multisampledRenderToSingleSampledEnable` equal to VK_TRUE, then the value of `rasterizationSamples` for the bound graphics pipeline must be equal to VkMultisampledRenderToSingleSampledInfoEXT::`rasterizationSamples`

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-renderPass-06198
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline must have been created with a VkGraphicsPipelineCreateInfo::`renderPass` equal to VK_NULL_HANDLE

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-pColorAttachments-08963
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound with a fragment shader that statically writes to a color attachment, the color write mask is not zero, color writes are enabled, and the corresponding element of the VkRenderingInfo::`pColorAttachments->imageView` was not VK_NULL_HANDLE, then the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-pColorAttachments-11539
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound with a fragment shader that statically writes to a color attachment, the color write mask is not zero, color writes are enabled, and the corresponding element of the VkRenderingInfo::`pColorAttachments->resolveImageView` was not VK_NULL_HANDLE, then the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-pDepthAttachment-08964
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound, depth test is enabled, and the VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, then the VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-pDepthAttachment-11540
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound, depth test is enabled, and the VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, then the VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-pStencilAttachment-08965
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound, stencil test is enabled and the VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, then the VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-pStencilAttachment-11860
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound, stencil test is enabled and the VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, then the VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-flags-10582
  If the current render pass instance was begun with a vkCmdBeginRendering call in `commandBuffer`, its VkRenderingInfo::`flags` parameter must not have VK_RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT set unless VK_RENDERING_CONTENTS_INLINE_BIT_KHR is also set

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-primitivesGeneratedQueryWithRasterizerDiscard-06708
  If the `primitivesGeneratedQueryWithRasterizerDiscard` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, rasterization discard must not be enabled

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-primitivesGeneratedQueryWithNonZeroStreams-06709
  If the `primitivesGeneratedQueryWithNonZeroStreams` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, the bound graphics pipeline must not have been created with a non-zero value in `VkPipelineRasterizationStateStreamCreateInfoEXT`::`rasterizationStream`

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-07620
  If the `depthClamp` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLAMP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthClampEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-07621
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_POLYGON_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetPolygonModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-07622
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetRasterizationSamplesEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-07623
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetSampleMaskEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-alphaToCoverageEnable-08919
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT dynamic state enabled, and `alphaToCoverageEnable` was VK_TRUE in the last call to vkCmdSetAlphaToCoverageEnableEXT, then the Fragment Output Interface must contain a variable for the alpha `Component` word in `Location` 0 at `Index` 0

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-alphaToCoverageEnable-08920
  If a shader object is bound to any graphics stage, and the most recent call to vkCmdSetAlphaToCoverageEnableEXT in the current command buffer set `alphaToCoverageEnable` to VK_TRUE, then the Fragment Output Interface must contain a variable for the alpha `Component` word in `Location` 0 at `Index` 0

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-07624
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAlphaToCoverageEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-07625
  If the `alphaToOne` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ALPHA_TO_ONE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAlphaToOneEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-07626
  If the `logicOp` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LOGIC_OP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetLogicOpEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-07627
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and there are color attachments bound, then vkCmdSetColorBlendEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-07629
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and there are color attachments bound, then vkCmdSetColorWriteMaskEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-07630
  If the `geometryStreams` feature is enabled, and a shader object is bound to the VK_SHADER_STAGE_GEOMETRY_BIT stage or a graphics pipeline is bound which was created with both a VK_SHADER_STAGE_GEOMETRY_BIT stage and the VK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXT dynamic state enabled, then vkCmdSetRasterizationStreamEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-07631
  If the `VK_EXT_conservative_rasterization` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_CONSERVATIVE_RASTERIZATION_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetConservativeRasterizationModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-07632
  If the `VK_EXT_conservative_rasterization` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXTRA_PRIMITIVE_OVERESTIMATION_SIZE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `conservativeRasterizationMode` is VK_CONSERVATIVE_RASTERIZATION_MODE_OVERESTIMATE_EXT, then vkCmdSetExtraPrimitiveOverestimationSizeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-conservativePointAndLineRasterization-07499
  If the `VK_EXT_conservative_rasterization` extension is enabled, `conservativePointAndLineRasterization` is not supported, a shader object is bound to any graphics stage or a graphics pipeline is bound, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line or point topology class, then the current value of `conservativeRasterizationMode` must be VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-07633
  If the `depthClipEnable` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLIP_ENABLE_EXT dynamic state, then vkCmdSetDepthClipEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-07636
  If the `VK_EXT_provoking_vertex` extension is enabled, a shader object is bound to the VK_SHADER_STAGE_VERTEX_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_PROVOKING_VERTEX_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetProvokingVertexModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-08666
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineRasterizationModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-08669
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineStippleEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-07849
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled and a shader object is bound to any graphics stage, or a bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stippledLineEnable` is VK_TRUE, then vkCmdSetLineStipple must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-10608
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic state enabled, the effective rasterization input topology is in the line topology class, and the current `lineRasterizationMode` is VK_LINE_RASTERIZATION_MODE_BRESENHAM or VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH, then the current `alphaToCoverageEnable`, `alphaToOneEnable` and `sampleShadingEnable` states must all be VK_FALSE

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-07639
  If the `depthClipControl` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLIP_NEGATIVE_ONE_TO_ONE_EXT dynamic state enabled, then vkCmdSetDepthClipNegativeOneToOneEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-09650
  If the `depthClampControl` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLAMP_RANGE_EXT dynamic state enabled, and the current value of `depthClampEnable` is VK_TRUE, then vkCmdSetDepthClampRangeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-07640
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_ENABLE_NV dynamic state enabled, then vkCmdSetViewportWScalingEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-07641
  If the `VK_NV_viewport_swizzle` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic state enabled, then vkCmdSetViewportSwizzleNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-07642
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageToColorEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-07643
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_LOCATION_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageToColorEnable` is VK_TRUE, then vkCmdSetCoverageToColorLocationNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-07644
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_MODE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageModulationModeNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-07645
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageModulationMode` is any value other than VK_COVERAGE_MODULATION_MODE_NONE_NV, then vkCmdSetCoverageModulationTableEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-07646
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageModulationTableEnable` is VK_TRUE, then vkCmdSetCoverageModulationTableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-07647
  If the `shadingRateImage` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SHADING_RATE_IMAGE_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetShadingRateImageEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-pipelineFragmentShadingRate-09238
  If the `pipelineFragmentShadingRate` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetFragmentShadingRateKHR must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-07648
  If the `representativeFragmentTest` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_REPRESENTATIVE_FRAGMENT_TEST_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetRepresentativeFragmentTestEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-07649
  If the `coverageReductionMode` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageReductionModeNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-rasterizationSamples-07471
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current subpass does not use any color and/or depth/stencil attachments, then the `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT must follow the rules for a zero-attachment subpass

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-samples-07472
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state disabled, then the `samples` parameter in the last call to vkCmdSetSampleMaskEXT must be greater or equal to the VkPipelineMultisampleStateCreateInfo::`rasterizationSamples` parameter used to create the bound graphics pipeline

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-samples-07473
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT state and VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT states enabled, then the `samples` parameter in the last call to vkCmdSetSampleMaskEXT must be greater or equal to the `rasterizationSamples` parameter in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-09211
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, or a shader object is bound to any graphics stage, and the current render pass instance includes a VkMultisampledRenderToSingleSampledInfoEXT structure with `multisampledRenderToSingleSampledEnable` equal to VK_TRUE, then the `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT must be the same as the `rasterizationSamples` member of that structure

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-firstAttachment-07476
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic states enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the last call to vkCmdSetColorBlendEnableEXT in the current command buffer prior to this drawing command must have set a value for all active color attachments

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-firstAttachment-07478
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT dynamic states enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the last call to vkCmdSetColorWriteMaskEXT in the current command buffer prior to this drawing command must have set a value for all active color attachments

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-advancedBlendMaxColorAttachments-07480
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT and VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic states enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and an active color attachment current value of `blendEnable` is VK_TRUE, then the number of active color attachments must not exceed `advancedBlendMaxColorAttachments`

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-10862
  If a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT , but not the VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorBlendEquationEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-rasterizerDiscardEnable-10863
  If a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT, but not the VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorBlendAdvancedEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-10864
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT and VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then either vkCmdSetColorBlendAdvancedEXT or vkCmdSetColorBlendEquationEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-primitivesGeneratedQueryWithNonZeroStreams-07481
  If the `primitivesGeneratedQueryWithNonZeroStreams` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, and the bound graphics pipeline was created with VK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXT state enabled, the last call to vkCmdSetRasterizationStreamEXT must have set the `rasterizationStream` to zero

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-sampleLocationsPerPixel-07482
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state disabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then the `sampleLocationsPerPixel` member of `pSampleLocationsInfo` in the last call to vkCmdSetSampleLocationsEXT must equal the `rasterizationSamples` member of the VkPipelineMultisampleStateCreateInfo structure the bound graphics pipeline has been created with

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-sampleLocationsPerPixel-07483
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then the `sampleLocationsPerPixel` member of `pSampleLocationsInfo` in the last call to vkCmdSetSampleLocationsEXT must equal the `rasterizationSamples` parameter of the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-sampleLocationsEnable-07484
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT then the current active depth attachment must have been created with the VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit set

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-sampleLocationsEnable-07485
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, then the `sampleLocationsInfo.maxSampleLocationGridSize.width` in the last call to vkCmdSetSampleLocationsEXT must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.width` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling `rasterizationSamples`

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-sampleLocationsEnable-07486
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, then the `sampleLocationsInfo.maxSampleLocationGridSize.height` in the last call to vkCmdSetSampleLocationsEXT must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.height` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling `rasterizationSamples`

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-sampleLocationsEnable-07487
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, the fragment shader code must not statically use the extended instruction `InterpolateAtSample`

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-sampleLocationsEnable-07936
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationGridSize.width` must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.width` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling the value of `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-sampleLocationsEnable-07937
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationGridSize.height` must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.height` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling the value of `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-sampleLocationsEnable-07938
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationsPerPixel` must equal `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-coverageModulationTableEnable-07488
  If a shader object is bound to any graphics stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NV state enabled, and the last call to vkCmdSetCoverageModulationTableEnableNV set `coverageModulationTableEnable` to VK_TRUE, then the `coverageModulationTableCount` parameter in the last call to vkCmdSetCoverageModulationTableNV must equal the current `rasterizationSamples` divided by the number of color samples in the current active color attachment

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-rasterizationSamples-07489
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, and if current subpass has a depth/stencil attachment and depth test, stencil test, or depth bounds test are enabled in the bound pipeline, then the current `rasterizationSamples` must be the same as the sample count of the depth/stencil attachment

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-coverageToColorEnable-07490
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV state enabled and the last call to vkCmdSetCoverageToColorEnableNV set the `coverageToColorEnable` to VK_TRUE, then there must be an active color attachment at the location selected by the last call to vkCmdSetCoverageToColorLocationNV `coverageToColorLocation`, with a VkFormat of VK_FORMAT_R8_UINT, VK_FORMAT_R8_SINT, VK_FORMAT_R16_UINT, VK_FORMAT_R16_SINT, VK_FORMAT_R32_UINT, or VK_FORMAT_R32_SINT

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-rasterizerDiscardEnable-09420
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, and a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, and the most recent call to vkCmdSetRasterizerDiscardEnable in the current command buffer set `rasterizerDiscardEnable` to VK_FALSE, and the last call to vkCmdSetCoverageToColorEnableNV set the `coverageToColorEnable` to VK_TRUE, then there must be an active color attachment at the location selected by the last call to vkCmdSetCoverageToColorLocationNV `coverageToColorLocation`, with a VkFormat of VK_FORMAT_R8_UINT, VK_FORMAT_R8_SINT, VK_FORMAT_R16_UINT, VK_FORMAT_R16_SINT, VK_FORMAT_R32_UINT, or VK_FORMAT_R32_SINT

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-coverageReductionMode-07491
  If the `coverageReductionMode` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV or VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic states enabled, then the current values of `coverageReductionMode`, `rasterizationSamples`, the sample counts for the color and depth/stencil attachments (if the subpass has them) must be a valid combination returned by vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-viewportCount-07492
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportSwizzleStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-viewportCount-07493
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic states enabled then the `viewportCount` parameter in the last call to vkCmdSetViewportSwizzleNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-viewportCount-09421
  If the `VK_NV_viewport_swizzle` extension is enabled, and a shader object is bound to any graphics stage, then the `viewportCount` parameter in the last call to vkCmdSetViewportSwizzleNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-rasterizationSamples-07494
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, and the `coverageReductionMode` feature is not enabled, or the current value of `coverageReductionMode` is not VK_COVERAGE_REDUCTION_MODE_TRUNCATE_NV, and the current value of `rasterizationSamples` is greater than sample count of the color attachment, then sample shading must be disabled

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-stippledLineEnable-07495
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_RECTANGULAR, then the `stippledRectangularLines` feature must be enabled

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-stippledLineEnable-07496
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_BRESENHAM, then the `stippledBresenhamLines` feature must be enabled

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-stippledLineEnable-07497
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH, then the `stippledSmoothLines` feature must be enabled

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-stippledLineEnable-07498
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_DEFAULT, then the `stippledRectangularLines` feature must be enabled and VkPhysicalDeviceLimits::`strictLines` must be VK_TRUE

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-stage-07073
  If the bound pipeline was created with the VkPipelineShaderStageCreateInfo::`stage` member of an element of VkGraphicsPipelineCreateInfo::`pStages` set to VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT, then Mesh Shader Queries must not be active

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-08877
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ATTACHMENT_FEEDBACK_LOOP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAttachmentFeedbackLoopEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-07850
  If dynamic state was inherited from VkCommandBufferInheritanceViewportScissorInfoNV, it must be set in the current command buffer prior to this drawing command

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-nextStage-10745
  For each shader object bound to a graphics stage, except for shader object bound to the last graphics stage in the logical pipeline, it must have been created with a `nextStage` including the corresponding bit to the shader object bound to the following graphics stage in the logical pipeline

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-08684
  If there is no bound graphics pipeline, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_VERTEX_BIT

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-08685
  If there is no bound graphics pipeline, and the `tessellationShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-08686
  If there is no bound graphics pipeline, and the `tessellationShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-08687
  If there is no bound graphics pipeline, and the `geometryShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_GEOMETRY_BIT

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-08688
  If there is no bound graphics pipeline, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_FRAGMENT_BIT

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-08689
  If there is no bound graphics pipeline, and the `taskShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TASK_BIT_EXT

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-08690
  If there is no bound graphics pipeline, and the `meshShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-08693
  If there is no bound graphics pipeline, and at least one of the `taskShader` and `meshShader` features is enabled, one of the VK_SHADER_STAGE_VERTEX_BIT or VK_SHADER_STAGE_MESH_BIT_EXT stages must have a valid `VkShaderEXT` bound, and the other must have no `VkShaderEXT` bound

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-08696
  If there is no bound graphics pipeline, and a valid `VkShaderEXT` is bound to the VK_SHADER_STAGE_VERTEX_BIT stage, there must be no `VkShaderEXT` bound to either the VK_SHADER_STAGE_TASK_BIT_EXT stage or the VK_SHADER_STAGE_MESH_BIT_EXT stage

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-08698
  If any graphics shader is bound which was created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag, then all shaders created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag in the same vkCreateShadersEXT call must also be bound

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-08699
  If any graphics shader is bound which was created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag, any stages in between stages whose shaders which did not create a shader with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag as part of the same vkCreateShadersEXT call must not have any `VkShaderEXT` bound

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-08878
  All bound graphics shader objects must have been created with identical or identically defined push constant ranges

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-08879
  All bound graphics shader objects must have either been created with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag set, or with identical or identically defined arrays of descriptor set layouts

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-colorAttachmentCount-09372
  If the current render pass instance was begun with vkCmdBeginRendering and a VkRenderingInfo::`colorAttachmentCount` equal to `1`, a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, and a fragment shader is bound, it must not declare the `DepthReplacing` or `StencilRefReplacingEXT` execution modes

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-pDynamicStates-08715
  If the bound graphics pipeline state includes a fragment shader stage, was created with VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`, and the fragment shader declares the `EarlyFragmentTests` execution mode and uses `OpDepthAttachmentReadEXT`, the `depthWriteEnable` parameter in the last call to vkCmdSetDepthWriteEnable must be VK_FALSE

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-pDynamicStates-08716
  If the bound graphics pipeline state includes a fragment shader stage, was created with VK_DYNAMIC_STATE_STENCIL_WRITE_MASK set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`, and the fragment shader declares the `EarlyFragmentTests` execution mode and uses `OpStencilAttachmentReadEXT`, the `writeMask` parameter in the last call to vkCmdSetStencilWriteMask must be `0`

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-09116
  If a shader object is bound to any graphics stage or the bound graphics pipeline was created with VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT, and the format of any color attachment is VK_FORMAT_E5B9G9R9_UFLOAT_PACK32, the corresponding element of the `pColorWriteMasks` parameter of vkCmdSetColorWriteMaskEXT must either include all of VK_COLOR_COMPONENT_R_BIT, VK_COLOR_COMPONENT_G_BIT, VK_COLOR_COMPONENT_B_BIT, and VK_COLOR_COMPONENT_A_BIT, or none of them

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-maxFragmentDualSrcAttachments-09239
  If blending is enabled for any attachment where either the source or destination blend factors for that attachment use the secondary color input, the maximum value of `Location` for any output attachment statically used in the `Fragment` `Execution` `Model` executed by this command must be less than `maxFragmentDualSrcAttachments`

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-09548
  If the current render pass was begun with vkCmdBeginRendering, there is no shader object bound to any graphics stage, the value of each element of VkRenderingAttachmentLocationInfo::`pColorAttachmentLocations` in the bound pipeline must match the value for the corresponding locations set currently in the current render pass instance

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-09549
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of each element of VkRenderingInputAttachmentIndexInfo::`pColorAttachmentInputIndices` in the bound pipeline must match the value for the corresponding index set currently in the current render pass instance

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-10927
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` in the bound pipeline must match the value set currently in the current render pass instance

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-10928
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` in the bound pipeline must match the value set currently in the current render pass instance

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-09642
  If the current render pass was begun with vkCmdBeginRendering with the VK_RENDERING_ENABLE_LEGACY_DITHERING_BIT_EXT flag, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_2_ENABLE_LEGACY_DITHERING_BIT_EXT

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-09643
  If the bound graphics pipeline was created with VK_PIPELINE_CREATE_2_ENABLE_LEGACY_DITHERING_BIT_EXT, the current render pass must have begun with vkCmdBeginRendering with the VK_RENDERING_ENABLE_LEGACY_DITHERING_BIT_EXT flag

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-10677
  If the per-tile execution model is enabled, the tileShadingPerTileDraw feature must be enabled

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-10772
  If a shader object is bound to any graphics stage, multiview functionality must not be enabled in the current render pass

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-multiviewPerViewViewports-12262
  If the `multiviewPerViewViewports` feature is enabled, then the index of the most significant bit in current render pass instance `viewMask` must be less than the current value of `viewportCount`

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-multiviewPerViewViewports-12263
  If the `multiviewPerViewViewports` feature is enabled, then the index of the most significant bit in current render pass instance `viewMask` must be less than the current value of `scissorCount`

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-flags-11521
  If current render pass instance was begun with vkCmdBeginRendering with VkRenderingInfo::`flags` which includes VK_RENDERING_FRAGMENT_REGION_BIT_EXT, and if sample shading is enabled (explicitly or implicitly), then the minimum fraction for sample shading must equal 0.0

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-11522
  If the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, and the `dynamicRenderingUnusedAttachments` feature is not enabled, the graphics pipeline bound must have been created with a VkCustomResolveCreateInfoEXT

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-11523
  If the current render pass instance was begun with vkCmdBeginRendering and does not contain a custom resolve, and the `dynamicRenderingUnusedAttachments` feature is not enabled, the graphics pipeline bound must not have been created with a VkCustomResolveCreateInfoEXT

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-customResolve-11524
  If the current render pass instance was begun with vkCmdBeginRendering and vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, the graphics pipeline bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_TRUE

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-customResolve-11525
  If the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, and vkCmdBeginCustomResolveEXT has not been recorded in the render pass instance, the graphics pipeline bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_FALSE

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-11861
  If the `dynamicRenderingUnusedAttachments` feature is not enabled and the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, the bound graphics pipeline must have been created with a VkCustomResolveCreateInfoEXT::`colorAttachmentCount` equal to VkRenderingInfo::`colorAttachmentCount`

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-11862
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound graphics pipeline

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-11863
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` equal to VK_NULL_HANDLE must have the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound pipeline equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-dynamicRenderingUnusedAttachments-11864
  If the `dynamicRenderingUnusedAttachments` feature is enabled, the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound graphics pipeline, or the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats`, if it exists, must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-11865
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-11866
  If current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-dynamicRenderingUnusedAttachments-11867
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, and the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-11868
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->resolveImageView` was VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-11869
  If current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-dynamicRenderingUnusedAttachments-11870
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, and the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-colorAttachmentCount-11871
  If the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0` and vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, then for each element of the VkRenderingInfo::`pColorAttachments` array with a `resolveImageView` not equal to VK_NULL_HANDLE, the `resolveImageView` must have been created with a sample count equal to the value of `rasterizationSamples` for the bound graphics pipeline

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-pDepthAttachment-11872
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-pStencilAttachment-11873
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-customResolve-11529
  If a shader object is bound to the fragment stage, the current render pass instance was begun with vkCmdBeginRendering, a fragment density map attachment is active, and vkCmdBeginCustomResolveEXT has been called, then the fragment shader object bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_TRUE

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-customResolve-11530
  If a shader object is bound to the fragment stage, the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, a fragment density map attachment is active, and vkCmdBeginCustomResolveEXT has not yet been called, then the fragment shader object bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_FALSE

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-flags-13361
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, then all bound shader objects must have been created with the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-flags-13362
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, then the pipeline layout of the bound descriptor sets must have been created with VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT set

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-flags-13363
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, and any of the descriptor set layouts used to create the pipeline layout of the bound descriptor sets were created with any binding’s VkDescriptorSetLayoutBinding::`stageFlags` set with VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT, then there must be no binding with VkDescriptorSetLayoutBinding::`stageFlags` set with VK_SHADER_STAGE_TASK_BIT_EXT or VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-flags-13364
  If there are any shader objects bound that were created with `flags` that includes both the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR and VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT bits, the pipeline layout of the bound descriptor sets must have been created with VK_PIPELINE_LAYOUT_CREATE_NO_TASK_SHADER_BIT_KHR set

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-flags-13365
  If there are any shader objects bound that were created with `flags` that includes both the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR and VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT bits, there must be no shader object bound to the VK_SHADER_STAGE_TASK_BIT_EXT stage

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-stage-06480
  The bound graphics pipeline must not have been created with the VkPipelineShaderStageCreateInfo::`stage` member of any element of VkGraphicsPipelineCreateInfo::`pStages` set to VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-pStages-10680
  If there is no bound graphics pipeline, `vkCmdBindShadersEXT` must not have last bound the `pStages` element of VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT with a valid shader object other than VK_NULL_HANDLE

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-07074
  Transform Feedback Queries must not be active

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-07075
  Primitives Generated Queries must not be active

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-pipelineStatistics-07076
  The `pipelineStatistics` member used to create any active Pipeline Statistics Query must not contain VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT, VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT, VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT, VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT, VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT, VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT, VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT, VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT, or VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-08694
  If there is no bound graphics pipeline, and both the `taskShader` and `meshShader` features are enabled, and a valid `VkShaderEXT` is bound the to the VK_SHADER_STAGE_MESH_BIT_EXT stage, and that `VkShaderEXT` was created without the VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT flag, a valid `VkShaderEXT` must be bound to the VK_SHADER_STAGE_TASK_BIT_EXT stage

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-08695
  If there is no bound graphics pipeline, and both the `taskShader` and `meshShader` features are enabled, and a valid `VkShaderEXT` is bound the to the VK_SHADER_STAGE_MESH_BIT_EXT stage, and that `VkShaderEXT` was created with the VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT flag, there must be no `VkShaderEXT` bound to the VK_SHADER_STAGE_TASK_BIT_EXT stage

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-buffer-02708
  If `buffer` is non-sparse then it must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-buffer-02709
  `buffer` must have been created with the VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT usage flag set

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-offset-02710
  `offset` must be a multiple of `4`

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-commandBuffer-02711
  `commandBuffer` must not be a protected command buffer

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-countBuffer-02714
  If `countBuffer` is non-sparse then it must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-countBuffer-02715
  `countBuffer` must have been created with the VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT usage flag set

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-countBufferOffset-02716
  `countBufferOffset` must be a multiple of `4`

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-countBuffer-02717
  The count stored in `countBuffer` must be less than or equal to `VkPhysicalDeviceLimits`::`maxDrawIndirectCount`

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-countBufferOffset-04129
  (`countBufferOffset` + `sizeof`(uint32_t)) must be less than or equal to the size of `countBuffer`

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-04445
  If the `drawIndirectCount` feature is not enabled this function must not be used

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-stride-07096
  `stride` must be a multiple of `4` and must be greater than or equal to `sizeof`(`VkDrawMeshTasksIndirectCommandEXT`)

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-maxDrawCount-07097
  If `maxDrawCount` is greater than or equal to `1`, (`stride` × (`maxDrawCount` - 1) + `offset` + `sizeof`(`VkDrawMeshTasksIndirectCommandEXT`)) must be less than or equal to the size of `buffer`

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-MeshEXT-07100
  The current pipeline bound to VK_PIPELINE_BIND_POINT_GRAPHICS must contain a shader stage using the `MeshEXT` `Execution` `Model`

Valid Usage (Implicit)

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-buffer-parameter
  `buffer` must be a valid VkBuffer handle

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-countBuffer-parameter
  `countBuffer` must be a valid VkBuffer handle

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-renderpass
  This command must only be called inside of a render pass instance

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdDrawMeshTasksIndirectCountEXT-commonparent
  Each of `buffer`, `commandBuffer`, and `countBuffer` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Inside | Outside | VK_QUEUE_GRAPHICS_BIT | Action

Conditional Rendering

vkCmdDrawMeshTasksIndirectCountEXT is affected by conditional rendering

### 27.7. Programmable Cluster Culling Shading

In this drawing approach, cluster are generated by the cluster culling shader stage. It operates similarly to dispatching compute as the shaders make use of workgroups.

To record a cluster culling shader drawing command, call:

    // Provided by VK_HUAWEI_cluster_culling_shader
    void vkCmdDrawClusterHUAWEI(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    groupCountX,
        uint32_t                                    groupCountY,
        uint32_t                                    groupCountZ);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `groupCountX` is the number of local workgroups to dispatch in the X dimension.

- `groupCountY` is the number of local workgroups to dispatch in the Y dimension.

- `groupCountZ` is the number of local workgroups to dispatch in the Z dimension.

When the command is executed,a global workgroup consisting of groupCountX*groupCountY*groupCountZ local workgroup is assembled. Note that the cluster culling shader pipeline only accepts `vkCmdDrawClusterHUAWEI` and vkCmdDrawClusterIndirectHUAWEI as drawing commands.

Valid Usage

- VUID-vkCmdDrawClusterHUAWEI-magFilter-04553
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdDrawClusterHUAWEI-magFilter-09598
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdDrawClusterHUAWEI-mipmapMode-04770
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdDrawClusterHUAWEI-mipmapMode-09599
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdDrawClusterHUAWEI-unnormalizedCoordinates-09635
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `levelCount` and `layerCount` must be 1

- VUID-vkCmdDrawClusterHUAWEI-None-08609
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `viewType` must be VK_IMAGE_VIEW_TYPE_1D or VK_IMAGE_VIEW_TYPE_2D

- VUID-vkCmdDrawClusterHUAWEI-None-08610
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions with `ImplicitLod`, `Dref` or `Proj` in their name

- VUID-vkCmdDrawClusterHUAWEI-None-08611
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions that includes a LOD bias or any offset values

- VUID-vkCmdDrawClusterHUAWEI-None-06479
  If a VkImageView is sampled with depth comparison, the image view’s format features must contain VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT

- VUID-vkCmdDrawClusterHUAWEI-None-02691
  If a VkImageView is accessed using atomic operations as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT

- VUID-vkCmdDrawClusterHUAWEI-None-07888
  If a VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER descriptor is accessed using atomic operations as a result of this command, then the storage texel buffer’s format features must contain VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT

- VUID-vkCmdDrawClusterHUAWEI-None-02692
  If a VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT

- VUID-vkCmdDrawClusterHUAWEI-None-02693
  If the VK_EXT_filter_cubic extension is not enabled and any VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, it must not have a VkImageViewType of VK_IMAGE_VIEW_TYPE_3D, VK_IMAGE_VIEW_TYPE_CUBE, or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY

- VUID-vkCmdDrawClusterHUAWEI-filterCubic-02694
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have a VkImageViewType and format that supports cubic filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubic` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdDrawClusterHUAWEI-filterCubicMinmax-02695
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX as a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubicMinmax` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdDrawClusterHUAWEI-cubicRangeClamp-09212
  If the `cubicRangeClamp` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must not have a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM

- VUID-vkCmdDrawClusterHUAWEI-reductionMode-09213
  Any VkImageView being sampled with a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM as a result of this command must sample with VK_FILTER_CUBIC_EXT

- VUID-vkCmdDrawClusterHUAWEI-selectableCubicWeights-09214
  If the `selectableCubicWeights` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have VkSamplerCubicWeightsCreateInfoQCOM::`cubicWeights` equal to VK_CUBIC_FILTER_WEIGHTS_CATMULL_ROM_QCOM

- VUID-vkCmdDrawClusterHUAWEI-flags-02696
  Any VkImage created with a VkImageCreateInfo::`flags` containing VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV sampled as a result of this command must only be sampled using a VkSamplerAddressMode of VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawClusterHUAWEI-OpTypeImage-07027
  For any VkImageView being written as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawClusterHUAWEI-OpTypeImage-07028
  For any VkImageView being read as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawClusterHUAWEI-OpTypeImage-07029
  For any VkBufferView being written as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown`, the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawClusterHUAWEI-OpTypeImage-07030
  Any VkBufferView being read as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown` then the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawClusterHUAWEI-None-08600
  If a a bound shader was created with a pipeline layout and statically uses a set n, a descriptor set must have been bound to n at the same pipeline bind point, with layouts compatible for set n with the layout(s) used to create the shader, as described in Pipeline Layout Compatibility

- VUID-vkCmdDrawClusterHUAWEI-None-08601
  If a a bound shader was created with a pipeline layout or specified push constant ranges and statically uses a push constant value, that value must have been set for the same pipeline bind point, with push constant ranges that are compatible with the push constant range used to create the shader

- VUID-vkCmdDrawClusterHUAWEI-None-10068
  For each array of resources that is used by a bound shader, the indices used to access members of the array must be less than the descriptor count for the identified binding in the descriptor sets used by this command

- VUID-vkCmdDrawClusterHUAWEI-None-08114
  Descriptors in each bound descriptor set, specified via vkCmdBindDescriptorSets, must be valid if they are accessed as described by descriptor validity by the VkPipeline bound to the pipeline bind point used by this command and the bound VkPipeline was not created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawClusterHUAWEI-imageLayout-00344
  If an image descriptor is accessed by a shader, the VkImageLayout must match the subresource accessible from the VkImageView as defined by the image layout matching rules

- VUID-vkCmdDrawClusterHUAWEI-None-08115
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdBindDescriptorSets, the bound VkPipeline must have been created without VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawClusterHUAWEI-None-08116
  Descriptors in bound descriptor buffers, specified via vkCmdSetDescriptorBufferOffsetsEXT, must be valid if they are dynamically accessed

- VUID-vkCmdDrawClusterHUAWEI-None-08117
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdSetDescriptorBufferOffsetsEXT, the bound VkPipeline must have been created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawClusterHUAWEI-None-08119
  If a descriptor is dynamically used with a VkPipeline created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdDrawClusterHUAWEI-None-08605
  If a descriptor is dynamically used with a VkShaderEXT created with a `VkDescriptorSetLayout` that was created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdDrawClusterHUAWEI-None-08606
  If the `shaderObject` feature is not enabled, a valid pipeline must be bound to the pipeline bind point used by this command

- VUID-vkCmdDrawClusterHUAWEI-None-08608
  If a pipeline is bound to the pipeline bind point used by this command, there must not have been any calls to dynamic state setting commands for any state specified statically in the VkPipeline object bound to the pipeline bind point used by this command, since that pipeline was bound

- VUID-vkCmdDrawClusterHUAWEI-uniformBuffers-06935
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawClusterHUAWEI-None-08612
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawClusterHUAWEI-storageBuffers-06936
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawClusterHUAWEI-None-08613
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a storage buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawClusterHUAWEI-commandBuffer-02707
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, any resource accessed by bound shaders must not be a protected resource

- VUID-vkCmdDrawClusterHUAWEI-viewType-07752
  If a VkImageView is accessed as a result of this command, then the image view’s `viewType` must match the `Dim` operand of the `OpTypeImage` as described in Compatibility Between SPIR-V Image Dimensions and Vulkan ImageView Types

- VUID-vkCmdDrawClusterHUAWEI-format-07753
  If a VkImageView or VkBufferView is accessed as a result of this command, then the numeric type of the view’s `format` and the `Sampled` `Type` operand of the `OpTypeImage` must match

- VUID-vkCmdDrawClusterHUAWEI-OpImageWrite-08795
  If a VkImageView created with a format other than VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the image view’s format

- VUID-vkCmdDrawClusterHUAWEI-OpImageWrite-08796
  If a VkImageView created with the format VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have four components

- VUID-vkCmdDrawClusterHUAWEI-OpImageWrite-04469
  If a VkBufferView is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the buffer view’s format

- VUID-vkCmdDrawClusterHUAWEI-SampledType-04470
  If a VkImageView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdDrawClusterHUAWEI-SampledType-04471
  If a VkImageView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdDrawClusterHUAWEI-SampledType-04472
  If a VkBufferView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdDrawClusterHUAWEI-SampledType-04473
  If a VkBufferView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdDrawClusterHUAWEI-sparseImageInt64Atomics-04474
  If the `sparseImageInt64Atomics` feature is not enabled, VkImage objects created with the VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdDrawClusterHUAWEI-sparseImageInt64Atomics-04475
  If the `sparseImageInt64Atomics` feature is not enabled, VkBuffer objects created with the VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdDrawClusterHUAWEI-OpImageSampleWeightedQCOM-06971
  If `OpImageSampleWeightedQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_SAMPLED_IMAGE_BIT_QCOM

- VUID-vkCmdDrawClusterHUAWEI-OpImageSampleWeightedQCOM-06972
  If `OpImageSampleWeightedQCOM` uses a VkImageView as a sample weight image as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_IMAGE_BIT_QCOM

- VUID-vkCmdDrawClusterHUAWEI-OpImageBoxFilterQCOM-06973
  If `OpImageBoxFilterQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BOX_FILTER_SAMPLED_BIT_QCOM

- VUID-vkCmdDrawClusterHUAWEI-OpImageBlockMatchSSDQCOM-06974
  If `OpImageBlockMatchSSDQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdDrawClusterHUAWEI-OpImageBlockMatchSADQCOM-12420
  If `OpImageBlockMatchSADQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdDrawClusterHUAWEI-OpImageBlockMatchSADQCOM-06976
  If `OpImageBlockMatchSADQCOM` or OpImageBlockMatchSSDQCOM is used to read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdDrawClusterHUAWEI-OpImageSampleWeightedQCOM-06977
  If `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdDrawClusterHUAWEI-OpImageSampleWeightedQCOM-06978
  If any command other than `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must not have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdDrawClusterHUAWEI-OpImageBlockMatchWindow-09215
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM

- VUID-vkCmdDrawClusterHUAWEI-OpImageBlockMatchWindow-09216
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format must be a single-component format

- VUID-vkCmdDrawClusterHUAWEI-OpImageBlockMatchWindow-09217
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdDrawClusterHUAWEI-OpImageBlockMatchWindow-12421
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the `blockMatchExtendedClampToEdge` feature is not enabled, the input sampler must not have been created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawClusterHUAWEI-addressModeU-12422
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the input sampler was created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, then the sampler must have been created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawClusterHUAWEI-None-07288
  Any shader invocation executed by this command must terminate

- VUID-vkCmdDrawClusterHUAWEI-None-09600
  If a descriptor with type equal to any of VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, or VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT is accessed as a result of this command, all image subresources identified by that descriptor must be in the image layout identified when the descriptor was written

- VUID-vkCmdDrawClusterHUAWEI-micromap-11636
  If an acceleration structure is accessed as a result of this command through an `OpRayQueryProceedKHR` operation , the `VK_EXT_opacity_micromap` extension is not enabled, and the acceleration structure is built using geometry with a VkAccelerationStructureTrianglesOpacityMicromapKHR structure included in its `pNext` chain, the shader must have specified a `OpacityMicromapIdKHR` execution mode with its specialization constant operand equal to VK_TRUE

- VUID-vkCmdDrawClusterHUAWEI-micromap-11637
  If an acceleration structure is accessed as a result of this command and the acceleration structure was constructed through deserialization, all micromap arrays referenced by the acceleration structure that were not replaced by an acceleration structure update command must have been deserialized using the serialized data of the corresponding micromaps used to originally build the acceleration structure prior to the execution of this command on the device

- VUID-vkCmdDrawClusterHUAWEI-micromap-11638
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkPipeline bound to the pipeline bind point used by this command must not have been created with `flags` that includes VK_PIPELINE_CREATE_2_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_KHR

- VUID-vkCmdDrawClusterHUAWEI-micromap-11639
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkShaderEXT that accessed the descriptor must not have been created with `flags` that includes VK_SHADER_CREATE_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_EXT

- VUID-vkCmdDrawClusterHUAWEI-commandBuffer-10746
  The `VkDeviceMemory` object allocated from a `VkMemoryHeap` with the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property that is bound to a resource accessed as a result of this command must be the active bound tile memory object in `commandBuffer`

- VUID-vkCmdDrawClusterHUAWEI-None-10678
  If this command is recorded inside a tile shading render pass instance, the stages corresponding to the pipeline bind point used by this command must only include VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_FRAGMENT_BIT, and/or VK_SHADER_STAGE_COMPUTE_BIT

- VUID-vkCmdDrawClusterHUAWEI-None-10679
  If this command is recorded where per-tile execution model is enabled, there must be no access to any image while the image was be transitioned to the VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT layout

- VUID-vkCmdDrawClusterHUAWEI-pDescription-09900
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the underlying VkTensorARM object must have been created with the VK_TENSOR_USAGE_SHADER_BIT_ARM usage flag set

- VUID-vkCmdDrawClusterHUAWEI-dimensionCount-09905
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the `Rank` of the `OpTypeTensorARM` of the tensor resource variable must be equal to the `dimensionCount` provided via VkTensorCreateInfoARM::`pDescription` when creating the underlying VkTensorARM object

- VUID-vkCmdDrawClusterHUAWEI-OpTypeTensorARM-09906
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the element type of the `OpTypeTensorARM` of the tensor resource variable must be compatible with the VkFormat of the VkTensorViewARM used for the access

- VUID-vkCmdDrawClusterHUAWEI-OpTensorReadARM-12462
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, using `OpTensorReadARM` or `OpTensorWriteARM`, and the underlying VkTensorARM object was created with a VK_TENSOR_TILING_BRICK_16_WIDE_ARM, VK_TENSOR_TILING_BRICK_8_WIDE_ARM, VK_TENSOR_TILING_BRICK_4_WIDE_ARM, VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_ARM, or VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_64K_ARM VkTensorTilingARM, and the object read or written is an array, then the innermost coordinate provided to `OpTensorReadARM` or `OpTensorWriteARM` via the `Coordinates` operand must be a multiple of the largest power of 2 that is less than or equal to the number of components of the array

- VUID-vkCmdDrawClusterHUAWEI-pNext-12463
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command and the corresponding VkTensorARM object was created with a VkTensorRollingBackingCreateInfoARM structure in the `pNext` chain of VkTensorCreateInfoARM, then the number of elements accessed with one `OpTensorReadARM` or `OpTensorWriteARM`, must be less than or equal to the number of elements available from the starting coordinate in the rolling backing along the innermost dimension, defined as `wraps`[`dimensionCount` - 1] - InnermostCoordinate % `wraps`[`dimensionCount` - 1] where InnermostCoordinate is the last component of the coordinates array provided via the `Coordinates` operand

- VUID-vkCmdDrawClusterHUAWEI-None-12472
  Descriptors dynamically accessed in bound descriptor heaps must be valid

- VUID-vkCmdDrawClusterHUAWEI-None-11297
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a `OpTypeStruct` decorated with `Block` or `BufferBlock` using that mapping, the calculated offset for the resource heap must be a multiple of `bufferDescriptorAlignment`

- VUID-vkCmdDrawClusterHUAWEI-None-11298
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeImage` or `OpTypeSampledImage` using that mapping, the calculated offset for the resource heap must be a multiple of `imageDescriptorAlignment`

- VUID-vkCmdDrawClusterHUAWEI-None-11299
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeSampler` or `OpTypeSampledImage` using that mapping, the calculated offset for the sampler heap must be a multiple of `samplerDescriptorAlignment`

- VUID-vkCmdDrawClusterHUAWEI-None-11397
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeTensorARM` using that mapping, the calculated offset for the resource heap must be a multiple of `tensorDescriptorAlignment`

- VUID-vkCmdDrawClusterHUAWEI-None-11300
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 4

- VUID-vkCmdDrawClusterHUAWEI-None-11301
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdDrawClusterHUAWEI-None-11302
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress

- VUID-vkCmdDrawClusterHUAWEI-None-11304
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 8

- VUID-vkCmdDrawClusterHUAWEI-None-11305
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdDrawClusterHUAWEI-None-11306
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address pointed to by the address in push data must be a valid VkDeviceAddress

- VUID-vkCmdDrawClusterHUAWEI-None-11308
  For each descriptor heap that is statically used by a bound shader, either directly or via a descriptor mapping, a valid descriptor heap must be bound

- VUID-vkCmdDrawClusterHUAWEI-None-11309
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, execution of this command must not result in any descriptor read accessing data outside of the user range of the respective heap bound by `vkCmdBind*HeapEXT` commands

- VUID-vkCmdDrawClusterHUAWEI-None-11372
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer or uniform texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified via VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawClusterHUAWEI-None-11373
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer or storage texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawClusterHUAWEI-None-11374
  If the `robustBufferAccess2` feature is not enabled, the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, uniform texel buffer, storage buffer, or storage texel buffer, that shader must not access values outside of the range of the buffer as specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawClusterHUAWEI-pBindInfo-11375
  If any bound shader uses an embedded sampler via a descriptor mapping, the value of `pBindInfo->reservedRangeSize` set for vkCmdBindSamplerHeapEXT must be greater than or equal to `minSamplerHeapReservedRangeWithEmbedded`

- VUID-vkCmdDrawClusterHUAWEI-None-11376
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, and that shader statically uses a push constant value, that value must have been set by vkCmdPushDataEXT

- VUID-vkCmdDrawClusterHUAWEI-None-11398
  If a bound shader was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the access must not be out of bounds

- VUID-vkCmdDrawClusterHUAWEI-None-11437
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the buffer from which the address in push data was queried must have been created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdDrawClusterHUAWEI-None-11438
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdDrawClusterHUAWEI-None-11441
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must be aligned to `minUniformBufferOffsetAlignment`

- VUID-vkCmdDrawClusterHUAWEI-None-11439
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_STORAGE_BUFFER_BIT usage flag set

- VUID-vkCmdDrawClusterHUAWEI-None-11442
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must be aligned to `minStorageBufferOffsetAlignment`

- VUID-vkCmdDrawClusterHUAWEI-None-11485
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses an acceleration structure using that mapping, the address that the acceleration structure is mapped to must be an acceleration structure address retrieved from a VkAccelerationStructureKHR object via vkGetAccelerationStructureDeviceAddressKHR or handle retrieved from a VkAccelerationStructureNV object via vkGetAccelerationStructureHandleNV

- VUID-vkCmdDrawClusterHUAWEI-index-11450
  If a shader uses a sampler descriptor to sample an image as a result of this command, and that sampler descriptor uses a custom border color with an index defined by VkSamplerCustomBorderColorIndexCreateInfoEXT, the value of VkSamplerCustomBorderColorIndexCreateInfoEXT::`index` must have been registered before this command was recorded, and still be registered during the sampling operation, with an identically defined color

- VUID-vkCmdDrawClusterHUAWEI-protectedNoFault-11455
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, the address that the resource is mapped to must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdDrawClusterHUAWEI-protectedNoFault-11456
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, the address of the indirect memory must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdDrawClusterHUAWEI-renderPass-02684
  The current render pass must be compatible with the `renderPass` member of the `VkGraphicsPipelineCreateInfo` structure specified when creating the `VkPipeline` bound to VK_PIPELINE_BIND_POINT_GRAPHICS

- VUID-vkCmdDrawClusterHUAWEI-subpass-02685
  The subpass index of the current render pass must be equal to the `subpass` member of the `VkGraphicsPipelineCreateInfo` structure specified when creating the `VkPipeline` bound to VK_PIPELINE_BIND_POINT_GRAPHICS

- VUID-vkCmdDrawClusterHUAWEI-OpTypeImage-07468
  If any shader executed by this pipeline accesses an `OpTypeImage` variable with a `Dim` operand of `SubpassData`, it must be decorated with an `InputAttachmentIndex` that corresponds to a valid input attachment in the current subpass

- VUID-vkCmdDrawClusterHUAWEI-None-07469
  Input attachment views accessed in a subpass must be created with the same VkFormat as the corresponding subpass definition, and be created with a VkImageView that is compatible with the attachment referenced by the subpass' `pInputAttachments`[`InputAttachmentIndex`] in the bound VkFramebuffer as specified by Fragment Input Attachment Compatibility

- VUID-vkCmdDrawClusterHUAWEI-pDepthInputAttachmentIndex-09595
  Input attachment views accessed in a dynamic render pass with a `InputAttachmentIndex` referenced by VkRenderingInputAttachmentIndexInfo, or no `InputAttachmentIndex` if VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` or VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` are `NULL`, must be created with a VkImageView that is compatible with the corresponding color, depth, or stencil attachment in VkRenderingInfo

- VUID-vkCmdDrawClusterHUAWEI-pDepthInputAttachmentIndex-09596
  Input attachment views accessed in a dynamic render pass via a shader object must have an `InputAttachmentIndex` if both VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` and VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` are non-`NULL`

- VUID-vkCmdDrawClusterHUAWEI-InputAttachmentIndex-09597
  If an input attachment view accessed in a dynamic render pass via a shader object has an `InputAttachmentIndex`, the `InputAttachmentIndex` must match an index in VkRenderingInputAttachmentIndexInfo

- VUID-vkCmdDrawClusterHUAWEI-None-06537
  Memory backing image subresources used as attachments in the current render pass must not be written in any way other than as an attachment by this command

- VUID-vkCmdDrawClusterHUAWEI-None-10795
  If a color attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_COLOR_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawClusterHUAWEI-None-10796
  If a depth attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_DEPTH_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawClusterHUAWEI-None-10797
  If a stencil attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_STENCIL_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawClusterHUAWEI-None-12338
  If a color attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_COLOR_BIT on that attachment, the color attachment must not be written to by this command

- VUID-vkCmdDrawClusterHUAWEI-None-12339
  If a depth attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_DEPTH_BIT on that attachment, the depth attachment must not be written to by this command

- VUID-vkCmdDrawClusterHUAWEI-None-12340
  If a stencil attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_STENCIL_BIT on that attachment, the stencil attachment must not be written to by this command

- VUID-vkCmdDrawClusterHUAWEI-None-09003
  If an attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, it must not be accessed in any way other than as an attachment, storage image, or sampled image by this command

- VUID-vkCmdDrawClusterHUAWEI-None-06886
  If the current render pass instance uses a depth/stencil attachment with a read-only layout for the depth aspect, depth writes must be disabled

- VUID-vkCmdDrawClusterHUAWEI-None-06887
  If the current render pass instance uses a depth/stencil attachment with a read-only layout for the stencil aspect, both front and back `writeMask` are not zero, and stencil test is enabled, all stencil ops must be VK_STENCIL_OP_KEEP

- VUID-vkCmdDrawClusterHUAWEI-None-07831
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT dynamic state enabled then vkCmdSetViewport must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterHUAWEI-None-07832
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SCISSOR dynamic state enabled then vkCmdSetScissor must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterHUAWEI-None-08617
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_WIDTH dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineWidth must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterHUAWEI-None-07834
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BIAS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthBiasEnable` is VK_TRUE, then vkCmdSetDepthBias or vkCmdSetDepthBias2EXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterHUAWEI-None-07835
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_BLEND_CONSTANTS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and an active color attachment current value of `blendEnable` is VK_TRUE with a blend equations where any VkBlendFactor member is VK_BLEND_FACTOR_CONSTANT_COLOR, VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR, VK_BLEND_FACTOR_CONSTANT_ALPHA, or VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA, then vkCmdSetBlendConstants must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterHUAWEI-None-07836
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BOUNDS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthBoundsTestEnable` is VK_TRUE, then vkCmdSetDepthBounds must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterHUAWEI-None-07837
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilCompareMask must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterHUAWEI-None-07838
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_WRITE_MASK dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilWriteMask must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterHUAWEI-None-07839
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_REFERENCE dynamic state enabled, the current value of and `rasterizerDiscardEnable` is VK_FALSE, the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilReference must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterHUAWEI-maxMultiviewInstanceIndex-02688
  If the draw is recorded in a render pass instance with multiview enabled, the maximum instance index must be less than or equal to VkPhysicalDeviceMultiviewProperties::`maxMultiviewInstanceIndex`

- VUID-vkCmdDrawClusterHUAWEI-sampleLocationsEnable-02689
  If the bound graphics pipeline was created with VkPipelineSampleLocationsStateCreateInfoEXT::`sampleLocationsEnable` set to VK_TRUE, then the active depth attachment must have been created with the VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit set

- VUID-vkCmdDrawClusterHUAWEI-None-07634
  If the `VK_EXT_sample_locations` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetSampleLocationsEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterHUAWEI-None-06666
  If the `VK_EXT_sample_locations` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `sampleLocationsEnable` is VK_TRUE, then vkCmdSetSampleLocationsEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterHUAWEI-None-07840
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_CULL_MODE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCullMode must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterHUAWEI-None-07841
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRONT_FACE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetFrontFace must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterHUAWEI-None-07843
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, vkCmdSetDepthTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterHUAWEI-None-07844
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthTestEnable` is VK_TRUE, then vkCmdSetDepthWriteEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterHUAWEI-None-07845
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_COMPARE_OP dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthTestEnable` is VK_TRUE, then vkCmdSetDepthCompareOp must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterHUAWEI-None-07846
  If the `depthBounds` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthBoundsTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterHUAWEI-None-07847
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetStencilTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterHUAWEI-None-07848
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_OP dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilOp must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterHUAWEI-viewportCount-03417
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, and the state is not inherited, then vkCmdSetViewportWithCount must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterHUAWEI-scissorCount-03418
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT dynamic state enabled, and the state is not inherited, then vkCmdSetScissorWithCount must have been called and not subsequently invalidated in the current command buffer prior to this drawing

- VUID-vkCmdDrawClusterHUAWEI-viewportCount-03419
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with both the VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic states enabled, and the state is not inherited, then the `viewportCount` parameter of `vkCmdSetViewportWithCount` must match the `scissorCount` parameter of `vkCmdSetScissorWithCount`

- VUID-vkCmdDrawClusterHUAWEI-viewportCount-04137
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportWScalingStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawClusterHUAWEI-viewportCount-04138
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, the current value of `viewportWScalingEnable` is VK_TRUE, then vkCmdSetViewportWScalingNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterHUAWEI-None-08636
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, the current value of `viewportWScalingEnable` is VK_TRUE, then the `viewportCount` parameter in the last call to vkCmdSetViewportWScalingNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawClusterHUAWEI-viewportCount-04139
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportShadingRateImageStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawClusterHUAWEI-shadingRateImage-09233
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_COARSE_SAMPLE_ORDER_NV and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoarseSampleOrderNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterHUAWEI-shadingRateImage-09234
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `shadingRateImageEnable` is VK_TRUE, then vkCmdSetViewportShadingRatePaletteNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterHUAWEI-None-08637
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `shadingRateImageEnable` is VK_TRUE, then the `viewportCount` parameter in the last call to vkCmdSetViewportShadingRatePaletteNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawClusterHUAWEI-VkPipelineVieportCreateInfo-04141
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled and a VkPipelineViewportSwizzleStateCreateInfoNV structure chained from VkPipelineViewportStateCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportSwizzleStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawClusterHUAWEI-VkPipelineVieportCreateInfo-04142
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled and a VkPipelineViewportExclusiveScissorStateCreateInfoNV structure chained from VkPipelineViewportStateCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportExclusiveScissorStateCreateInfoNV::`exclusiveScissorCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawClusterHUAWEI-None-07878
  If the `exclusiveScissor` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_ENABLE_NV dynamic state enabled, then vkCmdSetExclusiveScissorEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterHUAWEI-None-07879
  If the `exclusiveScissor` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_NV dynamic state enabled, and the most recent call to vkCmdSetExclusiveScissorEnableNV in the current command buffer set any element of `pExclusiveScissorEnables` to VK_TRUE, then vkCmdSetExclusiveScissorNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterHUAWEI-None-04876
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE dynamic state enabled, then vkCmdSetRasterizerDiscardEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterHUAWEI-None-04877
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthBiasEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterHUAWEI-logicOp-04878
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LOGIC_OP_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `logicOpEnable` is VK_TRUE, then vkCmdSetLogicOpEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterHUAWEI-primitiveFragmentShadingRateWithMultipleViewports-04552
  If the `primitiveFragmentShadingRateWithMultipleViewports` limit is not supported, the bound graphics pipeline was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, and any of the shader stages of the bound graphics pipeline write to the `PrimitiveShadingRateKHR` built-in, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and the `viewportCount` parameter of `vkCmdSetViewportWithCount` must be `1`

- VUID-vkCmdDrawClusterHUAWEI-primitiveFragmentShadingRateWithMultipleViewports-08642
  If the `primitiveFragmentShadingRateWithMultipleViewports` limit is not supported, and any shader object bound to a graphics stage writes to the `PrimitiveShadingRateKHR` built-in, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and the `viewportCount` parameter of `vkCmdSetViewportWithCount` must be `1`

- VUID-vkCmdDrawClusterHUAWEI-blendEnable-04727
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, then for each color attachment, if the corresponding image view’s format features do not contain VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT, then the corresponding current value of `blendEnable` must be VK_FALSE

- VUID-vkCmdDrawClusterHUAWEI-None-08644
  If a shader object is bound to any graphics stage or a graphics pipeline is bound, the current value of `rasterizerDiscardEnable` is VK_FALSE, and none of the following is enabled:

  - the `VK_AMD_mixed_attachment_samples` extension

  - the `VK_NV_framebuffer_mixed_samples` extension

  - the `multisampledRenderToSingleSampled` feature

  then the current value of `rasterizationSamples` must be the same as the current color and/or depth/stencil attachments

- VUID-vkCmdDrawClusterHUAWEI-None-08876
  If a shader object is bound to any graphics stage, the current render pass instance must have been begun with vkCmdBeginRendering

- VUID-vkCmdDrawClusterHUAWEI-imageView-06172
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawClusterHUAWEI-imageView-06173
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawClusterHUAWEI-imageView-06174
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawClusterHUAWEI-imageView-06175
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawClusterHUAWEI-imageView-06176
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawClusterHUAWEI-imageView-06177
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawClusterHUAWEI-viewMask-06178
  If the current render pass instance was begun with vkCmdBeginRendering, the bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::`viewMask` equal to VkRenderingInfo::`viewMask`

- VUID-vkCmdDrawClusterHUAWEI-colorAttachmentCount-06179
  If the `dynamicRenderingUnusedAttachments` feature is not enabled and the current render pass instance was begun with vkCmdBeginRendering, the bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::`colorAttachmentCount` equal to VkRenderingInfo::`colorAttachmentCount`

- VUID-vkCmdDrawClusterHUAWEI-dynamicRenderingUnusedAttachments-08910
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound graphics pipeline

- VUID-vkCmdDrawClusterHUAWEI-dynamicRenderingUnusedAttachments-08912
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` equal to VK_NULL_HANDLE must have the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound pipeline equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawClusterHUAWEI-dynamicRenderingUnusedAttachments-08911
  If the `dynamicRenderingUnusedAttachments` feature is enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound graphics pipeline, or the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats`, if it exists, must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawClusterHUAWEI-colorAttachmentCount-09362
  If the current render pass instance was begun with vkCmdBeginRendering, with a VkRenderingInfo::`colorAttachmentCount` equal to `1`, there is no shader object bound to any graphics stage, and a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, each element of the VkRenderingInfo::`pColorAttachments` array with a `resolveImageView` not equal to VK_NULL_HANDLE must have been created with an image created with a VkExternalFormatANDROID::`externalFormat` value equal to the VkExternalFormatANDROID::`externalFormat` value used to create the bound graphics pipeline

- VUID-vkCmdDrawClusterHUAWEI-None-09363
  If there is no shader object bound to any graphics stage, the current render pass instance was begun with vkCmdBeginRendering and a VkRenderingInfo::`colorAttachmentCount` equal to `1`, and a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with an image created with a VkExternalFormatANDROID::`externalFormat` value equal to the VkExternalFormatANDROID::`externalFormat` value used to create the bound graphics pipeline

- VUID-vkCmdDrawClusterHUAWEI-None-09364
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetColorBlendEnableEXT must have set the blend enable to VK_FALSE prior to this drawing command

- VUID-vkCmdDrawClusterHUAWEI-None-09365
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetRasterizationSamplesEXT must have set `rasterizationSamples` to VK_SAMPLE_COUNT_1_BIT prior to this drawing command

- VUID-vkCmdDrawClusterHUAWEI-None-09368
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetFragmentShadingRateKHR must have set `pFragmentSize->width` to `1` prior to this drawing command

- VUID-vkCmdDrawClusterHUAWEI-None-09369
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetFragmentShadingRateKHR must have set `pFragmentSize->height` to `1` prior to this drawing command

- VUID-vkCmdDrawClusterHUAWEI-None-07749
  If the `colorWriteEnable` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorWriteEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterHUAWEI-attachmentCount-07750
  If the `colorWriteEnable` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the `attachmentCount` parameter of most recent call to `vkCmdSetColorWriteEnableEXT` in the current command buffer must be greater than or equal to the number of active color attachments

- VUID-vkCmdDrawClusterHUAWEI-None-07751
  If the `VK_EXT_discard_rectangles` extension is enabled, a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT dynamic state enabled and the `pNext` chain of VkGraphicsPipelineCreateInfo included a VkPipelineDiscardRectangleStateCreateInfoEXT structure, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for each discard rectangle in VkPipelineDiscardRectangleStateCreateInfoEXT::`discardRectangleCount`

- VUID-vkCmdDrawClusterHUAWEI-rasterizerDiscardEnable-09236
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT dynamic state enabled and the `pNext` chain of VkGraphicsPipelineCreateInfo did not include a VkPipelineDiscardRectangleStateCreateInfoEXT structure, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for each discard rectangle in VkPhysicalDeviceDiscardRectanglePropertiesEXT::`maxDiscardRectangles`

- VUID-vkCmdDrawClusterHUAWEI-None-07880
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDiscardRectangleEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterHUAWEI-None-07881
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_MODE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterHUAWEI-dynamicRenderingUnusedAttachments-08913
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->imageView` was VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawClusterHUAWEI-dynamicRenderingUnusedAttachments-08914
  If current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawClusterHUAWEI-dynamicRenderingUnusedAttachments-08915
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, and the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->imageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawClusterHUAWEI-dynamicRenderingUnusedAttachments-08916
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->imageView` was VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawClusterHUAWEI-dynamicRenderingUnusedAttachments-08917
  If current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawClusterHUAWEI-dynamicRenderingUnusedAttachments-08918
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, and the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->imageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawClusterHUAWEI-imageView-06183
  If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentShadingRateAttachmentInfoKHR::`imageView` was not VK_NULL_HANDLE, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

- VUID-vkCmdDrawClusterHUAWEI-dynamicRenderingLocalRead-11797
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingLocalRead` feature is enabled, the VK_RENDERING_LOCAL_READ_CONCURRENT_ACCESS_CONTROL_BIT_KHR flag is specified, and an attachment is being used as a feedback loop as specified by VK_RENDERING_ATTACHMENT_INPUT_ATTACHMENT_FEEDBACK_BIT_KHR, VkRenderingAttachmentFlagsInfoKHR::`flags` for that attachment must include VK_RENDERING_ATTACHMENT_INPUT_ATTACHMENT_FEEDBACK_BIT_KHR

- VUID-vkCmdDrawClusterHUAWEI-imageView-06184
  If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentDensityMapAttachmentInfoEXT::`imageView` was not VK_NULL_HANDLE, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT

- VUID-vkCmdDrawClusterHUAWEI-layers-10831
  If the current render pass instance was created with VK_RENDERING_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE or VK_RENDER_PASS_CREATE_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE, and the bound graphics pipeline was created with VK_PIPELINE_CREATE_2_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE, then the current render pass instance must have a `layers` value less than or equal to VkPipelineFragmentDensityMapLayeredCreateInfoVALVE::`maxFragmentDensityMapLayers`

- VUID-vkCmdDrawClusterHUAWEI-colorAttachmentCount-06185
  If the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with a sample count equal to the corresponding element of the `pColorAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline

- VUID-vkCmdDrawClusterHUAWEI-pDepthAttachment-06186
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of the `depthStencilAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawClusterHUAWEI-pStencilAttachment-06187
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of the `depthStencilAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawClusterHUAWEI-multisampledRenderToSingleSampled-07285
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with a sample count equal to the value of `rasterizationSamples` for the bound graphics pipeline

- VUID-vkCmdDrawClusterHUAWEI-multisampledRenderToSingleSampled-07286
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawClusterHUAWEI-multisampledRenderToSingleSampled-07287
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawClusterHUAWEI-pNext-07935
  If this command is called inside a render pass instance started with vkCmdBeginRendering, and the `pNext` chain of VkRenderingInfo includes a VkMultisampledRenderToSingleSampledInfoEXT structure with `multisampledRenderToSingleSampledEnable` equal to VK_TRUE, then the value of `rasterizationSamples` for the bound graphics pipeline must be equal to VkMultisampledRenderToSingleSampledInfoEXT::`rasterizationSamples`

- VUID-vkCmdDrawClusterHUAWEI-renderPass-06198
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline must have been created with a VkGraphicsPipelineCreateInfo::`renderPass` equal to VK_NULL_HANDLE

- VUID-vkCmdDrawClusterHUAWEI-pColorAttachments-08963
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound with a fragment shader that statically writes to a color attachment, the color write mask is not zero, color writes are enabled, and the corresponding element of the VkRenderingInfo::`pColorAttachments->imageView` was not VK_NULL_HANDLE, then the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawClusterHUAWEI-pColorAttachments-11539
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound with a fragment shader that statically writes to a color attachment, the color write mask is not zero, color writes are enabled, and the corresponding element of the VkRenderingInfo::`pColorAttachments->resolveImageView` was not VK_NULL_HANDLE, then the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawClusterHUAWEI-pDepthAttachment-08964
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound, depth test is enabled, and the VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, then the VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawClusterHUAWEI-pDepthAttachment-11540
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound, depth test is enabled, and the VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, then the VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawClusterHUAWEI-pStencilAttachment-08965
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound, stencil test is enabled and the VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, then the VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawClusterHUAWEI-pStencilAttachment-11860
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound, stencil test is enabled and the VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, then the VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawClusterHUAWEI-flags-10582
  If the current render pass instance was begun with a vkCmdBeginRendering call in `commandBuffer`, its VkRenderingInfo::`flags` parameter must not have VK_RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT set unless VK_RENDERING_CONTENTS_INLINE_BIT_KHR is also set

- VUID-vkCmdDrawClusterHUAWEI-primitivesGeneratedQueryWithRasterizerDiscard-06708
  If the `primitivesGeneratedQueryWithRasterizerDiscard` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, rasterization discard must not be enabled

- VUID-vkCmdDrawClusterHUAWEI-primitivesGeneratedQueryWithNonZeroStreams-06709
  If the `primitivesGeneratedQueryWithNonZeroStreams` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, the bound graphics pipeline must not have been created with a non-zero value in `VkPipelineRasterizationStateStreamCreateInfoEXT`::`rasterizationStream`

- VUID-vkCmdDrawClusterHUAWEI-None-07620
  If the `depthClamp` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLAMP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthClampEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterHUAWEI-None-07621
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_POLYGON_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetPolygonModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterHUAWEI-None-07622
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetRasterizationSamplesEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterHUAWEI-None-07623
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetSampleMaskEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterHUAWEI-alphaToCoverageEnable-08919
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT dynamic state enabled, and `alphaToCoverageEnable` was VK_TRUE in the last call to vkCmdSetAlphaToCoverageEnableEXT, then the Fragment Output Interface must contain a variable for the alpha `Component` word in `Location` 0 at `Index` 0

- VUID-vkCmdDrawClusterHUAWEI-alphaToCoverageEnable-08920
  If a shader object is bound to any graphics stage, and the most recent call to vkCmdSetAlphaToCoverageEnableEXT in the current command buffer set `alphaToCoverageEnable` to VK_TRUE, then the Fragment Output Interface must contain a variable for the alpha `Component` word in `Location` 0 at `Index` 0

- VUID-vkCmdDrawClusterHUAWEI-None-07624
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAlphaToCoverageEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterHUAWEI-None-07625
  If the `alphaToOne` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ALPHA_TO_ONE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAlphaToOneEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterHUAWEI-None-07626
  If the `logicOp` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LOGIC_OP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetLogicOpEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterHUAWEI-None-07627
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and there are color attachments bound, then vkCmdSetColorBlendEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterHUAWEI-None-07629
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and there are color attachments bound, then vkCmdSetColorWriteMaskEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterHUAWEI-None-07630
  If the `geometryStreams` feature is enabled, and a shader object is bound to the VK_SHADER_STAGE_GEOMETRY_BIT stage or a graphics pipeline is bound which was created with both a VK_SHADER_STAGE_GEOMETRY_BIT stage and the VK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXT dynamic state enabled, then vkCmdSetRasterizationStreamEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterHUAWEI-None-07631
  If the `VK_EXT_conservative_rasterization` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_CONSERVATIVE_RASTERIZATION_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetConservativeRasterizationModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterHUAWEI-None-07632
  If the `VK_EXT_conservative_rasterization` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXTRA_PRIMITIVE_OVERESTIMATION_SIZE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `conservativeRasterizationMode` is VK_CONSERVATIVE_RASTERIZATION_MODE_OVERESTIMATE_EXT, then vkCmdSetExtraPrimitiveOverestimationSizeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterHUAWEI-conservativePointAndLineRasterization-07499
  If the `VK_EXT_conservative_rasterization` extension is enabled, `conservativePointAndLineRasterization` is not supported, a shader object is bound to any graphics stage or a graphics pipeline is bound, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line or point topology class, then the current value of `conservativeRasterizationMode` must be VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT

- VUID-vkCmdDrawClusterHUAWEI-None-07633
  If the `depthClipEnable` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLIP_ENABLE_EXT dynamic state, then vkCmdSetDepthClipEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterHUAWEI-None-07636
  If the `VK_EXT_provoking_vertex` extension is enabled, a shader object is bound to the VK_SHADER_STAGE_VERTEX_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_PROVOKING_VERTEX_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetProvokingVertexModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterHUAWEI-None-08666
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineRasterizationModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterHUAWEI-None-08669
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineStippleEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterHUAWEI-None-07849
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled and a shader object is bound to any graphics stage, or a bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stippledLineEnable` is VK_TRUE, then vkCmdSetLineStipple must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterHUAWEI-None-10608
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic state enabled, the effective rasterization input topology is in the line topology class, and the current `lineRasterizationMode` is VK_LINE_RASTERIZATION_MODE_BRESENHAM or VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH, then the current `alphaToCoverageEnable`, `alphaToOneEnable` and `sampleShadingEnable` states must all be VK_FALSE

- VUID-vkCmdDrawClusterHUAWEI-None-07639
  If the `depthClipControl` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLIP_NEGATIVE_ONE_TO_ONE_EXT dynamic state enabled, then vkCmdSetDepthClipNegativeOneToOneEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterHUAWEI-None-09650
  If the `depthClampControl` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLAMP_RANGE_EXT dynamic state enabled, and the current value of `depthClampEnable` is VK_TRUE, then vkCmdSetDepthClampRangeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterHUAWEI-None-07640
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_ENABLE_NV dynamic state enabled, then vkCmdSetViewportWScalingEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterHUAWEI-None-07641
  If the `VK_NV_viewport_swizzle` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic state enabled, then vkCmdSetViewportSwizzleNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterHUAWEI-None-07642
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageToColorEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterHUAWEI-None-07643
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_LOCATION_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageToColorEnable` is VK_TRUE, then vkCmdSetCoverageToColorLocationNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterHUAWEI-None-07644
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_MODE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageModulationModeNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterHUAWEI-None-07645
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageModulationMode` is any value other than VK_COVERAGE_MODULATION_MODE_NONE_NV, then vkCmdSetCoverageModulationTableEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterHUAWEI-None-07646
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageModulationTableEnable` is VK_TRUE, then vkCmdSetCoverageModulationTableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterHUAWEI-None-07647
  If the `shadingRateImage` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SHADING_RATE_IMAGE_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetShadingRateImageEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterHUAWEI-pipelineFragmentShadingRate-09238
  If the `pipelineFragmentShadingRate` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetFragmentShadingRateKHR must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterHUAWEI-None-07648
  If the `representativeFragmentTest` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_REPRESENTATIVE_FRAGMENT_TEST_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetRepresentativeFragmentTestEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterHUAWEI-None-07649
  If the `coverageReductionMode` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageReductionModeNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterHUAWEI-rasterizationSamples-07471
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current subpass does not use any color and/or depth/stencil attachments, then the `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT must follow the rules for a zero-attachment subpass

- VUID-vkCmdDrawClusterHUAWEI-samples-07472
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state disabled, then the `samples` parameter in the last call to vkCmdSetSampleMaskEXT must be greater or equal to the VkPipelineMultisampleStateCreateInfo::`rasterizationSamples` parameter used to create the bound graphics pipeline

- VUID-vkCmdDrawClusterHUAWEI-samples-07473
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT state and VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT states enabled, then the `samples` parameter in the last call to vkCmdSetSampleMaskEXT must be greater or equal to the `rasterizationSamples` parameter in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawClusterHUAWEI-None-09211
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, or a shader object is bound to any graphics stage, and the current render pass instance includes a VkMultisampledRenderToSingleSampledInfoEXT structure with `multisampledRenderToSingleSampledEnable` equal to VK_TRUE, then the `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT must be the same as the `rasterizationSamples` member of that structure

- VUID-vkCmdDrawClusterHUAWEI-firstAttachment-07476
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic states enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the last call to vkCmdSetColorBlendEnableEXT in the current command buffer prior to this drawing command must have set a value for all active color attachments

- VUID-vkCmdDrawClusterHUAWEI-firstAttachment-07478
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT dynamic states enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the last call to vkCmdSetColorWriteMaskEXT in the current command buffer prior to this drawing command must have set a value for all active color attachments

- VUID-vkCmdDrawClusterHUAWEI-advancedBlendMaxColorAttachments-07480
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT and VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic states enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and an active color attachment current value of `blendEnable` is VK_TRUE, then the number of active color attachments must not exceed `advancedBlendMaxColorAttachments`

- VUID-vkCmdDrawClusterHUAWEI-None-10862
  If a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT , but not the VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorBlendEquationEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawClusterHUAWEI-rasterizerDiscardEnable-10863
  If a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT, but not the VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorBlendAdvancedEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawClusterHUAWEI-None-10864
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT and VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then either vkCmdSetColorBlendAdvancedEXT or vkCmdSetColorBlendEquationEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawClusterHUAWEI-primitivesGeneratedQueryWithNonZeroStreams-07481
  If the `primitivesGeneratedQueryWithNonZeroStreams` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, and the bound graphics pipeline was created with VK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXT state enabled, the last call to vkCmdSetRasterizationStreamEXT must have set the `rasterizationStream` to zero

- VUID-vkCmdDrawClusterHUAWEI-sampleLocationsPerPixel-07482
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state disabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then the `sampleLocationsPerPixel` member of `pSampleLocationsInfo` in the last call to vkCmdSetSampleLocationsEXT must equal the `rasterizationSamples` member of the VkPipelineMultisampleStateCreateInfo structure the bound graphics pipeline has been created with

- VUID-vkCmdDrawClusterHUAWEI-sampleLocationsPerPixel-07483
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then the `sampleLocationsPerPixel` member of `pSampleLocationsInfo` in the last call to vkCmdSetSampleLocationsEXT must equal the `rasterizationSamples` parameter of the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawClusterHUAWEI-sampleLocationsEnable-07484
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT then the current active depth attachment must have been created with the VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit set

- VUID-vkCmdDrawClusterHUAWEI-sampleLocationsEnable-07485
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, then the `sampleLocationsInfo.maxSampleLocationGridSize.width` in the last call to vkCmdSetSampleLocationsEXT must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.width` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling `rasterizationSamples`

- VUID-vkCmdDrawClusterHUAWEI-sampleLocationsEnable-07486
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, then the `sampleLocationsInfo.maxSampleLocationGridSize.height` in the last call to vkCmdSetSampleLocationsEXT must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.height` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling `rasterizationSamples`

- VUID-vkCmdDrawClusterHUAWEI-sampleLocationsEnable-07487
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, the fragment shader code must not statically use the extended instruction `InterpolateAtSample`

- VUID-vkCmdDrawClusterHUAWEI-sampleLocationsEnable-07936
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationGridSize.width` must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.width` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling the value of `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawClusterHUAWEI-sampleLocationsEnable-07937
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationGridSize.height` must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.height` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling the value of `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawClusterHUAWEI-sampleLocationsEnable-07938
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationsPerPixel` must equal `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawClusterHUAWEI-coverageModulationTableEnable-07488
  If a shader object is bound to any graphics stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NV state enabled, and the last call to vkCmdSetCoverageModulationTableEnableNV set `coverageModulationTableEnable` to VK_TRUE, then the `coverageModulationTableCount` parameter in the last call to vkCmdSetCoverageModulationTableNV must equal the current `rasterizationSamples` divided by the number of color samples in the current active color attachment

- VUID-vkCmdDrawClusterHUAWEI-rasterizationSamples-07489
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, and if current subpass has a depth/stencil attachment and depth test, stencil test, or depth bounds test are enabled in the bound pipeline, then the current `rasterizationSamples` must be the same as the sample count of the depth/stencil attachment

- VUID-vkCmdDrawClusterHUAWEI-coverageToColorEnable-07490
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV state enabled and the last call to vkCmdSetCoverageToColorEnableNV set the `coverageToColorEnable` to VK_TRUE, then there must be an active color attachment at the location selected by the last call to vkCmdSetCoverageToColorLocationNV `coverageToColorLocation`, with a VkFormat of VK_FORMAT_R8_UINT, VK_FORMAT_R8_SINT, VK_FORMAT_R16_UINT, VK_FORMAT_R16_SINT, VK_FORMAT_R32_UINT, or VK_FORMAT_R32_SINT

- VUID-vkCmdDrawClusterHUAWEI-rasterizerDiscardEnable-09420
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, and a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, and the most recent call to vkCmdSetRasterizerDiscardEnable in the current command buffer set `rasterizerDiscardEnable` to VK_FALSE, and the last call to vkCmdSetCoverageToColorEnableNV set the `coverageToColorEnable` to VK_TRUE, then there must be an active color attachment at the location selected by the last call to vkCmdSetCoverageToColorLocationNV `coverageToColorLocation`, with a VkFormat of VK_FORMAT_R8_UINT, VK_FORMAT_R8_SINT, VK_FORMAT_R16_UINT, VK_FORMAT_R16_SINT, VK_FORMAT_R32_UINT, or VK_FORMAT_R32_SINT

- VUID-vkCmdDrawClusterHUAWEI-coverageReductionMode-07491
  If the `coverageReductionMode` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV or VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic states enabled, then the current values of `coverageReductionMode`, `rasterizationSamples`, the sample counts for the color and depth/stencil attachments (if the subpass has them) must be a valid combination returned by vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV

- VUID-vkCmdDrawClusterHUAWEI-viewportCount-07492
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportSwizzleStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawClusterHUAWEI-viewportCount-07493
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic states enabled then the `viewportCount` parameter in the last call to vkCmdSetViewportSwizzleNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawClusterHUAWEI-viewportCount-09421
  If the `VK_NV_viewport_swizzle` extension is enabled, and a shader object is bound to any graphics stage, then the `viewportCount` parameter in the last call to vkCmdSetViewportSwizzleNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawClusterHUAWEI-rasterizationSamples-07494
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, and the `coverageReductionMode` feature is not enabled, or the current value of `coverageReductionMode` is not VK_COVERAGE_REDUCTION_MODE_TRUNCATE_NV, and the current value of `rasterizationSamples` is greater than sample count of the color attachment, then sample shading must be disabled

- VUID-vkCmdDrawClusterHUAWEI-stippledLineEnable-07495
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_RECTANGULAR, then the `stippledRectangularLines` feature must be enabled

- VUID-vkCmdDrawClusterHUAWEI-stippledLineEnable-07496
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_BRESENHAM, then the `stippledBresenhamLines` feature must be enabled

- VUID-vkCmdDrawClusterHUAWEI-stippledLineEnable-07497
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH, then the `stippledSmoothLines` feature must be enabled

- VUID-vkCmdDrawClusterHUAWEI-stippledLineEnable-07498
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_DEFAULT, then the `stippledRectangularLines` feature must be enabled and VkPhysicalDeviceLimits::`strictLines` must be VK_TRUE

- VUID-vkCmdDrawClusterHUAWEI-stage-07073
  If the bound pipeline was created with the VkPipelineShaderStageCreateInfo::`stage` member of an element of VkGraphicsPipelineCreateInfo::`pStages` set to VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT, then Mesh Shader Queries must not be active

- VUID-vkCmdDrawClusterHUAWEI-None-08877
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ATTACHMENT_FEEDBACK_LOOP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAttachmentFeedbackLoopEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterHUAWEI-None-07850
  If dynamic state was inherited from VkCommandBufferInheritanceViewportScissorInfoNV, it must be set in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterHUAWEI-nextStage-10745
  For each shader object bound to a graphics stage, except for shader object bound to the last graphics stage in the logical pipeline, it must have been created with a `nextStage` including the corresponding bit to the shader object bound to the following graphics stage in the logical pipeline

- VUID-vkCmdDrawClusterHUAWEI-None-08684
  If there is no bound graphics pipeline, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_VERTEX_BIT

- VUID-vkCmdDrawClusterHUAWEI-None-08685
  If there is no bound graphics pipeline, and the `tessellationShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT

- VUID-vkCmdDrawClusterHUAWEI-None-08686
  If there is no bound graphics pipeline, and the `tessellationShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT

- VUID-vkCmdDrawClusterHUAWEI-None-08687
  If there is no bound graphics pipeline, and the `geometryShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_GEOMETRY_BIT

- VUID-vkCmdDrawClusterHUAWEI-None-08688
  If there is no bound graphics pipeline, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_FRAGMENT_BIT

- VUID-vkCmdDrawClusterHUAWEI-None-08689
  If there is no bound graphics pipeline, and the `taskShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TASK_BIT_EXT

- VUID-vkCmdDrawClusterHUAWEI-None-08690
  If there is no bound graphics pipeline, and the `meshShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-vkCmdDrawClusterHUAWEI-None-08693
  If there is no bound graphics pipeline, and at least one of the `taskShader` and `meshShader` features is enabled, one of the VK_SHADER_STAGE_VERTEX_BIT or VK_SHADER_STAGE_MESH_BIT_EXT stages must have a valid `VkShaderEXT` bound, and the other must have no `VkShaderEXT` bound

- VUID-vkCmdDrawClusterHUAWEI-None-08696
  If there is no bound graphics pipeline, and a valid `VkShaderEXT` is bound to the VK_SHADER_STAGE_VERTEX_BIT stage, there must be no `VkShaderEXT` bound to either the VK_SHADER_STAGE_TASK_BIT_EXT stage or the VK_SHADER_STAGE_MESH_BIT_EXT stage

- VUID-vkCmdDrawClusterHUAWEI-None-08698
  If any graphics shader is bound which was created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag, then all shaders created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag in the same vkCreateShadersEXT call must also be bound

- VUID-vkCmdDrawClusterHUAWEI-None-08699
  If any graphics shader is bound which was created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag, any stages in between stages whose shaders which did not create a shader with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag as part of the same vkCreateShadersEXT call must not have any `VkShaderEXT` bound

- VUID-vkCmdDrawClusterHUAWEI-None-08878
  All bound graphics shader objects must have been created with identical or identically defined push constant ranges

- VUID-vkCmdDrawClusterHUAWEI-None-08879
  All bound graphics shader objects must have either been created with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag set, or with identical or identically defined arrays of descriptor set layouts

- VUID-vkCmdDrawClusterHUAWEI-colorAttachmentCount-09372
  If the current render pass instance was begun with vkCmdBeginRendering and a VkRenderingInfo::`colorAttachmentCount` equal to `1`, a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, and a fragment shader is bound, it must not declare the `DepthReplacing` or `StencilRefReplacingEXT` execution modes

- VUID-vkCmdDrawClusterHUAWEI-pDynamicStates-08715
  If the bound graphics pipeline state includes a fragment shader stage, was created with VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`, and the fragment shader declares the `EarlyFragmentTests` execution mode and uses `OpDepthAttachmentReadEXT`, the `depthWriteEnable` parameter in the last call to vkCmdSetDepthWriteEnable must be VK_FALSE

- VUID-vkCmdDrawClusterHUAWEI-pDynamicStates-08716
  If the bound graphics pipeline state includes a fragment shader stage, was created with VK_DYNAMIC_STATE_STENCIL_WRITE_MASK set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`, and the fragment shader declares the `EarlyFragmentTests` execution mode and uses `OpStencilAttachmentReadEXT`, the `writeMask` parameter in the last call to vkCmdSetStencilWriteMask must be `0`

- VUID-vkCmdDrawClusterHUAWEI-None-09116
  If a shader object is bound to any graphics stage or the bound graphics pipeline was created with VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT, and the format of any color attachment is VK_FORMAT_E5B9G9R9_UFLOAT_PACK32, the corresponding element of the `pColorWriteMasks` parameter of vkCmdSetColorWriteMaskEXT must either include all of VK_COLOR_COMPONENT_R_BIT, VK_COLOR_COMPONENT_G_BIT, VK_COLOR_COMPONENT_B_BIT, and VK_COLOR_COMPONENT_A_BIT, or none of them

- VUID-vkCmdDrawClusterHUAWEI-maxFragmentDualSrcAttachments-09239
  If blending is enabled for any attachment where either the source or destination blend factors for that attachment use the secondary color input, the maximum value of `Location` for any output attachment statically used in the `Fragment` `Execution` `Model` executed by this command must be less than `maxFragmentDualSrcAttachments`

- VUID-vkCmdDrawClusterHUAWEI-None-09548
  If the current render pass was begun with vkCmdBeginRendering, there is no shader object bound to any graphics stage, the value of each element of VkRenderingAttachmentLocationInfo::`pColorAttachmentLocations` in the bound pipeline must match the value for the corresponding locations set currently in the current render pass instance

- VUID-vkCmdDrawClusterHUAWEI-None-09549
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of each element of VkRenderingInputAttachmentIndexInfo::`pColorAttachmentInputIndices` in the bound pipeline must match the value for the corresponding index set currently in the current render pass instance

- VUID-vkCmdDrawClusterHUAWEI-None-10927
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` in the bound pipeline must match the value set currently in the current render pass instance

- VUID-vkCmdDrawClusterHUAWEI-None-10928
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` in the bound pipeline must match the value set currently in the current render pass instance

- VUID-vkCmdDrawClusterHUAWEI-None-09642
  If the current render pass was begun with vkCmdBeginRendering with the VK_RENDERING_ENABLE_LEGACY_DITHERING_BIT_EXT flag, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_2_ENABLE_LEGACY_DITHERING_BIT_EXT

- VUID-vkCmdDrawClusterHUAWEI-None-09643
  If the bound graphics pipeline was created with VK_PIPELINE_CREATE_2_ENABLE_LEGACY_DITHERING_BIT_EXT, the current render pass must have begun with vkCmdBeginRendering with the VK_RENDERING_ENABLE_LEGACY_DITHERING_BIT_EXT flag

- VUID-vkCmdDrawClusterHUAWEI-None-10677
  If the per-tile execution model is enabled, the tileShadingPerTileDraw feature must be enabled

- VUID-vkCmdDrawClusterHUAWEI-None-10772
  If a shader object is bound to any graphics stage, multiview functionality must not be enabled in the current render pass

- VUID-vkCmdDrawClusterHUAWEI-multiviewPerViewViewports-12262
  If the `multiviewPerViewViewports` feature is enabled, then the index of the most significant bit in current render pass instance `viewMask` must be less than the current value of `viewportCount`

- VUID-vkCmdDrawClusterHUAWEI-multiviewPerViewViewports-12263
  If the `multiviewPerViewViewports` feature is enabled, then the index of the most significant bit in current render pass instance `viewMask` must be less than the current value of `scissorCount`

- VUID-vkCmdDrawClusterHUAWEI-flags-11521
  If current render pass instance was begun with vkCmdBeginRendering with VkRenderingInfo::`flags` which includes VK_RENDERING_FRAGMENT_REGION_BIT_EXT, and if sample shading is enabled (explicitly or implicitly), then the minimum fraction for sample shading must equal 0.0

- VUID-vkCmdDrawClusterHUAWEI-None-11522
  If the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, and the `dynamicRenderingUnusedAttachments` feature is not enabled, the graphics pipeline bound must have been created with a VkCustomResolveCreateInfoEXT

- VUID-vkCmdDrawClusterHUAWEI-None-11523
  If the current render pass instance was begun with vkCmdBeginRendering and does not contain a custom resolve, and the `dynamicRenderingUnusedAttachments` feature is not enabled, the graphics pipeline bound must not have been created with a VkCustomResolveCreateInfoEXT

- VUID-vkCmdDrawClusterHUAWEI-customResolve-11524
  If the current render pass instance was begun with vkCmdBeginRendering and vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, the graphics pipeline bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_TRUE

- VUID-vkCmdDrawClusterHUAWEI-customResolve-11525
  If the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, and vkCmdBeginCustomResolveEXT has not been recorded in the render pass instance, the graphics pipeline bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_FALSE

- VUID-vkCmdDrawClusterHUAWEI-None-11861
  If the `dynamicRenderingUnusedAttachments` feature is not enabled and the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, the bound graphics pipeline must have been created with a VkCustomResolveCreateInfoEXT::`colorAttachmentCount` equal to VkRenderingInfo::`colorAttachmentCount`

- VUID-vkCmdDrawClusterHUAWEI-None-11862
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound graphics pipeline

- VUID-vkCmdDrawClusterHUAWEI-None-11863
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` equal to VK_NULL_HANDLE must have the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound pipeline equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawClusterHUAWEI-dynamicRenderingUnusedAttachments-11864
  If the `dynamicRenderingUnusedAttachments` feature is enabled, the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound graphics pipeline, or the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats`, if it exists, must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawClusterHUAWEI-None-11865
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawClusterHUAWEI-None-11866
  If current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`

- VUID-vkCmdDrawClusterHUAWEI-dynamicRenderingUnusedAttachments-11867
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, and the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawClusterHUAWEI-None-11868
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->resolveImageView` was VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawClusterHUAWEI-None-11869
  If current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`

- VUID-vkCmdDrawClusterHUAWEI-dynamicRenderingUnusedAttachments-11870
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, and the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawClusterHUAWEI-colorAttachmentCount-11871
  If the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0` and vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, then for each element of the VkRenderingInfo::`pColorAttachments` array with a `resolveImageView` not equal to VK_NULL_HANDLE, the `resolveImageView` must have been created with a sample count equal to the value of `rasterizationSamples` for the bound graphics pipeline

- VUID-vkCmdDrawClusterHUAWEI-pDepthAttachment-11872
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`

- VUID-vkCmdDrawClusterHUAWEI-pStencilAttachment-11873
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`

- VUID-vkCmdDrawClusterHUAWEI-customResolve-11529
  If a shader object is bound to the fragment stage, the current render pass instance was begun with vkCmdBeginRendering, a fragment density map attachment is active, and vkCmdBeginCustomResolveEXT has been called, then the fragment shader object bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_TRUE

- VUID-vkCmdDrawClusterHUAWEI-customResolve-11530
  If a shader object is bound to the fragment stage, the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, a fragment density map attachment is active, and vkCmdBeginCustomResolveEXT has not yet been called, then the fragment shader object bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_FALSE

- VUID-vkCmdDrawClusterHUAWEI-flags-13361
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, then all bound shader objects must have been created with the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit

- VUID-vkCmdDrawClusterHUAWEI-flags-13362
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, then the pipeline layout of the bound descriptor sets must have been created with VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT set

- VUID-vkCmdDrawClusterHUAWEI-flags-13363
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, and any of the descriptor set layouts used to create the pipeline layout of the bound descriptor sets were created with any binding’s VkDescriptorSetLayoutBinding::`stageFlags` set with VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT, then there must be no binding with VkDescriptorSetLayoutBinding::`stageFlags` set with VK_SHADER_STAGE_TASK_BIT_EXT or VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-vkCmdDrawClusterHUAWEI-flags-13364
  If there are any shader objects bound that were created with `flags` that includes both the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR and VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT bits, the pipeline layout of the bound descriptor sets must have been created with VK_PIPELINE_LAYOUT_CREATE_NO_TASK_SHADER_BIT_KHR set

- VUID-vkCmdDrawClusterHUAWEI-flags-13365
  If there are any shader objects bound that were created with `flags` that includes both the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR and VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT bits, there must be no shader object bound to the VK_SHADER_STAGE_TASK_BIT_EXT stage

- VUID-vkCmdDrawClusterHUAWEI-stage-06480
  The bound graphics pipeline must not have been created with the VkPipelineShaderStageCreateInfo::`stage` member of any element of VkGraphicsPipelineCreateInfo::`pStages` set to VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT

- VUID-vkCmdDrawClusterHUAWEI-pStages-10680
  If there is no bound graphics pipeline, `vkCmdBindShadersEXT` must not have last bound the `pStages` element of VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT with a valid shader object other than VK_NULL_HANDLE

- VUID-vkCmdDrawClusterHUAWEI-None-07074
  Transform Feedback Queries must not be active

- VUID-vkCmdDrawClusterHUAWEI-None-07075
  Primitives Generated Queries must not be active

- VUID-vkCmdDrawClusterHUAWEI-pipelineStatistics-07076
  The `pipelineStatistics` member used to create any active Pipeline Statistics Query must not contain VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT, VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT, VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT, VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT, VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT, VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT, VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT, VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT, or VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT

- VUID-vkCmdDrawClusterHUAWEI-None-08694
  If there is no bound graphics pipeline, and both the `taskShader` and `meshShader` features are enabled, and a valid `VkShaderEXT` is bound the to the VK_SHADER_STAGE_MESH_BIT_EXT stage, and that `VkShaderEXT` was created without the VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT flag, a valid `VkShaderEXT` must be bound to the VK_SHADER_STAGE_TASK_BIT_EXT stage

- VUID-vkCmdDrawClusterHUAWEI-None-08695
  If there is no bound graphics pipeline, and both the `taskShader` and `meshShader` features are enabled, and a valid `VkShaderEXT` is bound the to the VK_SHADER_STAGE_MESH_BIT_EXT stage, and that `VkShaderEXT` was created with the VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT flag, there must be no `VkShaderEXT` bound to the VK_SHADER_STAGE_TASK_BIT_EXT stage

- VUID-vkCmdDrawClusterHUAWEI-None-07819
  The `pipelineStatistics` member used to create any active Pipeline Statistics Query must not contain VK_QUERY_PIPELINE_STATISTIC_TASK_SHADER_INVOCATIONS_BIT_EXT, or VK_QUERY_PIPELINE_STATISTIC_MESH_SHADER_INVOCATIONS_BIT_EXT

- VUID-vkCmdDrawClusterHUAWEI-groupCountX-07820
  `groupCountX` must be less than or equal to `VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI`::`maxWorkGroupCount`[0]

- VUID-vkCmdDrawClusterHUAWEI-groupCountY-07821
  `groupCountY` must be less than or equal to `VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI`::`maxWorkGroupCount`[1]

- VUID-vkCmdDrawClusterHUAWEI-groupCountZ-07822
  `groupCountZ` must be less than or equal to `VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI`::`maxWorkGroupCount`[2]

- VUID-vkCmdDrawClusterHUAWEI-ClusterCullingHUAWEI-07823
  The current pipeline bound to VK_PIPELINE_BIND_POINT_GRAPHICS must contain a shader stage using the `ClusterCullingHUAWEI` `Execution` `Model`

Valid Usage (Implicit)

- VUID-vkCmdDrawClusterHUAWEI-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdDrawClusterHUAWEI-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdDrawClusterHUAWEI-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdDrawClusterHUAWEI-renderpass
  This command must only be called inside of a render pass instance

- VUID-vkCmdDrawClusterHUAWEI-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdDrawClusterHUAWEI-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Inside | Outside | VK_QUEUE_GRAPHICS_BIT | Action

Conditional Rendering

vkCmdDrawClusterHUAWEI is affected by conditional rendering

To record an indirect cluster culling drawing command, call:

    // Provided by VK_HUAWEI_cluster_culling_shader
    void vkCmdDrawClusterIndirectHUAWEI(
        VkCommandBuffer                             commandBuffer,
        VkBuffer                                    buffer,
        VkDeviceSize                                offset);

- `commandBuffer` is the command buffer into which the command is recorded.

- `buffer` is the buffer containing draw parameters.

- `offset` is the byte offset into `buffer` where parameters begin.

`vkCmdDrawClusterIndirectHUAWEI` behaves similarly to vkCmdDrawClusterHUAWEI except that the parameters are read by the device from a buffer during execution. The parameters of the dispatch are encoded in a VkDispatchIndirectCommand structure taken from buffer starting at offset. Note the cluster culling shader pipeline only accepts vkCmdDrawClusterHUAWEI and `vkCmdDrawClusterIndirectHUAWEI` as drawing commands.

Valid Usage

- VUID-vkCmdDrawClusterIndirectHUAWEI-magFilter-04553
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdDrawClusterIndirectHUAWEI-magFilter-09598
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdDrawClusterIndirectHUAWEI-mipmapMode-04770
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdDrawClusterIndirectHUAWEI-mipmapMode-09599
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdDrawClusterIndirectHUAWEI-unnormalizedCoordinates-09635
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `levelCount` and `layerCount` must be 1

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-08609
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `viewType` must be VK_IMAGE_VIEW_TYPE_1D or VK_IMAGE_VIEW_TYPE_2D

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-08610
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions with `ImplicitLod`, `Dref` or `Proj` in their name

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-08611
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions that includes a LOD bias or any offset values

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-06479
  If a VkImageView is sampled with depth comparison, the image view’s format features must contain VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-02691
  If a VkImageView is accessed using atomic operations as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-07888
  If a VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER descriptor is accessed using atomic operations as a result of this command, then the storage texel buffer’s format features must contain VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-02692
  If a VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-02693
  If the VK_EXT_filter_cubic extension is not enabled and any VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, it must not have a VkImageViewType of VK_IMAGE_VIEW_TYPE_3D, VK_IMAGE_VIEW_TYPE_CUBE, or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY

- VUID-vkCmdDrawClusterIndirectHUAWEI-filterCubic-02694
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have a VkImageViewType and format that supports cubic filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubic` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdDrawClusterIndirectHUAWEI-filterCubicMinmax-02695
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX as a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubicMinmax` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdDrawClusterIndirectHUAWEI-cubicRangeClamp-09212
  If the `cubicRangeClamp` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must not have a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM

- VUID-vkCmdDrawClusterIndirectHUAWEI-reductionMode-09213
  Any VkImageView being sampled with a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM as a result of this command must sample with VK_FILTER_CUBIC_EXT

- VUID-vkCmdDrawClusterIndirectHUAWEI-selectableCubicWeights-09214
  If the `selectableCubicWeights` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have VkSamplerCubicWeightsCreateInfoQCOM::`cubicWeights` equal to VK_CUBIC_FILTER_WEIGHTS_CATMULL_ROM_QCOM

- VUID-vkCmdDrawClusterIndirectHUAWEI-flags-02696
  Any VkImage created with a VkImageCreateInfo::`flags` containing VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV sampled as a result of this command must only be sampled using a VkSamplerAddressMode of VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawClusterIndirectHUAWEI-OpTypeImage-07027
  For any VkImageView being written as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawClusterIndirectHUAWEI-OpTypeImage-07028
  For any VkImageView being read as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawClusterIndirectHUAWEI-OpTypeImage-07029
  For any VkBufferView being written as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown`, the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawClusterIndirectHUAWEI-OpTypeImage-07030
  Any VkBufferView being read as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown` then the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-08600
  If a a bound shader was created with a pipeline layout and statically uses a set n, a descriptor set must have been bound to n at the same pipeline bind point, with layouts compatible for set n with the layout(s) used to create the shader, as described in Pipeline Layout Compatibility

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-08601
  If a a bound shader was created with a pipeline layout or specified push constant ranges and statically uses a push constant value, that value must have been set for the same pipeline bind point, with push constant ranges that are compatible with the push constant range used to create the shader

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-10068
  For each array of resources that is used by a bound shader, the indices used to access members of the array must be less than the descriptor count for the identified binding in the descriptor sets used by this command

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-08114
  Descriptors in each bound descriptor set, specified via vkCmdBindDescriptorSets, must be valid if they are accessed as described by descriptor validity by the VkPipeline bound to the pipeline bind point used by this command and the bound VkPipeline was not created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawClusterIndirectHUAWEI-imageLayout-00344
  If an image descriptor is accessed by a shader, the VkImageLayout must match the subresource accessible from the VkImageView as defined by the image layout matching rules

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-08115
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdBindDescriptorSets, the bound VkPipeline must have been created without VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-08116
  Descriptors in bound descriptor buffers, specified via vkCmdSetDescriptorBufferOffsetsEXT, must be valid if they are dynamically accessed

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-08117
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdSetDescriptorBufferOffsetsEXT, the bound VkPipeline must have been created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-08119
  If a descriptor is dynamically used with a VkPipeline created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-08605
  If a descriptor is dynamically used with a VkShaderEXT created with a `VkDescriptorSetLayout` that was created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-08606
  If the `shaderObject` feature is not enabled, a valid pipeline must be bound to the pipeline bind point used by this command

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-08608
  If a pipeline is bound to the pipeline bind point used by this command, there must not have been any calls to dynamic state setting commands for any state specified statically in the VkPipeline object bound to the pipeline bind point used by this command, since that pipeline was bound

- VUID-vkCmdDrawClusterIndirectHUAWEI-uniformBuffers-06935
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-08612
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawClusterIndirectHUAWEI-storageBuffers-06936
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-08613
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a storage buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDrawClusterIndirectHUAWEI-commandBuffer-02707
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, any resource accessed by bound shaders must not be a protected resource

- VUID-vkCmdDrawClusterIndirectHUAWEI-viewType-07752
  If a VkImageView is accessed as a result of this command, then the image view’s `viewType` must match the `Dim` operand of the `OpTypeImage` as described in Compatibility Between SPIR-V Image Dimensions and Vulkan ImageView Types

- VUID-vkCmdDrawClusterIndirectHUAWEI-format-07753
  If a VkImageView or VkBufferView is accessed as a result of this command, then the numeric type of the view’s `format` and the `Sampled` `Type` operand of the `OpTypeImage` must match

- VUID-vkCmdDrawClusterIndirectHUAWEI-OpImageWrite-08795
  If a VkImageView created with a format other than VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the image view’s format

- VUID-vkCmdDrawClusterIndirectHUAWEI-OpImageWrite-08796
  If a VkImageView created with the format VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have four components

- VUID-vkCmdDrawClusterIndirectHUAWEI-OpImageWrite-04469
  If a VkBufferView is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the buffer view’s format

- VUID-vkCmdDrawClusterIndirectHUAWEI-SampledType-04470
  If a VkImageView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdDrawClusterIndirectHUAWEI-SampledType-04471
  If a VkImageView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdDrawClusterIndirectHUAWEI-SampledType-04472
  If a VkBufferView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdDrawClusterIndirectHUAWEI-SampledType-04473
  If a VkBufferView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdDrawClusterIndirectHUAWEI-sparseImageInt64Atomics-04474
  If the `sparseImageInt64Atomics` feature is not enabled, VkImage objects created with the VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdDrawClusterIndirectHUAWEI-sparseImageInt64Atomics-04475
  If the `sparseImageInt64Atomics` feature is not enabled, VkBuffer objects created with the VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdDrawClusterIndirectHUAWEI-OpImageSampleWeightedQCOM-06971
  If `OpImageSampleWeightedQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_SAMPLED_IMAGE_BIT_QCOM

- VUID-vkCmdDrawClusterIndirectHUAWEI-OpImageSampleWeightedQCOM-06972
  If `OpImageSampleWeightedQCOM` uses a VkImageView as a sample weight image as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_IMAGE_BIT_QCOM

- VUID-vkCmdDrawClusterIndirectHUAWEI-OpImageBoxFilterQCOM-06973
  If `OpImageBoxFilterQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BOX_FILTER_SAMPLED_BIT_QCOM

- VUID-vkCmdDrawClusterIndirectHUAWEI-OpImageBlockMatchSSDQCOM-06974
  If `OpImageBlockMatchSSDQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdDrawClusterIndirectHUAWEI-OpImageBlockMatchSADQCOM-12420
  If `OpImageBlockMatchSADQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdDrawClusterIndirectHUAWEI-OpImageBlockMatchSADQCOM-06976
  If `OpImageBlockMatchSADQCOM` or OpImageBlockMatchSSDQCOM is used to read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdDrawClusterIndirectHUAWEI-OpImageSampleWeightedQCOM-06977
  If `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdDrawClusterIndirectHUAWEI-OpImageSampleWeightedQCOM-06978
  If any command other than `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must not have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdDrawClusterIndirectHUAWEI-OpImageBlockMatchWindow-09215
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM

- VUID-vkCmdDrawClusterIndirectHUAWEI-OpImageBlockMatchWindow-09216
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format must be a single-component format

- VUID-vkCmdDrawClusterIndirectHUAWEI-OpImageBlockMatchWindow-09217
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdDrawClusterIndirectHUAWEI-OpImageBlockMatchWindow-12421
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the `blockMatchExtendedClampToEdge` feature is not enabled, the input sampler must not have been created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawClusterIndirectHUAWEI-addressModeU-12422
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the input sampler was created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, then the sampler must have been created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-07288
  Any shader invocation executed by this command must terminate

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-09600
  If a descriptor with type equal to any of VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, or VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT is accessed as a result of this command, all image subresources identified by that descriptor must be in the image layout identified when the descriptor was written

- VUID-vkCmdDrawClusterIndirectHUAWEI-micromap-11636
  If an acceleration structure is accessed as a result of this command through an `OpRayQueryProceedKHR` operation , the `VK_EXT_opacity_micromap` extension is not enabled, and the acceleration structure is built using geometry with a VkAccelerationStructureTrianglesOpacityMicromapKHR structure included in its `pNext` chain, the shader must have specified a `OpacityMicromapIdKHR` execution mode with its specialization constant operand equal to VK_TRUE

- VUID-vkCmdDrawClusterIndirectHUAWEI-micromap-11637
  If an acceleration structure is accessed as a result of this command and the acceleration structure was constructed through deserialization, all micromap arrays referenced by the acceleration structure that were not replaced by an acceleration structure update command must have been deserialized using the serialized data of the corresponding micromaps used to originally build the acceleration structure prior to the execution of this command on the device

- VUID-vkCmdDrawClusterIndirectHUAWEI-micromap-11638
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkPipeline bound to the pipeline bind point used by this command must not have been created with `flags` that includes VK_PIPELINE_CREATE_2_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_KHR

- VUID-vkCmdDrawClusterIndirectHUAWEI-micromap-11639
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkShaderEXT that accessed the descriptor must not have been created with `flags` that includes VK_SHADER_CREATE_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_EXT

- VUID-vkCmdDrawClusterIndirectHUAWEI-commandBuffer-10746
  The `VkDeviceMemory` object allocated from a `VkMemoryHeap` with the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property that is bound to a resource accessed as a result of this command must be the active bound tile memory object in `commandBuffer`

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-10678
  If this command is recorded inside a tile shading render pass instance, the stages corresponding to the pipeline bind point used by this command must only include VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_FRAGMENT_BIT, and/or VK_SHADER_STAGE_COMPUTE_BIT

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-10679
  If this command is recorded where per-tile execution model is enabled, there must be no access to any image while the image was be transitioned to the VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT layout

- VUID-vkCmdDrawClusterIndirectHUAWEI-pDescription-09900
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the underlying VkTensorARM object must have been created with the VK_TENSOR_USAGE_SHADER_BIT_ARM usage flag set

- VUID-vkCmdDrawClusterIndirectHUAWEI-dimensionCount-09905
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the `Rank` of the `OpTypeTensorARM` of the tensor resource variable must be equal to the `dimensionCount` provided via VkTensorCreateInfoARM::`pDescription` when creating the underlying VkTensorARM object

- VUID-vkCmdDrawClusterIndirectHUAWEI-OpTypeTensorARM-09906
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the element type of the `OpTypeTensorARM` of the tensor resource variable must be compatible with the VkFormat of the VkTensorViewARM used for the access

- VUID-vkCmdDrawClusterIndirectHUAWEI-OpTensorReadARM-12462
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, using `OpTensorReadARM` or `OpTensorWriteARM`, and the underlying VkTensorARM object was created with a VK_TENSOR_TILING_BRICK_16_WIDE_ARM, VK_TENSOR_TILING_BRICK_8_WIDE_ARM, VK_TENSOR_TILING_BRICK_4_WIDE_ARM, VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_ARM, or VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_64K_ARM VkTensorTilingARM, and the object read or written is an array, then the innermost coordinate provided to `OpTensorReadARM` or `OpTensorWriteARM` via the `Coordinates` operand must be a multiple of the largest power of 2 that is less than or equal to the number of components of the array

- VUID-vkCmdDrawClusterIndirectHUAWEI-pNext-12463
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command and the corresponding VkTensorARM object was created with a VkTensorRollingBackingCreateInfoARM structure in the `pNext` chain of VkTensorCreateInfoARM, then the number of elements accessed with one `OpTensorReadARM` or `OpTensorWriteARM`, must be less than or equal to the number of elements available from the starting coordinate in the rolling backing along the innermost dimension, defined as `wraps`[`dimensionCount` - 1] - InnermostCoordinate % `wraps`[`dimensionCount` - 1] where InnermostCoordinate is the last component of the coordinates array provided via the `Coordinates` operand

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-12472
  Descriptors dynamically accessed in bound descriptor heaps must be valid

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-11297
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a `OpTypeStruct` decorated with `Block` or `BufferBlock` using that mapping, the calculated offset for the resource heap must be a multiple of `bufferDescriptorAlignment`

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-11298
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeImage` or `OpTypeSampledImage` using that mapping, the calculated offset for the resource heap must be a multiple of `imageDescriptorAlignment`

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-11299
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeSampler` or `OpTypeSampledImage` using that mapping, the calculated offset for the sampler heap must be a multiple of `samplerDescriptorAlignment`

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-11397
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeTensorARM` using that mapping, the calculated offset for the resource heap must be a multiple of `tensorDescriptorAlignment`

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-11300
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 4

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-11301
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-11302
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-11304
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 8

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-11305
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-11306
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address pointed to by the address in push data must be a valid VkDeviceAddress

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-11308
  For each descriptor heap that is statically used by a bound shader, either directly or via a descriptor mapping, a valid descriptor heap must be bound

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-11309
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, execution of this command must not result in any descriptor read accessing data outside of the user range of the respective heap bound by `vkCmdBind*HeapEXT` commands

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-11372
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer or uniform texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified via VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-11373
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer or storage texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-11374
  If the `robustBufferAccess2` feature is not enabled, the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, uniform texel buffer, storage buffer, or storage texel buffer, that shader must not access values outside of the range of the buffer as specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDrawClusterIndirectHUAWEI-pBindInfo-11375
  If any bound shader uses an embedded sampler via a descriptor mapping, the value of `pBindInfo->reservedRangeSize` set for vkCmdBindSamplerHeapEXT must be greater than or equal to `minSamplerHeapReservedRangeWithEmbedded`

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-11376
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, and that shader statically uses a push constant value, that value must have been set by vkCmdPushDataEXT

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-11398
  If a bound shader was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the access must not be out of bounds

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-11437
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the buffer from which the address in push data was queried must have been created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-11438
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-11441
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must be aligned to `minUniformBufferOffsetAlignment`

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-11439
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_STORAGE_BUFFER_BIT usage flag set

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-11442
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must be aligned to `minStorageBufferOffsetAlignment`

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-11485
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses an acceleration structure using that mapping, the address that the acceleration structure is mapped to must be an acceleration structure address retrieved from a VkAccelerationStructureKHR object via vkGetAccelerationStructureDeviceAddressKHR or handle retrieved from a VkAccelerationStructureNV object via vkGetAccelerationStructureHandleNV

- VUID-vkCmdDrawClusterIndirectHUAWEI-index-11450
  If a shader uses a sampler descriptor to sample an image as a result of this command, and that sampler descriptor uses a custom border color with an index defined by VkSamplerCustomBorderColorIndexCreateInfoEXT, the value of VkSamplerCustomBorderColorIndexCreateInfoEXT::`index` must have been registered before this command was recorded, and still be registered during the sampling operation, with an identically defined color

- VUID-vkCmdDrawClusterIndirectHUAWEI-protectedNoFault-11455
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, the address that the resource is mapped to must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdDrawClusterIndirectHUAWEI-protectedNoFault-11456
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, the address of the indirect memory must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdDrawClusterIndirectHUAWEI-renderPass-02684
  The current render pass must be compatible with the `renderPass` member of the `VkGraphicsPipelineCreateInfo` structure specified when creating the `VkPipeline` bound to VK_PIPELINE_BIND_POINT_GRAPHICS

- VUID-vkCmdDrawClusterIndirectHUAWEI-subpass-02685
  The subpass index of the current render pass must be equal to the `subpass` member of the `VkGraphicsPipelineCreateInfo` structure specified when creating the `VkPipeline` bound to VK_PIPELINE_BIND_POINT_GRAPHICS

- VUID-vkCmdDrawClusterIndirectHUAWEI-OpTypeImage-07468
  If any shader executed by this pipeline accesses an `OpTypeImage` variable with a `Dim` operand of `SubpassData`, it must be decorated with an `InputAttachmentIndex` that corresponds to a valid input attachment in the current subpass

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-07469
  Input attachment views accessed in a subpass must be created with the same VkFormat as the corresponding subpass definition, and be created with a VkImageView that is compatible with the attachment referenced by the subpass' `pInputAttachments`[`InputAttachmentIndex`] in the bound VkFramebuffer as specified by Fragment Input Attachment Compatibility

- VUID-vkCmdDrawClusterIndirectHUAWEI-pDepthInputAttachmentIndex-09595
  Input attachment views accessed in a dynamic render pass with a `InputAttachmentIndex` referenced by VkRenderingInputAttachmentIndexInfo, or no `InputAttachmentIndex` if VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` or VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` are `NULL`, must be created with a VkImageView that is compatible with the corresponding color, depth, or stencil attachment in VkRenderingInfo

- VUID-vkCmdDrawClusterIndirectHUAWEI-pDepthInputAttachmentIndex-09596
  Input attachment views accessed in a dynamic render pass via a shader object must have an `InputAttachmentIndex` if both VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` and VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` are non-`NULL`

- VUID-vkCmdDrawClusterIndirectHUAWEI-InputAttachmentIndex-09597
  If an input attachment view accessed in a dynamic render pass via a shader object has an `InputAttachmentIndex`, the `InputAttachmentIndex` must match an index in VkRenderingInputAttachmentIndexInfo

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-06537
  Memory backing image subresources used as attachments in the current render pass must not be written in any way other than as an attachment by this command

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-10795
  If a color attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_COLOR_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-10796
  If a depth attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_DEPTH_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-10797
  If a stencil attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_STENCIL_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-12338
  If a color attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_COLOR_BIT on that attachment, the color attachment must not be written to by this command

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-12339
  If a depth attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_DEPTH_BIT on that attachment, the depth attachment must not be written to by this command

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-12340
  If a stencil attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_STENCIL_BIT on that attachment, the stencil attachment must not be written to by this command

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-09003
  If an attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, it must not be accessed in any way other than as an attachment, storage image, or sampled image by this command

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-06886
  If the current render pass instance uses a depth/stencil attachment with a read-only layout for the depth aspect, depth writes must be disabled

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-06887
  If the current render pass instance uses a depth/stencil attachment with a read-only layout for the stencil aspect, both front and back `writeMask` are not zero, and stencil test is enabled, all stencil ops must be VK_STENCIL_OP_KEEP

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-07831
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT dynamic state enabled then vkCmdSetViewport must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-07832
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SCISSOR dynamic state enabled then vkCmdSetScissor must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-08617
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_WIDTH dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineWidth must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-07834
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BIAS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthBiasEnable` is VK_TRUE, then vkCmdSetDepthBias or vkCmdSetDepthBias2EXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-07835
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_BLEND_CONSTANTS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and an active color attachment current value of `blendEnable` is VK_TRUE with a blend equations where any VkBlendFactor member is VK_BLEND_FACTOR_CONSTANT_COLOR, VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR, VK_BLEND_FACTOR_CONSTANT_ALPHA, or VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA, then vkCmdSetBlendConstants must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-07836
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BOUNDS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthBoundsTestEnable` is VK_TRUE, then vkCmdSetDepthBounds must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-07837
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilCompareMask must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-07838
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_WRITE_MASK dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilWriteMask must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-07839
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_REFERENCE dynamic state enabled, the current value of and `rasterizerDiscardEnable` is VK_FALSE, the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilReference must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterIndirectHUAWEI-maxMultiviewInstanceIndex-02688
  If the draw is recorded in a render pass instance with multiview enabled, the maximum instance index must be less than or equal to VkPhysicalDeviceMultiviewProperties::`maxMultiviewInstanceIndex`

- VUID-vkCmdDrawClusterIndirectHUAWEI-sampleLocationsEnable-02689
  If the bound graphics pipeline was created with VkPipelineSampleLocationsStateCreateInfoEXT::`sampleLocationsEnable` set to VK_TRUE, then the active depth attachment must have been created with the VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit set

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-07634
  If the `VK_EXT_sample_locations` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetSampleLocationsEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-06666
  If the `VK_EXT_sample_locations` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `sampleLocationsEnable` is VK_TRUE, then vkCmdSetSampleLocationsEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-07840
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_CULL_MODE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCullMode must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-07841
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRONT_FACE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetFrontFace must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-07843
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, vkCmdSetDepthTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-07844
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthTestEnable` is VK_TRUE, then vkCmdSetDepthWriteEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-07845
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_COMPARE_OP dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthTestEnable` is VK_TRUE, then vkCmdSetDepthCompareOp must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-07846
  If the `depthBounds` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthBoundsTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-07847
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetStencilTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-07848
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_OP dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilOp must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterIndirectHUAWEI-viewportCount-03417
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, and the state is not inherited, then vkCmdSetViewportWithCount must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterIndirectHUAWEI-scissorCount-03418
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT dynamic state enabled, and the state is not inherited, then vkCmdSetScissorWithCount must have been called and not subsequently invalidated in the current command buffer prior to this drawing

- VUID-vkCmdDrawClusterIndirectHUAWEI-viewportCount-03419
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with both the VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic states enabled, and the state is not inherited, then the `viewportCount` parameter of `vkCmdSetViewportWithCount` must match the `scissorCount` parameter of `vkCmdSetScissorWithCount`

- VUID-vkCmdDrawClusterIndirectHUAWEI-viewportCount-04137
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportWScalingStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawClusterIndirectHUAWEI-viewportCount-04138
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, the current value of `viewportWScalingEnable` is VK_TRUE, then vkCmdSetViewportWScalingNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-08636
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, the current value of `viewportWScalingEnable` is VK_TRUE, then the `viewportCount` parameter in the last call to vkCmdSetViewportWScalingNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawClusterIndirectHUAWEI-viewportCount-04139
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportShadingRateImageStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawClusterIndirectHUAWEI-shadingRateImage-09233
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_COARSE_SAMPLE_ORDER_NV and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoarseSampleOrderNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterIndirectHUAWEI-shadingRateImage-09234
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `shadingRateImageEnable` is VK_TRUE, then vkCmdSetViewportShadingRatePaletteNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-08637
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `shadingRateImageEnable` is VK_TRUE, then the `viewportCount` parameter in the last call to vkCmdSetViewportShadingRatePaletteNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawClusterIndirectHUAWEI-VkPipelineVieportCreateInfo-04141
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled and a VkPipelineViewportSwizzleStateCreateInfoNV structure chained from VkPipelineViewportStateCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportSwizzleStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawClusterIndirectHUAWEI-VkPipelineVieportCreateInfo-04142
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled and a VkPipelineViewportExclusiveScissorStateCreateInfoNV structure chained from VkPipelineViewportStateCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportExclusiveScissorStateCreateInfoNV::`exclusiveScissorCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-07878
  If the `exclusiveScissor` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_ENABLE_NV dynamic state enabled, then vkCmdSetExclusiveScissorEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-07879
  If the `exclusiveScissor` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_NV dynamic state enabled, and the most recent call to vkCmdSetExclusiveScissorEnableNV in the current command buffer set any element of `pExclusiveScissorEnables` to VK_TRUE, then vkCmdSetExclusiveScissorNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-04876
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE dynamic state enabled, then vkCmdSetRasterizerDiscardEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-04877
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthBiasEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterIndirectHUAWEI-logicOp-04878
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LOGIC_OP_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `logicOpEnable` is VK_TRUE, then vkCmdSetLogicOpEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterIndirectHUAWEI-primitiveFragmentShadingRateWithMultipleViewports-04552
  If the `primitiveFragmentShadingRateWithMultipleViewports` limit is not supported, the bound graphics pipeline was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, and any of the shader stages of the bound graphics pipeline write to the `PrimitiveShadingRateKHR` built-in, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and the `viewportCount` parameter of `vkCmdSetViewportWithCount` must be `1`

- VUID-vkCmdDrawClusterIndirectHUAWEI-primitiveFragmentShadingRateWithMultipleViewports-08642
  If the `primitiveFragmentShadingRateWithMultipleViewports` limit is not supported, and any shader object bound to a graphics stage writes to the `PrimitiveShadingRateKHR` built-in, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and the `viewportCount` parameter of `vkCmdSetViewportWithCount` must be `1`

- VUID-vkCmdDrawClusterIndirectHUAWEI-blendEnable-04727
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, then for each color attachment, if the corresponding image view’s format features do not contain VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT, then the corresponding current value of `blendEnable` must be VK_FALSE

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-08644
  If a shader object is bound to any graphics stage or a graphics pipeline is bound, the current value of `rasterizerDiscardEnable` is VK_FALSE, and none of the following is enabled:

  - the `VK_AMD_mixed_attachment_samples` extension

  - the `VK_NV_framebuffer_mixed_samples` extension

  - the `multisampledRenderToSingleSampled` feature

  then the current value of `rasterizationSamples` must be the same as the current color and/or depth/stencil attachments

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-08876
  If a shader object is bound to any graphics stage, the current render pass instance must have been begun with vkCmdBeginRendering

- VUID-vkCmdDrawClusterIndirectHUAWEI-imageView-06172
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawClusterIndirectHUAWEI-imageView-06173
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawClusterIndirectHUAWEI-imageView-06174
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawClusterIndirectHUAWEI-imageView-06175
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawClusterIndirectHUAWEI-imageView-06176
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdDrawClusterIndirectHUAWEI-imageView-06177
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdDrawClusterIndirectHUAWEI-viewMask-06178
  If the current render pass instance was begun with vkCmdBeginRendering, the bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::`viewMask` equal to VkRenderingInfo::`viewMask`

- VUID-vkCmdDrawClusterIndirectHUAWEI-colorAttachmentCount-06179
  If the `dynamicRenderingUnusedAttachments` feature is not enabled and the current render pass instance was begun with vkCmdBeginRendering, the bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::`colorAttachmentCount` equal to VkRenderingInfo::`colorAttachmentCount`

- VUID-vkCmdDrawClusterIndirectHUAWEI-dynamicRenderingUnusedAttachments-08910
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound graphics pipeline

- VUID-vkCmdDrawClusterIndirectHUAWEI-dynamicRenderingUnusedAttachments-08912
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` equal to VK_NULL_HANDLE must have the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound pipeline equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawClusterIndirectHUAWEI-dynamicRenderingUnusedAttachments-08911
  If the `dynamicRenderingUnusedAttachments` feature is enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound graphics pipeline, or the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats`, if it exists, must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawClusterIndirectHUAWEI-colorAttachmentCount-09362
  If the current render pass instance was begun with vkCmdBeginRendering, with a VkRenderingInfo::`colorAttachmentCount` equal to `1`, there is no shader object bound to any graphics stage, and a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, each element of the VkRenderingInfo::`pColorAttachments` array with a `resolveImageView` not equal to VK_NULL_HANDLE must have been created with an image created with a VkExternalFormatANDROID::`externalFormat` value equal to the VkExternalFormatANDROID::`externalFormat` value used to create the bound graphics pipeline

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-09363
  If there is no shader object bound to any graphics stage, the current render pass instance was begun with vkCmdBeginRendering and a VkRenderingInfo::`colorAttachmentCount` equal to `1`, and a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with an image created with a VkExternalFormatANDROID::`externalFormat` value equal to the VkExternalFormatANDROID::`externalFormat` value used to create the bound graphics pipeline

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-09364
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetColorBlendEnableEXT must have set the blend enable to VK_FALSE prior to this drawing command

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-09365
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetRasterizationSamplesEXT must have set `rasterizationSamples` to VK_SAMPLE_COUNT_1_BIT prior to this drawing command

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-09368
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetFragmentShadingRateKHR must have set `pFragmentSize->width` to `1` prior to this drawing command

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-09369
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetFragmentShadingRateKHR must have set `pFragmentSize->height` to `1` prior to this drawing command

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-07749
  If the `colorWriteEnable` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorWriteEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterIndirectHUAWEI-attachmentCount-07750
  If the `colorWriteEnable` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the `attachmentCount` parameter of most recent call to `vkCmdSetColorWriteEnableEXT` in the current command buffer must be greater than or equal to the number of active color attachments

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-07751
  If the `VK_EXT_discard_rectangles` extension is enabled, a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT dynamic state enabled and the `pNext` chain of VkGraphicsPipelineCreateInfo included a VkPipelineDiscardRectangleStateCreateInfoEXT structure, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for each discard rectangle in VkPipelineDiscardRectangleStateCreateInfoEXT::`discardRectangleCount`

- VUID-vkCmdDrawClusterIndirectHUAWEI-rasterizerDiscardEnable-09236
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT dynamic state enabled and the `pNext` chain of VkGraphicsPipelineCreateInfo did not include a VkPipelineDiscardRectangleStateCreateInfoEXT structure, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for each discard rectangle in VkPhysicalDeviceDiscardRectanglePropertiesEXT::`maxDiscardRectangles`

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-07880
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDiscardRectangleEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-07881
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_MODE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterIndirectHUAWEI-dynamicRenderingUnusedAttachments-08913
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->imageView` was VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawClusterIndirectHUAWEI-dynamicRenderingUnusedAttachments-08914
  If current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawClusterIndirectHUAWEI-dynamicRenderingUnusedAttachments-08915
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, and the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->imageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawClusterIndirectHUAWEI-dynamicRenderingUnusedAttachments-08916
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->imageView` was VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawClusterIndirectHUAWEI-dynamicRenderingUnusedAttachments-08917
  If current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawClusterIndirectHUAWEI-dynamicRenderingUnusedAttachments-08918
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, and the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->imageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawClusterIndirectHUAWEI-imageView-06183
  If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentShadingRateAttachmentInfoKHR::`imageView` was not VK_NULL_HANDLE, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

- VUID-vkCmdDrawClusterIndirectHUAWEI-dynamicRenderingLocalRead-11797
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingLocalRead` feature is enabled, the VK_RENDERING_LOCAL_READ_CONCURRENT_ACCESS_CONTROL_BIT_KHR flag is specified, and an attachment is being used as a feedback loop as specified by VK_RENDERING_ATTACHMENT_INPUT_ATTACHMENT_FEEDBACK_BIT_KHR, VkRenderingAttachmentFlagsInfoKHR::`flags` for that attachment must include VK_RENDERING_ATTACHMENT_INPUT_ATTACHMENT_FEEDBACK_BIT_KHR

- VUID-vkCmdDrawClusterIndirectHUAWEI-imageView-06184
  If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentDensityMapAttachmentInfoEXT::`imageView` was not VK_NULL_HANDLE, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT

- VUID-vkCmdDrawClusterIndirectHUAWEI-layers-10831
  If the current render pass instance was created with VK_RENDERING_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE or VK_RENDER_PASS_CREATE_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE, and the bound graphics pipeline was created with VK_PIPELINE_CREATE_2_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE, then the current render pass instance must have a `layers` value less than or equal to VkPipelineFragmentDensityMapLayeredCreateInfoVALVE::`maxFragmentDensityMapLayers`

- VUID-vkCmdDrawClusterIndirectHUAWEI-colorAttachmentCount-06185
  If the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with a sample count equal to the corresponding element of the `pColorAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline

- VUID-vkCmdDrawClusterIndirectHUAWEI-pDepthAttachment-06186
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of the `depthStencilAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawClusterIndirectHUAWEI-pStencilAttachment-06187
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of the `depthStencilAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawClusterIndirectHUAWEI-multisampledRenderToSingleSampled-07285
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with a sample count equal to the value of `rasterizationSamples` for the bound graphics pipeline

- VUID-vkCmdDrawClusterIndirectHUAWEI-multisampledRenderToSingleSampled-07286
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdDrawClusterIndirectHUAWEI-multisampledRenderToSingleSampled-07287
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdDrawClusterIndirectHUAWEI-pNext-07935
  If this command is called inside a render pass instance started with vkCmdBeginRendering, and the `pNext` chain of VkRenderingInfo includes a VkMultisampledRenderToSingleSampledInfoEXT structure with `multisampledRenderToSingleSampledEnable` equal to VK_TRUE, then the value of `rasterizationSamples` for the bound graphics pipeline must be equal to VkMultisampledRenderToSingleSampledInfoEXT::`rasterizationSamples`

- VUID-vkCmdDrawClusterIndirectHUAWEI-renderPass-06198
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline must have been created with a VkGraphicsPipelineCreateInfo::`renderPass` equal to VK_NULL_HANDLE

- VUID-vkCmdDrawClusterIndirectHUAWEI-pColorAttachments-08963
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound with a fragment shader that statically writes to a color attachment, the color write mask is not zero, color writes are enabled, and the corresponding element of the VkRenderingInfo::`pColorAttachments->imageView` was not VK_NULL_HANDLE, then the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawClusterIndirectHUAWEI-pColorAttachments-11539
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound with a fragment shader that statically writes to a color attachment, the color write mask is not zero, color writes are enabled, and the corresponding element of the VkRenderingInfo::`pColorAttachments->resolveImageView` was not VK_NULL_HANDLE, then the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawClusterIndirectHUAWEI-pDepthAttachment-08964
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound, depth test is enabled, and the VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, then the VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawClusterIndirectHUAWEI-pDepthAttachment-11540
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound, depth test is enabled, and the VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, then the VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawClusterIndirectHUAWEI-pStencilAttachment-08965
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound, stencil test is enabled and the VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, then the VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawClusterIndirectHUAWEI-pStencilAttachment-11860
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound, stencil test is enabled and the VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, then the VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawClusterIndirectHUAWEI-flags-10582
  If the current render pass instance was begun with a vkCmdBeginRendering call in `commandBuffer`, its VkRenderingInfo::`flags` parameter must not have VK_RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT set unless VK_RENDERING_CONTENTS_INLINE_BIT_KHR is also set

- VUID-vkCmdDrawClusterIndirectHUAWEI-primitivesGeneratedQueryWithRasterizerDiscard-06708
  If the `primitivesGeneratedQueryWithRasterizerDiscard` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, rasterization discard must not be enabled

- VUID-vkCmdDrawClusterIndirectHUAWEI-primitivesGeneratedQueryWithNonZeroStreams-06709
  If the `primitivesGeneratedQueryWithNonZeroStreams` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, the bound graphics pipeline must not have been created with a non-zero value in `VkPipelineRasterizationStateStreamCreateInfoEXT`::`rasterizationStream`

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-07620
  If the `depthClamp` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLAMP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthClampEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-07621
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_POLYGON_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetPolygonModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-07622
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetRasterizationSamplesEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-07623
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetSampleMaskEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterIndirectHUAWEI-alphaToCoverageEnable-08919
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT dynamic state enabled, and `alphaToCoverageEnable` was VK_TRUE in the last call to vkCmdSetAlphaToCoverageEnableEXT, then the Fragment Output Interface must contain a variable for the alpha `Component` word in `Location` 0 at `Index` 0

- VUID-vkCmdDrawClusterIndirectHUAWEI-alphaToCoverageEnable-08920
  If a shader object is bound to any graphics stage, and the most recent call to vkCmdSetAlphaToCoverageEnableEXT in the current command buffer set `alphaToCoverageEnable` to VK_TRUE, then the Fragment Output Interface must contain a variable for the alpha `Component` word in `Location` 0 at `Index` 0

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-07624
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAlphaToCoverageEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-07625
  If the `alphaToOne` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ALPHA_TO_ONE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAlphaToOneEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-07626
  If the `logicOp` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LOGIC_OP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetLogicOpEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-07627
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and there are color attachments bound, then vkCmdSetColorBlendEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-07629
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and there are color attachments bound, then vkCmdSetColorWriteMaskEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-07630
  If the `geometryStreams` feature is enabled, and a shader object is bound to the VK_SHADER_STAGE_GEOMETRY_BIT stage or a graphics pipeline is bound which was created with both a VK_SHADER_STAGE_GEOMETRY_BIT stage and the VK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXT dynamic state enabled, then vkCmdSetRasterizationStreamEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-07631
  If the `VK_EXT_conservative_rasterization` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_CONSERVATIVE_RASTERIZATION_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetConservativeRasterizationModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-07632
  If the `VK_EXT_conservative_rasterization` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXTRA_PRIMITIVE_OVERESTIMATION_SIZE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `conservativeRasterizationMode` is VK_CONSERVATIVE_RASTERIZATION_MODE_OVERESTIMATE_EXT, then vkCmdSetExtraPrimitiveOverestimationSizeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterIndirectHUAWEI-conservativePointAndLineRasterization-07499
  If the `VK_EXT_conservative_rasterization` extension is enabled, `conservativePointAndLineRasterization` is not supported, a shader object is bound to any graphics stage or a graphics pipeline is bound, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line or point topology class, then the current value of `conservativeRasterizationMode` must be VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-07633
  If the `depthClipEnable` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLIP_ENABLE_EXT dynamic state, then vkCmdSetDepthClipEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-07636
  If the `VK_EXT_provoking_vertex` extension is enabled, a shader object is bound to the VK_SHADER_STAGE_VERTEX_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_PROVOKING_VERTEX_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetProvokingVertexModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-08666
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineRasterizationModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-08669
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineStippleEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-07849
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled and a shader object is bound to any graphics stage, or a bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stippledLineEnable` is VK_TRUE, then vkCmdSetLineStipple must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-10608
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic state enabled, the effective rasterization input topology is in the line topology class, and the current `lineRasterizationMode` is VK_LINE_RASTERIZATION_MODE_BRESENHAM or VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH, then the current `alphaToCoverageEnable`, `alphaToOneEnable` and `sampleShadingEnable` states must all be VK_FALSE

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-07639
  If the `depthClipControl` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLIP_NEGATIVE_ONE_TO_ONE_EXT dynamic state enabled, then vkCmdSetDepthClipNegativeOneToOneEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-09650
  If the `depthClampControl` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLAMP_RANGE_EXT dynamic state enabled, and the current value of `depthClampEnable` is VK_TRUE, then vkCmdSetDepthClampRangeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-07640
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_ENABLE_NV dynamic state enabled, then vkCmdSetViewportWScalingEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-07641
  If the `VK_NV_viewport_swizzle` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic state enabled, then vkCmdSetViewportSwizzleNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-07642
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageToColorEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-07643
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_LOCATION_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageToColorEnable` is VK_TRUE, then vkCmdSetCoverageToColorLocationNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-07644
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_MODE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageModulationModeNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-07645
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageModulationMode` is any value other than VK_COVERAGE_MODULATION_MODE_NONE_NV, then vkCmdSetCoverageModulationTableEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-07646
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageModulationTableEnable` is VK_TRUE, then vkCmdSetCoverageModulationTableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-07647
  If the `shadingRateImage` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SHADING_RATE_IMAGE_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetShadingRateImageEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterIndirectHUAWEI-pipelineFragmentShadingRate-09238
  If the `pipelineFragmentShadingRate` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetFragmentShadingRateKHR must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-07648
  If the `representativeFragmentTest` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_REPRESENTATIVE_FRAGMENT_TEST_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetRepresentativeFragmentTestEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-07649
  If the `coverageReductionMode` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageReductionModeNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterIndirectHUAWEI-rasterizationSamples-07471
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current subpass does not use any color and/or depth/stencil attachments, then the `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT must follow the rules for a zero-attachment subpass

- VUID-vkCmdDrawClusterIndirectHUAWEI-samples-07472
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state disabled, then the `samples` parameter in the last call to vkCmdSetSampleMaskEXT must be greater or equal to the VkPipelineMultisampleStateCreateInfo::`rasterizationSamples` parameter used to create the bound graphics pipeline

- VUID-vkCmdDrawClusterIndirectHUAWEI-samples-07473
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT state and VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT states enabled, then the `samples` parameter in the last call to vkCmdSetSampleMaskEXT must be greater or equal to the `rasterizationSamples` parameter in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-09211
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, or a shader object is bound to any graphics stage, and the current render pass instance includes a VkMultisampledRenderToSingleSampledInfoEXT structure with `multisampledRenderToSingleSampledEnable` equal to VK_TRUE, then the `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT must be the same as the `rasterizationSamples` member of that structure

- VUID-vkCmdDrawClusterIndirectHUAWEI-firstAttachment-07476
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic states enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the last call to vkCmdSetColorBlendEnableEXT in the current command buffer prior to this drawing command must have set a value for all active color attachments

- VUID-vkCmdDrawClusterIndirectHUAWEI-firstAttachment-07478
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT dynamic states enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the last call to vkCmdSetColorWriteMaskEXT in the current command buffer prior to this drawing command must have set a value for all active color attachments

- VUID-vkCmdDrawClusterIndirectHUAWEI-advancedBlendMaxColorAttachments-07480
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT and VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic states enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and an active color attachment current value of `blendEnable` is VK_TRUE, then the number of active color attachments must not exceed `advancedBlendMaxColorAttachments`

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-10862
  If a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT , but not the VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorBlendEquationEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawClusterIndirectHUAWEI-rasterizerDiscardEnable-10863
  If a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT, but not the VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorBlendAdvancedEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-10864
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT and VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then either vkCmdSetColorBlendAdvancedEXT or vkCmdSetColorBlendEquationEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdDrawClusterIndirectHUAWEI-primitivesGeneratedQueryWithNonZeroStreams-07481
  If the `primitivesGeneratedQueryWithNonZeroStreams` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, and the bound graphics pipeline was created with VK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXT state enabled, the last call to vkCmdSetRasterizationStreamEXT must have set the `rasterizationStream` to zero

- VUID-vkCmdDrawClusterIndirectHUAWEI-sampleLocationsPerPixel-07482
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state disabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then the `sampleLocationsPerPixel` member of `pSampleLocationsInfo` in the last call to vkCmdSetSampleLocationsEXT must equal the `rasterizationSamples` member of the VkPipelineMultisampleStateCreateInfo structure the bound graphics pipeline has been created with

- VUID-vkCmdDrawClusterIndirectHUAWEI-sampleLocationsPerPixel-07483
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then the `sampleLocationsPerPixel` member of `pSampleLocationsInfo` in the last call to vkCmdSetSampleLocationsEXT must equal the `rasterizationSamples` parameter of the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawClusterIndirectHUAWEI-sampleLocationsEnable-07484
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT then the current active depth attachment must have been created with the VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit set

- VUID-vkCmdDrawClusterIndirectHUAWEI-sampleLocationsEnable-07485
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, then the `sampleLocationsInfo.maxSampleLocationGridSize.width` in the last call to vkCmdSetSampleLocationsEXT must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.width` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling `rasterizationSamples`

- VUID-vkCmdDrawClusterIndirectHUAWEI-sampleLocationsEnable-07486
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, then the `sampleLocationsInfo.maxSampleLocationGridSize.height` in the last call to vkCmdSetSampleLocationsEXT must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.height` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling `rasterizationSamples`

- VUID-vkCmdDrawClusterIndirectHUAWEI-sampleLocationsEnable-07487
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, the fragment shader code must not statically use the extended instruction `InterpolateAtSample`

- VUID-vkCmdDrawClusterIndirectHUAWEI-sampleLocationsEnable-07936
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationGridSize.width` must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.width` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling the value of `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawClusterIndirectHUAWEI-sampleLocationsEnable-07937
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationGridSize.height` must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.height` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling the value of `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawClusterIndirectHUAWEI-sampleLocationsEnable-07938
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationsPerPixel` must equal `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdDrawClusterIndirectHUAWEI-coverageModulationTableEnable-07488
  If a shader object is bound to any graphics stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NV state enabled, and the last call to vkCmdSetCoverageModulationTableEnableNV set `coverageModulationTableEnable` to VK_TRUE, then the `coverageModulationTableCount` parameter in the last call to vkCmdSetCoverageModulationTableNV must equal the current `rasterizationSamples` divided by the number of color samples in the current active color attachment

- VUID-vkCmdDrawClusterIndirectHUAWEI-rasterizationSamples-07489
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, and if current subpass has a depth/stencil attachment and depth test, stencil test, or depth bounds test are enabled in the bound pipeline, then the current `rasterizationSamples` must be the same as the sample count of the depth/stencil attachment

- VUID-vkCmdDrawClusterIndirectHUAWEI-coverageToColorEnable-07490
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV state enabled and the last call to vkCmdSetCoverageToColorEnableNV set the `coverageToColorEnable` to VK_TRUE, then there must be an active color attachment at the location selected by the last call to vkCmdSetCoverageToColorLocationNV `coverageToColorLocation`, with a VkFormat of VK_FORMAT_R8_UINT, VK_FORMAT_R8_SINT, VK_FORMAT_R16_UINT, VK_FORMAT_R16_SINT, VK_FORMAT_R32_UINT, or VK_FORMAT_R32_SINT

- VUID-vkCmdDrawClusterIndirectHUAWEI-rasterizerDiscardEnable-09420
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, and a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, and the most recent call to vkCmdSetRasterizerDiscardEnable in the current command buffer set `rasterizerDiscardEnable` to VK_FALSE, and the last call to vkCmdSetCoverageToColorEnableNV set the `coverageToColorEnable` to VK_TRUE, then there must be an active color attachment at the location selected by the last call to vkCmdSetCoverageToColorLocationNV `coverageToColorLocation`, with a VkFormat of VK_FORMAT_R8_UINT, VK_FORMAT_R8_SINT, VK_FORMAT_R16_UINT, VK_FORMAT_R16_SINT, VK_FORMAT_R32_UINT, or VK_FORMAT_R32_SINT

- VUID-vkCmdDrawClusterIndirectHUAWEI-coverageReductionMode-07491
  If the `coverageReductionMode` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV or VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic states enabled, then the current values of `coverageReductionMode`, `rasterizationSamples`, the sample counts for the color and depth/stencil attachments (if the subpass has them) must be a valid combination returned by vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV

- VUID-vkCmdDrawClusterIndirectHUAWEI-viewportCount-07492
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportSwizzleStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawClusterIndirectHUAWEI-viewportCount-07493
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic states enabled then the `viewportCount` parameter in the last call to vkCmdSetViewportSwizzleNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawClusterIndirectHUAWEI-viewportCount-09421
  If the `VK_NV_viewport_swizzle` extension is enabled, and a shader object is bound to any graphics stage, then the `viewportCount` parameter in the last call to vkCmdSetViewportSwizzleNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdDrawClusterIndirectHUAWEI-rasterizationSamples-07494
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, and the `coverageReductionMode` feature is not enabled, or the current value of `coverageReductionMode` is not VK_COVERAGE_REDUCTION_MODE_TRUNCATE_NV, and the current value of `rasterizationSamples` is greater than sample count of the color attachment, then sample shading must be disabled

- VUID-vkCmdDrawClusterIndirectHUAWEI-stippledLineEnable-07495
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_RECTANGULAR, then the `stippledRectangularLines` feature must be enabled

- VUID-vkCmdDrawClusterIndirectHUAWEI-stippledLineEnable-07496
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_BRESENHAM, then the `stippledBresenhamLines` feature must be enabled

- VUID-vkCmdDrawClusterIndirectHUAWEI-stippledLineEnable-07497
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH, then the `stippledSmoothLines` feature must be enabled

- VUID-vkCmdDrawClusterIndirectHUAWEI-stippledLineEnable-07498
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_DEFAULT, then the `stippledRectangularLines` feature must be enabled and VkPhysicalDeviceLimits::`strictLines` must be VK_TRUE

- VUID-vkCmdDrawClusterIndirectHUAWEI-stage-07073
  If the bound pipeline was created with the VkPipelineShaderStageCreateInfo::`stage` member of an element of VkGraphicsPipelineCreateInfo::`pStages` set to VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT, then Mesh Shader Queries must not be active

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-08877
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ATTACHMENT_FEEDBACK_LOOP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAttachmentFeedbackLoopEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-07850
  If dynamic state was inherited from VkCommandBufferInheritanceViewportScissorInfoNV, it must be set in the current command buffer prior to this drawing command

- VUID-vkCmdDrawClusterIndirectHUAWEI-nextStage-10745
  For each shader object bound to a graphics stage, except for shader object bound to the last graphics stage in the logical pipeline, it must have been created with a `nextStage` including the corresponding bit to the shader object bound to the following graphics stage in the logical pipeline

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-08684
  If there is no bound graphics pipeline, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_VERTEX_BIT

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-08685
  If there is no bound graphics pipeline, and the `tessellationShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-08686
  If there is no bound graphics pipeline, and the `tessellationShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-08687
  If there is no bound graphics pipeline, and the `geometryShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_GEOMETRY_BIT

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-08688
  If there is no bound graphics pipeline, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_FRAGMENT_BIT

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-08689
  If there is no bound graphics pipeline, and the `taskShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TASK_BIT_EXT

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-08690
  If there is no bound graphics pipeline, and the `meshShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-08693
  If there is no bound graphics pipeline, and at least one of the `taskShader` and `meshShader` features is enabled, one of the VK_SHADER_STAGE_VERTEX_BIT or VK_SHADER_STAGE_MESH_BIT_EXT stages must have a valid `VkShaderEXT` bound, and the other must have no `VkShaderEXT` bound

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-08696
  If there is no bound graphics pipeline, and a valid `VkShaderEXT` is bound to the VK_SHADER_STAGE_VERTEX_BIT stage, there must be no `VkShaderEXT` bound to either the VK_SHADER_STAGE_TASK_BIT_EXT stage or the VK_SHADER_STAGE_MESH_BIT_EXT stage

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-08698
  If any graphics shader is bound which was created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag, then all shaders created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag in the same vkCreateShadersEXT call must also be bound

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-08699
  If any graphics shader is bound which was created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag, any stages in between stages whose shaders which did not create a shader with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag as part of the same vkCreateShadersEXT call must not have any `VkShaderEXT` bound

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-08878
  All bound graphics shader objects must have been created with identical or identically defined push constant ranges

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-08879
  All bound graphics shader objects must have either been created with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag set, or with identical or identically defined arrays of descriptor set layouts

- VUID-vkCmdDrawClusterIndirectHUAWEI-colorAttachmentCount-09372
  If the current render pass instance was begun with vkCmdBeginRendering and a VkRenderingInfo::`colorAttachmentCount` equal to `1`, a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, and a fragment shader is bound, it must not declare the `DepthReplacing` or `StencilRefReplacingEXT` execution modes

- VUID-vkCmdDrawClusterIndirectHUAWEI-pDynamicStates-08715
  If the bound graphics pipeline state includes a fragment shader stage, was created with VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`, and the fragment shader declares the `EarlyFragmentTests` execution mode and uses `OpDepthAttachmentReadEXT`, the `depthWriteEnable` parameter in the last call to vkCmdSetDepthWriteEnable must be VK_FALSE

- VUID-vkCmdDrawClusterIndirectHUAWEI-pDynamicStates-08716
  If the bound graphics pipeline state includes a fragment shader stage, was created with VK_DYNAMIC_STATE_STENCIL_WRITE_MASK set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`, and the fragment shader declares the `EarlyFragmentTests` execution mode and uses `OpStencilAttachmentReadEXT`, the `writeMask` parameter in the last call to vkCmdSetStencilWriteMask must be `0`

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-09116
  If a shader object is bound to any graphics stage or the bound graphics pipeline was created with VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT, and the format of any color attachment is VK_FORMAT_E5B9G9R9_UFLOAT_PACK32, the corresponding element of the `pColorWriteMasks` parameter of vkCmdSetColorWriteMaskEXT must either include all of VK_COLOR_COMPONENT_R_BIT, VK_COLOR_COMPONENT_G_BIT, VK_COLOR_COMPONENT_B_BIT, and VK_COLOR_COMPONENT_A_BIT, or none of them

- VUID-vkCmdDrawClusterIndirectHUAWEI-maxFragmentDualSrcAttachments-09239
  If blending is enabled for any attachment where either the source or destination blend factors for that attachment use the secondary color input, the maximum value of `Location` for any output attachment statically used in the `Fragment` `Execution` `Model` executed by this command must be less than `maxFragmentDualSrcAttachments`

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-09548
  If the current render pass was begun with vkCmdBeginRendering, there is no shader object bound to any graphics stage, the value of each element of VkRenderingAttachmentLocationInfo::`pColorAttachmentLocations` in the bound pipeline must match the value for the corresponding locations set currently in the current render pass instance

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-09549
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of each element of VkRenderingInputAttachmentIndexInfo::`pColorAttachmentInputIndices` in the bound pipeline must match the value for the corresponding index set currently in the current render pass instance

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-10927
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` in the bound pipeline must match the value set currently in the current render pass instance

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-10928
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` in the bound pipeline must match the value set currently in the current render pass instance

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-09642
  If the current render pass was begun with vkCmdBeginRendering with the VK_RENDERING_ENABLE_LEGACY_DITHERING_BIT_EXT flag, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_2_ENABLE_LEGACY_DITHERING_BIT_EXT

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-09643
  If the bound graphics pipeline was created with VK_PIPELINE_CREATE_2_ENABLE_LEGACY_DITHERING_BIT_EXT, the current render pass must have begun with vkCmdBeginRendering with the VK_RENDERING_ENABLE_LEGACY_DITHERING_BIT_EXT flag

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-10677
  If the per-tile execution model is enabled, the tileShadingPerTileDraw feature must be enabled

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-10772
  If a shader object is bound to any graphics stage, multiview functionality must not be enabled in the current render pass

- VUID-vkCmdDrawClusterIndirectHUAWEI-multiviewPerViewViewports-12262
  If the `multiviewPerViewViewports` feature is enabled, then the index of the most significant bit in current render pass instance `viewMask` must be less than the current value of `viewportCount`

- VUID-vkCmdDrawClusterIndirectHUAWEI-multiviewPerViewViewports-12263
  If the `multiviewPerViewViewports` feature is enabled, then the index of the most significant bit in current render pass instance `viewMask` must be less than the current value of `scissorCount`

- VUID-vkCmdDrawClusterIndirectHUAWEI-flags-11521
  If current render pass instance was begun with vkCmdBeginRendering with VkRenderingInfo::`flags` which includes VK_RENDERING_FRAGMENT_REGION_BIT_EXT, and if sample shading is enabled (explicitly or implicitly), then the minimum fraction for sample shading must equal 0.0

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-11522
  If the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, and the `dynamicRenderingUnusedAttachments` feature is not enabled, the graphics pipeline bound must have been created with a VkCustomResolveCreateInfoEXT

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-11523
  If the current render pass instance was begun with vkCmdBeginRendering and does not contain a custom resolve, and the `dynamicRenderingUnusedAttachments` feature is not enabled, the graphics pipeline bound must not have been created with a VkCustomResolveCreateInfoEXT

- VUID-vkCmdDrawClusterIndirectHUAWEI-customResolve-11524
  If the current render pass instance was begun with vkCmdBeginRendering and vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, the graphics pipeline bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_TRUE

- VUID-vkCmdDrawClusterIndirectHUAWEI-customResolve-11525
  If the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, and vkCmdBeginCustomResolveEXT has not been recorded in the render pass instance, the graphics pipeline bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_FALSE

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-11861
  If the `dynamicRenderingUnusedAttachments` feature is not enabled and the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, the bound graphics pipeline must have been created with a VkCustomResolveCreateInfoEXT::`colorAttachmentCount` equal to VkRenderingInfo::`colorAttachmentCount`

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-11862
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound graphics pipeline

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-11863
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` equal to VK_NULL_HANDLE must have the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound pipeline equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawClusterIndirectHUAWEI-dynamicRenderingUnusedAttachments-11864
  If the `dynamicRenderingUnusedAttachments` feature is enabled, the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound graphics pipeline, or the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats`, if it exists, must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-11865
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-11866
  If current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`

- VUID-vkCmdDrawClusterIndirectHUAWEI-dynamicRenderingUnusedAttachments-11867
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, and the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-11868
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->resolveImageView` was VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-11869
  If current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`

- VUID-vkCmdDrawClusterIndirectHUAWEI-dynamicRenderingUnusedAttachments-11870
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, and the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdDrawClusterIndirectHUAWEI-colorAttachmentCount-11871
  If the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0` and vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, then for each element of the VkRenderingInfo::`pColorAttachments` array with a `resolveImageView` not equal to VK_NULL_HANDLE, the `resolveImageView` must have been created with a sample count equal to the value of `rasterizationSamples` for the bound graphics pipeline

- VUID-vkCmdDrawClusterIndirectHUAWEI-pDepthAttachment-11872
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`

- VUID-vkCmdDrawClusterIndirectHUAWEI-pStencilAttachment-11873
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`

- VUID-vkCmdDrawClusterIndirectHUAWEI-customResolve-11529
  If a shader object is bound to the fragment stage, the current render pass instance was begun with vkCmdBeginRendering, a fragment density map attachment is active, and vkCmdBeginCustomResolveEXT has been called, then the fragment shader object bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_TRUE

- VUID-vkCmdDrawClusterIndirectHUAWEI-customResolve-11530
  If a shader object is bound to the fragment stage, the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, a fragment density map attachment is active, and vkCmdBeginCustomResolveEXT has not yet been called, then the fragment shader object bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_FALSE

- VUID-vkCmdDrawClusterIndirectHUAWEI-flags-13361
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, then all bound shader objects must have been created with the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit

- VUID-vkCmdDrawClusterIndirectHUAWEI-flags-13362
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, then the pipeline layout of the bound descriptor sets must have been created with VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT set

- VUID-vkCmdDrawClusterIndirectHUAWEI-flags-13363
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, and any of the descriptor set layouts used to create the pipeline layout of the bound descriptor sets were created with any binding’s VkDescriptorSetLayoutBinding::`stageFlags` set with VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT, then there must be no binding with VkDescriptorSetLayoutBinding::`stageFlags` set with VK_SHADER_STAGE_TASK_BIT_EXT or VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-vkCmdDrawClusterIndirectHUAWEI-flags-13364
  If there are any shader objects bound that were created with `flags` that includes both the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR and VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT bits, the pipeline layout of the bound descriptor sets must have been created with VK_PIPELINE_LAYOUT_CREATE_NO_TASK_SHADER_BIT_KHR set

- VUID-vkCmdDrawClusterIndirectHUAWEI-flags-13365
  If there are any shader objects bound that were created with `flags` that includes both the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR and VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT bits, there must be no shader object bound to the VK_SHADER_STAGE_TASK_BIT_EXT stage

- VUID-vkCmdDrawClusterIndirectHUAWEI-stage-06480
  The bound graphics pipeline must not have been created with the VkPipelineShaderStageCreateInfo::`stage` member of any element of VkGraphicsPipelineCreateInfo::`pStages` set to VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT

- VUID-vkCmdDrawClusterIndirectHUAWEI-pStages-10680
  If there is no bound graphics pipeline, `vkCmdBindShadersEXT` must not have last bound the `pStages` element of VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT with a valid shader object other than VK_NULL_HANDLE

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-07074
  Transform Feedback Queries must not be active

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-07075
  Primitives Generated Queries must not be active

- VUID-vkCmdDrawClusterIndirectHUAWEI-pipelineStatistics-07076
  The `pipelineStatistics` member used to create any active Pipeline Statistics Query must not contain VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT, VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT, VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT, VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT, VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT, VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT, VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT, VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT, or VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-08694
  If there is no bound graphics pipeline, and both the `taskShader` and `meshShader` features are enabled, and a valid `VkShaderEXT` is bound the to the VK_SHADER_STAGE_MESH_BIT_EXT stage, and that `VkShaderEXT` was created without the VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT flag, a valid `VkShaderEXT` must be bound to the VK_SHADER_STAGE_TASK_BIT_EXT stage

- VUID-vkCmdDrawClusterIndirectHUAWEI-None-08695
  If there is no bound graphics pipeline, and both the `taskShader` and `meshShader` features are enabled, and a valid `VkShaderEXT` is bound the to the VK_SHADER_STAGE_MESH_BIT_EXT stage, and that `VkShaderEXT` was created with the VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT flag, there must be no `VkShaderEXT` bound to the VK_SHADER_STAGE_TASK_BIT_EXT stage

- VUID-vkCmdDrawClusterIndirectHUAWEI-drawCount-02718
  If the `multiDrawIndirect` feature is not enabled, `drawCount` must be `0` or `1`

- VUID-vkCmdDrawClusterIndirectHUAWEI-drawCount-02719
  `drawCount` must be less than or equal to `VkPhysicalDeviceLimits`::`maxDrawIndirectCount`

- VUID-vkCmdDrawClusterIndirectHUAWEI-ClusterCullingHUAWEI-07824
  The current pipeline bound to VK_PIPELINE_BIND_POINT_GRAPHICS must contain a shader stage using the `ClusterCullingHUAWEI` `Execution` `Model`

- VUID-vkCmdDrawClusterIndirectHUAWEI-offset-07918
  `offset` must be a multiple of VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI::`indirectBufferOffsetAlignment`

Valid Usage (Implicit)

- VUID-vkCmdDrawClusterIndirectHUAWEI-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdDrawClusterIndirectHUAWEI-buffer-parameter
  `buffer` must be a valid VkBuffer handle

- VUID-vkCmdDrawClusterIndirectHUAWEI-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdDrawClusterIndirectHUAWEI-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdDrawClusterIndirectHUAWEI-renderpass
  This command must only be called inside of a render pass instance

- VUID-vkCmdDrawClusterIndirectHUAWEI-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdDrawClusterIndirectHUAWEI-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdDrawClusterIndirectHUAWEI-commonparent
  Both of `buffer`, and `commandBuffer` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Inside | Outside | VK_QUEUE_GRAPHICS_BIT | Action

Conditional Rendering

vkCmdDrawClusterIndirectHUAWEI is affected by conditional rendering

## 28. Fixed-Function Vertex Processing

Vertex fetching is controlled via configurable state, as a logically distinct graphics pipeline stage.

### 28.1. Vertex Attributes

Vertex shaders can define input variables, which receive vertex attribute data transferred from one or more `VkBuffer`(s) by drawing commands. Vertex shader input variables are bound to buffers via an indirect binding where the vertex shader associates a vertex input attribute number with each variable, vertex input attributes are associated to vertex input bindings on a per-pipeline basis, and vertex input bindings are associated with specific buffers on a per-draw basis via the `vkCmdBindVertexBuffers` command. Vertex input attribute and vertex input binding descriptions also contain format information controlling how data is extracted from buffer memory and converted to the format expected by the vertex shader.

There are `VkPhysicalDeviceLimits`::`maxVertexInputAttributes` number of vertex input attributes and `VkPhysicalDeviceLimits`::`maxVertexInputBindings` number of vertex input bindings (each referred to by zero-based indices), where there are at least as many vertex input attributes as there are vertex input bindings. Applications can store multiple vertex input attributes interleaved in a single buffer, and use a single vertex input binding to access those attributes.

In GLSL, vertex shaders associate input variables with a vertex input attribute number using the `location` layout qualifier. The `Component` layout qualifier associates components of a vertex shader input variable with components of a vertex input attribute.

GLSL Example

    // Assign location M to variableName
    layout (location=M, component=2) in vec2 variableName;

    // Assign locations [N,N+L) to the array elements of variableNameArray
    layout (location=N) in vec4 variableNameArray[L];

In SPIR-V, vertex shaders associate input variables with a vertex input attribute number using the `Location` decoration. The `Component` decoration associates components of a vertex shader input variable with components of a vertex input attribute. The `Location` and `Component` decorations are specified via the `OpDecorate` instruction.

SPIR-V Example

                   ...
              %1 = OpExtInstImport "GLSL.std.450"
                   ...
                   OpName %9 "variableName"
                   OpName %15 "variableNameArray"
                   OpDecorate %18 BuiltIn VertexIndex
                   OpDecorate %19 BuiltIn InstanceIndex
                   OpDecorate %9 Location M
                   OpDecorate %9 Component 2
                   OpDecorate %15 Location N
                   ...
              %2 = OpTypeVoid
              %3 = OpTypeFunction %2
              %6 = OpTypeFloat 32
              %7 = OpTypeVector %6 2
              %8 = OpTypePointer Input %7
              %9 = OpVariable %8 Input
             %10 = OpTypeVector %6 4
             %11 = OpTypeInt 32 0
             %12 = OpConstant %11 L
             %13 = OpTypeArray %10 %12
             %14 = OpTypePointer Input %13
             %15 = OpVariable %14 Input
                   ...

#### 28.1.1. Attribute Location and Component Assignment

The `Location` decoration specifies which vertex input attribute is used to read and interpret the data that a variable will consume.

When a vertex shader input variable declared using a 16- or 32-bit scalar or vector data type is assigned a `Location`, its value(s) are taken from the components of the input attribute specified with the corresponding `VkVertexInputAttributeDescription`::`location`. The components used depend on the type of variable and the `Component` decoration specified in the variable declaration, as identified in Input Attribute Components Accessed By 16-Bit and 32-Bit Input Variables. Any 16-bit or 32-bit scalar or vector input will consume a single `Location`. For 16-bit and 32-bit data types, missing components are filled in with default values as described below.

If an implementation supports `storageInputOutput16`, vertex shader input variables can have a width of 16 bits.

In all the following component assignment specifications, if the `vertexAttributeRobustness` feature is enabled, or the `maintenance9` feature is enabled, and there is no `VkVertexInputAttributeDescription`::`location` specified for the shader vertex attribute `Location` being read, the value (0,0,0,0) or (0,0,0,1) is used for each of the equivalent (x,y,z,w) components consumed entries as specified below.

Table 36. Input Attribute Components Accessed By 16-Bit and 32-Bit Input Variables
16-bit or 32-bit data type | `Component` decoration | Components consumed
--- | --- | ---
scalar | 0 or unspecified | (x, o, o, o)
scalar | 1 | (o, y, o, o)
scalar | 2 | (o, o, z, o)
scalar | 3 | (o, o, o, w)
two-component vector | 0 or unspecified | (x, y, o, o)
two-component vector | 1 | (o, y, z, o)
two-component vector | 2 | (o, o, z, w)
three-component vector | 0 or unspecified | (x, y, z, o)
three-component vector | 1 | (o, y, z, w)
four-component vector | 0 or unspecified | (x, y, z, w)

Components indicated by “o” are available for use by other input variables which are sourced from the same attribute, and if used, are either filled with the corresponding component from the input format (if present), or the default value.

When a vertex shader input variable declared using a 32-bit floating-point matrix type is assigned a `Location` i, its values are taken from consecutive input attributes starting with the corresponding `VkVertexInputAttributeDescription`::`location`. Such matrices are treated as an array of column vectors with values taken from the input attributes identified in Input Attributes Accessed by 32-Bit Input Matrix Variables. The `VkVertexInputAttributeDescription`::`format` must be specified with a VkFormat that corresponds to the appropriate type of column vector. The `Component` decoration must not be used with matrix types.

Table 37. Input Attributes Accessed by 32-Bit Input Matrix Variables
Data type | Column vector type | Locations consumed | Components consumed
--- | --- | --- | ---
mat2 | two-component vector | i, i+1 | (x, y, o, o), (x, y, o, o)
mat2x3 | three-component vector | i, i+1 | (x, y, z, o), (x, y, z, o)
mat2x4 | four-component vector | i, i+1 | (x, y, z, w), (x, y, z, w)
mat3x2 | two-component vector | i, i+1, i+2 | (x, y, o, o), (x, y, o, o), (x, y, o, o)
mat3 | three-component vector | i, i+1, i+2 | (x, y, z, o), (x, y, z, o), (x, y, z, o)
mat3x4 | four-component vector | i, i+1, i+2 | (x, y, z, w), (x, y, z, w), (x, y, z, w)
mat4x2 | two-component vector | i, i+1, i+2, i+3 | (x, y, o, o), (x, y, o, o), (x, y, o, o), (x, y, o, o)
mat4x3 | three-component vector | i, i+1, i+2, i+3 | (x, y, z, o), (x, y, z, o), (x, y, z, o), (x, y, z, o)
mat4 | four-component vector | i, i+1, i+2, i+3 | (x, y, z, w), (x, y, z, w), (x, y, z, w), (x, y, z, w)

Components indicated by “o” are available for use by other input variables which are sourced from the same attribute, and if used, are either filled with the corresponding component from the input (if present), or the default value.

When a vertex shader input variable declared using a scalar or vector 64-bit data type is assigned a `Location` i, its values are taken from consecutive input attributes starting with the corresponding `VkVertexInputAttributeDescription`::`location`. The `Location` slots and `Component` words used depend on the type of variable and the `Component` decoration specified in the variable declaration, as identified in Input Attribute Locations and Components Accessed by 64-Bit Input Variables. For 64-bit data types, no default attribute values are provided. Input variables must not use more components than provided by the attribute.

Table 38. Input Attribute Locations and Components Accessed by 64-Bit Input Variables
Input format | Locations consumed | 64-bit data type | `Location` decoration | `Component` decoration | 32-bit components consumed
--- | --- | --- | --- | --- | ---
R64 | i | scalar | i | 0 or unspecified | (x, y, -, -)
R64G64 | i | scalar | i | 0 or unspecified | (x, y, o, o)
scalar | i | 2 | (o, o, z, w)
two-component vector | i | 0 or unspecified | (x, y, z, w)
R64G64B64 | i, i+1 | scalar | i | 0 or unspecified | (x, y, o, o), (o, o, -, -)
scalar | i | 2 | (o, o, z, w), (o, o, -, -)
scalar | i+1 | 0 or unspecified | (o, o, o, o), (x, y, -, -)
two-component vector | i | 0 or unspecified | (x, y, z, w), (o, o, -, -)
three-component vector | i | unspecified | (x, y, z, w), (x, y, -, -)
R64G64B64A64 | i, i+1 | scalar | i | 0 or unspecified | (x, y, o, o), (o, o, o, o)
scalar | i | 2 | (o, o, z, w), (o, o, o, o)
scalar | i+1 | 0 or unspecified | (o, o, o, o), (x, y, o, o)
scalar | i+1 | 2 | (o, o, o, o), (o, o, z, w)
two-component vector | i | 0 or unspecified | (x, y, z, w), (o, o, o, o)
two-component vector | i+1 | 0 or unspecified | (o, o, o, o), (x, y, z, w)
three-component vector | i | unspecified | (x, y, z, w), (x, y, o, o)
four-component vector | i | unspecified | (x, y, z, w), (x, y, z, w)

Components indicated by “o” are available for use by other input variables which are sourced from the same attribute. Components indicated by “-” are not available for input variables as there are no default values provided for 64-bit data types, and there is no data provided by the input format.

When a vertex shader input variable declared using a 64-bit floating-point matrix type is assigned a `Location` i, its values are taken from consecutive input attribute locations. Such matrices are treated as an array of column vectors with values taken from the input attributes as shown in Input Attribute Locations and Components Accessed by 64-Bit Input Variables. Each column vector starts at the `Location` immediately following the last `Location` of the previous column vector. The number of attributes and components assigned to each matrix is determined by the matrix dimensions and ranges from two to eight locations.

When a vertex shader input variable declared using an array type is assigned a location, its values are taken from consecutive input attributes starting with the corresponding `VkVertexInputAttributeDescription`::`location`. The number of attributes and components assigned to each element are determined according to the data type of the array elements and `Component` decoration (if any) specified in the declaration of the array, as described above. Each element of the array, in order, is assigned to consecutive locations, but all at the same specified component within each location.

Only input variables declared with the data types and component decorations as specified above are supported. Two variables are allowed to share the same `Location` slot only if their `Component` words do not overlap. If multiple variables share the same `Location` slot, they must all have the same SPIR-V floating-point component type or all have the same width scalar type components.

### 28.2. Vertex Input Description

Applications specify vertex input attribute and vertex input binding descriptions as part of graphics pipeline creation by setting the VkGraphicsPipelineCreateInfo::`pVertexInputState` pointer to a VkPipelineVertexInputStateCreateInfo structure. Alternatively, if the graphics pipeline is created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled, then the vertex input attribute and vertex input binding descriptions are specified dynamically with vkCmdSetVertexInputEXT, and the VkGraphicsPipelineCreateInfo::`pVertexInputState` pointer is ignored.

The `VkPipelineVertexInputStateCreateInfo` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkPipelineVertexInputStateCreateInfo {
        VkStructureType                             sType;
        const void*                                 pNext;
        VkPipelineVertexInputStateCreateFlags       flags;
        uint32_t                                    vertexBindingDescriptionCount;
        const VkVertexInputBindingDescription*      pVertexBindingDescriptions;
        uint32_t                                    vertexAttributeDescriptionCount;
        const VkVertexInputAttributeDescription*    pVertexAttributeDescriptions;
    } VkPipelineVertexInputStateCreateInfo;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is reserved for future use.

- `vertexBindingDescriptionCount` is the number of vertex binding descriptions provided in `pVertexBindingDescriptions`.

- `pVertexBindingDescriptions` is a pointer to an array of VkVertexInputBindingDescription structures.

- `vertexAttributeDescriptionCount` is the number of vertex attribute descriptions provided in `pVertexAttributeDescriptions`.

- `pVertexAttributeDescriptions` is a pointer to an array of VkVertexInputAttributeDescription structures.

Valid Usage

- VUID-VkPipelineVertexInputStateCreateInfo-vertexBindingDescriptionCount-00613
  `vertexBindingDescriptionCount` must be less than or equal to `VkPhysicalDeviceLimits`::`maxVertexInputBindings`

- VUID-VkPipelineVertexInputStateCreateInfo-vertexAttributeDescriptionCount-00614
  `vertexAttributeDescriptionCount` must be less than or equal to `VkPhysicalDeviceLimits`::`maxVertexInputAttributes`

- VUID-VkPipelineVertexInputStateCreateInfo-binding-00615
  For every `binding` specified by each element of `pVertexAttributeDescriptions`, a VkVertexInputBindingDescription must exist in `pVertexBindingDescriptions` with the same value of `binding`

- VUID-VkPipelineVertexInputStateCreateInfo-pVertexBindingDescriptions-00616
  All elements of `pVertexBindingDescriptions` must describe distinct binding numbers

- VUID-VkPipelineVertexInputStateCreateInfo-pVertexAttributeDescriptions-00617
  All elements of `pVertexAttributeDescriptions` must describe distinct attribute locations

Valid Usage (Implicit)

- VUID-VkPipelineVertexInputStateCreateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO

- VUID-VkPipelineVertexInputStateCreateInfo-pNext-pNext
  `pNext` must be `NULL` or a pointer to a valid instance of VkPipelineVertexInputDivisorStateCreateInfo

- VUID-VkPipelineVertexInputStateCreateInfo-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkPipelineVertexInputStateCreateInfo-flags-zerobitmask
  `flags` must be `0`

- VUID-VkPipelineVertexInputStateCreateInfo-pVertexBindingDescriptions-parameter
  If `vertexBindingDescriptionCount` is not `0`, `pVertexBindingDescriptions` must be a valid pointer to an array of `vertexBindingDescriptionCount` valid VkVertexInputBindingDescription structures

- VUID-VkPipelineVertexInputStateCreateInfo-pVertexAttributeDescriptions-parameter
  If `vertexAttributeDescriptionCount` is not `0`, `pVertexAttributeDescriptions` must be a valid pointer to an array of `vertexAttributeDescriptionCount` valid VkVertexInputAttributeDescription structures

    // Provided by VK_VERSION_1_0
    typedef VkFlags VkPipelineVertexInputStateCreateFlags;

`VkPipelineVertexInputStateCreateFlags` is a bitmask type for setting a mask, but is currently reserved for future use.

Each vertex input binding is specified by the `VkVertexInputBindingDescription` structure, defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkVertexInputBindingDescription {
        uint32_t             binding;
        uint32_t             stride;
        VkVertexInputRate    inputRate;
    } VkVertexInputBindingDescription;

- `binding` is the binding number that this structure describes.

- `stride` is the byte stride between consecutive elements within the buffer.

- `inputRate` is a VkVertexInputRate value specifying whether vertex attribute addressing is a function of the vertex index or of the instance index.

Valid Usage

- VUID-VkVertexInputBindingDescription-binding-00618
  `binding` must be less than `VkPhysicalDeviceLimits`::`maxVertexInputBindings`

- VUID-VkVertexInputBindingDescription-stride-00619
  `stride` must be less than or equal to `VkPhysicalDeviceLimits`::`maxVertexInputBindingStride`

- VUID-VkVertexInputBindingDescription-stride-04456
  If the `VK_KHR_portability_subset` extension is enabled, `stride` must be a multiple of, and at least as large as, VkPhysicalDevicePortabilitySubsetPropertiesKHR::`minVertexInputBindingStrideAlignment`

Valid Usage (Implicit)

- VUID-VkVertexInputBindingDescription-inputRate-parameter
  `inputRate` must be a valid VkVertexInputRate value

Possible values of VkVertexInputBindingDescription::`inputRate`, specifying the rate at which vertex attributes are pulled from buffers, are:

    // Provided by VK_VERSION_1_0
    typedef enum VkVertexInputRate {
        VK_VERTEX_INPUT_RATE_VERTEX = 0,
        VK_VERTEX_INPUT_RATE_INSTANCE = 1,
    } VkVertexInputRate;

- VK_VERTEX_INPUT_RATE_VERTEX specifies that vertex attribute addressing is a function of the vertex index.

- VK_VERTEX_INPUT_RATE_INSTANCE specifies that vertex attribute addressing is a function of the instance index.

Each vertex input attribute is specified by the `VkVertexInputAttributeDescription` structure, defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkVertexInputAttributeDescription {
        uint32_t    location;
        uint32_t    binding;
        VkFormat    format;
        uint32_t    offset;
    } VkVertexInputAttributeDescription;

- `location` is the shader input location number for this attribute.

- `binding` is the binding number which this attribute takes its data from.

- `format` is the size and type of the vertex attribute data.

- `offset` is a byte offset of this attribute relative to the start of an element in the vertex input binding.

Valid Usage

- VUID-VkVertexInputAttributeDescription-location-00620
  `location` must be less than `VkPhysicalDeviceLimits`::`maxVertexInputAttributes`

- VUID-VkVertexInputAttributeDescription-binding-00621
  `binding` must be less than `VkPhysicalDeviceLimits`::`maxVertexInputBindings`

- VUID-VkVertexInputAttributeDescription-offset-00622
  `offset` must be less than or equal to `VkPhysicalDeviceLimits`::`maxVertexInputAttributeOffset`

- VUID-VkVertexInputAttributeDescription-format-00623
  The format features of `format` must contain VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT

- VUID-VkVertexInputAttributeDescription-vertexAttributeAccessBeyondStride-04457
  If the `VK_KHR_portability_subset` extension is enabled, and VkPhysicalDevicePortabilitySubsetFeaturesKHR::`vertexAttributeAccessBeyondStride` is VK_FALSE, the sum of `offset` plus the size of the vertex attribute data described by `format` must not be greater than `stride` in the VkVertexInputBindingDescription referenced in `binding`

Valid Usage (Implicit)

- VUID-VkVertexInputAttributeDescription-format-parameter
  `format` must be a valid VkFormat value

To dynamically set the vertex input attribute and vertex input binding descriptions, call:

    // Provided by VK_EXT_shader_object, VK_EXT_vertex_input_dynamic_state
    void vkCmdSetVertexInputEXT(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    vertexBindingDescriptionCount,
        const VkVertexInputBindingDescription2EXT*  pVertexBindingDescriptions,
        uint32_t                                    vertexAttributeDescriptionCount,
        const VkVertexInputAttributeDescription2EXT* pVertexAttributeDescriptions);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `vertexBindingDescriptionCount` is the number of vertex binding descriptions provided in `pVertexBindingDescriptions`.

- `pVertexBindingDescriptions` is a pointer to an array of VkVertexInputBindingDescription2EXT structures.

- `vertexAttributeDescriptionCount` is the number of vertex attribute descriptions provided in `pVertexAttributeDescriptions`.

- `pVertexAttributeDescriptions` is a pointer to an array of VkVertexInputAttributeDescription2EXT structures.

This command sets the vertex input attribute and vertex input binding descriptions state for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_VERTEX_INPUT_EXT set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the VkGraphicsPipelineCreateInfo::`pVertexInputState` values used to create the currently active pipeline.

If drawing using shader objects, or if the bound pipeline state object was also created with the VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE dynamic state enabled, then vkCmdBindVertexBuffers2 can be used instead of `vkCmdSetVertexInputEXT` to dynamically set the stride.

The vertex attribute description for any location in the range [0,`VkPhysicalDeviceLimits`::`maxVertexInputAttributes`) not specified in the `pVertexAttributeDescriptions` array becomes undefined.

Valid Usage

- VUID-vkCmdSetVertexInputEXT-None-08546
  Either the `vertexInputDynamicState` feature or the `shaderObject` feature or both must be enabled

- VUID-vkCmdSetVertexInputEXT-vertexBindingDescriptionCount-04791
  `vertexBindingDescriptionCount` must be less than or equal to `VkPhysicalDeviceLimits`::`maxVertexInputBindings`

- VUID-vkCmdSetVertexInputEXT-vertexAttributeDescriptionCount-04792
  `vertexAttributeDescriptionCount` must be less than or equal to `VkPhysicalDeviceLimits`::`maxVertexInputAttributes`

- VUID-vkCmdSetVertexInputEXT-binding-04793
  For every `binding` specified by each element of `pVertexAttributeDescriptions`, a VkVertexInputBindingDescription2EXT must exist in `pVertexBindingDescriptions` with the same value of `binding`

- VUID-vkCmdSetVertexInputEXT-pVertexBindingDescriptions-04794
  All elements of `pVertexBindingDescriptions` must describe distinct binding numbers

- VUID-vkCmdSetVertexInputEXT-pVertexAttributeDescriptions-04795
  All elements of `pVertexAttributeDescriptions` must describe distinct attribute locations

Valid Usage (Implicit)

- VUID-vkCmdSetVertexInputEXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetVertexInputEXT-pVertexBindingDescriptions-parameter
  If `vertexBindingDescriptionCount` is not `0`, `pVertexBindingDescriptions` must be a valid pointer to an array of `vertexBindingDescriptionCount` valid VkVertexInputBindingDescription2EXT structures

- VUID-vkCmdSetVertexInputEXT-pVertexAttributeDescriptions-parameter
  If `vertexAttributeDescriptionCount` is not `0`, `pVertexAttributeDescriptions` must be a valid pointer to an array of `vertexAttributeDescriptionCount` valid VkVertexInputAttributeDescription2EXT structures

- VUID-vkCmdSetVertexInputEXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetVertexInputEXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetVertexInputEXT-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetVertexInputEXT is not affected by conditional rendering

The `VkVertexInputBindingDescription2EXT` structure is defined as:

    // Provided by VK_EXT_shader_object, VK_EXT_vertex_input_dynamic_state
    typedef struct VkVertexInputBindingDescription2EXT {
        VkStructureType      sType;
        void*                pNext;
        uint32_t             binding;
        uint32_t             stride;
        VkVertexInputRate    inputRate;
        uint32_t             divisor;
    } VkVertexInputBindingDescription2EXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `binding` is the binding number that this structure describes.

- `stride` is the byte stride between consecutive elements within the buffer.

- `inputRate` is a VkVertexInputRate value specifying whether vertex attribute addressing is a function of the vertex index or of the instance index.

- `divisor` is the number of successive instances that will use the same value of the vertex attribute when instanced rendering is enabled. This member can be a value other than `1` if the `vertexAttributeInstanceRateDivisor` feature is enabled. For example, if the divisor is N, the same vertex attribute will be applied to N successive instances before moving on to the next vertex attribute. The maximum value of `divisor` is implementation-dependent and can be queried using `VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT`::`maxVertexAttribDivisor`. A value of `0` can be used for the divisor if the `vertexAttributeInstanceRateZeroDivisor` feature is enabled. In this case, the same vertex attribute will be applied to all instances.

Valid Usage

- VUID-VkVertexInputBindingDescription2EXT-binding-04796
  `binding` must be less than `VkPhysicalDeviceLimits`::`maxVertexInputBindings`

- VUID-VkVertexInputBindingDescription2EXT-stride-04797
  `stride` must be less than or equal to `VkPhysicalDeviceLimits`::`maxVertexInputBindingStride`

- VUID-VkVertexInputBindingDescription2EXT-divisor-04798
  If the `vertexAttributeInstanceRateZeroDivisor` feature is not enabled, `divisor` must not be `0`

- VUID-VkVertexInputBindingDescription2EXT-divisor-04799
  If the `vertexAttributeInstanceRateDivisor` feature is not enabled, `divisor` must be `1`

- VUID-VkVertexInputBindingDescription2EXT-divisor-06226
  `divisor` must be a value between `0` and `VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT`::`maxVertexAttribDivisor`, inclusive

- VUID-VkVertexInputBindingDescription2EXT-divisor-06227
  If `divisor` is not `1` then `inputRate` must be of type VK_VERTEX_INPUT_RATE_INSTANCE

Valid Usage (Implicit)

- VUID-VkVertexInputBindingDescription2EXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VERTEX_INPUT_BINDING_DESCRIPTION_2_EXT

- VUID-VkVertexInputBindingDescription2EXT-inputRate-parameter
  `inputRate` must be a valid VkVertexInputRate value

The `VkVertexInputAttributeDescription2EXT` structure is defined as:

    // Provided by VK_EXT_shader_object, VK_EXT_vertex_input_dynamic_state
    typedef struct VkVertexInputAttributeDescription2EXT {
        VkStructureType    sType;
        void*              pNext;
        uint32_t           location;
        uint32_t           binding;
        VkFormat           format;
        uint32_t           offset;
    } VkVertexInputAttributeDescription2EXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `location` is the shader input location number for this attribute.

- `binding` is the binding number which this attribute takes its data from.

- `format` is the size and type of the vertex attribute data.

- `offset` is a byte offset of this attribute relative to the start of an element in the vertex input binding.

Valid Usage

- VUID-VkVertexInputAttributeDescription2EXT-location-06228
  `location` must be less than `VkPhysicalDeviceLimits`::`maxVertexInputAttributes`

- VUID-VkVertexInputAttributeDescription2EXT-binding-06229
  `binding` must be less than `VkPhysicalDeviceLimits`::`maxVertexInputBindings`

- VUID-VkVertexInputAttributeDescription2EXT-offset-06230
  `offset` must be less than or equal to `VkPhysicalDeviceLimits`::`maxVertexInputAttributeOffset`

- VUID-VkVertexInputAttributeDescription2EXT-format-04805
  The format features of `format` must contain VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT

- VUID-VkVertexInputAttributeDescription2EXT-vertexAttributeAccessBeyondStride-04806
  If the `VK_KHR_portability_subset` extension is enabled, and VkPhysicalDevicePortabilitySubsetFeaturesKHR::`vertexAttributeAccessBeyondStride` is VK_FALSE, the sum of `offset` plus the size of the vertex attribute data described by `format` must not be greater than `stride` in the VkVertexInputBindingDescription2EXT referenced in `binding`

Valid Usage (Implicit)

- VUID-VkVertexInputAttributeDescription2EXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VERTEX_INPUT_ATTRIBUTE_DESCRIPTION_2_EXT

- VUID-VkVertexInputAttributeDescription2EXT-format-parameter
  `format` must be a valid VkFormat value

To bind strided address ranges as vertex buffers to a command buffer for use in subsequent drawing commands, call:

    // Provided by VK_KHR_device_address_commands
    void vkCmdBindVertexBuffers3KHR(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    firstBinding,
        uint32_t                                    bindingCount,
        const VkBindVertexBuffer3InfoKHR*           pBindingInfos);

- `commandBuffer` is the command buffer into which the command is recorded.

- `firstBinding` is the index of the first vertex input binding whose state is updated by the command.

- `bindingCount` is the number of vertex input bindings whose state is updated by the command.

- `pInfos` is a pointer to an array of VkBindVertexBuffer3InfoKHR structures defining address ranges to bind as vertex buffers.

The values taken from the address ranges defined by elements i of `pInfos` replace the current state for the vertex input binding `firstBinding` + i, for i in [0, `bindingCount`). The vertex input binding is updated to the range of memory indicated by `pInfos`[i]. All vertex input attributes that use each of these bindings will use these updated addresses in their address calculations for subsequent drawing commands. If the `nullDescriptor` feature is enabled, elements of `pInfos` can have a `addressRange.size` and `addressRange.address` of 0. If a vertex input attribute is bound to a vertex input binding with a `size` and `address` of 0, the values taken from memory are considered to be zero, and missing G, B, or A components are filled with (0,0,1).

This command also dynamically sets the byte strides between consecutive elements within the strided range defined by `pInfos`[i] to the value of `pInfos`[i].addressRange.stride when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, strides are specified by the VkVertexInputBindingDescription::stride values used to create the currently active pipeline.

If drawing using shader objects or if the bound pipeline state object was also created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled then vkCmdSetVertexInputEXT can be used instead of `vkCmdBindVertexBuffers2` to set the stride.

Note | Unlike the static state to set the same, `stride` for each address range must be between 0 and the maximum extent of the attributes in the binding. vkCmdSetVertexInputEXT does not have this restriction so can be used if other stride values are desired.

Valid Usage

- VUID-vkCmdBindVertexBuffers3KHR-firstBinding-13070
  `firstBinding` must be less than `VkPhysicalDeviceLimits`::`maxVertexInputBindings`

- VUID-vkCmdBindVertexBuffers3KHR-firstBinding-13071
  The sum of `firstBinding` and `bindingCount` must be less than or equal to `VkPhysicalDeviceLimits`::`maxVertexInputBindings`

- VUID-vkCmdBindVertexBuffers3KHR-addressRange-13073
  The `addressRange.stride` of all elements of `pInfos` must be either 0 or greater than or equal to the maximum extent of all vertex input attributes fetched from the corresponding binding, where the extent is calculated as the VkVertexInputAttributeDescription::`offset` plus VkVertexInputAttributeDescription::`format` size

Valid Usage (Implicit)

- VUID-vkCmdBindVertexBuffers3KHR-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdBindVertexBuffers3KHR-pBindingInfos-parameter
  `pBindingInfos` must be a valid pointer to an array of `bindingCount` valid VkBindVertexBuffer3InfoKHR structures

- VUID-vkCmdBindVertexBuffers3KHR-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdBindVertexBuffers3KHR-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdBindVertexBuffers3KHR-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdBindVertexBuffers3KHR-bindingCount-arraylength
  `bindingCount` must be greater than `0`

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdBindVertexBuffers3KHR is not affected by conditional rendering

`VkBindVertexBuffer3InfoKHR` is defined as:

    // Provided by VK_KHR_device_address_commands
    typedef struct VkBindVertexBuffer3InfoKHR {
        VkStructureType                   sType;
        const void*                       pNext;
        VkBool32                          setStride;
        VkStridedDeviceAddressRangeKHR    addressRange;
        VkAddressCommandFlagsKHR          addressFlags;
    } VkBindVertexBuffer3InfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `setStride` is a VkBool32 value indicating whether `addressRange.stride` sets the stride for the buffer. If `setStride` is VK_TRUE, the dynamic stride is set for all attributes from this buffer. If `setStride` is VK_FALSE, the stride value is not set.

- `addressRange` is the VkStridedDeviceAddressRangeKHR of the address range to bind.

- `addressFlags` is a VkAddressCommandFlagsKHR value defining the flags for the address range.

Valid Usage

- VUID-VkBindVertexBuffer3InfoKHR-addressRange-13097
  If the range specified by `addressRange` is not bound completely to memory when accessed, `addressFlags` must not include VK_ADDRESS_COMMAND_FULLY_BOUND_BIT_KHR

- VUID-VkBindVertexBuffer3InfoKHR-addressRange-13098
  If the buffer from which the range specified by `addressRange` was created with VK_BUFFER_CREATE_PROTECTED_BIT, and `protectedNoFault` is not supported, `addressFlags` must include VK_ADDRESS_COMMAND_PROTECTED_BIT_KHR

- VUID-VkBindVertexBuffer3InfoKHR-addressRange-13099
  If the buffer from which the range specified by `addressRange` was created without VK_BUFFER_CREATE_PROTECTED_BIT, and `protectedNoFault` is not supported, `addressFlags` must not include VK_ADDRESS_COMMAND_PROTECTED_BIT_KHR

- VUID-VkBindVertexBuffer3InfoKHR-addressFlags-13100
  `addressFlags` must not include both VK_ADDRESS_COMMAND_STORAGE_BUFFER_USAGE_BIT_KHR and VK_ADDRESS_COMMAND_UNKNOWN_STORAGE_BUFFER_USAGE_BIT_KHR

- VUID-VkBindVertexBuffer3InfoKHR-addressRange-13122
  If any buffer, which is bound to a range of VkDeviceMemory that overlaps the range backing `addressRange`, was created with VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, `addressFlags` must include VK_ADDRESS_COMMAND_STORAGE_BUFFER_USAGE_BIT_KHR or VK_ADDRESS_COMMAND_UNKNOWN_STORAGE_BUFFER_USAGE_BIT_KHR

- VUID-VkBindVertexBuffer3InfoKHR-addressRange-13123
  If any buffer, which is bound to a range of VkDeviceMemory that overlaps the range backing `addressRange`, was created without VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, `addressFlags` must not include VK_ADDRESS_COMMAND_STORAGE_BUFFER_USAGE_BIT_KHR

- VUID-VkBindVertexBuffer3InfoKHR-addressFlags-13101
  `addressFlags` must not include both VK_ADDRESS_COMMAND_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR and VK_ADDRESS_COMMAND_UNKNOWN_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR

- VUID-VkBindVertexBuffer3InfoKHR-addressRange-13124
  If any buffer, which is bound to a range of VkDeviceMemory that overlaps the range backing `addressRange`, was created with VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT, `addressFlags` must include VK_ADDRESS_COMMAND_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR or VK_ADDRESS_COMMAND_UNKNOWN_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR

- VUID-VkBindVertexBuffer3InfoKHR-addressRange-13125
  If any buffer, which is bound to a range of VkDeviceMemory that overlaps the range backing `addressRange`, was created without VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT, `addressFlags` must not include VK_ADDRESS_COMMAND_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR

- VUID-VkBindVertexBuffer3InfoKHR-addressRange-13074
  If `addressRange.address` is not 0, the buffer from which `addressRange` was queried must have been created with the VK_BUFFER_USAGE_VERTEX_BUFFER_BIT usage flag set

- VUID-VkBindVertexBuffer3InfoKHR-addressRange-13075
  If `addressRange.size` is 0, `addressRange.address` must be 0

- VUID-VkBindVertexBuffer3InfoKHR-size-13072
  If the `nullDescriptor` feature is not enabled, `addressRange.size` must not be 0

- VUID-VkBindVertexBuffer3InfoKHR-setStride-13126
  If `setStride` is VK_TRUE, `addressRange.stride` must be less than or equal to `VkPhysicalDeviceLimits`::`maxVertexInputBindingStride`

- VUID-VkBindVertexBuffer3InfoKHR-setStride-13127
  If `setStride` is VK_FALSE, `addressRange.stride` must be 0

Valid Usage (Implicit)

- VUID-VkBindVertexBuffer3InfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_BIND_VERTEX_BUFFER_3_INFO_KHR

- VUID-VkBindVertexBuffer3InfoKHR-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkBindVertexBuffer3InfoKHR-addressFlags-parameter
  `addressFlags` must be a valid combination of VkAddressCommandFlagBitsKHR values

To bind vertex buffers, along with their sizes and strides, to a command buffer for use in subsequent drawing commands, call:

    // Provided by VK_VERSION_1_3
    void vkCmdBindVertexBuffers2(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    firstBinding,
        uint32_t                                    bindingCount,
        const VkBuffer*                             pBuffers,
        const VkDeviceSize*                         pOffsets,
        const VkDeviceSize*                         pSizes,
        const VkDeviceSize*                         pStrides);

    // Provided by VK_EXT_extended_dynamic_state, VK_EXT_shader_object
    // Equivalent to vkCmdBindVertexBuffers2
    void vkCmdBindVertexBuffers2EXT(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    firstBinding,
        uint32_t                                    bindingCount,
        const VkBuffer*                             pBuffers,
        const VkDeviceSize*                         pOffsets,
        const VkDeviceSize*                         pSizes,
        const VkDeviceSize*                         pStrides);

- `commandBuffer` is the command buffer into which the command is recorded.

- `firstBinding` is the index of the first vertex input binding whose state is updated by the command.

- `bindingCount` is the number of vertex input bindings whose state is updated by the command.

- `pBuffers` is a pointer to an array of buffer handles.

- `pOffsets` is a pointer to an array of buffer offsets.

- `pSizes` is `NULL` or a pointer to an array of the size in bytes of vertex data bound from `pBuffers`.

- `pStrides` is `NULL` or a pointer to an array of buffer strides.

The values taken from elements i of `pBuffers` and `pOffsets` replace the current state for the vertex input binding `firstBinding` + i, for i in [0, `bindingCount`). The vertex input binding is updated to start at the offset indicated by `pOffsets`[i] from the start of the buffer `pBuffers`[i]. If `pSizes` is not `NULL` then `pSizes`[i] specifies the bound size of the vertex buffer starting from the corresponding elements of `pBuffers`[i] plus `pOffsets`[i]. If `pSizes`[i] is VK_WHOLE_SIZE then the bound size is from `pBuffers`[i] plus `pOffsets`[i] to the end of the buffer `pBuffers`[i]. All vertex input attributes that use each of these bindings will use these updated addresses in their address calculations for subsequent drawing commands. If the `nullDescriptor` feature is enabled, elements of `pBuffers` can be VK_NULL_HANDLE, and can be used by the vertex shader. If a vertex input attribute is bound to a vertex input binding that is VK_NULL_HANDLE, the values taken from memory are considered to be zero, and missing G, B, or A components are filled with (0,0,1).

This command also dynamically sets the byte strides between consecutive elements within buffer `pBuffers`[i] to the corresponding `pStrides`[i] value when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, strides are specified by the VkVertexInputBindingDescription::`stride` values used to create the currently active pipeline.

If drawing using shader objects or if the bound pipeline state object was also created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled then vkCmdSetVertexInputEXT can be used instead of `vkCmdBindVertexBuffers2` to set the stride.

Note | Unlike the static state to set the same, `pStrides` must be between 0 and the maximum extent of the attributes in the binding. vkCmdSetVertexInputEXT does not have this restriction so can be used if other stride values are desired.

Valid Usage

- VUID-vkCmdBindVertexBuffers2-None-08971
  At least one of the following must be true:

  - the `extendedDynamicState` feature is enabled

  - the `shaderObject` feature is enabled

  - the value of VkApplicationInfo::`apiVersion` used to create the VkInstance parent of `commandBuffer` is greater than or equal to Version 1.3

- VUID-vkCmdBindVertexBuffers2-firstBinding-03355
  `firstBinding` must be less than `VkPhysicalDeviceLimits`::`maxVertexInputBindings`

- VUID-vkCmdBindVertexBuffers2-firstBinding-03356
  The sum of `firstBinding` and `bindingCount` must be less than or equal to `VkPhysicalDeviceLimits`::`maxVertexInputBindings`

- VUID-vkCmdBindVertexBuffers2-pOffsets-03357
  If `pSizes` is not `NULL`, all elements of `pOffsets` must be less than the size of the corresponding element in `pBuffers`

- VUID-vkCmdBindVertexBuffers2-pSizes-03358
  If `pSizes` is not `NULL`, all elements of `pOffsets` plus `pSizes` , where `pSizes` is not VK_WHOLE_SIZE, must be less than or equal to the size of the corresponding element in `pBuffers`

- VUID-vkCmdBindVertexBuffers2-pBuffers-03359
  All elements of `pBuffers` must have been created with the VK_BUFFER_USAGE_VERTEX_BUFFER_BIT usage flag set

- VUID-vkCmdBindVertexBuffers2-pBuffers-03360
  Each element of `pBuffers` that is non-sparse must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-vkCmdBindVertexBuffers2-pBuffers-04111
  If the `nullDescriptor` feature is not enabled, all elements of `pBuffers` must not be VK_NULL_HANDLE

- VUID-vkCmdBindVertexBuffers2-pBuffers-04112
  If an element of `pBuffers` is VK_NULL_HANDLE, then the corresponding element of `pOffsets` must be zero

- VUID-vkCmdBindVertexBuffers2-pStrides-03362
  If `pStrides` is not `NULL` each element of `pStrides` must be less than or equal to `VkPhysicalDeviceLimits`::`maxVertexInputBindingStride`

- VUID-vkCmdBindVertexBuffers2-pStrides-06209
  If `pStrides` is not `NULL` each element of `pStrides` must be either 0 or greater than or equal to the maximum extent of all vertex input attributes fetched from the corresponding binding, where the extent is calculated as the VkVertexInputAttributeDescription::`offset` plus VkVertexInputAttributeDescription::`format` size

Valid Usage (Implicit)

- VUID-vkCmdBindVertexBuffers2-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdBindVertexBuffers2-pBuffers-parameter
  `pBuffers` must be a valid pointer to an array of `bindingCount` valid or VK_NULL_HANDLE VkBuffer handles

- VUID-vkCmdBindVertexBuffers2-pOffsets-parameter
  `pOffsets` must be a valid pointer to an array of `bindingCount` VkDeviceSize values

- VUID-vkCmdBindVertexBuffers2-pSizes-parameter
  If `pSizes` is not `NULL`, `pSizes` must be a valid pointer to an array of `bindingCount` VkDeviceSize values

- VUID-vkCmdBindVertexBuffers2-pStrides-parameter
  If `pStrides` is not `NULL`, `pStrides` must be a valid pointer to an array of `bindingCount` VkDeviceSize values

- VUID-vkCmdBindVertexBuffers2-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdBindVertexBuffers2-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdBindVertexBuffers2-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdBindVertexBuffers2-bindingCount-arraylength
  If any of `pSizes`, or `pStrides` are not `NULL`, `bindingCount` must be greater than `0`

- VUID-vkCmdBindVertexBuffers2-commonparent
  Both of `commandBuffer`, and the elements of `pBuffers` that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdBindVertexBuffers2 is not affected by conditional rendering

To bind vertex buffers to a command buffer for use in subsequent drawing commands, call:

    // Provided by VK_VERSION_1_0
    void vkCmdBindVertexBuffers(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    firstBinding,
        uint32_t                                    bindingCount,
        const VkBuffer*                             pBuffers,
        const VkDeviceSize*                         pOffsets);

- `commandBuffer` is the command buffer into which the command is recorded.

- `firstBinding` is the index of the first vertex input binding whose state is updated by the command.

- `bindingCount` is the number of vertex input bindings whose state is updated by the command.

- `pBuffers` is a pointer to an array of buffer handles.

- `pOffsets` is a pointer to an array of buffer offsets.

The values taken from elements i of `pBuffers` and `pOffsets` replace the current state for the vertex input binding `firstBinding` + i, for i in [0, `bindingCount`). The vertex input binding is updated to start at the offset indicated by `pOffsets`[i] from the start of the buffer `pBuffers`[i]. All vertex input attributes that use each of these bindings will use these updated addresses in their address calculations for subsequent drawing commands. If the `nullDescriptor` feature is enabled, elements of `pBuffers` can be VK_NULL_HANDLE, and can be used by the vertex shader. If a vertex input attribute is bound to a vertex input binding that is VK_NULL_HANDLE, the values taken from memory are considered to be zero, and missing G, B, or A components are filled with (0,0,1).

Valid Usage

- VUID-vkCmdBindVertexBuffers-firstBinding-00624
  `firstBinding` must be less than `VkPhysicalDeviceLimits`::`maxVertexInputBindings`

- VUID-vkCmdBindVertexBuffers-firstBinding-00625
  The sum of `firstBinding` and `bindingCount` must be less than or equal to `VkPhysicalDeviceLimits`::`maxVertexInputBindings`

- VUID-vkCmdBindVertexBuffers-pOffsets-00626
  All elements of `pOffsets` must be less than the size of the corresponding element in `pBuffers`

- VUID-vkCmdBindVertexBuffers-pBuffers-00627
  All elements of `pBuffers` must have been created with the VK_BUFFER_USAGE_VERTEX_BUFFER_BIT flag

- VUID-vkCmdBindVertexBuffers-pBuffers-00628
  Each element of `pBuffers` that is non-sparse must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-vkCmdBindVertexBuffers-pBuffers-04001
  If the `nullDescriptor` feature is not enabled, all elements of `pBuffers` must not be VK_NULL_HANDLE

- VUID-vkCmdBindVertexBuffers-pBuffers-04002
  If an element of `pBuffers` is VK_NULL_HANDLE, then the corresponding element of `pOffsets` must be zero

Valid Usage (Implicit)

- VUID-vkCmdBindVertexBuffers-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdBindVertexBuffers-pBuffers-parameter
  `pBuffers` must be a valid pointer to an array of `bindingCount` valid or VK_NULL_HANDLE VkBuffer handles

- VUID-vkCmdBindVertexBuffers-pOffsets-parameter
  `pOffsets` must be a valid pointer to an array of `bindingCount` VkDeviceSize values

- VUID-vkCmdBindVertexBuffers-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdBindVertexBuffers-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdBindVertexBuffers-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdBindVertexBuffers-bindingCount-arraylength
  `bindingCount` must be greater than `0`

- VUID-vkCmdBindVertexBuffers-commonparent
  Both of `commandBuffer`, and the elements of `pBuffers` that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdBindVertexBuffers is not affected by conditional rendering

### 28.3. Vertex Attribute Divisor in Instanced Rendering

If the `vertexAttributeInstanceRateDivisor` feature is enabled and the `pNext` chain of VkPipelineVertexInputStateCreateInfo includes a `VkPipelineVertexInputDivisorStateCreateInfo` structure, then that structure controls how vertex attributes are assigned to an instance when instanced rendering is enabled.

The `VkPipelineVertexInputDivisorStateCreateInfo` structure is defined as:

    // Provided by VK_VERSION_1_4
    typedef struct VkPipelineVertexInputDivisorStateCreateInfo {
        VkStructureType                                  sType;
        const void*                                      pNext;
        uint32_t                                         vertexBindingDivisorCount;
        const VkVertexInputBindingDivisorDescription*    pVertexBindingDivisors;
    } VkPipelineVertexInputDivisorStateCreateInfo;

    // Provided by VK_KHR_vertex_attribute_divisor
    // Equivalent to VkPipelineVertexInputDivisorStateCreateInfo
    typedef VkPipelineVertexInputDivisorStateCreateInfo VkPipelineVertexInputDivisorStateCreateInfoKHR;

    // Provided by VK_EXT_vertex_attribute_divisor
    // Equivalent to VkPipelineVertexInputDivisorStateCreateInfo
    typedef VkPipelineVertexInputDivisorStateCreateInfo VkPipelineVertexInputDivisorStateCreateInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `vertexBindingDivisorCount` is the number of elements in the `pVertexBindingDivisors` array.

- `pVertexBindingDivisors` is a pointer to an array of VkVertexInputBindingDivisorDescription structures specifying the divisor value for each binding.

Valid Usage (Implicit)

- VUID-VkPipelineVertexInputDivisorStateCreateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO

- VUID-VkPipelineVertexInputDivisorStateCreateInfo-pVertexBindingDivisors-parameter
  `pVertexBindingDivisors` must be a valid pointer to an array of `vertexBindingDivisorCount` VkVertexInputBindingDivisorDescription structures

- VUID-VkPipelineVertexInputDivisorStateCreateInfo-vertexBindingDivisorCount-arraylength
  `vertexBindingDivisorCount` must be greater than `0`

Structure Chaining

Extends the structure

  - VkPipelineVertexInputStateCreateInfo

The individual divisor values per binding are specified using the `VkVertexInputBindingDivisorDescription` structure which is defined as:

    // Provided by VK_VERSION_1_4
    typedef struct VkVertexInputBindingDivisorDescription {
        uint32_t    binding;
        uint32_t    divisor;
    } VkVertexInputBindingDivisorDescription;

    // Provided by VK_KHR_vertex_attribute_divisor
    // Equivalent to VkVertexInputBindingDivisorDescription
    typedef VkVertexInputBindingDivisorDescription VkVertexInputBindingDivisorDescriptionKHR;

    // Provided by VK_EXT_vertex_attribute_divisor
    // Equivalent to VkVertexInputBindingDivisorDescription
    typedef VkVertexInputBindingDivisorDescription VkVertexInputBindingDivisorDescriptionEXT;

- `binding` is the binding number for which the divisor is specified.

- `divisor` is the number of successive instances that will use the same value of the vertex attribute when instanced rendering is enabled. For example, if the divisor is N, the same vertex attribute will be applied to N successive instances before moving on to the next vertex attribute. The maximum value of `divisor` is implementation-dependent and can be queried using VkPhysicalDeviceVertexAttributeDivisorProperties::`maxVertexAttribDivisor`. A value of `0` can be used for the divisor if the `vertexAttributeInstanceRateZeroDivisor` feature is enabled. In this case, the same vertex attribute will be applied to all instances.

If this structure is not used to define a divisor value for an attribute, then the divisor has a logical default value of 1.

Valid Usage

- VUID-VkVertexInputBindingDivisorDescription-binding-01869
  `binding` must be less than VkPhysicalDeviceLimits::`maxVertexInputBindings`

- VUID-VkVertexInputBindingDivisorDescription-vertexAttributeInstanceRateZeroDivisor-02228
  If the `vertexAttributeInstanceRateZeroDivisor` feature is not enabled, `divisor` must not be `0`

- VUID-VkVertexInputBindingDivisorDescription-vertexAttributeInstanceRateDivisor-02229
  If the `vertexAttributeInstanceRateDivisor` feature is not enabled, `divisor` must be `1`

- VUID-VkVertexInputBindingDivisorDescription-divisor-01870
  `divisor` must be a value between `0` and VkPhysicalDeviceVertexAttributeDivisorProperties::`maxVertexAttribDivisor`, inclusive

- VUID-VkVertexInputBindingDivisorDescription-inputRate-01871
  VkVertexInputBindingDescription::`inputRate` must be of type VK_VERTEX_INPUT_RATE_INSTANCE for this `binding`

### 28.4. Vertex Input Address Calculation

The address of each attribute for each `vertexIndex` and `instanceIndex` is calculated as follows:

- Let `attribDesc` be the member of VkPipelineVertexInputStateCreateInfo::`pVertexAttributeDescriptions` with VkVertexInputAttributeDescription::`location` equal to the vertex input attribute number.

- Let `bindingDesc` be the member of VkPipelineVertexInputStateCreateInfo::`pVertexBindingDescriptions` with VkVertexInputAttributeDescription::`binding` equal to `attribDesc.binding`.

- Let `vertexIndex` be the index of the vertex within the draw (a value between `firstVertex` and `firstVertex`+`vertexCount` for `vkCmdDraw`, or a value taken from the index buffer plus `vertexOffset` for `vkCmdDrawIndexed`), and let `instanceIndex` be the instance number of the draw (a value between `firstInstance` and `firstInstance`+`instanceCount`).

- Let `offset` be an array of offsets into the bound vertex buffers specified during `vkCmdBindVertexBuffers` or `vkCmdBindVertexBuffers2` with `pOffsets`.

- Let `divisor` be the member of VkPipelineVertexInputDivisorStateCreateInfo::`pVertexBindingDivisors` with VkVertexInputBindingDivisorDescription::`binding` equal to `attribDesc.binding`. If the vertex binding state is dynamically set, instead let `divisor` be the member of the `pVertexBindingDescriptions` parameter to the vkCmdSetVertexInputEXT call with VkVertexInputBindingDescription2EXT::`binding` equal to `attribDesc.binding`.

- Let `stride` be the member of VkPipelineVertexInputStateCreateInfo::`pVertexBindingDescriptions->stride` unless there is dynamic state causing the value to be ignored. In this case the value is set from the last value from one of the following

  - vkCmdSetVertexInputEXT::`pVertexBindingDescriptions->stride`

  - vkCmdBindVertexBuffers2::`pStrides`, if not `NULL`

    bufferBindingAddress = buffer[binding].baseAddress + offset[binding];

    if (bindingDesc.inputRate == VK_VERTEX_INPUT_RATE_VERTEX)
        effectiveVertexOffset = vertexIndex * stride;
    else
        if (divisor == 0)
            effectiveVertexOffset = firstInstance * stride;
        else
            effectiveVertexOffset = (firstInstance + ((instanceIndex - firstInstance) / divisor)) * stride;

    attribAddress = bufferBindingAddress + effectiveVertexOffset + attribDesc.offset;

#### 28.4.1. Vertex Input Extraction

For each attribute, raw data is extracted starting at `attribAddress` and is converted from the VkVertexInputAttributeDescription’s `format` in the same manner as described for image reads as if a texel were read from that address. The numeric type of the attribute’s `format` must match the numeric type of the input variable in the shader. The input variable in the shader must be declared as a 64-bit data type if and only if `format` is a 64-bit data type. If the sum of `attribAddress` and the data extracted is outside of the bound vertex buffer, behavior is as described by Shader Out-of-Bounds Memory Access.

If either `format` is a 64-bit format or the `legacyVertexAttributes` feature is not enabled, and `format` is a packed format, `attribAddress` must be a multiple of the size in bytes of the size of the format as described in Packed Formats. Otherwise, if either `format` is a 64-bit format or the `legacyVertexAttributes` feature is not enabled, `attribAddress` must be a multiple of the size in bytes of the component type indicated by `format` (see Formats).

The number of components in the vertex shader input variable need not exactly match the number of components in the format. If the vertex shader has fewer components, the extra components are discarded. If the numeric format of `format` uses sRGB encoding, and the `maintenance10` feature is enabled, the implementation must convert values from nonlinear to linear as described in the “sRGB EOTF” section of the Khronos Data Format Specification. If the `maintenance10` feature is not enabled, the implementation should convert values from nonlinear to linear. Implementations which do not support `maintenance10`, and which do not convert nonlinear to linear for sRGB formats should not expose VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT for such formats.

## 29. Tessellation

Tessellation involves three pipeline stages. First, a tessellation control shader transforms control points of a patch and can produce per-patch data. Second, a fixed-function tessellator generates multiple primitives corresponding to a tessellation of the patch in (u,v) or (u,v,w) parameter space. Third, a tessellation evaluation shader transforms the vertices of the tessellated patch, for example to compute their positions and attributes as part of the tessellated surface. The tessellator is enabled when the pipeline contains both a tessellation control shader and a tessellation evaluation shader.

### 29.1. Tessellator

If a pipeline includes both tessellation shaders (control and evaluation), the tessellator consumes each input patch (after vertex shading) and produces a new set of independent primitives (points, lines, or triangles). These primitives are logically produced by subdividing a geometric primitive (rectangle or triangle) according to the per-patch outer and inner tessellation levels written by the tessellation control shader. These levels are specified using the built-in variables `TessLevelOuter` and `TessLevelInner`, respectively. This subdivision is performed in an implementation-dependent manner. If no tessellation shaders are present in the pipeline, the tessellator is disabled and incoming primitives are passed through without modification.

The type of subdivision performed by the tessellator is specified by an `OpExecutionMode` instruction using one of the `Triangles`, `Quads`, or `IsoLines` execution modes. When using shader objects, this instruction must be specified in the tessellation evaluation shader, and may also be specified in the tessellation control shader. When using pipelines, this instruction may be specified in either the tessellation evaluation or tessellation control shader. When using shader objects, `OutputVertices` must be specified in the tessellation control shader, and may also be specified in the tessellation evaluation shader. Other tessellation-related execution modes can also be specified in either the tessellation control or tessellation evaluation shaders.

Any tessellation-related modes specified in both the tessellation control and tessellation evaluation shaders must be the same.

Tessellation execution modes include:

- `Triangles`, `Quads`, and `IsoLines`. These control the type of subdivision and topology of the output primitives. When using shader objects, one mode must be set in at least the tessellation evaluation stage. When using pipelines, one mode must be set in at least one of the tessellation shader stages. If the `VK_KHR_portability_subset` extension is enabled, and VkPhysicalDevicePortabilitySubsetFeaturesKHR::`tessellationIsolines` is VK_FALSE, then isoline tessellation is not supported by the implementation, and `IsoLines` must not be used in either tessellation shader stage.

- `VertexOrderCw` and `VertexOrderCcw`. These control the orientation of triangles generated by the tessellator. When using shader objects, one mode must be set in at least the tessellation evaluation stage. When using pipelines, one mode must be set in at least one of the tessellation shader stages.

- `PointMode`. Controls generation of points rather than triangles or lines. This functionality defaults to disabled, and is enabled if either shader stage includes the execution mode. If the `VK_KHR_portability_subset` extension is enabled, and VkPhysicalDevicePortabilitySubsetFeaturesKHR::`tessellationPointMode` is VK_FALSE, then point mode tessellation is not supported by the implementation, and `PointMode` must not be used in either tessellation shader stage.

- `SpacingEqual`, `SpacingFractionalEven`, and `SpacingFractionalOdd`. Controls the spacing of segments on the edges of tessellated primitives. One mode must be set in at least one of the tessellation shader stages.

- `OutputVertices`. Controls the size of the output patch of the tessellation control shader. When using shader objects, one value must be set in at least the tessellation control stage. When using pipelines, one value must be set in at least one of the tessellation shader stages.

For triangles, the tessellator subdivides a triangle primitive into smaller triangles. For quads, the tessellator subdivides a rectangle primitive into smaller triangles. For isolines, the tessellator subdivides a rectangle primitive into a collection of line segments arranged in strips stretching across the rectangle in the u dimension (i.e. the coordinates in `TessCoord` are of the form (0,x) through (1,x) for all tessellation evaluation shader invocations that share a line).

Each vertex produced by the tessellator has an associated (u,v,w) or (u,v) position in a normalized parameter space, with parameter values in the range [0,1], as illustrated in figures Domain parameterization for tessellation primitive modes (upper-left origin) and Domain parameterization for tessellation primitive modes (lower-left origin). The domain space can have either an upper-left or lower-left origin, selected by the `domainOrigin` member of VkPipelineTessellationDomainOriginStateCreateInfo.

Figure 15. Domain parameterization for tessellation primitive modes (upper-left origin)
Figure 16. Domain parameterization for tessellation primitive modes (lower-left origin)
Caption

In the domain parameterization diagrams, the coordinates illustrate the value of `TessCoord` at the corners of the domain. The labels on the edges indicate the inner (IL0 and IL1) and outer (OL0 through OL3) tessellation level values used to control the number of subdivisions along each edge of the domain.

For triangles, the vertex’s position is a barycentric coordinate (u,v,w), where u + v + w = 1.0, and indicates the relative influence of the three vertices of the triangle on the position of the vertex. For quads and isolines, the position is a (u,v) coordinate indicating the relative horizontal and vertical position of the vertex relative to the subdivided rectangle. The subdivision process is explained in more detail in subsequent sections.

### 29.2. Tessellator Patch Discard

A patch is discarded by the tessellator if any relevant outer tessellation level is less than or equal to zero.

Patches will also be discarded if any relevant outer tessellation level corresponds to a floating-point NaN (not a number) in implementations supporting NaN.

No new primitives are generated and the tessellation evaluation shader is not executed for patches that are discarded. For `Quads`, all four outer levels are relevant. For `Triangles` and `IsoLines`, only the first three or two outer levels, respectively, are relevant. Negative inner levels will not cause a patch to be discarded; they will be clamped as described below.

### 29.3. Tessellator Spacing

Each of the tessellation levels is used to determine the number and spacing of segments used to subdivide a corresponding edge. The method used to derive the number and spacing of segments is specified by an `OpExecutionMode` in the tessellation control or tessellation evaluation shader using one of the identifiers `SpacingEqual`, `SpacingFractionalEven`, or `SpacingFractionalOdd`.

If `SpacingEqual` is used, the floating-point tessellation level is first clamped to [1, `maxLevel`], where `maxLevel` is the implementation-dependent maximum tessellation level (`VkPhysicalDeviceLimits`::`maxTessellationGenerationLevel`). The result is rounded up to the nearest integer n, and the corresponding edge is divided into n segments of equal length in (u,v) space.

If `SpacingFractionalEven` is used, the tessellation level is first clamped to [2, `maxLevel`] and then rounded up to the nearest even integer n. If `SpacingFractionalOdd` is used, the tessellation level is clamped to [1, `maxLevel` - 1] and then rounded up to the nearest odd integer n. If n is one, the edge will not be subdivided. Otherwise, the corresponding edge will be divided into n - 2 segments of equal length, and two additional segments of equal length that are typically shorter than the other segments. The length of the two additional segments relative to the others will decrease monotonically with n - f, where f is the clamped floating-point tessellation level. When n - f is zero, the additional segments will have equal length to the other segments. As n - f approaches 2.0, the relative length of the additional segments approaches zero. The two additional segments must be placed symmetrically on opposite sides of the subdivided edge. The relative location of these two segments is implementation-dependent, but must be identical for any pair of subdivided edges with identical values of f.

When tessellating triangles or quads using point mode with fractional odd spacing, the tessellator may produce interior vertices that are positioned on the edge of the patch if an inner tessellation level is less than or equal to one. Such vertices are considered distinct from vertices produced by subdividing the outer edge of the patch, even if there are pairs of vertices with identical coordinates.

### 29.4. Tessellation Primitive Ordering

Few guarantees are provided for the relative ordering of primitives produced by tessellation, as they pertain to primitive order.

- The output primitives generated from each input primitive are passed to subsequent pipeline stages in an implementation-dependent order.

- All output primitives generated from a given input primitive are passed to subsequent pipeline stages before any output primitives generated from subsequent input primitives.

### 29.5. Tessellator Vertex Winding Order

When the tessellator produces triangles (in the `Triangles` or `Quads` modes), the orientation of all triangles is specified with an `OpExecutionMode` of `VertexOrderCw` or `VertexOrderCcw` in the tessellation control or tessellation evaluation shaders. If the order is `VertexOrderCw`, the vertices of all generated triangles will have clockwise ordering in (u,v) or (u,v,w) space. If the order is `VertexOrderCcw`, the vertices will have counter-clockwise ordering in that space.

If the tessellation domain has an upper-left origin, the vertices of a triangle have counter-clockwise ordering if

  a = u0 v1 - u1 v0 + u1 v2 - u2 v1 + u2 v0 - u0 v2

is negative, and clockwise ordering if a is positive. ui and vi are the u and v coordinates in normalized parameter space of the ith vertex of the triangle. If the tessellation domain has a lower-left origin, the vertices of a triangle have counter-clockwise ordering if a is positive, and clockwise ordering if a is negative.

Note | The value a is proportional (with a positive factor) to the signed area of the triangle. In `Triangles` mode, even though the vertex coordinates have a w value, it does not participate directly in the computation of a, being an affine combination of u and v.

### 29.6. Triangle Tessellation

If the tessellation primitive mode is `Triangles`, an equilateral triangle is subdivided into a collection of triangles covering the area of the original triangle. First, the original triangle is subdivided into a collection of concentric equilateral triangles. The edges of each of these triangles are subdivided, and the area between each triangle pair is filled by triangles produced by joining the vertices on the subdivided edges. The number of concentric triangles and the number of subdivisions along each triangle except the outermost is derived from the first inner tessellation level. The edges of the outermost triangle are subdivided independently, using the first, second, and third outer tessellation levels to control the number of subdivisions of the u = 0 (left), v = 0 (bottom), and w = 0 (right) edges, respectively. The second inner tessellation level and the fourth outer tessellation level have no effect in this mode.

If the first inner tessellation level and all three outer tessellation levels are exactly one after clamping and rounding, only a single triangle with (u,v,w) coordinates of (0,0,1), (1,0,0), and (0,1,0) is generated. If the inner tessellation level is one and any of the outer tessellation levels is greater than one, the inner tessellation level is treated as though it were originally specified as 1 + ε and will result in a two- or three-segment subdivision depending on the tessellation spacing. When used with fractional odd spacing, the three-segment subdivision may produce inner vertices positioned on the edge of the triangle.

If any tessellation level is greater than one, tessellation begins by producing a set of concentric inner triangles and subdividing their edges. First, the three outer edges are temporarily subdivided using the clamped and rounded first inner tessellation level and the specified tessellation spacing, generating n segments. For the outermost inner triangle, the inner triangle is degenerate — a single point at the center of the triangle — if n is two. Otherwise, for each corner of the outer triangle, an inner triangle corner is produced at the intersection of two lines extended perpendicular to the corner’s two adjacent edges running through the vertex of the subdivided outer edge nearest that corner. If n is three, the edges of the inner triangle are not subdivided and it is the final triangle in the set of concentric triangles. Otherwise, each edge of the inner triangle is divided into n - 2 segments, with the n - 1 vertices of this subdivision produced by intersecting the inner edge with lines perpendicular to the edge running through the n - 1 innermost vertices of the subdivision of the outer edge. Once the outermost inner triangle is subdivided, the previous subdivision process repeats itself, using the generated triangle as an outer triangle. This subdivision process is illustrated in Inner Triangle Tessellation.

Figure 17. Inner Triangle Tessellation
Caption

In the Inner Triangle Tessellation diagram, inner tessellation levels of (a) four and (b) five are shown (not to scale). Solid black circles depict vertices along the edges of the concentric triangles. The edges of inner triangles are subdivided by intersecting the edge with segments perpendicular to the edge passing through each inner vertex of the subdivided outer edge. Dotted lines depict edges connecting corresponding vertices on the inner and outer triangle edges.

Once all the concentric triangles are produced and their edges are subdivided, the area between each pair of adjacent inner triangles is filled completely with a set of non-overlapping triangles. In this subdivision, two of the three vertices of each triangle are taken from adjacent vertices on a subdivided edge of one triangle; the third is one of the vertices on the corresponding edge of the other triangle. If the innermost triangle is degenerate (i.e., a point), the triangle containing it is subdivided into six triangles by connecting each of the six vertices on that triangle with the center point. If the innermost triangle is not degenerate, that triangle is added to the set of generated triangles as-is.

After the area corresponding to any inner triangles is filled, the tessellator generates triangles to cover the area between the outermost triangle and the outermost inner triangle. To do this, the temporary subdivision of the outer triangle edge above is discarded. Instead, the u = 0, v = 0, and w = 0 edges are subdivided according to the first, second, and third outer tessellation levels, respectively, and the tessellation spacing. The original subdivision of the first inner triangle is retained. The area between the outer and first inner triangles is completely filled by non-overlapping triangles as described above. If the first (and only) inner triangle is degenerate, a set of triangles is produced by connecting each vertex on the outer triangle edges with the center point.

After all triangles are generated, each vertex in the subdivided triangle is assigned a barycentric (u,v,w) coordinate based on its location relative to the three vertices of the outer triangle.

The algorithm used to subdivide the triangular domain in (u,v,w) space into individual triangles is implementation-dependent. However, the set of triangles produced will completely cover the domain, and no portion of the domain will be covered by multiple triangles.

Output triangles are generated with a topology similar to triangle lists, except that the order in which each triangle is generated, and the order in which the vertices are generated for each triangle, are implementation-dependent. However, the order of vertices in each triangle is consistent across the domain as described in Tessellator Vertex Winding Order.

### 29.7. Quad Tessellation

If the tessellation primitive mode is `Quads`, a rectangle is subdivided into a collection of triangles covering the area of the original rectangle. First, the original rectangle is subdivided into a regular mesh of rectangles, where the number of rectangles along the u = 0 and u = 1 (vertical) and v = 0 and v = 1 (horizontal) edges are derived from the first and second inner tessellation levels, respectively. All rectangles, except those adjacent to one of the outer rectangle edges, are decomposed into triangle pairs. The outermost rectangle edges are subdivided independently, using the first, second, third, and fourth outer tessellation levels to control the number of subdivisions of the u = 0 (left), v = 0 (bottom), u = 1 (right), and v = 1 (top) edges, respectively. The area between the inner rectangles of the mesh and the outer rectangle edges are filled by triangles produced by joining the vertices on the subdivided outer edges to the vertices on the edge of the inner rectangle mesh.

If both clamped inner tessellation levels and all four clamped outer tessellation levels are exactly one, only a single triangle pair covering the outer rectangle is generated. Otherwise, if either clamped inner tessellation level is one, that tessellation level is treated as though it was originally specified as 1 + ε and will result in a two- or three-segment subdivision depending on the tessellation spacing. When used with fractional odd spacing, the three-segment subdivision may produce inner vertices positioned on the edge of the rectangle.

If any tessellation level is greater than one, tessellation begins by subdividing the u = 0 and u = 1 edges of the outer rectangle into m segments using the clamped and rounded first inner tessellation level and the tessellation spacing. The v = 0 and v = 1 edges are subdivided into n segments using the second inner tessellation level. Each vertex on the u = 0 and v = 0 edges are joined with the corresponding vertex on the u = 1 and v = 1 edges to produce a set of vertical and horizontal lines that divide the rectangle into a grid of smaller rectangles. The primitive generator emits a pair of non-overlapping triangles covering each such rectangle not adjacent to an edge of the outer rectangle. The boundary of the region covered by these triangles forms an inner rectangle, the edges of which are subdivided by the grid vertices that lie on the edge. If either m or n is two, the inner rectangle is degenerate, and one or both of the rectangle’s edges consist of a single point. This subdivision is illustrated in Figure Inner Quad Tessellation.

Figure 18. Inner Quad Tessellation
Caption

In the Inner Quad Tessellation diagram, inner quad tessellation levels of (a) (4,2) and (b) (7,4) are shown. The regions highlighted in red in figure (b) depict the 10 inner rectangles, each of which will be subdivided into two triangles. Solid black circles depict vertices on the boundary of the outer and inner rectangles, where the inner rectangle of figure (a) is degenerate (a single line segment). Dotted lines depict the horizontal and vertical edges connecting corresponding vertices on the inner and outer rectangle edges.

After the area corresponding to the inner rectangle is filled, the tessellator must produce triangles to cover the area between the inner and outer rectangles. To do this, the subdivision of the outer rectangle edge above is discarded. Instead, the u = 0, v = 0, u = 1, and v = 1 edges are subdivided according to the first, second, third, and fourth outer tessellation levels, respectively, and the tessellation spacing. The original subdivision of the inner rectangle is retained. The area between the outer and inner rectangles is completely filled by non-overlapping triangles. Two of the three vertices of each triangle are adjacent vertices on a subdivided edge of one rectangle; the third is one of the vertices on the corresponding edge of the other rectangle. If either edge of the innermost rectangle is degenerate, the area near the corresponding outer edges is filled by connecting each vertex on the outer edge with the single vertex making up the inner edge.

The algorithm used to subdivide the rectangular domain in (u,v) space into individual triangles is implementation-dependent. However, the set of triangles produced will completely cover the domain, and no portion of the domain will be covered by multiple triangles.

Output triangles are generated with a topology similar to triangle lists, except that the order in which each triangle is generated, and the order in which the vertices are generated for each triangle, are implementation-dependent. However, the order of vertices in each triangle is consistent across the domain as described in Tessellator Vertex Winding Order.

### 29.8. Isoline Tessellation

If the tessellation primitive mode is `IsoLines`, a set of independent horizontal line segments is drawn. The segments are arranged into connected strips called isolines, where the vertices of each isoline have a constant v coordinate and u coordinates covering the full range [0,1]. The number of isolines generated is derived from the first outer tessellation level; the number of segments in each isoline is derived from the second outer tessellation level. Both inner tessellation levels and the third and fourth outer tessellation levels have no effect in this mode.

As with quad tessellation above, isoline tessellation begins with a rectangle. The u = 0 and u = 1 edges of the rectangle are subdivided according to the first outer tessellation level. For the purposes of this subdivision, the tessellation spacing mode is ignored and treated as equal_spacing. An isoline is drawn connecting each vertex on the u = 0 rectangle edge to the corresponding vertex on the u = 1 rectangle edge, except that no line is drawn between (0,1) and (1,1). If the number of isolines on the subdivided u = 0 and u = 1 edges is n, this process will result in n equally spaced lines with constant v coordinates of 0, n 1​,n 2​,…,n n−1​.

Each of the n isolines is then subdivided according to the second outer tessellation level and the tessellation spacing, resulting in m line segments. Each segment of each line is emitted by the tessellator. These line segments are generated with a topology similar to line lists, except that the order in which each line is generated, and the order in which the vertices are generated for each line segment, are implementation-dependent.

Note | If the `VK_KHR_portability_subset` extension is enabled, and VkPhysicalDevicePortabilitySubsetFeaturesKHR::`tessellationIsolines` is VK_FALSE, then isoline tessellation is not supported by the implementation.

### 29.9. Tessellation Point Mode

For all primitive modes, the tessellator is capable of generating points instead of lines or triangles. If the tessellation control or tessellation evaluation shader specifies the `OpExecutionMode` `PointMode`, the primitive generator will generate one point for each distinct vertex produced by tessellation, rather than emitting triangles or lines. Otherwise, the tessellator will produce a collection of line segments or triangles according to the primitive mode. These points are generated with a topology similar to point lists, except the order in which the points are generated for each input primitive is undefined.

Note | If the `VK_KHR_portability_subset` extension is enabled, and VkPhysicalDevicePortabilitySubsetFeaturesKHR::`tessellationPointMode` is VK_FALSE, then tessellation point mode is not supported by the implementation.

### 29.10. Tessellation Pipeline State

The `pTessellationState` member of VkGraphicsPipelineCreateInfo is a pointer to a `VkPipelineTessellationStateCreateInfo` structure.

The `VkPipelineTessellationStateCreateInfo` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkPipelineTessellationStateCreateInfo {
        VkStructureType                           sType;
        const void*                               pNext;
        VkPipelineTessellationStateCreateFlags    flags;
        uint32_t                                  patchControlPoints;
    } VkPipelineTessellationStateCreateInfo;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is reserved for future use.

- `patchControlPoints` is the number of control points per patch.

Valid Usage

- VUID-VkPipelineTessellationStateCreateInfo-patchControlPoints-01214
  `patchControlPoints` must be greater than zero and less than or equal to `VkPhysicalDeviceLimits`::`maxTessellationPatchSize`

Valid Usage (Implicit)

- VUID-VkPipelineTessellationStateCreateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO

- VUID-VkPipelineTessellationStateCreateInfo-pNext-pNext
  `pNext` must be `NULL` or a pointer to a valid instance of VkPipelineTessellationDomainOriginStateCreateInfo

- VUID-VkPipelineTessellationStateCreateInfo-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkPipelineTessellationStateCreateInfo-flags-zerobitmask
  `flags` must be `0`

    // Provided by VK_VERSION_1_0
    typedef VkFlags VkPipelineTessellationStateCreateFlags;

`VkPipelineTessellationStateCreateFlags` is a bitmask type for setting a mask, but is currently reserved for future use.

The `VkPipelineTessellationDomainOriginStateCreateInfo` structure is defined as:

    // Provided by VK_VERSION_1_1
    typedef struct VkPipelineTessellationDomainOriginStateCreateInfo {
        VkStructureType               sType;
        const void*                   pNext;
        VkTessellationDomainOrigin    domainOrigin;
    } VkPipelineTessellationDomainOriginStateCreateInfo;

    // Provided by VK_KHR_maintenance2
    // Equivalent to VkPipelineTessellationDomainOriginStateCreateInfo
    typedef VkPipelineTessellationDomainOriginStateCreateInfo VkPipelineTessellationDomainOriginStateCreateInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `domainOrigin` is a VkTessellationDomainOrigin value controlling the origin of the tessellation domain space.

If the `VkPipelineTessellationDomainOriginStateCreateInfo` structure is included in the `pNext` chain of VkPipelineTessellationStateCreateInfo, it controls the origin of the tessellation domain. If this structure is not present, it is as if `domainOrigin` was VK_TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT.

Valid Usage (Implicit)

- VUID-VkPipelineTessellationDomainOriginStateCreateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO

- VUID-VkPipelineTessellationDomainOriginStateCreateInfo-domainOrigin-parameter
  `domainOrigin` must be a valid VkTessellationDomainOrigin value

Structure Chaining

Extends the structure

  - VkPipelineTessellationStateCreateInfo

The possible tessellation domain origins are specified by the VkTessellationDomainOrigin enumeration:

    // Provided by VK_VERSION_1_1
    typedef enum VkTessellationDomainOrigin {
        VK_TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT = 0,
        VK_TESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT = 1,
      // Provided by VK_KHR_maintenance2
        VK_TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT_KHR = VK_TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT,
      // Provided by VK_KHR_maintenance2
        VK_TESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT_KHR = VK_TESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT,
    } VkTessellationDomainOrigin;

    // Provided by VK_KHR_maintenance2
    // Equivalent to VkTessellationDomainOrigin
    typedef VkTessellationDomainOrigin VkTessellationDomainOriginKHR;

- VK_TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT specifies that the origin of the domain space is in the upper left corner, as shown in figure Domain parameterization for tessellation primitive modes (upper-left origin).

- VK_TESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT specifies that the origin of the domain space is in the lower left corner, as shown in figure Domain parameterization for tessellation primitive modes (lower-left origin).

This enum affects how the `VertexOrderCw` and `VertexOrderCcw` tessellation execution modes are interpreted, since the winding is defined relative to the orientation of the domain.

To dynamically set the origin of the tessellation domain space, call:

    // Provided by VK_EXT_extended_dynamic_state3 with VK_KHR_maintenance2 or VK_VERSION_1_1, VK_EXT_shader_object
    void vkCmdSetTessellationDomainOriginEXT(
        VkCommandBuffer                             commandBuffer,
        VkTessellationDomainOrigin                  domainOrigin);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `domainOrigin` specifies the origin of the tessellation domain space.

This command sets the origin of the tessellation domain space for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_TESSELLATION_DOMAIN_ORIGIN_EXT set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the VkPipelineTessellationDomainOriginStateCreateInfo::`domainOrigin` value used to create the currently active pipeline.

Valid Usage

- VUID-vkCmdSetTessellationDomainOriginEXT-None-09423
  At least one of the following must be true:

  - The `extendedDynamicState3TessellationDomainOrigin` feature is enabled

  - The `shaderObject` feature is enabled

Valid Usage (Implicit)

- VUID-vkCmdSetTessellationDomainOriginEXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetTessellationDomainOriginEXT-domainOrigin-parameter
  `domainOrigin` must be a valid VkTessellationDomainOrigin value

- VUID-vkCmdSetTessellationDomainOriginEXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetTessellationDomainOriginEXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetTessellationDomainOriginEXT-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetTessellationDomainOriginEXT is not affected by conditional rendering

## 30. Geometry Shading

The geometry shader operates on a group of vertices and their associated data assembled from a single input primitive, and emits zero or more output primitives and the group of vertices and their associated data required for each output primitive. Geometry shading is enabled when a geometry shader is included in the pipeline.

### 30.1. Geometry Shader Input Primitives

Each geometry shader invocation has access to all vertices in the primitive (and their associated data), which are presented to the shader as an array of inputs.

The input primitive type expected by the geometry shader is specified with an `OpExecutionMode` instruction in the geometry shader, and must match the incoming primitive type specified by either the pipeline’s primitive topology if tessellation is inactive, or the tessellation mode if tessellation is active, as follows:

- An input primitive type of `InputPoints` must only be used with a pipeline topology of VK_PRIMITIVE_TOPOLOGY_POINT_LIST, or with a tessellation shader specifying `PointMode`. The input arrays always contain one element, as described by the point list topology or tessellation in point mode.

- An input primitive type of `InputLines` must only be used with a pipeline topology of VK_PRIMITIVE_TOPOLOGY_LINE_LIST or VK_PRIMITIVE_TOPOLOGY_LINE_STRIP, or with a tessellation shader specifying `IsoLines` that does not specify `PointMode`. The input arrays always contain two elements, as described by the line list topology or line strip topology, or by isoline tessellation.

- An input primitive type of `InputLinesAdjacency` must only be used when tessellation is inactive, with a pipeline topology of VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY or VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY. The input arrays always contain four elements, as described by the line list with adjacency topology or line strip with adjacency topology.

- An input primitive type of `Triangles` must only be used with a pipeline topology of VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP, or VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN; or with a tessellation shader specifying `Quads` or `Triangles` that does not specify `PointMode`. The input arrays always contain three elements, as described by the triangle list topology, triangle strip topology, or triangle fan topology, or by triangle or quad tessellation. Vertices may be in a different absolute order than specified by the topology, but must adhere to the specified winding order.

- An input primitive type of `InputTrianglesAdjacency` must only be used when tessellation is inactive, with a pipeline topology of VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY or VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY. The input arrays always contain six elements, as described by the triangle list with adjacency topology or triangle strip with adjacency topology. Vertices may be in a different absolute order than specified by the topology, but must adhere to the specified winding order, and the vertices making up the main primitive must still occur at the first, third, and fifth index.

### 30.2. Geometry Shader Output Primitives

A geometry shader generates primitives in one of three output modes: points, line strips, or triangle strips. The primitive mode is specified in the shader using an `OpExecutionMode` instruction with the `OutputPoints`, `OutputLineStrip` or `OutputTriangleStrip` modes, respectively. Each geometry shader must include exactly one output primitive mode.

The vertices output by the geometry shader are assembled into points, lines, or triangles based on the output primitive type and the resulting primitives are then further processed as described in Rasterization. If the number of vertices emitted by the geometry shader is not sufficient to produce a single primitive, vertices corresponding to incomplete primitives are not processed by subsequent pipeline stages. The number of vertices output by the geometry shader is limited to a maximum count specified in the shader.

The maximum output vertex count is specified in the shader using an `OpExecutionMode` instruction with the mode set to `OutputVertices` and the maximum number of vertices that will be produced by the geometry shader specified as a literal. Each geometry shader must specify a maximum output vertex count.

### 30.3. Multiple Invocations of Geometry Shaders

Geometry shaders can be invoked more than one time for each input primitive. This is known as geometry shader instancing and is requested by including an `OpExecutionMode` instruction with `mode` specified as `Invocations` and the number of invocations specified as an integer literal.

In this mode, the geometry shader will execute at least n times for each input primitive, where n is the number of invocations specified in the `OpExecutionMode` instruction. The instance number is available to each invocation as a built-in input using `InvocationId`.

### 30.4. Geometry Shader Primitive Ordering

Limited guarantees are provided for the relative ordering of primitives produced by a geometry shader, as they pertain to primitive order.

- For instanced geometry shaders, the output primitives generated from each input primitive are passed to subsequent pipeline stages using the invocation number to order the primitives, from least to greatest.

- All output primitives generated from a given input primitive are passed to subsequent pipeline stages before any output primitives generated from subsequent input primitives.

### 30.5. Geometry Shader Passthrough

A geometry shader that uses the `PassthroughNV` decoration on a variable in its input interface is considered a passthrough geometry shader. Output primitives in a passthrough geometry shader must have the same topology as the input primitive and are not produced by emitting vertices. The vertices of the output primitive have two different types of attributes, per-vertex and per-primitive. Geometry shader input variables with `PassthroughNV` decoration are considered to produce per-vertex outputs, where values for each output vertex are copied from the corresponding input vertex. Any built-in or user-defined geometry shader outputs are considered per-primitive in a passthrough geometry shader, where a single output value is copied to all output vertices.

The remainder of this section details the usage of the `PassthroughNV` decoration and modifications to the interface matching rules when using passthrough geometry shaders.

#### 30.5.1. `PassthroughNV` Decoration

Decorating a geometry shader input variable with the `PassthroughNV` decoration indicates that values of this input are copied through to the corresponding vertex of the output primitive. Input variables and block members which do not have the `PassthroughNV` decoration are consumed by the geometry shader without being passed through to subsequent stages.

The `PassthroughNV` decoration must only be used within a geometry shader.

Any variable decorated with `PassthroughNV` must be declared using the `Input` storage class.

The `PassthroughNV` decoration must not be used with any of:

- an input primitive type other than `InputPoints`, `InputLines`, or `Triangles`, as specified by the mode for `OpExecutionMode`.

- an invocation count other than one, as specified by the `Invocations` mode for `OpExecutionMode`.

- an `OpEntryPoint` which statically uses the `OpEmitVertex` or `OpEndPrimitive` instructions.

- a variable decorated with the `InvocationId` built-in decoration.

- a variable decorated with the `PrimitiveId` built-in decoration that is declared using the `Input` storage class.

#### 30.5.2. Passthrough Interface Matching

When a passthrough geometry shader is in use, the Interface Matching rules involving the geometry shader input and output interfaces operate as described in this section.

For the purposes of matching passthrough geometry shader inputs with outputs of the previous pipeline stages, the `PassthroughNV` decoration is ignored.

For the purposes of matching the outputs of the geometry shader with subsequent pipeline stages, each input variable with the `PassthroughNV` decoration is considered to add an equivalent output variable with the same type, decoration (other than `PassthroughNV`), number, and declaration order on the output interface. The output variable declaration corresponding to an input variable decorated with `PassthroughNV` will be identical to the input declaration, except that the outermost array dimension of such variables is removed. The output block declaration corresponding to an input block decorated with `PassthroughNV` or having members decorated with `PassthroughNV` will be identical to the input declaration, except that the outermost array dimension of such declaration is removed.

If an input block is decorated with `PassthroughNV`, the equivalent output block contains all the members of the input block. Otherwise, the equivalent output block contains only those input block members decorated with `PassthroughNV`. All members of the corresponding output block are assigned `Location` and `Component` decorations identical to those assigned to the corresponding input block members.

Output variables and blocks generated from inputs decorated with `PassthroughNV` will only exist for the purposes of interface matching; these declarations are not available to geometry shader code or listed in the module interface.

For the purposes of component counting, passthrough geometry shaders count all statically used input variable components declared with the `PassthroughNV` decoration as output components as well, since their values will be copied to the output primitive produced by the geometry shader.

## 31. Mesh Shading

Task and mesh shaders operate in workgroups to produce a collection of primitives that will be processed by subsequent stages of the graphics pipeline.

Work on the mesh pipeline is initiated by the application drawing a set of mesh tasks organized in global workgroups. If the optional task shader is active, each workgroup triggers the execution of task shader invocations that will create a new set of mesh workgroups upon completion. Each of these created workgroups, or each of the original workgroups if no task shader is present, triggers the execution of mesh shader invocations.

Each mesh shader workgroup emits zero or more output primitives along with the group of vertices and their associated data required for each output primitive.

### 31.1. Task Shader Input

For every workgroup issued via the drawing commands a group of task shader invocations is executed. There are no inputs other than the builtin workgroup identifiers.

### 31.2. Task Shader Output

The task shader can emit zero or more mesh workgroups to be generated. Shaders using the `TaskNV` `Execution` `Model` can do so using the built-in variable `TaskCountNV`. This value must be less than or equal to `VkPhysicalDeviceMeshShaderPropertiesNV`::`maxTaskOutputCount`. Shaders using the `TaskEXT` `Execution` `Model` can do so using the `OpEmitMeshTasksEXT` instruction. The `groupCountX`, `groupCountY` and `groupCountZ` arguments passed to this instruction must be less than or equal to the respective dimension within `VkPhysicalDeviceMeshShaderPropertiesEXT`::`maxMeshWorkGroupCount`. The product of these arguments must be less than or equal to `VkPhysicalDeviceMeshShaderPropertiesEXT`::`maxMeshWorkGroupTotalCount`.

The task shader can also pass user-defined data to all mesh shader invocations that it creates. Shaders using the `TaskNV` `Execution` `Model` can do so by writing to output variables that are decorated with `PerTaskNV`. They are available as inputs in mesh shaders. Shaders using the `TaskEXT` `Execution` `Model` can do so by writing to a payload variable with `TaskPayloadWorkgroupEXT` storage class that is passed to the `OpEmitMeshTasksEXT` instruction.

### 31.3. Mesh Generation

If a task shader exists, the mesh assembler creates a variable amount of mesh workgroups depending on each task’s output. If there is no task shader, the drawing commands emit the mesh shader invocations directly.

### 31.4. Mesh Shader Input

The only inputs available to the mesh shader are variables identifying the specific workgroup and invocation and, if applicable, any outputs written as `PerTaskNV` or the payload variable passed to the `OpEmitMeshTasksEXT` instruction by the task shader that spawned the mesh shader’s workgroup. The mesh shader can operate without a task shader as well.

### 31.5. Mesh Shader Output

A mesh shader generates primitives in one of three output modes: points, lines, or triangles. For shaders using the `MeshNV` `Execution` `Model` the primitive mode is specified in the shader using an `OpExecutionMode` instruction with the `OutputPoints`, `OutputLinesNV`, or `OutputTrianglesNV` modes, respectively. For shaders using the `MeshEXT` `Execution` `Model` the primitive mode is specified in the shader using an `OpExecutionMode` instruction with the `OutputPoints`, `OutputLinesEXT`, or `OutputTrianglesEXT` modes, respectively. Each mesh shader must include exactly one output primitive mode.

For shaders using the `MeshNV` `Execution` `Model` the maximum output vertex count is specified as a literal in the shader using an `OpExecutionMode` instruction with the mode set to `OutputVertices` and must be less than or equal to `VkPhysicalDeviceMeshShaderPropertiesNV`::`maxMeshOutputVertices`. For shaders using the `MeshEXT` `Execution` `Model` the maximum output vertex count is specified as a literal in the shader using an `OpExecutionMode` instruction with the mode set to `OutputVertices` and must be less than or equal to `VkPhysicalDeviceMeshShaderPropertiesEXT`::`maxMeshOutputVertices`.

For shaders using the `MeshNV` `Execution` `Model` the maximum output primitive count is specified as a literal in the shader using an `OpExecutionMode` instruction with the mode set to `OutputPrimitivesNV` and must be less than or equal to `VkPhysicalDeviceMeshShaderPropertiesNV`::`maxMeshOutputPrimitives`. For shaders using the `MeshEXT` `Execution` `Model` the maximum output primitive count is specified as a literal in the shader using an `OpExecutionMode` instruction with the mode set to `OutputPrimitivesEXT`, and must be less than or equal to `VkPhysicalDeviceMeshShaderPropertiesEXT`::`maxMeshOutputPrimitives`.

For shaders using the `MeshNV` `Execution` `Model` the number of primitives output by the mesh shader is provided via writing to the built-in variable `PrimitiveCountNV` and must be less than or equal to the maximum output primitive count specified in the shader. A variable decorated with `PrimitiveIndicesNV` is an output array of local index values into the vertex output arrays from which primitives are assembled according to the output primitive type. For shaders using the `MeshEXT` `Execution` `Model` the number of vertices and primitives output by the mesh shader is provided via calling the `OpSetMeshOutputsEXT` instruction. The `vertexCount` argument must be less than or equal to the maximum output vertex count specified in the shader. The `primitiveCount` argument must be less than or equal to the maximum output primitive count specified in the shader.

Depending on the output primitive mode an appropriately-decorated variable is the output array of local index values into the vertex output arrays from which primitives are assembled according to the output primitive type:

- `OutputPoints` uses the `PrimitivePointIndicesEXT` decoration.

- `OutputLinesEXT` uses the `PrimitiveLineIndicesEXT` decoration.

- `OutputTrianglesEXT` uses the `PrimitiveTriangleIndicesEXT` decoration.

These resulting primitives are then further processed as described in Rasterization.

With the exception of primitive indices, all output built-ins and custom attributes count towards the total storage size occupied by output variables in mesh shaders. This size can be calculated as follows, taking into account the fact that the number of effective scalar attributes is 4 times the number of effective locations used according to the location assignment rules. Let v be the number of views, n v​ be the number of effective scalar per-vertex attributes not dependent on `ViewIndex`, n v p v​ be the number of effective scalar per-vertex attributes dependent on `ViewIndex`, m v​ be the maximum number of vertices specified by the `OutputVertices` `Execution` `Mode`, g v​ be `meshOutputPerVertexGranularity`, n p​ be the number of effective scalar per-primitive attributes not dependent on `ViewIndex`, n pp v​ be the number of effective scalar per-primitive attributes dependent on `ViewIndex`, m p​ be the maximum number of primitives specified by the `OutputPrimitivesEXT` `Execution` `Mode` and g p​ be `meshOutputPerPrimitiveGranularity`:

(n v​+(n v p v​×v))×4×align(m v​,g v​)+(n p​+(n pp v​×v))×4×align(m p​,g p​)

### 31.6. Mesh Shader Per-View Outputs

The mesh shader outputs decorated with the `PositionPerViewNV`, `ClipDistancePerViewNV`, `CullDistancePerViewNV`, `LayerPerViewNV`, and `ViewportMaskPerViewNV` built-in decorations are the per-view versions of the single-view variables with equivalent names (that is `Position`, `ClipDistance`, `CullDistance`, `Layer`, and `ViewportMaskNV`, respectively). If a shader statically assigns a value to any element of a per-view array it must not statically assign a value to the equivalent single-view variable.

Each of these outputs is considered arrayed, with separate values for each view. The view number is used to index the first dimension of these arrays.

The second dimension of the `ClipDistancePerViewNV`, and `CullDistancePerViewNV` arrays have the same requirements as the `ClipDistance`, and `CullDistance` arrays.

If a mesh shader output is per-view, the corresponding fragment shader input is taken from the element of the per-view output array that corresponds to the view that is currently being processed by the fragment shader.

These per-view outputs are available only in shaders using the `MeshNV` `Execution` `Model`. They are not available in shaders using the `MeshEXT` `Execution` `Model`.

### 31.7. Mesh Shader Primitive Ordering

Following guarantees are provided for the relative ordering of primitives produced by a mesh shader, as they pertain to primitive order.

- When a task shader is used, mesh workgroups spawned from lower tasks will be ordered prior those workgroups from subsequent tasks.

- All output primitives generated from a given mesh workgroup are passed to subsequent pipeline stages before any output primitives generated from subsequent input workgroups.

- All output primitives within a mesh workgroup, will be generated in the ordering provided by the builtin primitive indexbuffer (from low address to high address).

## 32. Cluster Culling Shading

This shader type has an execution environment similar to that of a compute shader, where a collection of shader invocations form a workgroup and cooperate to perform coarse level geometry culling and LOD selection. A shader invocation can emit a set of built-in output variables via a new built-in function. The cluster culling shader organizes these emitted variables into a drawing command used by the subsequent rendering pipeline.

### 32.1. Cluster Culling Shader Input

The only inputs available to the cluster culling shader are variables identifying the specific workgroup and invocation.

### 32.2. Cluster Culling Shader Output

If a cluster survives after culling in a cluster culling shader invocation, a drawing command to draw this cluster should be emitted by this shader invocation for further rendering processing. There are two types of drawing command, indexed mode and non-indexed mode. Both type of drawing commands consist of a set of built-in output variables which have a similar definition to VkDrawIndexedIndirectCommand and VkDrawIndirectCommand members.

Cluster culling shaders have the following built-in output variables:

- built-in variable `IndexCountHUAWEI` is the number of vertices to draw.

- built-in variable `VertexCountHUAWEI` is the number of vertices to draw.

- built-in variable `InstanceCountHUAWEI` is the number of instances to draw.

- built-in variable `FirstIndexHUAWEI` is the base index within the index buffer.

- built-in variable `FirstVertexHUAWEI` is the index of the first vertex to draw

- built-in variable `VertexOffsetHUAWEI` is the value added to the vertex index before indexing into the vertex buffer.

- built-in variable `FirstInstanceHUAWEI` is the instance ID of the first instance to draw.

- built-in variable `ClusterIDHUAWEI` is the index of cluster being rendered by this drawing command. When cluster culling shader is enabled, `ClusterIDHUAWEI` will replace `gl_DrawID` pass to vertex shader.

- built-in variable `ClusterShadingRate` is the shading rate of cluster being rendered by this drawing command.

### 32.3. Cluster Culling Shader Cluster Ordering

- When a cluster culling shader is used, all output clusters generated by `DispatchClusterHUAWEI`() in a given workgroup are passed to subsequent pipeline stage before any cluster generated from subsequent workgroup.

- In a workgroup, the order of output clusters generated by `DispatchClusterHUAWEI`() is specified by the local invocation id, from lower to higher values.

- If any cluster culling invocation in the workgroup does not call `DispatchClusterHUAWEI`(), no cluster will be sent to the subsequent rendering pipeline.

- Any cluster culling shader invocation may also call `DispatchClusterHUAWEI`() many times as shown below:

    // Cluster Culling Shader sample code:
            ......
        DispatchClusterHUAWEI();  // dispatch 0
            ......
        DispatchClusterHUAWEI();  // dispatch 1
            ......
        DispatchClusterHUAWEI();  // dispatch 2
            ......

In this case, the output sequence of clusters in a workgroup are specified as shown below ( in case of 32 shader invocations in a workgroup):

    1. shader invocation0.dispatch0
    2. shader invocation1.dispatch0,
                ..........
    32. shader invocation31.dispatch0
    33. shader invocation0.dispatch1
    34. shader invocation1.dispatch1
                ..........
    64. shader invocation31.dispatch1
    65. shader invocation0.dispatch2
    66. shader invocation1.dispatch2
                ..........
    96. shader Invocation31.dispatch2

### 32.4. Cluster Culling Shader Primitive Ordering

Following guarantees are provided for the relative ordering of primitives produced by a cluster culling shader, as they pertain to primitive order.

- Limited guarantees are provided for the relative ordering of primitives produced by a cluster culling shader, as they pertain to primitive order.

- The order of primitives in a given cluster is specified by the content of

  - `DispatchClusterHUAWEI`() with indexed output built-in variables, vertices sourced from a lower index buffer addresses to higher addresses.

  - `DispatchClusterHUAWEI`() with non-indexed output built-in variables, from vertices with a lower numbered vertexIndex to a higher numbered vertexIndex.

## 33. Fixed-Function Vertex Post-Processing

After pre-rasterization shader stages, the following fixed-function operations are applied to vertices of the resulting primitives:

- Transform feedback (see Transform Feedback)

- Viewport swizzle (see Viewport Swizzle)

- Flat shading (see Flat Shading).

- Primitive clipping, including application-defined half-spaces (see Primitive Clipping).

- Shader output attribute clipping (see Clipping Shader Outputs).

- Clip space W scaling (see Controlling Viewport W Scaling).

- Perspective division on clip coordinates (see Coordinate Transformations).

- Viewport mapping, including depth range scaling (see Controlling the Viewport).

- Front face determination for polygon primitives (see Basic Polygon Rasterization).

Next, rasterization is performed on primitives as described in chapter Rasterization.

### 33.1. Transform Feedback

Before any other fixed-function vertex post-processing, vertex outputs from the last shader in the pre-rasterization shader stage can be written out to one or more transform feedback buffers bound to the command buffer. To capture vertex outputs the last pre-rasterization shader stage shader must be declared with the `Xfb` execution mode. Outputs decorated with `XfbBuffer` will be written out to the corresponding transform feedback buffers bound to the command buffer when transform feedback is active. Transform feedback buffers are bound to the command buffer by using vkCmdBindTransformFeedbackBuffersEXT. Transform feedback is made active by calling vkCmdBeginTransformFeedbackEXT and made inactive by calling vkCmdEndTransformFeedbackEXT. After vertex data is written it is possible to use vkCmdDrawIndirectByteCountEXT to start a new draw where the `vertexCount` is derived from the number of bytes written by a previous transform feedback.

When an individual point, line, or triangle primitive reaches the transform feedback stage while transform feedback is active, the values of the specified output variables are assembled into primitives and appended to the bound transform feedback buffers. Any primitive for which any pair of vertices have the same position should be assembled for transform feedback normally but it may be discarded prior to primitive assembly instead. After activating transform feedback, the values of the first assembled primitive are written at the starting offsets of the bound transform feedback buffers, and subsequent primitives are appended to the buffer. If the optional `pCounterBuffers` and `pCounterBufferOffsets` parameters are specified, the starting points within the transform feedback buffers are adjusted so data is appended to the previously written values indicated by the value stored by the implementation in the counter buffer.

For multi-vertex primitives, all values for a given vertex are written before writing values for any other vertex. When the `transformFeedbackPreservesProvokingVertex` feature is not enabled, implementations may write out any vertex within the primitive first, but all subsequent vertices for that primitive must be written out in a consistent winding order defined as follows:

- If neither geometry or tessellation shading is active, vertices within a primitive are appended according to the winding order described by the primitive topology defined by the VkPipelineInputAssemblyStateCreateInfo::`topology` used to execute the drawing command.

- If geometry shading is active, vertices within a primitive are appended according to the winding order described by the primitive topology defined by the `OutputPoints`, `OutputLineStrip`, or `OutputTriangleStrip` execution mode.

- If tessellation shading is active but geometry shading is not, vertices within a primitive are appended according to the winding order defined by triangle tessellation, quad tessellation, and isoline tessellation.

When the `transformFeedbackPreservesProvokingVertex` feature is enabled, then in addition to writing vertices with a consistent winding order, the vertex order must preserve the provoking vertex of each primitive:

- When the pipeline’s provoking vertex mode is VK_PROVOKING_VERTEX_MODE_FIRST_VERTEX_EXT, the primitive’s provoking vertex must be the first vertex written.

- When the pipeline’s provoking vertex mode is VK_PROVOKING_VERTEX_MODE_LAST_VERTEX_EXT, the primitive’s provoking vertex must be the last vertex written.

If `transformFeedbackPreservesTriangleFanProvokingVertex` is VK_FALSE, neither geometry nor tessellation shading is active, and the primitive topology is VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN, then the first vertex written from each primitive is implementation-defined even when the `transformFeedbackPreservesProvokingVertex` feature is enabled.

When capturing vertices, the stride associated with each transform feedback buffer, as indicated by the `XfbStride` decoration, indicates the number of bytes of storage reserved for each vertex in the transform feedback buffer. For every vertex captured, each output attribute with a `Offset` decoration will be written to the storage reserved for the vertex at the associated transform feedback buffer. When writing output variables that are arrays or structures, individual array elements or structure members are written tightly packed in order. For vector types, individual components are written in order. For matrix types, outputs are written as an array of column vectors.

If any component of an output with an assigned transform feedback offset was not written to by its shader, the value recorded for that component is undefined, and the primitives needed and primitives written counts in the corresponding VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT query will increment as normal. All components of an output variable must be written at an offset aligned to the size of the component. The size of each component of an output variable must be at least 32-bits. When capturing a vertex, any portion of the reserved storage not associated with an output variable with an assigned transform feedback offset will be unmodified.

When transform feedback is inactive, no vertices are recorded. If there is a valid counter buffer handle and counter buffer offset in the `pCounterBuffers` and `pCounterBufferOffsets` arrays, writes to the corresponding transform feedback buffer will start at the byte offset represented by the value stored in the counter buffer location.

Individual lines or triangles of a strip or fan primitive will be extracted and recorded separately. Incomplete primitives are not recorded.

When using a geometry shader that emits vertices to multiple vertex streams, a primitive will be assembled and output for each stream when there are enough vertices emitted for the output primitive type. All outputs assigned to a given transform feedback buffer are required to come from a single vertex stream.

The sizes of the transform feedback buffers are defined by the vkCmdBindTransformFeedbackBuffersEXT `pSizes` parameter for each of the bound buffers, or the size of the bound buffer, whichever is the lesser. If there is less space remaining in any of the transform feedback buffers than the size of all of the vertex data for that primitive based on the `XfbStride` for that `XfbBuffer` then no vertex data of that primitive is recorded in any transform feedback buffer, and the value for the number of primitives written in the corresponding VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT query for all transform feedback buffers is no longer incremented.

Any outputs made to a `XfbBuffer` that is not bound to a transform feedback buffer is ignored.

To bind transform feedback memory ranges to a command buffer for use in subsequent drawing commands, call:

    // Provided by VK_KHR_device_address_commands with VK_EXT_transform_feedback
    void vkCmdBindTransformFeedbackBuffers2EXT(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    firstBinding,
        uint32_t                                    bindingCount,
        const VkBindTransformFeedbackBuffer2InfoEXT* pBindingInfos);

- `commandBuffer` is the command buffer into which the command is recorded.

- `firstBinding` is the index of the first transform feedback binding whose state is updated by the command.

- `bindingCount` is the number of transform feedback bindings whose state is updated by the command.

- `pBindingInfos` is a pointer to an array of VkBindTransformFeedbackBuffer2InfoEXT structures specifying the ranges of memory to be used to capture transform feedback data.

Element i of `pBindingInfos` replaces the current state for the transform feedback binding `firstBinding` + i, for i in [0,`bindingCount`).

Valid Usage

- VUID-vkCmdBindTransformFeedbackBuffers2EXT-transformFeedback-02355
  `VkPhysicalDeviceTransformFeedbackFeaturesEXT`::`transformFeedback` must be enabled

- VUID-vkCmdBindTransformFeedbackBuffers2EXT-firstBinding-02356
  `firstBinding` must be less than `VkPhysicalDeviceTransformFeedbackPropertiesEXT`::`maxTransformFeedbackBuffers`

- VUID-vkCmdBindTransformFeedbackBuffers2EXT-firstBinding-02357
  The sum of `firstBinding` and `bindingCount` must be less than or equal to `VkPhysicalDeviceTransformFeedbackPropertiesEXT`::`maxTransformFeedbackBuffers`

- VUID-vkCmdBindTransformFeedbackBuffers2EXT-None-02365
  Transform feedback must not be active when the `vkCmdBindTransformFeedbackBuffers2EXT` command is recorded

- VUID-vkCmdBindTransformFeedbackBuffers2EXT-addressRange-13090
  The `addressRange.address` member of all elements of `pBindingInfos` must be a multiple of 4

- VUID-vkCmdBindTransformFeedbackBuffers2EXT-addressRange-13091
  The buffer that the `addressRange` of each element of `pBindingInfos` was queried from must have been created with VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT

- VUID-vkCmdBindTransformFeedbackBuffers2EXT-addressRange-13092
  The `addressRange.size` member of all elements of `pBindingInfos` must be less than or equal to `VkPhysicalDeviceTransformFeedbackPropertiesEXT`::`maxTransformFeedbackBufferSize`

Valid Usage (Implicit)

- VUID-vkCmdBindTransformFeedbackBuffers2EXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdBindTransformFeedbackBuffers2EXT-pBindingInfos-parameter
  If `pBindingInfos` is not `NULL`, `pBindingInfos` must be a valid pointer to an array of `bindingCount` valid VkBindTransformFeedbackBuffer2InfoEXT structures

- VUID-vkCmdBindTransformFeedbackBuffers2EXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdBindTransformFeedbackBuffers2EXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdBindTransformFeedbackBuffers2EXT-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdBindTransformFeedbackBuffers2EXT-bindingCount-arraylength
  If `pBindingInfos` is not `NULL`, `bindingCount` must be greater than `0`

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdBindTransformFeedbackBuffers2EXT is not affected by conditional rendering

`VkBindTransformFeedbackBuffer2InfoEXT` is defined as:

    // Provided by VK_KHR_device_address_commands with VK_EXT_transform_feedback
    typedef struct VkBindTransformFeedbackBuffer2InfoEXT {
        VkStructureType             sType;
        const void*                 pNext;
        VkDeviceAddressRangeKHR     addressRange;
        VkAddressCommandFlagsKHR    addressFlags;
    } VkBindTransformFeedbackBuffer2InfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `addressRange` is the VkDeviceAddressRangeKHR of the address range to use.

- `addressFlags` is a VkAddressCommandFlagsKHR value defining the flags for the address range.

Valid Usage

- VUID-VkBindTransformFeedbackBuffer2InfoEXT-addressRange-13097
  If the range specified by `addressRange` is not bound completely to memory when accessed, `addressFlags` must not include VK_ADDRESS_COMMAND_FULLY_BOUND_BIT_KHR

- VUID-VkBindTransformFeedbackBuffer2InfoEXT-addressRange-13098
  If the buffer from which the range specified by `addressRange` was created with VK_BUFFER_CREATE_PROTECTED_BIT, and `protectedNoFault` is not supported, `addressFlags` must include VK_ADDRESS_COMMAND_PROTECTED_BIT_KHR

- VUID-VkBindTransformFeedbackBuffer2InfoEXT-addressRange-13099
  If the buffer from which the range specified by `addressRange` was created without VK_BUFFER_CREATE_PROTECTED_BIT, and `protectedNoFault` is not supported, `addressFlags` must not include VK_ADDRESS_COMMAND_PROTECTED_BIT_KHR

- VUID-VkBindTransformFeedbackBuffer2InfoEXT-addressFlags-13100
  `addressFlags` must not include both VK_ADDRESS_COMMAND_STORAGE_BUFFER_USAGE_BIT_KHR and VK_ADDRESS_COMMAND_UNKNOWN_STORAGE_BUFFER_USAGE_BIT_KHR

- VUID-VkBindTransformFeedbackBuffer2InfoEXT-addressRange-13122
  If any buffer, which is bound to a range of VkDeviceMemory that overlaps the range backing `addressRange`, was created with VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, `addressFlags` must include VK_ADDRESS_COMMAND_STORAGE_BUFFER_USAGE_BIT_KHR or VK_ADDRESS_COMMAND_UNKNOWN_STORAGE_BUFFER_USAGE_BIT_KHR

- VUID-VkBindTransformFeedbackBuffer2InfoEXT-addressRange-13123
  If any buffer, which is bound to a range of VkDeviceMemory that overlaps the range backing `addressRange`, was created without VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, `addressFlags` must not include VK_ADDRESS_COMMAND_STORAGE_BUFFER_USAGE_BIT_KHR

- VUID-VkBindTransformFeedbackBuffer2InfoEXT-addressFlags-13101
  `addressFlags` must not include both VK_ADDRESS_COMMAND_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR and VK_ADDRESS_COMMAND_UNKNOWN_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR

- VUID-VkBindTransformFeedbackBuffer2InfoEXT-addressRange-13124
  If any buffer, which is bound to a range of VkDeviceMemory that overlaps the range backing `addressRange`, was created with VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT, `addressFlags` must include VK_ADDRESS_COMMAND_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR or VK_ADDRESS_COMMAND_UNKNOWN_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR

- VUID-VkBindTransformFeedbackBuffer2InfoEXT-addressRange-13125
  If any buffer, which is bound to a range of VkDeviceMemory that overlaps the range backing `addressRange`, was created without VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT, `addressFlags` must not include VK_ADDRESS_COMMAND_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR

Valid Usage (Implicit)

- VUID-VkBindTransformFeedbackBuffer2InfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_BIND_TRANSFORM_FEEDBACK_BUFFER_2_INFO_EXT

- VUID-VkBindTransformFeedbackBuffer2InfoEXT-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkBindTransformFeedbackBuffer2InfoEXT-addressFlags-parameter
  `addressFlags` must be a valid combination of VkAddressCommandFlagBitsKHR values

To bind transform feedback buffers to a command buffer for use in subsequent drawing commands, call:

Warning | This functionality is superseded by vkCmdBindTransformFeedbackBuffers2EXT. See Legacy Functionality for more information.

    // Provided by VK_EXT_transform_feedback
    void vkCmdBindTransformFeedbackBuffersEXT(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    firstBinding,
        uint32_t                                    bindingCount,
        const VkBuffer*                             pBuffers,
        const VkDeviceSize*                         pOffsets,
        const VkDeviceSize*                         pSizes);

- `commandBuffer` is the command buffer into which the command is recorded.

- `firstBinding` is the index of the first transform feedback binding whose state is updated by the command.

- `bindingCount` is the number of transform feedback bindings whose state is updated by the command.

- `pBuffers` is a pointer to an array of buffer handles.

- `pOffsets` is a pointer to an array of buffer offsets.

- `pSizes` is `NULL` or a pointer to an array of VkDeviceSize buffer sizes, specifying the maximum number of bytes to capture to the corresponding transform feedback buffer. If `pSizes` is `NULL`, it is equivalent to setting a `pSizes` array where every element is VK_WHOLE_SIZE.

The values taken from elements i of `pBuffers`, `pOffsets` and `pSizes` replace the current state for the transform feedback binding `firstBinding` + i, for i in [0, `bindingCount`). The transform feedback binding is updated to start at the offset indicated by `pOffsets`[i] from the start of the buffer `pBuffers`[i].

When an element of `pSizes`[i] is VK_WHOLE_SIZE, or `pSizes` is `NULL`, the effective range is calculated by taking the size of `pBuffers`[i] minus `pOffsets`[i]. Otherwise, the effective range is equal to the element in `pSizes`[i].

Valid Usage

- VUID-vkCmdBindTransformFeedbackBuffersEXT-transformFeedback-02355
  `VkPhysicalDeviceTransformFeedbackFeaturesEXT`::`transformFeedback` must be enabled

- VUID-vkCmdBindTransformFeedbackBuffersEXT-firstBinding-02356
  `firstBinding` must be less than `VkPhysicalDeviceTransformFeedbackPropertiesEXT`::`maxTransformFeedbackBuffers`

- VUID-vkCmdBindTransformFeedbackBuffersEXT-firstBinding-02357
  The sum of `firstBinding` and `bindingCount` must be less than or equal to `VkPhysicalDeviceTransformFeedbackPropertiesEXT`::`maxTransformFeedbackBuffers`

- VUID-vkCmdBindTransformFeedbackBuffersEXT-None-02365
  Transform feedback must not be active when the `vkCmdBindTransformFeedbackBuffersEXT` command is recorded

- VUID-vkCmdBindTransformFeedbackBuffersEXT-pOffsets-02358
  All elements of `pOffsets` must be less than the size of the corresponding element in `pBuffers`

- VUID-vkCmdBindTransformFeedbackBuffersEXT-pOffsets-02359
  All elements of `pOffsets` must be a multiple of 4

- VUID-vkCmdBindTransformFeedbackBuffersEXT-pBuffers-02360
  All elements of `pBuffers` must have been created with the VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT usage flag set

- VUID-vkCmdBindTransformFeedbackBuffersEXT-pOffsets-02363
  All elements of `pOffsets` plus the effective size of the element, must be less than or equal to the size of the corresponding buffer in `pBuffers`

- VUID-vkCmdBindTransformFeedbackBuffersEXT-pBuffers-02364
  Each element of `pBuffers` that is non-sparse must be bound completely and contiguously to a single `VkDeviceMemory` object

Valid Usage (Implicit)

- VUID-vkCmdBindTransformFeedbackBuffersEXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdBindTransformFeedbackBuffersEXT-pBuffers-parameter
  `pBuffers` must be a valid pointer to an array of `bindingCount` valid VkBuffer handles

- VUID-vkCmdBindTransformFeedbackBuffersEXT-pOffsets-parameter
  `pOffsets` must be a valid pointer to an array of `bindingCount` VkDeviceSize values

- VUID-vkCmdBindTransformFeedbackBuffersEXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdBindTransformFeedbackBuffersEXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdBindTransformFeedbackBuffersEXT-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdBindTransformFeedbackBuffersEXT-bindingCount-arraylength
  `bindingCount` must be greater than `0`

- VUID-vkCmdBindTransformFeedbackBuffersEXT-commonparent
  Both of `commandBuffer`, and the elements of `pBuffers` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdBindTransformFeedbackBuffersEXT is not affected by conditional rendering

Transform feedback for specific transform feedback buffers is made active by calling:

    // Provided by VK_KHR_device_address_commands with VK_EXT_transform_feedback
    void vkCmdBeginTransformFeedback2EXT(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    firstCounterRange,
        uint32_t                                    counterRangeCount,
        const VkBindTransformFeedbackBuffer2InfoEXT* pCounterInfos);

- `commandBuffer` is the command buffer into which the command is recorded.

- `firstCounterRange` is the index of the first transform feedback buffer corresponding to `pCounterInfos`[0].

- `counterRangeCount` is the size of the `pCounterRanges` array.

- `pCounterInfos` is `NULL` or a pointer to an array of VkBindTransformFeedbackBuffer2InfoEXT structures defining memory ranges containing counters used to resume transform feedback from a previous location.

If `pCounterInfos` is `NULL`, it is equivalent to an array of VkBindTransformFeedbackBuffer2InfoEXT structures with each element having a `addressRange.size` of 0.

If the `addressRange.size` of an element of `pCounterInfos` at index i is 0, transform feedback data written to `XfbBuffer` with a `XFB` `Buffer` `Number` equal to the sum of i and `firstCounterRange` will be written starting at an offset of 0 in the bound transform feedback buffer. If the `addressRange.size` of an element of `pCounterInfos` at index i is not 0, it will instead be written starting at an offset equal to the 32-bit value found at `pCounterInfos`[i].addressRange.address.

The active transform feedback buffers will capture primitives emitted from the corresponding `XfbBuffer` in the bound graphics pipeline. Any `XfbBuffer` emitted that does not output to an active transform feedback buffer will not be captured.

Valid Usage

- VUID-vkCmdBeginTransformFeedback2EXT-transformFeedback-02366
  `VkPhysicalDeviceTransformFeedbackFeaturesEXT`::`transformFeedback` must be enabled

- VUID-vkCmdBeginTransformFeedback2EXT-None-02367
  Transform feedback must not be active

- VUID-vkCmdBeginTransformFeedback2EXT-firstCounter-02368
  `firstCounterRange` must be less than `VkPhysicalDeviceTransformFeedbackPropertiesEXT`::`maxTransformFeedbackBuffers`

- VUID-vkCmdBeginTransformFeedback2EXT-firstCounter-02369
  The sum of `firstCounterRange` and `counterRangeCount` must be less than or equal to `VkPhysicalDeviceTransformFeedbackPropertiesEXT`::`maxTransformFeedbackBuffers`

- VUID-vkCmdBeginTransformFeedback2EXT-firstCounter-09630
  The sum of `firstCounterRange` and `counterRangeCount` must be less than or equal to the number of transform feedback buffers bound by vkCmdBindTransformFeedbackBuffers2EXT

- VUID-vkCmdBeginTransformFeedback2EXT-None-06233
  If the `shaderObject` feature is not enabled, a valid graphics pipeline must be bound to VK_PIPELINE_BIND_POINT_GRAPHICS

- VUID-vkCmdBeginTransformFeedback2EXT-None-04128
  The last pre-rasterization shader stage of the bound graphics pipeline must have been declared with the `Xfb` execution mode

- VUID-vkCmdBeginTransformFeedback2EXT-None-02373
  Transform feedback must not be made active in a render pass instance with multiview enabled

- VUID-vkCmdBeginTransformFeedback2EXT-None-10656
  This command must not be recorded when per-tile execution model is enabled

- VUID-vkCmdBeginTransformFeedback2EXT-pCounterInfos-13093
  Each element of `pCounterInfos` must have a `addressRange.size` that is either 0 or greater than or equal to 4

- VUID-vkCmdBeginTransformFeedback2EXT-pCounterInfos-13094
  For each element of `pCounterInfos` with a non-zero address, the buffer the address was queried from must have been created with the VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXT usage flag set

Valid Usage (Implicit)

- VUID-vkCmdBeginTransformFeedback2EXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdBeginTransformFeedback2EXT-pCounterInfos-parameter
  If `counterRangeCount` is not `0`, and `pCounterInfos` is not `NULL`, `pCounterInfos` must be a valid pointer to an array of `counterRangeCount` valid VkBindTransformFeedbackBuffer2InfoEXT structures

- VUID-vkCmdBeginTransformFeedback2EXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdBeginTransformFeedback2EXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdBeginTransformFeedback2EXT-renderpass
  This command must only be called inside of a render pass instance

- VUID-vkCmdBeginTransformFeedback2EXT-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Inside | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdBeginTransformFeedback2EXT is not affected by conditional rendering

Transform feedback for specific transform feedback buffers is made inactive by calling:

    // Provided by VK_KHR_device_address_commands with VK_EXT_transform_feedback
    void vkCmdEndTransformFeedback2EXT(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    firstCounterRange,
        uint32_t                                    counterRangeCount,
        const VkBindTransformFeedbackBuffer2InfoEXT* pCounterInfos);

- `commandBuffer` is the command buffer into which the command is recorded.

- `firstCounterBuffer` is the index of the first transform feedback buffer corresponding to `pCounterInfos`[0].

- `counterRangeCount` is the size of the `pCounterInfos` array.

- `pCounterInfos` is `NULL` or a pointer to an array of VkBindTransformFeedbackBuffer2InfoEXT structures defining memory ranges used to write counters used to later resume transform feedback.

If `pCounterInfos` is `NULL`, it is equivalent to an array of VkBindTransformFeedbackBuffer2InfoEXT structures with each element having a `addressRange.size` of 0.

If the `addressRange.size` of an element of `pCounterInfos` at index i is 0, no data is written to the address range. If the `addressRange.size` of an element of `pCounterInfos` at index i is not 0, the byte offset, where the next vertex data would be written to in the transform feedback buffer at a binding equal to the sum of i and `firstCounterBuffer`, is written to that range’s `address`.

Valid Usage

- VUID-vkCmdEndTransformFeedback2EXT-transformFeedback-02374
  `VkPhysicalDeviceTransformFeedbackFeaturesEXT`::`transformFeedback` must be enabled

- VUID-vkCmdEndTransformFeedback2EXT-None-02375
  Transform feedback must be active

- VUID-vkCmdEndTransformFeedback2EXT-firstCounterBuffer-02376
  `firstCounterBuffer` must be less than `VkPhysicalDeviceTransformFeedbackPropertiesEXT`::`maxTransformFeedbackBuffers`

- VUID-vkCmdEndTransformFeedback2EXT-firstCounterBuffer-02377
  The sum of `firstCounterBuffer` and `counterRangeCount` must be less than or equal to `VkPhysicalDeviceTransformFeedbackPropertiesEXT`::`maxTransformFeedbackBuffers`

- VUID-vkCmdEndTransformFeedback2EXT-None-10657
  This command must not be recorded when per-tile execution model is enabled

- VUID-vkCmdEndTransformFeedback2EXT-pCounterInfos-13095
  Each element of `pCounterInfos` must have a `addressRange.size` that is either 0 or greater than or equal to 4

- VUID-vkCmdEndTransformFeedback2EXT-pCounterInfos-13096
  For each element of `pCounterInfos` with a non-zero address, the buffer the address was queried from must have been created with the VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXT usage flag set

Valid Usage (Implicit)

- VUID-vkCmdEndTransformFeedback2EXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdEndTransformFeedback2EXT-pCounterInfos-parameter
  If `counterRangeCount` is not `0`, and `pCounterInfos` is not `NULL`, `pCounterInfos` must be a valid pointer to an array of `counterRangeCount` valid VkBindTransformFeedbackBuffer2InfoEXT structures

- VUID-vkCmdEndTransformFeedback2EXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdEndTransformFeedback2EXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdEndTransformFeedback2EXT-renderpass
  This command must only be called inside of a render pass instance

- VUID-vkCmdEndTransformFeedback2EXT-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Inside | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdEndTransformFeedback2EXT is not affected by conditional rendering

Transform feedback for specific transform feedback buffers is made active by calling:

Warning | This functionality is superseded by vkCmdBeginTransformFeedback2EXT. See Legacy Functionality for more information.

    // Provided by VK_EXT_transform_feedback
    void vkCmdBeginTransformFeedbackEXT(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    firstCounterBuffer,
        uint32_t                                    counterBufferCount,
        const VkBuffer*                             pCounterBuffers,
        const VkDeviceSize*                         pCounterBufferOffsets);

- `commandBuffer` is the command buffer into which the command is recorded.

- `firstCounterBuffer` is the index of the first transform feedback buffer corresponding to `pCounterBuffers`[0] and `pCounterBufferOffsets`[0].

- `counterBufferCount` is the size of the `pCounterBuffers` and `pCounterBufferOffsets` arrays.

- `pCounterBuffers` is `NULL` or a pointer to an array of VkBuffer handles to counter buffers. Each buffer contains a 4 byte integer value representing the byte offset from the start of the corresponding transform feedback buffer from where to start capturing vertex data. If the byte offset stored to the counter buffer location was done using vkCmdEndTransformFeedbackEXT it can be used to resume transform feedback from the previous location. In that case, a pipeline barrier is required between the calls to `vkCmdEndTransformFeedbackEXT` and `vkCmdBeginTransformFeedbackEXT`, with VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT as the source and destination stages, VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT as the source access and VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT as the destination access. If `pCounterBuffers` is `NULL`, then transform feedback will start capturing vertex data to byte offset zero in all bound transform feedback buffers. For each element of `pCounterBuffers` that is VK_NULL_HANDLE, transform feedback will start capturing vertex data to byte zero in the corresponding bound transform feedback buffer.

- `pCounterBufferOffsets` is `NULL` or a pointer to an array of VkDeviceSize values specifying offsets within each of the `pCounterBuffers` where the counter values were previously written. The location in each counter buffer at these offsets must be large enough to contain 4 bytes of data. This data is the number of bytes captured by the previous transform feedback to this buffer. If `pCounterBufferOffsets` is `NULL`, then it is assumed the offsets are zero.

The active transform feedback buffers will capture primitives emitted from the corresponding `XfbBuffer` in the bound graphics pipeline. Any `XfbBuffer` emitted that does not output to an active transform feedback buffer will not be captured.

Valid Usage

- VUID-vkCmdBeginTransformFeedbackEXT-transformFeedback-02366
  `VkPhysicalDeviceTransformFeedbackFeaturesEXT`::`transformFeedback` must be enabled

- VUID-vkCmdBeginTransformFeedbackEXT-None-02367
  Transform feedback must not be active

- VUID-vkCmdBeginTransformFeedbackEXT-firstCounter-02368
  `firstCounterBuffer` must be less than `VkPhysicalDeviceTransformFeedbackPropertiesEXT`::`maxTransformFeedbackBuffers`

- VUID-vkCmdBeginTransformFeedbackEXT-firstCounter-02369
  The sum of `firstCounterBuffer` and `counterBufferCount` must be less than or equal to `VkPhysicalDeviceTransformFeedbackPropertiesEXT`::`maxTransformFeedbackBuffers`

- VUID-vkCmdBeginTransformFeedbackEXT-firstCounter-09630
  The sum of `firstCounterBuffer` and `counterBufferCount` must be less than or equal to the number of transform feedback buffers bound by vkCmdBindTransformFeedbackBuffersEXT

- VUID-vkCmdBeginTransformFeedbackEXT-None-06233
  If the `shaderObject` feature is not enabled, a valid graphics pipeline must be bound to VK_PIPELINE_BIND_POINT_GRAPHICS

- VUID-vkCmdBeginTransformFeedbackEXT-None-04128
  The last pre-rasterization shader stage of the bound graphics pipeline must have been declared with the `Xfb` execution mode

- VUID-vkCmdBeginTransformFeedbackEXT-None-02373
  Transform feedback must not be made active in a render pass instance with multiview enabled

- VUID-vkCmdBeginTransformFeedbackEXT-None-10656
  This command must not be recorded when per-tile execution model is enabled

- VUID-vkCmdBeginTransformFeedbackEXT-counterBufferCount-02607
  If `counterBufferCount` is not `0`, and `pCounterBuffers` is not `NULL`, `pCounterBuffers` must be a valid pointer to an array of `counterBufferCount` `VkBuffer` handles that are either valid or VK_NULL_HANDLE

- VUID-vkCmdBeginTransformFeedbackEXT-pCounterBufferOffsets-02370
  For each buffer handle in the array, if it is not VK_NULL_HANDLE it must reference a buffer large enough to hold 4 bytes at the corresponding offset from the `pCounterBufferOffsets` array

- VUID-vkCmdBeginTransformFeedbackEXT-pCounterBuffer-02371
  If `pCounterBuffer` is `NULL`, then `pCounterBufferOffsets` must also be `NULL`

- VUID-vkCmdBeginTransformFeedbackEXT-pCounterBuffers-02372
  For each buffer handle in the `pCounterBuffers` array that is not VK_NULL_HANDLE it must have been with the VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXT usage flag set

Valid Usage (Implicit)

- VUID-vkCmdBeginTransformFeedbackEXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdBeginTransformFeedbackEXT-pCounterBufferOffsets-parameter
  If `counterBufferCount` is not `0`, and `pCounterBufferOffsets` is not `NULL`, `pCounterBufferOffsets` must be a valid pointer to an array of `counterBufferCount` VkDeviceSize values

- VUID-vkCmdBeginTransformFeedbackEXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdBeginTransformFeedbackEXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdBeginTransformFeedbackEXT-renderpass
  This command must only be called inside of a render pass instance

- VUID-vkCmdBeginTransformFeedbackEXT-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdBeginTransformFeedbackEXT-commonparent
  Both of `commandBuffer`, and the elements of `pCounterBuffers` that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Inside | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdBeginTransformFeedbackEXT is not affected by conditional rendering

Transform feedback for specific transform feedback buffers is made inactive by calling:

Warning | This functionality is superseded by vkCmdEndTransformFeedback2EXT. See Legacy Functionality for more information.

    // Provided by VK_EXT_transform_feedback
    void vkCmdEndTransformFeedbackEXT(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    firstCounterBuffer,
        uint32_t                                    counterBufferCount,
        const VkBuffer*                             pCounterBuffers,
        const VkDeviceSize*                         pCounterBufferOffsets);

- `commandBuffer` is the command buffer into which the command is recorded.

- `firstCounterBuffer` is the index of the first transform feedback buffer corresponding to `pCounterBuffers`[0] and `pCounterBufferOffsets`[0].

- `counterBufferCount` is the size of the `pCounterBuffers` and `pCounterBufferOffsets` arrays.

- `pCounterBuffers` is `NULL` or a pointer to an array of VkBuffer handles to counter buffers. The counter buffers are used to record the current byte positions of each transform feedback buffer where the next vertex output data would be captured. This can be used by a subsequent vkCmdBeginTransformFeedbackEXT call to resume transform feedback capture from this position. It can also be used by vkCmdDrawIndirectByteCountEXT to determine the vertex count of the draw call.

- `pCounterBufferOffsets` is `NULL` or a pointer to an array of VkDeviceSize values specifying offsets within each of the `pCounterBuffers` where the counter values can be written. The location in each counter buffer at these offsets must be large enough to contain 4 bytes of data. The data stored at this location is the byte offset from the start of the transform feedback buffer binding where the next vertex data would be written. If `pCounterBufferOffsets` is `NULL`, then it is assumed the offsets are zero.

Valid Usage

- VUID-vkCmdEndTransformFeedbackEXT-transformFeedback-02374
  `VkPhysicalDeviceTransformFeedbackFeaturesEXT`::`transformFeedback` must be enabled

- VUID-vkCmdEndTransformFeedbackEXT-None-02375
  Transform feedback must be active

- VUID-vkCmdEndTransformFeedbackEXT-firstCounterBuffer-02376
  `firstCounterBuffer` must be less than `VkPhysicalDeviceTransformFeedbackPropertiesEXT`::`maxTransformFeedbackBuffers`

- VUID-vkCmdEndTransformFeedbackEXT-firstCounterBuffer-02377
  The sum of `firstCounterBuffer` and `counterBufferCount` must be less than or equal to `VkPhysicalDeviceTransformFeedbackPropertiesEXT`::`maxTransformFeedbackBuffers`

- VUID-vkCmdEndTransformFeedbackEXT-None-10657
  This command must not be recorded when per-tile execution model is enabled

- VUID-vkCmdEndTransformFeedbackEXT-counterBufferCount-02608
  If `counterBufferCount` is not `0`, and `pCounterBuffers` is not `NULL`, `pCounterBuffers` must be a valid pointer to an array of `counterBufferCount` `VkBuffer` handles that are either valid or VK_NULL_HANDLE

- VUID-vkCmdEndTransformFeedbackEXT-pCounterBufferOffsets-02378
  For each buffer handle in the array, if it is not VK_NULL_HANDLE it must reference a buffer large enough to hold 4 bytes at the corresponding offset from the `pCounterBufferOffsets` array

- VUID-vkCmdEndTransformFeedbackEXT-pCounterBuffer-02379
  If `pCounterBuffer` is `NULL`, then `pCounterBufferOffsets` must also be `NULL`

- VUID-vkCmdEndTransformFeedbackEXT-pCounterBuffers-02380
  For each buffer handle in the `pCounterBuffers` array that is not VK_NULL_HANDLE it must have been created with the VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXT usage flag set

Valid Usage (Implicit)

- VUID-vkCmdEndTransformFeedbackEXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdEndTransformFeedbackEXT-pCounterBufferOffsets-parameter
  If `counterBufferCount` is not `0`, and `pCounterBufferOffsets` is not `NULL`, `pCounterBufferOffsets` must be a valid pointer to an array of `counterBufferCount` VkDeviceSize values

- VUID-vkCmdEndTransformFeedbackEXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdEndTransformFeedbackEXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdEndTransformFeedbackEXT-renderpass
  This command must only be called inside of a render pass instance

- VUID-vkCmdEndTransformFeedbackEXT-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdEndTransformFeedbackEXT-commonparent
  Both of `commandBuffer`, and the elements of `pCounterBuffers` that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Inside | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdEndTransformFeedbackEXT is not affected by conditional rendering

### 33.2. Viewport Swizzle

Each primitive sent to a given viewport has a swizzle and optional negation applied to its clip coordinates. The swizzle that is applied depends on the viewport index, and is controlled by the `VkPipelineViewportSwizzleStateCreateInfoNV` pipeline state:

    // Provided by VK_NV_viewport_swizzle
    typedef struct VkPipelineViewportSwizzleStateCreateInfoNV {
        VkStructureType                                sType;
        const void*                                    pNext;
        VkPipelineViewportSwizzleStateCreateFlagsNV    flags;
        uint32_t                                       viewportCount;
        const VkViewportSwizzleNV*                     pViewportSwizzles;
    } VkPipelineViewportSwizzleStateCreateInfoNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is reserved for future use.

- `viewportCount` is the number of viewport swizzles used by the pipeline.

- `pViewportSwizzles` is a pointer to an array of VkViewportSwizzleNV structures, defining the viewport swizzles.

Valid Usage

- VUID-VkPipelineViewportSwizzleStateCreateInfoNV-viewportCount-01215
  `viewportCount` must be greater than or equal to the `viewportCount` set in `VkPipelineViewportStateCreateInfo`

Valid Usage (Implicit)

- VUID-VkPipelineViewportSwizzleStateCreateInfoNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV

- VUID-VkPipelineViewportSwizzleStateCreateInfoNV-flags-zerobitmask
  `flags` must be `0`

- VUID-VkPipelineViewportSwizzleStateCreateInfoNV-pViewportSwizzles-parameter
  `pViewportSwizzles` must be a valid pointer to an array of `viewportCount` valid VkViewportSwizzleNV structures

- VUID-VkPipelineViewportSwizzleStateCreateInfoNV-viewportCount-arraylength
  `viewportCount` must be greater than `0`

Structure Chaining

Extends the structure

  - VkPipelineViewportStateCreateInfo

    // Provided by VK_NV_viewport_swizzle
    typedef VkFlags VkPipelineViewportSwizzleStateCreateFlagsNV;

`VkPipelineViewportSwizzleStateCreateFlagsNV` is a bitmask type for setting a mask, but is currently reserved for future use.

The `VkPipelineViewportSwizzleStateCreateInfoNV` state is set by adding this structure to the `pNext` chain of a `VkPipelineViewportStateCreateInfo` structure and setting the graphics pipeline state with vkCreateGraphicsPipelines.

To dynamically set the viewport swizzle state, call:

    // Provided by VK_EXT_extended_dynamic_state3 with VK_NV_viewport_swizzle, VK_EXT_shader_object with VK_NV_viewport_swizzle
    void vkCmdSetViewportSwizzleNV(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    firstViewport,
        uint32_t                                    viewportCount,
        const VkViewportSwizzleNV*                  pViewportSwizzles);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `firstViewport` is the index of the first viewport whose parameters are updated by the command.

- `viewportCount` is the number of viewports whose parameters are updated by the command.

- `pViewportSwizzles` is a pointer to an array of VkViewportSwizzleNV structures specifying viewport swizzles.

This command sets the viewport swizzle state for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the VkPipelineViewportSwizzleStateCreateInfoNV::`viewportCount`, and VkPipelineViewportSwizzleStateCreateInfoNV::`pViewportSwizzles` values used to create the currently active pipeline.

Valid Usage

- VUID-vkCmdSetViewportSwizzleNV-None-09423
  At least one of the following must be true:

  - The `extendedDynamicState3ViewportSwizzle` feature is enabled

  - The `shaderObject` feature is enabled

Valid Usage (Implicit)

- VUID-vkCmdSetViewportSwizzleNV-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetViewportSwizzleNV-pViewportSwizzles-parameter
  `pViewportSwizzles` must be a valid pointer to an array of `viewportCount` valid VkViewportSwizzleNV structures

- VUID-vkCmdSetViewportSwizzleNV-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetViewportSwizzleNV-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetViewportSwizzleNV-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdSetViewportSwizzleNV-viewportCount-arraylength
  `viewportCount` must be greater than `0`

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetViewportSwizzleNV is not affected by conditional rendering

Each viewport specified from 0 to `viewportCount` - 1 has its x,y,z,w swizzle state set to the corresponding `x`, `y`, `z` and `w` in the VkViewportSwizzleNV structure. Each component is of type VkViewportCoordinateSwizzleNV, which determines the type of swizzle for that component. The value of `x` computes the new x component of the position as:

    if (x == VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_X_NV) x' = x;
    if (x == VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_X_NV) x' = -x;
    if (x == VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Y_NV) x' = y;
    if (x == VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Y_NV) x' = -y;
    if (x == VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Z_NV) x' = z;
    if (x == VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Z_NV) x' = -z;
    if (x == VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_W_NV) x' = w;
    if (x == VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_W_NV) x' = -w;

Similar selections are performed for the `y`, `z`, and `w` coordinates. This swizzling is applied before clipping and perspective divide. If the swizzle for an active viewport index is not specified, the swizzle for `x` is VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_X_NV, `y` is VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Y_NV, `z` is VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Z_NV and `w` is VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_W_NV.

Viewport swizzle parameters are specified by setting the `pNext` pointer of `VkGraphicsPipelineCreateInfo` to point to a `VkPipelineViewportSwizzleStateCreateInfoNV` structure. VkPipelineViewportSwizzleStateCreateInfoNV uses `VkViewportSwizzleNV` to set the viewport swizzle parameters.

The `VkViewportSwizzleNV` structure is defined as:

    // Provided by VK_NV_viewport_swizzle
    typedef struct VkViewportSwizzleNV {
        VkViewportCoordinateSwizzleNV    x;
        VkViewportCoordinateSwizzleNV    y;
        VkViewportCoordinateSwizzleNV    z;
        VkViewportCoordinateSwizzleNV    w;
    } VkViewportSwizzleNV;

- `x` is a VkViewportCoordinateSwizzleNV value specifying the swizzle operation to apply to the x component of the primitive

- `y` is a VkViewportCoordinateSwizzleNV value specifying the swizzle operation to apply to the y component of the primitive

- `z` is a VkViewportCoordinateSwizzleNV value specifying the swizzle operation to apply to the z component of the primitive

- `w` is a VkViewportCoordinateSwizzleNV value specifying the swizzle operation to apply to the w component of the primitive

Valid Usage (Implicit)

- VUID-VkViewportSwizzleNV-x-parameter
  `x` must be a valid VkViewportCoordinateSwizzleNV value

- VUID-VkViewportSwizzleNV-y-parameter
  `y` must be a valid VkViewportCoordinateSwizzleNV value

- VUID-VkViewportSwizzleNV-z-parameter
  `z` must be a valid VkViewportCoordinateSwizzleNV value

- VUID-VkViewportSwizzleNV-w-parameter
  `w` must be a valid VkViewportCoordinateSwizzleNV value

Possible values of the VkViewportSwizzleNV::`x`, `y`, `z`, and `w` members, specifying swizzling of the corresponding components of primitives, are:

    // Provided by VK_NV_viewport_swizzle
    typedef enum VkViewportCoordinateSwizzleNV {
        VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_X_NV = 0,
        VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_X_NV = 1,
        VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Y_NV = 2,
        VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Y_NV = 3,
        VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Z_NV = 4,
        VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Z_NV = 5,
        VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_W_NV = 6,
        VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_W_NV = 7,
    } VkViewportCoordinateSwizzleNV;

These values are described in detail in Viewport Swizzle.

### 33.3. Flat Shading

Flat shading a vertex output attribute means to assign all vertices of the primitive the same value for that output. The output values assigned are those of the provoking vertex of the primitive. Flat shading is applied to those vertex attributes that match fragment input attributes which are decorated as `Flat`.

If neither mesh, geometry nor tessellation shading is active, the provoking vertex is determined by the primitive topology defined by VkPipelineInputAssemblyStateCreateInfo::`topology` used to execute the drawing command.

If a shader using `MeshNV` `Execution` `Model` is active, the provoking vertex is determined by the primitive topology defined by the `OutputPoints`, `OutputLinesNV`, or `OutputTrianglesNV` execution mode.

If a shader using `MeshEXT` `Execution` `Model` is active, the provoking vertex is determined by the primitive topology defined by the `OutputPoints`, `OutputLinesEXT`, or `OutputTrianglesEXT` execution mode.

If geometry shading is active, the provoking vertex is determined by the primitive topology defined by the `OutputPoints`, `OutputLineStrip`, or `OutputTriangleStrip` execution mode.

If tessellation shading is active but geometry shading is not, the provoking vertex may be any of the vertices in each primitive.

For a given primitive topology, the pipeline’s provoking vertex mode determines which vertex is the provoking vertex. To specify the provoking vertex mode, include a `VkPipelineRasterizationProvokingVertexStateCreateInfoEXT` structure in the VkPipelineRasterizationStateCreateInfo::`pNext` chain when creating the pipeline.

The `VkPipelineRasterizationProvokingVertexStateCreateInfoEXT` structure is defined as:

    // Provided by VK_EXT_provoking_vertex
    typedef struct VkPipelineRasterizationProvokingVertexStateCreateInfoEXT {
        VkStructureType             sType;
        const void*                 pNext;
        VkProvokingVertexModeEXT    provokingVertexMode;
    } VkPipelineRasterizationProvokingVertexStateCreateInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `provokingVertexMode` is a VkProvokingVertexModeEXT value selecting the provoking vertex mode.

If this structure is not provided when creating the pipeline, the pipeline will use the VK_PROVOKING_VERTEX_MODE_FIRST_VERTEX_EXT mode.

If the `provokingVertexModePerPipeline` limit is VK_FALSE, then all pipelines bound within a render pass instance must have the same `provokingVertexMode`.

Valid Usage

- VUID-VkPipelineRasterizationProvokingVertexStateCreateInfoEXT-provokingVertexMode-04883
  If `provokingVertexMode` is VK_PROVOKING_VERTEX_MODE_LAST_VERTEX_EXT, then the `provokingVertexLast` feature must be enabled

Valid Usage (Implicit)

- VUID-VkPipelineRasterizationProvokingVertexStateCreateInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_PROVOKING_VERTEX_STATE_CREATE_INFO_EXT

- VUID-VkPipelineRasterizationProvokingVertexStateCreateInfoEXT-provokingVertexMode-parameter
  `provokingVertexMode` must be a valid VkProvokingVertexModeEXT value

Structure Chaining

Extends the structure

  - VkPipelineRasterizationStateCreateInfo

Possible values of VkPipelineRasterizationProvokingVertexStateCreateInfoEXT::`provokingVertexMode` are:

    // Provided by VK_EXT_provoking_vertex
    typedef enum VkProvokingVertexModeEXT {
        VK_PROVOKING_VERTEX_MODE_FIRST_VERTEX_EXT = 0,
        VK_PROVOKING_VERTEX_MODE_LAST_VERTEX_EXT = 1,
    } VkProvokingVertexModeEXT;

- VK_PROVOKING_VERTEX_MODE_FIRST_VERTEX_EXT specifies that the provoking vertex is the first non-adjacency vertex in the list of vertices used by a primitive.

- VK_PROVOKING_VERTEX_MODE_LAST_VERTEX_EXT specifies that the provoking vertex is the last non-adjacency vertex in the list of vertices used by a primitive.

These modes are described more precisely in Primitive Topologies.

To dynamically set the `provokingVertexMode` state, call:

    // Provided by VK_EXT_extended_dynamic_state3 with VK_EXT_provoking_vertex, VK_EXT_provoking_vertex with VK_EXT_shader_object
    void vkCmdSetProvokingVertexModeEXT(
        VkCommandBuffer                             commandBuffer,
        VkProvokingVertexModeEXT                    provokingVertexMode);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `provokingVertexMode` specifies the `provokingVertexMode` state.

This command sets the `provokingVertexMode` state for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_PROVOKING_VERTEX_MODE_EXT set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the VkPipelineRasterizationProvokingVertexStateCreateInfoEXT::`provokingVertexMode` value used to create the currently active pipeline.

Valid Usage

- VUID-vkCmdSetProvokingVertexModeEXT-None-09423
  At least one of the following must be true:

  - The `extendedDynamicState3ProvokingVertexMode` feature is enabled

  - The `shaderObject` feature is enabled

- VUID-vkCmdSetProvokingVertexModeEXT-provokingVertexMode-07447
  If `provokingVertexMode` is VK_PROVOKING_VERTEX_MODE_LAST_VERTEX_EXT, then the `provokingVertexLast` feature must be enabled

Valid Usage (Implicit)

- VUID-vkCmdSetProvokingVertexModeEXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetProvokingVertexModeEXT-provokingVertexMode-parameter
  `provokingVertexMode` must be a valid VkProvokingVertexModeEXT value

- VUID-vkCmdSetProvokingVertexModeEXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetProvokingVertexModeEXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetProvokingVertexModeEXT-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetProvokingVertexModeEXT is not affected by conditional rendering

### 33.4. Primitive Clipping

Primitives are culled against the cull volume and then clipped to the clip volume. In clip coordinates, the view volume is defined by:

−w c​≤x c​≤w c​−w c​≤y c​≤w c​z m​≤z c​≤w c​​

where if VkPipelineViewportDepthClipControlCreateInfoEXT::`negativeOneToOne` is VK_TRUE zm is equal to -wc otherwise zm is equal to zero.

This view volume can be further restricted by as many as `VkPhysicalDeviceLimits`::`maxClipDistances` application-defined half-spaces.

The cull volume is the intersection of up to `VkPhysicalDeviceLimits`::`maxCullDistances` application-defined half-spaces (if no application-defined cull half-spaces are enabled, culling against the cull volume is skipped).

A shader must write a single cull distance for each enabled cull half-space to elements of the `CullDistance` array. If the cull distance for any enabled cull half-space is negative for all of the vertices of the primitive under consideration, the primitive is discarded. Otherwise the primitive is clipped against the clip volume as defined below.

The clip volume is the intersection of up to `VkPhysicalDeviceLimits`::`maxClipDistances` application-defined half-spaces with the view volume (if no application-defined clip half-spaces are enabled, the clip volume is the view volume).

A shader must write a single clip distance for each enabled clip half-space to elements of the `ClipDistance` array. Clip half-space i is then given by the set of points satisfying the inequality

  ci(P) ≥ 0

where ci(P) is the clip distance i at point P. For point primitives, ci(P) is simply the clip distance for the vertex in question. For line and triangle primitives, per-vertex clip distances are interpolated using a weighted mean, with weights derived according to the algorithms described in sections Basic Line Segment Rasterization and Basic Polygon Rasterization, using the perspective interpolation equations.

The number of application-defined clip and cull half-spaces that are enabled is determined by the explicit size of the built-in arrays `ClipDistance` and `CullDistance`, respectively, declared as an output in the interface of the entry point of the final shader stage before clipping.

If VkPipelineRasterizationDepthClipStateCreateInfoEXT is present in the graphics pipeline state then depth clipping is disabled if VkPipelineRasterizationDepthClipStateCreateInfoEXT::`depthClipEnable` is VK_FALSE. Otherwise, if VkPipelineRasterizationDepthClipStateCreateInfoEXT is not present, depth clipping is disabled when VkPipelineRasterizationStateCreateInfo::`depthClampEnable` is VK_TRUE.

To dynamically set enable or disable depth clamping, call:

    // Provided by VK_EXT_extended_dynamic_state3, VK_EXT_shader_object
    void vkCmdSetDepthClampEnableEXT(
        VkCommandBuffer                             commandBuffer,
        VkBool32                                    depthClampEnable);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `depthClampEnable` specifies whether depth clamping is enabled.

This command sets whether depth clamping is enabled or disabled for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_DEPTH_CLAMP_ENABLE_EXT set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the VkPipelineRasterizationStateCreateInfo::`depthClampEnable` value used to create the currently active pipeline.

If the depth clamping state is changed dynamically, and the pipeline was not created with VK_DYNAMIC_STATE_DEPTH_CLIP_ENABLE_EXT enabled, then depth clipping is enabled when depth clamping is disabled and vice versa.

If the `maintenance11` feature is enabled, the above statement is further clarified to state that the depth clipping state is only affected by the current value of `depthClampEnable` if the pipeline was not created with the VkPipelineRasterizationDepthClipStateCreateInfoEXT structure. If VkPipelineRasterizationDepthClipStateCreateInfoEXT was included in the pipeline creation then the depth clipping state is set explicitly by VkPipelineRasterizationDepthClipStateCreateInfoEXT::`depthClipEnable` and not changed when the depth clamping state is modified.

Valid Usage

- VUID-vkCmdSetDepthClampEnableEXT-None-09423
  At least one of the following must be true:

  - The `extendedDynamicState3DepthClampEnable` feature is enabled

  - The `shaderObject` feature is enabled

- VUID-vkCmdSetDepthClampEnableEXT-depthClamp-07449
  If the `depthClamp` feature is not enabled, `depthClampEnable` must be VK_FALSE

Valid Usage (Implicit)

- VUID-vkCmdSetDepthClampEnableEXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetDepthClampEnableEXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetDepthClampEnableEXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetDepthClampEnableEXT-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetDepthClampEnableEXT is not affected by conditional rendering

To dynamically set enable or disable depth clipping, call:

    // Provided by VK_EXT_depth_clip_enable with VK_EXT_extended_dynamic_state3, VK_EXT_depth_clip_enable with VK_EXT_shader_object
    void vkCmdSetDepthClipEnableEXT(
        VkCommandBuffer                             commandBuffer,
        VkBool32                                    depthClipEnable);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `depthClipEnable` specifies whether depth clipping is enabled.

This command sets whether depth clipping is enabled or disabled for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_DEPTH_CLIP_ENABLE_EXT set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the VkPipelineRasterizationDepthClipStateCreateInfoEXT::`depthClipEnable` value used to create the currently active pipeline. If VkPipelineRasterizationDepthClipStateCreateInfoEXT was not specified, depth clipping is set to the inverse of the current value of `depthClampEnable`.

Valid Usage

- VUID-vkCmdSetDepthClipEnableEXT-None-09423
  At least one of the following must be true:

  - The `extendedDynamicState3DepthClipEnable` feature is enabled

  - The `shaderObject` feature is enabled

- VUID-vkCmdSetDepthClipEnableEXT-depthClipEnable-07451
  The `depthClipEnable` feature must be enabled

Valid Usage (Implicit)

- VUID-vkCmdSetDepthClipEnableEXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetDepthClipEnableEXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetDepthClipEnableEXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetDepthClipEnableEXT-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetDepthClipEnableEXT is not affected by conditional rendering

When depth clipping is disabled, the plane equation

  zm ≤ zc ≤ wc

(see the clip volume definition above) is ignored by view volume clipping (effectively, there is no near or far plane clipping).

If the primitive under consideration is a point or line segment, then clipping passes it unchanged if its vertices lie entirely within the clip volume.

Possible values of VkPhysicalDevicePointClippingProperties::`pointClippingBehavior`, specifying clipping behavior of a point primitive whose vertex lies outside the clip volume, are:

    // Provided by VK_VERSION_1_1
    typedef enum VkPointClippingBehavior {
        VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES = 0,
        VK_POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY = 1,
      // Provided by VK_KHR_maintenance2
        VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES_KHR = VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES,
      // Provided by VK_KHR_maintenance2
        VK_POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY_KHR = VK_POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY,
    } VkPointClippingBehavior;

    // Provided by VK_KHR_maintenance2
    // Equivalent to VkPointClippingBehavior
    typedef VkPointClippingBehavior VkPointClippingBehaviorKHR;

- VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES specifies that the primitive is discarded if the vertex lies outside any clip plane, including the planes bounding the view volume.

- VK_POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY specifies that the primitive is discarded only if the vertex lies outside any user clip plane.

If either of a line segment’s vertices lie outside of the clip volume, the line segment may be clipped, with new vertex coordinates computed for each vertex that lies outside the clip volume. A clipped line segment endpoint lies on both the original line segment and the boundary of the clip volume.

This clipping produces a value, 0 ≤ t ≤ 1, for each clipped vertex. If the coordinates of a clipped vertex are P and the unclipped line segment’s vertex coordinates are P1 and P2, then t satisfies the following equation

  P = t P1 + (1-t) P2.

t is used to clip vertex output attributes as described in Clipping Shader Outputs.

If the primitive is a polygon, it passes unchanged if every one of its edges lies entirely inside the clip volume, and is either clipped or discarded otherwise. If the edges of the polygon intersect the boundary of the clip volume, the intersecting edges are reconnected by new edges that lie along the boundary of the clip volume - in some cases requiring the introduction of new vertices into a polygon.

If a polygon intersects an edge of the clip volume’s boundary, the clipped polygon must include a point on this boundary edge.

Primitives rendered with application-defined half-spaces must satisfy a complementarity criterion. Suppose a series of primitives is drawn where each vertex i has a single specified clip distance di (or a number of similarly specified clip distances, if multiple half-spaces are enabled). Next, suppose that the same series of primitives are drawn again with each such clip distance replaced by -di (and the graphics pipeline is otherwise the same). In this case, primitives must not be missing any pixels, and pixels must not be drawn twice in regions where those primitives are cut by the clip planes.

The `VkPipelineViewportDepthClipControlCreateInfoEXT` structure is defined as:

    // Provided by VK_EXT_depth_clip_control
    typedef struct VkPipelineViewportDepthClipControlCreateInfoEXT {
        VkStructureType    sType;
        const void*        pNext;
        VkBool32           negativeOneToOne;
    } VkPipelineViewportDepthClipControlCreateInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `negativeOneToOne` sets the zm in the view volume to -wc

Valid Usage

- VUID-VkPipelineViewportDepthClipControlCreateInfoEXT-negativeOneToOne-06470
  If the `depthClipControl` feature is not enabled, `negativeOneToOne` must be VK_FALSE

Valid Usage (Implicit)

- VUID-VkPipelineViewportDepthClipControlCreateInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_DEPTH_CLIP_CONTROL_CREATE_INFO_EXT

Structure Chaining

Extends the structure

  - VkPipelineViewportStateCreateInfo

To dynamically set `negativeOneToOne`, call:

    // Provided by VK_EXT_depth_clip_control with VK_EXT_extended_dynamic_state3, VK_EXT_depth_clip_control with VK_EXT_shader_object
    void vkCmdSetDepthClipNegativeOneToOneEXT(
        VkCommandBuffer                             commandBuffer,
        VkBool32                                    negativeOneToOne);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `negativeOneToOne` specifies the `negativeOneToOne` state.

This command sets the `negativeOneToOne` state for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_DEPTH_CLIP_NEGATIVE_ONE_TO_ONE_EXT set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the VkPipelineViewportDepthClipControlCreateInfoEXT::`negativeOneToOne` value used to create the currently active pipeline.

Valid Usage

- VUID-vkCmdSetDepthClipNegativeOneToOneEXT-None-09423
  At least one of the following must be true:

  - The `extendedDynamicState3DepthClipNegativeOneToOne` feature is enabled

  - The `shaderObject` feature is enabled

- VUID-vkCmdSetDepthClipNegativeOneToOneEXT-depthClipControl-07453
  The `depthClipControl` feature must be enabled

Valid Usage (Implicit)

- VUID-vkCmdSetDepthClipNegativeOneToOneEXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetDepthClipNegativeOneToOneEXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetDepthClipNegativeOneToOneEXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetDepthClipNegativeOneToOneEXT-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetDepthClipNegativeOneToOneEXT is not affected by conditional rendering

### 33.5. Clipping Shader Outputs

Next, vertex output attributes are clipped. The output values associated with a vertex that lies within the clip volume are unaffected by clipping. If a primitive is clipped, however, the output values assigned to vertices produced by clipping are clipped.

Let the output values assigned to the two vertices P1 and P2 of an unclipped edge be c1 and c2. The value of t (see Primitive Clipping) for a clipped point P is used to obtain the output value associated with P as

  c = t c1 + (1-t) c2.

(Multiplying an output value by a scalar means multiplying each of x, y, z, and w by the scalar.)

Since this computation is performed in clip space before division by wc, clipped output values are perspective-correct.

Polygon clipping creates a clipped vertex along an edge of the clip volume’s boundary. This situation is handled by noting that polygon clipping proceeds by clipping against one half-space at a time. Output value clipping is done in the same way, so that clipped points always occur at the intersection of polygon edges (possibly already clipped) with the clip volume’s boundary.

For vertex output attributes whose matching fragment input attributes are decorated with `NoPerspective`, the value of t used to obtain the output value associated with P will be adjusted to produce results that vary linearly in framebuffer space.

Output attributes of integer or unsigned integer type must always be flat shaded. Flat shaded attributes are constant over the primitive being rasterized (see Basic Line Segment Rasterization and Basic Polygon Rasterization), and no interpolation is performed. The output value c is taken from either c1 or c2, since flat shading has already occurred and the two values are identical.

### 33.6. Controlling Viewport W Scaling

If viewport W scaling is enabled, the W component of the clip coordinate is modified by the provided coefficients from the corresponding viewport as follows.

  wc' = xcoeff xc + ycoeff yc + wc

The `VkPipelineViewportWScalingStateCreateInfoNV` structure is defined as:

    // Provided by VK_NV_clip_space_w_scaling
    typedef struct VkPipelineViewportWScalingStateCreateInfoNV {
        VkStructureType                sType;
        const void*                    pNext;
        VkBool32                       viewportWScalingEnable;
        uint32_t                       viewportCount;
        const VkViewportWScalingNV*    pViewportWScalings;
    } VkPipelineViewportWScalingStateCreateInfoNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `viewportWScalingEnable` controls whether viewport W scaling is enabled.

- `viewportCount` is the number of viewports used by W scaling, and must match the number of viewports in the pipeline if viewport W scaling is enabled.

- `pViewportWScalings` is a pointer to an array of VkViewportWScalingNV structures defining the W scaling parameters for the corresponding viewports. If the viewport W scaling state is dynamic, this member is ignored.

Valid Usage (Implicit)

- VUID-VkPipelineViewportWScalingStateCreateInfoNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV

- VUID-VkPipelineViewportWScalingStateCreateInfoNV-viewportCount-arraylength
  `viewportCount` must be greater than `0`

Structure Chaining

Extends the structure

  - VkPipelineViewportStateCreateInfo

The `VkPipelineViewportWScalingStateCreateInfoNV` state is set by adding this structure to the `pNext` chain of a `VkPipelineViewportStateCreateInfo` structure and setting the graphics pipeline state with vkCreateGraphicsPipelines.

To dynamically set the `viewportWScalingEnable` state, call:

    // Provided by VK_EXT_extended_dynamic_state3 with VK_NV_clip_space_w_scaling, VK_EXT_shader_object with VK_NV_clip_space_w_scaling
    void vkCmdSetViewportWScalingEnableNV(
        VkCommandBuffer                             commandBuffer,
        VkBool32                                    viewportWScalingEnable);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `viewportWScalingEnable` specifies the `viewportWScalingEnable` state.

This command sets the `viewportWScalingEnable` state for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_ENABLE_NV set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the VkPipelineViewportWScalingStateCreateInfoNV::`viewportWScalingEnable` value used to create the currently active pipeline.

Valid Usage

- VUID-vkCmdSetViewportWScalingEnableNV-None-09423
  At least one of the following must be true:

  - The `extendedDynamicState3ViewportWScalingEnable` feature is enabled

  - The `shaderObject` feature is enabled

Valid Usage (Implicit)

- VUID-vkCmdSetViewportWScalingEnableNV-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetViewportWScalingEnableNV-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetViewportWScalingEnableNV-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetViewportWScalingEnableNV-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetViewportWScalingEnableNV is not affected by conditional rendering

To dynamically set the viewport W scaling parameters, call:

    // Provided by VK_NV_clip_space_w_scaling
    void vkCmdSetViewportWScalingNV(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    firstViewport,
        uint32_t                                    viewportCount,
        const VkViewportWScalingNV*                 pViewportWScalings);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `firstViewport` is the index of the first viewport whose parameters are updated by the command.

- `viewportCount` is the number of viewports whose parameters are updated by the command.

- `pViewportWScalings` is a pointer to an array of VkViewportWScalingNV structures specifying viewport parameters.

The viewport parameters taken from element i of `pViewportWScalings` replace the current state for the viewport index `firstViewport` + i, for i in [0, `viewportCount`).

This command sets the viewport W scaling for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the VkPipelineViewportWScalingStateCreateInfoNV::`pViewportWScalings` values used to create the currently active pipeline.

Valid Usage

- VUID-vkCmdSetViewportWScalingNV-firstViewport-01324
  The sum of `firstViewport` and `viewportCount` must be between `1` and VkPhysicalDeviceLimits::`maxViewports`, inclusive

Valid Usage (Implicit)

- VUID-vkCmdSetViewportWScalingNV-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetViewportWScalingNV-pViewportWScalings-parameter
  `pViewportWScalings` must be a valid pointer to an array of `viewportCount` VkViewportWScalingNV structures

- VUID-vkCmdSetViewportWScalingNV-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetViewportWScalingNV-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetViewportWScalingNV-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdSetViewportWScalingNV-viewportCount-arraylength
  `viewportCount` must be greater than `0`

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetViewportWScalingNV is not affected by conditional rendering

Both VkPipelineViewportWScalingStateCreateInfoNV and vkCmdSetViewportWScalingNV use `VkViewportWScalingNV` to set the viewport transformation parameters.

The `VkViewportWScalingNV` structure is defined as:

    // Provided by VK_NV_clip_space_w_scaling
    typedef struct VkViewportWScalingNV {
        float    xcoeff;
        float    ycoeff;
    } VkViewportWScalingNV;

- `xcoeff` and `ycoeff` are the viewport’s W scaling factor for x and y respectively.

### 33.7. Coordinate Transformations

Clip coordinates for a vertex result from shader execution, which yields a vertex coordinate `Position`.

Perspective division on clip coordinates yields normalized device coordinates, followed by a viewport transformation (see Controlling the Viewport) to convert these coordinates into framebuffer coordinates.

If a vertex in clip coordinates has a position given by

​x c​y c​z c​w c​​
​

then the vertex’s normalized device coordinates are

​x d​y d​z d​​
​=
​w c​x c​​w c​y c​​w c​z c​​​
​

### 33.8. Render Pass Transform

A render pass transform can be enabled for render pass instances. The clip coordinates (xc, yc) that result from vertex shader execution are transformed by a rotation of 0, 90, 180, or 270 degrees in the XY plane, centered at the origin.

When Render pass transform is enabled, the transform applies to all primitives for all subpasses of the render pass. The transformed vertex in clip coordinates has a position given by

​x c t r ans​​y c t r ans​​z c t r ans​​​
​=
​x c​cos θ−y c​sin θ x c​sin θ+y c​cos θ z c​​
​

where

- θ is 0 degrees for VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR

- θ is 90 degrees for VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR

- θ is 180 degrees for VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR

- θ is 270 degrees for VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR

The transformed vertex’s normalized device coordinates are

​x d​y d​z d​​
​=
​w c​x c t r ans​​​w c​y c t r ans​​​w c​z c t r ans​​​​
​

When render pass transform is enabled for a render pass instance, the following additional features are enabled:

- Each VkViewport specified by either VkPipelineViewportStateCreateInfo::`pViewports` or vkCmdSetViewport will have its width/height (px, py) and its center (ox, oy) similarly transformed by the implementation.

- Each scissor specified by VkPipelineViewportStateCreateInfo::`pScissors` or vkCmdSetScissor will have its (offsetx, offsety) and (extentx, extenty) similarly transformed by the implementation.

- The `renderArea` specified in VkCommandBufferInheritanceRenderPassTransformInfoQCOM and VkRenderPassBeginInfo will be similarly transformed by the implementation.

- The (x, y) components of shader variables with built-in decorations `FragCoord`, `SamplePosition`, or `PointCoord` will be similarly transformed by the implementation.

- The (x,y) components of the `offset` operand of the `InterpolateAtOffset` extended instruction will be similarly transformed by the implementation.

- The values returned by SPIR-V derivative instructions `OpDPdx`, `OpDPdy`, `OpDPdxCourse`, `OpDPdyCourse`, `OpDPdxFine`, `OpDPdyFine` will be similarly transformed by the implementation.

The net result of the above, is that applications can act as if rendering to a framebuffer oriented with the VkSurfaceCapabilitiesKHR::`currentTransform`. In other words, applications can act as if the presentation engine will be performing the transformation of the swapchain image after rendering and prior to presentation to the user. In fact, the transformation of the various items cited above are being handled by the implementation as the rendering takes place.

### 33.9. Controlling the Viewport

The viewport transformation is determined by the selected viewport’s width and height in pixels, px and py, respectively, and its center (ox, oy) (also in pixels), as well as its depth range min and max determining a depth range scale value pz and a depth range bias value oz (defined below). The vertex’s framebuffer coordinates (xf, yf) and depth zf are given by

  xf = (px / 2) xd + ox

  yf = (py / 2) yd + oy

  zf = pz × zd + oz

Multiple viewports are available, numbered zero up to `VkPhysicalDeviceLimits`::`maxViewports` minus one. The number of viewports used by a pipeline is controlled by the `viewportCount` member of the `VkPipelineViewportStateCreateInfo` structure used in pipeline creation.

xf and yf have limited precision, where the number of fractional bits retained is specified by `VkPhysicalDeviceLimits`::`subPixelPrecisionBits`. When rasterizing line segments, the number of fractional bits is specified by `VkPhysicalDeviceLineRasterizationProperties`::`lineSubPixelPrecisionBits`.

The `VkPipelineViewportStateCreateInfo` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkPipelineViewportStateCreateInfo {
        VkStructureType                       sType;
        const void*                           pNext;
        VkPipelineViewportStateCreateFlags    flags;
        uint32_t                              viewportCount;
        const VkViewport*                     pViewports;
        uint32_t                              scissorCount;
        const VkRect2D*                       pScissors;
    } VkPipelineViewportStateCreateInfo;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is reserved for future use.

- `viewportCount` is the number of viewports used by the pipeline.

- `pViewports` is a pointer to an array of VkViewport structures, defining the viewport transforms. If the viewport state is dynamic, this member is ignored.

- `scissorCount` is the number of scissors and must match the number of viewports.

- `pScissors` is a pointer to an array of VkRect2D structures defining the rectangular bounds of the scissor for the corresponding viewport. If the scissor state is dynamic, this member is ignored.

Valid Usage

- VUID-VkPipelineViewportStateCreateInfo-viewportCount-01216
  If the `multiViewport` feature is not enabled, `viewportCount` must not be greater than `1`

- VUID-VkPipelineViewportStateCreateInfo-scissorCount-01217
  If the `multiViewport` feature is not enabled, `scissorCount` must not be greater than `1`

- VUID-VkPipelineViewportStateCreateInfo-viewportCount-01218
  `viewportCount` must be less than or equal to `VkPhysicalDeviceLimits`::`maxViewports`

- VUID-VkPipelineViewportStateCreateInfo-scissorCount-01219
  `scissorCount` must be less than or equal to `VkPhysicalDeviceLimits`::`maxViewports`

- VUID-VkPipelineViewportStateCreateInfo-x-02821
  The `x` and `y` members of `offset` member of any element of `pScissors` must be greater than or equal to `0`

- VUID-VkPipelineViewportStateCreateInfo-offset-02822
  Evaluation of (`offset.x` + `extent.width`) must not cause a signed integer addition overflow for any element of `pScissors`

- VUID-VkPipelineViewportStateCreateInfo-offset-02823
  Evaluation of (`offset.y` + `extent.height`) must not cause a signed integer addition overflow for any element of `pScissors`

- VUID-VkPipelineViewportStateCreateInfo-scissorCount-04134
  If `scissorCount` and `viewportCount` are both not dynamic, then `scissorCount` and `viewportCount` must be identical

- VUID-VkPipelineViewportStateCreateInfo-viewportCount-04135
  If the graphics pipeline is being created with VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT set then `viewportCount` must be `0`, otherwise `viewportCount` must be greater than `0`

- VUID-VkPipelineViewportStateCreateInfo-scissorCount-04136
  If the graphics pipeline is being created with VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT set then `scissorCount` must be `0`, otherwise `scissorCount` must be greater than `0`

- VUID-VkPipelineViewportStateCreateInfo-viewportWScalingEnable-01726
  If the `viewportWScalingEnable` member of a VkPipelineViewportWScalingStateCreateInfoNV structure included in the `pNext` chain is VK_TRUE, the `viewportCount` member of the VkPipelineViewportWScalingStateCreateInfoNV structure must be greater than or equal to VkPipelineViewportStateCreateInfo::`viewportCount`

Valid Usage (Implicit)

- VUID-VkPipelineViewportStateCreateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO

- VUID-VkPipelineViewportStateCreateInfo-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkPipelineViewportCoarseSampleOrderStateCreateInfoNV, VkPipelineViewportDepthClampControlCreateInfoEXT, VkPipelineViewportDepthClipControlCreateInfoEXT, VkPipelineViewportExclusiveScissorStateCreateInfoNV, VkPipelineViewportShadingRateImageStateCreateInfoNV, VkPipelineViewportSwizzleStateCreateInfoNV, or VkPipelineViewportWScalingStateCreateInfoNV

- VUID-VkPipelineViewportStateCreateInfo-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkPipelineViewportStateCreateInfo-flags-zerobitmask
  `flags` must be `0`

To dynamically set the viewport count and viewports, call:

    // Provided by VK_VERSION_1_3
    void vkCmdSetViewportWithCount(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    viewportCount,
        const VkViewport*                           pViewports);

    // Provided by VK_EXT_extended_dynamic_state, VK_EXT_shader_object
    // Equivalent to vkCmdSetViewportWithCount
    void vkCmdSetViewportWithCountEXT(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    viewportCount,
        const VkViewport*                           pViewports);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `viewportCount` specifies the viewport count.

- `pViewports` specifies the viewports to use for drawing.

This command sets the viewport count and viewports state for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the corresponding VkPipelineViewportStateCreateInfo::`viewportCount` and `pViewports` values used to create the currently active pipeline.

Valid Usage

- VUID-vkCmdSetViewportWithCount-None-08971
  At least one of the following must be true:

  - the `extendedDynamicState` feature is enabled

  - the `shaderObject` feature is enabled

  - the value of VkApplicationInfo::`apiVersion` used to create the VkInstance parent of `commandBuffer` is greater than or equal to Version 1.3

- VUID-vkCmdSetViewportWithCount-viewportCount-03394
  `viewportCount` must be between `1` and `VkPhysicalDeviceLimits`::`maxViewports`, inclusive

- VUID-vkCmdSetViewportWithCount-viewportCount-03395
  If the `multiViewport` feature is not enabled, `viewportCount` must be `1`

- VUID-vkCmdSetViewportWithCount-commandBuffer-04819
  `commandBuffer` must not have VkCommandBufferInheritanceViewportScissorInfoNV::`viewportScissor2D` enabled

Valid Usage (Implicit)

- VUID-vkCmdSetViewportWithCount-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetViewportWithCount-pViewports-parameter
  `pViewports` must be a valid pointer to an array of `viewportCount` valid VkViewport structures

- VUID-vkCmdSetViewportWithCount-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetViewportWithCount-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetViewportWithCount-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdSetViewportWithCount-viewportCount-arraylength
  `viewportCount` must be greater than `0`

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetViewportWithCount is not affected by conditional rendering

To dynamically set the scissor count and scissor rectangular bounds, call:

    // Provided by VK_VERSION_1_3
    void vkCmdSetScissorWithCount(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    scissorCount,
        const VkRect2D*                             pScissors);

    // Provided by VK_EXT_extended_dynamic_state, VK_EXT_shader_object
    // Equivalent to vkCmdSetScissorWithCount
    void vkCmdSetScissorWithCountEXT(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    scissorCount,
        const VkRect2D*                             pScissors);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `scissorCount` specifies the scissor count.

- `pScissors` specifies the scissors to use for drawing.

This command sets the scissor count and scissor rectangular bounds state for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the corresponding VkPipelineViewportStateCreateInfo::`scissorCount` and `pScissors` values used to create the currently active pipeline.

Valid Usage

- VUID-vkCmdSetScissorWithCount-None-08971
  At least one of the following must be true:

  - the `extendedDynamicState` feature is enabled

  - the `shaderObject` feature is enabled

  - the value of VkApplicationInfo::`apiVersion` used to create the VkInstance parent of `commandBuffer` is greater than or equal to Version 1.3

- VUID-vkCmdSetScissorWithCount-scissorCount-03397
  `scissorCount` must be between `1` and `VkPhysicalDeviceLimits`::`maxViewports`, inclusive

- VUID-vkCmdSetScissorWithCount-scissorCount-03398
  If the `multiViewport` feature is not enabled, `scissorCount` must be `1`

- VUID-vkCmdSetScissorWithCount-x-03399
  The `x` and `y` members of `offset` member of any element of `pScissors` must be greater than or equal to `0`

- VUID-vkCmdSetScissorWithCount-offset-03400
  Evaluation of (`offset.x` + `extent.width`) must not cause a signed integer addition overflow for any element of `pScissors`

- VUID-vkCmdSetScissorWithCount-offset-03401
  Evaluation of (`offset.y` + `extent.height`) must not cause a signed integer addition overflow for any element of `pScissors`

- VUID-vkCmdSetScissorWithCount-commandBuffer-04820
  `commandBuffer` must not have VkCommandBufferInheritanceViewportScissorInfoNV::`viewportScissor2D` enabled

Valid Usage (Implicit)

- VUID-vkCmdSetScissorWithCount-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetScissorWithCount-pScissors-parameter
  `pScissors` must be a valid pointer to an array of `scissorCount` VkRect2D structures

- VUID-vkCmdSetScissorWithCount-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetScissorWithCount-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetScissorWithCount-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdSetScissorWithCount-scissorCount-arraylength
  `scissorCount` must be greater than `0`

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetScissorWithCount is not affected by conditional rendering

    // Provided by VK_VERSION_1_0
    typedef VkFlags VkPipelineViewportStateCreateFlags;

`VkPipelineViewportStateCreateFlags` is a bitmask type for setting a mask, but is currently reserved for future use.

A pre-rasterization shader stage can direct each primitive to zero or more viewports. The destination viewports for a primitive are selected by the last active pre-rasterization shader stage that has an output variable decorated with `ViewportIndex` (selecting a single viewport) or `ViewportMaskNV` (selecting multiple viewports). The viewport transform uses the viewport corresponding to either the value assigned to `ViewportIndex` or one of the bits set in `ViewportMaskNV`, and taken from an implementation-dependent vertex of each primitive. If `ViewportIndex` or any of the bits in `ViewportMaskNV` are outside the range zero to `viewportCount` minus one for a primitive, or if the last active pre-rasterization shader stage did not assign a value to either `ViewportIndex` or `ViewportMaskNV` for all vertices of a primitive due to flow control, the values resulting from the viewport transformation of the vertices of such primitives are undefined. If the last pre-rasterization shader stage does not have an output decorated with `ViewportIndex` or `ViewportMaskNV`, the viewport numbered zero is used by the viewport transformation.

A single vertex can be used in more than one individual primitive, in primitives such as VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP. In this case, the viewport transformation is applied separately for each primitive.

To dynamically set the viewport transformation parameters, call:

    // Provided by VK_VERSION_1_0
    void vkCmdSetViewport(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    firstViewport,
        uint32_t                                    viewportCount,
        const VkViewport*                           pViewports);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `firstViewport` is the index of the first viewport whose parameters are updated by the command.

- `viewportCount` is the number of viewports whose parameters are updated by the command.

- `pViewports` is a pointer to an array of VkViewport structures specifying viewport parameters.

This command sets the viewport transformation parameters state for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_VIEWPORT set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the `VkPipelineViewportStateCreateInfo`::`pViewports` values used to create the currently active pipeline.

The viewport parameters taken from element i of `pViewports` replace the current state for the viewport index `firstViewport` + i, for i in [0, `viewportCount`).

Valid Usage

- VUID-vkCmdSetViewport-firstViewport-01223
  The sum of `firstViewport` and `viewportCount` must be between `1` and `VkPhysicalDeviceLimits`::`maxViewports`, inclusive

- VUID-vkCmdSetViewport-firstViewport-01224
  If the `multiViewport` feature is not enabled, `firstViewport` must be `0`

- VUID-vkCmdSetViewport-viewportCount-01225
  If the `multiViewport` feature is not enabled, `viewportCount` must be `1`

- VUID-vkCmdSetViewport-commandBuffer-04821
  `commandBuffer` must not have VkCommandBufferInheritanceViewportScissorInfoNV::`viewportScissor2D` enabled

Valid Usage (Implicit)

- VUID-vkCmdSetViewport-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetViewport-pViewports-parameter
  `pViewports` must be a valid pointer to an array of `viewportCount` valid VkViewport structures

- VUID-vkCmdSetViewport-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetViewport-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetViewport-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdSetViewport-viewportCount-arraylength
  `viewportCount` must be greater than `0`

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetViewport is not affected by conditional rendering

Both VkPipelineViewportStateCreateInfo and vkCmdSetViewport use `VkViewport` to set the viewport transformation parameters.

The `VkViewport` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkViewport {
        float    x;
        float    y;
        float    width;
        float    height;
        float    minDepth;
        float    maxDepth;
    } VkViewport;

- `x` and `y` are the viewport’s upper left corner (x,y).

- `width` and `height` are the viewport’s width and height, respectively.

- `minDepth` and `maxDepth` are the depth range for the viewport.

Note | Despite their names, `minDepth` can be less than, equal to, or greater than `maxDepth`.

The framebuffer depth coordinate `z`f may be represented using either a fixed-point or floating-point representation. However, a floating-point representation must be used if the depth/stencil attachment has a floating-point depth component. If an m-bit fixed-point representation is used, we assume that it represents each value 2 m−1 k​, where k ∈ { 0, 1, …​, 2m-1 }, as k (e.g. 1.0 is represented in binary as a string of all ones).

The viewport parameters shown in the above equations are found from these values as

  ox = `x` + `width` / 2

  oy = `y` + `height` / 2

  oz = `minDepth` (or (`maxDepth` + `minDepth`) / 2 if VkPipelineViewportDepthClipControlCreateInfoEXT::`negativeOneToOne` is VK_TRUE)

  px = `width`

  py = `height`

  pz = `maxDepth` - `minDepth` (or (`maxDepth` - `minDepth`) / 2 if VkPipelineViewportDepthClipControlCreateInfoEXT::`negativeOneToOne` is VK_TRUE)

If a render pass transform is enabled, the values (px,py) and (ox, oy) defining the viewport are transformed as described in render pass transform before participating in the viewport transform.

The application can specify a negative term for `height`, which has the effect of negating the y coordinate in clip space before performing the transform. When using a negative `height`, the application should also adjust the `y` value to point to the lower left corner of the viewport instead of the upper left corner. Using the negative `height` allows the application to avoid having to negate the y component of the `Position` output from the last pre-rasterization shader stage.

The width and height of the implementation-dependent maximum viewport dimensions must be greater than or equal to the width and height of the largest image which can be created and attached to a framebuffer.

The floating-point viewport bounds are represented with an implementation-dependent precision.

Valid Usage

- VUID-VkViewport-width-01770
  `width` must be greater than `0.0`

- VUID-VkViewport-width-01771
  `width` must be less than or equal to `VkPhysicalDeviceLimits`::`maxViewportDimensions`[0]

- VUID-VkViewport-apiVersion-07917
  If the VK_KHR_maintenance1 extension is not enabled, the VK_AMD_negative_viewport_height extension is not enabled, and VkPhysicalDeviceProperties::`apiVersion` is less than Vulkan 1.1, `height` must be greater than `0.0`

- VUID-VkViewport-height-01773
  The absolute value of `height` must be less than or equal to `VkPhysicalDeviceLimits`::`maxViewportDimensions`[1]

- VUID-VkViewport-x-01774
  `x` must be greater than or equal to `viewportBoundsRange`[0]

- VUID-VkViewport-x-01232
  (`x` + `width`) must be less than or equal to `viewportBoundsRange`[1]

- VUID-VkViewport-y-01775
  `y` must be greater than or equal to `viewportBoundsRange`[0]

- VUID-VkViewport-y-01776
  `y` must be less than or equal to `viewportBoundsRange`[1]

- VUID-VkViewport-y-01777
  (`y` + `height`) must be greater than or equal to `viewportBoundsRange`[0]

- VUID-VkViewport-y-01233
  (`y` + `height`) must be less than or equal to `viewportBoundsRange`[1]

- VUID-VkViewport-minDepth-01234
  If the `VK_EXT_depth_range_unrestricted` extension is not enabled, `minDepth` must be between `0.0` and `1.0`, inclusive

- VUID-VkViewport-maxDepth-01235
  If the `VK_EXT_depth_range_unrestricted` extension is not enabled, `maxDepth` must be between `0.0` and `1.0`, inclusive

## 34. Rasterization

Rasterization is the process by which a primitive is converted to a two-dimensional image. Each discrete location of this image contains associated data such as depth, color, or other attributes.

Rasterizing a primitive begins by determining which squares of an integer grid in framebuffer coordinates are occupied by the primitive, and assigning one or more depth values to each such square. This process is described below for points, lines, and polygons.

A grid square, including its (x,y) framebuffer coordinates, z (depth), and associated data added by fragment shaders, is called a fragment. A fragment is located by its upper left corner, which lies on integer grid coordinates.

Rasterization operations also refer to a fragment’s sample locations, which are offset by fractional values from its upper left corner. The rasterization rules for points, lines, and triangles involve testing whether each sample location is inside the primitive. Fragments need not actually be square, and rasterization rules are not affected by the aspect ratio of fragments. Display of non-square grids, however, will cause rasterized points and line segments to appear fatter in one direction than the other.

We assume that fragments are square, since it simplifies antialiasing and texturing. After rasterization, fragments are processed by fragment operations.

Several factors affect rasterization, including the members of VkPipelineRasterizationStateCreateInfo and VkPipelineMultisampleStateCreateInfo.

The `VkPipelineRasterizationStateCreateInfo` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkPipelineRasterizationStateCreateInfo {
        VkStructureType                            sType;
        const void*                                pNext;
        VkPipelineRasterizationStateCreateFlags    flags;
        VkBool32                                   depthClampEnable;
        VkBool32                                   rasterizerDiscardEnable;
        VkPolygonMode                              polygonMode;
        VkCullModeFlags                            cullMode;
        VkFrontFace                                frontFace;
        VkBool32                                   depthBiasEnable;
        float                                      depthBiasConstantFactor;
        float                                      depthBiasClamp;
        float                                      depthBiasSlopeFactor;
        float                                      lineWidth;
    } VkPipelineRasterizationStateCreateInfo;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is reserved for future use.

- `depthClampEnable` controls whether to clamp the fragment’s depth values as described in Depth Test. If the pipeline is not created with VkPipelineRasterizationDepthClipStateCreateInfoEXT present then enabling depth clamp will also disable clipping primitives to the z planes of the frustum as described in Primitive Clipping. Otherwise depth clipping is controlled by the state set in VkPipelineRasterizationDepthClipStateCreateInfoEXT.

- `rasterizerDiscardEnable` controls whether primitives are discarded immediately before the rasterization stage.

- `polygonMode` is the triangle rendering mode. See VkPolygonMode.

- `cullMode` is the triangle facing direction used for primitive culling. See VkCullModeFlagBits.

- `frontFace` is a VkFrontFace value specifying the front-facing triangle orientation to be used for culling.

- `depthBiasEnable` controls whether to bias fragment depth values.

- `depthBiasConstantFactor` is a scalar factor controlling the constant depth value added to each fragment.

- `depthBiasClamp` is the maximum (or minimum) depth bias of a fragment.

- `depthBiasSlopeFactor` is a scalar factor applied to a fragment’s slope in depth bias calculations.

- `lineWidth` is the width of rasterized line segments.

The application can also add a `VkPipelineRasterizationStateRasterizationOrderAMD` structure to the `pNext` chain of a VkPipelineRasterizationStateCreateInfo structure. This structure enables selecting the rasterization order to use when rendering with the corresponding graphics pipeline as described in Rasterization Order.

Valid Usage

- VUID-VkPipelineRasterizationStateCreateInfo-depthClampEnable-00782
  If the `depthClamp` feature is not enabled, `depthClampEnable` must be VK_FALSE

- VUID-VkPipelineRasterizationStateCreateInfo-polygonMode-01507
  If the `fillModeNonSolid` feature is not enabled, `polygonMode` must be VK_POLYGON_MODE_FILL or VK_POLYGON_MODE_FILL_RECTANGLE_NV

- VUID-VkPipelineRasterizationStateCreateInfo-polygonMode-01414
  If the `VK_NV_fill_rectangle` extension is not enabled, `polygonMode` must not be VK_POLYGON_MODE_FILL_RECTANGLE_NV

- VUID-VkPipelineRasterizationStateCreateInfo-pointPolygons-04458
  If the `VK_KHR_portability_subset` extension is enabled, and VkPhysicalDevicePortabilitySubsetFeaturesKHR::`pointPolygons` is VK_FALSE, and `rasterizerDiscardEnable` is VK_FALSE, `polygonMode` must not be VK_POLYGON_MODE_POINT

Valid Usage (Implicit)

- VUID-VkPipelineRasterizationStateCreateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO

- VUID-VkPipelineRasterizationStateCreateInfo-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkDepthBiasRepresentationInfoEXT, VkPipelineRasterizationConservativeStateCreateInfoEXT, VkPipelineRasterizationDepthClipStateCreateInfoEXT, VkPipelineRasterizationLineStateCreateInfo, VkPipelineRasterizationProvokingVertexStateCreateInfoEXT, VkPipelineRasterizationStateRasterizationOrderAMD, or VkPipelineRasterizationStateStreamCreateInfoEXT

- VUID-VkPipelineRasterizationStateCreateInfo-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkPipelineRasterizationStateCreateInfo-flags-zerobitmask
  `flags` must be `0`

- VUID-VkPipelineRasterizationStateCreateInfo-polygonMode-parameter
  `polygonMode` must be a valid VkPolygonMode value

- VUID-VkPipelineRasterizationStateCreateInfo-cullMode-parameter
  `cullMode` must be a valid combination of VkCullModeFlagBits values

- VUID-VkPipelineRasterizationStateCreateInfo-frontFace-parameter
  `frontFace` must be a valid VkFrontFace value

    // Provided by VK_VERSION_1_0
    typedef VkFlags VkPipelineRasterizationStateCreateFlags;

`VkPipelineRasterizationStateCreateFlags` is a bitmask type for setting a mask, but is currently reserved for future use.

If the `pNext` chain of VkPipelineRasterizationStateCreateInfo includes a `VkPipelineRasterizationDepthClipStateCreateInfoEXT` structure, then that structure controls whether depth clipping is enabled or disabled.

The `VkPipelineRasterizationDepthClipStateCreateInfoEXT` structure is defined as:

    // Provided by VK_EXT_depth_clip_enable
    typedef struct VkPipelineRasterizationDepthClipStateCreateInfoEXT {
        VkStructureType                                        sType;
        const void*                                            pNext;
        VkPipelineRasterizationDepthClipStateCreateFlagsEXT    flags;
        VkBool32                                               depthClipEnable;
    } VkPipelineRasterizationDepthClipStateCreateInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is reserved for future use.

- `depthClipEnable` controls whether depth clipping is enabled as described in Primitive Clipping.

Valid Usage (Implicit)

- VUID-VkPipelineRasterizationDepthClipStateCreateInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_DEPTH_CLIP_STATE_CREATE_INFO_EXT

- VUID-VkPipelineRasterizationDepthClipStateCreateInfoEXT-flags-zerobitmask
  `flags` must be `0`

Structure Chaining

Extends the structure

  - VkPipelineRasterizationStateCreateInfo

    // Provided by VK_EXT_depth_clip_enable
    typedef VkFlags VkPipelineRasterizationDepthClipStateCreateFlagsEXT;

`VkPipelineRasterizationDepthClipStateCreateFlagsEXT` is a bitmask type for setting a mask, but is currently reserved for future use.

The `VkPipelineMultisampleStateCreateInfo` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkPipelineMultisampleStateCreateInfo {
        VkStructureType                          sType;
        const void*                              pNext;
        VkPipelineMultisampleStateCreateFlags    flags;
        VkSampleCountFlagBits                    rasterizationSamples;
        VkBool32                                 sampleShadingEnable;
        float                                    minSampleShading;
        const VkSampleMask*                      pSampleMask;
        VkBool32                                 alphaToCoverageEnable;
        VkBool32                                 alphaToOneEnable;
    } VkPipelineMultisampleStateCreateInfo;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is reserved for future use.

- `rasterizationSamples` is a VkSampleCountFlagBits value specifying the number of samples used in rasterization. This value is ignored for the purposes of setting the number of samples used in rasterization if the pipeline is created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic state set, but if VK_DYNAMIC_STATE_SAMPLE_MASK_EXT dynamic state is not set, it is still used to define the size of the `pSampleMask` array as described below.

- `sampleShadingEnable` can be used to enable Sample Shading.

- `minSampleShading` specifies a minimum fraction of sample shading if `sampleShadingEnable` is VK_TRUE.

- `pSampleMask` is a pointer to an array of VkSampleMask values used in the sample mask test.

- `alphaToCoverageEnable` controls whether a temporary coverage value is generated based on the alpha component of the fragment’s first color output as specified in the Multisample Coverage section.

- `alphaToOneEnable` controls whether the alpha component of the fragment’s first color output is replaced with one as described in Multisample Coverage.

Each bit in the sample mask is associated with a unique sample index as defined for the coverage mask. Each bit b for mask word w in the sample mask corresponds to sample index i, where i = 32 × w + b. `pSampleMask` has a length equal to ⌈ `rasterizationSamples` / 32 ⌉ words.

If `pSampleMask` is `NULL`, it is treated as if the mask has all bits set to `1`.

Valid Usage

- VUID-VkPipelineMultisampleStateCreateInfo-sampleShadingEnable-00784
  If the `sampleRateShading` feature is not enabled, `sampleShadingEnable` must be VK_FALSE

- VUID-VkPipelineMultisampleStateCreateInfo-alphaToOneEnable-00785
  If the `alphaToOne` feature is not enabled, `alphaToOneEnable` must be VK_FALSE

- VUID-VkPipelineMultisampleStateCreateInfo-minSampleShading-00786
  `minSampleShading` must be in the range [0,1]

- VUID-VkPipelineMultisampleStateCreateInfo-rasterizationSamples-01415
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, and the `coverageReductionMode` feature is not enabled, or the `pNext` chain does not contain `VkPipelineCoverageReductionStateCreateInfoNV`, or `VkPipelineCoverageReductionStateCreateInfoNV`::`coverageReductionMode` is not set to VK_COVERAGE_REDUCTION_MODE_TRUNCATE_NV, and the subpass has any color attachments, and `rasterizationSamples` is greater than the number of color samples, then sample shading must not be enabled

Valid Usage (Implicit)

- VUID-VkPipelineMultisampleStateCreateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO

- VUID-VkPipelineMultisampleStateCreateInfo-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkPipelineCoverageModulationStateCreateInfoNV, VkPipelineCoverageReductionStateCreateInfoNV, VkPipelineCoverageToColorStateCreateInfoNV, or VkPipelineSampleLocationsStateCreateInfoEXT

- VUID-VkPipelineMultisampleStateCreateInfo-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkPipelineMultisampleStateCreateInfo-flags-zerobitmask
  `flags` must be `0`

- VUID-VkPipelineMultisampleStateCreateInfo-rasterizationSamples-parameter
  `rasterizationSamples` must be a valid VkSampleCountFlagBits value

    // Provided by VK_VERSION_1_0
    typedef VkFlags VkPipelineMultisampleStateCreateFlags;

`VkPipelineMultisampleStateCreateFlags` is a bitmask type for setting a mask, but is currently reserved for future use.

The elements of the sample mask array are of type VkSampleMask, each representing 32 bits of coverage information:

    // Provided by VK_VERSION_1_0
    typedef uint32_t VkSampleMask;

Rasterization only generates fragments which cover one or more pixels inside the framebuffer. Pixels outside the framebuffer are never considered covered in the fragment. Fragments which would be produced by application of any of the primitive rasterization rules described below but which lie outside the framebuffer are not produced, nor are they processed by any later stage of the pipeline, including any of the fragment operations.

Surviving fragments are processed by fragment shaders. Fragment shaders determine associated data for fragments, and can also modify or replace their assigned depth values.

### 34.1. Discarding Primitives Before Rasterization

Primitives are discarded before rasterization if the `rasterizerDiscardEnable` member of VkPipelineRasterizationStateCreateInfo is enabled. When enabled, primitives are discarded after they are processed by the last active shader stage in the pipeline before rasterization.

To dynamically enable whether primitives are discarded before the rasterization stage, call:

    // Provided by VK_VERSION_1_3
    void vkCmdSetRasterizerDiscardEnable(
        VkCommandBuffer                             commandBuffer,
        VkBool32                                    rasterizerDiscardEnable);

    // Provided by VK_EXT_extended_dynamic_state2, VK_EXT_shader_object
    // Equivalent to vkCmdSetRasterizerDiscardEnable
    void vkCmdSetRasterizerDiscardEnableEXT(
        VkCommandBuffer                             commandBuffer,
        VkBool32                                    rasterizerDiscardEnable);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `rasterizerDiscardEnable` controls whether primitives are discarded immediately before the rasterization stage.

This command sets the discard enable for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the VkPipelineRasterizationStateCreateInfo::`rasterizerDiscardEnable` value used to create the currently active pipeline.

Valid Usage

- VUID-vkCmdSetRasterizerDiscardEnable-None-08970
  At least one of the following must be true:

  - the `extendedDynamicState2` feature is enabled

  - the `shaderObject` feature is enabled

  - the value of VkApplicationInfo::`apiVersion` used to create the VkInstance parent of `commandBuffer` is greater than or equal to Version 1.3

Valid Usage (Implicit)

- VUID-vkCmdSetRasterizerDiscardEnable-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetRasterizerDiscardEnable-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetRasterizerDiscardEnable-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetRasterizerDiscardEnable-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetRasterizerDiscardEnable is not affected by conditional rendering

### 34.2. Controlling the Vertex Stream Used for Rasterization

By default vertex data output from the last pre-rasterization shader stage are directed to vertex stream zero. Geometry shaders can emit primitives to multiple independent vertex streams. Each vertex emitted by the geometry shader is directed at one of the vertex streams. As vertices are received on each vertex stream, they are arranged into primitives of the type specified by the geometry shader output primitive type. The shading language instructions `OpEndPrimitive` and `OpEndStreamPrimitive` can be used to end the primitive being assembled on a given vertex stream and start a new empty primitive of the same type. An implementation supports up to `VkPhysicalDeviceTransformFeedbackPropertiesEXT`::`maxTransformFeedbackStreams` streams, which is at least 1. The individual streams are numbered 0 through `maxTransformFeedbackStreams` minus 1. There is no requirement on the order of the streams to which vertices are emitted, and the number of vertices emitted to each vertex stream can be completely independent, subject only to the `VkPhysicalDeviceTransformFeedbackPropertiesEXT`::`maxTransformFeedbackStreamDataSize` and `VkPhysicalDeviceTransformFeedbackPropertiesEXT`::`maxTransformFeedbackBufferDataSize` limits. The primitives output from all vertex streams are passed to the transform feedback stage to be captured to transform feedback buffers in the manner specified by the last pre-rasterization shader stage shader’s `XfbBuffer`, `XfbStride`, and `Offsets` decorations on the output interface variables in the graphics pipeline. To use a vertex stream other than zero, or to use multiple streams, the `GeometryStreams` capability must be specified.

By default, the primitives output from vertex stream zero are rasterized. If the implementation supports the VkPhysicalDeviceTransformFeedbackPropertiesEXT::`transformFeedbackRasterizationStreamSelect` property it is possible to rasterize a vertex stream other than zero.

By default, geometry shaders that emit vertices to multiple vertex streams are limited to using only the `OutputPoints` output primitive type. If the implementation supports the VkPhysicalDeviceTransformFeedbackPropertiesEXT::`transformFeedbackStreamsLinesTriangles` property it is possible to emit `OutputLineStrip` or `OutputTriangleStrip` in addition to `OutputPoints`.

The vertex stream used for rasterization is specified by adding a `VkPipelineRasterizationStateStreamCreateInfoEXT` structure to the `pNext` chain of a VkPipelineRasterizationStateCreateInfo structure.

The `VkPipelineRasterizationStateStreamCreateInfoEXT` structure is defined as:

    // Provided by VK_EXT_transform_feedback
    typedef struct VkPipelineRasterizationStateStreamCreateInfoEXT {
        VkStructureType                                     sType;
        const void*                                         pNext;
        VkPipelineRasterizationStateStreamCreateFlagsEXT    flags;
        uint32_t                                            rasterizationStream;
    } VkPipelineRasterizationStateStreamCreateInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is reserved for future use.

- `rasterizationStream` is the vertex stream selected for rasterization.

If this structure is not present, `rasterizationStream` is assumed to be zero.

Valid Usage

- VUID-VkPipelineRasterizationStateStreamCreateInfoEXT-geometryStreams-02324
  `VkPhysicalDeviceTransformFeedbackFeaturesEXT`::`geometryStreams` must be enabled

- VUID-VkPipelineRasterizationStateStreamCreateInfoEXT-rasterizationStream-02325
  `rasterizationStream` must be less than VkPhysicalDeviceTransformFeedbackPropertiesEXT::`maxTransformFeedbackStreams`

- VUID-VkPipelineRasterizationStateStreamCreateInfoEXT-rasterizationStream-02326
  `rasterizationStream` must be zero if `VkPhysicalDeviceTransformFeedbackPropertiesEXT`::`transformFeedbackRasterizationStreamSelect` is VK_FALSE

Valid Usage (Implicit)

- VUID-VkPipelineRasterizationStateStreamCreateInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_STREAM_CREATE_INFO_EXT

- VUID-VkPipelineRasterizationStateStreamCreateInfoEXT-flags-zerobitmask
  `flags` must be `0`

Structure Chaining

Extends the structure

  - VkPipelineRasterizationStateCreateInfo

    // Provided by VK_EXT_transform_feedback
    typedef VkFlags VkPipelineRasterizationStateStreamCreateFlagsEXT;

`VkPipelineRasterizationStateStreamCreateFlagsEXT` is a bitmask type for setting a mask, but is currently reserved for future use.

To dynamically set the `rasterizationStream` state, call:

    // Provided by VK_EXT_extended_dynamic_state3 with VK_EXT_transform_feedback, VK_EXT_shader_object with VK_EXT_transform_feedback
    void vkCmdSetRasterizationStreamEXT(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    rasterizationStream);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `rasterizationStream` specifies the `rasterizationStream` state.

This command sets the `rasterizationStream` state for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXT set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the VkPipelineRasterizationStateStreamCreateInfoEXT::`rasterizationStream` value used to create the currently active pipeline.

Valid Usage

- VUID-vkCmdSetRasterizationStreamEXT-None-09423
  At least one of the following must be true:

  - The `extendedDynamicState3RasterizationStream` feature is enabled

  - The `shaderObject` feature is enabled

- VUID-vkCmdSetRasterizationStreamEXT-transformFeedback-07411
  The `transformFeedback` feature must be enabled

- VUID-vkCmdSetRasterizationStreamEXT-rasterizationStream-07412
  `rasterizationStream` must be less than VkPhysicalDeviceTransformFeedbackPropertiesEXT::`maxTransformFeedbackStreams`

- VUID-vkCmdSetRasterizationStreamEXT-rasterizationStream-07413
  `rasterizationStream` must be zero if `VkPhysicalDeviceTransformFeedbackPropertiesEXT`::`transformFeedbackRasterizationStreamSelect` is VK_FALSE

Valid Usage (Implicit)

- VUID-vkCmdSetRasterizationStreamEXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetRasterizationStreamEXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetRasterizationStreamEXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetRasterizationStreamEXT-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetRasterizationStreamEXT is not affected by conditional rendering

### 34.3. Rasterization Order

Within a subpass of a render pass instance, for a given (x,y,layer,sample) sample location, the following operations are guaranteed to execute in rasterization order, for each separate primitive that includes that sample location:

1. Fragment operations, in the order defined

2. Blending, logic operations, and color writes

Execution of these operations for each primitive in a subpass occurs in an order determined by the application.

The rasterization order to use for a graphics pipeline is specified by adding a `VkPipelineRasterizationStateRasterizationOrderAMD` structure to the `pNext` chain of a VkPipelineRasterizationStateCreateInfo structure.

The `VkPipelineRasterizationStateRasterizationOrderAMD` structure is defined as:

    // Provided by VK_AMD_rasterization_order
    typedef struct VkPipelineRasterizationStateRasterizationOrderAMD {
        VkStructureType            sType;
        const void*                pNext;
        VkRasterizationOrderAMD    rasterizationOrder;
    } VkPipelineRasterizationStateRasterizationOrderAMD;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `rasterizationOrder` is a VkRasterizationOrderAMD value specifying the primitive rasterization order to use.

Valid Usage (Implicit)

- VUID-VkPipelineRasterizationStateRasterizationOrderAMD-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD

- VUID-VkPipelineRasterizationStateRasterizationOrderAMD-rasterizationOrder-parameter
  `rasterizationOrder` must be a valid VkRasterizationOrderAMD value

Structure Chaining

Extends the structure

  - VkPipelineRasterizationStateCreateInfo

If the `VK_AMD_rasterization_order` device extension is not enabled or the application does not request a particular rasterization order through specifying a `VkPipelineRasterizationStateRasterizationOrderAMD` structure then the rasterization order used by the graphics pipeline defaults to VK_RASTERIZATION_ORDER_STRICT_AMD.

Possible values of VkPipelineRasterizationStateRasterizationOrderAMD::`rasterizationOrder`, specifying the primitive rasterization order, are:

    // Provided by VK_AMD_rasterization_order
    typedef enum VkRasterizationOrderAMD {
        VK_RASTERIZATION_ORDER_STRICT_AMD = 0,
        VK_RASTERIZATION_ORDER_RELAXED_AMD = 1,
    } VkRasterizationOrderAMD;

- VK_RASTERIZATION_ORDER_STRICT_AMD specifies that operations for each primitive in a subpass must occur in primitive order.

- VK_RASTERIZATION_ORDER_RELAXED_AMD specifies that operations for each primitive in a subpass may not occur in primitive order.

### 34.4. Multisampling

Multisampling is a mechanism to antialias all Vulkan primitives: points, lines, and polygons. The technique is to sample all primitives multiple times at each pixel. Each sample in each framebuffer attachment has storage for a color, depth, and/or stencil value, such that per-fragment operations apply to each sample independently. The color sample values can be later resolved to a single color (see Resolving Multisample Images and the Render Pass chapter for more details on how to resolve multisample images to non-multisample images).

Vulkan defines rasterization rules for single-sample modes in a way that is equivalent to a multisample mode with a single sample in the center of each fragment.

Each fragment includes a coverage mask with a single bit for each sample in the fragment, and a number of depth values and associated data for each sample.

It is understood that each pixel has `rasterizationSamples` locations associated with it. These locations are exact positions, rather than regions or areas, and each is referred to as a sample point. The sample points associated with a pixel must be located inside or on the boundary of the unit square that is considered to bound the pixel. Furthermore, the relative locations of sample points may be identical for each pixel in the framebuffer, or they may differ.

If the render pass has a fragment density map attachment, each fragment only has `rasterizationSamples` locations associated with it regardless of how many pixels are covered in the fragment area. Fragment sample locations are defined as if the fragment had an area of (1,1) and its sample points must be located within these bounds. Their actual location in the framebuffer is calculated by scaling the sample location by the fragment area. Attachments with storage for multiple samples per pixel are located at the pixel sample locations. Otherwise, the fragment’s sample locations are generally used for evaluation of associated data and fragment operations.

If the current pipeline includes a fragment shader with one or more variables in its interface decorated with `Sample` and `Input`, the data associated with those variables will be assigned independently for each sample. The values for each sample must be evaluated at the location of the sample. The data associated with any other variables not decorated with `Sample` and `Input` need not be evaluated independently for each sample.

A coverage mask is generated for each fragment, based on which samples within that fragment are determined to be within the area of the primitive that generated the fragment.

Single pixel fragments and multi-pixel fragments defined by a fragment density map have one set of samples. Multi-pixel fragments defined by a shading rate image have one set of samples per pixel. Multi-pixel fragments defined by setting the fragment shading rate have one set of samples per pixel. Each set of samples has a number of samples determined by VkPipelineMultisampleStateCreateInfo::`rasterizationSamples`. Each sample in a set is assigned a unique sample index i in the range [0, `rasterizationSamples`).

To dynamically set the `rasterizationSamples`, call:

    // Provided by VK_EXT_extended_dynamic_state3, VK_EXT_shader_object
    void vkCmdSetRasterizationSamplesEXT(
        VkCommandBuffer                             commandBuffer,
        VkSampleCountFlagBits                       rasterizationSamples);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `rasterizationSamples` specifies `rasterizationSamples`.

This command sets the `rasterizationSamples` for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the VkPipelineMultisampleStateCreateInfo::`rasterizationSamples` value used to create the currently active pipeline.

Valid Usage

- VUID-vkCmdSetRasterizationSamplesEXT-None-09423
  At least one of the following must be true:

  - The `extendedDynamicState3RasterizationSamples` feature is enabled

  - The `shaderObject` feature is enabled

Valid Usage (Implicit)

- VUID-vkCmdSetRasterizationSamplesEXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetRasterizationSamplesEXT-rasterizationSamples-parameter
  `rasterizationSamples` must be a valid VkSampleCountFlagBits value

- VUID-vkCmdSetRasterizationSamplesEXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetRasterizationSamplesEXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetRasterizationSamplesEXT-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetRasterizationSamplesEXT is not affected by conditional rendering

Each sample in a fragment is also assigned a unique coverage index j in the range [0, n × `rasterizationSamples`), where n is the number of sets in the fragment. If the fragment contains a single set of samples, the coverage index is always equal to the sample index. If a shading rate image is used and a fragment covers multiple pixels, the coverage index is determined as defined by VkPipelineViewportCoarseSampleOrderStateCreateInfoNV or vkCmdSetCoarseSampleOrderNV.

If the fragment shading rate is set, the coverage index j is determined as a function of the pixel index p, the sample index i, and the number of rasterization samples r as:

  j = i + r × ((fw × fh) - 1 - p)

where the pixel index p is determined as a function of the pixel’s framebuffer location (x,y) and the fragment size (fw,fh):

  px = x % fw

  py = y % fh

  p = px + (py × fw)

The tables below illustrate the pixel index for multi-pixel fragments:

Table 39. Pixel Indices - 1 Wide
1x1 | 1x2 | 1x4
--- | --- | ---

Table 40. Pixel Indices - 2 Wide
2x1 | 2x2 | 2x4
--- | --- | ---

Table 41. Pixel Indices - 4 Wide
4x1 | 4x2 | 4x4
--- | --- | ---

The coverage mask includes B bits packed into W words, defined as:

  B = n × `rasterizationSamples`

  W = ⌈B/32⌉

Bit b in coverage mask word w is `1` if the sample with coverage index j = 32×w + b is covered, and `0` otherwise.

If the `standardSampleLocations` member of VkPhysicalDeviceLimits is VK_TRUE, then the sample counts VK_SAMPLE_COUNT_1_BIT, VK_SAMPLE_COUNT_2_BIT, VK_SAMPLE_COUNT_4_BIT, VK_SAMPLE_COUNT_8_BIT, and VK_SAMPLE_COUNT_16_BIT have sample locations as listed in the following table, with the ith entry in the table corresponding to sample index i. VK_SAMPLE_COUNT_32_BIT and VK_SAMPLE_COUNT_64_BIT do not have standard sample locations. Locations are defined relative to an origin in the upper left corner of the fragment.

Table 42. Standard Sample Locations
Sample count | Sample Locations
--- | ---
VK_SAMPLE_COUNT_1_BIT | (0.5,0.5) |
VK_SAMPLE_COUNT_2_BIT | (0.75,0.75) (0.25,0.25) |
VK_SAMPLE_COUNT_4_BIT | (0.375, 0.125) (0.875, 0.375) (0.125, 0.625) (0.625, 0.875) |
VK_SAMPLE_COUNT_8_BIT | (0.5625, 0.3125) (0.4375, 0.6875) (0.8125, 0.5625) (0.3125, 0.1875) (0.1875, 0.8125) (0.0625, 0.4375) (0.6875, 0.9375) (0.9375, 0.0625) |
VK_SAMPLE_COUNT_16_BIT | (0.5625, 0.5625) (0.4375, 0.3125) (0.3125, 0.625) (0.75, 0.4375) (0.1875, 0.375) (0.625, 0.8125) (0.8125, 0.6875) (0.6875, 0.1875) (0.375, 0.875) (0.5, 0.0625) (0.25, 0.125) (0.125, 0.75) (0.0, 0.5) (0.9375, 0.25) (0.875, 0.9375) (0.0625, 0.0) |

Color images created with multiple samples per pixel use a compression technique where there are two arrays of data associated with each pixel. The first array contains one element per sample where each element stores an index to the second array defining the fragment mask of the pixel. The second array contains one element per color fragment and each element stores a unique color value in the format of the image. With this compression technique it is not always necessary to actually use unique storage locations for each color sample: when multiple samples share the same color value the fragment mask may have two samples referring to the same color fragment. The number of color fragments is determined by the `samples` member of the VkImageCreateInfo structure used to create the image. The `VK_AMD_shader_fragment_mask` device extension provides shader instructions enabling the application to get direct access to the fragment mask and the individual color fragment values.

Figure 19. Fragment Mask

### 34.5. Custom Sample Locations

Applications can also control the sample locations used for rasterization.

If the `pNext` chain of the VkPipelineMultisampleStateCreateInfo structure specified at pipeline creation time includes a `VkPipelineSampleLocationsStateCreateInfoEXT` structure, then that structure controls the sample locations used when rasterizing primitives with the pipeline.

The `VkPipelineSampleLocationsStateCreateInfoEXT` structure is defined as:

    // Provided by VK_EXT_sample_locations
    typedef struct VkPipelineSampleLocationsStateCreateInfoEXT {
        VkStructureType             sType;
        const void*                 pNext;
        VkBool32                    sampleLocationsEnable;
        VkSampleLocationsInfoEXT    sampleLocationsInfo;
    } VkPipelineSampleLocationsStateCreateInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `sampleLocationsEnable` controls whether custom sample locations are used. If `sampleLocationsEnable` is VK_FALSE, the default sample locations are used and the values specified in `sampleLocationsInfo` are ignored.

- `sampleLocationsInfo` is the sample locations to use during rasterization if `sampleLocationsEnable` is VK_TRUE and the graphics pipeline is not created with VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT.

Valid Usage (Implicit)

- VUID-VkPipelineSampleLocationsStateCreateInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT

- VUID-VkPipelineSampleLocationsStateCreateInfoEXT-sampleLocationsInfo-parameter
  `sampleLocationsInfo` must be a valid VkSampleLocationsInfoEXT structure

Structure Chaining

Extends the structure

  - VkPipelineMultisampleStateCreateInfo

The `VkSampleLocationsInfoEXT` structure is defined as:

    // Provided by VK_EXT_sample_locations
    typedef struct VkSampleLocationsInfoEXT {
        VkStructureType               sType;
        const void*                   pNext;
        VkSampleCountFlagBits         sampleLocationsPerPixel;
        VkExtent2D                    sampleLocationGridSize;
        uint32_t                      sampleLocationsCount;
        const VkSampleLocationEXT*    pSampleLocations;
    } VkSampleLocationsInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `sampleLocationsPerPixel` is a VkSampleCountFlagBits value specifying the number of sample locations per pixel.

- `sampleLocationGridSize` is the size of the sample location grid to select custom sample locations for.

- `sampleLocationsCount` is the number of sample locations in `pSampleLocations`.

- `pSampleLocations` is a pointer to an array of `sampleLocationsCount` VkSampleLocationEXT structures.

This structure can be used either to specify the sample locations to be used for rendering or to specify the set of sample locations an image subresource has been last rendered with for the purposes of layout transitions of depth/stencil images created with VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT.

The sample locations in `pSampleLocations` specify `sampleLocationsPerPixel` number of sample locations for each pixel in the grid of the size specified in `sampleLocationGridSize`. The sample location for sample i at the pixel grid location (x,y) is taken from `pSampleLocations`[(x + y × `sampleLocationGridSize.width`) × `sampleLocationsPerPixel` + i].

If the render pass has a fragment density map, the implementation will choose the sample locations for the fragment and the contents of `pSampleLocations` may be ignored.

Valid Usage

- VUID-VkSampleLocationsInfoEXT-sampleLocationsPerPixel-01526
  `sampleLocationsPerPixel` must be a valid VkSampleCountFlagBits value that is set in VkPhysicalDeviceSampleLocationsPropertiesEXT::`sampleLocationSampleCounts`

- VUID-VkSampleLocationsInfoEXT-sampleLocationsCount-01527
  `sampleLocationsCount` must equal `sampleLocationsPerPixel` × `sampleLocationGridSize.width` × `sampleLocationGridSize.height`

Valid Usage (Implicit)

- VUID-VkSampleLocationsInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT

- VUID-VkSampleLocationsInfoEXT-pSampleLocations-parameter
  If `sampleLocationsCount` is not `0`, `pSampleLocations` must be a valid pointer to an array of `sampleLocationsCount` VkSampleLocationEXT structures

Structure Chaining

Extends the structures

  - VkImageMemoryBarrier

  - VkImageMemoryBarrier2

The `VkSampleLocationEXT` structure is defined as:

    // Provided by VK_EXT_sample_locations
    typedef struct VkSampleLocationEXT {
        float    x;
        float    y;
    } VkSampleLocationEXT;

- `x` is the horizontal coordinate of the sample’s location.

- `y` is the vertical coordinate of the sample’s location.

The domain space of the sample location coordinates has an upper-left origin within the pixel in framebuffer space.

The values specified in a `VkSampleLocationEXT` structure are always clamped to the implementation-dependent sample location coordinate range [`sampleLocationCoordinateRange`[0],`sampleLocationCoordinateRange`[1]] that can be queried using VkPhysicalDeviceSampleLocationsPropertiesEXT.

To dynamically set the `sampleLocationsEnable` state, call:

    // Provided by VK_EXT_extended_dynamic_state3 with VK_EXT_sample_locations, VK_EXT_sample_locations with VK_EXT_shader_object
    void vkCmdSetSampleLocationsEnableEXT(
        VkCommandBuffer                             commandBuffer,
        VkBool32                                    sampleLocationsEnable);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `sampleLocationsEnable` specifies the `sampleLocationsEnable` state.

This command sets the `sampleLocationsEnable` state for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the VkPipelineSampleLocationsStateCreateInfoEXT::`sampleLocationsEnable` value used to create the currently active pipeline.

Valid Usage

- VUID-vkCmdSetSampleLocationsEnableEXT-None-09423
  At least one of the following must be true:

  - The `extendedDynamicState3SampleLocationsEnable` feature is enabled

  - The `shaderObject` feature is enabled

Valid Usage (Implicit)

- VUID-vkCmdSetSampleLocationsEnableEXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetSampleLocationsEnableEXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetSampleLocationsEnableEXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetSampleLocationsEnableEXT-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetSampleLocationsEnableEXT is not affected by conditional rendering

To dynamically set the sample locations used for rasterization, call:

    // Provided by VK_EXT_sample_locations
    void vkCmdSetSampleLocationsEXT(
        VkCommandBuffer                             commandBuffer,
        const VkSampleLocationsInfoEXT*             pSampleLocationsInfo);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `pSampleLocationsInfo` is the sample locations state to set.

This command sets the custom sample locations for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`, and when the VkPipelineSampleLocationsStateCreateInfoEXT::`sampleLocationsEnable` property of the bound graphics pipeline is VK_TRUE. Otherwise, this state is specified by the VkPipelineSampleLocationsStateCreateInfoEXT::`sampleLocationsInfo` values used to create the currently active pipeline.

Valid Usage

- VUID-vkCmdSetSampleLocationsEXT-variableSampleLocations-01530
  If VkPhysicalDeviceSampleLocationsPropertiesEXT::`variableSampleLocations` is VK_FALSE then the current render pass must have been begun by specifying a VkRenderPassSampleLocationsBeginInfoEXT structure whose `pPostSubpassSampleLocations` member contains an element with a `subpassIndex` matching the current subpass index and the `sampleLocationsInfo` member of that element must match the sample locations state pointed to by `pSampleLocationsInfo`

Valid Usage (Implicit)

- VUID-vkCmdSetSampleLocationsEXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetSampleLocationsEXT-pSampleLocationsInfo-parameter
  `pSampleLocationsInfo` must be a valid pointer to a valid VkSampleLocationsInfoEXT structure

- VUID-vkCmdSetSampleLocationsEXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetSampleLocationsEXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetSampleLocationsEXT-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetSampleLocationsEXT is not affected by conditional rendering

### 34.6. Fragment Shading Rates

The features advertised by VkPhysicalDeviceFragmentShadingRateFeaturesKHR allow an application to control the shading rate of a given fragment shader invocation.

The fragment shading rate strongly interacts with Multisampling, and the set of available rates for an implementation may be restricted by sample rate.

To query available shading rates, call:

    // Provided by VK_KHR_fragment_shading_rate
    VkResult vkGetPhysicalDeviceFragmentShadingRatesKHR(
        VkPhysicalDevice                            physicalDevice,
        uint32_t*                                   pFragmentShadingRateCount,
        VkPhysicalDeviceFragmentShadingRateKHR*     pFragmentShadingRates);

- `physicalDevice` is the handle to the physical device whose properties will be queried.

- `pFragmentShadingRateCount` is a pointer to an integer related to the number of fragment shading rates available or queried, as described below.

- `pFragmentShadingRates` is either `NULL` or a pointer to an array of VkPhysicalDeviceFragmentShadingRateKHR structures.

If `pFragmentShadingRates` is `NULL`, then the number of fragment shading rates available is returned in `pFragmentShadingRateCount`. Otherwise, `pFragmentShadingRateCount` must point to a variable set by the application to the number of elements in the `pFragmentShadingRates` array, and on return the variable is overwritten with the number of structures actually written to `pFragmentShadingRates`. If `pFragmentShadingRateCount` is less than the number of fragment shading rates available, at most `pFragmentShadingRateCount` structures will be written, and VK_INCOMPLETE will be returned instead of VK_SUCCESS, to indicate that not all the available fragment shading rates were returned.

The returned array of fragment shading rates must be ordered from largest `fragmentSize.width` value to smallest, and each set of fragment shading rates with the same `fragmentSize.width` value must be ordered from largest `fragmentSize.height` to smallest. Any two entries in the array must not have the same `fragmentSize` values.

For any entry in the array, the following rules also apply:

- The value of `fragmentSize.width` must be less than or equal to `maxFragmentSize.width`.

- The value of `fragmentSize.width` must be greater than or equal to `1`.

- The value of `fragmentSize.width` must be a power-of-two.

- The value of `fragmentSize.height` must be less than or equal to `maxFragmentSize.height`.

- The value of `fragmentSize.height` must be greater than or equal to `1`.

- The value of `fragmentSize.height` must be a power-of-two.

- The highest sample count in `sampleCounts` must be less than or equal to `maxFragmentShadingRateRasterizationSamples`.

- The product of `fragmentSize.width`, `fragmentSize.height`, and the highest sample count in `sampleCounts` must be less than or equal to `maxFragmentShadingRateCoverageSamples`.

Implementations must support at least the following shading rates:

`sampleCounts` | `fragmentSize`
--- | ---
VK_SAMPLE_COUNT_1_BIT | VK_SAMPLE_COUNT_4_BIT | {2,2}
VK_SAMPLE_COUNT_1_BIT | VK_SAMPLE_COUNT_4_BIT | {2,1}
~0 | {1,1}

If `framebufferColorSampleCounts`, includes VK_SAMPLE_COUNT_2_BIT, the required rates must also include VK_SAMPLE_COUNT_2_BIT.

Note | Including the {1,1} fragment size is done for completeness; it has no actual effect on the support of rendering without setting the fragment size. All sample counts and render pass transforms are supported for this rate.

The returned set of fragment shading rates must be returned in the native (rotated) coordinate system. For rasterization using render pass `transform` not equal to VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR, the application must transform the returned fragment shading rates into the current (unrotated) coordinate system to get the supported rates for that transform.

Note | For example, consider an implementation returning support for 4x2, but not 2x4 in the set of supported fragment shading rates. This means that for transforms VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR and VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR, 2x4 is a supported rate, but 4x2 is an unsupported rate.

Valid Usage (Implicit)

- VUID-vkGetPhysicalDeviceFragmentShadingRatesKHR-physicalDevice-parameter
  `physicalDevice` must be a valid VkPhysicalDevice handle

- VUID-vkGetPhysicalDeviceFragmentShadingRatesKHR-pFragmentShadingRateCount-parameter
  `pFragmentShadingRateCount` must be a valid pointer to a `uint32_t` value

- VUID-vkGetPhysicalDeviceFragmentShadingRatesKHR-pFragmentShadingRates-parameter
  If the value referenced by `pFragmentShadingRateCount` is not `0`, and `pFragmentShadingRates` is not `NULL`, `pFragmentShadingRates` must be a valid pointer to an array of `pFragmentShadingRateCount` VkPhysicalDeviceFragmentShadingRateKHR structures

Return Codes

Success

  - VK_INCOMPLETE

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkPhysicalDeviceFragmentShadingRateKHR` structure is defined as

    // Provided by VK_KHR_fragment_shading_rate
    typedef struct VkPhysicalDeviceFragmentShadingRateKHR {
        VkStructureType       sType;
        void*                 pNext;
        VkSampleCountFlags    sampleCounts;
        VkExtent2D            fragmentSize;
    } VkPhysicalDeviceFragmentShadingRateKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `sampleCounts` is a bitmask of sample counts for which the shading rate described by `fragmentSize` is supported.

- `fragmentSize` is a VkExtent2D describing the width and height of a supported shading rate.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceFragmentShadingRateKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_KHR

- VUID-VkPhysicalDeviceFragmentShadingRateKHR-pNext-pNext
  `pNext` must be `NULL`

Fragment shading rates can be set at three points, with the three rates combined to determine the final shading rate.

#### 34.6.1. Pipeline Fragment Shading Rate

The pipeline fragment shading rate can be set on a per-draw basis by either setting the rate in a graphics pipeline, or dynamically via vkCmdSetFragmentShadingRateKHR.

The `VkPipelineFragmentShadingRateStateCreateInfoKHR` structure is defined as:

    // Provided by VK_KHR_fragment_shading_rate
    typedef struct VkPipelineFragmentShadingRateStateCreateInfoKHR {
        VkStructureType                       sType;
        const void*                           pNext;
        VkExtent2D                            fragmentSize;
        VkFragmentShadingRateCombinerOpKHR    combinerOps[2];
    } VkPipelineFragmentShadingRateStateCreateInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `fragmentSize` specifies a VkExtent2D structure containing the fragment size used to define the pipeline fragment shading rate for drawing commands using this pipeline.

- `combinerOps` specifies a VkFragmentShadingRateCombinerOpKHR value determining how the pipeline, primitive, and attachment shading rates are combined for fragments generated by drawing commands using the created pipeline.

If the `pNext` chain of VkGraphicsPipelineCreateInfo includes a `VkPipelineFragmentShadingRateStateCreateInfoKHR` structure, then that structure includes parameters controlling the pipeline fragment shading rate.

If this structure is not present, `fragmentSize` is considered to be equal to (1,1), and both elements of `combinerOps` are considered to be equal to VK_FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR.

Valid Usage (Implicit)

- VUID-VkPipelineFragmentShadingRateStateCreateInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PIPELINE_FRAGMENT_SHADING_RATE_STATE_CREATE_INFO_KHR

Structure Chaining

Extends the structure

  - VkGraphicsPipelineCreateInfo

To dynamically set the pipeline fragment shading rate and combiner operation, call:

    // Provided by VK_KHR_fragment_shading_rate
    void vkCmdSetFragmentShadingRateKHR(
        VkCommandBuffer                             commandBuffer,
        const VkExtent2D*                           pFragmentSize,
        const VkFragmentShadingRateCombinerOpKHR    combinerOps[2]);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `pFragmentSize` specifies the pipeline fragment shading rate for subsequent drawing commands.

- `combinerOps` specifies a VkFragmentShadingRateCombinerOpKHR determining how the pipeline, primitive, and attachment shading rates are combined for fragments generated by subsequent drawing commands.

This command sets the pipeline fragment shading rate and combiner operation for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the VkPipelineFragmentShadingRateStateCreateInfoKHR values used to create the currently active pipeline.

Valid Usage

- VUID-vkCmdSetFragmentShadingRateKHR-pipelineFragmentShadingRate-04507
  If the `pipelineFragmentShadingRate` feature is not enabled, `pFragmentSize->width` must be `1`

- VUID-vkCmdSetFragmentShadingRateKHR-pipelineFragmentShadingRate-04508
  If the `pipelineFragmentShadingRate` feature is not enabled, `pFragmentSize->height` must be `1`

- VUID-vkCmdSetFragmentShadingRateKHR-pipelineFragmentShadingRate-04509
  One of the `pipelineFragmentShadingRate`, `primitiveFragmentShadingRate`, or `attachmentFragmentShadingRate` features must be enabled

- VUID-vkCmdSetFragmentShadingRateKHR-primitiveFragmentShadingRate-04510
  If the `primitiveFragmentShadingRate` feature is not enabled, `combinerOps`[0] must be VK_FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR

- VUID-vkCmdSetFragmentShadingRateKHR-attachmentFragmentShadingRate-04511
  If the `attachmentFragmentShadingRate` feature is not enabled, `combinerOps`[1] must be VK_FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR

- VUID-vkCmdSetFragmentShadingRateKHR-fragmentSizeNonTrivialCombinerOps-04512
  If the `fragmentSizeNonTrivialCombinerOps` limit is not supported, elements of `combinerOps` must be either VK_FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR or VK_FRAGMENT_SHADING_RATE_COMBINER_OP_REPLACE_KHR

- VUID-vkCmdSetFragmentShadingRateKHR-pFragmentSize-04513
  `pFragmentSize->width` must be greater than or equal to `1`

- VUID-vkCmdSetFragmentShadingRateKHR-pFragmentSize-04514
  `pFragmentSize->height` must be greater than or equal to `1`

- VUID-vkCmdSetFragmentShadingRateKHR-pFragmentSize-04515
  `pFragmentSize->width` must be a power-of-two value

- VUID-vkCmdSetFragmentShadingRateKHR-pFragmentSize-04516
  `pFragmentSize->height` must be a power-of-two value

- VUID-vkCmdSetFragmentShadingRateKHR-pFragmentSize-04517
  `pFragmentSize->width` must be less than or equal to `4`

- VUID-vkCmdSetFragmentShadingRateKHR-pFragmentSize-04518
  `pFragmentSize->height` must be less than or equal to `4`

Valid Usage (Implicit)

- VUID-vkCmdSetFragmentShadingRateKHR-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetFragmentShadingRateKHR-pFragmentSize-parameter
  `pFragmentSize` must be a valid pointer to a valid VkExtent2D structure

- VUID-vkCmdSetFragmentShadingRateKHR-combinerOps-parameter
  Each element of `combinerOps` must be a valid VkFragmentShadingRateCombinerOpKHR value

- VUID-vkCmdSetFragmentShadingRateKHR-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetFragmentShadingRateKHR-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetFragmentShadingRateKHR-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetFragmentShadingRateKHR is not affected by conditional rendering

#### 34.6.2. Primitive Fragment Shading Rate

The primitive fragment shading rate can be set via the `PrimitiveShadingRateKHR` built-in in the last active pre-rasterization shader stage. If the last pre-rasterization shader stage is using the `MeshEXT` `Execution` `Model`, the rate associated with a given primitive is sourced from the value written to the per-primitive `PrimitiveShadingRateKHR`. Otherwise the rate associated with a given primitive is sourced from the value written to `PrimitiveShadingRateKHR` by that primitive’s provoking vertex.

#### 34.6.3. Attachment Fragment Shading Rate

The attachment shading rate can be set by including VkFragmentShadingRateAttachmentInfoKHR in a subpass to define a fragment shading rate attachment. Each pixel in the framebuffer is assigned an attachment fragment shading rate by the corresponding texel in the fragment shading rate attachment, according to:

  x' = floor(x / regionx)

  y' = floor(y / regiony)

where x' and y' are the coordinates of a texel in the fragment shading rate attachment, x and y are the coordinates of the pixel in the framebuffer, and regionx and regiony are the size of the region each texel corresponds to, as defined by the `shadingRateAttachmentTexelSize` member of VkFragmentShadingRateAttachmentInfoKHR.

If multiview is enabled and the shading rate attachment has multiple layers, the shading rate attachment texel is selected using layer = `ViewIndex`. If multiview is disabled, and both the shading rate attachment and the framebuffer have multiple layers, the shading rate attachment texel is selected using layer = `Layer`. Otherwise, layer = 0.

The texel is read from the fragment shading rate attachment image using image coordinates equal to (x',y',0,layer,0,0). The fragment size is encoded into the first component of the result of that operation as follows:

  sizew = 2((texel/4)&3)

  sizeh = 2(texel&3)

where texel is the value in the first component of the returned value, and sizew and sizeh are the width and height of the fragment size, decoded from the texel.

If no fragment shading rate attachment is specified, this size is calculated as sizew = sizeh = 1. Applications must not specify a width or height greater than 4 by this method.

The Fragment Shading Rate enumeration in SPIR-V adheres to the above encoding.

#### 34.6.4. Combining the Fragment Shading Rates

The final rate (Cxy') used for fragment shading must be one of the rates returned by vkGetPhysicalDeviceFragmentShadingRatesKHR for the sample count and render pass transform used by rasterization.

If any of the following conditions are met, Cxy' is set to {1,1} by the implementation:

- If Sample Shading is enabled.

- The `fragmentShadingRateWithSampleMask` limit is not supported, and VkPipelineMultisampleStateCreateInfo::`pSampleMask` contains a zero value in any bit used by fragment operations.

- The `fragmentShadingRateWithShaderSampleMask` is not supported, and the fragment shader has `SampleMask` in the input or output interface.

- The `fragmentShadingRateWithShaderDepthStencilWrites` limit is not supported, and the fragment shader declares the `FragDepth` or `FragStencilRefEXT` built-in.

- The `fragmentShadingRateWithConservativeRasterization` limit is not supported, and VkPipelineRasterizationConservativeStateCreateInfoEXT::`conservativeRasterizationMode` is not VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT.

- The `fragmentShadingRateWithFragmentShaderInterlock` limit is not supported, and the fragment shader declares any of the fragment shader interlock execution modes.

- The `fragmentShadingRateWithCustomSampleLocations` limit is not supported, and VkPipelineSampleLocationsStateCreateInfoEXT::`sampleLocationsEnable` is VK_TRUE.

- The fragment shader declares any of the `TileImageColorReadAccessEXT`, `TileImageDepthReadAccessEXT`, or `TileImageStencilReadAccessEXT` capabilities.

Otherwise, each of the specified shading rates are combined and then used to derive the value of Cxy'. As there are three ways to specify shading rates, two combiner operations are specified - between the pipeline and primitive shading rates, and between the result of that and the attachment shading rate.

The equation used for each combiner operation is defined by VkFragmentShadingRateCombinerOpKHR:

    // Provided by VK_KHR_fragment_shading_rate
    typedef enum VkFragmentShadingRateCombinerOpKHR {
        VK_FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR = 0,
        VK_FRAGMENT_SHADING_RATE_COMBINER_OP_REPLACE_KHR = 1,
        VK_FRAGMENT_SHADING_RATE_COMBINER_OP_MIN_KHR = 2,
        VK_FRAGMENT_SHADING_RATE_COMBINER_OP_MAX_KHR = 3,
        VK_FRAGMENT_SHADING_RATE_COMBINER_OP_MUL_KHR = 4,
    } VkFragmentShadingRateCombinerOpKHR;

- VK_FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR specifies a combiner operation of combine(Axy,Bxy) = Axy.

- VK_FRAGMENT_SHADING_RATE_COMBINER_OP_REPLACE_KHR specifies a combiner operation of combine(Axy,Bxy) = Bxy.

- VK_FRAGMENT_SHADING_RATE_COMBINER_OP_MIN_KHR specifies a combiner operation of combine(Axy,Bxy) = min(Axy,Bxy).

- VK_FRAGMENT_SHADING_RATE_COMBINER_OP_MAX_KHR specifies a combiner operation of combine(Axy,Bxy) = max(Axy,Bxy).

- VK_FRAGMENT_SHADING_RATE_COMBINER_OP_MUL_KHR specifies a combiner operation of combine(Axy,Bxy) = Axy*Bxy.

where combine(Axy,Bxy) is the combine operation, and Axy and Bxy are the inputs to the operation.

If `fragmentShadingRateStrictMultiplyCombiner` is VK_FALSE, using VK_FRAGMENT_SHADING_RATE_COMBINER_OP_MUL_KHR with values of 1 for both A and B in the same dimension results in the value 2 being produced for that dimension. See the definition of `fragmentShadingRateStrictMultiplyCombiner` for more information.

These operations are performed in a component-wise fashion.

This is used to generate a combined fragment area using the equation:

  Cxy = combine(Axy,Bxy)

where Cxy is the combined fragment area result, and Axy and Bxy are the fragment areas of the fragment shading rates being combined.

Two combine operations are performed, first with Axy equal to the pipeline fragment shading rate and Bxy equal to the primitive fragment shading rate, with the combine() operation selected by combinerOps[0]. A second combination is then performed, with Axy equal to the result of the first combination and Bxy equal to the attachment fragment shading rate, with the combine() operation selected by combinerOps[1]. The result of the second combination is used as the final fragment shading rate, reported via the `ShadingRateKHR` built-in.

Implementations should clamp the inputs to the combiner operations Axy and Bxy, and must do so if `VkPhysicalDeviceMaintenance6Properties`::`fragmentShadingRateClampCombinerInputs` is VK_TRUE. All implementations must clamp the result of the second combiner operation.

A fragment shading rate Rxy representing any of Axy, Bxy or Cxy is clamped as follows. If Rxy is one of the rates returned by vkGetPhysicalDeviceFragmentShadingRatesKHR for the sample count and render pass transform used by rasterization, the clamped shading rate Rxy' is Rxy. Otherwise, the clamped shading rate is selected from the rates returned by vkGetPhysicalDeviceFragmentShadingRatesKHR for the sample count and render pass transform used by rasterization. From this list of supported rates, the following steps are applied in order, to select a single value:

1. Keep only rates where Rx' ≤ Rx and Ry' ≤ Ry.

   - Implementations may also keep rates where Rx' ≤ Ry and Ry' ≤ Rx.

2. Keep only rates with the highest area (Rx' × Ry').

3. Keep only rates with the lowest aspect ratio (Rx' + Ry').

4. In cases where a wide (e.g. 4x1) and tall (e.g. 1x4) rate remain, the implementation may choose either rate. However, it must choose this rate consistently for the same shading rates, render pass transform, and combiner operations for the lifetime of the VkDevice.

#### 34.6.5. Extended Fragment Shading Rates

The features advertised by VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV provide support for additional fragment shading rates beyond those specifying one fragment shader invocation covering all pixels in a fragment whose size is indicated by the fragment shading rate.

If the `fragmentShadingRateEnums` feature is enabled, fragment shading rates may be specified using the VkFragmentShadingRateNV enumerated type defined as:

    // Provided by VK_NV_fragment_shading_rate_enums
    typedef enum VkFragmentShadingRateNV {
        VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_PIXEL_NV = 0,
        VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_1X2_PIXELS_NV = 1,
        VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X1_PIXELS_NV = 4,
        VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X2_PIXELS_NV = 5,
        VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X4_PIXELS_NV = 6,
        VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_4X2_PIXELS_NV = 9,
        VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_4X4_PIXELS_NV = 10,
        VK_FRAGMENT_SHADING_RATE_2_INVOCATIONS_PER_PIXEL_NV = 11,
        VK_FRAGMENT_SHADING_RATE_4_INVOCATIONS_PER_PIXEL_NV = 12,
        VK_FRAGMENT_SHADING_RATE_8_INVOCATIONS_PER_PIXEL_NV = 13,
        VK_FRAGMENT_SHADING_RATE_16_INVOCATIONS_PER_PIXEL_NV = 14,
        VK_FRAGMENT_SHADING_RATE_NO_INVOCATIONS_NV = 15,
    } VkFragmentShadingRateNV;

- VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_PIXEL_NV specifies a fragment size of 1x1 pixels.

- VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_1X2_PIXELS_NV specifies a fragment size of 1x2 pixels.

- VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X1_PIXELS_NV specifies a fragment size of 2x1 pixels.

- VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X2_PIXELS_NV specifies a fragment size of 2x2 pixels.

- VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X4_PIXELS_NV specifies a fragment size of 2x4 pixels.

- VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_4X2_PIXELS_NV specifies a fragment size of 4x2 pixels.

- VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_4X4_PIXELS_NV specifies a fragment size of 4x4 pixels.

- VK_FRAGMENT_SHADING_RATE_2_INVOCATIONS_PER_PIXEL_NV specifies a fragment size of 1x1 pixels, with two fragment shader invocations per fragment.

- VK_FRAGMENT_SHADING_RATE_4_INVOCATIONS_PER_PIXEL_NV specifies a fragment size of 1x1 pixels, with four fragment shader invocations per fragment.

- VK_FRAGMENT_SHADING_RATE_8_INVOCATIONS_PER_PIXEL_NV specifies a fragment size of 1x1 pixels, with eight fragment shader invocations per fragment.

- VK_FRAGMENT_SHADING_RATE_16_INVOCATIONS_PER_PIXEL_NV specifies a fragment size of 1x1 pixels, with sixteen fragment shader invocations per fragment.

- VK_FRAGMENT_SHADING_RATE_NO_INVOCATIONS_NV specifies that any portions of a primitive that use that shading rate should be discarded without invoking any fragment shader.

To use the shading rates VK_FRAGMENT_SHADING_RATE_2_INVOCATIONS_PER_PIXEL_NV, VK_FRAGMENT_SHADING_RATE_4_INVOCATIONS_PER_PIXEL_NV, VK_FRAGMENT_SHADING_RATE_8_INVOCATIONS_PER_PIXEL_NV, and VK_FRAGMENT_SHADING_RATE_16_INVOCATIONS_PER_PIXEL_NV as a pipeline, primitive, or attachment shading rate, the `supersampleFragmentShadingRates` feature must be enabled. To use the shading rate VK_FRAGMENT_SHADING_RATE_NO_INVOCATIONS_NV as a pipeline, primitive, or attachment shading rate, the `noInvocationFragmentShadingRates` feature must be enabled.

When using fragment shading rate enums, the pipeline fragment shading rate can be set on a per-draw basis by either setting the rate in a graphics pipeline, or dynamically via vkCmdSetFragmentShadingRateEnumNV.

The `VkPipelineFragmentShadingRateEnumStateCreateInfoNV` structure is defined as:

    // Provided by VK_NV_fragment_shading_rate_enums
    typedef struct VkPipelineFragmentShadingRateEnumStateCreateInfoNV {
        VkStructureType                       sType;
        const void*                           pNext;
        VkFragmentShadingRateTypeNV           shadingRateType;
        VkFragmentShadingRateNV               shadingRate;
        VkFragmentShadingRateCombinerOpKHR    combinerOps[2];
    } VkPipelineFragmentShadingRateEnumStateCreateInfoNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `shadingRateType` specifies a VkFragmentShadingRateTypeNV value indicating whether fragment shading rates are specified using fragment sizes or VkFragmentShadingRateNV enums.

- `shadingRate` specifies a VkFragmentShadingRateNV value indicating the pipeline fragment shading rate.

- `combinerOps` specifies VkFragmentShadingRateCombinerOpKHR values determining how the pipeline, primitive, and attachment shading rates are combined for fragments generated by drawing commands using the created pipeline.

If the `pNext` chain of VkGraphicsPipelineCreateInfo includes a `VkPipelineFragmentShadingRateEnumStateCreateInfoNV` structure, then that structure includes parameters controlling the pipeline fragment shading rate.

If this structure is not present, `shadingRateType` is considered to be equal to VK_FRAGMENT_SHADING_RATE_TYPE_FRAGMENT_SIZE_NV, `shadingRate` is considered to be equal to VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_PIXEL_NV, and both elements of `combinerOps` are considered to be equal to VK_FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR.

Valid Usage (Implicit)

- VUID-VkPipelineFragmentShadingRateEnumStateCreateInfoNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PIPELINE_FRAGMENT_SHADING_RATE_ENUM_STATE_CREATE_INFO_NV

Structure Chaining

Extends the structure

  - VkGraphicsPipelineCreateInfo

The VkFragmentShadingRateTypeNV enumerated type specifies whether a graphics pipeline gets its pipeline fragment shading rates and combiners from the VkPipelineFragmentShadingRateEnumStateCreateInfoNV structure or the VkPipelineFragmentShadingRateStateCreateInfoKHR structure.

    // Provided by VK_NV_fragment_shading_rate_enums
    typedef enum VkFragmentShadingRateTypeNV {
        VK_FRAGMENT_SHADING_RATE_TYPE_FRAGMENT_SIZE_NV = 0,
        VK_FRAGMENT_SHADING_RATE_TYPE_ENUMS_NV = 1,
    } VkFragmentShadingRateTypeNV;

- VK_FRAGMENT_SHADING_RATE_TYPE_FRAGMENT_SIZE_NV specifies that a graphics pipeline should obtain its pipeline fragment shading rate and shading rate combiner state from the VkPipelineFragmentShadingRateStateCreateInfoKHR structure and that any state specified by the VkPipelineFragmentShadingRateEnumStateCreateInfoNV structure should be ignored.

- VK_FRAGMENT_SHADING_RATE_TYPE_ENUMS_NV specifies that a graphics pipeline should obtain its pipeline fragment shading rate and shading rate combiner state from the VkPipelineFragmentShadingRateEnumStateCreateInfoNV structure and that any state specified by the VkPipelineFragmentShadingRateStateCreateInfoKHR structure should be ignored.

To dynamically set the pipeline fragment shading rate and combiner operation, call:

    // Provided by VK_NV_fragment_shading_rate_enums
    void vkCmdSetFragmentShadingRateEnumNV(
        VkCommandBuffer                             commandBuffer,
        VkFragmentShadingRateNV                     shadingRate,
        const VkFragmentShadingRateCombinerOpKHR    combinerOps[2]);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `shadingRate` specifies a VkFragmentShadingRateNV enum indicating the pipeline fragment shading rate for subsequent drawing commands.

- `combinerOps` specifies a VkFragmentShadingRateCombinerOpKHR determining how the pipeline, primitive, and attachment shading rates are combined for fragments generated by subsequent drawing commands.

This command sets the pipeline fragment shading rate and combiner operation for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the VkPipelineFragmentShadingRateEnumStateCreateInfoNV values used to create the currently active pipeline.

Note | This command allows specifying additional shading rates beyond those supported by vkCmdSetFragmentShadingRateKHR. For more information, refer to the `VK_NV_fragment_shading_rate_enums` appendix.

Valid Usage

- VUID-vkCmdSetFragmentShadingRateEnumNV-pipelineFragmentShadingRate-04576
  If the `pipelineFragmentShadingRate` feature is not enabled, `shadingRate` must be VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_PIXEL_NV

- VUID-vkCmdSetFragmentShadingRateEnumNV-supersampleFragmentShadingRates-04577
  If the `supersampleFragmentShadingRates` feature is not enabled, `shadingRate` must not be VK_FRAGMENT_SHADING_RATE_2_INVOCATIONS_PER_PIXEL_NV, VK_FRAGMENT_SHADING_RATE_4_INVOCATIONS_PER_PIXEL_NV, VK_FRAGMENT_SHADING_RATE_8_INVOCATIONS_PER_PIXEL_NV, or VK_FRAGMENT_SHADING_RATE_16_INVOCATIONS_PER_PIXEL_NV

- VUID-vkCmdSetFragmentShadingRateEnumNV-noInvocationFragmentShadingRates-04578
  If the `noInvocationFragmentShadingRates` feature is not enabled, `shadingRate` must not be VK_FRAGMENT_SHADING_RATE_NO_INVOCATIONS_NV

- VUID-vkCmdSetFragmentShadingRateEnumNV-fragmentShadingRateEnums-04579
  The `fragmentShadingRateEnums` feature must be enabled

- VUID-vkCmdSetFragmentShadingRateEnumNV-pipelineFragmentShadingRate-04580
  One of the `pipelineFragmentShadingRate`, `primitiveFragmentShadingRate`, or `attachmentFragmentShadingRate` features must be enabled

- VUID-vkCmdSetFragmentShadingRateEnumNV-primitiveFragmentShadingRate-04581
  If the `primitiveFragmentShadingRate` feature is not enabled, `combinerOps`[0] must be VK_FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR

- VUID-vkCmdSetFragmentShadingRateEnumNV-attachmentFragmentShadingRate-04582
  If the `attachmentFragmentShadingRate` feature is not enabled, `combinerOps`[1] must be VK_FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR

- VUID-vkCmdSetFragmentShadingRateEnumNV-fragmentSizeNonTrivialCombinerOps-04583
  If the `fragmentSizeNonTrivialCombinerOps` limit is not supported, elements of `combinerOps` must be either VK_FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR or VK_FRAGMENT_SHADING_RATE_COMBINER_OP_REPLACE_KHR

Valid Usage (Implicit)

- VUID-vkCmdSetFragmentShadingRateEnumNV-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetFragmentShadingRateEnumNV-shadingRate-parameter
  `shadingRate` must be a valid VkFragmentShadingRateNV value

- VUID-vkCmdSetFragmentShadingRateEnumNV-combinerOps-parameter
  Each element of `combinerOps` must be a valid VkFragmentShadingRateCombinerOpKHR value

- VUID-vkCmdSetFragmentShadingRateEnumNV-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetFragmentShadingRateEnumNV-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetFragmentShadingRateEnumNV-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetFragmentShadingRateEnumNV is not affected by conditional rendering

When the `supersampleFragmentShadingRates` or `noInvocationFragmentShadingRates` features are enabled, the behavior of the shading rate combiner operations is extended to support the shading rates enabled by those features. Primitive and attachment shading rate values are interpreted as VkFragmentShadingRateNV values and the behavior of the combiners is modified as follows:

- For VK_FRAGMENT_SHADING_RATE_COMBINER_OP_MIN_KHR, VK_FRAGMENT_SHADING_RATE_COMBINER_OP_MAX_KHR, and VK_FRAGMENT_SHADING_RATE_COMBINER_OP_MUL_KHR, if either Axy or Bxy is VK_FRAGMENT_SHADING_RATE_NO_INVOCATIONS_NV, combine(Axy,Bxy) produces a shading rate of VK_FRAGMENT_SHADING_RATE_NO_INVOCATIONS_NV, regardless of the other input shading rate.

- For VK_FRAGMENT_SHADING_RATE_COMBINER_OP_MIN_KHR, combine(Axy,Bxy) produces a shading rate whose fragment size is the smaller of the fragment sizes of Axy and Bxy and whose invocation count is the larger of the invocation counts of Axy and Bxy.

- For VK_FRAGMENT_SHADING_RATE_COMBINER_OP_MAX_KHR, combine(Axy,Bxy) produces a shading rate whose fragment size is the larger of the fragment sizes of Axy and Bxy and whose invocation count is the smaller of the invocation counts of Axy and Bxy.

- For VK_FRAGMENT_SHADING_RATE_COMBINER_OP_MUL_KHR, combine(Axy,Bxy) produces a shading rate whose fragment size and invocation count is the product of the fragment sizes and invocation counts, respectively, of Axy and Bxy. If the resulting shading rate has both multiple pixels and multiple invocations per fragment, an implementation may adjust the shading rate by reducing both the pixel and invocation counts.

If the final shading rate from the combiners is VK_FRAGMENT_SHADING_RATE_NO_INVOCATIONS_NV, no fragments will be generated for any portion of a primitive using that shading rate.

If the final shading rate from the combiners specifies multiple fragment shader invocations per fragment, the fragment will be processed with multiple unique samples as in sample shading, where the total number the total number of invocations is taken from the shading rate and then clamped to `rasterizationSamples` and `maxFragmentShadingRateInvocationCount`.

### 34.7. Shading Rate Image

The `shadingRateImage` feature allows pipelines to use a shading rate image to control the fragment area and the minimum number of fragment shader invocations launched for each fragment. When the shading rate image is enabled, the rasterizer determines a base shading rate for each region of the framebuffer covered by a primitive by fetching a value from the shading rate image and translating it to a shading rate using a per-viewport shading rate palette. This base shading rate is then adjusted to derive a final shading rate. The final shading rate specifies the fragment area and fragment shader invocation count to use for fragments generated in the region.

If the `pNext` chain of VkPipelineViewportStateCreateInfo includes a `VkPipelineViewportShadingRateImageStateCreateInfoNV` structure, then that structure includes parameters controlling the shading rate.

The `VkPipelineViewportShadingRateImageStateCreateInfoNV` structure is defined as:

    // Provided by VK_NV_shading_rate_image
    typedef struct VkPipelineViewportShadingRateImageStateCreateInfoNV {
        VkStructureType                  sType;
        const void*                      pNext;
        VkBool32                         shadingRateImageEnable;
        uint32_t                         viewportCount;
        const VkShadingRatePaletteNV*    pShadingRatePalettes;
    } VkPipelineViewportShadingRateImageStateCreateInfoNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `shadingRateImageEnable` specifies whether shading rate image and palettes are used during rasterization.

- `viewportCount` specifies the number of per-viewport palettes used to translate values stored in shading rate images.

- `pShadingRatePalettes` is a pointer to an array of VkShadingRatePaletteNV structures defining the palette for each viewport. If the shading rate palette state is dynamic, this member is ignored.

If this structure is not present, `shadingRateImageEnable` is considered to be VK_FALSE, and the shading rate image and palettes are not used.

Valid Usage

- VUID-VkPipelineViewportShadingRateImageStateCreateInfoNV-viewportCount-02054
  If the `multiViewport` feature is not enabled, `viewportCount` must be `0` or `1`

- VUID-VkPipelineViewportShadingRateImageStateCreateInfoNV-viewportCount-02055
  `viewportCount` must be less than or equal to `VkPhysicalDeviceLimits`::`maxViewports`

- VUID-VkPipelineViewportShadingRateImageStateCreateInfoNV-shadingRateImageEnable-02056
  If `shadingRateImageEnable` is VK_TRUE, `viewportCount` must be greater or equal to the `viewportCount` member of VkPipelineViewportStateCreateInfo

Valid Usage (Implicit)

- VUID-VkPipelineViewportShadingRateImageStateCreateInfoNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SHADING_RATE_IMAGE_STATE_CREATE_INFO_NV

Structure Chaining

Extends the structure

  - VkPipelineViewportStateCreateInfo

When shading rate image usage is enabled in the bound pipeline, the pipeline uses a shading rate image specified by the command:

    // Provided by VK_NV_shading_rate_image
    void vkCmdBindShadingRateImageNV(
        VkCommandBuffer                             commandBuffer,
        VkImageView                                 imageView,
        VkImageLayout                               imageLayout);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `imageView` is an image view handle specifying the shading rate image. `imageView` may be VK_NULL_HANDLE, which is equivalent to specifying a view of an image filled with zero values.

- `imageLayout` is the layout that the image subresources accessible from `imageView` will be in when the shading rate image is accessed.

Valid Usage

- VUID-vkCmdBindShadingRateImageNV-None-02058
  The `shadingRateImage` feature must be enabled

- VUID-vkCmdBindShadingRateImageNV-imageView-02059
  If `imageView` is not VK_NULL_HANDLE, it must be a valid VkImageView handle of type VK_IMAGE_VIEW_TYPE_2D or VK_IMAGE_VIEW_TYPE_2D_ARRAY

- VUID-vkCmdBindShadingRateImageNV-imageView-02060
  If `imageView` is not VK_NULL_HANDLE, it must have a format of VK_FORMAT_R8_UINT

- VUID-vkCmdBindShadingRateImageNV-imageView-02061
  If `imageView` is not VK_NULL_HANDLE, it must have been created with the VK_IMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV usage flag set

- VUID-vkCmdBindShadingRateImageNV-imageView-02062
  If `imageView` is not VK_NULL_HANDLE, `imageLayout` must match the actual VkImageLayout of each subresource accessible from `imageView` at the time the subresource is accessed

- VUID-vkCmdBindShadingRateImageNV-imageLayout-02063
  If `imageView` is not VK_NULL_HANDLE, `imageLayout` must be VK_IMAGE_LAYOUT_SHADING_RATE_OPTIMAL_NV or VK_IMAGE_LAYOUT_GENERAL

Valid Usage (Implicit)

- VUID-vkCmdBindShadingRateImageNV-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdBindShadingRateImageNV-imageView-parameter
  If `imageView` is not VK_NULL_HANDLE, `imageView` must be a valid VkImageView handle

- VUID-vkCmdBindShadingRateImageNV-imageLayout-parameter
  `imageLayout` must be a valid VkImageLayout value

- VUID-vkCmdBindShadingRateImageNV-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdBindShadingRateImageNV-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdBindShadingRateImageNV-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdBindShadingRateImageNV-commonparent
  Both of `commandBuffer`, and `imageView` that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdBindShadingRateImageNV is not affected by conditional rendering

When the shading rate image is enabled in the current pipeline, rasterizing a primitive covering the pixel with coordinates (x,y) will fetch a shading rate index value from the shading rate image bound by `vkCmdBindShadingRateImageNV`. If the shading rate image view has a type of VK_IMAGE_VIEW_TYPE_2D, the lookup will use texel coordinates (u,v) where u=⌊tw idth x​⌋, v=⌊thei g ht y​⌋, and tw idth and thei g ht are the width and height of the implementation-dependent shading rate texel size. If the shading rate image view has a type of VK_IMAGE_VIEW_TYPE_2D_ARRAY, the lookup will use texel coordinates (u,v) to extract a texel from the layer l, where l is the layer of the framebuffer being rendered to. If l is greater than or equal to the number of layers in the image view, layer zero will be used.

If the bound shading rate image view is not VK_NULL_HANDLE and contains a texel with coordinates (u,v) in layer l (if applicable), the single unsigned integer component for that texel will be used as the shading rate index. If the (u,v) coordinate is outside the extents of the subresource used by the shading rate image view, or if the image view is VK_NULL_HANDLE, the shading rate index is zero. If the shading rate image view has multiple mipmap levels, the base level identified by `VkImageSubresourceRange`::`baseMipLevel` will be used.

A shading rate index is mapped to a base shading rate using a lookup table called the shading rate image palette. There is a separate palette for each viewport. The number of entries in each palette is given by the implementation-dependent shading rate image palette size.

To dynamically set the `shadingRateImageEnable` state, call:

    // Provided by VK_EXT_extended_dynamic_state3 with VK_NV_shading_rate_image, VK_EXT_shader_object with VK_NV_shading_rate_image
    void vkCmdSetShadingRateImageEnableNV(
        VkCommandBuffer                             commandBuffer,
        VkBool32                                    shadingRateImageEnable);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `shadingRateImageEnable` specifies the `shadingRateImageEnable` state.

This command sets the `shadingRateImageEnable` state for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_SHADING_RATE_IMAGE_ENABLE_NV set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the VkPipelineViewportShadingRateImageStateCreateInfoNV::`shadingRateImageEnable` value used to create the currently active pipeline.

Valid Usage

- VUID-vkCmdSetShadingRateImageEnableNV-None-09423
  At least one of the following must be true:

  - The `extendedDynamicState3ShadingRateImageEnable` feature is enabled

  - The `shaderObject` feature is enabled

Valid Usage (Implicit)

- VUID-vkCmdSetShadingRateImageEnableNV-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetShadingRateImageEnableNV-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetShadingRateImageEnableNV-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetShadingRateImageEnableNV-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetShadingRateImageEnableNV is not affected by conditional rendering

To dynamically set the per-viewport shading rate image palettes, call:

    // Provided by VK_NV_shading_rate_image
    void vkCmdSetViewportShadingRatePaletteNV(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    firstViewport,
        uint32_t                                    viewportCount,
        const VkShadingRatePaletteNV*               pShadingRatePalettes);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `firstViewport` is the index of the first viewport whose shading rate palette is updated by the command.

- `viewportCount` is the number of viewports whose shading rate palettes are updated by the command.

- `pShadingRatePalettes` is a pointer to an array of VkShadingRatePaletteNV structures defining the palette for each viewport.

This command sets the per-viewport shading rate image palettes for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the VkPipelineViewportShadingRateImageStateCreateInfoNV::`pShadingRatePalettes` values used to create the currently active pipeline.

Valid Usage

- VUID-vkCmdSetViewportShadingRatePaletteNV-None-02064
  The `shadingRateImage` feature must be enabled

- VUID-vkCmdSetViewportShadingRatePaletteNV-firstViewport-02067
  The sum of `firstViewport` and `viewportCount` must be between `1` and `VkPhysicalDeviceLimits`::`maxViewports`, inclusive

- VUID-vkCmdSetViewportShadingRatePaletteNV-firstViewport-02068
  If the `multiViewport` feature is not enabled, `firstViewport` must be `0`

- VUID-vkCmdSetViewportShadingRatePaletteNV-viewportCount-02069
  If the `multiViewport` feature is not enabled, `viewportCount` must be `1`

Valid Usage (Implicit)

- VUID-vkCmdSetViewportShadingRatePaletteNV-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetViewportShadingRatePaletteNV-pShadingRatePalettes-parameter
  `pShadingRatePalettes` must be a valid pointer to an array of `viewportCount` valid VkShadingRatePaletteNV structures

- VUID-vkCmdSetViewportShadingRatePaletteNV-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetViewportShadingRatePaletteNV-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetViewportShadingRatePaletteNV-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdSetViewportShadingRatePaletteNV-viewportCount-arraylength
  `viewportCount` must be greater than `0`

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetViewportShadingRatePaletteNV is not affected by conditional rendering

The `VkShadingRatePaletteNV` structure specifies to contents of a single shading rate image palette and is defined as:

    // Provided by VK_NV_shading_rate_image
    typedef struct VkShadingRatePaletteNV {
        uint32_t                              shadingRatePaletteEntryCount;
        const VkShadingRatePaletteEntryNV*    pShadingRatePaletteEntries;
    } VkShadingRatePaletteNV;

- `shadingRatePaletteEntryCount` specifies the number of entries in the shading rate image palette.

- `pShadingRatePaletteEntries` is a pointer to an array of VkShadingRatePaletteEntryNV enums defining the shading rate for each palette entry.

Valid Usage

- VUID-VkShadingRatePaletteNV-shadingRatePaletteEntryCount-02071
  `shadingRatePaletteEntryCount` must be between `1` and `VkPhysicalDeviceShadingRateImagePropertiesNV`::`shadingRatePaletteSize`, inclusive

Valid Usage (Implicit)

- VUID-VkShadingRatePaletteNV-pShadingRatePaletteEntries-parameter
  `pShadingRatePaletteEntries` must be a valid pointer to an array of `shadingRatePaletteEntryCount` valid VkShadingRatePaletteEntryNV values

- VUID-VkShadingRatePaletteNV-shadingRatePaletteEntryCount-arraylength
  `shadingRatePaletteEntryCount` must be greater than `0`

To determine the base shading rate image, a shading rate index i is mapped to array element i in the array `pShadingRatePaletteEntries` for the palette corresponding to the viewport used for the fragment. If i is greater than or equal to the palette size `shadingRatePaletteEntryCount`, the base shading rate is undefined.

The supported shading rate image palette entries are defined by VkShadingRatePaletteEntryNV:

    // Provided by VK_NV_shading_rate_image
    typedef enum VkShadingRatePaletteEntryNV {
        VK_SHADING_RATE_PALETTE_ENTRY_NO_INVOCATIONS_NV = 0,
        VK_SHADING_RATE_PALETTE_ENTRY_16_INVOCATIONS_PER_PIXEL_NV = 1,
        VK_SHADING_RATE_PALETTE_ENTRY_8_INVOCATIONS_PER_PIXEL_NV = 2,
        VK_SHADING_RATE_PALETTE_ENTRY_4_INVOCATIONS_PER_PIXEL_NV = 3,
        VK_SHADING_RATE_PALETTE_ENTRY_2_INVOCATIONS_PER_PIXEL_NV = 4,
        VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_PIXEL_NV = 5,
        VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X1_PIXELS_NV = 6,
        VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_1X2_PIXELS_NV = 7,
        VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X2_PIXELS_NV = 8,
        VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X2_PIXELS_NV = 9,
        VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X4_PIXELS_NV = 10,
        VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X4_PIXELS_NV = 11,
    } VkShadingRatePaletteEntryNV;

The following table indicates the width and height (in pixels) of each fragment generated using the indicated shading rate, as well as the maximum number of fragment shader invocations launched for each fragment. When processing regions of a primitive that have a shading rate of VK_SHADING_RATE_PALETTE_ENTRY_NO_INVOCATIONS_NV, no fragments will be generated in that region.

Shading Rate | Width | Height | Invocations
--- | --- | --- | ---
VK_SHADING_RATE_PALETTE_ENTRY_NO_INVOCATIONS_NV | 0 | 0 | 0
VK_SHADING_RATE_PALETTE_ENTRY_16_INVOCATIONS_PER_PIXEL_NV | 1 | 1 | 16
VK_SHADING_RATE_PALETTE_ENTRY_8_INVOCATIONS_PER_PIXEL_NV | 1 | 1 | 8
VK_SHADING_RATE_PALETTE_ENTRY_4_INVOCATIONS_PER_PIXEL_NV | 1 | 1 | 4
VK_SHADING_RATE_PALETTE_ENTRY_2_INVOCATIONS_PER_PIXEL_NV | 1 | 1 | 2
VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_PIXEL_NV | 1 | 1 | 1
VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X1_PIXELS_NV | 2 | 1 | 1
VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_1X2_PIXELS_NV | 1 | 2 | 1
VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X2_PIXELS_NV | 2 | 2 | 1
VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X2_PIXELS_NV | 4 | 2 | 1
VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X4_PIXELS_NV | 2 | 4 | 1
VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X4_PIXELS_NV | 4 | 4 | 1

When the shading rate image is disabled, a shading rate of VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_PIXEL_NV will be used as the base shading rate.

Once a base shading rate has been established, it is adjusted to produce a final shading rate. First, if the base shading rate uses multiple pixels for each fragment, the implementation may reduce the fragment area to ensure that the total number of coverage samples for all pixels in a fragment does not exceed an implementation-dependent maximum.

If sample shading is active in the current pipeline and would result in processing n (n > 1) unique samples per fragment when the shading rate image is disabled, the shading rate is adjusted in an implementation-dependent manner to increase the number of fragment shader invocations spawned by the primitive. If the shading rate indicates fs pixels per fragment and fs is greater than n, the fragment area is adjusted so each fragment has approximately n f s​ pixels. Otherwise, if the shading rate indicates ipf invocations per fragment, the fragment area will be adjusted to a single pixel with approximately f s ip f×n​ invocations per fragment.

If sample shading occurs due to the use of a fragment shader input variable decorated with `SampleId` or `SamplePosition`, the shading rate is ignored. Each fragment will have a single pixel and will spawn up to `rasterizationSamples` fragment shader invocations, as when using sample shading without a shading rate image.

Finally, if the shading rate specifies multiple fragment shader invocations per fragment, the total number of invocations in the shading rate is clamped to be no larger than `rasterizationSamples`.

When the final shading rate for a primitive covering pixel (x,y) has a fragment area of f w×f h, the fragment for that pixel will cover all pixels with coordinates (x',y') that satisfy the equations:

⌊f w x​⌋=⌊f w x′​⌋​
⌊f h y​⌋=⌊f h y′​⌋​

This combined fragment is considered to have multiple coverage samples; the total number of samples in this fragment is given by sam pl es=f w×f h×rs where rs indicates the value of `VkPipelineMultisampleStateCreateInfo`::`rasterizationSamples` specified at pipeline creation time. The set of coverage samples in the fragment is the union of the per-pixel coverage samples in each of the fragment’s pixels The location and order of coverage samples within each pixel in the combined fragment are assigned as described in Multisampling and Custom Sample Locations. Each coverage sample in the set of pixels belonging to the combined fragment is assigned a unique coverage index in the range [0,samples-1]. If the `shadingRateCoarseSampleOrder` feature is supported, the order of coverage samples can be specified for each combination of fragment area and coverage sample count. If this feature is not supported, the sample order is implementation-dependent.

If the `pNext` chain of VkPipelineViewportStateCreateInfo includes a `VkPipelineViewportCoarseSampleOrderStateCreateInfoNV` structure, then that structure includes parameters controlling the order of coverage samples in fragments larger than one pixel.

The `VkPipelineViewportCoarseSampleOrderStateCreateInfoNV` structure is defined as:

    // Provided by VK_NV_shading_rate_image
    typedef struct VkPipelineViewportCoarseSampleOrderStateCreateInfoNV {
        VkStructureType                       sType;
        const void*                           pNext;
        VkCoarseSampleOrderTypeNV             sampleOrderType;
        uint32_t                              customSampleOrderCount;
        const VkCoarseSampleOrderCustomNV*    pCustomSampleOrders;
    } VkPipelineViewportCoarseSampleOrderStateCreateInfoNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `sampleOrderType` specifies the mechanism used to order coverage samples in fragments larger than one pixel.

- `customSampleOrderCount` specifies the number of custom sample orderings to use when ordering coverage samples.

- `pCustomSampleOrders` is a pointer to an array of `customSampleOrderCount` VkCoarseSampleOrderCustomNV structures, each structure specifying the coverage sample order for a single combination of fragment area and coverage sample count.

If this structure is not present, `sampleOrderType` is considered to be VK_COARSE_SAMPLE_ORDER_TYPE_DEFAULT_NV.

If `sampleOrderType` is VK_COARSE_SAMPLE_ORDER_TYPE_CUSTOM_NV, the coverage sample order used for any combination of fragment area and coverage sample count not enumerated in `pCustomSampleOrders` will be identical to that used for VK_COARSE_SAMPLE_ORDER_TYPE_DEFAULT_NV.

If the pipeline was created with VK_DYNAMIC_STATE_VIEWPORT_COARSE_SAMPLE_ORDER_NV, the contents of this structure (if present) are ignored, and the coverage sample order is instead specified by vkCmdSetCoarseSampleOrderNV.

Valid Usage

- VUID-VkPipelineViewportCoarseSampleOrderStateCreateInfoNV-sampleOrderType-02072
  If `sampleOrderType` is not VK_COARSE_SAMPLE_ORDER_TYPE_CUSTOM_NV, `customSamplerOrderCount` must be `0`

- VUID-VkPipelineViewportCoarseSampleOrderStateCreateInfoNV-pCustomSampleOrders-02234
  The array `pCustomSampleOrders` must not contain two structures with matching values for both the `shadingRate` and `sampleCount` members

Valid Usage (Implicit)

- VUID-VkPipelineViewportCoarseSampleOrderStateCreateInfoNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_COARSE_SAMPLE_ORDER_STATE_CREATE_INFO_NV

- VUID-VkPipelineViewportCoarseSampleOrderStateCreateInfoNV-sampleOrderType-parameter
  `sampleOrderType` must be a valid VkCoarseSampleOrderTypeNV value

- VUID-VkPipelineViewportCoarseSampleOrderStateCreateInfoNV-pCustomSampleOrders-parameter
  If `customSampleOrderCount` is not `0`, `pCustomSampleOrders` must be a valid pointer to an array of `customSampleOrderCount` valid VkCoarseSampleOrderCustomNV structures

Structure Chaining

Extends the structure

  - VkPipelineViewportStateCreateInfo

The type VkCoarseSampleOrderTypeNV specifies the technique used to order coverage samples in fragments larger than one pixel, and is defined as:

    // Provided by VK_NV_shading_rate_image
    typedef enum VkCoarseSampleOrderTypeNV {
        VK_COARSE_SAMPLE_ORDER_TYPE_DEFAULT_NV = 0,
        VK_COARSE_SAMPLE_ORDER_TYPE_CUSTOM_NV = 1,
        VK_COARSE_SAMPLE_ORDER_TYPE_PIXEL_MAJOR_NV = 2,
        VK_COARSE_SAMPLE_ORDER_TYPE_SAMPLE_MAJOR_NV = 3,
    } VkCoarseSampleOrderTypeNV;

- VK_COARSE_SAMPLE_ORDER_TYPE_DEFAULT_NV specifies that coverage samples will be ordered in an implementation-dependent manner.

- VK_COARSE_SAMPLE_ORDER_TYPE_CUSTOM_NV specifies that coverage samples will be ordered according to the array of custom orderings provided in either the `pCustomSampleOrders` member of `VkPipelineViewportCoarseSampleOrderStateCreateInfoNV` or the `pCustomSampleOrders` member of vkCmdSetCoarseSampleOrderNV.

- VK_COARSE_SAMPLE_ORDER_TYPE_PIXEL_MAJOR_NV specifies that coverage samples will be ordered sequentially, sorted first by pixel coordinate (in row-major order) and then by sample index.

- VK_COARSE_SAMPLE_ORDER_TYPE_SAMPLE_MAJOR_NV specifies that coverage samples will be ordered sequentially, sorted first by sample index and then by pixel coordinate (in row-major order).

When using a coarse sample order of VK_COARSE_SAMPLE_ORDER_TYPE_PIXEL_MAJOR_NV for a fragment with an upper-left corner of (f x, f y) with a width of f w×f h and f sc samples per pixel, coverage index cs of the fragment will be assigned to sample index f s of pixel (px, p y) as follows:

px=p y=f s=​f x+(⌊f sc cs​⌋ % f w)f y+⌊f sc×f w cs​⌋cs % f sc​

When using a coarse sample order of VK_COARSE_SAMPLE_ORDER_TYPE_SAMPLE_MAJOR_NV, coverage index cs will be assigned as follows:

px=p y=f s=​f x+cs % f w(f y+⌊f w cs​⌋ % f h)⌊f w×f h cs​⌋​

The `VkCoarseSampleOrderCustomNV` structure is defined as:

    // Provided by VK_NV_shading_rate_image
    typedef struct VkCoarseSampleOrderCustomNV {
        VkShadingRatePaletteEntryNV        shadingRate;
        uint32_t                           sampleCount;
        uint32_t                           sampleLocationCount;
        const VkCoarseSampleLocationNV*    pSampleLocations;
    } VkCoarseSampleOrderCustomNV;

- `shadingRate` is a shading rate palette entry that identifies the fragment width and height for the combination of fragment area and per-pixel coverage sample count to control.

- `sampleCount` identifies the per-pixel coverage sample count for the combination of fragment area and coverage sample count to control.

- `sampleLocationCount` specifies the number of sample locations in the custom ordering.

- `pSampleLocations` is a pointer to an array of VkCoarseSampleLocationNV structures specifying the location of each sample in the custom ordering.

The `VkCoarseSampleOrderCustomNV` structure is used with a coverage sample ordering type of VK_COARSE_SAMPLE_ORDER_TYPE_CUSTOM_NV to specify the order of coverage samples for one combination of fragment width, fragment height, and coverage sample count.

When using a custom sample ordering, element j in `pSampleLocations` specifies a specific pixel location and sample index that corresponds to coverage index j in the multi-pixel fragment.

Valid Usage

- VUID-VkCoarseSampleOrderCustomNV-shadingRate-02073
  `shadingRate` must be a shading rate that generates fragments with more than one pixel

- VUID-VkCoarseSampleOrderCustomNV-sampleCount-02074
  `sampleCount` must correspond to a sample count enumerated in VkSampleCountFlags whose corresponding bit is set in VkPhysicalDeviceLimits::`framebufferNoAttachmentsSampleCounts`

- VUID-VkCoarseSampleOrderCustomNV-sampleLocationCount-02075
  `sampleLocationCount` must be equal to the product of `sampleCount`, the fragment width for `shadingRate`, and the fragment height for `shadingRate`

- VUID-VkCoarseSampleOrderCustomNV-sampleLocationCount-02076
  `sampleLocationCount` must be less than or equal to the value of `VkPhysicalDeviceShadingRateImagePropertiesNV`::`shadingRateMaxCoarseSamples`

- VUID-VkCoarseSampleOrderCustomNV-pSampleLocations-02077
  The array `pSampleLocations` must contain exactly one entry for every combination of valid values for `pixelX`, `pixelY`, and `sample` in the structure VkCoarseSampleOrderCustomNV

Valid Usage (Implicit)

- VUID-VkCoarseSampleOrderCustomNV-shadingRate-parameter
  `shadingRate` must be a valid VkShadingRatePaletteEntryNV value

- VUID-VkCoarseSampleOrderCustomNV-pSampleLocations-parameter
  `pSampleLocations` must be a valid pointer to an array of `sampleLocationCount` VkCoarseSampleLocationNV structures

- VUID-VkCoarseSampleOrderCustomNV-sampleLocationCount-arraylength
  `sampleLocationCount` must be greater than `0`

The `VkCoarseSampleLocationNV` structure identifies a specific pixel and sample index for one of the coverage samples in a fragment that is larger than one pixel. This structure is defined as:

    // Provided by VK_NV_shading_rate_image
    typedef struct VkCoarseSampleLocationNV {
        uint32_t    pixelX;
        uint32_t    pixelY;
        uint32_t    sample;
    } VkCoarseSampleLocationNV;

- `pixelX` is added to the x coordinate of the upper-leftmost pixel of each fragment to identify the pixel containing the coverage sample.

- `pixelY` is added to the y coordinate of the upper-leftmost pixel of each fragment to identify the pixel containing the coverage sample.

- `sample` is the number of the coverage sample in the pixel identified by `pixelX` and `pixelY`.

Valid Usage

- VUID-VkCoarseSampleLocationNV-pixelX-02078
  `pixelX` must be less than the width (in pixels) of the fragment

- VUID-VkCoarseSampleLocationNV-pixelY-02079
  `pixelY` must be less than the height (in pixels) of the fragment

- VUID-VkCoarseSampleLocationNV-sample-02080
  `sample` must be less than the number of coverage samples in each pixel belonging to the fragment

To dynamically set the order of coverage samples in fragments larger than one pixel, call:

    // Provided by VK_NV_shading_rate_image
    void vkCmdSetCoarseSampleOrderNV(
        VkCommandBuffer                             commandBuffer,
        VkCoarseSampleOrderTypeNV                   sampleOrderType,
        uint32_t                                    customSampleOrderCount,
        const VkCoarseSampleOrderCustomNV*          pCustomSampleOrders);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `sampleOrderType` specifies the mechanism used to order coverage samples in fragments larger than one pixel.

- `customSampleOrderCount` specifies the number of custom sample orderings to use when ordering coverage samples.

- `pCustomSampleOrders` is a pointer to an array of VkCoarseSampleOrderCustomNV structures, each structure specifying the coverage sample order for a single combination of fragment area and coverage sample count.

If `sampleOrderType` is VK_COARSE_SAMPLE_ORDER_TYPE_CUSTOM_NV, the coverage sample order used for any combination of fragment area and coverage sample count not enumerated in `pCustomSampleOrders` will be identical to that used for VK_COARSE_SAMPLE_ORDER_TYPE_DEFAULT_NV.

This command sets the order of coverage samples for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_VIEWPORT_COARSE_SAMPLE_ORDER_NV set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the VkPipelineViewportCoarseSampleOrderStateCreateInfoNV values used to create the currently active pipeline.

Valid Usage

- VUID-vkCmdSetCoarseSampleOrderNV-sampleOrderType-02081
  If `sampleOrderType` is not VK_COARSE_SAMPLE_ORDER_TYPE_CUSTOM_NV, `customSamplerOrderCount` must be `0`

- VUID-vkCmdSetCoarseSampleOrderNV-pCustomSampleOrders-02235
  The array `pCustomSampleOrders` must not contain two structures with matching values for both the `shadingRate` and `sampleCount` members

Valid Usage (Implicit)

- VUID-vkCmdSetCoarseSampleOrderNV-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetCoarseSampleOrderNV-sampleOrderType-parameter
  `sampleOrderType` must be a valid VkCoarseSampleOrderTypeNV value

- VUID-vkCmdSetCoarseSampleOrderNV-pCustomSampleOrders-parameter
  If `customSampleOrderCount` is not `0`, `pCustomSampleOrders` must be a valid pointer to an array of `customSampleOrderCount` valid VkCoarseSampleOrderCustomNV structures

- VUID-vkCmdSetCoarseSampleOrderNV-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetCoarseSampleOrderNV-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetCoarseSampleOrderNV-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetCoarseSampleOrderNV is not affected by conditional rendering

If the final shading rate for a primitive covering pixel (x,y) results in n invocations per pixel (n > 1), n separate fragment shader invocations will be generated for the fragment. Each coverage sample in the fragment will be assigned to one of the n fragment shader invocations in an implementation-dependent manner. The outputs from the fragment output interface of each shader invocation will be broadcast to all of the framebuffer samples associated with the invocation. If none of the coverage samples associated with a fragment shader invocation is covered by a primitive, the implementation may discard the fragment shader invocation for those samples.

If the final shading rate for a primitive covering pixel (x,y) results in a fragment containing multiple pixels, a single set of fragment shader invocations will be generated for all pixels in the combined fragment. Outputs from the fragment output interface will be broadcast to all covered framebuffer samples belonging to the fragment. If the fragment shader executes code discarding the fragment, none of the samples of the fragment will be updated.

### 34.8. Sample Shading

Sample shading can be used to specify a minimum number of unique samples to process for each fragment. If sample shading is enabled, an implementation must invoke the fragment shader at least max(⌈ VkPipelineMultisampleStateCreateInfo::`minSampleShading` × VkPipelineMultisampleStateCreateInfo::`rasterizationSamples` ⌉, 1) times per fragment. If VkPipelineMultisampleStateCreateInfo::`sampleShadingEnable` is VK_TRUE, sample shading is enabled.

If a fragment shader entry point statically uses an input variable decorated with a `BuiltIn` of `SampleId` or `SamplePosition`, sample shading is enabled and a value of `1.0` is used instead of `minSampleShading`. If a fragment shader entry point statically uses an input variable decorated with `Sample`, sample shading may be enabled and a value of `1.0` will be used instead of `minSampleShading` if it is. If the `VK_AMD_mixed_attachment_samples` extension is enabled and the subpass uses color attachments, the `samples` value used to create each color attachment is used instead of `rasterizationSamples`.

Note | If a shader decorates an input variable with `Sample` and that value meaningfully impacts the output of a shader, sample shading will be enabled to ensure that the input is in fact interpolated per-sample. This is inherent to the specification and not spelled out here - if an application simply declares such a variable it is implementation-defined whether sample shading is enabled or not. It is possible to see the effects of this by using atomics in the shader or using a pipeline statistics query to query the number of fragment invocations, even if the shader itself does not use any per-sample variables.

If there are fewer fragment invocations than covered samples, implementations may include those samples in fragment shader invocations in any manner as long as covered samples are all shaded at least once, and each invocation that is not a helper invocation covers at least one sample.

### 34.9. Barycentric Interpolation

When the `fragmentShaderBarycentric` feature is enabled, the `PerVertexKHR` interpolation decoration can be used with fragment shader inputs to indicate that the decorated inputs do not have associated data in the fragment. Such inputs can only be accessed in a fragment shader using an array index whose value (0, 1, or 2) identifies one of the vertices of the primitive that produced the fragment. Reads of per-vertex values for missing vertices, such as the third vertex of a line primitive, will return values from the valid vertex with the highest index. This means that the per-vertex values of indices 1 and 2 for point primitives will be equal to those of index 0, and the per-vertex values of index 2 for line primitives will be equal to those of index 1.

When tessellation, geometry shading, and mesh shading are not active, fragment shader inputs decorated with `PerVertexKHR` will take values from one of the vertices of the primitive that produced the fragment, identified by the extra index provided in SPIR-V code accessing the input. If the n vertices passed to a draw call are numbered 0 through n-1, and the point, line, and triangle primitives produced by the draw call are numbered with consecutive integers beginning with zero, the following table indicates the original vertex numbers used when the provoking vertex mode is VK_PROVOKING_VERTEX_MODE_FIRST_VERTEX_EXT for index values of 0, 1, and 2. If an input decorated with `PerVertexKHR` is accessed with any other vertex index value, or is accessed while rasterizing a polygon when the VkPipelineRasterizationStateCreateInfo::`polygonMode` property of the currently active pipeline is not VK_POLYGON_MODE_FILL, an undefined value is returned.

Primitive Topology | Vertex 0 | Vertex 1 | Vertex 2
--- | --- | --- | ---
VK_PRIMITIVE_TOPOLOGY_POINT_LIST | i | i | i
VK_PRIMITIVE_TOPOLOGY_LINE_LIST | 2i | 2i+1 | 2i+1
VK_PRIMITIVE_TOPOLOGY_LINE_STRIP | i | i+1 | i+1
VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST | 3i | 3i+1 | 3i+2
VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP (even) | i | i+1 | i+2
VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP (odd) | i | i+2 | i+1
VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN | i+1 | i+2 | 0
VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY | 4i+1 | 4i+2 | 4i+2
VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY | i+1 | i+2 | i+2
VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY | 6i | 6i+2 | 6i+4
VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY (even) | 2i | 2i+2 | 2i+4
VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY (odd) | 2i | 2i+4 | 2i+2

When the provoking vertex mode is VK_PROVOKING_VERTEX_MODE_LAST_VERTEX_EXT, the original vertex numbers used are the same as above except as indicated in the table below.

Primitive Topology | Vertex 0 | Vertex 1 | Vertex 2
--- | --- | --- | ---
VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP (odd, and `triStripVertexOrderIndependentOfProvokingVertex` of VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR is VK_FALSE) | i+1 | i | i+2
VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN | 0 | i+1 | i+2
VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY (odd) | 2i+2 | 2i | 2i+4

When geometry or mesh shading is active, primitives processed by fragment shaders are assembled from the vertices emitted by the geometry or mesh shader. In this case, the vertices used for fragment shader inputs decorated with `PerVertexKHR` are derived by treating the primitives produced by the shader as though they were specified by a draw call and consulting the table above.

When using tessellation without geometry shading, the tessellator produces primitives in an implementation-dependent manner. While there is no defined vertex ordering for inputs decorated with `PerVertexKHR`, the vertex ordering used in this case will be consistent with the ordering used to derive the values of inputs decorated with `BaryCoordKHR` or `BaryCoordNoPerspKHR`.

Fragment shader inputs decorated with `BaryCoordKHR` or `BaryCoordNoPerspKHR` hold three-component vectors with barycentric weights that indicate the location of the fragment relative to the screen-space locations of vertices of its primitive. For point primitives, such variables are always assigned the value (1,0,0). For line primitives, the built-ins are obtained by interpolating an attribute whose values for the vertices numbered 0 and 1 are (1,0,0) and (0,1,0), respectively. For polygon primitives, the built-ins are obtained by interpolating an attribute whose values for the vertices numbered 0, 1, and 2 are (1,0,0), (0,1,0), and (0,0,1), respectively. For `BaryCoordKHR`, the values are obtained using perspective interpolation. For `BaryCoordNoPerspKHR`, the values are obtained using linear interpolation. The values of `BaryCoordKHR` and `BaryCoordNoPerspKHR` are undefined while rasterizing a polygon when the VkPipelineRasterizationStateCreateInfo::`polygonMode` property of the currently active pipeline is not VK_POLYGON_MODE_FILL.

### 34.10. Points

A point is drawn by generating a set of fragments in the shape of a square centered around the vertex of the point. Each vertex has an associated point size controlling the width/height of that square. The point size is taken from the (potentially clipped) shader built-in `PointSize` written by:

- the geometry shader, if active;

- the tessellation evaluation shader, if active and no geometry shader is active;

- the vertex shader, otherwise

and clamped to the implementation-dependent point size range [`pointSizeRange`[0],`pointSizeRange`[1]]. The value written to `PointSize` must be greater than zero. If the `maintenance5` feature is enabled, and a value is not written to `PointSize`, the point size takes a default value of 1.0.

Not all point sizes need be supported, but the size 1.0 must be supported. The range of supported sizes and the size of evenly-spaced gradations within that range are implementation-dependent. The range and gradations are obtained from the `pointSizeRange` and `pointSizeGranularity` members of VkPhysicalDeviceLimits. If, for instance, the size range is from 0.1 to 2.0 and the gradation size is 0.1, then the sizes 0.1, 0.2, …​, 1.9, 2.0 are supported. Additional point sizes may also be supported. There is no requirement that these sizes be equally spaced. If an unsupported size is requested, the nearest supported size is used instead.

Further, if the render pass has a fragment density map attachment, point size may be rounded by the implementation to a multiple of the fragment’s width or height.

#### 34.10.1. Basic Point Rasterization

Point rasterization produces a fragment for each fragment area group of framebuffer pixels with one or more sample points that intersect a region centered at the point’s (xf,yf). This region is a square with side equal to the current point size. Coverage bits that correspond to sample points that intersect the region are 1, other coverage bits are 0. All fragments produced in rasterizing a point are assigned the same associated data, which are those of the vertex corresponding to the point. However, the fragment shader built-in `PointCoord` contains point sprite texture coordinates. The s and t point sprite texture coordinates vary from zero to one across the point horizontally left-to-right and vertically top-to-bottom, respectively. The following formulas are used to evaluate s and t:

s=2 1​+size(x p​−x f​)​
t=2 1​+size(y p​−y f​)​

where size is the point’s size; (xp,yp) is the location at which the point sprite coordinates are evaluated - this may be the framebuffer coordinates of the fragment center, or the location of a sample; and (xf,yf) is the exact, unrounded framebuffer coordinate of the vertex for the point.

### 34.11. Line Segments

Line segment rasterization options are controlled by the VkPipelineRasterizationLineStateCreateInfo structure.

The `VkPipelineRasterizationLineStateCreateInfo` structure is defined as:

    // Provided by VK_VERSION_1_4
    typedef struct VkPipelineRasterizationLineStateCreateInfo {
        VkStructureType            sType;
        const void*                pNext;
        VkLineRasterizationMode    lineRasterizationMode;
        VkBool32                   stippledLineEnable;
        uint32_t                   lineStippleFactor;
        uint16_t                   lineStipplePattern;
    } VkPipelineRasterizationLineStateCreateInfo;

    // Provided by VK_KHR_line_rasterization
    // Equivalent to VkPipelineRasterizationLineStateCreateInfo
    typedef VkPipelineRasterizationLineStateCreateInfo VkPipelineRasterizationLineStateCreateInfoKHR;

    // Provided by VK_EXT_line_rasterization
    // Equivalent to VkPipelineRasterizationLineStateCreateInfo
    typedef VkPipelineRasterizationLineStateCreateInfo VkPipelineRasterizationLineStateCreateInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `lineRasterizationMode` is a VkLineRasterizationMode value selecting the style of line rasterization.

- `stippledLineEnable` enables stippled line rasterization.

- `lineStippleFactor` is the repeat factor used in stippled line rasterization.

- `lineStipplePattern` is the bit pattern used in stippled line rasterization.

If `stippledLineEnable` is VK_FALSE, the values of `lineStippleFactor` and `lineStipplePattern` are ignored.

Valid Usage

- VUID-VkPipelineRasterizationLineStateCreateInfo-lineRasterizationMode-02768
  If `lineRasterizationMode` is VK_LINE_RASTERIZATION_MODE_RECTANGULAR, then the `rectangularLines` feature must be enabled

- VUID-VkPipelineRasterizationLineStateCreateInfo-lineRasterizationMode-02769
  If `lineRasterizationMode` is VK_LINE_RASTERIZATION_MODE_BRESENHAM, then the `bresenhamLines` feature must be enabled

- VUID-VkPipelineRasterizationLineStateCreateInfo-lineRasterizationMode-02770
  If `lineRasterizationMode` is VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH, then the `smoothLines` feature must be enabled

- VUID-VkPipelineRasterizationLineStateCreateInfo-stippledLineEnable-02771
  If `stippledLineEnable` is VK_TRUE and `lineRasterizationMode` is VK_LINE_RASTERIZATION_MODE_RECTANGULAR, then the `stippledRectangularLines` feature must be enabled

- VUID-VkPipelineRasterizationLineStateCreateInfo-stippledLineEnable-02772
  If `stippledLineEnable` is VK_TRUE and `lineRasterizationMode` is VK_LINE_RASTERIZATION_MODE_BRESENHAM, then the `stippledBresenhamLines` feature must be enabled

- VUID-VkPipelineRasterizationLineStateCreateInfo-stippledLineEnable-02773
  If `stippledLineEnable` is VK_TRUE and `lineRasterizationMode` is VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH, then the `stippledSmoothLines` feature must be enabled

- VUID-VkPipelineRasterizationLineStateCreateInfo-stippledLineEnable-02774
  If `stippledLineEnable` is VK_TRUE and `lineRasterizationMode` is VK_LINE_RASTERIZATION_MODE_DEFAULT, then the `stippledRectangularLines` feature must be enabled and VkPhysicalDeviceLimits::`strictLines` must be VK_TRUE

Valid Usage (Implicit)

- VUID-VkPipelineRasterizationLineStateCreateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO

- VUID-VkPipelineRasterizationLineStateCreateInfo-lineRasterizationMode-parameter
  `lineRasterizationMode` must be a valid VkLineRasterizationMode value

Structure Chaining

Extends the structure

  - VkPipelineRasterizationStateCreateInfo

Possible values of VkPipelineRasterizationLineStateCreateInfo::`lineRasterizationMode`, specifying the line rasterization mode, are:

    // Provided by VK_VERSION_1_4
    typedef enum VkLineRasterizationMode {
        VK_LINE_RASTERIZATION_MODE_DEFAULT = 0,
        VK_LINE_RASTERIZATION_MODE_RECTANGULAR = 1,
        VK_LINE_RASTERIZATION_MODE_BRESENHAM = 2,
        VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH = 3,
      // Provided by VK_EXT_line_rasterization
        VK_LINE_RASTERIZATION_MODE_DEFAULT_EXT = VK_LINE_RASTERIZATION_MODE_DEFAULT,
      // Provided by VK_EXT_line_rasterization
        VK_LINE_RASTERIZATION_MODE_RECTANGULAR_EXT = VK_LINE_RASTERIZATION_MODE_RECTANGULAR,
      // Provided by VK_EXT_line_rasterization
        VK_LINE_RASTERIZATION_MODE_BRESENHAM_EXT = VK_LINE_RASTERIZATION_MODE_BRESENHAM,
      // Provided by VK_EXT_line_rasterization
        VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_EXT = VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH,
      // Provided by VK_KHR_line_rasterization
        VK_LINE_RASTERIZATION_MODE_DEFAULT_KHR = VK_LINE_RASTERIZATION_MODE_DEFAULT,
      // Provided by VK_KHR_line_rasterization
        VK_LINE_RASTERIZATION_MODE_RECTANGULAR_KHR = VK_LINE_RASTERIZATION_MODE_RECTANGULAR,
      // Provided by VK_KHR_line_rasterization
        VK_LINE_RASTERIZATION_MODE_BRESENHAM_KHR = VK_LINE_RASTERIZATION_MODE_BRESENHAM,
      // Provided by VK_KHR_line_rasterization
        VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_KHR = VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH,
    } VkLineRasterizationMode;

    // Provided by VK_KHR_line_rasterization
    // Equivalent to VkLineRasterizationMode
    typedef VkLineRasterizationMode VkLineRasterizationModeKHR;

    // Provided by VK_EXT_line_rasterization
    // Equivalent to VkLineRasterizationMode
    typedef VkLineRasterizationMode VkLineRasterizationModeEXT;

- VK_LINE_RASTERIZATION_MODE_DEFAULT is equivalent to VK_LINE_RASTERIZATION_MODE_RECTANGULAR if VkPhysicalDeviceLimits::`strictLines` is VK_TRUE, otherwise lines are drawn as non-`strictLines` parallelograms. Both of these modes are defined in Basic Line Segment Rasterization.

- VK_LINE_RASTERIZATION_MODE_RECTANGULAR specifies lines drawn as if they were rectangles extruded from the line

- VK_LINE_RASTERIZATION_MODE_BRESENHAM specifies lines drawn by determining which pixel diamonds the line intersects and exits, as defined in Bresenham Line Segment Rasterization.

- VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH specifies lines drawn if they were rectangles extruded from the line, with alpha falloff, as defined in Smooth Lines.

To dynamically set the `lineRasterizationMode` state, call:

    // Provided by VK_EXT_extended_dynamic_state3 with VK_VERSION_1_4 or VK_KHR_line_rasterization or VK_EXT_line_rasterization, VK_EXT_shader_object with VK_VERSION_1_4 or VK_KHR_line_rasterization or VK_EXT_line_rasterization
    void vkCmdSetLineRasterizationModeEXT(
        VkCommandBuffer                             commandBuffer,
        VkLineRasterizationModeEXT                  lineRasterizationMode);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `lineRasterizationMode` specifies the `lineRasterizationMode` state.

This command sets the `lineRasterizationMode` state for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the VkPipelineRasterizationLineStateCreateInfo::`lineRasterizationMode` value used to create the currently active pipeline.

Valid Usage

- VUID-vkCmdSetLineRasterizationModeEXT-None-09423
  At least one of the following must be true:

  - The `extendedDynamicState3LineRasterizationMode` feature is enabled

  - The `shaderObject` feature is enabled

- VUID-vkCmdSetLineRasterizationModeEXT-lineRasterizationMode-07418
  If `lineRasterizationMode` is VK_LINE_RASTERIZATION_MODE_RECTANGULAR, then the `rectangularLines` feature must be enabled

- VUID-vkCmdSetLineRasterizationModeEXT-lineRasterizationMode-07419
  If `lineRasterizationMode` is VK_LINE_RASTERIZATION_MODE_BRESENHAM, then the `bresenhamLines` feature must be enabled

- VUID-vkCmdSetLineRasterizationModeEXT-lineRasterizationMode-07420
  If `lineRasterizationMode` is VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH, then the `smoothLines` feature must be enabled

Valid Usage (Implicit)

- VUID-vkCmdSetLineRasterizationModeEXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetLineRasterizationModeEXT-lineRasterizationMode-parameter
  `lineRasterizationMode` must be a valid VkLineRasterizationModeEXT value

- VUID-vkCmdSetLineRasterizationModeEXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetLineRasterizationModeEXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetLineRasterizationModeEXT-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetLineRasterizationModeEXT is not affected by conditional rendering

To dynamically set the `stippledLineEnable` state, call:

    // Provided by VK_EXT_extended_dynamic_state3 with VK_VERSION_1_4 or VK_KHR_line_rasterization or VK_EXT_line_rasterization, VK_EXT_shader_object with VK_VERSION_1_4 or VK_KHR_line_rasterization or VK_EXT_line_rasterization
    void vkCmdSetLineStippleEnableEXT(
        VkCommandBuffer                             commandBuffer,
        VkBool32                                    stippledLineEnable);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `stippledLineEnable` specifies the `stippledLineEnable` state.

This command sets the `stippledLineEnable` state for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the VkPipelineRasterizationLineStateCreateInfo::`stippledLineEnable` value used to create the currently active pipeline.

Valid Usage

- VUID-vkCmdSetLineStippleEnableEXT-None-09423
  At least one of the following must be true:

  - The `extendedDynamicState3LineStippleEnable` feature is enabled

  - The `shaderObject` feature is enabled

Valid Usage (Implicit)

- VUID-vkCmdSetLineStippleEnableEXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetLineStippleEnableEXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetLineStippleEnableEXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetLineStippleEnableEXT-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetLineStippleEnableEXT is not affected by conditional rendering

To dynamically set the line width, call:

    // Provided by VK_VERSION_1_0
    void vkCmdSetLineWidth(
        VkCommandBuffer                             commandBuffer,
        float                                       lineWidth);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `lineWidth` is the width of rasterized line segments.

This command sets the line width for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_LINE_WIDTH set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the VkPipelineRasterizationStateCreateInfo::`lineWidth` value used to create the currently active pipeline.

Valid Usage

- VUID-vkCmdSetLineWidth-lineWidth-00788
  If the `wideLines` feature is not enabled, `lineWidth` must be `1.0`

Valid Usage (Implicit)

- VUID-vkCmdSetLineWidth-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetLineWidth-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetLineWidth-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetLineWidth-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetLineWidth is not affected by conditional rendering

Not all line widths need be supported for line segment rasterization, but width 1.0 antialiased segments must be provided. The range and gradations are obtained from the `lineWidthRange` and `lineWidthGranularity` members of VkPhysicalDeviceLimits. If, for instance, the size range is from 0.1 to 2.0 and the gradation size is 0.1, then the sizes 0.1, 0.2, …​, 1.9, 2.0 are supported. Additional line widths may also be supported. There is no requirement that these widths be equally spaced. If an unsupported width is requested, the nearest supported width is used instead.

Further, if the render pass has a fragment density map attachment, line width may be rounded by the implementation to a multiple of the fragment’s width or height.

#### 34.11.1. Basic Line Segment Rasterization

If the `lineRasterizationMode` member of VkPipelineRasterizationLineStateCreateInfo is VK_LINE_RASTERIZATION_MODE_RECTANGULAR, rasterized line segments produce fragments which intersect a rectangle centered on the line segment. Two of the edges are parallel to the specified line segment; each is at a distance of one-half the current width from that segment in directions perpendicular to the direction of the line. The other two edges pass through the line endpoints and are perpendicular to the direction of the specified line segment. Coverage bits that correspond to sample points that intersect the rectangle are 1, other coverage bits are 0.

Next we specify how the data associated with each rasterized fragment are obtained. Let pr = (xd, yd) be the framebuffer coordinates at which associated data are evaluated. This may be the center of a fragment or the location of a sample within the fragment. When `rasterizationSamples` is VK_SAMPLE_COUNT_1_BIT, the fragment center must be used. Let pa = (xa, ya) and pb = (xb,yb) be initial and final endpoints of the line segment, respectively. Set

t=∥p b​−p a​∥2(p r​−p a​)⋅(p b​−p a​)​

(Note that t = 0 at pa and t = 1 at pb. Also note that this calculation projects the vector from pa to pr onto the line, and thus computes the normalized distance of the fragment along the line.)

If `strictLines` is VK_TRUE, line segments are rasterized using perspective or linear interpolation.

Perspective interpolation for a line segment interpolates two values in a manner that is correct when taking the perspective of the viewport into consideration, by way of the line segment’s clip coordinates. An interpolated value f can be determined by

f=(1−t)/w a​+t/w b​(1−t)f a​/w a​+t f b​/w b​​

where fa and fb are the data associated with the starting and ending endpoints of the segment, respectively; wa and wb are the clip w coordinates of the starting and ending endpoints of the segment, respectively.

Linear interpolation for a line segment directly interpolates two values, and an interpolated value f can be determined by

  f = (1 - t) fa + t fb

where fa and fb are the data associated with the starting and ending endpoints of the segment, respectively.

The clip coordinate w for a sample is determined using perspective interpolation. The depth value z for a sample is determined using linear interpolation. Interpolation of fragment shader input values are determined by Interpolation decorations.

The above description documents the preferred method of line rasterization, and must be used when `lineRasterizationMode` is VK_LINE_RASTERIZATION_MODE_RECTANGULAR.

By default, when `strictLines` is VK_FALSE, or the `relaxedLineRasterization` feature is enabled, and when the `lineRasterizationMode` is VK_LINE_RASTERIZATION_MODE_DEFAULT, the edges of the lines are generated as a parallelogram surrounding the original line. The major axis is chosen by noting the axis in which there is the greatest distance between the line start and end points. If the difference is equal in both directions then the X axis is chosen as the major axis. Edges 2 and 3 are aligned to the minor axis and are centered on the endpoints of the line as in Non strict lines, and each is `lineWidth` long. Edges 0 and 1 are parallel to the line and connect the endpoints of edges 2 and 3. Coverage bits that correspond to sample points that intersect the parallelogram are 1, other coverage bits are 0.

Samples that fall exactly on the edge of the parallelogram follow the polygon rasterization rules.

Interpolation occurs as if the parallelogram was decomposed into two triangles where each pair of vertices at each end of the line has identical attributes.

Figure 20. Non strict lines

When `strictLines` is VK_FALSE or when the `relaxedLineRasterization` feature is enabled, and `lineRasterizationMode` is VK_LINE_RASTERIZATION_MODE_DEFAULT_EXT implementations may deviate from the non-strict line algorithm described above in the following ways:

- Implementations may instead interpolate each fragment according to the formula in Basic Line Segment Rasterization using the original line segment endpoints.

- Rasterization of non-antialiased non-strict line segments may be performed using the rules defined in Bresenham Line Segment Rasterization.

If `VkPhysicalDeviceMaintenance5Properties`::`nonStrictSinglePixelWideLinesUseParallelogram` is VK_TRUE, the `lineRasterizationMode` is VK_LINE_RASTERIZATION_MODE_DEFAULT_EXT, and `strictLines` is VK_FALSE, non-strict lines of width 1.0 are rasterized as parallelograms, otherwise they are rasterized using Bresenham’s algorithm.

If `VkPhysicalDeviceMaintenance5Properties`::`nonStrictWideLinesUseParallelogram` is VK_TRUE, the `lineRasterizationMode` is VK_LINE_RASTERIZATION_MODE_DEFAULT_EXT, and `strictLines` is VK_FALSE, non-strict lines of width greater than 1.0 are rasterized as parallelograms, otherwise they are rasterized using Bresenham’s algorithm.

#### 34.11.2. Bresenham Line Segment Rasterization

If `lineRasterizationMode` is VK_LINE_RASTERIZATION_MODE_BRESENHAM, then the following rules replace the line rasterization rules defined in Basic Line Segment Rasterization.

Non-strict lines may also follow these rasterization rules for non-antialiased lines.

If the `relaxedLineRasterization` feature is enabled, and `lineRasterizationMode` is VK_LINE_RASTERIZATION_MODE_DEFAULT_EXT implementations must follow these rasterization rules for non-antialised lines of width 1.0.

Line segment rasterization begins by characterizing the segment as either x-major or y-major. x-major line segments have slope in the closed interval [-1,1]; all other line segments are y-major (slope is determined by the segment’s endpoints). We specify rasterization only for x-major segments except in cases where the modifications for y-major segments are not self-evident.

Ideally, Vulkan uses a diamond-exit rule to determine those fragments that are produced by rasterizing a line segment. For each fragment f with center at framebuffer coordinates xf and yf, define a diamond-shaped region that is the intersection of four half planes:

R f​={(x, y)∣∣x−x f​∣+∣y−y f​∣<2 1​}

Essentially, a line segment starting at pa and ending at pb produces those fragments f for which the segment intersects Rf, except if pb is contained in Rf.

Figure 21. Visualization of Bresenham’s algorithm

To avoid difficulties when an endpoint lies on a boundary of Rf we (in principle) perturb the supplied endpoints by a tiny amount. Let pa and pb have framebuffer coordinates (xa, ya) and (xb, yb), respectively. Obtain the perturbed endpoints pa' given by (xa, ya) - (ε, ε2) and pb' given by (xb, yb) - (ε, ε2). Rasterizing the line segment starting at pa and ending at pb produces those fragments f for which the segment starting at pa' and ending on pb' intersects Rf, except if pb' is contained in Rf. ε is chosen to be so small that rasterizing the line segment produces the same fragments when δ is substituted for ε for any 0 < δ ≤ ε.

When pa and pb lie on fragment centers, this characterization of fragments reduces to Bresenham’s algorithm with one modification: lines produced in this description are “half-open”, meaning that the final fragment (corresponding to pb) is not drawn. This means that when rasterizing a series of connected line segments, shared endpoints will be produced only once rather than twice (as would occur with Bresenham’s algorithm).

Implementations may use other line segment rasterization algorithms, subject to the following rules:

- The coordinates of a fragment produced by the algorithm must not deviate by more than one unit in either x or y framebuffer coordinates from a corresponding fragment produced by the diamond-exit rule.

- The total number of fragments produced by the algorithm must not differ from that produced by the diamond-exit rule by more than one.

- For an x-major line, two fragments that lie in the same framebuffer-coordinate column must not be produced (for a y-major line, two fragments that lie in the same framebuffer-coordinate row must not be produced).

- If two line segments share a common endpoint, and both segments are either x-major (both left-to-right or both right-to-left) or y-major (both bottom-to-top or both top-to-bottom), then rasterizing both segments must not produce duplicate fragments. Fragments also must not be omitted so as to interrupt continuity of the connected segments.

The actual width w of Bresenham lines is determined by rounding the line width to the nearest integer, clamping it to the implementation-dependent `lineWidthRange` (with both values rounded to the nearest integer), then clamping it to be no less than 1.

Bresenham line segments of width other than one are rasterized by offsetting them in the minor direction (for an x-major line, the minor direction is y, and for a y-major line, the minor direction is x) and producing a row or column of fragments in the minor direction. If the line segment has endpoints given by (x0, y0) and (x1, y1) in framebuffer coordinates, the segment with endpoints (x 0​,y 0​−2 w−1​) and (x 1​,y 1​−2 w−1​) is rasterized, but instead of a single fragment, a column of fragments of height w (a row of fragments of length w for a y-major segment) is produced at each x (y for y-major) location. The lowest fragment of this column is the fragment that would be produced by rasterizing the segment of width 1 with the modified coordinates.

The preferred method of attribute interpolation for a wide line is to generate the same attribute values for all fragments in the row or column described above, as if the adjusted line was used for interpolation and those values replicated to the other fragments, except for `FragCoord` which is interpolated as usual. Implementations may instead interpolate each fragment according to the formula in Basic Line Segment Rasterization, using the original line segment endpoints.

When Bresenham lines are being rasterized, sample locations may all be treated as being at the pixel center (this may affect attribute and depth interpolation).

Note | The sample locations described above are not used for determining coverage, they are only used for things like attribute interpolation. The rasterization rules that determine coverage are defined in terms of whether the line intersects pixels, as opposed to the point sampling rules used for other primitive types. So these rules are independent of the sample locations. One consequence of this is that Bresenham lines cover the same pixels regardless of the number of rasterization samples, and cover all samples in those pixels (unless masked out or killed).

#### 34.11.3. Line Stipple

If the `stippledLineEnable` member of VkPipelineRasterizationLineStateCreateInfo is VK_TRUE, then lines are rasterized with a line stipple determined by `lineStippleFactor` and `lineStipplePattern`. `lineStipplePattern` is an unsigned 16-bit integer that determines which fragments are to be drawn or discarded when the line is rasterized. `lineStippleFactor` is a count that is used to modify the effective line stipple by causing each bit in `lineStipplePattern` to be used `lineStippleFactor` times.

Line stippling discards certain fragments that are produced by rasterization. The masking is achieved using three parameters: the 16-bit line stipple pattern p, the line stipple factor r, and an integer stipple counter s. Let

b=⌊r s​⌋mod 16

Then a fragment is produced if the b'th bit of p is 1, and discarded otherwise. The bits of p are numbered with 0 being the least significant and 15 being the most significant.

The initial value of s is zero. For VK_LINE_RASTERIZATION_MODE_BRESENHAM lines, s is incremented after production of each fragment of a line segment (fragments are produced in order, beginning at the starting point and working towards the ending point). For VK_LINE_RASTERIZATION_MODE_RECTANGULAR and VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH lines, the rectangular region is subdivided into adjacent unit-length rectangles, and s is incremented once for each rectangle. Rectangles with a value of s such that the b'th bit of p is zero are discarded. If the last rectangle in a line segment is shorter than unit-length, then the remainder may carry over to the next line segment in the line strip using the same value of s (this is the preferred behavior, for the stipple pattern to appear more consistent through the strip).

s is reset to 0 at the start of each strip (for line strips), and before every line segment in a group of independent segments.

If the line segment has been clipped, then the value of s at the beginning of the line segment is implementation-dependent.

To dynamically set the line stipple state, call:

    // Provided by VK_VERSION_1_4
    void vkCmdSetLineStipple(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    lineStippleFactor,
        uint16_t                                    lineStipplePattern);

    // Provided by VK_KHR_line_rasterization
    // Equivalent to vkCmdSetLineStipple
    void vkCmdSetLineStippleKHR(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    lineStippleFactor,
        uint16_t                                    lineStipplePattern);

    // Provided by VK_EXT_line_rasterization
    // Equivalent to vkCmdSetLineStipple
    void vkCmdSetLineStippleEXT(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    lineStippleFactor,
        uint16_t                                    lineStipplePattern);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `lineStippleFactor` is the repeat factor used in stippled line rasterization.

- `lineStipplePattern` is the bit pattern used in stippled line rasterization.

This command sets the line stipple state for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_LINE_STIPPLE set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the VkPipelineRasterizationLineStateCreateInfo::`lineStippleFactor` and VkPipelineRasterizationLineStateCreateInfo::`lineStipplePattern` values used to create the currently active pipeline.

Valid Usage

- VUID-vkCmdSetLineStipple-lineStippleFactor-02776
  `lineStippleFactor` must be in the range [1,256]

Valid Usage (Implicit)

- VUID-vkCmdSetLineStipple-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetLineStipple-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetLineStipple-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetLineStipple-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetLineStipple is not affected by conditional rendering

#### 34.11.4. Smooth Lines

If the `lineRasterizationMode` member of VkPipelineRasterizationLineStateCreateInfo is VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH, then lines are considered to be rectangles using the same geometry as for VK_LINE_RASTERIZATION_MODE_RECTANGULAR lines. The rules for determining which pixels are covered are implementation-dependent, and may include nearby pixels where no sample locations are covered or where the rectangle does not intersect the pixel at all. For each pixel that is considered covered, the fragment computes a coverage value that approximates the area of the intersection of the rectangle with the pixel square, and this coverage value is multiplied into the color location 0’s alpha value after fragment shading, as described in Multisample Coverage.

Note | The details of the rasterization rules and area calculation are left intentionally vague, to allow implementations to generate coverage and values that are aesthetically pleasing.

### 34.12. Polygons

A polygon results from the decomposition of a triangle strip, triangle fan or a series of independent triangles. Like points and line segments, polygon rasterization is controlled by several variables in the VkPipelineRasterizationStateCreateInfo structure.

#### 34.12.1. Basic Polygon Rasterization

The first step of polygon rasterization is to determine whether the triangle is back-facing or front-facing. This determination is made based on the sign of the (clipped or unclipped) polygon’s area computed in framebuffer coordinates. One way to compute this area is:

a=−2 1​i=0∑n−1​x f i​y f i⊕1​−x f i⊕1​y f i​

where x f i​ and y f i​ are the x and y framebuffer coordinates of the ith vertex of the n-vertex polygon (vertices are numbered starting at zero for the purposes of this computation) and i ⊕ 1 is (i + 1) mod n.

The interpretation of the sign of a is determined by the VkPipelineRasterizationStateCreateInfo::`frontFace` property of the currently active pipeline. Possible values are:

    // Provided by VK_VERSION_1_0
    typedef enum VkFrontFace {
        VK_FRONT_FACE_COUNTER_CLOCKWISE = 0,
        VK_FRONT_FACE_CLOCKWISE = 1,
    } VkFrontFace;

- VK_FRONT_FACE_COUNTER_CLOCKWISE specifies that a triangle with positive area is considered front-facing.

- VK_FRONT_FACE_CLOCKWISE specifies that a triangle with negative area is considered front-facing.

Any triangle which is not front-facing is back-facing, including zero-area triangles.

To dynamically set the front face orientation, call:

    // Provided by VK_VERSION_1_3
    void vkCmdSetFrontFace(
        VkCommandBuffer                             commandBuffer,
        VkFrontFace                                 frontFace);

    // Provided by VK_EXT_extended_dynamic_state, VK_EXT_shader_object
    // Equivalent to vkCmdSetFrontFace
    void vkCmdSetFrontFaceEXT(
        VkCommandBuffer                             commandBuffer,
        VkFrontFace                                 frontFace);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `frontFace` is a VkFrontFace value specifying the front-facing triangle orientation to be used for culling.

This command sets the front face orientation for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_FRONT_FACE set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the VkPipelineRasterizationStateCreateInfo::`frontFace` value used to create the currently active pipeline.

Valid Usage

- VUID-vkCmdSetFrontFace-None-08971
  At least one of the following must be true:

  - the `extendedDynamicState` feature is enabled

  - the `shaderObject` feature is enabled

  - the value of VkApplicationInfo::`apiVersion` used to create the VkInstance parent of `commandBuffer` is greater than or equal to Version 1.3

Valid Usage (Implicit)

- VUID-vkCmdSetFrontFace-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetFrontFace-frontFace-parameter
  `frontFace` must be a valid VkFrontFace value

- VUID-vkCmdSetFrontFace-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetFrontFace-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetFrontFace-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetFrontFace is not affected by conditional rendering

Once the orientation of triangles is determined, they are culled according to the VkPipelineRasterizationStateCreateInfo::`cullMode` property of the currently active pipeline. Possible values are:

    // Provided by VK_VERSION_1_0
    typedef enum VkCullModeFlagBits {
        VK_CULL_MODE_NONE = 0,
        VK_CULL_MODE_FRONT_BIT = 0x00000001,
        VK_CULL_MODE_BACK_BIT = 0x00000002,
        VK_CULL_MODE_FRONT_AND_BACK = 0x00000003,
    } VkCullModeFlagBits;

- VK_CULL_MODE_NONE specifies that no triangles are discarded

- VK_CULL_MODE_FRONT_BIT specifies that front-facing triangles are discarded

- VK_CULL_MODE_BACK_BIT specifies that back-facing triangles are discarded

- VK_CULL_MODE_FRONT_AND_BACK specifies that all triangles are discarded.

Following culling, fragments are produced for any triangles which have not been discarded.

    // Provided by VK_VERSION_1_0
    typedef VkFlags VkCullModeFlags;

`VkCullModeFlags` is a bitmask type for setting a mask of zero or more VkCullModeFlagBits.

To dynamically set the cull mode, call:

    // Provided by VK_VERSION_1_3
    void vkCmdSetCullMode(
        VkCommandBuffer                             commandBuffer,
        VkCullModeFlags                             cullMode);

    // Provided by VK_EXT_extended_dynamic_state, VK_EXT_shader_object
    // Equivalent to vkCmdSetCullMode
    void vkCmdSetCullModeEXT(
        VkCommandBuffer                             commandBuffer,
        VkCullModeFlags                             cullMode);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `cullMode` specifies the cull mode property to use for drawing.

This command sets the cull mode for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_CULL_MODE set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the VkPipelineRasterizationStateCreateInfo::`cullMode` value used to create the currently active pipeline.

Valid Usage

- VUID-vkCmdSetCullMode-None-08971
  At least one of the following must be true:

  - the `extendedDynamicState` feature is enabled

  - the `shaderObject` feature is enabled

  - the value of VkApplicationInfo::`apiVersion` used to create the VkInstance parent of `commandBuffer` is greater than or equal to Version 1.3

Valid Usage (Implicit)

- VUID-vkCmdSetCullMode-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetCullMode-cullMode-parameter
  `cullMode` must be a valid combination of VkCullModeFlagBits values

- VUID-vkCmdSetCullMode-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetCullMode-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetCullMode-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetCullMode is not affected by conditional rendering

The rule for determining which fragments are produced by polygon rasterization is called point sampling. The two-dimensional projection obtained by taking the x and y framebuffer coordinates of the polygon’s vertices is formed. Fragments are produced for any fragment area groups of pixels for which any sample points lie inside of this polygon. Coverage bits that correspond to sample points that satisfy the point sampling criteria are 1, other coverage bits are 0. Special treatment is given to a sample whose sample location lies on a polygon edge. In such a case, if two polygons lie on either side of a common edge (with identical endpoints) on which a sample point lies, then exactly one of the polygons must result in a covered sample for that fragment during rasterization. As for the data associated with each fragment produced by rasterizing a polygon, we begin by specifying how these values are produced for fragments in a triangle.

Barycentric coordinates are a set of three numbers, a, b, and c, each in the range [0,1], with a + b + c = 1. These coordinates uniquely specify any point p within the triangle or on the triangle’s boundary as

  p = a pa + b pb + c pc

where pa, pb, and pc are the vertices of the triangle. a, b, and c are determined by:

a=A(p a​p b​p c​)A(pp b​p c​)​,b=A(p a​p b​p c​)A(pp a​p c​)​,c=A(p a​p b​p c​)A(pp a​p b​)​,

where A(lmn) denotes the area in framebuffer coordinates of the triangle with vertices l, m, and n.

Denote an associated datum at pa, pb, or pc as fa, fb, or fc, respectively.

Perspective interpolation for a triangle interpolates three values in a manner that is correct when taking the perspective of the viewport into consideration, by way of the triangle’s clip coordinates. An interpolated value f can be determined by

f=a/w a​+b/w b​+c/w c​a f a​/w a​+b f b​/w b​+c f c​/w c​​

where wa, wb, and wc are the clip w coordinates of pa, pb, and pc, respectively. a, b, and c are the barycentric coordinates of the location at which the data are produced.

Linear interpolation for a triangle directly interpolates three values, and an interpolated value f can be determined by

  f = a fa + b fb + c fc

where fa, fb, and fc are the data associated with pa, pb, and pc, respectively.

The clip coordinate w for a sample is determined using perspective interpolation. The depth value z for a sample is determined using linear interpolation. Interpolation of fragment shader input values are determined by Interpolation decorations.

For a polygon with more than three edges, such as are produced by clipping a triangle, a convex combination of the values of the datum at the polygon’s vertices must be used to obtain the value assigned to each fragment produced by the rasterization algorithm. That is, it must be the case that at every fragment

f=i=1∑n​a i​f i​

where n is the number of vertices in the polygon and fi is the value of f at vertex i. For each i, 0 ≤ ai ≤ 1 and ∑i=1 n​a i​=1. The values of ai may differ from fragment to fragment, but at vertex i, ai = 1 and aj = 0 for j ≠ i.

Note | One algorithm that achieves the required behavior is to triangulate a polygon (without adding any vertices) and then treat each triangle individually as already discussed. A scan-line rasterizer that linearly interpolates data along each edge and then linearly interpolates data across each horizontal span from edge to edge also satisfies the restrictions (in this case the numerator and denominator of perspective interpolation are iterated independently, and a division is performed for each fragment).

#### 34.12.2. Polygon Mode

Possible values of the VkPipelineRasterizationStateCreateInfo::`polygonMode` property of the currently active pipeline, specifying the method of rasterization for polygons, are:

    // Provided by VK_VERSION_1_0
    typedef enum VkPolygonMode {
        VK_POLYGON_MODE_FILL = 0,
        VK_POLYGON_MODE_LINE = 1,
        VK_POLYGON_MODE_POINT = 2,
      // Provided by VK_NV_fill_rectangle
        VK_POLYGON_MODE_FILL_RECTANGLE_NV = 1000153000,
    } VkPolygonMode;

- VK_POLYGON_MODE_POINT specifies that polygon vertices are drawn as points.

- VK_POLYGON_MODE_LINE specifies that polygon edges are drawn as line segments.

- VK_POLYGON_MODE_FILL specifies that polygons are rendered using the polygon rasterization rules in this section.

- VK_POLYGON_MODE_FILL_RECTANGLE_NV specifies that polygons are rendered using polygon rasterization rules, modified to consider a sample within the primitive if the sample location is inside the axis-aligned bounding box of the triangle after projection. Note that the barycentric weights used in attribute interpolation can extend outside the range [0,1] when these primitives are shaded. Special treatment is given to a sample position on the boundary edge of the bounding box. In such a case, if two rectangles lie on either side of a common edge (with identical endpoints) on which a sample position lies, then exactly one of the triangles must produce a fragment that covers that sample during rasterization.

  Polygons rendered in VK_POLYGON_MODE_FILL_RECTANGLE_NV mode may be clipped by the frustum or by user clip planes. If clipping is applied, the triangle is culled rather than clipped.

  Area calculation and facingness are determined for VK_POLYGON_MODE_FILL_RECTANGLE_NV mode using the triangle’s vertices.

These modes affect only the final rasterization of polygons: in particular, a polygon’s vertices are shaded and the polygon is clipped and possibly culled before these modes are applied.

If `VkPhysicalDeviceMaintenance5Properties`::`polygonModePointSize` is VK_TRUE, the point size of the final rasterization of polygons is taken from `PointSize` when polygon mode is VK_POLYGON_MODE_POINT.

Otherwise, if `VkPhysicalDeviceMaintenance5Properties`::`polygonModePointSize` is VK_FALSE, the point size of the final rasterization of polygons is 1.0 when polygon mode is VK_POLYGON_MODE_POINT.

To dynamically set the polygon mode, call:

    // Provided by VK_EXT_extended_dynamic_state3, VK_EXT_shader_object
    void vkCmdSetPolygonModeEXT(
        VkCommandBuffer                             commandBuffer,
        VkPolygonMode                               polygonMode);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `polygonMode` specifies polygon mode.

This command sets the polygon mode for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_POLYGON_MODE_EXT set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the VkPipelineRasterizationStateCreateInfo::`polygonMode` value used to create the currently active pipeline.

Valid Usage

- VUID-vkCmdSetPolygonModeEXT-None-09423
  At least one of the following must be true:

  - The `extendedDynamicState3PolygonMode` feature is enabled

  - The `shaderObject` feature is enabled

- VUID-vkCmdSetPolygonModeEXT-fillModeNonSolid-07424
  If the `fillModeNonSolid` feature is not enabled, `polygonMode` must be VK_POLYGON_MODE_FILL or VK_POLYGON_MODE_FILL_RECTANGLE_NV

- VUID-vkCmdSetPolygonModeEXT-polygonMode-07425
  If the `VK_NV_fill_rectangle` extension is not enabled, `polygonMode` must not be VK_POLYGON_MODE_FILL_RECTANGLE_NV

Valid Usage (Implicit)

- VUID-vkCmdSetPolygonModeEXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetPolygonModeEXT-polygonMode-parameter
  `polygonMode` must be a valid VkPolygonMode value

- VUID-vkCmdSetPolygonModeEXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetPolygonModeEXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetPolygonModeEXT-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetPolygonModeEXT is not affected by conditional rendering

#### 34.12.3. Depth Bias

The depth values of all fragments generated by the rasterization of a polygon can be biased (offset) by a single depth bias value o that is computed for that polygon.

##### Depth Bias Enable

The depth bias computation is enabled by the `depthBiasEnable` set with vkCmdSetDepthBiasEnable and `vkCmdSetDepthBiasEnableEXT`, or the corresponding VkPipelineRasterizationStateCreateInfo::`depthBiasEnable` value used to create the currently active pipeline. If the depth bias enable is VK_FALSE, no bias is applied and the fragment’s depth values are unchanged.

To dynamically enable whether to bias fragment depth values, call:

    // Provided by VK_VERSION_1_3
    void vkCmdSetDepthBiasEnable(
        VkCommandBuffer                             commandBuffer,
        VkBool32                                    depthBiasEnable);

    // Provided by VK_EXT_extended_dynamic_state2, VK_EXT_shader_object
    // Equivalent to vkCmdSetDepthBiasEnable
    void vkCmdSetDepthBiasEnableEXT(
        VkCommandBuffer                             commandBuffer,
        VkBool32                                    depthBiasEnable);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `depthBiasEnable` controls whether to bias fragment depth values.

This command sets the depth bias enable for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the VkPipelineRasterizationStateCreateInfo::`depthBiasEnable` value used to create the currently active pipeline.

Valid Usage

- VUID-vkCmdSetDepthBiasEnable-None-08970
  At least one of the following must be true:

  - the `extendedDynamicState2` feature is enabled

  - the `shaderObject` feature is enabled

  - the value of VkApplicationInfo::`apiVersion` used to create the VkInstance parent of `commandBuffer` is greater than or equal to Version 1.3

Valid Usage (Implicit)

- VUID-vkCmdSetDepthBiasEnable-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetDepthBiasEnable-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetDepthBiasEnable-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetDepthBiasEnable-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetDepthBiasEnable is not affected by conditional rendering

##### Depth Bias Computation

The depth bias depends on three parameters:

- `depthBiasSlopeFactor` scales the maximum depth slope m of the polygon

- `depthBiasConstantFactor` scales the parameter r of the depth attachment

- the scaled terms are summed to produce a value which is then clamped to a minimum or maximum value specified by `depthBiasClamp`

`depthBiasSlopeFactor`, `depthBiasConstantFactor`, and `depthBiasClamp` can each be positive, negative, or zero. These parameters are set as described for vkCmdSetDepthBias and vkCmdSetDepthBias2EXT below.

The maximum depth slope m of a triangle is

m=(∂x f​∂z f​​)2+(∂y f​∂z f​​)2
​

where (xf, yf, zf) is a point on the triangle. m may be approximated as

m=max(
​∂x f​∂z f​​
​,
​∂y f​∂z f​​
​).

In a pipeline with a depth bias representation of VK_DEPTH_BIAS_REPRESENTATION_FLOAT_EXT, r, for the given primitive is defined as

  r = 1

Otherwise r is the minimum resolvable difference that depends on the depth attachment representation. If `VkDepthBiasRepresentationInfoEXT`::`depthBiasExact` is VK_FALSE it is the smallest difference in a sample’s depth zf values that is guaranteed to remain distinct throughout polygon rasterization and in the depth attachment. All pairs of fragments generated by the rasterization of two polygons with otherwise identical vertices, but zf values that differ by r, will have distinct depth values.

For fixed-point depth attachment representations, or in a pipeline with a depth bias representation of VK_DEPTH_BIAS_REPRESENTATION_LEAST_REPRESENTABLE_VALUE_FORCE_UNORM_EXT, r is constant throughout the range of the entire depth attachment. If `VkDepthBiasRepresentationInfoEXT`::`depthBiasExact` is VK_TRUE, then its value must be

  r = 2-n

Otherwise its value is implementation-dependent but must be at most

  r = 2 × 2-n

where n is the number of bits used for the depth aspect when using a fixed-point attachment, or the number of mantissa bits plus one when using a floating-point attachment.

Otherwise for floating-point depth attachment, there is no single minimum resolvable difference. In this case, the minimum resolvable difference for a given polygon is dependent on the maximum exponent, e, in the range of z values spanned by the primitive. If n is the number of bits in the floating-point mantissa, the minimum resolvable difference, r, for the given primitive is defined as

  r = 2e-n

If a triangle is rasterized using the VK_POLYGON_MODE_FILL_RECTANGLE_NV polygon mode, then this minimum resolvable difference may not be resolvable for samples outside of the triangle, where the depth is extrapolated.

If no depth attachment is present, r is undefined.

The bias value o for a polygon is

o where​=dbclamp(m×depthBiasSlopeFactor+r×depthBiasConstantFactor)dbclamp(x)=⎩
⎨
⎧​x min(x, depthBiasClamp)max(x, depthBiasClamp)​depthBiasClamp=0 or NaN depthBiasClamp>0 depthBiasClamp<0​​

m is computed as described above. If the depth attachment uses a fixed-point representation, m is a function of depth values in the range [0,1], and o is applied to depth values in the same range.

Depth bias is applied to triangle topology primitives received by the rasterizer regardless of polygon mode. Depth bias may also be applied to line and point topology primitives received by the rasterizer.

To dynamically set the depth bias parameters, call:

    // Provided by VK_VERSION_1_0
    void vkCmdSetDepthBias(
        VkCommandBuffer                             commandBuffer,
        float                                       depthBiasConstantFactor,
        float                                       depthBiasClamp,
        float                                       depthBiasSlopeFactor);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `depthBiasConstantFactor` is a scalar factor controlling the constant depth value added to each fragment.

- `depthBiasClamp` is the maximum (or minimum) depth bias of a fragment.

- `depthBiasSlopeFactor` is a scalar factor applied to a fragment’s slope in depth bias calculations.

This command sets the depth bias parameters for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_DEPTH_BIAS set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the corresponding VkPipelineRasterizationStateCreateInfo::`depthBiasConstantFactor`, `depthBiasClamp`, and `depthBiasSlopeFactor` values used to create the currently active pipeline.

Calling this function is equivalent to calling `vkCmdSetDepthBias2EXT` without a `VkDepthBiasRepresentationInfoEXT` in the pNext chain of `VkDepthBiasInfoEXT`.

Valid Usage

- VUID-vkCmdSetDepthBias-depthBiasClamp-00790
  If the `depthBiasClamp` feature is not enabled, `depthBiasClamp` must be `0.0`

Valid Usage (Implicit)

- VUID-vkCmdSetDepthBias-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetDepthBias-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetDepthBias-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetDepthBias-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetDepthBias is not affected by conditional rendering

The `VkDepthBiasRepresentationInfoEXT` structure is defined as:

    // Provided by VK_EXT_depth_bias_control
    typedef struct VkDepthBiasRepresentationInfoEXT {
        VkStructureType                 sType;
        const void*                     pNext;
        VkDepthBiasRepresentationEXT    depthBiasRepresentation;
        VkBool32                        depthBiasExact;
    } VkDepthBiasRepresentationInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `depthBiasRepresentation` is a VkDepthBiasRepresentationEXT value specifying the depth bias representation.

- `depthBiasExact` specifies that the implementation is not allowed to scale the depth bias value to ensure a minimum resolvable distance.

Valid Usage

- VUID-VkDepthBiasRepresentationInfoEXT-leastRepresentableValueForceUnormRepresentation-08947
  If the `leastRepresentableValueForceUnormRepresentation` feature is not enabled, `depthBiasRepresentation` must not be VK_DEPTH_BIAS_REPRESENTATION_LEAST_REPRESENTABLE_VALUE_FORCE_UNORM_EXT

- VUID-VkDepthBiasRepresentationInfoEXT-floatRepresentation-08948
  If the `floatRepresentation` feature is not enabled, `depthBiasRepresentation` must not be VK_DEPTH_BIAS_REPRESENTATION_FLOAT_EXT

- VUID-VkDepthBiasRepresentationInfoEXT-depthBiasExact-08949
  If the `depthBiasExact` feature is not enabled, `depthBiasExact` must be VK_FALSE

Valid Usage (Implicit)

- VUID-VkDepthBiasRepresentationInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DEPTH_BIAS_REPRESENTATION_INFO_EXT

- VUID-VkDepthBiasRepresentationInfoEXT-depthBiasRepresentation-parameter
  `depthBiasRepresentation` must be a valid VkDepthBiasRepresentationEXT value

Structure Chaining

Extends the structures

  - VkDepthBiasInfoEXT

  - VkPipelineRasterizationStateCreateInfo

Possible values of VkDepthBiasRepresentationInfoEXT::`depthBiasRepresentation`, specifying the depth bias representation are:

    // Provided by VK_EXT_depth_bias_control
    typedef enum VkDepthBiasRepresentationEXT {
        VK_DEPTH_BIAS_REPRESENTATION_LEAST_REPRESENTABLE_VALUE_FORMAT_EXT = 0,
        VK_DEPTH_BIAS_REPRESENTATION_LEAST_REPRESENTABLE_VALUE_FORCE_UNORM_EXT = 1,
        VK_DEPTH_BIAS_REPRESENTATION_FLOAT_EXT = 2,
    } VkDepthBiasRepresentationEXT;

- VK_DEPTH_BIAS_REPRESENTATION_LEAST_REPRESENTABLE_VALUE_FORMAT_EXT specifies that the depth bias representation is a factor of the format’s r as described in Depth Bias Computation.

- VK_DEPTH_BIAS_REPRESENTATION_LEAST_REPRESENTABLE_VALUE_FORCE_UNORM_EXT specifies that the depth bias representation is a factor of a constant r defined by the bit-size or mantissa of the format as described in Depth Bias Computation.

- VK_DEPTH_BIAS_REPRESENTATION_FLOAT_EXT specifies that the depth bias representation is a factor of constant r equal to 1.

The `VkDepthBiasInfoEXT` structure is defined as:

    // Provided by VK_EXT_depth_bias_control
    typedef struct VkDepthBiasInfoEXT {
        VkStructureType    sType;
        const void*        pNext;
        float              depthBiasConstantFactor;
        float              depthBiasClamp;
        float              depthBiasSlopeFactor;
    } VkDepthBiasInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `depthBiasConstantFactor` is a scalar factor controlling the constant depth value added to each fragment.

- `depthBiasClamp` is the maximum (or minimum) depth bias of a fragment.

- `depthBiasSlopeFactor` is a scalar factor applied to a fragment’s slope in depth bias calculations.

If `pNext` does not contain a VkDepthBiasRepresentationInfoEXT structure, then this command is equivalent to including a VkDepthBiasRepresentationInfoEXT with `depthBiasExact` set to VK_FALSE and `depthBiasRepresentation` set to VK_DEPTH_BIAS_REPRESENTATION_LEAST_REPRESENTABLE_VALUE_FORMAT_EXT.

Valid Usage

- VUID-VkDepthBiasInfoEXT-depthBiasClamp-08950
  If the `depthBiasClamp` feature is not enabled, `depthBiasClamp` must be `0.0`

Valid Usage (Implicit)

- VUID-VkDepthBiasInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DEPTH_BIAS_INFO_EXT

- VUID-VkDepthBiasInfoEXT-pNext-pNext
  `pNext` must be `NULL` or a pointer to a valid instance of VkDepthBiasRepresentationInfoEXT

- VUID-VkDepthBiasInfoEXT-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

To dynamically set the depth bias parameters, call:

    // Provided by VK_EXT_depth_bias_control
    void vkCmdSetDepthBias2EXT(
        VkCommandBuffer                             commandBuffer,
        const VkDepthBiasInfoEXT*                   pDepthBiasInfo);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `pDepthBiasInfo` is a pointer to a VkDepthBiasInfoEXT structure specifying depth bias parameters.

This command is functionally identical to vkCmdSetDepthBias, but includes extensible sub-structures that include `sType` and `pNext` parameters, allowing them to be more easily extended.

Valid Usage (Implicit)

- VUID-vkCmdSetDepthBias2EXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetDepthBias2EXT-pDepthBiasInfo-parameter
  `pDepthBiasInfo` must be a valid pointer to a valid VkDepthBiasInfoEXT structure

- VUID-vkCmdSetDepthBias2EXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetDepthBias2EXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetDepthBias2EXT-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetDepthBias2EXT is not affected by conditional rendering

#### 34.12.4. Conservative Rasterization

If the `pNext` chain of VkPipelineRasterizationStateCreateInfo includes a `VkPipelineRasterizationConservativeStateCreateInfoEXT` structure, then that structure includes parameters controlling conservative rasterization.

`VkPipelineRasterizationConservativeStateCreateInfoEXT` is defined as:

    // Provided by VK_EXT_conservative_rasterization
    typedef struct VkPipelineRasterizationConservativeStateCreateInfoEXT {
        VkStructureType                                           sType;
        const void*                                               pNext;
        VkPipelineRasterizationConservativeStateCreateFlagsEXT    flags;
        VkConservativeRasterizationModeEXT                        conservativeRasterizationMode;
        float                                                     extraPrimitiveOverestimationSize;
    } VkPipelineRasterizationConservativeStateCreateInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is reserved for future use.

- `conservativeRasterizationMode` is the conservative rasterization mode to use.

- `extraPrimitiveOverestimationSize` is the extra size in pixels to increase the generating primitive during conservative rasterization at each of its edges in `X` and `Y` equally in screen space beyond the base overestimation specified in `VkPhysicalDeviceConservativeRasterizationPropertiesEXT`::`primitiveOverestimationSize`. If `conservativeRasterizationMode` is not VK_CONSERVATIVE_RASTERIZATION_MODE_OVERESTIMATE_EXT, this value is ignored.

If this structure is not included in the `pNext` chain, `conservativeRasterizationMode` is considered to be VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT, and conservative rasterization is disabled.

Polygon rasterization can be made conservative by setting `conservativeRasterizationMode` to VK_CONSERVATIVE_RASTERIZATION_MODE_OVERESTIMATE_EXT or VK_CONSERVATIVE_RASTERIZATION_MODE_UNDERESTIMATE_EXT in `VkPipelineRasterizationConservativeStateCreateInfoEXT`.

Note | If `conservativePointAndLineRasterization` is supported, conservative rasterization can be applied to line and point primitives, otherwise it must be disabled.

Valid Usage

- VUID-VkPipelineRasterizationConservativeStateCreateInfoEXT-extraPrimitiveOverestimationSize-01769
  `extraPrimitiveOverestimationSize` must be in the range of `0.0` to `VkPhysicalDeviceConservativeRasterizationPropertiesEXT`::`maxExtraPrimitiveOverestimationSize` inclusive

Valid Usage (Implicit)

- VUID-VkPipelineRasterizationConservativeStateCreateInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_CONSERVATIVE_STATE_CREATE_INFO_EXT

- VUID-VkPipelineRasterizationConservativeStateCreateInfoEXT-flags-zerobitmask
  `flags` must be `0`

- VUID-VkPipelineRasterizationConservativeStateCreateInfoEXT-conservativeRasterizationMode-parameter
  `conservativeRasterizationMode` must be a valid VkConservativeRasterizationModeEXT value

Structure Chaining

Extends the structure

  - VkPipelineRasterizationStateCreateInfo

    // Provided by VK_EXT_conservative_rasterization
    typedef VkFlags VkPipelineRasterizationConservativeStateCreateFlagsEXT;

`VkPipelineRasterizationConservativeStateCreateFlagsEXT` is a bitmask type for setting a mask, but is currently reserved for future use.

Possible values of VkPipelineRasterizationConservativeStateCreateInfoEXT::`conservativeRasterizationMode`, specifying the conservative rasterization mode are:

    // Provided by VK_EXT_conservative_rasterization
    typedef enum VkConservativeRasterizationModeEXT {
        VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT = 0,
        VK_CONSERVATIVE_RASTERIZATION_MODE_OVERESTIMATE_EXT = 1,
        VK_CONSERVATIVE_RASTERIZATION_MODE_UNDERESTIMATE_EXT = 2,
    } VkConservativeRasterizationModeEXT;

- VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT specifies that conservative rasterization is disabled and rasterization proceeds as normal.

- VK_CONSERVATIVE_RASTERIZATION_MODE_OVERESTIMATE_EXT specifies that conservative rasterization is enabled in overestimation mode.

- VK_CONSERVATIVE_RASTERIZATION_MODE_UNDERESTIMATE_EXT specifies that conservative rasterization is enabled in underestimation mode.

To dynamically set the `conservativeRasterizationMode`, call:

    // Provided by VK_EXT_conservative_rasterization with VK_EXT_extended_dynamic_state3, VK_EXT_conservative_rasterization with VK_EXT_shader_object
    void vkCmdSetConservativeRasterizationModeEXT(
        VkCommandBuffer                             commandBuffer,
        VkConservativeRasterizationModeEXT          conservativeRasterizationMode);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `conservativeRasterizationMode` specifies the `conservativeRasterizationMode` state.

This command sets the `conservativeRasterizationMode` state for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_CONSERVATIVE_RASTERIZATION_MODE_EXT set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the VkPipelineRasterizationConservativeStateCreateInfoEXT::`conservativeRasterizationMode` value used to create the currently active pipeline.

Valid Usage

- VUID-vkCmdSetConservativeRasterizationModeEXT-None-09423
  At least one of the following must be true:

  - The `extendedDynamicState3ConservativeRasterizationMode` feature is enabled

  - The `shaderObject` feature is enabled

Valid Usage (Implicit)

- VUID-vkCmdSetConservativeRasterizationModeEXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetConservativeRasterizationModeEXT-conservativeRasterizationMode-parameter
  `conservativeRasterizationMode` must be a valid VkConservativeRasterizationModeEXT value

- VUID-vkCmdSetConservativeRasterizationModeEXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetConservativeRasterizationModeEXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetConservativeRasterizationModeEXT-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetConservativeRasterizationModeEXT is not affected by conditional rendering

To dynamically set the `extraPrimitiveOverestimationSize`, call:

    // Provided by VK_EXT_conservative_rasterization with VK_EXT_extended_dynamic_state3, VK_EXT_conservative_rasterization with VK_EXT_shader_object
    void vkCmdSetExtraPrimitiveOverestimationSizeEXT(
        VkCommandBuffer                             commandBuffer,
        float                                       extraPrimitiveOverestimationSize);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `extraPrimitiveOverestimationSize` specifies the `extraPrimitiveOverestimationSize`.

This command sets the `extraPrimitiveOverestimationSize` for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_EXTRA_PRIMITIVE_OVERESTIMATION_SIZE_EXT set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the VkPipelineRasterizationConservativeStateCreateInfoEXT::`extraPrimitiveOverestimationSize` value used to create the currently active pipeline.

Valid Usage

- VUID-vkCmdSetExtraPrimitiveOverestimationSizeEXT-None-09423
  At least one of the following must be true:

  - The `extendedDynamicState3ExtraPrimitiveOverestimationSize` feature is enabled

  - The `shaderObject` feature is enabled

- VUID-vkCmdSetExtraPrimitiveOverestimationSizeEXT-extraPrimitiveOverestimationSize-07428
  `extraPrimitiveOverestimationSize` must be in the range of `0.0` to `VkPhysicalDeviceConservativeRasterizationPropertiesEXT`::`maxExtraPrimitiveOverestimationSize` inclusive

Valid Usage (Implicit)

- VUID-vkCmdSetExtraPrimitiveOverestimationSizeEXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetExtraPrimitiveOverestimationSizeEXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetExtraPrimitiveOverestimationSizeEXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetExtraPrimitiveOverestimationSizeEXT-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetExtraPrimitiveOverestimationSizeEXT is not affected by conditional rendering

When overestimate conservative rasterization is enabled, rather than evaluating coverage at individual sample locations, a determination is made whether any portion of the pixel (including its edges and corners) is covered by the primitive. If any portion of the pixel is covered, then all bits of the coverage mask for the fragment corresponding to that pixel are enabled. If the render pass has a fragment density map attachment and any bit of the coverage mask for the fragment is enabled, then all bits of the coverage mask for the fragment are enabled.

For the purposes of evaluating which pixels are covered by the primitive, implementations can increase the size of the primitive by up to `VkPhysicalDeviceConservativeRasterizationPropertiesEXT`::`primitiveOverestimationSize` pixels at each of the primitive edges. This may increase the number of fragments generated by this primitive and represents an overestimation of the pixel coverage.

This overestimation size can be increased further by setting the `extraPrimitiveOverestimationSize` value above `0.0` in steps of `VkPhysicalDeviceConservativeRasterizationPropertiesEXT`::`extraPrimitiveOverestimationSizeGranularity` up to and including `VkPhysicalDeviceConservativeRasterizationPropertiesEXT`::`extraPrimitiveOverestimationSize`. This may further increase the number of fragments generated by this primitive.

The actual precision of the overestimation size used for conservative rasterization may vary between implementations and produce results that only approximate the `primitiveOverestimationSize` and `extraPrimitiveOverestimationSizeGranularity` properties. Implementations may especially vary these approximations when the render pass has a fragment density map and the fragment area covers multiple pixels.

For triangles if VK_CONSERVATIVE_RASTERIZATION_MODE_OVERESTIMATE_EXT is enabled, fragments will be generated if the primitive area covers any portion of any pixel inside the fragment area, including their edges or corners. The tie-breaking rule described in Basic Polygon Rasterization does not apply during conservative rasterization and coverage is set for all fragments generated from shared edges of polygons. Degenerate triangles that evaluate to zero area after rasterization, even for pixels containing a vertex or edge of the zero-area polygon, will be culled if `VkPhysicalDeviceConservativeRasterizationPropertiesEXT`::`degenerateTrianglesRasterized` is VK_FALSE or will generate fragments if `degenerateTrianglesRasterized` is VK_TRUE. The fragment input values for these degenerate triangles take their attribute and depth values from the provoking vertex. Degenerate triangles are considered backfacing and the application can enable backface culling if desired. Triangles that are zero area before rasterization may be culled regardless.

For lines if VK_CONSERVATIVE_RASTERIZATION_MODE_OVERESTIMATE_EXT is enabled, and the implementation sets `VkPhysicalDeviceConservativeRasterizationPropertiesEXT`::`conservativePointAndLineRasterization` to VK_TRUE, fragments will be generated if the line covers any portion of any pixel inside the fragment area, including their edges or corners. Degenerate lines that evaluate to zero length after rasterization will be culled if `VkPhysicalDeviceConservativeRasterizationPropertiesEXT`::`degenerateLinesRasterized` is VK_FALSE or will generate fragments if `degenerateLinesRasterized` is VK_TRUE. The fragments input values for these degenerate lines take their attribute and depth values from the provoking vertex. Lines that are zero length before rasterization may be culled regardless.

For points if VK_CONSERVATIVE_RASTERIZATION_MODE_OVERESTIMATE_EXT is enabled, and the implementation sets `VkPhysicalDeviceConservativeRasterizationPropertiesEXT`::`conservativePointAndLineRasterization` to VK_TRUE, fragments will be generated if the point square covers any portion of any pixel inside the fragment area, including their edges or corners.

When underestimate conservative rasterization is enabled, rather than evaluating coverage at individual sample locations, a determination is made whether all of the pixel (including its edges and corners) is covered by the primitive. If the entire pixel is covered, then a fragment is generated with all bits of its coverage mask corresponding to the pixel enabled, otherwise the pixel is not considered covered even if some portion of the pixel is covered. The fragment is discarded if no pixels inside the fragment area are considered covered. If the render pass has a fragment density map attachment and any pixel inside the fragment area is not considered covered, then the fragment is discarded even if some pixels are considered covered.

For triangles, if VK_CONSERVATIVE_RASTERIZATION_MODE_UNDERESTIMATE_EXT is enabled, fragments will only be generated if any pixel inside the fragment area is fully covered by the generating primitive, including its edges and corners.

For lines, if VK_CONSERVATIVE_RASTERIZATION_MODE_UNDERESTIMATE_EXT is enabled, fragments will be generated if any pixel inside the fragment area, including its edges and corners, are entirely covered by the line.

For points, if VK_CONSERVATIVE_RASTERIZATION_MODE_UNDERESTIMATE_EXT is enabled, fragments will only be generated if the point square covers the entirety of any pixel square inside the fragment area, including its edges or corners.

If the render pass has a fragment density map and VK_CONSERVATIVE_RASTERIZATION_MODE_UNDERESTIMATE_EXT is enabled, fragments will only be generated if the entirety of all pixels inside the fragment area are covered by the generating primitive, line, or point.

For both overestimate and underestimate conservative rasterization modes a fragment has all of its pixel squares fully covered by the generating primitive must set `FullyCoveredEXT` to VK_TRUE if the implementation enables the `VkPhysicalDeviceConservativeRasterizationPropertiesEXT`::`fullyCoveredFragmentShaderInputVariable` feature.

When the use of a shading rate image or setting the fragment shading rate results in fragments covering multiple pixels, coverage for conservative rasterization is still evaluated on a per-pixel basis and may result in fragments with partial coverage. For fragment shader inputs decorated with `FullyCoveredEXT`, a fragment is considered fully covered if and only if all pixels in the fragment are fully covered by the generating primitive.

## 35. Fragment Operations

Fragments produced by rasterization go through a number of operations to determine whether or how values produced by fragment shading are written to the framebuffer.

The following fragment operations adhere to rasterization order, and are typically performed in this order:

1. Discard rectangles test

2. Scissor test

3. Exclusive scissor test

4. Sample mask test

5. Certain Fragment shading operations:

   - Sample Mask Accesses

   - Tile Image Reads

   - Depth Replacement

   - Stencil Reference Replacement

   - Interlocked Operations

6. Multisample coverage

7. Depth bounds test

8. Stencil test

9. Depth test

10. Representative fragment test

11. Sample counting

12. Coverage to color

13. Coverage reduction

14. Coverage modulation

The coverage mask generated by rasterization describes the initial coverage of each sample covered by the fragment. Fragment operations will update the coverage mask to add or subtract coverage where appropriate. If a fragment operation results in all bits of the coverage mask being `0`, the fragment is discarded, and no further operations are performed.

When one of the fragment operations in this chapter is described as “replacing” a fragment shader output, that output is replaced unconditionally, even if no fragment shader previously wrote to that output.

If there is a fragment shader and it declares the `PostDepthCoverage` execution mode, the sample mask test is instead performed after the depth test.

If `VkPhysicalDeviceMaintenance5Properties`::`earlyFragmentMultisampleCoverageAfterSampleCounting` is VK_TRUE and there is a fragment shader which declares the `EarlyFragmentTests` execution mode, fragment shading and multisample coverage operations must be performed after sample counting.

Otherwise, if `VkPhysicalDeviceMaintenance5Properties`::`earlyFragmentMultisampleCoverageAfterSampleCounting` is VK_FALSE and there is a fragment shader which declares the `EarlyFragmentTests` execution mode, fragment shading and multisample coverage operations should instead be performed after sample counting, but may be performed before sample counting.

If `VkPhysicalDeviceMaintenance5Properties`::`earlyFragmentSampleMaskTestBeforeSampleCounting` is VK_TRUE and there is a fragment shader which declares the `EarlyFragmentTests` execution mode sample mask test operations must follow the order of fragment operations from above.

Otherwise, if `VkPhysicalDeviceMaintenance5Properties`::`earlyFragmentSampleMaskTestBeforeSampleCounting` is VK_FALSE and there is a fragment shader which declares the `EarlyFragmentTests` execution mode, sample mask test operations should follow the order of fragment operations from above but may instead be performed after sample counting.

If there is a fragment shader which declares the `EarlyAndLateFragmentTestsAMD` execution mode, and it does not declare the `DepthReplacing` or `StencilRefReplacingEXT` execution mode, fragment shading and multisample coverage operations are instead be performed after sample counting.

For a pipeline with the following properties:

- a fragment shader is specified

- the fragment shader either specifies `EarlyAndLateFragmentTestsAMD` or does not write to storage resources;

- the fragment shader specifies the `StencilRefReplacingEXT` execution mode;

- either

  - the fragment shader specifies the `StencilRefUnchangedFrontAMD` execution mode;

  - the fragment shader specifies the `StencilRefLessFrontAMD` execution mode and the pipeline uses a VkPipelineDepthStencilStateCreateInfo::`front.compareOp` of VK_COMPARE_OP_GREATER or VK_COMPARE_OP_GREATER_OR_EQUAL; or

  - the fragment shader specifies the `StencilRefGreaterFrontAMD` execution mode and the pipeline uses a VkPipelineDepthStencilStateCreateInfo::`front.compareOp` of VK_COMPARE_OP_LESS or VK_COMPARE_OP_LESS_OR_EQUAL; and

- either

  - the fragment shader specifies the `StencilRefUnchangedBackAMD` execution mode;

  - the fragment shader specifies the `StencilRefLessBackAMD` execution mode and the pipeline uses a VkPipelineDepthStencilStateCreateInfo::`back.compareOp` of VK_COMPARE_OP_GREATER or VK_COMPARE_OP_GREATER_OR_EQUAL; or

  - the fragment shader specifies the `StencilRefGreaterBackAMD` execution mode and the pipeline uses a VkPipelineDepthStencilStateCreateInfo::`back.compareOp` of VK_COMPARE_OP_LESS or VK_COMPARE_OP_LESS_OR_EQUAL

an additional stencil test may be performed before fragment shading, using the stencil reference value specified by VkPipelineDepthStencilStateCreateInfo::`front.reference` or VkPipelineDepthStencilStateCreateInfo::`back.reference`.

For a pipeline with the following properties:

- a fragment shader is specified

- the fragment shader either specifies `EarlyAndLateFragmentTestsAMD` or does not write to storage resources;

- the fragment shader specifies the `DepthReplacing` execution mode; and

- either

  - the fragment shader specifies the `DepthUnchanged` execution mode;

  - the fragment shader specifies the `DepthLess` execution mode and the pipeline uses a VkPipelineDepthStencilStateCreateInfo::`depthCompareOp` of VK_COMPARE_OP_GREATER or VK_COMPARE_OP_GREATER_OR_EQUAL; or

  - the fragment shader specifies the `DepthGreater` execution mode and the pipeline uses a VkPipelineDepthStencilStateCreateInfo::`depthCompareOp` of VK_COMPARE_OP_LESS or VK_COMPARE_OP_LESS_OR_EQUAL

the implementation may perform depth bounds test before fragment shading and perform an additional depth test immediately after that using the interpolated depth value generated by rasterization.

Once all fragment operations have completed, fragment shader outputs for covered color attachment samples pass through framebuffer operations.

### 35.1. Discard Rectangles Test

The discard rectangle test compares the framebuffer coordinates (xf,yf) of each sample covered by a fragment against a set of discard rectangles.

Each discard rectangle is defined by a VkRect2D. These values are either set by the VkPipelineDiscardRectangleStateCreateInfoEXT structure during pipeline creation, or dynamically by the vkCmdSetDiscardRectangleEXT command.

A given sample is considered inside a discard rectangle if the xf is in the range [VkRect2D::`offset.x`, VkRect2D::`offset.x` + VkRect2D::`extent.x`), and yf is in the range [VkRect2D::`offset.y`, VkRect2D::`offset.y` + VkRect2D::`extent.y`). If the test is set to be inclusive, samples that are not inside any of the discard rectangles will have their coverage set to `0`. If the test is set to be exclusive, samples that are inside any of the discard rectangles will have their coverage set to `0`.

If no discard rectangles are specified, the coverage mask is unmodified by this operation.

The `VkPipelineDiscardRectangleStateCreateInfoEXT` structure is defined as:

    // Provided by VK_EXT_discard_rectangles
    typedef struct VkPipelineDiscardRectangleStateCreateInfoEXT {
        VkStructureType                                  sType;
        const void*                                      pNext;
        VkPipelineDiscardRectangleStateCreateFlagsEXT    flags;
        VkDiscardRectangleModeEXT                        discardRectangleMode;
        uint32_t                                         discardRectangleCount;
        const VkRect2D*                                  pDiscardRectangles;
    } VkPipelineDiscardRectangleStateCreateInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is reserved for future use.

- `discardRectangleMode` is a VkDiscardRectangleModeEXT value determining whether the discard rectangle test is inclusive or exclusive.

- `discardRectangleCount` is the number of discard rectangles to use.

- `pDiscardRectangles` is a pointer to an array of VkRect2D structures defining discard rectangles.

If the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT dynamic state is enabled for a pipeline, the `pDiscardRectangles` member is ignored. If the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_ENABLE_EXT dynamic state is not enabled for the pipeline the presence of this structure in the VkGraphicsPipelineCreateInfo chain, and a `discardRectangleCount` greater than zero, implicitly enables discard rectangles in the pipeline, otherwise discard rectangles must enabled or disabled by vkCmdSetDiscardRectangleEnableEXT. If the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_MODE_EXT dynamic state is enabled for the pipeline, the `discardRectangleMode` member is ignored, and the discard rectangle mode must be set by vkCmdSetDiscardRectangleModeEXT.

When this structure is included in the `pNext` chain of VkGraphicsPipelineCreateInfo, it defines parameters of the discard rectangle test. If the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT dynamic state is not enabled, and this structure is not included in the `pNext` chain, it is equivalent to specifying this structure with a `discardRectangleCount` of `0`. If all VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT, VK_DYNAMIC_STATE_DISCARD_RECTANGLE_ENABLE_EXT, and VK_DYNAMIC_STATE_DISCARD_RECTANGLE_MODE_EXT dynamic states are enabled, the application can omit this structure from the `pNext` chain of VkGraphicsPipelineCreateInfo and still use discard rectangles by setting all state dynamically. In this case `vkCmdSetDiscardRectangleEXT` must be called to set the discard rectangle for all indices [0, `maxDiscardRectangles`) before drawing with discard rectangles enabled. Individual discard rectangles can be made ineffective by setting their VkRect2D::`extent.width` and VkRect2D::`extent.height` to zero.

Valid Usage

- VUID-VkPipelineDiscardRectangleStateCreateInfoEXT-discardRectangleCount-00582
  `discardRectangleCount` must be less than or equal to `VkPhysicalDeviceDiscardRectanglePropertiesEXT`::`maxDiscardRectangles`

Valid Usage (Implicit)

- VUID-VkPipelineDiscardRectangleStateCreateInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT

- VUID-VkPipelineDiscardRectangleStateCreateInfoEXT-flags-zerobitmask
  `flags` must be `0`

- VUID-VkPipelineDiscardRectangleStateCreateInfoEXT-discardRectangleMode-parameter
  `discardRectangleMode` must be a valid VkDiscardRectangleModeEXT value

Structure Chaining

Extends the structure

  - VkGraphicsPipelineCreateInfo

    // Provided by VK_EXT_discard_rectangles
    typedef VkFlags VkPipelineDiscardRectangleStateCreateFlagsEXT;

`VkPipelineDiscardRectangleStateCreateFlagsEXT` is a bitmask type for setting a mask, but is currently reserved for future use.

VkDiscardRectangleModeEXT values are:

    // Provided by VK_EXT_discard_rectangles
    typedef enum VkDiscardRectangleModeEXT {
        VK_DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT = 0,
        VK_DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT = 1,
    } VkDiscardRectangleModeEXT;

- VK_DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT specifies that the discard rectangle test is inclusive.

- VK_DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT specifies that the discard rectangle test is exclusive.

To dynamically set the discard rectangles, call:

    // Provided by VK_EXT_discard_rectangles
    void vkCmdSetDiscardRectangleEXT(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    firstDiscardRectangle,
        uint32_t                                    discardRectangleCount,
        const VkRect2D*                             pDiscardRectangles);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `firstDiscardRectangle` is the index of the first discard rectangle whose state is updated by the command.

- `discardRectangleCount` is the number of discard rectangles whose state are updated by the command.

- `pDiscardRectangles` is a pointer to an array of VkRect2D structures specifying discard rectangles.

The discard rectangle taken from element i of `pDiscardRectangles` replace the current state for the discard rectangle at index `firstDiscardRectangle` + i, for i in [0, `discardRectangleCount`).

This command sets the discard rectangles for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the VkPipelineDiscardRectangleStateCreateInfoEXT::`pDiscardRectangles` values used to create the currently active pipeline.

Valid Usage

- VUID-vkCmdSetDiscardRectangleEXT-firstDiscardRectangle-00585
  The sum of `firstDiscardRectangle` and `discardRectangleCount` must be less than or equal to VkPhysicalDeviceDiscardRectanglePropertiesEXT::`maxDiscardRectangles`

- VUID-vkCmdSetDiscardRectangleEXT-x-00587
  The `x` and `y` member of `offset` in each VkRect2D element of `pDiscardRectangles` must be greater than or equal to `0`

- VUID-vkCmdSetDiscardRectangleEXT-offset-00588
  Evaluation of (`offset.x` + `extent.width`) in each VkRect2D element of `pDiscardRectangles` must not cause a signed integer addition overflow

- VUID-vkCmdSetDiscardRectangleEXT-offset-00589
  Evaluation of (`offset.y` + `extent.height`) in each VkRect2D element of `pDiscardRectangles` must not cause a signed integer addition overflow

- VUID-vkCmdSetDiscardRectangleEXT-viewportScissor2D-04788
  If this command is recorded in a secondary command buffer with VkCommandBufferInheritanceViewportScissorInfoNV::`viewportScissor2D` enabled, then this function must not be called

Valid Usage (Implicit)

- VUID-vkCmdSetDiscardRectangleEXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetDiscardRectangleEXT-pDiscardRectangles-parameter
  `pDiscardRectangles` must be a valid pointer to an array of `discardRectangleCount` VkRect2D structures

- VUID-vkCmdSetDiscardRectangleEXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetDiscardRectangleEXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetDiscardRectangleEXT-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdSetDiscardRectangleEXT-discardRectangleCount-arraylength
  `discardRectangleCount` must be greater than `0`

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetDiscardRectangleEXT is not affected by conditional rendering

To dynamically set whether discard rectangles are enabled, call:

    // Provided by VK_EXT_discard_rectangles
    void vkCmdSetDiscardRectangleEnableEXT(
        VkCommandBuffer                             commandBuffer,
        VkBool32                                    discardRectangleEnable);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `discardRectangleEnable` specifies whether discard rectangles are enabled or not.

This command sets the discard rectangle enable for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_DISCARD_RECTANGLE_ENABLE_EXT set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is implied by the VkPipelineDiscardRectangleStateCreateInfoEXT::`discardRectangleCount` value used to create the currently active pipeline, where a non-zero `discardRectangleCount` implicitly enables discard rectangles, otherwise they are disabled.

Valid Usage

- VUID-vkCmdSetDiscardRectangleEnableEXT-specVersion-07851
  The `VK_EXT_discard_rectangles` extension must be enabled, and the implementation must support at least `specVersion` `2` of this extension

Valid Usage (Implicit)

- VUID-vkCmdSetDiscardRectangleEnableEXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetDiscardRectangleEnableEXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetDiscardRectangleEnableEXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetDiscardRectangleEnableEXT-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetDiscardRectangleEnableEXT is not affected by conditional rendering

To dynamically set the discard rectangle mode, call:

    // Provided by VK_EXT_discard_rectangles
    void vkCmdSetDiscardRectangleModeEXT(
        VkCommandBuffer                             commandBuffer,
        VkDiscardRectangleModeEXT                   discardRectangleMode);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `discardRectangleMode` specifies the discard rectangle mode for all discard rectangles, either inclusive or exclusive.

This command sets the discard rectangle mode for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_DISCARD_RECTANGLE_MODE_EXT set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the VkPipelineDiscardRectangleStateCreateInfoEXT::`discardRectangleMode` value used to create the currently active pipeline.

Valid Usage

- VUID-vkCmdSetDiscardRectangleModeEXT-specVersion-07852
  The `VK_EXT_discard_rectangles` extension must be enabled, and the implementation must support at least `specVersion` `2` of this extension

Valid Usage (Implicit)

- VUID-vkCmdSetDiscardRectangleModeEXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetDiscardRectangleModeEXT-discardRectangleMode-parameter
  `discardRectangleMode` must be a valid VkDiscardRectangleModeEXT value

- VUID-vkCmdSetDiscardRectangleModeEXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetDiscardRectangleModeEXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetDiscardRectangleModeEXT-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetDiscardRectangleModeEXT is not affected by conditional rendering

### 35.2. Scissor Test

The scissor test compares the framebuffer coordinates (xf,yf) of each sample covered by a fragment against a scissor rectangle at the index equal to the fragment’s `ViewportIndex`.

Each scissor rectangle is defined by a VkRect2D. These values are either set by the VkPipelineViewportStateCreateInfo structure during pipeline creation, or dynamically by the vkCmdSetScissor command.

A given sample is considered inside a scissor rectangle if xf is in the range [VkRect2D::`offset.x`, VkRect2D::`offset.x` + VkRect2D::`extent.x`), and yf is in the range [VkRect2D::`offset.y`, VkRect2D::`offset.y` + VkRect2D::`extent.y`). Samples with coordinates outside the scissor rectangle at the corresponding `ViewportIndex` will have their coverage set to `0`.

If a render pass transform is enabled, the (`offset.x` and `offset.y`) and (`extent.width` and `extent.height`) values are transformed as described in render pass transform before participating in the scissor test.

To dynamically set the scissor rectangles, call:

    // Provided by VK_VERSION_1_0
    void vkCmdSetScissor(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    firstScissor,
        uint32_t                                    scissorCount,
        const VkRect2D*                             pScissors);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `firstScissor` is the index of the first scissor whose state is updated by the command.

- `scissorCount` is the number of scissors whose rectangles are updated by the command.

- `pScissors` is a pointer to an array of VkRect2D structures defining scissor rectangles.

The scissor rectangles taken from element i of `pScissors` replace the current state for the scissor index `firstScissor` + i, for i in [0, `scissorCount`).

This command sets the scissor rectangles for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_SCISSOR set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the VkPipelineViewportStateCreateInfo::`pScissors` values used to create the currently active pipeline.

Valid Usage

- VUID-vkCmdSetScissor-firstScissor-00592
  The sum of `firstScissor` and `scissorCount` must be between `1` and `VkPhysicalDeviceLimits`::`maxViewports`, inclusive

- VUID-vkCmdSetScissor-firstScissor-00593
  If the `multiViewport` feature is not enabled, `firstScissor` must be `0`

- VUID-vkCmdSetScissor-scissorCount-00594
  If the `multiViewport` feature is not enabled, `scissorCount` must be `1`

- VUID-vkCmdSetScissor-x-00595
  The `x` and `y` members of `offset` member of any element of `pScissors` must be greater than or equal to `0`

- VUID-vkCmdSetScissor-offset-00596
  Evaluation of (`offset.x` + `extent.width`) must not cause a signed integer addition overflow for any element of `pScissors`

- VUID-vkCmdSetScissor-offset-00597
  Evaluation of (`offset.y` + `extent.height`) must not cause a signed integer addition overflow for any element of `pScissors`

- VUID-vkCmdSetScissor-viewportScissor2D-04789
  If this command is recorded in a secondary command buffer with VkCommandBufferInheritanceViewportScissorInfoNV::`viewportScissor2D` enabled, then this function must not be called

Valid Usage (Implicit)

- VUID-vkCmdSetScissor-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetScissor-pScissors-parameter
  `pScissors` must be a valid pointer to an array of `scissorCount` VkRect2D structures

- VUID-vkCmdSetScissor-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetScissor-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetScissor-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdSetScissor-scissorCount-arraylength
  `scissorCount` must be greater than `0`

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetScissor is not affected by conditional rendering

### 35.3. Exclusive Scissor Test

The exclusive scissor test compares the framebuffer coordinates (xf,yf) of each sample covered by a fragment against an exclusive scissor rectangle at the index equal to the fragment’s `ViewportIndex`.

Each exclusive scissor rectangle is defined by a VkRect2D. These values are either set by the VkPipelineViewportExclusiveScissorStateCreateInfoNV structure during pipeline creation, or dynamically by the vkCmdSetExclusiveScissorNV command.

A given sample is considered inside an exclusive scissor rectangle if xf is in the range [VkRect2D::`offset.x`, VkRect2D::`offset.x` + VkRect2D::`extent.x`), and yf is in the range [VkRect2D::`offset.y`, VkRect2D::`offset.y` + VkRect2D::`extent.y`). Samples with coordinates inside the exclusive scissor rectangle at the corresponding `ViewportIndex` will have their coverage set to `0`.

If no exclusive scissor rectangles are specified, the coverage mask is unmodified by this operation.

The `VkPipelineViewportExclusiveScissorStateCreateInfoNV` structure is defined as:

    // Provided by VK_NV_scissor_exclusive
    typedef struct VkPipelineViewportExclusiveScissorStateCreateInfoNV {
        VkStructureType    sType;
        const void*        pNext;
        uint32_t           exclusiveScissorCount;
        const VkRect2D*    pExclusiveScissors;
    } VkPipelineViewportExclusiveScissorStateCreateInfoNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `exclusiveScissorCount` is the number of exclusive scissor rectangles.

- `pExclusiveScissors` is a pointer to an array of VkRect2D structures defining exclusive scissor rectangles.

If the VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_NV dynamic state is enabled for a pipeline, the `pExclusiveScissors` member is ignored.

When this structure is included in the `pNext` chain of VkGraphicsPipelineCreateInfo, it defines parameters of the exclusive scissor test. If this structure is not included in the `pNext` chain, it is equivalent to specifying this structure with an `exclusiveScissorCount` of `0`.

Valid Usage

- VUID-VkPipelineViewportExclusiveScissorStateCreateInfoNV-exclusiveScissorCount-02027
  If the `multiViewport` feature is not enabled, `exclusiveScissorCount` must be `0` or `1`

- VUID-VkPipelineViewportExclusiveScissorStateCreateInfoNV-exclusiveScissorCount-02028
  `exclusiveScissorCount` must be less than or equal to `VkPhysicalDeviceLimits`::`maxViewports`

- VUID-VkPipelineViewportExclusiveScissorStateCreateInfoNV-exclusiveScissorCount-02029
  `exclusiveScissorCount` must be `0` or greater than or equal to the `viewportCount` member of VkPipelineViewportStateCreateInfo

Valid Usage (Implicit)

- VUID-VkPipelineViewportExclusiveScissorStateCreateInfoNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_EXCLUSIVE_SCISSOR_STATE_CREATE_INFO_NV

Structure Chaining

Extends the structure

  - VkPipelineViewportStateCreateInfo

To dynamically set the exclusive scissor rectangles, call:

    // Provided by VK_NV_scissor_exclusive
    void vkCmdSetExclusiveScissorNV(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    firstExclusiveScissor,
        uint32_t                                    exclusiveScissorCount,
        const VkRect2D*                             pExclusiveScissors);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `firstExclusiveScissor` is the index of the first exclusive scissor rectangle whose state is updated by the command.

- `exclusiveScissorCount` is the number of exclusive scissor rectangles updated by the command.

- `pExclusiveScissors` is a pointer to an array of VkRect2D structures defining exclusive scissor rectangles.

The scissor rectangles taken from element i of `pExclusiveScissors` replace the current state for the scissor index `firstExclusiveScissor` + i, for i in [0, `exclusiveScissorCount`).

This command sets the exclusive scissor rectangles for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_NV set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the VkPipelineViewportExclusiveScissorStateCreateInfoNV::`pExclusiveScissors` values used to create the currently active pipeline.

Valid Usage

- VUID-vkCmdSetExclusiveScissorNV-None-02031
  The `exclusiveScissor` feature must be enabled

- VUID-vkCmdSetExclusiveScissorNV-firstExclusiveScissor-02034
  The sum of `firstExclusiveScissor` and `exclusiveScissorCount` must be between `1` and `VkPhysicalDeviceLimits`::`maxViewports`, inclusive

- VUID-vkCmdSetExclusiveScissorNV-firstExclusiveScissor-02035
  If the `multiViewport` feature is not enabled, `firstExclusiveScissor` must be `0`

- VUID-vkCmdSetExclusiveScissorNV-exclusiveScissorCount-02036
  If the `multiViewport` feature is not enabled, `exclusiveScissorCount` must be `1`

- VUID-vkCmdSetExclusiveScissorNV-x-02037
  The `x` and `y` members of `offset` in each member of `pExclusiveScissors` must be greater than or equal to `0`

- VUID-vkCmdSetExclusiveScissorNV-offset-02038
  Evaluation of (`offset.x` + `extent.width`) for each member of `pExclusiveScissors` must not cause a signed integer addition overflow

- VUID-vkCmdSetExclusiveScissorNV-offset-02039
  Evaluation of (`offset.y` + `extent.height`) for each member of `pExclusiveScissors` must not cause a signed integer addition overflow

Valid Usage (Implicit)

- VUID-vkCmdSetExclusiveScissorNV-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetExclusiveScissorNV-pExclusiveScissors-parameter
  `pExclusiveScissors` must be a valid pointer to an array of `exclusiveScissorCount` VkRect2D structures

- VUID-vkCmdSetExclusiveScissorNV-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetExclusiveScissorNV-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetExclusiveScissorNV-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdSetExclusiveScissorNV-exclusiveScissorCount-arraylength
  `exclusiveScissorCount` must be greater than `0`

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetExclusiveScissorNV is not affected by conditional rendering

To dynamically set whether an exclusive scissor is enabled or not, call:

    // Provided by VK_NV_scissor_exclusive
    void vkCmdSetExclusiveScissorEnableNV(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    firstExclusiveScissor,
        uint32_t                                    exclusiveScissorCount,
        const VkBool32*                             pExclusiveScissorEnables);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `firstExclusiveScissor` is the index of the first exclusive scissor rectangle whose state is updated by the command.

- `exclusiveScissorCount` is the number of exclusive scissor rectangles updated by the command.

- `pExclusiveScissorEnables` is a pointer to an array of VkBool32 values defining whether the exclusive scissor is enabled.

The exclusive scissor enables taken from element i of `pExclusiveScissorEnables` replace the current state for the scissor index `firstExclusiveScissor` + i, for i in [0, `exclusiveScissorCount`).

This command sets the exclusive scissor enable for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_ENABLE_NV set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is implied by the VkPipelineViewportExclusiveScissorStateCreateInfoNV::`exclusiveScissorCount` value used to create the currently active pipeline, where all `exclusiveScissorCount` exclusive scissors are implicitly enabled and the remainder up to `VkPhysicalDeviceLimits`::`maxViewports` are implicitly disabled.

Valid Usage

- VUID-vkCmdSetExclusiveScissorEnableNV-exclusiveScissor-07853
  The `exclusiveScissor` feature must be enabled, and the implementation must support at least `specVersion` `2` of the `VK_NV_scissor_exclusive` extension

Valid Usage (Implicit)

- VUID-vkCmdSetExclusiveScissorEnableNV-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetExclusiveScissorEnableNV-pExclusiveScissorEnables-parameter
  `pExclusiveScissorEnables` must be a valid pointer to an array of `exclusiveScissorCount` VkBool32 values

- VUID-vkCmdSetExclusiveScissorEnableNV-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetExclusiveScissorEnableNV-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetExclusiveScissorEnableNV-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdSetExclusiveScissorEnableNV-exclusiveScissorCount-arraylength
  `exclusiveScissorCount` must be greater than `0`

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetExclusiveScissorEnableNV is not affected by conditional rendering

### 35.4. Sample Mask Test

The sample mask test compares the coverage mask for a fragment with the sample mask defined by VkPipelineMultisampleStateCreateInfo::`pSampleMask`.

To dynamically set the sample mask, call:

    // Provided by VK_EXT_extended_dynamic_state3, VK_EXT_shader_object
    void vkCmdSetSampleMaskEXT(
        VkCommandBuffer                             commandBuffer,
        VkSampleCountFlagBits                       samples,
        const VkSampleMask*                         pSampleMask);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `samples` specifies the number of sample bits in the `pSampleMask`.

- `pSampleMask` is a pointer to an array of VkSampleMask values, where the array size is based on the `samples` parameter. If the `maintenance10` feature is enabled, and this parameter is set to `NULL`, it is treated as if the mask has all bits set to `1`.

This command sets the sample mask for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_SAMPLE_MASK_EXT set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the VkPipelineMultisampleStateCreateInfo::`pSampleMask` value used to create the currently active pipeline.

Valid Usage

- VUID-vkCmdSetSampleMaskEXT-None-09423
  At least one of the following must be true:

  - The `extendedDynamicState3SampleMask` feature is enabled

  - The `shaderObject` feature is enabled

- VUID-vkCmdSetSampleMaskEXT-pSampleMask-10999
  `pSampleMask` must not be `NULL` if the `maintenance10` feature is not enabled

Valid Usage (Implicit)

- VUID-vkCmdSetSampleMaskEXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetSampleMaskEXT-samples-parameter
  `samples` must be a valid VkSampleCountFlagBits value

- VUID-vkCmdSetSampleMaskEXT-pSampleMask-parameter
  If `pSampleMask` is not `NULL`, `pSampleMask` must be a valid pointer to an array of ⌈32 samples​⌉ VkSampleMask values

- VUID-vkCmdSetSampleMaskEXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetSampleMaskEXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetSampleMaskEXT-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetSampleMaskEXT is not affected by conditional rendering

Each bit of the coverage mask is associated with a sample index as described in the rasterization chapter. If the bit in VkPipelineMultisampleStateCreateInfo::`pSampleMask` which is associated with that same sample index is set to `0`, the coverage mask bit is set to `0`.

### 35.5. Fragment Shading

Fragment shaders are invoked for each fragment, or as helper invocations.

Most operations in the fragment shader are not performed in rasterization order, with exceptions called out in the following sections.

For fragment shaders invoked by fragments, the following rules apply:

- A fragment shader must not be executed if a fragment operation that executes before fragment shading discards the fragment.

- A fragment shader may not be executed if:

  - An implementation determines that another fragment shader, invoked by a subsequent primitive in primitive order, overwrites all results computed by the shader (including writes to storage resources).

  - Any other fragment operation discards the fragment, and the shader does not write to any storage resources.

  - If a fragment shader statically computes the same values for different framebuffer locations, and does not write to any storage resources, multiple fragments may be shaded by one fragment shader invocation. This may affect VK_QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT results, but must otherwise not be visible behavior to applications.

- Otherwise, at least one fragment shader must be executed.

  - If sample shading is enabled and multiple invocations per fragment are required, additional invocations must be executed as specified.

  - If a shading rate image is used and multiple invocations per fragment are required, additional invocations must be executed as specified.

  - Each covered sample must be included in at least one fragment shader invocation.

If no fragment shader is included in the pipeline, no fragment shader is executed, and undefined values may be written to all color attachment outputs during this fragment operation.

Note | Multiple fragment shader invocations may be executed for the same fragment for any number of implementation-dependent reasons. When there is more than one fragment shader invocation per fragment, the association of samples to invocations is implementation-dependent. Stores and atomics performed by these additional invocations have the normal effect. For example, if the subpass includes multiple views in its view mask, a fragment shader may be invoked separately for each view. Similarly, if the render pass has a fragment density map attachment, more than one fragment shader invocation may be invoked for each covered sample. Such additional invocations are only produced if `VkPhysicalDeviceFragmentDensityMapPropertiesEXT`::`fragmentDensityInvocations` is VK_TRUE. Implementations may generate these additional fragment shader invocations in order to make transitions between fragment areas with different fragment densities more smooth.

#### 35.5.1. Sample Mask

Reading from the `SampleMask` built-in in the `Input` storage class will return the coverage mask for the current fragment as calculated by fragment operations that executed prior to fragment shading.

If sample shading is enabled, fragment shaders will only see values of `1` for samples being shaded - other bits will be `0`.

Each bit of the coverage mask is associated with a sample index as described in the rasterization chapter. If the bit in `SampleMask` which is associated with that same sample index is set to `0`, that coverage mask bit is set to `0`.

Values written to the `SampleMask` built-in in the `Output` storage class will be used by the multisample coverage operation, with the same encoding as the input built-in.

#### 35.5.2. Shader Termination and Demotion

If a fragment shader is terminated early or demoted to a helper invocation by using `OpKill`, `OpTerminateInvocation`, or `OpDemoteToHelperInvocation`, samples covered by that shader invocation have their coverage mask bits set to `0`.

#### 35.5.3. Fragment Shader Tile Image Reads

If the `VK_EXT_shader_tile_image` extension is enabled, implementations divide the framebuffer into a grid of tiles. A tile image is a view of a framebuffer attachment tile for fragments with locations within the tile.

Within a render pass instance initiated by vkCmdBeginRenderingKHR, fragment shader invocations can read the framebuffer color, depth, and stencil values at the fragment location via tile images.

Note | Even though fragment shader invocation can only read from the corresponding fragment location, the abstraction of a tile image is introduced for the following reasons: Tile dimensions will be exposed in a future extension Future functionality such as executing compute dispatches within render passes via tile shaders can leverage tile images.

Enabling shaderTileImageColorReadAccess, shaderTileImageDepthReadAccess, shaderTileImageStencilReadAccess enables fragment shader invocations to read from color, depth, and stencil, respectively.

Color values are read from tile image variables with `OpColorAttachmentReadEXT`. Tile image variables are linked to specific color attachments using `Location` decoration. See Fragment Tile Image Interface for more details.

Depth values are read with `OpDepthAttachmentReadEXT`.

Stencil values are read with `OpStencilAttachmentReadEXT`.

The sample to read is specified by a sample index value specified as the `Sample` operand to `OpColorAttachmentReadEXT`, `OpDepthAttachmentReadEXT`, or `OpStencilAttachmentReadEXT`.

If sample shading is disabled, a fragment invocation can read from all sample locations associated with the fragment regardless of the fragment’s coverage. This functionality is supported for VkPipelineMultisampleStateCreateInfo::`rasterizationSamples` > 1 when VkPhysicalDeviceShaderTileImagePropertiesEXT::`shaderTileImageReadSampleFromPixelRateInvocation` is VK_TRUE.

If sample shading is enabled, and `minSampleShading` is 1.0, a fragment invocation must only read from the coverage index sample. Tile image access must not be used if the value of `minSampleShading` is not 1.0.

If the fragment shader declares the `EarlyFragmentTests` execution mode, depth reads are allowed only if depth writes are disabled and stencil reads are allowed only if stencil writes are disabled.

If VkPhysicalDeviceShaderTileImagePropertiesEXT::`shaderTileImageReadFromHelperInvocation` is VK_FALSE, values read from helper invocations are poison, otherwise the values read are subject to the coherency guarantees described below.

`OpDepthAttachmentReadEXT` returns a poison value if no depth attachment is present. `OpStencilAttachmentReadEXT` returns a poison value if no stencil attachment is present.

Tile image reads from color, depth, and stencil attachments are said to be coherent when the accesses happen in raster order and without data race with respect to accesses to the attachments from framebuffer-space pipeline stages. The samples which qualify for coherent access and the enabling conditions are described below.

- Let Rc be the set of components being read from an attachment A in a draw call

- Let Wc be the set of components being written to A by the draw call

The samples which qualify for coherent tile image reads from an attachment A are:

- All samples in a pixel when Rc is disjoint with Wc.

- The samples with coverage in a fragment when Rc is not disjoint with Wc. The samples with coverage are determined by the coverage mask for the fragment as calculated by fragment operations that executed prior to fragment shading, including early fragment tests if enabled for the draw call.

A fragment shader can declare `NonCoherentColorAttachmentReadEXT`, `NonCoherentDepthAttachmentReadEXT`, or `NonCoherentStencilAttachmentReadEXT` execution modes to enable non-coherent tile image reads which require an explicit vkCmdPipelineBarrier2 call for the writes to an attachment to be made visible via tile image reads.

When VkPhysicalDeviceShaderTileImagePropertiesEXT::`shaderTileImageCoherentReadAccelerated` is VK_TRUE, the implementation prefers that coherent tile image reads are used, otherwise the implementation prefers that non-coherent tile image reads are used.

Note | In practice, the most common tile image reads usage patterns fall under one of the following: Programmable blending - each fragment reads from a single sample (SampleID) at its location. Per-sample shading is typically enabled when multisampled rendertargets are used. G-buffer generation and shading in one render pass - in the shading phase a fragment reads from a single sample at its location. Programmable resolve - a fragment reads from all samples at its location (per-sample shading is disabled). This requires the use of a “full-screen triangle” instead of a rectangle composed of two triangles in order to avoid data races along the shared edge of the triangles. 1:1 texturing with LOD - in use cases such a deferred screen space decals a fragment reads a single sample (SampleID) from depth buffer, but requires being able to read from helper threads to derive the texture LOD. This use case is supported as long as the attachment components being read are not overwritten by color, depth, or stencil attachment writes. All of the above use cases are supported by coherent tile image reads, but only the latter three are supported when non-coherent reads are used as there is no mechanism to synchronize non-coherent reads with writes within a draw call.

#### 35.5.4. Depth Replacement

Writing to the `FragDepth` built-in will replace the fragment’s calculated depth values for each sample in the input `SampleMask`. Depth testing performed after the fragment shader for this fragment will use this new value as zf.

#### 35.5.5. Stencil Reference Replacement

Writing to the `FragStencilRefEXT` built-in will replace the fragment’s stencil reference value for each sample in the input `SampleMask`. Stencil testing performed after the fragment shader for this fragment will use this new value as sr.

#### 35.5.6. Interlocked Operations

`OpBeginInvocationInterlockEXT` and `OpEndInvocationInterlockEXT` define a section of a fragment shader which imposes additional ordering constraints on operations performed within them. These operations are defined as interlocked operations. How interlocked operations are ordered against other fragment shader invocations depends on the specified execution modes.

If the `ShadingRateInterlockOrderedEXT` execution mode is specified, any interlocked operations in a fragment shader must happen before interlocked operations in fragment shader invocations that execute later in rasterization order and cover at least one sample in the same fragment area, and must happen after interlocked operations in a fragment shader that executes earlier in rasterization order and cover at least one sample in the same fragment area.

If the `ShadingRateInterlockUnorderedEXT` execution mode is specified, any interlocked operations in a fragment shader must happen before or after interlocked operations in fragment shader invocations that execute earlier or later in rasterization order and cover at least one sample in the same fragment area.

If the `PixelInterlockOrderedEXT` execution mode is specified, any interlocked operations in a fragment shader must happen before interlocked operations in fragment shader invocations that execute later in rasterization order and cover at least one sample in the same pixel, and must happen after interlocked operations in a fragment shader that executes earlier in rasterization order and cover at least one sample in the same pixel.

If the `PixelInterlockUnorderedEXT` execution mode is specified, any interlocked operations in a fragment shader must happen before or after interlocked operations in fragment shader invocations that execute earlier or later in rasterization order and cover at least one sample in the same pixel.

If the `SampleInterlockOrderedEXT` execution mode is specified, any interlocked operations in a fragment shader must happen before interlocked operations in fragment shader invocations that execute later in rasterization order and cover at least one of the same samples, and must happen after interlocked operations in a fragment shader that executes earlier in rasterization order and cover at least one of the same samples.

If the `SampleInterlockUnorderedEXT` execution mode is specified, any interlocked operations in a fragment shader must happen before or after interlocked operations in fragment shader invocations that execute earlier or later in rasterization order and cover at least one of the same samples.

### 35.6. Multisample Coverage

If a fragment shader is active and its entry point’s interface includes a built-in output variable decorated with `SampleMask`, but not `OverrideCoverageNV`, the coverage mask is `ANDed` with the bits of the `SampleMask` built-in to generate a new coverage mask. If the `SampleMask` built-in is also decorated with `OverrideCoverageNV`, the coverage mask is replaced with the mask bits set in the shader. If sample shading is enabled, bits written to `SampleMask` corresponding to samples that are not being shaded by the fragment shader invocation are ignored. If no fragment shader is active, or if the active fragment shader does not include `SampleMask` in its interface, the coverage mask is not modified.

Next, the fragment alpha value and coverage mask are modified based on the line coverage factor if the `lineRasterizationMode` member of the VkPipelineRasterizationStateCreateInfo structure is VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH, and the `alphaToCoverageEnable` and `alphaToOneEnable` members of the VkPipelineMultisampleStateCreateInfo structure.

To dynamically set the `alphaToCoverageEnable` state, call:

    // Provided by VK_EXT_extended_dynamic_state3, VK_EXT_shader_object
    void vkCmdSetAlphaToCoverageEnableEXT(
        VkCommandBuffer                             commandBuffer,
        VkBool32                                    alphaToCoverageEnable);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `alphaToCoverageEnable` specifies the `alphaToCoverageEnable` state.

This command sets the `alphaToCoverageEnable` state for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the VkPipelineMultisampleStateCreateInfo::`alphaToCoverageEnable` value used to create the currently active pipeline.

Valid Usage

- VUID-vkCmdSetAlphaToCoverageEnableEXT-None-09423
  At least one of the following must be true:

  - The `extendedDynamicState3AlphaToCoverageEnable` feature is enabled

  - The `shaderObject` feature is enabled

Valid Usage (Implicit)

- VUID-vkCmdSetAlphaToCoverageEnableEXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetAlphaToCoverageEnableEXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetAlphaToCoverageEnableEXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetAlphaToCoverageEnableEXT-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetAlphaToCoverageEnableEXT is not affected by conditional rendering

To dynamically set the `alphaToOneEnable` state, call:

    // Provided by VK_EXT_extended_dynamic_state3, VK_EXT_shader_object
    void vkCmdSetAlphaToOneEnableEXT(
        VkCommandBuffer                             commandBuffer,
        VkBool32                                    alphaToOneEnable);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `alphaToOneEnable` specifies the `alphaToOneEnable` state.

This command sets the `alphaToOneEnable` state for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_ALPHA_TO_ONE_ENABLE_EXT set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the VkPipelineMultisampleStateCreateInfo::`alphaToOneEnable` value used to create the currently active pipeline.

Valid Usage

- VUID-vkCmdSetAlphaToOneEnableEXT-None-09423
  At least one of the following must be true:

  - The `extendedDynamicState3AlphaToOneEnable` feature is enabled

  - The `shaderObject` feature is enabled

- VUID-vkCmdSetAlphaToOneEnableEXT-alphaToOne-07607
  If the `alphaToOne` feature is not enabled, `alphaToOneEnable` must be VK_FALSE

Valid Usage (Implicit)

- VUID-vkCmdSetAlphaToOneEnableEXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetAlphaToOneEnableEXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetAlphaToOneEnableEXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetAlphaToOneEnableEXT-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetAlphaToOneEnableEXT is not affected by conditional rendering

All alpha values in this section refer only to the alpha component of the fragment shader output that has a `Location` and `Index` decoration of zero (see the Fragment Output Interface section). If that shader output has an integer or unsigned integer type, then these operations are skipped.

If the `lineRasterizationMode` member of the VkPipelineRasterizationStateCreateInfo structure is VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH and the fragment came from a line segment, then the alpha value is replaced by multiplying it by the coverage factor for the fragment computed during smooth line rasterization.

If `alphaToCoverageEnable` is enabled, a temporary coverage mask is generated where each bit is determined by the fragment’s alpha value, which is ANDed with the fragment coverage mask.

No specific algorithm is specified for converting the alpha value to a temporary coverage mask. It is intended that the number of 1’s in this value be proportional to the alpha value (clamped to [0,1]), with all 1’s corresponding to a value of 1.0 and all 0’s corresponding to 0.0. The algorithm may be different at different framebuffer coordinates.

Note | Using different algorithms at different framebuffer coordinates may help to avoid artifacts caused by regular coverage sample locations.

Finally, if `alphaToOneEnable` is enabled, each alpha value is replaced by the maximum representable alpha value for fixed-point color attachments, or by 1.0 for floating-point attachments. Otherwise, the alpha values are not changed.

### 35.7. Depth and Stencil Operations

Pipeline state controlling the depth bounds tests, stencil test, and depth test is specified through the members of the `VkPipelineDepthStencilStateCreateInfo` structure.

The `VkPipelineDepthStencilStateCreateInfo` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkPipelineDepthStencilStateCreateInfo {
        VkStructureType                           sType;
        const void*                               pNext;
        VkPipelineDepthStencilStateCreateFlags    flags;
        VkBool32                                  depthTestEnable;
        VkBool32                                  depthWriteEnable;
        VkCompareOp                               depthCompareOp;
        VkBool32                                  depthBoundsTestEnable;
        VkBool32                                  stencilTestEnable;
        VkStencilOpState                          front;
        VkStencilOpState                          back;
        float                                     minDepthBounds;
        float                                     maxDepthBounds;
    } VkPipelineDepthStencilStateCreateInfo;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask of VkPipelineDepthStencilStateCreateFlagBits specifying additional depth/stencil state information.

- `depthTestEnable` controls whether depth testing is enabled.

- `depthWriteEnable` controls whether depth writes are enabled when `depthTestEnable` is VK_TRUE. Depth writes are always disabled when `depthTestEnable` is VK_FALSE.

- `depthCompareOp` is a VkCompareOp value specifying the comparison operator to use in the Depth Comparison step of the depth test.

- `depthBoundsTestEnable` controls whether depth bounds testing is enabled.

- `stencilTestEnable` controls whether stencil testing is enabled.

- `front` and `back` are VkStencilOpState values controlling the corresponding parameters of the stencil test.

- `minDepthBounds` is the minimum depth bound used in the depth bounds test.

- `maxDepthBounds` is the maximum depth bound used in the depth bounds test.

Valid Usage

- VUID-VkPipelineDepthStencilStateCreateInfo-depthBoundsTestEnable-00598
  If the `depthBounds` feature is not enabled, `depthBoundsTestEnable` must be VK_FALSE

- VUID-VkPipelineDepthStencilStateCreateInfo-separateStencilMaskRef-04453
  If the `VK_KHR_portability_subset` extension is enabled, and VkPhysicalDevicePortabilitySubsetFeaturesKHR::`separateStencilMaskRef` is VK_FALSE, and the value of VkPipelineDepthStencilStateCreateInfo::`stencilTestEnable` is VK_TRUE, and the value of VkPipelineRasterizationStateCreateInfo::`cullMode` is VK_CULL_MODE_NONE, the value of `reference` in each of the VkStencilOpState structs in `front` and `back` must be the same

- VUID-VkPipelineDepthStencilStateCreateInfo-rasterizationOrderDepthAttachmentAccess-06463
  If the `rasterizationOrderDepthAttachmentAccess` feature is not enabled, `flags` must not include VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_EXT

- VUID-VkPipelineDepthStencilStateCreateInfo-rasterizationOrderStencilAttachmentAccess-06464
  If the `rasterizationOrderStencilAttachmentAccess` feature is not enabled, `flags` must not include VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_EXT

Valid Usage (Implicit)

- VUID-VkPipelineDepthStencilStateCreateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO

- VUID-VkPipelineDepthStencilStateCreateInfo-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkPipelineDepthStencilStateCreateInfo-flags-parameter
  `flags` must be a valid combination of VkPipelineDepthStencilStateCreateFlagBits values

- VUID-VkPipelineDepthStencilStateCreateInfo-depthCompareOp-parameter
  `depthCompareOp` must be a valid VkCompareOp value

- VUID-VkPipelineDepthStencilStateCreateInfo-front-parameter
  `front` must be a valid VkStencilOpState structure

- VUID-VkPipelineDepthStencilStateCreateInfo-back-parameter
  `back` must be a valid VkStencilOpState structure

    // Provided by VK_VERSION_1_0
    typedef VkFlags VkPipelineDepthStencilStateCreateFlags;

`VkPipelineDepthStencilStateCreateFlags` is a bitmask type for setting a mask of zero or more VkPipelineDepthStencilStateCreateFlagBits.

Bits which can be set in the VkPipelineDepthStencilStateCreateInfo::`flags` parameter are:

    // Provided by VK_VERSION_1_0, VK_EXT_rasterization_order_attachment_access
    typedef enum VkPipelineDepthStencilStateCreateFlagBits {
      // Provided by VK_EXT_rasterization_order_attachment_access
        VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_EXT = 0x00000001,
      // Provided by VK_EXT_rasterization_order_attachment_access
        VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_EXT = 0x00000002,
      // Provided by VK_ARM_rasterization_order_attachment_access
        VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_ARM = VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_EXT,
      // Provided by VK_ARM_rasterization_order_attachment_access
        VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_ARM = VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_EXT,
    } VkPipelineDepthStencilStateCreateFlagBits;

- VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_EXT specifies that access to the depth aspects of depth/stencil and input attachments will have implicit framebuffer-local memory dependencies.

- VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_EXT specifies that access to the stencil aspects of depth/stencil and input attachments will have implicit framebuffer-local memory dependencies.

When VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_EXT is included in a pipeline, it forms a framebuffer-local memory dependency for each fragment generated by draw commands for that pipeline with the following scopes:

- The first synchronization scope includes VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT and VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT pipeline stages executed by all previous fragments (as defined by primitive order) in the corresponding framebuffer regions including those generated by the same draw command.

- The second synchronization scope includes VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT stage executed by the generated fragment.

- The first access scope includes all writes to the depth aspect of depth/stencil attachments.

- The second access scope includes all reads from the depth aspect of input attachments.

When VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_EXT is included in a pipeline, it forms a framebuffer-local memory dependency for each fragment generated by draw commands for that pipeline with the following scopes:

- The first synchronization scope includes VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT pipeline stages executed by all previous fragments (as defined by primitive order) in the corresponding framebuffer regions including those generated by the same draw command.

- The second synchronization scope includes VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT and VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT pipeline stages executed by the generated fragment.

- The first access scope includes all writes to the stencil aspect of depth/stencil attachments.

- The second access scope includes all reads from the stencil aspect of input attachments.

### 35.8. Depth Bounds Test

The depth bounds test compares the depth value za in the depth/stencil attachment at each sample’s framebuffer coordinates (xf,yf) and sample index i against a set of depth bounds.

The depth bounds are determined by two floating-point values defining a minimum (`minDepthBounds`) and maximum (`maxDepthBounds`) depth value. These values are either set by the VkPipelineDepthStencilStateCreateInfo structure during pipeline creation, or dynamically by vkCmdSetDepthBoundsTestEnable and vkCmdSetDepthBounds.

A given sample is considered within the depth bounds if za is in the range [`minDepthBounds`,`maxDepthBounds`]. Samples with depth attachment values outside of the depth bounds will have their coverage set to `0`.

If the depth bounds test is disabled, or if there is no depth attachment, the coverage mask is unmodified by this operation.

To dynamically enable or disable the depth bounds test, call:

    // Provided by VK_VERSION_1_3
    void vkCmdSetDepthBoundsTestEnable(
        VkCommandBuffer                             commandBuffer,
        VkBool32                                    depthBoundsTestEnable);

    // Provided by VK_EXT_extended_dynamic_state, VK_EXT_shader_object
    // Equivalent to vkCmdSetDepthBoundsTestEnable
    void vkCmdSetDepthBoundsTestEnableEXT(
        VkCommandBuffer                             commandBuffer,
        VkBool32                                    depthBoundsTestEnable);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `depthBoundsTestEnable` specifies if the depth bounds test is enabled.

This command sets the depth bounds enable for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the VkPipelineDepthStencilStateCreateInfo::`depthBoundsTestEnable` value used to create the currently active pipeline.

Valid Usage

- VUID-vkCmdSetDepthBoundsTestEnable-None-08971
  At least one of the following must be true:

  - the `extendedDynamicState` feature is enabled

  - the `shaderObject` feature is enabled

  - the value of VkApplicationInfo::`apiVersion` used to create the VkInstance parent of `commandBuffer` is greater than or equal to Version 1.3

- VUID-vkCmdSetDepthBoundsTestEnable-depthBounds-10010
  If the `depthBounds` feature is not enabled, `depthBoundsTestEnable` must be VK_FALSE

Valid Usage (Implicit)

- VUID-vkCmdSetDepthBoundsTestEnable-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetDepthBoundsTestEnable-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetDepthBoundsTestEnable-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetDepthBoundsTestEnable-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetDepthBoundsTestEnable is not affected by conditional rendering

To dynamically set the depth bounds range, call:

    // Provided by VK_VERSION_1_0
    void vkCmdSetDepthBounds(
        VkCommandBuffer                             commandBuffer,
        float                                       minDepthBounds,
        float                                       maxDepthBounds);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `minDepthBounds` is the minimum depth bound.

- `maxDepthBounds` is the maximum depth bound.

This command sets the depth bounds range for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_DEPTH_BOUNDS set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the VkPipelineDepthStencilStateCreateInfo::`minDepthBounds` and VkPipelineDepthStencilStateCreateInfo::`maxDepthBounds` values used to create the currently active pipeline.

Valid Usage

- VUID-vkCmdSetDepthBounds-minDepthBounds-00600
  If the `VK_EXT_depth_range_unrestricted` extension is not enabled `minDepthBounds` must be between `0.0` and `1.0`, inclusive

- VUID-vkCmdSetDepthBounds-maxDepthBounds-00601
  If the `VK_EXT_depth_range_unrestricted` extension is not enabled `maxDepthBounds` must be between `0.0` and `1.0`, inclusive

- VUID-vkCmdSetDepthBounds-minDepthBounds-10912
  `minDepthBounds` must be less than or equal to `maxDepthBounds`

Valid Usage (Implicit)

- VUID-vkCmdSetDepthBounds-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetDepthBounds-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetDepthBounds-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetDepthBounds-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetDepthBounds is not affected by conditional rendering

### 35.9. Stencil Test

The stencil test compares the stencil attachment value sa in the depth/stencil attachment at each sample’s framebuffer coordinates (xf,yf) and sample index i against a stencil reference value.

If the render pass has a fragment density map attachment and the fragment covers multiple pixels, there is an implementation-dependent association of coverage samples to stencil attachment samples within the fragment. However, if all samples in the fragment are covered, and the stencil attachment value is updated as a result of this test, all stencil attachment samples will be updated.

If the stencil test is not enabled, as specified by vkCmdSetStencilTestEnable or VkPipelineDepthStencilStateCreateInfo::`stencilTestEnable`, or if there is no stencil attachment, the coverage mask is unmodified by this operation.

The stencil test is controlled by one of two sets of stencil-related state, the front stencil state and the back stencil state. Stencil tests and writes use the back stencil state when processing fragments generated by back-facing polygons, and the front stencil state when processing fragments generated by front-facing polygons or any other primitives.

The comparison operation performed is determined by the VkCompareOp value set by vkCmdSetStencilOp::`compareOp`, or by VkStencilOpState::`compareOp` during pipeline creation.

The compare mask sc and stencil reference value sr of the front or the back stencil state set determine arguments of the comparison operation. sc is set by the VkPipelineDepthStencilStateCreateInfo structure during pipeline creation, or by the vkCmdSetStencilCompareMask command. sr is set by VkPipelineDepthStencilStateCreateInfo or by vkCmdSetStencilReference.

sr and sa are each independently combined with sc using a bitwise `AND` operation to create masked reference and attachment values s'r and s'a. s'r and s'a are used as the reference and test values, respectively, in the operation specified by the VkCompareOp.

If the comparison evaluates to false, the coverage for the sample is set to `0`.

A new stencil value sg is generated according to a stencil operation defined by VkStencilOp parameters set by vkCmdSetStencilOp or VkPipelineDepthStencilStateCreateInfo. If the stencil test fails, `failOp` defines the stencil operation used. If the stencil test passes however, the stencil op used is based on the depth test - if it passes, VkPipelineDepthStencilStateCreateInfo::`passOp` is used, otherwise VkPipelineDepthStencilStateCreateInfo::`depthFailOp` is used.

The stencil attachment value sa is then updated with the generated stencil value sg according to the write mask sw defined by `writeMask` in VkPipelineDepthStencilStateCreateInfo::`front` and VkPipelineDepthStencilStateCreateInfo::`back` as:

  sa = (sa ∧ ¬sw) ∨ (sg ∧ sw)

To dynamically enable or disable the stencil test, call:

    // Provided by VK_VERSION_1_3
    void vkCmdSetStencilTestEnable(
        VkCommandBuffer                             commandBuffer,
        VkBool32                                    stencilTestEnable);

    // Provided by VK_EXT_extended_dynamic_state, VK_EXT_shader_object
    // Equivalent to vkCmdSetStencilTestEnable
    void vkCmdSetStencilTestEnableEXT(
        VkCommandBuffer                             commandBuffer,
        VkBool32                                    stencilTestEnable);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `stencilTestEnable` specifies if the stencil test is enabled.

This command sets the stencil test enable for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the VkPipelineDepthStencilStateCreateInfo::`stencilTestEnable` value used to create the currently active pipeline.

Valid Usage

- VUID-vkCmdSetStencilTestEnable-None-08971
  At least one of the following must be true:

  - the `extendedDynamicState` feature is enabled

  - the `shaderObject` feature is enabled

  - the value of VkApplicationInfo::`apiVersion` used to create the VkInstance parent of `commandBuffer` is greater than or equal to Version 1.3

Valid Usage (Implicit)

- VUID-vkCmdSetStencilTestEnable-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetStencilTestEnable-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetStencilTestEnable-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetStencilTestEnable-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetStencilTestEnable is not affected by conditional rendering

To dynamically set the stencil operation, call:

    // Provided by VK_VERSION_1_3
    void vkCmdSetStencilOp(
        VkCommandBuffer                             commandBuffer,
        VkStencilFaceFlags                          faceMask,
        VkStencilOp                                 failOp,
        VkStencilOp                                 passOp,
        VkStencilOp                                 depthFailOp,
        VkCompareOp                                 compareOp);

    // Provided by VK_EXT_extended_dynamic_state, VK_EXT_shader_object
    // Equivalent to vkCmdSetStencilOp
    void vkCmdSetStencilOpEXT(
        VkCommandBuffer                             commandBuffer,
        VkStencilFaceFlags                          faceMask,
        VkStencilOp                                 failOp,
        VkStencilOp                                 passOp,
        VkStencilOp                                 depthFailOp,
        VkCompareOp                                 compareOp);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `faceMask` is a bitmask of VkStencilFaceFlagBits specifying the set of stencil state for which to update the stencil operation.

- `failOp` is a VkStencilOp value specifying the action performed on samples that fail the stencil test.

- `passOp` is a VkStencilOp value specifying the action performed on samples that pass both the depth and stencil tests.

- `depthFailOp` is a VkStencilOp value specifying the action performed on samples that pass the stencil test and fail the depth test.

- `compareOp` is a VkCompareOp value specifying the comparison operator used in the stencil test.

This command sets the stencil operation for subsequent drawing commands when when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_STENCIL_OP set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the corresponding `VkPipelineDepthStencilStateCreateInfo`::`failOp`, `passOp`, `depthFailOp`, and `compareOp` values used to create the currently active pipeline, for both front and back faces.

Valid Usage

- VUID-vkCmdSetStencilOp-None-08971
  At least one of the following must be true:

  - the `extendedDynamicState` feature is enabled

  - the `shaderObject` feature is enabled

  - the value of VkApplicationInfo::`apiVersion` used to create the VkInstance parent of `commandBuffer` is greater than or equal to Version 1.3

Valid Usage (Implicit)

- VUID-vkCmdSetStencilOp-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetStencilOp-faceMask-parameter
  `faceMask` must be a valid combination of VkStencilFaceFlagBits values

- VUID-vkCmdSetStencilOp-faceMask-requiredbitmask
  `faceMask` must not be `0`

- VUID-vkCmdSetStencilOp-failOp-parameter
  `failOp` must be a valid VkStencilOp value

- VUID-vkCmdSetStencilOp-passOp-parameter
  `passOp` must be a valid VkStencilOp value

- VUID-vkCmdSetStencilOp-depthFailOp-parameter
  `depthFailOp` must be a valid VkStencilOp value

- VUID-vkCmdSetStencilOp-compareOp-parameter
  `compareOp` must be a valid VkCompareOp value

- VUID-vkCmdSetStencilOp-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetStencilOp-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetStencilOp-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetStencilOp is not affected by conditional rendering

The `VkStencilOpState` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkStencilOpState {
        VkStencilOp    failOp;
        VkStencilOp    passOp;
        VkStencilOp    depthFailOp;
        VkCompareOp    compareOp;
        uint32_t       compareMask;
        uint32_t       writeMask;
        uint32_t       reference;
    } VkStencilOpState;

- `failOp` is a VkStencilOp value specifying the action performed on samples that fail the stencil test.

- `passOp` is a VkStencilOp value specifying the action performed on samples that pass both the depth and stencil tests.

- `depthFailOp` is a VkStencilOp value specifying the action performed on samples that pass the stencil test and fail the depth test.

- `compareOp` is a VkCompareOp value specifying the comparison operator used in the stencil test.

- `compareMask` selects the bits of the unsigned integer stencil values participating in the stencil test.

- `writeMask` selects the bits of the unsigned integer stencil values updated by the stencil test in the stencil framebuffer attachment.

- `reference` is an integer stencil reference value that is used in the unsigned stencil comparison.

Valid Usage (Implicit)

- VUID-VkStencilOpState-failOp-parameter
  `failOp` must be a valid VkStencilOp value

- VUID-VkStencilOpState-passOp-parameter
  `passOp` must be a valid VkStencilOp value

- VUID-VkStencilOpState-depthFailOp-parameter
  `depthFailOp` must be a valid VkStencilOp value

- VUID-VkStencilOpState-compareOp-parameter
  `compareOp` must be a valid VkCompareOp value

To dynamically set the stencil compare mask, call:

    // Provided by VK_VERSION_1_0
    void vkCmdSetStencilCompareMask(
        VkCommandBuffer                             commandBuffer,
        VkStencilFaceFlags                          faceMask,
        uint32_t                                    compareMask);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `faceMask` is a bitmask of VkStencilFaceFlagBits specifying the set of stencil state for which to update the compare mask.

- `compareMask` is the new value to use as the stencil compare mask.

This command sets the stencil compare mask for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the VkStencilOpState::`compareMask` value used to create the currently active pipeline, for both front and back faces.

Valid Usage (Implicit)

- VUID-vkCmdSetStencilCompareMask-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetStencilCompareMask-faceMask-parameter
  `faceMask` must be a valid combination of VkStencilFaceFlagBits values

- VUID-vkCmdSetStencilCompareMask-faceMask-requiredbitmask
  `faceMask` must not be `0`

- VUID-vkCmdSetStencilCompareMask-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetStencilCompareMask-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetStencilCompareMask-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetStencilCompareMask is not affected by conditional rendering

VkStencilFaceFlagBits values are:

    // Provided by VK_VERSION_1_0
    typedef enum VkStencilFaceFlagBits {
        VK_STENCIL_FACE_FRONT_BIT = 0x00000001,
        VK_STENCIL_FACE_BACK_BIT = 0x00000002,
        VK_STENCIL_FACE_FRONT_AND_BACK = 0x00000003,
      // VK_STENCIL_FRONT_AND_BACK is a legacy alias
        VK_STENCIL_FRONT_AND_BACK = VK_STENCIL_FACE_FRONT_AND_BACK,
    } VkStencilFaceFlagBits;

- VK_STENCIL_FACE_FRONT_BIT specifies that only the front set of stencil state is updated.

- VK_STENCIL_FACE_BACK_BIT specifies that only the back set of stencil state is updated.

- VK_STENCIL_FACE_FRONT_AND_BACK is the combination of VK_STENCIL_FACE_FRONT_BIT and VK_STENCIL_FACE_BACK_BIT, and specifies that both sets of stencil state are updated.

    // Provided by VK_VERSION_1_0
    typedef VkFlags VkStencilFaceFlags;

`VkStencilFaceFlags` is a bitmask type for setting a mask of zero or more VkStencilFaceFlagBits.

To dynamically set the stencil write mask, call:

    // Provided by VK_VERSION_1_0
    void vkCmdSetStencilWriteMask(
        VkCommandBuffer                             commandBuffer,
        VkStencilFaceFlags                          faceMask,
        uint32_t                                    writeMask);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `faceMask` is a bitmask of VkStencilFaceFlagBits specifying the set of stencil state for which to update the write mask, as described above for vkCmdSetStencilCompareMask.

- `writeMask` is the new value to use as the stencil write mask.

This command sets the stencil write mask for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_STENCIL_WRITE_MASK set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the `writeMask` value used to create the currently active pipeline, for both VkPipelineDepthStencilStateCreateInfo::`front` and VkPipelineDepthStencilStateCreateInfo::`back` faces.

Valid Usage (Implicit)

- VUID-vkCmdSetStencilWriteMask-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetStencilWriteMask-faceMask-parameter
  `faceMask` must be a valid combination of VkStencilFaceFlagBits values

- VUID-vkCmdSetStencilWriteMask-faceMask-requiredbitmask
  `faceMask` must not be `0`

- VUID-vkCmdSetStencilWriteMask-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetStencilWriteMask-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetStencilWriteMask-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetStencilWriteMask is not affected by conditional rendering

To dynamically set the stencil reference value, call:

    // Provided by VK_VERSION_1_0
    void vkCmdSetStencilReference(
        VkCommandBuffer                             commandBuffer,
        VkStencilFaceFlags                          faceMask,
        uint32_t                                    reference);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `faceMask` is a bitmask of VkStencilFaceFlagBits specifying the set of stencil state for which to update the reference value, as described above for vkCmdSetStencilCompareMask.

- `reference` is the new value to use as the stencil reference value.

This command sets the stencil reference value for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_STENCIL_REFERENCE set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the VkPipelineDepthStencilStateCreateInfo::`reference` value used to create the currently active pipeline, for both front and back faces.

Valid Usage (Implicit)

- VUID-vkCmdSetStencilReference-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetStencilReference-faceMask-parameter
  `faceMask` must be a valid combination of VkStencilFaceFlagBits values

- VUID-vkCmdSetStencilReference-faceMask-requiredbitmask
  `faceMask` must not be `0`

- VUID-vkCmdSetStencilReference-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetStencilReference-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetStencilReference-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetStencilReference is not affected by conditional rendering

Possible values of the `failOp`, `passOp`, and `depthFailOp` members of VkStencilOpState, specifying what happens to the stored stencil value if this or certain subsequent tests fail or pass, are:

    // Provided by VK_VERSION_1_0
    typedef enum VkStencilOp {
        VK_STENCIL_OP_KEEP = 0,
        VK_STENCIL_OP_ZERO = 1,
        VK_STENCIL_OP_REPLACE = 2,
        VK_STENCIL_OP_INCREMENT_AND_CLAMP = 3,
        VK_STENCIL_OP_DECREMENT_AND_CLAMP = 4,
        VK_STENCIL_OP_INVERT = 5,
        VK_STENCIL_OP_INCREMENT_AND_WRAP = 6,
        VK_STENCIL_OP_DECREMENT_AND_WRAP = 7,
    } VkStencilOp;

- VK_STENCIL_OP_KEEP keeps the current value.

- VK_STENCIL_OP_ZERO sets the value to 0.

- VK_STENCIL_OP_REPLACE sets the value to `reference`.

- VK_STENCIL_OP_INCREMENT_AND_CLAMP increments the current value and clamps to the maximum representable unsigned value.

- VK_STENCIL_OP_DECREMENT_AND_CLAMP decrements the current value and clamps to 0.

- VK_STENCIL_OP_INVERT bitwise-inverts the current value.

- VK_STENCIL_OP_INCREMENT_AND_WRAP increments the current value and wraps to 0 when the maximum value would have been exceeded.

- VK_STENCIL_OP_DECREMENT_AND_WRAP decrements the current value and wraps to the maximum possible value when the value would go below 0.

For purposes of increment and decrement, the stencil bits are considered as an unsigned integer.

### 35.10. Depth Test

The depth test compares the depth value za in the depth/stencil attachment at each sample’s framebuffer coordinates (xf,yf) and sample index i against the sample’s depth value zf. If there is no depth attachment then the depth test is skipped.

If the render pass has a fragment density map attachment and the fragment covers multiple pixels, there is an implementation-dependent association of rasterization samples to depth attachment samples within the fragment. However, if all samples in the fragment are covered, and the depth attachment value is updated as a result of this test, all depth attachment samples will be updated.

The depth test occurs in three stages, as detailed in the following sections.

#### 35.10.1. Depth Clamping and Range Adjustment

If VkPipelineRasterizationStateCreateInfo::`depthClampEnable` is enabled, zf is clamped to [zmin, zmax], where zmin = min(n,f), zmax = max(n,f), and n and f are the `minDepth` and `maxDepth` depth range values of the viewport used by this fragment, respectively. If the `depthClampControl` feature is enabled and VkPipelineViewportDepthClampControlCreateInfoEXT::`depthClampMode` is VK_DEPTH_CLAMP_MODE_USER_DEFINED_RANGE_EXT, then zmin and zmax are equal to the `minDepthClamp` and `maxDepthClamp` values of the VkDepthClampRangeEXT structure pointed to by `pDepthClampRange`.

If VkPhysicalDeviceDepthClampZeroOneFeaturesKHR::`depthClampZeroOne` is enabled:

- If the depth attachment has a floating-point format and VK_EXT_depth_range_unrestricted is enabled then zf is unchanged.

- Otherwise, zf is clamped to the range [0, 1].

Otherwise:

- If zf is not in the range [zmin, zmax], then zf is undefined following this step.

- If the depth attachment has a fixed-point format and zf is not in the range [0, 1], then zf is undefined following this step.

The `VkPipelineViewportDepthClampControlCreateInfoEXT` structure is defined as:

    // Provided by VK_EXT_depth_clamp_control
    typedef struct VkPipelineViewportDepthClampControlCreateInfoEXT {
        VkStructureType                sType;
        const void*                    pNext;
        VkDepthClampModeEXT            depthClampMode;
        const VkDepthClampRangeEXT*    pDepthClampRange;
    } VkPipelineViewportDepthClampControlCreateInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `depthClampMode` determines how the clamp range is determined for each viewport.

- `pDepthClampRange` sets the depth clamp range for all viewports if `depthClampMode` is VK_DEPTH_CLAMP_MODE_USER_DEFINED_RANGE_EXT.

This structure extends `VkPipelineViewportStateCreateInfo` and specifies the depth clamp range used in the pipeline. If this structure is not provided in the next chain then `depthClampMode` defaults to VK_DEPTH_CLAMP_MODE_VIEWPORT_RANGE_EXT.

Valid Usage

- VUID-VkPipelineViewportDepthClampControlCreateInfoEXT-pDepthClampRange-09646
  If `depthClampMode` is VK_DEPTH_CLAMP_MODE_USER_DEFINED_RANGE_EXT, and the pipeline is not created with VK_DYNAMIC_STATE_DEPTH_CLAMP_RANGE_EXT, then `pDepthClampRange` must be a valid pointer to a valid `VkDepthClampRangeEXT` structure

Valid Usage (Implicit)

- VUID-VkPipelineViewportDepthClampControlCreateInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_DEPTH_CLAMP_CONTROL_CREATE_INFO_EXT

- VUID-VkPipelineViewportDepthClampControlCreateInfoEXT-depthClampMode-parameter
  `depthClampMode` must be a valid VkDepthClampModeEXT value

- VUID-VkPipelineViewportDepthClampControlCreateInfoEXT-pDepthClampRange-parameter
  If `pDepthClampRange` is not `NULL`, `pDepthClampRange` must be a valid pointer to a valid VkDepthClampRangeEXT structure

Structure Chaining

Extends the structure

  - VkPipelineViewportStateCreateInfo

Possible values of VkPipelineViewportDepthClampControlCreateInfoEXT::`depthClampMode`, specifying which range should be used for depth clamping, are:

    // Provided by VK_EXT_depth_clamp_control
    typedef enum VkDepthClampModeEXT {
        VK_DEPTH_CLAMP_MODE_VIEWPORT_RANGE_EXT = 0,
        VK_DEPTH_CLAMP_MODE_USER_DEFINED_RANGE_EXT = 1,
    } VkDepthClampModeEXT;

- VK_DEPTH_CLAMP_MODE_VIEWPORT_RANGE_EXT specifies that the depth clamp range follows the viewport depth range. The depth clamp range of each viewport will implicitly be set to zmin = min(n,f) and zmax = max(n,f), where n and f are the `minDepth` and `maxDepth` depth range values of the viewport.

- VK_DEPTH_CLAMP_MODE_USER_DEFINED_RANGE_EXT specifies that a single user-defined depth clamp range will be used for all viewports. The user-defined depth clamp range is defined by the `minDepthClamp` and `maxDepthClamp` members of VkDepthClampRangeEXT.

To dynamically set the viewport depth clamp range parameters, call:

    // Provided by VK_EXT_depth_clamp_control, VK_EXT_depth_clamp_control with VK_EXT_shader_object
    void vkCmdSetDepthClampRangeEXT(
        VkCommandBuffer                             commandBuffer,
        VkDepthClampModeEXT                         depthClampMode,
        const VkDepthClampRangeEXT*                 pDepthClampRange);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `depthClampMode` determines how the clamp range is determined for each viewport.

- `pDepthClampRange` sets the depth clamp range for all viewports if `depthClampMode` is VK_DEPTH_CLAMP_MODE_USER_DEFINED_RANGE_EXT.

This command sets the viewport depth clamp range for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_DEPTH_CLAMP_RANGE_EXT set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the VkPipelineViewportDepthClampControlCreateInfoEXT::`depthClampMode` value used to create the currently active pipeline.

Valid Usage

- VUID-vkCmdSetDepthClampRangeEXT-pDepthClampRange-09647
  If `depthClampMode` is VK_DEPTH_CLAMP_MODE_USER_DEFINED_RANGE_EXT, then `pDepthClampRange` must be a valid pointer to a valid `VkDepthClampRangeEXT` structure

Valid Usage (Implicit)

- VUID-vkCmdSetDepthClampRangeEXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetDepthClampRangeEXT-depthClampMode-parameter
  `depthClampMode` must be a valid VkDepthClampModeEXT value

- VUID-vkCmdSetDepthClampRangeEXT-pDepthClampRange-parameter
  If `pDepthClampRange` is not `NULL`, `pDepthClampRange` must be a valid pointer to a valid VkDepthClampRangeEXT structure

- VUID-vkCmdSetDepthClampRangeEXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetDepthClampRangeEXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetDepthClampRangeEXT-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetDepthClampRangeEXT is not affected by conditional rendering

Both VkPipelineViewportDepthClampControlCreateInfoEXT and vkCmdSetDepthClampRangeEXT use `VkDepthClampRangeEXT` to set the viewport depth clamp range parameters.

The `VkDepthClampRangeEXT` structure is defined as:

    // Provided by VK_EXT_depth_clamp_control
    typedef struct VkDepthClampRangeEXT {
        float    minDepthClamp;
        float    maxDepthClamp;
    } VkDepthClampRangeEXT;

- `minDepthClamp` sets zmin in the depth clamp range of the viewport.

- `maxDepthClamp` sets zmax in the depth clamp range of the viewport.

Valid Usage

- VUID-VkDepthClampRangeEXT-pDepthClampRange-00999
  `minDepthClamp` must be less than or equal to `maxDepthClamp`

- VUID-VkDepthClampRangeEXT-pDepthClampRange-09648
  If the `VK_EXT_depth_range_unrestricted` extension is not enabled, `minDepthClamp` must be greater than or equal to `0.0`

- VUID-VkDepthClampRangeEXT-pDepthClampRange-09649
  If the `VK_EXT_depth_range_unrestricted` extension is not enabled, `maxDepthClamp` must be less than or equal to `1.0`

#### 35.10.2. Depth Comparison

If the depth test is not enabled, as specified by vkCmdSetDepthTestEnable or VkPipelineDepthStencilStateCreateInfo::`depthTestEnable`, then this step is skipped.

The comparison operation performed is determined by the VkCompareOp value set by vkCmdSetDepthCompareOp, or by VkPipelineDepthStencilStateCreateInfo::`depthCompareOp` during pipeline creation. zf and za are used as the reference and test values, respectively, in the operation specified by the VkCompareOp.

If the comparison evaluates to false, the coverage for the sample is set to `0`.

#### 35.10.3. Depth Attachment Writes

If depth writes are enabled, as specified by vkCmdSetDepthWriteEnable or VkPipelineDepthStencilStateCreateInfo::`depthWriteEnable`, and the comparison evaluated to true, the depth attachment value za is set to the sample’s depth value zf. If there is no depth attachment, no value is written.

To dynamically enable or disable the depth test, call:

    // Provided by VK_VERSION_1_3
    void vkCmdSetDepthTestEnable(
        VkCommandBuffer                             commandBuffer,
        VkBool32                                    depthTestEnable);

    // Provided by VK_EXT_extended_dynamic_state, VK_EXT_shader_object
    // Equivalent to vkCmdSetDepthTestEnable
    void vkCmdSetDepthTestEnableEXT(
        VkCommandBuffer                             commandBuffer,
        VkBool32                                    depthTestEnable);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `depthTestEnable` specifies if the depth test is enabled.

This command sets the depth test enable for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the VkPipelineDepthStencilStateCreateInfo::`depthTestEnable` value used to create the currently active pipeline.

Valid Usage

- VUID-vkCmdSetDepthTestEnable-None-08971
  At least one of the following must be true:

  - the `extendedDynamicState` feature is enabled

  - the `shaderObject` feature is enabled

  - the value of VkApplicationInfo::`apiVersion` used to create the VkInstance parent of `commandBuffer` is greater than or equal to Version 1.3

Valid Usage (Implicit)

- VUID-vkCmdSetDepthTestEnable-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetDepthTestEnable-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetDepthTestEnable-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetDepthTestEnable-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetDepthTestEnable is not affected by conditional rendering

To dynamically set the depth compare operator, call:

    // Provided by VK_VERSION_1_3
    void vkCmdSetDepthCompareOp(
        VkCommandBuffer                             commandBuffer,
        VkCompareOp                                 depthCompareOp);

    // Provided by VK_EXT_extended_dynamic_state, VK_EXT_shader_object
    // Equivalent to vkCmdSetDepthCompareOp
    void vkCmdSetDepthCompareOpEXT(
        VkCommandBuffer                             commandBuffer,
        VkCompareOp                                 depthCompareOp);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `depthCompareOp` is a VkCompareOp value specifying the comparison operator used for the Depth Comparison step of the depth test.

This command sets the depth comparison operator for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_DEPTH_COMPARE_OP set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the VkPipelineDepthStencilStateCreateInfo::`depthCompareOp` value used to create the currently active pipeline.

Valid Usage

- VUID-vkCmdSetDepthCompareOp-None-08971
  At least one of the following must be true:

  - the `extendedDynamicState` feature is enabled

  - the `shaderObject` feature is enabled

  - the value of VkApplicationInfo::`apiVersion` used to create the VkInstance parent of `commandBuffer` is greater than or equal to Version 1.3

Valid Usage (Implicit)

- VUID-vkCmdSetDepthCompareOp-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetDepthCompareOp-depthCompareOp-parameter
  `depthCompareOp` must be a valid VkCompareOp value

- VUID-vkCmdSetDepthCompareOp-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetDepthCompareOp-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetDepthCompareOp-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetDepthCompareOp is not affected by conditional rendering

To dynamically set the depth write enable, call:

    // Provided by VK_VERSION_1_3
    void vkCmdSetDepthWriteEnable(
        VkCommandBuffer                             commandBuffer,
        VkBool32                                    depthWriteEnable);

    // Provided by VK_EXT_extended_dynamic_state, VK_EXT_shader_object
    // Equivalent to vkCmdSetDepthWriteEnable
    void vkCmdSetDepthWriteEnableEXT(
        VkCommandBuffer                             commandBuffer,
        VkBool32                                    depthWriteEnable);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `depthWriteEnable` specifies if depth writes are enabled.

This command sets the depth write enable for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the VkPipelineDepthStencilStateCreateInfo::`depthWriteEnable` value used to create the currently active pipeline.

Valid Usage

- VUID-vkCmdSetDepthWriteEnable-None-08971
  At least one of the following must be true:

  - the `extendedDynamicState` feature is enabled

  - the `shaderObject` feature is enabled

  - the value of VkApplicationInfo::`apiVersion` used to create the VkInstance parent of `commandBuffer` is greater than or equal to Version 1.3

Valid Usage (Implicit)

- VUID-vkCmdSetDepthWriteEnable-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetDepthWriteEnable-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetDepthWriteEnable-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetDepthWriteEnable-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetDepthWriteEnable is not affected by conditional rendering

### 35.11. Representative Fragment Test

The representative fragment test allows implementations to reduce the amount of rasterization and fragment processing work performed for each point, line, or triangle primitive. For any primitive that produces one or more fragments that pass all prior early fragment tests, the implementation may choose one or more “representative” fragments for processing and discard all other fragments. For draw calls rendering multiple points, lines, or triangles arranged in lists, strips, or fans, the representative fragment test is performed independently for each of those primitives. The set of fragments discarded by the representative fragment test is implementation-dependent. In some cases, the representative fragment test may not discard any fragments for a given primitive.

If the `pNext` chain of VkGraphicsPipelineCreateInfo includes a `VkPipelineRepresentativeFragmentTestStateCreateInfoNV` structure, then that structure includes parameters controlling the representative fragment test.

The `VkPipelineRepresentativeFragmentTestStateCreateInfoNV` structure is defined as:

    // Provided by VK_NV_representative_fragment_test
    typedef struct VkPipelineRepresentativeFragmentTestStateCreateInfoNV {
        VkStructureType    sType;
        const void*        pNext;
        VkBool32           representativeFragmentTestEnable;
    } VkPipelineRepresentativeFragmentTestStateCreateInfoNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `representativeFragmentTestEnable` controls whether the representative fragment test is enabled.

If this structure is not included in the `pNext` chain, `representativeFragmentTestEnable` is considered to be VK_FALSE, and the representative fragment test is disabled.

If the active fragment shader does not specify the `EarlyFragmentTests` execution mode, the representative fragment shader test has no effect, even if enabled.

Valid Usage (Implicit)

- VUID-VkPipelineRepresentativeFragmentTestStateCreateInfoNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PIPELINE_REPRESENTATIVE_FRAGMENT_TEST_STATE_CREATE_INFO_NV

Structure Chaining

Extends the structure

  - VkGraphicsPipelineCreateInfo

To dynamically set the `representativeFragmentTestEnable` state, call:

    // Provided by VK_EXT_extended_dynamic_state3 with VK_NV_representative_fragment_test, VK_EXT_shader_object with VK_NV_representative_fragment_test
    void vkCmdSetRepresentativeFragmentTestEnableNV(
        VkCommandBuffer                             commandBuffer,
        VkBool32                                    representativeFragmentTestEnable);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `representativeFragmentTestEnable` specifies the `representativeFragmentTestEnable` state.

This command sets the `representativeFragmentTestEnable` state for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_REPRESENTATIVE_FRAGMENT_TEST_ENABLE_NV set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the VkPipelineRepresentativeFragmentTestStateCreateInfoNV::`representativeFragmentTestEnable` value used to create the currently active pipeline.

Valid Usage

- VUID-vkCmdSetRepresentativeFragmentTestEnableNV-None-09423
  At least one of the following must be true:

  - The `extendedDynamicState3RepresentativeFragmentTestEnable` feature is enabled

  - The `shaderObject` feature is enabled

Valid Usage (Implicit)

- VUID-vkCmdSetRepresentativeFragmentTestEnableNV-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetRepresentativeFragmentTestEnableNV-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetRepresentativeFragmentTestEnableNV-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetRepresentativeFragmentTestEnableNV-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetRepresentativeFragmentTestEnableNV is not affected by conditional rendering

### 35.12. Sample Counting

Occlusion queries use query pool entries to track the number of samples that pass all the per-fragment tests. The mechanism of collecting an occlusion query value is described in Occlusion Queries.

The occlusion query sample counter increments by one for each sample with a coverage value of 1 in each fragment that survives all the per-fragment tests, including scissor, exclusive scissor, sample mask, alpha to coverage, stencil, and depth tests.

### 35.13. Fragment Coverage to Color

The `VkPipelineCoverageToColorStateCreateInfoNV` structure is defined as:

    // Provided by VK_NV_fragment_coverage_to_color
    typedef struct VkPipelineCoverageToColorStateCreateInfoNV {
        VkStructureType                                sType;
        const void*                                    pNext;
        VkPipelineCoverageToColorStateCreateFlagsNV    flags;
        VkBool32                                       coverageToColorEnable;
        uint32_t                                       coverageToColorLocation;
    } VkPipelineCoverageToColorStateCreateInfoNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is reserved for future use.

- `coverageToColorEnable` controls whether the fragment coverage value replaces a fragment color output.

- `coverageToColorLocation` controls which fragment shader color output value is replaced.

If the `pNext` chain of VkPipelineMultisampleStateCreateInfo includes a `VkPipelineCoverageToColorStateCreateInfoNV` structure, then that structure controls whether the fragment coverage is substituted for a fragment color output and, if so, which output is replaced.

If `coverageToColorEnable` is VK_TRUE, the coverage mask replaces the first component of the color value corresponding to the fragment shader output location with `Location` equal to `coverageToColorLocation` and `Index` equal to zero. If the color attachment format has fewer bits than the coverage mask, the low bits of the sample coverage mask are taken without any clamping. If the color attachment format has more bits than the coverage mask, the high bits of the sample coverage mask are filled with zeros.

If `coverageToColorEnable` is VK_FALSE, these operations are skipped. If this structure is not included in the `pNext` chain, it is as if `coverageToColorEnable` is VK_FALSE.

Valid Usage

- VUID-VkPipelineCoverageToColorStateCreateInfoNV-coverageToColorEnable-01404
  If `coverageToColorEnable` is VK_TRUE, then the render pass subpass indicated by VkGraphicsPipelineCreateInfo::`renderPass` and VkGraphicsPipelineCreateInfo::`subpass` must have a color attachment at the location selected by `coverageToColorLocation`, with a VkFormat of VK_FORMAT_R8_UINT, VK_FORMAT_R8_SINT, VK_FORMAT_R16_UINT, VK_FORMAT_R16_SINT, VK_FORMAT_R32_UINT, or VK_FORMAT_R32_SINT

Valid Usage (Implicit)

- VUID-VkPipelineCoverageToColorStateCreateInfoNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_TO_COLOR_STATE_CREATE_INFO_NV

- VUID-VkPipelineCoverageToColorStateCreateInfoNV-flags-zerobitmask
  `flags` must be `0`

Structure Chaining

Extends the structure

  - VkPipelineMultisampleStateCreateInfo

    // Provided by VK_NV_fragment_coverage_to_color
    typedef VkFlags VkPipelineCoverageToColorStateCreateFlagsNV;

`VkPipelineCoverageToColorStateCreateFlagsNV` is a bitmask type for setting a mask, but is currently reserved for future use.

To dynamically set the `coverageToColorEnable` state, call:

    // Provided by VK_EXT_extended_dynamic_state3 with VK_NV_fragment_coverage_to_color, VK_EXT_shader_object with VK_NV_fragment_coverage_to_color
    void vkCmdSetCoverageToColorEnableNV(
        VkCommandBuffer                             commandBuffer,
        VkBool32                                    coverageToColorEnable);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `coverageToColorEnable` specifies the `coverageToColorEnable` state.

This command sets the `coverageToColorEnable` state for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the VkPipelineCoverageToColorStateCreateInfoNV::`coverageToColorEnable` value used to create the currently active pipeline.

Valid Usage

- VUID-vkCmdSetCoverageToColorEnableNV-None-09423
  At least one of the following must be true:

  - The `extendedDynamicState3CoverageToColorEnable` feature is enabled

  - The `shaderObject` feature is enabled

Valid Usage (Implicit)

- VUID-vkCmdSetCoverageToColorEnableNV-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetCoverageToColorEnableNV-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetCoverageToColorEnableNV-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetCoverageToColorEnableNV-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetCoverageToColorEnableNV is not affected by conditional rendering

To dynamically set the `coverageToColorLocation` state, call:

    // Provided by VK_EXT_extended_dynamic_state3 with VK_NV_fragment_coverage_to_color, VK_EXT_shader_object with VK_NV_fragment_coverage_to_color
    void vkCmdSetCoverageToColorLocationNV(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    coverageToColorLocation);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `coverageToColorLocation` specifies the `coverageToColorLocation` state.

This command sets the `coverageToColorLocation` state for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_LOCATION_NV set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the VkPipelineCoverageToColorStateCreateInfoNV::`coverageToColorLocation` value used to create the currently active pipeline.

Valid Usage

- VUID-vkCmdSetCoverageToColorLocationNV-None-09423
  At least one of the following must be true:

  - The `extendedDynamicState3CoverageToColorLocation` feature is enabled

  - The `shaderObject` feature is enabled

Valid Usage (Implicit)

- VUID-vkCmdSetCoverageToColorLocationNV-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetCoverageToColorLocationNV-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetCoverageToColorLocationNV-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetCoverageToColorLocationNV-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetCoverageToColorLocationNV is not affected by conditional rendering

### 35.14. Coverage Reduction

Coverage reduction takes the coverage information for a fragment and converts that to a boolean coverage value for each color sample in each pixel covered by the fragment.

#### 35.14.1. Pixel Coverage

Coverage for each pixel is first extracted from the total fragment coverage mask. This consists of `rasterizationSamples` unique coverage samples for each pixel in the fragment area, each with a unique sample index. If the fragment only contains a single pixel, coverage for the pixel is equivalent to the fragment coverage.

If the render pass has a fragment density map attachment and the fragment covers multiple pixels, pixel coverage is generated in an implementation-dependent manner. If all samples in the fragment are covered, all samples will be covered in each pixel coverage.

If a shading rate image is used, and the fragment covers multiple pixels, each pixel’s coverage consists of the coverage samples corresponding to that pixel, and each sample retains its unique sample index i.

If the fragment shading rate is set, and the fragment covers multiple pixels, each pixel’s coverage consists of the coverage samples with a pixel index matching that pixel, and each sample retains its unique sample index i.

#### 35.14.2. Color Sample Coverage

Once pixel coverage is determined, coverage for each individual color sample corresponding to that pixel is determined.

If the number of `rasterizationSamples` is identical to the number of samples in the color attachments, a color sample is covered if the pixel coverage sample with the same sample index i is covered.

Otherwise, the coverage for each color sample is computed from the pixel coverage as follows.

If the `VK_AMD_mixed_attachment_samples` extension is enabled, for color samples present in the color attachments, a color sample is covered if the pixel coverage sample with the same sample index i is covered; additional pixel coverage samples are discarded.

If the `pNext` chain of VkSubpassDescription2 or VkRenderingInfo includes a VkMultisampledRenderToSingleSampledInfoEXT structure with the `multisampledRenderToSingleSampledEnable` field equal to VK_TRUE, sample coverage is calculated as if the attachment has VkMultisampledRenderToSingleSampledInfoEXT::`rasterizationSamples` samples.

When the `coverageReductionMode` feature is enabled, the pipeline state controlling coverage reduction is specified through the members of the `VkPipelineCoverageReductionStateCreateInfoNV` structure.

The `VkPipelineCoverageReductionStateCreateInfoNV` structure is defined as:

    // Provided by VK_NV_coverage_reduction_mode
    typedef struct VkPipelineCoverageReductionStateCreateInfoNV {
        VkStructureType                                  sType;
        const void*                                      pNext;
        VkPipelineCoverageReductionStateCreateFlagsNV    flags;
        VkCoverageReductionModeNV                        coverageReductionMode;
    } VkPipelineCoverageReductionStateCreateInfoNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is reserved for future use.

- `coverageReductionMode` is a VkCoverageReductionModeNV value controlling how color sample coverage is generated from pixel coverage.

If this structure is not included in the `pNext` chain, or if the extension is not enabled, the default coverage reduction mode is inferred as follows:

- If the `VK_NV_framebuffer_mixed_samples` extension is enabled, then it is as if the `coverageReductionMode` is VK_COVERAGE_REDUCTION_MODE_MERGE_NV.

- If the `VK_AMD_mixed_attachment_samples` extension is enabled, then it is as if the `coverageReductionMode` is VK_COVERAGE_REDUCTION_MODE_TRUNCATE_NV.

- If both `VK_NV_framebuffer_mixed_samples` and `VK_AMD_mixed_attachment_samples` are enabled, then the default coverage reduction mode is implementation-dependent.

Valid Usage (Implicit)

- VUID-VkPipelineCoverageReductionStateCreateInfoNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_REDUCTION_STATE_CREATE_INFO_NV

- VUID-VkPipelineCoverageReductionStateCreateInfoNV-flags-zerobitmask
  `flags` must be `0`

- VUID-VkPipelineCoverageReductionStateCreateInfoNV-coverageReductionMode-parameter
  `coverageReductionMode` must be a valid VkCoverageReductionModeNV value

Structure Chaining

Extends the structure

  - VkPipelineMultisampleStateCreateInfo

    // Provided by VK_NV_coverage_reduction_mode
    typedef VkFlags VkPipelineCoverageReductionStateCreateFlagsNV;

`VkPipelineCoverageReductionStateCreateFlagsNV` is a bitmask type for setting a mask, but is currently reserved for future use.

Possible values of VkPipelineCoverageReductionStateCreateInfoNV::`coverageReductionMode`, specifying how color sample coverage is generated from pixel coverage, are:

    // Provided by VK_NV_coverage_reduction_mode
    typedef enum VkCoverageReductionModeNV {
        VK_COVERAGE_REDUCTION_MODE_MERGE_NV = 0,
        VK_COVERAGE_REDUCTION_MODE_TRUNCATE_NV = 1,
    } VkCoverageReductionModeNV;

- VK_COVERAGE_REDUCTION_MODE_MERGE_NV specifies that each color sample will be associated with an implementation-dependent subset of samples in the pixel coverage. If any of those associated samples are covered, the color sample is covered.

- VK_COVERAGE_REDUCTION_MODE_TRUNCATE_NV specifies that for color samples present in the color attachments, a color sample is covered if the pixel coverage sample with the same sample index i is covered; other pixel coverage samples are discarded.

To dynamically set the `coverageReductionMode` state, call:

    // Provided by VK_EXT_extended_dynamic_state3 with VK_NV_coverage_reduction_mode, VK_EXT_shader_object with VK_NV_coverage_reduction_mode
    void vkCmdSetCoverageReductionModeNV(
        VkCommandBuffer                             commandBuffer,
        VkCoverageReductionModeNV                   coverageReductionMode);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `coverageReductionMode` specifies the `coverageReductionMode` state.

This command sets the `coverageReductionMode` state for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the VkPipelineCoverageReductionStateCreateInfoNV::`coverageReductionMode` value used to create the currently active pipeline.

Valid Usage

- VUID-vkCmdSetCoverageReductionModeNV-None-09423
  At least one of the following must be true:

  - The `extendedDynamicState3CoverageReductionMode` feature is enabled

  - The `shaderObject` feature is enabled

Valid Usage (Implicit)

- VUID-vkCmdSetCoverageReductionModeNV-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetCoverageReductionModeNV-coverageReductionMode-parameter
  `coverageReductionMode` must be a valid VkCoverageReductionModeNV value

- VUID-vkCmdSetCoverageReductionModeNV-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetCoverageReductionModeNV-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetCoverageReductionModeNV-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetCoverageReductionModeNV is not affected by conditional rendering

To query the set of mixed sample combinations of coverage reduction mode, rasterization samples and color, depth, stencil attachment sample counts that are supported by a physical device, call:

    // Provided by VK_NV_coverage_reduction_mode
    VkResult vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV(
        VkPhysicalDevice                            physicalDevice,
        uint32_t*                                   pCombinationCount,
        VkFramebufferMixedSamplesCombinationNV*     pCombinations);

- `physicalDevice` is the physical device from which to query the set of combinations.

- `pCombinationCount` is a pointer to an integer related to the number of combinations available or queried, as described below.

- `pCombinations` is either `NULL` or a pointer to an array of VkFramebufferMixedSamplesCombinationNV values, indicating the supported combinations of coverage reduction mode, rasterization samples, and color, depth, stencil attachment sample counts.

If `pCombinations` is `NULL`, then the number of supported combinations for the given `physicalDevice` is returned in `pCombinationCount`. Otherwise, `pCombinationCount` must point to a variable set by the application to the number of elements in the `pCombinations` array, and on return the variable is overwritten with the number of values actually written to `pCombinations`. If the value of `pCombinationCount` is less than the number of combinations supported for the given `physicalDevice`, at most `pCombinationCount` values will be written to `pCombinations`, and VK_INCOMPLETE will be returned instead of VK_SUCCESS, to indicate that not all the supported values were returned.

Valid Usage (Implicit)

- VUID-vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV-physicalDevice-parameter
  `physicalDevice` must be a valid VkPhysicalDevice handle

- VUID-vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV-pCombinationCount-parameter
  `pCombinationCount` must be a valid pointer to a `uint32_t` value

- VUID-vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV-pCombinations-parameter
  If the value referenced by `pCombinationCount` is not `0`, and `pCombinations` is not `NULL`, `pCombinations` must be a valid pointer to an array of `pCombinationCount` VkFramebufferMixedSamplesCombinationNV structures

Return Codes

Success

  - VK_INCOMPLETE

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkFramebufferMixedSamplesCombinationNV` structure is defined as:

    // Provided by VK_NV_coverage_reduction_mode
    typedef struct VkFramebufferMixedSamplesCombinationNV {
        VkStructureType              sType;
        void*                        pNext;
        VkCoverageReductionModeNV    coverageReductionMode;
        VkSampleCountFlagBits        rasterizationSamples;
        VkSampleCountFlags           depthStencilSamples;
        VkSampleCountFlags           colorSamples;
    } VkFramebufferMixedSamplesCombinationNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `coverageReductionMode` is a VkCoverageReductionModeNV value specifying the coverage reduction mode.

- `rasterizationSamples` is a VkSampleCountFlagBits specifying the number of rasterization samples in the supported combination.

- `depthStencilSamples` specifies the number of samples in the depth stencil attachment in the supported combination. A value of 0 indicates the combination does not have a depth stencil attachment.

- `colorSamples` specifies the number of color samples in a color attachment in the supported combination. A value of 0 indicates the combination does not have a color attachment.

Valid Usage (Implicit)

- VUID-VkFramebufferMixedSamplesCombinationNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_FRAMEBUFFER_MIXED_SAMPLES_COMBINATION_NV

- VUID-VkFramebufferMixedSamplesCombinationNV-pNext-pNext
  `pNext` must be `NULL`

#### 35.14.3. Coverage Modulation

As part of coverage reduction, fragment color values can also be modulated (multiplied) by a value that is a function of fraction of covered rasterization samples associated with that color sample.

Pipeline state controlling coverage modulation is specified through the members of the `VkPipelineCoverageModulationStateCreateInfoNV` structure.

The `VkPipelineCoverageModulationStateCreateInfoNV` structure is defined as:

    // Provided by VK_NV_framebuffer_mixed_samples
    typedef struct VkPipelineCoverageModulationStateCreateInfoNV {
        VkStructureType                                   sType;
        const void*                                       pNext;
        VkPipelineCoverageModulationStateCreateFlagsNV    flags;
        VkCoverageModulationModeNV                        coverageModulationMode;
        VkBool32                                          coverageModulationTableEnable;
        uint32_t                                          coverageModulationTableCount;
        const float*                                      pCoverageModulationTable;
    } VkPipelineCoverageModulationStateCreateInfoNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is reserved for future use.

- `coverageModulationMode` is a VkCoverageModulationModeNV value controlling which color components are modulated.

- `coverageModulationTableEnable` controls whether the modulation factor is looked up from a table in `pCoverageModulationTable`.

- `coverageModulationTableCount` is the number of elements in `pCoverageModulationTable`.

- `pCoverageModulationTable` is a table of modulation factors containing a value for each number of covered samples.

If `coverageModulationTableEnable` is VK_FALSE, then for each color sample the associated bits of the pixel coverage are counted and divided by the number of associated bits to produce a modulation factor R in the range (0,1] (a value of zero would have been killed due to a color coverage of 0). Specifically:

- N = value of `rasterizationSamples`

- M = value of VkAttachmentDescription::`samples` for any color attachments

- R = popcount(associated coverage bits) / (N / M)

If `coverageModulationTableEnable` is VK_TRUE, the value R is computed using a programmable lookup table. The lookup table has N / M elements, and the element of the table is selected by:

- R = `pCoverageModulationTable`[popcount(associated coverage bits)-1]

Note that the table does not have an entry for popcount(associated coverage bits) = 0, because such samples would have been killed.

The values of `pCoverageModulationTable` may be rounded to an implementation-dependent precision, which is at least as fine as 1 / N, and clamped to [0,1].

For each color attachment with a floating-point or normalized color format, each fragment output color value is replicated to M values which can each be modulated (multiplied) by that color sample’s associated value of R. Which components are modulated is controlled by `coverageModulationMode`.

If this structure is not included in the `pNext` chain, it is as if `coverageModulationMode` is VK_COVERAGE_MODULATION_MODE_NONE_NV.

If the coverage reduction mode is VK_COVERAGE_REDUCTION_MODE_TRUNCATE_NV, each color sample is associated with only a single coverage sample. In this case, it is as if `coverageModulationMode` is VK_COVERAGE_MODULATION_MODE_NONE_NV.

Valid Usage

- VUID-VkPipelineCoverageModulationStateCreateInfoNV-coverageModulationTableEnable-01405
  If `coverageModulationTableEnable` is VK_TRUE, `coverageModulationTableCount` must be equal to the number of rasterization samples divided by the number of color samples in the subpass

Valid Usage (Implicit)

- VUID-VkPipelineCoverageModulationStateCreateInfoNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NV

- VUID-VkPipelineCoverageModulationStateCreateInfoNV-flags-zerobitmask
  `flags` must be `0`

- VUID-VkPipelineCoverageModulationStateCreateInfoNV-coverageModulationMode-parameter
  `coverageModulationMode` must be a valid VkCoverageModulationModeNV value

Structure Chaining

Extends the structure

  - VkPipelineMultisampleStateCreateInfo

    // Provided by VK_NV_framebuffer_mixed_samples
    typedef VkFlags VkPipelineCoverageModulationStateCreateFlagsNV;

`VkPipelineCoverageModulationStateCreateFlagsNV` is a bitmask type for setting a mask, but is currently reserved for future use.

Possible values of VkPipelineCoverageModulationStateCreateInfoNV::`coverageModulationMode`, specifying which color components are modulated, are:

    // Provided by VK_NV_framebuffer_mixed_samples
    typedef enum VkCoverageModulationModeNV {
        VK_COVERAGE_MODULATION_MODE_NONE_NV = 0,
        VK_COVERAGE_MODULATION_MODE_RGB_NV = 1,
        VK_COVERAGE_MODULATION_MODE_ALPHA_NV = 2,
        VK_COVERAGE_MODULATION_MODE_RGBA_NV = 3,
    } VkCoverageModulationModeNV;

- VK_COVERAGE_MODULATION_MODE_NONE_NV specifies that no components are multiplied by the modulation factor.

- VK_COVERAGE_MODULATION_MODE_RGB_NV specifies that the red, green, and blue components are multiplied by the modulation factor.

- VK_COVERAGE_MODULATION_MODE_ALPHA_NV specifies that the alpha component is multiplied by the modulation factor.

- VK_COVERAGE_MODULATION_MODE_RGBA_NV specifies that all components are multiplied by the modulation factor.

To dynamically set the `coverageModulationMode` state, call:

    // Provided by VK_EXT_extended_dynamic_state3 with VK_NV_framebuffer_mixed_samples, VK_EXT_shader_object with VK_NV_framebuffer_mixed_samples
    void vkCmdSetCoverageModulationModeNV(
        VkCommandBuffer                             commandBuffer,
        VkCoverageModulationModeNV                  coverageModulationMode);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `coverageModulationMode` specifies the `coverageModulationMode` state.

This command sets the `coverageModulationMode` state for subsequent drawing commands when drawing using shader objects, or the graphics pipeline is created with VK_DYNAMIC_STATE_COVERAGE_MODULATION_MODE_NV set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the VkPipelineCoverageModulationStateCreateInfoNV::`coverageModulationMode` value used to create the currently active pipeline.

Valid Usage

- VUID-vkCmdSetCoverageModulationModeNV-None-09423
  At least one of the following must be true:

  - The `extendedDynamicState3CoverageModulationMode` feature is enabled

  - The `shaderObject` feature is enabled

Valid Usage (Implicit)

- VUID-vkCmdSetCoverageModulationModeNV-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetCoverageModulationModeNV-coverageModulationMode-parameter
  `coverageModulationMode` must be a valid VkCoverageModulationModeNV value

- VUID-vkCmdSetCoverageModulationModeNV-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetCoverageModulationModeNV-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetCoverageModulationModeNV-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetCoverageModulationModeNV is not affected by conditional rendering

To dynamically set the `coverageModulationTableEnable` state, call:

    // Provided by VK_EXT_extended_dynamic_state3 with VK_NV_framebuffer_mixed_samples, VK_EXT_shader_object with VK_NV_framebuffer_mixed_samples
    void vkCmdSetCoverageModulationTableEnableNV(
        VkCommandBuffer                             commandBuffer,
        VkBool32                                    coverageModulationTableEnable);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `coverageModulationTableEnable` specifies the `coverageModulationTableEnable` state.

This command sets the `coverageModulationTableEnable` state for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NV set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the VkPipelineCoverageModulationStateCreateInfoNV::`coverageModulationTableEnable` value used to create the currently active pipeline.

Valid Usage

- VUID-vkCmdSetCoverageModulationTableEnableNV-None-09423
  At least one of the following must be true:

  - The `extendedDynamicState3CoverageModulationTableEnable` feature is enabled

  - The `shaderObject` feature is enabled

Valid Usage (Implicit)

- VUID-vkCmdSetCoverageModulationTableEnableNV-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetCoverageModulationTableEnableNV-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetCoverageModulationTableEnableNV-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetCoverageModulationTableEnableNV-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetCoverageModulationTableEnableNV is not affected by conditional rendering

To dynamically set the `pCoverageModulationTable` state, call:

    // Provided by VK_EXT_extended_dynamic_state3 with VK_NV_framebuffer_mixed_samples, VK_EXT_shader_object with VK_NV_framebuffer_mixed_samples
    void vkCmdSetCoverageModulationTableNV(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    coverageModulationTableCount,
        const float*                                pCoverageModulationTable);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `coverageModulationTableCount` specifies the number of elements in `pCoverageModulationTable`.

- `pCoverageModulationTable` specifies the table of modulation factors containing a value for each number of covered samples.

This command sets the table of modulation factors for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_NV set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the VkPipelineCoverageModulationStateCreateInfoNV::`coverageModulationTableCount`, and VkPipelineCoverageModulationStateCreateInfoNV::`pCoverageModulationTable` values used to create the currently active pipeline.

Valid Usage

- VUID-vkCmdSetCoverageModulationTableNV-None-09423
  At least one of the following must be true:

  - The `extendedDynamicState3CoverageModulationTable` feature is enabled

  - The `shaderObject` feature is enabled

Valid Usage (Implicit)

- VUID-vkCmdSetCoverageModulationTableNV-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetCoverageModulationTableNV-pCoverageModulationTable-parameter
  `pCoverageModulationTable` must be a valid pointer to an array of `coverageModulationTableCount` `float` values

- VUID-vkCmdSetCoverageModulationTableNV-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetCoverageModulationTableNV-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetCoverageModulationTableNV-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdSetCoverageModulationTableNV-coverageModulationTableCount-arraylength
  `coverageModulationTableCount` must be greater than `0`

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetCoverageModulationTableNV is not affected by conditional rendering

## 36. The Framebuffer

### 36.1. Blending

Blending combines the incoming source fragment’s R, G, B, and A values with the destination R, G, B, and A values of each sample stored in the framebuffer at the fragment’s (xf,yf) location. If any components are missing in the framebuffer attachment, they are replaced as described in Component Substitution. Blending is performed for each color sample covered by the fragment, rather than just once for each fragment.

Source and destination values are combined according to the blend operation, quadruplets of source and destination weighting factors determined by the blend factors, and a blend constant, to obtain a new set of R, G, B, and A values, as described below.

Blending is computed and applied separately to each color attachment used by the subpass, with separate controls for each attachment.

Prior to performing the blend operation, signed and unsigned normalized fixed-point color components undergo an implied conversion to floating-point as specified by Conversion from Normalized Fixed-Point to Floating-Point. Blending computations are treated as if carried out in floating-point, and basic blend operations are performed with a precision and dynamic range no lower than that used to represent destination components. Advanced blending operations are performed with a precision and dynamic range no lower than the smaller of that used to represent destination components or that used to represent 16-bit floating-point values.

Note | Blending is only defined for floating-point, UNORM, SNORM, and sRGB formats. Within those formats, the implementation may only support blending on some subset of them. Which formats support blending is indicated by VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT.

The pipeline blend state is included in the `VkPipelineColorBlendStateCreateInfo` structure during graphics pipeline creation:

The `VkPipelineColorBlendStateCreateInfo` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkPipelineColorBlendStateCreateInfo {
        VkStructureType                               sType;
        const void*                                   pNext;
        VkPipelineColorBlendStateCreateFlags          flags;
        VkBool32                                      logicOpEnable;
        VkLogicOp                                     logicOp;
        uint32_t                                      attachmentCount;
        const VkPipelineColorBlendAttachmentState*    pAttachments;
        float                                         blendConstants[4];
    } VkPipelineColorBlendStateCreateInfo;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask of VkPipelineColorBlendStateCreateFlagBits specifying additional color blending information.

- `logicOpEnable` controls whether to apply Logical Operations.

- `logicOp` selects which logical operation to apply.

- `attachmentCount` is the number of VkPipelineColorBlendAttachmentState elements in `pAttachments`. It is ignored if the pipeline is created with VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT, VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT, and VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT dynamic states set, and either VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT set or the advancedBlendCoherentOperations feature is not enabled.

- `pAttachments` is a pointer to an array of VkPipelineColorBlendAttachmentState structures defining blend state for each color attachment. It is ignored if the pipeline is created with VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT, VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT, and VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT dynamic states set, and either VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT set or the advancedBlendCoherentOperations feature is not enabled.

- `blendConstants` is a pointer to an array of four values used as the R, G, B, and A components of the blend constant that are used in blending, depending on the blend factor.

Valid Usage

- VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605
  If the `independentBlend` feature is not enabled, all elements of `pAttachments` must be identical

- VUID-VkPipelineColorBlendStateCreateInfo-logicOpEnable-00606
  If the `logicOp` feature is not enabled, `logicOpEnable` must be VK_FALSE

- VUID-VkPipelineColorBlendStateCreateInfo-logicOpEnable-00607
  If `logicOpEnable` is VK_TRUE, `logicOp` must be a valid VkLogicOp value

- VUID-VkPipelineColorBlendStateCreateInfo-rasterizationOrderColorAttachmentAccess-06465
  If the `rasterizationOrderColorAttachmentAccess` feature is not enabled, `flags` must not include VK_PIPELINE_COLOR_BLEND_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_BIT_EXT

- VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-07353
  If `attachmentCount` is not `0` , and any of VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT, VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT, VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT, or VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT are not set, `pAttachments` must be a valid pointer to an array of `attachmentCount` valid VkPipelineColorBlendAttachmentState structures

Valid Usage (Implicit)

- VUID-VkPipelineColorBlendStateCreateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO

- VUID-VkPipelineColorBlendStateCreateInfo-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkPipelineColorBlendAdvancedStateCreateInfoEXT or VkPipelineColorWriteCreateInfoEXT

- VUID-VkPipelineColorBlendStateCreateInfo-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkPipelineColorBlendStateCreateInfo-flags-parameter
  `flags` must be a valid combination of VkPipelineColorBlendStateCreateFlagBits values

- VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-parameter
  If `attachmentCount` is not `0`, and `pAttachments` is not `NULL`, `pAttachments` must be a valid pointer to an array of `attachmentCount` valid VkPipelineColorBlendAttachmentState structures

    // Provided by VK_VERSION_1_0
    typedef VkFlags VkPipelineColorBlendStateCreateFlags;

`VkPipelineColorBlendStateCreateFlags` is a bitmask type for setting a mask of zero or more VkPipelineColorBlendStateCreateFlagBits.

Bits which can be set in the VkPipelineColorBlendStateCreateInfo::`flags` parameter are:

    // Provided by VK_VERSION_1_0, VK_EXT_rasterization_order_attachment_access
    typedef enum VkPipelineColorBlendStateCreateFlagBits {
      // Provided by VK_EXT_rasterization_order_attachment_access
        VK_PIPELINE_COLOR_BLEND_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_BIT_EXT = 0x00000001,
      // Provided by VK_ARM_rasterization_order_attachment_access
        VK_PIPELINE_COLOR_BLEND_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_BIT_ARM = VK_PIPELINE_COLOR_BLEND_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_BIT_EXT,
    } VkPipelineColorBlendStateCreateFlagBits;

- VK_PIPELINE_COLOR_BLEND_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_BIT_EXT specifies that access to color and input attachments will have implicit framebuffer-local memory dependencies, allowing applications to express custom blending operations in a fragment shader.

When VK_PIPELINE_COLOR_BLEND_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_BIT_EXT is included in a pipeline, it forms a framebuffer-local memory dependency for each fragment generated by draw commands for that pipeline with the following scopes:

- The first synchronization scope includes the VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT pipeline stage executed by all previous fragments (as defined by primitive order) in the corresponding framebuffer regions including those generated by the same draw command.

- The second synchronization scope includes the VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT pipeline stage executed by the generated fragment.

- The first access scope includes all writes to color attachments.

- The second access scope includes all reads from input attachments.

The `VkPipelineColorBlendAttachmentState` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkPipelineColorBlendAttachmentState {
        VkBool32                 blendEnable;
        VkBlendFactor            srcColorBlendFactor;
        VkBlendFactor            dstColorBlendFactor;
        VkBlendOp                colorBlendOp;
        VkBlendFactor            srcAlphaBlendFactor;
        VkBlendFactor            dstAlphaBlendFactor;
        VkBlendOp                alphaBlendOp;
        VkColorComponentFlags    colorWriteMask;
    } VkPipelineColorBlendAttachmentState;

- `blendEnable` controls whether blending is enabled for the corresponding color attachment. If blending is not enabled, the source fragment’s color for that attachment is passed through unmodified.

- `srcColorBlendFactor` selects which blend factor is used to determine the source factors (Sr,Sg,Sb).

- `dstColorBlendFactor` selects which blend factor is used to determine the destination factors (Dr,Dg,Db).

- `colorBlendOp` selects which blend operation is used to calculate the RGB values to write to the color attachment.

- `srcAlphaBlendFactor` selects which blend factor is used to determine the source factor Sa.

- `dstAlphaBlendFactor` selects which blend factor is used to determine the destination factor Da.

- `alphaBlendOp` selects which blend operation is used to calculate the alpha values to write to the color attachment.

- `colorWriteMask` is a bitmask of VkColorComponentFlagBits specifying which of the R, G, B, and/or A components are enabled for writing, as described for the Color Write Mask.

Valid Usage

- VUID-VkPipelineColorBlendAttachmentState-srcColorBlendFactor-00608
  If the `dualSrcBlend` feature is not enabled, `srcColorBlendFactor` must not be VK_BLEND_FACTOR_SRC1_COLOR, VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR, VK_BLEND_FACTOR_SRC1_ALPHA, or VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA

- VUID-VkPipelineColorBlendAttachmentState-dstColorBlendFactor-00609
  If the `dualSrcBlend` feature is not enabled, `dstColorBlendFactor` must not be VK_BLEND_FACTOR_SRC1_COLOR, VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR, VK_BLEND_FACTOR_SRC1_ALPHA, or VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA

- VUID-VkPipelineColorBlendAttachmentState-srcAlphaBlendFactor-00610
  If the `dualSrcBlend` feature is not enabled, `srcAlphaBlendFactor` must not be VK_BLEND_FACTOR_SRC1_COLOR, VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR, VK_BLEND_FACTOR_SRC1_ALPHA, or VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA

- VUID-VkPipelineColorBlendAttachmentState-dstAlphaBlendFactor-00611
  If the `dualSrcBlend` feature is not enabled, `dstAlphaBlendFactor` must not be VK_BLEND_FACTOR_SRC1_COLOR, VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR, VK_BLEND_FACTOR_SRC1_ALPHA, or VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA

- VUID-VkPipelineColorBlendAttachmentState-colorBlendOp-01406
  If either of `colorBlendOp` or `alphaBlendOp` is an advanced blend operation, then `colorBlendOp` must equal `alphaBlendOp`

- VUID-VkPipelineColorBlendAttachmentState-advancedBlendIndependentBlend-01407
  If VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT::`advancedBlendIndependentBlend` is VK_FALSE and `colorBlendOp` is an advanced blend operation, then `colorBlendOp` must be the same for all attachments

- VUID-VkPipelineColorBlendAttachmentState-advancedBlendIndependentBlend-01408
  If VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT::`advancedBlendIndependentBlend` is VK_FALSE and `alphaBlendOp` is an advanced blend operation, then `alphaBlendOp` must be the same for all attachments

- VUID-VkPipelineColorBlendAttachmentState-advancedBlendAllOperations-01409
  If VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT::`advancedBlendAllOperations` is VK_FALSE, then `colorBlendOp` must not be VK_BLEND_OP_ZERO_EXT, VK_BLEND_OP_SRC_EXT, VK_BLEND_OP_DST_EXT, VK_BLEND_OP_SRC_OVER_EXT, VK_BLEND_OP_DST_OVER_EXT, VK_BLEND_OP_SRC_IN_EXT, VK_BLEND_OP_DST_IN_EXT, VK_BLEND_OP_SRC_OUT_EXT, VK_BLEND_OP_DST_OUT_EXT, VK_BLEND_OP_SRC_ATOP_EXT, VK_BLEND_OP_DST_ATOP_EXT, VK_BLEND_OP_XOR_EXT, VK_BLEND_OP_INVERT_EXT, VK_BLEND_OP_INVERT_RGB_EXT, VK_BLEND_OP_LINEARDODGE_EXT, VK_BLEND_OP_LINEARBURN_EXT, VK_BLEND_OP_VIVIDLIGHT_EXT, VK_BLEND_OP_LINEARLIGHT_EXT, VK_BLEND_OP_PINLIGHT_EXT, VK_BLEND_OP_HARDMIX_EXT, VK_BLEND_OP_PLUS_EXT, VK_BLEND_OP_PLUS_CLAMPED_EXT, VK_BLEND_OP_PLUS_CLAMPED_ALPHA_EXT, VK_BLEND_OP_PLUS_DARKER_EXT, VK_BLEND_OP_MINUS_EXT, VK_BLEND_OP_MINUS_CLAMPED_EXT, VK_BLEND_OP_CONTRAST_EXT, VK_BLEND_OP_INVERT_OVG_EXT, VK_BLEND_OP_RED_EXT, VK_BLEND_OP_GREEN_EXT, or VK_BLEND_OP_BLUE_EXT

- VUID-VkPipelineColorBlendAttachmentState-colorBlendOp-01410
  If `colorBlendOp` or `alphaBlendOp` is an advanced blend operation, then `colorAttachmentCount` of the subpass this pipeline is compiled against must be less than or equal to VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT::`advancedBlendMaxColorAttachments`

- VUID-VkPipelineColorBlendAttachmentState-constantAlphaColorBlendFactors-04454
  If the `VK_KHR_portability_subset` extension is enabled, and VkPhysicalDevicePortabilitySubsetFeaturesKHR::`constantAlphaColorBlendFactors` is VK_FALSE, `srcColorBlendFactor` must not be VK_BLEND_FACTOR_CONSTANT_ALPHA or VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA

- VUID-VkPipelineColorBlendAttachmentState-constantAlphaColorBlendFactors-04455
  If the `VK_KHR_portability_subset` extension is enabled, and VkPhysicalDevicePortabilitySubsetFeaturesKHR::`constantAlphaColorBlendFactors` is VK_FALSE, `dstColorBlendFactor` must not be VK_BLEND_FACTOR_CONSTANT_ALPHA or VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA

Valid Usage (Implicit)

- VUID-VkPipelineColorBlendAttachmentState-srcColorBlendFactor-parameter
  `srcColorBlendFactor` must be a valid VkBlendFactor value

- VUID-VkPipelineColorBlendAttachmentState-dstColorBlendFactor-parameter
  `dstColorBlendFactor` must be a valid VkBlendFactor value

- VUID-VkPipelineColorBlendAttachmentState-colorBlendOp-parameter
  `colorBlendOp` must be a valid VkBlendOp value

- VUID-VkPipelineColorBlendAttachmentState-srcAlphaBlendFactor-parameter
  `srcAlphaBlendFactor` must be a valid VkBlendFactor value

- VUID-VkPipelineColorBlendAttachmentState-dstAlphaBlendFactor-parameter
  `dstAlphaBlendFactor` must be a valid VkBlendFactor value

- VUID-VkPipelineColorBlendAttachmentState-alphaBlendOp-parameter
  `alphaBlendOp` must be a valid VkBlendOp value

- VUID-VkPipelineColorBlendAttachmentState-colorWriteMask-parameter
  `colorWriteMask` must be a valid combination of VkColorComponentFlagBits values

To dynamically set `blendEnable`, call:

    // Provided by VK_EXT_extended_dynamic_state3, VK_EXT_shader_object
    void vkCmdSetColorBlendEnableEXT(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    firstAttachment,
        uint32_t                                    attachmentCount,
        const VkBool32*                             pColorBlendEnables);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `firstAttachment` the first color attachment the color blending enable applies.

- `attachmentCount` the number of color blending enables in the `pColorBlendEnables` array.

- `pColorBlendEnables` an array of booleans to indicate whether color blending is enabled for the corresponding attachment.

This command sets the color blending enable of the specified color attachments for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the VkPipelineColorBlendAttachmentState::`blendEnable` values used to create the currently active pipeline.

Valid Usage

- VUID-vkCmdSetColorBlendEnableEXT-None-09423
  At least one of the following must be true:

  - The `extendedDynamicState3ColorBlendEnable` feature is enabled

  - The `shaderObject` feature is enabled

Valid Usage (Implicit)

- VUID-vkCmdSetColorBlendEnableEXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetColorBlendEnableEXT-pColorBlendEnables-parameter
  `pColorBlendEnables` must be a valid pointer to an array of `attachmentCount` VkBool32 values

- VUID-vkCmdSetColorBlendEnableEXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetColorBlendEnableEXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetColorBlendEnableEXT-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdSetColorBlendEnableEXT-attachmentCount-arraylength
  `attachmentCount` must be greater than `0`

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetColorBlendEnableEXT is not affected by conditional rendering

To dynamically set color blend factors and operations, call:

    // Provided by VK_EXT_extended_dynamic_state3, VK_EXT_shader_object
    void vkCmdSetColorBlendEquationEXT(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    firstAttachment,
        uint32_t                                    attachmentCount,
        const VkColorBlendEquationEXT*              pColorBlendEquations);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `firstAttachment` the first color attachment the color blend factors and operations apply to.

- `attachmentCount` the number of VkColorBlendEquationEXT elements in the `pColorBlendEquations` array.

- `pColorBlendEquations` an array of VkColorBlendEquationEXT structs that specify the color blend factors and operations for the corresponding attachments.

This command sets the color blending factors and operations of the specified attachments for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the VkPipelineColorBlendAttachmentState::`srcColorBlendFactor`, VkPipelineColorBlendAttachmentState::`dstColorBlendFactor`, VkPipelineColorBlendAttachmentState::`colorBlendOp`, VkPipelineColorBlendAttachmentState::`srcAlphaBlendFactor`, VkPipelineColorBlendAttachmentState::`dstAlphaBlendFactor`, and VkPipelineColorBlendAttachmentState::`alphaBlendOp` values used to create the currently active pipeline.

Valid Usage

- VUID-vkCmdSetColorBlendEquationEXT-None-09423
  At least one of the following must be true:

  - The `extendedDynamicState3ColorBlendEquation` feature is enabled

  - The `shaderObject` feature is enabled

Valid Usage (Implicit)

- VUID-vkCmdSetColorBlendEquationEXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetColorBlendEquationEXT-pColorBlendEquations-parameter
  `pColorBlendEquations` must be a valid pointer to an array of `attachmentCount` valid VkColorBlendEquationEXT structures

- VUID-vkCmdSetColorBlendEquationEXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetColorBlendEquationEXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetColorBlendEquationEXT-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdSetColorBlendEquationEXT-attachmentCount-arraylength
  `attachmentCount` must be greater than `0`

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetColorBlendEquationEXT is not affected by conditional rendering

The `VkColorBlendEquationEXT` structure is defined as:

    // Provided by VK_EXT_extended_dynamic_state3, VK_EXT_shader_object
    typedef struct VkColorBlendEquationEXT {
        VkBlendFactor    srcColorBlendFactor;
        VkBlendFactor    dstColorBlendFactor;
        VkBlendOp        colorBlendOp;
        VkBlendFactor    srcAlphaBlendFactor;
        VkBlendFactor    dstAlphaBlendFactor;
        VkBlendOp        alphaBlendOp;
    } VkColorBlendEquationEXT;

- `srcColorBlendFactor` selects which blend factor is used to determine the source factors (Sr,Sg,Sb).

- `dstColorBlendFactor` selects which blend factor is used to determine the destination factors (Dr,Dg,Db).

- `colorBlendOp` selects which blend operation is used to calculate the RGB values to write to the color attachment.

- `srcAlphaBlendFactor` selects which blend factor is used to determine the source factor Sa.

- `dstAlphaBlendFactor` selects which blend factor is used to determine the destination factor Da.

- `alphaBlendOp` selects which blend operation is use to calculate the alpha values to write to the color attachment.

Valid Usage

- VUID-VkColorBlendEquationEXT-dualSrcBlend-07357
  If the `dualSrcBlend` feature is not enabled, `srcColorBlendFactor` must not be VK_BLEND_FACTOR_SRC1_COLOR, VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR, VK_BLEND_FACTOR_SRC1_ALPHA, or VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA

- VUID-VkColorBlendEquationEXT-dualSrcBlend-07358
  If the `dualSrcBlend` feature is not enabled, `dstColorBlendFactor` must not be VK_BLEND_FACTOR_SRC1_COLOR, VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR, VK_BLEND_FACTOR_SRC1_ALPHA, or VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA

- VUID-VkColorBlendEquationEXT-dualSrcBlend-07359
  If the `dualSrcBlend` feature is not enabled, `srcAlphaBlendFactor` must not be VK_BLEND_FACTOR_SRC1_COLOR, VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR, VK_BLEND_FACTOR_SRC1_ALPHA, or VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA

- VUID-VkColorBlendEquationEXT-dualSrcBlend-07360
  If the `dualSrcBlend` feature is not enabled, `dstAlphaBlendFactor` must not be VK_BLEND_FACTOR_SRC1_COLOR, VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR, VK_BLEND_FACTOR_SRC1_ALPHA, or VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA

- VUID-VkColorBlendEquationEXT-colorBlendOp-07361
  `colorBlendOp` and `alphaBlendOp` must not be VK_BLEND_OP_ZERO_EXT, VK_BLEND_OP_SRC_EXT, VK_BLEND_OP_DST_EXT, VK_BLEND_OP_SRC_OVER_EXT, VK_BLEND_OP_DST_OVER_EXT, VK_BLEND_OP_SRC_IN_EXT, VK_BLEND_OP_DST_IN_EXT, VK_BLEND_OP_SRC_OUT_EXT, VK_BLEND_OP_DST_OUT_EXT, VK_BLEND_OP_SRC_ATOP_EXT, VK_BLEND_OP_DST_ATOP_EXT, VK_BLEND_OP_XOR_EXT, VK_BLEND_OP_MULTIPLY_EXT, VK_BLEND_OP_SCREEN_EXT, VK_BLEND_OP_OVERLAY_EXT, VK_BLEND_OP_DARKEN_EXT, VK_BLEND_OP_LIGHTEN_EXT, VK_BLEND_OP_COLORDODGE_EXT, VK_BLEND_OP_COLORBURN_EXT, VK_BLEND_OP_HARDLIGHT_EXT, VK_BLEND_OP_SOFTLIGHT_EXT, VK_BLEND_OP_DIFFERENCE_EXT, VK_BLEND_OP_EXCLUSION_EXT, VK_BLEND_OP_INVERT_EXT, VK_BLEND_OP_INVERT_RGB_EXT, VK_BLEND_OP_LINEARDODGE_EXT, VK_BLEND_OP_LINEARBURN_EXT, VK_BLEND_OP_VIVIDLIGHT_EXT, VK_BLEND_OP_LINEARLIGHT_EXT, VK_BLEND_OP_PINLIGHT_EXT, VK_BLEND_OP_HARDMIX_EXT, VK_BLEND_OP_HSL_HUE_EXT, VK_BLEND_OP_HSL_SATURATION_EXT, VK_BLEND_OP_HSL_COLOR_EXT, VK_BLEND_OP_HSL_LUMINOSITY_EXT, VK_BLEND_OP_PLUS_EXT, VK_BLEND_OP_PLUS_CLAMPED_EXT, VK_BLEND_OP_PLUS_CLAMPED_ALPHA_EXT, VK_BLEND_OP_PLUS_DARKER_EXT, VK_BLEND_OP_MINUS_EXT, VK_BLEND_OP_MINUS_CLAMPED_EXT, VK_BLEND_OP_CONTRAST_EXT, VK_BLEND_OP_INVERT_OVG_EXT, VK_BLEND_OP_RED_EXT, VK_BLEND_OP_GREEN_EXT, or VK_BLEND_OP_BLUE_EXT

- VUID-VkColorBlendEquationEXT-constantAlphaColorBlendFactors-07362
  If the `VK_KHR_portability_subset` extension is enabled, and VkPhysicalDevicePortabilitySubsetFeaturesKHR::`constantAlphaColorBlendFactors` is VK_FALSE, `srcColorBlendFactor` must not be VK_BLEND_FACTOR_CONSTANT_ALPHA or VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA

- VUID-VkColorBlendEquationEXT-constantAlphaColorBlendFactors-07363
  If the `VK_KHR_portability_subset` extension is enabled, and VkPhysicalDevicePortabilitySubsetFeaturesKHR::`constantAlphaColorBlendFactors` is VK_FALSE, `dstColorBlendFactor` must not be VK_BLEND_FACTOR_CONSTANT_ALPHA or VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA

Valid Usage (Implicit)

- VUID-VkColorBlendEquationEXT-srcColorBlendFactor-parameter
  `srcColorBlendFactor` must be a valid VkBlendFactor value

- VUID-VkColorBlendEquationEXT-dstColorBlendFactor-parameter
  `dstColorBlendFactor` must be a valid VkBlendFactor value

- VUID-VkColorBlendEquationEXT-colorBlendOp-parameter
  `colorBlendOp` must be a valid VkBlendOp value

- VUID-VkColorBlendEquationEXT-srcAlphaBlendFactor-parameter
  `srcAlphaBlendFactor` must be a valid VkBlendFactor value

- VUID-VkColorBlendEquationEXT-dstAlphaBlendFactor-parameter
  `dstAlphaBlendFactor` must be a valid VkBlendFactor value

- VUID-VkColorBlendEquationEXT-alphaBlendOp-parameter
  `alphaBlendOp` must be a valid VkBlendOp value

To dynamically set the color write masks, call:

    // Provided by VK_EXT_extended_dynamic_state3, VK_EXT_shader_object
    void vkCmdSetColorWriteMaskEXT(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    firstAttachment,
        uint32_t                                    attachmentCount,
        const VkColorComponentFlags*                pColorWriteMasks);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `firstAttachment` the first color attachment the color write masks apply to.

- `attachmentCount` the number of VkColorComponentFlags values in the `pColorWriteMasks` array.

- `pColorWriteMasks` an array of VkColorComponentFlags values that specify the color write masks of the corresponding attachments.

This command sets the color write masks of the specified attachments for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the VkPipelineColorBlendAttachmentState::`colorWriteMask` values used to create the currently active pipeline.

Note | Formats with bits that are shared between components specified by VkColorComponentFlagBits, such as VK_FORMAT_E5B9G9R9_UFLOAT_PACK32, cannot have their channels individually masked by this functionality; either all components that share bits have to be enabled, or none of them.

Valid Usage

- VUID-vkCmdSetColorWriteMaskEXT-None-09423
  At least one of the following must be true:

  - The `extendedDynamicState3ColorWriteMask` feature is enabled

  - The `shaderObject` feature is enabled

Valid Usage (Implicit)

- VUID-vkCmdSetColorWriteMaskEXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetColorWriteMaskEXT-pColorWriteMasks-parameter
  `pColorWriteMasks` must be a valid pointer to an array of `attachmentCount` valid combinations of VkColorComponentFlagBits values

- VUID-vkCmdSetColorWriteMaskEXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetColorWriteMaskEXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetColorWriteMaskEXT-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdSetColorWriteMaskEXT-attachmentCount-arraylength
  `attachmentCount` must be greater than `0`

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetColorWriteMaskEXT is not affected by conditional rendering

#### 36.1.1. Blend Factors

The source and destination color and alpha blending factors are selected from the enum:

    // Provided by VK_VERSION_1_0
    typedef enum VkBlendFactor {
        VK_BLEND_FACTOR_ZERO = 0,
        VK_BLEND_FACTOR_ONE = 1,
        VK_BLEND_FACTOR_SRC_COLOR = 2,
        VK_BLEND_FACTOR_ONE_MINUS_SRC_COLOR = 3,
        VK_BLEND_FACTOR_DST_COLOR = 4,
        VK_BLEND_FACTOR_ONE_MINUS_DST_COLOR = 5,
        VK_BLEND_FACTOR_SRC_ALPHA = 6,
        VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA = 7,
        VK_BLEND_FACTOR_DST_ALPHA = 8,
        VK_BLEND_FACTOR_ONE_MINUS_DST_ALPHA = 9,
        VK_BLEND_FACTOR_CONSTANT_COLOR = 10,
        VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR = 11,
        VK_BLEND_FACTOR_CONSTANT_ALPHA = 12,
        VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA = 13,
        VK_BLEND_FACTOR_SRC_ALPHA_SATURATE = 14,
        VK_BLEND_FACTOR_SRC1_COLOR = 15,
        VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR = 16,
        VK_BLEND_FACTOR_SRC1_ALPHA = 17,
        VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA = 18,
    } VkBlendFactor;

The semantics of the enum values are described in the table below:

Table 43. Blend Factors
VkBlendFactor | RGB Blend Factors (Sr,Sg,Sb) or (Dr,Dg,Db) | Alpha Blend Factor (Sa or Da)
--- | --- | ---
VK_BLEND_FACTOR_ZERO | (0,0,0) | 0
VK_BLEND_FACTOR_ONE | (1,1,1) | 1
VK_BLEND_FACTOR_SRC_COLOR | (Rs0,Gs0,Bs0) | As0
VK_BLEND_FACTOR_ONE_MINUS_SRC_COLOR | (1-Rs0,1-Gs0,1-Bs0) | 1-As0
VK_BLEND_FACTOR_DST_COLOR | (Rd,Gd,Bd) | Ad
VK_BLEND_FACTOR_ONE_MINUS_DST_COLOR | (1-Rd,1-Gd,1-Bd) | 1-Ad
VK_BLEND_FACTOR_SRC_ALPHA | (As0,As0,As0) | As0
VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA | (1-As0,1-As0,1-As0) | 1-As0
VK_BLEND_FACTOR_DST_ALPHA | (Ad,Ad,Ad) | Ad
VK_BLEND_FACTOR_ONE_MINUS_DST_ALPHA | (1-Ad,1-Ad,1-Ad) | 1-Ad
VK_BLEND_FACTOR_CONSTANT_COLOR | (Rc,Gc,Bc) | Ac
VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR | (1-Rc,1-Gc,1-Bc) | 1-Ac
VK_BLEND_FACTOR_CONSTANT_ALPHA | (Ac,Ac,Ac) | Ac
VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA | (1-Ac,1-Ac,1-Ac) | 1-Ac
VK_BLEND_FACTOR_SRC_ALPHA_SATURATE | (f,f,f); f = min(As0,1-Ad) | 1
VK_BLEND_FACTOR_SRC1_COLOR | (Rs1,Gs1,Bs1) | As1
VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR | (1-Rs1,1-Gs1,1-Bs1) | 1-As1
VK_BLEND_FACTOR_SRC1_ALPHA | (As1,As1,As1) | As1
VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA | (1-As1,1-As1,1-As1) | 1-As1

In this table, the following conventions are used:

- Rs0,Gs0,Bs0 and As0 represent the first source color R, G, B, and A components, respectively, for the fragment output location corresponding to the color attachment being blended.

- Rs1,Gs1,Bs1 and As1 represent the second source color R, G, B, and A components, respectively, used in dual source blending modes, for the fragment output location corresponding to the color attachment being blended.

- Rd,Gd,Bd and Ad represent the R, G, B, and A components of the destination color. That is, the color currently in the corresponding color attachment for this fragment/sample.

- Rc,Gc,Bc and Ac represent the blend constant R, G, B, and A components, respectively.

To dynamically set and change the blend constants, call:

    // Provided by VK_VERSION_1_0
    void vkCmdSetBlendConstants(
        VkCommandBuffer                             commandBuffer,
        const float                                 blendConstants[4]);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `blendConstants` is a pointer to an array of four values specifying the Rc, Gc, Bc, and Ac components of the blend constant color used in blending, depending on the blend factor.

This command sets blend constants for subsequent drawing commands when when drawing using shader objects, or the graphics pipeline is created with VK_DYNAMIC_STATE_BLEND_CONSTANTS set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the VkPipelineColorBlendStateCreateInfo::`blendConstants` values used to create the currently active pipeline.

Valid Usage (Implicit)

- VUID-vkCmdSetBlendConstants-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetBlendConstants-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetBlendConstants-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetBlendConstants-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetBlendConstants is not affected by conditional rendering

#### 36.1.2. Dual-Source Blending

Blend factors that use the secondary color input (Rs1,Gs1,Bs1,As1) (VK_BLEND_FACTOR_SRC1_COLOR, VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR, VK_BLEND_FACTOR_SRC1_ALPHA, and VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA) may consume implementation resources that could otherwise be used for rendering to multiple color attachments. Therefore, the number of color attachments that can be used in a framebuffer may be lower when using dual-source blending.

Dual-source blending is only supported if the `dualSrcBlend` feature is enabled.

The maximum number of color attachments that can be used in a subpass when using dual-source blending functions is implementation-dependent and is reported as the `maxFragmentDualSrcAttachments` member of `VkPhysicalDeviceLimits`.

Color outputs can be bound to the first and second inputs of the blender using the `Index` decoration, as described in Fragment Output Interface. If the second color input to the blender is not written in the shader, or if no output is bound to the second input of a blender, the value of the second input is undefined.

#### 36.1.3. Blend Operations

Once the source and destination blend factors have been selected, they along with the source and destination components are passed to the blending operations. RGB and alpha components can use different operations. Possible values of VkBlendOp, specifying the operations, are:

    // Provided by VK_VERSION_1_0
    typedef enum VkBlendOp {
        VK_BLEND_OP_ADD = 0,
        VK_BLEND_OP_SUBTRACT = 1,
        VK_BLEND_OP_REVERSE_SUBTRACT = 2,
        VK_BLEND_OP_MIN = 3,
        VK_BLEND_OP_MAX = 4,
      // Provided by VK_EXT_blend_operation_advanced
        VK_BLEND_OP_ZERO_EXT = 1000148000,
      // Provided by VK_EXT_blend_operation_advanced
        VK_BLEND_OP_SRC_EXT = 1000148001,
      // Provided by VK_EXT_blend_operation_advanced
        VK_BLEND_OP_DST_EXT = 1000148002,
      // Provided by VK_EXT_blend_operation_advanced
        VK_BLEND_OP_SRC_OVER_EXT = 1000148003,
      // Provided by VK_EXT_blend_operation_advanced
        VK_BLEND_OP_DST_OVER_EXT = 1000148004,
      // Provided by VK_EXT_blend_operation_advanced
        VK_BLEND_OP_SRC_IN_EXT = 1000148005,
      // Provided by VK_EXT_blend_operation_advanced
        VK_BLEND_OP_DST_IN_EXT = 1000148006,
      // Provided by VK_EXT_blend_operation_advanced
        VK_BLEND_OP_SRC_OUT_EXT = 1000148007,
      // Provided by VK_EXT_blend_operation_advanced
        VK_BLEND_OP_DST_OUT_EXT = 1000148008,
      // Provided by VK_EXT_blend_operation_advanced
        VK_BLEND_OP_SRC_ATOP_EXT = 1000148009,
      // Provided by VK_EXT_blend_operation_advanced
        VK_BLEND_OP_DST_ATOP_EXT = 1000148010,
      // Provided by VK_EXT_blend_operation_advanced
        VK_BLEND_OP_XOR_EXT = 1000148011,
      // Provided by VK_EXT_blend_operation_advanced
        VK_BLEND_OP_MULTIPLY_EXT = 1000148012,
      // Provided by VK_EXT_blend_operation_advanced
        VK_BLEND_OP_SCREEN_EXT = 1000148013,
      // Provided by VK_EXT_blend_operation_advanced
        VK_BLEND_OP_OVERLAY_EXT = 1000148014,
      // Provided by VK_EXT_blend_operation_advanced
        VK_BLEND_OP_DARKEN_EXT = 1000148015,
      // Provided by VK_EXT_blend_operation_advanced
        VK_BLEND_OP_LIGHTEN_EXT = 1000148016,
      // Provided by VK_EXT_blend_operation_advanced
        VK_BLEND_OP_COLORDODGE_EXT = 1000148017,
      // Provided by VK_EXT_blend_operation_advanced
        VK_BLEND_OP_COLORBURN_EXT = 1000148018,
      // Provided by VK_EXT_blend_operation_advanced
        VK_BLEND_OP_HARDLIGHT_EXT = 1000148019,
      // Provided by VK_EXT_blend_operation_advanced
        VK_BLEND_OP_SOFTLIGHT_EXT = 1000148020,
      // Provided by VK_EXT_blend_operation_advanced
        VK_BLEND_OP_DIFFERENCE_EXT = 1000148021,
      // Provided by VK_EXT_blend_operation_advanced
        VK_BLEND_OP_EXCLUSION_EXT = 1000148022,
      // Provided by VK_EXT_blend_operation_advanced
        VK_BLEND_OP_INVERT_EXT = 1000148023,
      // Provided by VK_EXT_blend_operation_advanced
        VK_BLEND_OP_INVERT_RGB_EXT = 1000148024,
      // Provided by VK_EXT_blend_operation_advanced
        VK_BLEND_OP_LINEARDODGE_EXT = 1000148025,
      // Provided by VK_EXT_blend_operation_advanced
        VK_BLEND_OP_LINEARBURN_EXT = 1000148026,
      // Provided by VK_EXT_blend_operation_advanced
        VK_BLEND_OP_VIVIDLIGHT_EXT = 1000148027,
      // Provided by VK_EXT_blend_operation_advanced
        VK_BLEND_OP_LINEARLIGHT_EXT = 1000148028,
      // Provided by VK_EXT_blend_operation_advanced
        VK_BLEND_OP_PINLIGHT_EXT = 1000148029,
      // Provided by VK_EXT_blend_operation_advanced
        VK_BLEND_OP_HARDMIX_EXT = 1000148030,
      // Provided by VK_EXT_blend_operation_advanced
        VK_BLEND_OP_HSL_HUE_EXT = 1000148031,
      // Provided by VK_EXT_blend_operation_advanced
        VK_BLEND_OP_HSL_SATURATION_EXT = 1000148032,
      // Provided by VK_EXT_blend_operation_advanced
        VK_BLEND_OP_HSL_COLOR_EXT = 1000148033,
      // Provided by VK_EXT_blend_operation_advanced
        VK_BLEND_OP_HSL_LUMINOSITY_EXT = 1000148034,
      // Provided by VK_EXT_blend_operation_advanced
        VK_BLEND_OP_PLUS_EXT = 1000148035,
      // Provided by VK_EXT_blend_operation_advanced
        VK_BLEND_OP_PLUS_CLAMPED_EXT = 1000148036,
      // Provided by VK_EXT_blend_operation_advanced
        VK_BLEND_OP_PLUS_CLAMPED_ALPHA_EXT = 1000148037,
      // Provided by VK_EXT_blend_operation_advanced
        VK_BLEND_OP_PLUS_DARKER_EXT = 1000148038,
      // Provided by VK_EXT_blend_operation_advanced
        VK_BLEND_OP_MINUS_EXT = 1000148039,
      // Provided by VK_EXT_blend_operation_advanced
        VK_BLEND_OP_MINUS_CLAMPED_EXT = 1000148040,
      // Provided by VK_EXT_blend_operation_advanced
        VK_BLEND_OP_CONTRAST_EXT = 1000148041,
      // Provided by VK_EXT_blend_operation_advanced
        VK_BLEND_OP_INVERT_OVG_EXT = 1000148042,
      // Provided by VK_EXT_blend_operation_advanced
        VK_BLEND_OP_RED_EXT = 1000148043,
      // Provided by VK_EXT_blend_operation_advanced
        VK_BLEND_OP_GREEN_EXT = 1000148044,
      // Provided by VK_EXT_blend_operation_advanced
        VK_BLEND_OP_BLUE_EXT = 1000148045,
    } VkBlendOp;

The semantics of the basic blend operations are described in the table below:

Table 44. Basic Blend Operations
VkBlendOp | RGB Components | Alpha Component
--- | --- | ---
VK_BLEND_OP_ADD | R = Rs0 × Sr + Rd × Dr G = Gs0 × Sg + Gd × Dg B = Bs0 × Sb + Bd × Db | A = As0 × Sa + Ad × Da
VK_BLEND_OP_SUBTRACT | R = Rs0 × Sr - Rd × Dr G = Gs0 × Sg - Gd × Dg B = Bs0 × Sb - Bd × Db | A = As0 × Sa - Ad × Da
VK_BLEND_OP_REVERSE_SUBTRACT | R = Rd × Dr - Rs0 × Sr G = Gd × Dg - Gs0 × Sg B = Bd × Db - Bs0 × Sb | A = Ad × Da - As0 × Sa
VK_BLEND_OP_MIN | R = min(Rs0,Rd) G = min(Gs0,Gd) B = min(Bs0,Bd) | A = min(As0,Ad)
VK_BLEND_OP_MAX | R = max(Rs0,Rd) G = max(Gs0,Gd) B = max(Bs0,Bd) | A = max(As0,Ad)

In this table, the following conventions are used:

- Rs0, Gs0, Bs0 and As0 represent the first source color R, G, B, and A components, respectively.

- Rd, Gd, Bd and Ad represent the R, G, B, and A components of the destination color. That is, the color currently in the corresponding color attachment for this fragment/sample.

- Sr, Sg, Sb and Sa represent the source blend factor R, G, B, and A components, respectively.

- Dr, Dg, Db and Da represent the destination blend factor R, G, B, and A components, respectively.

The blending operation produces a new set of values R, G, B and A, which are written to the framebuffer attachment. If blending is not enabled for this attachment, then R, G, B and A are assigned Rs0, Gs0, Bs0 and As0, respectively.

If the color attachment is fixed-point, the components of the source and destination values and blend factors are each clamped to [0,1] or [-1,1] respectively for an unsigned normalized or signed normalized color attachment prior to evaluating the blend operations. If the color attachment is floating-point, no clamping occurs.

If the numeric format of a framebuffer attachment uses sRGB encoding, the R, G, and B destination color values (after conversion from fixed-point to floating-point) are considered to be encoded for the sRGB color space and hence are linearized prior to their use in blending. Each R, G, and B component is converted from nonlinear to linear as described in the “sRGB EOTF” section of the Khronos Data Format Specification. If the format is not sRGB, no linearization is performed.

If the numeric format of a framebuffer attachment uses sRGB encoding, then the final R, G, and B values are converted into the nonlinear sRGB representation before being written to the framebuffer attachment as described in the “sRGB EOTF -1” section of the Khronos Data Format Specification.

If the numeric format of a framebuffer color attachment is not sRGB encoded, then the resulting cs values for R, G, and B are unmodified.

The value of A is never sRGB encoded. That is, the alpha component is always stored in memory as linear.

If the framebuffer color attachment is VK_ATTACHMENT_UNUSED, no writes are performed through that attachment. Writes are not performed to framebuffer color attachments greater than or equal to the `VkSubpassDescription`::`colorAttachmentCount` or `VkSubpassDescription2`::`colorAttachmentCount` value.

#### 36.1.4. Advanced Blend Operations

The advanced blend operations are those listed in tables f/X/Y/Z Advanced Blend Operations, Hue-Saturation-Luminosity Advanced Blend Operations, and Additional RGB Blend Operations.

If the `pNext` chain of VkPipelineColorBlendStateCreateInfo includes a `VkPipelineColorBlendAdvancedStateCreateInfoEXT` structure, then that structure includes parameters that affect advanced blend operations.

The `VkPipelineColorBlendAdvancedStateCreateInfoEXT` structure is defined as:

    // Provided by VK_EXT_blend_operation_advanced
    typedef struct VkPipelineColorBlendAdvancedStateCreateInfoEXT {
        VkStructureType      sType;
        const void*          pNext;
        VkBool32             srcPremultiplied;
        VkBool32             dstPremultiplied;
        VkBlendOverlapEXT    blendOverlap;
    } VkPipelineColorBlendAdvancedStateCreateInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `srcPremultiplied` specifies whether the source color of the blend operation is treated as premultiplied.

- `dstPremultiplied` specifies whether the destination color of the blend operation is treated as premultiplied.

- `blendOverlap` is a VkBlendOverlapEXT value specifying how the source and destination sample’s coverage is correlated.

If this structure is not present, `srcPremultiplied` and `dstPremultiplied` are both considered to be VK_TRUE, and `blendOverlap` is considered to be VK_BLEND_OVERLAP_UNCORRELATED_EXT.

Valid Usage

- VUID-VkPipelineColorBlendAdvancedStateCreateInfoEXT-srcPremultiplied-01424
  If the non-premultiplied source color property is not supported, `srcPremultiplied` must be VK_TRUE

- VUID-VkPipelineColorBlendAdvancedStateCreateInfoEXT-dstPremultiplied-01425
  If the non-premultiplied destination color property is not supported, `dstPremultiplied` must be VK_TRUE

- VUID-VkPipelineColorBlendAdvancedStateCreateInfoEXT-blendOverlap-01426
  If the correlated overlap property is not supported, `blendOverlap` must be VK_BLEND_OVERLAP_UNCORRELATED_EXT

Valid Usage (Implicit)

- VUID-VkPipelineColorBlendAdvancedStateCreateInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_ADVANCED_STATE_CREATE_INFO_EXT

- VUID-VkPipelineColorBlendAdvancedStateCreateInfoEXT-blendOverlap-parameter
  `blendOverlap` must be a valid VkBlendOverlapEXT value

Structure Chaining

Extends the structure

  - VkPipelineColorBlendStateCreateInfo

To dynamically set the advanced blend state, call:

    // Provided by VK_EXT_blend_operation_advanced with VK_EXT_extended_dynamic_state3, VK_EXT_blend_operation_advanced with VK_EXT_shader_object
    void vkCmdSetColorBlendAdvancedEXT(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    firstAttachment,
        uint32_t                                    attachmentCount,
        const VkColorBlendAdvancedEXT*              pColorBlendAdvanced);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `firstAttachment` the first color attachment the advanced blend parameters apply to.

- `attachmentCount` the number of VkColorBlendAdvancedEXT elements in the `pColorBlendAdvanced` array.

- `pColorBlendAdvanced` an array of VkColorBlendAdvancedEXT structs that specify the advanced color blend parameters for the corresponding attachments.

This command sets the advanced blend operation parameters of the specified attachments for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the VkPipelineColorBlendAdvancedStateCreateInfoEXT::`srcPremultiplied`, VkPipelineColorBlendAdvancedStateCreateInfoEXT::`dstPremultiplied`, and VkPipelineColorBlendAdvancedStateCreateInfoEXT::`blendOverlap` values used to create the currently active pipeline.

Valid Usage

- VUID-vkCmdSetColorBlendAdvancedEXT-None-09423
  At least one of the following must be true:

  - The `extendedDynamicState3ColorBlendAdvanced` feature is enabled

  - The `shaderObject` feature is enabled

Valid Usage (Implicit)

- VUID-vkCmdSetColorBlendAdvancedEXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetColorBlendAdvancedEXT-pColorBlendAdvanced-parameter
  `pColorBlendAdvanced` must be a valid pointer to an array of `attachmentCount` valid VkColorBlendAdvancedEXT structures

- VUID-vkCmdSetColorBlendAdvancedEXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetColorBlendAdvancedEXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetColorBlendAdvancedEXT-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdSetColorBlendAdvancedEXT-attachmentCount-arraylength
  `attachmentCount` must be greater than `0`

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetColorBlendAdvancedEXT is not affected by conditional rendering

The `VkColorBlendAdvancedEXT` structure is defined as:

    // Provided by VK_EXT_extended_dynamic_state3, VK_EXT_shader_object
    typedef struct VkColorBlendAdvancedEXT {
        VkBlendOp            advancedBlendOp;
        VkBool32             srcPremultiplied;
        VkBool32             dstPremultiplied;
        VkBlendOverlapEXT    blendOverlap;
        VkBool32             clampResults;
    } VkColorBlendAdvancedEXT;

- `advancedBlendOp` selects which blend operation is used to calculate the RGB values to write to the color attachment.

- `srcPremultiplied` specifies whether the source color of the blend operation is treated as premultiplied.

- `dstPremultiplied` specifies whether the destination color of the blend operation is treated as premultiplied.

- `blendOverlap` is a VkBlendOverlapEXT value specifying how the source and destination sample’s coverage is correlated.

- `clampResults` specifies that results must be clamped to the [0,1] range before writing to the attachment, which is useful when the attachment format is not normalized fixed-point.

Valid Usage

- VUID-VkColorBlendAdvancedEXT-srcPremultiplied-07505
  If the non-premultiplied source color property is not supported, `srcPremultiplied` must be VK_TRUE

- VUID-VkColorBlendAdvancedEXT-dstPremultiplied-07506
  If the non-premultiplied destination color property is not supported, `dstPremultiplied` must be VK_TRUE

- VUID-VkColorBlendAdvancedEXT-blendOverlap-07507
  If the correlated overlap property is not supported, `blendOverlap` must be VK_BLEND_OVERLAP_UNCORRELATED_EXT

Valid Usage (Implicit)

- VUID-VkColorBlendAdvancedEXT-advancedBlendOp-parameter
  `advancedBlendOp` must be a valid VkBlendOp value

- VUID-VkColorBlendAdvancedEXT-blendOverlap-parameter
  `blendOverlap` must be a valid VkBlendOverlapEXT value

When using one of the operations in table f/X/Y/Z Advanced Blend Operations or Hue-Saturation-Luminosity Advanced Blend Operations, blending is performed according to the following equations:

R G B A​====​f(R s′​,R d′​)∗p 0​(A s​,A d​)f(G s′​,G d′​)∗p 0​(A s​,A d​)f(B s′​,B d′​)∗p 0​(A s​,A d​)X∗p 0​(A s​,A d​)​++++​Y∗R s′​∗p 1​(A s​,A d​)Y∗G s′​∗p 1​(A s​,A d​)Y∗B s′​∗p 1​(A s​,A d​)Y∗p 1​(A s​,A d​)​++++​Z∗R d′​∗p 2​(A s​,A d​)Z∗G d′​∗p 2​(A s​,A d​)Z∗B d′​∗p 2​(A s​,A d​)Z∗p 2​(A s​,A d​)​

where the function f and terms X, Y, and Z are specified in the table. The R, G, and B components of the source color used for blending are derived according to `srcPremultiplied`. If `srcPremultiplied` is VK_TRUE, the fragment color components are considered to have been premultiplied by the A component prior to blending. The base source color (Rs',Gs',Bs') is obtained by dividing through by the A component:

(R s′​,G s′​,B s′​)​={(0, 0, 0)(A s​R s​​,A s​G s​​,A s​B s​​)​A s​=0 otherwise​​

If `srcPremultiplied` is VK_FALSE, the fragment color components are used as the base color:

(R s′​,G s′​,B s′​)​=(R s​,G s​,B s​)​

The R, G, and B components of the destination color used for blending are derived according to `dstPremultiplied`. If `dstPremultiplied` is VK_TRUE, the destination components are considered to have been premultiplied by the A component prior to blending. The base destination color (Rd',Gd',Bd') is obtained by dividing through by the A component:

(R d′​,G d′​,B d′​)​={(0, 0, 0)(A d​R d​​,A d​G d​​,A d​B d​​)​A d​=0 otherwise​​

If `dstPremultiplied` is VK_FALSE, the destination color components are used as the base color:

(R d′​,G d′​,B d′​)​=(R d​,G d​,B d​)​

When blending using advanced blend operations, we expect that the R, G, and B components of premultiplied source and destination color inputs be stored as the product of non-premultiplied R, G, and B component values and the A component of the color. If any R, G, or B component of a premultiplied input color is non-zero and the A component is zero, the color is considered ill-formed, and the corresponding component of the blend result is undefined.

All of the advanced blend operation formulas in this chapter compute the result as a premultiplied color. If `dstPremultiplied` is VK_FALSE, that result color’s R, G, and B components are divided by the A component before being written to the framebuffer. If any R, G, or B component of the color is non-zero and the A component is zero, the result is considered ill-formed, and the corresponding component of the blend result is undefined. If all components are zero, that value is unchanged.

If the A component of any input or result color is less than zero, the color is considered ill-formed, and all components of the blend result are undefined.

The weighting functions p0, p1, and p2 are defined in table Advanced Blend Overlap Modes. In these functions, the A components of the source and destination colors are taken to indicate the portion of the pixel covered by the fragment (source) and the fragments previously accumulated in the pixel (destination). The functions p0, p1, and p2 approximate the relative portion of the pixel covered by the intersection of the source and destination, covered only by the source, and covered only by the destination, respectively.

Possible values of VkPipelineColorBlendAdvancedStateCreateInfoEXT::`blendOverlap`, specifying the blend overlap functions, are:

    // Provided by VK_EXT_blend_operation_advanced
    typedef enum VkBlendOverlapEXT {
        VK_BLEND_OVERLAP_UNCORRELATED_EXT = 0,
        VK_BLEND_OVERLAP_DISJOINT_EXT = 1,
        VK_BLEND_OVERLAP_CONJOINT_EXT = 2,
    } VkBlendOverlapEXT;

- VK_BLEND_OVERLAP_UNCORRELATED_EXT specifies that there is no correlation between the source and destination coverage.

- VK_BLEND_OVERLAP_CONJOINT_EXT specifies that the source and destination coverage are considered to have maximal overlap.

- VK_BLEND_OVERLAP_DISJOINT_EXT specifies that the source and destination coverage are considered to have minimal overlap.

Table 45. Advanced Blend Overlap Modes
Overlap Mode | Weighting Equations
--- | ---
VK_BLEND_OVERLAP_UNCORRELATED_EXT | p 0​(A s​,A d​)p 1​(A s​,A d​)p 2​(A s​,A d​)​=A s​A d​=A s​(1−A d​)=A d​(1−A s​)​
VK_BLEND_OVERLAP_CONJOINT_EXT | p 0​(A s​,A d​)p 1​(A s​,A d​)p 2​(A s​,A d​)​=min(A s​,A d​)=max(A s​−A d​,0)=max(A d​−A s​,0)​
VK_BLEND_OVERLAP_DISJOINT_EXT | p 0​(A s​,A d​)p 1​(A s​,A d​)p 2​(A s​,A d​)​=max(A s​+A d​−1, 0)=min(A s​,1−A d​)=min(A d​,1−A s​)​

Table 46. f/X/Y/Z Advanced Blend Operations
Mode | Blend Coefficients
--- | ---
VK_BLEND_OP_ZERO_EXT | (X, Y, Z)f(C s​,C d​)​=(0, 0, 0)=0​
VK_BLEND_OP_SRC_EXT | (X, Y, Z)f(C s​,C d​)​=(1, 1, 0)=C s​​
VK_BLEND_OP_DST_EXT | (X, Y, Z)f(C s​,C d​)​=(1, 0, 1)=C d​​
VK_BLEND_OP_SRC_OVER_EXT | (X, Y, Z)f(C s​,C d​)​=(1, 1, 1)=C s​​
VK_BLEND_OP_DST_OVER_EXT | (X, Y, Z)f(C s​,C d​)​=(1, 1, 1)=C d​​
VK_BLEND_OP_SRC_IN_EXT | (X, Y, Z)f(C s​,C d​)​=(1, 0, 0)=C s​​
VK_BLEND_OP_DST_IN_EXT | (X, Y, Z)f(C s​,C d​)​=(1, 0, 0)=C d​​
VK_BLEND_OP_SRC_OUT_EXT | (X, Y, Z)f(C s​,C d​)​=(0, 1, 0)=0​
VK_BLEND_OP_DST_OUT_EXT | (X, Y, Z)f(C s​,C d​)​=(0, 0, 1)=0​
VK_BLEND_OP_SRC_ATOP_EXT | (X, Y, Z)f(C s​,C d​)​=(1, 0, 1)=C s​​
VK_BLEND_OP_DST_ATOP_EXT | (X, Y, Z)f(C s​,C d​)​=(1, 1, 0)=C d​​
VK_BLEND_OP_XOR_EXT | (X, Y, Z)f(C s​,C d​)​=(0, 1, 1)=0​
VK_BLEND_OP_MULTIPLY_EXT | (X, Y, Z)f(C s​,C d​)​=(1, 1, 1)=C s​C d​​
VK_BLEND_OP_SCREEN_EXT | (X, Y, Z)f(C s​,C d​)​=(1, 1, 1)=C s​+C d​−C s​C d​​
VK_BLEND_OP_OVERLAY_EXT | (X, Y, Z)f(C s​,C d​)​=(1, 1, 1)={2 C s​C d​1−2(1−C s​)(1−C d​)​C d​≤0.5 otherwise​​
VK_BLEND_OP_DARKEN_EXT | (X, Y, Z)f(C s​,C d​)​=(1, 1, 1)=min(C s​,C d​)​
VK_BLEND_OP_LIGHTEN_EXT | (X, Y, Z)f(C s​,C d​)​=(1, 1, 1)=max(C s​,C d​)​
VK_BLEND_OP_COLORDODGE_EXT | (X, Y, Z)f(C s​,C d​)​=(1, 1, 1)=⎩ ⎨ ⎧​0 min(1, 1−C s​C d​​)1​C d​≤0 C d​>0 and C s​<1 C d​>0 and C s​≥1​​
VK_BLEND_OP_COLORBURN_EXT | (X, Y, Z)f(C s​,C d​)​=(1, 1, 1)=⎩ ⎨ ⎧​1 1−min(1, C s​1−C d​​)0​C d​≥1 C d​<1 and C s​>0 C d​<1 and C s​≤0​​
VK_BLEND_OP_HARDLIGHT_EXT | (X, Y, Z)f(C s​,C d​)​=(1, 1, 1)={2 C s​C d​1−2(1−C s​)(1−C d​)​C s​≤0.5 otherwise​​
VK_BLEND_OP_SOFTLIGHT_EXT | (X, Y, Z)f(C s​,C d​)​=(1, 1, 1)=⎩ ⎨ ⎧​C d​−(1−2 C s​)C d​(1−C d​)C d​+(2 C s​−1)C d​((16 C d​−12)C d​+3)C d​+(2 C s​−1)(C d​ ​−C d​)​C s​≤0.5 C s​>0.5 and C d​≤0.25 C s​>0.5 and C d​>0.25​​
VK_BLEND_OP_DIFFERENCE_EXT | (X, Y, Z)f(C s​,C d​)​=(1, 1, 1)=∣C d​−C s​∣​
VK_BLEND_OP_EXCLUSION_EXT | (X, Y, Z)f(C s​,C d​)​=(1, 1, 1)=C s​+C d​−2 C s​C d​​
VK_BLEND_OP_INVERT_EXT | (X, Y, Z)f(C s​,C d​)​=(1, 0, 1)=1−C d​​
VK_BLEND_OP_INVERT_RGB_EXT | (X, Y, Z)f(C s​,C d​)​=(1, 0, 1)=C s​(1−C d​)​
VK_BLEND_OP_LINEARDODGE_EXT | (X, Y, Z)f(C s​,C d​)​=(1, 1, 1)={C s​+C d​1​C s​+C d​≤1 otherwise​​
VK_BLEND_OP_LINEARBURN_EXT | (X, Y, Z)f(C s​,C d​)​=(1, 1, 1)={C s​+C d​−1 0​C s​+C d​>1 otherwise​​
VK_BLEND_OP_VIVIDLIGHT_EXT | (X, Y, Z)f(C s​,C d​)​=(1, 1, 1)=⎩ ⎨ ⎧​1−min(1, 2 C s​1−C d​​)0 min(1, 2(1−C s​)C d​​)1​0<C s​<0.5 C s​≤0 0.5≤C s​<1 C s​≥1​​
VK_BLEND_OP_LINEARLIGHT_EXT | (X, Y, Z)f(C s​,C d​)​=(1, 1, 1)=⎩ ⎨ ⎧​1 2 C s​+C d​−1 0​2 C s​+C d​>2 1<2 C s​+C d​≤2 2 C s​+C d​≤1​​
VK_BLEND_OP_PINLIGHT_EXT | (X, Y, Z)f(C s​,C d​)​=(1, 1, 1)=⎩ ⎨ ⎧​0 2 C s​−1 2 C s​C d​​2 C s​−1>C d​ and C s​<0.5 2 C s​−1>C d​ and C s​≥0.5 2 C s​−1≤C d​ and C s​<0.5 C d​2 C s​−1≤C d​ and C s​≥0.5 C d​​​
VK_BLEND_OP_HARDMIX_EXT | (X, Y, Z)f(C s​,C d​)​=(1, 1, 1)={0 1​C s​+C d​<1 otherwise​​

When using one of the HSL blend operations in table Hue-Saturation-Luminosity Advanced Blend Operations as the blend operation, the RGB color components produced by the function f are effectively obtained by converting both the non-premultiplied source and destination colors to the HSL (hue, saturation, luminosity) color space, generating a new HSL color by selecting H, S, and L components from the source or destination according to the blend operation, and then converting the result back to RGB. In the equations below, a blended RGB color is produced according to the following pseudocode:

      float minv3(vec3 c) {
        return min(min(c.r, c.g), c.b);
      }
      float maxv3(vec3 c) {
        return max(max(c.r, c.g), c.b);
      }
      float lumv3(vec3 c) {
        return dot(c, vec3(0.30, 0.59, 0.11));
      }
      float satv3(vec3 c) {
        return maxv3(c) - minv3(c);
      }

      // If any color components are outside [0,1], adjust the color to
      // get the components in range.
      vec3 ClipColor(vec3 color) {
        float lum = lumv3(color);
        float mincol = minv3(color);
        float maxcol = maxv3(color);
        if (mincol < 0.0) {
          color = lum + ((color-lum)*lum) / (lum-mincol);
        }
        if (maxcol > 1.0) {
          color = lum + ((color-lum)*(1-lum)) / (maxcol-lum);
        }
        return color;
      }

      // Take the base RGB color <cbase> and override its luminosity
      // with that of the RGB color <clum>.
      vec3 SetLum(vec3 cbase, vec3 clum) {
        float lbase = lumv3(cbase);
        float llum = lumv3(clum);
        float ldiff = llum - lbase;
        vec3 color = cbase + vec3(ldiff);
        return ClipColor(color);
      }

      // Take the base RGB color <cbase> and override its saturation with
      // that of the RGB color <csat>.  The override the luminosity of the
      // result with that of the RGB color <clum>.
      vec3 SetLumSat(vec3 cbase, vec3 csat, vec3 clum)
      {
        float minbase = minv3(cbase);
        float sbase = satv3(cbase);
        float ssat = satv3(csat);
        vec3 color;
        if (sbase > 0) {
          // Equivalent (modulo rounding errors) to setting the
          // smallest (R,G,B) component to 0, the largest to <ssat>,
          // and interpolating the "middle" component based on its
          // original value relative to the smallest/largest.
          color = (cbase - minbase) * ssat / sbase;
        } else {
          color = vec3(0.0);
        }
        return SetLum(color, clum);
      }

Table 47. Hue-Saturation-Luminosity Advanced Blend Operations
Mode | Result
--- | ---
VK_BLEND_OP_HSL_HUE_EXT | (X, Y, Z)f(C s​,C d​)​=(1, 1, 1)=S etLum S at(C s​,C d​,C d​)​
VK_BLEND_OP_HSL_SATURATION_EXT | (X, Y, Z)f(C s​,C d​)​=(1, 1, 1)=S etLum S at(C d​,C s​,C d​)​
VK_BLEND_OP_HSL_COLOR_EXT | (X, Y, Z)f(C s​,C d​)​=(1, 1, 1)=S etLum(C s​,C d​)​
VK_BLEND_OP_HSL_LUMINOSITY_EXT | (X, Y, Z)f(C s​,C d​)​=(1, 1, 1)=S etLum(C d​,C s​)​

When using one of the operations in table Additional RGB Blend Operations as the blend operation, the source and destination colors used by these blending operations are interpreted according to `srcPremultiplied` and `dstPremultiplied`. The blending operations below are evaluated where the RGB source and destination color components are both considered to have been premultiplied by the corresponding A component.

(R s′​,G s′​,B s′​)(R d′​,G d′​,B d′​)​={(R s​,G s​,B s​)(R s​A s​,G s​A s​,B s​A s​)​if srcPremultiplied is VK_TRUE if srcPremultiplied is VK_FALSE​={(R d​,G d​,B d​)(R d​A d​,G d​A d​,B d​A d​)​if dstPremultiplied is VK_TRUE if dstPremultiplied is VK_FALSE​​

Table 48. Additional RGB Blend Operations
Mode | Result
--- | ---
VK_BLEND_OP_PLUS_EXT | (R, G, B, A)=(​R s′​+R d′​,G s′​+G d′​,B s′​+B d′​,A s​+A d​)​
VK_BLEND_OP_PLUS_CLAMPED_EXT | (R, G, B, A)=(​min(1, R s′​+R d′​),min(1, G s′​+G d′​),min(1, B s′​+B d′​),min(1, A s​+A d​))​
VK_BLEND_OP_PLUS_CLAMPED_ALPHA_EXT | (R, G, B, A)=(​min(min(1, A s​+A d​),R s′​+R d′​),min(min(1, A s​+A d​),G s′​+G d′​),min(min(1, A s​+A d​),B s′​+B d′​),min(1, A s​+A d​))​
VK_BLEND_OP_PLUS_DARKER_EXT | (R, G, B, A)=(​max(0, min(1, A s​+A d​)−((A s​−R s′​)+(A d​−R d′​))),max(0, min(1, A s​+A d​)−((A s​−G s′​)+(A d​−G d′​))),max(0, min(1, A s​+A d​)−((A s​−B s′​)+(A d​−B d′​))),min(1, A s​+A d​))​
VK_BLEND_OP_MINUS_EXT | (R, G, B, A)=(​R d′​−R s′​,G d′​−G s′​,B d′​−B s′​,A d​−A s​)​
VK_BLEND_OP_MINUS_CLAMPED_EXT | (R, G, B, A)=(​max(0, R d′​−R s′​),max(0, G d′​−G s′​),max(0, B d′​−B s′​),max(0, A d​−A s​))​
VK_BLEND_OP_CONTRAST_EXT | (R, G, B, A)=(​2 A d​​+2(R d′​−2 A d​​)(R s′​−2 A s​​),2 A d​​+2(G d′​−2 A d​​)(G s′​−2 A s​​),2 A d​​+2(B d′​−2 A d​​)(B s′​−2 A s​​),A d​)​
VK_BLEND_OP_INVERT_OVG_EXT | (R, G, B, A)=(​A s​(1−R d′​)+(1−A s​)R d′​,A s​(1−G d′​)+(1−A s​)G d′​,A s​(1−B d′​)+(1−A s​)B d′​,A s​+A d​−A s​A d​)​
VK_BLEND_OP_RED_EXT | (R, G, B, A)​=(R s′​,G d′​,B d′​,A d​)​
VK_BLEND_OP_GREEN_EXT | (R, G, B, A)​=(R d′​,G s′​,B d′​,A d​)​
VK_BLEND_OP_BLUE_EXT | (R, G, B, A)​=(R d′​,G d′​,B s′​,A d​)​

### 36.2. Logical Operations

The application can enable a logical operation between the fragment’s color values and the existing value in the framebuffer attachment. This logical operation is applied prior to updating the framebuffer attachment. Logical operations are applied only for signed and unsigned integer and normalized integer framebuffers. Logical operations are not applied to floating-point or sRGB format color attachments.

Logical operations are controlled by the `logicOpEnable` and `logicOp` members of VkPipelineColorBlendStateCreateInfo. The `logicOpEnable` state can also be controlled by vkCmdSetLogicOpEnableEXT if graphics pipeline is created with VK_DYNAMIC_STATE_LOGIC_OP_ENABLE_EXT set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. The `logicOp` state can also be controlled by vkCmdSetLogicOpEXT if graphics pipeline is created with VK_DYNAMIC_STATE_LOGIC_OP_EXT set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. If `logicOpEnable` is VK_TRUE, then a logical operation selected by `logicOp` is applied between each color attachment and the fragment’s corresponding output value, and blending of all attachments is treated as if it were disabled. Any attachments using color formats for which logical operations are not supported simply pass through the color values unmodified. The logical operation is applied independently for each of the red, green, blue, and alpha components. The `logicOp` is selected from the following operations:

    // Provided by VK_VERSION_1_0
    typedef enum VkLogicOp {
        VK_LOGIC_OP_CLEAR = 0,
        VK_LOGIC_OP_AND = 1,
        VK_LOGIC_OP_AND_REVERSE = 2,
        VK_LOGIC_OP_COPY = 3,
        VK_LOGIC_OP_AND_INVERTED = 4,
        VK_LOGIC_OP_NO_OP = 5,
        VK_LOGIC_OP_XOR = 6,
        VK_LOGIC_OP_OR = 7,
        VK_LOGIC_OP_NOR = 8,
        VK_LOGIC_OP_EQUIVALENT = 9,
        VK_LOGIC_OP_INVERT = 10,
        VK_LOGIC_OP_OR_REVERSE = 11,
        VK_LOGIC_OP_COPY_INVERTED = 12,
        VK_LOGIC_OP_OR_INVERTED = 13,
        VK_LOGIC_OP_NAND = 14,
        VK_LOGIC_OP_SET = 15,
    } VkLogicOp;

The logical operations supported by Vulkan are summarized in the following table in which

- ¬ is bitwise invert,

- ∧ is bitwise and,

- ∨ is bitwise or,

- ⊕ is bitwise exclusive or,

- s is the fragment’s Rs0, Gs0, Bs0 or As0 component value for the fragment output corresponding to the color attachment being updated, and

- d is the color attachment’s R, G, B or A component value:

Table 49. Logical Operations
Mode | Operation
--- | ---
VK_LOGIC_OP_CLEAR | 0
VK_LOGIC_OP_AND | s ∧ d
VK_LOGIC_OP_AND_REVERSE | s ∧ ¬ d
VK_LOGIC_OP_COPY | s
VK_LOGIC_OP_AND_INVERTED | ¬ s ∧ d
VK_LOGIC_OP_NO_OP | d
VK_LOGIC_OP_XOR | s ⊕ d
VK_LOGIC_OP_OR | s ∨ d
VK_LOGIC_OP_NOR | ¬ (s ∨ d)
VK_LOGIC_OP_EQUIVALENT | ¬ (s ⊕ d)
VK_LOGIC_OP_INVERT | ¬ d
VK_LOGIC_OP_OR_REVERSE | s ∨ ¬ d
VK_LOGIC_OP_COPY_INVERTED | ¬ s
VK_LOGIC_OP_OR_INVERTED | ¬ s ∨ d
VK_LOGIC_OP_NAND | ¬ (s ∧ d)
VK_LOGIC_OP_SET | all 1s

The result of the logical operation is then written to the color attachment as controlled by the component write mask, described in Blend Operations.

To dynamically set whether logical operations are enabled, call:

    // Provided by VK_EXT_extended_dynamic_state3, VK_EXT_shader_object
    void vkCmdSetLogicOpEnableEXT(
        VkCommandBuffer                             commandBuffer,
        VkBool32                                    logicOpEnable);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `logicOpEnable` specifies whether logical operations are enabled.

This command sets whether logical operations are enabled for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_LOGIC_OP_ENABLE_EXT set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the VkPipelineColorBlendStateCreateInfo::`logicOpEnable` value used to create the currently active pipeline.

Valid Usage

- VUID-vkCmdSetLogicOpEnableEXT-None-09423
  At least one of the following must be true:

  - The `extendedDynamicState3LogicOpEnable` feature is enabled

  - The `shaderObject` feature is enabled

- VUID-vkCmdSetLogicOpEnableEXT-logicOp-07366
  If the `logicOp` feature is not enabled, `logicOpEnable` must be VK_FALSE

Valid Usage (Implicit)

- VUID-vkCmdSetLogicOpEnableEXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetLogicOpEnableEXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetLogicOpEnableEXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetLogicOpEnableEXT-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetLogicOpEnableEXT is not affected by conditional rendering

To dynamically set the logical operation to apply for blend state, call:

    // Provided by VK_EXT_extended_dynamic_state2, VK_EXT_shader_object
    void vkCmdSetLogicOpEXT(
        VkCommandBuffer                             commandBuffer,
        VkLogicOp                                   logicOp);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `logicOp` specifies the logical operation to apply for blend state.

This command sets the logical operation for blend state for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_LOGIC_OP_EXT set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the VkPipelineColorBlendStateCreateInfo::`logicOp` value used to create the currently active pipeline.

Valid Usage

- VUID-vkCmdSetLogicOpEXT-None-09422
  At least one of the following must be true:

  - The `extendedDynamicState2LogicOp` feature is enabled

  - The `shaderObject` feature is enabled

Valid Usage (Implicit)

- VUID-vkCmdSetLogicOpEXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetLogicOpEXT-logicOp-parameter
  `logicOp` must be a valid VkLogicOp value

- VUID-vkCmdSetLogicOpEXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetLogicOpEXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetLogicOpEXT-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetLogicOpEXT is not affected by conditional rendering

### 36.3. Color Write Mask

Bits which can be set in VkPipelineColorBlendAttachmentState::`colorWriteMask`, determining whether the final color values R, G, B and A are written to the framebuffer attachment, are:

    // Provided by VK_VERSION_1_0
    typedef enum VkColorComponentFlagBits {
        VK_COLOR_COMPONENT_R_BIT = 0x00000001,
        VK_COLOR_COMPONENT_G_BIT = 0x00000002,
        VK_COLOR_COMPONENT_B_BIT = 0x00000004,
        VK_COLOR_COMPONENT_A_BIT = 0x00000008,
    } VkColorComponentFlagBits;

- VK_COLOR_COMPONENT_R_BIT specifies that the R value is written to the color attachment for the appropriate sample. Otherwise, the value in memory is unmodified.

- VK_COLOR_COMPONENT_G_BIT specifies that the G value is written to the color attachment for the appropriate sample. Otherwise, the value in memory is unmodified.

- VK_COLOR_COMPONENT_B_BIT specifies that the B value is written to the color attachment for the appropriate sample. Otherwise, the value in memory is unmodified.

- VK_COLOR_COMPONENT_A_BIT specifies that the A value is written to the color attachment for the appropriate sample. Otherwise, the value in memory is unmodified.

The color write mask operation is applied regardless of whether blending is enabled.

The color write mask operation is applied only if Color Write Enable is enabled for the respective attachment. Otherwise the color write mask is ignored and writes to all components of the attachment are disabled.

    // Provided by VK_VERSION_1_0
    typedef VkFlags VkColorComponentFlags;

`VkColorComponentFlags` is a bitmask type for setting a mask of zero or more VkColorComponentFlagBits.

### 36.4. Color Write Enable

The `VkPipelineColorWriteCreateInfoEXT` structure is defined as:

    // Provided by VK_EXT_color_write_enable
    typedef struct VkPipelineColorWriteCreateInfoEXT {
        VkStructureType    sType;
        const void*        pNext;
        uint32_t           attachmentCount;
        const VkBool32*    pColorWriteEnables;
    } VkPipelineColorWriteCreateInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `attachmentCount` is the number of VkBool32 elements in `pColorWriteEnables`.

- `pColorWriteEnables` is a pointer to an array of per target attachment boolean values specifying whether color writes are enabled for the given attachment.

When this structure is included in the `pNext` chain of VkPipelineColorBlendStateCreateInfo, it defines per-attachment color write state. If this structure is not included in the `pNext` chain, it is equivalent to specifying this structure with `attachmentCount` equal to the `attachmentCount` member of VkPipelineColorBlendStateCreateInfo, and `pColorWriteEnables` pointing to an array of as many VK_TRUE values.

If the `colorWriteEnable` feature is not enabled, all VkBool32 elements in the `pColorWriteEnables` array must be VK_TRUE.

Color Write Enable interacts with the Color Write Mask as follows:

- If `colorWriteEnable` is VK_TRUE, writes to the attachment are determined by the `colorWriteMask`.

- If `colorWriteEnable` is VK_FALSE, the `colorWriteMask` is ignored and writes to all components of the attachment are disabled. This is equivalent to specifying a `colorWriteMask` of 0.

Valid Usage

- VUID-VkPipelineColorWriteCreateInfoEXT-pAttachments-04801
  If the `colorWriteEnable` feature is not enabled, all elements of `pColorWriteEnables` must be VK_TRUE

- VUID-VkPipelineColorWriteCreateInfoEXT-attachmentCount-07608
  If the pipeline is being created with VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT, VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT, VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT, or VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT dynamic states not set, `attachmentCount` must be equal to the `attachmentCount` member of the `VkPipelineColorBlendStateCreateInfo` structure specified during pipeline creation

- VUID-VkPipelineColorWriteCreateInfoEXT-attachmentCount-06655
  `attachmentCount` must be less than or equal to the `maxColorAttachments` member of `VkPhysicalDeviceLimits`

Valid Usage (Implicit)

- VUID-VkPipelineColorWriteCreateInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PIPELINE_COLOR_WRITE_CREATE_INFO_EXT

- VUID-VkPipelineColorWriteCreateInfoEXT-pColorWriteEnables-parameter
  If `attachmentCount` is not `0`, `pColorWriteEnables` must be a valid pointer to an array of `attachmentCount` VkBool32 values

Structure Chaining

Extends the structure

  - VkPipelineColorBlendStateCreateInfo

To dynamically enable or disable writes to a color attachment, call:

    // Provided by VK_EXT_color_write_enable
    void vkCmdSetColorWriteEnableEXT(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    attachmentCount,
        const VkBool32*                             pColorWriteEnables);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `attachmentCount` is the number of VkBool32 elements in `pColorWriteEnables`.

- `pColorWriteEnables` is a pointer to an array of per target attachment boolean values specifying whether color writes are enabled for the given attachment.

This command sets the color write enables for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the VkPipelineColorWriteCreateInfoEXT::`pColorWriteEnables` values used to create the currently active pipeline.

Valid Usage

- VUID-vkCmdSetColorWriteEnableEXT-None-04803
  The `colorWriteEnable` feature must be enabled

- VUID-vkCmdSetColorWriteEnableEXT-attachmentCount-06656
  `attachmentCount` must be less than or equal to the `maxColorAttachments` member of `VkPhysicalDeviceLimits`

Valid Usage (Implicit)

- VUID-vkCmdSetColorWriteEnableEXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetColorWriteEnableEXT-pColorWriteEnables-parameter
  `pColorWriteEnables` must be a valid pointer to an array of `attachmentCount` VkBool32 values

- VUID-vkCmdSetColorWriteEnableEXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetColorWriteEnableEXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetColorWriteEnableEXT-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdSetColorWriteEnableEXT-attachmentCount-arraylength
  `attachmentCount` must be greater than `0`

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetColorWriteEnableEXT is not affected by conditional rendering

### 36.5. Framebuffer Query Instructions

To query the tile properties from the attachments in framebuffer, call:

    // Provided by VK_QCOM_tile_properties
    VkResult vkGetFramebufferTilePropertiesQCOM(
        VkDevice                                    device,
        VkFramebuffer                               framebuffer,
        uint32_t*                                   pPropertiesCount,
        VkTilePropertiesQCOM*                       pProperties);

- `device` is a logical device associated with the framebuffer.

- `framebuffer` is a handle of the framebuffer to query.

- `pPropertiesCount` is a pointer to an integer related to the number of tile properties available or queried, as described below.

- `pProperties` is either `NULL` or a pointer to an array of VkTilePropertiesQCOM structures.

If `pProperties` is `NULL`, then the number of tile properties available is returned in `pPropertiesCount`. Otherwise, `pPropertiesCount` must point to a variable set by the application to the number of elements in the `pProperties` array, and on return the variable is overwritten with the number of properties actually written to `pProperties`. If `pPropertiesCount` is less than the number of tile properties available, at most `pPropertiesCount` structures will be written, and VK_INCOMPLETE will be returned instead of VK_SUCCESS, to indicate that not all the available properties were returned.

The number of tile properties available is determined by the number of merged subpasses, and each tile property is associated with a merged subpass. There will be at most as many properties as there are subpasses within the render pass. To obtain the tile properties for a given merged subpass, the `pProperties` array can be indexed using the `postMergeIndex` value provided in VkRenderPassSubpassFeedbackInfoEXT.

Valid Usage (Implicit)

- VUID-vkGetFramebufferTilePropertiesQCOM-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetFramebufferTilePropertiesQCOM-framebuffer-parameter
  `framebuffer` must be a valid VkFramebuffer handle

- VUID-vkGetFramebufferTilePropertiesQCOM-pPropertiesCount-parameter
  `pPropertiesCount` must be a valid pointer to a `uint32_t` value

- VUID-vkGetFramebufferTilePropertiesQCOM-pProperties-parameter
  If the value referenced by `pPropertiesCount` is not `0`, and `pProperties` is not `NULL`, `pProperties` must be a valid pointer to an array of `pPropertiesCount` VkTilePropertiesQCOM structures

- VUID-vkGetFramebufferTilePropertiesQCOM-framebuffer-parent
  `framebuffer` must have been created, allocated, or retrieved from `device`

Return Codes

Success

  - VK_INCOMPLETE

  - VK_SUCCESS

Failure

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

## 37. Dispatching Commands

The dispatching commands described in this chapter provoke work in a compute pipeline. Dispatching commands are recorded into a command buffer and when executed by a queue, will produce work which executes according to the bound compute pipeline. A compute pipeline must be bound to a command buffer before any dispatching commands are recorded in that command buffer.

To record a dispatch, call:

    // Provided by VK_VERSION_1_0
    void vkCmdDispatch(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    groupCountX,
        uint32_t                                    groupCountY,
        uint32_t                                    groupCountZ);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `groupCountX` is the number of local workgroups to dispatch in the X dimension.

- `groupCountY` is the number of local workgroups to dispatch in the Y dimension.

- `groupCountZ` is the number of local workgroups to dispatch in the Z dimension.

When the command is executed, a global workgroup consisting of `groupCountX` × `groupCountY` × `groupCountZ` local workgroups is assembled.

Valid Usage

- VUID-vkCmdDispatch-magFilter-04553
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdDispatch-magFilter-09598
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdDispatch-mipmapMode-04770
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdDispatch-mipmapMode-09599
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdDispatch-unnormalizedCoordinates-09635
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `levelCount` and `layerCount` must be 1

- VUID-vkCmdDispatch-None-08609
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `viewType` must be VK_IMAGE_VIEW_TYPE_1D or VK_IMAGE_VIEW_TYPE_2D

- VUID-vkCmdDispatch-None-08610
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions with `ImplicitLod`, `Dref` or `Proj` in their name

- VUID-vkCmdDispatch-None-08611
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions that includes a LOD bias or any offset values

- VUID-vkCmdDispatch-None-06479
  If a VkImageView is sampled with depth comparison, the image view’s format features must contain VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT

- VUID-vkCmdDispatch-None-02691
  If a VkImageView is accessed using atomic operations as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT

- VUID-vkCmdDispatch-None-07888
  If a VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER descriptor is accessed using atomic operations as a result of this command, then the storage texel buffer’s format features must contain VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT

- VUID-vkCmdDispatch-None-02692
  If a VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT

- VUID-vkCmdDispatch-None-02693
  If the VK_EXT_filter_cubic extension is not enabled and any VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, it must not have a VkImageViewType of VK_IMAGE_VIEW_TYPE_3D, VK_IMAGE_VIEW_TYPE_CUBE, or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY

- VUID-vkCmdDispatch-filterCubic-02694
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have a VkImageViewType and format that supports cubic filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubic` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdDispatch-filterCubicMinmax-02695
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX as a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubicMinmax` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdDispatch-cubicRangeClamp-09212
  If the `cubicRangeClamp` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must not have a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM

- VUID-vkCmdDispatch-reductionMode-09213
  Any VkImageView being sampled with a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM as a result of this command must sample with VK_FILTER_CUBIC_EXT

- VUID-vkCmdDispatch-selectableCubicWeights-09214
  If the `selectableCubicWeights` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have VkSamplerCubicWeightsCreateInfoQCOM::`cubicWeights` equal to VK_CUBIC_FILTER_WEIGHTS_CATMULL_ROM_QCOM

- VUID-vkCmdDispatch-flags-02696
  Any VkImage created with a VkImageCreateInfo::`flags` containing VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV sampled as a result of this command must only be sampled using a VkSamplerAddressMode of VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDispatch-OpTypeImage-07027
  For any VkImageView being written as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdDispatch-OpTypeImage-07028
  For any VkImageView being read as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdDispatch-OpTypeImage-07029
  For any VkBufferView being written as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown`, the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdDispatch-OpTypeImage-07030
  Any VkBufferView being read as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown` then the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdDispatch-None-08600
  If a a bound shader was created with a pipeline layout and statically uses a set n, a descriptor set must have been bound to n at the same pipeline bind point, with layouts compatible for set n with the layout(s) used to create the shader, as described in Pipeline Layout Compatibility

- VUID-vkCmdDispatch-None-08601
  If a a bound shader was created with a pipeline layout or specified push constant ranges and statically uses a push constant value, that value must have been set for the same pipeline bind point, with push constant ranges that are compatible with the push constant range used to create the shader

- VUID-vkCmdDispatch-None-10068
  For each array of resources that is used by a bound shader, the indices used to access members of the array must be less than the descriptor count for the identified binding in the descriptor sets used by this command

- VUID-vkCmdDispatch-None-08114
  Descriptors in each bound descriptor set, specified via vkCmdBindDescriptorSets, must be valid if they are accessed as described by descriptor validity by the VkPipeline bound to the pipeline bind point used by this command and the bound VkPipeline was not created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDispatch-imageLayout-00344
  If an image descriptor is accessed by a shader, the VkImageLayout must match the subresource accessible from the VkImageView as defined by the image layout matching rules

- VUID-vkCmdDispatch-None-08115
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdBindDescriptorSets, the bound VkPipeline must have been created without VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDispatch-None-08116
  Descriptors in bound descriptor buffers, specified via vkCmdSetDescriptorBufferOffsetsEXT, must be valid if they are dynamically accessed

- VUID-vkCmdDispatch-None-08117
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdSetDescriptorBufferOffsetsEXT, the bound VkPipeline must have been created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDispatch-None-08119
  If a descriptor is dynamically used with a VkPipeline created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdDispatch-None-08605
  If a descriptor is dynamically used with a VkShaderEXT created with a `VkDescriptorSetLayout` that was created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdDispatch-None-08606
  If the `shaderObject` feature is not enabled, a valid pipeline must be bound to the pipeline bind point used by this command

- VUID-vkCmdDispatch-None-08608
  If a pipeline is bound to the pipeline bind point used by this command, there must not have been any calls to dynamic state setting commands for any state specified statically in the VkPipeline object bound to the pipeline bind point used by this command, since that pipeline was bound

- VUID-vkCmdDispatch-uniformBuffers-06935
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDispatch-None-08612
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDispatch-storageBuffers-06936
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDispatch-None-08613
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a storage buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDispatch-commandBuffer-02707
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, any resource accessed by bound shaders must not be a protected resource

- VUID-vkCmdDispatch-viewType-07752
  If a VkImageView is accessed as a result of this command, then the image view’s `viewType` must match the `Dim` operand of the `OpTypeImage` as described in Compatibility Between SPIR-V Image Dimensions and Vulkan ImageView Types

- VUID-vkCmdDispatch-format-07753
  If a VkImageView or VkBufferView is accessed as a result of this command, then the numeric type of the view’s `format` and the `Sampled` `Type` operand of the `OpTypeImage` must match

- VUID-vkCmdDispatch-OpImageWrite-08795
  If a VkImageView created with a format other than VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the image view’s format

- VUID-vkCmdDispatch-OpImageWrite-08796
  If a VkImageView created with the format VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have four components

- VUID-vkCmdDispatch-OpImageWrite-04469
  If a VkBufferView is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the buffer view’s format

- VUID-vkCmdDispatch-SampledType-04470
  If a VkImageView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdDispatch-SampledType-04471
  If a VkImageView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdDispatch-SampledType-04472
  If a VkBufferView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdDispatch-SampledType-04473
  If a VkBufferView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdDispatch-sparseImageInt64Atomics-04474
  If the `sparseImageInt64Atomics` feature is not enabled, VkImage objects created with the VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdDispatch-sparseImageInt64Atomics-04475
  If the `sparseImageInt64Atomics` feature is not enabled, VkBuffer objects created with the VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdDispatch-OpImageSampleWeightedQCOM-06971
  If `OpImageSampleWeightedQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_SAMPLED_IMAGE_BIT_QCOM

- VUID-vkCmdDispatch-OpImageSampleWeightedQCOM-06972
  If `OpImageSampleWeightedQCOM` uses a VkImageView as a sample weight image as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_IMAGE_BIT_QCOM

- VUID-vkCmdDispatch-OpImageBoxFilterQCOM-06973
  If `OpImageBoxFilterQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BOX_FILTER_SAMPLED_BIT_QCOM

- VUID-vkCmdDispatch-OpImageBlockMatchSSDQCOM-06974
  If `OpImageBlockMatchSSDQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdDispatch-OpImageBlockMatchSADQCOM-12420
  If `OpImageBlockMatchSADQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdDispatch-OpImageBlockMatchSADQCOM-06976
  If `OpImageBlockMatchSADQCOM` or OpImageBlockMatchSSDQCOM is used to read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdDispatch-OpImageSampleWeightedQCOM-06977
  If `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdDispatch-OpImageSampleWeightedQCOM-06978
  If any command other than `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must not have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdDispatch-OpImageBlockMatchWindow-09215
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM

- VUID-vkCmdDispatch-OpImageBlockMatchWindow-09216
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format must be a single-component format

- VUID-vkCmdDispatch-OpImageBlockMatchWindow-09217
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdDispatch-OpImageBlockMatchWindow-12421
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the `blockMatchExtendedClampToEdge` feature is not enabled, the input sampler must not have been created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDispatch-addressModeU-12422
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the input sampler was created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, then the sampler must have been created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDispatch-None-07288
  Any shader invocation executed by this command must terminate

- VUID-vkCmdDispatch-None-09600
  If a descriptor with type equal to any of VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, or VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT is accessed as a result of this command, all image subresources identified by that descriptor must be in the image layout identified when the descriptor was written

- VUID-vkCmdDispatch-micromap-11636
  If an acceleration structure is accessed as a result of this command through an `OpRayQueryProceedKHR` operation , the `VK_EXT_opacity_micromap` extension is not enabled, and the acceleration structure is built using geometry with a VkAccelerationStructureTrianglesOpacityMicromapKHR structure included in its `pNext` chain, the shader must have specified a `OpacityMicromapIdKHR` execution mode with its specialization constant operand equal to VK_TRUE

- VUID-vkCmdDispatch-micromap-11637
  If an acceleration structure is accessed as a result of this command and the acceleration structure was constructed through deserialization, all micromap arrays referenced by the acceleration structure that were not replaced by an acceleration structure update command must have been deserialized using the serialized data of the corresponding micromaps used to originally build the acceleration structure prior to the execution of this command on the device

- VUID-vkCmdDispatch-micromap-11638
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkPipeline bound to the pipeline bind point used by this command must not have been created with `flags` that includes VK_PIPELINE_CREATE_2_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_KHR

- VUID-vkCmdDispatch-micromap-11639
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkShaderEXT that accessed the descriptor must not have been created with `flags` that includes VK_SHADER_CREATE_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_EXT

- VUID-vkCmdDispatch-commandBuffer-10746
  The `VkDeviceMemory` object allocated from a `VkMemoryHeap` with the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property that is bound to a resource accessed as a result of this command must be the active bound tile memory object in `commandBuffer`

- VUID-vkCmdDispatch-None-10678
  If this command is recorded inside a tile shading render pass instance, the stages corresponding to the pipeline bind point used by this command must only include VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_FRAGMENT_BIT, and/or VK_SHADER_STAGE_COMPUTE_BIT

- VUID-vkCmdDispatch-None-10679
  If this command is recorded where per-tile execution model is enabled, there must be no access to any image while the image was be transitioned to the VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT layout

- VUID-vkCmdDispatch-pDescription-09900
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the underlying VkTensorARM object must have been created with the VK_TENSOR_USAGE_SHADER_BIT_ARM usage flag set

- VUID-vkCmdDispatch-dimensionCount-09905
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the `Rank` of the `OpTypeTensorARM` of the tensor resource variable must be equal to the `dimensionCount` provided via VkTensorCreateInfoARM::`pDescription` when creating the underlying VkTensorARM object

- VUID-vkCmdDispatch-OpTypeTensorARM-09906
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the element type of the `OpTypeTensorARM` of the tensor resource variable must be compatible with the VkFormat of the VkTensorViewARM used for the access

- VUID-vkCmdDispatch-OpTensorReadARM-12462
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, using `OpTensorReadARM` or `OpTensorWriteARM`, and the underlying VkTensorARM object was created with a VK_TENSOR_TILING_BRICK_16_WIDE_ARM, VK_TENSOR_TILING_BRICK_8_WIDE_ARM, VK_TENSOR_TILING_BRICK_4_WIDE_ARM, VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_ARM, or VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_64K_ARM VkTensorTilingARM, and the object read or written is an array, then the innermost coordinate provided to `OpTensorReadARM` or `OpTensorWriteARM` via the `Coordinates` operand must be a multiple of the largest power of 2 that is less than or equal to the number of components of the array

- VUID-vkCmdDispatch-pNext-12463
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command and the corresponding VkTensorARM object was created with a VkTensorRollingBackingCreateInfoARM structure in the `pNext` chain of VkTensorCreateInfoARM, then the number of elements accessed with one `OpTensorReadARM` or `OpTensorWriteARM`, must be less than or equal to the number of elements available from the starting coordinate in the rolling backing along the innermost dimension, defined as `wraps`[`dimensionCount` - 1] - InnermostCoordinate % `wraps`[`dimensionCount` - 1] where InnermostCoordinate is the last component of the coordinates array provided via the `Coordinates` operand

- VUID-vkCmdDispatch-None-12472
  Descriptors dynamically accessed in bound descriptor heaps must be valid

- VUID-vkCmdDispatch-None-11297
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a `OpTypeStruct` decorated with `Block` or `BufferBlock` using that mapping, the calculated offset for the resource heap must be a multiple of `bufferDescriptorAlignment`

- VUID-vkCmdDispatch-None-11298
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeImage` or `OpTypeSampledImage` using that mapping, the calculated offset for the resource heap must be a multiple of `imageDescriptorAlignment`

- VUID-vkCmdDispatch-None-11299
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeSampler` or `OpTypeSampledImage` using that mapping, the calculated offset for the sampler heap must be a multiple of `samplerDescriptorAlignment`

- VUID-vkCmdDispatch-None-11397
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeTensorARM` using that mapping, the calculated offset for the resource heap must be a multiple of `tensorDescriptorAlignment`

- VUID-vkCmdDispatch-None-11300
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 4

- VUID-vkCmdDispatch-None-11301
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdDispatch-None-11302
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress

- VUID-vkCmdDispatch-None-11304
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 8

- VUID-vkCmdDispatch-None-11305
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdDispatch-None-11306
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address pointed to by the address in push data must be a valid VkDeviceAddress

- VUID-vkCmdDispatch-None-11308
  For each descriptor heap that is statically used by a bound shader, either directly or via a descriptor mapping, a valid descriptor heap must be bound

- VUID-vkCmdDispatch-None-11309
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, execution of this command must not result in any descriptor read accessing data outside of the user range of the respective heap bound by `vkCmdBind*HeapEXT` commands

- VUID-vkCmdDispatch-None-11372
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer or uniform texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified via VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDispatch-None-11373
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer or storage texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDispatch-None-11374
  If the `robustBufferAccess2` feature is not enabled, the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, uniform texel buffer, storage buffer, or storage texel buffer, that shader must not access values outside of the range of the buffer as specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDispatch-pBindInfo-11375
  If any bound shader uses an embedded sampler via a descriptor mapping, the value of `pBindInfo->reservedRangeSize` set for vkCmdBindSamplerHeapEXT must be greater than or equal to `minSamplerHeapReservedRangeWithEmbedded`

- VUID-vkCmdDispatch-None-11376
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, and that shader statically uses a push constant value, that value must have been set by vkCmdPushDataEXT

- VUID-vkCmdDispatch-None-11398
  If a bound shader was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the access must not be out of bounds

- VUID-vkCmdDispatch-None-11437
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the buffer from which the address in push data was queried must have been created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdDispatch-None-11438
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdDispatch-None-11441
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must be aligned to `minUniformBufferOffsetAlignment`

- VUID-vkCmdDispatch-None-11439
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_STORAGE_BUFFER_BIT usage flag set

- VUID-vkCmdDispatch-None-11442
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must be aligned to `minStorageBufferOffsetAlignment`

- VUID-vkCmdDispatch-None-11485
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses an acceleration structure using that mapping, the address that the acceleration structure is mapped to must be an acceleration structure address retrieved from a VkAccelerationStructureKHR object via vkGetAccelerationStructureDeviceAddressKHR or handle retrieved from a VkAccelerationStructureNV object via vkGetAccelerationStructureHandleNV

- VUID-vkCmdDispatch-index-11450
  If a shader uses a sampler descriptor to sample an image as a result of this command, and that sampler descriptor uses a custom border color with an index defined by VkSamplerCustomBorderColorIndexCreateInfoEXT, the value of VkSamplerCustomBorderColorIndexCreateInfoEXT::`index` must have been registered before this command was recorded, and still be registered during the sampling operation, with an identically defined color

- VUID-vkCmdDispatch-protectedNoFault-11455
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, the address that the resource is mapped to must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdDispatch-protectedNoFault-11456
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, the address of the indirect memory must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdDispatch-None-10672
  If the per-tile execution model is not enabled, this command must be called outside of a render pass instance

- VUID-vkCmdDispatch-aspectMask-10673
  If this command is recorded where per-tile execution model is enabled, and if the VkPipeline object bound to the pipeline bind point used by this command writes to a variable of storage class `Storage` `Class` `TileAttachmentQCOM`, the corresponding VkImageView using must not have been created with an `aspectMask` that contains VK_IMAGE_ASPECT_DEPTH_BIT or VK_IMAGE_ASPECT_STENCIL_BIT

- VUID-vkCmdDispatch-None-10674
  If the per-tile execution model is enabled, the tileShadingPerTileDispatch feature must be enabled

- VUID-vkCmdDispatch-None-10675
  Memory backing image subresources used as tile attachments in the current render pass must not be written in any way other than as a tile attachment by this command

- VUID-vkCmdDispatch-None-10676
  If any recorded command in the current subpass will write to an image subresource as a tile attachment, this command must not read from the memory backing that image subresource in any other way than as a tile attachment

- VUID-vkCmdDispatch-None-10743
  If there is no bound compute pipeline, a valid `VkShaderEXT` must be bound to the VK_SHADER_STAGE_COMPUTE_BIT stage

- VUID-vkCmdDispatch-commandBuffer-02712
  If `commandBuffer` is a protected command buffer and `protectedNoFault` is not supported, any resource written to by the `VkPipeline` object bound to the pipeline bind point used by this command must not be an unprotected resource

- VUID-vkCmdDispatch-commandBuffer-02713
  If `commandBuffer` is a protected command buffer and `protectedNoFault` is not supported, pipeline stages other than the framebuffer-space and compute stages in the `VkPipeline` object bound to the pipeline bind point used by this command must not write to any resource

- VUID-vkCmdDispatch-commandBuffer-04617
  If any of the shader stages of the `VkPipeline` bound to the pipeline bind point used by this command uses the `RayQueryKHR` capability, then `commandBuffer` must not be a protected command buffer

- VUID-vkCmdDispatch-groupCountX-00386
  `groupCountX` must be less than or equal to `VkPhysicalDeviceLimits`::`maxComputeWorkGroupCount`[0]

- VUID-vkCmdDispatch-groupCountY-00387
  `groupCountY` must be less than or equal to `VkPhysicalDeviceLimits`::`maxComputeWorkGroupCount`[1]

- VUID-vkCmdDispatch-groupCountZ-00388
  `groupCountZ` must be less than or equal to `VkPhysicalDeviceLimits`::`maxComputeWorkGroupCount`[2]

Valid Usage (Implicit)

- VUID-vkCmdDispatch-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdDispatch-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdDispatch-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT operations

- VUID-vkCmdDispatch-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdDispatch-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_COMPUTE_BIT | Action

Conditional Rendering

vkCmdDispatch is affected by conditional rendering

`VkDispatchIndirect2InfoKHR` is defined as:

    // Provided by VK_KHR_device_address_commands
    typedef struct VkDispatchIndirect2InfoKHR {
        VkStructureType             sType;
        const void*                 pNext;
        VkDeviceAddressRangeKHR     addressRange;
        VkAddressCommandFlagsKHR    addressFlags;
    } VkDispatchIndirect2InfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `addressRange` is the VkDeviceAddressRangeKHR containing dispatch parameters.

- `addressFlags` is a VkAddressCommandFlagsKHR value defining the flags for the address range.

Valid Usage

- VUID-VkDispatchIndirect2InfoKHR-addressRange-13097
  If the range specified by `addressRange` is not bound completely to memory when accessed, `addressFlags` must not include VK_ADDRESS_COMMAND_FULLY_BOUND_BIT_KHR

- VUID-VkDispatchIndirect2InfoKHR-addressRange-13098
  If the buffer from which the range specified by `addressRange` was created with VK_BUFFER_CREATE_PROTECTED_BIT, and `protectedNoFault` is not supported, `addressFlags` must include VK_ADDRESS_COMMAND_PROTECTED_BIT_KHR

- VUID-VkDispatchIndirect2InfoKHR-addressRange-13099
  If the buffer from which the range specified by `addressRange` was created without VK_BUFFER_CREATE_PROTECTED_BIT, and `protectedNoFault` is not supported, `addressFlags` must not include VK_ADDRESS_COMMAND_PROTECTED_BIT_KHR

- VUID-VkDispatchIndirect2InfoKHR-addressFlags-13100
  `addressFlags` must not include both VK_ADDRESS_COMMAND_STORAGE_BUFFER_USAGE_BIT_KHR and VK_ADDRESS_COMMAND_UNKNOWN_STORAGE_BUFFER_USAGE_BIT_KHR

- VUID-VkDispatchIndirect2InfoKHR-addressRange-13122
  If any buffer, which is bound to a range of VkDeviceMemory that overlaps the range backing `addressRange`, was created with VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, `addressFlags` must include VK_ADDRESS_COMMAND_STORAGE_BUFFER_USAGE_BIT_KHR or VK_ADDRESS_COMMAND_UNKNOWN_STORAGE_BUFFER_USAGE_BIT_KHR

- VUID-VkDispatchIndirect2InfoKHR-addressRange-13123
  If any buffer, which is bound to a range of VkDeviceMemory that overlaps the range backing `addressRange`, was created without VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, `addressFlags` must not include VK_ADDRESS_COMMAND_STORAGE_BUFFER_USAGE_BIT_KHR

- VUID-VkDispatchIndirect2InfoKHR-addressFlags-13101
  `addressFlags` must not include both VK_ADDRESS_COMMAND_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR and VK_ADDRESS_COMMAND_UNKNOWN_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR

- VUID-VkDispatchIndirect2InfoKHR-addressRange-13124
  If any buffer, which is bound to a range of VkDeviceMemory that overlaps the range backing `addressRange`, was created with VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT, `addressFlags` must include VK_ADDRESS_COMMAND_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR or VK_ADDRESS_COMMAND_UNKNOWN_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR

- VUID-VkDispatchIndirect2InfoKHR-addressRange-13125
  If any buffer, which is bound to a range of VkDeviceMemory that overlaps the range backing `addressRange`, was created without VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT, `addressFlags` must not include VK_ADDRESS_COMMAND_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR

- VUID-VkDispatchIndirect2InfoKHR-addressRange-13107
  The buffer from which `addressRange` was queried must have been created with VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT usage flag

- VUID-VkDispatchIndirect2InfoKHR-protectedNoFault-13108
  If `protectedNoFault` is not supported, the buffer from which `addressRange` was queried must not have been created with VK_BUFFER_CREATE_PROTECTED_BIT

- VUID-VkDispatchIndirect2InfoKHR-addressRange-13109
  `addressRange.address` must be a multiple of 4

Valid Usage (Implicit)

- VUID-VkDispatchIndirect2InfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DISPATCH_INDIRECT_2_INFO_KHR

- VUID-VkDispatchIndirect2InfoKHR-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkDispatchIndirect2InfoKHR-addressFlags-parameter
  `addressFlags` must be a valid combination of VkAddressCommandFlagBitsKHR values

To record an indirect dispatching command, call:

    // Provided by VK_KHR_device_address_commands
    void vkCmdDispatchIndirect2KHR(
        VkCommandBuffer                             commandBuffer,
        const VkDispatchIndirect2InfoKHR*           pInfo);

- `commandBuffer` is the command buffer into which the command is recorded.

- `pInfo` is a pointer to a VkDispatchIndirect2InfoKHR structure defining parameters of this command.

`vkCmdDispatchIndirect2KHR` behaves similarly to vkCmdDispatchIndirect except that the parameters, encoded in a VkDispatchIndirectCommand structure, are read by the device from an address range during execution.

Valid Usage

- VUID-vkCmdDispatchIndirect2KHR-magFilter-04553
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdDispatchIndirect2KHR-magFilter-09598
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdDispatchIndirect2KHR-mipmapMode-04770
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdDispatchIndirect2KHR-mipmapMode-09599
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdDispatchIndirect2KHR-unnormalizedCoordinates-09635
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `levelCount` and `layerCount` must be 1

- VUID-vkCmdDispatchIndirect2KHR-None-08609
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `viewType` must be VK_IMAGE_VIEW_TYPE_1D or VK_IMAGE_VIEW_TYPE_2D

- VUID-vkCmdDispatchIndirect2KHR-None-08610
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions with `ImplicitLod`, `Dref` or `Proj` in their name

- VUID-vkCmdDispatchIndirect2KHR-None-08611
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions that includes a LOD bias or any offset values

- VUID-vkCmdDispatchIndirect2KHR-None-06479
  If a VkImageView is sampled with depth comparison, the image view’s format features must contain VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT

- VUID-vkCmdDispatchIndirect2KHR-None-02691
  If a VkImageView is accessed using atomic operations as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT

- VUID-vkCmdDispatchIndirect2KHR-None-07888
  If a VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER descriptor is accessed using atomic operations as a result of this command, then the storage texel buffer’s format features must contain VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT

- VUID-vkCmdDispatchIndirect2KHR-None-02692
  If a VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT

- VUID-vkCmdDispatchIndirect2KHR-None-02693
  If the VK_EXT_filter_cubic extension is not enabled and any VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, it must not have a VkImageViewType of VK_IMAGE_VIEW_TYPE_3D, VK_IMAGE_VIEW_TYPE_CUBE, or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY

- VUID-vkCmdDispatchIndirect2KHR-filterCubic-02694
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have a VkImageViewType and format that supports cubic filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubic` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdDispatchIndirect2KHR-filterCubicMinmax-02695
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX as a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubicMinmax` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdDispatchIndirect2KHR-cubicRangeClamp-09212
  If the `cubicRangeClamp` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must not have a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM

- VUID-vkCmdDispatchIndirect2KHR-reductionMode-09213
  Any VkImageView being sampled with a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM as a result of this command must sample with VK_FILTER_CUBIC_EXT

- VUID-vkCmdDispatchIndirect2KHR-selectableCubicWeights-09214
  If the `selectableCubicWeights` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have VkSamplerCubicWeightsCreateInfoQCOM::`cubicWeights` equal to VK_CUBIC_FILTER_WEIGHTS_CATMULL_ROM_QCOM

- VUID-vkCmdDispatchIndirect2KHR-flags-02696
  Any VkImage created with a VkImageCreateInfo::`flags` containing VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV sampled as a result of this command must only be sampled using a VkSamplerAddressMode of VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDispatchIndirect2KHR-OpTypeImage-07027
  For any VkImageView being written as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdDispatchIndirect2KHR-OpTypeImage-07028
  For any VkImageView being read as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdDispatchIndirect2KHR-OpTypeImage-07029
  For any VkBufferView being written as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown`, the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdDispatchIndirect2KHR-OpTypeImage-07030
  Any VkBufferView being read as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown` then the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdDispatchIndirect2KHR-None-08600
  If a a bound shader was created with a pipeline layout and statically uses a set n, a descriptor set must have been bound to n at the same pipeline bind point, with layouts compatible for set n with the layout(s) used to create the shader, as described in Pipeline Layout Compatibility

- VUID-vkCmdDispatchIndirect2KHR-None-08601
  If a a bound shader was created with a pipeline layout or specified push constant ranges and statically uses a push constant value, that value must have been set for the same pipeline bind point, with push constant ranges that are compatible with the push constant range used to create the shader

- VUID-vkCmdDispatchIndirect2KHR-None-10068
  For each array of resources that is used by a bound shader, the indices used to access members of the array must be less than the descriptor count for the identified binding in the descriptor sets used by this command

- VUID-vkCmdDispatchIndirect2KHR-None-08114
  Descriptors in each bound descriptor set, specified via vkCmdBindDescriptorSets, must be valid if they are accessed as described by descriptor validity by the VkPipeline bound to the pipeline bind point used by this command and the bound VkPipeline was not created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDispatchIndirect2KHR-imageLayout-00344
  If an image descriptor is accessed by a shader, the VkImageLayout must match the subresource accessible from the VkImageView as defined by the image layout matching rules

- VUID-vkCmdDispatchIndirect2KHR-None-08115
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdBindDescriptorSets, the bound VkPipeline must have been created without VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDispatchIndirect2KHR-None-08116
  Descriptors in bound descriptor buffers, specified via vkCmdSetDescriptorBufferOffsetsEXT, must be valid if they are dynamically accessed

- VUID-vkCmdDispatchIndirect2KHR-None-08117
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdSetDescriptorBufferOffsetsEXT, the bound VkPipeline must have been created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDispatchIndirect2KHR-None-08119
  If a descriptor is dynamically used with a VkPipeline created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdDispatchIndirect2KHR-None-08605
  If a descriptor is dynamically used with a VkShaderEXT created with a `VkDescriptorSetLayout` that was created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdDispatchIndirect2KHR-None-08606
  If the `shaderObject` feature is not enabled, a valid pipeline must be bound to the pipeline bind point used by this command

- VUID-vkCmdDispatchIndirect2KHR-None-08608
  If a pipeline is bound to the pipeline bind point used by this command, there must not have been any calls to dynamic state setting commands for any state specified statically in the VkPipeline object bound to the pipeline bind point used by this command, since that pipeline was bound

- VUID-vkCmdDispatchIndirect2KHR-uniformBuffers-06935
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDispatchIndirect2KHR-None-08612
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDispatchIndirect2KHR-storageBuffers-06936
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDispatchIndirect2KHR-None-08613
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a storage buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDispatchIndirect2KHR-commandBuffer-02707
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, any resource accessed by bound shaders must not be a protected resource

- VUID-vkCmdDispatchIndirect2KHR-viewType-07752
  If a VkImageView is accessed as a result of this command, then the image view’s `viewType` must match the `Dim` operand of the `OpTypeImage` as described in Compatibility Between SPIR-V Image Dimensions and Vulkan ImageView Types

- VUID-vkCmdDispatchIndirect2KHR-format-07753
  If a VkImageView or VkBufferView is accessed as a result of this command, then the numeric type of the view’s `format` and the `Sampled` `Type` operand of the `OpTypeImage` must match

- VUID-vkCmdDispatchIndirect2KHR-OpImageWrite-08795
  If a VkImageView created with a format other than VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the image view’s format

- VUID-vkCmdDispatchIndirect2KHR-OpImageWrite-08796
  If a VkImageView created with the format VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have four components

- VUID-vkCmdDispatchIndirect2KHR-OpImageWrite-04469
  If a VkBufferView is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the buffer view’s format

- VUID-vkCmdDispatchIndirect2KHR-SampledType-04470
  If a VkImageView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdDispatchIndirect2KHR-SampledType-04471
  If a VkImageView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdDispatchIndirect2KHR-SampledType-04472
  If a VkBufferView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdDispatchIndirect2KHR-SampledType-04473
  If a VkBufferView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdDispatchIndirect2KHR-sparseImageInt64Atomics-04474
  If the `sparseImageInt64Atomics` feature is not enabled, VkImage objects created with the VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdDispatchIndirect2KHR-sparseImageInt64Atomics-04475
  If the `sparseImageInt64Atomics` feature is not enabled, VkBuffer objects created with the VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdDispatchIndirect2KHR-OpImageSampleWeightedQCOM-06971
  If `OpImageSampleWeightedQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_SAMPLED_IMAGE_BIT_QCOM

- VUID-vkCmdDispatchIndirect2KHR-OpImageSampleWeightedQCOM-06972
  If `OpImageSampleWeightedQCOM` uses a VkImageView as a sample weight image as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_IMAGE_BIT_QCOM

- VUID-vkCmdDispatchIndirect2KHR-OpImageBoxFilterQCOM-06973
  If `OpImageBoxFilterQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BOX_FILTER_SAMPLED_BIT_QCOM

- VUID-vkCmdDispatchIndirect2KHR-OpImageBlockMatchSSDQCOM-06974
  If `OpImageBlockMatchSSDQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdDispatchIndirect2KHR-OpImageBlockMatchSADQCOM-12420
  If `OpImageBlockMatchSADQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdDispatchIndirect2KHR-OpImageBlockMatchSADQCOM-06976
  If `OpImageBlockMatchSADQCOM` or OpImageBlockMatchSSDQCOM is used to read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdDispatchIndirect2KHR-OpImageSampleWeightedQCOM-06977
  If `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdDispatchIndirect2KHR-OpImageSampleWeightedQCOM-06978
  If any command other than `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must not have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdDispatchIndirect2KHR-OpImageBlockMatchWindow-09215
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM

- VUID-vkCmdDispatchIndirect2KHR-OpImageBlockMatchWindow-09216
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format must be a single-component format

- VUID-vkCmdDispatchIndirect2KHR-OpImageBlockMatchWindow-09217
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdDispatchIndirect2KHR-OpImageBlockMatchWindow-12421
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the `blockMatchExtendedClampToEdge` feature is not enabled, the input sampler must not have been created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDispatchIndirect2KHR-addressModeU-12422
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the input sampler was created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, then the sampler must have been created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDispatchIndirect2KHR-None-07288
  Any shader invocation executed by this command must terminate

- VUID-vkCmdDispatchIndirect2KHR-None-09600
  If a descriptor with type equal to any of VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, or VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT is accessed as a result of this command, all image subresources identified by that descriptor must be in the image layout identified when the descriptor was written

- VUID-vkCmdDispatchIndirect2KHR-micromap-11636
  If an acceleration structure is accessed as a result of this command through an `OpRayQueryProceedKHR` operation , the `VK_EXT_opacity_micromap` extension is not enabled, and the acceleration structure is built using geometry with a VkAccelerationStructureTrianglesOpacityMicromapKHR structure included in its `pNext` chain, the shader must have specified a `OpacityMicromapIdKHR` execution mode with its specialization constant operand equal to VK_TRUE

- VUID-vkCmdDispatchIndirect2KHR-micromap-11637
  If an acceleration structure is accessed as a result of this command and the acceleration structure was constructed through deserialization, all micromap arrays referenced by the acceleration structure that were not replaced by an acceleration structure update command must have been deserialized using the serialized data of the corresponding micromaps used to originally build the acceleration structure prior to the execution of this command on the device

- VUID-vkCmdDispatchIndirect2KHR-micromap-11638
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkPipeline bound to the pipeline bind point used by this command must not have been created with `flags` that includes VK_PIPELINE_CREATE_2_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_KHR

- VUID-vkCmdDispatchIndirect2KHR-micromap-11639
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkShaderEXT that accessed the descriptor must not have been created with `flags` that includes VK_SHADER_CREATE_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_EXT

- VUID-vkCmdDispatchIndirect2KHR-commandBuffer-10746
  The `VkDeviceMemory` object allocated from a `VkMemoryHeap` with the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property that is bound to a resource accessed as a result of this command must be the active bound tile memory object in `commandBuffer`

- VUID-vkCmdDispatchIndirect2KHR-None-10678
  If this command is recorded inside a tile shading render pass instance, the stages corresponding to the pipeline bind point used by this command must only include VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_FRAGMENT_BIT, and/or VK_SHADER_STAGE_COMPUTE_BIT

- VUID-vkCmdDispatchIndirect2KHR-None-10679
  If this command is recorded where per-tile execution model is enabled, there must be no access to any image while the image was be transitioned to the VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT layout

- VUID-vkCmdDispatchIndirect2KHR-pDescription-09900
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the underlying VkTensorARM object must have been created with the VK_TENSOR_USAGE_SHADER_BIT_ARM usage flag set

- VUID-vkCmdDispatchIndirect2KHR-dimensionCount-09905
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the `Rank` of the `OpTypeTensorARM` of the tensor resource variable must be equal to the `dimensionCount` provided via VkTensorCreateInfoARM::`pDescription` when creating the underlying VkTensorARM object

- VUID-vkCmdDispatchIndirect2KHR-OpTypeTensorARM-09906
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the element type of the `OpTypeTensorARM` of the tensor resource variable must be compatible with the VkFormat of the VkTensorViewARM used for the access

- VUID-vkCmdDispatchIndirect2KHR-OpTensorReadARM-12462
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, using `OpTensorReadARM` or `OpTensorWriteARM`, and the underlying VkTensorARM object was created with a VK_TENSOR_TILING_BRICK_16_WIDE_ARM, VK_TENSOR_TILING_BRICK_8_WIDE_ARM, VK_TENSOR_TILING_BRICK_4_WIDE_ARM, VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_ARM, or VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_64K_ARM VkTensorTilingARM, and the object read or written is an array, then the innermost coordinate provided to `OpTensorReadARM` or `OpTensorWriteARM` via the `Coordinates` operand must be a multiple of the largest power of 2 that is less than or equal to the number of components of the array

- VUID-vkCmdDispatchIndirect2KHR-pNext-12463
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command and the corresponding VkTensorARM object was created with a VkTensorRollingBackingCreateInfoARM structure in the `pNext` chain of VkTensorCreateInfoARM, then the number of elements accessed with one `OpTensorReadARM` or `OpTensorWriteARM`, must be less than or equal to the number of elements available from the starting coordinate in the rolling backing along the innermost dimension, defined as `wraps`[`dimensionCount` - 1] - InnermostCoordinate % `wraps`[`dimensionCount` - 1] where InnermostCoordinate is the last component of the coordinates array provided via the `Coordinates` operand

- VUID-vkCmdDispatchIndirect2KHR-None-12472
  Descriptors dynamically accessed in bound descriptor heaps must be valid

- VUID-vkCmdDispatchIndirect2KHR-None-11297
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a `OpTypeStruct` decorated with `Block` or `BufferBlock` using that mapping, the calculated offset for the resource heap must be a multiple of `bufferDescriptorAlignment`

- VUID-vkCmdDispatchIndirect2KHR-None-11298
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeImage` or `OpTypeSampledImage` using that mapping, the calculated offset for the resource heap must be a multiple of `imageDescriptorAlignment`

- VUID-vkCmdDispatchIndirect2KHR-None-11299
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeSampler` or `OpTypeSampledImage` using that mapping, the calculated offset for the sampler heap must be a multiple of `samplerDescriptorAlignment`

- VUID-vkCmdDispatchIndirect2KHR-None-11397
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeTensorARM` using that mapping, the calculated offset for the resource heap must be a multiple of `tensorDescriptorAlignment`

- VUID-vkCmdDispatchIndirect2KHR-None-11300
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 4

- VUID-vkCmdDispatchIndirect2KHR-None-11301
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdDispatchIndirect2KHR-None-11302
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress

- VUID-vkCmdDispatchIndirect2KHR-None-11304
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 8

- VUID-vkCmdDispatchIndirect2KHR-None-11305
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdDispatchIndirect2KHR-None-11306
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address pointed to by the address in push data must be a valid VkDeviceAddress

- VUID-vkCmdDispatchIndirect2KHR-None-11308
  For each descriptor heap that is statically used by a bound shader, either directly or via a descriptor mapping, a valid descriptor heap must be bound

- VUID-vkCmdDispatchIndirect2KHR-None-11309
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, execution of this command must not result in any descriptor read accessing data outside of the user range of the respective heap bound by `vkCmdBind*HeapEXT` commands

- VUID-vkCmdDispatchIndirect2KHR-None-11372
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer or uniform texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified via VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDispatchIndirect2KHR-None-11373
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer or storage texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDispatchIndirect2KHR-None-11374
  If the `robustBufferAccess2` feature is not enabled, the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, uniform texel buffer, storage buffer, or storage texel buffer, that shader must not access values outside of the range of the buffer as specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDispatchIndirect2KHR-pBindInfo-11375
  If any bound shader uses an embedded sampler via a descriptor mapping, the value of `pBindInfo->reservedRangeSize` set for vkCmdBindSamplerHeapEXT must be greater than or equal to `minSamplerHeapReservedRangeWithEmbedded`

- VUID-vkCmdDispatchIndirect2KHR-None-11376
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, and that shader statically uses a push constant value, that value must have been set by vkCmdPushDataEXT

- VUID-vkCmdDispatchIndirect2KHR-None-11398
  If a bound shader was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the access must not be out of bounds

- VUID-vkCmdDispatchIndirect2KHR-None-11437
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the buffer from which the address in push data was queried must have been created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdDispatchIndirect2KHR-None-11438
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdDispatchIndirect2KHR-None-11441
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must be aligned to `minUniformBufferOffsetAlignment`

- VUID-vkCmdDispatchIndirect2KHR-None-11439
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_STORAGE_BUFFER_BIT usage flag set

- VUID-vkCmdDispatchIndirect2KHR-None-11442
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must be aligned to `minStorageBufferOffsetAlignment`

- VUID-vkCmdDispatchIndirect2KHR-None-11485
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses an acceleration structure using that mapping, the address that the acceleration structure is mapped to must be an acceleration structure address retrieved from a VkAccelerationStructureKHR object via vkGetAccelerationStructureDeviceAddressKHR or handle retrieved from a VkAccelerationStructureNV object via vkGetAccelerationStructureHandleNV

- VUID-vkCmdDispatchIndirect2KHR-index-11450
  If a shader uses a sampler descriptor to sample an image as a result of this command, and that sampler descriptor uses a custom border color with an index defined by VkSamplerCustomBorderColorIndexCreateInfoEXT, the value of VkSamplerCustomBorderColorIndexCreateInfoEXT::`index` must have been registered before this command was recorded, and still be registered during the sampling operation, with an identically defined color

- VUID-vkCmdDispatchIndirect2KHR-protectedNoFault-11455
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, the address that the resource is mapped to must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdDispatchIndirect2KHR-protectedNoFault-11456
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, the address of the indirect memory must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdDispatchIndirect2KHR-commandBuffer-13049
  `commandBuffer` must not be a protected command buffer

- VUID-vkCmdDispatchIndirect2KHR-pInfo-13050
  `pInfo->addressRange.size` must be greater than or equal to `sizeof`(VkDispatchIndirectCommand)

Valid Usage (Implicit)

- VUID-vkCmdDispatchIndirect2KHR-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdDispatchIndirect2KHR-pInfo-parameter
  `pInfo` must be a valid pointer to a valid VkDispatchIndirect2InfoKHR structure

- VUID-vkCmdDispatchIndirect2KHR-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdDispatchIndirect2KHR-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT operations

- VUID-vkCmdDispatchIndirect2KHR-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdDispatchIndirect2KHR-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdDispatchIndirect2KHR-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Outside | VK_QUEUE_COMPUTE_BIT | Action

Conditional Rendering

vkCmdDispatchIndirect2KHR is affected by conditional rendering

To record an indirect dispatching command, call:

    // Provided by VK_VERSION_1_0
    void vkCmdDispatchIndirect(
        VkCommandBuffer                             commandBuffer,
        VkBuffer                                    buffer,
        VkDeviceSize                                offset);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `buffer` is the buffer containing dispatch parameters.

- `offset` is the byte offset into `buffer` where parameters begin.

`vkCmdDispatchIndirect` behaves similarly to vkCmdDispatch except that the parameters are read by the device from a buffer during execution. The parameters of the dispatch are encoded in a VkDispatchIndirectCommand structure taken from `buffer` starting at `offset`.

Valid Usage

- VUID-vkCmdDispatchIndirect-magFilter-04553
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdDispatchIndirect-magFilter-09598
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdDispatchIndirect-mipmapMode-04770
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdDispatchIndirect-mipmapMode-09599
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdDispatchIndirect-unnormalizedCoordinates-09635
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `levelCount` and `layerCount` must be 1

- VUID-vkCmdDispatchIndirect-None-08609
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `viewType` must be VK_IMAGE_VIEW_TYPE_1D or VK_IMAGE_VIEW_TYPE_2D

- VUID-vkCmdDispatchIndirect-None-08610
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions with `ImplicitLod`, `Dref` or `Proj` in their name

- VUID-vkCmdDispatchIndirect-None-08611
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions that includes a LOD bias or any offset values

- VUID-vkCmdDispatchIndirect-None-06479
  If a VkImageView is sampled with depth comparison, the image view’s format features must contain VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT

- VUID-vkCmdDispatchIndirect-None-02691
  If a VkImageView is accessed using atomic operations as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT

- VUID-vkCmdDispatchIndirect-None-07888
  If a VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER descriptor is accessed using atomic operations as a result of this command, then the storage texel buffer’s format features must contain VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT

- VUID-vkCmdDispatchIndirect-None-02692
  If a VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT

- VUID-vkCmdDispatchIndirect-None-02693
  If the VK_EXT_filter_cubic extension is not enabled and any VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, it must not have a VkImageViewType of VK_IMAGE_VIEW_TYPE_3D, VK_IMAGE_VIEW_TYPE_CUBE, or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY

- VUID-vkCmdDispatchIndirect-filterCubic-02694
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have a VkImageViewType and format that supports cubic filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubic` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdDispatchIndirect-filterCubicMinmax-02695
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX as a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubicMinmax` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdDispatchIndirect-cubicRangeClamp-09212
  If the `cubicRangeClamp` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must not have a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM

- VUID-vkCmdDispatchIndirect-reductionMode-09213
  Any VkImageView being sampled with a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM as a result of this command must sample with VK_FILTER_CUBIC_EXT

- VUID-vkCmdDispatchIndirect-selectableCubicWeights-09214
  If the `selectableCubicWeights` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have VkSamplerCubicWeightsCreateInfoQCOM::`cubicWeights` equal to VK_CUBIC_FILTER_WEIGHTS_CATMULL_ROM_QCOM

- VUID-vkCmdDispatchIndirect-flags-02696
  Any VkImage created with a VkImageCreateInfo::`flags` containing VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV sampled as a result of this command must only be sampled using a VkSamplerAddressMode of VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDispatchIndirect-OpTypeImage-07027
  For any VkImageView being written as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdDispatchIndirect-OpTypeImage-07028
  For any VkImageView being read as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdDispatchIndirect-OpTypeImage-07029
  For any VkBufferView being written as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown`, the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdDispatchIndirect-OpTypeImage-07030
  Any VkBufferView being read as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown` then the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdDispatchIndirect-None-08600
  If a a bound shader was created with a pipeline layout and statically uses a set n, a descriptor set must have been bound to n at the same pipeline bind point, with layouts compatible for set n with the layout(s) used to create the shader, as described in Pipeline Layout Compatibility

- VUID-vkCmdDispatchIndirect-None-08601
  If a a bound shader was created with a pipeline layout or specified push constant ranges and statically uses a push constant value, that value must have been set for the same pipeline bind point, with push constant ranges that are compatible with the push constant range used to create the shader

- VUID-vkCmdDispatchIndirect-None-10068
  For each array of resources that is used by a bound shader, the indices used to access members of the array must be less than the descriptor count for the identified binding in the descriptor sets used by this command

- VUID-vkCmdDispatchIndirect-None-08114
  Descriptors in each bound descriptor set, specified via vkCmdBindDescriptorSets, must be valid if they are accessed as described by descriptor validity by the VkPipeline bound to the pipeline bind point used by this command and the bound VkPipeline was not created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDispatchIndirect-imageLayout-00344
  If an image descriptor is accessed by a shader, the VkImageLayout must match the subresource accessible from the VkImageView as defined by the image layout matching rules

- VUID-vkCmdDispatchIndirect-None-08115
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdBindDescriptorSets, the bound VkPipeline must have been created without VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDispatchIndirect-None-08116
  Descriptors in bound descriptor buffers, specified via vkCmdSetDescriptorBufferOffsetsEXT, must be valid if they are dynamically accessed

- VUID-vkCmdDispatchIndirect-None-08117
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdSetDescriptorBufferOffsetsEXT, the bound VkPipeline must have been created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDispatchIndirect-None-08119
  If a descriptor is dynamically used with a VkPipeline created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdDispatchIndirect-None-08605
  If a descriptor is dynamically used with a VkShaderEXT created with a `VkDescriptorSetLayout` that was created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdDispatchIndirect-None-08606
  If the `shaderObject` feature is not enabled, a valid pipeline must be bound to the pipeline bind point used by this command

- VUID-vkCmdDispatchIndirect-None-08608
  If a pipeline is bound to the pipeline bind point used by this command, there must not have been any calls to dynamic state setting commands for any state specified statically in the VkPipeline object bound to the pipeline bind point used by this command, since that pipeline was bound

- VUID-vkCmdDispatchIndirect-uniformBuffers-06935
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDispatchIndirect-None-08612
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDispatchIndirect-storageBuffers-06936
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDispatchIndirect-None-08613
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a storage buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDispatchIndirect-commandBuffer-02707
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, any resource accessed by bound shaders must not be a protected resource

- VUID-vkCmdDispatchIndirect-viewType-07752
  If a VkImageView is accessed as a result of this command, then the image view’s `viewType` must match the `Dim` operand of the `OpTypeImage` as described in Compatibility Between SPIR-V Image Dimensions and Vulkan ImageView Types

- VUID-vkCmdDispatchIndirect-format-07753
  If a VkImageView or VkBufferView is accessed as a result of this command, then the numeric type of the view’s `format` and the `Sampled` `Type` operand of the `OpTypeImage` must match

- VUID-vkCmdDispatchIndirect-OpImageWrite-08795
  If a VkImageView created with a format other than VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the image view’s format

- VUID-vkCmdDispatchIndirect-OpImageWrite-08796
  If a VkImageView created with the format VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have four components

- VUID-vkCmdDispatchIndirect-OpImageWrite-04469
  If a VkBufferView is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the buffer view’s format

- VUID-vkCmdDispatchIndirect-SampledType-04470
  If a VkImageView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdDispatchIndirect-SampledType-04471
  If a VkImageView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdDispatchIndirect-SampledType-04472
  If a VkBufferView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdDispatchIndirect-SampledType-04473
  If a VkBufferView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdDispatchIndirect-sparseImageInt64Atomics-04474
  If the `sparseImageInt64Atomics` feature is not enabled, VkImage objects created with the VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdDispatchIndirect-sparseImageInt64Atomics-04475
  If the `sparseImageInt64Atomics` feature is not enabled, VkBuffer objects created with the VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdDispatchIndirect-OpImageSampleWeightedQCOM-06971
  If `OpImageSampleWeightedQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_SAMPLED_IMAGE_BIT_QCOM

- VUID-vkCmdDispatchIndirect-OpImageSampleWeightedQCOM-06972
  If `OpImageSampleWeightedQCOM` uses a VkImageView as a sample weight image as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_IMAGE_BIT_QCOM

- VUID-vkCmdDispatchIndirect-OpImageBoxFilterQCOM-06973
  If `OpImageBoxFilterQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BOX_FILTER_SAMPLED_BIT_QCOM

- VUID-vkCmdDispatchIndirect-OpImageBlockMatchSSDQCOM-06974
  If `OpImageBlockMatchSSDQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdDispatchIndirect-OpImageBlockMatchSADQCOM-12420
  If `OpImageBlockMatchSADQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdDispatchIndirect-OpImageBlockMatchSADQCOM-06976
  If `OpImageBlockMatchSADQCOM` or OpImageBlockMatchSSDQCOM is used to read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdDispatchIndirect-OpImageSampleWeightedQCOM-06977
  If `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdDispatchIndirect-OpImageSampleWeightedQCOM-06978
  If any command other than `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must not have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdDispatchIndirect-OpImageBlockMatchWindow-09215
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM

- VUID-vkCmdDispatchIndirect-OpImageBlockMatchWindow-09216
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format must be a single-component format

- VUID-vkCmdDispatchIndirect-OpImageBlockMatchWindow-09217
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdDispatchIndirect-OpImageBlockMatchWindow-12421
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the `blockMatchExtendedClampToEdge` feature is not enabled, the input sampler must not have been created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDispatchIndirect-addressModeU-12422
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the input sampler was created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, then the sampler must have been created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDispatchIndirect-None-07288
  Any shader invocation executed by this command must terminate

- VUID-vkCmdDispatchIndirect-None-09600
  If a descriptor with type equal to any of VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, or VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT is accessed as a result of this command, all image subresources identified by that descriptor must be in the image layout identified when the descriptor was written

- VUID-vkCmdDispatchIndirect-micromap-11636
  If an acceleration structure is accessed as a result of this command through an `OpRayQueryProceedKHR` operation , the `VK_EXT_opacity_micromap` extension is not enabled, and the acceleration structure is built using geometry with a VkAccelerationStructureTrianglesOpacityMicromapKHR structure included in its `pNext` chain, the shader must have specified a `OpacityMicromapIdKHR` execution mode with its specialization constant operand equal to VK_TRUE

- VUID-vkCmdDispatchIndirect-micromap-11637
  If an acceleration structure is accessed as a result of this command and the acceleration structure was constructed through deserialization, all micromap arrays referenced by the acceleration structure that were not replaced by an acceleration structure update command must have been deserialized using the serialized data of the corresponding micromaps used to originally build the acceleration structure prior to the execution of this command on the device

- VUID-vkCmdDispatchIndirect-micromap-11638
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkPipeline bound to the pipeline bind point used by this command must not have been created with `flags` that includes VK_PIPELINE_CREATE_2_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_KHR

- VUID-vkCmdDispatchIndirect-micromap-11639
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkShaderEXT that accessed the descriptor must not have been created with `flags` that includes VK_SHADER_CREATE_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_EXT

- VUID-vkCmdDispatchIndirect-commandBuffer-10746
  The `VkDeviceMemory` object allocated from a `VkMemoryHeap` with the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property that is bound to a resource accessed as a result of this command must be the active bound tile memory object in `commandBuffer`

- VUID-vkCmdDispatchIndirect-None-10678
  If this command is recorded inside a tile shading render pass instance, the stages corresponding to the pipeline bind point used by this command must only include VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_FRAGMENT_BIT, and/or VK_SHADER_STAGE_COMPUTE_BIT

- VUID-vkCmdDispatchIndirect-None-10679
  If this command is recorded where per-tile execution model is enabled, there must be no access to any image while the image was be transitioned to the VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT layout

- VUID-vkCmdDispatchIndirect-pDescription-09900
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the underlying VkTensorARM object must have been created with the VK_TENSOR_USAGE_SHADER_BIT_ARM usage flag set

- VUID-vkCmdDispatchIndirect-dimensionCount-09905
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the `Rank` of the `OpTypeTensorARM` of the tensor resource variable must be equal to the `dimensionCount` provided via VkTensorCreateInfoARM::`pDescription` when creating the underlying VkTensorARM object

- VUID-vkCmdDispatchIndirect-OpTypeTensorARM-09906
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the element type of the `OpTypeTensorARM` of the tensor resource variable must be compatible with the VkFormat of the VkTensorViewARM used for the access

- VUID-vkCmdDispatchIndirect-OpTensorReadARM-12462
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, using `OpTensorReadARM` or `OpTensorWriteARM`, and the underlying VkTensorARM object was created with a VK_TENSOR_TILING_BRICK_16_WIDE_ARM, VK_TENSOR_TILING_BRICK_8_WIDE_ARM, VK_TENSOR_TILING_BRICK_4_WIDE_ARM, VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_ARM, or VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_64K_ARM VkTensorTilingARM, and the object read or written is an array, then the innermost coordinate provided to `OpTensorReadARM` or `OpTensorWriteARM` via the `Coordinates` operand must be a multiple of the largest power of 2 that is less than or equal to the number of components of the array

- VUID-vkCmdDispatchIndirect-pNext-12463
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command and the corresponding VkTensorARM object was created with a VkTensorRollingBackingCreateInfoARM structure in the `pNext` chain of VkTensorCreateInfoARM, then the number of elements accessed with one `OpTensorReadARM` or `OpTensorWriteARM`, must be less than or equal to the number of elements available from the starting coordinate in the rolling backing along the innermost dimension, defined as `wraps`[`dimensionCount` - 1] - InnermostCoordinate % `wraps`[`dimensionCount` - 1] where InnermostCoordinate is the last component of the coordinates array provided via the `Coordinates` operand

- VUID-vkCmdDispatchIndirect-None-12472
  Descriptors dynamically accessed in bound descriptor heaps must be valid

- VUID-vkCmdDispatchIndirect-None-11297
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a `OpTypeStruct` decorated with `Block` or `BufferBlock` using that mapping, the calculated offset for the resource heap must be a multiple of `bufferDescriptorAlignment`

- VUID-vkCmdDispatchIndirect-None-11298
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeImage` or `OpTypeSampledImage` using that mapping, the calculated offset for the resource heap must be a multiple of `imageDescriptorAlignment`

- VUID-vkCmdDispatchIndirect-None-11299
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeSampler` or `OpTypeSampledImage` using that mapping, the calculated offset for the sampler heap must be a multiple of `samplerDescriptorAlignment`

- VUID-vkCmdDispatchIndirect-None-11397
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeTensorARM` using that mapping, the calculated offset for the resource heap must be a multiple of `tensorDescriptorAlignment`

- VUID-vkCmdDispatchIndirect-None-11300
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 4

- VUID-vkCmdDispatchIndirect-None-11301
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdDispatchIndirect-None-11302
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress

- VUID-vkCmdDispatchIndirect-None-11304
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 8

- VUID-vkCmdDispatchIndirect-None-11305
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdDispatchIndirect-None-11306
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address pointed to by the address in push data must be a valid VkDeviceAddress

- VUID-vkCmdDispatchIndirect-None-11308
  For each descriptor heap that is statically used by a bound shader, either directly or via a descriptor mapping, a valid descriptor heap must be bound

- VUID-vkCmdDispatchIndirect-None-11309
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, execution of this command must not result in any descriptor read accessing data outside of the user range of the respective heap bound by `vkCmdBind*HeapEXT` commands

- VUID-vkCmdDispatchIndirect-None-11372
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer or uniform texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified via VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDispatchIndirect-None-11373
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer or storage texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDispatchIndirect-None-11374
  If the `robustBufferAccess2` feature is not enabled, the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, uniform texel buffer, storage buffer, or storage texel buffer, that shader must not access values outside of the range of the buffer as specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDispatchIndirect-pBindInfo-11375
  If any bound shader uses an embedded sampler via a descriptor mapping, the value of `pBindInfo->reservedRangeSize` set for vkCmdBindSamplerHeapEXT must be greater than or equal to `minSamplerHeapReservedRangeWithEmbedded`

- VUID-vkCmdDispatchIndirect-None-11376
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, and that shader statically uses a push constant value, that value must have been set by vkCmdPushDataEXT

- VUID-vkCmdDispatchIndirect-None-11398
  If a bound shader was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the access must not be out of bounds

- VUID-vkCmdDispatchIndirect-None-11437
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the buffer from which the address in push data was queried must have been created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdDispatchIndirect-None-11438
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdDispatchIndirect-None-11441
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must be aligned to `minUniformBufferOffsetAlignment`

- VUID-vkCmdDispatchIndirect-None-11439
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_STORAGE_BUFFER_BIT usage flag set

- VUID-vkCmdDispatchIndirect-None-11442
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must be aligned to `minStorageBufferOffsetAlignment`

- VUID-vkCmdDispatchIndirect-None-11485
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses an acceleration structure using that mapping, the address that the acceleration structure is mapped to must be an acceleration structure address retrieved from a VkAccelerationStructureKHR object via vkGetAccelerationStructureDeviceAddressKHR or handle retrieved from a VkAccelerationStructureNV object via vkGetAccelerationStructureHandleNV

- VUID-vkCmdDispatchIndirect-index-11450
  If a shader uses a sampler descriptor to sample an image as a result of this command, and that sampler descriptor uses a custom border color with an index defined by VkSamplerCustomBorderColorIndexCreateInfoEXT, the value of VkSamplerCustomBorderColorIndexCreateInfoEXT::`index` must have been registered before this command was recorded, and still be registered during the sampling operation, with an identically defined color

- VUID-vkCmdDispatchIndirect-protectedNoFault-11455
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, the address that the resource is mapped to must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdDispatchIndirect-protectedNoFault-11456
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, the address of the indirect memory must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdDispatchIndirect-None-10672
  If the per-tile execution model is not enabled, this command must be called outside of a render pass instance

- VUID-vkCmdDispatchIndirect-aspectMask-10673
  If this command is recorded where per-tile execution model is enabled, and if the VkPipeline object bound to the pipeline bind point used by this command writes to a variable of storage class `Storage` `Class` `TileAttachmentQCOM`, the corresponding VkImageView using must not have been created with an `aspectMask` that contains VK_IMAGE_ASPECT_DEPTH_BIT or VK_IMAGE_ASPECT_STENCIL_BIT

- VUID-vkCmdDispatchIndirect-None-10674
  If the per-tile execution model is enabled, the tileShadingPerTileDispatch feature must be enabled

- VUID-vkCmdDispatchIndirect-None-10675
  Memory backing image subresources used as tile attachments in the current render pass must not be written in any way other than as a tile attachment by this command

- VUID-vkCmdDispatchIndirect-None-10676
  If any recorded command in the current subpass will write to an image subresource as a tile attachment, this command must not read from the memory backing that image subresource in any other way than as a tile attachment

- VUID-vkCmdDispatchIndirect-None-10743
  If there is no bound compute pipeline, a valid `VkShaderEXT` must be bound to the VK_SHADER_STAGE_COMPUTE_BIT stage

- VUID-vkCmdDispatchIndirect-buffer-02708
  If `buffer` is non-sparse then it must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-vkCmdDispatchIndirect-buffer-02709
  `buffer` must have been created with the VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT usage flag set

- VUID-vkCmdDispatchIndirect-offset-02710
  `offset` must be a multiple of `4`

- VUID-vkCmdDispatchIndirect-commandBuffer-02711
  `commandBuffer` must not be a protected command buffer

- VUID-vkCmdDispatchIndirect-offset-00407
  The sum of `offset` and the size of `VkDispatchIndirectCommand` must be less than or equal to the size of `buffer`

Valid Usage (Implicit)

- VUID-vkCmdDispatchIndirect-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdDispatchIndirect-buffer-parameter
  `buffer` must be a valid VkBuffer handle

- VUID-vkCmdDispatchIndirect-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdDispatchIndirect-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT operations

- VUID-vkCmdDispatchIndirect-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdDispatchIndirect-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdDispatchIndirect-commonparent
  Both of `buffer`, and `commandBuffer` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_COMPUTE_BIT | Action

Conditional Rendering

vkCmdDispatchIndirect is affected by conditional rendering

The `VkDispatchIndirectCommand` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkDispatchIndirectCommand {
        uint32_t    x;
        uint32_t    y;
        uint32_t    z;
    } VkDispatchIndirectCommand;

- `x` is the number of local workgroups to dispatch in the X dimension.

- `y` is the number of local workgroups to dispatch in the Y dimension.

- `z` is the number of local workgroups to dispatch in the Z dimension.

The members of `VkDispatchIndirectCommand` have the same meaning as the corresponding parameters of vkCmdDispatch.

Valid Usage

- VUID-VkDispatchIndirectCommand-x-00417
  `x` must be less than or equal to `VkPhysicalDeviceLimits`::`maxComputeWorkGroupCount`[0]

- VUID-VkDispatchIndirectCommand-y-00418
  `y` must be less than or equal to `VkPhysicalDeviceLimits`::`maxComputeWorkGroupCount`[1]

- VUID-VkDispatchIndirectCommand-z-00419
  `z` must be less than or equal to `VkPhysicalDeviceLimits`::`maxComputeWorkGroupCount`[2]

To record a dispatch using non-zero base values for the components of `WorkgroupId`, call:

    // Provided by VK_VERSION_1_1
    void vkCmdDispatchBase(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    baseGroupX,
        uint32_t                                    baseGroupY,
        uint32_t                                    baseGroupZ,
        uint32_t                                    groupCountX,
        uint32_t                                    groupCountY,
        uint32_t                                    groupCountZ);

    // Provided by VK_KHR_device_group
    // Equivalent to vkCmdDispatchBase
    void vkCmdDispatchBaseKHR(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    baseGroupX,
        uint32_t                                    baseGroupY,
        uint32_t                                    baseGroupZ,
        uint32_t                                    groupCountX,
        uint32_t                                    groupCountY,
        uint32_t                                    groupCountZ);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `baseGroupX` is the start value for the X component of `WorkgroupId`.

- `baseGroupY` is the start value for the Y component of `WorkgroupId`.

- `baseGroupZ` is the start value for the Z component of `WorkgroupId`.

- `groupCountX` is the number of local workgroups to dispatch in the X dimension.

- `groupCountY` is the number of local workgroups to dispatch in the Y dimension.

- `groupCountZ` is the number of local workgroups to dispatch in the Z dimension.

When the command is executed, a global workgroup consisting of `groupCountX` × `groupCountY` × `groupCountZ` local workgroups is assembled, with `WorkgroupId` values ranging from [`baseGroup*`, `baseGroup*` + `groupCount*`) in each component. vkCmdDispatch is equivalent to `vkCmdDispatchBase(0,0,0,groupCountX,groupCountY,groupCountZ)`.

Valid Usage

- VUID-vkCmdDispatchBase-magFilter-04553
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdDispatchBase-magFilter-09598
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdDispatchBase-mipmapMode-04770
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdDispatchBase-mipmapMode-09599
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdDispatchBase-unnormalizedCoordinates-09635
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `levelCount` and `layerCount` must be 1

- VUID-vkCmdDispatchBase-None-08609
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `viewType` must be VK_IMAGE_VIEW_TYPE_1D or VK_IMAGE_VIEW_TYPE_2D

- VUID-vkCmdDispatchBase-None-08610
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions with `ImplicitLod`, `Dref` or `Proj` in their name

- VUID-vkCmdDispatchBase-None-08611
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions that includes a LOD bias or any offset values

- VUID-vkCmdDispatchBase-None-06479
  If a VkImageView is sampled with depth comparison, the image view’s format features must contain VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT

- VUID-vkCmdDispatchBase-None-02691
  If a VkImageView is accessed using atomic operations as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT

- VUID-vkCmdDispatchBase-None-07888
  If a VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER descriptor is accessed using atomic operations as a result of this command, then the storage texel buffer’s format features must contain VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT

- VUID-vkCmdDispatchBase-None-02692
  If a VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT

- VUID-vkCmdDispatchBase-None-02693
  If the VK_EXT_filter_cubic extension is not enabled and any VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, it must not have a VkImageViewType of VK_IMAGE_VIEW_TYPE_3D, VK_IMAGE_VIEW_TYPE_CUBE, or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY

- VUID-vkCmdDispatchBase-filterCubic-02694
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have a VkImageViewType and format that supports cubic filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubic` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdDispatchBase-filterCubicMinmax-02695
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX as a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubicMinmax` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdDispatchBase-cubicRangeClamp-09212
  If the `cubicRangeClamp` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must not have a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM

- VUID-vkCmdDispatchBase-reductionMode-09213
  Any VkImageView being sampled with a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM as a result of this command must sample with VK_FILTER_CUBIC_EXT

- VUID-vkCmdDispatchBase-selectableCubicWeights-09214
  If the `selectableCubicWeights` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have VkSamplerCubicWeightsCreateInfoQCOM::`cubicWeights` equal to VK_CUBIC_FILTER_WEIGHTS_CATMULL_ROM_QCOM

- VUID-vkCmdDispatchBase-flags-02696
  Any VkImage created with a VkImageCreateInfo::`flags` containing VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV sampled as a result of this command must only be sampled using a VkSamplerAddressMode of VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDispatchBase-OpTypeImage-07027
  For any VkImageView being written as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdDispatchBase-OpTypeImage-07028
  For any VkImageView being read as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdDispatchBase-OpTypeImage-07029
  For any VkBufferView being written as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown`, the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdDispatchBase-OpTypeImage-07030
  Any VkBufferView being read as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown` then the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdDispatchBase-None-08600
  If a a bound shader was created with a pipeline layout and statically uses a set n, a descriptor set must have been bound to n at the same pipeline bind point, with layouts compatible for set n with the layout(s) used to create the shader, as described in Pipeline Layout Compatibility

- VUID-vkCmdDispatchBase-None-08601
  If a a bound shader was created with a pipeline layout or specified push constant ranges and statically uses a push constant value, that value must have been set for the same pipeline bind point, with push constant ranges that are compatible with the push constant range used to create the shader

- VUID-vkCmdDispatchBase-None-10068
  For each array of resources that is used by a bound shader, the indices used to access members of the array must be less than the descriptor count for the identified binding in the descriptor sets used by this command

- VUID-vkCmdDispatchBase-None-08114
  Descriptors in each bound descriptor set, specified via vkCmdBindDescriptorSets, must be valid if they are accessed as described by descriptor validity by the VkPipeline bound to the pipeline bind point used by this command and the bound VkPipeline was not created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDispatchBase-imageLayout-00344
  If an image descriptor is accessed by a shader, the VkImageLayout must match the subresource accessible from the VkImageView as defined by the image layout matching rules

- VUID-vkCmdDispatchBase-None-08115
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdBindDescriptorSets, the bound VkPipeline must have been created without VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDispatchBase-None-08116
  Descriptors in bound descriptor buffers, specified via vkCmdSetDescriptorBufferOffsetsEXT, must be valid if they are dynamically accessed

- VUID-vkCmdDispatchBase-None-08117
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdSetDescriptorBufferOffsetsEXT, the bound VkPipeline must have been created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDispatchBase-None-08119
  If a descriptor is dynamically used with a VkPipeline created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdDispatchBase-None-08605
  If a descriptor is dynamically used with a VkShaderEXT created with a `VkDescriptorSetLayout` that was created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdDispatchBase-None-08606
  If the `shaderObject` feature is not enabled, a valid pipeline must be bound to the pipeline bind point used by this command

- VUID-vkCmdDispatchBase-None-08608
  If a pipeline is bound to the pipeline bind point used by this command, there must not have been any calls to dynamic state setting commands for any state specified statically in the VkPipeline object bound to the pipeline bind point used by this command, since that pipeline was bound

- VUID-vkCmdDispatchBase-uniformBuffers-06935
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDispatchBase-None-08612
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDispatchBase-storageBuffers-06936
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDispatchBase-None-08613
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a storage buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDispatchBase-commandBuffer-02707
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, any resource accessed by bound shaders must not be a protected resource

- VUID-vkCmdDispatchBase-viewType-07752
  If a VkImageView is accessed as a result of this command, then the image view’s `viewType` must match the `Dim` operand of the `OpTypeImage` as described in Compatibility Between SPIR-V Image Dimensions and Vulkan ImageView Types

- VUID-vkCmdDispatchBase-format-07753
  If a VkImageView or VkBufferView is accessed as a result of this command, then the numeric type of the view’s `format` and the `Sampled` `Type` operand of the `OpTypeImage` must match

- VUID-vkCmdDispatchBase-OpImageWrite-08795
  If a VkImageView created with a format other than VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the image view’s format

- VUID-vkCmdDispatchBase-OpImageWrite-08796
  If a VkImageView created with the format VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have four components

- VUID-vkCmdDispatchBase-OpImageWrite-04469
  If a VkBufferView is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the buffer view’s format

- VUID-vkCmdDispatchBase-SampledType-04470
  If a VkImageView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdDispatchBase-SampledType-04471
  If a VkImageView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdDispatchBase-SampledType-04472
  If a VkBufferView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdDispatchBase-SampledType-04473
  If a VkBufferView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdDispatchBase-sparseImageInt64Atomics-04474
  If the `sparseImageInt64Atomics` feature is not enabled, VkImage objects created with the VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdDispatchBase-sparseImageInt64Atomics-04475
  If the `sparseImageInt64Atomics` feature is not enabled, VkBuffer objects created with the VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdDispatchBase-OpImageSampleWeightedQCOM-06971
  If `OpImageSampleWeightedQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_SAMPLED_IMAGE_BIT_QCOM

- VUID-vkCmdDispatchBase-OpImageSampleWeightedQCOM-06972
  If `OpImageSampleWeightedQCOM` uses a VkImageView as a sample weight image as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_IMAGE_BIT_QCOM

- VUID-vkCmdDispatchBase-OpImageBoxFilterQCOM-06973
  If `OpImageBoxFilterQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BOX_FILTER_SAMPLED_BIT_QCOM

- VUID-vkCmdDispatchBase-OpImageBlockMatchSSDQCOM-06974
  If `OpImageBlockMatchSSDQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdDispatchBase-OpImageBlockMatchSADQCOM-12420
  If `OpImageBlockMatchSADQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdDispatchBase-OpImageBlockMatchSADQCOM-06976
  If `OpImageBlockMatchSADQCOM` or OpImageBlockMatchSSDQCOM is used to read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdDispatchBase-OpImageSampleWeightedQCOM-06977
  If `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdDispatchBase-OpImageSampleWeightedQCOM-06978
  If any command other than `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must not have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdDispatchBase-OpImageBlockMatchWindow-09215
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM

- VUID-vkCmdDispatchBase-OpImageBlockMatchWindow-09216
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format must be a single-component format

- VUID-vkCmdDispatchBase-OpImageBlockMatchWindow-09217
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdDispatchBase-OpImageBlockMatchWindow-12421
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the `blockMatchExtendedClampToEdge` feature is not enabled, the input sampler must not have been created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDispatchBase-addressModeU-12422
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the input sampler was created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, then the sampler must have been created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDispatchBase-None-07288
  Any shader invocation executed by this command must terminate

- VUID-vkCmdDispatchBase-None-09600
  If a descriptor with type equal to any of VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, or VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT is accessed as a result of this command, all image subresources identified by that descriptor must be in the image layout identified when the descriptor was written

- VUID-vkCmdDispatchBase-micromap-11636
  If an acceleration structure is accessed as a result of this command through an `OpRayQueryProceedKHR` operation , the `VK_EXT_opacity_micromap` extension is not enabled, and the acceleration structure is built using geometry with a VkAccelerationStructureTrianglesOpacityMicromapKHR structure included in its `pNext` chain, the shader must have specified a `OpacityMicromapIdKHR` execution mode with its specialization constant operand equal to VK_TRUE

- VUID-vkCmdDispatchBase-micromap-11637
  If an acceleration structure is accessed as a result of this command and the acceleration structure was constructed through deserialization, all micromap arrays referenced by the acceleration structure that were not replaced by an acceleration structure update command must have been deserialized using the serialized data of the corresponding micromaps used to originally build the acceleration structure prior to the execution of this command on the device

- VUID-vkCmdDispatchBase-micromap-11638
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkPipeline bound to the pipeline bind point used by this command must not have been created with `flags` that includes VK_PIPELINE_CREATE_2_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_KHR

- VUID-vkCmdDispatchBase-micromap-11639
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkShaderEXT that accessed the descriptor must not have been created with `flags` that includes VK_SHADER_CREATE_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_EXT

- VUID-vkCmdDispatchBase-commandBuffer-10746
  The `VkDeviceMemory` object allocated from a `VkMemoryHeap` with the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property that is bound to a resource accessed as a result of this command must be the active bound tile memory object in `commandBuffer`

- VUID-vkCmdDispatchBase-None-10678
  If this command is recorded inside a tile shading render pass instance, the stages corresponding to the pipeline bind point used by this command must only include VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_FRAGMENT_BIT, and/or VK_SHADER_STAGE_COMPUTE_BIT

- VUID-vkCmdDispatchBase-None-10679
  If this command is recorded where per-tile execution model is enabled, there must be no access to any image while the image was be transitioned to the VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT layout

- VUID-vkCmdDispatchBase-pDescription-09900
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the underlying VkTensorARM object must have been created with the VK_TENSOR_USAGE_SHADER_BIT_ARM usage flag set

- VUID-vkCmdDispatchBase-dimensionCount-09905
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the `Rank` of the `OpTypeTensorARM` of the tensor resource variable must be equal to the `dimensionCount` provided via VkTensorCreateInfoARM::`pDescription` when creating the underlying VkTensorARM object

- VUID-vkCmdDispatchBase-OpTypeTensorARM-09906
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the element type of the `OpTypeTensorARM` of the tensor resource variable must be compatible with the VkFormat of the VkTensorViewARM used for the access

- VUID-vkCmdDispatchBase-OpTensorReadARM-12462
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, using `OpTensorReadARM` or `OpTensorWriteARM`, and the underlying VkTensorARM object was created with a VK_TENSOR_TILING_BRICK_16_WIDE_ARM, VK_TENSOR_TILING_BRICK_8_WIDE_ARM, VK_TENSOR_TILING_BRICK_4_WIDE_ARM, VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_ARM, or VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_64K_ARM VkTensorTilingARM, and the object read or written is an array, then the innermost coordinate provided to `OpTensorReadARM` or `OpTensorWriteARM` via the `Coordinates` operand must be a multiple of the largest power of 2 that is less than or equal to the number of components of the array

- VUID-vkCmdDispatchBase-pNext-12463
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command and the corresponding VkTensorARM object was created with a VkTensorRollingBackingCreateInfoARM structure in the `pNext` chain of VkTensorCreateInfoARM, then the number of elements accessed with one `OpTensorReadARM` or `OpTensorWriteARM`, must be less than or equal to the number of elements available from the starting coordinate in the rolling backing along the innermost dimension, defined as `wraps`[`dimensionCount` - 1] - InnermostCoordinate % `wraps`[`dimensionCount` - 1] where InnermostCoordinate is the last component of the coordinates array provided via the `Coordinates` operand

- VUID-vkCmdDispatchBase-None-12472
  Descriptors dynamically accessed in bound descriptor heaps must be valid

- VUID-vkCmdDispatchBase-None-11297
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a `OpTypeStruct` decorated with `Block` or `BufferBlock` using that mapping, the calculated offset for the resource heap must be a multiple of `bufferDescriptorAlignment`

- VUID-vkCmdDispatchBase-None-11298
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeImage` or `OpTypeSampledImage` using that mapping, the calculated offset for the resource heap must be a multiple of `imageDescriptorAlignment`

- VUID-vkCmdDispatchBase-None-11299
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeSampler` or `OpTypeSampledImage` using that mapping, the calculated offset for the sampler heap must be a multiple of `samplerDescriptorAlignment`

- VUID-vkCmdDispatchBase-None-11397
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeTensorARM` using that mapping, the calculated offset for the resource heap must be a multiple of `tensorDescriptorAlignment`

- VUID-vkCmdDispatchBase-None-11300
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 4

- VUID-vkCmdDispatchBase-None-11301
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdDispatchBase-None-11302
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress

- VUID-vkCmdDispatchBase-None-11304
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 8

- VUID-vkCmdDispatchBase-None-11305
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdDispatchBase-None-11306
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address pointed to by the address in push data must be a valid VkDeviceAddress

- VUID-vkCmdDispatchBase-None-11308
  For each descriptor heap that is statically used by a bound shader, either directly or via a descriptor mapping, a valid descriptor heap must be bound

- VUID-vkCmdDispatchBase-None-11309
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, execution of this command must not result in any descriptor read accessing data outside of the user range of the respective heap bound by `vkCmdBind*HeapEXT` commands

- VUID-vkCmdDispatchBase-None-11372
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer or uniform texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified via VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDispatchBase-None-11373
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer or storage texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDispatchBase-None-11374
  If the `robustBufferAccess2` feature is not enabled, the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, uniform texel buffer, storage buffer, or storage texel buffer, that shader must not access values outside of the range of the buffer as specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDispatchBase-pBindInfo-11375
  If any bound shader uses an embedded sampler via a descriptor mapping, the value of `pBindInfo->reservedRangeSize` set for vkCmdBindSamplerHeapEXT must be greater than or equal to `minSamplerHeapReservedRangeWithEmbedded`

- VUID-vkCmdDispatchBase-None-11376
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, and that shader statically uses a push constant value, that value must have been set by vkCmdPushDataEXT

- VUID-vkCmdDispatchBase-None-11398
  If a bound shader was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the access must not be out of bounds

- VUID-vkCmdDispatchBase-None-11437
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the buffer from which the address in push data was queried must have been created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdDispatchBase-None-11438
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdDispatchBase-None-11441
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must be aligned to `minUniformBufferOffsetAlignment`

- VUID-vkCmdDispatchBase-None-11439
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_STORAGE_BUFFER_BIT usage flag set

- VUID-vkCmdDispatchBase-None-11442
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must be aligned to `minStorageBufferOffsetAlignment`

- VUID-vkCmdDispatchBase-None-11485
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses an acceleration structure using that mapping, the address that the acceleration structure is mapped to must be an acceleration structure address retrieved from a VkAccelerationStructureKHR object via vkGetAccelerationStructureDeviceAddressKHR or handle retrieved from a VkAccelerationStructureNV object via vkGetAccelerationStructureHandleNV

- VUID-vkCmdDispatchBase-index-11450
  If a shader uses a sampler descriptor to sample an image as a result of this command, and that sampler descriptor uses a custom border color with an index defined by VkSamplerCustomBorderColorIndexCreateInfoEXT, the value of VkSamplerCustomBorderColorIndexCreateInfoEXT::`index` must have been registered before this command was recorded, and still be registered during the sampling operation, with an identically defined color

- VUID-vkCmdDispatchBase-protectedNoFault-11455
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, the address that the resource is mapped to must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdDispatchBase-protectedNoFault-11456
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, the address of the indirect memory must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdDispatchBase-None-10672
  If the per-tile execution model is not enabled, this command must be called outside of a render pass instance

- VUID-vkCmdDispatchBase-aspectMask-10673
  If this command is recorded where per-tile execution model is enabled, and if the VkPipeline object bound to the pipeline bind point used by this command writes to a variable of storage class `Storage` `Class` `TileAttachmentQCOM`, the corresponding VkImageView using must not have been created with an `aspectMask` that contains VK_IMAGE_ASPECT_DEPTH_BIT or VK_IMAGE_ASPECT_STENCIL_BIT

- VUID-vkCmdDispatchBase-None-10674
  If the per-tile execution model is enabled, the tileShadingPerTileDispatch feature must be enabled

- VUID-vkCmdDispatchBase-None-10675
  Memory backing image subresources used as tile attachments in the current render pass must not be written in any way other than as a tile attachment by this command

- VUID-vkCmdDispatchBase-None-10676
  If any recorded command in the current subpass will write to an image subresource as a tile attachment, this command must not read from the memory backing that image subresource in any other way than as a tile attachment

- VUID-vkCmdDispatchBase-None-10743
  If there is no bound compute pipeline, a valid `VkShaderEXT` must be bound to the VK_SHADER_STAGE_COMPUTE_BIT stage

- VUID-vkCmdDispatchBase-commandBuffer-02712
  If `commandBuffer` is a protected command buffer and `protectedNoFault` is not supported, any resource written to by the `VkPipeline` object bound to the pipeline bind point used by this command must not be an unprotected resource

- VUID-vkCmdDispatchBase-commandBuffer-02713
  If `commandBuffer` is a protected command buffer and `protectedNoFault` is not supported, pipeline stages other than the framebuffer-space and compute stages in the `VkPipeline` object bound to the pipeline bind point used by this command must not write to any resource

- VUID-vkCmdDispatchBase-commandBuffer-04617
  If any of the shader stages of the `VkPipeline` bound to the pipeline bind point used by this command uses the `RayQueryKHR` capability, then `commandBuffer` must not be a protected command buffer

- VUID-vkCmdDispatchBase-baseGroupX-00421
  `baseGroupX` must be less than `VkPhysicalDeviceLimits`::`maxComputeWorkGroupCount`[0]

- VUID-vkCmdDispatchBase-baseGroupX-00422
  `baseGroupY` must be less than `VkPhysicalDeviceLimits`::`maxComputeWorkGroupCount`[1]

- VUID-vkCmdDispatchBase-baseGroupZ-00423
  `baseGroupZ` must be less than `VkPhysicalDeviceLimits`::`maxComputeWorkGroupCount`[2]

- VUID-vkCmdDispatchBase-groupCountX-00424
  `groupCountX` must be less than or equal to `VkPhysicalDeviceLimits`::`maxComputeWorkGroupCount`[0] minus `baseGroupX`

- VUID-vkCmdDispatchBase-groupCountY-00425
  `groupCountY` must be less than or equal to `VkPhysicalDeviceLimits`::`maxComputeWorkGroupCount`[1] minus `baseGroupY`

- VUID-vkCmdDispatchBase-groupCountZ-00426
  `groupCountZ` must be less than or equal to `VkPhysicalDeviceLimits`::`maxComputeWorkGroupCount`[2] minus `baseGroupZ`

- VUID-vkCmdDispatchBase-baseGroupX-00427
  If any of `baseGroupX`, `baseGroupY`, or `baseGroupZ` are not zero, then the bound compute pipeline must have been created with the VK_PIPELINE_CREATE_DISPATCH_BASE_BIT flag or the bound compute shader object must have been created with the VK_SHADER_CREATE_DISPATCH_BASE_BIT_EXT flag

Valid Usage (Implicit)

- VUID-vkCmdDispatchBase-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdDispatchBase-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdDispatchBase-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT operations

- VUID-vkCmdDispatchBase-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdDispatchBase-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_COMPUTE_BIT | Action

Conditional Rendering

vkCmdDispatchBase is affected by conditional rendering

To record an area-based dispatch, call:

    // Provided by VK_QCOM_tile_shading
    void vkCmdDispatchTileQCOM(
        VkCommandBuffer                             commandBuffer,
        const VkDispatchTileInfoQCOM*               pDispatchTileInfo);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `pDispatchTileInfo` is a pointer to a VkDispatchTileInfoQCOM structure containing information about the area-based dispatch.

This command operates in the per-tile execution model, invoking a separate dispatch for each covered tile. The global workgroup count and local workgroup size of each dispatch are defined by the implementation to efficiently iterate over a uniform grid of pixel blocks within the area of its active tile.

Each shader invocation operates on a single pixel block and its size is determined by the shader’s tiling rate, which must be defined by shaders executed by this command. The `TileShadingRateQCOM` execution mode operand defines the shader’s tiling rate. Its `x` and `y` must be a power of two and less than or equal to the maxTileShadingRate limit. Its `z` must be less than or equal to the active tile’s depth as reported by VK_QCOM_tile_properties, and VkTilePropertiesQCOM.tileSize.z % `TileShadingRateQCOM`::`z` must equal `0`.

The start location of the shader invocation’s pixel block is vec3(`TileOffsetQCOM`, 0) + (`GlobalInvocationId` * `TileShadingRateQCOM`)

Shader invocations can perform tile attachment load/store operations at any location within the active tile, but the most efficient access may be limited to fragment locations within and local to the shader invocation’s pixel block.

Valid Usage

- VUID-vkCmdDispatchTileQCOM-magFilter-04553
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdDispatchTileQCOM-magFilter-09598
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdDispatchTileQCOM-mipmapMode-04770
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdDispatchTileQCOM-mipmapMode-09599
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdDispatchTileQCOM-unnormalizedCoordinates-09635
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `levelCount` and `layerCount` must be 1

- VUID-vkCmdDispatchTileQCOM-None-08609
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `viewType` must be VK_IMAGE_VIEW_TYPE_1D or VK_IMAGE_VIEW_TYPE_2D

- VUID-vkCmdDispatchTileQCOM-None-08610
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions with `ImplicitLod`, `Dref` or `Proj` in their name

- VUID-vkCmdDispatchTileQCOM-None-08611
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions that includes a LOD bias or any offset values

- VUID-vkCmdDispatchTileQCOM-None-06479
  If a VkImageView is sampled with depth comparison, the image view’s format features must contain VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT

- VUID-vkCmdDispatchTileQCOM-None-02691
  If a VkImageView is accessed using atomic operations as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT

- VUID-vkCmdDispatchTileQCOM-None-07888
  If a VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER descriptor is accessed using atomic operations as a result of this command, then the storage texel buffer’s format features must contain VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT

- VUID-vkCmdDispatchTileQCOM-None-02692
  If a VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT

- VUID-vkCmdDispatchTileQCOM-None-02693
  If the VK_EXT_filter_cubic extension is not enabled and any VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, it must not have a VkImageViewType of VK_IMAGE_VIEW_TYPE_3D, VK_IMAGE_VIEW_TYPE_CUBE, or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY

- VUID-vkCmdDispatchTileQCOM-filterCubic-02694
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have a VkImageViewType and format that supports cubic filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubic` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdDispatchTileQCOM-filterCubicMinmax-02695
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX as a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubicMinmax` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdDispatchTileQCOM-cubicRangeClamp-09212
  If the `cubicRangeClamp` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must not have a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM

- VUID-vkCmdDispatchTileQCOM-reductionMode-09213
  Any VkImageView being sampled with a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM as a result of this command must sample with VK_FILTER_CUBIC_EXT

- VUID-vkCmdDispatchTileQCOM-selectableCubicWeights-09214
  If the `selectableCubicWeights` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have VkSamplerCubicWeightsCreateInfoQCOM::`cubicWeights` equal to VK_CUBIC_FILTER_WEIGHTS_CATMULL_ROM_QCOM

- VUID-vkCmdDispatchTileQCOM-flags-02696
  Any VkImage created with a VkImageCreateInfo::`flags` containing VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV sampled as a result of this command must only be sampled using a VkSamplerAddressMode of VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDispatchTileQCOM-OpTypeImage-07027
  For any VkImageView being written as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdDispatchTileQCOM-OpTypeImage-07028
  For any VkImageView being read as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdDispatchTileQCOM-OpTypeImage-07029
  For any VkBufferView being written as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown`, the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdDispatchTileQCOM-OpTypeImage-07030
  Any VkBufferView being read as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown` then the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdDispatchTileQCOM-None-08600
  If a a bound shader was created with a pipeline layout and statically uses a set n, a descriptor set must have been bound to n at the same pipeline bind point, with layouts compatible for set n with the layout(s) used to create the shader, as described in Pipeline Layout Compatibility

- VUID-vkCmdDispatchTileQCOM-None-08601
  If a a bound shader was created with a pipeline layout or specified push constant ranges and statically uses a push constant value, that value must have been set for the same pipeline bind point, with push constant ranges that are compatible with the push constant range used to create the shader

- VUID-vkCmdDispatchTileQCOM-None-10068
  For each array of resources that is used by a bound shader, the indices used to access members of the array must be less than the descriptor count for the identified binding in the descriptor sets used by this command

- VUID-vkCmdDispatchTileQCOM-None-08114
  Descriptors in each bound descriptor set, specified via vkCmdBindDescriptorSets, must be valid if they are accessed as described by descriptor validity by the VkPipeline bound to the pipeline bind point used by this command and the bound VkPipeline was not created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDispatchTileQCOM-imageLayout-00344
  If an image descriptor is accessed by a shader, the VkImageLayout must match the subresource accessible from the VkImageView as defined by the image layout matching rules

- VUID-vkCmdDispatchTileQCOM-None-08115
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdBindDescriptorSets, the bound VkPipeline must have been created without VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDispatchTileQCOM-None-08116
  Descriptors in bound descriptor buffers, specified via vkCmdSetDescriptorBufferOffsetsEXT, must be valid if they are dynamically accessed

- VUID-vkCmdDispatchTileQCOM-None-08117
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdSetDescriptorBufferOffsetsEXT, the bound VkPipeline must have been created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDispatchTileQCOM-None-08119
  If a descriptor is dynamically used with a VkPipeline created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdDispatchTileQCOM-None-08605
  If a descriptor is dynamically used with a VkShaderEXT created with a `VkDescriptorSetLayout` that was created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdDispatchTileQCOM-None-08606
  If the `shaderObject` feature is not enabled, a valid pipeline must be bound to the pipeline bind point used by this command

- VUID-vkCmdDispatchTileQCOM-None-08608
  If a pipeline is bound to the pipeline bind point used by this command, there must not have been any calls to dynamic state setting commands for any state specified statically in the VkPipeline object bound to the pipeline bind point used by this command, since that pipeline was bound

- VUID-vkCmdDispatchTileQCOM-uniformBuffers-06935
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDispatchTileQCOM-None-08612
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDispatchTileQCOM-storageBuffers-06936
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDispatchTileQCOM-None-08613
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a storage buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDispatchTileQCOM-commandBuffer-02707
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, any resource accessed by bound shaders must not be a protected resource

- VUID-vkCmdDispatchTileQCOM-viewType-07752
  If a VkImageView is accessed as a result of this command, then the image view’s `viewType` must match the `Dim` operand of the `OpTypeImage` as described in Compatibility Between SPIR-V Image Dimensions and Vulkan ImageView Types

- VUID-vkCmdDispatchTileQCOM-format-07753
  If a VkImageView or VkBufferView is accessed as a result of this command, then the numeric type of the view’s `format` and the `Sampled` `Type` operand of the `OpTypeImage` must match

- VUID-vkCmdDispatchTileQCOM-OpImageWrite-08795
  If a VkImageView created with a format other than VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the image view’s format

- VUID-vkCmdDispatchTileQCOM-OpImageWrite-08796
  If a VkImageView created with the format VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have four components

- VUID-vkCmdDispatchTileQCOM-OpImageWrite-04469
  If a VkBufferView is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the buffer view’s format

- VUID-vkCmdDispatchTileQCOM-SampledType-04470
  If a VkImageView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdDispatchTileQCOM-SampledType-04471
  If a VkImageView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdDispatchTileQCOM-SampledType-04472
  If a VkBufferView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdDispatchTileQCOM-SampledType-04473
  If a VkBufferView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdDispatchTileQCOM-sparseImageInt64Atomics-04474
  If the `sparseImageInt64Atomics` feature is not enabled, VkImage objects created with the VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdDispatchTileQCOM-sparseImageInt64Atomics-04475
  If the `sparseImageInt64Atomics` feature is not enabled, VkBuffer objects created with the VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdDispatchTileQCOM-OpImageSampleWeightedQCOM-06971
  If `OpImageSampleWeightedQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_SAMPLED_IMAGE_BIT_QCOM

- VUID-vkCmdDispatchTileQCOM-OpImageSampleWeightedQCOM-06972
  If `OpImageSampleWeightedQCOM` uses a VkImageView as a sample weight image as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_IMAGE_BIT_QCOM

- VUID-vkCmdDispatchTileQCOM-OpImageBoxFilterQCOM-06973
  If `OpImageBoxFilterQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BOX_FILTER_SAMPLED_BIT_QCOM

- VUID-vkCmdDispatchTileQCOM-OpImageBlockMatchSSDQCOM-06974
  If `OpImageBlockMatchSSDQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdDispatchTileQCOM-OpImageBlockMatchSADQCOM-12420
  If `OpImageBlockMatchSADQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdDispatchTileQCOM-OpImageBlockMatchSADQCOM-06976
  If `OpImageBlockMatchSADQCOM` or OpImageBlockMatchSSDQCOM is used to read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdDispatchTileQCOM-OpImageSampleWeightedQCOM-06977
  If `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdDispatchTileQCOM-OpImageSampleWeightedQCOM-06978
  If any command other than `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must not have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdDispatchTileQCOM-OpImageBlockMatchWindow-09215
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM

- VUID-vkCmdDispatchTileQCOM-OpImageBlockMatchWindow-09216
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format must be a single-component format

- VUID-vkCmdDispatchTileQCOM-OpImageBlockMatchWindow-09217
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdDispatchTileQCOM-OpImageBlockMatchWindow-12421
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the `blockMatchExtendedClampToEdge` feature is not enabled, the input sampler must not have been created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDispatchTileQCOM-addressModeU-12422
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the input sampler was created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, then the sampler must have been created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDispatchTileQCOM-None-07288
  Any shader invocation executed by this command must terminate

- VUID-vkCmdDispatchTileQCOM-None-09600
  If a descriptor with type equal to any of VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, or VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT is accessed as a result of this command, all image subresources identified by that descriptor must be in the image layout identified when the descriptor was written

- VUID-vkCmdDispatchTileQCOM-micromap-11636
  If an acceleration structure is accessed as a result of this command through an `OpRayQueryProceedKHR` operation , the `VK_EXT_opacity_micromap` extension is not enabled, and the acceleration structure is built using geometry with a VkAccelerationStructureTrianglesOpacityMicromapKHR structure included in its `pNext` chain, the shader must have specified a `OpacityMicromapIdKHR` execution mode with its specialization constant operand equal to VK_TRUE

- VUID-vkCmdDispatchTileQCOM-micromap-11637
  If an acceleration structure is accessed as a result of this command and the acceleration structure was constructed through deserialization, all micromap arrays referenced by the acceleration structure that were not replaced by an acceleration structure update command must have been deserialized using the serialized data of the corresponding micromaps used to originally build the acceleration structure prior to the execution of this command on the device

- VUID-vkCmdDispatchTileQCOM-micromap-11638
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkPipeline bound to the pipeline bind point used by this command must not have been created with `flags` that includes VK_PIPELINE_CREATE_2_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_KHR

- VUID-vkCmdDispatchTileQCOM-micromap-11639
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkShaderEXT that accessed the descriptor must not have been created with `flags` that includes VK_SHADER_CREATE_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_EXT

- VUID-vkCmdDispatchTileQCOM-commandBuffer-10746
  The `VkDeviceMemory` object allocated from a `VkMemoryHeap` with the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property that is bound to a resource accessed as a result of this command must be the active bound tile memory object in `commandBuffer`

- VUID-vkCmdDispatchTileQCOM-None-10678
  If this command is recorded inside a tile shading render pass instance, the stages corresponding to the pipeline bind point used by this command must only include VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_FRAGMENT_BIT, and/or VK_SHADER_STAGE_COMPUTE_BIT

- VUID-vkCmdDispatchTileQCOM-None-10679
  If this command is recorded where per-tile execution model is enabled, there must be no access to any image while the image was be transitioned to the VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT layout

- VUID-vkCmdDispatchTileQCOM-pDescription-09900
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the underlying VkTensorARM object must have been created with the VK_TENSOR_USAGE_SHADER_BIT_ARM usage flag set

- VUID-vkCmdDispatchTileQCOM-dimensionCount-09905
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the `Rank` of the `OpTypeTensorARM` of the tensor resource variable must be equal to the `dimensionCount` provided via VkTensorCreateInfoARM::`pDescription` when creating the underlying VkTensorARM object

- VUID-vkCmdDispatchTileQCOM-OpTypeTensorARM-09906
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the element type of the `OpTypeTensorARM` of the tensor resource variable must be compatible with the VkFormat of the VkTensorViewARM used for the access

- VUID-vkCmdDispatchTileQCOM-OpTensorReadARM-12462
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, using `OpTensorReadARM` or `OpTensorWriteARM`, and the underlying VkTensorARM object was created with a VK_TENSOR_TILING_BRICK_16_WIDE_ARM, VK_TENSOR_TILING_BRICK_8_WIDE_ARM, VK_TENSOR_TILING_BRICK_4_WIDE_ARM, VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_ARM, or VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_64K_ARM VkTensorTilingARM, and the object read or written is an array, then the innermost coordinate provided to `OpTensorReadARM` or `OpTensorWriteARM` via the `Coordinates` operand must be a multiple of the largest power of 2 that is less than or equal to the number of components of the array

- VUID-vkCmdDispatchTileQCOM-pNext-12463
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command and the corresponding VkTensorARM object was created with a VkTensorRollingBackingCreateInfoARM structure in the `pNext` chain of VkTensorCreateInfoARM, then the number of elements accessed with one `OpTensorReadARM` or `OpTensorWriteARM`, must be less than or equal to the number of elements available from the starting coordinate in the rolling backing along the innermost dimension, defined as `wraps`[`dimensionCount` - 1] - InnermostCoordinate % `wraps`[`dimensionCount` - 1] where InnermostCoordinate is the last component of the coordinates array provided via the `Coordinates` operand

- VUID-vkCmdDispatchTileQCOM-None-12472
  Descriptors dynamically accessed in bound descriptor heaps must be valid

- VUID-vkCmdDispatchTileQCOM-None-11297
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a `OpTypeStruct` decorated with `Block` or `BufferBlock` using that mapping, the calculated offset for the resource heap must be a multiple of `bufferDescriptorAlignment`

- VUID-vkCmdDispatchTileQCOM-None-11298
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeImage` or `OpTypeSampledImage` using that mapping, the calculated offset for the resource heap must be a multiple of `imageDescriptorAlignment`

- VUID-vkCmdDispatchTileQCOM-None-11299
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeSampler` or `OpTypeSampledImage` using that mapping, the calculated offset for the sampler heap must be a multiple of `samplerDescriptorAlignment`

- VUID-vkCmdDispatchTileQCOM-None-11397
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeTensorARM` using that mapping, the calculated offset for the resource heap must be a multiple of `tensorDescriptorAlignment`

- VUID-vkCmdDispatchTileQCOM-None-11300
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 4

- VUID-vkCmdDispatchTileQCOM-None-11301
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdDispatchTileQCOM-None-11302
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress

- VUID-vkCmdDispatchTileQCOM-None-11304
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 8

- VUID-vkCmdDispatchTileQCOM-None-11305
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdDispatchTileQCOM-None-11306
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address pointed to by the address in push data must be a valid VkDeviceAddress

- VUID-vkCmdDispatchTileQCOM-None-11308
  For each descriptor heap that is statically used by a bound shader, either directly or via a descriptor mapping, a valid descriptor heap must be bound

- VUID-vkCmdDispatchTileQCOM-None-11309
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, execution of this command must not result in any descriptor read accessing data outside of the user range of the respective heap bound by `vkCmdBind*HeapEXT` commands

- VUID-vkCmdDispatchTileQCOM-None-11372
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer or uniform texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified via VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDispatchTileQCOM-None-11373
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer or storage texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDispatchTileQCOM-None-11374
  If the `robustBufferAccess2` feature is not enabled, the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, uniform texel buffer, storage buffer, or storage texel buffer, that shader must not access values outside of the range of the buffer as specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDispatchTileQCOM-pBindInfo-11375
  If any bound shader uses an embedded sampler via a descriptor mapping, the value of `pBindInfo->reservedRangeSize` set for vkCmdBindSamplerHeapEXT must be greater than or equal to `minSamplerHeapReservedRangeWithEmbedded`

- VUID-vkCmdDispatchTileQCOM-None-11376
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, and that shader statically uses a push constant value, that value must have been set by vkCmdPushDataEXT

- VUID-vkCmdDispatchTileQCOM-None-11398
  If a bound shader was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the access must not be out of bounds

- VUID-vkCmdDispatchTileQCOM-None-11437
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the buffer from which the address in push data was queried must have been created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdDispatchTileQCOM-None-11438
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdDispatchTileQCOM-None-11441
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must be aligned to `minUniformBufferOffsetAlignment`

- VUID-vkCmdDispatchTileQCOM-None-11439
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_STORAGE_BUFFER_BIT usage flag set

- VUID-vkCmdDispatchTileQCOM-None-11442
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must be aligned to `minStorageBufferOffsetAlignment`

- VUID-vkCmdDispatchTileQCOM-None-11485
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses an acceleration structure using that mapping, the address that the acceleration structure is mapped to must be an acceleration structure address retrieved from a VkAccelerationStructureKHR object via vkGetAccelerationStructureDeviceAddressKHR or handle retrieved from a VkAccelerationStructureNV object via vkGetAccelerationStructureHandleNV

- VUID-vkCmdDispatchTileQCOM-index-11450
  If a shader uses a sampler descriptor to sample an image as a result of this command, and that sampler descriptor uses a custom border color with an index defined by VkSamplerCustomBorderColorIndexCreateInfoEXT, the value of VkSamplerCustomBorderColorIndexCreateInfoEXT::`index` must have been registered before this command was recorded, and still be registered during the sampling operation, with an identically defined color

- VUID-vkCmdDispatchTileQCOM-protectedNoFault-11455
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, the address that the resource is mapped to must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdDispatchTileQCOM-protectedNoFault-11456
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, the address of the indirect memory must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdDispatchTileQCOM-None-10672
  If the per-tile execution model is not enabled, this command must be called outside of a render pass instance

- VUID-vkCmdDispatchTileQCOM-aspectMask-10673
  If this command is recorded where per-tile execution model is enabled, and if the VkPipeline object bound to the pipeline bind point used by this command writes to a variable of storage class `Storage` `Class` `TileAttachmentQCOM`, the corresponding VkImageView using must not have been created with an `aspectMask` that contains VK_IMAGE_ASPECT_DEPTH_BIT or VK_IMAGE_ASPECT_STENCIL_BIT

- VUID-vkCmdDispatchTileQCOM-None-10674
  If the per-tile execution model is enabled, the tileShadingPerTileDispatch feature must be enabled

- VUID-vkCmdDispatchTileQCOM-None-10675
  Memory backing image subresources used as tile attachments in the current render pass must not be written in any way other than as a tile attachment by this command

- VUID-vkCmdDispatchTileQCOM-None-10676
  If any recorded command in the current subpass will write to an image subresource as a tile attachment, this command must not read from the memory backing that image subresource in any other way than as a tile attachment

- VUID-vkCmdDispatchTileQCOM-None-10743
  If there is no bound compute pipeline, a valid `VkShaderEXT` must be bound to the VK_SHADER_STAGE_COMPUTE_BIT stage

- VUID-vkCmdDispatchTileQCOM-commandBuffer-02712
  If `commandBuffer` is a protected command buffer and `protectedNoFault` is not supported, any resource written to by the `VkPipeline` object bound to the pipeline bind point used by this command must not be an unprotected resource

- VUID-vkCmdDispatchTileQCOM-commandBuffer-02713
  If `commandBuffer` is a protected command buffer and `protectedNoFault` is not supported, pipeline stages other than the framebuffer-space and compute stages in the `VkPipeline` object bound to the pipeline bind point used by this command must not write to any resource

- VUID-vkCmdDispatchTileQCOM-commandBuffer-04617
  If any of the shader stages of the `VkPipeline` bound to the pipeline bind point used by this command uses the `RayQueryKHR` capability, then `commandBuffer` must not be a protected command buffer

- VUID-vkCmdDispatchTileQCOM-None-10668
  When this command is recorded per-tile execution model must be enabled

- VUID-vkCmdDispatchTileQCOM-None-10669
  The tileShadingDispatchTile must enabled

Valid Usage (Implicit)

- VUID-vkCmdDispatchTileQCOM-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdDispatchTileQCOM-pDispatchTileInfo-parameter
  `pDispatchTileInfo` must be a valid pointer to a valid VkDispatchTileInfoQCOM structure

- VUID-vkCmdDispatchTileQCOM-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdDispatchTileQCOM-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT operations

- VUID-vkCmdDispatchTileQCOM-renderpass
  This command must only be called inside of a render pass instance

- VUID-vkCmdDispatchTileQCOM-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdDispatchTileQCOM-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Inside | Outside | VK_QUEUE_COMPUTE_BIT | Action

Conditional Rendering

vkCmdDispatchTileQCOM is affected by conditional rendering

The `VkDispatchTileInfoQCOM` structure is defined as:

    // Provided by VK_QCOM_tile_shading
    typedef struct VkDispatchTileInfoQCOM {
        VkStructureType    sType;
        const void*        pNext;
    } VkDispatchTileInfoQCOM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

Valid Usage (Implicit)

- VUID-VkDispatchTileInfoQCOM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DISPATCH_TILE_INFO_QCOM

- VUID-VkDispatchTileInfoQCOM-pNext-pNext
  `pNext` must be `NULL`

A subpass shading dispatches a compute pipeline work with the work dimension of render area of the calling subpass and work groups are partitioned by specified work group size. Subpass operations like `subpassLoad` are allowed to be used.

To record a subpass shading, call:

    // Provided by VK_HUAWEI_subpass_shading
    void vkCmdSubpassShadingHUAWEI(
        VkCommandBuffer                             commandBuffer);

- `commandBuffer` is the command buffer into which the command will be recorded.

When the command is executed, a global workgroup consisting of ceil (render area size / local workgroup size) local workgroups is assembled.

Valid Usage

- VUID-vkCmdSubpassShadingHUAWEI-magFilter-04553
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdSubpassShadingHUAWEI-magFilter-09598
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdSubpassShadingHUAWEI-mipmapMode-04770
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdSubpassShadingHUAWEI-mipmapMode-09599
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdSubpassShadingHUAWEI-unnormalizedCoordinates-09635
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `levelCount` and `layerCount` must be 1

- VUID-vkCmdSubpassShadingHUAWEI-None-08609
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `viewType` must be VK_IMAGE_VIEW_TYPE_1D or VK_IMAGE_VIEW_TYPE_2D

- VUID-vkCmdSubpassShadingHUAWEI-None-08610
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions with `ImplicitLod`, `Dref` or `Proj` in their name

- VUID-vkCmdSubpassShadingHUAWEI-None-08611
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions that includes a LOD bias or any offset values

- VUID-vkCmdSubpassShadingHUAWEI-None-06479
  If a VkImageView is sampled with depth comparison, the image view’s format features must contain VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT

- VUID-vkCmdSubpassShadingHUAWEI-None-02691
  If a VkImageView is accessed using atomic operations as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT

- VUID-vkCmdSubpassShadingHUAWEI-None-07888
  If a VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER descriptor is accessed using atomic operations as a result of this command, then the storage texel buffer’s format features must contain VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT

- VUID-vkCmdSubpassShadingHUAWEI-None-02692
  If a VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT

- VUID-vkCmdSubpassShadingHUAWEI-None-02693
  If the VK_EXT_filter_cubic extension is not enabled and any VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, it must not have a VkImageViewType of VK_IMAGE_VIEW_TYPE_3D, VK_IMAGE_VIEW_TYPE_CUBE, or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY

- VUID-vkCmdSubpassShadingHUAWEI-filterCubic-02694
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have a VkImageViewType and format that supports cubic filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubic` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdSubpassShadingHUAWEI-filterCubicMinmax-02695
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX as a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubicMinmax` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdSubpassShadingHUAWEI-cubicRangeClamp-09212
  If the `cubicRangeClamp` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must not have a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM

- VUID-vkCmdSubpassShadingHUAWEI-reductionMode-09213
  Any VkImageView being sampled with a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM as a result of this command must sample with VK_FILTER_CUBIC_EXT

- VUID-vkCmdSubpassShadingHUAWEI-selectableCubicWeights-09214
  If the `selectableCubicWeights` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have VkSamplerCubicWeightsCreateInfoQCOM::`cubicWeights` equal to VK_CUBIC_FILTER_WEIGHTS_CATMULL_ROM_QCOM

- VUID-vkCmdSubpassShadingHUAWEI-flags-02696
  Any VkImage created with a VkImageCreateInfo::`flags` containing VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV sampled as a result of this command must only be sampled using a VkSamplerAddressMode of VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdSubpassShadingHUAWEI-OpTypeImage-07027
  For any VkImageView being written as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdSubpassShadingHUAWEI-OpTypeImage-07028
  For any VkImageView being read as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdSubpassShadingHUAWEI-OpTypeImage-07029
  For any VkBufferView being written as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown`, the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdSubpassShadingHUAWEI-OpTypeImage-07030
  Any VkBufferView being read as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown` then the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdSubpassShadingHUAWEI-None-08600
  If a a bound shader was created with a pipeline layout and statically uses a set n, a descriptor set must have been bound to n at the same pipeline bind point, with layouts compatible for set n with the layout(s) used to create the shader, as described in Pipeline Layout Compatibility

- VUID-vkCmdSubpassShadingHUAWEI-None-08601
  If a a bound shader was created with a pipeline layout or specified push constant ranges and statically uses a push constant value, that value must have been set for the same pipeline bind point, with push constant ranges that are compatible with the push constant range used to create the shader

- VUID-vkCmdSubpassShadingHUAWEI-None-10068
  For each array of resources that is used by a bound shader, the indices used to access members of the array must be less than the descriptor count for the identified binding in the descriptor sets used by this command

- VUID-vkCmdSubpassShadingHUAWEI-None-08114
  Descriptors in each bound descriptor set, specified via vkCmdBindDescriptorSets, must be valid if they are accessed as described by descriptor validity by the VkPipeline bound to the pipeline bind point used by this command and the bound VkPipeline was not created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdSubpassShadingHUAWEI-imageLayout-00344
  If an image descriptor is accessed by a shader, the VkImageLayout must match the subresource accessible from the VkImageView as defined by the image layout matching rules

- VUID-vkCmdSubpassShadingHUAWEI-None-08115
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdBindDescriptorSets, the bound VkPipeline must have been created without VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdSubpassShadingHUAWEI-None-08116
  Descriptors in bound descriptor buffers, specified via vkCmdSetDescriptorBufferOffsetsEXT, must be valid if they are dynamically accessed

- VUID-vkCmdSubpassShadingHUAWEI-None-08117
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdSetDescriptorBufferOffsetsEXT, the bound VkPipeline must have been created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdSubpassShadingHUAWEI-None-08119
  If a descriptor is dynamically used with a VkPipeline created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdSubpassShadingHUAWEI-None-08605
  If a descriptor is dynamically used with a VkShaderEXT created with a `VkDescriptorSetLayout` that was created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdSubpassShadingHUAWEI-None-08606
  If the `shaderObject` feature is not enabled, a valid pipeline must be bound to the pipeline bind point used by this command

- VUID-vkCmdSubpassShadingHUAWEI-None-08608
  If a pipeline is bound to the pipeline bind point used by this command, there must not have been any calls to dynamic state setting commands for any state specified statically in the VkPipeline object bound to the pipeline bind point used by this command, since that pipeline was bound

- VUID-vkCmdSubpassShadingHUAWEI-uniformBuffers-06935
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdSubpassShadingHUAWEI-None-08612
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdSubpassShadingHUAWEI-storageBuffers-06936
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdSubpassShadingHUAWEI-None-08613
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a storage buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdSubpassShadingHUAWEI-commandBuffer-02707
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, any resource accessed by bound shaders must not be a protected resource

- VUID-vkCmdSubpassShadingHUAWEI-viewType-07752
  If a VkImageView is accessed as a result of this command, then the image view’s `viewType` must match the `Dim` operand of the `OpTypeImage` as described in Compatibility Between SPIR-V Image Dimensions and Vulkan ImageView Types

- VUID-vkCmdSubpassShadingHUAWEI-format-07753
  If a VkImageView or VkBufferView is accessed as a result of this command, then the numeric type of the view’s `format` and the `Sampled` `Type` operand of the `OpTypeImage` must match

- VUID-vkCmdSubpassShadingHUAWEI-OpImageWrite-08795
  If a VkImageView created with a format other than VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the image view’s format

- VUID-vkCmdSubpassShadingHUAWEI-OpImageWrite-08796
  If a VkImageView created with the format VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have four components

- VUID-vkCmdSubpassShadingHUAWEI-OpImageWrite-04469
  If a VkBufferView is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the buffer view’s format

- VUID-vkCmdSubpassShadingHUAWEI-SampledType-04470
  If a VkImageView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdSubpassShadingHUAWEI-SampledType-04471
  If a VkImageView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdSubpassShadingHUAWEI-SampledType-04472
  If a VkBufferView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdSubpassShadingHUAWEI-SampledType-04473
  If a VkBufferView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdSubpassShadingHUAWEI-sparseImageInt64Atomics-04474
  If the `sparseImageInt64Atomics` feature is not enabled, VkImage objects created with the VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdSubpassShadingHUAWEI-sparseImageInt64Atomics-04475
  If the `sparseImageInt64Atomics` feature is not enabled, VkBuffer objects created with the VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdSubpassShadingHUAWEI-OpImageSampleWeightedQCOM-06971
  If `OpImageSampleWeightedQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_SAMPLED_IMAGE_BIT_QCOM

- VUID-vkCmdSubpassShadingHUAWEI-OpImageSampleWeightedQCOM-06972
  If `OpImageSampleWeightedQCOM` uses a VkImageView as a sample weight image as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_IMAGE_BIT_QCOM

- VUID-vkCmdSubpassShadingHUAWEI-OpImageBoxFilterQCOM-06973
  If `OpImageBoxFilterQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BOX_FILTER_SAMPLED_BIT_QCOM

- VUID-vkCmdSubpassShadingHUAWEI-OpImageBlockMatchSSDQCOM-06974
  If `OpImageBlockMatchSSDQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdSubpassShadingHUAWEI-OpImageBlockMatchSADQCOM-12420
  If `OpImageBlockMatchSADQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdSubpassShadingHUAWEI-OpImageBlockMatchSADQCOM-06976
  If `OpImageBlockMatchSADQCOM` or OpImageBlockMatchSSDQCOM is used to read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdSubpassShadingHUAWEI-OpImageSampleWeightedQCOM-06977
  If `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdSubpassShadingHUAWEI-OpImageSampleWeightedQCOM-06978
  If any command other than `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must not have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdSubpassShadingHUAWEI-OpImageBlockMatchWindow-09215
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM

- VUID-vkCmdSubpassShadingHUAWEI-OpImageBlockMatchWindow-09216
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format must be a single-component format

- VUID-vkCmdSubpassShadingHUAWEI-OpImageBlockMatchWindow-09217
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdSubpassShadingHUAWEI-OpImageBlockMatchWindow-12421
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the `blockMatchExtendedClampToEdge` feature is not enabled, the input sampler must not have been created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdSubpassShadingHUAWEI-addressModeU-12422
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the input sampler was created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, then the sampler must have been created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdSubpassShadingHUAWEI-None-07288
  Any shader invocation executed by this command must terminate

- VUID-vkCmdSubpassShadingHUAWEI-None-09600
  If a descriptor with type equal to any of VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, or VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT is accessed as a result of this command, all image subresources identified by that descriptor must be in the image layout identified when the descriptor was written

- VUID-vkCmdSubpassShadingHUAWEI-micromap-11636
  If an acceleration structure is accessed as a result of this command through an `OpRayQueryProceedKHR` operation , the `VK_EXT_opacity_micromap` extension is not enabled, and the acceleration structure is built using geometry with a VkAccelerationStructureTrianglesOpacityMicromapKHR structure included in its `pNext` chain, the shader must have specified a `OpacityMicromapIdKHR` execution mode with its specialization constant operand equal to VK_TRUE

- VUID-vkCmdSubpassShadingHUAWEI-micromap-11637
  If an acceleration structure is accessed as a result of this command and the acceleration structure was constructed through deserialization, all micromap arrays referenced by the acceleration structure that were not replaced by an acceleration structure update command must have been deserialized using the serialized data of the corresponding micromaps used to originally build the acceleration structure prior to the execution of this command on the device

- VUID-vkCmdSubpassShadingHUAWEI-micromap-11638
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkPipeline bound to the pipeline bind point used by this command must not have been created with `flags` that includes VK_PIPELINE_CREATE_2_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_KHR

- VUID-vkCmdSubpassShadingHUAWEI-micromap-11639
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkShaderEXT that accessed the descriptor must not have been created with `flags` that includes VK_SHADER_CREATE_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_EXT

- VUID-vkCmdSubpassShadingHUAWEI-commandBuffer-10746
  The `VkDeviceMemory` object allocated from a `VkMemoryHeap` with the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property that is bound to a resource accessed as a result of this command must be the active bound tile memory object in `commandBuffer`

- VUID-vkCmdSubpassShadingHUAWEI-None-10678
  If this command is recorded inside a tile shading render pass instance, the stages corresponding to the pipeline bind point used by this command must only include VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_FRAGMENT_BIT, and/or VK_SHADER_STAGE_COMPUTE_BIT

- VUID-vkCmdSubpassShadingHUAWEI-None-10679
  If this command is recorded where per-tile execution model is enabled, there must be no access to any image while the image was be transitioned to the VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT layout

- VUID-vkCmdSubpassShadingHUAWEI-pDescription-09900
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the underlying VkTensorARM object must have been created with the VK_TENSOR_USAGE_SHADER_BIT_ARM usage flag set

- VUID-vkCmdSubpassShadingHUAWEI-dimensionCount-09905
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the `Rank` of the `OpTypeTensorARM` of the tensor resource variable must be equal to the `dimensionCount` provided via VkTensorCreateInfoARM::`pDescription` when creating the underlying VkTensorARM object

- VUID-vkCmdSubpassShadingHUAWEI-OpTypeTensorARM-09906
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the element type of the `OpTypeTensorARM` of the tensor resource variable must be compatible with the VkFormat of the VkTensorViewARM used for the access

- VUID-vkCmdSubpassShadingHUAWEI-OpTensorReadARM-12462
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, using `OpTensorReadARM` or `OpTensorWriteARM`, and the underlying VkTensorARM object was created with a VK_TENSOR_TILING_BRICK_16_WIDE_ARM, VK_TENSOR_TILING_BRICK_8_WIDE_ARM, VK_TENSOR_TILING_BRICK_4_WIDE_ARM, VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_ARM, or VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_64K_ARM VkTensorTilingARM, and the object read or written is an array, then the innermost coordinate provided to `OpTensorReadARM` or `OpTensorWriteARM` via the `Coordinates` operand must be a multiple of the largest power of 2 that is less than or equal to the number of components of the array

- VUID-vkCmdSubpassShadingHUAWEI-pNext-12463
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command and the corresponding VkTensorARM object was created with a VkTensorRollingBackingCreateInfoARM structure in the `pNext` chain of VkTensorCreateInfoARM, then the number of elements accessed with one `OpTensorReadARM` or `OpTensorWriteARM`, must be less than or equal to the number of elements available from the starting coordinate in the rolling backing along the innermost dimension, defined as `wraps`[`dimensionCount` - 1] - InnermostCoordinate % `wraps`[`dimensionCount` - 1] where InnermostCoordinate is the last component of the coordinates array provided via the `Coordinates` operand

- VUID-vkCmdSubpassShadingHUAWEI-None-12472
  Descriptors dynamically accessed in bound descriptor heaps must be valid

- VUID-vkCmdSubpassShadingHUAWEI-None-11297
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a `OpTypeStruct` decorated with `Block` or `BufferBlock` using that mapping, the calculated offset for the resource heap must be a multiple of `bufferDescriptorAlignment`

- VUID-vkCmdSubpassShadingHUAWEI-None-11298
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeImage` or `OpTypeSampledImage` using that mapping, the calculated offset for the resource heap must be a multiple of `imageDescriptorAlignment`

- VUID-vkCmdSubpassShadingHUAWEI-None-11299
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeSampler` or `OpTypeSampledImage` using that mapping, the calculated offset for the sampler heap must be a multiple of `samplerDescriptorAlignment`

- VUID-vkCmdSubpassShadingHUAWEI-None-11397
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeTensorARM` using that mapping, the calculated offset for the resource heap must be a multiple of `tensorDescriptorAlignment`

- VUID-vkCmdSubpassShadingHUAWEI-None-11300
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 4

- VUID-vkCmdSubpassShadingHUAWEI-None-11301
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdSubpassShadingHUAWEI-None-11302
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress

- VUID-vkCmdSubpassShadingHUAWEI-None-11304
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 8

- VUID-vkCmdSubpassShadingHUAWEI-None-11305
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdSubpassShadingHUAWEI-None-11306
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address pointed to by the address in push data must be a valid VkDeviceAddress

- VUID-vkCmdSubpassShadingHUAWEI-None-11308
  For each descriptor heap that is statically used by a bound shader, either directly or via a descriptor mapping, a valid descriptor heap must be bound

- VUID-vkCmdSubpassShadingHUAWEI-None-11309
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, execution of this command must not result in any descriptor read accessing data outside of the user range of the respective heap bound by `vkCmdBind*HeapEXT` commands

- VUID-vkCmdSubpassShadingHUAWEI-None-11372
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer or uniform texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified via VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdSubpassShadingHUAWEI-None-11373
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer or storage texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdSubpassShadingHUAWEI-None-11374
  If the `robustBufferAccess2` feature is not enabled, the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, uniform texel buffer, storage buffer, or storage texel buffer, that shader must not access values outside of the range of the buffer as specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdSubpassShadingHUAWEI-pBindInfo-11375
  If any bound shader uses an embedded sampler via a descriptor mapping, the value of `pBindInfo->reservedRangeSize` set for vkCmdBindSamplerHeapEXT must be greater than or equal to `minSamplerHeapReservedRangeWithEmbedded`

- VUID-vkCmdSubpassShadingHUAWEI-None-11376
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, and that shader statically uses a push constant value, that value must have been set by vkCmdPushDataEXT

- VUID-vkCmdSubpassShadingHUAWEI-None-11398
  If a bound shader was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the access must not be out of bounds

- VUID-vkCmdSubpassShadingHUAWEI-None-11437
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the buffer from which the address in push data was queried must have been created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdSubpassShadingHUAWEI-None-11438
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdSubpassShadingHUAWEI-None-11441
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must be aligned to `minUniformBufferOffsetAlignment`

- VUID-vkCmdSubpassShadingHUAWEI-None-11439
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_STORAGE_BUFFER_BIT usage flag set

- VUID-vkCmdSubpassShadingHUAWEI-None-11442
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must be aligned to `minStorageBufferOffsetAlignment`

- VUID-vkCmdSubpassShadingHUAWEI-None-11485
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses an acceleration structure using that mapping, the address that the acceleration structure is mapped to must be an acceleration structure address retrieved from a VkAccelerationStructureKHR object via vkGetAccelerationStructureDeviceAddressKHR or handle retrieved from a VkAccelerationStructureNV object via vkGetAccelerationStructureHandleNV

- VUID-vkCmdSubpassShadingHUAWEI-index-11450
  If a shader uses a sampler descriptor to sample an image as a result of this command, and that sampler descriptor uses a custom border color with an index defined by VkSamplerCustomBorderColorIndexCreateInfoEXT, the value of VkSamplerCustomBorderColorIndexCreateInfoEXT::`index` must have been registered before this command was recorded, and still be registered during the sampling operation, with an identically defined color

- VUID-vkCmdSubpassShadingHUAWEI-protectedNoFault-11455
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, the address that the resource is mapped to must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdSubpassShadingHUAWEI-protectedNoFault-11456
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, the address of the indirect memory must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdSubpassShadingHUAWEI-None-04931
  This command must be called in a subpass with bind point VK_PIPELINE_BIND_POINT_SUBPASS_SHADING_HUAWEI. No draw commands can be called in the same subpass. Only one vkCmdSubpassShadingHUAWEI command can be called in a subpass

Valid Usage (Implicit)

- VUID-vkCmdSubpassShadingHUAWEI-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSubpassShadingHUAWEI-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSubpassShadingHUAWEI-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSubpassShadingHUAWEI-renderpass
  This command must only be called inside of a render pass instance

- VUID-vkCmdSubpassShadingHUAWEI-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdSubpassShadingHUAWEI-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Inside | Outside | VK_QUEUE_GRAPHICS_BIT | Action

Conditional Rendering

vkCmdSubpassShadingHUAWEI is not affected by conditional rendering

### 37.1. Dispatch Command for CUDA PTX Kernels

Compute kernels can be provided in SPIR-V or PTX code. When using PTX kernels the dispatch mechanism is different than with regular compute pipelines.

The way to create a PTX assembly file is beyond the scope of this documentation. For mode information, please refer to the CUDA toolkit documentation at https://docs.nvidia.com/cuda/.

Prior to using this command, you must initialize a CUDA module, and create a function handle that will serve as the entry point of the kernel to dispatch. See CUDA Modules.

The dispatching of a CUDA kernel is recorded into a command buffer, and when executed by a queue submit, will produce work which executes according to the bound compute pipeline.

To record a CUDA kernel launch, call:

    // Provided by VK_NV_cuda_kernel_launch
    void vkCmdCudaLaunchKernelNV(
        VkCommandBuffer                             commandBuffer,
        const VkCudaLaunchInfoNV*                   pLaunchInfo);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `pLaunchInfo` is a pointer to a VkCudaLaunchInfoNV structure in which the grid (similar to workgroup) dimension, function handle and related arguments are defined.

When the command is executed, a global workgroup consisting of `gridDimX` × `gridDimY` × `gridDimZ` local workgroups is assembled.

Valid Usage (Implicit)

- VUID-vkCmdCudaLaunchKernelNV-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdCudaLaunchKernelNV-pLaunchInfo-parameter
  `pLaunchInfo` must be a valid pointer to a valid VkCudaLaunchInfoNV structure

- VUID-vkCmdCudaLaunchKernelNV-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdCudaLaunchKernelNV-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, or VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdCudaLaunchKernelNV-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdCudaLaunchKernelNV-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT | Action

Conditional Rendering

vkCmdCudaLaunchKernelNV is not affected by conditional rendering

#### 37.1.1. Passing Dispatch Parameters and Arguments

The `VkCudaLaunchInfoNV` structure is very close to the parameters of the CUDA-Driver function cuLaunchKernel documented in section 6.19 Execution Control of CUDA Driver API.

The structure is defined as:

    // Provided by VK_NV_cuda_kernel_launch
    typedef struct VkCudaLaunchInfoNV {
        VkStructureType        sType;
        const void*            pNext;
        VkCudaFunctionNV       function;
        uint32_t               gridDimX;
        uint32_t               gridDimY;
        uint32_t               gridDimZ;
        uint32_t               blockDimX;
        uint32_t               blockDimY;
        uint32_t               blockDimZ;
        uint32_t               sharedMemBytes;
        size_t                 paramCount;
        const void* const *    pParams;
        size_t                 extraCount;
        const void* const *    pExtras;
    } VkCudaLaunchInfoNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `function` is the CUDA-Driver handle to the function being launched.

- `gridDimX` is the number of local workgroups to dispatch in the X dimension. It must be less than or equal to `VkPhysicalDeviceLimits`::`maxComputeWorkGroupCount`[0]

- `gridDimY` is the number of local workgroups to dispatch in the Y dimension. It must be less than or equal to `VkPhysicalDeviceLimits`::`maxComputeWorkGroupCount`[1]

- `gridDimZ` is the number of local workgroups to dispatch in the Z dimension. It must be less than or equal to `VkPhysicalDeviceLimits`::`maxComputeWorkGroupCount`[2]

- `blockDimX` is block size in the X dimension.

- `blockDimY` is block size in the Y dimension.

- `blockDimZ` is block size in the Z dimension.

- `sharedMemBytes` is the dynamic shared-memory size per thread block in bytes.

- `paramCount` is the length of the `pParams` table.

- `pParams` is a pointer to an array of `paramCount` pointers, corresponding to the arguments of `function`.

- `extraCount` is reserved for future use.

- `pExtras` is reserved for future use.

Kernel parameters of `function` are specified via `pParams`, very much the same way as described in cuLaunchKernel

If `function` has N parameters, then `pParams` must be an array of N pointers and `paramCount` must be N. Each of `kernelParams`[0] through `kernelParams`[N-1] must point to a region of memory from which the actual kernel parameter will be copied. The number of kernel parameters and their offsets and sizes are not specified here as that information is stored in the VkCudaFunctionNV object.

The application-owned memory pointed to by `pParams` and `kernelParams`[0] through `kernelParams`[N-1] are consumed immediately, and may be altered or freed after vkCmdCudaLaunchKernelNV has returned.

Valid Usage

- VUID-VkCudaLaunchInfoNV-gridDimX-09406
  `gridDimX` must be less than or equal to `VkPhysicalDeviceLimits`::`maxComputeWorkGroupCount`[0]

- VUID-VkCudaLaunchInfoNV-gridDimY-09407
  `gridDimY` must be less than or equal to `VkPhysicalDeviceLimits`::`maxComputeWorkGroupCount`[1]

- VUID-VkCudaLaunchInfoNV-gridDimZ-09408
  `gridDimZ` must be less than or equal to `VkPhysicalDeviceLimits`::`maxComputeWorkGroupCount`[2]

- VUID-VkCudaLaunchInfoNV-paramCount-09409
  `paramCount` must be the total amount of parameters listed in the `pParams` table

- VUID-VkCudaLaunchInfoNV-pParams-09410
  `pParams` must be a pointer to a table of `paramCount` parameters, corresponding to the arguments of `function`

- VUID-VkCudaLaunchInfoNV-extraCount-09411
  `extraCount` must be 0

- VUID-VkCudaLaunchInfoNV-pExtras-09412
  `pExtras` must be NULL

Valid Usage (Implicit)

- VUID-VkCudaLaunchInfoNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_CUDA_LAUNCH_INFO_NV

- VUID-VkCudaLaunchInfoNV-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkCudaLaunchInfoNV-function-parameter
  `function` must be a valid VkCudaFunctionNV handle

#### 37.1.2. Resource Sharing from Vulkan to the CUDA Kernel

Given that one key limitation of this extension is that Vulkan cannot access, nor bind any global resource of CUDA modules, the only way to exchange data with the kernel must be to pass resources via the arguments of the function.

You can use VK_KHR_buffer_device_address to write/read to/from a VkBuffer object. VK_KHR_buffer_device_address allows you to get the device address of the buffer to pass it as an argument into `pParams`. Application-side pointer arithmetic on the device address is legal, but will not be bounds-checked on the device.

The corresponding argument of the CUDA function should be declared as a pointer of the same type as the referenced buffer. CUDA code may simply read or write to this buffer in the typical C way.

You may also use VK_NVX_image_view_handle as another convenient way to read/write from/to a VkImage.

The corresponding argument of the CUDA function must be typed as `cudaSurfaceObject_t`.

- You may read from it by using CUDA surface-read functions such as `surf3Dread`, `surf2Dread`, and `surf1Dread`

- You may write to it by using CUDA surface-write functions such as `surf3Dwrite`, `surf2Dwrite`, and `surf1Dwrite`

Please refer to CUDA surface object documentation for more details

On Vulkan side, here is an example on how to setup VkImageViewHandleInfoNVX to query the handle for `cudaSurfaceObject_t`:

    VkImageViewHandleInfoNVX imageViewHandleInfo = {VK_STRUCTURE_TYPE_IMAGE_VIEW_HANDLE_INFO_NVX};
    imageViewHandleInfo.sampler = VK_NULL_HANDLE;
    imageViewHandleInfo.descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_IMAGE;
    imageViewHandleInfo.imageView = imageViewIn; // the VkImageView we want to access
    uint32_t myViewHandleIn = vkGetImageViewHandleNVX(m_device, &imageViewHandleInfo);
    imageViewHandleInfo.imageView = imageViewOut; // the VkImageView we want to access
    uint32_t myViewHandleOut = vkGetImageViewHandleNVX(m_device, &imageViewHandleInfo);

Here is an example of how to declare parameters for `pParams`

    VkCudaLaunchInfoNV launchInfo = { VK_STRUCTURE_TYPE_CUDA_LAUNCH_INFO_NV };

    int block_size = 8;
    float dt = 1.0f / 60.0f;

    const void* params[] =
    {
      &dt,
      &uint32_t myViewHandleIn,
      &uint32_t myViewHandleOut
    };

    launchInfo.function = cudaFunction; // CUDA function previously created
    launchInfo.gridDimX = (volumeTexDimensionNonBoundary / block_size);
    launchInfo.gridDimY = (volumeTexDimensionNonBoundary / block_size);
    launchInfo.gridDimZ = (volumeTexDimensionNonBoundary / block_size);
    launchInfo.blockDimX = block_size;
    launchInfo.blockDimY = block_size;
    launchInfo.blockDimZ = block_size;
    launchInfo.sharedMemBytes = 0;
    launchInfo.paramCount = 3;
    launchInfo.pParams = &params[0];
    launchInfo.extraCount = 0;
    launchInfo.pExtras = nullptr;

    vkCmdCudaLaunchKernelNV(commandBuffer, &launchInfo);

In the CUDA kernel source code, here is an example on how arguments match `pParams` and how we can use Surface object:

    extern "C"  __global__ void cudaFunction(
      float dt,
      cudaSurfaceObject_t volumeTexIn,
      cudaSurfaceObject_t volumeTexOut
      )
    {
      int i = 1 + blockIdx.x * blockDim.x + threadIdx.x;
      int j = 1 + blockIdx.y * blockDim.y + threadIdx.y;
      int k = 1 + blockIdx.z * blockDim.z + threadIdx.z;

      float val;
      surf3Dread(&val, volumeTexIn, i * sizeof(float), j, k);
      ...
      float result = ...;
      // write result
      surf3Dwrite(result, volumeTexOut, i * sizeof(float), j, k);
    }

### 37.2. Compute Occupancy Priority

The VK_NV_compute_occupancy_priority extension provides applications with control over how their compute workloads utilize GPU compute resources, specifically allowing prioritization relative to other simultaneously executing workloads. Applications can specify the priority with which compute workloads should occupy GPU compute resources, allowing for a fine-grained distinction between workloads that may want to execute at a background priority over a long period of time versus workloads with harder latency requirements.

To set the compute occupancy priority for subsequent compute dispatches, call:

    // Provided by VK_NV_compute_occupancy_priority
    void vkCmdSetComputeOccupancyPriorityNV(
        VkCommandBuffer                             commandBuffer,
        const VkComputeOccupancyPriorityParametersNV* pParameters);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `pParameters` is a pointer to a VkComputeOccupancyPriorityParametersNV structure specifying the occupancy priority parameters.

The occupancy priority affects how compute workloads utilize GPU compute resources relative to other simultaneously executing workloads. The priority is stateful on a command buffer. All compute dispatch commands issued subsequent to a vkCmdSetComputeOccupancyPriorityNV call will be executed with the specified priority parameters until another vkCmdSetComputeOccupancyPriorityNV call is made.

All command buffers (primary and secondary) start with a priority level equal to the VK_COMPUTE_OCCUPANCY_PRIORITY_NORMAL_NV value. The priority state is not inherited by secondary command buffers - each command buffer maintains its own independent priority state.

Valid Usage (Implicit)

- VUID-vkCmdSetComputeOccupancyPriorityNV-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetComputeOccupancyPriorityNV-pParameters-parameter
  `pParameters` must be a valid pointer to a valid VkComputeOccupancyPriorityParametersNV structure

- VUID-vkCmdSetComputeOccupancyPriorityNV-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetComputeOccupancyPriorityNV-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT operations

- VUID-vkCmdSetComputeOccupancyPriorityNV-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_COMPUTE_BIT | State

Conditional Rendering

vkCmdSetComputeOccupancyPriorityNV is not affected by conditional rendering

The `VkComputeOccupancyPriorityParametersNV` structure is defined as:

    // Provided by VK_NV_compute_occupancy_priority
    typedef struct VkComputeOccupancyPriorityParametersNV {
        VkStructureType    sType;
        const void*        pNext;
        float              occupancyPriority;
        float              occupancyThrottling;
    } VkComputeOccupancyPriorityParametersNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `occupancyPriority` is a value specifying the occupancy priority for subsequent compute workloads, with a valid range of [0.0, 1.0]. A value of 0.0 represents the lowest priority, while a value of 1.0 is the maximum priority. Default priority is specified by a value of 0.5.

- `occupancyThrottling` is a value specifying the level of occupancy throttling applied to subsequent workloads, with a valid range of [0.0, 1.0]. A value of 0.0 (the default) means no throttling is applied, allowing workloads to use the full available compute capacity. Non-zero values represent increasing levels of throttling, with higher values resulting in more restrictive occupancy limits. A value of 1.0 represents the maximum level of throttling supported by the implementation.

Valid Usage

- VUID-VkComputeOccupancyPriorityParametersNV-occupancyPriority-12298
  `occupancyPriority` must be between `0` and `1`, inclusive

- VUID-VkComputeOccupancyPriorityParametersNV-occupancyThrottling-12299
  `occupancyThrottling` must be between `0` and `1`, inclusive

Valid Usage (Implicit)

- VUID-VkComputeOccupancyPriorityParametersNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_COMPUTE_OCCUPANCY_PRIORITY_PARAMETERS_NV

- VUID-VkComputeOccupancyPriorityParametersNV-pNext-pNext
  `pNext` must be `NULL`

VK_COMPUTE_OCCUPANCY_PRIORITY_LOW_NV is a constant value that can be used for VkComputeOccupancyPriorityParametersNV::`occupancyPriority` to specify a low priority level.

    #define VK_COMPUTE_OCCUPANCY_PRIORITY_LOW_NV 0.25f

VK_COMPUTE_OCCUPANCY_PRIORITY_NORMAL_NV is a constant value that can be used for VkComputeOccupancyPriorityParametersNV::`occupancyPriority` to specify a normal priority level. This represents the default priority level.

    #define VK_COMPUTE_OCCUPANCY_PRIORITY_NORMAL_NV 0.50f

VK_COMPUTE_OCCUPANCY_PRIORITY_HIGH_NV is a constant value that can be used for VkComputeOccupancyPriorityParametersNV::`occupancyPriority` to specify a high priority level.

    #define VK_COMPUTE_OCCUPANCY_PRIORITY_HIGH_NV 0.75f

To set parameters that affect dispatch commands, call:

    // Provided by VK_ARM_scheduling_controls
    void vkCmdSetDispatchParametersARM(
        VkCommandBuffer                             commandBuffer,
        const VkDispatchParametersARM*              pDispatchParameters);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `pDispatchParameters` is a pointer to a VkDispatchParametersARM structure specifying the dispatch parameters to be set.

Parameters set using `vkCmdSetDispatchParametersARM` affect the following dispatch commands:

- vkCmdDispatch

- vkCmdDispatchBase

- vkCmdDispatchIndirect

Valid Usage

- VUID-vkCmdSetDispatchParametersARM-schedulingControlsFlags-12391
  VkPhysicalDeviceSchedulingControlsPropertiesARM::`schedulingControlsFlags` must contain VK_PHYSICAL_DEVICE_SCHEDULING_CONTROLS_DISPATCH_PARAMETERS_ARM

Valid Usage (Implicit)

- VUID-vkCmdSetDispatchParametersARM-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetDispatchParametersARM-pDispatchParameters-parameter
  `pDispatchParameters` must be a valid pointer to a valid VkDispatchParametersARM structure

- VUID-vkCmdSetDispatchParametersARM-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetDispatchParametersARM-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT operations

- VUID-vkCmdSetDispatchParametersARM-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdSetDispatchParametersARM-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Outside | VK_QUEUE_COMPUTE_BIT | State

Conditional Rendering

vkCmdSetDispatchParametersARM is not affected by conditional rendering

The `VkDispatchParametersARM` structure is defined as:

    // Provided by VK_ARM_scheduling_controls
    typedef struct VkDispatchParametersARM {
        VkStructureType    sType;
        void*              pNext;
        uint32_t           workGroupBatchSize;
        uint32_t           maxQueuedWorkGroupBatches;
        uint32_t           maxWarpsPerShaderCore;
    } VkDispatchParametersARM;

- `workGroupBatchSize`, if it is not 0, is the number of workgroups in each batch distributed to shader cores. Otherwise, the implementation selects the number of workgroups in each batch.

- `maxQueuedWorkGroupBatches`, if it is not 0, is the maximum number of workgroup batches that shader cores may queue. Otherwise, the implementation selects the maximum number of workgroup batches that shader cores may queue.

- `maxWarpsPerShaderCore`, if it is not 0, is the maximum number of warps that may run concurrently on individual shader cores. Otherwise, the implementation selects the maximum number of warps that may run concurrently on individual shader cores.

Valid Usage

- VUID-VkDispatchParametersARM-maxWarpsPerShaderCore-12392
  `maxWarpsPerShaderCore` must be less than or equal to VkPhysicalDeviceSchedulingControlsDispatchParametersPropertiesARM::`schedulingControlsMaxWarpCount`

- VUID-VkDispatchParametersARM-maxQueuedWorkGroupBatches-12393
  `maxQueuedWorkGroupBatches` must be less than or equal to VkPhysicalDeviceSchedulingControlsDispatchParametersPropertiesARM::`schedulingControlsMaxQueuedBatchesCount`

- VUID-VkDispatchParametersARM-workGroupBatchSize-12394
  `workGroupBatchSize` must be less than or equal to VkPhysicalDeviceSchedulingControlsPropertiesARM::`schedulingControlsMaxWorkGroupBatchSize`

Valid Usage (Implicit)

- VUID-VkDispatchParametersARM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DISPATCH_PARAMETERS_ARM

- VUID-VkDispatchParametersARM-pNext-pNext
  `pNext` must be `NULL`

## 38. Device-Generated Commands

This chapter discusses the generation of command buffer content on the device, for which these principle steps are to be taken:

- Define a layout describing the sequence of commands which should be generated.

- Optionally set up device-bindable shaders.

- Retrieve device addresses for setting buffers on the device.

- Fill one or more `VkBuffer` with the appropriate content that gets interpreted by the command layout.

- Create a `preprocess` `VkBuffer` using the device-queried allocation information.

- Optionally preprocess the input data in a separate action.

- Generate and execute the actual commands.

The preprocessing step executes in a separate logical pipeline from either graphics or compute. When preprocessing commands in a separate step they must be explicitly synchronized against the command execution. When not preprocessing in a separate step, the preprocessing is automatically synchronized against the command execution.

### 38.1. Indirect Commands Layout

The device-side command generation happens through an iterative processing of an atomic sequence comprised of command tokens, which are represented by:

    // Provided by VK_EXT_device_generated_commands
    VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkIndirectCommandsLayoutEXT)

or:

    // Provided by VK_NV_device_generated_commands
    VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkIndirectCommandsLayoutNV)

Each indirect command layout must have exactly one action command token and it must be the last token in the sequence.

Note | If the indirect commands layout contains only 1 token, it will be an action command token, and the contents of the indirect buffer will be a sequence of indirect command structures, similar to the ones used for indirect draws and dispatches. On some implementations, using indirect draws and dispatches for these cases will result in increased performance compared to using device-generated commands, due to the overhead that results from using the latter.

#### 38.1.1. Creation and Deletion

Indirect command layouts for `VK_EXT_device_generated_commands` are created by:

    // Provided by VK_EXT_device_generated_commands
    VkResult vkCreateIndirectCommandsLayoutEXT(
        VkDevice                                    device,
        const VkIndirectCommandsLayoutCreateInfoEXT* pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkIndirectCommandsLayoutEXT*                pIndirectCommandsLayout);

- `device` is the logical device that creates the indirect command layout.

- `pCreateInfo` is a pointer to a VkIndirectCommandsLayoutCreateInfoEXT structure containing parameters affecting creation of the indirect command layout.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

- `pIndirectCommandsLayout` is a pointer to a `VkIndirectCommandsLayoutEXT` handle in which the resulting indirect command layout is returned.

Valid Usage

- VUID-vkCreateIndirectCommandsLayoutEXT-deviceGeneratedCommands-11089
  The `VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT`::`deviceGeneratedCommands` feature must be enabled

Valid Usage (Implicit)

- VUID-vkCreateIndirectCommandsLayoutEXT-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkCreateIndirectCommandsLayoutEXT-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkIndirectCommandsLayoutCreateInfoEXT structure

- VUID-vkCreateIndirectCommandsLayoutEXT-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateIndirectCommandsLayoutEXT-pIndirectCommandsLayout-parameter
  `pIndirectCommandsLayout` must be a valid pointer to a VkIndirectCommandsLayoutEXT handle

- VUID-vkCreateIndirectCommandsLayoutEXT-device-queuecount
  The device must have been created with at least `1` queue

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkIndirectCommandsLayoutCreateInfoEXT` structure is defined as:

    // Provided by VK_EXT_device_generated_commands
    typedef struct VkIndirectCommandsLayoutCreateInfoEXT {
        VkStructureType                            sType;
        const void*                                pNext;
        VkIndirectCommandsLayoutUsageFlagsEXT      flags;
        VkShaderStageFlags                         shaderStages;
        uint32_t                                   indirectStride;
        VkPipelineLayout                           pipelineLayout;
        uint32_t                                   tokenCount;
        const VkIndirectCommandsLayoutTokenEXT*    pTokens;
    } VkIndirectCommandsLayoutCreateInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask of VkIndirectCommandsLayoutUsageFlagBitsEXT specifying usage rules for this layout.

- `shaderStages` is the VkShaderStageFlags that this layout supports.

- `indirectStride` is the distance in bytes between sequences in the indirect buffer

- `pipelineLayout` is the optional VkPipelineLayout that tokens in this layout use. If the `dynamicGeneratedPipelineLayout` feature is enabled, `pipelineLayout` can be VK_NULL_HANDLE and the layout must be specified by chaining the VkPipelineLayoutCreateInfo structure off the `pNext`. If the `descriptorHeap` feature is enabled, `pipelineLayout` can be VK_NULL_HANDLE without providing a VkPipelineLayoutCreateInfo structure.

- `tokenCount` is the length of the individual command sequence.

- `pTokens` is a pointer to an array of VkIndirectCommandsLayoutTokenEXT describing each command token in detail.

The following code illustrates some of the flags:

    void cmdProcessAllSequences(cmd, indirectExecutionSet, indirectCommandsLayout, indirectAddress, sequencesCount)
    {
      for (s = 0; s < sequencesCount; s++)
      {
        sUsed = s;

        if (indirectCommandsLayout.flags & VK_INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_EXT) {
          sUsed = incoherent_implementation_dependent_permutation[ sUsed ];
        }

        cmdProcessSequence( cmd, indirectExecutionSet, indirectCommandsLayout, indirectAddress, sUsed );
      }
    }

When tokens are consumed, an offset is computed based on token offset and stream stride. The resulting offset is required to be aligned. The alignment for a specific token is equal to the scalar alignment of the data type as defined in Alignment Requirements, or `4`, whichever is lower.

Valid Usage

- VUID-VkIndirectCommandsLayoutCreateInfoEXT-indirectStride-11090
  `indirectStride` must be less than or equal to VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT::`maxIndirectCommandsIndirectStride`

- VUID-VkIndirectCommandsLayoutCreateInfoEXT-shaderStages-11091
  `shaderStages` must only contain stages supported by VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT::`supportedIndirectCommandsShaderStages`

- VUID-VkIndirectCommandsLayoutCreateInfoEXT-tokenCount-11092
  `tokenCount` must be less than or equal to VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT::`maxIndirectCommandsTokenCount`

- VUID-VkIndirectCommandsLayoutCreateInfoEXT-pTokens-11093
  The number of tokens in the `pTokens` array with `type` equal to VK_INDIRECT_COMMANDS_TOKEN_TYPE_EXECUTION_SET_EXT must be less than or equal to `1`

- VUID-VkIndirectCommandsLayoutCreateInfoEXT-pTokens-11145
  The number of tokens in the `pTokens` array with `type` equal to VK_INDIRECT_COMMANDS_TOKEN_TYPE_SEQUENCE_INDEX_EXT must be less than or equal to `1`

- VUID-VkIndirectCommandsLayoutCreateInfoEXT-pTokens-11094
  The number of tokens in the `pTokens` array with `type` equal to VK_INDIRECT_COMMANDS_TOKEN_TYPE_SEQUENCE_INDEX_EXT or VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_DATA_SEQUENCE_INDEX_EXT must be less than or equal to `1`

- VUID-VkIndirectCommandsLayoutCreateInfoEXT-pTokens-11095
  If the action command token in the `pTokens` array is not an indexed draw token, then `pTokens` must not contain a member with `type` set to VK_INDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_EXT

- VUID-VkIndirectCommandsLayoutCreateInfoEXT-pTokens-11096
  If the action command token in the `pTokens` array is not a non-mesh draw token, then `pTokens` must not contain a member with `type` set to VK_INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_EXT

- VUID-VkIndirectCommandsLayoutCreateInfoEXT-pTokens-11097
  If the `pTokens` array contains multiple tokens with `type` equal to VK_INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_EXT, then there must be no duplicate VkIndirectCommandsVertexBufferTokenEXT::`vertexBindingUnit` values

- VUID-VkIndirectCommandsLayoutCreateInfoEXT-pTokens-11099
  For all VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_EXT, VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_DATA_EXT, VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_DATA_SEQUENCE_INDEX_EXT, and VK_INDIRECT_COMMANDS_TOKEN_TYPE_SEQUENCE_INDEX_EXT type tokens in `pTokens`, there must be no overlapping ranges between any specified push constant ranges

- VUID-VkIndirectCommandsLayoutCreateInfoEXT-pTokens-11100
  The action command token must be the last token in the `pTokens` array

- VUID-VkIndirectCommandsLayoutCreateInfoEXT-pTokens-11139
  If the `pTokens` array contains a VK_INDIRECT_COMMANDS_TOKEN_TYPE_EXECUTION_SET_EXT token, then this token must be the first token in the array

- VUID-VkIndirectCommandsLayoutCreateInfoEXT-pTokens-11101
  For any element of `pTokens`, if `type` is VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_EXT or VK_INDIRECT_COMMANDS_TOKEN_TYPE_SEQUENCE_INDEX_EXT and the `dynamicGeneratedPipelineLayout` feature is not enabled, then the `pipelineLayout` must not be VK_NULL_HANDLE

- VUID-VkIndirectCommandsLayoutCreateInfoEXT-pTokens-11102
  For any element of `pTokens`, if `type` is either VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_EXT or VK_INDIRECT_COMMANDS_TOKEN_TYPE_SEQUENCE_INDEX_EXT and `pipelineLayout` is VK_NULL_HANDLE, then the `pNext` chain must include a VkPipelineLayoutCreateInfo struct

- VUID-VkIndirectCommandsLayoutCreateInfoEXT-pTokens-11103
  For any element of `pTokens`, the `offset` must be greater than or equal to the `offset` member of the previous tokens

- VUID-VkIndirectCommandsLayoutCreateInfoEXT-pTokens-11104
  For any element of `pTokens`, if `type` is VK_INDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_EXT, VK_INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_EXT, VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_EXT, VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_COUNT_EXT, VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_NV_EXT, VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_COUNT_NV_EXT, VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_COUNT_EXT, VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_EXT, VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_COUNT_EXT, or VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_EXT, then `shaderStages` must contain graphics stages

- VUID-VkIndirectCommandsLayoutCreateInfoEXT-pTokens-11105
  For any element of `pTokens`, if `type` is VK_INDIRECT_COMMANDS_TOKEN_TYPE_DISPATCH_EXT, then `shaderStages` must be VK_SHADER_STAGE_COMPUTE_BIT

- VUID-VkIndirectCommandsLayoutCreateInfoEXT-pTokens-11106
  For any element of `pTokens`, if `type` is VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_EXT or VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_COUNT_EXT, then `shaderStages` must contain VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-VkIndirectCommandsLayoutCreateInfoEXT-pTokens-11107
  For any element of `pTokens`, if `type` is VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_NV_EXT or VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_COUNT_NV_EXT, then the `shaderStages` must contain VK_SHADER_STAGE_MESH_BIT_NV

- VUID-VkIndirectCommandsLayoutCreateInfoEXT-pTokens-11108
  For any element of `pTokens`, if `type` is VK_INDIRECT_COMMANDS_TOKEN_TYPE_TRACE_RAYS2_EXT, then `shaderStages` must contain ray tracing stages

- VUID-VkIndirectCommandsLayoutCreateInfoEXT-shaderStages-11109
  If `shaderStages` contains graphics stages then the state tokens in `pTokens` must not include VK_INDIRECT_COMMANDS_TOKEN_TYPE_TRACE_RAYS2_EXT, VK_INDIRECT_COMMANDS_TOKEN_TYPE_DISPATCH_EXT

- VUID-VkIndirectCommandsLayoutCreateInfoEXT-shaderStages-11110
  If `shaderStages` is VK_SHADER_STAGE_COMPUTE_BIT then the state tokens in `pTokens` must only include VK_INDIRECT_COMMANDS_TOKEN_TYPE_DISPATCH_EXT, VK_INDIRECT_COMMANDS_TOKEN_TYPE_EXECUTION_SET_EXT, VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_EXT, VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_DATA_EXT, VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_DATA_SEQUENCE_INDEX_EXT, or VK_INDIRECT_COMMANDS_TOKEN_TYPE_SEQUENCE_INDEX_EXT

- VUID-VkIndirectCommandsLayoutCreateInfoEXT-shaderStages-11111
  If `shaderStages` contains ray tracing stages then the state tokens in `pTokens` must only include VK_INDIRECT_COMMANDS_TOKEN_TYPE_TRACE_RAYS2_EXT, VK_INDIRECT_COMMANDS_TOKEN_TYPE_EXECUTION_SET_EXT, VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_EXT, VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_DATA_EXT, VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_DATA_SEQUENCE_INDEX_EXT, or VK_INDIRECT_COMMANDS_TOKEN_TYPE_SEQUENCE_INDEX_EXT

- VUID-VkIndirectCommandsLayoutCreateInfoEXT-shaderStages-11112
  The `shaderStages` must only contain stages from one of the following:

  - VK_SHADER_STAGE_ALL (if the `descriptorHeap` feature is enabled)

  - graphics stages

  - VK_SHADER_STAGE_COMPUTE_BIT

  - mesh stages and VK_SHADER_STAGE_FRAGMENT_BIT

  - ray tracing stages

- VUID-VkIndirectCommandsLayoutCreateInfoEXT-shaderStages-11113
  If `shaderStages` contains VK_SHADER_STAGE_FRAGMENT_BIT, then `shaderStages` must also contain VK_SHADER_STAGE_VERTEX_BIT or VK_SHADER_STAGE_MESH_BIT_EXT

Valid Usage (Implicit)

- VUID-VkIndirectCommandsLayoutCreateInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_EXT

- VUID-VkIndirectCommandsLayoutCreateInfoEXT-pNext-pNext
  `pNext` must be `NULL` or a pointer to a valid instance of VkPipelineLayoutCreateInfo

- VUID-VkIndirectCommandsLayoutCreateInfoEXT-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkIndirectCommandsLayoutCreateInfoEXT-flags-parameter
  `flags` must be a valid combination of VkIndirectCommandsLayoutUsageFlagBitsEXT values

- VUID-VkIndirectCommandsLayoutCreateInfoEXT-shaderStages-parameter
  `shaderStages` must be a valid combination of VkShaderStageFlagBits values

- VUID-VkIndirectCommandsLayoutCreateInfoEXT-shaderStages-requiredbitmask
  `shaderStages` must not be `0`

- VUID-VkIndirectCommandsLayoutCreateInfoEXT-pipelineLayout-parameter
  If `pipelineLayout` is not VK_NULL_HANDLE, `pipelineLayout` must be a valid VkPipelineLayout handle

- VUID-VkIndirectCommandsLayoutCreateInfoEXT-pTokens-parameter
  `pTokens` must be a valid pointer to an array of `tokenCount` valid VkIndirectCommandsLayoutTokenEXT structures

- VUID-VkIndirectCommandsLayoutCreateInfoEXT-tokenCount-arraylength
  `tokenCount` must be greater than `0`

Bits which can be set in VkIndirectCommandsLayoutCreateInfoEXT::`flags`, specifying usage hints of an indirect command layout, are:

    // Provided by VK_EXT_device_generated_commands
    typedef enum VkIndirectCommandsLayoutUsageFlagBitsEXT {
        VK_INDIRECT_COMMANDS_LAYOUT_USAGE_EXPLICIT_PREPROCESS_BIT_EXT = 0x00000001,
        VK_INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_EXT = 0x00000002,
    } VkIndirectCommandsLayoutUsageFlagBitsEXT;

- VK_INDIRECT_COMMANDS_LAYOUT_USAGE_EXPLICIT_PREPROCESS_BIT_EXT specifies that the layout is always used with the manual preprocessing step through calling vkCmdPreprocessGeneratedCommandsEXT and executed by vkCmdExecuteGeneratedCommandsEXT with `isPreprocessed` set to VK_TRUE.

- VK_INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_EXT specifies that the processing of sequences will happen at an implementation-dependent order, which is not guaranteed to be deterministic using the same input data. This flag is ignored when the `shaderStages` is VK_SHADER_STAGE_COMPUTE_BIT as it is implied that the dispatch sequence is always unordered.

    // Provided by VK_EXT_device_generated_commands
    typedef VkFlags VkIndirectCommandsLayoutUsageFlagsEXT;

`VkIndirectCommandsLayoutUsageFlagsEXT` is a bitmask type for setting a mask of zero or more VkIndirectCommandsLayoutUsageFlagBitsEXT.

Indirect command layouts for `VK_EXT_device_generated_commands` are destroyed by:

    // Provided by VK_EXT_device_generated_commands
    void vkDestroyIndirectCommandsLayoutEXT(
        VkDevice                                    device,
        VkIndirectCommandsLayoutEXT                 indirectCommandsLayout,
        const VkAllocationCallbacks*                pAllocator);

- `device` is the logical device that destroys the layout.

- `indirectCommandsLayout` is the layout to destroy.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

Valid Usage

- VUID-vkDestroyIndirectCommandsLayoutEXT-indirectCommandsLayout-11114
  All submitted commands that refer to `indirectCommandsLayout` must have completed execution

- VUID-vkDestroyIndirectCommandsLayoutEXT-indirectCommandsLayout-11115
  If `VkAllocationCallbacks` were provided when `indirectCommandsLayout` was created, a compatible set of callbacks must be provided here

- VUID-vkDestroyIndirectCommandsLayoutEXT-indirectCommandsLayout-11116
  If no `VkAllocationCallbacks` were provided when `indirectCommandsLayout` was created, `pAllocator` must be `NULL`

Valid Usage (Implicit)

- VUID-vkDestroyIndirectCommandsLayoutEXT-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkDestroyIndirectCommandsLayoutEXT-indirectCommandsLayout-parameter
  If `indirectCommandsLayout` is not VK_NULL_HANDLE, `indirectCommandsLayout` must be a valid VkIndirectCommandsLayoutEXT handle

- VUID-vkDestroyIndirectCommandsLayoutEXT-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkDestroyIndirectCommandsLayoutEXT-indirectCommandsLayout-parent
  If `indirectCommandsLayout` is a valid handle, it must have been created, allocated, or retrieved from `device`

Host Synchronization

- Host access to `indirectCommandsLayout` must be externally synchronized

Indirect command layouts for `VK_NV_device_generated_commands` are created by:

    // Provided by VK_NV_device_generated_commands
    VkResult vkCreateIndirectCommandsLayoutNV(
        VkDevice                                    device,
        const VkIndirectCommandsLayoutCreateInfoNV* pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkIndirectCommandsLayoutNV*                 pIndirectCommandsLayout);

- `device` is the logical device that creates the indirect command layout.

- `pCreateInfo` is a pointer to a VkIndirectCommandsLayoutCreateInfoNV structure containing parameters affecting creation of the indirect command layout.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

- `pIndirectCommandsLayout` is a pointer to a `VkIndirectCommandsLayoutNV` handle in which the resulting indirect command layout is returned.

Valid Usage

- VUID-vkCreateIndirectCommandsLayoutNV-deviceGeneratedCommands-02929
  The `VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV`::`deviceGeneratedCommands` feature must be enabled

Valid Usage (Implicit)

- VUID-vkCreateIndirectCommandsLayoutNV-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkCreateIndirectCommandsLayoutNV-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkIndirectCommandsLayoutCreateInfoNV structure

- VUID-vkCreateIndirectCommandsLayoutNV-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateIndirectCommandsLayoutNV-pIndirectCommandsLayout-parameter
  `pIndirectCommandsLayout` must be a valid pointer to a VkIndirectCommandsLayoutNV handle

- VUID-vkCreateIndirectCommandsLayoutNV-device-queuecount
  The device must have been created with at least `1` queue

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkIndirectCommandsLayoutCreateInfoNV` structure is defined as:

    // Provided by VK_NV_device_generated_commands
    typedef struct VkIndirectCommandsLayoutCreateInfoNV {
        VkStructureType                           sType;
        const void*                               pNext;
        VkIndirectCommandsLayoutUsageFlagsNV      flags;
        VkPipelineBindPoint                       pipelineBindPoint;
        uint32_t                                  tokenCount;
        const VkIndirectCommandsLayoutTokenNV*    pTokens;
        uint32_t                                  streamCount;
        const uint32_t*                           pStreamStrides;
    } VkIndirectCommandsLayoutCreateInfoNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `pipelineBindPoint` is the VkPipelineBindPoint that this layout targets.

- `flags` is a bitmask of VkIndirectCommandsLayoutUsageFlagBitsNV specifying usage hints of this layout.

- `tokenCount` is the length of the individual command sequence.

- `pTokens` is an array describing each command token in detail. See VkIndirectCommandsTokenTypeNV and VkIndirectCommandsLayoutTokenNV below for details.

- `streamCount` is the number of streams used to provide the token inputs.

- `pStreamStrides` is an array defining the byte stride for each input stream.

The following code illustrates some of the flags:

    void cmdProcessAllSequences(cmd, pipeline, indirectCommandsLayout, pIndirectCommandsTokens, sequencesCount, indexbuffer, indexbufferOffset)
    {
      for (s = 0; s < sequencesCount; s++)
      {
        sUsed = s;

        if (indirectCommandsLayout.flags & VK_INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NV) {
          sUsed = indexbuffer.load_uint32( sUsed * sizeof(uint32_t) + indexbufferOffset);
        }

        if (indirectCommandsLayout.flags & VK_INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NV) {
          sUsed = incoherent_implementation_dependent_permutation[ sUsed ];
        }

        cmdProcessSequence( cmd, pipeline, indirectCommandsLayout, pIndirectCommandsTokens, sUsed );
      }
    }

When tokens are consumed, an offset is computed based on token offset and stream stride. The resulting offset is required to be aligned. The alignment for a specific token is equal to the scalar alignment of the data type as defined in Alignment Requirements, or `VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV`::`minIndirectCommandsBufferOffsetAlignment`, whichever is lower.

Note | A `minIndirectCommandsBufferOffsetAlignment` of 4 allows VkDeviceAddress to be packed as `uvec2` with scalar layout instead of `uint64_t` with 8 byte alignment. This enables direct compatibility with D3D12 command signature layouts.

Valid Usage

- VUID-VkIndirectCommandsLayoutCreateInfoNV-pipelineBindPoint-02930
  The `pipelineBindPoint` must be VK_PIPELINE_BIND_POINT_GRAPHICS or VK_PIPELINE_BIND_POINT_COMPUTE

- VUID-VkIndirectCommandsLayoutCreateInfoNV-tokenCount-02931
  `tokenCount` must be greater than `0` and less than or equal to `VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV`::`maxIndirectCommandsTokenCount`

- VUID-VkIndirectCommandsLayoutCreateInfoNV-pTokens-02932
  If `pTokens` contains an entry of VK_INDIRECT_COMMANDS_TOKEN_TYPE_SHADER_GROUP_NV it must be the first element of the array and there must be only a single element of such token type

- VUID-VkIndirectCommandsLayoutCreateInfoNV-pTokens-09585
  If `pTokens` contains an entry of VK_INDIRECT_COMMANDS_TOKEN_TYPE_PIPELINE_NV it must be the first element of the array and there must be only a single element of such token type

- VUID-VkIndirectCommandsLayoutCreateInfoNV-pTokens-02933
  If `pTokens` contains an entry of VK_INDIRECT_COMMANDS_TOKEN_TYPE_STATE_FLAGS_NV there must be only a single element of such token type

- VUID-VkIndirectCommandsLayoutCreateInfoNV-pTokens-02934
  All state tokens in `pTokens` must occur before any action command tokens (VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_NV, VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_NV, VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_TASKS_NV, VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_NV , VK_INDIRECT_COMMANDS_TOKEN_TYPE_DISPATCH_NV )

- VUID-VkIndirectCommandsLayoutCreateInfoNV-pTokens-02935
  The content of `pTokens` must include one single action command token that is compatible with the `pipelineBindPoint`

- VUID-VkIndirectCommandsLayoutCreateInfoNV-streamCount-02936
  `streamCount` must be greater than `0` and less or equal to `VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV`::`maxIndirectCommandsStreamCount`

- VUID-VkIndirectCommandsLayoutCreateInfoNV-pStreamStrides-02937
  each element of `pStreamStrides` must be greater than `0` and less than or equal to `VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV`::`maxIndirectCommandsStreamStride`. Furthermore the alignment of each token input must be ensured

- VUID-VkIndirectCommandsLayoutCreateInfoNV-pipelineBindPoint-09088
  If `pipelineBindPoint` is VK_PIPELINE_BIND_POINT_COMPUTE then the `VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV`::`deviceGeneratedCompute` feature must be enabled

- VUID-VkIndirectCommandsLayoutCreateInfoNV-pipelineBindPoint-09089
  If `pipelineBindPoint` is VK_PIPELINE_BIND_POINT_COMPUTE then the state tokens in `pTokens` must only include VK_INDIRECT_COMMANDS_TOKEN_TYPE_DISPATCH_NV, VK_INDIRECT_COMMANDS_TOKEN_TYPE_PIPELINE_NV, VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_DATA_NV, or VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_NV

- VUID-VkIndirectCommandsLayoutCreateInfoNV-pipelineBindPoint-09090
  If `pipelineBindPoint` is VK_PIPELINE_BIND_POINT_COMPUTE and `pTokens` includes VK_INDIRECT_COMMANDS_TOKEN_TYPE_PIPELINE_NV, then the `VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV`::`deviceGeneratedComputePipelines` feature must be enabled

Valid Usage (Implicit)

- VUID-VkIndirectCommandsLayoutCreateInfoNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NV

- VUID-VkIndirectCommandsLayoutCreateInfoNV-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkIndirectCommandsLayoutCreateInfoNV-flags-parameter
  `flags` must be a valid combination of VkIndirectCommandsLayoutUsageFlagBitsNV values

- VUID-VkIndirectCommandsLayoutCreateInfoNV-pipelineBindPoint-parameter
  `pipelineBindPoint` must be a valid VkPipelineBindPoint value

- VUID-VkIndirectCommandsLayoutCreateInfoNV-pTokens-parameter
  `pTokens` must be a valid pointer to an array of `tokenCount` valid VkIndirectCommandsLayoutTokenNV structures

- VUID-VkIndirectCommandsLayoutCreateInfoNV-pStreamStrides-parameter
  `pStreamStrides` must be a valid pointer to an array of `streamCount` `uint32_t` values

- VUID-VkIndirectCommandsLayoutCreateInfoNV-tokenCount-arraylength
  `tokenCount` must be greater than `0`

- VUID-VkIndirectCommandsLayoutCreateInfoNV-streamCount-arraylength
  `streamCount` must be greater than `0`

Bits which can be set in VkIndirectCommandsLayoutCreateInfoNV::`flags`, specifying usage hints of an indirect command layout, are:

    // Provided by VK_NV_device_generated_commands
    typedef enum VkIndirectCommandsLayoutUsageFlagBitsNV {
        VK_INDIRECT_COMMANDS_LAYOUT_USAGE_EXPLICIT_PREPROCESS_BIT_NV = 0x00000001,
        VK_INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NV = 0x00000002,
        VK_INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NV = 0x00000004,
    } VkIndirectCommandsLayoutUsageFlagBitsNV;

- VK_INDIRECT_COMMANDS_LAYOUT_USAGE_EXPLICIT_PREPROCESS_BIT_NV specifies that the layout is always used with the manual preprocessing step through calling vkCmdPreprocessGeneratedCommandsNV and executed by vkCmdExecuteGeneratedCommandsNV with `isPreprocessed` set to VK_TRUE.

- VK_INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NV specifies that the input data for the sequences is not implicitly indexed from 0..sequencesUsed, but an application-provided `VkBuffer` encoding the index is provided.

- VK_INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NV specifies that the processing of sequences can happen at an implementation-dependent order, which is not guaranteed to be coherent using the same input data. This flag is ignored when the `pipelineBindPoint` is VK_PIPELINE_BIND_POINT_COMPUTE as it is implied that the dispatch sequence is always unordered.

    // Provided by VK_NV_device_generated_commands
    typedef VkFlags VkIndirectCommandsLayoutUsageFlagsNV;

`VkIndirectCommandsLayoutUsageFlagsNV` is a bitmask type for setting a mask of zero or more VkIndirectCommandsLayoutUsageFlagBitsNV.

Indirect command layouts for `VK_NV_device_generated_commands` are destroyed by:

    // Provided by VK_NV_device_generated_commands
    void vkDestroyIndirectCommandsLayoutNV(
        VkDevice                                    device,
        VkIndirectCommandsLayoutNV                  indirectCommandsLayout,
        const VkAllocationCallbacks*                pAllocator);

- `device` is the logical device that destroys the layout.

- `indirectCommandsLayout` is the layout to destroy.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

Valid Usage

- VUID-vkDestroyIndirectCommandsLayoutNV-indirectCommandsLayout-02938
  All submitted commands that refer to `indirectCommandsLayout` must have completed execution

- VUID-vkDestroyIndirectCommandsLayoutNV-indirectCommandsLayout-02939
  If `VkAllocationCallbacks` were provided when `indirectCommandsLayout` was created, a compatible set of callbacks must be provided here

- VUID-vkDestroyIndirectCommandsLayoutNV-indirectCommandsLayout-02940
  If no `VkAllocationCallbacks` were provided when `indirectCommandsLayout` was created, `pAllocator` must be `NULL`

- VUID-vkDestroyIndirectCommandsLayoutNV-deviceGeneratedCommands-02941
  The `VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV`::`deviceGeneratedCommands` feature must be enabled

Valid Usage (Implicit)

- VUID-vkDestroyIndirectCommandsLayoutNV-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkDestroyIndirectCommandsLayoutNV-indirectCommandsLayout-parameter
  If `indirectCommandsLayout` is not VK_NULL_HANDLE, `indirectCommandsLayout` must be a valid VkIndirectCommandsLayoutNV handle

- VUID-vkDestroyIndirectCommandsLayoutNV-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkDestroyIndirectCommandsLayoutNV-indirectCommandsLayout-parent
  If `indirectCommandsLayout` is a valid handle, it must have been created, allocated, or retrieved from `device`

Host Synchronization

- Host access to `indirectCommandsLayout` must be externally synchronized

#### 38.1.2. Token Input Streams

For `VK_EXT_device_generated_commands`, the input streams can contain raw `uint32_t` values, existing indirect commands such as:

- VkDrawIndirectCommand

- VkDrawIndexedIndirectCommand

- VkDispatchIndirectCommand

- VkDrawMeshTasksIndirectCommandNV

- VkDrawMeshTasksIndirectCommandEXT

- VkTraceRaysIndirectCommandKHR

- VkTraceRaysIndirectCommand2KHR

or additional commands as listed below. How the data is used is described in the next section.

The `VkBindIndexBufferIndirectCommandEXT` structure specifies the input data for the VK_INDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_EXT token.

    // Provided by VK_EXT_device_generated_commands
    typedef struct VkBindIndexBufferIndirectCommandEXT {
        VkDeviceAddress    bufferAddress;
        uint32_t           size;
        VkIndexType        indexType;
    } VkBindIndexBufferIndirectCommandEXT;

- `bufferAddress` specifies a physical address of the VkBuffer used as index buffer.

- `size` is the byte size range which is available for this operation from the provided address.

- `indexType` is a VkIndexType value specifying how indices are treated.

Valid Usage

- VUID-VkBindIndexBufferIndirectCommandEXT-None-11117
  The buffer’s usage flags from which the address was acquired must have the VK_BUFFER_USAGE_INDEX_BUFFER_BIT bit set

- VUID-VkBindIndexBufferIndirectCommandEXT-bufferAddress-11118
  The `bufferAddress` must be aligned to the VkIndexType of the `indexType` used

Valid Usage (Implicit)

- VUID-VkBindIndexBufferIndirectCommandEXT-bufferAddress-parameter
  `bufferAddress` must be a valid VkDeviceAddress value

- VUID-VkBindIndexBufferIndirectCommandEXT-indexType-parameter
  `indexType` must be a valid VkIndexType value

The `VkBindVertexBufferIndirectCommandEXT` structure specifies the input data for the VK_INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_EXT token.

    // Provided by VK_EXT_device_generated_commands
    typedef struct VkBindVertexBufferIndirectCommandEXT {
        VkDeviceAddress    bufferAddress;
        uint32_t           size;
        uint32_t           stride;
    } VkBindVertexBufferIndirectCommandEXT;

- `bufferAddress` specifies a physical address of the VkBuffer used as vertex input binding.

- `size` is the byte size range which is available for this operation from the provided address.

- `stride` is the byte size stride for this vertex input binding as in `VkVertexInputBindingDescription`::`stride`.

Valid Usage

- VUID-VkBindVertexBufferIndirectCommandEXT-None-11120
  The buffer’s usage flag from which the address was acquired must have the VK_BUFFER_USAGE_VERTEX_BUFFER_BIT bit set

Valid Usage (Implicit)

- VUID-VkBindVertexBufferIndirectCommandEXT-bufferAddress-parameter
  `bufferAddress` must be a valid VkDeviceAddress value

The `VkDrawIndirectCountIndirectCommandEXT` structure specifies the input data for all draw-type tokens.

    // Provided by VK_EXT_device_generated_commands
    typedef struct VkDrawIndirectCountIndirectCommandEXT {
        VkDeviceAddress    bufferAddress;
        uint32_t           stride;
        uint32_t           commandCount;
    } VkDrawIndirectCountIndirectCommandEXT;

- `bufferAddress` specifies a physical address of the VkBuffer used for draw commands.

- `stride` is the byte size stride for the command arguments

- `commandCount` is the number of commands to execute

The corresponding indirect draw structure data will be read from the buffer address.

Valid Usage

- VUID-VkDrawIndirectCountIndirectCommandEXT-None-11122
  The buffer’s usage flag from which the address was acquired must have the VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT bit set

Valid Usage (Implicit)

- VUID-VkDrawIndirectCountIndirectCommandEXT-bufferAddress-parameter
  `bufferAddress` must be a valid VkDeviceAddress value

The `VkIndirectCommandsStreamNV` structure specifies the input data for one or more tokens at processing time.

    // Provided by VK_NV_device_generated_commands
    typedef struct VkIndirectCommandsStreamNV {
        VkBuffer        buffer;
        VkDeviceSize    offset;
    } VkIndirectCommandsStreamNV;

- `buffer` specifies the VkBuffer storing the functional arguments for each sequence. These arguments can be written by the device.

- `offset` specified an offset into `buffer` where the arguments start.

Valid Usage

- VUID-VkIndirectCommandsStreamNV-buffer-02942
  The `buffer`’s usage flag must have the VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT bit set

- VUID-VkIndirectCommandsStreamNV-offset-02943
  The `offset` must be aligned to `VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV`::`minIndirectCommandsBufferOffsetAlignment`

- VUID-VkIndirectCommandsStreamNV-buffer-02975
  If `buffer` is non-sparse then it must be bound completely and contiguously to a single `VkDeviceMemory` object

Valid Usage (Implicit)

- VUID-VkIndirectCommandsStreamNV-buffer-parameter
  `buffer` must be a valid VkBuffer handle

For `VK_NV_device_generated_commands`, the input streams can contain raw `uint32_t` values, existing indirect commands such as:

- VkDrawIndirectCommand

- VkDrawIndexedIndirectCommand

- VkDrawMeshTasksIndirectCommandNV

- VkDrawMeshTasksIndirectCommandEXT

- VkDispatchIndirectCommand

or additional commands as listed below. How the data is used is described in the next section.

The `VkBindShaderGroupIndirectCommandNV` structure specifies the input data for the VK_INDIRECT_COMMANDS_TOKEN_TYPE_SHADER_GROUP_NV token.

    // Provided by VK_NV_device_generated_commands
    typedef struct VkBindShaderGroupIndirectCommandNV {
        uint32_t    groupIndex;
    } VkBindShaderGroupIndirectCommandNV;

- `groupIndex` specifies which shader group of the current bound graphics pipeline is used.

Valid Usage

- VUID-VkBindShaderGroupIndirectCommandNV-None-02944
  The current bound graphics pipeline, as well as the pipelines it may reference, must have been created with VK_PIPELINE_CREATE_INDIRECT_BINDABLE_BIT_NV

- VUID-VkBindShaderGroupIndirectCommandNV-index-02945
  The `index` must be within range of the accessible shader groups of the current bound graphics pipeline. See vkCmdBindPipelineShaderGroupNV for further details

The `VkBindIndexBufferIndirectCommandNV` structure specifies the input data for the VK_INDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_NV token.

    // Provided by VK_NV_device_generated_commands
    typedef struct VkBindIndexBufferIndirectCommandNV {
        VkDeviceAddress    bufferAddress;
        uint32_t           size;
        VkIndexType        indexType;
    } VkBindIndexBufferIndirectCommandNV;

- `bufferAddress` specifies a physical address of the VkBuffer used as index buffer.

- `size` is the byte size range which is available for this operation from the provided address.

- `indexType` is a VkIndexType value specifying how indices are treated. Instead of the Vulkan enum values, a custom `uint32_t` value can be mapped to VkIndexType by specifying the `VkIndirectCommandsLayoutTokenNV`::`pIndexTypes` and `VkIndirectCommandsLayoutTokenNV`::`pIndexTypeValues` arrays.

Valid Usage

- VUID-VkBindIndexBufferIndirectCommandNV-None-02946
  The buffer’s usage flag from which the address was acquired must have the VK_BUFFER_USAGE_INDEX_BUFFER_BIT bit set

- VUID-VkBindIndexBufferIndirectCommandNV-bufferAddress-02947
  The `bufferAddress` must be aligned to the `indexType` used

Valid Usage (Implicit)

- VUID-VkBindIndexBufferIndirectCommandNV-bufferAddress-parameter
  `bufferAddress` must be a valid VkDeviceAddress value

- VUID-VkBindIndexBufferIndirectCommandNV-indexType-parameter
  `indexType` must be a valid VkIndexType value

The `VkBindVertexBufferIndirectCommandNV` structure specifies the input data for the VK_INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_NV token.

    // Provided by VK_NV_device_generated_commands
    typedef struct VkBindVertexBufferIndirectCommandNV {
        VkDeviceAddress    bufferAddress;
        uint32_t           size;
        uint32_t           stride;
    } VkBindVertexBufferIndirectCommandNV;

- `bufferAddress` specifies a physical address of the VkBuffer used as vertex input binding.

- `size` is the byte size range which is available for this operation from the provided address.

- `stride` is the byte size stride for this vertex input binding as in `VkVertexInputBindingDescription`::`stride`. It is only used if `VkIndirectCommandsLayoutTokenNV`::`vertexDynamicStride` was set, otherwise the stride is inherited from the current bound graphics pipeline.

Valid Usage

- VUID-VkBindVertexBufferIndirectCommandNV-None-02949
  The buffer’s usage flag from which the address was acquired must have the VK_BUFFER_USAGE_VERTEX_BUFFER_BIT bit set

Valid Usage (Implicit)

- VUID-VkBindVertexBufferIndirectCommandNV-bufferAddress-parameter
  `bufferAddress` must be a valid VkDeviceAddress value

The `VkSetStateFlagsIndirectCommandNV` structure specifies the input data for the VK_INDIRECT_COMMANDS_TOKEN_TYPE_STATE_FLAGS_NV token. Which state is changed depends on the VkIndirectStateFlagBitsNV specified at `VkIndirectCommandsLayoutNV` creation time.

    // Provided by VK_NV_device_generated_commands
    typedef struct VkSetStateFlagsIndirectCommandNV {
        uint32_t    data;
    } VkSetStateFlagsIndirectCommandNV;

- `data` encodes packed state that this command alters.

  - Bit `0`: If set represents VK_FRONT_FACE_CLOCKWISE, otherwise VK_FRONT_FACE_COUNTER_CLOCKWISE

A subset of the graphics pipeline state can be altered using indirect state flags:

    // Provided by VK_NV_device_generated_commands
    typedef enum VkIndirectStateFlagBitsNV {
        VK_INDIRECT_STATE_FLAG_FRONTFACE_BIT_NV = 0x00000001,
    } VkIndirectStateFlagBitsNV;

- VK_INDIRECT_STATE_FLAG_FRONTFACE_BIT_NV allows to toggle the VkFrontFace rasterization state for subsequent drawing commands.

    // Provided by VK_NV_device_generated_commands
    typedef VkFlags VkIndirectStateFlagsNV;

`VkIndirectStateFlagsNV` is a bitmask type for setting a mask of zero or more VkIndirectStateFlagBitsNV.

The `VkBindPipelineIndirectCommandNV` structure specifies the input data for the VK_INDIRECT_COMMANDS_TOKEN_TYPE_PIPELINE_NV token.

    // Provided by VK_NV_device_generated_commands_compute
    typedef struct VkBindPipelineIndirectCommandNV {
        VkDeviceAddress    pipelineAddress;
    } VkBindPipelineIndirectCommandNV;

- `pipelineAddress` specifies the pipeline address of the compute pipeline that will be used in device generated rendering.

Valid Usage

- VUID-VkBindPipelineIndirectCommandNV-deviceGeneratedComputePipelines-09091
  The `VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV`::`deviceGeneratedComputePipelines` feature must be enabled

- VUID-VkBindPipelineIndirectCommandNV-None-09092
  The referenced pipeline must have been created with VK_PIPELINE_CREATE_INDIRECT_BINDABLE_BIT_NV

- VUID-VkBindPipelineIndirectCommandNV-None-09093
  The referenced pipeline must have been updated with vkCmdUpdatePipelineIndirectBufferNV

- VUID-VkBindPipelineIndirectCommandNV-None-09094
  The referenced pipeline’s address must have been queried with vkGetPipelineIndirectDeviceAddressNV

Valid Usage (Implicit)

- VUID-VkBindPipelineIndirectCommandNV-pipelineAddress-parameter
  `pipelineAddress` must be a valid VkDeviceAddress value

#### 38.1.3. Tokenized Command Processing

The processing for `VK_EXT_device_generated_commands` is in principle illustrated below:

    void cmdProcessSequence(cmd, indirectExecutionSet, indirectCommandsLayout, indirectAddress, s)
    {
      for (t = 0; t < indirectCommandsLayout.tokenCount; t++)
      {
        uint32_t offset  = indirectCommandsLayout.pTokens[t].offset;
        uint32_t stride  = indirectCommandsLayout.indirectStride;
        VkDeviceAddress streamData = indirectAddress;
        const void* input = streamData + stride * s + offset;

        // further details later
        indirectCommandsLayout.pTokens[t].command (cmd, indirectExecutionSet, input, s);
      }
    }

    void cmdProcessAllSequences(cmd, indirectExecutionSet, indirectCommandsLayout, indirectAddress, sequencesCount)
    {
      for (s = 0; s < sequencesCount; s++)
      {
        sUsed = s;

        if (indirectCommandsLayout.flags & VK_INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_EXT) {
          sUsed = incoherent_implementation_dependent_permutation[ sUsed ];
        }

        cmdProcessSequence( cmd, indirectExecutionSet, indirectCommandsLayout, indirectAddress, sUsed );
      }
    }

The processing of each sequence is considered stateless, therefore all state changes must occur prior to action commands within the sequence. A single sequence is strictly targeting the VkShaderStageFlags it was created with.

The primary input data for each token is provided through `VkBuffer` content at preprocessing using vkCmdPreprocessGeneratedCommandsEXT or execution time using vkCmdExecuteGeneratedCommandsEXT, however some functional arguments, for example push constant layouts, are specified at layout creation time. The input size is different for each token.

Possible values of those elements of the VkIndirectCommandsLayoutCreateInfoEXT::`pTokens` array specifying command tokens (other elements of the array specify command parameters) are:

    // Provided by VK_EXT_device_generated_commands
    typedef enum VkIndirectCommandsTokenTypeEXT {
        VK_INDIRECT_COMMANDS_TOKEN_TYPE_EXECUTION_SET_EXT = 0,
        VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_EXT = 1,
        VK_INDIRECT_COMMANDS_TOKEN_TYPE_SEQUENCE_INDEX_EXT = 2,
        VK_INDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_EXT = 3,
        VK_INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_EXT = 4,
        VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_EXT = 5,
        VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_EXT = 6,
        VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_COUNT_EXT = 7,
        VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_COUNT_EXT = 8,
        VK_INDIRECT_COMMANDS_TOKEN_TYPE_DISPATCH_EXT = 9,
      // Provided by VK_EXT_descriptor_heap with VK_EXT_device_generated_commands
        VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_DATA_EXT = 1000135000,
      // Provided by VK_EXT_descriptor_heap with VK_EXT_device_generated_commands
        VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_DATA_SEQUENCE_INDEX_EXT = 1000135001,
      // Provided by VK_EXT_device_generated_commands with VK_NV_mesh_shader
        VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_NV_EXT = 1000202002,
      // Provided by VK_EXT_device_generated_commands with VK_NV_mesh_shader
        VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_COUNT_NV_EXT = 1000202003,
      // Provided by VK_EXT_device_generated_commands with VK_EXT_mesh_shader
        VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_EXT = 1000328000,
      // Provided by VK_EXT_device_generated_commands with VK_EXT_mesh_shader
        VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_COUNT_EXT = 1000328001,
      // Provided by VK_KHR_ray_tracing_maintenance1 with VK_EXT_device_generated_commands
        VK_INDIRECT_COMMANDS_TOKEN_TYPE_TRACE_RAYS2_EXT = 1000386004,
    } VkIndirectCommandsTokenTypeEXT;

Table 50. Supported Indirect Command Tokens
Common Tokens | Command Data
--- | ---
VK_INDIRECT_COMMANDS_TOKEN_TYPE_EXECUTION_SET_EXT | `u32[]` array of indices into the indirect execution set
VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_EXT | `u32[]` raw data
VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_DATA_EXT | `u8[]` raw data
VK_INDIRECT_COMMANDS_TOKEN_TYPE_SEQUENCE_INDEX_EXT | `u32` placeholder data (not accessed by shader)
VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_DATA_SEQUENCE_INDEX_EXT | `u32` placeholder data (not accessed by shader)
Compute Tokens |
VK_INDIRECT_COMMANDS_TOKEN_TYPE_DISPATCH_EXT | VkDispatchIndirectCommand
Ray Tracing Tokens |
VK_INDIRECT_COMMANDS_TOKEN_TYPE_TRACE_RAYS2_EXT | VkTraceRaysIndirectCommand2KHR
Graphics State Tokens |
VK_INDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_EXT | VkBindIndexBufferIndirectCommandEXT
VK_INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_EXT | VkBindVertexBufferIndirectCommandEXT
Graphics Draw Tokens |
VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_EXT | VkDrawIndexedIndirectCommand
VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_EXT | VkDrawIndirectCommand
VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_EXT | VkDrawMeshTasksIndirectCommandEXT
VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_NV_EXT | VkDrawMeshTasksIndirectCommandNV
Graphics Draw Count Tokens |
VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_COUNT_EXT | VkDrawIndirectCountIndirectCommandEXT with VkDrawIndexedIndirectCommand
VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_COUNT_EXT | VkDrawIndirectCountIndirectCommandEXT with VkDrawIndirectCommand
VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_COUNT_EXT | VkDrawIndirectCountIndirectCommandEXT with VkDrawMeshTasksIndirectCommandEXT
VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_COUNT_NV_EXT | VkDrawIndirectCountIndirectCommandEXT with VkDrawMeshTasksIndirectCommandNV

The `VkIndirectCommandsLayoutTokenEXT` structure specifies details to the function arguments that need to be known at layout creation time:

    // Provided by VK_EXT_device_generated_commands
    typedef struct VkIndirectCommandsLayoutTokenEXT {
        VkStructureType                   sType;
        const void*                       pNext;
        VkIndirectCommandsTokenTypeEXT    type;
        VkIndirectCommandsTokenDataEXT    data;
        uint32_t                          offset;
    } VkIndirectCommandsLayoutTokenEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `type` specifies the VkIndirectCommandsTokenTypeEXT for `data`.

- `data` specifies a VkIndirectCommandsTokenDataEXT containing token-specific details for command execution. It is ignored if `type` does not match any member of the VkIndirectCommandsTokenDataEXT union.

- `offset` is the relative byte offset for the token within one sequence of the indirect buffer. The data stored at that offset is the command data for the token, e.g. `VkDispatchIndirectCommand`.

Valid Usage

- VUID-VkIndirectCommandsLayoutTokenEXT-offset-11124
  `offset` must be less than or equal to VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT::`maxIndirectCommandsTokenOffset`

- VUID-VkIndirectCommandsLayoutTokenEXT-offset-11125
  `offset` must be aligned to `4`

- VUID-VkIndirectCommandsLayoutTokenEXT-meshShader-11126
  If `meshShader` or `taskShader` are not enabled, `type` must not be VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_EXT VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_COUNT_EXT, VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_NV_EXT or VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_COUNT_NV_EXT

- VUID-VkIndirectCommandsLayoutTokenEXT-rayTracingMaintenance1-11128
  If the `rayTracingMaintenance1` feature is not enabled, `type` must not be VK_INDIRECT_COMMANDS_TOKEN_TYPE_TRACE_RAYS2_EXT

- VUID-VkIndirectCommandsLayoutTokenEXT-deviceGeneratedCommandsMultiDrawIndirectCount-11129
  If VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT::`deviceGeneratedCommandsMultiDrawIndirectCount` is not supported, `type` must not be VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_COUNT_EXT or VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_COUNT_EXT

- VUID-VkIndirectCommandsLayoutTokenEXT-deviceGeneratedCommandsMultiDrawIndirectCount-11130
  If VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT::`deviceGeneratedCommandsMultiDrawIndirectCount` is not supported, `type` must not be VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_COUNT_EXT

- VUID-VkIndirectCommandsLayoutTokenEXT-deviceGeneratedCommandsMultiDrawIndirectCount-11131
  If VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT::`deviceGeneratedCommandsMultiDrawIndirectCount` is not supported, `type` must not be VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_COUNT_NV_EXT

- VUID-VkIndirectCommandsLayoutTokenEXT-descriptorHeap-11332
  If the `descriptorHeap` feature is not enabled, `type` must not be VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_DATA_EXT or VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_DATA_SEQUENCE_INDEX_EXT

- VUID-VkIndirectCommandsLayoutTokenEXT-type-11333
  If `type` is VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_DATA_EXT or VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_DATA_SEQUENCE_INDEX_EXT VkIndirectCommandsPushConstantTokenEXT::`updateRange.shaderStages` must be VK_SHADER_STAGE_ALL

Valid Usage (Implicit)

- VUID-VkIndirectCommandsLayoutTokenEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_TOKEN_EXT

- VUID-VkIndirectCommandsLayoutTokenEXT-type-parameter
  `type` must be a valid VkIndirectCommandsTokenTypeEXT value

- VUID-VkIndirectCommandsLayoutTokenEXT-pPushConstant-parameter
  If `type` is VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_EXT, VK_INDIRECT_COMMANDS_TOKEN_TYPE_SEQUENCE_INDEX_EXT, VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_DATA_EXT, or VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_DATA_SEQUENCE_INDEX_EXT, the `pPushConstant` member of `data` must be a valid pointer to a valid VkIndirectCommandsPushConstantTokenEXT structure

- VUID-VkIndirectCommandsLayoutTokenEXT-pVertexBuffer-parameter
  If `type` is VK_INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_EXT, the `pVertexBuffer` member of `data` must be a valid pointer to a valid VkIndirectCommandsVertexBufferTokenEXT structure

- VUID-VkIndirectCommandsLayoutTokenEXT-pIndexBuffer-parameter
  If `type` is VK_INDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_EXT, the `pIndexBuffer` member of `data` must be a valid pointer to a valid VkIndirectCommandsIndexBufferTokenEXT structure

- VUID-VkIndirectCommandsLayoutTokenEXT-pExecutionSet-parameter
  If `type` is VK_INDIRECT_COMMANDS_TOKEN_TYPE_EXECUTION_SET_EXT, the `pExecutionSet` member of `data` must be a valid pointer to a valid VkIndirectCommandsExecutionSetTokenEXT structure

The `VkIndirectCommandsTokenDataEXT` structure provides token-specific details used to generate the indirect execution layout.

    // Provided by VK_EXT_device_generated_commands
    typedef union VkIndirectCommandsTokenDataEXT {
        const VkIndirectCommandsPushConstantTokenEXT*    pPushConstant;
        const VkIndirectCommandsVertexBufferTokenEXT*    pVertexBuffer;
        const VkIndirectCommandsIndexBufferTokenEXT*     pIndexBuffer;
        const VkIndirectCommandsExecutionSetTokenEXT*    pExecutionSet;
    } VkIndirectCommandsTokenDataEXT;

- `pPushConstant` is a pointer to a VkIndirectCommandsPushConstantTokenEXT structure needed for VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_EXT, VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_DATA_EXT, VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_DATA_SEQUENCE_INDEX_EXT, and VK_INDIRECT_COMMANDS_TOKEN_TYPE_SEQUENCE_INDEX_EXT tokens

- `pVertexBuffer` is a pointer to a VkIndirectCommandsVertexBufferTokenEXT structure needed for VK_INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_EXT tokens

- `pIndexBuffer` is a pointer to a VkIndirectCommandsIndexBufferTokenEXT structure needed for VK_INDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_EXT tokens

- `pExecutionSet` is a pointer to a VkIndirectCommandsExecutionSetTokenEXT structure needed for VK_INDIRECT_COMMANDS_TOKEN_TYPE_EXECUTION_SET_EXT tokens

The appropriate member of the union must be set for each token.

The following code provides detailed information on how an individual sequence is processed. For valid usage, all restrictions from the regular commands apply.

    void cmdProcessSequence(cmd, indirectExecutionSet, indirectCommandsLayout, indirectAddress, s)
    {
      for (uint32_t t = 0; t < indirectCommandsLayout.tokenCount; t++) {
        VkIndirectCommandsLayoutTokenEXT *token = &indirectCommandsLayout.pTokens[t];

        uint32_t offset  = token->offset;
        uint32_t stride  = indirectCommandsLayout.indirectStride;
        VkDeviceAddress streamData = indirectAddress;
        const void* input = streamData + stride * s + offset;

        switch (token->tokenType) {
        case VK_INDIRECT_COMMANDS_TOKEN_TYPE_EXECUTION_SET_EXT:
          uint32_t *bind = input;
          VkIndirectCommandsExecutionSetTokenEXT *info = token->data.pExecutionSet;

          if (info->type == VK_INDIRECT_EXECUTION_SET_INFO_TYPE_PIPELINES_EXT) {
            vkCmdBindPipeline(cmd, indirectExecutionSet.pipelineBindPoint, indirectExecutionSet.pipelines[*bind]);
          } else {
            VkShaderStageFlagBits stages[];
            VkShaderEXT shaders[];
            uint32_t i = 0;
            IterateBitmaskLSBToMSB(iter, info->shaderStages) {
                stages[i] = iter;
                shaders[i] = indirectExecutionSet.shaders[bind[i]].shaderObject;
                i++;
            }
            vkCmdBindShadersEXT(cmd, i, stages, shaders);
          }
          break;

        case VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_EXT:
          uint32_t* data = input;
          VkPushConstantsInfoKHR info = {
            VK_STRUCTURE_TYPE_PUSH_CONSTANTS_INFO_KHR,
            // this can also use `dynamicGeneratedPipelineLayout' to pass a VkPipelineLayoutCreateInfo from pNext
            indirectCommandsLayout.pipelineLayout,
            token->token.pushConstant.updateRange.shaderStages,
            token->token.pushConstant.updateRange.offset,
            token->token.pushConstant.updateRange.size,
            data
          };

          vkCmdPushConstants2KHR(cmd, &info);
          break;

        case VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_DATA_EXT:

          VkHostAddressRangeConstEXT addressRange = {
            token->token.pushConstant.updateRange.data.size,
            input
          };

          VkPushDataInfoEXT info = {
            VK_STRUCTURE_TYPE_PUSH_DATA_INFO_EXT,
            NULL,
            token->token.pushConstant.updateRange.offset,
            addressRange
          };

          vkCmdPushDataEXT(cmd, &info);
          break;

        case VK_INDIRECT_COMMANDS_TOKEN_TYPE_SEQUENCE_INDEX_EXT:
          VkPushConstantsInfoKHR info = {
            VK_STRUCTURE_TYPE_PUSH_CONSTANTS_INFO_KHR,
            // this can also use `dynamicGeneratedPipelineLayout' to pass a VkPipelineLayoutCreateInfo from pNext
            indirectCommandsLayout.pipelineLayout,
            token->token.pushConstant.updateRange.shaderStages,
            token->token.pushConstant.updateRange.offset,
            // this must be 4
            token->token.pushConstant.updateRange.size,
            // this just updates the sequence index
            &s
          };

          vkCmdPushConstants2KHR(cmd, &info);
          break;

        case VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_DATA_SEQUENCE_INDEX_EXT:

          VkHostAddressRangeConstEXT addressRange = {
            // this must be 4
            token->token.pushConstant.updateRange.data.size,
            // this just updates the sequence index
            &s
          };

          VkPushDataInfoEXT info = {
            VK_STRUCTURE_TYPE_PUSH_DATA_INFO_EXT,
            NULL,
            token->token.pushConstant.updateRange.offset,
            addressRange
          };

          vkCmdPushDataEXT(cmd, &info);
          break;

        case VK_INDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_EXT:
          VkBindIndexBufferIndirectCommandEXT* data = input;

          vkCmdBindIndexBuffer(cmd, deriveBuffer(data->bufferAddress), deriveOffset(data->bufferAddress), data->indexType);
          break;

        case VK_INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_EXT:
          VkBindVertexBufferIndirectCommandEXT* data = input;

          vkCmdBindVertexBuffers2(cmd, token->token.vertexBuffer->vertexBindingUnit, 1, &deriveBuffer(data->bufferAddress),
                                  &deriveOffset(data->bufferAddress), data->size, data->stride);
          break;

        case VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_EXT:
          VkDrawIndexedIndirectCommand *data = input;

          vkCmdDrawIndexed(cmd, data->indexCount, data->instanceCount, data->firstIndex, data->vertexOffset, data->firstInstance);
          break;
        case VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_COUNT_EXT:
          VkDrawIndirectCountIndirectCommandEXT* data = input;

          vkCmdDrawIndexedIndirect(cmd, deriveBuffer(data->bufferAddress),  deriveoffset(data->bufferAddress), min(data->commandCount, indirectCommandsLayout.maxDrawCount), data->stride);
          break;

        case VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_EXT:
          VkDrawIndirectCommand* data = input;

          vkCmdDraw(cmd, data->vertex_count, data->instanceCount, data->firstVertex, data->firstIndex);
          break;

        case VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_COUNT_EXT:
          VkDrawIndirectCountIndirectCommandEXT* data = input;

          vkCmdDrawIndirect(cmd, deriveBuffer(data->bufferAddress), deriveoffset(data->bufferAddress), min(data->commandCount, indirectCommandsLayout.maxDrawCount), data->stride);
          break;

        // only available if VK_NV_mesh_shader is enabled
        case VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_NV_EXT:
          VkDrawMeshTasksIndirectCommandNV *data = input;

          vkCmdDrawMeshTasksNV(cmd, data->taskCount, data->firstTask);
         break;

        // only available if VK_NV_mesh_shader is enabled
        case VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_COUNT_NV_EXT:
          VkDrawIndirectCountIndirectCommandEXT* data = input;

          vkCmdDrawMeshTasksIndirectCountNV(cmd, deriveBuffer(data->bufferAddress),  deriveoffset(data->bufferAddress), min(data->commandCount, indirectCommandsLayout.maxDrawCount), data->stride);
          break;

        // only available if VK_EXT_mesh_shader is enabled
        case VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_EXT:
          VkDrawMeshTasksIndirectCommandEXT *data = input;

          vkCmdDrawMeshTasksEXT(cmd, data->groupCountX, data->groupCountY, data->groupCountZ);
         break;

        // only available if VK_EXT_mesh_shader is enabled
        case VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_COUNT_EXT:
          VkDrawIndirectCountIndirectCommandEXT* data = input;

          vkCmdDrawMeshTasksIndirectCountEXT(cmd, deriveBuffer(data->bufferAddress),  deriveoffset(data->bufferAddress), min(data->commandCount, indirectCommandsLayout.maxDrawCount), data->stride);
          break;

        case VK_INDIRECT_COMMANDS_TOKEN_TYPE_DISPATCH_EXT:
          VkDispatchIndirectCommand *data = input;

          vkCmdDispatch(cmd, data->x, data->y, data->z);
          break;

        // only available if VK_KHR_ray_tracing_maintenance1 is enabled
        case VK_INDIRECT_COMMANDS_TOKEN_TYPE_TRACE_RAYS2_EXT:
          vkCmdTraceRaysIndirect2KHR(cmd, deriveBuffer(input));
          break;
        }
      }
    }

The processing for `VK_NV_device_generated_commands` is in principle illustrated below:

    void cmdProcessSequence(cmd, pipeline, indirectCommandsLayout, pIndirectCommandsStreams, s)
    {
      for (t = 0; t < indirectCommandsLayout.tokenCount; t++)
      {
        uint32_t stream  = indirectCommandsLayout.pTokens[t].stream;
        uint32_t offset  = indirectCommandsLayout.pTokens[t].offset;
        uint32_t stride  = indirectCommandsLayout.pStreamStrides[stream];
        stream            = pIndirectCommandsStreams[stream];
        const void* input = stream.buffer.pointer( stream.offset + stride * s + offset )

        // further details later
        indirectCommandsLayout.pTokens[t].command (cmd, pipeline, input, s);
      }
    }

    void cmdProcessAllSequences(cmd, pipeline, indirectCommandsLayout, pIndirectCommandsStreams, sequencesCount)
    {
      for (s = 0; s < sequencesCount; s++)
      {
        cmdProcessSequence(cmd, pipeline, indirectCommandsLayout, pIndirectCommandsStreams, s);
      }
    }

The processing of each sequence is considered stateless, therefore all state changes must occur before any action command tokens within the sequence. A single sequence is strictly targeting the VkPipelineBindPoint it was created with.

The primary input data for each token is provided through `VkBuffer` content at preprocessing using vkCmdPreprocessGeneratedCommandsNV or execution time using vkCmdExecuteGeneratedCommandsNV, however some functional arguments, for example binding sets, are specified at layout creation time. The input size is different for each token.

The `VkIndirectCommandsPushConstantTokenEXT` structure specifies the layout token info for VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_EXT, VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_DATA_EXT, VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_DATA_SEQUENCE_INDEX_EXT, and VK_INDIRECT_COMMANDS_TOKEN_TYPE_SEQUENCE_INDEX_EXT tokens.

    // Provided by VK_EXT_device_generated_commands
    typedef struct VkIndirectCommandsPushConstantTokenEXT {
        VkPushConstantRange    updateRange;
    } VkIndirectCommandsPushConstantTokenEXT;

- `updateRange` is the push constant range that will be updated by the token.

The `stageFlags` member of `updateRange` is ignored.

Valid Usage

- VUID-VkIndirectCommandsPushConstantTokenEXT-updateRange-11132
  If the token type is VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_EXT or VK_INDIRECT_COMMANDS_TOKEN_TYPE_SEQUENCE_INDEX_EXT, `updateRange` must be contained within the push constant info used by VkIndirectCommandsLayoutCreateInfoEXT

- VUID-VkIndirectCommandsPushConstantTokenEXT-size-11133
  If the token type is VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_DATA_SEQUENCE_INDEX_EXT or VK_INDIRECT_COMMANDS_TOKEN_TYPE_SEQUENCE_INDEX_EXT, the `size` member of `updateRange` must be 4

Valid Usage (Implicit)

- VUID-VkIndirectCommandsPushConstantTokenEXT-updateRange-parameter
  `updateRange` must be a valid VkPushConstantRange structure

The `VkIndirectCommandsVertexBufferTokenEXT` structure specifies the layout token info for the VK_INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_EXT token.

    // Provided by VK_EXT_device_generated_commands
    typedef struct VkIndirectCommandsVertexBufferTokenEXT {
        uint32_t    vertexBindingUnit;
    } VkIndirectCommandsVertexBufferTokenEXT;

- `vertexBindingUnit` is the vertex input binding number to be bound.

Valid Usage

- VUID-VkIndirectCommandsVertexBufferTokenEXT-vertexBindingUnit-11134
  `vertexBindingUnit` must be less than the total number of vertex input bindings in use by the current graphics state

The `VkIndirectCommandsIndexBufferTokenEXT` structure specifies the layout token info for the VK_INDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_EXT token.

    // Provided by VK_EXT_device_generated_commands
    typedef struct VkIndirectCommandsIndexBufferTokenEXT {
        VkIndirectCommandsInputModeFlagBitsEXT    mode;
    } VkIndirectCommandsIndexBufferTokenEXT;

- `mode` specifies the mode to use with this token.

This allows for easy layering of Vulkan atop other APIs. When VK_INDIRECT_COMMANDS_INPUT_MODE_DXGI_INDEX_BUFFER_EXT is specified, the indirect buffer can contain a `D3D12_INDEX_BUFFER_VIEW` instead of VkBindIndexBufferIndirectCommandEXT as D3D’s DXGI format value is mapped to the VkIndexType. It works as both structs are otherwise binary compatible.

Valid Usage

- VUID-VkIndirectCommandsIndexBufferTokenEXT-mode-11135
  `mode` must be non-zero

- VUID-VkIndirectCommandsIndexBufferTokenEXT-mode-11136
  `mode` must be one of the bits supported in VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT::`supportedIndirectCommandsInputModes`

Valid Usage (Implicit)

- VUID-VkIndirectCommandsIndexBufferTokenEXT-mode-parameter
  `mode` must be a valid VkIndirectCommandsInputModeFlagBitsEXT value

Bits which are set in VkIndirectCommandsIndexBufferTokenEXT::`mode`, specifying how an index buffer is used, are:

    // Provided by VK_EXT_device_generated_commands
    typedef enum VkIndirectCommandsInputModeFlagBitsEXT {
        VK_INDIRECT_COMMANDS_INPUT_MODE_VULKAN_INDEX_BUFFER_EXT = 0x00000001,
        VK_INDIRECT_COMMANDS_INPUT_MODE_DXGI_INDEX_BUFFER_EXT = 0x00000002,
    } VkIndirectCommandsInputModeFlagBitsEXT;

- VK_INDIRECT_COMMANDS_INPUT_MODE_VULKAN_INDEX_BUFFER_EXT specifies that the indirect buffer contains VkBindIndexBufferIndirectCommandEXT.

- VK_INDIRECT_COMMANDS_INPUT_MODE_DXGI_INDEX_BUFFER_EXT specifies that the indirect buffer contains `D3D12_INDEX_BUFFER_VIEW`.

    // Provided by VK_EXT_device_generated_commands
    typedef VkFlags VkIndirectCommandsInputModeFlagsEXT;

`VkIndirectCommandsInputModeFlagsEXT` is a bitmask type for setting a mask of zero or more VkIndirectCommandsInputModeFlagBitsEXT.

The `VkIndirectCommandsExecutionSetTokenEXT` structure specifies the input data for the VK_INDIRECT_COMMANDS_TOKEN_TYPE_EXECUTION_SET_EXT token.

    // Provided by VK_EXT_device_generated_commands
    typedef struct VkIndirectCommandsExecutionSetTokenEXT {
        VkIndirectExecutionSetInfoTypeEXT    type;
        VkShaderStageFlags                   shaderStages;
    } VkIndirectCommandsExecutionSetTokenEXT;

- `type` describes the type of indirect execution set in use.

- `shaderStages` specifies the shaders that will be changed by this token.

Valid Usage

- VUID-VkIndirectCommandsExecutionSetTokenEXT-shaderStages-11137
  Each bit in `shaderStages` must be supported by VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT::`supportedIndirectCommandsShaderStagesPipelineBinding` or VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT::`supportedIndirectCommandsShaderStagesShaderBinding`

Valid Usage (Implicit)

- VUID-VkIndirectCommandsExecutionSetTokenEXT-type-parameter
  `type` must be a valid VkIndirectExecutionSetInfoTypeEXT value

- VUID-VkIndirectCommandsExecutionSetTokenEXT-shaderStages-parameter
  `shaderStages` must be a valid combination of VkShaderStageFlagBits values

- VUID-VkIndirectCommandsExecutionSetTokenEXT-shaderStages-requiredbitmask
  `shaderStages` must not be `0`

Possible values of those elements of the VkIndirectCommandsLayoutCreateInfoNV::`pTokens` array specifying command tokens (other elements of the array specify command parameters) are:

    // Provided by VK_NV_device_generated_commands
    typedef enum VkIndirectCommandsTokenTypeNV {
        VK_INDIRECT_COMMANDS_TOKEN_TYPE_SHADER_GROUP_NV = 0,
        VK_INDIRECT_COMMANDS_TOKEN_TYPE_STATE_FLAGS_NV = 1,
        VK_INDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_NV = 2,
        VK_INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_NV = 3,
        VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_NV = 4,
        VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_NV = 5,
        VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_NV = 6,
        VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_TASKS_NV = 7,
      // Provided by VK_EXT_descriptor_heap with VK_NV_device_generated_commands
        VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_DATA_NV = 1000135000,
      // Provided by VK_EXT_mesh_shader with VK_NV_device_generated_commands
        VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_NV = 1000328000,
      // Provided by VK_NV_device_generated_commands_compute
        VK_INDIRECT_COMMANDS_TOKEN_TYPE_PIPELINE_NV = 1000428003,
      // Provided by VK_NV_device_generated_commands_compute
        VK_INDIRECT_COMMANDS_TOKEN_TYPE_DISPATCH_NV = 1000428004,
    } VkIndirectCommandsTokenTypeNV;

Table 51. Supported Indirect Command Tokens
Token type | Equivalent command
--- | ---
VK_INDIRECT_COMMANDS_TOKEN_TYPE_SHADER_GROUP_NV | vkCmdBindPipelineShaderGroupNV
VK_INDIRECT_COMMANDS_TOKEN_TYPE_STATE_FLAGS_NV | -
VK_INDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_NV | vkCmdBindIndexBuffer
VK_INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_NV | vkCmdBindVertexBuffers
VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_NV | vkCmdPushConstants
VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_DATA_NV | vkCmdPushDataEXT
VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_NV | vkCmdDrawIndexedIndirect
VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_NV | vkCmdDrawIndirect
VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_TASKS_NV | vkCmdDrawMeshTasksIndirectNV
VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_NV | vkCmdDrawMeshTasksIndirectEXT
VK_INDIRECT_COMMANDS_TOKEN_TYPE_PIPELINE_NV | vkCmdBindPipeline
VK_INDIRECT_COMMANDS_TOKEN_TYPE_DISPATCH_NV | vkCmdDispatchIndirect

The `VkIndirectCommandsLayoutTokenNV` structure specifies details to the function arguments that need to be known at layout creation time:

    // Provided by VK_NV_device_generated_commands
    typedef struct VkIndirectCommandsLayoutTokenNV {
        VkStructureType                  sType;
        const void*                      pNext;
        VkIndirectCommandsTokenTypeNV    tokenType;
        uint32_t                         stream;
        uint32_t                         offset;
        uint32_t                         vertexBindingUnit;
        VkBool32                         vertexDynamicStride;
        VkPipelineLayout                 pushconstantPipelineLayout;
        VkShaderStageFlags               pushconstantShaderStageFlags;
        uint32_t                         pushconstantOffset;
        uint32_t                         pushconstantSize;
        VkIndirectStateFlagsNV           indirectStateFlags;
        uint32_t                         indexTypeCount;
        const VkIndexType*               pIndexTypes;
        const uint32_t*                  pIndexTypeValues;
    } VkIndirectCommandsLayoutTokenNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `tokenType` is a VkIndirectCommandsTokenTypeNV specifying the token command type.

- `stream` is the index of the input stream containing the token argument data.

- `offset` is a relative starting offset within the input stream memory for the token argument data.

- `vertexBindingUnit` is used for the vertex buffer binding command.

- `vertexDynamicStride` sets if the vertex buffer stride is provided by the binding command rather than the current bound graphics pipeline state.

- `pushconstantPipelineLayout` is the `VkPipelineLayout` used for the push constant command.

- `pushconstantShaderStageFlags` are the shader stage flags used for the push constant command.

- `pushconstantOffset` is the offset used for the push constant command.

- `pushconstantSize` is the size used for the push constant command.

- `indirectStateFlags` is a VkIndirectStateFlagsNV bitfield indicating the active states for the state flag command.

- `indexTypeCount` is the optional size of the `pIndexTypes` and `pIndexTypeValues` array pairings. If not zero, it allows to register a custom `uint32_t` value to be treated as specific VkIndexType.

- `pIndexTypes` is the used VkIndexType for the corresponding `uint32_t` value entry in `pIndexTypeValues`.

Valid Usage

- VUID-VkIndirectCommandsLayoutTokenNV-stream-02951
  `stream` must be smaller than `VkIndirectCommandsLayoutCreateInfoNV`::`streamCount`

- VUID-VkIndirectCommandsLayoutTokenNV-offset-02952
  `offset` must be less than or equal to `VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV`::`maxIndirectCommandsTokenOffset`

- VUID-VkIndirectCommandsLayoutTokenNV-offset-06888
  `offset` must be aligned to the scalar alignment of `tokenType` or `minIndirectCommandsBufferOffsetAlignment`, whichever is lower

- VUID-VkIndirectCommandsLayoutTokenNV-tokenType-02976
  If `tokenType` is VK_INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_NV, `vertexBindingUnit` must stay within device supported limits for the appropriate commands

- VUID-VkIndirectCommandsLayoutTokenNV-tokenType-02977
  If `tokenType` is VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_NV, `pushconstantPipelineLayout` must be valid

- VUID-VkIndirectCommandsLayoutTokenNV-tokenType-02978
  If `tokenType` is VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_NV, `pushconstantOffset` must be a multiple of `4`

- VUID-VkIndirectCommandsLayoutTokenNV-tokenType-02979
  If `tokenType` is VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_NV, `pushconstantSize` must be a multiple of `4`

- VUID-VkIndirectCommandsLayoutTokenNV-tokenType-02980
  If `tokenType` is VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_NV, `pushconstantOffset` must be less than `VkPhysicalDeviceLimits`::`maxPushConstantsSize`

- VUID-VkIndirectCommandsLayoutTokenNV-tokenType-02981
  If `tokenType` is VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_NV, `pushconstantSize` must be less than or equal to `VkPhysicalDeviceLimits`::`maxPushConstantsSize` minus `pushconstantOffset`

- VUID-VkIndirectCommandsLayoutTokenNV-tokenType-02982
  If `tokenType` is VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_NV, for each byte in the range specified by `pushconstantOffset` and `pushconstantSize` and for each shader stage in `pushconstantShaderStageFlags`, there must be a push constant range in `pushconstantPipelineLayout` that includes that byte and that stage

- VUID-VkIndirectCommandsLayoutTokenNV-tokenType-02983
  If `tokenType` is VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_NV, for each byte in the range specified by `pushconstantOffset` and `pushconstantSize` and for each push constant range that overlaps that byte, `pushconstantShaderStageFlags` must include all stages in that push constant range’s VkPushConstantRange::`stageFlags`

- VUID-VkIndirectCommandsLayoutTokenNV-tokenType-02984
  If `tokenType` is VK_INDIRECT_COMMANDS_TOKEN_TYPE_STATE_FLAGS_NV, `indirectStateFlags` must not be `0`

- VUID-VkIndirectCommandsLayoutTokenNV-tokenType-11334
  If `tokenType` is VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_DATA_NV, VkIndirectCommandsLayoutPushDataTokenNV::`pushDataSize` must be greater than `0`

Valid Usage (Implicit)

- VUID-VkIndirectCommandsLayoutTokenNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_TOKEN_NV

- VUID-VkIndirectCommandsLayoutTokenNV-pNext-pNext
  `pNext` must be `NULL` or a pointer to a valid instance of VkIndirectCommandsLayoutPushDataTokenNV

- VUID-VkIndirectCommandsLayoutTokenNV-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkIndirectCommandsLayoutTokenNV-tokenType-parameter
  `tokenType` must be a valid VkIndirectCommandsTokenTypeNV value

- VUID-VkIndirectCommandsLayoutTokenNV-pushconstantPipelineLayout-parameter
  If `pushconstantPipelineLayout` is not VK_NULL_HANDLE, `pushconstantPipelineLayout` must be a valid VkPipelineLayout handle

- VUID-VkIndirectCommandsLayoutTokenNV-pushconstantShaderStageFlags-parameter
  `pushconstantShaderStageFlags` must be a valid combination of VkShaderStageFlagBits values

- VUID-VkIndirectCommandsLayoutTokenNV-indirectStateFlags-parameter
  `indirectStateFlags` must be a valid combination of VkIndirectStateFlagBitsNV values

- VUID-VkIndirectCommandsLayoutTokenNV-pIndexTypes-parameter
  If `indexTypeCount` is not `0`, `pIndexTypes` must be a valid pointer to an array of `indexTypeCount` valid VkIndexType values

- VUID-VkIndirectCommandsLayoutTokenNV-pIndexTypeValues-parameter
  If `indexTypeCount` is not `0`, `pIndexTypeValues` must be a valid pointer to an array of `indexTypeCount` `uint32_t` values

The `VkIndirectCommandsLayoutTokenNV` structure specifies details to the function arguments that need to be known at layout creation time:

    // Provided by VK_EXT_descriptor_heap with VK_NV_device_generated_commands
    typedef struct VkIndirectCommandsLayoutPushDataTokenNV {
        VkStructureType    sType;
        const void*        pNext;
        uint32_t           pushDataOffset;
        uint32_t           pushDataSize;
    } VkIndirectCommandsLayoutPushDataTokenNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `pushDataOffset` is the offset used for the push data command.

- `pushDataSize` is the size used for the push data command.

If this structure is in the `pNext` chain of VkIndirectCommandsLayoutTokenNV, and VkIndirectCommandsLayoutTokenNV::`tokenType` is set to VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_DATA_NV, this structure defines a push data command layout token.

If this structure is not provided, it is equivalent to setting `pushDataOffset` and `pushDataSize` to 0.

Valid Usage

- VUID-VkIndirectCommandsLayoutPushDataTokenNV-pushDataOffset-11335
  The sum of `pushDataOffset` and `pushDataSize` must be less than `maxPushDataSize`

- VUID-VkIndirectCommandsLayoutPushDataTokenNV-pushDataOffset-11420
  `pushDataOffset` must be a multiple of 4

- VUID-VkIndirectCommandsLayoutPushDataTokenNV-pushDataSize-11421
  `pushDataSize` must be a multiple of 4

Valid Usage (Implicit)

- VUID-VkIndirectCommandsLayoutPushDataTokenNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_PUSH_DATA_TOKEN_NV

Structure Chaining

Extends the structure

  - VkIndirectCommandsLayoutTokenNV

The following code provides detailed information on how an individual sequence is processed. For valid usage, all restrictions from the regular commands apply.

    void cmdProcessSequence(cmd, pipeline, indirectCommandsLayout, pIndirectCommandsStreams, s)
    {
      for (uint32_t t = 0; t < indirectCommandsLayout.tokenCount; t++){
        token = indirectCommandsLayout.pTokens[t];

        uint32_t stride   = indirectCommandsLayout.pStreamStrides[token.stream];
        stream            = pIndirectCommandsStreams[token.stream];
        uint32_t offset   = stream.offset + stride * s + token.offset;
        const void* input = stream.buffer.pointer( offset )

        switch(input.type){
        case VK_INDIRECT_COMMANDS_TOKEN_TYPE_SHADER_GROUP_NV:
          VkBindShaderGroupIndirectCommandNV* bind = input;

          vkCmdBindPipelineShaderGroupNV(cmd, indirectCommandsLayout.pipelineBindPoint,
            pipeline, bind->groupIndex);
        break;

        case VK_INDIRECT_COMMANDS_TOKEN_TYPE_STATE_FLAGS_NV:
          VkSetStateFlagsIndirectCommandNV* state = input;

          if (token.indirectStateFlags & VK_INDIRECT_STATE_FLAG_FRONTFACE_BIT_NV){
            if (state.data & (1 << 0)){
              set VK_FRONT_FACE_CLOCKWISE;
            } else {
              set VK_FRONT_FACE_COUNTER_CLOCKWISE;
            }
          }
        break;

        case VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_NV:
          uint32_t* data = input;

          vkCmdPushConstants(cmd,
            token.pushconstantPipelineLayout
            token.pushconstantStageFlags,
            token.pushconstantOffset,
            token.pushconstantSize, data);
        break;

        case VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_DATA_NV:
          void* data = input;

          VkPushDataInfoEXT pushDataInfo = {
            .sType = VK_STRUCTURE_TYPE_PUSH_DATA_INFO_EXT,
            .pNext = NULL,
            .offset = token.pushDataOffset,
            .size = token.pushDataSize,
            .pData = input};

          vkCmdPushDataEXT(cmd, &pushDataInfo);
        break;

        case VK_INDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_NV:
          VkBindIndexBufferIndirectCommandNV* data = input;

          // the indexType may optionally be remapped
          // from a custom uint32_t value, via
          // VkIndirectCommandsLayoutTokenNV::pIndexTypeValues

          vkCmdBindIndexBuffer(cmd,
            deriveBuffer(data->bufferAddress),
            deriveOffset(data->bufferAddress),
            data->indexType);
        break;

        case VK_INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_NV:
          VkBindVertexBufferIndirectCommandNV* data = input;

          // if token.vertexDynamicStride is VK_TRUE
          // then the stride for this binding is set
          // using data->stride as well

          vkCmdBindVertexBuffers(cmd,
            token.vertexBindingUnit, 1,
            &deriveBuffer(data->bufferAddress),
            &deriveOffset(data->bufferAddress));
        break;

        case VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_NV:
          vkCmdDrawIndexedIndirect(cmd,
            stream.buffer, offset, 1, 0);
        break;

        case VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_NV:
          vkCmdDrawIndirect(cmd,
            stream.buffer,
            offset, 1, 0);
        break;

        // only available if VK_NV_mesh_shader is supported
        case VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_TASKS_NV:
          vkCmdDrawMeshTasksIndirectNV(cmd,
            stream.buffer, offset, 1, 0);
        break;

        // only available if VK_EXT_mesh_shader is supported
        case VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_NV:
          vkCmdDrawMeshTasksIndirectEXT(cmd,
            stream.buffer, offset, 1, 0);
        break;

        case VK_INDIRECT_COMMANDS_TOKEN_TYPE_PIPELINE_NV:
          VkBindPipelineIndirectCommandNV *data = input;
          VkPipeline computePipeline = deriveFromDeviceAddress(data->pipelineAddress);
          vkCmdBindPipeline(cmd, VK_PIPELINE_BIND_POINT_COMPUTE, computePipeline);
        break;

        case VK_INDIRECT_COMMANDS_TOKEN_TYPE_DISPATCH_NV:
          vkCmdDispatchIndirect(cmd, stream.buffer, offset);
        break;
        }
      }
    }

### 38.2. Indirect Commands Generation and Execution

The generation of commands on the device requires a `preprocess` buffer.

With `VK_EXT_device_generated_commands`, to retrieve the memory size and alignment requirements of a particular execution state call:

    // Provided by VK_EXT_device_generated_commands
    void vkGetGeneratedCommandsMemoryRequirementsEXT(
        VkDevice                                    device,
        const VkGeneratedCommandsMemoryRequirementsInfoEXT* pInfo,
        VkMemoryRequirements2*                      pMemoryRequirements);

- `device` is the logical device that owns the buffer.

- `pInfo` is a pointer to a VkGeneratedCommandsMemoryRequirementsInfoEXT structure containing parameters required for the memory requirements query.

- `pMemoryRequirements` is a pointer to a VkMemoryRequirements2 structure in which the memory requirements of the buffer object are returned.

If the size returned is zero, the preprocessing step can be skipped for this layout.

Valid Usage (Implicit)

- VUID-vkGetGeneratedCommandsMemoryRequirementsEXT-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetGeneratedCommandsMemoryRequirementsEXT-pInfo-parameter
  `pInfo` must be a valid pointer to a valid VkGeneratedCommandsMemoryRequirementsInfoEXT structure

- VUID-vkGetGeneratedCommandsMemoryRequirementsEXT-pMemoryRequirements-parameter
  `pMemoryRequirements` must be a valid pointer to a VkMemoryRequirements2 structure

    // Provided by VK_EXT_device_generated_commands
    typedef struct VkGeneratedCommandsMemoryRequirementsInfoEXT {
        VkStructureType                sType;
        const void*                    pNext;
        VkIndirectExecutionSetEXT      indirectExecutionSet;
        VkIndirectCommandsLayoutEXT    indirectCommandsLayout;
        uint32_t                       maxSequenceCount;
        uint32_t                       maxDrawCount;
    } VkGeneratedCommandsMemoryRequirementsInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `indirectExecutionSet` is the indirect execution set to be used for binding shaders.

- `indirectCommandsLayout` is the VkIndirectCommandsLayoutEXT that this buffer memory is intended to be used with.

- `maxSequenceCount` is the maximum number of sequences that this buffer memory can be used with.

- `maxDrawCount` is the maximum number of indirect draws that can be executed by any COUNT-type multi-draw indirect tokens. The draw count in the indirect buffer is clamped to this value for these token types.

If the action command token for the layout is not a COUNT-type multi-draw indirect token, `maxDrawCount` is ignored.

Valid Usage

- VUID-VkGeneratedCommandsMemoryRequirementsInfoEXT-maxSequencesCount-11009
  `maxSequencesCount` must be less or equal to VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT::`maxIndirectSequenceCount`

- VUID-VkGeneratedCommandsMemoryRequirementsInfoEXT-indirectCommandsLayout-11010
  If `indirectCommandsLayout` was created with a token sequence that contained the VK_INDIRECT_COMMANDS_TOKEN_TYPE_EXECUTION_SET_EXT token, `indirectExecutionSet` must not be VK_NULL_HANDLE

- VUID-VkGeneratedCommandsMemoryRequirementsInfoEXT-indirectCommandsLayout-11151
  If `indirectCommandsLayout` was created with a token sequence that contained the VK_INDIRECT_COMMANDS_TOKEN_TYPE_EXECUTION_SET_EXT token, the shader stages used to create the initial shader state of `indirectExecutionSet` must equal the VkIndirectCommandsExecutionSetTokenEXT::`shaderStages` used to create `indirectCommandsLayout`

- VUID-VkGeneratedCommandsMemoryRequirementsInfoEXT-indirectCommandsLayout-11011
  If `indirectCommandsLayout` was not created with a token sequence that contained the VK_INDIRECT_COMMANDS_TOKEN_TYPE_EXECUTION_SET_EXT token, `indirectExecutionSet` must be VK_NULL_HANDLE

- VUID-VkGeneratedCommandsMemoryRequirementsInfoEXT-maxDrawCount-11146
  When not ignored, `maxDrawCount` × `maxSequenceCount` must be less than 2^24

- VUID-VkGeneratedCommandsMemoryRequirementsInfoEXT-indirectExecutionSet-11012
  If `indirectExecutionSet` is VK_NULL_HANDLE, either a VkGeneratedCommandsPipelineInfoEXT or a VkGeneratedCommandsShaderInfoEXT must be included in the `pNext` chain

Valid Usage (Implicit)

- VUID-VkGeneratedCommandsMemoryRequirementsInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_GENERATED_COMMANDS_MEMORY_REQUIREMENTS_INFO_EXT

- VUID-VkGeneratedCommandsMemoryRequirementsInfoEXT-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkGeneratedCommandsPipelineInfoEXT or VkGeneratedCommandsShaderInfoEXT

- VUID-VkGeneratedCommandsMemoryRequirementsInfoEXT-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkGeneratedCommandsMemoryRequirementsInfoEXT-indirectExecutionSet-parameter
  If `indirectExecutionSet` is not VK_NULL_HANDLE, `indirectExecutionSet` must be a valid VkIndirectExecutionSetEXT handle

- VUID-VkGeneratedCommandsMemoryRequirementsInfoEXT-indirectCommandsLayout-parameter
  `indirectCommandsLayout` must be a valid VkIndirectCommandsLayoutEXT handle

- VUID-VkGeneratedCommandsMemoryRequirementsInfoEXT-commonparent
  Both of `indirectCommandsLayout`, and `indirectExecutionSet` that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevice

    // Provided by VK_EXT_device_generated_commands
    typedef struct VkGeneratedCommandsPipelineInfoEXT {
        VkStructureType    sType;
        void*              pNext;
        VkPipeline         pipeline;
    } VkGeneratedCommandsPipelineInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `pipeline` is a valid pipeline object.

Valid Usage (Implicit)

- VUID-VkGeneratedCommandsPipelineInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_GENERATED_COMMANDS_PIPELINE_INFO_EXT

- VUID-VkGeneratedCommandsPipelineInfoEXT-pipeline-parameter
  `pipeline` must be a valid VkPipeline handle

Structure Chaining

Extends the structures

  - VkGeneratedCommandsInfoEXT

  - VkGeneratedCommandsMemoryRequirementsInfoEXT

    // Provided by VK_EXT_device_generated_commands
    typedef struct VkGeneratedCommandsShaderInfoEXT {
        VkStructureType       sType;
        void*                 pNext;
        uint32_t              shaderCount;
        const VkShaderEXT*    pShaders;
    } VkGeneratedCommandsShaderInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `shaderCount` is the size of the `pShaders` array.

- `pShaders` is a pointer to an array of shader objects.

Valid Usage

- VUID-VkGeneratedCommandsShaderInfoEXT-pShaders-11127
  `pShaders` must not contain more than one shader object for a given VkShaderStageFlagBits stage

Valid Usage (Implicit)

- VUID-VkGeneratedCommandsShaderInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_GENERATED_COMMANDS_SHADER_INFO_EXT

- VUID-VkGeneratedCommandsShaderInfoEXT-pShaders-parameter
  `pShaders` must be a valid pointer to an array of `shaderCount` valid VkShaderEXT handles

- VUID-VkGeneratedCommandsShaderInfoEXT-shaderCount-arraylength
  `shaderCount` must be greater than `0`

Structure Chaining

Extends the structures

  - VkGeneratedCommandsInfoEXT

  - VkGeneratedCommandsMemoryRequirementsInfoEXT

With `VK_NV_device_generated_commands`, to retrieve the memory size and alignment requirements of a particular execution state call:

    // Provided by VK_NV_device_generated_commands
    void vkGetGeneratedCommandsMemoryRequirementsNV(
        VkDevice                                    device,
        const VkGeneratedCommandsMemoryRequirementsInfoNV* pInfo,
        VkMemoryRequirements2*                      pMemoryRequirements);

- `device` is the logical device that owns the buffer.

- `pInfo` is a pointer to a VkGeneratedCommandsMemoryRequirementsInfoNV structure containing parameters required for the memory requirements query.

- `pMemoryRequirements` is a pointer to a VkMemoryRequirements2 structure in which the memory requirements of the buffer object are returned.

Valid Usage

- VUID-vkGetGeneratedCommandsMemoryRequirementsNV-deviceGeneratedCommands-02906
  The `VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV`::`deviceGeneratedCommands` feature must be enabled

- VUID-vkGetGeneratedCommandsMemoryRequirementsNV-pInfo-09074
  If `pInfo->pipelineBindPoint` is of type VK_PIPELINE_BIND_POINT_COMPUTE, then the `VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV`::`deviceGeneratedCompute` feature must be enabled

Valid Usage (Implicit)

- VUID-vkGetGeneratedCommandsMemoryRequirementsNV-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetGeneratedCommandsMemoryRequirementsNV-pInfo-parameter
  `pInfo` must be a valid pointer to a valid VkGeneratedCommandsMemoryRequirementsInfoNV structure

- VUID-vkGetGeneratedCommandsMemoryRequirementsNV-pMemoryRequirements-parameter
  `pMemoryRequirements` must be a valid pointer to a VkMemoryRequirements2 structure

    // Provided by VK_NV_device_generated_commands
    typedef struct VkGeneratedCommandsMemoryRequirementsInfoNV {
        VkStructureType               sType;
        const void*                   pNext;
        VkPipelineBindPoint           pipelineBindPoint;
        VkPipeline                    pipeline;
        VkIndirectCommandsLayoutNV    indirectCommandsLayout;
        uint32_t                      maxSequencesCount;
    } VkGeneratedCommandsMemoryRequirementsInfoNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `pipelineBindPoint` is the VkPipelineBindPoint of the `pipeline` that this buffer memory is intended to be used with during the execution.

- `pipeline` is the VkPipeline that this buffer memory is intended to be used with during the execution.

- `indirectCommandsLayout` is the VkIndirectCommandsLayoutNV that this buffer memory is intended to be used with.

- `maxSequencesCount` is the maximum number of sequences that this buffer memory in combination with the other state provided can be used with.

Valid Usage

- VUID-VkGeneratedCommandsMemoryRequirementsInfoNV-maxSequencesCount-02907
  `maxSequencesCount` must be less or equal to VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV::`maxIndirectSequenceCount`

- VUID-VkGeneratedCommandsMemoryRequirementsInfoNV-pipelineBindPoint-09075
  If `pipelineBindPoint` is of type VK_PIPELINE_BIND_POINT_GRAPHICS, then `pipeline` must be a valid VkPipeline handle

- VUID-VkGeneratedCommandsMemoryRequirementsInfoNV-pipelineBindPoint-09076
  If `pipelineBindPoint` is of type VK_PIPELINE_BIND_POINT_COMPUTE, and the `indirectCommandsLayout` was not created with a VK_INDIRECT_COMMANDS_TOKEN_TYPE_PIPELINE_NV token, then the `pipeline` must be a valid VkPipeline handle

- VUID-VkGeneratedCommandsMemoryRequirementsInfoNV-pipelineBindPoint-09077
  If `pipelineBindPoint` is of type VK_PIPELINE_BIND_POINT_COMPUTE, and the `indirectCommandsLayout` contains a VK_INDIRECT_COMMANDS_TOKEN_TYPE_PIPELINE_NV token, then the `pipeline` must be VK_NULL_HANDLE

Valid Usage (Implicit)

- VUID-VkGeneratedCommandsMemoryRequirementsInfoNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_GENERATED_COMMANDS_MEMORY_REQUIREMENTS_INFO_NV

- VUID-VkGeneratedCommandsMemoryRequirementsInfoNV-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkGeneratedCommandsMemoryRequirementsInfoNV-pipelineBindPoint-parameter
  `pipelineBindPoint` must be a valid VkPipelineBindPoint value

- VUID-VkGeneratedCommandsMemoryRequirementsInfoNV-pipeline-parameter
  If `pipeline` is not VK_NULL_HANDLE, `pipeline` must be a valid VkPipeline handle

- VUID-VkGeneratedCommandsMemoryRequirementsInfoNV-indirectCommandsLayout-parameter
  `indirectCommandsLayout` must be a valid VkIndirectCommandsLayoutNV handle

- VUID-VkGeneratedCommandsMemoryRequirementsInfoNV-commonparent
  Both of `indirectCommandsLayout`, and `pipeline` that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevice

With `VK_NV_device_generated_commands`, to bind a compute pipeline in Device-Generated Commands, an application must query the pipeline’s device address.

To query a compute pipeline’s 64-bit device address, call:

    // Provided by VK_NV_device_generated_commands_compute
    VkDeviceAddress vkGetPipelineIndirectDeviceAddressNV(
        VkDevice                                    device,
        const VkPipelineIndirectDeviceAddressInfoNV* pInfo);

- `device` is the logical device on which the pipeline was created.

- `pInfo` is a pointer to a VkPipelineIndirectDeviceAddressInfoNV structure specifying the pipeline to retrieve the address for.

Valid Usage

- VUID-vkGetPipelineIndirectDeviceAddressNV-deviceGeneratedComputePipelines-09078
  The `VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV`::`deviceGeneratedComputePipelines` feature must be enabled

Valid Usage (Implicit)

- VUID-vkGetPipelineIndirectDeviceAddressNV-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetPipelineIndirectDeviceAddressNV-pInfo-parameter
  `pInfo` must be a valid pointer to a valid VkPipelineIndirectDeviceAddressInfoNV structure

The `VkPipelineIndirectDeviceAddressInfoNV` structure is defined as:

    // Provided by VK_NV_device_generated_commands_compute
    typedef struct VkPipelineIndirectDeviceAddressInfoNV {
        VkStructureType        sType;
        const void*            pNext;
        VkPipelineBindPoint    pipelineBindPoint;
        VkPipeline             pipeline;
    } VkPipelineIndirectDeviceAddressInfoNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `pipelineBindPoint` is a VkPipelineBindPoint value specifying the type of pipeline whose device address is being queried.

- `pipeline` specifies the pipeline whose device address is being queried.

Valid Usage

- VUID-VkPipelineIndirectDeviceAddressInfoNV-pipelineBindPoint-09079
  The provided `pipelineBindPoint` must be of type VK_PIPELINE_BIND_POINT_COMPUTE

- VUID-VkPipelineIndirectDeviceAddressInfoNV-pipeline-09080
  `pipeline` must have been created with flag VK_PIPELINE_CREATE_INDIRECT_BINDABLE_BIT_NV set

- VUID-VkPipelineIndirectDeviceAddressInfoNV-pipeline-09081
  `pipeline` must have been created with a VkComputePipelineIndirectBufferInfoNV structure specifying a valid address where its metadata will be saved

Valid Usage (Implicit)

- VUID-VkPipelineIndirectDeviceAddressInfoNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PIPELINE_INDIRECT_DEVICE_ADDRESS_INFO_NV

- VUID-VkPipelineIndirectDeviceAddressInfoNV-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkPipelineIndirectDeviceAddressInfoNV-pipelineBindPoint-parameter
  `pipelineBindPoint` must be a valid VkPipelineBindPoint value

- VUID-VkPipelineIndirectDeviceAddressInfoNV-pipeline-parameter
  `pipeline` must be a valid VkPipeline handle

To determine the memory requirements for a compute pipeline’s metadata, call:

    // Provided by VK_NV_device_generated_commands_compute
    void vkGetPipelineIndirectMemoryRequirementsNV(
        VkDevice                                    device,
        const VkComputePipelineCreateInfo*          pCreateInfo,
        VkMemoryRequirements2*                      pMemoryRequirements);

- `device` is the logical device that owns the buffer.

- `pCreateInfo` is a VkComputePipelineCreateInfo structure specifying the creation parameters of the compute pipeline whose memory requirements are being queried.

- `pMemoryRequirements` is a pointer to a VkMemoryRequirements2 structure in which the requested pipeline’s memory requirements are returned.

If `pCreateInfo->pNext` chain includes a pointer to a VkComputePipelineIndirectBufferInfoNV structure, then the contents of that structure are ignored.

Valid Usage

- VUID-vkGetPipelineIndirectMemoryRequirementsNV-deviceGeneratedComputePipelines-09082
  The `VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV`::`deviceGeneratedComputePipelines` feature must be enabled

- VUID-vkGetPipelineIndirectMemoryRequirementsNV-pCreateInfo-09083
  `pCreateInfo->flags` must include VK_PIPELINE_CREATE_INDIRECT_BINDABLE_BIT_NV

Valid Usage (Implicit)

- VUID-vkGetPipelineIndirectMemoryRequirementsNV-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetPipelineIndirectMemoryRequirementsNV-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkComputePipelineCreateInfo structure

- VUID-vkGetPipelineIndirectMemoryRequirementsNV-pMemoryRequirements-parameter
  `pMemoryRequirements` must be a valid pointer to a VkMemoryRequirements2 structure

#### 38.2.1. Indirect Execution Sets

Indirect Execution Sets contain sets of pipelines or shader objects which can be bound individually.

    // Provided by VK_EXT_device_generated_commands
    VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkIndirectExecutionSetEXT)

Indirect Execution Sets allow the device to bind different shaders and pipeline states using Device-Generated Commands.

Indirect Execution Sets are created by calling:

    // Provided by VK_EXT_device_generated_commands
    VkResult vkCreateIndirectExecutionSetEXT(
        VkDevice                                    device,
        const VkIndirectExecutionSetCreateInfoEXT*  pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkIndirectExecutionSetEXT*                  pIndirectExecutionSet);

- `device` is the logical device that creates the indirect execution set.

- `pCreateInfo` is a pointer to a VkIndirectExecutionSetCreateInfoEXT structure containing parameters affecting creation of the indirect execution set.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

- `pIndirectExecutionSet` is a pointer to a VkIndirectExecutionSetEXT handle in which the resulting indirect execution set is returned.

Valid Usage

- VUID-vkCreateIndirectExecutionSetEXT-deviceGeneratedCommands-11013
  The `VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT`::`deviceGeneratedCommands` feature must be enabled

Valid Usage (Implicit)

- VUID-vkCreateIndirectExecutionSetEXT-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkCreateIndirectExecutionSetEXT-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkIndirectExecutionSetCreateInfoEXT structure

- VUID-vkCreateIndirectExecutionSetEXT-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateIndirectExecutionSetEXT-pIndirectExecutionSet-parameter
  `pIndirectExecutionSet` must be a valid pointer to a VkIndirectExecutionSetEXT handle

- VUID-vkCreateIndirectExecutionSetEXT-device-queuecount
  The device must have been created with at least `1` queue

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkIndirectExecutionSetCreateInfoEXT` structure is defined as:

    // Provided by VK_EXT_device_generated_commands
    typedef struct VkIndirectExecutionSetCreateInfoEXT {
        VkStructureType                      sType;
        const void*                          pNext;
        VkIndirectExecutionSetInfoTypeEXT    type;
        VkIndirectExecutionSetInfoEXT        info;
    } VkIndirectExecutionSetCreateInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `type` is a VkIndirectExecutionSetInfoTypeEXT describing the type of set being created and determining which field of the `info` union will be used.

- `info` is a VkIndirectExecutionSetInfoEXT union containing layout information for the set.

Valid Usage

- VUID-VkIndirectExecutionSetCreateInfoEXT-maxIndirectShaderObjectCount-11014
  If `VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT`::`maxIndirectShaderObjectCount` is zero or the `shaderObject` feature is not enabled `type` must not be VK_INDIRECT_EXECUTION_SET_INFO_TYPE_SHADER_OBJECTS_EXT

Valid Usage (Implicit)

- VUID-VkIndirectExecutionSetCreateInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_INDIRECT_EXECUTION_SET_CREATE_INFO_EXT

- VUID-VkIndirectExecutionSetCreateInfoEXT-type-parameter
  `type` must be a valid VkIndirectExecutionSetInfoTypeEXT value

- VUID-VkIndirectExecutionSetCreateInfoEXT-pPipelineInfo-parameter
  If `type` is VK_INDIRECT_EXECUTION_SET_INFO_TYPE_PIPELINES_EXT, the `pPipelineInfo` member of `info` must be a valid pointer to a valid VkIndirectExecutionSetPipelineInfoEXT structure

- VUID-VkIndirectExecutionSetCreateInfoEXT-pShaderInfo-parameter
  If `type` is VK_INDIRECT_EXECUTION_SET_INFO_TYPE_SHADER_OBJECTS_EXT, the `pShaderInfo` member of `info` must be a valid pointer to a valid VkIndirectExecutionSetShaderInfoEXT structure

Values which can be set in VkIndirectExecutionSetCreateInfoEXT::`type`, specifying contents of an indirect execution set, are:

    // Provided by VK_EXT_device_generated_commands
    typedef enum VkIndirectExecutionSetInfoTypeEXT {
        VK_INDIRECT_EXECUTION_SET_INFO_TYPE_PIPELINES_EXT = 0,
        VK_INDIRECT_EXECUTION_SET_INFO_TYPE_SHADER_OBJECTS_EXT = 1,
    } VkIndirectExecutionSetInfoTypeEXT;

- VK_INDIRECT_EXECUTION_SET_INFO_TYPE_PIPELINES_EXT specifies that the indirect execution set contains VkPipeline objects.

- VK_INDIRECT_EXECUTION_SET_INFO_TYPE_SHADER_OBJECTS_EXT specifies that the indirect execution set contains VkShaderEXT objects.

The `VkIndirectExecutionSetInfoEXT` union is defined as:

    // Provided by VK_EXT_device_generated_commands
    typedef union VkIndirectExecutionSetInfoEXT {
        const VkIndirectExecutionSetPipelineInfoEXT*    pPipelineInfo;
        const VkIndirectExecutionSetShaderInfoEXT*      pShaderInfo;
    } VkIndirectExecutionSetInfoEXT;

- `pPipelineInfo` is a pointer to a VkIndirectExecutionSetPipelineInfoEXT structure containing pipeline layout information for the set.

- `pShaderInfo` is a pointer to a VkIndirectExecutionSetShaderInfoEXT structure containing shader object layout information for the set.

The `VkIndirectExecutionSetPipelineInfoEXT` structure is defined as:

    // Provided by VK_EXT_device_generated_commands
    typedef struct VkIndirectExecutionSetPipelineInfoEXT {
        VkStructureType    sType;
        const void*        pNext;
        VkPipeline         initialPipeline;
        uint32_t           maxPipelineCount;
    } VkIndirectExecutionSetPipelineInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `initialPipeline` is the initial pipeline for the set. This pipeline will be automatically added to the set at index `0`.

- `maxPipelineCount` is the maximum number of pipelines stored in the set.

The characteristics of `initialPipeline` will be used to validate all pipelines added to the set even if they are removed from the set or destroyed.

When an Indirect Execution Set created with pipelines is used, `initialPipeline` constitutes the initial shader state.

Valid Usage

- VUID-VkIndirectExecutionSetPipelineInfoEXT-supportedIndirectCommandsShaderStagesPipelineBinding-11015
  If VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT::`supportedIndirectCommandsShaderStagesPipelineBinding` does not contain VK_SHADER_STAGE_COMPUTE_BIT, the VkPipelineBindPoint of `initialPipeline` must not be VK_PIPELINE_BIND_POINT_COMPUTE

- VUID-VkIndirectExecutionSetPipelineInfoEXT-supportedIndirectCommandsShaderStagesPipelineBinding-11016
  If VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT::`supportedIndirectCommandsShaderStagesPipelineBinding` does not contain VK_SHADER_STAGE_FRAGMENT_BIT, the VkPipelineBindPoint of `initialPipeline` must not be VK_PIPELINE_BIND_POINT_GRAPHICS

- VUID-VkIndirectExecutionSetPipelineInfoEXT-supportedIndirectCommandsShaderStagesPipelineBinding-11017
  If VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT::`supportedIndirectCommandsShaderStagesPipelineBinding` does not contain ray tracing stages, the VkPipelineBindPoint of `initialPipeline` must not be VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR

- VUID-VkIndirectExecutionSetPipelineInfoEXT-maxPipelineCount-11018
  `maxPipelineCount` must be between `1` and `VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT`::`maxIndirectPipelineCount`

- VUID-VkIndirectExecutionSetPipelineInfoEXT-initialPipeline-11019
  `initialPipeline` must not use descriptors of type VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC or VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC

- VUID-VkIndirectExecutionSetPipelineInfoEXT-initialPipeline-11153
  `initialPipeline` must have been created with VK_PIPELINE_CREATE_2_INDIRECT_BINDABLE_BIT_EXT

Valid Usage (Implicit)

- VUID-VkIndirectExecutionSetPipelineInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_INDIRECT_EXECUTION_SET_PIPELINE_INFO_EXT

- VUID-VkIndirectExecutionSetPipelineInfoEXT-initialPipeline-parameter
  `initialPipeline` must be a valid VkPipeline handle

The `VkIndirectExecutionSetShaderInfoEXT` structure is defined as:

    // Provided by VK_EXT_device_generated_commands
    typedef struct VkIndirectExecutionSetShaderInfoEXT {
        VkStructureType                                     sType;
        const void*                                         pNext;
        uint32_t                                            shaderCount;
        const VkShaderEXT*                                  pInitialShaders;
        const VkIndirectExecutionSetShaderLayoutInfoEXT*    pSetLayoutInfos;
        uint32_t                                            maxShaderCount;
        uint32_t                                            pushConstantRangeCount;
        const VkPushConstantRange*                          pPushConstantRanges;
    } VkIndirectExecutionSetShaderInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `shaderCount` is the number of members in the `pInitialShaders` and `pSetLayoutInfos` arrays.

- `pInitialShaders` is a pointer to an array containing a VkShaderEXT object for each shader stage that will be used in the set. These shaders will be automatically added to the set beginning at index `0`.

- `pSetLayoutInfos` is NULL or a pointer to an array containing a VkIndirectExecutionSetShaderLayoutInfoEXT used by each corresponding `pInitialShaders` shader stage in the set.

- `maxShaderCount` is the maximum number of shader objects stored in the set.

- `pushConstantRangeCount` is the number of members in the `pPushConstantRanges` array.

- `pPushConstantRanges` is a pointer to the array of VkPushConstantRange ranges used by all shaders in the set.

The characteristics of `pInitialShaders` will be used to validate all shaders added to the set even if they are removed from the set or destroyed.

When an Indirect Execution Set created with shader objects is used, `pInitialShaders` constitutes the initial shader state.

If `pSetLayoutInfos` is `NULL`, the descriptor layout parameters are inherited from the shader object.

Valid Usage

- VUID-VkIndirectExecutionSetShaderInfoEXT-pInitialShaders-11020
  All members of `pInitialShaders` must have a `stage` supported by VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT::`supportedIndirectCommandsShaderStagesShaderBinding`

- VUID-VkIndirectExecutionSetShaderInfoEXT-maxShaderCount-11021
  `maxShaderCount` must not be zero

- VUID-VkIndirectExecutionSetShaderInfoEXT-maxShaderCount-11022
  `maxShaderCount` must be less than or equal to `VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT`::`maxIndirectShaderObjectCount`

- VUID-VkIndirectExecutionSetShaderInfoEXT-maxShaderCount-11036
  `maxShaderCount` must be greater than or equal to `shaderCount`

- VUID-VkIndirectExecutionSetShaderInfoEXT-stage-11023
  The `stage` of each element in the `pInitialShaders` array must be unique

- VUID-VkIndirectExecutionSetShaderInfoEXT-pInitialShaders-11154
  Each member of `pInitialShaders` must have been created with VK_SHADER_CREATE_INDIRECT_BINDABLE_BIT_EXT

- VUID-VkIndirectExecutionSetShaderInfoEXT-pSetLayoutInfos-10929
  If `pSetLayoutInfos` is not `NULL`, the descriptor layout values specified must be compatible with the descriptor set layouts defined at the creation of the shader object

- VUID-VkIndirectExecutionSetShaderInfoEXT-pInitialShaders-11321
  If any element of `pInitialShaders` was created with VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT, all elements of `pInitialShaders` must have been created with VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT

- VUID-VkIndirectExecutionSetShaderInfoEXT-pInitialShaders-11322
  If any element of `pInitialShaders` was created without VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT, all elements of `pInitialShaders` must have been created without VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT

- VUID-VkIndirectExecutionSetShaderInfoEXT-pInitialShaders-11323
  If elements of `pInitialShaders` were created with VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT, `pSetLayoutInfos` must be `NULL`

Valid Usage (Implicit)

- VUID-VkIndirectExecutionSetShaderInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_INDIRECT_EXECUTION_SET_SHADER_INFO_EXT

- VUID-VkIndirectExecutionSetShaderInfoEXT-pInitialShaders-parameter
  `pInitialShaders` must be a valid pointer to an array of `shaderCount` valid VkShaderEXT handles

- VUID-VkIndirectExecutionSetShaderInfoEXT-pSetLayoutInfos-parameter
  If `pSetLayoutInfos` is not `NULL`, `pSetLayoutInfos` must be a valid pointer to an array of `shaderCount` valid VkIndirectExecutionSetShaderLayoutInfoEXT structures

- VUID-VkIndirectExecutionSetShaderInfoEXT-pPushConstantRanges-parameter
  If `pushConstantRangeCount` is not `0`, `pPushConstantRanges` must be a valid pointer to an array of `pushConstantRangeCount` valid VkPushConstantRange structures

- VUID-VkIndirectExecutionSetShaderInfoEXT-shaderCount-arraylength
  `shaderCount` must be greater than `0`

The `VkIndirectExecutionSetShaderLayoutInfoEXT` structure is defined as:

    // Provided by VK_EXT_device_generated_commands
    typedef struct VkIndirectExecutionSetShaderLayoutInfoEXT {
        VkStructureType                 sType;
        const void*                     pNext;
        uint32_t                        setLayoutCount;
        const VkDescriptorSetLayout*    pSetLayouts;
    } VkIndirectExecutionSetShaderLayoutInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `setLayoutCount` is the number of members in the `pSetLayouts` array

- `pSetLayouts` is a pointer to an array containing VkDescriptorSetLayout objects used by the shader stage. The implementation must not access these objects outside of the duration of the command this structure is passed to.

Valid Usage

- VUID-VkIndirectExecutionSetShaderLayoutInfoEXT-pSetLayouts-11024
  All members of `pSetLayouts` must not contain descriptors of type VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC or VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC

Valid Usage (Implicit)

- VUID-VkIndirectExecutionSetShaderLayoutInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_INDIRECT_EXECUTION_SET_SHADER_LAYOUT_INFO_EXT

- VUID-VkIndirectExecutionSetShaderLayoutInfoEXT-pSetLayouts-parameter
  If `setLayoutCount` is not `0`, `pSetLayouts` must be a valid pointer to an array of `setLayoutCount` valid or VK_NULL_HANDLE VkDescriptorSetLayout handles

Destroy an Indirect Execution Set by calling:

    // Provided by VK_EXT_device_generated_commands
    void vkDestroyIndirectExecutionSetEXT(
        VkDevice                                    device,
        VkIndirectExecutionSetEXT                   indirectExecutionSet,
        const VkAllocationCallbacks*                pAllocator);

- `device` is the logical device that owns the indirect execution set.

- `indirectExecutionSet` is the indirect execution set to destroy.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

Valid Usage

- VUID-vkDestroyIndirectExecutionSetEXT-indirectExecutionSet-11025
  All submitted commands that refer to `indirectExecutionSet` must have completed execution

Valid Usage (Implicit)

- VUID-vkDestroyIndirectExecutionSetEXT-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkDestroyIndirectExecutionSetEXT-indirectExecutionSet-parameter
  If `indirectExecutionSet` is not VK_NULL_HANDLE, `indirectExecutionSet` must be a valid VkIndirectExecutionSetEXT handle

- VUID-vkDestroyIndirectExecutionSetEXT-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkDestroyIndirectExecutionSetEXT-indirectExecutionSet-parent
  If `indirectExecutionSet` is a valid handle, it must have been created, allocated, or retrieved from `device`

Host Synchronization

- Host access to `indirectExecutionSet` must be externally synchronized

The `VkWriteIndirectExecutionSetPipelineEXT` structure is defined as:

    // Provided by VK_EXT_device_generated_commands
    typedef struct VkWriteIndirectExecutionSetPipelineEXT {
        VkStructureType    sType;
        const void*        pNext;
        uint32_t           index;
        VkPipeline         pipeline;
    } VkWriteIndirectExecutionSetPipelineEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `index` is the element of the set to update

- `pipeline` is the pipeline to store in the indirect execution set

Valid Usage

- VUID-VkWriteIndirectExecutionSetPipelineEXT-index-11026
  `index` must be less than the value of `VkIndirectExecutionSetPipelineInfoEXT`::`maxPipelineCount` used to create the set

- VUID-VkWriteIndirectExecutionSetPipelineEXT-pipeline-11027
  `pipeline` must have been created with VK_PIPELINE_CREATE_2_INDIRECT_BINDABLE_BIT_EXT

- VUID-VkWriteIndirectExecutionSetPipelineEXT-index-11029
  `index` must not be referenced by submitted command buffers

- VUID-VkWriteIndirectExecutionSetPipelineEXT-pipeline-11030
  The shader stages contained in `pipeline` must be supported by VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT::`supportedIndirectCommandsShaderStagesPipelineBinding`

Valid Usage (Implicit)

- VUID-VkWriteIndirectExecutionSetPipelineEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_WRITE_INDIRECT_EXECUTION_SET_PIPELINE_EXT

- VUID-VkWriteIndirectExecutionSetPipelineEXT-pipeline-parameter
  `pipeline` must be a valid VkPipeline handle

The `VkWriteIndirectExecutionSetShaderEXT` structure is defined as:

    // Provided by VK_EXT_device_generated_commands with VK_EXT_shader_object
    typedef struct VkWriteIndirectExecutionSetShaderEXT {
        VkStructureType    sType;
        const void*        pNext;
        uint32_t           index;
        VkShaderEXT        shader;
    } VkWriteIndirectExecutionSetShaderEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `index` is the element of the set to update

- `shader` is the shader to store in the indirect execution set

Shaders need not be stored in the Indirect Execution Set according to their stage. The only restriction for shader indices within a set is that the value of the index must be less than the maximum number of shaders in the set.

Valid Usage

- VUID-VkWriteIndirectExecutionSetShaderEXT-index-11031
  `index` must be less than `VkIndirectExecutionSetShaderInfoEXT`::`maxShaderCount`

- VUID-VkWriteIndirectExecutionSetShaderEXT-shader-11032
  `shader` must have been created with VK_SHADER_CREATE_INDIRECT_BINDABLE_BIT_EXT

- VUID-VkWriteIndirectExecutionSetShaderEXT-pInitialShaders-11033
  A shader created with the same VkShaderStageFlagBits must have been passed in the `VkIndirectExecutionSetShaderInfoEXT`::`pInitialShaders` array

- VUID-VkWriteIndirectExecutionSetShaderEXT-index-11034
  `index` must not be in use by submitted command buffers

Valid Usage (Implicit)

- VUID-VkWriteIndirectExecutionSetShaderEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_WRITE_INDIRECT_EXECUTION_SET_SHADER_EXT

- VUID-VkWriteIndirectExecutionSetShaderEXT-shader-parameter
  `shader` must be a valid VkShaderEXT handle

Pipeline elements in an Indirect Execution Set can be updated by calling:

    // Provided by VK_EXT_device_generated_commands
    void vkUpdateIndirectExecutionSetPipelineEXT(
        VkDevice                                    device,
        VkIndirectExecutionSetEXT                   indirectExecutionSet,
        uint32_t                                    executionSetWriteCount,
        const VkWriteIndirectExecutionSetPipelineEXT* pExecutionSetWrites);

- `device` is the logical device that owns the indirect execution set.

- `indirectExecutionSet` is the indirect execution set being updated.

- `executionSetWriteCount` is the number of elements in the `pExecutionSetWrites` array.

- `pExecutionSetWrites` is a pointer to an array of VkWriteIndirectExecutionSetPipelineEXT structures describing the elements to update.

Valid Usage

- VUID-vkUpdateIndirectExecutionSetPipelineEXT-indirectExecutionSet-11035
  `indirectExecutionSet` must have been created with type VK_INDIRECT_EXECUTION_SET_INFO_TYPE_PIPELINES_EXT

- VUID-vkUpdateIndirectExecutionSetPipelineEXT-executionSetWriteCount-11037
  `executionSetWriteCount` must be less than or equal to `VkIndirectExecutionSetPipelineInfoEXT`::`maxPipelineCount`

- VUID-vkUpdateIndirectExecutionSetPipelineEXT-pExecutionSetWrites-11042
  Each element in the `pExecutionSetWrites` array must have a unique `VkWriteIndirectExecutionSetPipelineEXT`::`index`

- VUID-vkUpdateIndirectExecutionSetPipelineEXT-None-11038
  Each member of the Indirect Execution Set referenced by the update command must not be in use by the device

- VUID-vkUpdateIndirectExecutionSetPipelineEXT-initialPipeline-11324
  If `initialPipeline` was created without VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT, each pipeline in `pExecutionSetWrites` must also have been created without VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT

- VUID-vkUpdateIndirectExecutionSetPipelineEXT-initialPipeline-11325
  If `initialPipeline` was created with VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT, each pipeline in `pExecutionSetWrites` must also have been created with VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT

- VUID-vkUpdateIndirectExecutionSetPipelineEXT-None-11039
  If `initialPipeline` was created without VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT, the layout of each pipeline in `pExecutionSetWrites` must be compatible with the `initialPipeline` used to create the Indirect Execution Set

- VUID-vkUpdateIndirectExecutionSetPipelineEXT-None-11040
  Each pipeline in the Indirect Execution Set must have identically defined static and dynamic state values to the `initialPipeline` used to create the Indirect Execution Set

- VUID-vkUpdateIndirectExecutionSetPipelineEXT-initialPipeline-11147
  Each pipeline in the Indirect Execution Set must have identically defined fragment outputs interface to the `initialPipeline` used to create the Indirect Execution Set

- VUID-vkUpdateIndirectExecutionSetPipelineEXT-initialPipeline-11152
  Each pipeline in the Indirect Execution Set must match the `initialPipeline` used to create the Indirect Execution Set in its included shader stages

- VUID-vkUpdateIndirectExecutionSetPipelineEXT-initialPipeline-11098
  Each pipeline in the Indirect Execution Set must match the `initialPipeline` used to create the Indirect Execution Set in its use of `FragDepth`

- VUID-vkUpdateIndirectExecutionSetPipelineEXT-initialPipeline-11086
  Each pipeline in the Indirect Execution Set must match the `initialPipeline` used to create the Indirect Execution Set in its use of `SampleMask`

- VUID-vkUpdateIndirectExecutionSetPipelineEXT-initialPipeline-11085
  Each pipeline in the Indirect Execution Set must match the `initialPipeline` used to create the Indirect Execution Set in its use of `StencilExportEXT`

Valid Usage (Implicit)

- VUID-vkUpdateIndirectExecutionSetPipelineEXT-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkUpdateIndirectExecutionSetPipelineEXT-indirectExecutionSet-parameter
  `indirectExecutionSet` must be a valid VkIndirectExecutionSetEXT handle

- VUID-vkUpdateIndirectExecutionSetPipelineEXT-pExecutionSetWrites-parameter
  `pExecutionSetWrites` must be a valid pointer to an array of `executionSetWriteCount` valid VkWriteIndirectExecutionSetPipelineEXT structures

- VUID-vkUpdateIndirectExecutionSetPipelineEXT-executionSetWriteCount-arraylength
  `executionSetWriteCount` must be greater than `0`

- VUID-vkUpdateIndirectExecutionSetPipelineEXT-indirectExecutionSet-parent
  `indirectExecutionSet` must have been created, allocated, or retrieved from `device`

Host Synchronization

- Host access to `indirectExecutionSet` must be externally synchronized

Shader object elements in an Indirect Execution Set can be updated by calling:

    // Provided by VK_EXT_device_generated_commands
    void vkUpdateIndirectExecutionSetShaderEXT(
        VkDevice                                    device,
        VkIndirectExecutionSetEXT                   indirectExecutionSet,
        uint32_t                                    executionSetWriteCount,
        const VkWriteIndirectExecutionSetShaderEXT* pExecutionSetWrites);

- `device` is the logical device that owns the indirect execution set.

- `indirectExecutionSet` is the indirect execution set being updated.

- `executionSetWriteCount` is the number of elements in the `pExecutionSetWrites` array.

- `pExecutionSetWrites` is a pointer to an array of VkWriteIndirectExecutionSetShaderEXT structures describing the elements to update.

Valid Usage

- VUID-vkUpdateIndirectExecutionSetShaderEXT-indirectExecutionSet-11041
  `indirectExecutionSet` must have been created with type VK_INDIRECT_EXECUTION_SET_INFO_TYPE_SHADER_OBJECTS_EXT

- VUID-vkUpdateIndirectExecutionSetShaderEXT-pExecutionSetWrites-11043
  Each element in the `pExecutionSetWrites` array must have a unique `VkWriteIndirectExecutionSetShaderEXT`::`index`

- VUID-vkUpdateIndirectExecutionSetShaderEXT-None-11044
  Each member of the Indirect Execution Set referenced by the update command must not be in use by the device

- VUID-vkUpdateIndirectExecutionSetShaderEXT-pInitialShaders-11326
  If the shaders in `pInitialShaders` were created without VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT, each shader in `pExecutionSetWrites` must also have been created without VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT

- VUID-vkUpdateIndirectExecutionSetShaderEXT-pInitialShaders-11327
  If the shaders in `pInitialShaders` were created with VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT, each pipeline in `pExecutionSetWrites` must also have been created with VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT

- VUID-vkUpdateIndirectExecutionSetShaderEXT-pExecutionSetWrites-11140
  If the shaders in `pInitialShaders` were created without VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT, the descriptor layout of each shader in `pExecutionSetWrites` must be compatible with the initial layout info used to create the Indirect Execution Set

- VUID-vkUpdateIndirectExecutionSetShaderEXT-None-11148
  Each fragment shader element in the Indirect Execution Set must have identically defined fragment outputs interface to the initial shader state used to create the Indirect Execution Set

- VUID-vkUpdateIndirectExecutionSetShaderEXT-FragDepth-11054
  Each fragment shader element in the Indirect Execution Set must match the initial shader state used to create the Indirect Execution Set in its use of `FragDepth`

- VUID-vkUpdateIndirectExecutionSetShaderEXT-SampleMask-11050
  Each fragment shader element in the Indirect Execution Set must match the initial shader state used to create the Indirect Execution Set in its use of `SampleMask`

- VUID-vkUpdateIndirectExecutionSetShaderEXT-StencilExportEXT-11003
  Each fragment shader element in the Indirect Execution Set must match the initial shader state used to create the Indirect Execution Set in its use of `StencilExportEXT`

Valid Usage (Implicit)

- VUID-vkUpdateIndirectExecutionSetShaderEXT-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkUpdateIndirectExecutionSetShaderEXT-indirectExecutionSet-parameter
  `indirectExecutionSet` must be a valid VkIndirectExecutionSetEXT handle

- VUID-vkUpdateIndirectExecutionSetShaderEXT-pExecutionSetWrites-parameter
  `pExecutionSetWrites` must be a valid pointer to an array of `executionSetWriteCount` valid VkWriteIndirectExecutionSetShaderEXT structures

- VUID-vkUpdateIndirectExecutionSetShaderEXT-executionSetWriteCount-arraylength
  `executionSetWriteCount` must be greater than `0`

- VUID-vkUpdateIndirectExecutionSetShaderEXT-indirectExecutionSet-parent
  `indirectExecutionSet` must have been created, allocated, or retrieved from `device`

Host Synchronization

- Host access to `indirectExecutionSet` must be externally synchronized

It is legal to update an Indirect Execution Set that is in flight as long as the element indices in `pExecutionSetWrites` are not in use. Any change to an indirect execution set requires recalculating memory requirements by calling vkGetGeneratedCommandsMemoryRequirementsEXT for commands that use that modified state. Commands that are in flight or those not using updated elements require no changes.

The lifetimes of pipelines and shader objects contained in a set must match or exceed the lifetime of the set.

With `VK_NV_device_generated_commands`, the actual generation of commands as well as their execution on the device is handled as single action with:

    // Provided by VK_NV_device_generated_commands
    void vkCmdExecuteGeneratedCommandsNV(
        VkCommandBuffer                             commandBuffer,
        VkBool32                                    isPreprocessed,
        const VkGeneratedCommandsInfoNV*            pGeneratedCommandsInfo);

- `commandBuffer` is the command buffer into which the command is recorded.

- `isPreprocessed` represents whether the input data has already been preprocessed on the device. If it is VK_FALSE this command will implicitly trigger the preprocessing step, otherwise not.

- `pGeneratedCommandsInfo` is a pointer to a VkGeneratedCommandsInfoNV structure containing parameters affecting the generation of commands.

If the VK_INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NV flag was used to create the VkGeneratedCommandsInfoNV::`indirectCommandsLayout` then the order of execution of individual draws through this command may execute in any order, and may not necessarily be in the same order as specified in VkGeneratedCommandsInfoNV::`pStreams`.

The order of execution of individual dispatches through this command may execute in any order and may not necessarily be in the same order as specified in VkGeneratedCommandsInfoNV::`pStreams`.

Valid Usage

- VUID-vkCmdExecuteGeneratedCommandsNV-magFilter-04553
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdExecuteGeneratedCommandsNV-magFilter-09598
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdExecuteGeneratedCommandsNV-mipmapMode-04770
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdExecuteGeneratedCommandsNV-mipmapMode-09599
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdExecuteGeneratedCommandsNV-unnormalizedCoordinates-09635
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `levelCount` and `layerCount` must be 1

- VUID-vkCmdExecuteGeneratedCommandsNV-None-08609
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `viewType` must be VK_IMAGE_VIEW_TYPE_1D or VK_IMAGE_VIEW_TYPE_2D

- VUID-vkCmdExecuteGeneratedCommandsNV-None-08610
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions with `ImplicitLod`, `Dref` or `Proj` in their name

- VUID-vkCmdExecuteGeneratedCommandsNV-None-08611
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions that includes a LOD bias or any offset values

- VUID-vkCmdExecuteGeneratedCommandsNV-None-06479
  If a VkImageView is sampled with depth comparison, the image view’s format features must contain VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT

- VUID-vkCmdExecuteGeneratedCommandsNV-None-02691
  If a VkImageView is accessed using atomic operations as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT

- VUID-vkCmdExecuteGeneratedCommandsNV-None-07888
  If a VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER descriptor is accessed using atomic operations as a result of this command, then the storage texel buffer’s format features must contain VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT

- VUID-vkCmdExecuteGeneratedCommandsNV-None-02692
  If a VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT

- VUID-vkCmdExecuteGeneratedCommandsNV-None-02693
  If the VK_EXT_filter_cubic extension is not enabled and any VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, it must not have a VkImageViewType of VK_IMAGE_VIEW_TYPE_3D, VK_IMAGE_VIEW_TYPE_CUBE, or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY

- VUID-vkCmdExecuteGeneratedCommandsNV-filterCubic-02694
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have a VkImageViewType and format that supports cubic filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubic` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdExecuteGeneratedCommandsNV-filterCubicMinmax-02695
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX as a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubicMinmax` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdExecuteGeneratedCommandsNV-cubicRangeClamp-09212
  If the `cubicRangeClamp` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must not have a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM

- VUID-vkCmdExecuteGeneratedCommandsNV-reductionMode-09213
  Any VkImageView being sampled with a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM as a result of this command must sample with VK_FILTER_CUBIC_EXT

- VUID-vkCmdExecuteGeneratedCommandsNV-selectableCubicWeights-09214
  If the `selectableCubicWeights` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have VkSamplerCubicWeightsCreateInfoQCOM::`cubicWeights` equal to VK_CUBIC_FILTER_WEIGHTS_CATMULL_ROM_QCOM

- VUID-vkCmdExecuteGeneratedCommandsNV-flags-02696
  Any VkImage created with a VkImageCreateInfo::`flags` containing VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV sampled as a result of this command must only be sampled using a VkSamplerAddressMode of VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdExecuteGeneratedCommandsNV-OpTypeImage-07027
  For any VkImageView being written as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdExecuteGeneratedCommandsNV-OpTypeImage-07028
  For any VkImageView being read as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdExecuteGeneratedCommandsNV-OpTypeImage-07029
  For any VkBufferView being written as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown`, the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdExecuteGeneratedCommandsNV-OpTypeImage-07030
  Any VkBufferView being read as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown` then the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdExecuteGeneratedCommandsNV-None-08600
  If a a bound shader was created with a pipeline layout and statically uses a set n, a descriptor set must have been bound to n at the same pipeline bind point, with layouts compatible for set n with the layout(s) used to create the shader, as described in Pipeline Layout Compatibility

- VUID-vkCmdExecuteGeneratedCommandsNV-None-08601
  If a a bound shader was created with a pipeline layout or specified push constant ranges and statically uses a push constant value, that value must have been set for the same pipeline bind point, with push constant ranges that are compatible with the push constant range used to create the shader

- VUID-vkCmdExecuteGeneratedCommandsNV-None-10068
  For each array of resources that is used by a bound shader, the indices used to access members of the array must be less than the descriptor count for the identified binding in the descriptor sets used by this command

- VUID-vkCmdExecuteGeneratedCommandsNV-None-08114
  Descriptors in each bound descriptor set, specified via vkCmdBindDescriptorSets, must be valid if they are accessed as described by descriptor validity by the VkPipeline bound to the pipeline bind point used by this command and the bound VkPipeline was not created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdExecuteGeneratedCommandsNV-imageLayout-00344
  If an image descriptor is accessed by a shader, the VkImageLayout must match the subresource accessible from the VkImageView as defined by the image layout matching rules

- VUID-vkCmdExecuteGeneratedCommandsNV-None-08115
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdBindDescriptorSets, the bound VkPipeline must have been created without VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdExecuteGeneratedCommandsNV-None-08116
  Descriptors in bound descriptor buffers, specified via vkCmdSetDescriptorBufferOffsetsEXT, must be valid if they are dynamically accessed

- VUID-vkCmdExecuteGeneratedCommandsNV-None-08117
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdSetDescriptorBufferOffsetsEXT, the bound VkPipeline must have been created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdExecuteGeneratedCommandsNV-None-08119
  If a descriptor is dynamically used with a VkPipeline created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdExecuteGeneratedCommandsNV-None-08605
  If a descriptor is dynamically used with a VkShaderEXT created with a `VkDescriptorSetLayout` that was created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdExecuteGeneratedCommandsNV-None-08606
  If the `shaderObject` feature is not enabled, a valid pipeline must be bound to the pipeline bind point used by this command

- VUID-vkCmdExecuteGeneratedCommandsNV-None-08608
  If a pipeline is bound to the pipeline bind point used by this command, there must not have been any calls to dynamic state setting commands for any state specified statically in the VkPipeline object bound to the pipeline bind point used by this command, since that pipeline was bound

- VUID-vkCmdExecuteGeneratedCommandsNV-uniformBuffers-06935
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdExecuteGeneratedCommandsNV-None-08612
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdExecuteGeneratedCommandsNV-storageBuffers-06936
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdExecuteGeneratedCommandsNV-None-08613
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a storage buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdExecuteGeneratedCommandsNV-commandBuffer-02707
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, any resource accessed by bound shaders must not be a protected resource

- VUID-vkCmdExecuteGeneratedCommandsNV-viewType-07752
  If a VkImageView is accessed as a result of this command, then the image view’s `viewType` must match the `Dim` operand of the `OpTypeImage` as described in Compatibility Between SPIR-V Image Dimensions and Vulkan ImageView Types

- VUID-vkCmdExecuteGeneratedCommandsNV-format-07753
  If a VkImageView or VkBufferView is accessed as a result of this command, then the numeric type of the view’s `format` and the `Sampled` `Type` operand of the `OpTypeImage` must match

- VUID-vkCmdExecuteGeneratedCommandsNV-OpImageWrite-08795
  If a VkImageView created with a format other than VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the image view’s format

- VUID-vkCmdExecuteGeneratedCommandsNV-OpImageWrite-08796
  If a VkImageView created with the format VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have four components

- VUID-vkCmdExecuteGeneratedCommandsNV-OpImageWrite-04469
  If a VkBufferView is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the buffer view’s format

- VUID-vkCmdExecuteGeneratedCommandsNV-SampledType-04470
  If a VkImageView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdExecuteGeneratedCommandsNV-SampledType-04471
  If a VkImageView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdExecuteGeneratedCommandsNV-SampledType-04472
  If a VkBufferView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdExecuteGeneratedCommandsNV-SampledType-04473
  If a VkBufferView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdExecuteGeneratedCommandsNV-sparseImageInt64Atomics-04474
  If the `sparseImageInt64Atomics` feature is not enabled, VkImage objects created with the VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdExecuteGeneratedCommandsNV-sparseImageInt64Atomics-04475
  If the `sparseImageInt64Atomics` feature is not enabled, VkBuffer objects created with the VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdExecuteGeneratedCommandsNV-OpImageSampleWeightedQCOM-06971
  If `OpImageSampleWeightedQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_SAMPLED_IMAGE_BIT_QCOM

- VUID-vkCmdExecuteGeneratedCommandsNV-OpImageSampleWeightedQCOM-06972
  If `OpImageSampleWeightedQCOM` uses a VkImageView as a sample weight image as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_IMAGE_BIT_QCOM

- VUID-vkCmdExecuteGeneratedCommandsNV-OpImageBoxFilterQCOM-06973
  If `OpImageBoxFilterQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BOX_FILTER_SAMPLED_BIT_QCOM

- VUID-vkCmdExecuteGeneratedCommandsNV-OpImageBlockMatchSSDQCOM-06974
  If `OpImageBlockMatchSSDQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdExecuteGeneratedCommandsNV-OpImageBlockMatchSADQCOM-12420
  If `OpImageBlockMatchSADQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdExecuteGeneratedCommandsNV-OpImageBlockMatchSADQCOM-06976
  If `OpImageBlockMatchSADQCOM` or OpImageBlockMatchSSDQCOM is used to read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdExecuteGeneratedCommandsNV-OpImageSampleWeightedQCOM-06977
  If `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdExecuteGeneratedCommandsNV-OpImageSampleWeightedQCOM-06978
  If any command other than `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must not have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdExecuteGeneratedCommandsNV-OpImageBlockMatchWindow-09215
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM

- VUID-vkCmdExecuteGeneratedCommandsNV-OpImageBlockMatchWindow-09216
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format must be a single-component format

- VUID-vkCmdExecuteGeneratedCommandsNV-OpImageBlockMatchWindow-09217
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdExecuteGeneratedCommandsNV-OpImageBlockMatchWindow-12421
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the `blockMatchExtendedClampToEdge` feature is not enabled, the input sampler must not have been created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdExecuteGeneratedCommandsNV-addressModeU-12422
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the input sampler was created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, then the sampler must have been created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdExecuteGeneratedCommandsNV-None-07288
  Any shader invocation executed by this command must terminate

- VUID-vkCmdExecuteGeneratedCommandsNV-None-09600
  If a descriptor with type equal to any of VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, or VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT is accessed as a result of this command, all image subresources identified by that descriptor must be in the image layout identified when the descriptor was written

- VUID-vkCmdExecuteGeneratedCommandsNV-micromap-11636
  If an acceleration structure is accessed as a result of this command through an `OpRayQueryProceedKHR` operation , the `VK_EXT_opacity_micromap` extension is not enabled, and the acceleration structure is built using geometry with a VkAccelerationStructureTrianglesOpacityMicromapKHR structure included in its `pNext` chain, the shader must have specified a `OpacityMicromapIdKHR` execution mode with its specialization constant operand equal to VK_TRUE

- VUID-vkCmdExecuteGeneratedCommandsNV-micromap-11637
  If an acceleration structure is accessed as a result of this command and the acceleration structure was constructed through deserialization, all micromap arrays referenced by the acceleration structure that were not replaced by an acceleration structure update command must have been deserialized using the serialized data of the corresponding micromaps used to originally build the acceleration structure prior to the execution of this command on the device

- VUID-vkCmdExecuteGeneratedCommandsNV-micromap-11638
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkPipeline bound to the pipeline bind point used by this command must not have been created with `flags` that includes VK_PIPELINE_CREATE_2_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_KHR

- VUID-vkCmdExecuteGeneratedCommandsNV-micromap-11639
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkShaderEXT that accessed the descriptor must not have been created with `flags` that includes VK_SHADER_CREATE_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_EXT

- VUID-vkCmdExecuteGeneratedCommandsNV-commandBuffer-10746
  The `VkDeviceMemory` object allocated from a `VkMemoryHeap` with the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property that is bound to a resource accessed as a result of this command must be the active bound tile memory object in `commandBuffer`

- VUID-vkCmdExecuteGeneratedCommandsNV-None-10678
  If this command is recorded inside a tile shading render pass instance, the stages corresponding to the pipeline bind point used by this command must only include VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_FRAGMENT_BIT, and/or VK_SHADER_STAGE_COMPUTE_BIT

- VUID-vkCmdExecuteGeneratedCommandsNV-None-10679
  If this command is recorded where per-tile execution model is enabled, there must be no access to any image while the image was be transitioned to the VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT layout

- VUID-vkCmdExecuteGeneratedCommandsNV-pDescription-09900
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the underlying VkTensorARM object must have been created with the VK_TENSOR_USAGE_SHADER_BIT_ARM usage flag set

- VUID-vkCmdExecuteGeneratedCommandsNV-dimensionCount-09905
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the `Rank` of the `OpTypeTensorARM` of the tensor resource variable must be equal to the `dimensionCount` provided via VkTensorCreateInfoARM::`pDescription` when creating the underlying VkTensorARM object

- VUID-vkCmdExecuteGeneratedCommandsNV-OpTypeTensorARM-09906
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the element type of the `OpTypeTensorARM` of the tensor resource variable must be compatible with the VkFormat of the VkTensorViewARM used for the access

- VUID-vkCmdExecuteGeneratedCommandsNV-OpTensorReadARM-12462
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, using `OpTensorReadARM` or `OpTensorWriteARM`, and the underlying VkTensorARM object was created with a VK_TENSOR_TILING_BRICK_16_WIDE_ARM, VK_TENSOR_TILING_BRICK_8_WIDE_ARM, VK_TENSOR_TILING_BRICK_4_WIDE_ARM, VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_ARM, or VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_64K_ARM VkTensorTilingARM, and the object read or written is an array, then the innermost coordinate provided to `OpTensorReadARM` or `OpTensorWriteARM` via the `Coordinates` operand must be a multiple of the largest power of 2 that is less than or equal to the number of components of the array

- VUID-vkCmdExecuteGeneratedCommandsNV-pNext-12463
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command and the corresponding VkTensorARM object was created with a VkTensorRollingBackingCreateInfoARM structure in the `pNext` chain of VkTensorCreateInfoARM, then the number of elements accessed with one `OpTensorReadARM` or `OpTensorWriteARM`, must be less than or equal to the number of elements available from the starting coordinate in the rolling backing along the innermost dimension, defined as `wraps`[`dimensionCount` - 1] - InnermostCoordinate % `wraps`[`dimensionCount` - 1] where InnermostCoordinate is the last component of the coordinates array provided via the `Coordinates` operand

- VUID-vkCmdExecuteGeneratedCommandsNV-None-12472
  Descriptors dynamically accessed in bound descriptor heaps must be valid

- VUID-vkCmdExecuteGeneratedCommandsNV-None-11297
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a `OpTypeStruct` decorated with `Block` or `BufferBlock` using that mapping, the calculated offset for the resource heap must be a multiple of `bufferDescriptorAlignment`

- VUID-vkCmdExecuteGeneratedCommandsNV-None-11298
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeImage` or `OpTypeSampledImage` using that mapping, the calculated offset for the resource heap must be a multiple of `imageDescriptorAlignment`

- VUID-vkCmdExecuteGeneratedCommandsNV-None-11299
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeSampler` or `OpTypeSampledImage` using that mapping, the calculated offset for the sampler heap must be a multiple of `samplerDescriptorAlignment`

- VUID-vkCmdExecuteGeneratedCommandsNV-None-11397
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeTensorARM` using that mapping, the calculated offset for the resource heap must be a multiple of `tensorDescriptorAlignment`

- VUID-vkCmdExecuteGeneratedCommandsNV-None-11300
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 4

- VUID-vkCmdExecuteGeneratedCommandsNV-None-11301
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdExecuteGeneratedCommandsNV-None-11302
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress

- VUID-vkCmdExecuteGeneratedCommandsNV-None-11304
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 8

- VUID-vkCmdExecuteGeneratedCommandsNV-None-11305
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdExecuteGeneratedCommandsNV-None-11306
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address pointed to by the address in push data must be a valid VkDeviceAddress

- VUID-vkCmdExecuteGeneratedCommandsNV-None-11308
  For each descriptor heap that is statically used by a bound shader, either directly or via a descriptor mapping, a valid descriptor heap must be bound

- VUID-vkCmdExecuteGeneratedCommandsNV-None-11309
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, execution of this command must not result in any descriptor read accessing data outside of the user range of the respective heap bound by `vkCmdBind*HeapEXT` commands

- VUID-vkCmdExecuteGeneratedCommandsNV-None-11372
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer or uniform texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified via VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdExecuteGeneratedCommandsNV-None-11373
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer or storage texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdExecuteGeneratedCommandsNV-None-11374
  If the `robustBufferAccess2` feature is not enabled, the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, uniform texel buffer, storage buffer, or storage texel buffer, that shader must not access values outside of the range of the buffer as specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdExecuteGeneratedCommandsNV-pBindInfo-11375
  If any bound shader uses an embedded sampler via a descriptor mapping, the value of `pBindInfo->reservedRangeSize` set for vkCmdBindSamplerHeapEXT must be greater than or equal to `minSamplerHeapReservedRangeWithEmbedded`

- VUID-vkCmdExecuteGeneratedCommandsNV-None-11376
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, and that shader statically uses a push constant value, that value must have been set by vkCmdPushDataEXT

- VUID-vkCmdExecuteGeneratedCommandsNV-None-11398
  If a bound shader was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the access must not be out of bounds

- VUID-vkCmdExecuteGeneratedCommandsNV-None-11437
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the buffer from which the address in push data was queried must have been created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdExecuteGeneratedCommandsNV-None-11438
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdExecuteGeneratedCommandsNV-None-11441
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must be aligned to `minUniformBufferOffsetAlignment`

- VUID-vkCmdExecuteGeneratedCommandsNV-None-11439
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_STORAGE_BUFFER_BIT usage flag set

- VUID-vkCmdExecuteGeneratedCommandsNV-None-11442
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must be aligned to `minStorageBufferOffsetAlignment`

- VUID-vkCmdExecuteGeneratedCommandsNV-None-11485
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses an acceleration structure using that mapping, the address that the acceleration structure is mapped to must be an acceleration structure address retrieved from a VkAccelerationStructureKHR object via vkGetAccelerationStructureDeviceAddressKHR or handle retrieved from a VkAccelerationStructureNV object via vkGetAccelerationStructureHandleNV

- VUID-vkCmdExecuteGeneratedCommandsNV-index-11450
  If a shader uses a sampler descriptor to sample an image as a result of this command, and that sampler descriptor uses a custom border color with an index defined by VkSamplerCustomBorderColorIndexCreateInfoEXT, the value of VkSamplerCustomBorderColorIndexCreateInfoEXT::`index` must have been registered before this command was recorded, and still be registered during the sampling operation, with an identically defined color

- VUID-vkCmdExecuteGeneratedCommandsNV-protectedNoFault-11455
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, the address that the resource is mapped to must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdExecuteGeneratedCommandsNV-protectedNoFault-11456
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, the address of the indirect memory must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdExecuteGeneratedCommandsNV-renderPass-02684
  The current render pass must be compatible with the `renderPass` member of the `VkGraphicsPipelineCreateInfo` structure specified when creating the `VkPipeline` bound to VK_PIPELINE_BIND_POINT_GRAPHICS

- VUID-vkCmdExecuteGeneratedCommandsNV-subpass-02685
  The subpass index of the current render pass must be equal to the `subpass` member of the `VkGraphicsPipelineCreateInfo` structure specified when creating the `VkPipeline` bound to VK_PIPELINE_BIND_POINT_GRAPHICS

- VUID-vkCmdExecuteGeneratedCommandsNV-OpTypeImage-07468
  If any shader executed by this pipeline accesses an `OpTypeImage` variable with a `Dim` operand of `SubpassData`, it must be decorated with an `InputAttachmentIndex` that corresponds to a valid input attachment in the current subpass

- VUID-vkCmdExecuteGeneratedCommandsNV-None-07469
  Input attachment views accessed in a subpass must be created with the same VkFormat as the corresponding subpass definition, and be created with a VkImageView that is compatible with the attachment referenced by the subpass' `pInputAttachments`[`InputAttachmentIndex`] in the bound VkFramebuffer as specified by Fragment Input Attachment Compatibility

- VUID-vkCmdExecuteGeneratedCommandsNV-pDepthInputAttachmentIndex-09595
  Input attachment views accessed in a dynamic render pass with a `InputAttachmentIndex` referenced by VkRenderingInputAttachmentIndexInfo, or no `InputAttachmentIndex` if VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` or VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` are `NULL`, must be created with a VkImageView that is compatible with the corresponding color, depth, or stencil attachment in VkRenderingInfo

- VUID-vkCmdExecuteGeneratedCommandsNV-pDepthInputAttachmentIndex-09596
  Input attachment views accessed in a dynamic render pass via a shader object must have an `InputAttachmentIndex` if both VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` and VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` are non-`NULL`

- VUID-vkCmdExecuteGeneratedCommandsNV-InputAttachmentIndex-09597
  If an input attachment view accessed in a dynamic render pass via a shader object has an `InputAttachmentIndex`, the `InputAttachmentIndex` must match an index in VkRenderingInputAttachmentIndexInfo

- VUID-vkCmdExecuteGeneratedCommandsNV-None-06537
  Memory backing image subresources used as attachments in the current render pass must not be written in any way other than as an attachment by this command

- VUID-vkCmdExecuteGeneratedCommandsNV-None-10795
  If a color attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_COLOR_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdExecuteGeneratedCommandsNV-None-10796
  If a depth attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_DEPTH_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdExecuteGeneratedCommandsNV-None-10797
  If a stencil attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_STENCIL_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdExecuteGeneratedCommandsNV-None-12338
  If a color attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_COLOR_BIT on that attachment, the color attachment must not be written to by this command

- VUID-vkCmdExecuteGeneratedCommandsNV-None-12339
  If a depth attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_DEPTH_BIT on that attachment, the depth attachment must not be written to by this command

- VUID-vkCmdExecuteGeneratedCommandsNV-None-12340
  If a stencil attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_STENCIL_BIT on that attachment, the stencil attachment must not be written to by this command

- VUID-vkCmdExecuteGeneratedCommandsNV-None-09003
  If an attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, it must not be accessed in any way other than as an attachment, storage image, or sampled image by this command

- VUID-vkCmdExecuteGeneratedCommandsNV-None-06886
  If the current render pass instance uses a depth/stencil attachment with a read-only layout for the depth aspect, depth writes must be disabled

- VUID-vkCmdExecuteGeneratedCommandsNV-None-06887
  If the current render pass instance uses a depth/stencil attachment with a read-only layout for the stencil aspect, both front and back `writeMask` are not zero, and stencil test is enabled, all stencil ops must be VK_STENCIL_OP_KEEP

- VUID-vkCmdExecuteGeneratedCommandsNV-None-07831
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT dynamic state enabled then vkCmdSetViewport must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-None-07832
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SCISSOR dynamic state enabled then vkCmdSetScissor must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-None-08617
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_WIDTH dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineWidth must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-None-07834
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BIAS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthBiasEnable` is VK_TRUE, then vkCmdSetDepthBias or vkCmdSetDepthBias2EXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-None-07835
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_BLEND_CONSTANTS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and an active color attachment current value of `blendEnable` is VK_TRUE with a blend equations where any VkBlendFactor member is VK_BLEND_FACTOR_CONSTANT_COLOR, VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR, VK_BLEND_FACTOR_CONSTANT_ALPHA, or VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA, then vkCmdSetBlendConstants must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-None-07836
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BOUNDS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthBoundsTestEnable` is VK_TRUE, then vkCmdSetDepthBounds must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-None-07837
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilCompareMask must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-None-07838
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_WRITE_MASK dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilWriteMask must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-None-07839
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_REFERENCE dynamic state enabled, the current value of and `rasterizerDiscardEnable` is VK_FALSE, the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilReference must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-maxMultiviewInstanceIndex-02688
  If the draw is recorded in a render pass instance with multiview enabled, the maximum instance index must be less than or equal to VkPhysicalDeviceMultiviewProperties::`maxMultiviewInstanceIndex`

- VUID-vkCmdExecuteGeneratedCommandsNV-sampleLocationsEnable-02689
  If the bound graphics pipeline was created with VkPipelineSampleLocationsStateCreateInfoEXT::`sampleLocationsEnable` set to VK_TRUE, then the active depth attachment must have been created with the VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit set

- VUID-vkCmdExecuteGeneratedCommandsNV-None-07634
  If the `VK_EXT_sample_locations` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetSampleLocationsEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-None-06666
  If the `VK_EXT_sample_locations` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `sampleLocationsEnable` is VK_TRUE, then vkCmdSetSampleLocationsEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-None-07840
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_CULL_MODE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCullMode must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-None-07841
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRONT_FACE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetFrontFace must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-None-07843
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, vkCmdSetDepthTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-None-07844
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthTestEnable` is VK_TRUE, then vkCmdSetDepthWriteEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-None-07845
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_COMPARE_OP dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthTestEnable` is VK_TRUE, then vkCmdSetDepthCompareOp must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-None-07846
  If the `depthBounds` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthBoundsTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-None-07847
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetStencilTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-None-07848
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_OP dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilOp must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-viewportCount-03417
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, and the state is not inherited, then vkCmdSetViewportWithCount must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-scissorCount-03418
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT dynamic state enabled, and the state is not inherited, then vkCmdSetScissorWithCount must have been called and not subsequently invalidated in the current command buffer prior to this drawing

- VUID-vkCmdExecuteGeneratedCommandsNV-viewportCount-03419
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with both the VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic states enabled, and the state is not inherited, then the `viewportCount` parameter of `vkCmdSetViewportWithCount` must match the `scissorCount` parameter of `vkCmdSetScissorWithCount`

- VUID-vkCmdExecuteGeneratedCommandsNV-viewportCount-04137
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportWScalingStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdExecuteGeneratedCommandsNV-viewportCount-04138
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, the current value of `viewportWScalingEnable` is VK_TRUE, then vkCmdSetViewportWScalingNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-None-08636
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, the current value of `viewportWScalingEnable` is VK_TRUE, then the `viewportCount` parameter in the last call to vkCmdSetViewportWScalingNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdExecuteGeneratedCommandsNV-viewportCount-04139
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportShadingRateImageStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdExecuteGeneratedCommandsNV-shadingRateImage-09233
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_COARSE_SAMPLE_ORDER_NV and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoarseSampleOrderNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-shadingRateImage-09234
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `shadingRateImageEnable` is VK_TRUE, then vkCmdSetViewportShadingRatePaletteNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-None-08637
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `shadingRateImageEnable` is VK_TRUE, then the `viewportCount` parameter in the last call to vkCmdSetViewportShadingRatePaletteNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdExecuteGeneratedCommandsNV-VkPipelineVieportCreateInfo-04141
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled and a VkPipelineViewportSwizzleStateCreateInfoNV structure chained from VkPipelineViewportStateCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportSwizzleStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdExecuteGeneratedCommandsNV-VkPipelineVieportCreateInfo-04142
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled and a VkPipelineViewportExclusiveScissorStateCreateInfoNV structure chained from VkPipelineViewportStateCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportExclusiveScissorStateCreateInfoNV::`exclusiveScissorCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdExecuteGeneratedCommandsNV-None-07878
  If the `exclusiveScissor` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_ENABLE_NV dynamic state enabled, then vkCmdSetExclusiveScissorEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-None-07879
  If the `exclusiveScissor` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_NV dynamic state enabled, and the most recent call to vkCmdSetExclusiveScissorEnableNV in the current command buffer set any element of `pExclusiveScissorEnables` to VK_TRUE, then vkCmdSetExclusiveScissorNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-None-04876
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE dynamic state enabled, then vkCmdSetRasterizerDiscardEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-None-04877
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthBiasEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-logicOp-04878
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LOGIC_OP_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `logicOpEnable` is VK_TRUE, then vkCmdSetLogicOpEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-primitiveFragmentShadingRateWithMultipleViewports-04552
  If the `primitiveFragmentShadingRateWithMultipleViewports` limit is not supported, the bound graphics pipeline was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, and any of the shader stages of the bound graphics pipeline write to the `PrimitiveShadingRateKHR` built-in, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and the `viewportCount` parameter of `vkCmdSetViewportWithCount` must be `1`

- VUID-vkCmdExecuteGeneratedCommandsNV-primitiveFragmentShadingRateWithMultipleViewports-08642
  If the `primitiveFragmentShadingRateWithMultipleViewports` limit is not supported, and any shader object bound to a graphics stage writes to the `PrimitiveShadingRateKHR` built-in, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and the `viewportCount` parameter of `vkCmdSetViewportWithCount` must be `1`

- VUID-vkCmdExecuteGeneratedCommandsNV-blendEnable-04727
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, then for each color attachment, if the corresponding image view’s format features do not contain VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT, then the corresponding current value of `blendEnable` must be VK_FALSE

- VUID-vkCmdExecuteGeneratedCommandsNV-None-08644
  If a shader object is bound to any graphics stage or a graphics pipeline is bound, the current value of `rasterizerDiscardEnable` is VK_FALSE, and none of the following is enabled:

  - the `VK_AMD_mixed_attachment_samples` extension

  - the `VK_NV_framebuffer_mixed_samples` extension

  - the `multisampledRenderToSingleSampled` feature

  then the current value of `rasterizationSamples` must be the same as the current color and/or depth/stencil attachments

- VUID-vkCmdExecuteGeneratedCommandsNV-None-08876
  If a shader object is bound to any graphics stage, the current render pass instance must have been begun with vkCmdBeginRendering

- VUID-vkCmdExecuteGeneratedCommandsNV-imageView-06172
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdExecuteGeneratedCommandsNV-imageView-06173
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdExecuteGeneratedCommandsNV-imageView-06174
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdExecuteGeneratedCommandsNV-imageView-06175
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdExecuteGeneratedCommandsNV-imageView-06176
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdExecuteGeneratedCommandsNV-imageView-06177
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdExecuteGeneratedCommandsNV-viewMask-06178
  If the current render pass instance was begun with vkCmdBeginRendering, the bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::`viewMask` equal to VkRenderingInfo::`viewMask`

- VUID-vkCmdExecuteGeneratedCommandsNV-colorAttachmentCount-06179
  If the `dynamicRenderingUnusedAttachments` feature is not enabled and the current render pass instance was begun with vkCmdBeginRendering, the bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::`colorAttachmentCount` equal to VkRenderingInfo::`colorAttachmentCount`

- VUID-vkCmdExecuteGeneratedCommandsNV-dynamicRenderingUnusedAttachments-08910
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound graphics pipeline

- VUID-vkCmdExecuteGeneratedCommandsNV-dynamicRenderingUnusedAttachments-08912
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` equal to VK_NULL_HANDLE must have the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound pipeline equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdExecuteGeneratedCommandsNV-dynamicRenderingUnusedAttachments-08911
  If the `dynamicRenderingUnusedAttachments` feature is enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound graphics pipeline, or the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats`, if it exists, must be VK_FORMAT_UNDEFINED

- VUID-vkCmdExecuteGeneratedCommandsNV-colorAttachmentCount-09362
  If the current render pass instance was begun with vkCmdBeginRendering, with a VkRenderingInfo::`colorAttachmentCount` equal to `1`, there is no shader object bound to any graphics stage, and a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, each element of the VkRenderingInfo::`pColorAttachments` array with a `resolveImageView` not equal to VK_NULL_HANDLE must have been created with an image created with a VkExternalFormatANDROID::`externalFormat` value equal to the VkExternalFormatANDROID::`externalFormat` value used to create the bound graphics pipeline

- VUID-vkCmdExecuteGeneratedCommandsNV-None-09363
  If there is no shader object bound to any graphics stage, the current render pass instance was begun with vkCmdBeginRendering and a VkRenderingInfo::`colorAttachmentCount` equal to `1`, and a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with an image created with a VkExternalFormatANDROID::`externalFormat` value equal to the VkExternalFormatANDROID::`externalFormat` value used to create the bound graphics pipeline

- VUID-vkCmdExecuteGeneratedCommandsNV-None-09364
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetColorBlendEnableEXT must have set the blend enable to VK_FALSE prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-None-09365
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetRasterizationSamplesEXT must have set `rasterizationSamples` to VK_SAMPLE_COUNT_1_BIT prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-None-09368
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetFragmentShadingRateKHR must have set `pFragmentSize->width` to `1` prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-None-09369
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetFragmentShadingRateKHR must have set `pFragmentSize->height` to `1` prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-None-07749
  If the `colorWriteEnable` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorWriteEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-attachmentCount-07750
  If the `colorWriteEnable` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the `attachmentCount` parameter of most recent call to `vkCmdSetColorWriteEnableEXT` in the current command buffer must be greater than or equal to the number of active color attachments

- VUID-vkCmdExecuteGeneratedCommandsNV-None-07751
  If the `VK_EXT_discard_rectangles` extension is enabled, a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT dynamic state enabled and the `pNext` chain of VkGraphicsPipelineCreateInfo included a VkPipelineDiscardRectangleStateCreateInfoEXT structure, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for each discard rectangle in VkPipelineDiscardRectangleStateCreateInfoEXT::`discardRectangleCount`

- VUID-vkCmdExecuteGeneratedCommandsNV-rasterizerDiscardEnable-09236
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT dynamic state enabled and the `pNext` chain of VkGraphicsPipelineCreateInfo did not include a VkPipelineDiscardRectangleStateCreateInfoEXT structure, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for each discard rectangle in VkPhysicalDeviceDiscardRectanglePropertiesEXT::`maxDiscardRectangles`

- VUID-vkCmdExecuteGeneratedCommandsNV-None-07880
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDiscardRectangleEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-None-07881
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_MODE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-dynamicRenderingUnusedAttachments-08913
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->imageView` was VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdExecuteGeneratedCommandsNV-dynamicRenderingUnusedAttachments-08914
  If current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdExecuteGeneratedCommandsNV-dynamicRenderingUnusedAttachments-08915
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, and the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->imageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdExecuteGeneratedCommandsNV-dynamicRenderingUnusedAttachments-08916
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->imageView` was VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdExecuteGeneratedCommandsNV-dynamicRenderingUnusedAttachments-08917
  If current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdExecuteGeneratedCommandsNV-dynamicRenderingUnusedAttachments-08918
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, and the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->imageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdExecuteGeneratedCommandsNV-imageView-06183
  If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentShadingRateAttachmentInfoKHR::`imageView` was not VK_NULL_HANDLE, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

- VUID-vkCmdExecuteGeneratedCommandsNV-dynamicRenderingLocalRead-11797
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingLocalRead` feature is enabled, the VK_RENDERING_LOCAL_READ_CONCURRENT_ACCESS_CONTROL_BIT_KHR flag is specified, and an attachment is being used as a feedback loop as specified by VK_RENDERING_ATTACHMENT_INPUT_ATTACHMENT_FEEDBACK_BIT_KHR, VkRenderingAttachmentFlagsInfoKHR::`flags` for that attachment must include VK_RENDERING_ATTACHMENT_INPUT_ATTACHMENT_FEEDBACK_BIT_KHR

- VUID-vkCmdExecuteGeneratedCommandsNV-imageView-06184
  If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentDensityMapAttachmentInfoEXT::`imageView` was not VK_NULL_HANDLE, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT

- VUID-vkCmdExecuteGeneratedCommandsNV-layers-10831
  If the current render pass instance was created with VK_RENDERING_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE or VK_RENDER_PASS_CREATE_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE, and the bound graphics pipeline was created with VK_PIPELINE_CREATE_2_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE, then the current render pass instance must have a `layers` value less than or equal to VkPipelineFragmentDensityMapLayeredCreateInfoVALVE::`maxFragmentDensityMapLayers`

- VUID-vkCmdExecuteGeneratedCommandsNV-colorAttachmentCount-06185
  If the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with a sample count equal to the corresponding element of the `pColorAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline

- VUID-vkCmdExecuteGeneratedCommandsNV-pDepthAttachment-06186
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of the `depthStencilAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdExecuteGeneratedCommandsNV-pStencilAttachment-06187
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of the `depthStencilAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdExecuteGeneratedCommandsNV-multisampledRenderToSingleSampled-07285
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with a sample count equal to the value of `rasterizationSamples` for the bound graphics pipeline

- VUID-vkCmdExecuteGeneratedCommandsNV-multisampledRenderToSingleSampled-07286
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdExecuteGeneratedCommandsNV-multisampledRenderToSingleSampled-07287
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdExecuteGeneratedCommandsNV-pNext-07935
  If this command is called inside a render pass instance started with vkCmdBeginRendering, and the `pNext` chain of VkRenderingInfo includes a VkMultisampledRenderToSingleSampledInfoEXT structure with `multisampledRenderToSingleSampledEnable` equal to VK_TRUE, then the value of `rasterizationSamples` for the bound graphics pipeline must be equal to VkMultisampledRenderToSingleSampledInfoEXT::`rasterizationSamples`

- VUID-vkCmdExecuteGeneratedCommandsNV-renderPass-06198
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline must have been created with a VkGraphicsPipelineCreateInfo::`renderPass` equal to VK_NULL_HANDLE

- VUID-vkCmdExecuteGeneratedCommandsNV-pColorAttachments-08963
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound with a fragment shader that statically writes to a color attachment, the color write mask is not zero, color writes are enabled, and the corresponding element of the VkRenderingInfo::`pColorAttachments->imageView` was not VK_NULL_HANDLE, then the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdExecuteGeneratedCommandsNV-pColorAttachments-11539
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound with a fragment shader that statically writes to a color attachment, the color write mask is not zero, color writes are enabled, and the corresponding element of the VkRenderingInfo::`pColorAttachments->resolveImageView` was not VK_NULL_HANDLE, then the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdExecuteGeneratedCommandsNV-pDepthAttachment-08964
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound, depth test is enabled, and the VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, then the VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdExecuteGeneratedCommandsNV-pDepthAttachment-11540
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound, depth test is enabled, and the VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, then the VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdExecuteGeneratedCommandsNV-pStencilAttachment-08965
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound, stencil test is enabled and the VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, then the VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdExecuteGeneratedCommandsNV-pStencilAttachment-11860
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound, stencil test is enabled and the VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, then the VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdExecuteGeneratedCommandsNV-flags-10582
  If the current render pass instance was begun with a vkCmdBeginRendering call in `commandBuffer`, its VkRenderingInfo::`flags` parameter must not have VK_RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT set unless VK_RENDERING_CONTENTS_INLINE_BIT_KHR is also set

- VUID-vkCmdExecuteGeneratedCommandsNV-primitivesGeneratedQueryWithRasterizerDiscard-06708
  If the `primitivesGeneratedQueryWithRasterizerDiscard` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, rasterization discard must not be enabled

- VUID-vkCmdExecuteGeneratedCommandsNV-primitivesGeneratedQueryWithNonZeroStreams-06709
  If the `primitivesGeneratedQueryWithNonZeroStreams` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, the bound graphics pipeline must not have been created with a non-zero value in `VkPipelineRasterizationStateStreamCreateInfoEXT`::`rasterizationStream`

- VUID-vkCmdExecuteGeneratedCommandsNV-None-07620
  If the `depthClamp` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLAMP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthClampEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-None-07621
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_POLYGON_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetPolygonModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-None-07622
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetRasterizationSamplesEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-None-07623
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetSampleMaskEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-alphaToCoverageEnable-08919
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT dynamic state enabled, and `alphaToCoverageEnable` was VK_TRUE in the last call to vkCmdSetAlphaToCoverageEnableEXT, then the Fragment Output Interface must contain a variable for the alpha `Component` word in `Location` 0 at `Index` 0

- VUID-vkCmdExecuteGeneratedCommandsNV-alphaToCoverageEnable-08920
  If a shader object is bound to any graphics stage, and the most recent call to vkCmdSetAlphaToCoverageEnableEXT in the current command buffer set `alphaToCoverageEnable` to VK_TRUE, then the Fragment Output Interface must contain a variable for the alpha `Component` word in `Location` 0 at `Index` 0

- VUID-vkCmdExecuteGeneratedCommandsNV-None-07624
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAlphaToCoverageEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-None-07625
  If the `alphaToOne` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ALPHA_TO_ONE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAlphaToOneEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-None-07626
  If the `logicOp` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LOGIC_OP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetLogicOpEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-None-07627
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and there are color attachments bound, then vkCmdSetColorBlendEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-None-07629
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and there are color attachments bound, then vkCmdSetColorWriteMaskEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-None-07630
  If the `geometryStreams` feature is enabled, and a shader object is bound to the VK_SHADER_STAGE_GEOMETRY_BIT stage or a graphics pipeline is bound which was created with both a VK_SHADER_STAGE_GEOMETRY_BIT stage and the VK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXT dynamic state enabled, then vkCmdSetRasterizationStreamEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-None-07631
  If the `VK_EXT_conservative_rasterization` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_CONSERVATIVE_RASTERIZATION_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetConservativeRasterizationModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-None-07632
  If the `VK_EXT_conservative_rasterization` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXTRA_PRIMITIVE_OVERESTIMATION_SIZE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `conservativeRasterizationMode` is VK_CONSERVATIVE_RASTERIZATION_MODE_OVERESTIMATE_EXT, then vkCmdSetExtraPrimitiveOverestimationSizeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-conservativePointAndLineRasterization-07499
  If the `VK_EXT_conservative_rasterization` extension is enabled, `conservativePointAndLineRasterization` is not supported, a shader object is bound to any graphics stage or a graphics pipeline is bound, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line or point topology class, then the current value of `conservativeRasterizationMode` must be VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT

- VUID-vkCmdExecuteGeneratedCommandsNV-None-07633
  If the `depthClipEnable` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLIP_ENABLE_EXT dynamic state, then vkCmdSetDepthClipEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-None-07636
  If the `VK_EXT_provoking_vertex` extension is enabled, a shader object is bound to the VK_SHADER_STAGE_VERTEX_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_PROVOKING_VERTEX_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetProvokingVertexModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-None-08666
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineRasterizationModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-None-08669
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineStippleEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-None-07849
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled and a shader object is bound to any graphics stage, or a bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stippledLineEnable` is VK_TRUE, then vkCmdSetLineStipple must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-None-10608
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic state enabled, the effective rasterization input topology is in the line topology class, and the current `lineRasterizationMode` is VK_LINE_RASTERIZATION_MODE_BRESENHAM or VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH, then the current `alphaToCoverageEnable`, `alphaToOneEnable` and `sampleShadingEnable` states must all be VK_FALSE

- VUID-vkCmdExecuteGeneratedCommandsNV-None-07639
  If the `depthClipControl` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLIP_NEGATIVE_ONE_TO_ONE_EXT dynamic state enabled, then vkCmdSetDepthClipNegativeOneToOneEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-None-09650
  If the `depthClampControl` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLAMP_RANGE_EXT dynamic state enabled, and the current value of `depthClampEnable` is VK_TRUE, then vkCmdSetDepthClampRangeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-None-07640
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_ENABLE_NV dynamic state enabled, then vkCmdSetViewportWScalingEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-None-07641
  If the `VK_NV_viewport_swizzle` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic state enabled, then vkCmdSetViewportSwizzleNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-None-07642
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageToColorEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-None-07643
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_LOCATION_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageToColorEnable` is VK_TRUE, then vkCmdSetCoverageToColorLocationNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-None-07644
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_MODE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageModulationModeNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-None-07645
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageModulationMode` is any value other than VK_COVERAGE_MODULATION_MODE_NONE_NV, then vkCmdSetCoverageModulationTableEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-None-07646
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageModulationTableEnable` is VK_TRUE, then vkCmdSetCoverageModulationTableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-None-07647
  If the `shadingRateImage` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SHADING_RATE_IMAGE_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetShadingRateImageEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-pipelineFragmentShadingRate-09238
  If the `pipelineFragmentShadingRate` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetFragmentShadingRateKHR must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-None-07648
  If the `representativeFragmentTest` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_REPRESENTATIVE_FRAGMENT_TEST_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetRepresentativeFragmentTestEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-None-07649
  If the `coverageReductionMode` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageReductionModeNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-rasterizationSamples-07471
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current subpass does not use any color and/or depth/stencil attachments, then the `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT must follow the rules for a zero-attachment subpass

- VUID-vkCmdExecuteGeneratedCommandsNV-samples-07472
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state disabled, then the `samples` parameter in the last call to vkCmdSetSampleMaskEXT must be greater or equal to the VkPipelineMultisampleStateCreateInfo::`rasterizationSamples` parameter used to create the bound graphics pipeline

- VUID-vkCmdExecuteGeneratedCommandsNV-samples-07473
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT state and VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT states enabled, then the `samples` parameter in the last call to vkCmdSetSampleMaskEXT must be greater or equal to the `rasterizationSamples` parameter in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdExecuteGeneratedCommandsNV-None-09211
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, or a shader object is bound to any graphics stage, and the current render pass instance includes a VkMultisampledRenderToSingleSampledInfoEXT structure with `multisampledRenderToSingleSampledEnable` equal to VK_TRUE, then the `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT must be the same as the `rasterizationSamples` member of that structure

- VUID-vkCmdExecuteGeneratedCommandsNV-firstAttachment-07476
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic states enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the last call to vkCmdSetColorBlendEnableEXT in the current command buffer prior to this drawing command must have set a value for all active color attachments

- VUID-vkCmdExecuteGeneratedCommandsNV-firstAttachment-07478
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT dynamic states enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the last call to vkCmdSetColorWriteMaskEXT in the current command buffer prior to this drawing command must have set a value for all active color attachments

- VUID-vkCmdExecuteGeneratedCommandsNV-advancedBlendMaxColorAttachments-07480
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT and VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic states enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and an active color attachment current value of `blendEnable` is VK_TRUE, then the number of active color attachments must not exceed `advancedBlendMaxColorAttachments`

- VUID-vkCmdExecuteGeneratedCommandsNV-None-10862
  If a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT , but not the VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorBlendEquationEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdExecuteGeneratedCommandsNV-rasterizerDiscardEnable-10863
  If a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT, but not the VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorBlendAdvancedEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdExecuteGeneratedCommandsNV-None-10864
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT and VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then either vkCmdSetColorBlendAdvancedEXT or vkCmdSetColorBlendEquationEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdExecuteGeneratedCommandsNV-primitivesGeneratedQueryWithNonZeroStreams-07481
  If the `primitivesGeneratedQueryWithNonZeroStreams` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, and the bound graphics pipeline was created with VK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXT state enabled, the last call to vkCmdSetRasterizationStreamEXT must have set the `rasterizationStream` to zero

- VUID-vkCmdExecuteGeneratedCommandsNV-sampleLocationsPerPixel-07482
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state disabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then the `sampleLocationsPerPixel` member of `pSampleLocationsInfo` in the last call to vkCmdSetSampleLocationsEXT must equal the `rasterizationSamples` member of the VkPipelineMultisampleStateCreateInfo structure the bound graphics pipeline has been created with

- VUID-vkCmdExecuteGeneratedCommandsNV-sampleLocationsPerPixel-07483
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then the `sampleLocationsPerPixel` member of `pSampleLocationsInfo` in the last call to vkCmdSetSampleLocationsEXT must equal the `rasterizationSamples` parameter of the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdExecuteGeneratedCommandsNV-sampleLocationsEnable-07484
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT then the current active depth attachment must have been created with the VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit set

- VUID-vkCmdExecuteGeneratedCommandsNV-sampleLocationsEnable-07485
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, then the `sampleLocationsInfo.maxSampleLocationGridSize.width` in the last call to vkCmdSetSampleLocationsEXT must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.width` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling `rasterizationSamples`

- VUID-vkCmdExecuteGeneratedCommandsNV-sampleLocationsEnable-07486
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, then the `sampleLocationsInfo.maxSampleLocationGridSize.height` in the last call to vkCmdSetSampleLocationsEXT must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.height` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling `rasterizationSamples`

- VUID-vkCmdExecuteGeneratedCommandsNV-sampleLocationsEnable-07487
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, the fragment shader code must not statically use the extended instruction `InterpolateAtSample`

- VUID-vkCmdExecuteGeneratedCommandsNV-sampleLocationsEnable-07936
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationGridSize.width` must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.width` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling the value of `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdExecuteGeneratedCommandsNV-sampleLocationsEnable-07937
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationGridSize.height` must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.height` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling the value of `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdExecuteGeneratedCommandsNV-sampleLocationsEnable-07938
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationsPerPixel` must equal `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdExecuteGeneratedCommandsNV-coverageModulationTableEnable-07488
  If a shader object is bound to any graphics stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NV state enabled, and the last call to vkCmdSetCoverageModulationTableEnableNV set `coverageModulationTableEnable` to VK_TRUE, then the `coverageModulationTableCount` parameter in the last call to vkCmdSetCoverageModulationTableNV must equal the current `rasterizationSamples` divided by the number of color samples in the current active color attachment

- VUID-vkCmdExecuteGeneratedCommandsNV-rasterizationSamples-07489
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, and if current subpass has a depth/stencil attachment and depth test, stencil test, or depth bounds test are enabled in the bound pipeline, then the current `rasterizationSamples` must be the same as the sample count of the depth/stencil attachment

- VUID-vkCmdExecuteGeneratedCommandsNV-coverageToColorEnable-07490
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV state enabled and the last call to vkCmdSetCoverageToColorEnableNV set the `coverageToColorEnable` to VK_TRUE, then there must be an active color attachment at the location selected by the last call to vkCmdSetCoverageToColorLocationNV `coverageToColorLocation`, with a VkFormat of VK_FORMAT_R8_UINT, VK_FORMAT_R8_SINT, VK_FORMAT_R16_UINT, VK_FORMAT_R16_SINT, VK_FORMAT_R32_UINT, or VK_FORMAT_R32_SINT

- VUID-vkCmdExecuteGeneratedCommandsNV-rasterizerDiscardEnable-09420
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, and a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, and the most recent call to vkCmdSetRasterizerDiscardEnable in the current command buffer set `rasterizerDiscardEnable` to VK_FALSE, and the last call to vkCmdSetCoverageToColorEnableNV set the `coverageToColorEnable` to VK_TRUE, then there must be an active color attachment at the location selected by the last call to vkCmdSetCoverageToColorLocationNV `coverageToColorLocation`, with a VkFormat of VK_FORMAT_R8_UINT, VK_FORMAT_R8_SINT, VK_FORMAT_R16_UINT, VK_FORMAT_R16_SINT, VK_FORMAT_R32_UINT, or VK_FORMAT_R32_SINT

- VUID-vkCmdExecuteGeneratedCommandsNV-coverageReductionMode-07491
  If the `coverageReductionMode` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV or VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic states enabled, then the current values of `coverageReductionMode`, `rasterizationSamples`, the sample counts for the color and depth/stencil attachments (if the subpass has them) must be a valid combination returned by vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV

- VUID-vkCmdExecuteGeneratedCommandsNV-viewportCount-07492
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportSwizzleStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdExecuteGeneratedCommandsNV-viewportCount-07493
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic states enabled then the `viewportCount` parameter in the last call to vkCmdSetViewportSwizzleNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdExecuteGeneratedCommandsNV-viewportCount-09421
  If the `VK_NV_viewport_swizzle` extension is enabled, and a shader object is bound to any graphics stage, then the `viewportCount` parameter in the last call to vkCmdSetViewportSwizzleNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdExecuteGeneratedCommandsNV-rasterizationSamples-07494
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, and the `coverageReductionMode` feature is not enabled, or the current value of `coverageReductionMode` is not VK_COVERAGE_REDUCTION_MODE_TRUNCATE_NV, and the current value of `rasterizationSamples` is greater than sample count of the color attachment, then sample shading must be disabled

- VUID-vkCmdExecuteGeneratedCommandsNV-stippledLineEnable-07495
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_RECTANGULAR, then the `stippledRectangularLines` feature must be enabled

- VUID-vkCmdExecuteGeneratedCommandsNV-stippledLineEnable-07496
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_BRESENHAM, then the `stippledBresenhamLines` feature must be enabled

- VUID-vkCmdExecuteGeneratedCommandsNV-stippledLineEnable-07497
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH, then the `stippledSmoothLines` feature must be enabled

- VUID-vkCmdExecuteGeneratedCommandsNV-stippledLineEnable-07498
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_DEFAULT, then the `stippledRectangularLines` feature must be enabled and VkPhysicalDeviceLimits::`strictLines` must be VK_TRUE

- VUID-vkCmdExecuteGeneratedCommandsNV-stage-07073
  If the bound pipeline was created with the VkPipelineShaderStageCreateInfo::`stage` member of an element of VkGraphicsPipelineCreateInfo::`pStages` set to VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT, then Mesh Shader Queries must not be active

- VUID-vkCmdExecuteGeneratedCommandsNV-None-08877
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ATTACHMENT_FEEDBACK_LOOP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAttachmentFeedbackLoopEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-None-07850
  If dynamic state was inherited from VkCommandBufferInheritanceViewportScissorInfoNV, it must be set in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-nextStage-10745
  For each shader object bound to a graphics stage, except for shader object bound to the last graphics stage in the logical pipeline, it must have been created with a `nextStage` including the corresponding bit to the shader object bound to the following graphics stage in the logical pipeline

- VUID-vkCmdExecuteGeneratedCommandsNV-None-08684
  If there is no bound graphics pipeline, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_VERTEX_BIT

- VUID-vkCmdExecuteGeneratedCommandsNV-None-08685
  If there is no bound graphics pipeline, and the `tessellationShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT

- VUID-vkCmdExecuteGeneratedCommandsNV-None-08686
  If there is no bound graphics pipeline, and the `tessellationShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT

- VUID-vkCmdExecuteGeneratedCommandsNV-None-08687
  If there is no bound graphics pipeline, and the `geometryShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_GEOMETRY_BIT

- VUID-vkCmdExecuteGeneratedCommandsNV-None-08688
  If there is no bound graphics pipeline, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_FRAGMENT_BIT

- VUID-vkCmdExecuteGeneratedCommandsNV-None-08689
  If there is no bound graphics pipeline, and the `taskShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TASK_BIT_EXT

- VUID-vkCmdExecuteGeneratedCommandsNV-None-08690
  If there is no bound graphics pipeline, and the `meshShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-vkCmdExecuteGeneratedCommandsNV-None-08693
  If there is no bound graphics pipeline, and at least one of the `taskShader` and `meshShader` features is enabled, one of the VK_SHADER_STAGE_VERTEX_BIT or VK_SHADER_STAGE_MESH_BIT_EXT stages must have a valid `VkShaderEXT` bound, and the other must have no `VkShaderEXT` bound

- VUID-vkCmdExecuteGeneratedCommandsNV-None-08696
  If there is no bound graphics pipeline, and a valid `VkShaderEXT` is bound to the VK_SHADER_STAGE_VERTEX_BIT stage, there must be no `VkShaderEXT` bound to either the VK_SHADER_STAGE_TASK_BIT_EXT stage or the VK_SHADER_STAGE_MESH_BIT_EXT stage

- VUID-vkCmdExecuteGeneratedCommandsNV-None-08698
  If any graphics shader is bound which was created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag, then all shaders created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag in the same vkCreateShadersEXT call must also be bound

- VUID-vkCmdExecuteGeneratedCommandsNV-None-08699
  If any graphics shader is bound which was created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag, any stages in between stages whose shaders which did not create a shader with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag as part of the same vkCreateShadersEXT call must not have any `VkShaderEXT` bound

- VUID-vkCmdExecuteGeneratedCommandsNV-None-08878
  All bound graphics shader objects must have been created with identical or identically defined push constant ranges

- VUID-vkCmdExecuteGeneratedCommandsNV-None-08879
  All bound graphics shader objects must have either been created with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag set, or with identical or identically defined arrays of descriptor set layouts

- VUID-vkCmdExecuteGeneratedCommandsNV-colorAttachmentCount-09372
  If the current render pass instance was begun with vkCmdBeginRendering and a VkRenderingInfo::`colorAttachmentCount` equal to `1`, a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, and a fragment shader is bound, it must not declare the `DepthReplacing` or `StencilRefReplacingEXT` execution modes

- VUID-vkCmdExecuteGeneratedCommandsNV-pDynamicStates-08715
  If the bound graphics pipeline state includes a fragment shader stage, was created with VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`, and the fragment shader declares the `EarlyFragmentTests` execution mode and uses `OpDepthAttachmentReadEXT`, the `depthWriteEnable` parameter in the last call to vkCmdSetDepthWriteEnable must be VK_FALSE

- VUID-vkCmdExecuteGeneratedCommandsNV-pDynamicStates-08716
  If the bound graphics pipeline state includes a fragment shader stage, was created with VK_DYNAMIC_STATE_STENCIL_WRITE_MASK set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`, and the fragment shader declares the `EarlyFragmentTests` execution mode and uses `OpStencilAttachmentReadEXT`, the `writeMask` parameter in the last call to vkCmdSetStencilWriteMask must be `0`

- VUID-vkCmdExecuteGeneratedCommandsNV-None-09116
  If a shader object is bound to any graphics stage or the bound graphics pipeline was created with VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT, and the format of any color attachment is VK_FORMAT_E5B9G9R9_UFLOAT_PACK32, the corresponding element of the `pColorWriteMasks` parameter of vkCmdSetColorWriteMaskEXT must either include all of VK_COLOR_COMPONENT_R_BIT, VK_COLOR_COMPONENT_G_BIT, VK_COLOR_COMPONENT_B_BIT, and VK_COLOR_COMPONENT_A_BIT, or none of them

- VUID-vkCmdExecuteGeneratedCommandsNV-maxFragmentDualSrcAttachments-09239
  If blending is enabled for any attachment where either the source or destination blend factors for that attachment use the secondary color input, the maximum value of `Location` for any output attachment statically used in the `Fragment` `Execution` `Model` executed by this command must be less than `maxFragmentDualSrcAttachments`

- VUID-vkCmdExecuteGeneratedCommandsNV-None-09548
  If the current render pass was begun with vkCmdBeginRendering, there is no shader object bound to any graphics stage, the value of each element of VkRenderingAttachmentLocationInfo::`pColorAttachmentLocations` in the bound pipeline must match the value for the corresponding locations set currently in the current render pass instance

- VUID-vkCmdExecuteGeneratedCommandsNV-None-09549
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of each element of VkRenderingInputAttachmentIndexInfo::`pColorAttachmentInputIndices` in the bound pipeline must match the value for the corresponding index set currently in the current render pass instance

- VUID-vkCmdExecuteGeneratedCommandsNV-None-10927
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` in the bound pipeline must match the value set currently in the current render pass instance

- VUID-vkCmdExecuteGeneratedCommandsNV-None-10928
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` in the bound pipeline must match the value set currently in the current render pass instance

- VUID-vkCmdExecuteGeneratedCommandsNV-None-09642
  If the current render pass was begun with vkCmdBeginRendering with the VK_RENDERING_ENABLE_LEGACY_DITHERING_BIT_EXT flag, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_2_ENABLE_LEGACY_DITHERING_BIT_EXT

- VUID-vkCmdExecuteGeneratedCommandsNV-None-09643
  If the bound graphics pipeline was created with VK_PIPELINE_CREATE_2_ENABLE_LEGACY_DITHERING_BIT_EXT, the current render pass must have begun with vkCmdBeginRendering with the VK_RENDERING_ENABLE_LEGACY_DITHERING_BIT_EXT flag

- VUID-vkCmdExecuteGeneratedCommandsNV-None-10677
  If the per-tile execution model is enabled, the tileShadingPerTileDraw feature must be enabled

- VUID-vkCmdExecuteGeneratedCommandsNV-None-10772
  If a shader object is bound to any graphics stage, multiview functionality must not be enabled in the current render pass

- VUID-vkCmdExecuteGeneratedCommandsNV-multiviewPerViewViewports-12262
  If the `multiviewPerViewViewports` feature is enabled, then the index of the most significant bit in current render pass instance `viewMask` must be less than the current value of `viewportCount`

- VUID-vkCmdExecuteGeneratedCommandsNV-multiviewPerViewViewports-12263
  If the `multiviewPerViewViewports` feature is enabled, then the index of the most significant bit in current render pass instance `viewMask` must be less than the current value of `scissorCount`

- VUID-vkCmdExecuteGeneratedCommandsNV-flags-11521
  If current render pass instance was begun with vkCmdBeginRendering with VkRenderingInfo::`flags` which includes VK_RENDERING_FRAGMENT_REGION_BIT_EXT, and if sample shading is enabled (explicitly or implicitly), then the minimum fraction for sample shading must equal 0.0

- VUID-vkCmdExecuteGeneratedCommandsNV-None-11522
  If the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, and the `dynamicRenderingUnusedAttachments` feature is not enabled, the graphics pipeline bound must have been created with a VkCustomResolveCreateInfoEXT

- VUID-vkCmdExecuteGeneratedCommandsNV-None-11523
  If the current render pass instance was begun with vkCmdBeginRendering and does not contain a custom resolve, and the `dynamicRenderingUnusedAttachments` feature is not enabled, the graphics pipeline bound must not have been created with a VkCustomResolveCreateInfoEXT

- VUID-vkCmdExecuteGeneratedCommandsNV-customResolve-11524
  If the current render pass instance was begun with vkCmdBeginRendering and vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, the graphics pipeline bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_TRUE

- VUID-vkCmdExecuteGeneratedCommandsNV-customResolve-11525
  If the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, and vkCmdBeginCustomResolveEXT has not been recorded in the render pass instance, the graphics pipeline bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_FALSE

- VUID-vkCmdExecuteGeneratedCommandsNV-None-11861
  If the `dynamicRenderingUnusedAttachments` feature is not enabled and the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, the bound graphics pipeline must have been created with a VkCustomResolveCreateInfoEXT::`colorAttachmentCount` equal to VkRenderingInfo::`colorAttachmentCount`

- VUID-vkCmdExecuteGeneratedCommandsNV-None-11862
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound graphics pipeline

- VUID-vkCmdExecuteGeneratedCommandsNV-None-11863
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` equal to VK_NULL_HANDLE must have the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound pipeline equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdExecuteGeneratedCommandsNV-dynamicRenderingUnusedAttachments-11864
  If the `dynamicRenderingUnusedAttachments` feature is enabled, the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound graphics pipeline, or the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats`, if it exists, must be VK_FORMAT_UNDEFINED

- VUID-vkCmdExecuteGeneratedCommandsNV-None-11865
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdExecuteGeneratedCommandsNV-None-11866
  If current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`

- VUID-vkCmdExecuteGeneratedCommandsNV-dynamicRenderingUnusedAttachments-11867
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, and the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdExecuteGeneratedCommandsNV-None-11868
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->resolveImageView` was VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdExecuteGeneratedCommandsNV-None-11869
  If current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`

- VUID-vkCmdExecuteGeneratedCommandsNV-dynamicRenderingUnusedAttachments-11870
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, and the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdExecuteGeneratedCommandsNV-colorAttachmentCount-11871
  If the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0` and vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, then for each element of the VkRenderingInfo::`pColorAttachments` array with a `resolveImageView` not equal to VK_NULL_HANDLE, the `resolveImageView` must have been created with a sample count equal to the value of `rasterizationSamples` for the bound graphics pipeline

- VUID-vkCmdExecuteGeneratedCommandsNV-pDepthAttachment-11872
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`

- VUID-vkCmdExecuteGeneratedCommandsNV-pStencilAttachment-11873
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`

- VUID-vkCmdExecuteGeneratedCommandsNV-customResolve-11529
  If a shader object is bound to the fragment stage, the current render pass instance was begun with vkCmdBeginRendering, a fragment density map attachment is active, and vkCmdBeginCustomResolveEXT has been called, then the fragment shader object bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_TRUE

- VUID-vkCmdExecuteGeneratedCommandsNV-customResolve-11530
  If a shader object is bound to the fragment stage, the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, a fragment density map attachment is active, and vkCmdBeginCustomResolveEXT has not yet been called, then the fragment shader object bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_FALSE

- VUID-vkCmdExecuteGeneratedCommandsNV-flags-13361
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, then all bound shader objects must have been created with the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit

- VUID-vkCmdExecuteGeneratedCommandsNV-flags-13362
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, then the pipeline layout of the bound descriptor sets must have been created with VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT set

- VUID-vkCmdExecuteGeneratedCommandsNV-flags-13363
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, and any of the descriptor set layouts used to create the pipeline layout of the bound descriptor sets were created with any binding’s VkDescriptorSetLayoutBinding::`stageFlags` set with VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT, then there must be no binding with VkDescriptorSetLayoutBinding::`stageFlags` set with VK_SHADER_STAGE_TASK_BIT_EXT or VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-vkCmdExecuteGeneratedCommandsNV-flags-13364
  If there are any shader objects bound that were created with `flags` that includes both the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR and VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT bits, the pipeline layout of the bound descriptor sets must have been created with VK_PIPELINE_LAYOUT_CREATE_NO_TASK_SHADER_BIT_KHR set

- VUID-vkCmdExecuteGeneratedCommandsNV-flags-13365
  If there are any shader objects bound that were created with `flags` that includes both the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR and VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT bits, there must be no shader object bound to the VK_SHADER_STAGE_TASK_BIT_EXT stage

- VUID-vkCmdExecuteGeneratedCommandsNV-None-04007
  All vertex input bindings accessed via vertex input variables declared in the vertex shader entry point’s interface must have either valid or VK_NULL_HANDLE buffers bound

- VUID-vkCmdExecuteGeneratedCommandsNV-None-04008
  If the `nullDescriptor` feature is not enabled, all vertex input bindings accessed via vertex input variables declared in the vertex shader entry point’s interface must not be VK_NULL_HANDLE

- VUID-vkCmdExecuteGeneratedCommandsNV-None-02721
  If the `robustBufferAccess` feature is not enabled, and that pipeline was created without enabling VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS for `vertexInputs`, then for a given vertex buffer binding, any attribute data fetched must be entirely contained within the corresponding vertex buffer binding, as described in Vertex Input Description

- VUID-vkCmdExecuteGeneratedCommandsNV-format-10389
  For each vertex attribute accessed by this command, if its VkVertexInputAttributeDescription::`format` or VkVertexInputAttributeDescription2EXT::`format` is a packed format, and the `legacyVertexAttributes` feature is not enabled, the value of `attribAddress`, calculated as described in Vertex Input Calculation, must be a multiple of the size of the `format`

- VUID-vkCmdExecuteGeneratedCommandsNV-format-10390
  For each vertex attribute accessed by this command, if its VkVertexInputAttributeDescription::`format` or VkVertexInputAttributeDescription2EXT::`format` is not a packed format, and either the `legacyVertexAttributes` feature is not enabled or `format` has 64-bit components, the value of `attribAddress`, calculated as described in Vertex Input Calculation, must be a multiple of the component size of the `format`

- VUID-vkCmdExecuteGeneratedCommandsNV-None-07842
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY dynamic state enabled then vkCmdSetPrimitiveTopology must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-dynamicPrimitiveTopologyUnrestricted-07500
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY dynamic state enabled and the `dynamicPrimitiveTopologyUnrestricted` is VK_FALSE, then the `primitiveTopology` parameter of `vkCmdSetPrimitiveTopology` must be of the same topology class as the pipeline VkPipelineInputAssemblyStateCreateInfo::`topology` state

- VUID-vkCmdExecuteGeneratedCommandsNV-primitiveTopology-10286
  If a VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage is bound, then the current value of `primitiveTopology` must be VK_PRIMITIVE_TOPOLOGY_PATCH_LIST prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-primitiveTopology-10747
  If vkCmdSetPrimitiveTopology set `primitiveTopology` to VK_PRIMITIVE_TOPOLOGY_PATCH_LIST prior to this drawing command, then a VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage must be bound

- VUID-vkCmdExecuteGeneratedCommandsNV-primitiveTopology-10748
  If vkCmdSetPrimitiveTopology set `primitiveTopology` to VK_PRIMITIVE_TOPOLOGY_POINT_LIST prior to this drawing command, the `maintenance5` feature is not enabled, both a VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT and VK_SHADER_STAGE_GEOMETRY_BIT stage are not bound, then the `Vertex` `Execution` `Model` must have a `PointSize` decorated variable that is statically written to

- VUID-vkCmdExecuteGeneratedCommandsNV-pStrides-04913
  If the bound graphics pipeline was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE dynamic state enabled, but without the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled, then vkCmdBindVertexBuffers2 with a non-`NULL` `pStrides` parameter or vkCmdBindVertexBuffers3KHR with `setStride` set to VK_TRUE must have been called and not subsequently invalidated in the current command buffer prior to this draw command

- VUID-vkCmdExecuteGeneratedCommandsNV-None-13118
  If the bound graphics pipeline was created without the VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE dynamic state enabled, without the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled, and vkCmdBindVertexBuffers3KHR was called and not subsequently invalidated in the current command buffer prior to this draw command, the value of `setStride` in each of its `pBindInfos` elements must have been VK_FALSE

- VUID-vkCmdExecuteGeneratedCommandsNV-None-04914
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled then vkCmdSetVertexInputEXT must have been called and not subsequently invalidated in the current command buffer prior to this draw command

- VUID-vkCmdExecuteGeneratedCommandsNV-Input-07939
  If the `vertexAttributeRobustness` feature is not enabled, and the `maintenance9` feature is not enabled, and there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled then all variables with the `Input` storage class decorated with `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` must contain a location in VkVertexInputAttributeDescription2EXT::`location`

- VUID-vkCmdExecuteGeneratedCommandsNV-Input-08734
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled and either the `legacyVertexAttributes` feature is not enabled or the SPIR-V Type associated with a given `Input` variable of the corresponding `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` is 64-bit, then the numeric type associated with all `Input` variables of the corresponding `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` must be the same as VkVertexInputAttributeDescription2EXT::`format`

- VUID-vkCmdExecuteGeneratedCommandsNV-format-08936
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled and VkVertexInputAttributeDescription2EXT::`format` has a 64-bit component, then the scalar width associated with all `Input` variables of the corresponding `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` must be 64-bit

- VUID-vkCmdExecuteGeneratedCommandsNV-format-08937
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled and the scalar width associated with a `Location` decorated `Input` variable in the `Vertex` `Execution` `Model` `OpEntryPoint` is 64-bit, then the corresponding VkVertexInputAttributeDescription2EXT::`format` must have a 64-bit component

- VUID-vkCmdExecuteGeneratedCommandsNV-None-09203
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled and VkVertexInputAttributeDescription2EXT::`format` has a 64-bit component, then all `Input` variables at the corresponding `Location` in the `Vertex` `Execution` `Model` `OpEntryPoint` must not use components that are not present in the format

- VUID-vkCmdExecuteGeneratedCommandsNV-None-04875
  If there is a shader object bound to the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage or the bound graphics pipeline state was created with both a VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage and the VK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT dynamic state enabled, and the current value of `primitiveTopology` is VK_PRIMITIVE_TOPOLOGY_PATCH_LIST, then vkCmdSetPatchControlPointsEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-None-04879
  If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE dynamic state enabled then vkCmdSetPrimitiveRestartEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-None-09637
  If the `primitiveTopologyListRestart` feature is not enabled, the input assembly is VK_PRIMITIVE_TOPOLOGY_POINT_LIST, VK_PRIMITIVE_TOPOLOGY_LINE_LIST, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY, or VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY, there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE dynamic state enabled, then vkCmdSetPrimitiveRestartEnable must be VK_FALSE

- VUID-vkCmdExecuteGeneratedCommandsNV-None-10909
  If the `primitiveTopologyPatchListRestart` feature is not enabled, the input assembly is VK_PRIMITIVE_TOPOLOGY_PATCH_LIST, there is a shader object bound to the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE dynamic state enabled then vkCmdSetPrimitiveRestartEnable must be VK_FALSE

- VUID-vkCmdExecuteGeneratedCommandsNV-stage-06481
  The bound graphics pipeline must not have been created with the VkPipelineShaderStageCreateInfo::`stage` member of any element of VkGraphicsPipelineCreateInfo::`pStages` set to VK_SHADER_STAGE_TASK_BIT_EXT or VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-vkCmdExecuteGeneratedCommandsNV-None-08885
  There must be no shader object bound to either of the VK_SHADER_STAGE_TASK_BIT_EXT or VK_SHADER_STAGE_MESH_BIT_EXT stages

- VUID-vkCmdExecuteGeneratedCommandsNV-None-07619
  If a shader object is bound to the VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stage or a graphics pipeline is bound which was created with both a VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stage and the VK_DYNAMIC_STATE_TESSELLATION_DOMAIN_ORIGIN_EXT dynamic state enabled, then vkCmdSetTessellationDomainOriginEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsNV-OpExecutionMode-12239
  If a shader is bound to both the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stages, and if both stages contain an `OpExecutionMode` instruction specifying the type of subdivision, they must be the same

- VUID-vkCmdExecuteGeneratedCommandsNV-OpExecutionMode-12240
  If a shader is bound to both the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stages, and if both stages contain an `OpExecutionMode` instruction specifying the orientation of triangles, they must be the same

- VUID-vkCmdExecuteGeneratedCommandsNV-OpExecutionMode-12241
  If a shader is bound to both the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stages, and if both stages contain an `OpExecutionMode` instruction specifying the segment spacing, they must be the same

- VUID-vkCmdExecuteGeneratedCommandsNV-OpExecutionMode-12242
  If a shader is bound to both the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stages, and if both stages contain an `OpExecutionMode` instruction specifying the output patch size, they must be the same

- VUID-vkCmdExecuteGeneratedCommandsNV-commandBuffer-02970
  `commandBuffer` must not be a protected command buffer

- VUID-vkCmdExecuteGeneratedCommandsNV-isPreprocessed-02908
  If `isPreprocessed` is VK_TRUE then vkCmdPreprocessGeneratedCommandsNV must have already been executed on the device, using the same `pGeneratedCommandsInfo` content as well as the content of the input buffers it references (all except VkGeneratedCommandsInfoNV::`preprocessBuffer`). Furthermore, `pGeneratedCommandsInfo`’s `indirectCommandsLayout` must have been created with the VK_INDIRECT_COMMANDS_LAYOUT_USAGE_EXPLICIT_PREPROCESS_BIT_NV bit set

- VUID-vkCmdExecuteGeneratedCommandsNV-pipeline-02909
  VkGeneratedCommandsInfoNV::`pipeline` must match the current bound pipeline at VkGeneratedCommandsInfoNV::`pipelineBindPoint`

- VUID-vkCmdExecuteGeneratedCommandsNV-None-02910
  Transform feedback must not be active

- VUID-vkCmdExecuteGeneratedCommandsNV-deviceGeneratedCommands-02911
  The `VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV`::`deviceGeneratedCommands` feature must be enabled

Valid Usage (Implicit)

- VUID-vkCmdExecuteGeneratedCommandsNV-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdExecuteGeneratedCommandsNV-pGeneratedCommandsInfo-parameter
  `pGeneratedCommandsInfo` must be a valid pointer to a valid VkGeneratedCommandsInfoNV structure

- VUID-vkCmdExecuteGeneratedCommandsNV-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdExecuteGeneratedCommandsNV-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, or VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdExecuteGeneratedCommandsNV-renderpass
  This command must only be called inside of a render pass instance

- VUID-vkCmdExecuteGeneratedCommandsNV-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdExecuteGeneratedCommandsNV-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Inside | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT | Action Indirection

Conditional Rendering

vkCmdExecuteGeneratedCommandsNV is affected by conditional rendering

The `VkGeneratedCommandsInfoNV` is defined as:

    // Provided by VK_NV_device_generated_commands
    typedef struct VkGeneratedCommandsInfoNV {
        VkStructureType                      sType;
        const void*                          pNext;
        VkPipelineBindPoint                  pipelineBindPoint;
        VkPipeline                           pipeline;
        VkIndirectCommandsLayoutNV           indirectCommandsLayout;
        uint32_t                             streamCount;
        const VkIndirectCommandsStreamNV*    pStreams;
        uint32_t                             sequencesCount;
        VkBuffer                             preprocessBuffer;
        VkDeviceSize                         preprocessOffset;
        VkDeviceSize                         preprocessSize;
        VkBuffer                             sequencesCountBuffer;
        VkDeviceSize                         sequencesCountOffset;
        VkBuffer                             sequencesIndexBuffer;
        VkDeviceSize                         sequencesIndexOffset;
    } VkGeneratedCommandsInfoNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `pipelineBindPoint` is the VkPipelineBindPoint used for the `pipeline`.

- `pipeline` is the VkPipeline used in the generation and execution process.

- `indirectCommandsLayout` is the VkIndirectCommandsLayoutNV that provides the command sequence to generate.

- `streamCount` defines the number of input streams

- `pStreams` is a pointer to an array of `streamCount` VkIndirectCommandsStreamNV structures providing the input data for the tokens used in `indirectCommandsLayout`.

- `sequencesCount` is the maximum number of sequences to reserve. If `sequencesCountBuffer` is VK_NULL_HANDLE, this is also the actual number of sequences generated.

- `preprocessBuffer` is the VkBuffer that is used for preprocessing the input data for execution. If this structure is used with vkCmdExecuteGeneratedCommandsNV with its `isPreprocessed` set to VK_TRUE, then the preprocessing step is skipped and data in this buffer will not be modified. The contents and the layout of this buffer are opaque to applications and must not be modified outside functions related to device-generated commands or copied to another buffer for reuse.

- `preprocessOffset` is the byte offset into `preprocessBuffer` where the preprocessed data is stored.

- `preprocessSize` is the maximum byte size within the `preprocessBuffer` after the `preprocessOffset` that is available for preprocessing.

- `sequencesCountBuffer` is a `VkBuffer` in which the actual number of sequences is provided as single `uint32_t` value.

- `sequencesCountOffset` is the byte offset into `sequencesCountBuffer` where the count value is stored.

- `sequencesIndexBuffer` is a `VkBuffer` that encodes the used sequence indices as `uint32_t` array.

- `sequencesIndexOffset` is the byte offset into `sequencesIndexBuffer` where the index values start.

Valid Usage

- VUID-VkGeneratedCommandsInfoNV-pipeline-02912
  The provided `pipeline` must match the pipeline bound at execution time

- VUID-VkGeneratedCommandsInfoNV-indirectCommandsLayout-02913
  If the `indirectCommandsLayout` uses a token of VK_INDIRECT_COMMANDS_TOKEN_TYPE_SHADER_GROUP_NV, then the `pipeline` must have been created with multiple shader groups

- VUID-VkGeneratedCommandsInfoNV-indirectCommandsLayout-02914
  If the `indirectCommandsLayout` uses a token of VK_INDIRECT_COMMANDS_TOKEN_TYPE_SHADER_GROUP_NV, then the `pipeline` must have been created with VK_PIPELINE_CREATE_INDIRECT_BINDABLE_BIT_NV set in `VkGraphicsPipelineCreateInfo`::`flags`

- VUID-VkGeneratedCommandsInfoNV-indirectCommandsLayout-02915
  If the `indirectCommandsLayout` uses a token of VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_NV, then the `pipeline`’s `VkPipelineLayout` must match the VkIndirectCommandsLayoutTokenNV::`pushconstantPipelineLayout`

- VUID-VkGeneratedCommandsInfoNV-streamCount-02916
  `streamCount` must match the `indirectCommandsLayout`’s `streamCount`

- VUID-VkGeneratedCommandsInfoNV-pipelineBindPoint-09084
  If `pipelineBindPoint` is of type VK_PIPELINE_BIND_POINT_COMPUTE, then the `pipeline` must have been created with the flag VK_PIPELINE_CREATE_INDIRECT_BINDABLE_BIT_NV

- VUID-VkGeneratedCommandsInfoNV-pipelineBindPoint-09085
  If `pipelineBindPoint` is of type VK_PIPELINE_BIND_POINT_COMPUTE, then the `pipeline` must have been created with a VkComputePipelineIndirectBufferInfoNV structure specifying a valid address where its metadata will be saved

- VUID-VkGeneratedCommandsInfoNV-pipelineBindPoint-09086
  If `pipelineBindPoint` is of type VK_PIPELINE_BIND_POINT_COMPUTE, then vkCmdUpdatePipelineIndirectBufferNV must have been called on that pipeline to save its metadata to a device address

- VUID-VkGeneratedCommandsInfoNV-pipelineBindPoint-09087
  If `pipelineBindPoint` is of type VK_PIPELINE_BIND_POINT_COMPUTE, and if VK_INDIRECT_COMMANDS_TOKEN_TYPE_PIPELINE_NV is used, then `pipeline` must be VK_NULL_HANDLE

- VUID-VkGeneratedCommandsInfoNV-sequencesCount-02917
  `sequencesCount` must be less or equal to VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV::`maxIndirectSequenceCount` and VkGeneratedCommandsMemoryRequirementsInfoNV::`maxSequencesCount` that was used to determine the `preprocessSize`

- VUID-VkGeneratedCommandsInfoNV-preprocessBuffer-02918
  `preprocessBuffer` must have the VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT bit set in its usage flag

- VUID-VkGeneratedCommandsInfoNV-preprocessOffset-02919
  `preprocessOffset` must be aligned to VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV::`minIndirectCommandsBufferOffsetAlignment`

- VUID-VkGeneratedCommandsInfoNV-preprocessBuffer-02971
  If `preprocessBuffer` is non-sparse then it must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-VkGeneratedCommandsInfoNV-preprocessSize-02920
  `preprocessSize` must be at least equal to the memory requirement’s size returned by vkGetGeneratedCommandsMemoryRequirementsNV using the matching inputs (`indirectCommandsLayout`, …​) as within this structure

- VUID-VkGeneratedCommandsInfoNV-sequencesCountBuffer-02921
  `sequencesCountBuffer` can be set if the actual used count of sequences is sourced from the provided buffer. In that case the `sequencesCount` serves as upper bound

- VUID-VkGeneratedCommandsInfoNV-sequencesCountBuffer-02922
  If `sequencesCountBuffer` is not VK_NULL_HANDLE, its usage flag must have the VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT bit set

- VUID-VkGeneratedCommandsInfoNV-sequencesCountBuffer-02923
  If `sequencesCountBuffer` is not VK_NULL_HANDLE, `sequencesCountOffset` must be aligned to `VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV`::`minSequencesCountBufferOffsetAlignment`

- VUID-VkGeneratedCommandsInfoNV-sequencesCountBuffer-02972
  If `sequencesCountBuffer` is not VK_NULL_HANDLE and is non-sparse then it must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-VkGeneratedCommandsInfoNV-sequencesIndexBuffer-02924
  If `indirectCommandsLayout`’s VK_INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NV is set, `sequencesIndexBuffer` must be set otherwise it must be VK_NULL_HANDLE

- VUID-VkGeneratedCommandsInfoNV-sequencesIndexBuffer-02925
  If `sequencesIndexBuffer` is not VK_NULL_HANDLE, its usage flag must have the VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT bit set

- VUID-VkGeneratedCommandsInfoNV-sequencesIndexBuffer-02926
  If `sequencesIndexBuffer` is not VK_NULL_HANDLE, `sequencesIndexOffset` must be aligned to `VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV`::`minSequencesIndexBufferOffsetAlignment`

- VUID-VkGeneratedCommandsInfoNV-sequencesIndexBuffer-02973
  If `sequencesIndexBuffer` is not VK_NULL_HANDLE and is non-sparse then it must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-VkGeneratedCommandsInfoNV-indirectCommandsLayout-07078
  If the `indirectCommandsLayout` uses a token of VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_TASKS_NV, then the `pipeline` must contain a shader stage using the `MeshNV` `Execution` `Model`

- VUID-VkGeneratedCommandsInfoNV-indirectCommandsLayout-07079
  If the `indirectCommandsLayout` uses a token of VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_NV, then the `pipeline` must contain a shader stage using the `MeshEXT` `Execution` `Model`

Valid Usage (Implicit)

- VUID-VkGeneratedCommandsInfoNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_GENERATED_COMMANDS_INFO_NV

- VUID-VkGeneratedCommandsInfoNV-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkGeneratedCommandsInfoNV-pipelineBindPoint-parameter
  `pipelineBindPoint` must be a valid VkPipelineBindPoint value

- VUID-VkGeneratedCommandsInfoNV-pipeline-parameter
  If `pipeline` is not VK_NULL_HANDLE, `pipeline` must be a valid VkPipeline handle

- VUID-VkGeneratedCommandsInfoNV-indirectCommandsLayout-parameter
  `indirectCommandsLayout` must be a valid VkIndirectCommandsLayoutNV handle

- VUID-VkGeneratedCommandsInfoNV-pStreams-parameter
  `pStreams` must be a valid pointer to an array of `streamCount` valid VkIndirectCommandsStreamNV structures

- VUID-VkGeneratedCommandsInfoNV-preprocessBuffer-parameter
  `preprocessBuffer` must be a valid VkBuffer handle

- VUID-VkGeneratedCommandsInfoNV-sequencesCountBuffer-parameter
  If `sequencesCountBuffer` is not VK_NULL_HANDLE, `sequencesCountBuffer` must be a valid VkBuffer handle

- VUID-VkGeneratedCommandsInfoNV-sequencesIndexBuffer-parameter
  If `sequencesIndexBuffer` is not VK_NULL_HANDLE, `sequencesIndexBuffer` must be a valid VkBuffer handle

- VUID-VkGeneratedCommandsInfoNV-streamCount-arraylength
  `streamCount` must be greater than `0`

- VUID-VkGeneratedCommandsInfoNV-commonparent
  Each of `indirectCommandsLayout`, `pipeline`, `preprocessBuffer`, `sequencesCountBuffer`, and `sequencesIndexBuffer` that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevice

Referencing the functions defined in Indirect Commands Layout, `vkCmdExecuteGeneratedCommandsNV` behaves as:

    uint32_t sequencesCount = sequencesCountBuffer ?
          min(maxSequencesCount, sequencesCountBuffer.load_uint32(sequencesCountOffset) :
          maxSequencesCount;

    cmdProcessAllSequences(commandBuffer, pipeline,
                           indirectCommandsLayout, pIndirectCommandsStreams,
                           sequencesCount,
                           sequencesIndexBuffer, sequencesIndexOffset);

    // The stateful commands within indirectCommandsLayout will not
    // affect the state of subsequent commands in the target
    // command buffer (cmd)

Note | It is important to note that the values of all state related to the `pipelineBindPoint` used are undefined after this command.

Commands can be preprocessed prior execution using the following command:

    // Provided by VK_NV_device_generated_commands
    void vkCmdPreprocessGeneratedCommandsNV(
        VkCommandBuffer                             commandBuffer,
        const VkGeneratedCommandsInfoNV*            pGeneratedCommandsInfo);

- `commandBuffer` is the command buffer which does the preprocessing.

- `pGeneratedCommandsInfo` is a pointer to a VkGeneratedCommandsInfoNV structure containing parameters affecting the preprocessing step.

Valid Usage

- VUID-vkCmdPreprocessGeneratedCommandsNV-commandBuffer-02974
  `commandBuffer` must not be a protected command buffer

- VUID-vkCmdPreprocessGeneratedCommandsNV-pGeneratedCommandsInfo-02927
  `pGeneratedCommandsInfo->indirectCommandsLayout` must have been created with the VK_INDIRECT_COMMANDS_LAYOUT_USAGE_EXPLICIT_PREPROCESS_BIT_NV bit set

- VUID-vkCmdPreprocessGeneratedCommandsNV-deviceGeneratedCommands-02928
  The `VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV`::`deviceGeneratedCommands` feature must be enabled

Valid Usage (Implicit)

- VUID-vkCmdPreprocessGeneratedCommandsNV-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdPreprocessGeneratedCommandsNV-pGeneratedCommandsInfo-parameter
  `pGeneratedCommandsInfo` must be a valid pointer to a valid VkGeneratedCommandsInfoNV structure

- VUID-vkCmdPreprocessGeneratedCommandsNV-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdPreprocessGeneratedCommandsNV-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, or VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdPreprocessGeneratedCommandsNV-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdPreprocessGeneratedCommandsNV-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdPreprocessGeneratedCommandsNV-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT | Action

Conditional Rendering

vkCmdPreprocessGeneratedCommandsNV is not affected by conditional rendering

The bound descriptor sets and push constants that will be used with indirect command generation for the compute pipelines must already be specified at the time of preprocessing commands with vkCmdPreprocessGeneratedCommandsNV. They must not change until the execution of indirect commands is submitted with vkCmdExecuteGeneratedCommandsNV.

If push constants for the compute pipeline are also specified in the VkGeneratedCommandsInfoNV::`indirectCommandsLayout` with VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_NV token, then those values override the push constants that were previously pushed for the compute pipeline.

With `VK_EXT_device_generated_commands`, the actual generation of commands as well as their execution on the device is handled as single action with:

    // Provided by VK_EXT_device_generated_commands
    void vkCmdExecuteGeneratedCommandsEXT(
        VkCommandBuffer                             commandBuffer,
        VkBool32                                    isPreprocessed,
        const VkGeneratedCommandsInfoEXT*           pGeneratedCommandsInfo);

- `commandBuffer` is the command buffer into which the command is recorded.

- `isPreprocessed` represents whether the input data has already been preprocessed on the device. If it is VK_FALSE this command will implicitly trigger the preprocessing step, otherwise not.

- `pGeneratedCommandsInfo` is a pointer to a VkGeneratedCommandsInfoEXT structure containing parameters affecting the generation of commands.

If the VK_INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_EXT flag was used to create the VkGeneratedCommandsInfoEXT::`indirectCommandsLayout` then the execution of sequences through this command may use implementation-defined ordering which is not guaranteed to be coherent using the same input data. It does not affect the order of token processing within a sequence. This is the implied ordering with VK_INDIRECT_COMMANDS_TOKEN_TYPE_DISPATCH_EXT.

After a call to `vkCmdExecuteGeneratedCommandsEXT`, command buffer state will become undefined according to the tokens executed. This table specifies the relationship between tokens used and state invalidation.

Table 52. Indirect Execution State Invalidation
Common Tokens | States Invalidated
--- | ---
VK_INDIRECT_COMMANDS_TOKEN_TYPE_EXECUTION_SET_EXT | Bound shaders and pipelines
VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_EXT | Push constant data
VK_INDIRECT_COMMANDS_TOKEN_TYPE_SEQUENCE_INDEX_EXT | Push constant data
VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_DATA_EXT | Push data
VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_DATA_SEQUENCE_INDEX_EXT | Push data
VK_INDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_EXT | Index buffer
VK_INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_EXT | Vertex buffer

Valid Usage

- VUID-vkCmdExecuteGeneratedCommandsEXT-magFilter-04553
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdExecuteGeneratedCommandsEXT-magFilter-09598
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdExecuteGeneratedCommandsEXT-mipmapMode-04770
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdExecuteGeneratedCommandsEXT-mipmapMode-09599
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdExecuteGeneratedCommandsEXT-unnormalizedCoordinates-09635
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `levelCount` and `layerCount` must be 1

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-08609
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `viewType` must be VK_IMAGE_VIEW_TYPE_1D or VK_IMAGE_VIEW_TYPE_2D

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-08610
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions with `ImplicitLod`, `Dref` or `Proj` in their name

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-08611
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions that includes a LOD bias or any offset values

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-06479
  If a VkImageView is sampled with depth comparison, the image view’s format features must contain VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-02691
  If a VkImageView is accessed using atomic operations as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-07888
  If a VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER descriptor is accessed using atomic operations as a result of this command, then the storage texel buffer’s format features must contain VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-02692
  If a VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-02693
  If the VK_EXT_filter_cubic extension is not enabled and any VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, it must not have a VkImageViewType of VK_IMAGE_VIEW_TYPE_3D, VK_IMAGE_VIEW_TYPE_CUBE, or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY

- VUID-vkCmdExecuteGeneratedCommandsEXT-filterCubic-02694
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have a VkImageViewType and format that supports cubic filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubic` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdExecuteGeneratedCommandsEXT-filterCubicMinmax-02695
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX as a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubicMinmax` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdExecuteGeneratedCommandsEXT-cubicRangeClamp-09212
  If the `cubicRangeClamp` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must not have a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM

- VUID-vkCmdExecuteGeneratedCommandsEXT-reductionMode-09213
  Any VkImageView being sampled with a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM as a result of this command must sample with VK_FILTER_CUBIC_EXT

- VUID-vkCmdExecuteGeneratedCommandsEXT-selectableCubicWeights-09214
  If the `selectableCubicWeights` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have VkSamplerCubicWeightsCreateInfoQCOM::`cubicWeights` equal to VK_CUBIC_FILTER_WEIGHTS_CATMULL_ROM_QCOM

- VUID-vkCmdExecuteGeneratedCommandsEXT-flags-02696
  Any VkImage created with a VkImageCreateInfo::`flags` containing VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV sampled as a result of this command must only be sampled using a VkSamplerAddressMode of VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdExecuteGeneratedCommandsEXT-OpTypeImage-07027
  For any VkImageView being written as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdExecuteGeneratedCommandsEXT-OpTypeImage-07028
  For any VkImageView being read as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdExecuteGeneratedCommandsEXT-OpTypeImage-07029
  For any VkBufferView being written as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown`, the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdExecuteGeneratedCommandsEXT-OpTypeImage-07030
  Any VkBufferView being read as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown` then the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-08600
  If a a bound shader was created with a pipeline layout and statically uses a set n, a descriptor set must have been bound to n at the same pipeline bind point, with layouts compatible for set n with the layout(s) used to create the shader, as described in Pipeline Layout Compatibility

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-08601
  If a a bound shader was created with a pipeline layout or specified push constant ranges and statically uses a push constant value, that value must have been set for the same pipeline bind point, with push constant ranges that are compatible with the push constant range used to create the shader

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-10068
  For each array of resources that is used by a bound shader, the indices used to access members of the array must be less than the descriptor count for the identified binding in the descriptor sets used by this command

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-08114
  Descriptors in each bound descriptor set, specified via vkCmdBindDescriptorSets, must be valid if they are accessed as described by descriptor validity by the VkPipeline bound to the pipeline bind point used by this command and the bound VkPipeline was not created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdExecuteGeneratedCommandsEXT-imageLayout-00344
  If an image descriptor is accessed by a shader, the VkImageLayout must match the subresource accessible from the VkImageView as defined by the image layout matching rules

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-08115
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdBindDescriptorSets, the bound VkPipeline must have been created without VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-08116
  Descriptors in bound descriptor buffers, specified via vkCmdSetDescriptorBufferOffsetsEXT, must be valid if they are dynamically accessed

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-08117
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdSetDescriptorBufferOffsetsEXT, the bound VkPipeline must have been created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-08119
  If a descriptor is dynamically used with a VkPipeline created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-08605
  If a descriptor is dynamically used with a VkShaderEXT created with a `VkDescriptorSetLayout` that was created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-08606
  If the `shaderObject` feature is not enabled, a valid pipeline must be bound to the pipeline bind point used by this command

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-08608
  If a pipeline is bound to the pipeline bind point used by this command, there must not have been any calls to dynamic state setting commands for any state specified statically in the VkPipeline object bound to the pipeline bind point used by this command, since that pipeline was bound

- VUID-vkCmdExecuteGeneratedCommandsEXT-uniformBuffers-06935
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-08612
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdExecuteGeneratedCommandsEXT-storageBuffers-06936
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-08613
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a storage buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdExecuteGeneratedCommandsEXT-commandBuffer-02707
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, any resource accessed by bound shaders must not be a protected resource

- VUID-vkCmdExecuteGeneratedCommandsEXT-viewType-07752
  If a VkImageView is accessed as a result of this command, then the image view’s `viewType` must match the `Dim` operand of the `OpTypeImage` as described in Compatibility Between SPIR-V Image Dimensions and Vulkan ImageView Types

- VUID-vkCmdExecuteGeneratedCommandsEXT-format-07753
  If a VkImageView or VkBufferView is accessed as a result of this command, then the numeric type of the view’s `format` and the `Sampled` `Type` operand of the `OpTypeImage` must match

- VUID-vkCmdExecuteGeneratedCommandsEXT-OpImageWrite-08795
  If a VkImageView created with a format other than VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the image view’s format

- VUID-vkCmdExecuteGeneratedCommandsEXT-OpImageWrite-08796
  If a VkImageView created with the format VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have four components

- VUID-vkCmdExecuteGeneratedCommandsEXT-OpImageWrite-04469
  If a VkBufferView is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the buffer view’s format

- VUID-vkCmdExecuteGeneratedCommandsEXT-SampledType-04470
  If a VkImageView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdExecuteGeneratedCommandsEXT-SampledType-04471
  If a VkImageView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdExecuteGeneratedCommandsEXT-SampledType-04472
  If a VkBufferView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdExecuteGeneratedCommandsEXT-SampledType-04473
  If a VkBufferView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdExecuteGeneratedCommandsEXT-sparseImageInt64Atomics-04474
  If the `sparseImageInt64Atomics` feature is not enabled, VkImage objects created with the VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdExecuteGeneratedCommandsEXT-sparseImageInt64Atomics-04475
  If the `sparseImageInt64Atomics` feature is not enabled, VkBuffer objects created with the VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdExecuteGeneratedCommandsEXT-OpImageSampleWeightedQCOM-06971
  If `OpImageSampleWeightedQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_SAMPLED_IMAGE_BIT_QCOM

- VUID-vkCmdExecuteGeneratedCommandsEXT-OpImageSampleWeightedQCOM-06972
  If `OpImageSampleWeightedQCOM` uses a VkImageView as a sample weight image as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_IMAGE_BIT_QCOM

- VUID-vkCmdExecuteGeneratedCommandsEXT-OpImageBoxFilterQCOM-06973
  If `OpImageBoxFilterQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BOX_FILTER_SAMPLED_BIT_QCOM

- VUID-vkCmdExecuteGeneratedCommandsEXT-OpImageBlockMatchSSDQCOM-06974
  If `OpImageBlockMatchSSDQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdExecuteGeneratedCommandsEXT-OpImageBlockMatchSADQCOM-12420
  If `OpImageBlockMatchSADQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdExecuteGeneratedCommandsEXT-OpImageBlockMatchSADQCOM-06976
  If `OpImageBlockMatchSADQCOM` or OpImageBlockMatchSSDQCOM is used to read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdExecuteGeneratedCommandsEXT-OpImageSampleWeightedQCOM-06977
  If `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdExecuteGeneratedCommandsEXT-OpImageSampleWeightedQCOM-06978
  If any command other than `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must not have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdExecuteGeneratedCommandsEXT-OpImageBlockMatchWindow-09215
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM

- VUID-vkCmdExecuteGeneratedCommandsEXT-OpImageBlockMatchWindow-09216
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format must be a single-component format

- VUID-vkCmdExecuteGeneratedCommandsEXT-OpImageBlockMatchWindow-09217
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdExecuteGeneratedCommandsEXT-OpImageBlockMatchWindow-12421
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the `blockMatchExtendedClampToEdge` feature is not enabled, the input sampler must not have been created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdExecuteGeneratedCommandsEXT-addressModeU-12422
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the input sampler was created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, then the sampler must have been created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-07288
  Any shader invocation executed by this command must terminate

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-09600
  If a descriptor with type equal to any of VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, or VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT is accessed as a result of this command, all image subresources identified by that descriptor must be in the image layout identified when the descriptor was written

- VUID-vkCmdExecuteGeneratedCommandsEXT-micromap-11636
  If an acceleration structure is accessed as a result of this command through an `OpRayQueryProceedKHR` operation , the `VK_EXT_opacity_micromap` extension is not enabled, and the acceleration structure is built using geometry with a VkAccelerationStructureTrianglesOpacityMicromapKHR structure included in its `pNext` chain, the shader must have specified a `OpacityMicromapIdKHR` execution mode with its specialization constant operand equal to VK_TRUE

- VUID-vkCmdExecuteGeneratedCommandsEXT-micromap-11637
  If an acceleration structure is accessed as a result of this command and the acceleration structure was constructed through deserialization, all micromap arrays referenced by the acceleration structure that were not replaced by an acceleration structure update command must have been deserialized using the serialized data of the corresponding micromaps used to originally build the acceleration structure prior to the execution of this command on the device

- VUID-vkCmdExecuteGeneratedCommandsEXT-micromap-11638
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkPipeline bound to the pipeline bind point used by this command must not have been created with `flags` that includes VK_PIPELINE_CREATE_2_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_KHR

- VUID-vkCmdExecuteGeneratedCommandsEXT-micromap-11639
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkShaderEXT that accessed the descriptor must not have been created with `flags` that includes VK_SHADER_CREATE_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_EXT

- VUID-vkCmdExecuteGeneratedCommandsEXT-commandBuffer-10746
  The `VkDeviceMemory` object allocated from a `VkMemoryHeap` with the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property that is bound to a resource accessed as a result of this command must be the active bound tile memory object in `commandBuffer`

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-10678
  If this command is recorded inside a tile shading render pass instance, the stages corresponding to the pipeline bind point used by this command must only include VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_FRAGMENT_BIT, and/or VK_SHADER_STAGE_COMPUTE_BIT

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-10679
  If this command is recorded where per-tile execution model is enabled, there must be no access to any image while the image was be transitioned to the VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT layout

- VUID-vkCmdExecuteGeneratedCommandsEXT-pDescription-09900
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the underlying VkTensorARM object must have been created with the VK_TENSOR_USAGE_SHADER_BIT_ARM usage flag set

- VUID-vkCmdExecuteGeneratedCommandsEXT-dimensionCount-09905
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the `Rank` of the `OpTypeTensorARM` of the tensor resource variable must be equal to the `dimensionCount` provided via VkTensorCreateInfoARM::`pDescription` when creating the underlying VkTensorARM object

- VUID-vkCmdExecuteGeneratedCommandsEXT-OpTypeTensorARM-09906
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the element type of the `OpTypeTensorARM` of the tensor resource variable must be compatible with the VkFormat of the VkTensorViewARM used for the access

- VUID-vkCmdExecuteGeneratedCommandsEXT-OpTensorReadARM-12462
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, using `OpTensorReadARM` or `OpTensorWriteARM`, and the underlying VkTensorARM object was created with a VK_TENSOR_TILING_BRICK_16_WIDE_ARM, VK_TENSOR_TILING_BRICK_8_WIDE_ARM, VK_TENSOR_TILING_BRICK_4_WIDE_ARM, VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_ARM, or VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_64K_ARM VkTensorTilingARM, and the object read or written is an array, then the innermost coordinate provided to `OpTensorReadARM` or `OpTensorWriteARM` via the `Coordinates` operand must be a multiple of the largest power of 2 that is less than or equal to the number of components of the array

- VUID-vkCmdExecuteGeneratedCommandsEXT-pNext-12463
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command and the corresponding VkTensorARM object was created with a VkTensorRollingBackingCreateInfoARM structure in the `pNext` chain of VkTensorCreateInfoARM, then the number of elements accessed with one `OpTensorReadARM` or `OpTensorWriteARM`, must be less than or equal to the number of elements available from the starting coordinate in the rolling backing along the innermost dimension, defined as `wraps`[`dimensionCount` - 1] - InnermostCoordinate % `wraps`[`dimensionCount` - 1] where InnermostCoordinate is the last component of the coordinates array provided via the `Coordinates` operand

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-12472
  Descriptors dynamically accessed in bound descriptor heaps must be valid

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-11297
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a `OpTypeStruct` decorated with `Block` or `BufferBlock` using that mapping, the calculated offset for the resource heap must be a multiple of `bufferDescriptorAlignment`

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-11298
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeImage` or `OpTypeSampledImage` using that mapping, the calculated offset for the resource heap must be a multiple of `imageDescriptorAlignment`

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-11299
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeSampler` or `OpTypeSampledImage` using that mapping, the calculated offset for the sampler heap must be a multiple of `samplerDescriptorAlignment`

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-11397
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeTensorARM` using that mapping, the calculated offset for the resource heap must be a multiple of `tensorDescriptorAlignment`

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-11300
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 4

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-11301
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-11302
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-11304
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 8

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-11305
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-11306
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address pointed to by the address in push data must be a valid VkDeviceAddress

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-11308
  For each descriptor heap that is statically used by a bound shader, either directly or via a descriptor mapping, a valid descriptor heap must be bound

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-11309
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, execution of this command must not result in any descriptor read accessing data outside of the user range of the respective heap bound by `vkCmdBind*HeapEXT` commands

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-11372
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer or uniform texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified via VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-11373
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer or storage texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-11374
  If the `robustBufferAccess2` feature is not enabled, the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, uniform texel buffer, storage buffer, or storage texel buffer, that shader must not access values outside of the range of the buffer as specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdExecuteGeneratedCommandsEXT-pBindInfo-11375
  If any bound shader uses an embedded sampler via a descriptor mapping, the value of `pBindInfo->reservedRangeSize` set for vkCmdBindSamplerHeapEXT must be greater than or equal to `minSamplerHeapReservedRangeWithEmbedded`

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-11376
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, and that shader statically uses a push constant value, that value must have been set by vkCmdPushDataEXT

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-11398
  If a bound shader was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the access must not be out of bounds

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-11437
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the buffer from which the address in push data was queried must have been created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-11438
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-11441
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must be aligned to `minUniformBufferOffsetAlignment`

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-11439
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_STORAGE_BUFFER_BIT usage flag set

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-11442
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must be aligned to `minStorageBufferOffsetAlignment`

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-11485
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses an acceleration structure using that mapping, the address that the acceleration structure is mapped to must be an acceleration structure address retrieved from a VkAccelerationStructureKHR object via vkGetAccelerationStructureDeviceAddressKHR or handle retrieved from a VkAccelerationStructureNV object via vkGetAccelerationStructureHandleNV

- VUID-vkCmdExecuteGeneratedCommandsEXT-index-11450
  If a shader uses a sampler descriptor to sample an image as a result of this command, and that sampler descriptor uses a custom border color with an index defined by VkSamplerCustomBorderColorIndexCreateInfoEXT, the value of VkSamplerCustomBorderColorIndexCreateInfoEXT::`index` must have been registered before this command was recorded, and still be registered during the sampling operation, with an identically defined color

- VUID-vkCmdExecuteGeneratedCommandsEXT-protectedNoFault-11455
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, the address that the resource is mapped to must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdExecuteGeneratedCommandsEXT-protectedNoFault-11456
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, the address of the indirect memory must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdExecuteGeneratedCommandsEXT-renderPass-02684
  The current render pass must be compatible with the `renderPass` member of the `VkGraphicsPipelineCreateInfo` structure specified when creating the `VkPipeline` bound to VK_PIPELINE_BIND_POINT_GRAPHICS

- VUID-vkCmdExecuteGeneratedCommandsEXT-subpass-02685
  The subpass index of the current render pass must be equal to the `subpass` member of the `VkGraphicsPipelineCreateInfo` structure specified when creating the `VkPipeline` bound to VK_PIPELINE_BIND_POINT_GRAPHICS

- VUID-vkCmdExecuteGeneratedCommandsEXT-OpTypeImage-07468
  If any shader executed by this pipeline accesses an `OpTypeImage` variable with a `Dim` operand of `SubpassData`, it must be decorated with an `InputAttachmentIndex` that corresponds to a valid input attachment in the current subpass

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-07469
  Input attachment views accessed in a subpass must be created with the same VkFormat as the corresponding subpass definition, and be created with a VkImageView that is compatible with the attachment referenced by the subpass' `pInputAttachments`[`InputAttachmentIndex`] in the bound VkFramebuffer as specified by Fragment Input Attachment Compatibility

- VUID-vkCmdExecuteGeneratedCommandsEXT-pDepthInputAttachmentIndex-09595
  Input attachment views accessed in a dynamic render pass with a `InputAttachmentIndex` referenced by VkRenderingInputAttachmentIndexInfo, or no `InputAttachmentIndex` if VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` or VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` are `NULL`, must be created with a VkImageView that is compatible with the corresponding color, depth, or stencil attachment in VkRenderingInfo

- VUID-vkCmdExecuteGeneratedCommandsEXT-pDepthInputAttachmentIndex-09596
  Input attachment views accessed in a dynamic render pass via a shader object must have an `InputAttachmentIndex` if both VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` and VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` are non-`NULL`

- VUID-vkCmdExecuteGeneratedCommandsEXT-InputAttachmentIndex-09597
  If an input attachment view accessed in a dynamic render pass via a shader object has an `InputAttachmentIndex`, the `InputAttachmentIndex` must match an index in VkRenderingInputAttachmentIndexInfo

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-06537
  Memory backing image subresources used as attachments in the current render pass must not be written in any way other than as an attachment by this command

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-10795
  If a color attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_COLOR_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-10796
  If a depth attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_DEPTH_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-10797
  If a stencil attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, and feedback loop is not enabled for VK_IMAGE_ASPECT_STENCIL_BIT on that attachment, it must not be accessed in any way other than as an attachment by this command

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-12338
  If a color attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_COLOR_BIT on that attachment, the color attachment must not be written to by this command

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-12339
  If a depth attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_DEPTH_BIT on that attachment, the depth attachment must not be written to by this command

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-12340
  If a stencil attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, and feedback loop is not enabled for VK_IMAGE_ASPECT_STENCIL_BIT on that attachment, the stencil attachment must not be written to by this command

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-09003
  If an attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, it must not be accessed in any way other than as an attachment, storage image, or sampled image by this command

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-06886
  If the current render pass instance uses a depth/stencil attachment with a read-only layout for the depth aspect, depth writes must be disabled

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-06887
  If the current render pass instance uses a depth/stencil attachment with a read-only layout for the stencil aspect, both front and back `writeMask` are not zero, and stencil test is enabled, all stencil ops must be VK_STENCIL_OP_KEEP

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-07831
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT dynamic state enabled then vkCmdSetViewport must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-07832
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SCISSOR dynamic state enabled then vkCmdSetScissor must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-08617
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_WIDTH dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineWidth must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-07834
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BIAS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthBiasEnable` is VK_TRUE, then vkCmdSetDepthBias or vkCmdSetDepthBias2EXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-07835
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_BLEND_CONSTANTS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and an active color attachment current value of `blendEnable` is VK_TRUE with a blend equations where any VkBlendFactor member is VK_BLEND_FACTOR_CONSTANT_COLOR, VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR, VK_BLEND_FACTOR_CONSTANT_ALPHA, or VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA, then vkCmdSetBlendConstants must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-07836
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BOUNDS dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthBoundsTestEnable` is VK_TRUE, then vkCmdSetDepthBounds must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-07837
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilCompareMask must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-07838
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_WRITE_MASK dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilWriteMask must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-07839
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_REFERENCE dynamic state enabled, the current value of and `rasterizerDiscardEnable` is VK_FALSE, the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilReference must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsEXT-maxMultiviewInstanceIndex-02688
  If the draw is recorded in a render pass instance with multiview enabled, the maximum instance index must be less than or equal to VkPhysicalDeviceMultiviewProperties::`maxMultiviewInstanceIndex`

- VUID-vkCmdExecuteGeneratedCommandsEXT-sampleLocationsEnable-02689
  If the bound graphics pipeline was created with VkPipelineSampleLocationsStateCreateInfoEXT::`sampleLocationsEnable` set to VK_TRUE, then the active depth attachment must have been created with the VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit set

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-07634
  If the `VK_EXT_sample_locations` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetSampleLocationsEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-06666
  If the `VK_EXT_sample_locations` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `sampleLocationsEnable` is VK_TRUE, then vkCmdSetSampleLocationsEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-07840
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_CULL_MODE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCullMode must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-07841
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRONT_FACE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetFrontFace must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-07843
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, vkCmdSetDepthTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-07844
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthTestEnable` is VK_TRUE, then vkCmdSetDepthWriteEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-07845
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_COMPARE_OP dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `depthTestEnable` is VK_TRUE, then vkCmdSetDepthCompareOp must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-07846
  If the `depthBounds` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthBoundsTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-07847
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetStencilTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-07848
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_OP dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, the current value of `stencilTestEnable` is VK_TRUE, then vkCmdSetStencilOp must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsEXT-viewportCount-03417
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, and the state is not inherited, then vkCmdSetViewportWithCount must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsEXT-scissorCount-03418
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT dynamic state enabled, and the state is not inherited, then vkCmdSetScissorWithCount must have been called and not subsequently invalidated in the current command buffer prior to this drawing

- VUID-vkCmdExecuteGeneratedCommandsEXT-viewportCount-03419
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with both the VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic states enabled, and the state is not inherited, then the `viewportCount` parameter of `vkCmdSetViewportWithCount` must match the `scissorCount` parameter of `vkCmdSetScissorWithCount`

- VUID-vkCmdExecuteGeneratedCommandsEXT-viewportCount-04137
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportWScalingStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdExecuteGeneratedCommandsEXT-viewportCount-04138
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, the current value of `viewportWScalingEnable` is VK_TRUE, then vkCmdSetViewportWScalingNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-08636
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, the current value of `viewportWScalingEnable` is VK_TRUE, then the `viewportCount` parameter in the last call to vkCmdSetViewportWScalingNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdExecuteGeneratedCommandsEXT-viewportCount-04139
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportShadingRateImageStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdExecuteGeneratedCommandsEXT-shadingRateImage-09233
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_COARSE_SAMPLE_ORDER_NV and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoarseSampleOrderNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsEXT-shadingRateImage-09234
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `shadingRateImageEnable` is VK_TRUE, then vkCmdSetViewportShadingRatePaletteNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-08637
  If the `shadingRateImage` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `shadingRateImageEnable` is VK_TRUE, then the `viewportCount` parameter in the last call to vkCmdSetViewportShadingRatePaletteNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdExecuteGeneratedCommandsEXT-VkPipelineVieportCreateInfo-04141
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled and a VkPipelineViewportSwizzleStateCreateInfoNV structure chained from VkPipelineViewportStateCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportSwizzleStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdExecuteGeneratedCommandsEXT-VkPipelineVieportCreateInfo-04142
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled and a VkPipelineViewportExclusiveScissorStateCreateInfoNV structure chained from VkPipelineViewportStateCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportExclusiveScissorStateCreateInfoNV::`exclusiveScissorCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-07878
  If the `exclusiveScissor` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_ENABLE_NV dynamic state enabled, then vkCmdSetExclusiveScissorEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-07879
  If the `exclusiveScissor` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_NV dynamic state enabled, and the most recent call to vkCmdSetExclusiveScissorEnableNV in the current command buffer set any element of `pExclusiveScissorEnables` to VK_TRUE, then vkCmdSetExclusiveScissorNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-04876
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE dynamic state enabled, then vkCmdSetRasterizerDiscardEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-04877
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthBiasEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsEXT-logicOp-04878
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LOGIC_OP_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `logicOpEnable` is VK_TRUE, then vkCmdSetLogicOpEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsEXT-primitiveFragmentShadingRateWithMultipleViewports-04552
  If the `primitiveFragmentShadingRateWithMultipleViewports` limit is not supported, the bound graphics pipeline was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, and any of the shader stages of the bound graphics pipeline write to the `PrimitiveShadingRateKHR` built-in, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and the `viewportCount` parameter of `vkCmdSetViewportWithCount` must be `1`

- VUID-vkCmdExecuteGeneratedCommandsEXT-primitiveFragmentShadingRateWithMultipleViewports-08642
  If the `primitiveFragmentShadingRateWithMultipleViewports` limit is not supported, and any shader object bound to a graphics stage writes to the `PrimitiveShadingRateKHR` built-in, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and the `viewportCount` parameter of `vkCmdSetViewportWithCount` must be `1`

- VUID-vkCmdExecuteGeneratedCommandsEXT-blendEnable-04727
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, then for each color attachment, if the corresponding image view’s format features do not contain VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT, then the corresponding current value of `blendEnable` must be VK_FALSE

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-08644
  If a shader object is bound to any graphics stage or a graphics pipeline is bound, the current value of `rasterizerDiscardEnable` is VK_FALSE, and none of the following is enabled:

  - the `VK_AMD_mixed_attachment_samples` extension

  - the `VK_NV_framebuffer_mixed_samples` extension

  - the `multisampledRenderToSingleSampled` feature

  then the current value of `rasterizationSamples` must be the same as the current color and/or depth/stencil attachments

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-08876
  If a shader object is bound to any graphics stage, the current render pass instance must have been begun with vkCmdBeginRendering

- VUID-vkCmdExecuteGeneratedCommandsEXT-imageView-06172
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdExecuteGeneratedCommandsEXT-imageView-06173
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdExecuteGeneratedCommandsEXT-imageView-06174
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdExecuteGeneratedCommandsEXT-imageView-06175
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdExecuteGeneratedCommandsEXT-imageView-06176
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pDepthAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pDepthAttachment` is VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, this command must not write any values to the depth attachment

- VUID-vkCmdExecuteGeneratedCommandsEXT-imageView-06177
  If the current render pass instance was begun with vkCmdBeginRendering, the `imageView` member of `pStencilAttachment` is not VK_NULL_HANDLE, and the `layout` member of `pStencilAttachment` is VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment

- VUID-vkCmdExecuteGeneratedCommandsEXT-viewMask-06178
  If the current render pass instance was begun with vkCmdBeginRendering, the bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::`viewMask` equal to VkRenderingInfo::`viewMask`

- VUID-vkCmdExecuteGeneratedCommandsEXT-colorAttachmentCount-06179
  If the `dynamicRenderingUnusedAttachments` feature is not enabled and the current render pass instance was begun with vkCmdBeginRendering, the bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::`colorAttachmentCount` equal to VkRenderingInfo::`colorAttachmentCount`

- VUID-vkCmdExecuteGeneratedCommandsEXT-dynamicRenderingUnusedAttachments-08910
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound graphics pipeline

- VUID-vkCmdExecuteGeneratedCommandsEXT-dynamicRenderingUnusedAttachments-08912
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` equal to VK_NULL_HANDLE must have the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound pipeline equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdExecuteGeneratedCommandsEXT-dynamicRenderingUnusedAttachments-08911
  If the `dynamicRenderingUnusedAttachments` feature is enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `imageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the bound graphics pipeline, or the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats`, if it exists, must be VK_FORMAT_UNDEFINED

- VUID-vkCmdExecuteGeneratedCommandsEXT-colorAttachmentCount-09362
  If the current render pass instance was begun with vkCmdBeginRendering, with a VkRenderingInfo::`colorAttachmentCount` equal to `1`, there is no shader object bound to any graphics stage, and a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, each element of the VkRenderingInfo::`pColorAttachments` array with a `resolveImageView` not equal to VK_NULL_HANDLE must have been created with an image created with a VkExternalFormatANDROID::`externalFormat` value equal to the VkExternalFormatANDROID::`externalFormat` value used to create the bound graphics pipeline

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-09363
  If there is no shader object bound to any graphics stage, the current render pass instance was begun with vkCmdBeginRendering and a VkRenderingInfo::`colorAttachmentCount` equal to `1`, and a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with an image created with a VkExternalFormatANDROID::`externalFormat` value equal to the VkExternalFormatANDROID::`externalFormat` value used to create the bound graphics pipeline

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-09364
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetColorBlendEnableEXT must have set the blend enable to VK_FALSE prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-09365
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetRasterizationSamplesEXT must have set `rasterizationSamples` to VK_SAMPLE_COUNT_1_BIT prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-09368
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetFragmentShadingRateKHR must have set `pFragmentSize->width` to `1` prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-09369
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, the current render pass instance was begun with vkCmdBeginRendering, and it includes a color attachment that uses the VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID resolve mode, then the last call to vkCmdSetFragmentShadingRateKHR must have set `pFragmentSize->height` to `1` prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-07749
  If the `colorWriteEnable` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorWriteEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsEXT-attachmentCount-07750
  If the `colorWriteEnable` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the `attachmentCount` parameter of most recent call to `vkCmdSetColorWriteEnableEXT` in the current command buffer must be greater than or equal to the number of active color attachments

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-07751
  If the `VK_EXT_discard_rectangles` extension is enabled, a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT dynamic state enabled and the `pNext` chain of VkGraphicsPipelineCreateInfo included a VkPipelineDiscardRectangleStateCreateInfoEXT structure, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for each discard rectangle in VkPipelineDiscardRectangleStateCreateInfoEXT::`discardRectangleCount`

- VUID-vkCmdExecuteGeneratedCommandsEXT-rasterizerDiscardEnable-09236
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT dynamic state enabled and the `pNext` chain of VkGraphicsPipelineCreateInfo did not include a VkPipelineDiscardRectangleStateCreateInfoEXT structure, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for each discard rectangle in VkPhysicalDeviceDiscardRectanglePropertiesEXT::`maxDiscardRectangles`

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-07880
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDiscardRectangleEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-07881
  If the `VK_EXT_discard_rectangles` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_MODE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `discardRectangleEnable` is VK_TRUE, then vkCmdSetDiscardRectangleModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsEXT-dynamicRenderingUnusedAttachments-08913
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->imageView` was VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdExecuteGeneratedCommandsEXT-dynamicRenderingUnusedAttachments-08914
  If current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdExecuteGeneratedCommandsEXT-dynamicRenderingUnusedAttachments-08915
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, and the value of VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->imageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdExecuteGeneratedCommandsEXT-dynamicRenderingUnusedAttachments-08916
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->imageView` was VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdExecuteGeneratedCommandsEXT-dynamicRenderingUnusedAttachments-08917
  If current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdExecuteGeneratedCommandsEXT-dynamicRenderingUnusedAttachments-08918
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, and the value of VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->imageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdExecuteGeneratedCommandsEXT-imageView-06183
  If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentShadingRateAttachmentInfoKHR::`imageView` was not VK_NULL_HANDLE, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

- VUID-vkCmdExecuteGeneratedCommandsEXT-dynamicRenderingLocalRead-11797
  If the current render pass instance was begun with vkCmdBeginRendering, the `dynamicRenderingLocalRead` feature is enabled, the VK_RENDERING_LOCAL_READ_CONCURRENT_ACCESS_CONTROL_BIT_KHR flag is specified, and an attachment is being used as a feedback loop as specified by VK_RENDERING_ATTACHMENT_INPUT_ATTACHMENT_FEEDBACK_BIT_KHR, VkRenderingAttachmentFlagsInfoKHR::`flags` for that attachment must include VK_RENDERING_ATTACHMENT_INPUT_ATTACHMENT_FEEDBACK_BIT_KHR

- VUID-vkCmdExecuteGeneratedCommandsEXT-imageView-06184
  If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentDensityMapAttachmentInfoEXT::`imageView` was not VK_NULL_HANDLE, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT

- VUID-vkCmdExecuteGeneratedCommandsEXT-layers-10831
  If the current render pass instance was created with VK_RENDERING_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE or VK_RENDER_PASS_CREATE_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE, and the bound graphics pipeline was created with VK_PIPELINE_CREATE_2_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE, then the current render pass instance must have a `layers` value less than or equal to VkPipelineFragmentDensityMapLayeredCreateInfoVALVE::`maxFragmentDensityMapLayers`

- VUID-vkCmdExecuteGeneratedCommandsEXT-colorAttachmentCount-06185
  If the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with a sample count equal to the corresponding element of the `pColorAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline

- VUID-vkCmdExecuteGeneratedCommandsEXT-pDepthAttachment-06186
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of the `depthStencilAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdExecuteGeneratedCommandsEXT-pStencilAttachment-06187
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of the `depthStencilAttachmentSamples` member of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdExecuteGeneratedCommandsEXT-multisampledRenderToSingleSampled-07285
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with a `imageView` not equal to VK_NULL_HANDLE must have been created with a sample count equal to the value of `rasterizationSamples` for the bound graphics pipeline

- VUID-vkCmdExecuteGeneratedCommandsEXT-multisampledRenderToSingleSampled-07286
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->imageView`

- VUID-vkCmdExecuteGeneratedCommandsEXT-multisampledRenderToSingleSampled-07287
  If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the `multisampledRenderToSingleSampled` feature is not enabled, and vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, and VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->imageView`

- VUID-vkCmdExecuteGeneratedCommandsEXT-pNext-07935
  If this command is called inside a render pass instance started with vkCmdBeginRendering, and the `pNext` chain of VkRenderingInfo includes a VkMultisampledRenderToSingleSampledInfoEXT structure with `multisampledRenderToSingleSampledEnable` equal to VK_TRUE, then the value of `rasterizationSamples` for the bound graphics pipeline must be equal to VkMultisampledRenderToSingleSampledInfoEXT::`rasterizationSamples`

- VUID-vkCmdExecuteGeneratedCommandsEXT-renderPass-06198
  If the current render pass instance was begun with vkCmdBeginRendering, the bound pipeline must have been created with a VkGraphicsPipelineCreateInfo::`renderPass` equal to VK_NULL_HANDLE

- VUID-vkCmdExecuteGeneratedCommandsEXT-pColorAttachments-08963
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound with a fragment shader that statically writes to a color attachment, the color write mask is not zero, color writes are enabled, and the corresponding element of the VkRenderingInfo::`pColorAttachments->imageView` was not VK_NULL_HANDLE, then the corresponding element of VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdExecuteGeneratedCommandsEXT-pColorAttachments-11539
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound with a fragment shader that statically writes to a color attachment, the color write mask is not zero, color writes are enabled, and the corresponding element of the VkRenderingInfo::`pColorAttachments->resolveImageView` was not VK_NULL_HANDLE, then the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdExecuteGeneratedCommandsEXT-pDepthAttachment-08964
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound, depth test is enabled, and the VkRenderingInfo::`pDepthAttachment->imageView` was not VK_NULL_HANDLE, then the VkPipelineRenderingCreateInfo::`depthAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdExecuteGeneratedCommandsEXT-pDepthAttachment-11540
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound, depth test is enabled, and the VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, then the VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdExecuteGeneratedCommandsEXT-pStencilAttachment-08965
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has not yet been recorded in the render pass instance, there is a graphics pipeline bound, stencil test is enabled and the VkRenderingInfo::`pStencilAttachment->imageView` was not VK_NULL_HANDLE, then the VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdExecuteGeneratedCommandsEXT-pStencilAttachment-11860
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, there is a graphics pipeline bound, stencil test is enabled and the VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, then the VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the pipeline must not be VK_FORMAT_UNDEFINED

- VUID-vkCmdExecuteGeneratedCommandsEXT-flags-10582
  If the current render pass instance was begun with a vkCmdBeginRendering call in `commandBuffer`, its VkRenderingInfo::`flags` parameter must not have VK_RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT set unless VK_RENDERING_CONTENTS_INLINE_BIT_KHR is also set

- VUID-vkCmdExecuteGeneratedCommandsEXT-primitivesGeneratedQueryWithRasterizerDiscard-06708
  If the `primitivesGeneratedQueryWithRasterizerDiscard` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, rasterization discard must not be enabled

- VUID-vkCmdExecuteGeneratedCommandsEXT-primitivesGeneratedQueryWithNonZeroStreams-06709
  If the `primitivesGeneratedQueryWithNonZeroStreams` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, the bound graphics pipeline must not have been created with a non-zero value in `VkPipelineRasterizationStateStreamCreateInfoEXT`::`rasterizationStream`

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-07620
  If the `depthClamp` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLAMP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetDepthClampEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-07621
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_POLYGON_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetPolygonModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-07622
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetRasterizationSamplesEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-07623
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetSampleMaskEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsEXT-alphaToCoverageEnable-08919
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT dynamic state enabled, and `alphaToCoverageEnable` was VK_TRUE in the last call to vkCmdSetAlphaToCoverageEnableEXT, then the Fragment Output Interface must contain a variable for the alpha `Component` word in `Location` 0 at `Index` 0

- VUID-vkCmdExecuteGeneratedCommandsEXT-alphaToCoverageEnable-08920
  If a shader object is bound to any graphics stage, and the most recent call to vkCmdSetAlphaToCoverageEnableEXT in the current command buffer set `alphaToCoverageEnable` to VK_TRUE, then the Fragment Output Interface must contain a variable for the alpha `Component` word in `Location` 0 at `Index` 0

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-07624
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAlphaToCoverageEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-07625
  If the `alphaToOne` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ALPHA_TO_ONE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAlphaToOneEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-07626
  If the `logicOp` feature is enabled, a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LOGIC_OP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetLogicOpEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-07627
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and there are color attachments bound, then vkCmdSetColorBlendEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-07629
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and there are color attachments bound, then vkCmdSetColorWriteMaskEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-07630
  If the `geometryStreams` feature is enabled, and a shader object is bound to the VK_SHADER_STAGE_GEOMETRY_BIT stage or a graphics pipeline is bound which was created with both a VK_SHADER_STAGE_GEOMETRY_BIT stage and the VK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXT dynamic state enabled, then vkCmdSetRasterizationStreamEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-07631
  If the `VK_EXT_conservative_rasterization` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_CONSERVATIVE_RASTERIZATION_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetConservativeRasterizationModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-07632
  If the `VK_EXT_conservative_rasterization` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_EXTRA_PRIMITIVE_OVERESTIMATION_SIZE_EXT dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `conservativeRasterizationMode` is VK_CONSERVATIVE_RASTERIZATION_MODE_OVERESTIMATE_EXT, then vkCmdSetExtraPrimitiveOverestimationSizeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsEXT-conservativePointAndLineRasterization-07499
  If the `VK_EXT_conservative_rasterization` extension is enabled, `conservativePointAndLineRasterization` is not supported, a shader object is bound to any graphics stage or a graphics pipeline is bound, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line or point topology class, then the current value of `conservativeRasterizationMode` must be VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-07633
  If the `depthClipEnable` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLIP_ENABLE_EXT dynamic state, then vkCmdSetDepthClipEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-07636
  If the `VK_EXT_provoking_vertex` extension is enabled, a shader object is bound to the VK_SHADER_STAGE_VERTEX_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_PROVOKING_VERTEX_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetProvokingVertexModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-08666
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineRasterizationModeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-08669
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, and the effective rasterization input topology is in the line topology class, then vkCmdSetLineStippleEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-07849
  If any of the `stippledRectangularLines`, `stippledBresenhamLines` or `stippledSmoothLines` features are enabled and a shader object is bound to any graphics stage, or a bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `stippledLineEnable` is VK_TRUE, then vkCmdSetLineStipple must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-10608
  If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic state enabled, the effective rasterization input topology is in the line topology class, and the current `lineRasterizationMode` is VK_LINE_RASTERIZATION_MODE_BRESENHAM or VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH, then the current `alphaToCoverageEnable`, `alphaToOneEnable` and `sampleShadingEnable` states must all be VK_FALSE

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-07639
  If the `depthClipControl` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLIP_NEGATIVE_ONE_TO_ONE_EXT dynamic state enabled, then vkCmdSetDepthClipNegativeOneToOneEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-09650
  If the `depthClampControl` feature is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_CLAMP_RANGE_EXT dynamic state enabled, and the current value of `depthClampEnable` is VK_TRUE, then vkCmdSetDepthClampRangeEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-07640
  If the `VK_NV_clip_space_w_scaling` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_ENABLE_NV dynamic state enabled, then vkCmdSetViewportWScalingEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-07641
  If the `VK_NV_viewport_swizzle` extension is enabled, and a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic state enabled, then vkCmdSetViewportSwizzleNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-07642
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageToColorEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-07643
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_LOCATION_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageToColorEnable` is VK_TRUE, then vkCmdSetCoverageToColorLocationNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-07644
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_MODE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageModulationModeNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-07645
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageModulationMode` is any value other than VK_COVERAGE_MODULATION_MODE_NONE_NV, then vkCmdSetCoverageModulationTableEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-07646
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_NV dynamic state enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and the current value of `coverageModulationTableEnable` is VK_TRUE, then vkCmdSetCoverageModulationTableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-07647
  If the `shadingRateImage` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SHADING_RATE_IMAGE_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetShadingRateImageEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsEXT-pipelineFragmentShadingRate-09238
  If the `pipelineFragmentShadingRate` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetFragmentShadingRateKHR must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-07648
  If the `representativeFragmentTest` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_REPRESENTATIVE_FRAGMENT_TEST_ENABLE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetRepresentativeFragmentTestEnableNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-07649
  If the `coverageReductionMode` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetCoverageReductionModeNV must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsEXT-rasterizationSamples-07471
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current subpass does not use any color and/or depth/stencil attachments, then the `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT must follow the rules for a zero-attachment subpass

- VUID-vkCmdExecuteGeneratedCommandsEXT-samples-07472
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state disabled, then the `samples` parameter in the last call to vkCmdSetSampleMaskEXT must be greater or equal to the VkPipelineMultisampleStateCreateInfo::`rasterizationSamples` parameter used to create the bound graphics pipeline

- VUID-vkCmdExecuteGeneratedCommandsEXT-samples-07473
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_MASK_EXT state and VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT states enabled, then the `samples` parameter in the last call to vkCmdSetSampleMaskEXT must be greater or equal to the `rasterizationSamples` parameter in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-09211
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, or a shader object is bound to any graphics stage, and the current render pass instance includes a VkMultisampledRenderToSingleSampledInfoEXT structure with `multisampledRenderToSingleSampledEnable` equal to VK_TRUE, then the `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT must be the same as the `rasterizationSamples` member of that structure

- VUID-vkCmdExecuteGeneratedCommandsEXT-firstAttachment-07476
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic states enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the last call to vkCmdSetColorBlendEnableEXT in the current command buffer prior to this drawing command must have set a value for all active color attachments

- VUID-vkCmdExecuteGeneratedCommandsEXT-firstAttachment-07478
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT dynamic states enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then the last call to vkCmdSetColorWriteMaskEXT in the current command buffer prior to this drawing command must have set a value for all active color attachments

- VUID-vkCmdExecuteGeneratedCommandsEXT-advancedBlendMaxColorAttachments-07480
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with the VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT and VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic states enabled, the current value of `rasterizerDiscardEnable` is VK_FALSE, and an active color attachment current value of `blendEnable` is VK_TRUE, then the number of active color attachments must not exceed `advancedBlendMaxColorAttachments`

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-10862
  If a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT , but not the VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorBlendEquationEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdExecuteGeneratedCommandsEXT-rasterizerDiscardEnable-10863
  If a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT, but not the VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetColorBlendAdvancedEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-10864
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound was created with VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT and VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then either vkCmdSetColorBlendAdvancedEXT or vkCmdSetColorBlendEquationEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command for all active color attachments with the `blendEnable` current value of VK_TRUE

- VUID-vkCmdExecuteGeneratedCommandsEXT-primitivesGeneratedQueryWithNonZeroStreams-07481
  If the `primitivesGeneratedQueryWithNonZeroStreams` feature is not enabled and the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query is active, and the bound graphics pipeline was created with VK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXT state enabled, the last call to vkCmdSetRasterizationStreamEXT must have set the `rasterizationStream` to zero

- VUID-vkCmdExecuteGeneratedCommandsEXT-sampleLocationsPerPixel-07482
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state disabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then the `sampleLocationsPerPixel` member of `pSampleLocationsInfo` in the last call to vkCmdSetSampleLocationsEXT must equal the `rasterizationSamples` member of the VkPipelineMultisampleStateCreateInfo structure the bound graphics pipeline has been created with

- VUID-vkCmdExecuteGeneratedCommandsEXT-sampleLocationsPerPixel-07483
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then the `sampleLocationsPerPixel` member of `pSampleLocationsInfo` in the last call to vkCmdSetSampleLocationsEXT must equal the `rasterizationSamples` parameter of the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdExecuteGeneratedCommandsEXT-sampleLocationsEnable-07484
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT then the current active depth attachment must have been created with the VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit set

- VUID-vkCmdExecuteGeneratedCommandsEXT-sampleLocationsEnable-07485
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, then the `sampleLocationsInfo.maxSampleLocationGridSize.width` in the last call to vkCmdSetSampleLocationsEXT must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.width` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling `rasterizationSamples`

- VUID-vkCmdExecuteGeneratedCommandsEXT-sampleLocationsEnable-07486
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state enabled and the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, then the `sampleLocationsInfo.maxSampleLocationGridSize.height` in the last call to vkCmdSetSampleLocationsEXT must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.height` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling `rasterizationSamples`

- VUID-vkCmdExecuteGeneratedCommandsEXT-sampleLocationsEnable-07487
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT state enabled, and if `sampleLocationsEnable` was VK_TRUE in the last call to vkCmdSetSampleLocationsEnableEXT, the fragment shader code must not statically use the extended instruction `InterpolateAtSample`

- VUID-vkCmdExecuteGeneratedCommandsEXT-sampleLocationsEnable-07936
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationGridSize.width` must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.width` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling the value of `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdExecuteGeneratedCommandsEXT-sampleLocationsEnable-07937
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationGridSize.height` must evenly divide VkMultisamplePropertiesEXT::`maxSampleLocationGridSize.height` as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a `samples` parameter equaling the value of `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdExecuteGeneratedCommandsEXT-sampleLocationsEnable-07938
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT state disabled and the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT state enabled, and the current value of `sampleLocationsEnable` is VK_TRUE, then `sampleLocationsInfo.sampleLocationsPerPixel` must equal `rasterizationSamples` in the last call to vkCmdSetRasterizationSamplesEXT

- VUID-vkCmdExecuteGeneratedCommandsEXT-coverageModulationTableEnable-07488
  If a shader object is bound to any graphics stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NV state enabled, and the last call to vkCmdSetCoverageModulationTableEnableNV set `coverageModulationTableEnable` to VK_TRUE, then the `coverageModulationTableCount` parameter in the last call to vkCmdSetCoverageModulationTableNV must equal the current `rasterizationSamples` divided by the number of color samples in the current active color attachment

- VUID-vkCmdExecuteGeneratedCommandsEXT-rasterizationSamples-07489
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, and if current subpass has a depth/stencil attachment and depth test, stencil test, or depth bounds test are enabled in the bound pipeline, then the current `rasterizationSamples` must be the same as the sample count of the depth/stencil attachment

- VUID-vkCmdExecuteGeneratedCommandsEXT-coverageToColorEnable-07490
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV state enabled and the last call to vkCmdSetCoverageToColorEnableNV set the `coverageToColorEnable` to VK_TRUE, then there must be an active color attachment at the location selected by the last call to vkCmdSetCoverageToColorLocationNV `coverageToColorLocation`, with a VkFormat of VK_FORMAT_R8_UINT, VK_FORMAT_R8_SINT, VK_FORMAT_R16_UINT, VK_FORMAT_R16_SINT, VK_FORMAT_R32_UINT, or VK_FORMAT_R32_SINT

- VUID-vkCmdExecuteGeneratedCommandsEXT-rasterizerDiscardEnable-09420
  If the `VK_NV_fragment_coverage_to_color` extension is enabled, and a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage, and the most recent call to vkCmdSetRasterizerDiscardEnable in the current command buffer set `rasterizerDiscardEnable` to VK_FALSE, and the last call to vkCmdSetCoverageToColorEnableNV set the `coverageToColorEnable` to VK_TRUE, then there must be an active color attachment at the location selected by the last call to vkCmdSetCoverageToColorLocationNV `coverageToColorLocation`, with a VkFormat of VK_FORMAT_R8_UINT, VK_FORMAT_R8_SINT, VK_FORMAT_R16_UINT, VK_FORMAT_R16_SINT, VK_FORMAT_R32_UINT, or VK_FORMAT_R32_SINT

- VUID-vkCmdExecuteGeneratedCommandsEXT-coverageReductionMode-07491
  If the `coverageReductionMode` feature is enabled, a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV or VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic states enabled, then the current values of `coverageReductionMode`, `rasterizationSamples`, the sample counts for the color and depth/stencil attachments (if the subpass has them) must be a valid combination returned by vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV

- VUID-vkCmdExecuteGeneratedCommandsEXT-viewportCount-07492
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, but not the VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportSwizzleStateCreateInfoNV::`viewportCount` greater or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdExecuteGeneratedCommandsEXT-viewportCount-07493
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV dynamic states enabled then the `viewportCount` parameter in the last call to vkCmdSetViewportSwizzleNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdExecuteGeneratedCommandsEXT-viewportCount-09421
  If the `VK_NV_viewport_swizzle` extension is enabled, and a shader object is bound to any graphics stage, then the `viewportCount` parameter in the last call to vkCmdSetViewportSwizzleNV must be greater than or equal to the `viewportCount` parameter in the last call to vkCmdSetViewportWithCount

- VUID-vkCmdExecuteGeneratedCommandsEXT-rasterizationSamples-07494
  If the `VK_NV_framebuffer_mixed_samples` extension is enabled, and the `coverageReductionMode` feature is not enabled, or the current value of `coverageReductionMode` is not VK_COVERAGE_REDUCTION_MODE_TRUNCATE_NV, and the current value of `rasterizationSamples` is greater than sample count of the color attachment, then sample shading must be disabled

- VUID-vkCmdExecuteGeneratedCommandsEXT-stippledLineEnable-07495
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_RECTANGULAR, then the `stippledRectangularLines` feature must be enabled

- VUID-vkCmdExecuteGeneratedCommandsEXT-stippledLineEnable-07496
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_BRESENHAM, then the `stippledBresenhamLines` feature must be enabled

- VUID-vkCmdExecuteGeneratedCommandsEXT-stippledLineEnable-07497
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH, then the `stippledSmoothLines` feature must be enabled

- VUID-vkCmdExecuteGeneratedCommandsEXT-stippledLineEnable-07498
  If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT or VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT dynamic states enabled, and if the current `stippledLineEnable` state is VK_TRUE and the current `lineRasterizationMode` state is VK_LINE_RASTERIZATION_MODE_DEFAULT, then the `stippledRectangularLines` feature must be enabled and VkPhysicalDeviceLimits::`strictLines` must be VK_TRUE

- VUID-vkCmdExecuteGeneratedCommandsEXT-stage-07073
  If the bound pipeline was created with the VkPipelineShaderStageCreateInfo::`stage` member of an element of VkGraphicsPipelineCreateInfo::`pStages` set to VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT, then Mesh Shader Queries must not be active

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-08877
  If a shader object is bound to the VK_SHADER_STAGE_FRAGMENT_BIT stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_ATTACHMENT_FEEDBACK_LOOP_ENABLE_EXT dynamic state enabled, and the current value of `rasterizerDiscardEnable` is VK_FALSE, then vkCmdSetAttachmentFeedbackLoopEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-07850
  If dynamic state was inherited from VkCommandBufferInheritanceViewportScissorInfoNV, it must be set in the current command buffer prior to this drawing command

- VUID-vkCmdExecuteGeneratedCommandsEXT-nextStage-10745
  For each shader object bound to a graphics stage, except for shader object bound to the last graphics stage in the logical pipeline, it must have been created with a `nextStage` including the corresponding bit to the shader object bound to the following graphics stage in the logical pipeline

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-08684
  If there is no bound graphics pipeline, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_VERTEX_BIT

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-08685
  If there is no bound graphics pipeline, and the `tessellationShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-08686
  If there is no bound graphics pipeline, and the `tessellationShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-08687
  If there is no bound graphics pipeline, and the `geometryShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_GEOMETRY_BIT

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-08688
  If there is no bound graphics pipeline, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_FRAGMENT_BIT

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-08689
  If there is no bound graphics pipeline, and the `taskShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_TASK_BIT_EXT

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-08690
  If there is no bound graphics pipeline, and the `meshShader` feature is enabled, `vkCmdBindShadersEXT` must have been called in the current command buffer with `pStages` with an element of VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-08693
  If there is no bound graphics pipeline, and at least one of the `taskShader` and `meshShader` features is enabled, one of the VK_SHADER_STAGE_VERTEX_BIT or VK_SHADER_STAGE_MESH_BIT_EXT stages must have a valid `VkShaderEXT` bound, and the other must have no `VkShaderEXT` bound

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-08696
  If there is no bound graphics pipeline, and a valid `VkShaderEXT` is bound to the VK_SHADER_STAGE_VERTEX_BIT stage, there must be no `VkShaderEXT` bound to either the VK_SHADER_STAGE_TASK_BIT_EXT stage or the VK_SHADER_STAGE_MESH_BIT_EXT stage

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-08698
  If any graphics shader is bound which was created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag, then all shaders created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag in the same vkCreateShadersEXT call must also be bound

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-08699
  If any graphics shader is bound which was created with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag, any stages in between stages whose shaders which did not create a shader with the VK_SHADER_CREATE_LINK_STAGE_BIT_EXT flag as part of the same vkCreateShadersEXT call must not have any `VkShaderEXT` bound

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-08878
  All bound graphics shader objects must have been created with identical or identically defined push constant ranges

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-08879
  All bound graphics shader objects must have either been created with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag set, or with identical or identically defined arrays of descriptor set layouts

- VUID-vkCmdExecuteGeneratedCommandsEXT-colorAttachmentCount-09372
  If the current render pass instance was begun with vkCmdBeginRendering and a VkRenderingInfo::`colorAttachmentCount` equal to `1`, a color attachment with a resolve mode of VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, and a fragment shader is bound, it must not declare the `DepthReplacing` or `StencilRefReplacingEXT` execution modes

- VUID-vkCmdExecuteGeneratedCommandsEXT-pDynamicStates-08715
  If the bound graphics pipeline state includes a fragment shader stage, was created with VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`, and the fragment shader declares the `EarlyFragmentTests` execution mode and uses `OpDepthAttachmentReadEXT`, the `depthWriteEnable` parameter in the last call to vkCmdSetDepthWriteEnable must be VK_FALSE

- VUID-vkCmdExecuteGeneratedCommandsEXT-pDynamicStates-08716
  If the bound graphics pipeline state includes a fragment shader stage, was created with VK_DYNAMIC_STATE_STENCIL_WRITE_MASK set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`, and the fragment shader declares the `EarlyFragmentTests` execution mode and uses `OpStencilAttachmentReadEXT`, the `writeMask` parameter in the last call to vkCmdSetStencilWriteMask must be `0`

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-09116
  If a shader object is bound to any graphics stage or the bound graphics pipeline was created with VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT, and the format of any color attachment is VK_FORMAT_E5B9G9R9_UFLOAT_PACK32, the corresponding element of the `pColorWriteMasks` parameter of vkCmdSetColorWriteMaskEXT must either include all of VK_COLOR_COMPONENT_R_BIT, VK_COLOR_COMPONENT_G_BIT, VK_COLOR_COMPONENT_B_BIT, and VK_COLOR_COMPONENT_A_BIT, or none of them

- VUID-vkCmdExecuteGeneratedCommandsEXT-maxFragmentDualSrcAttachments-09239
  If blending is enabled for any attachment where either the source or destination blend factors for that attachment use the secondary color input, the maximum value of `Location` for any output attachment statically used in the `Fragment` `Execution` `Model` executed by this command must be less than `maxFragmentDualSrcAttachments`

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-09548
  If the current render pass was begun with vkCmdBeginRendering, there is no shader object bound to any graphics stage, the value of each element of VkRenderingAttachmentLocationInfo::`pColorAttachmentLocations` in the bound pipeline must match the value for the corresponding locations set currently in the current render pass instance

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-09549
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of each element of VkRenderingInputAttachmentIndexInfo::`pColorAttachmentInputIndices` in the bound pipeline must match the value for the corresponding index set currently in the current render pass instance

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-10927
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of VkRenderingInputAttachmentIndexInfo::`pDepthInputAttachmentIndex` in the bound pipeline must match the value set currently in the current render pass instance

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-10928
  If the current render pass was begun with vkCmdBeginRendering, and there is no shader object bound to any graphics stage, the value of VkRenderingInputAttachmentIndexInfo::`pStencilInputAttachmentIndex` in the bound pipeline must match the value set currently in the current render pass instance

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-09642
  If the current render pass was begun with vkCmdBeginRendering with the VK_RENDERING_ENABLE_LEGACY_DITHERING_BIT_EXT flag, the bound graphics pipeline must have been created with VK_PIPELINE_CREATE_2_ENABLE_LEGACY_DITHERING_BIT_EXT

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-09643
  If the bound graphics pipeline was created with VK_PIPELINE_CREATE_2_ENABLE_LEGACY_DITHERING_BIT_EXT, the current render pass must have begun with vkCmdBeginRendering with the VK_RENDERING_ENABLE_LEGACY_DITHERING_BIT_EXT flag

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-10677
  If the per-tile execution model is enabled, the tileShadingPerTileDraw feature must be enabled

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-10772
  If a shader object is bound to any graphics stage, multiview functionality must not be enabled in the current render pass

- VUID-vkCmdExecuteGeneratedCommandsEXT-multiviewPerViewViewports-12262
  If the `multiviewPerViewViewports` feature is enabled, then the index of the most significant bit in current render pass instance `viewMask` must be less than the current value of `viewportCount`

- VUID-vkCmdExecuteGeneratedCommandsEXT-multiviewPerViewViewports-12263
  If the `multiviewPerViewViewports` feature is enabled, then the index of the most significant bit in current render pass instance `viewMask` must be less than the current value of `scissorCount`

- VUID-vkCmdExecuteGeneratedCommandsEXT-flags-11521
  If current render pass instance was begun with vkCmdBeginRendering with VkRenderingInfo::`flags` which includes VK_RENDERING_FRAGMENT_REGION_BIT_EXT, and if sample shading is enabled (explicitly or implicitly), then the minimum fraction for sample shading must equal 0.0

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-11522
  If the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, and the `dynamicRenderingUnusedAttachments` feature is not enabled, the graphics pipeline bound must have been created with a VkCustomResolveCreateInfoEXT

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-11523
  If the current render pass instance was begun with vkCmdBeginRendering and does not contain a custom resolve, and the `dynamicRenderingUnusedAttachments` feature is not enabled, the graphics pipeline bound must not have been created with a VkCustomResolveCreateInfoEXT

- VUID-vkCmdExecuteGeneratedCommandsEXT-customResolve-11524
  If the current render pass instance was begun with vkCmdBeginRendering and vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, the graphics pipeline bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_TRUE

- VUID-vkCmdExecuteGeneratedCommandsEXT-customResolve-11525
  If the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, and vkCmdBeginCustomResolveEXT has not been recorded in the render pass instance, the graphics pipeline bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_FALSE

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-11861
  If the `dynamicRenderingUnusedAttachments` feature is not enabled and the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, the bound graphics pipeline must have been created with a VkCustomResolveCreateInfoEXT::`colorAttachmentCount` equal to VkRenderingInfo::`colorAttachmentCount`

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-11862
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound graphics pipeline

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-11863
  If the `dynamicRenderingUnusedAttachments` feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` equal to VK_NULL_HANDLE must have the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound pipeline equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdExecuteGeneratedCommandsEXT-dynamicRenderingUnusedAttachments-11864
  If the `dynamicRenderingUnusedAttachments` feature is enabled, the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, and VkRenderingInfo::`colorAttachmentCount` greater than `0`, then each element of the VkRenderingInfo::`pColorAttachments` array with an `resolveImageView` not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats` used to create the bound graphics pipeline, or the corresponding element of VkCustomResolveCreateInfoEXT::`pColorAttachmentFormats`, if it exists, must be VK_FORMAT_UNDEFINED

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-11865
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-11866
  If current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`

- VUID-vkCmdExecuteGeneratedCommandsEXT-dynamicRenderingUnusedAttachments-11867
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, and the value of VkCustomResolveCreateInfoEXT::`depthAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-11868
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->resolveImageView` was VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to VK_FORMAT_UNDEFINED

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-11869
  If current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is not enabled, and VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`

- VUID-vkCmdExecuteGeneratedCommandsEXT-dynamicRenderingUnusedAttachments-11870
  If the current render pass instance was begun with vkCmdBeginRendering, it contains a custom resolve, the `dynamicRenderingUnusedAttachments` feature is enabled, VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, and the value of VkCustomResolveCreateInfoEXT::`stencilAttachmentFormat` used to create the bound graphics pipeline was not equal to the VkFormat used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`, the value of the format must be VK_FORMAT_UNDEFINED

- VUID-vkCmdExecuteGeneratedCommandsEXT-colorAttachmentCount-11871
  If the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::`colorAttachmentCount` parameter greater than `0` and vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, then for each element of the VkRenderingInfo::`pColorAttachments` array with a `resolveImageView` not equal to VK_NULL_HANDLE, the `resolveImageView` must have been created with a sample count equal to the value of `rasterizationSamples` for the bound graphics pipeline

- VUID-vkCmdExecuteGeneratedCommandsEXT-pDepthAttachment-11872
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, and VkRenderingInfo::`pDepthAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pDepthAttachment->resolveImageView`

- VUID-vkCmdExecuteGeneratedCommandsEXT-pStencilAttachment-11873
  If the current render pass instance was begun with vkCmdBeginRendering, vkCmdBeginCustomResolveEXT has been recorded in the render pass instance, VkRenderingInfo::`pStencilAttachment->resolveImageView` was not VK_NULL_HANDLE, the value of `rasterizationSamples` for the bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::`pStencilAttachment->resolveImageView`

- VUID-vkCmdExecuteGeneratedCommandsEXT-customResolve-11529
  If a shader object is bound to the fragment stage, the current render pass instance was begun with vkCmdBeginRendering, a fragment density map attachment is active, and vkCmdBeginCustomResolveEXT has been called, then the fragment shader object bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_TRUE

- VUID-vkCmdExecuteGeneratedCommandsEXT-customResolve-11530
  If a shader object is bound to the fragment stage, the current render pass instance was begun with vkCmdBeginRendering and contains a custom resolve, a fragment density map attachment is active, and vkCmdBeginCustomResolveEXT has not yet been called, then the fragment shader object bound must have been created with VkCustomResolveCreateInfoEXT::`customResolve` as VK_FALSE

- VUID-vkCmdExecuteGeneratedCommandsEXT-flags-13361
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, then all bound shader objects must have been created with the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit

- VUID-vkCmdExecuteGeneratedCommandsEXT-flags-13362
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, then the pipeline layout of the bound descriptor sets must have been created with VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT set

- VUID-vkCmdExecuteGeneratedCommandsEXT-flags-13363
  If there are any shader objects bound that were created with `flags` that includes the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR bit, and any of the descriptor set layouts used to create the pipeline layout of the bound descriptor sets were created with any binding’s VkDescriptorSetLayoutBinding::`stageFlags` set with VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT or VK_SHADER_STAGE_GEOMETRY_BIT, then there must be no binding with VkDescriptorSetLayoutBinding::`stageFlags` set with VK_SHADER_STAGE_TASK_BIT_EXT or VK_SHADER_STAGE_MESH_BIT_EXT

- VUID-vkCmdExecuteGeneratedCommandsEXT-flags-13364
  If there are any shader objects bound that were created with `flags` that includes both the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR and VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT bits, the pipeline layout of the bound descriptor sets must have been created with VK_PIPELINE_LAYOUT_CREATE_NO_TASK_SHADER_BIT_KHR set

- VUID-vkCmdExecuteGeneratedCommandsEXT-flags-13365
  If there are any shader objects bound that were created with `flags` that includes both the VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR and VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT bits, there must be no shader object bound to the VK_SHADER_STAGE_TASK_BIT_EXT stage

- VUID-vkCmdExecuteGeneratedCommandsEXT-commandBuffer-11045
  `commandBuffer` must not be a protected command buffer

- VUID-vkCmdExecuteGeneratedCommandsEXT-isPreprocessed-11046
  If `isPreprocessed` is VK_TRUE and vkGetGeneratedCommandsMemoryRequirementsEXT did not return a required size of zero then vkCmdPreprocessGeneratedCommandsEXT must have already been executed on the device before this command executes, and the preprocessing command must have used the same `pGeneratedCommandsInfo` content as well as the content of the input buffers it references (all except VkGeneratedCommandsInfoEXT::`preprocessAddress`)

- VUID-vkCmdExecuteGeneratedCommandsEXT-isPreprocessed-11047
  If `isPreprocessed` is VK_TRUE then the `indirectCommandsLayout` member of `pGeneratedCommandsInfo` must have been created with the VK_INDIRECT_COMMANDS_LAYOUT_USAGE_EXPLICIT_PREPROCESS_BIT_EXT bit set

- VUID-vkCmdExecuteGeneratedCommandsEXT-indirectCommandsLayout-11141
  If the `indirectCommandsLayout` member of `pGeneratedCommandsInfo` was created with the VK_INDIRECT_COMMANDS_LAYOUT_USAGE_EXPLICIT_PREPROCESS_BIT_EXT bit set, then `isPreprocessed` must be VK_TRUE

- VUID-vkCmdExecuteGeneratedCommandsEXT-preprocessAddress-11142
  The contents of the `preprocessAddress` member of `pGeneratedCommandsInfo` must not have been previously used to record another vkCmdExecuteGeneratedCommandsEXT

- VUID-vkCmdExecuteGeneratedCommandsEXT-isPreprocessed-11048
  If `isPreprocessed` is VK_TRUE then the bound descriptor sets and push constants must match identically with those bound during recording of the corresponding call to vkCmdPreprocessGeneratedCommandsEXT

- VUID-vkCmdExecuteGeneratedCommandsEXT-isPreprocessed-10198
  If `isPreprocessed` is VK_TRUE then the conditional render state and its predicate value must match identically with the state and value set during execution of the corresponding call to vkCmdPreprocessGeneratedCommandsEXT

- VUID-vkCmdExecuteGeneratedCommandsEXT-isPreprocessed-11049
  If `isPreprocessed` is VK_TRUE and the `indirectCommandsLayout` member of `pGeneratedCommandsInfo` contains a draw token, then the graphics state bound on `commandBuffer` must match identically with the graphics state bound on the `stateCommandBuffer` passed to vkCmdPreprocessGeneratedCommandsEXT

- VUID-vkCmdExecuteGeneratedCommandsEXT-isPreprocessed-11149
  If `isPreprocessed` is VK_TRUE, then the queue family index of `commandBuffer` must be the same as the queue family index used to allocate the `stateCommandBuffer` passed to vkCmdPreprocessGeneratedCommandsEXT

- VUID-vkCmdExecuteGeneratedCommandsEXT-isPreprocessed-11051
  If `isPreprocessed` is VK_TRUE and the `indirectCommandsLayout` member of `pGeneratedCommandsInfo` contains a dispatch token, then the compute state bound on `commandBuffer` must match identically with the compute state bound on the `stateCommandBuffer` passed to vkCmdPreprocessGeneratedCommandsEXT

- VUID-vkCmdExecuteGeneratedCommandsEXT-isPreprocessed-11052
  If `isPreprocessed` is VK_TRUE and the `indirectCommandsLayout` member of `pGeneratedCommandsInfo` contains a ray tracing token, then the ray tracing state bound on `commandBuffer` must match identically with the ray tracing state bound on the `stateCommandBuffer` passed to vkCmdPreprocessGeneratedCommandsEXT

- VUID-vkCmdExecuteGeneratedCommandsEXT-indirectCommandsLayout-11053
  If the token sequence of the passed VkGeneratedCommandsInfoEXT::`indirectCommandsLayout` contains a VK_INDIRECT_COMMANDS_TOKEN_TYPE_EXECUTION_SET_EXT token, the initial shader state of VkGeneratedCommandsInfoEXT::`indirectExecutionSet` must be bound on `commandBuffer`

- VUID-vkCmdExecuteGeneratedCommandsEXT-indirectCommandsLayout-11004
  If `indirectCommandsLayout` was created with a token sequence that contained the VK_INDIRECT_COMMANDS_TOKEN_TYPE_EXECUTION_SET_EXT token and `indirectExecutionSet` was created using VK_INDIRECT_EXECUTION_SET_INFO_TYPE_SHADER_OBJECTS_EXT, every executed VK_INDIRECT_COMMANDS_TOKEN_TYPE_EXECUTION_SET_EXT token must bind all the shader stages set in the VkIndirectCommandsExecutionSetTokenEXT::`shaderStages` used to create `indirectCommandsLayout`

- VUID-vkCmdExecuteGeneratedCommandsEXT-isPreprocessed-11055
  If `isPreprocessed` is VK_TRUE and the token sequence of the passed VkGeneratedCommandsInfoEXT::`indirectCommandsLayout` contains a VK_INDIRECT_COMMANDS_TOKEN_TYPE_EXECUTION_SET_EXT token, the members of VkGeneratedCommandsInfoEXT::`indirectExecutionSet` accessed by this command must not have been modified since the preprocess buffer was generated

- VUID-vkCmdExecuteGeneratedCommandsEXT-indirectCommandsLayout-11056
  If the `indirectCommandsLayout` member of `pGeneratedCommandsInfo` contains a draw token, then the active render pass must not have a specified fragment density map

- VUID-vkCmdExecuteGeneratedCommandsEXT-deviceGeneratedCommandsTransformFeedback-11057
  If `deviceGeneratedCommandsTransformFeedback` is not supported on device, transform feedback must not be active

- VUID-vkCmdExecuteGeneratedCommandsEXT-indirectExecutionSet-11058
  If transform feedback is active, VkGeneratedCommandsInfoEXT::`indirectExecutionSet` must be VK_NULL_HANDLE

- VUID-vkCmdExecuteGeneratedCommandsEXT-deviceGeneratedCommands-11059
  The `VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT`::`deviceGeneratedCommands` feature must be enabled

- VUID-vkCmdExecuteGeneratedCommandsEXT-supportedIndirectCommandsShaderStages-11060
  The bound shader stages must be supported by VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT::`supportedIndirectCommandsShaderStages`

- VUID-vkCmdExecuteGeneratedCommandsEXT-supportedIndirectCommandsShaderStages-11061
  Only stages specified in VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT::`supportedIndirectCommandsShaderStages` can be set in `pGeneratedCommandsInfo->shaderStages`

- VUID-vkCmdExecuteGeneratedCommandsEXT-None-11062
  If a rendering pass is currently active, either the view mask must be `0` or `indirectExecutionSet` must be VK_NULL_HANDLE

- VUID-vkCmdExecuteGeneratedCommandsEXT-commandBuffer-11143
  `commandBuffer` must not have been recorded with VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT

- VUID-vkCmdExecuteGeneratedCommandsEXT-indirectCommandsLayout-10769
  If the `indirectCommandsLayout` member of `pGeneratedCommandsInfo` contains a draw token, this command must not be called outside a render pass instance

- VUID-vkCmdExecuteGeneratedCommandsEXT-indirectCommandsLayout-12202
  If the `indirectCommandsLayout` member of `pGeneratedCommandsInfo` does not contain a draw token, this command must not be called inside a render pass instance

Valid Usage (Implicit)

- VUID-vkCmdExecuteGeneratedCommandsEXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdExecuteGeneratedCommandsEXT-pGeneratedCommandsInfo-parameter
  `pGeneratedCommandsInfo` must be a valid pointer to a valid VkGeneratedCommandsInfoEXT structure

- VUID-vkCmdExecuteGeneratedCommandsEXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdExecuteGeneratedCommandsEXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, or VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdExecuteGeneratedCommandsEXT-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdExecuteGeneratedCommandsEXT-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdExecuteGeneratedCommandsEXT-bufferlevel
  `commandBuffer` must be a primary `VkCommandBuffer`

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary | Both | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT | Action Indirection

Conditional Rendering

vkCmdExecuteGeneratedCommandsEXT is affected by conditional rendering

The `VkGeneratedCommandsInfoEXT` is defined as:

    // Provided by VK_EXT_device_generated_commands
    typedef struct VkGeneratedCommandsInfoEXT {
        VkStructureType                sType;
        const void*                    pNext;
        VkShaderStageFlags             shaderStages;
        VkIndirectExecutionSetEXT      indirectExecutionSet;
        VkIndirectCommandsLayoutEXT    indirectCommandsLayout;
        VkDeviceAddress                indirectAddress;
        VkDeviceSize                   indirectAddressSize;
        VkDeviceAddress                preprocessAddress;
        VkDeviceSize                   preprocessSize;
        uint32_t                       maxSequenceCount;
        VkDeviceAddress                sequenceCountAddress;
        uint32_t                       maxDrawCount;
    } VkGeneratedCommandsInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `shaderStages` is the mask of shader stages used by the commands.

- `indirectExecutionSet` is the indirect execution set to be used for binding shaders.

- `indirectCommandsLayout` is the VkIndirectCommandsLayoutEXT that specifies the command sequence data.

- `indirectAddress` is an address that holds the indirect buffer data.

- `indirectAddressSize` is the size in bytes of indirect buffer data starting at `indirectAddress`.

- `preprocessAddress` specifies a physical address of the `VkBuffer` used for preprocessing the input data for execution. If this structure is used with vkCmdExecuteGeneratedCommandsEXT with its `isPreprocessed` set to VK_TRUE, then the preprocessing step is skipped but data in this address may still be modified. The contents and the layout of this address are opaque to applications and must not be modified outside functions related to device-generated commands or copied to another buffer for reuse.

- `preprocessSize` is the maximum byte size within `preprocessAddress` that is available for preprocessing.

- `maxSequenceCount` is used to determine the number of sequences to execute.

- `sequenceCountAddress` specifies an optional physical address of a single `uint32_t` value containing the requested number of sequences to execute.

- `maxDrawCount` is the maximum number of indirect draws that can be executed by any COUNT-type multi-draw indirect tokens. The draw count in the indirect buffer is clamped to this value for these token types.

If `sequenceCountAddress` is not `NULL`, then `maxSequenceCount` is the maximum number of sequences that can be executed. The actual number is `min(maxSequenceCount, *sequenceCountAddress)`. If `sequenceCountAddress` is `NULL`, then `maxSequenceCount` is the exact number of sequences to execute.

If the action command token for the layout is not a COUNT-type multi-draw indirect token, `maxDrawCount` is ignored.

Valid Usage

- VUID-VkGeneratedCommandsInfoEXT-preprocessAddress-11063
  If vkGetGeneratedCommandsMemoryRequirementsEXT returns a non-zero size, `preprocessAddress` must not be `0`

- VUID-VkGeneratedCommandsInfoEXT-preprocessAddress-11064
  `VkDeviceMemory` objects bound to the underlying buffer for `preprocessAddress` must have been allocated using one of the memory types allowed in the `memoryTypeBits` member of the VkMemoryRequirements structure returned by vkGetGeneratedCommandsMemoryRequirementsEXT

- VUID-VkGeneratedCommandsInfoEXT-indirectCommandsLayout-11065
  If the `indirectCommandsLayout` uses a token of VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_EXT, then the `indirectExecutionSet`’s push constant layout must contain the `updateRange` specified in VkIndirectCommandsPushConstantTokenEXT

- VUID-VkGeneratedCommandsInfoEXT-indirectCommandsLayout-11066
  If the `indirectCommandsLayout` uses a token of VK_INDIRECT_COMMANDS_TOKEN_TYPE_SEQUENCE_INDEX_EXT, then the `indirectExecutionSet`’s push constant layout must contain the `updateRange` specified in VkIndirectCommandsPushConstantTokenEXT

- VUID-VkGeneratedCommandsInfoEXT-maxSequenceCount-11067
  `maxSequenceCount` must be less or equal to VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT::`maxIndirectSequenceCount` and VkGeneratedCommandsMemoryRequirementsInfoEXT::`maxSequenceCount` that was used to determine the `preprocessSize`

- VUID-VkGeneratedCommandsInfoEXT-sequenceCountAddress-11068
  If `sequenceCountAddress` is not `NULL`, the value contained in the address must be less or equal to VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT::`maxIndirectSequenceCount` and VkGeneratedCommandsMemoryRequirementsInfoEXT::`maxSequenceCount` that was used to determine the `preprocessSize`

- VUID-VkGeneratedCommandsInfoEXT-maxSequenceCount-10246
  `maxSequenceCount` must not be zero

- VUID-VkGeneratedCommandsInfoEXT-preprocessAddress-11069
  `preprocessAddress` must be a device address allocated to the application from a buffer created with the VK_BUFFER_USAGE_2_PREPROCESS_BUFFER_BIT_EXT usage flag set

- VUID-VkGeneratedCommandsInfoEXT-indirectCommandsLayout-11144
  If the `indirectCommandsLayout` contains a VK_INDIRECT_COMMANDS_TOKEN_TYPE_EXECUTION_SET_EXT token, and there is a descriptor and push constant layout info provided either by `pipelineLayout` or through a VkPipelineLayoutCreateInfo in `pNext` of the VkIndirectCommandsLayoutCreateInfoEXT used to create `indirectCommandsLayout`, the pipeline layout must be compatible with the descriptor and push constant layout info used by `indirectExecutionSet`

- VUID-VkGeneratedCommandsInfoEXT-indirectCommandsLayout-11328
  If the `indirectCommandsLayout` contains a VK_INDIRECT_COMMANDS_TOKEN_TYPE_EXECUTION_SET_EXT token, and there was no descriptor and push constant layout info provided either by `pipelineLayout` or through a VkPipelineLayoutCreateInfo in `pNext` of the VkIndirectCommandsLayoutCreateInfoEXT used to create `indirectCommandsLayout`, pipelines in `indirectExecutionSet` must have been created with VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT

- VUID-VkGeneratedCommandsInfoEXT-indirectCommandsLayout-11329
  If the `indirectCommandsLayout` contains a VK_INDIRECT_COMMANDS_TOKEN_TYPE_EXECUTION_SET_EXT token, and there was a descriptor and push constant layout info provided either by `pipelineLayout` or through a VkPipelineLayoutCreateInfo in `pNext` of the VkIndirectCommandsLayoutCreateInfoEXT used to create `indirectCommandsLayout`, pipelines in `indirectExecutionSet` must have been created without VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT

- VUID-VkGeneratedCommandsInfoEXT-indirectCommandsLayout-11330
  If the `indirectCommandsLayout` contains a VK_INDIRECT_COMMANDS_TOKEN_TYPE_EXECUTION_SET_EXT token, and there was no descriptor and push constant layout info provided either by `pipelineLayout` or through a VkPipelineLayoutCreateInfo in `pNext` of the VkIndirectCommandsLayoutCreateInfoEXT used to create `indirectCommandsLayout`, shaders in `indirectExecutionSet` must have been created with VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT

- VUID-VkGeneratedCommandsInfoEXT-indirectCommandsLayout-11331
  If the `indirectCommandsLayout` contains a VK_INDIRECT_COMMANDS_TOKEN_TYPE_EXECUTION_SET_EXT token, and there was a descriptor and push constant layout info provided either by `pipelineLayout` or through a VkPipelineLayoutCreateInfo in `pNext` of the VkIndirectCommandsLayoutCreateInfoEXT used to create `indirectCommandsLayout`, shaders in `indirectExecutionSet` must have been created without VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT

- VUID-VkGeneratedCommandsInfoEXT-indirectCommandsLayout-11002
  If `indirectCommandsLayout` was created with a token sequence that contained the VK_INDIRECT_COMMANDS_TOKEN_TYPE_EXECUTION_SET_EXT token, the shader stages used to create the initial shader state of `indirectExecutionSet` must equal the VkIndirectCommandsExecutionSetTokenEXT::`shaderStages` used to create `indirectCommandsLayout`

- VUID-VkGeneratedCommandsInfoEXT-preprocessSize-11071
  `preprocessSize` must be greater than or equal to the memory requirement’s size returned by vkGetGeneratedCommandsMemoryRequirementsEXT using the matching inputs (`indirectCommandsLayout`, …​) as within this structure

- VUID-VkGeneratedCommandsInfoEXT-sequenceCountAddress-11072
  The underlying buffer for `sequenceCountAddress` must have the VK_BUFFER_USAGE_2_INDIRECT_BUFFER_BIT_KHR bit set in its usage flag

- VUID-VkGeneratedCommandsInfoEXT-sequenceCountAddress-11073
  If `sequenceCountAddress` is not `NULL`, `sequenceCountAddress` must be aligned to `4`

- VUID-VkGeneratedCommandsInfoEXT-indirectAddress-12407
  The underlying buffer for `indirectAddress` must have the VK_BUFFER_USAGE_2_INDIRECT_BUFFER_BIT_KHR bit set in its usage flag

- VUID-VkGeneratedCommandsInfoEXT-indirectAddress-11074
  `indirectAddress` must be aligned to `4`

- VUID-VkGeneratedCommandsInfoEXT-indirectAddressSize-11077
  `indirectAddressSize` must be greater than zero

- VUID-VkGeneratedCommandsInfoEXT-maxDrawCount-11078
  When not ignored, `maxDrawCount` × `maxSequenceCount` must be less than 2^24

- VUID-VkGeneratedCommandsInfoEXT-indirectCommandsLayout-11079
  If `indirectCommandsLayout` was created using a VK_INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_EXT token and shader objects are not bound then the bound graphics pipeline must have been created with VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE in `pDynamicStates`

- VUID-VkGeneratedCommandsInfoEXT-indirectCommandsLayout-11083
  If the token sequence of the passed `indirectCommandsLayout` contains a VK_INDIRECT_COMMANDS_TOKEN_TYPE_EXECUTION_SET_EXT token, the `indirectExecutionSet` must not be VK_NULL_HANDLE

- VUID-VkGeneratedCommandsInfoEXT-indirectCommandsLayout-10241
  If the token sequence of the passed `indirectCommandsLayout` does not contains a VK_INDIRECT_COMMANDS_TOKEN_TYPE_EXECUTION_SET_EXT token, the `indirectExecutionSet` must be VK_NULL_HANDLE

- VUID-VkGeneratedCommandsInfoEXT-indirectExecutionSet-11080
  If `indirectExecutionSet` is VK_NULL_HANDLE, a VkGeneratedCommandsPipelineInfoEXT or VkGeneratedCommandsShaderInfoEXT must be included in the `pNext` chain

Valid Usage (Implicit)

- VUID-VkGeneratedCommandsInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_GENERATED_COMMANDS_INFO_EXT

- VUID-VkGeneratedCommandsInfoEXT-shaderStages-parameter
  `shaderStages` must be a valid combination of VkShaderStageFlagBits values

- VUID-VkGeneratedCommandsInfoEXT-shaderStages-requiredbitmask
  `shaderStages` must not be `0`

- VUID-VkGeneratedCommandsInfoEXT-indirectExecutionSet-parameter
  If `indirectExecutionSet` is not VK_NULL_HANDLE, `indirectExecutionSet` must be a valid VkIndirectExecutionSetEXT handle

- VUID-VkGeneratedCommandsInfoEXT-indirectCommandsLayout-parameter
  `indirectCommandsLayout` must be a valid VkIndirectCommandsLayoutEXT handle

- VUID-VkGeneratedCommandsInfoEXT-indirectAddress-parameter
  `indirectAddress` must be a valid VkDeviceAddress value

- VUID-VkGeneratedCommandsInfoEXT-preprocessAddress-parameter
  If `preprocessAddress` is not `0`, `preprocessAddress` must be a valid VkDeviceAddress value

- VUID-VkGeneratedCommandsInfoEXT-sequenceCountAddress-parameter
  If `sequenceCountAddress` is not `0`, `sequenceCountAddress` must be a valid VkDeviceAddress value

- VUID-VkGeneratedCommandsInfoEXT-commonparent
  Both of `indirectCommandsLayout`, and `indirectExecutionSet` that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevice

Referencing the functions defined in Indirect Commands Layout, `vkCmdExecuteGeneratedCommandsEXT` behaves as:

    uint32_t sequencesCount = sequenceCountAddress ?
          min(maxSequenceCount, sequenceCountAddress.load_uint32()) :
          maxSequenceCount;

    cmdProcessAllSequences(commandBuffer, indirectExecutionSet,
                           indirectCommandsLayout, indirectAddress,
                           sequencesCount);

    // The stateful commands within indirectCommandsLayout will not
    // affect the state of subsequent commands in the target
    // command buffer (cmd)

Note | It is important to note that the affected values of all state related to the `shaderStages` used are undefined after this command. This means that e.g., if this command indirectly alters push constants, the push constant state becomes undefined.

Commands can be preprocessed prior execution using the following command:

    // Provided by VK_EXT_device_generated_commands
    void vkCmdPreprocessGeneratedCommandsEXT(
        VkCommandBuffer                             commandBuffer,
        const VkGeneratedCommandsInfoEXT*           pGeneratedCommandsInfo,
        VkCommandBuffer                             stateCommandBuffer);

- `commandBuffer` is the command buffer which does the preprocessing.

- `pGeneratedCommandsInfo` is a pointer to a VkGeneratedCommandsInfoEXT structure containing parameters affecting the preprocessing step.

- `stateCommandBuffer` is a command buffer from which to snapshot current states affecting the preprocessing step. When a graphics command action token is used, graphics state is snapshotted. When a compute action command token is used, compute state is snapshotted. When a ray tracing action command token is used, ray tracing state is snapshotted. It can be deleted at any time after this command has been recorded.

Note | `stateCommandBuffer` access is not synchronized by the driver, meaning that this command buffer must not be modified between threads in an unsafe manner.

Valid Usage

- VUID-vkCmdPreprocessGeneratedCommandsEXT-commandBuffer-11081
  `commandBuffer` must not be a protected command buffer

- VUID-vkCmdPreprocessGeneratedCommandsEXT-pGeneratedCommandsInfo-11082
  `pGeneratedCommandsInfo`’s `indirectCommandsLayout` must have been created with the VK_INDIRECT_COMMANDS_LAYOUT_USAGE_EXPLICIT_PREPROCESS_BIT_EXT bit set

- VUID-vkCmdPreprocessGeneratedCommandsEXT-indirectCommandsLayout-11084
  If the token sequence of the passed VkGeneratedCommandsInfoEXT::`indirectCommandsLayout` contains a VK_INDIRECT_COMMANDS_TOKEN_TYPE_EXECUTION_SET_EXT token, the initial shader state of VkGeneratedCommandsInfoEXT::`indirectExecutionSet` must be bound on `stateCommandBuffer`

- VUID-vkCmdPreprocessGeneratedCommandsEXT-stateCommandBuffer-11138
  `stateCommandBuffer` must be in the recording state

- VUID-vkCmdPreprocessGeneratedCommandsEXT-deviceGeneratedCommands-11087
  The `VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT`::`deviceGeneratedCommands` feature must be enabled

- VUID-vkCmdPreprocessGeneratedCommandsEXT-supportedIndirectCommandsShaderStages-11088
  Only stages specified in VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT::`supportedIndirectCommandsShaderStages` can be set in `pGeneratedCommandsInfo->shaderStages`

Valid Usage (Implicit)

- VUID-vkCmdPreprocessGeneratedCommandsEXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdPreprocessGeneratedCommandsEXT-pGeneratedCommandsInfo-parameter
  `pGeneratedCommandsInfo` must be a valid pointer to a valid VkGeneratedCommandsInfoEXT structure

- VUID-vkCmdPreprocessGeneratedCommandsEXT-stateCommandBuffer-parameter
  `stateCommandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdPreprocessGeneratedCommandsEXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdPreprocessGeneratedCommandsEXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, or VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdPreprocessGeneratedCommandsEXT-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdPreprocessGeneratedCommandsEXT-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdPreprocessGeneratedCommandsEXT-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdPreprocessGeneratedCommandsEXT-bufferlevel
  `commandBuffer` must be a primary `VkCommandBuffer`

- VUID-vkCmdPreprocessGeneratedCommandsEXT-commonparent
  Both of `commandBuffer`, and `stateCommandBuffer` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to `stateCommandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary | Outside | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT | Action

Conditional Rendering

vkCmdPreprocessGeneratedCommandsEXT is not affected by conditional rendering

The bound descriptor sets and push constants that will be used with indirect command generation must already be specified on `stateCommandBuffer` at the time of preprocessing commands with vkCmdPreprocessGeneratedCommandsEXT. They must match the bound descriptor sets and push constants used in the execution of indirect commands with vkCmdExecuteGeneratedCommandsEXT.

If push constants for shader stages are also specified in the VkGeneratedCommandsInfoEXT::`indirectCommandsLayout` with a VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_EXT or VK_INDIRECT_COMMANDS_TOKEN_TYPE_SEQUENCE_INDEX_EXT token, then those values override the push constants that were previously pushed.

All State-setting commands that are bound on `stateCommandBuffer` will be used. Any parameters set by those commands must be set identically in a command buffer that vkCmdExecuteGeneratedCommandsEXT is recorded into, at the point vkCmdExecuteGeneratedCommandsEXT is recorded. If conditional rendering is used, the predicate value at preprocessing time must match the one at execution time. The queue family index `stateCommandBuffer` was allocated from must be the same as the queue family index of the command buffer used in vkCmdExecuteGeneratedCommandsEXT.

On some implementations, preprocessing may have no effect on performance.

vkCmdExecuteGeneratedCommandsEXT may write to the preprocess buffer, no matter the isPreprocess parameter. In this case, the implementation must insert appropriate synchronization automatically, which corresponds to the following pseudocode:

- Barrier

  - srcStageMask = DRAW_INDIRECT

  - srcAccesMask = 0

  - dstStageMask = COMMAND_PREPROCESS_BIT

  - dstAccessMask = COMMAND_PREPROCESS_WRITE_BIT | COMMAND_PREPROCESS_READ_BIT

- Do internal writes

- Barrier

  - srcStageMask = COMMAND_PREPROCESS_BIT

  - srcAccesMask = COMMAND_PREPROCESS_WRITE_BIT

  - dstStageMask = DRAW_INDIRECT

  - dstAccessMask = INDIRECT_COMMAND_READ_BIT

- Execute

## 39. Sparse Resources

As documented in Resource Memory Association, `VkBuffer` and `VkImage` resources in Vulkan must be bound completely and contiguously to a single `VkDeviceMemory` object. This binding must be done before the resource is used, and the binding is immutable for the lifetime of the resource.

Sparse resources relax these restrictions and provide these additional features:

- Sparse resources can be bound non-contiguously to one or more `VkDeviceMemory` allocations.

- Sparse resources can be re-bound to different memory allocations over the lifetime of the resource.

- Sparse resources can have descriptors generated and used orthogonally with memory binding commands.

### 39.1. Sparse Resource Features

Sparse resources have several features that must be enabled explicitly at resource creation time. The features are enabled by including bits in the `flags` parameter of VkImageCreateInfo or VkBufferCreateInfo. Each feature also has one or more corresponding feature enables specified in VkPhysicalDeviceFeatures.

- The `sparseBinding` feature is the base, and provides the following capabilities:

  - Resources can be bound at some defined (sparse block) granularity.

  - The entire resource must be bound to memory before use regardless of regions actually accessed.

  - No specific mapping of image region to memory offset is defined, i.e. the location that each texel corresponds to in memory is implementation-dependent.

  - Sparse buffers have a well-defined mapping of buffer range to memory range, where an offset into a range of the buffer that is bound to a single contiguous range of memory corresponds to an identical offset within that range of memory.

  - Requested via the VK_IMAGE_CREATE_SPARSE_BINDING_BIT and VK_BUFFER_CREATE_SPARSE_BINDING_BIT bits.

  - A sparse image created using VK_IMAGE_CREATE_SPARSE_BINDING_BIT (but not VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT) supports all formats that non-sparse usage supports, and supports both VK_IMAGE_TILING_OPTIMAL and VK_IMAGE_TILING_LINEAR tiling.

- Sparse Residency builds on (and requires) the `sparseBinding` feature. It includes the following capabilities:

  - Resources do not have to be completely bound to memory before use on the device.

  - Images have a prescribed sparse image block layout, allowing specific rectangular regions of the image to be bound to specific offsets in memory allocations.

  - Consistency of access to unbound regions of the resource is defined by the absence or presence of `VkPhysicalDeviceSparseProperties`::`residencyNonResidentStrict`. If this property is present, accesses to unbound regions of the resource are well defined and behave as if the data bound is populated with all zeros; writes are discarded. When this property is absent, accesses are considered safe, but reads will return undefined values.

  - Requested via the VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT and VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT bits.

  - Sparse residency support is advertised on a finer grain via the following features:

    - The `sparseResidencyBuffer` feature provides support for creating `VkBuffer` objects with the VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT.

    - The `sparseResidencyImage2D` feature provides support for creating 2D single-sampled `VkImage` objects with VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT.

    - The `sparseResidencyImage3D` feature provides support for creating 3D `VkImage` objects with VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT.

    - The `sparseResidency2Samples` feature provides support for creating 2D `VkImage` objects with 2 samples and VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT.

    - The `sparseResidency4Samples` feature provides support for creating 2D `VkImage` objects with 4 samples and VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT.

    - The `sparseResidency8Samples` feature provides support for creating 2D `VkImage` objects with 8 samples and VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT.

    - The `sparseResidency16Samples` feature provides support for creating 2D `VkImage` objects with 16 samples and VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT.

      Implementations supporting `sparseResidencyImage2D` are only required to support sparse 2D, single-sampled images. Support for sparse 3D and MSAA images is optional and can be enabled via `sparseResidencyImage3D`, `sparseResidency2Samples`, `sparseResidency4Samples`, `sparseResidency8Samples`, and `sparseResidency16Samples`.

  - A sparse image created using VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT supports all non-compressed color formats with power-of-two element size that non-sparse usage supports. Additional formats may also be supported and can be queried via vkGetPhysicalDeviceSparseImageFormatProperties. VK_IMAGE_TILING_LINEAR tiling is not supported.

- The `sparseResidencyAliased` feature provides the following capability that can be enabled per resource:

  Allows physical memory ranges to be shared between multiple locations in the same sparse resource or between multiple sparse resources, with each binding of a memory location observing a consistent interpretation of the memory contents.

  See Sparse Memory Aliasing for more information.

### 39.2. Sparse Buffers and Fully-Resident Images

Both `VkBuffer` and `VkImage` objects created with the VK_IMAGE_CREATE_SPARSE_BINDING_BIT or VK_BUFFER_CREATE_SPARSE_BINDING_BIT bits can be thought of as a linear region of address space. In the `VkImage` case if VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT is not used, this linear region is entirely opaque, meaning that there is no application-visible mapping between texel location and memory offset.

Unless VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT or VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT are also used, the entire resource must be bound to one or more `VkDeviceMemory` objects before use.

#### 39.2.1. Sparse Buffer and Fully-Resident Image Block Size

The sparse block size in bytes for sparse buffers and fully-resident images is reported as `VkMemoryRequirements`::`alignment`. `alignment` represents both the memory alignment requirement and the binding granularity (in bytes) for sparse resources.

### 39.3. Sparse Partially-Resident Buffers

`VkBuffer` objects created with the VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT bit allow the buffer to be made only partially resident. Partially resident `VkBuffer` objects are allocated and bound identically to `VkBuffer` objects using only the VK_BUFFER_CREATE_SPARSE_BINDING_BIT feature. The only difference is the ability for some regions of the buffer to be unbound during device use. After creating a `VkBuffer` with VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT, the entire buffer region is considered unbound.

### 39.4. Sparse Partially-Resident Images

`VkImage` objects created with the VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT bit allow specific rectangular regions of the image called sparse image blocks to be bound to specific ranges of memory. This allows the application to manage residency at either image subresource or sparse image block granularity. Each image subresource (outside of the mip tail) starts on a sparse block boundary and has dimensions that are integer multiples of the corresponding dimensions of the sparse image block. After creating a `VkImage` with VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT, all image subresources are considered unbound.

Note | Applications can use these types of images to control LOD based on total memory consumption. If memory pressure becomes an issue the application can unbind and disable specific mipmap levels of images without having to recreate resources or modify texel data of unaffected levels. The application can also use this functionality to access subregions of the image in a “megatexture” fashion. The application can create a large image and only populate the region of the image that is currently being used in the scene.

#### 39.4.1. Accessing Unbound Regions

The following member of `VkPhysicalDeviceSparseProperties` affects how data in unbound regions of sparse resources are handled by the implementation:

- `residencyNonResidentStrict`

If this property is not present, reads of unbound regions of the image will return undefined values. Both reads and writes are still considered safe and will not affect other resources or populated regions of the image.

If this property is present, all reads of unbound regions of the image will behave as if the region was bound to memory populated with all zeros; writes will be discarded.

Image operations performed on unbound memory may still alter some component values in the natural way for those accesses, e.g. substituting a value of one for alpha in formats that do not have an alpha component.

Example: Reading the alpha component of an unbacked VK_FORMAT_R8_UNORM image will return a value of 1.0f.

If a value was previously written to the same unbound sparse memory location in the same shader invocation, that value may be returned instead; using the `VolatileTexel` image operand, the `Volatile` memory semantic, or the `Volatile` decoration to load the value will prevent prior stored values from being returned.

Note | Getting the value of the previous store is possible as implementations are free to optimize multiple accesses in the general case. There are other ways this can be prevented, but using volatile loads is by far the simplest.

See Physical Device Enumeration for instructions for retrieving physical device properties.

Implementor’s Note

For implementations that cannot natively handle access to unbound regions of a resource, the implementation may allocate and bind memory to the unbound regions. Reads and writes to unbound regions will access the implementation-managed memory instead.

Given that the values resulting from reads of unbound regions are undefined in this scenario, implementations may use the same physical memory for all unbound regions of multiple resources within the same process.

#### 39.4.2. Mip Tail Regions

Sparse images created using VK_IMAGE_CREATE_SPARSE_BINDING_BIT (without also using VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT) have no specific mapping of image region or image subresource to memory offset defined, so the entire image can be thought of as a linear opaque address region. However, images created with VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT do have a prescribed sparse image block layout, and hence each image subresource must start on a sparse block boundary. Within each array layer, the set of mip levels that have a smaller size than the sparse block size in bytes are grouped together into a mip tail region.

If the VK_SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT flag is present in the `flags` member of `VkSparseImageFormatProperties`, for the image’s `format`, then any mip level which has dimensions that are not integer multiples of the corresponding dimensions of the sparse image block, and all subsequent mip levels, are also included in the mip tail region.

The following member of `VkPhysicalDeviceSparseProperties` may affect how the implementation places mip levels in the mip tail region:

- `residencyAlignedMipSize`

Each mip tail region is bound to memory as an opaque region (i.e. must be bound using a VkSparseImageOpaqueMemoryBindInfo structure) and may be of a size greater than or equal to the sparse block size in bytes. This size is guaranteed to be an integer multiple of the sparse block size in bytes.

An implementation may choose to allow each array-layer’s mip tail region to be bound to memory independently or require that all array-layer’s mip tail regions be treated as one. This is dictated by VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT in `VkSparseImageMemoryRequirements`::`flags`.

The following diagrams depict how VK_SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT and VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT alter memory usage and requirements.

Figure 22. Sparse Image

In the absence of VK_SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT and VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT, each array layer contains a mip tail region containing texel data for all mip levels smaller than the sparse image block in any dimension.

Mip levels that are as large or larger than a sparse image block in all dimensions can be bound individually. Right-edges and bottom-edges of each level are allowed to have partially used sparse blocks. Any bound partially-used-sparse-blocks must still have their full sparse block size in bytes allocated in memory.

Figure 23. Sparse Image with Single Mip Tail

When VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT is present all array layers will share a single mip tail region.

Figure 24. Sparse Image with Aligned Mip Size

Note | The mip tail regions are presented here in 2D arrays simply for figure size reasons. Each mip tail is logically a single array of sparse blocks with an implementation-dependent mapping of texels or compressed texel blocks to sparse blocks.

When VK_SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT is present the first mip level that would contain partially used sparse blocks begins the mip tail region. This level and all subsequent levels are placed in the mip tail. Only the first N mip levels whose dimensions are an exact multiple of the sparse image block dimensions can be bound and unbound on a sparse block basis.

Figure 25. Sparse Image with Aligned Mip Size and Single Mip Tail

Note | The mip tail region is presented here in a 2D array simply for figure size reasons. It is logically a single array of sparse blocks with an implementation-dependent mapping of texels or compressed texel blocks to sparse blocks.

When both VK_SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT and VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT are present the constraints from each of these flags are in effect.

#### 39.4.3. Standard Sparse Image Block Shapes

Standard sparse image block shapes define a standard set of dimensions for sparse image blocks that depend on the format of the image. Layout of texels or compressed texel blocks within a sparse image block is implementation-dependent. All currently defined standard sparse image block shapes are 64 KB in size.

For block-compressed formats (e.g. VK_FORMAT_BC5_UNORM_BLOCK), the texel size is the size of the compressed texel block (e.g. 128-bit for `BC5`) thus the dimensions of the standard sparse image block shapes apply in terms of compressed texel blocks.

Note | For block-compressed formats, the dimensions of a sparse image block in terms of texels can be calculated by multiplying the sparse image block dimensions by the compressed texel block dimensions.

Table 53. Standard Sparse Image Block Shapes (Single Sample)
TEXEL SIZE (bits) | Block Shape (2D) | Block Shape (3D)
--- | --- | ---
8-Bit | 256 × 256 × 1 | 64 × 32 × 32
16-Bit | 256 × 128 × 1 | 32 × 32 × 32
32-Bit | 128 × 128 × 1 | 32 × 32 × 16
64-Bit | 128 × 64 × 1 | 32 × 16 × 16
128-Bit | 64 × 64 × 1 | 16 × 16 × 16

Table 54. Standard Sparse Image Block Shapes (MSAA)
TEXEL SIZE (bits) | Block Shape (2X) | Block Shape (4X) | Block Shape (8X) | Block Shape (16X)
--- | --- | --- | --- | ---
8-Bit | 128 × 256 × 1 | 128 × 128 × 1 | 64 × 128 × 1 | 64 × 64 × 1
16-Bit | 128 × 128 × 1 | 128 × 64 × 1 | 64 × 64 × 1 | 64 × 32 × 1
32-Bit | 64 × 128 × 1 | 64 × 64 × 1 | 32 × 64 × 1 | 32 × 32 × 1
64-Bit | 64 × 64 × 1 | 64 × 32 × 1 | 32 × 32 × 1 | 32 × 16 × 1
128-Bit | 32 × 64 × 1 | 32 × 32 × 1 | 16 × 32 × 1 | 16 × 16 × 1

Implementations that support the standard sparse image block shape for all formats listed in the Standard Sparse Image Block Shapes (Single Sample) and Standard Sparse Image Block Shapes (MSAA) tables may advertise the following `VkPhysicalDeviceSparseProperties`:

- `residencyStandard2DBlockShape`

- `residencyStandard2DMultisampleBlockShape`

- `residencyStandard3DBlockShape`

Reporting each of these features does not imply that all possible image types are supported as sparse. Instead, this indicates that no supported sparse image of the corresponding type will use custom sparse image block dimensions for any formats that have a corresponding standard sparse image block shape.

#### 39.4.4. Custom Sparse Image Block Shapes

An implementation that does not support a standard image block shape for a particular sparse partially-resident image may choose to support a custom sparse image block shape for it instead. The dimensions of such a custom sparse image block shape are reported in `VkSparseImageFormatProperties`::`imageGranularity`. As with standard sparse image block shapes, the size in bytes of the custom sparse image block shape will be reported in `VkMemoryRequirements`::`alignment`.

Custom sparse image block dimensions are reported through `vkGetPhysicalDeviceSparseImageFormatProperties` and `vkGetImageSparseMemoryRequirements`.

An implementation must not support both the standard sparse image block shape and a custom sparse image block shape for the same image. The standard sparse image block shape must be used if it is supported.

#### 39.4.5. Multiple Aspects

Partially resident images are allowed to report separate sparse properties for different aspects of the image. One example is for depth/stencil images where the implementation separates the depth and stencil data into separate planes. Another reason for multiple aspects is to allow the application to manage memory allocation for implementation-private metadata associated with the image. See the figure below:

Figure 26. Multiple Aspect Sparse Image

Note | The mip tail regions are presented here in 2D arrays simply for figure size reasons. Each mip tail is logically a single array of sparse blocks with an implementation-dependent mapping of texels or compressed texel blocks to sparse blocks.

In the figure above the depth, stencil, and metadata aspects all have unique sparse properties. The per-texel stencil data is ¼ the size of the depth data, hence the stencil sparse blocks include 4 × the number of texels. The sparse block size in bytes for all of the aspects is identical and defined by `VkMemoryRequirements`::`alignment`.

##### Metadata

The metadata aspect of an image has the following constraints:

- All metadata is reported in the mip tail region of the metadata aspect.

- All metadata must be bound prior to device use of the sparse image.

### 39.5. Sparse Memory Aliasing

By default sparse resources have the same aliasing rules as non-sparse resources. See Memory Aliasing for more information.

`VkDevice` objects that have the `sparseResidencyAliased` feature enabled are able to use the VK_BUFFER_CREATE_SPARSE_ALIASED_BIT and VK_IMAGE_CREATE_SPARSE_ALIASED_BIT flags for resource creation. These flags allow resources to access physical memory bound into multiple locations within one or more sparse resources in a data consistent fashion. This means that reading physical memory from multiple aliased locations will return the same value.

Care must be taken when performing a write operation to aliased physical memory. Memory dependencies must be used to separate writes to one alias from reads or writes to another alias. Writes to aliased memory that are not properly guarded against accesses to different aliases will have undefined results for all accesses to the aliased memory.

Applications that wish to make use of data consistent sparse memory aliasing must abide by the following guidelines:

- All sparse resources that are bound to aliased physical memory must be created with the VK_BUFFER_CREATE_SPARSE_ALIASED_BIT / VK_IMAGE_CREATE_SPARSE_ALIASED_BIT flag.

- All resources that access aliased physical memory must interpret the memory in the same way. This implies the following:

  - Buffers and images cannot alias the same physical memory in a data consistent fashion. The physical memory ranges must be used exclusively by buffers or used exclusively by images for data consistency to be guaranteed.

  - Memory in sparse image mip tail regions cannot access aliased memory in a data consistent fashion.

  - Sparse images that alias the same physical memory must have compatible formats and be using the same sparse image block shape in order to access aliased memory in a data consistent fashion.

Failure to follow any of the above guidelines will require the application to abide by the normal, non-sparse resource aliasing rules. In this case memory cannot be accessed in a data consistent fashion.

Note | Enabling sparse resource memory aliasing can be a way to lower physical memory use, but it may reduce performance on some implementations. An application developer can test on their target HW and balance the memory / performance trade-offs measured.

### 39.6. Sparse Resource Implementation Guidelines (Informative)

This section is Informative. It is included to aid in implementors’ understanding of sparse resources.

#### Device Virtual Address

The basic `sparseBinding` feature allows the resource to reserve its own device virtual address range at resource creation time rather than relying on a bind operation to set this. Without any other creation flags, no other constraints are relaxed compared to normal resources. All pages must be bound to physical memory before the device accesses the resource.

The `sparseResidency` features allow sparse resources to be used even when not all pages are bound to memory. Implementations that support access to unbound pages without causing a fault may support `residencyNonResidentStrict`.

Not faulting on access to unbound pages is not enough to support `residencyNonResidentStrict`. An implementation must also guarantee that reads after writes to unbound regions of the resource always return data for the read as if the memory contains zeros. Depending on any caching hierarchy of the implementation this may not always be possible.

Any implementation that does not fault, but does not guarantee correct read values must not support `residencyNonResidentStrict`.

Any implementation that cannot access unbound pages without causing a fault will require the implementation to bind the entire device virtual address range to physical memory. Any pages that the application does not bind to memory may be bound to one (or more) "`placeholder" physical page(s) allocated by the implementation. Given the following properties:

- A process must not access memory from another process

- Reads return undefined values

It is sufficient for each host process to allocate these placeholder pages and use them for all resources in that process. Implementations may allocate more often (per instance, per device, or per resource).

#### Binding Memory

The byte size reported in `VkMemoryRequirements`::`size` must be greater than or equal to the amount of physical memory required to fully populate the resource. Some implementations require “holes” in the device virtual address range that are never accessed. These holes may be included in the `size` reported for the resource.

Including or not including the device virtual address holes in the resource size will alter how the implementation provides support for `VkSparseImageOpaqueMemoryBindInfo`. This operation must be supported for all sparse images, even ones created with VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT.

- If the holes are included in the size, this bind function becomes very easy. In most cases the `resourceOffset` is simply a device virtual address offset and the implementation can easily determine what device virtual address to bind. The cost is that the application may allocate more physical memory for the resource than it needs.

- If the holes are not included in the size, the application can allocate less physical memory than otherwise for the resource. However, in this case the implementation must account for the holes when mapping `resourceOffset` to the actual device virtual address intended to be mapped.

Note | If the application always uses `VkSparseImageMemoryBindInfo` to bind memory for the non-tail mip levels, any holes that are present in the resource size may never be bound. Since `VkSparseImageMemoryBindInfo` uses texel locations to determine which device virtual addresses to bind, it is impossible to bind device virtual address holes with this operation.

#### Binding Metadata Memory

All metadata for sparse images have their own sparse properties and are embedded in the mip tail region for said properties. See the Multiaspect section for details.

Given that metadata is in a mip tail region, and the mip tail region must be reported as contiguous (either globally or per-array-layer), some implementations will have to resort to complicated offset → device virtual address mapping for handling `VkSparseImageOpaqueMemoryBindInfo`.

To make this easier on the implementation, the VK_SPARSE_MEMORY_BIND_METADATA_BIT explicitly specifies when metadata is bound with `VkSparseImageOpaqueMemoryBindInfo`. When this flag is not present, the `resourceOffset` may be treated as a strict device virtual address offset.

When VK_SPARSE_MEMORY_BIND_METADATA_BIT is present, the `resourceOffset` must have been derived explicitly from the `imageMipTailOffset` in the sparse resource properties returned for the metadata aspect. By manipulating the value returned for `imageMipTailOffset`, the `resourceOffset` does not have to correlate directly to a device virtual address offset, and may instead be whatever value makes it easiest for the implementation to derive the correct device virtual address.

### 39.7. Sparse Resource API

The APIs related to sparse resources are grouped into the following categories:

- Physical Device Features

- Physical Device Sparse Properties

- Sparse Image Format Properties

- Sparse Resource Creation

- Sparse Resource Memory Requirements

- Binding Resource Memory

#### 39.7.1. Physical Device Features

Some sparse-resource related features are reported and enabled in `VkPhysicalDeviceFeatures`. These features must be supported and enabled on the `VkDevice` object before applications can use them. See Physical Device Features for information on how to get and set enabled device features, and for more detailed explanations of these features.

##### Sparse Physical Device Features

- `sparseBinding`: Support for creating VkBuffer and `VkImage` objects with the VK_BUFFER_CREATE_SPARSE_BINDING_BIT and VK_IMAGE_CREATE_SPARSE_BINDING_BIT flags, respectively.

- `sparseResidencyBuffer`: Support for creating VkBuffer objects with the VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT flag.

- `sparseResidencyImage2D`: Support for creating 2D single-sampled `VkImage` objects with VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT.

- `sparseResidencyImage3D`: Support for creating 3D VkImage objects with VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT.

- `sparseResidency2Samples`: Support for creating 2D VkImage objects with 2 samples and VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT.

- `sparseResidency4Samples`: Support for creating 2D VkImage objects with 4 samples and VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT.

- `sparseResidency8Samples`: Support for creating 2D VkImage objects with 8 samples and VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT.

- `sparseResidency16Samples`: Support for creating 2D VkImage objects with 16 samples and VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT.

- `sparseResidencyAliased`: Support for creating VkBuffer and `VkImage` objects with the VK_BUFFER_CREATE_SPARSE_ALIASED_BIT and VK_IMAGE_CREATE_SPARSE_ALIASED_BIT flags, respectively.

#### 39.7.2. Physical Device Sparse Properties

Some features of the implementation are not possible to disable, and are reported to allow applications to alter their sparse resource usage accordingly. These read-only capabilities are reported in the VkPhysicalDeviceProperties::`sparseProperties` member, which is a `VkPhysicalDeviceSparseProperties` structure.

The `VkPhysicalDeviceSparseProperties` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkPhysicalDeviceSparseProperties {
        VkBool32    residencyStandard2DBlockShape;
        VkBool32    residencyStandard2DMultisampleBlockShape;
        VkBool32    residencyStandard3DBlockShape;
        VkBool32    residencyAlignedMipSize;
        VkBool32    residencyNonResidentStrict;
    } VkPhysicalDeviceSparseProperties;

- `residencyStandard2DBlockShape` is VK_TRUE if the physical device will access all single-sample 2D sparse resources using the standard sparse image block shapes (based on image format), as described in the Standard Sparse Image Block Shapes (Single Sample) table. If this property is not supported the value returned in the `imageGranularity` member of the `VkSparseImageFormatProperties` structure for single-sample 2D images is not required to match the standard sparse image block dimensions listed in the table.

- `residencyStandard2DMultisampleBlockShape` is VK_TRUE if the physical device will access all multisample 2D sparse resources using the standard sparse image block shapes (based on image format), as described in the Standard Sparse Image Block Shapes (MSAA) table. If this property is not supported, the value returned in the `imageGranularity` member of the `VkSparseImageFormatProperties` structure for multisample 2D images is not required to match the standard sparse image block dimensions listed in the table.

- `residencyStandard3DBlockShape` is VK_TRUE if the physical device will access all 3D sparse resources using the standard sparse image block shapes (based on image format), as described in the Standard Sparse Image Block Shapes (Single Sample) table. If this property is not supported, the value returned in the `imageGranularity` member of the `VkSparseImageFormatProperties` structure for 3D images is not required to match the standard sparse image block dimensions listed in the table.

- `residencyAlignedMipSize` is VK_TRUE if images with mip level dimensions that are not integer multiples of the corresponding dimensions of the sparse image block may be placed in the mip tail. If this property is not reported, only mip levels with dimensions smaller than the `imageGranularity` member of the `VkSparseImageFormatProperties` structure will be placed in the mip tail. If this property is reported the implementation is allowed to return VK_SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT in the `flags` member of `VkSparseImageFormatProperties`, indicating that mip level dimensions that are not integer multiples of the corresponding dimensions of the sparse image block will be placed in the mip tail.

- `residencyNonResidentStrict` specifies whether the physical device can consistently access non-resident regions of a resource. If this property is VK_TRUE, access to non-resident regions of resources will be guaranteed to return values as if the resource was populated with 0; writes to non-resident regions will be discarded.

#### 39.7.3. Sparse Image Format Properties

Given that certain aspects of sparse image support, including the sparse image block dimensions, may be implementation-dependent, vkGetPhysicalDeviceSparseImageFormatProperties can be used to query for sparse image format properties prior to resource creation. This command is used to check whether a given set of sparse image parameters is supported and what the sparse image block shape will be.

##### Sparse Image Format Properties API

The `VkSparseImageFormatProperties` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkSparseImageFormatProperties {
        VkImageAspectFlags          aspectMask;
        VkExtent3D                  imageGranularity;
        VkSparseImageFormatFlags    flags;
    } VkSparseImageFormatProperties;

- `aspectMask` is a bitmask VkImageAspectFlagBits specifying which aspects of the image the properties apply to.

- `imageGranularity` is the width, height, and depth of the sparse image block in texels.

- `flags` is a bitmask of VkSparseImageFormatFlagBits specifying additional information about the sparse resource.

Bits which may be set in VkSparseImageFormatProperties::`flags`, specifying additional information about the sparse resource, are:

    // Provided by VK_VERSION_1_0
    typedef enum VkSparseImageFormatFlagBits {
        VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT = 0x00000001,
        VK_SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT = 0x00000002,
        VK_SPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT = 0x00000004,
    } VkSparseImageFormatFlagBits;

- VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT specifies that the image uses a single mip tail region for all array layers.

- VK_SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT specifies that the first mip level whose dimensions are not integer multiples of the corresponding dimensions of the sparse image block begins the mip tail region.

- VK_SPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT specifies that the image uses non-standard sparse image block dimensions, and the `imageGranularity` values do not match the standard sparse image block dimensions for the given format.

    // Provided by VK_VERSION_1_0
    typedef VkFlags VkSparseImageFormatFlags;

`VkSparseImageFormatFlags` is a bitmask type for setting a mask of zero or more VkSparseImageFormatFlagBits.

`vkGetPhysicalDeviceSparseImageFormatProperties` returns an array of VkSparseImageFormatProperties. Each element describes properties for one set of image aspects that are bound simultaneously for a `VkImage` created with the provided image creation parameters. This is usually one element for each aspect in the image, but for interleaved depth/stencil images there is only one element describing the combined aspects.

Warning | This functionality is superseded by vkGetPhysicalDeviceSparseImageFormatProperties2. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_0
    void vkGetPhysicalDeviceSparseImageFormatProperties(
        VkPhysicalDevice                            physicalDevice,
        VkFormat                                    format,
        VkImageType                                 type,
        VkSampleCountFlagBits                       samples,
        VkImageUsageFlags                           usage,
        VkImageTiling                               tiling,
        uint32_t*                                   pPropertyCount,
        VkSparseImageFormatProperties*              pProperties);

- `physicalDevice` is the physical device from which to query the sparse image format properties.

- `format` is the image format.

- `type` is the dimensionality of the image.

- `samples` is a VkSampleCountFlagBits value specifying the number of samples per texel.

- `usage` is a bitmask describing the intended usage of the image.

- `tiling` is the tiling arrangement of the texel blocks in memory.

- `pPropertyCount` is a pointer to an integer related to the number of sparse format properties available or queried, as described below.

- `pProperties` is either `NULL` or a pointer to an array of VkSparseImageFormatProperties structures.

If `pProperties` is `NULL`, then the number of sparse format properties available is returned in `pPropertyCount`. Otherwise, `pPropertyCount` must point to a variable set by the application to the number of elements in the `pProperties` array, and on return the variable is overwritten with the number of structures actually written to `pProperties`. If `pPropertyCount` is less than the number of sparse format properties available, at most `pPropertyCount` structures will be written.

If VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT is not supported for the given arguments, `pPropertyCount` will be zero upon return, and no data will be written to `pProperties`.

Multiple aspects are returned for depth/stencil images that are implemented as separate planes by the implementation. The depth and stencil data planes each have unique `VkSparseImageFormatProperties` data.

Depth/stencil images with depth and stencil data interleaved into a single plane will return a single `VkSparseImageFormatProperties` structure with the `aspectMask` set to VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT.

Valid Usage

- VUID-vkGetPhysicalDeviceSparseImageFormatProperties-samples-01094
  `samples` must be a valid VkSampleCountFlagBits value that is set in `VkImageFormatProperties`::`sampleCounts` returned by `vkGetPhysicalDeviceImageFormatProperties` with `format`, `type`, `tiling`, and `usage` equal to those in this command

Valid Usage (Implicit)

- VUID-vkGetPhysicalDeviceSparseImageFormatProperties-physicalDevice-parameter
  `physicalDevice` must be a valid VkPhysicalDevice handle

- VUID-vkGetPhysicalDeviceSparseImageFormatProperties-format-parameter
  `format` must be a valid VkFormat value

- VUID-vkGetPhysicalDeviceSparseImageFormatProperties-type-parameter
  `type` must be a valid VkImageType value

- VUID-vkGetPhysicalDeviceSparseImageFormatProperties-samples-parameter
  `samples` must be a valid VkSampleCountFlagBits value

- VUID-vkGetPhysicalDeviceSparseImageFormatProperties-usage-parameter
  `usage` must be a valid combination of VkImageUsageFlagBits values

- VUID-vkGetPhysicalDeviceSparseImageFormatProperties-usage-requiredbitmask
  `usage` must not be `0`

- VUID-vkGetPhysicalDeviceSparseImageFormatProperties-tiling-parameter
  `tiling` must be a valid VkImageTiling value

- VUID-vkGetPhysicalDeviceSparseImageFormatProperties-pPropertyCount-parameter
  `pPropertyCount` must be a valid pointer to a `uint32_t` value

- VUID-vkGetPhysicalDeviceSparseImageFormatProperties-pProperties-parameter
  If the value referenced by `pPropertyCount` is not `0`, and `pProperties` is not `NULL`, `pProperties` must be a valid pointer to an array of `pPropertyCount` VkSparseImageFormatProperties structures

`vkGetPhysicalDeviceSparseImageFormatProperties2` returns an array of VkSparseImageFormatProperties2. Each element describes properties for one set of image aspects that are bound simultaneously for a `VkImage` created with the provided image creation parameters. This is usually one element for each aspect in the image, but for interleaved depth/stencil images there is only one element describing the combined aspects.

    // Provided by VK_VERSION_1_1
    void vkGetPhysicalDeviceSparseImageFormatProperties2(
        VkPhysicalDevice                            physicalDevice,
        const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo,
        uint32_t*                                   pPropertyCount,
        VkSparseImageFormatProperties2*             pProperties);

    // Provided by VK_KHR_get_physical_device_properties2
    // Equivalent to vkGetPhysicalDeviceSparseImageFormatProperties2
    void vkGetPhysicalDeviceSparseImageFormatProperties2KHR(
        VkPhysicalDevice                            physicalDevice,
        const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo,
        uint32_t*                                   pPropertyCount,
        VkSparseImageFormatProperties2*             pProperties);

- `physicalDevice` is the physical device from which to query the sparse image format properties.

- `pFormatInfo` is a pointer to a VkPhysicalDeviceSparseImageFormatInfo2 structure containing input parameters to the command.

- `pPropertyCount` is a pointer to an integer related to the number of sparse format properties available or queried, as described below.

- `pProperties` is either `NULL` or a pointer to an array of VkSparseImageFormatProperties2 structures.

`vkGetPhysicalDeviceSparseImageFormatProperties2` behaves identically to vkGetPhysicalDeviceSparseImageFormatProperties, with the ability to return extended information by adding extending structures to the `pNext` chain of its `pProperties` parameter.

Valid Usage (Implicit)

- VUID-vkGetPhysicalDeviceSparseImageFormatProperties2-physicalDevice-parameter
  `physicalDevice` must be a valid VkPhysicalDevice handle

- VUID-vkGetPhysicalDeviceSparseImageFormatProperties2-pFormatInfo-parameter
  `pFormatInfo` must be a valid pointer to a valid VkPhysicalDeviceSparseImageFormatInfo2 structure

- VUID-vkGetPhysicalDeviceSparseImageFormatProperties2-pPropertyCount-parameter
  `pPropertyCount` must be a valid pointer to a `uint32_t` value

- VUID-vkGetPhysicalDeviceSparseImageFormatProperties2-pProperties-parameter
  If the value referenced by `pPropertyCount` is not `0`, and `pProperties` is not `NULL`, `pProperties` must be a valid pointer to an array of `pPropertyCount` VkSparseImageFormatProperties2 structures

The `VkPhysicalDeviceSparseImageFormatInfo2` structure is defined as:

    // Provided by VK_VERSION_1_1
    typedef struct VkPhysicalDeviceSparseImageFormatInfo2 {
        VkStructureType          sType;
        const void*              pNext;
        VkFormat                 format;
        VkImageType              type;
        VkSampleCountFlagBits    samples;
        VkImageUsageFlags        usage;
        VkImageTiling            tiling;
    } VkPhysicalDeviceSparseImageFormatInfo2;

    // Provided by VK_KHR_get_physical_device_properties2
    // Equivalent to VkPhysicalDeviceSparseImageFormatInfo2
    typedef VkPhysicalDeviceSparseImageFormatInfo2 VkPhysicalDeviceSparseImageFormatInfo2KHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `format` is the image format.

- `type` is the dimensionality of the image.

- `samples` is a VkSampleCountFlagBits value specifying the number of samples per texel.

- `usage` is a bitmask of VkImageUsageFlagBits describing the intended usage of the image.

- `tiling` is the tiling arrangement of the texel blocks in memory.

Only usage flags representable in VkImageUsageFlagBits are returned in `usage`. If the `pNext` chain includes a VkImageUsageFlags2CreateInfoKHR structure, all usage flags are returned in VkImageUsageFlags2CreateInfoKHR::`usage`.

Valid Usage

- VUID-VkPhysicalDeviceSparseImageFormatInfo2-samples-01095
  `samples` must be a valid VkSampleCountFlagBits value that is set in `VkImageFormatProperties`::`sampleCounts` returned by `vkGetPhysicalDeviceImageFormatProperties` with `format`, `type`, `tiling`, and `usage` equal to those in this command

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceSparseImageFormatInfo2-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2

- VUID-VkPhysicalDeviceSparseImageFormatInfo2-pNext-pNext
  `pNext` must be `NULL` or a pointer to a valid instance of VkImageUsageFlags2CreateInfoKHR

- VUID-VkPhysicalDeviceSparseImageFormatInfo2-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkPhysicalDeviceSparseImageFormatInfo2-format-parameter
  `format` must be a valid VkFormat value

- VUID-VkPhysicalDeviceSparseImageFormatInfo2-type-parameter
  `type` must be a valid VkImageType value

- VUID-VkPhysicalDeviceSparseImageFormatInfo2-samples-parameter
  `samples` must be a valid VkSampleCountFlagBits value

- VUID-VkPhysicalDeviceSparseImageFormatInfo2-usage-parameter
  `usage` must be a valid combination of VkImageUsageFlagBits values

- VUID-VkPhysicalDeviceSparseImageFormatInfo2-usage-requiredbitmask
  `usage` must not be `0`

- VUID-VkPhysicalDeviceSparseImageFormatInfo2-tiling-parameter
  `tiling` must be a valid VkImageTiling value

The `VkSparseImageFormatProperties2` structure is defined as:

    // Provided by VK_VERSION_1_1
    typedef struct VkSparseImageFormatProperties2 {
        VkStructureType                  sType;
        void*                            pNext;
        VkSparseImageFormatProperties    properties;
    } VkSparseImageFormatProperties2;

    // Provided by VK_KHR_get_physical_device_properties2
    // Equivalent to VkSparseImageFormatProperties2
    typedef VkSparseImageFormatProperties2 VkSparseImageFormatProperties2KHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `properties` is a VkSparseImageFormatProperties structure which is populated with the same values as in vkGetPhysicalDeviceSparseImageFormatProperties.

Valid Usage (Implicit)

- VUID-VkSparseImageFormatProperties2-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2

- VUID-VkSparseImageFormatProperties2-pNext-pNext
  `pNext` must be `NULL`

#### 39.7.4. Sparse Resource Creation

Sparse resources require that one or more sparse feature flags be specified (as part of the `VkPhysicalDeviceFeatures` structure described previously in the Physical Device Features section) when calling vkCreateDevice. When the appropriate device features are enabled, the `VK_BUFFER_CREATE_SPARSE_*` and `VK_IMAGE_CREATE_SPARSE_*` flags can be used. See vkCreateBuffer and vkCreateImage for details of the resource creation APIs.

Note | Specifying VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT or VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT requires specifying VK_BUFFER_CREATE_SPARSE_BINDING_BIT or VK_IMAGE_CREATE_SPARSE_BINDING_BIT, respectively, as well. This means that resources must be created with the appropriate `*_SPARSE_BINDING_BIT` to be used with the sparse binding command (`vkQueueBindSparse`).

#### 39.7.5. Sparse Resource Memory Requirements

Sparse resources have specific memory requirements related to binding sparse memory. These memory requirements are reported differently for `VkBuffer` objects and `VkImage` objects.

##### Buffer and Fully-Resident Images

Buffers (both fully and partially resident) and fully-resident images can be bound to memory using only the data from `VkMemoryRequirements`. For all sparse resources the `VkMemoryRequirements`::`alignment` member specifies both the binding granularity in bytes and the required alignment of `VkDeviceMemory`.

##### Partially Resident Images

Partially resident images have a different method for binding memory. As with buffers and fully resident images, the `VkMemoryRequirements`::`alignment` field specifies the binding granularity in bytes for the image.

Requesting sparse memory requirements for `VkImage` objects using `vkGetImageSparseMemoryRequirements` will return an array of one or more `VkSparseImageMemoryRequirements` structures. Each structure describes the sparse memory requirements for a group of aspects of the image.

The sparse image must have been created using the VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT flag to retrieve valid sparse image memory requirements.

##### Sparse Image Memory Requirements

The `VkSparseImageMemoryRequirements` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkSparseImageMemoryRequirements {
        VkSparseImageFormatProperties    formatProperties;
        uint32_t                         imageMipTailFirstLod;
        VkDeviceSize                     imageMipTailSize;
        VkDeviceSize                     imageMipTailOffset;
        VkDeviceSize                     imageMipTailStride;
    } VkSparseImageMemoryRequirements;

- `formatProperties` is a VkSparseImageFormatProperties structure specifying properties of the image format.

- `imageMipTailFirstLod` is the first mip level at which image subresources are included in the mip tail region.

- `imageMipTailSize` is the memory size (in bytes) of the mip tail region. If `formatProperties.flags` contains VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT, this is the size of the whole mip tail, otherwise this is the size of the mip tail of a single array layer. This value is guaranteed to be a multiple of the sparse block size in bytes.

- `imageMipTailOffset` is the opaque memory offset used with VkSparseImageOpaqueMemoryBindInfo to bind the mip tail region(s).

- `imageMipTailStride` is the offset stride between each array-layer’s mip tail, if `formatProperties.flags` does not contain VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT (otherwise the value is undefined).

To query sparse memory requirements for an image, call:

    // Provided by VK_VERSION_1_0
    void vkGetImageSparseMemoryRequirements(
        VkDevice                                    device,
        VkImage                                     image,
        uint32_t*                                   pSparseMemoryRequirementCount,
        VkSparseImageMemoryRequirements*            pSparseMemoryRequirements);

- `device` is the logical device that owns the image.

- `image` is the VkImage object to get the memory requirements for.

- `pSparseMemoryRequirementCount` is a pointer to an integer related to the number of sparse memory requirements available or queried, as described below.

- `pSparseMemoryRequirements` is either `NULL` or a pointer to an array of `VkSparseImageMemoryRequirements` structures.

If `pSparseMemoryRequirements` is `NULL`, then the number of sparse memory requirements available is returned in `pSparseMemoryRequirementCount`. Otherwise, `pSparseMemoryRequirementCount` must point to a variable set by the application to the number of elements in the `pSparseMemoryRequirements` array, and on return the variable is overwritten with the number of structures actually written to `pSparseMemoryRequirements`. If `pSparseMemoryRequirementCount` is less than the number of sparse memory requirements available, at most `pSparseMemoryRequirementCount` structures will be written.

If the image was not created with VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT then `pSparseMemoryRequirementCount` will be zero and `pSparseMemoryRequirements` will not be written to.

Note | It is legal for an implementation to report a larger value in `VkMemoryRequirements`::`size` than would be obtained by adding together memory sizes for all `VkSparseImageMemoryRequirements` returned by `vkGetImageSparseMemoryRequirements`. This may occur when the implementation requires unused padding in the address range describing the resource.

Valid Usage (Implicit)

- VUID-vkGetImageSparseMemoryRequirements-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetImageSparseMemoryRequirements-image-parameter
  `image` must be a valid VkImage handle

- VUID-vkGetImageSparseMemoryRequirements-pSparseMemoryRequirementCount-parameter
  `pSparseMemoryRequirementCount` must be a valid pointer to a `uint32_t` value

- VUID-vkGetImageSparseMemoryRequirements-pSparseMemoryRequirements-parameter
  If the value referenced by `pSparseMemoryRequirementCount` is not `0`, and `pSparseMemoryRequirements` is not `NULL`, `pSparseMemoryRequirements` must be a valid pointer to an array of `pSparseMemoryRequirementCount` VkSparseImageMemoryRequirements structures

- VUID-vkGetImageSparseMemoryRequirements-image-parent
  `image` must have been created, allocated, or retrieved from `device`

To query sparse memory requirements for an image, call:

    // Provided by VK_VERSION_1_1
    void vkGetImageSparseMemoryRequirements2(
        VkDevice                                    device,
        const VkImageSparseMemoryRequirementsInfo2* pInfo,
        uint32_t*                                   pSparseMemoryRequirementCount,
        VkSparseImageMemoryRequirements2*           pSparseMemoryRequirements);

    // Provided by VK_KHR_get_memory_requirements2
    // Equivalent to vkGetImageSparseMemoryRequirements2
    void vkGetImageSparseMemoryRequirements2KHR(
        VkDevice                                    device,
        const VkImageSparseMemoryRequirementsInfo2* pInfo,
        uint32_t*                                   pSparseMemoryRequirementCount,
        VkSparseImageMemoryRequirements2*           pSparseMemoryRequirements);

- `device` is the logical device that owns the image.

- `pInfo` is a pointer to a VkImageSparseMemoryRequirementsInfo2 structure containing parameters required for the memory requirements query.

- `pSparseMemoryRequirementCount` is a pointer to an integer related to the number of sparse memory requirements available or queried, as described below.

- `pSparseMemoryRequirements` is either `NULL` or a pointer to an array of `VkSparseImageMemoryRequirements2` structures.

Valid Usage (Implicit)

- VUID-vkGetImageSparseMemoryRequirements2-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetImageSparseMemoryRequirements2-pInfo-parameter
  `pInfo` must be a valid pointer to a valid VkImageSparseMemoryRequirementsInfo2 structure

- VUID-vkGetImageSparseMemoryRequirements2-pSparseMemoryRequirementCount-parameter
  `pSparseMemoryRequirementCount` must be a valid pointer to a `uint32_t` value

- VUID-vkGetImageSparseMemoryRequirements2-pSparseMemoryRequirements-parameter
  If the value referenced by `pSparseMemoryRequirementCount` is not `0`, and `pSparseMemoryRequirements` is not `NULL`, `pSparseMemoryRequirements` must be a valid pointer to an array of `pSparseMemoryRequirementCount` VkSparseImageMemoryRequirements2 structures

To determine the sparse memory requirements for an image resource without creating an object, call:

    // Provided by VK_VERSION_1_3
    void vkGetDeviceImageSparseMemoryRequirements(
        VkDevice                                    device,
        const VkDeviceImageMemoryRequirements*      pInfo,
        uint32_t*                                   pSparseMemoryRequirementCount,
        VkSparseImageMemoryRequirements2*           pSparseMemoryRequirements);

    // Provided by VK_KHR_maintenance4
    // Equivalent to vkGetDeviceImageSparseMemoryRequirements
    void vkGetDeviceImageSparseMemoryRequirementsKHR(
        VkDevice                                    device,
        const VkDeviceImageMemoryRequirements*      pInfo,
        uint32_t*                                   pSparseMemoryRequirementCount,
        VkSparseImageMemoryRequirements2*           pSparseMemoryRequirements);

- `device` is the logical device intended to own the image.

- `pInfo` is a pointer to a VkDeviceImageMemoryRequirements structure containing parameters required for the memory requirements query.

- `pSparseMemoryRequirementCount` is a pointer to an integer related to the number of sparse memory requirements available or queried, as described below.

- `pSparseMemoryRequirements` is either `NULL` or a pointer to an array of `VkSparseImageMemoryRequirements2` structures.

Valid Usage (Implicit)

- VUID-vkGetDeviceImageSparseMemoryRequirements-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetDeviceImageSparseMemoryRequirements-pInfo-parameter
  `pInfo` must be a valid pointer to a valid VkDeviceImageMemoryRequirements structure

- VUID-vkGetDeviceImageSparseMemoryRequirements-pSparseMemoryRequirementCount-parameter
  `pSparseMemoryRequirementCount` must be a valid pointer to a `uint32_t` value

- VUID-vkGetDeviceImageSparseMemoryRequirements-pSparseMemoryRequirements-parameter
  If the value referenced by `pSparseMemoryRequirementCount` is not `0`, and `pSparseMemoryRequirements` is not `NULL`, `pSparseMemoryRequirements` must be a valid pointer to an array of `pSparseMemoryRequirementCount` VkSparseImageMemoryRequirements2 structures

The `VkImageSparseMemoryRequirementsInfo2` structure is defined as:

    // Provided by VK_VERSION_1_1
    typedef struct VkImageSparseMemoryRequirementsInfo2 {
        VkStructureType    sType;
        const void*        pNext;
        VkImage            image;
    } VkImageSparseMemoryRequirementsInfo2;

    // Provided by VK_KHR_get_memory_requirements2
    // Equivalent to VkImageSparseMemoryRequirementsInfo2
    typedef VkImageSparseMemoryRequirementsInfo2 VkImageSparseMemoryRequirementsInfo2KHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `image` is the image to query.

Valid Usage (Implicit)

- VUID-VkImageSparseMemoryRequirementsInfo2-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2

- VUID-VkImageSparseMemoryRequirementsInfo2-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkImageSparseMemoryRequirementsInfo2-image-parameter
  `image` must be a valid VkImage handle

The `VkSparseImageMemoryRequirements2` structure is defined as:

    // Provided by VK_VERSION_1_1
    typedef struct VkSparseImageMemoryRequirements2 {
        VkStructureType                    sType;
        void*                              pNext;
        VkSparseImageMemoryRequirements    memoryRequirements;
    } VkSparseImageMemoryRequirements2;

    // Provided by VK_KHR_get_memory_requirements2
    // Equivalent to VkSparseImageMemoryRequirements2
    typedef VkSparseImageMemoryRequirements2 VkSparseImageMemoryRequirements2KHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `memoryRequirements` is a VkSparseImageMemoryRequirements structure describing the memory requirements of the sparse image.

Valid Usage (Implicit)

- VUID-VkSparseImageMemoryRequirements2-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2

- VUID-VkSparseImageMemoryRequirements2-pNext-pNext
  `pNext` must be `NULL`

#### 39.7.6. Binding Resource Memory

Non-sparse resources are backed by a single physical allocation prior to device use (via `vkBindImageMemory` or `vkBindBufferMemory`), and their backing must not be changed. On the other hand, sparse resources can be bound to memory non-contiguously and these bindings can be altered during the lifetime of the resource.

Note | It is important to note that freeing a `VkDeviceMemory` object with `vkFreeMemory` will not cause resources (or resource regions) bound to the memory object to become unbound. Applications must not access resources bound to memory that has been freed.

Sparse memory bindings execute on a queue that includes the VK_QUEUE_SPARSE_BINDING_BIT bit. Applications must use synchronization primitives to guarantee that other queues do not access ranges of memory concurrently with a binding change. Applications can access other ranges of the same resource while a bind operation is executing.

Note | Implementations must provide a guarantee that simultaneously binding sparse blocks while another queue accesses those same sparse blocks via a sparse resource must not access memory owned by another process or otherwise corrupt the system.

While some implementations may include VK_QUEUE_SPARSE_BINDING_BIT support in queue families that also include graphics and compute support, other implementations may only expose a VK_QUEUE_SPARSE_BINDING_BIT-only queue family. In either case, applications must use synchronization primitives to explicitly request any ordering dependencies between sparse memory binding operations and other graphics/compute/transfer operations, as sparse binding operations are not automatically ordered against command buffer execution, even within a single queue.

When binding memory explicitly for the VK_IMAGE_ASPECT_METADATA_BIT the application must use the VK_SPARSE_MEMORY_BIND_METADATA_BIT in the `VkSparseMemoryBind`::`flags` field when binding memory. Binding memory for metadata is done the same way as binding memory for the mip tail, with the addition of the VK_SPARSE_MEMORY_BIND_METADATA_BIT flag.

Binding the mip tail for any aspect must only be performed using VkSparseImageOpaqueMemoryBindInfo. If `formatProperties.flags` contains VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT, then it can be bound with a single VkSparseMemoryBind structure, with `resourceOffset` = `imageMipTailOffset` and `size` = `imageMipTailSize`.

If `formatProperties.flags` does not contain VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT then the offset for the mip tail in each array layer is given as:

    arrayMipTailOffset = imageMipTailOffset + arrayLayer * imageMipTailStride;

and the mip tail can be bound with `layerCount` VkSparseMemoryBind structures, each using `size` = `imageMipTailSize` and `resourceOffset` = `arrayMipTailOffset` as defined above.

Sparse memory binding is handled by the following APIs and related data structures.

##### Sparse Memory Binding Functions

The `VkSparseMemoryBind` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkSparseMemoryBind {
        VkDeviceSize               resourceOffset;
        VkDeviceSize               size;
        VkDeviceMemory             memory;
        VkDeviceSize               memoryOffset;
        VkSparseMemoryBindFlags    flags;
    } VkSparseMemoryBind;

- `resourceOffset` is the offset into the resource.

- `size` is the size of the memory region to be bound.

- `memory` is the VkDeviceMemory object that the range of the resource is bound to. If `memory` is VK_NULL_HANDLE, the range is unbound.

- `memoryOffset` is the offset into the VkDeviceMemory object to bind the resource range to. If `memory` is VK_NULL_HANDLE, this value is ignored.

- `flags` is a bitmask of VkSparseMemoryBindFlagBits specifying usage of the binding operation.

The binding range [`resourceOffset`, `resourceOffset` + `size`) has different constraints based on `flags`. If `flags` contains VK_SPARSE_MEMORY_BIND_METADATA_BIT, the binding range must be within the mip tail region of the metadata aspect. This metadata region is defined by:

  metadataRegion = [base, base + `imageMipTailSize`)

  base = `imageMipTailOffset` + `imageMipTailStride` × n

and `imageMipTailOffset`, `imageMipTailSize`, and `imageMipTailStride` values are from the VkSparseImageMemoryRequirements corresponding to the metadata aspect of the image, and n is a valid array layer index for the image,

`imageMipTailStride` is considered to be zero for aspects where `VkSparseImageMemoryRequirements`::`formatProperties.flags` contains VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT.

If `flags` does not contain VK_SPARSE_MEMORY_BIND_METADATA_BIT, the binding range must be within the range [0,VkMemoryRequirements::`size`).

Valid Usage

- VUID-VkSparseMemoryBind-memory-01096
  If `memory` is not VK_NULL_HANDLE, `memory` and `memoryOffset` must match the memory requirements of the resource, as described in section Resource Memory Association

- VUID-VkSparseMemoryBind-resourceOffset-09491
  If the resource being bound is a `VkBuffer`, `resourceOffset`, `memoryOffset` and `size` must be an integer multiple of the `alignment` of the VkMemoryRequirements structure returned from a call to vkGetBufferMemoryRequirements with the buffer resource

- VUID-VkSparseMemoryBind-resourceOffset-09492
  If the resource being bound is a `VkImage`, `resourceOffset` and `memoryOffset` must be an integer multiple of the `alignment` of the VkMemoryRequirements structure returned from a call to vkGetImageMemoryRequirements with the image resource

- VUID-VkSparseMemoryBind-memory-01097
  If `memory` is not VK_NULL_HANDLE, `memory` must not have been created with a memory type that reports VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT bit set

- VUID-VkSparseMemoryBind-size-01098
  `size` must be greater than `0`

- VUID-VkSparseMemoryBind-resourceOffset-01099
  `resourceOffset` must be less than the size of the resource

- VUID-VkSparseMemoryBind-size-01100
  `size` must be less than or equal to the size of the resource minus `resourceOffset`

- VUID-VkSparseMemoryBind-memoryOffset-01101
  `memoryOffset` must be less than the size of `memory`

- VUID-VkSparseMemoryBind-size-01102
  `size` must be less than or equal to the size of `memory` minus `memoryOffset`

- VUID-VkSparseMemoryBind-memory-02730
  If `memory` was created with VkExportMemoryAllocateInfo::`handleTypes` not equal to `0`, at least one handle type it contained must also have been set in VkExternalMemoryBufferCreateInfo::`handleTypes` or VkExternalMemoryImageCreateInfo::`handleTypes` when the resource was created

- VUID-VkSparseMemoryBind-memory-02731
  If `memory` was created by a memory import operation, the external handle type of the imported memory must also have been set in VkExternalMemoryBufferCreateInfo::`handleTypes` or VkExternalMemoryImageCreateInfo::`handleTypes` when the resource was created

Valid Usage (Implicit)

- VUID-VkSparseMemoryBind-memory-parameter
  If `memory` is not VK_NULL_HANDLE, `memory` must be a valid VkDeviceMemory handle

- VUID-VkSparseMemoryBind-flags-parameter
  `flags` must be a valid combination of VkSparseMemoryBindFlagBits values

Bits which can be set in VkSparseMemoryBind::`flags`, specifying usage of a sparse memory binding operation, are:

    // Provided by VK_VERSION_1_0
    typedef enum VkSparseMemoryBindFlagBits {
        VK_SPARSE_MEMORY_BIND_METADATA_BIT = 0x00000001,
    } VkSparseMemoryBindFlagBits;

- VK_SPARSE_MEMORY_BIND_METADATA_BIT specifies that the memory being bound is only for the metadata aspect.

    // Provided by VK_VERSION_1_0
    typedef VkFlags VkSparseMemoryBindFlags;

`VkSparseMemoryBindFlags` is a bitmask type for setting a mask of zero or more VkSparseMemoryBindFlagBits.

Memory is bound to `VkBuffer` objects created with the VK_BUFFER_CREATE_SPARSE_BINDING_BIT flag using the following structure:

    // Provided by VK_VERSION_1_0
    typedef struct VkSparseBufferMemoryBindInfo {
        VkBuffer                     buffer;
        uint32_t                     bindCount;
        const VkSparseMemoryBind*    pBinds;
    } VkSparseBufferMemoryBindInfo;

- `buffer` is the VkBuffer object to be bound.

- `bindCount` is the number of VkSparseMemoryBind structures in the `pBinds` array.

- `pBinds` is a pointer to an array of VkSparseMemoryBind structures.

Valid Usage (Implicit)

- VUID-VkSparseBufferMemoryBindInfo-buffer-parameter
  `buffer` must be a valid VkBuffer handle

- VUID-VkSparseBufferMemoryBindInfo-pBinds-parameter
  `pBinds` must be a valid pointer to an array of `bindCount` valid VkSparseMemoryBind structures

- VUID-VkSparseBufferMemoryBindInfo-bindCount-arraylength
  `bindCount` must be greater than `0`

Memory is bound to opaque regions of `VkImage` objects created with the VK_IMAGE_CREATE_SPARSE_BINDING_BIT flag using the following structure:

    // Provided by VK_VERSION_1_0
    typedef struct VkSparseImageOpaqueMemoryBindInfo {
        VkImage                      image;
        uint32_t                     bindCount;
        const VkSparseMemoryBind*    pBinds;
    } VkSparseImageOpaqueMemoryBindInfo;

- `image` is the VkImage object to be bound.

- `bindCount` is the number of VkSparseMemoryBind structures in the `pBinds` array.

- `pBinds` is a pointer to an array of VkSparseMemoryBind structures.

Note | This structure is normally used to bind memory to fully-resident sparse images or for mip tail regions of partially resident images. However, it can also be used to bind memory for the entire binding range of partially resident images. If the `pBinds`[i].flags of an element i of `pBinds` does not contain VK_SPARSE_MEMORY_BIND_METADATA_BIT, the `resourceOffset` is in the range [0, VkMemoryRequirements::`size`), This range includes data from all aspects of the image, including metadata. For most implementations this will probably mean that the `resourceOffset` is a simple device address offset within the resource. It is possible for an application to bind a range of memory that includes both resource data and metadata. However, the application would not know what part of the image the memory is used for, or if any range is being used for metadata. If the `pBinds`[i].flags of an element i of `pBinds` contains VK_SPARSE_MEMORY_BIND_METADATA_BIT, the binding range specified must be within the mip tail region of the metadata aspect. In this case the `resourceOffset` is not required to be a simple device address offset within the resource. However, it is defined to be within [`imageMipTailOffset`, `imageMipTailOffset` + `imageMipTailSize`) for the metadata aspect. See VkSparseMemoryBind for the full constraints on binding region with this flag present.

Valid Usage

- VUID-VkSparseImageOpaqueMemoryBindInfo-pBinds-01103
  If the `flags` member of any element of `pBinds` contains VK_SPARSE_MEMORY_BIND_METADATA_BIT, the binding range defined must be within the mip tail region of the metadata aspect of `image`

Valid Usage (Implicit)

- VUID-VkSparseImageOpaqueMemoryBindInfo-image-parameter
  `image` must be a valid VkImage handle

- VUID-VkSparseImageOpaqueMemoryBindInfo-pBinds-parameter
  `pBinds` must be a valid pointer to an array of `bindCount` valid VkSparseMemoryBind structures

- VUID-VkSparseImageOpaqueMemoryBindInfo-bindCount-arraylength
  `bindCount` must be greater than `0`

Memory can be bound to sparse image blocks of `VkImage` objects created with the VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT flag using the following structure:

    // Provided by VK_VERSION_1_0
    typedef struct VkSparseImageMemoryBindInfo {
        VkImage                           image;
        uint32_t                          bindCount;
        const VkSparseImageMemoryBind*    pBinds;
    } VkSparseImageMemoryBindInfo;

- `image` is the VkImage object to be bound

- `bindCount` is the number of VkSparseImageMemoryBind structures in `pBinds` array

- `pBinds` is a pointer to an array of VkSparseImageMemoryBind structures

Valid Usage

- VUID-VkSparseImageMemoryBindInfo-subresource-01722
  The `subresource.mipLevel` member of each element of `pBinds` must be less than the `mipLevels` specified in VkImageCreateInfo when `image` was created

- VUID-VkSparseImageMemoryBindInfo-subresource-01723
  The `subresource.arrayLayer` member of each element of `pBinds` must be less than the `arrayLayers` specified in VkImageCreateInfo when `image` was created

- VUID-VkSparseImageMemoryBindInfo-subresource-01106
  The `subresource.aspectMask` member of each element of `pBinds` must be valid for the `format` specified in VkImageCreateInfo when `image` was created

- VUID-VkSparseImageMemoryBindInfo-image-02901
  `image` must have been created with VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT set

Valid Usage (Implicit)

- VUID-VkSparseImageMemoryBindInfo-image-parameter
  `image` must be a valid VkImage handle

- VUID-VkSparseImageMemoryBindInfo-pBinds-parameter
  `pBinds` must be a valid pointer to an array of `bindCount` valid VkSparseImageMemoryBind structures

- VUID-VkSparseImageMemoryBindInfo-bindCount-arraylength
  `bindCount` must be greater than `0`

The `VkSparseImageMemoryBind` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkSparseImageMemoryBind {
        VkImageSubresource         subresource;
        VkOffset3D                 offset;
        VkExtent3D                 extent;
        VkDeviceMemory             memory;
        VkDeviceSize               memoryOffset;
        VkSparseMemoryBindFlags    flags;
    } VkSparseImageMemoryBind;

- `subresource` is the image aspect and region of interest in the image.

- `offset` are the coordinates of the first texel within the image subresource to bind.

- `extent` is the size in texels of the region within the image subresource to bind. The extent must be a multiple of the sparse image block dimensions, except when binding sparse image blocks along the edge of an image subresource it can instead be such that any coordinate of `offset` + `extent` equals the corresponding dimensions of the image subresource.

- `memory` is the VkDeviceMemory object that the sparse image blocks of the image are bound to. If `memory` is VK_NULL_HANDLE, the sparse image blocks are unbound.

- `memoryOffset` is an offset into VkDeviceMemory object. If `memory` is VK_NULL_HANDLE, this value is ignored.

- `flags` are sparse memory binding flags.

Valid Usage

- VUID-VkSparseImageMemoryBind-memory-01104
  If the `sparseResidencyAliased` feature is not enabled, and if any other resources are bound to ranges of `memory`, the range of `memory` being bound must not overlap with those bound ranges

- VUID-VkSparseImageMemoryBind-memory-01105
  `memory` and `memoryOffset` must match the memory requirements of the calling command’s `image`, as described in section Resource Memory Association

- VUID-VkSparseImageMemoryBind-offset-01107
  `offset.x` must be a multiple of the sparse image block width (`VkSparseImageFormatProperties`::`imageGranularity.width`) of the image

- VUID-VkSparseImageMemoryBind-extent-09388
  `extent.width` must be greater than `0`

- VUID-VkSparseImageMemoryBind-extent-01108
  `extent.width` must either be a multiple of the sparse image block width of the image, or else (`extent.width` + `offset.x`) must equal the width of the image subresource

- VUID-VkSparseImageMemoryBind-offset-01109
  `offset.y` must be a multiple of the sparse image block height (`VkSparseImageFormatProperties`::`imageGranularity.height`) of the image

- VUID-VkSparseImageMemoryBind-extent-09389
  `extent.height` must be greater than `0`

- VUID-VkSparseImageMemoryBind-extent-01110
  `extent.height` must either be a multiple of the sparse image block height of the image, or else (`extent.height` + `offset.y`) must equal the height of the image subresource

- VUID-VkSparseImageMemoryBind-offset-01111
  `offset.z` must be a multiple of the sparse image block depth (`VkSparseImageFormatProperties`::`imageGranularity.depth`) of the image

- VUID-VkSparseImageMemoryBind-extent-09390
  `extent.depth` must be greater than `0`

- VUID-VkSparseImageMemoryBind-extent-01112
  `extent.depth` must either be a multiple of the sparse image block depth of the image, or else (`extent.depth` + `offset.z`) must equal the depth of the image subresource

- VUID-VkSparseImageMemoryBind-memory-02732
  If `memory` was created with VkExportMemoryAllocateInfo::`handleTypes` not equal to `0`, at least one handle type it contained must also have been set in VkExternalMemoryImageCreateInfo::`handleTypes` when the image was created

- VUID-VkSparseImageMemoryBind-memory-02733
  If `memory` was created by a memory import operation, the external handle type of the imported memory must also have been set in VkExternalMemoryImageCreateInfo::`handleTypes` when `image` was created

Valid Usage (Implicit)

- VUID-VkSparseImageMemoryBind-subresource-parameter
  `subresource` must be a valid VkImageSubresource structure

- VUID-VkSparseImageMemoryBind-memory-parameter
  If `memory` is not VK_NULL_HANDLE, `memory` must be a valid VkDeviceMemory handle

- VUID-VkSparseImageMemoryBind-flags-parameter
  `flags` must be a valid combination of VkSparseMemoryBindFlagBits values

To submit sparse binding operations to a queue, call:

    // Provided by VK_VERSION_1_0
    VkResult vkQueueBindSparse(
        VkQueue                                     queue,
        uint32_t                                    bindInfoCount,
        const VkBindSparseInfo*                     pBindInfo,
        VkFence                                     fence);

- `queue` is the queue that the sparse binding operations will be submitted to.

- `bindInfoCount` is the number of elements in the `pBindInfo` array.

- `pBindInfo` is a pointer to an array of VkBindSparseInfo structures, each specifying a sparse binding submission batch.

- `fence` is an optional handle to a fence to be signaled. If `fence` is not VK_NULL_HANDLE, it defines a fence signal operation.

`vkQueueBindSparse` is a queue submission command, with each batch defined by an element of `pBindInfo` as a VkBindSparseInfo structure. Batches begin execution in the order they appear in `pBindInfo`, but may complete out of order.

Within a batch, a given range of a resource must not be bound more than once. Across batches, if a range is to be bound to one allocation and offset and then to another allocation and offset, then the application must guarantee (usually using semaphores) that the binding operations are executed in the correct order, as well as to order binding operations against the execution of command buffer submissions.

As no operation to vkQueueBindSparse causes any pipeline stage to access memory, synchronization primitives used in this command effectively only define execution dependencies.

Additional information about fence and semaphore operation is described in the synchronization chapter.

Valid Usage

- VUID-vkQueueBindSparse-fence-01113
  If `fence` is not VK_NULL_HANDLE, `fence` must be unsignaled

- VUID-vkQueueBindSparse-fence-01114
  If `fence` is not VK_NULL_HANDLE, `fence` must not be associated with any other queue command that has not yet completed execution on that queue

- VUID-vkQueueBindSparse-pSignalSemaphores-01115
  Each element of the `pSignalSemaphores` member of each element of `pBindInfo` must be unsignaled when the semaphore signal operation it defines is executed on the device

- VUID-vkQueueBindSparse-pWaitSemaphores-01116
  When a semaphore wait operation referring to a binary semaphore defined by any element of the `pWaitSemaphores` member of any element of `pBindInfo` executes on `queue`, there must be no other queues waiting on the same semaphore

- VUID-vkQueueBindSparse-pWaitSemaphores-03245
  All elements of the `pWaitSemaphores` member of all elements of `pBindInfo` referring to a semaphore created with a VkSemaphoreType of VK_SEMAPHORE_TYPE_BINARY must reference a semaphore signal operation that has been submitted for execution and any semaphore signal operations on which it depends must have also been submitted for execution

Valid Usage (Implicit)

- VUID-vkQueueBindSparse-queue-parameter
  `queue` must be a valid VkQueue handle

- VUID-vkQueueBindSparse-pBindInfo-parameter
  If `bindInfoCount` is not `0`, `pBindInfo` must be a valid pointer to an array of `bindInfoCount` valid VkBindSparseInfo structures

- VUID-vkQueueBindSparse-fence-parameter
  If `fence` is not VK_NULL_HANDLE, `fence` must be a valid VkFence handle

- VUID-vkQueueBindSparse-queuetype
  The `queue` must support VK_QUEUE_SPARSE_BINDING_BIT operations

- VUID-vkQueueBindSparse-commonparent
  Both of `fence`, and `queue` that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `queue` must be externally synchronized if it was not created with VK_DEVICE_QUEUE_CREATE_INTERNALLY_SYNCHRONIZED_BIT_KHR

- Host access to `fence` must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
- | - | - | VK_QUEUE_SPARSE_BINDING_BIT | -

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_DEVICE_LOST

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkBindSparseInfo` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkBindSparseInfo {
        VkStructureType                             sType;
        const void*                                 pNext;
        uint32_t                                    waitSemaphoreCount;
        const VkSemaphore*                          pWaitSemaphores;
        uint32_t                                    bufferBindCount;
        const VkSparseBufferMemoryBindInfo*         pBufferBinds;
        uint32_t                                    imageOpaqueBindCount;
        const VkSparseImageOpaqueMemoryBindInfo*    pImageOpaqueBinds;
        uint32_t                                    imageBindCount;
        const VkSparseImageMemoryBindInfo*          pImageBinds;
        uint32_t                                    signalSemaphoreCount;
        const VkSemaphore*                          pSignalSemaphores;
    } VkBindSparseInfo;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `waitSemaphoreCount` is the number of semaphores upon which to wait before executing the sparse binding operations for the batch.

- `pWaitSemaphores` is a pointer to an array of semaphores upon which to wait on before the sparse binding operations for this batch begin execution. If semaphores to wait on are provided, they define a semaphore wait operation.

- `bufferBindCount` is the number of sparse buffer bindings to perform in the batch.

- `pBufferBinds` is a pointer to an array of VkSparseBufferMemoryBindInfo structures.

- `imageOpaqueBindCount` is the number of opaque sparse image bindings to perform.

- `pImageOpaqueBinds` is a pointer to an array of VkSparseImageOpaqueMemoryBindInfo structures, indicating opaque sparse image bindings to perform.

- `imageBindCount` is the number of sparse image bindings to perform.

- `pImageBinds` is a pointer to an array of VkSparseImageMemoryBindInfo structures, indicating sparse image bindings to perform.

- `signalSemaphoreCount` is the number of semaphores to be signaled once the sparse binding operations specified by the structure have completed execution.

- `pSignalSemaphores` is a pointer to an array of semaphores which will be signaled when the sparse binding operations for this batch have completed execution. If semaphores to be signaled are provided, they define a semaphore signal operation.

The first synchronization scope of each semaphore signal operation defined by this structure includes all sparse binding operations defined by this structure.

The second synchronization scope of each semaphore wait operation defined by this structure includes all sparse binding operations defined by this structure.

Valid Usage

- VUID-VkBindSparseInfo-pWaitSemaphores-03246
  If any element of `pWaitSemaphores` or `pSignalSemaphores` was created with a VkSemaphoreType of VK_SEMAPHORE_TYPE_TIMELINE then the `pNext` chain must include a VkTimelineSemaphoreSubmitInfo structure

- VUID-VkBindSparseInfo-pNext-03247
  If the `pNext` chain of this structure includes a VkTimelineSemaphoreSubmitInfo structure and any element of `pWaitSemaphores` was created with a VkSemaphoreType of VK_SEMAPHORE_TYPE_TIMELINE then its `waitSemaphoreValueCount` member must equal `waitSemaphoreCount`

- VUID-VkBindSparseInfo-pNext-03248
  If the `pNext` chain of this structure includes a VkTimelineSemaphoreSubmitInfo structure and any element of `pSignalSemaphores` was created with a VkSemaphoreType of VK_SEMAPHORE_TYPE_TIMELINE then its `signalSemaphoreValueCount` member must equal `signalSemaphoreCount`

- VUID-VkBindSparseInfo-pSignalSemaphores-03249
  For each element of `pSignalSemaphores` created with a VkSemaphoreType of VK_SEMAPHORE_TYPE_TIMELINE the corresponding element of VkTimelineSemaphoreSubmitInfo::`pSignalSemaphoreValues` must have a value greater than the current value of the semaphore when the semaphore signal operation is executed

- VUID-VkBindSparseInfo-pWaitSemaphores-03250
  For each element of `pWaitSemaphores` created with a VkSemaphoreType of VK_SEMAPHORE_TYPE_TIMELINE the corresponding element of VkTimelineSemaphoreSubmitInfo::`pWaitSemaphoreValues` must have a value which does not differ from the current value of the semaphore or from the value of any outstanding semaphore wait or signal operation on that semaphore by more than `maxTimelineSemaphoreValueDifference`

- VUID-VkBindSparseInfo-pSignalSemaphores-03251
  For each element of `pSignalSemaphores` created with a VkSemaphoreType of VK_SEMAPHORE_TYPE_TIMELINE the corresponding element of VkTimelineSemaphoreSubmitInfo::`pSignalSemaphoreValues` must have a value which does not differ from the current value of the semaphore or from the value of any outstanding semaphore wait or signal operation on that semaphore by more than `maxTimelineSemaphoreValueDifference`

- VUID-VkBindSparseInfo-pNext-09753
  If the `pNext` chain of this structure includes a VkFrameBoundaryTensorsARM structure then it must also include a VkFrameBoundaryEXT structure

Valid Usage (Implicit)

- VUID-VkBindSparseInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_BIND_SPARSE_INFO

- VUID-VkBindSparseInfo-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkDeviceGroupBindSparseInfo, VkFrameBoundaryEXT, VkFrameBoundaryTensorsARM, or VkTimelineSemaphoreSubmitInfo

- VUID-VkBindSparseInfo-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkBindSparseInfo-pWaitSemaphores-parameter
  If `waitSemaphoreCount` is not `0`, `pWaitSemaphores` must be a valid pointer to an array of `waitSemaphoreCount` valid VkSemaphore handles

- VUID-VkBindSparseInfo-pBufferBinds-parameter
  If `bufferBindCount` is not `0`, `pBufferBinds` must be a valid pointer to an array of `bufferBindCount` valid VkSparseBufferMemoryBindInfo structures

- VUID-VkBindSparseInfo-pImageOpaqueBinds-parameter
  If `imageOpaqueBindCount` is not `0`, `pImageOpaqueBinds` must be a valid pointer to an array of `imageOpaqueBindCount` valid VkSparseImageOpaqueMemoryBindInfo structures

- VUID-VkBindSparseInfo-pImageBinds-parameter
  If `imageBindCount` is not `0`, `pImageBinds` must be a valid pointer to an array of `imageBindCount` valid VkSparseImageMemoryBindInfo structures

- VUID-VkBindSparseInfo-pSignalSemaphores-parameter
  If `signalSemaphoreCount` is not `0`, `pSignalSemaphores` must be a valid pointer to an array of `signalSemaphoreCount` valid VkSemaphore handles

- VUID-VkBindSparseInfo-commonparent
  Both of the elements of `pSignalSemaphores`, and the elements of `pWaitSemaphores` that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevice

To specify the values to use when waiting for and signaling semaphores created with a VkSemaphoreType of VK_SEMAPHORE_TYPE_TIMELINE, add a VkTimelineSemaphoreSubmitInfo structure to the `pNext` chain of the VkBindSparseInfo structure.

If the `pNext` chain of VkBindSparseInfo includes a `VkDeviceGroupBindSparseInfo` structure, then that structure includes device indices specifying which instance of the resources and memory are bound.

The `VkDeviceGroupBindSparseInfo` structure is defined as:

    // Provided by VK_VERSION_1_1
    typedef struct VkDeviceGroupBindSparseInfo {
        VkStructureType    sType;
        const void*        pNext;
        uint32_t           resourceDeviceIndex;
        uint32_t           memoryDeviceIndex;
    } VkDeviceGroupBindSparseInfo;

    // Provided by VK_KHR_device_group
    // Equivalent to VkDeviceGroupBindSparseInfo
    typedef VkDeviceGroupBindSparseInfo VkDeviceGroupBindSparseInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `resourceDeviceIndex` is a device index indicating which instance of the resource is bound.

- `memoryDeviceIndex` is a device index indicating which instance of the memory the resource instance is bound to.

These device indices apply to all buffer and image memory binds included in the batch pointing to this structure. The semaphore waits and signals for the batch are executed only by the physical device specified by the `resourceDeviceIndex`.

If this structure is not present, `resourceDeviceIndex` and `memoryDeviceIndex` are assumed to be zero.

Valid Usage

- VUID-VkDeviceGroupBindSparseInfo-resourceDeviceIndex-01118
  `resourceDeviceIndex` and `memoryDeviceIndex` must both be valid device indices

- VUID-VkDeviceGroupBindSparseInfo-memoryDeviceIndex-01119
  Each memory allocation bound in this batch must have allocated an instance for `memoryDeviceIndex`

Valid Usage (Implicit)

- VUID-VkDeviceGroupBindSparseInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO

Structure Chaining

Extends the structure

  - VkBindSparseInfo

## 40. Window System Integration (WSI)

This chapter discusses the window system integration (WSI) between the Vulkan API and the various forms of displaying the results of rendering to a user. Since the Vulkan API can be used without displaying results, WSI is provided through the use of optional Vulkan extensions. This chapter provides an overview of WSI. See the appendix for additional details of each WSI extension, including which extensions must be enabled in order to use each of the functions described in this chapter.

### 40.1. WSI Platform

A platform is an abstraction for a window system, OS, etc. Some examples include MS Windows, Android, and Wayland. The Vulkan API may be integrated in a unique manner for each platform.

The Vulkan API does not define any type of platform object. Platform-specific WSI extensions are defined, each containing platform-specific functions for using WSI. Use of these extensions is guarded by preprocessor symbols as defined in the Window System-Specific Header Control appendix.

In order for an application to be compiled to use WSI with a given platform, it must either:

- `#define` the appropriate preprocessor symbol prior to including the `vulkan.h` header file, or

- include `vulkan_core.h` and any native platform headers, followed by the appropriate platform-specific header.

The preprocessor symbols and platform-specific headers are defined in the Window System Extensions and Headers table.

Each platform-specific extension is an instance extension. The application must enable instance extensions with `vkCreateInstance` before using them.

### 40.2. WSI Surface

Native platform surface or window objects are abstracted by surface objects, which are represented by `VkSurfaceKHR` handles:

    // Provided by VK_KHR_surface
    VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSurfaceKHR)

The `VK_KHR_surface` extension declares the `VkSurfaceKHR` object, and provides a function for destroying `VkSurfaceKHR` objects. Separate platform-specific extensions each provide a function for creating a `VkSurfaceKHR` object for the respective platform. From the application’s perspective this is an opaque handle, just like the handles of other Vulkan objects.

Note | On certain platforms, the Vulkan loader and ICDs may have conventions that treat the handle as a pointer to a structure containing the platform-specific information about the surface. This will be described in the documentation for the loader-ICD interface, and in the `vk_icd.h` header file of the LoaderAndTools source-code repository. This does not affect the loader-layer interface; layers may wrap `VkSurfaceKHR` objects.

#### 40.2.1. Android Platform

To create a `VkSurfaceKHR` object for an Android native window, call:

    // Provided by VK_KHR_android_surface
    VkResult vkCreateAndroidSurfaceKHR(
        VkInstance                                  instance,
        const VkAndroidSurfaceCreateInfoKHR*        pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkSurfaceKHR*                               pSurface);

- `instance` is the instance to associate the surface with.

- `pCreateInfo` is a pointer to a VkAndroidSurfaceCreateInfoKHR structure containing parameters affecting the creation of the surface object.

- `pAllocator` is the allocator used for host memory allocated for the surface object when there is no more specific allocator available (see Memory Allocation).

- `pSurface` is a pointer to a VkSurfaceKHR handle in which the created surface object is returned.

During the lifetime of a surface created using a particular ANativeWindow handle any attempts to create another surface for the same ANativeWindow and any attempts to connect to the same ANativeWindow through other platform mechanisms will fail.

Note | In particular, only one `VkSurfaceKHR` can exist at a time for a given window. Similarly, a native window cannot be used by both a `VkSurfaceKHR` and `EGLSurface` simultaneously.

If successful, `vkCreateAndroidSurfaceKHR` increments the ANativeWindow’s reference count, and `vkDestroySurfaceKHR` will decrement it.

On Android, when a swapchain’s `imageExtent` does not match the surface’s `currentExtent`, the presentable images will be scaled to the surface’s dimensions during presentation. `minImageExtent` is (1,1), and `maxImageExtent` is the maximum image size supported by the consumer. For the system compositor, `currentExtent` is the window size (i.e. the consumer’s preferred size).

Valid Usage (Implicit)

- VUID-vkCreateAndroidSurfaceKHR-instance-parameter
  `instance` must be a valid VkInstance handle

- VUID-vkCreateAndroidSurfaceKHR-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkAndroidSurfaceCreateInfoKHR structure

- VUID-vkCreateAndroidSurfaceKHR-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateAndroidSurfaceKHR-pSurface-parameter
  `pSurface` must be a valid pointer to a VkSurfaceKHR handle

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_NATIVE_WINDOW_IN_USE_KHR

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkAndroidSurfaceCreateInfoKHR` structure is defined as:

    // Provided by VK_KHR_android_surface
    typedef struct VkAndroidSurfaceCreateInfoKHR {
        VkStructureType                   sType;
        const void*                       pNext;
        VkAndroidSurfaceCreateFlagsKHR    flags;
        struct ANativeWindow*             window;
    } VkAndroidSurfaceCreateInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is reserved for future use.

- `window` is a pointer to the ANativeWindow to associate the surface with.

Valid Usage

- VUID-VkAndroidSurfaceCreateInfoKHR-window-01248
  `window` must point to a valid Android ANativeWindow

Valid Usage (Implicit)

- VUID-VkAndroidSurfaceCreateInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR

- VUID-VkAndroidSurfaceCreateInfoKHR-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkAndroidSurfaceCreateInfoKHR-flags-zerobitmask
  `flags` must be `0`

To remove an unnecessary compile time dependency, an incomplete type definition of ANativeWindow is provided in the Vulkan headers:

    // Provided by VK_KHR_android_surface
    struct ANativeWindow;

The actual ANativeWindow type is defined in Android NDK headers.

    // Provided by VK_KHR_android_surface
    typedef VkFlags VkAndroidSurfaceCreateFlagsKHR;

`VkAndroidSurfaceCreateFlagsKHR` is a bitmask type for setting a mask, but is currently reserved for future use.

#### 40.2.2. Wayland Platform

To create a `VkSurfaceKHR` object for a Wayland surface, call:

    // Provided by VK_KHR_wayland_surface
    VkResult vkCreateWaylandSurfaceKHR(
        VkInstance                                  instance,
        const VkWaylandSurfaceCreateInfoKHR*        pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkSurfaceKHR*                               pSurface);

- `instance` is the instance to associate the surface with.

- `pCreateInfo` is a pointer to a VkWaylandSurfaceCreateInfoKHR structure containing parameters affecting the creation of the surface object.

- `pAllocator` is the allocator used for host memory allocated for the surface object when there is no more specific allocator available (see Memory Allocation).

- `pSurface` is a pointer to a VkSurfaceKHR handle in which the created surface object is returned.

Valid Usage (Implicit)

- VUID-vkCreateWaylandSurfaceKHR-instance-parameter
  `instance` must be a valid VkInstance handle

- VUID-vkCreateWaylandSurfaceKHR-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkWaylandSurfaceCreateInfoKHR structure

- VUID-vkCreateWaylandSurfaceKHR-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateWaylandSurfaceKHR-pSurface-parameter
  `pSurface` must be a valid pointer to a VkSurfaceKHR handle

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkWaylandSurfaceCreateInfoKHR` structure is defined as:

    // Provided by VK_KHR_wayland_surface
    typedef struct VkWaylandSurfaceCreateInfoKHR {
        VkStructureType                   sType;
        const void*                       pNext;
        VkWaylandSurfaceCreateFlagsKHR    flags;
        struct wl_display*                display;
        struct wl_surface*                surface;
    } VkWaylandSurfaceCreateInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is reserved for future use.

- `display` and `surface` are pointers to the Wayland `wl_display` and `wl_surface` to associate the surface with.

Valid Usage

- VUID-VkWaylandSurfaceCreateInfoKHR-display-01304
  `display` must point to a valid Wayland `wl_display`

- VUID-VkWaylandSurfaceCreateInfoKHR-surface-01305
  `surface` must point to a valid Wayland `wl_surface`

Valid Usage (Implicit)

- VUID-VkWaylandSurfaceCreateInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR

- VUID-VkWaylandSurfaceCreateInfoKHR-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkWaylandSurfaceCreateInfoKHR-flags-zerobitmask
  `flags` must be `0`

On Wayland, `currentExtent` is the special value (0xFFFFFFFF, 0xFFFFFFFF), indicating that the surface size will be determined by the extent of a swapchain targeting the surface. Whatever the application sets a swapchain’s `imageExtent` to will be the size of the window, after the first image is presented. `minImageExtent` is (1,1), and `maxImageExtent` is the maximum supported surface size. Any calls to vkGetPhysicalDeviceSurfacePresentModesKHR on a surface created with `vkCreateWaylandSurfaceKHR` are required to return VK_PRESENT_MODE_MAILBOX_KHR as one of the valid present modes.

Some Vulkan functions may send protocol over the specified `wl_display` connection when using a swapchain or presentable images created from a `VkSurfaceKHR` referring to a `wl_surface`. Applications must therefore ensure that both the `wl_display` and the `wl_surface` remain valid for the lifetime of any `VkSwapchainKHR` objects created from a particular `wl_display` and `wl_surface`. Also, calling vkQueuePresentKHR will result in Vulkan sending `wl_surface.commit` requests to the underlying `wl_surface` of each The `wl_surface.attach`, `wl_surface.damage`, and `wl_surface.commit` requests must be issued by the implementation during the call to vkQueuePresentKHR and must not be issued by the implementation outside of vkQueuePresentKHR. This ensures that any Wayland requests sent by the client after the call to vkQueuePresentKHR returns will be received by the compositor after the `wl_surface.commit`. Regardless of the mode of swapchain creation, a new `wl_event_queue` must be created for each successful vkCreateWaylandSurfaceKHR call, and every Wayland object created by the implementation must be assigned to this event queue. If the platform provides Wayland 1.11 or greater, this must be implemented by the use of Wayland proxy object wrappers, to avoid race conditions.

If the application wishes to synchronize any window changes with a particular frame, such requests must be sent to the Wayland display server prior to calling vkQueuePresentKHR.

The implementation must ensure that no `wp_color_management_surface_v1` object exists for a surface, which has no swapchains, or only swapchains with a `imageColorSpace` of VK_COLOR_SPACE_PASS_THROUGH_EXT associated with it.

    // Provided by VK_KHR_wayland_surface
    typedef VkFlags VkWaylandSurfaceCreateFlagsKHR;

`VkWaylandSurfaceCreateFlagsKHR` is a bitmask type for setting a mask, but is currently reserved for future use.

#### 40.2.3. Win32 Platform

To create a `VkSurfaceKHR` object for a Win32 window, call:

    // Provided by VK_KHR_win32_surface
    VkResult vkCreateWin32SurfaceKHR(
        VkInstance                                  instance,
        const VkWin32SurfaceCreateInfoKHR*          pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkSurfaceKHR*                               pSurface);

- `instance` is the instance to associate the surface with.

- `pCreateInfo` is a pointer to a VkWin32SurfaceCreateInfoKHR structure containing parameters affecting the creation of the surface object.

- `pAllocator` is the allocator used for host memory allocated for the surface object when there is no more specific allocator available (see Memory Allocation).

- `pSurface` is a pointer to a VkSurfaceKHR handle in which the created surface object is returned.

Valid Usage (Implicit)

- VUID-vkCreateWin32SurfaceKHR-instance-parameter
  `instance` must be a valid VkInstance handle

- VUID-vkCreateWin32SurfaceKHR-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkWin32SurfaceCreateInfoKHR structure

- VUID-vkCreateWin32SurfaceKHR-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateWin32SurfaceKHR-pSurface-parameter
  `pSurface` must be a valid pointer to a VkSurfaceKHR handle

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

Some Vulkan functions may call the `SendMessage` system API when interacting with a `VkSurfaceKHR` through a `VkSwapchainKHR`. In a multithreaded environment, calling `SendMessage` from a thread that is not the thread associated with `pCreateInfo->hwnd` will block until the application has processed the window message. Thus, applications should either call these Vulkan functions on the message pump thread, or make sure their message pump is actively running. Failing to do so may result in deadlocks.

The functions subject to this requirement are:

- vkCreateSwapchainKHR

- vkDestroySwapchainKHR

- vkAcquireNextImageKHR and vkAcquireNextImage2KHR

- vkQueuePresentKHR

- vkReleaseSwapchainImagesKHR

- vkAcquireFullScreenExclusiveModeEXT

- vkReleaseFullScreenExclusiveModeEXT

- vkSetHdrMetadataEXT

The `VkWin32SurfaceCreateInfoKHR` structure is defined as:

    // Provided by VK_KHR_win32_surface
    typedef struct VkWin32SurfaceCreateInfoKHR {
        VkStructureType                 sType;
        const void*                     pNext;
        VkWin32SurfaceCreateFlagsKHR    flags;
        HINSTANCE                       hinstance;
        HWND                            hwnd;
    } VkWin32SurfaceCreateInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is reserved for future use.

- `hinstance` is the Win32 `HINSTANCE` for the window to associate the surface with.

- `hwnd` is the Win32 `HWND` for the window to associate the surface with.

Valid Usage

- VUID-VkWin32SurfaceCreateInfoKHR-hinstance-01307
  `hinstance` must be a valid Win32 `HINSTANCE`

- VUID-VkWin32SurfaceCreateInfoKHR-hwnd-01308
  `hwnd` must be a valid Win32 `HWND`

Valid Usage (Implicit)

- VUID-VkWin32SurfaceCreateInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR

- VUID-VkWin32SurfaceCreateInfoKHR-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkWin32SurfaceCreateInfoKHR-flags-zerobitmask
  `flags` must be `0`

With Win32, `minImageExtent`, `maxImageExtent`, and `currentExtent` must always equal the window size.

The `currentExtent` of a Win32 surface must have both `width` and `height` greater than 0, or both of them 0.

Note | Due to above restrictions, unless VkSwapchainPresentScalingCreateInfoKHR is used to specify handling of disparities between surface and swapchain dimensions, it is only possible to create a new swapchain on this platform with `imageExtent` being equal to the current size of the window, as reported in VkSurfaceCapabilitiesKHR::`currentExtent`. The window size may become (0, 0) on this platform (e.g. when the window is minimized), and so a swapchain cannot be created until the size changes.

    // Provided by VK_KHR_win32_surface
    typedef VkFlags VkWin32SurfaceCreateFlagsKHR;

`VkWin32SurfaceCreateFlagsKHR` is a bitmask type for setting a mask, but is currently reserved for future use.

#### 40.2.4. XCB Platform

To create a `VkSurfaceKHR` object for an X11 window, using the XCB client-side library, call:

    // Provided by VK_KHR_xcb_surface
    VkResult vkCreateXcbSurfaceKHR(
        VkInstance                                  instance,
        const VkXcbSurfaceCreateInfoKHR*            pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkSurfaceKHR*                               pSurface);

- `instance` is the instance to associate the surface with.

- `pCreateInfo` is a pointer to a VkXcbSurfaceCreateInfoKHR structure containing parameters affecting the creation of the surface object.

- `pAllocator` is the allocator used for host memory allocated for the surface object when there is no more specific allocator available (see Memory Allocation).

- `pSurface` is a pointer to a VkSurfaceKHR handle in which the created surface object is returned.

Valid Usage (Implicit)

- VUID-vkCreateXcbSurfaceKHR-instance-parameter
  `instance` must be a valid VkInstance handle

- VUID-vkCreateXcbSurfaceKHR-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkXcbSurfaceCreateInfoKHR structure

- VUID-vkCreateXcbSurfaceKHR-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateXcbSurfaceKHR-pSurface-parameter
  `pSurface` must be a valid pointer to a VkSurfaceKHR handle

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkXcbSurfaceCreateInfoKHR` structure is defined as:

    // Provided by VK_KHR_xcb_surface
    typedef struct VkXcbSurfaceCreateInfoKHR {
        VkStructureType               sType;
        const void*                   pNext;
        VkXcbSurfaceCreateFlagsKHR    flags;
        xcb_connection_t*             connection;
        xcb_window_t                  window;
    } VkXcbSurfaceCreateInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is reserved for future use.

- `connection` is a pointer to an `xcb_connection_t` to the X server.

- `window` is the `xcb_window_t` for the X11 window to associate the surface with.

Valid Usage

- VUID-VkXcbSurfaceCreateInfoKHR-connection-01310
  `connection` must point to a valid X11 `xcb_connection_t`

- VUID-VkXcbSurfaceCreateInfoKHR-window-01311
  `window` must be a valid X11 `xcb_window_t`

Valid Usage (Implicit)

- VUID-VkXcbSurfaceCreateInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR

- VUID-VkXcbSurfaceCreateInfoKHR-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkXcbSurfaceCreateInfoKHR-flags-zerobitmask
  `flags` must be `0`

With Xcb, `minImageExtent`, `maxImageExtent`, and `currentExtent` must always equal the window size.

The `currentExtent` of an Xcb surface must have both `width` and `height` greater than 0, or both of them 0.

Note | Due to above restrictions, unless VkSwapchainPresentScalingCreateInfoKHR is used to specify handling of disparities between surface and swapchain dimensions, it is only possible to create a new swapchain on this platform with `imageExtent` being equal to the current size of the window, as reported in VkSurfaceCapabilitiesKHR::`currentExtent`. The window size may become (0, 0) on this platform (e.g. when the window is minimized), and so a swapchain cannot be created until the size changes.

Some Vulkan functions may send protocol over the specified xcb connection when using a swapchain or presentable images created from a VkSurfaceKHR referring to an xcb window. Applications must therefore ensure the xcb connection is available to Vulkan for the duration of any functions that manipulate such swapchains or their presentable images, and any functions that build or queue command buffers that operate on such presentable images. Specifically, applications using Vulkan with xcb-based swapchains must

- Avoid holding a server grab on an xcb connection while waiting for Vulkan operations to complete using a swapchain derived from a different xcb connection referring to the same X server instance. Failing to do so may result in deadlock.

    // Provided by VK_KHR_xcb_surface
    typedef VkFlags VkXcbSurfaceCreateFlagsKHR;

`VkXcbSurfaceCreateFlagsKHR` is a bitmask type for setting a mask, but is currently reserved for future use.

#### 40.2.5. Xlib Platform

To create a `VkSurfaceKHR` object for an X11 window, using the Xlib client-side library, call:

    // Provided by VK_KHR_xlib_surface
    VkResult vkCreateXlibSurfaceKHR(
        VkInstance                                  instance,
        const VkXlibSurfaceCreateInfoKHR*           pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkSurfaceKHR*                               pSurface);

- `instance` is the instance to associate the surface with.

- `pCreateInfo` is a pointer to a VkXlibSurfaceCreateInfoKHR structure containing the parameters affecting the creation of the surface object.

- `pAllocator` is the allocator used for host memory allocated for the surface object when there is no more specific allocator available (see Memory Allocation).

- `pSurface` is a pointer to a VkSurfaceKHR handle in which the created surface object is returned.

Valid Usage (Implicit)

- VUID-vkCreateXlibSurfaceKHR-instance-parameter
  `instance` must be a valid VkInstance handle

- VUID-vkCreateXlibSurfaceKHR-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkXlibSurfaceCreateInfoKHR structure

- VUID-vkCreateXlibSurfaceKHR-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateXlibSurfaceKHR-pSurface-parameter
  `pSurface` must be a valid pointer to a VkSurfaceKHR handle

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkXlibSurfaceCreateInfoKHR` structure is defined as:

    // Provided by VK_KHR_xlib_surface
    typedef struct VkXlibSurfaceCreateInfoKHR {
        VkStructureType                sType;
        const void*                    pNext;
        VkXlibSurfaceCreateFlagsKHR    flags;
        Display*                       dpy;
        Window                         window;
    } VkXlibSurfaceCreateInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is reserved for future use.

- `dpy` is a pointer to an Xlib `Display` connection to the X server.

- `window` is an Xlib `Window` to associate the surface with.

Valid Usage

- VUID-VkXlibSurfaceCreateInfoKHR-dpy-01313
  `dpy` must point to a valid Xlib `Display`

- VUID-VkXlibSurfaceCreateInfoKHR-window-01314
  `window` must be a valid Xlib `Window`

Valid Usage (Implicit)

- VUID-VkXlibSurfaceCreateInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR

- VUID-VkXlibSurfaceCreateInfoKHR-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkXlibSurfaceCreateInfoKHR-flags-zerobitmask
  `flags` must be `0`

With Xlib, `minImageExtent`, `maxImageExtent`, and `currentExtent` must always equal the window size.

The `currentExtent` of an Xlib surface must have both `width` and `height` greater than 0, or both of them 0.

Note | Due to above restrictions, unless VkSwapchainPresentScalingCreateInfoKHR is used to specify handling of disparities between surface and swapchain dimensions, it is only possible to create a new swapchain on this platform with `imageExtent` being equal to the current size of the window, as reported in VkSurfaceCapabilitiesKHR::`currentExtent`. The window size may become (0, 0) on this platform (e.g. when the window is minimized), and so a swapchain cannot be created until the size changes.

Some Vulkan functions may send protocol over the specified Xlib `Display` connection when using a swapchain or presentable images created from a VkSurfaceKHR referring to an Xlib window. Applications must therefore ensure the display connection is available to Vulkan for the duration of any functions that manipulate such swapchains or their presentable images, and any functions that build or queue command buffers that operate on such presentable images. Specifically, applications using Vulkan with Xlib-based swapchains must

- Avoid holding a server grab on a display connection while waiting for Vulkan operations to complete using a swapchain derived from a different display connection referring to the same X server instance. Failing to do so may result in deadlock.

Some implementations may require threads to implement some presentation modes so applications must call `XInitThreads`() before calling any other Xlib functions.

    // Provided by VK_KHR_xlib_surface
    typedef VkFlags VkXlibSurfaceCreateFlagsKHR;

`VkXlibSurfaceCreateFlagsKHR` is a bitmask type for setting a mask, but is currently reserved for future use.

#### 40.2.6. DirectFB Platform

To create a `VkSurfaceKHR` object for a DirectFB surface, call:

    // Provided by VK_EXT_directfb_surface
    VkResult vkCreateDirectFBSurfaceEXT(
        VkInstance                                  instance,
        const VkDirectFBSurfaceCreateInfoEXT*       pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkSurfaceKHR*                               pSurface);

- `instance` is the instance to associate the surface with.

- `pCreateInfo` is a pointer to a VkDirectFBSurfaceCreateInfoEXT structure containing parameters affecting the creation of the surface object.

- `pAllocator` is the allocator used for host memory allocated for the surface object when there is no more specific allocator available (see Memory Allocation).

- `pSurface` is a pointer to a VkSurfaceKHR handle in which the created surface object is returned.

Valid Usage (Implicit)

- VUID-vkCreateDirectFBSurfaceEXT-instance-parameter
  `instance` must be a valid VkInstance handle

- VUID-vkCreateDirectFBSurfaceEXT-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkDirectFBSurfaceCreateInfoEXT structure

- VUID-vkCreateDirectFBSurfaceEXT-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateDirectFBSurfaceEXT-pSurface-parameter
  `pSurface` must be a valid pointer to a VkSurfaceKHR handle

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkDirectFBSurfaceCreateInfoEXT` structure is defined as:

    // Provided by VK_EXT_directfb_surface
    typedef struct VkDirectFBSurfaceCreateInfoEXT {
        VkStructureType                    sType;
        const void*                        pNext;
        VkDirectFBSurfaceCreateFlagsEXT    flags;
        IDirectFB*                         dfb;
        IDirectFBSurface*                  surface;
    } VkDirectFBSurfaceCreateInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is reserved for future use.

- `dfb` is a pointer to the `IDirectFB` main interface of DirectFB.

- `surface` is a pointer to a `IDirectFBSurface` surface interface.

Valid Usage

- VUID-VkDirectFBSurfaceCreateInfoEXT-dfb-04117
  `dfb` must point to a valid DirectFB `IDirectFB`

- VUID-VkDirectFBSurfaceCreateInfoEXT-surface-04118
  `surface` must point to a valid DirectFB `IDirectFBSurface`

Valid Usage (Implicit)

- VUID-VkDirectFBSurfaceCreateInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DIRECTFB_SURFACE_CREATE_INFO_EXT

- VUID-VkDirectFBSurfaceCreateInfoEXT-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkDirectFBSurfaceCreateInfoEXT-flags-zerobitmask
  `flags` must be `0`

With DirectFB, `minImageExtent`, `maxImageExtent`, and `currentExtent` must always equal the surface size.

    // Provided by VK_EXT_directfb_surface
    typedef VkFlags VkDirectFBSurfaceCreateFlagsEXT;

`VkDirectFBSurfaceCreateFlagsEXT` is a bitmask type for setting a mask, but is currently reserved for future use.

#### 40.2.7. Fuchsia Platform

To create a `VkSurfaceKHR` object for a Fuchsia ImagePipe, call:

    // Provided by VK_FUCHSIA_imagepipe_surface
    VkResult vkCreateImagePipeSurfaceFUCHSIA(
        VkInstance                                  instance,
        const VkImagePipeSurfaceCreateInfoFUCHSIA*  pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkSurfaceKHR*                               pSurface);

- `instance` is the instance to associate with the surface.

- `pCreateInfo` is a pointer to a VkImagePipeSurfaceCreateInfoFUCHSIA structure containing parameters affecting the creation of the surface object.

- `pAllocator` is the allocator used for host memory allocated for the surface object when there is no more specific allocator available (see Memory Allocation).

- `pSurface` is a pointer to a VkSurfaceKHR handle in which the created surface object is returned.

Valid Usage (Implicit)

- VUID-vkCreateImagePipeSurfaceFUCHSIA-instance-parameter
  `instance` must be a valid VkInstance handle

- VUID-vkCreateImagePipeSurfaceFUCHSIA-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkImagePipeSurfaceCreateInfoFUCHSIA structure

- VUID-vkCreateImagePipeSurfaceFUCHSIA-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateImagePipeSurfaceFUCHSIA-pSurface-parameter
  `pSurface` must be a valid pointer to a VkSurfaceKHR handle

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkImagePipeSurfaceCreateInfoFUCHSIA` structure is defined as:

    // Provided by VK_FUCHSIA_imagepipe_surface
    typedef struct VkImagePipeSurfaceCreateInfoFUCHSIA {
        VkStructureType                         sType;
        const void*                             pNext;
        VkImagePipeSurfaceCreateFlagsFUCHSIA    flags;
        zx_handle_t                             imagePipeHandle;
    } VkImagePipeSurfaceCreateInfoFUCHSIA;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is reserved for future use.

- `imagePipeHandle` is a `zx_handle_t` referring to the ImagePipe to associate with the surface.

Valid Usage

- VUID-VkImagePipeSurfaceCreateInfoFUCHSIA-imagePipeHandle-04863
  `imagePipeHandle` must be a valid `zx_handle_t`

Valid Usage (Implicit)

- VUID-VkImagePipeSurfaceCreateInfoFUCHSIA-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_IMAGEPIPE_SURFACE_CREATE_INFO_FUCHSIA

- VUID-VkImagePipeSurfaceCreateInfoFUCHSIA-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkImagePipeSurfaceCreateInfoFUCHSIA-flags-zerobitmask
  `flags` must be `0`

On Fuchsia, the surface `currentExtent` is the special value (0xFFFFFFFF, 0xFFFFFFFF), indicating that the surface size will be determined by the extent of a swapchain targeting the surface.

    // Provided by VK_FUCHSIA_imagepipe_surface
    typedef VkFlags VkImagePipeSurfaceCreateFlagsFUCHSIA;

`VkImagePipeSurfaceCreateFlagsFUCHSIA` is a bitmask type for setting a mask, but is currently reserved for future use.

#### 40.2.8. Google Games Platform

To create a `VkSurfaceKHR` object for a Google Games Platform stream descriptor, call:

    // Provided by VK_GGP_stream_descriptor_surface
    VkResult vkCreateStreamDescriptorSurfaceGGP(
        VkInstance                                  instance,
        const VkStreamDescriptorSurfaceCreateInfoGGP* pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkSurfaceKHR*                               pSurface);

- `instance` is the instance to associate with the surface.

- `pCreateInfo` is a pointer to a `VkStreamDescriptorSurfaceCreateInfoGGP` structure containing parameters that affect the creation of the surface object.

- `pAllocator` is the allocator used for host memory allocated for the surface object when there is no more specific allocator available (see Memory Allocation).

- `pSurface` is a pointer to a VkSurfaceKHR handle in which the created surface object is returned.

Valid Usage (Implicit)

- VUID-vkCreateStreamDescriptorSurfaceGGP-instance-parameter
  `instance` must be a valid VkInstance handle

- VUID-vkCreateStreamDescriptorSurfaceGGP-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkStreamDescriptorSurfaceCreateInfoGGP structure

- VUID-vkCreateStreamDescriptorSurfaceGGP-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateStreamDescriptorSurfaceGGP-pSurface-parameter
  `pSurface` must be a valid pointer to a VkSurfaceKHR handle

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_NATIVE_WINDOW_IN_USE_KHR

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkStreamDescriptorSurfaceCreateInfoGGP` structure is defined as:

    // Provided by VK_GGP_stream_descriptor_surface
    typedef struct VkStreamDescriptorSurfaceCreateInfoGGP {
        VkStructureType                            sType;
        const void*                                pNext;
        VkStreamDescriptorSurfaceCreateFlagsGGP    flags;
        GgpStreamDescriptor                        streamDescriptor;
    } VkStreamDescriptorSurfaceCreateInfoGGP;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is reserved for future use.

- `streamDescriptor` is a `GgpStreamDescriptor` referring to the GGP stream descriptor to associate with the surface.

Valid Usage

- VUID-VkStreamDescriptorSurfaceCreateInfoGGP-streamDescriptor-02681
  `streamDescriptor` must be a valid `GgpStreamDescriptor`

Valid Usage (Implicit)

- VUID-VkStreamDescriptorSurfaceCreateInfoGGP-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_STREAM_DESCRIPTOR_SURFACE_CREATE_INFO_GGP

- VUID-VkStreamDescriptorSurfaceCreateInfoGGP-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkStreamDescriptorSurfaceCreateInfoGGP-flags-zerobitmask
  `flags` must be `0`

On Google Games Platform, the surface extents are dynamic. The `minImageExtent` will never be greater than 1080p and the `maxImageExtent` will never be less than 1080p. The `currentExtent` will reflect the current optimal resolution.

Applications are expected to choose an appropriate size for the swapchain’s `imageExtent`, within the bounds of the surface. Using the surface’s `currentExtent` will offer the best performance and quality. When a swapchain’s `imageExtent` does not match the surface’s `currentExtent`, the presentable images are scaled to the surface’s dimensions during presentation if possible and VK_SUBOPTIMAL_KHR is returned, otherwise presentation fails with VK_ERROR_OUT_OF_DATE_KHR.

    // Provided by VK_GGP_stream_descriptor_surface
    typedef VkFlags VkStreamDescriptorSurfaceCreateFlagsGGP;

`VkStreamDescriptorSurfaceCreateFlagsGGP` is a bitmask type for setting a mask, but is currently reserved for future use.

#### 40.2.9. iOS Platform

To create a `VkSurfaceKHR` object for an iOS `UIView` or CAMetalLayer, call:

    // Provided by VK_MVK_ios_surface
    VkResult vkCreateIOSSurfaceMVK(
        VkInstance                                  instance,
        const VkIOSSurfaceCreateInfoMVK*            pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkSurfaceKHR*                               pSurface);

- `instance` is the instance with which to associate the surface.

- `pCreateInfo` is a pointer to a VkIOSSurfaceCreateInfoMVK structure containing parameters affecting the creation of the surface object.

- `pAllocator` is the allocator used for host memory allocated for the surface object when there is no more specific allocator available (see Memory Allocation).

- `pSurface` is a pointer to a VkSurfaceKHR handle in which the created surface object is returned.

Note | The `vkCreateIOSSurfaceMVK` function is considered legacy and has been superseded by vkCreateMetalSurfaceEXT from the `VK_EXT_metal_surface` extension.

Valid Usage (Implicit)

- VUID-vkCreateIOSSurfaceMVK-instance-parameter
  `instance` must be a valid VkInstance handle

- VUID-vkCreateIOSSurfaceMVK-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkIOSSurfaceCreateInfoMVK structure

- VUID-vkCreateIOSSurfaceMVK-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateIOSSurfaceMVK-pSurface-parameter
  `pSurface` must be a valid pointer to a VkSurfaceKHR handle

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_NATIVE_WINDOW_IN_USE_KHR

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The VkIOSSurfaceCreateInfoMVK structure is defined as:

    // Provided by VK_MVK_ios_surface
    typedef struct VkIOSSurfaceCreateInfoMVK {
        VkStructureType               sType;
        const void*                   pNext;
        VkIOSSurfaceCreateFlagsMVK    flags;
        const void*                   pView;
    } VkIOSSurfaceCreateInfoMVK;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is reserved for future use.

- `pView` is a reference to either a CAMetalLayer object or a `UIView` object.

Valid Usage

- VUID-VkIOSSurfaceCreateInfoMVK-pView-04143
  If `pView` is a CAMetalLayer object, it must be a valid CAMetalLayer

- VUID-VkIOSSurfaceCreateInfoMVK-pView-01316
  If `pView` is a `UIView` object, it must be a valid `UIView`, must be backed by a `CALayer` object of type CAMetalLayer, and vkCreateIOSSurfaceMVK must be called on the main thread

Valid Usage (Implicit)

- VUID-VkIOSSurfaceCreateInfoMVK-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_IOS_SURFACE_CREATE_INFO_MVK

- VUID-VkIOSSurfaceCreateInfoMVK-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkIOSSurfaceCreateInfoMVK-flags-zerobitmask
  `flags` must be `0`

    // Provided by VK_MVK_ios_surface
    typedef VkFlags VkIOSSurfaceCreateFlagsMVK;

`VkIOSSurfaceCreateFlagsMVK` is a bitmask type for setting a mask, but is currently reserved for future use.

#### 40.2.10. macOS Platform

To create a `VkSurfaceKHR` object for a macOS `NSView` or CAMetalLayer, call:

    // Provided by VK_MVK_macos_surface
    VkResult vkCreateMacOSSurfaceMVK(
        VkInstance                                  instance,
        const VkMacOSSurfaceCreateInfoMVK*          pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkSurfaceKHR*                               pSurface);

- `instance` is the instance with which to associate the surface.

- `pCreateInfo` is a pointer to a VkMacOSSurfaceCreateInfoMVK structure containing parameters affecting the creation of the surface object.

- `pAllocator` is the allocator used for host memory allocated for the surface object when there is no more specific allocator available (see Memory Allocation).

- `pSurface` is a pointer to a VkSurfaceKHR handle in which the created surface object is returned.

Note | The `vkCreateMacOSSurfaceMVK` function is considered legacy and has been superseded by vkCreateMetalSurfaceEXT from the `VK_EXT_metal_surface` extension.

Valid Usage (Implicit)

- VUID-vkCreateMacOSSurfaceMVK-instance-parameter
  `instance` must be a valid VkInstance handle

- VUID-vkCreateMacOSSurfaceMVK-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkMacOSSurfaceCreateInfoMVK structure

- VUID-vkCreateMacOSSurfaceMVK-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateMacOSSurfaceMVK-pSurface-parameter
  `pSurface` must be a valid pointer to a VkSurfaceKHR handle

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_NATIVE_WINDOW_IN_USE_KHR

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The VkMacOSSurfaceCreateInfoMVK structure is defined as:

    // Provided by VK_MVK_macos_surface
    typedef struct VkMacOSSurfaceCreateInfoMVK {
        VkStructureType                 sType;
        const void*                     pNext;
        VkMacOSSurfaceCreateFlagsMVK    flags;
        const void*                     pView;
    } VkMacOSSurfaceCreateInfoMVK;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is reserved for future use.

- `pView` is a reference to either a CAMetalLayer object or an `NSView` object.

Valid Usage

- VUID-VkMacOSSurfaceCreateInfoMVK-pView-04144
  If `pView` is a CAMetalLayer object, it must be a valid CAMetalLayer

- VUID-VkMacOSSurfaceCreateInfoMVK-pView-01317
  If `pView` is an `NSView` object, it must be a valid `NSView`, must be backed by a `CALayer` object of type CAMetalLayer, and vkCreateMacOSSurfaceMVK must be called on the main thread

Valid Usage (Implicit)

- VUID-VkMacOSSurfaceCreateInfoMVK-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK

- VUID-VkMacOSSurfaceCreateInfoMVK-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkMacOSSurfaceCreateInfoMVK-flags-zerobitmask
  `flags` must be `0`

    // Provided by VK_MVK_macos_surface
    typedef VkFlags VkMacOSSurfaceCreateFlagsMVK;

`VkMacOSSurfaceCreateFlagsMVK` is a bitmask type for setting a mask, but is currently reserved for future use.

#### 40.2.11. VI Platform

To create a `VkSurfaceKHR` object for an `nn`::`vi`::`Layer`, query the layer’s native handle using `nn`::`vi`::`GetNativeWindow`, and then call:

    // Provided by VK_NN_vi_surface
    VkResult vkCreateViSurfaceNN(
        VkInstance                                  instance,
        const VkViSurfaceCreateInfoNN*              pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkSurfaceKHR*                               pSurface);

- `instance` is the instance with which to associate the surface.

- `pCreateInfo` is a pointer to a VkViSurfaceCreateInfoNN structure containing parameters affecting the creation of the surface object.

- `pAllocator` is the allocator used for host memory allocated for the surface object when there is no more specific allocator available (see Memory Allocation).

- `pSurface` is a pointer to a VkSurfaceKHR handle in which the created surface object is returned.

During the lifetime of a surface created using a particular `nn`::`vi`::`NativeWindowHandle`, applications must not attempt to create another surface for the same `nn`::`vi`::`Layer` or attempt to connect to the same `nn`::`vi`::`Layer` through other platform mechanisms.

If the native window is created with a specified size, `currentExtent` will reflect that size. In this case, applications should use the same size for the swapchain’s `imageExtent`. Otherwise, the `currentExtent` will have the special value (0xFFFFFFFF, 0xFFFFFFFF), indicating that applications are expected to choose an appropriate size for the swapchain’s `imageExtent` (e.g., by matching the result of a call to `nn`::`vi`::`GetDisplayResolution`).

Valid Usage (Implicit)

- VUID-vkCreateViSurfaceNN-instance-parameter
  `instance` must be a valid VkInstance handle

- VUID-vkCreateViSurfaceNN-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkViSurfaceCreateInfoNN structure

- VUID-vkCreateViSurfaceNN-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateViSurfaceNN-pSurface-parameter
  `pSurface` must be a valid pointer to a VkSurfaceKHR handle

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_NATIVE_WINDOW_IN_USE_KHR

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkViSurfaceCreateInfoNN` structure is defined as:

    // Provided by VK_NN_vi_surface
    typedef struct VkViSurfaceCreateInfoNN {
        VkStructureType             sType;
        const void*                 pNext;
        VkViSurfaceCreateFlagsNN    flags;
        void*                       window;
    } VkViSurfaceCreateInfoNN;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is reserved for future use.

- `window` is the `nn`::`vi`::`NativeWindowHandle` for the `nn`::`vi`::`Layer` with which to associate the surface.

Valid Usage

- VUID-VkViSurfaceCreateInfoNN-window-01318
  `window` must be a valid `nn`::`vi`::`NativeWindowHandle`

Valid Usage (Implicit)

- VUID-VkViSurfaceCreateInfoNN-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VI_SURFACE_CREATE_INFO_NN

- VUID-VkViSurfaceCreateInfoNN-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkViSurfaceCreateInfoNN-flags-zerobitmask
  `flags` must be `0`

    // Provided by VK_NN_vi_surface
    typedef VkFlags VkViSurfaceCreateFlagsNN;

`VkViSurfaceCreateFlagsNN` is a bitmask type for setting a mask, but is currently reserved for future use.

#### 40.2.12. Metal Platform

To create a `VkSurfaceKHR` object for a CAMetalLayer, call:

    // Provided by VK_EXT_metal_surface
    VkResult vkCreateMetalSurfaceEXT(
        VkInstance                                  instance,
        const VkMetalSurfaceCreateInfoEXT*          pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkSurfaceKHR*                               pSurface);

- `instance` is the instance with which to associate the surface.

- `pCreateInfo` is a pointer to a VkMetalSurfaceCreateInfoEXT structure specifying parameters affecting the creation of the surface object.

- `pAllocator` is the allocator used for host memory allocated for the surface object when there is no more specific allocator available (see Memory Allocation).

- `pSurface` is a pointer to a VkSurfaceKHR handle in which the created surface object is returned.

Valid Usage (Implicit)

- VUID-vkCreateMetalSurfaceEXT-instance-parameter
  `instance` must be a valid VkInstance handle

- VUID-vkCreateMetalSurfaceEXT-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkMetalSurfaceCreateInfoEXT structure

- VUID-vkCreateMetalSurfaceEXT-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateMetalSurfaceEXT-pSurface-parameter
  `pSurface` must be a valid pointer to a VkSurfaceKHR handle

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_NATIVE_WINDOW_IN_USE_KHR

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The VkMetalSurfaceCreateInfoEXT structure is defined as:

    // Provided by VK_EXT_metal_surface
    typedef struct VkMetalSurfaceCreateInfoEXT {
        VkStructureType                 sType;
        const void*                     pNext;
        VkMetalSurfaceCreateFlagsEXT    flags;
        const CAMetalLayer*             pLayer;
    } VkMetalSurfaceCreateInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is reserved for future use.

- `pLayer` is a reference to a CAMetalLayer object representing a renderable surface.

Valid Usage (Implicit)

- VUID-VkMetalSurfaceCreateInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_METAL_SURFACE_CREATE_INFO_EXT

- VUID-VkMetalSurfaceCreateInfoEXT-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkMetalSurfaceCreateInfoEXT-flags-zerobitmask
  `flags` must be `0`

To remove an unnecessary compile time dependency, an incomplete type definition of CAMetalLayer is provided in the Vulkan headers:

    // Provided by VK_EXT_metal_surface
    #ifdef __OBJC__
    @class CAMetalLayer;
    #else
    typedef void CAMetalLayer;
    #endif

The actual CAMetalLayer type is defined in the QuartzCore framework.

    // Provided by VK_EXT_metal_surface
    typedef VkFlags VkMetalSurfaceCreateFlagsEXT;

`VkMetalSurfaceCreateFlagsEXT` is a bitmask type for setting a mask, but is currently reserved for future use.

#### 40.2.13. QNX Screen Platform

To create a `VkSurfaceKHR` object for a QNX Screen surface, call:

    // Provided by VK_QNX_screen_surface
    VkResult vkCreateScreenSurfaceQNX(
        VkInstance                                  instance,
        const VkScreenSurfaceCreateInfoQNX*         pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkSurfaceKHR*                               pSurface);

- `instance` is the instance to associate the surface with.

- `pCreateInfo` is a pointer to a VkScreenSurfaceCreateInfoQNX structure containing parameters affecting the creation of the surface object.

- `pAllocator` is the allocator used for host memory allocated for the surface object when there is no more specific allocator available (see Memory Allocation).

- `pSurface` is a pointer to a VkSurfaceKHR handle in which the created surface object is returned.

Valid Usage (Implicit)

- VUID-vkCreateScreenSurfaceQNX-instance-parameter
  `instance` must be a valid VkInstance handle

- VUID-vkCreateScreenSurfaceQNX-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkScreenSurfaceCreateInfoQNX structure

- VUID-vkCreateScreenSurfaceQNX-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateScreenSurfaceQNX-pSurface-parameter
  `pSurface` must be a valid pointer to a VkSurfaceKHR handle

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkScreenSurfaceCreateInfoQNX` structure is defined as:

    // Provided by VK_QNX_screen_surface
    typedef struct VkScreenSurfaceCreateInfoQNX {
        VkStructureType                  sType;
        const void*                      pNext;
        VkScreenSurfaceCreateFlagsQNX    flags;
        struct _screen_context*          context;
        struct _screen_window*           window;
    } VkScreenSurfaceCreateInfoQNX;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is reserved for future use.

- `context` and `window` are QNX Screen `context` and `window` to associate the surface with.

Valid Usage

- VUID-VkScreenSurfaceCreateInfoQNX-context-04741
  `context` must point to a valid QNX Screen `struct` _screen_context

- VUID-VkScreenSurfaceCreateInfoQNX-window-04742
  `window` must point to a valid QNX Screen `struct` _screen_window

Valid Usage (Implicit)

- VUID-VkScreenSurfaceCreateInfoQNX-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SCREEN_SURFACE_CREATE_INFO_QNX

- VUID-VkScreenSurfaceCreateInfoQNX-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkScreenSurfaceCreateInfoQNX-flags-zerobitmask
  `flags` must be `0`

    // Provided by VK_QNX_screen_surface
    typedef VkFlags VkScreenSurfaceCreateFlagsQNX;

`VkScreenSurfaceCreateFlagsQNX` is a bitmask type for setting a mask, but is currently reserved for future use.

#### 40.2.14. Open Harmony OS Platform Surface Creation

To create a `VkSurfaceKHR` object on Open Harmony OS platform, call:

    // Provided by VK_OHOS_surface
    VkResult vkCreateSurfaceOHOS(
        VkInstance                                  instance,
        const VkSurfaceCreateInfoOHOS*              pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkSurfaceKHR*                               pSurface);

- `instance` is the instance to associate the surface with.

- `pCreateInfo` is a pointer to a VkSurfaceCreateInfoOHOS structure containing parameters affecting the creation of the surface object.

- `pAllocator` is the allocator used for host memory allocated for the surface object when there is no more specific allocator available (see Memory Allocation).

- `pSurface` is a pointer to a VkSurfaceKHR handle in which the created surface object is returned.

Valid Usage (Implicit)

- VUID-vkCreateSurfaceOHOS-instance-parameter
  `instance` must be a valid VkInstance handle

- VUID-vkCreateSurfaceOHOS-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkSurfaceCreateInfoOHOS structure

- VUID-vkCreateSurfaceOHOS-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateSurfaceOHOS-pSurface-parameter
  `pSurface` must be a valid pointer to a VkSurfaceKHR handle

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_SURFACE_LOST_KHR

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkSurfaceCreateInfoOHOS` structure is defined as:

    // Provided by VK_OHOS_surface
    typedef struct VkSurfaceCreateInfoOHOS {
        VkStructureType             sType;
        const void*                 pNext;
        VkSurfaceCreateFlagsOHOS    flags;
        OHNativeWindow*             window;
    } VkSurfaceCreateInfoOHOS;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is reserved for future use.

- `window`: is a pointer to a OHNativeWindow to associate the surface with.

Valid Usage (Implicit)

- VUID-VkSurfaceCreateInfoOHOS-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SURFACE_CREATE_INFO_OHOS

- VUID-VkSurfaceCreateInfoOHOS-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkSurfaceCreateInfoOHOS-flags-zerobitmask
  `flags` must be `0`

The OHNativeWindow structure is defined as:

    // Provided by VK_OHOS_surface
    typedef struct NativeWindow OHNativeWindow;

It is the native window structure on Open Harmony OS platform. It is exposed by the Open Harmony OS NDK.

    // Provided by VK_OHOS_surface
    typedef VkFlags VkSurfaceCreateFlagsOHOS;

`VkSurfaceCreateFlagsOHOS` is a bitmask type for setting a mask, but is currently reserved for future use.

#### 40.2.15. UBM Platform

To create a `VkSurfaceKHR` object for a UBM surface, call:

    // Provided by VK_SEC_ubm_surface
    VkResult vkCreateUbmSurfaceSEC(
        VkInstance                                  instance,
        const VkUbmSurfaceCreateInfoSEC*            pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkSurfaceKHR*                               pSurface);

- `instance` is the instance to associate the surface with.

- `pCreateInfo` is a pointer to a VkUbmSurfaceCreateInfoSEC structure containing parameters affecting the creation of the surface object.

- `pAllocator` is the allocator used for host memory allocated for the surface object when there is no more specific allocator available (see Memory Allocation).

- `pSurface` is a pointer to a VkSurfaceKHR handle in which the created surface object is returned.

Valid Usage (Implicit)

- VUID-vkCreateUbmSurfaceSEC-instance-parameter
  `instance` must be a valid VkInstance handle

- VUID-vkCreateUbmSurfaceSEC-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkUbmSurfaceCreateInfoSEC structure

- VUID-vkCreateUbmSurfaceSEC-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateUbmSurfaceSEC-pSurface-parameter
  `pSurface` must be a valid pointer to a VkSurfaceKHR handle

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkUbmSurfaceCreateInfoSEC` structure is defined as:

    // Provided by VK_SEC_ubm_surface
    typedef struct VkUbmSurfaceCreateInfoSEC {
        VkStructureType               sType;
        const void*                   pNext;
        VkUbmSurfaceCreateFlagsSEC    flags;
        struct ubm_device*            device;
        struct ubm_surface*           surface;
    } VkUbmSurfaceCreateInfoSEC;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is reserved for future use.

- `device` is a pointer to a `ubm_device` to associate the surface with.

- `surface` is a pointer to a `ubm_surface` to associate the surface with.

Valid Usage

- VUID-VkUbmSurfaceCreateInfoSEC-device-12366
  `device` must point to a valid UBM `ubm_device`

- VUID-VkUbmSurfaceCreateInfoSEC-surface-12367
  `surface` must point to a valid UBM `ubm_surface`

Valid Usage (Implicit)

- VUID-VkUbmSurfaceCreateInfoSEC-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_UBM_SURFACE_CREATE_INFO_SEC

- VUID-VkUbmSurfaceCreateInfoSEC-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkUbmSurfaceCreateInfoSEC-flags-zerobitmask
  `flags` must be `0`

    // Provided by VK_SEC_ubm_surface
    typedef VkFlags VkUbmSurfaceCreateFlagsSEC;

`VkUbmSurfaceCreateFlagsSEC` is a bitmask type for setting a mask, but is currently reserved for future use.

#### 40.2.16. Platform-Independent Information

Once created, `VkSurfaceKHR` objects can be used in this and other extensions, in particular the `VK_KHR_swapchain` extension.

Several WSI functions return VK_ERROR_SURFACE_LOST_KHR if the surface becomes no longer available. After such an error, the surface (and any child swapchain, if one exists) should be destroyed, as there is no way to restore them to a not-lost state. Applications may attempt to create a new `VkSurfaceKHR` using the same native platform window object, but whether such re-creation will succeed is platform-dependent and may depend on the reason the surface became unavailable. A lost surface does not otherwise cause devices to be lost.

To destroy a `VkSurfaceKHR` object, call:

    // Provided by VK_KHR_surface
    void vkDestroySurfaceKHR(
        VkInstance                                  instance,
        VkSurfaceKHR                                surface,
        const VkAllocationCallbacks*                pAllocator);

- `instance` is the instance used to create the surface.

- `surface` is the surface to destroy.

- `pAllocator` is the allocator used for host memory allocated for the surface object when there is no more specific allocator available (see Memory Allocation).

Destroying a `VkSurfaceKHR` merely severs the connection between Vulkan and the native surface, and does not imply destroying the native surface, closing a window, or similar behavior.

Valid Usage

- VUID-vkDestroySurfaceKHR-surface-01266
  All `VkSwapchainKHR` objects created for `surface` must have been destroyed prior to destroying `surface`

- VUID-vkDestroySurfaceKHR-surface-01267
  If `VkAllocationCallbacks` were provided when `surface` was created, a compatible set of callbacks must be provided here

- VUID-vkDestroySurfaceKHR-surface-01268
  If no `VkAllocationCallbacks` were provided when `surface` was created, `pAllocator` must be `NULL`

Valid Usage (Implicit)

- VUID-vkDestroySurfaceKHR-instance-parameter
  `instance` must be a valid VkInstance handle

- VUID-vkDestroySurfaceKHR-surface-parameter
  If `surface` is not VK_NULL_HANDLE, `surface` must be a valid VkSurfaceKHR handle

- VUID-vkDestroySurfaceKHR-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkDestroySurfaceKHR-surface-parent
  If `surface` is a valid handle, it must have been created, allocated, or retrieved from `instance`

Host Synchronization

- Host access to `surface` must be externally synchronized

### 40.3. Presenting Directly to Display Devices

In some environments applications can also present Vulkan rendering directly to display devices without using an intermediate windowing system. This can be useful for embedded applications, or implementing the rendering/presentation backend of a windowing system using Vulkan. The `VK_KHR_display` extension provides the functionality necessary to enumerate display devices and create `VkSurfaceKHR` objects that target displays.

#### 40.3.1. Display Enumeration

Displays are represented by `VkDisplayKHR` handles:

    // Provided by VK_KHR_display
    VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDisplayKHR)

Various functions are provided for enumerating the available display devices present on a Vulkan physical device. To query information about the available displays, call:

    // Provided by VK_KHR_display
    VkResult vkGetPhysicalDeviceDisplayPropertiesKHR(
        VkPhysicalDevice                            physicalDevice,
        uint32_t*                                   pPropertyCount,
        VkDisplayPropertiesKHR*                     pProperties);

- `physicalDevice` is a physical device.

- `pPropertyCount` is a pointer to an integer related to the number of display devices available or queried, as described below.

- `pProperties` is either `NULL` or a pointer to an array of VkDisplayPropertiesKHR structures.

If `pProperties` is `NULL`, then the number of display devices available for `physicalDevice` is returned in `pPropertyCount`. Otherwise, `pPropertyCount` must point to a variable set by the application to the number of elements in the `pProperties` array, and on return the variable is overwritten with the number of structures actually written to `pProperties`. If the value of `pPropertyCount` is less than the number of display devices for `physicalDevice`, at most `pPropertyCount` structures will be written, and VK_INCOMPLETE will be returned instead of VK_SUCCESS, to indicate that not all the available properties were returned.

Valid Usage (Implicit)

- VUID-vkGetPhysicalDeviceDisplayPropertiesKHR-physicalDevice-parameter
  `physicalDevice` must be a valid VkPhysicalDevice handle

- VUID-vkGetPhysicalDeviceDisplayPropertiesKHR-pPropertyCount-parameter
  `pPropertyCount` must be a valid pointer to a `uint32_t` value

- VUID-vkGetPhysicalDeviceDisplayPropertiesKHR-pProperties-parameter
  If the value referenced by `pPropertyCount` is not `0`, and `pProperties` is not `NULL`, `pProperties` must be a valid pointer to an array of `pPropertyCount` VkDisplayPropertiesKHR structures

Return Codes

Success

  - VK_INCOMPLETE

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkDisplayPropertiesKHR` structure is defined as:

    // Provided by VK_KHR_display
    typedef struct VkDisplayPropertiesKHR {
        VkDisplayKHR                  display;
        const char*                   displayName;
        VkExtent2D                    physicalDimensions;
        VkExtent2D                    physicalResolution;
        VkSurfaceTransformFlagsKHR    supportedTransforms;
        VkBool32                      planeReorderPossible;
        VkBool32                      persistentContent;
    } VkDisplayPropertiesKHR;

- `display` is a handle that is used to refer to the display described here. This handle will be valid for the lifetime of the Vulkan instance.

- `displayName` is `NULL` or a pointer to a null-terminated UTF-8 string containing the name of the display. Generally, this will be the name provided by the display’s EDID. If `NULL`, no suitable name is available. If not `NULL`, the string pointed to must remain accessible and unmodified as long as `display` is valid.

- `physicalDimensions` describes the physical width and height of the visible portion of the display, in millimeters.

- `physicalResolution` describes the physical, native, or preferred resolution of the display.

Note | For devices which have no natural value to return here, implementations should return the maximum resolution supported.

- `supportedTransforms` is a bitmask of VkSurfaceTransformFlagBitsKHR describing which transforms are supported by this display.

- `planeReorderPossible` tells whether the planes on this display can have their z order changed. If this is VK_TRUE, the application can re-arrange the planes on this display in any order relative to each other.

- `persistentContent` tells whether the display supports self-refresh/internal buffering. If this is true, the application can submit persistent present operations on swapchains created against this display.

Note | Persistent presents may have higher latency, and may use less power when the screen content is updated infrequently, or when only a portion of the screen needs to be updated in most frames.

To query information about the available displays, call:

    // Provided by VK_KHR_get_display_properties2
    VkResult vkGetPhysicalDeviceDisplayProperties2KHR(
        VkPhysicalDevice                            physicalDevice,
        uint32_t*                                   pPropertyCount,
        VkDisplayProperties2KHR*                    pProperties);

- `physicalDevice` is a physical device.

- `pPropertyCount` is a pointer to an integer related to the number of display devices available or queried, as described below.

- `pProperties` is either `NULL` or a pointer to an array of `VkDisplayProperties2KHR` structures.

`vkGetPhysicalDeviceDisplayProperties2KHR` behaves similarly to vkGetPhysicalDeviceDisplayPropertiesKHR, with the ability to return extended information via chained output structures.

Valid Usage (Implicit)

- VUID-vkGetPhysicalDeviceDisplayProperties2KHR-physicalDevice-parameter
  `physicalDevice` must be a valid VkPhysicalDevice handle

- VUID-vkGetPhysicalDeviceDisplayProperties2KHR-pPropertyCount-parameter
  `pPropertyCount` must be a valid pointer to a `uint32_t` value

- VUID-vkGetPhysicalDeviceDisplayProperties2KHR-pProperties-parameter
  If the value referenced by `pPropertyCount` is not `0`, and `pProperties` is not `NULL`, `pProperties` must be a valid pointer to an array of `pPropertyCount` VkDisplayProperties2KHR structures

Return Codes

Success

  - VK_INCOMPLETE

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkDisplayProperties2KHR` structure is defined as:

    // Provided by VK_KHR_get_display_properties2
    typedef struct VkDisplayProperties2KHR {
        VkStructureType           sType;
        void*                     pNext;
        VkDisplayPropertiesKHR    displayProperties;
    } VkDisplayProperties2KHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `displayProperties` is a VkDisplayPropertiesKHR structure.

Valid Usage (Implicit)

- VUID-VkDisplayProperties2KHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DISPLAY_PROPERTIES_2_KHR

- VUID-VkDisplayProperties2KHR-pNext-pNext
  `pNext` must be `NULL`

##### Acquiring and Releasing Displays

On some platforms, access to displays is limited to a single process or native driver instance. On such platforms, some or all of the displays may not be available to Vulkan if they are already in use by a native windowing system or other application.

To acquire permission to directly access a display in Vulkan from an X11 server, call:

    // Provided by VK_EXT_acquire_xlib_display
    VkResult vkAcquireXlibDisplayEXT(
        VkPhysicalDevice                            physicalDevice,
        Display*                                    dpy,
        VkDisplayKHR                                display);

- `physicalDevice` is the physical device the display is on.

- `dpy` is a connection to the X11 server that currently owns `display`.

- `display` is the display the caller wishes to control in Vulkan.

All permissions necessary to control the display are granted to the Vulkan instance associated with `physicalDevice` until the display is released or the X11 connection specified by `dpy` is terminated. Permission to access the display may be temporarily revoked during periods when the X11 server from which control was acquired itself loses access to `display`. During such periods, operations which require access to the display must fail with an appropriate error code. If the X11 server associated with `dpy` does not own `display`, or if permission to access it has already been acquired by another entity, the call must return the error code VK_ERROR_INITIALIZATION_FAILED.

Note | One example of when an X11 server loses access to a display is when it loses ownership of its virtual terminal.

Valid Usage (Implicit)

- VUID-vkAcquireXlibDisplayEXT-physicalDevice-parameter
  `physicalDevice` must be a valid VkPhysicalDevice handle

- VUID-vkAcquireXlibDisplayEXT-dpy-parameter
  `dpy` must be a valid pointer to a `Display` value

- VUID-vkAcquireXlibDisplayEXT-display-parameter
  `display` must be a valid VkDisplayKHR handle

- VUID-vkAcquireXlibDisplayEXT-display-parent
  `display` must have been created, allocated, or retrieved from `physicalDevice`

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_INITIALIZATION_FAILED

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

When acquiring displays from an X11 server, an application may also wish to enumerate and identify them using a native handle rather than a `VkDisplayKHR` handle. To determine the `VkDisplayKHR` handle corresponding to an X11 RandR Output, call:

    // Provided by VK_EXT_acquire_xlib_display
    VkResult vkGetRandROutputDisplayEXT(
        VkPhysicalDevice                            physicalDevice,
        Display*                                    dpy,
        RROutput                                    rrOutput,
        VkDisplayKHR*                               pDisplay);

- `physicalDevice` is the physical device to query the display handle on.

- `dpy` is a connection to the X11 server from which `rrOutput` was queried.

- `rrOutput` is an X11 RandR output ID.

- `pDisplay` is a pointer to a VkDisplayKHR handle where the display is returned.

If there is no VkDisplayKHR corresponding to `rrOutput` on `physicalDevice`, VK_NULL_HANDLE will be returned in `pDisplay`.

Valid Usage (Implicit)

- VUID-vkGetRandROutputDisplayEXT-physicalDevice-parameter
  `physicalDevice` must be a valid VkPhysicalDevice handle

- VUID-vkGetRandROutputDisplayEXT-dpy-parameter
  `dpy` must be a valid pointer to a `Display` value

- VUID-vkGetRandROutputDisplayEXT-pDisplay-parameter
  `pDisplay` must be a valid pointer to a VkDisplayKHR handle

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

To acquire permission to directly access a display in Vulkan on Windows 10, call:

    // Provided by VK_NV_acquire_winrt_display
    VkResult vkAcquireWinrtDisplayNV(
        VkPhysicalDevice                            physicalDevice,
        VkDisplayKHR                                display);

- `physicalDevice` is the physical device the display is on.

- `display` is the display the caller wishes to control in Vulkan.

All permissions necessary to control the display are granted to the Vulkan instance associated with `physicalDevice` until the display is released or the application is terminated. Permission to access the display may be revoked by events that cause Windows 10 itself to lose access to `display`. If this has happened, operations which require access to the display must fail with an appropriate error code. If permission to access `display` has already been acquired by another entity, the call must return the error code VK_ERROR_INITIALIZATION_FAILED.

Note | The Vulkan instance acquires control of a “winrt::Windows::Devices::Display::Core::DisplayTarget” by performing an operation equivalent to “winrt::Windows::Devices::Display::Core::DisplayManager.TryAcquireTarget()” on the “DisplayTarget”.

Note | One example of when Windows 10 loses access to a display is when the display is hot-unplugged.

Note | One example of when a display has already been acquired by another entity is when the Windows desktop compositor (DWM) is in control of the display. Beginning with Windows 10 version 2004 it is possible to cause DWM to release a display by using the “Advanced display settings” sub-page of the “Display settings” control panel. vkAcquireWinrtDisplayNV does not itself cause DWM to release a display; this action must be performed outside of Vulkan.

Valid Usage (Implicit)

- VUID-vkAcquireWinrtDisplayNV-physicalDevice-parameter
  `physicalDevice` must be a valid VkPhysicalDevice handle

- VUID-vkAcquireWinrtDisplayNV-display-parameter
  `display` must be a valid VkDisplayKHR handle

- VUID-vkAcquireWinrtDisplayNV-display-parent
  `display` must have been created, allocated, or retrieved from `physicalDevice`

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_DEVICE_LOST

  - VK_ERROR_INITIALIZATION_FAILED

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

When acquiring displays on Windows 10, an application may also wish to enumerate and identify them using a native handle rather than a `VkDisplayKHR` handle.

To determine the `VkDisplayKHR` handle corresponding to a “winrt::Windows::Devices::Display::Core::DisplayTarget”, call:

    // Provided by VK_NV_acquire_winrt_display
    VkResult vkGetWinrtDisplayNV(
        VkPhysicalDevice                            physicalDevice,
        uint32_t                                    deviceRelativeId,
        VkDisplayKHR*                               pDisplay);

- `physicalDevice` is the physical device on which to query the display handle.

- `deviceRelativeId` is the value of the “AdapterRelativeId” property of a “DisplayTarget” that is enumerated by a “DisplayAdapter” with an “Id” property matching the `deviceLUID` property of a VkPhysicalDeviceIDProperties for `physicalDevice`.

- `pDisplay` is a pointer to a VkDisplayKHR handle where the display is returned.

If there is no VkDisplayKHR corresponding to `deviceRelativeId` on `physicalDevice`, VK_NULL_HANDLE must be returned in `pDisplay`.

Valid Usage (Implicit)

- VUID-vkGetWinrtDisplayNV-physicalDevice-parameter
  `physicalDevice` must be a valid VkPhysicalDevice handle

- VUID-vkGetWinrtDisplayNV-pDisplay-parameter
  `pDisplay` must be a valid pointer to a VkDisplayKHR handle

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_DEVICE_LOST

  - VK_ERROR_INITIALIZATION_FAILED

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

To acquire permission to directly control a display in Vulkan from the Direct Rendering Manager (DRM) interface, call:

    // Provided by VK_EXT_acquire_drm_display
    VkResult vkAcquireDrmDisplayEXT(
        VkPhysicalDevice                            physicalDevice,
        int32_t                                     drmFd,
        VkDisplayKHR                                display);

- `physicalDevice` is the physical device the display is on.

- `drmFd` is the DRM primary file descriptor.

- `display` is the display the caller wishes Vulkan to control.

All permissions necessary to control the display are granted to the Vulkan instance associated with the provided `physicalDevice` until the display is either released or the connector is unplugged. The provided `drmFd` must correspond to the one owned by the `physicalDevice`. If not, the error code VK_ERROR_UNKNOWN must be returned. The DRM FD must have DRM mast⁠er permissions. If any error is encountered during the acquisition of the display, the call must return the error code VK_ERROR_INITIALIZATION_FAILED.

The provided DRM fd should not be closed before the display is released, attempting to do it may result in undefined behavior.

Valid Usage (Implicit)

- VUID-vkAcquireDrmDisplayEXT-physicalDevice-parameter
  `physicalDevice` must be a valid VkPhysicalDevice handle

- VUID-vkAcquireDrmDisplayEXT-display-parameter
  `display` must be a valid VkDisplayKHR handle

- VUID-vkAcquireDrmDisplayEXT-display-parent
  `display` must have been created, allocated, or retrieved from `physicalDevice`

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_INITIALIZATION_FAILED

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

Before acquiring a display from the DRM interface, the caller may want to select a specific `VkDisplayKHR` handle by identifying it using a `connectorId`. To do so, call:

    // Provided by VK_EXT_acquire_drm_display
    VkResult vkGetDrmDisplayEXT(
        VkPhysicalDevice                            physicalDevice,
        int32_t                                     drmFd,
        uint32_t                                    connectorId,
        VkDisplayKHR*                               display);

- `physicalDevice` is the physical device to query the display from.

- `drmFd` is the DRM primary file descriptor.

- `connectorId` is the identifier of the specified DRM connector.

- `pDisplay` is a pointer to a VkDisplayKHR handle where the display is returned.

If there is no VkDisplayKHR corresponding to the `connectorId` on the `physicalDevice`, the returned `display` will be VK_NULL_HANDLE. The provided `drmFd` must correspond to the one owned by the `physicalDevice`. If not, the error code VK_ERROR_UNKNOWN will be returned. Mast⁠er permissions are not required, because the file descriptor is just used for information gathering purposes. The given `connectorId` must be a resource owned by the provided `drmFd`. If not, the error code VK_ERROR_UNKNOWN will be returned. If any error is encountered during the identification of the display, the call must return the error code VK_ERROR_INITIALIZATION_FAILED.

Valid Usage (Implicit)

- VUID-vkGetDrmDisplayEXT-physicalDevice-parameter
  `physicalDevice` must be a valid VkPhysicalDevice handle

- VUID-vkGetDrmDisplayEXT-display-parameter
  `display` must be a valid pointer to a VkDisplayKHR handle

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_INITIALIZATION_FAILED

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

To release a previously acquired display, call:

    // Provided by VK_EXT_direct_mode_display
    VkResult vkReleaseDisplayEXT(
        VkPhysicalDevice                            physicalDevice,
        VkDisplayKHR                                display);

- `physicalDevice` is the physical device the display is on.

- `display` is the display to release control of.

Valid Usage (Implicit)

- VUID-vkReleaseDisplayEXT-physicalDevice-parameter
  `physicalDevice` must be a valid VkPhysicalDevice handle

- VUID-vkReleaseDisplayEXT-display-parameter
  `display` must be a valid VkDisplayKHR handle

- VUID-vkReleaseDisplayEXT-display-parent
  `display` must have been created, allocated, or retrieved from `physicalDevice`

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

##### Display Planes

Images are presented to individual planes on a display. Devices must support at least one plane on each display. Planes can be stacked and blended to composite multiple images on one display. Devices may support only a fixed stacking order and fixed mapping between planes and displays, or they may allow arbitrary application-specified stacking orders and mappings between planes and displays. To query the properties of device display planes, call:

    // Provided by VK_KHR_display
    VkResult vkGetPhysicalDeviceDisplayPlanePropertiesKHR(
        VkPhysicalDevice                            physicalDevice,
        uint32_t*                                   pPropertyCount,
        VkDisplayPlanePropertiesKHR*                pProperties);

- `physicalDevice` is a physical device.

- `pPropertyCount` is a pointer to an integer related to the number of display planes available or queried, as described below.

- `pProperties` is either `NULL` or a pointer to an array of `VkDisplayPlanePropertiesKHR` structures.

If `pProperties` is `NULL`, then the number of display planes available for `physicalDevice` is returned in `pPropertyCount`. Otherwise, `pPropertyCount` must point to a variable set by the application to the number of elements in the `pProperties` array, and on return the variable is overwritten with the number of structures actually written to `pProperties`. If the value of `pPropertyCount` is less than the number of display planes for `physicalDevice`, at most `pPropertyCount` structures will be written.

Valid Usage (Implicit)

- VUID-vkGetPhysicalDeviceDisplayPlanePropertiesKHR-physicalDevice-parameter
  `physicalDevice` must be a valid VkPhysicalDevice handle

- VUID-vkGetPhysicalDeviceDisplayPlanePropertiesKHR-pPropertyCount-parameter
  `pPropertyCount` must be a valid pointer to a `uint32_t` value

- VUID-vkGetPhysicalDeviceDisplayPlanePropertiesKHR-pProperties-parameter
  If the value referenced by `pPropertyCount` is not `0`, and `pProperties` is not `NULL`, `pProperties` must be a valid pointer to an array of `pPropertyCount` VkDisplayPlanePropertiesKHR structures

Return Codes

Success

  - VK_INCOMPLETE

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkDisplayPlanePropertiesKHR` structure is defined as:

    // Provided by VK_KHR_display
    typedef struct VkDisplayPlanePropertiesKHR {
        VkDisplayKHR    currentDisplay;
        uint32_t        currentStackIndex;
    } VkDisplayPlanePropertiesKHR;

- `currentDisplay` is the handle of the display the plane is currently associated with. If the plane is not currently attached to any displays, this will be VK_NULL_HANDLE.

- `currentStackIndex` is the current z-order of the plane. This will be between 0 and the value returned by `vkGetPhysicalDeviceDisplayPlanePropertiesKHR` in `pPropertyCount`.

To query the properties of a device’s display planes, call:

    // Provided by VK_KHR_get_display_properties2
    VkResult vkGetPhysicalDeviceDisplayPlaneProperties2KHR(
        VkPhysicalDevice                            physicalDevice,
        uint32_t*                                   pPropertyCount,
        VkDisplayPlaneProperties2KHR*               pProperties);

- `physicalDevice` is a physical device.

- `pPropertyCount` is a pointer to an integer related to the number of display planes available or queried, as described below.

- `pProperties` is either `NULL` or a pointer to an array of `VkDisplayPlaneProperties2KHR` structures.

`vkGetPhysicalDeviceDisplayPlaneProperties2KHR` behaves similarly to vkGetPhysicalDeviceDisplayPlanePropertiesKHR, with the ability to return extended information via chained output structures.

Valid Usage (Implicit)

- VUID-vkGetPhysicalDeviceDisplayPlaneProperties2KHR-physicalDevice-parameter
  `physicalDevice` must be a valid VkPhysicalDevice handle

- VUID-vkGetPhysicalDeviceDisplayPlaneProperties2KHR-pPropertyCount-parameter
  `pPropertyCount` must be a valid pointer to a `uint32_t` value

- VUID-vkGetPhysicalDeviceDisplayPlaneProperties2KHR-pProperties-parameter
  If the value referenced by `pPropertyCount` is not `0`, and `pProperties` is not `NULL`, `pProperties` must be a valid pointer to an array of `pPropertyCount` VkDisplayPlaneProperties2KHR structures

Return Codes

Success

  - VK_INCOMPLETE

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkDisplayPlaneProperties2KHR` structure is defined as:

    // Provided by VK_KHR_get_display_properties2
    typedef struct VkDisplayPlaneProperties2KHR {
        VkStructureType                sType;
        void*                          pNext;
        VkDisplayPlanePropertiesKHR    displayPlaneProperties;
    } VkDisplayPlaneProperties2KHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `displayPlaneProperties` is a VkDisplayPlanePropertiesKHR structure.

Valid Usage (Implicit)

- VUID-VkDisplayPlaneProperties2KHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DISPLAY_PLANE_PROPERTIES_2_KHR

- VUID-VkDisplayPlaneProperties2KHR-pNext-pNext
  `pNext` must be `NULL`

To determine which displays a plane is usable with, call

    // Provided by VK_KHR_display
    VkResult vkGetDisplayPlaneSupportedDisplaysKHR(
        VkPhysicalDevice                            physicalDevice,
        uint32_t                                    planeIndex,
        uint32_t*                                   pDisplayCount,
        VkDisplayKHR*                               pDisplays);

- `physicalDevice` is a physical device.

- `planeIndex` is the plane which the application wishes to use, and must be in the range [0, physical device plane count - 1].

- `pDisplayCount` is a pointer to an integer related to the number of displays available or queried, as described below.

- `pDisplays` is either `NULL` or a pointer to an array of `VkDisplayKHR` handles.

If `pDisplays` is `NULL`, then the number of displays usable with the specified `planeIndex` for `physicalDevice` is returned in `pDisplayCount`. Otherwise, `pDisplayCount` must point to a variable set by the application to the number of elements in the `pDisplays` array, and on return the variable is overwritten with the number of handles actually written to `pDisplays`. If the value of `pDisplayCount` is less than the number of usable display-plane pairs for `physicalDevice`, at most `pDisplayCount` handles will be written, and VK_INCOMPLETE will be returned instead of VK_SUCCESS, to indicate that not all the available pairs were returned.

Valid Usage

- VUID-vkGetDisplayPlaneSupportedDisplaysKHR-planeIndex-01249
  `planeIndex` must be less than the number of display planes supported by the device as determined by calling `vkGetPhysicalDeviceDisplayPlanePropertiesKHR`

Valid Usage (Implicit)

- VUID-vkGetDisplayPlaneSupportedDisplaysKHR-physicalDevice-parameter
  `physicalDevice` must be a valid VkPhysicalDevice handle

- VUID-vkGetDisplayPlaneSupportedDisplaysKHR-pDisplayCount-parameter
  `pDisplayCount` must be a valid pointer to a `uint32_t` value

- VUID-vkGetDisplayPlaneSupportedDisplaysKHR-pDisplays-parameter
  If the value referenced by `pDisplayCount` is not `0`, and `pDisplays` is not `NULL`, `pDisplays` must be a valid pointer to an array of `pDisplayCount` VkDisplayKHR handles

Return Codes

Success

  - VK_INCOMPLETE

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

Additional properties of displays are queried using specialized query functions.

##### Display Modes

Display modes are represented by `VkDisplayModeKHR` handles:

    // Provided by VK_KHR_display
    VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDisplayModeKHR)

Each display has one or more supported modes associated with it by default. These built-in modes are queried by calling:

    // Provided by VK_KHR_display
    VkResult vkGetDisplayModePropertiesKHR(
        VkPhysicalDevice                            physicalDevice,
        VkDisplayKHR                                display,
        uint32_t*                                   pPropertyCount,
        VkDisplayModePropertiesKHR*                 pProperties);

- `physicalDevice` is the physical device associated with `display`.

- `display` is the display to query.

- `pPropertyCount` is a pointer to an integer related to the number of display modes available or queried, as described below.

- `pProperties` is either `NULL` or a pointer to an array of `VkDisplayModePropertiesKHR` structures.

If `pProperties` is `NULL`, then the number of display modes available on the specified `display` for `physicalDevice` is returned in `pPropertyCount`. Otherwise, `pPropertyCount` must point to a variable set by the application to the number of elements in the `pProperties` array, and on return the variable is overwritten with the number of structures actually written to `pProperties`. If the value of `pPropertyCount` is less than the number of display modes for `physicalDevice`, at most `pPropertyCount` structures will be written, and VK_INCOMPLETE will be returned instead of VK_SUCCESS, to indicate that not all the available display modes were returned.

Valid Usage (Implicit)

- VUID-vkGetDisplayModePropertiesKHR-physicalDevice-parameter
  `physicalDevice` must be a valid VkPhysicalDevice handle

- VUID-vkGetDisplayModePropertiesKHR-display-parameter
  `display` must be a valid VkDisplayKHR handle

- VUID-vkGetDisplayModePropertiesKHR-pPropertyCount-parameter
  `pPropertyCount` must be a valid pointer to a `uint32_t` value

- VUID-vkGetDisplayModePropertiesKHR-pProperties-parameter
  If the value referenced by `pPropertyCount` is not `0`, and `pProperties` is not `NULL`, `pProperties` must be a valid pointer to an array of `pPropertyCount` VkDisplayModePropertiesKHR structures

- VUID-vkGetDisplayModePropertiesKHR-display-parent
  `display` must have been created, allocated, or retrieved from `physicalDevice`

Return Codes

Success

  - VK_INCOMPLETE

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkDisplayModePropertiesKHR` structure is defined as:

    // Provided by VK_KHR_display
    typedef struct VkDisplayModePropertiesKHR {
        VkDisplayModeKHR              displayMode;
        VkDisplayModeParametersKHR    parameters;
    } VkDisplayModePropertiesKHR;

- `displayMode` is a handle to the display mode described in this structure. This handle will be valid for the lifetime of the Vulkan instance.

- `parameters` is a VkDisplayModeParametersKHR structure describing the display parameters associated with `displayMode`.

    // Provided by VK_KHR_display
    typedef VkFlags VkDisplayModeCreateFlagsKHR;

`VkDisplayModeCreateFlagsKHR` is a bitmask type for setting a mask, but is currently reserved for future use.

To query the properties of a device’s built-in display modes, call:

    // Provided by VK_KHR_get_display_properties2
    VkResult vkGetDisplayModeProperties2KHR(
        VkPhysicalDevice                            physicalDevice,
        VkDisplayKHR                                display,
        uint32_t*                                   pPropertyCount,
        VkDisplayModeProperties2KHR*                pProperties);

- `physicalDevice` is the physical device associated with `display`.

- `display` is the display to query.

- `pPropertyCount` is a pointer to an integer related to the number of display modes available or queried, as described below.

- `pProperties` is either `NULL` or a pointer to an array of `VkDisplayModeProperties2KHR` structures.

`vkGetDisplayModeProperties2KHR` behaves similarly to vkGetDisplayModePropertiesKHR, with the ability to return extended information via chained output structures.

Valid Usage (Implicit)

- VUID-vkGetDisplayModeProperties2KHR-physicalDevice-parameter
  `physicalDevice` must be a valid VkPhysicalDevice handle

- VUID-vkGetDisplayModeProperties2KHR-display-parameter
  `display` must be a valid VkDisplayKHR handle

- VUID-vkGetDisplayModeProperties2KHR-pPropertyCount-parameter
  `pPropertyCount` must be a valid pointer to a `uint32_t` value

- VUID-vkGetDisplayModeProperties2KHR-pProperties-parameter
  If the value referenced by `pPropertyCount` is not `0`, and `pProperties` is not `NULL`, `pProperties` must be a valid pointer to an array of `pPropertyCount` VkDisplayModeProperties2KHR structures

- VUID-vkGetDisplayModeProperties2KHR-display-parent
  `display` must have been created, allocated, or retrieved from `physicalDevice`

Return Codes

Success

  - VK_INCOMPLETE

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkDisplayModeProperties2KHR` structure is defined as:

    // Provided by VK_KHR_get_display_properties2
    typedef struct VkDisplayModeProperties2KHR {
        VkStructureType               sType;
        void*                         pNext;
        VkDisplayModePropertiesKHR    displayModeProperties;
    } VkDisplayModeProperties2KHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `displayModeProperties` is a VkDisplayModePropertiesKHR structure.

Valid Usage (Implicit)

- VUID-VkDisplayModeProperties2KHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DISPLAY_MODE_PROPERTIES_2_KHR

- VUID-VkDisplayModeProperties2KHR-pNext-pNext
  `pNext` must be `NULL` or a pointer to a valid instance of VkDisplayModeStereoPropertiesNV

- VUID-VkDisplayModeProperties2KHR-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

The `VkDisplayModeParametersKHR` structure is defined as:

    // Provided by VK_KHR_display
    typedef struct VkDisplayModeParametersKHR {
        VkExtent2D    visibleRegion;
        uint32_t      refreshRate;
    } VkDisplayModeParametersKHR;

- `visibleRegion` is the 2D extents of the visible region.

- `refreshRate` is a `uint32_t` that is the number of times the display is refreshed each second multiplied by 1000.

Note | For example, a 60Hz display mode would report a `refreshRate` of 60,000.

Valid Usage

- VUID-VkDisplayModeParametersKHR-width-01990
  The `width` member of `visibleRegion` must be greater than `0`

- VUID-VkDisplayModeParametersKHR-height-01991
  The `height` member of `visibleRegion` must be greater than `0`

- VUID-VkDisplayModeParametersKHR-refreshRate-01992
  `refreshRate` must be greater than `0`

The `VkDisplayModeStereoPropertiesNV` structure is defined as:

    // Provided by VK_NV_display_stereo
    typedef struct VkDisplayModeStereoPropertiesNV {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           hdmi3DSupported;
    } VkDisplayModeStereoPropertiesNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `hdmi3DSupported` indicates whether this display mode can be used for a display surface configured for VK_DISPLAY_SURFACE_STEREO_TYPE_HDMI_3D_NV.

Valid Usage (Implicit)

- VUID-VkDisplayModeStereoPropertiesNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DISPLAY_MODE_STEREO_PROPERTIES_NV

Structure Chaining

Extends the structure

  - VkDisplayModeProperties2KHR

Additional modes may also be created by calling:

    // Provided by VK_KHR_display
    VkResult vkCreateDisplayModeKHR(
        VkPhysicalDevice                            physicalDevice,
        VkDisplayKHR                                display,
        const VkDisplayModeCreateInfoKHR*           pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkDisplayModeKHR*                           pMode);

- `physicalDevice` is the physical device associated with `display`.

- `display` is the display to create an additional mode for.

- `pCreateInfo` is a pointer to a VkDisplayModeCreateInfoKHR structure describing the new mode to create.

- `pAllocator` is the allocator used for host memory allocated for the display mode object when there is no more specific allocator available (see Memory Allocation).

- `pMode` is a pointer to a VkDisplayModeKHR handle in which the mode created is returned.

Valid Usage (Implicit)

- VUID-vkCreateDisplayModeKHR-physicalDevice-parameter
  `physicalDevice` must be a valid VkPhysicalDevice handle

- VUID-vkCreateDisplayModeKHR-display-parameter
  `display` must be a valid VkDisplayKHR handle

- VUID-vkCreateDisplayModeKHR-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkDisplayModeCreateInfoKHR structure

- VUID-vkCreateDisplayModeKHR-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateDisplayModeKHR-pMode-parameter
  `pMode` must be a valid pointer to a VkDisplayModeKHR handle

- VUID-vkCreateDisplayModeKHR-display-parent
  `display` must have been created, allocated, or retrieved from `physicalDevice`

Host Synchronization

- Host access to `display` must be externally synchronized

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_INITIALIZATION_FAILED

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkDisplayModeCreateInfoKHR` structure is defined as:

    // Provided by VK_KHR_display
    typedef struct VkDisplayModeCreateInfoKHR {
        VkStructureType                sType;
        const void*                    pNext;
        VkDisplayModeCreateFlagsKHR    flags;
        VkDisplayModeParametersKHR     parameters;
    } VkDisplayModeCreateInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is reserved for future use, and must be zero.

- `parameters` is a VkDisplayModeParametersKHR structure describing the display parameters to use in creating the new mode. If the parameters are not compatible with the specified display, the implementation must return VK_ERROR_INITIALIZATION_FAILED.

Valid Usage (Implicit)

- VUID-VkDisplayModeCreateInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR

- VUID-VkDisplayModeCreateInfoKHR-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkDisplayModeCreateInfoKHR-flags-zerobitmask
  `flags` must be `0`

- VUID-VkDisplayModeCreateInfoKHR-parameters-parameter
  `parameters` must be a valid VkDisplayModeParametersKHR structure

Applications that wish to present directly to a display must select which layer, or “plane” of the display they wish to target, and a mode to use with the display. Each display supports at least one plane. The capabilities of a given mode and plane combination are determined by calling:

    // Provided by VK_KHR_display
    VkResult vkGetDisplayPlaneCapabilitiesKHR(
        VkPhysicalDevice                            physicalDevice,
        VkDisplayModeKHR                            mode,
        uint32_t                                    planeIndex,
        VkDisplayPlaneCapabilitiesKHR*              pCapabilities);

- `physicalDevice` is the physical device associated with the display specified by `mode`

- `mode` is the display mode the application intends to program when using the specified plane. Note this parameter also implicitly specifies a display.

- `planeIndex` is the plane which the application intends to use with the display, and is less than the number of display planes supported by the device.

- `pCapabilities` is a pointer to a VkDisplayPlaneCapabilitiesKHR structure in which the capabilities are returned.

Valid Usage (Implicit)

- VUID-vkGetDisplayPlaneCapabilitiesKHR-physicalDevice-parameter
  `physicalDevice` must be a valid VkPhysicalDevice handle

- VUID-vkGetDisplayPlaneCapabilitiesKHR-mode-parameter
  `mode` must be a valid VkDisplayModeKHR handle

- VUID-vkGetDisplayPlaneCapabilitiesKHR-pCapabilities-parameter
  `pCapabilities` must be a valid pointer to a VkDisplayPlaneCapabilitiesKHR structure

- VUID-vkGetDisplayPlaneCapabilitiesKHR-mode-parent
  `mode` must have been created, allocated, or retrieved from `physicalDevice`

Host Synchronization

- Host access to `mode` must be externally synchronized

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkDisplayPlaneCapabilitiesKHR` structure is defined as:

    // Provided by VK_KHR_display
    typedef struct VkDisplayPlaneCapabilitiesKHR {
        VkDisplayPlaneAlphaFlagsKHR    supportedAlpha;
        VkOffset2D                     minSrcPosition;
        VkOffset2D                     maxSrcPosition;
        VkExtent2D                     minSrcExtent;
        VkExtent2D                     maxSrcExtent;
        VkOffset2D                     minDstPosition;
        VkOffset2D                     maxDstPosition;
        VkExtent2D                     minDstExtent;
        VkExtent2D                     maxDstExtent;
    } VkDisplayPlaneCapabilitiesKHR;

- `supportedAlpha` is a bitmask of VkDisplayPlaneAlphaFlagBitsKHR describing the supported alpha blending modes.

- `minSrcPosition` is the minimum source rectangle offset supported by this plane using the specified mode.

- `maxSrcPosition` is the maximum source rectangle offset supported by this plane using the specified mode. The `x` and `y` components of `maxSrcPosition` must each be greater than or equal to the `x` and `y` components of `minSrcPosition`, respectively.

- `minSrcExtent` is the minimum source rectangle size supported by this plane using the specified mode.

- `maxSrcExtent` is the maximum source rectangle size supported by this plane using the specified mode.

- `minDstPosition`, `maxDstPosition`, `minDstExtent`, `maxDstExtent` all have similar semantics to their corresponding `*Src*` equivalents, but apply to the output region within the mode rather than the input region within the source image. Unlike the `*Src*` offsets, `minDstPosition` and `maxDstPosition` may contain negative values.

The minimum and maximum position and extent fields describe the implementation limits, if any, as they apply to the specified display mode and plane. Vendors may support displaying a subset of a swapchain’s presentable images on the specified display plane. This is expressed by returning `minSrcPosition`, `maxSrcPosition`, `minSrcExtent`, and `maxSrcExtent` values that indicate a range of possible positions and sizes which may be used to specify the region within the presentable images that source pixels will be read from when creating a swapchain on the specified display mode and plane.

Vendors may also support mapping the presentable images’ content to a subset or superset of the visible region in the specified display mode. This is expressed by returning `minDstPosition`, `maxDstPosition`, `minDstExtent` and `maxDstExtent` values that indicate a range of possible positions and sizes which may be used to describe the region within the display mode that the source pixels will be mapped to.

Other vendors may support only a 1-1 mapping between pixels in the presentable images and the display mode. This may be indicated by returning (0,0) for `minSrcPosition`, `maxSrcPosition`, `minDstPosition`, and `maxDstPosition`, and (display mode width, display mode height) for `minSrcExtent`, `maxSrcExtent`, `minDstExtent`, and `maxDstExtent`.

The value `supportedAlpha` must contain at least one valid VkDisplayPlaneAlphaFlagBitsKHR bit.

These values indicate the limits of the implementation’s individual fields. Not all combinations of values within the offset and extent ranges returned in `VkDisplayPlaneCapabilitiesKHR` are guaranteed to be supported. Presentation requests specifying unsupported combinations may fail.

To query the capabilities of a given mode and plane combination, call:

    // Provided by VK_KHR_get_display_properties2
    VkResult vkGetDisplayPlaneCapabilities2KHR(
        VkPhysicalDevice                            physicalDevice,
        const VkDisplayPlaneInfo2KHR*               pDisplayPlaneInfo,
        VkDisplayPlaneCapabilities2KHR*             pCapabilities);

- `physicalDevice` is the physical device associated with `pDisplayPlaneInfo`.

- `pDisplayPlaneInfo` is a pointer to a VkDisplayPlaneInfo2KHR structure describing the plane and mode.

- `pCapabilities` is a pointer to a VkDisplayPlaneCapabilities2KHR structure in which the capabilities are returned.

`vkGetDisplayPlaneCapabilities2KHR` behaves similarly to vkGetDisplayPlaneCapabilitiesKHR, with the ability to specify extended inputs via chained input structures, and to return extended information via chained output structures.

Valid Usage (Implicit)

- VUID-vkGetDisplayPlaneCapabilities2KHR-physicalDevice-parameter
  `physicalDevice` must be a valid VkPhysicalDevice handle

- VUID-vkGetDisplayPlaneCapabilities2KHR-pDisplayPlaneInfo-parameter
  `pDisplayPlaneInfo` must be a valid pointer to a valid VkDisplayPlaneInfo2KHR structure

- VUID-vkGetDisplayPlaneCapabilities2KHR-pCapabilities-parameter
  `pCapabilities` must be a valid pointer to a VkDisplayPlaneCapabilities2KHR structure

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkDisplayPlaneInfo2KHR` structure is defined as:

    // Provided by VK_KHR_get_display_properties2
    typedef struct VkDisplayPlaneInfo2KHR {
        VkStructureType     sType;
        const void*         pNext;
        VkDisplayModeKHR    mode;
        uint32_t            planeIndex;
    } VkDisplayPlaneInfo2KHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `mode` is the display mode the application intends to program when using the specified plane.

Note | This parameter also implicitly specifies a display.

- `planeIndex` is the plane which the application intends to use with the display.

The members of `VkDisplayPlaneInfo2KHR` correspond to the arguments to vkGetDisplayPlaneCapabilitiesKHR, with `sType` and `pNext` added for extensibility.

Valid Usage (Implicit)

- VUID-VkDisplayPlaneInfo2KHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DISPLAY_PLANE_INFO_2_KHR

- VUID-VkDisplayPlaneInfo2KHR-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkDisplayPlaneInfo2KHR-mode-parameter
  `mode` must be a valid VkDisplayModeKHR handle

Host Synchronization

- Host access to `mode` must be externally synchronized

The `VkDisplayPlaneCapabilities2KHR` structure is defined as:

    // Provided by VK_KHR_get_display_properties2
    typedef struct VkDisplayPlaneCapabilities2KHR {
        VkStructureType                  sType;
        void*                            pNext;
        VkDisplayPlaneCapabilitiesKHR    capabilities;
    } VkDisplayPlaneCapabilities2KHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `capabilities` is a VkDisplayPlaneCapabilitiesKHR structure.

Valid Usage (Implicit)

- VUID-VkDisplayPlaneCapabilities2KHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DISPLAY_PLANE_CAPABILITIES_2_KHR

- VUID-VkDisplayPlaneCapabilities2KHR-pNext-pNext
  `pNext` must be `NULL`

#### 40.3.2. Display Control

To set the power state of a display, call:

    // Provided by VK_EXT_display_control
    VkResult vkDisplayPowerControlEXT(
        VkDevice                                    device,
        VkDisplayKHR                                display,
        const VkDisplayPowerInfoEXT*                pDisplayPowerInfo);

- `device` is a logical device associated with `display`.

- `display` is the display whose power state is modified.

- `pDisplayPowerInfo` is a pointer to a VkDisplayPowerInfoEXT structure specifying the new power state of `display`.

Valid Usage (Implicit)

- VUID-vkDisplayPowerControlEXT-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkDisplayPowerControlEXT-display-parameter
  `display` must be a valid VkDisplayKHR handle

- VUID-vkDisplayPowerControlEXT-pDisplayPowerInfo-parameter
  `pDisplayPowerInfo` must be a valid pointer to a valid VkDisplayPowerInfoEXT structure

- VUID-vkDisplayPowerControlEXT-commonparent
  Both of `device`, and `display` must have been created, allocated, or retrieved from the same VkPhysicalDevice

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkDisplayPowerInfoEXT` structure is defined as:

    // Provided by VK_EXT_display_control
    typedef struct VkDisplayPowerInfoEXT {
        VkStructureType           sType;
        const void*               pNext;
        VkDisplayPowerStateEXT    powerState;
    } VkDisplayPowerInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `powerState` is a VkDisplayPowerStateEXT value specifying the new power state of the display.

Valid Usage (Implicit)

- VUID-VkDisplayPowerInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DISPLAY_POWER_INFO_EXT

- VUID-VkDisplayPowerInfoEXT-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkDisplayPowerInfoEXT-powerState-parameter
  `powerState` must be a valid VkDisplayPowerStateEXT value

Possible values of VkDisplayPowerInfoEXT::`powerState`, specifying the new power state of a display, are:

    // Provided by VK_EXT_display_control
    typedef enum VkDisplayPowerStateEXT {
        VK_DISPLAY_POWER_STATE_OFF_EXT = 0,
        VK_DISPLAY_POWER_STATE_SUSPEND_EXT = 1,
        VK_DISPLAY_POWER_STATE_ON_EXT = 2,
    } VkDisplayPowerStateEXT;

- VK_DISPLAY_POWER_STATE_OFF_EXT specifies that the display is powered down.

- VK_DISPLAY_POWER_STATE_SUSPEND_EXT specifies that the display is put into a low power mode, from which it may be able to transition back to VK_DISPLAY_POWER_STATE_ON_EXT more quickly than if it were in VK_DISPLAY_POWER_STATE_OFF_EXT. This state may be the same as VK_DISPLAY_POWER_STATE_OFF_EXT.

- VK_DISPLAY_POWER_STATE_ON_EXT specifies that the display is powered on.

#### 40.3.3. Display Surfaces

A complete display configuration includes a mode, one or more display planes and any parameters describing their behavior, and parameters describing some aspects of the images associated with those planes. Display surfaces describe the configuration of a single plane within a complete display configuration. To create a `VkSurfaceKHR` object for a display plane, call:

    // Provided by VK_KHR_display
    VkResult vkCreateDisplayPlaneSurfaceKHR(
        VkInstance                                  instance,
        const VkDisplaySurfaceCreateInfoKHR*        pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkSurfaceKHR*                               pSurface);

- `instance` is the instance corresponding to the physical device the targeted display is on.

- `pCreateInfo` is a pointer to a VkDisplaySurfaceCreateInfoKHR structure specifying which mode, plane, and other parameters to use, as described below.

- `pAllocator` is the allocator used for host memory allocated for the surface object when there is no more specific allocator available (see Memory Allocation).

- `pSurface` is a pointer to a VkSurfaceKHR handle in which the created surface is returned.

Valid Usage (Implicit)

- VUID-vkCreateDisplayPlaneSurfaceKHR-instance-parameter
  `instance` must be a valid VkInstance handle

- VUID-vkCreateDisplayPlaneSurfaceKHR-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkDisplaySurfaceCreateInfoKHR structure

- VUID-vkCreateDisplayPlaneSurfaceKHR-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateDisplayPlaneSurfaceKHR-pSurface-parameter
  `pSurface` must be a valid pointer to a VkSurfaceKHR handle

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkDisplaySurfaceCreateInfoKHR` structure is defined as:

    // Provided by VK_KHR_display
    typedef struct VkDisplaySurfaceCreateInfoKHR {
        VkStructureType                   sType;
        const void*                       pNext;
        VkDisplaySurfaceCreateFlagsKHR    flags;
        VkDisplayModeKHR                  displayMode;
        uint32_t                          planeIndex;
        uint32_t                          planeStackIndex;
        VkSurfaceTransformFlagBitsKHR     transform;
        float                             globalAlpha;
        VkDisplayPlaneAlphaFlagBitsKHR    alphaMode;
        VkExtent2D                        imageExtent;
    } VkDisplaySurfaceCreateInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is reserved for future use, and must be zero.

- `displayMode` is a VkDisplayModeKHR handle specifying the mode to use when displaying this surface.

- `planeIndex` is the plane on which this surface appears.

- `planeStackIndex` is the z-order of the plane.

- `transform` is a VkSurfaceTransformFlagBitsKHR value specifying the transformation to apply to images as part of the scanout operation.

- `globalAlpha` is the global alpha value. This value is ignored if `alphaMode` is not VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR.

- `alphaMode` is a VkDisplayPlaneAlphaFlagBitsKHR value specifying the type of alpha blending to use.

- `imageExtent` is the size of the presentable images to use with the surface.

Note | Creating a display surface must not modify the state of the displays, planes, or other resources it names. For example, it must not apply the specified mode to be set on the associated display. Application of display configuration occurs as a side effect of presenting to a display surface.

Valid Usage

- VUID-VkDisplaySurfaceCreateInfoKHR-planeIndex-01252
  `planeIndex` must be less than the number of display planes supported by the device as determined by calling `vkGetPhysicalDeviceDisplayPlanePropertiesKHR`

- VUID-VkDisplaySurfaceCreateInfoKHR-planeReorderPossible-01253
  If the `planeReorderPossible` member of the `VkDisplayPropertiesKHR` structure returned by `vkGetPhysicalDeviceDisplayPropertiesKHR` for the display corresponding to `displayMode` is VK_TRUE then `planeStackIndex` must be less than the number of display planes supported by the device as determined by calling `vkGetPhysicalDeviceDisplayPlanePropertiesKHR`; otherwise `planeStackIndex` must equal the `currentStackIndex` member of `VkDisplayPlanePropertiesKHR` returned by `vkGetPhysicalDeviceDisplayPlanePropertiesKHR` for the display plane corresponding to `displayMode`

- VUID-VkDisplaySurfaceCreateInfoKHR-alphaMode-01254
  If `alphaMode` is VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR then `globalAlpha` must be between `0` and `1`, inclusive

- VUID-VkDisplaySurfaceCreateInfoKHR-alphaMode-01255
  `alphaMode` must be one of the bits present in the `supportedAlpha` member of `VkDisplayPlaneCapabilitiesKHR` for the display plane corresponding to `displayMode`

- VUID-VkDisplaySurfaceCreateInfoKHR-transform-06740
  `transform` must be one of the bits present in the `supportedTransforms` member of `VkDisplayPropertiesKHR` for the display corresponding to `displayMode`

- VUID-VkDisplaySurfaceCreateInfoKHR-width-01256
  The `width` and `height` members of `imageExtent` must be less than or equal to VkPhysicalDeviceLimits::`maxImageDimension2D`

- VUID-VkDisplaySurfaceCreateInfoKHR-pNext-10284
  If the `pNext` chain includes a VkDisplaySurfaceStereoCreateInfoNV structure whose `stereoType` member is VK_DISPLAY_SURFACE_STEREO_TYPE_HDMI_3D_NV, then the `hdmi3DSupported` member of the VkDisplayModeStereoPropertiesNV structure in the `pNext` chain of the `VkDisplayModeProperties2KHR` structure returned by vkGetDisplayModeProperties2KHR for the display mode corresponding to `displayMode` must be VK_TRUE

Valid Usage (Implicit)

- VUID-VkDisplaySurfaceCreateInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR

- VUID-VkDisplaySurfaceCreateInfoKHR-pNext-pNext
  `pNext` must be `NULL` or a pointer to a valid instance of VkDisplaySurfaceStereoCreateInfoNV

- VUID-VkDisplaySurfaceCreateInfoKHR-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkDisplaySurfaceCreateInfoKHR-flags-zerobitmask
  `flags` must be `0`

- VUID-VkDisplaySurfaceCreateInfoKHR-displayMode-parameter
  `displayMode` must be a valid VkDisplayModeKHR handle

- VUID-VkDisplaySurfaceCreateInfoKHR-transform-parameter
  `transform` must be a valid VkSurfaceTransformFlagBitsKHR value

- VUID-VkDisplaySurfaceCreateInfoKHR-alphaMode-parameter
  `alphaMode` must be a valid VkDisplayPlaneAlphaFlagBitsKHR value

    // Provided by VK_KHR_display
    typedef VkFlags VkDisplaySurfaceCreateFlagsKHR;

`VkDisplaySurfaceCreateFlagsKHR` is a bitmask type for setting a mask, but is currently reserved for future use.

Bits which can be set in VkDisplaySurfaceCreateInfoKHR::`alphaMode`, specifying the type of alpha blending to use on a display, are:

    // Provided by VK_KHR_display
    typedef enum VkDisplayPlaneAlphaFlagBitsKHR {
        VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR = 0x00000001,
        VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR = 0x00000002,
        VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR = 0x00000004,
        VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR = 0x00000008,
    } VkDisplayPlaneAlphaFlagBitsKHR;

- VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR specifies that the source image will be treated as opaque.

- VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR specifies that a global alpha value must be specified that will be applied to all pixels in the source image.

- VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR specifies that the alpha value will be determined by the alpha component of the source image’s pixels. If the source format contains no alpha values, no blending will be applied. The source alpha values are not premultiplied into the source image’s other color components.

- VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR is equivalent to VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR, except the source alpha values are assumed to be premultiplied into the source image’s other color components.

    // Provided by VK_KHR_display
    typedef VkFlags VkDisplayPlaneAlphaFlagsKHR;

`VkDisplayPlaneAlphaFlagsKHR` is a bitmask type for setting a mask of zero or more VkDisplayPlaneAlphaFlagBitsKHR.

The `VkDisplaySurfaceStereoCreateInfoNV` structure is defined as:

    // Provided by VK_NV_display_stereo
    typedef struct VkDisplaySurfaceStereoCreateInfoNV {
        VkStructureType                 sType;
        const void*                     pNext;
        VkDisplaySurfaceStereoTypeNV    stereoType;
    } VkDisplaySurfaceStereoCreateInfoNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `stereoType` is a VkDisplaySurfaceStereoTypeNV value specifying the type of 3D stereo presentation the display will be configured for.

Valid Usage (Implicit)

- VUID-VkDisplaySurfaceStereoCreateInfoNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DISPLAY_SURFACE_STEREO_CREATE_INFO_NV

- VUID-VkDisplaySurfaceStereoCreateInfoNV-stereoType-parameter
  `stereoType` must be a valid VkDisplaySurfaceStereoTypeNV value

Structure Chaining

Extends the structure

  - VkDisplaySurfaceCreateInfoKHR

Possible values of VkDisplaySurfaceStereoCreateInfoNV::`stereoType`, specifying the type of 3D stereo presentation the display will be configured for, are:

    // Provided by VK_NV_display_stereo
    typedef enum VkDisplaySurfaceStereoTypeNV {
        VK_DISPLAY_SURFACE_STEREO_TYPE_NONE_NV = 0,
        VK_DISPLAY_SURFACE_STEREO_TYPE_ONBOARD_DIN_NV = 1,
        VK_DISPLAY_SURFACE_STEREO_TYPE_HDMI_3D_NV = 2,
        VK_DISPLAY_SURFACE_STEREO_TYPE_INBAND_DISPLAYPORT_NV = 3,
    } VkDisplaySurfaceStereoTypeNV;

- VK_DISPLAY_SURFACE_STEREO_TYPE_NONE_NV specifies no configuration for stereo presentation. This is the default behavior if VkDisplaySurfaceStereoCreateInfoNV is not provided.

- VK_DISPLAY_SURFACE_STEREO_TYPE_ONBOARD_DIN_NV specifies configuration for glasses that connect via a DIN connector on the back of the graphics card.

- VK_DISPLAY_SURFACE_STEREO_TYPE_HDMI_3D_NV specifies configuration for HDMI 3D compatible display devices with their own stereo emitters. This is also known as HDMI Frame Packed Stereo, where the left and right eye images are stacked into a single frame with a doubled pixel clock and refresh rate.

- VK_DISPLAY_SURFACE_STEREO_TYPE_INBAND_DISPLAYPORT_NV specifies configuration for DisplayPort display devices with in-band stereo signaling and emitters.

#### 40.3.4. Presenting to Headless Surfaces

Vulkan rendering can be presented to a headless surface, where the presentation operation is a no-op producing no externally-visible result.

Note | Because there is no real presentation target, the headless presentation engine may be extended to impose an arbitrary or customizable set of restrictions and features. This makes it a useful portable test target for applications targeting a wide range of presentation engines where the actual target presentation engines might be scarce, unavailable or otherwise undesirable or inconvenient to use for general Vulkan application development. The usual surface query mechanisms must be used to determine the actual restrictions and features of the implementation.

To create a headless `VkSurfaceKHR` object, call:

    // Provided by VK_EXT_headless_surface
    VkResult vkCreateHeadlessSurfaceEXT(
        VkInstance                                  instance,
        const VkHeadlessSurfaceCreateInfoEXT*       pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkSurfaceKHR*                               pSurface);

- `instance` is the instance to associate the surface with.

- `pCreateInfo` is a pointer to a VkHeadlessSurfaceCreateInfoEXT structure containing parameters affecting the creation of the surface object.

- `pAllocator` is the allocator used for host memory allocated for the surface object when there is no more specific allocator available (see Memory Allocation).

- `pSurface` is a pointer to a VkSurfaceKHR handle in which the created surface object is returned.

Valid Usage (Implicit)

- VUID-vkCreateHeadlessSurfaceEXT-instance-parameter
  `instance` must be a valid VkInstance handle

- VUID-vkCreateHeadlessSurfaceEXT-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkHeadlessSurfaceCreateInfoEXT structure

- VUID-vkCreateHeadlessSurfaceEXT-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateHeadlessSurfaceEXT-pSurface-parameter
  `pSurface` must be a valid pointer to a VkSurfaceKHR handle

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkHeadlessSurfaceCreateInfoEXT` structure is defined as:

    // Provided by VK_EXT_headless_surface
    typedef struct VkHeadlessSurfaceCreateInfoEXT {
        VkStructureType                    sType;
        const void*                        pNext;
        VkHeadlessSurfaceCreateFlagsEXT    flags;
    } VkHeadlessSurfaceCreateInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is reserved for future use.

Valid Usage (Implicit)

- VUID-VkHeadlessSurfaceCreateInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_HEADLESS_SURFACE_CREATE_INFO_EXT

- VUID-VkHeadlessSurfaceCreateInfoEXT-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkHeadlessSurfaceCreateInfoEXT-flags-zerobitmask
  `flags` must be `0`

For headless surfaces, `currentExtent` is the reserved value (0xFFFFFFFF, 0xFFFFFFFF). Whatever the application sets a swapchain’s `imageExtent` to will be the size of the surface, after the first image is presented.

    // Provided by VK_EXT_headless_surface
    typedef VkFlags VkHeadlessSurfaceCreateFlagsEXT;

`VkHeadlessSurfaceCreateFlagsEXT` is a bitmask type for setting a mask, but is currently reserved for future use.

### 40.4. Querying for WSI Support

Not all physical devices will include WSI support. Within a physical device, not all queue families will support presentation. WSI support and compatibility can be determined in a platform-neutral manner (which determines support for presentation to a particular surface object) and additionally may be determined in platform-specific manners (which determine support for presentation on the specified physical device but do not guarantee support for presentation to a particular surface object).

To determine whether a queue family of a physical device supports presentation to a given surface, call:

    // Provided by VK_KHR_surface
    VkResult vkGetPhysicalDeviceSurfaceSupportKHR(
        VkPhysicalDevice                            physicalDevice,
        uint32_t                                    queueFamilyIndex,
        VkSurfaceKHR                                surface,
        VkBool32*                                   pSupported);

- `physicalDevice` is the physical device.

- `queueFamilyIndex` is the queue family.

- `surface` is the surface.

- `pSupported` is a pointer to a VkBool32. VK_TRUE indicates support, and VK_FALSE indicates no support.

Valid Usage

- VUID-vkGetPhysicalDeviceSurfaceSupportKHR-queueFamilyIndex-01269
  `queueFamilyIndex` must be less than `pQueueFamilyPropertyCount` returned by `vkGetPhysicalDeviceQueueFamilyProperties` for the given `physicalDevice`

Valid Usage (Implicit)

- VUID-vkGetPhysicalDeviceSurfaceSupportKHR-physicalDevice-parameter
  `physicalDevice` must be a valid VkPhysicalDevice handle

- VUID-vkGetPhysicalDeviceSurfaceSupportKHR-surface-parameter
  `surface` must be a valid VkSurfaceKHR handle

- VUID-vkGetPhysicalDeviceSurfaceSupportKHR-pSupported-parameter
  `pSupported` must be a valid pointer to a VkBool32 value

- VUID-vkGetPhysicalDeviceSurfaceSupportKHR-commonparent
  Both of `physicalDevice`, and `surface` must have been created, allocated, or retrieved from the same VkInstance

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_SURFACE_LOST_KHR

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

#### 40.4.1. Android Platform

On Android, all physical devices and queue families must be capable of presentation with any native window. As a result there is no Android-specific query for these capabilities.

#### 40.4.2. Wayland Platform

To determine whether a queue family of a physical device supports presentation to a Wayland compositor, call:

    // Provided by VK_KHR_wayland_surface
    VkBool32 vkGetPhysicalDeviceWaylandPresentationSupportKHR(
        VkPhysicalDevice                            physicalDevice,
        uint32_t                                    queueFamilyIndex,
        struct wl_display*                          display);

- `physicalDevice` is the physical device.

- `queueFamilyIndex` is the queue family index.

- `display` is a pointer to the `wl_display` associated with a Wayland compositor.

This platform-specific function can be called prior to creating a surface.

Valid Usage

- VUID-vkGetPhysicalDeviceWaylandPresentationSupportKHR-queueFamilyIndex-01306
  `queueFamilyIndex` must be less than `pQueueFamilyPropertyCount` returned by `vkGetPhysicalDeviceQueueFamilyProperties` for the given `physicalDevice`

Valid Usage (Implicit)

- VUID-vkGetPhysicalDeviceWaylandPresentationSupportKHR-physicalDevice-parameter
  `physicalDevice` must be a valid VkPhysicalDevice handle

- VUID-vkGetPhysicalDeviceWaylandPresentationSupportKHR-display-parameter
  `display` must be a valid pointer to a `wl_display` value

#### 40.4.3. Win32 Platform

To determine whether a queue family of a physical device supports presentation to the Microsoft Windows desktop, call:

    // Provided by VK_KHR_win32_surface
    VkBool32 vkGetPhysicalDeviceWin32PresentationSupportKHR(
        VkPhysicalDevice                            physicalDevice,
        uint32_t                                    queueFamilyIndex);

- `physicalDevice` is the physical device.

- `queueFamilyIndex` is the queue family index.

This platform-specific function can be called prior to creating a surface.

Valid Usage

- VUID-vkGetPhysicalDeviceWin32PresentationSupportKHR-queueFamilyIndex-01309
  `queueFamilyIndex` must be less than `pQueueFamilyPropertyCount` returned by `vkGetPhysicalDeviceQueueFamilyProperties` for the given `physicalDevice`

Valid Usage (Implicit)

- VUID-vkGetPhysicalDeviceWin32PresentationSupportKHR-physicalDevice-parameter
  `physicalDevice` must be a valid VkPhysicalDevice handle

#### 40.4.4. XCB Platform

To determine whether a queue family of a physical device supports presentation to an X11 server, using the XCB client-side library, call:

    // Provided by VK_KHR_xcb_surface
    VkBool32 vkGetPhysicalDeviceXcbPresentationSupportKHR(
        VkPhysicalDevice                            physicalDevice,
        uint32_t                                    queueFamilyIndex,
        xcb_connection_t*                           connection,
        xcb_visualid_t                              visual_id);

- `physicalDevice` is the physical device.

- `queueFamilyIndex` is the queue family index.

- `connection` is a pointer to an `xcb_connection_t` to the X server.

- `visual_id` is an X11 visual (`xcb_visualid_t`).

This platform-specific function can be called prior to creating a surface.

Valid Usage

- VUID-vkGetPhysicalDeviceXcbPresentationSupportKHR-queueFamilyIndex-01312
  `queueFamilyIndex` must be less than `pQueueFamilyPropertyCount` returned by `vkGetPhysicalDeviceQueueFamilyProperties` for the given `physicalDevice`

Valid Usage (Implicit)

- VUID-vkGetPhysicalDeviceXcbPresentationSupportKHR-physicalDevice-parameter
  `physicalDevice` must be a valid VkPhysicalDevice handle

- VUID-vkGetPhysicalDeviceXcbPresentationSupportKHR-connection-parameter
  `connection` must be a valid pointer to an `xcb_connection_t` value

#### 40.4.5. Xlib Platform

To determine whether a queue family of a physical device supports presentation to an X11 server, using the Xlib client-side library, call:

    // Provided by VK_KHR_xlib_surface
    VkBool32 vkGetPhysicalDeviceXlibPresentationSupportKHR(
        VkPhysicalDevice                            physicalDevice,
        uint32_t                                    queueFamilyIndex,
        Display*                                    dpy,
        VisualID                                    visualID);

- `physicalDevice` is the physical device.

- `queueFamilyIndex` is the queue family index.

- `dpy` is a pointer to an Xlib `Display` connection to the server.

- `visualID` is an X11 visual (`VisualID`).

This platform-specific function can be called prior to creating a surface.

Valid Usage

- VUID-vkGetPhysicalDeviceXlibPresentationSupportKHR-queueFamilyIndex-01315
  `queueFamilyIndex` must be less than `pQueueFamilyPropertyCount` returned by `vkGetPhysicalDeviceQueueFamilyProperties` for the given `physicalDevice`

Valid Usage (Implicit)

- VUID-vkGetPhysicalDeviceXlibPresentationSupportKHR-physicalDevice-parameter
  `physicalDevice` must be a valid VkPhysicalDevice handle

- VUID-vkGetPhysicalDeviceXlibPresentationSupportKHR-dpy-parameter
  `dpy` must be a valid pointer to a `Display` value

#### 40.4.6. DirectFB Platform

To determine whether a queue family of a physical device supports presentation with DirectFB library, call:

    // Provided by VK_EXT_directfb_surface
    VkBool32 vkGetPhysicalDeviceDirectFBPresentationSupportEXT(
        VkPhysicalDevice                            physicalDevice,
        uint32_t                                    queueFamilyIndex,
        IDirectFB*                                  dfb);

- `physicalDevice` is the physical device.

- `queueFamilyIndex` is the queue family index.

- `dfb` is a pointer to the `IDirectFB` main interface of DirectFB.

This platform-specific function can be called prior to creating a surface.

Valid Usage

- VUID-vkGetPhysicalDeviceDirectFBPresentationSupportEXT-queueFamilyIndex-04119
  `queueFamilyIndex` must be less than `pQueueFamilyPropertyCount` returned by `vkGetPhysicalDeviceQueueFamilyProperties` for the given `physicalDevice`

Valid Usage (Implicit)

- VUID-vkGetPhysicalDeviceDirectFBPresentationSupportEXT-physicalDevice-parameter
  `physicalDevice` must be a valid VkPhysicalDevice handle

- VUID-vkGetPhysicalDeviceDirectFBPresentationSupportEXT-dfb-parameter
  `dfb` must be a valid pointer to an `IDirectFB` value

#### 40.4.7. Metal Platform

On Apple platforms with Metal support, all physical devices and queue families must be capable of presentation with any layer. As a result there is no Apple-specific query for these capabilities.

#### 40.4.8. Fuchsia Platform

On Fuchsia, all physical devices and queue families must be capable of presentation with any ImagePipe. As a result there is no Fuchsia-specific query for these capabilities.

#### 40.4.9. Google Games Platform

On Google Games Platform, all physical devices and queue families with the VK_QUEUE_GRAPHICS_BIT or VK_QUEUE_COMPUTE_BIT capabilities must be capable of presentation with any Google Games Platform stream descriptor. As a result, there is no query specific to Google Games Platform for these capabilities.

#### 40.4.10. iOS Platform

On iOS, all physical devices and queue families must be capable of presentation with any layer. As a result there is no iOS-specific query for these capabilities.

#### 40.4.11. macOS Platform

On macOS, all physical devices and queue families must be capable of presentation with any layer. As a result there is no macOS-specific query for these capabilities.

#### 40.4.12. VI Platform

On VI, all physical devices and queue families must be capable of presentation with any layer. As a result there is no VI-specific query for these capabilities.

#### 40.4.13. QNX Screen Platform

To determine whether a queue family of a physical device supports presentation to a QNX Screen compositor, call:

    // Provided by VK_QNX_screen_surface
    VkBool32 vkGetPhysicalDeviceScreenPresentationSupportQNX(
        VkPhysicalDevice                            physicalDevice,
        uint32_t                                    queueFamilyIndex,
        struct _screen_window*                      window);

- `physicalDevice` is the physical device.

- `queueFamilyIndex` is the queue family index.

- `window` is the QNX Screen `window` object.

This platform-specific function can be called prior to creating a surface.

Valid Usage

- VUID-vkGetPhysicalDeviceScreenPresentationSupportQNX-queueFamilyIndex-04743
  `queueFamilyIndex` must be less than `pQueueFamilyPropertyCount` returned by `vkGetPhysicalDeviceQueueFamilyProperties` for the given `physicalDevice`

Valid Usage (Implicit)

- VUID-vkGetPhysicalDeviceScreenPresentationSupportQNX-physicalDevice-parameter
  `physicalDevice` must be a valid VkPhysicalDevice handle

- VUID-vkGetPhysicalDeviceScreenPresentationSupportQNX-window-parameter
  `window` must be a valid pointer to a `_screen_window` value

#### 40.4.14. Open Harmony OS Platform

On Open Harmony OS, all physical devices and queue families must be capable of presentation with any native window. As a result there is no Open Harmony OS platform-specific query for these capabilities.

#### 40.4.15. UBM Platform

To determine whether a queue family of a physical device supports presentation to a UBM compositor, call:

    // Provided by VK_SEC_ubm_surface
    VkBool32 vkGetPhysicalDeviceUbmPresentationSupportSEC(
        VkPhysicalDevice                            physicalDevice,
        uint32_t                                    queueFamilyIndex,
        struct ubm_device*                          device);

- `physicalDevice` is the physical device.

- `queueFamilyIndex` is the queue family index.

- `device` is a pointer to the `ubm_device` associated with a UBM compositor.

This platform-specific function can be called prior to creating a surface.

Valid Usage

- VUID-vkGetPhysicalDeviceUbmPresentationSupportSEC-device-12368
  `device` must point to a valid UBM `ubm_device`

- VUID-vkGetPhysicalDeviceUbmPresentationSupportSEC-queueFamilyIndex-12369
  `queueFamilyIndex` must be less than `pQueueFamilyPropertyCount` returned by `vkGetPhysicalDeviceQueueFamilyProperties` for the given `physicalDevice`

Valid Usage (Implicit)

- VUID-vkGetPhysicalDeviceUbmPresentationSupportSEC-physicalDevice-parameter
  `physicalDevice` must be a valid VkPhysicalDevice handle

- VUID-vkGetPhysicalDeviceUbmPresentationSupportSEC-device-parameter
  `device` must be a valid pointer to a `ubm_device` value

### 40.5. Surface Queries

The capabilities of a swapchain targeting a surface are the intersection of the capabilities of the WSI platform, the native window or display, and the physical device. The resulting capabilities can be obtained with the queries listed below in this section.

Note | In addition to the surface capabilities as obtained by surface queries below, swapchain images are also subject to ordinary image creation limits as reported by vkGetPhysicalDeviceImageFormatProperties. As an application is instructed by the appropriate Valid Usage sections, both the surface capabilities and the image creation limits have to be satisfied whenever swapchain images are created.

#### 40.5.1. Surface Capabilities

To query the basic capabilities of a surface, needed in order to create a swapchain, call:

Warning | This functionality is superseded by vkGetPhysicalDeviceSurfaceCapabilities2KHR. See Legacy Functionality for more information.

    // Provided by VK_KHR_surface
    VkResult vkGetPhysicalDeviceSurfaceCapabilitiesKHR(
        VkPhysicalDevice                            physicalDevice,
        VkSurfaceKHR                                surface,
        VkSurfaceCapabilitiesKHR*                   pSurfaceCapabilities);

- `physicalDevice` is the physical device that will be associated with the swapchain to be created. See vkCreateSwapchainKHR for details of swapchain creation.

- `surface` is the surface that will be associated with the swapchain.

- `pSurfaceCapabilities` is a pointer to a VkSurfaceCapabilitiesKHR structure in which the capabilities are returned.

Valid Usage

- VUID-vkGetPhysicalDeviceSurfaceCapabilitiesKHR-surface-06211
  `surface` must be supported by `physicalDevice`, as reported by vkGetPhysicalDeviceSurfaceSupportKHR or an equivalent platform-specific mechanism

Valid Usage (Implicit)

- VUID-vkGetPhysicalDeviceSurfaceCapabilitiesKHR-physicalDevice-parameter
  `physicalDevice` must be a valid VkPhysicalDevice handle

- VUID-vkGetPhysicalDeviceSurfaceCapabilitiesKHR-surface-parameter
  `surface` must be a valid VkSurfaceKHR handle

- VUID-vkGetPhysicalDeviceSurfaceCapabilitiesKHR-pSurfaceCapabilities-parameter
  `pSurfaceCapabilities` must be a valid pointer to a VkSurfaceCapabilitiesKHR structure

- VUID-vkGetPhysicalDeviceSurfaceCapabilitiesKHR-commonparent
  Both of `physicalDevice`, and `surface` must have been created, allocated, or retrieved from the same VkInstance

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_SURFACE_LOST_KHR

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkSurfaceCapabilitiesKHR` structure is defined as:

Warning | This functionality is superseded by VK_KHR_get_surface_capabilities2. See Legacy Functionality for more information.

    // Provided by VK_KHR_surface
    typedef struct VkSurfaceCapabilitiesKHR {
        uint32_t                         minImageCount;
        uint32_t                         maxImageCount;
        VkExtent2D                       currentExtent;
        VkExtent2D                       minImageExtent;
        VkExtent2D                       maxImageExtent;
        uint32_t                         maxImageArrayLayers;
        VkSurfaceTransformFlagsKHR       supportedTransforms;
        VkSurfaceTransformFlagBitsKHR    currentTransform;
        VkCompositeAlphaFlagsKHR         supportedCompositeAlpha;
        VkImageUsageFlags                supportedUsageFlags;
    } VkSurfaceCapabilitiesKHR;

- `minImageCount` is the minimum number of images the specified device supports for a swapchain created for the surface, and will be at least one.

- `maxImageCount` is the maximum number of images the specified device supports for a swapchain created for the surface, and will be either 0, or greater than or equal to `minImageCount`. A value of 0 means that there is no limit on the number of images, though there may be limits related to the total amount of memory used by presentable images.

- `currentExtent` is the current width and height of the surface, or the special value (0xFFFFFFFF, 0xFFFFFFFF) indicating that the surface size will be determined by the extent of a swapchain targeting the surface.

- `minImageExtent` contains the smallest valid swapchain extent for the surface on the specified device. The `width` and `height` of the extent will each be less than or equal to the corresponding `width` and `height` of `currentExtent`, unless `currentExtent` has the special value described above.

- `maxImageExtent` contains the largest valid swapchain extent for the surface on the specified device. The `width` and `height` of the extent will each be greater than or equal to the corresponding `width` and `height` of `minImageExtent`. The `width` and `height` of the extent will each be greater than or equal to the corresponding `width` and `height` of `currentExtent`, unless `currentExtent` has the special value described above.

- `maxImageArrayLayers` is the maximum number of layers presentable images can have for a swapchain created for this device and surface, and will be at least one.

- `supportedTransforms` is a bitmask of VkSurfaceTransformFlagBitsKHR indicating the presentation transforms supported for the surface on the specified device. At least one bit will be set.

- `currentTransform` is VkSurfaceTransformFlagBitsKHR value indicating the surface’s current transform relative to the presentation engine’s natural orientation.

- `supportedCompositeAlpha` is a bitmask of VkCompositeAlphaFlagBitsKHR, representing the alpha compositing modes supported by the presentation engine for the surface on the specified device, and at least one bit will be set. Opaque composition can be achieved in any alpha compositing mode by either using an image format that has no alpha component, or by ensuring that all pixels in the presentable images have an alpha value of 1.0.

- `supportedUsageFlags` is a bitmask of VkImageUsageFlagBits representing the ways the application can use the presentable images of a swapchain created with VkPresentModeKHR set to VK_PRESENT_MODE_FIFO_LATEST_READY_KHR, VK_PRESENT_MODE_IMMEDIATE_KHR, VK_PRESENT_MODE_MAILBOX_KHR, VK_PRESENT_MODE_FIFO_KHR or VK_PRESENT_MODE_FIFO_RELAXED_KHR for the surface on the specified device. VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT must be included in the set. Implementations may support additional usages.

Note | Supported usage flags of a presentable image when using VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR or VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR presentation mode are provided by VkSharedPresentSurfaceCapabilities2KHR or VkSharedPresentSurfaceCapabilitiesKHR.

Note | Formulas such as min(N, `maxImageCount`) are not correct, since `maxImageCount` may be zero.

To query the basic capabilities of a surface defined by the core or extensions, call:

    // Provided by VK_KHR_get_surface_capabilities2
    VkResult vkGetPhysicalDeviceSurfaceCapabilities2KHR(
        VkPhysicalDevice                            physicalDevice,
        const VkPhysicalDeviceSurfaceInfo2KHR*      pSurfaceInfo,
        VkSurfaceCapabilities2KHR*                  pSurfaceCapabilities);

- `physicalDevice` is the physical device that will be associated with the swapchain to be created, as described for vkCreateSwapchainKHR.

- `pSurfaceInfo` is a pointer to a VkPhysicalDeviceSurfaceInfo2KHR structure describing the surface and other fixed parameters that would be consumed by vkCreateSwapchainKHR.

- `pSurfaceCapabilities` is a pointer to a VkSurfaceCapabilities2KHR structure in which the capabilities are returned.

`vkGetPhysicalDeviceSurfaceCapabilities2KHR` behaves similarly to vkGetPhysicalDeviceSurfaceCapabilitiesKHR, with the ability to specify extended inputs via chained input structures, and to return extended information via chained output structures.

Valid Usage

- VUID-vkGetPhysicalDeviceSurfaceCapabilities2KHR-pSurfaceInfo-06521
  If the `VK_GOOGLE_surfaceless_query` extension is not enabled, `pSurfaceInfo->surface` must be a valid VkSurfaceKHR handle

- VUID-vkGetPhysicalDeviceSurfaceCapabilities2KHR-pSurfaceInfo-06522
  If `pSurfaceInfo->surface` is not VK_NULL_HANDLE, `pSurfaceInfo->surface` must be supported by `physicalDevice`, as reported by vkGetPhysicalDeviceSurfaceSupportKHR or an equivalent platform-specific mechanism

- VUID-vkGetPhysicalDeviceSurfaceCapabilities2KHR-pNext-02671
  If a VkSurfaceCapabilitiesFullScreenExclusiveEXT structure is included in the `pNext` chain of `pSurfaceCapabilities`, a VkSurfaceFullScreenExclusiveWin32InfoEXT structure must be included in the `pNext` chain of `pSurfaceInfo`

- VUID-vkGetPhysicalDeviceSurfaceCapabilities2KHR-pNext-07776
  If a VkSurfacePresentModeCompatibilityKHR structure is included in the `pNext` chain of `pSurfaceCapabilities`, a VkSurfacePresentModeKHR structure must be included in the `pNext` chain of `pSurfaceInfo`

- VUID-vkGetPhysicalDeviceSurfaceCapabilities2KHR-pNext-07777
  If a VkSurfacePresentScalingCapabilitiesKHR structure is included in the `pNext` chain of `pSurfaceCapabilities`, a VkSurfacePresentModeKHR structure must be included in the `pNext` chain of `pSurfaceInfo`

- VUID-vkGetPhysicalDeviceSurfaceCapabilities2KHR-pNext-07778
  If a VkSurfacePresentModeCompatibilityKHR structure is included in the `pNext` chain of `pSurfaceCapabilities`, `pSurfaceInfo->surface` must be a valid VkSurfaceKHR handle

- VUID-vkGetPhysicalDeviceSurfaceCapabilities2KHR-pNext-07779
  If a VkSurfacePresentScalingCapabilitiesKHR structure is included in the `pNext` chain of `pSurfaceCapabilities`, `pSurfaceInfo->surface` must be a valid VkSurfaceKHR handle

- VUID-vkGetPhysicalDeviceSurfaceCapabilities2KHR-pNext-12446
  If a VkSwapchainFlagsSurfaceCapabilitiesEXT structure is included in the `pNext` chain of `pSurfaceCapabilities`, `pSurfaceInfo->surface` must be a valid VkSurfaceKHR handle

Valid Usage (Implicit)

- VUID-vkGetPhysicalDeviceSurfaceCapabilities2KHR-physicalDevice-parameter
  `physicalDevice` must be a valid VkPhysicalDevice handle

- VUID-vkGetPhysicalDeviceSurfaceCapabilities2KHR-pSurfaceInfo-parameter
  `pSurfaceInfo` must be a valid pointer to a valid VkPhysicalDeviceSurfaceInfo2KHR structure

- VUID-vkGetPhysicalDeviceSurfaceCapabilities2KHR-pSurfaceCapabilities-parameter
  `pSurfaceCapabilities` must be a valid pointer to a VkSurfaceCapabilities2KHR structure

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_SURFACE_LOST_KHR

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkPhysicalDeviceSurfaceInfo2KHR` structure is defined as:

    // Provided by VK_KHR_get_surface_capabilities2
    typedef struct VkPhysicalDeviceSurfaceInfo2KHR {
        VkStructureType    sType;
        const void*        pNext;
        VkSurfaceKHR       surface;
    } VkPhysicalDeviceSurfaceInfo2KHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `surface` is the surface that will be associated with the swapchain.

The members of `VkPhysicalDeviceSurfaceInfo2KHR` correspond to the arguments to vkGetPhysicalDeviceSurfaceCapabilitiesKHR, with `sType` and `pNext` added for extensibility.

Additional capabilities of a surface may be available to swapchains created with different full-screen exclusive settings - particularly if exclusive full-screen access is application controlled. These additional capabilities can be queried by adding a VkSurfaceFullScreenExclusiveInfoEXT structure to the `pNext` chain of this structure when used to query surface properties. Additionally, for Win32 surfaces with application controlled exclusive full-screen access, chaining a VkSurfaceFullScreenExclusiveWin32InfoEXT structure may also report additional surface capabilities. These additional capabilities only apply to swapchains created with the same parameters included in the `pNext` chain of VkSwapchainCreateInfoKHR.

Valid Usage

- VUID-VkPhysicalDeviceSurfaceInfo2KHR-pNext-02672
  If the `pNext` chain includes a VkSurfaceFullScreenExclusiveInfoEXT structure with its `fullScreenExclusive` member set to VK_FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT, and `surface` was created using vkCreateWin32SurfaceKHR, a VkSurfaceFullScreenExclusiveWin32InfoEXT structure must be included in the `pNext` chain

- VUID-VkPhysicalDeviceSurfaceInfo2KHR-surface-07919
  If surface is not VK_NULL_HANDLE, and the `VK_GOOGLE_surfaceless_query` extension is not enabled, `surface` must be a valid VkSurfaceKHR handle

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceSurfaceInfo2KHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SURFACE_INFO_2_KHR

- VUID-VkPhysicalDeviceSurfaceInfo2KHR-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkSurfaceFullScreenExclusiveInfoEXT, VkSurfaceFullScreenExclusiveWin32InfoEXT, or VkSurfacePresentModeKHR

- VUID-VkPhysicalDeviceSurfaceInfo2KHR-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

If the `pNext` chain of VkSwapchainCreateInfoKHR includes a `VkSurfaceFullScreenExclusiveInfoEXT` structure, then that structure specifies the application’s preferred full-screen transition behavior.

The `VkSurfaceFullScreenExclusiveInfoEXT` structure is defined as:

    // Provided by VK_EXT_full_screen_exclusive
    typedef struct VkSurfaceFullScreenExclusiveInfoEXT {
        VkStructureType             sType;
        void*                       pNext;
        VkFullScreenExclusiveEXT    fullScreenExclusive;
    } VkSurfaceFullScreenExclusiveInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `fullScreenExclusive` is a VkFullScreenExclusiveEXT value specifying the preferred full-screen transition behavior.

If this structure is not present, `fullScreenExclusive` is considered to be VK_FULL_SCREEN_EXCLUSIVE_DEFAULT_EXT.

Valid Usage (Implicit)

- VUID-VkSurfaceFullScreenExclusiveInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SURFACE_FULL_SCREEN_EXCLUSIVE_INFO_EXT

- VUID-VkSurfaceFullScreenExclusiveInfoEXT-fullScreenExclusive-parameter
  `fullScreenExclusive` must be a valid VkFullScreenExclusiveEXT value

Structure Chaining

Extends the structures

  - VkPhysicalDeviceSurfaceInfo2KHR

  - VkSwapchainCreateInfoKHR

Possible values of `VkSurfaceFullScreenExclusiveInfoEXT`::`fullScreenExclusive` are:

    // Provided by VK_EXT_full_screen_exclusive
    typedef enum VkFullScreenExclusiveEXT {
        VK_FULL_SCREEN_EXCLUSIVE_DEFAULT_EXT = 0,
        VK_FULL_SCREEN_EXCLUSIVE_ALLOWED_EXT = 1,
        VK_FULL_SCREEN_EXCLUSIVE_DISALLOWED_EXT = 2,
        VK_FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT = 3,
    } VkFullScreenExclusiveEXT;

- VK_FULL_SCREEN_EXCLUSIVE_DEFAULT_EXT specifies that the implementation should determine the appropriate full-screen method by whatever means it deems appropriate.

- VK_FULL_SCREEN_EXCLUSIVE_ALLOWED_EXT specifies that the implementation may use full-screen exclusive mechanisms when available. Such mechanisms may result in better performance and/or the availability of different presentation capabilities, but may require a more disruptive transition during swapchain initialization, first presentation and/or destruction.

- VK_FULL_SCREEN_EXCLUSIVE_DISALLOWED_EXT specifies that the implementation should avoid using full-screen mechanisms which rely on disruptive transitions.

- VK_FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT specifies that the application will manage full-screen exclusive mode by using the vkAcquireFullScreenExclusiveModeEXT and vkReleaseFullScreenExclusiveModeEXT commands.

The `VkSurfaceFullScreenExclusiveWin32InfoEXT` structure is defined as:

    // Provided by VK_KHR_win32_surface with VK_EXT_full_screen_exclusive
    typedef struct VkSurfaceFullScreenExclusiveWin32InfoEXT {
        VkStructureType    sType;
        const void*        pNext;
        HMONITOR           hmonitor;
    } VkSurfaceFullScreenExclusiveWin32InfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `hmonitor` is the Win32 `HMONITOR` handle identifying the display to create the surface with.

Note | If `hmonitor` is invalidated (e.g. the monitor is unplugged) during the lifetime of a swapchain created with this structure, operations on that swapchain will return VK_ERROR_OUT_OF_DATE_KHR.

Note | It is the responsibility of the application to change the display settings of the targeted Win32 display using the appropriate platform APIs. Such changes may alter the surface capabilities reported for the created surface.

Valid Usage

- VUID-VkSurfaceFullScreenExclusiveWin32InfoEXT-hmonitor-02673
  `hmonitor` must be a valid `HMONITOR`

Valid Usage (Implicit)

- VUID-VkSurfaceFullScreenExclusiveWin32InfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SURFACE_FULL_SCREEN_EXCLUSIVE_WIN32_INFO_EXT

Structure Chaining

Extends the structures

  - VkPhysicalDeviceSurfaceInfo2KHR

  - VkSwapchainCreateInfoKHR

The `VkSurfaceCapabilities2KHR` structure is defined as:

    // Provided by VK_KHR_get_surface_capabilities2
    typedef struct VkSurfaceCapabilities2KHR {
        VkStructureType             sType;
        void*                       pNext;
        VkSurfaceCapabilitiesKHR    surfaceCapabilities;
    } VkSurfaceCapabilities2KHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `surfaceCapabilities` is a VkSurfaceCapabilitiesKHR structure describing the capabilities of the specified surface.

If the `VK_GOOGLE_surfaceless_query` extension is enabled and VkPhysicalDeviceSurfaceInfo2KHR::`surface` in the vkGetPhysicalDeviceSurfaceCapabilities2KHR call is VK_NULL_HANDLE, the values returned in `minImageCount`, `maxImageCount`, `currentExtent`, and `currentTransform` will not reflect that of any surface and will instead be as such:

- `minImageCount` and `maxImageCount` will be 0xFFFFFFFF

- `currentExtent` will be (0xFFFFFFFF, 0xFFFFFFFF)

- `currentTransform` will be VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR

Only usage flags representable in VkImageUsageFlagBits are returned in `surfaceCapabilities.supportedUsageFlags`. If the `pNext` chain includes a VkImageUsageFlags2CreateInfoKHR structure, all usage flags are returned in VkImageUsageFlags2CreateInfoKHR::`usage`.

Valid Usage (Implicit)

- VUID-VkSurfaceCapabilities2KHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_KHR

- VUID-VkSurfaceCapabilities2KHR-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkDisplayNativeHdrSurfaceCapabilitiesAMD, VkImageUsageFlags2CreateInfoKHR, VkLatencySurfaceCapabilitiesNV, VkPresentTimingSurfaceCapabilitiesEXT, VkSharedPresentSurfaceCapabilities2KHR, VkSharedPresentSurfaceCapabilitiesKHR, VkSurfaceCapabilitiesFullScreenExclusiveEXT, VkSurfaceCapabilitiesPresentBarrierNV, VkSurfaceCapabilitiesPresentId2KHR, VkSurfaceCapabilitiesPresentWait2KHR, VkSurfacePresentModeCompatibilityKHR, VkSurfacePresentScalingCapabilitiesKHR, VkSurfaceProtectedCapabilitiesKHR, or VkSwapchainFlagsSurfaceCapabilitiesEXT

- VUID-VkSurfaceCapabilities2KHR-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

An application queries if a protected VkSurfaceKHR is displayable on a specific windowing system using `VkSurfaceProtectedCapabilitiesKHR`, which can be passed in `pNext` parameter of `VkSurfaceCapabilities2KHR`.

The `VkSurfaceProtectedCapabilitiesKHR` structure is defined as:

    // Provided by VK_KHR_surface_protected_capabilities
    typedef struct VkSurfaceProtectedCapabilitiesKHR {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           supportsProtected;
    } VkSurfaceProtectedCapabilitiesKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `supportsProtected` specifies whether a protected swapchain created from VkPhysicalDeviceSurfaceInfo2KHR::`surface` for a particular windowing system can be displayed on screen or not. If `supportsProtected` is VK_TRUE, then creation of swapchains with the VK_SWAPCHAIN_CREATE_PROTECTED_BIT_KHR flag set must be supported for `surface`.

If the `VK_GOOGLE_surfaceless_query` extension is enabled, the value returned in `supportsProtected` will be identical for every valid surface created on this physical device, and so in the vkGetPhysicalDeviceSurfaceCapabilities2KHR call, VkPhysicalDeviceSurfaceInfo2KHR::`surface` can be VK_NULL_HANDLE. In that case, the contents of VkSurfaceCapabilities2KHR::`surfaceCapabilities` as well as any other structure chained to it will be undefined.

Valid Usage (Implicit)

- VUID-VkSurfaceProtectedCapabilitiesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SURFACE_PROTECTED_CAPABILITIES_KHR

Structure Chaining

Extends the structure

  - VkSurfaceCapabilities2KHR

The `VkSurfacePresentScalingCapabilitiesKHR` structure is defined as:

    // Provided by VK_KHR_surface_maintenance1
    typedef struct VkSurfacePresentScalingCapabilitiesKHR {
        VkStructureType             sType;
        void*                       pNext;
        VkPresentScalingFlagsKHR    supportedPresentScaling;
        VkPresentGravityFlagsKHR    supportedPresentGravityX;
        VkPresentGravityFlagsKHR    supportedPresentGravityY;
        VkExtent2D                  minScaledImageExtent;
        VkExtent2D                  maxScaledImageExtent;
    } VkSurfacePresentScalingCapabilitiesKHR;

    // Provided by VK_EXT_surface_maintenance1
    // Equivalent to VkSurfacePresentScalingCapabilitiesKHR
    typedef VkSurfacePresentScalingCapabilitiesKHR VkSurfacePresentScalingCapabilitiesEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `supportedPresentScaling` is a bitmask of VkPresentScalingFlagBitsKHR representing the scaling methods supported by the surface, or `0` if application-defined scaling is not supported.

- `supportedPresentGravityX` is a bitmask of VkPresentGravityFlagBitsKHR representing the X-axis pixel gravity supported by the surface, or `0` if Vulkan-defined pixel gravity is not supported for the X axis.

- `supportedPresentGravityY` is a bitmask of VkPresentGravityFlagBitsKHR representing the Y-axis pixel gravity supported by the surface, or `0` if Vulkan-defined pixel gravity is not supported for the Y axis.

- `minScaledImageExtent` contains the smallest valid swapchain extent for the surface on the specified device when one of the scaling methods specified in `supportedPresentScaling` is used, or the special value (0xFFFFFFFF, 0xFFFFFFFF) indicating that the surface size will be determined by the extent of a swapchain targeting the surface. The `width` and `height` of the extent will each be smaller than or equal to the corresponding `width` and `height` of VkSurfaceCapabilitiesKHR::`minImageExtent`.

- `maxScaledImageExtent` contains the largest valid swapchain extent for the surface on the specified device when one of the scaling methods specified in `supportedPresentScaling` is used, or the special value described above for `minScaledImageExtent`. The `width` and `height` of the extent will each be greater than or equal to the corresponding `width` and `height` of VkSurfaceCapabilitiesKHR::`maxImageExtent`.

To query the set of supported scaling modes for a given present mode, add a VkSurfacePresentModeKHR structure in the `pNext` chain of VkPhysicalDeviceSurfaceInfo2KHR when calling vkGetPhysicalDeviceSurfaceCapabilities2KHR. The implementation must return the same values in `VkSurfacePresentScalingCapabilitiesKHR` for any of the compatible present modes as obtained through VkSurfacePresentModeCompatibilityKHR.

The application can specify the scaling mode when creating a swapchain through the use of VkSwapchainPresentScalingCreateInfoKHR.

Valid Usage (Implicit)

- VUID-VkSurfacePresentScalingCapabilitiesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SURFACE_PRESENT_SCALING_CAPABILITIES_KHR

- VUID-VkSurfacePresentScalingCapabilitiesKHR-supportedPresentScaling-parameter
  `supportedPresentScaling` must be a valid combination of VkPresentScalingFlagBitsKHR values

- VUID-VkSurfacePresentScalingCapabilitiesKHR-supportedPresentGravityX-parameter
  `supportedPresentGravityX` must be a valid combination of VkPresentGravityFlagBitsKHR values

- VUID-VkSurfacePresentScalingCapabilitiesKHR-supportedPresentGravityY-parameter
  `supportedPresentGravityY` must be a valid combination of VkPresentGravityFlagBitsKHR values

Structure Chaining

Extends the structure

  - VkSurfaceCapabilities2KHR

Bits which may be set in VkSurfacePresentScalingCapabilitiesKHR::`supportedPresentScaling`, specifying scaling modes supported by the surface, are:

    // Provided by VK_KHR_surface_maintenance1
    typedef enum VkPresentScalingFlagBitsKHR {
        VK_PRESENT_SCALING_ONE_TO_ONE_BIT_KHR = 0x00000001,
        VK_PRESENT_SCALING_ASPECT_RATIO_STRETCH_BIT_KHR = 0x00000002,
        VK_PRESENT_SCALING_STRETCH_BIT_KHR = 0x00000004,
        VK_PRESENT_SCALING_ONE_TO_ONE_BIT_EXT = VK_PRESENT_SCALING_ONE_TO_ONE_BIT_KHR,
        VK_PRESENT_SCALING_ASPECT_RATIO_STRETCH_BIT_EXT = VK_PRESENT_SCALING_ASPECT_RATIO_STRETCH_BIT_KHR,
        VK_PRESENT_SCALING_STRETCH_BIT_EXT = VK_PRESENT_SCALING_STRETCH_BIT_KHR,
    } VkPresentScalingFlagBitsKHR;

    // Provided by VK_EXT_surface_maintenance1
    // Equivalent to VkPresentScalingFlagBitsKHR
    typedef VkPresentScalingFlagBitsKHR VkPresentScalingFlagBitsEXT;

- VK_PRESENT_SCALING_ONE_TO_ONE_BIT_KHR specifies that no scaling occurs, and pixels in the swapchain image are mapped to one and only one pixel in the surface. The mapping between pixels is defined by the chosen presentation gravity.

- VK_PRESENT_SCALING_ASPECT_RATIO_STRETCH_BIT_KHR specifies that the swapchain image will be minified or magnified such that at least one of the resulting width or height is equal to the corresponding surface dimension, and the other resulting dimension is less than or equal to the corresponding surface dimension, with the aspect ratio of the resulting image being identical to that of the original swapchain image.

- VK_PRESENT_SCALING_STRETCH_BIT_KHR specifies that the swapchain image will be minified or magnified such that the resulting image dimensions are equal to those of the surface.

    // Provided by VK_KHR_surface_maintenance1
    typedef VkFlags VkPresentScalingFlagsKHR;

    // Provided by VK_EXT_surface_maintenance1
    // Equivalent to VkPresentScalingFlagsKHR
    typedef VkPresentScalingFlagsKHR VkPresentScalingFlagsEXT;

`VkPresentScalingFlagsKHR` is a bitmask type for setting a mask of zero or more VkPresentScalingFlagBitsKHR.

Bits which may be set in the VkSurfacePresentScalingCapabilitiesKHR::`supportedPresentGravityX` or `supportedPresentGravityY` fields, specifying the gravity of presented pixels supported by the surface, are:

    // Provided by VK_KHR_surface_maintenance1
    typedef enum VkPresentGravityFlagBitsKHR {
        VK_PRESENT_GRAVITY_MIN_BIT_KHR = 0x00000001,
        VK_PRESENT_GRAVITY_MAX_BIT_KHR = 0x00000002,
        VK_PRESENT_GRAVITY_CENTERED_BIT_KHR = 0x00000004,
        VK_PRESENT_GRAVITY_MIN_BIT_EXT = VK_PRESENT_GRAVITY_MIN_BIT_KHR,
        VK_PRESENT_GRAVITY_MAX_BIT_EXT = VK_PRESENT_GRAVITY_MAX_BIT_KHR,
        VK_PRESENT_GRAVITY_CENTERED_BIT_EXT = VK_PRESENT_GRAVITY_CENTERED_BIT_KHR,
    } VkPresentGravityFlagBitsKHR;

    // Provided by VK_EXT_surface_maintenance1
    // Equivalent to VkPresentGravityFlagBitsKHR
    typedef VkPresentGravityFlagBitsKHR VkPresentGravityFlagBitsEXT;

- VK_PRESENT_GRAVITY_MIN_BIT_KHR means that the pixels will gravitate towards the top or left side of the surface.

- VK_PRESENT_GRAVITY_MAX_BIT_KHR means that the pixels will gravitate towards the bottom or right side of the surface.

- VK_PRESENT_GRAVITY_CENTERED_BIT_KHR means that the pixels will be centered in the surface.

If the value in VkSurfaceCapabilitiesKHR::`currentTransform` is not VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR, it is implementation-defined whether the gravity configuration applies to the presented image before or after transformation.

    // Provided by VK_KHR_surface_maintenance1
    typedef VkFlags VkPresentGravityFlagsKHR;

    // Provided by VK_EXT_surface_maintenance1
    // Equivalent to VkPresentGravityFlagsKHR
    typedef VkPresentGravityFlagsKHR VkPresentGravityFlagsEXT;

`VkPresentGravityFlagsKHR` is a bitmask type for setting a mask of zero or more VkPresentGravityFlagBitsKHR.

The `VkSurfacePresentModeKHR` structure is defined as:

    // Provided by VK_KHR_surface_maintenance1
    typedef struct VkSurfacePresentModeKHR {
        VkStructureType     sType;
        void*               pNext;
        VkPresentModeKHR    presentMode;
    } VkSurfacePresentModeKHR;

    // Provided by VK_EXT_surface_maintenance1
    // Equivalent to VkSurfacePresentModeKHR
    typedef VkSurfacePresentModeKHR VkSurfacePresentModeEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `presentMode` is the presentation mode the swapchain will use.

If the `VkSurfacePresentModeKHR` structure is included in the `pNext` chain of VkPhysicalDeviceSurfaceInfo2KHR, the values returned in VkSurfaceCapabilitiesKHR::`minImageCount`, VkSurfaceCapabilitiesKHR::`maxImageCount`, VkSurfacePresentScalingCapabilitiesKHR::`minScaledImageExtent`, and VkSurfacePresentScalingCapabilitiesKHR::`maxScaledImageExtent` are valid only for the specified `presentMode`. If `presentMode` is VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR or VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR, the per-present mode image counts must both be one. The per-present mode image counts may be less-than or greater-than the image counts returned when `VkSurfacePresentModeKHR` is not provided.

Note | If VkSwapchainPresentModesCreateInfoKHR is provided to swapchain creation, the requirements for forward progress may be less strict. For example, a FIFO swapchain might only require 2 images to guarantee forward progress, but a MAILBOX one might require 4. Without the per-present image counts, such an implementation would have to return 4 in VkSurfaceCapabilitiesKHR::`minImageCount`, which pessimizes FIFO. Conversely, an implementation may return a low number for minImageCount, but internally bump the image count when application queries vkGetSwapchainImagesKHR, which can surprise applications, and is not discoverable until swapchain creation. Using `VkSurfacePresentModeKHR` and VkSwapchainPresentModesCreateInfoKHR together effectively removes this problem. VkSwapchainPresentModesCreateInfoKHR is required for the specification to be backwards compatible with applications that do not know about, or make use of this feature.

Valid Usage

- VUID-VkSurfacePresentModeKHR-presentMode-07780
  `presentMode` must be a value reported by vkGetPhysicalDeviceSurfacePresentModesKHR for the specified surface

Valid Usage (Implicit)

- VUID-VkSurfacePresentModeKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SURFACE_PRESENT_MODE_KHR

- VUID-VkSurfacePresentModeKHR-presentMode-parameter
  `presentMode` must be a valid VkPresentModeKHR value

Structure Chaining

Extends the structure

  - VkPhysicalDeviceSurfaceInfo2KHR

The `VkSurfacePresentModeCompatibilityKHR` structure is defined as:

    // Provided by VK_KHR_surface_maintenance1
    typedef struct VkSurfacePresentModeCompatibilityKHR {
        VkStructureType      sType;
        void*                pNext;
        uint32_t             presentModeCount;
        VkPresentModeKHR*    pPresentModes;
    } VkSurfacePresentModeCompatibilityKHR;

    // Provided by VK_EXT_surface_maintenance1
    // Equivalent to VkSurfacePresentModeCompatibilityKHR
    typedef VkSurfacePresentModeCompatibilityKHR VkSurfacePresentModeCompatibilityEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `presentModeCount` is an integer related to the number of present modes available or queried, as described below.

- `pPresentModes` is a pointer to an array of VkPresentModeKHR in which present modes compatible with a given present mode are returned.

If `pPresentModes` is `NULL`, then the number of present modes that are compatible with the one specified in VkSurfacePresentModeKHR is returned in `presentModeCount`. Otherwise, `presentModeCount` must be set by the application to the number of elements in the `pPresentModes` array, and on return is overwritten with the number of values actually written to `pPresentModes`. If the value of `presentModeCount` is less than the number of compatible present modes that are supported, at most `presentModeCount` values will be written to `pPresentModes`. The implementation must include the present mode passed to VkSurfacePresentModeKHR in `pPresentModes`, unless `presentModeCount` is zero.

To query the set of present modes compatible with a given initial present mode, add a VkSurfacePresentModeKHR structure in the `pNext` chain of VkPhysicalDeviceSurfaceInfo2KHR when calling vkGetPhysicalDeviceSurfaceCapabilities2KHR.

The application can create a swapchain whose present mode can be modified through the use of VkSwapchainPresentModesCreateInfoKHR.

Valid Usage (Implicit)

- VUID-VkSurfacePresentModeCompatibilityKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SURFACE_PRESENT_MODE_COMPATIBILITY_KHR

- VUID-VkSurfacePresentModeCompatibilityKHR-pPresentModes-parameter
  If `presentModeCount` is not `0`, and `pPresentModes` is not `NULL`, `pPresentModes` must be a valid pointer to an array of `presentModeCount` VkPresentModeKHR values

Structure Chaining

Extends the structure

  - VkSurfaceCapabilities2KHR

The `VkSharedPresentSurfaceCapabilitiesKHR` structure is defined as:

    // Provided by VK_KHR_shared_presentable_image
    typedef struct VkSharedPresentSurfaceCapabilitiesKHR {
        VkStructureType      sType;
        void*                pNext;
        VkImageUsageFlags    sharedPresentSupportedUsageFlags;
    } VkSharedPresentSurfaceCapabilitiesKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `sharedPresentSupportedUsageFlags` is a bitmask of VkImageUsageFlagBits representing the ways the application can use the shared presentable image from a swapchain created with VkPresentModeKHR set to VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR or VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR for the surface on the specified device. VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT must be included in the set but implementations may support additional usages.

This structure can be included in the `pNext` chain of VkSurfaceCapabilities2KHR to determine supported usage when using VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR or VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR presentation mode.

Valid Usage (Implicit)

- VUID-VkSharedPresentSurfaceCapabilitiesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SHARED_PRESENT_SURFACE_CAPABILITIES_KHR

Structure Chaining

Extends the structure

  - VkSurfaceCapabilities2KHR

The `VkSharedPresentSurfaceCapabilities2KHR` structure is defined as:

    // Provided by VK_KHR_extended_flags with VK_KHR_shared_presentable_image
    typedef struct VkSharedPresentSurfaceCapabilities2KHR {
        VkStructureType          sType;
        void*                    pNext;
        VkImageUsageFlags2KHR    sharedPresentSupportedUsageFlags;
    } VkSharedPresentSurfaceCapabilities2KHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `sharedPresentSupportedUsageFlags` is a bitmask of VkImageUsageFlagBits2KHR representing the ways the application can use the shared presentable image from a swapchain created with VkPresentModeKHR set to VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR or VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR for the surface on the specified device. VK_IMAGE_USAGE_2_COLOR_ATTACHMENT_BIT_KHR must be included in the set but implementations may support additional usages.

This structure can be included in the `pNext` chain of VkSurfaceCapabilities2KHR to determine supported usage when using VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR or VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR presentation mode.

Valid Usage (Implicit)

- VUID-VkSharedPresentSurfaceCapabilities2KHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SHARED_PRESENT_SURFACE_CAPABILITIES_2_KHR

Structure Chaining

Extends the structure

  - VkSurfaceCapabilities2KHR

The `VkSwapchainFlagsSurfaceCapabilitiesEXT` structure is defined as:

    // Provided by VK_EXT_multisampled_render_to_swapchain
    typedef struct VkSwapchainFlagsSurfaceCapabilitiesEXT {
        VkStructureType              sType;
        void*                        pNext;
        VkSwapchainCreateFlagsKHR    swapchainSupportedFlags;
    } VkSwapchainFlagsSurfaceCapabilitiesEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `swapchainSupportedFlags` is a bitmask of VkSwapchainCreateFlagsKHR representing the supported flags in VkSwapchainCreateInfoKHR when creating a swapchain for the surface on the specified device. If a VkSurfacePresentModeKHR structure is included in the `pNext` chain of `pSurfaceInfo` in vkGetPhysicalDeviceSurfaceCapabilities2KHR, this value represents the supported flags for the specified present mode and those compatible with it as returned in VkSurfacePresentModeCompatibilityKHR.

Valid Usage (Implicit)

- VUID-VkSwapchainFlagsSurfaceCapabilitiesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SWAPCHAIN_FLAGS_SURFACE_CAPABILITIES_EXT

Structure Chaining

Extends the structure

  - VkSurfaceCapabilities2KHR

The `VkDisplayNativeHdrSurfaceCapabilitiesAMD` structure is defined as:

    // Provided by VK_AMD_display_native_hdr
    typedef struct VkDisplayNativeHdrSurfaceCapabilitiesAMD {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           localDimmingSupport;
    } VkDisplayNativeHdrSurfaceCapabilitiesAMD;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `localDimmingSupport` specifies whether the surface supports local dimming. If this is VK_TRUE, VkSwapchainDisplayNativeHdrCreateInfoAMD can be used to explicitly enable or disable local dimming for the surface. Local dimming may also be overridden by vkSetLocalDimmingAMD during the lifetime of the swapchain.

Valid Usage (Implicit)

- VUID-VkDisplayNativeHdrSurfaceCapabilitiesAMD-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DISPLAY_NATIVE_HDR_SURFACE_CAPABILITIES_AMD

Structure Chaining

Extends the structure

  - VkSurfaceCapabilities2KHR

The `VkSurfaceCapabilitiesFullScreenExclusiveEXT` structure is defined as:

    // Provided by VK_EXT_full_screen_exclusive
    typedef struct VkSurfaceCapabilitiesFullScreenExclusiveEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           fullScreenExclusiveSupported;
    } VkSurfaceCapabilitiesFullScreenExclusiveEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `fullScreenExclusiveSupported` is a boolean describing whether the surface is able to make use of exclusive full-screen access.

This structure can be included in the `pNext` chain of VkSurfaceCapabilities2KHR to determine support for exclusive full-screen access. If `fullScreenExclusiveSupported` is VK_FALSE, it indicates that exclusive full-screen access is not obtainable for this surface.

Applications must not attempt to create swapchains with VK_FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT set if `fullScreenExclusiveSupported` is VK_FALSE.

Valid Usage (Implicit)

- VUID-VkSurfaceCapabilitiesFullScreenExclusiveEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_FULL_SCREEN_EXCLUSIVE_EXT

Structure Chaining

Extends the structure

  - VkSurfaceCapabilities2KHR

The `VkSurfaceCapabilitiesPresentBarrierNV` structure is defined as:

    // Provided by VK_NV_present_barrier
    typedef struct VkSurfaceCapabilitiesPresentBarrierNV {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           presentBarrierSupported;
    } VkSurfaceCapabilitiesPresentBarrierNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `presentBarrierSupported` is a boolean describing whether the surface is able to make use of the present barrier feature.

This structure can be included in the `pNext` chain of VkSurfaceCapabilities2KHR to determine support for present barrier access. If `presentBarrierSupported` is VK_FALSE, it indicates that the present barrier feature is not obtainable for this surface.

Valid Usage (Implicit)

- VUID-VkSurfaceCapabilitiesPresentBarrierNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_PRESENT_BARRIER_NV

Structure Chaining

Extends the structure

  - VkSurfaceCapabilities2KHR

The `VkSurfaceCapabilitiesPresentId2KHR` structure is defined as:

    // Provided by VK_KHR_present_id2
    typedef struct VkSurfaceCapabilitiesPresentId2KHR {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           presentId2Supported;
    } VkSurfaceCapabilitiesPresentId2KHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `presentId2Supported` is a boolean describing whether the surface is able to support the present-ID extension

This structure can be included in the `pNext` chain of VkSurfaceCapabilities2KHR to determine support for present-wait. If `presentId2Supported` is VK_FALSE, it indicates that attaching an ID to presentation requests is not possible for this surface.

Applications must not attempt to include VkPresentId2KHR in the `pNext` chain of a VkPresentInfoKHR if `presentId2Supported` is VK_FALSE.

Valid Usage (Implicit)

- VUID-VkSurfaceCapabilitiesPresentId2KHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_PRESENT_ID_2_KHR

Structure Chaining

Extends the structure

  - VkSurfaceCapabilities2KHR

The `VkSurfaceCapabilitiesPresentWait2KHR` structure is defined as:

    // Provided by VK_KHR_present_wait2
    typedef struct VkSurfaceCapabilitiesPresentWait2KHR {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           presentWait2Supported;
    } VkSurfaceCapabilitiesPresentWait2KHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `presentWait2Supported` is a boolean describing whether the surface is able to support the present-wait extension

This structure can be included in the `pNext` chain of VkSurfaceCapabilities2KHR to determine support for present-wait. If `presentWait2Supported` is VK_FALSE, it indicates that waiting for presentation is not possible for this surface.

Applications must not attempt to call vkWaitForPresent2KHR on a swapchain if `presentWait2Supported` is VK_FALSE.

Valid Usage (Implicit)

- VUID-VkSurfaceCapabilitiesPresentWait2KHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_PRESENT_WAIT_2_KHR

Structure Chaining

Extends the structure

  - VkSurfaceCapabilities2KHR

The `VkPresentTimingSurfaceCapabilitiesEXT` structure is defined as:

    // Provided by VK_EXT_present_timing
    typedef struct VkPresentTimingSurfaceCapabilitiesEXT {
        VkStructureType           sType;
        void*                     pNext;
        VkBool32                  presentTimingSupported;
        VkBool32                  presentAtAbsoluteTimeSupported;
        VkBool32                  presentAtRelativeTimeSupported;
        VkPresentStageFlagsEXT    presentStageQueries;
    } VkPresentTimingSurfaceCapabilitiesEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `presentTimingSupported` indicates whether querying presentation timestamps is supported for a swapchain created from VkPhysicalDeviceSurfaceInfo2KHR::`surface`.

- `presentAtAbsoluteTimeSupported` indicates whether a swapchain created from VkPhysicalDeviceSurfaceInfo2KHR::`surface` supports presenting images with absolute times.

- `presentAtRelativeTimeSupported` indicates whether a swapchain created from VkPhysicalDeviceSurfaceInfo2KHR::`surface` supports presenting images with relative times.

- `presentStageQueries` is a bitmask of VkPresentStageFlagBitsEXT indicating which present stages a swapchain created from VkPhysicalDeviceSurfaceInfo2KHR::`surface` is able to provide timing information for.

If `presentTimingSupported` is VK_TRUE, the implementation must also advertise support for at least the VK_PRESENT_STAGE_QUEUE_OPERATIONS_END_BIT_EXT present stage in pname `presentStageQueries`.

Valid Usage (Implicit)

- VUID-VkPresentTimingSurfaceCapabilitiesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PRESENT_TIMING_SURFACE_CAPABILITIES_EXT

Structure Chaining

Extends the structure

  - VkSurfaceCapabilities2KHR

To query the basic capabilities of a surface, needed in order to create a swapchain, call:

    // Provided by VK_EXT_display_surface_counter
    VkResult vkGetPhysicalDeviceSurfaceCapabilities2EXT(
        VkPhysicalDevice                            physicalDevice,
        VkSurfaceKHR                                surface,
        VkSurfaceCapabilities2EXT*                  pSurfaceCapabilities);

- `physicalDevice` is the physical device that will be associated with the swapchain to be created, as described for vkCreateSwapchainKHR.

- `surface` is the surface that will be associated with the swapchain.

- `pSurfaceCapabilities` is a pointer to a VkSurfaceCapabilities2EXT structure in which the capabilities are returned.

`vkGetPhysicalDeviceSurfaceCapabilities2EXT` behaves similarly to vkGetPhysicalDeviceSurfaceCapabilitiesKHR, with the ability to return extended information by adding extending structures to the `pNext` chain of its `pSurfaceCapabilities` parameter.

Valid Usage

- VUID-vkGetPhysicalDeviceSurfaceCapabilities2EXT-surface-06211
  `surface` must be supported by `physicalDevice`, as reported by vkGetPhysicalDeviceSurfaceSupportKHR or an equivalent platform-specific mechanism

Valid Usage (Implicit)

- VUID-vkGetPhysicalDeviceSurfaceCapabilities2EXT-physicalDevice-parameter
  `physicalDevice` must be a valid VkPhysicalDevice handle

- VUID-vkGetPhysicalDeviceSurfaceCapabilities2EXT-surface-parameter
  `surface` must be a valid VkSurfaceKHR handle

- VUID-vkGetPhysicalDeviceSurfaceCapabilities2EXT-pSurfaceCapabilities-parameter
  `pSurfaceCapabilities` must be a valid pointer to a VkSurfaceCapabilities2EXT structure

- VUID-vkGetPhysicalDeviceSurfaceCapabilities2EXT-commonparent
  Both of `physicalDevice`, and `surface` must have been created, allocated, or retrieved from the same VkInstance

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_SURFACE_LOST_KHR

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkSurfaceCapabilities2EXT` structure is defined as:

    // Provided by VK_EXT_display_surface_counter
    typedef struct VkSurfaceCapabilities2EXT {
        VkStructureType                  sType;
        void*                            pNext;
        uint32_t                         minImageCount;
        uint32_t                         maxImageCount;
        VkExtent2D                       currentExtent;
        VkExtent2D                       minImageExtent;
        VkExtent2D                       maxImageExtent;
        uint32_t                         maxImageArrayLayers;
        VkSurfaceTransformFlagsKHR       supportedTransforms;
        VkSurfaceTransformFlagBitsKHR    currentTransform;
        VkCompositeAlphaFlagsKHR         supportedCompositeAlpha;
        VkImageUsageFlags                supportedUsageFlags;
        VkSurfaceCounterFlagsEXT         supportedSurfaceCounters;
    } VkSurfaceCapabilities2EXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `minImageCount` is the minimum number of images the specified device supports for a swapchain created for the surface, and will be at least one.

- `maxImageCount` is the maximum number of images the specified device supports for a swapchain created for the surface, and will be either 0, or greater than or equal to `minImageCount`. A value of 0 means that there is no limit on the number of images, though there may be limits related to the total amount of memory used by presentable images.

- `currentExtent` is the current width and height of the surface, or the special value (0xFFFFFFFF, 0xFFFFFFFF) indicating that the surface size will be determined by the extent of a swapchain targeting the surface.

- `minImageExtent` contains the smallest valid swapchain extent for the surface on the specified device. The `width` and `height` of the extent will each be less than or equal to the corresponding `width` and `height` of `currentExtent`, unless `currentExtent` has the special value described above.

- `maxImageExtent` contains the largest valid swapchain extent for the surface on the specified device. The `width` and `height` of the extent will each be greater than or equal to the corresponding `width` and `height` of `minImageExtent`. The `width` and `height` of the extent will each be greater than or equal to the corresponding `width` and `height` of `currentExtent`, unless `currentExtent` has the special value described above.

- `maxImageArrayLayers` is the maximum number of layers presentable images can have for a swapchain created for this device and surface, and will be at least one.

- `supportedTransforms` is a bitmask of VkSurfaceTransformFlagBitsKHR indicating the presentation transforms supported for the surface on the specified device. At least one bit will be set.

- `currentTransform` is VkSurfaceTransformFlagBitsKHR value indicating the surface’s current transform relative to the presentation engine’s natural orientation.

- `supportedCompositeAlpha` is a bitmask of VkCompositeAlphaFlagBitsKHR, representing the alpha compositing modes supported by the presentation engine for the surface on the specified device, and at least one bit will be set. Opaque composition can be achieved in any alpha compositing mode by either using an image format that has no alpha component, or by ensuring that all pixels in the presentable images have an alpha value of 1.0.

- `supportedUsageFlags` is a bitmask of VkImageUsageFlagBits representing the ways the application can use the presentable images of a swapchain created with VkPresentModeKHR set to VK_PRESENT_MODE_FIFO_LATEST_READY_KHR, VK_PRESENT_MODE_IMMEDIATE_KHR, VK_PRESENT_MODE_MAILBOX_KHR, VK_PRESENT_MODE_FIFO_KHR or VK_PRESENT_MODE_FIFO_RELAXED_KHR for the surface on the specified device. VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT must be included in the set. Implementations may support additional usages.

- `supportedSurfaceCounters` is a bitmask of VkSurfaceCounterFlagBitsEXT indicating the supported surface counter types. It must not include VK_SURFACE_COUNTER_VBLANK_BIT_EXT unless the surface queried is a display surface

Valid Usage (Implicit)

- VUID-VkSurfaceCapabilities2EXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_EXT

- VUID-VkSurfaceCapabilities2EXT-pNext-pNext
  `pNext` must be `NULL`

Bits which can be set in VkSurfaceCapabilities2EXT::`supportedSurfaceCounters`, indicating supported surface counter types, are:

    // Provided by VK_EXT_display_surface_counter
    typedef enum VkSurfaceCounterFlagBitsEXT {
        VK_SURFACE_COUNTER_VBLANK_BIT_EXT = 0x00000001,
      // VK_SURFACE_COUNTER_VBLANK_EXT is a legacy alias
        VK_SURFACE_COUNTER_VBLANK_EXT = VK_SURFACE_COUNTER_VBLANK_BIT_EXT,
    } VkSurfaceCounterFlagBitsEXT;

- VK_SURFACE_COUNTER_VBLANK_BIT_EXT specifies a counter incrementing once every time a vertical blanking period occurs on the display associated with the surface.

    // Provided by VK_EXT_display_surface_counter
    typedef VkFlags VkSurfaceCounterFlagsEXT;

`VkSurfaceCounterFlagsEXT` is a bitmask type for setting a mask of zero or more VkSurfaceCounterFlagBitsEXT.

Bits which may be set in VkSurfaceCapabilitiesKHR::`supportedTransforms` indicating the presentation transforms supported for the surface on the specified device, and possible values of VkSurfaceCapabilitiesKHR::`currentTransform` indicating the surface’s current transform relative to the presentation engine’s natural orientation, are:

    // Provided by VK_KHR_surface
    typedef enum VkSurfaceTransformFlagBitsKHR {
        VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR = 0x00000001,
        VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR = 0x00000002,
        VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR = 0x00000004,
        VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR = 0x00000008,
        VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR = 0x00000010,
        VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR = 0x00000020,
        VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR = 0x00000040,
        VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR = 0x00000080,
        VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR = 0x00000100,
    } VkSurfaceTransformFlagBitsKHR;

- VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR specifies that image content is presented without being transformed.

- VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR specifies that image content is rotated 90 degrees clockwise.

- VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR specifies that image content is rotated 180 degrees clockwise.

- VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR specifies that image content is rotated 270 degrees clockwise.

- VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR specifies that image content is mirrored horizontally.

- VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR specifies that image content is mirrored horizontally, then rotated 90 degrees clockwise.

- VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR specifies that image content is mirrored horizontally, then rotated 180 degrees clockwise.

- VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR specifies that image content is mirrored horizontally, then rotated 270 degrees clockwise.

- VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR specifies that the presentation transform is not specified, and is instead determined by platform-specific considerations and mechanisms outside Vulkan.

    // Provided by VK_KHR_display, VK_KHR_surface
    typedef VkFlags VkSurfaceTransformFlagsKHR;

`VkSurfaceTransformFlagsKHR` is a bitmask type for setting a mask of zero or more VkSurfaceTransformFlagBitsKHR.

The `supportedCompositeAlpha` member is of type VkCompositeAlphaFlagBitsKHR, containing the following values:

    // Provided by VK_KHR_surface
    typedef enum VkCompositeAlphaFlagBitsKHR {
        VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR = 0x00000001,
        VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR = 0x00000002,
        VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR = 0x00000004,
        VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR = 0x00000008,
    } VkCompositeAlphaFlagBitsKHR;

These values are described as follows:

- VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR: The alpha component, if it exists, of the images is ignored in the compositing process. Instead, the image is treated as if it has a constant alpha of 1.0.

- VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR: The alpha component, if it exists, of the images is respected in the compositing process. The non-alpha components of the image are expected to already be multiplied by the alpha component by the application.

- VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR: The alpha component, if it exists, of the images is respected in the compositing process. The non-alpha components of the image are not expected to already be multiplied by the alpha component by the application; instead, the compositor will multiply the non-alpha components of the image by the alpha component during compositing.

- VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR: The way in which the presentation engine treats the alpha component in the images is unknown to the Vulkan API. Instead, the application is responsible for setting the composite alpha blending mode using native window system commands. If the application does not set the blending mode using native window system commands, then a platform-specific default will be used.

    // Provided by VK_KHR_surface
    typedef VkFlags VkCompositeAlphaFlagsKHR;

`VkCompositeAlphaFlagsKHR` is a bitmask type for setting a mask of zero or more VkCompositeAlphaFlagBitsKHR.

#### 40.5.2. Surface Format Support

To query the supported swapchain format-color space pairs for a surface, call:

Warning | This functionality is superseded by vkGetPhysicalDeviceSurfaceFormats2KHR. See Legacy Functionality for more information.

    // Provided by VK_KHR_surface
    VkResult vkGetPhysicalDeviceSurfaceFormatsKHR(
        VkPhysicalDevice                            physicalDevice,
        VkSurfaceKHR                                surface,
        uint32_t*                                   pSurfaceFormatCount,
        VkSurfaceFormatKHR*                         pSurfaceFormats);

- `physicalDevice` is the physical device that will be associated with the swapchain to be created. See vkCreateSwapchainKHR for details of swapchain creation.

- `surface` is the surface that will be associated with the swapchain.

- `pSurfaceFormatCount` is a pointer to an integer related to the number of format pairs available or queried, as described below.

- `pSurfaceFormats` is either `NULL` or a pointer to an array of `VkSurfaceFormatKHR` structures.

If `pSurfaceFormats` is `NULL`, then the number of format pairs supported for the given `surface` is returned in `pSurfaceFormatCount`. Otherwise, `pSurfaceFormatCount` must point to a variable set by the application to the number of elements in the `pSurfaceFormats` array, and on return the variable is overwritten with the number of structures actually written to `pSurfaceFormats`. If the value of `pSurfaceFormatCount` is less than the number of format pairs supported, at most `pSurfaceFormatCount` structures will be written, and VK_INCOMPLETE will be returned instead of VK_SUCCESS, to indicate that not all the available format pairs were returned.

The number of format pairs supported must be greater than or equal to 1. `pSurfaceFormats` must not contain an entry whose value for `format` is VK_FORMAT_UNDEFINED.

If `pSurfaceFormats` includes an entry whose value for `colorSpace` is VK_COLOR_SPACE_SRGB_NONLINEAR_KHR and whose value for `format` is a UNORM (or SRGB) format and the corresponding SRGB (or UNORM) format is a color renderable format for VK_IMAGE_TILING_OPTIMAL, then `pSurfaceFormats` must also contain an entry with the same value for `colorSpace` and `format` equal to the corresponding SRGB (or UNORM) format.

If the `VK_GOOGLE_surfaceless_query` extension is enabled, the values returned in `pSurfaceFormats` will be identical for every valid surface created on this physical device, and so `surface` can be VK_NULL_HANDLE.

Valid Usage

- VUID-vkGetPhysicalDeviceSurfaceFormatsKHR-surface-06524
  If the `VK_GOOGLE_surfaceless_query` extension is not enabled, `surface` must be a valid VkSurfaceKHR handle

- VUID-vkGetPhysicalDeviceSurfaceFormatsKHR-surface-06525
  If `surface` is not VK_NULL_HANDLE, `surface` must be supported by `physicalDevice`, as reported by vkGetPhysicalDeviceSurfaceSupportKHR or an equivalent platform-specific mechanism

Valid Usage (Implicit)

- VUID-vkGetPhysicalDeviceSurfaceFormatsKHR-physicalDevice-parameter
  `physicalDevice` must be a valid VkPhysicalDevice handle

- VUID-vkGetPhysicalDeviceSurfaceFormatsKHR-surface-parameter
  If `surface` is not VK_NULL_HANDLE, `surface` must be a valid VkSurfaceKHR handle

- VUID-vkGetPhysicalDeviceSurfaceFormatsKHR-pSurfaceFormatCount-parameter
  `pSurfaceFormatCount` must be a valid pointer to a `uint32_t` value

- VUID-vkGetPhysicalDeviceSurfaceFormatsKHR-pSurfaceFormats-parameter
  If the value referenced by `pSurfaceFormatCount` is not `0`, and `pSurfaceFormats` is not `NULL`, `pSurfaceFormats` must be a valid pointer to an array of `pSurfaceFormatCount` VkSurfaceFormatKHR structures

- VUID-vkGetPhysicalDeviceSurfaceFormatsKHR-commonparent
  Both of `physicalDevice`, and `surface` that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkInstance

Return Codes

Success

  - VK_INCOMPLETE

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_SURFACE_LOST_KHR

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkSurfaceFormatKHR` structure is defined as:

Warning | This functionality is superseded by VK_KHR_get_surface_capabilities2. See Legacy Functionality for more information.

    // Provided by VK_KHR_surface
    typedef struct VkSurfaceFormatKHR {
        VkFormat           format;
        VkColorSpaceKHR    colorSpace;
    } VkSurfaceFormatKHR;

- `format` is a VkFormat that is compatible with the specified surface.

- `colorSpace` is a presentation VkColorSpaceKHR that is compatible with the surface.

To query the supported swapchain format tuples for a surface, call:

    // Provided by VK_KHR_get_surface_capabilities2
    VkResult vkGetPhysicalDeviceSurfaceFormats2KHR(
        VkPhysicalDevice                            physicalDevice,
        const VkPhysicalDeviceSurfaceInfo2KHR*      pSurfaceInfo,
        uint32_t*                                   pSurfaceFormatCount,
        VkSurfaceFormat2KHR*                        pSurfaceFormats);

- `physicalDevice` is the physical device that will be associated with the swapchain to be created, as described for vkCreateSwapchainKHR.

- `pSurfaceInfo` is a pointer to a VkPhysicalDeviceSurfaceInfo2KHR structure describing the surface and other fixed parameters that would be consumed by vkCreateSwapchainKHR.

- `pSurfaceFormatCount` is a pointer to an integer related to the number of format tuples available or queried, as described below.

- `pSurfaceFormats` is either `NULL` or a pointer to an array of VkSurfaceFormat2KHR structures.

vkGetPhysicalDeviceSurfaceFormats2KHR behaves similarly to vkGetPhysicalDeviceSurfaceFormatsKHR, with the ability to be extended via `pNext` chains.

If `pSurfaceFormats` is `NULL`, then the number of format tuples supported for the given `surface` is returned in `pSurfaceFormatCount`. Otherwise, `pSurfaceFormatCount` must point to a variable set by the application to the number of elements in the `pSurfaceFormats` array, and on return the variable is overwritten with the number of structures actually written to `pSurfaceFormats`. If the value of `pSurfaceFormatCount` is less than the number of format tuples supported, at most `pSurfaceFormatCount` structures will be written, and VK_INCOMPLETE will be returned instead of VK_SUCCESS, to indicate that not all the available values were returned.

Valid Usage

- VUID-vkGetPhysicalDeviceSurfaceFormats2KHR-pSurfaceInfo-06521
  If the `VK_GOOGLE_surfaceless_query` extension is not enabled, `pSurfaceInfo->surface` must be a valid VkSurfaceKHR handle

- VUID-vkGetPhysicalDeviceSurfaceFormats2KHR-pSurfaceInfo-06522
  If `pSurfaceInfo->surface` is not VK_NULL_HANDLE, `pSurfaceInfo->surface` must be supported by `physicalDevice`, as reported by vkGetPhysicalDeviceSurfaceSupportKHR or an equivalent platform-specific mechanism

Valid Usage (Implicit)

- VUID-vkGetPhysicalDeviceSurfaceFormats2KHR-physicalDevice-parameter
  `physicalDevice` must be a valid VkPhysicalDevice handle

- VUID-vkGetPhysicalDeviceSurfaceFormats2KHR-pSurfaceInfo-parameter
  `pSurfaceInfo` must be a valid pointer to a valid VkPhysicalDeviceSurfaceInfo2KHR structure

- VUID-vkGetPhysicalDeviceSurfaceFormats2KHR-pSurfaceFormatCount-parameter
  `pSurfaceFormatCount` must be a valid pointer to a `uint32_t` value

- VUID-vkGetPhysicalDeviceSurfaceFormats2KHR-pSurfaceFormats-parameter
  If the value referenced by `pSurfaceFormatCount` is not `0`, and `pSurfaceFormats` is not `NULL`, `pSurfaceFormats` must be a valid pointer to an array of `pSurfaceFormatCount` VkSurfaceFormat2KHR structures

Return Codes

Success

  - VK_INCOMPLETE

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_SURFACE_LOST_KHR

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkSurfaceFormat2KHR` structure is defined as:

    // Provided by VK_KHR_get_surface_capabilities2
    typedef struct VkSurfaceFormat2KHR {
        VkStructureType       sType;
        void*                 pNext;
        VkSurfaceFormatKHR    surfaceFormat;
    } VkSurfaceFormat2KHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `surfaceFormat` is a VkSurfaceFormatKHR structure describing a format-color space pair that is compatible with the specified surface.

If the `imageCompressionControlSwapchain` feature is supported and a VkImageCompressionPropertiesEXT structure is included in the `pNext` chain of this structure, then it will be filled with the compression properties that are supported for the `surfaceFormat`.

Valid Usage

- VUID-VkSurfaceFormat2KHR-pNext-06750
  If the `VK_EXT_image_compression_control_swapchain` extension is not supported, the `pNext` chain must not include an VkImageCompressionPropertiesEXT structure

Valid Usage (Implicit)

- VUID-VkSurfaceFormat2KHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SURFACE_FORMAT_2_KHR

- VUID-VkSurfaceFormat2KHR-pNext-pNext
  `pNext` must be `NULL` or a pointer to a valid instance of VkImageCompressionPropertiesEXT

- VUID-VkSurfaceFormat2KHR-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

While the `format` of a presentable image refers to the encoding of each pixel, the `colorSpace` determines how the presentation engine interprets the pixel values. A color space in this document refers to a specific color space (defined by the chromaticities of its primaries and a white point in CIE Lab), and transfer functions indicating the mapping between the image data and the colorimetry with respect to the given color space.

Possible values of VkSurfaceFormatKHR::`colorSpace`, specifying the color spaces that a presentation engine can accept, are:

    // Provided by VK_KHR_surface
    typedef enum VkColorSpaceKHR {
        VK_COLOR_SPACE_SRGB_NONLINEAR_KHR = 0,
      // Provided by VK_EXT_swapchain_colorspace
        VK_COLOR_SPACE_DISPLAY_P3_NONLINEAR_EXT = 1000104001,
      // Provided by VK_EXT_swapchain_colorspace
        VK_COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT = 1000104002,
      // Provided by VK_EXT_swapchain_colorspace
        VK_COLOR_SPACE_DISPLAY_P3_LINEAR_EXT = 1000104003,
      // Provided by VK_EXT_swapchain_colorspace
        VK_COLOR_SPACE_DCI_P3_NONLINEAR_EXT = 1000104004,
      // Provided by VK_EXT_swapchain_colorspace
        VK_COLOR_SPACE_BT709_LINEAR_EXT = 1000104005,
      // Provided by VK_EXT_swapchain_colorspace
        VK_COLOR_SPACE_BT709_NONLINEAR_EXT = 1000104006,
      // Provided by VK_EXT_swapchain_colorspace
        VK_COLOR_SPACE_BT2020_LINEAR_EXT = 1000104007,
      // Provided by VK_EXT_swapchain_colorspace
        VK_COLOR_SPACE_HDR10_ST2084_EXT = 1000104008,
      // Provided by VK_EXT_swapchain_colorspace
      // VK_COLOR_SPACE_DOLBYVISION_EXT is legacy, but no reason was given in the API XML
        VK_COLOR_SPACE_DOLBYVISION_EXT = 1000104009,
      // Provided by VK_EXT_swapchain_colorspace
        VK_COLOR_SPACE_HDR10_HLG_EXT = 1000104010,
      // Provided by VK_EXT_swapchain_colorspace
        VK_COLOR_SPACE_ADOBERGB_LINEAR_EXT = 1000104011,
      // Provided by VK_EXT_swapchain_colorspace
        VK_COLOR_SPACE_ADOBERGB_NONLINEAR_EXT = 1000104012,
      // Provided by VK_EXT_swapchain_colorspace
        VK_COLOR_SPACE_PASS_THROUGH_EXT = 1000104013,
      // Provided by VK_EXT_swapchain_colorspace
        VK_COLOR_SPACE_EXTENDED_SRGB_NONLINEAR_EXT = 1000104014,
      // Provided by VK_AMD_display_native_hdr
        VK_COLOR_SPACE_DISPLAY_NATIVE_AMD = 1000213000,
      // VK_COLORSPACE_SRGB_NONLINEAR_KHR is a legacy alias
        VK_COLORSPACE_SRGB_NONLINEAR_KHR = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR,
      // Provided by VK_EXT_swapchain_colorspace
      // VK_COLOR_SPACE_DCI_P3_LINEAR_EXT is a legacy alias
        VK_COLOR_SPACE_DCI_P3_LINEAR_EXT = VK_COLOR_SPACE_DISPLAY_P3_LINEAR_EXT,
    } VkColorSpaceKHR;

- VK_COLOR_SPACE_SRGB_NONLINEAR_KHR specifies support for the images in sRGB color space, encoded according to the sRGB specification.

- VK_COLOR_SPACE_DISPLAY_P3_NONLINEAR_EXT specifies support for the images in Display-P3 color space, encoded using a Display-P3 transfer function.

- VK_COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT specifies support for the images in extended sRGB color space, encoded using a linear transfer function.

- VK_COLOR_SPACE_EXTENDED_SRGB_NONLINEAR_EXT specifies support for the images in extended sRGB color space, encoded according to the scRGB specification.

- VK_COLOR_SPACE_DISPLAY_P3_LINEAR_EXT specifies support for the images in Display-P3 color space, encoded using a linear transfer function.

- VK_COLOR_SPACE_DCI_P3_NONLINEAR_EXT specifies support for the images in DCI-P3 color space, encoded according to the DCI-P3 specification. Note that values in such an image are interpreted as XYZ encoded color data by the presentation engine.

- VK_COLOR_SPACE_BT709_LINEAR_EXT specifies support for the images in BT709 color space, encoded using a linear transfer function.

- VK_COLOR_SPACE_BT709_NONLINEAR_EXT specifies support for the images in BT709 color space, encoded according to the BT709 specification.

- VK_COLOR_SPACE_BT2020_LINEAR_EXT specifies support for the images in BT2020 color space, encoded using a linear transfer function.

- VK_COLOR_SPACE_HDR10_ST2084_EXT specifies support for the images in HDR10 (BT2020) color space, encoded according to SMPTE ST2084 Perceptual Quantizer (PQ) specification.

- VK_COLOR_SPACE_HDR10_HLG_EXT specifies support for the images in HDR10 (BT2020) color space, encoded according to the Hybrid Log Gamma (HLG) specification.

- VK_COLOR_SPACE_ADOBERGB_LINEAR_EXT specifies support for images in Adobe RGB color space, encoded using a linear transfer function.

- VK_COLOR_SPACE_ADOBERGB_NONLINEAR_EXT specifies support for the images in Adobe RGB color space, encoded according to the Adobe RGB specification (approximately Gamma 2.2).

- VK_COLOR_SPACE_PASS_THROUGH_EXT specifies that color components are used “as is”. This is intended to allow applications to supply data for color spaces not described here.

- VK_COLOR_SPACE_DISPLAY_NATIVE_AMD specifies support for the display’s native color space. This matches the color space expectations of AMD’s FreeSync2 standard, for displays supporting it.

Note | In the initial release of the `VK_KHR_surface` and `VK_KHR_swapchain` extensions, the token `VK_COLORSPACE_SRGB_NONLINEAR_KHR` was used. Starting in the 2016-05-13 updates to the extension branches, matching release 1.0.13 of the core API specification, VK_COLOR_SPACE_SRGB_NONLINEAR_KHR is used instead for consistency with Vulkan naming rules. The older enum is still available for backwards compatibility.

Note | In older versions of this extension VK_COLOR_SPACE_DISPLAY_P3_LINEAR_EXT was misnamed `VK_COLOR_SPACE_DCI_P3_LINEAR_EXT`. This has been updated to indicate that it uses RGB color encoding, not XYZ. The old name is legacy but is maintained for backwards compatibility.

Note | In older versions of the `VK_EXT_swapchain_colorspace` extension, VK_COLOR_SPACE_DOLBYVISION_EXT was exposed. The intent was to indicate the presentation engine shall decode an image using the SMPTE ST 2084 Perceptual Quantizer (PQ) EOTF, and then apply a proprietary OOTF to process the image. However, Dolby Vision profile 8.4 describes an encoding using the Hybrid Log Gamma (HLG) OETF, and there is no swapchain extension for signaling Dolby Vision metadata to be used by a proprietary OOTF. This enum is legacy but is maintained for backwards compatibility.

Note | For a traditional “Linear” or non-gamma transfer function color space use VK_COLOR_SPACE_PASS_THROUGH_EXT.

Note | On Wayland, VK_COLOR_SPACE_PASS_THROUGH_EXT can be used to disable color management by the WSI on a surface, which makes it possible for the application to create a `wp_color_management_surface_v1` object without triggering a `surface_exists` protocol error. See vkCreateWaylandSurfaceKHR

The presentation engine interprets the pixel values of the R, G, and B components as having been encoded using an appropriate transfer function. Applications should ensure that the appropriate transfer function has been applied. Texel encode requires that all implementations implicitly apply the sRGB EOTF-1 on R, G, and B components when shaders write to an sRGB pixel format image, which is useful for sRGB color spaces. For sRGB color spaces with other pixel formats, or other non-linear color spaces, applications can apply the transfer function explicitly in a shader. The A channel is always interpreted as linearly encoded.

This extension defines enums for VkColorSpaceKHR that correspond to the following color spaces:

Table 55. Color Spaces and Attributes
Name | Red Primary | Green Primary | Blue Primary | White-point | Transfer function
--- | --- | --- | --- | --- | ---
DCI-P3 | 1.000, 0.000 | 0.000, 1.000 | 0.000, 0.000 | 0.3333, 0.3333 | DCI P3
Display-P3 | 0.680, 0.320 | 0.265, 0.690 | 0.150, 0.060 | 0.3127, 0.3290 (D65) | Display-P3
BT709 | 0.640, 0.330 | 0.300, 0.600 | 0.150, 0.060 | 0.3127, 0.3290 (D65) | BT709
sRGB | 0.640, 0.330 | 0.300, 0.600 | 0.150, 0.060 | 0.3127, 0.3290 (D65) | sRGB
extended sRGB | 0.640, 0.330 | 0.300, 0.600 | 0.150, 0.060 | 0.3127, 0.3290 (D65) | scRGB
HDR10_ST2084 | 0.708, 0.292 | 0.170, 0.797 | 0.131, 0.046 | 0.3127, 0.3290 (D65) | ST2084 PQ
HDR10_HLG | 0.708, 0.292 | 0.170, 0.797 | 0.131, 0.046 | 0.3127, 0.3290 (D65) | HLG
Adobe RGB | 0.640, 0.330 | 0.210, 0.710 | 0.150, 0.060 | 0.3127, 0.3290 (D65) | Adobe RGB

The transfer functions are described in the “Transfer Functions” chapter of the Khronos Data Format Specification.

Except Display-P3 OETF, which is:

E​={1.055×L 2.4 1​−0.055 12.92×L​for 0.0030186≤L≤1 for 0≤L<0.0030186​​

where L is the linear value of a color component and E is the encoded value (as stored in the image in memory).

Note | For most uses, the sRGB OETF is equivalent.

#### 40.5.3. Surface Presentation Mode Support

To query the supported presentation modes for a surface, call:

    // Provided by VK_KHR_surface
    VkResult vkGetPhysicalDeviceSurfacePresentModesKHR(
        VkPhysicalDevice                            physicalDevice,
        VkSurfaceKHR                                surface,
        uint32_t*                                   pPresentModeCount,
        VkPresentModeKHR*                           pPresentModes);

- `physicalDevice` is the physical device that will be associated with the swapchain to be created. See vkCreateSwapchainKHR for details of swapchain creation.

- `surface` is the surface that will be associated with the swapchain.

- `pPresentModeCount` is a pointer to an integer related to the number of presentation modes available or queried, as described below.

- `pPresentModes` is either `NULL` or a pointer to an array of VkPresentModeKHR values, indicating the supported presentation modes.

If `pPresentModes` is `NULL`, then the number of presentation modes supported for the given `surface` is returned in `pPresentModeCount`. Otherwise, `pPresentModeCount` must point to a variable set by the application to the number of elements in the `pPresentModes` array, and on return the variable is overwritten with the number of values actually written to `pPresentModes`. If the value of `pPresentModeCount` is less than the number of presentation modes supported, at most `pPresentModeCount` values will be written, and VK_INCOMPLETE will be returned instead of VK_SUCCESS, to indicate that not all the available modes were returned.

If the `VK_GOOGLE_surfaceless_query` extension is enabled and `surface` is VK_NULL_HANDLE, the values returned in `pPresentModes` will only indicate support for VK_PRESENT_MODE_FIFO_KHR, VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR, and VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR. To query support for any other present mode, a valid handle must be provided in `surface`.

Valid Usage

- VUID-vkGetPhysicalDeviceSurfacePresentModesKHR-surface-06524
  If the `VK_GOOGLE_surfaceless_query` extension is not enabled, `surface` must be a valid VkSurfaceKHR handle

- VUID-vkGetPhysicalDeviceSurfacePresentModesKHR-surface-06525
  If `surface` is not VK_NULL_HANDLE, `surface` must be supported by `physicalDevice`, as reported by vkGetPhysicalDeviceSurfaceSupportKHR or an equivalent platform-specific mechanism

Valid Usage (Implicit)

- VUID-vkGetPhysicalDeviceSurfacePresentModesKHR-physicalDevice-parameter
  `physicalDevice` must be a valid VkPhysicalDevice handle

- VUID-vkGetPhysicalDeviceSurfacePresentModesKHR-surface-parameter
  If `surface` is not VK_NULL_HANDLE, `surface` must be a valid VkSurfaceKHR handle

- VUID-vkGetPhysicalDeviceSurfacePresentModesKHR-pPresentModeCount-parameter
  `pPresentModeCount` must be a valid pointer to a `uint32_t` value

- VUID-vkGetPhysicalDeviceSurfacePresentModesKHR-pPresentModes-parameter
  If the value referenced by `pPresentModeCount` is not `0`, and `pPresentModes` is not `NULL`, `pPresentModes` must be a valid pointer to an array of `pPresentModeCount` VkPresentModeKHR values

- VUID-vkGetPhysicalDeviceSurfacePresentModesKHR-commonparent
  Both of `physicalDevice`, and `surface` that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkInstance

Return Codes

Success

  - VK_INCOMPLETE

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_SURFACE_LOST_KHR

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

To query the supported presentation modes for a surface combined with select other fixed swapchain creation parameters, call:

    // Provided by VK_EXT_full_screen_exclusive
    VkResult vkGetPhysicalDeviceSurfacePresentModes2EXT(
        VkPhysicalDevice                            physicalDevice,
        const VkPhysicalDeviceSurfaceInfo2KHR*      pSurfaceInfo,
        uint32_t*                                   pPresentModeCount,
        VkPresentModeKHR*                           pPresentModes);

- `physicalDevice` is the physical device that will be associated with the swapchain to be created, as described for vkCreateSwapchainKHR.

- `pSurfaceInfo` is a pointer to a VkPhysicalDeviceSurfaceInfo2KHR structure describing the surface and other fixed parameters that would be consumed by vkCreateSwapchainKHR.

- `pPresentModeCount` is a pointer to an integer related to the number of presentation modes available or queried, as described below.

- `pPresentModes` is either `NULL` or a pointer to an array of VkPresentModeKHR values, indicating the supported presentation modes.

`vkGetPhysicalDeviceSurfacePresentModes2EXT` behaves similarly to vkGetPhysicalDeviceSurfacePresentModesKHR, with the ability to specify extended inputs via chained input structures.

Valid Usage

- VUID-vkGetPhysicalDeviceSurfacePresentModes2EXT-pSurfaceInfo-06521
  If the `VK_GOOGLE_surfaceless_query` extension is not enabled, `pSurfaceInfo->surface` must be a valid VkSurfaceKHR handle

- VUID-vkGetPhysicalDeviceSurfacePresentModes2EXT-pSurfaceInfo-06522
  If `pSurfaceInfo->surface` is not VK_NULL_HANDLE, `pSurfaceInfo->surface` must be supported by `physicalDevice`, as reported by vkGetPhysicalDeviceSurfaceSupportKHR or an equivalent platform-specific mechanism

Valid Usage (Implicit)

- VUID-vkGetPhysicalDeviceSurfacePresentModes2EXT-physicalDevice-parameter
  `physicalDevice` must be a valid VkPhysicalDevice handle

- VUID-vkGetPhysicalDeviceSurfacePresentModes2EXT-pSurfaceInfo-parameter
  `pSurfaceInfo` must be a valid pointer to a valid VkPhysicalDeviceSurfaceInfo2KHR structure

- VUID-vkGetPhysicalDeviceSurfacePresentModes2EXT-pPresentModeCount-parameter
  `pPresentModeCount` must be a valid pointer to a `uint32_t` value

- VUID-vkGetPhysicalDeviceSurfacePresentModes2EXT-pPresentModes-parameter
  If the value referenced by `pPresentModeCount` is not `0`, and `pPresentModes` is not `NULL`, `pPresentModes` must be a valid pointer to an array of `pPresentModeCount` VkPresentModeKHR values

Return Codes

Success

  - VK_INCOMPLETE

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_SURFACE_LOST_KHR

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

Possible values of elements of the vkGetPhysicalDeviceSurfacePresentModesKHR::`pPresentModes` array, indicating the supported presentation modes for a surface, are:

    // Provided by VK_KHR_surface
    typedef enum VkPresentModeKHR {
        VK_PRESENT_MODE_IMMEDIATE_KHR = 0,
        VK_PRESENT_MODE_MAILBOX_KHR = 1,
        VK_PRESENT_MODE_FIFO_KHR = 2,
        VK_PRESENT_MODE_FIFO_RELAXED_KHR = 3,
      // Provided by VK_KHR_shared_presentable_image
        VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR = 1000111000,
      // Provided by VK_KHR_shared_presentable_image
        VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR = 1000111001,
      // Provided by VK_KHR_present_mode_fifo_latest_ready
        VK_PRESENT_MODE_FIFO_LATEST_READY_KHR = 1000361000,
      // Provided by VK_EXT_present_mode_fifo_latest_ready
        VK_PRESENT_MODE_FIFO_LATEST_READY_EXT = VK_PRESENT_MODE_FIFO_LATEST_READY_KHR,
    } VkPresentModeKHR;

- VK_PRESENT_MODE_IMMEDIATE_KHR specifies that the presentation engine does not wait for a vertical blanking period to update the current image, meaning this mode may result in visible tearing. No internal queuing of presentation requests is needed, as the requests are applied immediately.

- VK_PRESENT_MODE_MAILBOX_KHR specifies that the presentation engine waits for the next vertical blanking period to update the current image. Tearing cannot be observed. An internal single-entry queue is used to hold pending presentation requests. If the queue is full when a new presentation request is received, the new request replaces the existing entry, and any images associated with the prior entry become available for reuse by the application. One request is removed from the queue and processed during each vertical blanking period in which the queue is non-empty.

- VK_PRESENT_MODE_FIFO_KHR specifies that the presentation engine waits for the next vertical blanking period to update the current image. Tearing cannot be observed. An internal queue is used to hold pending presentation requests. New requests are appended to the end of the queue, and one request is removed from the beginning of the queue and processed during each vertical blanking period in which the queue is non-empty. This is the only value of `presentMode` that is required to be supported.

- VK_PRESENT_MODE_FIFO_RELAXED_KHR specifies that the presentation engine generally waits for the next vertical blanking period to update the current image. If a vertical blanking period has already passed since the last update of the current image then the presentation engine does not wait for another vertical blanking period for the update, meaning this mode may result in visible tearing in this case. This mode is useful for reducing visual stutter with an application that will mostly present a new image before the next vertical blanking period, but may occasionally be late, and present a new image just after the next vertical blanking period. An internal queue is used to hold pending presentation requests. New requests are appended to the end of the queue, and one request is removed from the beginning of the queue and processed during or after each vertical blanking period in which the queue is non-empty.

- VK_PRESENT_MODE_FIFO_LATEST_READY_KHR specifies that the presentation engine waits for the next vertical blanking period to update the current image. Tearing cannot be observed. An internal queue is used to hold pending presentation requests. New requests are appended to the end of the queue. At each vertical blanking period, the presentation engine dequeues all successive requests that are ready to be presented from the beginning of the queue. If using the `VK_GOOGLE_display_timing` extension or the `presentAtAbsoluteTime` feature to provide a target present time, the presentation engine checks the specified time for each image. If the target present time is less-than or equal-to the current time, the presentation engine dequeues the image and checks the next one. The image of the last dequeued request is presented. The other dequeued requests are dropped.

- VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR specifies that the presentation engine and application have concurrent access to a single image, which is referred to as a shared presentable image. The presentation engine is only required to update the current image after a new presentation request is received. Therefore the application must make a presentation request whenever an update is required. However, the presentation engine may update the current image at any point, meaning this mode may result in visible tearing.

- VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR specifies that the presentation engine and application have concurrent access to a single image, which is referred to as a shared presentable image. The presentation engine periodically updates the current image on its regular refresh cycle. The application is only required to make one initial presentation request, after which the presentation engine must update the current image without any need for further presentation requests. The application can indicate the image contents have been updated by making a presentation request, but this does not guarantee the timing of when it will be updated. This mode may result in visible tearing if rendering to the image is not timed correctly.

The supported VkImageUsageFlagBits of the presentable images of a swapchain created for a surface may differ depending on the presentation mode, and can be determined as per the table below:

Table 56. Presentable Image Usage Queries
Presentation mode | Image usage flags
--- | ---
VK_PRESENT_MODE_IMMEDIATE_KHR | VkSurfaceCapabilitiesKHR::`supportedUsageFlags`
VK_PRESENT_MODE_MAILBOX_KHR | VkSurfaceCapabilitiesKHR::`supportedUsageFlags`
VK_PRESENT_MODE_FIFO_KHR | VkSurfaceCapabilitiesKHR::`supportedUsageFlags`
VK_PRESENT_MODE_FIFO_RELAXED_KHR | VkSurfaceCapabilitiesKHR::`supportedUsageFlags`
VK_PRESENT_MODE_FIFO_LATEST_READY_KHR | VkSurfaceCapabilitiesKHR::`supportedUsageFlags`
VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR | VkSharedPresentSurfaceCapabilitiesKHR::`sharedPresentSupportedUsageFlags`
VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR | VkSharedPresentSurfaceCapabilitiesKHR::`sharedPresentSupportedUsageFlags`

Note | For reference, the mode indicated by VK_PRESENT_MODE_FIFO_KHR is equivalent to the behavior of {wgl|glX|egl}SwapBuffers with a swap interval of 1, while the mode indicated by VK_PRESENT_MODE_FIFO_RELAXED_KHR is equivalent to the behavior of {wgl|glX}SwapBuffers with a swap interval of -1 (from the {WGL|GLX}_EXT_swap_control_tear extensions).

### 40.6. Full Screen Exclusive Control

Swapchains created with `fullScreenExclusive` set to VK_FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT must acquire and release exclusive full-screen access explicitly, using the following commands.

To acquire exclusive full-screen access for a swapchain, call:

    // Provided by VK_EXT_full_screen_exclusive
    VkResult vkAcquireFullScreenExclusiveModeEXT(
        VkDevice                                    device,
        VkSwapchainKHR                              swapchain);

- `device` is the device associated with `swapchain`.

- `swapchain` is the swapchain to acquire exclusive full-screen access for.

Valid Usage

- VUID-vkAcquireFullScreenExclusiveModeEXT-swapchain-02674
  `swapchain` must not be in the retired state

- VUID-vkAcquireFullScreenExclusiveModeEXT-swapchain-02675
  `swapchain` must be a swapchain created with a VkSurfaceFullScreenExclusiveInfoEXT structure, with `fullScreenExclusive` set to VK_FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT

- VUID-vkAcquireFullScreenExclusiveModeEXT-swapchain-02676
  `swapchain` must not currently have exclusive full-screen access

A return value of VK_SUCCESS indicates that the `swapchain` successfully acquired exclusive full-screen access. The swapchain will retain this exclusivity until either the application releases exclusive full-screen access with vkReleaseFullScreenExclusiveModeEXT, destroys the swapchain, or if any of the swapchain commands return VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT indicating that the mode was lost because of platform-specific changes.

If the swapchain was unable to acquire exclusive full-screen access to the display then VK_ERROR_INITIALIZATION_FAILED is returned. An application can attempt to acquire exclusive full-screen access again for the same swapchain even if this command fails, or if VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT has been returned by a swapchain command.

Valid Usage (Implicit)

- VUID-vkAcquireFullScreenExclusiveModeEXT-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkAcquireFullScreenExclusiveModeEXT-swapchain-parameter
  `swapchain` must be a valid VkSwapchainKHR handle

- VUID-vkAcquireFullScreenExclusiveModeEXT-swapchain-parent
  `swapchain` must have been created, allocated, or retrieved from `device`

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_INITIALIZATION_FAILED

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_SURFACE_LOST_KHR

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

To release exclusive full-screen access from a swapchain, call:

    // Provided by VK_EXT_full_screen_exclusive
    VkResult vkReleaseFullScreenExclusiveModeEXT(
        VkDevice                                    device,
        VkSwapchainKHR                              swapchain);

- `device` is the device associated with `swapchain`.

- `swapchain` is the swapchain to release exclusive full-screen access from.

Note | Applications will not be able to present to `swapchain` after this call until exclusive full-screen access is reacquired. This is usually useful to handle when an application is minimized or otherwise intends to stop presenting for a time.

Valid Usage

- VUID-vkReleaseFullScreenExclusiveModeEXT-swapchain-02677
  `swapchain` must not be in the retired state

- VUID-vkReleaseFullScreenExclusiveModeEXT-swapchain-02678
  `swapchain` must be a swapchain created with a VkSurfaceFullScreenExclusiveInfoEXT structure, with `fullScreenExclusive` set to VK_FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT

Valid Usage (Implicit)

- VUID-vkReleaseFullScreenExclusiveModeEXT-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkReleaseFullScreenExclusiveModeEXT-swapchain-parameter
  `swapchain` must be a valid VkSwapchainKHR handle

- VUID-vkReleaseFullScreenExclusiveModeEXT-swapchain-parent
  `swapchain` must have been created, allocated, or retrieved from `device`

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_SURFACE_LOST_KHR

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

### 40.7. Device Group Queries

A logical device that represents multiple physical devices may support presenting from images on more than one physical device, or combining images from multiple physical devices.

To query these capabilities, call:

    // Provided by VK_VERSION_1_1 with VK_KHR_swapchain, VK_KHR_device_group with VK_KHR_surface
    VkResult vkGetDeviceGroupPresentCapabilitiesKHR(
        VkDevice                                    device,
        VkDeviceGroupPresentCapabilitiesKHR*        pDeviceGroupPresentCapabilities);

- `device` is the logical device.

- `pDeviceGroupPresentCapabilities` is a pointer to a VkDeviceGroupPresentCapabilitiesKHR structure in which the device’s capabilities are returned.

Valid Usage (Implicit)

- VUID-vkGetDeviceGroupPresentCapabilitiesKHR-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetDeviceGroupPresentCapabilitiesKHR-pDeviceGroupPresentCapabilities-parameter
  `pDeviceGroupPresentCapabilities` must be a valid pointer to a VkDeviceGroupPresentCapabilitiesKHR structure

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkDeviceGroupPresentCapabilitiesKHR` structure is defined as:

    // Provided by VK_VERSION_1_1 with VK_KHR_swapchain, VK_KHR_device_group with VK_KHR_surface
    typedef struct VkDeviceGroupPresentCapabilitiesKHR {
        VkStructureType                     sType;
        void*                               pNext;
        uint32_t                            presentMask[VK_MAX_DEVICE_GROUP_SIZE];
        VkDeviceGroupPresentModeFlagsKHR    modes;
    } VkDeviceGroupPresentCapabilitiesKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `presentMask` is an array of VK_MAX_DEVICE_GROUP_SIZE `uint32_t` masks, where the mask at element i is non-zero if physical device i has a presentation engine, and where bit j is set in element i if physical device i can present swapchain images from physical device j. If element i is non-zero, then bit i must be set.

- `modes` is a bitmask of VkDeviceGroupPresentModeFlagBitsKHR indicating which device group presentation modes are supported.

`modes` always has VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHR set.

The present mode flags are also used when presenting an image, in VkDeviceGroupPresentInfoKHR::`mode`.

If a device group only includes a single physical device, then `modes` must equal VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHR.

Valid Usage (Implicit)

- VUID-VkDeviceGroupPresentCapabilitiesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHR

- VUID-VkDeviceGroupPresentCapabilitiesKHR-pNext-pNext
  `pNext` must be `NULL`

Bits which may be set in VkDeviceGroupPresentCapabilitiesKHR::`modes`, indicating which device group presentation modes are supported, are:

    // Provided by VK_VERSION_1_1 with VK_KHR_swapchain, VK_KHR_device_group with VK_KHR_surface
    typedef enum VkDeviceGroupPresentModeFlagBitsKHR {
        VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHR = 0x00000001,
        VK_DEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHR = 0x00000002,
        VK_DEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHR = 0x00000004,
        VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHR = 0x00000008,
    } VkDeviceGroupPresentModeFlagBitsKHR;

- VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHR specifies that any physical device with a presentation engine can present its own swapchain images.

- VK_DEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHR specifies that any physical device with a presentation engine can present swapchain images from any physical device in its `presentMask`.

- VK_DEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHR specifies that any physical device with a presentation engine can present the sum of swapchain images from any physical devices in its `presentMask`.

- VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHR specifies that multiple physical devices with a presentation engine can each present their own swapchain images.

    // Provided by VK_VERSION_1_1 with VK_KHR_swapchain, VK_KHR_device_group with VK_KHR_surface
    typedef VkFlags VkDeviceGroupPresentModeFlagsKHR;

`VkDeviceGroupPresentModeFlagsKHR` is a bitmask type for setting a mask of zero or more VkDeviceGroupPresentModeFlagBitsKHR.

Some surfaces may not be capable of using all the device group present modes.

To query the supported device group present modes for a particular surface, call:

    // Provided by VK_VERSION_1_1 with VK_KHR_swapchain, VK_KHR_device_group with VK_KHR_surface
    VkResult vkGetDeviceGroupSurfacePresentModesKHR(
        VkDevice                                    device,
        VkSurfaceKHR                                surface,
        VkDeviceGroupPresentModeFlagsKHR*           pModes);

- `device` is the logical device.

- `surface` is the surface.

- `pModes` is a pointer to a VkDeviceGroupPresentModeFlagsKHR in which the supported device group present modes for the surface are returned.

The modes returned by this command are not invariant, and may change in response to the surface being moved, resized, or occluded. These modes must be a subset of the modes returned by vkGetDeviceGroupPresentCapabilitiesKHR.

Valid Usage

- VUID-vkGetDeviceGroupSurfacePresentModesKHR-surface-06212
  `surface` must be supported by all physical devices associated with `device`, as reported by vkGetPhysicalDeviceSurfaceSupportKHR or an equivalent platform-specific mechanism

Valid Usage (Implicit)

- VUID-vkGetDeviceGroupSurfacePresentModesKHR-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetDeviceGroupSurfacePresentModesKHR-surface-parameter
  `surface` must be a valid VkSurfaceKHR handle

- VUID-vkGetDeviceGroupSurfacePresentModesKHR-pModes-parameter
  `pModes` must be a valid pointer to a VkDeviceGroupPresentModeFlagsKHR value

- VUID-vkGetDeviceGroupSurfacePresentModesKHR-commonparent
  Both of `device`, and `surface` must have been created, allocated, or retrieved from the same VkInstance

Host Synchronization

- Host access to `surface` must be externally synchronized

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_SURFACE_LOST_KHR

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

To query the supported device group presentation modes for a surface combined with select other fixed swapchain creation parameters, call:

    // Provided by VK_EXT_full_screen_exclusive with VK_KHR_device_group or VK_VERSION_1_1
    VkResult vkGetDeviceGroupSurfacePresentModes2EXT(
        VkDevice                                    device,
        const VkPhysicalDeviceSurfaceInfo2KHR*      pSurfaceInfo,
        VkDeviceGroupPresentModeFlagsKHR*           pModes);

- `device` is the logical device.

- `pSurfaceInfo` is a pointer to a VkPhysicalDeviceSurfaceInfo2KHR structure describing the surface and other fixed parameters that would be consumed by vkCreateSwapchainKHR.

- `pModes` is a pointer to a VkDeviceGroupPresentModeFlagsKHR in which the supported device group present modes for the surface are returned.

`vkGetDeviceGroupSurfacePresentModes2EXT` behaves similarly to vkGetDeviceGroupSurfacePresentModesKHR, with the ability to specify extended inputs via chained input structures.

Valid Usage

- VUID-vkGetDeviceGroupSurfacePresentModes2EXT-pSurfaceInfo-06213
  `pSurfaceInfo->surface` must be supported by all physical devices associated with `device`, as reported by vkGetPhysicalDeviceSurfaceSupportKHR or an equivalent platform-specific mechanism

Valid Usage (Implicit)

- VUID-vkGetDeviceGroupSurfacePresentModes2EXT-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetDeviceGroupSurfacePresentModes2EXT-pSurfaceInfo-parameter
  `pSurfaceInfo` must be a valid pointer to a valid VkPhysicalDeviceSurfaceInfo2KHR structure

- VUID-vkGetDeviceGroupSurfacePresentModes2EXT-pModes-parameter
  `pModes` must be a valid pointer to a VkDeviceGroupPresentModeFlagsKHR value

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_SURFACE_LOST_KHR

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

When using VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHR, the application may need to know which regions of the surface are used when presenting locally on each physical device. Presentation of swapchain images to this surface need only have valid contents in the regions returned by this command.

To query a set of rectangles used in presentation on the physical device, call:

    // Provided by VK_VERSION_1_1 with VK_KHR_swapchain, VK_KHR_device_group with VK_KHR_surface
    VkResult vkGetPhysicalDevicePresentRectanglesKHR(
        VkPhysicalDevice                            physicalDevice,
        VkSurfaceKHR                                surface,
        uint32_t*                                   pRectCount,
        VkRect2D*                                   pRects);

- `physicalDevice` is the physical device.

- `surface` is the surface.

- `pRectCount` is a pointer to an integer related to the number of rectangles available or queried, as described below.

- `pRects` is either `NULL` or a pointer to an array of VkRect2D structures.

If `pRects` is `NULL`, then the number of rectangles used when presenting the given `surface` is returned in `pRectCount`. Otherwise, `pRectCount` must point to a variable set by the application to the number of elements in the `pRects` array, and on return the variable is overwritten with the number of structures actually written to `pRects`. If the value of `pRectCount` is less than the number of rectangles, at most `pRectCount` structures will be written, and VK_INCOMPLETE will be returned instead of VK_SUCCESS, to indicate that not all the available rectangles were returned.

The values returned by this command are not invariant, and may change in response to the surface being moved, resized, or occluded.

The rectangles returned by this command must not overlap.

Valid Usage

- VUID-vkGetPhysicalDevicePresentRectanglesKHR-surface-06211
  `surface` must be supported by `physicalDevice`, as reported by vkGetPhysicalDeviceSurfaceSupportKHR or an equivalent platform-specific mechanism

Valid Usage (Implicit)

- VUID-vkGetPhysicalDevicePresentRectanglesKHR-physicalDevice-parameter
  `physicalDevice` must be a valid VkPhysicalDevice handle

- VUID-vkGetPhysicalDevicePresentRectanglesKHR-surface-parameter
  `surface` must be a valid VkSurfaceKHR handle

- VUID-vkGetPhysicalDevicePresentRectanglesKHR-pRectCount-parameter
  `pRectCount` must be a valid pointer to a `uint32_t` value

- VUID-vkGetPhysicalDevicePresentRectanglesKHR-pRects-parameter
  If the value referenced by `pRectCount` is not `0`, and `pRects` is not `NULL`, `pRects` must be a valid pointer to an array of `pRectCount` VkRect2D structures

- VUID-vkGetPhysicalDevicePresentRectanglesKHR-commonparent
  Both of `physicalDevice`, and `surface` must have been created, allocated, or retrieved from the same VkInstance

Host Synchronization

- Host access to `surface` must be externally synchronized

Return Codes

Success

  - VK_INCOMPLETE

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

### 40.8. Present Timing Queries

Traditional game and real-time-animation applications frequently use VK_PRESENT_MODE_FIFO_KHR so that presentable images are updated during the vertical blanking period of a given refresh cycle (RC) of the presentation engine’s display. On fixed refresh rate displays, this avoids the visual anomaly known as tearing.

However, synchronizing the presentation of images with the RC does not prevent all forms of visual anomalies. Stuttering occurs when the geometry for each presentable image is not accurately positioned for when that image will be displayed. The geometry may appear to move too little some RCs, and too much for others. Sometimes the animation appears to freeze, when the same image is used for more RCs than other images.

In order to minimize stuttering, an application needs to: 1) render and present images at a consistent rate that is, on fixed refresh rate displays, a multiple of the presentation engine’s refresh rate; 2) correctly position its geometry for when the presentable image will be displayed to the user. The `VK_EXT_present_timing` or `VK_GOOGLE_display_timing` extension allows an application to satisfy these needs.

The presentation engine’s display typically refreshes the pixels that are displayed to the user on a periodic basis. This period may be fixed (Fixed Refresh Rate, FRR) or variable (Variable Refresh Rate, VRR).

In order to collect timing information about presentation, a swapchain needs an internal queue to store asynchronously updated results until applications collect them.

To allocate the swapchain’s internal timing results queue, call:

    // Provided by VK_EXT_present_timing
    VkResult vkSetSwapchainPresentTimingQueueSizeEXT(
        VkDevice                                    device,
        VkSwapchainKHR                              swapchain,
        uint32_t                                    size);

- `device` is the device associated with `swapchain`.

- `swapchain` is the swapchain to allocate a results queue for.

- `size` is the requested number of slots in the internal results queue.

If this function is called multiple times, the internal queue is reallocated to fit the new `size`. If the new `size` is less than the current number of outstanding results, VK_NOT_READY is returned and no allocation is performed.

Valid Usage

- VUID-vkSetSwapchainPresentTimingQueueSizeEXT-swapchain-12229
  `swapchain` must have been created with `VkSwapchainCreateInfoKHR`::`flags` containing VK_SWAPCHAIN_CREATE_PRESENT_TIMING_BIT_EXT

Valid Usage (Implicit)

- VUID-vkSetSwapchainPresentTimingQueueSizeEXT-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkSetSwapchainPresentTimingQueueSizeEXT-swapchain-parameter
  `swapchain` must be a valid VkSwapchainKHR handle

- VUID-vkSetSwapchainPresentTimingQueueSizeEXT-swapchain-parent
  `swapchain` must have been created, allocated, or retrieved from `device`

Host Synchronization

- Host access to `swapchain` must be externally synchronized

Return Codes

Success

  - VK_NOT_READY

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The implementation maintains an internal monotonically increasing counter which updates when the presentation engine’s timing properties are modified.

To query the presentation engine’s current timing properties for a given swapchain, call:

    // Provided by VK_EXT_present_timing
    VkResult vkGetSwapchainTimingPropertiesEXT(
        VkDevice                                    device,
        VkSwapchainKHR                              swapchain,
        VkSwapchainTimingPropertiesEXT*             pSwapchainTimingProperties,
        uint64_t*                                   pSwapchainTimingPropertiesCounter);

- `device` is the device associated with `swapchain`.

- `swapchain` is the swapchain to obtain timing properties for.

- `pSwapchainTimingProperties` is a pointer to an instance of the VkSwapchainTimingPropertiesEXT structure.

- `pSwapchainTimingPropertiesCounter` is `NULL` or a pointer to a 64-bit unsigned integer set by the implementation to the current value of the swapchain’s internal timing properties counter.

If `vkGetSwapchainTimingPropertiesEXT` returns VK_NOT_READY, the implementation was not able to determine the current refresh cycle duration. Some platforms may not provide timing properties until after at least one image has been presented to the `swapchain`. If timing properties change for the `swapchain`, these platforms may not provide updated results until after at least one additional image has been presented to the `swapchain`.

Valid Usage (Implicit)

- VUID-vkGetSwapchainTimingPropertiesEXT-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetSwapchainTimingPropertiesEXT-swapchain-parameter
  `swapchain` must be a valid VkSwapchainKHR handle

- VUID-vkGetSwapchainTimingPropertiesEXT-pSwapchainTimingProperties-parameter
  `pSwapchainTimingProperties` must be a valid pointer to a VkSwapchainTimingPropertiesEXT structure

- VUID-vkGetSwapchainTimingPropertiesEXT-pSwapchainTimingPropertiesCounter-parameter
  If `pSwapchainTimingPropertiesCounter` is not `NULL`, `pSwapchainTimingPropertiesCounter` must be a valid pointer to a `uint64_t` value

- VUID-vkGetSwapchainTimingPropertiesEXT-swapchain-parent
  `swapchain` must have been created, allocated, or retrieved from `device`

Host Synchronization

- Host access to `swapchain` must be externally synchronized

Return Codes

Success

  - VK_NOT_READY

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_SURFACE_LOST_KHR

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkSwapchainTimingPropertiesEXT` structure is defined as:

    // Provided by VK_EXT_present_timing
    typedef struct VkSwapchainTimingPropertiesEXT {
        VkStructureType    sType;
        void*              pNext;
        uint64_t           refreshDuration;
        uint64_t           refreshInterval;
    } VkSwapchainTimingPropertiesEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `refreshDuration` is zero or an indication of the duration of a refresh cycle.

- `refreshInterval` is zero or a duration in nanoseconds indicating the interval between refresh cycle durations.

If `refreshDuration` is zero, the presentation engine is not able to determine the duration of the refresh cycle. Similarly, if `refreshInterval` is zero, the presentation engine is not able to determine whether it is operating in VRR mode.

Otherwise, if `refreshInterval` is the same as `refreshDuration`, the presentation engine is operating in FRR mode. In this case, `refreshDuration` is the number of nanoseconds from the start of one refresh cycle to the start of the next refresh cycle.

If `refreshInterval` is `UINT64_MAX`, the presentation engine is operating in VRR mode, and `refreshDuration` is the minimum number of nanoseconds from the start of one refresh cycle to the start of the next refresh cycle.

If `refreshDuration` and `refreshInterval` are not zero, `refreshInterval` is a factor of `refreshDuration`.

Valid Usage (Implicit)

- VUID-VkSwapchainTimingPropertiesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SWAPCHAIN_TIMING_PROPERTIES_EXT

- VUID-VkSwapchainTimingPropertiesEXT-pNext-pNext
  `pNext` must be `NULL`

Note | Some display technologies allow the vblank interval to be decoupled from the display’s effective refresh rate. In other words, presented images are visible for a fixed duration (`refreshDuration`) that is a multiple of the vblank interval (`refreshInterval`) which may be much smaller. This allows such displays, for example, to effectively operate at a fixed refresh rate with the ability to quickly change that refresh rate to adapt to the current system’s workload. Note that `VkSwapchainTimingPropertiesEXT` only represents the current swapchain’s view of those capabilities, which may differ from the actual hardware capabilities, based e.g. on the current surface properties. For example, swapchains that render to a windowed surface requiring complex composition may not be able to reach their display hardware’s full potential.

Note | The rate at which an application renders and presents new images is known as the image present rate (IPR, a.k.a. frame rate). The inverse of IPR, or the duration between each image present, is the image present duration (IPD). In order to provide a smooth, stutter-free animation on non-VRR displays, an application needs its IPD to be a multiple of `refreshInterval` that is at least equal to `refreshDuration`. For example, if a FRR display has a set 60Hz refresh rate, where `refreshDuration` is equal to `refreshInterval`, `refreshDuration` will be a value in nanoseconds that is approximately equal to 16.67ms. In such a case, an application will want an IPD of 16.67ms (1X multiplier of `refreshInterval`), or 33.33ms (2X multiplier of `refreshInterval`), or 50.0ms (3X multiplier of `refreshInterval`), etc. In order to determine a target IPD for a display (i.e. a multiple of `refreshInterval`), an application needs to determine when its images are actually displayed. Consider an application that has an initial target IPD of 16.67ms (1X multiplier of `refreshDuration`). It will therefore position the geometry of a new image 16.67ms later than the previous image. If this application is running on slower hardware, so that it actually takes 20ms to render each new image, the images will not be displayed to the user every 16.67ms, nor every 20ms, which will create visual anomalies. In this case, it is better for the application to adjust its target IPD to 33.33ms (i.e. a 2X multiplier of `refreshDuration`), and tell the presentation engine to not present images any sooner than every 33.33ms. This will allow the geometry to be correctly positioned for each presentable image. On VRR displays, where `refreshInterval` is `UINT64_MAX`, applications should target an IPD that is at least equal to `refreshDuration`. Adjustments to an application’s IPD may be needed because different views of an application’s geometry can take different amounts of time to render. For example, looking at the sky may take less time to render than looking at multiple, complex items in a room. In general, it is good to not frequently change IPD, as that can cause visual anomalies. Adjustments to a larger IPD because of late images should happen quickly, but adjustments to a smaller IPD should only happen if the periodic feedback of VkPastPresentationTimingEXT values indicates that the target IPD can be durably achieved.

The implementation maintains an internal monotonically increasing counter which updates when the presentation engine’s list of supported time domains for a swapchain is modified.

To query the time domains supported by the presentation engine for a given swapchain, call:

    // Provided by VK_EXT_present_timing
    VkResult vkGetSwapchainTimeDomainPropertiesEXT(
        VkDevice                                    device,
        VkSwapchainKHR                              swapchain,
        VkSwapchainTimeDomainPropertiesEXT*         pSwapchainTimeDomainProperties,
        uint64_t*                                   pTimeDomainsCounter);

- `device` is the device associated with `swapchain`.

- `swapchain` is the swapchain to obtain time domain properties for.

- `pSwapchainTimeDomainProperties` is a pointer to an instance of the VkSwapchainTimeDomainPropertiesEXT structure.

- `pTimeDomainsCounter` is `NULL` or a pointer to a 64-bit unsigned integer set by the implementation to the current value of the swapchain’s internal time domain properties counter.

If upon return VkSwapchainTimeDomainPropertiesEXT::`timeDomainCount` is smaller than the number of time domains supported for the given `swapchain`, VK_INCOMPLETE will be returned instead of VK_SUCCESS to indicate that not all the available values were returned.

Valid Usage (Implicit)

- VUID-vkGetSwapchainTimeDomainPropertiesEXT-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetSwapchainTimeDomainPropertiesEXT-swapchain-parameter
  `swapchain` must be a valid VkSwapchainKHR handle

- VUID-vkGetSwapchainTimeDomainPropertiesEXT-pSwapchainTimeDomainProperties-parameter
  `pSwapchainTimeDomainProperties` must be a valid pointer to a VkSwapchainTimeDomainPropertiesEXT structure

- VUID-vkGetSwapchainTimeDomainPropertiesEXT-pTimeDomainsCounter-parameter
  If `pTimeDomainsCounter` is not `NULL`, `pTimeDomainsCounter` must be a valid pointer to a `uint64_t` value

- VUID-vkGetSwapchainTimeDomainPropertiesEXT-swapchain-parent
  `swapchain` must have been created, allocated, or retrieved from `device`

Host Synchronization

- Host access to `swapchain` must be externally synchronized

Return Codes

Success

  - VK_INCOMPLETE

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_SURFACE_LOST_KHR

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkSwapchainTimeDomainPropertiesEXT` structure is defined as:

    // Provided by VK_EXT_present_timing
    typedef struct VkSwapchainTimeDomainPropertiesEXT {
        VkStructureType     sType;
        void*               pNext;
        uint32_t            timeDomainCount;
        VkTimeDomainKHR*    pTimeDomains;
        uint64_t*           pTimeDomainIds;
    } VkSwapchainTimeDomainPropertiesEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `timeDomainCount` is an integer related to the number of time domains available or queried, as described below.

- `pTimeDomains` is a pointer to an array of VkTimeDomainKHR values representing time domains that are available for the swapchain.

- `pTimeDomainIds` is a pointer to an array of unique identifiers for each time domain.

When calling vkGetSwapchainTimeDomainPropertiesEXT, if `pTimeDomains` is `NULL` and `pTimeDomainIds` is `NULL`, then the number of time domains supported for the given `swapchain` is returned in `timeDomainCount`. Otherwise, `timeDomainCount` must specify the number of elements in `pTimeDomains` and `pTimeDomainIds`, and on return is overwritten with the number of values actually written to each array.

Implementations must advertise support for at least one time domain of VK_TIME_DOMAIN_PRESENT_STAGE_LOCAL_EXT.

Note | Due to the dynamic nature of their underlying `VkSurfaceKHR` properties, swapchains may need to expose multiple swapchain-local opaque time domains using the same VkTimeDomainKHR value over time, for example when a surface is moved from one display hardware to another. Arbitrary identifiers, provided in `timeDomainIds`, are used by the implementation to differentiate opaque time domains of identical scopes.

Valid Usage

- VUID-VkSwapchainTimeDomainPropertiesEXT-pTimeDomains-12370
  `pTimeDomains` and `pTimeDomainIds` must both be `NULL` or both not be `NULL`

- VUID-VkSwapchainTimeDomainPropertiesEXT-pTimeDomains-12371
  If `pTimeDomains` and `pTimeDomainIds` are not `NULL`, then `timeDomainCount` must not be zero

Valid Usage (Implicit)

- VUID-VkSwapchainTimeDomainPropertiesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SWAPCHAIN_TIME_DOMAIN_PROPERTIES_EXT

- VUID-VkSwapchainTimeDomainPropertiesEXT-pNext-pNext
  `pNext` must be `NULL`

Because of the asynchronous nature of the presentation engine, the timing information for a given vkQueuePresentKHR command may only becomes available some time after the presentation has occurred. These time values should be asynchronously queried, and are returned if available. All time values are in nanoseconds, according to the time-domain being used.

To asynchronously query the presentation engine for newly-available timing information about one or more previous presents to a given swapchain, call:

    // Provided by VK_EXT_present_timing
    VkResult vkGetPastPresentationTimingEXT(
        VkDevice                                    device,
        const VkPastPresentationTimingInfoEXT*      pPastPresentationTimingInfo,
        VkPastPresentationTimingPropertiesEXT*      pPastPresentationTimingProperties);

- `device` is the device associated with `swapchain`.

- `pPastPresentationTimingInfo` is a pointer to an instance of the VkPastPresentationTimingInfoEXT structure.

- `pPastPresentationTimingProperties` is a pointer to an instance of the VkPastPresentationTimingPropertiesEXT structure.

If upon return the value of `VkPastPresentationTimingPropertiesEXT`::`presentationTimingCount` is less than the number of available timing records for the given `VkPastPresentationTimingInfoEXT`::`swapchain`, VK_INCOMPLETE is returned instead of VK_SUCCESS to indicate that not all the available values were returned.

Upon return, zero or more slots of the `swapchain` internal timing results queue, equal to the number of entries written to `VkPastPresentationTimingPropertiesEXT`::`pPresentationTimings` for which `reportComplete` is VK_TRUE, are made available for future `vkQueuePresentKHR` calls. Elements of `pPresentationTimings` are arranged in ascending order of present ids.

Timing information may become available out of order with regards to their associated vkQueuePresentKHR order. VK_PAST_PRESENTATION_TIMING_ALLOW_OUT_OF_ORDER_RESULTS_BIT_EXT can be set in `VkPastPresentationTimingInfoEXT`::`flags` to allow `vkGetPastPresentationTimingEXT` to return results in that same order. Otherwise, results are returned in the order of their associated vkQueuePresentKHR calls.

There is no requirement for any precise timing relationship between the completion of a present stage and the availability of any associated timing information. However, results must be made available in finite time.

As an exception to the normal rules for objects which are externally synchronized, `swapchain` may be simultaneously used by other threads in calls to functions other than vkDestroySwapchainKHR and vkCreateSwapchainKHR with `swapchain` used as an `oldSwapchain`. Access to the swapchain timing information must be atomic within the implementation.

Valid Usage

- VUID-vkGetPastPresentationTimingEXT-flags-12230
  If VK_PAST_PRESENTATION_TIMING_ALLOW_OUT_OF_ORDER_RESULTS_BIT_EXT is set in `VkPastPresentationTimingInfoEXT`::`flags`, the `presentStageCount` value of each element of `VkPastPresentationTimingPropertiesEXT`::`pPresentationTimings` must be at least the maximum number of present stages set in VkPresentTimingInfoEXT::`presentStageQueries` among all vkQueuePresentKHR calls, with a non-zero `presentStageQueries`, for which complete results have not been returned yet by a previous call

- VUID-vkGetPastPresentationTimingEXT-flags-12231
  If VK_PAST_PRESENTATION_TIMING_ALLOW_OUT_OF_ORDER_RESULTS_BIT_EXT is not set in `VkPastPresentationTimingInfoEXT`::`flags`, the `presentStageCount` value of each element of `VkPastPresentationTimingPropertiesEXT`::`pPresentationTimings` must be at least the number of present stages set in `VkPresentTimingInfoEXT`::`presentStageQueries` for the earliest call to `vkQueuePresentKHR`, with a non-zero `presentStageQueries`, that corresponds to that element’s index and for which complete results have not been returned yet by a previous call

Valid Usage (Implicit)

- VUID-vkGetPastPresentationTimingEXT-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetPastPresentationTimingEXT-pPastPresentationTimingInfo-parameter
  `pPastPresentationTimingInfo` must be a valid pointer to a valid VkPastPresentationTimingInfoEXT structure

- VUID-vkGetPastPresentationTimingEXT-pPastPresentationTimingProperties-parameter
  `pPastPresentationTimingProperties` must be a valid pointer to a VkPastPresentationTimingPropertiesEXT structure

Return Codes

Success

  - VK_INCOMPLETE

  - VK_SUCCESS

Failure

  - VK_ERROR_DEVICE_LOST

  - VK_ERROR_OUT_OF_DATE_KHR

  - VK_ERROR_SURFACE_LOST_KHR

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkPastPresentationTimingInfoEXT` structure is defined as:

    // Provided by VK_EXT_present_timing
    typedef struct VkPastPresentationTimingInfoEXT {
        VkStructureType                     sType;
        const void*                         pNext;
        VkPastPresentationTimingFlagsEXT    flags;
        VkSwapchainKHR                      swapchain;
    } VkPastPresentationTimingInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask of VkPastPresentationTimingFlagBitsEXT specifying options for queries of past presentation timing information.

- `swapchain` is the swapchain to obtain presentation timing information for.

Valid Usage (Implicit)

- VUID-VkPastPresentationTimingInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PAST_PRESENTATION_TIMING_INFO_EXT

- VUID-VkPastPresentationTimingInfoEXT-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkPastPresentationTimingInfoEXT-flags-parameter
  `flags` must be a valid combination of VkPastPresentationTimingFlagBitsEXT values

- VUID-VkPastPresentationTimingInfoEXT-swapchain-parameter
  `swapchain` must be a valid VkSwapchainKHR handle

Host Synchronization

- Host access to `swapchain` must be externally synchronized

    // Provided by VK_EXT_present_timing
    typedef VkFlags VkPastPresentationTimingFlagsEXT;

`VkPastPresentationTimingFlagsEXT` is a bitmask type for setting a mask of zero or more VkPastPresentationTimingFlagBitsEXT.

Bits which can be set in VkPastPresentationTimingInfoEXT::`flags`, specifying options for queries of past presentation timing information, are:

    // Provided by VK_EXT_present_timing
    typedef enum VkPastPresentationTimingFlagBitsEXT {
        VK_PAST_PRESENTATION_TIMING_ALLOW_PARTIAL_RESULTS_BIT_EXT = 0x00000001,
        VK_PAST_PRESENTATION_TIMING_ALLOW_OUT_OF_ORDER_RESULTS_BIT_EXT = 0x00000002,
    } VkPastPresentationTimingFlagBitsEXT;

- VK_PAST_PRESENTATION_TIMING_ALLOW_PARTIAL_RESULTS_BIT_EXT specifies that vkGetPastPresentationTimingEXT may return partial results for presentation requests that have not completed all requested present stages.

- VK_PAST_PRESENTATION_TIMING_ALLOW_OUT_OF_ORDER_RESULTS_BIT_EXT specifies that vkGetPastPresentationTimingEXT may return results out of order with respect to the presentation order.

The `VkPastPresentationTimingPropertiesEXT` structure is defined as:

    // Provided by VK_EXT_present_timing
    typedef struct VkPastPresentationTimingPropertiesEXT {
        VkStructureType                 sType;
        void*                           pNext;
        uint64_t                        timingPropertiesCounter;
        uint64_t                        timeDomainsCounter;
        uint32_t                        presentationTimingCount;
        VkPastPresentationTimingEXT*    pPresentationTimings;
    } VkPastPresentationTimingPropertiesEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `timingPropertiesCounter` is a 64-bit unsigned integer set by the implementation to the current value of the swapchain’s internal timing properties counter.

- `timeDomainsCounter` is a 64-bit unsigned integer set by the implementation to the current value of the swapchain’s internal time domains list counter.

- `presentationTimingCount` is an integer related to the number of VkPastPresentationTimingEXT structures available or queried, as described below.

- `pPresentationTimings` is `NULL` or a pointer to an array of VkPastPresentationTimingEXT structures.

When calling vkGetPastPresentationTimingEXT, if `pPresentationTimings` is `NULL`, then the number of available timing records for the given `swapchain` is returned in `presentationTimingCount`. Otherwise, `presentationTimingCount` must specify the number of elements in the `pPresentationTimings` array, and on return is overwritten with the number of structures actually written to `pPresentationTimings`.

if VK_PAST_PRESENTATION_TIMING_ALLOW_PARTIAL_RESULTS_BIT_EXT is specified in VkPastPresentationTimingInfoEXT::`flags`, `vkGetPastPresentationTimingEXT` may return incomplete results, containing only information for a subset of the requested present stages. Further calls to `vkGetPastPresentationTimingEXT` will keep providing all available results for a previously incomplete entry until it is complete.

The implementation must return a VkPastPresentationTimingEXT for every vkQueuePresentKHR referencing `swapchain` where a non-zero VkPresentTimingInfoEXT::`presentStageQueries` was specified and at least one present stage has available results.

Valid Usage (Implicit)

- VUID-VkPastPresentationTimingPropertiesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PAST_PRESENTATION_TIMING_PROPERTIES_EXT

- VUID-VkPastPresentationTimingPropertiesEXT-pNext-pNext
  `pNext` must be `NULL`

Note | The presentation engine may change the timing properties of the `swapchain` for a variety of reasons. This may occur, for example, if the window system changes its mode, including the refresh rate of the display. Another example is if an application’s surface is being composited with other windows of a window system, and then the surface’s window becomes a borderless, full-screen window. While composited, the timing properties may be FRR, and while full-screen, the timing properties may be VRR. The available time domains for a swapchain may change for similar or identical reasons. Therefore, it is possible that the same event will cause both the swapchain’s internal timing properties counter and time domains list counter to update.

The `VkPastPresentationTimingEXT` structure is defined as:

    // Provided by VK_EXT_present_timing
    typedef struct VkPastPresentationTimingEXT {
        VkStructureType           sType;
        void*                     pNext;
        uint64_t                  presentId;
        uint64_t                  targetTime;
        uint32_t                  presentStageCount;
        VkPresentStageTimeEXT*    pPresentStages;
        VkTimeDomainKHR           timeDomain;
        uint64_t                  timeDomainId;
        VkBool32                  reportComplete;
    } VkPastPresentationTimingEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `presentId` is zero or a value that was given to a previous `vkQueuePresentKHR` command via VkPresentId2KHR::`pPresentIds`.

- `targetTime` is the application-provided target absolute time or duration of the associated presentation request in VkPresentTimingInfoEXT::`targetTime`.

- `presentStageCount` is a count of items contained in `pPresentStages`.

- `pPresentStages` a pointer to an array of VkPresentStageTimeEXT providing timing information for the presentation request associated with `presentId`.

- `timeDomain` is the time domain used by the presentation engine to report times in `pPresentStages`.

- `timeDomainId` is the id associated with `timeDomain`.

- `reportComplete` is VK_TRUE if the presentation engine has reported all the requested results in `pPresentStages`.

When calling vkGetPastPresentationTimingEXT, the implementation sets `presentStageCount` to the number of present stages it has written results for. If VK_PAST_PRESENTATION_TIMING_ALLOW_PARTIAL_RESULTS_BIT_EXT was specified in VkPastPresentationTimingInfoEXT::`flags`, the implementation may return an incomplete report containing fewer present stage results than were queried by the associated presentation request. Otherwise, results for all the present stages queried by the presentation request are written by the implementation.

Timing information for some present stages may have a time value of 0, indicating that results for that present stage are not available.

For systems with multiple entities operating within the presentation engine, such as multiple displays, `pPresentStages` will return timing results for one entity which has been affected by the presentation.

`timeDomainId` may be different than the time domain that was specified in `VkPresentTimingInfoEXT`::`timeDomainId` if the requirements for using this time domain could not be met at the time the presentation engine processed the presentation request. In such a case, the presentation engine may pick a time domain to fall back to, if one is available, and report results in that domain. Applications can continue to use this fallback time domain in future `vkQueuePresentKHR` calls, or they can call vkGetSwapchainTimeDomainPropertiesEXT to choose from the currently supported time domains.

Valid Usage (Implicit)

- VUID-VkPastPresentationTimingEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PAST_PRESENTATION_TIMING_EXT

- VUID-VkPastPresentationTimingEXT-pNext-pNext
  `pNext` must be `NULL`

The `VkPresentStageTimeEXT` structure is defined as:

    // Provided by VK_EXT_present_timing
    typedef struct VkPresentStageTimeEXT {
        VkPresentStageFlagsEXT    stage;
        uint64_t                  time;
    } VkPresentStageTimeEXT;

- `stage` is a VkPresentStageFlagsEXT value specifying a present stage.

- `time` is a time in nanoseconds associated with the `stage`.

To query the duration of a refresh cycle (RC) for the presentation engine’s display, call:

    // Provided by VK_GOOGLE_display_timing
    VkResult vkGetRefreshCycleDurationGOOGLE(
        VkDevice                                    device,
        VkSwapchainKHR                              swapchain,
        VkRefreshCycleDurationGOOGLE*               pDisplayTimingProperties);

- `device` is the device associated with `swapchain`.

- `swapchain` is the swapchain to obtain the refresh duration for.

- `pDisplayTimingProperties` is a pointer to a `VkRefreshCycleDurationGOOGLE` structure.

Valid Usage (Implicit)

- VUID-vkGetRefreshCycleDurationGOOGLE-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetRefreshCycleDurationGOOGLE-swapchain-parameter
  `swapchain` must be a valid VkSwapchainKHR handle

- VUID-vkGetRefreshCycleDurationGOOGLE-pDisplayTimingProperties-parameter
  `pDisplayTimingProperties` must be a valid pointer to a VkRefreshCycleDurationGOOGLE structure

- VUID-vkGetRefreshCycleDurationGOOGLE-swapchain-parent
  `swapchain` must have been created, allocated, or retrieved from `device`

Host Synchronization

- Host access to `swapchain` must be externally synchronized

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_DEVICE_LOST

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_SURFACE_LOST_KHR

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkRefreshCycleDurationGOOGLE` structure is defined as:

    // Provided by VK_GOOGLE_display_timing
    typedef struct VkRefreshCycleDurationGOOGLE {
        uint64_t    refreshDuration;
    } VkRefreshCycleDurationGOOGLE;

- `refreshDuration` is the number of nanoseconds from the start of one refresh cycle to the next.

The implementation will maintain a limited amount of history of timing information about previous presents. Because of the asynchronous nature of the presentation engine, the timing information for a given vkQueuePresentKHR command will become available some time later. These time values can be asynchronously queried, and will be returned if available. All time values are in nanoseconds, relative to a monotonically-increasing clock (e.g. `CLOCK_MONOTONIC` (see clock_gettime(2)) on Android and Linux).

To asynchronously query the presentation engine, for newly-available timing information about one or more previous presents to a given swapchain, call:

    // Provided by VK_GOOGLE_display_timing
    VkResult vkGetPastPresentationTimingGOOGLE(
        VkDevice                                    device,
        VkSwapchainKHR                              swapchain,
        uint32_t*                                   pPresentationTimingCount,
        VkPastPresentationTimingGOOGLE*             pPresentationTimings);

- `device` is the device associated with `swapchain`.

- `swapchain` is the swapchain to obtain presentation timing information duration for.

- `pPresentationTimingCount` is a pointer to an integer related to the number of `VkPastPresentationTimingGOOGLE` structures to query, as described below.

- `pPresentationTimings` is either `NULL` or a pointer to an array of `VkPastPresentationTimingGOOGLE` structures.

If `pPresentationTimings` is `NULL`, then the number of newly-available timing records for the given `swapchain` is returned in `pPresentationTimingCount`. Otherwise, `pPresentationTimingCount` must point to a variable set by the user to the number of elements in the `pPresentationTimings` array, and on return the variable is overwritten with the number of structures actually written to `pPresentationTimings`. If the value of `pPresentationTimingCount` is less than the number of newly-available timing records, at most `pPresentationTimingCount` structures will be written, and VK_INCOMPLETE will be returned instead of VK_SUCCESS, to indicate that not all the available timing records were returned.

Valid Usage (Implicit)

- VUID-vkGetPastPresentationTimingGOOGLE-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetPastPresentationTimingGOOGLE-swapchain-parameter
  `swapchain` must be a valid VkSwapchainKHR handle

- VUID-vkGetPastPresentationTimingGOOGLE-pPresentationTimingCount-parameter
  `pPresentationTimingCount` must be a valid pointer to a `uint32_t` value

- VUID-vkGetPastPresentationTimingGOOGLE-pPresentationTimings-parameter
  If the value referenced by `pPresentationTimingCount` is not `0`, and `pPresentationTimings` is not `NULL`, `pPresentationTimings` must be a valid pointer to an array of `pPresentationTimingCount` VkPastPresentationTimingGOOGLE structures

- VUID-vkGetPastPresentationTimingGOOGLE-swapchain-parent
  `swapchain` must have been created, allocated, or retrieved from `device`

Host Synchronization

- Host access to `swapchain` must be externally synchronized

Return Codes

Success

  - VK_INCOMPLETE

  - VK_SUCCESS

Failure

  - VK_ERROR_DEVICE_LOST

  - VK_ERROR_OUT_OF_DATE_KHR

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_SURFACE_LOST_KHR

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkPastPresentationTimingGOOGLE` structure is defined as:

    // Provided by VK_GOOGLE_display_timing
    typedef struct VkPastPresentationTimingGOOGLE {
        uint32_t    presentID;
        uint64_t    desiredPresentTime;
        uint64_t    actualPresentTime;
        uint64_t    earliestPresentTime;
        uint64_t    presentMargin;
    } VkPastPresentationTimingGOOGLE;

- `presentID` is an application-provided value that was given to a previous `vkQueuePresentKHR` command via VkPresentTimeGOOGLE::`presentID` (see below). It can be used to uniquely identify a previous present with the vkQueuePresentKHR command.

- `desiredPresentTime` is an application-provided value that was given to a previous vkQueuePresentKHR command via VkPresentTimeGOOGLE::`desiredPresentTime`. If non-zero, it was used by the application to indicate that an image not be presented any sooner than `desiredPresentTime`.

- `actualPresentTime` is the time when the image of the `swapchain` was actually displayed.

- `earliestPresentTime` is the time when the image of the `swapchain` could have been displayed. This may differ from `actualPresentTime` if the application requested that the image be presented no sooner than VkPresentTimeGOOGLE::`desiredPresentTime`.

- `presentMargin` is an indication of how early the `vkQueuePresentKHR` command was processed compared to how soon it needed to be processed, and still be presented at `earliestPresentTime`.

The results for a given `swapchain` and `presentID` are only returned once from `vkGetPastPresentationTimingGOOGLE`.

The application can use the `VkPastPresentationTimingGOOGLE` values to occasionally adjust its timing. For example, if `actualPresentTime` is later than expected (e.g. one `refreshDuration` late), the application may increase its target IPD to a higher multiple of `refreshDuration` (e.g. decrease its frame rate from 60Hz to 30Hz). If `actualPresentTime` and `earliestPresentTime` are consistently different, and if `presentMargin` is consistently large enough, the application may decrease its target IPD to a smaller multiple of `refreshDuration` (e.g. increase its frame rate from 30Hz to 60Hz). If `actualPresentTime` and `earliestPresentTime` are same, and if `presentMargin` is consistently high, the application may delay the start of its input-render-present loop in order to decrease the latency between user input and the corresponding present (always leaving some margin in case a new image takes longer to render than the previous image). An application that desires its target IPD to always be the same as `refreshDuration`, can also adjust features until `actualPresentTime` is never late and `presentMargin` is satisfactory.

The full `VK_GOOGLE_display_timing` extension semantics are described for swapchains created with VK_PRESENT_MODE_FIFO_KHR. For example, non-zero values of `VkPresentTimeGOOGLE`::`desiredPresentTime` must be honored, and `vkGetPastPresentationTimingGOOGLE` should return a `VkPastPresentationTimingGOOGLE` structure with valid values for all images presented with `vkQueuePresentKHR`. The semantics for other present modes are as follows:

- VK_PRESENT_MODE_IMMEDIATE_KHR. The presentation engine may ignore non-zero values of `VkPresentTimeGOOGLE`::`desiredPresentTime` in favor of presenting immediately. The value of `VkPastPresentationTimingGOOGLE`::`earliestPresentTime` must be the same as `VkPastPresentationTimingGOOGLE`::`actualPresentTime`, which should be when the presentation engine displayed the image.

- VK_PRESENT_MODE_MAILBOX_KHR. The intention of using this present mode with this extension is to handle cases where an image is presented late, and the next image is presented soon enough to replace it at the next vertical blanking period. For images that are displayed to the user, the value of `VkPastPresentationTimingGOOGLE`::`actualPresentTime` must be when the image was displayed. For images that are not displayed to the user, `vkGetPastPresentationTimingGOOGLE` may not return a `VkPastPresentationTimingGOOGLE` structure, or it may return a `VkPastPresentationTimingGOOGLE` structure with the value of zero for both `VkPastPresentationTimingGOOGLE`::`actualPresentTime` and `VkPastPresentationTimingGOOGLE`::`earliestPresentTime`. It is possible that an application can submit images with `VkPresentTimeGOOGLE`::`desiredPresentTime` values such that new images may not be displayed. For example, if `VkPresentTimeGOOGLE`::`desiredPresentTime` is far enough in the future that an image is not presented before `vkQueuePresentKHR` is called to present another image, the first image will not be displayed to the user. If the application continues to do that, the presentation engine may not display new images.

- VK_PRESENT_MODE_FIFO_RELAXED_KHR. For images that are presented in time to be displayed at the next vertical blanking period, the semantics are identical as for VK_PRESENT_MODE_FIFO_KHR. For images that are presented late, and are displayed after the start of the vertical blanking period (i.e. with tearing), the values of `VkPastPresentationTimingGOOGLE` may be treated as if the image was displayed at the start of the vertical blanking period, or may be treated the same as for VK_PRESENT_MODE_IMMEDIATE_KHR.

### 40.9. Present Wait

Applications wanting to control the pacing of the application by monitoring when presentation processes have completed to limit the number of outstanding images queued for presentation, need to have a method of being signaled during the presentation process.

Using the `VK_GOOGLE_display_timing` extension, applications can discover when images were presented, but only asynchronously.

Providing a mechanism which allows applications to block, waiting for a specific step of the presentation process to complete allows them to control the amount of outstanding work (and hence the potential lag in responding to user input or changes in the rendering environment).

The `VK_KHR_present_wait2` extension allows applications to tell the presentation engine at the vkQueuePresentKHR call that it plans on waiting for presentation by passing a VkPresentId2KHR structure. The `presentId` passed in that structure may then be passed to a future vkWaitForPresent2KHR call to cause the application to block until that presentation is finished.

This functionality was originally provided by the `VK_KHR_present_wait` extension, which has been deprecated and replaced by `VK_KHR_present_wait2`.

The `VkPresentWait2InfoKHR` structure is defined as:

    // Provided by VK_KHR_present_wait2
    typedef struct VkPresentWait2InfoKHR {
        VkStructureType    sType;
        const void*        pNext;
        uint64_t           presentId;
        uint64_t           timeout;
    } VkPresentWait2InfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `presentId` is the presentation presentId to wait for.

- `timeout` is the timeout period in units of nanoseconds. `timeout` is adjusted to the closest value allowed by the implementation-dependent timeout accuracy, which may be substantially longer than one nanosecond, and may be longer than the requested period.

Valid Usage (Implicit)

- VUID-VkPresentWait2InfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PRESENT_WAIT_2_INFO_KHR

- VUID-VkPresentWait2InfoKHR-pNext-pNext
  `pNext` must be `NULL`

### 40.10. WSI Swapchain

A swapchain object (a.k.a. swapchain) provides the ability to present rendering results to a surface. Swapchain objects are represented by `VkSwapchainKHR` handles:

    // Provided by VK_KHR_swapchain
    VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSwapchainKHR)

A swapchain is an abstraction for an array of presentable images that are associated with a surface. The presentable images are represented by `VkImage` objects created by the platform. One image (which can be an array image for multiview/stereoscopic-3D surfaces) is displayed at a time, but multiple images can be queued for presentation. An application renders to the image, and then queues the image for presentation to the surface.

A native window cannot be associated with more than one non-retired swapchain at a time. Further, swapchains cannot be created for native windows that have a non-Vulkan graphics API surface associated with them.

Note | The presentation engine is an abstraction for the platform’s compositor or display engine. The presentation engine may be synchronous or asynchronous with respect to the application and/or logical device. Some implementations may use the device’s graphics queue or dedicated presentation hardware to perform presentation.

The presentable images of a swapchain are owned by the presentation engine. An application can acquire use of a presentable image from the presentation engine. Use of a presentable image must occur only after the image is returned by vkAcquireNextImageKHR, and before it is released by vkQueuePresentKHR. This includes transitioning the image layout and rendering commands.

An application can acquire use of a presentable image with vkAcquireNextImageKHR. After acquiring a presentable image and before modifying it, the application must use a synchronization primitive to ensure that the presentation engine has finished reading from the image. The application can then transition the image’s layout, queue rendering commands to it, etc. Finally, the application presents the image with vkQueuePresentKHR, which releases the acquisition of the image. The application can also release the acquisition of the image through vkReleaseSwapchainImagesKHR, if the image is not in use by the device, and skip the present operation.

The presentation engine controls the order in which presentable images are acquired for use by the application.

Note | This allows the platform to handle situations which require out-of-order return of images after presentation. At the same time, it allows the application to generate command buffers referencing all of the images in the swapchain at initialization time, rather than in its main loop.

How this all works is described below.

If a swapchain is created with `presentMode` set to either VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR or VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR, a single presentable image can be acquired, referred to as a shared presentable image. A shared presentable image may be concurrently accessed by the application and the presentation engine, without transitioning the image’s layout after it is initially presented.

- With VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR, the presentation engine is only required to update to the latest contents of a shared presentable image after a present. The application must call `vkQueuePresentKHR` to guarantee an update. However, the presentation engine may update from it at any time.

- With VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR, the presentation engine will automatically present the latest contents of a shared presentable image during every refresh cycle. The application is only required to make one initial call to `vkQueuePresentKHR`, after which the presentation engine will update from it without any need for further present calls. The application can indicate the image contents have been updated by calling `vkQueuePresentKHR`, but this does not guarantee the timing of when updates will occur.

The presentation engine may access a shared presentable image at any time after it is first presented. To avoid tearing, an application should coordinate access with the presentation engine. This requires presentation engine timing information through platform-specific mechanisms and ensuring that color attachment writes are made available during the portion of the presentation engine’s refresh cycle they are intended for.

Note | The `VK_KHR_shared_presentable_image` extension does not provide functionality for determining the timing of the presentation engine’s refresh cycles.

In order to query a swapchain’s status when rendering to a shared presentable image, call:

    // Provided by VK_KHR_shared_presentable_image
    VkResult vkGetSwapchainStatusKHR(
        VkDevice                                    device,
        VkSwapchainKHR                              swapchain);

- `device` is the device associated with `swapchain`.

- `swapchain` is the swapchain to query.

Valid Usage (Implicit)

- VUID-vkGetSwapchainStatusKHR-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetSwapchainStatusKHR-swapchain-parameter
  `swapchain` must be a valid VkSwapchainKHR handle

- VUID-vkGetSwapchainStatusKHR-swapchain-parent
  `swapchain` must have been created, allocated, or retrieved from `device`

Host Synchronization

- Host access to `swapchain` must be externally synchronized

Return Codes

Success

  - VK_SUBOPTIMAL_KHR

  - VK_SUCCESS

Failure

  - VK_ERROR_DEVICE_LOST

  - VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT

  - VK_ERROR_OUT_OF_DATE_KHR

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_SURFACE_LOST_KHR

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The possible return values for `vkGetSwapchainStatusKHR` should be interpreted as follows:

- VK_SUCCESS specifies the presentation engine is presenting the contents of the shared presentable image, as per the swapchain’s VkPresentModeKHR.

- VK_SUBOPTIMAL_KHR the swapchain no longer matches the surface properties exactly, but the presentation engine is presenting the contents of the shared presentable image, as per the swapchain’s VkPresentModeKHR.

- VK_ERROR_OUT_OF_DATE_KHR the surface has changed in such a way that it is no longer compatible with the swapchain.

- VK_ERROR_SURFACE_LOST_KHR the surface is no longer available.

Note | The swapchain state may be cached by implementations, so applications should regularly call `vkGetSwapchainStatusKHR` when using a swapchain with VkPresentModeKHR equal to VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR.

To create a swapchain, call:

    // Provided by VK_KHR_swapchain
    VkResult vkCreateSwapchainKHR(
        VkDevice                                    device,
        const VkSwapchainCreateInfoKHR*             pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkSwapchainKHR*                             pSwapchain);

- `device` is the device to create the swapchain for.

- `pCreateInfo` is a pointer to a VkSwapchainCreateInfoKHR structure specifying the parameters of the created swapchain.

- `pAllocator` is the allocator used for host memory allocated for the swapchain object when there is no more specific allocator available (see Memory Allocation).

- `pSwapchain` is a pointer to a VkSwapchainKHR handle in which the created swapchain object will be returned.

As mentioned above, if `vkCreateSwapchainKHR` succeeds, it will return a handle to a swapchain containing an array of at least `pCreateInfo->minImageCount` presentable images.

While acquired by the application, presentable images can be used in any way that equivalent non-presentable images can be used. A presentable image is equivalent to a non-presentable image created with the following VkImageCreateInfo parameters:

`VkImageCreateInfo` Field | Value
--- | ---
`flags` | VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT is set if VK_SWAPCHAIN_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR is set VK_IMAGE_CREATE_PROTECTED_BIT is set if VK_SWAPCHAIN_CREATE_PROTECTED_BIT_KHR is set VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT and VK_IMAGE_CREATE_EXTENDED_USAGE_BIT_KHR are both set if VK_SWAPCHAIN_CREATE_MUTABLE_FORMAT_BIT_KHR is set VK_IMAGE_CREATE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_BIT_EXT is set if VK_SWAPCHAIN_CREATE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_BIT_EXT is set all other bits are unset
`imageType` | VK_IMAGE_TYPE_2D
`format` | `pCreateInfo->imageFormat`
`extent` | {`pCreateInfo->imageExtent.width`, `pCreateInfo->imageExtent.height`, `1`}
`mipLevels` | 1
`arrayLayers` | `pCreateInfo->imageArrayLayers`
`samples` | VK_SAMPLE_COUNT_1_BIT
`tiling` | VK_IMAGE_TILING_OPTIMAL
`usage` | `pCreateInfo->imageUsage`
`sharingMode` | `pCreateInfo->imageSharingMode`
`queueFamilyIndexCount` | `pCreateInfo->queueFamilyIndexCount`
`pQueueFamilyIndices` | `pCreateInfo->pQueueFamilyIndices`
`initialLayout` | VK_IMAGE_LAYOUT_UNDEFINED

The `pCreateInfo->surface` must not be destroyed until after the swapchain is destroyed.

If `oldSwapchain` is VK_NULL_HANDLE, and the native window referred to by `pCreateInfo->surface` is already associated with a Vulkan swapchain, VK_ERROR_NATIVE_WINDOW_IN_USE_KHR must be returned.

If `oldSwapchain` is a valid swapchain and there are outstanding calls to `vkWaitForPresent2KHR`, then `vkCreateSwapchainKHR` may block until those calls complete.

If the native window referred to by `pCreateInfo->surface` is already associated with a non-Vulkan graphics API surface, VK_ERROR_NATIVE_WINDOW_IN_USE_KHR must be returned.

The native window referred to by `pCreateInfo->surface` must not become associated with a non-Vulkan graphics API surface before all associated Vulkan swapchains have been destroyed.

`vkCreateSwapchainKHR` will return VK_ERROR_DEVICE_LOST if the logical device was lost. The `VkSwapchainKHR` is a child of the `device`, and must be destroyed before the `device`. However, `VkSurfaceKHR` is not a child of any `VkDevice` and is not affected by the lost device. After successfully recreating a `VkDevice`, the same `VkSurfaceKHR` can be used to create a new `VkSwapchainKHR`, provided the previous one was destroyed.

If the `oldSwapchain` parameter of `pCreateInfo` is a valid swapchain, which has exclusive full-screen access, that access is released from `pCreateInfo->oldSwapchain`. If the command succeeds in this case, the newly created swapchain will automatically acquire exclusive full-screen access from `pCreateInfo->oldSwapchain`.

Note | This implicit transfer is intended to avoid exiting and entering full-screen exclusive mode, which may otherwise cause unwanted visual updates to the display.

In some cases, swapchain creation may fail if exclusive full-screen mode is requested for application control, but for some implementation-specific reason exclusive full-screen access is unavailable for the particular combination of parameters provided. If this occurs, VK_ERROR_INITIALIZATION_FAILED will be returned.

Note | In particular, it will fail if the `imageExtent` member of `pCreateInfo` does not match the extents of the monitor. Other reasons for failure may include the application not being set as high-dpi aware, or if the physical device and monitor are not compatible in this mode.

If the `pNext` chain of VkSwapchainCreateInfoKHR includes a VkSwapchainPresentBarrierCreateInfoNV structure, then that structure includes additional swapchain creation parameters specific to the present barrier. Swapchain creation may fail if the state of the current system restricts the usage of the present barrier feature VkSurfaceCapabilitiesPresentBarrierNV, or a swapchain itself does not satisfy all the required conditions. In this scenario VK_ERROR_INITIALIZATION_FAILED is returned.

When the VkSurfaceKHR in VkSwapchainCreateInfoKHR is a display surface, then the VkDisplayModeKHR in display surface’s VkDisplaySurfaceCreateInfoKHR is associated with a particular VkDisplayKHR. Swapchain creation may fail if that VkDisplayKHR is not acquired by the application. In this scenario VK_ERROR_INITIALIZATION_FAILED is returned.

Valid Usage (Implicit)

- VUID-vkCreateSwapchainKHR-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkCreateSwapchainKHR-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkSwapchainCreateInfoKHR structure

- VUID-vkCreateSwapchainKHR-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateSwapchainKHR-pSwapchain-parameter
  `pSwapchain` must be a valid pointer to a VkSwapchainKHR handle

- VUID-vkCreateSwapchainKHR-device-queuecount
  The device must have been created with at least `1` queue

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_COMPRESSION_EXHAUSTED_EXT

  - VK_ERROR_DEVICE_LOST

  - VK_ERROR_INITIALIZATION_FAILED

  - VK_ERROR_NATIVE_WINDOW_IN_USE_KHR

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_SURFACE_LOST_KHR

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkSwapchainCreateInfoKHR` structure is defined as:

    // Provided by VK_KHR_swapchain
    typedef struct VkSwapchainCreateInfoKHR {
        VkStructureType                  sType;
        const void*                      pNext;
        VkSwapchainCreateFlagsKHR        flags;
        VkSurfaceKHR                     surface;
        uint32_t                         minImageCount;
        VkFormat                         imageFormat;
        VkColorSpaceKHR                  imageColorSpace;
        VkExtent2D                       imageExtent;
        uint32_t                         imageArrayLayers;
        VkImageUsageFlags                imageUsage;
        VkSharingMode                    imageSharingMode;
        uint32_t                         queueFamilyIndexCount;
        const uint32_t*                  pQueueFamilyIndices;
        VkSurfaceTransformFlagBitsKHR    preTransform;
        VkCompositeAlphaFlagBitsKHR      compositeAlpha;
        VkPresentModeKHR                 presentMode;
        VkBool32                         clipped;
        VkSwapchainKHR                   oldSwapchain;
    } VkSwapchainCreateInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask of VkSwapchainCreateFlagBitsKHR indicating parameters of the swapchain creation.

- `surface` is the surface onto which the swapchain will present images. If the creation succeeds, the swapchain becomes associated with `surface`.

- `minImageCount` is the minimum number of presentable images that the application needs. The implementation will either create the swapchain with at least that many images, or it will fail to create the swapchain.

- `imageFormat` is a VkFormat value specifying the format the swapchain image(s) will be created with.

- `imageColorSpace` is a VkColorSpaceKHR value specifying the way the swapchain interprets image data.

- `imageExtent` is the size (in pixels) of the swapchain image(s). The behavior is platform-dependent if the image extent does not match the surface’s `currentExtent` as returned by `vkGetPhysicalDeviceSurfaceCapabilitiesKHR`.

  Note | On some platforms, it is normal that `maxImageExtent` may become `(0, 0)`, for example when the window is minimized. In such a case, it is not possible to create a swapchain due to the Valid Usage requirements , unless scaling is selected through VkSwapchainPresentScalingCreateInfoKHR, if supported .

- `imageArrayLayers` is the number of views in a multiview/stereo surface. For non-stereoscopic-3D applications, this value is 1.

- `imageUsage` is a bitmask of VkImageUsageFlagBits describing the intended usage of the (acquired) swapchain images.

- `imageSharingMode` is the sharing mode used for the image(s) of the swapchain.

- `queueFamilyIndexCount` is the number of queue families having access to the image(s) of the swapchain when `imageSharingMode` is VK_SHARING_MODE_CONCURRENT.

- `pQueueFamilyIndices` is a pointer to an array of queue family indices having access to the images(s) of the swapchain when `imageSharingMode` is VK_SHARING_MODE_CONCURRENT.

- `preTransform` is a VkSurfaceTransformFlagBitsKHR value describing the transform, relative to the presentation engine’s natural orientation, applied to the image content prior to presentation. If it does not match the `currentTransform` value returned by `vkGetPhysicalDeviceSurfaceCapabilitiesKHR`, the presentation engine will transform the image content as part of the presentation operation.

- `compositeAlpha` is a VkCompositeAlphaFlagBitsKHR value indicating the alpha compositing mode to use when this surface is composited together with other surfaces on certain window systems.

- `presentMode` is the presentation mode the swapchain will use. A swapchain’s present mode determines how incoming present requests will be processed and queued internally.

- `clipped` specifies whether the Vulkan implementation is allowed to discard rendering operations that affect regions of the surface that are not visible.

  - If `clipped` is VK_TRUE, the presentable images associated with the swapchain may not own all of their pixels. Pixels in the presentable images that correspond to regions of the target surface obscured by another window on the desktop, or subject to some other clipping mechanism will have undefined content when read back. Fragment shaders may not execute for these pixels, and thus any side effects they would have had will not occur. Setting VK_TRUE does not guarantee any clipping will occur, but allows more efficient presentation methods to be used on some platforms.

  - If `clipped` is VK_FALSE, presentable images associated with the swapchain will own all of the pixels they contain.

    Note | Applications should set this value to VK_TRUE if they do not expect to read back the content of presentable images before presenting them or after reacquiring them, and if their fragment shaders do not have any side effects that require them to run for all pixels in the presentable image.

- `oldSwapchain` is VK_NULL_HANDLE, or the existing non-retired swapchain currently associated with `surface`. Providing a valid `oldSwapchain` may aid in the resource reuse, and also allows the application to still present any images that are already acquired from it.

Upon calling `vkCreateSwapchainKHR` with an `oldSwapchain` that is not VK_NULL_HANDLE, `oldSwapchain` is retired — even if creation of the new swapchain fails. The new swapchain is created in the non-retired state whether or not `oldSwapchain` is VK_NULL_HANDLE.

Upon calling `vkCreateSwapchainKHR` with an `oldSwapchain` that is not VK_NULL_HANDLE, any images from `oldSwapchain` that are not acquired by the application may be freed by the implementation, which may occur even if creation of the new swapchain fails. The application can destroy `oldSwapchain` to free all memory associated with `oldSwapchain`.

Note | Multiple retired swapchains can be associated with the same `VkSurfaceKHR` through multiple uses of `oldSwapchain` that outnumber calls to vkDestroySwapchainKHR. After `oldSwapchain` is retired, the application can pass to vkQueuePresentKHR any images it had already acquired from `oldSwapchain`. E.g., an application may present an image from the old swapchain before an image from the new swapchain is ready to be presented. As usual, vkQueuePresentKHR may fail if `oldSwapchain` has entered a state that causes VK_ERROR_OUT_OF_DATE_KHR to be returned. The application can continue to use a shared presentable image obtained from `oldSwapchain` until a presentable image is acquired from the new swapchain, as long as it has not entered a state that causes it to return VK_ERROR_OUT_OF_DATE_KHR.

`imageUsage` defines the effective usage flags for the swapchain image(s). If the `pNext` chain includes a VkImageUsageFlags2CreateInfoKHR structure, `imageUsage` is ignored, and the effective usage flags are defined by VkImageUsageFlags2CreateInfoKHR::`usage`.

Valid Usage

- VUID-VkSwapchainCreateInfoKHR-surface-01270
  `surface` must be a surface that is supported by the device as determined using vkGetPhysicalDeviceSurfaceSupportKHR

- VUID-VkSwapchainCreateInfoKHR-minImageCount-01272
  `minImageCount` must be less than or equal to the value returned in the `maxImageCount` member of the `VkSurfaceCapabilitiesKHR` structure returned by `vkGetPhysicalDeviceSurfaceCapabilitiesKHR` for the surface if the returned `maxImageCount` is not zero

- VUID-VkSwapchainCreateInfoKHR-swapchainMaintenance1-10155
  If the `swapchainMaintenance1` feature is not enabled, then the `pNext` chain must not include a VkSwapchainPresentModesCreateInfoKHR structure

- VUID-VkSwapchainCreateInfoKHR-presentMode-02839
  If `presentMode` is not VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR nor VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR, then `minImageCount` must be greater than or equal to the value returned in the `minImageCount` member of the `VkSurfaceCapabilitiesKHR` structure returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR for the surface

- VUID-VkSwapchainCreateInfoKHR-minImageCount-01383
  `minImageCount` must be `1` if `presentMode` is either VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR or VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR

- VUID-VkSwapchainCreateInfoKHR-imageFormat-01273
  `imageFormat` and `imageColorSpace` must match the `format` and `colorSpace` members, respectively, of one of the `VkSurfaceFormatKHR` structures returned by `vkGetPhysicalDeviceSurfaceFormatsKHR` for the surface

- VUID-VkSwapchainCreateInfoKHR-pNext-07781
  If a VkSwapchainPresentScalingCreateInfoKHR structure was not included in the `pNext` chain, or it is included and VkSwapchainPresentScalingCreateInfoKHR::`scalingBehavior` is zero then `imageExtent` must be between `minImageExtent` and `maxImageExtent`, inclusive, where `minImageExtent` and `maxImageExtent` are members of the `VkSurfaceCapabilitiesKHR` structure returned by `vkGetPhysicalDeviceSurfaceCapabilitiesKHR` for the surface

- VUID-VkSwapchainCreateInfoKHR-pNext-07782
  If a VkSwapchainPresentScalingCreateInfoKHR structure was included in the `pNext` chain and VkSwapchainPresentScalingCreateInfoKHR::`scalingBehavior` is not zero then `imageExtent` must be between `minScaledImageExtent` and `maxScaledImageExtent`, inclusive, where `minScaledImageExtent` and `maxScaledImageExtent` are members of the `VkSurfacePresentScalingCapabilitiesKHR` structure returned by `vkGetPhysicalDeviceSurfaceCapabilities2KHR` for the surface and `presentMode`

- VUID-VkSwapchainCreateInfoKHR-swapchainMaintenance1-10157
  If the `swapchainMaintenance1` feature is not enabled, then `flags` must not include VK_SWAPCHAIN_CREATE_DEFERRED_MEMORY_ALLOCATION_BIT_KHR

- VUID-VkSwapchainCreateInfoKHR-imageExtent-01689
  `imageExtent` members `width` and `height` must both be non-zero

- VUID-VkSwapchainCreateInfoKHR-imageArrayLayers-01275
  `imageArrayLayers` must be greater than `0` and less than or equal to the `maxImageArrayLayers` member of the `VkSurfaceCapabilitiesKHR` structure returned by `vkGetPhysicalDeviceSurfaceCapabilitiesKHR` for the surface

- VUID-VkSwapchainCreateInfoKHR-presentMode-01427
  If `presentMode` is VK_PRESENT_MODE_FIFO_LATEST_READY_KHR, VK_PRESENT_MODE_IMMEDIATE_KHR, VK_PRESENT_MODE_MAILBOX_KHR, VK_PRESENT_MODE_FIFO_KHR or VK_PRESENT_MODE_FIFO_RELAXED_KHR, `imageUsage` must be a subset of the supported usage flags present in the `supportedUsageFlags` member of the VkSurfaceCapabilitiesKHR structure returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR for `surface`

- VUID-VkSwapchainCreateInfoKHR-imageUsage-01384
  If `presentMode` is VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR or VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR, `imageUsage` must be a subset of the supported usage flags present in the `sharedPresentSupportedUsageFlags` member of the VkSharedPresentSurfaceCapabilitiesKHR structure returned by vkGetPhysicalDeviceSurfaceCapabilities2KHR for `surface`

- VUID-VkSwapchainCreateInfoKHR-imageSharingMode-01277
  If `imageSharingMode` is VK_SHARING_MODE_CONCURRENT, `pQueueFamilyIndices` must be a valid pointer to an array of `queueFamilyIndexCount` `uint32_t` values

- VUID-VkSwapchainCreateInfoKHR-imageSharingMode-01278
  If `imageSharingMode` is VK_SHARING_MODE_CONCURRENT, `queueFamilyIndexCount` must be greater than `1`

- VUID-VkSwapchainCreateInfoKHR-imageSharingMode-01428
  If `imageSharingMode` is VK_SHARING_MODE_CONCURRENT, each element of `pQueueFamilyIndices` must be unique and must be less than `pQueueFamilyPropertyCount` returned by either vkGetPhysicalDeviceQueueFamilyProperties or vkGetPhysicalDeviceQueueFamilyProperties2 for the `physicalDevice` that was used to create `device`

- VUID-VkSwapchainCreateInfoKHR-preTransform-01279
  `preTransform` must be one of the bits present in the `supportedTransforms` member of the `VkSurfaceCapabilitiesKHR` structure returned by `vkGetPhysicalDeviceSurfaceCapabilitiesKHR` for the surface

- VUID-VkSwapchainCreateInfoKHR-compositeAlpha-01280
  `compositeAlpha` must be one of the bits present in the `supportedCompositeAlpha` member of the `VkSurfaceCapabilitiesKHR` structure returned by `vkGetPhysicalDeviceSurfaceCapabilitiesKHR` for the surface

- VUID-VkSwapchainCreateInfoKHR-presentMode-01281
  `presentMode` must be one of the VkPresentModeKHR values returned by `vkGetPhysicalDeviceSurfacePresentModesKHR` for the surface

- VUID-VkSwapchainCreateInfoKHR-presentModeFifoLatestReady-10161
  If the `presentModeFifoLatestReady` feature is not enabled, `presentMode` must not be VK_PRESENT_MODE_FIFO_LATEST_READY_KHR

- VUID-VkSwapchainCreateInfoKHR-physicalDeviceCount-01429
  If the logical device was created with VkDeviceGroupDeviceCreateInfo::`physicalDeviceCount` equal to 1, `flags` must not contain VK_SWAPCHAIN_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR

- VUID-VkSwapchainCreateInfoKHR-oldSwapchain-01933
  If `oldSwapchain` is not VK_NULL_HANDLE, `oldSwapchain` must be a non-retired swapchain associated with native window referred to by `surface`

- VUID-VkSwapchainCreateInfoKHR-imageFormat-01778
  The implied image creation parameters of the swapchain must be supported as reported by vkGetPhysicalDeviceImageFormatProperties

- VUID-VkSwapchainCreateInfoKHR-flags-03168
  If `flags` contains VK_SWAPCHAIN_CREATE_MUTABLE_FORMAT_BIT_KHR then the `pNext` chain must include a VkImageFormatListCreateInfo structure with a `viewFormatCount` greater than zero and `pViewFormats` must have an element equal to `imageFormat`

- VUID-VkSwapchainCreateInfoKHR-pNext-04099
  If a VkImageFormatListCreateInfo structure was included in the `pNext` chain and VkImageFormatListCreateInfo::`viewFormatCount` is not zero then all of the formats in VkImageFormatListCreateInfo::`pViewFormats` must be compatible with the `format` as described in the compatibility table

- VUID-VkSwapchainCreateInfoKHR-flags-04100
  If `flags` does not contain VK_SWAPCHAIN_CREATE_MUTABLE_FORMAT_BIT_KHR and the `pNext` chain include a VkImageFormatListCreateInfo structure then VkImageFormatListCreateInfo::`viewFormatCount` must be `0` or `1`

- VUID-VkSwapchainCreateInfoKHR-flags-03187
  If `flags` contains VK_SWAPCHAIN_CREATE_PROTECTED_BIT_KHR, then `VkSurfaceProtectedCapabilitiesKHR`::`supportsProtected` must be VK_TRUE in the VkSurfaceProtectedCapabilitiesKHR structure returned by vkGetPhysicalDeviceSurfaceCapabilities2KHR for `surface`

- VUID-VkSwapchainCreateInfoKHR-pNext-02679
  If the `pNext` chain includes a VkSurfaceFullScreenExclusiveInfoEXT structure with its `fullScreenExclusive` member set to VK_FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT, and `surface` was created using vkCreateWin32SurfaceKHR, a VkSurfaceFullScreenExclusiveWin32InfoEXT structure must be included in the `pNext` chain

- VUID-VkSwapchainCreateInfoKHR-pNext-06752
  If the `imageCompressionControlSwapchain` feature is not enabled, the `pNext` chain must not include an VkImageCompressionControlEXT structure

- VUID-VkSwapchainCreateInfoKHR-multisampledRenderToSwapchain-12447
  If the `multisampledRenderToSwapchain` feature is not enabled, `flags` must not contain VK_SWAPCHAIN_CREATE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_BIT_EXT

- VUID-VkSwapchainCreateInfoKHR-flags-12448
  `flags` must be a subset of flags returned in VkSwapchainFlagsSurfaceCapabilitiesEXT::`swapchainSupportedFlags` , given VkSwapchainCreateInfoKHR::`presentMode` in VkSurfacePresentModeKHR

- VUID-VkSwapchainCreateInfoKHR-presentTiming-12232
  If none of the `presentTiming`, `presentAtAbsoluteTime`, or `presentAtRelativeTime` features are enabled, `flags` must not contain VK_SWAPCHAIN_CREATE_PRESENT_TIMING_BIT_EXT

Valid Usage (Implicit)

- VUID-VkSwapchainCreateInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR

- VUID-VkSwapchainCreateInfoKHR-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkDeviceGroupSwapchainCreateInfoKHR, VkImageCompressionControlEXT, VkImageFormatListCreateInfo, VkImageUsageFlags2CreateInfoKHR, VkSurfaceFullScreenExclusiveInfoEXT, VkSurfaceFullScreenExclusiveWin32InfoEXT, VkSwapchainCounterCreateInfoEXT, VkSwapchainDisplayNativeHdrCreateInfoAMD, VkSwapchainLatencyCreateInfoNV, VkSwapchainPresentBarrierCreateInfoNV, VkSwapchainPresentModesCreateInfoKHR, or VkSwapchainPresentScalingCreateInfoKHR

- VUID-VkSwapchainCreateInfoKHR-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkSwapchainCreateInfoKHR-flags-parameter
  `flags` must be a valid combination of VkSwapchainCreateFlagBitsKHR values

- VUID-VkSwapchainCreateInfoKHR-surface-parameter
  `surface` must be a valid VkSurfaceKHR handle

- VUID-VkSwapchainCreateInfoKHR-imageFormat-parameter
  `imageFormat` must be a valid VkFormat value

- VUID-VkSwapchainCreateInfoKHR-imageColorSpace-parameter
  `imageColorSpace` must be a valid VkColorSpaceKHR value

- VUID-VkSwapchainCreateInfoKHR-imageUsage-parameter
  `imageUsage` must be a valid combination of VkImageUsageFlagBits values

- VUID-VkSwapchainCreateInfoKHR-imageUsage-requiredbitmask
  `imageUsage` must not be `0`

- VUID-VkSwapchainCreateInfoKHR-imageSharingMode-parameter
  `imageSharingMode` must be a valid VkSharingMode value

- VUID-VkSwapchainCreateInfoKHR-preTransform-parameter
  `preTransform` must be a valid VkSurfaceTransformFlagBitsKHR value

- VUID-VkSwapchainCreateInfoKHR-compositeAlpha-parameter
  `compositeAlpha` must be a valid VkCompositeAlphaFlagBitsKHR value

- VUID-VkSwapchainCreateInfoKHR-presentMode-parameter
  `presentMode` must be a valid VkPresentModeKHR value

- VUID-VkSwapchainCreateInfoKHR-oldSwapchain-parameter
  If `oldSwapchain` is not VK_NULL_HANDLE, `oldSwapchain` must be a valid VkSwapchainKHR handle

- VUID-VkSwapchainCreateInfoKHR-commonparent
  Both of `oldSwapchain`, and `surface` that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkInstance

Host Synchronization

- Host access to `surface` must be externally synchronized

- Host access to `oldSwapchain` must be externally synchronized

Bits which can be set in VkSwapchainCreateInfoKHR::`flags`, specifying parameters of swapchain creation, are:

    // Provided by VK_KHR_swapchain
    typedef enum VkSwapchainCreateFlagBitsKHR {
      // Provided by VK_VERSION_1_1 with VK_KHR_swapchain, VK_KHR_device_group with VK_KHR_swapchain
        VK_SWAPCHAIN_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR = 0x00000001,
      // Provided by VK_VERSION_1_1 with VK_KHR_swapchain
        VK_SWAPCHAIN_CREATE_PROTECTED_BIT_KHR = 0x00000002,
      // Provided by VK_KHR_swapchain_mutable_format
        VK_SWAPCHAIN_CREATE_MUTABLE_FORMAT_BIT_KHR = 0x00000004,
      // Provided by VK_EXT_present_timing
        VK_SWAPCHAIN_CREATE_PRESENT_TIMING_BIT_EXT = 0x00000200,
      // Provided by VK_KHR_present_id2
        VK_SWAPCHAIN_CREATE_PRESENT_ID_2_BIT_KHR = 0x00000040,
      // Provided by VK_KHR_present_wait2
        VK_SWAPCHAIN_CREATE_PRESENT_WAIT_2_BIT_KHR = 0x00000080,
      // Provided by VK_KHR_swapchain_maintenance1
        VK_SWAPCHAIN_CREATE_DEFERRED_MEMORY_ALLOCATION_BIT_KHR = 0x00000008,
      // Provided by VK_EXT_multisampled_render_to_swapchain
        VK_SWAPCHAIN_CREATE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_BIT_EXT = 0x00000100,
      // Provided by VK_EXT_swapchain_maintenance1
        VK_SWAPCHAIN_CREATE_DEFERRED_MEMORY_ALLOCATION_BIT_EXT = VK_SWAPCHAIN_CREATE_DEFERRED_MEMORY_ALLOCATION_BIT_KHR,
    } VkSwapchainCreateFlagBitsKHR;

- VK_SWAPCHAIN_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR specifies that images created from the swapchain (i.e. with the `swapchain` member of VkImageSwapchainCreateInfoKHR set to this swapchain’s handle) must use VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT.

- VK_SWAPCHAIN_CREATE_PROTECTED_BIT_KHR specifies that images created from the swapchain are protected images.

- VK_SWAPCHAIN_CREATE_MUTABLE_FORMAT_BIT_KHR specifies that the images of the swapchain can be used to create a `VkImageView` with a different format than what the swapchain was created with. The list of allowed image view formats is specified by adding a VkImageFormatListCreateInfo structure to the `pNext` chain of VkSwapchainCreateInfoKHR. In addition, this flag also specifies that the swapchain can be created with usage flags that are not supported for the format the swapchain is created with but are supported for at least one of the allowed image view formats.

- VK_SWAPCHAIN_CREATE_DEFERRED_MEMORY_ALLOCATION_BIT_KHR specifies that the implementation may defer allocation of memory associated with each swapchain image until its index is to be returned from vkAcquireNextImageKHR or vkAcquireNextImage2KHR for the first time.

- VK_SWAPCHAIN_CREATE_PRESENT_ID_2_BIT_KHR specifies that applications can include the `VkPresentId2KHR` structure in the `pNext` chain of the VkPresentInfoKHR structure to associate an identifier with each presentation request.

- VK_SWAPCHAIN_CREATE_PRESENT_WAIT_2_BIT_KHR specifies that applications can use `vkWaitForPresent2KHR` to wait for the presentation engine to have begun presentation of the presentation request associated with VkPresentWait2InfoKHR::`presentId` on `swapchain`.

- VK_SWAPCHAIN_CREATE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_BIT_EXT specifies that an image can be used with multisampled rendering as a single-sampled render pass attachment

- VK_SWAPCHAIN_CREATE_PRESENT_TIMING_BIT_EXT specifies that features supported by the swapchain device in VkPhysicalDevicePresentTimingFeaturesEXT can be used to collect timing information or schedule presentation requests at specific times.

    // Provided by VK_KHR_swapchain
    typedef VkFlags VkSwapchainCreateFlagsKHR;

`VkSwapchainCreateFlagsKHR` is a bitmask type for setting a mask of zero or more VkSwapchainCreateFlagBitsKHR.

If the `pNext` chain of VkSwapchainCreateInfoKHR includes a `VkDeviceGroupSwapchainCreateInfoKHR` structure, then that structure includes a set of device group present modes that the swapchain can be used with.

The `VkDeviceGroupSwapchainCreateInfoKHR` structure is defined as:

    // Provided by VK_VERSION_1_1 with VK_KHR_swapchain, VK_KHR_device_group with VK_KHR_swapchain
    typedef struct VkDeviceGroupSwapchainCreateInfoKHR {
        VkStructureType                     sType;
        const void*                         pNext;
        VkDeviceGroupPresentModeFlagsKHR    modes;
    } VkDeviceGroupSwapchainCreateInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `modes` is a bitfield of modes that the swapchain can be used with.

If this structure is not present, `modes` is considered to be VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHR.

Valid Usage (Implicit)

- VUID-VkDeviceGroupSwapchainCreateInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHR

- VUID-VkDeviceGroupSwapchainCreateInfoKHR-modes-parameter
  `modes` must be a valid combination of VkDeviceGroupPresentModeFlagBitsKHR values

- VUID-VkDeviceGroupSwapchainCreateInfoKHR-modes-requiredbitmask
  `modes` must not be `0`

Structure Chaining

Extends the structure

  - VkSwapchainCreateInfoKHR

If the `pNext` chain of VkSwapchainCreateInfoKHR includes a `VkSwapchainDisplayNativeHdrCreateInfoAMD` structure, then that structure includes additional swapchain creation parameters specific to display native HDR support.

The `VkSwapchainDisplayNativeHdrCreateInfoAMD` structure is defined as:

    // Provided by VK_AMD_display_native_hdr
    typedef struct VkSwapchainDisplayNativeHdrCreateInfoAMD {
        VkStructureType    sType;
        const void*        pNext;
        VkBool32           localDimmingEnable;
    } VkSwapchainDisplayNativeHdrCreateInfoAMD;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `localDimmingEnable` specifies whether local dimming is enabled for the swapchain.

If the `pNext` chain of VkSwapchainCreateInfoKHR does not include this structure, the default value for `localDimmingEnable` is VK_TRUE, meaning local dimming is initially enabled for the swapchain.

Valid Usage (Implicit)

- VUID-VkSwapchainDisplayNativeHdrCreateInfoAMD-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SWAPCHAIN_DISPLAY_NATIVE_HDR_CREATE_INFO_AMD

Structure Chaining

Extends the structure

  - VkSwapchainCreateInfoKHR

Valid Usage

- VUID-VkSwapchainDisplayNativeHdrCreateInfoAMD-localDimmingEnable-04449
  It is only valid to set `localDimmingEnable` to VK_TRUE if VkDisplayNativeHdrSurfaceCapabilitiesAMD::`localDimmingSupport` is supported

The local dimming HDR setting may also be changed over the life of a swapchain by calling:

    // Provided by VK_AMD_display_native_hdr
    void vkSetLocalDimmingAMD(
        VkDevice                                    device,
        VkSwapchainKHR                              swapChain,
        VkBool32                                    localDimmingEnable);

- `device` is the device associated with `swapChain`.

- `swapChain` handle to enable local dimming.

- `localDimmingEnable` specifies whether local dimming is enabled for the swapchain.

Valid Usage (Implicit)

- VUID-vkSetLocalDimmingAMD-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkSetLocalDimmingAMD-swapChain-parameter
  `swapChain` must be a valid VkSwapchainKHR handle

- VUID-vkSetLocalDimmingAMD-swapChain-parent
  `swapChain` must have been created, allocated, or retrieved from `device`

Valid Usage

- VUID-vkSetLocalDimmingAMD-localDimmingSupport-04618
  VkDisplayNativeHdrSurfaceCapabilitiesAMD::`localDimmingSupport` must be supported

If the `pNext` chain of VkSwapchainCreateInfoKHR includes a VkSurfaceFullScreenExclusiveInfoEXT structure, then that structure specifies the application’s preferred full-screen presentation behavior. If this structure is not present, `fullScreenExclusive` is considered to be VK_FULL_SCREEN_EXCLUSIVE_DEFAULT_EXT.

To enable surface counters when creating a swapchain, add a `VkSwapchainCounterCreateInfoEXT` structure to the `pNext` chain of VkSwapchainCreateInfoKHR. `VkSwapchainCounterCreateInfoEXT` is defined as:

    // Provided by VK_EXT_display_control
    typedef struct VkSwapchainCounterCreateInfoEXT {
        VkStructureType             sType;
        const void*                 pNext;
        VkSurfaceCounterFlagsEXT    surfaceCounters;
    } VkSwapchainCounterCreateInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `surfaceCounters` is a bitmask of VkSurfaceCounterFlagBitsEXT specifying surface counters to enable for the swapchain.

Valid Usage

- VUID-VkSwapchainCounterCreateInfoEXT-surfaceCounters-01244
  The bits in `surfaceCounters` must be supported by VkSwapchainCreateInfoKHR::`surface`, as reported by vkGetPhysicalDeviceSurfaceCapabilities2EXT

Valid Usage (Implicit)

- VUID-VkSwapchainCounterCreateInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SWAPCHAIN_COUNTER_CREATE_INFO_EXT

- VUID-VkSwapchainCounterCreateInfoEXT-surfaceCounters-parameter
  `surfaceCounters` must be a valid combination of VkSurfaceCounterFlagBitsEXT values

Structure Chaining

Extends the structure

  - VkSwapchainCreateInfoKHR

The requested counters become active when the first presentation command for the associated swapchain is processed by the presentation engine. To query the value of an active counter, use:

    // Provided by VK_EXT_display_control
    VkResult vkGetSwapchainCounterEXT(
        VkDevice                                    device,
        VkSwapchainKHR                              swapchain,
        VkSurfaceCounterFlagBitsEXT                 counter,
        uint64_t*                                   pCounterValue);

- `device` is the VkDevice associated with `swapchain`.

- `swapchain` is the swapchain from which to query the counter value.

- `counter` is a VkSurfaceCounterFlagBitsEXT value specifying the counter to query.

- `pCounterValue` will return the current value of the counter.

If a counter is not available because the swapchain is out of date, the implementation may return VK_ERROR_OUT_OF_DATE_KHR.

Valid Usage

- VUID-vkGetSwapchainCounterEXT-swapchain-01245
  One or more present commands on `swapchain` must have been processed by the presentation engine

Valid Usage (Implicit)

- VUID-vkGetSwapchainCounterEXT-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetSwapchainCounterEXT-swapchain-parameter
  `swapchain` must be a valid VkSwapchainKHR handle

- VUID-vkGetSwapchainCounterEXT-counter-parameter
  `counter` must be a valid VkSurfaceCounterFlagBitsEXT value

- VUID-vkGetSwapchainCounterEXT-pCounterValue-parameter
  `pCounterValue` must be a valid pointer to a `uint64_t` value

- VUID-vkGetSwapchainCounterEXT-swapchain-parent
  `swapchain` must have been created, allocated, or retrieved from `device`

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_DEVICE_LOST

  - VK_ERROR_OUT_OF_DATE_KHR

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

To specify compression properties for the swapchain images in this swapchain, add a VkImageCompressionControlEXT structure to the `pNext` chain of the VkSwapchainCreateInfoKHR structure.

Applications can modify the presentation mode used by the swapchain on a per-presentation basis. However, all presentation modes the application intends to use with the swapchain must be specified at swapchain creation time. To specify more than one presentation mode when creating a swapchain, include the `VkSwapchainPresentModesCreateInfoKHR` structure in the `pNext` chain of the VkSwapchainCreateInfoKHR structure.

The `VkSwapchainPresentModesCreateInfoKHR` structure is defined as:

    // Provided by VK_KHR_swapchain_maintenance1
    typedef struct VkSwapchainPresentModesCreateInfoKHR {
        VkStructureType            sType;
        const void*                pNext;
        uint32_t                   presentModeCount;
        const VkPresentModeKHR*    pPresentModes;
    } VkSwapchainPresentModesCreateInfoKHR;

    // Provided by VK_EXT_swapchain_maintenance1
    // Equivalent to VkSwapchainPresentModesCreateInfoKHR
    typedef VkSwapchainPresentModesCreateInfoKHR VkSwapchainPresentModesCreateInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `presentModeCount` is the number of presentation modes provided.

- `pPresentModes` is a list of presentation modes with `presentModeCount` entries

Valid Usage

- VUID-VkSwapchainPresentModesCreateInfoKHR-None-07762
  Each entry in pPresentModes must be one of the VkPresentModeKHR values returned by `vkGetPhysicalDeviceSurfacePresentModesKHR` for the surface

- VUID-VkSwapchainPresentModesCreateInfoKHR-presentModeFifoLatestReady-10160
  If the `presentModeFifoLatestReady` feature is not enabled, pPresentModes must not contain VK_PRESENT_MODE_FIFO_LATEST_READY_KHR

- VUID-VkSwapchainPresentModesCreateInfoKHR-pPresentModes-07763
  The entries in pPresentModes must be a subset of the present modes returned in VkSurfacePresentModeCompatibilityKHR::`pPresentModes`, given VkSwapchainCreateInfoKHR::`presentMode` in VkSurfacePresentModeKHR

- VUID-VkSwapchainPresentModesCreateInfoKHR-presentMode-07764
  VkSwapchainCreateInfoKHR::`presentMode` must be included in `pPresentModes`

Valid Usage (Implicit)

- VUID-VkSwapchainPresentModesCreateInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_MODES_CREATE_INFO_KHR

- VUID-VkSwapchainPresentModesCreateInfoKHR-pPresentModes-parameter
  `pPresentModes` must be a valid pointer to an array of `presentModeCount` valid VkPresentModeKHR values

- VUID-VkSwapchainPresentModesCreateInfoKHR-presentModeCount-arraylength
  `presentModeCount` must be greater than `0`

Structure Chaining

Extends the structure

  - VkSwapchainCreateInfoKHR

When an application presents a swapchain image with dimensions different than those of the target surface, different behavior is possible on different platforms per their respective specifications:

- Presentation fails and VK_ERROR_OUT_OF_DATE_KHR is returned

- Scaling is done and VK_SUCCESS or VK_SUBOPTIMAL_KHR is returned

- Unspecified scaling using an arbitrary combination of stretching, centering and/or clipping.

Applications can define specific behavior when creating a swapchain by including the `VkSwapchainPresentScalingCreateInfoKHR` structure in the `pNext` chain of the VkSwapchainCreateInfoKHR structure.

The `VkSwapchainPresentScalingCreateInfoKHR` structure is defined as:

    // Provided by VK_KHR_swapchain_maintenance1
    typedef struct VkSwapchainPresentScalingCreateInfoKHR {
        VkStructureType             sType;
        const void*                 pNext;
        VkPresentScalingFlagsKHR    scalingBehavior;
        VkPresentGravityFlagsKHR    presentGravityX;
        VkPresentGravityFlagsKHR    presentGravityY;
    } VkSwapchainPresentScalingCreateInfoKHR;

    // Provided by VK_EXT_swapchain_maintenance1
    // Equivalent to VkSwapchainPresentScalingCreateInfoKHR
    typedef VkSwapchainPresentScalingCreateInfoKHR VkSwapchainPresentScalingCreateInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `scalingBehavior` is `0` or the scaling method to use when the dimensions of the surface and swapchain images differ.

- `presentGravityX` is `0` or the x-axis direction in which swapchain image pixels gravitate relative to the surface when `scalingBehavior` does not result in a one-to-one pixel mapping between the scaled swapchain image and the surface.

- `presentGravityY` is `0` or the y-axis direction in which swapchain image pixels gravitate relative to the surface when `scalingBehavior` does not result in a one-to-one pixel mapping between the scaled swapchain image and the surface.

If `scalingBehavior` is `0`, the result of presenting a swapchain image with dimensions that do not match the surface dimensions is implementation and platform-dependent. If `presentGravityX` or `presentGravityY` are `0`, the presentation gravity must match that defined by the native platform surface on platforms which define surface gravity.

Valid Usage

- VUID-VkSwapchainPresentScalingCreateInfoKHR-presentGravityX-07765
  If `presentGravityX` is `0`, `presentGravityY` must be `0`

- VUID-VkSwapchainPresentScalingCreateInfoKHR-presentGravityX-07766
  If `presentGravityX` is not `0`, `presentGravityY` must not be `0`

- VUID-VkSwapchainPresentScalingCreateInfoKHR-scalingBehavior-07767
  `scalingBehavior` must not have more than one bit set

- VUID-VkSwapchainPresentScalingCreateInfoKHR-presentGravityX-07768
  `presentGravityX` must not have more than one bit set

- VUID-VkSwapchainPresentScalingCreateInfoKHR-presentGravityY-07769
  `presentGravityY` must not have more than one bit set

- VUID-VkSwapchainPresentScalingCreateInfoKHR-scalingBehavior-07770
  `scalingBehavior` must be `0` or a valid scaling method for the surface as returned in VkSurfacePresentScalingCapabilitiesKHR::`supportedPresentScaling`, given VkSwapchainCreateInfoKHR::`presentMode` in VkSurfacePresentModeKHR

- VUID-VkSwapchainPresentScalingCreateInfoKHR-scalingBehavior-07771
  If the swapchain is created with VkSwapchainPresentModesCreateInfoKHR, `scalingBehavior` must be `0` or a valid scaling method for the surface as returned in VkSurfacePresentScalingCapabilitiesKHR::`supportedPresentScaling`, given each present mode in VkSwapchainPresentModesCreateInfoKHR::`pPresentModes` in VkSurfacePresentModeKHR

- VUID-VkSwapchainPresentScalingCreateInfoKHR-presentGravityX-07772
  `presentGravityX` must be `0` or a valid x-axis present gravity for the surface as returned in VkSurfacePresentScalingCapabilitiesKHR::`supportedPresentGravityX`, given VkSwapchainCreateInfoKHR::`presentMode` in VkSurfacePresentModeKHR

- VUID-VkSwapchainPresentScalingCreateInfoKHR-presentGravityX-07773
  If the swapchain is created with VkSwapchainPresentModesCreateInfoKHR, `presentGravityX` must be `0` or a valid x-axis present gravity for the surface as returned in VkSurfacePresentScalingCapabilitiesKHR::`supportedPresentGravityX`, given each present mode in VkSwapchainPresentModesCreateInfoKHR::`pPresentModes` in VkSurfacePresentModeKHR

- VUID-VkSwapchainPresentScalingCreateInfoKHR-presentGravityY-07774
  `presentGravityY` must be `0` or a valid y-axis present gravity for the surface as returned in VkSurfacePresentScalingCapabilitiesKHR::`supportedPresentGravityY`, given VkSwapchainCreateInfoKHR::`presentMode` in VkSurfacePresentModeKHR

- VUID-VkSwapchainPresentScalingCreateInfoKHR-presentGravityY-07775
  If the swapchain is created with VkSwapchainPresentModesCreateInfoKHR, `presentGravityY` must be `0` or a valid y-axis present gravity for the surface as returned in VkSurfacePresentScalingCapabilitiesKHR::`supportedPresentGravityY`, given each present mode in VkSwapchainPresentModesCreateInfoKHR::`pPresentModes` in VkSurfacePresentModeKHR

- VUID-VkSwapchainPresentScalingCreateInfoKHR-swapchainMaintenance1-10154
  If the `swapchainMaintenance1` feature is not enabled, then `scalingBehavior`, `presentGravityX`, and `presentGravityY` must be `0`

Valid Usage (Implicit)

- VUID-VkSwapchainPresentScalingCreateInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_SCALING_CREATE_INFO_KHR

- VUID-VkSwapchainPresentScalingCreateInfoKHR-scalingBehavior-parameter
  `scalingBehavior` must be a valid combination of VkPresentScalingFlagBitsKHR values

- VUID-VkSwapchainPresentScalingCreateInfoKHR-presentGravityX-parameter
  `presentGravityX` must be a valid combination of VkPresentGravityFlagBitsKHR values

- VUID-VkSwapchainPresentScalingCreateInfoKHR-presentGravityY-parameter
  `presentGravityY` must be a valid combination of VkPresentGravityFlagBitsKHR values

Structure Chaining

Extends the structure

  - VkSwapchainCreateInfoKHR

To destroy a swapchain object call:

    // Provided by VK_KHR_swapchain
    void vkDestroySwapchainKHR(
        VkDevice                                    device,
        VkSwapchainKHR                              swapchain,
        const VkAllocationCallbacks*                pAllocator);

- `device` is the VkDevice associated with `swapchain`.

- `swapchain` is the swapchain to destroy.

- `pAllocator` is the allocator used for host memory allocated for the swapchain object when there is no more specific allocator available (see Memory Allocation).

The application must not destroy a swapchain until after completion of all outstanding operations on images that were acquired from the swapchain. `swapchain` and all associated `VkImage` handles are destroyed, and must not be acquired or used any more by the application. The memory of each `VkImage` will only be freed after that image is no longer used by the presentation engine. For example, if one image of the swapchain is being displayed in a window, the memory for that image may not be freed until the window is destroyed, or another swapchain is created for the window. Destroying the swapchain does not invalidate the parent `VkSurfaceKHR`, and a new swapchain can be created with it.

When a swapchain associated with a display surface is destroyed, if the image most recently presented to the display surface is from the swapchain being destroyed, then either any display resources modified by presenting images from any swapchain associated with the display surface must be reverted by the implementation to their state prior to the first present performed on one of these swapchains, or such resources must be left in their current state.

If `swapchain` has exclusive full-screen access, it is released before the swapchain is destroyed.

Valid Usage

- VUID-vkDestroySwapchainKHR-swapchain-01282
  All uses of presentable images acquired from `swapchain` must have completed execution

- VUID-vkDestroySwapchainKHR-swapchain-01283
  If `VkAllocationCallbacks` were provided when `swapchain` was created, a compatible set of callbacks must be provided here

- VUID-vkDestroySwapchainKHR-swapchain-01284
  If no `VkAllocationCallbacks` were provided when `swapchain` was created, `pAllocator` must be `NULL`

Valid Usage (Implicit)

- VUID-vkDestroySwapchainKHR-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkDestroySwapchainKHR-swapchain-parameter
  If `swapchain` is not VK_NULL_HANDLE, `swapchain` must be a valid VkSwapchainKHR handle

- VUID-vkDestroySwapchainKHR-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkDestroySwapchainKHR-swapchain-parent
  If `swapchain` is a valid handle, it must have been created, allocated, or retrieved from `device`

Host Synchronization

- Host access to `swapchain` must be externally synchronized

When the `VK_KHR_display_swapchain` extension is enabled, multiple swapchains that share presentable images are created by calling:

    // Provided by VK_KHR_display_swapchain
    VkResult vkCreateSharedSwapchainsKHR(
        VkDevice                                    device,
        uint32_t                                    swapchainCount,
        const VkSwapchainCreateInfoKHR*             pCreateInfos,
        const VkAllocationCallbacks*                pAllocator,
        VkSwapchainKHR*                             pSwapchains);

- `device` is the device to create the swapchains for.

- `swapchainCount` is the number of swapchains to create.

- `pCreateInfos` is a pointer to an array of VkSwapchainCreateInfoKHR structures specifying the parameters of the created swapchains.

- `pAllocator` is the allocator used for host memory allocated for the swapchain objects when there is no more specific allocator available (see Memory Allocation).

- `pSwapchains` is a pointer to an array of VkSwapchainKHR handles in which the created swapchain objects will be returned.

`vkCreateSharedSwapchainsKHR` is similar to vkCreateSwapchainKHR, except that it takes an array of VkSwapchainCreateInfoKHR structures, and returns an array of swapchain objects.

The swapchain creation parameters that affect the properties and number of presentable images must match between all the swapchains. If the displays used by any of the swapchains do not use the same presentable image layout or are incompatible in a way that prevents sharing images, swapchain creation will fail with the result code VK_ERROR_INCOMPATIBLE_DISPLAY_KHR. If any error occurs, no swapchains will be created. Images presented to multiple swapchains must be re-acquired from all of them before being modified. After destroying one or more of the swapchains, the remaining swapchains and the presentable images can continue to be used.

Valid Usage (Implicit)

- VUID-vkCreateSharedSwapchainsKHR-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkCreateSharedSwapchainsKHR-pCreateInfos-parameter
  `pCreateInfos` must be a valid pointer to an array of `swapchainCount` valid VkSwapchainCreateInfoKHR structures

- VUID-vkCreateSharedSwapchainsKHR-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateSharedSwapchainsKHR-pSwapchains-parameter
  `pSwapchains` must be a valid pointer to an array of `swapchainCount` VkSwapchainKHR handles

- VUID-vkCreateSharedSwapchainsKHR-device-queuecount
  The device must have been created with at least `1` queue

- VUID-vkCreateSharedSwapchainsKHR-swapchainCount-arraylength
  `swapchainCount` must be greater than `0`

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_DEVICE_LOST

  - VK_ERROR_INCOMPATIBLE_DISPLAY_KHR

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_SURFACE_LOST_KHR

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

To obtain the array of presentable images associated with a swapchain, call:

    // Provided by VK_KHR_swapchain
    VkResult vkGetSwapchainImagesKHR(
        VkDevice                                    device,
        VkSwapchainKHR                              swapchain,
        uint32_t*                                   pSwapchainImageCount,
        VkImage*                                    pSwapchainImages);

- `device` is the device associated with `swapchain`.

- `swapchain` is the swapchain to query.

- `pSwapchainImageCount` is a pointer to an integer related to the number of presentable images available or queried, as described below.

- `pSwapchainImages` is either `NULL` or a pointer to an array of `VkImage` handles.

If `pSwapchainImages` is `NULL`, then the number of presentable images for `swapchain` is returned in `pSwapchainImageCount`. Otherwise, `pSwapchainImageCount` must point to a variable set by the application to the number of elements in the `pSwapchainImages` array, and on return the variable is overwritten with the number of structures actually written to `pSwapchainImages`. If the value of `pSwapchainImageCount` is less than the number of presentable images for `swapchain`, at most `pSwapchainImageCount` structures will be written, and VK_INCOMPLETE will be returned instead of VK_SUCCESS, to indicate that not all the available presentable images were returned.

Valid Usage (Implicit)

- VUID-vkGetSwapchainImagesKHR-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetSwapchainImagesKHR-swapchain-parameter
  `swapchain` must be a valid VkSwapchainKHR handle

- VUID-vkGetSwapchainImagesKHR-pSwapchainImageCount-parameter
  `pSwapchainImageCount` must be a valid pointer to a `uint32_t` value

- VUID-vkGetSwapchainImagesKHR-pSwapchainImages-parameter
  If the value referenced by `pSwapchainImageCount` is not `0`, and `pSwapchainImages` is not `NULL`, `pSwapchainImages` must be a valid pointer to an array of `pSwapchainImageCount` VkImage handles

- VUID-vkGetSwapchainImagesKHR-swapchain-parent
  `swapchain` must have been created, allocated, or retrieved from `device`

Return Codes

Success

  - VK_INCOMPLETE

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

Note | By knowing all presentable images used in the swapchain, the application can create command buffers that reference these images prior to entering its main rendering loop. However, command buffers are not allowed to reference presentable images created with VK_SWAPCHAIN_CREATE_DEFERRED_MEMORY_ALLOCATION_BIT_KHR until their indices have been returned from vkAcquireNextImageKHR at least once.

Images returned by vkGetSwapchainImagesKHR are fully backed by memory before they are passed to the application, as if they are each bound completely and contiguously to a single `VkDeviceMemory` object , unless the swapchain is created with the VK_SWAPCHAIN_CREATE_DEFERRED_MEMORY_ALLOCATION_BIT_KHR flag . All presentable images are initially in the VK_IMAGE_LAYOUT_UNDEFINED layout, thus before using presentable images, the application must transition them to a valid layout for the intended use.

Further, the lifetime of presentable images is controlled by the implementation, so applications must not destroy a presentable image. See vkDestroySwapchainKHR for further details on the lifetime of presentable images.

Images can also be created by using vkCreateImage with VkImageSwapchainCreateInfoKHR and bound to swapchain memory using vkBindImageMemory2 with VkBindImageMemorySwapchainInfoKHR. These images can be used anywhere swapchain images are used, and are useful in logical devices with multiple physical devices to create peer memory bindings of swapchain memory. These images and bindings have no effect on what memory is presented. Unlike images retrieved from `vkGetSwapchainImagesKHR`, these images must be destroyed with vkDestroyImage.

To acquire an available presentable image to use, and retrieve the index of that image, call:

    // Provided by VK_KHR_swapchain
    VkResult vkAcquireNextImageKHR(
        VkDevice                                    device,
        VkSwapchainKHR                              swapchain,
        uint64_t                                    timeout,
        VkSemaphore                                 semaphore,
        VkFence                                     fence,
        uint32_t*                                   pImageIndex);

- `device` is the device associated with `swapchain`.

- `swapchain` is the non-retired swapchain from which an image is being acquired.

- `timeout` specifies how long the function waits, in nanoseconds, if no image is available.

- `semaphore` is VK_NULL_HANDLE or a semaphore defining a semaphore signal operation.

- `fence` is VK_NULL_HANDLE or a fence to signal.

- `pImageIndex` is a pointer to a `uint32_t` in which the index of the next image to use (i.e. an index into the array of images returned by `vkGetSwapchainImagesKHR`) is returned.

If the `swapchain` has been created with the VK_SWAPCHAIN_CREATE_DEFERRED_MEMORY_ALLOCATION_BIT_KHR flag, the image whose index is returned in `pImageIndex` will be fully backed by memory before this call returns to the application, as if it is bound completely and contiguously to a single `VkDeviceMemory` object.

If `semaphore` defines a semaphore signal operation, its first synchronization scope includes acquisition of the image.

Valid Usage

- VUID-vkAcquireNextImageKHR-swapchain-01285
  `swapchain` must not be in the retired state

- VUID-vkAcquireNextImageKHR-semaphore-01286
  If `semaphore` is not VK_NULL_HANDLE, it must be unsignaled

- VUID-vkAcquireNextImageKHR-semaphore-01779
  If `semaphore` is not VK_NULL_HANDLE, it must not have any uncompleted signal or wait operations pending

- VUID-vkAcquireNextImageKHR-fence-01287
  If `fence` is not VK_NULL_HANDLE, `fence` must be unsignaled

- VUID-vkAcquireNextImageKHR-fence-10066
  If `fence` is not VK_NULL_HANDLE, `fence` must not be associated with any other queue command that has not yet completed execution on that queue

- VUID-vkAcquireNextImageKHR-semaphore-01780
  `semaphore` and `fence` must not both be equal to VK_NULL_HANDLE

- VUID-vkAcquireNextImageKHR-surface-07783
  If forward progress cannot be guaranteed for the `surface` used to create the `swapchain` member of `pAcquireInfo`, `timeout` must not be `UINT64_MAX`

- VUID-vkAcquireNextImageKHR-semaphore-03265
  `semaphore` must have a VkSemaphoreType of VK_SEMAPHORE_TYPE_BINARY

Valid Usage (Implicit)

- VUID-vkAcquireNextImageKHR-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkAcquireNextImageKHR-swapchain-parameter
  `swapchain` must be a valid VkSwapchainKHR handle

- VUID-vkAcquireNextImageKHR-semaphore-parameter
  If `semaphore` is not VK_NULL_HANDLE, `semaphore` must be a valid VkSemaphore handle

- VUID-vkAcquireNextImageKHR-fence-parameter
  If `fence` is not VK_NULL_HANDLE, `fence` must be a valid VkFence handle

- VUID-vkAcquireNextImageKHR-pImageIndex-parameter
  `pImageIndex` must be a valid pointer to a `uint32_t` value

- VUID-vkAcquireNextImageKHR-swapchain-parent
  `swapchain` must have been created, allocated, or retrieved from `device`

- VUID-vkAcquireNextImageKHR-semaphore-parent
  If `semaphore` is a valid handle, it must have been created, allocated, or retrieved from `device`

- VUID-vkAcquireNextImageKHR-fence-parent
  If `fence` is a valid handle, it must have been created, allocated, or retrieved from `device`

Host Synchronization

- Host access to `swapchain` must be externally synchronized

- Host access to `semaphore` must be externally synchronized

- Host access to `fence` must be externally synchronized

Return Codes

Success

  - VK_NOT_READY

  - VK_SUBOPTIMAL_KHR

  - VK_SUCCESS

  - VK_TIMEOUT

Failure

  - VK_ERROR_DEVICE_LOST

  - VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT

  - VK_ERROR_OUT_OF_DATE_KHR

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_SURFACE_LOST_KHR

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

If an image is acquired successfully, `vkAcquireNextImageKHR` must either return VK_SUCCESS or VK_SUBOPTIMAL_KHR. The implementation may return VK_SUBOPTIMAL_KHR if the swapchain no longer matches the surface properties exactly, but can still be used for presentation.

When successful, `vkAcquireNextImageKHR` acquires a presentable image from `swapchain` that an application can use, and sets `pImageIndex` to the index of that image within the swapchain. The presentation engine may not have finished reading from the image at the time it is acquired, so the application must use `semaphore` and/or `fence` to ensure that the image layout and contents are not modified until the presentation engine reads have completed. Once `vkAcquireNextImageKHR` successfully acquires an image, the semaphore signal operation referenced by `semaphore`, if not VK_NULL_HANDLE, and the fence signal operation referenced by `fence`, if not VK_NULL_HANDLE, are submitted for execution. If `vkAcquireNextImageKHR` does not successfully acquire an image, `semaphore` and `fence` are unaffected. The order in which images are acquired is implementation-dependent, and may be different than the order the images were presented.

If `timeout` is zero, then `vkAcquireNextImageKHR` does not wait, and will either successfully acquire an image, or fail and return VK_NOT_READY if no image is available.

If the specified timeout period expires before an image is acquired, `vkAcquireNextImageKHR` returns VK_TIMEOUT. If `timeout` is `UINT64_MAX`, the timeout period is treated as infinite, and `vkAcquireNextImageKHR` will block until an image is acquired or an error occurs.

Let S be the number of images in `swapchain`. If `swapchain` is created with VkSwapchainPresentModesCreateInfoKHR, let M be the maximum of the values in VkSurfaceCapabilitiesKHR::`minImageCount` when queried with each present mode in VkSwapchainPresentModesCreateInfoKHR::`pPresentModes` in VkSurfacePresentModeKHR. Otherwise, let M be the value of VkSurfaceCapabilitiesKHR::`minImageCount` without a VkSurfacePresentModeKHR as part of the query input.

`vkAcquireNextImageKHR` should not be called if the number of images that the application has currently acquired is greater than S-M. If `vkAcquireNextImageKHR` is called when the number of images that the application has currently acquired is less than or equal to S-M, `vkAcquireNextImageKHR` must return in finite time with an allowed VkResult code.

Note | Returning a result in finite time guarantees that the implementation cannot deadlock an application, or suspend its execution indefinitely with correct API usage. Acquiring too many images at once may block indefinitely, which is covered by valid usage when attempting to use `UINT64_MAX`. For example, a scenario here is when a compositor holds on to images which are currently being presented, and there are not any vacant images left to be acquired.

If the swapchain images no longer match native surface properties, either VK_SUBOPTIMAL_KHR or VK_ERROR_OUT_OF_DATE_KHR must be returned. If VK_ERROR_OUT_OF_DATE_KHR is returned, no image is acquired and attempts to present previously acquired images to the swapchain will also fail with VK_ERROR_OUT_OF_DATE_KHR. Applications need to create a new swapchain for the surface to continue presenting if VK_ERROR_OUT_OF_DATE_KHR is returned.

Note | VK_SUBOPTIMAL_KHR may happen, for example, if the platform surface has been resized but the platform is able to scale the presented images to the new size to produce valid surface updates. It is up to the application to decide whether it prefers to continue using the current swapchain in this state, or to re-create the swapchain to better match the platform surface properties.

If device loss occurs (see Lost Device) before the timeout has expired, `vkAcquireNextImageKHR` must return in finite time with either one of the allowed success codes, or VK_ERROR_DEVICE_LOST.

If `semaphore` is not VK_NULL_HANDLE, the semaphore must be unsignaled, with no signal or wait operations pending. It will become signaled when the application can use the image.

Note | Use of `semaphore` allows rendering operations to be recorded and submitted before the presentation engine has completed its use of the image.

If `fence` is not equal to VK_NULL_HANDLE, the fence must be unsignaled, with no signal operations pending. It will become signaled when the application can use the image.

Note | Applications should not rely on `vkAcquireNextImageKHR` blocking in order to meter their rendering speed. The implementation may return from this function immediately regardless of how many presentation requests are queued, and regardless of when queued presentation requests will complete relative to the call. Instead, applications can use `fence` to meter their frame generation work to match the presentation rate.

An application must wait until either the `semaphore` or `fence` is signaled before accessing the image’s data.

Note | When the presentable image will be accessed by some stage S, the recommended idiom for ensuring correct synchronization is: The VkSubmitInfo used to submit the image layout transition for execution includes `vkAcquireNextImageKHR`::`semaphore` in its `pWaitSemaphores` member, with the corresponding element of `pWaitDstStageMask` including S. The synchronization command that performs any necessary image layout transition includes S in both the `srcStageMask` and `dstStageMask`.

After a successful return, the image indicated by `pImageIndex` and its data will be unmodified compared to when it was presented.

Note | Exclusive ownership of presentable images corresponding to a swapchain created with VK_SHARING_MODE_EXCLUSIVE as defined in Resource Sharing is not altered by a call to `vkAcquireNextImageKHR`. That means upon the first acquisition from such a swapchain presentable images are not owned by any queue family, while at subsequent acquisitions the presentable images remain owned by the queue family the image was previously presented on.

The possible return values for `vkAcquireNextImageKHR` depend on the `timeout` provided:

- VK_SUCCESS is returned if an image became available.

- VK_ERROR_SURFACE_LOST_KHR is returned if the surface becomes no longer available.

- VK_NOT_READY is returned if `timeout` is zero and no image was available.

- VK_TIMEOUT is returned if `timeout` is greater than zero and less than `UINT64_MAX`, and no image became available within the time allowed.

- VK_SUBOPTIMAL_KHR may be returned if an image became available, and the swapchain no longer matches the surface properties exactly, but can still be used to present to the surface successfully.

Note | This may happen, for example, if the platform surface has been resized but the platform is able to scale the presented images to the new size to produce valid surface updates. It is up to the application to decide whether it prefers to continue using the current swapchain indefinitely or temporarily in this state, or to re-create the swapchain to better match the platform surface properties.

- VK_ERROR_OUT_OF_DATE_KHR is returned if the surface has changed in such a way that it is no longer compatible with the swapchain, and further presentation requests using the swapchain will fail. Applications must query the new surface properties and recreate their swapchain if they wish to continue presenting to the surface.

If the native surface and presented image sizes no longer match, presentation may fail unless the swapchain is created with a non-zero value in VkSwapchainPresentScalingCreateInfoKHR::`scalingBehavior` . If presentation does succeed, the mapping from the presented image to the native surface is defined by the VkSwapchainPresentScalingCreateInfoKHR structure if provided. Otherwise it is implementation-defined. It is the application’s responsibility to detect surface size changes and react appropriately. If presentation fails because of a mismatch in the surface and presented image sizes, a VK_ERROR_OUT_OF_DATE_KHR error will be returned.

Note | For example, consider a 4x3 window/surface that gets resized to be 3x4 (taller than wider). On some window systems, the portion of the window/surface that was previously and still is visible (the 3x3 part) will contain the same contents as before, while the remaining parts of the window will have undefined contents. Other window systems may squash/stretch the image to fill the new window size without any undefined contents, or apply some other mapping.

To acquire an available presentable image to use, and retrieve the index of that image, call:

    // Provided by VK_VERSION_1_1 with VK_KHR_swapchain, VK_KHR_device_group with VK_KHR_swapchain
    VkResult vkAcquireNextImage2KHR(
        VkDevice                                    device,
        const VkAcquireNextImageInfoKHR*            pAcquireInfo,
        uint32_t*                                   pImageIndex);

- `device` is the device associated with `swapchain`.

- `pAcquireInfo` is a pointer to a VkAcquireNextImageInfoKHR structure containing parameters of the acquire.

- `pImageIndex` is a pointer to a `uint32_t` value specifying the index of the next image to use.

If the `swapchain` has been created with the VK_SWAPCHAIN_CREATE_DEFERRED_MEMORY_ALLOCATION_BIT_KHR flag, the image whose index is returned in `pImageIndex` will be fully backed by memory before this call returns to the application.

Valid Usage

- VUID-vkAcquireNextImage2KHR-surface-07784
  If forward progress cannot be guaranteed for the `surface` used to create `swapchain`, the `timeout` member of `pAcquireInfo` must not be `UINT64_MAX`

Valid Usage (Implicit)

- VUID-vkAcquireNextImage2KHR-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkAcquireNextImage2KHR-pAcquireInfo-parameter
  `pAcquireInfo` must be a valid pointer to a valid VkAcquireNextImageInfoKHR structure

- VUID-vkAcquireNextImage2KHR-pImageIndex-parameter
  `pImageIndex` must be a valid pointer to a `uint32_t` value

Return Codes

Success

  - VK_NOT_READY

  - VK_SUBOPTIMAL_KHR

  - VK_SUCCESS

  - VK_TIMEOUT

Failure

  - VK_ERROR_DEVICE_LOST

  - VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT

  - VK_ERROR_OUT_OF_DATE_KHR

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_SURFACE_LOST_KHR

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkAcquireNextImageInfoKHR` structure is defined as:

    // Provided by VK_VERSION_1_1 with VK_KHR_swapchain, VK_KHR_device_group with VK_KHR_swapchain
    typedef struct VkAcquireNextImageInfoKHR {
        VkStructureType    sType;
        const void*        pNext;
        VkSwapchainKHR     swapchain;
        uint64_t           timeout;
        VkSemaphore        semaphore;
        VkFence            fence;
        uint32_t           deviceMask;
    } VkAcquireNextImageInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `swapchain` is a non-retired swapchain from which an image is acquired.

- `timeout` specifies how long the function waits, in nanoseconds, if no image is available.

- `semaphore` is VK_NULL_HANDLE or a semaphore that defines a semaphore signal operation.

- `fence` is VK_NULL_HANDLE or a fence to signal.

- `deviceMask` is a mask of physical devices for which the swapchain image will be ready to use when the semaphore or fence is signaled.

If vkAcquireNextImageKHR is used, the device mask is considered to include all physical devices in the logical device.

Note | vkAcquireNextImage2KHR signals at most one semaphore, even if the application requests waiting for multiple physical devices to be ready via the `deviceMask`. However, only a single physical device can wait on that semaphore, since the semaphore becomes unsignaled when the wait succeeds. For other physical devices to wait for the image to be ready, it is necessary for the application to submit semaphore signal operation(s) to that first physical device to signal additional semaphore(s) after the wait succeeds, which the other physical device(s) can wait upon.

Valid Usage

- VUID-VkAcquireNextImageInfoKHR-swapchain-01675
  `swapchain` must not be in the retired state

- VUID-VkAcquireNextImageInfoKHR-semaphore-01288
  If `semaphore` is not VK_NULL_HANDLE, it must be unsignaled

- VUID-VkAcquireNextImageInfoKHR-semaphore-01781
  If `semaphore` is not VK_NULL_HANDLE, it must not have any uncompleted signal or wait operations pending

- VUID-VkAcquireNextImageInfoKHR-fence-01289
  If `fence` is not VK_NULL_HANDLE, `fence` must be unsignaled

- VUID-VkAcquireNextImageInfoKHR-fence-10067
  If `fence` is not VK_NULL_HANDLE, `fence` must not be associated with any other queue command that has not yet completed execution on that queue

- VUID-VkAcquireNextImageInfoKHR-semaphore-01782
  `semaphore` and `fence` must not both be equal to VK_NULL_HANDLE

- VUID-VkAcquireNextImageInfoKHR-deviceMask-01290
  `deviceMask` must be a valid device mask

- VUID-VkAcquireNextImageInfoKHR-deviceMask-01291
  `deviceMask` must not be zero

- VUID-VkAcquireNextImageInfoKHR-semaphore-03266
  `semaphore` must have a VkSemaphoreType of VK_SEMAPHORE_TYPE_BINARY

Valid Usage (Implicit)

- VUID-VkAcquireNextImageInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHR

- VUID-VkAcquireNextImageInfoKHR-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkAcquireNextImageInfoKHR-swapchain-parameter
  `swapchain` must be a valid VkSwapchainKHR handle

- VUID-VkAcquireNextImageInfoKHR-semaphore-parameter
  If `semaphore` is not VK_NULL_HANDLE, `semaphore` must be a valid VkSemaphore handle

- VUID-VkAcquireNextImageInfoKHR-fence-parameter
  If `fence` is not VK_NULL_HANDLE, `fence` must be a valid VkFence handle

- VUID-VkAcquireNextImageInfoKHR-commonparent
  Each of `fence`, `semaphore`, and `swapchain` that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `swapchain` must be externally synchronized

- Host access to `semaphore` must be externally synchronized

- Host access to `fence` must be externally synchronized

After queueing all rendering commands and transitioning the image to the correct layout, to queue an image for presentation, call:

    // Provided by VK_KHR_swapchain
    VkResult vkQueuePresentKHR(
        VkQueue                                     queue,
        const VkPresentInfoKHR*                     pPresentInfo);

- `queue` is a queue that is capable of presentation to the target surface’s platform on the same device as the image’s swapchain.

- `pPresentInfo` is a pointer to a VkPresentInfoKHR structure specifying parameters of the presentation.

Note | There is no requirement for an application to present images in the same order that they were acquired - applications can arbitrarily present any image that is currently acquired.

Note | The origin of the native orientation of the surface coordinate system is not specified in the Vulkan specification; it depends on the platform. For most platforms the origin is by default upper-left, meaning the pixel of the presented VkImage at coordinates (0,0) would appear at the upper left pixel of the platform surface (assuming VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR, and the display standing the right way up).

The result codes VK_ERROR_OUT_OF_DATE_KHR and VK_SUBOPTIMAL_KHR have the same meaning when returned by `vkQueuePresentKHR` as they do when returned by `vkAcquireNextImageKHR`. If any `swapchain` member of `pPresentInfo` was created with VK_FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT, VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT will be returned if that swapchain does not have exclusive full-screen access, possibly for implementation-specific reasons outside of the application’s control. If multiple swapchains are presented, the result code is determined by applying the following rules in order:

- If the device is lost, VK_ERROR_DEVICE_LOST is returned.

- If any of the target surfaces are no longer available the error VK_ERROR_SURFACE_LOST_KHR is returned.

- If any of the presents would have a result of VK_ERROR_OUT_OF_DATE_KHR if issued separately then VK_ERROR_OUT_OF_DATE_KHR is returned.

- If any of the presents would have a result of VK_ERROR_PRESENT_TIMING_QUEUE_FULL_EXT if issued separately then VK_ERROR_PRESENT_TIMING_QUEUE_FULL_EXT is returned.

- If any of the presents would have a result of VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT if issued separately then VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT is returned.

- If any of the presents would have a result of VK_SUBOPTIMAL_KHR if issued separately then VK_SUBOPTIMAL_KHR is returned.

- Otherwise VK_SUCCESS is returned.

Any writes to memory backing the images referenced by the `pImageIndices` and `pSwapchains` members of `pPresentInfo`, that are available before vkQueuePresentKHR is executed, are automatically made visible to the read access performed by the presentation engine. This automatic visibility operation for an image happens-after the semaphore wait operation, and happens-before the presentation engine accesses the image.

Presentation is a read-only operation that will not affect the content of the presentable images. Upon reacquiring the image and transitioning it away from the VK_IMAGE_LAYOUT_PRESENT_SRC_KHR layout, the contents will be the same as they were prior to transitioning the image to the present source layout and presenting it. However, if a mechanism other than Vulkan is used to modify the platform window associated with the swapchain, the content of all presentable images in the swapchain becomes undefined.

Calls to `vkQueuePresentKHR` may block, but must return in finite time. The processing of the presentation happens in issue order with other queue operations, but semaphores must be used to ensure that prior rendering and other commands in the specified queue complete before the presentation begins. The presentation command itself does not delay processing of subsequent commands on the queue. However, presentation requests sent to a particular queue are always performed in order. Exact presentation timing is controlled by the semantics of the presentation engine and native platform in use.

If an image is presented to a swapchain created from a display surface, the mode of the associated display will be updated, if necessary, to match the mode specified when creating the display surface. The mode switch and presentation of the specified image will be performed as one atomic operation.

Queueing an image for presentation defines a set of queue operations, including waiting on the semaphores and submitting a presentation request to the presentation engine. However, the scope of this set of queue operations does not include the actual processing of the image by the presentation engine.

If `vkQueuePresentKHR` fails to enqueue the corresponding set of queue operations, it may return VK_ERROR_OUT_OF_HOST_MEMORY or VK_ERROR_OUT_OF_DEVICE_MEMORY. If it does, the implementation must ensure that the state and contents of any resources or synchronization primitives referenced is unaffected by the call or its failure.

If `vkQueuePresentKHR` fails in such a way that the implementation is unable to make that guarantee, the implementation must return VK_ERROR_DEVICE_LOST.

However, if the presentation request is rejected by the presentation engine with an error VK_ERROR_OUT_OF_DATE_KHR, VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT, VK_ERROR_PRESENT_TIMING_QUEUE_FULL_EXT, or VK_ERROR_SURFACE_LOST_KHR, the set of queue operations are still considered to be enqueued and thus any semaphore wait operation specified in VkPresentInfoKHR will execute when the corresponding queue operation is complete.

`vkQueuePresentKHR` releases the acquisition of the images referenced by `imageIndices`. The queue family corresponding to the queue `vkQueuePresentKHR` is executed on must have ownership of the presented images as defined in Resource Sharing. `vkQueuePresentKHR` does not alter the queue family ownership, but the presented images must not be used again before they have been reacquired using `vkAcquireNextImageKHR`.

Note | The application can continue to present any acquired images from a retired swapchain as long as the swapchain has not entered a state that causes vkQueuePresentKHR to return VK_ERROR_OUT_OF_DATE_KHR.

Valid Usage

- VUID-vkQueuePresentKHR-pSwapchains-01292
  Each element of `pSwapchains` member of `pPresentInfo` must be a swapchain that is created for a surface for which presentation is supported from `queue` as determined using a call to `vkGetPhysicalDeviceSurfaceSupportKHR`

- VUID-vkQueuePresentKHR-pSwapchains-01293
  If more than one member of `pSwapchains` was created from a display surface, all display surfaces referenced that refer to the same display must use the same display mode

- VUID-vkQueuePresentKHR-pSwapchains-10285
  If more than one member of `pSwapchains` was created from a display surface, all display surfaces referenced that refer to the same display must use the same `stereoType`

- VUID-vkQueuePresentKHR-pWaitSemaphores-01294
  When a semaphore wait operation referring to a binary semaphore defined by the elements of the `pWaitSemaphores` member of `pPresentInfo` executes on `queue`, there must be no other queues waiting on the same semaphore

- VUID-vkQueuePresentKHR-pWaitSemaphores-03267
  All elements of the `pWaitSemaphores` member of `pPresentInfo` must be created with a VkSemaphoreType of VK_SEMAPHORE_TYPE_BINARY

- VUID-vkQueuePresentKHR-pWaitSemaphores-03268
  All elements of the `pWaitSemaphores` member of `pPresentInfo` must reference a semaphore signal operation that has been submitted for execution and any semaphore signal operations on which it depends must have also been submitted for execution

Valid Usage (Implicit)

- VUID-vkQueuePresentKHR-queue-parameter
  `queue` must be a valid VkQueue handle

- VUID-vkQueuePresentKHR-pPresentInfo-parameter
  `pPresentInfo` must be a valid pointer to a valid VkPresentInfoKHR structure

Host Synchronization

- Host access to `queue` must be externally synchronized if it was not created with VK_DEVICE_QUEUE_CREATE_INTERNALLY_SYNCHRONIZED_BIT_KHR

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
- | - | - | Any | -

Return Codes

Success

  - VK_SUBOPTIMAL_KHR

  - VK_SUCCESS

Failure

  - VK_ERROR_DEVICE_LOST

  - VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT

  - VK_ERROR_OUT_OF_DATE_KHR

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_PRESENT_TIMING_QUEUE_FULL_EXT

  - VK_ERROR_SURFACE_LOST_KHR

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkPresentInfoKHR` structure is defined as:

    // Provided by VK_KHR_swapchain
    typedef struct VkPresentInfoKHR {
        VkStructureType          sType;
        const void*              pNext;
        uint32_t                 waitSemaphoreCount;
        const VkSemaphore*       pWaitSemaphores;
        uint32_t                 swapchainCount;
        const VkSwapchainKHR*    pSwapchains;
        const uint32_t*          pImageIndices;
        VkResult*                pResults;
    } VkPresentInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `waitSemaphoreCount` is the number of semaphores to wait for before issuing the present request. The number may be zero.

- `pWaitSemaphores` is `NULL` or a pointer to an array of VkSemaphore objects with `waitSemaphoreCount` entries, and specifies the semaphores to wait for before issuing the present request.

- `swapchainCount` is the number of swapchains being presented to by this command.

- `pSwapchains` is a pointer to an array of VkSwapchainKHR objects with `swapchainCount` entries.

- `pImageIndices` is a pointer to an array of indices into the array of each swapchain’s presentable images, with `swapchainCount` entries. Each entry in this array identifies the image to present on the corresponding entry in the `pSwapchains` array.

- `pResults` is a pointer to an array of VkResult typed elements with `swapchainCount` entries. Applications that do not need per-swapchain results can use `NULL` for `pResults`. If non-`NULL`, each entry in `pResults` will be set to the VkResult for presenting the swapchain corresponding to the same index in `pSwapchains`.

Before an application can present an image, the image’s layout must be transitioned to the VK_IMAGE_LAYOUT_PRESENT_SRC_KHR layout, or for a shared presentable image the VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR layout.

Note | When transitioning the image to the appropriate layout, there is no need to delay subsequent processing, or perform any visibility operations (as vkQueuePresentKHR performs automatic visibility operations). To achieve this, the `dstAccessMask` member of the VkImageMemoryBarrier should be `0`, and the `dstStageMask` parameter should be VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT.

The second synchronization scope of each semaphore wait operation defined by this structure includes presentation of each image indicated by `pSwapchains` and `pImageIndices`.

Valid Usage

- VUID-VkPresentInfoKHR-pSwapchain-09231
  Elements of `pSwapchain` must be unique

- VUID-VkPresentInfoKHR-pImageIndices-01430
  Each element of `pImageIndices` must be the index of a presentable image acquired from the swapchain specified by the corresponding element of the `pSwapchains` array, and the presented image subresource must be in the VK_IMAGE_LAYOUT_PRESENT_SRC_KHR or VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR layout at the time the operation is executed on a `VkDevice`

- VUID-VkPresentInfoKHR-pNext-06235
  If a VkPresentIdKHR structure is included in the `pNext` chain, and the `presentId` feature is not enabled, each `presentIds` entry in that structure must be NULL

- VUID-VkPresentInfoKHR-swapchainMaintenance1-10158
  If the `swapchainMaintenance1` feature is not enabled, then the `pNext` chain must not include a VkSwapchainPresentFenceInfoKHR structure

- VUID-VkPresentInfoKHR-pSwapchains-09199
  If any element of the `pSwapchains` array has been created with VkSwapchainPresentModesCreateInfoKHR, all of the elements of this array must be created with VkSwapchainPresentModesCreateInfoKHR

- VUID-VkPresentInfoKHR-pNext-09759
  If the `pNext` chain of this structure includes a VkFrameBoundaryTensorsARM structure then it must also include a VkFrameBoundaryEXT structure

- VUID-VkPresentInfoKHR-pNext-10821
  If a VkPresentId2KHR structure is included in the `pNext` chain, and the `presentId2` feature is not enabled, each `presentIds` entry in that structure must be zero

- VUID-VkPresentInfoKHR-presentId2Supported-10822
  If a VkPresentId2KHR structure is included and contains non-zero presentIds, `presentId2Supported` must be VK_TRUE in the VkSurfaceCapabilitiesPresentId2KHR structure returned by vkGetPhysicalDeviceSurfaceCapabilities2KHR for the `surface`

Valid Usage (Implicit)

- VUID-VkPresentInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PRESENT_INFO_KHR

- VUID-VkPresentInfoKHR-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkDeviceGroupPresentInfoKHR, VkDisplayPresentInfoKHR, VkFrameBoundaryEXT, VkFrameBoundaryTensorsARM, VkPresentFrameTokenGGP, VkPresentId2KHR, VkPresentIdKHR, VkPresentRegionsKHR, VkPresentTimesInfoGOOGLE, VkPresentTimingsInfoEXT, VkSetPresentConfigNV, VkSwapchainPresentFenceInfoKHR, or VkSwapchainPresentModeInfoKHR

- VUID-VkPresentInfoKHR-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkPresentInfoKHR-pWaitSemaphores-parameter
  If `waitSemaphoreCount` is not `0`, `pWaitSemaphores` must be a valid pointer to an array of `waitSemaphoreCount` valid VkSemaphore handles

- VUID-VkPresentInfoKHR-pSwapchains-parameter
  `pSwapchains` must be a valid pointer to an array of `swapchainCount` valid VkSwapchainKHR handles

- VUID-VkPresentInfoKHR-pImageIndices-parameter
  `pImageIndices` must be a valid pointer to an array of `swapchainCount` `uint32_t` values

- VUID-VkPresentInfoKHR-pResults-parameter
  If `pResults` is not `NULL`, `pResults` must be a valid pointer to an array of `swapchainCount` VkResult values

- VUID-VkPresentInfoKHR-swapchainCount-arraylength
  `swapchainCount` must be greater than `0`

- VUID-VkPresentInfoKHR-commonparent
  Both of the elements of `pSwapchains`, and the elements of `pWaitSemaphores` that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to each member of `pWaitSemaphores` must be externally synchronized

- Host access to each member of `pSwapchains` must be externally synchronized

When the `VK_KHR_incremental_present` extension is enabled, additional fields can be specified that allow an application to specify that only certain rectangular regions of the presentable images of a swapchain are changed. This is an optimization hint that a presentation engine may use to only update the region of a surface that is actually changing. The application still must ensure that all pixels of a presented image contain the desired values, in case the presentation engine ignores this hint. An application can provide this hint by adding a `VkPresentRegionsKHR` structure to the `pNext` chain of the `VkPresentInfoKHR` structure.

The `VkPresentRegionsKHR` structure is defined as:

    // Provided by VK_KHR_incremental_present
    typedef struct VkPresentRegionsKHR {
        VkStructureType              sType;
        const void*                  pNext;
        uint32_t                     swapchainCount;
        const VkPresentRegionKHR*    pRegions;
    } VkPresentRegionsKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `swapchainCount` is the number of swapchains being presented to by this command.

- `pRegions` is `NULL` or a pointer to an array of `VkPresentRegionKHR` elements with `swapchainCount` entries. If not `NULL`, each element of `pRegions` contains the region that has changed since the last present to the swapchain in the corresponding entry in the `VkPresentInfoKHR`::`pSwapchains` array.

Valid Usage

- VUID-VkPresentRegionsKHR-swapchainCount-01260
  `swapchainCount` must be the same value as `VkPresentInfoKHR`::`swapchainCount`, where `VkPresentInfoKHR` is included in the `pNext` chain of this `VkPresentRegionsKHR` structure

Valid Usage (Implicit)

- VUID-VkPresentRegionsKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR

- VUID-VkPresentRegionsKHR-pRegions-parameter
  If `pRegions` is not `NULL`, `pRegions` must be a valid pointer to an array of `swapchainCount` valid VkPresentRegionKHR structures

- VUID-VkPresentRegionsKHR-swapchainCount-arraylength
  `swapchainCount` must be greater than `0`

Structure Chaining

Extends the structure

  - VkPresentInfoKHR

For a given image and swapchain, the region to present is specified by the `VkPresentRegionKHR` structure, which is defined as:

    // Provided by VK_KHR_incremental_present
    typedef struct VkPresentRegionKHR {
        uint32_t                 rectangleCount;
        const VkRectLayerKHR*    pRectangles;
    } VkPresentRegionKHR;

- `rectangleCount` is the number of rectangles in `pRectangles`, or zero if the entire image has changed and should be presented.

- `pRectangles` is either `NULL` or a pointer to an array of `VkRectLayerKHR` structures. The `VkRectLayerKHR` structure is the framebuffer coordinates, plus layer, of a portion of a presentable image that has changed and must be presented. If non-`NULL`, each entry in `pRectangles` is a rectangle of the given image that has changed since the last image was presented to the given swapchain. The rectangles must be specified relative to VkSurfaceCapabilitiesKHR::`currentTransform`, regardless of the swapchain’s `preTransform`. The presentation engine will apply the `preTransform` transformation to the rectangles, along with any further transformation it applies to the image content.

Valid Usage (Implicit)

- VUID-VkPresentRegionKHR-pRectangles-parameter
  If `rectangleCount` is not `0`, and `pRectangles` is not `NULL`, `pRectangles` must be a valid pointer to an array of `rectangleCount` valid VkRectLayerKHR structures

The `VkRectLayerKHR` structure is defined as:

    // Provided by VK_KHR_incremental_present
    typedef struct VkRectLayerKHR {
        VkOffset2D    offset;
        VkExtent2D    extent;
        uint32_t      layer;
    } VkRectLayerKHR;

- `offset` is the origin of the rectangle, in pixels.

- `extent` is the size of the rectangle, in pixels.

- `layer` is the layer of the image. For images with only one layer, the value of `layer` must be 0.

Some platforms allow the size of a surface to change, and then scale the pixels of the image to fit the surface. `VkRectLayerKHR` specifies pixels of the swapchain’s image(s), which will be constant for the life of the swapchain.

Valid Usage

- VUID-VkRectLayerKHR-offset-04864
  The sum of `offset` and `extent`, after being transformed according to the `preTransform` member of the VkSwapchainCreateInfoKHR structure, must be no greater than the `imageExtent` member of the VkSwapchainCreateInfoKHR structure passed to vkCreateSwapchainKHR

- VUID-VkRectLayerKHR-layer-01262
  `layer` must be less than the `imageArrayLayers` member of the VkSwapchainCreateInfoKHR structure passed to vkCreateSwapchainKHR

When the `VK_KHR_display_swapchain` extension is enabled, additional fields can be specified when presenting an image to a swapchain by setting VkPresentInfoKHR::`pNext` to point to a VkDisplayPresentInfoKHR structure.

The `VkDisplayPresentInfoKHR` structure is defined as:

    // Provided by VK_KHR_display_swapchain
    typedef struct VkDisplayPresentInfoKHR {
        VkStructureType    sType;
        const void*        pNext;
        VkRect2D           srcRect;
        VkRect2D           dstRect;
        VkBool32           persistent;
    } VkDisplayPresentInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `srcRect` is a rectangular region of pixels to present. It must be a subset of the image being presented. If `VkDisplayPresentInfoKHR` is not specified, this region will be assumed to be the entire presentable image.

- `dstRect` is a rectangular region within the visible region of the swapchain’s display mode. If `VkDisplayPresentInfoKHR` is not specified, this region will be assumed to be the entire visible region of the swapchain’s mode. If the specified rectangle is a subset of the display mode’s visible region, content from display planes below the swapchain’s plane will be visible outside the rectangle. If there are no planes below the swapchain’s, the area outside the specified rectangle will be black. If portions of the specified rectangle are outside of the display’s visible region, pixels mapping only to those portions of the rectangle will be discarded.

- `persistent`: If this is VK_TRUE, the display engine will enable buffered mode on displays that support it. This allows the display engine to stop sending content to the display until a new image is presented. The display will instead maintain a copy of the last presented image. This allows less power to be used, but may increase presentation latency. If `VkDisplayPresentInfoKHR` is not specified, persistent mode will not be used.

If the extent of the `srcRect` and `dstRect` are not equal, the presented pixels will be scaled accordingly.

Valid Usage

- VUID-VkDisplayPresentInfoKHR-srcRect-01257
  `srcRect` must specify a rectangular region that is a subset of the image being presented

- VUID-VkDisplayPresentInfoKHR-dstRect-01258
  `dstRect` must specify a rectangular region that is a subset of the `visibleRegion` parameter of the display mode the swapchain being presented uses

- VUID-VkDisplayPresentInfoKHR-persistentContent-01259
  If the `persistentContent` member of the `VkDisplayPropertiesKHR` structure returned by `vkGetPhysicalDeviceDisplayPropertiesKHR` for the display the present operation targets is VK_FALSE, then `persistent` must be VK_FALSE

Valid Usage (Implicit)

- VUID-VkDisplayPresentInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHR

Structure Chaining

Extends the structure

  - VkPresentInfoKHR

If the `pNext` chain of VkPresentInfoKHR includes a `VkDeviceGroupPresentInfoKHR` structure, then that structure includes an array of device masks and a device group present mode.

The `VkDeviceGroupPresentInfoKHR` structure is defined as:

    // Provided by VK_VERSION_1_1 with VK_KHR_swapchain, VK_KHR_device_group with VK_KHR_swapchain
    typedef struct VkDeviceGroupPresentInfoKHR {
        VkStructureType                        sType;
        const void*                            pNext;
        uint32_t                               swapchainCount;
        const uint32_t*                        pDeviceMasks;
        VkDeviceGroupPresentModeFlagBitsKHR    mode;
    } VkDeviceGroupPresentInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `swapchainCount` is zero or the number of elements in `pDeviceMasks`.

- `pDeviceMasks` is a pointer to an array of device masks, one for each element of VkPresentInfoKHR::`pSwapchains`.

- `mode` is a VkDeviceGroupPresentModeFlagBitsKHR value specifying the device group present mode that will be used for this present.

If `mode` is VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHR, then each element of `pDeviceMasks` selects which instance of the swapchain image is presented. Each element of `pDeviceMasks` must have exactly one bit set, and the corresponding physical device must have a presentation engine as reported by VkDeviceGroupPresentCapabilitiesKHR.

If `mode` is VK_DEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHR, then each element of `pDeviceMasks` selects which instance of the swapchain image is presented. Each element of `pDeviceMasks` must have exactly one bit set, and some physical device in the logical device must include that bit in its VkDeviceGroupPresentCapabilitiesKHR::`presentMask`.

If `mode` is VK_DEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHR, then each element of `pDeviceMasks` selects which instances of the swapchain image are component-wise summed and the sum of those images is presented. If the sum in any component is outside the representable range, the value of that component is undefined. Each element of `pDeviceMasks` must have a value for which all set bits are set in one of the elements of VkDeviceGroupPresentCapabilitiesKHR::`presentMask`.

If `mode` is VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHR, then each element of `pDeviceMasks` selects which instance(s) of the swapchain images are presented. For each bit set in each element of `pDeviceMasks`, the corresponding physical device must have a presentation engine as reported by VkDeviceGroupPresentCapabilitiesKHR.

If `VkDeviceGroupPresentInfoKHR` is not provided or `swapchainCount` is zero then the masks are considered to be `1`. If `VkDeviceGroupPresentInfoKHR` is not provided, `mode` is considered to be VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHR.

Valid Usage

- VUID-VkDeviceGroupPresentInfoKHR-swapchainCount-01297
  `swapchainCount` must equal `0` or VkPresentInfoKHR::`swapchainCount`

- VUID-VkDeviceGroupPresentInfoKHR-mode-01298
  If `mode` is VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHR, then each element of `pDeviceMasks` must have exactly one bit set, and the corresponding element of VkDeviceGroupPresentCapabilitiesKHR::`presentMask` must be non-zero

- VUID-VkDeviceGroupPresentInfoKHR-mode-01299
  If `mode` is VK_DEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHR, then each element of `pDeviceMasks` must have exactly one bit set, and some physical device in the logical device must include that bit in its VkDeviceGroupPresentCapabilitiesKHR::`presentMask`

- VUID-VkDeviceGroupPresentInfoKHR-mode-01300
  If `mode` is VK_DEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHR, then each element of `pDeviceMasks` must have a value for which all set bits are set in one of the elements of VkDeviceGroupPresentCapabilitiesKHR::`presentMask`

- VUID-VkDeviceGroupPresentInfoKHR-mode-01301
  If `mode` is VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHR, then for each bit set in each element of `pDeviceMasks`, the corresponding element of VkDeviceGroupPresentCapabilitiesKHR::`presentMask` must be non-zero

- VUID-VkDeviceGroupPresentInfoKHR-pDeviceMasks-01302
  The value of each element of `pDeviceMasks` must be equal to the device mask passed in VkAcquireNextImageInfoKHR::`deviceMask` when the image index was last acquired

- VUID-VkDeviceGroupPresentInfoKHR-mode-01303
  `mode` must have exactly one bit set, and that bit must have been included in VkDeviceGroupSwapchainCreateInfoKHR::`modes`

Valid Usage (Implicit)

- VUID-VkDeviceGroupPresentInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHR

- VUID-VkDeviceGroupPresentInfoKHR-pDeviceMasks-parameter
  If `swapchainCount` is not `0`, `pDeviceMasks` must be a valid pointer to an array of `swapchainCount` `uint32_t` values

- VUID-VkDeviceGroupPresentInfoKHR-mode-parameter
  `mode` must be a valid VkDeviceGroupPresentModeFlagBitsKHR value

Structure Chaining

Extends the structure

  - VkPresentInfoKHR

When the `presentAtAbsoluteTime` or `presentAtRelativeTime` feature is enabled, an application can instruct the presentation engine to attempt to display an image at a specified time, or for a minimum duration, by including the `VkPresentTimingsInfoEXT` structure in the `pNext` chain of the VkPresentInfoKHR structure.

The `VkPresentTimingsInfoEXT` structure is defined as:

    // Provided by VK_EXT_present_timing
    typedef struct VkPresentTimingsInfoEXT {
        VkStructureType                  sType;
        const void*                      pNext;
        uint32_t                         swapchainCount;
        const VkPresentTimingInfoEXT*    pTimingInfos;
    } VkPresentTimingsInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `swapchainCount` is the number of swapchains being presented to by this command.

- `pTimingInfos` is `NULL` or a pointer to an array of `VkPresentTimingInfoEXT` elements with `swapchainCount` entries. If not `NULL`, each element of `pTimingInfos` contains timing information for the presentation of the image corresponding to the entry in the `VkPresentInfoKHR`::`pImageIndices` array.

Valid Usage

- VUID-VkPresentTimingsInfoEXT-swapchainCount-12233
  `swapchainCount` must be equal to VkPresentInfoKHR::`swapchainCount`

- VUID-VkPresentTimingsInfoEXT-pSwapchains-12234
  All swapchains in VkPresentInfoKHR::`pSwapchains` must have been created with the VkSwapchainCreateInfoKHR::`flags` field containing VK_SWAPCHAIN_CREATE_PRESENT_TIMING_BIT_EXT

- VUID-VkPresentTimingsInfoEXT-pSwapchains-12235
  For each member of `VkPresentInfoKHR`::`pSwapchains`, if the associated VkPresentTimingInfoEXT::`targetTime` is not zero, the swapchain’s current present mode must be VK_PRESENT_MODE_FIFO_LATEST_READY_KHR, VK_PRESENT_MODE_FIFO_KHR or VK_PRESENT_MODE_FIFO_RELAXED_KHR

Valid Usage (Implicit)

- VUID-VkPresentTimingsInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PRESENT_TIMINGS_INFO_EXT

- VUID-VkPresentTimingsInfoEXT-pTimingInfos-parameter
  If `pTimingInfos` is not `NULL`, `pTimingInfos` must be a valid pointer to an array of `swapchainCount` valid VkPresentTimingInfoEXT structures

- VUID-VkPresentTimingsInfoEXT-swapchainCount-arraylength
  `swapchainCount` must be greater than `0`

Structure Chaining

Extends the structure

  - VkPresentInfoKHR

The `VkPresentTimingInfoEXT` structure is defined as:

    // Provided by VK_EXT_present_timing
    typedef struct VkPresentTimingInfoEXT {
        VkStructureType                sType;
        const void*                    pNext;
        VkPresentTimingInfoFlagsEXT    flags;
        uint64_t                       targetTime;
        uint64_t                       timeDomainId;
        VkPresentStageFlagsEXT         presentStageQueries;
        VkPresentStageFlagsEXT         targetTimeDomainPresentStage;
    } VkPresentTimingInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask of VkPresentTimingInfoFlagBitsEXT specifying options for how to interpret the timing information.

- `targetTime` is zero or a value specifying the target present time or duration, in nanoseconds, of the presentation request.

- `timeDomainId` is the id of the time domain used to specify the absolute target present time and the timing results obtained in a subsequent vkGetPastPresentationTimingEXT call for the current presentation request.

- `presentStageQueries` is zero or a valid VkPresentStageFlagsEXT value indicating which present stages the presentation engine will collect timing information for.

- `targetTimeDomainPresentStage` is a valid VkPresentStageFlagsEXT specifying a single present stage used to interpret `targetTime`.

If `targetTime` is not zero, the implementation attempts to align the VK_PRESENT_STAGE_IMAGE_FIRST_PIXEL_VISIBLE_BIT_EXT present stage of that presentation request with the time specified in `targetTime` according to the time domain used. If VK_PRESENT_TIMING_INFO_PRESENT_AT_NEAREST_REFRESH_CYCLE_BIT_EXT is not set in `flags`, it indicates that the application would strictly prefer the image to not be visible before `targetTime` has lapsed.

If `targetTime` is not zero and `timeDomainId` is associated with a VK_TIME_DOMAIN_PRESENT_STAGE_LOCAL_EXT time domain, `targetTimeDomainPresentStage` is used to specify which present stage’s time domain `targetTime` is specified for. Otherwise, `targetTimeDomainPresentStage` is ignored.

If `presentStageQueries` is not zero, a slot in the swapchain’s internal results queue is reserved to hold the requested present timing data until the application retrieves them. If no slots are available, or if vkSetSwapchainPresentTimingQueueSizeEXT was never called, presentation fails and returns VK_ERROR_PRESENT_TIMING_QUEUE_FULL_EXT.

Note | Some platforms, due to hardware or system limitations, may not be able to accurately time `targetTime` with the actual physical event of the image becoming visible on the display. However, those timing capabilities may still be useful and result in improved animation quality. As such, the `presentAtAbsoluteTime` and `presentAtRelativeTime` features do not provide a strict guarantee regarding the completion of the VK_PRESENT_STAGE_IMAGE_FIRST_PIXEL_VISIBLE_BIT_EXT present stage relative to the `targetTime`, and implementations must strive to make it as consistent and accurate as possible.

Note | Applications that specify an absolute present time should regularly rebase their calculations for their next target time on the feedback from vkGetPastPresentationTimingEXT to compensate for accumulated precision errors or potential clock drift. It is recommended that when targeting the time of a vertical blanking period, applications set VK_PRESENT_TIMING_INFO_PRESENT_AT_NEAREST_REFRESH_CYCLE_BIT_EXT to allow the implementation to compensate for small precision errors that may cause an image to be displayed one refresh cycle later than intended. Some implementations may not provide timing data for the VK_PRESENT_STAGE_IMAGE_FIRST_PIXEL_VISIBLE_BIT_EXT present stage. Applications should use the supported present stage nearest to it to compute a desired target presentation time.

Valid Usage

- VUID-VkPresentTimingInfoEXT-targetTime-12236
  If `targetTime` is not zero and `flags` does not contain VK_PRESENT_TIMING_INFO_PRESENT_AT_RELATIVE_TIME_BIT_EXT, the `presentAtAbsoluteTime` feature must be enabled and the `presentAtAbsoluteTimeSupported` member of the `VkPresentTimingSurfaceCapabilitiesEXT` returned by `vkGetPhysicalDeviceSurfaceCapabilities2KHR` for the surface associated with the swapchain must be VK_TRUE

- VUID-VkPresentTimingInfoEXT-targetTime-12237
  If `targetTime` is not zero and `flags` contains VK_PRESENT_TIMING_INFO_PRESENT_AT_RELATIVE_TIME_BIT_EXT, the `presentAtRelativeTime` feature must be enabled and the `presentAtRelativeTimeSupported` member of the `VkPresentTimingSurfaceCapabilitiesEXT` returned by `vkGetPhysicalDeviceSurfaceCapabilities2KHR` for the surface associated with the swapchain must be VK_TRUE

- VUID-VkPresentTimingInfoEXT-timeDomainId-12238
  If `timeDomainId` is associated with a VK_TIME_DOMAIN_PRESENT_STAGE_LOCAL_EXT time domain, and `targetTime` is not zero, `targetTimeDomainPresentStage` must be a single `VkPresentStageFlagsEXT` value

- VUID-VkPresentTimingInfoEXT-timeDomainId-12400
  `timeDomainId` must be an id previously returned by vkGetSwapchainTimeDomainPropertiesEXT

Valid Usage (Implicit)

- VUID-VkPresentTimingInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PRESENT_TIMING_INFO_EXT

- VUID-VkPresentTimingInfoEXT-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkPresentTimingInfoEXT-flags-parameter
  `flags` must be a valid combination of VkPresentTimingInfoFlagBitsEXT values

- VUID-VkPresentTimingInfoEXT-presentStageQueries-parameter
  `presentStageQueries` must be a valid combination of VkPresentStageFlagBitsEXT values

- VUID-VkPresentTimingInfoEXT-targetTimeDomainPresentStage-parameter
  `targetTimeDomainPresentStage` must be a valid combination of VkPresentStageFlagBitsEXT values

Bits which can be set in VkPresentTimingInfoEXT::`flags`, specifying options for how to interpret timing information:

    // Provided by VK_EXT_present_timing
    typedef enum VkPresentTimingInfoFlagBitsEXT {
        VK_PRESENT_TIMING_INFO_PRESENT_AT_RELATIVE_TIME_BIT_EXT = 0x00000001,
        VK_PRESENT_TIMING_INFO_PRESENT_AT_NEAREST_REFRESH_CYCLE_BIT_EXT = 0x00000002,
    } VkPresentTimingInfoFlagBitsEXT;

- VK_PRESENT_TIMING_INFO_PRESENT_AT_RELATIVE_TIME_BIT_EXT specifies that `VkPresentTimingInfoEXT`::`targetTime` is to be interpreted as a relative time from the previous presentation’s VK_PRESENT_STAGE_IMAGE_FIRST_PIXEL_VISIBLE_BIT_EXT stage. If the `swapchain` has never been used to present an image, the provided `targetTime` is ignored.

- VK_PRESENT_TIMING_INFO_PRESENT_AT_NEAREST_REFRESH_CYCLE_BIT_EXT specifies that the application would prefer the image to be presented earlier than the time specified in `VkPresentTimingInfoEXT`::`targetTime` if that time falls within the first half of a refresh cycle. In that case, the presentation engine may choose to display the image at the start of that refresh cycle.

    // Provided by VK_EXT_present_timing
    typedef VkFlags VkPresentTimingInfoFlagsEXT;

`VkPresentTimingInfoFlagsEXT` is a bitmask type for setting a mask of zero or more VkPresentTimingInfoFlagBitsEXT.

Presenting an image to the user typically involves multiple stages. Bits which can be set to specify present stages are:

    // Provided by VK_EXT_present_timing
    typedef enum VkPresentStageFlagBitsEXT {
        VK_PRESENT_STAGE_QUEUE_OPERATIONS_END_BIT_EXT = 0x00000001,
        VK_PRESENT_STAGE_REQUEST_DEQUEUED_BIT_EXT = 0x00000002,
        VK_PRESENT_STAGE_IMAGE_FIRST_PIXEL_OUT_BIT_EXT = 0x00000004,
        VK_PRESENT_STAGE_IMAGE_FIRST_PIXEL_VISIBLE_BIT_EXT = 0x00000008,
    } VkPresentStageFlagBitsEXT;

- VK_PRESENT_STAGE_QUEUE_OPERATIONS_END_BIT_EXT marks the end of the set of queue operations enqueued by vkQueuePresentKHR on the provided `VkQueue` for a presentation request.

- VK_PRESENT_STAGE_REQUEST_DEQUEUED_BIT_EXT is the stage after which the presentation request has been dequeued from the swapchain’s internal presentation request queue, if any, as specified by the present mode associated with that request.

- VK_PRESENT_STAGE_IMAGE_FIRST_PIXEL_OUT_BIT_EXT is the stage after which data for the first pixel of the presentation request associated with the image has left the presentation engine for a display hardware.

- VK_PRESENT_STAGE_IMAGE_FIRST_PIXEL_VISIBLE_BIT_EXT is the stage after which a display hardware has made the first pixel visible for the presentation request associated with the image to be presented.

Note | The set of queue operations delimited by VK_PRESENT_STAGE_QUEUE_OPERATIONS_END_BIT_EXT includes the wait for the semaphores specified in VkPresentInfoKHR::`pWaitSemaphores`, if any, and any work implicitly enqueued by the implementation.

    // Provided by VK_EXT_present_timing
    typedef VkFlags VkPresentStageFlagsEXT;

`VkPresentStageFlagsEXT` is a bitmask type for setting a mask of zero or more VkPresentStageFlagBitsEXT.

When the `VK_GOOGLE_display_timing` extension is enabled, additional fields can be specified that allow an application to specify the earliest time that an image should be displayed. This allows an application to avoid stutter that is caused by an image being displayed earlier than planned. Such stuttering can occur with both fixed and variable-refresh-rate displays, because stuttering occurs when the geometry is not correctly positioned for when the image is displayed. An application can instruct the presentation engine that an image should not be displayed earlier than a specified time by adding a `VkPresentTimesInfoGOOGLE` structure to the `pNext` chain of the `VkPresentInfoKHR` structure.

The `VkPresentTimesInfoGOOGLE` structure is defined as:

    // Provided by VK_GOOGLE_display_timing
    typedef struct VkPresentTimesInfoGOOGLE {
        VkStructureType               sType;
        const void*                   pNext;
        uint32_t                      swapchainCount;
        const VkPresentTimeGOOGLE*    pTimes;
    } VkPresentTimesInfoGOOGLE;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `swapchainCount` is the number of swapchains being presented to by this command.

- `pTimes` is `NULL` or a pointer to an array of `VkPresentTimeGOOGLE` elements with `swapchainCount` entries. If not `NULL`, each element of `pTimes` contains the earliest time to present the image corresponding to the entry in the `VkPresentInfoKHR`::`pImageIndices` array.

Valid Usage

- VUID-VkPresentTimesInfoGOOGLE-swapchainCount-01247
  `swapchainCount` must be the same value as `VkPresentInfoKHR`::`swapchainCount`, where `VkPresentInfoKHR` is included in the `pNext` chain of this `VkPresentTimesInfoGOOGLE` structure

Valid Usage (Implicit)

- VUID-VkPresentTimesInfoGOOGLE-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PRESENT_TIMES_INFO_GOOGLE

- VUID-VkPresentTimesInfoGOOGLE-pTimes-parameter
  If `pTimes` is not `NULL`, `pTimes` must be a valid pointer to an array of `swapchainCount` VkPresentTimeGOOGLE structures

- VUID-VkPresentTimesInfoGOOGLE-swapchainCount-arraylength
  `swapchainCount` must be greater than `0`

Structure Chaining

Extends the structure

  - VkPresentInfoKHR

The `VkPresentTimeGOOGLE` structure is defined as:

    // Provided by VK_GOOGLE_display_timing
    typedef struct VkPresentTimeGOOGLE {
        uint32_t    presentID;
        uint64_t    desiredPresentTime;
    } VkPresentTimeGOOGLE;

- `presentID` is an application-provided identification value, that can be used with the results of vkGetPastPresentationTimingGOOGLE, in order to uniquely identify this present. In order to be useful to the application, it should be unique within some period of time that is meaningful to the application.

- `desiredPresentTime` specifies that the image given should not be displayed to the user any earlier than this time. `desiredPresentTime` is a time in nanoseconds, relative to a monotonically-increasing clock (e.g. `CLOCK_MONOTONIC` (see clock_gettime(2)) on Android and Linux). A value of zero specifies that the presentation engine may display the image at any time. This is useful when the application desires to provide `presentID`, but does not need a specific `desiredPresentTime`.

The `VkPresentIdKHR` structure is defined as:

    // Provided by VK_KHR_present_id
    typedef struct VkPresentIdKHR {
        VkStructureType    sType;
        const void*        pNext;
        uint32_t           swapchainCount;
        const uint64_t*    pPresentIds;
    } VkPresentIdKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `swapchainCount` is the number of swapchains being presented to the vkQueuePresentKHR command.

- `pPresentIds` is `NULL` or a pointer to an array of `uint64_t` with `swapchainCount` entries. If not `NULL`, each non-zero value in `pPresentIds` specifies the present id to be associated with the presentation of the swapchain with the same index in the vkQueuePresentKHR call.

For applications to be able to reference specific presentation events queued by a call to vkQueuePresentKHR, an identifier needs to be associated with them. When the `presentId` feature is enabled, applications can include the `VkPresentIdKHR` structure in the `pNext` chain of the VkPresentInfoKHR structure to supply identifiers.

Each VkSwapchainKHR has a presentId associated with it. This value is initially zero when the `VkSwapchainKHR` is created.

When a `VkPresentIdKHR` structure with a non-NULL `pPresentIds` is included in the `pNext` chain of a VkPresentInfoKHR structure, each `pSwapchains` entry has a presentId associated in the `pPresentIds` array at the same index as the swapchain in the `pSwapchains` array. If this presentId is non-zero, then the application can later use this value to refer to that image presentation. A value of zero indicates that this presentation has no associated presentId. A non-zero presentId must be greater than any non-zero presentId passed previously by the application for the same swapchain.

There is no requirement for any precise timing relationship between the presentation of the image to the user and the update of the presentId value, but implementations should make this as close as possible to the presentation of the first pixel in the new image to the user.

Valid Usage

- VUID-VkPresentIdKHR-swapchainCount-04998
  `swapchainCount` must be the same value as VkPresentInfoKHR::`swapchainCount`, where this `VkPresentIdKHR` is in the `pNext` chain of the VkPresentInfoKHR structure

- VUID-VkPresentIdKHR-presentIds-04999
  Each non-zero entry in `presentIds` must be greater than all previously submitted present ids for the associated swapchain in VkPresentInfoKHR::`pSwapchains`

Valid Usage (Implicit)

- VUID-VkPresentIdKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PRESENT_ID_KHR

- VUID-VkPresentIdKHR-pPresentIds-parameter
  If `pPresentIds` is not `NULL`, `pPresentIds` must be a valid pointer to an array of `swapchainCount` `uint64_t` values

- VUID-VkPresentIdKHR-swapchainCount-arraylength
  `swapchainCount` must be greater than `0`

Structure Chaining

Extends the structure

  - VkPresentInfoKHR

When the `presentWait` feature is enabled, an application can wait for an image to be presented to the user by first specifying a presentId for the target presentation by adding a VkPresentIdKHR structure to the `pNext` chain of the VkPresentInfoKHR structure and then waiting for that presentation to complete by calling:

    // Provided by VK_KHR_present_wait
    VkResult vkWaitForPresentKHR(
        VkDevice                                    device,
        VkSwapchainKHR                              swapchain,
        uint64_t                                    presentId,
        uint64_t                                    timeout);

- `device` is the device associated with `swapchain`.

- `swapchain` is the non-retired swapchain on which an image was queued for presentation.

- `presentId` is the presentation presentId to wait for.

- `timeout` is the timeout period in units of nanoseconds. `timeout` is adjusted to the closest value allowed by the implementation-dependent timeout accuracy, which may be substantially longer than one nanosecond, and may be longer than the requested period.

The call to `vkWaitForPresentKHR` will block until either the presentId associated with `swapchain` is greater than or equal to `presentId`, or `timeout` nanoseconds passes. When the swapchain becomes OUT_OF_DATE, the call will either return VK_SUCCESS (if the image was delivered to the presentation engine and may have been presented to the user) or will return early with status VK_ERROR_OUT_OF_DATE_KHR (if the image could not be presented to the user).

There is no requirement for any precise timing relationship between the presentation of the image to the user and the update of the presentId value, but implementations should make this as close as possible to the presentation of the first pixel in the next image being presented to the user.

For VK_PRESENT_MODE_MAILBOX_KHR (or other present mode where images may be replaced in the presentation queue) any wait of this type associated with such an image must be signaled no later than a wait associated with the replacing image would be signaled.

As an exception to the normal rules for objects which are externally synchronized, the `swapchain` passed to `vkWaitForPresentKHR` may be simultaneously used by other threads in calls to functions other than vkDestroySwapchainKHR. Access to the swapchain data associated with this extension must be atomic within the implementation.

Valid Usage

- VUID-vkWaitForPresentKHR-swapchain-04997
  `swapchain` must not be in the retired state

- VUID-vkWaitForPresentKHR-presentWait-06234
  The `presentWait` feature must be enabled

Valid Usage (Implicit)

- VUID-vkWaitForPresentKHR-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkWaitForPresentKHR-swapchain-parameter
  `swapchain` must be a valid VkSwapchainKHR handle

- VUID-vkWaitForPresentKHR-swapchain-parent
  `swapchain` must have been created, allocated, or retrieved from `device`

Host Synchronization

- Host access to `swapchain` must be externally synchronized

Return Codes

Success

  - VK_SUBOPTIMAL_KHR

  - VK_SUCCESS

  - VK_TIMEOUT

Failure

  - VK_ERROR_DEVICE_LOST

  - VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT

  - VK_ERROR_OUT_OF_DATE_KHR

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_SURFACE_LOST_KHR

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkPresentId2KHR` structure is defined as:

    // Provided by VK_KHR_present_id2
    typedef struct VkPresentId2KHR {
        VkStructureType    sType;
        const void*        pNext;
        uint32_t           swapchainCount;
        const uint64_t*    pPresentIds;
    } VkPresentId2KHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `swapchainCount` is the number of swapchains being presented to the vkQueuePresentKHR command.

- `pPresentIds` is `NULL` or a pointer to an array of uint64_t with `swapchainCount` entries. If not `NULL`, each non-zero value in `pPresentIds` specifies the present id to be associated with the presentation of the swapchain with the same index in the vkQueuePresentKHR call.

For applications to be able to reference specific presentation events queued by a call to vkQueuePresentKHR, an identifier needs to be associated with them.

When the VkSurfaceCapabilitiesPresentId2KHR surface capability is present for a surface, applications can include the `VkPresentId2KHR` structure in the `pNext` chain of the VkPresentInfoKHR structure to associate an identifier with each presentation request. The `pPresentIds` provides an identifier for the swapchain present at the corresponding index in VkPresentInfoKHR’s `pSwapchains` array.

If this presentId is non-zero, then the application can later use this value to refer to that image presentation. A value of zero indicates that this presentation has no associated presentId. A non-zero presentId must be greater than any non-zero presentId passed previously by the application for the same swapchain.

If a non-zero presentId was provided, this may be used with vkWaitForPresent2KHR for the application to synchronize against the presentation engine’s processing of the presentation request.

Note | The ID namespace used by this extension must be shared with other extensions that allow the application to provide a 64-bit monotonically increasing presentation ID, such as the original VK_KHR_present_id. This is to allow existing extensions that depend on VK_KHR_present_id to use VK_KHR_present_id2 provided IDs without change, as well as to simplify writing future extensions that require application provided presentation IDs.

Valid Usage

- VUID-VkPresentId2KHR-swapchainCount-10818
  `swapchainCount` must be the same value as VkPresentInfoKHR::`swapchainCount`, where this `VkPresentId2KHR` is in the `pNext` chain of the VkPresentInfoKHR structure

- VUID-VkPresentId2KHR-presentIds-10819
  Each non-zero entry in `presentIds` must be greater than all previously submitted present ids for the associated swapchain in VkPresentInfoKHR::`pSwapchains`

- VUID-VkPresentId2KHR-None-10820
  The swapchain must have been created with VK_SWAPCHAIN_CREATE_PRESENT_ID_2_BIT_KHR bit set in the VkSwapchainCreateFlagBitsKHR field

Valid Usage (Implicit)

- VUID-VkPresentId2KHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PRESENT_ID_2_KHR

- VUID-VkPresentId2KHR-pPresentIds-parameter
  If `pPresentIds` is not `NULL`, `pPresentIds` must be a valid pointer to an array of `swapchainCount` `uint64_t` values

- VUID-VkPresentId2KHR-swapchainCount-arraylength
  `swapchainCount` must be greater than `0`

Structure Chaining

Extends the structure

  - VkPresentInfoKHR

When the `VkSurfaceCapabilitiesPresentWait2KHR` surface capability is present for a given surface, an application can wait for an image to be presented to the user by first specifying a `presentId` for the target presentation by adding a `VkPresentId2KHR` structure to the `pNext` chain of the VkPresentInfoKHR structure and then waiting for that presentation to complete by calling:

    // Provided by VK_KHR_present_wait2
    VkResult vkWaitForPresent2KHR(
        VkDevice                                    device,
        VkSwapchainKHR                              swapchain,
        const VkPresentWait2InfoKHR*                pPresentWait2Info);

- `device` is the device associated with `swapchain`.

- `swapchain` is the non-retired swapchain on which an image was queued for presentation.

- `pPresentWait2Info` is a pointer to a VkPresentWait2InfoKHR structure specifying the parameters of the wait.

`vkWaitForPresent2KHR` waits for the presentation engine to have begun presentation of the presentation request associated with the VkPresentWait2InfoKHR::`presentId` on `swapchain`, or for VkPresentWait2InfoKHR::`timeout` to have expired.

The wait request will complete when the timeout expires, or after the corresponding presentation request has either taken effect within the presentation engine or has been replaced without presentation.

The timing relationship between the presentation of the image to the user and the wait request completing is implementation-dependent due to variations in window system implementations.

If the `swapchain` becomes VK_ERROR_OUT_OF_DATE_KHR either before or during this call, the call may either return VK_SUCCESS (if the image was delivered to the presentation engine and may have been presented to the user) or return early with status VK_ERROR_OUT_OF_DATE_KHR (if the image could not be presented to the user).

As an exception to the normal rules for objects which are externally synchronized, the `swapchain` passed to `vkWaitForPresent2KHR` may be simultaneously used by other threads in calls to functions other than vkDestroySwapchainKHR. Access to the swapchain data associated with this extension must be atomic within the implementation.

Valid Usage

- VUID-vkWaitForPresent2KHR-presentWait2-10814
  The `presentWait2` feature must be enabled

- VUID-vkWaitForPresent2KHR-None-10815
  The VkSurfaceCapabilitiesPresentWait2KHR surface capability must be present for the underlying surface

- VUID-vkWaitForPresent2KHR-None-10816
  The swapchain must have been created with VK_SWAPCHAIN_CREATE_PRESENT_WAIT_2_BIT_KHR bit set in the VkSwapchainCreateFlagBitsKHR field

- VUID-vkWaitForPresent2KHR-presentId-10817
  The `presentId` value must have been associated with a vkQueuePresentKHR request on the `swapchain` which returned a non-error value

Valid Usage (Implicit)

- VUID-vkWaitForPresent2KHR-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkWaitForPresent2KHR-swapchain-parameter
  `swapchain` must be a valid VkSwapchainKHR handle

- VUID-vkWaitForPresent2KHR-pPresentWait2Info-parameter
  `pPresentWait2Info` must be a valid pointer to a valid VkPresentWait2InfoKHR structure

- VUID-vkWaitForPresent2KHR-swapchain-parent
  `swapchain` must have been created, allocated, or retrieved from `device`

Host Synchronization

- Host access to `swapchain` must be externally synchronized

Return Codes

Success

  - VK_SUBOPTIMAL_KHR

  - VK_SUCCESS

  - VK_TIMEOUT

Failure

  - VK_ERROR_DEVICE_LOST

  - VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT

  - VK_ERROR_OUT_OF_DATE_KHR

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_SURFACE_LOST_KHR

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

When the `VK_GGP_frame_token` extension is enabled, a Google Games Platform frame token can be specified when presenting an image to a swapchain by adding a `VkPresentFrameTokenGGP` structure to the `pNext` chain of the `VkPresentInfoKHR` structure.

The `VkPresentFrameTokenGGP` structure is defined as:

    // Provided by VK_GGP_frame_token
    typedef struct VkPresentFrameTokenGGP {
        VkStructureType    sType;
        const void*        pNext;
        GgpFrameToken      frameToken;
    } VkPresentFrameTokenGGP;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `frameToken` is the Google Games Platform frame token.

Valid Usage

- VUID-VkPresentFrameTokenGGP-frameToken-02680
  `frameToken` must be a valid `GgpFrameToken`

Valid Usage (Implicit)

- VUID-VkPresentFrameTokenGGP-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PRESENT_FRAME_TOKEN_GGP

Structure Chaining

Extends the structure

  - VkPresentInfoKHR

The `VkSwapchainPresentModeInfoKHR` structure is defined as:

    // Provided by VK_KHR_swapchain_maintenance1
    typedef struct VkSwapchainPresentModeInfoKHR {
        VkStructureType            sType;
        const void*                pNext;
        uint32_t                   swapchainCount;
        const VkPresentModeKHR*    pPresentModes;
    } VkSwapchainPresentModeInfoKHR;

    // Provided by VK_EXT_swapchain_maintenance1
    // Equivalent to VkSwapchainPresentModeInfoKHR
    typedef VkSwapchainPresentModeInfoKHR VkSwapchainPresentModeInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `swapchainCount` is the number of swapchains being presented to by this command.

- `pPresentModes` is a list of presentation modes with `swapchainCount` entries.

If the `pNext` chain of VkPresentInfoKHR includes a `VkSwapchainPresentModeInfoKHR` structure, then that structure defines the presentation modes used for the current and subsequent presentation operations.

When the application changes present modes with VkSwapchainPresentModeInfoKHR, images that have already been queued for presentation will continue to be presented according to the previous present mode. The current image being queued for presentation and subsequent images will be presented according to the new present mode. The behavior during the transition between the two modes is defined as follows.

- Transition from VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR to VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR: the presentation engine updates the shared presentable image according to the behavior of VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR.

- Transition from VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR to VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR: the presentation engine may update the shared presentable image or defer that to its regular refresh cycle, according to the behavior of VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR.

- Transition between VK_PRESENT_MODE_FIFO_KHR and VK_PRESENT_MODE_FIFO_RELAXED_KHR: Images continue to be appended to the same FIFO queue, and the behavior with respect to waiting for vertical blanking period will follow the new mode for current and subsequent images.

- Transition from VK_PRESENT_MODE_IMMEDIATE_KHR to VK_PRESENT_MODE_FIFO_KHR or VK_PRESENT_MODE_FIFO_RELAXED_KHR or VK_PRESENT_MODE_FIFO_LATEST_READY_KHR : As all prior present requests in the VK_PRESENT_MODE_IMMEDIATE_KHR mode are applied immediately, there are no outstanding present operations in this mode, and current and subsequent images are appended to the FIFO queue and presented according to the new mode.

- Transition from VK_PRESENT_MODE_MAILBOX_KHR to VK_PRESENT_MODE_FIFO_KHR or VK_PRESENT_MODE_FIFO_RELAXED_KHR or VK_PRESENT_MODE_FIFO_LATEST_READY_KHR : Presentation in FIFO modes require waiting for the next vertical blanking period, with VK_PRESENT_MODE_MAILBOX_KHR allowing the pending present operation to be replaced by a new one. In this case, the current present operation will replace the pending present operation and is applied according to the new mode.

- Transition from VK_PRESENT_MODE_FIFO_KHR or VK_PRESENT_MODE_FIFO_RELAXED_KHR or VK_PRESENT_MODE_FIFO_LATEST_READY_KHR to VK_PRESENT_MODE_IMMEDIATE_KHR or VK_PRESENT_MODE_MAILBOX_KHR: If the FIFO queue is empty, presentation is done according to the behavior of the new mode. If there are present operations in the FIFO queue, once the last present operation is performed based on the respective vertical blanking period, the current and subsequent updates are applied according to the new mode.

- Transition between VK_PRESENT_MODE_FIFO_KHR or VK_PRESENT_MODE_FIFO_RELAXED_KHR, and VK_PRESENT_MODE_FIFO_LATEST_READY_KHR: Images continue to be appended to the same FIFO queue, and the behavior with respect to waiting for vertical blanking period and dequeuing requests will follow the new mode for current and subsequent images.

- The behavior during transition between any other present modes, if possible, is implementation defined.

Valid Usage

- VUID-VkSwapchainPresentModeInfoKHR-swapchainCount-07760
  `swapchainCount` must be equal to VkPresentInfoKHR::`swapchainCount`

- VUID-VkSwapchainPresentModeInfoKHR-pPresentModes-07761
  Each entry in `pPresentModes` must be a presentation mode specified in VkSwapchainPresentModesCreateInfoKHR::`pPresentModes` when creating the entry’s corresponding swapchain

Valid Usage (Implicit)

- VUID-VkSwapchainPresentModeInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_MODE_INFO_KHR

- VUID-VkSwapchainPresentModeInfoKHR-pPresentModes-parameter
  `pPresentModes` must be a valid pointer to an array of `swapchainCount` valid VkPresentModeKHR values

- VUID-VkSwapchainPresentModeInfoKHR-swapchainCount-arraylength
  `swapchainCount` must be greater than `0`

Structure Chaining

Extends the structure

  - VkPresentInfoKHR

The `VkSwapchainPresentFenceInfoKHR` structure is defined as:

    // Provided by VK_KHR_swapchain_maintenance1
    typedef struct VkSwapchainPresentFenceInfoKHR {
        VkStructureType    sType;
        const void*        pNext;
        uint32_t           swapchainCount;
        const VkFence*     pFences;
    } VkSwapchainPresentFenceInfoKHR;

    // Provided by VK_EXT_swapchain_maintenance1
    // Equivalent to VkSwapchainPresentFenceInfoKHR
    typedef VkSwapchainPresentFenceInfoKHR VkSwapchainPresentFenceInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `swapchainCount` is the number of swapchains being presented to by this command.

- `pFences` is a list of fences with `swapchainCount` entries. Each entry must be VK_NULL_HANDLE or the handle of a fence to signal when the relevant operations on the associated swapchain have completed.

The set of queue operations defined by queuing an image for presentation, as well as operations performed by the presentation engine, access the payloads of objects associated with the presentation operation. The associated objects include:

- The swapchain image, its implicitly bound memory, and any other resources bound to that memory.

- The wait semaphores specified when queuing the image for presentation.

The application can provide a fence that the implementation will signal after all such queue operations have completed, and after the presentation engine has taken a reference to the payloads of all objects provided in `VkPresentInfoKHR` that the presentation engine accesses as part of the present operation. The fence may not wait for the present operation to complete. For all binary wait semaphores imported by the presentation engine using the equivalent of reference transference, as described in Importing Semaphore Payloads, this fence must not signal until all such semaphore payloads have been reset by the presentation engine.

The application can destroy the wait semaphores associated with a given presentation operation when at least one of the associated fences is signaled, and can destroy the swapchain when the fences associated with all past presentation requests referring to that swapchain have signaled.

Fences associated with presentations to the same swapchain on the same VkQueue must be signaled in the same order as the present operations.

To specify a fence for each swapchain in a present operation, include the `VkSwapchainPresentFenceInfoKHR` structure in the `pNext` chain of the VkPresentInfoKHR structure.

Valid Usage

- VUID-VkSwapchainPresentFenceInfoKHR-swapchainCount-07757
  `swapchainCount` must be equal to VkPresentInfoKHR::`swapchainCount`

- VUID-VkSwapchainPresentFenceInfoKHR-pFences-07758
  Each element of `pFences` that is not VK_NULL_HANDLE must be unsignaled

- VUID-VkSwapchainPresentFenceInfoKHR-pFences-07759
  Each element of `pFences` that is not VK_NULL_HANDLE must not be associated with any other queue command that has not yet completed execution on that queue

Valid Usage (Implicit)

- VUID-VkSwapchainPresentFenceInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_FENCE_INFO_KHR

- VUID-VkSwapchainPresentFenceInfoKHR-pFences-parameter
  `pFences` must be a valid pointer to an array of `swapchainCount` valid or VK_NULL_HANDLE VkFence handles

- VUID-VkSwapchainPresentFenceInfoKHR-swapchainCount-arraylength
  `swapchainCount` must be greater than `0`

Structure Chaining

Extends the structure

  - VkPresentInfoKHR

To release images previously acquired through vkAcquireNextImage2KHR or vkAcquireNextImageKHR, call:

    // Provided by VK_KHR_swapchain_maintenance1
    VkResult vkReleaseSwapchainImagesKHR(
        VkDevice                                    device,
        const VkReleaseSwapchainImagesInfoKHR*      pReleaseInfo);

    // Provided by VK_EXT_swapchain_maintenance1
    // Equivalent to vkReleaseSwapchainImagesKHR
    VkResult vkReleaseSwapchainImagesEXT(
        VkDevice                                    device,
        const VkReleaseSwapchainImagesInfoKHR*      pReleaseInfo);

- `device` is the device associated with VkReleaseSwapchainImagesInfoKHR::`swapchain`.

- `pReleaseInfo` is a pointer to a VkReleaseSwapchainImagesInfoKHR structure containing parameters of the release.

Only images that are not in use by the device can be released.

Releasing images is a read-only operation that will not affect the content of the released images. Upon reacquiring the image, the image contents and its layout will be the same as they were prior to releasing it. However, if a mechanism other than Vulkan is used to modify the platform window associated with the swapchain, the content of all presentable images in the swapchain becomes undefined.

Note | This functionality is useful during swapchain recreation, where acquired images from the old swapchain can be released instead of presented.

Valid Usage

- VUID-vkReleaseSwapchainImagesKHR-swapchainMaintenance1-10159
  Feature `swapchainMaintenance1` must be enabled

Valid Usage (Implicit)

- VUID-vkReleaseSwapchainImagesKHR-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkReleaseSwapchainImagesKHR-pReleaseInfo-parameter
  `pReleaseInfo` must be a valid pointer to a valid VkReleaseSwapchainImagesInfoKHR structure

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_SURFACE_LOST_KHR

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkReleaseSwapchainImagesInfoKHR` structure is defined as:

    // Provided by VK_KHR_swapchain_maintenance1
    typedef struct VkReleaseSwapchainImagesInfoKHR {
        VkStructureType    sType;
        const void*        pNext;
        VkSwapchainKHR     swapchain;
        uint32_t           imageIndexCount;
        const uint32_t*    pImageIndices;
    } VkReleaseSwapchainImagesInfoKHR;

    // Provided by VK_EXT_swapchain_maintenance1
    // Equivalent to VkReleaseSwapchainImagesInfoKHR
    typedef VkReleaseSwapchainImagesInfoKHR VkReleaseSwapchainImagesInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `swapchain` is a swapchain to which images are being released.

- `imageIndexCount` is the number of image indices to be released.

- `pImageIndices` is a pointer to an array of indices into the array of `swapchain`’s presentable images, with `imageIndexCount` entries.

Valid Usage

- VUID-VkReleaseSwapchainImagesInfoKHR-pImageIndices-07785
  Each element of `pImageIndices` must be the index of a presentable image acquired from the swapchain specified by `swapchain`

- VUID-VkReleaseSwapchainImagesInfoKHR-pImageIndices-07786
  All uses of presentable images identified by elements of `pImageIndices` must have completed execution

Valid Usage (Implicit)

- VUID-VkReleaseSwapchainImagesInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_RELEASE_SWAPCHAIN_IMAGES_INFO_KHR

- VUID-VkReleaseSwapchainImagesInfoKHR-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkReleaseSwapchainImagesInfoKHR-swapchain-parameter
  `swapchain` must be a valid VkSwapchainKHR handle

- VUID-VkReleaseSwapchainImagesInfoKHR-pImageIndices-parameter
  `pImageIndices` must be a valid pointer to an array of `imageIndexCount` `uint32_t` values

- VUID-VkReleaseSwapchainImagesInfoKHR-imageIndexCount-arraylength
  `imageIndexCount` must be greater than `0`

Host Synchronization

- Host access to `swapchain` must be externally synchronized

### 40.11. HDR Metadata

This section describes how to improve color reproduction of content to better reproduce colors as seen on the display used to originally optimize the content.

To provide HDR metadata to an implementation, call:

    // Provided by VK_EXT_hdr_metadata
    void vkSetHdrMetadataEXT(
        VkDevice                                    device,
        uint32_t                                    swapchainCount,
        const VkSwapchainKHR*                       pSwapchains,
        const VkHdrMetadataEXT*                     pMetadata);

- `device` is the logical device where the swapchain(s) were created.

- `swapchainCount` is the number of swapchains included in `pSwapchains`.

- `pSwapchains` is a pointer to an array of `swapchainCount` VkSwapchainKHR handles.

- `pMetadata` is a pointer to an array of `swapchainCount` VkHdrMetadataEXT structures.

The metadata will be applied to the specified VkSwapchainKHR objects at the next vkQueuePresentKHR call using that VkSwapchainKHR object. The metadata will persist until a subsequent `vkSetHdrMetadataEXT` changes it.

Valid Usage (Implicit)

- VUID-vkSetHdrMetadataEXT-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkSetHdrMetadataEXT-pSwapchains-parameter
  `pSwapchains` must be a valid pointer to an array of `swapchainCount` valid VkSwapchainKHR handles

- VUID-vkSetHdrMetadataEXT-pMetadata-parameter
  `pMetadata` must be a valid pointer to an array of `swapchainCount` valid VkHdrMetadataEXT structures

- VUID-vkSetHdrMetadataEXT-swapchainCount-arraylength
  `swapchainCount` must be greater than `0`

- VUID-vkSetHdrMetadataEXT-pSwapchains-parent
  Each element of `pSwapchains` must have been created, allocated, or retrieved from `device`

Host Synchronization

- Host access to each member of `pSwapchains` must be externally synchronized

The `VkHdrMetadataEXT` structure is defined as:

    // Provided by VK_EXT_hdr_metadata
    typedef struct VkHdrMetadataEXT {
        VkStructureType    sType;
        const void*        pNext;
        VkXYColorEXT       displayPrimaryRed;
        VkXYColorEXT       displayPrimaryGreen;
        VkXYColorEXT       displayPrimaryBlue;
        VkXYColorEXT       whitePoint;
        float              maxLuminance;
        float              minLuminance;
        float              maxContentLightLevel;
        float              maxFrameAverageLightLevel;
    } VkHdrMetadataEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `displayPrimaryRed` is a VkXYColorEXT structure specifying the red primary of the display used to optimize the content

- `displayPrimaryGreen` is a VkXYColorEXT structure specifying the green primary of the display used to optimize the content

- `displayPrimaryBlue` is a VkXYColorEXT structure specifying the blue primary of the display used to optimize the content

- `whitePoint` is a VkXYColorEXT structure specifying the white-point of the display used to optimize the content

- `maxLuminance` is the maximum luminance of the display used to optimize the content in nits

- `minLuminance` is the minimum luminance of the display used to optimize the content in nits

- `maxContentLightLevel` is the value in nits of the desired luminance for the brightest pixels in the displayed image.

- `maxFrameAverageLightLevel` is the value in nits of the average luminance of the frame which has the brightest average luminance anywhere in the content.

If any of the above values are unknown, they can be set to 0.

Note | The meta-data provided here is intended to be used as defined in the SMPTE 2086, CTA 861.3 and CIE 15:2004 specifications. The validity and use of this data is outside the scope of Vulkan.

Valid Usage (Implicit)

- VUID-VkHdrMetadataEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_HDR_METADATA_EXT

- VUID-VkHdrMetadataEXT-pNext-pNext
  `pNext` must be `NULL` or a pointer to a valid instance of VkHdrVividDynamicMetadataHUAWEI

- VUID-VkHdrMetadataEXT-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

When `hdrVivid` feature is enabled, HDR Vivid dynamic metadata can be set to control the reproduction of content by including the `VkHdrVividDynamicMetadataHUAWEI` in the `pNext` chain of VkHdrMetadataEXT.

The `VkHdrVividDynamicMetadataHUAWEI` structure is defined as:

    // Provided by VK_HUAWEI_hdr_vivid
    typedef struct VkHdrVividDynamicMetadataHUAWEI {
        VkStructureType    sType;
        const void*        pNext;
        size_t             dynamicMetadataSize;
        const void*        pDynamicMetadata;
    } VkHdrVividDynamicMetadataHUAWEI;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `dynamicMetadataSize` is the size in bytes of the dynamic metadata.

- `pDynamicMetadata` is a pointer to the dynamic metadata.

Note | The HDR Vivid metadata is intended to be used as defined in the T/UWA 005.1-2022 specification. The validity and use of this data is outside the scope of Vulkan.

Valid Usage (Implicit)

- VUID-VkHdrVividDynamicMetadataHUAWEI-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_HDR_VIVID_DYNAMIC_METADATA_HUAWEI

- VUID-VkHdrVividDynamicMetadataHUAWEI-pDynamicMetadata-parameter
  `pDynamicMetadata` must be a valid pointer to an array of `dynamicMetadataSize` bytes

- VUID-VkHdrVividDynamicMetadataHUAWEI-dynamicMetadataSize-arraylength
  `dynamicMetadataSize` must be greater than `0`

Structure Chaining

Extends the structure

  - VkHdrMetadataEXT

The `VkXYColorEXT` structure is defined as:

    // Provided by VK_EXT_hdr_metadata
    typedef struct VkXYColorEXT {
        float    x;
        float    y;
    } VkXYColorEXT;

- `x` is the x chromaticity coordinate.

- `y` is the y chromaticity coordinate.

Chromaticity coordinates are as specified in CIE 15:2004 “Calculation of chromaticity coordinates” (Section 7.3) and are limited to between 0 and 1 for real colors.

### 40.12. Lag Control

Some implementations support extensions to reduce display latency and control the swapchain present interval, as described in the remainder of this section.

#### 40.12.1. Anti-Lag

The VK_AMD_anti_lag extension lowers latency between receiving input and displaying on the screen. It adds a command to indicate when input is being processed for a frame, and when that frame’s images are presented.

To lower latency, call:

    // Provided by VK_AMD_anti_lag
    void vkAntiLagUpdateAMD(
        VkDevice                                    device,
        const VkAntiLagDataAMD*                     pData);

- `device` is the logical device

- `pData` is a pointer to a VkAntiLagDataAMD structure containing latency reduction parameters.

This command should be executed immediately before the application processes user input. If `pData` is not `NULL` and VkAntiLagDataAMD::`pPresentationInfo` is not `NULL`, this command should be executed again before vkQueuePresentKHR, with `pPresentationInfo` set to matching values.

Valid Usage

- VUID-vkAntiLagUpdateAMD-antiLag-10061
  The `antiLag` feature must be enabled

Valid Usage (Implicit)

- VUID-vkAntiLagUpdateAMD-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkAntiLagUpdateAMD-pData-parameter
  `pData` must be a valid pointer to a valid VkAntiLagDataAMD structure

The `VkAntiLagDataAMD` structure is defined as:

    // Provided by VK_AMD_anti_lag
    typedef struct VkAntiLagDataAMD {
        VkStructureType                        sType;
        const void*                            pNext;
        VkAntiLagModeAMD                       mode;
        uint32_t                               maxFPS;
        const VkAntiLagPresentationInfoAMD*    pPresentationInfo;
    } VkAntiLagDataAMD;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `mode` is a VkAntiLagModeAMD value specifying the anti-lag status.

- `maxFPS` is the framerate limit, in frames per second, used by the application. This limit will be imposed if anti-lag is enabled. If the application tries to render faster, the framerate will be reduced to match this limit. A value of 0 will disable the limit.

- `pPresentationInfo` is a pointer to a VkAntiLagPresentationInfoAMD structure containing information about the application stage.

This structure specifies anti-lag parameters.

Valid Usage (Implicit)

- VUID-VkAntiLagDataAMD-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_ANTI_LAG_DATA_AMD

- VUID-VkAntiLagDataAMD-mode-parameter
  `mode` must be a valid VkAntiLagModeAMD value

- VUID-VkAntiLagDataAMD-pPresentationInfo-parameter
  If `pPresentationInfo` is not `NULL`, `pPresentationInfo` must be a valid pointer to a valid VkAntiLagPresentationInfoAMD structure

Possible values of VkAntiLagDataAMD::`mode`, specifying the anti-lag status, are:

    // Provided by VK_AMD_anti_lag
    typedef enum VkAntiLagModeAMD {
        VK_ANTI_LAG_MODE_DRIVER_CONTROL_AMD = 0,
        VK_ANTI_LAG_MODE_ON_AMD = 1,
        VK_ANTI_LAG_MODE_OFF_AMD = 2,
    } VkAntiLagModeAMD;

- VK_ANTI_LAG_MODE_DRIVER_CONTROL_AMD specifies that anti-lag will be enabled or disabled depending on driver settings.

- VK_ANTI_LAG_MODE_ON_AMD specifies that anti-lag will be enabled.

- VK_ANTI_LAG_MODE_OFF_AMD specifies that anti-lag will be disabled.

The `VkAntiLagPresentationInfoAMD` structure is defined as:

    // Provided by VK_AMD_anti_lag
    typedef struct VkAntiLagPresentationInfoAMD {
        VkStructureType      sType;
        void*                pNext;
        VkAntiLagStageAMD    stage;
        uint64_t             frameIndex;
    } VkAntiLagPresentationInfoAMD;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `stage` is a VkAntiLagStageAMD value specifying the current application stage.

- `frameIndex` is set just before the application processes input data (VK_ANTI_LAG_STAGE_INPUT_AMD). The same `frameIndex` value should be set before the frame with current input data will be presented by vkQueuePresentKHR (VK_ANTI_LAG_STAGE_PRESENT_AMD). This should be done for each frame.

This structure specifies information about the presentation stage for which anti-lag parameters are being set.

Valid Usage (Implicit)

- VUID-VkAntiLagPresentationInfoAMD-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_ANTI_LAG_PRESENTATION_INFO_AMD

- VUID-VkAntiLagPresentationInfoAMD-stage-parameter
  `stage` must be a valid VkAntiLagStageAMD value

Possible values of VkAntiLagPresentationInfoAMD::`stage`, specifying the current application stage, are:

    // Provided by VK_AMD_anti_lag
    typedef enum VkAntiLagStageAMD {
        VK_ANTI_LAG_STAGE_INPUT_AMD = 0,
        VK_ANTI_LAG_STAGE_PRESENT_AMD = 1,
    } VkAntiLagStageAMD;

- VK_ANTI_LAG_STAGE_INPUT_AMD specifies the stage before processing input.

- VK_ANTI_LAG_STAGE_PRESENT_AMD specifies the stage before vkQueuePresentKHR.

#### 40.12.2. Latency Reduction

To enable or disable low latency mode on a swapchain, call:

    // Provided by VK_NV_low_latency2
    VkResult vkSetLatencySleepModeNV(
        VkDevice                                    device,
        VkSwapchainKHR                              swapchain,
        const VkLatencySleepModeInfoNV*             pSleepModeInfo);

- `device` is the device associated with `swapchain`.

- `swapchain` is the swapchain to enable or disable low latency mode on.

- `pSleepModeInfo` is `NULL` or a pointer to a VkLatencySleepModeInfoNV structure specifying the parameters of the latency sleep mode.

If `pSleepModeInfo` is `NULL`, `vkSetLatencySleepModeNV` will disable low latency mode, low latency boost, and set the minimum present interval previously specified by VkLatencySleepModeInfoNV to zero on `swapchain`. As an exception to the normal rules for objects which are externally synchronized, the swapchain passed to `vkSetLatencySleepModeNV` may be simultaneously used by other threads in calls to functions other than vkDestroySwapchainKHR. Access to the swapchain data associated with this extension must be atomic within the implementation.

Valid Usage (Implicit)

- VUID-vkSetLatencySleepModeNV-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkSetLatencySleepModeNV-swapchain-parameter
  `swapchain` must be a valid VkSwapchainKHR handle

- VUID-vkSetLatencySleepModeNV-pSleepModeInfo-parameter
  `pSleepModeInfo` must be a valid pointer to a valid VkLatencySleepModeInfoNV structure

- VUID-vkSetLatencySleepModeNV-swapchain-parent
  `swapchain` must have been created, allocated, or retrieved from `device`

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_INITIALIZATION_FAILED

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkLatencySleepModeInfoNV` structure is defined as:

    // Provided by VK_NV_low_latency2
    typedef struct VkLatencySleepModeInfoNV {
        VkStructureType    sType;
        const void*        pNext;
        VkBool32           lowLatencyMode;
        VkBool32           lowLatencyBoost;
        uint32_t           minimumIntervalUs;
    } VkLatencySleepModeInfoNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `lowLatencyMode` is the toggle to enable or disable low latency mode.

- `lowLatencyBoost` allows an application to hint to the GPU to increase performance to provide additional latency savings at a cost of increased power consumption.

- `minimumIntervalUs` is the microseconds between vkQueuePresentKHR calls for a given swapchain that vkLatencySleepNV will enforce.

If `lowLatencyMode` is VK_FALSE, `lowLatencyBoost` will still hint to the GPU to increase its power state and `vkLatencySleepNV` will still enforce `minimumIntervalUs` between `vkQueuePresentKHR` calls.

Valid Usage (Implicit)

- VUID-VkLatencySleepModeInfoNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_LATENCY_SLEEP_MODE_INFO_NV

To provide the synchronization primitive used to delay host CPU work for lower latency rendering, call:

    // Provided by VK_NV_low_latency2
    VkResult vkLatencySleepNV(
        VkDevice                                    device,
        VkSwapchainKHR                              swapchain,
        const VkLatencySleepInfoNV*                 pSleepInfo);

- `device` is the device associated with `swapchain`.

- `swapchain` is the swapchain to delay associated CPU work based on VkLatencySubmissionPresentIdNV submissions.

- `pSleepInfo` is a pointer to a VkLatencySleepInfoNV structure specifying the parameters of the latency sleep.

`vkLatencySleepNV` returns immediately. Applications should use vkWaitSemaphores with `pSleepInfo->signalSemaphore` to delay host CPU work. CPU work refers to application work done before presenting which includes but is not limited to: input sampling, simulation, command buffer recording, command buffer submission, and present submission. Applications should call this function before input sampling, and exactly once between presents.

Valid Usage (Implicit)

- VUID-vkLatencySleepNV-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkLatencySleepNV-swapchain-parameter
  `swapchain` must be a valid VkSwapchainKHR handle

- VUID-vkLatencySleepNV-pSleepInfo-parameter
  `pSleepInfo` must be a valid pointer to a valid VkLatencySleepInfoNV structure

- VUID-vkLatencySleepNV-swapchain-parent
  `swapchain` must have been created, allocated, or retrieved from `device`

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkLatencySleepInfoNV` structure is defined as:

    // Provided by VK_NV_low_latency2
    typedef struct VkLatencySleepInfoNV {
        VkStructureType    sType;
        const void*        pNext;
        VkSemaphore        signalSemaphore;
        uint64_t           value;
    } VkLatencySleepInfoNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `signalSemaphore` is a semaphore that is signaled to indicate that the application should resume input sampling work.

- `value` is the value that `signalSemaphore` is set to for resuming sampling work.

Valid Usage

- VUID-VkLatencySleepInfoNV-signalSemaphore-09361
  `signalSemaphore` must be a timeline semaphore

Valid Usage (Implicit)

- VUID-VkLatencySleepInfoNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_LATENCY_SLEEP_INFO_NV

- VUID-VkLatencySleepInfoNV-signalSemaphore-parameter
  `signalSemaphore` must be a valid VkSemaphore handle

An application can provide timestamps at various stages of its frame generation work by calling:

    // Provided by VK_NV_low_latency2
    void vkSetLatencyMarkerNV(
        VkDevice                                    device,
        VkSwapchainKHR                              swapchain,
        const VkSetLatencyMarkerInfoNV*             pLatencyMarkerInfo);

- `device` is the device associated with `swapchain`.

- `swapchain` is the swapchain to capture timestamps on.

- `pSetLatencyMarkerInfo` is a pointer to a VkSetLatencyMarkerInfoNV structure specifying the parameters of the marker to set.

At the beginning and end of simulation and render threads and beginning and end of vkQueuePresentKHR calls, `vkSetLatencyMarkerNV` can be called to provide timestamps for the application’s reference. These timestamps are returned with a call to vkGetLatencyTimingsNV alongside driver provided timestamps at various points of interest with regards to latency within the application. As an exception to the normal rules for objects which are externally synchronized, the swapchain passed to `vkSetLatencyMarkerNV` may be simultaneously used by other threads in calls to functions other than vkDestroySwapchainKHR. Access to the swapchain data associated with this extension must be atomic within the implementation.

Valid Usage (Implicit)

- VUID-vkSetLatencyMarkerNV-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkSetLatencyMarkerNV-swapchain-parameter
  `swapchain` must be a valid VkSwapchainKHR handle

- VUID-vkSetLatencyMarkerNV-pLatencyMarkerInfo-parameter
  `pLatencyMarkerInfo` must be a valid pointer to a valid VkSetLatencyMarkerInfoNV structure

- VUID-vkSetLatencyMarkerNV-swapchain-parent
  `swapchain` must have been created, allocated, or retrieved from `device`

The `VkSetLatencyMarkerInfoNV` structure is defined as:

    // Provided by VK_NV_low_latency2
    typedef struct VkSetLatencyMarkerInfoNV {
        VkStructureType      sType;
        const void*          pNext;
        uint64_t             presentID;
        VkLatencyMarkerNV    marker;
    } VkSetLatencyMarkerInfoNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `presentID` is an application provided value that is used to associate the timestamp with a `vkQueuePresentKHR` command using VkPresentIdKHR::`pPresentIds` or VkPresentId2KHR::`pPresentIds` for a given present.

- `marker` is the type of timestamp to be recorded.

Valid Usage (Implicit)

- VUID-VkSetLatencyMarkerInfoNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SET_LATENCY_MARKER_INFO_NV

- VUID-VkSetLatencyMarkerInfoNV-marker-parameter
  `marker` must be a valid VkLatencyMarkerNV value

The VkLatencyMarkerNV enum is defined as:

    // Provided by VK_NV_low_latency2
    typedef enum VkLatencyMarkerNV {
        VK_LATENCY_MARKER_SIMULATION_START_NV = 0,
        VK_LATENCY_MARKER_SIMULATION_END_NV = 1,
        VK_LATENCY_MARKER_RENDERSUBMIT_START_NV = 2,
        VK_LATENCY_MARKER_RENDERSUBMIT_END_NV = 3,
        VK_LATENCY_MARKER_PRESENT_START_NV = 4,
        VK_LATENCY_MARKER_PRESENT_END_NV = 5,
        VK_LATENCY_MARKER_INPUT_SAMPLE_NV = 6,
        VK_LATENCY_MARKER_TRIGGER_FLASH_NV = 7,
        VK_LATENCY_MARKER_OUT_OF_BAND_RENDERSUBMIT_START_NV = 8,
        VK_LATENCY_MARKER_OUT_OF_BAND_RENDERSUBMIT_END_NV = 9,
        VK_LATENCY_MARKER_OUT_OF_BAND_PRESENT_START_NV = 10,
        VK_LATENCY_MARKER_OUT_OF_BAND_PRESENT_END_NV = 11,
    } VkLatencyMarkerNV;

The members of the VkLatencyMarkerNV are used as arguments for vkSetLatencyMarkerNV in the use cases described below:

- VK_LATENCY_MARKER_SIMULATION_START_NV should be called at the start of the simulation execution each frame, but after the call to `vkLatencySleepNV`.

- VK_LATENCY_MARKER_SIMULATION_END_NV should be called at the end of the simulation execution each frame.

- VK_LATENCY_MARKER_RENDERSUBMIT_START_NV should be called at the beginning of the render submission execution each frame. This should be wherever Vulkan API calls are made and must not span into asynchronous rendering.

- VK_LATENCY_MARKER_RENDERSUBMIT_END_NV should be called at the end of the render submission execution each frame.

- VK_LATENCY_MARKER_PRESENT_START_NV should be called just before `vkQueuePresentKHR`.

- VK_LATENCY_MARKER_PRESENT_END_NV should be called when `vkQueuePresentKHR` returns.

- VK_LATENCY_MARKER_INPUT_SAMPLE_NV should be called just before the application gathers input data.

- VK_LATENCY_MARKER_TRIGGER_FLASH_NV should be called anywhere between VK_LATENCY_MARKER_SIMULATION_START_NV and VK_LATENCY_MARKER_SIMULATION_END_NV whenever a left mouse click occurs.

To get an array containing the newest collected latency data, call:

    // Provided by VK_NV_low_latency2
    void vkGetLatencyTimingsNV(
        VkDevice                                    device,
        VkSwapchainKHR                              swapchain,
        VkGetLatencyMarkerInfoNV*                   pLatencyMarkerInfo);

- `device` is the device associated with `swapchain`.

- `swapchain` is the swapchain to return data from.

- `pLatencyMarkerInfo` is a pointer to a VkGetLatencyMarkerInfoNV structure specifying the parameters for returning latency information.

The timings returned by `vkGetLatencyTimingsNV` contain the timestamps requested from vkSetLatencyMarkerNV and additional implementation-specific markers defined in VkLatencyTimingsFrameReportNV.

Valid Usage (Implicit)

- VUID-vkGetLatencyTimingsNV-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetLatencyTimingsNV-swapchain-parameter
  `swapchain` must be a valid VkSwapchainKHR handle

- VUID-vkGetLatencyTimingsNV-pLatencyMarkerInfo-parameter
  `pLatencyMarkerInfo` must be a valid pointer to a VkGetLatencyMarkerInfoNV structure

- VUID-vkGetLatencyTimingsNV-swapchain-parent
  `swapchain` must have been created, allocated, or retrieved from `device`

The `VkGetLatencyMarkerInfoNV` structure is defined as:

    // Provided by VK_NV_low_latency2
    typedef struct VkGetLatencyMarkerInfoNV {
        VkStructureType                   sType;
        const void*                       pNext;
        uint32_t                          timingCount;
        VkLatencyTimingsFrameReportNV*    pTimings;
    } VkGetLatencyMarkerInfoNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is either `NULL` or a pointer to a structure extending this structure.

- `timingCount` is an integer related to the number of previous frames of latency data available or queried, as described below.

- `pTimings` is either `NULL` or a pointer to an array of VkLatencyTimingsFrameReportNV structures.

If `pTimings` is `NULL` then the maximum number of queryable frame data is returned in `timingCount`. Otherwise, `timingCount` must be set by the application to the number of elements in the `pTimings` array, and on return is overwritten with the number of values actually written to `pTimings`. The elements of `pTimings` are arranged in the order they were requested in, with the oldest data in the first entry.

Valid Usage (Implicit)

- VUID-VkGetLatencyMarkerInfoNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_GET_LATENCY_MARKER_INFO_NV

- VUID-VkGetLatencyMarkerInfoNV-pTimings-parameter
  If `timingCount` is not `0`, and `pTimings` is not `NULL`, `pTimings` must be a valid pointer to an array of `timingCount` VkLatencyTimingsFrameReportNV structures

The VkLatencyTimingsFrameReportNV structure describes latency data returned by vkGetLatencyTimingsNV

    // Provided by VK_NV_low_latency2
    typedef struct VkLatencyTimingsFrameReportNV {
        VkStructureType    sType;
        void*              pNext;
        uint64_t           presentID;
        uint64_t           inputSampleTimeUs;
        uint64_t           simStartTimeUs;
        uint64_t           simEndTimeUs;
        uint64_t           renderSubmitStartTimeUs;
        uint64_t           renderSubmitEndTimeUs;
        uint64_t           presentStartTimeUs;
        uint64_t           presentEndTimeUs;
        uint64_t           driverStartTimeUs;
        uint64_t           driverEndTimeUs;
        uint64_t           osRenderQueueStartTimeUs;
        uint64_t           osRenderQueueEndTimeUs;
        uint64_t           gpuRenderStartTimeUs;
        uint64_t           gpuRenderEndTimeUs;
    } VkLatencyTimingsFrameReportNV;

The members of the VkLatencyTimingsFrameReportNV structure describe the following:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `presentID` is the application provided value that is used to associate the timestamp with a `vkQueuePresentKHR` command using VkPresentIdKHR::`pPresentIds` or VkPresentId2KHR::`pPresentIds` for a given present.

- `simStartTimeUs` is the timestamp written when `vkSetLatencyMarkerNV` is called with the VkLatencyMarkerNV enum VK_LATENCY_MARKER_SIMULATION_START_NV.

- `simEndTimeUs` is the timestamp written when `vkSetLatencyMarkerNV` is called with the VkLatencyMarkerNV enum VK_LATENCY_MARKER_SIMULATION_END_NV

- `renderStartTimeUs` is the timestamp written when `vkSetLatencyMarkerNV` is called with the VkLatencyMarkerNV enum VK_LATENCY_MARKER_RENDERSUBMIT_START_NV.

- `renderEndTimeUs` is the timestamp written when `vkSetLatencyMarkerNV` is called with the VkLatencyMarkerNV enum VK_LATENCY_MARKER_RENDERSUBMIT_END_NV.

- `presentStartTimeUs` is the timestamp written when `vkSetLatencyMarkerNV` is called with the VkLatencyMarkerNV enum VK_LATENCY_MARKER_PRESENT_START_NV.

- `presentEndTimeUs` is the timestamp written when `vkSetLatencyMarkerNV` is called with the VkLatencyMarkerNV enum VK_LATENCY_MARKER_PRESENT_END_NV.

- `driverStartTimeUs` is the timestamp written when the first `vkQueueSubmit` for the frame is called.

- `driverEndTimeUs` is the timestamp written when the final `vkQueueSubmit` hands off from the Vulkan Driver.

- `osRenderQueueStartTimeUs` is the timestamp written when the final `vkQueueSubmit` hands off from the Vulkan Driver.

- `osRenderQueueEndTimeUs` is the timestamp written when the first submission reaches the GPU.

- `gpuRenderStartTimeUs` is the timestamp written when the first submission reaches the GPU.

- `gpuRenderEndTimeUs` is the timestamp written when the final submission finishes on the GPU for the frame.

Valid Usage (Implicit)

- VUID-VkLatencyTimingsFrameReportNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_LATENCY_TIMINGS_FRAME_REPORT_NV

The VkLatencySubmissionPresentIdNV structure is defined as:

    // Provided by VK_NV_low_latency2
    typedef struct VkLatencySubmissionPresentIdNV {
        VkStructureType    sType;
        const void*        pNext;
        uint64_t           presentID;
    } VkLatencySubmissionPresentIdNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `presentID` is used to associate the `vkQueueSubmit` with the presentId used for a given `vkQueuePresentKHR` via VkPresentIdKHR::`pPresentIds` or VkPresentId2KHR::`pPresentIds`.

For any submission to be tracked with low latency mode pacing, it needs to be associated with other submissions in a given present. To associate a submission with `presentID` for low latency mode, the `pNext` chain of vkQueueSubmit must include a `VkLatencySubmissionPresentIdNV` structure.

Valid Usage (Implicit)

- VUID-VkLatencySubmissionPresentIdNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_LATENCY_SUBMISSION_PRESENT_ID_NV

Structure Chaining

Extends the structures

  - VkSubmitInfo

  - VkSubmitInfo2

To mark a queue as out of band, so that all `vkQueueSubmit` calls on the queue are ignored for latency evaluation, call:

    // Provided by VK_NV_low_latency2
    void vkQueueNotifyOutOfBandNV(
        VkQueue                                     queue,
        const VkOutOfBandQueueTypeInfoNV*           pQueueTypeInfo);

- `queue` is the VkQueue to be marked as out of band.

- `pQueueTypeInfo` is a pointer to a VkOutOfBandQueueTypeInfoNV structure specifying the queue type.

Valid Usage (Implicit)

- VUID-vkQueueNotifyOutOfBandNV-queue-parameter
  `queue` must be a valid VkQueue handle

- VUID-vkQueueNotifyOutOfBandNV-pQueueTypeInfo-parameter
  `pQueueTypeInfo` must be a valid pointer to a valid VkOutOfBandQueueTypeInfoNV structure

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
- | - | - | Any | -

The VkOutOfBandQueueTypeInfoNV structure is defined as:

    // Provided by VK_NV_low_latency2
    typedef struct VkOutOfBandQueueTypeInfoNV {
        VkStructureType           sType;
        const void*               pNext;
        VkOutOfBandQueueTypeNV    queueType;
    } VkOutOfBandQueueTypeInfoNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `queueType` describes the usage of the queue to be marked as out of band.

Valid Usage (Implicit)

- VUID-VkOutOfBandQueueTypeInfoNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_OUT_OF_BAND_QUEUE_TYPE_INFO_NV

- VUID-VkOutOfBandQueueTypeInfoNV-queueType-parameter
  `queueType` must be a valid VkOutOfBandQueueTypeNV value

The VkOutOfBandQueueTypeNV enum is defined as:

    // Provided by VK_NV_low_latency2
    typedef enum VkOutOfBandQueueTypeNV {
        VK_OUT_OF_BAND_QUEUE_TYPE_RENDER_NV = 0,
        VK_OUT_OF_BAND_QUEUE_TYPE_PRESENT_NV = 1,
    } VkOutOfBandQueueTypeNV;

The members of the VkOutOfBandQueueTypeNV are used to describe the queue type in VkOutOfBandQueueTypeInfoNV as described below:

- VK_OUT_OF_BAND_QUEUE_TYPE_RENDER_NV specifies that work will be submitted to this queue.

- VK_OUT_OF_BAND_QUEUE_TYPE_PRESENT_NV specifies that this queue will be presented from.

To allow low latency mode to be used by a swapchain, add a `VkSwapchainLatencyCreateInfoNV` structure to the `pNext` chain of VkSwapchainCreateInfoKHR.

The `VkSwapchainLatencyCreateInfoNV` structure is defined as:

    // Provided by VK_NV_low_latency2
    typedef struct VkSwapchainLatencyCreateInfoNV {
        VkStructureType    sType;
        const void*        pNext;
        VkBool32           latencyModeEnable;
    } VkSwapchainLatencyCreateInfoNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `latencyModeEnable` is VK_TRUE if the created swapchain will utilize low latency mode, VK_FALSE otherwise.

Valid Usage (Implicit)

- VUID-VkSwapchainLatencyCreateInfoNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SWAPCHAIN_LATENCY_CREATE_INFO_NV

Structure Chaining

Extends the structure

  - VkSwapchainCreateInfoKHR

The `VkLatencySurfaceCapabilitiesNV` structure is defined as:

    // Provided by VK_NV_low_latency2
    typedef struct VkLatencySurfaceCapabilitiesNV {
        VkStructureType      sType;
        const void*          pNext;
        uint32_t             presentModeCount;
        VkPresentModeKHR*    pPresentModes;
    } VkLatencySurfaceCapabilitiesNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `presentModeCount` is the number of presentation modes provided.

- `pPresentModes` is list of presentation modes optimized for use with low latency mode with `presentModeCount` entries.

If `pPresentModes` is `NULL`, then the number of present modes that are optimized for use with low latency mode returned in `presentModeCount`. Otherwise, `presentModeCount` must be set by the application to the number of elements in the `pPresentModes` array, and on return is overwritten with the number of values actually written to `pPresentModes`. If the value of `presentModeCount` is less than the number of optimized present modes, at most `presentModeCount` values will be written to `pPresentModes`.

Valid Usage (Implicit)

- VUID-VkLatencySurfaceCapabilitiesNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_LATENCY_SURFACE_CAPABILITIES_NV

- VUID-VkLatencySurfaceCapabilitiesNV-pPresentModes-parameter
  If `presentModeCount` is not `0`, and `pPresentModes` is not `NULL`, `pPresentModes` must be a valid pointer to an array of `presentModeCount` VkPresentModeKHR values

Structure Chaining

Extends the structure

  - VkSurfaceCapabilities2KHR

### 40.13. Present Barrier

The `VK_NV_present_barrier` extension allows applications to synchronize corresponding presentation requests across multiple swapchains using the present barrier. A swapchain is said to be using the present barrier if the swapchain is created by adding a VkSwapchainPresentBarrierCreateInfoNV structure to the `pNext` chain of the VkSwapchainCreateInfoKHR structure, and setting VkSwapchainPresentBarrierCreateInfoNV::`presentBarrierEnable` to true.

A set of corresponding presentation requests is defined as exactly one queued presentation request associated with each swapchain using the present barrier, whether or not that queued request has executed. A given presentation request is added, when created by calling vkQueuePresentKHR and specifying a swapchain using the present barrier, either to the oldest existing set of corresponding requests for which there is no existing member associated with the request’s swapchain, or to a new set of corresponding requests if no such set exists.

A set of corresponding requests is said to be full when it contains one request from each swapchain using the present barrier. Queued presentation of an image to a swapchain using the present barrier is deferred by the implementation until the set of corresponding requests is full, and the visibility operations associated with all requests in that set, as described by vkQueuePresentKHR, have completed.

Additionally, the set of swapchains using the present barrier can be in the same process, or different processes running under the same operating system. And if the required synchronization hardware is connected and correctly configured, this extension also supports applications to synchronize corresponding presentation requests using the present barrier across distributed systems. However, the configuration mechanism of the required hardware is outside the scope of the Vulkan specification and this extension.

The VkSwapchainPresentBarrierCreateInfoNV structure is defined as:

    // Provided by VK_NV_present_barrier
    typedef struct VkSwapchainPresentBarrierCreateInfoNV {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           presentBarrierEnable;
    } VkSwapchainPresentBarrierCreateInfoNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `presentBarrierEnable` is a boolean value indicating a request for using the present barrier.

If the `pNext` chain of VkSwapchainCreateInfoKHR does not include this structure, the default value for `presentBarrierEnable` is VK_FALSE, meaning the swapchain does not request to use the present barrier. Additionally, when recreating a swapchain that was using the present barrier, and the `pNext` chain of VkSwapchainCreateInfoKHR does not include this structure, it means the swapchain will stop using the present barrier.

Valid Usage (Implicit)

- VUID-VkSwapchainPresentBarrierCreateInfoNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_BARRIER_CREATE_INFO_NV

Structure Chaining

Extends the structure

  - VkSwapchainCreateInfoKHR

#### 40.13.1. Present Metering

Present Metering evenly paces out the next `numFramesPerBatch` vkQueuePresentKHR presents. This gives smoother pacing between presents in applications with frame generation integrations.

The `VkSetPresentConfigNV` structure is defined as:

    // Provided by VK_NV_present_metering
    typedef struct VkSetPresentConfigNV {
        VkStructureType    sType;
        const void*        pNext;
        uint32_t           numFramesPerBatch;
        uint32_t           presentConfigFeedback;
    } VkSetPresentConfigNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `numFramesPerBatch` is the number of frames to batch

- `presentConfigFeedback` will return the success or error status

The metering configuration applies to all swapchains in the array in VkPresentInfoKHR. The configuration specified by `VkSetPresentConfigNV` applies to the next `numFramesPerBatch` calls to vkQueuePresentKHR and needs to be updated every `numFramesPerBatch` presents.

Valid Usage

- VUID-VkSetPresentConfigNV-numFramesPerBatch-10581
  `numFramesPerBatch` must not be larger than 8

Valid Usage (Implicit)

- VUID-VkSetPresentConfigNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SET_PRESENT_CONFIG_NV

Structure Chaining

Extends the structure

  - VkPresentInfoKHR

## 41. Deferred Host Operations

Certain Vulkan commands are inherently expensive for the host CPU to execute. It is often desirable to offload such work onto background threads, and to parallelize the work across multiple CPUs. The concept of deferred operations allows applications and drivers to coordinate the execution of expensive host commands using an application-managed thread pool.

The `VK_KHR_deferred_host_operations` extension defines the infrastructure and usage patterns for deferrable commands, but does not specify any commands as deferrable. This is left to additional dependent extensions. Commands must not be deferred unless the deferral is specifically allowed by another extension which depends on `VK_KHR_deferred_host_operations`. This specification will refer to such extensions as deferral extensions.

### 41.1. Requesting Deferral

When an application requests an operation deferral, the implementation may defer the operation. When deferral is requested and the implementation defers any operation, the implementation must return VK_OPERATION_DEFERRED_KHR as the success code if no errors occurred. When deferral is requested, the implementation should defer the operation when the workload is significant, however if the implementation chooses not to defer any of the requested operations and instead executes all of them immediately, the implementation must return VK_OPERATION_NOT_DEFERRED_KHR as the success code if no errors occurred.

A deferred operation is created complete with an initial result value of VK_SUCCESS. The deferred operation becomes pending when an operation has been successfully deferred with that deferred operation object.

A deferred operation is considered pending until the deferred operation completes. A pending deferred operation becomes complete when it has been fully executed by one or more threads. Pending deferred operations will never complete until they are joined by an application thread, using vkDeferredOperationJoinKHR. Applications can join multiple threads to the same deferred operation, enabling concurrent execution of subtasks within that operation.

The application can query the status of a VkDeferredOperationKHR using the vkGetDeferredOperationMaxConcurrencyKHR or vkGetDeferredOperationResultKHR commands.

Parameters to the command requesting a deferred operation may be accessed by the implementation at any time until the deferred operation enters the complete state. The application must obey the following rules while a deferred operation is pending:

- Externally synchronized parameters must not be accessed.

- Pointer parameters must not be modified (e.g. reallocated/freed).

- The contents of pointer parameters which may be read by the command must not be modified.

- The contents of pointer parameters which may be written by the command must not be read.

- Vulkan object parameters must not be passed as externally synchronized parameters to any other command.

When the deferred operation is complete, the application should call vkGetDeferredOperationResultKHR to obtain the VkResult indicating success or failure of the operation. The VkResult value returned will be one of the values that the command requesting the deferred operation is able to return. Writes to output parameters of the requesting command will happen-before the deferred operation is complete.

When a deferral is requested for a command, the implementation may perform memory management operations on the allocator supplied to vkCreateDeferredOperationKHR for the deferred operation object, as described in the Memory Allocation chapter. Such allocations must occur on the thread which requests deferral.

If an allocator was supplied for the deferred command at the time of the deferral request, then the implementation may perform memory management operations on this allocator during the execution of vkDeferredOperationJoinKHR. These operations may occur concurrently and may be performed by any joined thread. The application must ensure that the supplied allocator is able to operate correctly under these conditions.

### 41.2. Deferred Host Operations API

The `VkDeferredOperationKHR` handle is defined as:

    // Provided by VK_KHR_deferred_host_operations
    VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDeferredOperationKHR)

This handle refers to a tracking structure which manages the execution state for a deferred command.

To construct the tracking object for a deferred command, call:

    // Provided by VK_KHR_deferred_host_operations
    VkResult vkCreateDeferredOperationKHR(
        VkDevice                                    device,
        const VkAllocationCallbacks*                pAllocator,
        VkDeferredOperationKHR*                     pDeferredOperation);

- `device` is the device which owns `operation`.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

- `pDeferredOperation` is a pointer to a handle in which the created VkDeferredOperationKHR is returned.

Valid Usage (Implicit)

- VUID-vkCreateDeferredOperationKHR-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkCreateDeferredOperationKHR-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateDeferredOperationKHR-pDeferredOperation-parameter
  `pDeferredOperation` must be a valid pointer to a VkDeferredOperationKHR handle

- VUID-vkCreateDeferredOperationKHR-device-queuecount
  The device must have been created with at least `1` queue

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

To assign a thread to a deferred operation, call:

    // Provided by VK_KHR_deferred_host_operations
    VkResult vkDeferredOperationJoinKHR(
        VkDevice                                    device,
        VkDeferredOperationKHR                      operation);

- `device` is the device which owns `operation`.

- `operation` is the deferred operation that the calling thread should work on.

The `vkDeferredOperationJoinKHR` command will execute a portion of the deferred operation on the calling thread.

The return value will be one of the following:

- A return value of VK_SUCCESS indicates that `operation` is complete. The application should use vkGetDeferredOperationResultKHR to retrieve the result of `operation`.

- A return value of VK_THREAD_DONE_KHR indicates that the deferred operation is not complete, but there is no work remaining to assign to threads. Future calls to vkDeferredOperationJoinKHR are not necessary and will simply harm performance. This situation may occur when other threads executing vkDeferredOperationJoinKHR are about to complete `operation`, and the implementation is unable to partition the workload any further.

- A return value of VK_THREAD_IDLE_KHR indicates that the deferred operation is not complete, and there is no work for the thread to do at the time of the call. This situation may occur if the operation encounters a temporary reduction in parallelism. By returning VK_THREAD_IDLE_KHR, the implementation is signaling that it expects that more opportunities for parallelism will emerge as execution progresses, and that future calls to vkDeferredOperationJoinKHR can be beneficial. In the meantime, the application can perform other work on the calling thread.

Implementations must guarantee forward progress by enforcing the following invariants:

1. If only one thread has invoked vkDeferredOperationJoinKHR on a given operation, that thread must execute the operation to completion and return VK_SUCCESS.

2. If multiple threads have concurrently invoked vkDeferredOperationJoinKHR on the same operation, then at least one of them must complete the operation and return VK_SUCCESS.

Valid Usage (Implicit)

- VUID-vkDeferredOperationJoinKHR-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkDeferredOperationJoinKHR-operation-parameter
  `operation` must be a valid VkDeferredOperationKHR handle

- VUID-vkDeferredOperationJoinKHR-operation-parent
  `operation` must have been created, allocated, or retrieved from `device`

Return Codes

Success

  - VK_SUCCESS

  - VK_THREAD_DONE_KHR

  - VK_THREAD_IDLE_KHR

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

When a deferred operation is completed, the application can destroy the tracking object by calling:

    // Provided by VK_KHR_deferred_host_operations
    void vkDestroyDeferredOperationKHR(
        VkDevice                                    device,
        VkDeferredOperationKHR                      operation,
        const VkAllocationCallbacks*                pAllocator);

- `device` is the device which owns `operation`.

- `operation` is the completed operation to be destroyed.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

Valid Usage

- VUID-vkDestroyDeferredOperationKHR-operation-03434
  If `VkAllocationCallbacks` were provided when `operation` was created, a compatible set of callbacks must be provided here

- VUID-vkDestroyDeferredOperationKHR-operation-03435
  If no `VkAllocationCallbacks` were provided when `operation` was created, `pAllocator` must be `NULL`

- VUID-vkDestroyDeferredOperationKHR-operation-03436
  `operation` must be completed

Valid Usage (Implicit)

- VUID-vkDestroyDeferredOperationKHR-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkDestroyDeferredOperationKHR-operation-parameter
  If `operation` is not VK_NULL_HANDLE, `operation` must be a valid VkDeferredOperationKHR handle

- VUID-vkDestroyDeferredOperationKHR-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkDestroyDeferredOperationKHR-operation-parent
  If `operation` is a valid handle, it must have been created, allocated, or retrieved from `device`

Host Synchronization

- Host access to `operation` must be externally synchronized

To query the number of additional threads that can usefully be joined to a deferred operation, call:

    // Provided by VK_KHR_deferred_host_operations
    uint32_t vkGetDeferredOperationMaxConcurrencyKHR(
        VkDevice                                    device,
        VkDeferredOperationKHR                      operation);

- `device` is the device which owns `operation`.

- `operation` is the deferred operation to be queried.

The returned value is the maximum number of threads that can usefully execute a deferred operation concurrently, reported for the state of the deferred operation at the point this command is called. This value is intended to be used to better schedule work onto available threads. Applications can join any number of threads to the deferred operation and expect it to eventually complete, though excessive joins may return VK_THREAD_DONE_KHR immediately, performing no useful work.

If `operation` is complete, `vkGetDeferredOperationMaxConcurrencyKHR` returns zero.

If `operation` is currently joined to any threads, the value returned by this command may immediately be out of date.

If `operation` is pending, implementations must not return zero unless at least one thread is currently executing vkDeferredOperationJoinKHR on `operation`. If there are such threads, the implementation should return an estimate of the number of additional threads which it could profitably use.

Implementations may return 232-1 to indicate that the maximum concurrency is unknown and cannot be easily derived. Implementations may return values larger than the maximum concurrency available on the host CPU. In these situations, an application should clamp the return value rather than oversubscribing the machine.

Note | The recommended usage pattern for applications is to query this value once, after deferral, and schedule no more than the specified number of threads to join the operation. Each time a joined thread receives VK_THREAD_IDLE_KHR, the application should schedule an additional join at some point in the future, but is not required to do so.

Valid Usage (Implicit)

- VUID-vkGetDeferredOperationMaxConcurrencyKHR-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetDeferredOperationMaxConcurrencyKHR-operation-parameter
  `operation` must be a valid VkDeferredOperationKHR handle

- VUID-vkGetDeferredOperationMaxConcurrencyKHR-operation-parent
  `operation` must have been created, allocated, or retrieved from `device`

The `vkGetDeferredOperationResultKHR` function is defined as:

    // Provided by VK_KHR_deferred_host_operations
    VkResult vkGetDeferredOperationResultKHR(
        VkDevice                                    device,
        VkDeferredOperationKHR                      operation);

- `device` is the device which owns `operation`.

- `operation` is the operation whose deferred result is being queried.

If no command has been deferred on `operation`, `vkGetDeferredOperationResultKHR` returns VK_SUCCESS.

If the deferred operation is pending, `vkGetDeferredOperationResultKHR` returns VK_NOT_READY.

If the deferred operation is complete, it returns the appropriate return value from the original command. This value must be one of the VkResult values which could have been returned by the original command if the operation had not been deferred.

Valid Usage (Implicit)

- VUID-vkGetDeferredOperationResultKHR-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetDeferredOperationResultKHR-operation-parameter
  `operation` must be a valid VkDeferredOperationKHR handle

- VUID-vkGetDeferredOperationResultKHR-operation-parent
  `operation` must have been created, allocated, or retrieved from `device`

Return Codes

Success

  - VK_NOT_READY

  - VK_SUCCESS

Failure

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

## 42. Private Data

The private data extension provides a way for users to associate arbitrary application-defined data with Vulkan objects. This association is accomplished by storing 64-bit unsigned integers of application-defined data in private data slots. A private data slot represents a storage allocation for one data item for each child object of the device.

An application can reserve private data slots at device creation. To reserve private data slots, insert a VkDevicePrivateDataCreateInfo in the `pNext` chain in VkDeviceCreateInfo before device creation. Multiple VkDevicePrivateDataCreateInfo structures can be chained together, and the sum of the requested slots will be reserved. This is an exception to the specified valid usage for structure pointer chains. Reserving slots in this manner is not strictly necessary but it may improve performance.

Private data slots are represented by `VkPrivateDataSlot` handles:

    // Provided by VK_VERSION_1_3
    VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPrivateDataSlot)

    // Provided by VK_EXT_private_data
    // Equivalent to VkPrivateDataSlot
    typedef VkPrivateDataSlot VkPrivateDataSlotEXT;

To create a private data slot, call:

    // Provided by VK_VERSION_1_3
    VkResult vkCreatePrivateDataSlot(
        VkDevice                                    device,
        const VkPrivateDataSlotCreateInfo*          pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkPrivateDataSlot*                          pPrivateDataSlot);

    // Provided by VK_EXT_private_data
    // Equivalent to vkCreatePrivateDataSlot
    VkResult vkCreatePrivateDataSlotEXT(
        VkDevice                                    device,
        const VkPrivateDataSlotCreateInfo*          pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkPrivateDataSlot*                          pPrivateDataSlot);

- `device` is the logical device associated with the creation of the object(s) holding the private data slot.

- `pCreateInfo` is a pointer to a VkPrivateDataSlotCreateInfo

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

- `pPrivateDataSlot` is a pointer to a VkPrivateDataSlot handle in which the resulting private data slot is returned

Valid Usage

- VUID-vkCreatePrivateDataSlot-privateData-04564
  The `privateData` feature must be enabled

Valid Usage (Implicit)

- VUID-vkCreatePrivateDataSlot-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkCreatePrivateDataSlot-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkPrivateDataSlotCreateInfo structure

- VUID-vkCreatePrivateDataSlot-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreatePrivateDataSlot-pPrivateDataSlot-parameter
  `pPrivateDataSlot` must be a valid pointer to a VkPrivateDataSlot handle

- VUID-vkCreatePrivateDataSlot-device-queuecount
  The device must have been created with at least `1` queue

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkPrivateDataSlotCreateInfo` structure is defined as:

    // Provided by VK_VERSION_1_3
    typedef struct VkPrivateDataSlotCreateInfo {
        VkStructureType                 sType;
        const void*                     pNext;
        VkPrivateDataSlotCreateFlags    flags;
    } VkPrivateDataSlotCreateInfo;

    // Provided by VK_EXT_private_data
    // Equivalent to VkPrivateDataSlotCreateInfo
    typedef VkPrivateDataSlotCreateInfo VkPrivateDataSlotCreateInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is reserved for future use.

Valid Usage (Implicit)

- VUID-VkPrivateDataSlotCreateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PRIVATE_DATA_SLOT_CREATE_INFO

- VUID-VkPrivateDataSlotCreateInfo-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkPrivateDataSlotCreateInfo-flags-zerobitmask
  `flags` must be `0`

    // Provided by VK_VERSION_1_3
    typedef VkFlags VkPrivateDataSlotCreateFlags;

    // Provided by VK_EXT_private_data
    // Equivalent to VkPrivateDataSlotCreateFlags
    typedef VkPrivateDataSlotCreateFlags VkPrivateDataSlotCreateFlagsEXT;

`VkPrivateDataSlotCreateFlags` is a bitmask type for setting a mask, but is currently reserved for future use.

To destroy a private data slot, call:

    // Provided by VK_VERSION_1_3
    void vkDestroyPrivateDataSlot(
        VkDevice                                    device,
        VkPrivateDataSlot                           privateDataSlot,
        const VkAllocationCallbacks*                pAllocator);

    // Provided by VK_EXT_private_data
    // Equivalent to vkDestroyPrivateDataSlot
    void vkDestroyPrivateDataSlotEXT(
        VkDevice                                    device,
        VkPrivateDataSlot                           privateDataSlot,
        const VkAllocationCallbacks*                pAllocator);

- `device` is the logical device associated with the creation of the object(s) holding the private data slot.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

- `privateDataSlot` is the private data slot to destroy.

Valid Usage

- VUID-vkDestroyPrivateDataSlot-privateDataSlot-04062
  If `VkAllocationCallbacks` were provided when `privateDataSlot` was created, a compatible set of callbacks must be provided here

- VUID-vkDestroyPrivateDataSlot-privateDataSlot-04063
  If no `VkAllocationCallbacks` were provided when `privateDataSlot` was created, `pAllocator` must be `NULL`

Valid Usage (Implicit)

- VUID-vkDestroyPrivateDataSlot-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkDestroyPrivateDataSlot-privateDataSlot-parameter
  If `privateDataSlot` is not VK_NULL_HANDLE, `privateDataSlot` must be a valid VkPrivateDataSlot handle

- VUID-vkDestroyPrivateDataSlot-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkDestroyPrivateDataSlot-privateDataSlot-parent
  If `privateDataSlot` is a valid handle, it must have been created, allocated, or retrieved from `device`

Host Synchronization

- Host access to `privateDataSlot` must be externally synchronized

To store application-defined data in a slot associated with a Vulkan object, call:

    // Provided by VK_VERSION_1_3
    VkResult vkSetPrivateData(
        VkDevice                                    device,
        VkObjectType                                objectType,
        uint64_t                                    objectHandle,
        VkPrivateDataSlot                           privateDataSlot,
        uint64_t                                    data);

    // Provided by VK_EXT_private_data
    // Equivalent to vkSetPrivateData
    VkResult vkSetPrivateDataEXT(
        VkDevice                                    device,
        VkObjectType                                objectType,
        uint64_t                                    objectHandle,
        VkPrivateDataSlot                           privateDataSlot,
        uint64_t                                    data);

- `device` is the device that created the object.

- `objectType` is a VkObjectType specifying the type of object to associate data with.

- `objectHandle` is a handle to the object to associate data with.

- `privateDataSlot` is a handle to a VkPrivateDataSlot specifying location of private data storage.

- `data` is application-defined data to associate the object with. This data will be stored at `privateDataSlot`.

Valid Usage

- VUID-vkSetPrivateData-objectHandle-04016
  `objectHandle` must be `device` or a child of `device`

- VUID-vkSetPrivateData-objectHandle-04017
  `objectHandle` must be a valid handle to an object of type `objectType`

Valid Usage (Implicit)

- VUID-vkSetPrivateData-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkSetPrivateData-objectType-parameter
  `objectType` must be a valid VkObjectType value

- VUID-vkSetPrivateData-privateDataSlot-parameter
  `privateDataSlot` must be a valid VkPrivateDataSlot handle

- VUID-vkSetPrivateData-privateDataSlot-parent
  `privateDataSlot` must have been created, allocated, or retrieved from `device`

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

To retrieve application-defined data from a slot associated with a Vulkan object, call:

    // Provided by VK_VERSION_1_3
    void vkGetPrivateData(
        VkDevice                                    device,
        VkObjectType                                objectType,
        uint64_t                                    objectHandle,
        VkPrivateDataSlot                           privateDataSlot,
        uint64_t*                                   pData);

    // Provided by VK_EXT_private_data
    // Equivalent to vkGetPrivateData
    void vkGetPrivateDataEXT(
        VkDevice                                    device,
        VkObjectType                                objectType,
        uint64_t                                    objectHandle,
        VkPrivateDataSlot                           privateDataSlot,
        uint64_t*                                   pData);

- `device` is the device that created the object

- `objectType` is a VkObjectType specifying the type of object data is associated with.

- `objectHandle` is a handle to the object data is associated with.

- `privateDataSlot` is a handle to a VkPrivateDataSlot specifying location of private data pointer storage.

- `pData` is a pointer to specify where application-defined data is returned. `0` will be written in the absence of a previous call to `vkSetPrivateData` using the object specified by `objectHandle`.

Note | Due to platform details on Android, implementations might not be able to reliably return `0` from calls to `vkGetPrivateData` for VkSwapchainKHR objects on which `vkSetPrivateData` has not previously been called. This erratum is exclusive to the Android platform and objects of type VkSwapchainKHR.

Valid Usage

- VUID-vkGetPrivateData-objectType-04018
  `objectHandle` must be `device` or a child of `device`

- VUID-vkGetPrivateData-objectHandle-09498
  `objectHandle` must be a valid handle to an object of type `objectType`

Valid Usage (Implicit)

- VUID-vkGetPrivateData-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetPrivateData-objectType-parameter
  `objectType` must be a valid VkObjectType value

- VUID-vkGetPrivateData-privateDataSlot-parameter
  `privateDataSlot` must be a valid VkPrivateDataSlot handle

- VUID-vkGetPrivateData-pData-parameter
  `pData` must be a valid pointer to a `uint64_t` value

- VUID-vkGetPrivateData-privateDataSlot-parent
  `privateDataSlot` must have been created, allocated, or retrieved from `device`

## 43. Acceleration Structures

### 43.1. Acceleration Structures

Acceleration structures are data structures used by the implementation to efficiently manage scene geometry as it is traversed during a ray tracing query. The application is responsible for managing acceleration structure objects (see Acceleration Structures), including allocation, destruction, executing builds or updates, and synchronizing resources used during ray tracing queries.

There are two types of acceleration structures, top level acceleration structures and bottom level acceleration structures.

An acceleration structure is considered to be constructed if an acceleration structure build command or copy command has been executed with the given acceleration structure as the destination.

Figure 27. Acceleration Structure
Caption

The diagram shows the relationship between top and bottom level acceleration structures.

#### 43.1.1. Geometry

Geometries refer to a triangle, sphere, linear swept sphere (LSS), or axis-aligned bounding box.

A triangle is a fundamental geometric primitive defined by three vertices in 3D space, forming a flat, planar surface.

An axis-aligned bounding box (AABB) is a rectangular box defined by two points (minimum and maximum corners) that encloses a 3D object or scene. Its faces are aligned with the coordinate axes, making intersection tests efficient for spatial partitioning and acceleration structures.

A sphere primitive is defined by a position and a radius.

The linear swept sphere (LSS) primitive is comprised of two sphere endcaps and a truncated cone midsection. The midsection is constructed so that it tangentially intersects with the endcaps. Two points, P0 and P1, and two radii, r0 and r1, fully describe the primitive.

The following figure shows an example of the LSS primitive composed of two sphere endcaps connected by a midsection. The solid non-dotted outline indicates the intersectable portion of the primitive.

Figure 28. LSS primitive

Endcaps on LSS primitives are optional and are controlled by VkAccelerationStructureGeometryLinearSweptSpheresDataNV::`endCapsMode`. The following figure shows an example of the LSS primitive without the endcaps with only the midsection present.

Figure 29. LSS primitive with no endcaps

A LSS geometry can be defined in multiple ways. If only the vertex and radius data are specified in VkAccelerationStructureGeometryLinearSweptSpheresDataNV without specifying the index data, LSS primitives are drawn in pairs of vertices. Each primitive i is defined by entries (i × 2, i × 2 + 1) in the vertex and radius buffers. For example, if a vertex buffer contains vertices A, B, C, D, E, F and G, (assuming each character represents a position vector) with corresponding radii as rA, rB, rC, rD, rE, rF and rG respectively, the LSS primitives drawn will be as shown below with G skipped because it does not have a corresponding vertex pair.

Figure 30. Lss primitives drawn with only vertex data

LSS primitives can be chained together by specifying an index buffer and indexing mode in the VkAccelerationStructureGeometryLinearSweptSpheresDataNV structure.

If the VkRayTracingLssIndexingModeNV::`indexingMode` is set to VK_RAY_TRACING_LSS_INDEXING_MODE_LIST_NV, then the consecutive pair of indices in the index buffer select the vertices that define the LSS chain. For example, assuming the same vertex buffer as before, if the index buffer contains indices [6, 5, 5, 4, 4, 3, 2, 1], the LSS primitives will be chained as shown:

Figure 31. Lss primitives drawn with VK_RAY_TRACING_LSS_INDEXING_MODE_LIST_NV indexing mode

Note that due to the lack of a [3, 2] pair, there is a break in the chain and D is not connected to C.

If the VkRayTracingLssIndexingModeNV::`indexingMode` is set to VK_RAY_TRACING_LSS_INDEXING_MODE_SUCCESSIVE_NV, then each LSS primitive is defined by two successive positions and radii, (k, k
1), where k is a single index in the index buffer. For example, if the index buffer contains indices [0, 1, 2, 4], the LSS primitives will be chained as shown below. Note that due to the absence of index 3 in the index buffer, there is a break in the chain and D is not connected to E.

Figure 32. Lss primitives drawn with VK_RAY_TRACING_LSS_INDEXING_MODE_SUCCESSIVE_NV indexing mode

#### 43.1.2. Top Level Acceleration Structures

Opaque acceleration structure for an array of instances. The descriptor or device address referencing this is the starting point for traversal.

The top level acceleration structure takes a reference to any bottom level acceleration structure referenced by its instances. Those bottom level acceleration structure objects must be valid when the top level acceleration structure is accessed.

#### 43.1.3. Bottom Level Acceleration Structures

Opaque acceleration structure for an array of geometries.

#### 43.1.4. Acceleration Structure Update Rules

The API defines two types of operations to produce acceleration structures from geometry:

- A build operation is used to construct an acceleration structure.

- An update operation is used to modify an existing acceleration structure.

An update operation imposes certain constraints on the input, in exchange for considerably faster execution. When performing an update, the application is required to provide a full description of the acceleration structure, but is prohibited from changing anything other than instance definitions, transform matrices, and vertex or AABB positions. All other aspects of the description must exactly match the one from the original build.

More precisely, the application must not use an update operation to do any of the following:

- Change primitives or instances from active to inactive, or vice versa (as defined in Inactive Primitives and Instances).

- Change the index or vertex formats of triangle geometry.

- Change triangle geometry transform pointers from null to non-null or vice versa.

- Change the number of geometries or instances in the structure.

- Change the geometry flags for any geometry in the structure.

- Change the number of vertices or primitives for any geometry in the structure.

If the original acceleration structure was built using opacity micromaps and VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_DATA_UPDATE_BIT_EXT was set in `flags`, the application must provide a micromap matching the original micromap in structure with only opacity values updated. The application is prohibited from changing anything other than the specific opacity values assigned to the triangles.

More precisely, the application must not use an update operation to do any of the following:

- Remove micromaps or VkOpacityMicromapSpecialIndexKHR values from a geometry which previously had them, or vice versa.

- Change between use of VkOpacityMicromapSpecialIndexKHR values and explicit micro-map triangles.

- Change the subdivision level or format of the micromap triangle associated with any acceleration-structure triangle.

Acceleration structures constructed by deserialization with vkCmdCopyMemoryToAccelerationStructureKHR and originally built with the VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_DATA_UPDATE_BIT_EXT flag must provide a micromap deserialized using the serialized output of the micromap that was originally referenced by the serialized acceleration structure.

Note | If applications need to update micromap data referenced by a deserialized acceleration structure, then it must originally build the acceleration structure with the VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_UPDATE_BIT_KHR flag and perform a full micromap update.

If the original acceleration structure was built using opacity micromaps and VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_UPDATE_BIT_KHR was set in `flags`, the application must provide a micromap to the update operation.

A VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_DATA_UPDATE_BIT_EXT or VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_UPDATE_BIT_KHR operation transfers the reference in the acceleration structure to the new micromap unless VkMicromapBuildSizesInfoEXT::`discardable` is VK_TRUE .

If the original acceleration structure was built using opacity micromaps and neither opacity micromap update flag is set, the application must provide the original micromap to the update operation or the deserialized micromap from the original micromap’s serialized data if the original acceleration structure was deserialized prior.

If the original acceleration structure was built using displacement micromaps and VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DISPLACEMENT_MICROMAP_UPDATE_BIT_NV was set in `flags`, the application must provide a displacement micromap to the update operation.

If the original acceleration structure was built using displacement micromaps and the displacement micromap update flag is not set the application must provide the original micromap to the update operation.

#### 43.1.5. Inactive Primitives and Instances

Acceleration structures allow the use of particular input values to signal inactive primitives or instances.

An inactive triangle is one for which the first (X) component of any vertex is NaN. If any other vertex component is NaN, and the first is not, the behavior is undefined. If the vertex format does not have a NaN representation, then all triangles are considered active.

An inactive instance is one whose acceleration structure reference is `0`.

An inactive AABB is one for which the minimum X coordinate is NaN. If any other component is NaN, and the first is not, the behavior is undefined.

An inactive LSS or sphere is one where any of the radius or position component is NaN.

In the above definitions, “NaN” refers to any type of NaN. Signaling, non-signaling, quiet, loud, or otherwise.

An inactive object is considered invisible to all rays, and should not be represented in the acceleration structure. Implementations should ensure that the presence of inactive objects does not seriously degrade traversal performance.

Inactive objects are counted in the auto-generated index sequences which are provided to shaders via `InstanceId` and `PrimitiveId` SPIR-V decorations. This allows objects in the scene to change freely between the active and inactive states, without affecting the layout of any arrays which are being indexed using the ID values.

Any transition between the active and inactive states requires a full acceleration structure rebuild. Applications must not perform an acceleration structure update where an object is active in the source acceleration structure but would be inactive in the destination, or vice versa.

The active/inactive state of primitives must not be changed with acceleration structure updates. For chained LSS, using the VK_RAY_TRACING_LSS_PRIMITIVE_END_CAPS_MODE_CHAINED_NV mode, entire chains must be either active or inactive. If any chain contains both active and inactive primitives, the behavior is undefined.

#### 43.1.6. Degenerate Primitives and Instances

Degenerate primitives and instances behave differently to inactive primitives and instances, and are defined as:

- triangles that have one or more vertices whose respective (X), (Y), (Z) components are identical, or have three vertices that have at least two of the (X), (Y), or (Z) components identical, therefore forming a line or point. Degenerate triangles do not generate any intersections.

- AABBs whose `minX`=`maxX`, `minY`=`maxY`, and `minZ`=`maxZ`. Degenerate AABBs may invoke the intersection shader.

- LSS primitives where both the radii are set to `0`.

- sphere primitives whose radius is set to `0`.

- instances that reference bottom level acceleration structures that contain no active primitives. When building an acceleration structure, implementations should treat degenerate instances as though they are a point at the instance origin, specified by VkAccelerationStructureInstanceKHR::`transform`.

Unlike inactive primitives and instances, degenerate primitives and instances may transition from the degenerate to the non-degenerate state, or vice versa, when performing an acceleration structure update.

If an acceleration structure is built without VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR set in VkAccelerationStructureInfoNV::`flags` or VkAccelerationStructureBuildGeometryInfoKHR::`flags` , degenerate primitives may be discarded. Primitives that are defined with the same index value for more than one vertex can always be discarded.

#### 43.1.7. Building Acceleration Structures

To build acceleration structures call:

    // Provided by VK_KHR_acceleration_structure
    void vkCmdBuildAccelerationStructuresKHR(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    infoCount,
        const VkAccelerationStructureBuildGeometryInfoKHR* pInfos,
        const VkAccelerationStructureBuildRangeInfoKHR* const* ppBuildRangeInfos);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `infoCount` is the number of acceleration structures to build. It specifies the number of the `pInfos` structures and `ppBuildRangeInfos` pointers that must be provided.

- `pInfos` is a pointer to an array of `infoCount` VkAccelerationStructureBuildGeometryInfoKHR structures defining the geometry used to build each acceleration structure.

- `ppBuildRangeInfos` is a pointer to an array of `infoCount` pointers to arrays of VkAccelerationStructureBuildRangeInfoKHR structures. Each `ppBuildRangeInfos`[i] is a pointer to an array of `pInfos`[i].`geometryCount` VkAccelerationStructureBuildRangeInfoKHR structures defining dynamic offsets to the addresses where geometry data is stored, as defined by `pInfos`[i].

The `vkCmdBuildAccelerationStructuresKHR` command provides the ability to initiate multiple acceleration structures builds, however there is no ordering or synchronization implied between any of the individual acceleration structure builds.

Note | This means that an application cannot build a top-level acceleration structure in the same vkCmdBuildAccelerationStructuresKHR call as the associated bottom-level or instance acceleration structures are being built. Similarly, the application cannot build a bottom-level acceleration structure in the same vkCmdBuildAccelerationStructuresKHR call as the associated micromaps are being built. There also cannot be any memory aliasing between any acceleration structure memories or scratch memories being used by any of the builds.

The input buffers passed to this commands will be referenced by the implementation for the duration of this command’s execution on the device.

After the command completes, the acceleration structure may hold a reference to any acceleration structure specified by an active instance contained therein. Apart from this referencing, acceleration structures must be fully self-contained. Micromaps must always be fully-self-contained.

The application can reuse or free any memory which was used by the command as an input or as scratch without affecting the results of future commands, provided proper synchronization is used as described below.

Note | A VkAccelerationStructureBuildRangeInfoKHR structure is not used when building an acceleration structure with any of the following geometry types, and must be NULL: VK_GEOMETRY_TYPE_DENSE_GEOMETRY_FORMAT_TRIANGLES_AMDX VK_GEOMETRY_TYPE_MICROMAP_KHR

Note | The required alignment of the device addresses passed in to parameters below might not be provided by the base address of a VkBuffer created with the correct usage flags and must still be manually aligned by the application code.

Accesses to the acceleration structure scratch buffers as identified by the VkAccelerationStructureBuildGeometryInfoKHR::`scratchData` buffer device addresses must be synchronized with the VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR pipeline stage and an access type of (VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR | VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_KHR). Accesses to each VkAccelerationStructureBuildGeometryInfoKHR::`srcAccelerationStructure` and VkAccelerationStructureBuildGeometryInfoKHR::`dstAccelerationStructure` must be synchronized with the VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR pipeline stage and an access type of VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR or VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_KHR, as appropriate.

Accesses to other input buffers as identified by any used values of VkAccelerationStructureGeometryMotionTrianglesDataNV::`vertexData`, VkAccelerationStructureGeometryMicromapDataKHR::`data`, VkAccelerationStructureGeometryMicromapDataKHR::`triangleArray`, VkAccelerationStructureDenseGeometryFormatTrianglesDataAMDX::`compressedData`, VkAccelerationStructureGeometryTrianglesDataKHR::`vertexData`, VkAccelerationStructureGeometryTrianglesDataKHR::`indexData`, VkAccelerationStructureGeometryTrianglesDataKHR::`transformData`, VkAccelerationStructureGeometryAabbsDataKHR::`data`, and VkAccelerationStructureGeometryInstancesDataKHR::`data` must be synchronized with the VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR pipeline stage and an access type of VK_ACCESS_SHADER_READ_BIT.

Valid Usage

- VUID-vkCmdBuildAccelerationStructuresKHR-accelerationStructure-08923
  The `VkPhysicalDeviceAccelerationStructureFeaturesKHR`::`accelerationStructure` feature must be enabled

- VUID-vkCmdBuildAccelerationStructuresKHR-ppBuildRangeInfos-11543
  Each element of `ppBuildRangeInfos`[i] must be a valid pointer to an array of `pInfos`[i].`geometryCount` `VkAccelerationStructureBuildRangeInfoKHR` structures if the `pInfos`[i].type is not one of:

  - VK_GEOMETRY_TYPE_DENSE_GEOMETRY_FORMAT_TRIANGLES_AMDX

  - VK_ACCELERATION_STRUCTURE_TYPE_OPACITY_MICROMAP_KHR

- VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-10906
  For each element of `pInfos`[i] whose `pGeometries` or `ppGeometries` members have a `geometryType` of VK_GEOMETRY_TYPE_DENSE_GEOMETRY_FORMAT_TRIANGLES_AMDX, `ppBuildRangeInfos`[i] must be `NULL`

- VUID-vkCmdBuildAccelerationStructuresKHR-ppBuildRangeInfos-11544
  For each element of `pInfos`[i] whose `pGeometries` or `ppGeometries` members have a `geometryType` of VK_GEOMETRY_TYPE_MICROMAP_KHR, `ppBuildRangeInfos`[i] must be `NULL`

- VUID-vkCmdBuildAccelerationStructuresKHR-mode-11545
  For each element of `pInfos`, if its `type` member is VK_ACCELERATION_STRUCTURE_TYPE_OPACITY_MICROMAP_KHR, its `mode` must equal VK_BUILD_ACCELERATION_STRUCTURE_MODE_BUILD_KHR

- VUID-vkCmdBuildAccelerationStructuresKHR-srcAccelerationStructure-11546
  For each element of `pInfos`, if its `type` member is VK_ACCELERATION_STRUCTURE_TYPE_OPACITY_MICROMAP_KHR, its `srcAccelerationStructure` must be VK_NULL_HANDLE

- VUID-vkCmdBuildAccelerationStructuresKHR-dstAccelerationStructure-11547
  For each element of `pInfos`, if its `type` member is VK_ACCELERATION_STRUCTURE_TYPE_OPACITY_MICROMAP_KHR, its `dstAccelerationStructure` member must have been created with a value of VkAccelerationStructureCreateInfoKHR::`type` equal to either VK_ACCELERATION_STRUCTURE_TYPE_OPACITY_MICROMAP_KHR or VK_ACCELERATION_STRUCTURE_TYPE_GENERIC_KHR

- VUID-vkCmdBuildAccelerationStructuresKHR-dstAccelerationStructure-11548
  The `dstAccelerationStructure` member of any element of `pInfos` must not be referenced by any VkAccelerationStructureTrianglesOpacityMicromapKHR::`micromap` member included in the `pNext` chain of any `geometry.triangles` member of any element of `pGeometries` or `ppGeometries` in any other element of `pInfos`

- VUID-vkCmdBuildAccelerationStructuresKHR-dstAccelerationStructure-11549
  The range of memory backing the `dstAccelerationStructure` member of any element of `pInfos` that is accessed by this command must not overlap the memory backing any VkAccelerationStructureTrianglesOpacityMicromapKHR::`micromap` member included in the `pNext` chain of any `geometry.triangles` member of any element of `pGeometries` or `ppGeometries` in any other element of `pInfos`, which is accessed by this command

- VUID-vkCmdBuildAccelerationStructuresKHR-micromap-11550
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries`, if it includes a VkAccelerationStructureGeometryMicromapDataKHR structure in its `pNext` chain, its `data` and `triangleArray` members must be a valid VkDeviceAddress

- VUID-vkCmdBuildAccelerationStructuresKHR-micromap-11551
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries`, if it includes a VkAccelerationStructureGeometryMicromapDataKHR structure in its `pNext` chain, the buffers from which the buffer device addresses for its `data` and `triangleArray` members are queried must have been created with the VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_BUILD_INPUT_READ_ONLY_BIT_KHR usage flag

- VUID-vkCmdBuildAccelerationStructuresKHR-micromap-11552
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries`, if it includes a VkAccelerationStructureGeometryMicromapDataKHR structure in its `pNext` chain, its `data` and `triangleArray` members must be a multiple of `128`

- VUID-vkCmdBuildAccelerationStructuresKHR-micromap-11553
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries`, if it includes a VkAccelerationStructureGeometryMicromapDataKHR structure in its `pNext` chain, each element of its `triangleArray` member must specify an access within the range of the VkBuffer that `data` was retrieved from, given by [`dataOffset`, `dataOffset`
  triangleSize] where triangleSize is calculated using its `format` and `subdivisionLevel` members rounded up to the nearest byte

- VUID-vkCmdBuildAccelerationStructuresKHR-micromap-11554
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries`, if it includes a VkAccelerationStructureGeometryMicromapDataKHR structure in its `pNext` chain, the range of [`triangleArray`, `triangleArray` + (`triangleArrayStride` * numTriangles)] must be within the range of the VkBuffer from which the `triangleArray` member was retrieved from, where numTriangles is the sum of `count` of all elements of `pUsageCounts` or `ppUsageCounts`

- VUID-vkCmdBuildAccelerationStructuresKHR-micromap-11555
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries`, if it includes a VkAccelerationStructureGeometryMicromapDataKHR structure in its `pNext` chain, each element of its `geometry.triangleArray` member must have a `format` with a valid value from VkOpacityMicromapFormatKHR

- VUID-vkCmdBuildAccelerationStructuresKHR-micromap-11556
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries`, if it includes a VkAccelerationStructureGeometryMicromapDataKHR structure in its `pNext` chain, for each element of its `triangleArray` member with a `format` equal to VK_OPACITY_MICROMAP_FORMAT_2_STATE_KHR, `subdivisionLevel` must be less than or equal to `maxOpacity2StateSubdivisionLevel`

- VUID-vkCmdBuildAccelerationStructuresKHR-indexBuffer-11575
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` equal to VK_GEOMETRY_TYPE_TRIANGLES_KHR, if its `geometry.triangles` member includes a VkAccelerationStructureTrianglesOpacityMicromapKHR structure in its `pNext` chain, the micromap’s `indexType` member is not VK_INDEX_TYPE_NONE_KHR, and `micromap` is not VK_NULL_HANDLE, for each index in `indexBuffer`[j] greater than zero where j is within the range [0, numTrianglesInGeometry - 1] where numTrianglesInGeometry is equal to `ppBuildRangeInfos`[i]→primitiveCount, index plus `baseTriangle` must be less than or equal to numTriangles, where numTriangles is given by the sum of all `count` parameters in the `pUsageCounts` or `ppUsageCounts` provided to the micromap’s build command

- VUID-vkCmdBuildAccelerationStructuresKHR-indexBuffer-11577
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` equal to VK_GEOMETRY_TYPE_TRIANGLES_KHR, if its `geometry.triangles` member includes a VkAccelerationStructureTrianglesOpacityMicromapKHR structure in its `pNext` chain, and the micromap’s `indexType` member is not VK_INDEX_TYPE_NONE_KHR, `indexBuffer`
  (`indexStride` * numTrianglesInGeometry) must be within the range of the VkBuffer from which the `indexBuffer` device address was obtained from where numTrianglesInGeometry is equal to `ppBuildRangeInfos`[i]→primitiveCount

- VUID-vkCmdBuildAccelerationStructuresKHR-indexBuffer-11578
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` equal to VK_GEOMETRY_TYPE_TRIANGLES_KHR, if its `geometry.triangles` member includes a VkAccelerationStructureTrianglesOpacityMicromapKHR structure in its `pNext` chain, the micromap’s `indexType` member is not VK_INDEX_TYPE_NONE_KHR, and `micromap` is VK_NULL_HANDLE, for each index in `indexBuffer`[j] where j is within the range from [0, numTrianglesInGeometry - 1], index must be a valid VkOpacityMicromapSpecialIndexKHR value where numTrianglesInGeometry is equal to `ppBuildRangeInfos`[i]→primitiveCount

- VUID-vkCmdBuildAccelerationStructuresKHR-mode-04628
  The `mode` member of each element of `pInfos` must be a valid VkBuildAccelerationStructureModeKHR value

- VUID-vkCmdBuildAccelerationStructuresKHR-srcAccelerationStructure-04629
  If the `srcAccelerationStructure` member of any element of `pInfos` is not VK_NULL_HANDLE, the `srcAccelerationStructure` member must be a valid VkAccelerationStructureKHR handle

- VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-04630
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, its `srcAccelerationStructure` member must not be VK_NULL_HANDLE

- VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-03708
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, `srcAccelerationStructure` must be fully backed by physical memory

- VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-03403
  The `srcAccelerationStructure` member of any element of `pInfos` must not be the same acceleration structure as the `dstAccelerationStructure` member of any other element of `pInfos`

- VUID-vkCmdBuildAccelerationStructuresKHR-dstAccelerationStructure-03698
  The `dstAccelerationStructure` member of any element of `pInfos` must not be the same acceleration structure as the `dstAccelerationStructure` member of any other element of `pInfos`

- VUID-vkCmdBuildAccelerationStructuresKHR-dstAccelerationStructure-03800
  The `dstAccelerationStructure` member of any element of `pInfos` must be a valid VkAccelerationStructureKHR handle

- VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-03707
  For each element of `pInfos`, its `dstAccelerationStructure` member must be fully backed by physical memory

- VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-03699
  For each element of `pInfos`, if its `type` member is VK_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR, its `dstAccelerationStructure` member must have been created with a value of VkAccelerationStructureCreateInfoKHR::`type` equal to either VK_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR or VK_ACCELERATION_STRUCTURE_TYPE_GENERIC_KHR

- VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-03700
  For each element of `pInfos`, if its `type` member is VK_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR, its `dstAccelerationStructure` member must have been created with a value of VkAccelerationStructureCreateInfoKHR::`type` equal to either VK_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR or VK_ACCELERATION_STRUCTURE_TYPE_GENERIC_KHR

- VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-03663
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, inactive primitives in its `srcAccelerationStructure` member must not be made active

- VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-03664
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, active primitives in its `srcAccelerationStructure` member must not be made inactive

- VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-03709
  For each element of `pInfos`, if an acceleration structure is referenced by the `geometry.instances.data` member of any element of `pGeometries` or `ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_INSTANCES_KHR, it must be fully backed by physical memory

- VUID-vkCmdBuildAccelerationStructuresKHR-None-03407
  The `dstAccelerationStructure` member of any element of `pInfos` must not be referenced by the `geometry.instances.data` member of any element of `pGeometries` or `ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_INSTANCES_KHR in any other element of `pInfos`

- VUID-vkCmdBuildAccelerationStructuresKHR-dstAccelerationStructure-03701
  The range of memory backing the `dstAccelerationStructure` member of any element of `pInfos` that is accessed by this command must not overlap the memory backing the `srcAccelerationStructure` member of any other element of `pInfos` with a `mode` equal to VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, which is accessed by this command

- VUID-vkCmdBuildAccelerationStructuresKHR-dstAccelerationStructure-03702
  The range of memory backing the `dstAccelerationStructure` member of any element of `pInfos` that is accessed by this command must not overlap the memory backing the `dstAccelerationStructure` member of any other element of `pInfos`, which is accessed by this command

- VUID-vkCmdBuildAccelerationStructuresKHR-dstAccelerationStructure-03703
  The range of memory backing the `dstAccelerationStructure` member of any element of `pInfos` that is accessed by this command must not overlap the memory backing the `scratchData` member of any element of `pInfos` (including the same element), which is accessed by this command

- VUID-vkCmdBuildAccelerationStructuresKHR-scratchData-03704
  The range of memory backing the `scratchData` member of any element of `pInfos` that is accessed by this command must not overlap the memory backing the `scratchData` member of any other element of `pInfos`, which is accessed by this command

- VUID-vkCmdBuildAccelerationStructuresKHR-scratchData-03705
  The range of memory backing the `scratchData` member of any element of `pInfos` that is accessed by this command must not overlap the memory backing the `srcAccelerationStructure` member of any element of `pInfos` with a `mode` equal to VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR (including the same element), which is accessed by this command

- VUID-vkCmdBuildAccelerationStructuresKHR-dstAccelerationStructure-03706
  The range of memory backing the `dstAccelerationStructure` member of any element of `pInfos` that is accessed by this command must not overlap the memory backing any acceleration structure referenced by the `geometry.instances.data` member of any element of `pGeometries` or `ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_INSTANCES_KHR in any other element of `pInfos`, which is accessed by this command

- VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-03667
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, its `srcAccelerationStructure` member must have previously been constructed with VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR set in VkAccelerationStructureBuildGeometryInfoKHR::`flags` in the build

- VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-03668
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, its `srcAccelerationStructure` and `dstAccelerationStructure` members must either be the same VkAccelerationStructureKHR, or not have any memory aliasing

- VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-03758
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, its `geometryCount` member must have the same value which was specified when `srcAccelerationStructure` was last built

- VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-03759
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, its `flags` member must have the same value which was specified when `srcAccelerationStructure` was last built

- VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-03760
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, its `type` member must have the same value which was specified when `srcAccelerationStructure` was last built

- VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-03761
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for each `VkAccelerationStructureGeometryKHR` structure referred to by its `pGeometries` or `ppGeometries` members, its `geometryType` member must have the same value which was specified when `srcAccelerationStructure` was last built

- VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-03762
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for each `VkAccelerationStructureGeometryKHR` structure referred to by its `pGeometries` or `ppGeometries` members, its `flags` member must have the same value which was specified when `srcAccelerationStructure` was last built

- VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-03763
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for each `VkAccelerationStructureGeometryKHR` structure referred to by its `pGeometries` or `ppGeometries` members, if `geometryType` is VK_GEOMETRY_TYPE_TRIANGLES_KHR, its `geometry.triangles.vertexFormat` member must have the same value which was specified when `srcAccelerationStructure` was last built

- VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-03764
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for each `VkAccelerationStructureGeometryKHR` structure referred to by its `pGeometries` or `ppGeometries` members, if `geometryType` is VK_GEOMETRY_TYPE_TRIANGLES_KHR, its `geometry.triangles.maxVertex` member must have the same value which was specified when `srcAccelerationStructure` was last built

- VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-03765
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for each `VkAccelerationStructureGeometryKHR` structure referred to by its `pGeometries` or `ppGeometries` members, if `geometryType` is VK_GEOMETRY_TYPE_TRIANGLES_KHR, its `geometry.triangles.indexType` member must have the same value which was specified when `srcAccelerationStructure` was last built

- VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-03766
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for each `VkAccelerationStructureGeometryKHR` structure referred to by its `pGeometries` or `ppGeometries` members, if `geometryType` is VK_GEOMETRY_TYPE_TRIANGLES_KHR, if its `geometry.triangles.transformData` address was `NULL` when `srcAccelerationStructure` was last built, then it must be `NULL`

- VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-03767
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for each `VkAccelerationStructureGeometryKHR` structure referred to by its `pGeometries` or `ppGeometries` members, if `geometryType` is VK_GEOMETRY_TYPE_TRIANGLES_KHR, if its `geometry.triangles.transformData` address was not `NULL` when `srcAccelerationStructure` was last built, then it must not be `NULL`

- VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-10898
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for each `VkAccelerationStructureGeometryKHR` structure referred to by its `pGeometries` or `ppGeometries` members, if `geometryType` is VK_GEOMETRY_TYPE_DENSE_GEOMETRY_FORMAT_TRIANGLES_AMDX, the `numTriangles` member of the `VkAccelerationStructureDenseGeometryFormatTrianglesDataAMDX` structure in the `pNext` chain must have the same value which was specified when `srcAccelerationStructure` was last built

- VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-10899
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for each `VkAccelerationStructureGeometryKHR` structure referred to by its `pGeometries` or `ppGeometries` members, if `geometryType` is VK_GEOMETRY_TYPE_DENSE_GEOMETRY_FORMAT_TRIANGLES_AMDX, the `numVertices` member of the `VkAccelerationStructureDenseGeometryFormatTrianglesDataAMDX` structure in the `pNext` chain must have the same value which was specified when `srcAccelerationStructure` was last built

- VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-10900
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for each `VkAccelerationStructureGeometryKHR` structure referred to by its `pGeometries` or `ppGeometries` members, if `geometryType` is VK_GEOMETRY_TYPE_DENSE_GEOMETRY_FORMAT_TRIANGLES_AMDX, the `maxPrimitiveIndex` member of the `VkAccelerationStructureDenseGeometryFormatTrianglesDataAMDX` structure in the `pNext` chain must have the same value which was specified when `srcAccelerationStructure` was last built

- VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-10901
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for each `VkAccelerationStructureGeometryKHR` structure referred to by its `pGeometries` or `ppGeometries` members, if `geometryType` is VK_GEOMETRY_TYPE_DENSE_GEOMETRY_FORMAT_TRIANGLES_AMDX, the `maxGeometryIndex` member of the `VkAccelerationStructureDenseGeometryFormatTrianglesDataAMDX` structure in the `pNext` chain must have the same value which was specified when `srcAccelerationStructure` was last built

- VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-10902
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for each `VkAccelerationStructureGeometryKHR` structure referred to by its `pGeometries` or `ppGeometries` members, if `geometryType` is VK_GEOMETRY_TYPE_DENSE_GEOMETRY_FORMAT_TRIANGLES_AMDX, the `format` member of the `VkAccelerationStructureDenseGeometryFormatTrianglesDataAMDX` structure in the `pNext` chain must have the same value which was specified when `srcAccelerationStructure` was last built

- VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-10903
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for each `VkAccelerationStructureGeometryKHR` structure referred to by its `pGeometries` or `ppGeometries` members, if `geometryType` is VK_GEOMETRY_TYPE_DENSE_GEOMETRY_FORMAT_TRIANGLES_AMDX, the `dataSize` member of the `VkAccelerationStructureDenseGeometryFormatTrianglesDataAMDX` structure in the `pNext` chain must have the same value which was specified when `srcAccelerationStructure` was last built

- VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-03768
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for each `VkAccelerationStructureGeometryKHR` structure referred to by its `pGeometries` or `ppGeometries` members, if `geometryType` is VK_GEOMETRY_TYPE_TRIANGLES_KHR, and `geometry.triangles.indexType` is not VK_INDEX_TYPE_NONE_KHR, then the value of each index referenced must be the same as the corresponding index value when `srcAccelerationStructure` was last built

- VUID-vkCmdBuildAccelerationStructuresKHR-primitiveCount-03769
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for each `VkAccelerationStructureGeometryKHR` structure referred to by its `pGeometries` or `ppGeometries` members, the `primitiveCount` member of its corresponding `VkAccelerationStructureBuildRangeInfoKHR` structure must have the same value which was specified when `srcAccelerationStructure` was last built

- VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-03801
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_INSTANCES_KHR, the corresponding `ppBuildRangeInfos`[i][j].`primitiveCount` must be less than or equal to VkPhysicalDeviceAccelerationStructurePropertiesKHR::`maxInstanceCount`

- VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-12258
  If `pInfos`[i].`mode` is VK_BUILD_ACCELERATION_STRUCTURE_MODE_BUILD_KHR, and N is not `0`, all addresses between `pInfos`[i].`scratchData.deviceAddress` and `pInfos`[i].`scratchData.deviceAddress` + N - 1 must be in the buffer device address range of the same buffer, where N is given by the `buildScratchSize` member of the VkAccelerationStructureBuildSizesInfoKHR structure returned from a call to vkGetAccelerationStructureBuildSizesKHR with an identical VkAccelerationStructureBuildGeometryInfoKHR structure and primitive count

- VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-12259
  If `pInfos`[i].`mode` is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, and N is not `0`, all addresses between `pInfos`[i].`scratchData.deviceAddress` and `pInfos`[i].`scratchData.deviceAddress` + N - 1 must be in the buffer device address range of the same buffer, where N is given by the `updateScratchSize` member of the VkAccelerationStructureBuildSizesInfoKHR structure returned from a call to vkGetAccelerationStructureBuildSizesKHR with an identical VkAccelerationStructureBuildGeometryInfoKHR structure and primitive count

- VUID-vkCmdBuildAccelerationStructuresKHR-geometry-03673
  The buffers from which the buffer device addresses for all of the `geometry.triangles.vertexData`, `geometry.triangles.indexData`, `geometry.triangles.transformData`, `geometry.aabbs.data`, and `geometry.instances.data` members of all `pInfos`[i].`pGeometries` and `pInfos`[i].`ppGeometries` are queried must have been created with the VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_BUILD_INPUT_READ_ONLY_BIT_KHR usage flag set

- VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-12260
  If `pInfos`[i].`mode` is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, and the size reported by `updateScratchSize` member of the VkAccelerationStructureBuildSizesInfoKHR structure returned from a call to vkGetAccelerationStructureBuildSizesKHR with an identical VkAccelerationStructureBuildGeometryInfoKHR structure and primitive count is non-zero, `pInfos`[i].`scratchData.deviceAddress` must be a device address allocated to the application from a buffer created with the VK_BUFFER_USAGE_STORAGE_BUFFER_BIT usage flag set

- VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-12261
  If `pInfos`[i].`mode` is VK_BUILD_ACCELERATION_STRUCTURE_MODE_BUILD_KHR, and the size reported by `buildScratchSize` member of the VkAccelerationStructureBuildSizesInfoKHR structure returned from a call to vkGetAccelerationStructureBuildSizesKHR with an identical VkAccelerationStructureBuildGeometryInfoKHR structure and primitive count is non-zero, `pInfos`[i].`scratchData.deviceAddress` must be a device address allocated to the application from a buffer created with the VK_BUFFER_USAGE_STORAGE_BUFFER_BIT usage flag set

- VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-03710
  For each element of `pInfos`, its `scratchData.deviceAddress` member must be a multiple of VkPhysicalDeviceAccelerationStructurePropertiesKHR::`minAccelerationStructureScratchOffsetAlignment`

- VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-03804
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_TRIANGLES_KHR, `geometry.triangles.vertexData.deviceAddress` must be a valid VkDeviceAddress

- VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-03711
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_TRIANGLES_KHR, `geometry.triangles.vertexData.deviceAddress` must be aligned to:

  - the size of the format specified in `vertexFormat`, in bytes, if that format is a packed format

  - the component size of the format specified in `vertexFormat`, in bytes, if that format is not a packed format

- VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-03806
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_TRIANGLES_KHR, if `geometry.triangles.indexType` is not VK_INDEX_TYPE_NONE_KHR, `geometry.triangles.indexData.deviceAddress` must be a valid VkDeviceAddress

- VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-03712
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_TRIANGLES_KHR, and with `geometry.triangles.indexType` not equal to VK_INDEX_TYPE_NONE_KHR, `geometry.triangles.indexData.deviceAddress` must be aligned to the size in bytes of the type in `indexType`

- VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-03808
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_TRIANGLES_KHR, if `geometry.triangles.transformData.deviceAddress` is not `0`, it must be a valid VkDeviceAddress

- VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-03810
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_TRIANGLES_KHR, if `geometry.triangles.transformData.deviceAddress` is not `0`, it must be aligned to `16` bytes

- VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-03811
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_AABBS_KHR, `geometry.aabbs.data.deviceAddress` must be a valid VkDeviceAddress

- VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-03714
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_AABBS_KHR, `geometry.aabbs.data.deviceAddress` must be aligned to `8` bytes

- VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-03715
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_INSTANCES_KHR, if `geometry.arrayOfPointers` is VK_FALSE, `geometry.instances.data.deviceAddress` must be aligned to `16` bytes

- VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-03716
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_INSTANCES_KHR, if `geometry.arrayOfPointers` is VK_TRUE, `geometry.instances.data.deviceAddress` must be aligned to `8` bytes

- VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-03717
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_INSTANCES_KHR, if `geometry.arrayOfPointers` is VK_TRUE, each element of `geometry.instances.data.deviceAddress` in device memory must be aligned to `16` bytes

- VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-03813
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_INSTANCES_KHR, `geometry.instances.data.deviceAddress` must be a valid VkDeviceAddress

- VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-12281
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_INSTANCES_KHR, each VkAccelerationStructureInstanceKHR::`accelerationStructureReference` value in `geometry.instances.data.deviceAddress` must be `0` or a value obtained from vkGetAccelerationStructureDeviceAddressKHR for a valid bottom level acceleration structure

- VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-10607
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_INSTANCES_KHR, if VK_GEOMETRY_INSTANCE_DISABLE_OPACITY_MICROMAPS_BIT_KHR is set in VkAccelerationStructureInstanceKHR::`flags` then `geometry.instances.data.deviceAddress` must refer to an acceleration structure that was built with VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DISABLE_OPACITY_MICROMAPS_BIT_KHR set in VkAccelerationStructureBuildGeometryInfoKHR::`flags`

- VUID-vkCmdBuildAccelerationStructuresKHR-commandBuffer-09547
  `commandBuffer` must not be a protected command buffer

- VUID-vkCmdBuildAccelerationStructuresKHR-micromap-11701
  For any element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_TRIANGLES_KHR, if there is an instance of VkAccelerationStructureTrianglesOpacityMicromapKHR in the `geometry.triangles.pNext` chain with a valid `micromap` member, then the `micromap` member must have been constructed prior to this command’s execution on the device

- VUID-vkCmdBuildAccelerationStructuresKHR-micromap-11624
  For any element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_TRIANGLES_KHR, if there is an instance of VkAccelerationStructureTrianglesOpacityMicromapKHR in the `geometry.triangles.pNext` chain with a valid `micromap` member, then the `micromap` member must have been built with a `type` of VK_ACCELERATION_STRUCTURE_TYPE_OPACITY_MICROMAP_KHR

- VUID-vkCmdBuildAccelerationStructuresKHR-micromap-11625
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for each `VkAccelerationStructureGeometryKHR` structure referred to by its `pGeometries` or `ppGeometries` members, if `geometryType` is VK_GEOMETRY_TYPE_TRIANGLES_KHR, and the same geometry in the original build of `srcAccelerationStructure` was built with an instance of VkAccelerationStructureTrianglesOpacityMicromapKHR in its `geometry.triangles.pNext` chain with a valid `micromap` member, then an instance of VkAccelerationStructureTrianglesOpacityMicromapKHR must be included in the in the `geometry.triangles.pNext` chain with a valid `micromap` member

- VUID-vkCmdBuildAccelerationStructuresKHR-micromap-11626
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for each `VkAccelerationStructureGeometryKHR` structure referred to by its `pGeometries` or `ppGeometries` members, if `geometryType` is VK_GEOMETRY_TYPE_TRIANGLES_KHR, and the same geometry in the original build of `srcAccelerationStructure` was built with an instance of VkAccelerationStructureTrianglesOpacityMicromapKHR in its `geometry.triangles.pNext` chain with its `micromap` member equal to `VK_NULL_HANDLE`, then an instance of VkAccelerationStructureTrianglesOpacityMicromapKHR must be included in the in the `geometry.triangles.pNext` chain with its `micromap` member equal to `VK_NULL_HANDLE`

- VUID-vkCmdBuildAccelerationStructuresKHR-micromap-11627
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for each `VkAccelerationStructureGeometryKHR` structure referred to by its `pGeometries` or `ppGeometries` members, if `geometryType` is VK_GEOMETRY_TYPE_TRIANGLES_KHR, and the same geometry in the original build of `srcAccelerationStructure` was not built with an instance of VkAccelerationStructureTrianglesOpacityMicromapKHR in its `geometry.triangles.pNext` chain, then an instance of VkAccelerationStructureTrianglesOpacityMicromapKHR must not be included in the in the `geometry.triangles.pNext` chain

- VUID-vkCmdBuildAccelerationStructuresKHR-micromap-11628
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, its `srcAccelerationStructure` was originally built without the VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_UPDATE_BIT_KHR flag, and `srcAccelerationStructure` was constructed by deserialization with vkCmdCopyMemoryToAccelerationStructureKHR, then for each `VkAccelerationStructureGeometryKHR` structure referred to by its `pGeometries` or `ppGeometries` members, if `geometryType` is VK_GEOMETRY_TYPE_TRIANGLES_KHR, and the same geometry in the original build of `srcAccelerationStructure` was built with an instance of VkAccelerationStructureTrianglesOpacityMicromapKHR in its `geometry.triangles.pNext` chain with a valid `micromap` member, then an instance of VkAccelerationStructureTrianglesOpacityMicromapKHR must be included in the in the `geometry.triangles.pNext` chain with a `micromap` that was deserialized from the serialized data of the `micromap` in the original build of `srcAccelerationStructure`

- VUID-vkCmdBuildAccelerationStructuresKHR-micromap-11629
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, its `srcAccelerationStructure` was originally built without either the VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_DATA_UPDATE_BIT_EXT or the VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_UPDATE_BIT_KHR flags, and `srcAccelerationStructure` was not constructed by deserialization with vkCmdCopyMemoryToAccelerationStructureKHR, then for each `VkAccelerationStructureGeometryKHR` structure referred to by its `pGeometries` or `ppGeometries` members, if `geometryType` is VK_GEOMETRY_TYPE_TRIANGLES_KHR, and the same geometry in the original build of `srcAccelerationStructure` was built with an instance of VkAccelerationStructureTrianglesOpacityMicromapKHR in its `geometry.triangles.pNext` chain with a valid `micromap` member, then an instance of VkAccelerationStructureTrianglesOpacityMicromapKHR must be included in the in the `geometry.triangles.pNext` chain with the same `micromap` handle as the original build

- VUID-vkCmdBuildAccelerationStructuresKHR-micromap-11632
  For any element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_TRIANGLES_KHR, if there is an instance of VkAccelerationStructureTrianglesOpacityMicromapEXT in the `geometry.triangles.pNext` chain, then its `micromap` member must have been constructed prior to this command’s execution on the device

- VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-10904
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_TRIANGLES_KHR, if there is an instance of VkAccelerationStructureTrianglesOpacityMicromapEXT in the `geometry.triangles.pNext` chain, and its `indexType` is VK_INDEX_TYPE_NONE_KHR, then its `indexBuffer.deviceAddress` must be 0

- VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-10905
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_TRIANGLES_KHR, if there is an instance of VkAccelerationStructureTrianglesOpacityMicromapEXT in the `geometry.triangles.pNext` chain, and its `indexType` is not VK_INDEX_TYPE_NONE_KHR, then its `indexBuffer.deviceAddress` must be a valid VkDeviceAddress

- VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-11846
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_SPHERES_NV, if VkAccelerationStructureGeometrySpheresDataNV::`indexType` is VK_INDEX_TYPE_NONE_KHR, then its `indexData.deviceAddress` must be 0

- VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-11847
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_SPHERES_NV, if VkAccelerationStructureGeometrySpheresDataNV::`indexType` is not VK_INDEX_TYPE_NONE_KHR, then its `indexData.deviceAddress` must be a valid VkDeviceAddress

- VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-11848
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_SPHERES_NV, VkAccelerationStructureGeometrySpheresDataNV::`vertexData.deviceAddress` must be a valid VkDeviceAddress

- VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-11849
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_SPHERES_NV, VkAccelerationStructureGeometrySpheresDataNV::`radiusData.deviceAddress` must be a valid VkDeviceAddress

- VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-11850
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_LINEAR_SWEPT_SPHERES_NV, if VkAccelerationStructureGeometryLinearSweptSpheresDataNV::`indexType` is VK_INDEX_TYPE_NONE_KHR, then its `indexData.deviceAddress` must be 0

- VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-11851
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_LINEAR_SWEPT_SPHERES_NV, if VkAccelerationStructureGeometryLinearSweptSpheresDataNV::`indexType` is not VK_INDEX_TYPE_NONE_KHR, then its `indexData.deviceAddress` must be a valid VkDeviceAddress

- VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-11852
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_LINEAR_SWEPT_SPHERES_NV, VkAccelerationStructureGeometryLinearSweptSpheresDataNV::`vertexData.deviceAddress` must be a valid VkDeviceAddress

- VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-11853
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_LINEAR_SWEPT_SPHERES_NV, VkAccelerationStructureGeometryLinearSweptSpheresDataNV::`radiusData.deviceAddress` must be a valid VkDeviceAddress

- VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-10126
  For each `pInfos`[i], `dstAccelerationStructure` must have been created with a value of VkAccelerationStructureCreateInfoKHR::`size` greater than or equal to either:

  - the memory size required by the build operation, as returned by vkGetAccelerationStructureBuildSizesKHR with `pBuildInfo` = `pInfos`[i] and with each element of the `pMaxPrimitiveCounts` array greater than or equal to the equivalent `ppBuildRangeInfos`[i][j].`primitiveCount` values for `j` in [0,`pInfos`[i].`geometryCount`) or,

  - the result of querying the corresponding VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_KHR, if updating a compacted acceleration structure

- VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-11845
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_TRIANGLES_KHR, if there is an instance of VkAccelerationStructureGeometryMotionTrianglesDataNV in the `geometry.triangles.pNext` chain, then its `vertexData.deviceAddress` must be a valid VkDeviceAddress

Valid Usage (Implicit)

- VUID-vkCmdBuildAccelerationStructuresKHR-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-parameter
  `pInfos` must be a valid pointer to an array of `infoCount` valid VkAccelerationStructureBuildGeometryInfoKHR structures

- VUID-vkCmdBuildAccelerationStructuresKHR-ppBuildRangeInfos-parameter
  `ppBuildRangeInfos` must be a valid pointer to an array of `infoCount` VkAccelerationStructureBuildRangeInfoKHR structures

- VUID-vkCmdBuildAccelerationStructuresKHR-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdBuildAccelerationStructuresKHR-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT operations

- VUID-vkCmdBuildAccelerationStructuresKHR-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdBuildAccelerationStructuresKHR-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdBuildAccelerationStructuresKHR-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdBuildAccelerationStructuresKHR-infoCount-arraylength
  `infoCount` must be greater than `0`

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Outside | VK_QUEUE_COMPUTE_BIT | Action

Conditional Rendering

vkCmdBuildAccelerationStructuresKHR is not affected by conditional rendering

To build acceleration structures with some parameters sourced on the device call:

    // Provided by VK_KHR_acceleration_structure
    void vkCmdBuildAccelerationStructuresIndirectKHR(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    infoCount,
        const VkAccelerationStructureBuildGeometryInfoKHR* pInfos,
        const VkDeviceAddress*                      pIndirectDeviceAddresses,
        const uint32_t*                             pIndirectStrides,
        const uint32_t* const*                      ppMaxPrimitiveCounts);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `infoCount` is the number of acceleration structures to build.

- `pInfos` is a pointer to an array of `infoCount` VkAccelerationStructureBuildGeometryInfoKHR structures defining the geometry used to build each acceleration structure.

- `pIndirectDeviceAddresses` is a pointer to an array of `infoCount` buffer device addresses which point to `pInfos`[i].`geometryCount` VkAccelerationStructureBuildRangeInfoKHR structures defining dynamic offsets to the addresses where geometry data is stored, as defined by `pInfos`[i].

- `pIndirectStrides` is a pointer to an array of `infoCount` byte strides between elements of `pIndirectDeviceAddresses`.

- `ppMaxPrimitiveCounts` is a pointer to an array of `infoCount` pointers to arrays of `pInfos`[i].`geometryCount` values indicating the maximum number of primitives that will be built by this command for each geometry.

Accesses to any device memory referenced by this command must be synchronized as with vkCmdBuildAccelerationStructuresKHR.

Accesses to any element of `pIndirectDeviceAddresses` must be synchronized with the VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR pipeline stage and an access type of VK_ACCESS_INDIRECT_COMMAND_READ_BIT.

Valid Usage

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-accelerationStructureIndirectBuild-03650
  The `VkPhysicalDeviceAccelerationStructureFeaturesKHR`::`accelerationStructureIndirectBuild` feature must be enabled

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-mode-04628
  The `mode` member of each element of `pInfos` must be a valid VkBuildAccelerationStructureModeKHR value

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-srcAccelerationStructure-04629
  If the `srcAccelerationStructure` member of any element of `pInfos` is not VK_NULL_HANDLE, the `srcAccelerationStructure` member must be a valid VkAccelerationStructureKHR handle

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-pInfos-04630
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, its `srcAccelerationStructure` member must not be VK_NULL_HANDLE

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-pInfos-03708
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, `srcAccelerationStructure` must be fully backed by physical memory

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-pInfos-03403
  The `srcAccelerationStructure` member of any element of `pInfos` must not be the same acceleration structure as the `dstAccelerationStructure` member of any other element of `pInfos`

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-dstAccelerationStructure-03698
  The `dstAccelerationStructure` member of any element of `pInfos` must not be the same acceleration structure as the `dstAccelerationStructure` member of any other element of `pInfos`

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-dstAccelerationStructure-03800
  The `dstAccelerationStructure` member of any element of `pInfos` must be a valid VkAccelerationStructureKHR handle

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-pInfos-03707
  For each element of `pInfos`, its `dstAccelerationStructure` member must be fully backed by physical memory

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-pInfos-03699
  For each element of `pInfos`, if its `type` member is VK_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR, its `dstAccelerationStructure` member must have been created with a value of VkAccelerationStructureCreateInfoKHR::`type` equal to either VK_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR or VK_ACCELERATION_STRUCTURE_TYPE_GENERIC_KHR

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-pInfos-03700
  For each element of `pInfos`, if its `type` member is VK_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR, its `dstAccelerationStructure` member must have been created with a value of VkAccelerationStructureCreateInfoKHR::`type` equal to either VK_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR or VK_ACCELERATION_STRUCTURE_TYPE_GENERIC_KHR

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-pInfos-03663
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, inactive primitives in its `srcAccelerationStructure` member must not be made active

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-pInfos-03664
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, active primitives in its `srcAccelerationStructure` member must not be made inactive

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-pInfos-03709
  For each element of `pInfos`, if an acceleration structure is referenced by the `geometry.instances.data` member of any element of `pGeometries` or `ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_INSTANCES_KHR, it must be fully backed by physical memory

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-None-03407
  The `dstAccelerationStructure` member of any element of `pInfos` must not be referenced by the `geometry.instances.data` member of any element of `pGeometries` or `ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_INSTANCES_KHR in any other element of `pInfos`

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-dstAccelerationStructure-03701
  The range of memory backing the `dstAccelerationStructure` member of any element of `pInfos` that is accessed by this command must not overlap the memory backing the `srcAccelerationStructure` member of any other element of `pInfos` with a `mode` equal to VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, which is accessed by this command

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-dstAccelerationStructure-03702
  The range of memory backing the `dstAccelerationStructure` member of any element of `pInfos` that is accessed by this command must not overlap the memory backing the `dstAccelerationStructure` member of any other element of `pInfos`, which is accessed by this command

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-dstAccelerationStructure-03703
  The range of memory backing the `dstAccelerationStructure` member of any element of `pInfos` that is accessed by this command must not overlap the memory backing the `scratchData` member of any element of `pInfos` (including the same element), which is accessed by this command

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-scratchData-03704
  The range of memory backing the `scratchData` member of any element of `pInfos` that is accessed by this command must not overlap the memory backing the `scratchData` member of any other element of `pInfos`, which is accessed by this command

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-scratchData-03705
  The range of memory backing the `scratchData` member of any element of `pInfos` that is accessed by this command must not overlap the memory backing the `srcAccelerationStructure` member of any element of `pInfos` with a `mode` equal to VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR (including the same element), which is accessed by this command

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-dstAccelerationStructure-03706
  The range of memory backing the `dstAccelerationStructure` member of any element of `pInfos` that is accessed by this command must not overlap the memory backing any acceleration structure referenced by the `geometry.instances.data` member of any element of `pGeometries` or `ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_INSTANCES_KHR in any other element of `pInfos`, which is accessed by this command

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-pInfos-03667
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, its `srcAccelerationStructure` member must have previously been constructed with VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR set in VkAccelerationStructureBuildGeometryInfoKHR::`flags` in the build

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-pInfos-03668
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, its `srcAccelerationStructure` and `dstAccelerationStructure` members must either be the same VkAccelerationStructureKHR, or not have any memory aliasing

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-pInfos-03758
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, its `geometryCount` member must have the same value which was specified when `srcAccelerationStructure` was last built

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-pInfos-03759
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, its `flags` member must have the same value which was specified when `srcAccelerationStructure` was last built

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-pInfos-03760
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, its `type` member must have the same value which was specified when `srcAccelerationStructure` was last built

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-pInfos-03761
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for each `VkAccelerationStructureGeometryKHR` structure referred to by its `pGeometries` or `ppGeometries` members, its `geometryType` member must have the same value which was specified when `srcAccelerationStructure` was last built

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-pInfos-03762
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for each `VkAccelerationStructureGeometryKHR` structure referred to by its `pGeometries` or `ppGeometries` members, its `flags` member must have the same value which was specified when `srcAccelerationStructure` was last built

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-pInfos-03763
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for each `VkAccelerationStructureGeometryKHR` structure referred to by its `pGeometries` or `ppGeometries` members, if `geometryType` is VK_GEOMETRY_TYPE_TRIANGLES_KHR, its `geometry.triangles.vertexFormat` member must have the same value which was specified when `srcAccelerationStructure` was last built

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-pInfos-03764
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for each `VkAccelerationStructureGeometryKHR` structure referred to by its `pGeometries` or `ppGeometries` members, if `geometryType` is VK_GEOMETRY_TYPE_TRIANGLES_KHR, its `geometry.triangles.maxVertex` member must have the same value which was specified when `srcAccelerationStructure` was last built

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-pInfos-03765
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for each `VkAccelerationStructureGeometryKHR` structure referred to by its `pGeometries` or `ppGeometries` members, if `geometryType` is VK_GEOMETRY_TYPE_TRIANGLES_KHR, its `geometry.triangles.indexType` member must have the same value which was specified when `srcAccelerationStructure` was last built

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-pInfos-03766
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for each `VkAccelerationStructureGeometryKHR` structure referred to by its `pGeometries` or `ppGeometries` members, if `geometryType` is VK_GEOMETRY_TYPE_TRIANGLES_KHR, if its `geometry.triangles.transformData` address was `NULL` when `srcAccelerationStructure` was last built, then it must be `NULL`

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-pInfos-03767
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for each `VkAccelerationStructureGeometryKHR` structure referred to by its `pGeometries` or `ppGeometries` members, if `geometryType` is VK_GEOMETRY_TYPE_TRIANGLES_KHR, if its `geometry.triangles.transformData` address was not `NULL` when `srcAccelerationStructure` was last built, then it must not be `NULL`

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-pInfos-10898
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for each `VkAccelerationStructureGeometryKHR` structure referred to by its `pGeometries` or `ppGeometries` members, if `geometryType` is VK_GEOMETRY_TYPE_DENSE_GEOMETRY_FORMAT_TRIANGLES_AMDX, the `numTriangles` member of the `VkAccelerationStructureDenseGeometryFormatTrianglesDataAMDX` structure in the `pNext` chain must have the same value which was specified when `srcAccelerationStructure` was last built

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-pInfos-10899
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for each `VkAccelerationStructureGeometryKHR` structure referred to by its `pGeometries` or `ppGeometries` members, if `geometryType` is VK_GEOMETRY_TYPE_DENSE_GEOMETRY_FORMAT_TRIANGLES_AMDX, the `numVertices` member of the `VkAccelerationStructureDenseGeometryFormatTrianglesDataAMDX` structure in the `pNext` chain must have the same value which was specified when `srcAccelerationStructure` was last built

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-pInfos-10900
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for each `VkAccelerationStructureGeometryKHR` structure referred to by its `pGeometries` or `ppGeometries` members, if `geometryType` is VK_GEOMETRY_TYPE_DENSE_GEOMETRY_FORMAT_TRIANGLES_AMDX, the `maxPrimitiveIndex` member of the `VkAccelerationStructureDenseGeometryFormatTrianglesDataAMDX` structure in the `pNext` chain must have the same value which was specified when `srcAccelerationStructure` was last built

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-pInfos-10901
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for each `VkAccelerationStructureGeometryKHR` structure referred to by its `pGeometries` or `ppGeometries` members, if `geometryType` is VK_GEOMETRY_TYPE_DENSE_GEOMETRY_FORMAT_TRIANGLES_AMDX, the `maxGeometryIndex` member of the `VkAccelerationStructureDenseGeometryFormatTrianglesDataAMDX` structure in the `pNext` chain must have the same value which was specified when `srcAccelerationStructure` was last built

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-pInfos-10902
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for each `VkAccelerationStructureGeometryKHR` structure referred to by its `pGeometries` or `ppGeometries` members, if `geometryType` is VK_GEOMETRY_TYPE_DENSE_GEOMETRY_FORMAT_TRIANGLES_AMDX, the `format` member of the `VkAccelerationStructureDenseGeometryFormatTrianglesDataAMDX` structure in the `pNext` chain must have the same value which was specified when `srcAccelerationStructure` was last built

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-pInfos-10903
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for each `VkAccelerationStructureGeometryKHR` structure referred to by its `pGeometries` or `ppGeometries` members, if `geometryType` is VK_GEOMETRY_TYPE_DENSE_GEOMETRY_FORMAT_TRIANGLES_AMDX, the `dataSize` member of the `VkAccelerationStructureDenseGeometryFormatTrianglesDataAMDX` structure in the `pNext` chain must have the same value which was specified when `srcAccelerationStructure` was last built

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-pInfos-03768
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for each `VkAccelerationStructureGeometryKHR` structure referred to by its `pGeometries` or `ppGeometries` members, if `geometryType` is VK_GEOMETRY_TYPE_TRIANGLES_KHR, and `geometry.triangles.indexType` is not VK_INDEX_TYPE_NONE_KHR, then the value of each index referenced must be the same as the corresponding index value when `srcAccelerationStructure` was last built

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-primitiveCount-03769
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for each `VkAccelerationStructureGeometryKHR` structure referred to by its `pGeometries` or `ppGeometries` members, the `primitiveCount` member of its corresponding `VkAccelerationStructureBuildRangeInfoKHR` structure must have the same value which was specified when `srcAccelerationStructure` was last built

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-pInfos-03801
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_INSTANCES_KHR, the corresponding `ppMaxPrimitiveCounts`[i][j] must be less than or equal to VkPhysicalDeviceAccelerationStructurePropertiesKHR::`maxInstanceCount`

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-pInfos-12258
  If `pInfos`[i].`mode` is VK_BUILD_ACCELERATION_STRUCTURE_MODE_BUILD_KHR, and N is not `0`, all addresses between `pInfos`[i].`scratchData.deviceAddress` and `pInfos`[i].`scratchData.deviceAddress` + N - 1 must be in the buffer device address range of the same buffer, where N is given by the `buildScratchSize` member of the VkAccelerationStructureBuildSizesInfoKHR structure returned from a call to vkGetAccelerationStructureBuildSizesKHR with an identical VkAccelerationStructureBuildGeometryInfoKHR structure and primitive count

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-pInfos-12259
  If `pInfos`[i].`mode` is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, and N is not `0`, all addresses between `pInfos`[i].`scratchData.deviceAddress` and `pInfos`[i].`scratchData.deviceAddress` + N - 1 must be in the buffer device address range of the same buffer, where N is given by the `updateScratchSize` member of the VkAccelerationStructureBuildSizesInfoKHR structure returned from a call to vkGetAccelerationStructureBuildSizesKHR with an identical VkAccelerationStructureBuildGeometryInfoKHR structure and primitive count

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-geometry-03673
  The buffers from which the buffer device addresses for all of the `geometry.triangles.vertexData`, `geometry.triangles.indexData`, `geometry.triangles.transformData`, `geometry.aabbs.data`, and `geometry.instances.data` members of all `pInfos`[i].`pGeometries` and `pInfos`[i].`ppGeometries` are queried must have been created with the VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_BUILD_INPUT_READ_ONLY_BIT_KHR usage flag set

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-pInfos-12260
  If `pInfos`[i].`mode` is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, and the size reported by `updateScratchSize` member of the VkAccelerationStructureBuildSizesInfoKHR structure returned from a call to vkGetAccelerationStructureBuildSizesKHR with an identical VkAccelerationStructureBuildGeometryInfoKHR structure and primitive count is non-zero, `pInfos`[i].`scratchData.deviceAddress` must be a device address allocated to the application from a buffer created with the VK_BUFFER_USAGE_STORAGE_BUFFER_BIT usage flag set

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-pInfos-12261
  If `pInfos`[i].`mode` is VK_BUILD_ACCELERATION_STRUCTURE_MODE_BUILD_KHR, and the size reported by `buildScratchSize` member of the VkAccelerationStructureBuildSizesInfoKHR structure returned from a call to vkGetAccelerationStructureBuildSizesKHR with an identical VkAccelerationStructureBuildGeometryInfoKHR structure and primitive count is non-zero, `pInfos`[i].`scratchData.deviceAddress` must be a device address allocated to the application from a buffer created with the VK_BUFFER_USAGE_STORAGE_BUFFER_BIT usage flag set

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-pInfos-03710
  For each element of `pInfos`, its `scratchData.deviceAddress` member must be a multiple of VkPhysicalDeviceAccelerationStructurePropertiesKHR::`minAccelerationStructureScratchOffsetAlignment`

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-pInfos-03804
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_TRIANGLES_KHR, `geometry.triangles.vertexData.deviceAddress` must be a valid VkDeviceAddress

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-pInfos-03711
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_TRIANGLES_KHR, `geometry.triangles.vertexData.deviceAddress` must be aligned to:

  - the size of the format specified in `vertexFormat`, in bytes, if that format is a packed format

  - the component size of the format specified in `vertexFormat`, in bytes, if that format is not a packed format

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-pInfos-03806
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_TRIANGLES_KHR, if `geometry.triangles.indexType` is not VK_INDEX_TYPE_NONE_KHR, `geometry.triangles.indexData.deviceAddress` must be a valid VkDeviceAddress

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-pInfos-03712
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_TRIANGLES_KHR, and with `geometry.triangles.indexType` not equal to VK_INDEX_TYPE_NONE_KHR, `geometry.triangles.indexData.deviceAddress` must be aligned to the size in bytes of the type in `indexType`

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-pInfos-03808
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_TRIANGLES_KHR, if `geometry.triangles.transformData.deviceAddress` is not `0`, it must be a valid VkDeviceAddress

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-pInfos-03810
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_TRIANGLES_KHR, if `geometry.triangles.transformData.deviceAddress` is not `0`, it must be aligned to `16` bytes

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-pInfos-03811
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_AABBS_KHR, `geometry.aabbs.data.deviceAddress` must be a valid VkDeviceAddress

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-pInfos-03714
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_AABBS_KHR, `geometry.aabbs.data.deviceAddress` must be aligned to `8` bytes

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-pInfos-03715
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_INSTANCES_KHR, if `geometry.arrayOfPointers` is VK_FALSE, `geometry.instances.data.deviceAddress` must be aligned to `16` bytes

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-pInfos-03716
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_INSTANCES_KHR, if `geometry.arrayOfPointers` is VK_TRUE, `geometry.instances.data.deviceAddress` must be aligned to `8` bytes

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-pInfos-03717
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_INSTANCES_KHR, if `geometry.arrayOfPointers` is VK_TRUE, each element of `geometry.instances.data.deviceAddress` in device memory must be aligned to `16` bytes

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-pInfos-03813
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_INSTANCES_KHR, `geometry.instances.data.deviceAddress` must be a valid VkDeviceAddress

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-pInfos-12281
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_INSTANCES_KHR, each VkAccelerationStructureInstanceKHR::`accelerationStructureReference` value in `geometry.instances.data.deviceAddress` must be `0` or a value obtained from vkGetAccelerationStructureDeviceAddressKHR for a valid bottom level acceleration structure

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-pInfos-10607
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_INSTANCES_KHR, if VK_GEOMETRY_INSTANCE_DISABLE_OPACITY_MICROMAPS_BIT_KHR is set in VkAccelerationStructureInstanceKHR::`flags` then `geometry.instances.data.deviceAddress` must refer to an acceleration structure that was built with VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DISABLE_OPACITY_MICROMAPS_BIT_KHR set in VkAccelerationStructureBuildGeometryInfoKHR::`flags`

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-commandBuffer-09547
  `commandBuffer` must not be a protected command buffer

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-micromap-11701
  For any element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_TRIANGLES_KHR, if there is an instance of VkAccelerationStructureTrianglesOpacityMicromapKHR in the `geometry.triangles.pNext` chain with a valid `micromap` member, then the `micromap` member must have been constructed prior to this command’s execution on the device

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-micromap-11624
  For any element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_TRIANGLES_KHR, if there is an instance of VkAccelerationStructureTrianglesOpacityMicromapKHR in the `geometry.triangles.pNext` chain with a valid `micromap` member, then the `micromap` member must have been built with a `type` of VK_ACCELERATION_STRUCTURE_TYPE_OPACITY_MICROMAP_KHR

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-micromap-11625
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for each `VkAccelerationStructureGeometryKHR` structure referred to by its `pGeometries` or `ppGeometries` members, if `geometryType` is VK_GEOMETRY_TYPE_TRIANGLES_KHR, and the same geometry in the original build of `srcAccelerationStructure` was built with an instance of VkAccelerationStructureTrianglesOpacityMicromapKHR in its `geometry.triangles.pNext` chain with a valid `micromap` member, then an instance of VkAccelerationStructureTrianglesOpacityMicromapKHR must be included in the in the `geometry.triangles.pNext` chain with a valid `micromap` member

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-micromap-11626
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for each `VkAccelerationStructureGeometryKHR` structure referred to by its `pGeometries` or `ppGeometries` members, if `geometryType` is VK_GEOMETRY_TYPE_TRIANGLES_KHR, and the same geometry in the original build of `srcAccelerationStructure` was built with an instance of VkAccelerationStructureTrianglesOpacityMicromapKHR in its `geometry.triangles.pNext` chain with its `micromap` member equal to `VK_NULL_HANDLE`, then an instance of VkAccelerationStructureTrianglesOpacityMicromapKHR must be included in the in the `geometry.triangles.pNext` chain with its `micromap` member equal to `VK_NULL_HANDLE`

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-micromap-11627
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for each `VkAccelerationStructureGeometryKHR` structure referred to by its `pGeometries` or `ppGeometries` members, if `geometryType` is VK_GEOMETRY_TYPE_TRIANGLES_KHR, and the same geometry in the original build of `srcAccelerationStructure` was not built with an instance of VkAccelerationStructureTrianglesOpacityMicromapKHR in its `geometry.triangles.pNext` chain, then an instance of VkAccelerationStructureTrianglesOpacityMicromapKHR must not be included in the in the `geometry.triangles.pNext` chain

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-micromap-11628
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, its `srcAccelerationStructure` was originally built without the VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_UPDATE_BIT_KHR flag, and `srcAccelerationStructure` was constructed by deserialization with vkCmdCopyMemoryToAccelerationStructureKHR, then for each `VkAccelerationStructureGeometryKHR` structure referred to by its `pGeometries` or `ppGeometries` members, if `geometryType` is VK_GEOMETRY_TYPE_TRIANGLES_KHR, and the same geometry in the original build of `srcAccelerationStructure` was built with an instance of VkAccelerationStructureTrianglesOpacityMicromapKHR in its `geometry.triangles.pNext` chain with a valid `micromap` member, then an instance of VkAccelerationStructureTrianglesOpacityMicromapKHR must be included in the in the `geometry.triangles.pNext` chain with a `micromap` that was deserialized from the serialized data of the `micromap` in the original build of `srcAccelerationStructure`

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-micromap-11629
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, its `srcAccelerationStructure` was originally built without either the VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_DATA_UPDATE_BIT_EXT or the VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_UPDATE_BIT_KHR flags, and `srcAccelerationStructure` was not constructed by deserialization with vkCmdCopyMemoryToAccelerationStructureKHR, then for each `VkAccelerationStructureGeometryKHR` structure referred to by its `pGeometries` or `ppGeometries` members, if `geometryType` is VK_GEOMETRY_TYPE_TRIANGLES_KHR, and the same geometry in the original build of `srcAccelerationStructure` was built with an instance of VkAccelerationStructureTrianglesOpacityMicromapKHR in its `geometry.triangles.pNext` chain with a valid `micromap` member, then an instance of VkAccelerationStructureTrianglesOpacityMicromapKHR must be included in the in the `geometry.triangles.pNext` chain with the same `micromap` handle as the original build

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-micromap-11632
  For any element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_TRIANGLES_KHR, if there is an instance of VkAccelerationStructureTrianglesOpacityMicromapEXT in the `geometry.triangles.pNext` chain, then its `micromap` member must have been constructed prior to this command’s execution on the device

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-pInfos-10904
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_TRIANGLES_KHR, if there is an instance of VkAccelerationStructureTrianglesOpacityMicromapEXT in the `geometry.triangles.pNext` chain, and its `indexType` is VK_INDEX_TYPE_NONE_KHR, then its `indexBuffer.deviceAddress` must be 0

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-pInfos-10905
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_TRIANGLES_KHR, if there is an instance of VkAccelerationStructureTrianglesOpacityMicromapEXT in the `geometry.triangles.pNext` chain, and its `indexType` is not VK_INDEX_TYPE_NONE_KHR, then its `indexBuffer.deviceAddress` must be a valid VkDeviceAddress

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-pInfos-11846
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_SPHERES_NV, if VkAccelerationStructureGeometrySpheresDataNV::`indexType` is VK_INDEX_TYPE_NONE_KHR, then its `indexData.deviceAddress` must be 0

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-pInfos-11847
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_SPHERES_NV, if VkAccelerationStructureGeometrySpheresDataNV::`indexType` is not VK_INDEX_TYPE_NONE_KHR, then its `indexData.deviceAddress` must be a valid VkDeviceAddress

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-pInfos-11848
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_SPHERES_NV, VkAccelerationStructureGeometrySpheresDataNV::`vertexData.deviceAddress` must be a valid VkDeviceAddress

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-pInfos-11849
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_SPHERES_NV, VkAccelerationStructureGeometrySpheresDataNV::`radiusData.deviceAddress` must be a valid VkDeviceAddress

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-pInfos-11850
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_LINEAR_SWEPT_SPHERES_NV, if VkAccelerationStructureGeometryLinearSweptSpheresDataNV::`indexType` is VK_INDEX_TYPE_NONE_KHR, then its `indexData.deviceAddress` must be 0

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-pInfos-11851
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_LINEAR_SWEPT_SPHERES_NV, if VkAccelerationStructureGeometryLinearSweptSpheresDataNV::`indexType` is not VK_INDEX_TYPE_NONE_KHR, then its `indexData.deviceAddress` must be a valid VkDeviceAddress

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-pInfos-11852
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_LINEAR_SWEPT_SPHERES_NV, VkAccelerationStructureGeometryLinearSweptSpheresDataNV::`vertexData.deviceAddress` must be a valid VkDeviceAddress

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-pInfos-11853
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_LINEAR_SWEPT_SPHERES_NV, VkAccelerationStructureGeometryLinearSweptSpheresDataNV::`radiusData.deviceAddress` must be a valid VkDeviceAddress

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-pIndirectDeviceAddresses-03646
  For each element of `pIndirectDeviceAddresses`[i], all device addresses between `pIndirectDeviceAddresses`[i] and `pIndirectDeviceAddresses`[i] + (`pInfos`[i].`geometryCount` × `pIndirectStrides`[i]) - 1 must be in the buffer device address range of the same buffer

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-pIndirectDeviceAddresses-03647
  For each element of `pIndirectDeviceAddresses`, the buffer from which it was queried must have been created with the VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT usage flag set

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-pIndirectDeviceAddresses-03648
  Each element of `pIndirectDeviceAddresses` must be a multiple of `4`

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-pIndirectStrides-03787
  Each element of `pIndirectStrides` must be a multiple of `4`

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-pIndirectDeviceAddresses-03651
  Each VkAccelerationStructureBuildRangeInfoKHR structure referenced by any element of `pIndirectDeviceAddresses` must be a valid VkAccelerationStructureBuildRangeInfoKHR structure

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-pInfos-03652
  `pInfos`[i].`dstAccelerationStructure` must have been created with a value of VkAccelerationStructureCreateInfoKHR::`size` greater than or equal to the memory size required by the build operation, as returned by vkGetAccelerationStructureBuildSizesKHR with `pBuildInfo` = `pInfos`[i] and `pMaxPrimitiveCounts` = `ppMaxPrimitiveCounts`[i]

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-ppMaxPrimitiveCounts-03653
  Each `ppMaxPrimitiveCounts`[i][j] must be greater than or equal to the `primitiveCount` value specified by the VkAccelerationStructureBuildRangeInfoKHR structure located at `pIndirectDeviceAddresses`[i] + (`j` × `pIndirectStrides`[i])

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-type-11557
  For any element of `pInfos`, its `type` member must not be VK_ACCELERATION_STRUCTURE_TYPE_OPACITY_MICROMAP_KHR

Valid Usage (Implicit)

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-pInfos-parameter
  `pInfos` must be a valid pointer to an array of `infoCount` valid VkAccelerationStructureBuildGeometryInfoKHR structures

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-pIndirectDeviceAddresses-parameter
  `pIndirectDeviceAddresses` must be a valid pointer to an array of `infoCount` VkDeviceAddress values

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-pIndirectStrides-parameter
  `pIndirectStrides` must be a valid pointer to an array of `infoCount` `uint32_t` values

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-ppMaxPrimitiveCounts-parameter
  `ppMaxPrimitiveCounts` must be a valid pointer to an array of `infoCount` `uint32_t` values

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT operations

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdBuildAccelerationStructuresIndirectKHR-infoCount-arraylength
  `infoCount` must be greater than `0`

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Outside | VK_QUEUE_COMPUTE_BIT | Action

Conditional Rendering

vkCmdBuildAccelerationStructuresIndirectKHR is not affected by conditional rendering

The `VkAccelerationStructureBuildGeometryInfoKHR` structure is defined as:

    // Provided by VK_KHR_acceleration_structure
    typedef struct VkAccelerationStructureBuildGeometryInfoKHR {
        VkStructureType                                     sType;
        const void*                                         pNext;
        VkAccelerationStructureTypeKHR                      type;
        VkBuildAccelerationStructureFlagsKHR                flags;
        VkBuildAccelerationStructureModeKHR                 mode;
        VkAccelerationStructureKHR                          srcAccelerationStructure;
        VkAccelerationStructureKHR                          dstAccelerationStructure;
        uint32_t                                            geometryCount;
        const VkAccelerationStructureGeometryKHR*           pGeometries;
        const VkAccelerationStructureGeometryKHR* const*    ppGeometries;
        VkDeviceOrHostAddressKHR                            scratchData;
    } VkAccelerationStructureBuildGeometryInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `type` is a VkAccelerationStructureTypeKHR value specifying the type of acceleration structure being built.

- `flags` is a bitmask of VkBuildAccelerationStructureFlagBitsKHR specifying additional parameters of the acceleration structure.

- `mode` is a VkBuildAccelerationStructureModeKHR value specifying the type of operation to perform.

- `srcAccelerationStructure` is a pointer to an existing acceleration structure that is to be used to update the `dstAccelerationStructure` acceleration structure when `mode` is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR.

- `dstAccelerationStructure` is a pointer to the target acceleration structure for the build.

- `geometryCount` specifies the number of geometries that will be built into `dstAccelerationStructure`.

- `pGeometries` is a pointer to an array of VkAccelerationStructureGeometryKHR structures.

- `ppGeometries` is a pointer to an array of pointers to VkAccelerationStructureGeometryKHR structures.

- `scratchData` is the device or host address of memory that will be used as scratch memory for the build.

Only one of `pGeometries` or `ppGeometries` can be a valid pointer, the other must be `NULL`. Each element of the non-`NULL` array describes the data used to build each acceleration structure geometry.

For bottom-level acceleration structures, the index of each element of the `pGeometries` or `ppGeometries` members of VkAccelerationStructureBuildGeometryInfoKHR is used as the geometry index during ray traversal. The geometry index is available in ray shaders via the `RayGeometryIndexKHR` built-in, and is used to determine hit and intersection shaders executed during traversal. The geometry index is available to ray queries via the `OpRayQueryGetIntersectionGeometryIndexKHR` instruction.

Setting VK_BUILD_ACCELERATION_STRUCTURE_MOTION_BIT_NV in `flags` indicates that this build is a motion top level acceleration structure. A motion top level uses instances of format VkAccelerationStructureMotionInstanceNV if VkAccelerationStructureGeometryInstancesDataKHR::`arrayOfPointers` is VK_FALSE.

If VkAccelerationStructureGeometryInstancesDataKHR::`arrayOfPointers` is VK_TRUE, the pointer for each element of the array of instance pointers consists of 4 bits of VkAccelerationStructureMotionInstanceTypeNV in the low 4 bits of the pointer identifying the type of structure at the pointer. The device address accessed is the value in the array with the low 4 bits set to zero. The structure at the pointer is one of VkAccelerationStructureInstanceKHR, VkAccelerationStructureMatrixMotionInstanceNV or VkAccelerationStructureSRTMotionInstanceNV, depending on the type value encoded in the low 4 bits.

A top level acceleration structure with either motion instances or vertex motion in its instances must set VK_BUILD_ACCELERATION_STRUCTURE_MOTION_BIT_NV in `flags`.

Members `srcAccelerationStructure` and `dstAccelerationStructure` may be the same or different for an update operation (when `mode` is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR). If they are the same, the update happens in-place. Otherwise, the target acceleration structure is updated and the source is not modified.

Valid Usage

- VUID-VkAccelerationStructureBuildGeometryInfoKHR-type-03654
  `type` must not be VK_ACCELERATION_STRUCTURE_TYPE_GENERIC_KHR

- VUID-VkAccelerationStructureBuildGeometryInfoKHR-pGeometries-03788
  If `geometryCount` is not `0`, exactly one of `pGeometries` or `ppGeometries` must be a valid pointer, the other must be `NULL`

- VUID-VkAccelerationStructureBuildGeometryInfoKHR-type-03789
  If `type` is VK_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR, the `geometryType` member of elements of either `pGeometries` or `ppGeometries` must be VK_GEOMETRY_TYPE_INSTANCES_KHR

- VUID-VkAccelerationStructureBuildGeometryInfoKHR-type-03790
  If `type` is VK_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR, `geometryCount` must be `1`

- VUID-VkAccelerationStructureBuildGeometryInfoKHR-type-03791
  If `type` is VK_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR the `geometryType` member of elements of either `pGeometries` or `ppGeometries` must not be VK_GEOMETRY_TYPE_INSTANCES_KHR

- VUID-VkAccelerationStructureBuildGeometryInfoKHR-type-03792
  If `type` is VK_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR then the `geometryType` member of each geometry in either `pGeometries` or `ppGeometries` must be the same

- VUID-VkAccelerationStructureBuildGeometryInfoKHR-type-03793
  If `type` is VK_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR then `geometryCount` must be less than or equal to VkPhysicalDeviceAccelerationStructurePropertiesKHR::`maxGeometryCount`

- VUID-VkAccelerationStructureBuildGeometryInfoKHR-type-10884
  If `type` is VK_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR and the `geometryType` member of either `pGeometries` or `ppGeometries` is VK_GEOMETRY_TYPE_DENSE_GEOMETRY_FORMAT_TRIANGLES_AMDX, then `geometryCount` must be `1`

- VUID-VkAccelerationStructureBuildGeometryInfoKHR-type-03794
  If `type` is VK_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR and the `geometryType` member of either `pGeometries` or `ppGeometries` is VK_GEOMETRY_TYPE_AABBS_KHR, the total number of AABBs in all geometries must be less than or equal to VkPhysicalDeviceAccelerationStructurePropertiesKHR::`maxPrimitiveCount`

- VUID-VkAccelerationStructureBuildGeometryInfoKHR-type-03795
  If `type` is VK_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR and the `geometryType` member of either `pGeometries` or `ppGeometries` is VK_GEOMETRY_TYPE_TRIANGLES_KHR, the total number of triangles in all geometries must be less than or equal to VkPhysicalDeviceAccelerationStructurePropertiesKHR::`maxPrimitiveCount`

- VUID-VkAccelerationStructureBuildGeometryInfoKHR-flags-03796
  If `flags` has the VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_KHR bit set, then it must not have the VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_KHR bit set

- VUID-VkAccelerationStructureBuildGeometryInfoKHR-dstAccelerationStructure-04927
  If `dstAccelerationStructure` was created with VK_ACCELERATION_STRUCTURE_CREATE_MOTION_BIT_NV set in VkAccelerationStructureCreateInfoKHR::`createFlags`, VK_BUILD_ACCELERATION_STRUCTURE_MOTION_BIT_NV must be set in `flags`

- VUID-VkAccelerationStructureBuildGeometryInfoKHR-flags-04928
  If VK_BUILD_ACCELERATION_STRUCTURE_MOTION_BIT_NV is set in `flags`, `dstAccelerationStructure` must have been created with VK_ACCELERATION_STRUCTURE_CREATE_MOTION_BIT_NV set in VkAccelerationStructureCreateInfoKHR::`createFlags`

- VUID-VkAccelerationStructureBuildGeometryInfoKHR-flags-04929
  If VK_BUILD_ACCELERATION_STRUCTURE_MOTION_BIT_NV is set in `flags`, `type` must not be VK_ACCELERATION_STRUCTURE_TYPE_GENERIC_KHR

- VUID-VkAccelerationStructureBuildGeometryInfoKHR-flags-11558
  If `flags` has the VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_UPDATE_BIT_KHR bit set then it must not have the VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_DATA_UPDATE_BIT_EXT bit set

- VUID-VkAccelerationStructureBuildGeometryInfoKHR-flags-11709
  If `flags` has the VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_DATA_UPDATE_BIT_EXT bit set, the `VkPhysicalDeviceOpacityMicromapFeaturesEXT`::`micromap` feature must be enabled

- VUID-VkAccelerationStructureBuildGeometryInfoKHR-flags-11710
  If `flags` has the VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_UPDATE_BIT_KHR bit set, the `VkPhysicalDeviceOpacityMicromapFeaturesKHR`::`micromap` or `VkPhysicalDeviceOpacityMicromapFeaturesEXT`::`micromap` feature must be enabled

- VUID-VkAccelerationStructureBuildGeometryInfoKHR-flags-11711
  If `flags` has the VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DISABLE_OPACITY_MICROMAPS_BIT_KHR bit set, the `VkPhysicalDeviceOpacityMicromapFeaturesKHR`::`micromap` or `VkPhysicalDeviceOpacityMicromapFeaturesEXT`::`micromap` feature must be enabled

- VUID-VkAccelerationStructureBuildGeometryInfoKHR-micromap-11559
  If `type` is VK_ACCELERATION_STRUCTURE_TYPE_OPACITY_MICROMAP_KHR, the `VkPhysicalDeviceOpacityMicromapFeaturesKHR`::`micromap` feature must be enabled

- VUID-VkAccelerationStructureBuildGeometryInfoKHR-geometryCount-11560
  If `type` is VK_ACCELERATION_STRUCTURE_TYPE_OPACITY_MICROMAP_KHR, `geometryCount` must be `1`

- VUID-VkAccelerationStructureBuildGeometryInfoKHR-geometryType-11561
  If `type` is VK_ACCELERATION_STRUCTURE_TYPE_OPACITY_MICROMAP_KHR, the `geometryType` member of elements of either `pGeometries` or `ppGeometries` must be VK_GEOMETRY_TYPE_MICROMAP_KHR

- VUID-VkAccelerationStructureBuildGeometryInfoKHR-geometryType-11707
  If `type` is not VK_ACCELERATION_STRUCTURE_TYPE_OPACITY_MICROMAP_KHR, the `geometryType` member of elements of either `pGeometries` or `ppGeometries` must not be VK_GEOMETRY_TYPE_MICROMAP_KHR

- VUID-VkAccelerationStructureBuildGeometryInfoKHR-flags-11562
  If `type` is VK_ACCELERATION_STRUCTURE_TYPE_OPACITY_MICROMAP_KHR, `flags` must only include the following bits:

  - VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR

  - VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_KHR

  - VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_KHR

  - VK_BUILD_ACCELERATION_STRUCTURE_MICROMAP_LOSSY_BIT_KHR

- VUID-VkAccelerationStructureBuildGeometryInfoKHR-type-11563
  If `flags` includes VK_BUILD_ACCELERATION_STRUCTURE_MICROMAP_LOSSY_BIT_KHR, `type` must be VK_ACCELERATION_STRUCTURE_TYPE_OPACITY_MICROMAP_KHR

- VUID-VkAccelerationStructureBuildGeometryInfoKHR-format-11712
  If `flags` includes VK_BUILD_ACCELERATION_STRUCTURE_MICROMAP_LOSSY_BIT_KHR, for each element of `pGeometries` or `ppGeometries`, if it includes a VkAccelerationStructureGeometryMicromapDataKHR structure in its `pNext` chain, each element of its `pUsageCounts` or `ppUsageCounts` members must have its `format` member equal to VK_OPACITY_MICROMAP_FORMAT_4_STATE_KHR

- VUID-VkAccelerationStructureBuildGeometryInfoKHR-subdivisionLevel-11564
  If `flags` does not include VK_BUILD_ACCELERATION_STRUCTURE_MICROMAP_LOSSY_BIT_KHR, for each element of `pGeometries` or `ppGeometries`, if it includes a VkAccelerationStructureGeometryMicromapDataKHR structure in its `pNext` chain, for each element of its `pUsageCounts` or `ppUsageCounts` members, if its `format` member is VK_OPACITY_MICROMAP_FORMAT_4_STATE_KHR, its `subdivisionLevel` member must be less than or equal to `maxOpacity4StateSubdivisionLevel`

- VUID-VkAccelerationStructureBuildGeometryInfoKHR-subdivisionLevel-11565
  If `flags` includes VK_BUILD_ACCELERATION_STRUCTURE_MICROMAP_LOSSY_BIT_KHR, for each element of `pGeometries` or `ppGeometries`, if it includes a VkAccelerationStructureGeometryMicromapDataKHR structure in its `pNext` chain, for each element of its `pUsageCounts` or `ppUsageCounts` members, its `subdivisionLevel` member must be less than or equal to `maxOpacityLossy4StateSubdivisionLevel`

- VUID-VkAccelerationStructureBuildGeometryInfoKHR-format-11713
  If `flags` includes VK_BUILD_ACCELERATION_STRUCTURE_MICROMAP_LOSSY_BIT_KHR, for each element of `pGeometries` or `ppGeometries`, if it includes a VkAccelerationStructureGeometryMicromapDataKHR structure in its `pNext` chain, each element of its `triangleArray` member must have its `format` member equal to VK_OPACITY_MICROMAP_FORMAT_4_STATE_KHR

- VUID-VkAccelerationStructureBuildGeometryInfoKHR-subdivisionLevel-11566
  If `flags` does not include VK_BUILD_ACCELERATION_STRUCTURE_MICROMAP_LOSSY_BIT_KHR, for each element of `pGeometries` or `ppGeometries`, if it includes a VkAccelerationStructureGeometryMicromapDataKHR structure in its `pNext` chain, for each element of its `triangleArray` member, if its `format` member is VK_OPACITY_MICROMAP_FORMAT_4_STATE_KHR, its `subdivisionLevel` member must be less than or equal to `maxOpacity4StateSubdivisionLevel`

- VUID-VkAccelerationStructureBuildGeometryInfoKHR-subdivisionLevel-11567
  If `flags` includes VK_BUILD_ACCELERATION_STRUCTURE_MICROMAP_LOSSY_BIT_KHR, for each element of `pGeometries` or `ppGeometries`, if it includes a VkAccelerationStructureGeometryMicromapDataKHR structure in its `pNext` chain, for each element of its `triangleArray` member, its `subdivisionLevel` member must be less than or equal to `maxOpacityLossy4StateSubdivisionLevel`

Valid Usage (Implicit)

- VUID-VkAccelerationStructureBuildGeometryInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_BUILD_GEOMETRY_INFO_KHR

- VUID-VkAccelerationStructureBuildGeometryInfoKHR-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkAccelerationStructureBuildGeometryInfoKHR-type-parameter
  `type` must be a valid VkAccelerationStructureTypeKHR value

- VUID-VkAccelerationStructureBuildGeometryInfoKHR-flags-parameter
  `flags` must be a valid combination of VkBuildAccelerationStructureFlagBitsKHR values

- VUID-VkAccelerationStructureBuildGeometryInfoKHR-pGeometries-parameter
  If `geometryCount` is not `0`, and `pGeometries` is not `NULL`, `pGeometries` must be a valid pointer to an array of `geometryCount` valid VkAccelerationStructureGeometryKHR structures

- VUID-VkAccelerationStructureBuildGeometryInfoKHR-ppGeometries-parameter
  If `geometryCount` is not `0`, and `ppGeometries` is not `NULL`, `ppGeometries` must be a valid pointer to an array of `geometryCount` valid pointers to valid VkAccelerationStructureGeometryKHR structures

- VUID-VkAccelerationStructureBuildGeometryInfoKHR-commonparent
  Both of `dstAccelerationStructure`, and `srcAccelerationStructure` that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevice

The VkBuildAccelerationStructureModeKHR enumeration is defined as:

    // Provided by VK_KHR_acceleration_structure
    typedef enum VkBuildAccelerationStructureModeKHR {
        VK_BUILD_ACCELERATION_STRUCTURE_MODE_BUILD_KHR = 0,
        VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR = 1,
    } VkBuildAccelerationStructureModeKHR;

- VK_BUILD_ACCELERATION_STRUCTURE_MODE_BUILD_KHR specifies that the destination acceleration structure will be built using the specified geometries.

- VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR specifies that the destination acceleration structure will be built using data in a source acceleration structure, updated by the specified geometries.

The `VkDeviceOrHostAddressKHR` union is defined as:

    // Provided by VK_KHR_acceleration_structure, VK_NV_cooperative_vector
    typedef union VkDeviceOrHostAddressKHR {
        VkDeviceAddress    deviceAddress;
        void*              hostAddress;
    } VkDeviceOrHostAddressKHR;

- `deviceAddress` is a buffer device address as returned by the vkGetBufferDeviceAddressKHR command.

- `hostAddress` is a host memory address.

The `VkDeviceOrHostAddressConstKHR` union is defined as:

    // Provided by VK_KHR_acceleration_structure, VK_NV_cooperative_vector
    typedef union VkDeviceOrHostAddressConstKHR {
        VkDeviceAddress    deviceAddress;
        const void*        hostAddress;
    } VkDeviceOrHostAddressConstKHR;

- `deviceAddress` is a buffer device address as returned by the vkGetBufferDeviceAddressKHR command.

- `hostAddress` is a const host memory address.

The `VkAccelerationStructureGeometryKHR` structure is defined as:

    // Provided by VK_KHR_acceleration_structure
    typedef struct VkAccelerationStructureGeometryKHR {
        VkStructureType                           sType;
        const void*                               pNext;
        VkGeometryTypeKHR                         geometryType;
        VkAccelerationStructureGeometryDataKHR    geometry;
        VkGeometryFlagsKHR                        flags;
    } VkAccelerationStructureGeometryKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `geometryType` describes which type of geometry this `VkAccelerationStructureGeometryKHR` refers to.

- `geometry` is a VkAccelerationStructureGeometryDataKHR union describing the geometry data for the relevant geometry type.

- `flags` is a bitmask of VkGeometryFlagBitsKHR values describing additional properties of how the geometry should be built.

Valid Usage

- VUID-VkAccelerationStructureGeometryKHR-micromap-11568
  If `geometryType` is VK_GEOMETRY_TYPE_MICROMAP_KHR, `pNext` chain must include a single VkAccelerationStructureGeometryMicromapDataKHR structure

- VUID-VkAccelerationStructureGeometryKHR-flags-11569
  If `geometryType` is VK_GEOMETRY_TYPE_MICROMAP_KHR, `flags` must be `0`

Valid Usage (Implicit)

- VUID-VkAccelerationStructureGeometryKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_KHR

- VUID-VkAccelerationStructureGeometryKHR-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkAccelerationStructureDenseGeometryFormatTrianglesDataAMDX, VkAccelerationStructureGeometryLinearSweptSpheresDataNV, VkAccelerationStructureGeometryMicromapDataKHR, or VkAccelerationStructureGeometrySpheresDataNV

- VUID-VkAccelerationStructureGeometryKHR-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkAccelerationStructureGeometryKHR-geometryType-parameter
  `geometryType` must be a valid VkGeometryTypeKHR value

- VUID-VkAccelerationStructureGeometryKHR-triangles-parameter
  If `geometryType` is VK_GEOMETRY_TYPE_TRIANGLES_KHR, the `triangles` member of `geometry` must be a valid VkAccelerationStructureGeometryTrianglesDataKHR structure

- VUID-VkAccelerationStructureGeometryKHR-aabbs-parameter
  If `geometryType` is VK_GEOMETRY_TYPE_AABBS_KHR, the `aabbs` member of `geometry` must be a valid VkAccelerationStructureGeometryAabbsDataKHR structure

- VUID-VkAccelerationStructureGeometryKHR-instances-parameter
  If `geometryType` is VK_GEOMETRY_TYPE_INSTANCES_KHR, the `instances` member of `geometry` must be a valid VkAccelerationStructureGeometryInstancesDataKHR structure

- VUID-VkAccelerationStructureGeometryKHR-flags-parameter
  `flags` must be a valid combination of VkGeometryFlagBitsKHR values

The `VkAccelerationStructureGeometryDataKHR` union is defined as:

    // Provided by VK_KHR_acceleration_structure
    typedef union VkAccelerationStructureGeometryDataKHR {
        VkAccelerationStructureGeometryTrianglesDataKHR    triangles;
        VkAccelerationStructureGeometryAabbsDataKHR        aabbs;
        VkAccelerationStructureGeometryInstancesDataKHR    instances;
    } VkAccelerationStructureGeometryDataKHR;

- `triangles` is a VkAccelerationStructureGeometryTrianglesDataKHR structure.

- `aabbs` is a VkAccelerationStructureGeometryAabbsDataKHR structure.

- `instances` is a VkAccelerationStructureGeometryInstancesDataKHR structure.

The `VkAccelerationStructureGeometryTrianglesDataKHR` structure is defined as:

    // Provided by VK_KHR_acceleration_structure
    typedef struct VkAccelerationStructureGeometryTrianglesDataKHR {
        VkStructureType                  sType;
        const void*                      pNext;
        VkFormat                         vertexFormat;
        VkDeviceOrHostAddressConstKHR    vertexData;
        VkDeviceSize                     vertexStride;
        uint32_t                         maxVertex;
        VkIndexType                      indexType;
        VkDeviceOrHostAddressConstKHR    indexData;
        VkDeviceOrHostAddressConstKHR    transformData;
    } VkAccelerationStructureGeometryTrianglesDataKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `vertexFormat` is the VkFormat of each vertex element.

- `vertexData` is a device or host address of memory containing vertex data for this geometry.

- `vertexStride` is the stride in bytes between each vertex.

- `maxVertex` is the number of vertices in `vertexData` minus one.

- `indexType` is the VkIndexType of each index element.

- `indexData` is a device or host address of memory containing index data for this geometry. When `indexType` is VK_INDEX_TYPE_NONE_KHR it must be `NULL`.

- `transformData` is a device or host address to memory containing an optional reference to a VkTransformMatrixKHR structure describing a transformation from the space in which the vertices in this geometry are described to the space in which the acceleration structure is defined.

Note | Unlike the stride for vertex buffers in VkVertexInputBindingDescription for graphics pipelines which must not exceed `maxVertexInputBindingStride`, `vertexStride` for acceleration structure geometry is instead restricted to being a 32-bit value.

Valid Usage

- VUID-VkAccelerationStructureGeometryTrianglesDataKHR-vertexStride-03735
  `vertexStride` must be a multiple of the size in bytes of the smallest component of `vertexFormat`

- VUID-VkAccelerationStructureGeometryTrianglesDataKHR-vertexStride-03819
  `vertexStride` must be less than or equal to 232-1

- VUID-VkAccelerationStructureGeometryTrianglesDataKHR-vertexFormat-03797
  The format features of `vertexFormat` must contain VK_FORMAT_FEATURE_ACCELERATION_STRUCTURE_VERTEX_BUFFER_BIT_KHR

- VUID-VkAccelerationStructureGeometryTrianglesDataKHR-indexType-03798
  `indexType` must be VK_INDEX_TYPE_UINT16, VK_INDEX_TYPE_UINT32, or VK_INDEX_TYPE_NONE_KHR

Valid Usage (Implicit)

- VUID-VkAccelerationStructureGeometryTrianglesDataKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_TRIANGLES_DATA_KHR

- VUID-VkAccelerationStructureGeometryTrianglesDataKHR-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkAccelerationStructureGeometryMotionTrianglesDataNV, VkAccelerationStructureTrianglesDisplacementMicromapNV, VkAccelerationStructureTrianglesOpacityMicromapEXT, or VkAccelerationStructureTrianglesOpacityMicromapKHR

- VUID-VkAccelerationStructureGeometryTrianglesDataKHR-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkAccelerationStructureGeometryTrianglesDataKHR-vertexFormat-parameter
  `vertexFormat` must be a valid VkFormat value

- VUID-VkAccelerationStructureGeometryTrianglesDataKHR-indexType-parameter
  `indexType` must be a valid VkIndexType value

The `VkAccelerationStructureGeometryMotionTrianglesDataNV` structure is defined as:

    // Provided by VK_NV_ray_tracing_motion_blur
    typedef struct VkAccelerationStructureGeometryMotionTrianglesDataNV {
        VkStructureType                  sType;
        const void*                      pNext;
        VkDeviceOrHostAddressConstKHR    vertexData;
    } VkAccelerationStructureGeometryMotionTrianglesDataNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `vertexData` is a pointer to vertex data for this geometry at time 1.0

If `VkAccelerationStructureGeometryMotionTrianglesDataNV` is included in the `pNext` chain of a VkAccelerationStructureGeometryTrianglesDataKHR structure, the basic vertex positions are used for the position of the triangles in the geometry at time 0.0 and the `vertexData` in `VkAccelerationStructureGeometryMotionTrianglesDataNV` is used for the vertex positions at time 1.0, with positions linearly interpolated at intermediate times.

Indexing for `VkAccelerationStructureGeometryMotionTrianglesDataNV` `vertexData` is equivalent to the basic vertex position data.

Valid Usage (Implicit)

- VUID-VkAccelerationStructureGeometryMotionTrianglesDataNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_MOTION_TRIANGLES_DATA_NV

Structure Chaining

Extends the structure

  - VkAccelerationStructureGeometryTrianglesDataKHR

The `VkAccelerationStructureTrianglesOpacityMicromapKHR` structure is defined as:

    // Provided by VK_KHR_opacity_micromap
    typedef struct VkAccelerationStructureTrianglesOpacityMicromapKHR {
        VkStructureType               sType;
        void*                         pNext;
        VkIndexType                   indexType;
        VkDeviceAddress               indexBuffer;
        VkDeviceSize                  indexStride;
        uint32_t                      baseTriangle;
        VkAccelerationStructureKHR    micromap;
    } VkAccelerationStructureTrianglesOpacityMicromapKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `indexType` is the type of triangle indices used when indexing this micromap

- `indexBuffer` is the address containing the triangle indices

- `indexStride` is the byte stride between triangle indices

- `baseTriangle` is the base value added to the non-negative triangle indices

- `micromap` is the handle to the micromap object to include in this geometry

If `VkAccelerationStructureTrianglesOpacityMicromapKHR` is included in the `pNext` chain of a VkAccelerationStructureDenseGeometryFormatTrianglesDataAMDX or VkAccelerationStructureGeometryTrianglesDataKHR structure, that geometry will reference that micromap.

For each triangle in the geometry, the acceleration structure build fetches an index from `indexBuffer` using `indexType` and `indexStride` if present. If `indexType` is VK_INDEX_TYPE_NONE_KHR, then the index used is the index of the triangle in the geometry.

If that value is the unsigned cast of one of the values from VkOpacityMicromapSpecialIndexKHR then that triangle behaves as described for that special value in Ray Opacity Micromap.

Otherwise that triangle uses the opacity micromap information from `micromap` at that index plus `baseTriangle`.

Valid Usage

- VUID-VkAccelerationStructureTrianglesOpacityMicromapKHR-indexType-11570
  `indexType` must be VK_INDEX_TYPE_UINT8, VK_INDEX_TYPE_UINT16, VK_INDEX_TYPE_UINT32, or VK_INDEX_TYPE_NONE_KHR

- VUID-VkAccelerationStructureTrianglesOpacityMicromapKHR-indexBuffer-11571
  If `indexType` is VK_INDEX_TYPE_NONE_KHR, `indexBuffer` must be 0

- VUID-VkAccelerationStructureTrianglesOpacityMicromapKHR-indexBuffer-11572
  If `indexType` is not VK_INDEX_TYPE_NONE_KHR, `indexBuffer` must be a valid VkDeviceAddress

- VUID-VkAccelerationStructureTrianglesOpacityMicromapKHR-indexStride-11573
  If `indexType` is not VK_INDEX_TYPE_NONE_KHR, `indexStride` must be a multiple of the size in bytes of `indexType`

- VUID-VkAccelerationStructureTrianglesOpacityMicromapKHR-indexStride-11574
  If `indexType` is not VK_INDEX_TYPE_NONE_KHR, `indexStride` must be less than or equal to 232-1

- VUID-VkAccelerationStructureTrianglesOpacityMicromapKHR-geometry-11576
  If `indexType` is VK_INDEX_TYPE_NONE_KHR, for each triangle index in the geometry, index plus `baseTriangle` must be less than or equal to numTriangles, where numTriangles is given by the sum of all `count` parameters in the `pUsageCounts` or `ppUsageCounts` provided to the micromap’s build command

- VUID-VkAccelerationStructureTrianglesOpacityMicromapKHR-micromap-11579
  If `indexType` is VK_INDEX_TYPE_NONE_KHR, `micromap` must not be VK_NULL_HANDLE

Valid Usage (Implicit)

- VUID-VkAccelerationStructureTrianglesOpacityMicromapKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_TRIANGLES_OPACITY_MICROMAP_KHR

- VUID-VkAccelerationStructureTrianglesOpacityMicromapKHR-indexType-parameter
  `indexType` must be a valid VkIndexType value

- VUID-VkAccelerationStructureTrianglesOpacityMicromapKHR-micromap-parameter
  If `micromap` is not VK_NULL_HANDLE, `micromap` must be a valid VkAccelerationStructureKHR handle

Structure Chaining

Extends the structures

  - VkAccelerationStructureDenseGeometryFormatTrianglesDataAMDX

  - VkAccelerationStructureGeometryTrianglesDataKHR

The `VkAccelerationStructureTrianglesOpacityMicromapEXT` structure is defined as:

    // Provided by VK_EXT_opacity_micromap
    typedef struct VkAccelerationStructureTrianglesOpacityMicromapEXT {
        VkStructureType                     sType;
        void*                               pNext;
        VkIndexType                         indexType;
        VkDeviceOrHostAddressConstKHR       indexBuffer;
        VkDeviceSize                        indexStride;
        uint32_t                            baseTriangle;
        uint32_t                            usageCountsCount;
        const VkMicromapUsageEXT*           pUsageCounts;
        const VkMicromapUsageEXT* const*    ppUsageCounts;
        VkMicromapEXT                       micromap;
    } VkAccelerationStructureTrianglesOpacityMicromapEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `indexType` is the type of triangle indices used when indexing this micromap.

- `indexBuffer` is a device or host address of memory containing the triangle indices. When `indexType` is VK_INDEX_TYPE_NONE_KHR it must be `NULL`.

- `indexStride` is the byte stride between triangle indices.

- `baseTriangle` is the base value added to the non-negative triangle indices.

- `usageCountsCount` specifies the number of usage counts structures that will be used to determine the size of this micromap.

- `pUsageCounts` is a pointer to an array of VkMicromapUsageEXT structures.

- `ppUsageCounts` is a pointer to an array of pointers to VkMicromapUsageEXT structures.

- `micromap` is the handle to the micromap object to include in this geometry.

If `VkAccelerationStructureTrianglesOpacityMicromapEXT` is included in the `pNext` chain of a VkAccelerationStructureDenseGeometryFormatTrianglesDataAMDX or VkAccelerationStructureGeometryTrianglesDataKHR structure, that geometry will reference that micromap.

For each triangle in the geometry, the acceleration structure build fetches an index from `indexBuffer` using `indexType` and `indexStride` if present. If `indexType` is VK_INDEX_TYPE_NONE_KHR, then the index used is the index of the triangle in the geometry.

If that value is the unsigned cast of one of the values from VkOpacityMicromapSpecialIndexEXT then that triangle behaves as described for that special value in Ray Opacity Micromap.

Otherwise that triangle uses the opacity micromap information from micromap at that index plus `baseTriangle`.

Only one of `pUsageCounts` or `ppUsageCounts` can be a valid pointer, the other must be `NULL`. The elements of the non-`NULL` array describe the total count used to build this geometry. For a given `format` and `subdivisionLevel` the number of triangles in this geometry matching those values after indirection and special index handling must be equal to the sum of matching `count` provided.

If `micromap` is VK_NULL_HANDLE, then every value read from `indexBuffer` must be one of the values in VkOpacityMicromapSpecialIndexEXT.

Valid Usage

- VUID-VkAccelerationStructureTrianglesOpacityMicromapEXT-pUsageCounts-07335
  Only one of `pUsageCounts` or `ppUsageCounts` can be a valid pointer, the other must be `NULL`

- VUID-VkAccelerationStructureTrianglesOpacityMicromapEXT-indexType-10719
  `indexType` must be VK_INDEX_TYPE_UINT16, VK_INDEX_TYPE_UINT32, or VK_INDEX_TYPE_NONE_KHR

- VUID-VkAccelerationStructureTrianglesOpacityMicromapEXT-indexType-10722
  If `indexType` is not VK_INDEX_TYPE_NONE_KHR, then `indexStride` must be a multiple of the size in bytes of `indexType`

- VUID-VkAccelerationStructureTrianglesOpacityMicromapEXT-indexType-10723
  If `indexType` is not VK_INDEX_TYPE_NONE_KHR, then `indexStride` must be less than or equal to 232-1

- VUID-VkAccelerationStructureTrianglesOpacityMicromapEXT-format-11679
  If `micromap` is not VK_NULL_HANDLE, the `type` used to construct `micromap` is VK_MICROMAP_TYPE_OPACITY_MICROMAP_EXT, the `format` member of each element of `pUsageCounts` or `ppUsageCounts` must be a valid value from VkOpacityMicromapFormatEXT

- VUID-VkAccelerationStructureTrianglesOpacityMicromapEXT-subdivisionLevel-11680
  If `micromap` is not VK_NULL_HANDLE, the `type` used to build `micromap` is VK_MICROMAP_TYPE_OPACITY_MICROMAP_EXT, for each member of `pUsageCounts` or `ppUsageCounts` with `format` equal to VK_OPACITY_MICROMAP_FORMAT_2_STATE_EXT, `subdivisionLevel` must be less than or equal to VkPhysicalDeviceOpacityMicromapPropertiesEXT::`maxOpacity2StateSubdivisionLevel`

- VUID-VkAccelerationStructureTrianglesOpacityMicromapEXT-subdivisionLevel-11681
  If `micromap` is not VK_NULL_HANDLE, the `type` used to build `micromap` is VK_MICROMAP_TYPE_OPACITY_MICROMAP_EXT, for each member of `pUsageCounts` or `ppUsageCounts` with `format` equal to VK_OPACITY_MICROMAP_FORMAT_4_STATE_EXT, `subdivisionLevel` must be less than or equal to VkPhysicalDeviceOpacityMicromapPropertiesEXT::`maxOpacity4StateSubdivisionLevel`

- VUID-VkAccelerationStructureTrianglesOpacityMicromapEXT-format-11682
  If `micromap` is not VK_NULL_HANDLE, the `type` used to construct `micromap` is VK_MICROMAP_TYPE_DISPLACEMENT_MICROMAP_NV, the `format` member of each element of `pUsageCounts` or `ppUsageCounts` must be a valid value from VkDisplacementMicromapFormatNV

- VUID-VkAccelerationStructureTrianglesOpacityMicromapEXT-subdivisionLevel-11683
  If `micromap` is not VK_NULL_HANDLE, the `type` used to construct `micromap` is VK_MICROMAP_TYPE_DISPLACEMENT_MICROMAP_NV, for each member of `pUsageCounts` or `ppUsageCounts` `subdivisionLevel` must be less than or equal to VkPhysicalDeviceDisplacementMicromapPropertiesNV::`maxDisplacementMicromapSubdivisionLevel`

Valid Usage (Implicit)

- VUID-VkAccelerationStructureTrianglesOpacityMicromapEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_TRIANGLES_OPACITY_MICROMAP_EXT

- VUID-VkAccelerationStructureTrianglesOpacityMicromapEXT-indexType-parameter
  `indexType` must be a valid VkIndexType value

- VUID-VkAccelerationStructureTrianglesOpacityMicromapEXT-pUsageCounts-parameter
  If `usageCountsCount` is not `0`, and `pUsageCounts` is not `NULL`, `pUsageCounts` must be a valid pointer to an array of `usageCountsCount` VkMicromapUsageEXT structures

- VUID-VkAccelerationStructureTrianglesOpacityMicromapEXT-ppUsageCounts-parameter
  If `usageCountsCount` is not `0`, and `ppUsageCounts` is not `NULL`, `ppUsageCounts` must be a valid pointer to an array of `usageCountsCount` valid pointers to VkMicromapUsageEXT structures

- VUID-VkAccelerationStructureTrianglesOpacityMicromapEXT-micromap-parameter
  If `micromap` is not VK_NULL_HANDLE, `micromap` must be a valid VkMicromapEXT handle

Structure Chaining

Extends the structures

  - VkAccelerationStructureDenseGeometryFormatTrianglesDataAMDX

  - VkAccelerationStructureGeometryTrianglesDataKHR

The VkOpacityMicromapSpecialIndexKHR enumeration is defined as:

    // Provided by VK_KHR_opacity_micromap
    typedef enum VkOpacityMicromapSpecialIndexKHR {
        VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_TRANSPARENT_KHR = -1,
        VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_OPAQUE_KHR = -2,
        VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_UNKNOWN_TRANSPARENT_KHR = -3,
        VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_UNKNOWN_OPAQUE_KHR = -4,
      // Provided by VK_EXT_opacity_micromap with VK_NV_cluster_acceleration_structure
        VK_OPACITY_MICROMAP_SPECIAL_INDEX_CLUSTER_GEOMETRY_DISABLE_OPACITY_MICROMAP_NV = -5,
      // Provided by VK_EXT_opacity_micromap
        VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_TRANSPARENT_EXT = VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_TRANSPARENT_KHR,
      // Provided by VK_EXT_opacity_micromap
        VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_OPAQUE_EXT = VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_OPAQUE_KHR,
      // Provided by VK_EXT_opacity_micromap
        VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_UNKNOWN_TRANSPARENT_EXT = VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_UNKNOWN_TRANSPARENT_KHR,
      // Provided by VK_EXT_opacity_micromap
        VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_UNKNOWN_OPAQUE_EXT = VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_UNKNOWN_OPAQUE_KHR,
    } VkOpacityMicromapSpecialIndexKHR;

    // Provided by VK_EXT_opacity_micromap
    // Equivalent to VkOpacityMicromapSpecialIndexKHR
    typedef VkOpacityMicromapSpecialIndexKHR VkOpacityMicromapSpecialIndexEXT;

- VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_TRANSPARENT_KHR specifies that the entire triangle is fully transparent.

- VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_OPAQUE_KHR specifies that the entire triangle is fully opaque.

- VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_UNKNOWN_TRANSPARENT_KHR specifies that the entire triangle is unknown-transparent.

- VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_UNKNOWN_OPAQUE_KHR specifies that the entire triangle is unknown-opaque.

- VK_OPACITY_MICROMAP_SPECIAL_INDEX_CLUSTER_GEOMETRY_DISABLE_OPACITY_MICROMAP_NV specifies that Opacity Micromap will be disabled for this triangle and opacity value will be picked from VkClusterAccelerationStructureBuildTriangleClusterInfoNV::`baseGeometryIndexAndGeometryFlags` instead. Note that this special index is only valid for Cluster Geometry.

The VkAccelerationStructureSerializedBlockTypeKHR enumeration is defined as:

    // Provided by VK_KHR_opacity_micromap
    typedef enum VkAccelerationStructureSerializedBlockTypeKHR {
        VK_ACCELERATION_STRUCTURE_SERIALIZED_BLOCK_TYPE_OPACITY_MICROMAP_KHR = 0,
    } VkAccelerationStructureSerializedBlockTypeKHR;

- VK_ACCELERATION_STRUCTURE_SERIALIZED_BLOCK_TYPE_OPACITY_MICROMAP_KHR specifies that the block contains opacity micromaps.

The `VkAccelerationStructureTrianglesDisplacementMicromapNV` structure is defined as:

    // Provided by VK_NV_displacement_micromap
    typedef struct VkAccelerationStructureTrianglesDisplacementMicromapNV {
        VkStructureType                     sType;
        void*                               pNext;
        VkFormat                            displacementBiasAndScaleFormat;
        VkFormat                            displacementVectorFormat;
        VkDeviceOrHostAddressConstKHR       displacementBiasAndScaleBuffer;
        VkDeviceSize                        displacementBiasAndScaleStride;
        VkDeviceOrHostAddressConstKHR       displacementVectorBuffer;
        VkDeviceSize                        displacementVectorStride;
        VkDeviceOrHostAddressConstKHR       displacedMicromapPrimitiveFlags;
        VkDeviceSize                        displacedMicromapPrimitiveFlagsStride;
        VkIndexType                         indexType;
        VkDeviceOrHostAddressConstKHR       indexBuffer;
        VkDeviceSize                        indexStride;
        uint32_t                            baseTriangle;
        uint32_t                            usageCountsCount;
        const VkMicromapUsageEXT*           pUsageCounts;
        const VkMicromapUsageEXT* const*    ppUsageCounts;
        VkMicromapEXT                       micromap;
    } VkAccelerationStructureTrianglesDisplacementMicromapNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `displacementBiasAndScaleFormat` is the format of displacement bias and scale used in this displacement micromap reference.

- `displacementVectorFormat` is the format of displacement vector used in this displacement micromap reference.

- `displacementBiasAndScaleBuffer` is the address containing the bias and scale.

- `displacementBiasAndScaleStride` is the byte stride between bias and scale values.

- `displacementVectorBuffer` is the address containing the displacement vector values.

- `displacementVectorStride` is the byte stride between displacement vector values.

- `displacedMicromapPrimitiveFlags` is the address containing the primitive flags.

- `displacedMicromapPrimitiveFlagsStride` is the byte stride between primitive flag values.

- `indexType` is the type of triangle indices used when indexing this micromap.

- `indexBuffer` is a device or host address of memory containing the triangle indices. When `indexType` is VK_INDEX_TYPE_NONE_KHR it must be `NULL`.

- `indexStride` is the byte stride between triangle indices.

- `baseTriangle` is the base value added to the non-negative triangle indices.

- `usageCountsCount` specifies the number of usage counts structures that will be used to determine the size of this micromap.

- `pUsageCounts` is a pointer to an array of VkMicromapUsageEXT structures.

- `ppUsageCounts` is a pointer to an array of pointers to VkMicromapUsageEXT structures.

- `micromap` is the handle to the micromap object to include in this geometry.

If `VkAccelerationStructureTrianglesDisplacementMicromapNV` is included in the `pNext` chain of a VkAccelerationStructureGeometryTrianglesDataKHR structure, that geometry will reference that micromap.

For each triangle in the geometry, the acceleration structure build fetches an index from `indexBuffer` using `indexType` and `indexStride`. That triangle uses the displacement micromap information from `micromap` at that index plus `baseTriangle`.

Only one of `pUsageCounts` or `ppUsageCounts` can be a valid pointer, the other must be `NULL`. The elements of the non-`NULL` array describe the total count used to build this geometry. For a given `format` and `subdivisionLevel` the number of triangles in this geometry matching those values after indirection must be equal to the sum of matching `count` provided.

Valid Usage

- VUID-VkAccelerationStructureTrianglesDisplacementMicromapNV-displacementBiasAndScaleFormat-09501
  `displacementBiasAndScaleFormat` must not be VK_FORMAT_UNDEFINED

- VUID-VkAccelerationStructureTrianglesDisplacementMicromapNV-displacementVectorFormat-09502
  `displacementVectorFormat` must not be VK_FORMAT_UNDEFINED

- VUID-VkAccelerationStructureTrianglesDisplacementMicromapNV-pUsageCounts-07992
  Only one of `pUsageCounts` or `ppUsageCounts` can be a valid pointer, the other must be `NULL`

Valid Usage (Implicit)

- VUID-VkAccelerationStructureTrianglesDisplacementMicromapNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_TRIANGLES_DISPLACEMENT_MICROMAP_NV

- VUID-VkAccelerationStructureTrianglesDisplacementMicromapNV-displacementBiasAndScaleFormat-parameter
  `displacementBiasAndScaleFormat` must be a valid VkFormat value

- VUID-VkAccelerationStructureTrianglesDisplacementMicromapNV-displacementVectorFormat-parameter
  `displacementVectorFormat` must be a valid VkFormat value

- VUID-VkAccelerationStructureTrianglesDisplacementMicromapNV-indexType-parameter
  `indexType` must be a valid VkIndexType value

- VUID-VkAccelerationStructureTrianglesDisplacementMicromapNV-pUsageCounts-parameter
  If `usageCountsCount` is not `0`, and `pUsageCounts` is not `NULL`, `pUsageCounts` must be a valid pointer to an array of `usageCountsCount` VkMicromapUsageEXT structures

- VUID-VkAccelerationStructureTrianglesDisplacementMicromapNV-ppUsageCounts-parameter
  If `usageCountsCount` is not `0`, and `ppUsageCounts` is not `NULL`, `ppUsageCounts` must be a valid pointer to an array of `usageCountsCount` valid pointers to VkMicromapUsageEXT structures

- VUID-VkAccelerationStructureTrianglesDisplacementMicromapNV-micromap-parameter
  If `micromap` is not VK_NULL_HANDLE, `micromap` must be a valid VkMicromapEXT handle

Structure Chaining

Extends the structure

  - VkAccelerationStructureGeometryTrianglesDataKHR

To build an acceleration structure for the `VK_NV_ray_tracing` extension call:

    // Provided by VK_NV_ray_tracing
    void vkCmdBuildAccelerationStructureNV(
        VkCommandBuffer                             commandBuffer,
        const VkAccelerationStructureInfoNV*        pInfo,
        VkBuffer                                    instanceData,
        VkDeviceSize                                instanceOffset,
        VkBool32                                    update,
        VkAccelerationStructureNV                   dst,
        VkAccelerationStructureNV                   src,
        VkBuffer                                    scratch,
        VkDeviceSize                                scratchOffset);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `pInfo` contains the shared information for the acceleration structure’s structure.

- `instanceData` is the buffer containing an array of VkAccelerationStructureInstanceKHR structures defining acceleration structures. This parameter must be `NULL` for bottom level acceleration structures.

- `instanceOffset` is the offset in bytes (relative to the start of `instanceData`) at which the instance data is located.

- `update` specifies whether to update the `dst` acceleration structure with the data in `src`.

- `dst` is a pointer to the target acceleration structure for the build.

- `src` is a pointer to an existing acceleration structure that is to be used to update the `dst` acceleration structure.

- `scratch` is the VkBuffer that will be used as scratch memory for the build.

- `scratchOffset` is the offset in bytes relative to the start of `scratch` that will be used as a scratch memory.

Accesses to `dst`, `src`, and `scratch` must be synchronized with the VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR pipeline stage and an access type of VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR or VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_KHR.

Valid Usage

- VUID-vkCmdBuildAccelerationStructureNV-geometryCount-02241
  `geometryCount` must be less than or equal to VkPhysicalDeviceRayTracingPropertiesNV::`maxGeometryCount`

- VUID-vkCmdBuildAccelerationStructureNV-dst-02488
  `dst` must have been created with compatible VkAccelerationStructureInfoNV where VkAccelerationStructureInfoNV::`type` and VkAccelerationStructureInfoNV::`flags` are identical, VkAccelerationStructureInfoNV::`instanceCount` and VkAccelerationStructureInfoNV::`geometryCount` for `dst` are greater than or equal to the build size and each geometry in VkAccelerationStructureInfoNV::`pGeometries` for `dst` has greater than or equal to the number of vertices, indices, and AABBs

- VUID-vkCmdBuildAccelerationStructureNV-update-02489
  If `update` is VK_TRUE, `src` must not be VK_NULL_HANDLE

- VUID-vkCmdBuildAccelerationStructureNV-update-02490
  If `update` is VK_TRUE, `src` must have previously been constructed with VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_NV set in VkAccelerationStructureInfoNV::`flags` in the original build

- VUID-vkCmdBuildAccelerationStructureNV-update-02491
  If `update` is VK_FALSE, the `size` member of the VkMemoryRequirements structure returned from a call to vkGetAccelerationStructureMemoryRequirementsNV with VkAccelerationStructureMemoryRequirementsInfoNV::`accelerationStructure` set to `dst` and VkAccelerationStructureMemoryRequirementsInfoNV::`type` set to VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_BUILD_SCRATCH_NV must be less than or equal to the size of `scratch` minus `scratchOffset`

- VUID-vkCmdBuildAccelerationStructureNV-update-02492
  If `update` is VK_TRUE, the `size` member of the VkMemoryRequirements structure returned from a call to vkGetAccelerationStructureMemoryRequirementsNV with VkAccelerationStructureMemoryRequirementsInfoNV::`accelerationStructure` set to `dst` and VkAccelerationStructureMemoryRequirementsInfoNV::`type` set to VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_UPDATE_SCRATCH_NV must be less than or equal to the size of `scratch` minus `scratchOffset`

- VUID-vkCmdBuildAccelerationStructureNV-scratch-03522
  `scratch` must have been created with the VK_BUFFER_USAGE_RAY_TRACING_BIT_NV usage flag set

- VUID-vkCmdBuildAccelerationStructureNV-instanceData-03523
  If `instanceData` is not VK_NULL_HANDLE, `instanceData` must have been created with the VK_BUFFER_USAGE_RAY_TRACING_BIT_NV usage flag set

- VUID-vkCmdBuildAccelerationStructureNV-accelerationStructureReference-12264
  Each VkAccelerationStructureInstanceKHR::`accelerationStructureReference` value in `instanceData` must be a value obtained from vkGetAccelerationStructureHandleNV for a bottom level acceleration structure

- VUID-vkCmdBuildAccelerationStructureNV-update-03524
  If `update` is VK_TRUE, then objects that were previously active must not be made inactive as per Inactive Primitives and Instances

- VUID-vkCmdBuildAccelerationStructureNV-update-03525
  If `update` is VK_TRUE, then objects that were previously inactive must not be made active as per Inactive Primitives and Instances

- VUID-vkCmdBuildAccelerationStructureNV-update-03526
  If `update` is VK_TRUE, the `src` and `dst` objects must either be the same object or not have any memory aliasing

- VUID-vkCmdBuildAccelerationStructureNV-dst-07787
  `dst` must be bound completely and contiguously to a single `VkDeviceMemory` object via vkBindAccelerationStructureMemoryNV

Valid Usage (Implicit)

- VUID-vkCmdBuildAccelerationStructureNV-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdBuildAccelerationStructureNV-pInfo-parameter
  `pInfo` must be a valid pointer to a valid VkAccelerationStructureInfoNV structure

- VUID-vkCmdBuildAccelerationStructureNV-instanceData-parameter
  If `instanceData` is not VK_NULL_HANDLE, `instanceData` must be a valid VkBuffer handle

- VUID-vkCmdBuildAccelerationStructureNV-dst-parameter
  `dst` must be a valid VkAccelerationStructureNV handle

- VUID-vkCmdBuildAccelerationStructureNV-src-parameter
  If `src` is not VK_NULL_HANDLE, `src` must be a valid VkAccelerationStructureNV handle

- VUID-vkCmdBuildAccelerationStructureNV-scratch-parameter
  `scratch` must be a valid VkBuffer handle

- VUID-vkCmdBuildAccelerationStructureNV-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdBuildAccelerationStructureNV-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT operations

- VUID-vkCmdBuildAccelerationStructureNV-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdBuildAccelerationStructureNV-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdBuildAccelerationStructureNV-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdBuildAccelerationStructureNV-commonparent
  Each of `commandBuffer`, `dst`, `instanceData`, `scratch`, and `src` that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Outside | VK_QUEUE_COMPUTE_BIT | Action

Conditional Rendering

vkCmdBuildAccelerationStructureNV is not affected by conditional rendering

The `VkTransformMatrixKHR` structure is defined as:

    // Provided by VK_KHR_acceleration_structure
    typedef struct VkTransformMatrixKHR {
        float    matrix[3][4];
    } VkTransformMatrixKHR;

    // Provided by VK_NV_ray_tracing
    // Equivalent to VkTransformMatrixKHR
    typedef VkTransformMatrixKHR VkTransformMatrixNV;

- `matrix` is a 3x4 row-major affine transformation matrix.

Valid Usage

- VUID-VkTransformMatrixKHR-matrix-03799
  The first three columns of `matrix` must define an invertible 3x3 matrix

The `VkAccelerationStructureGeometryAabbsDataKHR` structure is defined as:

    // Provided by VK_KHR_acceleration_structure
    typedef struct VkAccelerationStructureGeometryAabbsDataKHR {
        VkStructureType                  sType;
        const void*                      pNext;
        VkDeviceOrHostAddressConstKHR    data;
        VkDeviceSize                     stride;
    } VkAccelerationStructureGeometryAabbsDataKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `data` is a device or host address of memory containing VkAabbPositionsKHR structures containing position data for each axis-aligned bounding box in the geometry.

- `stride` is the stride in bytes between each entry in `data`. The stride must be a multiple of `8`.

Valid Usage

- VUID-VkAccelerationStructureGeometryAabbsDataKHR-stride-03545
  `stride` must be a multiple of `8`

- VUID-VkAccelerationStructureGeometryAabbsDataKHR-stride-03820
  `stride` must be less than or equal to 232-1

Valid Usage (Implicit)

- VUID-VkAccelerationStructureGeometryAabbsDataKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_AABBS_DATA_KHR

- VUID-VkAccelerationStructureGeometryAabbsDataKHR-pNext-pNext
  `pNext` must be `NULL`

The `VkAabbPositionsKHR` structure is defined as:

    // Provided by VK_KHR_acceleration_structure
    typedef struct VkAabbPositionsKHR {
        float    minX;
        float    minY;
        float    minZ;
        float    maxX;
        float    maxY;
        float    maxZ;
    } VkAabbPositionsKHR;

    // Provided by VK_NV_ray_tracing
    // Equivalent to VkAabbPositionsKHR
    typedef VkAabbPositionsKHR VkAabbPositionsNV;

- `minX` is the x position of one opposing corner of a bounding box.

- `minY` is the y position of one opposing corner of a bounding box.

- `minZ` is the z position of one opposing corner of a bounding box.

- `maxX` is the x position of the other opposing corner of a bounding box.

- `maxY` is the y position of the other opposing corner of a bounding box.

- `maxZ` is the z position of the other opposing corner of a bounding box.

Valid Usage

- VUID-VkAabbPositionsKHR-minX-03546
  `minX` must be less than or equal to `maxX`

- VUID-VkAabbPositionsKHR-minY-03547
  `minY` must be less than or equal to `maxY`

- VUID-VkAabbPositionsKHR-minZ-03548
  `minZ` must be less than or equal to `maxZ`

The `VkAccelerationStructureGeometryInstancesDataKHR` structure is defined as:

    // Provided by VK_KHR_acceleration_structure
    typedef struct VkAccelerationStructureGeometryInstancesDataKHR {
        VkStructureType                  sType;
        const void*                      pNext;
        VkBool32                         arrayOfPointers;
        VkDeviceOrHostAddressConstKHR    data;
    } VkAccelerationStructureGeometryInstancesDataKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `arrayOfPointers` specifies whether `data` is used as an array of addresses or just an array.

- `data` is either the address of an array of device or host addresses referencing individual VkAccelerationStructureInstanceKHR structures or packed motion instance information as described in motion instances if `arrayOfPointers` is VK_TRUE, or the address of an array of VkAccelerationStructureInstanceKHR or VkAccelerationStructureMotionInstanceNV structures. Addresses and VkAccelerationStructureInstanceKHR structures are tightly packed. VkAccelerationStructureMotionInstanceNV structures have a stride of 160 bytes.

Valid Usage (Implicit)

- VUID-VkAccelerationStructureGeometryInstancesDataKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_INSTANCES_DATA_KHR

- VUID-VkAccelerationStructureGeometryInstancesDataKHR-pNext-pNext
  `pNext` must be `NULL`

Acceleration structure instances can be built into top-level acceleration structures. Each acceleration structure instance is a separate entry in the top-level acceleration structure which includes all the geometry of a bottom-level acceleration structure at a transformed location. Multiple instances can point to the same bottom level acceleration structure.

An acceleration structure instance is defined by the structure:

    // Provided by VK_KHR_acceleration_structure
    typedef struct VkAccelerationStructureInstanceKHR {
        VkTransformMatrixKHR          transform;
        uint32_t                      instanceCustomIndex:24;
        uint32_t                      mask:8;
        uint32_t                      instanceShaderBindingTableRecordOffset:24;
        VkGeometryInstanceFlagsKHR    flags:8;
        uint64_t                      accelerationStructureReference;
    } VkAccelerationStructureInstanceKHR;

    // Provided by VK_NV_ray_tracing
    // Equivalent to VkAccelerationStructureInstanceKHR
    typedef VkAccelerationStructureInstanceKHR VkAccelerationStructureInstanceNV;

- `transform` is a VkTransformMatrixKHR structure describing a transformation to be applied to the acceleration structure.

- `instanceCustomIndex` is a 24-bit application-specified index value accessible to ray shaders in the `InstanceCustomIndexKHR` built-in.

- `mask` is an 8-bit visibility mask for the geometry. The instance may only be hit if `Cull Mask & instance.mask != 0`

- `instanceShaderBindingTableRecordOffset` is a 24-bit offset used in calculating the hit shader binding table index.

- `flags` is an 8-bit mask of VkGeometryInstanceFlagBitsKHR values to apply to this instance.

- `accelerationStructureReference` is either :

  - a device address containing the value obtained from vkGetAccelerationStructureDeviceAddressKHR or vkGetAccelerationStructureHandleNV for a bottom level acceleration structure (used by device operations which reference acceleration structures) or,

  - a device address containing a bottom level cluster acceleration structure built using vkCmdBuildClusterAccelerationStructureIndirectNV

  - a VkAccelerationStructureKHR object (used by host operations which reference acceleration structures).

The C language specification does not define the ordering of bit-fields, but in practice, this structure produces the correct layout with existing compilers. The intended bit pattern is for the following:

- `instanceCustomIndex` and `mask` occupy the same memory as if a single `uint32_t` was specified in their place

  - `instanceCustomIndex` occupies the 24 least significant bits of that memory

  - `mask` occupies the 8 most significant bits of that memory

- `instanceShaderBindingTableRecordOffset` and `flags` occupy the same memory as if a single `uint32_t` was specified in their place

  - `instanceShaderBindingTableRecordOffset` occupies the 24 least significant bits of that memory

  - `flags` occupies the 8 most significant bits of that memory

If a compiler produces code that diverges from that pattern, applications must employ another method to set values according to the correct bit pattern.

Valid Usage

- VUID-VkAccelerationStructureInstanceKHR-micromap-11580
  If `flags` includes VK_GEOMETRY_INSTANCE_FORCE_OPACITY_MICROMAP_2_STATE_BIT_KHR or VK_GEOMETRY_INSTANCE_DISABLE_OPACITY_MICROMAPS_BIT_KHR, the `VkPhysicalDeviceOpacityMicromapFeaturesKHR`::`micromap` or `VkPhysicalDeviceOpacityMicromapFeaturesEXT`::`micromap` feature must be enabled

- VUID-VkAccelerationStructureInstanceKHR-flags-11581
  If `flags` includes VK_GEOMETRY_INSTANCE_DISABLE_OPACITY_MICROMAPS_BIT_KHR, the `flags` used to build the acceleration structure referenced by `accelerationStructureReference` must have included VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DISABLE_OPACITY_MICROMAPS_BIT_KHR

Valid Usage (Implicit)

- VUID-VkAccelerationStructureInstanceKHR-flags-parameter
  `flags` must be a valid combination of VkGeometryInstanceFlagBitsKHR values

Possible values of `flags` in the instance modifying the behavior of that instance are:

    // Provided by VK_KHR_acceleration_structure
    typedef enum VkGeometryInstanceFlagBitsKHR {
        VK_GEOMETRY_INSTANCE_TRIANGLE_FACING_CULL_DISABLE_BIT_KHR = 0x00000001,
        VK_GEOMETRY_INSTANCE_TRIANGLE_FLIP_FACING_BIT_KHR = 0x00000002,
        VK_GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_KHR = 0x00000004,
        VK_GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_KHR = 0x00000008,
      // Provided by VK_KHR_opacity_micromap
        VK_GEOMETRY_INSTANCE_FORCE_OPACITY_MICROMAP_2_STATE_BIT_KHR = 0x00000010,
      // Provided by VK_KHR_opacity_micromap
        VK_GEOMETRY_INSTANCE_DISABLE_OPACITY_MICROMAPS_BIT_KHR = 0x00000020,
        VK_GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_KHR = VK_GEOMETRY_INSTANCE_TRIANGLE_FLIP_FACING_BIT_KHR,
      // Provided by VK_NV_ray_tracing
        VK_GEOMETRY_INSTANCE_TRIANGLE_CULL_DISABLE_BIT_NV = VK_GEOMETRY_INSTANCE_TRIANGLE_FACING_CULL_DISABLE_BIT_KHR,
      // Provided by VK_NV_ray_tracing
        VK_GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_NV = VK_GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_KHR,
      // Provided by VK_NV_ray_tracing
        VK_GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_NV = VK_GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_KHR,
      // Provided by VK_NV_ray_tracing
        VK_GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_NV = VK_GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_KHR,
      // Provided by VK_EXT_opacity_micromap
        VK_GEOMETRY_INSTANCE_FORCE_OPACITY_MICROMAP_2_STATE_BIT_EXT = VK_GEOMETRY_INSTANCE_FORCE_OPACITY_MICROMAP_2_STATE_BIT_KHR,
      // Provided by VK_EXT_opacity_micromap
      // VK_GEOMETRY_INSTANCE_FORCE_OPACITY_MICROMAP_2_STATE_EXT is a legacy alias
        VK_GEOMETRY_INSTANCE_FORCE_OPACITY_MICROMAP_2_STATE_EXT = VK_GEOMETRY_INSTANCE_FORCE_OPACITY_MICROMAP_2_STATE_BIT_EXT,
      // Provided by VK_EXT_opacity_micromap
        VK_GEOMETRY_INSTANCE_DISABLE_OPACITY_MICROMAPS_BIT_EXT = VK_GEOMETRY_INSTANCE_DISABLE_OPACITY_MICROMAPS_BIT_KHR,
      // Provided by VK_EXT_opacity_micromap
      // VK_GEOMETRY_INSTANCE_DISABLE_OPACITY_MICROMAPS_EXT is a legacy alias
        VK_GEOMETRY_INSTANCE_DISABLE_OPACITY_MICROMAPS_EXT = VK_GEOMETRY_INSTANCE_DISABLE_OPACITY_MICROMAPS_BIT_EXT,
    } VkGeometryInstanceFlagBitsKHR;

    // Provided by VK_NV_ray_tracing
    // Equivalent to VkGeometryInstanceFlagBitsKHR
    typedef VkGeometryInstanceFlagBitsKHR VkGeometryInstanceFlagBitsNV;

- VK_GEOMETRY_INSTANCE_TRIANGLE_FACING_CULL_DISABLE_BIT_KHR disables face culling for this instance.

- VK_GEOMETRY_INSTANCE_TRIANGLE_FLIP_FACING_BIT_KHR specifies that the facing determination for geometry in this instance is inverted. Because the facing is determined in object space, an instance transform does not change the winding, but a geometry transform does.

- VK_GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_KHR causes this instance to act as though VK_GEOMETRY_OPAQUE_BIT_KHR were specified on all geometries referenced by this instance. This behavior can be overridden by the SPIR-V `NoOpaqueKHR` ray flag.

- VK_GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_KHR causes this instance to act as though VK_GEOMETRY_OPAQUE_BIT_KHR were not specified on all geometries referenced by this instance. This behavior can be overridden by the SPIR-V `OpaqueKHR` ray flag.

- VK_GEOMETRY_INSTANCE_FORCE_OPACITY_MICROMAP_2_STATE_BIT_KHR forces the micromap format to 2 state mode as described in traversal.

- VK_GEOMETRY_INSTANCE_DISABLE_OPACITY_MICROMAPS_BIT_KHR disables any opacity micromaps referenced by acceleration structures referenced by this instance as described in traversal.

VK_GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_KHR and VK_GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_KHR must not be used in the same flag.

    // Provided by VK_KHR_acceleration_structure
    typedef VkFlags VkGeometryInstanceFlagsKHR;

    // Provided by VK_NV_ray_tracing
    // Equivalent to VkGeometryInstanceFlagsKHR
    typedef VkGeometryInstanceFlagsKHR VkGeometryInstanceFlagsNV;

`VkGeometryInstanceFlagsKHR` is a bitmask type for setting a mask of zero or more VkGeometryInstanceFlagBitsKHR.

Acceleration structure motion instances can be built into top-level acceleration structures. Each acceleration structure instance is a separate entry in the top-level acceleration structure which includes all the geometry of a bottom-level acceleration structure at a transformed location including a type of motion and parameters to determine the motion of the instance over time.

An acceleration structure motion instance is defined by the structure:

    // Provided by VK_NV_ray_tracing_motion_blur
    typedef struct VkAccelerationStructureMotionInstanceNV {
        VkAccelerationStructureMotionInstanceTypeNV     type;
        VkAccelerationStructureMotionInstanceFlagsNV    flags;
        VkAccelerationStructureMotionInstanceDataNV     data;
    } VkAccelerationStructureMotionInstanceNV;

- `type` is a VkAccelerationStructureMotionInstanceTypeNV enumerant identifying which type of motion instance this is and which type of the union is valid.

- `flags` is currently unused, but is required to keep natural alignment of `data`.

- `data` is a VkAccelerationStructureMotionInstanceDataNV containing motion instance data for this instance.

Note | If writing this other than with a standard C compiler, note that the final structure should be 152 bytes in size.

Valid Usage (Implicit)

- VUID-VkAccelerationStructureMotionInstanceNV-type-parameter
  `type` must be a valid VkAccelerationStructureMotionInstanceTypeNV value

- VUID-VkAccelerationStructureMotionInstanceNV-flags-zerobitmask
  `flags` must be `0`

- VUID-VkAccelerationStructureMotionInstanceNV-staticInstance-parameter
  If `type` is VK_ACCELERATION_STRUCTURE_MOTION_INSTANCE_TYPE_STATIC_NV, the `staticInstance` member of `data` must be a valid VkAccelerationStructureInstanceKHR structure

- VUID-VkAccelerationStructureMotionInstanceNV-matrixMotionInstance-parameter
  If `type` is VK_ACCELERATION_STRUCTURE_MOTION_INSTANCE_TYPE_MATRIX_MOTION_NV, the `matrixMotionInstance` member of `data` must be a valid VkAccelerationStructureMatrixMotionInstanceNV structure

- VUID-VkAccelerationStructureMotionInstanceNV-srtMotionInstance-parameter
  If `type` is VK_ACCELERATION_STRUCTURE_MOTION_INSTANCE_TYPE_SRT_MOTION_NV, the `srtMotionInstance` member of `data` must be a valid VkAccelerationStructureSRTMotionInstanceNV structure

Acceleration structure motion instance is defined by the union:

    // Provided by VK_NV_ray_tracing_motion_blur
    typedef union VkAccelerationStructureMotionInstanceDataNV {
        VkAccelerationStructureInstanceKHR               staticInstance;
        VkAccelerationStructureMatrixMotionInstanceNV    matrixMotionInstance;
        VkAccelerationStructureSRTMotionInstanceNV       srtMotionInstance;
    } VkAccelerationStructureMotionInstanceDataNV;

- `staticInstance` is a VkAccelerationStructureInstanceKHR structure containing data for a static instance.

- `matrixMotionInstance` is a VkAccelerationStructureMatrixMotionInstanceNV structure containing data for a matrix motion instance.

- `srtMotionInstance` is a VkAccelerationStructureSRTMotionInstanceNV structure containing data for an SRT motion instance.

    // Provided by VK_NV_ray_tracing_motion_blur
    typedef VkFlags VkAccelerationStructureMotionInstanceFlagsNV;

`VkAccelerationStructureMotionInstanceFlagsNV` is a bitmask type for setting a mask, but is currently reserved for future use.

The VkAccelerationStructureMotionInstanceTypeNV enumeration is defined as:

    // Provided by VK_NV_ray_tracing_motion_blur
    typedef enum VkAccelerationStructureMotionInstanceTypeNV {
        VK_ACCELERATION_STRUCTURE_MOTION_INSTANCE_TYPE_STATIC_NV = 0,
        VK_ACCELERATION_STRUCTURE_MOTION_INSTANCE_TYPE_MATRIX_MOTION_NV = 1,
        VK_ACCELERATION_STRUCTURE_MOTION_INSTANCE_TYPE_SRT_MOTION_NV = 2,
    } VkAccelerationStructureMotionInstanceTypeNV;

- VK_ACCELERATION_STRUCTURE_MOTION_INSTANCE_TYPE_STATIC_NV specifies that the instance is a static instance with no instance motion.

- VK_ACCELERATION_STRUCTURE_MOTION_INSTANCE_TYPE_MATRIX_MOTION_NV specifies that the instance is a motion instance with motion specified by interpolation between two matrices.

- VK_ACCELERATION_STRUCTURE_MOTION_INSTANCE_TYPE_SRT_MOTION_NV specifies that the instance is a motion instance with motion specified by interpolation in the SRT decomposition.

An acceleration structure matrix motion instance is defined by the structure:

    // Provided by VK_NV_ray_tracing_motion_blur
    typedef struct VkAccelerationStructureMatrixMotionInstanceNV {
        VkTransformMatrixKHR          transformT0;
        VkTransformMatrixKHR          transformT1;
        uint32_t                      instanceCustomIndex:24;
        uint32_t                      mask:8;
        uint32_t                      instanceShaderBindingTableRecordOffset:24;
        VkGeometryInstanceFlagsKHR    flags:8;
        uint64_t                      accelerationStructureReference;
    } VkAccelerationStructureMatrixMotionInstanceNV;

- `transformT0` is a VkTransformMatrixKHR structure describing a transformation to be applied to the acceleration structure at time 0.

- `transformT1` is a VkTransformMatrixKHR structure describing a transformation to be applied to the acceleration structure at time 1.

- `instanceCustomIndex` is a 24-bit application-specified index value accessible to ray shaders in the `InstanceCustomIndexKHR` built-in.

- `mask` is an 8-bit visibility mask for the geometry. The instance may only be hit if `Cull Mask & instance.mask != 0`

- `instanceShaderBindingTableRecordOffset` is a 24-bit offset used in calculating the hit shader binding table index.

- `flags` is an 8-bit mask of VkGeometryInstanceFlagBitsKHR values to apply to this instance.

- `accelerationStructureReference` is either:

  - a device address containing the value obtained from vkGetAccelerationStructureDeviceAddressKHR or vkGetAccelerationStructureHandleNV (used by device operations which reference acceleration structures) or,

  - a VkAccelerationStructureKHR object (used by host operations which reference acceleration structures).

The C language specification does not define the ordering of bit-fields, but in practice, this structure produces the correct layout with existing compilers. The intended bit pattern is for the following:

- `instanceCustomIndex` and `mask` occupy the same memory as if a single `uint32_t` was specified in their place

  - `instanceCustomIndex` occupies the 24 least significant bits of that memory

  - `mask` occupies the 8 most significant bits of that memory

- `instanceShaderBindingTableRecordOffset` and `flags` occupy the same memory as if a single `uint32_t` was specified in their place

  - `instanceShaderBindingTableRecordOffset` occupies the 24 least significant bits of that memory

  - `flags` occupies the 8 most significant bits of that memory

If a compiler produces code that diverges from that pattern, applications must employ another method to set values according to the correct bit pattern.

The transform for a matrix motion instance at a point in time is derived by component-wise linear interpolation of the two transforms. That is, for a `time` in [0,1] the resulting transform is

  `transformT0` × (1 - `time`) + `transformT1` × `time`

Valid Usage (Implicit)

- VUID-VkAccelerationStructureMatrixMotionInstanceNV-flags-parameter
  `flags` must be a valid combination of VkGeometryInstanceFlagBitsKHR values

An acceleration structure SRT motion instance is defined by the structure:

    // Provided by VK_NV_ray_tracing_motion_blur
    typedef struct VkAccelerationStructureSRTMotionInstanceNV {
        VkSRTDataNV                   transformT0;
        VkSRTDataNV                   transformT1;
        uint32_t                      instanceCustomIndex:24;
        uint32_t                      mask:8;
        uint32_t                      instanceShaderBindingTableRecordOffset:24;
        VkGeometryInstanceFlagsKHR    flags:8;
        uint64_t                      accelerationStructureReference;
    } VkAccelerationStructureSRTMotionInstanceNV;

- `transformT0` is a VkSRTDataNV structure describing a transformation to be applied to the acceleration structure at time 0.

- `transformT1` is a VkSRTDataNV structure describing a transformation to be applied to the acceleration structure at time 1.

- `instanceCustomIndex` is a 24-bit application-specified index value accessible to ray shaders in the `InstanceCustomIndexKHR` built-in.

- `mask` is an 8-bit visibility mask for the geometry. The instance may only be hit if `Cull Mask & instance.mask != 0`

- `instanceShaderBindingTableRecordOffset` is a 24-bit offset used in calculating the hit shader binding table index.

- `flags` is an 8-bit mask of VkGeometryInstanceFlagBitsKHR values to apply to this instance.

- `accelerationStructureReference` is either:

  - a device address containing the value obtained from vkGetAccelerationStructureDeviceAddressKHR or vkGetAccelerationStructureHandleNV (used by device operations which reference acceleration structures) or,

  - a VkAccelerationStructureKHR object (used by host operations which reference acceleration structures).

The C language specification does not define the ordering of bit-fields, but in practice, this structure produces the correct layout with existing compilers. The intended bit pattern is for the following:

- `instanceCustomIndex` and `mask` occupy the same memory as if a single `uint32_t` was specified in their place

  - `instanceCustomIndex` occupies the 24 least significant bits of that memory

  - `mask` occupies the 8 most significant bits of that memory

- `instanceShaderBindingTableRecordOffset` and `flags` occupy the same memory as if a single `uint32_t` was specified in their place

  - `instanceShaderBindingTableRecordOffset` occupies the 24 least significant bits of that memory

  - `flags` occupies the 8 most significant bits of that memory

If a compiler produces code that diverges from that pattern, applications must employ another method to set values according to the correct bit pattern.

The transform for a SRT motion instance at a point in time is derived from component-wise linear interpolation of the two SRT transforms. That is, for a `time` in [0,1] the resulting transform is

  `transformT0` × (1 - `time`) + `transformT1` × `time`

Valid Usage (Implicit)

- VUID-VkAccelerationStructureSRTMotionInstanceNV-flags-parameter
  `flags` must be a valid combination of VkGeometryInstanceFlagBitsKHR values

An acceleration structure SRT transform is defined by the structure:

    // Provided by VK_NV_ray_tracing_motion_blur
    typedef struct VkSRTDataNV {
        float    sx;
        float    a;
        float    b;
        float    pvx;
        float    sy;
        float    c;
        float    pvy;
        float    sz;
        float    pvz;
        float    qx;
        float    qy;
        float    qz;
        float    qw;
        float    tx;
        float    ty;
        float    tz;
    } VkSRTDataNV;

- `sx` is the x component of the scale of the transform

- `a` is one component of the shear for the transform

- `b` is one component of the shear for the transform

- `pvx` is the x component of the pivot point of the transform

- `sy` is the y component of the scale of the transform

- `c` is one component of the shear for the transform

- `pvy` is the y component of the pivot point of the transform

- `sz` is the z component of the scale of the transform

- `pvz` is the z component of the pivot point of the transform

- `qx` is the x component of the rotation quaternion

- `qy` is the y component of the rotation quaternion

- `qz` is the z component of the rotation quaternion

- `qw` is the w component of the rotation quaternion

- `tx` is the x component of the post-rotation translation

- `ty` is the y component of the post-rotation translation

- `tz` is the z component of the post-rotation translation

This transform decomposition consists of three elements. The first is a matrix S, consisting of a scale, shear, and translation, usually used to define the pivot point of the following rotation. This matrix is constructed from the parameters above by:

S=
​sx 0 0​a sy 0​b c sz​pvx p v y p v z​
​

The rotation quaternion is defined as:

  `R` = [ `qx`, `qy`, `qz`, `qw` ]

This is a rotation around a conceptual normalized axis [ ax, ay, az ] of amount `theta` such that:

  [ `qx`, `qy`, `qz` ] = sin(`theta`/2) × [ `ax`, `ay`, `az` ]

and

  `qw` = cos(`theta`/2)

Finally, the transform has a translation T constructed from the parameters above by:

T=
​1 0 0​0 1 0​0 0 1​tx t y t z​
​

The effective derived transform is then given by

  `T` × `R` × `S`

If a `VkAccelerationStructureDenseGeometryFormatTrianglesDataAMDX` structure is included in the `pNext` chain of a VkAccelerationStructureGeometryKHR structure whose `geometryType` member is VK_GEOMETRY_TYPE_DENSE_GEOMETRY_FORMAT_TRIANGLES_AMDX, then that structure defines triangle geometry using compressed data.

The `VkAccelerationStructureDenseGeometryFormatTrianglesDataAMDX` structure is defined as:

    // Provided by VK_AMDX_dense_geometry_format
    typedef struct VkAccelerationStructureDenseGeometryFormatTrianglesDataAMDX {
        VkStructureType                   sType;
        const void*                       pNext;
        VkDeviceOrHostAddressConstKHR     compressedData;
        VkDeviceSize                      dataSize;
        uint32_t                          numTriangles;
        uint32_t                          numVertices;
        uint32_t                          maxPrimitiveIndex;
        uint32_t                          maxGeometryIndex;
        VkCompressedTriangleFormatAMDX    format;
    } VkAccelerationStructureDenseGeometryFormatTrianglesDataAMDX;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `compressedData` specifies the base address of the compressed data.

- `dataSize` specifies the size of the compressed data.

- `numTriangles` specifies the total number of triangles encoded in the compressed data.

- `numVertices` specifies the number of vertices in the compressed data.

- `maxPrimitiveIndex` specifies the maximum primitive index encoded in the compressed data.

- `maxGeometryIndex` specifies the maximum geometry index encoded in the compressed data.

- `format` specifies the VkCompressedTriangleFormatAMDX format of the compressed data.

If `format` is VK_COMPRESSED_TRIANGLE_FORMAT_DGF1_AMDX, `numVertices` specifies the sum of vertex counts across all blocks.

Valid Usage

- VUID-VkAccelerationStructureDenseGeometryFormatTrianglesDataAMDX-compressedData-10885
  The buffer from which `compressedData.deviceAddress` is queried must have been created with the VK_BUFFER_USAGE_2_COMPRESSED_DATA_DGF1_BIT_AMDX usage flag set

- VUID-VkAccelerationStructureDenseGeometryFormatTrianglesDataAMDX-denseGeometryFormat-10886
  The `VkPhysicalDeviceDenseGeometryFormatFeaturesAMDX`::`denseGeometryFormat` feature must be enabled

- VUID-VkAccelerationStructureDenseGeometryFormatTrianglesDataAMDX-format-10887
  If `format` is VK_COMPRESSED_TRIANGLE_FORMAT_DGF1_AMDX, then `compressedData` must be aligned to VK_COMPRESSED_TRIANGLE_FORMAT_DGF1_BYTE_ALIGNMENT_AMDX (128) bytes

- VUID-VkAccelerationStructureDenseGeometryFormatTrianglesDataAMDX-format-10888
  If `format` is VK_COMPRESSED_TRIANGLE_FORMAT_DGF1_AMDX, then `dataSize` must be a multiple of VK_COMPRESSED_TRIANGLE_FORMAT_DGF1_BYTE_STRIDE_AMDX (128) bytes

Valid Usage (Implicit)

- VUID-VkAccelerationStructureDenseGeometryFormatTrianglesDataAMDX-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_DENSE_GEOMETRY_FORMAT_TRIANGLES_DATA_AMDX

- VUID-VkAccelerationStructureDenseGeometryFormatTrianglesDataAMDX-compressedData-parameter
  `compressedData` must be a valid VkDeviceOrHostAddressConstKHR union

- VUID-VkAccelerationStructureDenseGeometryFormatTrianglesDataAMDX-format-parameter
  `format` must be a valid VkCompressedTriangleFormatAMDX value

Structure Chaining

Extends the structure

  - VkAccelerationStructureGeometryKHR

VK_COMPRESSED_TRIANGLE_FORMAT_DGF1_BYTE_ALIGNMENT_AMDX is the alignment requirement in bytes for compressed triangle data as specified in VkAccelerationStructureDenseGeometryFormatTrianglesDataAMDX::`compressedData`.

    #define VK_COMPRESSED_TRIANGLE_FORMAT_DGF1_BYTE_ALIGNMENT_AMDX 128U

VK_COMPRESSED_TRIANGLE_FORMAT_DGF1_BYTE_STRIDE_AMDX is the stride requirement in bytes for compressed triangle data as specified in VkAccelerationStructureDenseGeometryFormatTrianglesDataAMDX::`dataSize`.

    #define VK_COMPRESSED_TRIANGLE_FORMAT_DGF1_BYTE_STRIDE_AMDX 128U

The VkCompressedTriangleFormatAMDX enumeration is defined as:

    // Provided by VK_AMDX_dense_geometry_format
    typedef enum VkCompressedTriangleFormatAMDX {
        VK_COMPRESSED_TRIANGLE_FORMAT_DGF1_AMDX = 0,
    } VkCompressedTriangleFormatAMDX;

- VK_COMPRESSED_TRIANGLE_FORMAT_DGF1_AMDX specifies that the compressed triangle data is in Dense Geometry Format, version 1, consisting of an array of 128B DGF blocks.

`VkAccelerationStructureBuildRangeInfoKHR` is defined as:

    // Provided by VK_KHR_acceleration_structure
    typedef struct VkAccelerationStructureBuildRangeInfoKHR {
        uint32_t    primitiveCount;
        uint32_t    primitiveOffset;
        uint32_t    firstVertex;
        uint32_t    transformOffset;
    } VkAccelerationStructureBuildRangeInfoKHR;

- `primitiveCount` defines the number of primitives for a corresponding acceleration structure geometry.

- `primitiveOffset` defines an offset in bytes into the memory where primitive data is defined.

- `firstVertex` is the index of the first vertex to build from for triangle geometry.

- `transformOffset` defines an offset in bytes into the memory where a transform matrix is defined.

The primitive count and primitive offset are interpreted differently depending on the VkGeometryTypeKHR used:

- For geometries of type VK_GEOMETRY_TYPE_TRIANGLES_KHR, `primitiveCount` is the number of triangles to be built, where each triangle is treated as 3 vertices.

  - If the geometry uses indices, `primitiveCount` × 3 indices are consumed from VkAccelerationStructureGeometryTrianglesDataKHR::`indexData`, starting at an offset of `primitiveOffset`. The value of `firstVertex` is added to the index values before fetching vertices.

  - If the geometry does not use indices, `primitiveCount` × 3 vertices are consumed from VkAccelerationStructureGeometryTrianglesDataKHR::`vertexData`, starting at an offset of `primitiveOffset` + VkAccelerationStructureGeometryTrianglesDataKHR::`vertexStride` × `firstVertex`.

  - If VkAccelerationStructureGeometryTrianglesDataKHR::`transformData` is not `NULL`, a single VkTransformMatrixKHR structure is consumed from VkAccelerationStructureGeometryTrianglesDataKHR::`transformData`, at an offset of `transformOffset`. This matrix describes a transformation from the space in which the vertices for all triangles in this geometry are described to the space in which the acceleration structure is defined.

- For geometries of type VK_GEOMETRY_TYPE_AABBS_KHR, `primitiveCount` is the number of axis-aligned bounding boxes. `primitiveCount` VkAabbPositionsKHR structures are consumed from VkAccelerationStructureGeometryAabbsDataKHR::`data`, starting at an offset of `primitiveOffset`.

- For geometries of type VK_GEOMETRY_TYPE_SPHERES_NV, `primitiveCount` is the number of spheres to be built, where each sphere is treated as 1 vertex.

  - If the geometry uses indices, `primitiveCount` indices are consumed from VkAccelerationStructureGeometrySpheresDataNV::`indexData`, starting at an offset of `primitiveOffset`. The value of `firstVertex` is added to the index values before fetching vertices and radii.

  - If the geometry does not use indices, `primitiveCount` vertices and radii are consumed from VkAccelerationStructureGeometrySpheresDataNV::`vertexData`, starting at an offset of `primitiveOffset` + VkAccelerationStructureGeometrySpheresDataNV::`vertexStride` × `firstVertex` and VkAccelerationStructureGeometrySpheresDataNV::`radiusData`, starting at an offset of `primitiveOffset` + VkAccelerationStructureGeometrySpheresDataNV::`radiusStride` × `firstVertex` respectively.

- For geometries of type VK_GEOMETRY_TYPE_LINEAR_SWEPT_SPHERES_NV, `primitiveCount` is the number of LSS primitives to be built, where each LSS primitive is treated as 2 vertices.

  - If the geometry uses indices, `primitiveCount` × 2 indices are consumed from VkAccelerationStructureGeometryLinearSweptSpheresDataNV::`indexData`, starting at an offset of `primitiveOffset`. The value of `firstVertex` is added to the index values before fetching vertices and radii.

  - If the geometry does not use indices, `primitiveCount` × 2 vertices and radii are consumed from VkAccelerationStructureGeometryLinearSweptSpheresDataNV::`vertexData`, starting at an offset of `primitiveOffset` + VkAccelerationStructureGeometryLinearSweptSpheresDataNV::`vertexStride` × `firstVertex` and VkAccelerationStructureGeometryLinearSweptSpheresDataNV::`radiusData`, starting at an offset of `primitiveOffset` + VkAccelerationStructureGeometryLinearSweptSpheresDataNV::`radiusStride` × `firstVertex` respectively.

- For geometries of type VK_GEOMETRY_TYPE_INSTANCES_KHR, `primitiveCount` is the number of acceleration structures. `primitiveCount` VkAccelerationStructureInstanceKHR or VkAccelerationStructureMotionInstanceNV structures are consumed from VkAccelerationStructureGeometryInstancesDataKHR::`data`, starting at an offset of `primitiveOffset`.

Valid Usage

- VUID-VkAccelerationStructureBuildRangeInfoKHR-vertexData-10418
  The number of vertices consumed from VkAccelerationStructureGeometryTrianglesDataKHR::`vertexData` must be less than or equal to VkAccelerationStructureGeometryTrianglesDataKHR::`maxVertex` + 1

- VUID-VkAccelerationStructureBuildRangeInfoKHR-primitiveOffset-03656
  For geometries of type VK_GEOMETRY_TYPE_TRIANGLES_KHR, if the geometry uses indices, the offset `primitiveOffset` from VkAccelerationStructureGeometryTrianglesDataKHR::`indexData` must be a multiple of the element size of VkAccelerationStructureGeometryTrianglesDataKHR::`indexType`

- VUID-VkAccelerationStructureBuildRangeInfoKHR-primitiveOffset-03657
  For geometries of type VK_GEOMETRY_TYPE_TRIANGLES_KHR, if the geometry does not use indices, the offset `primitiveOffset` from VkAccelerationStructureGeometryTrianglesDataKHR::`vertexData` must be a multiple of:

  - the size of the format specified in VkAccelerationStructureGeometryTrianglesDataKHR::`vertexFormat`, if that format is a packed format

  - the component size of the VkAccelerationStructureGeometryTrianglesDataKHR::`vertexFormat`, if that format is not a packed format

- VUID-VkAccelerationStructureBuildRangeInfoKHR-maxVertex-10774
  For geometries of type VK_GEOMETRY_TYPE_TRIANGLES_KHR, if the geometry uses indices, then VkAccelerationStructureGeometryTrianglesDataKHR::`maxVertex` must be greater than or equal to `firstVertex` plus the maximum index value found in the VkAccelerationStructureGeometryTrianglesDataKHR::`indexData` in the range [`primitiveOffset`, `primitiveOffset`
  `primitiveCount` x 3]

- VUID-VkAccelerationStructureBuildRangeInfoKHR-None-10775
  For geometries of type VK_GEOMETRY_TYPE_TRIANGLES_KHR, if the geometry does not use indices, then VkAccelerationStructureGeometryTrianglesDataKHR::`maxVertex` must be greater than or equal to firstVertex + primitiveCount x 3 - 1

- VUID-VkAccelerationStructureBuildRangeInfoKHR-transformOffset-03658
  For geometries of type VK_GEOMETRY_TYPE_TRIANGLES_KHR, the offset `transformOffset` from VkAccelerationStructureGeometryTrianglesDataKHR::`transformData` must be a multiple of 16

- VUID-VkAccelerationStructureBuildRangeInfoKHR-primitiveOffset-03659
  For geometries of type VK_GEOMETRY_TYPE_AABBS_KHR, the offset `primitiveOffset` from VkAccelerationStructureGeometryAabbsDataKHR::`data` must be a multiple of 8

- VUID-VkAccelerationStructureBuildRangeInfoKHR-primitiveOffset-03660
  For geometries of type VK_GEOMETRY_TYPE_INSTANCES_KHR, the offset `primitiveOffset` from VkAccelerationStructureGeometryInstancesDataKHR::`data` must be a multiple of 16

If `VkAccelerationStructureGeometryLinearSweptSpheresDataNV` is included in the `pNext` chain of a VkAccelerationStructureGeometryKHR structure, then that structures defines the linear swept sphere’s (LSS) geometry data.

The `VkAccelerationStructureGeometryLinearSweptSpheresDataNV` structure is defined as:

    // Provided by VK_NV_ray_tracing_linear_swept_spheres
    typedef struct VkAccelerationStructureGeometryLinearSweptSpheresDataNV {
        VkStructureType                          sType;
        const void*                              pNext;
        VkFormat                                 vertexFormat;
        VkDeviceOrHostAddressConstKHR            vertexData;
        VkDeviceSize                             vertexStride;
        VkFormat                                 radiusFormat;
        VkDeviceOrHostAddressConstKHR            radiusData;
        VkDeviceSize                             radiusStride;
        VkIndexType                              indexType;
        VkDeviceOrHostAddressConstKHR            indexData;
        VkDeviceSize                             indexStride;
        VkRayTracingLssIndexingModeNV            indexingMode;
        VkRayTracingLssPrimitiveEndCapsModeNV    endCapsMode;
    } VkAccelerationStructureGeometryLinearSweptSpheresDataNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `vertexFormat` is the VkFormat of each LSS vertex element.

- `vertexData` is a device or host address of memory containing vertex data for this geometry.

- `vertexStride` is the stride in bytes between each vertex element.

- `radiusFormat` is the VkFormat of each LSS radius.

- `radiusData` is a device or host address of memory containing LSS radius data value.

- `radiusStride` is the stride in bytes between each radius value.

- `indexType` is the VkIndexType of each index element.

- `indexData` is a device or host address of memory containing index data for vertex and radius buffers for this geometry. When `indexType` is VK_INDEX_TYPE_NONE_KHR it must be `NULL`.

- `indexStride` is the stride in bytes between each index element.

- `indexingMode` is a VkRayTracingLssIndexingModeNV value specifying the mode of indexing.

- `endCapsMode` is a VkRayTracingLssPrimitiveEndCapsModeNV value specifying the endcaps mode for LSS primitives.

If an index buffer is not specified in `indexData`, LSS primitives are rendered individually using subsequent pairs of vertices similar to VK_PRIMITIVE_TOPOLOGY_LINE_LIST.

Valid Usage

- VUID-VkAccelerationStructureGeometryLinearSweptSpheresDataNV-None-10419
  The linearSweptSpheres feature must be enabled

- VUID-VkAccelerationStructureGeometryLinearSweptSpheresDataNV-vertexStride-10421
  `vertexStride` must be a multiple of:

  - the size of the format specified in `vertexFormat` if that format is a packed format

  - the component size specified in `vertexFormat` if that format is not a packed format

- VUID-VkAccelerationStructureGeometryLinearSweptSpheresDataNV-vertexStride-10422
  `vertexStride` and `radiusStride` must be less than or equal to 232-1

- VUID-VkAccelerationStructureGeometryLinearSweptSpheresDataNV-vertexFormat-10423
  The format features of `vertexFormat` must contain VK_FORMAT_FEATURE_ACCELERATION_STRUCTURE_VERTEX_BUFFER_BIT_KHR

- VUID-VkAccelerationStructureGeometryLinearSweptSpheresDataNV-radiusFormat-10424
  The format features of `radiusFormat` must contain VK_FORMAT_FEATURE_2_ACCELERATION_STRUCTURE_RADIUS_BUFFER_BIT_NV

- VUID-VkAccelerationStructureGeometryLinearSweptSpheresDataNV-radiusData-10426
  All values referenced in `radiusData` must be greater than or equal to `0`

- VUID-VkAccelerationStructureGeometryLinearSweptSpheresDataNV-indexingMode-10427
  If `indexingMode` is VK_RAY_TRACING_LSS_INDEXING_MODE_SUCCESSIVE_NV, `indexData` must not be `NULL`

- VUID-VkAccelerationStructureGeometryLinearSweptSpheresDataNV-indexData-10428
  `indexType` must be VK_INDEX_TYPE_UINT16, VK_INDEX_TYPE_UINT32, or VK_INDEX_TYPE_NONE_KHR

Valid Usage (Implicit)

- VUID-VkAccelerationStructureGeometryLinearSweptSpheresDataNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_LINEAR_SWEPT_SPHERES_DATA_NV

- VUID-VkAccelerationStructureGeometryLinearSweptSpheresDataNV-vertexFormat-parameter
  `vertexFormat` must be a valid VkFormat value

- VUID-VkAccelerationStructureGeometryLinearSweptSpheresDataNV-vertexData-parameter
  `vertexData` must be a valid VkDeviceOrHostAddressConstKHR union

- VUID-VkAccelerationStructureGeometryLinearSweptSpheresDataNV-radiusFormat-parameter
  `radiusFormat` must be a valid VkFormat value

- VUID-VkAccelerationStructureGeometryLinearSweptSpheresDataNV-radiusData-parameter
  `radiusData` must be a valid VkDeviceOrHostAddressConstKHR union

- VUID-VkAccelerationStructureGeometryLinearSweptSpheresDataNV-indexType-parameter
  `indexType` must be a valid VkIndexType value

- VUID-VkAccelerationStructureGeometryLinearSweptSpheresDataNV-indexData-parameter
  `indexData` must be a valid VkDeviceOrHostAddressConstKHR union

- VUID-VkAccelerationStructureGeometryLinearSweptSpheresDataNV-indexingMode-parameter
  `indexingMode` must be a valid VkRayTracingLssIndexingModeNV value

- VUID-VkAccelerationStructureGeometryLinearSweptSpheresDataNV-endCapsMode-parameter
  `endCapsMode` must be a valid VkRayTracingLssPrimitiveEndCapsModeNV value

Structure Chaining

Extends the structure

  - VkAccelerationStructureGeometryKHR

Chaining LSS primitives can be achieved by specifying an index buffer in VkAccelerationStructureGeometryLinearSweptSpheresDataNV::`indexData` and setting VkAccelerationStructureGeometryLinearSweptSpheresDataNV::`indexingMode` to one of VkRayTracingLssIndexingModeNV values:

    // Provided by VK_NV_ray_tracing_linear_swept_spheres
    typedef enum VkRayTracingLssIndexingModeNV {
        VK_RAY_TRACING_LSS_INDEXING_MODE_LIST_NV = 0,
        VK_RAY_TRACING_LSS_INDEXING_MODE_SUCCESSIVE_NV = 1,
    } VkRayTracingLssIndexingModeNV;

- VK_RAY_TRACING_LSS_INDEXING_MODE_LIST_NV specifies that a list of indices is provided where each consecutive pair of indices define a LSS primitive.

- VK_RAY_TRACING_LSS_INDEXING_MODE_SUCCESSIVE_NV specifies a successive implicit indexing format, in which each LSS primitive is defined by two successive positions and radii, (k, k + 1), where k is a single index provided in the index buffer. In this indexing scheme, there is a 1:1 mapping between the index buffer and primitive index within the geometry.

The default behavior with endcaps in a LSS chain is that both endcaps will be enabled for all beginning and end points. To change the LSS chain’s endcaps mode use VkAccelerationStructureGeometryLinearSweptSpheresDataNV::`endCapsMode`. The possible values for `endCapsMode` are:

    // Provided by VK_NV_ray_tracing_linear_swept_spheres
    typedef enum VkRayTracingLssPrimitiveEndCapsModeNV {
        VK_RAY_TRACING_LSS_PRIMITIVE_END_CAPS_MODE_NONE_NV = 0,
        VK_RAY_TRACING_LSS_PRIMITIVE_END_CAPS_MODE_CHAINED_NV = 1,
    } VkRayTracingLssPrimitiveEndCapsModeNV;

- VK_RAY_TRACING_LSS_PRIMITIVE_END_CAPS_MODE_NONE_NV disables all endcaps and the chain boundaries have no influence.

- VK_RAY_TRACING_LSS_PRIMITIVE_END_CAPS_MODE_CHAINED_NV specifies that when VK_RAY_TRACING_LSS_INDEXING_MODE_SUCCESSIVE_NV is used as indexing mode for the LSS primitive, the first primitive in each chain will have both endcaps enabled, and every following primitive in the chain only has endcaps at the trailing position enabled.

In addition to LSS primitives, simple sphere geometry is also supported. Spheres do not have an endcap mode. If an index buffer is present, each entry represents a single position and radius describing one sphere primitive. If no index buffer is provided, the vertex position and radius values are sequentially read from the corresponding buffers.

If `VkAccelerationStructureGeometrySpheresDataNV` is included in the `pNext` chain of a VkAccelerationStructureGeometryKHR structure, then that structures defines the sphere’s geometry data.

The `VkAccelerationStructureGeometrySpheresDataNV` structure is defined as:

    // Provided by VK_NV_ray_tracing_linear_swept_spheres
    typedef struct VkAccelerationStructureGeometrySpheresDataNV {
        VkStructureType                  sType;
        const void*                      pNext;
        VkFormat                         vertexFormat;
        VkDeviceOrHostAddressConstKHR    vertexData;
        VkDeviceSize                     vertexStride;
        VkFormat                         radiusFormat;
        VkDeviceOrHostAddressConstKHR    radiusData;
        VkDeviceSize                     radiusStride;
        VkIndexType                      indexType;
        VkDeviceOrHostAddressConstKHR    indexData;
        VkDeviceSize                     indexStride;
    } VkAccelerationStructureGeometrySpheresDataNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `vertexFormat` is the VkFormat of each sphere’s vertex element.

- `vertexData` is a device or host address of memory containing vertex data in form of pairs of centers of spheres that define all sphere geometry.

- `vertexStride` is the stride in bytes between each vertex element.

- `radiusFormat` is the VkFormat of each sphere’s radius.

- `radiusData` is a device or host address of memory containing sphere’s radius data value.

- `radiusStride` is the stride in bytes between each radius value.

- `indexType` is the VkIndexType of each index element.

- `indexData` is a device or host address of memory containing index data for vertex and radius buffers for this geometry. When `indexType` is VK_INDEX_TYPE_NONE_KHR it must be `NULL`.

- `indexStride` is the stride in bytes between each index element.

Valid Usage

- VUID-VkAccelerationStructureGeometrySpheresDataNV-None-10429
  The spheres feature must be enabled

- VUID-VkAccelerationStructureGeometrySpheresDataNV-vertexStride-10431
  `vertexStride` must be a multiple of:

  - the size of the format specified in `vertexFormat` if that format is a packed format

  - the smallest component size specified in `vertexFormat` if that format is not a packed format

- VUID-VkAccelerationStructureGeometrySpheresDataNV-vertexStride-10432
  `vertexStride` and `radiusStride` must be less than or equal to 232-1

- VUID-VkAccelerationStructureGeometrySpheresDataNV-vertexFormat-10434
  The format features of `vertexFormat` must contain VK_FORMAT_FEATURE_ACCELERATION_STRUCTURE_VERTEX_BUFFER_BIT_KHR

- VUID-VkAccelerationStructureGeometrySpheresDataNV-radiusFormat-10435
  The format features of `radiusFormat` must contain VK_FORMAT_FEATURE_2_ACCELERATION_STRUCTURE_RADIUS_BUFFER_BIT_NV

- VUID-VkAccelerationStructureGeometrySpheresDataNV-radiusData-10436
  All values referenced in `radiusData` must be greater than or equal to `0`

- VUID-VkAccelerationStructureGeometrySpheresDataNV-indexData-10437
  `indexType` must be VK_INDEX_TYPE_UINT16, VK_INDEX_TYPE_UINT32, VK_INDEX_TYPE_NONE_KHR

Valid Usage (Implicit)

- VUID-VkAccelerationStructureGeometrySpheresDataNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_SPHERES_DATA_NV

- VUID-VkAccelerationStructureGeometrySpheresDataNV-vertexFormat-parameter
  `vertexFormat` must be a valid VkFormat value

- VUID-VkAccelerationStructureGeometrySpheresDataNV-vertexData-parameter
  `vertexData` must be a valid VkDeviceOrHostAddressConstKHR union

- VUID-VkAccelerationStructureGeometrySpheresDataNV-radiusFormat-parameter
  `radiusFormat` must be a valid VkFormat value

- VUID-VkAccelerationStructureGeometrySpheresDataNV-radiusData-parameter
  `radiusData` must be a valid VkDeviceOrHostAddressConstKHR union

- VUID-VkAccelerationStructureGeometrySpheresDataNV-indexType-parameter
  `indexType` must be a valid VkIndexType value

- VUID-VkAccelerationStructureGeometrySpheresDataNV-indexData-parameter
  `indexData` must be a valid VkDeviceOrHostAddressConstKHR union

Structure Chaining

Extends the structure

  - VkAccelerationStructureGeometryKHR

#### 43.1.8. Copying Acceleration Structures

An additional command exists for copying acceleration structures without updating their contents. The acceleration structure object can be compacted in order to improve performance. Before copying, an application must query the size of the resulting acceleration structure.

To query acceleration structure size parameters call:

    // Provided by VK_KHR_acceleration_structure
    void vkCmdWriteAccelerationStructuresPropertiesKHR(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    accelerationStructureCount,
        const VkAccelerationStructureKHR*           pAccelerationStructures,
        VkQueryType                                 queryType,
        VkQueryPool                                 queryPool,
        uint32_t                                    firstQuery);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `accelerationStructureCount` is the count of acceleration structures for which to query the property.

- `pAccelerationStructures` is a pointer to an array of existing previously built acceleration structures.

- `queryType` is a VkQueryType value specifying the type of queries managed by the pool.

- `queryPool` is the query pool that will manage the results of the query.

- `firstQuery` is the first query index within the query pool that will contain the `accelerationStructureCount` number of results.

Accesses to any of the acceleration structures listed in `pAccelerationStructures` must be synchronized with the VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR pipeline stage or the VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR pipeline stage, and an access type of VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR.

- If `queryType` is VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_KHR, then the value written out is the number of bytes required by a compacted acceleration structure.

- If `queryType` is VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_SIZE_KHR, then the value written out is the number of bytes required by a serialized acceleration structure.

- If `queryType` is VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SIZE_KHR, then the value written out is the number of bytes required by the acceleration structure.

- VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_BOTTOM_LEVEL_POINTERS_KHR specifies a serialization acceleration structure pointer count query.

Valid Usage

- VUID-vkCmdWriteAccelerationStructuresPropertiesKHR-accelerationStructure-08924
  The `VkPhysicalDeviceAccelerationStructureFeaturesKHR`::`accelerationStructure` feature must be enabled

- VUID-vkCmdWriteAccelerationStructuresPropertiesKHR-queryPool-02493
  `queryPool` must have been created with a `queryType` matching `queryType`

- VUID-vkCmdWriteAccelerationStructuresPropertiesKHR-queryPool-02494
  The queries identified by `queryPool` and `firstQuery` must be unavailable

- VUID-vkCmdWriteAccelerationStructuresPropertiesKHR-query-04880
  The sum of `firstQuery` plus `accelerationStructureCount` must be less than or equal to the number of queries in `queryPool`

- VUID-vkCmdWriteAccelerationStructuresPropertiesKHR-pAccelerationStructures-11684
  All acceleration structures in `pAccelerationStructures` must have been constructed prior to the execution of this command on the device

- VUID-vkCmdWriteAccelerationStructuresPropertiesKHR-accelerationStructures-03431
  All acceleration structures in `pAccelerationStructures` must have been built with VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR if `queryType` is VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_KHR

- VUID-vkCmdWriteAccelerationStructuresPropertiesKHR-queryType-06742
  `queryType` must be VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SIZE_KHR, VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_BOTTOM_LEVEL_POINTERS_KHR, VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_KHR, or VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_SIZE_KHR

- VUID-vkCmdWriteAccelerationStructuresPropertiesKHR-pAccelerationStructures-12425
  All acceleration structures in `pAccelerationStructures` must have been built with VK_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR if `queryType` is VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_BOTTOM_LEVEL_POINTERS_KHR

- VUID-vkCmdWriteAccelerationStructuresPropertiesKHR-buffer-03736
  Each element of `pAccelerationStructures` must be fully backed by physical memory

Valid Usage (Implicit)

- VUID-vkCmdWriteAccelerationStructuresPropertiesKHR-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdWriteAccelerationStructuresPropertiesKHR-pAccelerationStructures-parameter
  `pAccelerationStructures` must be a valid pointer to an array of `accelerationStructureCount` valid VkAccelerationStructureKHR handles

- VUID-vkCmdWriteAccelerationStructuresPropertiesKHR-queryType-parameter
  `queryType` must be a valid VkQueryType value

- VUID-vkCmdWriteAccelerationStructuresPropertiesKHR-queryPool-parameter
  `queryPool` must be a valid VkQueryPool handle

- VUID-vkCmdWriteAccelerationStructuresPropertiesKHR-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdWriteAccelerationStructuresPropertiesKHR-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT operations

- VUID-vkCmdWriteAccelerationStructuresPropertiesKHR-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdWriteAccelerationStructuresPropertiesKHR-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdWriteAccelerationStructuresPropertiesKHR-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdWriteAccelerationStructuresPropertiesKHR-accelerationStructureCount-arraylength
  `accelerationStructureCount` must be greater than `0`

- VUID-vkCmdWriteAccelerationStructuresPropertiesKHR-commonparent
  Each of `commandBuffer`, `queryPool`, and the elements of `pAccelerationStructures` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Outside | VK_QUEUE_COMPUTE_BIT | Action

Conditional Rendering

vkCmdWriteAccelerationStructuresPropertiesKHR is not affected by conditional rendering

To query acceleration structure size parameters for the `VK_NV_ray_tracing` extension call:

    // Provided by VK_NV_ray_tracing
    void vkCmdWriteAccelerationStructuresPropertiesNV(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    accelerationStructureCount,
        const VkAccelerationStructureNV*            pAccelerationStructures,
        VkQueryType                                 queryType,
        VkQueryPool                                 queryPool,
        uint32_t                                    firstQuery);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `accelerationStructureCount` is the count of acceleration structures for which to query the property.

- `pAccelerationStructures` is a pointer to an array of existing previously built acceleration structures.

- `queryType` is a VkQueryType value specifying the type of queries managed by the pool.

- `queryPool` is the query pool that will manage the results of the query.

- `firstQuery` is the first query index within the query pool that will contain the `accelerationStructureCount` number of results.

Accesses to any of the acceleration structures listed in `pAccelerationStructures` must be synchronized with the VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR pipeline stage and an access type of VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR.

Valid Usage

- VUID-vkCmdWriteAccelerationStructuresPropertiesNV-queryPool-03755
  `queryPool` must have been created with a `queryType` matching `queryType`

- VUID-vkCmdWriteAccelerationStructuresPropertiesNV-queryPool-03756
  The queries identified by `queryPool` and `firstQuery` must be unavailable

- VUID-vkCmdWriteAccelerationStructuresPropertiesNV-accelerationStructure-03757
  `accelerationStructure` must be bound completely and contiguously to a single `VkDeviceMemory` object via vkBindAccelerationStructureMemoryNV

- VUID-vkCmdWriteAccelerationStructuresPropertiesNV-pAccelerationStructures-04958
  All acceleration structures in `pAccelerationStructures` must have been built prior to the execution of this command

- VUID-vkCmdWriteAccelerationStructuresPropertiesNV-pAccelerationStructures-06215
  All acceleration structures in `pAccelerationStructures` must have been built with VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR if `queryType` is VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_NV

- VUID-vkCmdWriteAccelerationStructuresPropertiesNV-queryType-06216
  `queryType` must be VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_NV

- VUID-vkCmdWriteAccelerationStructuresPropertiesNV-pAccelerationStructures-11685
  All acceleration structures in `pAccelerationStructures` must have been constructed prior to the execution of this command on the device

Valid Usage (Implicit)

- VUID-vkCmdWriteAccelerationStructuresPropertiesNV-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdWriteAccelerationStructuresPropertiesNV-pAccelerationStructures-parameter
  `pAccelerationStructures` must be a valid pointer to an array of `accelerationStructureCount` valid VkAccelerationStructureNV handles

- VUID-vkCmdWriteAccelerationStructuresPropertiesNV-queryType-parameter
  `queryType` must be a valid VkQueryType value

- VUID-vkCmdWriteAccelerationStructuresPropertiesNV-queryPool-parameter
  `queryPool` must be a valid VkQueryPool handle

- VUID-vkCmdWriteAccelerationStructuresPropertiesNV-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdWriteAccelerationStructuresPropertiesNV-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT operations

- VUID-vkCmdWriteAccelerationStructuresPropertiesNV-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdWriteAccelerationStructuresPropertiesNV-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdWriteAccelerationStructuresPropertiesNV-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdWriteAccelerationStructuresPropertiesNV-accelerationStructureCount-arraylength
  `accelerationStructureCount` must be greater than `0`

- VUID-vkCmdWriteAccelerationStructuresPropertiesNV-commonparent
  Each of `commandBuffer`, `queryPool`, and the elements of `pAccelerationStructures` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Outside | VK_QUEUE_COMPUTE_BIT | Action

Conditional Rendering

vkCmdWriteAccelerationStructuresPropertiesNV is not affected by conditional rendering

To copy an acceleration structure call:

    // Provided by VK_KHR_acceleration_structure
    void vkCmdCopyAccelerationStructureKHR(
        VkCommandBuffer                             commandBuffer,
        const VkCopyAccelerationStructureInfoKHR*   pInfo);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `pInfo` is a pointer to a VkCopyAccelerationStructureInfoKHR structure defining the copy operation.

This command copies the `pInfo->src` acceleration structure to the `pInfo->dst` acceleration structure in the manner specified by `pInfo->mode`.

Accesses to `pInfo->src` and `pInfo->dst` must be synchronized with the VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR pipeline stage or the VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR pipeline stage, and an access type of VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR or VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_KHR as appropriate.

Valid Usage

- VUID-vkCmdCopyAccelerationStructureKHR-accelerationStructure-08925
  The `VkPhysicalDeviceAccelerationStructureFeaturesKHR`::`accelerationStructure` feature must be enabled

- VUID-vkCmdCopyAccelerationStructureKHR-src-11633
  The source acceleration structure `pInfo->src` must have been constructed prior to the execution of this command on the device

- VUID-vkCmdCopyAccelerationStructureKHR-src-11634
  If the source acceleration structure `pInfo->src` was constructed through deserialization, all micromap arrays the acceleration structure references that were not replaced by an acceleration structure update command must have been deserialized using the serialized data of the corresponding micromaps used to originally build the acceleration structure prior to the execution of this command on the device

Valid Usage (Implicit)

- VUID-vkCmdCopyAccelerationStructureKHR-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdCopyAccelerationStructureKHR-pInfo-parameter
  `pInfo` must be a valid pointer to a valid VkCopyAccelerationStructureInfoKHR structure

- VUID-vkCmdCopyAccelerationStructureKHR-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdCopyAccelerationStructureKHR-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT operations

- VUID-vkCmdCopyAccelerationStructureKHR-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdCopyAccelerationStructureKHR-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdCopyAccelerationStructureKHR-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Outside | VK_QUEUE_COMPUTE_BIT | Action

Conditional Rendering

vkCmdCopyAccelerationStructureKHR is not affected by conditional rendering

The `VkCopyAccelerationStructureInfoKHR` structure is defined as:

    // Provided by VK_KHR_acceleration_structure
    typedef struct VkCopyAccelerationStructureInfoKHR {
        VkStructureType                       sType;
        const void*                           pNext;
        VkAccelerationStructureKHR            src;
        VkAccelerationStructureKHR            dst;
        VkCopyAccelerationStructureModeKHR    mode;
    } VkCopyAccelerationStructureInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `src` is the source acceleration structure for the copy.

- `dst` is the target acceleration structure for the copy.

- `mode` is a VkCopyAccelerationStructureModeKHR value specifying additional operations to perform during the copy.

Valid Usage

- VUID-VkCopyAccelerationStructureInfoKHR-mode-03410
  `mode` must be VK_COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_KHR or VK_COPY_ACCELERATION_STRUCTURE_MODE_CLONE_KHR

- VUID-VkCopyAccelerationStructureInfoKHR-src-03411
  If `mode` is VK_COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_KHR, `src` must have been constructed with VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR in the build

- VUID-VkCopyAccelerationStructureInfoKHR-buffer-03718
  The range of `src` accessed by this command must be fully backed by physical memory

- VUID-VkCopyAccelerationStructureInfoKHR-buffer-03719
  The range of `dst` accessed by this command must be fully backed by physical memory

- VUID-VkCopyAccelerationStructureInfoKHR-dst-07791
  The range of memory backing `dst` that is accessed by this command must not overlap the memory backing `src` that is accessed by this command

- VUID-VkCopyAccelerationStructureInfoKHR-mode-12418
  If `mode` is VK_COPY_ACCELERATION_STRUCTURE_MODE_CLONE_KHR, the memory pointed to by `dst` must be at least as large as the size of `src`, as reported by vkWriteAccelerationStructuresPropertiesKHR or vkCmdWriteAccelerationStructuresPropertiesKHR with a query type of VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SIZE_KHR

- VUID-VkCopyAccelerationStructureInfoKHR-mode-12419
  If `mode` is VK_COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_KHR, the memory pointed to by `dst` must be at least as large as the compacted size of `src`, as reported by vkWriteAccelerationStructuresPropertiesKHR or vkCmdWriteAccelerationStructuresPropertiesKHR with a query type of VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_KHR

Valid Usage (Implicit)

- VUID-VkCopyAccelerationStructureInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_COPY_ACCELERATION_STRUCTURE_INFO_KHR

- VUID-VkCopyAccelerationStructureInfoKHR-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkCopyAccelerationStructureInfoKHR-src-parameter
  `src` must be a valid VkAccelerationStructureKHR handle

- VUID-VkCopyAccelerationStructureInfoKHR-dst-parameter
  `dst` must be a valid VkAccelerationStructureKHR handle

- VUID-VkCopyAccelerationStructureInfoKHR-mode-parameter
  `mode` must be a valid VkCopyAccelerationStructureModeKHR value

- VUID-VkCopyAccelerationStructureInfoKHR-commonparent
  Both of `dst`, and `src` must have been created, allocated, or retrieved from the same VkDevice

To copy an acceleration structure for the `VK_NV_ray_tracing` extension call:

    // Provided by VK_NV_ray_tracing
    void vkCmdCopyAccelerationStructureNV(
        VkCommandBuffer                             commandBuffer,
        VkAccelerationStructureNV                   dst,
        VkAccelerationStructureNV                   src,
        VkCopyAccelerationStructureModeKHR          mode);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `dst` is the target acceleration structure for the copy.

- `src` is the source acceleration structure for the copy.

- `mode` is a VkCopyAccelerationStructureModeKHR value specifying additional operations to perform during the copy.

Accesses to `src` and `dst` must be synchronized with the VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR pipeline stage or the VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR pipeline stage, and an access type of VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR or VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_KHR as appropriate.

Valid Usage

- VUID-vkCmdCopyAccelerationStructureNV-mode-03410
  `mode` must be VK_COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_KHR or VK_COPY_ACCELERATION_STRUCTURE_MODE_CLONE_KHR

- VUID-vkCmdCopyAccelerationStructureNV-src-03411
  If `mode` is VK_COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_KHR, `src` must have been constructed with VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR in the build

- VUID-vkCmdCopyAccelerationStructureNV-buffer-03718
  The range of `src` accessed by this command must be fully backed by physical memory

- VUID-vkCmdCopyAccelerationStructureNV-buffer-03719
  The range of `dst` accessed by this command must be fully backed by physical memory

- VUID-vkCmdCopyAccelerationStructureNV-dst-07791
  The range of memory backing `dst` that is accessed by this command must not overlap the memory backing `src` that is accessed by this command

- VUID-vkCmdCopyAccelerationStructureNV-mode-12418
  If `mode` is VK_COPY_ACCELERATION_STRUCTURE_MODE_CLONE_KHR, the memory pointed to by `dst` must be at least as large as the size of `src`, as reported by vkWriteAccelerationStructuresPropertiesKHR or vkCmdWriteAccelerationStructuresPropertiesKHR with a query type of VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SIZE_KHR

- VUID-vkCmdCopyAccelerationStructureNV-mode-12419
  If `mode` is VK_COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_KHR, the memory pointed to by `dst` must be at least as large as the compacted size of `src`, as reported by vkWriteAccelerationStructuresPropertiesKHR or vkCmdWriteAccelerationStructuresPropertiesKHR with a query type of VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_KHR

Valid Usage (Implicit)

- VUID-vkCmdCopyAccelerationStructureNV-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdCopyAccelerationStructureNV-dst-parameter
  `dst` must be a valid VkAccelerationStructureNV handle

- VUID-vkCmdCopyAccelerationStructureNV-src-parameter
  `src` must be a valid VkAccelerationStructureNV handle

- VUID-vkCmdCopyAccelerationStructureNV-mode-parameter
  `mode` must be a valid VkCopyAccelerationStructureModeKHR value

- VUID-vkCmdCopyAccelerationStructureNV-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdCopyAccelerationStructureNV-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT operations

- VUID-vkCmdCopyAccelerationStructureNV-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdCopyAccelerationStructureNV-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdCopyAccelerationStructureNV-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdCopyAccelerationStructureNV-commonparent
  Each of `commandBuffer`, `dst`, and `src` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Outside | VK_QUEUE_COMPUTE_BIT | Action

Conditional Rendering

vkCmdCopyAccelerationStructureNV is not affected by conditional rendering

Possible values of `mode` specifying additional operations to perform during the copy, are:

    // Provided by VK_KHR_acceleration_structure
    typedef enum VkCopyAccelerationStructureModeKHR {
        VK_COPY_ACCELERATION_STRUCTURE_MODE_CLONE_KHR = 0,
        VK_COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_KHR = 1,
      // Provided by VK_KHR_acceleration_structure
        VK_COPY_ACCELERATION_STRUCTURE_MODE_SERIALIZE_KHR = 2,
      // Provided by VK_KHR_acceleration_structure
        VK_COPY_ACCELERATION_STRUCTURE_MODE_DESERIALIZE_KHR = 3,
      // Provided by VK_NV_ray_tracing
        VK_COPY_ACCELERATION_STRUCTURE_MODE_CLONE_NV = VK_COPY_ACCELERATION_STRUCTURE_MODE_CLONE_KHR,
      // Provided by VK_NV_ray_tracing
        VK_COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_NV = VK_COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_KHR,
    } VkCopyAccelerationStructureModeKHR;

    // Provided by VK_NV_ray_tracing
    // Equivalent to VkCopyAccelerationStructureModeKHR
    typedef VkCopyAccelerationStructureModeKHR VkCopyAccelerationStructureModeNV;

- VK_COPY_ACCELERATION_STRUCTURE_MODE_CLONE_KHR creates a direct copy of the acceleration structure specified in `src` into the one specified by `dst`. The `dst` acceleration structure must have been created with the same parameters as `src` with the exception of `size`, which must at least as large as the queried VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SIZE_KHR size . If `src` contains references to other acceleration structures, `dst` will reference the same acceleration structures.

- VK_COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_KHR creates a more compact version of an acceleration structure `src` into `dst`. The acceleration structure `dst` must have been created with a size at least as large as that returned by vkCmdWriteAccelerationStructuresPropertiesNV , vkCmdWriteAccelerationStructuresPropertiesKHR, or vkWriteAccelerationStructuresPropertiesKHR after the build of the acceleration structure specified by `src`. If `src` contains references to other acceleration structures, `dst` will reference the same acceleration structures.

- VK_COPY_ACCELERATION_STRUCTURE_MODE_SERIALIZE_KHR serializes the acceleration structure to a semi-opaque format which can be reloaded on a compatible implementation.

- VK_COPY_ACCELERATION_STRUCTURE_MODE_DESERIALIZE_KHR deserializes the semi-opaque serialization format in the buffer to the acceleration structure. After deserialization, the destination acceleration structure is treated as having the same acceleration structure type as the originally serialized acceleration structure.

To copy an acceleration structure to device memory call:

    // Provided by VK_KHR_acceleration_structure
    void vkCmdCopyAccelerationStructureToMemoryKHR(
        VkCommandBuffer                             commandBuffer,
        const VkCopyAccelerationStructureToMemoryInfoKHR* pInfo);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `pInfo` is a pointer to a VkCopyAccelerationStructureToMemoryInfoKHR structure defining the copy operation.

Accesses to `pInfo->src` must be synchronized with the VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR pipeline stage or the VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR pipeline stage, and an access type of VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR. Accesses to the buffer indicated by `pInfo->dst.deviceAddress` must be synchronized with the VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR pipeline stage or the VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR pipeline stage, and an access type of VK_ACCESS_TRANSFER_WRITE_BIT.

This command produces the same results as vkCopyAccelerationStructureToMemoryKHR, but writes its result to a device address, and is executed on the device rather than the host. The output may not necessarily be bit-for-bit identical, but it can be equally used by either vkCmdCopyMemoryToAccelerationStructureKHR or vkCopyMemoryToAccelerationStructureKHR.

The defined header structure for the serialized data consists of:

- VK_UUID_SIZE bytes of data matching `VkPhysicalDeviceIDProperties`::`driverUUID`

- VK_UUID_SIZE bytes of data identifying the compatibility for comparison using vkGetDeviceAccelerationStructureCompatibilityKHR

For a top-level or bottom-level acceleration structure, this is followed by: * A 64-bit integer of the total size matching the value queried using VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_SIZE_KHR * A 64-bit integer of the deserialized size to be passed in to `VkAccelerationStructureCreateInfoKHR`::`size`

For a top-level acceleration structure, the remainder of the serialized header consists of:

- A 64-bit integer of the count of the number of acceleration structure handles following. This value matches the value queried using VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_BOTTOM_LEVEL_POINTERS_KHR. For top-level acceleration structures this number is implementation-dependent; the number of and ordering of the handles may not match the instance descriptions which were used to build the acceleration structure.

The corresponding handles matching the values returned by vkGetAccelerationStructureDeviceAddressKHR or vkGetAccelerationStructureHandleNV are tightly packed in the buffer following the count. The application is expected to store a mapping between those handles and the original application-generated bottom-level acceleration structures to provide when deserializing.

For a bottom-level acceleration structure, the remainder of the serialized header consists of:

- A 64-bit integer consisting of two packed 32 bit values. The high 32 bits are 0xFFFFFFFF to indicate a block-based format, and the low 32 bits contain the number of serialized blocks that follow

- For each block:

  - A 32-bit unsigned integer indicating the block type corresponding to values in the VkAccelerationStructureSerializedBlockTypeKHR enumeration

  - A 32-bit reserved value for alignment

  - A 64-bit unsigned integer indicating the number of block buffer device addresses that follow the block header

  - An array of 64-bit buffer device addresses, with the count matching the previous value

If the block type is VK_ACCELERATION_STRUCTURE_SERIALIZED_BLOCK_TYPE_OPACITY_MICROMAP_KHR, the corresponding buffer device addresses are tightly packed in the buffer and match the values returned by vkGetBufferDeviceAddressKHR for the underlying buffer objects for the opacity micromaps. An implementation may either return `NULL` for a geometry with no opacity micromap or only return valid device address entries in the array. Similar to the above, the application must provide a mapping between the valid buffer device addresses and the original application-generated opacity micromaps when deserializing. If the implementation returned `NULL` addresses for geometry without micromaps, the application must provide `NULL` device addresses mapped to those when deserializing.

The addresses of micromaps provided to deserializing must be compatible with the micromaps that were used for building the acceleration structure that was serialized. They must be created before deserializing with identical `type` and `createFlags` except for the VK_ACCELERATION_STRUCTURE_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR flag set.

Before using the deserialized acceleration structure, the micromaps must be deserialized using the serialized output of the micromap that was originally referenced by the serialized acceleration structure, or, if the acceleration structure was originally built with the VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_UPDATE_BIT_KHR, the application may replace the micromap with a newly constructed micromap, using the normal update rules.

The serialized data is written to the buffer (or read from the buffer) according to the host endianness.

Valid Usage

- VUID-vkCmdCopyAccelerationStructureToMemoryKHR-accelerationStructure-08926
  The `VkPhysicalDeviceAccelerationStructureFeaturesKHR`::`accelerationStructure` feature must be enabled

- VUID-vkCmdCopyAccelerationStructureToMemoryKHR-pInfo-03739
  `pInfo->dst.deviceAddress` must be a valid VkDeviceAddress

- VUID-vkCmdCopyAccelerationStructureToMemoryKHR-pInfo-03740
  `pInfo->dst.deviceAddress` must be aligned to `256` bytes

- VUID-vkCmdCopyAccelerationStructureToMemoryKHR-pInfo-11699
  If `pInfo->src` was built with a `type` of VK_ACCELERATION_STRUCTURE_TYPE_OPACITY_MICROMAP_KHR, `pInfo->dst.deviceAddress` must be aligned to `128` bytes

Valid Usage (Implicit)

- VUID-vkCmdCopyAccelerationStructureToMemoryKHR-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdCopyAccelerationStructureToMemoryKHR-pInfo-parameter
  `pInfo` must be a valid pointer to a valid VkCopyAccelerationStructureToMemoryInfoKHR structure

- VUID-vkCmdCopyAccelerationStructureToMemoryKHR-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdCopyAccelerationStructureToMemoryKHR-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT operations

- VUID-vkCmdCopyAccelerationStructureToMemoryKHR-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdCopyAccelerationStructureToMemoryKHR-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdCopyAccelerationStructureToMemoryKHR-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Outside | VK_QUEUE_COMPUTE_BIT | Action

Conditional Rendering

vkCmdCopyAccelerationStructureToMemoryKHR is not affected by conditional rendering

    // Provided by VK_KHR_acceleration_structure
    typedef struct VkCopyAccelerationStructureToMemoryInfoKHR {
        VkStructureType                       sType;
        const void*                           pNext;
        VkAccelerationStructureKHR            src;
        VkDeviceOrHostAddressKHR              dst;
        VkCopyAccelerationStructureModeKHR    mode;
    } VkCopyAccelerationStructureToMemoryInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `src` is the source acceleration structure for the copy.

- `dst` is the device or host address of memory which is the target for the copy.

- `mode` is a VkCopyAccelerationStructureModeKHR value specifying additional operations to perform during the copy.

Valid Usage

- VUID-VkCopyAccelerationStructureToMemoryInfoKHR-src-04959
  The source acceleration structure `src` must have been constructed prior to the execution of this command

- VUID-VkCopyAccelerationStructureToMemoryInfoKHR-src-11582
  If the source acceleration structure `src` was constructed through deserialization, all micromap arrays the acceleration structure references that were not replaced by an acceleration structure update command must have been deserialized using the serialized data of the corresponding micromaps used to originally build the acceleration structure prior to the execution of this command

- VUID-VkCopyAccelerationStructureToMemoryInfoKHR-dst-03561
  The memory pointed to by `dst` must be at least as large as the serialization size of `src`, as reported by vkWriteAccelerationStructuresPropertiesKHR or vkCmdWriteAccelerationStructuresPropertiesKHR with a query type of VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_SIZE_KHR

- VUID-VkCopyAccelerationStructureToMemoryInfoKHR-mode-03412
  `mode` must be VK_COPY_ACCELERATION_STRUCTURE_MODE_SERIALIZE_KHR

- VUID-VkCopyAccelerationStructureToMemoryInfoKHR-mode-11714
  The range of `src` accessed by this command must be fully backed by physical memory

- VUID-VkCopyAccelerationStructureToMemoryInfoKHR-mode-11715
  The range of `dst` accessed by this command must be fully backed by physical memory

Valid Usage (Implicit)

- VUID-VkCopyAccelerationStructureToMemoryInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_COPY_ACCELERATION_STRUCTURE_TO_MEMORY_INFO_KHR

- VUID-VkCopyAccelerationStructureToMemoryInfoKHR-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkCopyAccelerationStructureToMemoryInfoKHR-src-parameter
  `src` must be a valid VkAccelerationStructureKHR handle

- VUID-VkCopyAccelerationStructureToMemoryInfoKHR-mode-parameter
  `mode` must be a valid VkCopyAccelerationStructureModeKHR value

To copy device memory to an acceleration structure call:

    // Provided by VK_KHR_acceleration_structure
    void vkCmdCopyMemoryToAccelerationStructureKHR(
        VkCommandBuffer                             commandBuffer,
        const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `pInfo` is a pointer to a VkCopyMemoryToAccelerationStructureInfoKHR structure defining the copy operation.

Accesses to `pInfo->dst` must be synchronized with the VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR pipeline stage or the VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR pipeline stage, and an access type of VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_KHR. Accesses to the buffer indicated by `pInfo->src.deviceAddress` must be synchronized with the VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR pipeline stage or the VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR pipeline stage, and an access type of VK_ACCESS_TRANSFER_READ_BIT.

This command can accept acceleration structures produced by either vkCmdCopyAccelerationStructureToMemoryKHR or vkCopyAccelerationStructureToMemoryKHR.

The structure provided as input to deserialize is as described in vkCmdCopyAccelerationStructureToMemoryKHR, with any acceleration structure handles filled in with the newly-queried handles to bottom level acceleration structures created before deserialization. These do not need to be built at deserialize time, but must be created.

The application must also provide any required micromap addresses in the header as described in `vkCmdCopyAccelerationStructureToMemoryKHR`.

Valid Usage

- VUID-vkCmdCopyMemoryToAccelerationStructureKHR-accelerationStructure-08927
  The `VkPhysicalDeviceAccelerationStructureFeaturesKHR`::`accelerationStructure` feature must be enabled

- VUID-vkCmdCopyMemoryToAccelerationStructureKHR-pInfo-03742
  `pInfo->src.deviceAddress` must be a valid VkDeviceAddress

- VUID-vkCmdCopyMemoryToAccelerationStructureKHR-pInfo-03743
  `pInfo->src.deviceAddress` must be aligned to `256` bytes

- VUID-vkCmdCopyAccelerationStructureToMemoryKHR-pInfo-11700
  If the serialized acceleration structure in `pInfo->src` was originally built with a `type` of VK_ACCELERATION_STRUCTURE_TYPE_OPACITY_MICROMAP_KHR, `pInfo->src.deviceAddress` must be aligned to `128` bytes

Valid Usage (Implicit)

- VUID-vkCmdCopyMemoryToAccelerationStructureKHR-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdCopyMemoryToAccelerationStructureKHR-pInfo-parameter
  `pInfo` must be a valid pointer to a valid VkCopyMemoryToAccelerationStructureInfoKHR structure

- VUID-vkCmdCopyMemoryToAccelerationStructureKHR-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdCopyMemoryToAccelerationStructureKHR-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT operations

- VUID-vkCmdCopyMemoryToAccelerationStructureKHR-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdCopyMemoryToAccelerationStructureKHR-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdCopyMemoryToAccelerationStructureKHR-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Outside | VK_QUEUE_COMPUTE_BIT | Action

Conditional Rendering

vkCmdCopyMemoryToAccelerationStructureKHR is not affected by conditional rendering

The `VkCopyMemoryToAccelerationStructureInfoKHR` structure is defined as:

    // Provided by VK_KHR_acceleration_structure
    typedef struct VkCopyMemoryToAccelerationStructureInfoKHR {
        VkStructureType                       sType;
        const void*                           pNext;
        VkDeviceOrHostAddressConstKHR         src;
        VkAccelerationStructureKHR            dst;
        VkCopyAccelerationStructureModeKHR    mode;
    } VkCopyMemoryToAccelerationStructureInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `src` is the device or host address of memory containing the source data for the copy.

- `dst` is the target acceleration structure for the copy.

- `mode` is a VkCopyAccelerationStructureModeKHR value specifying additional operations to perform during the copy.

If the serialized data in `src` represents a top-level acceleration structure, `dst` must have been created with a value of VkAccelerationStructureCreateInfoKHR::`type` equal to either VK_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR or VK_ACCELERATION_STRUCTURE_TYPE_GENERIC_KHR.

If the serialized data in `src` represents a bottom-level acceleration structure, `dst` must have been created with a value of VkAccelerationStructureCreateInfoKHR::`type` equal to either VK_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR or VK_ACCELERATION_STRUCTURE_TYPE_GENERIC_KHR.

Valid Usage

- VUID-VkCopyMemoryToAccelerationStructureInfoKHR-src-04960
  The source memory pointed to by `src` must contain data previously serialized using vkCmdCopyAccelerationStructureToMemoryKHR, potentially modified to relocate acceleration structure references as described in that command

- VUID-VkCopyMemoryToAccelerationStructureInfoKHR-mode-03413
  `mode` must be VK_COPY_ACCELERATION_STRUCTURE_MODE_DESERIALIZE_KHR

- VUID-VkCopyMemoryToAccelerationStructureInfoKHR-pInfo-03414
  The data in `src` must have a format compatible with the destination physical device as returned by vkGetDeviceAccelerationStructureCompatibilityKHR

- VUID-VkCopyMemoryToAccelerationStructureInfoKHR-dst-03746
  `dst` must have been created with a `size` greater than or equal to that used to serialize the data in `src`

- VUID-VkCopyMemoryToAccelerationStructureInfoKHR-dst-11716
  The range of `src` accessed by this command must be fully backed by physical memory

- VUID-VkCopyMemoryToAccelerationStructureInfoKHR-dst-11717
  The range of `dst` accessed by this command must be fully backed by physical memory

- VUID-VkCopyMemoryToAccelerationStructureInfoKHR-src-11583
  If the serialized acceleration structure in `src` is bottom-level, each block in the header must have a type that corresponds to a valid value in VkAccelerationStructureSerializedBlockTypeKHR

- VUID-VkCopyMemoryToAccelerationStructureInfoKHR-dst-11584
  If the serialized acceleration structure in `src` is bottom-level, and any block in the header has a type of VK_ACCELERATION_STRUCTURE_SERIALIZED_BLOCK_TYPE_OPACITY_MICROMAP_KHR the `VkPhysicalDeviceOpacityMicromapFeaturesKHR`::`micromap` feature must be enabled

- VUID-VkCopyMemoryToAccelerationStructureInfoKHR-dst-11585
  If the serialized acceleration structure in `src` is bottom-level, every device address in each block in the header with type VK_ACCELERATION_STRUCTURE_SERIALIZED_BLOCK_TYPE_OPACITY_MICROMAP_KHR must point to a valid VkDeviceAddress that was retrieved by vkGetBufferDeviceAddressKHR for the underlying buffer objects of compatible micromaps constructed on the VkDevice when the command is executed

Valid Usage (Implicit)

- VUID-VkCopyMemoryToAccelerationStructureInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_COPY_MEMORY_TO_ACCELERATION_STRUCTURE_INFO_KHR

- VUID-VkCopyMemoryToAccelerationStructureInfoKHR-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkCopyMemoryToAccelerationStructureInfoKHR-dst-parameter
  `dst` must be a valid VkAccelerationStructureKHR handle

- VUID-VkCopyMemoryToAccelerationStructureInfoKHR-mode-parameter
  `mode` must be a valid VkCopyAccelerationStructureModeKHR value

To check if a serialized acceleration structure is compatible with the current device call:

    // Provided by VK_KHR_acceleration_structure
    void vkGetDeviceAccelerationStructureCompatibilityKHR(
        VkDevice                                    device,
        const VkAccelerationStructureVersionInfoKHR* pVersionInfo,
        VkAccelerationStructureCompatibilityKHR*    pCompatibility);

- `device` is the device to check the version against.

- `pVersionInfo` is a pointer to a VkAccelerationStructureVersionInfoKHR structure specifying version information to check against the device.

- `pCompatibility` is a pointer to a VkAccelerationStructureCompatibilityKHR value in which compatibility information is returned.

Valid Usage

- VUID-vkGetDeviceAccelerationStructureCompatibilityKHR-accelerationStructure-08928
  The `VkPhysicalDeviceAccelerationStructureFeaturesKHR`::`accelerationStructure` feature must be enabled

Valid Usage (Implicit)

- VUID-vkGetDeviceAccelerationStructureCompatibilityKHR-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetDeviceAccelerationStructureCompatibilityKHR-pVersionInfo-parameter
  `pVersionInfo` must be a valid pointer to a valid VkAccelerationStructureVersionInfoKHR structure

- VUID-vkGetDeviceAccelerationStructureCompatibilityKHR-pCompatibility-parameter
  `pCompatibility` must be a valid pointer to a VkAccelerationStructureCompatibilityKHR value

The `VkAccelerationStructureVersionInfoKHR` structure is defined as:

    // Provided by VK_KHR_acceleration_structure
    typedef struct VkAccelerationStructureVersionInfoKHR {
        VkStructureType    sType;
        const void*        pNext;
        const uint8_t*     pVersionData;
    } VkAccelerationStructureVersionInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `pVersionData` is a pointer to the version header of an acceleration structure as defined in vkCmdCopyAccelerationStructureToMemoryKHR

Note | `pVersionData` is a pointer to an array of 2×VK_UUID_SIZE `uint8_t` values instead of two VK_UUID_SIZE arrays as the expected use case for this member is to be pointed at the header of a previously serialized acceleration structure (via vkCmdCopyAccelerationStructureToMemoryKHR or vkCopyAccelerationStructureToMemoryKHR) that is loaded in memory. Using arrays would necessitate extra memory copies of the UUIDs.

Valid Usage (Implicit)

- VUID-VkAccelerationStructureVersionInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_VERSION_INFO_KHR

- VUID-VkAccelerationStructureVersionInfoKHR-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkAccelerationStructureVersionInfoKHR-pVersionData-parameter
  `pVersionData` must be a valid pointer to an array of 2×VK_UUID_SIZE `uint8_t` values

Possible values of `pCompatibility` returned by vkGetDeviceAccelerationStructureCompatibilityKHR are:

    // Provided by VK_KHR_acceleration_structure
    typedef enum VkAccelerationStructureCompatibilityKHR {
        VK_ACCELERATION_STRUCTURE_COMPATIBILITY_COMPATIBLE_KHR = 0,
        VK_ACCELERATION_STRUCTURE_COMPATIBILITY_INCOMPATIBLE_KHR = 1,
    } VkAccelerationStructureCompatibilityKHR;

- VK_ACCELERATION_STRUCTURE_COMPATIBILITY_COMPATIBLE_KHR if the `pVersionData` version acceleration structure is compatible with `device`.

- VK_ACCELERATION_STRUCTURE_COMPATIBILITY_INCOMPATIBLE_KHR if the `pVersionData` version acceleration structure is not compatible with `device`.

### 43.2. Cluster Level Acceleration Structures

Acceleration structure build times in ray tracing applications with extensive geometry can be reduced by introducing alternative acceleration structure types that facilitate bottom-level acceleration structure construction using pre-generated primitive clusters, improving geometry reuse. This can be achieved by incorporating additional acceleration structure types:

1. Cluster Level Acceleration Structure

2. Cluster Template Acceleration Structure

3. Cluster Level Bottom Level Acceleration Structure

Cluster Level Acceleration Structure (CLAS) is an intermediate acceleration structure constructed from triangles, which serves as a building block for Cluster Level Bottom Level Acceleration Structure. A CLAS shares similarities with a traditional bottom level acceleration structure but has several key distinctions. A CLAS can only contain a limited number of triangles and vertices. CLAS objects cannot be directly referenced in a top level acceleration structure, instead, they must be part of a Cluster Level Bottom Level Acceleration Structure. The geometry indices within a CLAS are local to it, potentially non-consecutive, and customizable per primitive. Each CLAS can also have a user-defined 32-bit ClusterID, which is accessible in the hit shaders. The vertex positions within a CLAS can be quantized by zeroing specific floating-point mantissa bits to optimize storage.

Cluster Template Acceleration Structure is a partially constructed CLAS designed for efficient instantiation into multiple CLAS objects. During a cluster template build, some pre-computation is performed independent of vertex positions, allowing reuse across multiple CLAS objects with different vertex data. A cluster template itself does not require vertex positions but it retains non-positional properties similar to a CLAS, which are then inherited during instantiation. A cluster template must be instantiated into a CLAS object to be usable.

Cluster Level Bottom Level Acceleration Structure is a new alternative to the existing bottom level acceleration structures, which is constructed using references to already built CLAS objects and is the only cluster acceleration structure that can be referenced in a top level acceleration structure.

These cluster acceleration structures can be built or moved by a single versatile multi-indirect function vkCmdBuildClusterAccelerationStructureIndirectNV. To determine the memory requirements for executing this function, call:

    // Provided by VK_NV_cluster_acceleration_structure
    void vkGetClusterAccelerationStructureBuildSizesNV(
        VkDevice                                    device,
        const VkClusterAccelerationStructureInputInfoNV* pInfo,
        VkAccelerationStructureBuildSizesInfoKHR*   pSizeInfo);

- `device` is the logical device that owns the acceleration structure.

- `pInfo` is a pointer to a VkClusterAccelerationStructureInputInfoNV structure containing parameters required for the memory requirements query.

- `pSizeInfo` is a pointer to a VkAccelerationStructureBuildSizesInfoKHR structure which returns the size required for an acceleration structure and scratch buffer, given the build parameters. The size requirements for a scratch buffer may be zero.

If VkClusterAccelerationStructureInputInfoNV::`opMode` is VK_CLUSTER_ACCELERATION_STRUCTURE_OP_MODE_IMPLICIT_DESTINATIONS_NV, acceleration structure and scratch memory sizes are returned for all VkClusterAccelerationStructureInputInfoNV::`maxAccelerationStructureCount` acceleration structures. If VkClusterAccelerationStructureInputInfoNV::`opMode` is VK_CLUSTER_ACCELERATION_STRUCTURE_OP_MODE_EXPLICIT_DESTINATIONS_NV, scratch memory size for all VkClusterAccelerationStructureInputInfoNV::`maxAccelerationStructureCount` acceleration structures and the acceleration structure memory size for a single acceleration structure is returned. If VkClusterAccelerationStructureInputInfoNV::`opMode` is VK_CLUSTER_ACCELERATION_STRUCTURE_OP_MODE_COMPUTE_SIZES_NV, only scratch memory size is returned for the requested acceleration structures.

Valid Usage

- VUID-vkGetClusterAccelerationStructureBuildSizesNV-clusterAccelerationStructure-10438
  The `VkPhysicalDeviceClusterAccelerationStructureFeaturesNV`::`clusterAccelerationStructure` feature must be enabled

Valid Usage (Implicit)

- VUID-vkGetClusterAccelerationStructureBuildSizesNV-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetClusterAccelerationStructureBuildSizesNV-pInfo-parameter
  `pInfo` must be a valid pointer to a valid VkClusterAccelerationStructureInputInfoNV structure

- VUID-vkGetClusterAccelerationStructureBuildSizesNV-pSizeInfo-parameter
  `pSizeInfo` must be a valid pointer to a VkAccelerationStructureBuildSizesInfoKHR structure

The VkClusterAccelerationStructureInputInfoNV structure is defined as:

    // Provided by VK_NV_cluster_acceleration_structure
    typedef struct VkClusterAccelerationStructureInputInfoNV {
        VkStructureType                            sType;
        void*                                      pNext;
        uint32_t                                   maxAccelerationStructureCount;
        VkBuildAccelerationStructureFlagsKHR       flags;
        VkClusterAccelerationStructureOpTypeNV     opType;
        VkClusterAccelerationStructureOpModeNV     opMode;
        VkClusterAccelerationStructureOpInputNV    opInput;
    } VkClusterAccelerationStructureInputInfoNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `maxAccelerationStructureCount` is the maximum number of acceleration structures that will be provided to the multi indirect operation.

- `flags` is a bitmask of VkBuildAccelerationStructureFlagsKHR specifying flags for the multi indirect operation.

- `opType` is a VkClusterAccelerationStructureOpTypeNV value specifying the type of operation to perform.

- `opMode` is a VkClusterAccelerationStructureOpModeNV value specifying the mode of operation.

- `opInput` is a VkClusterAccelerationStructureOpInputNV value specifying the descriptions of the operation.

Valid Usage (Implicit)

- VUID-VkClusterAccelerationStructureInputInfoNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_CLUSTER_ACCELERATION_STRUCTURE_INPUT_INFO_NV

- VUID-VkClusterAccelerationStructureInputInfoNV-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkClusterAccelerationStructureInputInfoNV-flags-parameter
  `flags` must be a valid combination of VkBuildAccelerationStructureFlagBitsKHR values

- VUID-VkClusterAccelerationStructureInputInfoNV-opType-parameter
  `opType` must be a valid VkClusterAccelerationStructureOpTypeNV value

- VUID-VkClusterAccelerationStructureInputInfoNV-opMode-parameter
  `opMode` must be a valid VkClusterAccelerationStructureOpModeNV value

- VUID-VkClusterAccelerationStructureInputInfoNV-pClustersBottomLevel-parameter
  If `opType` is VK_CLUSTER_ACCELERATION_STRUCTURE_OP_TYPE_BUILD_CLUSTERS_BOTTOM_LEVEL_NV, the `pClustersBottomLevel` member of `opInput` must be a valid pointer to a VkClusterAccelerationStructureClustersBottomLevelInputNV structure

- VUID-VkClusterAccelerationStructureInputInfoNV-pTriangleClusters-parameter
  If `opType` is VK_CLUSTER_ACCELERATION_STRUCTURE_OP_TYPE_BUILD_TRIANGLE_CLUSTER_NV, VK_CLUSTER_ACCELERATION_STRUCTURE_OP_TYPE_BUILD_TRIANGLE_CLUSTER_TEMPLATE_NV, VK_CLUSTER_ACCELERATION_STRUCTURE_OP_TYPE_INSTANTIATE_TRIANGLE_CLUSTER_NV, or VK_CLUSTER_ACCELERATION_STRUCTURE_OP_TYPE_GET_CLUSTER_TEMPLATE_INDICES_NV, the `pTriangleClusters` member of `opInput` must be a valid pointer to a VkClusterAccelerationStructureTriangleClusterInputNV structure

- VUID-VkClusterAccelerationStructureInputInfoNV-pMoveObjects-parameter
  If `opType` is VK_CLUSTER_ACCELERATION_STRUCTURE_OP_TYPE_MOVE_OBJECTS_NV, the `pMoveObjects` member of `opInput` must be a valid pointer to a VkClusterAccelerationStructureMoveObjectsInputNV structure

Values which can be set in VkClusterAccelerationStructureOpTypeNV are:

    // Provided by VK_NV_cluster_acceleration_structure
    typedef enum VkClusterAccelerationStructureOpTypeNV {
        VK_CLUSTER_ACCELERATION_STRUCTURE_OP_TYPE_MOVE_OBJECTS_NV = 0,
        VK_CLUSTER_ACCELERATION_STRUCTURE_OP_TYPE_BUILD_CLUSTERS_BOTTOM_LEVEL_NV = 1,
        VK_CLUSTER_ACCELERATION_STRUCTURE_OP_TYPE_BUILD_TRIANGLE_CLUSTER_NV = 2,
        VK_CLUSTER_ACCELERATION_STRUCTURE_OP_TYPE_BUILD_TRIANGLE_CLUSTER_TEMPLATE_NV = 3,
        VK_CLUSTER_ACCELERATION_STRUCTURE_OP_TYPE_INSTANTIATE_TRIANGLE_CLUSTER_NV = 4,
        VK_CLUSTER_ACCELERATION_STRUCTURE_OP_TYPE_GET_CLUSTER_TEMPLATE_INDICES_NV = 5,
    } VkClusterAccelerationStructureOpTypeNV;

- VK_CLUSTER_ACCELERATION_STRUCTURE_OP_TYPE_MOVE_OBJECTS_NV specifies that a cluster acceleration structure, cluster acceleration structure template or a bottom level acceleration structure built from cluster acceleration structures will be moved. If a cluster acceleration structure is moved, the bottom level cluster acceleration structures containing it will have to be re-built. If used with VK_CLUSTER_ACCELERATION_STRUCTURE_OP_MODE_COMPUTE_SIZES_NV, it returns the size of existing cluster acceleration structures.

- VK_CLUSTER_ACCELERATION_STRUCTURE_OP_TYPE_BUILD_CLUSTERS_BOTTOM_LEVEL_NV specifies that bottom level cluster acceleration structures will be built.

- VK_CLUSTER_ACCELERATION_STRUCTURE_OP_TYPE_BUILD_TRIANGLE_CLUSTER_NV specifies that cluster acceleration structures will be built.

- VK_CLUSTER_ACCELERATION_STRUCTURE_OP_TYPE_BUILD_TRIANGLE_CLUSTER_TEMPLATE_NV specifies that a template for cluster acceleration structure will be built.

- VK_CLUSTER_ACCELERATION_STRUCTURE_OP_TYPE_INSTANTIATE_TRIANGLE_CLUSTER_NV specifies that a template for a cluster acceleration structure will be instantiated, resulting in a built cluster acceleration structure.

- VK_CLUSTER_ACCELERATION_STRUCTURE_OP_TYPE_GET_CLUSTER_TEMPLATE_INDICES_NV specifies that the vertex indices of the cluster template acceleration structure will be fetched.

Values which can be set in VkClusterAccelerationStructureOpModeNV are:

    // Provided by VK_NV_cluster_acceleration_structure
    typedef enum VkClusterAccelerationStructureOpModeNV {
        VK_CLUSTER_ACCELERATION_STRUCTURE_OP_MODE_IMPLICIT_DESTINATIONS_NV = 0,
        VK_CLUSTER_ACCELERATION_STRUCTURE_OP_MODE_EXPLICIT_DESTINATIONS_NV = 1,
        VK_CLUSTER_ACCELERATION_STRUCTURE_OP_MODE_COMPUTE_SIZES_NV = 2,
    } VkClusterAccelerationStructureOpModeNV;

- VK_CLUSTER_ACCELERATION_STRUCTURE_OP_MODE_IMPLICIT_DESTINATIONS_NV specifies that the build or move operation will implicitly distribute built or compacted cluster acceleration structures starting at the address provided in VkClusterAccelerationStructureCommandsInfoNV::`dstImplicitData`. If a move operation is being performed, the acceleration structures will be tightly compacted.

- VK_CLUSTER_ACCELERATION_STRUCTURE_OP_MODE_EXPLICIT_DESTINATIONS_NV specifies that the build or move operation will explicitly write built or compacted cluster acceleration structures in the array of addresses provided in VkClusterAccelerationStructureCommandsInfoNV::`dstAddressesArray`.

- VK_CLUSTER_ACCELERATION_STRUCTURE_OP_MODE_COMPUTE_SIZES_NV specifies that computed cluster acceleration structure sizes will be written to VkClusterAccelerationStructureCommandsInfoNV::`dstSizesArray`.

The `VkClusterAccelerationStructureOpInputNV` union is defined as:

    // Provided by VK_NV_cluster_acceleration_structure
    typedef union VkClusterAccelerationStructureOpInputNV {
        VkClusterAccelerationStructureClustersBottomLevelInputNV*    pClustersBottomLevel;
        VkClusterAccelerationStructureTriangleClusterInputNV*        pTriangleClusters;
        VkClusterAccelerationStructureMoveObjectsInputNV*            pMoveObjects;
    } VkClusterAccelerationStructureOpInputNV;

- `pClustersBottomLevel` is a VkClusterAccelerationStructureClustersBottomLevelInputNV structure specifying an upper threshold on parameters to build multiple bottom level acceleration structures from multiple cluster level acceleration structures.

- `pTriangleClusters` is a VkClusterAccelerationStructureTriangleClusterInputNV structure specifying an upper threshold on parameters to build a regular or templated cluster acceleration structure.

- `pMoveObjects` is a VkClusterAccelerationStructureMoveObjectsInputNV structure specifying an upper threshold on the number of bytes moved and the type of acceleration structure being moved.

The VkClusterAccelerationStructureClustersBottomLevelInputNV structure is defined as:

    // Provided by VK_NV_cluster_acceleration_structure
    typedef struct VkClusterAccelerationStructureClustersBottomLevelInputNV {
        VkStructureType    sType;
        void*              pNext;
        uint32_t           maxTotalClusterCount;
        uint32_t           maxClusterCountPerAccelerationStructure;
    } VkClusterAccelerationStructureClustersBottomLevelInputNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `maxTotalClusterCount` is the total number of clusters acceleration structures that will be built or moved across all input arguments.

- `maxClusterCountPerAccelerationStructure` is the maximum number of clusters acceleration structures that will be built or moved per input argument.

Valid Usage (Implicit)

- VUID-VkClusterAccelerationStructureClustersBottomLevelInputNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_CLUSTER_ACCELERATION_STRUCTURE_CLUSTERS_BOTTOM_LEVEL_INPUT_NV

- VUID-VkClusterAccelerationStructureClustersBottomLevelInputNV-pNext-pNext
  `pNext` must be `NULL`

The VkClusterAccelerationStructureTriangleClusterInputNV structure is defined as:

    // Provided by VK_NV_cluster_acceleration_structure
    typedef struct VkClusterAccelerationStructureTriangleClusterInputNV {
        VkStructureType    sType;
        void*              pNext;
        VkFormat           vertexFormat;
        uint32_t           maxGeometryIndexValue;
        uint32_t           maxClusterUniqueGeometryCount;
        uint32_t           maxClusterTriangleCount;
        uint32_t           maxClusterVertexCount;
        uint32_t           maxTotalTriangleCount;
        uint32_t           maxTotalVertexCount;
        uint32_t           minPositionTruncateBitCount;
    } VkClusterAccelerationStructureTriangleClusterInputNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `vertexFormat` is the VkFormat of each vertex element.

- `maxGeometryIndexValue` is the maximum geometry index value for any constructed geometry.

- `maxClusterUniqueGeometryCount` is the maximum number of unique values of the geometry index for each cluster or cluster template.

- `maxClusterTriangleCount` is the maximum number of triangles in a cluster or cluster template.

- `maxClusterVertexCount` is the maximum number of unique vertices in the cluster’s index buffer.

- `maxTotalTriangleCount` is the sum of all triangles across all clusters or cluster templates.

- `maxTotalVertexCount` is the maximum number of vertices across all clusters or cluster templates.

- `minPositionTruncateBitCount` is the least value specified in cluster build in VkClusterAccelerationStructureBuildTriangleClusterInfoNV::`positionTruncateBitCount` or cluster template build in VkClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV::`positionTruncateBitCount`.

Valid Usage

- VUID-VkClusterAccelerationStructureTriangleClusterInputNV-vertexFormat-10439
  The format features of `vertexFormat` must contain VK_FORMAT_FEATURE_ACCELERATION_STRUCTURE_VERTEX_BUFFER_BIT_KHR

- VUID-VkClusterAccelerationStructureTriangleClusterInputNV-maxClusterTriangleCount-10440
  `maxClusterTriangleCount` must be less than or equal to VkPhysicalDeviceClusterAccelerationStructurePropertiesNV::`maxTrianglesPerCluster`

- VUID-VkClusterAccelerationStructureTriangleClusterInputNV-maxClusterVertexCount-10441
  `maxClusterVertexCount` must be less than or equal to VkPhysicalDeviceClusterAccelerationStructurePropertiesNV::`maxVerticesPerCluster`

- VUID-VkClusterAccelerationStructureTriangleClusterInputNV-minPositionTruncateBitCount-10442
  `minPositionTruncateBitCount` must be less than or equal to `32`

Valid Usage (Implicit)

- VUID-VkClusterAccelerationStructureTriangleClusterInputNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_CLUSTER_ACCELERATION_STRUCTURE_TRIANGLE_CLUSTER_INPUT_NV

- VUID-VkClusterAccelerationStructureTriangleClusterInputNV-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkClusterAccelerationStructureTriangleClusterInputNV-vertexFormat-parameter
  `vertexFormat` must be a valid VkFormat value

The VkClusterAccelerationStructureMoveObjectsInputNV structure is defined as:

    // Provided by VK_NV_cluster_acceleration_structure
    typedef struct VkClusterAccelerationStructureMoveObjectsInputNV {
        VkStructureType                         sType;
        void*                                   pNext;
        VkClusterAccelerationStructureTypeNV    type;
        VkBool32                                noMoveOverlap;
        VkDeviceSize                            maxMovedBytes;
    } VkClusterAccelerationStructureMoveObjectsInputNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `type` is a VkClusterAccelerationStructureTypeNV value identifying the type of cluster acceleration structure.

- `noMoveOverlap` specifies if the source and destination cluster acceleration structures overlap in memory for the move operation. If set to VK_TRUE, the source cluster acceleration structure remains valid after the move and move operation acts like a copy.

- `maxMovedBytes` is the maximum number of bytes that may be moved in this operation.

Valid Usage (Implicit)

- VUID-VkClusterAccelerationStructureMoveObjectsInputNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_CLUSTER_ACCELERATION_STRUCTURE_MOVE_OBJECTS_INPUT_NV

- VUID-VkClusterAccelerationStructureMoveObjectsInputNV-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkClusterAccelerationStructureMoveObjectsInputNV-type-parameter
  `type` must be a valid VkClusterAccelerationStructureTypeNV value

Values which can be set in VkClusterAccelerationStructureTypeNV are:

    // Provided by VK_NV_cluster_acceleration_structure
    typedef enum VkClusterAccelerationStructureTypeNV {
        VK_CLUSTER_ACCELERATION_STRUCTURE_TYPE_CLUSTERS_BOTTOM_LEVEL_NV = 0,
        VK_CLUSTER_ACCELERATION_STRUCTURE_TYPE_TRIANGLE_CLUSTER_NV = 1,
        VK_CLUSTER_ACCELERATION_STRUCTURE_TYPE_TRIANGLE_CLUSTER_TEMPLATE_NV = 2,
    } VkClusterAccelerationStructureTypeNV;

- VK_CLUSTER_ACCELERATION_STRUCTURE_TYPE_CLUSTERS_BOTTOM_LEVEL_NV specifies a bottom level cluster acceleration structure.

- VK_CLUSTER_ACCELERATION_STRUCTURE_TYPE_TRIANGLE_CLUSTER_NV specifies a cluster acceleration structure.

- VK_CLUSTER_ACCELERATION_STRUCTURE_TYPE_TRIANGLE_CLUSTER_TEMPLATE_NV specifies a template cluster acceleration structure.

To build or move a cluster acceleration structure or a cluster acceleration structure template call:

    // Provided by VK_NV_cluster_acceleration_structure
    void vkCmdBuildClusterAccelerationStructureIndirectNV(
        VkCommandBuffer                             commandBuffer,
        const VkClusterAccelerationStructureCommandsInfoNV* pCommandInfos);

- `commandBuffer` is the command buffer into which the command is recorded.

- `pCommandInfos` is a pointer to a VkClusterAccelerationStructureCommandsInfoNV structure containing parameters required for building or moving the cluster acceleration structure.

Similar to vkCmdBuildAccelerationStructuresKHR, this command may initiate multiple acceleration structures builds and there is no ordering or synchronization implied between any of the individual acceleration structure builds. Accesses to the acceleration structure scratch memory as identified by the VkClusterAccelerationStructureCommandsInfoNV::`scratchData` must be synchronized with the VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR pipeline stage and an access type of (VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR | VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_KHR).

Accesses to each VkClusterAccelerationStructureCommandsInfoNV::`dstImplicitData`, VkClusterAccelerationStructureCommandsInfoNV::`dstAddressesArray` and VkClusterAccelerationStructureCommandsInfoNV::`dstSizesArray` must be synchronized with the VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR pipeline stage and an access type of VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_KHR.

Accesses to memory with input data as identified by any used values of VkClusterAccelerationStructureCommandsInfoNV::`srcInfosArray` and VkClusterAccelerationStructureCommandsInfoNV::`srcInfosCount` must be synchronized with the VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR pipeline stage and an access type of VK_ACCESS_INDIRECT_COMMAND_READ_BIT.

Valid Usage

- VUID-vkCmdBuildClusterAccelerationStructureIndirectNV-clusterAccelerationStructure-10443
  The `VkPhysicalDeviceClusterAccelerationStructureFeaturesNV`::`clusterAccelerationStructure` feature must be enabled

- VUID-vkCmdBuildClusterAccelerationStructureIndirectNV-pNext-10444
  The `pNext` chain of the bound ray tracing pipeline must include a VkRayTracingPipelineClusterAccelerationStructureCreateInfoNV structure

- VUID-vkCmdBuildClusterAccelerationStructureIndirectNV-pCommandInfos-10445
  `pCommandInfos->input.maxAccelerationStructureCount` must be less than or equal to the value used in `pInfo->maxAccelerationStructureCount` in vkGetClusterAccelerationStructureBuildSizesNV to determine the memory requirements for the build operation

- VUID-vkCmdBuildClusterAccelerationStructureIndirectNV-scratchData-12300
  The scratch memory of the cluster acceleration structure specified in VkClusterAccelerationStructureCommandsInfoNV::`scratchData`, or the memory indirectly referenced in VkClusterAccelerationStructureCommandsInfoNV::`scratchData` when VkClusterAccelerationStructureCommandsInfoNV::`addressResolutionFlags` contains VK_CLUSTER_ACCELERATION_STRUCTURE_ADDRESS_RESOLUTION_INDIRECTED_SCRATCH_DATA_BIT_NV, must be larger than or equal to the scratch size queried with vkGetClusterAccelerationStructureBuildSizesNV

- VUID-vkCmdBuildClusterAccelerationStructureIndirectNV-scratchData-12301
  The scratch address of the cluster acceleration structure specified in VkClusterAccelerationStructureCommandsInfoNV::`scratchData`, or the address indirectly referenced in VkClusterAccelerationStructureCommandsInfoNV::`scratchData` when VkClusterAccelerationStructureCommandsInfoNV::`addressResolutionFlags` contains VK_CLUSTER_ACCELERATION_STRUCTURE_ADDRESS_RESOLUTION_INDIRECTED_SCRATCH_DATA_BIT_NV, must be aligned based on the cluster acceleration structure type and its alignment properties as queried with VkPhysicalDeviceClusterAccelerationStructurePropertiesNV

- VUID-vkCmdBuildClusterAccelerationStructureIndirectNV-pCommandInfos-10448
  If `pCommandInfos->input.opType` is VK_CLUSTER_ACCELERATION_STRUCTURE_OP_TYPE_MOVE_OBJECTS_NV, `pCommandInfos->srcInfosArray` must be an array of VkClusterAccelerationStructureMoveObjectsInfoNV structures

- VUID-vkCmdBuildClusterAccelerationStructureIndirectNV-pCommandInfos-10449
  If `pCommandInfos->input.opType` is VK_CLUSTER_ACCELERATION_STRUCTURE_OP_TYPE_BUILD_CLUSTERS_BOTTOM_LEVEL_NV, `pCommandInfos->srcInfosArray` must be an array of VkClusterAccelerationStructureBuildClustersBottomLevelInfoNV structures

- VUID-vkCmdBuildClusterAccelerationStructureIndirectNV-pCommandInfos-10450
  If `pCommandInfos->input.opType` is VK_CLUSTER_ACCELERATION_STRUCTURE_OP_TYPE_BUILD_TRIANGLE_CLUSTER_NV, `pCommandInfos->srcInfosArray` must be an array of VkClusterAccelerationStructureBuildTriangleClusterInfoNV structures

- VUID-vkCmdBuildClusterAccelerationStructureIndirectNV-pCommandInfos-10451
  If `pCommandInfos->input.opType` is VK_CLUSTER_ACCELERATION_STRUCTURE_OP_TYPE_BUILD_TRIANGLE_CLUSTER_TEMPLATE_NV, `pCommandInfos->srcInfosArray` must be an array of VkClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV structures

- VUID-vkCmdBuildClusterAccelerationStructureIndirectNV-pCommandInfos-10452
  If `pCommandInfos->input.opType` is VK_CLUSTER_ACCELERATION_STRUCTURE_OP_TYPE_INSTANTIATE_TRIANGLE_CLUSTER_NV, `pCommandInfos->srcInfosArray` must be an array of VkClusterAccelerationStructureInstantiateClusterInfoNV structures

- VUID-vkCmdBuildClusterAccelerationStructureIndirectNV-pCommandInfos-10832
  If `pCommandInfos->input.opType` is VK_CLUSTER_ACCELERATION_STRUCTURE_OP_TYPE_GET_CLUSTER_TEMPLATE_INDICES_NV, `pCommandInfos->srcInfosArray` must be an array of VkClusterAccelerationStructureGetTemplateIndicesInfoNV structures

- VUID-vkCmdBuildClusterAccelerationStructureIndirectNV-pCommandInfos-10453
  The value in `pCommandInfos->srcInfosCount` must be less than or equal to `pCommandInfos->input.maxAccelerationStructureCount`

- VUID-vkCmdBuildClusterAccelerationStructureIndirectNV-pCommandInfos-10454
  The number of inputs specified in `pCommandInfos->srcInfosArray` must be greater than or equal to `pCommandInfos->srcInfosCount`

- VUID-vkCmdBuildClusterAccelerationStructureIndirectNV-dstAddressesArray-12302
  The memory regions specified in VkClusterAccelerationStructureCommandsInfoNV::`dstAddressesArray`, or the memory indirectly referenced in VkClusterAccelerationStructureCommandsInfoNV::`dstAddressesArray` when VkClusterAccelerationStructureCommandsInfoNV::`addressResolutionFlags` contains VK_CLUSTER_ACCELERATION_STRUCTURE_ADDRESS_RESOLUTION_INDIRECTED_DST_ADDRESS_ARRAY_BIT_NV, must not overlap with each other or with `pCommandInfos->scratchData`, or the memory indirectly referenced in VkClusterAccelerationStructureCommandsInfoNV::`scratchData` when VkClusterAccelerationStructureCommandsInfoNV::`addressResolutionFlags` contains VK_CLUSTER_ACCELERATION_STRUCTURE_ADDRESS_RESOLUTION_INDIRECTED_SCRATCH_DATA_BIT_NV

- VUID-vkCmdBuildClusterAccelerationStructureIndirectNV-dstImplicitData-12303
  The memory region specified in VkClusterAccelerationStructureCommandsInfoNV::`dstImplicitData`, or the memory indirectly referenced in VkClusterAccelerationStructureCommandsInfoNV::`dstImplicitData` when VkClusterAccelerationStructureCommandsInfoNV::`addressResolutionFlags` contains VK_CLUSTER_ACCELERATION_STRUCTURE_ADDRESS_RESOLUTION_INDIRECTED_DST_IMPLICIT_DATA_BIT_NV, for multiple acceleration structure builds must not overlap with `pCommandInfos->scratchData`, or the memory indirectly referenced in VkClusterAccelerationStructureCommandsInfoNV::`scratchData` when VkClusterAccelerationStructureCommandsInfoNV::`addressResolutionFlags` contains VK_CLUSTER_ACCELERATION_STRUCTURE_ADDRESS_RESOLUTION_INDIRECTED_SCRATCH_DATA_BIT_NV

- VUID-vkCmdBuildClusterAccelerationStructureIndirectNV-pCommandInfos-12304
  `pCommandInfos->scratchData`, or the address indirectly referenced in VkClusterAccelerationStructureCommandsInfoNV::`scratchData` when VkClusterAccelerationStructureCommandsInfoNV::`addressResolutionFlags` contains VK_CLUSTER_ACCELERATION_STRUCTURE_ADDRESS_RESOLUTION_INDIRECTED_SCRATCH_DATA_BIT_NV, must be a device address allocated to the application from a buffer created with the VK_BUFFER_USAGE_STORAGE_BUFFER_BIT usage flag set

- VUID-vkCmdBuildClusterAccelerationStructureIndirectNV-pCommandInfos-12305
  `pCommandInfos->srcInfosArray`, or the address indirectly referenced in VkClusterAccelerationStructureCommandsInfoNV::`srcInfosArray` when VkClusterAccelerationStructureCommandsInfoNV::`addressResolutionFlags` contains VK_CLUSTER_ACCELERATION_STRUCTURE_ADDRESS_RESOLUTION_INDIRECTED_SRC_INFOS_ARRAY_BIT_NV, must be a device address range allocated to the application from a buffer created with the VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_BUILD_INPUT_READ_ONLY_BIT_KHR usage flag set

- VUID-vkCmdBuildClusterAccelerationStructureIndirectNV-pCommandInfos-12306
  `pCommandInfos->srcInfosCount`, or the address indirectly referenced in VkClusterAccelerationStructureCommandsInfoNV::`srcInfosCount` when VkClusterAccelerationStructureCommandsInfoNV::`addressResolutionFlags` contains VK_CLUSTER_ACCELERATION_STRUCTURE_ADDRESS_RESOLUTION_INDIRECTED_SRC_INFOS_COUNT_BIT_NV, must be a device address allocated to the application from a buffer created with the VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_BUILD_INPUT_READ_ONLY_BIT_KHR usage flag set

- VUID-vkCmdBuildClusterAccelerationStructureIndirectNV-pCommandInfos-12381
  `pCommandInfos->dstAddressesArray`, or the address indirectly referenced in VkClusterAccelerationStructureCommandsInfoNV::`dstAddressesArray` when VkClusterAccelerationStructureCommandsInfoNV::`addressResolutionFlags` contains VK_CLUSTER_ACCELERATION_STRUCTURE_ADDRESS_RESOLUTION_INDIRECTED_DST_ADDRESS_ARRAY_BIT_NV, must be a device address range allocated to the application from a buffer created with the VK_BUFFER_USAGE_STORAGE_BUFFER_BIT usage flag set

- VUID-vkCmdBuildClusterAccelerationStructureIndirectNV-pCommandInfos-12382
  All destination addresses contained in `pCommandInfos->dstAddressesArray`, or in the memory indirectly referenced in VkClusterAccelerationStructureCommandsInfoNV::`dstAddressesArray` when VkClusterAccelerationStructureCommandsInfoNV::`addressResolutionFlags` contains VK_CLUSTER_ACCELERATION_STRUCTURE_ADDRESS_RESOLUTION_INDIRECTED_DST_ADDRESS_ARRAY_BIT_NV, must be device address ranges allocated to the application from buffers created with the VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_STORAGE_BIT_KHR usage flag set

- VUID-vkCmdBuildClusterAccelerationStructureIndirectNV-pCommandInfos-12308
  `pCommandInfos->dstImplicitData`, or the address indirectly referenced in VkClusterAccelerationStructureCommandsInfoNV::`dstImplicitData` when VkClusterAccelerationStructureCommandsInfoNV::`addressResolutionFlags` contains VK_CLUSTER_ACCELERATION_STRUCTURE_ADDRESS_RESOLUTION_INDIRECTED_DST_IMPLICIT_DATA_BIT_NV, must be a device address allocated to the application from a buffer created with the VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_STORAGE_BIT_KHR usage flag set

Valid Usage (Implicit)

- VUID-vkCmdBuildClusterAccelerationStructureIndirectNV-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdBuildClusterAccelerationStructureIndirectNV-pCommandInfos-parameter
  `pCommandInfos` must be a valid pointer to a valid VkClusterAccelerationStructureCommandsInfoNV structure

- VUID-vkCmdBuildClusterAccelerationStructureIndirectNV-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdBuildClusterAccelerationStructureIndirectNV-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT operations

- VUID-vkCmdBuildClusterAccelerationStructureIndirectNV-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdBuildClusterAccelerationStructureIndirectNV-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdBuildClusterAccelerationStructureIndirectNV-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Outside | VK_QUEUE_COMPUTE_BIT | Action

Conditional Rendering

vkCmdBuildClusterAccelerationStructureIndirectNV is not affected by conditional rendering

The VkClusterAccelerationStructureCommandsInfoNV structure is defined as:

    // Provided by VK_NV_cluster_acceleration_structure
    typedef struct VkClusterAccelerationStructureCommandsInfoNV {
        VkStructureType                                           sType;
        void*                                                     pNext;
        VkClusterAccelerationStructureInputInfoNV                 input;
        VkDeviceAddress                                           dstImplicitData;
        VkDeviceAddress                                           scratchData;
        VkStridedDeviceAddressRegionKHR                           dstAddressesArray;
        VkStridedDeviceAddressRegionKHR                           dstSizesArray;
        VkStridedDeviceAddressRegionKHR                           srcInfosArray;
        VkDeviceAddress                                           srcInfosCount;
        VkClusterAccelerationStructureAddressResolutionFlagsNV    addressResolutionFlags;
    } VkClusterAccelerationStructureCommandsInfoNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `input` is VkClusterAccelerationStructureInputInfoNV structure describing the build or move parameters for the cluster acceleration structure.

- `dstImplicitData` is the device address for memory where the implicit build of cluster acceleration structure will be saved. If VkClusterAccelerationStructureInputInfoNV::`opMode` is VK_CLUSTER_ACCELERATION_STRUCTURE_OP_MODE_EXPLICIT_DESTINATIONS_NV or VK_CLUSTER_ACCELERATION_STRUCTURE_OP_MODE_COMPUTE_SIZES_NV, this value is ignored.

- `scratchData` is the device address of scratch memory that will be used during cluster acceleration structure move or build.

- `dstAddressesArray` is a VkStridedDeviceAddressRegionKHR that specifies addresses and stride for moved or built cluster acceleration structures, depending on the value of VkClusterAccelerationStructureInputInfoNV::`opMode`. If VkClusterAccelerationStructureInputInfoNV::`opMode` is VK_CLUSTER_ACCELERATION_STRUCTURE_OP_MODE_IMPLICIT_DESTINATIONS_NV and VkStridedDeviceAddressRegionKHR::`deviceAddress` is not `0`, then the implementation writes the cluster addresses to the specified region. If VkClusterAccelerationStructureInputInfoNV::`opMode` is VK_CLUSTER_ACCELERATION_STRUCTURE_OP_MODE_EXPLICIT_DESTINATIONS_NV, the implementation reads the cluster addresses from the specified region. If VkClusterAccelerationStructureInputInfoNV::`opMode` is VK_CLUSTER_ACCELERATION_STRUCTURE_OP_MODE_COMPUTE_SIZES_NV, this member is ignored.

- `dstSizesArray` is a VkStridedDeviceAddressRegionKHR containing sizes of moved or built cluster acceleration structures. If VkClusterAccelerationStructureInputInfoNV::`opMode` is VK_CLUSTER_ACCELERATION_STRUCTURE_OP_MODE_IMPLICIT_DESTINATIONS_NV or VK_CLUSTER_ACCELERATION_STRUCTURE_OP_MODE_COMPUTE_SIZES_NV, then the sizes are saved. If VkClusterAccelerationStructureInputInfoNV::`opMode` is VK_CLUSTER_ACCELERATION_STRUCTURE_OP_MODE_EXPLICIT_DESTINATIONS_NV, then the sizes are read from.

- `srcInfosArray` is a VkStridedDeviceAddressRegionKHR where input data for the build or move operation is read from. If the stride is `0`, the structures are assumed to be packed tightly. Its format is dependent on VkClusterAccelerationStructureInputInfoNV::`opType` as per the table below.

`input.opType` | Format of `srcInfosArray`
VK_CLUSTER_ACCELERATION_STRUCTURE_OP_TYPE_MOVE_OBJECTS_NV | VkClusterAccelerationStructureMoveObjectsInfoNV
VK_CLUSTER_ACCELERATION_STRUCTURE_OP_TYPE_BUILD_CLUSTERS_BOTTOM_LEVEL_NV | VkClusterAccelerationStructureBuildClustersBottomLevelInfoNV
VK_CLUSTER_ACCELERATION_STRUCTURE_OP_TYPE_BUILD_TRIANGLE_CLUSTER_NV | VkClusterAccelerationStructureBuildTriangleClusterInfoNV
VK_CLUSTER_ACCELERATION_STRUCTURE_OP_TYPE_BUILD_TRIANGLE_CLUSTER_TEMPLATE_NV | VkClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV
VK_CLUSTER_ACCELERATION_STRUCTURE_OP_TYPE_INSTANTIATE_TRIANGLE_CLUSTER_NV | VkClusterAccelerationStructureInstantiateClusterInfoNV
VK_CLUSTER_ACCELERATION_STRUCTURE_OP_TYPE_GET_CLUSTER_TEMPLATE_INDICES_NV | VkClusterAccelerationStructureGetTemplateIndicesInfoNV

- `srcInfosCount` is the device address of memory containing the count of number of build or move operations to perform. The actual value is the minimum of this value and the value specified in `input.maxAccelerationStructureCount`. If this value is `0`, the count is determined by `input.maxAccelerationStructureCount` alone.

- `addressResolutionFlags` is a bitmask of VkClusterAccelerationStructureAddressResolutionFlagBitsNV values specifying how an implementation will interpret the device addresses in this structure.

Valid Usage

- VUID-VkClusterAccelerationStructureCommandsInfoNV-opMode-12309
  If VkClusterAccelerationStructureInputInfoNV::`opMode` is VK_CLUSTER_ACCELERATION_STRUCTURE_OP_MODE_IMPLICIT_DESTINATIONS_NV, VkClusterAccelerationStructureCommandsInfoNV::`dstImplicitData`, or the address indirectly referenced in VkClusterAccelerationStructureCommandsInfoNV::`dstImplicitData` when VkClusterAccelerationStructureCommandsInfoNV::`addressResolutionFlags` contains VK_CLUSTER_ACCELERATION_STRUCTURE_ADDRESS_RESOLUTION_INDIRECTED_DST_IMPLICIT_DATA_BIT_NV, must be a valid VkDeviceAddress

- VUID-VkClusterAccelerationStructureCommandsInfoNV-opMode-12310
  If VkClusterAccelerationStructureInputInfoNV::`opMode` is VK_CLUSTER_ACCELERATION_STRUCTURE_OP_MODE_IMPLICIT_DESTINATIONS_NV and `input.opType` is not VK_CLUSTER_ACCELERATION_STRUCTURE_OP_TYPE_MOVE_OBJECTS_NV, the memory in VkClusterAccelerationStructureCommandsInfoNV::`dstImplicitData`, or the memory indirectly referenced in VkClusterAccelerationStructureCommandsInfoNV::`dstImplicitData` when VkClusterAccelerationStructureCommandsInfoNV::`addressResolutionFlags` contains VK_CLUSTER_ACCELERATION_STRUCTURE_ADDRESS_RESOLUTION_INDIRECTED_DST_IMPLICIT_DATA_BIT_NV must be equal to or larger than the VkAccelerationStructureBuildSizesInfoKHR::`accelerationStructureSize` value returned from vkGetClusterAccelerationStructureBuildSizesNV with same input parameters

- VUID-VkClusterAccelerationStructureCommandsInfoNV-opMode-12311
  If VkClusterAccelerationStructureInputInfoNV::`opMode` is VK_CLUSTER_ACCELERATION_STRUCTURE_OP_MODE_IMPLICIT_DESTINATIONS_NV and `input.opType` is VK_CLUSTER_ACCELERATION_STRUCTURE_OP_TYPE_MOVE_OBJECTS_NV, the memory in VkClusterAccelerationStructureCommandsInfoNV::`dstImplicitData`, or the memory indirectly referenced in VkClusterAccelerationStructureCommandsInfoNV::`dstImplicitData` when VkClusterAccelerationStructureCommandsInfoNV::`addressResolutionFlags` contains VK_CLUSTER_ACCELERATION_STRUCTURE_ADDRESS_RESOLUTION_INDIRECTED_DST_IMPLICIT_DATA_BIT_NV, must be equal to or larger than the sum of all the built acceleration structures that are being moved

- VUID-VkClusterAccelerationStructureCommandsInfoNV-input-10469
  If `input.opType` is VK_CLUSTER_ACCELERATION_STRUCTURE_OP_TYPE_MOVE_OBJECTS_NV, the total memory moved must not be larger than the size provided in VkClusterAccelerationStructureMoveObjectsInputNV::`maxMovedBytes`

- VUID-VkClusterAccelerationStructureCommandsInfoNV-opMode-12312
  If VkClusterAccelerationStructureInputInfoNV::`opMode` is VK_CLUSTER_ACCELERATION_STRUCTURE_OP_MODE_COMPUTE_SIZES_NV, VkClusterAccelerationStructureCommandsInfoNV::`dstSizesArray`, or the address indirectly referenced in VkClusterAccelerationStructureCommandsInfoNV::`dstSizesArray` when VkClusterAccelerationStructureCommandsInfoNV::`addressResolutionFlags` contains VK_CLUSTER_ACCELERATION_STRUCTURE_ADDRESS_RESOLUTION_INDIRECTED_DST_SIZES_ARRAY_BIT_NV, must be a valid VkDeviceAddress

- VUID-VkClusterAccelerationStructureCommandsInfoNV-opMode-12313
  If VkClusterAccelerationStructureInputInfoNV::`opMode` is VK_CLUSTER_ACCELERATION_STRUCTURE_OP_MODE_EXPLICIT_DESTINATIONS_NV, the address in VkClusterAccelerationStructureCommandsInfoNV::`dstAddressesArray`, or the address indirectly referenced in VkClusterAccelerationStructureCommandsInfoNV::`dstAddressesArray` when VkClusterAccelerationStructureCommandsInfoNV::`addressResolutionFlags` contains VK_CLUSTER_ACCELERATION_STRUCTURE_ADDRESS_RESOLUTION_INDIRECTED_DST_ADDRESS_ARRAY_BIT_NV, must be a valid VkDeviceAddress

- VUID-VkClusterAccelerationStructureCommandsInfoNV-opMode-12314
  If VkClusterAccelerationStructureInputInfoNV::`opMode` is VK_CLUSTER_ACCELERATION_STRUCTURE_OP_MODE_EXPLICIT_DESTINATIONS_NV, the addresses in VkClusterAccelerationStructureCommandsInfoNV::`dstAddressesArray`, or the memory indirectly referenced in VkClusterAccelerationStructureCommandsInfoNV::`dstAddressesArray` when VkClusterAccelerationStructureCommandsInfoNV::`addressResolutionFlags` contains VK_CLUSTER_ACCELERATION_STRUCTURE_ADDRESS_RESOLUTION_INDIRECTED_DST_ADDRESS_ARRAY_BIT_NV, must be large enough to accommodate built or moved clusters

- VUID-VkClusterAccelerationStructureCommandsInfoNV-opMode-12315
  If VkClusterAccelerationStructureInputInfoNV::`opMode` is VK_CLUSTER_ACCELERATION_STRUCTURE_OP_MODE_EXPLICIT_DESTINATIONS_NV, the buffers in VkClusterAccelerationStructureCommandsInfoNV::`dstAddressesArray`, or the buffers indirectly referenced in VkClusterAccelerationStructureCommandsInfoNV::`dstAddressesArray` when VkClusterAccelerationStructureCommandsInfoNV::`addressResolutionFlags` contains VK_CLUSTER_ACCELERATION_STRUCTURE_ADDRESS_RESOLUTION_INDIRECTED_DST_ADDRESS_ARRAY_BIT_NV, must not overlap

- VUID-VkClusterAccelerationStructureCommandsInfoNV-opMode-12316
  If VkClusterAccelerationStructureInputInfoNV::`opMode` is VK_CLUSTER_ACCELERATION_STRUCTURE_OP_MODE_EXPLICIT_DESTINATIONS_NV, the addresses in VkClusterAccelerationStructureCommandsInfoNV::`dstAddressesArray`, or the addresses indirectly referenced in VkClusterAccelerationStructureCommandsInfoNV::`dstAddressesArray` when VkClusterAccelerationStructureCommandsInfoNV::`addressResolutionFlags` contains VK_CLUSTER_ACCELERATION_STRUCTURE_ADDRESS_RESOLUTION_INDIRECTED_DST_ADDRESS_ARRAY_BIT_NV, must be aligned based on the cluster acceleration structure type and its alignment properties as described in VkPhysicalDeviceClusterAccelerationStructurePropertiesNV

- VUID-VkClusterAccelerationStructureCommandsInfoNV-dstAddressesArray-10474
  The stride in `dstAddressesArray` must be greater than or equal to 8

- VUID-VkClusterAccelerationStructureCommandsInfoNV-dstSizesArray-10475
  The stride in `dstSizesArray` must be greater than or equal to 4

- VUID-VkClusterAccelerationStructureCommandsInfoNV-srcInfosArray-10476
  The stride in `srcInfosArray` must be greater than the type of structure the address is describing

- VUID-VkClusterAccelerationStructureCommandsInfoNV-input-12317
  If `input.opType` is VK_CLUSTER_ACCELERATION_STRUCTURE_OP_TYPE_BUILD_TRIANGLE_CLUSTER_NV, then depending on the VkClusterAccelerationStructureInputInfoNV::`opMode`, VkClusterAccelerationStructureCommandsInfoNV::`dstImplicitData`, or the address indirectly referenced in VkClusterAccelerationStructureCommandsInfoNV::`dstImplicitData` when VkClusterAccelerationStructureCommandsInfoNV::`addressResolutionFlags` contains VK_CLUSTER_ACCELERATION_STRUCTURE_ADDRESS_RESOLUTION_INDIRECTED_DST_IMPLICIT_DATA_BIT_NV, or addresses specified in VkClusterAccelerationStructureCommandsInfoNV::`dstAddressesArray`, or the addresses indirectly referenced in VkClusterAccelerationStructureCommandsInfoNV::`dstAddressesArray` when VkClusterAccelerationStructureCommandsInfoNV::`addressResolutionFlags` contains VK_CLUSTER_ACCELERATION_STRUCTURE_ADDRESS_RESOLUTION_INDIRECTED_DST_ADDRESS_ARRAY_BIT_NV, must be aligned to VkPhysicalDeviceClusterAccelerationStructurePropertiesNV::`clusterByteAlignment`

- VUID-VkClusterAccelerationStructureCommandsInfoNV-input-12318
  If `input.opType` is VK_CLUSTER_ACCELERATION_STRUCTURE_OP_TYPE_BUILD_TRIANGLE_CLUSTER_TEMPLATE_NV, then depending on the VkClusterAccelerationStructureInputInfoNV::`opMode`, VkClusterAccelerationStructureCommandsInfoNV::`dstImplicitData`, or the address indirectly referenced in VkClusterAccelerationStructureCommandsInfoNV::`dstImplicitData` when VkClusterAccelerationStructureCommandsInfoNV::`addressResolutionFlags` contains VK_CLUSTER_ACCELERATION_STRUCTURE_ADDRESS_RESOLUTION_INDIRECTED_DST_IMPLICIT_DATA_BIT_NV, or addresses specified in VkClusterAccelerationStructureCommandsInfoNV::`dstAddressesArray`, or the addresses indirectly referenced in VkClusterAccelerationStructureCommandsInfoNV::`dstAddressesArray` when VkClusterAccelerationStructureCommandsInfoNV::`addressResolutionFlags` contains VK_CLUSTER_ACCELERATION_STRUCTURE_ADDRESS_RESOLUTION_INDIRECTED_DST_ADDRESS_ARRAY_BIT_NV, must be aligned to VkPhysicalDeviceClusterAccelerationStructurePropertiesNV::`clusterTemplateByteAlignment`

- VUID-VkClusterAccelerationStructureCommandsInfoNV-input-12319
  If `input.opType` is VK_CLUSTER_ACCELERATION_STRUCTURE_OP_TYPE_INSTANTIATE_TRIANGLE_CLUSTER_NV, then depending on the VkClusterAccelerationStructureInputInfoNV::`opMode`, VkClusterAccelerationStructureCommandsInfoNV::`dstImplicitData`, or the address indirectly referenced in VkClusterAccelerationStructureCommandsInfoNV::`dstImplicitData` when VkClusterAccelerationStructureCommandsInfoNV::`addressResolutionFlags` contains VK_CLUSTER_ACCELERATION_STRUCTURE_ADDRESS_RESOLUTION_INDIRECTED_DST_IMPLICIT_DATA_BIT_NV, or addresses specified in VkClusterAccelerationStructureCommandsInfoNV::`dstAddressesArray`, or the addresses indirectly referenced in VkClusterAccelerationStructureCommandsInfoNV::`dstAddressesArray` when VkClusterAccelerationStructureCommandsInfoNV::`addressResolutionFlags` contains VK_CLUSTER_ACCELERATION_STRUCTURE_ADDRESS_RESOLUTION_INDIRECTED_DST_ADDRESS_ARRAY_BIT_NV, must be aligned to VkPhysicalDeviceClusterAccelerationStructurePropertiesNV::`clusterByteAlignment`

- VUID-VkClusterAccelerationStructureCommandsInfoNV-scratchData-12320
  VkClusterAccelerationStructureCommandsInfoNV::`scratchData`, or the address indirectly referenced in VkClusterAccelerationStructureCommandsInfoNV::`scratchData` when VkClusterAccelerationStructureCommandsInfoNV::`addressResolutionFlags` contains VK_CLUSTER_ACCELERATION_STRUCTURE_ADDRESS_RESOLUTION_INDIRECTED_SCRATCH_DATA_BIT_NV, must be aligned to VkPhysicalDeviceClusterAccelerationStructurePropertiesNV::`clusterScratchByteAlignment`

- VUID-VkClusterAccelerationStructureCommandsInfoNV-buildScratchSize-12321
  If the `buildScratchSize` member of the VkAccelerationStructureBuildSizesInfoKHR structure returned from a call to vkGetClusterAccelerationStructureBuildSizesNV is not `0`, then VkClusterAccelerationStructureCommandsInfoNV::`scratchData`, or the address indirectly referenced in VkClusterAccelerationStructureCommandsInfoNV::`scratchData` when VkClusterAccelerationStructureCommandsInfoNV::`addressResolutionFlags` contains VK_CLUSTER_ACCELERATION_STRUCTURE_ADDRESS_RESOLUTION_INDIRECTED_SCRATCH_DATA_BIT_NV, must be a valid VkDeviceAddress

- VUID-VkClusterAccelerationStructureCommandsInfoNV-srcInfosCount-12322
  VkClusterAccelerationStructureCommandsInfoNV::`srcInfosCount`, or the address indirectly referenced in VkClusterAccelerationStructureCommandsInfoNV::`srcInfosCount` when VkClusterAccelerationStructureCommandsInfoNV::`addressResolutionFlags` contains VK_CLUSTER_ACCELERATION_STRUCTURE_ADDRESS_RESOLUTION_INDIRECTED_SRC_INFOS_COUNT_BIT_NV, must be 4-byte aligned

- VUID-VkClusterAccelerationStructureCommandsInfoNV-input-12323
  If `input.opType` is VK_CLUSTER_ACCELERATION_STRUCTURE_OP_TYPE_BUILD_CLUSTERS_BOTTOM_LEVEL_NV, the total and per argument number of cluster acceleration structures referenced in VkClusterAccelerationStructureCommandsInfoNV::`srcInfosArray`, or the structures indirectly referenced in VkClusterAccelerationStructureCommandsInfoNV::`srcInfosArray` when VkClusterAccelerationStructureCommandsInfoNV::`addressResolutionFlags` contains VK_CLUSTER_ACCELERATION_STRUCTURE_ADDRESS_RESOLUTION_INDIRECTED_SRC_INFOS_ARRAY_BIT_NV, must be equal or less than the maximum values with which memory requirements were queried in vkGetClusterAccelerationStructureBuildSizesNV with VkClusterAccelerationStructureOpInputNV::`pClustersBottomLevel`

Valid Usage (Implicit)

- VUID-VkClusterAccelerationStructureCommandsInfoNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_CLUSTER_ACCELERATION_STRUCTURE_COMMANDS_INFO_NV

- VUID-VkClusterAccelerationStructureCommandsInfoNV-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkClusterAccelerationStructureCommandsInfoNV-input-parameter
  `input` must be a valid VkClusterAccelerationStructureInputInfoNV structure

- VUID-VkClusterAccelerationStructureCommandsInfoNV-dstImplicitData-parameter
  If `dstImplicitData` is not `0`, `dstImplicitData` must be a valid VkDeviceAddress value

- VUID-VkClusterAccelerationStructureCommandsInfoNV-scratchData-parameter
  `scratchData` must be a valid VkDeviceAddress value

- VUID-VkClusterAccelerationStructureCommandsInfoNV-srcInfosCount-parameter
  If `srcInfosCount` is not `0`, `srcInfosCount` must be a valid VkDeviceAddress value

- VUID-VkClusterAccelerationStructureCommandsInfoNV-addressResolutionFlags-parameter
  `addressResolutionFlags` must be a valid combination of VkClusterAccelerationStructureAddressResolutionFlagBitsNV values

Bits which can be set in VkClusterAccelerationStructureCommandsInfoNV::`addressResolutionFlags`, specifying how the device address in VkClusterAccelerationStructureCommandsInfoNV are interpreted, are:

    // Provided by VK_NV_cluster_acceleration_structure
    typedef enum VkClusterAccelerationStructureAddressResolutionFlagBitsNV {
        VK_CLUSTER_ACCELERATION_STRUCTURE_ADDRESS_RESOLUTION_NONE_NV = 0,
        VK_CLUSTER_ACCELERATION_STRUCTURE_ADDRESS_RESOLUTION_INDIRECTED_DST_IMPLICIT_DATA_BIT_NV = 0x00000001,
        VK_CLUSTER_ACCELERATION_STRUCTURE_ADDRESS_RESOLUTION_INDIRECTED_SCRATCH_DATA_BIT_NV = 0x00000002,
        VK_CLUSTER_ACCELERATION_STRUCTURE_ADDRESS_RESOLUTION_INDIRECTED_DST_ADDRESS_ARRAY_BIT_NV = 0x00000004,
        VK_CLUSTER_ACCELERATION_STRUCTURE_ADDRESS_RESOLUTION_INDIRECTED_DST_SIZES_ARRAY_BIT_NV = 0x00000008,
        VK_CLUSTER_ACCELERATION_STRUCTURE_ADDRESS_RESOLUTION_INDIRECTED_SRC_INFOS_ARRAY_BIT_NV = 0x00000010,
        VK_CLUSTER_ACCELERATION_STRUCTURE_ADDRESS_RESOLUTION_INDIRECTED_SRC_INFOS_COUNT_BIT_NV = 0x00000020,
    } VkClusterAccelerationStructureAddressResolutionFlagBitsNV;

- VK_CLUSTER_ACCELERATION_STRUCTURE_ADDRESS_RESOLUTION_NONE_NV specifies that no address resolution flags are provided.

- VK_CLUSTER_ACCELERATION_STRUCTURE_ADDRESS_RESOLUTION_INDIRECTED_DST_IMPLICIT_DATA_BIT_NV specifies another level of indirection when reading VkClusterAccelerationStructureCommandsInfoNV::`dstImplicitData`.

- VK_CLUSTER_ACCELERATION_STRUCTURE_ADDRESS_RESOLUTION_INDIRECTED_SCRATCH_DATA_BIT_NV specifies another level of indirection when reading VkClusterAccelerationStructureCommandsInfoNV::`scratchData`.

- VK_CLUSTER_ACCELERATION_STRUCTURE_ADDRESS_RESOLUTION_INDIRECTED_DST_ADDRESS_ARRAY_BIT_NV specifies another level of indirection when reading VkClusterAccelerationStructureCommandsInfoNV::`dstAddressesArray`.

- VK_CLUSTER_ACCELERATION_STRUCTURE_ADDRESS_RESOLUTION_INDIRECTED_DST_SIZES_ARRAY_BIT_NV specifies another level of indirection when reading VkClusterAccelerationStructureCommandsInfoNV::`dstSizesArray`.

- VK_CLUSTER_ACCELERATION_STRUCTURE_ADDRESS_RESOLUTION_INDIRECTED_SRC_INFOS_ARRAY_BIT_NV specifies another level of indirection when reading VkClusterAccelerationStructureCommandsInfoNV::`srcInfosArray`.

- VK_CLUSTER_ACCELERATION_STRUCTURE_ADDRESS_RESOLUTION_INDIRECTED_SRC_INFOS_COUNT_BIT_NV specifies another level of indirection when reading VkClusterAccelerationStructureCommandsInfoNV::`srcInfosCount`.

    // Provided by VK_NV_cluster_acceleration_structure
    typedef VkFlags VkClusterAccelerationStructureAddressResolutionFlagsNV;

`VkClusterAccelerationStructureAddressResolutionFlagsNV` is a bitmask type for setting a mask of zero or more VkClusterAccelerationStructureAddressResolutionFlagBitsNV.

The VkClusterAccelerationStructureMoveObjectsInfoNV structure is defined as:

    // Provided by VK_NV_cluster_acceleration_structure
    typedef struct VkClusterAccelerationStructureMoveObjectsInfoNV {
        VkDeviceAddress    srcAccelerationStructure;
    } VkClusterAccelerationStructureMoveObjectsInfoNV;

- `srcAccelerationStructure` is the device address of the source cluster acceleration structure that will be moved.

Valid Usage

- VUID-VkClusterAccelerationStructureMoveObjectsInfoNV-srcAccelerationStructure-10483
  `srcAccelerationStructure` must be a type of cluster acceleration structure

Valid Usage (Implicit)

- VUID-VkClusterAccelerationStructureMoveObjectsInfoNV-srcAccelerationStructure-parameter
  `srcAccelerationStructure` must be a valid VkDeviceAddress value

The VkClusterAccelerationStructureBuildClustersBottomLevelInfoNV structure is defined as:

    // Provided by VK_NV_cluster_acceleration_structure
    typedef struct VkClusterAccelerationStructureBuildClustersBottomLevelInfoNV {
        uint32_t           clusterReferencesCount;
        uint32_t           clusterReferencesStride;
        VkDeviceAddress    clusterReferences;
    } VkClusterAccelerationStructureBuildClustersBottomLevelInfoNV;

- `clusterReferencesCount` is the number of clusters this bottom level acceleration structure will be built from.

- `clusterReferencesStride` is the stride in `clusterReferences`.

- `clusterReferences` is the device memory containing the address of the clusters.

Valid Usage

- VUID-VkClusterAccelerationStructureBuildClustersBottomLevelInfoNV-clusterReferences-10484
  All cluster references in `clusterReferences` must be unique

- VUID-VkClusterAccelerationStructureBuildClustersBottomLevelInfoNV-clusterReferences-10485
  `clusterReferences` must have at least `clusterReferencesCount` values

- VUID-VkClusterAccelerationStructureBuildClustersBottomLevelInfoNV-clusterReferencesStride-10486
  `clusterReferencesStride` must be greater than or equal to 8

Valid Usage (Implicit)

- VUID-VkClusterAccelerationStructureBuildClustersBottomLevelInfoNV-clusterReferences-parameter
  `clusterReferences` must be a valid VkDeviceAddress value

Bits which can be set in VkClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV::`geometryFlags`, specifying geometry flags for cluster acceleration structure, are:

    // Provided by VK_NV_cluster_acceleration_structure
    typedef enum VkClusterAccelerationStructureGeometryFlagBitsNV {
        VK_CLUSTER_ACCELERATION_STRUCTURE_GEOMETRY_CULL_DISABLE_BIT_NV = 0x00000001,
        VK_CLUSTER_ACCELERATION_STRUCTURE_GEOMETRY_NO_DUPLICATE_ANYHIT_INVOCATION_BIT_NV = 0x00000002,
        VK_CLUSTER_ACCELERATION_STRUCTURE_GEOMETRY_OPAQUE_BIT_NV = 0x00000004,
    } VkClusterAccelerationStructureGeometryFlagBitsNV;

- VK_CLUSTER_ACCELERATION_STRUCTURE_GEOMETRY_CULL_DISABLE_BIT_NV disables face culling for this geometry.

- VK_CLUSTER_ACCELERATION_STRUCTURE_GEOMETRY_NO_DUPLICATE_ANYHIT_INVOCATION_BIT_NV specifies that the implementation must only call the any-hit shader a single time for each primitive in this geometry. If this bit is absent an implementation may invoke the any-hit shader more than once for this geometry.

- VK_CLUSTER_ACCELERATION_STRUCTURE_GEOMETRY_OPAQUE_BIT_NV specifies that this geometry does not invoke the any-hit shaders even if present in a hit group.

    // Provided by VK_NV_cluster_acceleration_structure
    typedef VkFlags VkClusterAccelerationStructureGeometryFlagsNV;

`VkClusterAccelerationStructureGeometryFlagsNV` is a bitmask type for setting a mask of zero or more VkClusterAccelerationStructureGeometryFlagBitsNV.

The VkClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV structure is defined as:

    // Provided by VK_NV_cluster_acceleration_structure
    typedef struct VkClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV {
        uint32_t    geometryIndex:24;
        uint32_t    reserved:5;
        uint32_t    geometryFlags:3;
    } VkClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV;

- `geometryIndex` specifies the geometry index for all triangles in the cluster acceleration structure.

- `reserved` is reserved for future use.

- `geometryFlags` is a bitmask of VkClusterAccelerationStructureGeometryFlagBitsNV values describing geometry flags for the cluster acceleration structure.

The C language specification does not define the ordering of bit-fields, but in practice, this structure produces the correct layout with existing compilers. The intended bit pattern is the following:

- `geometryIndex`, `reserved` and `mask` occupy the same memory as if a single `uint32_t` was specified in their place

  - `geometryIndex` occupies the 24 least significant bits of that memory

  - `geometryFlags` occupies the 3 most significant bits of that memory

If a compiler produces code that diverges from that pattern, applications must employ another method to set values according to the correct bit pattern.

Valid Usage

- VUID-VkClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV-reserved-10487
  `reserved` must be `0`

Bits which can be set in VkClusterAccelerationStructureBuildTriangleClusterInfoNV::`clusterFlags`, specifying flags for clusters in an acceleration structure, are:

    // Provided by VK_NV_cluster_acceleration_structure
    typedef enum VkClusterAccelerationStructureClusterFlagBitsNV {
        VK_CLUSTER_ACCELERATION_STRUCTURE_CLUSTER_ALLOW_DISABLE_OPACITY_MICROMAPS_NV = 0x00000001,
    } VkClusterAccelerationStructureClusterFlagBitsNV;

- VK_CLUSTER_ACCELERATION_STRUCTURE_CLUSTER_ALLOW_DISABLE_OPACITY_MICROMAPS_NV specifies that the specified cluster acceleration structure may be referenced in an instance with VK_GEOMETRY_INSTANCE_DISABLE_OPACITY_MICROMAPS_BIT_EXT set.

    // Provided by VK_NV_cluster_acceleration_structure
    typedef VkFlags VkClusterAccelerationStructureClusterFlagsNV;

`VkClusterAccelerationStructureClusterFlagsNV` is a bitmask type for setting a mask of zero or more VkClusterAccelerationStructureClusterFlagBitsNV.

The VkClusterAccelerationStructureBuildTriangleClusterInfoNV structure is defined as:

    // Provided by VK_NV_cluster_acceleration_structure
    typedef struct VkClusterAccelerationStructureBuildTriangleClusterInfoNV {
        uint32_t                                                         clusterID;
        VkClusterAccelerationStructureClusterFlagsNV                     clusterFlags;
        uint32_t                                                         triangleCount:9;
        uint32_t                                                         vertexCount:9;
        uint32_t                                                         positionTruncateBitCount:6;
        uint32_t                                                         indexType:4;
        uint32_t                                                         opacityMicromapIndexType:4;
        VkClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV    baseGeometryIndexAndGeometryFlags;
        uint16_t                                                         indexBufferStride;
        uint16_t                                                         vertexBufferStride;
        uint16_t                                                         geometryIndexAndFlagsBufferStride;
        uint16_t                                                         opacityMicromapIndexBufferStride;
        VkDeviceAddress                                                  indexBuffer;
        VkDeviceAddress                                                  vertexBuffer;
        VkDeviceAddress                                                  geometryIndexAndFlagsBuffer;
        VkDeviceAddress                                                  opacityMicromapArray;
        VkDeviceAddress                                                  opacityMicromapIndexBuffer;
    } VkClusterAccelerationStructureBuildTriangleClusterInfoNV;

- `clusterID` is a user specified identifier assigned to this cluster.

- `clusterFlags` is a bitmask of VkClusterAccelerationStructureClusterFlagBitsNV values describing flags how the cluster should be built.

- `triangleCount` is the number of triangles in this cluster.

- `vertexCount` is the number of unique vertices in this cluster.

- `positionTruncateBitCount` is the number of bits starting at the lowest bit (i.e. the LSBs of the mantissa), of each vertex position that will be truncated to zero to improve floating-point compression.

- `indexType` is a single VkClusterAccelerationStructureIndexFormatFlagBitsNV value specifying the index type in `indexBuffer`.

- `opacityMicromapIndexType` is a single VkClusterAccelerationStructureIndexFormatFlagBitsNV value specifying the index type in `opacityMicromapIndexBuffer`.

- `baseGeometryIndexAndGeometryFlags` is a VkClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV value specifying the base geometry index and flags for all triangles in the cluster.

- `indexBufferStride` is the stride in bytes in `indexBuffer` with `0` meaning the values are tightly-packed.

- `vertexBufferStride` is the stride in bytes in `vertexBuffer` with `0` meaning the values are tightly-packed.

- `geometryIndexAndFlagsBufferStride` is the stride in bytes in `geometryIndexAndFlagsBuffer` with `0` meaning the values are tightly-packed.

- `opacityMicromapIndexBufferStride` is the stride in bytes in `opacityMicromapIndexBuffer` with `0` meaning the values are tightly-packed.

- `indexBuffer` is a device address containing the indices of the vertices in the cluster and are of type `indexType`.

- `vertexBuffer` is a device address containing the vertex data of the triangles in the cluster with format specified in VkClusterAccelerationStructureTriangleClusterInputNV::`vertexFormat`.

- `geometryIndexAndFlagsBuffer` is either `0` or an address containing strided VkClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV values specifying the geometry index and flag for every triangle in the cluster.

- `opacityMicromapArray` is either `0` or specifies the address of a valid opacity micromap array to reference from the cluster acceleration structure. If it is `0`, then opacity micromaps will be disabled for this cluster acceleration structure.

- `opacityMicromapIndexBuffer` is either `0` or specifies the address of a strided array with size equal to the number of triangles or indices into the opacity micromap array. If `opacityMicromapIndexBuffer` is `0` then the index used is the index of the triangle in the geometry.

The C language specification does not define the ordering of bit-fields, but in practice, this structure produces the correct layout with existing compilers. The intended bit pattern is the following:

- `triangleCount`, `vertexCount`, `positionTruncateBitCount`, `indexType` and `opacityMicromapIndexType` occupy the same memory as if a single `uint32_t` was specified in their place

  - `triangleCount` occupies the 9 least significant bits of that memory

  - `vertexCount` occupies the next 9 least significant bits of that memory

  - `positionTruncateBitCount` occupies the next 6 least significant bits of that memory

  - `indexType` occupies the next 4 least significant bits of that memory

  - `opacityMicromapIndexType` occupies the 4 most significant bits of that memory

If a compiler produces code that diverges from that pattern, applications must employ another method to set values according to the correct bit pattern.

Valid Usage

- VUID-VkClusterAccelerationStructureBuildTriangleClusterInfoNV-clusterID-10488
  `clusterID` must not be 0xFFFFFFFF

- VUID-VkClusterAccelerationStructureBuildTriangleClusterInfoNV-triangleCount-10489
  `triangleCount` must be less than or equal to VkPhysicalDeviceClusterAccelerationStructurePropertiesNV::`maxTrianglesPerCluster`

- VUID-VkClusterAccelerationStructureBuildTriangleClusterInfoNV-vertexCount-10490
  `vertexCount` must be less than or equal to VkPhysicalDeviceClusterAccelerationStructurePropertiesNV::`maxVerticesPerCluster`

- VUID-VkClusterAccelerationStructureBuildTriangleClusterInfoNV-indexType-10491
  `indexType` must only have a single bit set

- VUID-VkClusterAccelerationStructureBuildTriangleClusterInfoNV-opacityMicromapIndexType-10492
  `opacityMicromapIndexType` must only have a single bit set

- VUID-VkClusterAccelerationStructureBuildTriangleClusterInfoNV-positionTruncateBitCount-10493
  `positionTruncateBitCount` must be greater than or equal to VkClusterAccelerationStructureTriangleClusterInputNV::`minPositionTruncateBitCount` and less than or equal to `32`

- VUID-VkClusterAccelerationStructureBuildTriangleClusterInfoNV-indexBufferStride-10494
  `indexBufferStride` must be `0` or a multiple of `indexType`

- VUID-VkClusterAccelerationStructureBuildTriangleClusterInfoNV-vertexBufferStride-10495
  `vertexBufferStride` must be `0` or a multiple of value specified in VkClusterAccelerationStructureTriangleClusterInputNV::`vertexFormat`

- VUID-VkClusterAccelerationStructureBuildTriangleClusterInfoNV-baseGeometryIndex-10496
  The maximum geometry index after using the values in `baseGeometryIndex` and `geometryIndexBuffer` must be less than VkPhysicalDeviceClusterAccelerationStructurePropertiesNV::`maxClusterGeometryIndex`

- VUID-VkClusterAccelerationStructureBuildTriangleClusterInfoNV-opacityMicromapArray-10881
  If `opacityMicromapArray` is not `0`, then the cluster acceleration structure must have been built with VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_CLUSTER_OPACITY_MICROMAPS_BIT_NV flag set in VkClusterAccelerationStructureInputInfoNV::`flags`

Valid Usage (Implicit)

- VUID-VkClusterAccelerationStructureBuildTriangleClusterInfoNV-clusterFlags-parameter
  `clusterFlags` must be a valid combination of VkClusterAccelerationStructureClusterFlagBitsNV values

- VUID-VkClusterAccelerationStructureBuildTriangleClusterInfoNV-indexBuffer-parameter
  `indexBuffer` must be a valid VkDeviceAddress value

- VUID-VkClusterAccelerationStructureBuildTriangleClusterInfoNV-vertexBuffer-parameter
  `vertexBuffer` must be a valid VkDeviceAddress value

- VUID-VkClusterAccelerationStructureBuildTriangleClusterInfoNV-geometryIndexAndFlagsBuffer-parameter
  If `geometryIndexAndFlagsBuffer` is not `0`, `geometryIndexAndFlagsBuffer` must be a valid VkDeviceAddress value

- VUID-VkClusterAccelerationStructureBuildTriangleClusterInfoNV-opacityMicromapArray-parameter
  If `opacityMicromapArray` is not `0`, `opacityMicromapArray` must be a valid VkDeviceAddress value

- VUID-VkClusterAccelerationStructureBuildTriangleClusterInfoNV-opacityMicromapIndexBuffer-parameter
  If `opacityMicromapIndexBuffer` is not `0`, `opacityMicromapIndexBuffer` must be a valid VkDeviceAddress value

Bits that can be set in VkClusterAccelerationStructureBuildTriangleClusterInfoNV::`indexType`, VkClusterAccelerationStructureBuildTriangleClusterInfoNV::`opacityMicromapIndexType`, VkClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV::`indexType` and VkClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV::`opacityMicromapIndexType` specifying the index type is one of:

    // Provided by VK_NV_cluster_acceleration_structure
    typedef enum VkClusterAccelerationStructureIndexFormatFlagBitsNV {
        VK_CLUSTER_ACCELERATION_STRUCTURE_INDEX_FORMAT_8BIT_NV = 0x00000001,
        VK_CLUSTER_ACCELERATION_STRUCTURE_INDEX_FORMAT_16BIT_NV = 0x00000002,
        VK_CLUSTER_ACCELERATION_STRUCTURE_INDEX_FORMAT_32BIT_NV = 0x00000004,
    } VkClusterAccelerationStructureIndexFormatFlagBitsNV;

- VK_CLUSTER_ACCELERATION_STRUCTURE_INDEX_FORMAT_8BIT_NV specifies that 8-bit indices will be used.

- VK_CLUSTER_ACCELERATION_STRUCTURE_INDEX_FORMAT_16BIT_NV specifies that 16-bit indices will be used.

- VK_CLUSTER_ACCELERATION_STRUCTURE_INDEX_FORMAT_32BIT_NV specifies that 32-bit indices will be used.

    // Provided by VK_NV_cluster_acceleration_structure
    typedef VkFlags VkClusterAccelerationStructureIndexFormatFlagsNV;

`VkClusterAccelerationStructureIndexFormatFlagsNV` is a bitmask type for setting a single VkClusterAccelerationStructureIndexFormatFlagBitsNV.

The VkClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV structure is defined as:

    // Provided by VK_NV_cluster_acceleration_structure
    typedef struct VkClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV {
        uint32_t                                                         clusterID;
        VkClusterAccelerationStructureClusterFlagsNV                     clusterFlags;
        uint32_t                                                         triangleCount:9;
        uint32_t                                                         vertexCount:9;
        uint32_t                                                         positionTruncateBitCount:6;
        uint32_t                                                         indexType:4;
        uint32_t                                                         opacityMicromapIndexType:4;
        VkClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV    baseGeometryIndexAndGeometryFlags;
        uint16_t                                                         indexBufferStride;
        uint16_t                                                         vertexBufferStride;
        uint16_t                                                         geometryIndexAndFlagsBufferStride;
        uint16_t                                                         opacityMicromapIndexBufferStride;
        VkDeviceAddress                                                  indexBuffer;
        VkDeviceAddress                                                  vertexBuffer;
        VkDeviceAddress                                                  geometryIndexAndFlagsBuffer;
        VkDeviceAddress                                                  opacityMicromapArray;
        VkDeviceAddress                                                  opacityMicromapIndexBuffer;
        VkDeviceAddress                                                  instantiationBoundingBoxLimit;
    } VkClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV;

- `clusterID` is a user specified identifier assigned to this cluster template.

- `clusterFlags` is a bitmask of VkClusterAccelerationStructureClusterFlagBitsNV values describing flags how the cluster template should be built.

- `triangleCount` is the number of triangles in this cluster.

- `vertexCount` is the number of unique vertices in this cluster.

- `positionTruncateBitCount` is the number of bits starting at the lowest bit (i.e. the LSBs of the mantissa), of each vertex position that will be truncated to zero to improve floating-point compression.

- `indexType` is a single VkClusterAccelerationStructureIndexFormatFlagBitsNV value specifying the index type in `indexBuffer`.

- `opacityMicromapIndexType` is a single VkClusterAccelerationStructureIndexFormatFlagBitsNV value specifying the index type in `opacityMicromapIndexBuffer`.

- `baseGeometryIndexAndGeometryFlags` is a VkClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV value specifying the base geometry index and flags for all triangles in the cluster template.

- `indexBufferStride` is the stride in bytes in `indexBuffer`.

- `vertexBufferStride` is the stride in bytes in `vertexBuffer`.

- `geometryIndexAndFlagsBufferStride` is the stride in bytes in `geometryIndexAndFlagsBuffer`.

- `opacityMicromapIndexBufferStride` is the stride in bytes in `opacityMicromapIndexBuffer`.

- `indexBuffer` contains the indices of vertices in the cluster and is of type `indexType`.

- `vertexBuffer` is either `0` or specifies the vertex data of the triangles in the cluster template with format specified in VkClusterAccelerationStructureTriangleClusterInputNV::`vertexFormat`.

- `geometryIndexAndFlagsBuffer` is either `0` or an address containing strided VkClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV values specifying the geometry index and flag for every triangle in the cluster.

- `opacityMicromapArray` is either `0` or specifies the address of a valid opacity micromap array to reference from the cluster acceleration structure. If it is `0`, then opacity micromaps will be disabled for this cluster acceleration structure.

- `opacityMicromapIndexBuffer` is either `0` or specifies the address of a strided array with size equal to the number of triangles or indices into the opacity micromap array. If `opacityMicromapIndexBuffer` is `0` then the index used is the index of the triangle in the geometry.

- `instantiationBoundingBoxLimit` is either `0` or specifies the address of a bounding box within which all instantiated clusters must lie. The bounding box is specified by six 32-bit floating-point values in the order MinX, MinY, MinZ, MaxX, MaxY, MaxZ.

The C language specification does not define the ordering of bit-fields, but in practice, this structure produces the correct layout with existing compilers. The intended bit pattern is the following:

- `triangleCount`, `vertexCount`, `positionTruncateBitCount`, `indexType` and `opacityMicromapIndexType` occupy the same memory as if a single `uint32_t` was specified in their place

  - `triangleCount` occupies the 9 least significant bits of that memory

  - `vertexCount` occupies the next 9 least significant bits of that memory

  - `positionTruncateBitCount` occupies the next 6 least significant bits of that memory

  - `indexType` occupies the next 4 least significant bits of that memory

  - `opacityMicromapIndexType` occupies the 4 most significant bits of that memory

If a compiler produces code that diverges from that pattern, applications must employ another method to set values according to the correct bit pattern.

Cluster templates cannot be directly used to build bottom level acceleration structures, instead, they must be instantiated into CLAS objects.

Valid Usage

- VUID-VkClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV-clusterID-10497
  `clusterID` must not be 0xFFFFFFFF

- VUID-VkClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV-triangleCount-10498
  `triangleCount` must be less than or equal to VkPhysicalDeviceClusterAccelerationStructurePropertiesNV::`maxTrianglesPerCluster`

- VUID-VkClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV-vertexCount-10499
  `vertexCount` must be less than or equal to VkPhysicalDeviceClusterAccelerationStructurePropertiesNV::`maxVerticesPerCluster`

- VUID-VkClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV-indexType-10500
  `indexType` must only have a single bit set

- VUID-VkClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV-opacityMicromapIndexType-10501
  `opacityMicromapIndexType` must only have a single bit set

- VUID-VkClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV-positionTruncateBitCount-10502
  `positionTruncateBitCount` must be greater than or equal to VkClusterAccelerationStructureTriangleClusterInputNV::`minPositionTruncateBitCount` and less than or equal to `32`

- VUID-VkClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV-indexBufferStride-10503
  `indexBufferStride` must be `0` or a multiple of `indexType`

- VUID-VkClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV-vertexBufferStride-10504
  `vertexBufferStride` must be `0` or a multiple of value specified in VkClusterAccelerationStructureTriangleClusterInputNV::`vertexFormat`

- VUID-VkClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV-instantiationBoundingBoxLimit-10505
  `instantiationBoundingBoxLimit` must be aligned to VkPhysicalDeviceClusterAccelerationStructurePropertiesNV::`clusterTemplateBoundsByteAlignment`

- VUID-VkClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV-baseGeometryIndex-10506
  The maximum geometry index after using the values in `baseGeometryIndex` and `geometryIndexBuffer` must be less than VkPhysicalDeviceClusterAccelerationStructurePropertiesNV::`maxClusterGeometryIndex`

- VUID-VkClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV-opacityMicromapArray-10882
  If `opacityMicromapArray` is not `0`, then the template cluster acceleration structure must have been built with VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_CLUSTER_OPACITY_MICROMAPS_BIT_NV flag set in VkClusterAccelerationStructureInputInfoNV::`flags`

Valid Usage (Implicit)

- VUID-VkClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV-clusterFlags-parameter
  `clusterFlags` must be a valid combination of VkClusterAccelerationStructureClusterFlagBitsNV values

- VUID-VkClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV-indexBuffer-parameter
  `indexBuffer` must be a valid VkDeviceAddress value

- VUID-VkClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV-vertexBuffer-parameter
  If `vertexBuffer` is not `0`, `vertexBuffer` must be a valid VkDeviceAddress value

- VUID-VkClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV-geometryIndexAndFlagsBuffer-parameter
  If `geometryIndexAndFlagsBuffer` is not `0`, `geometryIndexAndFlagsBuffer` must be a valid VkDeviceAddress value

- VUID-VkClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV-opacityMicromapArray-parameter
  If `opacityMicromapArray` is not `0`, `opacityMicromapArray` must be a valid VkDeviceAddress value

- VUID-VkClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV-opacityMicromapIndexBuffer-parameter
  If `opacityMicromapIndexBuffer` is not `0`, `opacityMicromapIndexBuffer` must be a valid VkDeviceAddress value

- VUID-VkClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV-instantiationBoundingBoxLimit-parameter
  If `instantiationBoundingBoxLimit` is not `0`, `instantiationBoundingBoxLimit` must be a valid VkDeviceAddress value

The VkClusterAccelerationStructureInstantiateClusterInfoNV structure is defined as:

    // Provided by VK_NV_cluster_acceleration_structure
    typedef struct VkClusterAccelerationStructureInstantiateClusterInfoNV {
        uint32_t                    clusterIdOffset;
        uint32_t                    geometryIndexOffset:24;
        uint32_t                    reserved:8;
        VkDeviceAddress             clusterTemplateAddress;
        VkStridedDeviceAddressNV    vertexBuffer;
    } VkClusterAccelerationStructureInstantiateClusterInfoNV;

- `clusterIdOffset` is an unsigned offset applied to the `clusterID` value stored in the cluster template.

- `geometryIndexOffset` is a signed offset applied to the geometry index of each triangle.

- `reserved` is reserved for future use.

- `clusterTemplateAddress` is the address of a previously built cluster template.

- `vertexBuffer` is a VkStridedDeviceAddressNV structure containing the vertex data for the indexed triangles stored in the cluster template. If the address in VkStridedDeviceAddressNV is `0` the vertex data is sourced from the cluster template.

Valid Usage

- VUID-VkClusterAccelerationStructureInstantiateClusterInfoNV-vertexBuffer-10507
  `vertexBuffer` must not be `0` if the template was built without vertex data

- VUID-VkClusterAccelerationStructureInstantiateClusterInfoNV-vertexBuffer-10508
  The format in `vertexBuffer` must match the original format specified in VkClusterAccelerationStructureTriangleClusterInputNV

- VUID-VkClusterAccelerationStructureInstantiateClusterInfoNV-reserved-10509
  `reserved` must be `0`

- VUID-VkClusterAccelerationStructureInstantiateClusterInfoNV-geometryIndexOffset-10510
  The maximum geometry index after using the value in `geometryIndexOffset` must be less than VkPhysicalDeviceClusterAccelerationStructurePropertiesNV::`maxClusterGeometryIndex`

Valid Usage (Implicit)

- VUID-VkClusterAccelerationStructureInstantiateClusterInfoNV-clusterTemplateAddress-parameter
  `clusterTemplateAddress` must be a valid VkDeviceAddress value

The VkClusterAccelerationStructureGetTemplateIndicesInfoNV structure is defined as:

    // Provided by VK_NV_cluster_acceleration_structure
    typedef struct VkClusterAccelerationStructureGetTemplateIndicesInfoNV {
        VkDeviceAddress    clusterTemplateAddress;
    } VkClusterAccelerationStructureGetTemplateIndicesInfoNV;

- `clusterTemplateAddress` is the device address of the cluster template acceleration structure whose index data is being fetched.

Valid Usage

- VUID-VkClusterAccelerationStructureGetTemplateIndicesInfoNV-clusterTemplateAddress-10833
  `clusterTemplateAddress` must be a template cluster acceleration structure

Valid Usage (Implicit)

- VUID-VkClusterAccelerationStructureGetTemplateIndicesInfoNV-clusterTemplateAddress-parameter
  `clusterTemplateAddress` must be a valid VkDeviceAddress value

The VkStridedDeviceAddressNV structure is defined as:

    // Provided by VK_NV_cluster_acceleration_structure
    typedef struct VkStridedDeviceAddressNV {
        VkDeviceAddress    startAddress;
        VkDeviceSize       strideInBytes;
    } VkStridedDeviceAddressNV;

- `startAddress` is the device address (as returned by the vkGetBufferDeviceAddress command) at which the region starts, or zero if the region is unused.

- `strideInBytes` is the byte stride between consecutive elements. Only the bottom 32 bits are used. The field is 64 bits to ensure consistent alignment across all containing structures.

Valid Usage (Implicit)

- VUID-VkStridedDeviceAddressNV-startAddress-parameter
  `startAddress` must be a valid VkDeviceAddress value

### 43.3. Partitioned Top Level Acceleration Structures

Partitioned Top Level Acceleration Structures (PTLAS) allow efficient reuse of previously constructed sections of the top level acceleration structure by eliminating a full rebuild when only a few instances are modified. This reduces build times and supports handling a higher number of instances, making it more suitable for large and complex scenes.

PTLAS organizes instances into partitions, enabling a two-stage build process: first, it constructs an acceleration structure for each partition by grouping the instances within it, and second, it combines these partition structures into a single acceleration structure, similar to the current top-level acceleration structure.

To maintain compatibility, PTLAS behaves identically to the current top-level acceleration structure from the perspective of ray tracing shaders and pipelines.

PTLAS includes a unique global partition that operates independently of other partitions. Instances can be assigned to this global partition just like they would to regular partitions. The global partition is well-suited for frequently updated instances, such as animated characters. During the build process, instances in the global partition are treated as if they belong to individual partitions, without increasing the maximum partition count. However, instances in the global partition may still impact build performance. Once these instances become stable, they should be moved to a spatially optimized, non-global partition to lower build costs and minimize trace performance issues.

To handle large worlds requiring more precision than 32-bit floating-point numbers offer, PTLAS offers efficient partition translation. Typically, applications maintain precision by placing the world center near the camera. Partition translation allows an additional translation of instances during construction without changing their stored transforms. This method stores instance transforms relative to partitions, applying a translation to achieve accurate world positions. Higher precision is maintained using smaller floating-point numbers until the structure is built. World space coordinates can also be updated efficiently without rebuilding the entire PTLAS. Partition translation requires extra memory for untranslated instance transforms and must be explicitly enabled with VkPartitionedAccelerationStructureFlagsNV::`enablePartitionTranslation` flag.

To determine the memory requirements for a PTAS, call:

    // Provided by VK_NV_partitioned_acceleration_structure
    void vkGetPartitionedAccelerationStructuresBuildSizesNV(
        VkDevice                                    device,
        const VkPartitionedAccelerationStructureInstancesInputNV* pInfo,
        VkAccelerationStructureBuildSizesInfoKHR*   pSizeInfo);

- `device` is the logical device that owns the acceleration structure.

- `pInfo` is a pointer to a VkPartitionedAccelerationStructureInstancesInputNV structure containing parameters required for the memory requirements query.

- `pSizeInfo` is a pointer to a VkAccelerationStructureBuildSizesInfoKHR structure which returns the size required for an acceleration structure and the sizes required for the scratch buffers, given the build parameters. The size requirements for a scratch buffer may be zero.

Valid Usage

- VUID-vkGetPartitionedAccelerationStructuresBuildSizesNV-partitionedAccelerationStructure-10534
  The `VkPhysicalDevicePartitionedAccelerationStructureFeaturesNV`::`partitionedAccelerationStructure` feature must be enabled

Valid Usage (Implicit)

- VUID-vkGetPartitionedAccelerationStructuresBuildSizesNV-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetPartitionedAccelerationStructuresBuildSizesNV-pInfo-parameter
  `pInfo` must be a valid pointer to a valid VkPartitionedAccelerationStructureInstancesInputNV structure

- VUID-vkGetPartitionedAccelerationStructuresBuildSizesNV-pSizeInfo-parameter
  `pSizeInfo` must be a valid pointer to a VkAccelerationStructureBuildSizesInfoKHR structure

The VkPartitionedAccelerationStructureInstancesInputNV structure is defined as:

    // Provided by VK_NV_partitioned_acceleration_structure
    typedef struct VkPartitionedAccelerationStructureInstancesInputNV {
        VkStructureType                         sType;
        void*                                   pNext;
        VkBuildAccelerationStructureFlagsKHR    flags;
        uint32_t                                instanceCount;
        uint32_t                                maxInstancePerPartitionCount;
        uint32_t                                partitionCount;
        uint32_t                                maxInstanceInGlobalPartitionCount;
    } VkPartitionedAccelerationStructureInstancesInputNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask of VkBuildAccelerationStructureFlagsKHR specifying flags for the PTLAS build operation.

- `instanceCount` is the number of instances in this PTLAS.

- `maxInstancePerPartitionCount` is the maximum number of instances per partition in the PTLAS.

- `partitionCount` is the number of partitions in the PTLAS.

- `maxInstanceInGlobalPartitionCount` is maximum number of instances in the global partition.

If the `pNext` chain includes a VkPartitionedAccelerationStructureFlagsNV structure, then that structure specifies additional flags for the PTLAS.

Valid Usage

- VUID-VkPartitionedAccelerationStructureInstancesInputNV-partitionCount-10535
  The sum of `partitionCount` and `maxInstanceInGlobalPartitionCount` must be less than or equal to VkPhysicalDevicePartitionedAccelerationStructurePropertiesNV::`maxPartitionCount`

Valid Usage (Implicit)

- VUID-VkPartitionedAccelerationStructureInstancesInputNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PARTITIONED_ACCELERATION_STRUCTURE_INSTANCES_INPUT_NV

- VUID-VkPartitionedAccelerationStructureInstancesInputNV-pNext-pNext
  `pNext` must be `NULL` or a pointer to a valid instance of VkPartitionedAccelerationStructureFlagsNV

- VUID-VkPartitionedAccelerationStructureInstancesInputNV-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkPartitionedAccelerationStructureInstancesInputNV-flags-parameter
  `flags` must be a valid combination of VkBuildAccelerationStructureFlagBitsKHR values

The VkPartitionedAccelerationStructureFlagsNV structure is defined as:

    // Provided by VK_NV_partitioned_acceleration_structure
    typedef struct VkPartitionedAccelerationStructureFlagsNV {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           enablePartitionTranslation;
    } VkPartitionedAccelerationStructureFlagsNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `enablePartitionTranslation` specifies if a partition translation may be applied with VkPartitionedAccelerationStructureWritePartitionTranslationDataNV.

Valid Usage (Implicit)

- VUID-VkPartitionedAccelerationStructureFlagsNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PARTITIONED_ACCELERATION_STRUCTURE_FLAGS_NV

Structure Chaining

Extends the structure

  - VkPartitionedAccelerationStructureInstancesInputNV

To build a partitioned top level acceleration structure, call:

    // Provided by VK_NV_partitioned_acceleration_structure
    void vkCmdBuildPartitionedAccelerationStructuresNV(
        VkCommandBuffer                             commandBuffer,
        const VkBuildPartitionedAccelerationStructureInfoNV* pBuildInfo);

- `commandBuffer` is the command buffer into which the command is recorded.

- `pBuildInfo` is a pointer to a VkBuildPartitionedAccelerationStructureInfoNV structure containing parameters required for building a PTLAS.

Accesses to the acceleration structure scratch memory as identified by the VkBuildPartitionedAccelerationStructureInfoNV::`scratchData` must be synchronized with the VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR pipeline stage and an access type of (VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR | VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_KHR).

Accesses to each VkBuildPartitionedAccelerationStructureInfoNV::`srcAccelerationStructureData` and VkBuildPartitionedAccelerationStructureInfoNV::`dstAccelerationStructureData` must be synchronized with the VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR pipeline stage and an access type of VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR or VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_KHR, as appropriate.

Accesses to memory with input data as identified by any used values of VkBuildPartitionedAccelerationStructureInfoNV::`srcInfos` and VkBuildPartitionedAccelerationStructureInfoNV::`srcInfosCount` must be synchronized with the VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR pipeline stage and an access type of VK_ACCESS_INDIRECT_COMMAND_READ_BIT.

Valid Usage

- VUID-vkCmdBuildPartitionedAccelerationStructuresNV-partitionedAccelerationStructure-10536
  The `VkPhysicalDevicePartitionedAccelerationStructureFeaturesNV`::`partitionedAccelerationStructure` feature must be enabled

- VUID-vkCmdBuildPartitionedAccelerationStructuresNV-pBuildInfo-10537
  The count specified in `pBuildInfo->input.instanceCount` for the build operation must not exceed the value provided in `pInfo->instanceCount` when calling vkGetPartitionedAccelerationStructuresBuildSizesNV to determine the memory size

- VUID-vkCmdBuildPartitionedAccelerationStructuresNV-pBuildInfo-10538
  The count specified in `pBuildInfo->input.maxInstancePerPartitionCount` for the build operation must not exceed the value provided in `pInfo->maxInstancePerPartitionCount` when calling vkGetPartitionedAccelerationStructuresBuildSizesNV to determine the memory size

- VUID-vkCmdBuildPartitionedAccelerationStructuresNV-pBuildInfo-10539
  The count specified in `pBuildInfo->input.partitionCount` for the build operation must not exceed the value provided in `pInfo->partitionCount` when calling vkGetPartitionedAccelerationStructuresBuildSizesNV to determine the memory size

- VUID-vkCmdBuildPartitionedAccelerationStructuresNV-pBuildInfo-10540
  The count specified in `pBuildInfo->input.maxInstanceInGlobalPartitionCount` for the build operation must not exceed the value provided in `pInfo->maxInstanceInGlobalPartitionCount` when calling vkGetPartitionedAccelerationStructuresBuildSizesNV to determine the memory size

- VUID-vkCmdBuildPartitionedAccelerationStructuresNV-pBuildInfo-10541
  The scratch memory for the partitioned acceleration structure build specified in `pBuildInfo->scratchData` must be larger than or equal to the scratch size queried with vkGetPartitionedAccelerationStructuresBuildSizesNV

- VUID-vkCmdBuildPartitionedAccelerationStructuresNV-pBuildInfo-10542
  `pBuildInfo->scratchData` must be aligned to `256` bytes

- VUID-vkCmdBuildPartitionedAccelerationStructuresNV-pBuildInfo-10543
  The destination memory of the partitioned acceleration structure build specified in `pBuildInfo->dstAccelerationStructureData` must be larger than or equal to the size queried with vkGetPartitionedAccelerationStructuresBuildSizesNV

- VUID-vkCmdBuildPartitionedAccelerationStructuresNV-pBuildInfo-10544
  `pBuildInfo->srcAccelerationStructureData` must be aligned to `256` bytes

- VUID-vkCmdBuildPartitionedAccelerationStructuresNV-pBuildInfo-10545
  `pBuildInfo->dstAccelerationStructureData` must be aligned to `256` bytes

- VUID-vkCmdBuildPartitionedAccelerationStructuresNV-pBuildInfo-10546
  The number of inputs specified in `pBuildInfo->srcInfos` must be greater than or equal to `pBuildInfo->srcInfosCount`

- VUID-vkCmdBuildPartitionedAccelerationStructuresNV-pBuildInfo-10547
  The memory region containing the acceleration structure at address `pBuildInfo->srcAccelerationStructureData` must not overlap with scratch memory region at address `pBuildInfo->scratchData`

- VUID-vkCmdBuildPartitionedAccelerationStructuresNV-pBuildInfo-10548
  The memory region containing the acceleration structure at address `pBuildInfo->dstAccelerationStructureData` must not overlap with scratch memory region at address `pBuildInfo->scratchData`

- VUID-vkCmdBuildPartitionedAccelerationStructuresNV-pBuildInfo-10549
  If the source and destination acceleration structures are not the same, the memory regions containing the acceleration structures at addresses `pBuildInfo->srcAccelerationStructureData` and `pBuildInfo->dstAccelerationStructureData` must not overlap with each other

- VUID-vkCmdBuildPartitionedAccelerationStructuresNV-pBuildInfo-10550
  `pBuildInfo->scratchData` must be a device address allocated to the application from a buffer created with the VK_BUFFER_USAGE_STORAGE_BUFFER_BIT usage flag set

- VUID-vkCmdBuildPartitionedAccelerationStructuresNV-pBuildInfo-10551
  `pBuildInfo->srcInfos` and `pBuildInfo->srcInfosCount` must be device addresses allocated to the application from buffers created with the VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_BUILD_INPUT_READ_ONLY_BIT_KHR usage flag set

- VUID-vkCmdBuildPartitionedAccelerationStructuresNV-pBuildInfo-10552
  `pBuildInfo->srcAccelerationStructureData` and `pBuildInfo->dstAccelerationStructureData` must be a device addresses allocated to the application from buffers created with the VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_STORAGE_BIT_KHR usage flag set

Valid Usage (Implicit)

- VUID-vkCmdBuildPartitionedAccelerationStructuresNV-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdBuildPartitionedAccelerationStructuresNV-pBuildInfo-parameter
  `pBuildInfo` must be a valid pointer to a valid VkBuildPartitionedAccelerationStructureInfoNV structure

- VUID-vkCmdBuildPartitionedAccelerationStructuresNV-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdBuildPartitionedAccelerationStructuresNV-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT operations

- VUID-vkCmdBuildPartitionedAccelerationStructuresNV-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdBuildPartitionedAccelerationStructuresNV-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdBuildPartitionedAccelerationStructuresNV-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Outside | VK_QUEUE_COMPUTE_BIT | Action

Conditional Rendering

vkCmdBuildPartitionedAccelerationStructuresNV is not affected by conditional rendering

The VkBuildPartitionedAccelerationStructureInfoNV structure is defined as:

    // Provided by VK_NV_partitioned_acceleration_structure
    typedef struct VkBuildPartitionedAccelerationStructureInfoNV {
        VkStructureType                                       sType;
        void*                                                 pNext;
        VkPartitionedAccelerationStructureInstancesInputNV    input;
        VkDeviceAddress                                       srcAccelerationStructureData;
        VkDeviceAddress                                       dstAccelerationStructureData;
        VkDeviceAddress                                       scratchData;
        VkDeviceAddress                                       srcInfos;
        VkDeviceAddress                                       srcInfosCount;
    } VkBuildPartitionedAccelerationStructureInfoNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `input` is a VkPartitionedAccelerationStructureInstancesInputNV structure describing the instance and partition count information in the PTLAS.

- `srcAccelerationStructureData` is `NULL` or an address of a previously built PTLAS. If non-`NULL`, the PTLAS stored at this address is used as a basis to create new PTLAS.

- `dstAccelerationStructureData` is the address to store the built PTLAS.

- `scratchData` is the device address of scratch memory that will be used during PTLAS build.

- `srcInfos` is the device address of an array of VkBuildPartitionedAccelerationStructureIndirectCommandNV structures describing the type of operation to perform.

- `srcInfosCount` is a device address containing the size of `srcInfos` array.

Members `srcAccelerationStructureData` and `dstAccelerationStructureData` may be the same or different. If they are the same, the update happens in-place. Otherwise, the destination acceleration structure is updated and the source is not modified.

Valid Usage

- VUID-VkBuildPartitionedAccelerationStructureInfoNV-scratchData-10558
  If the `buildScratchSize` member of the VkAccelerationStructureBuildSizesInfoKHR structure returned from a call to vkGetPartitionedAccelerationStructuresBuildSizesNV is not `0`, then `scratchData` must be a valid VkDeviceAddress

- VUID-VkBuildPartitionedAccelerationStructureInfoNV-scratchData-10559
  Memory at `scratchData` must be equal or larger than the VkAccelerationStructureBuildSizesInfoKHR::`buildScratchSize` value returned from vkGetPartitionedAccelerationStructuresBuildSizesNV with the same build parameters

- VUID-VkBuildPartitionedAccelerationStructureInfoNV-srcAccelerationStructureData-10560
  If `srcAccelerationStructureData` is not `NULL`, it must have previously been built as a PTLAS

- VUID-VkBuildPartitionedAccelerationStructureInfoNV-dstAccelerationStructureData-10562
  Memory at `dstAccelerationStructureData` must be equal or larger than the VkAccelerationStructureBuildSizesInfoKHR::`accelerationStructureSize` value returned from vkGetPartitionedAccelerationStructuresBuildSizesNV with the same build parameters

- VUID-VkBuildPartitionedAccelerationStructureInfoNV-srcInfosCount-10563
  `srcInfosCount` must be 4-byte aligned

- VUID-VkBuildPartitionedAccelerationStructureInfoNV-srcInfos-10564
  Each element of `srcInfos` array must have a unique VkBuildPartitionedAccelerationStructureIndirectCommandNV::`opType`

Valid Usage (Implicit)

- VUID-VkBuildPartitionedAccelerationStructureInfoNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_BUILD_PARTITIONED_ACCELERATION_STRUCTURE_INFO_NV

- VUID-VkBuildPartitionedAccelerationStructureInfoNV-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkBuildPartitionedAccelerationStructureInfoNV-input-parameter
  `input` must be a valid VkPartitionedAccelerationStructureInstancesInputNV structure

- VUID-VkBuildPartitionedAccelerationStructureInfoNV-srcAccelerationStructureData-parameter
  If `srcAccelerationStructureData` is not `0`, `srcAccelerationStructureData` must be a valid VkDeviceAddress value

- VUID-VkBuildPartitionedAccelerationStructureInfoNV-dstAccelerationStructureData-parameter
  `dstAccelerationStructureData` must be a valid VkDeviceAddress value

- VUID-VkBuildPartitionedAccelerationStructureInfoNV-srcInfos-parameter
  `srcInfos` must be a valid VkDeviceAddress value

- VUID-VkBuildPartitionedAccelerationStructureInfoNV-srcInfosCount-parameter
  `srcInfosCount` must be a valid VkDeviceAddress value

The VkBuildPartitionedAccelerationStructureIndirectCommandNV structure is defined as:

    // Provided by VK_NV_partitioned_acceleration_structure
    typedef struct VkBuildPartitionedAccelerationStructureIndirectCommandNV {
        VkPartitionedAccelerationStructureOpTypeNV    opType;
        uint32_t                                      argCount;
        VkStridedDeviceAddressNV                      argData;
    } VkBuildPartitionedAccelerationStructureIndirectCommandNV;

- `opType` is a VkPartitionedAccelerationStructureOpTypeNV describing the type of operation.

- `argCount` the number of structures in `argData` array.

- `argData` is an array of VkStridedDeviceAddressNV structures containing the write or update data for instances and partitions in the PTLAS. The structure is dependent on `opType` as shown in the table below.

`opType` | Format of `argData`
VK_PARTITIONED_ACCELERATION_STRUCTURE_OP_TYPE_WRITE_INSTANCE_NV | VkPartitionedAccelerationStructureWriteInstanceDataNV
VK_PARTITIONED_ACCELERATION_STRUCTURE_OP_TYPE_UPDATE_INSTANCE_NV | VkPartitionedAccelerationStructureUpdateInstanceDataNV
VK_PARTITIONED_ACCELERATION_STRUCTURE_OP_TYPE_WRITE_PARTITION_TRANSLATION_NV | VkPartitionedAccelerationStructureWritePartitionTranslationDataNV

Valid Usage

- VUID-VkBuildPartitionedAccelerationStructureIndirectCommandNV-argData-10565
  An instance index must not be referenced by more than one structure in `argData`

Valid Usage (Implicit)

- VUID-VkBuildPartitionedAccelerationStructureIndirectCommandNV-opType-parameter
  `opType` must be a valid VkPartitionedAccelerationStructureOpTypeNV value

Values which can be set in VkPartitionedAccelerationStructureOpTypeNV are:

    // Provided by VK_NV_partitioned_acceleration_structure
    typedef enum VkPartitionedAccelerationStructureOpTypeNV {
        VK_PARTITIONED_ACCELERATION_STRUCTURE_OP_TYPE_WRITE_INSTANCE_NV = 0,
        VK_PARTITIONED_ACCELERATION_STRUCTURE_OP_TYPE_UPDATE_INSTANCE_NV = 1,
        VK_PARTITIONED_ACCELERATION_STRUCTURE_OP_TYPE_WRITE_PARTITION_TRANSLATION_NV = 2,
    } VkPartitionedAccelerationStructureOpTypeNV;

- VK_PARTITIONED_ACCELERATION_STRUCTURE_OP_TYPE_WRITE_INSTANCE_NV is used to assign a transformed bottom level acceleration structure to an instance and partition. This is similar to VkAccelerationStructureInstanceKHR that defines the properties and transformations for a single instance in non-partitioned TLAS. Any partition that contains at least one of the affected instances will have their internal acceleration structure rebuilt.

- VK_PARTITIONED_ACCELERATION_STRUCTURE_OP_TYPE_UPDATE_INSTANCE_NV specifies that an instance will be updated with a new bottom level acceleration structure.

- VK_PARTITIONED_ACCELERATION_STRUCTURE_OP_TYPE_WRITE_PARTITION_TRANSLATION_NV specifies that a partition will be assigned a translation vector.

The VkPartitionedAccelerationStructureWriteInstanceDataNV structure is defined as:

    // Provided by VK_NV_partitioned_acceleration_structure
    typedef struct VkPartitionedAccelerationStructureWriteInstanceDataNV {
        VkTransformMatrixKHR                                 transform;
        float                                                explicitAABB[6];
        uint32_t                                             instanceID;
        uint32_t                                             instanceMask;
        uint32_t                                             instanceContributionToHitGroupIndex;
        VkPartitionedAccelerationStructureInstanceFlagsNV    instanceFlags;
        uint32_t                                             instanceIndex;
        uint32_t                                             partitionIndex;
        VkDeviceAddress                                      accelerationStructure;
    } VkPartitionedAccelerationStructureWriteInstanceDataNV;

- `transform` is a VkTransformMatrixKHR structure describing the transformation to be applied to the instance in PTLAS.

- `explicitAABB` specifies an axis aligned bounding box representing the maximum extent of any vertex within the used acceleration structure after applying the instance-to-world transformation. The partition translation is not applied to the bounding box.

- `instanceID` is a user specified constant assigned to an instance in the PTLAS.

- `instanceMask` is a 8-bit mask assigned to the instance that may be used to include or reject group of instances.

- `instanceContributionToHitGroupIndex` is a 24-bit per application specified instance value added in the indexing into the shader binding table to fetch the hit group to use.

- `instanceFlags` is a bitmask of VkPartitionedAccelerationStructureInstanceFlagsNV specifying flags an instance in the PTLAS.

- `instanceIndex` is the index of the instance within the PTLAS.

- `partitionIndex` is the index of the partition to which this instance belongs. Global partitions are referred to by VK_PARTITIONED_ACCELERATION_STRUCTURE_PARTITION_INDEX_GLOBAL_NV.

- `accelerationStructure` is the device address of the bottom level acceleration structure or a clustered bottom level acceleration structure that is being instanced. This instance is disabled if the device address is `0`.

Valid Usage

- VUID-VkPartitionedAccelerationStructureWriteInstanceDataNV-instanceMask-10566
  The most significant 24 bits of `instanceMask` must be `0`

- VUID-VkPartitionedAccelerationStructureWriteInstanceDataNV-instanceContributionToHitGroupIndex-10567
  The most significant 8 bits of `instanceContributionToHitGroupIndex` must be `0`

- VUID-VkPartitionedAccelerationStructureWriteInstanceDataNV-instanceIndex-10568
  `instanceIndex` must be less than VkBuildPartitionedAccelerationStructureInfoNV::`input.instanceCount`

- VUID-VkPartitionedAccelerationStructureWriteInstanceDataNV-partitionIndex-10569
  `partitionIndex` must be less than VkBuildPartitionedAccelerationStructureInfoNV::`input.partitionCount`

- VUID-VkPartitionedAccelerationStructureWriteInstanceDataNV-explicitAABB-10570
  `explicitAABB` must be a valid bounding box if instance was created with flag VK_PARTITIONED_ACCELERATION_STRUCTURE_INSTANCE_FLAG_ENABLE_EXPLICIT_BOUNDING_BOX_NV set

Valid Usage (Implicit)

- VUID-VkPartitionedAccelerationStructureWriteInstanceDataNV-instanceFlags-parameter
  `instanceFlags` must be a valid combination of VkPartitionedAccelerationStructureInstanceFlagBitsNV values

- VUID-VkPartitionedAccelerationStructureWriteInstanceDataNV-accelerationStructure-parameter
  `accelerationStructure` must be a valid VkDeviceAddress value

VK_PARTITIONED_ACCELERATION_STRUCTURE_PARTITION_INDEX_GLOBAL_NV is a special constant value used for partitioned acceleration structures to specify global partitions.

    #define VK_PARTITIONED_ACCELERATION_STRUCTURE_PARTITION_INDEX_GLOBAL_NV (~0U)

The VkPartitionedAccelerationStructureUpdateInstanceDataNV structure is defined as:

    // Provided by VK_NV_partitioned_acceleration_structure
    typedef struct VkPartitionedAccelerationStructureUpdateInstanceDataNV {
        uint32_t           instanceIndex;
        uint32_t           instanceContributionToHitGroupIndex;
        VkDeviceAddress    accelerationStructure;
    } VkPartitionedAccelerationStructureUpdateInstanceDataNV;

- `instanceIndex` is the index of the instance being updated.

- `instanceContributionToHitGroupIndex` is a 24-bit per instance value added in the indexing into the shader binding table to fetch the hit group to use.

- `accelerationStructure` is the device address of the bottom level acceleration structure or a clustered bottom level acceleration structure whose instance is being updated. The instance is disabled if the device address is `0`.

If the instance was originally disabled by specifying a `0` in VkPartitionedAccelerationStructureWriteInstanceDataNV::`accelerationStructure`, it can not be updated to a new acceleration structure as the instance may have been permanently disabled by the implementation.

To avoid a refit, the new acceleration structure must be within the bounding box specified by VkPartitionedAccelerationStructureWriteInstanceDataNV::`explicitAABB` when the instance was first created.

Valid Usage

- VUID-VkPartitionedAccelerationStructureUpdateInstanceDataNV-instanceContributionToHitGroupIndex-10571
  The most significant 8 bits of `instanceContributionToHitGroupIndex` must be `0`

- VUID-VkPartitionedAccelerationStructureUpdateInstanceDataNV-None-10572
  The instance must have either been created with flag VK_PARTITIONED_ACCELERATION_STRUCTURE_INSTANCE_FLAG_ENABLE_EXPLICIT_BOUNDING_BOX_NV or did not have an acceleration structure assigned with VkPartitionedAccelerationStructureWriteInstanceDataNV

- VUID-VkPartitionedAccelerationStructureUpdateInstanceDataNV-instanceIndex-10573
  `instanceIndex` must be less than VkBuildPartitionedAccelerationStructureInfoNV::`input.instanceCount`

Valid Usage (Implicit)

- VUID-VkPartitionedAccelerationStructureUpdateInstanceDataNV-accelerationStructure-parameter
  `accelerationStructure` must be a valid VkDeviceAddress value

Bits which can be set in VkPartitionedAccelerationStructureWriteInstanceDataNV::`instanceFlags`, specifying flags for instances, are:

    // Provided by VK_NV_partitioned_acceleration_structure
    typedef enum VkPartitionedAccelerationStructureInstanceFlagBitsNV {
        VK_PARTITIONED_ACCELERATION_STRUCTURE_INSTANCE_FLAG_TRIANGLE_FACING_CULL_DISABLE_BIT_NV = 0x00000001,
        VK_PARTITIONED_ACCELERATION_STRUCTURE_INSTANCE_FLAG_TRIANGLE_FLIP_FACING_BIT_NV = 0x00000002,
        VK_PARTITIONED_ACCELERATION_STRUCTURE_INSTANCE_FLAG_FORCE_OPAQUE_BIT_NV = 0x00000004,
        VK_PARTITIONED_ACCELERATION_STRUCTURE_INSTANCE_FLAG_FORCE_NO_OPAQUE_BIT_NV = 0x00000008,
        VK_PARTITIONED_ACCELERATION_STRUCTURE_INSTANCE_FLAG_ENABLE_EXPLICIT_BOUNDING_BOX_NV = 0x00000010,
    } VkPartitionedAccelerationStructureInstanceFlagBitsNV;

- VK_PARTITIONED_ACCELERATION_STRUCTURE_INSTANCE_FLAG_TRIANGLE_FACING_CULL_DISABLE_BIT_NV disables face culling for this instance.

- VK_PARTITIONED_ACCELERATION_STRUCTURE_INSTANCE_FLAG_TRIANGLE_FLIP_FACING_BIT_NV specifies that the facing determination for geometry in this instance is inverted.

- VK_PARTITIONED_ACCELERATION_STRUCTURE_INSTANCE_FLAG_FORCE_OPAQUE_BIT_NV causes this instance to act as though VK_GEOMETRY_OPAQUE_BIT_KHR were specified on all geometries referenced by this instance.

- VK_PARTITIONED_ACCELERATION_STRUCTURE_INSTANCE_FLAG_FORCE_NO_OPAQUE_BIT_NV causes this instance to act as though VK_GEOMETRY_OPAQUE_BIT_KHR were not specified on all geometries referenced by this instance.

- VK_PARTITIONED_ACCELERATION_STRUCTURE_INSTANCE_FLAG_ENABLE_EXPLICIT_BOUNDING_BOX_NV enables use of an explicit bounding box for this instance.

    // Provided by VK_NV_partitioned_acceleration_structure
    typedef VkFlags VkPartitionedAccelerationStructureInstanceFlagsNV;

`VkPartitionedAccelerationStructureInstanceFlagsNV` is a bitmask type for setting a mask of zero or more VkPartitionedAccelerationStructureInstanceFlagBitsNV.

The VkPartitionedAccelerationStructureWritePartitionTranslationDataNV structure is defined as:

    // Provided by VK_NV_partitioned_acceleration_structure
    typedef struct VkPartitionedAccelerationStructureWritePartitionTranslationDataNV {
        uint32_t    partitionIndex;
        float       partitionTranslation[3];
    } VkPartitionedAccelerationStructureWritePartitionTranslationDataNV;

- `partitionIndex` is the index of partition to write. Global partition is referred to by VK_PARTITIONED_ACCELERATION_STRUCTURE_PARTITION_INDEX_GLOBAL_NV.

- `partitionTranslation` sets the translation vector for this partition. When tracing this partition, the contained instances will behave as if the partition translation was added to the translation component of the instance transform. This translation vector is also added to the instances in the partition that had their bounding box specified.

Valid Usage

- VUID-VkPartitionedAccelerationStructureWritePartitionTranslationDataNV-partitionIndex-10574
  `partitionIndex` must be less than VkBuildPartitionedAccelerationStructureInfoNV::`input.partitionCount`

- VUID-VkPartitionedAccelerationStructureWritePartitionTranslationDataNV-enablePartitionTranslation-10575
  The partitioned acceleration structure must have the VkPartitionedAccelerationStructureFlagsNV::`enablePartitionTranslation` flag set

### 43.4. Host Acceleration Structure Operations

Implementations are also required to provide host implementations of the acceleration structure operations if the `accelerationStructureHostCommands` feature is enabled:

- vkBuildAccelerationStructuresKHR corresponding to vkCmdBuildAccelerationStructuresKHR

- vkCopyAccelerationStructureKHR corresponding to vkCmdCopyAccelerationStructureKHR

- vkCopyAccelerationStructureToMemoryKHR corresponding to vkCmdCopyAccelerationStructureToMemoryKHR

- vkCopyMemoryToAccelerationStructureKHR corresponding to vkCmdCopyMemoryToAccelerationStructureKHR

- vkWriteAccelerationStructuresPropertiesKHR corresponding to vkCmdWriteAccelerationStructuresPropertiesKHR

These commands are functionally equivalent to their device counterparts, except that they are executed on the host timeline, rather than being enqueued into command buffers.

All acceleration structures used by the host commands must be bound to host-visible memory, and all input data for acceleration structure builds must be referenced using host addresses instead of device addresses. Applications are not required to map acceleration structure memory when using the host commands.

Note | The vkBuildAccelerationStructuresKHR and vkCmdBuildAccelerationStructuresKHR may use different algorithms, and thus are not required to produce identical structures. The structures produced by these two commands may exhibit different memory footprints or traversal performance, but should strive to be similar where possible. Apart from these details, the host and device operations are interchangeable. For example, an application can use vkBuildAccelerationStructuresKHR to build a structure, compact it on the device using vkCmdCopyAccelerationStructureKHR, and serialize the result using vkCopyAccelerationStructureToMemoryKHR. The exception to this are acceleration structures that are created with the VkAccelerationStructureCreateInfo2KHR command as they are backed by a VkDeviceAddress and therefore are not valid to be used with host commands.

Note | For efficient execution, acceleration structures manipulated using these commands should always be bound to host cached memory, as the implementation may need to repeatedly read and write this memory during the execution of the command.

To build acceleration structures on the host, call:

Warning | This functionality is superseded by vkCmdBuildAccelerationStructuresKHR. See Legacy Functionality for more information.

    // Provided by VK_KHR_acceleration_structure
    VkResult vkBuildAccelerationStructuresKHR(
        VkDevice                                    device,
        VkDeferredOperationKHR                      deferredOperation,
        uint32_t                                    infoCount,
        const VkAccelerationStructureBuildGeometryInfoKHR* pInfos,
        const VkAccelerationStructureBuildRangeInfoKHR* const* ppBuildRangeInfos);

- `device` is the `VkDevice` for which the acceleration structures are being built.

- `deferredOperation` is an optional VkDeferredOperationKHR to request deferral for this command.

- `infoCount` is the number of acceleration structures to build. It specifies the number of the `pInfos` structures and `ppBuildRangeInfos` pointers that must be provided.

- `pInfos` is a pointer to an array of `infoCount` VkAccelerationStructureBuildGeometryInfoKHR structures defining the geometry used to build each acceleration structure.

- `ppBuildRangeInfos` is a pointer to an array of `infoCount` pointers to arrays of VkAccelerationStructureBuildRangeInfoKHR structures. Each `ppBuildRangeInfos`[i] is a pointer to an array of `pInfos`[i].`geometryCount` VkAccelerationStructureBuildRangeInfoKHR structures defining dynamic offsets to the addresses where geometry data is stored, as defined by `pInfos`[i].

This command fulfills the same task as vkCmdBuildAccelerationStructuresKHR but is executed by the host.

The `vkBuildAccelerationStructuresKHR` command provides the ability to initiate multiple acceleration structures builds, however there is no ordering or synchronization implied between any of the individual acceleration structure builds.

Note | This means that an application cannot build a top-level acceleration structure in the same vkBuildAccelerationStructuresKHR call as the associated bottom-level or instance acceleration structures are being built. There also cannot be any memory aliasing between any acceleration structure memories or scratch memories being used by any of the builds.

Valid Usage

- VUID-vkBuildAccelerationStructuresKHR-accelerationStructureHostCommands-03581
  The `VkPhysicalDeviceAccelerationStructureFeaturesKHR`::`accelerationStructureHostCommands` feature must be enabled

- VUID-vkBuildAccelerationStructuresKHR-mode-04628
  The `mode` member of each element of `pInfos` must be a valid VkBuildAccelerationStructureModeKHR value

- VUID-vkBuildAccelerationStructuresKHR-srcAccelerationStructure-04629
  If the `srcAccelerationStructure` member of any element of `pInfos` is not VK_NULL_HANDLE, the `srcAccelerationStructure` member must be a valid VkAccelerationStructureKHR handle

- VUID-vkBuildAccelerationStructuresKHR-pInfos-04630
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, its `srcAccelerationStructure` member must not be VK_NULL_HANDLE

- VUID-vkBuildAccelerationStructuresKHR-pInfos-03708
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, `srcAccelerationStructure` must be fully backed by physical memory

- VUID-vkBuildAccelerationStructuresKHR-pInfos-03403
  The `srcAccelerationStructure` member of any element of `pInfos` must not be the same acceleration structure as the `dstAccelerationStructure` member of any other element of `pInfos`

- VUID-vkBuildAccelerationStructuresKHR-dstAccelerationStructure-03698
  The `dstAccelerationStructure` member of any element of `pInfos` must not be the same acceleration structure as the `dstAccelerationStructure` member of any other element of `pInfos`

- VUID-vkBuildAccelerationStructuresKHR-dstAccelerationStructure-03800
  The `dstAccelerationStructure` member of any element of `pInfos` must be a valid VkAccelerationStructureKHR handle

- VUID-vkBuildAccelerationStructuresKHR-pInfos-03707
  For each element of `pInfos`, its `dstAccelerationStructure` member must be fully backed by physical memory

- VUID-vkBuildAccelerationStructuresKHR-pInfos-03699
  For each element of `pInfos`, if its `type` member is VK_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR, its `dstAccelerationStructure` member must have been created with a value of VkAccelerationStructureCreateInfoKHR::`type` equal to either VK_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR or VK_ACCELERATION_STRUCTURE_TYPE_GENERIC_KHR

- VUID-vkBuildAccelerationStructuresKHR-pInfos-03700
  For each element of `pInfos`, if its `type` member is VK_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR, its `dstAccelerationStructure` member must have been created with a value of VkAccelerationStructureCreateInfoKHR::`type` equal to either VK_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR or VK_ACCELERATION_STRUCTURE_TYPE_GENERIC_KHR

- VUID-vkBuildAccelerationStructuresKHR-pInfos-03663
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, inactive primitives in its `srcAccelerationStructure` member must not be made active

- VUID-vkBuildAccelerationStructuresKHR-pInfos-03664
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, active primitives in its `srcAccelerationStructure` member must not be made inactive

- VUID-vkBuildAccelerationStructuresKHR-pInfos-03709
  For each element of `pInfos`, if an acceleration structure is referenced by the `geometry.instances.data` member of any element of `pGeometries` or `ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_INSTANCES_KHR, it must be fully backed by physical memory

- VUID-vkBuildAccelerationStructuresKHR-None-03407
  The `dstAccelerationStructure` member of any element of `pInfos` must not be referenced by the `geometry.instances.data` member of any element of `pGeometries` or `ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_INSTANCES_KHR in any other element of `pInfos`

- VUID-vkBuildAccelerationStructuresKHR-dstAccelerationStructure-03701
  The range of memory backing the `dstAccelerationStructure` member of any element of `pInfos` that is accessed by this command must not overlap the memory backing the `srcAccelerationStructure` member of any other element of `pInfos` with a `mode` equal to VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, which is accessed by this command

- VUID-vkBuildAccelerationStructuresKHR-dstAccelerationStructure-03702
  The range of memory backing the `dstAccelerationStructure` member of any element of `pInfos` that is accessed by this command must not overlap the memory backing the `dstAccelerationStructure` member of any other element of `pInfos`, which is accessed by this command

- VUID-vkBuildAccelerationStructuresKHR-dstAccelerationStructure-03703
  The range of memory backing the `dstAccelerationStructure` member of any element of `pInfos` that is accessed by this command must not overlap the memory backing the `scratchData` member of any element of `pInfos` (including the same element), which is accessed by this command

- VUID-vkBuildAccelerationStructuresKHR-scratchData-03704
  The range of memory backing the `scratchData` member of any element of `pInfos` that is accessed by this command must not overlap the memory backing the `scratchData` member of any other element of `pInfos`, which is accessed by this command

- VUID-vkBuildAccelerationStructuresKHR-scratchData-03705
  The range of memory backing the `scratchData` member of any element of `pInfos` that is accessed by this command must not overlap the memory backing the `srcAccelerationStructure` member of any element of `pInfos` with a `mode` equal to VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR (including the same element), which is accessed by this command

- VUID-vkBuildAccelerationStructuresKHR-dstAccelerationStructure-03706
  The range of memory backing the `dstAccelerationStructure` member of any element of `pInfos` that is accessed by this command must not overlap the memory backing any acceleration structure referenced by the `geometry.instances.data` member of any element of `pGeometries` or `ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_INSTANCES_KHR in any other element of `pInfos`, which is accessed by this command

- VUID-vkBuildAccelerationStructuresKHR-pInfos-03667
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, its `srcAccelerationStructure` member must have previously been constructed with VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR set in VkAccelerationStructureBuildGeometryInfoKHR::`flags` in the build

- VUID-vkBuildAccelerationStructuresKHR-pInfos-03668
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, its `srcAccelerationStructure` and `dstAccelerationStructure` members must either be the same VkAccelerationStructureKHR, or not have any memory aliasing

- VUID-vkBuildAccelerationStructuresKHR-pInfos-03758
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, its `geometryCount` member must have the same value which was specified when `srcAccelerationStructure` was last built

- VUID-vkBuildAccelerationStructuresKHR-pInfos-03759
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, its `flags` member must have the same value which was specified when `srcAccelerationStructure` was last built

- VUID-vkBuildAccelerationStructuresKHR-pInfos-03760
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, its `type` member must have the same value which was specified when `srcAccelerationStructure` was last built

- VUID-vkBuildAccelerationStructuresKHR-pInfos-03761
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for each `VkAccelerationStructureGeometryKHR` structure referred to by its `pGeometries` or `ppGeometries` members, its `geometryType` member must have the same value which was specified when `srcAccelerationStructure` was last built

- VUID-vkBuildAccelerationStructuresKHR-pInfos-03762
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for each `VkAccelerationStructureGeometryKHR` structure referred to by its `pGeometries` or `ppGeometries` members, its `flags` member must have the same value which was specified when `srcAccelerationStructure` was last built

- VUID-vkBuildAccelerationStructuresKHR-pInfos-03763
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for each `VkAccelerationStructureGeometryKHR` structure referred to by its `pGeometries` or `ppGeometries` members, if `geometryType` is VK_GEOMETRY_TYPE_TRIANGLES_KHR, its `geometry.triangles.vertexFormat` member must have the same value which was specified when `srcAccelerationStructure` was last built

- VUID-vkBuildAccelerationStructuresKHR-pInfos-03764
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for each `VkAccelerationStructureGeometryKHR` structure referred to by its `pGeometries` or `ppGeometries` members, if `geometryType` is VK_GEOMETRY_TYPE_TRIANGLES_KHR, its `geometry.triangles.maxVertex` member must have the same value which was specified when `srcAccelerationStructure` was last built

- VUID-vkBuildAccelerationStructuresKHR-pInfos-03765
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for each `VkAccelerationStructureGeometryKHR` structure referred to by its `pGeometries` or `ppGeometries` members, if `geometryType` is VK_GEOMETRY_TYPE_TRIANGLES_KHR, its `geometry.triangles.indexType` member must have the same value which was specified when `srcAccelerationStructure` was last built

- VUID-vkBuildAccelerationStructuresKHR-pInfos-03766
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for each `VkAccelerationStructureGeometryKHR` structure referred to by its `pGeometries` or `ppGeometries` members, if `geometryType` is VK_GEOMETRY_TYPE_TRIANGLES_KHR, if its `geometry.triangles.transformData` address was `NULL` when `srcAccelerationStructure` was last built, then it must be `NULL`

- VUID-vkBuildAccelerationStructuresKHR-pInfos-03767
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for each `VkAccelerationStructureGeometryKHR` structure referred to by its `pGeometries` or `ppGeometries` members, if `geometryType` is VK_GEOMETRY_TYPE_TRIANGLES_KHR, if its `geometry.triangles.transformData` address was not `NULL` when `srcAccelerationStructure` was last built, then it must not be `NULL`

- VUID-vkBuildAccelerationStructuresKHR-pInfos-10898
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for each `VkAccelerationStructureGeometryKHR` structure referred to by its `pGeometries` or `ppGeometries` members, if `geometryType` is VK_GEOMETRY_TYPE_DENSE_GEOMETRY_FORMAT_TRIANGLES_AMDX, the `numTriangles` member of the `VkAccelerationStructureDenseGeometryFormatTrianglesDataAMDX` structure in the `pNext` chain must have the same value which was specified when `srcAccelerationStructure` was last built

- VUID-vkBuildAccelerationStructuresKHR-pInfos-10899
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for each `VkAccelerationStructureGeometryKHR` structure referred to by its `pGeometries` or `ppGeometries` members, if `geometryType` is VK_GEOMETRY_TYPE_DENSE_GEOMETRY_FORMAT_TRIANGLES_AMDX, the `numVertices` member of the `VkAccelerationStructureDenseGeometryFormatTrianglesDataAMDX` structure in the `pNext` chain must have the same value which was specified when `srcAccelerationStructure` was last built

- VUID-vkBuildAccelerationStructuresKHR-pInfos-10900
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for each `VkAccelerationStructureGeometryKHR` structure referred to by its `pGeometries` or `ppGeometries` members, if `geometryType` is VK_GEOMETRY_TYPE_DENSE_GEOMETRY_FORMAT_TRIANGLES_AMDX, the `maxPrimitiveIndex` member of the `VkAccelerationStructureDenseGeometryFormatTrianglesDataAMDX` structure in the `pNext` chain must have the same value which was specified when `srcAccelerationStructure` was last built

- VUID-vkBuildAccelerationStructuresKHR-pInfos-10901
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for each `VkAccelerationStructureGeometryKHR` structure referred to by its `pGeometries` or `ppGeometries` members, if `geometryType` is VK_GEOMETRY_TYPE_DENSE_GEOMETRY_FORMAT_TRIANGLES_AMDX, the `maxGeometryIndex` member of the `VkAccelerationStructureDenseGeometryFormatTrianglesDataAMDX` structure in the `pNext` chain must have the same value which was specified when `srcAccelerationStructure` was last built

- VUID-vkBuildAccelerationStructuresKHR-pInfos-10902
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for each `VkAccelerationStructureGeometryKHR` structure referred to by its `pGeometries` or `ppGeometries` members, if `geometryType` is VK_GEOMETRY_TYPE_DENSE_GEOMETRY_FORMAT_TRIANGLES_AMDX, the `format` member of the `VkAccelerationStructureDenseGeometryFormatTrianglesDataAMDX` structure in the `pNext` chain must have the same value which was specified when `srcAccelerationStructure` was last built

- VUID-vkBuildAccelerationStructuresKHR-pInfos-10903
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for each `VkAccelerationStructureGeometryKHR` structure referred to by its `pGeometries` or `ppGeometries` members, if `geometryType` is VK_GEOMETRY_TYPE_DENSE_GEOMETRY_FORMAT_TRIANGLES_AMDX, the `dataSize` member of the `VkAccelerationStructureDenseGeometryFormatTrianglesDataAMDX` structure in the `pNext` chain must have the same value which was specified when `srcAccelerationStructure` was last built

- VUID-vkBuildAccelerationStructuresKHR-pInfos-03768
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for each `VkAccelerationStructureGeometryKHR` structure referred to by its `pGeometries` or `ppGeometries` members, if `geometryType` is VK_GEOMETRY_TYPE_TRIANGLES_KHR, and `geometry.triangles.indexType` is not VK_INDEX_TYPE_NONE_KHR, then the value of each index referenced must be the same as the corresponding index value when `srcAccelerationStructure` was last built

- VUID-vkBuildAccelerationStructuresKHR-primitiveCount-03769
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for each `VkAccelerationStructureGeometryKHR` structure referred to by its `pGeometries` or `ppGeometries` members, the `primitiveCount` member of its corresponding `VkAccelerationStructureBuildRangeInfoKHR` structure must have the same value which was specified when `srcAccelerationStructure` was last built

- VUID-vkBuildAccelerationStructuresKHR-pInfos-03801
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_INSTANCES_KHR, the corresponding `ppBuildRangeInfos`[i][j].`primitiveCount` must be less than or equal to VkPhysicalDeviceAccelerationStructurePropertiesKHR::`maxInstanceCount`

- VUID-vkBuildAccelerationStructuresKHR-pInfos-10126
  For each `pInfos`[i], `dstAccelerationStructure` must have been created with a value of VkAccelerationStructureCreateInfoKHR::`size` greater than or equal to either:

  - the memory size required by the build operation, as returned by vkGetAccelerationStructureBuildSizesKHR with `pBuildInfo` = `pInfos`[i] and with each element of the `pMaxPrimitiveCounts` array greater than or equal to the equivalent `ppBuildRangeInfos`[i][j].`primitiveCount` values for `j` in [0,`pInfos`[i].`geometryCount`) or,

  - the result of querying the corresponding VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_KHR, if updating a compacted acceleration structure

- VUID-vkBuildAccelerationStructuresKHR-deferredOperation-03678
  Any previous deferred operation that was associated with `deferredOperation` must be complete

- VUID-vkBuildAccelerationStructuresKHR-pInfos-11702
  Each element of `ppBuildRangeInfos`[i] must be a valid pointer to an array of `pInfos`[i].`geometryCount` `VkAccelerationStructureBuildRangeInfoKHR` structures

- VUID-vkBuildAccelerationStructuresKHR-pInfos-11703
  For each element of `pInfos`, its `dstAccelerationStructure` member must have been created with vkCreateAccelerationStructureKHR

- VUID-vkBuildAccelerationStructuresKHR-pInfos-03722
  For each element of `pInfos`, its `dstAccelerationStructure` member must be bound to host-visible device memory

- VUID-vkBuildAccelerationStructuresKHR-pInfos-11706
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, its `srcAccelerationStructure` member must have been created with vkCreateAccelerationStructureKHR

- VUID-vkBuildAccelerationStructuresKHR-pInfos-03723
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR the `buffer` used to create its `srcAccelerationStructure` member must be bound to host-visible device memory

- VUID-vkBuildAccelerationStructuresKHR-pInfos-11704
  For each element of `pInfos`, the acceleration structure referenced by the `geometry.instances.data` member of any element of `pGeometries` or `ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_INSTANCES_KHR must have been created with vkCreateAccelerationStructureKHR

- VUID-vkBuildAccelerationStructuresKHR-pInfos-03724
  For each element of `pInfos`, each acceleration structure referenced by the `geometry.instances.data` member of any element of `pGeometries` or `ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_INSTANCES_KHR must be bound to host-visible device memory

- VUID-vkBuildAccelerationStructuresKHR-pInfos-12244
  If `pInfos`[i].`mode` is VK_BUILD_ACCELERATION_STRUCTURE_MODE_BUILD_KHR, and N is not `0`, all addresses between `pInfos`[i].`scratchData.hostAddress` and `pInfos`[i].`scratchData.hostAddress` + N - 1 must be valid host memory, where N is given by the `buildScratchSize` member of the VkAccelerationStructureBuildSizesInfoKHR structure returned from a call to vkGetAccelerationStructureBuildSizesKHR with an identical VkAccelerationStructureBuildGeometryInfoKHR structure and primitive count

- VUID-vkBuildAccelerationStructuresKHR-pInfos-12245
  If `pInfos`[i].`mode` is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, and N is not `0`, all addresses between `pInfos`[i].`scratchData.hostAddress` and `pInfos`[i].`scratchData.hostAddress` + N - 1 must be valid host memory, where N is given by the `updateScratchSize` member of the VkAccelerationStructureBuildSizesInfoKHR structure returned from a call to vkGetAccelerationStructureBuildSizesKHR with an identical VkAccelerationStructureBuildGeometryInfoKHR structure and primitive count

- VUID-vkBuildAccelerationStructuresKHR-pInfos-03771
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_TRIANGLES_KHR, `geometry.triangles.vertexData.hostAddress` must be a valid host address

- VUID-vkBuildAccelerationStructuresKHR-pInfos-03772
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_TRIANGLES_KHR, if `geometry.triangles.indexType` is not VK_INDEX_TYPE_NONE_KHR, `geometry.triangles.indexData.hostAddress` must be a valid host address

- VUID-vkBuildAccelerationStructuresKHR-pInfos-03773
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_TRIANGLES_KHR, if `geometry.triangles.transformData.hostAddress` is not `0`, it must be a valid host address

- VUID-vkBuildAccelerationStructuresKHR-pInfos-03774
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_AABBS_KHR, `geometry.aabbs.data.hostAddress` must be a valid host address

- VUID-vkBuildAccelerationStructuresKHR-pInfos-03775
  For each element of `pInfos`, its `dstAccelerationStructure` member must be bound to memory that was not allocated with multiple instances

- VUID-vkBuildAccelerationStructuresKHR-pInfos-03776
  For each element of `pInfos`, if its `mode` member is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR the `buffer` used to create its `srcAccelerationStructure` member must be bound to memory that was not allocated with multiple instances

- VUID-vkBuildAccelerationStructuresKHR-pInfos-03777
  For each element of `pInfos`, each acceleration structure referenced by the `geometry.instances.data` member of any element of `pGeometries` or `ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_INSTANCES_KHR must be bound to memory that was not allocated with multiple instances

- VUID-vkBuildAccelerationStructuresKHR-pInfos-03778
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_INSTANCES_KHR, `geometry.instances.data.hostAddress` must be a valid host address

- VUID-vkBuildAccelerationStructuresKHR-pInfos-03779
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_INSTANCES_KHR, each VkAccelerationStructureInstanceKHR::`accelerationStructureReference` value in `geometry.instances.data.hostAddress` must be a valid VkAccelerationStructureKHR object

- VUID-vkBuildAccelerationStructuresKHR-pInfos-04930
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_INSTANCES_KHR with VK_BUILD_ACCELERATION_STRUCTURE_MOTION_BIT_NV set, each `accelerationStructureReference` in any structure in VkAccelerationStructureMotionInstanceNV value in `geometry.instances.data.hostAddress` must be a valid VkAccelerationStructureKHR object

- VUID-vkBuildAccelerationStructuresKHR-pInfos-11820
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_TRIANGLES_KHR, if there is an instance of VkAccelerationStructureGeometryMotionTrianglesDataNV in the `geometry.triangles.pNext` chain, then its `vertexData.hostAddress` must not be 0

- VUID-vkBuildAccelerationStructuresKHR-pInfos-10892
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_TRIANGLES_KHR, if there is an instance of VkAccelerationStructureTrianglesOpacityMicromapEXT in the `geometry.triangles.pNext` chain, and its `indexType` is VK_INDEX_TYPE_NONE_KHR, then its `indexBuffer.hostAddress` must be 0

- VUID-vkBuildAccelerationStructuresKHR-pInfos-11821
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_TRIANGLES_KHR, if there is an instance of VkAccelerationStructureTrianglesOpacityMicromapEXT in the `geometry.triangles.pNext` chain, and its `indexType` is not VK_INDEX_TYPE_NONE_KHR, then its `indexBuffer.hostAddress` must not be 0

- VUID-vkBuildAccelerationStructuresKHR-pInfos-11705
  For any element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_TRIANGLES_KHR, if there is an instance of VkAccelerationStructureTrianglesOpacityMicromapKHR in the `geometry.triangles.pNext` chain its `micromap` member must be VK_NULL_HANDLE

- VUID-vkBuildAccelerationStructuresKHR-pInfos-11822
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_SPHERES_NV, VkAccelerationStructureGeometrySpheresDataNV::`indexType` is VK_INDEX_TYPE_NONE_KHR, then its `indexData.hostAddress` must be 0

- VUID-vkBuildAccelerationStructuresKHR-pInfos-11823
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_SPHERES_NV, VkAccelerationStructureGeometrySpheresDataNV::`indexType` is not VK_INDEX_TYPE_NONE_KHR, then its `indexData.hostAddress` must not be 0

- VUID-vkBuildAccelerationStructuresKHR-pInfos-11824
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_SPHERES_NV, VkAccelerationStructureGeometrySpheresDataNV::`vertexData.hostAddress` must not be 0

- VUID-vkBuildAccelerationStructuresKHR-pInfos-11825
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_SPHERES_NV, VkAccelerationStructureGeometrySpheresDataNV::`radiusData.hostAddress` must not be 0

- VUID-vkBuildAccelerationStructuresKHR-pInfos-11826
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_LINEAR_SWEPT_SPHERES_NV, VkAccelerationStructureGeometryLinearSweptSpheresDataNV::`indexType` is VK_INDEX_TYPE_NONE_KHR, then its `indexData.hostAddress` must be 0

- VUID-vkBuildAccelerationStructuresKHR-pInfos-11827
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_LINEAR_SWEPT_SPHERES_NV, VkAccelerationStructureGeometryLinearSweptSpheresDataNV::`indexType` is not VK_INDEX_TYPE_NONE_KHR, then its `indexData.hostAddress` must not be 0

- VUID-vkBuildAccelerationStructuresKHR-pInfos-11828
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_LINEAR_SWEPT_SPHERES_NV, VkAccelerationStructureGeometryLinearSweptSpheresDataNV::`vertexData.hostAddress` must not be 0

- VUID-vkBuildAccelerationStructuresKHR-pInfos-11829
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries` with a `geometryType` of VK_GEOMETRY_TYPE_LINEAR_SWEPT_SPHERES_NV, VkAccelerationStructureGeometryLinearSweptSpheresDataNV::`radiusData.hostAddress` must not be 0

- VUID-vkBuildAccelerationStructuresKHR-pInfos-10893
  For each element of `pInfos`[i].`pGeometries` or `pInfos`[i].`ppGeometries`, `geometryType` must not be VK_GEOMETRY_TYPE_DENSE_GEOMETRY_FORMAT_TRIANGLES_AMDX

Valid Usage (Implicit)

- VUID-vkBuildAccelerationStructuresKHR-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkBuildAccelerationStructuresKHR-deferredOperation-parameter
  If `deferredOperation` is not VK_NULL_HANDLE, `deferredOperation` must be a valid VkDeferredOperationKHR handle

- VUID-vkBuildAccelerationStructuresKHR-pInfos-parameter
  `pInfos` must be a valid pointer to an array of `infoCount` valid VkAccelerationStructureBuildGeometryInfoKHR structures

- VUID-vkBuildAccelerationStructuresKHR-ppBuildRangeInfos-parameter
  `ppBuildRangeInfos` must be a valid pointer to an array of `infoCount` VkAccelerationStructureBuildRangeInfoKHR structures

- VUID-vkBuildAccelerationStructuresKHR-infoCount-arraylength
  `infoCount` must be greater than `0`

- VUID-vkBuildAccelerationStructuresKHR-deferredOperation-parent
  If `deferredOperation` is a valid handle, it must have been created, allocated, or retrieved from `device`

Return Codes

Success

  - VK_OPERATION_DEFERRED_KHR

  - VK_OPERATION_NOT_DEFERRED_KHR

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

To copy or compact an acceleration structure on the host, call:

Warning | This functionality is superseded by vkCmdCopyAccelerationStructureKHR. See Legacy Functionality for more information.

    // Provided by VK_KHR_acceleration_structure
    VkResult vkCopyAccelerationStructureKHR(
        VkDevice                                    device,
        VkDeferredOperationKHR                      deferredOperation,
        const VkCopyAccelerationStructureInfoKHR*   pInfo);

- `device` is the device which owns the acceleration structures.

- `deferredOperation` is an optional VkDeferredOperationKHR to request deferral for this command.

- `pInfo` is a pointer to a VkCopyAccelerationStructureInfoKHR structure defining the copy operation.

This command fulfills the same task as vkCmdCopyAccelerationStructureKHR but is executed by the host.

Valid Usage

- VUID-vkCopyAccelerationStructureKHR-accelerationStructureHostCommands-03582
  The `VkPhysicalDeviceAccelerationStructureFeaturesKHR`::`accelerationStructureHostCommands` feature must be enabled

- VUID-vkCopyAccelerationStructureKHR-deferredOperation-03678
  Any previous deferred operation that was associated with `deferredOperation` must be complete

- VUID-vkCopyAccelerationStructureKHR-buffer-03727
  `pInfo->src` must be bound to host-visible device memory

- VUID-vkCopyAccelerationStructureKHR-buffer-03728
  `pInfo->dst` must be bound to host-visible device memory

- VUID-vkCopyAccelerationStructureKHR-buffer-03780
  `pInfo->src` must be bound to memory that was not allocated with multiple instances

- VUID-vkCopyAccelerationStructureKHR-buffer-03781
  `pInfo->dst` must be bound to memory that was not allocated with multiple instances

- VUID-vkCopyAccelerationStructureKHR-src-11586
  The source acceleration structure `pInfo->src` must have been constructed prior to the execution of this command

- VUID-vkCopyAccelerationStructureKHR-src-11587
  If the source acceleration structure `pInfo->src` was constructed through deserialization, all micromap arrays the acceleration structure references that were not replaced by an acceleration structure update command must have been deserialized using the serialized data of the corresponding micromaps used to originally build the acceleration structure prior to the execution of this command

- VUID-vkCopyAccelerationStructureKHR-src-11588
  `pInfo->src` must have been created with vkCreateAccelerationStructureKHR

- VUID-vkCopyAccelerationStructureKHR-dst-11589
  `pInfo->dst` must have been created with vkCreateAccelerationStructureKHR

Valid Usage (Implicit)

- VUID-vkCopyAccelerationStructureKHR-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkCopyAccelerationStructureKHR-deferredOperation-parameter
  If `deferredOperation` is not VK_NULL_HANDLE, `deferredOperation` must be a valid VkDeferredOperationKHR handle

- VUID-vkCopyAccelerationStructureKHR-pInfo-parameter
  `pInfo` must be a valid pointer to a valid VkCopyAccelerationStructureInfoKHR structure

- VUID-vkCopyAccelerationStructureKHR-deferredOperation-parent
  If `deferredOperation` is a valid handle, it must have been created, allocated, or retrieved from `device`

Return Codes

Success

  - VK_OPERATION_DEFERRED_KHR

  - VK_OPERATION_NOT_DEFERRED_KHR

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

To copy host accessible memory to an acceleration structure, call:

Warning | This functionality is superseded by vkCmdCopyMemoryToAccelerationStructureKHR. See Legacy Functionality for more information.

    // Provided by VK_KHR_acceleration_structure
    VkResult vkCopyMemoryToAccelerationStructureKHR(
        VkDevice                                    device,
        VkDeferredOperationKHR                      deferredOperation,
        const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo);

- `device` is the device which owns `pInfo->dst`.

- `deferredOperation` is an optional VkDeferredOperationKHR to request deferral for this command.

- `pInfo` is a pointer to a VkCopyMemoryToAccelerationStructureInfoKHR structure defining the copy operation.

This command fulfills the same task as vkCmdCopyMemoryToAccelerationStructureKHR but is executed by the host.

This command can accept acceleration structures produced by either vkCmdCopyAccelerationStructureToMemoryKHR or vkCopyAccelerationStructureToMemoryKHR.

Valid Usage

- VUID-vkCopyMemoryToAccelerationStructureKHR-accelerationStructureHostCommands-03583
  The `VkPhysicalDeviceAccelerationStructureFeaturesKHR`::`accelerationStructureHostCommands` feature must be enabled

- VUID-vkCopyMemoryToAccelerationStructureKHR-deferredOperation-03678
  Any previous deferred operation that was associated with `deferredOperation` must be complete

- VUID-vkCopyMemoryToAccelerationStructureKHR-pInfo-03729
  `pInfo->src.hostAddress` must be a valid host pointer

- VUID-vkCopyMemoryToAccelerationStructureKHR-pInfo-03750
  `pInfo->src.hostAddress` must be aligned to 16 bytes

- VUID-vkCopyMemoryToAccelerationStructureKHR-buffer-03730
  `pInfo->dst` must be bound to host-visible device memory

- VUID-vkCopyMemoryToAccelerationStructureKHR-buffer-03782
  `pInfo->dst` must be bound to memory that was not allocated with multiple instances

- VUID-vkCopyMemoryToAccelerationStructureKHR-dst-11677
  `pInfo->dst` must have been created with vkCreateAccelerationStructureKHR

Valid Usage (Implicit)

- VUID-vkCopyMemoryToAccelerationStructureKHR-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkCopyMemoryToAccelerationStructureKHR-deferredOperation-parameter
  If `deferredOperation` is not VK_NULL_HANDLE, `deferredOperation` must be a valid VkDeferredOperationKHR handle

- VUID-vkCopyMemoryToAccelerationStructureKHR-pInfo-parameter
  `pInfo` must be a valid pointer to a valid VkCopyMemoryToAccelerationStructureInfoKHR structure

- VUID-vkCopyMemoryToAccelerationStructureKHR-deferredOperation-parent
  If `deferredOperation` is a valid handle, it must have been created, allocated, or retrieved from `device`

Return Codes

Success

  - VK_OPERATION_DEFERRED_KHR

  - VK_OPERATION_NOT_DEFERRED_KHR

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

To copy an acceleration structure to host accessible memory, call:

Warning | This functionality is superseded by vkCmdCopyAccelerationStructureToMemoryKHR. See Legacy Functionality for more information.

    // Provided by VK_KHR_acceleration_structure
    VkResult vkCopyAccelerationStructureToMemoryKHR(
        VkDevice                                    device,
        VkDeferredOperationKHR                      deferredOperation,
        const VkCopyAccelerationStructureToMemoryInfoKHR* pInfo);

- `device` is the device which owns `pInfo->src`.

- `deferredOperation` is an optional VkDeferredOperationKHR to request deferral for this command.

- `pInfo` is a pointer to a VkCopyAccelerationStructureToMemoryInfoKHR structure defining the copy operation.

This command fulfills the same task as vkCmdCopyAccelerationStructureToMemoryKHR but is executed by the host.

This command produces the same results as vkCmdCopyAccelerationStructureToMemoryKHR, but writes its result directly to a host pointer, and is executed on the host rather than the device. The output may not necessarily be bit-for-bit identical, but it can be equally used by either vkCmdCopyMemoryToAccelerationStructureKHR or vkCopyMemoryToAccelerationStructureKHR.

Valid Usage

- VUID-vkCopyAccelerationStructureToMemoryKHR-accelerationStructureHostCommands-03584
  The `VkPhysicalDeviceAccelerationStructureFeaturesKHR`::`accelerationStructureHostCommands` feature must be enabled

- VUID-vkCopyAccelerationStructureToMemoryKHR-deferredOperation-03678
  Any previous deferred operation that was associated with `deferredOperation` must be complete

- VUID-vkCopyAccelerationStructureToMemoryKHR-pInfo-03731
  `pInfo->src` must be bound to host-visible device memory

- VUID-vkCopyAccelerationStructureToMemoryKHR-pInfo-03732
  `pInfo->dst.hostAddress` must be a valid host pointer

- VUID-vkCopyAccelerationStructureToMemoryKHR-pInfo-03751
  `pInfo->dst.hostAddress` must be aligned to 16 bytes

- VUID-vkCopyAccelerationStructureToMemoryKHR-buffer-03783
  `pInfo->src` must not be bound to memory that was allocated with multiple instances

- VUID-vkCopyAccelerationStructureToMemoryKHR-src-11678
  `pInfo->src` must have been created with vkCreateAccelerationStructureKHR

Valid Usage (Implicit)

- VUID-vkCopyAccelerationStructureToMemoryKHR-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkCopyAccelerationStructureToMemoryKHR-deferredOperation-parameter
  If `deferredOperation` is not VK_NULL_HANDLE, `deferredOperation` must be a valid VkDeferredOperationKHR handle

- VUID-vkCopyAccelerationStructureToMemoryKHR-pInfo-parameter
  `pInfo` must be a valid pointer to a valid VkCopyAccelerationStructureToMemoryInfoKHR structure

- VUID-vkCopyAccelerationStructureToMemoryKHR-deferredOperation-parent
  If `deferredOperation` is a valid handle, it must have been created, allocated, or retrieved from `device`

Return Codes

Success

  - VK_OPERATION_DEFERRED_KHR

  - VK_OPERATION_NOT_DEFERRED_KHR

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

To query acceleration structure size parameters on the host, call:

Warning | This functionality is superseded by vkCmdWriteAccelerationStructuresPropertiesKHR. See Legacy Functionality for more information.

    // Provided by VK_KHR_acceleration_structure
    VkResult vkWriteAccelerationStructuresPropertiesKHR(
        VkDevice                                    device,
        uint32_t                                    accelerationStructureCount,
        const VkAccelerationStructureKHR*           pAccelerationStructures,
        VkQueryType                                 queryType,
        size_t                                      dataSize,
        void*                                       pData,
        size_t                                      stride);

- `device` is the device which owns the acceleration structures in `pAccelerationStructures`.

- `accelerationStructureCount` is the count of acceleration structures for which to query the property.

- `pAccelerationStructures` is a pointer to an array of existing previously built acceleration structures.

- `queryType` is a VkQueryType value specifying the property to be queried.

- `dataSize` is the size in bytes of the buffer pointed to by `pData`.

- `pData` is a pointer to an application-allocated buffer where the results will be written.

- `stride` is the stride in bytes between results for individual queries within `pData`.

This command fulfills the same task as vkCmdWriteAccelerationStructuresPropertiesKHR but is executed by the host.

Valid Usage

- VUID-vkWriteAccelerationStructuresPropertiesKHR-accelerationStructureHostCommands-03585
  The `VkPhysicalDeviceAccelerationStructureFeaturesKHR`::`accelerationStructureHostCommands` feature must be enabled

- VUID-vkWriteAccelerationStructuresPropertiesKHR-accelerationStructures-03431
  All acceleration structures in `pAccelerationStructures` must have been built with VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR if `queryType` is VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_KHR

- VUID-vkWriteAccelerationStructuresPropertiesKHR-queryType-06742
  `queryType` must be VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SIZE_KHR, VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_BOTTOM_LEVEL_POINTERS_KHR, VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_KHR, or VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_SIZE_KHR

- VUID-vkWriteAccelerationStructuresPropertiesKHR-pAccelerationStructures-12425
  All acceleration structures in `pAccelerationStructures` must have been built with VK_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR if `queryType` is VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_BOTTOM_LEVEL_POINTERS_KHR

- VUID-vkWriteAccelerationStructuresPropertiesKHR-buffer-03736
  Each element of `pAccelerationStructures` must be fully backed by physical memory

- VUID-vkWriteAccelerationStructuresPropertiesKHR-queryType-03448
  If `queryType` is VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_KHR, then `stride` must be a multiple of the size of VkDeviceSize

- VUID-vkWriteAccelerationStructuresPropertiesKHR-queryType-03449
  If `queryType` is VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_KHR, then `pData` must point to a VkDeviceSize

- VUID-vkWriteAccelerationStructuresPropertiesKHR-queryType-03450
  If `queryType` is VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_SIZE_KHR, then `stride` must be a multiple of the size of VkDeviceSize

- VUID-vkWriteAccelerationStructuresPropertiesKHR-queryType-03451
  If `queryType` is VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_SIZE_KHR, then `pData` must point to a VkDeviceSize

- VUID-vkWriteAccelerationStructuresPropertiesKHR-queryType-06731
  If `queryType` is VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SIZE_KHR, then `stride` must be a multiple of the size of VkDeviceSize

- VUID-vkWriteAccelerationStructuresPropertiesKHR-queryType-06732
  If `queryType` is VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SIZE_KHR, then `pData` must point to a VkDeviceSize

- VUID-vkWriteAccelerationStructuresPropertiesKHR-queryType-06733
  If `queryType` is VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_BOTTOM_LEVEL_POINTERS_KHR, then `stride` must be a multiple of the size of VkDeviceSize

- VUID-vkWriteAccelerationStructuresPropertiesKHR-queryType-06734
  If `queryType` is VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_BOTTOM_LEVEL_POINTERS_KHR, then `pData` must point to a VkDeviceSize

- VUID-vkWriteAccelerationStructuresPropertiesKHR-dataSize-03452
  `dataSize` must be greater than or equal to `accelerationStructureCount`*`stride`

- VUID-vkWriteAccelerationStructuresPropertiesKHR-buffer-03733
  Each element of `pAccelerationStructures` must be bound to host-visible device memory

- VUID-vkWriteAccelerationStructuresPropertiesKHR-pAccelerationStructures-11592
  Each acceleration structure in `pAccelerationStructures` must have been created with vkCreateAccelerationStructureKHR

- VUID-vkWriteAccelerationStructuresPropertiesKHR-buffer-03784
  Each element of `pAccelerationStructures` must be bound to memory that was not allocated with multiple instances

- VUID-vkWriteAccelerationStructuresPropertiesKHR-pAccelerationStructures-11591
  All acceleration structures in `pAccelerationStructures` must have been constructed prior to the execution of this command

Valid Usage (Implicit)

- VUID-vkWriteAccelerationStructuresPropertiesKHR-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkWriteAccelerationStructuresPropertiesKHR-pAccelerationStructures-parameter
  `pAccelerationStructures` must be a valid pointer to an array of `accelerationStructureCount` valid VkAccelerationStructureKHR handles

- VUID-vkWriteAccelerationStructuresPropertiesKHR-queryType-parameter
  `queryType` must be a valid VkQueryType value

- VUID-vkWriteAccelerationStructuresPropertiesKHR-pData-parameter
  `pData` must be a valid pointer to an array of `dataSize` bytes

- VUID-vkWriteAccelerationStructuresPropertiesKHR-accelerationStructureCount-arraylength
  `accelerationStructureCount` must be greater than `0`

- VUID-vkWriteAccelerationStructuresPropertiesKHR-dataSize-arraylength
  `dataSize` must be greater than `0`

- VUID-vkWriteAccelerationStructuresPropertiesKHR-pAccelerationStructures-parent
  Each element of `pAccelerationStructures` must have been created, allocated, or retrieved from `device`

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

## 44. Compressed triangle data

### 44.1. Dense Geometry Format Version 1 (DGF1)

The provisional `VK_AMDX_dense_geometry_format` extension provides a way for applications to build acceleration structures from pre-compressed Dense Geometry Format (DGF) triangle geometry data, enabling improved build times and reducing both the storage required on disk and the memory footprint of acceleration structures.

The dense geometry format consists of an array of 128B blocks that encode triangle data. Each block holds a maximum of 64 triangles and 64 vertices.

It is expected that applications will construct DGF content by partitioning meshes into small, spatially localized triangle sets, and attempting to pack each set into a minimal number of DGF blocks. An SAH-aware clustering strategy is crucial for good ray tracing performance. Pre-clustering the geometry in this manner greatly accelerates the acceleration structure build since the implementation receives an efficient spatial partitioning, and does not need to construct one from the original, larger triangle set.

DGF compressors rely on the ability to reorder triangles within a mesh, and rotate triangle vertices in a winding-preserving way. The application must post-process any sideband data which depends on these (shader-visible index buffers, per-triangle attributes).

#### 44.1.1. Block Layout

The 128B DGF block is organized into sections as shown below:

Figure 33. DGF block layout

The first 5 DWORDs of a DGF block consist of a fixed header, whose structure is shown below. All bit fields are ordered from LSB to MSB, bytes are 8 bits, and multi-byte fields are little endian.

    struct DGFHeader
    {
        // DWORD 0
        uint32_t magic                :  8; // must be 0x6
        uint32_t bits_per_index       :  2; // Encodes 3,4,5,6
        uint32_t num_vertices         :  6; // Number of vertices (1-64)
        uint32_t num_triangles        :  6; // Number of triangles (1-64)
        uint32_t geom_id_meta         : 10;

        // DWORD 1
        uint32_t exponent             :  8; // Float32 scale (exponent-only) with bias 127. Values 1-232 are supported.
        int32_t  x_anchor             : 24; // 24-bit signed two's complement (0x800000 represents -8,388,608)

        // DWORD 2
        uint32_t x_bits               :  4; // 1-16 (add 1 when decoding)
        uint32_t y_bits               :  4; // 1-16 (add 1 when decoding)
        int32_t  y_anchor             : 24; // 24-bit signed two's complement

        // DWORD 3
        uint32_t z_bits               :  4; // 1-16 (add 1 when decoding)
        uint32_t omm_descriptor_count :  3; // 0-7
        uint32_t geom_id_mode         :  1; // 0 = Constant Mode  1= Palette Mode
        int32_t  z_anchor             : 24; // 24-bit signed two's complement

        // DWORD 4
        uint32_t prim_id_base         : 29;
        uint32_t have_user_data       : 1; // if set, a UserData DWORD is present between the header and the front buffer
        uint32_t unused               : 2; // must be 0

        // 108B of variable-length data segments follow.
    };

The per-vertex offsets are tightly packed in the DGF node immediately following the header, in ascending order. The size of each vertex must be 4b-aligned. The size of the vertex data section is byte-aligned. Pad bits are inserted as required, and all pad bits must be zero. The optional OMM palette (if present) starts on the next byte boundary. The optional GeomID palette (if present), starts on the next byte boundary following the vertex data and OMM palette.

The region containing the vertex data, geomID palette, and OMM palette is referred to as the “front buffer”. It is byte-aligned, and its total size may not exceed 96B.

The optional UserData DWORD, if present, is little-endian, and located immediately after the header. If UserData is present, the front buffer starts at byte 24. If UserData is not present, the front buffer starts at byte 20.

#### 44.1.2. Vertex Position Encoding

DGF vertices are defined on a signed 24-bit quantization grid. Each block stores the following:

- a 24b-per-coordinate signed anchor position,

- a variable-width (1-16b) unsigned offset for each vertex component (relative to the anchor position),

- a power-of-2 scale factor which is used to map from the quantization grid to floating-point world coordinates (stored as an IEEE biased exponent).

An equivalent fixed-point encoding scheme is used by Epic’s “Nanite” system.

The decoded floating-point vertex position is computed as follows:

    float3 dgf_decode(int24_t Anchor[3], uint16_t Offset[3], uint8_t Exponent)
    {
        int x = Anchor[0] + Offset[0]; // 24b + 16b add.. 25b result
        int y = Anchor[1] + Offset[1];
        int z = Anchor[2] + Offset[2];

        float fx = (float)(x); // convert results to floating-point
        float fy = (float)(y);
        float fz = (float)(z);

        // apply a pow2 scale factor
        float scale = ldexp(1.0f, Exponent - 127);
        return float3(fx, fy, fz) * scale;
    }

With this encoding scheme the maximum representable value is:

    (0x7fffff + 0xffff) * 2^127 = 8,454,142 * 2^127 (roughly 1.438e+45)

The minimum is:

     (0x800000 * 2^127) = -8,388,608 * 2^127  (roughly -1.427e+45)

This is a larger theoretical dynamic range than IEEE floating-point, and there is no reason for implementations to support all of it.

The minimum and maximum IEEE floats which DGF can encode occur for exponent 232 and integer positions 0x800001 and 0x7fffff (Decimal values -8388607 and 8388607). These values are:

    -340282326356119256160033759537265639424.000000 and +340282326356119256160033759537265639424.000000

For context, the range of finite IEEE floats is slightly larger than these:

    -340282346638528859811704183484516925440.000000 to +340282346638528859811704183484516925440.000000

For these reasons, DGF only supports exponent values from 1 through 232. This implies that denormals, NaNs, and infinities cannot be represented. If a block encodes an exponent value outside the supported range, all ray-triangle intersection tests against this block will have undefined results.

For exponent values of 232, it is possible to encode a value which overflows the IEEE single-precision range. Results are undefined in this case.

An application can ensure crack-free results across blocks by selecting matching quantization factors for any two neighboring blocks. A simple way to ensure this is to pick a uniform quantization factor for an entire mesh.

#### 44.1.3. Handling Corner Cases

The anchor+offset encoding scheme can be problematic for meshes containing very large triangles. A poor choice of quantization factor can cause the 16b per-vertex offsets or the 24b per-block anchors to overflow. This problem can be worked around in several ways:

- Choosing a coarser quantization factor (trading off precision),

- Subdividing large, problematic triangles (whether automatically or manually),

- Reverting to uncompressed geometry for problematic assets.

The use of a common quantization factor for X,Y, and Z can be problematic for geometry which has a large extent on one coordinate axis but not the others (for example, a freight train with individually modeled cars). In this situation, a coarse quantization factor must be selected to enclose the large coordinate range on the long axis, resulting in inadequate precision on the other two axes. The solution to this problem is to partition the object into multiple parts, each authored in a local coordinate system, and positioned using instance transforms.

#### 44.1.4. Topology Encoding

##### Topology Sections

DGF represents mesh topology using a form of generalized triangle strip. The order of the stored vertices is used to minimize the size of the topology encoding. The topology encoding consists of an array of triangle control values, and a compressed index buffer.

- Two control bits per triangle indicating its position relative to the previous two triangles

  - The first triangle always uses RESTART, so this is not stored.

  - Ordered back to front (earlier triangles occupy higher bit positions).

- A compressed index buffer whose length is determined by the contents of the control bits.

  - The index buffer is organized into two sections:

    - An array of “is-first” bits

      - One bit per index indicating whether it is the first reference to a given vertex.

      - The first reference to a given vertex is computed by incrementing a counter.

      - The first three indices are always “first”, so their “is-first” bits are not stored.

      - Ordered back to front (earlier indices occupy higher bit positions).

    - A “reuse buffer” containing the indices of reused vertices

      - There is one index for each zero bit in the “is-first” bit vector.

      - The number of bits per index is stored in the header. Valid values are 0,1,2,3, encoding 3,4,5, and 6 bits, respectively.

      - Ordered front to back (earlier indices occupy lower bit positions).

      - Total size may not exceed 24B.

The reuse buffer is located immediately adjacent to the front buffer. The triangle control bits are located at the end of the block, and the "is-first" bits are immediately in front of them.

There are four possible triangle control values:

Enum | Value | Meaning
--- | --- | ---
RESTART | 0 | Start a new strip, specifying 3 vertex indices for the triangle
EDGE1 | 1 | The second edge of the predecessor triangle is reused as the first edge
EDGE2 | 2 | The third edge of the predecessor triangle is reused as the first edge
BACKTRACK | 3 | The opposite edge of the predecessor’s predecessor is reused. “Opposite edge” means EDGE1 if the predecessor used EDGE2, or EDGE2 if the predecessor used EDGE1. BACKTRACK is not allowed unless the predecessor used EDGE1 or EDGE2. A BACKTRACK triangle may not occur after a RESTART or another BACKTRACK

The behavior of the triangle control values is illustrated in the diagram below:

Figure 34. DGF control value behavior

In the diagram above, the vertex orders for the 3 predecessor triangles are:

- RESTART: 0,1,2

- EDGE1: 2,1,3 (reuse the 1→2 edge)

- EDGE1: 3,1,4 (reuse the 1→3 edge)

The four possible vertex orders for the next triangle depend on its control value, and are:

- RESTART: 5,6,7

- EDGE1: 4,1,5 (reuse the 1→4 edge)

- EDGE2: 3,4,5 (reuse the 4→3 edge)

- BACKTRACK: 2,3,5 (reuse the 3→2 edge)

Note that whenever an edge is reused, its vertices are reversed so that triangle winding is correct. Meshes with mixed winding can be encoded by restarting the strip on each winding change.

The control values for the triangles correspond to an index buffer containing three indices for each RESTART triangle, and one index for each non-RESTART triangle. This index buffer is compressed by re-ordering the vertices by first use and omitting the first reference to every vertex (since this index can be computed by incrementing a counter). A single bit per index is used to indicate whether it is the first reference to its corresponding vertex. The reused indices are then directly stored in a tightly-packed buffer (i.e., not interleaved with the single-bit index-is-first flags).

The example below illustrates the index buffer encoding:

Figure 35. DGF Index buffer example

A triangle’s position in the index buffer can be computed by taking the triangle index and adding 2 for each RESTART triangle at the same or earlier positions. This gives the index buffer position for the triangle’s third vertex. The remaining two vertices are inferred from the previous two triangles based on the control values.

An index from the compressed index buffer is extracted as follows:

    uint get_index(uint indexPosition, uint64_t isFirst, uint nonFirstIndices[])
    {
        // count number of "first" vertex refs which precede this one
        //   NOTE that an efficient implementation would use a popcount() here
        int numFirst = 0;
        for (int i = 0; i < indexPosition; i++)
        {
            if (isFirst & (1ull << i))
                numFirst++;
        }

        // the first reference to each vertex is implicit
        // reused indices are read
        if (isFirst & (1ull << indexPosition))
            return numFirst;
        else
            return nonFirstIndices[indexPosition - numFirst];        // NOTE: Bounds check omitted for brevity

    }

#### 44.1.5. Primitive Index

The primitive index for a DGF triangle is inferred from its position in the strip, which removes the need to directly store it. A 29b primitive index base is stored in the block and added to the triangle’s position in the block to produce a per-triangle primitive index.

    PrimitiveIndex = header.prim_id_base + triangle_index_in_block;

The result must fit in 29b. Any overflow results in undefined behavior.

#### 44.1.6. Geometry Index and Opaque Flag

DGF supports specifying a 24b geometry index and a 1b opaque flag on a per-triangle basis. These are combined into a 25b value with the opaque flag in the least significant bit.

There are two supported modes:

- Constant mode: A 9b geometry index and 1b opaque flag is applied to all triangles,

- Palette mode: An array of up to 32 25b values is stored in the block, in compressed form, and a per-triangle index is used to select a value from the array.

If palette mode is in use, there is no requirement that the “opaque” flags are consistent for triangles with the same geometry index.

The palette mode is useful in the following circumstances:

- When the triangles in the block have different geometry index or opacity values

- When the triangles have the same geometry index, but it is larger than the 9b limit for palette mode.

- When the number of triangles per geo is small, and constant mode would create under-utilized blocks.

##### GeomID Palette

There are two supported modes for specifying geometry indices and opaque flags. The mode is selected based on the `geom_id_mode` field in the header:

Enum | Value | Encoding System
--- | --- | ---
Constant Mode | 0 | A 9b geomID and a 1b opaque flag are applied to all triangles
Palette Mode | 1 | An array of up to 32 25b values is stored in compressed form; each triangle stores an index into the array

In constant mode, bit 0 of `geom_id_meta` contains an opaque flag, and bits 1-9 store a geometry index. These values are used for all triangles. In this mode, no additional data are stored in the block, and more space is available for vertex data.

In palette mode, the `geom_id_meta` field is interpreted as follows:

- LSBs (4:0) encode a GeomID prefix size in bits (5b, 0-25)

- MSBs (9:5) encode a GeomID count (5b, 1-32 (add 1 when decoding)).

In palette mode, a GeomID palette structure is inserted in the block. The position and size of the palette structure are aligned to byte boundaries. Pad bits are appended as required, and all pad bits must be zero.

The GeomID palette consists of the following structures in this order:

- A prefix value whose bit length is given in the 5 LSBs of `geom_id_meta`.

- A per-triangle index buffer identifying the payload to use for each triangle.

  - The size of each index is `ceil(log2(GeomID count))`.

- An array of N-bit payloads, where N is `25 - prefixSize`. The LSB of each payload contains an opaque flag.

The 25b geomID and opaque flag for a given triangle are decoded by selecting a payload from the payload buffer, and concatenating it with the prefix value. The following pseudocode illustrates this process:

    // Helper function to extract a bit field from the DGF block
    uint ReadBits(uint bitPos, uint numBits);

    uint get_id_and_opacity(uint geom_id_meta, uint triIndex, uint triCount);
    {
        uint prefixSize  = geom_id_meta & 0x1f;
        uint payloadSize = 25 - prefixSize;
        uint geomIDCount = ((geom_id_meta >> 5) & 0x1f) + 1;
        uint indexSize   = 32 - lzcount(geomIDCount - 1);

        uint paletteBitPos = ComputePaletteBitPosition();
        uint prefix        = ReadBits(paletteBitPos, prefixSize);

        uint indexBufferPos = paletteBitPos + prefixSize;
        uint index          = ReadBits(indexBufferPos + triIndex * indexSize, indexSize);

        uint payloadBufferPos = indexBufferPos + triCount * indexSize;
        uint payload          = ReadBits(payloadBufferPos, index, payloadSize);

        return (prefix << payloadSize) | payload;
    }

#### 44.1.7. OMM Support

DGF provides a degree of OMM support by allowing the triangles within a DGF block to collectively reference a limited number of OMMs. The OMM support in DGF is best suited for scenarios in which a small set of OMMs is repeated many times over a large mesh (e.g. tree leaves). For intricate alpha cutouts applied to high-poly models, it is potentially more efficient to tessellate the geometry and “bake in” the alpha cutout.

Because OMMs are constructed independently of acceleration structure content, the encoder must reserve space for a set of implementation-defined "OMM descriptors" which may be injected into the block at runtime. A DGF block can hold a maximum of 7 descriptors, with each descriptor either encoding an OMM special index or referencing an OMM array entry. The application must know the triangle-to-OMM mapping when the DGF block is encoded, and the encoder must assign triangles to blocks such that the descriptor limit is not exceeded, and ideally such that the number of OMMs per block is minimized.

The mapping of triangles to OMMs is illustrated by the following pseudo-code:

    //
    //   The number of unique return values from "get_omm_index" in a given block must not
    //     exceed the number of descriptors allocated in the block
    //
    uint get_omm_index( uint primIDBase, uint triangleIndexInBlock )
    {
        // reconstruct primitive index
        uint primIndex = primIDBase + triangleIndexInBlock;

        // map primitive index to the index of an OMM in the OMM array
        if( indexed_omms )
            return OMMIndexBuffer[primIndex];
        else
            return primIndex;
    }

If an OMM index buffer is used to select OMMs, then each distinct index value (including “special indices”) counts as one descriptor. If there is no OMM index buffer, then a simple linear mapping is used instead. This implies that the number of OMM descriptors equals the number of triangles, and that neither number may exceed 7.

DGF blocks with OMM still encode a per-triangle opaque flag. This opaque flag is used whenever OMMs are disabled via ray/instance flags.

##### Opacity Micromap Palette

If `omm_descriptor_count` is non-zero, then an “OMM palette” is present. The OMM palette, if present, is byte-aligned. Pad bits are inserted as required. All pad bits must be zero.

The OMM palette consists of a “hot-patched” section, and a “pre-computed” section. The “hot-patched” section is so named because it is expected to be patched at runtime with OMM information when an acceleration structure is constructed. The “pre-computed” section is computed by the application at DGF encoding time. The size and position of the hot-patched section are exposed to applications through the API, but its precise contents are not.

When encoding a DGF block that is expected to be used with OMMs, the encoder must reserve space for the hot-patched section, and place the pre-computed section immediately after it.

- The “hot-patched” section contains 8 bytes, plus 4 bytes for each OMM descriptor. The application must initialize this space with zeros.

- The “pre-computed” section contains a per-triangle index indicating which OMM descriptor to use.

  - Triangles are ordered from front to back in ascending order

  - The number of bits per index is derived from the `omm_descriptor_count` field in the header.

  - The pre-computed section is padded out to the next byte boundary, and all pad bits must be zero.

The following table shows the OMM palette configuration for each value of `omm_descriptor_count`:

omm_descriptor_count | Hot-patch Section Size (Bytes) | Precomputed Section (Bits per Triangle)
--- | --- | ---
0 | 0 | 0
1 | 12 | 0
2 | 16 | 1
3 | 20 | 2
4 | 24 | 2
5 | 28 | 3
6 | 32 | 3
7 | 36 | 3

The following pseudo-code computes the size, in bits, of an OMM palette:

    int compute_palette_size( uint numDescriptors, uint numTriangles )
    {
        if( numDescriptors == 0 )
                return 0;

            uint hotPatchSize    = 64 + 32*numTriangles;
            uint bitsPerIndex    = ceil( log2(numDescriptors) );
            uint precomputedSize = bitsPerIndex*numTriangles;
        precomputedSize = (precomputedSize + 7) & ~7; // byte align

            return hotPatchSize + precomputedSize;
    }

The following pseudo-code illustrates how an encoder could construct the pre-computed section of the OMM palette:

    //
    // Calculates the descriptor indices in the 'pre-computed' section of an OMM palette.
    //   The return value is the number of OMM descriptors used.
    //
    // A return value of -1 indicates that the triangles contain too many unique OMMs and must be split into multiple blocks.
    //
    int build_omm_palette( uint descriptorIndices[], uint numTriangles, const int* ommIndices, uint spaceAvailable )
    {
        int ommDescriptors[MAX_DESCRIPTORS];
        int numDescriptors=0;

        for( uint triangleIndex = 0; triangleIndex < numTriangles; triangleIndex++ )
        {
                // determine the OMM index assigned to this triangle
            int ommIndex = ommIndices[triangleIndex];

                    // search for an existing descriptor for this OMM or special-index value
                    uint descriptorIndex=0;

            while(descriptorIndex < numDescriptors )
                    {
                            if( ommPalette[descriptorIndex] == ommIndex )
                    break;

                descriptorIndex++;
            }

                    // if an existing descriptor was not found, attempt to allocate one
                    //  if unsuccessful, the encoder must split the triangles into multiple blocks
                    if( descriptorIndex == numDescriptors )
                    {
                            if( numDescriptors == MAX_DESCRIPTORS )
                                return -1; // block must be split
                            else
                                ommPalette[numDescriptors++] = ommIndex;
                }

                    descriptorIndices[triangleIndex] = descriptorIndex;
        }

            // split the triangles if the resulting palette cannot fit in the block
            if( compute_palette_size(numTriangles,numDescriptors) > spaceAvailable )
                return -1;

            return numDescriptors;
    }

#### 44.1.8. Optional UserData

The DGF block can optionally embed one DWORD of user-defined data, which is useful for locating vertex attributes.

Applications which use UserData must set the corresponding field in the DGF header and populate the corresponding bits.

## 45. Micromap

### 45.1. Micromaps

Acceleration structures store and organize geometry for ray tracing, but in some cases it is beneficial to include some information within the geometry, particularly for triangles. A micromap organizes this data around a map of values corresponding to subdivided microtriangles which can be added to a triangle geometry when building a bottom level acceleration structure.

An opacity micromap is a type of micromap which stores information to control intersection opacity as described in Ray Opacity Micromap.

A displacement micromap is a type of micromap which stores information to displace sub-triangle vertices as described in Displacement Micromap.

A micromap is considered to be constructed if a micromap build command or copy command has been executed with the given micromap as the destination.

#### 45.1.1. Building Micromaps

Micromaps created with `VK_KHR_opacity_micromap`, which are represented by VkAccelerationStructureKHR objects, are built with device build commands.

When building micromaps with vkCmdBuildAccelerationStructuresKHR, a `VkAccelerationStructureGeometryMicromapDataKHR` structure can be added to the `pNext` chain of VkAccelerationStructureGeometryKHR to specify the data used to build the micromap.

The `VkAccelerationStructureGeometryMicromapDataKHR` structure is defined as:

    // Provided by VK_KHR_opacity_micromap
    typedef struct VkAccelerationStructureGeometryMicromapDataKHR {
        VkStructureType                     sType;
        const void*                         pNext;
        uint32_t                            usageCountsCount;
        const VkMicromapUsageKHR*           pUsageCounts;
        const VkMicromapUsageKHR* const*    ppUsageCounts;
        VkDeviceAddress                     data;
        VkDeviceAddress                     triangleArray;
        VkDeviceSize                        triangleArrayStride;
    } VkAccelerationStructureGeometryMicromapDataKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `usageCountsCount` specifies the number of usage counts structures that will be used to determine the size of this micromap.

- `pUsageCounts` is a pointer to an array of VkMicromapUsageKHR structures.

- `ppUsageCounts` is a pointer to an array of pointers to VkMicromapUsageKHR structures.

- `data` is the device address to memory which contains the data for the micromap.

- `triangleArray` is the device address to memory containing the VkMicromapTriangleKHR data

- `triangleArrayStride` is the stride in bytes between each element of `triangleArray`

Only one of `pUsageCounts` or `ppUsageCounts` can be a valid pointer, the other must be `NULL`. The elements of the non-`NULL` array describe the total counts used to build each micromap. Each element contains a `count` which is the number of micromap triangles of that `format` and `subdivisionLevel` contained in the micromap. Multiple elements with the same `format` and `subdivisionLevel` are allowed and the total count for that `format` and `subdivisionLevel` is the sum of the `count` for each element.

Each micromap triangle refers to one element in `triangleArray` which contains the `format` and `subdivisionLevel` for that particular triangle as well as a `dataOffset` in bytes which is the location relative to `data` where that triangle’s micromap data begins. The data at `triangleArray` is laid out as a 4 byte unsigned integer for the `dataOffset` followed by a 2 byte unsigned integer for the subdivision level then a 2 byte unsigned integer for the format. In practice, compilers compile VkMicromapTriangleKHR to match this pattern.

For opacity micromaps, the data at `data` is packed as either one bit per element for VK_OPACITY_MICROMAP_FORMAT_2_STATE_KHR or two bits per element for VK_OPACITY_MICROMAP_FORMAT_4_STATE_KHR and is packed from LSB to MSB in each byte. The data at each index in those bytes is interpreted as discussed in Ray Opacity Micromap.

Valid Usage

- VUID-VkAccelerationStructureGeometryMicromapDataKHR-pUsageCounts-11642
  Only one of `pUsageCounts` or `ppUsageCounts` can be a valid pointer, the other must be `NULL`

- VUID-VkAccelerationStructureGeometryMicromapDataKHR-count-11643
  The total sum of `count` from all elements of `pUsageCounts` and `ppUsageCounts` must be less than or equal to `maxMicromapTriangles`

- VUID-VkAccelerationStructureGeometryMicromapDataKHR-subdivisionLevel-11645
  For each member of `pUsageCounts` or `ppUsageCounts`, if `format` is VK_OPACITY_MICROMAP_FORMAT_2_STATE_KHR, `subdivisionLevel` must be less than or equal to `maxOpacity2StateSubdivisionLevel`

- VUID-VkAccelerationStructureGeometryMicromapDataKHR-triangleArrayStride-11646
  `triangleArrayStride` must be greater than or equal to `8` bytes

- VUID-VkAccelerationStructureGeometryMicromapDataKHR-triangleArrayStride-11647
  `triangleArrayStride` must be a multiple of `4` bytes

Valid Usage (Implicit)

- VUID-VkAccelerationStructureGeometryMicromapDataKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_MICROMAP_DATA_KHR

- VUID-VkAccelerationStructureGeometryMicromapDataKHR-pUsageCounts-parameter
  If `usageCountsCount` is not `0`, and `pUsageCounts` is not `NULL`, `pUsageCounts` must be a valid pointer to an array of `usageCountsCount` valid VkMicromapUsageKHR structures

- VUID-VkAccelerationStructureGeometryMicromapDataKHR-ppUsageCounts-parameter
  If `usageCountsCount` is not `0`, and `ppUsageCounts` is not `NULL`, `ppUsageCounts` must be a valid pointer to an array of `usageCountsCount` valid pointers to valid VkMicromapUsageKHR structures

Structure Chaining

Extends the structure

  - VkAccelerationStructureGeometryKHR

The `VkMicromapUsageKHR` structure is defined as:

    // Provided by VK_KHR_opacity_micromap
    typedef struct VkMicromapUsageKHR {
        uint32_t                      count;
        uint32_t                      subdivisionLevel;
        VkOpacityMicromapFormatKHR    format;
    } VkMicromapUsageKHR;

- `count` is the number of triangles in the usage format defined by the `subdivisionLevel` and `format` below in the micromap

- `subdivisionLevel` is the subdivision level of this usage format

- `format` is the format of this usage format

The `format` is interpreted based on the `type` of the micromap using it.

Valid Usage (Implicit)

- VUID-VkMicromapUsageKHR-format-parameter
  `format` must be a valid VkOpacityMicromapFormatKHR value

The `VkMicromapUsageEXT` structure is defined as:

    // Provided by VK_EXT_opacity_micromap
    typedef struct VkMicromapUsageEXT {
        uint32_t    count;
        uint32_t    subdivisionLevel;
        uint32_t    format;
    } VkMicromapUsageEXT;

- `count` is the number of triangles in the usage format defined by the `subdivisionLevel` and `format` below in the micromap

- `subdivisionLevel` is the subdivision level of this usage format

- `format` is the format of this usage format

The `format` is interpreted based on the `type` of the micromap using it.

The `VkMicromapTriangleKHR` structure is defined as:

    // Provided by VK_KHR_opacity_micromap
    typedef struct VkMicromapTriangleKHR {
        uint32_t    dataOffset;
        uint16_t    subdivisionLevel;
        uint16_t    format;
    } VkMicromapTriangleKHR;

    // Provided by VK_EXT_opacity_micromap
    // Equivalent to VkMicromapTriangleKHR
    typedef VkMicromapTriangleKHR VkMicromapTriangleEXT;

- `dataOffset` is the offset in bytes of the start of the data for this triangle. This is a byte aligned value.

- `subdivisionLevel` is the subdivision level of this triangle

- `format` is the format of this triangle

The `format` is interpreted based on the `type` of the micromap using it.

Formats which can be set in VkMicromapUsageKHR::`format` and VkMicromapTriangleKHR::`format` for micromap builds, are:

    // Provided by VK_KHR_opacity_micromap
    typedef enum VkOpacityMicromapFormatKHR {
        VK_OPACITY_MICROMAP_FORMAT_2_STATE_KHR = 1,
        VK_OPACITY_MICROMAP_FORMAT_4_STATE_KHR = 2,
      // Provided by VK_EXT_opacity_micromap
        VK_OPACITY_MICROMAP_FORMAT_2_STATE_EXT = VK_OPACITY_MICROMAP_FORMAT_2_STATE_KHR,
      // Provided by VK_EXT_opacity_micromap
        VK_OPACITY_MICROMAP_FORMAT_4_STATE_EXT = VK_OPACITY_MICROMAP_FORMAT_4_STATE_KHR,
    } VkOpacityMicromapFormatKHR;

    // Provided by VK_EXT_opacity_micromap
    // Equivalent to VkOpacityMicromapFormatKHR
    typedef VkOpacityMicromapFormatKHR VkOpacityMicromapFormatEXT;

- VK_OPACITY_MICROMAP_FORMAT_2_STATE_KHR specifies that the given micromap format has one bit per subtriangle encoding either fully opaque or fully transparent.

- VK_OPACITY_MICROMAP_FORMAT_4_STATE_KHR specifies that the given micromap format has two bits per subtriangle encoding four modes which can be interpreted as described in Ray Opacity Micromap.

Note | For compactness, these values are stored as 16-bit in some structures.

To build micromaps represented as a VkMicromapEXT object call:

    // Provided by VK_EXT_opacity_micromap
    void vkCmdBuildMicromapsEXT(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    infoCount,
        const VkMicromapBuildInfoEXT*               pInfos);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `infoCount` is the number of micromaps to build. It specifies the number of the `pInfos` structures that must be provided.

- `pInfos` is a pointer to an array of `infoCount` VkMicromapBuildInfoEXT structures defining the data used to build each micromap.

The `vkCmdBuildMicromapsEXT` command provides the ability to initiate multiple micromaps builds, however there is no ordering or synchronization implied between any of the individual micromap builds.

Note | This means that there cannot be any memory aliasing between any micromap memories or scratch memories being used by any of the builds.

The input buffers passed to this command will be referenced by the implementation for the duration of the command’s execution on the device. Micromaps must be fully self-contained. The application can reuse or free any memory which was used by this command’s execution on the device as an input or as scratch without affecting the results of a subsequent acceleration structure build using the micromap or traversal of that acceleration structure, provided proper synchronization is used as described below.

Accesses to the micromap scratch buffers as identified by the VkMicromapBuildInfoEXT::`scratchData` buffer device addresses must be synchronized with the VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT pipeline stage and an access type of (VK_ACCESS_2_MICROMAP_READ_BIT_EXT | VK_ACCESS_2_MICROMAP_WRITE_BIT_EXT). Accesses to VkMicromapBuildInfoEXT::`dstMicromap` must be synchronized with the VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT pipeline stage and an access type of VK_ACCESS_2_MICROMAP_WRITE_BIT_EXT.

Accesses to other input buffers as identified by any used values of VkMicromapBuildInfoEXT::`data` or VkMicromapBuildInfoEXT::`triangleArray` must be synchronized with the VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT pipeline stage and an access type of VK_ACCESS_SHADER_READ_BIT.

Valid Usage

- VUID-vkCmdBuildMicromapsEXT-pInfos-07461
  For each `pInfos`[i], `dstMicromap` must have been created with a value of VkMicromapCreateInfoEXT::`size` greater than or equal to the memory size required by the build operation, as returned by vkGetMicromapBuildSizesEXT with `pBuildInfo` = `pInfos`[i]

- VUID-vkCmdBuildMicromapsEXT-mode-07462
  The `mode` member of each element of `pInfos` must be a valid VkBuildMicromapModeEXT value

- VUID-vkCmdBuildMicromapsEXT-dstMicromap-07463
  The `dstMicromap` member of any element of `pInfos` must be a valid VkMicromapEXT handle

- VUID-vkCmdBuildMicromapsEXT-pInfos-07464
  For each element of `pInfos` its `type` member must match the value of VkMicromapCreateInfoEXT::`type` when its `dstMicromap` was created

- VUID-vkCmdBuildMicromapsEXT-micromap-11648
  The `VkPhysicalDeviceOpacityMicromapFeaturesEXT`::`micromap` feature must be enabled

- VUID-vkCmdBuildMicromapsEXT-pInfos-07508
  For each element of `pInfos`, the `buffer` used to create its `dstMicromap` member must be bound to device memory

- VUID-vkCmdBuildMicromapsEXT-pInfos-07509
  If `pInfos`[i].`mode` is VK_BUILD_MICROMAP_MODE_BUILD_EXT, all addresses between `pInfos`[i].`scratchData.deviceAddress` and `pInfos`[i].`scratchData.deviceAddress` + N - 1 must be in the buffer device address range of the same buffer, where N is given by the `buildScratchSize` member of the VkMicromapBuildSizesInfoEXT structure returned from a call to vkGetMicromapBuildSizesEXT with an identical VkMicromapBuildInfoEXT structure and primitive count

- VUID-vkCmdBuildMicromapsEXT-data-07510
  The buffers from which the buffer device addresses for all of the `data` and `triangleArray` members of all `pInfos`[i] are queried must have been created with the VK_BUFFER_USAGE_MICROMAP_BUILD_INPUT_READ_ONLY_BIT_EXT usage flag set

- VUID-vkCmdBuildMicromapsEXT-pInfos-07511
  For each element of `pInfos`[i] the buffer from which the buffer device address `pInfos`[i].`scratchData.deviceAddress` is queried must have been created with the VK_BUFFER_USAGE_STORAGE_BUFFER_BIT usage flag set

- VUID-vkCmdBuildMicromapsEXT-pInfos-07512
  For each element of `pInfos`, if the value of VkMicromapBuildSizesInfoEXT::`buildScratchSize`, returned from a call to vkGetMicromapBuildSizesEXT with an identical VkMicromapBuildInfoEXT structure, is not `0`, `scratchData.deviceAddress` must be a valid VkDeviceAddress

- VUID-vkCmdBuildMicromapsEXT-pInfos-10896
  For each element of `pInfos`, `data.deviceAddress` must be a valid VkDeviceAddress

- VUID-vkCmdBuildMicromapsEXT-pInfos-10897
  For each element of `pInfos`, `triangleArray.deviceAddress` must be a valid VkDeviceAddress

- VUID-vkCmdBuildMicromapsEXT-pInfos-07514
  For each element of `pInfos`, its `scratchData.deviceAddress` member must be a multiple of VkPhysicalDeviceAccelerationStructurePropertiesKHR::`minAccelerationStructureScratchOffsetAlignment`

- VUID-vkCmdBuildMicromapsEXT-pInfos-07515
  For each element of `pInfos`, its `triangleArray.deviceAddress` and `data.deviceAddress` members must be a multiple of `256`

- VUID-vkCmdBuildMicromapsEXT-dstMicromap-11649
  The range of memory backing the `dstMicromap` member of any element of `pInfos` that is accessed by the execution of this command on the device must not overlap the memory backing the `dstMicromap` member of any other element of `pInfos`, which is accessed by the execution of this command on the device

- VUID-vkCmdBuildMicromapsEXT-dstMicromap-11650
  The range of memory backing the `dstMicromap` member of any element of `pInfos` that is accessed by the execution of this command on the device must not overlap the memory backing the `scratchData` member of any element of `pInfos` (including the same element), which is accessed by the execution of this command on the device

- VUID-vkCmdBuildMicromapsEXT-scratchData-11651
  The range of memory backing the `scratchData` member of any element of `pInfos` that is accessed by the execution of this command on the device must not overlap the memory backing the `scratchData` member of any other element of `pInfos`, which is accessed by the execution of this command on the device

Valid Usage (Implicit)

- VUID-vkCmdBuildMicromapsEXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdBuildMicromapsEXT-pInfos-parameter
  `pInfos` must be a valid pointer to an array of `infoCount` valid VkMicromapBuildInfoEXT structures

- VUID-vkCmdBuildMicromapsEXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdBuildMicromapsEXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT operations

- VUID-vkCmdBuildMicromapsEXT-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdBuildMicromapsEXT-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdBuildMicromapsEXT-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdBuildMicromapsEXT-infoCount-arraylength
  `infoCount` must be greater than `0`

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Outside | VK_QUEUE_COMPUTE_BIT | Action

Conditional Rendering

vkCmdBuildMicromapsEXT is not affected by conditional rendering

The `VkMicromapBuildInfoEXT` structure is defined as:

    // Provided by VK_EXT_opacity_micromap
    typedef struct VkMicromapBuildInfoEXT {
        VkStructureType                     sType;
        const void*                         pNext;
        VkMicromapTypeEXT                   type;
        VkBuildMicromapFlagsEXT             flags;
        VkBuildMicromapModeEXT              mode;
        VkMicromapEXT                       dstMicromap;
        uint32_t                            usageCountsCount;
        const VkMicromapUsageEXT*           pUsageCounts;
        const VkMicromapUsageEXT* const*    ppUsageCounts;
        VkDeviceOrHostAddressConstKHR       data;
        VkDeviceOrHostAddressKHR            scratchData;
        VkDeviceOrHostAddressConstKHR       triangleArray;
        VkDeviceSize                        triangleArrayStride;
    } VkMicromapBuildInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `type` is a VkMicromapTypeEXT value specifying the type of micromap being built.

- `flags` is a bitmask of VkBuildMicromapFlagBitsEXT specifying additional parameters of the micromap.

- `mode` is a VkBuildMicromapModeEXT value specifying the type of operation to perform.

- `dstMicromap` is a pointer to the target micromap for the build.

- `usageCountsCount` specifies the number of usage counts structures that will be used to determine the size of this micromap.

- `pUsageCounts` is a pointer to an array of VkMicromapUsageEXT structures.

- `ppUsageCounts` is a pointer to an array of pointers to VkMicromapUsageEXT structures.

- `data` is the device or host address of memory which contains the data for the micromap.

- `scratchData` is the device or host address of memory that will be used as scratch memory for the build.

- `triangleArray` is the device or host address of memory containing the VkMicromapTriangleEXT data

- `triangleArrayStride` is the stride in bytes between each element of `triangleArray`

Only one of `pUsageCounts` or `ppUsageCounts` can be a valid pointer, the other must be `NULL`. The elements of the non-`NULL` array describe the total counts used to build each micromap. Each element contains a `count` which is the number of micromap triangles of that `format` and `subdivisionLevel` contained in the micromap. Multiple elements with the same `format` and `subdivisionLevel` are allowed and the total count for that `format` and `subdivisionLevel` is the sum of the `count` for each element.

Each micromap triangle refers to one element in `triangleArray` which contains the `format` and `subdivisionLevel` for that particular triangle as well as a `dataOffset` in bytes which is the location relative to `data` where that triangle’s micromap data begins. The data at `triangleArray` is laid out as a 4 byte unsigned integer for the `dataOffset` followed by a 2 byte unsigned integer for the subdivision level then a 2 byte unsigned integer for the format. In practice, compilers compile VkMicromapTriangleEXT to match this pattern.

For opacity micromaps, the data at `data` is packed as either one bit per element for VK_OPACITY_MICROMAP_FORMAT_2_STATE_EXT or two bits per element for VK_OPACITY_MICROMAP_FORMAT_4_STATE_EXT and is packed from LSB to MSB in each byte. The data at each index in those bytes is interpreted as discussed in Ray Opacity Micromap.

For displacement micromaps, the data at `data` is interpreted as discussed in Displacement Micromap Encoding.

Valid Usage

- VUID-VkMicromapBuildInfoEXT-pUsageCounts-07516
  Only one of `pUsageCounts` or `ppUsageCounts` can be a valid pointer, the other must be `NULL`

- VUID-VkMicromapBuildInfoEXT-format-11652
  If `type` is VK_MICROMAP_TYPE_OPACITY_MICROMAP_EXT, for each member of `pUsageCounts` or `ppUsageCounts`, `format` must be a valid value from VkOpacityMicromapFormatEXT

- VUID-VkMicromapBuildInfoEXT-format-11653
  If `type` is VK_MICROMAP_TYPE_DISPLACEMENT_MICROMAP_NV, for each member of `pUsageCounts` or `ppUsageCounts`, `format` must be a valid value from VkDisplacementMicromapFormatNV

- VUID-VkMicromapBuildInfoEXT-subdivisionLevel-11654
  If `type` is VK_MICROMAP_TYPE_OPACITY_MICROMAP_EXT, for each member of `pUsageCounts` or `ppUsageCounts`, if `format` is VK_OPACITY_MICROMAP_FORMAT_2_STATE_EXT, `subdivisionLevel` must be less than or equal to VkPhysicalDeviceOpacityMicromapPropertiesEXT::`maxOpacity2StateSubdivisionLevel`

- VUID-VkMicromapBuildInfoEXT-subdivisionLevel-11655
  If `type` is VK_MICROMAP_TYPE_OPACITY_MICROMAP_EXT, for each member of `pUsageCounts` or `ppUsageCounts`, if `format` is VK_OPACITY_MICROMAP_FORMAT_4_STATE_EXT, `subdivisionLevel` must be less than or equal to VkPhysicalDeviceOpacityMicromapPropertiesEXT::`maxOpacity4StateSubdivisionLevel`

- VUID-VkMicromapBuildInfoEXT-subdivisionLevel-11656
  If `type` is VK_MICROMAP_TYPE_DISPLACEMENT_MICROMAP_NV, for each member of `pUsageCounts` or `ppUsageCounts`, `subdivisionLevel` must be less than or equal to VkPhysicalDeviceDisplacementMicromapPropertiesNV::`maxDisplacementMicromapSubdivisionLevel`

- VUID-VkMicromapBuildInfoEXT-format-11657
  If `type` is VK_MICROMAP_TYPE_OPACITY_MICROMAP_EXT, for each member of `triangleArray`, `format` must be a valid value from VkOpacityMicromapFormatEXT

- VUID-VkMicromapBuildInfoEXT-format-11658
  If `type` is VK_MICROMAP_TYPE_DISPLACEMENT_MICROMAP_NV, for each member of `triangleArray`, `format` must be a valid value from VkDisplacementMicromapFormatNV

- VUID-VkMicromapBuildInfoEXT-subdivisionLevel-11659
  If `type` is VK_MICROMAP_TYPE_OPACITY_MICROMAP_EXT, for each member of `triangleArray`, if `format` is VK_OPACITY_MICROMAP_FORMAT_2_STATE_EXT, `subdivisionLevel` must be less than or equal to VkPhysicalDeviceOpacityMicromapPropertiesEXT::`maxOpacity2StateSubdivisionLevel`

- VUID-VkMicromapBuildInfoEXT-subdivisionLevel-11660
  If `type` is VK_MICROMAP_TYPE_OPACITY_MICROMAP_EXT, for each member of `triangleArray`, if `format` is VK_OPACITY_MICROMAP_FORMAT_4_STATE_EXT, `subdivisionLevel` must be less than or equal to VkPhysicalDeviceOpacityMicromapPropertiesEXT::`maxOpacity4StateSubdivisionLevel`

- VUID-VkMicromapBuildInfoEXT-subdivisionLevel-11661
  If `type` is VK_MICROMAP_TYPE_DISPLACEMENT_MICROMAP_NV, for each member of `triangleArray`, `subdivisionLevel` must be less than or equal to VkPhysicalDeviceDisplacementMicromapPropertiesNV::`maxDisplacementMicromapSubdivisionLevel`

Valid Usage (Implicit)

- VUID-VkMicromapBuildInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_MICROMAP_BUILD_INFO_EXT

- VUID-VkMicromapBuildInfoEXT-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkMicromapBuildInfoEXT-type-parameter
  `type` must be a valid VkMicromapTypeEXT value

- VUID-VkMicromapBuildInfoEXT-flags-parameter
  `flags` must be a valid combination of VkBuildMicromapFlagBitsEXT values

- VUID-VkMicromapBuildInfoEXT-pUsageCounts-parameter
  If `usageCountsCount` is not `0`, and `pUsageCounts` is not `NULL`, `pUsageCounts` must be a valid pointer to an array of `usageCountsCount` VkMicromapUsageEXT structures

- VUID-VkMicromapBuildInfoEXT-ppUsageCounts-parameter
  If `usageCountsCount` is not `0`, and `ppUsageCounts` is not `NULL`, `ppUsageCounts` must be a valid pointer to an array of `usageCountsCount` valid pointers to VkMicromapUsageEXT structures

Bits which can be set in VkMicromapBuildInfoEXT::`flags` specifying additional parameters for micromap builds, are:

    // Provided by VK_EXT_opacity_micromap
    typedef enum VkBuildMicromapFlagBitsEXT {
        VK_BUILD_MICROMAP_PREFER_FAST_TRACE_BIT_EXT = 0x00000001,
        VK_BUILD_MICROMAP_PREFER_FAST_BUILD_BIT_EXT = 0x00000002,
        VK_BUILD_MICROMAP_ALLOW_COMPACTION_BIT_EXT = 0x00000004,
    } VkBuildMicromapFlagBitsEXT;

- VK_BUILD_MICROMAP_PREFER_FAST_TRACE_BIT_EXT specifies that the given micromap build should prioritize trace performance over build time.

- VK_BUILD_MICROMAP_PREFER_FAST_BUILD_BIT_EXT specifies that the given micromap build should prioritize build time over trace performance.

- VK_BUILD_MICROMAP_ALLOW_COMPACTION_BIT_EXT specifies that the micromap can act as the source for a copy micromap command with `mode` of VK_COPY_MICROMAP_MODE_COMPACT_EXT to produce a compacted micromap.

    // Provided by VK_EXT_opacity_micromap
    typedef VkFlags VkBuildMicromapFlagsEXT;

`VkBuildMicromapFlagsEXT` is a bitmask type for setting a mask of zero or more VkBuildMicromapFlagBitsEXT.

The VkBuildMicromapModeEXT enumeration is defined as:

    // Provided by VK_EXT_opacity_micromap
    typedef enum VkBuildMicromapModeEXT {
        VK_BUILD_MICROMAP_MODE_BUILD_EXT = 0,
    } VkBuildMicromapModeEXT;

- VK_BUILD_MICROMAP_MODE_BUILD_EXT specifies that the destination micromap will be built using the specified data.

Formats which can be set in VkMicromapUsageEXT::`format` and VkMicromapTriangleKHR::`format` for micromap builds, are:

    // Provided by VK_NV_displacement_micromap
    typedef enum VkDisplacementMicromapFormatNV {
        VK_DISPLACEMENT_MICROMAP_FORMAT_64_TRIANGLES_64_BYTES_NV = 1,
        VK_DISPLACEMENT_MICROMAP_FORMAT_256_TRIANGLES_128_BYTES_NV = 2,
        VK_DISPLACEMENT_MICROMAP_FORMAT_1024_TRIANGLES_128_BYTES_NV = 3,
    } VkDisplacementMicromapFormatNV;

- VK_DISPLACEMENT_MICROMAP_FORMAT_64_TRIANGLES_64_BYTES_NV specifies that the given micromap format encodes 64 micro-triangles worth of displacements in 64 bytes as described in Displacement Micromap Encoding.

- VK_DISPLACEMENT_MICROMAP_FORMAT_256_TRIANGLES_128_BYTES_NV specifies that the given micromap format encodes 256 micro-triangles worth of displacements in 128 bytes as described in Displacement Micromap Encoding.

- VK_DISPLACEMENT_MICROMAP_FORMAT_1024_TRIANGLES_128_BYTES_NV specifies that the given micromap format encodes 1024 micro-triangles worth of displacements in 128 bytes as described in Displacement Micromap Encoding.

Note | For compactness, these values are stored as 16-bit in some structures.

#### 45.1.2. Copying Micromaps

Micromaps created with `VK_KHR_opacity_micromap`, which are represented by VkAccelerationStructureKHR objects, are copied with device copy commands.

For VkMicromapEXT, an additional command exists for copying micromaps without updating their contents. Before copying, an application must query the size of the resulting micromap.

To query VkMicromapEXT size parameters call:

    // Provided by VK_EXT_opacity_micromap
    void vkCmdWriteMicromapsPropertiesEXT(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    micromapCount,
        const VkMicromapEXT*                        pMicromaps,
        VkQueryType                                 queryType,
        VkQueryPool                                 queryPool,
        uint32_t                                    firstQuery);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `micromapCount` is the count of micromaps for which to query the property.

- `pMicromaps` is a pointer to an array of existing previously built micromaps.

- `queryType` is a VkQueryType value specifying the type of queries managed by the pool.

- `queryPool` is the query pool that will manage the results of the query.

- `firstQuery` is the first query index within the query pool that will contain the `micromapCount` number of results.

Accesses to any of the micromaps listed in `pMicromaps` must be synchronized with the VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT pipeline stage and an access type of VK_ACCESS_2_MICROMAP_READ_BIT_EXT.

- If `queryType` is VK_QUERY_TYPE_MICROMAP_SERIALIZATION_SIZE_EXT, then the value written out is the number of bytes required by a serialized micromap.

- If `queryType` is VK_QUERY_TYPE_MICROMAP_COMPACTED_SIZE_EXT, then the value written out is the number of bytes required by a compacted micromap.

Valid Usage

- VUID-vkCmdWriteMicromapsPropertiesEXT-queryPool-07525
  `queryPool` must have been created with a `queryType` matching `queryType`

- VUID-vkCmdWriteMicromapsPropertiesEXT-None-12417
  All queries used by this command must be unavailable

- VUID-vkCmdWriteMicromapsPropertiesEXT-buffer-07527
  The `buffer` used to create each micromap in `pMicromaps` must be bound to device memory

- VUID-vkCmdWriteMicromapsPropertiesEXT-query-07528
  The sum of `query` plus `micromapCount` must be less than or equal to the number of queries in `queryPool`

- VUID-vkCmdWriteMicromapsPropertiesEXT-pMicromaps-11662
  All micromaps in `pMicromaps` must have been constructed prior to the execution of this command on the device

- VUID-vkCmdWriteMicromapsPropertiesEXT-pMicromaps-07502
  All micromaps in `pMicromaps` must have been constructed with VK_BUILD_MICROMAP_ALLOW_COMPACTION_BIT_EXT if `queryType` is VK_QUERY_TYPE_MICROMAP_COMPACTED_SIZE_EXT

- VUID-vkCmdWriteMicromapsPropertiesEXT-queryType-07503
  `queryType` must be VK_QUERY_TYPE_MICROMAP_COMPACTED_SIZE_EXT, or VK_QUERY_TYPE_MICROMAP_SERIALIZATION_SIZE_EXT

Valid Usage (Implicit)

- VUID-vkCmdWriteMicromapsPropertiesEXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdWriteMicromapsPropertiesEXT-pMicromaps-parameter
  `pMicromaps` must be a valid pointer to an array of `micromapCount` valid VkMicromapEXT handles

- VUID-vkCmdWriteMicromapsPropertiesEXT-queryPool-parameter
  `queryPool` must be a valid VkQueryPool handle

- VUID-vkCmdWriteMicromapsPropertiesEXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdWriteMicromapsPropertiesEXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT operations

- VUID-vkCmdWriteMicromapsPropertiesEXT-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdWriteMicromapsPropertiesEXT-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdWriteMicromapsPropertiesEXT-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdWriteMicromapsPropertiesEXT-micromapCount-arraylength
  `micromapCount` must be greater than `0`

- VUID-vkCmdWriteMicromapsPropertiesEXT-commonparent
  Each of `commandBuffer`, `queryPool`, and the elements of `pMicromaps` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Outside | VK_QUEUE_COMPUTE_BIT | Action

Conditional Rendering

vkCmdWriteMicromapsPropertiesEXT is not affected by conditional rendering

To copy a VkMicromapEXT call:

    // Provided by VK_EXT_opacity_micromap
    void vkCmdCopyMicromapEXT(
        VkCommandBuffer                             commandBuffer,
        const VkCopyMicromapInfoEXT*                pInfo);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `pInfo` is a pointer to a VkCopyMicromapInfoEXT structure defining the copy operation.

This command copies the `pInfo->src` micromap to the `pInfo->dst` micromap in the manner specified by `pInfo->mode`.

Accesses to `pInfo->src` and `pInfo->dst` must be synchronized with the VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT pipeline stage and an access type of VK_ACCESS_2_MICROMAP_READ_BIT_EXT or VK_ACCESS_2_MICROMAP_WRITE_BIT_EXT as appropriate.

Valid Usage

- VUID-vkCmdCopyMicromapEXT-buffer-07529
  The `buffer` used to create `pInfo->src` must be bound to device memory

- VUID-vkCmdCopyMicromapEXT-buffer-07530
  The `buffer` used to create `pInfo->dst` must must be bound to device memory

- VUID-vkCmdCopyMicromapEXT-src-07532
  The source micromap `src` must have been constructed prior to the execution of this command on the device

Valid Usage (Implicit)

- VUID-vkCmdCopyMicromapEXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdCopyMicromapEXT-pInfo-parameter
  `pInfo` must be a valid pointer to a valid VkCopyMicromapInfoEXT structure

- VUID-vkCmdCopyMicromapEXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdCopyMicromapEXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT operations

- VUID-vkCmdCopyMicromapEXT-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdCopyMicromapEXT-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdCopyMicromapEXT-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Outside | VK_QUEUE_COMPUTE_BIT | Action

Conditional Rendering

vkCmdCopyMicromapEXT is not affected by conditional rendering

The `VkCopyMicromapInfoEXT` structure is defined as:

    // Provided by VK_EXT_opacity_micromap
    typedef struct VkCopyMicromapInfoEXT {
        VkStructureType          sType;
        const void*              pNext;
        VkMicromapEXT            src;
        VkMicromapEXT            dst;
        VkCopyMicromapModeEXT    mode;
    } VkCopyMicromapInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `src` is the source micromap for the copy.

- `dst` is the target micromap for the copy.

- `mode` is a VkCopyMicromapModeEXT value specifying additional operations to perform during the copy.

Valid Usage

- VUID-VkCopyMicromapInfoEXT-mode-07531
  `mode` must be VK_COPY_MICROMAP_MODE_COMPACT_EXT or VK_COPY_MICROMAP_MODE_CLONE_EXT

- VUID-VkCopyMicromapInfoEXT-mode-07533
  If `mode` is VK_COPY_MICROMAP_MODE_COMPACT_EXT, `src` must have been constructed with VK_BUILD_MICROMAP_ALLOW_COMPACTION_BIT_EXT in the build

Valid Usage (Implicit)

- VUID-VkCopyMicromapInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_COPY_MICROMAP_INFO_EXT

- VUID-VkCopyMicromapInfoEXT-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkCopyMicromapInfoEXT-src-parameter
  `src` must be a valid VkMicromapEXT handle

- VUID-VkCopyMicromapInfoEXT-dst-parameter
  `dst` must be a valid VkMicromapEXT handle

- VUID-VkCopyMicromapInfoEXT-commonparent
  Both of `dst`, and `src` must have been created, allocated, or retrieved from the same VkDevice

Possible values of `mode` specifying additional operations to perform during the copy, are:

    // Provided by VK_EXT_opacity_micromap
    typedef enum VkCopyMicromapModeEXT {
        VK_COPY_MICROMAP_MODE_CLONE_EXT = 0,
        VK_COPY_MICROMAP_MODE_SERIALIZE_EXT = 1,
        VK_COPY_MICROMAP_MODE_DESERIALIZE_EXT = 2,
        VK_COPY_MICROMAP_MODE_COMPACT_EXT = 3,
    } VkCopyMicromapModeEXT;

- VK_COPY_MICROMAP_MODE_CLONE_EXT creates a direct copy of the micromap specified in `src` into the one specified by `dst`. The `dst` micromap must have been created with the same parameters as `src`.

- VK_COPY_MICROMAP_MODE_SERIALIZE_EXT serializes the micromap to a semi-opaque format which can be reloaded on a compatible implementation.

- VK_COPY_MICROMAP_MODE_DESERIALIZE_EXT deserializes the semi-opaque serialization format in the buffer to the micromap.

- VK_COPY_MICROMAP_MODE_COMPACT_EXT creates a more compact version of a micromap `src` into `dst`. The micromap `dst` must have been created with a size at least as large as that returned by vkCmdWriteMicromapsPropertiesEXT after the build of the micromap specified by `src`.

To copy a VkMicromapEXT to device memory call:

    // Provided by VK_EXT_opacity_micromap
    void vkCmdCopyMicromapToMemoryEXT(
        VkCommandBuffer                             commandBuffer,
        const VkCopyMicromapToMemoryInfoEXT*        pInfo);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `pInfo` is an a pointer to a VkCopyMicromapToMemoryInfoEXT structure defining the copy operation.

Accesses to `pInfo->src` must be synchronized with the VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT pipeline stage and an access type of VK_ACCESS_2_MICROMAP_READ_BIT_EXT. Accesses to the buffer indicated by `pInfo->dst` must be synchronized with the VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT pipeline stage and an access type of VK_ACCESS_TRANSFER_WRITE_BIT.

This command produces the same results as vkCopyMicromapToMemoryEXT, but writes its result to a device address, and is executed on the device rather than the host. The output may not necessarily be bit-for-bit identical, but is equally compatible for use with either vkCmdCopyMemoryToMicromapEXT or vkCopyMemoryToMicromapEXT.

The defined header structure for the serialized data consists of:

- VK_UUID_SIZE bytes of data matching `VkPhysicalDeviceIDProperties`::`driverUUID`

- VK_UUID_SIZE bytes of data identifying the compatibility for comparison using vkGetDeviceMicromapCompatibilityEXT

The serialized data is written to the buffer (or read from the buffer) according to the host endianness.

Valid Usage

- VUID-vkCmdCopyMicromapToMemoryEXT-pInfo-07536
  `pInfo->dst.deviceAddress` must be a valid VkDeviceAddress

- VUID-vkCmdCopyMicromapToMemoryEXT-pInfo-07537
  `pInfo->dst.deviceAddress` must be aligned to `256` bytes

- VUID-vkCmdCopyMicromapToMemoryEXT-buffer-07539
  The `buffer` used to create `pInfo->src` must be bound to device memory

Valid Usage (Implicit)

- VUID-vkCmdCopyMicromapToMemoryEXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdCopyMicromapToMemoryEXT-pInfo-parameter
  `pInfo` must be a valid pointer to a valid VkCopyMicromapToMemoryInfoEXT structure

- VUID-vkCmdCopyMicromapToMemoryEXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdCopyMicromapToMemoryEXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT operations

- VUID-vkCmdCopyMicromapToMemoryEXT-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdCopyMicromapToMemoryEXT-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdCopyMicromapToMemoryEXT-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Outside | VK_QUEUE_COMPUTE_BIT | Action

Conditional Rendering

vkCmdCopyMicromapToMemoryEXT is not affected by conditional rendering

    // Provided by VK_EXT_opacity_micromap
    typedef struct VkCopyMicromapToMemoryInfoEXT {
        VkStructureType             sType;
        const void*                 pNext;
        VkMicromapEXT               src;
        VkDeviceOrHostAddressKHR    dst;
        VkCopyMicromapModeEXT       mode;
    } VkCopyMicromapToMemoryInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `src` is the source micromap for the copy

- `dst` is the device or host address of memory which is the target for the copy

- `mode` is a VkCopyMicromapModeEXT value specifying additional operations to perform during the copy.

Valid Usage

- VUID-VkCopyMicromapToMemoryInfoEXT-src-07540
  The source micromap `src` must have been constructed prior to the execution of this command

- VUID-VkCopyMicromapToMemoryInfoEXT-dst-07541
  The memory pointed to by `dst` must be at least as large as the serialization size of `src`, as reported by vkWriteMicromapsPropertiesEXT or vkCmdWriteMicromapsPropertiesEXT with a query type of VK_QUERY_TYPE_MICROMAP_SERIALIZATION_SIZE_EXT

- VUID-VkCopyMicromapToMemoryInfoEXT-mode-07542
  `mode` must be VK_COPY_MICROMAP_MODE_SERIALIZE_EXT

Valid Usage (Implicit)

- VUID-VkCopyMicromapToMemoryInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_COPY_MICROMAP_TO_MEMORY_INFO_EXT

- VUID-VkCopyMicromapToMemoryInfoEXT-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkCopyMicromapToMemoryInfoEXT-src-parameter
  `src` must be a valid VkMicromapEXT handle

- VUID-VkCopyMicromapToMemoryInfoEXT-mode-parameter
  `mode` must be a valid VkCopyMicromapModeEXT value

To copy device memory to a micromap call:

    // Provided by VK_EXT_opacity_micromap
    void vkCmdCopyMemoryToMicromapEXT(
        VkCommandBuffer                             commandBuffer,
        const VkCopyMemoryToMicromapInfoEXT*        pInfo);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `pInfo` is a pointer to a VkCopyMemoryToMicromapInfoEXT structure defining the copy operation.

Accesses to `pInfo->dst` must be synchronized with the VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT pipeline stage and an access type of VK_ACCESS_2_MICROMAP_WRITE_BIT_EXT. Accesses to the buffer indicated by `pInfo->src` must be synchronized with the VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT pipeline stage and an access type of VK_ACCESS_TRANSFER_READ_BIT.

This command can accept micromaps produced by either vkCopyMicromapToMemoryEXT or vkCmdCopyMicromapToMemoryEXT.

Valid Usage

- VUID-vkCmdCopyMemoryToMicromapEXT-pInfo-07543
  `pInfo->src.deviceAddress` must be a valid VkDeviceAddress

- VUID-vkCmdCopyMemoryToMicromapEXT-pInfo-07544
  `pInfo->src.deviceAddress` must be aligned to `256` bytes

- VUID-vkCmdCopyMemoryToMicromapEXT-buffer-07546
  The `buffer` used to create `pInfo->dst` must be bound to device memory

Valid Usage (Implicit)

- VUID-vkCmdCopyMemoryToMicromapEXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdCopyMemoryToMicromapEXT-pInfo-parameter
  `pInfo` must be a valid pointer to a valid VkCopyMemoryToMicromapInfoEXT structure

- VUID-vkCmdCopyMemoryToMicromapEXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdCopyMemoryToMicromapEXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT operations

- VUID-vkCmdCopyMemoryToMicromapEXT-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdCopyMemoryToMicromapEXT-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdCopyMemoryToMicromapEXT-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Outside | VK_QUEUE_COMPUTE_BIT | Action

Conditional Rendering

vkCmdCopyMemoryToMicromapEXT is not affected by conditional rendering

The `VkCopyMemoryToMicromapInfoEXT` structure is defined as:

    // Provided by VK_EXT_opacity_micromap
    typedef struct VkCopyMemoryToMicromapInfoEXT {
        VkStructureType                  sType;
        const void*                      pNext;
        VkDeviceOrHostAddressConstKHR    src;
        VkMicromapEXT                    dst;
        VkCopyMicromapModeEXT            mode;
    } VkCopyMemoryToMicromapInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `src` is the device or host address of memory containing the source data for the copy.

- `dst` is the target micromap for the copy.

- `mode` is a VkCopyMicromapModeEXT value specifying additional operations to perform during the copy.

Valid Usage

- VUID-VkCopyMemoryToMicromapInfoEXT-src-07547
  The source memory pointed to by `src` must contain data previously serialized using vkCmdCopyMicromapToMemoryEXT

- VUID-VkCopyMemoryToMicromapInfoEXT-mode-07548
  `mode` must be VK_COPY_MICROMAP_MODE_DESERIALIZE_EXT

- VUID-VkCopyMemoryToMicromapInfoEXT-src-07549
  The data in `src` must have a format compatible with the destination physical device as returned by vkGetDeviceMicromapCompatibilityEXT

- VUID-VkCopyMemoryToMicromapInfoEXT-dst-07550
  `dst` must have been created with a `size` greater than or equal to that used to serialize the data in `src`

Valid Usage (Implicit)

- VUID-VkCopyMemoryToMicromapInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_COPY_MEMORY_TO_MICROMAP_INFO_EXT

- VUID-VkCopyMemoryToMicromapInfoEXT-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkCopyMemoryToMicromapInfoEXT-dst-parameter
  `dst` must be a valid VkMicromapEXT handle

- VUID-VkCopyMemoryToMicromapInfoEXT-mode-parameter
  `mode` must be a valid VkCopyMicromapModeEXT value

To check if a serialized VkMicromapEXT is compatible with the current device call:

    // Provided by VK_EXT_opacity_micromap
    void vkGetDeviceMicromapCompatibilityEXT(
        VkDevice                                    device,
        const VkMicromapVersionInfoEXT*             pVersionInfo,
        VkAccelerationStructureCompatibilityKHR*    pCompatibility);

- `device` is the device to check the version against.

- `pVersionInfo` is a pointer to a VkMicromapVersionInfoEXT structure specifying version information to check against the device.

- `pCompatibility` is a pointer to a VkAccelerationStructureCompatibilityKHR value in which compatibility information is returned.

Valid Usage

- VUID-vkGetDeviceMicromapCompatibilityEXT-micromap-11666
  The `VkPhysicalDeviceOpacityMicromapFeaturesEXT`::`micromap` feature must be enabled

Valid Usage (Implicit)

- VUID-vkGetDeviceMicromapCompatibilityEXT-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetDeviceMicromapCompatibilityEXT-pVersionInfo-parameter
  `pVersionInfo` must be a valid pointer to a valid VkMicromapVersionInfoEXT structure

- VUID-vkGetDeviceMicromapCompatibilityEXT-pCompatibility-parameter
  `pCompatibility` must be a valid pointer to a VkAccelerationStructureCompatibilityKHR value

The `VkMicromapVersionInfoEXT` structure is defined as:

    // Provided by VK_EXT_opacity_micromap
    typedef struct VkMicromapVersionInfoEXT {
        VkStructureType    sType;
        const void*        pNext;
        const uint8_t*     pVersionData;
    } VkMicromapVersionInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `pVersionData` is a pointer to the version header of a micromap as defined in vkCmdCopyMicromapToMemoryEXT

Note | `pVersionData` is a pointer to an array of 2×VK_UUID_SIZE `uint8_t` values instead of two VK_UUID_SIZE arrays as the expected use case for this member is to be pointed at the header of a previously serialized micromap that is loaded in memory. Using arrays would necessitate extra memory copies of the UUIDs.

Valid Usage (Implicit)

- VUID-VkMicromapVersionInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_MICROMAP_VERSION_INFO_EXT

- VUID-VkMicromapVersionInfoEXT-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkMicromapVersionInfoEXT-pVersionData-parameter
  `pVersionData` must be a valid pointer to an array of 2×VK_UUID_SIZE `uint8_t` values

### 45.2. Host Micromap Operations

Implementations are also required to provide host implementations of the micromap operations if the `VkPhysicalDeviceOpacityMicromapFeaturesEXT`::`micromapHostCommands`>> feature is enabled:

- vkBuildMicromapsEXT corresponding to vkCmdBuildMicromapsEXT

- vkCopyMicromapEXT corresponding to vkCmdCopyMicromapEXT

- vkCopyMicromapToMemoryEXT corresponding to vkCmdCopyMicromapToMemoryEXT

- vkCopyMemoryToMicromapEXT corresponding to vkCmdCopyMemoryToMicromapEXT

- vkWriteMicromapsPropertiesEXT corresponding to vkCmdWriteMicromapsPropertiesEXT

These commands are functionally equivalent to their device counterparts, except that they are executed on the host timeline, rather than being enqueued into command buffers.

All micromaps used by the host commands must be bound to host-visible memory, and all input data for micromap builds must be referenced using host addresses instead of device addresses. Applications are not required to map micromap memory when using the host commands.

Note | The vkBuildMicromapsEXT and vkCmdBuildMicromapsEXT may use different algorithms, and thus are not required to produce identical structures. Apart from these details, the host and device operations are interchangeable.

Note | For efficient execution, micromaps manipulated using these commands should always be bound to host cached memory, as the implementation may need to repeatedly read and write this memory during the execution of the command.

To build VkMicromapEXT on the host, call:

Warning | This functionality is superseded by vkCmdBuildMicromapsEXT. See Legacy Functionality for more information.

    // Provided by VK_EXT_opacity_micromap
    VkResult vkBuildMicromapsEXT(
        VkDevice                                    device,
        VkDeferredOperationKHR                      deferredOperation,
        uint32_t                                    infoCount,
        const VkMicromapBuildInfoEXT*               pInfos);

- `device` is the `VkDevice` for which the micromaps are being built.

- `deferredOperation` is an optional VkDeferredOperationKHR to request deferral for this command.

- `infoCount` is the number of micromaps to build. It specifies the number of the `pInfos` that must be provided.

- `pInfos` is a pointer to an array of `infoCount` VkMicromapBuildInfoEXT structures defining the geometry used to build each micromap.

This command fulfills the same task as vkCmdBuildMicromapsEXT but is executed by the host.

The `vkBuildMicromapsEXT` command provides the ability to initiate multiple micromaps builds, however there is no ordering or synchronization implied between any of the individual micromap builds.

Note | This means that there cannot be any memory aliasing between any micromap memories or scratch memories being used by any of the builds.

The input buffers passed to this command will be referenced by the implementation for the duration of the command. Micromaps must be fully self-contained. The application can reuse or free any memory which was used by the command as an input or as scratch without affecting the results of a subsequent acceleration structure build using the micromap or traversal of that acceleration structure.

Valid Usage

- VUID-vkBuildMicromapsEXT-pInfos-07461
  For each `pInfos`[i], `dstMicromap` must have been created with a value of VkMicromapCreateInfoEXT::`size` greater than or equal to the memory size required by the build operation, as returned by vkGetMicromapBuildSizesEXT with `pBuildInfo` = `pInfos`[i]

- VUID-vkBuildMicromapsEXT-mode-07462
  The `mode` member of each element of `pInfos` must be a valid VkBuildMicromapModeEXT value

- VUID-vkBuildMicromapsEXT-dstMicromap-07463
  The `dstMicromap` member of any element of `pInfos` must be a valid VkMicromapEXT handle

- VUID-vkBuildMicromapsEXT-pInfos-07464
  For each element of `pInfos` its `type` member must match the value of VkMicromapCreateInfoEXT::`type` when its `dstMicromap` was created

- VUID-vkBuildMicromapsEXT-pInfos-07552
  For each element of `pInfos`, the `buffer` used to create its `dstMicromap` member must be bound to host-visible device memory

- VUID-vkBuildMicromapsEXT-pInfos-07553
  For each element of `pInfos`, all referenced addresses of `pInfos`[i].`data.hostAddress` must be valid host memory

- VUID-vkBuildMicromapsEXT-pInfos-07554
  For each element of `pInfos`, all referenced addresses of `pInfos`[i].`triangleArray.hostAddress` must be valid host memory

- VUID-vkBuildMicromapsEXT-micromapHostCommands-07555
  The `VkPhysicalDeviceOpacityMicromapFeaturesEXT`::`micromapHostCommands` feature must be enabled

- VUID-vkBuildMicromapsEXT-pInfos-07556
  If `pInfos`[i].`mode` is VK_BUILD_MICROMAP_MODE_BUILD_EXT, and N is not `0`, then all addresses between `pInfos`[i].`scratchData.hostAddress` and `pInfos`[i].`scratchData.hostAddress` + N - 1 must be valid host memory, where N is given by the value of VkMicromapBuildSizesInfoEXT::`buildScratchSize` returned from a call to vkGetMicromapBuildSizesEXT with an identical VkMicromapBuildInfoEXT structure

- VUID-vkBuildMicromapsEXT-pInfos-07557
  For each element of `pInfos`, the `buffer` used to create its `dstMicromap` member must be bound to memory that was not allocated with multiple instances

- VUID-vkBuildMicromapsEXT-dstMicromap-11667
  The range of memory backing the `dstMicromap` member of any element of `pInfos` that is accessed by this command must not overlap the memory backing the `dstMicromap` member of any other element of `pInfos`, which is accessed by this command

- VUID-vkBuildMicromapsEXT-dstMicromap-11668
  The range of memory backing the `dstMicromap` member of any element of `pInfos` that is accessed by this command must not overlap the memory backing the `scratchData` member of any element of `pInfos` (including the same element), which is accessed by this command

- VUID-vkBuildMicromapsEXT-scratchData-11669
  The range of memory backing the `scratchData` member of any element of `pInfos` that is accessed by this command must not overlap the memory backing the `scratchData` member of any other element of `pInfos`, which is accessed by this command

Valid Usage (Implicit)

- VUID-vkBuildMicromapsEXT-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkBuildMicromapsEXT-deferredOperation-parameter
  If `deferredOperation` is not VK_NULL_HANDLE, `deferredOperation` must be a valid VkDeferredOperationKHR handle

- VUID-vkBuildMicromapsEXT-pInfos-parameter
  `pInfos` must be a valid pointer to an array of `infoCount` valid VkMicromapBuildInfoEXT structures

- VUID-vkBuildMicromapsEXT-infoCount-arraylength
  `infoCount` must be greater than `0`

- VUID-vkBuildMicromapsEXT-deferredOperation-parent
  If `deferredOperation` is a valid handle, it must have been created, allocated, or retrieved from `device`

Return Codes

Success

  - VK_OPERATION_DEFERRED_KHR

  - VK_OPERATION_NOT_DEFERRED_KHR

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

To copy or compact a VkMicromapEXT on the host, call:

Warning | This functionality is superseded by vkCmdCopyMicromapEXT. See Legacy Functionality for more information.

    // Provided by VK_EXT_opacity_micromap
    VkResult vkCopyMicromapEXT(
        VkDevice                                    device,
        VkDeferredOperationKHR                      deferredOperation,
        const VkCopyMicromapInfoEXT*                pInfo);

- `device` is the device which owns the micromaps.

- `deferredOperation` is an optional VkDeferredOperationKHR to request deferral for this command.

- `pInfo` is a pointer to a VkCopyMicromapInfoEXT structure defining the copy operation.

This command fulfills the same task as vkCmdCopyMicromapEXT but is executed by the host.

Valid Usage

- VUID-vkCopyMicromapEXT-deferredOperation-03678
  Any previous deferred operation that was associated with `deferredOperation` must be complete

- VUID-vkCopyMicromapEXT-buffer-07558
  The `buffer` used to create `pInfo->src` must be bound to host-visible device memory

- VUID-vkCopyMicromapEXT-buffer-07559
  The `buffer` used to create `pInfo->dst` must be bound to host-visible device memory

- VUID-vkCopyMicromapEXT-micromapHostCommands-07560
  The `VkPhysicalDeviceOpacityMicromapFeaturesEXT`::`micromapHostCommands` feature must be enabled

- VUID-vkCopyMicromapEXT-buffer-07561
  The `buffer` used to create `pInfo->src` must be bound to memory that was not allocated with multiple instances

- VUID-vkCopyMicromapEXT-buffer-07562
  The `buffer` used to create `pInfo->dst` must be bound to memory that was not allocated with multiple instances

- VUID-vkCopyMicromapEXT-src-11670
  The source micromap `src` must have been constructed prior to the execution of this command

Valid Usage (Implicit)

- VUID-vkCopyMicromapEXT-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkCopyMicromapEXT-deferredOperation-parameter
  If `deferredOperation` is not VK_NULL_HANDLE, `deferredOperation` must be a valid VkDeferredOperationKHR handle

- VUID-vkCopyMicromapEXT-pInfo-parameter
  `pInfo` must be a valid pointer to a valid VkCopyMicromapInfoEXT structure

- VUID-vkCopyMicromapEXT-deferredOperation-parent
  If `deferredOperation` is a valid handle, it must have been created, allocated, or retrieved from `device`

Return Codes

Success

  - VK_OPERATION_DEFERRED_KHR

  - VK_OPERATION_NOT_DEFERRED_KHR

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

To copy host accessible VkMicromapEXT to a micromap, call:

Warning | This functionality is superseded by vkCmdCopyMemoryToMicromapEXT. See Legacy Functionality for more information.

    // Provided by VK_EXT_opacity_micromap
    VkResult vkCopyMemoryToMicromapEXT(
        VkDevice                                    device,
        VkDeferredOperationKHR                      deferredOperation,
        const VkCopyMemoryToMicromapInfoEXT*        pInfo);

- `device` is the device which owns `pInfo->dst`.

- `deferredOperation` is an optional VkDeferredOperationKHR to request deferral for this command.

- `pInfo` is a pointer to a VkCopyMemoryToMicromapInfoEXT structure defining the copy operation.

This command fulfills the same task as vkCmdCopyMemoryToMicromapEXT but is executed by the host.

This command can accept micromaps produced by either vkCmdCopyMicromapToMemoryEXT or vkCopyMicromapToMemoryEXT.

Valid Usage

- VUID-vkCopyMemoryToMicromapEXT-deferredOperation-03678
  Any previous deferred operation that was associated with `deferredOperation` must be complete

- VUID-vkCopyMemoryToMicromapEXT-pInfo-07563
  `pInfo->src.hostAddress` must be a valid host pointer

- VUID-vkCopyMemoryToMicromapEXT-pInfo-07564
  `pInfo->src.hostAddress` must be aligned to 16 bytes

- VUID-vkCopyMemoryToMicromapEXT-buffer-07565
  The `buffer` used to create `pInfo->dst` must be bound to host-visible device memory

- VUID-vkCopyMemoryToMicromapEXT-micromapHostCommands-07566
  The `VkPhysicalDeviceOpacityMicromapFeaturesEXT`::`micromapHostCommands` feature must be enabled

- VUID-vkCopyMemoryToMicromapEXT-buffer-07567
  The `buffer` used to create `pInfo->dst` must be bound to memory that was not allocated with multiple instances

Valid Usage (Implicit)

- VUID-vkCopyMemoryToMicromapEXT-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkCopyMemoryToMicromapEXT-deferredOperation-parameter
  If `deferredOperation` is not VK_NULL_HANDLE, `deferredOperation` must be a valid VkDeferredOperationKHR handle

- VUID-vkCopyMemoryToMicromapEXT-pInfo-parameter
  `pInfo` must be a valid pointer to a valid VkCopyMemoryToMicromapInfoEXT structure

- VUID-vkCopyMemoryToMicromapEXT-deferredOperation-parent
  If `deferredOperation` is a valid handle, it must have been created, allocated, or retrieved from `device`

Return Codes

Success

  - VK_OPERATION_DEFERRED_KHR

  - VK_OPERATION_NOT_DEFERRED_KHR

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

To copy a VkMicromapEXT to host accessible memory, call:

Warning | This functionality is superseded by vkCmdCopyMicromapToMemoryEXT. See Legacy Functionality for more information.

    // Provided by VK_EXT_opacity_micromap
    VkResult vkCopyMicromapToMemoryEXT(
        VkDevice                                    device,
        VkDeferredOperationKHR                      deferredOperation,
        const VkCopyMicromapToMemoryInfoEXT*        pInfo);

- `device` is the device which owns `pInfo->src`.

- `deferredOperation` is an optional VkDeferredOperationKHR to request deferral for this command.

- `pInfo` is a pointer to a VkCopyMicromapToMemoryInfoEXT structure defining the copy operation.

This command fulfills the same task as vkCmdCopyMicromapToMemoryEXT but is executed by the host.

This command produces the same results as vkCmdCopyMicromapToMemoryEXT, but writes its result directly to a host pointer, and is executed on the host rather than the device. The output may not necessarily be bit-for-bit identical, but is compatible for use with either vkCmdCopyMemoryToMicromapEXT or vkCopyMemoryToMicromapEXT.

Valid Usage

- VUID-vkCopyMicromapToMemoryEXT-deferredOperation-03678
  Any previous deferred operation that was associated with `deferredOperation` must be complete

- VUID-vkCopyMicromapToMemoryEXT-buffer-07568
  The `buffer` used to create `pInfo->src` must be bound to host-visible device memory

- VUID-vkCopyMicromapToMemoryEXT-pInfo-07569
  `pInfo->dst.hostAddress` must be a valid host pointer

- VUID-vkCopyMicromapToMemoryEXT-pInfo-07570
  `pInfo->dst.hostAddress` must be aligned to 16 bytes

- VUID-vkCopyMicromapToMemoryEXT-micromapHostCommands-07571
  The `VkPhysicalDeviceOpacityMicromapFeaturesEXT`::`micromapHostCommands` feature must be enabled

- VUID-vkCopyMicromapToMemoryEXT-buffer-07572
  The `buffer` used to create `pInfo->src` must be bound to memory that was not allocated with multiple instances

Valid Usage (Implicit)

- VUID-vkCopyMicromapToMemoryEXT-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkCopyMicromapToMemoryEXT-deferredOperation-parameter
  If `deferredOperation` is not VK_NULL_HANDLE, `deferredOperation` must be a valid VkDeferredOperationKHR handle

- VUID-vkCopyMicromapToMemoryEXT-pInfo-parameter
  `pInfo` must be a valid pointer to a valid VkCopyMicromapToMemoryInfoEXT structure

- VUID-vkCopyMicromapToMemoryEXT-deferredOperation-parent
  If `deferredOperation` is a valid handle, it must have been created, allocated, or retrieved from `device`

Return Codes

Success

  - VK_OPERATION_DEFERRED_KHR

  - VK_OPERATION_NOT_DEFERRED_KHR

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

To query VkMicromapEXT size parameters on the host, call:

Warning | This functionality is superseded by vkCmdWriteMicromapsPropertiesEXT. See Legacy Functionality for more information.

    // Provided by VK_EXT_opacity_micromap
    VkResult vkWriteMicromapsPropertiesEXT(
        VkDevice                                    device,
        uint32_t                                    micromapCount,
        const VkMicromapEXT*                        pMicromaps,
        VkQueryType                                 queryType,
        size_t                                      dataSize,
        void*                                       pData,
        size_t                                      stride);

- `device` is the device which owns the micromaps in `pMicromaps`.

- `micromapCount` is the count of micromaps for which to query the property.

- `pMicromaps` is a pointer to an array of existing previously built micromaps.

- `queryType` is a VkQueryType value specifying the property to be queried.

- `dataSize` is the size in bytes of the buffer pointed to by `pData`.

- `pData` is a pointer to an application-allocated buffer where the results will be written.

- `stride` is the stride in bytes between results for individual queries within `pData`.

This command fulfills the same task as vkCmdWriteMicromapsPropertiesEXT but is executed by the host.

Valid Usage

- VUID-vkWriteMicromapsPropertiesEXT-pMicromaps-07502
  All micromaps in `pMicromaps` must have been constructed with VK_BUILD_MICROMAP_ALLOW_COMPACTION_BIT_EXT if `queryType` is VK_QUERY_TYPE_MICROMAP_COMPACTED_SIZE_EXT

- VUID-vkWriteMicromapsPropertiesEXT-queryType-07503
  `queryType` must be VK_QUERY_TYPE_MICROMAP_COMPACTED_SIZE_EXT, or VK_QUERY_TYPE_MICROMAP_SERIALIZATION_SIZE_EXT

- VUID-vkWriteMicromapsPropertiesEXT-queryType-10071
  If `queryType` is VK_QUERY_TYPE_MICROMAP_SERIALIZATION_SIZE_EXT or VK_QUERY_TYPE_MICROMAP_COMPACTED_SIZE_EXT then `stride` must be a multiple of the size of VkDeviceSize

- VUID-vkWriteMicromapsPropertiesEXT-queryType-10072
  If `queryType` is VK_QUERY_TYPE_MICROMAP_SERIALIZATION_SIZE_EXT or VK_QUERY_TYPE_MICROMAP_COMPACTED_SIZE_EXT then `pData` must point to a VkDeviceSize

- VUID-vkWriteMicromapsPropertiesEXT-dataSize-07576
  `dataSize` must be greater than or equal to `micromapCount`*`stride`

- VUID-vkWriteMicromapsPropertiesEXT-buffer-07577
  The `buffer` used to create each micromap in `pMicromaps` must be bound to host-visible device memory

- VUID-vkWriteMicromapsPropertiesEXT-micromapHostCommands-07578
  The `VkPhysicalDeviceOpacityMicromapFeaturesEXT`::`micromapHostCommands` feature must be enabled

- VUID-vkWriteMicromapsPropertiesEXT-buffer-07579
  The `buffer` used to create each micromap in `pMicromaps` must be bound to memory that was not allocated with multiple instances

- VUID-vkWriteMicromapsPropertiesEXT-pMicromaps-11671
  All micromaps in `pMicromaps` must have been constructed prior to the execution of this command

Valid Usage (Implicit)

- VUID-vkWriteMicromapsPropertiesEXT-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkWriteMicromapsPropertiesEXT-pMicromaps-parameter
  `pMicromaps` must be a valid pointer to an array of `micromapCount` valid VkMicromapEXT handles

- VUID-vkWriteMicromapsPropertiesEXT-queryType-parameter
  `queryType` must be a valid VkQueryType value

- VUID-vkWriteMicromapsPropertiesEXT-pData-parameter
  `pData` must be a valid pointer to an array of `dataSize` bytes

- VUID-vkWriteMicromapsPropertiesEXT-micromapCount-arraylength
  `micromapCount` must be greater than `0`

- VUID-vkWriteMicromapsPropertiesEXT-dataSize-arraylength
  `dataSize` must be greater than `0`

- VUID-vkWriteMicromapsPropertiesEXT-pMicromaps-parent
  Each element of `pMicromaps` must have been created, allocated, or retrieved from `device`

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

#### 45.2.1. Displacement Micromap

A displacement micromap in an acceleration structure includes information in the VkAccelerationStructureTrianglesDisplacementMicromapNV to define a base triangle and displacement directions then uses displacement information encoded in the micromap to apply to those values to generate the final position.

##### Displacement Base Triangle

If `displacementBiasAndScaleBuffer` is provided the bias and scale are fetched from that buffer. If `displacementBiasAndScaleBuffer` is zero the bias and scale are assumed to be 0.0 and 1.0, respectively.

Given an input position from the geometry, the base position and displacement vector used by the displacement are computed by:

basePosition = inputPosition + displacementVector × bias

baseDisplacementVector = displacementVector × scale

The parameters of each micro-vertex are derived from a combination of the base triangle parameters extracted from the bottom-level acceleration structure, the barycentrics of that micro-vertex, and the displacement value fetched from the displacement micromap corresponding to that micro-vertex.

microVertexBasePosition = lerp(basePositions, microVertexBarycentrics)

microVertexDisplacementVector = lerp(displacementVectors, microVertexBarycentrics)

microVertexDisplacedPosition = microVertexBasePosition + microVertexDisplacementVector × micromapDisplacementValue

##### Displacement Micromap Encoding

Displacement amounts are stored in displacement blocks, each covering a triangular region of microvertices. Depending on the subdivision level and encoding format, one or more displacement blocks combine to store all displacement values for a given displacement micromap.

Displacement blocks are organized along a space filling curve within a displacement micromap if more than one block is required, then micro-vertices are organized along the same space filling curve within a displacement micromap.

The space-filling curve is purely hierarchical with recursive splitting, similar to that for opacity micromaps but operating on vertices instead of triangles. To maintain that the hierarchical ordering is contiguous while keeping continuous winding, some triangles are flipped and wound differently.

The VK_DISPLACEMENT_MICROMAP_FORMAT_64_TRIANGLES_64_BYTES_NV format is an uncompressed, packed format which covers 64 microtriangles (subdivision level 3) in a block. The block contains 45 displacement values encoded as 11 bit unorm values and stored tightly packed in the vertex order described above, occupying 495 bits. This is followed by 15 unused bits then 2 reserved bits which must be 0. If this block is used to store displacement for a subdivision level below 3 the later unused values are ignored.

Section | Field | Entries | Bits per entry | Starting bit offset
--- | --- | --- | --- | ---
Displacement amounts | Vertex 0 - 44 | 45 | 11 | 0
Unused |  | 1 | 15 | 495
Reserved | Must be 0 | 1 | 2 | 510

The VK_DISPLACEMENT_MICROMAP_FORMAT_256_TRIANGLES_128_BYTES_NV and VK_DISPLACEMENT_MICROMAP_FORMAT_1024_TRIANGLES_128_BYTES_NV formats store displacements in a compressed form to save space. Both formats use the same compression algorithm, differing in the number of bits used in the different fields.

The compression algorithm works by starting with fully specified anchor vertices, then for each level, predicting the value for the displacement and encoding the correction for that value, using fewer bits for each level of subdivision.

When adding a vertex in the recursive subdivision process between two adjacent displacement values, the predicted value is given by the rounded average of the two adjacent values as integers:

prediction = (A + B + 1) / 2

The decoded value after applying the correction is given by:

decoded = prediction + ( SignExtend(correction) << shift )

where correction is given by the corrections field for a given level and micro vertex and shift is given by the shifts field indexed from the level then by 4 values, selected from interior or the 3 edges in vertex order in that order.

The bit encoding for VK_DISPLACEMENT_MICROMAP_FORMAT_256_TRIANGLES_128_BYTES_NV

Section | Field | Entries | Bits per entry | Starting bit offset
--- | --- | --- | --- | ---
Anchors | Vertex 0 - 2 | 3 | 11 | 0
Corrections | Level 1 | 3 | 11 | 33
| Level 2 | 9 | 11 | 66
| Level 3 | 30 | 10 | 165
| Level 4 | 108 | 5 | 465
Unused |  | 1 | 1 | 1005
Shifts | Level 4 | 4 | 3 | 1006
| Level 3 | 4 | 1 | 1018
Reserved | Must be 0 | 1 | 2 | 1022

The bit encoding for VK_DISPLACEMENT_MICROMAP_FORMAT_1024_TRIANGLES_128_BYTES_NV

Section | Field | Entries | Bits per entry | Starting bit offset
--- | --- | --- | --- | ---
Anchors | Vertex 0 - 2 | 3 | 11 | 0
Corrections | Level 1 | 3 | 11 | 33
| Level 2 | 9 | 8 | 66
| Level 3 | 30 | 4 | 138
| Level 4 | 108 | 2 | 258
| Level 5 | 408 | 1 | 474
Unused |  | 1 | 88 | 882
Shifts | Level 5 | 4 | 4 | 970
| Level 4 | 4 | 4 | 986
| Level 3 | 4 | 3 | 1002
| Level 2 | 4 | 2 | 1014
Reserved | Must be 0 | 1 | 2 | 1022

## 46. Ray Traversal

The ray traversal process identifies and handles intersections between a ray and geometries in an acceleration structure.

Ray traversal cannot be started by a Vulkan API command directly - a shader must execute `OpRayQueryProceedKHR` or a pipeline trace ray instruction . When the `rayTracingPipeline` feature is enabled, `OpTraceRayKHR` can be used for ray tracing in a ray tracing pipeline. When the `rayQuery` feature is enabled, `OpRayQueryProceedKHR` can be used in any shader stage.

Figure 36. Ray tracing traversal

### 46.1. Ray Intersection Candidate Determination

Once tracing begins, rays are first tested against instances in a top-level acceleration structure. A ray that intersects an instance will be transformed into the space of the instance to continue traversal within that instance; therefore the transform matrix stored in the instance must be invertible.

In case multiple instances are intersected by a ray, the ray transformation into the space of the instance is invariant under the order in which these instances are encountered in the top-level acceleration structure.

Note | Applying multiple forward and reverse transforms to a ray to transition from one instance to another could result in accumulated errors. Thus an implementation should behave as if the ray is transformed from the origin for each instance independently.

Next, rays are tested against geometries in a bottom-level acceleration structure to determine if a hit occurred between them, initially based only on their geometric properties (i.e. their vertices). The implementation performs similar operations to that of rasterization, but with the effective viewport determined by the parameters of the ray, and the geometry transformed into a space determined by that viewport.

The vertices of each primitive are transformed from acceleration structure space as to ray space r according to the ray origin and direction as follows:

​x r​y r​z r​​
​=
​a x 2​(1−c)+c a x​a y​(1−c)+sa z​a x​a z​(1−c)−sa y​​a x​a y​(1−c)−sa z​a y 2​(1−c)+c a y​a z​(1−c)+sa x​​a x​a z​(1−c)+sa y​a y​a z​(1−c)−sa x​a z 2​(1−c)+c​
​
​x as​−o x​y as​−o y​z as​−o z​​
​

a is the axis of rotation from the unnormalized ray direction vector d to the axis vector k:

a=⎩
⎨
⎧​∣∣d×k∣∣d×k​
​0 1 0​
​​if∣∣d×k∣∣=0 if∣∣d×k∣∣=0​

s and c are the sine and cosine of the angle of rotation about a from d to k:

c s​=∣∣d∣∣d⋅k​=1−c 2
​​

k is the unit vector:

k=
​0 0−1​
​

o and d are the ray origin and unnormalized direction, respectively; the vector described by xas, yas, and zas is any position in acceleration structure space; and the vector described by xr, yr, and zr is the same position in ray space.

An intersection candidate is a unique point of intersection between a ray and a geometric primitive. For any primitive that has within its bounds a position xy z as​ such that

x r​y r​t min​<∣∣d∣∣−z r​​t min​≤∣∣d∣∣−z r​​​=0=0<t max​≤t max​​if the primitive is a triangle, otherwise​

(where t=∣∣d∣∣−z r​​), an intersection candidate exists.

Triangle primitive bounds consist of all points on the plane formed by the three vertices and within the bounds of the edges between the vertices, subject to the watertightness constraints below. AABB primitive bounds consist of all points within an implementation-defined bound which includes the specified box.

Note | The bounds of the AABB including all points internal to the bound implies that a ray started within the AABB will hit that AABB.

Figure 37. Ray intersection candidate

The determination of this condition is performed in an implementation specific manner, and may be performed with floating-point operations. Due to the complexity and number of operations involved, inaccuracies are expected, particularly as the scale of values involved begins to diverge. Implementations should take efforts to maintain as much precision as possible.

Note | One very common case is when geometries are close to each other at some distance from the origin in acceleration structure space, where an effect similar to “z-fighting” is likely to be observed. Applications can mitigate this by ensuring their detailed geometries remain close to the origin. Another likely case is when the origin of a ray is set to a position on a previously intersected surface, and its tmin is zero or near zero; an intersection may be detected on the emitting surface. This case can usually be mitigated by offsetting tmin slightly.

For a motion primitive or a motion instance, the positions for intersection are evaluated at the time specified in the `time` parameter to `OpTraceRayMotionNV` by interpolating between the two endpoints as specified for the given motion type. If a motion acceleration structure is traced with `OpTraceRayKHR`, it behaves as a `OpTraceRayMotionNV` with `time` of 0.0.

In the case of AABB geometries, implementations may increase their size in an acceleration structure in order to mitigate precision issues. This may result in false positive intersections being reported to the application.

For triangle intersection candidates, the b and c barycentric coordinates on the triangle where the above condition is met are made available to future shading. If the ray was traced with a pipeline trace ray instruction, these values are available as a vector of 2 32-bit floating-point values in the `HitAttributeKHR` storage class. These values are included in the triangle intersection candidate.

For linear swept sphere intersection candidate, the ray t value along with a single u parameter suffice to identify the hit. The u value specifies the position of the hit along the LSS midsection, within the range [0, 1]. If the u value is exactly `0` or `1`, then the intersection occurred on the respective endcap `0`, or endcap `1`. For pure sphere primitives, u is always set to 0. LSS primitives may be self-enclosing if one of the endcap spheres is completely enclosed within the other, and both endcaps are enabled. In these instances, only the outer of the two endcaps is intersection tested, and u will be returned as `0` or `1` accordingly. For rays that originate inside a LSS or sphere primitive, or enter through an absent endcap, no intersections will be reported.

Once an intersection candidate is determined, it proceeds through the following operations, in order:

1. Ray Intersection Culling

2. Ray Intersection Confirmation

3. Ray Closest Hit Determination

4. Ray Result Determination

The sections below describe the exact details of these tests. There is no ordering guarantee between operations performed on different intersection candidates.

#### 46.1.1. Watertightness

For a set of triangles with identical transforms, within a single instance:

- Any set of two or more triangles where all triangles have one vertex with an identical position value, that vertex is a shared vertex.

- Any set of two triangles with two shared vertices that were specified in the same winding order in each triangle have a shared edge defined by those vertices.

A closed fan is a set of three or more triangles where:

- All triangles in the set have the same shared vertex as one of their vertices.

- All edges that include the above vertex are shared edges.

- All above shared edges are shared by exactly two triangles from the set.

- No two triangles in the set intersect, except at shared edges.

- Every triangle in the set is joined to every other triangle in the set by a series of the above shared edges.

Implementations should not double-hit or miss when a ray intersects a shared edge, or a shared vertex of a closed fan.

Note | Because of the complexity of a definition of watertightness the language above does not list a must requirement but it is expected and tested that implementations will perform watertight intersection tests.

For LSS primitives, connected LSS might overlap not only at the shared vertex endcap but also along their midsections. This applies even if an LSS disables the shared endcap. As such, there is no clear equivalent edge or vertex that could deterministically map a hit to just one of the LSS. So, unlike the ray-triangle intersection, the ray-LSS intersection provides no single-hit guarantee for LSS, including those that share a vertex causing the LSS to overlap. However, as with triangles, LSS intersection still returns the closest hit.

### 46.2. Ray Intersection Culling

Candidate intersections go through several phases of culling before confirmation as an actual hit. There is no particular ordering dependency between the different culling operations.

#### 46.2.1. Ray Primitive Culling

If the `rayTraversalPrimitiveCulling` or `rayQuery` features are enabled, the `SkipTrianglesKHR` and `SkipAABBsKHR` ray flags can be specified when tracing a ray. `SkipTrianglesKHR` and `SkipAABBsKHR` are mutually exclusive. `SkipTrianglesKHR` is also mutually exclusive with `CullBackFacingTrianglesKHR` and `CullFrontFacingTrianglesKHR`.

If `SkipTrianglesKHR` was included in the `Ray Flags` operand of the ray trace instruction, and the intersection is with a triangle primitive, the intersection is dropped, and no further processing of this intersection occurs. If VK_PIPELINE_CREATE_RAY_TRACING_SKIP_TRIANGLES_BIT_KHR was included in the pipeline, traversal with pipeline trace ray instructions will all behave as if `SkipTrianglesKHR` was included in their `Ray Flags` operand.

If `SkipAABBsKHR` was included in the `Ray Flags` operand of the ray trace instruction, and the intersection is with an AABB primitive, the intersection is dropped, and no further processing of this intersection occurs. If VK_PIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT_KHR was included in the pipeline, traversal with pipeline trace ray instructions will all behave as if `SkipAABBsKHR` was included in their `Ray Flags` operand.

#### 46.2.2. Ray Mask Culling

Instances can be made invisible to particular rays based on the value of VkAccelerationStructureInstanceKHR::`mask` used to add that instance to a top-level acceleration structure, and the `Cull Mask` parameter used to trace the ray.

For the instance which is intersected, if `mask` & `Cull Mask` == 0, the intersection is dropped, and no further processing occurs.

#### 46.2.3. Ray Face Culling

As in polygon rasterization, one of the stages of ray traversal is to determine if a triangle primitive is back- or front-facing, and primitives can be culled based on that facing.

If the intersection candidate is with an AABB primitive, this operation is skipped.

##### Determination

When a ray intersects a triangle primitive, the order that vertices are specified for the polygon affects whether the ray intersects the front or back face. Front or back facing is determined in the same way as they are for rasterization, based on the sign of the polygon’s area but using the ray space coordinates instead of framebuffer coordinates. One way to compute this area is:

a=−2 1​i=0∑n−1​x r i​y r i⊕1​−x r i⊕1​y r i​

where x r i​ and y r i​ are the x and y ray space coordinates of the ith vertex of the n-vertex polygon (vertices are numbered starting at zero for the purposes of this computation) and i ⊕ 1 is (i + 1) mod n.

By default, if a is negative then the intersection is with the front face of the triangle, otherwise it is with the back face. If VK_GEOMETRY_INSTANCE_TRIANGLE_FLIP_FACING_BIT_KHR is included in VkAccelerationStructureInstanceKHR::`flags` for the instance containing the intersected triangle, this determination is reversed. Additionally, if a is 0, the intersection candidate is treated as not intersecting with any face, irrespective of the sign.

Note | In a left-handed coordinate system, an intersection will be with the front face of a triangle if the vertices of the triangle, as defined in index order, appear from the ray’s perspective in a clockwise rotation order. VK_GEOMETRY_INSTANCE_TRIANGLE_FLIP_FACING_BIT_KHR was previously annotated as VK_GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_KHR because of this.

If the ray was traced with a pipeline trace ray instruction, the `HitKindKHR` built-in is set to `HitKindFrontFacingTriangleKHR` if the intersection is with front-facing geometry, and `HitKindBackFacingTriangleKHR` if the intersection is with back-facing geometry, for shader stages considering this intersection. For LSS or sphere intersections, the `HitKindKHR` built-in is set to `HitKindLssPrimitiveNV` or `HitKindSpherePrimitiveNV` respectively.

If the ray was traced with `OpRayQueryProceedKHR`, `OpRayQueryGetIntersectionFrontFaceKHR` will return true for intersection candidates with front faces, or false for back faces.

##### Culling

If `CullBackFacingTrianglesKHR` was included in the `Ray Flags` parameter of the ray trace instruction, and the intersection is determined as with the back face of a triangle primitive, the intersection is dropped, and no further processing of this intersection occurs.

If `CullFrontFacingTrianglesKHR` was included in the `Ray Flags` parameter of the ray trace instruction, and the intersection is determined as with the front face of a triangle primitive, the intersection is dropped, and no further processing of this intersection occurs.

This culling is disabled if VK_GEOMETRY_INSTANCE_TRIANGLE_FACING_CULL_DISABLE_BIT_KHR was included in VkAccelerationStructureInstanceKHR::`flags` for the instance which the intersected geometry belongs to.

Intersection candidates that have not intersected with any face (a == 0) are unconditionally culled, irrespective of ray flags and geometry instance flags.

The `CullBackFacingTrianglesKHR` and `CullFrontFacingTrianglesKHR` `Ray Flags` are mutually exclusive.

#### 46.2.4. Ray Opacity Culling

Each geometry in the acceleration structure may be considered either opaque or non-opaque. Opaque geometries continue through traversal as normal, whereas non-opaque geometries need to be either confirmed or discarded by shader code. Intersection candidates can also be culled based on their opacity.

##### Determination

If the geometry includes an opacity micromap, the intersection candidate is determined as opaque or non-opaque as described in Ray Opacity Micromap. If the result of the opacity micromap operation is ignored, the candidate is considered neither opaque or non-opaque and execution instead proceeds with enumerating the next candidate. Otherwise, the intersection candidate is determined as opaque if VK_GEOMETRY_OPAQUE_BIT_KHR was included in the VkGeometryNV::`flags` or VkAccelerationStructureGeometryKHR::`flags` when the geometry it intersected with was built.

Setting VK_GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_KHR in VkAccelerationStructureInstanceKHR::`flags` will override all non-opaque geometries in the instance to be considered opaque. Similarly, setting VK_GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_KHR will override all opaque geometries in the instance to be considered non-opaque.

Including `OpaqueKHR` in the `Ray Flags` parameter when tracing a ray or initializing a ray query object overrides all non-opaque geometries to behave as if they are opaque, ignoring any build instance flag overrides. Similarly, `NoOpaqueKHR` overrides all opaque geometries to behave as if they are non-opaque.

##### Culling

If `CullOpaqueKHR` is included in the `Ray Flags` parameter when tracing a ray or initializing a ray query object, an intersection with geometry considered to be opaque is dropped and execution proceeds with enumerating the next candidate. Similarly, `CullNoOpaqueKHR` drops intersections with geometry considered to be non-opaque.

The `OpaqueKHR`, `NoOpaqueKHR`, `CullOpaqueKHR`, and `CullNoOpaqueKHR` `Ray Flags` are mutually exclusive.

##### Ray Query

The opacity of geometries is determined as described above by `OpRayQueryProceedKHR` when using it to trace rays.

Intersection candidates with AABB geometry cause proceed to return `true`, incomplete traversal, in order for the shader to confirm the hit. To query the opacity that was determined by proceed, `OpRayQueryGetIntersectionCandidateAABBOpaqueKHR` can be used.

Intersection candidates with triangle geometry that cause proceed to return `true` have been determined to be non-opaque. Intersection candidates with opaque triangle geometry continues execution without causing proceed to return.

#### 46.2.5. Ray Opacity Micromap

A VK_GEOMETRY_TYPE_TRIANGLES_KHR or VK_GEOMETRY_TYPE_DENSE_GEOMETRY_FORMAT_TRIANGLES_AMDX geometry in the acceleration structure may have an opacity micromap associated with it to give finer-grained opacity information.

If the intersection candidate is with a geometry with an associated opacity micromap and VK_GEOMETRY_INSTANCE_DISABLE_OPACITY_MICROMAPS_BIT_KHR is not set in its instance then the micromap is used to determine geometry opacity instead of the VK_GEOMETRY_OPAQUE_BIT_KHR flag in the geometry.

The opacity information in the micromap object is accessed using the candidate intersection u and v coordinates. The integer u and v are computed from ⌊u⌋ + ⌊v⌋, clamping ⌊u⌋ as needed to keep the sum less than or equal to 1 << subdivisionlevel. These values are mapped into a linear index with a space filling curve which is defined recursively by traversing into the sub-triangle nearest vertex 0, then the middle triangle with ordering flipped, then nearest vertex 1, then nearest vertex 2 with ordering flipped.

Figure 38. Example ordering for micromap data
Caption

In the ordering for micromap data diagram, the dot in each sub-triangle indicates the entry point of the curve and the arrows show the traversal order through its children at the next subdivision level.

Note | This encoding is spatially coherent, purely hierarchical, and allows a bit-parallel conversion between barycentric address and index values. See the Reference Code implementing this mapping.

The result of the opacity micromap lookup and operations is to treat the intersection as opaque, non-opaque, or ignored.

If the associated opacity micromap has format VK_OPACITY_MICROMAP_FORMAT_2_STATE_KHR, each element of the micromap is represented by a single bit at the index derived above.

If the associated opacity micromap has format VK_OPACITY_MICROMAP_FORMAT_4_STATE_KHR, each element is represented by a two bit value at the index derived above.

If the micromap was built with VK_BUILD_ACCELERATION_STRUCTURE_MICROMAP_LOSSY_BIT_KHR and has a format of VK_OPACITY_MICROMAP_FORMAT_4_STATE_KHR, the implementation may substitute any element’s state value with VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_UNKNOWN_TRANSPARENT_KHR or VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_UNKNOWN_OPAQUE_KHR. The application should accept the hit if the element was built with VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_OPAQUE_KHR and ignore the hit if the element was built with VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_TRANSPARENT_KHR.

The implementation, on an identically created instance and device, must perform any lossy substitutions invariantly with respect to acceleration structures and micromaps constructed with an equivalent shape and data.

The final result of the opacity micromap lookup operation is determined as shown in the following table based on the format and retrieved value from the micromap:

4 State value | 2 State value | Special index value | Result
--- | --- | --- | ---
0 | 0 | VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_TRANSPARENT_KHR | Ignored
1 | 1 | VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_OPAQUE_KHR | Opaque
2 |  | VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_UNKNOWN_TRANSPARENT_KHR | Non-opaque
3 |  | VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_UNKNOWN_OPAQUE_KHR | Non-opaque

Unless if the VK_GEOMETRY_INSTANCE_FORCE_OPACITY_MICROMAP_2_STATE_BIT_KHR flag is included in the instance flags of the candidate intersection or `ForceOpacityMicromap2StateEXT` is included in the ray flags on the ray, in which case the opacity micromap information is interpreted in 2 state override mode , including if lossy substitutions were made, and the final result of the opacity lookup operation is instead determined as shown in the following table:

4 State value | 2 State value | Special index value | Result
--- | --- | --- | ---
0 | 0 | VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_TRANSPARENT_KHR | Ignored
1 | 1 | VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_OPAQUE_KHR | Opaque
2 |  | VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_UNKNOWN_TRANSPARENT_KHR | Ignored
3 |  | VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_UNKNOWN_OPAQUE_KHR | Opaque

Note | The Force2state override never evaluates to non-opaque result, even when lossy substitutions are made. While lossy substitutions can affect the final result of Force2state, this behavior preserves the invariance guarantees required for lossy substitutions.

If the result of the micromap lookup is to treat the intersection candidate as ignored, no further processing of that candidate is done and execution proceeds with enumerating the next candidate.

### 46.3. Ray Intersection Confirmation

Depending on the opacity of intersected geometry and whether it is a triangle or an AABB, candidate intersections are further processed to determine the eventual hit result. Candidates generated from AABB intersections run through the same confirmation process as triangle hits.

For ray queries, the candidate intersection and committed intersection are distinct states. A candidate intersection is available only while `OpRayQueryProceedKHR` has returned `true`, and identifies the intersection currently requiring shader evaluation. Calling `OpRayQueryGenerateIntersectionKHR` or `OpRayQueryConfirmIntersectionKHR` confirms a hit for Ray Closest Hit Determination, but does not by itself complete traversal. If that confirmed hit becomes the current closest hit, it becomes the ray query’s committed intersection. The committed intersection is the closest recorded hit so far, can be queried before traversal is complete, and may be replaced by a later confirmed hit that is closer.

#### 46.3.1. AABB Intersection Candidates

For an intersection candidate with an AABB geometry generated by Ray Intersection Candidate Determination, shader code is executed to determine whether any hits should be reported to the traversal infrastructure; no further processing of this intersection candidate occurs. The occurrence of an AABB intersection candidate does not guarantee the ray intersects the application-provided AABB. To avoid propagating false intersections the application should verify the intersection candidate before reporting any hits and only report intersections within the bounds of the desired geometry. Reporting an intersection outside the AABB either through the implementation giving a conservative bound or reporting a t out of range is legal but may result in unpredictable closest hit results.

If the ray was traced with a pipeline trace ray instruction, an intersection shader is invoked from the Shader Binding Table according to the specified indexing for the intersected geometry. If this shader calls `OpReportIntersectionKHR`, a new intersection candidate is generated as described below. If the intersection shader is VK_SHADER_UNUSED_KHR (which is only allowed for a zero shader group) then no further processing of the intersection candidate occurs.

Each new candidate generated as a result of this processing is a generated intersection candidate from the intersection with AABB geometry, with a t value equal to the `Hit` parameter of the `OpReportIntersectionKHR` instruction. The generated intersection candidate includes the values stored in variables with the `HitAttributeKHR` storage class at the time `OpReportIntersectionKHR` is executed. The new generated candidate is then independently run through Ray Intersection Confirmation as a generated intersection.

If the ray was traced with `OpRayQueryProceedKHR`, control is returned to the shader which executed `OpRayQueryProceedKHR`, returning `true`. The resulting ray query has a candidate intersection type of `RayQueryCandidateIntersectionAABBKHR`. `OpRayQueryGenerateIntersectionKHR` can be called to report a generated hit for Ray Closest Hit Determination. If that hit becomes the current closest hit, the ray query’s committed intersection type is `RayQueryCommittedIntersectionGeneratedKHR`. Further ray query processing can be continued by executing `OpRayQueryProceedKHR` with the same ray query, or intersection can be terminated with `OpRayQueryTerminateKHR`. Unlike rays traced with a pipeline trace ray instruction, candidates generated in this way skip generated intersection candidate confirmation; applications should make this determination before generating the intersection.

This operation may be executed multiple times for the same intersection candidate.

#### 46.3.2. Triangle and Generated Intersection Candidates

For triangle and generated intersection candidates, additional shader code may be executed based on the intersection’s opacity.

If the intersection is opaque, the candidate is immediately confirmed as a valid hit and passes to the next stage of processing.

For non-opaque intersection candidates, shader code is executed to determine whether a hit occurred or not.

If the ray was traced with a pipeline trace ray instruction, an any-hit shader is invoked from the Shader Binding Table according to the specified indexing. If this shader calls `OpIgnoreIntersectionKHR`, the candidate is dropped and no further processing of the candidate occurs. If the any-hit shader identified is VK_SHADER_UNUSED_KHR, the candidate is immediately confirmed as a valid hit and passes to the next stage of processing.

If the ray was traced with `OpRayQueryProceedKHR`, control is returned to the shader which executed `OpRayQueryProceedKHR`, returning `true`. As only triangle candidates participate in this operation with ray queries, the resulting candidate intersection type is always `RayQueryCandidateIntersectionTriangleKHR`. `OpRayQueryConfirmIntersectionKHR` can be called on the ray query to confirm the candidate as a hit for Ray Closest Hit Determination. If that hit becomes the current closest hit, the ray query’s committed intersection type is `RayQueryCommittedIntersectionTriangleKHR`. Further ray query processing can be continued by executing `OpRayQueryProceedKHR` with the same ray query, or intersection can be terminated with `OpRayQueryTerminateKHR`. If `OpRayQueryConfirmIntersectionKHR` has not been executed, the candidate is dropped and no further processing of the candidate occurs.

This operation may be executed multiple times for the same intersection candidate unless VK_GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_KHR was specified for the intersected geometry.

### 46.4. Ray Closest Hit Determination

Unless the ray was traced with the `TerminateOnFirstHitKHR` ray flag, the implementation must track the closest confirmed hit until all geometries have been tested and either confirmed or dropped.

After an intersection candidate is confirmed, its t value is compared to tmax to determine which intersection is closer, where t is the parametric distance along the ray at which the intersection occurred.

- If t < tmax, tmax is set to t and the candidate is set as the current closest hit.

- If t > tmax, the candidate is dropped and no further processing of that candidate occurs.

- If t = tmax, the candidate may be set as the current closest hit or dropped.

For ray queries, the current closest hit is the current committed intersection. When a confirmed hit is set as the current closest hit, values returned by `OpRayQueryGetIntersection*KHR` instructions with `Intersection` set to `RayQueryCommittedIntersectionKHR` are updated to describe that hit. If no closest hit has been identified, the committed intersection type is `RayQueryCommittedIntersectionNoneKHR`.

If `TerminateOnFirstHitKHR` was included in the `Ray Flags` used to trace the ray, once the first hit is confirmed, the ray trace is terminated.

### 46.5. Ray Result Determination

Once all candidates have finished processing the prior stages, or if the ray is forcibly terminated, the final result of the ray trace is determined.

If a closest hit result was identified by Ray Closest Hit Determination, a closest hit has occurred, otherwise the final result is a miss.

For rays traced with pipeline trace ray instructions which can invoke a closest hit shader, if a closest hit result was identified, a closest hit shader is invoked from the Shader Binding Table according to the specified indexing for the intersected geometry. Control returns to the shader that executed the pipeline trace ray instruction once this shader returns. This shader is skipped if either the ray flags included `SkipClosestHitShaderKHR`, or if the closest hit shader identified is VK_SHADER_UNUSED_KHR.

For rays traced with a pipeline trace ray instruction where no hit result was identified, the miss shader identified by the `Miss Index` parameter of the instruction is invoked. Control returns to the shader that executed the pipeline trace ray instruction once this shader returns. This shader is skipped if the miss shader identified is VK_SHADER_UNUSED_KHR.

If the ray was traced with `OpRayQueryProceedKHR`, control is returned to the shader which executed `OpRayQueryProceedKHR`, returning `false`. No candidate intersection is available after this result is returned. If a closest hit was identified by Ray Closest Hit Determination, the ray query’s committed intersection is the final result and has a committed intersection type of `RayQueryCommittedIntersectionGeneratedKHR` or `RayQueryCommittedIntersectionTriangleKHR`. If no closest hit was identified, the committed intersection type will be `RayQueryCommittedIntersectionNoneKHR`.

No further processing of a ray query occurs after this result is determined.

## 47. Ray Tracing

Ray tracing uses a separate rendering pipeline from both the graphics and compute pipelines (see Ray Tracing Pipeline).

Figure 39. Ray tracing pipeline execution
Caption

Interaction between the different shader stages in the ray tracing pipeline

Within the ray tracing pipeline, a pipeline trace ray instruction can be called to perform a ray traversal that invokes the various ray tracing shader stages during its execution. The relationship between the ray tracing pipeline object and the geometries present in the acceleration structure traversed is passed into the ray tracing command in a VkBuffer object known as a shader binding table. `OpExecuteCallableKHR` can also be used in ray tracing pipelines to invoke a callable shader.

During execution, control alternates between scheduling and other operations. The scheduling functionality is implementation-specific and is responsible for workload execution. The shader stages are programmable. Traversal, which refers to the process of traversing acceleration structures to find potential intersections of rays with geometry, is fixed function.

The programmable portions of the pipeline are exposed in a single-ray programming model, with each invocation handling one ray at a time. Memory operations can be synchronized using standard memory barriers. The `Workgroup` scope and variables with a storage class of `Workgroup` must not be used in the ray tracing pipeline.

### 47.1. Shader Call Instructions

A shader call is an instruction which may cause execution to continue elsewhere by creating one or more invocations that execute a different shader stage.

The following table lists all shader call instructions and which stages each one can directly call.

Instruction | Intersection | Any-Hit | Closest Hit | Miss | Callable
--- | --- | --- | --- | --- | ---
`OpTraceRayKHR` | X | X | X | X |
`OpTraceRayMotionNV` | X | X | X | X |
`OpReportIntersectionKHR` |  | X |  |  |
`OpExecuteCallableKHR` |  |  |  |  | X
`OpHitObjectTraceRayNV` | X | X |  |  |
`OpHitObjectTraceRayMotionNV` | X | X |  |  |
`OpHitObjectExecuteShaderNV` |  |  | X | X |
`OpHitObjectExecuteShaderEXT` |  |  | X | X |
`OpHitObjectTraceRayEXT` | X | X |  |  |
`OpHitObjectReorderExecuteShaderEXT` |  |  | X | X |
`OpHitObjectTraceReorderExecuteEXT` | X | X | X | X |
`OpHitObjectTraceRayMotionEXT` | X | X |  |  |
`OpHitObjectTraceMotionReorderExecuteEXT` | X | X | X | X |

The invocations created by shader call instructions are grouped into subgroups by the implementation. Those subgroups may be unrelated to the subgroup of the parent invocation.

Pipeline trace ray instructions can be used recursively; invoked shaders can themselves execute pipeline trace ray instructions, to a maximum depth defined by the `maxRecursionDepth` or `maxRayRecursionDepth` limit.

Shaders directly invoked from the API always have a recursion depth of 0; each shader executed by a pipeline trace ray instruction has a recursion depth one higher than the recursion depth of the shader which invoked it. Applications must not invoke a shader with a recursion depth greater than the value of `maxRecursionDepth` or `maxPipelineRayRecursionDepth` specified in the pipeline.

There is no explicit recursion limit for other shader call instructions which may recurse (e.g. `OpExecuteCallableKHR`) but there is an upper bound determined by the stack size.

An invocation repack instruction is a ray tracing instruction where the implementation may change the set of invocations that are executing. When a repack instruction is encountered, the invocation is suspended and a new invocation begins and executes the instruction. After executing the repack instruction (which may result in other ray tracing shader stages executing) the new invocation ends and the original invocation is resumed, but it may be resumed in a different subgroup or at a different `SubgroupLocalInvocationId` within the same subgroup.

The `OpTraceRayKHR`, `OpTraceRayMotionNV`, `OpReorderThreadWithHintNV`, `OpReorderThreadWithHitObjectNV`, `OpReorderThreadWithHintEXT`, `OpReorderThreadWithHitObjectEXT`, `OpHitObjectTraceRayEXT`, `OpHitObjectReorderExecuteShaderEXT`, `OpHitObjectTraceReorderExecuteEXT`, `OpHitObjectTraceRayMotionEXT`, `OpHitObjectTraceMotionReorderExecuteEXT`, `OpReportIntersectionKHR`, and `OpExecuteCallableKHR` instructions are invocation repack instructions.

The invocations that are executing before a shader call instruction, after the instruction, or are created by the instruction, are shader-call-related.

If the implementation changes the composition of subgroups, the values of `SubgroupSize`, `SubgroupLocalInvocationId`, `SMIDNV`, `WarpIDNV`, and builtin variables that are derived from them (`SubgroupEqMask`, `SubgroupGeMask`, `SubgroupGtMask`, `SubgroupLeMask`, `SubgroupLtMask`) must be changed accordingly by the invocation repack instruction. The application must use `Volatile` semantics on these `BuiltIn` variables when used in the ray generation, closest hit, miss, intersection, and callable shaders. Similarly, the application must use `Volatile` semantics on any `RayTmaxKHR` decorated `Builtin` used in an intersection shader.

Note | Subgroup operations are permitted in the programmable ray tracing shader stages. However, shader call instructions place a bound on where results of subgroup instructions or subgroup-scoped instructions that execute the dynamic instance of that instruction are potentially valid. For example, care must be taken when using the result of a ballot operation that was computed before an invocation repack instruction, after that repack instruction. The ballot may be incorrect as the set of invocations could have changed. While the `SubgroupSize` built-in is required to be declared `Volatile`, its value will never change unless VK_PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT is set on pipeline creation, as without that bit set, its value is required to match that of VkPhysicalDeviceSubgroupProperties::`subgroupSize`. For clock operations, the value of a `Subgroup` scoped `OpReadClockKHR` read before the dynamic instance of a repack instruction should not be compared to the result of that clock instruction after the repack instruction.

When a ray tracing shader executes a dynamic instance of an invocation repack instruction which results in another ray tracing shader being invoked, their instructions are related by shader-call-order.

For ray tracing invocations that are shader-call-related:

- memory operations on `StorageBuffer`, `Image`, and `ShaderRecordBufferKHR` storage classes can be synchronized using the `ShaderCallKHR` scope.

- the `CallableDataKHR`, `IncomingCallableDataKHR`, `RayPayloadKHR`, `HitAttributeKHR`, and `IncomingRayPayloadKHR` storage classes are system-synchronized and no application availability and visibility operations are required.

- memory operations within a single invocation before and after the shader call instruction are ordered by program-order and do not require explicit synchronization.

### 47.2. Ray Tracing Commands

Ray tracing commands provoke work in the ray tracing pipeline. Ray tracing commands are recorded into a command buffer and when executed by a queue will produce work that executes according to the bound ray tracing pipeline. A ray tracing pipeline must be bound to a command buffer before any ray tracing commands are recorded in that command buffer.

To dispatch ray tracing use:

    // Provided by VK_KHR_ray_tracing_pipeline
    void vkCmdTraceRaysKHR(
        VkCommandBuffer                             commandBuffer,
        const VkStridedDeviceAddressRegionKHR*      pRaygenShaderBindingTable,
        const VkStridedDeviceAddressRegionKHR*      pMissShaderBindingTable,
        const VkStridedDeviceAddressRegionKHR*      pHitShaderBindingTable,
        const VkStridedDeviceAddressRegionKHR*      pCallableShaderBindingTable,
        uint32_t                                    width,
        uint32_t                                    height,
        uint32_t                                    depth);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `pRaygenShaderBindingTable` is a VkStridedDeviceAddressRegionKHR that holds the shader binding table data for the ray generation shader stage.

- `pMissShaderBindingTable` is a VkStridedDeviceAddressRegionKHR that holds the shader binding table data for the miss shader stage.

- `pHitShaderBindingTable` is a VkStridedDeviceAddressRegionKHR that holds the shader binding table data for the hit shader stage.

- `pCallableShaderBindingTable` is a VkStridedDeviceAddressRegionKHR that holds the shader binding table data for the callable shader stage.

- `width` is the width of the ray trace query dimensions.

- `height` is height of the ray trace query dimensions.

- `depth` is depth of the ray trace query dimensions.

When the command is executed, a ray generation group of `width` × `height` × `depth` rays is assembled.

Valid Usage

- VUID-vkCmdTraceRaysKHR-magFilter-04553
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdTraceRaysKHR-magFilter-09598
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdTraceRaysKHR-mipmapMode-04770
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdTraceRaysKHR-mipmapMode-09599
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdTraceRaysKHR-unnormalizedCoordinates-09635
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `levelCount` and `layerCount` must be 1

- VUID-vkCmdTraceRaysKHR-None-08609
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `viewType` must be VK_IMAGE_VIEW_TYPE_1D or VK_IMAGE_VIEW_TYPE_2D

- VUID-vkCmdTraceRaysKHR-None-08610
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions with `ImplicitLod`, `Dref` or `Proj` in their name

- VUID-vkCmdTraceRaysKHR-None-08611
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions that includes a LOD bias or any offset values

- VUID-vkCmdTraceRaysKHR-None-06479
  If a VkImageView is sampled with depth comparison, the image view’s format features must contain VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT

- VUID-vkCmdTraceRaysKHR-None-02691
  If a VkImageView is accessed using atomic operations as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT

- VUID-vkCmdTraceRaysKHR-None-07888
  If a VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER descriptor is accessed using atomic operations as a result of this command, then the storage texel buffer’s format features must contain VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT

- VUID-vkCmdTraceRaysKHR-None-02692
  If a VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT

- VUID-vkCmdTraceRaysKHR-None-02693
  If the VK_EXT_filter_cubic extension is not enabled and any VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, it must not have a VkImageViewType of VK_IMAGE_VIEW_TYPE_3D, VK_IMAGE_VIEW_TYPE_CUBE, or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY

- VUID-vkCmdTraceRaysKHR-filterCubic-02694
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have a VkImageViewType and format that supports cubic filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubic` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdTraceRaysKHR-filterCubicMinmax-02695
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX as a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubicMinmax` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdTraceRaysKHR-cubicRangeClamp-09212
  If the `cubicRangeClamp` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must not have a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM

- VUID-vkCmdTraceRaysKHR-reductionMode-09213
  Any VkImageView being sampled with a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM as a result of this command must sample with VK_FILTER_CUBIC_EXT

- VUID-vkCmdTraceRaysKHR-selectableCubicWeights-09214
  If the `selectableCubicWeights` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have VkSamplerCubicWeightsCreateInfoQCOM::`cubicWeights` equal to VK_CUBIC_FILTER_WEIGHTS_CATMULL_ROM_QCOM

- VUID-vkCmdTraceRaysKHR-flags-02696
  Any VkImage created with a VkImageCreateInfo::`flags` containing VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV sampled as a result of this command must only be sampled using a VkSamplerAddressMode of VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdTraceRaysKHR-OpTypeImage-07027
  For any VkImageView being written as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdTraceRaysKHR-OpTypeImage-07028
  For any VkImageView being read as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdTraceRaysKHR-OpTypeImage-07029
  For any VkBufferView being written as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown`, the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdTraceRaysKHR-OpTypeImage-07030
  Any VkBufferView being read as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown` then the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdTraceRaysKHR-None-08600
  If a a bound shader was created with a pipeline layout and statically uses a set n, a descriptor set must have been bound to n at the same pipeline bind point, with layouts compatible for set n with the layout(s) used to create the shader, as described in Pipeline Layout Compatibility

- VUID-vkCmdTraceRaysKHR-None-08601
  If a a bound shader was created with a pipeline layout or specified push constant ranges and statically uses a push constant value, that value must have been set for the same pipeline bind point, with push constant ranges that are compatible with the push constant range used to create the shader

- VUID-vkCmdTraceRaysKHR-None-10068
  For each array of resources that is used by a bound shader, the indices used to access members of the array must be less than the descriptor count for the identified binding in the descriptor sets used by this command

- VUID-vkCmdTraceRaysKHR-None-08114
  Descriptors in each bound descriptor set, specified via vkCmdBindDescriptorSets, must be valid if they are accessed as described by descriptor validity by the VkPipeline bound to the pipeline bind point used by this command and the bound VkPipeline was not created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdTraceRaysKHR-imageLayout-00344
  If an image descriptor is accessed by a shader, the VkImageLayout must match the subresource accessible from the VkImageView as defined by the image layout matching rules

- VUID-vkCmdTraceRaysKHR-None-08115
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdBindDescriptorSets, the bound VkPipeline must have been created without VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdTraceRaysKHR-None-08116
  Descriptors in bound descriptor buffers, specified via vkCmdSetDescriptorBufferOffsetsEXT, must be valid if they are dynamically accessed

- VUID-vkCmdTraceRaysKHR-None-08117
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdSetDescriptorBufferOffsetsEXT, the bound VkPipeline must have been created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdTraceRaysKHR-None-08119
  If a descriptor is dynamically used with a VkPipeline created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdTraceRaysKHR-None-08605
  If a descriptor is dynamically used with a VkShaderEXT created with a `VkDescriptorSetLayout` that was created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdTraceRaysKHR-None-08606
  If the `shaderObject` feature is not enabled, a valid pipeline must be bound to the pipeline bind point used by this command

- VUID-vkCmdTraceRaysKHR-None-08608
  If a pipeline is bound to the pipeline bind point used by this command, there must not have been any calls to dynamic state setting commands for any state specified statically in the VkPipeline object bound to the pipeline bind point used by this command, since that pipeline was bound

- VUID-vkCmdTraceRaysKHR-uniformBuffers-06935
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdTraceRaysKHR-None-08612
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdTraceRaysKHR-storageBuffers-06936
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdTraceRaysKHR-None-08613
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a storage buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdTraceRaysKHR-commandBuffer-02707
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, any resource accessed by bound shaders must not be a protected resource

- VUID-vkCmdTraceRaysKHR-viewType-07752
  If a VkImageView is accessed as a result of this command, then the image view’s `viewType` must match the `Dim` operand of the `OpTypeImage` as described in Compatibility Between SPIR-V Image Dimensions and Vulkan ImageView Types

- VUID-vkCmdTraceRaysKHR-format-07753
  If a VkImageView or VkBufferView is accessed as a result of this command, then the numeric type of the view’s `format` and the `Sampled` `Type` operand of the `OpTypeImage` must match

- VUID-vkCmdTraceRaysKHR-OpImageWrite-08795
  If a VkImageView created with a format other than VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the image view’s format

- VUID-vkCmdTraceRaysKHR-OpImageWrite-08796
  If a VkImageView created with the format VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have four components

- VUID-vkCmdTraceRaysKHR-OpImageWrite-04469
  If a VkBufferView is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the buffer view’s format

- VUID-vkCmdTraceRaysKHR-SampledType-04470
  If a VkImageView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdTraceRaysKHR-SampledType-04471
  If a VkImageView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdTraceRaysKHR-SampledType-04472
  If a VkBufferView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdTraceRaysKHR-SampledType-04473
  If a VkBufferView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdTraceRaysKHR-sparseImageInt64Atomics-04474
  If the `sparseImageInt64Atomics` feature is not enabled, VkImage objects created with the VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdTraceRaysKHR-sparseImageInt64Atomics-04475
  If the `sparseImageInt64Atomics` feature is not enabled, VkBuffer objects created with the VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdTraceRaysKHR-OpImageSampleWeightedQCOM-06971
  If `OpImageSampleWeightedQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_SAMPLED_IMAGE_BIT_QCOM

- VUID-vkCmdTraceRaysKHR-OpImageSampleWeightedQCOM-06972
  If `OpImageSampleWeightedQCOM` uses a VkImageView as a sample weight image as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_IMAGE_BIT_QCOM

- VUID-vkCmdTraceRaysKHR-OpImageBoxFilterQCOM-06973
  If `OpImageBoxFilterQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BOX_FILTER_SAMPLED_BIT_QCOM

- VUID-vkCmdTraceRaysKHR-OpImageBlockMatchSSDQCOM-06974
  If `OpImageBlockMatchSSDQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdTraceRaysKHR-OpImageBlockMatchSADQCOM-12420
  If `OpImageBlockMatchSADQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdTraceRaysKHR-OpImageBlockMatchSADQCOM-06976
  If `OpImageBlockMatchSADQCOM` or OpImageBlockMatchSSDQCOM is used to read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdTraceRaysKHR-OpImageSampleWeightedQCOM-06977
  If `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdTraceRaysKHR-OpImageSampleWeightedQCOM-06978
  If any command other than `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must not have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdTraceRaysKHR-OpImageBlockMatchWindow-09215
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM

- VUID-vkCmdTraceRaysKHR-OpImageBlockMatchWindow-09216
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format must be a single-component format

- VUID-vkCmdTraceRaysKHR-OpImageBlockMatchWindow-09217
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdTraceRaysKHR-OpImageBlockMatchWindow-12421
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the `blockMatchExtendedClampToEdge` feature is not enabled, the input sampler must not have been created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdTraceRaysKHR-addressModeU-12422
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the input sampler was created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, then the sampler must have been created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdTraceRaysKHR-None-07288
  Any shader invocation executed by this command must terminate

- VUID-vkCmdTraceRaysKHR-None-09600
  If a descriptor with type equal to any of VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, or VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT is accessed as a result of this command, all image subresources identified by that descriptor must be in the image layout identified when the descriptor was written

- VUID-vkCmdTraceRaysKHR-micromap-11636
  If an acceleration structure is accessed as a result of this command through an `OpRayQueryProceedKHR` operation , the `VK_EXT_opacity_micromap` extension is not enabled, and the acceleration structure is built using geometry with a VkAccelerationStructureTrianglesOpacityMicromapKHR structure included in its `pNext` chain, the shader must have specified a `OpacityMicromapIdKHR` execution mode with its specialization constant operand equal to VK_TRUE

- VUID-vkCmdTraceRaysKHR-micromap-11637
  If an acceleration structure is accessed as a result of this command and the acceleration structure was constructed through deserialization, all micromap arrays referenced by the acceleration structure that were not replaced by an acceleration structure update command must have been deserialized using the serialized data of the corresponding micromaps used to originally build the acceleration structure prior to the execution of this command on the device

- VUID-vkCmdTraceRaysKHR-micromap-11638
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkPipeline bound to the pipeline bind point used by this command must not have been created with `flags` that includes VK_PIPELINE_CREATE_2_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_KHR

- VUID-vkCmdTraceRaysKHR-micromap-11639
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkShaderEXT that accessed the descriptor must not have been created with `flags` that includes VK_SHADER_CREATE_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_EXT

- VUID-vkCmdTraceRaysKHR-commandBuffer-10746
  The `VkDeviceMemory` object allocated from a `VkMemoryHeap` with the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property that is bound to a resource accessed as a result of this command must be the active bound tile memory object in `commandBuffer`

- VUID-vkCmdTraceRaysKHR-None-10678
  If this command is recorded inside a tile shading render pass instance, the stages corresponding to the pipeline bind point used by this command must only include VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_FRAGMENT_BIT, and/or VK_SHADER_STAGE_COMPUTE_BIT

- VUID-vkCmdTraceRaysKHR-None-10679
  If this command is recorded where per-tile execution model is enabled, there must be no access to any image while the image was be transitioned to the VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT layout

- VUID-vkCmdTraceRaysKHR-pDescription-09900
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the underlying VkTensorARM object must have been created with the VK_TENSOR_USAGE_SHADER_BIT_ARM usage flag set

- VUID-vkCmdTraceRaysKHR-dimensionCount-09905
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the `Rank` of the `OpTypeTensorARM` of the tensor resource variable must be equal to the `dimensionCount` provided via VkTensorCreateInfoARM::`pDescription` when creating the underlying VkTensorARM object

- VUID-vkCmdTraceRaysKHR-OpTypeTensorARM-09906
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the element type of the `OpTypeTensorARM` of the tensor resource variable must be compatible with the VkFormat of the VkTensorViewARM used for the access

- VUID-vkCmdTraceRaysKHR-OpTensorReadARM-12462
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, using `OpTensorReadARM` or `OpTensorWriteARM`, and the underlying VkTensorARM object was created with a VK_TENSOR_TILING_BRICK_16_WIDE_ARM, VK_TENSOR_TILING_BRICK_8_WIDE_ARM, VK_TENSOR_TILING_BRICK_4_WIDE_ARM, VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_ARM, or VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_64K_ARM VkTensorTilingARM, and the object read or written is an array, then the innermost coordinate provided to `OpTensorReadARM` or `OpTensorWriteARM` via the `Coordinates` operand must be a multiple of the largest power of 2 that is less than or equal to the number of components of the array

- VUID-vkCmdTraceRaysKHR-pNext-12463
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command and the corresponding VkTensorARM object was created with a VkTensorRollingBackingCreateInfoARM structure in the `pNext` chain of VkTensorCreateInfoARM, then the number of elements accessed with one `OpTensorReadARM` or `OpTensorWriteARM`, must be less than or equal to the number of elements available from the starting coordinate in the rolling backing along the innermost dimension, defined as `wraps`[`dimensionCount` - 1] - InnermostCoordinate % `wraps`[`dimensionCount` - 1] where InnermostCoordinate is the last component of the coordinates array provided via the `Coordinates` operand

- VUID-vkCmdTraceRaysKHR-None-12472
  Descriptors dynamically accessed in bound descriptor heaps must be valid

- VUID-vkCmdTraceRaysKHR-None-11297
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a `OpTypeStruct` decorated with `Block` or `BufferBlock` using that mapping, the calculated offset for the resource heap must be a multiple of `bufferDescriptorAlignment`

- VUID-vkCmdTraceRaysKHR-None-11298
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeImage` or `OpTypeSampledImage` using that mapping, the calculated offset for the resource heap must be a multiple of `imageDescriptorAlignment`

- VUID-vkCmdTraceRaysKHR-None-11299
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeSampler` or `OpTypeSampledImage` using that mapping, the calculated offset for the sampler heap must be a multiple of `samplerDescriptorAlignment`

- VUID-vkCmdTraceRaysKHR-None-11397
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeTensorARM` using that mapping, the calculated offset for the resource heap must be a multiple of `tensorDescriptorAlignment`

- VUID-vkCmdTraceRaysKHR-None-11300
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 4

- VUID-vkCmdTraceRaysKHR-None-11301
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdTraceRaysKHR-None-11302
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress

- VUID-vkCmdTraceRaysKHR-None-11304
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 8

- VUID-vkCmdTraceRaysKHR-None-11305
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdTraceRaysKHR-None-11306
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address pointed to by the address in push data must be a valid VkDeviceAddress

- VUID-vkCmdTraceRaysKHR-None-11308
  For each descriptor heap that is statically used by a bound shader, either directly or via a descriptor mapping, a valid descriptor heap must be bound

- VUID-vkCmdTraceRaysKHR-None-11309
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, execution of this command must not result in any descriptor read accessing data outside of the user range of the respective heap bound by `vkCmdBind*HeapEXT` commands

- VUID-vkCmdTraceRaysKHR-None-11372
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer or uniform texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified via VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdTraceRaysKHR-None-11373
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer or storage texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdTraceRaysKHR-None-11374
  If the `robustBufferAccess2` feature is not enabled, the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, uniform texel buffer, storage buffer, or storage texel buffer, that shader must not access values outside of the range of the buffer as specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdTraceRaysKHR-pBindInfo-11375
  If any bound shader uses an embedded sampler via a descriptor mapping, the value of `pBindInfo->reservedRangeSize` set for vkCmdBindSamplerHeapEXT must be greater than or equal to `minSamplerHeapReservedRangeWithEmbedded`

- VUID-vkCmdTraceRaysKHR-None-11376
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, and that shader statically uses a push constant value, that value must have been set by vkCmdPushDataEXT

- VUID-vkCmdTraceRaysKHR-None-11398
  If a bound shader was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the access must not be out of bounds

- VUID-vkCmdTraceRaysKHR-None-11437
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the buffer from which the address in push data was queried must have been created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdTraceRaysKHR-None-11438
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdTraceRaysKHR-None-11441
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must be aligned to `minUniformBufferOffsetAlignment`

- VUID-vkCmdTraceRaysKHR-None-11439
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_STORAGE_BUFFER_BIT usage flag set

- VUID-vkCmdTraceRaysKHR-None-11442
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must be aligned to `minStorageBufferOffsetAlignment`

- VUID-vkCmdTraceRaysKHR-None-11485
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses an acceleration structure using that mapping, the address that the acceleration structure is mapped to must be an acceleration structure address retrieved from a VkAccelerationStructureKHR object via vkGetAccelerationStructureDeviceAddressKHR or handle retrieved from a VkAccelerationStructureNV object via vkGetAccelerationStructureHandleNV

- VUID-vkCmdTraceRaysKHR-index-11450
  If a shader uses a sampler descriptor to sample an image as a result of this command, and that sampler descriptor uses a custom border color with an index defined by VkSamplerCustomBorderColorIndexCreateInfoEXT, the value of VkSamplerCustomBorderColorIndexCreateInfoEXT::`index` must have been registered before this command was recorded, and still be registered during the sampling operation, with an identically defined color

- VUID-vkCmdTraceRaysKHR-protectedNoFault-11455
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, the address that the resource is mapped to must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdTraceRaysKHR-protectedNoFault-11456
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, the address of the indirect memory must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdTraceRaysKHR-None-03429
  Any shader group handle referenced by this call must have been queried from the bound ray tracing pipeline

- VUID-vkCmdTraceRaysKHR-None-09458
  If the bound ray tracing pipeline state was created with the VK_DYNAMIC_STATE_RAY_TRACING_PIPELINE_STACK_SIZE_KHR dynamic state enabled then vkCmdSetRayTracingPipelineStackSizeKHR must have been called in the current command buffer prior to this trace command

- VUID-vkCmdTraceRaysKHR-None-11319
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, the value of the address at the expected location in shader record data must be a valid address

- VUID-vkCmdTraceRaysKHR-maxPipelineRayRecursionDepth-03679
  This command must not cause a shader call instruction to be executed from a shader invocation with a recursion depth greater than the value of `maxPipelineRayRecursionDepth` used to create the bound ray tracing pipeline

- VUID-vkCmdTraceRaysKHR-commandBuffer-03635
  `commandBuffer` must not be a protected command buffer

- VUID-vkCmdTraceRaysKHR-micromap-11640
  If a VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR descriptor is accessed as a result of this command, the access is not through an `OpRayQueryProceedKHR` operation, and the acceleration structure is built using geometry with a VkAccelerationStructureTrianglesOpacityMicromapKHR or VkAccelerationStructureTrianglesOpacityMicromapEXT structure included in its `pNext` chain, the VkPipeline bound to the pipeline bind point used by this command must have been created with `flags` that includes VK_PIPELINE_CREATE_RAY_TRACING_OPACITY_MICROMAP_BIT_KHR

- VUID-vkCmdTraceRaysKHR-size-04023
  The `size` member of `pRayGenShaderBindingTable` must be equal to its `stride` member

- VUID-vkCmdTraceRaysKHR-pRayGenShaderBindingTable-03681
  `pRayGenShaderBindingTable->deviceAddress` must be a device address allocated to the application from a buffer created with the VK_BUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHR usage flag set

- VUID-vkCmdTraceRaysKHR-pRayGenShaderBindingTable-03682
  `pRayGenShaderBindingTable->deviceAddress` must be a multiple of `VkPhysicalDeviceRayTracingPipelinePropertiesKHR`::`shaderGroupBaseAlignment`

- VUID-vkCmdTraceRaysKHR-pMissShaderBindingTable-03684
  `pMissShaderBindingTable->deviceAddress` must be a device address allocated to the application from a buffer created with the VK_BUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHR usage flag set

- VUID-vkCmdTraceRaysKHR-pMissShaderBindingTable-03685
  `pMissShaderBindingTable->deviceAddress` must be a multiple of `VkPhysicalDeviceRayTracingPipelinePropertiesKHR`::`shaderGroupBaseAlignment`

- VUID-vkCmdTraceRaysKHR-stride-03686
  `pMissShaderBindingTable->stride` must be a multiple of `VkPhysicalDeviceRayTracingPipelinePropertiesKHR`::`shaderGroupHandleAlignment`

- VUID-vkCmdTraceRaysKHR-stride-04029
  `pMissShaderBindingTable->stride` must be less than or equal to `VkPhysicalDeviceRayTracingPipelinePropertiesKHR`::`maxShaderGroupStride`

- VUID-vkCmdTraceRaysKHR-pHitShaderBindingTable-03688
  `pHitShaderBindingTable->deviceAddress` must be a device address allocated to the application from a buffer created with the VK_BUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHR usage flag set

- VUID-vkCmdTraceRaysKHR-pHitShaderBindingTable-03689
  `pHitShaderBindingTable->deviceAddress` must be a multiple of `VkPhysicalDeviceRayTracingPipelinePropertiesKHR`::`shaderGroupBaseAlignment`

- VUID-vkCmdTraceRaysKHR-stride-03690
  `pHitShaderBindingTable->stride` must be a multiple of `VkPhysicalDeviceRayTracingPipelinePropertiesKHR`::`shaderGroupHandleAlignment`

- VUID-vkCmdTraceRaysKHR-stride-04035
  `pHitShaderBindingTable->stride` must be less than or equal to `VkPhysicalDeviceRayTracingPipelinePropertiesKHR`::`maxShaderGroupStride`

- VUID-vkCmdTraceRaysKHR-pCallableShaderBindingTable-03692
  `pCallableShaderBindingTable->deviceAddress` must be a device address allocated to the application from a buffer created with the VK_BUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHR usage flag set

- VUID-vkCmdTraceRaysKHR-pCallableShaderBindingTable-03693
  `pCallableShaderBindingTable->deviceAddress` must be a multiple of `VkPhysicalDeviceRayTracingPipelinePropertiesKHR`::`shaderGroupBaseAlignment`

- VUID-vkCmdTraceRaysKHR-stride-03694
  `pCallableShaderBindingTable->stride` must be a multiple of `VkPhysicalDeviceRayTracingPipelinePropertiesKHR`::`shaderGroupHandleAlignment`

- VUID-vkCmdTraceRaysKHR-stride-04041
  `pCallableShaderBindingTable->stride` must be less than or equal to `VkPhysicalDeviceRayTracingPipelinePropertiesKHR`::`maxShaderGroupStride`

- VUID-vkCmdTraceRaysKHR-flags-03511
  If the bound ray tracing pipeline was created with `flags` that included VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR, the entries in the table identified by `pMissShaderBindingTable->deviceAddress` accessed as a result of this command in order to execute a miss shader must not be zero

- VUID-vkCmdTraceRaysKHR-flags-03512
  If the bound ray tracing pipeline was created with `flags` that included VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR, entries in the table identified by `pHitShaderBindingTable->deviceAddress` accessed as a result of this command in order to execute an any-hit shader must not be zero

- VUID-vkCmdTraceRaysKHR-flags-03513
  If the bound ray tracing pipeline was created with `flags` that included VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR, entries in the table identified by `pHitShaderBindingTable->deviceAddress` accessed as a result of this command in order to execute a closest hit shader must not be zero

- VUID-vkCmdTraceRaysKHR-flags-03514
  If the bound ray tracing pipeline was created with `flags` that included VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR, entries in the table identified by `pHitShaderBindingTable->deviceAddress` accessed as a result of this command in order to execute an intersection shader must not be zero

- VUID-vkCmdTraceRaysKHR-pHitShaderBindingTable-04735
  Any non-zero hit shader group entries in the table identified by `pHitShaderBindingTable->deviceAddress` accessed by this call from a geometry with a `geometryType` of VK_GEOMETRY_TYPE_TRIANGLES_KHR must have been created with VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR

- VUID-vkCmdTraceRaysKHR-pHitShaderBindingTable-04736
  Any non-zero hit shader group entries in the table identified by `pHitShaderBindingTable->deviceAddress` accessed by this call from a geometry with a `geometryType` of VK_GEOMETRY_TYPE_AABBS_KHR must have been created with VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR

- VUID-vkCmdTraceRaysKHR-width-03638
  `width` must be less than or equal to `VkPhysicalDeviceLimits`::`maxComputeWorkGroupCount`[0] × `VkPhysicalDeviceLimits`::`maxComputeWorkGroupSize`[0]

- VUID-vkCmdTraceRaysKHR-height-03639
  `height` must be less than or equal to `VkPhysicalDeviceLimits`::`maxComputeWorkGroupCount`[1] × `VkPhysicalDeviceLimits`::`maxComputeWorkGroupSize`[1]

- VUID-vkCmdTraceRaysKHR-depth-03640
  `depth` must be less than or equal to `VkPhysicalDeviceLimits`::`maxComputeWorkGroupCount`[2] × `VkPhysicalDeviceLimits`::`maxComputeWorkGroupSize`[2]

- VUID-vkCmdTraceRaysKHR-width-03641
  `width` × `height` × `depth` must be less than or equal to `VkPhysicalDeviceRayTracingPipelinePropertiesKHR`::`maxRayDispatchInvocationCount`

- VUID-vkCmdTraceRaysKHR-allowClusterAccelerationStructure-10578
  If the traced geometry contains a cluster acceleration structure, then VkRayTracingPipelineClusterAccelerationStructureCreateInfoNV::`allowClusterAccelerationStructure` must have been set for that pipeline

Valid Usage (Implicit)

- VUID-vkCmdTraceRaysKHR-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdTraceRaysKHR-pRaygenShaderBindingTable-parameter
  `pRaygenShaderBindingTable` must be a valid pointer to a valid VkStridedDeviceAddressRegionKHR structure

- VUID-vkCmdTraceRaysKHR-pMissShaderBindingTable-parameter
  `pMissShaderBindingTable` must be a valid pointer to a valid VkStridedDeviceAddressRegionKHR structure

- VUID-vkCmdTraceRaysKHR-pHitShaderBindingTable-parameter
  `pHitShaderBindingTable` must be a valid pointer to a valid VkStridedDeviceAddressRegionKHR structure

- VUID-vkCmdTraceRaysKHR-pCallableShaderBindingTable-parameter
  `pCallableShaderBindingTable` must be a valid pointer to a valid VkStridedDeviceAddressRegionKHR structure

- VUID-vkCmdTraceRaysKHR-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdTraceRaysKHR-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT operations

- VUID-vkCmdTraceRaysKHR-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdTraceRaysKHR-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdTraceRaysKHR-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Outside | VK_QUEUE_COMPUTE_BIT | Action

Conditional Rendering

vkCmdTraceRaysKHR is not affected by conditional rendering

When invocation mask image usage is enabled in the bound ray tracing pipeline, the pipeline uses an invocation mask image specified by the command:

    // Provided by VK_HUAWEI_invocation_mask
    void vkCmdBindInvocationMaskHUAWEI(
        VkCommandBuffer                             commandBuffer,
        VkImageView                                 imageView,
        VkImageLayout                               imageLayout);

- `commandBuffer` is the command buffer into which the command will be recorded

- `imageView` is an image view handle specifying the invocation mask image `imageView` may be VK_NULL_HANDLE, which is equivalent to specifying a view of an image filled with ones value.

- `imageLayout` is the layout that the image subresources accessible from `imageView` will be in when the invocation mask image is accessed

Valid Usage

- VUID-vkCmdBindInvocationMaskHUAWEI-None-04976
  The `invocationMask` feature must be enabled

- VUID-vkCmdBindInvocationMaskHUAWEI-imageView-04977
  If `imageView` is not VK_NULL_HANDLE, it must be a valid VkImageView handle of type VK_IMAGE_VIEW_TYPE_2D

- VUID-vkCmdBindInvocationMaskHUAWEI-imageView-04978
  If `imageView` is not VK_NULL_HANDLE, it must have a format of VK_FORMAT_R8_UINT

- VUID-vkCmdBindInvocationMaskHUAWEI-imageView-04979
  If `imageView` is not VK_NULL_HANDLE, it must have been created with the VK_IMAGE_USAGE_INVOCATION_MASK_BIT_HUAWEI usage flag set

- VUID-vkCmdBindInvocationMaskHUAWEI-imageView-04980
  If `imageView` is not VK_NULL_HANDLE, `imageLayout` must be VK_IMAGE_LAYOUT_GENERAL

- VUID-vkCmdBindInvocationMaskHUAWEI-width-04981
  Thread mask image resolution must match the `width` and `height` in vkCmdTraceRaysKHR

- VUID-vkCmdBindInvocationMaskHUAWEI-None-04982
  Each element in the invocation mask image must have the value `0` or `1`. The value 1 means the invocation is active

- VUID-vkCmdBindInvocationMaskHUAWEI-depth-04983
  `depth` in vkCmdTraceRaysKHR must be 1

Valid Usage (Implicit)

- VUID-vkCmdBindInvocationMaskHUAWEI-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdBindInvocationMaskHUAWEI-imageView-parameter
  If `imageView` is not VK_NULL_HANDLE, `imageView` must be a valid VkImageView handle

- VUID-vkCmdBindInvocationMaskHUAWEI-imageLayout-parameter
  `imageLayout` must be a valid VkImageLayout value

- VUID-vkCmdBindInvocationMaskHUAWEI-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdBindInvocationMaskHUAWEI-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT operations

- VUID-vkCmdBindInvocationMaskHUAWEI-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdBindInvocationMaskHUAWEI-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdBindInvocationMaskHUAWEI-commonparent
  Both of `commandBuffer`, and `imageView` that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Outside | VK_QUEUE_COMPUTE_BIT | State

Conditional Rendering

vkCmdBindInvocationMaskHUAWEI is not affected by conditional rendering

To dispatch ray tracing, with some parameters sourced on the device, use:

    // Provided by VK_KHR_ray_tracing_pipeline
    void vkCmdTraceRaysIndirectKHR(
        VkCommandBuffer                             commandBuffer,
        const VkStridedDeviceAddressRegionKHR*      pRaygenShaderBindingTable,
        const VkStridedDeviceAddressRegionKHR*      pMissShaderBindingTable,
        const VkStridedDeviceAddressRegionKHR*      pHitShaderBindingTable,
        const VkStridedDeviceAddressRegionKHR*      pCallableShaderBindingTable,
        VkDeviceAddress                             indirectDeviceAddress);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `pRaygenShaderBindingTable` is a VkStridedDeviceAddressRegionKHR that holds the shader binding table data for the ray generation shader stage.

- `pMissShaderBindingTable` is a VkStridedDeviceAddressRegionKHR that holds the shader binding table data for the miss shader stage.

- `pHitShaderBindingTable` is a VkStridedDeviceAddressRegionKHR that holds the shader binding table data for the hit shader stage.

- `pCallableShaderBindingTable` is a VkStridedDeviceAddressRegionKHR that holds the shader binding table data for the callable shader stage.

- `indirectDeviceAddress` is a buffer device address which is a pointer to a VkTraceRaysIndirectCommandKHR structure containing the trace ray parameters.

`vkCmdTraceRaysIndirectKHR` behaves similarly to vkCmdTraceRaysKHR except that the ray trace query dimensions are read by the device from `indirectDeviceAddress` during execution.

Valid Usage

- VUID-vkCmdTraceRaysIndirectKHR-magFilter-04553
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdTraceRaysIndirectKHR-magFilter-09598
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdTraceRaysIndirectKHR-mipmapMode-04770
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdTraceRaysIndirectKHR-mipmapMode-09599
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdTraceRaysIndirectKHR-unnormalizedCoordinates-09635
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `levelCount` and `layerCount` must be 1

- VUID-vkCmdTraceRaysIndirectKHR-None-08609
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `viewType` must be VK_IMAGE_VIEW_TYPE_1D or VK_IMAGE_VIEW_TYPE_2D

- VUID-vkCmdTraceRaysIndirectKHR-None-08610
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions with `ImplicitLod`, `Dref` or `Proj` in their name

- VUID-vkCmdTraceRaysIndirectKHR-None-08611
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions that includes a LOD bias or any offset values

- VUID-vkCmdTraceRaysIndirectKHR-None-06479
  If a VkImageView is sampled with depth comparison, the image view’s format features must contain VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT

- VUID-vkCmdTraceRaysIndirectKHR-None-02691
  If a VkImageView is accessed using atomic operations as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT

- VUID-vkCmdTraceRaysIndirectKHR-None-07888
  If a VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER descriptor is accessed using atomic operations as a result of this command, then the storage texel buffer’s format features must contain VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT

- VUID-vkCmdTraceRaysIndirectKHR-None-02692
  If a VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT

- VUID-vkCmdTraceRaysIndirectKHR-None-02693
  If the VK_EXT_filter_cubic extension is not enabled and any VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, it must not have a VkImageViewType of VK_IMAGE_VIEW_TYPE_3D, VK_IMAGE_VIEW_TYPE_CUBE, or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY

- VUID-vkCmdTraceRaysIndirectKHR-filterCubic-02694
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have a VkImageViewType and format that supports cubic filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubic` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdTraceRaysIndirectKHR-filterCubicMinmax-02695
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX as a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubicMinmax` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdTraceRaysIndirectKHR-cubicRangeClamp-09212
  If the `cubicRangeClamp` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must not have a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM

- VUID-vkCmdTraceRaysIndirectKHR-reductionMode-09213
  Any VkImageView being sampled with a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM as a result of this command must sample with VK_FILTER_CUBIC_EXT

- VUID-vkCmdTraceRaysIndirectKHR-selectableCubicWeights-09214
  If the `selectableCubicWeights` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have VkSamplerCubicWeightsCreateInfoQCOM::`cubicWeights` equal to VK_CUBIC_FILTER_WEIGHTS_CATMULL_ROM_QCOM

- VUID-vkCmdTraceRaysIndirectKHR-flags-02696
  Any VkImage created with a VkImageCreateInfo::`flags` containing VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV sampled as a result of this command must only be sampled using a VkSamplerAddressMode of VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdTraceRaysIndirectKHR-OpTypeImage-07027
  For any VkImageView being written as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdTraceRaysIndirectKHR-OpTypeImage-07028
  For any VkImageView being read as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdTraceRaysIndirectKHR-OpTypeImage-07029
  For any VkBufferView being written as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown`, the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdTraceRaysIndirectKHR-OpTypeImage-07030
  Any VkBufferView being read as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown` then the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdTraceRaysIndirectKHR-None-08600
  If a a bound shader was created with a pipeline layout and statically uses a set n, a descriptor set must have been bound to n at the same pipeline bind point, with layouts compatible for set n with the layout(s) used to create the shader, as described in Pipeline Layout Compatibility

- VUID-vkCmdTraceRaysIndirectKHR-None-08601
  If a a bound shader was created with a pipeline layout or specified push constant ranges and statically uses a push constant value, that value must have been set for the same pipeline bind point, with push constant ranges that are compatible with the push constant range used to create the shader

- VUID-vkCmdTraceRaysIndirectKHR-None-10068
  For each array of resources that is used by a bound shader, the indices used to access members of the array must be less than the descriptor count for the identified binding in the descriptor sets used by this command

- VUID-vkCmdTraceRaysIndirectKHR-None-08114
  Descriptors in each bound descriptor set, specified via vkCmdBindDescriptorSets, must be valid if they are accessed as described by descriptor validity by the VkPipeline bound to the pipeline bind point used by this command and the bound VkPipeline was not created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdTraceRaysIndirectKHR-imageLayout-00344
  If an image descriptor is accessed by a shader, the VkImageLayout must match the subresource accessible from the VkImageView as defined by the image layout matching rules

- VUID-vkCmdTraceRaysIndirectKHR-None-08115
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdBindDescriptorSets, the bound VkPipeline must have been created without VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdTraceRaysIndirectKHR-None-08116
  Descriptors in bound descriptor buffers, specified via vkCmdSetDescriptorBufferOffsetsEXT, must be valid if they are dynamically accessed

- VUID-vkCmdTraceRaysIndirectKHR-None-08117
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdSetDescriptorBufferOffsetsEXT, the bound VkPipeline must have been created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdTraceRaysIndirectKHR-None-08119
  If a descriptor is dynamically used with a VkPipeline created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdTraceRaysIndirectKHR-None-08605
  If a descriptor is dynamically used with a VkShaderEXT created with a `VkDescriptorSetLayout` that was created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdTraceRaysIndirectKHR-None-08606
  If the `shaderObject` feature is not enabled, a valid pipeline must be bound to the pipeline bind point used by this command

- VUID-vkCmdTraceRaysIndirectKHR-None-08608
  If a pipeline is bound to the pipeline bind point used by this command, there must not have been any calls to dynamic state setting commands for any state specified statically in the VkPipeline object bound to the pipeline bind point used by this command, since that pipeline was bound

- VUID-vkCmdTraceRaysIndirectKHR-uniformBuffers-06935
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdTraceRaysIndirectKHR-None-08612
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdTraceRaysIndirectKHR-storageBuffers-06936
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdTraceRaysIndirectKHR-None-08613
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a storage buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdTraceRaysIndirectKHR-commandBuffer-02707
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, any resource accessed by bound shaders must not be a protected resource

- VUID-vkCmdTraceRaysIndirectKHR-viewType-07752
  If a VkImageView is accessed as a result of this command, then the image view’s `viewType` must match the `Dim` operand of the `OpTypeImage` as described in Compatibility Between SPIR-V Image Dimensions and Vulkan ImageView Types

- VUID-vkCmdTraceRaysIndirectKHR-format-07753
  If a VkImageView or VkBufferView is accessed as a result of this command, then the numeric type of the view’s `format` and the `Sampled` `Type` operand of the `OpTypeImage` must match

- VUID-vkCmdTraceRaysIndirectKHR-OpImageWrite-08795
  If a VkImageView created with a format other than VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the image view’s format

- VUID-vkCmdTraceRaysIndirectKHR-OpImageWrite-08796
  If a VkImageView created with the format VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have four components

- VUID-vkCmdTraceRaysIndirectKHR-OpImageWrite-04469
  If a VkBufferView is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the buffer view’s format

- VUID-vkCmdTraceRaysIndirectKHR-SampledType-04470
  If a VkImageView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdTraceRaysIndirectKHR-SampledType-04471
  If a VkImageView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdTraceRaysIndirectKHR-SampledType-04472
  If a VkBufferView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdTraceRaysIndirectKHR-SampledType-04473
  If a VkBufferView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdTraceRaysIndirectKHR-sparseImageInt64Atomics-04474
  If the `sparseImageInt64Atomics` feature is not enabled, VkImage objects created with the VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdTraceRaysIndirectKHR-sparseImageInt64Atomics-04475
  If the `sparseImageInt64Atomics` feature is not enabled, VkBuffer objects created with the VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdTraceRaysIndirectKHR-OpImageSampleWeightedQCOM-06971
  If `OpImageSampleWeightedQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_SAMPLED_IMAGE_BIT_QCOM

- VUID-vkCmdTraceRaysIndirectKHR-OpImageSampleWeightedQCOM-06972
  If `OpImageSampleWeightedQCOM` uses a VkImageView as a sample weight image as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_IMAGE_BIT_QCOM

- VUID-vkCmdTraceRaysIndirectKHR-OpImageBoxFilterQCOM-06973
  If `OpImageBoxFilterQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BOX_FILTER_SAMPLED_BIT_QCOM

- VUID-vkCmdTraceRaysIndirectKHR-OpImageBlockMatchSSDQCOM-06974
  If `OpImageBlockMatchSSDQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdTraceRaysIndirectKHR-OpImageBlockMatchSADQCOM-12420
  If `OpImageBlockMatchSADQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdTraceRaysIndirectKHR-OpImageBlockMatchSADQCOM-06976
  If `OpImageBlockMatchSADQCOM` or OpImageBlockMatchSSDQCOM is used to read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdTraceRaysIndirectKHR-OpImageSampleWeightedQCOM-06977
  If `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdTraceRaysIndirectKHR-OpImageSampleWeightedQCOM-06978
  If any command other than `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must not have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdTraceRaysIndirectKHR-OpImageBlockMatchWindow-09215
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM

- VUID-vkCmdTraceRaysIndirectKHR-OpImageBlockMatchWindow-09216
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format must be a single-component format

- VUID-vkCmdTraceRaysIndirectKHR-OpImageBlockMatchWindow-09217
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdTraceRaysIndirectKHR-OpImageBlockMatchWindow-12421
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the `blockMatchExtendedClampToEdge` feature is not enabled, the input sampler must not have been created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdTraceRaysIndirectKHR-addressModeU-12422
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the input sampler was created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, then the sampler must have been created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdTraceRaysIndirectKHR-None-07288
  Any shader invocation executed by this command must terminate

- VUID-vkCmdTraceRaysIndirectKHR-None-09600
  If a descriptor with type equal to any of VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, or VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT is accessed as a result of this command, all image subresources identified by that descriptor must be in the image layout identified when the descriptor was written

- VUID-vkCmdTraceRaysIndirectKHR-micromap-11636
  If an acceleration structure is accessed as a result of this command through an `OpRayQueryProceedKHR` operation , the `VK_EXT_opacity_micromap` extension is not enabled, and the acceleration structure is built using geometry with a VkAccelerationStructureTrianglesOpacityMicromapKHR structure included in its `pNext` chain, the shader must have specified a `OpacityMicromapIdKHR` execution mode with its specialization constant operand equal to VK_TRUE

- VUID-vkCmdTraceRaysIndirectKHR-micromap-11637
  If an acceleration structure is accessed as a result of this command and the acceleration structure was constructed through deserialization, all micromap arrays referenced by the acceleration structure that were not replaced by an acceleration structure update command must have been deserialized using the serialized data of the corresponding micromaps used to originally build the acceleration structure prior to the execution of this command on the device

- VUID-vkCmdTraceRaysIndirectKHR-micromap-11638
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkPipeline bound to the pipeline bind point used by this command must not have been created with `flags` that includes VK_PIPELINE_CREATE_2_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_KHR

- VUID-vkCmdTraceRaysIndirectKHR-micromap-11639
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkShaderEXT that accessed the descriptor must not have been created with `flags` that includes VK_SHADER_CREATE_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_EXT

- VUID-vkCmdTraceRaysIndirectKHR-commandBuffer-10746
  The `VkDeviceMemory` object allocated from a `VkMemoryHeap` with the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property that is bound to a resource accessed as a result of this command must be the active bound tile memory object in `commandBuffer`

- VUID-vkCmdTraceRaysIndirectKHR-None-10678
  If this command is recorded inside a tile shading render pass instance, the stages corresponding to the pipeline bind point used by this command must only include VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_FRAGMENT_BIT, and/or VK_SHADER_STAGE_COMPUTE_BIT

- VUID-vkCmdTraceRaysIndirectKHR-None-10679
  If this command is recorded where per-tile execution model is enabled, there must be no access to any image while the image was be transitioned to the VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT layout

- VUID-vkCmdTraceRaysIndirectKHR-pDescription-09900
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the underlying VkTensorARM object must have been created with the VK_TENSOR_USAGE_SHADER_BIT_ARM usage flag set

- VUID-vkCmdTraceRaysIndirectKHR-dimensionCount-09905
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the `Rank` of the `OpTypeTensorARM` of the tensor resource variable must be equal to the `dimensionCount` provided via VkTensorCreateInfoARM::`pDescription` when creating the underlying VkTensorARM object

- VUID-vkCmdTraceRaysIndirectKHR-OpTypeTensorARM-09906
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the element type of the `OpTypeTensorARM` of the tensor resource variable must be compatible with the VkFormat of the VkTensorViewARM used for the access

- VUID-vkCmdTraceRaysIndirectKHR-OpTensorReadARM-12462
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, using `OpTensorReadARM` or `OpTensorWriteARM`, and the underlying VkTensorARM object was created with a VK_TENSOR_TILING_BRICK_16_WIDE_ARM, VK_TENSOR_TILING_BRICK_8_WIDE_ARM, VK_TENSOR_TILING_BRICK_4_WIDE_ARM, VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_ARM, or VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_64K_ARM VkTensorTilingARM, and the object read or written is an array, then the innermost coordinate provided to `OpTensorReadARM` or `OpTensorWriteARM` via the `Coordinates` operand must be a multiple of the largest power of 2 that is less than or equal to the number of components of the array

- VUID-vkCmdTraceRaysIndirectKHR-pNext-12463
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command and the corresponding VkTensorARM object was created with a VkTensorRollingBackingCreateInfoARM structure in the `pNext` chain of VkTensorCreateInfoARM, then the number of elements accessed with one `OpTensorReadARM` or `OpTensorWriteARM`, must be less than or equal to the number of elements available from the starting coordinate in the rolling backing along the innermost dimension, defined as `wraps`[`dimensionCount` - 1] - InnermostCoordinate % `wraps`[`dimensionCount` - 1] where InnermostCoordinate is the last component of the coordinates array provided via the `Coordinates` operand

- VUID-vkCmdTraceRaysIndirectKHR-None-12472
  Descriptors dynamically accessed in bound descriptor heaps must be valid

- VUID-vkCmdTraceRaysIndirectKHR-None-11297
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a `OpTypeStruct` decorated with `Block` or `BufferBlock` using that mapping, the calculated offset for the resource heap must be a multiple of `bufferDescriptorAlignment`

- VUID-vkCmdTraceRaysIndirectKHR-None-11298
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeImage` or `OpTypeSampledImage` using that mapping, the calculated offset for the resource heap must be a multiple of `imageDescriptorAlignment`

- VUID-vkCmdTraceRaysIndirectKHR-None-11299
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeSampler` or `OpTypeSampledImage` using that mapping, the calculated offset for the sampler heap must be a multiple of `samplerDescriptorAlignment`

- VUID-vkCmdTraceRaysIndirectKHR-None-11397
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeTensorARM` using that mapping, the calculated offset for the resource heap must be a multiple of `tensorDescriptorAlignment`

- VUID-vkCmdTraceRaysIndirectKHR-None-11300
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 4

- VUID-vkCmdTraceRaysIndirectKHR-None-11301
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdTraceRaysIndirectKHR-None-11302
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress

- VUID-vkCmdTraceRaysIndirectKHR-None-11304
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 8

- VUID-vkCmdTraceRaysIndirectKHR-None-11305
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdTraceRaysIndirectKHR-None-11306
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address pointed to by the address in push data must be a valid VkDeviceAddress

- VUID-vkCmdTraceRaysIndirectKHR-None-11308
  For each descriptor heap that is statically used by a bound shader, either directly or via a descriptor mapping, a valid descriptor heap must be bound

- VUID-vkCmdTraceRaysIndirectKHR-None-11309
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, execution of this command must not result in any descriptor read accessing data outside of the user range of the respective heap bound by `vkCmdBind*HeapEXT` commands

- VUID-vkCmdTraceRaysIndirectKHR-None-11372
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer or uniform texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified via VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdTraceRaysIndirectKHR-None-11373
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer or storage texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdTraceRaysIndirectKHR-None-11374
  If the `robustBufferAccess2` feature is not enabled, the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, uniform texel buffer, storage buffer, or storage texel buffer, that shader must not access values outside of the range of the buffer as specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdTraceRaysIndirectKHR-pBindInfo-11375
  If any bound shader uses an embedded sampler via a descriptor mapping, the value of `pBindInfo->reservedRangeSize` set for vkCmdBindSamplerHeapEXT must be greater than or equal to `minSamplerHeapReservedRangeWithEmbedded`

- VUID-vkCmdTraceRaysIndirectKHR-None-11376
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, and that shader statically uses a push constant value, that value must have been set by vkCmdPushDataEXT

- VUID-vkCmdTraceRaysIndirectKHR-None-11398
  If a bound shader was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the access must not be out of bounds

- VUID-vkCmdTraceRaysIndirectKHR-None-11437
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the buffer from which the address in push data was queried must have been created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdTraceRaysIndirectKHR-None-11438
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdTraceRaysIndirectKHR-None-11441
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must be aligned to `minUniformBufferOffsetAlignment`

- VUID-vkCmdTraceRaysIndirectKHR-None-11439
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_STORAGE_BUFFER_BIT usage flag set

- VUID-vkCmdTraceRaysIndirectKHR-None-11442
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must be aligned to `minStorageBufferOffsetAlignment`

- VUID-vkCmdTraceRaysIndirectKHR-None-11485
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses an acceleration structure using that mapping, the address that the acceleration structure is mapped to must be an acceleration structure address retrieved from a VkAccelerationStructureKHR object via vkGetAccelerationStructureDeviceAddressKHR or handle retrieved from a VkAccelerationStructureNV object via vkGetAccelerationStructureHandleNV

- VUID-vkCmdTraceRaysIndirectKHR-index-11450
  If a shader uses a sampler descriptor to sample an image as a result of this command, and that sampler descriptor uses a custom border color with an index defined by VkSamplerCustomBorderColorIndexCreateInfoEXT, the value of VkSamplerCustomBorderColorIndexCreateInfoEXT::`index` must have been registered before this command was recorded, and still be registered during the sampling operation, with an identically defined color

- VUID-vkCmdTraceRaysIndirectKHR-protectedNoFault-11455
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, the address that the resource is mapped to must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdTraceRaysIndirectKHR-protectedNoFault-11456
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, the address of the indirect memory must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdTraceRaysIndirectKHR-None-03429
  Any shader group handle referenced by this call must have been queried from the bound ray tracing pipeline

- VUID-vkCmdTraceRaysIndirectKHR-None-09458
  If the bound ray tracing pipeline state was created with the VK_DYNAMIC_STATE_RAY_TRACING_PIPELINE_STACK_SIZE_KHR dynamic state enabled then vkCmdSetRayTracingPipelineStackSizeKHR must have been called in the current command buffer prior to this trace command

- VUID-vkCmdTraceRaysIndirectKHR-None-11319
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, the value of the address at the expected location in shader record data must be a valid address

- VUID-vkCmdTraceRaysIndirectKHR-maxPipelineRayRecursionDepth-03679
  This command must not cause a shader call instruction to be executed from a shader invocation with a recursion depth greater than the value of `maxPipelineRayRecursionDepth` used to create the bound ray tracing pipeline

- VUID-vkCmdTraceRaysIndirectKHR-commandBuffer-03635
  `commandBuffer` must not be a protected command buffer

- VUID-vkCmdTraceRaysIndirectKHR-micromap-11640
  If a VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR descriptor is accessed as a result of this command, the access is not through an `OpRayQueryProceedKHR` operation, and the acceleration structure is built using geometry with a VkAccelerationStructureTrianglesOpacityMicromapKHR or VkAccelerationStructureTrianglesOpacityMicromapEXT structure included in its `pNext` chain, the VkPipeline bound to the pipeline bind point used by this command must have been created with `flags` that includes VK_PIPELINE_CREATE_RAY_TRACING_OPACITY_MICROMAP_BIT_KHR

- VUID-vkCmdTraceRaysIndirectKHR-size-04023
  The `size` member of `pRayGenShaderBindingTable` must be equal to its `stride` member

- VUID-vkCmdTraceRaysIndirectKHR-pRayGenShaderBindingTable-03681
  `pRayGenShaderBindingTable->deviceAddress` must be a device address allocated to the application from a buffer created with the VK_BUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHR usage flag set

- VUID-vkCmdTraceRaysIndirectKHR-pRayGenShaderBindingTable-03682
  `pRayGenShaderBindingTable->deviceAddress` must be a multiple of `VkPhysicalDeviceRayTracingPipelinePropertiesKHR`::`shaderGroupBaseAlignment`

- VUID-vkCmdTraceRaysIndirectKHR-pMissShaderBindingTable-03684
  `pMissShaderBindingTable->deviceAddress` must be a device address allocated to the application from a buffer created with the VK_BUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHR usage flag set

- VUID-vkCmdTraceRaysIndirectKHR-pMissShaderBindingTable-03685
  `pMissShaderBindingTable->deviceAddress` must be a multiple of `VkPhysicalDeviceRayTracingPipelinePropertiesKHR`::`shaderGroupBaseAlignment`

- VUID-vkCmdTraceRaysIndirectKHR-stride-03686
  `pMissShaderBindingTable->stride` must be a multiple of `VkPhysicalDeviceRayTracingPipelinePropertiesKHR`::`shaderGroupHandleAlignment`

- VUID-vkCmdTraceRaysIndirectKHR-stride-04029
  `pMissShaderBindingTable->stride` must be less than or equal to `VkPhysicalDeviceRayTracingPipelinePropertiesKHR`::`maxShaderGroupStride`

- VUID-vkCmdTraceRaysIndirectKHR-pHitShaderBindingTable-03688
  `pHitShaderBindingTable->deviceAddress` must be a device address allocated to the application from a buffer created with the VK_BUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHR usage flag set

- VUID-vkCmdTraceRaysIndirectKHR-pHitShaderBindingTable-03689
  `pHitShaderBindingTable->deviceAddress` must be a multiple of `VkPhysicalDeviceRayTracingPipelinePropertiesKHR`::`shaderGroupBaseAlignment`

- VUID-vkCmdTraceRaysIndirectKHR-stride-03690
  `pHitShaderBindingTable->stride` must be a multiple of `VkPhysicalDeviceRayTracingPipelinePropertiesKHR`::`shaderGroupHandleAlignment`

- VUID-vkCmdTraceRaysIndirectKHR-stride-04035
  `pHitShaderBindingTable->stride` must be less than or equal to `VkPhysicalDeviceRayTracingPipelinePropertiesKHR`::`maxShaderGroupStride`

- VUID-vkCmdTraceRaysIndirectKHR-pCallableShaderBindingTable-03692
  `pCallableShaderBindingTable->deviceAddress` must be a device address allocated to the application from a buffer created with the VK_BUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHR usage flag set

- VUID-vkCmdTraceRaysIndirectKHR-pCallableShaderBindingTable-03693
  `pCallableShaderBindingTable->deviceAddress` must be a multiple of `VkPhysicalDeviceRayTracingPipelinePropertiesKHR`::`shaderGroupBaseAlignment`

- VUID-vkCmdTraceRaysIndirectKHR-stride-03694
  `pCallableShaderBindingTable->stride` must be a multiple of `VkPhysicalDeviceRayTracingPipelinePropertiesKHR`::`shaderGroupHandleAlignment`

- VUID-vkCmdTraceRaysIndirectKHR-stride-04041
  `pCallableShaderBindingTable->stride` must be less than or equal to `VkPhysicalDeviceRayTracingPipelinePropertiesKHR`::`maxShaderGroupStride`

- VUID-vkCmdTraceRaysIndirectKHR-flags-03511
  If the bound ray tracing pipeline was created with `flags` that included VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR, the entries in the table identified by `pMissShaderBindingTable->deviceAddress` accessed as a result of this command in order to execute a miss shader must not be zero

- VUID-vkCmdTraceRaysIndirectKHR-flags-03512
  If the bound ray tracing pipeline was created with `flags` that included VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR, entries in the table identified by `pHitShaderBindingTable->deviceAddress` accessed as a result of this command in order to execute an any-hit shader must not be zero

- VUID-vkCmdTraceRaysIndirectKHR-flags-03513
  If the bound ray tracing pipeline was created with `flags` that included VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR, entries in the table identified by `pHitShaderBindingTable->deviceAddress` accessed as a result of this command in order to execute a closest hit shader must not be zero

- VUID-vkCmdTraceRaysIndirectKHR-flags-03514
  If the bound ray tracing pipeline was created with `flags` that included VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR, entries in the table identified by `pHitShaderBindingTable->deviceAddress` accessed as a result of this command in order to execute an intersection shader must not be zero

- VUID-vkCmdTraceRaysIndirectKHR-pHitShaderBindingTable-04735
  Any non-zero hit shader group entries in the table identified by `pHitShaderBindingTable->deviceAddress` accessed by this call from a geometry with a `geometryType` of VK_GEOMETRY_TYPE_TRIANGLES_KHR must have been created with VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR

- VUID-vkCmdTraceRaysIndirectKHR-pHitShaderBindingTable-04736
  Any non-zero hit shader group entries in the table identified by `pHitShaderBindingTable->deviceAddress` accessed by this call from a geometry with a `geometryType` of VK_GEOMETRY_TYPE_AABBS_KHR must have been created with VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR

- VUID-vkCmdTraceRaysIndirectKHR-indirectDeviceAddress-03633
  `indirectDeviceAddress` must be a device address allocated to the application from a buffer created with the VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT usage flag set

- VUID-vkCmdTraceRaysIndirectKHR-indirectDeviceAddress-03634
  `indirectDeviceAddress` must be a multiple of `4`

- VUID-vkCmdTraceRaysIndirectKHR-indirectDeviceAddress-03636
  All device addresses between `indirectDeviceAddress` and `indirectDeviceAddress` + `sizeof`(`VkTraceRaysIndirectCommandKHR`) - 1 must be in the buffer device address range of the same buffer

- VUID-vkCmdTraceRaysIndirectKHR-rayTracingPipelineTraceRaysIndirect-03637
  The `rayTracingPipelineTraceRaysIndirect` feature must be enabled

- VUID-vkCmdTraceRaysIndirectKHR-rayTracingMotionBlurPipelineTraceRaysIndirect-04951
  If the bound ray tracing pipeline was created with VK_PIPELINE_CREATE_RAY_TRACING_ALLOW_MOTION_BIT_NV `VkPhysicalDeviceRayTracingMotionBlurFeaturesNV`::`rayTracingMotionBlurPipelineTraceRaysIndirect` feature must be enabled

Valid Usage (Implicit)

- VUID-vkCmdTraceRaysIndirectKHR-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdTraceRaysIndirectKHR-pRaygenShaderBindingTable-parameter
  `pRaygenShaderBindingTable` must be a valid pointer to a valid VkStridedDeviceAddressRegionKHR structure

- VUID-vkCmdTraceRaysIndirectKHR-pMissShaderBindingTable-parameter
  `pMissShaderBindingTable` must be a valid pointer to a valid VkStridedDeviceAddressRegionKHR structure

- VUID-vkCmdTraceRaysIndirectKHR-pHitShaderBindingTable-parameter
  `pHitShaderBindingTable` must be a valid pointer to a valid VkStridedDeviceAddressRegionKHR structure

- VUID-vkCmdTraceRaysIndirectKHR-pCallableShaderBindingTable-parameter
  `pCallableShaderBindingTable` must be a valid pointer to a valid VkStridedDeviceAddressRegionKHR structure

- VUID-vkCmdTraceRaysIndirectKHR-indirectDeviceAddress-parameter
  `indirectDeviceAddress` must be a valid VkDeviceAddress value

- VUID-vkCmdTraceRaysIndirectKHR-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdTraceRaysIndirectKHR-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT operations

- VUID-vkCmdTraceRaysIndirectKHR-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdTraceRaysIndirectKHR-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdTraceRaysIndirectKHR-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Outside | VK_QUEUE_COMPUTE_BIT | Action

Conditional Rendering

vkCmdTraceRaysIndirectKHR is not affected by conditional rendering

The `VkTraceRaysIndirectCommandKHR` structure is defined as:

    // Provided by VK_KHR_ray_tracing_pipeline
    typedef struct VkTraceRaysIndirectCommandKHR {
        uint32_t    width;
        uint32_t    height;
        uint32_t    depth;
    } VkTraceRaysIndirectCommandKHR;

- `width` is the width of the ray trace query dimensions.

- `height` is height of the ray trace query dimensions.

- `depth` is depth of the ray trace query dimensions.

The members of `VkTraceRaysIndirectCommandKHR` have the same meaning as the similarly named parameters of vkCmdTraceRaysKHR.

Valid Usage

- VUID-VkTraceRaysIndirectCommandKHR-width-03638
  `width` must be less than or equal to `VkPhysicalDeviceLimits`::`maxComputeWorkGroupCount`[0] × `VkPhysicalDeviceLimits`::`maxComputeWorkGroupSize`[0]

- VUID-VkTraceRaysIndirectCommandKHR-height-03639
  `height` must be less than or equal to `VkPhysicalDeviceLimits`::`maxComputeWorkGroupCount`[1] × `VkPhysicalDeviceLimits`::`maxComputeWorkGroupSize`[1]

- VUID-VkTraceRaysIndirectCommandKHR-depth-03640
  `depth` must be less than or equal to `VkPhysicalDeviceLimits`::`maxComputeWorkGroupCount`[2] × `VkPhysicalDeviceLimits`::`maxComputeWorkGroupSize`[2]

- VUID-VkTraceRaysIndirectCommandKHR-width-03641
  `width` × `height` × `depth` must be less than or equal to `VkPhysicalDeviceRayTracingPipelinePropertiesKHR`::`maxRayDispatchInvocationCount`

To dispatch ray tracing, with some parameters sourced on the device, use:

    // Provided by VK_KHR_ray_tracing_maintenance1 with VK_KHR_ray_tracing_pipeline
    void vkCmdTraceRaysIndirect2KHR(
        VkCommandBuffer                             commandBuffer,
        VkDeviceAddress                             indirectDeviceAddress);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `indirectDeviceAddress` is a buffer device address which is a pointer to a VkTraceRaysIndirectCommand2KHR structure containing the trace ray parameters.

`vkCmdTraceRaysIndirect2KHR` behaves similarly to vkCmdTraceRaysIndirectKHR except that shader binding table parameters as well as dispatch dimensions are read by the device from `indirectDeviceAddress` during execution.

Valid Usage

- VUID-vkCmdTraceRaysIndirect2KHR-magFilter-04553
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdTraceRaysIndirect2KHR-magFilter-09598
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdTraceRaysIndirect2KHR-mipmapMode-04770
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdTraceRaysIndirect2KHR-mipmapMode-09599
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdTraceRaysIndirect2KHR-unnormalizedCoordinates-09635
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `levelCount` and `layerCount` must be 1

- VUID-vkCmdTraceRaysIndirect2KHR-None-08609
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `viewType` must be VK_IMAGE_VIEW_TYPE_1D or VK_IMAGE_VIEW_TYPE_2D

- VUID-vkCmdTraceRaysIndirect2KHR-None-08610
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions with `ImplicitLod`, `Dref` or `Proj` in their name

- VUID-vkCmdTraceRaysIndirect2KHR-None-08611
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions that includes a LOD bias or any offset values

- VUID-vkCmdTraceRaysIndirect2KHR-None-06479
  If a VkImageView is sampled with depth comparison, the image view’s format features must contain VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT

- VUID-vkCmdTraceRaysIndirect2KHR-None-02691
  If a VkImageView is accessed using atomic operations as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT

- VUID-vkCmdTraceRaysIndirect2KHR-None-07888
  If a VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER descriptor is accessed using atomic operations as a result of this command, then the storage texel buffer’s format features must contain VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT

- VUID-vkCmdTraceRaysIndirect2KHR-None-02692
  If a VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT

- VUID-vkCmdTraceRaysIndirect2KHR-None-02693
  If the VK_EXT_filter_cubic extension is not enabled and any VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, it must not have a VkImageViewType of VK_IMAGE_VIEW_TYPE_3D, VK_IMAGE_VIEW_TYPE_CUBE, or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY

- VUID-vkCmdTraceRaysIndirect2KHR-filterCubic-02694
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have a VkImageViewType and format that supports cubic filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubic` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdTraceRaysIndirect2KHR-filterCubicMinmax-02695
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX as a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubicMinmax` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdTraceRaysIndirect2KHR-cubicRangeClamp-09212
  If the `cubicRangeClamp` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must not have a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM

- VUID-vkCmdTraceRaysIndirect2KHR-reductionMode-09213
  Any VkImageView being sampled with a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM as a result of this command must sample with VK_FILTER_CUBIC_EXT

- VUID-vkCmdTraceRaysIndirect2KHR-selectableCubicWeights-09214
  If the `selectableCubicWeights` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have VkSamplerCubicWeightsCreateInfoQCOM::`cubicWeights` equal to VK_CUBIC_FILTER_WEIGHTS_CATMULL_ROM_QCOM

- VUID-vkCmdTraceRaysIndirect2KHR-flags-02696
  Any VkImage created with a VkImageCreateInfo::`flags` containing VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV sampled as a result of this command must only be sampled using a VkSamplerAddressMode of VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdTraceRaysIndirect2KHR-OpTypeImage-07027
  For any VkImageView being written as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdTraceRaysIndirect2KHR-OpTypeImage-07028
  For any VkImageView being read as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdTraceRaysIndirect2KHR-OpTypeImage-07029
  For any VkBufferView being written as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown`, the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdTraceRaysIndirect2KHR-OpTypeImage-07030
  Any VkBufferView being read as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown` then the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdTraceRaysIndirect2KHR-None-08600
  If a a bound shader was created with a pipeline layout and statically uses a set n, a descriptor set must have been bound to n at the same pipeline bind point, with layouts compatible for set n with the layout(s) used to create the shader, as described in Pipeline Layout Compatibility

- VUID-vkCmdTraceRaysIndirect2KHR-None-08601
  If a a bound shader was created with a pipeline layout or specified push constant ranges and statically uses a push constant value, that value must have been set for the same pipeline bind point, with push constant ranges that are compatible with the push constant range used to create the shader

- VUID-vkCmdTraceRaysIndirect2KHR-None-10068
  For each array of resources that is used by a bound shader, the indices used to access members of the array must be less than the descriptor count for the identified binding in the descriptor sets used by this command

- VUID-vkCmdTraceRaysIndirect2KHR-None-08114
  Descriptors in each bound descriptor set, specified via vkCmdBindDescriptorSets, must be valid if they are accessed as described by descriptor validity by the VkPipeline bound to the pipeline bind point used by this command and the bound VkPipeline was not created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdTraceRaysIndirect2KHR-imageLayout-00344
  If an image descriptor is accessed by a shader, the VkImageLayout must match the subresource accessible from the VkImageView as defined by the image layout matching rules

- VUID-vkCmdTraceRaysIndirect2KHR-None-08115
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdBindDescriptorSets, the bound VkPipeline must have been created without VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdTraceRaysIndirect2KHR-None-08116
  Descriptors in bound descriptor buffers, specified via vkCmdSetDescriptorBufferOffsetsEXT, must be valid if they are dynamically accessed

- VUID-vkCmdTraceRaysIndirect2KHR-None-08117
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdSetDescriptorBufferOffsetsEXT, the bound VkPipeline must have been created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdTraceRaysIndirect2KHR-None-08119
  If a descriptor is dynamically used with a VkPipeline created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdTraceRaysIndirect2KHR-None-08605
  If a descriptor is dynamically used with a VkShaderEXT created with a `VkDescriptorSetLayout` that was created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdTraceRaysIndirect2KHR-None-08606
  If the `shaderObject` feature is not enabled, a valid pipeline must be bound to the pipeline bind point used by this command

- VUID-vkCmdTraceRaysIndirect2KHR-None-08608
  If a pipeline is bound to the pipeline bind point used by this command, there must not have been any calls to dynamic state setting commands for any state specified statically in the VkPipeline object bound to the pipeline bind point used by this command, since that pipeline was bound

- VUID-vkCmdTraceRaysIndirect2KHR-uniformBuffers-06935
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdTraceRaysIndirect2KHR-None-08612
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdTraceRaysIndirect2KHR-storageBuffers-06936
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdTraceRaysIndirect2KHR-None-08613
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a storage buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdTraceRaysIndirect2KHR-commandBuffer-02707
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, any resource accessed by bound shaders must not be a protected resource

- VUID-vkCmdTraceRaysIndirect2KHR-viewType-07752
  If a VkImageView is accessed as a result of this command, then the image view’s `viewType` must match the `Dim` operand of the `OpTypeImage` as described in Compatibility Between SPIR-V Image Dimensions and Vulkan ImageView Types

- VUID-vkCmdTraceRaysIndirect2KHR-format-07753
  If a VkImageView or VkBufferView is accessed as a result of this command, then the numeric type of the view’s `format` and the `Sampled` `Type` operand of the `OpTypeImage` must match

- VUID-vkCmdTraceRaysIndirect2KHR-OpImageWrite-08795
  If a VkImageView created with a format other than VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the image view’s format

- VUID-vkCmdTraceRaysIndirect2KHR-OpImageWrite-08796
  If a VkImageView created with the format VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have four components

- VUID-vkCmdTraceRaysIndirect2KHR-OpImageWrite-04469
  If a VkBufferView is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the buffer view’s format

- VUID-vkCmdTraceRaysIndirect2KHR-SampledType-04470
  If a VkImageView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdTraceRaysIndirect2KHR-SampledType-04471
  If a VkImageView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdTraceRaysIndirect2KHR-SampledType-04472
  If a VkBufferView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdTraceRaysIndirect2KHR-SampledType-04473
  If a VkBufferView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdTraceRaysIndirect2KHR-sparseImageInt64Atomics-04474
  If the `sparseImageInt64Atomics` feature is not enabled, VkImage objects created with the VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdTraceRaysIndirect2KHR-sparseImageInt64Atomics-04475
  If the `sparseImageInt64Atomics` feature is not enabled, VkBuffer objects created with the VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdTraceRaysIndirect2KHR-OpImageSampleWeightedQCOM-06971
  If `OpImageSampleWeightedQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_SAMPLED_IMAGE_BIT_QCOM

- VUID-vkCmdTraceRaysIndirect2KHR-OpImageSampleWeightedQCOM-06972
  If `OpImageSampleWeightedQCOM` uses a VkImageView as a sample weight image as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_IMAGE_BIT_QCOM

- VUID-vkCmdTraceRaysIndirect2KHR-OpImageBoxFilterQCOM-06973
  If `OpImageBoxFilterQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BOX_FILTER_SAMPLED_BIT_QCOM

- VUID-vkCmdTraceRaysIndirect2KHR-OpImageBlockMatchSSDQCOM-06974
  If `OpImageBlockMatchSSDQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdTraceRaysIndirect2KHR-OpImageBlockMatchSADQCOM-12420
  If `OpImageBlockMatchSADQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdTraceRaysIndirect2KHR-OpImageBlockMatchSADQCOM-06976
  If `OpImageBlockMatchSADQCOM` or OpImageBlockMatchSSDQCOM is used to read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdTraceRaysIndirect2KHR-OpImageSampleWeightedQCOM-06977
  If `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdTraceRaysIndirect2KHR-OpImageSampleWeightedQCOM-06978
  If any command other than `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must not have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdTraceRaysIndirect2KHR-OpImageBlockMatchWindow-09215
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM

- VUID-vkCmdTraceRaysIndirect2KHR-OpImageBlockMatchWindow-09216
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format must be a single-component format

- VUID-vkCmdTraceRaysIndirect2KHR-OpImageBlockMatchWindow-09217
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdTraceRaysIndirect2KHR-OpImageBlockMatchWindow-12421
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the `blockMatchExtendedClampToEdge` feature is not enabled, the input sampler must not have been created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdTraceRaysIndirect2KHR-addressModeU-12422
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the input sampler was created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, then the sampler must have been created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdTraceRaysIndirect2KHR-None-07288
  Any shader invocation executed by this command must terminate

- VUID-vkCmdTraceRaysIndirect2KHR-None-09600
  If a descriptor with type equal to any of VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, or VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT is accessed as a result of this command, all image subresources identified by that descriptor must be in the image layout identified when the descriptor was written

- VUID-vkCmdTraceRaysIndirect2KHR-micromap-11636
  If an acceleration structure is accessed as a result of this command through an `OpRayQueryProceedKHR` operation , the `VK_EXT_opacity_micromap` extension is not enabled, and the acceleration structure is built using geometry with a VkAccelerationStructureTrianglesOpacityMicromapKHR structure included in its `pNext` chain, the shader must have specified a `OpacityMicromapIdKHR` execution mode with its specialization constant operand equal to VK_TRUE

- VUID-vkCmdTraceRaysIndirect2KHR-micromap-11637
  If an acceleration structure is accessed as a result of this command and the acceleration structure was constructed through deserialization, all micromap arrays referenced by the acceleration structure that were not replaced by an acceleration structure update command must have been deserialized using the serialized data of the corresponding micromaps used to originally build the acceleration structure prior to the execution of this command on the device

- VUID-vkCmdTraceRaysIndirect2KHR-micromap-11638
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkPipeline bound to the pipeline bind point used by this command must not have been created with `flags` that includes VK_PIPELINE_CREATE_2_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_KHR

- VUID-vkCmdTraceRaysIndirect2KHR-micromap-11639
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkShaderEXT that accessed the descriptor must not have been created with `flags` that includes VK_SHADER_CREATE_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_EXT

- VUID-vkCmdTraceRaysIndirect2KHR-commandBuffer-10746
  The `VkDeviceMemory` object allocated from a `VkMemoryHeap` with the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property that is bound to a resource accessed as a result of this command must be the active bound tile memory object in `commandBuffer`

- VUID-vkCmdTraceRaysIndirect2KHR-None-10678
  If this command is recorded inside a tile shading render pass instance, the stages corresponding to the pipeline bind point used by this command must only include VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_FRAGMENT_BIT, and/or VK_SHADER_STAGE_COMPUTE_BIT

- VUID-vkCmdTraceRaysIndirect2KHR-None-10679
  If this command is recorded where per-tile execution model is enabled, there must be no access to any image while the image was be transitioned to the VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT layout

- VUID-vkCmdTraceRaysIndirect2KHR-pDescription-09900
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the underlying VkTensorARM object must have been created with the VK_TENSOR_USAGE_SHADER_BIT_ARM usage flag set

- VUID-vkCmdTraceRaysIndirect2KHR-dimensionCount-09905
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the `Rank` of the `OpTypeTensorARM` of the tensor resource variable must be equal to the `dimensionCount` provided via VkTensorCreateInfoARM::`pDescription` when creating the underlying VkTensorARM object

- VUID-vkCmdTraceRaysIndirect2KHR-OpTypeTensorARM-09906
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the element type of the `OpTypeTensorARM` of the tensor resource variable must be compatible with the VkFormat of the VkTensorViewARM used for the access

- VUID-vkCmdTraceRaysIndirect2KHR-OpTensorReadARM-12462
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, using `OpTensorReadARM` or `OpTensorWriteARM`, and the underlying VkTensorARM object was created with a VK_TENSOR_TILING_BRICK_16_WIDE_ARM, VK_TENSOR_TILING_BRICK_8_WIDE_ARM, VK_TENSOR_TILING_BRICK_4_WIDE_ARM, VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_ARM, or VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_64K_ARM VkTensorTilingARM, and the object read or written is an array, then the innermost coordinate provided to `OpTensorReadARM` or `OpTensorWriteARM` via the `Coordinates` operand must be a multiple of the largest power of 2 that is less than or equal to the number of components of the array

- VUID-vkCmdTraceRaysIndirect2KHR-pNext-12463
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command and the corresponding VkTensorARM object was created with a VkTensorRollingBackingCreateInfoARM structure in the `pNext` chain of VkTensorCreateInfoARM, then the number of elements accessed with one `OpTensorReadARM` or `OpTensorWriteARM`, must be less than or equal to the number of elements available from the starting coordinate in the rolling backing along the innermost dimension, defined as `wraps`[`dimensionCount` - 1] - InnermostCoordinate % `wraps`[`dimensionCount` - 1] where InnermostCoordinate is the last component of the coordinates array provided via the `Coordinates` operand

- VUID-vkCmdTraceRaysIndirect2KHR-None-12472
  Descriptors dynamically accessed in bound descriptor heaps must be valid

- VUID-vkCmdTraceRaysIndirect2KHR-None-11297
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a `OpTypeStruct` decorated with `Block` or `BufferBlock` using that mapping, the calculated offset for the resource heap must be a multiple of `bufferDescriptorAlignment`

- VUID-vkCmdTraceRaysIndirect2KHR-None-11298
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeImage` or `OpTypeSampledImage` using that mapping, the calculated offset for the resource heap must be a multiple of `imageDescriptorAlignment`

- VUID-vkCmdTraceRaysIndirect2KHR-None-11299
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeSampler` or `OpTypeSampledImage` using that mapping, the calculated offset for the sampler heap must be a multiple of `samplerDescriptorAlignment`

- VUID-vkCmdTraceRaysIndirect2KHR-None-11397
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeTensorARM` using that mapping, the calculated offset for the resource heap must be a multiple of `tensorDescriptorAlignment`

- VUID-vkCmdTraceRaysIndirect2KHR-None-11300
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 4

- VUID-vkCmdTraceRaysIndirect2KHR-None-11301
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdTraceRaysIndirect2KHR-None-11302
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress

- VUID-vkCmdTraceRaysIndirect2KHR-None-11304
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 8

- VUID-vkCmdTraceRaysIndirect2KHR-None-11305
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdTraceRaysIndirect2KHR-None-11306
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address pointed to by the address in push data must be a valid VkDeviceAddress

- VUID-vkCmdTraceRaysIndirect2KHR-None-11308
  For each descriptor heap that is statically used by a bound shader, either directly or via a descriptor mapping, a valid descriptor heap must be bound

- VUID-vkCmdTraceRaysIndirect2KHR-None-11309
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, execution of this command must not result in any descriptor read accessing data outside of the user range of the respective heap bound by `vkCmdBind*HeapEXT` commands

- VUID-vkCmdTraceRaysIndirect2KHR-None-11372
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer or uniform texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified via VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdTraceRaysIndirect2KHR-None-11373
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer or storage texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdTraceRaysIndirect2KHR-None-11374
  If the `robustBufferAccess2` feature is not enabled, the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, uniform texel buffer, storage buffer, or storage texel buffer, that shader must not access values outside of the range of the buffer as specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdTraceRaysIndirect2KHR-pBindInfo-11375
  If any bound shader uses an embedded sampler via a descriptor mapping, the value of `pBindInfo->reservedRangeSize` set for vkCmdBindSamplerHeapEXT must be greater than or equal to `minSamplerHeapReservedRangeWithEmbedded`

- VUID-vkCmdTraceRaysIndirect2KHR-None-11376
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, and that shader statically uses a push constant value, that value must have been set by vkCmdPushDataEXT

- VUID-vkCmdTraceRaysIndirect2KHR-None-11398
  If a bound shader was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the access must not be out of bounds

- VUID-vkCmdTraceRaysIndirect2KHR-None-11437
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the buffer from which the address in push data was queried must have been created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdTraceRaysIndirect2KHR-None-11438
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdTraceRaysIndirect2KHR-None-11441
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must be aligned to `minUniformBufferOffsetAlignment`

- VUID-vkCmdTraceRaysIndirect2KHR-None-11439
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_STORAGE_BUFFER_BIT usage flag set

- VUID-vkCmdTraceRaysIndirect2KHR-None-11442
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must be aligned to `minStorageBufferOffsetAlignment`

- VUID-vkCmdTraceRaysIndirect2KHR-None-11485
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses an acceleration structure using that mapping, the address that the acceleration structure is mapped to must be an acceleration structure address retrieved from a VkAccelerationStructureKHR object via vkGetAccelerationStructureDeviceAddressKHR or handle retrieved from a VkAccelerationStructureNV object via vkGetAccelerationStructureHandleNV

- VUID-vkCmdTraceRaysIndirect2KHR-index-11450
  If a shader uses a sampler descriptor to sample an image as a result of this command, and that sampler descriptor uses a custom border color with an index defined by VkSamplerCustomBorderColorIndexCreateInfoEXT, the value of VkSamplerCustomBorderColorIndexCreateInfoEXT::`index` must have been registered before this command was recorded, and still be registered during the sampling operation, with an identically defined color

- VUID-vkCmdTraceRaysIndirect2KHR-protectedNoFault-11455
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, the address that the resource is mapped to must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdTraceRaysIndirect2KHR-protectedNoFault-11456
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, the address of the indirect memory must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdTraceRaysIndirect2KHR-None-03429
  Any shader group handle referenced by this call must have been queried from the bound ray tracing pipeline

- VUID-vkCmdTraceRaysIndirect2KHR-None-09458
  If the bound ray tracing pipeline state was created with the VK_DYNAMIC_STATE_RAY_TRACING_PIPELINE_STACK_SIZE_KHR dynamic state enabled then vkCmdSetRayTracingPipelineStackSizeKHR must have been called in the current command buffer prior to this trace command

- VUID-vkCmdTraceRaysIndirect2KHR-None-11319
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, the value of the address at the expected location in shader record data must be a valid address

- VUID-vkCmdTraceRaysIndirect2KHR-maxPipelineRayRecursionDepth-03679
  This command must not cause a shader call instruction to be executed from a shader invocation with a recursion depth greater than the value of `maxPipelineRayRecursionDepth` used to create the bound ray tracing pipeline

- VUID-vkCmdTraceRaysIndirect2KHR-commandBuffer-03635
  `commandBuffer` must not be a protected command buffer

- VUID-vkCmdTraceRaysIndirect2KHR-micromap-11640
  If a VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR descriptor is accessed as a result of this command, the access is not through an `OpRayQueryProceedKHR` operation, and the acceleration structure is built using geometry with a VkAccelerationStructureTrianglesOpacityMicromapKHR or VkAccelerationStructureTrianglesOpacityMicromapEXT structure included in its `pNext` chain, the VkPipeline bound to the pipeline bind point used by this command must have been created with `flags` that includes VK_PIPELINE_CREATE_RAY_TRACING_OPACITY_MICROMAP_BIT_KHR

- VUID-vkCmdTraceRaysIndirect2KHR-indirectDeviceAddress-03633
  `indirectDeviceAddress` must be a device address allocated to the application from a buffer created with the VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT usage flag set

- VUID-vkCmdTraceRaysIndirect2KHR-indirectDeviceAddress-03634
  `indirectDeviceAddress` must be a multiple of `4`

- VUID-vkCmdTraceRaysIndirect2KHR-indirectDeviceAddress-03636
  All device addresses between `indirectDeviceAddress` and `indirectDeviceAddress` + `sizeof`(`VkTraceRaysIndirectCommand2KHR`) - 1 must be in the buffer device address range of the same buffer

- VUID-vkCmdTraceRaysIndirect2KHR-rayTracingPipelineTraceRaysIndirect2-03637
  The `rayTracingPipelineTraceRaysIndirect2` feature must be enabled

- VUID-vkCmdTraceRaysIndirect2KHR-rayTracingMotionBlurPipelineTraceRaysIndirect-04951
  If the bound ray tracing pipeline was created with VK_PIPELINE_CREATE_RAY_TRACING_ALLOW_MOTION_BIT_NV `VkPhysicalDeviceRayTracingMotionBlurFeaturesNV`::`rayTracingMotionBlurPipelineTraceRaysIndirect` feature must be enabled

Valid Usage (Implicit)

- VUID-vkCmdTraceRaysIndirect2KHR-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdTraceRaysIndirect2KHR-indirectDeviceAddress-parameter
  `indirectDeviceAddress` must be a valid VkDeviceAddress value

- VUID-vkCmdTraceRaysIndirect2KHR-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdTraceRaysIndirect2KHR-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT operations

- VUID-vkCmdTraceRaysIndirect2KHR-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdTraceRaysIndirect2KHR-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdTraceRaysIndirect2KHR-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Outside | VK_QUEUE_COMPUTE_BIT | Action

Conditional Rendering

vkCmdTraceRaysIndirect2KHR is not affected by conditional rendering

The `VkTraceRaysIndirectCommand2KHR` structure is defined as:

    // Provided by VK_KHR_ray_tracing_maintenance1 with VK_KHR_ray_tracing_pipeline
    typedef struct VkTraceRaysIndirectCommand2KHR {
        VkDeviceAddress    raygenShaderRecordAddress;
        VkDeviceSize       raygenShaderRecordSize;
        VkDeviceAddress    missShaderBindingTableAddress;
        VkDeviceSize       missShaderBindingTableSize;
        VkDeviceSize       missShaderBindingTableStride;
        VkDeviceAddress    hitShaderBindingTableAddress;
        VkDeviceSize       hitShaderBindingTableSize;
        VkDeviceSize       hitShaderBindingTableStride;
        VkDeviceAddress    callableShaderBindingTableAddress;
        VkDeviceSize       callableShaderBindingTableSize;
        VkDeviceSize       callableShaderBindingTableStride;
        uint32_t           width;
        uint32_t           height;
        uint32_t           depth;
    } VkTraceRaysIndirectCommand2KHR;

- `raygenShaderRecordAddress` is a VkDeviceAddress of the ray generation shader binding table record used by this command.

- `raygenShaderRecordSize` is a VkDeviceSize number of bytes corresponding to the ray generation shader binding table record at base address `raygenShaderRecordAddress`.

- `missShaderBindingTableAddress` is a VkDeviceAddress of the first record in the miss shader binding table used by this command.

- `missShaderBindingTableSize` is a VkDeviceSize number of bytes corresponding to the total size of the miss shader binding table at `missShaderBindingTableAddress` that may be accessed by this command.

- `missShaderBindingTableStride` is a VkDeviceSize number of bytes between records of the miss shader binding table.

- `hitShaderBindingTableAddress` is a VkDeviceAddress of the first record in the hit shader binding table used by this command.

- `hitShaderBindingTableSize` is a VkDeviceSize number of bytes corresponding to the total size of the hit shader binding table at `hitShaderBindingTableAddress` that may be accessed by this command.

- `hitShaderBindingTableStride` is a VkDeviceSize number of bytes between records of the hit shader binding table.

- `callableShaderBindingTableAddress` is a VkDeviceAddress of the first record in the callable shader binding table used by this command.

- `callableShaderBindingTableSize` is a VkDeviceSize number of bytes corresponding to the total size of the callable shader binding table at `callableShaderBindingTableAddress` that may be accessed by this command.

- `callableShaderBindingTableStride` is a VkDeviceSize number of bytes between records of the callable shader binding table.

- `width` is the width of the ray trace query dimensions.

- `height` is height of the ray trace query dimensions.

- `depth` is depth of the ray trace query dimensions.

The members of `VkTraceRaysIndirectCommand2KHR` have the same meaning as the similarly named parameters of vkCmdTraceRaysKHR.

Indirect shader binding table buffer parameters must satisfy the same memory alignment and binding requirements as their counterparts in vkCmdTraceRaysIndirectKHR and vkCmdTraceRaysKHR.

Valid Usage

- VUID-VkTraceRaysIndirectCommand2KHR-pRayGenShaderBindingTable-03681
  `raygenShaderRecordAddress` must be a device address allocated to the application from a buffer created with the VK_BUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHR usage flag set

- VUID-VkTraceRaysIndirectCommand2KHR-pRayGenShaderBindingTable-03682
  `raygenShaderRecordAddress` must be a multiple of `VkPhysicalDeviceRayTracingPipelinePropertiesKHR`::`shaderGroupBaseAlignment`

- VUID-VkTraceRaysIndirectCommand2KHR-pMissShaderBindingTable-03684
  `missShaderBindingTableAddress` must be a device address allocated to the application from a buffer created with the VK_BUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHR usage flag set

- VUID-VkTraceRaysIndirectCommand2KHR-pMissShaderBindingTable-03685
  `missShaderBindingTableAddress` must be a multiple of `VkPhysicalDeviceRayTracingPipelinePropertiesKHR`::`shaderGroupBaseAlignment`

- VUID-VkTraceRaysIndirectCommand2KHR-stride-03686
  `missShaderBindingTableStride` must be a multiple of `VkPhysicalDeviceRayTracingPipelinePropertiesKHR`::`shaderGroupHandleAlignment`

- VUID-VkTraceRaysIndirectCommand2KHR-stride-04029
  `missShaderBindingTableStride` must be less than or equal to `VkPhysicalDeviceRayTracingPipelinePropertiesKHR`::`maxShaderGroupStride`

- VUID-VkTraceRaysIndirectCommand2KHR-pHitShaderBindingTable-03688
  `hitShaderBindingTableAddress` must be a device address allocated to the application from a buffer created with the VK_BUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHR usage flag set

- VUID-VkTraceRaysIndirectCommand2KHR-pHitShaderBindingTable-03689
  `hitShaderBindingTableAddress` must be a multiple of `VkPhysicalDeviceRayTracingPipelinePropertiesKHR`::`shaderGroupBaseAlignment`

- VUID-VkTraceRaysIndirectCommand2KHR-stride-03690
  `hitShaderBindingTableStride` must be a multiple of `VkPhysicalDeviceRayTracingPipelinePropertiesKHR`::`shaderGroupHandleAlignment`

- VUID-VkTraceRaysIndirectCommand2KHR-stride-04035
  `hitShaderBindingTableStride` must be less than or equal to `VkPhysicalDeviceRayTracingPipelinePropertiesKHR`::`maxShaderGroupStride`

- VUID-VkTraceRaysIndirectCommand2KHR-pCallableShaderBindingTable-03692
  `callableShaderBindingTableAddress` must be a device address allocated to the application from a buffer created with the VK_BUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHR usage flag set

- VUID-VkTraceRaysIndirectCommand2KHR-pCallableShaderBindingTable-03693
  `callableShaderBindingTableAddress` must be a multiple of `VkPhysicalDeviceRayTracingPipelinePropertiesKHR`::`shaderGroupBaseAlignment`

- VUID-VkTraceRaysIndirectCommand2KHR-stride-03694
  `callableShaderBindingTableStride` must be a multiple of `VkPhysicalDeviceRayTracingPipelinePropertiesKHR`::`shaderGroupHandleAlignment`

- VUID-VkTraceRaysIndirectCommand2KHR-stride-04041
  `callableShaderBindingTableStride` must be less than or equal to `VkPhysicalDeviceRayTracingPipelinePropertiesKHR`::`maxShaderGroupStride`

- VUID-VkTraceRaysIndirectCommand2KHR-flags-03511
  If the bound ray tracing pipeline was created with `flags` that included VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR, the entries in the table identified by `missShaderBindingTableAddress` accessed as a result of this command in order to execute a miss shader must not be zero

- VUID-VkTraceRaysIndirectCommand2KHR-flags-03512
  If the bound ray tracing pipeline was created with `flags` that included VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR, entries in the table identified by `hitShaderBindingTableAddress` accessed as a result of this command in order to execute an any-hit shader must not be zero

- VUID-VkTraceRaysIndirectCommand2KHR-flags-03513
  If the bound ray tracing pipeline was created with `flags` that included VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR, entries in the table identified by `hitShaderBindingTableAddress` accessed as a result of this command in order to execute a closest hit shader must not be zero

- VUID-VkTraceRaysIndirectCommand2KHR-flags-03514
  If the bound ray tracing pipeline was created with `flags` that included VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR, entries in the table identified by `hitShaderBindingTableAddress` accessed as a result of this command in order to execute an intersection shader must not be zero

- VUID-VkTraceRaysIndirectCommand2KHR-pHitShaderBindingTable-04735
  Any non-zero hit shader group entries in the table identified by `hitShaderBindingTableAddress` accessed by this call from a geometry with a `geometryType` of VK_GEOMETRY_TYPE_TRIANGLES_KHR must have been created with VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR

- VUID-VkTraceRaysIndirectCommand2KHR-pHitShaderBindingTable-04736
  Any non-zero hit shader group entries in the table identified by `hitShaderBindingTableAddress` accessed by this call from a geometry with a `geometryType` of VK_GEOMETRY_TYPE_AABBS_KHR must have been created with VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR

- VUID-VkTraceRaysIndirectCommand2KHR-width-03638
  `width` must be less than or equal to `VkPhysicalDeviceLimits`::`maxComputeWorkGroupCount`[0] × `VkPhysicalDeviceLimits`::`maxComputeWorkGroupSize`[0]

- VUID-VkTraceRaysIndirectCommand2KHR-height-03639
  `height` must be less than or equal to `VkPhysicalDeviceLimits`::`maxComputeWorkGroupCount`[1] × `VkPhysicalDeviceLimits`::`maxComputeWorkGroupSize`[1]

- VUID-VkTraceRaysIndirectCommand2KHR-depth-03640
  `depth` must be less than or equal to `VkPhysicalDeviceLimits`::`maxComputeWorkGroupCount`[2] × `VkPhysicalDeviceLimits`::`maxComputeWorkGroupSize`[2]

- VUID-VkTraceRaysIndirectCommand2KHR-width-03641
  `width` × `height` × `depth` must be less than or equal to `VkPhysicalDeviceRayTracingPipelinePropertiesKHR`::`maxRayDispatchInvocationCount`

Valid Usage (Implicit)

- VUID-VkTraceRaysIndirectCommand2KHR-raygenShaderRecordAddress-parameter
  `raygenShaderRecordAddress` must be a valid VkDeviceAddress value

- VUID-VkTraceRaysIndirectCommand2KHR-missShaderBindingTableAddress-parameter
  `missShaderBindingTableAddress` must be a valid VkDeviceAddress value

- VUID-VkTraceRaysIndirectCommand2KHR-hitShaderBindingTableAddress-parameter
  `hitShaderBindingTableAddress` must be a valid VkDeviceAddress value

- VUID-VkTraceRaysIndirectCommand2KHR-callableShaderBindingTableAddress-parameter
  `callableShaderBindingTableAddress` must be a valid VkDeviceAddress value

To dispatch ray tracing for the `VK_NV_ray_tracing` extension use:

    // Provided by VK_NV_ray_tracing
    void vkCmdTraceRaysNV(
        VkCommandBuffer                             commandBuffer,
        VkBuffer                                    raygenShaderBindingTableBuffer,
        VkDeviceSize                                raygenShaderBindingOffset,
        VkBuffer                                    missShaderBindingTableBuffer,
        VkDeviceSize                                missShaderBindingOffset,
        VkDeviceSize                                missShaderBindingStride,
        VkBuffer                                    hitShaderBindingTableBuffer,
        VkDeviceSize                                hitShaderBindingOffset,
        VkDeviceSize                                hitShaderBindingStride,
        VkBuffer                                    callableShaderBindingTableBuffer,
        VkDeviceSize                                callableShaderBindingOffset,
        VkDeviceSize                                callableShaderBindingStride,
        uint32_t                                    width,
        uint32_t                                    height,
        uint32_t                                    depth);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `raygenShaderBindingTableBuffer` is the buffer object that holds the shader binding table data for the ray generation shader stage.

- `raygenShaderBindingOffset` is the offset in bytes (relative to `raygenShaderBindingTableBuffer`) of the ray generation shader being used for the trace.

- `missShaderBindingTableBuffer` is the buffer object that holds the shader binding table data for the miss shader stage.

- `missShaderBindingOffset` is the offset in bytes (relative to `missShaderBindingTableBuffer`) of the miss shader being used for the trace.

- `missShaderBindingStride` is the size in bytes of each shader binding table record in `missShaderBindingTableBuffer`.

- `hitShaderBindingTableBuffer` is the buffer object that holds the shader binding table data for the hit shader stages.

- `hitShaderBindingOffset` is the offset in bytes (relative to `hitShaderBindingTableBuffer`) of the hit shader group being used for the trace.

- `hitShaderBindingStride` is the size in bytes of each shader binding table record in `hitShaderBindingTableBuffer`.

- `callableShaderBindingTableBuffer` is the buffer object that holds the shader binding table data for the callable shader stage.

- `callableShaderBindingOffset` is the offset in bytes (relative to `callableShaderBindingTableBuffer`) of the callable shader being used for the trace.

- `callableShaderBindingStride` is the size in bytes of each shader binding table record in `callableShaderBindingTableBuffer`.

- `width` is the width of the ray trace query dimensions.

- `height` is height of the ray trace query dimensions.

- `depth` is depth of the ray trace query dimensions.

When the command is executed, a ray generation group of `width` × `height` × `depth` rays is assembled.

Valid Usage

- VUID-vkCmdTraceRaysNV-magFilter-04553
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdTraceRaysNV-magFilter-09598
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdTraceRaysNV-mipmapMode-04770
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdTraceRaysNV-mipmapMode-09599
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdTraceRaysNV-unnormalizedCoordinates-09635
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `levelCount` and `layerCount` must be 1

- VUID-vkCmdTraceRaysNV-None-08609
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `viewType` must be VK_IMAGE_VIEW_TYPE_1D or VK_IMAGE_VIEW_TYPE_2D

- VUID-vkCmdTraceRaysNV-None-08610
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions with `ImplicitLod`, `Dref` or `Proj` in their name

- VUID-vkCmdTraceRaysNV-None-08611
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions that includes a LOD bias or any offset values

- VUID-vkCmdTraceRaysNV-None-06479
  If a VkImageView is sampled with depth comparison, the image view’s format features must contain VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT

- VUID-vkCmdTraceRaysNV-None-02691
  If a VkImageView is accessed using atomic operations as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT

- VUID-vkCmdTraceRaysNV-None-07888
  If a VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER descriptor is accessed using atomic operations as a result of this command, then the storage texel buffer’s format features must contain VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT

- VUID-vkCmdTraceRaysNV-None-02692
  If a VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT

- VUID-vkCmdTraceRaysNV-None-02693
  If the VK_EXT_filter_cubic extension is not enabled and any VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, it must not have a VkImageViewType of VK_IMAGE_VIEW_TYPE_3D, VK_IMAGE_VIEW_TYPE_CUBE, or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY

- VUID-vkCmdTraceRaysNV-filterCubic-02694
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have a VkImageViewType and format that supports cubic filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubic` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdTraceRaysNV-filterCubicMinmax-02695
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX as a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubicMinmax` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdTraceRaysNV-cubicRangeClamp-09212
  If the `cubicRangeClamp` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must not have a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM

- VUID-vkCmdTraceRaysNV-reductionMode-09213
  Any VkImageView being sampled with a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM as a result of this command must sample with VK_FILTER_CUBIC_EXT

- VUID-vkCmdTraceRaysNV-selectableCubicWeights-09214
  If the `selectableCubicWeights` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have VkSamplerCubicWeightsCreateInfoQCOM::`cubicWeights` equal to VK_CUBIC_FILTER_WEIGHTS_CATMULL_ROM_QCOM

- VUID-vkCmdTraceRaysNV-flags-02696
  Any VkImage created with a VkImageCreateInfo::`flags` containing VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV sampled as a result of this command must only be sampled using a VkSamplerAddressMode of VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdTraceRaysNV-OpTypeImage-07027
  For any VkImageView being written as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdTraceRaysNV-OpTypeImage-07028
  For any VkImageView being read as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdTraceRaysNV-OpTypeImage-07029
  For any VkBufferView being written as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown`, the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdTraceRaysNV-OpTypeImage-07030
  Any VkBufferView being read as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown` then the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdTraceRaysNV-None-08600
  If a a bound shader was created with a pipeline layout and statically uses a set n, a descriptor set must have been bound to n at the same pipeline bind point, with layouts compatible for set n with the layout(s) used to create the shader, as described in Pipeline Layout Compatibility

- VUID-vkCmdTraceRaysNV-None-08601
  If a a bound shader was created with a pipeline layout or specified push constant ranges and statically uses a push constant value, that value must have been set for the same pipeline bind point, with push constant ranges that are compatible with the push constant range used to create the shader

- VUID-vkCmdTraceRaysNV-None-10068
  For each array of resources that is used by a bound shader, the indices used to access members of the array must be less than the descriptor count for the identified binding in the descriptor sets used by this command

- VUID-vkCmdTraceRaysNV-None-08114
  Descriptors in each bound descriptor set, specified via vkCmdBindDescriptorSets, must be valid if they are accessed as described by descriptor validity by the VkPipeline bound to the pipeline bind point used by this command and the bound VkPipeline was not created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdTraceRaysNV-imageLayout-00344
  If an image descriptor is accessed by a shader, the VkImageLayout must match the subresource accessible from the VkImageView as defined by the image layout matching rules

- VUID-vkCmdTraceRaysNV-None-08115
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdBindDescriptorSets, the bound VkPipeline must have been created without VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdTraceRaysNV-None-08116
  Descriptors in bound descriptor buffers, specified via vkCmdSetDescriptorBufferOffsetsEXT, must be valid if they are dynamically accessed

- VUID-vkCmdTraceRaysNV-None-08117
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdSetDescriptorBufferOffsetsEXT, the bound VkPipeline must have been created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdTraceRaysNV-None-08119
  If a descriptor is dynamically used with a VkPipeline created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdTraceRaysNV-None-08605
  If a descriptor is dynamically used with a VkShaderEXT created with a `VkDescriptorSetLayout` that was created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdTraceRaysNV-None-08606
  If the `shaderObject` feature is not enabled, a valid pipeline must be bound to the pipeline bind point used by this command

- VUID-vkCmdTraceRaysNV-None-08608
  If a pipeline is bound to the pipeline bind point used by this command, there must not have been any calls to dynamic state setting commands for any state specified statically in the VkPipeline object bound to the pipeline bind point used by this command, since that pipeline was bound

- VUID-vkCmdTraceRaysNV-uniformBuffers-06935
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdTraceRaysNV-None-08612
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdTraceRaysNV-storageBuffers-06936
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdTraceRaysNV-None-08613
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a storage buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdTraceRaysNV-commandBuffer-02707
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, any resource accessed by bound shaders must not be a protected resource

- VUID-vkCmdTraceRaysNV-viewType-07752
  If a VkImageView is accessed as a result of this command, then the image view’s `viewType` must match the `Dim` operand of the `OpTypeImage` as described in Compatibility Between SPIR-V Image Dimensions and Vulkan ImageView Types

- VUID-vkCmdTraceRaysNV-format-07753
  If a VkImageView or VkBufferView is accessed as a result of this command, then the numeric type of the view’s `format` and the `Sampled` `Type` operand of the `OpTypeImage` must match

- VUID-vkCmdTraceRaysNV-OpImageWrite-08795
  If a VkImageView created with a format other than VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the image view’s format

- VUID-vkCmdTraceRaysNV-OpImageWrite-08796
  If a VkImageView created with the format VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have four components

- VUID-vkCmdTraceRaysNV-OpImageWrite-04469
  If a VkBufferView is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the buffer view’s format

- VUID-vkCmdTraceRaysNV-SampledType-04470
  If a VkImageView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdTraceRaysNV-SampledType-04471
  If a VkImageView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdTraceRaysNV-SampledType-04472
  If a VkBufferView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdTraceRaysNV-SampledType-04473
  If a VkBufferView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdTraceRaysNV-sparseImageInt64Atomics-04474
  If the `sparseImageInt64Atomics` feature is not enabled, VkImage objects created with the VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdTraceRaysNV-sparseImageInt64Atomics-04475
  If the `sparseImageInt64Atomics` feature is not enabled, VkBuffer objects created with the VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdTraceRaysNV-OpImageSampleWeightedQCOM-06971
  If `OpImageSampleWeightedQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_SAMPLED_IMAGE_BIT_QCOM

- VUID-vkCmdTraceRaysNV-OpImageSampleWeightedQCOM-06972
  If `OpImageSampleWeightedQCOM` uses a VkImageView as a sample weight image as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_IMAGE_BIT_QCOM

- VUID-vkCmdTraceRaysNV-OpImageBoxFilterQCOM-06973
  If `OpImageBoxFilterQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BOX_FILTER_SAMPLED_BIT_QCOM

- VUID-vkCmdTraceRaysNV-OpImageBlockMatchSSDQCOM-06974
  If `OpImageBlockMatchSSDQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdTraceRaysNV-OpImageBlockMatchSADQCOM-12420
  If `OpImageBlockMatchSADQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdTraceRaysNV-OpImageBlockMatchSADQCOM-06976
  If `OpImageBlockMatchSADQCOM` or OpImageBlockMatchSSDQCOM is used to read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdTraceRaysNV-OpImageSampleWeightedQCOM-06977
  If `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdTraceRaysNV-OpImageSampleWeightedQCOM-06978
  If any command other than `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must not have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdTraceRaysNV-OpImageBlockMatchWindow-09215
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM

- VUID-vkCmdTraceRaysNV-OpImageBlockMatchWindow-09216
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format must be a single-component format

- VUID-vkCmdTraceRaysNV-OpImageBlockMatchWindow-09217
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdTraceRaysNV-OpImageBlockMatchWindow-12421
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the `blockMatchExtendedClampToEdge` feature is not enabled, the input sampler must not have been created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdTraceRaysNV-addressModeU-12422
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the input sampler was created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, then the sampler must have been created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdTraceRaysNV-None-07288
  Any shader invocation executed by this command must terminate

- VUID-vkCmdTraceRaysNV-None-09600
  If a descriptor with type equal to any of VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, or VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT is accessed as a result of this command, all image subresources identified by that descriptor must be in the image layout identified when the descriptor was written

- VUID-vkCmdTraceRaysNV-micromap-11636
  If an acceleration structure is accessed as a result of this command through an `OpRayQueryProceedKHR` operation , the `VK_EXT_opacity_micromap` extension is not enabled, and the acceleration structure is built using geometry with a VkAccelerationStructureTrianglesOpacityMicromapKHR structure included in its `pNext` chain, the shader must have specified a `OpacityMicromapIdKHR` execution mode with its specialization constant operand equal to VK_TRUE

- VUID-vkCmdTraceRaysNV-micromap-11637
  If an acceleration structure is accessed as a result of this command and the acceleration structure was constructed through deserialization, all micromap arrays referenced by the acceleration structure that were not replaced by an acceleration structure update command must have been deserialized using the serialized data of the corresponding micromaps used to originally build the acceleration structure prior to the execution of this command on the device

- VUID-vkCmdTraceRaysNV-micromap-11638
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkPipeline bound to the pipeline bind point used by this command must not have been created with `flags` that includes VK_PIPELINE_CREATE_2_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_KHR

- VUID-vkCmdTraceRaysNV-micromap-11639
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkShaderEXT that accessed the descriptor must not have been created with `flags` that includes VK_SHADER_CREATE_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_EXT

- VUID-vkCmdTraceRaysNV-commandBuffer-10746
  The `VkDeviceMemory` object allocated from a `VkMemoryHeap` with the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property that is bound to a resource accessed as a result of this command must be the active bound tile memory object in `commandBuffer`

- VUID-vkCmdTraceRaysNV-None-10678
  If this command is recorded inside a tile shading render pass instance, the stages corresponding to the pipeline bind point used by this command must only include VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_FRAGMENT_BIT, and/or VK_SHADER_STAGE_COMPUTE_BIT

- VUID-vkCmdTraceRaysNV-None-10679
  If this command is recorded where per-tile execution model is enabled, there must be no access to any image while the image was be transitioned to the VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT layout

- VUID-vkCmdTraceRaysNV-pDescription-09900
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the underlying VkTensorARM object must have been created with the VK_TENSOR_USAGE_SHADER_BIT_ARM usage flag set

- VUID-vkCmdTraceRaysNV-dimensionCount-09905
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the `Rank` of the `OpTypeTensorARM` of the tensor resource variable must be equal to the `dimensionCount` provided via VkTensorCreateInfoARM::`pDescription` when creating the underlying VkTensorARM object

- VUID-vkCmdTraceRaysNV-OpTypeTensorARM-09906
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the element type of the `OpTypeTensorARM` of the tensor resource variable must be compatible with the VkFormat of the VkTensorViewARM used for the access

- VUID-vkCmdTraceRaysNV-OpTensorReadARM-12462
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, using `OpTensorReadARM` or `OpTensorWriteARM`, and the underlying VkTensorARM object was created with a VK_TENSOR_TILING_BRICK_16_WIDE_ARM, VK_TENSOR_TILING_BRICK_8_WIDE_ARM, VK_TENSOR_TILING_BRICK_4_WIDE_ARM, VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_ARM, or VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_64K_ARM VkTensorTilingARM, and the object read or written is an array, then the innermost coordinate provided to `OpTensorReadARM` or `OpTensorWriteARM` via the `Coordinates` operand must be a multiple of the largest power of 2 that is less than or equal to the number of components of the array

- VUID-vkCmdTraceRaysNV-pNext-12463
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command and the corresponding VkTensorARM object was created with a VkTensorRollingBackingCreateInfoARM structure in the `pNext` chain of VkTensorCreateInfoARM, then the number of elements accessed with one `OpTensorReadARM` or `OpTensorWriteARM`, must be less than or equal to the number of elements available from the starting coordinate in the rolling backing along the innermost dimension, defined as `wraps`[`dimensionCount` - 1] - InnermostCoordinate % `wraps`[`dimensionCount` - 1] where InnermostCoordinate is the last component of the coordinates array provided via the `Coordinates` operand

- VUID-vkCmdTraceRaysNV-None-12472
  Descriptors dynamically accessed in bound descriptor heaps must be valid

- VUID-vkCmdTraceRaysNV-None-11297
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a `OpTypeStruct` decorated with `Block` or `BufferBlock` using that mapping, the calculated offset for the resource heap must be a multiple of `bufferDescriptorAlignment`

- VUID-vkCmdTraceRaysNV-None-11298
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeImage` or `OpTypeSampledImage` using that mapping, the calculated offset for the resource heap must be a multiple of `imageDescriptorAlignment`

- VUID-vkCmdTraceRaysNV-None-11299
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeSampler` or `OpTypeSampledImage` using that mapping, the calculated offset for the sampler heap must be a multiple of `samplerDescriptorAlignment`

- VUID-vkCmdTraceRaysNV-None-11397
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeTensorARM` using that mapping, the calculated offset for the resource heap must be a multiple of `tensorDescriptorAlignment`

- VUID-vkCmdTraceRaysNV-None-11300
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 4

- VUID-vkCmdTraceRaysNV-None-11301
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdTraceRaysNV-None-11302
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress

- VUID-vkCmdTraceRaysNV-None-11304
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 8

- VUID-vkCmdTraceRaysNV-None-11305
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdTraceRaysNV-None-11306
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address pointed to by the address in push data must be a valid VkDeviceAddress

- VUID-vkCmdTraceRaysNV-None-11308
  For each descriptor heap that is statically used by a bound shader, either directly or via a descriptor mapping, a valid descriptor heap must be bound

- VUID-vkCmdTraceRaysNV-None-11309
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, execution of this command must not result in any descriptor read accessing data outside of the user range of the respective heap bound by `vkCmdBind*HeapEXT` commands

- VUID-vkCmdTraceRaysNV-None-11372
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer or uniform texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified via VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdTraceRaysNV-None-11373
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer or storage texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdTraceRaysNV-None-11374
  If the `robustBufferAccess2` feature is not enabled, the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, uniform texel buffer, storage buffer, or storage texel buffer, that shader must not access values outside of the range of the buffer as specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdTraceRaysNV-pBindInfo-11375
  If any bound shader uses an embedded sampler via a descriptor mapping, the value of `pBindInfo->reservedRangeSize` set for vkCmdBindSamplerHeapEXT must be greater than or equal to `minSamplerHeapReservedRangeWithEmbedded`

- VUID-vkCmdTraceRaysNV-None-11376
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, and that shader statically uses a push constant value, that value must have been set by vkCmdPushDataEXT

- VUID-vkCmdTraceRaysNV-None-11398
  If a bound shader was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the access must not be out of bounds

- VUID-vkCmdTraceRaysNV-None-11437
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the buffer from which the address in push data was queried must have been created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdTraceRaysNV-None-11438
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdTraceRaysNV-None-11441
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must be aligned to `minUniformBufferOffsetAlignment`

- VUID-vkCmdTraceRaysNV-None-11439
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_STORAGE_BUFFER_BIT usage flag set

- VUID-vkCmdTraceRaysNV-None-11442
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must be aligned to `minStorageBufferOffsetAlignment`

- VUID-vkCmdTraceRaysNV-None-11485
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses an acceleration structure using that mapping, the address that the acceleration structure is mapped to must be an acceleration structure address retrieved from a VkAccelerationStructureKHR object via vkGetAccelerationStructureDeviceAddressKHR or handle retrieved from a VkAccelerationStructureNV object via vkGetAccelerationStructureHandleNV

- VUID-vkCmdTraceRaysNV-index-11450
  If a shader uses a sampler descriptor to sample an image as a result of this command, and that sampler descriptor uses a custom border color with an index defined by VkSamplerCustomBorderColorIndexCreateInfoEXT, the value of VkSamplerCustomBorderColorIndexCreateInfoEXT::`index` must have been registered before this command was recorded, and still be registered during the sampling operation, with an identically defined color

- VUID-vkCmdTraceRaysNV-protectedNoFault-11455
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, the address that the resource is mapped to must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdTraceRaysNV-protectedNoFault-11456
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, the address of the indirect memory must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdTraceRaysNV-None-03429
  Any shader group handle referenced by this call must have been queried from the bound ray tracing pipeline

- VUID-vkCmdTraceRaysNV-None-09458
  If the bound ray tracing pipeline state was created with the VK_DYNAMIC_STATE_RAY_TRACING_PIPELINE_STACK_SIZE_KHR dynamic state enabled then vkCmdSetRayTracingPipelineStackSizeKHR must have been called in the current command buffer prior to this trace command

- VUID-vkCmdTraceRaysNV-None-11319
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, the value of the address at the expected location in shader record data must be a valid address

- VUID-vkCmdTraceRaysNV-commandBuffer-04624
  `commandBuffer` must not be a protected command buffer

- VUID-vkCmdTraceRaysNV-maxRecursionDepth-03625
  This command must not cause a pipeline trace ray instruction to be executed from a shader invocation with a recursion depth greater than the value of `maxRecursionDepth` used to create the bound ray tracing pipeline

- VUID-vkCmdTraceRaysNV-raygenShaderBindingTableBuffer-04042
  If `raygenShaderBindingTableBuffer` is non-sparse then it must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-vkCmdTraceRaysNV-raygenShaderBindingOffset-02455
  `raygenShaderBindingOffset` must be less than the size of `raygenShaderBindingTableBuffer`

- VUID-vkCmdTraceRaysNV-raygenShaderBindingOffset-02456
  `raygenShaderBindingOffset` must be a multiple of `VkPhysicalDeviceRayTracingPropertiesNV`::`shaderGroupBaseAlignment`

- VUID-vkCmdTraceRaysNV-missShaderBindingTableBuffer-04043
  If `missShaderBindingTableBuffer` is non-sparse then it must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-vkCmdTraceRaysNV-missShaderBindingOffset-02457
  `missShaderBindingOffset` must be less than the size of `missShaderBindingTableBuffer`

- VUID-vkCmdTraceRaysNV-missShaderBindingOffset-02458
  `missShaderBindingOffset` must be a multiple of `VkPhysicalDeviceRayTracingPropertiesNV`::`shaderGroupBaseAlignment`

- VUID-vkCmdTraceRaysNV-hitShaderBindingTableBuffer-04044
  If `hitShaderBindingTableBuffer` is non-sparse then it must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-vkCmdTraceRaysNV-hitShaderBindingOffset-02459
  `hitShaderBindingOffset` must be less than the size of `hitShaderBindingTableBuffer`

- VUID-vkCmdTraceRaysNV-hitShaderBindingOffset-02460
  `hitShaderBindingOffset` must be a multiple of `VkPhysicalDeviceRayTracingPropertiesNV`::`shaderGroupBaseAlignment`

- VUID-vkCmdTraceRaysNV-callableShaderBindingTableBuffer-04045
  If `callableShaderBindingTableBuffer` is non-sparse then it must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-vkCmdTraceRaysNV-callableShaderBindingOffset-02461
  `callableShaderBindingOffset` must be less than the size of `callableShaderBindingTableBuffer`

- VUID-vkCmdTraceRaysNV-callableShaderBindingOffset-02462
  `callableShaderBindingOffset` must be a multiple of `VkPhysicalDeviceRayTracingPropertiesNV`::`shaderGroupBaseAlignment`

- VUID-vkCmdTraceRaysNV-missShaderBindingStride-02463
  `missShaderBindingStride` must be a multiple of `VkPhysicalDeviceRayTracingPropertiesNV`::`shaderGroupHandleSize`

- VUID-vkCmdTraceRaysNV-hitShaderBindingStride-02464
  `hitShaderBindingStride` must be a multiple of `VkPhysicalDeviceRayTracingPropertiesNV`::`shaderGroupHandleSize`

- VUID-vkCmdTraceRaysNV-callableShaderBindingStride-02465
  `callableShaderBindingStride` must be a multiple of `VkPhysicalDeviceRayTracingPropertiesNV`::`shaderGroupHandleSize`

- VUID-vkCmdTraceRaysNV-missShaderBindingStride-02466
  `missShaderBindingStride` must be less than or equal to `VkPhysicalDeviceRayTracingPropertiesNV`::`maxShaderGroupStride`

- VUID-vkCmdTraceRaysNV-hitShaderBindingStride-02467
  `hitShaderBindingStride` must be less than or equal to `VkPhysicalDeviceRayTracingPropertiesNV`::`maxShaderGroupStride`

- VUID-vkCmdTraceRaysNV-callableShaderBindingStride-02468
  `callableShaderBindingStride` must be less than or equal to `VkPhysicalDeviceRayTracingPropertiesNV`::`maxShaderGroupStride`

- VUID-vkCmdTraceRaysNV-width-02469
  `width` must be less than or equal to `VkPhysicalDeviceLimits`::`maxComputeWorkGroupCount`[0]

- VUID-vkCmdTraceRaysNV-height-02470
  `height` must be less than or equal to `VkPhysicalDeviceLimits`::`maxComputeWorkGroupCount`[1]

- VUID-vkCmdTraceRaysNV-depth-02471
  `depth` must be less than or equal to `VkPhysicalDeviceLimits`::`maxComputeWorkGroupCount`[2]

- VUID-vkCmdTraceRaysNV-allowClusterAccelerationStructure-10577
  If the traced geometry contains a cluster acceleration structure, then VkRayTracingPipelineClusterAccelerationStructureCreateInfoNV::`allowClusterAccelerationStructure` must have been set for that pipeline

Valid Usage (Implicit)

- VUID-vkCmdTraceRaysNV-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdTraceRaysNV-raygenShaderBindingTableBuffer-parameter
  `raygenShaderBindingTableBuffer` must be a valid VkBuffer handle

- VUID-vkCmdTraceRaysNV-missShaderBindingTableBuffer-parameter
  If `missShaderBindingTableBuffer` is not VK_NULL_HANDLE, `missShaderBindingTableBuffer` must be a valid VkBuffer handle

- VUID-vkCmdTraceRaysNV-hitShaderBindingTableBuffer-parameter
  If `hitShaderBindingTableBuffer` is not VK_NULL_HANDLE, `hitShaderBindingTableBuffer` must be a valid VkBuffer handle

- VUID-vkCmdTraceRaysNV-callableShaderBindingTableBuffer-parameter
  If `callableShaderBindingTableBuffer` is not VK_NULL_HANDLE, `callableShaderBindingTableBuffer` must be a valid VkBuffer handle

- VUID-vkCmdTraceRaysNV-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdTraceRaysNV-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT operations

- VUID-vkCmdTraceRaysNV-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdTraceRaysNV-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdTraceRaysNV-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdTraceRaysNV-commonparent
  Each of `callableShaderBindingTableBuffer`, `commandBuffer`, `hitShaderBindingTableBuffer`, `missShaderBindingTableBuffer`, and `raygenShaderBindingTableBuffer` that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Outside | VK_QUEUE_COMPUTE_BIT | Action

Conditional Rendering

vkCmdTraceRaysNV is not affected by conditional rendering

### 47.3. Shader Binding Table

A shader binding table is a resource which establishes the relationship between the ray tracing pipeline and the acceleration structures that were built for the ray tracing pipeline. It indicates the shaders that operate on each geometry in an acceleration structure. In addition, it contains the resources accessed by each shader, including indices of textures, buffer device addresses, and constants. The application allocates and manages shader binding tables as VkBuffer objects.

Each entry in the shader binding table consists of `shaderGroupHandleSize` bytes of data, either as queried by vkGetRayTracingShaderGroupHandlesKHR to refer to those specified shaders, or all zeros to refer to a zero shader group. A zero shader group behaves as though it is a shader group consisting entirely of VK_SHADER_UNUSED_KHR. The remainder of the data specified by the stride is application-visible data that can be referenced by a `ShaderRecordBufferKHR` block in the shader.

The shader binding tables to use in a ray tracing pipeline are passed to the vkCmdTraceRaysNV , vkCmdTraceRaysKHR, or vkCmdTraceRaysIndirectKHR commands. Shader binding tables are read-only in shaders that are executing on the ray tracing pipeline.

Shader variables identified with the `ShaderRecordBufferKHR` storage class are used to access the provided shader binding table. Such variables must be:

- typed as `OpTypeStruct`, or an array of this type,

- identified with a `Block` decoration, and

- laid out explicitly using the `Offset`, `ArrayStride`, and `MatrixStride` decorations as specified in Offset and Stride Assignment.

The `Offset` decoration for any member of a `Block`-decorated variable in the `ShaderRecordBufferKHR` storage class must not cause the space required for that variable to extend outside the range [0, `maxStorageBufferRange`).

Accesses to the shader binding table from ray tracing pipelines must be synchronized with the VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_KHR pipeline stage and an access type of VK_ACCESS_SHADER_READ_BIT.

Note | Because different shader record buffers can be associated with the same shader, a shader variable with `ShaderRecordBufferKHR` storage class will not be dynamically uniform if different invocations of the same shader can reference different data in the shader record buffer, such as if the same shader occurs twice in the shader binding table with a different shader record buffer. In this case, if the `DescriptorHeapEXT` capability is not declared, when indexing resources based on values in the `ShaderRecordBufferKHR` storage class, the index should be decorated as `NonUniform`.

#### 47.3.1. Indexing Rules

In order to execute the correct shaders and access the correct resources during a ray tracing dispatch, the implementation must be able to locate shader binding table entries at various stages of execution. This is accomplished by defining a set of indexing rules that compute shader binding table record positions relative to the buffer’s base address in memory. The application must organize the contents of the shader binding table’s memory in a way that application of the indexing rules will lead to correct records.

##### Ray Generation Shaders

Only one ray generation shader is executed per ray tracing dispatch.

For vkCmdTraceRaysKHR, the location of the ray generation shader is specified by the `pRaygenShaderBindingTable->deviceAddress` parameter — there is no indexing. All data accessed must be less than `pRaygenShaderBindingTable->size` bytes from `deviceAddress`. `pRaygenShaderBindingTable->stride` is unused, and must be equal to `pRaygenShaderBindingTable->size`.

For vkCmdTraceRaysNV, the location of the ray generation shader is specified by the `raygenShaderBindingTableBuffer` and `raygenShaderBindingOffset` parameters — there is no indexing.

##### Hit Shaders

The base for the computation of intersection, any-hit, and closest hit shader locations is the `instanceShaderBindingTableRecordOffset` value stored with each instance of a top-level acceleration structure (VkAccelerationStructureInstanceKHR). This value determines the beginning of the shader binding table records for a given instance.

In the following rule, `geometryIndex` refers to the geometry index of the intersected geometry within the instance.

The `sbtRecordOffset` and `sbtRecordStride` values are passed in as parameters to `traceNV`() or `traceRayEXT`() calls made in the shaders. See Section 8.19 (Ray Tracing Functions) of the OpenGL Shading Language Specification for more details. In SPIR-V, these correspond to the `SBTOffset` and `SBTStride` parameters to the pipeline trace ray instructions.

The result of this computation is then added to `pHitShaderBindingTable->deviceAddress`, a device address passed to vkCmdTraceRaysKHR , or `hitShaderBindingOffset`, a base offset passed to vkCmdTraceRaysNV .

For vkCmdTraceRaysKHR, the complete rule to compute a hit shader binding table record address in the `pHitShaderBindingTable` is:

  `pHitShaderBindingTable->deviceAddress` + `pHitShaderBindingTable->stride` × ( `instanceShaderBindingTableRecordOffset` + `geometryIndex` × `sbtRecordStride` + `sbtRecordOffset` )

All data accessed must be less than `pHitShaderBindingTable->size` bytes from the base address.

For vkCmdTraceRaysNV, the offset and stride come from direct parameters, so the full rule to compute a hit shader binding table record address in the `hitShaderBindingTableBuffer` is:

  `hitShaderBindingOffset` + `hitShaderBindingStride` × ( `instanceShaderBindingTableRecordOffset` + `geometryIndex` × `sbtRecordStride` + `sbtRecordOffset` )

##### Miss Shaders

A miss shader is executed whenever a ray query fails to find an intersection for the given scene geometry. Multiple miss shaders may be executed throughout a ray tracing dispatch.

The base for the computation of miss shader locations is `pMissShaderBindingTable->deviceAddress`, a device address passed into vkCmdTraceRaysKHR , or `missShaderBindingOffset`, a base offset passed into vkCmdTraceRaysNV .

The `missIndex` value is passed in as a parameter to `traceNV`() or `traceRayEXT`() calls made in the shaders. See Section 8.19 (Ray Tracing Functions) of the OpenGL Shading Language Specification for more details. In SPIR-V, this corresponds to the `MissIndex` parameter to the pipeline trace ray instructions.

For vkCmdTraceRaysKHR, the complete rule to compute a miss shader binding table record address in the `pMissShaderBindingTable` is:

  `pMissShaderBindingTable->deviceAddress` + `pMissShaderBindingTable->stride` × `missIndex`

All data accessed must be less than `pMissShaderBindingTable->size` bytes from the base address.

For vkCmdTraceRaysNV, the offset and stride come from direct parameters, so the full rule to compute a miss shader binding table record address in the `missShaderBindingTableBuffer` is:

  `missShaderBindingOffset` + `missShaderBindingStride` × `missIndex`

##### Callable Shaders

A callable shader is executed when requested by a ray tracing shader. Multiple callable shaders may be executed throughout a ray tracing dispatch.

The base for the computation of callable shader locations is `pCallableShaderBindingTable->deviceAddress`, a device address passed into vkCmdTraceRaysKHR , or `callableShaderBindingOffset`, a base offset passed into vkCmdTraceRaysNV .

The `sbtRecordIndex` value is passed in as a parameter to `executeCallableNV`() or `executeCallableEXT`() calls made in the shaders. See Section 8.19 (Ray Tracing Functions) of the OpenGL Shading Language Specification for more details. In SPIR-V, this corresponds to the `SBTIndex` parameter to the `OpExecuteCallableNV` or `OpExecuteCallableKHR` instruction.

For vkCmdTraceRaysKHR, the complete rule to compute a callable shader binding table record address in the `pCallableShaderBindingTable` is:

  `pCallableShaderBindingTable->deviceAddress` + `pCallableShaderBindingTable->stride` × `sbtRecordIndex`

All data accessed must be less than `pCallableShaderBindingTable->size` bytes from the base address.

For vkCmdTraceRaysNV, the offset and stride come from direct parameters, so the full rule to compute a callable shader binding table record address in the `callableShaderBindingTableBuffer` is:

  `callableShaderBindingOffset` + `callableShaderBindingStride` × `sbtRecordIndex`

### 47.4. Ray Tracing Pipeline Stack

Ray tracing pipelines have a potentially large set of shaders which may be invoked in various call chain combinations to perform ray tracing. To store parameters for a given shader execution, an implementation may use a stack of data in memory. This stack must be sized to the sum of the stack sizes of all shaders in any call chain executed by the application.

If the stack size is not set explicitly, the stack size for a pipeline is:

  rayGenStackMax + min(1, `maxPipelineRayRecursionDepth`) × max(closestHitStackMax, missStackMax, intersectionStackMax + anyHitStackMax) + max(0, `maxPipelineRayRecursionDepth`-1) × max(closestHitStackMax, missStackMax) + 2 × callableStackMax

where rayGenStackMax, closestHitStackMax, missStackMax, anyHitStackMax, intersectionStackMax, and callableStackMax are the maximum stack values queried by the respective shader stages for any shaders in any shader groups defined by the pipeline.

This stack size is potentially significant, so an application may want to provide a more accurate stack size after pipeline compilation. The value that the application provides is the maximum value of the sum of all shaders in a call chain across all possible call chains, taking into account any application specific knowledge about the properties of the call chains.

Note | For example, if an application has two types of closest hit and miss shaders that it can use but the first level of rays will only use the first kind (possibly reflection) and the second level will only use the second kind (occlusion or shadow ray, for example) then the application can compute the stack size by something similar to: `rayGenStack` + max(`closestHit1Stack`, `miss1Stack`) + max(`closestHit2Stack`, `miss2Stack`) This is guaranteed to be no larger than the default stack size computation which assumes that both call levels may be the larger of the two.

### 47.5. Ray Tracing Capture Replay

In a similar way to bufferDeviceAddressCaptureReplay, the `rayTracingPipelineShaderGroupHandleCaptureReplay` feature allows the querying of opaque data which can be used in a future replay.

During the capture phase, capture/replay tools are expected to query opaque data for shader group handle replay using vkGetRayTracingCaptureReplayShaderGroupHandlesKHR.

Providing the opaque data during replay, using VkRayTracingShaderGroupCreateInfoKHR::`pShaderGroupCaptureReplayHandle` at pipeline creation time, causes the implementation to generate identical shader group handles to those in the capture phase, allowing capture/replay tools to reuse previously recorded shader binding table buffer contents or to obtain the same handles by calling vkGetRayTracingCaptureReplayShaderGroupHandlesKHR again.

### 47.6. Ray Tracing Validation

Ray tracing validation can help root cause application issues and improve performance. Unlike existing validation layers, ray tracing validation performs checks at an implementation level, which helps identify potential problems that may not be caught by the layer.

By enabling the ray tracing validation feature, warnings and errors can be delivered straight from a ray tracing implementation to the application through a messenger callback registered with the implementation, where they can be processed through existing application-side debugging or logging systems.

## 48. Memory Decompression

Commands that can be used to decompress memory between one or more memory regions are vkCmdDecompressMemoryEXT, vkCmdDecompressMemoryNV, vkCmdDecompressMemoryIndirectCountNV, and vkCmdDecompressMemoryIndirectCountEXT.

To decompress memory containing compressed data, call:

    // Provided by VK_EXT_memory_decompression
    void vkCmdDecompressMemoryEXT(
        VkCommandBuffer                             commandBuffer,
        const VkDecompressMemoryInfoEXT*            pDecompressMemoryInfoEXT);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `pDecompressMemoryInfoEXT` is a pointer to a VkDecompressMemoryInfoEXT structure describing the decompression parameters.

Valid Usage

- VUID-vkCmdDecompressMemoryEXT-memoryDecompression-11761
  The `memoryDecompression` feature must be enabled

Valid Usage (Implicit)

- VUID-vkCmdDecompressMemoryEXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdDecompressMemoryEXT-pDecompressMemoryInfoEXT-parameter
  `pDecompressMemoryInfoEXT` must be a valid pointer to a valid VkDecompressMemoryInfoEXT structure

- VUID-vkCmdDecompressMemoryEXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdDecompressMemoryEXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, or VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdDecompressMemoryEXT-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdDecompressMemoryEXT-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdDecompressMemoryEXT-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT | Action

Conditional Rendering

vkCmdDecompressMemoryEXT is not affected by conditional rendering

The `VkDecompressMemoryInfoEXT` structure is defined as:

    // Provided by VK_EXT_memory_decompression
    typedef struct VkDecompressMemoryInfoEXT {
        VkStructureType                        sType;
        const void*                            pNext;
        VkMemoryDecompressionMethodFlagsEXT    decompressionMethod;
        uint32_t                               regionCount;
        const VkDecompressMemoryRegionEXT*     pRegions;
    } VkDecompressMemoryInfoEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `decompressionMethod` is a bitmask of VkMemoryDecompressionMethodFlagBitsEXT with a single bit set specifying the method used to decompress data.

- `regionCount` is the number of regions to decompress.

- `pRegions` is a pointer to an array of VkDecompressMemoryRegionEXT structures specifying the regions to decompress.

Each memory region specified in `pRegions` is decompressed from the source to the destination address based on the decompression method specified in `decompressionMethod`. If any of the specified source and destination regions overlap in memory, then the results of decompression are undefined.

Valid Usage

- VUID-VkDecompressMemoryInfoEXT-decompressionMethod-07690
  The `decompressionMethod` must have a single bit set

- VUID-VkDecompressMemoryInfoEXT-decompressionMethod-11762
  If `decompressionMethod` is VK_MEMORY_DECOMPRESSION_METHOD_GDEFLATE_1_0_BIT_EXT, then for each element of `pRegions`, `decompressedSize` must be less than or equal to 65536 bytes

- VUID-VkDecompressMemoryInfoEXT-decompressionMethod-11763
  `decompressionMethod` must be a valid bit specified in `VkPhysicalDeviceMemoryDecompressionPropertiesEXT`::`decompressionMethods`

Valid Usage (Implicit)

- VUID-VkDecompressMemoryInfoEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DECOMPRESS_MEMORY_INFO_EXT

- VUID-VkDecompressMemoryInfoEXT-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkDecompressMemoryInfoEXT-decompressionMethod-parameter
  `decompressionMethod` must be a valid combination of VkMemoryDecompressionMethodFlagBitsEXT values

- VUID-VkDecompressMemoryInfoEXT-decompressionMethod-requiredbitmask
  `decompressionMethod` must not be `0`

- VUID-VkDecompressMemoryInfoEXT-pRegions-parameter
  `pRegions` must be a valid pointer to an array of `regionCount` VkDecompressMemoryRegionEXT structures

- VUID-VkDecompressMemoryInfoEXT-regionCount-arraylength
  `regionCount` must be greater than `0`

The `VkDecompressMemoryRegionEXT` structure is defined as:

    // Provided by VK_EXT_memory_decompression
    typedef struct VkDecompressMemoryRegionEXT {
        VkDeviceAddress    srcAddress;
        VkDeviceAddress    dstAddress;
        VkDeviceSize       compressedSize;
        VkDeviceSize       decompressedSize;
    } VkDecompressMemoryRegionEXT;

- `srcAddress` is the address where compressed data is stored.

- `dstAddress` is the destination address where decompressed data will be written.

- `compressedSize` is the size of compressed data in bytes.

- `decompressedSize` is the size of decompressed data in bytes.

Accesses to compressed and decompressed data specified in `srcAddress` and `dstAddress` must be synchronized with the VK_PIPELINE_STAGE_2_MEMORY_DECOMPRESSION_BIT_EXT pipeline stage with access type of VK_ACCESS_2_MEMORY_DECOMPRESSION_READ_BIT_EXT or VK_ACCESS_2_MEMORY_DECOMPRESSION_WRITE_BIT_EXT.

Valid Usage

- VUID-VkDecompressMemoryRegionEXT-srcAddress-07685
  `srcAddress` must be 4 byte aligned

- VUID-VkDecompressMemoryRegionEXT-srcAddress-07686
  The memory range defined by `srcAddress` and `compressedSize` must be contained within the size of the buffer bound to `srcAddress`, minus the offset of `srcAddress` from the base address of that buffer

- VUID-VkDecompressMemoryRegionEXT-dstAddress-07687
  `dstAddress` must be 4 byte aligned

- VUID-VkDecompressMemoryRegionEXT-dstAddress-07688
  The memory range defined by `dstAddress` and `decompressedSize` must be contained within the size of the buffer bound to `dstAddress`, minus the offset of `dstAddress` from the base address of that buffer

- VUID-VkDecompressMemoryRegionEXT-decompressedSize-07689
  `decompressedSize` must be large enough to hold the decompressed data based on the `decompressionMethod`

- VUID-VkDecompressMemoryRegionEXT-compressedSize-11795
  `compressedSize` must not be zero

- VUID-VkDecompressMemoryRegionEXT-decompressedSize-11796
  `decompressedSize` must not be zero

- VUID-VkDecompressMemoryRegionEXT-srcAddress-07691
  The memory range defined by `srcAddress` and `compressedSize` must not overlap the memory range defined by `dstAddress` and `decompressedSize`

- VUID-VkDecompressMemoryRegionEXT-srcAddress-11764
  `srcAddress` must be a device address allocated to the application from a buffer created with the VK_BUFFER_USAGE_2_MEMORY_DECOMPRESSION_BIT_EXT usage flag set

- VUID-VkDecompressMemoryRegionEXT-dstAddress-11765
  `dstAddress` must be a device address allocated to the application from a buffer created with the VK_BUFFER_USAGE_2_MEMORY_DECOMPRESSION_BIT_EXT usage flag set

Valid Usage (Implicit)

- VUID-VkDecompressMemoryRegionEXT-srcAddress-parameter
  `srcAddress` must be a valid VkDeviceAddress value

- VUID-VkDecompressMemoryRegionEXT-dstAddress-parameter
  `dstAddress` must be a valid VkDeviceAddress value

To decompress memory containing compressed data, call:

    // Provided by VK_NV_memory_decompression
    void vkCmdDecompressMemoryNV(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    decompressRegionCount,
        const VkDecompressMemoryRegionNV*           pDecompressMemoryRegions);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `decompressRegionCount` is the number of memory regions to decompress.

- `pDecompressMemoryRegions` is a pointer to an array of `decompressRegionCount` VkDecompressMemoryRegionNV structures specifying decompression parameters.

Each region specified in `pDecompressMemoryRegions` is decompressed from the compressed to decompressed region based on the decompression method specified in VkDecompressMemoryRegionNV::`decompressionMethod`. If the regions containing compressed and decompressed data overlap, the decompression behavior is undefined.

Valid Usage

- VUID-vkCmdDecompressMemoryNV-None-07684
  The `memoryDecompression` feature must be enabled

Valid Usage (Implicit)

- VUID-vkCmdDecompressMemoryNV-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdDecompressMemoryNV-pDecompressMemoryRegions-parameter
  `pDecompressMemoryRegions` must be a valid pointer to an array of `decompressRegionCount` valid VkDecompressMemoryRegionNV structures

- VUID-vkCmdDecompressMemoryNV-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdDecompressMemoryNV-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, or VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdDecompressMemoryNV-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdDecompressMemoryNV-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdDecompressMemoryNV-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdDecompressMemoryNV-decompressRegionCount-arraylength
  `decompressRegionCount` must be greater than `0`

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT | Action

Conditional Rendering

vkCmdDecompressMemoryNV is not affected by conditional rendering

The `VkDecompressMemoryRegionNV` structure is defined as:

    // Provided by VK_NV_memory_decompression
    typedef struct VkDecompressMemoryRegionNV {
        VkDeviceAddress                        srcAddress;
        VkDeviceAddress                        dstAddress;
        VkDeviceSize                           compressedSize;
        VkDeviceSize                           decompressedSize;
        VkMemoryDecompressionMethodFlagsEXT    decompressionMethod;
    } VkDecompressMemoryRegionNV;

- `srcAddress` is the address where compressed data is stored.

- `dstAddress` is the destination address where decompressed data will be written.

- `compressedSize` is the size of compressed data in bytes.

- `decompressedSize` is the size of decompressed data in bytes.

- `decompressionMethod` is a bitmask of VkMemoryDecompressionMethodFlagBitsNV with a single bit set specifying the method used to decompress data.

Valid Usage

- VUID-VkDecompressMemoryRegionNV-decompressionMethod-07690
  The `decompressionMethod` must have a single bit set

- VUID-VkDecompressMemoryRegionNV-srcAddress-07685
  `srcAddress` must be 4 byte aligned

- VUID-VkDecompressMemoryRegionNV-srcAddress-07686
  The memory range defined by `srcAddress` and `compressedSize` must be contained within the size of the buffer bound to `srcAddress`, minus the offset of `srcAddress` from the base address of that buffer

- VUID-VkDecompressMemoryRegionNV-dstAddress-07687
  `dstAddress` must be 4 byte aligned

- VUID-VkDecompressMemoryRegionNV-dstAddress-07688
  The memory range defined by `dstAddress` and `decompressedSize` must be contained within the size of the buffer bound to `dstAddress`, minus the offset of `dstAddress` from the base address of that buffer

- VUID-VkDecompressMemoryRegionNV-decompressedSize-07689
  `decompressedSize` must be large enough to hold the decompressed data based on the `decompressionMethod`

- VUID-VkDecompressMemoryRegionNV-compressedSize-11795
  `compressedSize` must not be zero

- VUID-VkDecompressMemoryRegionNV-decompressedSize-11796
  `decompressedSize` must not be zero

- VUID-VkDecompressMemoryRegionNV-srcAddress-07691
  The memory range defined by `srcAddress` and `compressedSize` must not overlap the memory range defined by `dstAddress` and `decompressedSize`

- VUID-VkDecompressMemoryRegionNV-decompressionMethod-09395
  If `decompressionMethod` is VK_MEMORY_DECOMPRESSION_METHOD_GDEFLATE_1_0_BIT_EXT, then `decompressedSize` must be less than or equal to 65536 bytes

- VUID-vkCmdDecompressMemoryNV-memoryDecompression-11766
  The `memoryDecompression` feature must be enabled

To decompress data between one or more memory regions by specifying decompression parameters indirectly in a buffer, call:

    // Provided by VK_EXT_memory_decompression
    void vkCmdDecompressMemoryIndirectCountEXT(
        VkCommandBuffer                             commandBuffer,
        VkMemoryDecompressionMethodFlagsEXT         decompressionMethod,
        VkDeviceAddress                             indirectCommandsAddress,
        VkDeviceAddress                             indirectCommandsCountAddress,
        uint32_t                                    maxDecompressionCount,
        uint32_t                                    stride);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `decompressionMethod` is a bitmask of VkMemoryDecompressionMethodFlagBitsEXT with a single bit set specifying the method used to decompress data.

- `indirectCommandsAddress` is the device address containing decompression parameters laid out as an array of VkDecompressMemoryRegionEXT structures.

- `indirectCommandsCountAddress` is the device address containing a 32-bit integer value specifying the decompression count.

- `maxDecompressionCount` is maximum number of decompressions that will be executed. The actual number of executed decompressions is the minimum of the count specified in `indirectCommandsCountAddress` and `maxDecompressionCount`.

- `stride` is the byte stride between successive sets of decompression parameters located starting from `indirectCommandsAddress`.

Each region specified in `indirectCommandsAddress` is decompressed from the source to destination region based on the specified `decompressionMethod`.

Valid Usage

- VUID-vkCmdDecompressMemoryIndirectCountEXT-None-07692
  The `memoryDecompression` feature must be enabled

- VUID-vkCmdDecompressMemoryIndirectCountEXT-indirectCommandsAddress-07694
  `indirectCommandsAddress` must be a device address allocated to the application from a buffer created with the VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT usage flag set

- VUID-vkCmdDecompressMemoryIndirectCountEXT-indirectCommandsAddress-07695
  `indirectCommandsAddress` must be a multiple of `4`

- VUID-vkCmdDecompressMemoryIndirectCountEXT-indirectCommandsCountAddress-07697
  `indirectCommandsCountAddress` must be a device address allocated to the application from a buffer created with the VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT usage flag set

- VUID-vkCmdDecompressMemoryIndirectCountEXT-indirectCommandsCountAddress-07698
  `indirectCommandsCountAddress` must be a multiple of `4`

- VUID-vkCmdDecompressMemoryIndirectCountEXT-indirectCommandsCountAddress-07699
  The count stored in `indirectCommandsCountAddress` must be less than or equal to `VkPhysicalDeviceMemoryDecompressionPropertiesEXT`::`maxDecompressionIndirectCount`

- VUID-vkCmdDecompressMemoryIndirectCountEXT-indirectCommandsAddress-11794
  All device addresses between `indirectCommandsAddress` and `indirectCommandsAddress` + (`stride` × (count stored in `indirectCommandsCountAddress`)) - 1 must be in the buffer device address range of the same buffer

- VUID-vkCmdDecompressMemoryIndirectCountEXT-decompressionMethod-07690
  The `decompressionMethod` must have a single bit set

- VUID-vkCmdDecompressMemoryIndirectCountEXT-stride-11767
  `stride` must be a multiple of `4` and must be greater than or equal to sizeof(VkDecompressMemoryRegionEXT)

- VUID-vkCmdDecompressMemoryIndirectCountEXT-maxDecompressionCount-11768
  `maxDecompressionCount` must be less than or equal to `VkPhysicalDeviceMemoryDecompressionPropertiesEXT`::`maxDecompressionIndirectCount`

- VUID-vkCmdDecompressMemoryIndirectCountEXT-decompressionMethod-11769
  If `decompressionMethod` is VK_MEMORY_DECOMPRESSION_METHOD_GDEFLATE_1_0_BIT_EXT, then all values in VkDecompressMemoryRegionEXT::`decompressedSize` must be less than or equal to 65536 bytes

- VUID-vkCmdDecompressMemoryIndirectCountEXT-decompressionMethod-11810
  `decompressionMethod` must be a valid bit specified in `VkPhysicalDeviceMemoryDecompressionPropertiesEXT`::`decompressionMethods`

Valid Usage (Implicit)

- VUID-vkCmdDecompressMemoryIndirectCountEXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdDecompressMemoryIndirectCountEXT-decompressionMethod-parameter
  `decompressionMethod` must be a valid combination of VkMemoryDecompressionMethodFlagBitsEXT values

- VUID-vkCmdDecompressMemoryIndirectCountEXT-decompressionMethod-requiredbitmask
  `decompressionMethod` must not be `0`

- VUID-vkCmdDecompressMemoryIndirectCountEXT-indirectCommandsAddress-parameter
  `indirectCommandsAddress` must be a valid VkDeviceAddress value

- VUID-vkCmdDecompressMemoryIndirectCountEXT-indirectCommandsCountAddress-parameter
  `indirectCommandsCountAddress` must be a valid VkDeviceAddress value

- VUID-vkCmdDecompressMemoryIndirectCountEXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdDecompressMemoryIndirectCountEXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, or VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdDecompressMemoryIndirectCountEXT-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdDecompressMemoryIndirectCountEXT-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdDecompressMemoryIndirectCountEXT-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT | Action

Conditional Rendering

vkCmdDecompressMemoryIndirectCountEXT is not affected by conditional rendering

To decompress data between one or more memory regions by specifying decompression parameters indirectly in a buffer, call:

    // Provided by VK_NV_memory_decompression
    void vkCmdDecompressMemoryIndirectCountNV(
        VkCommandBuffer                             commandBuffer,
        VkDeviceAddress                             indirectCommandsAddress,
        VkDeviceAddress                             indirectCommandsCountAddress,
        uint32_t                                    stride);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `indirectCommandsAddress` is the device address containing decompression parameters laid out as an array of VkDecompressMemoryRegionNV structures.

- `indirectCommandsCountAddress` is the device address containing a 32-bit integer value specifying the decompression count.

- `stride` is the byte stride between successive sets of decompression parameters located starting from `indirectCommandsAddress`.

Each region specified in `indirectCommandsAddress` is decompressed from the source to destination region based on the specified `decompressionMethod`.

Valid Usage

- VUID-vkCmdDecompressMemoryIndirectCountNV-None-07692
  The `memoryDecompression` feature must be enabled

- VUID-vkCmdDecompressMemoryIndirectCountNV-indirectCommandsAddress-07694
  `indirectCommandsAddress` must be a device address allocated to the application from a buffer created with the VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT usage flag set

- VUID-vkCmdDecompressMemoryIndirectCountNV-indirectCommandsAddress-07695
  `indirectCommandsAddress` must be a multiple of `4`

- VUID-vkCmdDecompressMemoryIndirectCountNV-indirectCommandsCountAddress-07697
  `indirectCommandsCountAddress` must be a device address allocated to the application from a buffer created with the VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT usage flag set

- VUID-vkCmdDecompressMemoryIndirectCountNV-indirectCommandsCountAddress-07698
  `indirectCommandsCountAddress` must be a multiple of `4`

- VUID-vkCmdDecompressMemoryIndirectCountNV-indirectCommandsCountAddress-07699
  The count stored in `indirectCommandsCountAddress` must be less than or equal to `VkPhysicalDeviceMemoryDecompressionPropertiesEXT`::`maxDecompressionIndirectCount`

- VUID-vkCmdDecompressMemoryIndirectCountNV-indirectCommandsAddress-11794
  All device addresses between `indirectCommandsAddress` and `indirectCommandsAddress` + (`stride` × (count stored in `indirectCommandsCountAddress`)) - 1 must be in the buffer device address range of the same buffer

- VUID-vkCmdDecompressMemoryIndirectCountNV-stride-11770
  `stride` must be a multiple of `4` and must be greater than or equal to sizeof(VkDecompressMemoryRegionNV)

Valid Usage (Implicit)

- VUID-vkCmdDecompressMemoryIndirectCountNV-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdDecompressMemoryIndirectCountNV-indirectCommandsAddress-parameter
  `indirectCommandsAddress` must be a valid VkDeviceAddress value

- VUID-vkCmdDecompressMemoryIndirectCountNV-indirectCommandsCountAddress-parameter
  `indirectCommandsCountAddress` must be a valid VkDeviceAddress value

- VUID-vkCmdDecompressMemoryIndirectCountNV-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdDecompressMemoryIndirectCountNV-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, or VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdDecompressMemoryIndirectCountNV-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdDecompressMemoryIndirectCountNV-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdDecompressMemoryIndirectCountNV-videocoding
  This command must only be called outside of a video coding scope

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT | Action

Conditional Rendering

vkCmdDecompressMemoryIndirectCountNV is not affected by conditional rendering

Bits which can be set in `VkDecompressMemoryRegionEXT`::`decompressionMethod` or `VkDecompressMemoryRegionNV`::`decompressionMethod` specifying the decompression method to select, or returned in `VkPhysicalDeviceMemoryDecompressionPropertiesEXT`::`decompressionMethods` specifying the available decompression methods are:

    // Provided by VK_EXT_memory_decompression
    // Flag bits for VkMemoryDecompressionMethodFlagBitsEXT
    typedef VkFlags64 VkMemoryDecompressionMethodFlagBitsEXT;
    static const VkMemoryDecompressionMethodFlagBitsEXT VK_MEMORY_DECOMPRESSION_METHOD_GDEFLATE_1_0_BIT_EXT = 0x00000001ULL;
    static const VkMemoryDecompressionMethodFlagBitsEXT VK_MEMORY_DECOMPRESSION_METHOD_GDEFLATE_1_0_BIT_NV = 0x00000001ULL;

    // Provided by VK_NV_memory_decompression
    // Equivalent to VkMemoryDecompressionMethodFlagBitsEXT
    typedef VkMemoryDecompressionMethodFlagBitsEXT VkMemoryDecompressionMethodFlagBitsNV;

- VK_MEMORY_DECOMPRESSION_METHOD_GDEFLATE_1_0_BIT_EXT specifies that the GDeflate 1.0 algorithm is used to decompress data.

    // Provided by VK_EXT_memory_decompression
    typedef VkFlags64 VkMemoryDecompressionMethodFlagsEXT;

    // Provided by VK_NV_memory_decompression
    // Equivalent to VkMemoryDecompressionMethodFlagsEXT
    typedef VkMemoryDecompressionMethodFlagsEXT VkMemoryDecompressionMethodFlagsNV;

`VkMemoryDecompressionMethodFlagsEXT` is a bitmask type for specifying a mask of one or more VkMemoryDecompressionMethodFlagBitsEXT.

## 49. Video Coding

Vulkan implementations may expose one or more queue families supporting video coding operations. These operations are performed by recording them into a command buffer within a video coding scope, and submitting them to queues with compatible video coding capabilities.

The Vulkan video functionalities are designed to be made available through a set of APIs built on top of each other, consisting of:

- A core API providing common video coding functionalities,

- APIs providing codec-independent video decode and video encode related functionalities, respectively,

- Additional codec-specific APIs built on top of those.

This chapter details the fundamental components and operations of these.

### 49.1. Video Picture Resources

In the context of video coding, multidimensional arrays of image data that can be used as the source or target of video coding operations are referred to as video picture resources. They may store additional metadata that includes implementation-private information used during the execution of video coding operations, as discussed later.

Video picture resources are backed by VkImage objects. Individual subregions of VkImageView objects created from such resources can be used as decode output pictures, encode input pictures, reconstructed pictures, and/or reference pictures.

The parameters of a video picture resource are specified using a `VkVideoPictureResourceInfoKHR` structure.

The `VkVideoPictureResourceInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_queue
    typedef struct VkVideoPictureResourceInfoKHR {
        VkStructureType    sType;
        const void*        pNext;
        VkOffset2D         codedOffset;
        VkExtent2D         codedExtent;
        uint32_t           baseArrayLayer;
        VkImageView        imageViewBinding;
    } VkVideoPictureResourceInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `codedOffset` is the offset in texels of the image subregion to use.

- `codedExtent` is the size in pixels of the coded image data.

- `baseArrayLayer` is the array layer of the image view specified in `imageViewBinding` to use as the video picture resource.

- `imageViewBinding` is an image view representing the video picture resource.

The image subresource referred to by such a structure is defined as the image array layer index specified in `baseArrayLayer` relative to the image subresource range the image view specified in `imageViewBinding` was created with.

The meaning of the `codedOffset` and `codedExtent` depends on the command and context the video picture resource is used in, as well as on the used video profile and corresponding codec-specific semantics, as described later.

A video picture resource is uniquely defined by the image subresource referred to by an instance of this structure, together with the `codedOffset` and `codedExtent` members that identify the image subregion within the image subresource referenced corresponding to the video picture resource according to the particular codec-specific semantics.

Accesses to image data within a video picture resource happen at the granularity indicated by VkVideoCapabilitiesKHR::`pictureAccessGranularity`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the used video profile. As a result, given an effective image subregion corresponding to a video picture resource, the actual image subregion accessed may be larger than that as it may include additional padding texels due to the picture access granularity. Any writes performed by video coding operations to such padding texels will result in undefined texel values.

Two video picture resources match if they refer to the same image subresource and they specify identical `codedOffset` and `codedExtent` values.

Valid Usage

- VUID-VkVideoPictureResourceInfoKHR-baseArrayLayer-07175
  `baseArrayLayer` must be less than the VkImageViewCreateInfo::`subresourceRange.layerCount` specified when the image view `imageViewBinding` was created

Valid Usage (Implicit)

- VUID-VkVideoPictureResourceInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_PICTURE_RESOURCE_INFO_KHR

- VUID-VkVideoPictureResourceInfoKHR-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkVideoPictureResourceInfoKHR-imageViewBinding-parameter
  `imageViewBinding` must be a valid VkImageView handle

### 49.2. Decoded Picture Buffer

An integral part of video coding pipelines is the reconstruction of pictures from a compressed video bitstream. A reconstructed picture is a video picture resource resulting from this process.

Such reconstructed pictures can be used as reference pictures in subsequent video coding operations to provide predictions of the values of samples of subsequently decoded or encoded pictures. The correct use of such reconstructed pictures as reference pictures is driven by the video compression standard, the implementation, and the application-specific use cases.

The list of reference pictures used to provide such predictions within a single video coding operation is referred to as the list of active reference pictures.

The decoded picture buffer (DPB) is an indexed data structure that maintains the set of reference pictures available to be used in video coding operations. Individual indexed entries of the DPB are referred to as the decoded picture buffer (DPB) slots. The range of valid DPB slot indices is between zero and `N-1`, where `N` is the capacity of the DPB. Each DPB slot can refer to a reference picture containing a video frame or can refer to up to two reference pictures containing the top and/or bottom fields that, when both present, together represent a full video frame .

In Vulkan, the state and the backing store of the DPB is separated as follows:

- The state of individual DPB slots is maintained by video session objects.

- The backing store of DPB slots is provided by subregions of VkImage objects used as video picture resources.

In addition, the implementation may also maintain opaque metadata associated with DPB slots, including:

- Reference picture metadata corresponding to the video picture resource associated with the DPB slot.

Such metadata may be stored by the implementation as part of the DPB slot state maintained by the video session, or as part of the video picture resource backing the DPB slot.

Any metadata stored in the video picture resources backing DPB slots are independent of the video session used to store it, hence such video picture resources can be shared with other video sessions. Correspondingly, any metadata that is dependent on the video session will always be stored as part of the DPB slot state maintained by that video session.

The responsibility of managing the DPB is split between the application and the implementation as follows:

- The application maintains the association between DPB slot indices and corresponding video picture resources.

- The implementation maintains global and per-slot opaque reference picture metadata.

In addition, the application is also responsible for managing the mapping between the codec-specific picture IDs and DPB slots, and any other codec-specific states unless otherwise specified.

#### 49.2.1. DPB Slot States

At a given time, each DPB slot is either in active or inactive state. Initially, all DPB slots managed by a video session are in inactive state.

A DPB slot can be activated by using it as the target of picture reconstruction in a video coding operation with the reconstructed picture requested to be set up as a reference picture, according to the codec-specific semantics, changing its state to active and associating it with a picture reference to the reconstructed pictures.

Some video coding standards allow multiple picture references to be associated with a single DPB slot. In this case the state of the individual picture references can be independently updated.

Note | As an example, H.264 decoding allows associating a separate top field and bottom field picture with the same DPB slot.

As part of reference picture setup, the implementation may also generate reference picture metadata. Such reference picture metadata is specific to each picture reference associated with the DPB slot.

If such a video coding operation completes successfully, the activated DPB slot will have a valid picture reference and the reconstructed picture is associated with the DPB slot. This is true even if the DPB slot is used as the target of a picture reconstruction that only sets up a top field or bottom field reference picture and thus does not yet refer to a complete frame. However, if any data provided as input to such a video coding operation is not compliant with the video compression standard used, that video coding operation may complete unsuccessfully, in which case the activated DPB slot will have an invalid picture reference. This is true even if the DPB slot previously had a valid picture reference to a top field or bottom field reference picture, but the reconstruction of the other field corresponding to the DPB slot failed.

The application can use queries to get feedback about the outcome of video coding operations and use the resulting VkQueryResultStatusKHR value to determine whether the video coding operation completed successfully (result status is positive) or unsuccessfully (result status is negative).

Using a reference picture associated with a DPB slot that has an invalid picture reference as an active reference picture in subsequent video coding operations is legal, however, the contents of the outputs of such operations are undefined, and any DPB slots activated by such video coding operations will also have an invalid picture reference. This is true even if such video coding operations may otherwise complete successfully.

A DPB slot can also be deactivated by the application, changing its state to inactive and invalidating any picture references and reference picture metadata associated with the DPB slot.

If an already active DPB slot is used as the target of picture reconstruction in a video coding operation, but the decoded picture is not requested to be set up as a reference picture, according to the codec-specific semantics, no reference picture setup happens and the corresponding picture reference and reference picture metadata is invalidated within the DPB slot. If the DPB slot no longer has any associated picture references after such an operation, the DPB slot is implicitly deactivated.

If an already active DPB slot is used as the target of picture reconstruction when decoding a field picture that is not marked as reference, then the behavior is as follows:

- If the DPB slot is currently associated with a frame, then the DPB slot is deactivated.

- If the DPB slot is not currently associated with a top field picture and the decoded picture is a top field picture, or if the DPB slot is not currently associated with a bottom field picture and the decoded picture is a bottom field picture, then the other field picture association of the DPB slot, if any, is not disturbed.

- If the DPB slot is currently associated with a top field picture and the decoded picture is a top field picture, or if the DPB slot is currently associated with a bottom field picture and the decoded picture is a bottom field picture, then that picture association is invalidated, without disturbing the other field picture association, if any. If the DPB slot no longer has any associated picture references after such an operation, the DPB slot is implicitly deactivated.

A DPB slot can be activated with a new frame even if it is already active. In this case all previous associations of the DPB slots with reference pictures are replaced with an association with the reconstructed picture used to activate it.

If an already active DPB slot is activated with a reconstructed field picture, then the behavior is as follows:

- If the DPB slot is currently associated with a frame, then that association is replaced with an association with the reconstructed field picture used to activate it.

- If the DPB slot is not currently associated with a top field picture and the DPB slot is activated with a top field picture, or if the DPB slot is not currently associated with a bottom field picture and the DPB slot is activated with a bottom field picture, then the DPB slot is associated with the reconstructed field picture used to activate it, without disturbing the other field picture association, if any.

- If the DPB slot is currently associated with a top field picture and the DPB slot is activated with a new top field picture, or if the DPB slot is currently associated with a bottom field picture and the DPB slot is activated with a new bottom field picture, then that association is replaced with an association with the reconstructed field picture used to activate it, without disturbing the other field picture association, if any.

### 49.3. Video Profiles

The `VkVideoProfileInfoKHR` structure is defined as follows:

    // Provided by VK_KHR_video_queue
    typedef struct VkVideoProfileInfoKHR {
        VkStructureType                     sType;
        const void*                         pNext;
        VkVideoCodecOperationFlagBitsKHR    videoCodecOperation;
        VkVideoChromaSubsamplingFlagsKHR    chromaSubsampling;
        VkVideoComponentBitDepthFlagsKHR    lumaBitDepth;
        VkVideoComponentBitDepthFlagsKHR    chromaBitDepth;
    } VkVideoProfileInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `videoCodecOperation` is a VkVideoCodecOperationFlagBitsKHR value specifying a video codec operation.

- `chromaSubsampling` is a bitmask of VkVideoChromaSubsamplingFlagBitsKHR specifying video chroma subsampling information.

- `lumaBitDepth` is a bitmask of VkVideoComponentBitDepthFlagBitsKHR specifying video luma bit depth information.

- `chromaBitDepth` is a bitmask of VkVideoComponentBitDepthFlagBitsKHR specifying video chroma bit depth information.

Video profiles are provided as input to video capability queries such as vkGetPhysicalDeviceVideoCapabilitiesKHR or vkGetPhysicalDeviceVideoFormatPropertiesKHR, as well as when creating resources to be used by video coding operations such as images, buffers, query pools, and video sessions.

The full description of a video profile is specified by an instance of this structure, and the codec-specific and auxiliary structures provided in its `pNext` chain.

When this structure is specified as an input parameter to vkGetPhysicalDeviceVideoCapabilitiesKHR, or through the `pProfiles` member of a VkVideoProfileListInfoKHR structure in the `pNext` chain of the input parameter of a query command such as vkGetPhysicalDeviceVideoFormatPropertiesKHR or vkGetPhysicalDeviceImageFormatProperties2, the following error codes indicate specific causes of the failure of the query operation:

- VK_ERROR_VIDEO_PICTURE_LAYOUT_NOT_SUPPORTED_KHR specifies that the requested video picture layout (e.g. through the `pictureLayout` member of a VkVideoDecodeH264ProfileInfoKHR structure included in the `pNext` chain of `VkVideoProfileInfoKHR`) is not supported.

- VK_ERROR_VIDEO_PROFILE_OPERATION_NOT_SUPPORTED_KHR specifies that a video profile operation specified by `videoCodecOperation` is not supported.

- VK_ERROR_VIDEO_PROFILE_FORMAT_NOT_SUPPORTED_KHR specifies that video format parameters specified by `chromaSubsampling`, `lumaBitDepth`, or `chromaBitDepth` are not supported.

- VK_ERROR_VIDEO_PROFILE_CODEC_NOT_SUPPORTED_KHR specifies that the codec-specific parameters corresponding to the video codec operation are not supported.

Valid Usage

- VUID-VkVideoProfileInfoKHR-chromaSubsampling-07013
  `chromaSubsampling` must have a single bit set

- VUID-VkVideoProfileInfoKHR-lumaBitDepth-07014
  `lumaBitDepth` must have a single bit set

- VUID-VkVideoProfileInfoKHR-chromaSubsampling-07015
  If `chromaSubsampling` is not VK_VIDEO_CHROMA_SUBSAMPLING_MONOCHROME_BIT_KHR, then `chromaBitDepth` must have a single bit set

- VUID-VkVideoProfileInfoKHR-videoCodecOperation-07179
  If `videoCodecOperation` is VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR, then the `pNext` chain must include a VkVideoDecodeH264ProfileInfoKHR structure

- VUID-VkVideoProfileInfoKHR-videoCodecOperation-07180
  If `videoCodecOperation` is VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR, then the `pNext` chain must include a VkVideoDecodeH265ProfileInfoKHR structure

- VUID-VkVideoProfileInfoKHR-videoCodecOperation-10791
  If `videoCodecOperation` is VK_VIDEO_CODEC_OPERATION_DECODE_VP9_BIT_KHR, then the `pNext` chain must include a VkVideoDecodeVP9ProfileInfoKHR structure

- VUID-VkVideoProfileInfoKHR-videoCodecOperation-09256
  If `videoCodecOperation` is VK_VIDEO_CODEC_OPERATION_DECODE_AV1_BIT_KHR, then the `pNext` chain must include a VkVideoDecodeAV1ProfileInfoKHR structure

- VUID-VkVideoProfileInfoKHR-videoCodecOperation-07181
  If `videoCodecOperation` is VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR, then the `pNext` chain must include a VkVideoEncodeH264ProfileInfoKHR structure

- VUID-VkVideoProfileInfoKHR-videoCodecOperation-07182
  If `videoCodecOperation` is VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR, then the `pNext` chain must include a VkVideoEncodeH265ProfileInfoKHR structure

- VUID-VkVideoProfileInfoKHR-videoCodecOperation-10262
  If `videoCodecOperation` is VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR, then the `pNext` chain must include a VkVideoEncodeAV1ProfileInfoKHR structure

Valid Usage (Implicit)

- VUID-VkVideoProfileInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_PROFILE_INFO_KHR

- VUID-VkVideoProfileInfoKHR-videoCodecOperation-parameter
  `videoCodecOperation` must be a valid VkVideoCodecOperationFlagBitsKHR value

- VUID-VkVideoProfileInfoKHR-chromaSubsampling-parameter
  `chromaSubsampling` must be a valid combination of VkVideoChromaSubsamplingFlagBitsKHR values

- VUID-VkVideoProfileInfoKHR-chromaSubsampling-requiredbitmask
  `chromaSubsampling` must not be `0`

- VUID-VkVideoProfileInfoKHR-lumaBitDepth-parameter
  `lumaBitDepth` must be a valid combination of VkVideoComponentBitDepthFlagBitsKHR values

- VUID-VkVideoProfileInfoKHR-lumaBitDepth-requiredbitmask
  `lumaBitDepth` must not be `0`

- VUID-VkVideoProfileInfoKHR-chromaBitDepth-parameter
  `chromaBitDepth` must be a valid combination of VkVideoComponentBitDepthFlagBitsKHR values

Structure Chaining

Extends the structure

  - VkQueryPoolCreateInfo

Possible values of VkVideoProfileInfoKHR::`videoCodecOperation`, specifying the type of video coding operation and video compression standard used by a video profile, are:

    // Provided by VK_KHR_video_queue
    typedef enum VkVideoCodecOperationFlagBitsKHR {
        VK_VIDEO_CODEC_OPERATION_NONE_KHR = 0,
      // Provided by VK_KHR_video_encode_h264
        VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR = 0x00010000,
      // Provided by VK_KHR_video_encode_h265
        VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR = 0x00020000,
      // Provided by VK_KHR_video_decode_h264
        VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR = 0x00000001,
      // Provided by VK_KHR_video_decode_h265
        VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR = 0x00000002,
      // Provided by VK_KHR_video_decode_av1
        VK_VIDEO_CODEC_OPERATION_DECODE_AV1_BIT_KHR = 0x00000004,
      // Provided by VK_KHR_video_encode_av1
        VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR = 0x00040000,
      // Provided by VK_KHR_video_decode_vp9
        VK_VIDEO_CODEC_OPERATION_DECODE_VP9_BIT_KHR = 0x00000008,
    } VkVideoCodecOperationFlagBitsKHR;

- VK_VIDEO_CODEC_OPERATION_NONE_KHR specifies that no video codec operations are supported.

- VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR specifies support for H.264 decode operations.

- VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR specifies support for H.265 decode operations.

- VK_VIDEO_CODEC_OPERATION_DECODE_VP9_BIT_KHR specifies support for VP9 decode operations.

- VK_VIDEO_CODEC_OPERATION_DECODE_AV1_BIT_KHR specifies support for AV1 decode operations.

- VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR specifies support for H.264 encode operations.

- VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR specifies support for H.265 encode operations.

- VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR specifies support for AV1 encode operations.

    // Provided by VK_KHR_video_queue
    typedef VkFlags VkVideoCodecOperationFlagsKHR;

`VkVideoCodecOperationFlagsKHR` is a bitmask type for setting a mask of zero or more VkVideoCodecOperationFlagBitsKHR.

The video format chroma subsampling is defined with the following enums:

    // Provided by VK_KHR_video_queue
    typedef enum VkVideoChromaSubsamplingFlagBitsKHR {
        VK_VIDEO_CHROMA_SUBSAMPLING_INVALID_KHR = 0,
        VK_VIDEO_CHROMA_SUBSAMPLING_MONOCHROME_BIT_KHR = 0x00000001,
        VK_VIDEO_CHROMA_SUBSAMPLING_420_BIT_KHR = 0x00000002,
        VK_VIDEO_CHROMA_SUBSAMPLING_422_BIT_KHR = 0x00000004,
        VK_VIDEO_CHROMA_SUBSAMPLING_444_BIT_KHR = 0x00000008,
    } VkVideoChromaSubsamplingFlagBitsKHR;

- VK_VIDEO_CHROMA_SUBSAMPLING_MONOCHROME_BIT_KHR specifies that the format is monochrome.

- VK_VIDEO_CHROMA_SUBSAMPLING_420_BIT_KHR specified that the format is 4:2:0 chroma subsampled, i.e. the two chroma components are sampled horizontally and vertically at half the sample rate of the luma component.

- VK_VIDEO_CHROMA_SUBSAMPLING_422_BIT_KHR - the format is 4:2:2 chroma subsampled, i.e. the two chroma components are sampled horizontally at half the sample rate of luma component.

- VK_VIDEO_CHROMA_SUBSAMPLING_444_BIT_KHR - the format is 4:4:4 chroma sampled, i.e. all three components of the Y′CBCR format are sampled at the same rate, thus there is no chroma subsampling.

Chroma subsampling is described in more detail in the Chroma Reconstruction section.

    // Provided by VK_KHR_video_queue
    typedef VkFlags VkVideoChromaSubsamplingFlagsKHR;

`VkVideoChromaSubsamplingFlagsKHR` is a bitmask type for setting a mask of zero or more VkVideoChromaSubsamplingFlagBitsKHR.

Possible values for the video format component bit depth are:

    // Provided by VK_KHR_video_queue
    typedef enum VkVideoComponentBitDepthFlagBitsKHR {
        VK_VIDEO_COMPONENT_BIT_DEPTH_INVALID_KHR = 0,
        VK_VIDEO_COMPONENT_BIT_DEPTH_8_BIT_KHR = 0x00000001,
        VK_VIDEO_COMPONENT_BIT_DEPTH_10_BIT_KHR = 0x00000004,
        VK_VIDEO_COMPONENT_BIT_DEPTH_12_BIT_KHR = 0x00000010,
    } VkVideoComponentBitDepthFlagBitsKHR;

- VK_VIDEO_COMPONENT_BIT_DEPTH_8_BIT_KHR specifies a component bit depth of 8 bits.

- VK_VIDEO_COMPONENT_BIT_DEPTH_10_BIT_KHR specifies a component bit depth of 10 bits.

- VK_VIDEO_COMPONENT_BIT_DEPTH_12_BIT_KHR specifies a component bit depth of 12 bits.

    // Provided by VK_KHR_video_queue
    typedef VkFlags VkVideoComponentBitDepthFlagsKHR;

`VkVideoComponentBitDepthFlagsKHR` is a bitmask type for setting a mask of zero or more VkVideoComponentBitDepthFlagBitsKHR.

Additional information about the video decode use case can be provided by adding a `VkVideoDecodeUsageInfoKHR` structure to the `pNext` chain of VkVideoProfileInfoKHR.

The `VkVideoDecodeUsageInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_decode_queue
    typedef struct VkVideoDecodeUsageInfoKHR {
        VkStructureType               sType;
        const void*                   pNext;
        VkVideoDecodeUsageFlagsKHR    videoUsageHints;
    } VkVideoDecodeUsageInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `videoUsageHints` is a bitmask of VkVideoDecodeUsageFlagBitsKHR specifying hints about the intended use of the video decode profile.

Valid Usage (Implicit)

- VUID-VkVideoDecodeUsageInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_DECODE_USAGE_INFO_KHR

- VUID-VkVideoDecodeUsageInfoKHR-videoUsageHints-parameter
  `videoUsageHints` must be a valid combination of VkVideoDecodeUsageFlagBitsKHR values

Structure Chaining

Extends the structures

  - VkQueryPoolCreateInfo

  - VkVideoProfileInfoKHR

The following bits can be specified in VkVideoDecodeUsageInfoKHR::`videoUsageHints` as a hint about the video decode use case:

    // Provided by VK_KHR_video_decode_queue
    typedef enum VkVideoDecodeUsageFlagBitsKHR {
        VK_VIDEO_DECODE_USAGE_DEFAULT_KHR = 0,
        VK_VIDEO_DECODE_USAGE_TRANSCODING_BIT_KHR = 0x00000001,
        VK_VIDEO_DECODE_USAGE_OFFLINE_BIT_KHR = 0x00000002,
        VK_VIDEO_DECODE_USAGE_STREAMING_BIT_KHR = 0x00000004,
    } VkVideoDecodeUsageFlagBitsKHR;

- VK_VIDEO_DECODE_USAGE_TRANSCODING_BIT_KHR specifies that video decoding is intended to be used in conjunction with video encoding to transcode a video bitstream with the same and/or different codecs.

- VK_VIDEO_DECODE_USAGE_OFFLINE_BIT_KHR specifies that video decoding is intended to be used to consume a local video bitstream.

- VK_VIDEO_DECODE_USAGE_STREAMING_BIT_KHR specifies that video decoding is intended to be used to consume a video bitstream received as a continuous flow over network.

Note | There are no restrictions on the combination of bits that can be specified by the application. However, applications should use reasonable combinations in order for the implementation to be able to select the most appropriate mode of operation for the particular use case.

    // Provided by VK_KHR_video_decode_queue
    typedef VkFlags VkVideoDecodeUsageFlagsKHR;

`VkVideoDecodeUsageFlagsKHR` is a bitmask type for setting a mask of zero or more VkVideoDecodeUsageFlagBitsKHR.

Additional information about the video encode use case can be provided by adding a `VkVideoEncodeUsageInfoKHR` structure to the `pNext` chain of VkVideoProfileInfoKHR.

The `VkVideoEncodeUsageInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_encode_queue
    typedef struct VkVideoEncodeUsageInfoKHR {
        VkStructureType                 sType;
        const void*                     pNext;
        VkVideoEncodeUsageFlagsKHR      videoUsageHints;
        VkVideoEncodeContentFlagsKHR    videoContentHints;
        VkVideoEncodeTuningModeKHR      tuningMode;
    } VkVideoEncodeUsageInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `videoUsageHints` is a bitmask of VkVideoEncodeUsageFlagBitsKHR specifying hints about the intended use of the video encode profile.

- `videoContentHints` is a bitmask of VkVideoEncodeContentFlagBitsKHR specifying hints about the content to be encoded using the video encode profile.

- `tuningMode` is a VkVideoEncodeTuningModeKHR value specifying the tuning mode to use when encoding with the video profile.

Valid Usage (Implicit)

- VUID-VkVideoEncodeUsageInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_ENCODE_USAGE_INFO_KHR

- VUID-VkVideoEncodeUsageInfoKHR-videoUsageHints-parameter
  `videoUsageHints` must be a valid combination of VkVideoEncodeUsageFlagBitsKHR values

- VUID-VkVideoEncodeUsageInfoKHR-videoContentHints-parameter
  `videoContentHints` must be a valid combination of VkVideoEncodeContentFlagBitsKHR values

- VUID-VkVideoEncodeUsageInfoKHR-tuningMode-parameter
  If `tuningMode` is not `0`, `tuningMode` must be a valid VkVideoEncodeTuningModeKHR value

Structure Chaining

Extends the structures

  - VkQueryPoolCreateInfo

  - VkVideoProfileInfoKHR

The following bits can be specified in VkVideoEncodeUsageInfoKHR::`videoUsageHints` as a hint about the video encode use case:

    // Provided by VK_KHR_video_encode_queue
    typedef enum VkVideoEncodeUsageFlagBitsKHR {
        VK_VIDEO_ENCODE_USAGE_DEFAULT_KHR = 0,
        VK_VIDEO_ENCODE_USAGE_TRANSCODING_BIT_KHR = 0x00000001,
        VK_VIDEO_ENCODE_USAGE_STREAMING_BIT_KHR = 0x00000002,
        VK_VIDEO_ENCODE_USAGE_RECORDING_BIT_KHR = 0x00000004,
        VK_VIDEO_ENCODE_USAGE_CONFERENCING_BIT_KHR = 0x00000008,
    } VkVideoEncodeUsageFlagBitsKHR;

- VK_VIDEO_ENCODE_USAGE_TRANSCODING_BIT_KHR specifies that video encoding is intended to be used in conjunction with video decoding to transcode a video bitstream with the same and/or different codecs.

- VK_VIDEO_ENCODE_USAGE_STREAMING_BIT_KHR specifies that video encoding is intended to be used to produce a video bitstream that is expected to be sent as a continuous flow over network.

- VK_VIDEO_ENCODE_USAGE_RECORDING_BIT_KHR specifies that video encoding is intended to be used for real-time recording for offline consumption.

- VK_VIDEO_ENCODE_USAGE_CONFERENCING_BIT_KHR specifies that video encoding is intended to be used in a video conferencing scenario.

Note | There are no restrictions on the combination of bits that can be specified by the application. However, applications should use reasonable combinations in order for the implementation to be able to select the most appropriate mode of operation for the particular use case.

    // Provided by VK_KHR_video_encode_queue
    typedef VkFlags VkVideoEncodeUsageFlagsKHR;

`VkVideoEncodeUsageFlagsKHR` is a bitmask type for setting a mask of zero or more VkVideoEncodeUsageFlagBitsKHR.

The following bits can be specified in VkVideoEncodeUsageInfoKHR::`videoContentHints` as a hint about the encoded video content:

    // Provided by VK_KHR_video_encode_queue
    typedef enum VkVideoEncodeContentFlagBitsKHR {
        VK_VIDEO_ENCODE_CONTENT_DEFAULT_KHR = 0,
        VK_VIDEO_ENCODE_CONTENT_CAMERA_BIT_KHR = 0x00000001,
        VK_VIDEO_ENCODE_CONTENT_DESKTOP_BIT_KHR = 0x00000002,
        VK_VIDEO_ENCODE_CONTENT_RENDERED_BIT_KHR = 0x00000004,
    } VkVideoEncodeContentFlagBitsKHR;

- VK_VIDEO_ENCODE_CONTENT_CAMERA_BIT_KHR specifies that video encoding is intended to be used to encode camera content.

- VK_VIDEO_ENCODE_CONTENT_DESKTOP_BIT_KHR specifies that video encoding is intended to be used to encode desktop content.

- VK_VIDEO_ENCODE_CONTENT_RENDERED_BIT_KHR specified that video encoding is intended to be used to encode rendered (e.g. game) content.

Note | There are no restrictions on the combination of bits that can be specified by the application. However, applications should use reasonable combinations in order for the implementation to be able to select the most appropriate mode of operation for the particular content type.

    // Provided by VK_KHR_video_encode_queue
    typedef VkFlags VkVideoEncodeContentFlagsKHR;

`VkVideoEncodeContentFlagsKHR` is a bitmask type for setting a mask of zero or more VkVideoEncodeContentFlagBitsKHR.

Possible video encode tuning mode values are as follows:

    // Provided by VK_KHR_video_encode_queue
    typedef enum VkVideoEncodeTuningModeKHR {
        VK_VIDEO_ENCODE_TUNING_MODE_DEFAULT_KHR = 0,
        VK_VIDEO_ENCODE_TUNING_MODE_HIGH_QUALITY_KHR = 1,
        VK_VIDEO_ENCODE_TUNING_MODE_LOW_LATENCY_KHR = 2,
        VK_VIDEO_ENCODE_TUNING_MODE_ULTRA_LOW_LATENCY_KHR = 3,
        VK_VIDEO_ENCODE_TUNING_MODE_LOSSLESS_KHR = 4,
    } VkVideoEncodeTuningModeKHR;

- VK_VIDEO_ENCODE_TUNING_MODE_DEFAULT_KHR specifies the default tuning mode.

- VK_VIDEO_ENCODE_TUNING_MODE_HIGH_QUALITY_KHR specifies that video encoding is tuned for high quality. When using this tuning mode, the implementation may compromise the latency of video encoding operations to improve quality.

- VK_VIDEO_ENCODE_TUNING_MODE_LOW_LATENCY_KHR specifies that video encoding is tuned for low latency. When using this tuning mode, the implementation may compromise quality to increase the performance and lower the latency of video encode operations.

- VK_VIDEO_ENCODE_TUNING_MODE_ULTRA_LOW_LATENCY_KHR specifies that video encoding is tuned for ultra-low latency. When using this tuning mode, the implementation may compromise quality to maximize the performance and minimize the latency of video encoding operations.

- VK_VIDEO_ENCODE_TUNING_MODE_LOSSLESS_KHR specifies that video encoding is tuned for lossless encoding. When using this tuning mode, video encode operations produce lossless output.

The `VkVideoProfileListInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_queue
    typedef struct VkVideoProfileListInfoKHR {
        VkStructureType                 sType;
        const void*                     pNext;
        uint32_t                        profileCount;
        const VkVideoProfileInfoKHR*    pProfiles;
    } VkVideoProfileListInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `profileCount` is the number of elements in the `pProfiles` array.

- `pProfiles` is a pointer to an array of VkVideoProfileInfoKHR structures.

Note | Video transcoding is an example of a use case that necessitates the specification of multiple profiles in various contexts.

When the application provides a video decode profile and one or more video encode profiles in the profile list, the implementation ensures that any capabilitities returned or resources created are suitable for the video transcoding use cases without the need for manual data transformations.

Valid Usage

- VUID-VkVideoProfileListInfoKHR-pProfiles-06813
  `pProfiles` must not contain more than one element whose `videoCodecOperation` member specifies a decode operation

Valid Usage (Implicit)

- VUID-VkVideoProfileListInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_PROFILE_LIST_INFO_KHR

- VUID-VkVideoProfileListInfoKHR-pProfiles-parameter
  If `profileCount` is not `0`, `pProfiles` must be a valid pointer to an array of `profileCount` valid VkVideoProfileInfoKHR structures

Structure Chaining

Extends the structures

  - VkBufferCreateInfo

  - VkImageCreateInfo

  - VkPhysicalDeviceImageFormatInfo2

  - VkPhysicalDeviceVideoFormatInfoKHR

### 49.4. Video Capabilities

#### 49.4.1. Video Coding Capabilities

To query video coding capabilities for a specific video profile, call:

    // Provided by VK_KHR_video_queue
    VkResult vkGetPhysicalDeviceVideoCapabilitiesKHR(
        VkPhysicalDevice                            physicalDevice,
        const VkVideoProfileInfoKHR*                pVideoProfile,
        VkVideoCapabilitiesKHR*                     pCapabilities);

- `physicalDevice` is the physical device from which to query the video decode or encode capabilities.

- `pVideoProfile` is a pointer to a VkVideoProfileInfoKHR structure.

- `pCapabilities` is a pointer to a VkVideoCapabilitiesKHR structure in which the capabilities are returned.

If the video profile described by `pVideoProfile` is supported by the implementation, then this command returns VK_SUCCESS and `pCapabilities` is filled with the capabilities supported with the specified video profile. Otherwise, one of the video-profile-specific error codes are returned.

Valid Usage

- VUID-vkGetPhysicalDeviceVideoCapabilitiesKHR-pVideoProfile-07183
  If `pVideoProfile->videoCodecOperation` specifies a decode operation, then the `pNext` chain of `pCapabilities` must include a VkVideoDecodeCapabilitiesKHR structure

- VUID-vkGetPhysicalDeviceVideoCapabilitiesKHR-pVideoProfile-07184
  If `pVideoProfile->videoCodecOperation` is VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR, then the `pNext` chain of `pCapabilities` must include a VkVideoDecodeH264CapabilitiesKHR structure

- VUID-vkGetPhysicalDeviceVideoCapabilitiesKHR-pVideoProfile-07185
  If `pVideoProfile->videoCodecOperation` is VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR, then the `pNext` chain of `pCapabilities` must include a VkVideoDecodeH265CapabilitiesKHR structure

- VUID-vkGetPhysicalDeviceVideoCapabilitiesKHR-pVideoProfile-10792
  If `pVideoProfile->videoCodecOperation` is VK_VIDEO_CODEC_OPERATION_DECODE_VP9_BIT_KHR, then the `pNext` chain of `pCapabilities` must include a VkVideoDecodeVP9CapabilitiesKHR structure

- VUID-vkGetPhysicalDeviceVideoCapabilitiesKHR-pVideoProfile-09257
  If `pVideoProfile->videoCodecOperation` is VK_VIDEO_CODEC_OPERATION_DECODE_AV1_BIT_KHR, then the `pNext` chain of `pCapabilities` must include a VkVideoDecodeAV1CapabilitiesKHR structure

- VUID-vkGetPhysicalDeviceVideoCapabilitiesKHR-pVideoProfile-07186
  If `pVideoProfile->videoCodecOperation` specifies an encode operation, then the `pNext` chain of `pCapabilities` must include a VkVideoEncodeCapabilitiesKHR structure

- VUID-vkGetPhysicalDeviceVideoCapabilitiesKHR-pVideoProfile-07187
  If `pVideoProfile->videoCodecOperation` is VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR, then the `pNext` chain of `pCapabilities` must include a VkVideoEncodeH264CapabilitiesKHR structure

- VUID-vkGetPhysicalDeviceVideoCapabilitiesKHR-pVideoProfile-07188
  If `pVideoProfile->videoCodecOperation` is VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR, then the `pNext` chain of `pCapabilities` must include a VkVideoEncodeH265CapabilitiesKHR structure

- VUID-vkGetPhysicalDeviceVideoCapabilitiesKHR-pVideoProfile-10263
  If `pVideoProfile->videoCodecOperation` is VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR, then the `pNext` chain of `pCapabilities` must include a VkVideoEncodeAV1CapabilitiesKHR structure

- VUID-vkGetPhysicalDeviceVideoCapabilitiesKHR-pNext-10921
  If the `pNext` chain of `pVideoProfile` includes a VkVideoEncodeProfileRgbConversionInfoVALVE structure, then the `videoEncodeRgbConversion` feature must be supported

Valid Usage (Implicit)

- VUID-vkGetPhysicalDeviceVideoCapabilitiesKHR-physicalDevice-parameter
  `physicalDevice` must be a valid VkPhysicalDevice handle

- VUID-vkGetPhysicalDeviceVideoCapabilitiesKHR-pVideoProfile-parameter
  `pVideoProfile` must be a valid pointer to a valid VkVideoProfileInfoKHR structure

- VUID-vkGetPhysicalDeviceVideoCapabilitiesKHR-pCapabilities-parameter
  `pCapabilities` must be a valid pointer to a VkVideoCapabilitiesKHR structure

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

  - VK_ERROR_VIDEO_PICTURE_LAYOUT_NOT_SUPPORTED_KHR

  - VK_ERROR_VIDEO_PROFILE_CODEC_NOT_SUPPORTED_KHR

  - VK_ERROR_VIDEO_PROFILE_FORMAT_NOT_SUPPORTED_KHR

  - VK_ERROR_VIDEO_PROFILE_OPERATION_NOT_SUPPORTED_KHR

The `VkVideoCapabilitiesKHR` structure is defined as:

    // Provided by VK_KHR_video_queue
    typedef struct VkVideoCapabilitiesKHR {
        VkStructureType              sType;
        void*                        pNext;
        VkVideoCapabilityFlagsKHR    flags;
        VkDeviceSize                 minBitstreamBufferOffsetAlignment;
        VkDeviceSize                 minBitstreamBufferSizeAlignment;
        VkExtent2D                   pictureAccessGranularity;
        VkExtent2D                   minCodedExtent;
        VkExtent2D                   maxCodedExtent;
        uint32_t                     maxDpbSlots;
        uint32_t                     maxActiveReferencePictures;
        VkExtensionProperties        stdHeaderVersion;
    } VkVideoCapabilitiesKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask of VkVideoCapabilityFlagBitsKHR specifying capability flags.

- `minBitstreamBufferOffsetAlignment` is the minimum alignment for bitstream buffer offsets.

- `minBitstreamBufferSizeAlignment` is the minimum alignment for bitstream buffer range sizes.

- `pictureAccessGranularity` is the granularity at which image access to video picture resources happen.

- `minCodedExtent` is the minimum width and height of the coded frames.

- `maxCodedExtent` is the maximum width and height of the coded frames.

- `maxDpbSlots` is the maximum number of DPB slots supported by a single video session.

- `maxActiveReferencePictures` is the maximum number of active reference pictures a single video coding operation can use.

- `stdHeaderVersion` is a VkExtensionProperties structure reporting the Video Std header name and version supported for the video profile.

Note | It is common for video compression standards to allow using all reference pictures associated with active DPB slots as active reference pictures, hence for video decode profiles the values returned in `maxDpbSlots` and `maxActiveReferencePictures` are often equal. Similarly, in case of video decode profiles supporting field pictures the value of `maxActiveReferencePictures` often equals `maxDpbSlots` × 2.

Valid Usage (Implicit)

- VUID-VkVideoCapabilitiesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_CAPABILITIES_KHR

- VUID-VkVideoCapabilitiesKHR-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkVideoDecodeAV1CapabilitiesKHR, VkVideoDecodeCapabilitiesKHR, VkVideoDecodeH264CapabilitiesKHR, VkVideoDecodeH265CapabilitiesKHR, VkVideoDecodeVP9CapabilitiesKHR, VkVideoEncodeAV1CapabilitiesKHR, VkVideoEncodeAV1QuantizationMapCapabilitiesKHR, VkVideoEncodeCapabilitiesKHR, VkVideoEncodeFeedback2CapabilitiesKHR, VkVideoEncodeH264CapabilitiesKHR, VkVideoEncodeH264QuantizationMapCapabilitiesKHR, VkVideoEncodeH265CapabilitiesKHR, VkVideoEncodeH265QuantizationMapCapabilitiesKHR, VkVideoEncodeIntraRefreshCapabilitiesKHR, VkVideoEncodeQuantizationMapCapabilitiesKHR, or VkVideoEncodeRgbConversionCapabilitiesVALVE

- VUID-VkVideoCapabilitiesKHR-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

Bits which can be set in VkVideoCapabilitiesKHR::`flags` are:

    // Provided by VK_KHR_video_queue
    typedef enum VkVideoCapabilityFlagBitsKHR {
        VK_VIDEO_CAPABILITY_PROTECTED_CONTENT_BIT_KHR = 0x00000001,
        VK_VIDEO_CAPABILITY_SEPARATE_REFERENCE_IMAGES_BIT_KHR = 0x00000002,
    } VkVideoCapabilityFlagBitsKHR;

- VK_VIDEO_CAPABILITY_PROTECTED_CONTENT_BIT_KHR specifies that video sessions support producing and consuming protected content.

- VK_VIDEO_CAPABILITY_SEPARATE_REFERENCE_IMAGES_BIT_KHR indicates that the video picture resources associated with the DPB slots of a video session can be backed by separate `VkImage` objects. If this capability flag is not present, then all DPB slots of a video session must be associated with video picture resources backed by the same `VkImage` object (e.g. using different layers of the same image).

    // Provided by VK_KHR_video_queue
    typedef VkFlags VkVideoCapabilityFlagsKHR;

`VkVideoCapabilityFlagsKHR` is a bitmask type for setting a mask of zero or more VkVideoCapabilityFlagBitsKHR.

#### 49.4.2. Video Format Capabilities

To enumerate the supported video formats and corresponding capabilities for a specific video profile, call:

    // Provided by VK_KHR_video_queue
    VkResult vkGetPhysicalDeviceVideoFormatPropertiesKHR(
        VkPhysicalDevice                            physicalDevice,
        const VkPhysicalDeviceVideoFormatInfoKHR*   pVideoFormatInfo,
        uint32_t*                                   pVideoFormatPropertyCount,
        VkVideoFormatPropertiesKHR*                 pVideoFormatProperties);

- `physicalDevice` is the physical device from which to query the video format properties.

- `pVideoFormatInfo` is a pointer to a VkPhysicalDeviceVideoFormatInfoKHR structure specifying the usage and video profiles for which supported image formats and capabilities are returned.

- `pVideoFormatPropertyCount` is a pointer to an integer related to the number of video format properties available or queried, as described below.

- `pVideoFormatProperties` is a pointer to an array of VkVideoFormatPropertiesKHR structures in which supported image formats and capabilities are returned.

If `pVideoFormatProperties` is `NULL`, then the number of video format properties supported for the given `physicalDevice` is returned in `pVideoFormatPropertyCount`. Otherwise, `pVideoFormatPropertyCount` must point to a variable set by the application to the number of elements in the `pVideoFormatProperties` array, and on return the variable is overwritten with the number of values actually written to `pVideoFormatProperties`. If the value of `pVideoFormatPropertyCount` is less than the number of video format properties supported, at most `pVideoFormatPropertyCount` values will be written to `pVideoFormatProperties`, and VK_INCOMPLETE will be returned instead of VK_SUCCESS, to indicate that not all the available values were returned.

Video format properties are always queried with respect to a specific set of video profiles. These are specified by chaining the VkVideoProfileListInfoKHR structure to `pVideoFormatInfo`.

For most use cases, the images are used by a single video session and a single video profile is provided. For a use case such as video transcoding, where a decode session output image can be used as encode input in one or more encode sessions, multiple video profiles corresponding to the video sessions that will share the image must be provided.

If any of the video profiles specified via VkVideoProfileListInfoKHR::`pProfiles` are not supported, then this command returns one of the video-profile-specific error codes. Furthermore, if VkPhysicalDeviceVideoFormatInfoKHR::`imageUsage` includes any image usage flags not supported by the specified video profiles, then this command returns VK_ERROR_IMAGE_USAGE_NOT_SUPPORTED_KHR.

If the decode capability flags include VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_COINCIDE_BIT_KHR, then querying video format properties that support both decode DPB and output usage can be done by including both VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR and VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR in VkPhysicalDeviceVideoFormatInfoKHR::`imageUsage`. However, even in this case, querying video format properties with VkPhysicalDeviceVideoFormatInfoKHR::`imageUsage` including only VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR or VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR will also return formats supporting both.

Note | This enables application to be able to query all formats supporting VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR and/or VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR by just including one of the flags, respectively, regardless of whether the implementation supports VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_COINCIDE_BIT_KHR, VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_DISTINCT_BIT_KHR, or both. This makes enumerating decode DPB and output formats simpler and unified.

The `imageUsage` member of the VkPhysicalDeviceVideoFormatInfoKHR structure specifies the expected video usage flags that the returned video formats must support. Correspondingly, the `imageUsageFlags` member of each VkVideoFormatPropertiesKHR structure returned will contain at least the same set of image usage flags.

If the `pNext` chain includes a VkImageUsageFlags2CreateInfoKHR structure, `usage` from that structure specifies the expected video usage flags instead of VkPhysicalDeviceVideoFormatInfoKHR::`imageUsage`.

If the implementation supports using images of a particular format in operations other than video decode/encode then the `imageUsageFlags` member of the corresponding VkVideoFormatPropertiesKHR structure returned will include additional image usage flags indicating that.

Note | For most use cases, only decode or encode related usage flags are going to be specified. For a use case such as transcode, if the image were to be shared between decode and encode session(s), then both decode and encode related usage flags can be set.

Multiple `VkVideoFormatPropertiesKHR` entries may be returned with the same `format` member with different `componentMapping`, `imageType`, or `imageTiling` values, as described later.

If VkPhysicalDeviceVideoFormatInfoKHR::`imageUsage` includes VK_IMAGE_USAGE_VIDEO_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR or VK_IMAGE_USAGE_VIDEO_ENCODE_EMPHASIS_MAP_BIT_KHR, multiple `VkVideoFormatPropertiesKHR` entries may be returned with the same `format`, `componentMapping`, `imageType`, and `imageTiling` member values, but different `quantizationMapTexelSize` returned in the VkVideoFormatQuantizationMapPropertiesKHR structure, if one is included in the VkVideoFormatPropertiesKHR::`pNext` chain, when the queried quantization map type supports multiple distinct quantization map texel sizes.

In addition, a different set of `VkVideoFormatPropertiesKHR` entries may be returned depending on the `imageUsage` member of the `VkPhysicalDeviceVideoFormatInfoKHR` structure, even for the same set of video profiles, for example, based on whether encode input, encode DPB, decode output, and/or decode DPB usage is requested.

The application can select the parameters returned in the `VkVideoFormatPropertiesKHR` entries and use compatible parameters when creating the input, output, and DPB images. The implementation will report all image creation and usage flags that are valid for images used with the requested video profiles but applications should create images only with those that are necessary for the particular use case.

Before creating an image, the application can obtain the complete set of supported image format features by calling vkGetPhysicalDeviceImageFormatProperties2 using parameters derived from the members of one of the reported `VkVideoFormatPropertiesKHR` entries and adding the same VkVideoProfileListInfoKHR structure to the `pNext` chain of VkPhysicalDeviceImageFormatInfo2.

The following applies to all `VkVideoFormatPropertiesKHR` entries returned by `vkGetPhysicalDeviceVideoFormatPropertiesKHR`:

- vkGetPhysicalDeviceFormatProperties2 must succeed when called with `VkVideoFormatPropertiesKHR`::`format`

- If `VkVideoFormatPropertiesKHR`::`imageTiling` is VK_IMAGE_TILING_OPTIMAL, then the `optimalTilingFeatures` returned by vkGetPhysicalDeviceFormatProperties2 must include all format features required by the image usage flags reported in `VkVideoFormatPropertiesKHR`::`imageUsageFlags` for the format, as indicated in the Format Feature Dependent Usage Flags section.

- If `VkVideoFormatPropertiesKHR`::`imageTiling` is VK_IMAGE_TILING_LINEAR, then the `linearTilingFeatures` returned by vkGetPhysicalDeviceFormatProperties2 must include all format features required by the image usage flags reported in `VkVideoFormatPropertiesKHR`::`imageUsageFlags` for the format, as indicated in the Format Feature Dependent Usage Flags section.

- vkGetPhysicalDeviceImageFormatProperties2 must succeed when called with a VkPhysicalDeviceImageFormatInfo2 structure containing the following information:

  - The `pNext` chain including the same VkVideoProfileListInfoKHR structure used to call `vkGetPhysicalDeviceVideoFormatPropertiesKHR`.

  - `format` set to the value of `VkVideoFormatPropertiesKHR`::`format`.

  - `type` set to the value of `VkVideoFormatPropertiesKHR`::`imageType`.

  - `tiling` set to the value of `VkVideoFormatPropertiesKHR`::`imageTiling`.

  - `usage` set to the value of `VkVideoFormatPropertiesKHR`::`imageUsageFlags`.

  - `flags` set to the value of `VkVideoFormatPropertiesKHR`::`imageCreateFlags`.

The `componentMapping` member of `VkVideoFormatPropertiesKHR` defines the ordering of the Y′CBCR color channels from the perspective of the video codec operations specified in VkVideoProfileListInfoKHR. For example, if the implementation produces video decode output with the format VK_FORMAT_G8_B8R8_2PLANE_420_UNORM where the blue and red chrominance channels are swapped then the `componentMapping` member of the corresponding `VkVideoFormatPropertiesKHR` structure will have the following member values:

    components.r = VK_COMPONENT_SWIZZLE_B;        // Cb component
    components.g = VK_COMPONENT_SWIZZLE_IDENTITY; // Y component
    components.b = VK_COMPONENT_SWIZZLE_R;        // Cr component
    components.a = VK_COMPONENT_SWIZZLE_IDENTITY; // unused, defaults to 1.0

Valid Usage

- VUID-vkGetPhysicalDeviceVideoFormatPropertiesKHR-pNext-06812
  The `pNext` chain of `pVideoFormatInfo` must include a VkVideoProfileListInfoKHR structure with `profileCount` greater than `0`

- VUID-vkGetPhysicalDeviceVideoFormatPropertiesKHR-pNext-10922
  If the `pNext` chain of `pVideoFormatInfo` includes a VkVideoEncodeProfileRgbConversionInfoVALVE structure, then the `videoEncodeRgbConversion` feature must be supported

Valid Usage (Implicit)

- VUID-vkGetPhysicalDeviceVideoFormatPropertiesKHR-physicalDevice-parameter
  `physicalDevice` must be a valid VkPhysicalDevice handle

- VUID-vkGetPhysicalDeviceVideoFormatPropertiesKHR-pVideoFormatInfo-parameter
  `pVideoFormatInfo` must be a valid pointer to a valid VkPhysicalDeviceVideoFormatInfoKHR structure

- VUID-vkGetPhysicalDeviceVideoFormatPropertiesKHR-pVideoFormatPropertyCount-parameter
  `pVideoFormatPropertyCount` must be a valid pointer to a `uint32_t` value

- VUID-vkGetPhysicalDeviceVideoFormatPropertiesKHR-pVideoFormatProperties-parameter
  If the value referenced by `pVideoFormatPropertyCount` is not `0`, and `pVideoFormatProperties` is not `NULL`, `pVideoFormatProperties` must be a valid pointer to an array of `pVideoFormatPropertyCount` VkVideoFormatPropertiesKHR structures

Return Codes

Success

  - VK_INCOMPLETE

  - VK_SUCCESS

Failure

  - VK_ERROR_IMAGE_USAGE_NOT_SUPPORTED_KHR

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

  - VK_ERROR_VIDEO_PICTURE_LAYOUT_NOT_SUPPORTED_KHR

  - VK_ERROR_VIDEO_PROFILE_CODEC_NOT_SUPPORTED_KHR

  - VK_ERROR_VIDEO_PROFILE_FORMAT_NOT_SUPPORTED_KHR

  - VK_ERROR_VIDEO_PROFILE_OPERATION_NOT_SUPPORTED_KHR

The `VkPhysicalDeviceVideoFormatInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_queue
    typedef struct VkPhysicalDeviceVideoFormatInfoKHR {
        VkStructureType      sType;
        const void*          pNext;
        VkImageUsageFlags    imageUsage;
    } VkPhysicalDeviceVideoFormatInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `imageUsage` is a bitmask of VkImageUsageFlagBits specifying the intended usage of the video images.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceVideoFormatInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_FORMAT_INFO_KHR

- VUID-VkPhysicalDeviceVideoFormatInfoKHR-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkImageUsageFlags2CreateInfoKHR or VkVideoProfileListInfoKHR

- VUID-VkPhysicalDeviceVideoFormatInfoKHR-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkPhysicalDeviceVideoFormatInfoKHR-imageUsage-parameter
  `imageUsage` must be a valid combination of VkImageUsageFlagBits values

- VUID-VkPhysicalDeviceVideoFormatInfoKHR-imageUsage-requiredbitmask
  `imageUsage` must not be `0`

The `VkVideoFormatPropertiesKHR` structure is defined as:

    // Provided by VK_KHR_video_queue
    typedef struct VkVideoFormatPropertiesKHR {
        VkStructureType       sType;
        void*                 pNext;
        VkFormat              format;
        VkComponentMapping    componentMapping;
        VkImageCreateFlags    imageCreateFlags;
        VkImageType           imageType;
        VkImageTiling         imageTiling;
        VkImageUsageFlags     imageUsageFlags;
    } VkVideoFormatPropertiesKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `format` is a VkFormat that specifies the format that can be used with the specified video profiles and image usages.

- `componentMapping` defines the color channel order used for the format. `format` along with `componentMapping` describe how the color channels are ordered when producing video decoder output or are expected to be ordered in video encoder input, when applicable. If the `format` reported does not require component swizzling then all members of `componentMapping` will be set to VK_COMPONENT_SWIZZLE_IDENTITY.

- `imageCreateFlags` is a bitmask of VkImageCreateFlagBits specifying the supported image creation flags for the format.

- `imageType` is a VkImageType that specifies the image type the format can be used with.

- `imageTiling` is a VkImageTiling that specifies the image tiling the format can be used with.

- `imageUsageFlags` is a bitmask of VkImageUsageFlagBits specifying the supported image usage flags for the format.

Only create flags representable in VkImageCreateFlagBits are returned in `imageCreateFlags`. If the `pNext` chain includes a VkImageCreateFlags2CreateInfoKHR structure, all create flags are returned in VkImageCreateFlags2CreateInfoKHR::`flags`.

Only usage flags representable in VkImageUsageFlagBits are returned in `imageUsageFlags`. If the `pNext` chain includes a VkImageUsageFlags2CreateInfoKHR structure, all usage flags are returned in VkImageUsageFlags2CreateInfoKHR::`usage`.

Valid Usage (Implicit)

- VUID-VkVideoFormatPropertiesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_FORMAT_PROPERTIES_KHR

- VUID-VkVideoFormatPropertiesKHR-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkImageCreateFlags2CreateInfoKHR, VkImageUsageFlags2CreateInfoKHR, VkVideoFormatAV1QuantizationMapPropertiesKHR, VkVideoFormatH265QuantizationMapPropertiesKHR, or VkVideoFormatQuantizationMapPropertiesKHR

- VUID-VkVideoFormatPropertiesKHR-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

The list of supported video format properties for a set of image usage flags with respect to a video profile is defined as the list of VkVideoFormatPropertiesKHR structures and any structures included in its `pNext` chain, obtained by calling vkGetPhysicalDeviceVideoFormatPropertiesKHR with VkPhysicalDeviceVideoFormatInfoKHR::`imageUsage` equal to the VkImageUsageFlags in question and the VkPhysicalDeviceVideoFormatInfoKHR::`pNext` chain including a VkVideoProfileListInfoKHR structure with its `pProfiles` member containing a single array element specifying the VkVideoProfileInfoKHR structure chain describing the video profile in question.

### 49.5. Video Sessions

Video sessions are objects that represent and maintain the state needed to perform video decode or encode operations using a specific video profile.

In case of video encode profiles this includes the current rate control configuration and the currently set video encode quality level.

Video sessions are represented by `VkVideoSessionKHR` handles:

    // Provided by VK_KHR_video_queue
    VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkVideoSessionKHR)

#### 49.5.1. Creating a Video Session

To create a video session object, call:

    // Provided by VK_KHR_video_queue
    VkResult vkCreateVideoSessionKHR(
        VkDevice                                    device,
        const VkVideoSessionCreateInfoKHR*          pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkVideoSessionKHR*                          pVideoSession);

- `device` is the logical device that creates the video session.

- `pCreateInfo` is a pointer to a VkVideoSessionCreateInfoKHR structure containing parameters to be used to create the video session.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

- `pVideoSession` is a pointer to a VkVideoSessionKHR handle in which the resulting video session object is returned.

The resulting video session object is said to be created with the video codec operation specified in `pCreateInfo->pVideoProfile->videoCodecOperation`.

The name and version of the codec-specific Video Std header to be used with the video session is specified by the VkExtensionProperties structure pointed to by `pCreateInfo->pStdHeaderVersion`. If a non-existent or unsupported Video Std header version is specified in `pCreateInfo->pStdHeaderVersion->specVersion`, then this command returns VK_ERROR_VIDEO_STD_VERSION_NOT_SUPPORTED_KHR.

Video session objects are created in uninitialized state. In order to transition the video session into initial state, the application must issue a vkCmdControlVideoCodingKHR command with VkVideoCodingControlInfoKHR::`flags` including VK_VIDEO_CODING_CONTROL_RESET_BIT_KHR.

Video session objects also maintain the state of the DPB. The number of DPB slots usable with the created video session is specified in `pCreateInfo->maxDpbSlots`, and each slot is initially in the inactive state.

Each DPB slot maintained by the created video session can refer to a reference picture representing a video frame.

In addition, if the `videoCodecOperation` member of the VkVideoProfileInfoKHR structure pointed to by `pCreateInfo->pVideoProfile` is VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR and the `pictureLayout` member of the VkVideoDecodeH264ProfileInfoKHR structure provided in the VkVideoProfileInfoKHR::`pNext` chain is not VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_PROGRESSIVE_KHR, then the created video session supports interlaced frames and each DPB slot maintained by the created video session can instead refer to separate top field and bottom field reference pictures that together can represent a full video frame. In this case, it is up to the application, driven by the video content, whether it associates any individual DPB slot with separate top and/or bottom field pictures or a single picture representing a full frame.

The created video session can be used to perform video coding operations using video frames up to the maximum size specified in `pCreateInfo->maxCodedExtent`. The minimum frame size allowed is implicitly derived from VkVideoCapabilitiesKHR::`minCodedExtent`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile specified by `pCreateInfo->pVideoProfile`. Accordingly, the created video session is said to be created with a `minCodedExtent` equal to that.

In case of video session objects created with a video encode operation, implementations may return the VK_ERROR_INVALID_VIDEO_STD_PARAMETERS_KHR error if any of the specified Video Std parameters do not adhere to the syntactic or semantic requirements of the used video compression standard, or if values derived from parameters according to the rules defined by the used video compression standard do not adhere to the capabilities of the video compression standard or the implementation.

Note | Applications should not rely on the VK_ERROR_INVALID_VIDEO_STD_PARAMETERS_KHR error being returned by any command as a means to verify Video Std parameters, as implementations are not required to report the error in any specific set of cases.

Valid Usage (Implicit)

- VUID-vkCreateVideoSessionKHR-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkCreateVideoSessionKHR-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkVideoSessionCreateInfoKHR structure

- VUID-vkCreateVideoSessionKHR-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateVideoSessionKHR-pVideoSession-parameter
  `pVideoSession` must be a valid pointer to a VkVideoSessionKHR handle

- VUID-vkCreateVideoSessionKHR-device-queuecount
  The device must have been created with at least `1` queue

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_INITIALIZATION_FAILED

  - VK_ERROR_INVALID_VIDEO_STD_PARAMETERS_KHR

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

  - VK_ERROR_VIDEO_STD_VERSION_NOT_SUPPORTED_KHR

The VkVideoSessionCreateInfoKHR structure is defined as:

    // Provided by VK_KHR_video_queue
    typedef struct VkVideoSessionCreateInfoKHR {
        VkStructureType                 sType;
        const void*                     pNext;
        uint32_t                        queueFamilyIndex;
        VkVideoSessionCreateFlagsKHR    flags;
        const VkVideoProfileInfoKHR*    pVideoProfile;
        VkFormat                        pictureFormat;
        VkExtent2D                      maxCodedExtent;
        VkFormat                        referencePictureFormat;
        uint32_t                        maxDpbSlots;
        uint32_t                        maxActiveReferencePictures;
        const VkExtensionProperties*    pStdHeaderVersion;
    } VkVideoSessionCreateInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `queueFamilyIndex` is the index of the queue family the created video session will be used with.

- `flags` is a bitmask of VkVideoSessionCreateFlagBitsKHR specifying creation flags.

- `pVideoProfile` is a pointer to a VkVideoProfileInfoKHR structure specifying the video profile the created video session will be used with.

- `pictureFormat` is the image format the created video session will be used with. If `pVideoProfile->videoCodecOperation` specifies a decode operation, then `pictureFormat` is the image format of decode output pictures usable with the created video session. If `pVideoProfile->videoCodecOperation` specifies an encode operation, then `pictureFormat` is the image format of encode input pictures usable with the created video session.

- `maxCodedExtent` is the maximum width and height of the coded frames the created video session will be used with.

- `referencePictureFormat` is the image format of reference pictures stored in the DPB the created video session will be used with.

- `maxDpbSlots` is the maximum number of DPB Slots that can be used with the created video session.

- `maxActiveReferencePictures` is the maximum number of active reference pictures that can be used in a single video coding operation using the created video session.

- `pStdHeaderVersion` is a pointer to a VkExtensionProperties structure requesting the Video Std header version to use for the `videoCodecOperation` specified in `pVideoProfile`.

Valid Usage

- VUID-VkVideoSessionCreateInfoKHR-protectedMemory-07189
  If the `protectedMemory` feature is not enabled or if VkVideoCapabilitiesKHR::`flags` does not include VK_VIDEO_CAPABILITY_PROTECTED_CONTENT_BIT_KHR, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile specified by `pVideoProfile`, then `flags` must not include VK_VIDEO_SESSION_CREATE_PROTECTED_CONTENT_BIT_KHR

- VUID-VkVideoSessionCreateInfoKHR-flags-08371
  If `flags` includes VK_VIDEO_SESSION_CREATE_INLINE_QUERIES_BIT_KHR, then `videoMaintenance1` must be enabled

- VUID-VkVideoSessionCreateInfoKHR-flags-10398
  If `flags` includes VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR, then `videoMaintenance2` must be enabled

- VUID-VkVideoSessionCreateInfoKHR-flags-10399
  If `flags` includes VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR, then `pVideoProfile->videoCodecOperation` must specify a decode operation

- VUID-VkVideoSessionCreateInfoKHR-flags-10264
  If `flags` includes VK_VIDEO_SESSION_CREATE_ALLOW_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR or VK_VIDEO_SESSION_CREATE_ALLOW_ENCODE_EMPHASIS_MAP_BIT_KHR, then the `videoEncodeQuantizationMap` feature must be enabled

- VUID-VkVideoSessionCreateInfoKHR-flags-10265
  If `flags` includes VK_VIDEO_SESSION_CREATE_ALLOW_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR or VK_VIDEO_SESSION_CREATE_ALLOW_ENCODE_EMPHASIS_MAP_BIT_KHR, then `pVideoProfile->videoCodecOperation` must specify an encode operation

- VUID-VkVideoSessionCreateInfoKHR-flags-10266
  If `flags` includes VK_VIDEO_SESSION_CREATE_ALLOW_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR, then it must not also include VK_VIDEO_SESSION_CREATE_ALLOW_ENCODE_EMPHASIS_MAP_BIT_KHR

- VUID-VkVideoSessionCreateInfoKHR-flags-10267
  If VkVideoEncodeCapabilitiesKHR::`flags` does not include VK_VIDEO_ENCODE_CAPABILITY_QUANTIZATION_DELTA_MAP_BIT_KHR, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile specified by `pVideoProfile`, then `flags` must not include VK_VIDEO_SESSION_CREATE_ALLOW_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR

- VUID-VkVideoSessionCreateInfoKHR-flags-10268
  If VkVideoEncodeCapabilitiesKHR::`flags` does not include VK_VIDEO_ENCODE_CAPABILITY_EMPHASIS_MAP_BIT_KHR, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile specified by `pVideoProfile`, then `flags` must not include VK_VIDEO_SESSION_CREATE_ALLOW_ENCODE_EMPHASIS_MAP_BIT_KHR

- VUID-VkVideoSessionCreateInfoKHR-pVideoProfile-11759
  `pVideoProfile->videoCodecOperation` must be supported by the queue family index specified in `queueFamilyIndex`, as reported in VkQueueFamilyVideoPropertiesKHR::`videoCodecOperations`

- VUID-VkVideoSessionCreateInfoKHR-pVideoProfile-04845
  `pVideoProfile` must be a supported video profile

- VUID-VkVideoSessionCreateInfoKHR-maxDpbSlots-04847
  `maxDpbSlots` must be less than or equal to VkVideoCapabilitiesKHR::`maxDpbSlots`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile specified by `pVideoProfile`

- VUID-VkVideoSessionCreateInfoKHR-maxActiveReferencePictures-04849
  `maxActiveReferencePictures` must be less than or equal to VkVideoCapabilitiesKHR::`maxActiveReferencePictures`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile specified by `pVideoProfile`

- VUID-VkVideoSessionCreateInfoKHR-maxDpbSlots-04850
  If either `maxDpbSlots` or `maxActiveReferencePictures` is `0`, then both must be `0`

- VUID-VkVideoSessionCreateInfoKHR-maxCodedExtent-04851
  `maxCodedExtent` must be between VkVideoCapabilitiesKHR::`minCodedExtent` and VkVideoCapabilitiesKHR::`maxCodedExtent`, inclusive, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile specified by `pVideoProfile`

- VUID-VkVideoSessionCreateInfoKHR-referencePictureFormat-04852
  If `pVideoProfile->videoCodecOperation` specifies a decode operation and `maxActiveReferencePictures` is greater than `0`, then `referencePictureFormat` must be one of the supported decode DPB formats, as returned by vkGetPhysicalDeviceVideoFormatPropertiesKHR in VkVideoFormatPropertiesKHR::`format` when called with the `imageUsage` member of its `pVideoFormatInfo` parameter containing VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR, and with a VkVideoProfileListInfoKHR structure specified in the `pNext` chain of its `pVideoFormatInfo` parameter whose `pProfiles` member contains an element matching `pVideoProfile`

- VUID-VkVideoSessionCreateInfoKHR-referencePictureFormat-06814
  If `pVideoProfile->videoCodecOperation` specifies an encode operation and `maxActiveReferencePictures` is greater than `0`, then `referencePictureFormat` must be one of the supported decode DPB formats, as returned by then `referencePictureFormat` must be one of the supported encode DPB formats, as returned by vkGetPhysicalDeviceVideoFormatPropertiesKHR in VkVideoFormatPropertiesKHR::`format` when called with the `imageUsage` member of its `pVideoFormatInfo` parameter containing VK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR, and with a VkVideoProfileListInfoKHR structure specified in the `pNext` chain of its `pVideoFormatInfo` parameter whose `pProfiles` member contains an element matching `pVideoProfile`

- VUID-VkVideoSessionCreateInfoKHR-pictureFormat-04853
  If `pVideoProfile->videoCodecOperation` specifies a decode operation, then `pictureFormat` must be one of the supported decode output formats, as returned by vkGetPhysicalDeviceVideoFormatPropertiesKHR in VkVideoFormatPropertiesKHR::`format` when called with the `imageUsage` member of its `pVideoFormatInfo` parameter containing VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR, and with a VkVideoProfileListInfoKHR structure specified in the `pNext` chain of its `pVideoFormatInfo` parameter whose `pProfiles` member contains an element matching `pVideoProfile`

- VUID-VkVideoSessionCreateInfoKHR-pictureFormat-04854
  If `pVideoProfile->videoCodecOperation` specifies an encode operation, then `pictureFormat` must be one of the supported encode input formats, as returned by vkGetPhysicalDeviceVideoFormatPropertiesKHR in VkVideoFormatPropertiesKHR::`format` when called with the `imageUsage` member of its `pVideoFormatInfo` parameter containing VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR, and with a VkVideoProfileListInfoKHR structure specified in the `pNext` chain of its `pVideoFormatInfo` parameter whose `pProfiles` member contains an element matching `pVideoProfile`

- VUID-VkVideoSessionCreateInfoKHR-pVideoProfile-10835
  If `pVideoProfile->videoCodecOperation` specifies an encode operation, the `pNext` chain of this structure includes a VkVideoEncodeSessionIntraRefreshCreateInfoKHR structure, and its `intraRefreshMode` member is not VK_VIDEO_ENCODE_INTRA_REFRESH_MODE_NONE_KHR, then the `videoEncodeIntraRefresh` feature must be enabled

- VUID-VkVideoSessionCreateInfoKHR-pVideoProfile-10836
  If `pVideoProfile->videoCodecOperation` specifies an encode operation, the `pNext` chain of this structure includes a VkVideoEncodeSessionIntraRefreshCreateInfoKHR structure, and its `intraRefreshMode` member is not VK_VIDEO_ENCODE_INTRA_REFRESH_MODE_NONE_KHR, then `intraRefreshMode` must specify one of the bits included in VkVideoEncodeIntraRefreshCapabilitiesKHR::`intraRefreshModes`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile specified by `pVideoProfile`

- VUID-VkVideoSessionCreateInfoKHR-pStdHeaderVersion-07190
  `pStdHeaderVersion->extensionName` must match VkVideoCapabilitiesKHR::`stdHeaderVersion.extensionName`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile specified by `pVideoProfile`

- VUID-VkVideoSessionCreateInfoKHR-pStdHeaderVersion-07191
  `pStdHeaderVersion->specVersion` must be less than or equal to VkVideoCapabilitiesKHR::`stdHeaderVersion.specVersion`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile specified by `pVideoProfile`

- VUID-VkVideoSessionCreateInfoKHR-pVideoProfile-10793
  If `pVideoProfile->videoCodecOperation` is VK_VIDEO_CODEC_OPERATION_DECODE_VP9_BIT_KHR, then the `videoDecodeVP9` feature must be enabled

- VUID-VkVideoSessionCreateInfoKHR-pVideoProfile-08251
  If `pVideoProfile->videoCodecOperation` is VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR and the `pNext` chain of this structure includes a VkVideoEncodeH264SessionCreateInfoKHR structure, then its `maxLevelIdc` member must be less than or equal to VkVideoEncodeH264CapabilitiesKHR::`maxLevelIdc`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile specified in `pVideoProfile`

- VUID-VkVideoSessionCreateInfoKHR-pVideoProfile-08252
  If `pVideoProfile->videoCodecOperation` is VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR and the `pNext` chain of this structure includes a VkVideoEncodeH265SessionCreateInfoKHR structure, then its `maxLevelIdc` member must be less than or equal to VkVideoEncodeH265CapabilitiesKHR::`maxLevelIdc`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile specified in `pVideoProfile`

- VUID-VkVideoSessionCreateInfoKHR-pVideoProfile-10269
  If `pVideoProfile->videoCodecOperation` is VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR, then the `videoEncodeAV1` feature must be enabled

- VUID-VkVideoSessionCreateInfoKHR-pVideoProfile-10270
  If `pVideoProfile->videoCodecOperation` is VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR and the `pNext` chain of this structure includes a VkVideoEncodeAV1SessionCreateInfoKHR structure, then its `maxLevel` member must be less than or equal to VkVideoEncodeAV1CapabilitiesKHR::`maxLevel`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile specified in `pVideoProfile`

- VUID-VkVideoSessionCreateInfoKHR-pVideoProfile-10923
  If the `pVideoProfile->pNext` chain includes a VkVideoEncodeProfileRgbConversionInfoVALVE structure, then the `videoEncodeRgbConversion` feature must be enabled

- VUID-VkVideoSessionCreateInfoKHR-pNext-10924
  If a VkVideoEncodeProfileRgbConversionInfoVALVE structure is included in the `pNext` chain of `pVideoProfile` and `VkVideoEncodeProfileRgbConversionInfoVALVE`::`performEncodeRgbConversion` is enabled, a VkVideoEncodeSessionRgbConversionCreateInfoVALVE structure must be included in the `pNext` chain of VkVideoSessionCreateInfoKHR

Valid Usage (Implicit)

- VUID-VkVideoSessionCreateInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_SESSION_CREATE_INFO_KHR

- VUID-VkVideoSessionCreateInfoKHR-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkVideoEncodeAV1SessionCreateInfoKHR, VkVideoEncodeH264SessionCreateInfoKHR, VkVideoEncodeH265SessionCreateInfoKHR, VkVideoEncodeSessionIntraRefreshCreateInfoKHR, or VkVideoEncodeSessionRgbConversionCreateInfoVALVE

- VUID-VkVideoSessionCreateInfoKHR-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkVideoSessionCreateInfoKHR-flags-parameter
  `flags` must be a valid combination of VkVideoSessionCreateFlagBitsKHR values

- VUID-VkVideoSessionCreateInfoKHR-pVideoProfile-parameter
  `pVideoProfile` must be a valid pointer to a valid VkVideoProfileInfoKHR structure

- VUID-VkVideoSessionCreateInfoKHR-pictureFormat-parameter
  `pictureFormat` must be a valid VkFormat value

- VUID-VkVideoSessionCreateInfoKHR-referencePictureFormat-parameter
  `referencePictureFormat` must be a valid VkFormat value

- VUID-VkVideoSessionCreateInfoKHR-pStdHeaderVersion-parameter
  `pStdHeaderVersion` must be a valid pointer to a valid VkExtensionProperties structure

Bits which can be set in VkVideoSessionCreateInfoKHR::`flags` are:

    // Provided by VK_KHR_video_queue
    typedef enum VkVideoSessionCreateFlagBitsKHR {
        VK_VIDEO_SESSION_CREATE_PROTECTED_CONTENT_BIT_KHR = 0x00000001,
      // Provided by VK_KHR_video_encode_queue
        VK_VIDEO_SESSION_CREATE_ALLOW_ENCODE_PARAMETER_OPTIMIZATIONS_BIT_KHR = 0x00000002,
      // Provided by VK_KHR_video_maintenance1
        VK_VIDEO_SESSION_CREATE_INLINE_QUERIES_BIT_KHR = 0x00000004,
      // Provided by VK_KHR_video_encode_quantization_map
        VK_VIDEO_SESSION_CREATE_ALLOW_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR = 0x00000008,
      // Provided by VK_KHR_video_encode_quantization_map
        VK_VIDEO_SESSION_CREATE_ALLOW_ENCODE_EMPHASIS_MAP_BIT_KHR = 0x00000010,
      // Provided by VK_KHR_video_decode_queue with VK_KHR_video_maintenance2
        VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR = 0x00000020,
    } VkVideoSessionCreateFlagBitsKHR;

- VK_VIDEO_SESSION_CREATE_PROTECTED_CONTENT_BIT_KHR specifies that the video session uses protected video content.

- VK_VIDEO_SESSION_CREATE_ALLOW_ENCODE_PARAMETER_OPTIMIZATIONS_BIT_KHR specifies that the implementation is allowed to override video session parameters and other codec-specific encoding parameters to optimize video encode operations based on the use case information specified in the video profile and the used video encode quality level.

  Note | Not specifying VK_VIDEO_SESSION_CREATE_ALLOW_ENCODE_PARAMETER_OPTIMIZATIONS_BIT_KHR does not guarantee that the implementation will not do any codec-specific parameter overrides, as certain overrides are necessary for the correct operation of the video encoder implementation due to limitations to the available encoding tools on that implementation. This flag, however, enables the implementation to apply further optimizing overrides.

- VK_VIDEO_SESSION_CREATE_INLINE_QUERIES_BIT_KHR specifies that queries within video coding scopes using the created video session are executed inline with video coding operations.

- VK_VIDEO_SESSION_CREATE_ALLOW_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR specifies that the video session can be used to encode pictures with quantization delta maps.

- VK_VIDEO_SESSION_CREATE_ALLOW_ENCODE_EMPHASIS_MAP_BIT_KHR specifies that the video session can be used to encode pictures with emphasis maps.

- VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR specifies that the application can specify video session parameters inline with video decode operations instead of sourcing them from the bound video session parameters object.

    // Provided by VK_KHR_video_queue
    typedef VkFlags VkVideoSessionCreateFlagsKHR;

`VkVideoSessionCreateFlagsKHR` is a bitmask type for setting a mask of zero or more VkVideoSessionCreateFlagBitsKHR.

#### 49.5.2. Destroying a Video Session

To destroy a video session, call:

    // Provided by VK_KHR_video_queue
    void vkDestroyVideoSessionKHR(
        VkDevice                                    device,
        VkVideoSessionKHR                           videoSession,
        const VkAllocationCallbacks*                pAllocator);

- `device` is the logical device that destroys the video session.

- `videoSession` is the video session to destroy.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

Valid Usage

- VUID-vkDestroyVideoSessionKHR-videoSession-07192
  All submitted commands that refer to `videoSession` must have completed execution

- VUID-vkDestroyVideoSessionKHR-videoSession-07193
  If `VkAllocationCallbacks` were provided when `videoSession` was created, a compatible set of callbacks must be provided here

- VUID-vkDestroyVideoSessionKHR-videoSession-07194
  If no `VkAllocationCallbacks` were provided when `videoSession` was created, `pAllocator` must be `NULL`

Valid Usage (Implicit)

- VUID-vkDestroyVideoSessionKHR-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkDestroyVideoSessionKHR-videoSession-parameter
  If `videoSession` is not VK_NULL_HANDLE, `videoSession` must be a valid VkVideoSessionKHR handle

- VUID-vkDestroyVideoSessionKHR-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkDestroyVideoSessionKHR-videoSession-parent
  If `videoSession` is a valid handle, it must have been created, allocated, or retrieved from `device`

Host Synchronization

- Host access to `videoSession` must be externally synchronized

#### 49.5.3. Video Session Memory Association

After creating a video session object, and before the object can be used to record video coding operations into command buffers using it, the application must allocate and bind device memory to the video session. Device memory is allocated separately (see Device Memory) and then associated with the video session.

Video sessions may have multiple memory bindings identified by unique unsigned integer values. Appropriate device memory must be bound to each such memory binding before using the video session to record command buffer commands with it.

To determine the memory requirements for a video session object, call:

    // Provided by VK_KHR_video_queue
    VkResult vkGetVideoSessionMemoryRequirementsKHR(
        VkDevice                                    device,
        VkVideoSessionKHR                           videoSession,
        uint32_t*                                   pMemoryRequirementsCount,
        VkVideoSessionMemoryRequirementsKHR*        pMemoryRequirements);

- `device` is the logical device that owns the video session.

- `videoSession` is the video session to query.

- `pMemoryRequirementsCount` is a pointer to an integer related to the number of memory binding requirements available or queried, as described below.

- `pMemoryRequirements` is `NULL` or a pointer to an array of VkVideoSessionMemoryRequirementsKHR structures in which the memory binding requirements of the video session are returned.

If `pMemoryRequirements` is `NULL`, then the number of memory bindings required for the video session is returned in `pMemoryRequirementsCount`. Otherwise, `pMemoryRequirementsCount` must point to a variable set by the application to the number of elements in the `pMemoryRequirements` array, and on return the variable is overwritten with the number of memory binding requirements actually written to `pMemoryRequirements`. If `pMemoryRequirementsCount` is less than the number of memory bindings required for the video session, then at most `pMemoryRequirementsCount` elements will be written to `pMemoryRequirements`, and VK_INCOMPLETE will be returned, instead of VK_SUCCESS, to indicate that not all required memory binding requirements were returned.

Valid Usage (Implicit)

- VUID-vkGetVideoSessionMemoryRequirementsKHR-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetVideoSessionMemoryRequirementsKHR-videoSession-parameter
  `videoSession` must be a valid VkVideoSessionKHR handle

- VUID-vkGetVideoSessionMemoryRequirementsKHR-pMemoryRequirementsCount-parameter
  `pMemoryRequirementsCount` must be a valid pointer to a `uint32_t` value

- VUID-vkGetVideoSessionMemoryRequirementsKHR-pMemoryRequirements-parameter
  If the value referenced by `pMemoryRequirementsCount` is not `0`, and `pMemoryRequirements` is not `NULL`, `pMemoryRequirements` must be a valid pointer to an array of `pMemoryRequirementsCount` VkVideoSessionMemoryRequirementsKHR structures

- VUID-vkGetVideoSessionMemoryRequirementsKHR-videoSession-parent
  `videoSession` must have been created, allocated, or retrieved from `device`

Return Codes

Success

  - VK_INCOMPLETE

  - VK_SUCCESS

Failure

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkVideoSessionMemoryRequirementsKHR` structure is defined as:

    // Provided by VK_KHR_video_queue
    typedef struct VkVideoSessionMemoryRequirementsKHR {
        VkStructureType         sType;
        void*                   pNext;
        uint32_t                memoryBindIndex;
        VkMemoryRequirements    memoryRequirements;
    } VkVideoSessionMemoryRequirementsKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `memoryBindIndex` is the index of the memory binding.

- `memoryRequirements` is a VkMemoryRequirements structure in which the requested memory binding requirements for the binding index specified by `memoryBindIndex` are returned.

Valid Usage (Implicit)

- VUID-VkVideoSessionMemoryRequirementsKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_SESSION_MEMORY_REQUIREMENTS_KHR

- VUID-VkVideoSessionMemoryRequirementsKHR-pNext-pNext
  `pNext` must be `NULL`

To attach memory to a video session object, call:

    // Provided by VK_KHR_video_queue
    VkResult vkBindVideoSessionMemoryKHR(
        VkDevice                                    device,
        VkVideoSessionKHR                           videoSession,
        uint32_t                                    bindSessionMemoryInfoCount,
        const VkBindVideoSessionMemoryInfoKHR*      pBindSessionMemoryInfos);

- `device` is the logical device that owns the video session.

- `videoSession` is the video session to be bound with device memory.

- `bindSessionMemoryInfoCount` is the number of elements in `pBindSessionMemoryInfos`.

- `pBindSessionMemoryInfos` is a pointer to an array of `bindSessionMemoryInfoCount` VkBindVideoSessionMemoryInfoKHR structures specifying memory regions to be bound to specific memory bindings of the video session.

The valid usage statements below refer to the VkMemoryRequirements structure corresponding to a specific element of `pBindSessionMemoryInfos`, which is defined as follows:

- If the `memoryBindIndex` member of the element of `pBindSessionMemoryInfos` in question matches the `memoryBindIndex` member of one of the elements returned in `pMemoryRequirements` when vkGetVideoSessionMemoryRequirementsKHR is called with the same `videoSession` and with `pMemoryRequirementsCount` equal to `bindSessionMemoryInfoCount`, then the `memoryRequirements` member of that element of `pMemoryRequirements` is the VkMemoryRequirements structure corresponding to the element of `pBindSessionMemoryInfos` in question.

- Otherwise the element of `pBindSessionMemoryInfos` in question is said to not have a corresponding VkMemoryRequirements structure.

Valid Usage

- VUID-vkBindVideoSessionMemoryKHR-videoSession-07195
  The memory binding of `videoSession` identified by the `memoryBindIndex` member of any element of `pBindSessionMemoryInfos` must not already be backed by a memory object

- VUID-vkBindVideoSessionMemoryKHR-memoryBindIndex-07196
  The `memoryBindIndex` member of each element of `pBindSessionMemoryInfos` must be unique within `pBindSessionMemoryInfos`

- VUID-vkBindVideoSessionMemoryKHR-pBindSessionMemoryInfos-07197
  Each element of `pBindSessionMemoryInfos` must have a corresponding VkMemoryRequirements structure

- VUID-vkBindVideoSessionMemoryKHR-pBindSessionMemoryInfos-07198
  If an element of `pBindSessionMemoryInfos` has a corresponding VkMemoryRequirements structure, then the `memory` member of that element of `pBindSessionMemoryInfos` must have been allocated using one of the memory types allowed in the `memoryTypeBits` member of the corresponding VkMemoryRequirements structure

- VUID-vkBindVideoSessionMemoryKHR-pBindSessionMemoryInfos-07199
  If an element of `pBindSessionMemoryInfos` has a corresponding VkMemoryRequirements structure, then the `memoryOffset` member of that element of `pBindSessionMemoryInfos` must be an integer multiple of the `alignment` member of the corresponding VkMemoryRequirements structure

- VUID-vkBindVideoSessionMemoryKHR-pBindSessionMemoryInfos-07200
  If an element of `pBindSessionMemoryInfos` has a corresponding VkMemoryRequirements structure, then the `memorySize` member of that element of `pBindSessionMemoryInfos` must equal the `size` member of the corresponding VkMemoryRequirements structure

Valid Usage (Implicit)

- VUID-vkBindVideoSessionMemoryKHR-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkBindVideoSessionMemoryKHR-videoSession-parameter
  `videoSession` must be a valid VkVideoSessionKHR handle

- VUID-vkBindVideoSessionMemoryKHR-pBindSessionMemoryInfos-parameter
  `pBindSessionMemoryInfos` must be a valid pointer to an array of `bindSessionMemoryInfoCount` valid VkBindVideoSessionMemoryInfoKHR structures

- VUID-vkBindVideoSessionMemoryKHR-bindSessionMemoryInfoCount-arraylength
  `bindSessionMemoryInfoCount` must be greater than `0`

- VUID-vkBindVideoSessionMemoryKHR-videoSession-parent
  `videoSession` must have been created, allocated, or retrieved from `device`

Host Synchronization

- Host access to `videoSession` must be externally synchronized

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkBindVideoSessionMemoryInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_queue
    typedef struct VkBindVideoSessionMemoryInfoKHR {
        VkStructureType    sType;
        const void*        pNext;
        uint32_t           memoryBindIndex;
        VkDeviceMemory     memory;
        VkDeviceSize       memoryOffset;
        VkDeviceSize       memorySize;
    } VkBindVideoSessionMemoryInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `memoryBindIndex` is the memory binding index to bind memory to.

- `memory` is the allocated device memory to be bound to the video session’s memory binding with index `memoryBindIndex`.

- `memoryOffset` is the start offset of the region of `memory` which is to be bound.

- `memorySize` is the size in bytes of the region of `memory`, starting from `memoryOffset` bytes, to be bound.

Valid Usage

- VUID-VkBindVideoSessionMemoryInfoKHR-memoryOffset-07201
  `memoryOffset` must be less than the size of `memory`

- VUID-VkBindVideoSessionMemoryInfoKHR-memorySize-07202
  `memorySize` must be less than or equal to the size of `memory` minus `memoryOffset`

Valid Usage (Implicit)

- VUID-VkBindVideoSessionMemoryInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_BIND_VIDEO_SESSION_MEMORY_INFO_KHR

- VUID-VkBindVideoSessionMemoryInfoKHR-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkBindVideoSessionMemoryInfoKHR-memory-parameter
  `memory` must be a valid VkDeviceMemory handle

### 49.6. Video Profile Compatibility

Resources and query pools used with a particular video session must be compatible with the video profile the video session was created with.

A VkBuffer is compatible with a video profile if it was created with the VkBufferCreateInfo::`pNext` chain including a VkVideoProfileListInfoKHR structure with its `pProfiles` member containing an element matching the VkVideoProfileInfoKHR structure chain describing the video profile, and VkBufferCreateInfo::`usage` including at least one bit specific to video coding usage.

- VK_BUFFER_USAGE_VIDEO_DECODE_SRC_BIT_KHR

- VK_BUFFER_USAGE_VIDEO_DECODE_DST_BIT_KHR

- VK_BUFFER_USAGE_VIDEO_ENCODE_SRC_BIT_KHR

- VK_BUFFER_USAGE_VIDEO_ENCODE_DST_BIT_KHR

A VkBuffer is also compatible with a video profile if it was created with VkBufferCreateInfo::`flags` including VK_BUFFER_CREATE_VIDEO_PROFILE_INDEPENDENT_BIT_KHR.

A VkImage is compatible with a video profile if it was created with the VkImageCreateInfo::`pNext` chain including a VkVideoProfileListInfoKHR structure with its `pProfiles` member containing an element matching the VkVideoProfileInfoKHR structure chain describing the video profile, and VkImageCreateInfo::`usage` including at least one bit specific to video coding usage.

- VK_IMAGE_USAGE_VIDEO_DECODE_SRC_BIT_KHR

- VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR

- VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR

- VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR

- VK_IMAGE_USAGE_VIDEO_ENCODE_DST_BIT_KHR

- VK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR

- VK_IMAGE_USAGE_VIDEO_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR

- VK_IMAGE_USAGE_VIDEO_ENCODE_EMPHASIS_MAP_BIT_KHR

A VkImage is also compatible with a video profile if all of the following conditions are true for the VkImageCreateInfo structure the image was created with:

- VkImageCreateInfo::`flags` included VK_IMAGE_CREATE_VIDEO_PROFILE_INDEPENDENT_BIT_KHR.

- The list of VkVideoFormatPropertiesKHR structures, obtained by calling vkGetPhysicalDeviceVideoFormatPropertiesKHR with VkPhysicalDeviceVideoFormatInfoKHR::`imageUsage` equal to the VkImageCreateInfo::`usage` the image was created with and the VkPhysicalDeviceVideoFormatInfoKHR::`pNext` chain including a VkVideoProfileListInfoKHR structure with its `pProfiles` member containing a single array element specifying the VkVideoProfileInfoKHR structure chain describing the video profile in question, contains an element for which all of the following conditions are true with respect to the VkImageCreateInfo structure the image was created with:

  - VkImageCreateInfo::`format` equals VkVideoFormatPropertiesKHR::`format`.

  - VkImageCreateInfo::`flags` only contains VK_IMAGE_CREATE_VIDEO_PROFILE_INDEPENDENT_BIT_KHR and/or bits also set in VkVideoFormatPropertiesKHR::`imageCreateFlags`.

    Note | Specifying VK_IMAGE_CREATE_VIDEO_PROFILE_INDEPENDENT_BIT_KHR when creating decode output pictures or encode input pictures is always supported when the videoMaintenance1 feature is enabled, regardless of the supported VkImageCreateFlags reported in VkVideoFormatPropertiesKHR::`imageCreateFlags`. Accordingly, implementations should not report VK_IMAGE_CREATE_VIDEO_PROFILE_INDEPENDENT_BIT_KHR in VkVideoFormatPropertiesKHR::`imageCreateFlags` for any video format.

  - VkImageCreateInfo::`imageType` equals VkVideoFormatPropertiesKHR::`imageType`.

  - VkImageCreateInfo::`tiling` equals VkVideoFormatPropertiesKHR::`imageTiling`.

  - VkImageCreateInfo::`usage` only contains bits also set in VkVideoFormatPropertiesKHR::`imageUsageFlags`, or VkImageCreateInfo::`flags` includes VK_IMAGE_CREATE_EXTENDED_USAGE_BIT.

Note | While some of these rules allow creating buffer or image resources that may be compatible with any video profile, applications should still prefer to include the specific video profiles the buffer or image resource is expected to be used with (through a VkVideoProfileListInfoKHR structure included in the `pNext` chain of the corresponding create info structure) whenever the information about the complete set of video profiles is available at resource creation time, to enable the implementation to optimize the created resource for the specific use case. In the absence of that information, the implementation may have to make conservative decisions about the memory requirements or representation of the resource.

A VkImageView is compatible with a video profile if the VkImage it was created from is also compatible with that video profile.

A VkQueryPool is compatible with a video profile if it was created with the VkQueryPoolCreateInfo::`pNext` chain including a VkVideoProfileInfoKHR structure chain describing the same video profile, and VkQueryPoolCreateInfo::`queryType` having one of the following values:

- VK_QUERY_TYPE_RESULT_STATUS_ONLY_KHR

- VK_QUERY_TYPE_VIDEO_ENCODE_FEEDBACK_KHR

### 49.7. Video Session Parameters

Video session parameters objects can store preprocessed codec-specific parameters used with a compatible video session, and enable reducing the number of parameters needed to be provided and processed by the implementation while recording video coding operations into command buffers.

Parameters stored in such objects are immutable to facilitate the concurrent use of the stored parameters in multiple threads. At the same time, new parameters can be added to existing objects using the vkUpdateVideoSessionParametersKHR command.

In order to support concurrent use of the stored immutable parameters while also allowing the video session parameters object to be extended with new parameters, each video session parameters object maintains an update sequence counter that is set to `0` at object creation time and must be incremented by each subsequent update operation.

Certain video sequences that adhere to particular video compression standards permit updating previously supplied parameters. If a parameter update is necessary, the application has the following options:

- Cache the set of parameters on the application side and create a new video session parameters object adding all the parameters with appropriate changes, as necessary; or

- Create a new video session parameters object providing only the updated parameters and the previously used object as the template, which ensures that parameters not specified at creation time will be copied unmodified from the template object.

The actual types of parameters that can be stored and the capacity for individual parameter types, and the methods of initializing, updating, and referring to individual parameters are specific to the video codec operation the video session parameters object was created with.

- For VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR these are defined in the H.264 Decode Parameter Sets section.

- For VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR these are defined in the H.265 Decode Parameter Sets section.

- For VK_VIDEO_CODEC_OPERATION_DECODE_VP9_BIT_KHR there are no defined parameter sets and therefore do not use video session parameters objects.

- For VK_VIDEO_CODEC_OPERATION_DECODE_AV1_BIT_KHR these are defined in the AV1 Decode Parameter Sets section.

- For VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR these are defined in the H.264 Encode Parameter Sets section.

- For VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR these are defined in the H.265 Encode Parameter Sets section.

- For VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR these are defined in the AV1 Encode Parameter Sets section.

Video session parameters objects created with an encode operation are further specialized based on the video encode quality level the video session parameters are used with, as implementations may apply different sets of parameter overrides depending on the used quality level. This enables implementations to store the potentially optimized set of parameters in these objects, further limiting the necessary processing required while recording video encode operations into command buffers.

Video session parameters are represented by `VkVideoSessionParametersKHR` handles:

    // Provided by VK_KHR_video_queue
    VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkVideoSessionParametersKHR)

#### 49.7.1. Creating Video Session Parameters

To create a video session parameters object, call:

    // Provided by VK_KHR_video_queue
    VkResult vkCreateVideoSessionParametersKHR(
        VkDevice                                    device,
        const VkVideoSessionParametersCreateInfoKHR* pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkVideoSessionParametersKHR*                pVideoSessionParameters);

- `device` is the logical device that creates the video session parameters object.

- `pCreateInfo` is a pointer to VkVideoSessionParametersCreateInfoKHR structure containing parameters to be used to create the video session parameters object.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

- `pVideoSessionParameters` is a pointer to a VkVideoSessionParametersKHR handle in which the resulting video session parameters object is returned.

The resulting video session parameters object is said to be created with the video codec operation `pCreateInfo->videoSession` was created with.

Video session parameters objects created with an encode operation are always created with respect to a video encode quality level. By default, the created video session parameters objects are created with quality level zero, unless otherwise specified by including a VkVideoEncodeQualityLevelInfoKHR structure in the `pCreateInfo->pNext` chain, in which case the video session parameters object is created with the quality level specified in VkVideoEncodeQualityLevelInfoKHR::`qualityLevel`.

If `pCreateInfo->videoSessionParametersTemplate` is not `VK_NULL_HANDLE`, then it will be used as a template for constructing the new video session parameters object. This happens by first adding any parameters according to the additional creation parameters provided in the `pCreateInfo->pNext` chain, followed by adding any parameters from the template object that have a key that does not match the key of any of the already added parameters.

For video session parameters objects created with an encode operation, the template object specified in `pCreateInfo->videoSessionParametersTemplate` must have been created with the same video encode quality level as the newly created object.

Note | This means that codec-specific parameters stored in video session parameters objects can only be reused across different video encode quality levels by re-specifying them, as previously created video session parameters against other quality levels cannot be used as template because the original codec-specific parameters (before the implementation may have applied parameter overrides) may no longer be available in them for the purposes of constructing the derived object.

Video session parameters objects are only compatible with quantization maps if they are created with `pCreateInfo->flags` including VK_VIDEO_SESSION_PARAMETERS_CREATE_QUANTIZATION_MAP_COMPATIBLE_BIT_KHR.

Video session parameters objects created with VK_VIDEO_SESSION_PARAMETERS_CREATE_QUANTIZATION_MAP_COMPATIBLE_BIT_KHR against a video session object that was created with VK_VIDEO_SESSION_CREATE_ALLOW_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR or VK_VIDEO_SESSION_CREATE_ALLOW_ENCODE_EMPHASIS_MAP_BIT_KHR are created with a specific compatible quantization map texel size specified in the `quantizationMapTexelSize` member of the VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR structure included in the `pNext` chain of `pCreateInfo`.

Note | This means that the quantization map texel size that such a video session parameters object is compatible with is fixed for the lifetime of the object. Applications have to create separate video session parameters objects to use different quantization map texel sizes with a single video session object. This is necessary because the used quantization map texel size may affect the parameter overrides the implementation has to perform and thus the final values of the used codec-specific parameters.

For video session parameters objects created with VK_VIDEO_SESSION_PARAMETERS_CREATE_QUANTIZATION_MAP_COMPATIBLE_BIT_KHR, the template object specified in `pCreateInfo->videoSessionParametersTemplate` must also have been created with VK_VIDEO_SESSION_PARAMETERS_CREATE_QUANTIZATION_MAP_COMPATIBLE_BIT_KHR and the same compatible quantization map texel size specified in VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR::`quantizationMapTexelSize`.

Note | This means that codec-specific parameters stored in video session parameters objects can only be reused with different quantization map texel sizes by re-specifying them, as previously created video session parameters against other quantization map texel sizes cannot be used as template because the original codec-specific parameters (before the implementation may have applied parameter overrides) may no longer be available in them for the purposes of constructing the derived object.

For video session parameters objects created without VK_VIDEO_SESSION_PARAMETERS_CREATE_QUANTIZATION_MAP_COMPATIBLE_BIT_KHR, the template object specified in `pCreateInfo->videoSessionParametersTemplate` must also have been created without VK_VIDEO_SESSION_PARAMETERS_CREATE_QUANTIZATION_MAP_COMPATIBLE_BIT_KHR.

If `pCreateInfo->videoSession` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR, then the created video session parameters object will initially contain the following sets of parameter entries:

- `StdVideoH264SequenceParameterSet` structures representing H.264 SPS entries, as follows:

  - If the `pParametersAddInfo` member of the VkVideoDecodeH264SessionParametersCreateInfoKHR structure provided in the `pCreateInfo->pNext` chain is not `NULL`, then the set of `StdVideoH264SequenceParameterSet` entries specified in `pParametersAddInfo->pStdSPSs` are added first;

  - If `pCreateInfo->videoSessionParametersTemplate` is not `VK_NULL_HANDLE`, then each `StdVideoH264SequenceParameterSet` entry stored in it is copied to the created video session parameters object if the created object does not already contain such an entry with the same `seq_parameter_set_id`.

- `StdVideoH264PictureParameterSet` structures representing H.264 PPS entries, as follows:

  - If the `pParametersAddInfo` member of the VkVideoDecodeH264SessionParametersCreateInfoKHR structure provided in the `pCreateInfo->pNext` chain is not `NULL`, then the set of `StdVideoH264PictureParameterSet` entries specified in `pParametersAddInfo->pStdPPSs` are added first;

  - If `pCreateInfo->videoSessionParametersTemplate` is not `VK_NULL_HANDLE`, then each `StdVideoH264PictureParameterSet` entry stored in it is copied to the created video session parameters object if the created object does not already contain such an entry with the same `seq_parameter_set_id` and `pic_parameter_set_id`.

If `pCreateInfo->videoSession` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR, then the created video session parameters object will initially contain the following sets of parameter entries:

- `StdVideoH265VideoParameterSet` structures representing H.265 VPS entries, as follows:

  - If the `pParametersAddInfo` member of the VkVideoDecodeH265SessionParametersCreateInfoKHR structure provided in the `pCreateInfo->pNext` chain is not `NULL`, then the set of `StdVideoH265VideoParameterSet` entries specified in `pParametersAddInfo->pStdVPSs` are added first;

  - If `pCreateInfo->videoSessionParametersTemplate` is not `VK_NULL_HANDLE`, then each `StdVideoH265VideoParameterSet` entry stored in it is copied to the created video session parameters object if the created object does not already contain such an entry with the same `vps_video_parameter_set_id`.

- `StdVideoH265SequenceParameterSet` structures representing H.265 SPS entries, as follows:

  - If the `pParametersAddInfo` member of the VkVideoDecodeH265SessionParametersCreateInfoKHR structure provided in the `pCreateInfo->pNext` chain is not `NULL`, then the set of `StdVideoH265SequenceParameterSet` entries specified in `pParametersAddInfo->pStdSPSs` are added first;

  - If `pCreateInfo->videoSessionParametersTemplate` is not `VK_NULL_HANDLE`, then each `StdVideoH265SequenceParameterSet` entry stored in it is copied to the created video session parameters object if the created object does not already contain such an entry with the same `sps_video_parameter_set_id` and `sps_seq_parameter_set_id`.

- `StdVideoH265PictureParameterSet` structures representing H.265 PPS entries, as follows:

  - If the `pParametersAddInfo` member of the VkVideoDecodeH265SessionParametersCreateInfoKHR structure provided in the `pCreateInfo->pNext` chain is not `NULL`, then the set of `StdVideoH265PictureParameterSet` entries specified in `pParametersAddInfo->pStdPPSs` are added first;

  - If `pCreateInfo->videoSessionParametersTemplate` is not `VK_NULL_HANDLE`, then each `StdVideoH265PictureParameterSet` entry stored in it is copied to the created video session parameters object if the created object does not already contain such an entry with the same `sps_video_parameter_set_id`, `pps_seq_parameter_set_id`, and `pps_pic_parameter_set_id`.

If `pCreateInfo->videoSession` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_AV1_BIT_KHR, then the created video session parameters object will contain a single AV1 sequence header represented by a `StdVideoAV1SequenceHeader` structure specified through the `pStdSequenceHeader` member of the VkVideoDecodeAV1SessionParametersCreateInfoKHR structure provided in the `pCreateInfo->pNext` chain. As such video session parameters objects can only contain a single AV1 sequence header, it is not possible to use a previously created object as a template or subsequently update the created video session parameters object.

If `pCreateInfo->videoSession` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR, then the created video session parameters object will initially contain the following sets of parameter entries:

- `StdVideoH264SequenceParameterSet` structures representing H.264 SPS entries, as follows:

  - If the `pParametersAddInfo` member of the VkVideoEncodeH264SessionParametersCreateInfoKHR structure provided in the `pCreateInfo->pNext` chain is not `NULL`, then the set of `StdVideoH264SequenceParameterSet` entries specified in `pParametersAddInfo->pStdSPSs` are added first;

  - If `pCreateInfo->videoSessionParametersTemplate` is not `VK_NULL_HANDLE`, then each `StdVideoH264SequenceParameterSet` entry stored in it is copied to the created video session parameters object if the created object does not already contain such an entry with the same `seq_parameter_set_id`.

- `StdVideoH264PictureParameterSet` structures representing H.264 PPS entries, as follows:

  - If the `pParametersAddInfo` member of the VkVideoEncodeH264SessionParametersCreateInfoKHR structure provided in the `pCreateInfo->pNext` chain is not `NULL`, then the set of `StdVideoH264PictureParameterSet` entries specified in `pParametersAddInfo->pStdPPSs` are added first;

  - If `pCreateInfo->videoSessionParametersTemplate` is not `VK_NULL_HANDLE`, then each `StdVideoH264PictureParameterSet` entry stored in it is copied to the created video session parameters object if the created object does not already contain such an entry with the same `seq_parameter_set_id` and `pic_parameter_set_id`.

If `pCreateInfo->videoSession` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR, then the created video session parameters object will initially contain the following sets of parameter entries:

- `StdVideoH265VideoParameterSet` structures representing H.265 VPS entries, as follows:

  - If the `pParametersAddInfo` member of the VkVideoEncodeH265SessionParametersCreateInfoKHR structure provided in the `pCreateInfo->pNext` chain is not `NULL`, then the set of `StdVideoH265VideoParameterSet` entries specified in `pParametersAddInfo->pStdVPSs` are added first;

  - If `pCreateInfo->videoSessionParametersTemplate` is not `VK_NULL_HANDLE`, then each `StdVideoH265VideoParameterSet` entry stored in it is copied to the created video session parameters object if the created object does not already contain such an entry with the same `vps_video_parameter_set_id`.

- `StdVideoH265SequenceParameterSet` structures representing H.265 SPS entries, as follows:

  - If the `pParametersAddInfo` member of the VkVideoEncodeH265SessionParametersCreateInfoKHR structure provided in the `pCreateInfo->pNext` chain is not `NULL`, then the set of `StdVideoH265SequenceParameterSet` entries specified in `pParametersAddInfo->pStdSPSs` are added first;

  - If `pCreateInfo->videoSessionParametersTemplate` is not `VK_NULL_HANDLE`, then each `StdVideoH265SequenceParameterSet` entry stored in it is copied to the created video session parameters object if the created object does not already contain such an entry with the same `sps_video_parameter_set_id` and `sps_seq_parameter_set_id`.

- `StdVideoH265PictureParameterSet` structures representing H.265 PPS entries, as follows:

  - If the `pParametersAddInfo` member of the VkVideoEncodeH265SessionParametersCreateInfoKHR structure provided in the `pCreateInfo->pNext` chain is not `NULL`, then the set of `StdVideoH265PictureParameterSet` entries specified in `pParametersAddInfo->pStdPPSs` are added first;

  - If `pCreateInfo->videoSessionParametersTemplate` is not `VK_NULL_HANDLE`, then each `StdVideoH265PictureParameterSet` entry stored in it is copied to the created video session parameters object if the created object does not already contain such an entry with the same `sps_video_parameter_set_id`, `pps_seq_parameter_set_id`, and `pps_pic_parameter_set_id`.

If `pCreateInfo->videoSession` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR, then the created video session parameters object will contain a single AV1 sequence header specified through the members of the VkVideoEncodeAV1SessionParametersCreateInfoKHR structure provided in the `pCreateInfo->pNext` chain. As such video session parameters objects can only contain a single AV1 sequence header, it is not possible to use a previously created object as a template or subsequently update the created video session parameters object.

In case of video session parameters objects created with a video encode operation, implementations may return the VK_ERROR_INVALID_VIDEO_STD_PARAMETERS_KHR error if any of the specified Video Std parameters do not adhere to the syntactic or semantic requirements of the used video compression standard, or if values derived from parameters according to the rules defined by the used video compression standard do not adhere to the capabilities of the video compression standard or the implementation.

Note | Applications should not rely on the VK_ERROR_INVALID_VIDEO_STD_PARAMETERS_KHR error being returned by any command as a means to verify Video Std parameters, as implementations are not required to report the error in any specific set of cases.

Valid Usage (Implicit)

- VUID-vkCreateVideoSessionParametersKHR-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkCreateVideoSessionParametersKHR-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkVideoSessionParametersCreateInfoKHR structure

- VUID-vkCreateVideoSessionParametersKHR-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateVideoSessionParametersKHR-pVideoSessionParameters-parameter
  `pVideoSessionParameters` must be a valid pointer to a VkVideoSessionParametersKHR handle

- VUID-vkCreateVideoSessionParametersKHR-device-queuecount
  The device must have been created with at least `1` queue

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_INITIALIZATION_FAILED

  - VK_ERROR_INVALID_VIDEO_STD_PARAMETERS_KHR

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkVideoSessionParametersCreateInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_queue
    typedef struct VkVideoSessionParametersCreateInfoKHR {
        VkStructureType                           sType;
        const void*                               pNext;
        VkVideoSessionParametersCreateFlagsKHR    flags;
        VkVideoSessionParametersKHR               videoSessionParametersTemplate;
        VkVideoSessionKHR                         videoSession;
    } VkVideoSessionParametersCreateInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask of VkVideoSessionParametersCreateFlagBitsKHR specifying create flags.

- `videoSessionParametersTemplate` is `VK_NULL_HANDLE` or a valid handle to a VkVideoSessionParametersKHR object used as a template for constructing the new video session parameters object.

- `videoSession` is the video session object against which the video session parameters object is going to be created.

Limiting values are defined below that are referenced by the relevant valid usage statements of this structure.

- If `videoSession` was created with the codec operation VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR, then let `StdVideoH264SequenceParameterSet spsAddList[]` be the list of H.264 SPS entries to add to the created video session parameters object, defined as follows:

  - If the `pParametersAddInfo` member of the VkVideoDecodeH264SessionParametersCreateInfoKHR structure provided in the `pNext` chain is not `NULL`, then the set of `StdVideoH264SequenceParameterSet` entries specified in `pParametersAddInfo->pStdSPSs` are added to `spsAddList`;

  - If `videoSessionParametersTemplate` is not `VK_NULL_HANDLE`, then each `StdVideoH264SequenceParameterSet` entry stored in it with `seq_parameter_set_id` not matching any of the entries already in `spsAddList` is added to `spsAddList`.

- If `videoSession` was created with the codec operation VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR, then let `StdVideoH264PictureParameterSet ppsAddList[]` be the list of H.264 PPS entries to add to the created video session parameters object, defined as follows:

  - If the `pParametersAddInfo` member of the VkVideoDecodeH264SessionParametersCreateInfoKHR structure provided in the `pNext` chain is not `NULL`, then the set of `StdVideoH264PictureParameterSet` entries specified in `pParametersAddInfo->pStdPPSs` are added to `ppsAddList`;

  - If `videoSessionParametersTemplate` is not `VK_NULL_HANDLE`, then each `StdVideoH264PictureParameterSet` entry stored in it with `seq_parameter_set_id` or `pic_parameter_set_id` not matching any of the entries already in `ppsAddList` is added to `ppsAddList`.

- If `videoSession` was created with the codec operation VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR, then let `StdVideoH265VideoParameterSet vpsAddList[]` be the list of H.265 VPS entries to add to the created video session parameters object, defined as follows:

  - If the `pParametersAddInfo` member of the VkVideoDecodeH265SessionParametersCreateInfoKHR structure provided in the `pNext` chain is not `NULL`, then the set of `StdVideoH265VideoParameterSet` entries specified in `pParametersAddInfo->pStdVPSs` are added to `vpsAddList`;

  - If `videoSessionParametersTemplate` is not `VK_NULL_HANDLE`, then each `StdVideoH265VideoParameterSet` entry stored in it with `vps_video_parameter_set_id` not matching any of the entries already in `vpsAddList` is added to `vpsAddList`.

- If `videoSession` was created with the codec operation VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR, then let `StdVideoH265SequenceParameterSet spsAddList[]` be the list of H.265 SPS entries to add to the created video session parameters object, defined as follows:

  - If the `pParametersAddInfo` member of the VkVideoDecodeH265SessionParametersCreateInfoKHR structure provided in the `pNext` chain is not `NULL`, then the set of `StdVideoH265SequenceParameterSet` entries specified in `pParametersAddInfo->pStdSPSs` are added to `spsAddList`;

  - If `videoSessionParametersTemplate` is not `VK_NULL_HANDLE`, then each `StdVideoH265SequenceParameterSet` entry stored in it with `sps_video_parameter_set_id` or `sps_seq_parameter_set_id` not matching any of the entries already in `spsAddList` is added to `spsAddList`.

- If `videoSession` was created with the codec operation VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR, then let `StdVideoH265PictureParameterSet ppsAddList[]` be the list of H.265 PPS entries to add to the created video session parameters object, defined as follows:

  - If the `pParametersAddInfo` member of the VkVideoDecodeH265SessionParametersCreateInfoKHR structure provided in the `pNext` chain is not `NULL`, then the set of `StdVideoH265PictureParameterSet` entries specified in `pParametersAddInfo->pStdPPSs` are added to `ppsAddList`;

  - If `videoSessionParametersTemplate` is not `VK_NULL_HANDLE`, then each `StdVideoH265PictureParameterSet` entry stored in it with `sps_video_parameter_set_id`, `pps_seq_parameter_set_id`, or `pps_pic_parameter_set_id` not matching any of the entries already in `ppsAddList` is added to `ppsAddList`.

- If `videoSession` was created with an encode operation, then let `uint32_t qualityLevel` be the video encode quality level of the created video session parameters object, defined as follows:

  - If the `pNext` chain of this structure includes a VkVideoEncodeQualityLevelInfoKHR structure, then `qualityLevel` is equal to VkVideoEncodeQualityLevelInfoKHR::`qualityLevel`.

  - Otherwise `qualityLevel` is `0`

- If `videoSession` was created with the codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR, then let `StdVideoH264SequenceParameterSet spsAddList[]` be the list of H.264 SPS entries to add to the created video session parameters object, defined as follows:

  - If the `pParametersAddInfo` member of the VkVideoEncodeH264SessionParametersCreateInfoKHR structure provided in the `pNext` chain is not `NULL`, then the set of `StdVideoH264SequenceParameterSet` entries specified in `pParametersAddInfo->pStdSPSs` are added to `spsAddList`;

  - If `videoSessionParametersTemplate` is not `VK_NULL_HANDLE`, then each `StdVideoH264SequenceParameterSet` entry stored in it with `seq_parameter_set_id` not matching any of the entries already in `spsAddList` is added to `spsAddList`.

- If `videoSession` was created with the codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR, then let `StdVideoH264PictureParameterSet ppsAddList[]` be the list of H.264 PPS entries to add to the created video session parameters object, defined as follows:

  - If the `pParametersAddInfo` member of the VkVideoEncodeH264SessionParametersCreateInfoKHR structure provided in the `pNext` chain is not `NULL`, then the set of `StdVideoH264PictureParameterSet` entries specified in `pParametersAddInfo->pStdPPSs` are added to `ppsAddList`;

  - If `videoSessionParametersTemplate` is not `VK_NULL_HANDLE`, then each `StdVideoH264PictureParameterSet` entry stored in it with `seq_parameter_set_id` or `pic_parameter_set_id` not matching any of the entries already in `ppsAddList` is added to `ppsAddList`.

- If `videoSession` was created with the codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR, then let `StdVideoH265VideoParameterSet vpsAddList[]` be the list of H.265 VPS entries to add to the created video session parameters object, defined as follows:

  - If the `pParametersAddInfo` member of the VkVideoEncodeH265SessionParametersCreateInfoKHR structure provided in the `pNext` chain is not `NULL`, then the set of `StdVideoH265VideoParameterSet` entries specified in `pParametersAddInfo->pStdVPSs` are added to `vpsAddList`;

  - If `videoSessionParametersTemplate` is not `VK_NULL_HANDLE`, then each `StdVideoH265VideoParameterSet` entry stored in it with `vps_video_parameter_set_id` not matching any of the entries already in `vpsAddList` is added to `vpsAddList`.

- If `videoSession` was created with the codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR, then let `StdVideoH265SequenceParameterSet spsAddList[]` be the list of H.265 SPS entries to add to the created video session parameters object, defined as follows:

  - If the `pParametersAddInfo` member of the VkVideoEncodeH265SessionParametersCreateInfoKHR structure provided in the `pNext` chain is not `NULL`, then the set of `StdVideoH265SequenceParameterSet` entries specified in `pParametersAddInfo->pStdSPSs` are added to `spsAddList`;

  - If `videoSessionParametersTemplate` is not `VK_NULL_HANDLE`, then each `StdVideoH265SequenceParameterSet` entry stored in it with `sps_video_parameter_set_id` or `sps_seq_parameter_set_id` not matching any of the entries already in `spsAddList` is added to `spsAddList`.

- If `videoSession` was created with the codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR, then let `StdVideoH265PictureParameterSet ppsAddList[]` be the list of H.265 PPS entries to add to the created video session parameters object, defined as follows:

  - If the `pParametersAddInfo` member of the VkVideoEncodeH265SessionParametersCreateInfoKHR structure provided in the `pNext` chain is not `NULL`, then the set of `StdVideoH265PictureParameterSet` entries specified in `pParametersAddInfo->pStdPPSs` are added to `ppsAddList`;

  - If `videoSessionParametersTemplate` is not `VK_NULL_HANDLE`, then each `StdVideoH265PictureParameterSet` entry stored in it with `sps_video_parameter_set_id`, `pps_seq_parameter_set_id`, or `pps_pic_parameter_set_id` not matching any of the entries already in `ppsAddList` is added to `ppsAddList`.

Valid Usage

- VUID-VkVideoSessionParametersCreateInfoKHR-videoSessionParametersTemplate-04855
  If `videoSessionParametersTemplate` is not `VK_NULL_HANDLE`, it must have been created against `videoSession`

- VUID-VkVideoSessionParametersCreateInfoKHR-videoSessionParametersTemplate-08310
  If `videoSessionParametersTemplate` is not `VK_NULL_HANDLE` and `videoSession` was created with an encode operation, then `qualityLevel` must equal the video encode quality level `videoSessionParametersTemplate` was created with

- VUID-VkVideoSessionParametersCreateInfoKHR-flags-10271
  If `flags` includes VK_VIDEO_SESSION_PARAMETERS_CREATE_QUANTIZATION_MAP_COMPATIBLE_BIT_KHR, then `videoSession` must have been created with VK_VIDEO_SESSION_CREATE_ALLOW_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR or VK_VIDEO_SESSION_CREATE_ALLOW_ENCODE_EMPHASIS_MAP_BIT_KHR

- VUID-VkVideoSessionParametersCreateInfoKHR-flags-10272
  If `flags` includes VK_VIDEO_SESSION_PARAMETERS_CREATE_QUANTIZATION_MAP_COMPATIBLE_BIT_KHR, then the `pNext` chain must include a VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR structure

- VUID-VkVideoSessionParametersCreateInfoKHR-flags-10273
  If `flags` includes VK_VIDEO_SESSION_PARAMETERS_CREATE_QUANTIZATION_MAP_COMPATIBLE_BIT_KHR and `videoSession` was created with VK_VIDEO_SESSION_CREATE_ALLOW_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR, then the list of video format properties supported for the image usage flag VK_IMAGE_USAGE_VIDEO_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR must have an element for which VkVideoFormatQuantizationMapPropertiesKHR::`quantizationMapTexelSize` equals the `quantizationMapTexelSize` member of the VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR structure included in the `pNext` chain

- VUID-VkVideoSessionParametersCreateInfoKHR-flags-10274
  If `flags` includes VK_VIDEO_SESSION_PARAMETERS_CREATE_QUANTIZATION_MAP_COMPATIBLE_BIT_KHR and `videoSession` was created with VK_VIDEO_SESSION_CREATE_ALLOW_ENCODE_EMPHASIS_MAP_BIT_KHR, then the list of video format properties supported for the image usage flag VK_IMAGE_USAGE_VIDEO_ENCODE_EMPHASIS_MAP_BIT_KHR must have an element for which VkVideoFormatQuantizationMapPropertiesKHR::`quantizationMapTexelSize` equals the `quantizationMapTexelSize` member of the VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR structure included in the `pNext` chain

- VUID-VkVideoSessionParametersCreateInfoKHR-videoSessionParametersTemplate-10275
  If `videoSessionParametersTemplate` is not `VK_NULL_HANDLE` and `flags` includes VK_VIDEO_SESSION_PARAMETERS_CREATE_QUANTIZATION_MAP_COMPATIBLE_BIT_KHR, then `videoSessionParametersTemplate` must have been created with VK_VIDEO_SESSION_PARAMETERS_CREATE_QUANTIZATION_MAP_COMPATIBLE_BIT_KHR

- VUID-VkVideoSessionParametersCreateInfoKHR-videoSessionParametersTemplate-10276
  If `videoSessionParametersTemplate` is not `VK_NULL_HANDLE` and `flags` includes VK_VIDEO_SESSION_PARAMETERS_CREATE_QUANTIZATION_MAP_COMPATIBLE_BIT_KHR, then `videoSessionParametersTemplate` must have been created with the same quantization map texel size as the one specified in the `quantizationMapTexelSize` member of the VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR structure included in the `pNext` chain

- VUID-VkVideoSessionParametersCreateInfoKHR-videoSessionParametersTemplate-10277
  If `videoSessionParametersTemplate` is not `VK_NULL_HANDLE` and `flags` does not include VK_VIDEO_SESSION_PARAMETERS_CREATE_QUANTIZATION_MAP_COMPATIBLE_BIT_KHR, then `videoSessionParametersTemplate` must have been created without VK_VIDEO_SESSION_PARAMETERS_CREATE_QUANTIZATION_MAP_COMPATIBLE_BIT_KHR

- VUID-VkVideoSessionParametersCreateInfoKHR-videoSession-07203
  If `videoSession` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR, then the `pNext` chain must include a VkVideoDecodeH264SessionParametersCreateInfoKHR structure

- VUID-VkVideoSessionParametersCreateInfoKHR-videoSession-07204
  If `videoSession` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR, then the number of elements of `spsAddList` must be less than or equal to the `maxStdSPSCount` specified in the VkVideoDecodeH264SessionParametersCreateInfoKHR structure included in the `pNext` chain

- VUID-VkVideoSessionParametersCreateInfoKHR-videoSession-07205
  If `videoSession` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR, then the number of elements of `ppsAddList` must be less than or equal to the `maxStdPPSCount` specified in the VkVideoDecodeH264SessionParametersCreateInfoKHR structure included in the `pNext` chain

- VUID-VkVideoSessionParametersCreateInfoKHR-videoSession-07206
  If `videoSession` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR, then the `pNext` chain must include a VkVideoDecodeH265SessionParametersCreateInfoKHR structure

- VUID-VkVideoSessionParametersCreateInfoKHR-videoSession-07207
  If `videoSession` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR, then the number of elements of `vpsAddList` must be less than or equal to the `maxStdVPSCount` specified in the VkVideoDecodeH265SessionParametersCreateInfoKHR structure included in the `pNext` chain

- VUID-VkVideoSessionParametersCreateInfoKHR-videoSession-07208
  If `videoSession` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR, then the number of elements of `spsAddList` must be less than or equal to the `maxStdSPSCount` specified in the VkVideoDecodeH265SessionParametersCreateInfoKHR structure included in the `pNext` chain

- VUID-VkVideoSessionParametersCreateInfoKHR-videoSession-07209
  If `videoSession` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR, then the number of elements of `ppsAddList` must be less than or equal to the `maxStdPPSCount` specified in the VkVideoDecodeH265SessionParametersCreateInfoKHR structure included in the `pNext` chain

- VUID-VkVideoSessionParametersCreateInfoKHR-videoSession-10794
  `videoSession` must not have been created with the codec operation VK_VIDEO_CODEC_OPERATION_DECODE_VP9_BIT_KHR

- VUID-VkVideoSessionParametersCreateInfoKHR-videoSession-09258
  If `videoSession` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_AV1_BIT_KHR, then `videoSessionParametersTemplate` must be `VK_NULL_HANDLE`

- VUID-VkVideoSessionParametersCreateInfoKHR-videoSession-09259
  If `videoSession` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_AV1_BIT_KHR, then the `pNext` chain must include a VkVideoDecodeAV1SessionParametersCreateInfoKHR structure

- VUID-VkVideoSessionParametersCreateInfoKHR-videoSession-07210
  If `videoSession` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR, then the `pNext` chain must include a VkVideoEncodeH264SessionParametersCreateInfoKHR structure

- VUID-VkVideoSessionParametersCreateInfoKHR-videoSession-04839
  If `videoSession` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR, then the number of elements of `spsAddList` must be less than or equal to the `maxStdSPSCount` specified in the VkVideoEncodeH264SessionParametersCreateInfoKHR structure included in the `pNext` chain

- VUID-VkVideoSessionParametersCreateInfoKHR-videoSession-04840
  If `videoSession` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR, then the number of elements of `ppsAddList` must be less than or equal to the `maxStdPPSCount` specified in the VkVideoEncodeH264SessionParametersCreateInfoKHR structure included in the `pNext` chain

- VUID-VkVideoSessionParametersCreateInfoKHR-videoSession-07211
  If `videoSession` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR, then the `pNext` chain must include a VkVideoEncodeH265SessionParametersCreateInfoKHR structure

- VUID-VkVideoSessionParametersCreateInfoKHR-videoSession-04841
  If `videoSession` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR, then the number of elements of `vpsAddList` must be less than or equal to the `maxStdVPSCount` specified in the VkVideoEncodeH265SessionParametersCreateInfoKHR structure included in the `pNext` chain

- VUID-VkVideoSessionParametersCreateInfoKHR-videoSession-04842
  If `videoSession` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR, then the number of elements of `spsAddList` must be less than or equal to the `maxStdSPSCount` specified in the VkVideoEncodeH265SessionParametersCreateInfoKHR structure included in the `pNext` chain

- VUID-VkVideoSessionParametersCreateInfoKHR-videoSession-04843
  If `videoSession` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR, then the number of elements of `ppsAddList` must be less than or equal to the `maxStdPPSCount` specified in the VkVideoEncodeH265SessionParametersCreateInfoKHR structure included in the `pNext` chain

- VUID-VkVideoSessionParametersCreateInfoKHR-videoSession-08319
  If `videoSession` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR, then `num_tile_columns_minus1` must be less than VkVideoEncodeH265CapabilitiesKHR::`maxTiles.width`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile `videoSession` was created with, for each element of `ppsAddList`

- VUID-VkVideoSessionParametersCreateInfoKHR-videoSession-08320
  If `videoSession` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR, then `num_tile_rows_minus1` must be less than VkVideoEncodeH265CapabilitiesKHR::`maxTiles.height`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile `videoSession` was created with, for each element of `ppsAddList`

- VUID-VkVideoSessionParametersCreateInfoKHR-videoSession-10278
  If `videoSession` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR, then `videoSessionParametersTemplate` must be `VK_NULL_HANDLE`

- VUID-VkVideoSessionParametersCreateInfoKHR-videoSession-10279
  If `videoSession` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR, then the `pNext` chain must include a VkVideoEncodeAV1SessionParametersCreateInfoKHR structure

- VUID-VkVideoSessionParametersCreateInfoKHR-videoSession-10280
  If `videoSession` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR, then the `stdOperatingPointCount` member of the VkVideoEncodeAV1SessionParametersCreateInfoKHR structure included in the `pNext` chain must be less than or equal to VkVideoEncodeAV1CapabilitiesKHR::`maxOperatingPoints`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile `videoSession` was created with

Valid Usage (Implicit)

- VUID-VkVideoSessionParametersCreateInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_SESSION_PARAMETERS_CREATE_INFO_KHR

- VUID-VkVideoSessionParametersCreateInfoKHR-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkVideoDecodeAV1SessionParametersCreateInfoKHR, VkVideoDecodeH264SessionParametersCreateInfoKHR, VkVideoDecodeH265SessionParametersCreateInfoKHR, VkVideoEncodeAV1SessionParametersCreateInfoKHR, VkVideoEncodeH264SessionParametersCreateInfoKHR, VkVideoEncodeH265SessionParametersCreateInfoKHR, VkVideoEncodeQualityLevelInfoKHR, or VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR

- VUID-VkVideoSessionParametersCreateInfoKHR-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkVideoSessionParametersCreateInfoKHR-flags-parameter
  `flags` must be a valid combination of VkVideoSessionParametersCreateFlagBitsKHR values

- VUID-VkVideoSessionParametersCreateInfoKHR-videoSessionParametersTemplate-parameter
  If `videoSessionParametersTemplate` is not VK_NULL_HANDLE, `videoSessionParametersTemplate` must be a valid VkVideoSessionParametersKHR handle

- VUID-VkVideoSessionParametersCreateInfoKHR-videoSession-parameter
  `videoSession` must be a valid VkVideoSessionKHR handle

- VUID-VkVideoSessionParametersCreateInfoKHR-commonparent
  Both of `videoSession`, and `videoSessionParametersTemplate` that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevice

Bits which can be set in VkVideoSessionParametersCreateInfoKHR::`flags` are:

    // Provided by VK_KHR_video_encode_quantization_map
    typedef enum VkVideoSessionParametersCreateFlagBitsKHR {
      // Provided by VK_KHR_video_encode_quantization_map
        VK_VIDEO_SESSION_PARAMETERS_CREATE_QUANTIZATION_MAP_COMPATIBLE_BIT_KHR = 0x00000001,
    } VkVideoSessionParametersCreateFlagBitsKHR;

- VK_VIDEO_SESSION_PARAMETERS_CREATE_QUANTIZATION_MAP_COMPATIBLE_BIT_KHR specifies that the created video session parameters object can be used with quantization maps.

    // Provided by VK_KHR_video_queue
    typedef VkFlags VkVideoSessionParametersCreateFlagsKHR;

`VkVideoSessionParametersCreateFlagsKHR` is a bitmask type for setting a mask of zero or more VkVideoSessionParametersCreateFlagBitsKHR.

The `VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_encode_quantization_map
    typedef struct VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR {
        VkStructureType    sType;
        const void*        pNext;
        VkExtent2D         quantizationMapTexelSize;
    } VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `quantizationMapTexelSize` specifies the quantization map texel size a video session parameters object created with VK_VIDEO_SESSION_PARAMETERS_CREATE_QUANTIZATION_MAP_COMPATIBLE_BIT_KHR is compatible with.

Valid Usage (Implicit)

- VUID-VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_ENCODE_QUANTIZATION_MAP_SESSION_PARAMETERS_CREATE_INFO_KHR

Structure Chaining

Extends the structure

  - VkVideoSessionParametersCreateInfoKHR

#### 49.7.2. Destroying Video Session Parameters

To destroy a video session parameters object, call:

    // Provided by VK_KHR_video_queue
    void vkDestroyVideoSessionParametersKHR(
        VkDevice                                    device,
        VkVideoSessionParametersKHR                 videoSessionParameters,
        const VkAllocationCallbacks*                pAllocator);

- `device` is the logical device that destroys the video session parameters object.

- `videoSessionParameters` is the video session parameters object to destroy.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

Valid Usage

- VUID-vkDestroyVideoSessionParametersKHR-videoSessionParameters-07212
  All submitted commands that refer to `videoSessionParameters` must have completed execution

- VUID-vkDestroyVideoSessionParametersKHR-videoSessionParameters-07213
  If `VkAllocationCallbacks` were provided when `videoSessionParameters` was created, a compatible set of callbacks must be provided here

- VUID-vkDestroyVideoSessionParametersKHR-videoSessionParameters-07214
  If no `VkAllocationCallbacks` were provided when `videoSessionParameters` was created, `pAllocator` must be `NULL`

Valid Usage (Implicit)

- VUID-vkDestroyVideoSessionParametersKHR-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkDestroyVideoSessionParametersKHR-videoSessionParameters-parameter
  If `videoSessionParameters` is not VK_NULL_HANDLE, `videoSessionParameters` must be a valid VkVideoSessionParametersKHR handle

- VUID-vkDestroyVideoSessionParametersKHR-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkDestroyVideoSessionParametersKHR-videoSessionParameters-parent
  If `videoSessionParameters` is a valid handle, it must have been created, allocated, or retrieved from `device`

Host Synchronization

- Host access to `videoSessionParameters` must be externally synchronized

#### 49.7.3. Updating Video Session Parameters

To update video session parameters object with new parameters, call:

    // Provided by VK_KHR_video_queue
    VkResult vkUpdateVideoSessionParametersKHR(
        VkDevice                                    device,
        VkVideoSessionParametersKHR                 videoSessionParameters,
        const VkVideoSessionParametersUpdateInfoKHR* pUpdateInfo);

- `device` is the logical device that updates the video session parameters.

- `videoSessionParameters` is the video session parameters object to update.

- `pUpdateInfo` is a pointer to a VkVideoSessionParametersUpdateInfoKHR structure specifying the parameter update information.

After a successful call to this command, the update sequence counter of `videoSessionParameters` is changed to the value specified in `pUpdateInfo->updateSequenceCount`.

Note | As each update issued to a video session parameters object needs to specify the next available update sequence count value, concurrent updates of the same video session parameters object are inherently disallowed. However, recording video coding operations to command buffers referring to parameters previously added to the video session parameters object is allowed, even if there is a concurrent update in progress adding some new entries to the object.

If `videoSessionParameters` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR and the `pUpdateInfo->pNext` chain includes a VkVideoDecodeH264SessionParametersAddInfoKHR structure, then this command adds the following parameter entries to `videoSessionParameters`:

- The H.264 SPS entries specified in VkVideoDecodeH264SessionParametersAddInfoKHR::`pStdSPSs`.

- The H.264 PPS entries specified in VkVideoDecodeH264SessionParametersAddInfoKHR::`pStdPPSs`.

If `videoSessionParameters` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR and the `pUpdateInfo->pNext` chain includes a VkVideoDecodeH265SessionParametersAddInfoKHR structure, then this command adds the following parameter entries to `videoSessionParameters`:

- The H.265 VPS entries specified in VkVideoDecodeH265SessionParametersAddInfoKHR::`pStdVPSs`.

- The H.265 SPS entries specified in VkVideoDecodeH265SessionParametersAddInfoKHR::`pStdSPSs`.

- The H.265 PPS entries specified in VkVideoDecodeH265SessionParametersAddInfoKHR::`pStdPPSs`.

If `videoSessionParameters` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR and the `pUpdateInfo->pNext` chain includes a VkVideoEncodeH264SessionParametersAddInfoKHR structure, then this command adds the following parameter entries to `videoSessionParameters`:

- The H.264 SPS entries specified in VkVideoEncodeH264SessionParametersAddInfoKHR::`pStdSPSs`.

- The H.264 PPS entries specified in VkVideoEncodeH264SessionParametersAddInfoKHR::`pStdPPSs`.

If `videoSessionParameters` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR and the `pUpdateInfo->pNext` chain includes a VkVideoEncodeH265SessionParametersAddInfoKHR structure, then this command adds the following parameter entries to `videoSessionParameters`:

- The H.265 VPS entries specified in VkVideoEncodeH265SessionParametersAddInfoKHR::`pStdVPSs`.

- The H.265 SPS entries specified in VkVideoEncodeH265SessionParametersAddInfoKHR::`pStdSPSs`.

- The H.265 PPS entries specified in VkVideoEncodeH265SessionParametersAddInfoKHR::`pStdPPSs`.

In case of video session parameters objects created with a video encode operation, implementations may return the VK_ERROR_INVALID_VIDEO_STD_PARAMETERS_KHR error if any of the specified Video Std parameters do not adhere to the syntactic or semantic requirements of the used video compression standard, or if values derived from parameters according to the rules defined by the used video compression standard do not adhere to the capabilities of the video compression standard or the implementation.

Note | Applications should not rely on the VK_ERROR_INVALID_VIDEO_STD_PARAMETERS_KHR error being returned by any command as a means to verify Video Std parameters, as implementations are not required to report the error in any specific set of cases.

Valid Usage

- VUID-vkUpdateVideoSessionParametersKHR-pUpdateInfo-07215
  `pUpdateInfo->updateSequenceCount` must equal the current update sequence counter of `videoSessionParameters` plus one

- VUID-vkUpdateVideoSessionParametersKHR-videoSessionParameters-07216
  If `videoSessionParameters` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR and the `pNext` chain of `pUpdateInfo` includes a VkVideoDecodeH264SessionParametersAddInfoKHR structure, then `videoSessionParameters` must not already contain a `StdVideoH264SequenceParameterSet` entry with `seq_parameter_set_id` matching any of the elements of VkVideoDecodeH264SessionParametersAddInfoKHR::`pStdSPSs`

- VUID-vkUpdateVideoSessionParametersKHR-videoSessionParameters-07217
  If `videoSessionParameters` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR, then the number of `StdVideoH264SequenceParameterSet` entries already stored in it plus the value of the `stdSPSCount` member of the VkVideoDecodeH264SessionParametersAddInfoKHR structure included in the `pUpdateInfo->pNext` chain must be less than or equal to the VkVideoDecodeH264SessionParametersCreateInfoKHR::`maxStdSPSCount` `videoSessionParameters` was created with

- VUID-vkUpdateVideoSessionParametersKHR-videoSessionParameters-07218
  If `videoSessionParameters` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR and the `pNext` chain of `pUpdateInfo` includes a VkVideoDecodeH264SessionParametersAddInfoKHR structure, then `videoSessionParameters` must not already contain a `StdVideoH264PictureParameterSet` entry with both `seq_parameter_set_id` and `pic_parameter_set_id` matching any of the elements of VkVideoDecodeH264SessionParametersAddInfoKHR::`pStdPPSs`

- VUID-vkUpdateVideoSessionParametersKHR-videoSessionParameters-07219
  If `videoSessionParameters` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR, then the number of `StdVideoH264PictureParameterSet` entries already stored in it plus the value of the `stdPPSCount` member of the VkVideoDecodeH264SessionParametersAddInfoKHR structure included in the `pUpdateInfo->pNext` chain must be less than or equal to the VkVideoDecodeH264SessionParametersCreateInfoKHR::`maxStdPPSCount` `videoSessionParameters` was created with

- VUID-vkUpdateVideoSessionParametersKHR-videoSessionParameters-07220
  If `videoSessionParameters` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR and the `pNext` chain of `pUpdateInfo` includes a VkVideoDecodeH265SessionParametersAddInfoKHR structure, then `videoSessionParameters` must not already contain a `StdVideoH265VideoParameterSet` entry with `vps_video_parameter_set_id` matching any of the elements of VkVideoDecodeH265SessionParametersAddInfoKHR::`pStdVPSs`

- VUID-vkUpdateVideoSessionParametersKHR-videoSessionParameters-07221
  If `videoSessionParameters` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR, then the number of `StdVideoH265VideoParameterSet` entries already stored in it plus the value of the `stdVPSCount` member of the VkVideoDecodeH265SessionParametersAddInfoKHR structure included in the `pUpdateInfo->pNext` chain must be less than or equal to the VkVideoDecodeH265SessionParametersCreateInfoKHR::`maxStdVPSCount` `videoSessionParameters` was created with

- VUID-vkUpdateVideoSessionParametersKHR-videoSessionParameters-07222
  If `videoSessionParameters` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR and the `pNext` chain of `pUpdateInfo` includes a VkVideoDecodeH265SessionParametersAddInfoKHR structure, then `videoSessionParameters` must not already contain a `StdVideoH265SequenceParameterSet` entry with both `sps_video_parameter_set_id` and `sps_seq_parameter_set_id` matching any of the elements of VkVideoDecodeH265SessionParametersAddInfoKHR::`pStdSPSs`

- VUID-vkUpdateVideoSessionParametersKHR-videoSessionParameters-07223
  If `videoSessionParameters` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR, then the number of `StdVideoH265SequenceParameterSet` entries already stored in it plus the value of the `stdSPSCount` member of the VkVideoDecodeH265SessionParametersAddInfoKHR structure included in the `pUpdateInfo->pNext` chain must be less than or equal to the VkVideoDecodeH265SessionParametersCreateInfoKHR::`maxStdSPSCount` `videoSessionParameters` was created with

- VUID-vkUpdateVideoSessionParametersKHR-videoSessionParameters-07224
  If `videoSessionParameters` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR and the `pNext` chain of `pUpdateInfo` includes a VkVideoDecodeH265SessionParametersAddInfoKHR structure, then `videoSessionParameters` must not already contain a `StdVideoH265PictureParameterSet` entry with `sps_video_parameter_set_id`, `pps_seq_parameter_set_id`, and `pps_pic_parameter_set_id` all matching any of the elements of VkVideoDecodeH265SessionParametersAddInfoKHR::`pStdPPSs`

- VUID-vkUpdateVideoSessionParametersKHR-videoSessionParameters-07225
  If `videoSessionParameters` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR, then the number of `StdVideoH265PictureParameterSet` entries already stored in it plus the value of the `stdPPSCount` member of the VkVideoDecodeH265SessionParametersAddInfoKHR structure included in the `pUpdateInfo->pNext` chain must be less than or equal to the VkVideoDecodeH265SessionParametersCreateInfoKHR::`maxStdPPSCount` `videoSessionParameters` was created with

- VUID-vkUpdateVideoSessionParametersKHR-videoSessionParameters-09260
  `videoSessionParameters` must not have been created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_AV1_BIT_KHR

- VUID-vkUpdateVideoSessionParametersKHR-videoSessionParameters-07226
  If `videoSessionParameters` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR and the `pNext` chain of `pUpdateInfo` includes a VkVideoEncodeH264SessionParametersAddInfoKHR structure, then `videoSessionParameters` must not already contain a `StdVideoH264SequenceParameterSet` entry with `seq_parameter_set_id` matching any of the elements of VkVideoEncodeH264SessionParametersAddInfoKHR::`pStdSPSs`

- VUID-vkUpdateVideoSessionParametersKHR-videoSessionParameters-06441
  If `videoSessionParameters` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR, then the number of `StdVideoH264SequenceParameterSet` entries already stored in it plus the value of the `stdSPSCount` member of the VkVideoEncodeH264SessionParametersAddInfoKHR structure included in the `pUpdateInfo->pNext` chain must be less than or equal to the VkVideoEncodeH264SessionParametersCreateInfoKHR::`maxStdSPSCount` `videoSessionParameters` was created with

- VUID-vkUpdateVideoSessionParametersKHR-videoSessionParameters-07227
  If `videoSessionParameters` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR and the `pNext` chain of `pUpdateInfo` includes a VkVideoEncodeH264SessionParametersAddInfoKHR structure, then `videoSessionParameters` must not already contain a `StdVideoH264PictureParameterSet` entry with both `seq_parameter_set_id` and `pic_parameter_set_id` matching any of the elements of VkVideoEncodeH264SessionParametersAddInfoKHR::`pStdPPSs`

- VUID-vkUpdateVideoSessionParametersKHR-videoSessionParameters-06442
  If `videoSessionParameters` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR, then the number of `StdVideoH264PictureParameterSet` entries already stored in it plus the value of the `stdPPSCount` member of the VkVideoEncodeH264SessionParametersAddInfoKHR structure included in the `pUpdateInfo->pNext` chain must be less than or equal to the VkVideoEncodeH264SessionParametersCreateInfoKHR::`maxStdPPSCount` `videoSessionParameters` was created with

- VUID-vkUpdateVideoSessionParametersKHR-videoSessionParameters-07228
  If `videoSessionParameters` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR and the `pNext` chain of `pUpdateInfo` includes a VkVideoEncodeH265SessionParametersAddInfoKHR structure, then `videoSessionParameters` must not already contain a `StdVideoH265VideoParameterSet` entry with `vps_video_parameter_set_id` matching any of the elements of VkVideoEncodeH265SessionParametersAddInfoKHR::`pStdVPSs`

- VUID-vkUpdateVideoSessionParametersKHR-videoSessionParameters-06443
  If `videoSessionParameters` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR, then the number of `StdVideoH265VideoParameterSet` entries already stored in it plus the value of the `stdVPSCount` member of the VkVideoEncodeH265SessionParametersAddInfoKHR structure included in the `pUpdateInfo->pNext` chain must be less than or equal to the VkVideoEncodeH265SessionParametersCreateInfoKHR::`maxStdVPSCount` `videoSessionParameters` was created with

- VUID-vkUpdateVideoSessionParametersKHR-videoSessionParameters-07229
  If `videoSessionParameters` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR and the `pNext` chain of `pUpdateInfo` includes a VkVideoEncodeH265SessionParametersAddInfoKHR structure, then `videoSessionParameters` must not already contain a `StdVideoH265SequenceParameterSet` entry with both `sps_video_parameter_set_id` and `sps_seq_parameter_set_id` matching any of the elements of VkVideoEncodeH265SessionParametersAddInfoKHR::`pStdSPSs`

- VUID-vkUpdateVideoSessionParametersKHR-videoSessionParameters-06444
  If `videoSessionParameters` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR, then the number of `StdVideoH265SequenceParameterSet` entries already stored in it plus the value of the `stdSPSCount` member of the VkVideoEncodeH265SessionParametersAddInfoKHR structure included in the `pUpdateInfo->pNext` chain must be less than or equal to the VkVideoEncodeH265SessionParametersCreateInfoKHR::`maxStdSPSCount` `videoSessionParameters` was created with

- VUID-vkUpdateVideoSessionParametersKHR-videoSessionParameters-07230
  If `videoSessionParameters` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR and the `pNext` chain of `pUpdateInfo` includes a VkVideoEncodeH265SessionParametersAddInfoKHR structure, then `videoSessionParameters` must not already contain a `StdVideoH265PictureParameterSet` entry with `sps_video_parameter_set_id`, `pps_seq_parameter_set_id`, and `pps_pic_parameter_set_id` all matching any of the elements of VkVideoEncodeH265SessionParametersAddInfoKHR::`pStdPPSs`

- VUID-vkUpdateVideoSessionParametersKHR-videoSessionParameters-06445
  If `videoSessionParameters` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR, then the number of `StdVideoH265PictureParameterSet` entries already stored in it plus the value of the `stdPPSCount` member of the VkVideoEncodeH265SessionParametersAddInfoKHR structure included in the `pUpdateInfo->pNext` chain must be less than or equal to the VkVideoEncodeH265SessionParametersCreateInfoKHR::`maxStdPPSCount` `videoSessionParameters` was created with

- VUID-vkUpdateVideoSessionParametersKHR-videoSessionParameters-08321
  If `videoSessionParameters` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR and the `pNext` chain of `pUpdateInfo` includes a VkVideoEncodeH265SessionParametersAddInfoKHR structure, then `num_tile_columns_minus1` must be less than VkVideoEncodeH265CapabilitiesKHR::`maxTiles.width`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile `videoSessionParameters` was created with, for each element of VkVideoEncodeH265SessionParametersAddInfoKHR::`pStdPPSs`

- VUID-vkUpdateVideoSessionParametersKHR-videoSessionParameters-08322
  If `videoSessionParameters` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR and the `pNext` chain of `pUpdateInfo` includes a VkVideoEncodeH265SessionParametersAddInfoKHR structure, then `num_tile_rows_minus1` must be less than VkVideoEncodeH265CapabilitiesKHR::`maxTiles.height`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile `videoSessionParameters` was created with, for each element of VkVideoEncodeH265SessionParametersAddInfoKHR::`pStdPPSs`

- VUID-vkUpdateVideoSessionParametersKHR-videoSessionParameters-10281
  `videoSessionParameters` must not have been created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR

Valid Usage (Implicit)

- VUID-vkUpdateVideoSessionParametersKHR-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkUpdateVideoSessionParametersKHR-videoSessionParameters-parameter
  `videoSessionParameters` must be a valid VkVideoSessionParametersKHR handle

- VUID-vkUpdateVideoSessionParametersKHR-pUpdateInfo-parameter
  `pUpdateInfo` must be a valid pointer to a valid VkVideoSessionParametersUpdateInfoKHR structure

- VUID-vkUpdateVideoSessionParametersKHR-videoSessionParameters-parent
  `videoSessionParameters` must have been created, allocated, or retrieved from `device`

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_INVALID_VIDEO_STD_PARAMETERS_KHR

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkVideoSessionParametersUpdateInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_queue
    typedef struct VkVideoSessionParametersUpdateInfoKHR {
        VkStructureType    sType;
        const void*        pNext;
        uint32_t           updateSequenceCount;
    } VkVideoSessionParametersUpdateInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `updateSequenceCount` is the new update sequence count to set for the video session parameters object.

Valid Usage (Implicit)

- VUID-VkVideoSessionParametersUpdateInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_SESSION_PARAMETERS_UPDATE_INFO_KHR

- VUID-VkVideoSessionParametersUpdateInfoKHR-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkVideoDecodeH264SessionParametersAddInfoKHR, VkVideoDecodeH265SessionParametersAddInfoKHR, VkVideoEncodeH264SessionParametersAddInfoKHR, or VkVideoEncodeH265SessionParametersAddInfoKHR

- VUID-VkVideoSessionParametersUpdateInfoKHR-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

### 49.8. Video Coding Scope

Applications can record video coding commands for a video session only within a video coding scope.

To begin a video coding scope, call:

    // Provided by VK_KHR_video_queue
    void vkCmdBeginVideoCodingKHR(
        VkCommandBuffer                             commandBuffer,
        const VkVideoBeginCodingInfoKHR*            pBeginInfo);

- `commandBuffer` is the command buffer in which to record the command.

- `pBeginInfo` is a pointer to a VkVideoBeginCodingInfoKHR structure specifying the parameters of the video coding scope, including the video session and video session parameters object to use.

After beginning a video coding scope, the video session object specified in `pBeginInfo->videoSession` is bound to the command buffer, and the command buffer is ready to record video coding operations. Similarly, if `pBeginInfo->videoSessionParameters` is not `VK_NULL_HANDLE`, it is also bound to the command buffer, and video coding operations can refer to the codec-specific parameters stored in it.

This command also establishes the set of bound reference picture resources that can be used as reconstructed pictures or reference pictures within the video coding scope. Each element of this set consists of a video picture resource and the DPB slot index associated with it, if there is one.

The set of bound reference picture resources is immutable within a video coding scope, however, the DPB slot index associated with any of the bound reference picture resources can change during the video coding scope in response to video coding operations.

The VkVideoReferenceSlotInfoKHR structures provided as the elements of `pBeginInfo->pReferenceSlots` are interpreted by this command as follows:

- If `slotIndex` is non-negative and `pPictureResource` is not `NULL`, then the video picture resource defined by the VkVideoPictureResourceInfoKHR structure pointed to by `pPictureResource` is added to the set of bound reference picture resources and is associated with the DPB slot index specified in `slotIndex`.

- If `slotIndex` is non-negative and `pPictureResource` is `NULL`, then the DPB slot with index `slotIndex` is deactivated by this command.

- If `slotIndex` is negative and `pPictureResource` is not `NULL`, then the video picture resource defined by the VkVideoPictureResourceInfoKHR structure pointed to by `pPictureResource` is added to the set of bound reference picture resources without an associated DPB slot. Such a picture resource can be subsequently used as a reconstructed picture to associate it with a DPB slot.

- If `slotIndex` is negative and `pPictureResource` is `NULL`, then the element is ignored.

Note | It is possible for multiple bound reference picture resources to be associated with the same DPB slot index, or for a single bound reference picture to refer to multiple separate reference pictures. For example, in case of an H.264 decode profile with interlaced frame support a single DPB slot can refer to two separate pictures for the top and bottom fields. Depending on the picture layout used by the H.264 decode profile, the following special cases may arise: If the picture layout is VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_INTERLACED_INTERLEAVED_LINES_BIT_KHR, then the top and bottom field pictures are physically co-located in the same video picture resource with even scanlines corresponding to the top field and odd scanlines corresponding to the bottom field, respectively. If the picture layout is VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_INTERLACED_SEPARATE_PLANES_BIT_KHR, then the top and bottom field pictures are stored in separate video picture resources (in separate subregions of the same image layer, in separate layers of the same image, or in entirely separate images), hence two elements of VkVideoBeginCodingInfoKHR::`pReferenceSlots` can contain the same `slotIndex` but specify different video picture resources in their `pPictureResource` members.

All non-negative `slotIndex` values specified in the elements of `pBeginInfo->pReferenceSlots` must identify DPB slots of the video session that are in the active state at the time this command is executed on the device.

Note | The application does not have to specify an entry in `pBeginInfo->pReferenceSlots` corresponding to all active DPB slots of the video session, but only for those which are intended to be used in the video coding scope. This way the application can avoid any potential runtime cost associated with binding the corresponding picture resources to the command buffer.

In case of a video encode session, the application is also responsible for providing information about the current rate control state configured for the video session by including an instance of the VkVideoEncodeRateControlInfoKHR structure in the `pNext` chain of `pBeginInfo`. If no VkVideoEncodeRateControlInfoKHR is included, then the presence of an empty VkVideoEncodeRateControlInfoKHR structure is implied which indicates that the current rate control mode is VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DEFAULT_KHR. The specified state must match the effective rate control state configured for the video session at the time the recorded command is executed on the device.

Note | Including an instance of the VkVideoEncodeRateControlInfoKHR structure in the `pNext` chain of `pBeginInfo` does not change the rate control state configured for the video session, but only specifies the expected rate control state configured at the time the recorded command is executed on the device which allows the implementation to have information about the configured rate control state at command buffer recording time. In order to change the current rate control state of a video session, the application has to issue an appropriate vkCmdControlVideoCodingKHR command as described in the Video Coding Control and Rate Control State sections.

Valid Usage

- VUID-vkCmdBeginVideoCodingKHR-commandBuffer-11760
  The `VkCommandPool` that `commandBuffer` was allocated from must have been created with the same queue family index that `pBeginInfo->videoSession` was created with

- VUID-vkCmdBeginVideoCodingKHR-None-07232
  There must be no active queries

- VUID-vkCmdBeginVideoCodingKHR-commandBuffer-07233
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, then `pBeginInfo->videoSession` must not have been created with VK_VIDEO_SESSION_CREATE_PROTECTED_CONTENT_BIT_KHR

- VUID-vkCmdBeginVideoCodingKHR-commandBuffer-07234
  If `commandBuffer` is a protected command buffer and `protectedNoFault` is not supported, then `pBeginInfo->videoSession` must have been created with VK_VIDEO_SESSION_CREATE_PROTECTED_CONTENT_BIT_KHR

- VUID-vkCmdBeginVideoCodingKHR-commandBuffer-07235
  If `commandBuffer` is an unprotected command buffer, `protectedNoFault` is not supported, and the `pPictureResource` member of any element of `pBeginInfo->pReferenceSlots` is not `NULL`, then `pPictureResource->imageViewBinding` for that element must not specify an image view created from a protected image

- VUID-vkCmdBeginVideoCodingKHR-commandBuffer-07236
  If `commandBuffer` is a protected command buffer `protectedNoFault` is not supported, and the `pPictureResource` member of any element of `pBeginInfo->pReferenceSlots` is not `NULL`, then `pPictureResource->imageViewBinding` for that element must specify an image view created from a protected image

- VUID-vkCmdBeginVideoCodingKHR-slotIndex-07239
  If the `slotIndex` member of any element of `pBeginInfo->pReferenceSlots` is not negative, then it must specify the index of a DPB slot that is in the active state in `pBeginInfo->videoSession` at the time the command is executed on the device

- VUID-vkCmdBeginVideoCodingKHR-pPictureResource-07265
  Each video picture resource specified by any non-`NULL` `pPictureResource` member specified in the elements of `pBeginInfo->pReferenceSlots` for which `slotIndex` is not negative must match one of the video picture resources currently associated with the DPB slot index of `pBeginInfo->videoSession` specified by `slotIndex` at the time the command is executed on the device

- VUID-vkCmdBeginVideoCodingKHR-pBeginInfo-08253
  If `pBeginInfo->videoSession` was created with a video encode operation and the `pNext` chain of `pBeginInfo` does not include an instance of the VkVideoEncodeRateControlInfoKHR structure, then the rate control mode configured for `pBeginInfo->videoSession` at the time the command is executed on the device must be VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DEFAULT_KHR

- VUID-vkCmdBeginVideoCodingKHR-pBeginInfo-08254
  If `pBeginInfo->videoSession` was created with a video encode operation and the `pNext` chain of `pBeginInfo` includes an instance of the VkVideoEncodeRateControlInfoKHR structure, then it must match the rate control state configured for `pBeginInfo->videoSession` at the time the command is executed on the device

- VUID-vkCmdBeginVideoCodingKHR-pBeginInfo-08255
  If `pBeginInfo->videoSession` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR, the current rate control mode is not VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DEFAULT_KHR or VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR, and VkVideoEncodeH264CapabilitiesKHR::`requiresGopRemainingFrames` is VK_TRUE, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile the `pBeginInfo->videoSession` was created with, then the `pNext` chain of `pBeginInfo` must include an instance of the VkVideoEncodeH264GopRemainingFrameInfoKHR with its `useGopRemainingFrames` member set to VK_TRUE

- VUID-vkCmdBeginVideoCodingKHR-pBeginInfo-08256
  If `pBeginInfo->videoSession` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR, the current rate control mode is not VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DEFAULT_KHR or VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR, and VkVideoEncodeH265CapabilitiesKHR::`requiresGopRemainingFrames` is VK_TRUE, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile the `pBeginInfo->videoSession` was created with, then the `pNext` chain of `pBeginInfo` must include an instance of the VkVideoEncodeH265GopRemainingFrameInfoKHR with its `useGopRemainingFrames` member set to VK_TRUE

- VUID-vkCmdBeginVideoCodingKHR-pBeginInfo-10282
  If `pBeginInfo->videoSession` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR, the current rate control mode is not VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DEFAULT_KHR or VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR, and VkVideoEncodeAV1CapabilitiesKHR::`requiresGopRemainingFrames` is VK_TRUE, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile the `pBeginInfo->videoSession` was created with, then the `pNext` chain of `pBeginInfo` must include an instance of the VkVideoEncodeAV1GopRemainingFrameInfoKHR with its `useGopRemainingFrames` member set to VK_TRUE

Valid Usage (Implicit)

- VUID-vkCmdBeginVideoCodingKHR-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdBeginVideoCodingKHR-pBeginInfo-parameter
  `pBeginInfo` must be a valid pointer to a valid VkVideoBeginCodingInfoKHR structure

- VUID-vkCmdBeginVideoCodingKHR-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdBeginVideoCodingKHR-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_VIDEO_DECODE_BIT_KHR, or VK_QUEUE_VIDEO_ENCODE_BIT_KHR operations

- VUID-vkCmdBeginVideoCodingKHR-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdBeginVideoCodingKHR-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdBeginVideoCodingKHR-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdBeginVideoCodingKHR-bufferlevel
  `commandBuffer` must be a primary `VkCommandBuffer`

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary | Outside | Outside | VK_QUEUE_VIDEO_DECODE_BIT_KHR VK_QUEUE_VIDEO_ENCODE_BIT_KHR | Action State

Conditional Rendering

vkCmdBeginVideoCodingKHR is not affected by conditional rendering

The VkVideoBeginCodingInfoKHR structure is defined as:

    // Provided by VK_KHR_video_queue
    typedef struct VkVideoBeginCodingInfoKHR {
        VkStructureType                       sType;
        const void*                           pNext;
        VkVideoBeginCodingFlagsKHR            flags;
        VkVideoSessionKHR                     videoSession;
        VkVideoSessionParametersKHR           videoSessionParameters;
        uint32_t                              referenceSlotCount;
        const VkVideoReferenceSlotInfoKHR*    pReferenceSlots;
    } VkVideoBeginCodingInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is reserved for future use.

- `videoSession` is the video session object to be bound for the processing of the video commands.

- `videoSessionParameters` is `VK_NULL_HANDLE` or a handle of a VkVideoSessionParametersKHR object to be used for the processing of the video commands. If `VK_NULL_HANDLE`, then no video session parameters object is bound for the duration of the video coding scope.

- `referenceSlotCount` is the number of elements in the `pReferenceSlots` array.

- `pReferenceSlots` is a pointer to an array of VkVideoReferenceSlotInfoKHR structures specifying the information used to determine the set of bound reference picture resources for the video coding scope and their initial association with DPB slot indices.

Limiting values are defined below that are referenced by the relevant valid usage statements of this structure.

- Let `VkOffset2D codedOffsetGranularity` be the minimum alignment requirement for the coded offset of video picture resources. Unless otherwise defined, the value of the `x` and `y` members of `codedOffsetGranularity` are `0`.

  - If `videoSession` was created with an H.264 decode profile with a VkVideoDecodeH264ProfileInfoKHR::`pictureLayout` of VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_INTERLACED_SEPARATE_PLANES_BIT_KHR, then `codedOffsetGranularity` is equal to VkVideoDecodeH264CapabilitiesKHR::`fieldOffsetGranularity`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for that video profile.

Valid Usage

- VUID-VkVideoBeginCodingInfoKHR-videoSession-07237
  `videoSession` must have memory bound to all of its memory bindings returned by vkGetVideoSessionMemoryRequirementsKHR for `videoSession`

- VUID-VkVideoBeginCodingInfoKHR-slotIndex-04856
  Each non-negative VkVideoReferenceSlotInfoKHR::`slotIndex` specified in the elements of `pReferenceSlots` must be less than the VkVideoSessionCreateInfoKHR::`maxDpbSlots` specified when `videoSession` was created

- VUID-VkVideoBeginCodingInfoKHR-pPictureResource-07238
  Each video picture resource corresponding to any non-`NULL` `pPictureResource` member specified in the elements of `pReferenceSlots` must be unique within `pReferenceSlots`

- VUID-VkVideoBeginCodingInfoKHR-pPictureResource-07240
  If the `pPictureResource` member of any element of `pReferenceSlots` is not `NULL`, then the image view specified in `pPictureResource->imageViewBinding` for that element must be compatible with the video profile `videoSession` was created with

- VUID-VkVideoBeginCodingInfoKHR-pPictureResource-07241
  If the `pPictureResource` member of any element of `pReferenceSlots` is not `NULL`, then the format of the image view specified in `pPictureResource->imageViewBinding` for that element must match the VkVideoSessionCreateInfoKHR::`referencePictureFormat` `videoSession` was created with

- VUID-VkVideoBeginCodingInfoKHR-pPictureResource-07242
  If the `pPictureResource` member of any element of `pReferenceSlots` is not `NULL`, then its `codedOffset` member must be an integer multiple of `codedOffsetGranularity`

- VUID-VkVideoBeginCodingInfoKHR-pPictureResource-07243
  If the `pPictureResource` member of any element of `pReferenceSlots` is not `NULL`, then its `codedExtent` member must be between `minCodedExtent` and `maxCodedExtent`, inclusive, `videoSession` was created with

- VUID-VkVideoBeginCodingInfoKHR-flags-07244
  If VkVideoCapabilitiesKHR::`flags` does not include VK_VIDEO_CAPABILITY_SEPARATE_REFERENCE_IMAGES_BIT_KHR, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile `videoSession` was created with, then `pPictureResource->imageViewBinding` of all elements of `pReferenceSlots` with a non-`NULL` `pPictureResource` member must specify image views created from the same image

- VUID-VkVideoBeginCodingInfoKHR-slotIndex-07245
  If `videoSession` was created with a decode operation and the `slotIndex` member of any element of `pReferenceSlots` is not negative, then the image view specified in `pPictureResource->imageViewBinding` for that element must have been created with the VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR usage flag set

- VUID-VkVideoBeginCodingInfoKHR-slotIndex-07246
  If `videoSession` was created with an encode operation and the `slotIndex` member of any element of `pReferenceSlots` is not negative, then the image view specified in `pPictureResource->imageViewBinding` for that element must have been created with the VK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR usage flag set

- VUID-VkVideoBeginCodingInfoKHR-videoSession-07247
  If `videoSession` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR, then `videoSessionParameters` must not be `VK_NULL_HANDLE` , unless the `videoMaintenance2` feature is enabled

- VUID-VkVideoBeginCodingInfoKHR-videoSession-07248
  If `videoSession` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR, then `videoSessionParameters` must not be `VK_NULL_HANDLE` , unless the `videoMaintenance2` feature is enabled

- VUID-VkVideoBeginCodingInfoKHR-videoSession-09261
  If `videoSession` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_AV1_BIT_KHR, then `videoSessionParameters` must not be `VK_NULL_HANDLE` , unless the `videoMaintenance2` feature is enabled

- VUID-VkVideoBeginCodingInfoKHR-videoSession-07249
  If `videoSession` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR, then `videoSessionParameters` must not be `VK_NULL_HANDLE`

- VUID-VkVideoBeginCodingInfoKHR-videoSession-07250
  If `videoSession` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR, then `videoSessionParameters` must not be `VK_NULL_HANDLE`

- VUID-VkVideoBeginCodingInfoKHR-videoSession-10283
  If `videoSession` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR, then `videoSessionParameters` must not be `VK_NULL_HANDLE`

- VUID-VkVideoBeginCodingInfoKHR-videoSessionParameters-04857
  If `videoSessionParameters` is not `VK_NULL_HANDLE`, it must have been created with `videoSession` specified in VkVideoSessionParametersCreateInfoKHR::`videoSession`

Valid Usage (Implicit)

- VUID-VkVideoBeginCodingInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_BEGIN_CODING_INFO_KHR

- VUID-VkVideoBeginCodingInfoKHR-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkVideoEncodeAV1GopRemainingFrameInfoKHR, VkVideoEncodeAV1RateControlInfoKHR, VkVideoEncodeH264GopRemainingFrameInfoKHR, VkVideoEncodeH264RateControlInfoKHR, VkVideoEncodeH265GopRemainingFrameInfoKHR, VkVideoEncodeH265RateControlInfoKHR, or VkVideoEncodeRateControlInfoKHR

- VUID-VkVideoBeginCodingInfoKHR-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkVideoBeginCodingInfoKHR-flags-zerobitmask
  `flags` must be `0`

- VUID-VkVideoBeginCodingInfoKHR-videoSession-parameter
  `videoSession` must be a valid VkVideoSessionKHR handle

- VUID-VkVideoBeginCodingInfoKHR-videoSessionParameters-parameter
  If `videoSessionParameters` is not VK_NULL_HANDLE, `videoSessionParameters` must be a valid VkVideoSessionParametersKHR handle

- VUID-VkVideoBeginCodingInfoKHR-pReferenceSlots-parameter
  If `referenceSlotCount` is not `0`, `pReferenceSlots` must be a valid pointer to an array of `referenceSlotCount` valid VkVideoReferenceSlotInfoKHR structures

- VUID-VkVideoBeginCodingInfoKHR-commonparent
  Both of `videoSession`, and `videoSessionParameters` that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevice

    // Provided by VK_KHR_video_queue
    typedef VkFlags VkVideoBeginCodingFlagsKHR;

`VkVideoBeginCodingFlagsKHR` is a bitmask type for setting a mask, but is currently reserved for future use.

The `VkVideoReferenceSlotInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_queue
    typedef struct VkVideoReferenceSlotInfoKHR {
        VkStructureType                         sType;
        const void*                             pNext;
        int32_t                                 slotIndex;
        const VkVideoPictureResourceInfoKHR*    pPictureResource;
    } VkVideoReferenceSlotInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `slotIndex` is the index of the DPB slot or a negative integer value.

- `pPictureResource` is `NULL` or a pointer to a VkVideoPictureResourceInfoKHR structure describing the video picture resource associated with the DPB slot index specified by `slotIndex`.

Valid Usage (Implicit)

- VUID-VkVideoReferenceSlotInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_REFERENCE_SLOT_INFO_KHR

- VUID-VkVideoReferenceSlotInfoKHR-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkVideoDecodeAV1DpbSlotInfoKHR, VkVideoDecodeH264DpbSlotInfoKHR, VkVideoDecodeH265DpbSlotInfoKHR, VkVideoEncodeAV1DpbSlotInfoKHR, VkVideoEncodeH264DpbSlotInfoKHR, VkVideoEncodeH265DpbSlotInfoKHR, or VkVideoReferenceIntraRefreshInfoKHR

- VUID-VkVideoReferenceSlotInfoKHR-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkVideoReferenceSlotInfoKHR-pPictureResource-parameter
  If `pPictureResource` is not `NULL`, `pPictureResource` must be a valid pointer to a valid VkVideoPictureResourceInfoKHR structure

To end a video coding scope, call:

    // Provided by VK_KHR_video_queue
    void vkCmdEndVideoCodingKHR(
        VkCommandBuffer                             commandBuffer,
        const VkVideoEndCodingInfoKHR*              pEndCodingInfo);

- `commandBuffer` is the command buffer in which to record the command.

- `pEndCodingInfo` is a pointer to a VkVideoEndCodingInfoKHR structure specifying the parameters for ending the video coding scope.

After ending a video coding scope, the video session object, the optional video session parameters object, and all reference picture resources previously bound by the corresponding vkCmdBeginVideoCodingKHR command are unbound.

Valid Usage

- VUID-vkCmdEndVideoCodingKHR-None-07251
  There must be no active queries

Valid Usage (Implicit)

- VUID-vkCmdEndVideoCodingKHR-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdEndVideoCodingKHR-pEndCodingInfo-parameter
  `pEndCodingInfo` must be a valid pointer to a valid VkVideoEndCodingInfoKHR structure

- VUID-vkCmdEndVideoCodingKHR-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdEndVideoCodingKHR-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_VIDEO_DECODE_BIT_KHR, or VK_QUEUE_VIDEO_ENCODE_BIT_KHR operations

- VUID-vkCmdEndVideoCodingKHR-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdEndVideoCodingKHR-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdEndVideoCodingKHR-videocoding
  This command must only be called inside of a video coding scope

- VUID-vkCmdEndVideoCodingKHR-bufferlevel
  `commandBuffer` must be a primary `VkCommandBuffer`

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary | Outside | Inside | VK_QUEUE_VIDEO_DECODE_BIT_KHR VK_QUEUE_VIDEO_ENCODE_BIT_KHR | Action State

Conditional Rendering

vkCmdEndVideoCodingKHR is not affected by conditional rendering

The `VkVideoEndCodingInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_queue
    typedef struct VkVideoEndCodingInfoKHR {
        VkStructureType             sType;
        const void*                 pNext;
        VkVideoEndCodingFlagsKHR    flags;
    } VkVideoEndCodingInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is reserved for future use.

Valid Usage (Implicit)

- VUID-VkVideoEndCodingInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_END_CODING_INFO_KHR

- VUID-VkVideoEndCodingInfoKHR-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkVideoEndCodingInfoKHR-flags-zerobitmask
  `flags` must be `0`

    // Provided by VK_KHR_video_queue
    typedef VkFlags VkVideoEndCodingFlagsKHR;

`VkVideoEndCodingFlagsKHR` is a bitmask type for setting a mask, but is currently reserved for future use.

### 49.9. Video Coding Control

To apply dynamic controls to the bound video session object, call:

    // Provided by VK_KHR_video_queue
    void vkCmdControlVideoCodingKHR(
        VkCommandBuffer                             commandBuffer,
        const VkVideoCodingControlInfoKHR*          pCodingControlInfo);

- `commandBuffer` is the command buffer in which to record the command.

- `pCodingControlInfo` is a pointer to a VkVideoCodingControlInfoKHR structure specifying the control parameters.

The control parameters provided in this call are applied to the video session at the time the command executes on the device and are in effect until a subsequent call to this command with the same video session bound changes the corresponding control parameters.

A newly created video session must be reset before performing video coding operations using it by including VK_VIDEO_CODING_CONTROL_RESET_BIT_KHR in `pCodingControlInfo->flags`. The reset operation also returns all DPB slots of the video session to the inactive state. Correspondingly, any DPB slot index associated with the bound reference picture resources is removed.

For encode sessions, the reset operation returns rate control configuration to implementation default settings and sets the video encode quality level to zero.

After video coding operations are performed using a video session, the reset operation can be used to return the video session to the same initial state as after the reset of a newly created video session. This can be used, for example, when different video sequences are needed to be processed with the same video session object.

If `pCodingControlInfo->flags` includes VK_VIDEO_CODING_CONTROL_ENCODE_RATE_CONTROL_BIT_KHR, then the command replaces the rate control configuration maintained by the video session with the configuration specified in the VkVideoEncodeRateControlInfoKHR structure included in the `pCodingControlInfo->pNext` chain.

If `pCodingControlInfo->flags` includes VK_VIDEO_CODING_CONTROL_ENCODE_QUALITY_LEVEL_BIT_KHR, then the command changes the current video encode quality level to the value specified in the `qualityLevel` member of the VkVideoEncodeQualityLevelInfoKHR structure included in the `pCodingControlInfo->pNext` chain.

Valid Usage

- VUID-vkCmdControlVideoCodingKHR-flags-07017
  If `pCodingControlInfo->flags` does not include VK_VIDEO_CODING_CONTROL_RESET_BIT_KHR, then the bound video session must not be in uninitialized state at the time the command is executed on the device

- VUID-vkCmdControlVideoCodingKHR-pCodingControlInfo-08243
  If the bound video session was not created with an encode operation, then `pCodingControlInfo->flags` must not include VK_VIDEO_CODING_CONTROL_ENCODE_RATE_CONTROL_BIT_KHR or VK_VIDEO_CODING_CONTROL_ENCODE_QUALITY_LEVEL_BIT_KHR

Valid Usage (Implicit)

- VUID-vkCmdControlVideoCodingKHR-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdControlVideoCodingKHR-pCodingControlInfo-parameter
  `pCodingControlInfo` must be a valid pointer to a valid VkVideoCodingControlInfoKHR structure

- VUID-vkCmdControlVideoCodingKHR-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdControlVideoCodingKHR-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_VIDEO_DECODE_BIT_KHR, or VK_QUEUE_VIDEO_ENCODE_BIT_KHR operations

- VUID-vkCmdControlVideoCodingKHR-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdControlVideoCodingKHR-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdControlVideoCodingKHR-videocoding
  This command must only be called inside of a video coding scope

- VUID-vkCmdControlVideoCodingKHR-bufferlevel
  `commandBuffer` must be a primary `VkCommandBuffer`

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary | Outside | Inside | VK_QUEUE_VIDEO_DECODE_BIT_KHR VK_QUEUE_VIDEO_ENCODE_BIT_KHR | Action

Conditional Rendering

vkCmdControlVideoCodingKHR is not affected by conditional rendering

The `VkVideoCodingControlInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_queue
    typedef struct VkVideoCodingControlInfoKHR {
        VkStructureType                 sType;
        const void*                     pNext;
        VkVideoCodingControlFlagsKHR    flags;
    } VkVideoCodingControlInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask of VkVideoCodingControlFlagsKHR specifying control flags.

Valid Usage

- VUID-VkVideoCodingControlInfoKHR-flags-07018
  If `flags` includes VK_VIDEO_CODING_CONTROL_ENCODE_RATE_CONTROL_BIT_KHR, then the `pNext` chain must include a VkVideoEncodeRateControlInfoKHR structure

- VUID-VkVideoCodingControlInfoKHR-flags-08349
  If `flags` includes VK_VIDEO_CODING_CONTROL_ENCODE_QUALITY_LEVEL_BIT_KHR, then the `pNext` chain must include a VkVideoEncodeQualityLevelInfoKHR structure

Valid Usage (Implicit)

- VUID-VkVideoCodingControlInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_CODING_CONTROL_INFO_KHR

- VUID-VkVideoCodingControlInfoKHR-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkVideoEncodeAV1RateControlInfoKHR, VkVideoEncodeH264RateControlInfoKHR, VkVideoEncodeH265RateControlInfoKHR, VkVideoEncodeQualityLevelInfoKHR, or VkVideoEncodeRateControlInfoKHR

- VUID-VkVideoCodingControlInfoKHR-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkVideoCodingControlInfoKHR-flags-parameter
  `flags` must be a valid combination of VkVideoCodingControlFlagBitsKHR values

- VUID-VkVideoCodingControlInfoKHR-flags-requiredbitmask
  `flags` must not be `0`

Bits which can be set in VkVideoCodingControlInfoKHR::`flags`, specifying the video coding control parameters to be modified, are:

    // Provided by VK_KHR_video_queue
    typedef enum VkVideoCodingControlFlagBitsKHR {
        VK_VIDEO_CODING_CONTROL_RESET_BIT_KHR = 0x00000001,
      // Provided by VK_KHR_video_encode_queue
        VK_VIDEO_CODING_CONTROL_ENCODE_RATE_CONTROL_BIT_KHR = 0x00000002,
      // Provided by VK_KHR_video_encode_queue
        VK_VIDEO_CODING_CONTROL_ENCODE_QUALITY_LEVEL_BIT_KHR = 0x00000004,
    } VkVideoCodingControlFlagBitsKHR;

- VK_VIDEO_CODING_CONTROL_RESET_BIT_KHR specifies a request for the bound video session to be reset before other coding control parameters are applied.

- VK_VIDEO_CODING_CONTROL_ENCODE_RATE_CONTROL_BIT_KHR specifies that the coding control parameters include video encode rate control parameters (see VkVideoEncodeRateControlInfoKHR).

- VK_VIDEO_CODING_CONTROL_ENCODE_QUALITY_LEVEL_BIT_KHR specifies that the coding control parameters include video encode quality level parameters (see VkVideoEncodeQualityLevelInfoKHR).

    // Provided by VK_KHR_video_queue
    typedef VkFlags VkVideoCodingControlFlagsKHR;

`VkVideoCodingControlFlagsKHR` is a bitmask type for setting a mask of zero or more VkVideoCodingControlFlagBitsKHR.

### 49.10. Inline Queries

If a video session was created with VK_VIDEO_SESSION_CREATE_INLINE_QUERIES_BIT_KHR, beginning queries using commands such as vkCmdBeginQuery within a video coding scope is not allowed. Instead, queries are executed inline by including an instance of the VkVideoInlineQueryInfoKHR structure in the `pNext` chain of the parameters of one of the video coding commands, with its `queryPool` member set to a valid `VkQueryPool` handle.

The `VkVideoInlineQueryInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_maintenance1
    typedef struct VkVideoInlineQueryInfoKHR {
        VkStructureType    sType;
        const void*        pNext;
        VkQueryPool        queryPool;
        uint32_t           firstQuery;
        uint32_t           queryCount;
    } VkVideoInlineQueryInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `queryPool` is `VK_NULL_HANDLE` or a valid handle to a VkQueryPool object that will manage the results of the queries.

- `firstQuery` is the query index within the query pool that will contain the query results for the first video coding operation. The query results of subsequent video coding operations will be contained by subsequent query indices.

- `queryCount` is the number of queries to execute.

  Note | In practice, if `queryPool` is not `VK_NULL_HANDLE`, then `queryCount` will always have to match the number of video coding operations issued by the video coding command this structure is specified to, meaning that using inline queries in a video coding command will always execute a query for each issued video coding operation.

This structure can be included in the `pNext` chain of the input parameter structure of video coding commands.

- In the `pNext` chain of the `pDecodeInfo` parameter of the vkCmdDecodeVideoKHR command to execute a query for each video decode operation issued by the command.

- In the `pNext` chain of the `pEncodeInfo` parameter of the vkCmdEncodeVideoKHR command to execute a query for each video encode operation issued by the command.

Valid Usage

- VUID-VkVideoInlineQueryInfoKHR-queryPool-08372
  If `queryPool` is not `VK_NULL_HANDLE`, then `firstQuery` must be less than the number of queries in `queryPool`

- VUID-VkVideoInlineQueryInfoKHR-queryPool-08373
  If `queryPool` is not `VK_NULL_HANDLE`, then the sum of `firstQuery` and `queryCount` must be less than or equal to the number of queries in `queryPool`

Valid Usage (Implicit)

- VUID-VkVideoInlineQueryInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_INLINE_QUERY_INFO_KHR

- VUID-VkVideoInlineQueryInfoKHR-queryPool-parameter
  If `queryPool` is not VK_NULL_HANDLE, `queryPool` must be a valid VkQueryPool handle

Structure Chaining

Extends the structures

  - VkVideoDecodeInfoKHR

  - VkVideoEncodeInfoKHR

### 49.11. Video Decode Operations

Video decode operations consume compressed video data from a video bitstream buffer and zero or more reference pictures, and produce a decode output picture and an optional reconstructed picture.

Note | Such decode output pictures can be shared with the Decoded Picture Buffer, and can also be used as the input of video encode operations, with graphics or compute operations, or with Window System Integration APIs, depending on the capabilities of the implementation.

Video decode operations may access the following resources in the VK_PIPELINE_STAGE_2_VIDEO_DECODE_BIT_KHR stage:

- The source video bitstream buffer range and the image subregions corresponding to the list of active reference pictures with access VK_ACCESS_2_VIDEO_DECODE_READ_BIT_KHR.

- The image subregions corresponding to the target decode output picture and reconstructed picture with access VK_ACCESS_2_VIDEO_DECODE_WRITE_BIT_KHR.

The image subresource of each video picture resource accessed by the video decode operation is specified using a corresponding VkVideoPictureResourceInfoKHR structure. Each such image subresource must be in the appropriate image layout as follows:

- If the image subresource is used in the video decode operation only as decode output picture, then it must be in the VK_IMAGE_LAYOUT_VIDEO_DECODE_DST_KHR layout , unless the `unifiedImageLayoutsVideo` feature is enabled, in which case it may be in the VK_IMAGE_LAYOUT_GENERAL layout .

- If the image subresource is used in the video decode operation both as decode output picture and reconstructed picture, then it must be in the VK_IMAGE_LAYOUT_VIDEO_DECODE_DPB_KHR layout , unless the `unifiedImageLayoutsVideo` feature is enabled, in which case it may be in the VK_IMAGE_LAYOUT_GENERAL layout .

- If the image subresource is used in the video decode operation only as reconstructed picture, then it must be in the VK_IMAGE_LAYOUT_VIDEO_DECODE_DPB_KHR layout , unless the `unifiedImageLayoutsVideo` feature is enabled, in which case it may be in the VK_IMAGE_LAYOUT_GENERAL layout .

- If the image subresource is used in the video decode operation as a reference picture, then it must be in the VK_IMAGE_LAYOUT_VIDEO_DECODE_DPB_KHR layout , unless the `unifiedImageLayoutsVideo` feature is enabled, in which case it may be in the VK_IMAGE_LAYOUT_GENERAL layout .

A video decode operation may complete unsuccessfully. In this case the decode output picture will have undefined contents. Similarly, if reference picture setup is requested, the reconstructed picture will also have undefined contents, and the activated DPB slot will have an invalid picture reference.

#### 49.11.1. Codec-Specific Semantics

The following aspects of video decode operations are codec-specific:

- The interpretation of the contents of the source video bitstream buffer range.

- The construction and interpretation of the list of active reference pictures and the interpretation of the picture data referred to by the corresponding image subregions.

- The construction and interpretation of information related to the decode output picture and the generation of picture data to the corresponding image subregion.

- The decision on reference picture setup.

- The construction and interpretation of information related to the optional reconstructed picture and the generation of picture data to the corresponding image subregion.

These codec-specific behaviors are defined for each video codec operation separately.

- If the used video codec operation is VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR, then the codec-specific aspects of the video decoding process are performed as defined in the H.264 Decode Operations section.

- If the used video codec operation is VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR, then the codec-specific aspects of the video decoding process are performed as defined in the H.265 Decode Operations section.

- If the used video codec operation is VK_VIDEO_CODEC_OPERATION_DECODE_VP9_BIT_KHR, then the codec-specific aspects of the video decoding process are performed as defined in the VP9 Decode Operations section.

- If the used video codec operation is VK_VIDEO_CODEC_OPERATION_DECODE_AV1_BIT_KHR, then the codec-specific aspects of the video decoding process are performed as defined in the AV1 Decode Operations section.

#### 49.11.2. Video Decode Operation Steps

Each video decode operation performs the following steps in the VK_PIPELINE_STAGE_2_VIDEO_DECODE_BIT_KHR stage:

1. Reads the encoded video data from the source video bitstream buffer range.

2. Performs picture reconstruction of the encoded video data according to the codec-specific semantics, applying any prediction data read from the active reference pictures in the process;

3. Writes the decoded picture data to the decode output picture, and optionally to the reconstructed picture, if one is specified and is different from the decode output picture, according to the codec-specific semantics;

4. If reference picture setup is requested, the DPB slot index specified in the reconstructed picture information is activated with the reconstructed picture.

When reconstructed picture information is provided, the specified DPB slot index is associated with the corresponding bound reference picture resource, regardless of whether reference picture setup is requested.

#### 49.11.3. Capabilities

When calling vkGetPhysicalDeviceVideoCapabilitiesKHR with `pVideoProfile->videoCodecOperation` specifying a decode operation, the `VkVideoDecodeCapabilitiesKHR` structure must be included in the `pNext` chain of the VkVideoCapabilitiesKHR structure to retrieve capabilities specific to video decoding.

The `VkVideoDecodeCapabilitiesKHR` structure is defined as:

    // Provided by VK_KHR_video_decode_queue
    typedef struct VkVideoDecodeCapabilitiesKHR {
        VkStructureType                    sType;
        void*                              pNext;
        VkVideoDecodeCapabilityFlagsKHR    flags;
    } VkVideoDecodeCapabilitiesKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask of VkVideoDecodeCapabilityFlagBitsKHR describing the supported video decoding capabilities.

Valid Usage (Implicit)

- VUID-VkVideoDecodeCapabilitiesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_DECODE_CAPABILITIES_KHR

Structure Chaining

Extends the structure

  - VkVideoCapabilitiesKHR

Bits which may be set in VkVideoDecodeCapabilitiesKHR::`flags`, indicating the decoding capabilities supported, are:

    // Provided by VK_KHR_video_decode_queue
    typedef enum VkVideoDecodeCapabilityFlagBitsKHR {
        VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_COINCIDE_BIT_KHR = 0x00000001,
        VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_DISTINCT_BIT_KHR = 0x00000002,
    } VkVideoDecodeCapabilityFlagBitsKHR;

- VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_COINCIDE_BIT_KHR specifies support for using the same video picture resource as the reconstructed picture and decode output picture in a video decode operation.

- VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_DISTINCT_BIT_KHR specifies support for using distinct video picture resources as the reconstructed picture and decode output picture in a video decode operation.

  Note | Some video profiles allow using distinct video picture resources as the reconstructed picture and decode output picture in specific video decode operations even when the video decode profile does not support VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_DISTINCT_BIT_KHR. Even if the implementation only reports coincide, the decode output picture for film grain enabled frames must be a different video picture resource from the reconstructed picture because film grain is applied outside of the coding loop.

Implementations are only required to support one of VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_COINCIDE_BIT_KHR and VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_DISTINCT_BIT_KHR. Accordingly, applications should handle both cases to maximize portability.

Note | If both VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_COINCIDE_BIT_KHR and VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_DISTINCT_BIT_KHR are supported, an application can choose to create separate images for decode DPB and decode output. E.g. in cases when linear tiling is preferred (and supported) for the decode output picture and the DPB requires optimal tiling, this avoids the need for a separate copy at the expense of additional memory bandwidth requirements during decoding.

    // Provided by VK_KHR_video_decode_queue
    typedef VkFlags VkVideoDecodeCapabilityFlagsKHR;

`VkVideoDecodeCapabilityFlagsKHR` is a bitmask type for setting a mask of zero or more VkVideoDecodeCapabilityFlagBitsKHR.

#### 49.11.4. Video Decode Commands

To launch video decode operations, call:

    // Provided by VK_KHR_video_decode_queue
    void vkCmdDecodeVideoKHR(
        VkCommandBuffer                             commandBuffer,
        const VkVideoDecodeInfoKHR*                 pDecodeInfo);

- `commandBuffer` is the command buffer in which to record the command.

- `pDecodeInfo` is a pointer to a VkVideoDecodeInfoKHR structure specifying the parameters of the video decode operations.

Each call issues one or more video decode operations. The implicit parameter `opCount` corresponds to the number of video decode operations issued by the command. After calling this command, the active query index of each active query is incremented by `opCount`.

Currently each call to this command results in the issue of a single video decode operation.

If the bound video session was created with VK_VIDEO_SESSION_CREATE_INLINE_QUERIES_BIT_KHR and the `pNext` chain of `pDecodeInfo` includes a VkVideoInlineQueryInfoKHR structure with its `queryPool` member specifying a valid `VkQueryPool` handle, then this command will execute a query for each video decode operation issued by it.

Active Reference Picture Information

  The list of active reference pictures used by a video decode operation is a list of image subregions used as the source of reference picture data and related parameters, and is derived from the VkVideoReferenceSlotInfoKHR structures provided as the elements of the `pDecodeInfo->pReferenceSlots` array. For each element of `pDecodeInfo->pReferenceSlots`, one or more elements are added to the active reference picture list, as defined by the codec-specific semantics. Each element of this list contains the following information:

  - The image subregion within the image subresource referred to by the video picture resource used as the reference picture.

  - The DPB slot index the reference picture is associated with.

  - The codec-specific reference information related to the reference picture.

Reconstructed Picture Information

  Information related to the optional reconstructed picture used by a video decode operation is derived from the VkVideoReferenceSlotInfoKHR structure pointed to by `pDecodeInfo->pSetupReferenceSlot`, if not `NULL`, as defined by the codec-specific semantics, and consists of the following:

  - The image subregion within the image subresource referred to by the video picture resource used as the reconstructed picture.

  - The DPB slot index to use for picture reconstruction.

  - The codec-specific reference information related to the reconstructed picture.

Specifying a valid VkVideoReferenceSlotInfoKHR structure in `pDecodeInfo->pSetupReferenceSlot` is always required, unless the video session was created with VkVideoSessionCreateInfoKHR::`maxDpbSlots` equal to zero. However, the DPB slot identified by `pDecodeInfo->pSetupReferenceSlot->slotIndex` is only activated with the reconstructed picture specified in `pDecodeInfo->pSetupReferenceSlot->pPictureResource` if reference picture setup is requested according to the codec-specific semantics.

If reconstructed picture information is specified, and `pDecodeInfo->pSetupReferenceSlot->pPictureResource` refers to a video picture resource different than that of the decode output picture, but reference picture setup is not requested, the contents of the video picture resource corresponding to the reconstructed picture will be undefined after the video decode operation.

Note | Some implementations may always output the reconstructed picture or use it as temporary storage during the video decode operation even when the reconstructed picture is not marked for future reference.

Decode Output Picture Information

  Information related to the decode output picture used by a video decode operation is derived from `pDecodeInfo->dstPictureResource` and any codec-specific parameters provided in the `pDecodeInfo->pNext` chain, as defined by the codec-specific semantics, and consists of the following:

  - The image subregion within the image subresource referred to by the video picture resource used as the decode output picture.

  - The codec-specific picture information related to the decode output picture.

Several limiting values are defined below that are referenced by the relevant valid usage statements of this command.

- Let `uint32_t activeReferencePictureCount` be the size of the list of active reference pictures used by the video decode operation. Unless otherwise defined, `activeReferencePictureCount` is set to the value of `pDecodeInfo->referenceSlotCount`.

  - If the bound video session was created with an H.264 decode profile, then let `activeReferencePictureCount` be the value of `pDecodeInfo->referenceSlotCount` plus the number of elements of the `pDecodeInfo->pReferenceSlots` array that have a VkVideoDecodeH264DpbSlotInfoKHR structure included in their `pNext` chain with both `pStdReferenceInfo->flags.top_field_flag` and `pStdReferenceInfo->flags.bottom_field_flag` set.

    Note | This means that the elements of `pDecodeInfo->pReferenceSlots` that include both a top and bottom field reference are counted as two separate active reference pictures, as described in the active reference picture list construction rules for H.264 decode operations.

- Let `VkOffset2D codedOffsetGranularity` be the minimum alignment requirement for the coded offset of video picture resources. Unless otherwise defined, the value of the `x` and `y` members of `codedOffsetGranularity` are `0`.

  - If the bound video session was created with an H.264 decode profile with a VkVideoDecodeH264ProfileInfoKHR::`pictureLayout` of VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_INTERLACED_SEPARATE_PLANES_BIT_KHR, then `codedOffsetGranularity` is equal to VkVideoDecodeH264CapabilitiesKHR::`fieldOffsetGranularity`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for that video profile.

- Let `uint32_t dpbFrameUseCount[]` be an array of size `maxDpbSlots`, where `maxDpbSlots` is the VkVideoSessionCreateInfoKHR::`maxDpbSlots` the bound video session was created with, with each element indicating the number of times a frame associated with the corresponding DPB slot index is referred to by the video coding operation. Let the initial value of each element of the array be `0`.

  - If `pDecodeInfo->pSetupReferenceSlot` is not `NULL`, then `dpbFrameUseCount[i]` is incremented by one, where `i` equals `pDecodeInfo->pSetupReferenceSlot->slotIndex`. If the bound video session object was created with an H.264 decode profile, then `dpbFrameUseCount[i]` is decremented by one if either `pStdReferenceInfo->flags.top_field_flag` or `pStdReferenceInfo->flags.bottom_field_flag` is set in the VkVideoDecodeH264DpbSlotInfoKHR structure in the `pDecodeInfo->pSetupReferenceSlot->pNext` chain.

  - For each element of `pDecodeInfo->pReferenceSlots`, `dpbFrameUseCount[i]` is incremented by one, where `i` equals the `slotIndex` member of the corresponding element. If the bound video session object was created with an H.264 decode profile, then `dpbFrameUseCount[i]` is decremented by one if either `pStdReferenceInfo->flags.top_field_flag` or `pStdReferenceInfo->flags.bottom_field_flag` is set in the VkVideoDecodeH264DpbSlotInfoKHR structure in the `pNext` chain of the corresponding element of `pDecodeInfo->pReferenceSlots`.

- Let `uint32_t dpbTopFieldUseCount[]` and `uint32_t dpbBottomFieldUseCount[]` be arrays of size `maxDpbSlots`, where `maxDpbSlots` is the VkVideoSessionCreateInfoKHR::`maxDpbSlots` the bound video session was created with, with each element indicating the number of times the top field or the bottom field, respectively, associated with the corresponding DPB slot index is referred to by the video coding operation. Let the initial value of each element of the arrays be `0`.

  - If the bound video session object was created with an H.264 decode profile and `pDecodeInfo->pSetupReferenceSlot` is not `NULL`, then perform the following:

    - If `pStdReferenceInfo->flags.top_field_flag` is set in the VkVideoDecodeH264DpbSlotInfoKHR structure in the `pDecodeInfo->pSetupReferenceSlot->pNext` chain, then `dpbTopFieldUseCount[i]` is incremented by one, where `i` equals `pDecodeInfo->pSetupReferenceSlot->slotIndex`.

    - If `pStdReferenceInfo->flags.bottom_field_flag` is set in the VkVideoDecodeH264DpbSlotInfoKHR structure in the `pDecodeInfo->pSetupReferenceSlot->pNext` chain, then `dpbBottomFieldUseCount[i]` is incremented by one, where `i` equals `pDecodeInfo->pSetupReferenceSlot->slotIndex`.

  - If the bound video session object was created with an H.264 decode profile, then perform the following for each element of `pDecodeInfo->pReferenceSlots`:

    - If `pStdReferenceInfo->flags.top_field_flag` is set in the VkVideoDecodeH264DpbSlotInfoKHR structure in the `pNext` chain of the element, then `dpbTopFieldUseCount[i]` is incremented by one, where `i` equals the `slotIndex` member of the element.

    - If `pStdReferenceInfo->flags.bottom_field_flag` is set in the VkVideoDecodeH264DpbSlotInfoKHR structure in the `pNext` chain of the element, then `dpbBottomFieldUseCount[i]` is incremented by one, where `i` equals the `slotIndex` member of the element.

Valid Usage

- VUID-vkCmdDecodeVideoKHR-None-08249
  The bound video session must have been created with a decode operation

- VUID-vkCmdDecodeVideoKHR-None-07011
  The bound video session must not be in uninitialized state at the time the command is executed on the device

- VUID-vkCmdDecodeVideoKHR-opCount-07134
  For each active query, the active query index corresponding to the query type of that query plus `opCount` must be less than or equal to the last activatable query index corresponding to the query type of that query plus one

- VUID-vkCmdDecodeVideoKHR-pNext-08365
  If the bound video session was created with VK_VIDEO_SESSION_CREATE_INLINE_QUERIES_BIT_KHR, and the `pNext` chain of `pDecodeInfo` includes a VkVideoInlineQueryInfoKHR structure with its `queryPool` member specifying a valid `VkQueryPool` handle, then VkVideoInlineQueryInfoKHR::`queryCount` must equal `opCount`

- VUID-vkCmdDecodeVideoKHR-pNext-08366
  If the bound video session was created with VK_VIDEO_SESSION_CREATE_INLINE_QUERIES_BIT_KHR, and the `pNext` chain of `pDecodeInfo` includes a VkVideoInlineQueryInfoKHR structure with its `queryPool` member specifying a valid `VkQueryPool` handle, then all the queries used by the command, as specified by the VkVideoInlineQueryInfoKHR structure, must be unavailable

- VUID-vkCmdDecodeVideoKHR-queryType-08367
  If the bound video session was created with VK_VIDEO_SESSION_CREATE_INLINE_QUERIES_BIT_KHR, then the `queryType` used to create the `queryPool` specified in the VkVideoInlineQueryInfoKHR structure included in the `pNext` chain of `pDecodeInfo` must be VK_QUERY_TYPE_RESULT_STATUS_ONLY_KHR

- VUID-vkCmdDecodeVideoKHR-queryPool-08368
  If the bound video session was created with VK_VIDEO_SESSION_CREATE_INLINE_QUERIES_BIT_KHR, then the `queryPool` specified in the VkVideoInlineQueryInfoKHR structure included in the `pNext` chain of `pDecodeInfo` must have been created with a VkVideoProfileInfoKHR structure included in the `pNext` chain of VkQueryPoolCreateInfo identical to the one specified in VkVideoSessionCreateInfoKHR::`pVideoProfile` the bound video session was created with

- VUID-vkCmdDecodeVideoKHR-queryType-08369
  If the bound video session was created with VK_VIDEO_SESSION_CREATE_INLINE_QUERIES_BIT_KHR, and the `queryType` used to create the `queryPool` specified in the VkVideoInlineQueryInfoKHR structure included in the `pNext` chain of `pDecodeInfo` is VK_QUERY_TYPE_RESULT_STATUS_ONLY_KHR, then the `VkCommandPool` that `commandBuffer` was allocated from must have been created with a queue family index that supports result status queries, as indicated by VkQueueFamilyQueryResultStatusPropertiesKHR::`queryResultStatusSupport`

- VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07135
  `pDecodeInfo->srcBuffer` must be compatible with the video profile the bound video session was created with

- VUID-vkCmdDecodeVideoKHR-commandBuffer-07136
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, then `pDecodeInfo->srcBuffer` must not be a protected buffer

- VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07138
  `pDecodeInfo->srcBufferOffset` must be an integer multiple of VkVideoCapabilitiesKHR::`minBitstreamBufferOffsetAlignment`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile the bound video session was created with

- VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07139
  `pDecodeInfo->srcBufferRange` must be an integer multiple of VkVideoCapabilitiesKHR::`minBitstreamBufferSizeAlignment`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile the bound video session was created with

- VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07140
  If `pDecodeInfo->pSetupReferenceSlot` is not `NULL` and VkVideoDecodeCapabilitiesKHR::`flags` does not include VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_COINCIDE_BIT_KHR, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile the bound video session was created with, then the video picture resources specified by `pDecodeInfo->dstPictureResource` and `pDecodeInfo->pSetupReferenceSlot->pPictureResource` must not match

- VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07141
  If `pDecodeInfo->pSetupReferenceSlot` is not `NULL` and none of the following is true:

  - VkVideoDecodeCapabilitiesKHR::`flags` includes VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_DISTINCT_BIT_KHR, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile the bound video session was created with

  - the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_AV1_BIT_KHR and VkVideoDecodeAV1ProfileInfoKHR::`filmGrainSupport` set to VK_TRUE, and film grain is enabled for the decoded picture

  then the video picture resources specified by `pDecodeInfo->dstPictureResource` and `pDecodeInfo->pSetupReferenceSlot->pPictureResource` must match

- VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07142
  `pDecodeInfo->dstPictureResource.imageViewBinding` must be compatible with the video profile the bound video session was created with

- VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07143
  The format of `pDecodeInfo->dstPictureResource.imageViewBinding` must match the VkVideoSessionCreateInfoKHR::`pictureFormat` the bound video session was created with

- VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07144
  `pDecodeInfo->dstPictureResource.codedOffset` must be an integer multiple of `codedOffsetGranularity`

- VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07145
  `pDecodeInfo->dstPictureResource.codedExtent` must be between `minCodedExtent` and `maxCodedExtent`, inclusive, the bound video session was created with

- VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07146
  `pDecodeInfo->dstPictureResource.imageViewBinding` must have been created with the VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR usage flag set

- VUID-vkCmdDecodeVideoKHR-commandBuffer-07147
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, then `pDecodeInfo->dstPictureResource.imageViewBinding` must not have been created from a protected image

- VUID-vkCmdDecodeVideoKHR-commandBuffer-07148
  If `commandBuffer` is a protected command buffer and `protectedNoFault` is not supported, then `pDecodeInfo->dstPictureResource.imageViewBinding` must have been created from a protected image

- VUID-vkCmdDecodeVideoKHR-pDecodeInfo-08376
  `pDecodeInfo->pSetupReferenceSlot` must not be `NULL` unless the bound video session was created with VkVideoSessionCreateInfoKHR::`maxDpbSlots` equal to zero

- VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07170
  If `pDecodeInfo->pSetupReferenceSlot` is not `NULL`, then `pDecodeInfo->pSetupReferenceSlot->slotIndex` must be less than the VkVideoSessionCreateInfoKHR::`maxDpbSlots` specified when the bound video session was created

- VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07173
  If `pDecodeInfo->pSetupReferenceSlot` is not `NULL`, then `pDecodeInfo->pSetupReferenceSlot->pPictureResource->codedOffset` must be an integer multiple of `codedOffsetGranularity`

- VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07149
  If `pDecodeInfo->pSetupReferenceSlot` is not `NULL`, then `pDecodeInfo->pSetupReferenceSlot->pPictureResource` must match one of the bound reference picture resource

- VUID-vkCmdDecodeVideoKHR-activeReferencePictureCount-07150
  `activeReferencePictureCount` must be less than or equal to the VkVideoSessionCreateInfoKHR::`maxActiveReferencePictures` specified when the bound video session was created

- VUID-vkCmdDecodeVideoKHR-slotIndex-07256
  The `slotIndex` member of each element of `pDecodeInfo->pReferenceSlots` must be less than the VkVideoSessionCreateInfoKHR::`maxDpbSlots` specified when the bound video session was created

- VUID-vkCmdDecodeVideoKHR-codedOffset-07257
  The `codedOffset` member of the VkVideoPictureResourceInfoKHR structure pointed to by the `pPictureResource` member of each element of `pDecodeInfo->pReferenceSlots` must be an integer multiple of `codedOffsetGranularity`

- VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07151
  The `pPictureResource` member of each element of `pDecodeInfo->pReferenceSlots` must match one of the bound reference picture resource associated with the DPB slot index specified in the `slotIndex` member of that element

- VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07264
  Each video picture resource corresponding to the `pPictureResource` member specified in the elements of `pDecodeInfo->pReferenceSlots` must be unique within `pDecodeInfo->pReferenceSlots`

- VUID-vkCmdDecodeVideoKHR-dpbFrameUseCount-07176
  All elements of `dpbFrameUseCount` must be less than or equal to `1`

- VUID-vkCmdDecodeVideoKHR-dpbTopFieldUseCount-07177
  All elements of `dpbTopFieldUseCount` must be less than or equal to `1`

- VUID-vkCmdDecodeVideoKHR-dpbBottomFieldUseCount-07178
  All elements of `dpbBottomFieldUseCount` must be less than or equal to `1`

- VUID-vkCmdDecodeVideoKHR-pDecodeInfo-10801
  If `pDecodeInfo->pSetupReferenceSlot` is `NULL` or `pDecodeInfo->pSetupReferenceSlot->pPictureResource` does not refer to the same image subresource as `pDecodeInfo->dstPictureResource`, then the image subresource referred to by `pDecodeInfo->dstPictureResource` must be in the VK_IMAGE_LAYOUT_VIDEO_DECODE_DST_KHR layout at the time the video decode operation is executed on the device , unless the `unifiedImageLayoutsVideo` feature is enabled, in which case it may be in the VK_IMAGE_LAYOUT_GENERAL layout

- VUID-vkCmdDecodeVideoKHR-pDecodeInfo-10802
  If `pDecodeInfo->pSetupReferenceSlot` is not `NULL` and `pDecodeInfo->pSetupReferenceSlot->pPictureResource` refers to the same image subresource as `pDecodeInfo->dstPictureResource`, then the image subresource referred to by `pDecodeInfo->dstPictureResource` must be in the VK_IMAGE_LAYOUT_VIDEO_DECODE_DPB_KHR layout at the time the video decode operation is executed on the device , unless the `unifiedImageLayoutsVideo` feature is enabled, in which case it may be in the VK_IMAGE_LAYOUT_GENERAL layout

- VUID-vkCmdDecodeVideoKHR-pDecodeInfo-10803
  If `pDecodeInfo->pSetupReferenceSlot` is not `NULL`, then the image subresource referred to by `pDecodeInfo->pSetupReferenceSlot->pPictureResource` must be in the VK_IMAGE_LAYOUT_VIDEO_DECODE_DPB_KHR layout at the time the video decode operation is executed on the device , unless the `unifiedImageLayoutsVideo` feature is enabled, in which case it may be in the VK_IMAGE_LAYOUT_GENERAL layout

- VUID-vkCmdDecodeVideoKHR-pPictureResource-10804
  The image subresource referred to by the `pPictureResource` member of each element of `pDecodeInfo->pReferenceSlots` must be in the VK_IMAGE_LAYOUT_VIDEO_DECODE_DPB_KHR layout at the time the video decode operation is executed on the device , unless the `unifiedImageLayoutsVideo` feature is enabled, in which case it may be in the VK_IMAGE_LAYOUT_GENERAL layout

- VUID-vkCmdDecodeVideoKHR-pNext-07152
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR, then the `pNext` chain of `pDecodeInfo` must include a VkVideoDecodeH264PictureInfoKHR structure

- VUID-vkCmdDecodeVideoKHR-None-07258
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR but was not created with interlaced frame support, then the decode output picture must represent a frame

- VUID-vkCmdDecodeVideoKHR-pSliceOffsets-07153
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR, then all elements of the `pSliceOffsets` member of the VkVideoDecodeH264PictureInfoKHR structure included in the `pNext` chain of `pDecodeInfo` must be less than `pDecodeInfo->srcBufferRange`

- VUID-vkCmdDecodeVideoKHR-None-10400
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR, then there must be a bound video session parameters object if any of the following conditions are not met:

  - the bound video session was created with VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR

  - the `pNext` chain of `pDecodeInfo` includes a VkVideoDecodeH264InlineSessionParametersInfoKHR structure

  - the `pStdSPS` member of the VkVideoDecodeH264InlineSessionParametersInfoKHR structure included in the `pNext` chain of `pDecodeInfo` is not `NULL`

  - the `pStdPPS` member of the VkVideoDecodeH264InlineSessionParametersInfoKHR structure included in the `pNext` chain of `pDecodeInfo` is not `NULL`

- VUID-vkCmdDecodeVideoKHR-StdVideoH264SequenceParameterSet-07154
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR, then the bound video session parameters object must contain a `StdVideoH264SequenceParameterSet` entry with `seq_parameter_set_id` matching `StdVideoDecodeH264PictureInfo`::`seq_parameter_set_id` that is provided in the `pStdPictureInfo` member of the VkVideoDecodeH264PictureInfoKHR structure included in the `pNext` chain of `pDecodeInfo` , unless the bound video session was created with VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR and the `pNext` chain of `pDecodeInfo` includes a VkVideoDecodeH264InlineSessionParametersInfoKHR structure, and its `pStdSPS` member is not equal to `NULL`

- VUID-vkCmdDecodeVideoKHR-pNext-10401
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR and with VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR, and the `pNext` chain of `pDecodeInfo` includes a VkVideoDecodeH264InlineSessionParametersInfoKHR structure with a non-`NULL` `pStdSPS` member, then `pStdSPS->seq_parameter_set_id` must equal `StdVideoDecodeH264PictureInfo`::`seq_parameter_set_id` provided in the `pStdPictureInfo` member of the VkVideoDecodeH264PictureInfoKHR structure included in the `pNext` chain of `pDecodeInfo`

- VUID-vkCmdDecodeVideoKHR-StdVideoH264PictureParameterSet-07155
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR, then the bound video session parameters object must contain a `StdVideoH264PictureParameterSet` entry with `seq_parameter_set_id` and `pic_parameter_set_id` matching `StdVideoDecodeH264PictureInfo`::`seq_parameter_set_id` and `StdVideoDecodeH264PictureInfo`::`pic_parameter_set_id`, respectively, that are provided in the `pStdPictureInfo` member of the VkVideoDecodeH264PictureInfoKHR structure included in the `pNext` chain of `pDecodeInfo` , unless the bound video session was created with VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR and the `pNext` chain of `pDecodeInfo` includes a VkVideoDecodeH264InlineSessionParametersInfoKHR structure, and its `pStdPPS` member is not equal to `NULL`

- VUID-vkCmdDecodeVideoKHR-pNext-10402
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR and with VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR, and the `pNext` chain of `pDecodeInfo` includes a VkVideoDecodeH264InlineSessionParametersInfoKHR structure with a non-`NULL` `pStdPPS` member, then `pStdPPS->seq_parameter_set_id` and `pStdPPS->pic_parameter_set_id` must equal `StdVideoDecodeH264PictureInfo`::`seq_parameter_set_id` and `StdVideoDecodeH264PictureInfo`::`pic_parameter_set_id`, respectively, provided in the `pStdPictureInfo` member of the VkVideoDecodeH264PictureInfoKHR structure included in the `pNext` chain of `pDecodeInfo`

- VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07156
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR and `pDecodeInfo->pSetupReferenceSlot` is not `NULL`, then the `pNext` chain of `pDecodeInfo->pSetupReferenceSlot` must include a VkVideoDecodeH264DpbSlotInfoKHR structure

- VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07259
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR but was not created with interlaced frame support, and `pDecodeInfo->pSetupReferenceSlot` is not `NULL`, then the reconstructed picture must represent a frame

- VUID-vkCmdDecodeVideoKHR-pNext-07157
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR, then the `pNext` chain of each element of `pDecodeInfo->pReferenceSlots` must include a VkVideoDecodeH264DpbSlotInfoKHR structure

- VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07260
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR but was not created with interlaced frame support, then each active reference picture corresponding to the elements of `pDecodeInfo->pReferenceSlots` must represent a frame

- VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07261
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR, `pDecodeInfo->pSetupReferenceSlot` is not `NULL`, and the decode output picture represents a frame, then the reconstructed picture must also represent a frame

- VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07262
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR, `pDecodeInfo->pSetupReferenceSlot` is not `NULL`, and the decode output picture represents a top field, then the reconstructed picture must also represent a top field

- VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07263
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR, `pDecodeInfo->pSetupReferenceSlot` is not `NULL`, and the decode output picture represents a bottom field, then the reconstructed picture must also represent a bottom field

- VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07266
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR and an active reference picture corresponding to any element of `pDecodeInfo->pReferenceSlots` represents a frame, then the DPB slot index of the bound video session specified by the `slotIndex` member of that element must be currently associated with a frame picture matching the video picture resource specified by the `pPictureResource` member of the same element at the time the command is executed on the device

- VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07267
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR and an active reference picture corresponding to any element of `pDecodeInfo->pReferenceSlots` represents a top field, then the DPB slot index of the bound video session specified by the `slotIndex` member of that element must be currently associated with a top field picture matching the video picture resource specified by the `pPictureResource` member of the same element at the time the command is executed on the device

- VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07268
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR and an active reference picture corresponding to any element of `pDecodeInfo->pReferenceSlots` represents a bottom field, then the DPB slot index of the bound video session specified by the `slotIndex` member of that element must be currently associated with a bottom field picture matching the video picture resource specified by the `pPictureResource` member of the same element at the time the command is executed on the device

- VUID-vkCmdDecodeVideoKHR-pNext-07158
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR, then the `pNext` chain of `pDecodeInfo` must include a VkVideoDecodeH265PictureInfoKHR structure

- VUID-vkCmdDecodeVideoKHR-pSliceSegmentOffsets-07159
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR, then all elements of the `pSliceSegmentOffsets` member of the VkVideoDecodeH265PictureInfoKHR structure included in the `pNext` chain of `pDecodeInfo` must be less than `pDecodeInfo->srcBufferRange`

- VUID-vkCmdDecodeVideoKHR-None-10403
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR, then there must be a bound video session parameters object if any of the following conditions are not met:

  - the bound video session was created with VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR

  - the `pNext` chain of `pDecodeInfo` includes a VkVideoDecodeH265InlineSessionParametersInfoKHR structure

  - the `pStdVPS` member of the VkVideoDecodeH265InlineSessionParametersInfoKHR structure included in the `pNext` chain of `pDecodeInfo` is not `NULL`

  - the `pStdSPS` member of the VkVideoDecodeH265InlineSessionParametersInfoKHR structure included in the `pNext` chain of `pDecodeInfo` is not `NULL`

  - the `pStdPPS` member of the VkVideoDecodeH265InlineSessionParametersInfoKHR structure included in the `pNext` chain of `pDecodeInfo` is not `NULL`

- VUID-vkCmdDecodeVideoKHR-StdVideoH265VideoParameterSet-07160
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR, then the bound video session parameters object must contain a `StdVideoH265VideoParameterSet` entry with `vps_video_parameter_set_id` matching `StdVideoDecodeH265PictureInfo`::`sps_video_parameter_set_id` that is provided in the `pStdPictureInfo` member of the VkVideoDecodeH265PictureInfoKHR structure included in the `pNext` chain of `pDecodeInfo` , unless the bound video session was created with VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR and the `pNext` chain of `pDecodeInfo` includes a VkVideoDecodeH265InlineSessionParametersInfoKHR structure, and its `pStdVPS` member is not equal to `NULL`

- VUID-vkCmdDecodeVideoKHR-pNext-10404
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR and with VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR, and the `pNext` chain of `pDecodeInfo` includes a VkVideoDecodeH265InlineSessionParametersInfoKHR structure with a non-`NULL` `pStdVPS` member, then `pStdVPS->vps_video_parameter_set_id` must equal `StdVideoDecodeH265PictureInfo`::`sps_video_parameter_set_id` provided in the `pStdPictureInfo` member of the VkVideoDecodeH265PictureInfoKHR structure included in the `pNext` chain of `pDecodeInfo`

- VUID-vkCmdDecodeVideoKHR-StdVideoH265SequenceParameterSet-07161
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR, then the bound video session parameters object must contain a `StdVideoH265SequenceParameterSet` entry with `sps_video_parameter_set_id` and `sps_seq_parameter_set_id` matching `StdVideoDecodeH265PictureInfo`::`sps_video_parameter_set_id` and `StdVideoDecodeH265PictureInfo`::`pps_seq_parameter_set_id`, respectively, that are provided in the `pStdPictureInfo` member of the VkVideoDecodeH265PictureInfoKHR structure included in the `pNext` chain of `pDecodeInfo` , unless the bound video session was created with VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR and the `pNext` chain of `pDecodeInfo` includes a VkVideoDecodeH265InlineSessionParametersInfoKHR structure, and its `pStdSPS` member is not equal to `NULL`

- VUID-vkCmdDecodeVideoKHR-pNext-10405
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR and with VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR, and the `pNext` chain of `pDecodeInfo` includes a VkVideoDecodeH265InlineSessionParametersInfoKHR structure with a non-`NULL` `pStdSPS` member, then `pStdSPS->sps_video_parameter_set_id` and `pStdSPS->sps_seq_parameter_set_id` must equal `StdVideoDecodeH265PictureInfo`::`sps_video_parameter_set_id` and `StdVideoDecodeH265PictureInfo`::`pps_seq_parameter_set_id`, respectively, provided in the `pStdPictureInfo` member of the VkVideoDecodeH265PictureInfoKHR structure included in the `pNext` chain of `pDecodeInfo`

- VUID-vkCmdDecodeVideoKHR-StdVideoH265PictureParameterSet-07162
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR, then the bound video session parameters object must contain a `StdVideoH265PictureParameterSet` entry with `sps_video_parameter_set_id`, `pps_seq_parameter_set_id`, and `pps_pic_parameter_set_id` matching `StdVideoDecodeH265PictureInfo`::`sps_video_parameter_set_id`, `StdVideoDecodeH265PictureInfo`::`pps_seq_parameter_set_id`, and `StdVideoDecodeH265PictureInfo`::`pps_pic_parameter_set_id`, respectively, that are provided in the `pStdPictureInfo` member of the VkVideoDecodeH265PictureInfoKHR structure included in the `pNext` chain of `pDecodeInfo` , unless the bound video session was created with VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR and the `pNext` chain of `pDecodeInfo` includes a VkVideoDecodeH265InlineSessionParametersInfoKHR structure, and its `pStdPPS` member is not equal to `NULL`

- VUID-vkCmdDecodeVideoKHR-pNext-10406
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR and with VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR, and the `pNext` chain of `pDecodeInfo` includes a VkVideoDecodeH265InlineSessionParametersInfoKHR structure with a non-`NULL` `pStdPPS` member, then `pStdPPS->sps_video_parameter_set_id`, `pStdPPS->pps_seq_parameter_set_id`, and `pStdPPS->pps_pic_parameter_set_id` must equal `StdVideoDecodeH265PictureInfo`::`sps_video_parameter_set_id`, `StdVideoDecodeH265PictureInfo`::`pps_seq_parameter_set_id`, and `StdVideoDecodeH265PictureInfo`::`pps_pic_parameter_set_id`, respectively, provided in the `pStdPictureInfo` member of the VkVideoDecodeH265PictureInfoKHR structure included in the `pNext` chain of `pDecodeInfo`

- VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07163
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR and `pDecodeInfo->pSetupReferenceSlot` is not `NULL`, then the `pNext` chain of `pDecodeInfo->pSetupReferenceSlot` must include a VkVideoDecodeH265DpbSlotInfoKHR structure

- VUID-vkCmdDecodeVideoKHR-pNext-07164
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR, then the `pNext` chain of each element of `pDecodeInfo->pReferenceSlots` must include a VkVideoDecodeH265DpbSlotInfoKHR structure

- VUID-vkCmdDecodeVideoKHR-pNext-10805
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_VP9_BIT_KHR, then the `pNext` chain of `pDecodeInfo` must include a VkVideoDecodeVP9PictureInfoKHR structure

- VUID-vkCmdDecodeVideoKHR-uncompressedHeaderOffset-10806
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_VP9_BIT_KHR, then the `uncompressedHeaderOffset` member of the VkVideoDecodeVP9PictureInfoKHR structure included in the `pNext` chain of `pDecodeInfo` must be less than `pDecodeInfo->srcBufferRange`

- VUID-vkCmdDecodeVideoKHR-compressedHeaderOffset-10807
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_VP9_BIT_KHR, then the `compressedHeaderOffset` member of the VkVideoDecodeVP9PictureInfoKHR structure included in the `pNext` chain of `pDecodeInfo` must be less than `pDecodeInfo->srcBufferRange`

- VUID-vkCmdDecodeVideoKHR-tilesOffset-10808
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_VP9_BIT_KHR, then the `tilesOffset` member of the VkVideoDecodeVP9PictureInfoKHR structure included in the `pNext` chain of `pDecodeInfo` must be less than `pDecodeInfo->srcBufferRange`

- VUID-vkCmdDecodeVideoKHR-referenceNameSlotIndices-10809
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_VP9_BIT_KHR, then each element of the `referenceNameSlotIndices` array member of the VkVideoDecodeVP9PictureInfoKHR structure included in the `pNext` chain of `pDecodeInfo` must either be negative or must equal the `slotIndex` member of one of the elements of `pDecodeInfo->pReferenceSlots`

- VUID-vkCmdDecodeVideoKHR-slotIndex-10810
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_VP9_BIT_KHR, then the `slotIndex` member of each element of `pDecodeInfo->pReferenceSlots` must equal one of the elements of the `referenceNameSlotIndices` array member of the VkVideoDecodeVP9PictureInfoKHR structure included in the `pNext` chain of `pDecodeInfo`

- VUID-vkCmdDecodeVideoKHR-filmGrainSupport-09248
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_AV1_BIT_KHR and VkVideoDecodeAV1ProfileInfoKHR::`filmGrainSupport` set to VK_FALSE, then film grain must not be enabled for the decoded picture

- VUID-vkCmdDecodeVideoKHR-pDecodeInfo-09249
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_AV1_BIT_KHR, `pDecodeInfo->pSetupReferenceSlot` is not `NULL`, and film grain is enabled for the decoded picture, then the video picture resources specified by `pDecodeInfo->dstPictureResource` and `pDecodeInfo->pSetupReferenceSlot->pPictureResource` must not match

- VUID-vkCmdDecodeVideoKHR-pNext-09250
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_AV1_BIT_KHR, then the `pNext` chain of `pDecodeInfo` must include a VkVideoDecodeAV1PictureInfoKHR structure

- VUID-vkCmdDecodeVideoKHR-frameHeaderOffset-09251
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_AV1_BIT_KHR, then the `frameHeaderOffset` member of the VkVideoDecodeAV1PictureInfoKHR structure included in the `pNext` chain of `pDecodeInfo` must be less than `pDecodeInfo->srcBufferRange`

- VUID-vkCmdDecodeVideoKHR-pTileOffsets-09253
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_AV1_BIT_KHR, then all elements of the `pTileOffsets` member of the VkVideoDecodeAV1PictureInfoKHR structure included in the `pNext` chain of `pDecodeInfo` must be less than `pDecodeInfo->srcBufferRange`

- VUID-vkCmdDecodeVideoKHR-pTileOffsets-09252
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_AV1_BIT_KHR, then for each element i of the `pTileOffsets` and `pTileSizes` members of the VkVideoDecodeAV1PictureInfoKHR structure included in the `pNext` chain of `pDecodeInfo` the sum of `pTileOffsets`[i] and `pTileSizes`[i] must be less than or equal to `pDecodeInfo->srcBufferRange`

- VUID-vkCmdDecodeVideoKHR-pDecodeInfo-09254
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_AV1_BIT_KHR and `pDecodeInfo->pSetupReferenceSlot` is not `NULL`, then the `pNext` chain of `pDecodeInfo->pSetupReferenceSlot` must include a VkVideoDecodeAV1DpbSlotInfoKHR structure

- VUID-vkCmdDecodeVideoKHR-pNext-09255
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_AV1_BIT_KHR, then the `pNext` chain of each element of `pDecodeInfo->pReferenceSlots` must include a VkVideoDecodeAV1DpbSlotInfoKHR structure

- VUID-vkCmdDecodeVideoKHR-referenceNameSlotIndices-09262
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_AV1_BIT_KHR, then each element of the `referenceNameSlotIndices` array member of the VkVideoDecodeAV1PictureInfoKHR structure included in the `pNext` chain of `pDecodeInfo` must either be negative or must equal the `slotIndex` member of one of the elements of `pDecodeInfo->pReferenceSlots`

- VUID-vkCmdDecodeVideoKHR-slotIndex-09263
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_AV1_BIT_KHR, then the `slotIndex` member of each element of `pDecodeInfo->pReferenceSlots` must equal one of the elements of the `referenceNameSlotIndices` array member of the VkVideoDecodeAV1PictureInfoKHR structure included in the `pNext` chain of `pDecodeInfo`

- VUID-vkCmdDecodeVideoKHR-None-10407
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_AV1_BIT_KHR, then there must be a bound video session parameters object if any of the following conditions are not met:

  - the bound video session was created with VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR

  - the `pNext` chain of `pDecodeInfo` includes a VkVideoDecodeAV1InlineSessionParametersInfoKHR structure

  - the `pStdSequenceHeader` member of the VkVideoDecodeAV1InlineSessionParametersInfoKHR structure included in the `pNext` chain of `pDecodeInfo` is not `NULL`

Valid Usage (Implicit)

- VUID-vkCmdDecodeVideoKHR-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdDecodeVideoKHR-pDecodeInfo-parameter
  `pDecodeInfo` must be a valid pointer to a valid VkVideoDecodeInfoKHR structure

- VUID-vkCmdDecodeVideoKHR-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdDecodeVideoKHR-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_VIDEO_DECODE_BIT_KHR operations

- VUID-vkCmdDecodeVideoKHR-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdDecodeVideoKHR-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdDecodeVideoKHR-videocoding
  This command must only be called inside of a video coding scope

- VUID-vkCmdDecodeVideoKHR-bufferlevel
  `commandBuffer` must be a primary `VkCommandBuffer`

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary | Outside | Inside | VK_QUEUE_VIDEO_DECODE_BIT_KHR | Action

Conditional Rendering

vkCmdDecodeVideoKHR is not affected by conditional rendering

The `VkVideoDecodeInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_decode_queue
    typedef struct VkVideoDecodeInfoKHR {
        VkStructureType                       sType;
        const void*                           pNext;
        VkVideoDecodeFlagsKHR                 flags;
        VkBuffer                              srcBuffer;
        VkDeviceSize                          srcBufferOffset;
        VkDeviceSize                          srcBufferRange;
        VkVideoPictureResourceInfoKHR         dstPictureResource;
        const VkVideoReferenceSlotInfoKHR*    pSetupReferenceSlot;
        uint32_t                              referenceSlotCount;
        const VkVideoReferenceSlotInfoKHR*    pReferenceSlots;
    } VkVideoDecodeInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is reserved for future use.

- `srcBuffer` is the source video bitstream buffer to read the encoded bitstream from.

- `srcBufferOffset` is the starting offset in bytes from the start of `srcBuffer` to read the encoded bitstream from.

- `srcBufferRange` is the size in bytes of the encoded bitstream to decode from `srcBuffer`, starting from `srcBufferOffset`.

- `dstPictureResource` is the video picture resource to use as the decode output picture.

- `pSetupReferenceSlot` is `NULL` or a pointer to a VkVideoReferenceSlotInfoKHR structure specifying the reconstructed picture information.

- `referenceSlotCount` is the number of elements in the `pReferenceSlots` array.

- `pReferenceSlots` is `NULL` or a pointer to an array of VkVideoReferenceSlotInfoKHR structures describing the DPB slots and corresponding reference picture resources to use in this video decode operation (the set of active reference pictures).

Valid Usage

- VUID-VkVideoDecodeInfoKHR-srcBuffer-07165
  `srcBuffer` must have been created with the VK_BUFFER_USAGE_VIDEO_DECODE_SRC_BIT_KHR usage flag set

- VUID-VkVideoDecodeInfoKHR-srcBufferOffset-07166
  `srcBufferOffset` must be less than the size of `srcBuffer`

- VUID-VkVideoDecodeInfoKHR-srcBufferRange-07167
  `srcBufferRange` must be less than or equal to the size of `srcBuffer` minus `srcBufferOffset`

- VUID-VkVideoDecodeInfoKHR-pSetupReferenceSlot-07168
  If `pSetupReferenceSlot` is not `NULL`, then its `slotIndex` member must not be negative

- VUID-VkVideoDecodeInfoKHR-pSetupReferenceSlot-07169
  If `pSetupReferenceSlot` is not `NULL`, then its `pPictureResource` must not be `NULL`

- VUID-VkVideoDecodeInfoKHR-slotIndex-07171
  The `slotIndex` member of each element of `pReferenceSlots` must not be negative

- VUID-VkVideoDecodeInfoKHR-pPictureResource-07172
  The `pPictureResource` member of each element of `pReferenceSlots` must not be `NULL`

Valid Usage (Implicit)

- VUID-VkVideoDecodeInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_DECODE_INFO_KHR

- VUID-VkVideoDecodeInfoKHR-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkVideoDecodeAV1InlineSessionParametersInfoKHR, VkVideoDecodeAV1PictureInfoKHR, VkVideoDecodeH264InlineSessionParametersInfoKHR, VkVideoDecodeH264PictureInfoKHR, VkVideoDecodeH265InlineSessionParametersInfoKHR, VkVideoDecodeH265PictureInfoKHR, VkVideoDecodeVP9PictureInfoKHR, or VkVideoInlineQueryInfoKHR

- VUID-VkVideoDecodeInfoKHR-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkVideoDecodeInfoKHR-flags-zerobitmask
  `flags` must be `0`

- VUID-VkVideoDecodeInfoKHR-srcBuffer-parameter
  `srcBuffer` must be a valid VkBuffer handle

- VUID-VkVideoDecodeInfoKHR-dstPictureResource-parameter
  `dstPictureResource` must be a valid VkVideoPictureResourceInfoKHR structure

- VUID-VkVideoDecodeInfoKHR-pSetupReferenceSlot-parameter
  If `pSetupReferenceSlot` is not `NULL`, `pSetupReferenceSlot` must be a valid pointer to a valid VkVideoReferenceSlotInfoKHR structure

- VUID-VkVideoDecodeInfoKHR-pReferenceSlots-parameter
  If `referenceSlotCount` is not `0`, `pReferenceSlots` must be a valid pointer to an array of `referenceSlotCount` valid VkVideoReferenceSlotInfoKHR structures

    // Provided by VK_KHR_video_decode_queue
    typedef VkFlags VkVideoDecodeFlagsKHR;

`VkVideoDecodeFlagsKHR` is a bitmask type for setting a mask, but is currently reserved for future use.

### 49.12. H.264 Decode Operations

Video decode operations using an H.264 decode profile can be used to decode elementary video stream sequences compliant to the ITU-T H.264 Specification.

Note | Refer to the Preamble for information on how the Khronos Intellectual Property Rights Policy relates to normative references to external materials not created by Khronos.

This process is performed according to the video decode operation steps with the codec-specific semantics defined in section 8 of the ITU-T H.264 Specification as follows:

- Syntax elements, derived values, and other parameters are applied from the following structures:

  - The `StdVideoH264SequenceParameterSet` structure corresponding to the active SPS specifying the H.264 sequence parameter set.

  - The `StdVideoH264PictureParameterSet` structure corresponding to the active PPS specifying the H.264 picture parameter set.

  - The `StdVideoDecodeH264PictureInfo` structure specifying the H.264 picture information.

  - The `StdVideoDecodeH264ReferenceInfo` structures specifying the H.264 reference information corresponding to the optional reconstructed picture and any active reference pictures.

- The contents of the provided video bitstream buffer range are interpreted as defined in the H.264 Decode Bitstream Data Access section.

- Picture data in the video picture resources corresponding to the used active reference pictures, decode output picture, and optional reconstructed picture is accessed as defined in the H.264 Decode Picture Data Access section.

- The decision on reference picture setup is made according to the parameters specified in the H.264 picture information.

If the parameters and the bitstream adhere to the syntactic and semantic requirements defined in the corresponding sections of the ITU-T H.264 Specification, as described above, and the DPB slots associated with the active reference pictures all refer to valid picture references, then the video decode operation will complete successfully. Otherwise, the video decode operation may complete unsuccessfully.

#### 49.12.1. H.264 Decode Bitstream Data Access

If the target decode output picture is a frame, then the video bitstream buffer range should contain a VCL NAL unit comprised of the slice headers and data of a picture representing an entire frame, as defined in sections 7.3.3 and 7.3.4, and this data is interpreted as defined in sections 7.4.3 and 7.4.4 of the ITU-T H.264 Specification, respectively.

If the target decode output picture is a field, then the video bitstream buffer range should contain a VCL NAL unit comprised of the slice headers and data of a picture representing a field, as defined in sections 7.3.3 and 7.3.4, and this data is interpreted as defined in sections 7.4.3 and 7.4.4 of the ITU-T H.264 Specification, respectively.

The offsets provided in VkVideoDecodeH264PictureInfoKHR::`pSliceOffsets` should specify the starting offsets corresponding to each slice header within the video bitstream buffer range.

#### 49.12.2. H.264 Decode Picture Data Access

The effective `imageOffset` and `imageExtent` corresponding to a decode output picture, reference picture, or reconstructed picture used in video decode operations with an H.264 decode profile are defined as follows:

- `imageOffset` is (`codedOffset.x`,`codedOffset.y`) and `imageExtent` is (`codedExtent.width`, `codedExtent.height`), if the picture represents a frame.

- `imageOffset` is (`codedOffset.x`,`codedOffset.y`) and `imageExtent` is (`codedExtent.width`, `codedExtent.height`), if the picture represents a field and the picture layout of the used H.264 decode profile is VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_INTERLACED_INTERLEAVED_LINES_BIT_KHR.

- `imageOffset` is (`codedOffset.x`,`codedOffset.y`) and `imageExtent` is (`codedExtent.width`, `codedExtent.height` / 2), if the picture represents a field and the picture layout of the used H.264 decode profile is VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_INTERLACED_SEPARATE_PLANES_BIT_KHR.

Where `codedOffset` and `codedExtent` are the members of the VkVideoPictureResourceInfoKHR structure corresponding to the picture.

However, accesses to image data within a video picture resource happen at the granularity indicated by VkVideoCapabilitiesKHR::`pictureAccessGranularity`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the used video profile. This means that the complete image subregion accessed by video coding operations using an H.264 decode profile for the video picture resource is defined as the set of texels within the coordinate range:

  ([`startX`,`endX`), [`startY`,`endY`))

Where:

- `startX` equals `imageOffset.x` rounded down to the nearest integer multiple of `pictureAccessGranularity.width`;

- `endX` equals `imageOffset.x` + `imageExtent.width` rounded up to the nearest integer multiple of `pictureAccessGranularity.width` and clamped to the width of the image subresource referred to by the corresponding VkVideoPictureResourceInfoKHR structure;

- startY equals `imageOffset.y` rounded down to the nearest integer multiple of `pictureAccessGranularity.height`;

- endY equals `imageOffset.y` + `imageExtent.height` rounded up to the nearest integer multiple of `pictureAccessGranularity.height` and clamped to the height of the image subresource referred to by the corresponding VkVideoPictureResourceInfoKHR structure.

In case of video decode operations using an H.264 decode profile, any access to a picture at the coordinates (`x`,`y`), as defined by the ITU-T H.264 Specification, is an access to the image subresource referred to by the corresponding VkVideoPictureResourceInfoKHR structure at the texel coordinates specified below:

- (`x`,`y`), if the accessed picture represents a frame.

- (`x`,`y` × 2), if the accessed picture represents a top field and the picture layout of the used H.264 decode profile is VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_INTERLACED_INTERLEAVED_LINES_BIT_KHR.

- (`x`,`y` × 2 + 1), if the accessed picture represents a bottom field and the picture layout of the used H.264 decode profile is VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_INTERLACED_INTERLEAVED_LINES_BIT_KHR.

- (`x`,`y`), if the accessed picture represents a top field and the picture layout of the used H.264 decode profile is VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_INTERLACED_SEPARATE_PLANES_BIT_KHR.

- (`codedOffset.x` + `x`,`codedOffset.y` + `y`), if the accessed picture represents a bottom field and the picture layout of the used H.264 decode profile is VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_INTERLACED_SEPARATE_PLANES_BIT_KHR.

Where `codedOffset` is the member of the corresponding VkVideoPictureResourceInfoKHR structure.

#### 49.12.3. H.264 Decode Profile

A video profile supporting H.264 video decode operations is specified by setting VkVideoProfileInfoKHR::`videoCodecOperation` to VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR and adding a `VkVideoDecodeH264ProfileInfoKHR` structure to the VkVideoProfileInfoKHR::`pNext` chain.

The `VkVideoDecodeH264ProfileInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_decode_h264
    typedef struct VkVideoDecodeH264ProfileInfoKHR {
        VkStructureType                              sType;
        const void*                                  pNext;
        StdVideoH264ProfileIdc                       stdProfileIdc;
        VkVideoDecodeH264PictureLayoutFlagBitsKHR    pictureLayout;
    } VkVideoDecodeH264ProfileInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `stdProfileIdc` is a `StdVideoH264ProfileIdc` value specifying the H.264 codec profile IDC, where enum constant `STD_VIDEO_H264_PROFILE_IDC_BASELINE` identifies the Constrained Baseline profile as defined in A.2.1.1 of the ITU-T H.264 Specification, and all other values correspond to profiles defined in section A.2 of the ITU-T H.264 Specification.

- `pictureLayout` is a VkVideoDecodeH264PictureLayoutFlagBitsKHR value specifying the picture layout used by the H.264 video sequence to be decoded.

Valid Usage (Implicit)

- VUID-VkVideoDecodeH264ProfileInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_PROFILE_INFO_KHR

- VUID-VkVideoDecodeH264ProfileInfoKHR-pictureLayout-parameter
  If `pictureLayout` is not `0`, `pictureLayout` must be a valid VkVideoDecodeH264PictureLayoutFlagBitsKHR value

Structure Chaining

Extends the structures

  - VkQueryPoolCreateInfo

  - VkVideoProfileInfoKHR

The H.264 video decode picture layout flags are defined as follows:

    // Provided by VK_KHR_video_decode_h264
    typedef enum VkVideoDecodeH264PictureLayoutFlagBitsKHR {
        VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_PROGRESSIVE_KHR = 0,
        VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_INTERLACED_INTERLEAVED_LINES_BIT_KHR = 0x00000001,
        VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_INTERLACED_SEPARATE_PLANES_BIT_KHR = 0x00000002,
    } VkVideoDecodeH264PictureLayoutFlagBitsKHR;

- VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_PROGRESSIVE_KHR specifies support for progressive content. This flag has the value `0`.

- VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_INTERLACED_INTERLEAVED_LINES_BIT_KHR specifies support for or use of a picture layout for interlaced content where all lines belonging to the top field are decoded to the even-numbered lines within the picture resource, and all lines belonging to the bottom field are decoded to the odd-numbered lines within the picture resource.

- VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_INTERLACED_SEPARATE_PLANES_BIT_KHR specifies support for or use of a picture layout for interlaced content where all lines belonging to a field are grouped together in a single image subregion, and the two fields comprising the frame can be stored in separate image subregions of the same image subresource or in separate image subresources.

    // Provided by VK_KHR_video_decode_h264
    typedef VkFlags VkVideoDecodeH264PictureLayoutFlagsKHR;

`VkVideoDecodeH264PictureLayoutFlagsKHR` is a bitmask type for setting a mask of zero or more VkVideoDecodeH264PictureLayoutFlagBitsKHR.

#### 49.12.4. H.264 Decode Capabilities

When calling vkGetPhysicalDeviceVideoCapabilitiesKHR to query the capabilities for an H.264 decode profile, the VkVideoCapabilitiesKHR::`pNext` chain must include a `VkVideoDecodeH264CapabilitiesKHR` structure that will be filled with the profile-specific capabilities.

The `VkVideoDecodeH264CapabilitiesKHR` structure is defined as:

    // Provided by VK_KHR_video_decode_h264
    typedef struct VkVideoDecodeH264CapabilitiesKHR {
        VkStructureType         sType;
        void*                   pNext;
        StdVideoH264LevelIdc    maxLevelIdc;
        VkOffset2D              fieldOffsetGranularity;
    } VkVideoDecodeH264CapabilitiesKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `maxLevelIdc` is a `StdVideoH264LevelIdc` value indicating the maximum H.264 level supported by the profile, where enum constant `STD_VIDEO_H264_LEVEL_IDC_<major>_<minor>` identifies H.264 level `<major>.<minor>` as defined in section A.3 of the ITU-T H.264 Specification.

- `fieldOffsetGranularity` is the minimum alignment for VkVideoPictureResourceInfoKHR::`codedOffset` specified for a video picture resource when using the picture layout VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_INTERLACED_SEPARATE_PLANES_BIT_KHR.

Valid Usage (Implicit)

- VUID-VkVideoDecodeH264CapabilitiesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_CAPABILITIES_KHR

Structure Chaining

Extends the structure

  - VkVideoCapabilitiesKHR

#### 49.12.5. H.264 Decode Parameter Sets

Video session parameters objects created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR can contain the following types of parameters:

H.264 Sequence Parameter Sets (SPS)

  Represented by `StdVideoH264SequenceParameterSet` structures and interpreted as follows:

  - `reserved1` and `reserved2` are used only for padding purposes and are otherwise ignored;

  - `seq_parameter_set_id` is used as the key of the SPS entry;

  - `level_idc` is one of the enum constants `STD_VIDEO_H264_LEVEL_IDC_<major>_<minor>` identifying the H.264 level `<major>.<minor>` as defined in section A.3 of the ITU-T H.264 Specification;

  - `pOffsetForRefFrame` is a pointer to an array of `num_ref_frames_in_pic_order_cnt_cycle` number of signed integers specifying the elements of the `offset_for_ref_frame` array, as defined in section 7.4.2.1.1 of the ITU-T H.264 Specification;

  - if `flags.seq_scaling_matrix_present_flag` is set, then the `StdVideoH264ScalingLists` structure pointed to by `pScalingLists` is interpreted as follows:

    - `scaling_list_present_mask` is a bitmask where bit index i corresponds to `seq_scaling_list_present_flag[i]` as defined in section 7.4.2.1 of the ITU-T H.264 Specification;

    - `use_default_scaling_matrix_mask` is a bitmask where bit index i corresponds to `UseDefaultScalingMatrix4x4Flag[i]`, when i < 6, or corresponds to `UseDefaultScalingMatrix8x8Flag[i-6]`, otherwise, as defined in section 7.3.2.1 of the ITU-T H.264 Specification;

    - `ScalingList4x4` and `ScalingList8x8` correspond to the identically named syntax elements defined in section 7.3.2.1 of the ITU-T H.264 Specification;

  - if `flags.vui_parameters_present_flag` is set, then `pSequenceParameterSetVui` is a pointer to a `StdVideoH264SequenceParameterSetVui` structure that is interpreted as follows:

    - `reserved1` is used only for padding purposes and is otherwise ignored;

    - `flags.color_description_present_flag` is interpreted as the value of `colour_description_present_flag`, as defined in section E.2.1 of the ITU-T H.264 Specification;

      Note | The name of `colour_description_present_flag` was misspelled in the Video Std header.

    - if `flags.nal_hrd_parameters_present_flag` or `flags.vcl_hrd_parameters_present_flag` is set, then the `StdVideoH264HrdParameters` structure pointed to by `pHrdParameters` is interpreted as follows:

      - `reserved1` is used only for padding purposes and is otherwise ignored;

      - all other members of `StdVideoH264HrdParameters` are interpreted as defined in section E.2.2 of the ITU-T H.264 Specification;

    - all other members of `StdVideoH264SequenceParameterSetVui` are interpreted as defined in section E.2.1 of the ITU-T H.264 Specification;

  - all other members of `StdVideoH264SequenceParameterSet` are interpreted as defined in section 7.4.2.1 of the ITU-T H.264 Specification.

H.264 Picture Parameter Sets (PPS)

  Represented by `StdVideoH264PictureParameterSet` structures and interpreted as follows:

  - the pair constructed from `seq_parameter_set_id` and `pic_parameter_set_id` is used as the key of the PPS entry;

  - if `flags.pic_scaling_matrix_present_flag` is set, then the `StdVideoH264ScalingLists` structure pointed to by `pScalingLists` is interpreted as follows:

    - `scaling_list_present_mask` is a bitmask where bit index i corresponds to `pic_scaling_list_present_flag[i]` as defined in section 7.4.2.2 of the ITU-T H.264 Specification;

    - `use_default_scaling_matrix_mask` is a bitmask where bit index i corresponds to `UseDefaultScalingMatrix4x4Flag[i]`, when i < 6, or corresponds to `UseDefaultScalingMatrix8x8Flag[i-6]`, otherwise, as defined in section 7.3.2.2 of the ITU-T H.264 Specification;

    - `ScalingList4x4` and `ScalingList8x8` correspond to the identically named syntax elements defined in section 7.3.2.2 of the ITU-T H.264 Specification;

  - all other members of `StdVideoH264PictureParameterSet` are interpreted as defined in section 7.4.2.2 of the ITU-T H.264 Specification.

When a video session parameters object is created with the codec operation VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR, the VkVideoSessionParametersCreateInfoKHR::`pNext` chain must include a `VkVideoDecodeH264SessionParametersCreateInfoKHR` structure specifying the capacity and initial contents of the object.

The `VkVideoDecodeH264SessionParametersCreateInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_decode_h264
    typedef struct VkVideoDecodeH264SessionParametersCreateInfoKHR {
        VkStructureType                                        sType;
        const void*                                            pNext;
        uint32_t                                               maxStdSPSCount;
        uint32_t                                               maxStdPPSCount;
        const VkVideoDecodeH264SessionParametersAddInfoKHR*    pParametersAddInfo;
    } VkVideoDecodeH264SessionParametersCreateInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `maxStdSPSCount` is the maximum number of H.264 SPS entries the created `VkVideoSessionParametersKHR` can contain.

- `maxStdPPSCount` is the maximum number of H.264 PPS entries the created `VkVideoSessionParametersKHR` can contain.

- `pParametersAddInfo` is `NULL` or a pointer to a VkVideoDecodeH264SessionParametersAddInfoKHR structure specifying H.264 parameters to add upon object creation.

Valid Usage (Implicit)

- VUID-VkVideoDecodeH264SessionParametersCreateInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_SESSION_PARAMETERS_CREATE_INFO_KHR

- VUID-VkVideoDecodeH264SessionParametersCreateInfoKHR-pParametersAddInfo-parameter
  If `pParametersAddInfo` is not `NULL`, `pParametersAddInfo` must be a valid pointer to a valid VkVideoDecodeH264SessionParametersAddInfoKHR structure

Structure Chaining

Extends the structure

  - VkVideoSessionParametersCreateInfoKHR

The `VkVideoDecodeH264SessionParametersAddInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_decode_h264
    typedef struct VkVideoDecodeH264SessionParametersAddInfoKHR {
        VkStructureType                            sType;
        const void*                                pNext;
        uint32_t                                   stdSPSCount;
        const StdVideoH264SequenceParameterSet*    pStdSPSs;
        uint32_t                                   stdPPSCount;
        const StdVideoH264PictureParameterSet*     pStdPPSs;
    } VkVideoDecodeH264SessionParametersAddInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `stdSPSCount` is the number of elements in the `pStdSPSs` array.

- `pStdSPSs` is a pointer to an array of `StdVideoH264SequenceParameterSet` structures describing the H.264 SPS entries to add.

- `stdPPSCount` is the number of elements in the `pStdPPSs` array.

- `pStdPPSs` is a pointer to an array of `StdVideoH264PictureParameterSet` structures describing the H.264 PPS entries to add.

This structure can be specified in the following places:

- In the `pParametersAddInfo` member of the VkVideoDecodeH264SessionParametersCreateInfoKHR structure specified in the `pNext` chain of VkVideoSessionParametersCreateInfoKHR used to create a video session parameters object. In this case, if the video codec operation the video session parameters object is created with is VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR, then it defines the set of initial parameters to add to the created object (see Creating Video Session Parameters).

- In the `pNext` chain of VkVideoSessionParametersUpdateInfoKHR. In this case, if the video codec operation the video session parameters object to be updated was created with is VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR, then it defines the set of parameters to add to it (see Updating Video Session Parameters).

Valid Usage

- VUID-VkVideoDecodeH264SessionParametersAddInfoKHR-None-04825
  The `seq_parameter_set_id` member of each `StdVideoH264SequenceParameterSet` structure specified in the elements of `pStdSPSs` must be unique within `pStdSPSs`

- VUID-VkVideoDecodeH264SessionParametersAddInfoKHR-None-04826
  The pair constructed from the `seq_parameter_set_id` and `pic_parameter_set_id` members of each `StdVideoH264PictureParameterSet` structure specified in the elements of `pStdPPSs` must be unique within `pStdPPSs`

Valid Usage (Implicit)

- VUID-VkVideoDecodeH264SessionParametersAddInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_SESSION_PARAMETERS_ADD_INFO_KHR

- VUID-VkVideoDecodeH264SessionParametersAddInfoKHR-pStdSPSs-parameter
  If `stdSPSCount` is not `0`, `pStdSPSs` must be a valid pointer to an array of `stdSPSCount` `StdVideoH264SequenceParameterSet` values

- VUID-VkVideoDecodeH264SessionParametersAddInfoKHR-pStdPPSs-parameter
  If `stdPPSCount` is not `0`, `pStdPPSs` must be a valid pointer to an array of `stdPPSCount` `StdVideoH264PictureParameterSet` values

Structure Chaining

Extends the structure

  - VkVideoSessionParametersUpdateInfoKHR

##### Inline Parameter Sets

In case of video sessions created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR and with VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR, the application can also specify the active parameter sets inline by including an instance of the VkVideoDecodeH264InlineSessionParametersInfoKHR structure in the `pNext` chain of VkVideoDecodeInfoKHR.

The `VkVideoDecodeH264InlineSessionParametersInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_decode_h264 with VK_KHR_video_maintenance2
    typedef struct VkVideoDecodeH264InlineSessionParametersInfoKHR {
        VkStructureType                            sType;
        const void*                                pNext;
        const StdVideoH264SequenceParameterSet*    pStdSPS;
        const StdVideoH264PictureParameterSet*     pStdPPS;
    } VkVideoDecodeH264InlineSessionParametersInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `pStdSPS` is `NULL` or a pointer to an instance of the `StdVideoH264SequenceParameterSet` structure describing the active H.264 SPS.

- `pStdPPS` is `NULL` or a pointer to an instance of the `StdVideoH264PictureParameterSet` structure describing the active H.264 PPS.

If `pStdSPS` or `pStdPPS` is not `NULL`, the issued video decode operations will use the parameter sets specified by them, respectively, instead of the corresponding parameter sets being sourced from the bound video session parameters object.

Valid Usage (Implicit)

- VUID-VkVideoDecodeH264InlineSessionParametersInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_INLINE_SESSION_PARAMETERS_INFO_KHR

- VUID-VkVideoDecodeH264InlineSessionParametersInfoKHR-pStdSPS-parameter
  If `pStdSPS` is not `NULL`, `pStdSPS` must be a valid pointer to a valid `StdVideoH264SequenceParameterSet` value

- VUID-VkVideoDecodeH264InlineSessionParametersInfoKHR-pStdPPS-parameter
  If `pStdPPS` is not `NULL`, `pStdPPS` must be a valid pointer to a valid `StdVideoH264PictureParameterSet` value

Structure Chaining

Extends the structure

  - VkVideoDecodeInfoKHR

#### 49.12.6. H.264 Decoding Parameters

The `VkVideoDecodeH264PictureInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_decode_h264
    typedef struct VkVideoDecodeH264PictureInfoKHR {
        VkStructureType                         sType;
        const void*                             pNext;
        const StdVideoDecodeH264PictureInfo*    pStdPictureInfo;
        uint32_t                                sliceCount;
        const uint32_t*                         pSliceOffsets;
    } VkVideoDecodeH264PictureInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `pStdPictureInfo` is a pointer to a `StdVideoDecodeH264PictureInfo` structure specifying H.264 picture information.

- `sliceCount` is the number of elements in `pSliceOffsets`.

- `pSliceOffsets` is a pointer to an array of `sliceCount` offsets specifying the start offset of the slices of the picture within the video bitstream buffer range specified in VkVideoDecodeInfoKHR.

This structure is specified in the `pNext` chain of the VkVideoDecodeInfoKHR structure passed to vkCmdDecodeVideoKHR to specify the codec-specific picture information for an H.264 decode operation.

Decode Output Picture Information

  When this structure is specified in the `pNext` chain of the VkVideoDecodeInfoKHR structure passed to vkCmdDecodeVideoKHR, the information related to the decode output picture is defined as follows:

  - If `pStdPictureInfo->flags.field_pic_flag` is not set, then the picture represents a frame.

  - If `pStdPictureInfo->flags.field_pic_flag` is set, then the picture represents a field. Specifically:

    - If `pStdPictureInfo->flags.bottom_field_flag` is not set, then the picture represents the top field of the frame.

    - If `pStdPictureInfo->flags.bottom_field_flag` is set, then the picture represents the bottom field of the frame.

  - The image subregion used is determined according to the H.264 Decode Picture Data Access section.

  - The decode output picture is associated with the H.264 picture information provided in `pStdPictureInfo`.

Std Picture Information

  The members of the `StdVideoDecodeH264PictureInfo` structure pointed to by `pStdPictureInfo` are interpreted as follows:

  - `reserved1` and `reserved2` are used only for padding purposes and are otherwise ignored;

  - `flags.is_intra` as defined in section 3.73 of the ITU-T H.264 Specification;

  - `flags.is_reference` as defined in section 3.136 of the ITU-T H.264 Specification;

  - `flags.complementary_field_pair` as defined in section 3.35 of the ITU-T H.264 Specification;

  - `seq_parameter_set_id` and `pic_parameter_set_id` are used to identify the active parameter sets, as described below;

  - all other members are interpreted as defined in section 7.4.3 of the ITU-T H.264 Specification.

Reference picture setup is controlled by the value of `StdVideoDecodeH264PictureInfo`::`flags.is_reference`. If it is set and a reconstructed picture is specified, then the latter is used as the target of picture reconstruction to activate the DPB slot specified in `pDecodeInfo->pSetupReferenceSlot->slotIndex`. If `StdVideoDecodeH264PictureInfo`::`flags.is_reference` is not set, but a reconstructed picture is specified, then the corresponding picture reference associated with the DPB slot is invalidated, as described in the DPB Slot States section.

Active Parameter Sets

  The members of the `StdVideoDecodeH264PictureInfo` structure pointed to by `pStdPictureInfo` are used to select the active parameter sets to use from the specified inline parameter sets or from the bound video session parameters object, as follows:

  - The active SPS is the SPS identified by the key specified in `StdVideoDecodeH264PictureInfo`::`seq_parameter_set_id`.

  - The active PPS is the PPS identified by the key specified by the pair constructed from `StdVideoDecodeH264PictureInfo`::`seq_parameter_set_id` and `StdVideoDecodeH264PictureInfo`::`pic_parameter_set_id`.

If the bound video session was created with VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR and any of the active parameter sets are specified inline, then the corresponding inline parameter set is used. Otherwise, the parameter set in question is sourced from the bound video session parameters object.

Valid Usage (Implicit)

- VUID-VkVideoDecodeH264PictureInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_PICTURE_INFO_KHR

- VUID-VkVideoDecodeH264PictureInfoKHR-pStdPictureInfo-parameter
  `pStdPictureInfo` must be a valid pointer to a valid `StdVideoDecodeH264PictureInfo` value

- VUID-VkVideoDecodeH264PictureInfoKHR-pSliceOffsets-parameter
  `pSliceOffsets` must be a valid pointer to an array of `sliceCount` `uint32_t` values

- VUID-VkVideoDecodeH264PictureInfoKHR-sliceCount-arraylength
  `sliceCount` must be greater than `0`

Structure Chaining

Extends the structure

  - VkVideoDecodeInfoKHR

The `VkVideoDecodeH264DpbSlotInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_decode_h264
    typedef struct VkVideoDecodeH264DpbSlotInfoKHR {
        VkStructureType                           sType;
        const void*                               pNext;
        const StdVideoDecodeH264ReferenceInfo*    pStdReferenceInfo;
    } VkVideoDecodeH264DpbSlotInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `pStdReferenceInfo` is a pointer to a `StdVideoDecodeH264ReferenceInfo` structure specifying H.264 reference information.

This structure is specified in the `pNext` chain of VkVideoDecodeInfoKHR::`pSetupReferenceSlot`, if not `NULL`, and the `pNext` chain of the elements of VkVideoDecodeInfoKHR::`pReferenceSlots` to specify the codec-specific reference picture information for an H.264 decode operation.

Active Reference Picture Information

  When this structure is specified in the `pNext` chain of the elements of VkVideoDecodeInfoKHR::`pReferenceSlots`, one or two elements are added to the list of active reference pictures used by the video decode operation for each element of VkVideoDecodeInfoKHR::`pReferenceSlots` as follows:

  - If neither `pStdReferenceInfo->flags.top_field_flag` nor `pStdReferenceInfo->flags.bottom_field_flag` is set, then the picture is added as a frame reference to the list of active reference pictures.

  - If `pStdReferenceInfo->flags.top_field_flag` is set, then the picture is added as a top field reference to the list of active reference pictures.

  - If `pStdReferenceInfo->flags.bottom_field_flag` is set, then the picture is added as a bottom field reference to the list of active reference pictures.

  - For each added reference picture, the corresponding image subregion used is determined according to the H.264 Decode Picture Data Access section.

  - Each added reference picture is associated with the DPB slot index specified in the `slotIndex` member of the corresponding element of VkVideoDecodeInfoKHR::`pReferenceSlots`.

  - Each added reference picture is associated with the H.264 reference information provided in `pStdReferenceInfo`.

Note | When both the top and bottom field of an interlaced frame currently associated with a DPB slot is intended to be used as an active reference picture and both fields are stored in the same image subregion (which is the case when using VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_INTERLACED_INTERLEAVED_LINES_BIT_KHR which stores the two fields at even and odd scanlines of the same image subregion), both references have to be provided through a single VkVideoReferenceSlotInfoKHR structure that has both `flags.top_field_flag` and `flags.bottom_field_flag` set in the `StdVideoDecodeH264ReferenceInfo` structure pointed to by the `pStdReferenceInfo` member of the VkVideoDecodeH264DpbSlotInfoKHR structure included in the corresponding VkVideoReferenceSlotInfoKHR structure’s `pNext` chain. However, this approach can only be used when both fields are stored in the same image subregion. If that is not the case (e.g. when using VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_INTERLACED_SEPARATE_PLANES_BIT_KHR which requires separate `codedOffset` values for the two fields and also allows storing the two fields of a frame in separate image layers or entirely separate images), then a separate VkVideoReferenceSlotInfoKHR structure needs to be provided for referencing the two fields, each only setting one of `flags.top_field_flag` or `flags.bottom_field_flag`, and providing the appropriate video picture resource information in VkVideoReferenceSlotInfoKHR::`pPictureResource`.

Reconstructed Picture Information

  When this structure is specified in the `pNext` chain of VkVideoDecodeInfoKHR::`pSetupReferenceSlot`, the information related to the reconstructed picture is defined as follows:

  - If neither `pStdReferenceInfo->flags.top_field_flag` nor `pStdReferenceInfo->flags.bottom_field_flag` is set, then the picture represents a frame.

  - If `pStdReferenceInfo->flags.top_field_flag` is set, then the picture represents a field, specifically, the top field of the frame.

  - If `pStdReferenceInfo->flags.bottom_field_flag` is set, then the picture represents a field, specifically, the bottom field of the frame.

  - The image subregion used is determined according to the H.264 Decode Picture Data Access section.

  - If reference picture setup is requested, then the reconstructed picture is used to activate the DPB slot with the index specified in VkVideoDecodeInfoKHR::`pSetupReferenceSlot->slotIndex`.

  - The reconstructed picture is associated with the H.264 reference information provided in `pStdReferenceInfo`.

Std Reference Information

  The members of the `StdVideoDecodeH264ReferenceInfo` structure pointed to by `pStdReferenceInfo` are interpreted as follows:

  - `flags.top_field_flag` is used to indicate whether the reference is used as top field reference;

  - `flags.bottom_field_flag` is used to indicate whether the reference is used as bottom field reference;

  - `flags.used_for_long_term_reference` is used to indicate whether the picture is marked as “used for long-term reference” as defined in section 8.2.5.1 of the ITU-T H.264 Specification;

  - `flags.is_non_existing` is used to indicate whether the picture is marked as “non-existing” as defined in section 8.2.5.2 of the ITU-T H.264 Specification;

  - all other members are interpreted as defined in section 8.2 of the ITU-T H.264 Specification.

Valid Usage (Implicit)

- VUID-VkVideoDecodeH264DpbSlotInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_DPB_SLOT_INFO_KHR

- VUID-VkVideoDecodeH264DpbSlotInfoKHR-pStdReferenceInfo-parameter
  `pStdReferenceInfo` must be a valid pointer to a valid `StdVideoDecodeH264ReferenceInfo` value

Structure Chaining

Extends the structure

  - VkVideoReferenceSlotInfoKHR

#### 49.12.7. H.264 Decode Requirements

This section describes the required H.264 decoding capabilities for physical devices that have at least one queue family that supports the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR, as returned by vkGetPhysicalDeviceQueueFamilyProperties2 in VkQueueFamilyVideoPropertiesKHR::`videoCodecOperations`.

Table 57. Required Video Std Header Versions
Video Std Header Name | Version
--- | ---
`vulkan_video_codec_h264std_decode` | 1.0.0

Table 58. Required Video Capabilities
Video Capability | Requirement | Requirement Type1
--- | --- | ---
VkVideoCapabilitiesKHR |  |
`flags` | - | min
`minBitstreamBufferOffsetAlignment` | 4096 | max
`minBitstreamBufferSizeAlignment` | 4096 | max
`pictureAccessGranularity` | (64,64) | max
`minCodedExtent` | - | max
`maxCodedExtent` | - | min
`maxDpbSlots` | 0 | min
`maxActiveReferencePictures` | 0 | min
VkVideoDecodeCapabilitiesKHR |  |
`flags` | VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_COINCIDE_BIT_KHR or VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_DISTINCT_BIT_KHR | min
VkVideoDecodeH264CapabilitiesKHR |  |
`maxLevelIdc` | `STD_VIDEO_H264_LEVEL_IDC_1_0` | min
`fieldOffsetGranularity` | (0,0) except for profiles using VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_INTERLACED_SEPARATE_PLANES_BIT_KHR | implementation-dependent

1

  The Requirement Type column specifies the requirement is either the minimum value all implementations must support, the maximum value all implementations must support, or the exact value all implementations must support. For bitmasks a minimum value is the least bits all implementations must set, but they may have additional bits set beyond this minimum.

### 49.13. H.265 Decode Operations

Video decode operations using an H.265 decode profile can be used to decode elementary video stream sequences compliant to the ITU-T H.265 Specification.

Note | Refer to the Preamble for information on how the Khronos Intellectual Property Rights Policy relates to normative references to external materials not created by Khronos.

This process is performed according to the video decode operation steps with the codec-specific semantics defined in section 8 of ITU-T H.265 Specification:

- Syntax elements, derived values, and other parameters are applied from the following structures:

  - The `StdVideoH265VideoParameterSet` structure corresponding to the active VPS specifying the H.265 video parameter set.

  - The `StdVideoH265SequenceParameterSet` structure corresponding to the active SPS specifying the H.265 sequence parameter set.

  - The `StdVideoH265PictureParameterSet` structure corresponding to the active PPS specifying the H.265 picture parameter set.

  - The `StdVideoDecodeH265PictureInfo` structure specifying the H.265 picture information.

  - The `StdVideoDecodeH265ReferenceInfo` structures specifying the H.265 reference information corresponding to the optional reconstructed picture and any active reference pictures.

- The contents of the provided video bitstream buffer range are interpreted as defined in the H.265 Decode Bitstream Data Access section.

- Picture data in the video picture resources corresponding to the used active reference pictures, decode output picture, and optional reconstructed picture is accessed as defined in the H.265 Decode Picture Data Access section.

- The decision on reference picture setup is made according to the parameters specified in the H.265 picture information.

If the parameters and the bitstream adhere to the syntactic and semantic requirements defined in the corresponding sections of the ITU-T H.265 Specification, as described above, and the DPB slots associated with the active reference pictures all refer to valid picture references, then the video decode operation will complete successfully. Otherwise, the video decode operation may complete unsuccessfully.

#### 49.13.1. H.265 Decode Bitstream Data Access

The video bitstream buffer range should contain a VCL NAL unit comprised of the slice segment headers and data of a picture representing a frame, as defined in sections 7.3.6 and 7.3.8, and this data is interpreted as defined in sections 7.4.7 and 7.4.9 of the ITU-T H.265 Specification, respectively.

The offsets provided in VkVideoDecodeH265PictureInfoKHR::`pSliceSegmentOffsets` should specify the starting offsets corresponding to each slice segment header within the video bitstream buffer range.

#### 49.13.2. H.265 Decode Picture Data Access

Accesses to image data within a video picture resource happen at the granularity indicated by VkVideoCapabilitiesKHR::`pictureAccessGranularity`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the used video profile. Accordingly, the complete image subregion of a decode output picture, reference picture, or reconstructed picture accessed by video coding operations using an H.265 decode profile is defined as the set of texels within the coordinate range:

  ([0,`endX`), [0,`endY`))

Where:

- `endX` equals `codedExtent.width` rounded up to the nearest integer multiple of `pictureAccessGranularity.width` and clamped to the width of the image subresource referred to by the corresponding VkVideoPictureResourceInfoKHR structure;

- endY equals `codedExtent.height` rounded up to the nearest integer multiple of `pictureAccessGranularity.height` and clamped to the height of the image subresource referred to by the corresponding VkVideoPictureResourceInfoKHR structure;

Where `codedExtent` is the member of the VkVideoPictureResourceInfoKHR structure corresponding to the picture.

In case of video decode operations using an H.265 decode profile, any access to a picture at the coordinates (`x`,`y`), as defined by the ITU-T H.265 Specification, is an access to the image subresource referred to by the corresponding VkVideoPictureResourceInfoKHR structure at the texel coordinates (`x`,`y`).

#### 49.13.3. H.265 Decode Profile

A video profile supporting H.265 video decode operations is specified by setting VkVideoProfileInfoKHR::`videoCodecOperation` to VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR and adding a `VkVideoDecodeH265ProfileInfoKHR` structure to the VkVideoProfileInfoKHR::`pNext` chain.

The `VkVideoDecodeH265ProfileInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_decode_h265
    typedef struct VkVideoDecodeH265ProfileInfoKHR {
        VkStructureType           sType;
        const void*               pNext;
        StdVideoH265ProfileIdc    stdProfileIdc;
    } VkVideoDecodeH265ProfileInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `stdProfileIdc` is a `StdVideoH265ProfileIdc` value specifying the H.265 codec profile IDC, as defined in section A.3 of the ITU-T H.265 Specification.

Valid Usage (Implicit)

- VUID-VkVideoDecodeH265ProfileInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_PROFILE_INFO_KHR

Structure Chaining

Extends the structures

  - VkQueryPoolCreateInfo

  - VkVideoProfileInfoKHR

#### 49.13.4. H.265 Decode Capabilities

When calling vkGetPhysicalDeviceVideoCapabilitiesKHR to query the capabilities for an H.265 decode profile, the VkVideoCapabilitiesKHR::`pNext` chain must include a `VkVideoDecodeH265CapabilitiesKHR` structure that will be filled with the profile-specific capabilities.

The `VkVideoDecodeH265CapabilitiesKHR` structure is defined as:

    // Provided by VK_KHR_video_decode_h265
    typedef struct VkVideoDecodeH265CapabilitiesKHR {
        VkStructureType         sType;
        void*                   pNext;
        StdVideoH265LevelIdc    maxLevelIdc;
    } VkVideoDecodeH265CapabilitiesKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `maxLevelIdc` is a `StdVideoH265LevelIdc` value indicating the maximum H.265 level supported by the profile, where enum constant `STD_VIDEO_H265_LEVEL_IDC_<major>_<minor>` identifies H.265 level `<major>.<minor>` as defined in section A.4 of the ITU-T H.265 Specification.

Valid Usage (Implicit)

- VUID-VkVideoDecodeH265CapabilitiesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_CAPABILITIES_KHR

Structure Chaining

Extends the structure

  - VkVideoCapabilitiesKHR

#### 49.13.5. H.265 Decode Parameter Sets

Video session parameters objects created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR can contain the following types of parameters:

H.265 Video Parameter Sets (VPS)

  Represented by `StdVideoH265VideoParameterSet` structures and interpreted as follows:

  - `reserved1`, `reserved2`, and `reserved3` are used only for padding purposes and are otherwise ignored;

  - `vps_video_parameter_set_id` is used as the key of the VPS entry;

  - the `max_latency_increase_plus1`, `max_dec_pic_buffering_minus1`, and `max_num_reorder_pics` members of the `StdVideoH265DecPicBufMgr` structure pointed to by `pDecPicBufMgr` correspond to `vps_max_latency_increase_plus1`, `vps_max_dec_pic_buffering_minus1`, and `vps_max_num_reorder_pics`, respectively, as defined in section 7.4.3.1 of the ITU-T H.265 Specification;

  - the `StdVideoH265HrdParameters` structure pointed to by `pHrdParameters` is interpreted as follows:

    - `reserved` is used only for padding purposes and is otherwise ignored;

    - `flags.fixed_pic_rate_general_flag` is a bitmask where bit index i corresponds to `fixed_pic_rate_general_flag[i]` as defined in section E.3.2 of the ITU-T H.265 Specification;

    - `flags.fixed_pic_rate_within_cvs_flag` is a bitmask where bit index i corresponds to `fixed_pic_rate_within_cvs_flag[i]` as defined in section E.3.2 of the ITU-T H.265 Specification;

    - `flags.low_delay_hrd_flag` is a bitmask where bit index i corresponds to `low_delay_hrd_flag[i]` as defined in section E.3.2 of the ITU-T H.265 Specification;

    - if `flags.nal_hrd_parameters_present_flag` is set, then `pSubLayerHrdParametersNal` is a pointer to an array of `vps_max_sub_layers_minus1` + 1 number of `StdVideoH265SubLayerHrdParameters` structures where `vps_max_sub_layers_minus1` is the corresponding member of the encompassing `StdVideoH265VideoParameterSet` structure and each element is interpreted as follows:

      - `cbr_flag` is a bitmask where bit index i corresponds to `cbr_flag[i]` as defined in section E.3.3 of the ITU-T H.265 Specification;

      - all other members of the `StdVideoH265SubLayerHrdParameters` structure are interpreted as defined in section E.3.3 of the ITU-T H.265 Specification;

    - if `flags.vcl_hrd_parameters_present_flag` is set, then `pSubLayerHrdParametersVcl` is a pointer to an array of `vps_max_sub_layers_minus1` + 1 number of `StdVideoH265SubLayerHrdParameters` structures where `vps_max_sub_layers_minus1` is the corresponding member of the encompassing `StdVideoH265VideoParameterSet` structure and each element is interpreted as follows:

      - `cbr_flag` is a bitmask where bit index i corresponds to `cbr_flag[i]` as defined in section E.3.3 of the ITU-T H.265 Specification;

      - all other members of the `StdVideoH265SubLayerHrdParameters` structure are interpreted as defined in section E.3.3 of the ITU-T H.265 Specification;

    - all other members of `StdVideoH265HrdParameters` are interpreted as defined in section E.3.2 of the ITU-T H.265 Specification;

  - the `StdVideoH265ProfileTierLevel` structure pointed to by `pProfileTierLevel` are interpreted as follows:

    - `general_level_idc` is one of the enum constants `STD_VIDEO_H265_LEVEL_IDC_<major>_<minor>` identifying the H.265 level `<major>.<minor>` as defined in section A.4 of the ITU-T H.265 Specification;

    - all other members of `StdVideoH265ProfileTierLevel` are interpreted as defined in section 7.4.4 of the ITU-T H.265 Specification;

  - all other members of `StdVideoH265VideoParameterSet` are interpreted as defined in section 7.4.3.1 of the ITU-T H.265 Specification.

H.265 Sequence Parameter Sets (SPS)

  Represented by `StdVideoH265SequenceParameterSet` structures and interpreted as follows:

  - `reserved1` and `reserved2` are used only for padding purposes and are otherwise ignored;

  - the pair constructed from `sps_video_parameter_set_id` and `sps_seq_parameter_set_id` is used as the key of the SPS entry;

  - the `StdVideoH265ProfileTierLevel` structure pointed to by `pProfileTierLevel` are interpreted as follows:

    - `general_level_idc` is one of the enum constants `STD_VIDEO_H265_LEVEL_IDC_<major>_<minor>` identifying the H.265 level `<major>.<minor>` as defined in section A.4 of the ITU-T H.265 Specification;

    - all other members of `StdVideoH265ProfileTierLevel` are interpreted as defined in section 7.4.4 of the ITU-T H.265 Specification;

  - the `max_latency_increase_plus1`, `max_dec_pic_buffering_minus1`, and `max_num_reorder_pics` members of the `StdVideoH265DecPicBufMgr` structure pointed to by `pDecPicBufMgr` correspond to `sps_max_latency_increase_plus1`, `sps_max_dec_pic_buffering_minus1`, and `sps_max_num_reorder_pics`, respectively, as defined in section 7.4.3.2 of the ITU-T H.265 Specification;

  - if `flags.sps_scaling_list_data_present_flag` is set, then the `StdVideoH265ScalingLists` structure pointed to by `pScalingLists` is interpreted as follows:

    - `ScalingList4x4`, `ScalingList8x8`, `ScalingList16x16`, and `ScalingList32x32` correspond to `ScalingList[0]`, `ScalingList[1]`, `ScalingList[2]`, and `ScalingList[3]`, respectively, as defined in section 7.3.4 of the ITU-T H.265 Specification;

    - `ScalingListDCCoef16x16` and `ScalingListDCCoef32x32` correspond to `scaling_list_dc_coef_minus8[0]` and `scaling_list_dc_coef_minus8[1]`, respectively, as defined in section 7.3.4 of the ITU-T H.265 Specification;

  - `pShortTermRefPicSet` is a pointer to an array of `num_short_term_ref_pic_sets` number of `StdVideoH265ShortTermRefPicSet` structures where each element is interpreted as follows:

    - `reserved1`, `reserved2`, and `reserved3` are used only for padding purposes and are otherwise ignored;

    - `used_by_curr_pic_flag` is a bitmask where bit index i corresponds to `used_by_curr_pic_flag[i]` as defined in section 7.4.8 of the ITU-T H.265 Specification;

    - `use_delta_flag` is a bitmask where bit index i corresponds to `use_delta_flag[i]` as defined in section 7.4.8 of the ITU-T H.265 Specification;

    - `used_by_curr_pic_s0_flag` is a bitmask where bit index i corresponds to `used_by_curr_pic_s0_flag[i]` as defined in section 7.4.8 of the ITU-T H.265 Specification;

    - `used_by_curr_pic_s1_flag` is a bitmask where bit index i corresponds to `used_by_curr_pic_s1_flag[i]` as defined in section 7.4.8 of the ITU-T H.265 Specification;

    - all other members of `StdVideoH265ShortTermRefPicSet` are interpreted as defined in section 7.4.8 of the ITU-T H.265 Specification;

  - if `flags.long_term_ref_pics_present_flag` is set then the `StdVideoH265LongTermRefPicsSps` structure pointed to by `pLongTermRefPicsSps` is interpreted as follows:

    - `used_by_curr_pic_lt_sps_flag` is a bitmask where bit index i corresponds to `used_by_curr_pic_lt_sps_flag[i]` as defined in section 7.4.3.2 of the ITU-T H.265 Specification;

    - all other members of `StdVideoH265LongTermRefPicsSps` are interpreted as defined in section 7.4.3.2 of the ITU-T H.265 Specification;

  - if `flags.vui_parameters_present_flag` is set, then the `StdVideoH265SequenceParameterSetVui` structure pointed to by `pSequenceParameterSetVui` is interpreted as follows:

    - `reserved1`, `reserved2`, and `reserved3` are used only for padding purposes and are otherwise ignored;

    - the `StdVideoH265HrdParameters` structure pointed to by `pHrdParameters` is interpreted as follows:

      - `flags.fixed_pic_rate_general_flag` is a bitmask where bit index i corresponds to `fixed_pic_rate_general_flag[i]` as defined in section E.3.2 of the ITU-T H.265 Specification;

      - `flags.fixed_pic_rate_within_cvs_flag` is a bitmask where bit index i corresponds to `fixed_pic_rate_within_cvs_flag[i]` as defined in section E.3.2 of the ITU-T H.265 Specification;

      - `flags.low_delay_hrd_flag` is a bitmask where bit index i corresponds to `low_delay_hrd_flag[i]` as defined in section E.3.2 of the ITU-T H.265 Specification;

      - if `flags.nal_hrd_parameters_present_flag` is set, then `pSubLayerHrdParametersNal` is a pointer to an array of `sps_max_sub_layers_minus1` + 1 number of `StdVideoH265SubLayerHrdParameters` structures where `sps_max_sub_layers_minus1` is the corresponding member of the encompassing `StdVideoH265SequenceParameterSet` structure and each element is interpreted as follows:

        - `cbr_flag` is a bitmask where bit index i corresponds to `cbr_flag[i]` as defined in section E.3.3 of the ITU-T H.265 Specification;

        - all other members of the `StdVideoH265SubLayerHrdParameters` structure are interpreted as defined in section E.3.3 of the ITU-T H.265 Specification;

      - if `flags.vcl_hrd_parameters_present_flag` is set, then `pSubLayerHrdParametersVcl` is a pointer to an array of `sps_max_sub_layers_minus1` + 1 number of `StdVideoH265SubLayerHrdParameters` structures where `sps_max_sub_layers_minus1` is the corresponding member of the encompassing `StdVideoH265SequenceParameterSet` structure and each element is interpreted as follows:

        - `cbr_flag` is a bitmask where bit index i corresponds to `cbr_flag[i]` as defined in section E.3.3 of the ITU-T H.265 Specification;

        - all other members of the `StdVideoH265SubLayerHrdParameters` structure are interpreted as defined in section E.3.3 of the ITU-T H.265 Specification;

      - all other members of `StdVideoH265HrdParameters` are interpreted as defined in section E.3.2 of the ITU-T H.265 Specification;

    - all other members of `pSequenceParameterSetVui` are interpreted as defined in section E.3.1 of the ITU-T H.265 Specification;

  - if `flags.sps_palette_predictor_initializer_present_flag` is set, then the `PredictorPaletteEntries` member of the `StdVideoH265PredictorPaletteEntries` structure pointed to by `pPredictorPaletteEntries` is interpreted as defined in section 7.4.9.13 of the ITU-T H.265 Specification;

  - all other members of `StdVideoH265SequenceParameterSet` are interpreted as defined in section 7.4.3.1 of the ITU-T H.265 Specification.

H.265 Picture Parameter Sets (PPS)

  Represented by `StdVideoH265PictureParameterSet` structures and interpreted as follows:

  - `reserved1`, `reserved2`, and `reserved3` are used only for padding purposes and are otherwise ignored;

  - the triplet constructed from `sps_video_parameter_set_id`, `pps_seq_parameter_set_id`, and `pps_pic_parameter_set_id` is used as the key of the PPS entry;

  - if `flags.pps_scaling_list_data_present_flag` is set, then the `StdVideoH265ScalingLists` structure pointed to by `pScalingLists` is interpreted as follows:

    - `ScalingList4x4`, `ScalingList8x8`, `ScalingList16x16`, and `ScalingList32x32` correspond to `ScalingList[0]`, `ScalingList[1]`, `ScalingList[2]`, and `ScalingList[3]`, respectively, as defined in section 7.3.4 of the ITU-T H.265 Specification;

    - `ScalingListDCCoef16x16` and `ScalingListDCCoef32x32` correspond to `scaling_list_dc_coef_minus8[0]` and `scaling_list_dc_coef_minus8[1]`, respectively, as defined in section 7.3.4 of the ITU-T H.265 Specification;

  - if `flags.pps_palette_predictor_initializer_present_flag` is set, then the `PredictorPaletteEntries` member of the `StdVideoH265PredictorPaletteEntries` structure pointed to by `pPredictorPaletteEntries` is interpreted as defined in section 7.4.9.13 of the ITU-T H.265 Specification;

  - all other members of `StdVideoH265PictureParameterSet` are interpreted as defined in section 7.4.3.3 of the ITU-T H.265 Specification.

When a video session parameters object is created with the codec operation VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR, the VkVideoSessionParametersCreateInfoKHR::`pNext` chain must include a `VkVideoDecodeH265SessionParametersCreateInfoKHR` structure specifying the capacity and initial contents of the object.

The `VkVideoDecodeH265SessionParametersCreateInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_decode_h265
    typedef struct VkVideoDecodeH265SessionParametersCreateInfoKHR {
        VkStructureType                                        sType;
        const void*                                            pNext;
        uint32_t                                               maxStdVPSCount;
        uint32_t                                               maxStdSPSCount;
        uint32_t                                               maxStdPPSCount;
        const VkVideoDecodeH265SessionParametersAddInfoKHR*    pParametersAddInfo;
    } VkVideoDecodeH265SessionParametersCreateInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `maxStdVPSCount` is the maximum number of H.265 VPS entries the created `VkVideoSessionParametersKHR` can contain.

- `maxStdSPSCount` is the maximum number of H.265 SPS entries the created `VkVideoSessionParametersKHR` can contain.

- `maxStdPPSCount` is the maximum number of H.265 PPS entries the created `VkVideoSessionParametersKHR` can contain.

- `pParametersAddInfo` is `NULL` or a pointer to a VkVideoDecodeH265SessionParametersAddInfoKHR structure specifying H.265 parameters to add upon object creation.

Valid Usage (Implicit)

- VUID-VkVideoDecodeH265SessionParametersCreateInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_SESSION_PARAMETERS_CREATE_INFO_KHR

- VUID-VkVideoDecodeH265SessionParametersCreateInfoKHR-pParametersAddInfo-parameter
  If `pParametersAddInfo` is not `NULL`, `pParametersAddInfo` must be a valid pointer to a valid VkVideoDecodeH265SessionParametersAddInfoKHR structure

Structure Chaining

Extends the structure

  - VkVideoSessionParametersCreateInfoKHR

The `VkVideoDecodeH265SessionParametersAddInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_decode_h265
    typedef struct VkVideoDecodeH265SessionParametersAddInfoKHR {
        VkStructureType                            sType;
        const void*                                pNext;
        uint32_t                                   stdVPSCount;
        const StdVideoH265VideoParameterSet*       pStdVPSs;
        uint32_t                                   stdSPSCount;
        const StdVideoH265SequenceParameterSet*    pStdSPSs;
        uint32_t                                   stdPPSCount;
        const StdVideoH265PictureParameterSet*     pStdPPSs;
    } VkVideoDecodeH265SessionParametersAddInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `stdVPSCount` is the number of elements in the `pStdVPSs` array.

- `pStdVPSs` is a pointer to an array of `StdVideoH265VideoParameterSet` structures describing the H.265 VPS entries to add.

- `stdSPSCount` is the number of elements in the `pStdSPSs` array.

- `pStdSPSs` is a pointer to an array of `StdVideoH265SequenceParameterSet` structures describing the H.265 SPS entries to add.

- `stdPPSCount` is the number of elements in the `pStdPPSs` array.

- `pStdPPSs` is a pointer to an array of `StdVideoH265PictureParameterSet` structures describing the H.265 PPS entries to add.

This structure can be specified in the following places:

- In the `pParametersAddInfo` member of the VkVideoDecodeH265SessionParametersCreateInfoKHR structure specified in the `pNext` chain of VkVideoSessionParametersCreateInfoKHR used to create a video session parameters object. In this case, if the video codec operation the video session parameters object is created with is VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR, then it defines the set of initial parameters to add to the created object (see Creating Video Session Parameters).

- In the `pNext` chain of VkVideoSessionParametersUpdateInfoKHR. In this case, if the video codec operation the video session parameters object to be updated was created with is VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR, then it defines the set of parameters to add to it (see Updating Video Session Parameters).

Valid Usage

- VUID-VkVideoDecodeH265SessionParametersAddInfoKHR-None-04833
  The `vps_video_parameter_set_id` member of each `StdVideoH265VideoParameterSet` structure specified in the elements of `pStdVPSs` must be unique within `pStdVPSs`

- VUID-VkVideoDecodeH265SessionParametersAddInfoKHR-None-04834
  The pair constructed from the `sps_video_parameter_set_id` and `sps_seq_parameter_set_id` members of each `StdVideoH265SequenceParameterSet` structure specified in the elements of `pStdSPSs` must be unique within `pStdSPSs`

- VUID-VkVideoDecodeH265SessionParametersAddInfoKHR-None-04835
  The triplet constructed from the `sps_video_parameter_set_id`, `pps_seq_parameter_set_id`, and `pps_pic_parameter_set_id` members of each `StdVideoH265PictureParameterSet` structure specified in the elements of `pStdPPSs` must be unique within `pStdPPSs`

Valid Usage (Implicit)

- VUID-VkVideoDecodeH265SessionParametersAddInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_SESSION_PARAMETERS_ADD_INFO_KHR

- VUID-VkVideoDecodeH265SessionParametersAddInfoKHR-pStdVPSs-parameter
  If `stdVPSCount` is not `0`, `pStdVPSs` must be a valid pointer to an array of `stdVPSCount` `StdVideoH265VideoParameterSet` values

- VUID-VkVideoDecodeH265SessionParametersAddInfoKHR-pStdSPSs-parameter
  If `stdSPSCount` is not `0`, `pStdSPSs` must be a valid pointer to an array of `stdSPSCount` `StdVideoH265SequenceParameterSet` values

- VUID-VkVideoDecodeH265SessionParametersAddInfoKHR-pStdPPSs-parameter
  If `stdPPSCount` is not `0`, `pStdPPSs` must be a valid pointer to an array of `stdPPSCount` `StdVideoH265PictureParameterSet` values

Structure Chaining

Extends the structure

  - VkVideoSessionParametersUpdateInfoKHR

##### Inline Parameter Sets

In case of video sessions created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR and with VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR, the application can also specify the active parameter sets inline by including an instance of the VkVideoDecodeH265InlineSessionParametersInfoKHR structure in the `pNext` chain of VkVideoDecodeInfoKHR.

The `VkVideoDecodeH265InlineSessionParametersInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_decode_h265 with VK_KHR_video_maintenance2
    typedef struct VkVideoDecodeH265InlineSessionParametersInfoKHR {
        VkStructureType                            sType;
        const void*                                pNext;
        const StdVideoH265VideoParameterSet*       pStdVPS;
        const StdVideoH265SequenceParameterSet*    pStdSPS;
        const StdVideoH265PictureParameterSet*     pStdPPS;
    } VkVideoDecodeH265InlineSessionParametersInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `pStdVPS` is `NULL` or a pointer to an instance of the `StdVideoH265VideoParameterSet` structure describing the active H.265 VPS.

- `pStdSPS` is `NULL` or a pointer to an instance of the `StdVideoH265SequenceParameterSet` structure describing the active H.265 SPS.

- `pStdPPS` is `NULL` or a pointer to an instance of the `StdVideoH265PictureParameterSet` structure describing the active H.265 PPS.

If `pStdVPS`, `pStdSPS`, or `pStdPPS` is not `NULL`, the issued video decode operations will use the parameter sets specified by them, respectively, instead of the corresponding active parameter sets being sourced from the bound video session parameters object.

Valid Usage (Implicit)

- VUID-VkVideoDecodeH265InlineSessionParametersInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_INLINE_SESSION_PARAMETERS_INFO_KHR

- VUID-VkVideoDecodeH265InlineSessionParametersInfoKHR-pStdVPS-parameter
  If `pStdVPS` is not `NULL`, `pStdVPS` must be a valid pointer to a valid `StdVideoH265VideoParameterSet` value

- VUID-VkVideoDecodeH265InlineSessionParametersInfoKHR-pStdSPS-parameter
  If `pStdSPS` is not `NULL`, `pStdSPS` must be a valid pointer to a valid `StdVideoH265SequenceParameterSet` value

- VUID-VkVideoDecodeH265InlineSessionParametersInfoKHR-pStdPPS-parameter
  If `pStdPPS` is not `NULL`, `pStdPPS` must be a valid pointer to a valid `StdVideoH265PictureParameterSet` value

Structure Chaining

Extends the structure

  - VkVideoDecodeInfoKHR

#### 49.13.6. H.265 Decoding Parameters

The `VkVideoDecodeH265PictureInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_decode_h265
    typedef struct VkVideoDecodeH265PictureInfoKHR {
        VkStructureType                         sType;
        const void*                             pNext;
        const StdVideoDecodeH265PictureInfo*    pStdPictureInfo;
        uint32_t                                sliceSegmentCount;
        const uint32_t*                         pSliceSegmentOffsets;
    } VkVideoDecodeH265PictureInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `pStdPictureInfo` is a pointer to a `StdVideoDecodeH265PictureInfo` structure specifying H.265 picture information.

- `sliceSegmentCount` is the number of elements in `pSliceSegmentOffsets`.

- `pSliceSegmentOffsets` is a pointer to an array of `sliceSegmentCount` offsets specifying the start offset of the slice segments of the picture within the video bitstream buffer range specified in VkVideoDecodeInfoKHR.

This structure is specified in the `pNext` chain of the VkVideoDecodeInfoKHR structure passed to vkCmdDecodeVideoKHR to specify the codec-specific picture information for an H.265 decode operation.

Decode Output Picture Information

  When this structure is specified in the `pNext` chain of the VkVideoDecodeInfoKHR structure passed to vkCmdDecodeVideoKHR, the information related to the decode output picture is defined as follows:

  - The image subregion used is determined according to the H.265 Decode Picture Data Access section.

  - The decode output picture is associated with the H.265 picture information provided in `pStdPictureInfo`.

Std Picture Information

  The members of the `StdVideoDecodeH265PictureInfo` structure pointed to by `pStdPictureInfo` are interpreted as follows:

  - `reserved` is used only for padding purposes and is otherwise ignored;

  - `flags.IrapPicFlag` as defined in section 3.73 of the ITU-T H.265 Specification;

  - `flags.IdrPicFlag` as defined in section 3.67 of the ITU-T H.265 Specification;

  - `flags.IsReference` as defined in section 3.132 of the ITU-T H.265 Specification;

  - `sps_video_parameter_set_id`, `pps_seq_parameter_set_id`, and `pps_pic_parameter_set_id` are used to identify the active parameter sets, as described below;

  - `PicOrderCntVal` as defined in section 8.3.1 of the ITU-T H.265 Specification;

  - `NumBitsForSTRefPicSetInSlice` is the number of bits used in `st_ref_pic_set` when `short_term_ref_pic_set_sps_flag` is `0`, or `0` otherwise, as defined in sections 7.4.7 and 7.4.8 of the ITU-T H.265 Specification;

  - `NumDeltaPocsOfRefRpsIdx` is the value of `NumDeltaPocs[RefRpsIdx]` when `short_term_ref_pic_set_sps_flag` is `1`, or `0` otherwise, as defined in sections 7.4.7 and 7.4.8 of the ITU-T H.265 Specification;

  - `RefPicSetStCurrBefore`, `RefPicSetStCurrAfter`, and `RefPicSetLtCurr` are interpreted as defined in section 8.3.2 of the ITU-T H.265 Specification where each element of these arrays either identifies an active reference picture using its DPB slot index or contains the value `STD_VIDEO_H265_NO_REFERENCE_PICTURE` to indicate “no reference picture”;

  - all other members are interpreted as defined in section 8.3.2 of the ITU-T H.265 Specification.

Reference picture setup is controlled by the value of `StdVideoDecodeH265PictureInfo`::`flags.IsReference`. If it is set and a reconstructed picture is specified, then the latter is used as the target of picture reconstruction to activate the corresponding DPB slot. If `StdVideoDecodeH265PictureInfo`::`flags.IsReference` is not set, but a reconstructed picture is specified, then the corresponding picture reference associated with the DPB slot is invalidated, as described in the DPB Slot States section.

Active Parameter Sets

  The members of the `StdVideoDecodeH265PictureInfo` structure pointed to by `pStdPictureInfo` are used to select the active parameter sets to use from the specified inline parameter sets or from the bound video session parameters object, as follows:

  - The active VPS is the VPS identified by the key specified in `StdVideoDecodeH265PictureInfo`::`sps_video_parameter_set_id`.

  - The active SPS is the SPS identified by the key specified by the pair constructed from `StdVideoDecodeH265PictureInfo`::`sps_video_parameter_set_id` and `StdVideoDecodeH265PictureInfo`::`pps_seq_parameter_set_id`.

  - The active PPS is the PPS identified by the key specified by the triplet constructed from `StdVideoDecodeH265PictureInfo`::`sps_video_parameter_set_id`, `StdVideoDecodeH265PictureInfo`::`pps_seq_parameter_set_id`, and `StdVideoDecodeH265PictureInfo`::`pps_pic_parameter_set_id`.

If the bound video session was created with VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR and any of the active parameter sets are specified inline, then the corresponding inline parameter set is used. Otherwise, the parameter set in question is sourced from the bound video session parameters object.

Valid Usage (Implicit)

- VUID-VkVideoDecodeH265PictureInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_PICTURE_INFO_KHR

- VUID-VkVideoDecodeH265PictureInfoKHR-pStdPictureInfo-parameter
  `pStdPictureInfo` must be a valid pointer to a valid `StdVideoDecodeH265PictureInfo` value

- VUID-VkVideoDecodeH265PictureInfoKHR-pSliceSegmentOffsets-parameter
  `pSliceSegmentOffsets` must be a valid pointer to an array of `sliceSegmentCount` `uint32_t` values

- VUID-VkVideoDecodeH265PictureInfoKHR-sliceSegmentCount-arraylength
  `sliceSegmentCount` must be greater than `0`

Structure Chaining

Extends the structure

  - VkVideoDecodeInfoKHR

The `VkVideoDecodeH265DpbSlotInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_decode_h265
    typedef struct VkVideoDecodeH265DpbSlotInfoKHR {
        VkStructureType                           sType;
        const void*                               pNext;
        const StdVideoDecodeH265ReferenceInfo*    pStdReferenceInfo;
    } VkVideoDecodeH265DpbSlotInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `pStdReferenceInfo` is a pointer to a `StdVideoDecodeH265ReferenceInfo` structure specifying reference picture information described in section 8.3 of the ITU-T H.265 Specification.

This structure is specified in the `pNext` chain of VkVideoDecodeInfoKHR::`pSetupReferenceSlot`, if not `NULL`, and the `pNext` chain of the elements of VkVideoDecodeInfoKHR::`pReferenceSlots` to specify the codec-specific reference picture information for an H.265 decode operation.

Active Reference Picture Information

  When this structure is specified in the `pNext` chain of the elements of VkVideoDecodeInfoKHR::`pReferenceSlots`, one element is added to the list of active reference pictures used by the video decode operation for each element of VkVideoDecodeInfoKHR::`pReferenceSlots` as follows:

  - The image subregion used is determined according to the H.265 Decode Picture Data Access section.

  - The reference picture is associated with the DPB slot index specified in the `slotIndex` member of the corresponding element of VkVideoDecodeInfoKHR::`pReferenceSlots`.

  - The reference picture is associated with the H.265 reference information provided in `pStdReferenceInfo`.

Reconstructed Picture Information

  When this structure is specified in the `pNext` chain of VkVideoDecodeInfoKHR::`pSetupReferenceSlot`, the information related to the reconstructed picture is defined as follows:

  - The image subregion used is determined according to the H.265 Decode Picture Data Access section.

  - If reference picture setup is requested, then the reconstructed picture is used to activate the DPB slot with the index specified in VkVideoDecodeInfoKHR::`pSetupReferenceSlot->slotIndex`.

  - The reconstructed picture is associated with the H.265 reference information provided in `pStdReferenceInfo`.

Std Reference Information

  The members of the `StdVideoDecodeH265ReferenceInfo` structure pointed to by `pStdReferenceInfo` are interpreted as follows:

  - `flags.used_for_long_term_reference` is used to indicate whether the picture is marked as “used for long-term reference” as defined in section 8.3.2 of the ITU-T H.265 Specification;

  - `flags.unused_for_reference` is used to indicate whether the picture is marked as “unused for reference” as defined in section 8.3.2 of the ITU-T H.265 Specification;

  - all other members are interpreted as defined in section 8.3 of the ITU-T H.265 Specification.

Valid Usage (Implicit)

- VUID-VkVideoDecodeH265DpbSlotInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_DPB_SLOT_INFO_KHR

- VUID-VkVideoDecodeH265DpbSlotInfoKHR-pStdReferenceInfo-parameter
  `pStdReferenceInfo` must be a valid pointer to a valid `StdVideoDecodeH265ReferenceInfo` value

Structure Chaining

Extends the structure

  - VkVideoReferenceSlotInfoKHR

#### 49.13.7. H.265 Decode Requirements

This section describes the required H.265 decoding capabilities for physical devices that have at least one queue family that supports the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR, as returned by vkGetPhysicalDeviceQueueFamilyProperties2 in VkQueueFamilyVideoPropertiesKHR::`videoCodecOperations`.

Table 59. Required Video Std Header Versions
Video Std Header Name | Version
--- | ---
`vulkan_video_codec_h265std_decode` | 1.0.0

Table 60. Required Video Capabilities
Video Capability | Requirement | Requirement Type1
--- | --- | ---
VkVideoCapabilitiesKHR |  |
`flags` | - | min
`minBitstreamBufferOffsetAlignment` | 4096 | max
`minBitstreamBufferSizeAlignment` | 4096 | max
`pictureAccessGranularity` | (64,64) | max
`minCodedExtent` | - | max
`maxCodedExtent` | - | min
`maxDpbSlots` | 0 | min
`maxActiveReferencePictures` | 0 | min
VkVideoDecodeCapabilitiesKHR |  |
`flags` | VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_COINCIDE_BIT_KHR or VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_DISTINCT_BIT_KHR | min
VkVideoDecodeH265CapabilitiesKHR |  |
`maxLevelIdc` | `STD_VIDEO_H265_LEVEL_IDC_1_0` | min

1

  The Requirement Type column specifies the requirement is either the minimum value all implementations must support, the maximum value all implementations must support, or the exact value all implementations must support. For bitmasks a minimum value is the least bits all implementations must set, but they may have additional bits set beyond this minimum.

### 49.14. VP9 Decode Operations

Video decode operations using an VP9 decode profile can be used to decode elementary video stream sequences compliant with the VP9 Specification.

Note | Refer to the Preamble for information on how the Khronos Intellectual Property Rights Policy relates to normative references to external materials not created by Khronos.

This process is performed according to the video decode operation steps with the codec-specific semantics defined in section 8 of the VP9 Specification:

- Syntax elements, derived values, and other parameters are applied from the `StdVideoDecodeVP9PictureInfo` structure specifying the VP9 picture information.

- The contents of the provided video bitstream buffer range are interpreted as defined in the VP9 Decode Bitstream Data Access section.

- Picture data in the video picture resources corresponding to the used active reference pictures, decode output picture, and optional reconstructed picture is accessed as defined in the VP9 Decode Picture Data Access section.

- The decision on reference picture setup is made according to the parameters specified in the VP9 picture information.

If the parameters and the bitstream adhere to the syntactic and semantic requirements defined in the corresponding sections of the VP9 Specification, as described above, and the DPB slots associated with the active reference pictures all refer to valid picture references, then the video decode operation will complete successfully. Otherwise, the video decode operation may complete unsuccessfully.

#### 49.14.1. VP9 Decode Bitstream Data Access

The video bitstream buffer range should contain the bitstream that represents an entire frame, as defined in section 6.1, and this data is interpreted as defined in section 7.1 of the VP9 Specification, respectively.

The offset specified in VkVideoDecodeVP9PictureInfoKHR::`uncompressedHeaderOffset` should specify the starting offset of the uncompressed header of the frame, as defined in section 6.2 of the VP9 Specification.

The offset specified in VkVideoDecodeVP9PictureInfoKHR::`compressedHeaderOffset` should specify the starting offset of the compressed header of the frame, as defined in section 6.3 of the VP9 Specification.

The offset specified in VkVideoDecodeVP9PictureInfoKHR::`tilesOffset` should specify the starting offset of the frame tile data, as defined in section 6.4 of the VP9 Specification.

#### 49.14.2. VP9 Decode Picture Data Access

Accesses to image data within a video picture resource happen at the granularity indicated by VkVideoCapabilitiesKHR::`pictureAccessGranularity`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the used video profile. Accordingly, the complete image subregion of a decode output picture, reference picture, or reconstructed picture accessed by video coding operations using an VP9 decode profile is defined as the set of texels within the coordinate range:

  ([0,`endX`), [0,`endY`))

Where:

- `endX` equals `codedExtent.width` rounded up to the nearest integer multiple of `pictureAccessGranularity.width` and clamped to the width of the image subresource referred to by the corresponding VkVideoPictureResourceInfoKHR structure;

- endY equals `codedExtent.height` rounded up to the nearest integer multiple of `pictureAccessGranularity.height` and clamped to the height of the image subresource referred to by the corresponding VkVideoPictureResourceInfoKHR structure;

Where `codedExtent` is the member of the VkVideoPictureResourceInfoKHR structure corresponding to the picture.

In case of video decode operations using an VP9 decode profile, any access to a picture at the coordinates (`x`,`y`), as defined by the VP9 Specification, is an access to the image subresource referred to by the corresponding VkVideoPictureResourceInfoKHR structure at the texel coordinates (`x`,`y`).

#### 49.14.3. VP9 Reference Names and Semantics

Individual reference frames used in the decoding process have different semantics, as defined in section 7.4.12 of the VP9 Specification. The VP9 semantics associated with a reference picture are indicated by the corresponding enumeration constant defined in the Video Std enumeration type `StdVideoVP9ReferenceName`:

- `STD_VIDEO_VP9_REFERENCE_NAME_INTRA_FRAME` identifies the reference used for intra coding (`INTRA_FRAME`), as defined in sections 2 and 8.5.1 of the VP9 Specification.

- All other enumeration constants refer to backward or forward references used for inter coding, as defined in sections 2 and 8.5.2 of the VP9 Specification:

  - `STD_VIDEO_VP9_REFERENCE_NAME_LAST_FRAME` identifies the `LAST_FRAME` reference

  - `STD_VIDEO_VP9_REFERENCE_NAME_GOLDEN_FRAME` identifies the `GOLDEN_FRAME` reference

  - `STD_VIDEO_VP9_REFERENCE_NAME_ALTREF_FRAME` identifies the `ALTREF_FRAME` reference

These enumeration constants are not directly used in any APIs but are used to indirectly index into certain Video Std and Vulkan API parameter arrays.

#### 49.14.4. VP9 Decode Profile

A video profile supporting VP9 video decode operations is specified by setting VkVideoProfileInfoKHR::`videoCodecOperation` to VK_VIDEO_CODEC_OPERATION_DECODE_VP9_BIT_KHR and adding a `VkVideoDecodeVP9ProfileInfoKHR` structure to the VkVideoProfileInfoKHR::`pNext` chain.

The `VkVideoDecodeVP9ProfileInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_decode_vp9
    typedef struct VkVideoDecodeVP9ProfileInfoKHR {
        VkStructureType       sType;
        const void*           pNext;
        StdVideoVP9Profile    stdProfile;
    } VkVideoDecodeVP9ProfileInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `stdProfile` is a `StdVideoVP9Profile` value specifying the VP9 codec profile, as defined in section 7.2 of the VP9 Specification.

Valid Usage (Implicit)

- VUID-VkVideoDecodeVP9ProfileInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_DECODE_VP9_PROFILE_INFO_KHR

Structure Chaining

Extends the structures

  - VkQueryPoolCreateInfo

  - VkVideoProfileInfoKHR

#### 49.14.5. VP9 Decode Capabilities

When calling vkGetPhysicalDeviceVideoCapabilitiesKHR to query the capabilities for an VP9 decode profile, the VkVideoCapabilitiesKHR::`pNext` chain must include a `VkVideoDecodeVP9CapabilitiesKHR` structure that will be filled with the profile-specific capabilities.

The `VkVideoDecodeVP9CapabilitiesKHR` structure is defined as:

    // Provided by VK_KHR_video_decode_vp9
    typedef struct VkVideoDecodeVP9CapabilitiesKHR {
        VkStructureType     sType;
        void*               pNext;
        StdVideoVP9Level    maxLevel;
    } VkVideoDecodeVP9CapabilitiesKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `maxLevel` is a `StdVideoVP9Level` value specifying the maximum VP9 level supported by the profile, as defined in section A.1 of the VP9 Specification.

Valid Usage (Implicit)

- VUID-VkVideoDecodeVP9CapabilitiesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_DECODE_VP9_CAPABILITIES_KHR

Structure Chaining

Extends the structure

  - VkVideoCapabilitiesKHR

#### 49.14.6. VP9 Decoding Parameters

The `VkVideoDecodeVP9PictureInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_decode_vp9
    typedef struct VkVideoDecodeVP9PictureInfoKHR {
        VkStructureType                        sType;
        const void*                            pNext;
        const StdVideoDecodeVP9PictureInfo*    pStdPictureInfo;
        int32_t                                referenceNameSlotIndices[VK_MAX_VIDEO_VP9_REFERENCES_PER_FRAME_KHR];
        uint32_t                               uncompressedHeaderOffset;
        uint32_t                               compressedHeaderOffset;
        uint32_t                               tilesOffset;
    } VkVideoDecodeVP9PictureInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `pStdPictureInfo` is a pointer to a `StdVideoDecodeVP9PictureInfo` structure specifying VP9 picture information.

- `referenceNameSlotIndices` is an array of three (VK_MAX_VIDEO_VP9_REFERENCES_PER_FRAME_KHR, which is equal to the Video Std definition `STD_VIDEO_VP9_REFS_PER_FRAME`) signed integer values specifying the index of the DPB slot or a negative integer value for each VP9 reference name used for inter coding. In particular, the DPB slot index for the VP9 reference name `frame` is specified in `referenceNameSlotIndices`[`frame` - `STD_VIDEO_VP9_REFERENCE_NAME_LAST_FRAME`].

- `uncompressedHeaderOffset` is the byte offset of the uncompressed frame header, as defined in section 6.2 of the VP9 Specification.

- `compressedHeaderOffset` is the byte offset of the compressed frame header, as defined in section 6.3 of the VP9 Specification.

- `tilesOffset` is the byte offset of the frame tile data, as defined in section 6.4 of the VP9 Specification.

This structure is specified in the `pNext` chain of the VkVideoDecodeInfoKHR structure passed to vkCmdDecodeVideoKHR to specify the codec-specific picture information for an VP9 decode operation.

Decode Output Picture Information

  When this structure is specified in the `pNext` chain of the VkVideoDecodeInfoKHR structure passed to vkCmdDecodeVideoKHR, the information related to the decode output picture is defined as follows:

  - The image subregion used is determined according to the VP9 Decode Picture Data Access section.

  - The decode output picture is associated with the VP9 picture information provided in `pStdPictureInfo`.

Std Picture Information

  The members of the `StdVideoDecodeVP9PictureInfo` structure pointed to by `pStdPictureInfo` are interpreted as follows:

  - `flags.reserved` and `reserved1` are used only for padding purposes and are otherwise ignored;

  - `ref_frame_sign_bias_mask` is a bitmask where bit index i corresponds to `ref_frame_sign_bias[i]` as defined in section 7.2 of the VP9 Specification;

  - the `StdVideoVP9ColorConfig` structure pointed to by `pColorConfig` is interpreted as follows:

    - `flags.reserved` and `reserved1` are used only for padding purposes and are otherwise ignored;

    - all other members of `StdVideoVP9ColorConfig` are interpreted as defined in sections 6.2, 6.2.2, and 7.2.2 of the VP9 Specification;

  - the `StdVideoVP9LoopFilter` structure pointed to by `pLoopFilter` is interpreted as follows:

    - `flags.reserved` is used only for padding purposes and is otherwise ignored;

    - `update_ref_delta` is a bitmask where bit index i is interpreted as the value of `update_ref_delta` corresponding to element i of `loop_filter_ref_deltas` as defined in section 7.2.8 of the VP9 Specification;

    - `update_mode_delta` is a bitmask where bit index i is interpreted as the value of `update_mode_delta` corresponding to element i of `loop_filter_mode_deltas` as defined in section 7.2.8 of the VP9 Specification;

    - all other members of `StdVideoVP9LoopFilter` are interpreted as defined in section 7.2.8 of the VP9 Specification;

      Note | If the syntax elements corresponding to `loop_filter_ref_deltas` and `loop_filter_mode_deltas` are not present, the application should specify the previous values, as defined in section 7.2.8 of the VP9 Specification.

  - if `flags.segmentation_enabled` is set, then the `StdVideoVP9Segmentation` structure pointed to by `pSegmentation` is interpreted as follows:

    - `flags.reserved` is used only for padding purposes and is otherwise ignored;

    - the elements of `FeatureEnabled` are bitmasks where bit index j of element i corresponds to `FeatureEnabled[i][j]` as defined in section 6.2.11 of the VP9 Specification;

    - `FeatureData` is interpreted as defined in section 6.2.11 of the VP9 Specification;

    - all other members of `StdVideoVP9Segmentation` are interpreted as defined in section 7.2.10 of the VP9 Specification;

  - all other members are interpreted as defined in section 7.2 of the VP9 Specification.

Reference picture setup is controlled by the value of `StdVideoDecodeVP9PictureInfo`::`refresh_frame_flags`. If it is not zero and a reconstructed picture is specified, then the latter is used as the target of picture reconstruction to activate the DPB slot specified in `pDecodeInfo->pSetupReferenceSlot->slotIndex`. If `StdVideoDecodeVP9PictureInfo`::`refresh_frame_flags` is zero, but a reconstructed picture is specified, then the corresponding picture reference associated with the DPB slot is invalidated, as described in the DPB Slot States section.

Valid Usage (Implicit)

- VUID-VkVideoDecodeVP9PictureInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_DECODE_VP9_PICTURE_INFO_KHR

- VUID-VkVideoDecodeVP9PictureInfoKHR-pStdPictureInfo-parameter
  `pStdPictureInfo` must be a valid pointer to a valid `StdVideoDecodeVP9PictureInfo` value

Structure Chaining

Extends the structure

  - VkVideoDecodeInfoKHR

Note | VP9 decode operations do not need any std reference information to be specified for the active reference pictures and the optional reconstructed picture. Accordingly, no DPB slot info structure exists in the API that would need to be chained to the corresponding VkVideoReferenceSlotInfoKHR structures and no `StdVideoDecodeVP9ReferenceInfo` structure exists in the VP9 Video Std Headers.

VK_MAX_VIDEO_VP9_REFERENCES_PER_FRAME_KHR is the length of the array of DPB slot or VP9 reference names passed in VkVideoDecodeVP9PictureInfoKHR::`referenceNameSlotIndices`.

    #define VK_MAX_VIDEO_VP9_REFERENCES_PER_FRAME_KHR 3U

#### 49.14.7. VP9 Decode Requirements

This section describes the required VP9 decoding capabilities for physical devices that have at least one queue family that supports the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_VP9_BIT_KHR, as returned by vkGetPhysicalDeviceQueueFamilyProperties2 in VkQueueFamilyVideoPropertiesKHR::`videoCodecOperations`.

Table 61. Required Video Std Header Versions
Video Std Header Name | Version
--- | ---
`vulkan_video_codec_vp9std_decode` | 1.0.0

Table 62. Required Video Capabilities
Video Capability | Requirement | Requirement Type1
--- | --- | ---
VkVideoCapabilitiesKHR |  |
`flags` | - | min
`minBitstreamBufferOffsetAlignment` | 4096 | max
`minBitstreamBufferSizeAlignment` | 4096 | max
`pictureAccessGranularity` | (64,64) | max
`minCodedExtent` | - | max
`maxCodedExtent` | - | min
`maxDpbSlots` | 0 | min
`maxActiveReferencePictures` | 0 | min
VkVideoDecodeCapabilitiesKHR |  |
`flags` | VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_COINCIDE_BIT_KHR or VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_DISTINCT_BIT_KHR | min
VkVideoDecodeVP9CapabilitiesKHR |  |
`maxLevel` | `STD_VIDEO_VP9_LEVEL_2_0` | min

1

  The Requirement Type column specifies the requirement is either the minimum value all implementations must support, the maximum value all implementations must support, or the exact value all implementations must support. For bitmasks a minimum value is the least bits all implementations must set, but they may have additional bits set beyond this minimum.

### 49.15. AV1 Decode Operations

Video decode operations using an AV1 decode profile can be used to decode elementary video stream sequences compliant with the AV1 Specification.

Note | Refer to the Preamble for information on how the Khronos Intellectual Property Rights Policy relates to normative references to external materials not created by Khronos.

This process is performed according to the video decode operation steps with the codec-specific semantics defined in section 7 of the AV1 Specification:

- Syntax elements, derived values, and other parameters are applied from the following structures:

  - The `StdVideoAV1SequenceHeader` structure stored in the bound video session parameters object specifying the active sequence header.

  - The `StdVideoDecodeAV1PictureInfo` structure specifying the AV1 picture information.

  - The `StdVideoDecodeAV1ReferenceInfo` structures specifying the AV1 reference information corresponding to the optional reconstructed picture and any active reference pictures.

- The contents of the provided video bitstream buffer range are interpreted as defined in the AV1 Decode Bitstream Data Access section.

- Picture data in the video picture resources corresponding to the used active reference pictures, decode output picture, and optional reconstructed picture is accessed as defined in the AV1 Decode Picture Data Access section.

- The decision on reference picture setup is made according to the parameters specified in the AV1 picture information.

If the parameters and the bitstream adhere to the syntactic and semantic requirements defined in the corresponding sections of the AV1 Specification, as described above, and the DPB slots associated with the active reference pictures all refer to valid picture references, then the video decode operation will complete successfully. Otherwise, the video decode operation may complete unsuccessfully.

#### 49.15.1. AV1 Decode Bitstream Data Access

The video bitstream buffer range should contain one or more frame OBUs, comprised of a frame header OBU and tile group OBU, that together represent an entire frame, as defined in sections 5.10, 5.9, and 5.11, and this data is interpreted as defined in sections 6.9, 6.8, and 6.10 of the AV1 Specification, respectively.

The offset specified in VkVideoDecodeAV1PictureInfoKHR::`frameHeaderOffset` should specify the starting offset of the frame header OBU of the frame.

Note | When the tiles of the frame are encoded into multiple tile groups, each frame OBU has a separate frame header OBU but their content is expected to match per the requirements of the AV1 Specification. Accordingly, the offset specified in `frameHeaderOffset` can be the offset of any of the otherwise identical frame header OBUs when multiple tile groups are present.

The offsets and sizes provided in VkVideoDecodeAV1PictureInfoKHR::`pTileOffsets` and VkVideoDecodeAV1PictureInfoKHR::`pTileSizes`, respectively, should specify the starting offsets and sizes corresponding to each tile within the video bitstream buffer range.

#### 49.15.2. AV1 Decode Picture Data Access

Accesses to image data within a video picture resource happen at the granularity indicated by VkVideoCapabilitiesKHR::`pictureAccessGranularity`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the used video profile. Accordingly, the complete image subregion of a decode output picture, reference picture, or reconstructed picture accessed by video coding operations using an AV1 decode profile is defined as the set of texels within the coordinate range:

  ([0,`endX`), [0,`endY`))

Where:

- `endX` equals `codedExtent.width` rounded up to the nearest integer multiple of `pictureAccessGranularity.width` and clamped to the width of the image subresource referred to by the corresponding VkVideoPictureResourceInfoKHR structure;

- endY equals `codedExtent.height` rounded up to the nearest integer multiple of `pictureAccessGranularity.height` and clamped to the height of the image subresource referred to by the corresponding VkVideoPictureResourceInfoKHR structure;

Where `codedExtent` is the member of the VkVideoPictureResourceInfoKHR structure corresponding to the picture.

In case of video decode operations using an AV1 decode profile, any access to a picture at the coordinates (`x`,`y`), as defined by the AV1 Specification, is an access to the image subresource referred to by the corresponding VkVideoPictureResourceInfoKHR structure at the texel coordinates (`x`,`y`).

#### 49.15.3. AV1 Reference Names and Semantics

Individual reference frames used in the decoding process have different semantics, as defined in section 6.10.24 of the AV1 Specification. The AV1 semantics associated with a reference picture are indicated by the corresponding enumeration constant defined in the Video Std enumeration type `StdVideoAV1ReferenceName`:

- `STD_VIDEO_AV1_REFERENCE_NAME_INTRA_FRAME` identifies the reference used for intra coding (`INTRA_FRAME`), as defined in sections 2 and 7.11.2 of the AV1 Specification.

- All other enumeration constants refer to backward or forward references used for inter coding, as defined in sections 2 and 7.11.3 of the AV1 Specification:

  - `STD_VIDEO_AV1_REFERENCE_NAME_LAST_FRAME` identifies the `LAST_FRAME` reference

  - `STD_VIDEO_AV1_REFERENCE_NAME_LAST2_FRAME` identifies the `LAST2_FRAME` reference

  - `STD_VIDEO_AV1_REFERENCE_NAME_LAST3_FRAME` identifies the `LAST3_FRAME` reference

  - `STD_VIDEO_AV1_REFERENCE_NAME_GOLDEN_FRAME` identifies the `GOLDEN_FRAME` reference

  - `STD_VIDEO_AV1_REFERENCE_NAME_BWDREF_FRAME` identifies the `BWDREF_FRAME` reference

  - `STD_VIDEO_AV1_REFERENCE_NAME_ALTREF2_FRAME` identifies the `ALTREF2_FRAME` reference

  - `STD_VIDEO_AV1_REFERENCE_NAME_ALTREF_FRAME` identifies the `ALTREF_FRAME` reference

These enumeration constants are not directly used in any APIs but are used to indirectly index into certain Video Std and Vulkan API parameter arrays.

#### 49.15.4. AV1 Decode Profile

A video profile supporting AV1 video decode operations is specified by setting VkVideoProfileInfoKHR::`videoCodecOperation` to VK_VIDEO_CODEC_OPERATION_DECODE_AV1_BIT_KHR and adding a `VkVideoDecodeAV1ProfileInfoKHR` structure to the VkVideoProfileInfoKHR::`pNext` chain.

The `VkVideoDecodeAV1ProfileInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_decode_av1
    typedef struct VkVideoDecodeAV1ProfileInfoKHR {
        VkStructureType       sType;
        const void*           pNext;
        StdVideoAV1Profile    stdProfile;
        VkBool32              filmGrainSupport;
    } VkVideoDecodeAV1ProfileInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `stdProfile` is a `StdVideoAV1Profile` value specifying the AV1 codec profile, as defined in section A.2 of the AV1 Specification.

- `filmGrainSupport` specifies whether AV1 film grain, as defined in section 7.8.3 of the AV1 Specification, can be used with the video profile. When this member is VK_TRUE, video session objects created against the video profile will be able to decode pictures that have film grain enabled.

Note | Enabling `filmGrainSupport` may increase the memory requirements of video sessions and/or video picture resources on some implementations.

Valid Usage (Implicit)

- VUID-VkVideoDecodeAV1ProfileInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_PROFILE_INFO_KHR

Structure Chaining

Extends the structures

  - VkQueryPoolCreateInfo

  - VkVideoProfileInfoKHR

#### 49.15.5. AV1 Decode Capabilities

When calling vkGetPhysicalDeviceVideoCapabilitiesKHR to query the capabilities for an AV1 decode profile, the VkVideoCapabilitiesKHR::`pNext` chain must include a `VkVideoDecodeAV1CapabilitiesKHR` structure that will be filled with the profile-specific capabilities.

The `VkVideoDecodeAV1CapabilitiesKHR` structure is defined as:

    // Provided by VK_KHR_video_decode_av1
    typedef struct VkVideoDecodeAV1CapabilitiesKHR {
        VkStructureType     sType;
        void*               pNext;
        StdVideoAV1Level    maxLevel;
    } VkVideoDecodeAV1CapabilitiesKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `maxLevel` is a `StdVideoAV1Level` value specifying the maximum AV1 level supported by the profile, as defined in section A.3 of the AV1 Specification.

Valid Usage (Implicit)

- VUID-VkVideoDecodeAV1CapabilitiesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_CAPABILITIES_KHR

Structure Chaining

Extends the structure

  - VkVideoCapabilitiesKHR

#### 49.15.6. AV1 Decode Parameter Sets

Video session parameters objects created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_AV1_BIT_KHR contain a single instance of the following parameter set:

AV1 Sequence Header

  Represented by `StdVideoAV1SequenceHeader` structures and interpreted as follows:

  - `flags.reserved` and `reserved1` are used only for padding purposes and are otherwise ignored;

  - the `StdVideoAV1ColorConfig` structure pointed to by `pColorConfig` is interpreted as follows:

    - `flags.reserved` and `reserved1` are used only for padding purposes and are otherwise ignored;

    - all other members of `StdVideoAV1ColorConfig` are interpreted as defined in section 6.4.2 of the AV1 Specification;

  - if `flags.timing_info_present_flag` is set, then the `StdVideoAV1TimingInfo` structure pointed to by `pTimingInfo` is interpreted as follows:

    - `flags.reserved` is used only for padding purposes and is otherwise ignored;

    - all other members of `StdVideoAV1TimingInfo` are interpreted as defined in section 6.4.3 of the AV1 Specification;

  - all other members of `StdVideoAV1SequenceHeader` are interpreted as defined in section 6.4 of the AV1 Specification.

When a video session parameters object is created with the codec operation VK_VIDEO_CODEC_OPERATION_DECODE_AV1_BIT_KHR, the VkVideoSessionParametersCreateInfoKHR::`pNext` chain must include a `VkVideoDecodeAV1SessionParametersCreateInfoKHR` structure specifying the contents of the object.

The `VkVideoDecodeAV1SessionParametersCreateInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_decode_av1
    typedef struct VkVideoDecodeAV1SessionParametersCreateInfoKHR {
        VkStructureType                     sType;
        const void*                         pNext;
        const StdVideoAV1SequenceHeader*    pStdSequenceHeader;
    } VkVideoDecodeAV1SessionParametersCreateInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `pStdSequenceHeader` is a pointer to a `StdVideoAV1SequenceHeader` structure describing the AV1 sequence header entry to store in the created object.

Note | As AV1 video session parameters objects will only ever contain a single AV1 sequence header, this has to be specified at object creation time and such video session parameters objects cannot be updated using the vkUpdateVideoSessionParametersKHR command. When a new AV1 sequence header is decoded from the input video bitstream the application needs to create a new video session parameters object to store it.

Valid Usage (Implicit)

- VUID-VkVideoDecodeAV1SessionParametersCreateInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_SESSION_PARAMETERS_CREATE_INFO_KHR

- VUID-VkVideoDecodeAV1SessionParametersCreateInfoKHR-pStdSequenceHeader-parameter
  `pStdSequenceHeader` must be a valid pointer to a valid `StdVideoAV1SequenceHeader` value

Structure Chaining

Extends the structure

  - VkVideoSessionParametersCreateInfoKHR

##### Inline Parameter Sets

In case of video sessions created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_AV1_BIT_KHR and with VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR, the application can also specify the active sequence header inline by including an instance of the VkVideoDecodeAV1InlineSessionParametersInfoKHR structure in the `pNext` chain of VkVideoDecodeInfoKHR.

The `VkVideoDecodeAV1InlineSessionParametersInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_decode_av1 with VK_KHR_video_maintenance2
    typedef struct VkVideoDecodeAV1InlineSessionParametersInfoKHR {
        VkStructureType                     sType;
        const void*                         pNext;
        const StdVideoAV1SequenceHeader*    pStdSequenceHeader;
    } VkVideoDecodeAV1InlineSessionParametersInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `pStdSequenceHeader` is `NULL` or a pointer to an instance of the `StdVideoAV1SequenceHeader` structure describing the active AV1 sequence header.

If `pStdSequenceHeader` is not `NULL`, the issued video decode operations will use the specified sequence header parameters instead of the active sequence header being sourced from the bound video session parameters object.

Valid Usage (Implicit)

- VUID-VkVideoDecodeAV1InlineSessionParametersInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_INLINE_SESSION_PARAMETERS_INFO_KHR

- VUID-VkVideoDecodeAV1InlineSessionParametersInfoKHR-pStdSequenceHeader-parameter
  If `pStdSequenceHeader` is not `NULL`, `pStdSequenceHeader` must be a valid pointer to a valid `StdVideoAV1SequenceHeader` value

Structure Chaining

Extends the structure

  - VkVideoDecodeInfoKHR

#### 49.15.7. AV1 Decoding Parameters

The `VkVideoDecodeAV1PictureInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_decode_av1
    typedef struct VkVideoDecodeAV1PictureInfoKHR {
        VkStructureType                        sType;
        const void*                            pNext;
        const StdVideoDecodeAV1PictureInfo*    pStdPictureInfo;
        int32_t                                referenceNameSlotIndices[VK_MAX_VIDEO_AV1_REFERENCES_PER_FRAME_KHR];
        uint32_t                               frameHeaderOffset;
        uint32_t                               tileCount;
        const uint32_t*                        pTileOffsets;
        const uint32_t*                        pTileSizes;
    } VkVideoDecodeAV1PictureInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `pStdPictureInfo` is a pointer to a `StdVideoDecodeAV1PictureInfo` structure specifying AV1 picture information.

- `referenceNameSlotIndices` is an array of seven (VK_MAX_VIDEO_AV1_REFERENCES_PER_FRAME_KHR, which is equal to the Video Std definition `STD_VIDEO_AV1_REFS_PER_FRAME`) signed integer values specifying the index of the DPB slot or a negative integer value for each AV1 reference name used for inter coding. In particular, the DPB slot index for the AV1 reference name `frame` is specified in `referenceNameSlotIndices`[`frame` - `STD_VIDEO_AV1_REFERENCE_NAME_LAST_FRAME`].

- `frameHeaderOffset` is the byte offset of the AV1 frame header OBU, as defined in section 5.9 of the AV1 Specification, within the video bitstream buffer range specified in VkVideoDecodeInfoKHR.

- `tileCount` is the number of elements in `pTileOffsets` and `pTileSizes`.

- `pTileOffsets` is a pointer to an array of `tileCount` integers specifying the byte offset of the tiles of the picture within the video bitstream buffer range specified in VkVideoDecodeInfoKHR.

- `pTileSizes` is a pointer to an array of `tileCount` integers specifying the byte size of the tiles of the picture within the video bitstream buffer range specified in VkVideoDecodeInfoKHR.

This structure is specified in the `pNext` chain of the VkVideoDecodeInfoKHR structure passed to vkCmdDecodeVideoKHR to specify the codec-specific picture information for an AV1 decode operation.

Decode Output Picture Information

  When this structure is specified in the `pNext` chain of the VkVideoDecodeInfoKHR structure passed to vkCmdDecodeVideoKHR, the information related to the decode output picture is defined as follows:

  - The image subregion used is determined according to the AV1 Decode Picture Data Access section.

  - The decode output picture is associated with the AV1 picture information provided in `pStdPictureInfo`.

Std Picture Information

  The members of the `StdVideoDecodeAV1PictureInfo` structure pointed to by `pStdPictureInfo` are interpreted as follows:

  - `flags.reserved`, `reserved1`, and `reserved2` are used only for padding purposes and are otherwise ignored;

  - `flags.apply_grain` indicates that film grain is enabled for the decoded picture, as defined in section 6.8.20 of the AV1 Specification;

  - `OrderHint`, `OrderHints`, and `expectedFrameId` are interpreted as defined in section 6.8.2 of the AV1 Specification;

  - the `StdVideoAV1TileInfo` structure pointed to by `pTileInfo` is interpreted as follows:

    - `flags.reserved` and `reserved1` are used only for padding purposes and are otherwise ignored;

    - `pMiColStarts` is a pointer to an array of `TileCols` number of unsigned integers that corresponds to `MiColStarts` defined in section 6.8.14 of the AV1 Specification;

    - `pMiRowStarts` is a pointer to an array of `TileRows` number of unsigned integers that corresponds to `MiRowStarts` defined in section 6.8.14 of the AV1 Specification;

      Note | Historically some applications incorrectly specified the values in `pMiColStarts` and `pMiRowStarts` in terms of superblocks instead of mode info blocks, therefore it is recommended for implementations to ignore the values specified in `pMiColStarts` and `pMiRowStarts`. Instead, the values should be calculated based on `flags.uniform_tile_spacing_flag`, `pWidthInSbsMinus1`, `pHeightInSbsMinus1`, the sequence header parameter `flags.use_128x128_superblock`, and the coded extent of the decoded picture.

    - `pWidthInSbsMinus1` is a pointer to an array of `TileCols` number of unsigned integers that corresponds to `width_in_sbs_minus_1` defined in section 6.8.14 of the AV1 Specification;

    - `pHeightInSbsMinus1` is a pointer to an array of `TileRows` number of unsigned integers that corresponds to `height_in_sbs_minus_1` defined in section 6.8.14 of the AV1 Specification;

    - all other members of `StdVideoAV1TileInfo` are interpreted as defined in section 6.8.14 of the AV1 Specification;

  - the `StdVideoAV1Quantization` structure pointed to by `pQuantization` is interpreted as follows:

    - `flags.reserved` is used only for padding purposes and is otherwise ignored;

    - all other members of `StdVideoAV1Quantization` are interpreted as defined in section 6.8.11 of the AV1 Specification;

  - if `flags.segmentation_enabled` is set, then the `StdVideoAV1Segmentation` structure pointed to by `pSegmentation` is interpreted as follows:

    - the elements of `FeatureEnabled` are bitmasks where bit index j of element i corresponds to `FeatureEnabled[i][j]` as defined in section 5.9.14 of the AV1 Specification;

    - `FeatureData` is interpreted as defined in section 5.9.14 of the AV1 Specification;

  - the `StdVideoAV1LoopFilter` structure pointed to by `pLoopFilter` is interpreted as follows:

    - `flags.reserved` is used only for padding purposes and is otherwise ignored;

    - `update_ref_delta` is a bitmask where bit index i is interpreted as the value of `update_ref_delta` corresponding to element i of `loop_filter_ref_deltas` as defined in section 6.8.10 of the AV1 Specification;

    - `update_mode_delta` is a bitmask where bit index i is interpreted as the value of `update_mode_delta` corresponding to element i of `loop_filter_mode_deltas` as defined in section 6.8.10 of the AV1 Specification;

    - all other members of `StdVideoAV1LoopFilter` are interpreted as defined in section 6.8.10 of the AV1 Specification;

      Note | If the syntax elements corresponding to `loop_filter_ref_deltas` and `loop_filter_mode_deltas` are not present or otherwise defined according to section 5.9.11 of the AV1 Specification, the application should specify the previous values, as defined in section 6.8.10 of the AV1 Specification.

  - if `flags.enable_cdef` is set in the active sequence header, then the members of the `StdVideoAV1CDEF` structure pointed to by `pCDEF` are interpreted as follows:

    - `cdef_y_sec_strength` and `cdef_uv_sec_strength` are the bitstream values of the corresponding syntax elements defined in section 5.9.19 of the AV1 Specification;

    - all other members of `StdVideoAV1CDEF` are interpreted as defined in section 6.10.14 of the AV1 Specification;

  - if `flags.UsesLr` is set in the active sequence header, then the `StdVideoAV1LoopRestoration` structure pointed to by `pLoopRestoration` is interpreted as follows:

    - `LoopRestorationSize`[`plane`] is interpreted as log2(`size`) - 5, where `size` is the value of `LoopRestorationSize`[`plane`] as defined in section 6.10.15 of the AV1 Specification.

    - all other members of `StdVideoAV1LoopRestoration` are defined as in section 6.10.15 of the AV1 Specification;

  - the members of the `StdVideoAV1GlobalMotion` structure pointed to by `pGlobalMotion` are interpreted as defined in section 7.10 of the AV1 Specification;

  - if `flags.film_grain_params_present` is set in the active sequence header, then the `StdVideoAV1FilmGrain` structure pointed to by `pFilmGrain` is interpreted as follows:

    - `flags.reserved` is used only for padding purposes and is otherwise ignored;

    - all other members of `StdVideoAV1FilmGrain` are interpreted as defined in section 6.8.20 of the AV1 Specification;

  - all other members are interpreted as defined in section 6.8 of the AV1 Specification.

When film grain is enabled for the decoded frame, the `flags.update_grain` and `film_grain_params_ref_idx` values specified in `StdVideoAV1FilmGrain` are ignored by AV1 decode operations and the `load_grain_params` function, as defined in section 6.8.20 of the AV1 Specification, is not executed. Instead, the application is responsible for specifying the effective film grain parameters for the frame in `StdVideoAV1FilmGrain`.

When film grain is enabled for the decoded frame, the application is required to specify a different decode output picture resource in VkVideoDecodeInfoKHR::`dstPictureResource` compared to the reconstructed picture specified in VkVideoDecodeInfoKHR::`pSetupReferenceSlot->pPictureResource` even if the implementation does not report support for VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_DISTINCT_BIT_KHR in VkVideoDecodeCapabilitiesKHR::`flags` for the video decode profile.

Reference picture setup is controlled by the value of `StdVideoDecodeAV1PictureInfo`::`refresh_frame_flags`. If it is not zero and a reconstructed picture is specified, then the latter is used as the target of picture reconstruction to activate the DPB slot specified in `pDecodeInfo->pSetupReferenceSlot->slotIndex`. If `StdVideoDecodeAV1PictureInfo`::`refresh_frame_flags` is zero, but a reconstructed picture is specified, then the corresponding picture reference associated with the DPB slot is invalidated, as described in the DPB Slot States section.

Active Parameter Sets

  The active sequence header is the AV1 sequence header stored in the bound video session parameters object , unless the bound video session was created with VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR and the active sequence header is specified inline. .

Valid Usage (Implicit)

- VUID-VkVideoDecodeAV1PictureInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_PICTURE_INFO_KHR

- VUID-VkVideoDecodeAV1PictureInfoKHR-pStdPictureInfo-parameter
  `pStdPictureInfo` must be a valid pointer to a valid `StdVideoDecodeAV1PictureInfo` value

- VUID-VkVideoDecodeAV1PictureInfoKHR-pTileOffsets-parameter
  `pTileOffsets` must be a valid pointer to an array of `tileCount` `uint32_t` values

- VUID-VkVideoDecodeAV1PictureInfoKHR-pTileSizes-parameter
  `pTileSizes` must be a valid pointer to an array of `tileCount` `uint32_t` values

- VUID-VkVideoDecodeAV1PictureInfoKHR-tileCount-arraylength
  `tileCount` must be greater than `0`

Structure Chaining

Extends the structure

  - VkVideoDecodeInfoKHR

VK_MAX_VIDEO_AV1_REFERENCES_PER_FRAME_KHR is the length of the array of DPB slot or AV1 reference names passed in VkVideoDecodeAV1PictureInfoKHR::`referenceNameSlotIndices`.

    #define VK_MAX_VIDEO_AV1_REFERENCES_PER_FRAME_KHR 7U

The `VkVideoDecodeAV1DpbSlotInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_decode_av1
    typedef struct VkVideoDecodeAV1DpbSlotInfoKHR {
        VkStructureType                          sType;
        const void*                              pNext;
        const StdVideoDecodeAV1ReferenceInfo*    pStdReferenceInfo;
    } VkVideoDecodeAV1DpbSlotInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `pStdReferenceInfo` is a pointer to a `StdVideoDecodeAV1ReferenceInfo` structure specifying AV1 reference information.

This structure is specified in the `pNext` chain of VkVideoDecodeInfoKHR::`pSetupReferenceSlot`, if not `NULL`, and the `pNext` chain of the elements of VkVideoDecodeInfoKHR::`pReferenceSlots` to specify the codec-specific reference picture information for an AV1 decode operation.

Active Reference Picture Information

  When this structure is specified in the `pNext` chain of the elements of VkVideoDecodeInfoKHR::`pReferenceSlots`, one element is added to the list of active reference pictures used by the video decode operation for each element of VkVideoDecodeInfoKHR::`pReferenceSlots` as follows:

  - The image subregion used is determined according to the AV1 Decode Picture Data Access section.

  - The reference picture is associated with the DPB slot index specified in the `slotIndex` member of the corresponding element of VkVideoDecodeInfoKHR::`pReferenceSlots`.

  - The reference picture is associated with the AV1 reference information provided in `pStdReferenceInfo`.

Reconstructed Picture Information

  When this structure is specified in the `pNext` chain of VkVideoDecodeInfoKHR::`pSetupReferenceSlot`, the information related to the reconstructed picture is defined as follows:

  - The image subregion used is determined according to the AV1 Decode Picture Data Access section.

  - If reference picture setup is requested, then the reconstructed picture is used to activate the DPB slot with the index specified in VkVideoDecodeInfoKHR::`pSetupReferenceSlot->slotIndex`.

  - The reconstructed picture is associated with the AV1 reference information provided in `pStdReferenceInfo`.

Std Reference Information

  The members of the `StdVideoDecodeAV1ReferenceInfo` structure pointed to by `pStdReferenceInfo` are interpreted as follows:

  - `flags.reserved` and `reserved1` are used only for padding purposes and are otherwise ignored;

  - `flags.disable_frame_end_update_cdf` is interpreted as defined in section 6.8.2 of the AV1 Specification;

  - `flags.segmentation_enabled` is interpreted as defined in section 6.8.13 of the AV1 Specification;

  - `frame_type` is interpreted as defined in section 6.8.2 of the AV1 Specification;

    Note | The `frame_type` member is defined with the type `uint8_t`, but it takes the same values defined in the `StdVideoAV1FrameType` enumeration type as `StdVideoDecodeAV1PictureInfo`::`frame_type`.

  - `RefFrameSignBias` is a bitmask where bit index i corresponds to `RefFrameSignBias[i]` as defined in section 6.8.2 of the AV1 Specification;

  - `OrderHint` is interpreted as defined in section 6.8.2 of the AV1 Specification;

  - `SavedOrderHints` is interpreted as defined in section 7.20 of the AV1 Specification.

    Note | When the AV1 reference information is provided for the reconstructed picture, certain parameters (e.g. `frame_type`) are specified both in the AV1 picture information and in the AV1 reference information. This is necessary because unlike the AV1 picture information, which is only used for the purposes of the video decode operation in question, the AV1 reference information specified for the reconstructed picture may be associated with the activated DPB slot, meaning that some implementations may maintain it as part of the reference picture metadata corresponding to the video picture resource associated with the DPB slot. When the AV1 reference information is provided for an active reference picture, the specified parameters correspond to the parameters specified when the DPB slot was activated (set up) with the reference picture, as usual, in order to communicate these parameters for implementations that do not maintain any subset of these parameters as part of the DPB slot’s reference picture metadata.

Valid Usage (Implicit)

- VUID-VkVideoDecodeAV1DpbSlotInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_DPB_SLOT_INFO_KHR

- VUID-VkVideoDecodeAV1DpbSlotInfoKHR-pStdReferenceInfo-parameter
  `pStdReferenceInfo` must be a valid pointer to a valid `StdVideoDecodeAV1ReferenceInfo` value

Structure Chaining

Extends the structure

  - VkVideoReferenceSlotInfoKHR

#### 49.15.8. AV1 Decode Requirements

This section describes the required AV1 decoding capabilities for physical devices that have at least one queue family that supports the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_AV1_BIT_KHR, as returned by vkGetPhysicalDeviceQueueFamilyProperties2 in VkQueueFamilyVideoPropertiesKHR::`videoCodecOperations`.

Table 63. Required Video Std Header Versions
Video Std Header Name | Version
--- | ---
`vulkan_video_codec_av1std_decode` | 1.0.0

Table 64. Required Video Capabilities
Video Capability | Requirement | Requirement Type1
--- | --- | ---
VkVideoCapabilitiesKHR |  |
`flags` | - | min
`minBitstreamBufferOffsetAlignment` | 4096 | max
`minBitstreamBufferSizeAlignment` | 4096 | max
`pictureAccessGranularity` | (64,64) | max
`minCodedExtent` | - | max
`maxCodedExtent` | - | min
`maxDpbSlots` | 0 | min
`maxActiveReferencePictures` | 0 | min
VkVideoDecodeCapabilitiesKHR |  |
`flags` | VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_COINCIDE_BIT_KHR or VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_DISTINCT_BIT_KHR | min
VkVideoDecodeAV1CapabilitiesKHR |  |
`maxLevel` | `STD_VIDEO_AV1_LEVEL_2_0` | min

1

  The Requirement Type column specifies the requirement is either the minimum value all implementations must support, the maximum value all implementations must support, or the exact value all implementations must support. For bitmasks a minimum value is the least bits all implementations must set, but they may have additional bits set beyond this minimum.

### 49.16. Video Encode Operations

Video encode operations consume an encode input picture and zero or more reference pictures, and produce compressed video data to a video bitstream buffer and an optional reconstructed picture.

Note | Such encode input pictures can be used as the output of video decode operations, with graphics or compute operations, or with Window System Integration APIs, depending on the capabilities of the implementation.

Video encode operations may access the following resources in the VK_PIPELINE_STAGE_2_VIDEO_ENCODE_BIT_KHR stage:

- The image subregions corresponding to the source encode input picture and active reference pictures with access VK_ACCESS_2_VIDEO_ENCODE_READ_BIT_KHR.

- The destination video bitstream buffer range and the optional reconstructed picture with access VK_ACCESS_2_VIDEO_ENCODE_WRITE_BIT_KHR.

- The image subregion corresponding to a quantization map used in the video encode operation with access VK_ACCESS_2_VIDEO_ENCODE_READ_BIT_KHR.

The image subresource of each video picture resource accessed by the video encode operation is specified using a corresponding VkVideoPictureResourceInfoKHR structure. Each such image subresource must be in the appropriate image layout as follows:

- If the image subresource is used in the video encode operation as an encode input picture, then it must be in the VK_IMAGE_LAYOUT_VIDEO_ENCODE_SRC_KHR layout , unless the `unifiedImageLayoutsVideo` feature is enabled, in which case it may be in the VK_IMAGE_LAYOUT_GENERAL layout .

- If the image subresource is used in the video encode operation as a reconstructed picture or reference picture, then it must be in the VK_IMAGE_LAYOUT_VIDEO_ENCODE_DPB_KHR layout , unless the `unifiedImageLayoutsVideo` feature is enabled, in which case it may be in the VK_IMAGE_LAYOUT_GENERAL layout .

- If the image subresource is used in the video encode operation as a quantization map, then it must be in the VK_IMAGE_LAYOUT_VIDEO_ENCODE_QUANTIZATION_MAP_KHR layout , unless the `unifiedImageLayoutsVideo` feature is enabled, in which case it may be in the VK_IMAGE_LAYOUT_GENERAL layout .

A video encode operation may complete unsuccessfully. In this case the target video bitstream buffer will have undefined contents. Similarly, if reference picture setup is requested, the reconstructed-picture will also have undefined contents, and the activated DPB slot will have an invalid picture reference.

If a video encode operation completes successfully and the codec-specific parameters provided by the application adhere to the syntactic and semantic requirements defined in the corresponding video compression standard, then the target video bitstream buffer will contain compressed video data after the execution of the video encode operation according to the respective codec-specific semantics.

#### 49.16.1. Codec-Specific Semantics

The following aspects of video encode operations are codec-specific:

- The compressed video data written to the target video bitstream buffer range.

- The construction and interpretation of the list of active reference pictures and the interpretation of the picture data referred to by the corresponding image subregions.

- The construction and interpretation of information related to the encode input picture and the interpretation of the picture data referred to by the corresponding image subregion.

- The decision on reference picture setup.

- The construction and interpretation of information related to the optional reconstructed picture and the generation of picture data to the corresponding image subregion.

- Certain aspects of rate control.

These codec-specific behaviors are defined for each video codec operation separately.

- If the used video codec operation is VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR, then the codec-specific aspects of the video encoding process are performed as defined in the H.264 Encode Operations section.

- If the used video codec operation is VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR, then the codec-specific aspects of the video encoding process are performed as defined in the H.265 Encode Operations section.

- If the used video codec operation is VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR, then the codec-specific aspects of the video encoding process are performed as defined in the AV1 Encode Operations section.

##### Video Encode Parameter Overrides

Implementations supporting video encode operations for any particular video codec operation often support only a subset of the available encoding tools defined by the corresponding video compression standards. Accordingly, certain implementation-dependent limitations may apply to codec-specific parameters provided through the structures defined in the Video Std headers corresponding to the used video codec operation.

Exposing all of these restrictions on particular codec-specific parameter values or combinations thereof in the form of application-queryable capabilities is impractical, hence this specification allows implementations to override the value of any of the codec-specific parameters, unless otherwise specified, as long as all of the following conditions are met:

- If the application-provided codec-specific parameters adhere to the syntactic and semantic requirements and rules defined by the used video compression standard, and thus would be usable to produce a video bitstream compliant with that standard, then the codec-specific parameters resulting from the process of implementation overrides must also adhere to the same requirements and rules, and any video bitstream produced using the overridden parameters must also be compliant.

- The overridden codec-specific parameter values must not have an impact on the codec-independent behaviors defined for video encode operations.

- The implementation must not override any codec-specific parameters specified to a command that may cause application-provided codec-specific parameters specified to subsequent commands to no longer adhere to the semantic requirements and rules defined by the used video compression standard, unless the implementation also overrides those parameters to adhere to any such requirements and rules.

- The overridden codec-specific parameter values must not have an impact on the codec-specific picture data access semantics.

- The overridden codec-specific parameter values may change the contents of the codec-specific bitstream elements produced by video encode operations or otherwise retrieved by the application (e.g. using the vkGetEncodedVideoSessionParametersKHR command) but must still adhere to the codec-specific semantics defined for that video codec operation, including, but not limited to, the number, type, and order of the encoded codec-specific bitstream elements.

Besides codec-specific parameter overrides performed for implementation-dependent reasons, applications can enable the implementation to apply additional optimizing overrides that may improve the efficiency or performance of video encoding operations. However, implementations must meet the conditions listed above even in case of such optimizing overrides.

Note | Unless the application opts in for optimizing overrides, implementations are not expected to override any of the codec-specific parameters, except when such overrides are necessary for the correct operation of video encoder implementation due to limitations to the available encoding tools on that implementation.

#### 49.16.2. Video Encode Operation Steps

Each video encode operation performs the following steps in the VK_PIPELINE_STAGE_2_VIDEO_ENCODE_BIT_KHR stage:

1. Reads the input picture data from the encode input picture;

2. Determine derived encoding quality parameters according to the codec-specific semantics and the current rate control state;

3. Compresses the input picture data according to the codec-specific semantics, applying any prediction data read from the active reference pictures and rate control restrictions in the process;

4. Writes the encoded bitstream data to the destination video bitstream buffer range;

5. Performs picture reconstruction of the encoded video data according to the codec-specific semantics, applying any prediction data read from the active reference pictures in the process, if a reconstructed picture is specified and reference picture setup is requested;

6. If reference picture setup is requested, the DPB slot index specified in the reconstructed picture information is activated with the reconstructed picture;

7. Writes the reconstructed picture data to the reconstructed picture, if one is specified, according to the codec-specific semantics.

When reconstructed picture information is provided, the specified DPB slot index is associated with the corresponding bound reference picture resource, regardless of whether reference picture setup is requested.

#### 49.16.3. Capabilities

When calling vkGetPhysicalDeviceVideoCapabilitiesKHR with `pVideoProfile->videoCodecOperation` specifying an encode operation, the VkVideoEncodeCapabilitiesKHR structure must be included in the `pNext` chain of the VkVideoCapabilitiesKHR structure to retrieve capabilities specific to video encoding.

The `VkVideoEncodeCapabilitiesKHR` structure is defined as:

    // Provided by VK_KHR_video_encode_queue
    typedef struct VkVideoEncodeCapabilitiesKHR {
        VkStructureType                         sType;
        void*                                   pNext;
        VkVideoEncodeCapabilityFlagsKHR         flags;
        VkVideoEncodeRateControlModeFlagsKHR    rateControlModes;
        uint32_t                                maxRateControlLayers;
        uint64_t                                maxBitrate;
        uint32_t                                maxQualityLevels;
        VkExtent2D                              encodeInputPictureGranularity;
        VkVideoEncodeFeedbackFlagsKHR           supportedEncodeFeedbackFlags;
    } VkVideoEncodeCapabilitiesKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask of VkVideoEncodeCapabilityFlagBitsKHR describing supported encoding features.

- `rateControlModes` is a bitmask of VkVideoEncodeRateControlModeFlagBitsKHR indicating supported rate control modes.

- `maxRateControlLayers` indicates the maximum number of rate control layers supported.

- `maxBitrate` indicates the maximum supported bitrate.

- `maxQualityLevels` indicates the number of discrete video encode quality levels supported. Implementations must support at least one quality level.

- `encodeInputPictureGranularity` indicates the granularity at which encode input picture data is encoded and may indicate a texel granularity up to the size of the largest supported codec-specific coding block. This capability does not impose any valid usage constraints on the application, however, depending on the contents of the encode input picture, it may have effects on the encoded bitstream, as described in more detail below.

- `supportedEncodeFeedbackFlags` is a bitmask of VkVideoEncodeFeedbackFlagBitsKHR values specifying the supported flags for video encode feedback queries.

Implementations must include support for at least VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_BUFFER_OFFSET_BIT_KHR and VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_BYTES_WRITTEN_BIT_KHR in `supportedEncodeFeedbackFlags`.

`encodeInputPictureGranularity` provides information about the way encode input picture data is used as input to video encode operations. In particular, some implementations may not be able to limit the set of texels used to encode the output video bitstream to the image subregion specified in the VkVideoPictureResourceInfoKHR structure corresponding to the encode input picture (i.e. to the resolution of the image data to encode specified in its `codedExtent` member).

Note | For example, the application requests the coded extent to be 1920x1080, but the implementation is only able to source the encode input picture data at the granularity of the codec-specific coding block size which is 16x16 pixels (or as otherwise indicated in `encodeInputPictureGranularity`). In this example, the content is horizontally aligned with the coding block size, but not vertically aligned with it. Thus encoding of the last row of coding blocks will be impacted by the contents of the input image at texel rows 1080 to 1087 (the latter being the next row which is vertically aligned with the coding block size, assuming a zero-based texel row index).

If `codedExtent` rounded up to the next integer multiple of `encodeInputPictureGranularity` is greater than the extent of the image subresource specified for the encode input picture, then the texel values corresponding to texel coordinates outside of the bounds of the image subresource may be undefined. However, implementations should use well-defined default values for such texels in order to maximize the encoding efficiency for the last coding block row/column, and/or to ensure consistent encoding results across repeated encoding of the same input content. Nonetheless, the values used for such texels must not have an effect on whether the video encode operation produces a compliant bitstream, and must not have any other effects on the encoded picture data beyond what may otherwise result from using these texel values as input to any compression algorithm, as defined in the used video compression standard.

Note | While not required, it is generally a good practice for applications to make sure that the image subresource used for the encode input picture has an extent that is an integer multiple of the codec-specific coding block size (or at least `encodeInputPictureGranularity`) and that this padding area is filled with known values in order to improve encoding efficiency, portability, and reproducibility.

Valid Usage (Implicit)

- VUID-VkVideoEncodeCapabilitiesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_ENCODE_CAPABILITIES_KHR

Structure Chaining

Extends the structure

  - VkVideoCapabilitiesKHR

Bits which may be set in VkVideoEncodeCapabilitiesKHR::`flags`, indicating the encoding tools supported, are:

    // Provided by VK_KHR_video_encode_queue
    typedef enum VkVideoEncodeCapabilityFlagBitsKHR {
        VK_VIDEO_ENCODE_CAPABILITY_PRECEDING_EXTERNALLY_ENCODED_BYTES_BIT_KHR = 0x00000001,
        VK_VIDEO_ENCODE_CAPABILITY_INSUFFICIENT_BITSTREAM_BUFFER_RANGE_DETECTION_BIT_KHR = 0x00000002,
      // Provided by VK_KHR_video_encode_quantization_map
        VK_VIDEO_ENCODE_CAPABILITY_QUANTIZATION_DELTA_MAP_BIT_KHR = 0x00000004,
      // Provided by VK_KHR_video_encode_quantization_map
        VK_VIDEO_ENCODE_CAPABILITY_EMPHASIS_MAP_BIT_KHR = 0x00000008,
    } VkVideoEncodeCapabilityFlagBitsKHR;

- VK_VIDEO_ENCODE_CAPABILITY_PRECEDING_EXTERNALLY_ENCODED_BYTES_BIT_KHR specifies that the implementation supports the use of VkVideoEncodeInfoKHR::`precedingExternallyEncodedBytes`.

- VK_VIDEO_ENCODE_CAPABILITY_INSUFFICIENT_BITSTREAM_BUFFER_RANGE_DETECTION_BIT_KHR specifies that the implementation is able to detect and report when the destination video bitstream buffer range provided by the application is not sufficiently large to fit the encoded bitstream data produced by a video encode operation by reporting the VK_QUERY_RESULT_STATUS_INSUFFICIENT_BITSTREAM_BUFFER_RANGE_KHR query result status code.

  Note | Some implementations may not be able to reliably detect insufficient bitstream buffer range conditions in all situations. Such implementations will not report support for the VK_VIDEO_ENCODE_CAPABILITY_INSUFFICIENT_BITSTREAM_BUFFER_RANGE_DETECTION_BIT_KHR encode capability flag for the video profile, but may still report the VK_QUERY_RESULT_STATUS_INSUFFICIENT_BITSTREAM_BUFFER_RANGE_KHR query result status code in certain cases. Applications should always check for the specific query result status code VK_QUERY_RESULT_STATUS_INSUFFICIENT_BITSTREAM_BUFFER_RANGE_KHR even when this encode capability flag is not supported by the implementation for the video profile in question. However, applications must not assume that a different negative query result status code indicating an unsuccessful completion of a video encode operation is not the result of an insufficient bitstream buffer condition unless this encode capability flag is supported.

- VK_VIDEO_ENCODE_CAPABILITY_QUANTIZATION_DELTA_MAP_BIT_KHR specifies support for using quantization delta maps.

- VK_VIDEO_ENCODE_CAPABILITY_EMPHASIS_MAP_BIT_KHR specifies support for using emphasis maps.

    // Provided by VK_KHR_video_encode_queue
    typedef VkFlags VkVideoEncodeCapabilityFlagsKHR;

`VkVideoEncodeCapabilityFlagsKHR` is a bitmask type for setting a mask of zero or more VkVideoEncodeCapabilityFlagBitsKHR.

The `VkVideoEncodeFeedback2CapabilitiesKHR` structure is defined as:

    // Provided by VK_KHR_video_encode_feedback2
    typedef struct VkVideoEncodeFeedback2CapabilitiesKHR {
        VkStructureType                              sType;
        void*                                        pNext;
        uint32_t                                     maxPerPartitionFeedbackEntries;
        VkVideoEncodePerPartitionFeedbackFlagsKHR    supportedPerPartitionEncodeFeedbackFlags;
    } VkVideoEncodeFeedback2CapabilitiesKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `maxPerPartitionFeedbackEntries` specifies the maximum number of picture partitions for which the implementation supports capturing per picture partition video encode feedback values.

- `supportedPerPartitionEncodeFeedbackFlags` is a bitmask of VkVideoEncodePerPartitionFeedbackFlagBitsKHR values specifying the set of per picture partition video encode feedback values supported by video encode feedback queries.

Valid Usage (Implicit)

- VUID-VkVideoEncodeFeedback2CapabilitiesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_ENCODE_FEEDBACK_2_CAPABILITIES_KHR

- VUID-VkVideoEncodeFeedback2CapabilitiesKHR-supportedPerPartitionEncodeFeedbackFlags-parameter
  `supportedPerPartitionEncodeFeedbackFlags` must be a valid combination of VkVideoEncodePerPartitionFeedbackFlagBitsKHR values

- VUID-VkVideoEncodeFeedback2CapabilitiesKHR-supportedPerPartitionEncodeFeedbackFlags-requiredbitmask
  `supportedPerPartitionEncodeFeedbackFlags` must not be `0`

Structure Chaining

Extends the structure

  - VkVideoCapabilitiesKHR

#### 49.16.4. Video Encode Quality Levels

Implementations can support more than one video encode quality levels for a video encode profile, which control the number and type of implementation-specific encoding tools and algorithms utilized in the encoding process.

Note | Generally, using higher video encode quality levels may produce higher quality video streams at the cost of additional processing time. However, as the final quality of an encoded picture depends on the contents of the encode input picture, the contents of the active reference pictures, the codec-specific encode parameters, and the particular implementation-specific tools used corresponding to the individual video encode quality levels, there are no guarantees that using a higher video encode quality level will always produce a higher quality encoded picture for any given set of inputs.

To query properties for a specific video encode quality level supported by a video encode profile, call:

    // Provided by VK_KHR_video_encode_queue
    VkResult vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR(
        VkPhysicalDevice                            physicalDevice,
        const VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR* pQualityLevelInfo,
        VkVideoEncodeQualityLevelPropertiesKHR*     pQualityLevelProperties);

- `physicalDevice` is the physical device to query the video encode quality level properties for.

- `pQualityLevelInfo` is a pointer to a VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR structure specifying the video encode profile and quality level to query properties for.

- `pQualityLevelProperties` is a pointer to a VkVideoEncodeQualityLevelPropertiesKHR structure in which the properties are returned.

Valid Usage

- VUID-vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR-pQualityLevelInfo-08257
  If `pQualityLevelInfo->pVideoProfile->videoCodecOperation` is VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR, then the `pNext` chain of `pQualityLevelProperties` must include a VkVideoEncodeH264QualityLevelPropertiesKHR structure

- VUID-vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR-pQualityLevelInfo-08258
  If `pQualityLevelInfo->pVideoProfile->videoCodecOperation` is VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR, then the `pNext` chain of `pQualityLevelProperties` must include a VkVideoEncodeH265QualityLevelPropertiesKHR structure

- VUID-vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR-pQualityLevelInfo-10305
  If `pQualityLevelInfo->pVideoProfile->videoCodecOperation` is VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR, then the `pNext` chain of `pQualityLevelProperties` must include a VkVideoEncodeAV1QualityLevelPropertiesKHR structure

Valid Usage (Implicit)

- VUID-vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR-physicalDevice-parameter
  `physicalDevice` must be a valid VkPhysicalDevice handle

- VUID-vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR-pQualityLevelInfo-parameter
  `pQualityLevelInfo` must be a valid pointer to a valid VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR structure

- VUID-vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR-pQualityLevelProperties-parameter
  `pQualityLevelProperties` must be a valid pointer to a VkVideoEncodeQualityLevelPropertiesKHR structure

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

  - VK_ERROR_VIDEO_PICTURE_LAYOUT_NOT_SUPPORTED_KHR

  - VK_ERROR_VIDEO_PROFILE_CODEC_NOT_SUPPORTED_KHR

  - VK_ERROR_VIDEO_PROFILE_FORMAT_NOT_SUPPORTED_KHR

  - VK_ERROR_VIDEO_PROFILE_OPERATION_NOT_SUPPORTED_KHR

The `VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_encode_queue
    typedef struct VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR {
        VkStructureType                 sType;
        const void*                     pNext;
        const VkVideoProfileInfoKHR*    pVideoProfile;
        uint32_t                        qualityLevel;
    } VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `pVideoProfile` is a pointer to a VkVideoProfileInfoKHR structure specifying the video profile to query the video encode quality level properties for.

- `qualityLevel` is the video encode quality level to query properties for.

Valid Usage

- VUID-VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR-pVideoProfile-08259
  `pVideoProfile` must be a supported video profile

- VUID-VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR-pVideoProfile-08260
  `pVideoProfile->videoCodecOperation` must specify an encode operation

- VUID-VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR-qualityLevel-08261
  `qualityLevel` must be less than VkVideoEncodeCapabilitiesKHR::`maxQualityLevels`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile specified in `pVideoProfile`

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_ENCODE_QUALITY_LEVEL_INFO_KHR

- VUID-VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR-pVideoProfile-parameter
  `pVideoProfile` must be a valid pointer to a valid VkVideoProfileInfoKHR structure

The `VkVideoEncodeQualityLevelPropertiesKHR` structure is defined as:

    // Provided by VK_KHR_video_encode_queue
    typedef struct VkVideoEncodeQualityLevelPropertiesKHR {
        VkStructureType                            sType;
        void*                                      pNext;
        VkVideoEncodeRateControlModeFlagBitsKHR    preferredRateControlMode;
        uint32_t                                   preferredRateControlLayerCount;
    } VkVideoEncodeQualityLevelPropertiesKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `preferredRateControlMode` is a VkVideoEncodeRateControlModeFlagBitsKHR value indicating the preferred rate control mode to use with the video encode quality level.

- `preferredRateControlLayerCount` indicates the preferred number of rate control layers to use with the video encode quality level.

Valid Usage (Implicit)

- VUID-VkVideoEncodeQualityLevelPropertiesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_ENCODE_QUALITY_LEVEL_PROPERTIES_KHR

- VUID-VkVideoEncodeQualityLevelPropertiesKHR-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkVideoEncodeAV1QualityLevelPropertiesKHR, VkVideoEncodeH264QualityLevelPropertiesKHR, or VkVideoEncodeH265QualityLevelPropertiesKHR

- VUID-VkVideoEncodeQualityLevelPropertiesKHR-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

The `VkVideoEncodeQualityLevelInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_encode_queue
    typedef struct VkVideoEncodeQualityLevelInfoKHR {
        VkStructureType    sType;
        const void*        pNext;
        uint32_t           qualityLevel;
    } VkVideoEncodeQualityLevelInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `qualityLevel` is the used video encode quality level.

This structure can be specified in the following places:

- In the `pNext` chain of VkVideoSessionParametersCreateInfoKHR to specify the video encode quality level to use for a video session parameters object created for a video encode session. If no instance of this structure is included in the `pNext` chain of VkVideoSessionParametersCreateInfoKHR, then the video session parameters object is created with a video encode quality level of zero.

- In the `pNext` chain of VkVideoCodingControlInfoKHR to change the video encode quality level state of the bound video session.

Valid Usage

- VUID-VkVideoEncodeQualityLevelInfoKHR-qualityLevel-08311
  `qualityLevel` must be less than VkVideoEncodeCapabilitiesKHR::`maxQualityLevels`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the used video profile

Valid Usage (Implicit)

- VUID-VkVideoEncodeQualityLevelInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_ENCODE_QUALITY_LEVEL_INFO_KHR

Structure Chaining

Extends the structures

  - VkVideoCodingControlInfoKHR

  - VkVideoSessionParametersCreateInfoKHR

#### 49.16.5. Retrieving Encoded Session Parameters

Any codec-specific parameters stored in video session parameters objects may need to be separately encoded and included in the final video bitstream data, depending on the used video compression standard. In such cases the application must call the vkGetEncodedVideoSessionParametersKHR command to retrieve the encoded parameter data from the used video session parameters object in order to be able to produce a compliant video bitstream.

Note | This is needed because implementations may have changed some of the codec-specific parameters stored in the video session parameters object, as defined in the Video Encode Parameter Overrides section. In addition, the vkGetEncodedVideoSessionParametersKHR command enables the application to retrieve the encoded parameter data without having to encode these codec-specific parameters manually.

Encoded parameter data can be retrieved from a video session parameters object created with a video encode operation using the command:

    // Provided by VK_KHR_video_encode_queue
    VkResult vkGetEncodedVideoSessionParametersKHR(
        VkDevice                                    device,
        const VkVideoEncodeSessionParametersGetInfoKHR* pVideoSessionParametersInfo,
        VkVideoEncodeSessionParametersFeedbackInfoKHR* pFeedbackInfo,
        size_t*                                     pDataSize,
        void*                                       pData);

- `device` is the logical device that owns the video session parameters object.

- `pVideoSessionParametersInfo` is a pointer to a VkVideoEncodeSessionParametersGetInfoKHR structure specifying the parameters of the encoded parameter data to retrieve.

- `pFeedbackInfo` is either `NULL` or a pointer to a VkVideoEncodeSessionParametersFeedbackInfoKHR structure in which feedback about the requested parameter data is returned.

- `pDataSize` is a pointer to a `size_t` value related to the amount of encode parameter data returned, as described below.

- `pData` is either `NULL` or a pointer to a buffer to write the encoded parameter data to.

If `pData` is `NULL`, then the size of the encoded parameter data, in bytes, that can be retrieved is returned in `pDataSize`. Otherwise, `pDataSize` must point to a variable set by the application to the size of the buffer, in bytes, pointed to by `pData`, and on return the variable is overwritten with the number of bytes actually written to `pData`. If `pDataSize` is less than the size of the encoded parameter data that can be retrieved, then no data will be written to `pData`, zero will be written to `pDataSize`, and VK_INCOMPLETE will be returned instead of VK_SUCCESS, to indicate that no encoded parameter data was returned.

If `pFeedbackInfo` is not `NULL` then the members of the VkVideoEncodeSessionParametersFeedbackInfoKHR structure and any additional structures included in its `pNext` chain that are applicable to the video session parameters object specified in `pVideoSessionParametersInfo->videoSessionParameters` will be filled with feedback about the requested parameter data on all successful calls to this command.

Note | This includes the cases when `pData` is `NULL` or when VK_INCOMPLETE is returned by the command, and enables the application to determine whether the implementation overrode any of the requested video session parameters without actually needing to retrieve the encoded parameter data itself.

Note | This query does not behave consistently with the behavior described in Opaque Binary Data Results, for historical reasons. If the amount of data available is larger than the passed `pDataSize`, the query returns a VK_INCOMPLETE success status instead of a VK_ERROR_NOT_ENOUGH_SPACE_KHR error status, and writes zero to `pDataSize`.

Valid Usage

- VUID-vkGetEncodedVideoSessionParametersKHR-pVideoSessionParametersInfo-08359
  `pVideoSessionParametersInfo->videoSessionParameters` must have been created with an encode operation

- VUID-vkGetEncodedVideoSessionParametersKHR-pVideoSessionParametersInfo-08262
  If `pVideoSessionParametersInfo->videoSessionParameters` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR, then the `pNext` chain of `pVideoSessionParametersInfo` must include a VkVideoEncodeH264SessionParametersGetInfoKHR structure

- VUID-vkGetEncodedVideoSessionParametersKHR-pVideoSessionParametersInfo-08263
  If `pVideoSessionParametersInfo->videoSessionParameters` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR, then for the VkVideoEncodeH264SessionParametersGetInfoKHR structure included in the `pNext` chain of `pVideoSessionParametersInfo`, if its `writeStdSPS` member is VK_TRUE, then `pVideoSessionParametersInfo->videoSessionParameters` must contain a `StdVideoH264SequenceParameterSet` entry with `seq_parameter_set_id` matching VkVideoEncodeH264SessionParametersGetInfoKHR::`stdSPSId`

- VUID-vkGetEncodedVideoSessionParametersKHR-pVideoSessionParametersInfo-08264
  If `pVideoSessionParametersInfo->videoSessionParameters` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR, then for the VkVideoEncodeH264SessionParametersGetInfoKHR structure included in the `pNext` chain of `pVideoSessionParametersInfo`, if its `writeStdPPS` member is VK_TRUE, then `pVideoSessionParametersInfo->videoSessionParameters` must contain a `StdVideoH264PictureParameterSet` entry with `seq_parameter_set_id` and `pic_parameter_set_id` matching VkVideoEncodeH264SessionParametersGetInfoKHR::`stdSPSId` and VkVideoEncodeH264SessionParametersGetInfoKHR::`stdPPSId`, respectively

- VUID-vkGetEncodedVideoSessionParametersKHR-pVideoSessionParametersInfo-08265
  If `pVideoSessionParametersInfo->videoSessionParameters` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR, then the `pNext` chain of `pVideoSessionParametersInfo` must include a VkVideoEncodeH265SessionParametersGetInfoKHR structure

- VUID-vkGetEncodedVideoSessionParametersKHR-pVideoSessionParametersInfo-08266
  If `pVideoSessionParametersInfo->videoSessionParameters` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR, then for the VkVideoEncodeH265SessionParametersGetInfoKHR structure included in the `pNext` chain of `pVideoSessionParametersInfo`, if its `writeStdVPS` member is VK_TRUE, then `pVideoSessionParametersInfo->videoSessionParameters` must contain a `StdVideoH265VideoParameterSet` entry with `vps_video_parameter_set_id` matching VkVideoEncodeH265SessionParametersGetInfoKHR::`stdVPSId`

- VUID-vkGetEncodedVideoSessionParametersKHR-pVideoSessionParametersInfo-08267
  If `pVideoSessionParametersInfo->videoSessionParameters` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR, then for the VkVideoEncodeH265SessionParametersGetInfoKHR structure included in the `pNext` chain of `pVideoSessionParametersInfo`, if its `writeStdSPS` member is VK_TRUE, then `pVideoSessionParametersInfo->videoSessionParameters` must contain a `StdVideoH265SequenceParameterSet` entry with `sps_video_parameter_set_id` and `sps_seq_parameter_set_id` matching VkVideoEncodeH265SessionParametersGetInfoKHR::`stdVPSId` and VkVideoEncodeH265SessionParametersGetInfoKHR::`stdSPSId`, respectively

- VUID-vkGetEncodedVideoSessionParametersKHR-pVideoSessionParametersInfo-08268
  If `pVideoSessionParametersInfo->videoSessionParameters` was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR, then for the VkVideoEncodeH265SessionParametersGetInfoKHR structure included in the `pNext` chain of `pVideoSessionParametersInfo`, if its `writeStdPPS` member is VK_TRUE, then `pVideoSessionParametersInfo->videoSessionParameters` must contain a `StdVideoH265PictureParameterSet` entry with `sps_video_parameter_set_id`, `pps_seq_parameter_set_id`, and `pps_pic_parameter_set_id` matching VkVideoEncodeH265SessionParametersGetInfoKHR::`stdVPSId`, VkVideoEncodeH265SessionParametersGetInfoKHR::`stdSPSId`, and VkVideoEncodeH265SessionParametersGetInfoKHR::`stdPPSId`, respectively

Valid Usage (Implicit)

- VUID-vkGetEncodedVideoSessionParametersKHR-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetEncodedVideoSessionParametersKHR-pVideoSessionParametersInfo-parameter
  `pVideoSessionParametersInfo` must be a valid pointer to a valid VkVideoEncodeSessionParametersGetInfoKHR structure

- VUID-vkGetEncodedVideoSessionParametersKHR-pFeedbackInfo-parameter
  If `pFeedbackInfo` is not `NULL`, `pFeedbackInfo` must be a valid pointer to a VkVideoEncodeSessionParametersFeedbackInfoKHR structure

- VUID-vkGetEncodedVideoSessionParametersKHR-pDataSize-parameter
  `pDataSize` must be a valid pointer to a `size_t` value

- VUID-vkGetEncodedVideoSessionParametersKHR-pData-parameter
  If the value referenced by `pDataSize` is not `0`, and `pData` is not `NULL`, `pData` must be a valid pointer to an array of `pDataSize` bytes

Return Codes

Success

  - VK_INCOMPLETE

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkVideoEncodeSessionParametersGetInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_encode_queue
    typedef struct VkVideoEncodeSessionParametersGetInfoKHR {
        VkStructureType                sType;
        const void*                    pNext;
        VkVideoSessionParametersKHR    videoSessionParameters;
    } VkVideoEncodeSessionParametersGetInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `videoSessionParameters` is the VkVideoSessionParametersKHR object to retrieve encoded parameter data from.

Depending on the used video encode operation, additional codec-specific structures may need to be included in the `pNext` chain of this structure to identify the specific video session parameters to retrieve encoded parameter data for, as described in the corresponding sections.

Valid Usage (Implicit)

- VUID-VkVideoEncodeSessionParametersGetInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_ENCODE_SESSION_PARAMETERS_GET_INFO_KHR

- VUID-VkVideoEncodeSessionParametersGetInfoKHR-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkVideoEncodeH264SessionParametersGetInfoKHR or VkVideoEncodeH265SessionParametersGetInfoKHR

- VUID-VkVideoEncodeSessionParametersGetInfoKHR-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkVideoEncodeSessionParametersGetInfoKHR-videoSessionParameters-parameter
  `videoSessionParameters` must be a valid VkVideoSessionParametersKHR handle

The `VkVideoEncodeSessionParametersFeedbackInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_encode_queue
    typedef struct VkVideoEncodeSessionParametersFeedbackInfoKHR {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           hasOverrides;
    } VkVideoEncodeSessionParametersFeedbackInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `hasOverrides` indicates whether any of the requested parameter data were overridden by the implementation.

Depending on the used video encode operation, additional codec-specific structures can be included in the `pNext` chain of this structure to capture codec-specific feedback information about the requested parameter data, as described in the corresponding sections.

Valid Usage (Implicit)

- VUID-VkVideoEncodeSessionParametersFeedbackInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_ENCODE_SESSION_PARAMETERS_FEEDBACK_INFO_KHR

- VUID-VkVideoEncodeSessionParametersFeedbackInfoKHR-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkVideoEncodeH264SessionParametersFeedbackInfoKHR or VkVideoEncodeH265SessionParametersFeedbackInfoKHR

- VUID-VkVideoEncodeSessionParametersFeedbackInfoKHR-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

#### 49.16.6. Video Encode Commands

To launch video encode operations, call:

    // Provided by VK_KHR_video_encode_queue
    void vkCmdEncodeVideoKHR(
        VkCommandBuffer                             commandBuffer,
        const VkVideoEncodeInfoKHR*                 pEncodeInfo);

- `commandBuffer` is the command buffer in which to record the command.

- `pEncodeInfo` is a pointer to a VkVideoEncodeInfoKHR structure specifying the parameters of the video encode operations.

Each call issues one or more video encode operations. The implicit parameter `opCount` corresponds to the number of video encode operations issued by the command. After calling this command, the active query index of each active query is incremented by `opCount`.

Currently each call to this command results in the issue of a single video encode operation.

If the bound video session was created with VK_VIDEO_SESSION_CREATE_INLINE_QUERIES_BIT_KHR and the `pNext` chain of `pEncodeInfo` includes a VkVideoInlineQueryInfoKHR structure with its `queryPool` member specifying a valid `VkQueryPool` handle, then this command will execute a query for each video encode operation issued by it.

Active Reference Picture Information

  The list of active reference pictures used by a video encode operation is a list of image subregions used as the source of reference picture data and related parameters, and is derived from the VkVideoReferenceSlotInfoKHR structures provided as the elements of the `pEncodeInfo->pReferenceSlots` array. For each element of `pEncodeInfo->pReferenceSlots`, one or more elements are added to the active reference picture list, as defined by the codec-specific semantics. Each element of this list contains the following information:

  - The image subregion within the image subresource referred to by the video picture resource used as the reference picture.

  - The DPB slot index the reference picture is associated with.

  - The codec-specific reference information related to the reference picture.

Reconstructed Picture Information

  Information related to the optional reconstructed picture used by a video encode operation is derived from the VkVideoReferenceSlotInfoKHR structure pointed to by `pEncodeInfo->pSetupReferenceSlot`, if not `NULL`, as defined by the codec-specific semantics, and consists of the following:

  - The image subregion within the image subresource referred to by the video picture resource used as the reconstructed picture.

  - The DPB slot index to use for picture reconstruction.

  - The codec-specific reference information related to the reconstructed picture.

Specifying a valid VkVideoReferenceSlotInfoKHR structure in `pEncodeInfo->pSetupReferenceSlot` is always required, unless the video session was created with VkVideoSessionCreateInfoKHR::`maxDpbSlots` equal to zero. However, the DPB slot identified by `pEncodeInfo->pSetupReferenceSlot->slotIndex` is only activated with the reconstructed picture specified in `pEncodeInfo->pSetupReferenceSlot->pPictureResource` if reference picture setup is requested according to the codec-specific semantics.

If reconstructed picture information is specified, but reference picture setup is not requested, according to the codec-specific semantics, the contents of the video picture resource corresponding to the reconstructed picture will be undefined after the video encode operation.

Note | Some implementations may always output the reconstructed picture or use it as temporary storage during the video encode operation even when the reconstructed picture is not marked for future reference.

Encode Input Picture Information

  Information related to the encode input picture used by a video encode operation is derived from `pEncodeInfo->srcPictureResource` and any codec-specific parameters provided in the `pEncodeInfo->pNext` chain, as defined by the codec-specific semantics, and consists of the following:

  - The image subregion within the image subresource referred to by the video picture resource used as the encode input picture.

  - The codec-specific picture information related to the encoded picture.

Several limiting values are defined below that are referenced by the relevant valid usage statements of this command.

- Let `uint32_t activeReferencePictureCount` be the size of the list of active reference pictures used by the video encode operation. Unless otherwise defined, `activeReferencePictureCount` is set to the value of `pEncodeInfo->referenceSlotCount`.

- Let `VkOffset2D codedOffsetGranularity` be the minimum alignment requirement for the coded offset of video picture resources. Unless otherwise defined, the value of the `x` and `y` members of `codedOffsetGranularity` are `0`.

- Let `uint32_t dpbFrameUseCount[]` be an array of size `maxDpbSlots`, where `maxDpbSlots` is the VkVideoSessionCreateInfoKHR::`maxDpbSlots` the bound video session was created with, with each element indicating the number of times a frame associated with the corresponding DPB slot index is referred to by the video coding operation. Let the initial value of each element of the array be `0`.

  - If `pEncodeInfo->pSetupReferenceSlot` is not `NULL`, then `dpbFrameUseCount[i]` is incremented by one, where `i` equals `pEncodeInfo->pSetupReferenceSlot->slotIndex`.

  - For each element of `pEncodeInfo->pReferenceSlots`, `dpbFrameUseCount[i]` is incremented by one, where `i` equals the `slotIndex` member of the corresponding element.

- If there is a bound video session parameters object created with VK_VIDEO_SESSION_PARAMETERS_CREATE_QUANTIZATION_MAP_COMPATIBLE_BIT_KHR, then let `VkExtent2D quantizationMapTexelSize` be the quantization map texel size the bound video session parameters object was created with.

- Let `VkExtent2D maxCodingBlockSize` be the maximum codec-specific coding block size that may be used by the video encode operation.

  - If the bound video session object was created with an H.264 encode profile, then let `maxCodingBlockSize` be equal to the size of an H.264 macroblock, i.e. `{16,16}`.

  - If the bound video session object was created with an H.265 encode profile, then let `maxCodingBlockSize` be equal to the maximum H.265 coding block size that may be used by the video encode operation derived as the maximum of the CTB sizes corresponding to the VkVideoEncodeH265CtbSizeFlagBitsKHR bits set in VkVideoEncodeH265CapabilitiesKHR::`ctbSizes`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile the bound video session was created with.

  - If the bound video session object was created with an AV1 encode profile, then let `maxCodingBlockSize` be equal to the maximum AV1 superblock size that may be used by the video encode operation derived as the maximum of the superblock sizes corresponding to the VkVideoEncodeAV1SuperblockSizeFlagBitsKHR bits set in VkVideoEncodeAV1CapabilitiesKHR::`superblockSizes`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile the bound video session was created with.

  - Otherwise, `maxCodingBlockSize` is undefined.

- If `maxCodingBlockSize` is defined, then let `VkExtent2D minCodingBlockExtent` be the coded extent of the encode input picture expressed in terms of codec-specific coding blocks, assuming the maximum size of such coding blocks, as defined by `maxCodingBlockSize`, calculated from the value of the `codedExtent` member of `pEncodeInfo->srcPictureResource` as follows:

  - `minCodingBlockExtent.width` = (`codedExtent.width`
    `maxCodingBlockSize.width` - 1) / `maxCodingBlockSize.width`

  - `minCodingBlockExtent.height` = (`codedExtent.height`
    `maxCodingBlockSize.height` - 1) / `maxCodingBlockSize.height`

- If the bound video session object was created with an H.264 encode profile, then:

  - Let `StdVideoH264PictureType h264PictureType` be the picture type of the encoded picture set to the value of `pStdPictureInfo->primary_pic_type` specified in the VkVideoEncodeH264PictureInfoKHR structure included in the `pEncodeInfo->pNext` chain.

  - Let `StdVideoH264PictureType h264L0PictureTypes[]` and `StdVideoH264PictureType h264L1PictureTypes[]` be the picture types of the reference pictures in the L0 and L1 reference lists, respectively. If `pStdPictureInfo->pRefLists` specified in the VkVideoEncodeH264PictureInfoKHR structure included in the `pEncodeInfo->pNext` chain is not `NULL`, then for each reference index specified in the elements of the `pStdPictureInfo->pRefLists->RefPicList0` and `pStdPictureInfo->pRefLists->RefPicList1` arrays, if the reference index is not `STD_VIDEO_H264_NO_REFERENCE_PICTURE`, `pStdReferenceInfo->primary_pic_type` is added to `h264L0PictureTypes` or `h264L1PictureTypes`, respectively, where `pStdReferenceInfo` is the member of the VkVideoEncodeH264DpbSlotInfoKHR structure included in the `pNext` chain of the element of `pEncodeInfo->pReferenceSlots` for which `slotIndex` equals the reference index in question.

- If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR and with the intra refresh mode VK_VIDEO_ENCODE_INTRA_REFRESH_MODE_PER_PICTURE_PARTITION_BIT_KHR, `pEncodeInfo->flags` includes VK_VIDEO_ENCODE_INTRA_REFRESH_BIT_KHR, and the `pNext` chain of `pEncodeInfo` includes a VkVideoEncodeIntraRefreshInfoKHR structure, then let `uint32_t intraRefreshH264SliceIndex` be the intra refresh index specified in VkVideoEncodeIntraRefreshInfoKHR::`intraRefreshIndex`. Otherwise `intraRefreshH264SliceIndex` is not defined.

- If the bound video session object was created with an H.265 encode profile, then:

  - Let `StdVideoH265PictureType h265PictureType` be the picture type of the encoded picture set to the value of `pStdPictureInfo->pic_type` specified in the VkVideoEncodeH265PictureInfoKHR structure included in the `pEncodeInfo->pNext` chain.

  - Let `StdVideoH265PictureType h265L0PictureTypes[]` and `StdVideoH265PictureType h265L1PictureTypes[]` be the picture types of the reference pictures in the L0 and L1 reference lists, respectively. If `pStdPictureInfo->pRefLists` specified in the VkVideoEncodeH265PictureInfoKHR structure included in the `pEncodeInfo->pNext` chain is not `NULL`, then for each reference index specified in the elements of the `pStdPictureInfo->pRefLists->RefPicList0` and `pStdPictureInfo->pRefLists->RefPicList1` arrays, if the reference index is not `STD_VIDEO_H265_NO_REFERENCE_PICTURE`, `pStdReferenceInfo->pic_type` is added to `h265L0PictureTypes` or `h265L1PictureTypes`, respectively, where `pStdReferenceInfo` is the member of the VkVideoEncodeH265DpbSlotInfoKHR structure included in the `pNext` chain of the element of `pEncodeInfo->pReferenceSlots` for which `slotIndex` equals the reference index in question.

- If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR and with the intra refresh mode VK_VIDEO_ENCODE_INTRA_REFRESH_MODE_PER_PICTURE_PARTITION_BIT_KHR, `pEncodeInfo->flags` includes VK_VIDEO_ENCODE_INTRA_REFRESH_BIT_KHR, and the `pNext` chain of `pEncodeInfo` includes a VkVideoEncodeIntraRefreshInfoKHR structure, then let `uint32_t intraRefreshH265SliceSegmentIndex` be the intra refresh index specified in VkVideoEncodeIntraRefreshInfoKHR::`intraRefreshIndex`. Otherwise `intraRefreshH265SliceSegmentIndex` is not defined.

- If the bound video session object was created with an AV1 encode profile, then:

  - If the `primaryReferenceCdfOnly` member of the VkVideoEncodeAV1PictureInfoKHR structure included in the `pEncodeInfo->pNext` chain is set to VK_TRUE, then let `int32_t cdfOnlyReferenceIndex` be the value of VkVideoEncodeAV1PictureInfoKHR::`pStdPictureInfo->primary_ref_frame`.

  - Otherwise let `int32_t cdfOnlyReferenceIndex` be `-1`.

Valid Usage

- VUID-vkCmdEncodeVideoKHR-None-08250
  The bound video session must have been created with an encode operation

- VUID-vkCmdEncodeVideoKHR-None-07012
  The bound video session must not be in uninitialized state at the time the command is executed on the device

- VUID-vkCmdEncodeVideoKHR-None-08318
  If there is a bound video session parameters object, then it must have been created with the currently set video encode quality level for the bound video session at the time the command is executed on the device

- VUID-vkCmdEncodeVideoKHR-opCount-07174
  For each active query, the active query index corresponding to the query type of that query plus `opCount` must be less than or equal to the last activatable query index corresponding to the query type of that query plus one

- VUID-vkCmdEncodeVideoKHR-pNext-08360
  If the bound video session was created with VK_VIDEO_SESSION_CREATE_INLINE_QUERIES_BIT_KHR, and the `pNext` chain of `pEncodeInfo` includes a VkVideoInlineQueryInfoKHR structure with its `queryPool` member specifying a valid `VkQueryPool` handle, then VkVideoInlineQueryInfoKHR::`queryCount` must equal `opCount`

- VUID-vkCmdEncodeVideoKHR-pNext-08361
  If the bound video session was created with VK_VIDEO_SESSION_CREATE_INLINE_QUERIES_BIT_KHR, and the `pNext` chain of `pEncodeInfo` includes a VkVideoInlineQueryInfoKHR structure with its `queryPool` member specifying a valid `VkQueryPool` handle, then all the queries used by the command, as specified by the VkVideoInlineQueryInfoKHR structure, must be unavailable

- VUID-vkCmdEncodeVideoKHR-queryType-08362
  If the bound video session was created with VK_VIDEO_SESSION_CREATE_INLINE_QUERIES_BIT_KHR, then the `queryType` used to create the `queryPool` specified in the VkVideoInlineQueryInfoKHR structure included in the `pNext` chain of `pEncodeInfo` must be VK_QUERY_TYPE_RESULT_STATUS_ONLY_KHR or VK_QUERY_TYPE_VIDEO_ENCODE_FEEDBACK_KHR

- VUID-vkCmdEncodeVideoKHR-queryPool-08363
  If the bound video session was created with VK_VIDEO_SESSION_CREATE_INLINE_QUERIES_BIT_KHR, then the `queryPool` specified in the VkVideoInlineQueryInfoKHR structure included in the `pNext` chain of `pEncodeInfo` must have been created with a VkVideoProfileInfoKHR structure included in the `pNext` chain of VkQueryPoolCreateInfo identical to the one specified in VkVideoSessionCreateInfoKHR::`pVideoProfile` the bound video session was created with

- VUID-vkCmdEncodeVideoKHR-queryType-08364
  If the bound video session was created with VK_VIDEO_SESSION_CREATE_INLINE_QUERIES_BIT_KHR, and the `queryType` used to create the `queryPool` specified in the VkVideoInlineQueryInfoKHR structure included in the `pNext` chain of `pEncodeInfo` is VK_QUERY_TYPE_RESULT_STATUS_ONLY_KHR, then the `VkCommandPool` that `commandBuffer` was allocated from must have been created with a queue family index that supports result status queries, as indicated by VkQueueFamilyQueryResultStatusPropertiesKHR::`queryResultStatusSupport`

- VUID-vkCmdEncodeVideoKHR-pEncodeInfo-08201
  `pEncodeInfo->dstBuffer` must be compatible with the video profile the bound video session was created with

- VUID-vkCmdEncodeVideoKHR-commandBuffer-08202
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, then `pEncodeInfo->dstBuffer` must not be a protected buffer

- VUID-vkCmdEncodeVideoKHR-commandBuffer-08203
  If `commandBuffer` is a protected command buffer and `protectedNoFault` is not supported, then `pEncodeInfo->dstBuffer` must be a protected buffer

- VUID-vkCmdEncodeVideoKHR-pEncodeInfo-08204
  `pEncodeInfo->dstBufferOffset` must be an integer multiple of VkVideoCapabilitiesKHR::`minBitstreamBufferOffsetAlignment`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile the bound video session was created with

- VUID-vkCmdEncodeVideoKHR-pEncodeInfo-08205
  `pEncodeInfo->dstBufferRange` must be an integer multiple of VkVideoCapabilitiesKHR::`minBitstreamBufferSizeAlignment`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile the bound video session was created with

- VUID-vkCmdEncodeVideoKHR-pEncodeInfo-08206
  `pEncodeInfo->srcPictureResource.imageViewBinding` must be compatible with the video profile the bound video session was created with

- VUID-vkCmdEncodeVideoKHR-pEncodeInfo-08207
  The format of `pEncodeInfo->srcPictureResource.imageViewBinding` must match the VkVideoSessionCreateInfoKHR::`pictureFormat` the bound video session was created with

- VUID-vkCmdEncodeVideoKHR-pEncodeInfo-08208
  `pEncodeInfo->srcPictureResource.codedOffset` must be an integer multiple of `codedOffsetGranularity`

- VUID-vkCmdEncodeVideoKHR-pEncodeInfo-08209
  `pEncodeInfo->srcPictureResource.codedExtent` must be between `minCodedExtent` and `maxCodedExtent`, inclusive, the bound video session was created with

- VUID-vkCmdEncodeVideoKHR-pEncodeInfo-08210
  `pEncodeInfo->srcPictureResource.imageViewBinding` must have been created with the VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR usage flag set

- VUID-vkCmdEncodeVideoKHR-commandBuffer-08211
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, then `pEncodeInfo->srcPictureResource.imageViewBinding` must not have been created from a protected image

- VUID-vkCmdEncodeVideoKHR-pEncodeInfo-08377
  `pEncodeInfo->pSetupReferenceSlot` must not be `NULL` unless the bound video session was created with VkVideoSessionCreateInfoKHR::`maxDpbSlots` equal to zero

- VUID-vkCmdEncodeVideoKHR-pEncodeInfo-08213
  If `pEncodeInfo->pSetupReferenceSlot` is not `NULL`, then `pEncodeInfo->pSetupReferenceSlot->slotIndex` must be less than the VkVideoSessionCreateInfoKHR::`maxDpbSlots` specified when the bound video session was created

- VUID-vkCmdEncodeVideoKHR-pEncodeInfo-08214
  If `pEncodeInfo->pSetupReferenceSlot` is not `NULL`, then `pEncodeInfo->pSetupReferenceSlot->pPictureResource->codedOffset` must be an integer multiple of `codedOffsetGranularity`

- VUID-vkCmdEncodeVideoKHR-pEncodeInfo-08215
  If `pEncodeInfo->pSetupReferenceSlot` is not `NULL`, then `pEncodeInfo->pSetupReferenceSlot->pPictureResource` must match one of the bound reference picture resource

- VUID-vkCmdEncodeVideoKHR-activeReferencePictureCount-08216
  `activeReferencePictureCount` must be less than or equal to the VkVideoSessionCreateInfoKHR::`maxActiveReferencePictures` specified when the bound video session was created

- VUID-vkCmdEncodeVideoKHR-slotIndex-08217
  The `slotIndex` member of each element of `pEncodeInfo->pReferenceSlots` must be less than the VkVideoSessionCreateInfoKHR::`maxDpbSlots` specified when the bound video session was created

- VUID-vkCmdEncodeVideoKHR-codedOffset-08218
  The `codedOffset` member of the VkVideoPictureResourceInfoKHR structure pointed to by the `pPictureResource` member of each element of `pEncodeInfo->pReferenceSlots` must be an integer multiple of `codedOffsetGranularity`

- VUID-vkCmdEncodeVideoKHR-pPictureResource-08219
  The `pPictureResource` member of each element of `pEncodeInfo->pReferenceSlots` must match one of the bound reference picture resource associated with the DPB slot index specified in the `slotIndex` member of that element

- VUID-vkCmdEncodeVideoKHR-pPictureResource-08220
  Each video picture resource corresponding to the `pPictureResource` member specified in the elements of `pEncodeInfo->pReferenceSlots` must be unique within `pEncodeInfo->pReferenceSlots`

- VUID-vkCmdEncodeVideoKHR-dpbFrameUseCount-08221
  All elements of `dpbFrameUseCount` must be less than or equal to `1`

- VUID-vkCmdEncodeVideoKHR-pEncodeInfo-10811
  The image subresource referred to by `pEncodeInfo->srcPictureResource` must be in the VK_IMAGE_LAYOUT_VIDEO_ENCODE_SRC_KHR layout at the time the video encode operation is executed on the device , unless the `unifiedImageLayoutsVideo` feature is enabled, in which case it may be in the VK_IMAGE_LAYOUT_GENERAL layout

- VUID-vkCmdEncodeVideoKHR-pEncodeInfo-10812
  If `pEncodeInfo->pSetupReferenceSlot` is not `NULL`, then the image subresource referred to by `pEncodeInfo->pSetupReferenceSlot->pPictureResource` must be in the VK_IMAGE_LAYOUT_VIDEO_ENCODE_DPB_KHR layout at the time the video encode operation is executed on the device , unless the `unifiedImageLayoutsVideo` feature is enabled, in which case it may be in the VK_IMAGE_LAYOUT_GENERAL layout

- VUID-vkCmdEncodeVideoKHR-pPictureResource-10813
  The image subresource referred to by the `pPictureResource` member of each element of `pEncodeInfo->pReferenceSlots` must be in the VK_IMAGE_LAYOUT_VIDEO_ENCODE_DPB_KHR layout at the time the video encode operation is executed on the device , unless the `unifiedImageLayoutsVideo` feature is enabled, in which case it may be in the VK_IMAGE_LAYOUT_GENERAL layout

- VUID-vkCmdEncodeVideoKHR-pEncodeInfo-10306
  If `pEncodeInfo->flags` includes VK_VIDEO_ENCODE_WITH_QUANTIZATION_DELTA_MAP_BIT_KHR, then the bound video session must have been created with VK_VIDEO_SESSION_CREATE_ALLOW_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR

- VUID-vkCmdEncodeVideoKHR-pEncodeInfo-10307
  If `pEncodeInfo->flags` includes VK_VIDEO_ENCODE_WITH_EMPHASIS_MAP_BIT_KHR, then the bound video session must have been created with VK_VIDEO_SESSION_CREATE_ALLOW_ENCODE_EMPHASIS_MAP_BIT_KHR

- VUID-vkCmdEncodeVideoKHR-pEncodeInfo-10308
  If the current rate control mode is VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DEFAULT_KHR or VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR, then `pEncodeInfo->flags` must not include VK_VIDEO_ENCODE_WITH_EMPHASIS_MAP_BIT_KHR

- VUID-vkCmdEncodeVideoKHR-pEncodeInfo-10309
  If `pEncodeInfo->flags` includes VK_VIDEO_ENCODE_WITH_QUANTIZATION_DELTA_MAP_BIT_KHR or VK_VIDEO_ENCODE_WITH_EMPHASIS_MAP_BIT_KHR, then the `pNext` chain of `pEncodeInfo` must include a VkVideoEncodeQuantizationMapInfoKHR structure with its `quantizationMap` member specifying a valid `VkImageView` handle

- VUID-vkCmdEncodeVideoKHR-pEncodeInfo-10310
  If `pEncodeInfo->flags` includes VK_VIDEO_ENCODE_WITH_QUANTIZATION_DELTA_MAP_BIT_KHR or VK_VIDEO_ENCODE_WITH_EMPHASIS_MAP_BIT_KHR, then the `VkImageView` specified by the `quantizationMap` member of the VkVideoEncodeQuantizationMapInfoKHR structure included in the `pNext` chain must be compatible with the video profile the bound video session was created with

- VUID-vkCmdEncodeVideoKHR-pEncodeInfo-10311
  If `pEncodeInfo->flags` includes VK_VIDEO_ENCODE_WITH_QUANTIZATION_DELTA_MAP_BIT_KHR, then the `VkImageView` specified by the `quantizationMap` member of the VkVideoEncodeQuantizationMapInfoKHR structure included in the `pNext` chain of `pEncodeInfo` must have been created with the VK_IMAGE_USAGE_VIDEO_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR usage flag set

- VUID-vkCmdEncodeVideoKHR-pEncodeInfo-10312
  If `pEncodeInfo->flags` includes VK_VIDEO_ENCODE_WITH_EMPHASIS_MAP_BIT_KHR, then the `VkImageView` specified by the `quantizationMap` member of the VkVideoEncodeQuantizationMapInfoKHR structure included in the `pNext` chain of `pEncodeInfo` must have been created with the VK_IMAGE_USAGE_VIDEO_ENCODE_EMPHASIS_MAP_BIT_KHR usage flag set

- VUID-vkCmdEncodeVideoKHR-pNext-10313
  If an instance of the VkVideoEncodeQuantizationMapInfoKHR structure is included in the `pNext` chain of `pEncodeInfo`, its `quantizationMap` member is not VK_NULL_HANDLE, `commandBuffer` is an unprotected command buffer, and `protectedNoFault` is not supported, then VkVideoEncodeQuantizationMapInfoKHR::`quantizationMap` must not have been created from a protected image

- VUID-vkCmdEncodeVideoKHR-pNext-10314
  If an instance of the VkVideoEncodeQuantizationMapInfoKHR structure is included in the `pNext` chain of `pEncodeInfo` and its `quantizationMap` member is not VK_NULL_HANDLE, then the image subresource range referenced by `quantizationMap` must be in the VK_IMAGE_LAYOUT_VIDEO_ENCODE_QUANTIZATION_MAP_KHR layout at the time the video encode operation is executed on the device , unless the `unifiedImageLayoutsVideo` feature is enabled, in which case it may be in the VK_IMAGE_LAYOUT_GENERAL layout

- VUID-vkCmdEncodeVideoKHR-pNext-10315
  If an instance of the VkVideoEncodeQuantizationMapInfoKHR structure is included in the `pNext` chain of `pEncodeInfo` and its `quantizationMap` member is not VK_NULL_HANDLE, and there is a bound video session parameters object, then the bound video session parameters object must have been created with VK_VIDEO_SESSION_PARAMETERS_CREATE_QUANTIZATION_MAP_COMPATIBLE_BIT_KHR

- VUID-vkCmdEncodeVideoKHR-pNext-10316
  If an instance of the VkVideoEncodeQuantizationMapInfoKHR structure is included in the `pNext` chain of `pEncodeInfo`, its `quantizationMap` member is not VK_NULL_HANDLE, and there is a bound video session parameters object created with VK_VIDEO_SESSION_PARAMETERS_CREATE_QUANTIZATION_MAP_COMPATIBLE_BIT_KHR, then `quantizationMapExtent` must equal ⌈`pEncodeInfo->srcPictureResource.codedExtent` / `quantizationMapTexelSize`⌉

- VUID-vkCmdEncodeVideoKHR-pEncodeInfo-10837
  If `pEncodeInfo->flags` includes VK_VIDEO_ENCODE_INTRA_REFRESH_BIT_KHR, then the intra refresh mode the bound video session was created with must not be VK_VIDEO_ENCODE_INTRA_REFRESH_MODE_NONE_KHR

- VUID-vkCmdEncodeVideoKHR-pEncodeInfo-10838
  If `pEncodeInfo->flags` includes VK_VIDEO_ENCODE_INTRA_REFRESH_BIT_KHR, then `pEncodeInfo->activeReferencePictureCount` must be less than or equal to VkVideoEncodeIntraRefreshCapabilitiesKHR::`maxIntraRefreshActiveReferencePictures`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile the bound video session was created with

- VUID-vkCmdEncodeVideoKHR-pEncodeInfo-10839
  If `pEncodeInfo->flags` includes VK_VIDEO_ENCODE_INTRA_REFRESH_BIT_KHR, then the `pNext` chain of `pEncodeInfo` must include a VkVideoEncodeIntraRefreshInfoKHR structure

- VUID-vkCmdEncodeVideoKHR-pEncodeInfo-10840
  If `pEncodeInfo->flags` includes VK_VIDEO_ENCODE_INTRA_REFRESH_BIT_KHR, then the `intraRefreshCycleDuration` member of the VkVideoEncodeIntraRefreshInfoKHR structure included in the `pNext` chain of `pEncodeInfo` must not be zero

- VUID-vkCmdEncodeVideoKHR-pEncodeInfo-10841
  If `pEncodeInfo->flags` includes VK_VIDEO_ENCODE_INTRA_REFRESH_BIT_KHR, then the `intraRefreshIndex` member of the VkVideoEncodeIntraRefreshInfoKHR structure included in the `pNext` chain of `pEncodeInfo` must be less than VkVideoEncodeIntraRefreshInfoKHR::`intraRefreshCycleDuration`

- VUID-vkCmdEncodeVideoKHR-pNext-10842
  If the `pNext` chain of any element of `pEncodeInfo->pReferenceSlots` includes a VkVideoReferenceIntraRefreshInfoKHR structure with a non-zero `dirtyIntraRefreshRegions` member, then `pEncodeInfo->flags` must include VK_VIDEO_ENCODE_INTRA_REFRESH_BIT_KHR

- VUID-vkCmdEncodeVideoKHR-pNext-10843
  If the `pNext` chain of any element of `pEncodeInfo->pReferenceSlots` includes a VkVideoReferenceIntraRefreshInfoKHR structure with a non-zero `dirtyIntraRefreshRegions` member, then for each such element `dirtyIntraRefreshRegions` must equal `intraRefreshCycleDuration` minus `intraRefreshIndex` where `intraRefreshCycleDuration` and `intraRefreshIndex` are the members of the VkVideoEncodeIntraRefreshInfoKHR structure included in the `pNext` chain of `pEncodeInfo`

- VUID-vkCmdEncodeVideoKHR-pNext-10844
  If the `pNext` chain of `pEncodeInfo` includes a VkVideoEncodeIntraRefreshInfoKHR structure, then its `intraRefreshCycleDuration` member must be zero or must be between `2` and VkVideoEncodeIntraRefreshCapabilitiesKHR::`maxIntraRefreshCycleDuration`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile the bound video session was created with

- VUID-vkCmdEncodeVideoKHR-pNext-08225
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR, then the `pNext` chain of `pEncodeInfo` must include a VkVideoEncodeH264PictureInfoKHR structure

- VUID-vkCmdEncodeVideoKHR-StdVideoH264SequenceParameterSet-08226
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR, then the bound video session parameters object must contain a `StdVideoH264SequenceParameterSet` entry with `seq_parameter_set_id` matching `StdVideoEncodeH264PictureInfo`::`seq_parameter_set_id` that is provided in the `pStdPictureInfo` member of the VkVideoEncodeH264PictureInfoKHR structure included in the `pNext` chain of `pEncodeInfo`

- VUID-vkCmdEncodeVideoKHR-StdVideoH264PictureParameterSet-08227
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR, then the bound video session parameters object must contain a `StdVideoH264PictureParameterSet` entry with `seq_parameter_set_id` and `pic_parameter_set_id` matching `StdVideoEncodeH264PictureInfo`::`seq_parameter_set_id` and `StdVideoEncodeH264PictureInfo`::`pic_parameter_set_id`, respectively, that are provided in the `pStdPictureInfo` member of the VkVideoEncodeH264PictureInfoKHR structure included in the `pNext` chain of `pEncodeInfo`

- VUID-vkCmdEncodeVideoKHR-pEncodeInfo-08228
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR and `pEncodeInfo->pSetupReferenceSlot` is not `NULL`, then the `pNext` chain of `pEncodeInfo->pSetupReferenceSlot` must include a VkVideoEncodeH264DpbSlotInfoKHR structure

- VUID-vkCmdEncodeVideoKHR-pNext-08229
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR, then the `pNext` chain of each element of `pEncodeInfo->pReferenceSlots` must include a VkVideoEncodeH264DpbSlotInfoKHR structure

- VUID-vkCmdEncodeVideoKHR-constantQp-08269
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR and the current rate control mode is not VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR, then VkVideoEncodeH264NaluSliceInfoKHR::`constantQp` must be zero for each element of the `pNaluSliceEntries` member of the VkVideoEncodeH264PictureInfoKHR structure included in the `pNext` chain of `pEncodeInfo`

- VUID-vkCmdEncodeVideoKHR-constantQp-08270
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR and the current rate control mode is VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR, then VkVideoEncodeH264NaluSliceInfoKHR::`constantQp` must be between VkVideoEncodeH264CapabilitiesKHR::`minQp` and VkVideoEncodeH264CapabilitiesKHR::`maxQp`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile the bound video session was created with, for each element of the `pNaluSliceEntries` member of the VkVideoEncodeH264PictureInfoKHR structure included in the `pNext` chain of `pEncodeInfo`

- VUID-vkCmdEncodeVideoKHR-constantQp-08271
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR and VkVideoEncodeH264CapabilitiesKHR::`flags` does not include VK_VIDEO_ENCODE_H264_CAPABILITY_PER_SLICE_CONSTANT_QP_BIT_KHR, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile the bound video session was created with, then VkVideoEncodeH264NaluSliceInfoKHR::`constantQp` must have the same value for each element of the `pNaluSliceEntries` member of the VkVideoEncodeH264PictureInfoKHR structure included in the `pNext` chain of `pEncodeInfo`

- VUID-vkCmdEncodeVideoKHR-naluSliceEntryCount-08302
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR, then the `naluSliceEntryCount` member of the VkVideoEncodeH264PictureInfoKHR structure included in the `pNext` chain of `pEncodeInfo` must be less than or equal to `minCodingBlockExtent.width` multiplied by `minCodingBlockExtent.height`

- VUID-vkCmdEncodeVideoKHR-naluSliceEntryCount-08312
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR and VkVideoEncodeH264CapabilitiesKHR::`flags` does not include VK_VIDEO_ENCODE_H264_CAPABILITY_ROW_UNALIGNED_SLICE_BIT_KHR, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile the bound video session was created with, then the `naluSliceEntryCount` member of the VkVideoEncodeH264PictureInfoKHR structure included in the `pNext` chain of `pEncodeInfo` must be less than or equal to `minCodingBlockExtent.height`

- VUID-vkCmdEncodeVideoKHR-pEncodeInfo-10845
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR and with an intra refresh mode other than VK_VIDEO_ENCODE_INTRA_REFRESH_MODE_PER_PICTURE_PARTITION_BIT_KHR, `pEncodeInfo->flags` includes VK_VIDEO_ENCODE_INTRA_REFRESH_BIT_KHR, and VkVideoEncodeIntraRefreshCapabilitiesKHR::`partitionIndependentIntraRefreshRegions` is VK_FALSE, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile the bound video session was created with, then the `naluSliceEntryCount` member of the VkVideoEncodeH264PictureInfoKHR structure included in the `pNext` chain of `pEncodeInfo` must equal `1`

- VUID-vkCmdEncodeVideoKHR-pEncodeInfo-10846
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR and with the intra refresh mode VK_VIDEO_ENCODE_INTRA_REFRESH_MODE_PER_PICTURE_PARTITION_BIT_KHR, and `pEncodeInfo->flags` includes VK_VIDEO_ENCODE_INTRA_REFRESH_BIT_KHR, then the `naluSliceEntryCount` member of the VkVideoEncodeH264PictureInfoKHR structure included in the `pNext` chain of `pEncodeInfo` must equal the `intraRefreshCycleDuration` member of the VkVideoEncodeIntraRefreshInfoKHR structure included in the `pNext` chain of `pEncodeInfo`

- VUID-vkCmdEncodeVideoKHR-intraRefreshH264SliceIndex-10847
  If `intraRefreshH264SliceIndex` is defined, then `pNaluSliceEntries`[`intraRefreshH264SliceIndex`].`pStdSliceHeader->slice_type` must be `STD_VIDEO_H264_SLICE_TYPE_I` in the VkVideoEncodeH264PictureInfoKHR structure included in the `pNext` chain of `pEncodeInfo`

- VUID-vkCmdEncodeVideoKHR-pEncodeInfo-10848
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR and with the intra refresh mode VK_VIDEO_ENCODE_INTRA_REFRESH_MODE_PER_PICTURE_PARTITION_BIT_KHR, `pEncodeInfo->flags` includes VK_VIDEO_ENCODE_INTRA_REFRESH_BIT_KHR, and VkVideoEncodeIntraRefreshCapabilitiesKHR::`nonRectangularIntraRefreshRegions` is VK_FALSE, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile the bound video session was created with, then the `naluSliceEntryCount` member of the VkVideoEncodeH264PictureInfoKHR structure included in the `pNext` chain of `pEncodeInfo` must be less than or equal to `minCodingBlockExtent.height`

- VUID-vkCmdEncodeVideoKHR-h264PictureType-10849
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR, `h264PictureType` is `STD_VIDEO_H264_PICTURE_TYPE_B`, and VkVideoEncodeH264CapabilitiesKHR::`flags`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile the bound video session was created with, does not include VK_VIDEO_ENCODE_H264_CAPABILITY_B_PICTURE_INTRA_REFRESH_BIT_KHR, then `pEncodeInfo->flags` must not include VK_VIDEO_ENCODE_INTRA_REFRESH_BIT_KHR

- VUID-vkCmdEncodeVideoKHR-flags-10850
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR and VkVideoEncodeH264CapabilitiesKHR::`flags`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile the bound video session was created with, does not include VK_VIDEO_ENCODE_H264_CAPABILITY_DIFFERENT_SLICE_TYPE_BIT_KHR, then `pNaluSliceEntries`[i].`pStdSliceHeader->slice_type` must be identical for all elements i of the `pNaluSliceEntries` member of the VkVideoEncodeH264PictureInfoKHR structure included in the `pNext` chain of `pEncodeInfo` , except for element index i equal to `intraRefreshH264SliceIndex`, if `intraRefreshH264SliceIndex` is defined

- VUID-vkCmdEncodeVideoKHR-pNext-08352
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR, the `pNext` chain of `pEncodeInfo` includes a VkVideoEncodeH264PictureInfoKHR structure, and `pEncodeInfo->referenceSlotCount` is greater than zero, then VkVideoEncodeH264PictureInfoKHR::`pStdPictureInfo->pRefLists` must not be `NULL`

- VUID-vkCmdEncodeVideoKHR-pNext-08339
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR, the `pNext` chain of `pEncodeInfo` includes a VkVideoEncodeH264PictureInfoKHR structure, and VkVideoEncodeH264PictureInfoKHR::`pStdPictureInfo->pRefLists` is not `NULL`, then each element of the `RefPicList0` and `RefPicList1` array members of the `StdVideoEncodeH264ReferenceListsInfo` structure pointed to by VkVideoEncodeH264PictureInfoKHR::`pStdPictureInfo->pRefLists` must either be `STD_VIDEO_H264_NO_REFERENCE_PICTURE` or must equal the `slotIndex` member of one of the elements of `pEncodeInfo->pReferenceSlots`

- VUID-vkCmdEncodeVideoKHR-pNext-08353
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR, the `pNext` chain of `pEncodeInfo` includes a VkVideoEncodeH264PictureInfoKHR structure, and `pEncodeInfo->referenceSlotCount` is greater than zero, then the `slotIndex` member of each element of `pEncodeInfo->pReferenceSlots` must equal one of the elements of the `RefPicList0` or `RefPicList1` array members of the `StdVideoEncodeH264ReferenceListsInfo` structure pointed to by VkVideoEncodeH264PictureInfoKHR::`pStdPictureInfo->pRefLists`

- VUID-vkCmdEncodeVideoKHR-maxPPictureL0ReferenceCount-08340
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR and VkVideoEncodeH264CapabilitiesKHR::`maxPPictureL0ReferenceCount` is zero, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile the bound video session was created with, then `h264PictureType` and each element of `h264L0PictureTypes` and `h264L1PictureTypes` must not be `STD_VIDEO_H264_PICTURE_TYPE_P`

- VUID-vkCmdEncodeVideoKHR-maxBPictureL0ReferenceCount-08341
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR and VkVideoEncodeH264CapabilitiesKHR::`maxBPictureL0ReferenceCount` and VkVideoEncodeH264CapabilitiesKHR::`maxL1ReferenceCount` are both zero, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile the bound video session was created with, then `h264PictureType` and each element of `h264L0PictureTypes` and `h264L1PictureTypes` must not be `STD_VIDEO_H264_PICTURE_TYPE_B`

- VUID-vkCmdEncodeVideoKHR-flags-08342
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR and VkVideoEncodeH264CapabilitiesKHR::`flags` does not include VK_VIDEO_ENCODE_H264_CAPABILITY_B_FRAME_IN_L0_LIST_BIT_KHR, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile the bound video session was created with, then each element of `h264L0PictureTypes` must not be `STD_VIDEO_H264_PICTURE_TYPE_B`

- VUID-vkCmdEncodeVideoKHR-flags-08343
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR and VkVideoEncodeH264CapabilitiesKHR::`flags` does not include VK_VIDEO_ENCODE_H264_CAPABILITY_B_FRAME_IN_L1_LIST_BIT_KHR, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile the bound video session was created with, then each element of `h264L1PictureTypes` must not be `STD_VIDEO_H264_PICTURE_TYPE_B`

- VUID-vkCmdEncodeVideoKHR-pNext-08230
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR, then the `pNext` chain of `pEncodeInfo` must include a VkVideoEncodeH265PictureInfoKHR structure

- VUID-vkCmdEncodeVideoKHR-StdVideoH265VideoParameterSet-08231
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR, then the bound video session parameters object must contain a `StdVideoH265VideoParameterSet` entry with `vps_video_parameter_set_id` matching `StdVideoEncodeH265PictureInfo`::`sps_video_parameter_set_id` that is provided in the `pStdPictureInfo` member of the VkVideoEncodeH265PictureInfoKHR structure included in the `pNext` chain of `pEncodeInfo`

- VUID-vkCmdEncodeVideoKHR-StdVideoH265SequenceParameterSet-08232
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR, then the bound video session parameters object must contain a `StdVideoH265SequenceParameterSet` entry with `sps_video_parameter_set_id` and `sps_seq_parameter_set_id` matching `StdVideoEncodeH265PictureInfo`::`sps_video_parameter_set_id` and `StdVideoEncodeH265PictureInfo`::`pps_seq_parameter_set_id`, respectively, that are provided in the `pStdPictureInfo` member of the VkVideoEncodeH265PictureInfoKHR structure included in the `pNext` chain of `pEncodeInfo`

- VUID-vkCmdEncodeVideoKHR-StdVideoH265PictureParameterSet-08233
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR, then the bound video session parameters object must contain a `StdVideoH265PictureParameterSet` entry with `sps_video_parameter_set_id`, `pps_seq_parameter_set_id`, and `pps_pic_parameter_set_id` matching `StdVideoEncodeH265PictureInfo`::`sps_video_parameter_set_id`, `StdVideoEncodeH265PictureInfo`::`pps_seq_parameter_set_id`, and `StdVideoEncodeH265PictureInfo`::`pps_pic_parameter_set_id`, respectively, that are provided in the `pStdPictureInfo` member of the VkVideoEncodeH265PictureInfoKHR structure included in the `pNext` chain of `pEncodeInfo`

- VUID-vkCmdEncodeVideoKHR-pEncodeInfo-08234
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR and `pEncodeInfo->pSetupReferenceSlot` is not `NULL`, then the `pNext` chain of `pEncodeInfo->pSetupReferenceSlot` must include a VkVideoEncodeH265DpbSlotInfoKHR structure

- VUID-vkCmdEncodeVideoKHR-pNext-08235
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR, then the `pNext` chain of each element of `pEncodeInfo->pReferenceSlots` must include a VkVideoEncodeH265DpbSlotInfoKHR structure

- VUID-vkCmdEncodeVideoKHR-constantQp-08272
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR and the current rate control mode is not VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR, then VkVideoEncodeH265NaluSliceSegmentInfoKHR::`constantQp` must be zero for each element of the `pNaluSliceSegmentEntries` member of the VkVideoEncodeH265PictureInfoKHR structure included in the `pNext` chain of `pEncodeInfo`

- VUID-vkCmdEncodeVideoKHR-constantQp-08273
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR and the current rate control mode is VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR, then VkVideoEncodeH265NaluSliceSegmentInfoKHR::`constantQp` must be between VkVideoEncodeH265CapabilitiesKHR::`minQp` and VkVideoEncodeH265CapabilitiesKHR::`maxQp`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile the bound video session was created with, for each element of the `pNaluSliceSegmentEntries` member of the VkVideoEncodeH265PictureInfoKHR structure included in the `pNext` chain of `pEncodeInfo`

- VUID-vkCmdEncodeVideoKHR-constantQp-08274
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR and VkVideoEncodeH265CapabilitiesKHR::`flags` does not include VK_VIDEO_ENCODE_H265_CAPABILITY_PER_SLICE_SEGMENT_CONSTANT_QP_BIT_KHR, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile the bound video session was created with, then VkVideoEncodeH265NaluSliceSegmentInfoKHR::`constantQp` must have the same value for each element of the `pNaluSliceSegmentEntries` member of the VkVideoEncodeH264PictureInfoKHR structure included in the `pNext` chain of `pEncodeInfo`

- VUID-vkCmdEncodeVideoKHR-naluSliceSegmentEntryCount-08307
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR, then the `naluSliceSegmentEntryCount` member of the VkVideoEncodeH265PictureInfoKHR structure included in the `pNext` chain of `pEncodeInfo` must be less than or equal to `minCodingBlockExtent.width` multiplied by `minCodingBlockExtent.height`

- VUID-vkCmdEncodeVideoKHR-naluSliceSegmentEntryCount-08313
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR and VkVideoEncodeH265CapabilitiesKHR::`flags` does not include VK_VIDEO_ENCODE_H265_CAPABILITY_ROW_UNALIGNED_SLICE_SEGMENT_BIT_KHR, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile the bound video session was created with, then the `naluSliceSegmentEntryCount` member of the VkVideoEncodeH265PictureInfoKHR structure included in the `pNext` chain of `pEncodeInfo` must be less than or equal to `minCodingBlockExtent.height`

- VUID-vkCmdEncodeVideoKHR-pEncodeInfo-10851
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR and with an intra refresh mode other than VK_VIDEO_ENCODE_INTRA_REFRESH_MODE_PER_PICTURE_PARTITION_BIT_KHR, `pEncodeInfo->flags` includes VK_VIDEO_ENCODE_INTRA_REFRESH_BIT_KHR, and VkVideoEncodeIntraRefreshCapabilitiesKHR::`partitionIndependentIntraRefreshRegions` is VK_FALSE, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile the bound video session was created with, then the `naluSliceSegmentEntryCount` member of the VkVideoEncodeH265PictureInfoKHR structure included in the `pNext` chain of `pEncodeInfo` must equal `1`

- VUID-vkCmdEncodeVideoKHR-pEncodeInfo-10852
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR and with the intra refresh mode VK_VIDEO_ENCODE_INTRA_REFRESH_MODE_PER_PICTURE_PARTITION_BIT_KHR, and `pEncodeInfo->flags` includes VK_VIDEO_ENCODE_INTRA_REFRESH_BIT_KHR, then the `naluSliceSegmentEntryCount` member of the VkVideoEncodeH265PictureInfoKHR structure included in the `pNext` chain of `pEncodeInfo` must equal VkVideoEncodeIntraRefreshInfoKHR::`intraRefreshCycleDuration`

- VUID-vkCmdEncodeVideoKHR-intraRefreshH265SliceSegmentIndex-10853
  If `intraRefreshH265SliceSegmentIndex` is defined, then `pNaluSliceSegmentEntries`[`intraRefreshH265SliceSegmentIndex`].`pStdSliceSegmentHeader->slice_type` must be `STD_VIDEO_H265_SLICE_TYPE_I` in the VkVideoEncodeH265PictureInfoKHR structure included in the `pNext` chain of `pEncodeInfo`

- VUID-vkCmdEncodeVideoKHR-pEncodeInfo-10854
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR and with the intra refresh mode VK_VIDEO_ENCODE_INTRA_REFRESH_MODE_PER_PICTURE_PARTITION_BIT_KHR, `pEncodeInfo->flags` includes VK_VIDEO_ENCODE_INTRA_REFRESH_BIT_KHR, and VkVideoEncodeIntraRefreshCapabilitiesKHR::`nonRectangularIntraRefreshRegions` is VK_FALSE, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile the bound video session was created with, then the `naluSliceSegmentEntryCount` member of the VkVideoEncodeH265PictureInfoKHR structure included in the `pNext` chain of `pEncodeInfo` must be less than or equal to `minCodingBlockExtent.height`

- VUID-vkCmdEncodeVideoKHR-h265PictureType-10855
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR, `h265PictureType` is `STD_VIDEO_H265_PICTURE_TYPE_B`, and VkVideoEncodeH265CapabilitiesKHR::`flags`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile the bound video session was created with, does not include VK_VIDEO_ENCODE_H265_CAPABILITY_B_PICTURE_INTRA_REFRESH_BIT_KHR, then `pEncodeInfo->flags` must not include VK_VIDEO_ENCODE_INTRA_REFRESH_BIT_KHR

- VUID-vkCmdEncodeVideoKHR-flags-10856
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR and VkVideoEncodeH265CapabilitiesKHR::`flags`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the used video profile, does not include VK_VIDEO_ENCODE_H265_CAPABILITY_DIFFERENT_SLICE_SEGMENT_TYPE_BIT_KHR, then `pNaluSliceSegmentEntries`[i].`pStdSliceSegmentHeader->slice_type` must be identical for all elements i of the `pNaluSliceSegmentEntries` member of the VkVideoEncodeH265PictureInfoKHR structure included in the `pNext` chain of `pEncodeInfo` , except for element index i equal to `intraRefreshH265SliceSegmentIndex`, if `intraRefreshH265SliceSegmentIndex` is defined

- VUID-vkCmdEncodeVideoKHR-pNext-08354
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR, the `pNext` chain of `pEncodeInfo` includes a VkVideoEncodeH265PictureInfoKHR structure, and `pEncodeInfo->referenceSlotCount` is greater than zero, then VkVideoEncodeH265PictureInfoKHR::`pStdPictureInfo->pRefLists` must not be `NULL`

- VUID-vkCmdEncodeVideoKHR-pNext-08344
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR, the `pNext` chain of `pEncodeInfo` includes a VkVideoEncodeH265PictureInfoKHR structure, and VkVideoEncodeH265PictureInfoKHR::`pStdPictureInfo->pRefLists` is not `NULL`, then each element of the `RefPicList0` and `RefPicList1` array members of the `StdVideoEncodeH265ReferenceListsInfo` structure pointed to by VkVideoEncodeH265PictureInfoKHR::`pStdPictureInfo->pRefLists` must either be `STD_VIDEO_H265_NO_REFERENCE_PICTURE` or must equal the `slotIndex` member of one of the elements of `pEncodeInfo->pReferenceSlots`

- VUID-vkCmdEncodeVideoKHR-pNext-08355
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR, the `pNext` chain of `pEncodeInfo` includes a VkVideoEncodeH265PictureInfoKHR structure, and `pEncodeInfo->referenceSlotCount` is greater than zero, then the `slotIndex` member of each element of `pEncodeInfo->pReferenceSlots` must equal one of the elements of the `RefPicList0` or `RefPicList1` array members of the `StdVideoEncodeH265ReferenceListsInfo` structure pointed to by VkVideoEncodeH265PictureInfoKHR::`pStdPictureInfo->pRefLists`

- VUID-vkCmdEncodeVideoKHR-maxPPictureL0ReferenceCount-08345
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR and VkVideoEncodeH265CapabilitiesKHR::`maxPPictureL0ReferenceCount` is zero, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile the bound video session was created with, then `h265PictureType` and each element of `h265L0PictureTypes` and `h265L1PictureTypes` must not be `STD_VIDEO_H265_PICTURE_TYPE_P`

- VUID-vkCmdEncodeVideoKHR-maxBPictureL0ReferenceCount-08346
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR and VkVideoEncodeH265CapabilitiesKHR::`maxBPictureL0ReferenceCount` and VkVideoEncodeH265CapabilitiesKHR::`maxL1ReferenceCount` are both zero, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile the bound video session was created with, then `h265PictureType` and each element of `h265L0PictureTypes` and `h265L1PictureTypes` must not be `STD_VIDEO_H265_PICTURE_TYPE_B`

- VUID-vkCmdEncodeVideoKHR-flags-08347
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR and VkVideoEncodeH265CapabilitiesKHR::`flags` does not include VK_VIDEO_ENCODE_H265_CAPABILITY_B_FRAME_IN_L0_LIST_BIT_KHR, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile the bound video session was created with, then each element of `h265L0PictureTypes` must not be `STD_VIDEO_H264_PICTURE_TYPE_B`

- VUID-vkCmdEncodeVideoKHR-flags-08348
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR and VkVideoEncodeH265CapabilitiesKHR::`flags` does not include VK_VIDEO_ENCODE_H265_CAPABILITY_B_FRAME_IN_L1_LIST_BIT_KHR, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile the bound video session was created with, then each element of `h265L1PictureTypes` must not be `STD_VIDEO_H265_PICTURE_TYPE_B`

- VUID-vkCmdEncodeVideoKHR-pNext-10317
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR, then the `pNext` chain of `pEncodeInfo` must include a VkVideoEncodeAV1PictureInfoKHR structure

- VUID-vkCmdEncodeVideoKHR-pEncodeInfo-10318
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR and `pEncodeInfo->pSetupReferenceSlot` is not `NULL`, then the `pNext` chain of `pEncodeInfo->pSetupReferenceSlot` must include a VkVideoEncodeAV1DpbSlotInfoKHR structure

- VUID-vkCmdEncodeVideoKHR-pNext-10319
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR, then the `pNext` chain of each element of `pEncodeInfo->pReferenceSlots` must include a VkVideoEncodeAV1DpbSlotInfoKHR structure

- VUID-vkCmdEncodeVideoKHR-constantQIndex-10320
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR and the current rate control mode is not VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR, then the `constantQIndex` member of the VkVideoEncodeAV1PictureInfoKHR structure included in the `pNext` chain of `pEncodeInfo` must be zero

- VUID-vkCmdEncodeVideoKHR-constantQIndex-10321
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR and the current rate control mode is VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR, then the `constantQIndex` member of the VkVideoEncodeAV1PictureInfoKHR structure included in the `pNext` chain of `pEncodeInfo` must be between VkVideoEncodeAV1CapabilitiesKHR::`minQIndex` and VkVideoEncodeAV1CapabilitiesKHR::`maxQIndex`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile the bound video session was created with

- VUID-vkCmdEncodeVideoKHR-flags-10322
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR and VkVideoEncodeAV1CapabilitiesKHR::`flags` does not include VK_VIDEO_ENCODE_AV1_CAPABILITY_FRAME_SIZE_OVERRIDE_BIT_KHR, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile the bound video session was created with, then VkVideoEncodeAV1PictureInfoKHR::`pStdPictureInfo->flags.frame_size_override_flag` must be zero for the VkVideoEncodeAV1PictureInfoKHR structure included in the `pNext` chain of `pEncodeInfo`

- VUID-vkCmdEncodeVideoKHR-flags-10323
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR and VkVideoEncodeAV1CapabilitiesKHR::`flags` does not include VK_VIDEO_ENCODE_AV1_CAPABILITY_FRAME_SIZE_OVERRIDE_BIT_KHR, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile the bound video session was created with, then `pEncodeInfo->srcPictureResource.codedExtent.width` must equal `StdVideoAV1SequenceHeader`::`max_frame_width_minus_1` + 1 of the active AV1 sequence header

- VUID-vkCmdEncodeVideoKHR-flags-10324
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR and VkVideoEncodeAV1CapabilitiesKHR::`flags` does not include VK_VIDEO_ENCODE_AV1_CAPABILITY_FRAME_SIZE_OVERRIDE_BIT_KHR, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile the bound video session was created with, then `pEncodeInfo->srcPictureResource.codedExtent.height` must equal `StdVideoAV1SequenceHeader`::`max_frame_height_minus_1` + 1 of the active AV1 sequence header

- VUID-vkCmdEncodeVideoKHR-flags-10325
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR and VkVideoEncodeAV1CapabilitiesKHR::`flags` does not include VK_VIDEO_ENCODE_AV1_CAPABILITY_MOTION_VECTOR_SCALING_BIT_KHR, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile the bound video session was created with, then for each element i of `pEncodeInfo->pReferenceSlots` `pEncodeInfo->pReferenceSlots`[i].`pPictureResource->codedExtent` must match `pEncodeInfo->srcPictureResource.codedExtent`

- VUID-vkCmdEncodeVideoKHR-predictionMode-10326
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR and the `predictionMode` member of the VkVideoEncodeAV1PictureInfoKHR structure included in the `pNext` chain of `pEncodeInfo` is VK_VIDEO_ENCODE_AV1_PREDICTION_MODE_INTRA_ONLY_KHR, then VkVideoEncodeAV1PictureInfoKHR::`pStdPictureInfo->frame_type` must be `STD_VIDEO_AV1_FRAME_TYPE_KEY` or `STD_VIDEO_AV1_FRAME_TYPE_INTRA_ONLY`

- VUID-vkCmdEncodeVideoKHR-pStdPictureInfo-10327
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR and `pStdPictureInfo->frame_type` for the `pStdPictureInfo` member of the VkVideoEncodeAV1PictureInfoKHR structure included in the `pNext` chain of `pEncodeInfo` is `STD_VIDEO_AV1_FRAME_TYPE_KEY` or `STD_VIDEO_AV1_FRAME_TYPE_INTRA_ONLY`, then VkVideoEncodeAV1PictureInfoKHR::`predictionMode` must be VK_VIDEO_ENCODE_AV1_PREDICTION_MODE_INTRA_ONLY_KHR

- VUID-vkCmdEncodeVideoKHR-maxSingleReferenceCount-10328
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR and VkVideoEncodeAV1CapabilitiesKHR::`maxSingleReferenceCount` is zero, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile the bound video session was created with, then the `predictionMode` member of the VkVideoEncodeAV1PictureInfoKHR structure included in the `pNext` chain of `pEncodeInfo` must not be VK_VIDEO_ENCODE_AV1_PREDICTION_MODE_SINGLE_REFERENCE_KHR

- VUID-vkCmdEncodeVideoKHR-predictionMode-10329
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR and the `predictionMode` member of the VkVideoEncodeAV1PictureInfoKHR structure included in the `pNext` chain of `pEncodeInfo` is VK_VIDEO_ENCODE_AV1_PREDICTION_MODE_SINGLE_REFERENCE_KHR, then there must be at least one non-negative element of VkVideoEncodeAV1PictureInfoKHR::`referenceNameSlotIndices` with element index i that does not equal `cdfOnlyReferenceIndex` and for which bit index i is set in VkVideoEncodeAV1CapabilitiesKHR::`singleReferenceNameMask`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile the bound video session was created with

- VUID-vkCmdEncodeVideoKHR-maxUnidirectionalCompoundReferenceCount-10330
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR and VkVideoEncodeAV1CapabilitiesKHR::`maxUnidirectionalCompoundReferenceCount` is zero, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile the bound video session was created with, then the `predictionMode` member of the VkVideoEncodeAV1PictureInfoKHR structure included in the `pNext` chain of `pEncodeInfo` must not be VK_VIDEO_ENCODE_AV1_PREDICTION_MODE_UNIDIRECTIONAL_COMPOUND_KHR

- VUID-vkCmdEncodeVideoKHR-predictionMode-10331
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR and the `predictionMode` member of the VkVideoEncodeAV1PictureInfoKHR structure included in the `pNext` chain of `pEncodeInfo` is VK_VIDEO_ENCODE_AV1_PREDICTION_MODE_UNIDIRECTIONAL_COMPOUND_KHR, then there must be at least two non-negative elements of VkVideoEncodeAV1PictureInfoKHR::`referenceNameSlotIndices` with element indices i and j where (i,j) ∈ {(0,1),(0,2),(0,3),(4,6)}, such that neither element equals `cdfOnlyReferenceIndex` and for which bit indices i and j are set in VkVideoEncodeAV1CapabilitiesKHR::`unidirectionalCompoundReferenceNameMask`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile the bound video session was created with

- VUID-vkCmdEncodeVideoKHR-maxBidirectionalCompoundReferenceCount-10332
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR and VkVideoEncodeAV1CapabilitiesKHR::`maxBidirectionalCompoundReferenceCount` is zero, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile the bound video session was created with, then the `predictionMode` member of the VkVideoEncodeAV1PictureInfoKHR structure included in the `pNext` chain of `pEncodeInfo` must not be VK_VIDEO_ENCODE_AV1_PREDICTION_MODE_BIDIRECTIONAL_COMPOUND_KHR

- VUID-vkCmdEncodeVideoKHR-predictionMode-10333
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR and the `predictionMode` member of the VkVideoEncodeAV1PictureInfoKHR structure included in the `pNext` chain of `pEncodeInfo` is VK_VIDEO_ENCODE_AV1_PREDICTION_MODE_BIDIRECTIONAL_COMPOUND_KHR, then there must be at least two non-negative elements of VkVideoEncodeAV1PictureInfoKHR::`referenceNameSlotIndices` with element indices i ∈ {0,1,2,3} and j ∈ {4,5,6}, respectively, such that neither element equals `cdfOnlyReferenceIndex`, and for which bit indices i and j are set in VkVideoEncodeAV1CapabilitiesKHR::`bidirectionalCompoundReferenceNameMask`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile the bound video session was created with

- VUID-vkCmdEncodeVideoKHR-predictionMode-10857
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR, the `predictionMode` member of the VkVideoEncodeAV1PictureInfoKHR structure included in the `pNext` chain of `pEncodeInfo` is VK_VIDEO_ENCODE_AV1_PREDICTION_MODE_UNIDIRECTIONAL_COMPOUND_KHR or VK_VIDEO_ENCODE_AV1_PREDICTION_MODE_BIDIRECTIONAL_COMPOUND_KHR, and VkVideoEncodeAV1CapabilitiesKHR::`flags`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile the bound video session was created with, does not include VK_VIDEO_ENCODE_AV1_CAPABILITY_COMPOUND_PREDICTION_INTRA_REFRESH_BIT_KHR, then `pEncodeInfo->flags` must not include VK_VIDEO_ENCODE_INTRA_REFRESH_BIT_KHR

- VUID-vkCmdEncodeVideoKHR-referenceNameSlotIndices-10334
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR, then each element of the `referenceNameSlotIndices` array member of the VkVideoEncodeAV1PictureInfoKHR structure included in the `pNext` chain of `pEncodeInfo` must either be negative or must equal the `slotIndex` member of one of the elements of `pEncodeInfo->pReferenceSlots`

- VUID-vkCmdEncodeVideoKHR-slotIndex-10335
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR, then the `slotIndex` member of each element of `pEncodeInfo->pReferenceSlots` must equal one of the elements of the `referenceNameSlotIndices` array member of the VkVideoEncodeAV1PictureInfoKHR structure included in the `pNext` chain of `pEncodeInfo`

- VUID-vkCmdEncodeVideoKHR-pExtensionHeader-10336
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR and the `pExtensionHeader` member of VkVideoEncodeAV1PictureInfoKHR::`pStdPictureInfo` for the VkVideoEncodeAV1PictureInfoKHR structure included in the `pNext` chain of `pEncodeInfo` is not `NULL`, then `pExtensionHeader->temporal_id` must be less than VkVideoEncodeAV1CapabilitiesKHR::`maxTemporalLayerCount`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile the bound video session was created with

- VUID-vkCmdEncodeVideoKHR-pExtensionHeader-10337
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR and the `pExtensionHeader` member of VkVideoEncodeAV1PictureInfoKHR::`pStdPictureInfo` for the VkVideoEncodeAV1PictureInfoKHR structure included in the `pNext` chain of `pEncodeInfo` is not `NULL`, then `pExtensionHeader->spatial_id` must be less than VkVideoEncodeAV1CapabilitiesKHR::`maxSpatialLayerCount`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile the bound video session was created with

- VUID-vkCmdEncodeVideoKHR-pEncodeInfo-10338
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR and `pEncodeInfo->pSetupReferenceSlot` is not `NULL`, then the `pExtensionHeader` member of VkVideoEncodeAV1DpbSlotInfoKHR::`pStdReferenceInfo` for the VkVideoEncodeAV1DpbSlotInfoKHR structure included in the `pNext` chain of `pEncodeInfo->pSetupReferenceSlot` and the `pExtensionHeader` member of VkVideoEncodeAV1PictureInfoKHR::`pStdPictureInfo` for the VkVideoEncodeAV1PictureInfoKHR structure included in the `pNext` chain of `pEncodeInfo` must both be `NULL` or not `NULL`

- VUID-vkCmdEncodeVideoKHR-pEncodeInfo-10339
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR, `pEncodeInfo->pSetupReferenceSlot` is not `NULL`, and the `pExtensionHeader` member of VkVideoEncodeAV1DpbSlotInfoKHR::`pStdReferenceInfo` for the VkVideoEncodeAV1DpbSlotInfoKHR structure included in the `pNext` chain of `pEncodeInfo->pSetupReferenceSlot` is not `NULL`, then `pExtensionHeader->temporal_id` must equal `pStdPictureInfo->pExtensionHeader->temporal_id` in the VkVideoEncodeAV1PictureInfoKHR structure included in the `pNext` chain of `pEncodeInfo`

- VUID-vkCmdEncodeVideoKHR-pEncodeInfo-10340
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR, `pEncodeInfo->pSetupReferenceSlot` is not `NULL`, and the `pExtensionHeader` member of VkVideoEncodeAV1DpbSlotInfoKHR::`pStdReferenceInfo` for the VkVideoEncodeAV1DpbSlotInfoKHR structure included in the `pNext` chain of `pEncodeInfo->pSetupReferenceSlot` is not `NULL`, then `pExtensionHeader->spatial_id` must equal `pStdPictureInfo->pExtensionHeader->spatial_id` in the VkVideoEncodeAV1PictureInfoKHR structure included in the `pNext` chain of `pEncodeInfo`

- VUID-vkCmdEncodeVideoKHR-pExtensionHeader-10341
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR and the `pExtensionHeader` member of VkVideoEncodeAV1DpbSlotInfoKHR::`pStdReferenceInfo` for any of the VkVideoEncodeAV1DpbSlotInfoKHR structures included in the `pNext` chain of any element of `pEncodeInfo->pReferenceSlots` is not `NULL`, then `pExtensionHeader->temporal_id` must be less than VkVideoEncodeAV1CapabilitiesKHR::`maxTemporalLayerCount`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile the bound video session was created with

- VUID-vkCmdEncodeVideoKHR-pExtensionHeader-10342
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR and the `pExtensionHeader` member of VkVideoEncodeAV1DpbSlotInfoKHR::`pStdReferenceInfo` for any of the VkVideoEncodeAV1DpbSlotInfoKHR structures included in the `pNext` chain of any element of `pEncodeInfo->pReferenceSlots` is not `NULL`, then `pExtensionHeader->spatial_id` must be less than VkVideoEncodeAV1CapabilitiesKHR::`maxSpatialLayerCount`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile the bound video session was created with

- VUID-vkCmdEncodeVideoKHR-pTileInfo-10343
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR and the `pTileInfo` member of VkVideoEncodeAV1PictureInfoKHR::`pStdPictureInfo` for the VkVideoEncodeAV1PictureInfoKHR structure included in the `pNext` chain of `pEncodeInfo` is not `NULL`, then `pTileInfo->TileCols` must be greater than `0`

- VUID-vkCmdEncodeVideoKHR-pTileInfo-10344
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR and the `pTileInfo` member of VkVideoEncodeAV1PictureInfoKHR::`pStdPictureInfo` for the VkVideoEncodeAV1PictureInfoKHR structure included in the `pNext` chain of `pEncodeInfo` is not `NULL`, then `pTileInfo->TileRows` must be greater than `0`

- VUID-vkCmdEncodeVideoKHR-pTileInfo-10345
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR and the `pTileInfo` member of VkVideoEncodeAV1PictureInfoKHR::`pStdPictureInfo` for the VkVideoEncodeAV1PictureInfoKHR structure included in the `pNext` chain of `pEncodeInfo` is not `NULL`, then `pTileInfo->TileCols` must be less than or equal to VkVideoEncodeAV1CapabilitiesKHR::`maxTiles.width`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile the bound video session was created with

- VUID-vkCmdEncodeVideoKHR-pTileInfo-10346
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR and the `pTileInfo` member of VkVideoEncodeAV1PictureInfoKHR::`pStdPictureInfo` for the VkVideoEncodeAV1PictureInfoKHR structure included in the `pNext` chain of `pEncodeInfo` is not `NULL`, then `pTileInfo->TileRows` must be less than or equal to VkVideoEncodeAV1CapabilitiesKHR::`maxTiles.height`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile the bound video session was created with

- VUID-vkCmdEncodeVideoKHR-pTileInfo-10347
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR and the `pTileInfo` member of VkVideoEncodeAV1PictureInfoKHR::`pStdPictureInfo` for the VkVideoEncodeAV1PictureInfoKHR structure included in the `pNext` chain of `pEncodeInfo` is not `NULL`, then ⌈`pEncodeInfo->srcPictureResource.codedExtent.width` / `pTileInfo->TileCols`⌉ must be between VkVideoEncodeAV1CapabilitiesKHR::`minTileSize.width` and VkVideoEncodeAV1CapabilitiesKHR::`maxTileSize.width`, inclusive, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile the bound video session was created with

- VUID-vkCmdEncodeVideoKHR-pTileInfo-10348
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR and the `pTileInfo` member of VkVideoEncodeAV1PictureInfoKHR::`pStdPictureInfo` for the VkVideoEncodeAV1PictureInfoKHR structure included in the `pNext` chain of `pEncodeInfo` is not `NULL`, then ⌈`pEncodeInfo->srcPictureResource.codedExtent.height` / `pTileInfo->TileRows`⌉ must be between VkVideoEncodeAV1CapabilitiesKHR::`minTileSize.height` and VkVideoEncodeAV1CapabilitiesKHR::`maxTileSize.height`, inclusive, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile the bound video session was created with

- VUID-vkCmdEncodeVideoKHR-pStdPictureInfo-10349
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR, then VkVideoEncodeAV1PictureInfoKHR::`pStdPictureInfo->flags.segmentation_enabled` for the VkVideoEncodeAV1PictureInfoKHR structure included in the `pNext` chain of `pEncodeInfo` must be zero

- VUID-vkCmdEncodeVideoKHR-pStdPictureInfo-10350
  If the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR, then VkVideoEncodeAV1PictureInfoKHR::`pStdPictureInfo->pSegmentation` for the VkVideoEncodeAV1PictureInfoKHR structure included in the `pNext` chain of `pEncodeInfo` must be `NULL`

Valid Usage (Implicit)

- VUID-vkCmdEncodeVideoKHR-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdEncodeVideoKHR-pEncodeInfo-parameter
  `pEncodeInfo` must be a valid pointer to a valid VkVideoEncodeInfoKHR structure

- VUID-vkCmdEncodeVideoKHR-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdEncodeVideoKHR-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_VIDEO_ENCODE_BIT_KHR operations

- VUID-vkCmdEncodeVideoKHR-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdEncodeVideoKHR-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdEncodeVideoKHR-videocoding
  This command must only be called inside of a video coding scope

- VUID-vkCmdEncodeVideoKHR-bufferlevel
  `commandBuffer` must be a primary `VkCommandBuffer`

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary | Outside | Inside | VK_QUEUE_VIDEO_ENCODE_BIT_KHR | Action

Conditional Rendering

vkCmdEncodeVideoKHR is not affected by conditional rendering

The `VkVideoEncodeInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_encode_queue
    typedef struct VkVideoEncodeInfoKHR {
        VkStructureType                       sType;
        const void*                           pNext;
        VkVideoEncodeFlagsKHR                 flags;
        VkBuffer                              dstBuffer;
        VkDeviceSize                          dstBufferOffset;
        VkDeviceSize                          dstBufferRange;
        VkVideoPictureResourceInfoKHR         srcPictureResource;
        const VkVideoReferenceSlotInfoKHR*    pSetupReferenceSlot;
        uint32_t                              referenceSlotCount;
        const VkVideoReferenceSlotInfoKHR*    pReferenceSlots;
        uint32_t                              precedingExternallyEncodedBytes;
    } VkVideoEncodeInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is a pointer to a structure extending this structure.

- `flags` is a bitmask of VkVideoEncodeFlagBitsKHR indicating video encode command flags.

- `dstBuffer` is the destination video bitstream buffer to write the encoded bitstream to.

- `dstBufferOffset` is the starting offset in bytes from the start of `dstBuffer` to write the encoded bitstream to.

- `dstBufferRange` is the maximum bitstream size in bytes that can be written to `dstBuffer`, starting from `dstBufferOffset`.

- `srcPictureResource` is the video picture resource to use as the encode input picture.

- `pSetupReferenceSlot` is `NULL` or a pointer to a VkVideoReferenceSlotInfoKHR structure specifying the reconstructed picture information.

- `referenceSlotCount` is the number of elements in the `pReferenceSlots` array.

- `pReferenceSlots` is `NULL` or a pointer to an array of VkVideoReferenceSlotInfoKHR structures describing the DPB slots and corresponding reference picture resources to use in this video encode operation (the set of active reference pictures).

- `precedingExternallyEncodedBytes` is the number of bytes externally encoded by the application to the video bitstream and is used to update the internal state of the implementation’s rate control algorithm to account for the bitrate budget consumed by these externally encoded bytes.

Valid Usage

- VUID-VkVideoEncodeInfoKHR-dstBuffer-08236
  `dstBuffer` must have been created with the VK_BUFFER_USAGE_VIDEO_ENCODE_DST_BIT_KHR usage flag set

- VUID-VkVideoEncodeInfoKHR-dstBufferOffset-08237
  `dstBufferOffset` must be less than the size of `dstBuffer`

- VUID-VkVideoEncodeInfoKHR-dstBufferRange-08238
  `dstBufferRange` must be less than or equal to the size of `dstBuffer` minus `dstBufferOffset`

- VUID-VkVideoEncodeInfoKHR-pSetupReferenceSlot-08239
  If `pSetupReferenceSlot` is not `NULL`, then its `slotIndex` member must not be negative

- VUID-VkVideoEncodeInfoKHR-pSetupReferenceSlot-08240
  If `pSetupReferenceSlot` is not `NULL`, then its `pPictureResource` must not be `NULL`

- VUID-VkVideoEncodeInfoKHR-slotIndex-08241
  The `slotIndex` member of each element of `pReferenceSlots` must not be negative

- VUID-VkVideoEncodeInfoKHR-pPictureResource-08242
  The `pPictureResource` member of each element of `pReferenceSlots` must not be `NULL`

Valid Usage (Implicit)

- VUID-VkVideoEncodeInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_ENCODE_INFO_KHR

- VUID-VkVideoEncodeInfoKHR-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkVideoEncodeAV1PictureInfoKHR, VkVideoEncodeH264PictureInfoKHR, VkVideoEncodeH265PictureInfoKHR, VkVideoEncodeIntraRefreshInfoKHR, VkVideoEncodeQuantizationMapInfoKHR, or VkVideoInlineQueryInfoKHR

- VUID-VkVideoEncodeInfoKHR-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkVideoEncodeInfoKHR-flags-parameter
  `flags` must be a valid combination of VkVideoEncodeFlagBitsKHR values

- VUID-VkVideoEncodeInfoKHR-dstBuffer-parameter
  `dstBuffer` must be a valid VkBuffer handle

- VUID-VkVideoEncodeInfoKHR-srcPictureResource-parameter
  `srcPictureResource` must be a valid VkVideoPictureResourceInfoKHR structure

- VUID-VkVideoEncodeInfoKHR-pSetupReferenceSlot-parameter
  If `pSetupReferenceSlot` is not `NULL`, `pSetupReferenceSlot` must be a valid pointer to a valid VkVideoReferenceSlotInfoKHR structure

- VUID-VkVideoEncodeInfoKHR-pReferenceSlots-parameter
  If `referenceSlotCount` is not `0`, `pReferenceSlots` must be a valid pointer to an array of `referenceSlotCount` valid VkVideoReferenceSlotInfoKHR structures

Bits which can be set in VkVideoEncodeInfoKHR::`flags`, specifying video encode flags, are:

    // Provided by VK_KHR_video_encode_quantization_map
    typedef enum VkVideoEncodeFlagBitsKHR {
      // Provided by VK_KHR_video_encode_intra_refresh
        VK_VIDEO_ENCODE_INTRA_REFRESH_BIT_KHR = 0x00000004,
      // Provided by VK_KHR_video_encode_quantization_map
        VK_VIDEO_ENCODE_WITH_QUANTIZATION_DELTA_MAP_BIT_KHR = 0x00000001,
      // Provided by VK_KHR_video_encode_quantization_map
        VK_VIDEO_ENCODE_WITH_EMPHASIS_MAP_BIT_KHR = 0x00000002,
    } VkVideoEncodeFlagBitsKHR;

- VK_VIDEO_ENCODE_WITH_QUANTIZATION_DELTA_MAP_BIT_KHR specifies the use of a quantization delta map in the issued video encode operations.

- VK_VIDEO_ENCODE_WITH_EMPHASIS_MAP_BIT_KHR specifies the use of an emphasis map in the issued video encode operations.

- VK_VIDEO_ENCODE_INTRA_REFRESH_BIT_KHR enables intra refresh for the encoded picture.

    // Provided by VK_KHR_video_encode_queue
    typedef VkFlags VkVideoEncodeFlagsKHR;

VkVideoEncodeFlagsKHR is a bitmask type for setting a mask of zero or more VkVideoEncodeFlagBitsKHR.

### 49.17. Video Encode Intra Refresh

Encoding a picture with intra refresh enables encoding a subset of the coding blocks produced for an encode input picture with intra prediction.

Note | This enables the application to perform a decoder refresh through a series of pictures instead of a single picture. In conjunction with restricting reference picture prediction, this enables avoiding error propagation across refresh cycles without introducing sudden spikes in the bitrate. This is achieved by amortizing the bitstream consumption of the refresh across a series of subsequent pictures.

An intra refresh cycle is a series of encode operations using intra refresh that contain at least one encode operation for any subregion of the coded extent that encoded the subregion with intra prediction.

The intra refresh cycle duration is the number of encode operations in an intra refresh cycle.

Figure 40. Intra refresh cycle duration

For the purposes of performing an intra refresh cycle, the coded extent is divided into a set of intra refresh regions. The number of intra refresh regions for a given intra refresh cycle equals the intra refresh cycle duration.

Implementations may partition the coded extent into intra refresh regions in an implementation-specific manner, unless otherwise specified. The following is true for the resulting set of intra refresh regions:

- Each intra refresh region encompasses entire coding blocks.

- Any intra refresh region may be non-rectangular.

- Some intra refresh regions may be empty.

- The union of intra refresh regions of a given partitioning covers the entire coded extent.

  Note | While intra refresh regions are generally disjoint, there may be overlap between distinct intra refresh regions of a given partitioning in order to accommodate for any filtering that may need to be applied across coding blocks of neighboring intra refresh regions.

Figure 41. Examples of picture partitioning into intra refresh regions

An intra refresh cycle is performed by encoding subsequent pictures with intra refresh, each encoding subsequent intra refresh regions using intra prediction. This inherently defines an ordering of encode operations within an intra refresh cycle. Therefore each encode operation in an intra refresh cycle has an intra refresh index that provides the following information:

- The intra refresh index of an encode operation using intra refresh is the ordinal index of the intra refresh region being encoded using intra prediction.

- The intra refresh index of an encode operation using intra refresh inherently tells the number of intra refresh regions already refreshed by previous encode operations of the intra refresh cycle.

Note | For AV1 encoding, applications should consider setting the `error_resilient_mode` flag for the first frame encoded as part of the intra refresh cycle in order to avoid any error propagation of CDF data.

An intra refresh region of a picture encoded using intra refresh is considered clean once the encode operation within the intra refresh cycle that encoded that intra refresh region using intra prediction is complete. Otherwise, the intra refresh region is considered dirty.

The number of dirty intra refresh regions of a picture encoded using intra refresh is always one less than the difference between the intra refresh cycle duration and the intra refresh index used to encode that picture.

Note | As the intra refresh cycle progresses, each subsequent picture encoded with intra refresh will have fewer dirty intra refresh regions. Consequently, the final encode operation of the intra refresh cycle will produce an encoded picture with no more dirty intra refresh regions.

#### 49.17.1. Intra Refresh Capabilities

When calling vkGetPhysicalDeviceVideoCapabilitiesKHR with `pVideoProfile->videoCodecOperation` specifying an encode operation, the VkVideoEncodeIntraRefreshCapabilitiesKHR structure can be included in the `pNext` chain of the VkVideoCapabilitiesKHR structure to retrieve capabilities specific to video encode intra refresh.

The `VkVideoEncodeIntraRefreshCapabilitiesKHR` structure is defined as:

    // Provided by VK_KHR_video_encode_intra_refresh
    typedef struct VkVideoEncodeIntraRefreshCapabilitiesKHR {
        VkStructureType                          sType;
        void*                                    pNext;
        VkVideoEncodeIntraRefreshModeFlagsKHR    intraRefreshModes;
        uint32_t                                 maxIntraRefreshCycleDuration;
        uint32_t                                 maxIntraRefreshActiveReferencePictures;
        VkBool32                                 partitionIndependentIntraRefreshRegions;
        VkBool32                                 nonRectangularIntraRefreshRegions;
    } VkVideoEncodeIntraRefreshCapabilitiesKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `intraRefreshModes` is a bitmask of VkVideoEncodeIntraRefreshModeFlagBitsKHR values indicating the set of supported intra refresh modes.

- `maxIntraRefreshCycleDuration` specifies the maximum supported intra refresh cycle duration.

- `maxIntraRefreshActiveReferencePictures` is the maximum number of active reference pictures when encoding pictures with intra refresh enabled. This capability indicates additional restrictions beyond the maximum number of active reference pictures supported by the video profile, as reported in VkVideoCapabilitiesKHR::`maxActiveReferencePictures` and the maximum requested at video session creation time in VkVideoSessionCreateInfoKHR::`maxActiveReferencePictures`.

- `partitionIndependentIntraRefreshRegions` specifies whether the implementation supports intra refresh regions that are independent of the picture partitioning used during encoding. If it is VK_TRUE, then pictures can be encoded with multiple picture partitions, independent of the used intra refresh mode. Otherwise, pictures cannot be encoded with multiple picture partitions with any intra refresh mode other than VK_VIDEO_ENCODE_INTRA_REFRESH_MODE_PER_PICTURE_PARTITION_BIT_KHR.

  Note | This capability is only indicative for AV1 encode profiles and does not impose any restrictions on the application as implementations may change the application requested picture partitioning according to implementation-specific restrictions.

- `nonRectangularIntraRefreshRegions` specifies whether the implementation supports non-rectangular intra refresh regions.

  Note | If this capability is not supported, then using per picture partition intra refresh may impose additional restrictions on the number of picture partitions a picture can be encoded with.

Valid Usage (Implicit)

- VUID-VkVideoEncodeIntraRefreshCapabilitiesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_ENCODE_INTRA_REFRESH_CAPABILITIES_KHR

Structure Chaining

Extends the structure

  - VkVideoCapabilitiesKHR

#### 49.17.2. Intra Refresh Modes

The intra refresh modes are defined with the following enums:

    // Provided by VK_KHR_video_encode_intra_refresh
    typedef enum VkVideoEncodeIntraRefreshModeFlagBitsKHR {
        VK_VIDEO_ENCODE_INTRA_REFRESH_MODE_NONE_KHR = 0,
        VK_VIDEO_ENCODE_INTRA_REFRESH_MODE_PER_PICTURE_PARTITION_BIT_KHR = 0x00000001,
        VK_VIDEO_ENCODE_INTRA_REFRESH_MODE_BLOCK_BASED_BIT_KHR = 0x00000002,
        VK_VIDEO_ENCODE_INTRA_REFRESH_MODE_BLOCK_ROW_BASED_BIT_KHR = 0x00000004,
        VK_VIDEO_ENCODE_INTRA_REFRESH_MODE_BLOCK_COLUMN_BASED_BIT_KHR = 0x00000008,
    } VkVideoEncodeIntraRefreshModeFlagBitsKHR;

- VK_VIDEO_ENCODE_INTRA_REFRESH_MODE_NONE_KHR specifies that intra refresh must not be used.

- VK_VIDEO_ENCODE_INTRA_REFRESH_MODE_PER_PICTURE_PARTITION_BIT_KHR specifies the use of per picture partition intra refresh. In this mode each intra refresh region i corresponds to the encoded picture partition i.

- VK_VIDEO_ENCODE_INTRA_REFRESH_MODE_BLOCK_BASED_BIT_KHR specifies the use of any block-based intra refresh. In this mode each intra refresh region encompasses a set of coding blocks, independent of encoded picture partitions but without any additional guarantees on the granularity at which the picture is split into intra refresh regions. When using this mode, the set of coding blocks comprising the intra refresh regions and the direction of intra refresh are implementation-defined.

- VK_VIDEO_ENCODE_INTRA_REFRESH_MODE_BLOCK_ROW_BASED_BIT_KHR specifies the use of block-row-based intra refresh. This mode is a block-based intra refresh mode where each intra refresh region encompasses a set of coding block rows.

- VK_VIDEO_ENCODE_INTRA_REFRESH_MODE_BLOCK_COLUMN_BASED_BIT_KHR specifies the use of block-column-based intra refresh. This mode is a block-based intra refresh mode where each intra refresh region encompasses a set of coding block columns.

Implementations reporting support for VK_VIDEO_ENCODE_INTRA_REFRESH_MODE_BLOCK_ROW_BASED_BIT_KHR and/or VK_VIDEO_ENCODE_INTRA_REFRESH_MODE_BLOCK_COLUMN_BASED_BIT_KHR in VkVideoEncodeIntraRefreshCapabilitiesKHR::`intraRefreshModes` are also required to report support for VK_VIDEO_ENCODE_INTRA_REFRESH_MODE_BLOCK_BASED_BIT_KHR.

Note | Both block-row-based and block-column-based intra refresh are just specific types of block-based intra refresh that provide additional guarantees about the granularity at which the picture is split into intra refresh regions, therefore implementations supporting either block-row-based or block-column-based intra refresh inherently support block-based intra refresh. Applications can use VK_VIDEO_ENCODE_INTRA_REFRESH_MODE_BLOCK_BASED_BIT_KHR on such implementations when they do not have any preference for a more specific block-based mode and would rather leave the decision about the division into intra refresh regions to the implementation.

    // Provided by VK_KHR_video_encode_intra_refresh
    typedef VkFlags VkVideoEncodeIntraRefreshModeFlagsKHR;

`VkVideoEncodeIntraRefreshModeFlagsKHR` is a bitmask type for setting a mask of zero or more VkVideoEncodeIntraRefreshModeFlagBitsKHR.

The used intra refresh mode is selected at video session creation time by including an instance of the VkVideoEncodeSessionIntraRefreshCreateInfoKHR structure in the `pNext` chain of the VkVideoSessionCreateInfoKHR structure and specifying one of the supported intra refresh modes, as returned in VkVideoEncodeIntraRefreshCapabilitiesKHR::`intraRefreshModes`, in its `intraRefreshMode` member.

The `VkVideoEncodeSessionIntraRefreshCreateInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_encode_intra_refresh
    typedef struct VkVideoEncodeSessionIntraRefreshCreateInfoKHR {
        VkStructureType                             sType;
        const void*                                 pNext;
        VkVideoEncodeIntraRefreshModeFlagBitsKHR    intraRefreshMode;
    } VkVideoEncodeSessionIntraRefreshCreateInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `intraRefreshMode` is a VkVideoEncodeIntraRefreshModeFlagBitsKHR specifying the used intra refresh mode.

Valid Usage (Implicit)

- VUID-VkVideoEncodeSessionIntraRefreshCreateInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_ENCODE_SESSION_INTRA_REFRESH_CREATE_INFO_KHR

- VUID-VkVideoEncodeSessionIntraRefreshCreateInfoKHR-intraRefreshMode-parameter
  If `intraRefreshMode` is not `0`, `intraRefreshMode` must be a valid VkVideoEncodeIntraRefreshModeFlagBitsKHR value

Structure Chaining

Extends the structure

  - VkVideoSessionCreateInfoKHR

#### 49.17.3. Encoding Pictures with Intra Refresh

If the video encode operation is issued with the VK_VIDEO_ENCODE_INTRA_REFRESH_BIT_KHR flag, the picture will be encoded with intra refresh, resulting in the intra refresh region identified by the specified intra refresh index to be encoded with intra prediction.

Intra refresh parameters are specified to video encode operations by including an instance of the VkVideoEncodeIntraRefreshInfoKHR structure in the `pNext` chain of the VkVideoEncodeInfoKHR structure specified to the video encode command.

The `VkVideoEncodeIntraRefreshInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_encode_intra_refresh
    typedef struct VkVideoEncodeIntraRefreshInfoKHR {
        VkStructureType    sType;
        const void*        pNext;
        uint32_t           intraRefreshCycleDuration;
        uint32_t           intraRefreshIndex;
    } VkVideoEncodeIntraRefreshInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `intraRefreshCycleDuration` is the used intra refresh cycle duration.

- `intraRefreshIndex` is the intra refresh index of the encoded picture.

Valid Usage (Implicit)

- VUID-VkVideoEncodeIntraRefreshInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_ENCODE_INTRA_REFRESH_INFO_KHR

Structure Chaining

Extends the structure

  - VkVideoEncodeInfoKHR

#### 49.17.4. Referencing Pictures Encoded with Intra Refresh

When using pictures encoded with intra refresh as an active reference picture in a video encode operation, applications may want to limit the set of intra refresh regions of the reference picture that are used to predict samples of the encoded picture to exclude dirty intra refresh regions of the reference picture in question.

Note | This enables the application to avoid error propagation from previous refresh cycles by only using already refreshed (clean) intra refresh regions for sample prediction.

In order to limit the set of intra refresh regions of an active reference picture used for sample prediction, the application must specify an instance of the VkVideoReferenceIntraRefreshInfoKHR structure in the `pNext` chain of the VkVideoReferenceSlotInfoKHR structure specifying the active reference picture in question.

The `VkVideoReferenceIntraRefreshInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_encode_intra_refresh
    typedef struct VkVideoReferenceIntraRefreshInfoKHR {
        VkStructureType    sType;
        const void*        pNext;
        uint32_t           dirtyIntraRefreshRegions;
    } VkVideoReferenceIntraRefreshInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `dirtyIntraRefreshRegions` is the number of dirty intra refresh regions in the reference picture.

Valid Usage (Implicit)

- VUID-VkVideoReferenceIntraRefreshInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_REFERENCE_INTRA_REFRESH_INFO_KHR

Structure Chaining

Extends the structure

  - VkVideoReferenceSlotInfoKHR

In order to use active reference pictures with a non-zero number of dirty intra refresh regions and therefore limit sample prediction to clean intra refresh regions, the currently encoded picture must be encoded with intra refresh enabled.

When limiting sample prediction to clean intra refresh regions of a reference picture with a non-zero number of dirty intra refresh regions, the number of dirty intra refresh regions must equal the used intra refresh cycle duration minus the intra refresh index of the encoded picture.

Note | This has the practical effect that pictures can only reference the previous picture within the intra refresh cycle or pictures outside of the intra refresh cycle.

Given an active reference picture with `dirtyIntraRefreshRegions` number of dirty intra refresh regions and an intra refresh cycle duration of `intraRefreshCycleDuration`, the samples within intra refresh region index i of the encoded picture are allowed to be predicted by samples within intra refresh region index j of the active reference picture in question if and only if any of the following conditions are true:

- The picture is encoded with VK_VIDEO_ENCODE_INTRA_REFRESH_BIT_KHR and i is greater than the `intraRefreshIndex` of the encoded picture.

- The picture is encoded with VK_VIDEO_ENCODE_INTRA_REFRESH_BIT_KHR, i is less than the `intraRefreshIndex` of the encoded picture, and j is less than the difference of `intraRefreshCycleDuration` and `dirtyIntraRefreshRegions`.

Note | Even if a particular intra refresh region is allowed to be used for sample prediction, as defined above, implementations may not always support sample prediction from the given intra refresh region. Some implementations may only support sample prediction from a single set of intra refresh regions across the entire set of active reference pictures. For example, when encoding a picture with two active reference pictures, one with no dirty intra refresh regions, and one with some dirty intra refresh regions, sample prediction may not happen from those intra refresh regions of the first active reference picture which are marked dirty in the second active reference picture. Other implementations may have the additional restriction that the set of intra refresh regions to use for sample prediction across the entire set of active reference pictures is implied from the intra refresh index of the currently encoded picture, further restricting the set of intra refresh regions that such implementations can use for sample prediction. For example, when encoding a picture with intra refresh using an active reference picture that has no dirty intra refresh regions, sample prediction may not happen from intra refresh regions of the active reference picture which have an index greater than or equal to the currently encoded picture’s intra refresh index, even though those intra refresh regions were not marked as dirty. None of these implementation limitations will have an effect on application behavior from the perspective of correctness, but they may negatively impact the encoding efficiency.

### 49.18. Video Encode Rate Control

The size of the encoded bitstream data produced by video encode operations is a function of the following set of constraints:

- The capabilities of the compression algorithms defined and employed by the used video compression standard;

- Restrictions imposed by the selected video profile according to the rules defined by the used video compression standard;

- Further restrictions imposed by the capabilities supported by the implementation for the selected video profile;

- The image data in the encode input picture and the set of active reference pictures (as these affect the effectiveness of the compression algorithms employed by the video encode operations);

- The set of codec-specific and codec-independent encoding parameters provided by the application.

These also inherently define the set of decoder capabilities required for reconstructing and processing the picture data in the encoded bitstream.

Video coding uses bitrate as the quantitative metric associated with encoded bitstream data size which expresses the rate at which video bitstream data can be transferred or processed, measured in number of bits per second. This bitrate is both a function of the encoded bitstream data size of the encoded pictures as well as the frame rate used by the video sequence.

Rate control algorithms are used by video encode operations to enable adjusting encoding parameters to achieve a target bitrate, or otherwise directly or indirectly control the bitrate of the generated video bitstream data. These algorithms are usually not defined by the used video compression standard, although some video compression standards do provide non-normative guidelines for implementations.

Accordingly, this specification does not mandate implementations to produce identical encoded bitstream data outputs in response to video encode operations, however, it does define a set of codec-independent and codec-specific parameters that enable the application to control the behavior of the rate control algorithms supported by the implementation. Some of these parameters guarantee certain implementation behavior while others provide guidance for implementations to apply various rate control heuristics.

Note | Applications need to make sure that they configure rate control parameters appropriately and that they follow the promises made to the implementation through parameters providing guidance for the implementation’s rate control algorithms and heuristics in order to be able to get the desired rate control behavior and to be able to hit the set bitrate targets. In addition, the behavior of rate control may also differ across implementations even if the capabilities of the used video profile match between those implementations. This may happen due to implementations applying different rate control algorithms or heuristics internally, and thus even the same set of guidance parameter values may have different effects on the rate control behavior across implementations.

#### 49.18.1. Rate Control Modes

After a video session is reset to the initial state, the default behavior and parameters of video encode rate control are entirely implementation-dependent and the application cannot affect the bitrate or quality parameters of the encoded bitstream data produced by video encode operations unless the application changes the rate control configuration of the video session, as described in the Video Coding Control section.

For each supported video profile, the implementation may expose a set of rate control modes that are available for use by the application when encoding bitstreams targeting that video profile. These modes allow using different rate control algorithms that fall into one of the following two categories:

1. Per-operation rate control

2. Stream-level rate control

In case of per-operation rate control, the bitrate of the generated video bitstream data is indirectly controlled by quality, size, or other encoding parameters specified by the application for each individual video encode operation.

In case of stream-level rate control, the application can directly specify target bitrates besides other encoding parameters to control the behavior of the rate control algorithm used by the implementation across multiple video encode operations.

The rate control modes are defined with the following enums:

    // Provided by VK_KHR_video_encode_queue
    typedef enum VkVideoEncodeRateControlModeFlagBitsKHR {
        VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DEFAULT_KHR = 0,
        VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR = 0x00000001,
        VK_VIDEO_ENCODE_RATE_CONTROL_MODE_CBR_BIT_KHR = 0x00000002,
        VK_VIDEO_ENCODE_RATE_CONTROL_MODE_VBR_BIT_KHR = 0x00000004,
    } VkVideoEncodeRateControlModeFlagBitsKHR;

- VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DEFAULT_KHR specifies the use of implementation-specific rate control.

- VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR specifies that rate control is disabled and the application will specify per-operation rate control parameters controlling the encoding quality. In this mode implementations will encode pictures independently of the output bitrate of prior video encode operations.

  - When using an H.264 encode profile, implementations will use the QP value specified in VkVideoEncodeH264NaluSliceInfoKHR::`constantQp` to control the quality of the encoded picture.

  - When using an H.265 encode profile, implementations will use the QP value specified in VkVideoEncodeH265NaluSliceSegmentInfoKHR::`constantQp` to control the quality of the encoded picture.

  - When using an AV1 encode profile, implementations will use the quantizer index value specified in VkVideoEncodeAV1PictureInfoKHR::`constantQIndex` to control the quality of the encoded picture.

- VK_VIDEO_ENCODE_RATE_CONTROL_MODE_CBR_BIT_KHR specifies the use of constant bitrate (CBR) rate control mode. In this mode the implementation will attempt to produce the encoded bitstream at a constant bitrate while conforming to the constraints of other rate control parameters.

- VK_VIDEO_ENCODE_RATE_CONTROL_MODE_VBR_BIT_KHR specifies the use of variable bitrate (VBR) rate control mode. In this mode the implementation will produce the encoded bitstream at a variable bitrate according to the constraints of other rate control parameters.

    // Provided by VK_KHR_video_encode_queue
    typedef VkFlags VkVideoEncodeRateControlModeFlagsKHR;

`VkVideoEncodeRateControlModeFlagsKHR` is a bitmask type for setting a mask of zero or more VkVideoEncodeRateControlModeFlagBitsKHR.

#### 49.18.2. Leaky Bucket Model

Video encoding implementations use the leaky bucket model for stream-level rate control. The leaky bucket is a concept referring to the interface between the video encoder and the consumer (for example, a network connection), where the video encoder produces encoded bitstream data corresponding to the encoded pictures and adds them in the leaky bucket while its content are drained by the consumer.

Analogously, a similar leaky bucket is considered to exist at the input interface of a video decoder, into which encoded bitstream data is continuously added and is subsequently consumed by the video decoder. It is desirable to avoid overflowing or underflowing this leaky bucked because:

- In case of an underflow, the video decoder will be unable to consume encoded bitstream data in order to decode pictures (and optionally display them).

- In case of an overflow, the leaky bucket will be unable to accommodate more encoded bitstream data and such data may need to be thrown away, leading to the loss of the corresponding encoded pictures.

These requirements can be satisfied by imposing various constraints on the encoder-side leaky bucket to avoid its overflow or underflow, depending on the used rate control algorithm and codec parameters. However, enumerating these constraints is outside the scope of this specification.

The term virtual buffer is often used as an alternative to refer to the leaky bucket.

This virtual buffer model is defined by the following parameters:

- The bitrate (`R`) at which the encoded bitstream is expected to be processed.

- The size (`B`) of the virtual buffer.

- The initial occupancy (`F`) of the virtual buffer.

In this model the virtual buffer is used to smooth out fluctuations in the bitrate of the encoded bitstream over time without experiencing buffer overflow or underflow, as long as the bitrate of the encoded stream does not diverge from the target bitrate for extended periods of time.

This buffering may inherently impose a processing delay, as the goal of the model is to enable decoders maintain a consistent processing rate of an encoded bitstream with varying data rate.

The initial or start-up delay (`D`) is computed as:

  `D` = `F` / `R`

Note | Applications need to configure the virtual buffer with sufficient size to avoid or minimize buffer overflows and underflows while also keeping it small enough to meet their latency goals.

#### 49.18.3. Rate Control Layers

Some video compression standards and video profiles allow associating encoded pictures with specific video coding layers. The name, identification, and semantics associated with such video coding layers are defined by the corresponding video compression standards.

Analogously, stream-level rate control can be configured to use one or more rate control layers:

- When a single rate control layer is configured, it is applied to all encoded pictures, regardless of the picture’s video coding layer. In this case the distribution of the available bitrate budget across video coding layers is implementation-dependent.

- When multiple rate control layers are configured, each rate control layer is applied to the corresponding video coding layer, i.e. only across encoded pictures pertaining to the corresponding video coding layer.

Individual rate control layers are identified using layer indices between zero and `N-1`, where `N` is the number of active rate control layers.

Rate control layers are only applicable when using stream-level rate control modes.

#### 49.18.4. Rate Control State

Rate control state is maintained by the implementation in the video session objects and its parameters are specified using an instance of the `VkVideoEncodeRateControlInfoKHR` structure. The complete rate control state of a video session is defined by the following set of parameters:

- The values of the members of the VkVideoEncodeRateControlInfoKHR structure used to configure the rate control state.

- The values of the members of any VkVideoEncodeRateControlLayerInfoKHR structures specified in VkVideoEncodeRateControlInfoKHR::`pLayers` used to configure the state of individual rate control layers.

- If the video session was created with an H.264 encode profile:

  - The values of the members of the VkVideoEncodeH264RateControlInfoKHR structure, if one is specified in the `pNext` chain of the VkVideoEncodeRateControlInfoKHR used to configure the rate control state.

  - The values of the members of any VkVideoEncodeH264RateControlLayerInfoKHR structures included in the `pNext` chain of a VkVideoEncodeRateControlLayerInfoKHR structure used to configure the state of a rate control layer.

- If the video session was created with an H.265 encode profile:

  - The values of the members of the VkVideoEncodeH265RateControlInfoKHR structure, if one is specified in the `pNext` chain of the VkVideoEncodeRateControlInfoKHR used to configure the rate control state.

  - The values of the members of any VkVideoEncodeH265RateControlLayerInfoKHR structures included in the `pNext` chain of a VkVideoEncodeRateControlLayerInfoKHR structure used to configure the state of a rate control layer.

- If the video session was created with an AV1 encode profile:

  - The values of the members of the VkVideoEncodeAV1RateControlInfoKHR structure, if one is specified in the `pNext` chain of the VkVideoEncodeRateControlInfoKHR used to configure the rate control state.

  - The values of the members of any VkVideoEncodeAV1RateControlLayerInfoKHR structures included in the `pNext` chain of a VkVideoEncodeRateControlLayerInfoKHR structure used to configure the state of a rate control layer.

Two rate control states match if all the parameters listed above match between them.

The `VkVideoEncodeRateControlInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_encode_queue
    typedef struct VkVideoEncodeRateControlInfoKHR {
        VkStructureType                                sType;
        const void*                                    pNext;
        VkVideoEncodeRateControlFlagsKHR               flags;
        VkVideoEncodeRateControlModeFlagBitsKHR        rateControlMode;
        uint32_t                                       layerCount;
        const VkVideoEncodeRateControlLayerInfoKHR*    pLayers;
        uint32_t                                       virtualBufferSizeInMs;
        uint32_t                                       initialVirtualBufferSizeInMs;
    } VkVideoEncodeRateControlInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is reserved for future use.

- `rateControlMode` is a VkVideoEncodeRateControlModeFlagBitsKHR value specifying the rate control mode.

- `layerCount` specifies the number of rate control layers to use.

- `pLayers` is a pointer to an array of `layerCount` VkVideoEncodeRateControlLayerInfoKHR structures, each specifying the rate control configuration of the corresponding rate control layer.

- `virtualBufferSizeInMs` is the size in milliseconds of the virtual buffer used by the implementation’s rate control algorithm for the leaky bucket model, with respect to the average bitrate of the stream calculated by summing the values of the `averageBitrate` members of the elements of the `pLayers` array.

- `initialVirtualBufferSizeInMs` is the initial occupancy in milliseconds of the virtual buffer used by the implementation’s rate control algorithm for the leaky bucket model.

If `layerCount` is zero then the values of `virtualBufferSizeInMs` and `initialVirtualBufferSizeInMs` are ignored.

This structure can be specified in the following places:

- In the `pNext` chain of VkVideoBeginCodingInfoKHR to specify the current rate control state expected to be configured when beginning a video coding scope.

- In the `pNext` chain of VkVideoCodingControlInfoKHR to change the rate control configuration of the bound video session.

Including this structure in the `pNext` chain of VkVideoCodingControlInfoKHR and including VK_VIDEO_CODING_CONTROL_ENCODE_RATE_CONTROL_BIT_KHR in VkVideoCodingControlInfoKHR::`flags` enables updating the rate control configuration of the bound video session. This replaces the entire rate control configuration of the bound video session and may reset the state of all enabled rate control layers to an initial state according to the codec-specific rate control semantics defined in the corresponding sections listed below.

When `layerCount` is greater than one, multiple rate control layers are configured, and each rate control layer is applied to the corresponding video coding layer identified by the index of the corresponding element of `pLayer`.

- If the video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR, then this index specifies the H.264 temporal layer ID of the video coding layer the rate control layer is applied to.

- If the video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR, then this index specifies the H.265 temporal ID of the video coding layer the rate control layer is applied to.

- If the video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR, then this index specifies the AV1 temporal ID of the temporal layer the rate control layer is applied to.

Additional structures providing codec-specific rate control parameters can be included in the `pNext` chain of `VkVideoCodingControlInfoKHR` depending on the video profile the bound video session was created. For further details see:

- Video Coding Control

- H.264 Encode Rate Control

- H.265 Encode Rate Control

- AV1 Encode Rate Control

The new rate control configuration takes effect when the corresponding vkCmdControlVideoCodingKHR is executed on the device, and only impacts video encode operations that follow in execution order.

Valid Usage

- VUID-VkVideoEncodeRateControlInfoKHR-rateControlMode-08248
  If `rateControlMode` is VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DEFAULT_KHR or VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR, then `layerCount` must be `0`

- VUID-VkVideoEncodeRateControlInfoKHR-rateControlMode-08275
  If `rateControlMode` is VK_VIDEO_ENCODE_RATE_CONTROL_MODE_CBR_BIT_KHR or VK_VIDEO_ENCODE_RATE_CONTROL_MODE_VBR_BIT_KHR, then `layerCount` must be greater than `0`

- VUID-VkVideoEncodeRateControlInfoKHR-rateControlMode-08244
  If `rateControlMode` is not VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DEFAULT_KHR, then it must specify one of the bits included in VkVideoEncodeCapabilitiesKHR::`rateControlModes`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the used video profile

- VUID-VkVideoEncodeRateControlInfoKHR-layerCount-08245
  `layerCount` member must be less than or equal to VkVideoEncodeCapabilitiesKHR::`maxRateControlLayers`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the used video profile

- VUID-VkVideoEncodeRateControlInfoKHR-pLayers-08276
  For each element of `pLayers`, its `averageBitrate` member must be between `1` and VkVideoEncodeCapabilitiesKHR::`maxBitrate`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the used video profile

- VUID-VkVideoEncodeRateControlInfoKHR-pLayers-08277
  For each element of `pLayers`, its `maxBitrate` member must be between `1` and VkVideoEncodeCapabilitiesKHR::`maxBitrate`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the used video profile

- VUID-VkVideoEncodeRateControlInfoKHR-rateControlMode-08356
  If `rateControlMode` is VK_VIDEO_ENCODE_RATE_CONTROL_MODE_CBR_BIT_KHR, then for each element of `pLayers`, its `averageBitrate` member must equal its `maxBitrate` member

- VUID-VkVideoEncodeRateControlInfoKHR-rateControlMode-08278
  If `rateControlMode` is VK_VIDEO_ENCODE_RATE_CONTROL_MODE_VBR_BIT_KHR, then for each element of `pLayers`, its `averageBitrate` member must be less than or equal to its `maxBitrate` member

- VUID-VkVideoEncodeRateControlInfoKHR-layerCount-08357
  If `layerCount` is not zero, then `virtualBufferSizeInMs` must be greater than zero

- VUID-VkVideoEncodeRateControlInfoKHR-layerCount-08358
  If `layerCount` is not zero, then `initialVirtualBufferSizeInMs` must be less than or equal to `virtualBufferSizeInMs`

- VUID-VkVideoEncodeRateControlInfoKHR-videoCodecOperation-07022
  If the `videoCodecOperation` of the used video profile is VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR, the `pNext` chain this structure is included in also includes an instance of the VkVideoEncodeH264RateControlInfoKHR structure, and `layerCount` is greater than `1`, then `layerCount` must equal VkVideoEncodeH264RateControlInfoKHR::`temporalLayerCount`

- VUID-VkVideoEncodeRateControlInfoKHR-videoCodecOperation-07025
  If the `videoCodecOperation` of the used video profile is VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR, the `pNext` chain this structure is included in also includes an instance of the VkVideoEncodeH265RateControlInfoKHR structure, and `layerCount` is greater than `1`, then `layerCount` must equal VkVideoEncodeH265RateControlInfoKHR::`subLayerCount`

- VUID-VkVideoEncodeRateControlInfoKHR-videoCodecOperation-10351
  If the `videoCodecOperation` of the used video profile is VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR, the `pNext` chain this structure is included in also includes an instance of the VkVideoEncodeAV1RateControlInfoKHR structure, and `layerCount` is greater than `1`, then `layerCount` must equal VkVideoEncodeAV1RateControlInfoKHR::`temporalLayerCount`

Valid Usage (Implicit)

- VUID-VkVideoEncodeRateControlInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_ENCODE_RATE_CONTROL_INFO_KHR

- VUID-VkVideoEncodeRateControlInfoKHR-flags-zerobitmask
  `flags` must be `0`

- VUID-VkVideoEncodeRateControlInfoKHR-rateControlMode-parameter
  If `rateControlMode` is not `0`, `rateControlMode` must be a valid VkVideoEncodeRateControlModeFlagBitsKHR value

- VUID-VkVideoEncodeRateControlInfoKHR-pLayers-parameter
  If `layerCount` is not `0`, `pLayers` must be a valid pointer to an array of `layerCount` valid VkVideoEncodeRateControlLayerInfoKHR structures

Structure Chaining

Extends the structures

  - VkVideoBeginCodingInfoKHR

  - VkVideoCodingControlInfoKHR

    // Provided by VK_KHR_video_encode_queue
    typedef VkFlags VkVideoEncodeRateControlFlagsKHR;

`VkVideoEncodeRateControlFlagsKHR` is a bitmask type for setting a mask, but currently reserved for future use.

##### Rate Control Layer State

The configuration of individual rate control layers is specified using an instance of the `VkVideoEncodeRateControlLayerInfoKHR` structure.

The `VkVideoEncodeRateControlLayerInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_encode_queue
    typedef struct VkVideoEncodeRateControlLayerInfoKHR {
        VkStructureType    sType;
        const void*        pNext;
        uint64_t           averageBitrate;
        uint64_t           maxBitrate;
        uint32_t           frameRateNumerator;
        uint32_t           frameRateDenominator;
    } VkVideoEncodeRateControlLayerInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is a pointer to a structure extending this structure.

- `averageBitrate` is the average bitrate to be targeted by the implementation’s rate control algorithm.

- `maxBitrate` is the peak bitrate to be targeted by the implementation’s rate control algorithm.

- `frameRateNumerator` is the numerator of the frame rate assumed by the implementation’s rate control algorithm.

- `frameRateDenominator` is the denominator of the frame rate assumed by the implementation’s rate control algorithm.

Note | The ability of the implementation’s rate control algorithm to be able to match the requested average and/or peak bitrates may be limited by the set of other codec-independent and codec-specific rate control parameters specified by the application, the input content, as well as the application conforming to the rate control guidance provided to the implementation, as described earlier.

Additional structures providing codec-specific rate control parameters can be included in the `pNext` chain of `VkVideoEncodeRateControlLayerInfoKHR` depending on the video profile the bound video session was created with. For further details see:

- Video Coding Control

- H.264 Encode Rate Control

- H.265 Encode Rate Control

- AV1 Encode Rate Control

Valid Usage

- VUID-VkVideoEncodeRateControlLayerInfoKHR-frameRateNumerator-08350
  `frameRateNumerator` must be greater than zero

- VUID-VkVideoEncodeRateControlLayerInfoKHR-frameRateDenominator-08351
  `frameRateDenominator` must be greater than zero

Valid Usage (Implicit)

- VUID-VkVideoEncodeRateControlLayerInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_ENCODE_RATE_CONTROL_LAYER_INFO_KHR

- VUID-VkVideoEncodeRateControlLayerInfoKHR-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkVideoEncodeAV1RateControlLayerInfoKHR, VkVideoEncodeH264RateControlLayerInfoKHR, or VkVideoEncodeH265RateControlLayerInfoKHR

- VUID-VkVideoEncodeRateControlLayerInfoKHR-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

### 49.19. Video Encode Quantization Maps

Quantization maps are VkImage objects that are used in video encode operations to control the relative quantization parameter values across the encoded picture. Each texel in the quantization map controls the relative quantization parameter values used to encode the corresponding rectangular block of texels in the encode input picture.

The size of the rectangular block of texels each quantization map texel covers is referred to as the quantization map texel size.

The extent of the image subresource used as a quantization map when encoding a picture with a coded extent of (`width`,`height`) thus has to be at least (⌈`width` / `texelSize.width`⌉, ⌈`height` / `texelSize.height`⌉), where `texelSize` is the used quantization map texel size.

In particular, the quantization map texel at location (`x`,`y`) contains relative quantization parameter values used when encoding the `texelSize` sized rectangular block of the encode input picture starting at the texel location (`x` × `texelSize.width`, `y` × `texelSize.height`).

The quantization map texel size does not always match the size of the codec-specific coding blocks used during encoding. Furthermore, some video compression standards allow the size of the codec-specific coding blocks to vary across the encoded picture. In order to accommodate for such mismatches between the granularity at which quantization parameters are stored in quantization maps and the granularity at which they are applied to codec-specific coding blocks during encoding, the following mapping rules are applied to define the quantization map texel value corresponding to a given codec-specific coding block with a size (`width`,`height`) at the texel location (`x`,`y`) in the encode input picture:

- If the size of the codec-specific coding block matches the used quantization map texel size, then the fetched quantization map value corresponding to the codec-specific coding block is the texel value at the texel location (`x` / `texelSize.width`, `y` / `texelSize.height`).

- If the size of the codec-specific coding block is smaller than the used quantization map texel size, then the fetched quantization map value corresponding to the codec-specific coding block is the texel value at the texel location (⌊`x` / `texelSize.width`⌋, ⌊`y` / `texelSize.height`⌋).

- If the size of the codec-specific coding block is larger than the used quantization map texel size, then the fetched quantization map value corresponding to the codec-specific coding block may be any value determined as the linear interpolation of the quantization map texel values in the subregion starting at texel location (`x` / `texelSize.width`,`y` / `texelSize.height`) with a size (⌈`width` / `texelSize.width`⌉, ⌈`height` / `texelSize.height`⌉).

The actual control parameters stored in the quantization map depend on its type. This specification supports the following types of quantization maps:

- Quantization delta maps

- Emphasis maps

#### 49.19.1. Quantization Delta Maps

Quantization delta maps contain values that directly affect the codec-specific quantization parameter values used to encode the corresponding block of the encode input picture.

Quantization delta maps can be used in conjunction with any rate control mode, including VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR.

Due to their codec-specific nature, they are described in more detail in the corresponding codec-specific section for video encode operations that support them. In particular:

- The behavior of quantization delta maps used with an H.264 encode profile is described in the H.264 Encode Quantization and H.264 QP Delta Maps sections.

- The behavior of quantization delta maps used with an H.265 encode profile is described in the H.265 Encode Quantization and H.265 QP Delta Maps sections.

- The behavior of quantization delta maps used with an AV1 encode profile is described in the AV1 Encode Quantization and AV1 Quantizer Index Delta Maps sections.

This specification does not support quantization delta maps for any other video encode operation.

#### 49.19.2. Emphasis Maps

Emphasis maps contain values that indirectly affect the codec-specific quantization parameter values used to encode the corresponding block of the encode input picture.

The texels of emphasis maps contain values that provide input to the encoder implementation about the relative importance (emphasis) of regions of the encoded pictures in order to enable the implementation’s rate control algorithm to allocate more bitrate budget for regions of the encoded picture with higher emphasis values than to those with lower emphasis values.

Emphasis maps can only be used when the current rate control mode configured for the video session is not VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DEFAULT_KHR or VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR.

As these emphasis values only control the otherwise implementation-specific behavior of the used rate control algorithm, this specification does not impose additional restrictions on implementations beyond the ones outlined in the corresponding codec-specific sections describing quantization behavior:

- The behavior of emphasis maps used with an H.264 encode profile is described in the H.264 Encode Quantization section.

- The behavior of emphasis maps used with an H.265 encode profile is described in the H.265 Encode Quantization section.

- The behavior of emphasis maps used with an AV1 encode profile is described in the AV1 Encode Quantization section.

This specification does not support emphasis maps for any other video encode operation.

Emphasis maps always have single channel unsigned normalized integer formats and implementations are required to support the VK_FORMAT_R8_UNORM format for emphasis maps, as reported in VkVideoFormatPropertiesKHR::`format`, when the video encode profile supports VK_VIDEO_ENCODE_CAPABILITY_EMPHASIS_MAP_BIT_KHR.

#### 49.19.3. Quantization Map Capabilities

When calling vkGetPhysicalDeviceVideoCapabilitiesKHR with `pVideoProfile->videoCodecOperation` specifying an encode operation, the VkVideoEncodeQuantizationMapCapabilitiesKHR structure can be included in the `pNext` chain of the VkVideoCapabilitiesKHR structure to retrieve capabilities specific to video encode quantization maps.

The `VkVideoEncodeQuantizationMapCapabilitiesKHR` structure is defined as:

    // Provided by VK_KHR_video_encode_quantization_map
    typedef struct VkVideoEncodeQuantizationMapCapabilitiesKHR {
        VkStructureType    sType;
        void*              pNext;
        VkExtent2D         maxQuantizationMapExtent;
    } VkVideoEncodeQuantizationMapCapabilitiesKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `maxQuantizationMapExtent` indicates the maximum supported width and height of quantization maps.

Valid Usage (Implicit)

- VUID-VkVideoEncodeQuantizationMapCapabilitiesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_ENCODE_QUANTIZATION_MAP_CAPABILITIES_KHR

Structure Chaining

Extends the structure

  - VkVideoCapabilitiesKHR

When calling vkGetPhysicalDeviceVideoCapabilitiesKHR to query the capabilities of an H.264 encode profile, the `VkVideoEncodeH264QuantizationMapCapabilitiesKHR` structure can be included in the `pNext` chain of the VkVideoCapabilitiesKHR structure to retrieve additional video encode quantization map capabilities specific to H.264 encode profiles.

The `VkVideoEncodeH264QuantizationMapCapabilitiesKHR` structure is defined as:

    // Provided by VK_KHR_video_encode_h264 with VK_KHR_video_encode_quantization_map
    typedef struct VkVideoEncodeH264QuantizationMapCapabilitiesKHR {
        VkStructureType    sType;
        void*              pNext;
        int32_t            minQpDelta;
        int32_t            maxQpDelta;
    } VkVideoEncodeH264QuantizationMapCapabilitiesKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `minQpDelta` indicates the minimum QP delta value supported for H.264 QP delta maps.

- `maxQpDelta` indicates the maximum QP delta value supported for H.264 QP delta maps.

Valid Usage (Implicit)

- VUID-VkVideoEncodeH264QuantizationMapCapabilitiesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_QUANTIZATION_MAP_CAPABILITIES_KHR

Structure Chaining

Extends the structure

  - VkVideoCapabilitiesKHR

When calling vkGetPhysicalDeviceVideoCapabilitiesKHR to query the capabilities of an H.265 encode profile, the `VkVideoEncodeH265QuantizationMapCapabilitiesKHR` structure can be included in the `pNext` chain of the VkVideoCapabilitiesKHR structure to retrieve additional video encode quantization map capabilities specific to H.265 encode profiles.

The `VkVideoEncodeH265QuantizationMapCapabilitiesKHR` structure is defined as:

    // Provided by VK_KHR_video_encode_h265 with VK_KHR_video_encode_quantization_map
    typedef struct VkVideoEncodeH265QuantizationMapCapabilitiesKHR {
        VkStructureType    sType;
        void*              pNext;
        int32_t            minQpDelta;
        int32_t            maxQpDelta;
    } VkVideoEncodeH265QuantizationMapCapabilitiesKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `minQpDelta` indicates the minimum QP delta value supported for H.265 QP delta maps.

- `maxQpDelta` indicates the maximum QP delta value supported for H.265 QP delta maps.

Valid Usage (Implicit)

- VUID-VkVideoEncodeH265QuantizationMapCapabilitiesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_QUANTIZATION_MAP_CAPABILITIES_KHR

Structure Chaining

Extends the structure

  - VkVideoCapabilitiesKHR

When calling vkGetPhysicalDeviceVideoCapabilitiesKHR to query the capabilities of an AV1 encode profile, the `VkVideoEncodeAV1QuantizationMapCapabilitiesKHR` structure can be included in the `pNext` chain of the VkVideoCapabilitiesKHR structure to retrieve additional video encode quantization map capabilities specific to AV1 encode profiles.

The `VkVideoEncodeAV1QuantizationMapCapabilitiesKHR` structure is defined as:

    // Provided by VK_KHR_video_encode_av1 with VK_KHR_video_encode_quantization_map
    typedef struct VkVideoEncodeAV1QuantizationMapCapabilitiesKHR {
        VkStructureType    sType;
        void*              pNext;
        int32_t            minQIndexDelta;
        int32_t            maxQIndexDelta;
    } VkVideoEncodeAV1QuantizationMapCapabilitiesKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `minQIndexDelta` indicates the minimum quantizer index delta value supported for AV1 quantizer index delta maps.

- `maxQIndexDelta` indicates the maximum quantizer index delta value supported for AV1 quantizer index delta maps.

Valid Usage (Implicit)

- VUID-VkVideoEncodeAV1QuantizationMapCapabilitiesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_QUANTIZATION_MAP_CAPABILITIES_KHR

Structure Chaining

Extends the structure

  - VkVideoCapabilitiesKHR

#### 49.19.4. Quantization Map Format Properties

When calling vkGetPhysicalDeviceVideoFormatPropertiesKHR, the VkVideoFormatQuantizationMapPropertiesKHR structure can be included in the `pNext` chain of the VkVideoFormatPropertiesKHR structure to retrieve video format properties specific to video encode quantization maps.

The `VkVideoFormatQuantizationMapPropertiesKHR` structure is defined as:

    // Provided by VK_KHR_video_encode_quantization_map
    typedef struct VkVideoFormatQuantizationMapPropertiesKHR {
        VkStructureType    sType;
        void*              pNext;
        VkExtent2D         quantizationMapTexelSize;
    } VkVideoFormatQuantizationMapPropertiesKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `quantizationMapTexelSize` indicates the quantization map texel size of the video format, i.e. the number of pixels corresponding to each quantization map texel.

The values returned in this structure are only defined if the allowed image usage flags returned in VkVideoFormatPropertiesKHR::`imageUsageFlags` for this video format include VK_IMAGE_USAGE_VIDEO_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR or VK_IMAGE_USAGE_VIDEO_ENCODE_EMPHASIS_MAP_BIT_KHR.

Implementations may support multiple quantization map texel sizes for a particular video format which is indicated by vkGetPhysicalDeviceVideoFormatPropertiesKHR returning multiple entries with different `quantizationMapTexelSize` values.

Valid Usage (Implicit)

- VUID-VkVideoFormatQuantizationMapPropertiesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_FORMAT_QUANTIZATION_MAP_PROPERTIES_KHR

Structure Chaining

Extends the structure

  - VkVideoFormatPropertiesKHR

When calling vkGetPhysicalDeviceVideoFormatPropertiesKHR, the `VkVideoFormatH265QuantizationMapPropertiesKHR` structure can be included in the `pNext` chain of the VkVideoFormatPropertiesKHR structure to retrieve video format properties specific to video encode quantization maps used with an H.265 encode profile.

The `VkVideoFormatH265QuantizationMapPropertiesKHR` structure is defined as:

    // Provided by VK_KHR_video_encode_h265 with VK_KHR_video_encode_quantization_map
    typedef struct VkVideoFormatH265QuantizationMapPropertiesKHR {
        VkStructureType                     sType;
        void*                               pNext;
        VkVideoEncodeH265CtbSizeFlagsKHR    compatibleCtbSizes;
    } VkVideoFormatH265QuantizationMapPropertiesKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `compatibleCtbSizes` is a bitmask of VkVideoEncodeH265CtbSizeFlagBitsKHR indicating the CTB sizes that quantization maps using this video format are compatible with.

  Note | The value of `compatibleCtbSizes` does not limit the use of the specific quantization map format, but does limit the implementation in being able to encode pictures with CTB sizes not included in `compatibleCtbSizes` but otherwise supported by the used video profile, as indicated by VkVideoEncodeH265CapabilitiesKHR::`ctbSizes`. In particular, using smaller quantization map texel sizes may prevent implementations from encoding with larger CTB sizes which may have a negative impact on the efficiency of the encoder.

The values returned in this structure are only defined if the allowed image usage flags returned in VkVideoFormatPropertiesKHR::`imageUsageFlags` for this video format include VK_IMAGE_USAGE_VIDEO_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR or VK_IMAGE_USAGE_VIDEO_ENCODE_EMPHASIS_MAP_BIT_KHR.

Valid Usage (Implicit)

- VUID-VkVideoFormatH265QuantizationMapPropertiesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_FORMAT_H265_QUANTIZATION_MAP_PROPERTIES_KHR

Structure Chaining

Extends the structure

  - VkVideoFormatPropertiesKHR

When calling vkGetPhysicalDeviceVideoFormatPropertiesKHR, the `VkVideoFormatAV1QuantizationMapPropertiesKHR` structure can be included in the `pNext` chain of the VkVideoFormatPropertiesKHR structure to retrieve video format properties specific to video encode quantization maps used with an AV1 encode profile.

The `VkVideoFormatAV1QuantizationMapPropertiesKHR` structure is defined as:

    // Provided by VK_KHR_video_encode_av1 with VK_KHR_video_encode_quantization_map
    typedef struct VkVideoFormatAV1QuantizationMapPropertiesKHR {
        VkStructureType                           sType;
        void*                                     pNext;
        VkVideoEncodeAV1SuperblockSizeFlagsKHR    compatibleSuperblockSizes;
    } VkVideoFormatAV1QuantizationMapPropertiesKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `compatibleSuperblockSizes` is a bitmask of VkVideoEncodeAV1SuperblockSizeFlagBitsKHR indicating the AV1 superblock sizes that quantization maps using this video format are compatible with.

  Note | The value of `compatibleSuperblockSizes` does not limit the use of the specific quantization map format, but does limit the implementation in being able to encode pictures with superblock sizes not included in `compatibleSuperblockSizes` but otherwise supported by the used video profile, as indicated by VkVideoEncodeAV1CapabilitiesKHR::`superblockSizes`. In particular, using smaller quantization map texel sizes may prevent implementations from encoding with larger superblock sizes which may have a negative impact on the efficiency of the encoder.

The values returned in this structure are only defined if the allowed image usage flags returned in VkVideoFormatPropertiesKHR::`imageUsageFlags` for this video format include VK_IMAGE_USAGE_VIDEO_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR or VK_IMAGE_USAGE_VIDEO_ENCODE_EMPHASIS_MAP_BIT_KHR.

Valid Usage (Implicit)

- VUID-VkVideoFormatAV1QuantizationMapPropertiesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_FORMAT_AV1_QUANTIZATION_MAP_PROPERTIES_KHR

Structure Chaining

Extends the structure

  - VkVideoFormatPropertiesKHR

#### 49.19.5. Encoding with Quantization Maps

The `VkVideoEncodeQuantizationMapInfoKHR` structure can be included in the `pNext` chain of the VkVideoEncodeInfoKHR structure passed to the vkCmdEncodeVideoKHR command to specify the quantization map used by the issued video encode operations.

The `VkVideoEncodeQuantizationMapInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_encode_quantization_map
    typedef struct VkVideoEncodeQuantizationMapInfoKHR {
        VkStructureType    sType;
        const void*        pNext;
        VkImageView        quantizationMap;
        VkExtent2D         quantizationMapExtent;
    } VkVideoEncodeQuantizationMapInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `quantizationMap` specifies the image view to use as the quantization map.

- `quantizationMapExtent` specifies the extent of the image subregion of `quantizationMap` to use as the quantization map starting at offset (0,0).

Valid Usage

- VUID-VkVideoEncodeQuantizationMapInfoKHR-quantizationMapExtent-10352
  `quantizationMapExtent.width` must be less than or equal to the width of `quantizationMap`

- VUID-VkVideoEncodeQuantizationMapInfoKHR-quantizationMapExtent-10353
  `quantizationMapExtent.height` must be less than or equal to the height of `quantizationMap`

Valid Usage (Implicit)

- VUID-VkVideoEncodeQuantizationMapInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_ENCODE_QUANTIZATION_MAP_INFO_KHR

- VUID-VkVideoEncodeQuantizationMapInfoKHR-quantizationMap-parameter
  If `quantizationMap` is not VK_NULL_HANDLE, `quantizationMap` must be a valid VkImageView handle

Structure Chaining

Extends the structure

  - VkVideoEncodeInfoKHR

### 49.20. Video Encode R′G′B′ Conversion

R′G′B′ to Y′CBCR conversion performs the following operations to the encode input picture before video coding:

- R′G′B′ Range Compression

- R′G′B′ Model Conversion

- R′G′B′ Chroma Subsampling and Quantization

#### 49.20.1. R′G′B′ Conversion Capabilities

When calling vkGetPhysicalDeviceVideoCapabilitiesKHR with `pVideoProfile->videoCodecOperation` specifying an encode operation, the VkVideoEncodeRgbConversionCapabilitiesVALVE structure can be included in the `pNext` chain of the VkVideoCapabilitiesKHR structure to retrieve capabilities specific to video encode R′G′B′ conversion.

The `VkVideoEncodeRgbConversionCapabilitiesVALVE` structure is defined as:

    // Provided by VK_VALVE_video_encode_rgb_conversion
    typedef struct VkVideoEncodeRgbConversionCapabilitiesVALVE {
        VkStructureType                               sType;
        void*                                         pNext;
        VkVideoEncodeRgbModelConversionFlagsVALVE     rgbModels;
        VkVideoEncodeRgbRangeCompressionFlagsVALVE    rgbRanges;
        VkVideoEncodeRgbChromaOffsetFlagsVALVE        xChromaOffsets;
        VkVideoEncodeRgbChromaOffsetFlagsVALVE        yChromaOffsets;
    } VkVideoEncodeRgbConversionCapabilitiesVALVE;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `rgbModels` is a bitmask of VkVideoEncodeRgbModelConversionFlagBitsVALVE describing supported model conversions for video encode R′G′B′ conversion.

- `rgbRanges` is a bitmask of VkVideoEncodeRgbRangeCompressionFlagBitsVALVE describing supported range compressions for video encode R′G′B′ conversion.

- `xChromaOffsets` is a bitmask of VkVideoEncodeRgbChromaOffsetFlagBitsVALVE describing supported offsets of the output location of the downsampled chroma component on the X axis for video encode R′G′B′ conversion.

- `yChromaOffsets` is a bitmask of VkVideoEncodeRgbChromaOffsetFlagBitsVALVE describing supported offsets of the output location of the downsampled chroma component on the Y axis for video encode R′G′B′ conversion.

Valid Usage (Implicit)

- VUID-VkVideoEncodeRgbConversionCapabilitiesVALVE-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_ENCODE_RGB_CONVERSION_CAPABILITIES_VALVE

Structure Chaining

Extends the structure

  - VkVideoCapabilitiesKHR

##### R′G′B′ Range Compression

The video encode R′G′B′ range compression to be applied to color component values of the encode input picture before video coding is defined by the `rgbRange` member of the VkVideoEncodeSessionRgbConversionCreateInfoVALVE structure.

The VkVideoEncodeRgbRangeCompressionFlagBitsVALVE enum describes whether color components are encoded using the full range of numerical values or whether values are reserved for headroom and foot room:

    // Provided by VK_VALVE_video_encode_rgb_conversion
    typedef enum VkVideoEncodeRgbRangeCompressionFlagBitsVALVE {
        VK_VIDEO_ENCODE_RGB_RANGE_COMPRESSION_FULL_RANGE_BIT_VALVE = 0x00000001,
        VK_VIDEO_ENCODE_RGB_RANGE_COMPRESSION_NARROW_RANGE_BIT_VALVE = 0x00000002,
    } VkVideoEncodeRgbRangeCompressionFlagBitsVALVE;

- VK_VIDEO_ENCODE_RGB_RANGE_COMPRESSION_FULL_RANGE_BIT_VALVE specifies the following transformations are applied:

  Y′C B​C R​​=C r g ba′​[G]=C r g ba′​[B]−(2 n)−1 2(n−1)​=C r g ba′​[R]−(2 n)−1 2(n−1)​​

  Note | These formulae correspond to the “full range” encoding in the “Quantization schemes” chapter of the Khronos Data Format Specification. Should any future amendments be made to the ITU specifications from which these equations are derived, the formulae used by Vulkan may also be updated to maintain parity.

- VK_VIDEO_ENCODE_RGB_RANGE_COMPRESSION_NARROW_RANGE_BIT_VALVE specifies the following transformations are applied:

  Y′C B​C R​​=219×2 n−8 C r g ba′​[G]×(2 n−1)−16×2 n−8​=224×2 n−8 C r g ba′​[B]×(2 n−1)−128×2 n−8​=224×2 n−8 C r g ba′​[R]×(2 n−1)−128×2 n−8​​

  Note | These formulae correspond to the “narrow range” encoding in the “Quantization schemes” chapter of the Khronos Data Format Specification. Unlike sampler Y′CBCR range expansion, no precision guarantees are made for video encode R′G′B′ range compression.

- n is the bit-depth of the components in the bound video session’s `pictureFormat`.

Note | Video encode R′G′B′ range compression transformations have the inverse definition of the sampler Y′CBCR range expansion transformations.

    // Provided by VK_VALVE_video_encode_rgb_conversion
    typedef VkFlags VkVideoEncodeRgbRangeCompressionFlagsVALVE;

VkVideoEncodeRgbRangeCompressionFlagsVALVE is a bitmask type for setting a mask of zero or more VkVideoEncodeRgbRangeCompressionFlagBitsVALVE.

##### R′G′B′ Model Conversion

The range-compressed values are converted between color models, according to the color model conversion specified in the `rgbModel` member of the VkVideoEncodeSessionRgbConversionCreateInfoVALVE structure.

VkVideoEncodeRgbModelConversionFlagBitsVALVE defines the conversion from the encode input picture's color model to the encode color model.

    // Provided by VK_VALVE_video_encode_rgb_conversion
    typedef enum VkVideoEncodeRgbModelConversionFlagBitsVALVE {
        VK_VIDEO_ENCODE_RGB_MODEL_CONVERSION_RGB_IDENTITY_BIT_VALVE = 0x00000001,
        VK_VIDEO_ENCODE_RGB_MODEL_CONVERSION_YCBCR_IDENTITY_BIT_VALVE = 0x00000002,
        VK_VIDEO_ENCODE_RGB_MODEL_CONVERSION_YCBCR_709_BIT_VALVE = 0x00000004,
        VK_VIDEO_ENCODE_RGB_MODEL_CONVERSION_YCBCR_601_BIT_VALVE = 0x00000008,
        VK_VIDEO_ENCODE_RGB_MODEL_CONVERSION_YCBCR_2020_BIT_VALVE = 0x00000010,
    } VkVideoEncodeRgbModelConversionFlagBitsVALVE;

- VK_VIDEO_ENCODE_RGB_MODEL_CONVERSION_RGB_IDENTITY_BIT_VALVE specifies the color components are not modified by the color model conversion since they are assumed to represent the desired color model for video coding; R′G′B′ range compression is applied to the components.

- VK_VIDEO_ENCODE_RGB_MODEL_CONVERSION_YCBCR_IDENTITY_BIT_VALVE specifies the color components are not modified by the color model conversion are assumed to be treated as though in Y′CBCR form; video encode R′G′B′ range compression and video encode R′G′B′ chroma subsampling is also ignored.

- VK_VIDEO_ENCODE_RGB_MODEL_CONVERSION_YCBCR_709_BIT_VALVE specifies the color components are transformed from an R′G′B′ representation to a Y′CBCR representation as described in the “BT.709 Y′CBCR conversion” section of the Khronos Data Format Specification.

- VK_VIDEO_ENCODE_RGB_MODEL_CONVERSION_YCBCR_601_BIT_VALVE specifies the color components are transformed from an R′G′B′ representation to a Y′CBCR representation as described in the “BT.601 Y′CBCR conversion” section of the Khronos Data Format Specification.

- VK_VIDEO_ENCODE_RGB_MODEL_CONVERSION_YCBCR_2020_BIT_VALVE specifies the color components are transformed from an R′G′B′ representation to a Y′CBCR representation as described in the “BT.2020 Y′CBCR conversion” section of the Khronos Data Format Specification.

Note | Video encode R′G′B′ model conversion transformations have the inverse definition of sampler Y′CBCR model conversion transformations.

Note | The video encode R′G′B′ model conversion step does not apply any transfer function, only converting from R′G′B′ to Y′CBCR using the primaries of the specified `rgbModel` color model.

    // Provided by VK_VALVE_video_encode_rgb_conversion
    typedef VkFlags VkVideoEncodeRgbModelConversionFlagsVALVE;

VkVideoEncodeRgbModelConversionFlagsVALVE is a bitmask type for setting a mask of zero or more VkVideoEncodeRgbModelConversionFlagBitsVALVE.

##### R′G′B′ Chroma Subsampling and Quantization

The model-converted values are chroma subsampled and quantized, according to the `chromaSubsampling`, `lumaBitDepth` and `chromaBitDepth` values specified by the bound video session.

The VkVideoEncodeRgbChromaOffsetFlagBitsVALVE enum defines the location of downsampled chroma component samples relative to the luma samples for video encode R′G′B′ conversion, and is defined as:

    // Provided by VK_VALVE_video_encode_rgb_conversion
    typedef enum VkVideoEncodeRgbChromaOffsetFlagBitsVALVE {
        VK_VIDEO_ENCODE_RGB_CHROMA_OFFSET_COSITED_EVEN_BIT_VALVE = 0x00000001,
        VK_VIDEO_ENCODE_RGB_CHROMA_OFFSET_MIDPOINT_BIT_VALVE = 0x00000002,
    } VkVideoEncodeRgbChromaOffsetFlagBitsVALVE;

- VK_VIDEO_ENCODE_RGB_CHROMA_OFFSET_COSITED_EVEN_BIT_VALVE specifies that downsampled chroma samples are aligned with luma samples with even coordinates.

- VK_VIDEO_ENCODE_RGB_CHROMA_OFFSET_MIDPOINT_BIT_VALVE specifies that downsampled chroma samples are located half way between each even luma sample and the nearest higher odd luma sample.

The output location of downsampled chroma components are specified by the `xChromaOffset` and `yChromaOffset` values of the VkVideoEncodeSessionRgbConversionCreateInfoVALVE structure:

Chroma subsampling is described in more detail in the Chroma Reconstruction section.

    // Provided by VK_VALVE_video_encode_rgb_conversion
    typedef VkFlags VkVideoEncodeRgbChromaOffsetFlagsVALVE;

VkVideoEncodeRgbChromaOffsetFlagsVALVE is a bitmask type for setting a mask of zero or more VkVideoEncodeRgbChromaOffsetFlagBitsVALVE.

#### 49.20.2. Encoding Pictures with R′G′B′ Conversion

A video profile supporting video encode R′G′B′ conversion is specified by an `pVideoProfile->videoCodecOperation` specifying an encode operation and including a `VkVideoEncodeProfileRgbConversionInfoVALVE` structure in the `pNext` chain of the VkVideoProfileInfoKHR structure and enabling `performEncodeRgbConversion`.

The `VkVideoEncodeProfileRgbConversionInfoVALVE` structure is defined as:

    // Provided by VK_VALVE_video_encode_rgb_conversion
    typedef struct VkVideoEncodeProfileRgbConversionInfoVALVE {
        VkStructureType    sType;
        const void*        pNext;
        VkBool32           performEncodeRgbConversion;
    } VkVideoEncodeProfileRgbConversionInfoVALVE;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `performEncodeRgbConversion` is a boolean value indicating whether video encode R′G′B′ conversion will be used for the encode operation.

Valid Usage (Implicit)

- VUID-VkVideoEncodeProfileRgbConversionInfoVALVE-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_ENCODE_PROFILE_RGB_CONVERSION_INFO_VALVE

Structure Chaining

Extends the structure

  - VkVideoProfileInfoKHR

The `VkVideoEncodeSessionRgbConversionCreateInfoVALVE` structure can be included in the `pNext` chain of the VkVideoSessionCreateInfoKHR to specify the R′G′B′ conversion parameters used by the issued video encode operations of the video session.

The `VkVideoEncodeSessionRgbConversionCreateInfoVALVE` structure is defined as:

    // Provided by VK_VALVE_video_encode_rgb_conversion
    typedef struct VkVideoEncodeSessionRgbConversionCreateInfoVALVE {
        VkStructureType                                  sType;
        const void*                                      pNext;
        VkVideoEncodeRgbModelConversionFlagBitsVALVE     rgbModel;
        VkVideoEncodeRgbRangeCompressionFlagBitsVALVE    rgbRange;
        VkVideoEncodeRgbChromaOffsetFlagBitsVALVE        xChromaOffset;
        VkVideoEncodeRgbChromaOffsetFlagBitsVALVE        yChromaOffset;
    } VkVideoEncodeSessionRgbConversionCreateInfoVALVE;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `rgbModel` is the used R′G′B′ model conversion for the R′G′B′ conversion.

- `rgbRange` is the used R′G′B′ range compression for the R′G′B′ conversion.

- `xChromaOffset` describes the output location of downsampled chroma components in the x dimension for the R′G′B′ conversion.

- `yChromaOffset` describes the output location of downsampled chroma components in the y dimension for the R′G′B′ conversion.

Valid Usage

- VUID-VkVideoEncodeSessionRgbConversionCreateInfoVALVE-rgbModel-10930
  `rgbModel` must only be a bit set in VkVideoEncodeRgbConversionCapabilitiesVALVE::`rgbModels` as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR with `VkVideoEncodeRgbConversionCapabilitiesVALVE` in the `pNext` chain of `VkVideoCapabilitiesKHR` with the given `pVideoProfile`

- VUID-VkVideoEncodeSessionRgbConversionCreateInfoVALVE-rgbRange-10931
  `rgbRange` must only be a bit set in VkVideoEncodeRgbConversionCapabilitiesVALVE::`rgbRanges` as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR with `VkVideoEncodeRgbConversionCapabilitiesVALVE` in the `pNext` chain of `VkVideoCapabilitiesKHR` with the given `pVideoProfile`

- VUID-VkVideoEncodeSessionRgbConversionCreateInfoVALVE-xChromaOffset-10932
  `xChromaOffset` must only be a bit set in VkVideoEncodeRgbConversionCapabilitiesVALVE::`xChromaOffsets` as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR with `VkVideoEncodeRgbConversionCapabilitiesVALVE` in the `pNext` chain of `VkVideoCapabilitiesKHR` with the given `pVideoProfile`

- VUID-VkVideoEncodeSessionRgbConversionCreateInfoVALVE-yChromaOffset-10933
  `yChromaOffset` must only be a bit set in VkVideoEncodeRgbConversionCapabilitiesVALVE::`yChromaOffsets` as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR with `VkVideoEncodeRgbConversionCapabilitiesVALVE` in the `pNext` chain of `VkVideoCapabilitiesKHR` with the given `pVideoProfile`

Valid Usage (Implicit)

- VUID-VkVideoEncodeSessionRgbConversionCreateInfoVALVE-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_ENCODE_SESSION_RGB_CONVERSION_CREATE_INFO_VALVE

- VUID-VkVideoEncodeSessionRgbConversionCreateInfoVALVE-rgbModel-parameter
  `rgbModel` must be a valid VkVideoEncodeRgbModelConversionFlagBitsVALVE value

- VUID-VkVideoEncodeSessionRgbConversionCreateInfoVALVE-rgbRange-parameter
  `rgbRange` must be a valid VkVideoEncodeRgbRangeCompressionFlagBitsVALVE value

- VUID-VkVideoEncodeSessionRgbConversionCreateInfoVALVE-xChromaOffset-parameter
  `xChromaOffset` must be a valid VkVideoEncodeRgbChromaOffsetFlagBitsVALVE value

- VUID-VkVideoEncodeSessionRgbConversionCreateInfoVALVE-yChromaOffset-parameter
  `yChromaOffset` must be a valid VkVideoEncodeRgbChromaOffsetFlagBitsVALVE value

Structure Chaining

Extends the structure

  - VkVideoSessionCreateInfoKHR

### 49.21. H.264 Encode Operations

Video encode operations using an H.264 encode profile can be used to encode elementary video stream sequences compliant to the ITU-T H.264 Specification.

Note | Refer to the Preamble for information on how the Khronos Intellectual Property Rights Policy relates to normative references to external materials not created by Khronos.

This process is performed according to the video encode operation steps with the codec-specific semantics defined in section 8 of the ITU-T H.264 Specification as follows:

- Syntax elements, derived values, and other parameters are applied from the following structures:

  - The `StdVideoH264SequenceParameterSet` structure corresponding to the active SPS specifying the H.264 sequence parameter set.

  - The `StdVideoH264PictureParameterSet` structure corresponding to the active PPS specifying the H.264 picture parameter set.

  - The `StdVideoEncodeH264PictureInfo` structure specifying the H.264 picture information.

  - The `StdVideoEncodeH264SliceHeader` structures specifying the H.264 slice header parameters for each encoded H.264 slice.

  - The `StdVideoEncodeH264ReferenceInfo` structures specifying the H.264 reference information corresponding to the optional reconstructed picture and any active reference pictures.

- The encoded bitstream data is written to the destination video bitstream buffer range as defined in the H.264 Encode Bitstream Data Access section.

- Picture data in the video picture resources corresponding to the used encode input picture, active reference pictures, and optional reconstructed picture is accessed as defined in the H.264 Encode Picture Data Access section.

- The decision on reference picture setup is made according to the parameters specified in the H.264 picture information.

If the parameters adhere to the syntactic and semantic requirements defined in the corresponding sections of the ITU-T H.264 Specification, as described above, and the DPB slots associated with the active reference pictures all refer to valid picture references, then the video encode operation will complete successfully. Otherwise, the video encode operation may complete unsuccessfully.

#### 49.21.1. H.264 Encode Parameter Overrides

Implementations may override, unless otherwise specified, any of the H.264 encode parameters specified in the following Video Std structures:

- `StdVideoH264SequenceParameterSet`

- `StdVideoH264PictureParameterSet`

- `StdVideoEncodeH264PictureInfo`

- `StdVideoEncodeH264SliceHeader`

- `StdVideoEncodeH264ReferenceInfo`

All such H.264 encode parameter overrides must fulfill the conditions defined in the Video Encode Parameter Overrides section.

In addition, implementations must not override any of the following H.264 encode parameters:

- `StdVideoEncodeH264PictureInfo`::`primary_pic_type`

- `StdVideoEncodeH264SliceHeader`::`slice_type`

If the `videoMaintenance2` feature is enabled, implementations must not override any of the following H.264 encode parameters:

- the following parameters specified in `StdVideoH264SequenceParameterSet`:

  - `flags.vui_parameters_present_flag`

  - `profile_idc`

  - `level_idc`

  - `chroma_format_idc`

- the following parameters specified in the `StdVideoH264SequenceParameterSetVui` structure pointed to by `StdVideoH264SequenceParameterSet`::`pSequenceParameterSetVui`:

  - `flags.aspect_ratio_info_present_flag`

  - `flags.overscan_info_present_flag`

  - `flags.overscan_appropriate_flag`

  - `flags.video_signal_type_present_flag`

  - `flags.video_full_range_flag`

  - `flags.color_description_present_flag`

  - `flags.chroma_loc_info_present_flag`

  - `flags.timing_info_present_flag`

  - `flags.fixed_frame_rate_flag`

  - `aspect_ratio_idc`

  - `sar_width`

  - `sar_height`

  - `video_format`

  - `colour_primaries`

  - `transfer_characteristics`

  - `matrix_coefficients`

  - `num_units_in_tick`

  - `time_scale`

  - `chroma_sample_loc_type_top_field`

  - `chroma_sample_loc_type_bottom_field`

In case of H.264 encode parameters stored in video session parameters objects, applications need to use the vkGetEncodedVideoSessionParametersKHR command to determine whether any implementation overrides happened. If the query indicates that implementation overrides were applied, then the application needs to retrieve and use the encoded H.264 parameter sets in the bitstream in order to be able to produce a compliant H.264 video bitstream using the H.264 encode parameters stored in the video session parameters object.

In case of any H.264 encode parameters stored in the encoded bitstream produced by video encode operations, if the implementation supports the VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_HAS_OVERRIDES_BIT_KHR video encode feedback query flag, the application can use such queries to retrieve feedback about whether any implementation overrides have been applied to those H.264 encode parameters.

#### 49.21.2. H.264 Encode Bitstream Data Access

Each video encode operation writes one or more VCL NAL units comprising of slice headers and data of the encoded picture, in the format defined in sections 7.3.3 and 7.3.4, according to the semantics defined in sections 7.4.3 and 7.4.4 of the ITU-T H.264 Specification, respectively. The number of VCL NAL units written is specified by VkVideoEncodeH264PictureInfoKHR::`naluSliceEntryCount`.

In addition, if VkVideoEncodeH264PictureInfoKHR::`generatePrefixNalu` is VK_TRUE for the video encode operation, then an additional prefix NAL unit is written before each VCL NAL unit corresponding to individual slices in the format defined in section 7.3.2.12, according to the semantics defined in section 7.4.2.12 of the ITU-T H.264 Specification, respectively.

#### 49.21.3. H.264 Encode Picture Data Access

Accesses to image data within a video picture resource happen at the granularity indicated by VkVideoCapabilitiesKHR::`pictureAccessGranularity`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the used video profile. Accordingly, the complete image subregion of a encode input picture, reference picture, or reconstructed picture accessed by video coding operations using an H.264 encode profile is defined as the set of texels within the coordinate range:

  ([0,`endX`), [0,`endY`))

Where:

- `endX` equals `codedExtent.width` rounded up to the nearest integer multiple of `pictureAccessGranularity.width` and clamped to the width of the image subresource referred to by the corresponding VkVideoPictureResourceInfoKHR structure;

- endY equals `codedExtent.height` rounded up to the nearest integer multiple of `pictureAccessGranularity.height` and clamped to the height of the image subresource referred to by the corresponding VkVideoPictureResourceInfoKHR structure;

Where `codedExtent` is the member of the VkVideoPictureResourceInfoKHR structure corresponding to the picture.

In case of video encode operations using an H.264 encode profile, any access to a picture at the coordinates (`x`,`y`), as defined by the ITU-T H.264 Specification, is an access to the image subresource referred to by the corresponding VkVideoPictureResourceInfoKHR structure at the texel coordinates (`x`,`y`).

Implementations may choose not to access some or all texels within particular reference pictures available to a video encode operation (e.g. due to video encode parameter overrides restricting the effective set of used reference pictures, or if the encoding algorithm chooses not to use certain subregions of the reference picture data for sample prediction).

#### 49.21.4. H.264 Frame, Picture, and Slice

H.264 pictures are partitioned into slices, as defined in section 6.3 of the ITU-T H.264 Specification.

For the purposes of this specification, the H.264 slices comprising a picture are referred to as the picture partitions of the picture.

Video encode operations using an H.264 encode profile can encode slices of different types, as defined in section 7.4.3 of the ITU-T H.264 Specification, by specifying the corresponding enumeration constant value in `StdVideoEncodeH264SliceHeader`::`slice_type` in the H.264 slice header parameters from the Video Std enumeration type `StdVideoH264SliceType`:

- `STD_VIDEO_H264_SLICE_TYPE_P` indicates that the slice is a P slice as defined in section 3.109 of the ITU-T H.264 Specification.

- `STD_VIDEO_H264_SLICE_TYPE_B` indicates that the slice is a B slice as defined in section 3.9 of the ITU-T H.264 Specification.

- `STD_VIDEO_H264_SLICE_TYPE_I` indicates that the slice is an I slice as defined in section 3.66 of the ITU-T H.264 Specification.

Pictures constructed from such slices can be of different types, as defined in section 7.4.2.4 of the ITU-T H.264 Specification. Video encode operations using an H.264 encode profile can encode pictures of a specific type by specifying the corresponding enumeration constant value in `StdVideoEncodeH264PictureInfo`::`primary_pic_type` in the H.264 picture information from the Video Std enumeration type `StdVideoH264PictureType`:

- `STD_VIDEO_H264_PICTURE_TYPE_P` indicates that the picture is a P picture. A frame consisting of a P picture is also referred to as a P frame.

- `STD_VIDEO_H264_PICTURE_TYPE_B` indicates that the picture is a B picture. A frame consisting of a B picture is also referred to as a B frame.

- `STD_VIDEO_H264_PICTURE_TYPE_I` indicates that the picture is an I picture. A frame consisting of an I picture is also referred to as an I frame.

- `STD_VIDEO_H264_PICTURE_TYPE_IDR` indicates that the picture is a special type of I picture called an IDR picture as defined in section 3.69 of the ITU-T H.264 Specification. A frame consisting of an IDR picture is also referred to as an IDR frame.

#### 49.21.5. H.264 Coding Blocks

H.264 encode supports a single type of coding block called a macroblock, as defined in section 3.84 of the ITU-T H.264 Specification.

An H.264 macroblock is considered skipped when the value of `mb_type` for the macroblock equals `P_Skip` or `B_Skip`, as defined in section 7.4.5 of the ITU-T H.264 Specification.

#### 49.21.6. H.264 Encode Profile

A video profile supporting H.264 video encode operations is specified by setting VkVideoProfileInfoKHR::`videoCodecOperation` to VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR and adding a `VkVideoEncodeH264ProfileInfoKHR` structure to the VkVideoProfileInfoKHR::`pNext` chain.

The `VkVideoEncodeH264ProfileInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_encode_h264
    typedef struct VkVideoEncodeH264ProfileInfoKHR {
        VkStructureType           sType;
        const void*               pNext;
        StdVideoH264ProfileIdc    stdProfileIdc;
    } VkVideoEncodeH264ProfileInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `stdProfileIdc` is a `StdVideoH264ProfileIdc` value specifying the H.264 codec profile IDC, where enum constant `STD_VIDEO_H264_PROFILE_IDC_BASELINE` identifies the Constrained Baseline profile as defined in A.2.1.1 of the ITU-T H.264 Specification, and all other values correspond to profiles defined in section A.2 of the ITU-T H.264 Specification.

Valid Usage (Implicit)

- VUID-VkVideoEncodeH264ProfileInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_PROFILE_INFO_KHR

Structure Chaining

Extends the structures

  - VkQueryPoolCreateInfo

  - VkVideoProfileInfoKHR

#### 49.21.7. H.264 Encode Capabilities

When calling vkGetPhysicalDeviceVideoCapabilitiesKHR to query the capabilities for an H.264 encode profile, the VkVideoCapabilitiesKHR::`pNext` chain must include a `VkVideoEncodeH264CapabilitiesKHR` structure that will be filled with the profile-specific capabilities.

The `VkVideoEncodeH264CapabilitiesKHR` structure is defined as:

    // Provided by VK_KHR_video_encode_h264
    typedef struct VkVideoEncodeH264CapabilitiesKHR {
        VkStructureType                        sType;
        void*                                  pNext;
        VkVideoEncodeH264CapabilityFlagsKHR    flags;
        StdVideoH264LevelIdc                   maxLevelIdc;
        uint32_t                               maxSliceCount;
        uint32_t                               maxPPictureL0ReferenceCount;
        uint32_t                               maxBPictureL0ReferenceCount;
        uint32_t                               maxL1ReferenceCount;
        uint32_t                               maxTemporalLayerCount;
        VkBool32                               expectDyadicTemporalLayerPattern;
        int32_t                                minQp;
        int32_t                                maxQp;
        VkBool32                               prefersGopRemainingFrames;
        VkBool32                               requiresGopRemainingFrames;
        VkVideoEncodeH264StdFlagsKHR           stdSyntaxFlags;
    } VkVideoEncodeH264CapabilitiesKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask of VkVideoEncodeH264CapabilityFlagBitsKHR indicating supported H.264 encoding capabilities.

- `maxLevelIdc` is a `StdVideoH264LevelIdc` value indicating the maximum H.264 level supported by the profile, where enum constant `STD_VIDEO_H264_LEVEL_IDC_<major>_<minor>` identifies H.264 level `<major>.<minor>` as defined in section A.3 of the ITU-T H.264 Specification.

- `maxSliceCount` indicates the maximum number of slices that can be encoded for a single picture. Further restrictions may apply to the number of slices that can be encoded for a single picture depending on other capabilities and codec-specific rules.

- `maxPPictureL0ReferenceCount` indicates the maximum number of reference pictures the implementation supports in the reference list L0 for P pictures.

  Note | As implementations may override the reference lists, `maxPPictureL0ReferenceCount` does not limit the number of elements that the application can specify in the L0 reference list for P pictures. However, if `maxPPictureL0ReferenceCount` is zero, then the use of P pictures is not allowed.

- `maxBPictureL0ReferenceCount` indicates the maximum number of reference pictures the implementation supports in the reference list L0 for B pictures.

- `maxL1ReferenceCount` indicates the maximum number of reference pictures the implementation supports in the reference list L1 if encoding of B pictures is supported.

  Note | As implementations may override the reference lists, `maxBPictureL0ReferenceCount` and `maxL1ReferenceCount` does not limit the number of elements that the application can specify in the L0 and L1 reference lists for B pictures. However, if `maxBPictureL0ReferenceCount` and `maxL1ReferenceCount` are both zero, then the use of B pictures is not allowed.

- `maxTemporalLayerCount` indicates the maximum number of H.264 temporal layers supported by the implementation.

- `expectDyadicTemporalLayerPattern` indicates that the implementation’s rate control algorithms expect the application to use a dyadic temporal layer pattern when encoding multiple temporal layers.

- `minQp` indicates the minimum QP value supported.

- `maxQp` indicates the maximum QP value supported.

- `prefersGopRemainingFrames` indicates that the implementation’s rate control algorithm prefers the application to specify the number of frames of each type remaining in the current group of pictures when beginning a video coding scope.

- `requiresGopRemainingFrames` indicates that the implementation’s rate control algorithm requires the application to specify the number of frames of each type remaining in the current group of pictures when beginning a video coding scope.

- `stdSyntaxFlags` is a bitmask of VkVideoEncodeH264StdFlagBitsKHR indicating capabilities related to H.264 syntax elements.

Valid Usage (Implicit)

- VUID-VkVideoEncodeH264CapabilitiesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_CAPABILITIES_KHR

Structure Chaining

Extends the structure

  - VkVideoCapabilitiesKHR

Bits which may be set in VkVideoEncodeH264CapabilitiesKHR::`flags`, indicating the H.264 encoding capabilities supported, are:

    // Provided by VK_KHR_video_encode_h264
    typedef enum VkVideoEncodeH264CapabilityFlagBitsKHR {
        VK_VIDEO_ENCODE_H264_CAPABILITY_HRD_COMPLIANCE_BIT_KHR = 0x00000001,
        VK_VIDEO_ENCODE_H264_CAPABILITY_PREDICTION_WEIGHT_TABLE_GENERATED_BIT_KHR = 0x00000002,
        VK_VIDEO_ENCODE_H264_CAPABILITY_ROW_UNALIGNED_SLICE_BIT_KHR = 0x00000004,
        VK_VIDEO_ENCODE_H264_CAPABILITY_DIFFERENT_SLICE_TYPE_BIT_KHR = 0x00000008,
        VK_VIDEO_ENCODE_H264_CAPABILITY_B_FRAME_IN_L0_LIST_BIT_KHR = 0x00000010,
        VK_VIDEO_ENCODE_H264_CAPABILITY_B_FRAME_IN_L1_LIST_BIT_KHR = 0x00000020,
        VK_VIDEO_ENCODE_H264_CAPABILITY_PER_PICTURE_TYPE_MIN_MAX_QP_BIT_KHR = 0x00000040,
        VK_VIDEO_ENCODE_H264_CAPABILITY_PER_SLICE_CONSTANT_QP_BIT_KHR = 0x00000080,
        VK_VIDEO_ENCODE_H264_CAPABILITY_GENERATE_PREFIX_NALU_BIT_KHR = 0x00000100,
      // Provided by VK_KHR_video_encode_h264 with VK_KHR_video_encode_intra_refresh
        VK_VIDEO_ENCODE_H264_CAPABILITY_B_PICTURE_INTRA_REFRESH_BIT_KHR = 0x00000400,
      // Provided by VK_KHR_video_encode_h264 with VK_KHR_video_encode_quantization_map
        VK_VIDEO_ENCODE_H264_CAPABILITY_MB_QP_DIFF_WRAPAROUND_BIT_KHR = 0x00000200,
    } VkVideoEncodeH264CapabilityFlagBitsKHR;

- VK_VIDEO_ENCODE_H264_CAPABILITY_HRD_COMPLIANCE_BIT_KHR specifies whether the implementation may be able to generate HRD compliant bitstreams if any of the `nal_hrd_parameters_present_flag` or `vcl_hrd_parameters_present_flag` members of `StdVideoH264SpsVuiFlags` are set to `1` in the active SPS.

- VK_VIDEO_ENCODE_H264_CAPABILITY_PREDICTION_WEIGHT_TABLE_GENERATED_BIT_KHR specifies that if `StdVideoH264PpsFlags`::`weighted_pred_flag` is set to `1` or `StdVideoH264PictureParameterSet`::`weighted_bipred_idc` is set to `STD_VIDEO_H264_WEIGHTED_BIPRED_IDC_EXPLICIT` in the active PPS when encoding a P picture or B picture, respectively, then the implementation is able to internally decide syntax for `pred_weight_table`, as defined in section 7.4.3.2 of the ITU-T H.264 Specification, and the application is not required to provide a weight table in the H.264 slice header parameters.

- VK_VIDEO_ENCODE_H264_CAPABILITY_ROW_UNALIGNED_SLICE_BIT_KHR specifies that each slice in a frame with multiple slices may begin or finish at any offset in a macroblock row. If not supported, all slices in the frame must begin at the start of a macroblock row (and hence each slice must finish at the end of a macroblock row). When a picture is encoded with intra refresh, encoding non-rectangular slices also requires: support for the VkVideoEncodeIntraRefreshCapabilitiesKHR::`nonRectangularIntraRefreshRegions` capability.

- VK_VIDEO_ENCODE_H264_CAPABILITY_DIFFERENT_SLICE_TYPE_BIT_KHR specifies that when a frame is encoded with multiple slices, the implementation allows encoding each slice with a different `StdVideoEncodeH264SliceHeader`::`slice_type` specified in the H.264 slice header parameters. If not supported, all slices of the frame must be encoded with the same `slice_type` which corresponds to the picture type of the frame. There is one exception to this rule: if the picture is encoded with the intra refresh mode VK_VIDEO_ENCODE_INTRA_REFRESH_MODE_PER_PICTURE_PARTITION_BIT_KHR, then the currently refreshed slice must specify the `slice_type` `STD_VIDEO_H264_SLICE_TYPE_I` and can differ from the `slice_type` of the other slices regardless of whether VK_VIDEO_ENCODE_H264_CAPABILITY_DIFFERENT_SLICE_TYPE_BIT_KHR is supported.

- VK_VIDEO_ENCODE_H264_CAPABILITY_B_FRAME_IN_L0_LIST_BIT_KHR specifies support for using a B frame as L0 reference, as specified in `StdVideoEncodeH264ReferenceListsInfo`::`RefPicList0` in the H.264 picture information.

- VK_VIDEO_ENCODE_H264_CAPABILITY_B_FRAME_IN_L1_LIST_BIT_KHR specifies support for using a B frame as L1 reference, as specified in `StdVideoEncodeH264ReferenceListsInfo`::`RefPicList1` in the H.264 picture information.

- VK_VIDEO_ENCODE_H264_CAPABILITY_PER_PICTURE_TYPE_MIN_MAX_QP_BIT_KHR specifies support for specifying different QP values in the members of VkVideoEncodeH264QpKHR.

- VK_VIDEO_ENCODE_H264_CAPABILITY_PER_SLICE_CONSTANT_QP_BIT_KHR specifies support for specifying different constant QP values for each slice.

- VK_VIDEO_ENCODE_H264_CAPABILITY_GENERATE_PREFIX_NALU_BIT_KHR specifies support for generating prefix NAL units by setting VkVideoEncodeH264PictureInfoKHR::`generatePrefixNalu` to VK_TRUE.

- VK_VIDEO_ENCODE_H264_CAPABILITY_MB_QP_DIFF_WRAPAROUND_BIT_KHR specifies support for wraparound during the calculation of the QP values of subsequently encoded macroblocks, as defined in equation 7-37 of the ITU-T H.264 Specification. If not supported, equation 7-37 of the ITU-T H.264 Specification is effectively reduced to the following:

  QPY = QPY,PREV + `mb_qp_delta`

  Note | The effect of this is that the maximum QP difference across subsequent macroblocks is limited to the [-(26 + QpBdOffsetY / 2), 25 + QpBdOffsetY / 2] range.

- VK_VIDEO_ENCODE_H264_CAPABILITY_B_PICTURE_INTRA_REFRESH_BIT_KHR specifies support for encoding B pictures with intra refresh enabled.

    // Provided by VK_KHR_video_encode_h264
    typedef VkFlags VkVideoEncodeH264CapabilityFlagsKHR;

`VkVideoEncodeH264CapabilityFlagsKHR` is a bitmask type for setting a mask of zero or more VkVideoEncodeH264CapabilityFlagBitsKHR.

Bits which may be set in VkVideoEncodeH264CapabilitiesKHR::`stdSyntaxFlags`, indicating the capabilities related to the H.264 syntax elements, are:

    // Provided by VK_KHR_video_encode_h264
    typedef enum VkVideoEncodeH264StdFlagBitsKHR {
        VK_VIDEO_ENCODE_H264_STD_SEPARATE_COLOR_PLANE_FLAG_SET_BIT_KHR = 0x00000001,
        VK_VIDEO_ENCODE_H264_STD_QPPRIME_Y_ZERO_TRANSFORM_BYPASS_FLAG_SET_BIT_KHR = 0x00000002,
        VK_VIDEO_ENCODE_H264_STD_SCALING_MATRIX_PRESENT_FLAG_SET_BIT_KHR = 0x00000004,
        VK_VIDEO_ENCODE_H264_STD_CHROMA_QP_INDEX_OFFSET_BIT_KHR = 0x00000008,
        VK_VIDEO_ENCODE_H264_STD_SECOND_CHROMA_QP_INDEX_OFFSET_BIT_KHR = 0x00000010,
        VK_VIDEO_ENCODE_H264_STD_PIC_INIT_QP_MINUS26_BIT_KHR = 0x00000020,
        VK_VIDEO_ENCODE_H264_STD_WEIGHTED_PRED_FLAG_SET_BIT_KHR = 0x00000040,
        VK_VIDEO_ENCODE_H264_STD_WEIGHTED_BIPRED_IDC_EXPLICIT_BIT_KHR = 0x00000080,
        VK_VIDEO_ENCODE_H264_STD_WEIGHTED_BIPRED_IDC_IMPLICIT_BIT_KHR = 0x00000100,
        VK_VIDEO_ENCODE_H264_STD_TRANSFORM_8X8_MODE_FLAG_SET_BIT_KHR = 0x00000200,
        VK_VIDEO_ENCODE_H264_STD_DIRECT_SPATIAL_MV_PRED_FLAG_UNSET_BIT_KHR = 0x00000400,
        VK_VIDEO_ENCODE_H264_STD_ENTROPY_CODING_MODE_FLAG_UNSET_BIT_KHR = 0x00000800,
        VK_VIDEO_ENCODE_H264_STD_ENTROPY_CODING_MODE_FLAG_SET_BIT_KHR = 0x00001000,
        VK_VIDEO_ENCODE_H264_STD_DIRECT_8X8_INFERENCE_FLAG_UNSET_BIT_KHR = 0x00002000,
        VK_VIDEO_ENCODE_H264_STD_CONSTRAINED_INTRA_PRED_FLAG_SET_BIT_KHR = 0x00004000,
        VK_VIDEO_ENCODE_H264_STD_DEBLOCKING_FILTER_DISABLED_BIT_KHR = 0x00008000,
        VK_VIDEO_ENCODE_H264_STD_DEBLOCKING_FILTER_ENABLED_BIT_KHR = 0x00010000,
        VK_VIDEO_ENCODE_H264_STD_DEBLOCKING_FILTER_PARTIAL_BIT_KHR = 0x00020000,
        VK_VIDEO_ENCODE_H264_STD_SLICE_QP_DELTA_BIT_KHR = 0x00080000,
        VK_VIDEO_ENCODE_H264_STD_DIFFERENT_SLICE_QP_DELTA_BIT_KHR = 0x00100000,
    } VkVideoEncodeH264StdFlagBitsKHR;

- VK_VIDEO_ENCODE_H264_STD_SEPARATE_COLOR_PLANE_FLAG_SET_BIT_KHR specifies whether the implementation supports using the application-provided value for `StdVideoH264SpsFlags`::`separate_colour_plane_flag` in the SPS when that value is `1`.

- VK_VIDEO_ENCODE_H264_STD_QPPRIME_Y_ZERO_TRANSFORM_BYPASS_FLAG_SET_BIT_KHR specifies whether the implementation supports using the application-provided value for `StdVideoH264SpsFlags`::`qpprime_y_zero_transform_bypass_flag` in the SPS when that value is `1`.

- VK_VIDEO_ENCODE_H264_STD_SCALING_MATRIX_PRESENT_FLAG_SET_BIT_KHR specifies whether the implementation supports using the application-provided values for `StdVideoH264SpsFlags`::`seq_scaling_matrix_present_flag` in the SPS and `StdVideoH264PpsFlags`::`pic_scaling_matrix_present_flag` in the PPS when any of those values are `1`.

- VK_VIDEO_ENCODE_H264_STD_CHROMA_QP_INDEX_OFFSET_BIT_KHR specifies whether the implementation supports using the application-provided value for `StdVideoH264PictureParameterSet`::`chroma_qp_index_offset` in the PPS when that value is non-zero.

- VK_VIDEO_ENCODE_H264_STD_SECOND_CHROMA_QP_INDEX_OFFSET_BIT_KHR specifies whether the implementation supports using the application-provided value for `StdVideoH264PictureParameterSet`::`second_chroma_qp_index_offset` in the PPS when that value is non-zero.

- VK_VIDEO_ENCODE_H264_STD_PIC_INIT_QP_MINUS26_BIT_KHR specifies whether the implementation supports using the application-provided value for `StdVideoH264PictureParameterSet`::`pic_init_qp_minus26` in the PPS when that value is non-zero.

- VK_VIDEO_ENCODE_H264_STD_WEIGHTED_PRED_FLAG_SET_BIT_KHR specifies whether the implementation supports using the application-provided value for `StdVideoH264PpsFlags`::`weighted_pred_flag` in the PPS when that value is `1`.

- VK_VIDEO_ENCODE_H264_STD_WEIGHTED_BIPRED_IDC_EXPLICIT_BIT_KHR specifies whether the implementation supports using the application-provided value for `StdVideoH264PictureParameterSet`::`weighted_bipred_idc` in the PPS when that value is `STD_VIDEO_H264_WEIGHTED_BIPRED_IDC_EXPLICIT`.

- VK_VIDEO_ENCODE_H264_STD_WEIGHTED_BIPRED_IDC_IMPLICIT_BIT_KHR specifies whether the implementation supports using the application-provided value for `StdVideoH264PictureParameterSet`::`weighted_bipred_idc` in the PPS when that value is `STD_VIDEO_H264_WEIGHTED_BIPRED_IDC_IMPLICIT`.

- VK_VIDEO_ENCODE_H264_STD_TRANSFORM_8X8_MODE_FLAG_SET_BIT_KHR specifies whether the implementation supports using the application-provided value for `StdVideoH264PpsFlags`::`transform_8x8_mode_flag` in the PPS when that value is `1`.

- VK_VIDEO_ENCODE_H264_STD_DIRECT_SPATIAL_MV_PRED_FLAG_UNSET_BIT_KHR specifies whether the implementation supports using the application-provided value for `StdVideoEncodeH264SliceHeaderFlags`::`direct_spatial_mv_pred_flag` in the H.264 slice header parameters when that value is `0`.

- VK_VIDEO_ENCODE_H264_STD_ENTROPY_CODING_MODE_FLAG_UNSET_BIT_KHR specifies whether the implementation supports CAVLC entropy coding, as defined in section 9.2 of the ITU-T H.264 Specification, and thus supports using the application-provided value for `StdVideoH264PpsFlags`::`entropy_coding_mode_flag` in the PPS when that value is `0`.

- VK_VIDEO_ENCODE_H264_STD_ENTROPY_CODING_MODE_FLAG_SET_BIT_KHR specifies whether the implementation supports CABAC entropy coding, as defined in section 9.3 of the ITU-T H.264 Specification, and thus supports using the application-provided value for `StdVideoH264PpsFlags`::`entropy_coding_mode_flag` in the PPS when that value is `1`.

- VK_VIDEO_ENCODE_H264_STD_DIRECT_8X8_INFERENCE_FLAG_UNSET_BIT_KHR specifies whether the implementation supports using the application-provided value for `StdVideoH264SpsFlags`::`direct_8x8_inference_flag` in the SPS when that value is `0`.

- VK_VIDEO_ENCODE_H264_STD_CONSTRAINED_INTRA_PRED_FLAG_SET_BIT_KHR specifies whether the implementation supports using the application-provided value for `StdVideoH264PpsFlags`::`constrained_intra_pred_flag` in the PPS when that value is `1`.

- VK_VIDEO_ENCODE_H264_STD_DEBLOCKING_FILTER_DISABLED_BIT_KHR specifies whether the implementation supports using the application-provided value for `StdVideoEncodeH264SliceHeader`::`disable_deblocking_filter_idc` in the H.264 slice header parameters when that value is `STD_VIDEO_H264_DISABLE_DEBLOCKING_FILTER_IDC_DISABLED`.

- VK_VIDEO_ENCODE_H264_STD_DEBLOCKING_FILTER_ENABLED_BIT_KHR specifies whether the implementation supports using the application-provided value for `StdVideoEncodeH264SliceHeader`::`disable_deblocking_filter_idc` in the H.264 slice header parameters when that value is `STD_VIDEO_H264_DISABLE_DEBLOCKING_FILTER_IDC_ENABLED`.

- VK_VIDEO_ENCODE_H264_STD_DEBLOCKING_FILTER_PARTIAL_BIT_KHR specifies whether the implementation supports using the application-provided value for `StdVideoEncodeH264SliceHeader`::`disable_deblocking_filter_idc` in the H.264 slice header parameters when that value is `STD_VIDEO_H264_DISABLE_DEBLOCKING_FILTER_IDC_PARTIAL`.

- VK_VIDEO_ENCODE_H264_STD_SLICE_QP_DELTA_BIT_KHR specifies whether the implementation supports using the application-provided value for `StdVideoEncodeH264SliceHeader`::`slice_qp_delta` in the H.264 slice header parameters when that value is identical across the slices of the encoded frame.

- VK_VIDEO_ENCODE_H264_STD_DIFFERENT_SLICE_QP_DELTA_BIT_KHR specifies whether the implementation supports using the application-provided value for `StdVideoEncodeH264SliceHeader`::`slice_qp_delta` in the H.264 slice header parameters when that value is different across the slices of the encoded frame.

These capability flags provide information to the application about specific H.264 syntax element values that the implementation supports without having to override them and do not otherwise restrict the values that the application can specify for any of the mentioned H.264 syntax elements.

    // Provided by VK_KHR_video_encode_h264
    typedef VkFlags VkVideoEncodeH264StdFlagsKHR;

`VkVideoEncodeH264StdFlagsKHR` is a bitmask type for setting a mask of zero or more VkVideoEncodeH264StdFlagBitsKHR.

#### 49.21.8. H.264 Encode Quality Level Properties

When calling vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR with `pVideoProfile->videoCodecOperation` specified as VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR, the VkVideoEncodeH264QualityLevelPropertiesKHR structure must be included in the `pNext` chain of the VkVideoEncodeQualityLevelPropertiesKHR structure to retrieve additional video encode quality level properties specific to H.264 encoding.

The VkVideoEncodeH264QualityLevelPropertiesKHR structure is defined as:

    // Provided by VK_KHR_video_encode_h264
    typedef struct VkVideoEncodeH264QualityLevelPropertiesKHR {
        VkStructureType                         sType;
        void*                                   pNext;
        VkVideoEncodeH264RateControlFlagsKHR    preferredRateControlFlags;
        uint32_t                                preferredGopFrameCount;
        uint32_t                                preferredIdrPeriod;
        uint32_t                                preferredConsecutiveBFrameCount;
        uint32_t                                preferredTemporalLayerCount;
        VkVideoEncodeH264QpKHR                  preferredConstantQp;
        uint32_t                                preferredMaxL0ReferenceCount;
        uint32_t                                preferredMaxL1ReferenceCount;
        VkBool32                                preferredStdEntropyCodingModeFlag;
    } VkVideoEncodeH264QualityLevelPropertiesKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `preferredRateControlFlags` is a bitmask of VkVideoEncodeH264RateControlFlagBitsKHR values indicating the preferred flags to use for VkVideoEncodeH264RateControlInfoKHR::`flags`.

- `preferredGopFrameCount` indicates the preferred value to use for VkVideoEncodeH264RateControlInfoKHR::`gopFrameCount`.

- `preferredIdrPeriod` indicates the preferred value to use for VkVideoEncodeH264RateControlInfoKHR::`idrPeriod`.

- `preferredConsecutiveBFrameCount` indicates the preferred value to use for VkVideoEncodeH264RateControlInfoKHR::`consecutiveBFrameCount`.

- `preferredTemporalLayerCount` indicates the preferred value to use for VkVideoEncodeH264RateControlInfoKHR::`temporalLayerCount`.

- `preferredConstantQp` indicates the preferred values to use for VkVideoEncodeH264NaluSliceInfoKHR::`constantQp` for each picture type when using rate control mode VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR.

- `preferredMaxL0ReferenceCount` indicates the preferred maximum number of reference pictures to use in the reference list L0.

- `preferredMaxL1ReferenceCount` indicates the preferred maximum number of reference pictures to use in the reference list L1.

- `preferredStdEntropyCodingModeFlag` indicates the preferred value to use for `entropy_coding_mode_flag` in `StdVideoH264PpsFlags`.

Valid Usage (Implicit)

- VUID-VkVideoEncodeH264QualityLevelPropertiesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_QUALITY_LEVEL_PROPERTIES_KHR

Structure Chaining

Extends the structure

  - VkVideoEncodeQualityLevelPropertiesKHR

#### 49.21.9. H.264 Encode Session

Additional parameters can be specified when creating a video session with an H.264 encode profile by including an instance of the VkVideoEncodeH264SessionCreateInfoKHR structure in the `pNext` chain of VkVideoSessionCreateInfoKHR.

The `VkVideoEncodeH264SessionCreateInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_encode_h264
    typedef struct VkVideoEncodeH264SessionCreateInfoKHR {
        VkStructureType         sType;
        const void*             pNext;
        VkBool32                useMaxLevelIdc;
        StdVideoH264LevelIdc    maxLevelIdc;
    } VkVideoEncodeH264SessionCreateInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `useMaxLevelIdc` indicates whether the value of `maxLevelIdc` should be used by the implementation. When it is VK_FALSE, the implementation ignores the value of `maxLevelIdc` and uses the value of VkVideoEncodeH264CapabilitiesKHR::`maxLevelIdc`, as reported by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile.

- `maxLevelIdc` is a `StdVideoH264LevelIdc` value specifying the upper bound on the H.264 level for the video bitstreams produced by the created video session, where enum constant `STD_VIDEO_H264_LEVEL_IDC_<major>_<minor>` identifies H.264 level `<major>.<minor>` as defined in section A.3 of the ITU-T H.264 Specification.

Valid Usage (Implicit)

- VUID-VkVideoEncodeH264SessionCreateInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_CREATE_INFO_KHR

Structure Chaining

Extends the structure

  - VkVideoSessionCreateInfoKHR

#### 49.21.10. H.264 Encode Parameter Sets

Video session parameters objects created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR can contain the following types of parameters:

H.264 Sequence Parameter Sets (SPS)

  Represented by `StdVideoH264SequenceParameterSet` structures and interpreted as follows:

  - `reserved1` and `reserved2` are used only for padding purposes and are otherwise ignored;

  - `seq_parameter_set_id` is used as the key of the SPS entry;

  - `level_idc` is one of the enum constants `STD_VIDEO_H264_LEVEL_IDC_<major>_<minor>` identifying the H.264 level `<major>.<minor>` as defined in section A.3 of the ITU-T H.264 Specification;

  - `pOffsetForRefFrame` is a pointer to an array of `num_ref_frames_in_pic_order_cnt_cycle` number of signed integers specifying the elements of the `offset_for_ref_frame` array, as defined in section 7.4.2.1.1 of the ITU-T H.264 Specification;

  - if `flags.seq_scaling_matrix_present_flag` is set, then the `StdVideoH264ScalingLists` structure pointed to by `pScalingLists` is interpreted as follows:

    - `scaling_list_present_mask` is a bitmask where bit index i corresponds to `seq_scaling_list_present_flag[i]` as defined in section 7.4.2.1 of the ITU-T H.264 Specification;

    - `use_default_scaling_matrix_mask` is a bitmask where bit index i corresponds to `UseDefaultScalingMatrix4x4Flag[i]`, when i < 6, or corresponds to `UseDefaultScalingMatrix8x8Flag[i-6]`, otherwise, as defined in section 7.3.2.1 of the ITU-T H.264 Specification;

    - `ScalingList4x4` and `ScalingList8x8` correspond to the identically named syntax elements defined in section 7.3.2.1 of the ITU-T H.264 Specification;

  - if `flags.vui_parameters_present_flag` is set, then `pSequenceParameterSetVui` is a pointer to a `StdVideoH264SequenceParameterSetVui` structure that is interpreted as follows:

    - `reserved1` is used only for padding purposes and is otherwise ignored;

    - `flags.color_description_present_flag` is interpreted as the value of `colour_description_present_flag`, as defined in section E.2.1 of the ITU-T H.264 Specification;

      Note | The name of `colour_description_present_flag` was misspelled in the Video Std header.

    - if `flags.nal_hrd_parameters_present_flag` or `flags.vcl_hrd_parameters_present_flag` is set, then the `StdVideoH264HrdParameters` structure pointed to by `pHrdParameters` is interpreted as follows:

      - `reserved1` is used only for padding purposes and is otherwise ignored;

      - all other members of `StdVideoH264HrdParameters` are interpreted as defined in section E.2.2 of the ITU-T H.264 Specification;

    - all other members of `StdVideoH264SequenceParameterSetVui` are interpreted as defined in section E.2.1 of the ITU-T H.264 Specification;

  - all other members of `StdVideoH264SequenceParameterSet` are interpreted as defined in section 7.4.2.1 of the ITU-T H.264 Specification.

H.264 Picture Parameter Sets (PPS)

  Represented by `StdVideoH264PictureParameterSet` structures and interpreted as follows:

  - the pair constructed from `seq_parameter_set_id` and `pic_parameter_set_id` is used as the key of the PPS entry;

  - if `flags.pic_scaling_matrix_present_flag` is set, then the `StdVideoH264ScalingLists` structure pointed to by `pScalingLists` is interpreted as follows:

    - `scaling_list_present_mask` is a bitmask where bit index i corresponds to `pic_scaling_list_present_flag[i]` as defined in section 7.4.2.2 of the ITU-T H.264 Specification;

    - `use_default_scaling_matrix_mask` is a bitmask where bit index i corresponds to `UseDefaultScalingMatrix4x4Flag[i]`, when i < 6, or corresponds to `UseDefaultScalingMatrix8x8Flag[i-6]`, otherwise, as defined in section 7.3.2.2 of the ITU-T H.264 Specification;

    - `ScalingList4x4` and `ScalingList8x8` correspond to the identically named syntax elements defined in section 7.3.2.2 of the ITU-T H.264 Specification;

  - all other members of `StdVideoH264PictureParameterSet` are interpreted as defined in section 7.4.2.2 of the ITU-T H.264 Specification.

Implementations may override any of these parameters according to the semantics defined in the Video Encode Parameter Overrides section before storing the resulting H.264 parameter sets into the video session parameters object. Applications need to use the vkGetEncodedVideoSessionParametersKHR command to determine whether any implementation overrides happened and to retrieve the encoded H.264 parameter sets in order to be able to produce a compliant H.264 video bitstream.

Such H.264 parameter set overrides may also have cascading effects on the implementation overrides applied to the encoded bitstream produced by video encode operations. If the implementation supports the VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_HAS_OVERRIDES_BIT_KHR video encode feedback query flag, then the application can use such queries to retrieve feedback about whether any implementation overrides have been applied to the encoded bitstream.

When a video session parameters object is created with the codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR, the VkVideoSessionParametersCreateInfoKHR::`pNext` chain must include a `VkVideoEncodeH264SessionParametersCreateInfoKHR` structure specifying the capacity and initial contents of the object.

The `VkVideoEncodeH264SessionParametersCreateInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_encode_h264
    typedef struct VkVideoEncodeH264SessionParametersCreateInfoKHR {
        VkStructureType                                        sType;
        const void*                                            pNext;
        uint32_t                                               maxStdSPSCount;
        uint32_t                                               maxStdPPSCount;
        const VkVideoEncodeH264SessionParametersAddInfoKHR*    pParametersAddInfo;
    } VkVideoEncodeH264SessionParametersCreateInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `maxStdSPSCount` is the maximum number of H.264 SPS entries the created `VkVideoSessionParametersKHR` can contain.

- `maxStdPPSCount` is the maximum number of H.264 PPS entries the created `VkVideoSessionParametersKHR` can contain.

- `pParametersAddInfo` is `NULL` or a pointer to a VkVideoEncodeH264SessionParametersAddInfoKHR structure specifying H.264 parameters to add upon object creation.

Valid Usage (Implicit)

- VUID-VkVideoEncodeH264SessionParametersCreateInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_PARAMETERS_CREATE_INFO_KHR

- VUID-VkVideoEncodeH264SessionParametersCreateInfoKHR-pParametersAddInfo-parameter
  If `pParametersAddInfo` is not `NULL`, `pParametersAddInfo` must be a valid pointer to a valid VkVideoEncodeH264SessionParametersAddInfoKHR structure

Structure Chaining

Extends the structure

  - VkVideoSessionParametersCreateInfoKHR

The `VkVideoEncodeH264SessionParametersAddInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_encode_h264
    typedef struct VkVideoEncodeH264SessionParametersAddInfoKHR {
        VkStructureType                            sType;
        const void*                                pNext;
        uint32_t                                   stdSPSCount;
        const StdVideoH264SequenceParameterSet*    pStdSPSs;
        uint32_t                                   stdPPSCount;
        const StdVideoH264PictureParameterSet*     pStdPPSs;
    } VkVideoEncodeH264SessionParametersAddInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `stdSPSCount` is the number of elements in the `pStdSPSs` array.

- `pStdSPSs` is a pointer to an array of `StdVideoH264SequenceParameterSet` structures describing the H.264 SPS entries to add.

- `stdPPSCount` is the number of elements in the `pStdPPSs` array.

- `pStdPPSs` is a pointer to an array of `StdVideoH264PictureParameterSet` structures describing the H.264 PPS entries to add.

This structure can be specified in the following places:

- In the `pParametersAddInfo` member of the VkVideoEncodeH264SessionParametersCreateInfoKHR structure specified in the `pNext` chain of VkVideoSessionParametersCreateInfoKHR used to create a video session parameters object. In this case, if the video codec operation the video session parameters object is created with is VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR, then it defines the set of initial parameters to add to the created object (see Creating Video Session Parameters).

- In the `pNext` chain of VkVideoSessionParametersUpdateInfoKHR. In this case, if the video codec operation the video session parameters object to be updated was created with is VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR, then it defines the set of parameters to add to it (see Updating Video Session Parameters).

Valid Usage

- VUID-VkVideoEncodeH264SessionParametersAddInfoKHR-None-04837
  The `seq_parameter_set_id` member of each `StdVideoH264SequenceParameterSet` structure specified in the elements of `pStdSPSs` must be unique within `pStdSPSs`

- VUID-VkVideoEncodeH264SessionParametersAddInfoKHR-None-04838
  The pair constructed from the `seq_parameter_set_id` and `pic_parameter_set_id` members of each `StdVideoH264PictureParameterSet` structure specified in the elements of `pStdPPSs` must be unique within `pStdPPSs`

Valid Usage (Implicit)

- VUID-VkVideoEncodeH264SessionParametersAddInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_PARAMETERS_ADD_INFO_KHR

- VUID-VkVideoEncodeH264SessionParametersAddInfoKHR-pStdSPSs-parameter
  If `stdSPSCount` is not `0`, and `pStdSPSs` is not `NULL`, `pStdSPSs` must be a valid pointer to an array of `stdSPSCount` `StdVideoH264SequenceParameterSet` values

- VUID-VkVideoEncodeH264SessionParametersAddInfoKHR-pStdPPSs-parameter
  If `stdPPSCount` is not `0`, and `pStdPPSs` is not `NULL`, `pStdPPSs` must be a valid pointer to an array of `stdPPSCount` `StdVideoH264PictureParameterSet` values

Structure Chaining

Extends the structure

  - VkVideoSessionParametersUpdateInfoKHR

The `VkVideoEncodeH264SessionParametersGetInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_encode_h264
    typedef struct VkVideoEncodeH264SessionParametersGetInfoKHR {
        VkStructureType    sType;
        const void*        pNext;
        VkBool32           writeStdSPS;
        VkBool32           writeStdPPS;
        uint32_t           stdSPSId;
        uint32_t           stdPPSId;
    } VkVideoEncodeH264SessionParametersGetInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `writeStdSPS` indicates whether the encoded H.264 sequence parameter set identified by `stdSPSId` is requested to be retrieved.

- `writeStdPPS` indicates whether the encoded H.264 picture parameter set identified by the pair constructed from `stdSPSId` and `stdPPSId` is requested to be retrieved.

- `stdSPSId` specifies the H.264 sequence parameter set ID used to identify the retrieved H.264 sequence and/or picture parameter set(s).

- `stdPPSId` specifies the H.264 picture parameter set ID used to identify the retrieved H.264 picture parameter set when `writeStdPPS` is VK_TRUE.

When this structure is specified in the `pNext` chain of the VkVideoEncodeSessionParametersGetInfoKHR structure passed to vkGetEncodedVideoSessionParametersKHR, the command will write encoded parameter data to the output buffer in the following order:

1. The H.264 sequence parameter set identified by `stdSPSId`, if `writeStdSPS` is VK_TRUE.

2. The H.264 picture parameter set identified by the pair constructed from `stdSPSId` and `stdPPSId`, if `writeStdPPS` is VK_TRUE.

Valid Usage

- VUID-VkVideoEncodeH264SessionParametersGetInfoKHR-writeStdSPS-08279
  At least one of `writeStdSPS` and `writeStdPPS` must be VK_TRUE

Valid Usage (Implicit)

- VUID-VkVideoEncodeH264SessionParametersGetInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_PARAMETERS_GET_INFO_KHR

Structure Chaining

Extends the structure

  - VkVideoEncodeSessionParametersGetInfoKHR

The `VkVideoEncodeH264SessionParametersFeedbackInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_encode_h264
    typedef struct VkVideoEncodeH264SessionParametersFeedbackInfoKHR {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           hasStdSPSOverrides;
        VkBool32           hasStdPPSOverrides;
    } VkVideoEncodeH264SessionParametersFeedbackInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `hasStdSPSOverrides` indicates whether any of the parameters of the requested H.264 sequence parameter set, if one was requested via VkVideoEncodeH264SessionParametersGetInfoKHR::`writeStdSPS`, were overridden by the implementation.

- `hasStdPPSOverrides` indicates whether any of the parameters of the requested H.264 picture parameter set, if one was requested via VkVideoEncodeH264SessionParametersGetInfoKHR::`writeStdPPS`, were overridden by the implementation.

Valid Usage (Implicit)

- VUID-VkVideoEncodeH264SessionParametersFeedbackInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_PARAMETERS_FEEDBACK_INFO_KHR

Structure Chaining

Extends the structure

  - VkVideoEncodeSessionParametersFeedbackInfoKHR

#### 49.21.11. H.264 Encoding Parameters

The VkVideoEncodeH264PictureInfoKHR structure is defined as:

    // Provided by VK_KHR_video_encode_h264
    typedef struct VkVideoEncodeH264PictureInfoKHR {
        VkStructureType                             sType;
        const void*                                 pNext;
        uint32_t                                    naluSliceEntryCount;
        const VkVideoEncodeH264NaluSliceInfoKHR*    pNaluSliceEntries;
        const StdVideoEncodeH264PictureInfo*        pStdPictureInfo;
        VkBool32                                    generatePrefixNalu;
    } VkVideoEncodeH264PictureInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `naluSliceEntryCount` is the number of elements in `pNaluSliceEntries`.

- `pNaluSliceEntries` is a pointer to an array of `naluSliceEntryCount` VkVideoEncodeH264NaluSliceInfoKHR structures specifying the parameters of the individual H.264 slices to encode for the input picture.

- `pStdPictureInfo` is a pointer to a `StdVideoEncodeH264PictureInfo` structure specifying H.264 picture information.

- `generatePrefixNalu` controls whether prefix NALUs are generated before slice NALUs into the target bitstream, as defined in sections 7.3.2.12 and 7.4.2.12 of the ITU-T H.264 Specification.

This structure is specified in the `pNext` chain of the VkVideoEncodeInfoKHR structure passed to vkCmdEncodeVideoKHR to specify the codec-specific picture information for an H.264 encode operation.

Encode Input Picture Information

  When this structure is specified in the `pNext` chain of the VkVideoEncodeInfoKHR structure passed to vkCmdEncodeVideoKHR, the information related to the encode input picture is defined as follows:

  - The image subregion used is determined according to the H.264 Encode Picture Data Access section.

  - The encode input picture is associated with the H.264 picture information provided in `pStdPictureInfo`.

Std Picture Information

  The members of the `StdVideoEncodeH264PictureInfo` structure pointed to by `pStdPictureInfo` are interpreted as follows:

  - `flags.reserved` and `reserved1` are used only for padding purposes and are otherwise ignored;

  - `flags.IdrPicFlag` as defined in section 7.4.1 of the ITU-T H.264 Specification;

  - `flags.is_reference` as defined in section 3.136 of the ITU-T H.264 Specification;

  - `seq_parameter_set_id` and `pic_parameter_set_id` are used to identify the active parameter sets, as described below;

  - `primary_pic_type` as defined in section 7.4.2 of the ITU-T H.264 Specification;

  - `PicOrderCnt` as defined in section 8.2 of the ITU-T H.264 Specification;

  - `temporal_id` as defined in section G.7.4.1.1 of the ITU-T H.264 Specification;

  - if `pRefLists` is not `NULL`, then it is a pointer to a `StdVideoEncodeH264ReferenceListsInfo` structure that is interpreted as follows:

    - `flags.reserved` is used only for padding purposes and is otherwise ignored;

    - `ref_pic_list_modification_flag_l0` and `ref_pic_list_modification_flag_l1` as defined in section 7.4.3.1 of the ITU-T H.264 Specification;

    - `num_ref_idx_l0_active_minus1` and `num_ref_idx_l1_active_minus1` as defined in section 7.4.3 of the ITU-T H.264 Specification;

    - `RefPicList0` and `RefPicList1` as defined in section 8.2.4 of the ITU-T H.264 Specification where each element of these arrays either identifies an active reference picture using its DPB slot index or contains the value `STD_VIDEO_H264_NO_REFERENCE_PICTURE` to indicate “no reference picture”;

    - if `refList0ModOpCount` is not zero, then `pRefList0ModOperations` is a pointer to an array of `refList0ModOpCount` number of `StdVideoEncodeH264RefListModEntry` structures specifying the modification parameters for the reference list L0 as defined in section 7.4.3.1 of the ITU-T H.264 Specification;

    - if `refList1ModOpCount` is not zero, then `pRefList1ModOperations` is a pointer to an array of `refList1ModOpCount` number of `StdVideoEncodeH264RefListModEntry` structures specifying the modification parameters for the reference list L1 as defined in section 7.4.3.1 of the ITU-T H.264 Specification;

    - if `refPicMarkingOpCount` is not zero, then `refPicMarkingOperations` is a pointer to an array of `refPicMarkingOpCount` number of `StdVideoEncodeH264RefPicMarkingEntry` structures specifying the reference picture marking parameters as defined in section 7.4.3.3 of the ITU-T H.264 Specification;

  - all other members are interpreted as defined in section 7.4.3 of the ITU-T H.264 Specification.

Reference picture setup is controlled by the value of `StdVideoEncodeH264PictureInfo`::`flags.is_reference`. If it is set and a reconstructed picture is specified, then the latter is used as the target of picture reconstruction to activate the DPB slot specified in `pEncodeInfo->pSetupReferenceSlot->slotIndex`. If `StdVideoEncodeH264PictureInfo`::`flags.is_reference` is not set, but a reconstructed picture is specified, then the corresponding picture reference associated with the DPB slot is invalidated, as described in the DPB Slot States section.

Active Parameter Sets

  The members of the `StdVideoEncodeH264PictureInfo` structure pointed to by `pStdPictureInfo` are used to select the active parameter sets to use from the bound video session parameters object, as follows:

  - The active SPS is the SPS identified by the key specified in `StdVideoEncodeH264PictureInfo`::`seq_parameter_set_id`.

  - The active PPS is the PPS identified by the key specified by the pair constructed from `StdVideoEncodeH264PictureInfo`::`seq_parameter_set_id` and `StdVideoEncodeH264PictureInfo`::`pic_parameter_set_id`.

H.264 encoding uses explicit weighted sample prediction for a slice, as defined in section 8.4.2.3 of the ITU-T H.264 Specification, if any of the following conditions are true for the active PPS and the `pStdSliceHeader` member of the corresponding element of `pNaluSliceEntries`:

- `pStdSliceHeader->slice_type` is `STD_VIDEO_H264_SLICE_TYPE_P` and `weighted_pred_flag` is enabled in the active PPS.

- `pStdSliceHeader->slice_type` is `STD_VIDEO_H264_SLICE_TYPE_B` and `weighted_bipred_idc` in the active PPS equals `STD_VIDEO_H264_WEIGHTED_BIPRED_IDC_EXPLICIT`.

Valid Usage

- VUID-VkVideoEncodeH264PictureInfoKHR-naluSliceEntryCount-08301
  `naluSliceEntryCount` must be between `1` and VkVideoEncodeH264CapabilitiesKHR::`maxSliceCount`, inclusive, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the used video profile

- VUID-VkVideoEncodeH264PictureInfoKHR-flags-08304
  If VkVideoEncodeH264CapabilitiesKHR::`flags`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the used video profile, does not include VK_VIDEO_ENCODE_H264_CAPABILITY_GENERATE_PREFIX_NALU_BIT_KHR, then `generatePrefixNalu` must be VK_FALSE

- VUID-VkVideoEncodeH264PictureInfoKHR-flags-08314
  If VkVideoEncodeH264CapabilitiesKHR::`flags`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the used video profile, does not include VK_VIDEO_ENCODE_H264_CAPABILITY_PREDICTION_WEIGHT_TABLE_GENERATED_BIT_KHR and the slice corresponding to any element of `pNaluSliceEntries` uses explicit weighted sample prediction, then VkVideoEncodeH264NaluSliceInfoKHR::`pStdSliceHeader->pWeightTable` must not be `NULL` for that element of `pNaluSliceEntries`

Valid Usage (Implicit)

- VUID-VkVideoEncodeH264PictureInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_PICTURE_INFO_KHR

- VUID-VkVideoEncodeH264PictureInfoKHR-pNaluSliceEntries-parameter
  `pNaluSliceEntries` must be a valid pointer to an array of `naluSliceEntryCount` valid VkVideoEncodeH264NaluSliceInfoKHR structures

- VUID-VkVideoEncodeH264PictureInfoKHR-pStdPictureInfo-parameter
  `pStdPictureInfo` must be a valid pointer to a valid `StdVideoEncodeH264PictureInfo` value

- VUID-VkVideoEncodeH264PictureInfoKHR-naluSliceEntryCount-arraylength
  `naluSliceEntryCount` must be greater than `0`

Structure Chaining

Extends the structure

  - VkVideoEncodeInfoKHR

The VkVideoEncodeH264NaluSliceInfoKHR structure is defined as:

    // Provided by VK_KHR_video_encode_h264
    typedef struct VkVideoEncodeH264NaluSliceInfoKHR {
        VkStructureType                         sType;
        const void*                             pNext;
        int32_t                                 constantQp;
        const StdVideoEncodeH264SliceHeader*    pStdSliceHeader;
    } VkVideoEncodeH264NaluSliceInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `constantQp` is the QP to use for the slice if the current rate control mode configured for the video session is VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR.

- `pStdSliceHeader` is a pointer to a `StdVideoEncodeH264SliceHeader` structure specifying H.264 slice header parameters for the slice.

Std Slice Header Parameters

  The members of the `StdVideoEncodeH264SliceHeader` structure pointed to by `pStdSliceHeader` are interpreted as follows:

  - `flags.reserved` and `reserved1` are used only for padding purposes and are otherwise ignored;

  - if `pWeightTable` is not `NULL`, then it is a pointer to a `StdVideoEncodeH264WeightTable` that is interpreted as follows:

    - `flags.reserved` is used only for padding purposes and is otherwise ignored;

    - all other members of `StdVideoEncodeH264WeightTable` are interpreted as defined in section 7.4.3.2 of the ITU-T H.264 Specification;

  - all other members are interpreted as defined in section 7.4.3 of the ITU-T H.264 Specification.

Valid Usage (Implicit)

- VUID-VkVideoEncodeH264NaluSliceInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_NALU_SLICE_INFO_KHR

- VUID-VkVideoEncodeH264NaluSliceInfoKHR-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkVideoEncodeH264NaluSliceInfoKHR-pStdSliceHeader-parameter
  `pStdSliceHeader` must be a valid pointer to a valid `StdVideoEncodeH264SliceHeader` value

The VkVideoEncodeH264DpbSlotInfoKHR structure is defined as:

    // Provided by VK_KHR_video_encode_h264
    typedef struct VkVideoEncodeH264DpbSlotInfoKHR {
        VkStructureType                           sType;
        const void*                               pNext;
        const StdVideoEncodeH264ReferenceInfo*    pStdReferenceInfo;
    } VkVideoEncodeH264DpbSlotInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `pStdReferenceInfo` is a pointer to a `StdVideoEncodeH264ReferenceInfo` structure specifying H.264 reference information.

This structure is specified in the `pNext` chain of VkVideoEncodeInfoKHR::`pSetupReferenceSlot`, if not `NULL`, and the `pNext` chain of the elements of VkVideoEncodeInfoKHR::`pReferenceSlots` to specify the codec-specific reference picture information for an H.264 encode operation.

Active Reference Picture Information

  When this structure is specified in the `pNext` chain of the elements of VkVideoEncodeInfoKHR::`pReferenceSlots`, one element is added to the list of active reference pictures used by the video encode operation for each element of VkVideoEncodeInfoKHR::`pReferenceSlots` as follows:

  - The image subregion used is determined according to the H.264 Encode Picture Data Access section.

  - The reference picture is associated with the DPB slot index specified in the `slotIndex` member of the corresponding element of VkVideoEncodeInfoKHR::`pReferenceSlots`.

  - The reference picture is associated with the H.264 reference information provided in `pStdReferenceInfo`.

Reconstructed Picture Information

  When this structure is specified in the `pNext` chain of VkVideoEncodeInfoKHR::`pSetupReferenceSlot`, the information related to the reconstructed picture is defined as follows:

  - The image subregion used is determined according to the H.264 Encode Picture Data Access section.

  - If reference picture setup is requested, then the reconstructed picture is used to activate the DPB slot with the index specified in VkVideoEncodeInfoKHR::`pSetupReferenceSlot->slotIndex`.

  - The reconstructed picture is associated with the H.264 reference information provided in `pStdReferenceInfo`.

Std Reference Information

  The members of the `StdVideoEncodeH264ReferenceInfo` structure pointed to by `pStdReferenceInfo` are interpreted as follows:

  - `flags.reserved` is used only for padding purposes and is otherwise ignored;

  - `flags.used_for_long_term_reference` is used to indicate whether the picture is marked as “used for long-term reference” as defined in section 8.2.5.1 of the ITU-T H.264 Specification;

  - `primary_pic_type` as defined in section 7.4.2 of the ITU-T H.264 Specification;

  - `long_term_pic_num` and `long_term_frame_idx` as defined in section 7.4.3 of the ITU-T H.264 Specification;

  - `temporal_id` as defined in section G.7.4.1.1 of the ITU-T H.264 Specification;

  - all other members are interpreted as defined in section 8.2 of the ITU-T H.264 Specification.

Valid Usage (Implicit)

- VUID-VkVideoEncodeH264DpbSlotInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_DPB_SLOT_INFO_KHR

- VUID-VkVideoEncodeH264DpbSlotInfoKHR-pStdReferenceInfo-parameter
  `pStdReferenceInfo` must be a valid pointer to a valid `StdVideoEncodeH264ReferenceInfo` value

Structure Chaining

Extends the structure

  - VkVideoReferenceSlotInfoKHR

#### 49.21.12. H.264 Encode Rate Control

##### Group of Pictures

In case of H.264 encoding it is common practice to follow a regular pattern of different picture types in display order when encoding subsequent frames. This pattern is referred to as the group of pictures (GOP).

A regular GOP is defined by the following parameters:

- The number of frames in the GOP;

- The number of consecutive B frames between I and/or P frames in display order.

Frame types in a regular GOP follow each other in display order according to the following algorithm:

1. The first frame is always an I or an IDR frame.

2. This is followed by a number of consecutive B frames, as defined above.

3. If the number of frames in the GOP is not reached yet, then the next frame is a P frame and the algorithm continues from step 2.

Figure 42. H.264 regular GOP starting with an I frame

When IDR frames are used in a video sequence, the IDR period refers to the distance between subsequent IDR frames.

It is also typical for H.264 encoding to use specific reference picture usage patterns across the frames of the GOP. The two most common reference patterns used are as follows:

Flat Reference Pattern

  - Each P frame uses the last non-B frame, in display order, as reference.

  - Each B frame uses the last non-B frame, in display order, as its forward reference, and uses the next non-B frame, in display order, as its backward reference.

Figure 43. H.264 flat reference pattern

Dyadic Reference Pattern

  - Each P frame uses the last non-B frame, in display order, as reference.

  - The following algorithm is applied to the sequence of consecutive B frames between I and/or P frames in display order:

    1. The B frame in the middle of this sequence uses the frame preceding the sequence as its forward reference, and uses the frame following the sequence as its backward reference.

    2. The algorithm is executed recursively for the following frame sequences:

       - The B frames of the original sequence preceding the frame in the middle, if any.

       - The B frames of the original sequence following the frame in the middle, if any.

Figure 44. H.264 dyadic reference pattern

The application can provide guidance to the implementation’s rate control algorithm about the structure of the GOP used by the application. Any such guidance about the GOP and its structure does not mandate that specific GOP structure to be used by the application, as the picture type of individual encoded pictures is still application-controlled, however, any deviation from the provided guidance may result in undesired rate control behavior including, but not limited, to the implementation not being able to conform to the expected average or target bitrates, or other rate control parameters specified by the application.

When an H.264 encode session is used to encode multiple temporal layers, it is also common practice to follow a regular pattern for the H.264 temporal ID for the encoded pictures in display order when encoding subsequent frames. This pattern is referred to as the temporal GOP. The most common temporal layer pattern used is as follows:

Dyadic Temporal Layer Pattern

  - The number of frames in the temporal GOP is 2n-1, where n is the number of temporal layers.

  - The ith frame in the temporal GOP uses temporal ID t, if and only if the index of the least significant bit set in i equals n-t-1, except for the first frame, which is the only frame in the temporal GOP using temporal ID zero.

  - The ith frame in the temporal GOP uses the rth frame as reference, where r is calculated from i by clearing the least significant bit set in it, except for the first frame in the temporal GOP, which uses the first frame of the previous temporal GOP, if any, as reference.

Figure 45. H.264 dyadic temporal layer pattern

Note | Multi-layer rate control and multi-layer coding are typically used for streaming cases where low latency is expected, hence B pictures with backward prediction are usually not used.

The `VkVideoEncodeH264RateControlInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_encode_h264
    typedef struct VkVideoEncodeH264RateControlInfoKHR {
        VkStructureType                         sType;
        const void*                             pNext;
        VkVideoEncodeH264RateControlFlagsKHR    flags;
        uint32_t                                gopFrameCount;
        uint32_t                                idrPeriod;
        uint32_t                                consecutiveBFrameCount;
        uint32_t                                temporalLayerCount;
    } VkVideoEncodeH264RateControlInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask of VkVideoEncodeH264RateControlFlagBitsKHR specifying H.264 rate control flags.

- `gopFrameCount` is the number of frames within a group of pictures (GOP) intended to be used by the application. If it is 0, the rate control algorithm may assume an implementation-dependent GOP length. If it is `UINT32_MAX`, the GOP length is treated as infinite.

- `idrPeriod` is the interval, in terms of number of frames, between two IDR frames (see IDR period). If it is 0, the rate control algorithm may assume an implementation-dependent IDR period. If it is `UINT32_MAX`, the IDR period is treated as infinite.

- `consecutiveBFrameCount` is the number of consecutive B frames between I and/or P frames within the GOP.

- `temporalLayerCount` specifies the number of H.264 temporal layers that the application intends to use.

When an instance of this structure is included in the `pNext` chain of the VkVideoCodingControlInfoKHR structure passed to the vkCmdControlVideoCodingKHR command, and VkVideoCodingControlInfoKHR::`flags` includes VK_VIDEO_CODING_CONTROL_ENCODE_RATE_CONTROL_BIT_KHR, the parameters in this structure are used as guidance for the implementation’s rate control algorithm (see Video Coding Control).

If `flags` includes VK_VIDEO_ENCODE_H264_RATE_CONTROL_ATTEMPT_HRD_COMPLIANCE_BIT_KHR, then the rate control state is reset to an initial state to meet HRD compliance requirements. Otherwise the new rate control state may be applied without a reset depending on the implementation and the specified rate control parameters.

Note | It would be possible to infer the picture type to be used when encoding a frame, on the basis of the values provided for `consecutiveBFrameCount`, `idrPeriod`, and `gopFrameCount`, but this inferred picture type will not be used by implementations to override the picture type provided to the video encode operation.

Valid Usage

- VUID-VkVideoEncodeH264RateControlInfoKHR-flags-08280
  If VkVideoEncodeH264CapabilitiesKHR::`flags`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the used video profile, does not include VK_VIDEO_ENCODE_H264_CAPABILITY_HRD_COMPLIANCE_BIT_KHR, then `flags` must not contain VK_VIDEO_ENCODE_H264_RATE_CONTROL_ATTEMPT_HRD_COMPLIANCE_BIT_KHR

- VUID-VkVideoEncodeH264RateControlInfoKHR-flags-08281
  If `flags` contains VK_VIDEO_ENCODE_H264_RATE_CONTROL_REFERENCE_PATTERN_FLAT_BIT_KHR or VK_VIDEO_ENCODE_H264_RATE_CONTROL_REFERENCE_PATTERN_DYADIC_BIT_KHR, then it must also contain VK_VIDEO_ENCODE_H264_RATE_CONTROL_REGULAR_GOP_BIT_KHR

- VUID-VkVideoEncodeH264RateControlInfoKHR-flags-08282
  If `flags` contains VK_VIDEO_ENCODE_H264_RATE_CONTROL_REFERENCE_PATTERN_FLAT_BIT_KHR, then it must not also contain VK_VIDEO_ENCODE_H264_RATE_CONTROL_REFERENCE_PATTERN_DYADIC_BIT_KHR

- VUID-VkVideoEncodeH264RateControlInfoKHR-flags-08283
  If `flags` contains VK_VIDEO_ENCODE_H264_RATE_CONTROL_REGULAR_GOP_BIT_KHR, then `gopFrameCount` must be greater than `0`

- VUID-VkVideoEncodeH264RateControlInfoKHR-idrPeriod-08284
  If `idrPeriod` is not `0`, then it must be greater than or equal to `gopFrameCount`

- VUID-VkVideoEncodeH264RateControlInfoKHR-consecutiveBFrameCount-08285
  If `consecutiveBFrameCount` is not `0`, then it must be less than `gopFrameCount`

Valid Usage (Implicit)

- VUID-VkVideoEncodeH264RateControlInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_RATE_CONTROL_INFO_KHR

- VUID-VkVideoEncodeH264RateControlInfoKHR-flags-parameter
  `flags` must be a valid combination of VkVideoEncodeH264RateControlFlagBitsKHR values

Structure Chaining

Extends the structures

  - VkVideoBeginCodingInfoKHR

  - VkVideoCodingControlInfoKHR

Bits which can be set in VkVideoEncodeH264RateControlInfoKHR::`flags`, specifying H.264 rate control flags, are:

    // Provided by VK_KHR_video_encode_h264
    typedef enum VkVideoEncodeH264RateControlFlagBitsKHR {
        VK_VIDEO_ENCODE_H264_RATE_CONTROL_ATTEMPT_HRD_COMPLIANCE_BIT_KHR = 0x00000001,
        VK_VIDEO_ENCODE_H264_RATE_CONTROL_REGULAR_GOP_BIT_KHR = 0x00000002,
        VK_VIDEO_ENCODE_H264_RATE_CONTROL_REFERENCE_PATTERN_FLAT_BIT_KHR = 0x00000004,
        VK_VIDEO_ENCODE_H264_RATE_CONTROL_REFERENCE_PATTERN_DYADIC_BIT_KHR = 0x00000008,
        VK_VIDEO_ENCODE_H264_RATE_CONTROL_TEMPORAL_LAYER_PATTERN_DYADIC_BIT_KHR = 0x00000010,
    } VkVideoEncodeH264RateControlFlagBitsKHR;

- VK_VIDEO_ENCODE_H264_RATE_CONTROL_ATTEMPT_HRD_COMPLIANCE_BIT_KHR specifies that rate control should attempt to produce an HRD compliant bitstream, as defined in annex C of the ITU-T H.264 Specification.

- VK_VIDEO_ENCODE_H264_RATE_CONTROL_REGULAR_GOP_BIT_KHR specifies that the application intends to use a regular GOP structure according to the parameters specified in the `gopFrameCount`, `idrPeriod`, and `consecutiveBFrameCount` members of the VkVideoEncodeH264RateControlInfoKHR structure.

- VK_VIDEO_ENCODE_H264_RATE_CONTROL_REFERENCE_PATTERN_FLAT_BIT_KHR specifies that the application intends to follow a flat reference pattern in the GOP.

- VK_VIDEO_ENCODE_H264_RATE_CONTROL_REFERENCE_PATTERN_DYADIC_BIT_KHR specifies that the application intends to follow a dyadic reference pattern in the GOP.

- VK_VIDEO_ENCODE_H264_RATE_CONTROL_TEMPORAL_LAYER_PATTERN_DYADIC_BIT_KHR specifies that the application intends to follow a dyadic temporal layer pattern.

    // Provided by VK_KHR_video_encode_h264
    typedef VkFlags VkVideoEncodeH264RateControlFlagsKHR;

`VkVideoEncodeH264RateControlFlagsKHR` is a bitmask type for setting a mask of zero or more VkVideoEncodeH264RateControlFlagBitsKHR.

##### Rate Control Layers

The `VkVideoEncodeH264RateControlLayerInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_encode_h264
    typedef struct VkVideoEncodeH264RateControlLayerInfoKHR {
        VkStructureType                  sType;
        const void*                      pNext;
        VkBool32                         useMinQp;
        VkVideoEncodeH264QpKHR           minQp;
        VkBool32                         useMaxQp;
        VkVideoEncodeH264QpKHR           maxQp;
        VkBool32                         useMaxFrameSize;
        VkVideoEncodeH264FrameSizeKHR    maxFrameSize;
    } VkVideoEncodeH264RateControlLayerInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `useMinQp` indicates whether the QP values determined by rate control will be clamped to the lower bounds on the QP values specified in `minQp`.

- `minQp` specifies the lower bounds on the QP values, for each picture type, that the implementation’s rate control algorithm will use when `useMinQp` is VK_TRUE.

- `useMaxQp` indicates whether the QP values determined by rate control will be clamped to the upper bounds on the QP values specified in `maxQp`.

- `maxQp` specifies the upper bounds on the QP values, for each picture type, that the implementation’s rate control algorithm will use when `useMaxQp` is VK_TRUE.

- `useMaxFrameSize` indicates whether the implementation’s rate control algorithm should use the values specified in `maxFrameSize` as the upper bounds on the encoded frame size for each picture type.

- `maxFrameSize` specifies the upper bounds on the encoded frame size, for each picture type, when `useMaxFrameSize` is VK_TRUE.

When used, the values in `minQp` and `maxQp` guarantee that the effective QP values used by the implementation will respect those lower and upper bounds, respectively. However, limiting the range of QP values that the implementation is able to use will also limit the capabilities of the implementation’s rate control algorithm to comply to other constraints. In particular, the implementation may not be able to comply to the following:

- The average and/or peak bitrate values to be used for the encoded bitstream specified in the `averageBitrate` and `maxBitrate` members of the VkVideoEncodeRateControlLayerInfoKHR structure.

- The upper bounds on the encoded frame size, for each picture type, specified in the `maxFrameSize` member of `VkVideoEncodeH264RateControlLayerInfoKHR`.

Note | In general, applications need to configure rate control parameters appropriately in order to be able to get the desired rate control behavior, as described in the Video Encode Rate Control section.

When an instance of this structure is included in the `pNext` chain of a VkVideoEncodeRateControlLayerInfoKHR structure specified in one of the elements of the `pLayers` array member of the VkVideoEncodeRateControlInfoKHR structure passed to the vkCmdControlVideoCodingKHR command, VkVideoCodingControlInfoKHR::`flags` includes VK_VIDEO_CODING_CONTROL_ENCODE_RATE_CONTROL_BIT_KHR, and the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR, it specifies the H.264-specific rate control parameters of the rate control layer corresponding to that element of `pLayers`.

Valid Usage

- VUID-VkVideoEncodeH264RateControlLayerInfoKHR-useMinQp-08286
  If `useMinQp` is VK_TRUE, then the `qpI`, `qpP`, and `qpB` members of `minQp` must all be between VkVideoEncodeH264CapabilitiesKHR::`minQp` and VkVideoEncodeH264CapabilitiesKHR::`maxQp`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the used video profile

- VUID-VkVideoEncodeH264RateControlLayerInfoKHR-useMaxQp-08287
  If `useMaxQp` is VK_TRUE, then the `qpI`, `qpP`, and `qpB` members of `maxQp` must all be between VkVideoEncodeH264CapabilitiesKHR::`minQp` and VkVideoEncodeH264CapabilitiesKHR::`maxQp`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the used video profile

- VUID-VkVideoEncodeH264RateControlLayerInfoKHR-useMinQp-08288
  If `useMinQp` is VK_TRUE and VkVideoEncodeH264CapabilitiesKHR::`flags`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the used video profile, does not include VK_VIDEO_ENCODE_H264_CAPABILITY_PER_PICTURE_TYPE_MIN_MAX_QP_BIT_KHR, then the `qpI`, `qpP`, and `qpB` members of `minQp` must all specify the same value

- VUID-VkVideoEncodeH264RateControlLayerInfoKHR-useMaxQp-08289
  If `useMaxQp` is VK_TRUE and VkVideoEncodeH264CapabilitiesKHR::`flags`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the used video profile, does not include VK_VIDEO_ENCODE_H264_CAPABILITY_PER_PICTURE_TYPE_MIN_MAX_QP_BIT_KHR, then the `qpI`, `qpP`, and `qpB` members of `maxQp` must all specify the same value

- VUID-VkVideoEncodeH264RateControlLayerInfoKHR-useMinQp-08374
  If `useMinQp` and `useMaxQp` are both VK_TRUE, then the `qpI`, `qpP`, and `qpB` members of `minQp` must all be less than or equal to the respective members of `maxQp`

Valid Usage (Implicit)

- VUID-VkVideoEncodeH264RateControlLayerInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_RATE_CONTROL_LAYER_INFO_KHR

- VUID-VkVideoEncodeH264RateControlLayerInfoKHR-minQp-parameter
  `minQp` must be a valid VkVideoEncodeH264QpKHR structure

- VUID-VkVideoEncodeH264RateControlLayerInfoKHR-maxQp-parameter
  `maxQp` must be a valid VkVideoEncodeH264QpKHR structure

- VUID-VkVideoEncodeH264RateControlLayerInfoKHR-maxFrameSize-parameter
  `maxFrameSize` must be a valid VkVideoEncodeH264FrameSizeKHR structure

Structure Chaining

Extends the structure

  - VkVideoEncodeRateControlLayerInfoKHR

The `VkVideoEncodeH264QpKHR` structure is defined as:

    // Provided by VK_KHR_video_encode_h264
    typedef struct VkVideoEncodeH264QpKHR {
        int32_t    qpI;
        int32_t    qpP;
        int32_t    qpB;
    } VkVideoEncodeH264QpKHR;

- `qpI` is the QP to be used for I pictures.

- `qpP` is the QP to be used for P pictures.

- `qpB` is the QP to be used for B pictures.

The `VkVideoEncodeH264FrameSizeKHR` structure is defined as:

    // Provided by VK_KHR_video_encode_h264
    typedef struct VkVideoEncodeH264FrameSizeKHR {
        uint32_t    frameISize;
        uint32_t    framePSize;
        uint32_t    frameBSize;
    } VkVideoEncodeH264FrameSizeKHR;

- `frameISize` is the size in bytes to be used for I pictures.

- `framePSize` is the size in bytes to be used for P pictures.

- `frameBSize` is the size in bytes to be used for B pictures.

##### GOP Remaining Frames

Besides session level rate control configuration, the application can specify the number of frames per frame type remaining in the group of pictures (GOP).

The `VkVideoEncodeH264GopRemainingFrameInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_encode_h264
    typedef struct VkVideoEncodeH264GopRemainingFrameInfoKHR {
        VkStructureType    sType;
        const void*        pNext;
        VkBool32           useGopRemainingFrames;
        uint32_t           gopRemainingI;
        uint32_t           gopRemainingP;
        uint32_t           gopRemainingB;
    } VkVideoEncodeH264GopRemainingFrameInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `useGopRemainingFrames` indicates whether the implementation’s rate control algorithm should use the values specified in `gopRemainingI`, `gopRemainingP`, and `gopRemainingB`. If `useGopRemainingFrames` is VK_FALSE, then the values of `gopRemainingI`, `gopRemainingP`, and `gopRemainingB` are ignored.

- `gopRemainingI` specifies the number of I frames the implementation’s rate control algorithm should assume to be remaining in the GOP prior to executing the video encode operation.

- `gopRemainingP` specifies the number of P frames the implementation’s rate control algorithm should assume to be remaining in the GOP prior to executing the video encode operation.

- `gopRemainingB` specifies the number of B frames the implementation’s rate control algorithm should assume to be remaining in the GOP prior to executing the video encode operation.

Setting `useGopRemainingFrames` to VK_TRUE and including this structure in the `pNext` chain of VkVideoBeginCodingInfoKHR is only mandatory if the VkVideoEncodeH264CapabilitiesKHR::`requiresGopRemainingFrames` reported for the used video profile is VK_TRUE. However, implementations may use these remaining frame counts, when specified, even when it is not required. In particular, when the application does not use a regular GOP structure, these values may provide additional guidance for the implementation’s rate control algorithm.

The VkVideoEncodeH264CapabilitiesKHR::`prefersGopRemainingFrames` capability is also used to indicate that the implementation’s rate control algorithm may operate more accurately if the application specifies the remaining frame counts using this structure.

As with other rate control guidance values, if the effective order and number of frames encoded by the application are not in line with the remaining frame counts specified in this structure at any given point, then the behavior of the implementation’s rate control algorithm may deviate from the one expected by the application.

Valid Usage (Implicit)

- VUID-VkVideoEncodeH264GopRemainingFrameInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_GOP_REMAINING_FRAME_INFO_KHR

Structure Chaining

Extends the structure

  - VkVideoBeginCodingInfoKHR

##### H.264 QP Delta Maps

Quantization delta maps used with an H.264 encode profile are referred to as QP delta maps and their texels contain integer values representing QP delta values that are applied in the process of determining the quantization parameters of the encoded picture.

Accordingly, H.264 QP delta maps always have single channel integer formats, as reported in VkVideoFormatPropertiesKHR::`format`.

When the rate control mode is VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR, the QP delta values are added to the per slice constant QP values that, in effect, enable the application to explicitly control the used QP values at the granularity of the used quantization map texel size.

For all other rate control modes, the QP delta values can be used to offset the QP values that the rate control algorithm would otherwise produce.

##### H.264 Encode Quantization

Performing H.264 encode operations involves the process of assigning QP values to individual H.264 macroblocks. This process depends on the used rate control mode, as well as other encode and rate control parameters, as described below:

- If the configured rate control mode is VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DEFAULT_KHR, then the QP value is initialized by the implementation-specific default rate control algorithm.

  - If the video encode operation is issued with a quantization delta map, the QP delta value corresponding to the macroblock, as fetched from the quantization map, is added to the previously determined QP value. If the fetched QP delta value falls outside the supported QP delta value range reported in the `minQpDelta` and `maxQpDelta` members of VkVideoEncodeH264QuantizationMapCapabilitiesKHR, then the QP value used for the macroblock becomes undefined.

- If the configured rate control mode is VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR, then the QP value is initialized from the constant QP value specified for the H.264 slice the macroblock is part of.

  - If the video encode operation is issued with a quantization delta map, the QP delta value corresponding to the macroblock, as fetched from the quantization map, is added to the previously determined QP value. If the fetched QP delta value falls outside the supported QP delta value range reported in the `minQpDelta` and `maxQpDelta` members of VkVideoEncodeH264QuantizationMapCapabilitiesKHR, then the QP value used for the macroblock becomes undefined.

- If the configured rate control mode is not VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DEFAULT_KHR or VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR, then the QP value is initialized by the corresponding rate control algorithm.

  - If the video encode operation is issued with a quantization delta map, the QP delta value corresponding to the macroblock, as fetched from the quantization map, is added to the previously determined QP value. If the fetched QP delta value falls outside the supported QP delta value range reported in the `minQpDelta` and `maxQpDelta` members of VkVideoEncodeH264QuantizationMapCapabilitiesKHR, then the QP value used for the macroblock becomes undefined.

  - If the video encode operation is issued with an emphasis map, the rate control will adjust the QP value based on the emphasis value corresponding to the macroblock, as fetched from the quantization map, according to the following equation:

    QPnew = f(QPprev,e)

    Where QPnew is the resulting QP value, QPprev is the previously determined QP value, e is the emphasis value corresponding to the macroblock, and f is an implementation-defined function for which the following implication is true:

    e1 < e2 ⇒ f(QP,e1) ≥ f(QP,e2)

    Note | This means that lower emphasis values will result in higher QP values, whereas higher emphasis values will result in lower QP values, but the function is not strictly decreasing with respect to the input emphasis value for a given input QP value.

  - If clamping to minimum QP values is enabled in the applied rate control layer, then the QP value is clamped to the corresponding minimum QP value.

  - If clamping to maximum QP values is enabled in the applied rate control layer, then the QP value is clamped to the corresponding maximum QP value.

- If VK_VIDEO_ENCODE_H264_CAPABILITY_MB_QP_DIFF_WRAPAROUND_BIT_KHR is not supported, then the determined QP value is clamped in such a way that the `mb_qp_delta` value of the encoded macroblock complies to the modified version of equation 7-37 of the ITU-T H.264 Specification.

  Note | The effect of this is that the maximum QP difference across subsequent macroblocks is limited to the [-(26 + QpBdOffsetY / 2), 25 + QpBdOffsetY / 2] range and only has an observable change in behavior when the video encode operation is issued with a QP delta map.

- In all cases, the final QP value is clamped to the QP value range supported by the video profile, as reported in the `minQp` and `maxQp` members of VkVideoEncodeH264CapabilitiesKHR.

#### 49.21.13. H.264 Encode Requirements

This section described the required H.264 encoding capabilities for physical devices that have at least one queue family that supports the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR, as returned by vkGetPhysicalDeviceQueueFamilyProperties2 in VkQueueFamilyVideoPropertiesKHR::`videoCodecOperations`.

Table 65. Required Video Std Header Versions
Video Std Header Name | Version
--- | ---
`vulkan_video_codec_h264std_encode` | 1.0.0

Table 66. Required Video Capabilities
Video Capability | Requirement | Requirement Type1
--- | --- | ---
VkVideoCapabilitiesKHR |  |
`flags` | - | min
`minBitstreamBufferOffsetAlignment` | 4096 | max
`minBitstreamBufferSizeAlignment` | 4096 | max
`pictureAccessGranularity` | (64,64) | max
`minCodedExtent` | - | max
`maxCodedExtent` | - | min
`maxDpbSlots` | 0 | min
`maxActiveReferencePictures` | 0 | min
VkVideoEncodeCapabilitiesKHR |  |
`flags` | - | min
`rateControlModes` | VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR 4 | min
`maxBitrate` | 64000 | min
`maxQualityLevels` | 1 | min
`encodeInputPictureGranularity` | (64,64) | max
`supportedEncodeFeedbackFlags` | VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_BUFFER_OFFSET_BIT_KHR VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_BYTES_WRITTEN_BIT_KHR + VK_VIDEO_ENCODE_FEEDBACK_AVERAGE_QUANTIZATION_BIT_KHR 6 + VK_VIDEO_ENCODE_FEEDBACK_INTRA_PIXELS_BIT_KHR 6 + VK_VIDEO_ENCODE_FEEDBACK_INTER_PIXELS_BIT_KHR 6 + VK_VIDEO_ENCODE_FEEDBACK_PICTURE_PARTITION_COUNT_BIT_KHR 6 | min
VkVideoEncodeFeedback2CapabilitiesKHR |  |
`maxPerPartitionFeedbackEntries` | - | min
`supportedPerPartitionEncodeFeedbackFlags` | VK_VIDEO_ENCODE_PER_PARTITION_FEEDBACK_STATUS_BIT_KHR 7 + VK_VIDEO_ENCODE_PER_PARTITION_FEEDBACK_BITSTREAM_BUFFER_OFFSET_BIT_KHR 7 + VK_VIDEO_ENCODE_PER_PARTITION_FEEDBACK_BITSTREAM_BYTES_WRITTEN_BIT_KHR 7 | min
VkVideoEncodeH264CapabilitiesKHR |  |
`flags` | - | min
`maxLevelIdc` | `STD_VIDEO_H264_LEVEL_IDC_1_0` | min
`maxSliceCount` | 1 | min
`maxPPictureL0ReferenceCount` | 0 | min
`maxBPictureL0ReferenceCount` | 0 | min
`maxL1ReferenceCount` | 0 | min
`maxTemporalLayerCount` | 1 | min
`expectDyadicTemporalLayerPattern` | - | implementation-dependent
`minQp` | - | max
`maxQp` | - | min
`prefersGopRemainingFrames` | - | implementation-dependent
`requiresGopRemainingFrames` | - | implementation-dependent
`stdSyntaxFlags` | - | min
VkVideoEncodeQuantizationMapCapabilitiesKHR |  |
`maxQuantizationMapExtent` | - 2 | min
VkVideoEncodeH264QuantizationMapCapabilitiesKHR |  |
`minQpDelta` | - 3 | max
`maxQpDelta` | - 3 | min
VkVideoEncodeIntraRefreshCapabilitiesKHR |  |
`intraRefreshModes` | 0 | min
`maxIntraRefreshCycleDuration` | 2 5 | min
`maxIntraRefreshActiveReferencePictures` | 1 5 | min
`partitionIndependentIntraRefreshRegions` | - | implementation-dependent
`nonRectangularIntraRefreshRegions` | - | implementation-dependent

1

  The Requirement Type column specifies the requirement is either the minimum value all implementations must support, the maximum value all implementations must support, or the exact value all implementations must support. For bitmasks a minimum value is the least bits all implementations must set, but they may have additional bits set beyond this minimum.

2

  If VkVideoCapabilitiesKHR::`flags` includes VK_VIDEO_ENCODE_CAPABILITY_QUANTIZATION_DELTA_MAP_BIT_KHR or VK_VIDEO_ENCODE_CAPABILITY_EMPHASIS_MAP_BIT_KHR, then the `width` and `height` members of `maxQuantizationMapExtent` must be greater than zero.

3

  If VkVideoCapabilitiesKHR::`flags` includes VK_VIDEO_ENCODE_CAPABILITY_QUANTIZATION_DELTA_MAP_BIT_KHR, then `maxQpDelta` must be greater than `minQpDelta`.

4

  If the `videoMaintenance2` feature is supported.

5

  If VkVideoEncodeIntraRefreshCapabilitiesKHR::`intraRefreshModes` is not zero.

6

  If the `videoEncodeFeedback2` feature is supported.

7

  If `maxPerPartitionFeedbackEntries` is greater than zero.

### 49.22. H.265 Encode Operations

Video encode operations using an H.265 encode profile can be used to encode elementary video stream sequences compliant to the ITU-T H.265 Specification.

Note | Refer to the Preamble for information on how the Khronos Intellectual Property Rights Policy relates to normative references to external materials not created by Khronos.

This process is performed according to the video encode operation steps with the codec-specific semantics defined in section 8 of the ITU-T H.265 Specification as follows:

- Syntax elements, derived values, and other parameters are applied from the following structures:

  - The `StdVideoH265VideoParameterSet` structure corresponding to the active VPS specifying the H.265 video parameter set.

  - The `StdVideoH265SequenceParameterSet` structure corresponding to the active SPS specifying the H.265 sequence parameter set.

  - The `StdVideoH265PictureParameterSet` structure corresponding to the active PPS specifying the H.265 picture parameter set.

  - The `StdVideoEncodeH265PictureInfo` structure specifying the H.265 picture information.

  - The `StdVideoEncodeH265SliceSegmentHeader` structures specifying the H.265 slice segment header parameters for each encoded H.265 slice segment.

  - The `StdVideoEncodeH265ReferenceInfo` structures specifying the H.265 reference information corresponding to the optional reconstructed picture and any active reference pictures.

- The encoded bitstream data is written to the destination video bitstream buffer range as defined in the H.265 Encode Bitstream Data Access section.

- Picture data in the video picture resources corresponding to the used encode input picture, active reference pictures, and optional reconstructed picture is accessed as defined in the H.265 Encode Picture Data Access section.

- The decision on reference picture setup is made according to the parameters specified in the H.265 picture information.

If the parameters adhere to the syntactic and semantic requirements defined in the corresponding sections of the ITU-T H.265 Specification, as described above, and the DPB slots associated with the active reference pictures all refer to valid picture references, then the video encode operation will complete successfully. Otherwise, the video encode operation may complete unsuccessfully.

#### 49.22.1. H.265 Encode Parameter Overrides

Implementations may override, unless otherwise specified, any of the H.265 encode parameters specified in the following Video Std structures:

- `StdVideoH265VideoParameterSet`

- `StdVideoH265SequenceParameterSet`

- `StdVideoH265PictureParameterSet`

- `StdVideoEncodeH265PictureInfo`

- `StdVideoEncodeH265SliceSegmentHeader`

- `StdVideoEncodeH265ReferenceInfo`

All such H.265 encode parameter overrides must fulfill the conditions defined in the Video Encode Parameter Overrides section.

In addition, implementations must not override any of the following H.265 encode parameters:

- `StdVideoEncodeH265PictureInfo`::`pic_type`

- `StdVideoEncodeH265SliceSegmentHeader`::`slice_type`

If the `videoMaintenance2` feature is enabled, implementations must not override any of the following H.265 encode parameters:

- the following parameters specified in the `StdVideoH265ProfileTierLevel` structure pointed to by `StdVideoH265VideoParameterSet`::`pProfileTierLevel` and `StdVideoH265SequenceParameterSet`::`pProfileTierLevel`:

  - `flags.general_tier_flag`

  - `flags.general_progressive_source_flag`, if set to `1`

  - `flags.general_interlaced_source_flag`, if set to `0`

  - `flags.general_frame_only_constraint_flag`

  - `general_profile_idc`

  - `general_level_idc`

- the following parameters specified in `StdVideoH265SequenceParameterSet`:

  - `chroma_format_idc`

- the following parameters specified in the `StdVideoH265SequenceParameterSetVui` structure pointed to by `StdVideoH265SequenceParameterSet`::`pSequenceParameterSetVui`:

  - `flags.aspect_ratio_info_present_flag`

  - `flags.overscan_info_present_flag`

  - `flags.overscan_appropriate_flag`

  - `flags.video_signal_type_present_flag`

  - `flags.video_full_range_flag`

  - `flags.colour_description_present_flag`

  - `flags.chroma_loc_info_present_flag`

  - `flags.neutral_chroma_indication_flag`

  - `flags.field_seq_flag`

  - `flags.frame_field_info_present_flag`

  - `flags.default_display_window_flag`

  - `flags.vui_timing_info_present_flag`

  - `flags.vui_poc_proportional_to_timing_flag`

  - `aspect_ratio_idc`

  - `sar_width`

  - `sar_height`

  - `video_format`

  - `colour_primaries`

  - `transfer_characteristics`

  - `matrix_coeffs`

  - `chroma_sample_loc_type_top_field`

  - `chroma_sample_loc_type_bottom_field`

  - `def_disp_win_left_offset`

  - `def_disp_win_right_offset`

  - `def_disp_win_top_offset`

  - `def_disp_win_bottom_offset`

  - `vui_num_units_in_tick`

  - `vui_time_scale`

  - `vui_num_ticks_poc_diff_one_minus1`

In case of a video session parameters object created with VK_VIDEO_SESSION_PARAMETERS_CREATE_QUANTIZATION_MAP_COMPATIBLE_BIT_KHR, the following H.265 SPS and PPS parameters may be overridden by the implementation according to the quantization map texel size the video session parameters object was created with:

- `StdVideoH265SequenceParameterSet`::`log2_min_luma_coding_block_size_minus3`

- `StdVideoH265SequenceParameterSet`::`log2_diff_max_min_luma_coding_block_size`

- `StdVideoH265SequenceParameterSet`::`log2_min_pcm_luma_coding_block_size_minus3`

- `StdVideoH265SequenceParameterSet`::`log2_diff_max_min_pcm_luma_coding_block_size`

- `StdVideoH265PictureParameterSet`::`diff_cu_qp_delta_depth`

This may be necessary in order to limit the set of H.265 coding unit and coding tree unit sizes used during picture encoding to those that are supported by the implementation when using the specific quantization map texel size.

In case of H.265 encode parameters stored in video session parameters objects, applications need to use the vkGetEncodedVideoSessionParametersKHR command to determine whether any implementation overrides happened. If the query indicates that implementation overrides were applied, then the application needs to retrieve and use the encoded H.265 parameter sets in the bitstream in order to be able to produce a compliant H.265 video bitstream using the H.265 encode parameters stored in the video session parameters object.

In case of any H.265 encode parameters stored in the encoded bitstream produced by video encode operations, if the implementation supports the VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_HAS_OVERRIDES_BIT_KHR video encode feedback query flag, the application can use such queries to retrieve feedback about whether any implementation overrides have been applied to those H.265 encode parameters.

#### 49.22.2. H.265 Encode Bitstream Data Access

Each video encode operation writes one or more VCL NAL units comprising of slice segment headers and data of the encoded picture, in the format defined in sections 7.3.6 and 7.3.8, according to the semantics defined in sections 7.4.7 and 7.4.9 of the ITU-T H.265 Specification, respectively. The number of VCL NAL units written is specified by VkVideoEncodeH265PictureInfoKHR::`naluSliceSegmentEntryCount`.

#### 49.22.3. H.265 Encode Picture Data Access

Accesses to image data within a video picture resource happen at the granularity indicated by VkVideoCapabilitiesKHR::`pictureAccessGranularity`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the used video profile. Accordingly, the complete image subregion of a encode input picture, reference picture, or reconstructed picture accessed by video coding operations using an H.265 encode profile is defined as the set of texels within the coordinate range:

  ([0,`endX`), [0,`endY`))

Where:

- `endX` equals `codedExtent.width` rounded up to the nearest integer multiple of `pictureAccessGranularity.width` and clamped to the width of the image subresource referred to by the corresponding VkVideoPictureResourceInfoKHR structure;

- endY equals `codedExtent.height` rounded up to the nearest integer multiple of `pictureAccessGranularity.height` and clamped to the height of the image subresource referred to by the corresponding VkVideoPictureResourceInfoKHR structure;

Where `codedExtent` is the member of the VkVideoPictureResourceInfoKHR structure corresponding to the picture.

In case of video encode operations using an H.265 encode profile, any access to a picture at the coordinates (`x`,`y`), as defined by the ITU-T H.265 Specification, is an access to the image subresource referred to by the corresponding VkVideoPictureResourceInfoKHR structure at the texel coordinates (`x`,`y`).

Implementations may choose not to access some or all texels within particular reference pictures available to a video encode operation (e.g. due to video encode parameter overrides restricting the effective set of used reference pictures, or if the encoding algorithm chooses not to use certain subregions of the reference picture data for sample prediction).

#### 49.22.4. H.265 Frame, Picture, Slice Segments, and Tiles

H.265 pictures consist of one or more slices, slice segments, and tiles, as defined in section 6.3.1 of the ITU-T H.265 Specification.

For the purposes of this specification, the H.265 slice segments comprising a picture are referred to as the picture partitions of the picture.

Video encode operations using an H.265 encode profile can encode slice segments of different types, as defined in section 7.4.7.1 of the ITU-T H.265 Specification, by specifying the corresponding enumeration constant value in `StdVideoEncodeH265SliceSegmentHeader`::`slice_type` in the H.265 slice segment header parameters from the Video Std enumeration type `StdVideoH265SliceType`:

- `STD_VIDEO_H265_SLICE_TYPE_B` indicates that the slice segment is part of a B slice as defined in section 3.12 of the ITU-T H.265 Specification.

- `STD_VIDEO_H265_SLICE_TYPE_P` indicates that the slice segment is part of a P slice as defined in section 3.111 of the ITU-T H.265 Specification.

- `STD_VIDEO_H265_SLICE_TYPE_I` indicates that the slice segment is part of an I slice as defined in section 3.74 of the ITU-T H.265 Specification.

Pictures constructed from such slice segments can be of different types, as defined in section 7.4.3.5 of the ITU-T H.265 Specification. Video encode operations using an H.265 encode profile can encode pictures of a specific type by specifying the corresponding enumeration constant value in `StdVideoEncodeH265PictureInfo`::`pic_type` in the H.265 picture information from the Video Std enumeration type `StdVideoH265PictureType`:

- `STD_VIDEO_H265_PICTURE_TYPE_P` indicates that the picture is a P picture. A frame consisting of a P picture is also referred to as a P frame.

- `STD_VIDEO_H265_PICTURE_TYPE_B` indicates that the picture is a B picture. A frame consisting of a B picture is also referred to as a B frame.

- `STD_VIDEO_H265_PICTURE_TYPE_I` indicates that the picture is an I picture. A frame consisting of an I picture is also referred to as an I frame.

- `STD_VIDEO_H265_PICTURE_TYPE_IDR` indicates that the picture is a special type of I picture called an IDR picture as defined in section 3.67 of the ITU-T H.265 Specification. A frame consisting of an IDR picture is also referred to as an IDR frame.

#### 49.22.5. H.265 Coding Blocks

H.265 encode supports two types of coding blocks:

- Coding tree unit, as defined in section 3.35 of the ITU-T H.265 Specification.

- Coding unit, as defined in section 3.36 of the ITU-T H.265 Specification.

An H.265 coding unit is considered skipped when the value of `cu_skip_flag` for the coding unit equals `1`, as defined in section 7.4.95 of the ITU-T H.265 Specification.

#### 49.22.6. H.265 Encode Profile

A video profile supporting H.265 video encode operations is specified by setting VkVideoProfileInfoKHR::`videoCodecOperation` to VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR and adding a `VkVideoEncodeH265ProfileInfoKHR` structure to the VkVideoProfileInfoKHR::`pNext` chain.

The `VkVideoEncodeH265ProfileInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_encode_h265
    typedef struct VkVideoEncodeH265ProfileInfoKHR {
        VkStructureType           sType;
        const void*               pNext;
        StdVideoH265ProfileIdc    stdProfileIdc;
    } VkVideoEncodeH265ProfileInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `stdProfileIdc` is a `StdVideoH265ProfileIdc` value specifying the H.265 codec profile IDC, as defined in section A.3 of the ITU-T H.265 Specification.

Valid Usage (Implicit)

- VUID-VkVideoEncodeH265ProfileInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_PROFILE_INFO_KHR

Structure Chaining

Extends the structures

  - VkQueryPoolCreateInfo

  - VkVideoProfileInfoKHR

#### 49.22.7. H.265 Encode Capabilities

When calling vkGetPhysicalDeviceVideoCapabilitiesKHR to query the capabilities for an H.265 encode profile, the VkVideoCapabilitiesKHR::`pNext` chain must include a `VkVideoEncodeH265CapabilitiesKHR` structure that will be filled with the profile-specific capabilities.

The `VkVideoEncodeH265CapabilitiesKHR` structure is defined as:

    // Provided by VK_KHR_video_encode_h265
    typedef struct VkVideoEncodeH265CapabilitiesKHR {
        VkStructureType                                sType;
        void*                                          pNext;
        VkVideoEncodeH265CapabilityFlagsKHR            flags;
        StdVideoH265LevelIdc                           maxLevelIdc;
        uint32_t                                       maxSliceSegmentCount;
        VkExtent2D                                     maxTiles;
        VkVideoEncodeH265CtbSizeFlagsKHR               ctbSizes;
        VkVideoEncodeH265TransformBlockSizeFlagsKHR    transformBlockSizes;
        uint32_t                                       maxPPictureL0ReferenceCount;
        uint32_t                                       maxBPictureL0ReferenceCount;
        uint32_t                                       maxL1ReferenceCount;
        uint32_t                                       maxSubLayerCount;
        VkBool32                                       expectDyadicTemporalSubLayerPattern;
        int32_t                                        minQp;
        int32_t                                        maxQp;
        VkBool32                                       prefersGopRemainingFrames;
        VkBool32                                       requiresGopRemainingFrames;
        VkVideoEncodeH265StdFlagsKHR                   stdSyntaxFlags;
    } VkVideoEncodeH265CapabilitiesKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask of VkVideoEncodeH265CapabilityFlagBitsKHR indicating supported H.265 encoding capabilities.

- `maxLevelIdc` is a `StdVideoH265LevelIdc` value indicating the maximum H.265 level supported by the profile, where enum constant `STD_VIDEO_H265_LEVEL_IDC_<major>_<minor>` identifies H.265 level `<major>.<minor>` as defined in section A.4 of the ITU-T H.265 Specification.

- `maxSliceSegmentCount` indicates the maximum number of slice segments that can be encoded for a single picture. Further restrictions may apply to the number of slice segments that can be encoded for a single picture depending on other capabilities and codec-specific rules.

- `maxTiles` indicates the maximum number of H.265 tile columns and rows, as defined in sections 3.175 and 3.176 of the ITU-T H.265 Specification that can be encoded for a single picture. Further restrictions may apply to the number of H.265 tiles that can be encoded for a single picture depending on other capabilities and codec-specific rules.

- `ctbSizes` is a bitmask of VkVideoEncodeH265CtbSizeFlagBitsKHR describing the supported CTB sizes.

- `transformBlockSizes` is a bitmask of VkVideoEncodeH265TransformBlockSizeFlagBitsKHR describing the supported transform block sizes.

- `maxPPictureL0ReferenceCount` indicates the maximum number of reference pictures the implementation supports in the reference list L0 for P pictures.

  Note | As implementations may override the reference lists, `maxPPictureL0ReferenceCount` does not limit the number of elements that the application can specify in the L0 reference list for P pictures. However, if `maxPPictureL0ReferenceCount` is zero, then the use of P pictures is not allowed. In case of H.265 encoding, pictures can be encoded using only forward prediction even if P pictures are not supported, as the ITU-T H.265 Specification supports generalized P & B frames (also known as low delay B frames) whereas B frames can refer to past frames through both the L0 and L1 reference lists.

- `maxBPictureL0ReferenceCount` indicates the maximum number of reference pictures the implementation supports in the reference list L0 for B pictures.

- `maxL1ReferenceCount` indicates the maximum number of reference pictures the implementation supports in the reference list L1 if encoding of B pictures is supported.

  Note | As implementations may override the reference lists, `maxBPictureL0ReferenceCount` and `maxL1ReferenceCount` does not limit the number of elements that the application can specify in the L0 and L1 reference lists for B pictures. However, if `maxBPictureL0ReferenceCount` and `maxL1ReferenceCount` are both zero, then the use of B pictures is not allowed.

- `maxSubLayerCount` indicates the maximum number of H.265 sub-layers supported by the implementation.

- `expectDyadicTemporalSubLayerPattern` indicates that the implementation’s rate control algorithms expect the application to use a dyadic temporal sub-layer pattern when encoding multiple temporal sub-layers.

- `minQp` indicates the minimum QP value supported.

- `maxQp` indicates the maximum QP value supported.

- `prefersGopRemainingFrames` indicates that the implementation’s rate control algorithm prefers the application to specify the number of frames of each type remaining in the current group of pictures when beginning a video coding scope.

- `requiresGopRemainingFrames` indicates that the implementation’s rate control algorithm requires the application to specify the number of frames of each type remaining in the current group of pictures when beginning a video coding scope.

- `stdSyntaxFlags` is a bitmask of VkVideoEncodeH265StdFlagBitsKHR indicating capabilities related to H.265 syntax elements.

Valid Usage (Implicit)

- VUID-VkVideoEncodeH265CapabilitiesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_CAPABILITIES_KHR

Structure Chaining

Extends the structure

  - VkVideoCapabilitiesKHR

Bits which may be set in VkVideoEncodeH265CapabilitiesKHR::`flags`, indicating the H.265 encoding capabilities supported, are:

    // Provided by VK_KHR_video_encode_h265
    typedef enum VkVideoEncodeH265CapabilityFlagBitsKHR {
        VK_VIDEO_ENCODE_H265_CAPABILITY_HRD_COMPLIANCE_BIT_KHR = 0x00000001,
        VK_VIDEO_ENCODE_H265_CAPABILITY_PREDICTION_WEIGHT_TABLE_GENERATED_BIT_KHR = 0x00000002,
        VK_VIDEO_ENCODE_H265_CAPABILITY_ROW_UNALIGNED_SLICE_SEGMENT_BIT_KHR = 0x00000004,
        VK_VIDEO_ENCODE_H265_CAPABILITY_DIFFERENT_SLICE_SEGMENT_TYPE_BIT_KHR = 0x00000008,
        VK_VIDEO_ENCODE_H265_CAPABILITY_B_FRAME_IN_L0_LIST_BIT_KHR = 0x00000010,
        VK_VIDEO_ENCODE_H265_CAPABILITY_B_FRAME_IN_L1_LIST_BIT_KHR = 0x00000020,
        VK_VIDEO_ENCODE_H265_CAPABILITY_PER_PICTURE_TYPE_MIN_MAX_QP_BIT_KHR = 0x00000040,
        VK_VIDEO_ENCODE_H265_CAPABILITY_PER_SLICE_SEGMENT_CONSTANT_QP_BIT_KHR = 0x00000080,
        VK_VIDEO_ENCODE_H265_CAPABILITY_MULTIPLE_TILES_PER_SLICE_SEGMENT_BIT_KHR = 0x00000100,
        VK_VIDEO_ENCODE_H265_CAPABILITY_MULTIPLE_SLICE_SEGMENTS_PER_TILE_BIT_KHR = 0x00000200,
      // Provided by VK_KHR_video_encode_h265 with VK_KHR_video_encode_intra_refresh
        VK_VIDEO_ENCODE_H265_CAPABILITY_B_PICTURE_INTRA_REFRESH_BIT_KHR = 0x00000800,
      // Provided by VK_KHR_video_encode_h265 with VK_KHR_video_encode_quantization_map
        VK_VIDEO_ENCODE_H265_CAPABILITY_CU_QP_DIFF_WRAPAROUND_BIT_KHR = 0x00000400,
    } VkVideoEncodeH265CapabilityFlagBitsKHR;

- VK_VIDEO_ENCODE_H265_CAPABILITY_HRD_COMPLIANCE_BIT_KHR specifies whether the implementation may be able to generate HRD compliant bitstreams if any of the `nal_hrd_parameters_present_flag`, `vcl_hrd_parameters_present_flag`, or `sub_pic_hrd_params_present_flag` members of `StdVideoH265HrdFlags` are set to `1` in the HRD parameters of the active VPS or active SPS, or if `StdVideoH265SpsVuiFlags`::`vui_hrd_parameters_present_flag` is set to `1` in the active SPS.

- VK_VIDEO_ENCODE_H265_CAPABILITY_PREDICTION_WEIGHT_TABLE_GENERATED_BIT_KHR specifies that if the `weighted_pred_flag` or the `weighted_bipred_flag` member of `StdVideoH265PpsFlags` is set to `1` in the active PPS when encoding a P picture or B picture, respectively, then the implementation is able to internally decide syntax for `pred_weight_table`, as defined in section 7.4.7.3 of the ITU-T H.265 Specification, and the application is not required to provide a weight table in the H.265 slice segment header parameters.

- VK_VIDEO_ENCODE_H265_CAPABILITY_ROW_UNALIGNED_SLICE_SEGMENT_BIT_KHR specifies that each slice segment in a frame with a single or multiple tiles per slice may begin or finish at any offset in a CTB row. If not supported, all slice segments in such a frame must begin at the start of a CTB row (and hence each slice segment must finish at the end of a CTB row). Also indicates that each slice segment in a frame with multiple slices per tile may begin or finish at any offset within the enclosing tile’s CTB row. If not supported, slice segments in such a frame must begin at the start of the enclosing tile’s CTB row (and hence each slice segment must finish at the end of the enclosing tile’s CTB row). When a picture is encoded with intra refresh, encoding non-rectangular slice segments also requires: support for the VkVideoEncodeIntraRefreshCapabilitiesKHR::`nonRectangularIntraRefreshRegions` capability.

- VK_VIDEO_ENCODE_H265_CAPABILITY_DIFFERENT_SLICE_SEGMENT_TYPE_BIT_KHR specifies that when a frame is encoded with multiple slice segments, the implementation allows encoding each slice segment with a different `StdVideoEncodeH265SliceSegmentHeader`::`slice_type` specified in the H.265 slice segment header parameters. If not supported, all slice segments of the frame must be encoded with the same `slice_type` which corresponds to the picture type of the frame. There is one exception to this rule: if the picture is encoded with the intra refresh mode VK_VIDEO_ENCODE_INTRA_REFRESH_MODE_PER_PICTURE_PARTITION_BIT_KHR, then the currently refreshed slice segment must specify the `slice_type` `STD_VIDEO_H265_SLICE_TYPE_I` and can differ from the `slice_type` of the other slice segments regardless of whether VK_VIDEO_ENCODE_H265_CAPABILITY_DIFFERENT_SLICE_SEGMENT_TYPE_BIT_KHR is supported.

- VK_VIDEO_ENCODE_H265_CAPABILITY_B_FRAME_IN_L0_LIST_BIT_KHR specifies support for using a B frame as L0 reference, as specified in `StdVideoEncodeH265ReferenceListsInfo`::`RefPicList0` in the H.265 picture information.

- VK_VIDEO_ENCODE_H265_CAPABILITY_B_FRAME_IN_L1_LIST_BIT_KHR specifies support for using a B frame as L1 reference, as specified in `StdVideoEncodeH265ReferenceListsInfo`::`RefPicList1` in the H.265 picture information.

- VK_VIDEO_ENCODE_H265_CAPABILITY_PER_PICTURE_TYPE_MIN_MAX_QP_BIT_KHR specifies support for specifying different QP values in the members of VkVideoEncodeH265QpKHR.

- VK_VIDEO_ENCODE_H265_CAPABILITY_PER_SLICE_SEGMENT_CONSTANT_QP_BIT_KHR specifies support for specifying different constant QP values for each slice segment.

- VK_VIDEO_ENCODE_H265_CAPABILITY_MULTIPLE_TILES_PER_SLICE_SEGMENT_BIT_KHR specifies whether encoding multiple tiles per slice segment, as defined in section 6.3.1 of the ITU-T H.265 Specification, is supported. If this capability flag is not present, then the implementation is only able to encode a single tile for each slice segment.

- VK_VIDEO_ENCODE_H265_CAPABILITY_MULTIPLE_SLICE_SEGMENTS_PER_TILE_BIT_KHR specifies whether encoding multiple slice segments per tile, as defined in section 6.3.1 of the ITU-T H.265 Specification, is supported. If this capability flag is not present, then the implementation is only able to encode a single slice segment for each tile.

- VK_VIDEO_ENCODE_H265_CAPABILITY_CU_QP_DIFF_WRAPAROUND_BIT_KHR indicates support for wraparound during the calculation of the QP values of subsequently encoded coding units, as defined in section 7.4.9.14 of the ITU-T H.265 Specification. If not supported, equation 8-283 of the ITU-T H.265 Specification is effectively reduced to the following:

  QpY = qPY_PRED + `CuQpDeltaVal`

  Note | The effect of this is that the maximum QP difference across subsequent coding units is limited to the [-(26 + QpBdOffsetY / 2), 25 + QpBdOffsetY / 2] range.

- VK_VIDEO_ENCODE_H265_CAPABILITY_B_PICTURE_INTRA_REFRESH_BIT_KHR specifies support for encoding B pictures with intra refresh enabled.

    // Provided by VK_KHR_video_encode_h265
    typedef VkFlags VkVideoEncodeH265CapabilityFlagsKHR;

`VkVideoEncodeH265CapabilityFlagsKHR` is a bitmask type for setting a mask of zero or more VkVideoEncodeH265CapabilityFlagBitsKHR.

Bits which may be set in VkVideoEncodeH265CapabilitiesKHR::`stdSyntaxFlags`, indicating the capabilities related to the H.265 syntax elements, are:

    // Provided by VK_KHR_video_encode_h265
    typedef enum VkVideoEncodeH265StdFlagBitsKHR {
        VK_VIDEO_ENCODE_H265_STD_SEPARATE_COLOR_PLANE_FLAG_SET_BIT_KHR = 0x00000001,
        VK_VIDEO_ENCODE_H265_STD_SAMPLE_ADAPTIVE_OFFSET_ENABLED_FLAG_SET_BIT_KHR = 0x00000002,
        VK_VIDEO_ENCODE_H265_STD_SCALING_LIST_DATA_PRESENT_FLAG_SET_BIT_KHR = 0x00000004,
        VK_VIDEO_ENCODE_H265_STD_PCM_ENABLED_FLAG_SET_BIT_KHR = 0x00000008,
        VK_VIDEO_ENCODE_H265_STD_SPS_TEMPORAL_MVP_ENABLED_FLAG_SET_BIT_KHR = 0x00000010,
        VK_VIDEO_ENCODE_H265_STD_INIT_QP_MINUS26_BIT_KHR = 0x00000020,
        VK_VIDEO_ENCODE_H265_STD_WEIGHTED_PRED_FLAG_SET_BIT_KHR = 0x00000040,
        VK_VIDEO_ENCODE_H265_STD_WEIGHTED_BIPRED_FLAG_SET_BIT_KHR = 0x00000080,
        VK_VIDEO_ENCODE_H265_STD_LOG2_PARALLEL_MERGE_LEVEL_MINUS2_BIT_KHR = 0x00000100,
        VK_VIDEO_ENCODE_H265_STD_SIGN_DATA_HIDING_ENABLED_FLAG_SET_BIT_KHR = 0x00000200,
        VK_VIDEO_ENCODE_H265_STD_TRANSFORM_SKIP_ENABLED_FLAG_SET_BIT_KHR = 0x00000400,
        VK_VIDEO_ENCODE_H265_STD_TRANSFORM_SKIP_ENABLED_FLAG_UNSET_BIT_KHR = 0x00000800,
        VK_VIDEO_ENCODE_H265_STD_PPS_SLICE_CHROMA_QP_OFFSETS_PRESENT_FLAG_SET_BIT_KHR = 0x00001000,
        VK_VIDEO_ENCODE_H265_STD_TRANSQUANT_BYPASS_ENABLED_FLAG_SET_BIT_KHR = 0x00002000,
        VK_VIDEO_ENCODE_H265_STD_CONSTRAINED_INTRA_PRED_FLAG_SET_BIT_KHR = 0x00004000,
        VK_VIDEO_ENCODE_H265_STD_ENTROPY_CODING_SYNC_ENABLED_FLAG_SET_BIT_KHR = 0x00008000,
        VK_VIDEO_ENCODE_H265_STD_DEBLOCKING_FILTER_OVERRIDE_ENABLED_FLAG_SET_BIT_KHR = 0x00010000,
        VK_VIDEO_ENCODE_H265_STD_DEPENDENT_SLICE_SEGMENTS_ENABLED_FLAG_SET_BIT_KHR = 0x00020000,
        VK_VIDEO_ENCODE_H265_STD_DEPENDENT_SLICE_SEGMENT_FLAG_SET_BIT_KHR = 0x00040000,
        VK_VIDEO_ENCODE_H265_STD_SLICE_QP_DELTA_BIT_KHR = 0x00080000,
        VK_VIDEO_ENCODE_H265_STD_DIFFERENT_SLICE_QP_DELTA_BIT_KHR = 0x00100000,
    } VkVideoEncodeH265StdFlagBitsKHR;

- VK_VIDEO_ENCODE_H265_STD_SEPARATE_COLOR_PLANE_FLAG_SET_BIT_KHR specifies whether the implementation supports using the application-provided value for `StdVideoH265SpsFlags`::`separate_colour_plane_flag` in the SPS when that value is `1`.

- VK_VIDEO_ENCODE_H265_STD_SAMPLE_ADAPTIVE_OFFSET_ENABLED_FLAG_SET_BIT_KHR specifies whether the implementation supports using the application-provided value for `StdVideoH265SpsFlags`::`sample_adaptive_offset_enabled_flag` in the SPS when that value is `1`.

- VK_VIDEO_ENCODE_H265_STD_SCALING_LIST_DATA_PRESENT_FLAG_SET_BIT_KHR specifies whether the implementation supports using the application-provided value for the `scaling_list_enabled_flag` and `sps_scaling_list_data_present_flag` members of `StdVideoH265SpsFlags` in the SPS, and the application-provided value for `StdVideoH265PpsFlags`::`pps_scaling_list_data_present_flag` in the PPS when those values are `1`.

- VK_VIDEO_ENCODE_H265_STD_PCM_ENABLED_FLAG_SET_BIT_KHR specifies whether the implementation supports using the application-provided value for `StdVideoH265SpsFlags`::`pcm_enable_flag` in the SPS when that value is `1`.

- VK_VIDEO_ENCODE_H265_STD_SPS_TEMPORAL_MVP_ENABLED_FLAG_SET_BIT_KHR specifies whether the implementation supports using the application-provided value for `StdVideoH265SpsFlags`::`sps_temporal_mvp_enabled_flag` in the SPS when that value is `1`.

- VK_VIDEO_ENCODE_H265_STD_INIT_QP_MINUS26_BIT_KHR specifies whether the implementation supports using the application-provided value for `StdVideoH265PictureParameterSet`::`init_qp_minus26` in the PPS when that value is non-zero.

- VK_VIDEO_ENCODE_H265_STD_WEIGHTED_PRED_FLAG_SET_BIT_KHR specifies whether the implementation supports using the application-provided value for `StdVideoH265PpsFlags`::`weighted_pred_flag` in the PPS when that value is `1`.

- VK_VIDEO_ENCODE_H265_STD_WEIGHTED_BIPRED_FLAG_SET_BIT_KHR specifies whether the implementation supports using the application-provided value for `StdVideoH265PpsFlags`::`weighted_bipred_flag` in the PPS when that value is `1`.

- VK_VIDEO_ENCODE_H265_STD_LOG2_PARALLEL_MERGE_LEVEL_MINUS2_BIT_KHR specifies whether the implementation supports using the application-provided value for `StdVideoH265PictureParameterSet`::`log2_parallel_merge_level_minus2` in the PPS when that value is non-zero.

- VK_VIDEO_ENCODE_H265_STD_SIGN_DATA_HIDING_ENABLED_FLAG_SET_BIT_KHR specifies whether the implementation supports using the application-provided value for `StdVideoH265PpsFlags`::`sign_data_hiding_enabled_flag` in the PPS when that value is `1`.

- VK_VIDEO_ENCODE_H265_STD_TRANSFORM_SKIP_ENABLED_FLAG_SET_BIT_KHR specifies whether the implementation supports using the application-provided value for `StdVideoH265PpsFlags`::`transform_skip_enabled_flag` in the PPS when that value is `1`.

- VK_VIDEO_ENCODE_H265_STD_TRANSFORM_SKIP_ENABLED_FLAG_UNSET_BIT_KHR specifies whether the implementation supports using the application-provided value for `StdVideoH265PpsFlags`::`transform_skip_enabled_flag` in the PPS when that value is `0`.

- VK_VIDEO_ENCODE_H265_STD_PPS_SLICE_CHROMA_QP_OFFSETS_PRESENT_FLAG_SET_BIT_KHR specifies whether the implementation supports using the application-provided value for `StdVideoH265PpsFlags`::`pps_slice_chroma_qp_offsets_present_flag` in the PPS when that value is `1`.

- VK_VIDEO_ENCODE_H265_STD_TRANSQUANT_BYPASS_ENABLED_FLAG_SET_BIT_KHR specifies whether the implementation supports using the application-provided value for `StdVideoH265PpsFlags`::`transquant_bypass_enabled_flag` in the PPS when that value is `1`.

- VK_VIDEO_ENCODE_H265_STD_CONSTRAINED_INTRA_PRED_FLAG_SET_BIT_KHR specifies whether the implementation supports using the application-provided value for `StdVideoH265PpsFlags`::`constrained_intra_pred_flag` in the PPS when that value is `1`.

- VK_VIDEO_ENCODE_H265_STD_ENTROPY_CODING_SYNC_ENABLED_FLAG_SET_BIT_KHR specifies whether the implementation supports using the application-provided value for `StdVideoH265PpsFlags`::`entropy_coding_sync_enabled_flag` in the PPS when that value is `1`.

- VK_VIDEO_ENCODE_H265_STD_DEBLOCKING_FILTER_OVERRIDE_ENABLED_FLAG_SET_BIT_KHR specifies whether the implementation supports using the application-provided value for `StdVideoH265PpsFlags`::`deblocking_filter_override_enabled_flag` in the PPS when that value is `1`.

- VK_VIDEO_ENCODE_H265_STD_DEPENDENT_SLICE_SEGMENTS_ENABLED_FLAG_SET_BIT_KHR specifies whether the implementation supports using the application-provided value for `StdVideoH265PpsFlags`::`dependent_slice_segments_enabled_flag` in the PPS when that value is `1`.

- VK_VIDEO_ENCODE_H265_STD_DEPENDENT_SLICE_SEGMENT_FLAG_SET_BIT_KHR specifies whether the implementation supports using the application-provided value for `StdVideoEncodeH265SliceSegmentHeader`::`dependent_slice_segment_flag` in the H.265 slice segment header parameters when that value is `1`.

- VK_VIDEO_ENCODE_H265_STD_SLICE_QP_DELTA_BIT_KHR specifies whether the implementation supports using the application-provided value for `StdVideoEncodeH265SliceSegmentHeader`::`slice_qp_delta` in the H.265 slice segment header parameters when that value is identical across the slice segments of the encoded frame.

- VK_VIDEO_ENCODE_H265_STD_DIFFERENT_SLICE_QP_DELTA_BIT_KHR specifies whether the implementation supports using the application-provided value for `StdVideoEncodeH265SliceSegmentHeader`::`slice_qp_delta` in the H.265 slice segment header parameters when that value is different across the slice segments of the encoded frame.

These capability flags provide information to the application about specific H.265 syntax element values that the implementation supports without having to override them and do not otherwise restrict the values that the application can specify for any of the mentioned H.265 syntax elements.

    // Provided by VK_KHR_video_encode_h265
    typedef VkFlags VkVideoEncodeH265StdFlagsKHR;

`VkVideoEncodeH265StdFlagsKHR` is a bitmask type for setting a mask of zero or more VkVideoEncodeH265StdFlagBitsKHR.

Bits which may be set in VkVideoEncodeH265CapabilitiesKHR::`ctbSizes`, indicating the CTB sizes supported by the implementation, are:

    // Provided by VK_KHR_video_encode_h265
    typedef enum VkVideoEncodeH265CtbSizeFlagBitsKHR {
        VK_VIDEO_ENCODE_H265_CTB_SIZE_16_BIT_KHR = 0x00000001,
        VK_VIDEO_ENCODE_H265_CTB_SIZE_32_BIT_KHR = 0x00000002,
        VK_VIDEO_ENCODE_H265_CTB_SIZE_64_BIT_KHR = 0x00000004,
    } VkVideoEncodeH265CtbSizeFlagBitsKHR;

- VK_VIDEO_ENCODE_H265_CTB_SIZE_16_BIT_KHR specifies that a CTB size of 16x16 is supported.

- VK_VIDEO_ENCODE_H265_CTB_SIZE_32_BIT_KHR specifies that a CTB size of 32x32 is supported.

- VK_VIDEO_ENCODE_H265_CTB_SIZE_64_BIT_KHR specifies that a CTB size of 64x64 is supported.

    // Provided by VK_KHR_video_encode_h265
    typedef VkFlags VkVideoEncodeH265CtbSizeFlagsKHR;

`VkVideoEncodeH265CtbSizeFlagsKHR` is a bitmask type for setting a mask of zero or more VkVideoEncodeH265CtbSizeFlagBitsKHR.

Implementations must support at least one of VkVideoEncodeH265CtbSizeFlagBitsKHR.

Bits which may be set in VkVideoEncodeH265CapabilitiesKHR::`transformBlockSizes`, indicating the transform block sizes supported by the implementation, are:

    // Provided by VK_KHR_video_encode_h265
    typedef enum VkVideoEncodeH265TransformBlockSizeFlagBitsKHR {
        VK_VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_4_BIT_KHR = 0x00000001,
        VK_VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_8_BIT_KHR = 0x00000002,
        VK_VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_16_BIT_KHR = 0x00000004,
        VK_VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_32_BIT_KHR = 0x00000008,
    } VkVideoEncodeH265TransformBlockSizeFlagBitsKHR;

- VK_VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_4_BIT_KHR specifies that a transform block size of 4x4 is supported.

- VK_VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_8_BIT_KHR specifies that a transform block size of 8x8 is supported.

- VK_VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_16_BIT_KHR specifies that a transform block size of 16x16 is supported.

- VK_VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_32_BIT_KHR specifies that a transform block size of 32x32 is supported.

    // Provided by VK_KHR_video_encode_h265
    typedef VkFlags VkVideoEncodeH265TransformBlockSizeFlagsKHR;

`VkVideoEncodeH265TransformBlockSizeFlagsKHR` is a bitmask type for setting a mask of zero or more VkVideoEncodeH265TransformBlockSizeFlagBitsKHR.

Implementations must support at least one of VkVideoEncodeH265TransformBlockSizeFlagBitsKHR.

#### 49.22.8. H.265 Encode Quality Level Properties

When calling vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR with `pVideoProfile->videoCodecOperation` specified as VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR, the VkVideoEncodeH265QualityLevelPropertiesKHR structure must be included in the `pNext` chain of the VkVideoEncodeQualityLevelPropertiesKHR structure to retrieve additional video encode quality level properties specific to H.265 encoding.

The VkVideoEncodeH265QualityLevelPropertiesKHR structure is defined as:

    // Provided by VK_KHR_video_encode_h265
    typedef struct VkVideoEncodeH265QualityLevelPropertiesKHR {
        VkStructureType                         sType;
        void*                                   pNext;
        VkVideoEncodeH265RateControlFlagsKHR    preferredRateControlFlags;
        uint32_t                                preferredGopFrameCount;
        uint32_t                                preferredIdrPeriod;
        uint32_t                                preferredConsecutiveBFrameCount;
        uint32_t                                preferredSubLayerCount;
        VkVideoEncodeH265QpKHR                  preferredConstantQp;
        uint32_t                                preferredMaxL0ReferenceCount;
        uint32_t                                preferredMaxL1ReferenceCount;
    } VkVideoEncodeH265QualityLevelPropertiesKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `preferredRateControlFlags` is a bitmask of VkVideoEncodeH265RateControlFlagBitsKHR values indicating the preferred flags to use for VkVideoEncodeH265RateControlInfoKHR::`flags`.

- `preferredGopFrameCount` indicates the preferred value to use for VkVideoEncodeH265RateControlInfoKHR::`gopFrameCount`.

- `preferredIdrPeriod` indicates the preferred value to use for VkVideoEncodeH265RateControlInfoKHR::`idrPeriod`.

- `preferredConsecutiveBFrameCount` indicates the preferred value to use for VkVideoEncodeH265RateControlInfoKHR::`consecutiveBFrameCount`.

- `preferredSubLayerCount` indicates the preferred value to use for VkVideoEncodeH265RateControlInfoKHR::`subLayerCount`.

- `preferredConstantQp` indicates the preferred values to use for VkVideoEncodeH265NaluSliceSegmentInfoKHR::`constantQp` for each picture type when using rate control mode VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR.

- `preferredMaxL0ReferenceCount` indicates the preferred maximum number of reference pictures to use in the reference list L0.

- `preferredMaxL1ReferenceCount` indicates the preferred maximum number of reference pictures to use in the reference list L1.

Valid Usage (Implicit)

- VUID-VkVideoEncodeH265QualityLevelPropertiesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_QUALITY_LEVEL_PROPERTIES_KHR

Structure Chaining

Extends the structure

  - VkVideoEncodeQualityLevelPropertiesKHR

#### 49.22.9. H.265 Encode Session

Additional parameters can be specified when creating a video session with an H.265 encode profile by including an instance of the VkVideoEncodeH265SessionCreateInfoKHR structure in the `pNext` chain of VkVideoSessionCreateInfoKHR.

The `VkVideoEncodeH265SessionCreateInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_encode_h265
    typedef struct VkVideoEncodeH265SessionCreateInfoKHR {
        VkStructureType         sType;
        const void*             pNext;
        VkBool32                useMaxLevelIdc;
        StdVideoH265LevelIdc    maxLevelIdc;
    } VkVideoEncodeH265SessionCreateInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `useMaxLevelIdc` indicates whether the value of `maxLevelIdc` should be used by the implementation. When it is VK_FALSE, the implementation ignores the value of `maxLevelIdc` and uses the value of VkVideoEncodeH265CapabilitiesKHR::`maxLevelIdc`, as reported by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile.

- `maxLevelIdc` is a `StdVideoH265LevelIdc` value specifying the upper bound on the H.265 level for the video bitstreams produced by the created video session, where enum constant `STD_VIDEO_H265_LEVEL_IDC_<major>_<minor>` identifies H.265 level `<major>.<minor>` as defined in section A.4 of the ITU-T H.265 Specification.

Valid Usage (Implicit)

- VUID-VkVideoEncodeH265SessionCreateInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_SESSION_CREATE_INFO_KHR

Structure Chaining

Extends the structure

  - VkVideoSessionCreateInfoKHR

#### 49.22.10. H.265 Encode Parameter Sets

Video session parameters objects created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR can contain the following types of parameters:

H.265 Video Parameter Sets (VPS)

  Represented by `StdVideoH265VideoParameterSet` structures and interpreted as follows:

  - `reserved1`, `reserved2`, and `reserved3` are used only for padding purposes and are otherwise ignored;

  - `vps_video_parameter_set_id` is used as the key of the VPS entry;

  - the `max_latency_increase_plus1`, `max_dec_pic_buffering_minus1`, and `max_num_reorder_pics` members of the `StdVideoH265DecPicBufMgr` structure pointed to by `pDecPicBufMgr` correspond to `vps_max_latency_increase_plus1`, `vps_max_dec_pic_buffering_minus1`, and `vps_max_num_reorder_pics`, respectively, as defined in section 7.4.3.1 of the ITU-T H.265 Specification;

  - the `StdVideoH265HrdParameters` structure pointed to by `pHrdParameters` is interpreted as follows:

    - `reserved` is used only for padding purposes and is otherwise ignored;

    - `flags.fixed_pic_rate_general_flag` is a bitmask where bit index i corresponds to `fixed_pic_rate_general_flag[i]` as defined in section E.3.2 of the ITU-T H.265 Specification;

    - `flags.fixed_pic_rate_within_cvs_flag` is a bitmask where bit index i corresponds to `fixed_pic_rate_within_cvs_flag[i]` as defined in section E.3.2 of the ITU-T H.265 Specification;

    - `flags.low_delay_hrd_flag` is a bitmask where bit index i corresponds to `low_delay_hrd_flag[i]` as defined in section E.3.2 of the ITU-T H.265 Specification;

    - if `flags.nal_hrd_parameters_present_flag` is set, then `pSubLayerHrdParametersNal` is a pointer to an array of `vps_max_sub_layers_minus1` + 1 number of `StdVideoH265SubLayerHrdParameters` structures where `vps_max_sub_layers_minus1` is the corresponding member of the encompassing `StdVideoH265VideoParameterSet` structure and each element is interpreted as follows:

      - `cbr_flag` is a bitmask where bit index i corresponds to `cbr_flag[i]` as defined in section E.3.3 of the ITU-T H.265 Specification;

      - all other members of the `StdVideoH265SubLayerHrdParameters` structure are interpreted as defined in section E.3.3 of the ITU-T H.265 Specification;

    - if `flags.vcl_hrd_parameters_present_flag` is set, then `pSubLayerHrdParametersVcl` is a pointer to an array of `vps_max_sub_layers_minus1` + 1 number of `StdVideoH265SubLayerHrdParameters` structures where `vps_max_sub_layers_minus1` is the corresponding member of the encompassing `StdVideoH265VideoParameterSet` structure and each element is interpreted as follows:

      - `cbr_flag` is a bitmask where bit index i corresponds to `cbr_flag[i]` as defined in section E.3.3 of the ITU-T H.265 Specification;

      - all other members of the `StdVideoH265SubLayerHrdParameters` structure are interpreted as defined in section E.3.3 of the ITU-T H.265 Specification;

    - all other members of `StdVideoH265HrdParameters` are interpreted as defined in section E.3.2 of the ITU-T H.265 Specification;

  - the `StdVideoH265ProfileTierLevel` structure pointed to by `pProfileTierLevel` are interpreted as follows:

    - `general_level_idc` is one of the enum constants `STD_VIDEO_H265_LEVEL_IDC_<major>_<minor>` identifying the H.265 level `<major>.<minor>` as defined in section A.4 of the ITU-T H.265 Specification;

    - all other members of `StdVideoH265ProfileTierLevel` are interpreted as defined in section 7.4.4 of the ITU-T H.265 Specification;

  - all other members of `StdVideoH265VideoParameterSet` are interpreted as defined in section 7.4.3.1 of the ITU-T H.265 Specification.

H.265 Sequence Parameter Sets (SPS)

  Represented by `StdVideoH265SequenceParameterSet` structures and interpreted as follows:

  - `reserved1` and `reserved2` are used only for padding purposes and are otherwise ignored;

  - the pair constructed from `sps_video_parameter_set_id` and `sps_seq_parameter_set_id` is used as the key of the SPS entry;

  - the `StdVideoH265ProfileTierLevel` structure pointed to by `pProfileTierLevel` are interpreted as follows:

    - `general_level_idc` is one of the enum constants `STD_VIDEO_H265_LEVEL_IDC_<major>_<minor>` identifying the H.265 level `<major>.<minor>` as defined in section A.4 of the ITU-T H.265 Specification;

    - all other members of `StdVideoH265ProfileTierLevel` are interpreted as defined in section 7.4.4 of the ITU-T H.265 Specification;

  - the `max_latency_increase_plus1`, `max_dec_pic_buffering_minus1`, and `max_num_reorder_pics` members of the `StdVideoH265DecPicBufMgr` structure pointed to by `pDecPicBufMgr` correspond to `sps_max_latency_increase_plus1`, `sps_max_dec_pic_buffering_minus1`, and `sps_max_num_reorder_pics`, respectively, as defined in section 7.4.3.2 of the ITU-T H.265 Specification;

  - if `flags.sps_scaling_list_data_present_flag` is set, then the `StdVideoH265ScalingLists` structure pointed to by `pScalingLists` is interpreted as follows:

    - `ScalingList4x4`, `ScalingList8x8`, `ScalingList16x16`, and `ScalingList32x32` correspond to `ScalingList[0]`, `ScalingList[1]`, `ScalingList[2]`, and `ScalingList[3]`, respectively, as defined in section 7.3.4 of the ITU-T H.265 Specification;

    - `ScalingListDCCoef16x16` and `ScalingListDCCoef32x32` correspond to `scaling_list_dc_coef_minus8[0]` and `scaling_list_dc_coef_minus8[1]`, respectively, as defined in section 7.3.4 of the ITU-T H.265 Specification;

  - `pShortTermRefPicSet` is a pointer to an array of `num_short_term_ref_pic_sets` number of `StdVideoH265ShortTermRefPicSet` structures where each element is interpreted as follows:

    - `reserved1`, `reserved2`, and `reserved3` are used only for padding purposes and are otherwise ignored;

    - `used_by_curr_pic_flag` is a bitmask where bit index i corresponds to `used_by_curr_pic_flag[i]` as defined in section 7.4.8 of the ITU-T H.265 Specification;

    - `use_delta_flag` is a bitmask where bit index i corresponds to `use_delta_flag[i]` as defined in section 7.4.8 of the ITU-T H.265 Specification;

    - `used_by_curr_pic_s0_flag` is a bitmask where bit index i corresponds to `used_by_curr_pic_s0_flag[i]` as defined in section 7.4.8 of the ITU-T H.265 Specification;

    - `used_by_curr_pic_s1_flag` is a bitmask where bit index i corresponds to `used_by_curr_pic_s1_flag[i]` as defined in section 7.4.8 of the ITU-T H.265 Specification;

    - all other members of `StdVideoH265ShortTermRefPicSet` are interpreted as defined in section 7.4.8 of the ITU-T H.265 Specification;

  - if `flags.long_term_ref_pics_present_flag` is set then the `StdVideoH265LongTermRefPicsSps` structure pointed to by `pLongTermRefPicsSps` is interpreted as follows:

    - `used_by_curr_pic_lt_sps_flag` is a bitmask where bit index i corresponds to `used_by_curr_pic_lt_sps_flag[i]` as defined in section 7.4.3.2 of the ITU-T H.265 Specification;

    - all other members of `StdVideoH265LongTermRefPicsSps` are interpreted as defined in section 7.4.3.2 of the ITU-T H.265 Specification;

  - if `flags.vui_parameters_present_flag` is set, then the `StdVideoH265SequenceParameterSetVui` structure pointed to by `pSequenceParameterSetVui` is interpreted as follows:

    - `reserved1`, `reserved2`, and `reserved3` are used only for padding purposes and are otherwise ignored;

    - the `StdVideoH265HrdParameters` structure pointed to by `pHrdParameters` is interpreted as follows:

      - `flags.fixed_pic_rate_general_flag` is a bitmask where bit index i corresponds to `fixed_pic_rate_general_flag[i]` as defined in section E.3.2 of the ITU-T H.265 Specification;

      - `flags.fixed_pic_rate_within_cvs_flag` is a bitmask where bit index i corresponds to `fixed_pic_rate_within_cvs_flag[i]` as defined in section E.3.2 of the ITU-T H.265 Specification;

      - `flags.low_delay_hrd_flag` is a bitmask where bit index i corresponds to `low_delay_hrd_flag[i]` as defined in section E.3.2 of the ITU-T H.265 Specification;

      - if `flags.nal_hrd_parameters_present_flag` is set, then `pSubLayerHrdParametersNal` is a pointer to an array of `sps_max_sub_layers_minus1` + 1 number of `StdVideoH265SubLayerHrdParameters` structures where `sps_max_sub_layers_minus1` is the corresponding member of the encompassing `StdVideoH265SequenceParameterSet` structure and each element is interpreted as follows:

        - `cbr_flag` is a bitmask where bit index i corresponds to `cbr_flag[i]` as defined in section E.3.3 of the ITU-T H.265 Specification;

        - all other members of the `StdVideoH265SubLayerHrdParameters` structure are interpreted as defined in section E.3.3 of the ITU-T H.265 Specification;

      - if `flags.vcl_hrd_parameters_present_flag` is set, then `pSubLayerHrdParametersVcl` is a pointer to an array of `sps_max_sub_layers_minus1` + 1 number of `StdVideoH265SubLayerHrdParameters` structures where `sps_max_sub_layers_minus1` is the corresponding member of the encompassing `StdVideoH265SequenceParameterSet` structure and each element is interpreted as follows:

        - `cbr_flag` is a bitmask where bit index i corresponds to `cbr_flag[i]` as defined in section E.3.3 of the ITU-T H.265 Specification;

        - all other members of the `StdVideoH265SubLayerHrdParameters` structure are interpreted as defined in section E.3.3 of the ITU-T H.265 Specification;

      - all other members of `StdVideoH265HrdParameters` are interpreted as defined in section E.3.2 of the ITU-T H.265 Specification;

    - all other members of `pSequenceParameterSetVui` are interpreted as defined in section E.3.1 of the ITU-T H.265 Specification;

  - if `flags.sps_palette_predictor_initializer_present_flag` is set, then the `PredictorPaletteEntries` member of the `StdVideoH265PredictorPaletteEntries` structure pointed to by `pPredictorPaletteEntries` is interpreted as defined in section 7.4.9.13 of the ITU-T H.265 Specification;

  - all other members of `StdVideoH265SequenceParameterSet` are interpreted as defined in section 7.4.3.1 of the ITU-T H.265 Specification.

H.265 Picture Parameter Sets (PPS)

  Represented by `StdVideoH265PictureParameterSet` structures and interpreted as follows:

  - `reserved1`, `reserved2`, and `reserved3` are used only for padding purposes and are otherwise ignored;

  - the triplet constructed from `sps_video_parameter_set_id`, `pps_seq_parameter_set_id`, and `pps_pic_parameter_set_id` is used as the key of the PPS entry;

  - if `flags.pps_scaling_list_data_present_flag` is set, then the `StdVideoH265ScalingLists` structure pointed to by `pScalingLists` is interpreted as follows:

    - `ScalingList4x4`, `ScalingList8x8`, `ScalingList16x16`, and `ScalingList32x32` correspond to `ScalingList[0]`, `ScalingList[1]`, `ScalingList[2]`, and `ScalingList[3]`, respectively, as defined in section 7.3.4 of the ITU-T H.265 Specification;

    - `ScalingListDCCoef16x16` and `ScalingListDCCoef32x32` correspond to `scaling_list_dc_coef_minus8[0]` and `scaling_list_dc_coef_minus8[1]`, respectively, as defined in section 7.3.4 of the ITU-T H.265 Specification;

  - if `flags.pps_palette_predictor_initializer_present_flag` is set, then the `PredictorPaletteEntries` member of the `StdVideoH265PredictorPaletteEntries` structure pointed to by `pPredictorPaletteEntries` is interpreted as defined in section 7.4.9.13 of the ITU-T H.265 Specification;

  - all other members of `StdVideoH265PictureParameterSet` are interpreted as defined in section 7.4.3.3 of the ITU-T H.265 Specification.

Implementations may override any of these parameters according to the semantics defined in the Video Encode Parameter Overrides section before storing the resulting H.265 parameter sets into the video session parameters object. Applications need to use the vkGetEncodedVideoSessionParametersKHR command to determine whether any implementation overrides happened and to retrieve the encoded H.265 parameter sets in order to be able to produce a compliant H.265 video bitstream.

Such H.265 parameter set overrides may also have cascading effects on the implementation overrides applied to the encoded bitstream produced by video encode operations. If the implementation supports the VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_HAS_OVERRIDES_BIT_KHR video encode feedback query flag, then the application can use such queries to retrieve feedback about whether any implementation overrides have been applied to the encoded bitstream.

When a video session parameters object is created with the codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR, the VkVideoSessionParametersCreateInfoKHR::`pNext` chain must include a `VkVideoEncodeH265SessionParametersCreateInfoKHR` structure specifying the capacity and initial contents of the object.

The `VkVideoEncodeH265SessionParametersCreateInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_encode_h265
    typedef struct VkVideoEncodeH265SessionParametersCreateInfoKHR {
        VkStructureType                                        sType;
        const void*                                            pNext;
        uint32_t                                               maxStdVPSCount;
        uint32_t                                               maxStdSPSCount;
        uint32_t                                               maxStdPPSCount;
        const VkVideoEncodeH265SessionParametersAddInfoKHR*    pParametersAddInfo;
    } VkVideoEncodeH265SessionParametersCreateInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `maxStdVPSCount` is the maximum number of H.265 VPS entries the created `VkVideoSessionParametersKHR` can contain.

- `maxStdSPSCount` is the maximum number of H.265 SPS entries the created `VkVideoSessionParametersKHR` can contain.

- `maxStdPPSCount` is the maximum number of H.265 PPS entries the created `VkVideoSessionParametersKHR` can contain.

- `pParametersAddInfo` is `NULL` or a pointer to a VkVideoEncodeH265SessionParametersAddInfoKHR structure specifying H.265 parameters to add upon object creation.

Valid Usage (Implicit)

- VUID-VkVideoEncodeH265SessionParametersCreateInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_SESSION_PARAMETERS_CREATE_INFO_KHR

- VUID-VkVideoEncodeH265SessionParametersCreateInfoKHR-pParametersAddInfo-parameter
  If `pParametersAddInfo` is not `NULL`, `pParametersAddInfo` must be a valid pointer to a valid VkVideoEncodeH265SessionParametersAddInfoKHR structure

Structure Chaining

Extends the structure

  - VkVideoSessionParametersCreateInfoKHR

The `VkVideoEncodeH265SessionParametersAddInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_encode_h265
    typedef struct VkVideoEncodeH265SessionParametersAddInfoKHR {
        VkStructureType                            sType;
        const void*                                pNext;
        uint32_t                                   stdVPSCount;
        const StdVideoH265VideoParameterSet*       pStdVPSs;
        uint32_t                                   stdSPSCount;
        const StdVideoH265SequenceParameterSet*    pStdSPSs;
        uint32_t                                   stdPPSCount;
        const StdVideoH265PictureParameterSet*     pStdPPSs;
    } VkVideoEncodeH265SessionParametersAddInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `stdVPSCount` is the number of elements in the `pStdVPSs` array.

- `pStdVPSs` is a pointer to an array of `StdVideoH265VideoParameterSet` structures describing the H.265 VPS entries to add.

- `stdSPSCount` is the number of elements in the `pStdSPSs` array.

- `pStdSPSs` is a pointer to an array of `StdVideoH265SequenceParameterSet` structures describing the H.265 SPS entries to add.

- `stdPPSCount` is the number of elements in the `pStdPPSs` array.

- `pStdPPSs` is a pointer to an array of `StdVideoH265PictureParameterSet` structures describing the H.265 PPS entries to add.

This structure can be specified in the following places:

- In the `pParametersAddInfo` member of the VkVideoEncodeH265SessionParametersCreateInfoKHR structure specified in the `pNext` chain of VkVideoSessionParametersCreateInfoKHR used to create a video session parameters object. In this case, if the video codec operation the video session parameters object is created with is VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR, then it defines the set of initial parameters to add to the created object (see Creating Video Session Parameters).

- In the `pNext` chain of VkVideoSessionParametersUpdateInfoKHR. In this case, if the video codec operation the video session parameters object to be updated was created with is VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR, then it defines the set of parameters to add to it (see Updating Video Session Parameters).

Valid Usage (Implicit)

- VUID-VkVideoEncodeH265SessionParametersAddInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_SESSION_PARAMETERS_ADD_INFO_KHR

- VUID-VkVideoEncodeH265SessionParametersAddInfoKHR-pStdVPSs-parameter
  If `stdVPSCount` is not `0`, and `pStdVPSs` is not `NULL`, `pStdVPSs` must be a valid pointer to an array of `stdVPSCount` `StdVideoH265VideoParameterSet` values

- VUID-VkVideoEncodeH265SessionParametersAddInfoKHR-pStdSPSs-parameter
  If `stdSPSCount` is not `0`, and `pStdSPSs` is not `NULL`, `pStdSPSs` must be a valid pointer to an array of `stdSPSCount` `StdVideoH265SequenceParameterSet` values

- VUID-VkVideoEncodeH265SessionParametersAddInfoKHR-pStdPPSs-parameter
  If `stdPPSCount` is not `0`, and `pStdPPSs` is not `NULL`, `pStdPPSs` must be a valid pointer to an array of `stdPPSCount` `StdVideoH265PictureParameterSet` values

Structure Chaining

Extends the structure

  - VkVideoSessionParametersUpdateInfoKHR

Valid Usage

- VUID-VkVideoEncodeH265SessionParametersAddInfoKHR-None-06438
  The `vps_video_parameter_set_id` member of each `StdVideoH265VideoParameterSet` structure specified in the elements of `pStdVPSs` must be unique within `pStdVPSs`

- VUID-VkVideoEncodeH265SessionParametersAddInfoKHR-None-06439
  The pair constructed from the `sps_video_parameter_set_id` and `sps_seq_parameter_set_id` members of each `StdVideoH265SequenceParameterSet` structure specified in the elements of `pStdSPSs` must be unique within `pStdSPSs`

- VUID-VkVideoEncodeH265SessionParametersAddInfoKHR-None-06440
  The triplet constructed from the `sps_video_parameter_set_id`, `pps_seq_parameter_set_id`, and `pps_pic_parameter_set_id` members of each `StdVideoH265PictureParameterSet` structure specified in the elements of `pStdPPSs` must be unique within `pStdPPSs`

The `VkVideoEncodeH265SessionParametersGetInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_encode_h265
    typedef struct VkVideoEncodeH265SessionParametersGetInfoKHR {
        VkStructureType    sType;
        const void*        pNext;
        VkBool32           writeStdVPS;
        VkBool32           writeStdSPS;
        VkBool32           writeStdPPS;
        uint32_t           stdVPSId;
        uint32_t           stdSPSId;
        uint32_t           stdPPSId;
    } VkVideoEncodeH265SessionParametersGetInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `writeStdVPS` indicates whether the encoded H.265 video parameter set identified by `stdVPSId` is requested to be retrieved.

- `writeStdSPS` indicates whether the encoded H.265 sequence parameter set identified by the pair constructed from `stdVPSId` and `stdSPSId` is requested to be retrieved.

- `writeStdPPS` indicates whether the encoded H.265 picture parameter set identified by the triplet constructed from `stdVPSId`, `stdSPSId`, and `stdPPSId` is requested to be retrieved.

- `stdVPSId` specifies the H.265 video parameter set ID used to identify the retrieved H.265 video, sequence, and/or picture parameter set(s).

- `stdSPSId` specifies the H.265 sequence parameter set ID used to identify the retrieved H.265 sequence and/or picture parameter set(s) when `writeStdSPS` and/or `writeStdPPS` is VK_TRUE.

- `stdPPSId` specifies the H.265 picture parameter set ID used to identify the retrieved H.265 picture parameter set when `writeStdPPS` is VK_TRUE.

When this structure is specified in the `pNext` chain of the VkVideoEncodeSessionParametersGetInfoKHR structure passed to vkGetEncodedVideoSessionParametersKHR, the command will write encoded parameter data to the output buffer in the following order:

1. The H.265 video parameter set identified by `stdVPSId`, if `writeStdVPS` is VK_TRUE.

2. The H.265 sequence parameter set identified by the pair constructed from `stdVPSId` and `stdSPSId`, if `writeStdSPS` is VK_TRUE.

3. The H.265 picture parameter set identified by the triplet constructed from `stdVPSId`, `stdSPSId`, and `stdPPSId`, if `writeStdPPS` is VK_TRUE.

Valid Usage

- VUID-VkVideoEncodeH265SessionParametersGetInfoKHR-writeStdVPS-08290
  At least one of `writeStdVPS`, `writeStdSPS`, and `writeStdPPS` must be VK_TRUE

Valid Usage (Implicit)

- VUID-VkVideoEncodeH265SessionParametersGetInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_SESSION_PARAMETERS_GET_INFO_KHR

Structure Chaining

Extends the structure

  - VkVideoEncodeSessionParametersGetInfoKHR

The `VkVideoEncodeH265SessionParametersFeedbackInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_encode_h265
    typedef struct VkVideoEncodeH265SessionParametersFeedbackInfoKHR {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           hasStdVPSOverrides;
        VkBool32           hasStdSPSOverrides;
        VkBool32           hasStdPPSOverrides;
    } VkVideoEncodeH265SessionParametersFeedbackInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `hasStdVPSOverrides` indicates whether any of the parameters of the requested H.265 video parameter set, if one was requested via VkVideoEncodeH265SessionParametersGetInfoKHR::`writeStdVPS`, were overridden by the implementation.

- `hasStdSPSOverrides` indicates whether any of the parameters of the requested H.265 sequence parameter set, if one was requested via VkVideoEncodeH265SessionParametersGetInfoKHR::`writeStdSPS`, were overridden by the implementation.

- `hasStdPPSOverrides` indicates whether any of the parameters of the requested H.265 picture parameter set, if one was requested via VkVideoEncodeH265SessionParametersGetInfoKHR::`writeStdPPS`, were overridden by the implementation.

Valid Usage (Implicit)

- VUID-VkVideoEncodeH265SessionParametersFeedbackInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_SESSION_PARAMETERS_FEEDBACK_INFO_KHR

Structure Chaining

Extends the structure

  - VkVideoEncodeSessionParametersFeedbackInfoKHR

#### 49.22.11. H.265 Encoding Parameters

The VkVideoEncodeH265PictureInfoKHR structure is defined as:

    // Provided by VK_KHR_video_encode_h265
    typedef struct VkVideoEncodeH265PictureInfoKHR {
        VkStructureType                                    sType;
        const void*                                        pNext;
        uint32_t                                           naluSliceSegmentEntryCount;
        const VkVideoEncodeH265NaluSliceSegmentInfoKHR*    pNaluSliceSegmentEntries;
        const StdVideoEncodeH265PictureInfo*               pStdPictureInfo;
    } VkVideoEncodeH265PictureInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `naluSliceSegmentEntryCount` is the number of elements in `pNaluSliceSegmentEntries`.

- `pNaluSliceSegmentEntries` is a pointer to an array of `naluSliceSegmentEntryCount` VkVideoEncodeH265NaluSliceSegmentInfoKHR structures specifying the parameters of the individual H.265 slice segments to encode for the input picture.

- `pStdPictureInfo` is a pointer to a `StdVideoEncodeH265PictureInfo` structure specifying H.265 picture information.

This structure is specified in the `pNext` chain of the VkVideoEncodeInfoKHR structure passed to vkCmdEncodeVideoKHR to specify the codec-specific picture information for an H.265 encode operation.

Encode Input Picture Information

  When this structure is specified in the `pNext` chain of the VkVideoEncodeInfoKHR structure passed to vkCmdEncodeVideoKHR, the information related to the encode input picture is defined as follows:

  - The image subregion used is determined according to the H.265 Encode Picture Data Access section.

  - The encode input picture is associated with the H.265 picture information provided in `pStdPictureInfo`.

Std Picture Information

  The members of the `StdVideoEncodeH265PictureInfo` structure pointed to by `pStdPictureInfo` are interpreted as follows:

  - `flags.reserved` and `reserved1` are used only for padding purposes and are otherwise ignored;

  - `flags.is_reference` as defined in section 3.132 of the ITU-T H.265 Specification;

  - `flags.IrapPicFlag` as defined in section 3.73 of the ITU-T H.265 Specification;

  - `flags.used_for_long_term_reference` is used to indicate whether the picture is marked as “used for long-term reference” as defined in section 8.3.2 of the ITU-T H.265 Specification;

  - `flags.discardable_flag` and `cross_layer_bla_flag` as defined in section F.7.4.7.1 of the ITU-T H.265 Specification;

  - `pic_type` as defined in section 7.4.3.5 of the ITU-T H.265 Specification;

  - `sps_video_parameter_set_id`, `pps_seq_parameter_set_id`, and `pps_pic_parameter_set_id` are used to identify the active parameter sets, as described below;

  - `PicOrderCntVal` as defined in section 8.3.1 of the ITU-T H.265 Specification;

  - `TemporalId` as defined in section 7.4.2.2 of the ITU-T H.265 Specification;

  - if `pRefLists` is not `NULL`, then it is a pointer to a `StdVideoEncodeH265ReferenceListsInfo` structure that is interpreted as follows:

    - `flags.reserved` is used only for padding purposes and is otherwise ignored;

    - `ref_pic_list_modification_flag_l0` and `ref_pic_list_modification_flag_l1` as defined in section 7.4.7.2 of the ITU-T H.265 Specification;

    - `num_ref_idx_l0_active_minus1` and `num_ref_idx_l1_active_minus1` as defined in section 7.4.7.1 of the ITU-T H.265 Specification;

    - `RefPicList0` and `RefPicList1` as defined in section 8.3.4 of the ITU-T H.265 Specification where each element of these arrays either identifies an active reference picture using its DPB slot index or contains the value `STD_VIDEO_H265_NO_REFERENCE_PICTURE` to indicate “no reference picture”;

    - `list_entry_l0` and `list_entry_l1` as defined in section 7.4.7.2 of the ITU-T H.265 Specification;

  - if `flags.short_term_ref_pic_set_sps_flag` is set, then the `StdVideoH265ShortTermRefPicSet` structure pointed to by `pShortTermRefPicSet` is interpreted as defined for the elements of the `pShortTermRefPicSet` array specified in H.265 sequence parameter sets.

  - if `flags.long_term_ref_pics_present_flag` is set in the active SPS, then the `StdVideoEncodeH265LongTermRefPics` structure pointed to by `pLongTermRefPics` is interpreted as follows:

    - `used_by_curr_pic_lt_flag` is a bitmask where bit index i corresponds to `used_by_curr_pic_lt_flag[i]` as defined in section 7.4.7.1 of the ITU-T H.265 Specification;

    - all other members of `StdVideoEncodeH265LongTermRefPics` are interpreted as defined in section 7.4.7.1 of the ITU-T H.265 Specification;

  - all other members are interpreted as defined in section 7.4.7.1 of the ITU-T H.265 Specification.

Reference picture setup is controlled by the value of `StdVideoEncodeH265PictureInfo`::`flags.is_reference`. If it is set and a reconstructed picture is specified, then the latter is used as the target of picture reconstruction to activate the DPB slot specified in `pEncodeInfo->pSetupReferenceSlot->slotIndex`. If `StdVideoEncodeH265PictureInfo`::`flags.is_reference` is not set, but a reconstructed picture is specified, then the corresponding picture reference associated with the DPB slot is invalidated, as described in the DPB Slot States section.

Active Parameter Sets

  The members of the `StdVideoEncodeH265PictureInfo` structure pointed to by `pStdPictureInfo` are used to select the active parameter sets to use from the bound video session parameters object, as follows:

  - The active VPS is the VPS identified by the key specified in `StdVideoEncodeH265PictureInfo`::`sps_video_parameter_set_id`.

  - The active SPS is the SPS identified by the key specified by the pair constructed from `StdVideoEncodeH265PictureInfo`::`sps_video_parameter_set_id` and `StdVideoEncodeH265PictureInfo`::`pps_seq_parameter_set_id`.

  - The active PPS is the PPS identified by the key specified by the triplet constructed from `StdVideoEncodeH265PictureInfo`::`sps_video_parameter_set_id`, `StdVideoEncodeH265PictureInfo`::`pps_seq_parameter_set_id`, and `StdVideoEncodeH265PictureInfo`::`pps_pic_parameter_set_id`.

H.265 encoding uses explicit weighted sample prediction for a slice segment, as defined in section 8.5.3.3.4 of the ITU-T H.265 Specification, if any of the following conditions are true for the active PPS and the `pStdSliceSegmentHeader` member of the corresponding element of `pNaluSliceSegmentEntries`:

- `pStdSliceSegmentHeader->slice_type` is `STD_VIDEO_H265_SLICE_TYPE_P` and `weighted_pred_flag` is enabled in the active PPS.

- `pStdSliceSegmentHeader->slice_type` is `STD_VIDEO_H265_SLICE_TYPE_B` and `weighted_bipred_flag` is enabled in the active PPS.

The number of H.265 tiles, as defined in section 3.174 of the ITU-T H.265 Specification, is derived from the `num_tile_columns_minus1` and `num_tile_rows_minus1` members of the active PPS as follows:

  (`num_tile_columns_minus1` + 1) × (`num_tile_rows_minus1` + 1)

Valid Usage

- VUID-VkVideoEncodeH265PictureInfoKHR-naluSliceSegmentEntryCount-08306
  `naluSliceSegmentEntryCount` must be between `1` and VkVideoEncodeH265CapabilitiesKHR::`maxSliceSegmentCount`, inclusive, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the used video profile

- VUID-VkVideoEncodeH265PictureInfoKHR-flags-08323
  If VkVideoEncodeH265CapabilitiesKHR::`flags`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the used video profile, does not include VK_VIDEO_ENCODE_H265_CAPABILITY_MULTIPLE_TILES_PER_SLICE_SEGMENT_BIT_KHR, then `naluSliceSegmentEntryCount` must be greater than or equal to the number of H.265 tiles in the picture

- VUID-VkVideoEncodeH265PictureInfoKHR-flags-08324
  If VkVideoEncodeH265CapabilitiesKHR::`flags`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the used video profile, does not include VK_VIDEO_ENCODE_H265_CAPABILITY_MULTIPLE_SLICE_SEGMENTS_PER_TILE_BIT_KHR, then `naluSliceSegmentEntryCount` must be less than or equal to the number of H.265 tiles in the picture

- VUID-VkVideoEncodeH265PictureInfoKHR-flags-08316
  If VkVideoEncodeH265CapabilitiesKHR::`flags`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the used video profile, does not include VK_VIDEO_ENCODE_H265_CAPABILITY_PREDICTION_WEIGHT_TABLE_GENERATED_BIT_KHR and the slice segment corresponding to any element of `pNaluSliceSegmentEntries` uses explicit weighted sample prediction, then VkVideoEncodeH265NaluSliceSegmentInfoKHR::`pStdSliceSegmentHeader->pWeightTable` must not be `NULL` for that element of `pNaluSliceSegmentEntries`

Valid Usage (Implicit)

- VUID-VkVideoEncodeH265PictureInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_PICTURE_INFO_KHR

- VUID-VkVideoEncodeH265PictureInfoKHR-pNaluSliceSegmentEntries-parameter
  `pNaluSliceSegmentEntries` must be a valid pointer to an array of `naluSliceSegmentEntryCount` valid VkVideoEncodeH265NaluSliceSegmentInfoKHR structures

- VUID-VkVideoEncodeH265PictureInfoKHR-pStdPictureInfo-parameter
  `pStdPictureInfo` must be a valid pointer to a valid `StdVideoEncodeH265PictureInfo` value

- VUID-VkVideoEncodeH265PictureInfoKHR-naluSliceSegmentEntryCount-arraylength
  `naluSliceSegmentEntryCount` must be greater than `0`

Structure Chaining

Extends the structure

  - VkVideoEncodeInfoKHR

The VkVideoEncodeH265NaluSliceSegmentInfoKHR structure is defined as:

    // Provided by VK_KHR_video_encode_h265
    typedef struct VkVideoEncodeH265NaluSliceSegmentInfoKHR {
        VkStructureType                                sType;
        const void*                                    pNext;
        int32_t                                        constantQp;
        const StdVideoEncodeH265SliceSegmentHeader*    pStdSliceSegmentHeader;
    } VkVideoEncodeH265NaluSliceSegmentInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `constantQp` is the QP to use for the slice segment if the current rate control mode configured for the video session is VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR.

- `pStdSliceSegmentHeader` is a pointer to a `StdVideoEncodeH265SliceSegmentHeader` structure specifying H.265 slice segment header parameters for the slice segment.

Std Slice Segment Header Parameters

  The members of the `StdVideoEncodeH265SliceSegmentHeader` structure pointed to by `pStdSliceSegmentHeader` are interpreted as follows:

  - `flags.reserved` and `reserved1` are used only for padding purposes and are otherwise ignored;

  - if `pWeightTable` is not `NULL`, then it is a pointer to a `StdVideoEncodeH265WeightTable` that is interpreted as follows:

    - `flags.luma_weight_l0_flag`, `flags.chroma_weight_l0_flag`, `flags.luma_weight_l1_flag`, and `flags.chroma_weight_l1_flag` are bitmasks where bit index i corresponds to `luma_weight_l0_flag[i]`, `chroma_weight_l0_flag[i]`, `luma_weight_l1_flag[i]`, and `chroma_weight_l1_flag[i]`, respectively, as defined in section 7.4.7.3 of the ITU-T H.265 Specification;

    - all other members of `StdVideoEncodeH265WeightTable` are interpreted as defined in section 7.4.7.3 of the ITU-T H.265 Specification;

  - all other members are interpreted as defined in section 7.4.7.1 of the ITU-T H.265 Specification.

Valid Usage (Implicit)

- VUID-VkVideoEncodeH265NaluSliceSegmentInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_NALU_SLICE_SEGMENT_INFO_KHR

- VUID-VkVideoEncodeH265NaluSliceSegmentInfoKHR-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkVideoEncodeH265NaluSliceSegmentInfoKHR-pStdSliceSegmentHeader-parameter
  `pStdSliceSegmentHeader` must be a valid pointer to a valid `StdVideoEncodeH265SliceSegmentHeader` value

The VkVideoEncodeH265DpbSlotInfoKHR structure is defined as:

    // Provided by VK_KHR_video_encode_h265
    typedef struct VkVideoEncodeH265DpbSlotInfoKHR {
        VkStructureType                           sType;
        const void*                               pNext;
        const StdVideoEncodeH265ReferenceInfo*    pStdReferenceInfo;
    } VkVideoEncodeH265DpbSlotInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `pStdReferenceInfo` is a pointer to a `StdVideoEncodeH265ReferenceInfo` structure specifying H.265 reference information.

This structure is specified in the `pNext` chain of VkVideoEncodeInfoKHR::`pSetupReferenceSlot`, if not `NULL`, and the `pNext` chain of the elements of VkVideoEncodeInfoKHR::`pReferenceSlots` to specify the codec-specific reference picture information for an H.265 encode operation.

Active Reference Picture Information

  When this structure is specified in the `pNext` chain of the elements of VkVideoEncodeInfoKHR::`pReferenceSlots`, one element is added to the list of active reference pictures used by the video encode operation for each element of VkVideoEncodeInfoKHR::`pReferenceSlots` as follows:

  - The image subregion used is determined according to the H.265 Encode Picture Data Access section.

  - The reference picture is associated with the DPB slot index specified in the `slotIndex` member of the corresponding element of VkVideoEncodeInfoKHR::`pReferenceSlots`.

  - The reference picture is associated with the H.265 reference information provided in `pStdReferenceInfo`.

Reconstructed Picture Information

  When this structure is specified in the `pNext` chain of VkVideoEncodeInfoKHR::`pSetupReferenceSlot`, the information related to the reconstructed picture is defined as follows:

  - The image subregion used is determined according to the H.265 Encode Picture Data Access section.

  - If reference picture setup is requested, then the reconstructed picture is used to activate the DPB slot with the index specified in VkVideoEncodeInfoKHR::`pSetupReferenceSlot->slotIndex`.

  - The reconstructed picture is associated with the H.265 reference information provided in `pStdReferenceInfo`.

Std Reference Information

  The members of the `StdVideoEncodeH265ReferenceInfo` structure pointed to by `pStdReferenceInfo` are interpreted as follows:

  - `flags.reserved` is used only for padding purposes and is otherwise ignored;

  - `flags.used_for_long_term_reference` is used to indicate whether the picture is marked as “used for long-term reference” as defined in section 8.3.2 of the ITU-T H.265 Specification;

  - `flags.unused_for_reference` is used to indicate whether the picture is marked as “unused for reference” as defined in section 8.3.2 of the ITU-T H.265 Specification;

  - `pic_type` as defined in section 7.4.3.5 of the ITU-T H.265 Specification;

  - `PicOrderCntVal` as defined in section 8.3.1 of the ITU-T H.265 Specification;

  - `TemporalId` as defined in section 7.4.2.2 of the ITU-T H.265 Specification.

Valid Usage (Implicit)

- VUID-VkVideoEncodeH265DpbSlotInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_DPB_SLOT_INFO_KHR

- VUID-VkVideoEncodeH265DpbSlotInfoKHR-pStdReferenceInfo-parameter
  `pStdReferenceInfo` must be a valid pointer to a valid `StdVideoEncodeH265ReferenceInfo` value

Structure Chaining

Extends the structure

  - VkVideoReferenceSlotInfoKHR

#### 49.22.12. H.265 Encode Rate Control

##### Group of Pictures

In case of H.265 encoding it is common practice to follow a regular pattern of different picture types in display order when encoding subsequent frames. This pattern is referred to as the group of pictures (GOP).

A regular GOP is defined by the following parameters:

- The number of frames in the GOP;

- The number of consecutive B frames between I and/or P frames in display order.

Frame types in a regular GOP follow each other in display order according to the following algorithm:

1. The first frame is always an I or an IDR frame.

2. This is followed by a number of consecutive B frames, as defined above.

3. If the number of frames in the GOP is not reached yet, then the next frame is a P frame and the algorithm continues from step 2.

Figure 46. H.265 regular GOP starting with an I frame

When IDR frames are used in a video sequence, the IDR period refers to the distance between subsequent IDR frames.

It is also typical for H.265 encoding to use specific reference picture usage patterns across the frames of the GOP. The two most common reference patterns used are as follows:

Flat Reference Pattern

  - Each P frame uses the last non-B frame, in display order, as reference.

  - Each B frame uses the last non-B frame, in display order, as its forward reference, and uses the next non-B frame, in display order, as its backward reference.

Figure 47. H.265 flat reference pattern

Dyadic Reference Pattern

  - Each P frame uses the last non-B frame, in display order, as reference.

  - The following algorithm is applied to the sequence of consecutive B frames between I and/or P frames in display order:

    1. The B frame in the middle of this sequence uses the frame preceding the sequence as its forward reference, and uses the frame following the sequence as its backward reference.

    2. The algorithm is executed recursively for the following frame sequences:

       - The B frames of the original sequence preceding the frame in the middle, if any.

       - The B frames of the original sequence following the frame in the middle, if any.

Figure 48. H.265 dyadic reference pattern

The application can provide guidance to the implementation’s rate control algorithm about the structure of the GOP used by the application. Any such guidance about the GOP and its structure does not mandate that specific GOP structure to be used by the application, as the picture type of individual encoded pictures is still application-controlled, however, any deviation from the provided guidance may result in undesired rate control behavior including, but not limited, to the implementation not being able to conform to the expected average or target bitrates, or other rate control parameters specified by the application.

When an H.265 encode session is used to encode multiple temporal sub-layers, it is also common practice to follow a regular pattern for the H.265 temporal ID for the encoded pictures in display order when encoding subsequent frames. This pattern is referred to as the temporal GOP. The most common temporal layer pattern used is as follows:

Dyadic Temporal Sub-Layer Pattern

  - The number of frames in the temporal GOP is 2n-1, where n is the number of temporal sub-layers.

  - The ith frame in the temporal GOP uses temporal ID t, if and only if the index of the least significant bit set in i equals n-t-1, except for the first frame, which is the only frame in the temporal GOP using temporal ID zero.

  - The ith frame in the temporal GOP uses the rth frame as reference, where r is calculated from i by clearing the least significant bit set in it, except for the first frame in the temporal GOP, which uses the first frame of the previous temporal GOP, if any, as reference.

Figure 49. H.265 dyadic temporal sub-layer pattern

Note | Multi-layer rate control and multi-layer coding are typically used for streaming cases where low latency is expected, hence B pictures with backward prediction are usually not used.

The `VkVideoEncodeH265RateControlInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_encode_h265
    typedef struct VkVideoEncodeH265RateControlInfoKHR {
        VkStructureType                         sType;
        const void*                             pNext;
        VkVideoEncodeH265RateControlFlagsKHR    flags;
        uint32_t                                gopFrameCount;
        uint32_t                                idrPeriod;
        uint32_t                                consecutiveBFrameCount;
        uint32_t                                subLayerCount;
    } VkVideoEncodeH265RateControlInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask of VkVideoEncodeH265RateControlFlagBitsKHR specifying H.265 rate control flags.

- `gopFrameCount` is the number of frames within a group of pictures (GOP) intended to be used by the application. If it is 0, the rate control algorithm may assume an implementation-dependent GOP length. If it is `UINT32_MAX`, the GOP length is treated as infinite.

- `idrPeriod` is the interval, in terms of number of frames, between two IDR frames (see IDR period). If it is 0, the rate control algorithm may assume an implementation-dependent IDR period. If it is `UINT32_MAX`, the IDR period is treated as infinite.

- `consecutiveBFrameCount` is the number of consecutive B frames between I and/or P frames within the GOP.

- `subLayerCount` specifies the number of H.265 sub-layers that the application intends to use.

When an instance of this structure is included in the `pNext` chain of the VkVideoCodingControlInfoKHR structure passed to the vkCmdControlVideoCodingKHR command, and VkVideoCodingControlInfoKHR::`flags` includes VK_VIDEO_CODING_CONTROL_ENCODE_RATE_CONTROL_BIT_KHR, the parameters in this structure are used as guidance for the implementation’s rate control algorithm (see Video Coding Control).

If `flags` includes VK_VIDEO_ENCODE_H265_RATE_CONTROL_ATTEMPT_HRD_COMPLIANCE_BIT_KHR, then the rate control state is reset to an initial state to meet HRD compliance requirements. Otherwise the new rate control state may be applied without a reset depending on the implementation and the specified rate control parameters.

Note | It would be possible to infer the picture type to be used when encoding a frame, on the basis of the values provided for `consecutiveBFrameCount`, `idrPeriod`, and `gopFrameCount`, but this inferred picture type will not be used by implementations to override the picture type provided to the video encode operation.

Valid Usage

- VUID-VkVideoEncodeH265RateControlInfoKHR-flags-08291
  If VkVideoEncodeH265CapabilitiesKHR::`flags`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the used video profile, does not include VK_VIDEO_ENCODE_H265_CAPABILITY_HRD_COMPLIANCE_BIT_KHR, then `flags` must not contain VK_VIDEO_ENCODE_H265_RATE_CONTROL_ATTEMPT_HRD_COMPLIANCE_BIT_KHR

- VUID-VkVideoEncodeH265RateControlInfoKHR-flags-08292
  If `flags` contains VK_VIDEO_ENCODE_H265_RATE_CONTROL_REFERENCE_PATTERN_FLAT_BIT_KHR or VK_VIDEO_ENCODE_H265_RATE_CONTROL_REFERENCE_PATTERN_DYADIC_BIT_KHR, then it must also contain VK_VIDEO_ENCODE_H265_RATE_CONTROL_REGULAR_GOP_BIT_KHR

- VUID-VkVideoEncodeH265RateControlInfoKHR-flags-08293
  If `flags` contains VK_VIDEO_ENCODE_H265_RATE_CONTROL_REFERENCE_PATTERN_FLAT_BIT_KHR, then it must not also contain VK_VIDEO_ENCODE_H265_RATE_CONTROL_REFERENCE_PATTERN_DYADIC_BIT_KHR

- VUID-VkVideoEncodeH265RateControlInfoKHR-flags-08294
  If `flags` contains VK_VIDEO_ENCODE_H265_RATE_CONTROL_REGULAR_GOP_BIT_KHR, then `gopFrameCount` must be greater than `0`

- VUID-VkVideoEncodeH265RateControlInfoKHR-idrPeriod-08295
  If `idrPeriod` is not `0`, then it must be greater than or equal to `gopFrameCount`

- VUID-VkVideoEncodeH265RateControlInfoKHR-consecutiveBFrameCount-08296
  If `consecutiveBFrameCount` is not `0`, then it must be less than `gopFrameCount`

Valid Usage (Implicit)

- VUID-VkVideoEncodeH265RateControlInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_RATE_CONTROL_INFO_KHR

- VUID-VkVideoEncodeH265RateControlInfoKHR-flags-parameter
  `flags` must be a valid combination of VkVideoEncodeH265RateControlFlagBitsKHR values

Structure Chaining

Extends the structures

  - VkVideoBeginCodingInfoKHR

  - VkVideoCodingControlInfoKHR

Bits which can be set in VkVideoEncodeH265RateControlInfoKHR::`flags`, specifying H.265 rate control flags, are:

    // Provided by VK_KHR_video_encode_h265
    typedef enum VkVideoEncodeH265RateControlFlagBitsKHR {
        VK_VIDEO_ENCODE_H265_RATE_CONTROL_ATTEMPT_HRD_COMPLIANCE_BIT_KHR = 0x00000001,
        VK_VIDEO_ENCODE_H265_RATE_CONTROL_REGULAR_GOP_BIT_KHR = 0x00000002,
        VK_VIDEO_ENCODE_H265_RATE_CONTROL_REFERENCE_PATTERN_FLAT_BIT_KHR = 0x00000004,
        VK_VIDEO_ENCODE_H265_RATE_CONTROL_REFERENCE_PATTERN_DYADIC_BIT_KHR = 0x00000008,
        VK_VIDEO_ENCODE_H265_RATE_CONTROL_TEMPORAL_SUB_LAYER_PATTERN_DYADIC_BIT_KHR = 0x00000010,
    } VkVideoEncodeH265RateControlFlagBitsKHR;

- VK_VIDEO_ENCODE_H265_RATE_CONTROL_ATTEMPT_HRD_COMPLIANCE_BIT_KHR specifies that rate control should attempt to produce an HRD compliant bitstream, as defined in annex C of the ITU-T H.265 Specification.

- VK_VIDEO_ENCODE_H265_RATE_CONTROL_REGULAR_GOP_BIT_KHR specifies that the application intends to use a regular GOP structure according to the parameters specified in the `gopFrameCount`, `idrPeriod`, and `consecutiveBFrameCount` members of the VkVideoEncodeH265RateControlInfoKHR structure.

- VK_VIDEO_ENCODE_H265_RATE_CONTROL_REFERENCE_PATTERN_FLAT_BIT_KHR specifies that the application intends to follow a flat reference pattern in the GOP.

- VK_VIDEO_ENCODE_H265_RATE_CONTROL_REFERENCE_PATTERN_DYADIC_BIT_KHR specifies that the application intends to follow a dyadic reference pattern in the GOP.

- VK_VIDEO_ENCODE_H265_RATE_CONTROL_TEMPORAL_SUB_LAYER_PATTERN_DYADIC_BIT_KHR specifies that the application intends to follow a dyadic temporal sub-layer pattern.

    // Provided by VK_KHR_video_encode_h265
    typedef VkFlags VkVideoEncodeH265RateControlFlagsKHR;

`VkVideoEncodeH265RateControlFlagsKHR` is a bitmask type for setting a mask of zero or more VkVideoEncodeH265RateControlFlagBitsKHR.

##### Rate Control Layers

The `VkVideoEncodeH265RateControlLayerInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_encode_h265
    typedef struct VkVideoEncodeH265RateControlLayerInfoKHR {
        VkStructureType                  sType;
        const void*                      pNext;
        VkBool32                         useMinQp;
        VkVideoEncodeH265QpKHR           minQp;
        VkBool32                         useMaxQp;
        VkVideoEncodeH265QpKHR           maxQp;
        VkBool32                         useMaxFrameSize;
        VkVideoEncodeH265FrameSizeKHR    maxFrameSize;
    } VkVideoEncodeH265RateControlLayerInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `useMinQp` indicates whether the QP values determined by rate control will be clamped to the lower bounds on the QP values specified in `minQp`.

- `minQp` specifies the lower bounds on the QP values, for each picture type, that the implementation’s rate control algorithm will use when `useMinQp` is VK_TRUE.

- `useMaxQp` indicates whether the QP values determined by rate control will be clamped to the upper bounds on the QP values specified in `maxQp`.

- `maxQp` specifies the upper bounds on the QP values, for each picture type, that the implementation’s rate control algorithm will use when `useMaxQp` is VK_TRUE.

- `useMaxFrameSize` indicates whether the implementation’s rate control algorithm should use the values specified in `maxFrameSize` as the upper bounds on the encoded frame size for each picture type.

- `maxFrameSize` specifies the upper bounds on the encoded frame size, for each picture type, when `useMaxFrameSize` is VK_TRUE.

When used, the values in `minQp` and `maxQp` guarantee that the effective QP values used by the implementation will respect those lower and upper bounds, respectively. However, limiting the range of QP values that the implementation is able to use will also limit the capabilities of the implementation’s rate control algorithm to comply to other constraints. In particular, the implementation may not be able to comply to the following:

- The average and/or peak bitrate values to be used for the encoded bitstream specified in the `averageBitrate` and `maxBitrate` members of the VkVideoEncodeRateControlLayerInfoKHR structure.

- The upper bounds on the encoded frame size, for each picture type, specified in the `maxFrameSize` member of `VkVideoEncodeH265RateControlLayerInfoKHR`.

Note | In general, applications need to configure rate control parameters appropriately in order to be able to get the desired rate control behavior, as described in the Video Encode Rate Control section.

When an instance of this structure is included in the `pNext` chain of a VkVideoEncodeRateControlLayerInfoKHR structure specified in one of the elements of the `pLayers` array member of the VkVideoEncodeRateControlInfoKHR structure passed to the vkCmdControlVideoCodingKHR command, VkVideoCodingControlInfoKHR::`flags` includes VK_VIDEO_CODING_CONTROL_ENCODE_RATE_CONTROL_BIT_KHR, and the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR, it specifies the H.265-specific rate control parameters of the rate control layer corresponding to that element of `pLayers`.

Valid Usage

- VUID-VkVideoEncodeH265RateControlLayerInfoKHR-useMinQp-08297
  If `useMinQp` is VK_TRUE, then the `qpI`, `qpP`, and `qpB` members of `minQp` must all be between VkVideoEncodeH265CapabilitiesKHR::`minQp` and VkVideoEncodeH265CapabilitiesKHR::`maxQp`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the used video profile

- VUID-VkVideoEncodeH265RateControlLayerInfoKHR-useMaxQp-08298
  If `useMaxQp` is VK_TRUE, then the `qpI`, `qpP`, and `qpB` members of `maxQp` must all be between VkVideoEncodeH265CapabilitiesKHR::`minQp` and VkVideoEncodeH265CapabilitiesKHR::`maxQp`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the used video profile

- VUID-VkVideoEncodeH265RateControlLayerInfoKHR-useMinQp-08299
  If `useMinQp` is VK_TRUE and VkVideoEncodeH265CapabilitiesKHR::`flags`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the used video profile, does not include VK_VIDEO_ENCODE_H265_CAPABILITY_PER_PICTURE_TYPE_MIN_MAX_QP_BIT_KHR, then the `qpI`, `qpP`, and `qpB` members of `minQp` must all specify the same value

- VUID-VkVideoEncodeH265RateControlLayerInfoKHR-useMaxQp-08300
  If `useMaxQp` is VK_TRUE and VkVideoEncodeH265CapabilitiesKHR::`flags`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the used video profile, does not include VK_VIDEO_ENCODE_H265_CAPABILITY_PER_PICTURE_TYPE_MIN_MAX_QP_BIT_KHR, then the `qpI`, `qpP`, and `qpB` members of `maxQp` must all specify the same value

- VUID-VkVideoEncodeH265RateControlLayerInfoKHR-useMinQp-08375
  If `useMinQp` and `useMaxQp` are both VK_TRUE, then the `qpI`, `qpP`, and `qpB` members of `minQp` must all be less than or equal to the respective members of `maxQp`

Valid Usage (Implicit)

- VUID-VkVideoEncodeH265RateControlLayerInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_RATE_CONTROL_LAYER_INFO_KHR

- VUID-VkVideoEncodeH265RateControlLayerInfoKHR-minQp-parameter
  `minQp` must be a valid VkVideoEncodeH265QpKHR structure

- VUID-VkVideoEncodeH265RateControlLayerInfoKHR-maxQp-parameter
  `maxQp` must be a valid VkVideoEncodeH265QpKHR structure

- VUID-VkVideoEncodeH265RateControlLayerInfoKHR-maxFrameSize-parameter
  `maxFrameSize` must be a valid VkVideoEncodeH265FrameSizeKHR structure

Structure Chaining

Extends the structure

  - VkVideoEncodeRateControlLayerInfoKHR

The `VkVideoEncodeH265QpKHR` structure is defined as:

    // Provided by VK_KHR_video_encode_h265
    typedef struct VkVideoEncodeH265QpKHR {
        int32_t    qpI;
        int32_t    qpP;
        int32_t    qpB;
    } VkVideoEncodeH265QpKHR;

- `qpI` is the QP to be used for I pictures.

- `qpP` is the QP to be used for P pictures.

- `qpB` is the QP to be used for B pictures.

The `VkVideoEncodeH265FrameSizeKHR` structure is defined as:

    // Provided by VK_KHR_video_encode_h265
    typedef struct VkVideoEncodeH265FrameSizeKHR {
        uint32_t    frameISize;
        uint32_t    framePSize;
        uint32_t    frameBSize;
    } VkVideoEncodeH265FrameSizeKHR;

- `frameISize` is the size in bytes to be used for I frames.

- `framePSize` is the size in bytes to be used for P frames.

- `frameBSize` is the size in bytes to be used for B frames.

##### GOP Remaining Frames

Besides session level rate control configuration, the application can specify the number of frames per frame type remaining in the group of pictures (GOP).

The `VkVideoEncodeH265GopRemainingFrameInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_encode_h265
    typedef struct VkVideoEncodeH265GopRemainingFrameInfoKHR {
        VkStructureType    sType;
        const void*        pNext;
        VkBool32           useGopRemainingFrames;
        uint32_t           gopRemainingI;
        uint32_t           gopRemainingP;
        uint32_t           gopRemainingB;
    } VkVideoEncodeH265GopRemainingFrameInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `useGopRemainingFrames` indicates whether the implementation’s rate control algorithm should use the values specified in `gopRemainingI`, `gopRemainingP`, and `gopRemainingB`. If `useGopRemainingFrames` is VK_FALSE, then the values of `gopRemainingI`, `gopRemainingP`, and `gopRemainingB` are ignored.

- `gopRemainingI` specifies the number of I frames the implementation’s rate control algorithm should assume to be remaining in the GOP prior to executing the video encode operation.

- `gopRemainingP` specifies the number of P frames the implementation’s rate control algorithm should assume to be remaining in the GOP prior to executing the video encode operation.

- `gopRemainingB` specifies the number of B frames the implementation’s rate control algorithm should assume to be remaining in the GOP prior to executing the video encode operation.

Setting `useGopRemainingFrames` to VK_TRUE and including this structure in the `pNext` chain of VkVideoBeginCodingInfoKHR is only mandatory if the VkVideoEncodeH265CapabilitiesKHR::`requiresGopRemainingFrames` reported for the used video profile is VK_TRUE. However, implementations may use these remaining frame counts, when specified, even when it is not required. In particular, when the application does not use a regular GOP structure, these values may provide additional guidance for the implementation’s rate control algorithm.

The VkVideoEncodeH265CapabilitiesKHR::`prefersGopRemainingFrames` capability is also used to indicate that the implementation’s rate control algorithm may operate more accurately if the application specifies the remaining frame counts using this structure.

As with other rate control guidance values, if the effective order and number of frames encoded by the application are not in line with the remaining frame counts specified in this structure at any given point, then the behavior of the implementation’s rate control algorithm may deviate from the one expected by the application.

Valid Usage (Implicit)

- VUID-VkVideoEncodeH265GopRemainingFrameInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_GOP_REMAINING_FRAME_INFO_KHR

Structure Chaining

Extends the structure

  - VkVideoBeginCodingInfoKHR

##### H.265 QP Delta Maps

Quantization delta maps used with an H.265 encode profile are referred to as QP delta maps and their texels contain integer values representing QP delta values that are applied in the process of determining the quantization parameters of the encoded picture.

Accordingly, H.265 QP delta maps always have single channel integer formats, as reported in VkVideoFormatPropertiesKHR::`format`.

When the rate control mode is VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR, the QP delta values are added to the per slice segment constant QP values that, in effect, enable the application to explicitly control the used QP values at the granularity of the used quantization map texel size.

For all other rate control modes, the QP delta values can be used to offset the QP values that the rate control algorithm would otherwise produce.

##### H.265 Encode Quantization

Performing H.265 encode operations involves the process of assigning QP values to individual H.265 coding units. This process depends on the used rate control mode, as well as other encode and rate control parameters, as described below:

- If the configured rate control mode is VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DEFAULT_KHR, then the QP value is initialized by the implementation-specific default rate control algorithm.

  - If the video encode operation is issued with a quantization delta map, the QP delta value corresponding to the coding unit, as fetched from the quantization map, is added to the previously determined QP value. If the fetched QP delta value falls outside the supported QP delta value range reported in the `minQpDelta` and `maxQpDelta` members of VkVideoEncodeH265QuantizationMapCapabilitiesKHR, then the QP value used for the coding unit becomes undefined.

- If the configured rate control mode is VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR, then the QP value is initialized from the constant QP value specified for the H.265 slice segment the coding unit is part of.

  - If the video encode operation is issued with a quantization delta map, the QP delta value corresponding to the coding unit, as fetched from the quantization map, is added to the previously determined QP value. If the fetched QP delta value falls outside the supported QP delta value range reported in the `minQpDelta` and `maxQpDelta` members of VkVideoEncodeH265QuantizationMapCapabilitiesKHR, then the QP value used for the coding unit becomes undefined.

- If the configured rate control mode is not VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DEFAULT_KHR or VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR, then the QP value is initialized by the corresponding rate control algorithm.

  - If the video encode operation is issued with a quantization delta map, the QP delta value corresponding to the coding unit, as fetched from the quantization map, is added to the previously determined QP value. If the fetched QP delta value falls outside the supported QP delta value range reported in the `minQpDelta` and `maxQpDelta` members of VkVideoEncodeH265QuantizationMapCapabilitiesKHR, then the QP value used for the coding unit becomes undefined.

  - If the video encode operation is issued with an emphasis map, the rate control will adjust the QP value based on the emphasis value corresponding to the coding unit, as fetched from the quantization map, according to the following equation:

    QPnew = f(QPprev,e)

    Where QPnew is the resulting QP value, QPprev is the previously determined QP value, e is the emphasis value corresponding to the coding unit, and f is an implementation-defined function for which the following implication is true:

    e1 < e2 ⇒ f(QP,e1) ≥ f(QP,e2)

    Note | This means that lower emphasis values will result in higher QP values, whereas higher emphasis values will result in lower QP values, but the function is not strictly decreasing with respect to the input emphasis value for a given input QP value.

  - If clamping to minimum QP values is enabled in the applied rate control layer, then the QP value is clamped to the corresponding minimum QP value.

  - If clamping to maximum QP values is enabled in the applied rate control layer, then the QP value is clamped to the corresponding maximum QP value.

- If VK_VIDEO_ENCODE_H265_CAPABILITY_CU_QP_DIFF_WRAPAROUND_BIT_KHR is not supported, then the determined QP value is clamped in such a way that the `CuQpDeltaVal` value of the encoded coding unit complies to the modified version of equation 8-283 of the ITU-T H.265 Specification.

  Note | The effect of this is that the maximum QP difference across subsequent coding units is limited to the [-(26 + QpBdOffsetY / 2), 25 + QpBdOffsetY / 2] range and only has an observable change in behavior when the video encode operation is issued with a QP delta map.

- In all cases, the final QP value is clamped to the QP value range supported by the video profile, as reported in the `minQp` and `maxQp` members of VkVideoEncodeH265CapabilitiesKHR.

#### 49.22.13. H.265 Encode Requirements

This section described the required H.265 encoding capabilities for physical devices that have at least one queue family that supports the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR, as returned by vkGetPhysicalDeviceQueueFamilyProperties2 in VkQueueFamilyVideoPropertiesKHR::`videoCodecOperations`.

Table 67. Required Video Std Header Versions
Video Std Header Name | Version
--- | ---
`vulkan_video_codec_h265std_encode` | 1.0.0

Table 68. Required Video Capabilities
Video Capability | Requirement | Requirement Type1
--- | --- | ---
VkVideoCapabilitiesKHR |  |
`flags` | - | min
`minBitstreamBufferOffsetAlignment` | 4096 | max
`minBitstreamBufferSizeAlignment` | 4096 | max
`pictureAccessGranularity` | (64,64) | max
`minCodedExtent` | - | max
`maxCodedExtent` | - | min
`maxDpbSlots` | 0 | min
`maxActiveReferencePictures` | 0 | min
VkVideoEncodeCapabilitiesKHR |  |
`flags` | - | min
`rateControlModes` | VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR 4 | min
`maxBitrate` | 128000 | min
`maxQualityLevels` | 1 | min
`encodeInputPictureGranularity` | (64,64) | max
`supportedEncodeFeedbackFlags` | VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_BUFFER_OFFSET_BIT_KHR VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_BYTES_WRITTEN_BIT_KHR + VK_VIDEO_ENCODE_FEEDBACK_AVERAGE_QUANTIZATION_BIT_KHR 6 + VK_VIDEO_ENCODE_FEEDBACK_INTRA_PIXELS_BIT_KHR 6 + VK_VIDEO_ENCODE_FEEDBACK_INTER_PIXELS_BIT_KHR 6 + VK_VIDEO_ENCODE_FEEDBACK_PICTURE_PARTITION_COUNT_BIT_KHR 6 | min
VkVideoEncodeFeedback2CapabilitiesKHR |  |
`maxPerPartitionFeedbackEntries` | - | min
`supportedPerPartitionEncodeFeedbackFlags` | VK_VIDEO_ENCODE_PER_PARTITION_FEEDBACK_STATUS_BIT_KHR 7 + VK_VIDEO_ENCODE_PER_PARTITION_FEEDBACK_BITSTREAM_BUFFER_OFFSET_BIT_KHR 7 + VK_VIDEO_ENCODE_PER_PARTITION_FEEDBACK_BITSTREAM_BYTES_WRITTEN_BIT_KHR 7 | min
VkVideoEncodeH265CapabilitiesKHR |  |
`flags` | - | min
`maxLevelIdc` | `STD_VIDEO_H265_LEVEL_IDC_1_0` | min
`maxSliceSegmentCount` | 1 | min
`maxTiles` | (1,1) | min
`ctbSizes` | at least one bit set | implementation-dependent
`transformBlockSizes` | at least one bit set | implementation-dependent
`maxPPictureL0ReferenceCount` | 0 | min
`maxBPictureL0ReferenceCount` | 0 | min
`maxL1ReferenceCount` | 0 | min
`maxSubLayerCount` | 1 | min
`expectDyadicTemporalSubLayerPattern` | - | implementation-dependent
`minQp` | - | max
`maxQp` | - | min
`prefersGopRemainingFrames` | - | implementation-dependent
`requiresGopRemainingFrames` | - | implementation-dependent
`stdSyntaxFlags` | - | min
VkVideoEncodeQuantizationMapCapabilitiesKHR |  |
`maxQuantizationMapExtent` | - 2 | min
VkVideoEncodeH265QuantizationMapCapabilitiesKHR |  |
`minQpDelta` | - 3 | max
`maxQpDelta` | - 3 | min
VkVideoEncodeIntraRefreshCapabilitiesKHR |  |
`intraRefreshModes` | 0 | min
`maxIntraRefreshCycleDuration` | 2 5 | min
`maxIntraRefreshActiveReferencePictures` | 1 5 | min
`partitionIndependentIntraRefreshRegions` | - | implementation-dependent
`nonRectangularIntraRefreshRegions` | - | implementation-dependent

1

  The Requirement Type column specifies the requirement is either the minimum value all implementations must support, the maximum value all implementations must support, or the exact value all implementations must support. For bitmasks a minimum value is the least bits all implementations must set, but they may have additional bits set beyond this minimum.

2

  If VkVideoCapabilitiesKHR::`flags` includes VK_VIDEO_ENCODE_CAPABILITY_QUANTIZATION_DELTA_MAP_BIT_KHR or VK_VIDEO_ENCODE_CAPABILITY_EMPHASIS_MAP_BIT_KHR, then the `width` and `height` members of `maxQuantizationMapExtent` must be greater than zero.

3

  If VkVideoCapabilitiesKHR::`flags` includes VK_VIDEO_ENCODE_CAPABILITY_QUANTIZATION_DELTA_MAP_BIT_KHR, then `maxQpDelta` must be greater than `minQpDelta`.

4

  If the `videoMaintenance2` feature is supported.

5

  If VkVideoEncodeIntraRefreshCapabilitiesKHR::`intraRefreshModes` is not zero.

6

  If the `videoEncodeFeedback2` feature is supported.

7

  If `maxPerPartitionFeedbackEntries` is greater than zero.

### 49.23. AV1 Encode Operations

Video encode operations using an AV1 encode profile can be used to encode elementary video stream sequences compliant with the AV1 Specification.

Note | Refer to the Preamble for information on how the Khronos Intellectual Property Rights Policy relates to normative references to external materials not created by Khronos.

This process is performed according to the video encode operation steps with the codec-specific semantics defined in section 7 of the AV1 Specification:

- Syntax elements, derived values, and other parameters are applied from the following structures:

  - The `StdVideoAV1SequenceHeader` structure, the optional `StdVideoEncodeAV1DecoderModelInfo` structure, and the optional array of `StdVideoEncodeAV1OperatingPointInfo` structures stored in the bound video session parameters object specifying the active sequence header.

  - The `StdVideoEncodeAV1PictureInfo` structure specifying the AV1 picture information.

  - The `StdVideoEncodeAV1ReferenceInfo` structures specifying the AV1 reference information corresponding to the optional reconstructed picture and any active reference pictures.

  - The encoded bitstream data is written to the destination video bitstream buffer range as defined in the AV1 Encode Bitstream Data Access section.

  - Picture data in the video picture resources corresponding to the used encode input picture, active reference pictures, and optional reconstructed picture is accessed as defined in the AV1 Encode Picture Data Access section.

- The decision on reference picture setup is made according to the parameters specified in the AV1 picture information.

If the parameters adhere to the syntactic and semantic requirements defined in the corresponding sections of the AV1 Specification, as described above, and the DPB slots associated with the active reference pictures all refer to valid picture references, then the video encode operation will complete successfully. Otherwise, the video encode operation may complete unsuccessfully.

#### 49.23.1. AV1 Encode Parameter Overrides

Implementations may override, unless otherwise specified, any of the AV1 encode parameters specified in the following Video Std structures:

- `StdVideoAV1SequenceHeader`

- `StdVideoEncodeAV1DecoderModelInfo`

- `StdVideoEncodeAV1OperatingPointInfo`

- `StdVideoEncodeAV1PictureInfo`

- `StdVideoEncodeAV1ReferenceInfo`

All such AV1 encode parameter overrides must fulfill the conditions defined in the Video Encode Parameter Overrides section.

In addition, implementations must not override any of the following AV1 encode parameters:

- the following parameters specified in `StdVideoAV1SequenceHeader`:

  - `flags.still_picture`

  - `flags.enable_order_hint`

  - `flags.frame_id_numbers_present_flag`

  - `flags.film_grain_params_present`

  - `flags.timing_info_present_flag`

  - `flags.initial_display_delay_present_flag`

  - `delta_frame_id_length_minus_2`

  - `additional_frame_id_length_minus_1`

  - `order_hint_bits_minus_1`

- the following parameters specified in the `StdVideoAV1ColorConfig` structure pointed to by `StdVideoAV1SequenceHeader`::`pColorConfig`:

  - `flags.mono_chrome`

  - `flags.color_range`

  - `BitDepth`

  - `subsampling_x`

  - `subsampling_y`

  - `color_primaries`

  - `transfer_characteristics`

  - `matrix_coefficients`

  - `chroma_sample_position`

- the following parameters specified in the `StdVideoAV1TimingInfo` structure pointed to by `StdVideoAV1SequenceHeader`::`pTimingInfo`:

  - `flags.equal_picture_interval`

  - `num_units_in_display_tick`

  - `time_scale`

  - `num_ticks_per_picture_minus_1`

- the parameters specified in `StdVideoEncodeAV1DecoderModelInfo`

- the parameters specified in `StdVideoEncodeAV1OperatingPointInfo`

- the following parameters specified in `StdVideoEncodeAV1PictureInfo`:

  - `flags.show_frame`

  - `flags.showable_frame`

  - `frame_type`

  - `frame_presentation_time`

  - `current_frame_id`

  - `order_hint`

  - `refresh_frame_flags`

  - `render_width_minus_1`

  - `render_height_minus_1`

  - `ref_order_hint`

  - `ref_frame_idx`

  - `delta_frame_id_minus_1`

- the following parameters specified in the `StdVideoEncodeAV1ExtensionHeader` structure pointed to by `StdVideoEncodeAV1PictureInfo`::`pExtensionHeader` when VkVideoEncodeAV1PictureInfoKHR::`generateObuExtensionHeader` is set to VK_TRUE:

  - `temporal_id`

  - `spatial_id`

If VkVideoEncodeAV1PictureInfoKHR::`primaryReferenceCdfOnly` is set to VK_TRUE for a video encode operation, the implementation will not override `StdVideoEncodeAV1PictureInfo`::`primary_ref_frame`.

Note | Implementations supporting the VK_VIDEO_ENCODE_AV1_STD_PRIMARY_REF_FRAME_BIT_KHR AV1 syntax element capability reported in VkVideoEncodeAV1CapabilitiesKHR::`stdSyntaxFlags` also guarantee the use of the application-specified value for `StdVideoEncodeAV1PictureInfo`::`primary_ref_frame`. While support for VK_VIDEO_ENCODE_AV1_STD_PRIMARY_REF_FRAME_BIT_KHR guarantees that the implementation will not override the application-specified `primary_ref_frame`, it does not mandate the implementation to use the reference picture indicated by `primary_ref_frame` for sample prediction as implementations can always decide to use only a subset of the application-specified reference pictures for sample prediction. This means that implementations supporting VK_VIDEO_ENCODE_AV1_STD_PRIMARY_REF_FRAME_BIT_KHR may end up using the reference picture indicated by `primary_ref_frame` only for CDF data reference even if the application did not set VkVideoEncodeAV1PictureInfoKHR::`primaryReferenceCdfOnly` to VK_TRUE.

If VkVideoEncodeAV1CapabilitiesKHR::`codedPictureAlignment` is not equal to `{8,8}` for the used video profile, implementations will override the coded picture’s resolution and parameters related to the width and height in the following manner:

- Let `w` and `h` be the `codedExtent.width` and `codedExtent.height` of the VkVideoPictureResourceInfoKHR structure corresponding to the encode input picture, rounded up to the nearest integer multiple of 8.

- Let `aW` and `aH` be `w` and `h` rounded up to the nearest integer multiple of `codedPictureAlignment.width` and `codedPictureAlignment.height` respectively.

- If `w` equals `aW`, no override will occur. Otherwise the coded width will be `aW`.

- If `h` equals `aH`, no override will occur. Otherwise the coded height will be `aH`.

Note | The AV1 specification codes all resolutions to an 8x8 alignment, but supports unaligned resolutions through implicit cropping. Thus, if the original coded extent, aligned to 8x8, meets the implementation required alignment, no override needs to occur. Otherwise, the implementation cannot code the requested coded extent, so the final resolution in the bitstream is overridden to be aligned to the implementation required alignment. For example, consider an implementation that is only able to output bitstreams that are 16x16 aligned (as indicated by VkVideoEncodeAV1CapabilitiesKHR::`codedPictureAlignment`). If an application requests the coded extent to be 1920x1080, the resulting bitstream will be 1920x1088. On the other hand, a request of 1920x1082 will result in no override, since the 8x8 alignment of this resolution (1920x1088) is 16x16 aligned.

In case of a video session parameters object created with VK_VIDEO_SESSION_PARAMETERS_CREATE_QUANTIZATION_MAP_COMPATIBLE_BIT_KHR, the following AV1 sequence header parameters may be overridden by the implementation according to the quantization map texel size the video session parameters object was created with:

- `StdVideoAV1SequenceHeader`::`flags.use_128x128_superblock`

This may be necessary to change the AV1 superblock size used during encoding to be compatible with the used quantization map texel size.

In case of AV1 encode parameters stored in video session parameters objects, applications need to use the vkGetEncodedVideoSessionParametersKHR command to determine whether any implementation overrides happened. If the query indicates that implementation overrides were applied, then the application needs to retrieve and use the encoded AV1 sequence header in the bitstream in order to be able to produce a compliant AV1 video bitstream using the AV1 encode parameters stored in the video session parameters object.

In case of any AV1 encode parameters stored in the encoded bitstream produced by video encode operations, if the implementation supports the VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_HAS_OVERRIDES_BIT_KHR video encode feedback query flag, the application can use such queries to retrieve feedback about whether any implementation overrides have been applied to those AV1 encode parameters.

#### 49.23.2. AV1 Encode Bitstream Data Access

Each video encode operation writes either:

- A single OBU with `obu_type` equal to `OBU_FRAME` comprising of the frame header and tile data of the encoded picture, or

- An OBU with `obu_type` equal to `OBU_FRAME_HEADER` encapsulating the frame header of the encoded picture, followed by one or more OBUs with `obu_type` equal to `OBU_TILE_GROUP` comprising of the tile data of the encoded picture.

In addition, if VkVideoEncodeAV1PictureInfoKHR::`generateObuExtensionHeader` is set to VK_TRUE for the video encode operation, then OBU extension headers are included in the generated bitstream as defined in sections 5.3.1, 5.3.2, and 5.3.3 of the AV1 Specification.

#### 49.23.3. AV1 Encode Picture Data Access

Accesses to image data within a video picture resource happen at the granularity indicated by VkVideoCapabilitiesKHR::`pictureAccessGranularity`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the used video profile. Accordingly, the complete image subregion of a encode input picture, reference picture, or reconstructed picture accessed by video coding operations using an AV1 encode profile is defined as the set of texels within the coordinate range:

  ([0,`endX`),[0,`endY`))

Where:

- `endX` equals `codedExtent.width` rounded up to the nearest integer multiple of `pictureAccessGranularity.width` and clamped to the width of the image subresource referred to by the corresponding VkVideoPictureResourceInfoKHR structure;

- endY equals `codedExtent.height` rounded up to the nearest integer multiple of `pictureAccessGranularity.height` and clamped to the height of the image subresource referred to by the corresponding VkVideoPictureResourceInfoKHR structure;

Where `codedExtent` is the member of the VkVideoPictureResourceInfoKHR structure corresponding to the picture.

In case of video encode operations using an AV1 encode profile, any access to a picture at the coordinates (`x`,`y`), as defined by the AV1 Specification, is an access to the image subresource referred to by the corresponding VkVideoPictureResourceInfoKHR structure at the texel coordinates (`x`,`y`).

Implementations may choose not to access some or all texels within particular reference pictures available to a video encode operation (e.g. due to video encode parameter overrides restricting the effective set of used reference pictures, or if the encoding algorithm chooses not to use certain subregions of the reference picture data for sample prediction).

#### 49.23.4. AV1 Reference Names and Semantics

Individual reference frames used in the encoding process have different semantics, as defined in section 6.10.24 of the AV1 Specification. The AV1 semantics associated with a reference picture is indicated by the corresponding enumeration constant defined in the Video Std enumeration type `StdVideoAV1ReferenceName`:

- `STD_VIDEO_AV1_REFERENCE_NAME_INTRA_FRAME` identifies the reference used for intra coding (`INTRA_FRAME`), as defined in sections 2 and 7.11.2 of the AV1 Specification.

- All other enumeration constants refer to backward or forward references used for inter coding, as defined in sections 2 and 7.11.3 of the AV1 Specification:

  - `STD_VIDEO_AV1_REFERENCE_NAME_LAST_FRAME` identifies the `LAST_FRAME` reference

  - `STD_VIDEO_AV1_REFERENCE_NAME_LAST2_FRAME` identifies the `LAST2_FRAME` reference

  - `STD_VIDEO_AV1_REFERENCE_NAME_LAST3_FRAME` identifies the `LAST3_FRAME` reference

  - `STD_VIDEO_AV1_REFERENCE_NAME_GOLDEN_FRAME` identifies the `GOLDEN_FRAME` reference

  - `STD_VIDEO_AV1_REFERENCE_NAME_BWDREF_FRAME` identifies the `BWDREF_FRAME` reference

  - `STD_VIDEO_AV1_REFERENCE_NAME_ALTREF2_FRAME` identifies the `ALTREF2_FRAME` reference

  - `STD_VIDEO_AV1_REFERENCE_NAME_ALTREF_FRAME` identifies the `ALTREF_FRAME` reference

These enumeration constants are not directly used in any APIs but are used to indirectly index into certain Video Std and Vulkan API parameter arrays.

#### 49.23.5. AV1 Prediction Modes

AV1 encoding supports multiple types of prediction modes, as described in section 6.10.24 of the AV1 Specification.

Possible AV1 encode prediction modes are as follows:

    // Provided by VK_KHR_video_encode_av1
    typedef enum VkVideoEncodeAV1PredictionModeKHR {
        VK_VIDEO_ENCODE_AV1_PREDICTION_MODE_INTRA_ONLY_KHR = 0,
        VK_VIDEO_ENCODE_AV1_PREDICTION_MODE_SINGLE_REFERENCE_KHR = 1,
        VK_VIDEO_ENCODE_AV1_PREDICTION_MODE_UNIDIRECTIONAL_COMPOUND_KHR = 2,
        VK_VIDEO_ENCODE_AV1_PREDICTION_MODE_BIDIRECTIONAL_COMPOUND_KHR = 3,
    } VkVideoEncodeAV1PredictionModeKHR;

- VK_VIDEO_ENCODE_AV1_PREDICTION_MODE_INTRA_ONLY_KHR specifies the use of intra-only prediction mode, used when encoding AV1 frames of type `STD_VIDEO_AV1_FRAME_TYPE_KEY` or `STD_VIDEO_AV1_FRAME_TYPE_INTRA_ONLY`.

- VK_VIDEO_ENCODE_AV1_PREDICTION_MODE_SINGLE_REFERENCE_KHR specifies the use of single reference prediction mode, used when encoding AV1 frames of type `STD_VIDEO_AV1_FRAME_TYPE_INTER` or `STD_VIDEO_AV1_FRAME_TYPE_SWITCH` with `reference_select`, as defined in section 6.8.23 of the AV1 Specification, equal to 0. When using this prediction mode, the application must specify a reference picture for at least one AV1 reference name in VkVideoEncodeAV1PictureInfoKHR::`referenceNameSlotIndices` that is supported by the implementation, as reported in VkVideoEncodeAV1CapabilitiesKHR::`singleReferenceNameMask`.

- VK_VIDEO_ENCODE_AV1_PREDICTION_MODE_UNIDIRECTIONAL_COMPOUND_KHR specifies the use of unidirectional compound prediction mode, used when encoding AV1 frames of type `STD_VIDEO_AV1_FRAME_TYPE_INTER` or `STD_VIDEO_AV1_FRAME_TYPE_SWITCH` with `reference_select`, as defined in section 6.8.23 of the AV1 Specification, equal to 1, and both reference names used for prediction are from the same reference frame group, as defined in section 6.10.24 of the AV1 Specification. When using this prediction mode, the application must specify a reference picture for at least two AV1 reference names in VkVideoEncodeAV1PictureInfoKHR::`referenceNameSlotIndices` that is supported by the implementation, as reported in VkVideoEncodeAV1CapabilitiesKHR::`unidirectionalCompoundReferenceNameMask`, where those two reference names are one of the allowed pairs of reference names, as defined in section 5.11.25 of the AV1 Specification, listed below:

  - `LAST_FRAME` and `LAST2_FRAME`,

  - `LAST_FRAME` and `LAST3_FRAME`,

  - `LAST_FRAME` and `GOLDEN_FRAME`, or

  - `BWDREF_FRAME` and `ALTREF_FRAME`.

- VK_VIDEO_ENCODE_AV1_PREDICTION_MODE_BIDIRECTIONAL_COMPOUND_KHR specifies the use of bidirectional compound prediction mode, used when encoding AV1 frames of type `STD_VIDEO_AV1_FRAME_TYPE_INTER` or `STD_VIDEO_AV1_FRAME_TYPE_SWITCH` with `reference_select`, as defined in section 6.8.23 of the AV1 Specification, equal to 1, and the two reference names used for prediction are from different reference frame groups, as defined in section 6.10.24 of the AV1 Specification. When using this prediction mode, the application must specify a reference picture for at least one AV1 reference name from each reference frame group in VkVideoEncodeAV1PictureInfoKHR::`referenceNameSlotIndices` that is supported by the implementation, as reported in VkVideoEncodeAV1CapabilitiesKHR::`bidirectionalCompoundReferenceNameMask`.

The effective prediction mode used to encode individual AV1 mode info blocks may use simpler prediction modes than the one set by the application for the frame, as allowed by the AV1 Specification, in particular:

- Frames encoded with single reference prediction mode may contain mode info blocks encoded with intra-only prediction mode.

- Frames encoded with unidirectional compound prediction mode may contain mode info blocks encoded with intra-only or single reference prediction mode.

- Frames encoded with bidirectional compound prediction mode may contain mode info blocks encoded with intra-only, single reference, or unidirectional compound prediction mode.

#### 49.23.6. AV1 Frame and Tile

AV1 frames are partitioned into tiles, as defined in section 2 of the AV1 Specification.

For the purposes of this specification, the AV1 tiles comprising a frame are referred to as the picture partitions of the frame.

#### 49.23.7. AV1 Coding Blocks

AV1 encode supports two types of coding blocks, as defined in section 2 of the AV1 Specification:

- Superblock.

- Mode info block.

An AV1 mode info block is considered skipped when the value of `skip` for the mode info block is set to `1`, as defined in section 5.11.11 of the AV1 Specification.

#### 49.23.8. AV1 Encode Profile

A video profile supporting AV1 video encode operations is specified by setting VkVideoProfileInfoKHR::`videoCodecOperation` to VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR and adding a `VkVideoEncodeAV1ProfileInfoKHR` structure to the VkVideoProfileInfoKHR::`pNext` chain.

The `VkVideoEncodeAV1ProfileInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_encode_av1
    typedef struct VkVideoEncodeAV1ProfileInfoKHR {
        VkStructureType       sType;
        const void*           pNext;
        StdVideoAV1Profile    stdProfile;
    } VkVideoEncodeAV1ProfileInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `stdProfile` is a `StdVideoAV1Profile` value specifying the AV1 codec profile, as defined in section A.2 of the AV1 Specification.

Valid Usage (Implicit)

- VUID-VkVideoEncodeAV1ProfileInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_PROFILE_INFO_KHR

Structure Chaining

Extends the structures

  - VkQueryPoolCreateInfo

  - VkVideoProfileInfoKHR

#### 49.23.9. AV1 Encode Capabilities

When calling vkGetPhysicalDeviceVideoCapabilitiesKHR to query the capabilities for an AV1 encode profile, the VkVideoCapabilitiesKHR::`pNext` chain must include a `VkVideoEncodeAV1CapabilitiesKHR` structure that will be filled with the profile-specific capabilities.

The `VkVideoEncodeAV1CapabilitiesKHR` structure is defined as:

    // Provided by VK_KHR_video_encode_av1
    typedef struct VkVideoEncodeAV1CapabilitiesKHR {
        VkStructureType                           sType;
        void*                                     pNext;
        VkVideoEncodeAV1CapabilityFlagsKHR        flags;
        StdVideoAV1Level                          maxLevel;
        VkExtent2D                                codedPictureAlignment;
        VkExtent2D                                maxTiles;
        VkExtent2D                                minTileSize;
        VkExtent2D                                maxTileSize;
        VkVideoEncodeAV1SuperblockSizeFlagsKHR    superblockSizes;
        uint32_t                                  maxSingleReferenceCount;
        uint32_t                                  singleReferenceNameMask;
        uint32_t                                  maxUnidirectionalCompoundReferenceCount;
        uint32_t                                  maxUnidirectionalCompoundGroup1ReferenceCount;
        uint32_t                                  unidirectionalCompoundReferenceNameMask;
        uint32_t                                  maxBidirectionalCompoundReferenceCount;
        uint32_t                                  maxBidirectionalCompoundGroup1ReferenceCount;
        uint32_t                                  maxBidirectionalCompoundGroup2ReferenceCount;
        uint32_t                                  bidirectionalCompoundReferenceNameMask;
        uint32_t                                  maxTemporalLayerCount;
        uint32_t                                  maxSpatialLayerCount;
        uint32_t                                  maxOperatingPoints;
        uint32_t                                  minQIndex;
        uint32_t                                  maxQIndex;
        VkBool32                                  prefersGopRemainingFrames;
        VkBool32                                  requiresGopRemainingFrames;
        VkVideoEncodeAV1StdFlagsKHR               stdSyntaxFlags;
    } VkVideoEncodeAV1CapabilitiesKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask of VkVideoEncodeAV1CapabilityFlagBitsKHR indicating supported AV1 encoding capabilities.

- `maxLevel` is a `StdVideoAV1Level` value indicating the maximum AV1 level supported by the profile, as defined in section A.3 of the AV1 Specification.

- `codedPictureAlignment` indicates the alignment at which the implementation will code pictures. This capability does not impose any valid usage constraints on the application. However, depending on the `codedExtent` of the encode input picture resource, this capability may result in a change of the resolution of the encoded picture, as described in more detail below.

- `maxTiles` indicates the maximum number of AV1 tile columns and rows the implementation supports.

- `minTileSize` indicates the minimum extent of individual AV1 tiles the implementation supports.

- `maxTileSize` indicates the maximum extent of individual AV1 tiles the implementation supports.

- `superblockSizes` is a bitmask of VkVideoEncodeAV1SuperblockSizeFlagBitsKHR values indicating the supported AV1 superblock sizes.

- `maxSingleReferenceCount` indicates the maximum number of reference pictures the implementation supports when using single reference prediction mode.

- `singleReferenceNameMask` is a bitmask of supported AV1 reference names when using single reference prediction mode.

- `maxUnidirectionalCompoundReferenceCount` indicates the maximum number of reference pictures the implementation supports when using unidirectional compound prediction mode.

- `maxUnidirectionalCompoundGroup1ReferenceCount` indicates the maximum number of reference pictures the implementation supports when using unidirectional compound prediction mode from reference frame group 1, as defined in section 6.10.24 of the AV1 Specification.

- `unidirectionalCompoundReferenceNameMask` is a bitmask of supported AV1 reference names when using unidirectional compound prediction mode.

- `maxBidirectionalCompoundReferenceCount` indicates the maximum number of reference pictures the implementation supports when using bidirectional compound prediction mode.

- `maxBidirectionalCompoundGroup1ReferenceCount` indicates the maximum number of reference pictures the implementation supports when using bidirectional compound prediction mode from reference frame group 1, as defined in section 6.10.24 of the AV1 Specification.

- `maxBidirectionalCompoundGroup2ReferenceCount` indicates the maximum number of reference pictures the implementation supports when using bidirectional compound prediction mode from reference frame group 2, as defined in section 6.10.24 of the AV1 Specification.

- `bidirectionalCompoundReferenceNameMask` is a bitmask of supported AV1 reference names when using bidirectional compound prediction mode.

- `maxTemporalLayerCount` indicates the maximum number of AV1 temporal layers supported by the implementation.

- `maxSpatialLayerCount` indicates the maximum number of AV1 spatial layers supported by the implementation.

- `maxOperatingPoints` indicates the maximum number of AV1 operating points supported by the implementation.

- `minQIndex` indicates the minimum quantizer index value supported.

- `maxQIndex` indicates the maximum quantizer index value supported.

- `prefersGopRemainingFrames` indicates that the implementation’s rate control algorithm prefers the application to specify the number of frames in each AV1 rate control group remaining in the current group of pictures when beginning a video coding scope.

- `requiresGopRemainingFrames` indicates that the implementation’s rate control algorithm requires the application to specify the number of frames in each AV1 rate control group remaining in the current group of pictures when beginning a video coding scope.

- `stdSyntaxFlags` is a bitmask of VkVideoEncodeAV1StdFlagBitsKHR indicating capabilities related to AV1 syntax elements.

`singleReferenceNameMask`, `unidirectionalCompoundReferenceNameMask`, and `bidirectionalCompoundReferenceNameMask` are encoded such that when bit index i is set, it indicates support for the AV1 reference name `STD_VIDEO_AV1_REFERENCE_NAME_LAST_FRAME` + i.

Note | These masks indicate which elements of the `referenceNameSlotIndices` member of VkVideoEncodeAV1PictureInfoKHR are supported to be used by the implementation. It is important to note that both the bits of these masks and the elements of `referenceNameSlotIndices` are indexed such that the first value specifies the support bit and DPB slot index, respectively, for the AV1 reference name `STD_VIDEO_AV1_REFERENCE_NAME_LAST_FRAME` (i.e. there is no bit or element for `STD_VIDEO_AV1_REFERENCE_NAME_INTRA_FRAME`).

`codedPictureAlignment` provides information about implementation limitations to encode arbitrary resolutions. In particular, some implementations may not be able to generate bitstreams aligned to the requirements of the AV1 Specification (8x8). In such cases, the implementation may override the width and height of the bitstream, in order to produce a bitstream compliant to the AV1 Specification. If such an override occurs, the encoded resolution of the coded picture is enlargened, with the texel values used for the texel coordinates outside of the bounds of the `codedExtent` of the encode input picture resource being first governed by the rules regarding the encode input picture granularity. Any texel values outside of the region described by the encode input picture granularity are implementation-defined. Implementations should use well-defined values to minimize impact on the produced encoded content.

Note | This capability does not impose additional application requirements. However, these overrides change the effective resolution of the bitstream and add padding pixels. Applications sensitive to such overrides can use this capability and the corresponding override behavior to compute the cropping needed to reproduce the original input of the encoding and transmit it in a side channel (i.e. by using cropping fields available in a container). Additionally, applications can explicitly consider this alignment in their coded extent, to avoid implementation-defined texel values being included in the encoded content.

Valid Usage (Implicit)

- VUID-VkVideoEncodeAV1CapabilitiesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_CAPABILITIES_KHR

Structure Chaining

Extends the structure

  - VkVideoCapabilitiesKHR

Bits which may be set in VkVideoEncodeAV1CapabilitiesKHR::`flags`, indicating the AV1 encoding capabilities supported, are:

    // Provided by VK_KHR_video_encode_av1
    typedef enum VkVideoEncodeAV1CapabilityFlagBitsKHR {
        VK_VIDEO_ENCODE_AV1_CAPABILITY_PER_RATE_CONTROL_GROUP_MIN_MAX_Q_INDEX_BIT_KHR = 0x00000001,
        VK_VIDEO_ENCODE_AV1_CAPABILITY_GENERATE_OBU_EXTENSION_HEADER_BIT_KHR = 0x00000002,
        VK_VIDEO_ENCODE_AV1_CAPABILITY_PRIMARY_REFERENCE_CDF_ONLY_BIT_KHR = 0x00000004,
        VK_VIDEO_ENCODE_AV1_CAPABILITY_FRAME_SIZE_OVERRIDE_BIT_KHR = 0x00000008,
        VK_VIDEO_ENCODE_AV1_CAPABILITY_MOTION_VECTOR_SCALING_BIT_KHR = 0x00000010,
      // Provided by VK_KHR_video_encode_av1 with VK_KHR_video_encode_intra_refresh
        VK_VIDEO_ENCODE_AV1_CAPABILITY_COMPOUND_PREDICTION_INTRA_REFRESH_BIT_KHR = 0x00000020,
    } VkVideoEncodeAV1CapabilityFlagBitsKHR;

- VK_VIDEO_ENCODE_AV1_CAPABILITY_PER_RATE_CONTROL_GROUP_MIN_MAX_Q_INDEX_BIT_KHR specifies support for specifying different quantizer index values in the members of VkVideoEncodeAV1QIndexKHR.

- VK_VIDEO_ENCODE_AV1_CAPABILITY_GENERATE_OBU_EXTENSION_HEADER_BIT_KHR specifies support for generating OBU extension headers, as defined in section 5.3.3 of the AV1 Specification.

- VK_VIDEO_ENCODE_AV1_CAPABILITY_PRIMARY_REFERENCE_CDF_ONLY_BIT_KHR specifies support for using the primary reference frame indicated by the value of `StdVideoEncodeAV1PictureInfo`::`primary_ref_frame` in the AV1 picture information only for CDF data reference, as defined in section 6.8.2 of the AV1 Specification.

- VK_VIDEO_ENCODE_AV1_CAPABILITY_FRAME_SIZE_OVERRIDE_BIT_KHR specifies support for encoding a picture with a frame size different from the maximum frame size defined in the active AV1 sequence header. If this capability is not supported, then `frame_size_override_flag` must not be set in the AV1 picture information of the encoded frame and the coded extent of the encode input picture must match the maximum coded extent allowed by the active AV1 sequence header, i.e. (`max_frame_width_minus_1` + 1, `max_frame_height_minus_1` + 1).

- VK_VIDEO_ENCODE_AV1_CAPABILITY_MOTION_VECTOR_SCALING_BIT_KHR specifies support for motion vector scaling, as defined in section 7.11.3.3 of the AV1 Specification. If this capability is not supported, then the coded extent of all active reference pictures must match the coded extent of the encode input picture. This capability may only be supported by a video profile when VK_VIDEO_ENCODE_AV1_CAPABILITY_FRAME_SIZE_OVERRIDE_BIT_KHR is also supported.

- VK_VIDEO_ENCODE_AV1_CAPABILITY_COMPOUND_PREDICTION_INTRA_REFRESH_BIT_KHR specifies support for encoding frames using unidirectional or bidirectional compound prediction mode with intra refresh enabled.

    // Provided by VK_KHR_video_encode_av1
    typedef VkFlags VkVideoEncodeAV1CapabilityFlagsKHR;

`VkVideoEncodeAV1CapabilityFlagsKHR` is a bitmask type for setting a mask of zero or more VkVideoEncodeAV1CapabilityFlagBitsKHR.

Bits which may be set in VkVideoEncodeAV1CapabilitiesKHR::`stdSyntaxFlags`, indicating the capabilities related to the AV1 syntax elements, are:

    // Provided by VK_KHR_video_encode_av1
    typedef enum VkVideoEncodeAV1StdFlagBitsKHR {
        VK_VIDEO_ENCODE_AV1_STD_UNIFORM_TILE_SPACING_FLAG_SET_BIT_KHR = 0x00000001,
        VK_VIDEO_ENCODE_AV1_STD_SKIP_MODE_PRESENT_UNSET_BIT_KHR = 0x00000002,
        VK_VIDEO_ENCODE_AV1_STD_PRIMARY_REF_FRAME_BIT_KHR = 0x00000004,
        VK_VIDEO_ENCODE_AV1_STD_DELTA_Q_BIT_KHR = 0x00000008,
    } VkVideoEncodeAV1StdFlagBitsKHR;

- VK_VIDEO_ENCODE_AV1_STD_UNIFORM_TILE_SPACING_FLAG_SET_BIT_KHR specifies whether the implementation supports using the application-provided value for `StdVideoAV1TileInfoFlags`::`uniform_tile_spacing_flag` in the AV1 tile parameters when that value is `1`, regardless of the coded extent of the encode input picture and the number of tile columns and rows requested in the `TileCols` and `TileRows` members of `StdVideoAV1TileInfo`.

- VK_VIDEO_ENCODE_AV1_STD_SKIP_MODE_PRESENT_UNSET_BIT_KHR specifies whether the implementation supports using the application-provided value for `StdVideoEncodeAV1PictureInfoFlags`::`skip_mode_present` when that value is `0`.

- VK_VIDEO_ENCODE_AV1_STD_PRIMARY_REF_FRAME_BIT_KHR specifies whether the implementation supports using the application-provided value for `StdVideoEncodeAV1PictureInfo`::`primary_ref_frame`.

- VK_VIDEO_ENCODE_AV1_STD_DELTA_Q_BIT_KHR specifies whether the implementation supports using the application-provided values for the `DeltaQYDc`, `DeltaQUDc`, `DeltaQUAc`, `DeltaQVDc`, and `DeltaQVAc` members of `StdVideoAV1Quantization`.

These capability flags provide information to the application about specific AV1 syntax element values that the implementation supports without having to override them and do not otherwise restrict the values that the application can specify for any of the mentioned AV1 syntax elements.

    // Provided by VK_KHR_video_encode_av1
    typedef VkFlags VkVideoEncodeAV1StdFlagsKHR;

`VkVideoEncodeAV1StdFlagsKHR` is a bitmask type for setting a mask of zero or more VkVideoEncodeAV1StdFlagBitsKHR.

Bits which may be set in VkVideoEncodeAV1CapabilitiesKHR::`superblockSizes`, indicating the superblock sizes supported by the implementation, are:

    // Provided by VK_KHR_video_encode_av1
    typedef enum VkVideoEncodeAV1SuperblockSizeFlagBitsKHR {
        VK_VIDEO_ENCODE_AV1_SUPERBLOCK_SIZE_64_BIT_KHR = 0x00000001,
        VK_VIDEO_ENCODE_AV1_SUPERBLOCK_SIZE_128_BIT_KHR = 0x00000002,
    } VkVideoEncodeAV1SuperblockSizeFlagBitsKHR;

- VK_VIDEO_ENCODE_AV1_SUPERBLOCK_SIZE_64_BIT_KHR specifies that a superblock size of 64x64 is supported.

- VK_VIDEO_ENCODE_AV1_SUPERBLOCK_SIZE_128_BIT_KHR specifies that a superblock size of 128x128 is supported.

    // Provided by VK_KHR_video_encode_av1
    typedef VkFlags VkVideoEncodeAV1SuperblockSizeFlagsKHR;

`VkVideoEncodeAV1SuperblockSizeFlagsKHR` is a bitmask type for setting a mask of zero or more VkVideoEncodeAV1SuperblockSizeFlagBitsKHR.

Implementations must support at least one of VkVideoEncodeAV1SuperblockSizeFlagBitsKHR.

#### 49.23.10. AV1 Encode Quality Level Properties

When calling vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR with `pVideoProfile->videoCodecOperation` specified as VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR, the VkVideoEncodeAV1QualityLevelPropertiesKHR structure must be included in the `pNext` chain of the VkVideoEncodeQualityLevelPropertiesKHR structure to retrieve additional video encode quality level properties specific to AV1 encoding.

The VkVideoEncodeAV1QualityLevelPropertiesKHR structure is defined as:

    // Provided by VK_KHR_video_encode_av1
    typedef struct VkVideoEncodeAV1QualityLevelPropertiesKHR {
        VkStructureType                        sType;
        void*                                  pNext;
        VkVideoEncodeAV1RateControlFlagsKHR    preferredRateControlFlags;
        uint32_t                               preferredGopFrameCount;
        uint32_t                               preferredKeyFramePeriod;
        uint32_t                               preferredConsecutiveBipredictiveFrameCount;
        uint32_t                               preferredTemporalLayerCount;
        VkVideoEncodeAV1QIndexKHR              preferredConstantQIndex;
        uint32_t                               preferredMaxSingleReferenceCount;
        uint32_t                               preferredSingleReferenceNameMask;
        uint32_t                               preferredMaxUnidirectionalCompoundReferenceCount;
        uint32_t                               preferredMaxUnidirectionalCompoundGroup1ReferenceCount;
        uint32_t                               preferredUnidirectionalCompoundReferenceNameMask;
        uint32_t                               preferredMaxBidirectionalCompoundReferenceCount;
        uint32_t                               preferredMaxBidirectionalCompoundGroup1ReferenceCount;
        uint32_t                               preferredMaxBidirectionalCompoundGroup2ReferenceCount;
        uint32_t                               preferredBidirectionalCompoundReferenceNameMask;
    } VkVideoEncodeAV1QualityLevelPropertiesKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `preferredRateControlFlags` is a bitmask of VkVideoEncodeAV1RateControlFlagBitsKHR values indicating the preferred flags to use for VkVideoEncodeAV1RateControlInfoKHR::`flags`.

- `preferredGopFrameCount` indicates the preferred value to use for VkVideoEncodeAV1RateControlInfoKHR::`gopFrameCount`.

- `preferredKeyFramePeriod` indicates the preferred value to use for VkVideoEncodeAV1RateControlInfoKHR::`keyFramePeriod`.

- `preferredConsecutiveBipredictiveFrameCount` indicates the preferred value to use for VkVideoEncodeAV1RateControlInfoKHR::`consecutiveBipredictiveFrameCount`.

- `preferredTemporalLayerCount` indicates the preferred value to use for VkVideoEncodeAV1RateControlInfoKHR::`temporalLayerCount`.

- `preferredConstantQIndex` indicates the preferred value to use for VkVideoEncodeAV1PictureInfoKHR::`constantQIndex` when using rate control mode VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR.

- `preferredMaxSingleReferenceCount` indicates the preferred maximum number of reference pictures to use with single reference prediction mode.

- `preferredSingleReferenceNameMask` is a bitmask of preferred AV1 reference names when using single reference prediction mode.

- `preferredMaxUnidirectionalCompoundReferenceCount` indicates the preferred maximum number of reference pictures to use with unidirectional compound prediction mode.

- `preferredMaxUnidirectionalCompoundGroup1ReferenceCount` indicates the preferred maximum number of reference pictures to use with unidirectional compound prediction mode from reference frame group 1, as defined in section 6.10.24 of the AV1 Specification.

- `preferredUnidirectionalCompoundReferenceNameMask` is a bitmask of preferred AV1 reference names when using unidirectional compound prediction mode.

- `preferredMaxBidirectionalCompoundReferenceCount` indicates the preferred maximum number of reference pictures to use with bidirectional compound prediction mode.

- `preferredMaxBidirectionalCompoundGroup1ReferenceCount` indicates the preferred maximum number of reference pictures to use with bidirectional compound prediction mode from reference frame group 1, as defined in section 6.10.24 of the AV1 Specification.

- `preferredMaxBidirectionalCompoundGroup2ReferenceCount` indicates the preferred maximum number of reference pictures to use with bidirectional compound prediction mode from reference frame group 2, as defined in section 6.10.24 of the AV1 Specification.

- `preferredBidirectionalCompoundReferenceNameMask` is a bitmask of preferred AV1 reference names when using bidirectional compound prediction mode.

`preferredSingleReferenceNameMask`, `preferredUnidirectionalCompoundReferenceNameMask`, and `preferredBidirectionalCompoundReferenceNameMask` are encoded such that when bit index i is set, it indicates preference for using the AV1 reference name `STD_VIDEO_AV1_REFERENCE_NAME_LAST_FRAME` + i.

Valid Usage (Implicit)

- VUID-VkVideoEncodeAV1QualityLevelPropertiesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_QUALITY_LEVEL_PROPERTIES_KHR

Structure Chaining

Extends the structure

  - VkVideoEncodeQualityLevelPropertiesKHR

#### 49.23.11. AV1 Encode Session

Additional parameters can be specified when creating a video session with an AV1 encode profile by including an instance of the VkVideoEncodeAV1SessionCreateInfoKHR structure in the `pNext` chain of VkVideoSessionCreateInfoKHR.

The `VkVideoEncodeAV1SessionCreateInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_encode_av1
    typedef struct VkVideoEncodeAV1SessionCreateInfoKHR {
        VkStructureType     sType;
        const void*         pNext;
        VkBool32            useMaxLevel;
        StdVideoAV1Level    maxLevel;
    } VkVideoEncodeAV1SessionCreateInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `useMaxLevel` indicates whether the value of `maxLevel` should be used by the implementation. When it is set to VK_FALSE, the implementation ignores the value of `maxLevel` and uses the value of VkVideoEncodeAV1CapabilitiesKHR::`maxLevel`, as reported by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile.

- `maxLevel` is a `StdVideoAV1Level` value specifying the upper bound on the AV1 level for the video bitstreams produced by the created video session.

Valid Usage (Implicit)

- VUID-VkVideoEncodeAV1SessionCreateInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_SESSION_CREATE_INFO_KHR

Structure Chaining

Extends the structure

  - VkVideoSessionCreateInfoKHR

#### 49.23.12. AV1 Encode Parameter Sets

Video session parameters objects created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR contain a single instance of the following parameter set:

AV1 Sequence Header

  Represented by `StdVideoAV1SequenceHeader` structures and interpreted as follows:

  - `flags.reserved` and `reserved1` are used only for padding purposes and are otherwise ignored;

  - the `StdVideoAV1ColorConfig` structure pointed to by `pColorConfig` is interpreted as follows:

    - `flags.reserved` and `reserved1` are used only for padding purposes and are otherwise ignored;

    - all other members of `StdVideoAV1ColorConfig` are interpreted as defined in section 6.4.2 of the AV1 Specification;

  - if `flags.timing_info_present_flag` is set, then the `StdVideoAV1TimingInfo` structure pointed to by `pTimingInfo` is interpreted as follows:

    - `flags.reserved` is used only for padding purposes and is otherwise ignored;

    - all other members of `StdVideoAV1TimingInfo` are interpreted as defined in section 6.4.3 of the AV1 Specification;

  - all other members of `StdVideoAV1SequenceHeader` are interpreted as defined in section 6.4 of the AV1 Specification.

When `StdVideoAV1SequenceHeader`::`flags.timing_info_present_flag` is set, the AV1 sequence header can be amended with AV1 decoder model information, represented by a `StdVideoEncodeAV1DecoderModelInfo` structure and interpreted as follows:

- `reserved1` is used only for padding purposes and is otherwise ignored;

- all other members of `StdVideoEncodeAV1DecoderModelInfo` are interpreted as defined in section 6.4.4 of the AV1 Specification.

When `StdVideoAV1SequenceHeader`::`flags.reduced_still_picture_header` is not set, the AV1 sequence header can be amended with AV1 operating point information, represented by an array of `StdVideoEncodeAV1OperatingPointInfo` structures and interpreted as follows:

- `flags.reserved` is used only for padding purposes and is otherwise ignored;

- all other members of `StdVideoEncodeAV1OperatingPointInfo` are interpreted as the corresponding element of the respective arrays defined in section 6.4 of the AV1 Specification.

Implementations may override any of these parameters according to the semantics defined in the Video Encode Parameter Overrides section before storing the resulting AV1 sequence header into the video session parameters object. Applications need to use the vkGetEncodedVideoSessionParametersKHR command to determine whether any implementation overrides happened and to retrieve the encoded AV1 sequence header in order to be able to produce a compliant AV1 video bitstream.

The encoded AV1 sequence header retrieved using the vkGetEncodedVideoSessionParametersKHR command is encoded as a single OBU with `obu_type` equal to `OBU_SEQUENCE_HEADER`, as defined in section 5.3 of the AV1 Specification.

Such AV1 sequence header overrides may also have cascading effects on the implementation overrides applied to the encoded bitstream produced by video encode operations. If the implementation supports the VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_HAS_OVERRIDES_BIT_KHR video encode feedback query flag, then the application can use such queries to retrieve feedback about whether any implementation overrides have been applied to the encoded bitstream.

When a video session parameters object is created with the codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR, the VkVideoSessionParametersCreateInfoKHR::`pNext` chain must include a `VkVideoEncodeAV1SessionParametersCreateInfoKHR` structure specifying the contents of the object.

The `VkVideoEncodeAV1SessionParametersCreateInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_encode_av1
    typedef struct VkVideoEncodeAV1SessionParametersCreateInfoKHR {
        VkStructureType                               sType;
        const void*                                   pNext;
        const StdVideoAV1SequenceHeader*              pStdSequenceHeader;
        const StdVideoEncodeAV1DecoderModelInfo*      pStdDecoderModelInfo;
        uint32_t                                      stdOperatingPointCount;
        const StdVideoEncodeAV1OperatingPointInfo*    pStdOperatingPoints;
    } VkVideoEncodeAV1SessionParametersCreateInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `pStdSequenceHeader` is a pointer to a `StdVideoAV1SequenceHeader` structure describing parameters of the AV1 sequence header entry to store in the created object.

- `pStdDecoderModelInfo` is `NULL` or a pointer to a `StdVideoEncodeAV1DecoderModelInfo` structure specifying the AV1 decoder model information to store in the created object.

- `stdOperatingPointCount` is the number of elements in the `pStdOperatingPoints` array.

- `pStdOperatingPoints` is `NULL` or a pointer to an array of `stdOperatingPointCount` number of `StdVideoEncodeAV1OperatingPointInfo` structures specifying the AV1 operating point information to store in the created object. Each element i specifies the parameter values corresponding to element i of the syntax elements defined in section 6.4 of the AV1 Specification.

Valid Usage

- VUID-VkVideoEncodeAV1SessionParametersCreateInfoKHR-pStdSequenceHeader-10288
  `pStdSequenceHeader->flags.film_grain_params_present` must be zero

Valid Usage (Implicit)

- VUID-VkVideoEncodeAV1SessionParametersCreateInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_SESSION_PARAMETERS_CREATE_INFO_KHR

- VUID-VkVideoEncodeAV1SessionParametersCreateInfoKHR-pStdSequenceHeader-parameter
  `pStdSequenceHeader` must be a valid pointer to a valid `StdVideoAV1SequenceHeader` value

- VUID-VkVideoEncodeAV1SessionParametersCreateInfoKHR-pStdDecoderModelInfo-parameter
  If `pStdDecoderModelInfo` is not `NULL`, `pStdDecoderModelInfo` must be a valid pointer to a valid `StdVideoEncodeAV1DecoderModelInfo` value

- VUID-VkVideoEncodeAV1SessionParametersCreateInfoKHR-pStdOperatingPoints-parameter
  If `stdOperatingPointCount` is not `0`, and `pStdOperatingPoints` is not `NULL`, `pStdOperatingPoints` must be a valid pointer to an array of `stdOperatingPointCount` `StdVideoEncodeAV1OperatingPointInfo` values

Structure Chaining

Extends the structure

  - VkVideoSessionParametersCreateInfoKHR

#### 49.23.13. AV1 Encoding Parameters

The VkVideoEncodeAV1PictureInfoKHR structure is defined as:

    // Provided by VK_KHR_video_encode_av1
    typedef struct VkVideoEncodeAV1PictureInfoKHR {
        VkStructureType                        sType;
        const void*                            pNext;
        VkVideoEncodeAV1PredictionModeKHR      predictionMode;
        VkVideoEncodeAV1RateControlGroupKHR    rateControlGroup;
        uint32_t                               constantQIndex;
        const StdVideoEncodeAV1PictureInfo*    pStdPictureInfo;
        int32_t                                referenceNameSlotIndices[VK_MAX_VIDEO_AV1_REFERENCES_PER_FRAME_KHR];
        VkBool32                               primaryReferenceCdfOnly;
        VkBool32                               generateObuExtensionHeader;
    } VkVideoEncodeAV1PictureInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `predictionMode` specifies the AV1 prediction mode to use for the encoded frame.

- `rateControlGroup` specifies the AV1 rate control group to use for the encoded frame when the current rate control mode is not VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR. Otherwise it is ignored.

- `constantQIndex` is the quantizer index to use for the encoded frame if the current rate control mode configured for the video session is VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR.

- `pStdPictureInfo` is a pointer to a `StdVideoEncodeAV1PictureInfo` structure specifying AV1 picture information.

- `referenceNameSlotIndices` is an array of seven (VK_MAX_VIDEO_AV1_REFERENCES_PER_FRAME_KHR, which is equal to the Video Std definition `STD_VIDEO_AV1_REFS_PER_FRAME`) signed integer values specifying the index of the DPB slot or a negative integer value for each AV1 reference name used for inter coding. In particular, the DPB slot index for the AV1 reference name `frame` is specified in `referenceNameSlotIndices`[`frame` - `STD_VIDEO_AV1_REFERENCE_NAME_LAST_FRAME`].

- `primaryReferenceCdfOnly` controls whether the primary reference frame indicated by the value of `pStdPictureInfo->primary_ref_frame` is used only for CDF data reference, as defined in sections 6.8.2 of the AV1 Specification. If set to VK_TRUE, then the primary reference frame’s picture data will not be used for sample prediction.

- `generateObuExtensionHeader` controls whether OBU extension headers are generated into the target bitstream, as defined in sections 5.3.1, 5.3.2, and 5.3.3 of the AV1 Specification.

This structure is specified in the `pNext` chain of the VkVideoEncodeInfoKHR structure passed to vkCmdEncodeVideoKHR to specify the codec-specific picture information for an AV1 encode operation.

Encode Input Picture Information

  When this structure is specified in the `pNext` chain of the VkVideoEncodeInfoKHR structure passed to vkCmdEncodeVideoKHR, the information related to the encode input picture is defined as follows:

  - The image subregion used is determined according to the AV1 Encode Picture Data Access section.

  - The encode input picture is associated with the AV1 picture information provided in `pStdPictureInfo`.

Std Picture Information

  The members of the `StdVideoEncodeAV1PictureInfo` structure pointed to by `pStdPictureInfo` are interpreted as follows:

  - `flags.reserved` and `reserved1` are used only for padding purposes and are otherwise ignored;

  - `pSegmentation` must be `NULL`

    Note | AV1 segmentation is currently not supported in video encode operations. Accordingly, the application needs to set `flags.segmentation_enabled` to `0` and `pSegmentation` to `NULL`.

  - `pTileInfo` is `NULL` or a pointer to a `StdVideoAV1TileInfo` structure specifying AV1 tile parameters;

  - the `StdVideoAV1Quantization` structure pointed to by `pQuantization` is interpreted as follows:

    - `flags.reserved` is used only for padding purposes and is otherwise ignored;

    - all other members of `StdVideoAV1Quantization` are interpreted as defined in section 6.8.11 of the AV1 Specification;

  - the `StdVideoAV1LoopFilter` structure pointed to by `pLoopFilter` is interpreted as follows:

    - `flags.reserved` is used only for padding purposes and is otherwise ignored;

    - `update_ref_delta` is a bitmask where bit index i is interpreted as the value of `update_ref_delta` corresponding to element i of `loop_filter_ref_deltas` as defined in section 6.8.10 of the AV1 Specification;

    - `update_mode_delta` is a bitmask where bit index i is interpreted as the value of `update_mode_delta` corresponding to element i of `loop_filter_mode_deltas` as defined in section 6.8.10 of the AV1 Specification;

    - all other members of `StdVideoAV1LoopFilter` are interpreted as defined in section 6.8.10 of the AV1 Specification;

  - if `flags.enable_cdef` is set in the active sequence header, then the members of the `StdVideoAV1CDEF` structure pointed to by `pCDEF` are interpreted as follows:

    - `cdef_y_sec_strength` and `cdef_uv_sec_strength` are the bitstream values of the corresponding syntax elements defined in section 5.9.19 of the AV1 Specification;

    - all other members of `StdVideoAV1CDEF` are interpreted as defined in section 6.10.14 of the AV1 Specification;

  - if `flags.UsesLr` is set in the active sequence header, then the `StdVideoAV1LoopRestoration` structure pointed to by `pLoopRestoration` is interpreted as follows:

    - `LoopRestorationSize`[`plane`] is interpreted as log2(`size`) - 5, where `size` is the value of `LoopRestorationSize`[`plane`] as defined in section 6.10.15 of the AV1 Specification;

    - all other members of `StdVideoAV1LoopRestoration` are defined as in section 6.10.15 of the AV1 Specification;

  - the members of the `StdVideoAV1GlobalMotion` structure pointed to by `pGlobalMotion` are interpreted as defined in section 7.10 of the AV1 Specification;

  - `pExtensionHeader` is `NULL` or a pointer to a `StdVideoEncodeAV1ExtensionHeader` structure whose `temporal_id` and `spatial_id` members specify the temporal and spatial layer ID of the reference frame, respectively (these IDs are encoded into the OBU extension header if VkVideoEncodeAV1PictureInfoKHR::`generateObuExtensionHeader` is set to VK_TRUE for the encode operation);

  - if `flags.buffer_removal_time_present_flag` is set, then `pBufferRemovalTimes` is a pointer to an array of N number of unsigned integer values specifying the elements of the `buffer_removal_time` array, as defined in section 6.8.2 of the AV1 Specification, where N is the number of operating points specified for the active sequence header through VkVideoEncodeAV1SessionParametersCreateInfoKHR::`stdOperatingPointCount`;

  - all other members are interpreted as defined in section 6.8 of the AV1 Specification.

Reference picture setup is controlled by the value of `StdVideoEncodeAV1PictureInfo`::`refresh_frame_flags`. If it is not zero and a reconstructed picture is specified, then the latter is used as the target of picture reconstruction to activate the DPB slot specified in `pEncodeInfo->pSetupReferenceSlot->slotIndex`. If `StdVideoEncodeAV1PictureInfo`::`refresh_frame_flags` is zero, but a reconstructed picture is specified, then the corresponding picture reference associated with the DPB slot is invalidated, as described in the DPB Slot States section.

Std Tile Parameters

  Specifying AV1 tile parameters is optional. If `StdVideoEncodeAV1PictureInfo`::`pTileInfo` is `NULL`, then the implementation determines the values of AV1 tile parameters defined in section 6.8.14 of the AV1 Specification in an implementation-dependent manner. If `StdVideoEncodeAV1PictureInfo`::`pTileInfo` is not `NULL`, then the members of the `StdVideoAV1TileInfo` structure pointed to by `StdVideoEncodeAV1PictureInfo`::`pTileInfo` are interpreted as follows:

  - `flags.reserved` and `reserved1` are used only for padding purposes and are otherwise ignored;

  - `TileCols` and `TileRows` specify the number of tile columns and tile rows as defined in section 6.8.14 of the AV1 Specification;

  - `tile_size_bytes_minus_1` is ignored, as its value, as defined in section 6.8.14 of the AV1 Specification, is determined as the result of the encoding process;

  - `pMiColStarts` and `pMiRowStarts` are ignored, as the elements of the `MiColStarts` and `MiRowStarts` arrays defined in section 6.8.14 of the AV1 Specification are determined by the implementation based on the tile widths and heights determined by the implementation or specified through the `pWidthInSbsMinus1` and `pHeightInSbsMinus1` arrays, respectively;

  - `pWidthInSbsMinus1` is `NULL` or a pointer to an array of `TileCols` number of unsigned integers that corresponds to `width_in_sbs_minus_1` defined in section 6.8.14 of the AV1 Specification;

  - `pHeightInSbsMinus1` is `NULL` or is a pointer to an array of `TileRows` number of unsigned integers that corresponds to `height_in_sbs_minus_1` defined in section 6.8.14 of the AV1 Specification;

  - all other members of `StdVideoAV1TileInfo` are interpreted as defined in section 6.8.14 of the AV1 Specification.

If `flags.uniform_tile_spacing_flag` is set, then `pWidthInSbsMinus1` and `pHeightInSbsMinus1` are ignored.

If `flags.uniform_tile_spacing_flag` is not set and `pWidthInSbsMinus1` is `NULL`, then the width of individual tile columns is determined in an implementation-dependent manner.

If `flags.uniform_tile_spacing_flag` is not set and `pHeightInSbsMinus1` is `NULL`, then the height of individual tile rows is determined in an implementation-dependent manner.

Note | In general, implementations are expected to respect the application-specified AV1 tile parameters. However, as implementations may have restrictions on the combination of tile column and row counts, and tile widths and heights with respect to the extent of the encoded frame beyond the restrictions specified in the AV1 Specification and this specification (through video profile capabilities), certain parameter combinations may require the implementation to override them in order to conform to such implementation-specific limitations.

Active Parameter Sets

  The active sequence header is the AV1 sequence header stored in the bound video session parameters object.

Valid Usage

- VUID-VkVideoEncodeAV1PictureInfoKHR-flags-10289
  If VkVideoEncodeAV1CapabilitiesKHR::`flags`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the used video profile, does not include VK_VIDEO_ENCODE_AV1_CAPABILITY_PRIMARY_REFERENCE_CDF_ONLY_BIT_KHR, then `primaryReferenceCdfOnly` must be VK_FALSE

- VUID-VkVideoEncodeAV1PictureInfoKHR-primaryReferenceCdfOnly-10290
  If `primaryReferenceCdfOnly` is set to VK_TRUE, then `pStdPictureInfo->primary_ref_frame` must be less than VK_MAX_VIDEO_AV1_REFERENCES_PER_FRAME_KHR

- VUID-VkVideoEncodeAV1PictureInfoKHR-pStdPictureInfo-10291
  If `pStdPictureInfo->primary_ref_frame` is less than VK_MAX_VIDEO_AV1_REFERENCES_PER_FRAME_KHR, then `referenceNameSlotIndices`[`pStdPictureInfo->primary_ref_frame`] must not be negative

- VUID-VkVideoEncodeAV1PictureInfoKHR-flags-10292
  If VkVideoEncodeAV1CapabilitiesKHR::`flags`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the used video profile, does not include VK_VIDEO_ENCODE_AV1_CAPABILITY_GENERATE_OBU_EXTENSION_HEADER_BIT_KHR, then `generateObuExtensionHeader` must be VK_FALSE

- VUID-VkVideoEncodeAV1PictureInfoKHR-generateObuExtensionHeader-10293
  If `generateObuExtensionHeader` is set to VK_TRUE, then `pStdPictureInfo->pExtensionHeader` must not be `NULL`

Valid Usage (Implicit)

- VUID-VkVideoEncodeAV1PictureInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_PICTURE_INFO_KHR

- VUID-VkVideoEncodeAV1PictureInfoKHR-predictionMode-parameter
  `predictionMode` must be a valid VkVideoEncodeAV1PredictionModeKHR value

- VUID-VkVideoEncodeAV1PictureInfoKHR-rateControlGroup-parameter
  `rateControlGroup` must be a valid VkVideoEncodeAV1RateControlGroupKHR value

- VUID-VkVideoEncodeAV1PictureInfoKHR-pStdPictureInfo-parameter
  `pStdPictureInfo` must be a valid pointer to a valid `StdVideoEncodeAV1PictureInfo` value

Structure Chaining

Extends the structure

  - VkVideoEncodeInfoKHR

The VkVideoEncodeAV1DpbSlotInfoKHR structure is defined as:

    // Provided by VK_KHR_video_encode_av1
    typedef struct VkVideoEncodeAV1DpbSlotInfoKHR {
        VkStructureType                          sType;
        const void*                              pNext;
        const StdVideoEncodeAV1ReferenceInfo*    pStdReferenceInfo;
    } VkVideoEncodeAV1DpbSlotInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `pStdReferenceInfo` is a pointer to a `StdVideoEncodeAV1ReferenceInfo` structure specifying AV1 reference information.

This structure is specified in the `pNext` chain of VkVideoEncodeInfoKHR::`pSetupReferenceSlot`, if not `NULL`, and the `pNext` chain of the elements of VkVideoEncodeInfoKHR::`pReferenceSlots` to specify the codec-specific reference picture information for an AV1 encode operation.

Active Reference Picture Information

  When this structure is specified in the `pNext` chain of the elements of VkVideoEncodeInfoKHR::`pReferenceSlots`, one element is added to the list of active reference pictures used by the video encode operation for each element of VkVideoEncodeInfoKHR::`pReferenceSlots` as follows:

  - The image subregion used is determined according to the AV1 Encode Picture Data Access section.

  - The reference picture is associated with the DPB slot index specified in the `slotIndex` member of the corresponding element of VkVideoEncodeInfoKHR::`pReferenceSlots`.

  - The reference picture is associated with the AV1 reference information provided in `pStdReferenceInfo`.

Reconstructed Picture Information

  When this structure is specified in the `pNext` chain of VkVideoEncodeInfoKHR::`pSetupReferenceSlot`, the information related to the reconstructed picture is defined as follows:

  - The image subregion used is determined according to the AV1 Encode Picture Data Access section.

  - If reference picture setup is requested, then the reconstructed picture is used to activate the DPB slot with the index specified in VkVideoEncodeInfoKHR::`pSetupReferenceSlot->slotIndex`.

  - The reconstructed picture is associated with the AV1 reference information provided in `pStdReferenceInfo`.

Std Reference Information

  The members of the `StdVideoEncodeAV1ReferenceInfo` structure pointed to by `pStdReferenceInfo` are interpreted as follows:

  - `flags.reserved` and `reserved1` are used only for padding purposes and are otherwise ignored;

  - `flags.disable_frame_end_update_cdf` is interpreted as defined in section 6.8.2 of the AV1 Specification;

  - `flags.segmentation_enabled` is interpreted as defined in section 6.8.13 of the AV1 Specification;

  - `RefFrameId` is interpreted as the element of the `RefFrameId` array defined in section 6.8.2 of the AV1 Specification corresponding to the reference frame;

  - `frame_type` is interpreted as defined in section 6.8.2 of the AV1 Specification;

  - `OrderHint` is interpreted as defined in section 6.8.2 of the AV1 Specification;

  - `pExtensionHeader` is `NULL` or a pointer to a `StdVideoEncodeAV1ExtensionHeader` structure whose `temporal_id` and `spatial_id` members specify the temporal and spatial layer ID of the reference frame, respectively.

Valid Usage (Implicit)

- VUID-VkVideoEncodeAV1DpbSlotInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_DPB_SLOT_INFO_KHR

- VUID-VkVideoEncodeAV1DpbSlotInfoKHR-pStdReferenceInfo-parameter
  `pStdReferenceInfo` must be a valid pointer to a valid `StdVideoEncodeAV1ReferenceInfo` value

Structure Chaining

Extends the structure

  - VkVideoReferenceSlotInfoKHR

#### 49.23.14. AV1 Encode Rate Control

##### Group of Pictures

In case of AV1 encoding it is common practice to follow a regular pattern of frame types and prediction directions in display order when encoding subsequent frames. This pattern is referred to as the group of pictures (GOP).

The AV1 Specification, unlike some other video compression standards, does not restrict the direction in display order of the referenced frames based on the used frame type or AV1 prediction mode. Accordingly, this specification introduces the concept of rate control groups for which the application can specify separate rate control configuration parameters. When encoding a frame, the application specifies the rate control group the encoded frame belongs to through a VkVideoEncodeAV1RateControlGroupKHR value in VkVideoEncodeAV1PictureInfoKHR::`rateControlGroup`. This value is then used by the implementation’s rate control algorithm to determine which rate control configuration parameters apply to it.

Possible AV1 encode rate control groups are as follows:

    // Provided by VK_KHR_video_encode_av1
    typedef enum VkVideoEncodeAV1RateControlGroupKHR {
        VK_VIDEO_ENCODE_AV1_RATE_CONTROL_GROUP_INTRA_KHR = 0,
        VK_VIDEO_ENCODE_AV1_RATE_CONTROL_GROUP_PREDICTIVE_KHR = 1,
        VK_VIDEO_ENCODE_AV1_RATE_CONTROL_GROUP_BIPREDICTIVE_KHR = 2,
    } VkVideoEncodeAV1RateControlGroupKHR;

- VK_VIDEO_ENCODE_AV1_RATE_CONTROL_GROUP_INTRA_KHR should be specified when encoding AV1 frames that use intra-only prediction (e.g. when encoding AV1 frames of type `STD_VIDEO_AV1_FRAME_TYPE_KEY` or `STD_VIDEO_AV1_FRAME_TYPE_INTRA_ONLY`).

- VK_VIDEO_ENCODE_AV1_RATE_CONTROL_GROUP_PREDICTIVE_KHR should be specified when encoding AV1 frames that only have forward references in display order.

- VK_VIDEO_ENCODE_AV1_RATE_CONTROL_GROUP_BIPREDICTIVE_KHR should be specified when encoding AV1 frames that have backward references in display order.

Note | While the application can specify any rate control group for any frame, regardless of the frame type, prediction mode, or prediction direction, specifying a rate control group that does not reflect the prediction direction used by the encoded frame may result in unexpected behavior of the implementation’s rate control algorithm.

A regular GOP is defined by the following parameters:

- The number of frames in the GOP;

- The number of consecutive frames encoded with VK_VIDEO_ENCODE_AV1_RATE_CONTROL_GROUP_BIPREDICTIVE_KHR between frames encoded with other rate control groups in display order.

Frame types in a regular GOP follow each other in display order according to the following algorithm:

1. The first frame is always a frame encoded with VK_VIDEO_ENCODE_AV1_RATE_CONTROL_GROUP_INTRA_KHR.

2. This is followed by a number of consecutive frames encoded with VK_VIDEO_ENCODE_AV1_RATE_CONTROL_GROUP_BIPREDICTIVE_KHR.

3. If the number of frames in the GOP is not reached yet, then the next frame is a frame encoded with VK_VIDEO_ENCODE_AV1_RATE_CONTROL_GROUP_PREDICTIVE_KHR and the algorithm continues from step 2.

Figure 50. AV1 regular GOP starting with an intra-only frame

When frames with the AV1 frame type `STD_VIDEO_AV1_FRAME_TYPE_KEY` are used in a video sequence, the key frame period refers to the distance between subsequent frames with the AV1 frame type `STD_VIDEO_AV1_FRAME_TYPE_KEY`.

It is also typical for AV1 encoding to use specific reference picture usage patterns across the frames of the GOP. The two most common reference patterns used are as follows:

Flat Reference Pattern

  - Each frame encoded with VK_VIDEO_ENCODE_AV1_RATE_CONTROL_GROUP_PREDICTIVE_KHR refers to the last frame that was not encoded using VK_VIDEO_ENCODE_AV1_RATE_CONTROL_GROUP_BIPREDICTIVE_KHR, in display order, as its forward reference.

  - Each frame encoded with VK_VIDEO_ENCODE_AV1_RATE_CONTROL_GROUP_BIPREDICTIVE_KHR refers to the last frame that was not encoded with VK_VIDEO_ENCODE_AV1_RATE_CONTROL_GROUP_BIPREDICTIVE_KHR, in display order, as its forward reference, and refers to the next frame that was not encoded with VK_VIDEO_ENCODE_AV1_RATE_CONTROL_GROUP_BIPREDICTIVE_KHR, in display order, as its backward reference.

Figure 51. AV1 flat reference pattern

Dyadic Reference Pattern

  - Each frame encoded with VK_VIDEO_ENCODE_AV1_RATE_CONTROL_GROUP_PREDICTIVE_KHR refers to the last frame that was not encoded with VK_VIDEO_ENCODE_AV1_RATE_CONTROL_GROUP_BIPREDICTIVE_KHR, in display order, as its forward reference.

  - The following algorithm is applied to the sequence of consecutive frames encoded with VK_VIDEO_ENCODE_AV1_RATE_CONTROL_GROUP_BIPREDICTIVE_KHR between frames using other rate control groups in display order:

    1. The frame in the middle of this sequence uses the frame preceding the sequence as its forward reference, and uses the frame following the sequence as its backward reference.

    2. The algorithm is executed recursively for the following frame sequences:

       - The frames of the original sequence preceding the frame in the middle, if any.

       - The frames of the original sequence following the frame in the middle, if any.

Figure 52. AV1 dyadic reference pattern

The application can provide guidance to the implementation’s rate control algorithm about the structure of the GOP used by the application. Any such guidance about the GOP and its structure does not mandate that specific GOP structure to be used by the application, as the frame type and the selected rate control group is still application-controlled, however, any deviation from the provided guidance may result in undesired rate control behavior including, but not limited, to the implementation not being able to conform to the expected average or target bitrates, or other rate control parameters specified by the application.

When an AV1 encode session is used to encode multiple temporal layers, it is also common practice to follow a regular pattern for the AV1 temporal ID for the encoded frames in display order when encoding subsequent frames. This pattern is referred to as the temporal GOP. The most common temporal layer pattern used is as follows:

Dyadic Temporal Layer Pattern

  - The number of frames in the temporal GOP is 2n-1, where n is the number of temporal layers.

  - The ith frame in the temporal GOP uses temporal ID t, if and only if the index of the least significant bit set in i equals n-t-1, except for the first frame, which is the only frame in the temporal GOP using temporal ID zero.

  - The ith frame in the temporal GOP uses the rth frame as reference, where r is calculated from i by clearing the least significant bit set in it, except for the first frame in the temporal GOP, which uses the first frame of the previous temporal GOP, if any, as reference.

Figure 53. AV1 dyadic temporal layer pattern

Note | Multi-layer rate control and multi-layer coding are typically used for streaming cases where low latency is expected, hence frames usually do not use backward references in display order.

The `VkVideoEncodeAV1RateControlInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_encode_av1
    typedef struct VkVideoEncodeAV1RateControlInfoKHR {
        VkStructureType                        sType;
        const void*                            pNext;
        VkVideoEncodeAV1RateControlFlagsKHR    flags;
        uint32_t                               gopFrameCount;
        uint32_t                               keyFramePeriod;
        uint32_t                               consecutiveBipredictiveFrameCount;
        uint32_t                               temporalLayerCount;
    } VkVideoEncodeAV1RateControlInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask of VkVideoEncodeAV1RateControlFlagBitsKHR specifying AV1 rate control flags.

- `gopFrameCount` is the number of frames within a group of pictures (GOP) intended to be used by the application. If it is set to 0, the rate control algorithm may assume an implementation-dependent GOP length. If it is set to `UINT32_MAX`, the GOP length is treated as infinite.

- `keyFramePeriod` is the interval, in terms of number of frames, between two frames with the AV1 frame type `STD_VIDEO_AV1_FRAME_TYPE_KEY` (see key frame period). If it is set to 0, the rate control algorithm may assume an implementation-dependent key frame period. If it is set to `UINT32_MAX`, the key frame period is treated as infinite.

- `consecutiveBipredictiveFrameCount` is the number of consecutive frames encoded with VK_VIDEO_ENCODE_AV1_RATE_CONTROL_GROUP_BIPREDICTIVE_KHR between frames encoded with other rate control groups within the GOP.

- `temporalLayerCount` specifies the number of AV1 temporal layers that the application intends to use.

When an instance of this structure is included in the `pNext` chain of the VkVideoCodingControlInfoKHR structure passed to the vkCmdControlVideoCodingKHR command, and VkVideoCodingControlInfoKHR::`flags` includes VK_VIDEO_CODING_CONTROL_ENCODE_RATE_CONTROL_BIT_KHR, the parameters in this structure are used as guidance for the implementation’s rate control algorithm (see Video Coding Control).

Valid Usage

- VUID-VkVideoEncodeAV1RateControlInfoKHR-flags-10294
  If `flags` contains VK_VIDEO_ENCODE_AV1_RATE_CONTROL_REFERENCE_PATTERN_FLAT_BIT_KHR or VK_VIDEO_ENCODE_AV1_RATE_CONTROL_REFERENCE_PATTERN_DYADIC_BIT_KHR, then it must also contain VK_VIDEO_ENCODE_AV1_RATE_CONTROL_REGULAR_GOP_BIT_KHR

- VUID-VkVideoEncodeAV1RateControlInfoKHR-flags-10295
  If `flags` contains VK_VIDEO_ENCODE_AV1_RATE_CONTROL_REFERENCE_PATTERN_FLAT_BIT_KHR, then it must not also contain VK_VIDEO_ENCODE_AV1_RATE_CONTROL_REFERENCE_PATTERN_DYADIC_BIT_KHR

- VUID-VkVideoEncodeAV1RateControlInfoKHR-flags-10296
  If `flags` contains VK_VIDEO_ENCODE_AV1_RATE_CONTROL_REGULAR_GOP_BIT_KHR, then `gopFrameCount` must be greater than `0`

- VUID-VkVideoEncodeAV1RateControlInfoKHR-keyFramePeriod-10297
  If `keyFramePeriod` is not `0`, then it must be greater than or equal to `gopFrameCount`

- VUID-VkVideoEncodeAV1RateControlInfoKHR-consecutiveBipredictiveFrameCount-10298
  If `consecutiveBipredictiveFrameCount` is not `0`, then it must be less than `gopFrameCount`

- VUID-VkVideoEncodeAV1RateControlInfoKHR-temporalLayerCount-10299
  `temporalLayerCount` must be less than or equal to VkVideoEncodeAV1CapabilitiesKHR::`maxTemporalLayerCount`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the used video profile

Valid Usage (Implicit)

- VUID-VkVideoEncodeAV1RateControlInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_RATE_CONTROL_INFO_KHR

- VUID-VkVideoEncodeAV1RateControlInfoKHR-flags-parameter
  `flags` must be a valid combination of VkVideoEncodeAV1RateControlFlagBitsKHR values

Structure Chaining

Extends the structures

  - VkVideoBeginCodingInfoKHR

  - VkVideoCodingControlInfoKHR

Bits which can be set in VkVideoEncodeAV1RateControlInfoKHR::`flags`, specifying AV1 rate control flags, are:

    // Provided by VK_KHR_video_encode_av1
    typedef enum VkVideoEncodeAV1RateControlFlagBitsKHR {
        VK_VIDEO_ENCODE_AV1_RATE_CONTROL_REGULAR_GOP_BIT_KHR = 0x00000001,
        VK_VIDEO_ENCODE_AV1_RATE_CONTROL_TEMPORAL_LAYER_PATTERN_DYADIC_BIT_KHR = 0x00000002,
        VK_VIDEO_ENCODE_AV1_RATE_CONTROL_REFERENCE_PATTERN_FLAT_BIT_KHR = 0x00000004,
        VK_VIDEO_ENCODE_AV1_RATE_CONTROL_REFERENCE_PATTERN_DYADIC_BIT_KHR = 0x00000008,
    } VkVideoEncodeAV1RateControlFlagBitsKHR;

- VK_VIDEO_ENCODE_AV1_RATE_CONTROL_REGULAR_GOP_BIT_KHR specifies that the application intends to use a regular GOP structure according to the parameters specified in the `gopFrameCount` and `keyFramePeriod` members of the VkVideoEncodeAV1RateControlInfoKHR structure.

- VK_VIDEO_ENCODE_AV1_RATE_CONTROL_TEMPORAL_LAYER_PATTERN_DYADIC_BIT_KHR specifies that the application intends to follow a dyadic temporal layer pattern.

- VK_VIDEO_ENCODE_AV1_RATE_CONTROL_REFERENCE_PATTERN_FLAT_BIT_KHR specifies that the application intends to follow a flat reference pattern in the GOP.

- VK_VIDEO_ENCODE_AV1_RATE_CONTROL_REFERENCE_PATTERN_DYADIC_BIT_KHR specifies that the application intends to follow a dyadic reference pattern in the GOP.

    // Provided by VK_KHR_video_encode_av1
    typedef VkFlags VkVideoEncodeAV1RateControlFlagsKHR;

`VkVideoEncodeAV1RateControlFlagsKHR` is a bitmask type for setting a mask of zero or more VkVideoEncodeAV1RateControlFlagBitsKHR.

##### Rate Control Layers

The `VkVideoEncodeAV1RateControlLayerInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_encode_av1
    typedef struct VkVideoEncodeAV1RateControlLayerInfoKHR {
        VkStructureType                 sType;
        const void*                     pNext;
        VkBool32                        useMinQIndex;
        VkVideoEncodeAV1QIndexKHR       minQIndex;
        VkBool32                        useMaxQIndex;
        VkVideoEncodeAV1QIndexKHR       maxQIndex;
        VkBool32                        useMaxFrameSize;
        VkVideoEncodeAV1FrameSizeKHR    maxFrameSize;
    } VkVideoEncodeAV1RateControlLayerInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `useMinQIndex` indicates whether the quantizer index values determined by rate control will be clamped to the lower bounds on the quantizer index values specified in `minQIndex`.

- `minQIndex` specifies the lower bounds on the quantizer index values, for each rate control group, that the implementation’s rate control algorithm will use when `useMinQIndex` is set to VK_TRUE.

- `useMaxQIndex` indicates whether the quantizer index values determined by rate control will be clamped to the upper bounds on the quantizer index values specified in `maxQIndex`.

- `maxQIndex` specifies the upper bounds on the quantizer index values, for each rate control group, that the implementation’s rate control algorithm will use when `useMaxQIndex` is set to VK_TRUE.

- `useMaxFrameSize` indicates whether the implementation’s rate control algorithm should use the values specified in `maxFrameSize` as the upper bounds on the encoded frame size for each rate control group.

- `maxFrameSize` specifies the upper bounds on the encoded frame size, for each rate control group, when `useMaxFrameSize` is set to VK_TRUE.

When used, the values in `minQIndex` and `maxQIndex` guarantee that the effective quantizer index values used by the implementation will respect those lower and upper bounds, respectively. However, limiting the range of quantizer index values that the implementation is able to use will also limit the capabilities of the implementation’s rate control algorithm to comply to other constraints. In particular, the implementation may not be able to comply to the following:

- The average and/or peak bitrate values to be used for the encoded bitstream specified in the `averageBitrate` and `maxBitrate` members of the VkVideoEncodeRateControlLayerInfoKHR structure.

- The upper bounds on the encoded frame size, for each rate control group, specified in the `maxFrameSize` member of `VkVideoEncodeAV1RateControlLayerInfoKHR`.

Note | In general, applications need to configure rate control parameters appropriately in order to be able to get the desired rate control behavior, as described in the Video Encode Rate Control section.

When an instance of this structure is included in the `pNext` chain of a VkVideoEncodeRateControlLayerInfoKHR structure specified in one of the elements of the `pLayers` array member of the VkVideoEncodeRateControlInfoKHR structure passed to the vkCmdControlVideoCodingKHR command, VkVideoCodingControlInfoKHR::`flags` includes VK_VIDEO_CODING_CONTROL_ENCODE_RATE_CONTROL_BIT_KHR, and the bound video session was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR, it specifies the AV1-specific rate control parameters of the rate control layer corresponding to that element of `pLayers`.

Valid Usage

- VUID-VkVideoEncodeAV1RateControlLayerInfoKHR-useMinQIndex-10300
  If `useMinQIndex` is VK_TRUE, then the `intraQIndex`, `predictiveQIndex`, and `bipredictiveQIndex` members of `minQIndex` must all be between VkVideoEncodeAV1CapabilitiesKHR::`minQIndex` and VkVideoEncodeAV1CapabilitiesKHR::`maxQIndex`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the used video profile

- VUID-VkVideoEncodeAV1RateControlLayerInfoKHR-useMinQIndex-10301
  If `useMinQIndex` is VK_TRUE and VkVideoEncodeAV1CapabilitiesKHR::`flags`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the used video profile, does not include VK_VIDEO_ENCODE_AV1_CAPABILITY_PER_RATE_CONTROL_GROUP_MIN_MAX_Q_INDEX_BIT_KHR, then the `intraQIndex`, `predictiveQIndex`, and `bipredictiveQIndex` members of `minQIndex` must all specify the same value

- VUID-VkVideoEncodeAV1RateControlLayerInfoKHR-useMaxQIndex-10302
  If `useMaxQIndex` is VK_TRUE, then the `intraQIndex`, `predictiveQIndex`, and `bipredictiveQIndex` members of `maxQIndex` must all be between VkVideoEncodeAV1CapabilitiesKHR::`minQIndex` and VkVideoEncodeAV1CapabilitiesKHR::`maxQIndex`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the used video profile

- VUID-VkVideoEncodeAV1RateControlLayerInfoKHR-useMaxQIndex-10303
  If `useMaxQIndex` is VK_TRUE and VkVideoEncodeAV1CapabilitiesKHR::`flags`, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the used video profile, does not include VK_VIDEO_ENCODE_AV1_CAPABILITY_PER_RATE_CONTROL_GROUP_MIN_MAX_Q_INDEX_BIT_KHR, then the `intraQIndex`, `predictiveQIndex`, and `bipredictiveQIndex` members of `maxQIndex` must all specify the same value

- VUID-VkVideoEncodeAV1RateControlLayerInfoKHR-useMinQIndex-10304
  If `useMinQIndex` and `useMaxQIndex` are both VK_TRUE, then the `intraQIndex`, `predictiveQIndex`, and `bipredictiveQIndex` members of `minQIndex` must all be less than or equal to the respective members of `maxQIndex`

Valid Usage (Implicit)

- VUID-VkVideoEncodeAV1RateControlLayerInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_RATE_CONTROL_LAYER_INFO_KHR

- VUID-VkVideoEncodeAV1RateControlLayerInfoKHR-minQIndex-parameter
  `minQIndex` must be a valid VkVideoEncodeAV1QIndexKHR structure

- VUID-VkVideoEncodeAV1RateControlLayerInfoKHR-maxQIndex-parameter
  `maxQIndex` must be a valid VkVideoEncodeAV1QIndexKHR structure

- VUID-VkVideoEncodeAV1RateControlLayerInfoKHR-maxFrameSize-parameter
  `maxFrameSize` must be a valid VkVideoEncodeAV1FrameSizeKHR structure

Structure Chaining

Extends the structure

  - VkVideoEncodeRateControlLayerInfoKHR

The `VkVideoEncodeAV1QIndexKHR` structure is defined as:

    // Provided by VK_KHR_video_encode_av1
    typedef struct VkVideoEncodeAV1QIndexKHR {
        uint32_t    intraQIndex;
        uint32_t    predictiveQIndex;
        uint32_t    bipredictiveQIndex;
    } VkVideoEncodeAV1QIndexKHR;

- `intraQIndex` is the quantizer index to be used for frames encoded with VK_VIDEO_ENCODE_AV1_RATE_CONTROL_GROUP_INTRA_KHR.

- `predictiveQIndex` is the quantizer index to be used for frames encoded with VK_VIDEO_ENCODE_AV1_RATE_CONTROL_GROUP_PREDICTIVE_KHR.

- `bipredictiveQIndex` is the quantizer index to be used for frames encoded with VK_VIDEO_ENCODE_AV1_RATE_CONTROL_GROUP_BIPREDICTIVE_KHR.

The `VkVideoEncodeAV1FrameSizeKHR` structure is defined as:

    // Provided by VK_KHR_video_encode_av1
    typedef struct VkVideoEncodeAV1FrameSizeKHR {
        uint32_t    intraFrameSize;
        uint32_t    predictiveFrameSize;
        uint32_t    bipredictiveFrameSize;
    } VkVideoEncodeAV1FrameSizeKHR;

- `intraFrameSize` is the size in bytes to be used for frames encoded with VK_VIDEO_ENCODE_AV1_RATE_CONTROL_GROUP_INTRA_KHR.

- `predictiveFrameSize` is the size in bytes to be used for frames encoded with VK_VIDEO_ENCODE_AV1_RATE_CONTROL_GROUP_PREDICTIVE_KHR.

- `bipredictiveFrameSize` is the size in bytes to be used for frames encoded with VK_VIDEO_ENCODE_AV1_RATE_CONTROL_GROUP_BIPREDICTIVE_KHR.

##### GOP Remaining Frames

Besides session level rate control configuration, the application can specify the number of frames per frame type remaining in the group of pictures (GOP).

The `VkVideoEncodeAV1GopRemainingFrameInfoKHR` structure is defined as:

    // Provided by VK_KHR_video_encode_av1
    typedef struct VkVideoEncodeAV1GopRemainingFrameInfoKHR {
        VkStructureType    sType;
        const void*        pNext;
        VkBool32           useGopRemainingFrames;
        uint32_t           gopRemainingIntra;
        uint32_t           gopRemainingPredictive;
        uint32_t           gopRemainingBipredictive;
    } VkVideoEncodeAV1GopRemainingFrameInfoKHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `useGopRemainingFrames` indicates whether the implementation’s rate control algorithm should use the values specified in `gopRemainingIntra`, `gopRemainingPredictive`, and `gopRemainingBipredictive`. If `useGopRemainingFrames` is VK_FALSE, then the values of `gopRemainingIntra`, `gopRemainingPredictive`, and `gopRemainingBipredictive` are ignored.

- `gopRemainingIntra` specifies the number of frames encoded with VK_VIDEO_ENCODE_AV1_RATE_CONTROL_GROUP_INTRA_KHR the implementation’s rate control algorithm should assume to be remaining in the GOP prior to executing the next video encode operation.

- `gopRemainingPredictive` specifies the number of frames encoded with VK_VIDEO_ENCODE_AV1_RATE_CONTROL_GROUP_PREDICTIVE_KHR the implementation’s rate control algorithm should assume to be remaining in the GOP prior to executing the next video encode operation.

- `gopRemainingBipredictive` specifies the number of frames encoded with VK_VIDEO_ENCODE_AV1_RATE_CONTROL_GROUP_BIPREDICTIVE_KHR the implementation’s rate control algorithm should assume to be remaining in the GOP prior to executing the next video encode operation.

Setting `useGopRemainingFrames` to VK_TRUE and including this structure in the `pNext` chain of VkVideoBeginCodingInfoKHR is only mandatory if the VkVideoEncodeAV1CapabilitiesKHR::`requiresGopRemainingFrames` reported for the used video profile is VK_TRUE. However, implementations may use these remaining frame counts, when specified, even when it is not required. In particular, when the application does not use a regular GOP structure, these values may provide additional guidance for the implementation’s rate control algorithm.

The VkVideoEncodeAV1CapabilitiesKHR::`prefersGopRemainingFrames` capability is also used to indicate that the implementation’s rate control algorithm may operate more accurately if the application specifies the remaining frame counts using this structure.

As with other rate control guidance values, if the effective order and number of frames encoded by the application are not in line with the remaining frame counts specified in this structure at any given point, then the behavior of the implementation’s rate control algorithm may deviate from the one expected by the application.

Valid Usage (Implicit)

- VUID-VkVideoEncodeAV1GopRemainingFrameInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_GOP_REMAINING_FRAME_INFO_KHR

Structure Chaining

Extends the structure

  - VkVideoBeginCodingInfoKHR

##### AV1 Quantizer Index Delta Maps

Quantization delta maps used with an AV1 encode profile are referred to as quantizer index delta maps and their texels contain integer values representing quantizer index delta values that are applied in the process of determining the quantizer indices of the encoded picture.

Accordingly, AV1 quantizer index delta maps always have single channel integer formats, as reported in VkVideoFormatPropertiesKHR::`format`.

When the rate control mode is VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR, the quantizer index delta values are added to the constant quantizer index value that, in effect, enable the application to explicitly control the used quantizer index values at the granularity of the used quantization map texel size.

For all other rate control modes, the quantizer index delta values can be used to offset the quantizer index values that the rate control algorithm would otherwise produce.

##### AV1 Encode Quantization

Performing AV1 encode operations involves the process of assigning quantizer index values to individual AV1 mode info blocks. This process depends on the used rate control mode, as well as other encode and rate control parameters, as described below:

- If the configured rate control mode is VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DEFAULT_KHR, then the quantizer index value is initialized by the implementation-specific default rate control algorithm.

  - If the video encode operation is issued with a quantization delta map, the quantizer index delta value corresponding to the mode info block, as fetched from the quantization map, is added to the previously determined quantizer index value. If the fetched quantizer index delta value falls outside the supported quantizer index delta value range reported in the `minQIndexDelta` and `maxQIndexDelta` members of VkVideoEncodeAV1QuantizationMapCapabilitiesKHR, then the quantizer index value used for the mode info block becomes undefined.

- If the configured rate control mode is VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR, then the quantizer index value is initialized from the constant quantizer index value specified for the encoded frame.

  - If the video encode operation is issued with a quantization delta map, the quantizer index delta value corresponding to the mode info block, as fetched from the quantization map, is added to the previously determined quantizer index value. If the fetched quantizer index delta value falls outside the supported quantizer index delta value range reported in the `minQIndexDelta` and `maxQIndexDelta` members of VkVideoEncodeAV1QuantizationMapCapabilitiesKHR, then the quantizer index value used for the mode info block becomes undefined.

- If the configured rate control mode is not VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DEFAULT_KHR or VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR, then the quantizer index value is initialized by the corresponding rate control algorithm.

  - If the video encode operation is issued with a quantization delta map, the quantizer index delta value corresponding to the mode info block, as fetched from the quantization map, is added to the previously determined quantizer index value. If the fetched quantizer index delta value falls outside the supported quantizer index delta value range reported in the `minQIndexDelta` and `maxQIndexDelta` members of VkVideoEncodeAV1QuantizationMapCapabilitiesKHR, then the quantizer index value used for the mode info block becomes undefined.

  - If the video encode operation is issued with an emphasis map, the rate control will adjust the quantizer index value based on the emphasis value corresponding to the mode info block, as fetched from the quantization map, according to the following equation:

    QIndexnew = f(QIndexprev,e)

    Where QIndexnew is the resulting quantizer index value, QIndexprev is the previously determined quantizer index value, e is the emphasis value corresponding to the macroblock, and f is an implementation-defined function for which the following implication is true:

    e1 < e2 ⇒ f(QIndex,e1) ≥ f(QIndex,e2)

    Note | This means that lower emphasis values will result in higher quantizer index values, whereas higher emphasis values will result in lower quantizer index values, but the function is not strictly decreasing with respect to the input emphasis value for a given input quantizer index value.

  - If clamping to minimum quantizer index values is enabled in the applied rate control layer, then the quantizer index value is clamped to the corresponding minimum quantizer index value.

  - If clamping to maximum quantizer index values is enabled in the applied rate control layer, then the quantizer index value is clamped to the corresponding maximum quantizer index value.

- In all cases, the final quantizer index value is clamped to the minimum and maximum quantizer index values supported by the video profile.

#### 49.23.15. AV1 Encode Requirements

This section described the required AV1 encoding capabilities for physical devices that have at least one queue family that supports the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR, as returned by vkGetPhysicalDeviceQueueFamilyProperties2 in VkQueueFamilyVideoPropertiesKHR::`videoCodecOperations`.

Table 69. Required Video Std Header Versions
Video Std Header Name | Version
--- | ---
`vulkan_video_codec_av1std_encode` | 1.0.0

Table 70. Required Video Capabilities
Video Capability | Requirement | Requirement Type1
--- | --- | ---
VkVideoCapabilitiesKHR |  |
`flags` | - | min
`minBitstreamBufferOffsetAlignment` | 4096 | max
`minBitstreamBufferSizeAlignment` | 4096 | max
`pictureAccessGranularity` | (64,64) | max
`minCodedExtent` | - | max
`maxCodedExtent` | - | min
`maxDpbSlots` | 0 | min
`maxActiveReferencePictures` | 0 | min
VkVideoEncodeCapabilitiesKHR |  |
`flags` | - | min
`rateControlModes` | VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR 8 | min
`maxBitrate` | 5529600 | min
`maxQualityLevels` | 1 | min
`encodeInputPictureGranularity` | (64,64) | max
`supportedEncodeFeedbackFlags` | VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_BUFFER_OFFSET_BIT_KHR VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_BYTES_WRITTEN_BIT_KHR + VK_VIDEO_ENCODE_FEEDBACK_AVERAGE_QUANTIZATION_BIT_KHR 10 + VK_VIDEO_ENCODE_FEEDBACK_INTRA_PIXELS_BIT_KHR 10 + VK_VIDEO_ENCODE_FEEDBACK_INTER_PIXELS_BIT_KHR 10 + VK_VIDEO_ENCODE_FEEDBACK_PICTURE_PARTITION_COUNT_BIT_KHR 10 | min
VkVideoEncodeFeedback2CapabilitiesKHR |  |
`maxPerPartitionFeedbackEntries` | - | min
`supportedPerPartitionEncodeFeedbackFlags` | VK_VIDEO_ENCODE_PER_PARTITION_FEEDBACK_STATUS_BIT_KHR 11 + VK_VIDEO_ENCODE_PER_PARTITION_FEEDBACK_BITSTREAM_BUFFER_OFFSET_BIT_KHR 11 + VK_VIDEO_ENCODE_PER_PARTITION_FEEDBACK_BITSTREAM_BYTES_WRITTEN_BIT_KHR 11 | min
VkVideoEncodeAV1CapabilitiesKHR |  |
`flags` | - | min
`codedPictureAlignment` | (8,8) | min
`maxTiles` | 1 | min
`minTileSize` | - | max
`maxTileSize` | - | min
`maxLevel` | `STD_VIDEO_AV1_LEVEL_2_0` | min
`superblockSizes` | at least one bit set | implementation-dependent
`maxSingleReferenceCount` | 0 | min
`singleReferenceNameMask` | - 2 | min
`maxUnidirectionalCompoundReferenceCount` | 0 3 | min
`maxUnidirectionalCompoundGroup1ReferenceCount` | 0 3,4 | min
`unidirectionalCompoundReferenceNameMask` | - 2 | min
`maxBidirectionalCompoundReferenceCount` | 0 3 | min
`maxBidirectionalCompoundGroup1ReferenceCount` | 0 3,5 | min
`maxBidirectionalCompoundGroup2ReferenceCount` | 0 3,5 | min
`bidirectionalCompoundReferenceNameMask` | - 2 | min
`maxTemporalLayerCount` | 1 | min
`maxSpatialLayerCount` | 1 | min
`maxOperatingPoints` | 0 | min
`minQIndex` | - | max
`maxQIndex` | - | min
`prefersGopRemainingFrames` | - | implementation-dependent
`requiresGopRemainingFrames` | - | implementation-dependent
`stdSyntaxFlags` | - | min
VkVideoEncodeQuantizationMapCapabilitiesKHR |  |
`maxQuantizationMapExtent` | - 6 | min
VkVideoEncodeAV1QuantizationMapCapabilitiesKHR |  |
`minQIndexDelta` | - 7 | max
`maxQIndexDelta` | - 7 | min
VkVideoEncodeIntraRefreshCapabilitiesKHR |  |
`intraRefreshModes` | 0 | min
`maxIntraRefreshCycleDuration` | 2 9 | min
`maxIntraRefreshActiveReferencePictures` | 1 9 | min
`partitionIndependentIntraRefreshRegions` | - | implementation-dependent
`nonRectangularIntraRefreshRegions` | - | implementation-dependent

1

  The Requirement Type column specifies the requirement is either the minimum value all implementations must support, the maximum value all implementations must support, or the exact value all implementations must support. For bitmasks a minimum value is the least bits all implementations must set, but they may have additional bits set beyond this minimum.

2

  These masks must only have bits set in the least significant VK_MAX_VIDEO_AV1_REFERENCES_PER_FRAME_KHR bits (bit index i indicates support for the AV1 reference name `STD_VIDEO_AV1_REFERENCE_NAME_LAST_FRAME` + i when using the corresponding AV1 prediction mode), and must have at least as many bits set in any `*ReferenceNameMask` capability as the value of the corresponding `max*ReferenceCount` capability.

3

  If greater than zero, it must be at least `2`.

4

  `maxUnidirectionalCompoundGroup1ReferenceCount` must be less than or equal to `maxUnidirectionalCompoundReferenceCount`

5

  The sum of `maxBidirectionalCompoundGroup1ReferenceCount` and `maxBidirectionalCompoundGroup2ReferenceCount` must be greater than or equal to `maxBidirectionalCompoundReferenceCount`

6

  If VkVideoCapabilitiesKHR::`flags` includes VK_VIDEO_ENCODE_CAPABILITY_QUANTIZATION_DELTA_MAP_BIT_KHR or VK_VIDEO_ENCODE_CAPABILITY_EMPHASIS_MAP_BIT_KHR, then the `width` and `height` members of `maxQuantizationMapExtent` must be greater than zero.

7

  If VkVideoCapabilitiesKHR::`flags` includes VK_VIDEO_ENCODE_CAPABILITY_QUANTIZATION_DELTA_MAP_BIT_KHR, then `maxQIndexDelta` must be greater than `minQIndexDelta`.

8

  If the `videoMaintenance2` feature is supported.

9

  If VkVideoEncodeIntraRefreshCapabilitiesKHR::`intraRefreshModes` is not zero.

10

  If the `videoEncodeFeedback2` feature is supported.

11

  If `maxPerPartitionFeedbackEntries` is greater than zero.

## 50. Optical Flow

### 50.1. Optical Flow Queues

`VK_NV_optical_flow` adds an optical flow queue type bit VK_QUEUE_OPTICAL_FLOW_BIT_NV to VkQueueFlagBits. Optical flow operations are supported by queues with an advertised queue capability of VK_QUEUE_OPTICAL_FLOW_BIT_NV. As in the case of other queue types, an application must use vkGetPhysicalDeviceQueueFamilyProperties to query whether the physical device has support for the Optical Flow Queue. When the implementation reports the VK_QUEUE_OPTICAL_FLOW_BIT_NV bit for a queue family, it advertises general support for Vulkan queue operations described in Devices and Queues.

### 50.2. Optical Flow Image Formats

To enumerate the supported image formats for a specific optical flow usage, call:

    // Provided by VK_NV_optical_flow
    VkResult vkGetPhysicalDeviceOpticalFlowImageFormatsNV(
        VkPhysicalDevice                            physicalDevice,
        const VkOpticalFlowImageFormatInfoNV*       pOpticalFlowImageFormatInfo,
        uint32_t*                                   pFormatCount,
        VkOpticalFlowImageFormatPropertiesNV*       pImageFormatProperties);

- `physicalDevice` is the physical device being queried.

- `pOpticalFlowImageFormatInfo` is a pointer to a VkOpticalFlowImageFormatInfoNV structure specifying the optical flow usage for which information is returned.

- `pFormatCount` is a pointer to an integer related to the number of optical flow properties available or queried, as described below.

- `pImageFormatProperties` is a pointer to an array of VkOpticalFlowImageFormatPropertiesNV structures in which supported formats and image parameters are returned.

If `pImageFormatProperties` is `NULL`, then the number of optical flow properties supported for the given `physicalDevice` is returned in `pFormatCount`. Otherwise, `pFormatCount` must point to a variable set by the application to the number of elements in the `pImageFormatProperties` array, and on return the variable is overwritten with the number of values actually written to `pImageFormatProperties`. If the value of `pFormatCount` is less than the number of optical flow properties supported, at most `pFormatCount` values will be written to `pImageFormatProperties`, and VK_INCOMPLETE will be returned instead of VK_SUCCESS, to indicate that not all the available values were returned.

Before creating an image to be used as an optical flow frame, obtain the supported image creation parameters by querying with vkGetPhysicalDeviceFormatProperties2 and vkGetPhysicalDeviceImageFormatProperties2 using one of the reported formats and adding VkOpticalFlowImageFormatInfoNV to the `pNext` chain of VkPhysicalDeviceImageFormatInfo2.

When querying the parameters with vkGetPhysicalDeviceImageFormatProperties2 for images used for optical flow operations, the VkOpticalFlowImageFormatInfoNV::`usage` field must contain one or more of the bits defined in VkOpticalFlowUsageFlagBitsNV.

Valid Usage (Implicit)

- VUID-vkGetPhysicalDeviceOpticalFlowImageFormatsNV-physicalDevice-parameter
  `physicalDevice` must be a valid VkPhysicalDevice handle

- VUID-vkGetPhysicalDeviceOpticalFlowImageFormatsNV-pOpticalFlowImageFormatInfo-parameter
  `pOpticalFlowImageFormatInfo` must be a valid pointer to a valid VkOpticalFlowImageFormatInfoNV structure

- VUID-vkGetPhysicalDeviceOpticalFlowImageFormatsNV-pFormatCount-parameter
  `pFormatCount` must be a valid pointer to a `uint32_t` value

- VUID-vkGetPhysicalDeviceOpticalFlowImageFormatsNV-pImageFormatProperties-parameter
  If the value referenced by `pFormatCount` is not `0`, and `pImageFormatProperties` is not `NULL`, `pImageFormatProperties` must be a valid pointer to an array of `pFormatCount` VkOpticalFlowImageFormatPropertiesNV structures

Return Codes

Success

  - VK_INCOMPLETE

  - VK_SUCCESS

Failure

  - VK_ERROR_EXTENSION_NOT_PRESENT

  - VK_ERROR_FORMAT_NOT_SUPPORTED

  - VK_ERROR_INITIALIZATION_FAILED

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

Note | VK_FORMAT_B8G8R8A8_UNORM, VK_FORMAT_R8_UNORM and VK_FORMAT_G8_B8R8_2PLANE_420_UNORM are initially supported for images with optical usage VK_OPTICAL_FLOW_USAGE_INPUT_BIT_NV. VK_FORMAT_R16G16_SFIXED5_NV is initially supported for images with optical flow usage VK_OPTICAL_FLOW_USAGE_OUTPUT_BIT_NV, VK_OPTICAL_FLOW_USAGE_HINT_BIT_NV and VK_OPTICAL_FLOW_USAGE_GLOBAL_FLOW_BIT_NV. VK_FORMAT_R8_UINT and VK_FORMAT_R32_UINT are initially supported for images with optical flow usage VK_OPTICAL_FLOW_USAGE_COST_BIT_NV. It is recommended to use VK_FORMAT_R8_UINT because of the lower bandwidth.

The VkOpticalFlowImageFormatInfoNV structure is defined as:

    // Provided by VK_NV_optical_flow
    typedef struct VkOpticalFlowImageFormatInfoNV {
        VkStructureType              sType;
        const void*                  pNext;
        VkOpticalFlowUsageFlagsNV    usage;
    } VkOpticalFlowImageFormatInfoNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `usage` is a bitmask of VkOpticalFlowUsageFlagBitsNV describing the intended optical flow usage of the image.

Valid Usage (Implicit)

- VUID-VkOpticalFlowImageFormatInfoNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_OPTICAL_FLOW_IMAGE_FORMAT_INFO_NV

- VUID-VkOpticalFlowImageFormatInfoNV-usage-parameter
  `usage` must be a valid combination of VkOpticalFlowUsageFlagBitsNV values

- VUID-VkOpticalFlowImageFormatInfoNV-usage-requiredbitmask
  `usage` must not be `0`

Structure Chaining

Extends the structures

  - VkImageCreateInfo

  - VkPhysicalDeviceImageFormatInfo2

Bits which can be set in VkOpticalFlowImageFormatInfoNV::`usage`, controlling optical flow usage, are:

    // Provided by VK_NV_optical_flow
    typedef enum VkOpticalFlowUsageFlagBitsNV {
        VK_OPTICAL_FLOW_USAGE_UNKNOWN_NV = 0,
        VK_OPTICAL_FLOW_USAGE_INPUT_BIT_NV = 0x00000001,
        VK_OPTICAL_FLOW_USAGE_OUTPUT_BIT_NV = 0x00000002,
        VK_OPTICAL_FLOW_USAGE_HINT_BIT_NV = 0x00000004,
        VK_OPTICAL_FLOW_USAGE_COST_BIT_NV = 0x00000008,
        VK_OPTICAL_FLOW_USAGE_GLOBAL_FLOW_BIT_NV = 0x00000010,
    } VkOpticalFlowUsageFlagBitsNV;

- VK_OPTICAL_FLOW_USAGE_INPUT_BIT_NV specifies that the image can be used as input or reference frame for an optical flow operation.

- VK_OPTICAL_FLOW_USAGE_OUTPUT_BIT_NV specifies that the image can be used as output flow vector map for an optical flow operation.

- VK_OPTICAL_FLOW_USAGE_HINT_BIT_NV specifies that the image can be used as hint flow vector map for an optical flow operation.

- VK_OPTICAL_FLOW_USAGE_COST_BIT_NV specifies that the image can be used as output cost map for an optical flow operation.

- VK_OPTICAL_FLOW_USAGE_GLOBAL_FLOW_BIT_NV specifies that the image can be used as global flow vector for an optical flow operation.

    // Provided by VK_NV_optical_flow
    typedef VkFlags   VkOpticalFlowUsageFlagsNV;

`VkOpticalFlowUsageFlagsNV` is a bitmask type for setting a mask of zero or more VkOpticalFlowUsageFlagBitsNV.

The VkOpticalFlowImageFormatPropertiesNV structure is defined as:

    // Provided by VK_NV_optical_flow
    typedef struct VkOpticalFlowImageFormatPropertiesNV {
        VkStructureType    sType;
        void*              pNext;
        VkFormat           format;
    } VkOpticalFlowImageFormatPropertiesNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `format` is a VkFormat that specifies the format that can be used with the specified optical flow image usages.

Valid Usage (Implicit)

- VUID-VkOpticalFlowImageFormatPropertiesNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_OPTICAL_FLOW_IMAGE_FORMAT_PROPERTIES_NV

- VUID-VkOpticalFlowImageFormatPropertiesNV-pNext-pNext
  `pNext` must be `NULL`

### 50.3. Optical Flow Session

#### 50.3.1. Optical Flow Session Object

Optical flow session objects are abstracted and represented by VkOpticalFlowSessionNV handles:

    // Provided by VK_NV_optical_flow
    VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkOpticalFlowSessionNV)

##### Creating an Optical Flow Session

To create an optical flow session object, call:

    // Provided by VK_NV_optical_flow
    VkResult vkCreateOpticalFlowSessionNV(
        VkDevice                                    device,
        const VkOpticalFlowSessionCreateInfoNV*     pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkOpticalFlowSessionNV*                     pSession);

- `device` is the logical device that creates the optical flow session object.

- `pCreateInfo` is a pointer to a VkOpticalFlowSessionCreateInfoNV structure containing parameters specifying the creation of the optical flow session.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

- `pSession` is a pointer to a VkOpticalFlowSessionNV handle specifying the optical flow session object which will be created by this function when it returns VK_SUCCESS

Valid Usage (Implicit)

- VUID-vkCreateOpticalFlowSessionNV-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkCreateOpticalFlowSessionNV-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkOpticalFlowSessionCreateInfoNV structure

- VUID-vkCreateOpticalFlowSessionNV-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateOpticalFlowSessionNV-pSession-parameter
  `pSession` must be a valid pointer to a VkOpticalFlowSessionNV handle

- VUID-vkCreateOpticalFlowSessionNV-device-queuecount
  The device must have been created with at least `1` queue

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_INITIALIZATION_FAILED

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The VkOpticalFlowSessionCreateInfoNV structure is defined as:

    // Provided by VK_NV_optical_flow
    typedef struct VkOpticalFlowSessionCreateInfoNV {
        VkStructureType                      sType;
        void*                                pNext;
        uint32_t                             width;
        uint32_t                             height;
        VkFormat                             imageFormat;
        VkFormat                             flowVectorFormat;
        VkFormat                             costFormat;
        VkOpticalFlowGridSizeFlagsNV         outputGridSize;
        VkOpticalFlowGridSizeFlagsNV         hintGridSize;
        VkOpticalFlowPerformanceLevelNV      performanceLevel;
        VkOpticalFlowSessionCreateFlagsNV    flags;
    } VkOpticalFlowSessionCreateInfoNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `width` is the width in pixels of the input or reference frame to be bound to this optical flow session.

- `height` is the height in pixels of the input or reference frame to be bound to this optical flow session.

- `imageFormat` is the VkFormat of the input and reference frame to be bound to this optical flow session.

- `flowVectorFormat` is the VkFormat of the flow vector maps (output or hint) to be bound to this optical flow session.

- `costFormat` is the VkFormat of the cost maps to be bound to this optical flow session.

- `outputGridSize` is exactly one bit of VkOpticalFlowGridSizeFlagsNV specifying the grid size of the output flow and cost maps to be bound to this optical flow session. The size of the output flow and cost maps is determined by `VkOpticalFlowSessionCreateInfoNV`::`width` and `VkOpticalFlowSessionCreateInfoNV`::`height` divided by `VkOpticalFlowSessionCreateInfoNV`::`outputGridSize`.

- `hintGridSize` is one exactly bit of VkOpticalFlowGridSizeFlagsNV specifying the grid size of the hint flow vector maps to be bound to this optical flow session. The size of the hint maps is determined by `VkOpticalFlowSessionCreateInfoNV`::`width` and `VkOpticalFlowSessionCreateInfoNV`::`height` divided by `VkOpticalFlowSessionCreateInfoNV`::`hintGridSize`.

- `performanceLevel` is the VkOpticalFlowPerformanceLevelNV used for this optical flow session.

- `flags` are the VkOpticalFlowSessionCreateFlagsNV used for this optical flow session.

Valid Usage

- VUID-VkOpticalFlowSessionCreateInfoNV-width-07581
  `width` must be greater than or equal to `VkPhysicalDeviceOpticalFlowPropertiesNV`::`minWidth` and less than or equal to `VkPhysicalDeviceOpticalFlowPropertiesNV`::`maxWidth`

- VUID-VkOpticalFlowSessionCreateInfoNV-height-07582
  `height` must be greater than or equal to `VkPhysicalDeviceOpticalFlowPropertiesNV`::`minHeight` and less than or equal to `VkPhysicalDeviceOpticalFlowPropertiesNV`::`maxHeight`

- VUID-VkOpticalFlowSessionCreateInfoNV-imageFormat-07583
  `imageFormat` must be one of the formats returned by vkGetPhysicalDeviceOpticalFlowImageFormatsNV for VK_OPTICAL_FLOW_USAGE_INPUT_BIT_NV

- VUID-VkOpticalFlowSessionCreateInfoNV-flowVectorFormat-07584
  `flowVectorFormat` must be one of the formats returned by vkGetPhysicalDeviceOpticalFlowImageFormatsNV for VK_OPTICAL_FLOW_USAGE_OUTPUT_BIT_NV

- VUID-VkOpticalFlowSessionCreateInfoNV-costFormat-07585
  `costFormat` must be one of the formats returned by vkGetPhysicalDeviceOpticalFlowImageFormatsNV for VK_OPTICAL_FLOW_USAGE_COST_BIT_NV if VK_OPTICAL_FLOW_SESSION_CREATE_ENABLE_COST_BIT_NV is set in `flags`

- VUID-VkOpticalFlowSessionCreateInfoNV-outputGridSize-07586
  `outputGridSize` must be exactly one of the bits reported in `VkPhysicalDeviceOpticalFlowPropertiesNV`::`supportedOutputGridSizes`

- VUID-VkOpticalFlowSessionCreateInfoNV-hintGridSize-07587
  `hintGridSize` must be exactly one of the bits reported in `VkPhysicalDeviceOpticalFlowPropertiesNV`::`supportedHintGridSizes` if VK_OPTICAL_FLOW_SESSION_CREATE_ENABLE_HINT_BIT_NV is set in `flags`

- VUID-VkOpticalFlowSessionCreateInfoNV-flags-07588
  VK_OPTICAL_FLOW_SESSION_CREATE_ENABLE_HINT_BIT_NV must not be set in `flags` if `VkPhysicalDeviceOpticalFlowPropertiesNV`::`hintSupported` is VK_FALSE

- VUID-VkOpticalFlowSessionCreateInfoNV-flags-07589
  VK_OPTICAL_FLOW_SESSION_CREATE_ENABLE_COST_BIT_NV must not be set in `flags` if `VkPhysicalDeviceOpticalFlowPropertiesNV`::`costSupported` is VK_FALSE

- VUID-VkOpticalFlowSessionCreateInfoNV-flags-07590
  VK_OPTICAL_FLOW_SESSION_CREATE_ENABLE_GLOBAL_FLOW_BIT_NV must not be set in `flags` if `VkPhysicalDeviceOpticalFlowPropertiesNV`::`globalFlowSupported` is VK_FALSE

- VUID-VkOpticalFlowSessionCreateInfoNV-flags-07591
  VK_OPTICAL_FLOW_SESSION_CREATE_ALLOW_REGIONS_BIT_NV must not be set in `flags` if `VkPhysicalDeviceOpticalFlowPropertiesNV`::`maxNumRegionsOfInterest` is 0

- VUID-VkOpticalFlowSessionCreateInfoNV-flags-07592
  VK_OPTICAL_FLOW_SESSION_CREATE_BOTH_DIRECTIONS_BIT_NV must not be set in `flags` if `VkPhysicalDeviceOpticalFlowPropertiesNV`::`bidirectionalFlowSupported` is VK_FALSE

Valid Usage (Implicit)

- VUID-VkOpticalFlowSessionCreateInfoNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_OPTICAL_FLOW_SESSION_CREATE_INFO_NV

- VUID-VkOpticalFlowSessionCreateInfoNV-pNext-pNext
  `pNext` must be `NULL` or a pointer to a valid instance of VkOpticalFlowSessionCreatePrivateDataInfoNV

- VUID-VkOpticalFlowSessionCreateInfoNV-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkOpticalFlowSessionCreateInfoNV-imageFormat-parameter
  `imageFormat` must be a valid VkFormat value

- VUID-VkOpticalFlowSessionCreateInfoNV-flowVectorFormat-parameter
  `flowVectorFormat` must be a valid VkFormat value

- VUID-VkOpticalFlowSessionCreateInfoNV-costFormat-parameter
  If `costFormat` is not `0`, `costFormat` must be a valid VkFormat value

- VUID-VkOpticalFlowSessionCreateInfoNV-outputGridSize-parameter
  `outputGridSize` must be a valid combination of VkOpticalFlowGridSizeFlagBitsNV values

- VUID-VkOpticalFlowSessionCreateInfoNV-outputGridSize-requiredbitmask
  `outputGridSize` must not be `0`

- VUID-VkOpticalFlowSessionCreateInfoNV-hintGridSize-parameter
  `hintGridSize` must be a valid combination of VkOpticalFlowGridSizeFlagBitsNV values

- VUID-VkOpticalFlowSessionCreateInfoNV-performanceLevel-parameter
  If `performanceLevel` is not `0`, `performanceLevel` must be a valid VkOpticalFlowPerformanceLevelNV value

- VUID-VkOpticalFlowSessionCreateInfoNV-flags-parameter
  `flags` must be a valid combination of VkOpticalFlowSessionCreateFlagBitsNV values

The VkOpticalFlowSessionCreatePrivateDataInfoNV structure is for NV internal use only and is defined as:

    // Provided by VK_NV_optical_flow
    typedef struct VkOpticalFlowSessionCreatePrivateDataInfoNV {
        VkStructureType    sType;
        void*              pNext;
        uint32_t           id;
        uint32_t           size;
        const void*        pPrivateData;
    } VkOpticalFlowSessionCreatePrivateDataInfoNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `id` is an identifier for data which is passed at a memory location specified in `VkOpticalFlowSessionCreatePrivateDataInfoNV`::`pPrivateData`.

- `size` is the size of data in bytes which is passed at a memory location specified in `VkOpticalFlowSessionCreatePrivateDataInfoNV`::`pPrivateData`.

- `pPrivateData` is a pointer to NV internal data.

Valid Usage (Implicit)

- VUID-VkOpticalFlowSessionCreatePrivateDataInfoNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_OPTICAL_FLOW_SESSION_CREATE_PRIVATE_DATA_INFO_NV

- VUID-VkOpticalFlowSessionCreatePrivateDataInfoNV-pPrivateData-parameter
  `pPrivateData` must be a pointer value

Structure Chaining

Extends the structure

  - VkOpticalFlowSessionCreateInfoNV

Optical flow vectors are generated block-wise, one vector for each block of NxN pixels (referred to as grid).

Bits which can be set in VkOpticalFlowSessionCreateInfoNV::`outputGridSize` and VkOpticalFlowSessionCreateInfoNV::`hintGridSize`, or which are returned in VkPhysicalDeviceOpticalFlowPropertiesNV::`supportedOutputGridSizes` and VkPhysicalDeviceOpticalFlowPropertiesNV::`supportedHintGridSizes` controlling optical flow grid sizes, are:

    // Provided by VK_NV_optical_flow
    typedef enum VkOpticalFlowGridSizeFlagBitsNV {
        VK_OPTICAL_FLOW_GRID_SIZE_UNKNOWN_NV = 0,
        VK_OPTICAL_FLOW_GRID_SIZE_1X1_BIT_NV = 0x00000001,
        VK_OPTICAL_FLOW_GRID_SIZE_2X2_BIT_NV = 0x00000002,
        VK_OPTICAL_FLOW_GRID_SIZE_4X4_BIT_NV = 0x00000004,
        VK_OPTICAL_FLOW_GRID_SIZE_8X8_BIT_NV = 0x00000008,
    } VkOpticalFlowGridSizeFlagBitsNV;

- VK_OPTICAL_FLOW_GRID_SIZE_1X1_BIT_NV specifies that grid is 1x1 pixel.

- VK_OPTICAL_FLOW_GRID_SIZE_2X2_BIT_NV specifies that grid is 2x2 pixel.

- VK_OPTICAL_FLOW_GRID_SIZE_4X4_BIT_NV specifies that grid is 4x4 pixel.

- VK_OPTICAL_FLOW_GRID_SIZE_8X8_BIT_NV specifies that grid is 8x8 pixel.

    // Provided by VK_NV_optical_flow
    typedef VkFlags   VkOpticalFlowGridSizeFlagsNV;

`VkOpticalFlowGridSizeFlagsNV` is a bitmask type for setting a mask of zero or more VkOpticalFlowGridSizeFlagBitsNV.

Optical flow exposes performance levels which the application can choose based on the desired performance and quality requirement.

The optical flow performance level types are defined with the following:

    // Provided by VK_NV_optical_flow
    typedef enum VkOpticalFlowPerformanceLevelNV {
        VK_OPTICAL_FLOW_PERFORMANCE_LEVEL_UNKNOWN_NV = 0,
        VK_OPTICAL_FLOW_PERFORMANCE_LEVEL_SLOW_NV = 1,
        VK_OPTICAL_FLOW_PERFORMANCE_LEVEL_MEDIUM_NV = 2,
        VK_OPTICAL_FLOW_PERFORMANCE_LEVEL_FAST_NV = 3,
    } VkOpticalFlowPerformanceLevelNV;

- VK_OPTICAL_FLOW_PERFORMANCE_LEVEL_SLOW_NV is a level with slower performance but higher quality.

- VK_OPTICAL_FLOW_PERFORMANCE_LEVEL_MEDIUM_NV is a level with medium performance and medium quality.

- VK_OPTICAL_FLOW_PERFORMANCE_LEVEL_FAST_NV is a preset with higher performance but lower quality.

Bits which can be set in VkOpticalFlowSessionCreateInfoNV::`flags`, controlling optical flow session operations, are:

    // Provided by VK_NV_optical_flow
    typedef enum VkOpticalFlowSessionCreateFlagBitsNV {
        VK_OPTICAL_FLOW_SESSION_CREATE_ENABLE_HINT_BIT_NV = 0x00000001,
        VK_OPTICAL_FLOW_SESSION_CREATE_ENABLE_COST_BIT_NV = 0x00000002,
        VK_OPTICAL_FLOW_SESSION_CREATE_ENABLE_GLOBAL_FLOW_BIT_NV = 0x00000004,
        VK_OPTICAL_FLOW_SESSION_CREATE_ALLOW_REGIONS_BIT_NV = 0x00000008,
        VK_OPTICAL_FLOW_SESSION_CREATE_BOTH_DIRECTIONS_BIT_NV = 0x00000010,
    } VkOpticalFlowSessionCreateFlagBitsNV;

- VK_OPTICAL_FLOW_SESSION_CREATE_ENABLE_HINT_BIT_NV specifies that a VkImageView with external flow vectors will be used as hints in performing the motion search and must be bound to VK_OPTICAL_FLOW_SESSION_BINDING_POINT_HINT_NV.

- VK_OPTICAL_FLOW_SESSION_CREATE_ENABLE_COST_BIT_NV specifies that the cost for the forward flow is generated in a VkImageView which must be bound to VK_OPTICAL_FLOW_SESSION_BINDING_POINT_COST_NV. Additionally, if VK_OPTICAL_FLOW_SESSION_CREATE_BOTH_DIRECTIONS_BIT_NV is also set, the cost for backward flow is generated in a VkImageView which must be bound to VK_OPTICAL_FLOW_SESSION_BINDING_POINT_BACKWARD_COST_NV. The cost is the confidence level of the flow vector for each grid in the frame. The Cost implies how (in)accurate the flow vector is. Higher cost value implies the flow vector to be less accurate and vice-versa.

- VK_OPTICAL_FLOW_SESSION_CREATE_ENABLE_GLOBAL_FLOW_BIT_NV specifies that a global flow vector is estimated from forward flow in a single pixel VkImageView which must be bound to VK_OPTICAL_FLOW_SESSION_BINDING_POINT_GLOBAL_FLOW_NV.

- VK_OPTICAL_FLOW_SESSION_CREATE_ALLOW_REGIONS_BIT_NV specifies that regions of interest can be specified in VkOpticalFlowExecuteInfoNV.

- VK_OPTICAL_FLOW_SESSION_CREATE_BOTH_DIRECTIONS_BIT_NV specifies that backward flow is generated in addition to forward flow which is always generated.

`VkOpticalFlowSessionCreateFlagsNV` is a bitmask type for setting a mask of zero or more VkOpticalFlowSessionCreateFlagBitsNV.

    // Provided by VK_NV_optical_flow
    typedef VkFlags   VkOpticalFlowSessionCreateFlagsNV;

##### Destroying an Optical Flow Session

To destroy an optical flow session object, call:

    // Provided by VK_NV_optical_flow
    void vkDestroyOpticalFlowSessionNV(
        VkDevice                                    device,
        VkOpticalFlowSessionNV                      session,
        const VkAllocationCallbacks*                pAllocator);

- `device` is the device that was used for the creation of the optical flow session.

- `session` is the optical flow session to be destroyed.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

Valid Usage (Implicit)

- VUID-vkDestroyOpticalFlowSessionNV-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkDestroyOpticalFlowSessionNV-session-parameter
  `session` must be a valid VkOpticalFlowSessionNV handle

- VUID-vkDestroyOpticalFlowSessionNV-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkDestroyOpticalFlowSessionNV-session-parent
  `session` must have been created, allocated, or retrieved from `device`

#### 50.3.2. Binding Vulkan Image Views to an Optical Flow Session

To bind a Vulkan image to an optical flow session object, call:

    // Provided by VK_NV_optical_flow
    VkResult vkBindOpticalFlowSessionImageNV(
        VkDevice                                    device,
        VkOpticalFlowSessionNV                      session,
        VkOpticalFlowSessionBindingPointNV          bindingPoint,
        VkImageView                                 view,
        VkImageLayout                               layout);

- `device` is the device which owns the optical flow session object `session`.

- `session` is the optical flow session object to which the image view is to be bound.

- `bindingPoint` specifies the binding point VkOpticalFlowSessionBindingPointNV to which the image view is bound.

- `view` is a VkImageView to be bound.

- `layout` must specify the layout that the image subresources accessible from `view` will be in at the time the optical flow vectors are calculated with vkCmdOpticalFlowExecuteNV on a `VkDevice`.

Valid Usage (Implicit)

- VUID-vkBindOpticalFlowSessionImageNV-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkBindOpticalFlowSessionImageNV-session-parameter
  `session` must be a valid VkOpticalFlowSessionNV handle

- VUID-vkBindOpticalFlowSessionImageNV-bindingPoint-parameter
  `bindingPoint` must be a valid VkOpticalFlowSessionBindingPointNV value

- VUID-vkBindOpticalFlowSessionImageNV-view-parameter
  If `view` is not VK_NULL_HANDLE, `view` must be a valid VkImageView handle

- VUID-vkBindOpticalFlowSessionImageNV-layout-parameter
  `layout` must be a valid VkImageLayout value

- VUID-vkBindOpticalFlowSessionImageNV-session-parent
  `session` must have been created, allocated, or retrieved from `device`

- VUID-vkBindOpticalFlowSessionImageNV-view-parent
  If `view` is a valid handle, it must have been created, allocated, or retrieved from `device`

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_INITIALIZATION_FAILED

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The optical flow session binding points are defined with the following:

    // Provided by VK_NV_optical_flow
    typedef enum VkOpticalFlowSessionBindingPointNV {
        VK_OPTICAL_FLOW_SESSION_BINDING_POINT_UNKNOWN_NV = 0,
        VK_OPTICAL_FLOW_SESSION_BINDING_POINT_INPUT_NV = 1,
        VK_OPTICAL_FLOW_SESSION_BINDING_POINT_REFERENCE_NV = 2,
        VK_OPTICAL_FLOW_SESSION_BINDING_POINT_HINT_NV = 3,
        VK_OPTICAL_FLOW_SESSION_BINDING_POINT_FLOW_VECTOR_NV = 4,
        VK_OPTICAL_FLOW_SESSION_BINDING_POINT_BACKWARD_FLOW_VECTOR_NV = 5,
        VK_OPTICAL_FLOW_SESSION_BINDING_POINT_COST_NV = 6,
        VK_OPTICAL_FLOW_SESSION_BINDING_POINT_BACKWARD_COST_NV = 7,
        VK_OPTICAL_FLOW_SESSION_BINDING_POINT_GLOBAL_FLOW_NV = 8,
    } VkOpticalFlowSessionBindingPointNV;

- VK_OPTICAL_FLOW_SESSION_BINDING_POINT_INPUT_NV specifies the binding point for the input frame.

- VK_OPTICAL_FLOW_SESSION_BINDING_POINT_REFERENCE_NV specifies the binding point for the input reference frame.

- VK_OPTICAL_FLOW_SESSION_BINDING_POINT_HINT_NV specifies the binding point for the optional external hint flow vectors.

- VK_OPTICAL_FLOW_SESSION_BINDING_POINT_FLOW_VECTOR_NV specifies the binding point for output flow vectors of default forward flow calculation.

- VK_OPTICAL_FLOW_SESSION_BINDING_POINT_BACKWARD_FLOW_VECTOR_NV specifies the binding point for the optional output flow vector map of optional backward flow calculation.

- VK_OPTICAL_FLOW_SESSION_BINDING_POINT_COST_NV specifies the binding point for the optional output cost map of default forward flow calculation.

- VK_OPTICAL_FLOW_SESSION_BINDING_POINT_BACKWARD_COST_NV specifies the binding point for the optional output cost map of optional backward flow calculation.

- VK_OPTICAL_FLOW_SESSION_BINDING_POINT_GLOBAL_FLOW_NV specifies the binding point for the optional global flow value of default forward flow calculation.

#### 50.3.3. Optical Flow Execution

Default direction of flow estimation is forward which calculates the optical flow from input frame to reference frame. Optionally backward flow estimation can be additionally calculated. An output flow vector (Vx, Vy) means that current pixel (x, y) of input frame can be found at location (x+Vx, y+Vy) in reference frame. A backward flow vector (Vx, Vy) means that current pixel (x, y) of reference frame can be found at location (x+Vx, y+Vy) in input frame.

To calculate optical flow vectors from two input frames, call:

    // Provided by VK_NV_optical_flow
    void vkCmdOpticalFlowExecuteNV(
        VkCommandBuffer                             commandBuffer,
        VkOpticalFlowSessionNV                      session,
        const VkOpticalFlowExecuteInfoNV*           pExecuteInfo);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `session` is the optical flow session object on which this command is operating.

- `pExecuteInfo` Info is a pointer to a VkOpticalFlowExecuteInfoNV.

Valid Usage (Implicit)

- VUID-vkCmdOpticalFlowExecuteNV-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdOpticalFlowExecuteNV-session-parameter
  `session` must be a valid VkOpticalFlowSessionNV handle

- VUID-vkCmdOpticalFlowExecuteNV-pExecuteInfo-parameter
  `pExecuteInfo` must be a valid pointer to a valid VkOpticalFlowExecuteInfoNV structure

- VUID-vkCmdOpticalFlowExecuteNV-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdOpticalFlowExecuteNV-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_OPTICAL_FLOW_BIT_NV operations

- VUID-vkCmdOpticalFlowExecuteNV-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdOpticalFlowExecuteNV-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdOpticalFlowExecuteNV-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdOpticalFlowExecuteNV-commonparent
  Both of `commandBuffer`, and `session` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Outside | VK_QUEUE_OPTICAL_FLOW_BIT_NV | Action

Conditional Rendering

vkCmdOpticalFlowExecuteNV is not affected by conditional rendering

The VkOpticalFlowExecuteInfoNV structure is defined as:

    // Provided by VK_NV_optical_flow
    typedef struct VkOpticalFlowExecuteInfoNV {
        VkStructureType                sType;
        void*                          pNext;
        VkOpticalFlowExecuteFlagsNV    flags;
        uint32_t                       regionCount;
        const VkRect2D*                pRegions;
    } VkOpticalFlowExecuteInfoNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` are the VkOpticalFlowExecuteFlagsNV used for this command.

- `regionCount` is the number of regions of interest specified in `pRegions`.

- `pRegions` is a pointer to `regionCount` `VkRect2D` regions of interest.

Valid Usage

- VUID-VkOpticalFlowExecuteInfoNV-regionCount-07593
  `regionCount` must be 0 if VK_OPTICAL_FLOW_SESSION_CREATE_ALLOW_REGIONS_BIT_NV was not set for `VkOpticalFlowSessionNV` on which this command is operating

Valid Usage (Implicit)

- VUID-VkOpticalFlowExecuteInfoNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_OPTICAL_FLOW_EXECUTE_INFO_NV

- VUID-VkOpticalFlowExecuteInfoNV-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkOpticalFlowExecuteInfoNV-flags-parameter
  `flags` must be a valid combination of VkOpticalFlowExecuteFlagBitsNV values

- VUID-VkOpticalFlowExecuteInfoNV-pRegions-parameter
  If `regionCount` is not `0`, `pRegions` must be a valid pointer to an array of `regionCount` VkRect2D structures

Bits which can be set in VkOpticalFlowExecuteInfoNV::`flags`, controlling optical flow execution, are:

    // Provided by VK_NV_optical_flow
    typedef enum VkOpticalFlowExecuteFlagBitsNV {
        VK_OPTICAL_FLOW_EXECUTE_DISABLE_TEMPORAL_HINTS_BIT_NV = 0x00000001,
    } VkOpticalFlowExecuteFlagBitsNV;

- VK_OPTICAL_FLOW_EXECUTE_DISABLE_TEMPORAL_HINTS_BIT_NV specifies that temporal hints from previously generated flow vectors are not used. If temporal hints are enabled, optical flow vectors from previous vkCmdOpticalFlowExecuteNV call are automatically used as hints for the current vkCmdOpticalFlowExecuteNV call, to take advantage of temporal correlation in a video sequence. Temporal hints should be disabled if there is a-priori knowledge of no temporal correlation (e.g. a scene change, independent successive frame pairs).

`VkOpticalFlowExecuteFlagsNV` is a bitmask type for setting a mask of zero or more VkOpticalFlowExecuteFlagBitsNV.

    // Provided by VK_NV_optical_flow
    typedef VkFlags   VkOpticalFlowExecuteFlagsNV;

## 51. Execution Graphs

Execution graphs provide a way for applications to dispatch multiple operations dynamically from a single initial command on the host. To achieve this, a new execution graph pipeline is provided, that links together multiple shaders or pipelines which each describe one or more operations that can be dispatched within the execution graph. Each linked pipeline or shader describes an execution node within the graph, which can be dispatched dynamically from another shader within the same graph. This allows applications to describe much richer execution topologies at a finer granularity than would typically be possible with API commands alone.

### 51.1. Pipeline Creation

To create execution graph pipelines, call:

    // Provided by VK_AMDX_shader_enqueue
    VkResult vkCreateExecutionGraphPipelinesAMDX(
        VkDevice                                    device,
        VkPipelineCache                             pipelineCache,
        uint32_t                                    createInfoCount,
        const VkExecutionGraphPipelineCreateInfoAMDX* pCreateInfos,
        const VkAllocationCallbacks*                pAllocator,
        VkPipeline*                                 pPipelines);

- `device` is the logical device that creates the execution graph pipelines.

- `pipelineCache` is either VK_NULL_HANDLE, indicating that pipeline caching is disabled; or the handle of a valid pipeline cache object, in which case use of that cache is enabled for the duration of the command. The implementation must not access this object outside of the duration of this command.

- `createInfoCount` is the length of the `pCreateInfos` and `pPipelines` arrays.

- `pCreateInfos` is a pointer to an array of VkExecutionGraphPipelineCreateInfoAMDX structures.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

- `pPipelines` is a pointer to an array of VkPipeline handles in which the resulting execution graph pipeline objects are returned.

Pipelines are created and returned as described for Multiple Pipeline Creation.

Valid Usage

- VUID-vkCreateExecutionGraphPipelinesAMDX-shaderEnqueue-09124
  The `shaderEnqueue` feature must be enabled

- VUID-vkCreateExecutionGraphPipelinesAMDX-flags-09125
  If the `flags` member of any element of `pCreateInfos` contains the VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, and the `basePipelineIndex` member of that same element is not `-1`, `basePipelineIndex` must be less than the index into `pCreateInfos` that corresponds to that element

- VUID-vkCreateExecutionGraphPipelinesAMDX-flags-09126
  If the `flags` member of any element of `pCreateInfos` contains the VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, the base pipeline must have been created with the VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT flag set

- VUID-vkCreateExecutionGraphPipelinesAMDX-pipelineCache-09127
  If `pipelineCache` was created with VK_PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT, host access to `pipelineCache` must be externally synchronized

- VUID-vkCreateExecutionGraphPipelinesAMDX-pNext-09616
  If VkPipelineBinaryInfoKHR::`binaryCount` is not `0` for any element of `pCreateInfos`, `pipelineCache` must be VK_NULL_HANDLE

- VUID-vkCreateExecutionGraphPipelinesAMDX-pNext-09617
  If a VkPipelineCreateFlags2CreateInfoKHR structure with the VK_PIPELINE_CREATE_2_CAPTURE_DATA_BIT_KHR flag set is included in the `pNext` chain of any element of `pCreateInfos`, `pipelineCache` must be VK_NULL_HANDLE

- VUID-vkCreateExecutionGraphPipelinesAMDX-binaryCount-09620
  If VkPipelineBinaryInfoKHR::`binaryCount` is not `0` for any element of `pCreateInfos`, VK_PIPELINE_CREATION_FEEDBACK_APPLICATION_PIPELINE_CACHE_HIT_BIT must not be set in the `flags` of that element

- VUID-vkCreateExecutionGraphPipelinesAMDX-binaryCount-09621
  If VkPipelineBinaryInfoKHR::`binaryCount` is not `0` for any element of `pCreateInfos`, VK_PIPELINE_CREATION_FEEDBACK_BASE_PIPELINE_ACCELERATION_BIT must not be set in the `flags` of that element

- VUID-vkCreateExecutionGraphPipelinesAMDX-binaryCount-09622
  If VkPipelineBinaryInfoKHR::`binaryCount` is not `0` for any element of `pCreateInfos`, VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT_EXT must not be set in the `flags` of that element

- VUID-vkCreateExecutionGraphPipelinesAMDX-pCreateInfos-11414
  If any element of `pCreateInfos` sets VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT and includes embedded sampler mappings, there must be less than (`maxSamplerAllocationCount` - (`minSamplerHeapReservedRangeWithEmbedded` / `samplerDescriptorSize`)) VkSampler objects currently created on the device

- VUID-vkCreateExecutionGraphPipelinesAMDX-pCreateInfos-11429
  If any element of `pCreateInfos` sets VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT and includes embedded sampler mappings, this command must not cause the total number of unique embedded samplers in pipelines and shaders on this device to exceed `maxDescriptorHeapEmbeddedSamplers`

Valid Usage (Implicit)

- VUID-vkCreateExecutionGraphPipelinesAMDX-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkCreateExecutionGraphPipelinesAMDX-pipelineCache-parameter
  If `pipelineCache` is not VK_NULL_HANDLE, `pipelineCache` must be a valid VkPipelineCache handle

- VUID-vkCreateExecutionGraphPipelinesAMDX-pCreateInfos-parameter
  `pCreateInfos` must be a valid pointer to an array of `createInfoCount` valid VkExecutionGraphPipelineCreateInfoAMDX structures

- VUID-vkCreateExecutionGraphPipelinesAMDX-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateExecutionGraphPipelinesAMDX-pPipelines-parameter
  `pPipelines` must be a valid pointer to an array of `createInfoCount` VkPipeline handles

- VUID-vkCreateExecutionGraphPipelinesAMDX-createInfoCount-arraylength
  `createInfoCount` must be greater than `0`

- VUID-vkCreateExecutionGraphPipelinesAMDX-pipelineCache-parent
  If `pipelineCache` is a valid handle, it must have been created, allocated, or retrieved from `device`

Return Codes

Success

  - VK_PIPELINE_COMPILE_REQUIRED_EXT

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkExecutionGraphPipelineCreateInfoAMDX` structure is defined as:

    // Provided by VK_AMDX_shader_enqueue
    typedef struct VkExecutionGraphPipelineCreateInfoAMDX {
        VkStructureType                           sType;
        const void*                               pNext;
        VkPipelineCreateFlags                     flags;
        uint32_t                                  stageCount;
        const VkPipelineShaderStageCreateInfo*    pStages;
        const VkPipelineLibraryCreateInfoKHR*     pLibraryInfo;
        VkPipelineLayout                          layout;
        VkPipeline                                basePipelineHandle;
        int32_t                                   basePipelineIndex;
    } VkExecutionGraphPipelineCreateInfoAMDX;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask of VkPipelineCreateFlagBits specifying how the pipeline will be generated.

- `stageCount` is the number of entries in the `pStages` array.

- `pStages` is a pointer to an array of `stageCount` VkPipelineShaderStageCreateInfo structures describing the set of the shader stages to be included in the execution graph pipeline.

- `pLibraryInfo` is a pointer to a VkPipelineLibraryCreateInfoKHR structure defining pipeline libraries to include.

- `layout` is the description of binding locations used by both the pipeline and descriptor sets used with the pipeline. The implementation must not access this object outside of the duration of the command this structure is passed to.

- `basePipelineHandle` is a pipeline to derive from

- `basePipelineIndex` is an index into the `pCreateInfos` parameter to use as a pipeline to derive from

The parameters `basePipelineHandle` and `basePipelineIndex` are described in more detail in Pipeline Derivatives.

Each shader stage provided when creating an execution graph pipeline (including those in libraries) is associated with a name and an index, determined by the inclusion or omission of a VkPipelineShaderStageNodeCreateInfoAMDX structure in its `pNext` chain. For any graphics pipeline libraries, only the name and index of the vertex or mesh shader stage is linked directly to the graph as a node - other shader stages in the pipeline will be executed after those shader stages as normal. Task shaders cannot be included in a graphics pipeline used for a draw node.

In addition to the shader name and index, an internal “node index” is also generated for each node, which can be queried with vkGetExecutionGraphPipelineNodeIndexAMDX, and is used exclusively for initial dispatch of an execution graph.

Valid Usage

- VUID-VkExecutionGraphPipelineCreateInfoAMDX-None-09497
  If the `pNext` chain does not include a VkPipelineCreateFlags2CreateInfo structure, `flags` must be a valid combination of VkPipelineCreateFlagBits values

- VUID-VkExecutionGraphPipelineCreateInfoAMDX-flags-07984
  If `flags` contains the VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, and `basePipelineIndex` is -1, `basePipelineHandle` must be a valid execution graph `VkPipeline` handle

- VUID-VkExecutionGraphPipelineCreateInfoAMDX-flags-07985
  If `flags` contains the VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, and `basePipelineHandle` is VK_NULL_HANDLE, `basePipelineIndex` must be a valid index into the calling command’s `pCreateInfos` parameter

- VUID-VkExecutionGraphPipelineCreateInfoAMDX-flags-07986
  If `flags` contains the VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, `basePipelineIndex` must be -1 or `basePipelineHandle` must be VK_NULL_HANDLE

- VUID-VkExecutionGraphPipelineCreateInfoAMDX-layout-07987
  If a push constant block is declared in a shader and `layout` is not VK_NULL_HANDLE, a push constant range in `layout` must match the shader stage

- VUID-VkExecutionGraphPipelineCreateInfoAMDX-layout-10069
  If a push constant block is declared in a shader and `layout` is not VK_NULL_HANDLE, the block must be contained inside the push constant range in `layout` that matches the stage

- VUID-VkExecutionGraphPipelineCreateInfoAMDX-layout-07988
  If a resource variable is declared in a shader and `layout` is not VK_NULL_HANDLE, the corresponding descriptor set in `layout` must match the shader stage

- VUID-VkExecutionGraphPipelineCreateInfoAMDX-layout-07990
  If a resource variable is declared in a shader, `layout` is not VK_NULL_HANDLE, and the descriptor type is not VK_DESCRIPTOR_TYPE_MUTABLE_EXT, the corresponding descriptor set in `layout` must match the descriptor type

- VUID-VkExecutionGraphPipelineCreateInfoAMDX-layout-07991
  If a resource variable is declared in a shader as an array and `layout` is not VK_NULL_HANDLE, the corresponding descriptor binding used to create `layout` must have a `descriptorCount` that is greater than or equal to the length of the array

- VUID-VkExecutionGraphPipelineCreateInfoAMDX-None-10391
  If a resource variables is declared in a shader as an array of descriptors, then the descriptor type of that variable must not be VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK

- VUID-VkExecutionGraphPipelineCreateInfoAMDX-flags-11798
  If shader64BitIndexing feature is not enabled, `flags` must not contain VK_PIPELINE_CREATE_2_64_BIT_INDEXING_BIT_EXT

- VUID-VkExecutionGraphPipelineCreateInfoAMDX-pipelineCreationCacheControl-02878
  If the `pipelineCreationCacheControl` feature is not enabled, `flags` must not include VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT nor VK_PIPELINE_CREATE_EARLY_RETURN_ON_FAILURE_BIT

- VUID-VkExecutionGraphPipelineCreateInfoAMDX-pipelineProtectedAccess-07368
  If the `pipelineProtectedAccess` feature is not enabled, `flags` must not include VK_PIPELINE_CREATE_NO_PROTECTED_ACCESS_BIT nor VK_PIPELINE_CREATE_PROTECTED_ACCESS_ONLY_BIT

- VUID-VkExecutionGraphPipelineCreateInfoAMDX-flags-07369
  `flags` must not include both VK_PIPELINE_CREATE_NO_PROTECTED_ACCESS_BIT and VK_PIPELINE_CREATE_PROTECTED_ACCESS_ONLY_BIT

- VUID-VkExecutionGraphPipelineCreateInfoAMDX-flags-11311
  If VkPipelineCreateFlags2CreateInfoKHR::`flags` includes VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT, `layout` must be VK_NULL_HANDLE

- VUID-VkExecutionGraphPipelineCreateInfoAMDX-flags-11312
  If VkPipelineCreateFlags2CreateInfoKHR::`flags` includes VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT, all shader variables in the shader resource interface with a `DescriptorSet` and `Binding` decoration must have a mapping declared in VkShaderDescriptorSetAndBindingMappingInfoEXT::`pMappings`

- VUID-VkExecutionGraphPipelineCreateInfoAMDX-flags-03365
  `flags` must not include VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR

- VUID-VkExecutionGraphPipelineCreateInfoAMDX-flags-03366
  `flags` must not include VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR

- VUID-VkExecutionGraphPipelineCreateInfoAMDX-flags-03367
  `flags` must not include VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR

- VUID-VkExecutionGraphPipelineCreateInfoAMDX-flags-03368
  `flags` must not include VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR

- VUID-VkExecutionGraphPipelineCreateInfoAMDX-flags-03369
  `flags` must not include VK_PIPELINE_CREATE_RAY_TRACING_SKIP_TRIANGLES_BIT_KHR

- VUID-VkExecutionGraphPipelineCreateInfoAMDX-flags-03370
  `flags` must not include VK_PIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT_KHR

- VUID-VkExecutionGraphPipelineCreateInfoAMDX-flags-03576
  `flags` must not include VK_PIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR

- VUID-VkExecutionGraphPipelineCreateInfoAMDX-flags-04945
  `flags` must not include VK_PIPELINE_CREATE_RAY_TRACING_ALLOW_MOTION_BIT_NV

- VUID-VkExecutionGraphPipelineCreateInfoAMDX-flags-09007
  If the `VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV`::`deviceGeneratedComputePipelines` feature is not enabled, `flags` must not include VK_PIPELINE_CREATE_INDIRECT_BINDABLE_BIT_NV

- VUID-VkExecutionGraphPipelineCreateInfoAMDX-flags-09008
  If `flags` includes VK_PIPELINE_CREATE_INDIRECT_BINDABLE_BIT_NV, then the `pNext` chain must include a pointer to a valid instance of VkComputePipelineIndirectBufferInfoNV specifying the address where the pipeline’s metadata will be saved

- VUID-VkExecutionGraphPipelineCreateInfoAMDX-flags-11007
  If `flags` includes VK_PIPELINE_CREATE_2_INDIRECT_BINDABLE_BIT_EXT, then the `VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT`::`deviceGeneratedCommands` feature must be enabled

- VUID-VkExecutionGraphPipelineCreateInfoAMDX-stage-09128
  The `stage` member of any element of `pStages` must be VK_SHADER_STAGE_COMPUTE_BIT

- VUID-VkExecutionGraphPipelineCreateInfoAMDX-pStages-09129
  The shader code for the entry point identified by each element of `pStages` and the rest of the state identified by this structure must adhere to the pipeline linking rules described in the Shader Interfaces chapter

- VUID-VkExecutionGraphPipelineCreateInfoAMDX-layout-09130
  If `layout` is not VK_NULL_HANDLE, it must be consistent with the layout of the shaders specified in `pStages`

- VUID-VkExecutionGraphPipelineCreateInfoAMDX-pLibraryInfo-09131
  If `pLibraryInfo` is not `NULL` and `layout` is not VK_NULL_HANDLE, each element of `pLibraryInfo->pLibraries` must have been created with a `layout` that is compatible with the `layout` in this pipeline

- VUID-VkExecutionGraphPipelineCreateInfoAMDX-layout-09132
  If `layout` is not VK_NULL_HANDLE, the number of resources in `layout` accessible to each shader stage that is used by the pipeline must be less than or equal to `VkPhysicalDeviceLimits`::`maxPerStageResources`

- VUID-VkExecutionGraphPipelineCreateInfoAMDX-pLibraryInfo-09133
  If `pLibraryInfo` is not `NULL`, each element of `pLibraryInfo->pLibraries` must be either a compute pipeline, an execution graph pipeline, or a graphics pipeline

- VUID-VkExecutionGraphPipelineCreateInfoAMDX-pLibraryInfo-10181
  If `pLibraryInfo` is not `NULL`, each element of `pLibraryInfo->pLibraries` that is a compute pipeline or a graphics pipeline must have been created with VK_PIPELINE_CREATE_2_EXECUTION_GRAPH_BIT_AMDX set

- VUID-VkExecutionGraphPipelineCreateInfoAMDX-shaderMeshEnqueue-10182
  If the `shaderMeshEnqueue` feature is not enabled, and `pLibraryInfo->pLibraries` is not `NULL`, `pLibraryInfo->pLibraries` must not contain any graphics pipelines

- VUID-VkExecutionGraphPipelineCreateInfoAMDX-pLibraryInfo-10183
  Any element of `pLibraryInfo->pLibraries` identifying a graphics pipeline must have been created with all possible state subsets

- VUID-VkExecutionGraphPipelineCreateInfoAMDX-None-09134
  There must be no two nodes in the pipeline that share both the same shader name and index, as specified by VkPipelineShaderStageNodeCreateInfoAMDX

- VUID-VkExecutionGraphPipelineCreateInfoAMDX-None-09135
  There must be no two nodes in the pipeline that share the same shader name and have input payload declarations with different sizes

- VUID-VkExecutionGraphPipelineCreateInfoAMDX-None-09136
  There must be no two nodes in the pipeline that share the same name but have different execution models

- VUID-VkExecutionGraphPipelineCreateInfoAMDX-CoalescedInputCountAMDX-09137
  There must be no two nodes in the pipeline that share the same name where one includes `CoalescedInputCountAMDX` and the other does not

- VUID-VkExecutionGraphPipelineCreateInfoAMDX-StaticNumWorkgroupsAMDX-09138
  There must be no two nodes in the pipeline that share the same name where one includes `StaticNumWorkgroupsAMDX` and the other does not

- VUID-VkExecutionGraphPipelineCreateInfoAMDX-PayloadNodeNameAMDX-09139
  If an output payload declared in any shader in the pipeline has a `PayloadNodeNameAMDX` decoration with a `Node` `Name` that matches the shader name of any other node in the graph, the size of the output payload must match the size of the input payload in the matching node

- VUID-VkExecutionGraphPipelineCreateInfoAMDX-flags-10184
  If `flags` does not include VK_PIPELINE_CREATE_LIBRARY_BIT_KHR, and an output payload declared in any shader in the pipeline does not have a `PayloadNodeSparseArrayAMDX` decoration, there must be a node in the graph corresponding to every index from 0 to its `PayloadNodeArraySizeAMDX` decoration

- VUID-VkExecutionGraphPipelineCreateInfoAMDX-flags-12334
  `flags` must not include VK_PIPELINE_CREATE_NO_PROTECTED_ACCESS_BIT nor VK_PIPELINE_CREATE_PROTECTED_ACCESS_ONLY_BIT

- VUID-VkExecutionGraphPipelineCreateInfoAMDX-flags-11271
  If VkPipelineCreateFlags2CreateInfoKHR::`flags` includes VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT, all libraries linked to this pipeline must also have that flag set

- VUID-VkExecutionGraphPipelineCreateInfoAMDX-flags-11272
  If VkPipelineCreateFlags2CreateInfoKHR::`flags` does not include VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT, all libraries linked to this pipeline must also not have that flag set

- VUID-VkExecutionGraphPipelineCreateInfoAMDX-None-11363
  If VkPipelineCreateFlags2CreateInfoKHR::`flags` does not include VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT, `layout` must not be VK_NULL_HANDLE

Valid Usage (Implicit)

- VUID-VkExecutionGraphPipelineCreateInfoAMDX-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_EXECUTION_GRAPH_PIPELINE_CREATE_INFO_AMDX

- VUID-VkExecutionGraphPipelineCreateInfoAMDX-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkPipelineCompilerControlCreateInfoAMD or VkPipelineCreationFeedbackCreateInfo

- VUID-VkExecutionGraphPipelineCreateInfoAMDX-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkExecutionGraphPipelineCreateInfoAMDX-pStages-parameter
  If `stageCount` is not `0`, and `pStages` is not `NULL`, `pStages` must be a valid pointer to an array of `stageCount` valid VkPipelineShaderStageCreateInfo structures

- VUID-VkExecutionGraphPipelineCreateInfoAMDX-pLibraryInfo-parameter
  If `pLibraryInfo` is not `NULL`, `pLibraryInfo` must be a valid pointer to a valid VkPipelineLibraryCreateInfoKHR structure

- VUID-VkExecutionGraphPipelineCreateInfoAMDX-layout-parameter
  If `layout` is not VK_NULL_HANDLE, `layout` must be a valid VkPipelineLayout handle

- VUID-VkExecutionGraphPipelineCreateInfoAMDX-commonparent
  Both of `basePipelineHandle`, and `layout` that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevice

VK_SHADER_INDEX_UNUSED_AMDX is a special shader index used to indicate that the created node does not override the index. In this case, the shader index is determined through other means. It is defined as:

    #define VK_SHADER_INDEX_UNUSED_AMDX       (~0U)

The `VkPipelineShaderStageNodeCreateInfoAMDX` structure is defined as:

    // Provided by VK_AMDX_shader_enqueue
    typedef struct VkPipelineShaderStageNodeCreateInfoAMDX {
          VkStructureType    sType;
        const void*          pNext;
        const char*          pName;
        uint32_t             index;
    } VkPipelineShaderStageNodeCreateInfoAMDX;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `pName` is the shader name to use when creating a node in an execution graph. If `pName` is `NULL`, the name of the entry point specified in SPIR-V is used as the shader name.

- `index` is the shader index to use when creating a node in an execution graph. If `index` is VK_SHADER_INDEX_UNUSED_AMDX then the original index is used, either as specified by the `ShaderIndexAMDX` execution mode, or `0` if that too is not specified.

When included in the `pNext` chain of a VkPipelineShaderStageCreateInfo structure, this structure specifies the shader name and shader index of a node when creating an execution graph pipeline. If this structure is omitted, the shader name is set to the name of the entry point in SPIR-V and the shader index is set to `0`.

When dispatching a node from another shader, the name is fixed at pipeline creation, but the index can be set dynamically. By associating multiple shaders with the same name but different indexes, applications can dynamically select different nodes to execute. Applications must ensure each node has a unique name and index.

Note | Shaders with the same name must be of the same type - e.g. a compute and graphics shader, or even two compute shaders where one is coalescing and the other is not, cannot share the same name.

Valid Usage (Implicit)

- VUID-VkPipelineShaderStageNodeCreateInfoAMDX-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_NODE_CREATE_INFO_AMDX

- VUID-VkPipelineShaderStageNodeCreateInfoAMDX-pName-parameter
  If `pName` is not `NULL`, `pName` must be a null-terminated UTF-8 string

Structure Chaining

Extends the structure

  - VkPipelineShaderStageCreateInfo

To query the internal node index for a particular node in an execution graph, call:

    // Provided by VK_AMDX_shader_enqueue
    VkResult vkGetExecutionGraphPipelineNodeIndexAMDX(
        VkDevice                                    device,
        VkPipeline                                  executionGraph,
        const VkPipelineShaderStageNodeCreateInfoAMDX* pNodeInfo,
        uint32_t*                                   pNodeIndex);

- `device` is the logical device that `executionGraph` was created on.

- `executionGraph` is the execution graph pipeline to query the internal node index for.

- `pNodeInfo` is a pointer to a VkPipelineShaderStageNodeCreateInfoAMDX structure identifying the name and index of the node to query.

- `pNodeIndex` is the returned internal node index of the identified node.

Once this function returns, the contents of `pNodeIndex` contain the internal node index of the identified node.

Valid Usage

- VUID-vkGetExecutionGraphPipelineNodeIndexAMDX-pNodeInfo-09140
  `pNodeInfo->pName` must not be `NULL`

- VUID-vkGetExecutionGraphPipelineNodeIndexAMDX-pNodeInfo-09141
  `pNodeInfo->index` must not be VK_SHADER_INDEX_UNUSED_AMDX

- VUID-vkGetExecutionGraphPipelineNodeIndexAMDX-executionGraph-09142
  There must be a node in `executionGraph` with a shader name and index equal to `pNodeInfo->pName` and `pNodeInfo->index`

Valid Usage (Implicit)

- VUID-vkGetExecutionGraphPipelineNodeIndexAMDX-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetExecutionGraphPipelineNodeIndexAMDX-executionGraph-parameter
  `executionGraph` must be a valid VkPipeline handle

- VUID-vkGetExecutionGraphPipelineNodeIndexAMDX-pNodeInfo-parameter
  `pNodeInfo` must be a valid pointer to a valid VkPipelineShaderStageNodeCreateInfoAMDX structure

- VUID-vkGetExecutionGraphPipelineNodeIndexAMDX-pNodeIndex-parameter
  `pNodeIndex` must be a valid pointer to a `uint32_t` value

- VUID-vkGetExecutionGraphPipelineNodeIndexAMDX-executionGraph-parent
  `executionGraph` must have been created, allocated, or retrieved from `device`

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

### 51.2. Initializing Scratch Memory

Implementations may need scratch memory to manage dispatch queues or similar when executing a pipeline graph, and this is explicitly managed by the application.

To query the scratch space required to dispatch an execution graph, call:

    // Provided by VK_AMDX_shader_enqueue
    VkResult vkGetExecutionGraphPipelineScratchSizeAMDX(
        VkDevice                                    device,
        VkPipeline                                  executionGraph,
        VkExecutionGraphPipelineScratchSizeAMDX*    pSizeInfo);

- `device` is the logical device that `executionGraph` was created on.

- `executionGraph` is the execution graph pipeline to query the scratch space for.

- `pSizeInfo` is a pointer to a VkExecutionGraphPipelineScratchSizeAMDX structure that will contain the required scratch size.

After this function returns, information about the scratch space required will be returned in `pSizeInfo`.

Valid Usage (Implicit)

- VUID-vkGetExecutionGraphPipelineScratchSizeAMDX-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetExecutionGraphPipelineScratchSizeAMDX-executionGraph-parameter
  `executionGraph` must be a valid VkPipeline handle

- VUID-vkGetExecutionGraphPipelineScratchSizeAMDX-pSizeInfo-parameter
  `pSizeInfo` must be a valid pointer to a VkExecutionGraphPipelineScratchSizeAMDX structure

- VUID-vkGetExecutionGraphPipelineScratchSizeAMDX-executionGraph-parent
  `executionGraph` must have been created, allocated, or retrieved from `device`

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkExecutionGraphPipelineScratchSizeAMDX` structure is defined as:

    // Provided by VK_AMDX_shader_enqueue
    typedef struct VkExecutionGraphPipelineScratchSizeAMDX {
        VkStructureType    sType;
        void*              pNext;
        VkDeviceSize       minSize;
        VkDeviceSize       maxSize;
        VkDeviceSize       sizeGranularity;
    } VkExecutionGraphPipelineScratchSizeAMDX;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `minSize` indicates the minimum scratch space required for dispatching the queried execution graph.

- `maxSize` indicates the maximum scratch space that can be used for dispatching the queried execution graph.

- `sizeGranularity` indicates the granularity at which the scratch space can be increased from `minSize`.

Applications can use any amount of scratch memory greater than `minSize` for dispatching a graph, however only the values equal to `minSize` + an integer multiple of `sizeGranularity` will be used. Greater values may result in higher performance, up to `maxSize` which indicates the most memory that an implementation can use effectively.

Valid Usage (Implicit)

- VUID-VkExecutionGraphPipelineScratchSizeAMDX-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_EXECUTION_GRAPH_PIPELINE_SCRATCH_SIZE_AMDX

To initialize scratch memory for a particular execution graph, call:

    // Provided by VK_AMDX_shader_enqueue
    void vkCmdInitializeGraphScratchMemoryAMDX(
        VkCommandBuffer                             commandBuffer,
        VkPipeline                                  executionGraph,
        VkDeviceAddress                             scratch,
        VkDeviceSize                                scratchSize);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `executionGraph` is the execution graph pipeline to initialize the scratch memory for.

- `scratch` is the address of scratch memory to be initialized.

- `scratchSize` is a range in bytes of scratch memory to be initialized.

This command must be called before using `scratch` to dispatch the bound execution graph pipeline.

Execution of this command may modify any memory locations in the range [`scratch`,`scratch` + `scratchSize`). Accesses to this memory range are performed in the VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT pipeline stage with the VK_ACCESS_2_SHADER_STORAGE_READ_BIT and VK_ACCESS_2_SHADER_STORAGE_WRITE_BIT access flags.

If any portion of `scratch` is modified by any command other than vkCmdDispatchGraphAMDX, vkCmdDispatchGraphIndirectAMDX, vkCmdDispatchGraphIndirectCountAMDX, or vkCmdInitializeGraphScratchMemoryAMDX with the same execution graph, it must be reinitialized for the execution graph again before dispatching against it.

Valid Usage

- VUID-vkCmdInitializeGraphScratchMemoryAMDX-scratch-10185
  `scratch` must be the device address of an allocated memory range at least as large as `scratchSize`

- VUID-vkCmdInitializeGraphScratchMemoryAMDX-scratchSize-10186
  `scratchSize` must be greater than or equal to VkExecutionGraphPipelineScratchSizeAMDX::`minSize` returned by vkGetExecutionGraphPipelineScratchSizeAMDX for the bound execution graph pipeline

- VUID-vkCmdInitializeGraphScratchMemoryAMDX-scratch-09144
  `scratch` must be a multiple of 64

Valid Usage (Implicit)

- VUID-vkCmdInitializeGraphScratchMemoryAMDX-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdInitializeGraphScratchMemoryAMDX-executionGraph-parameter
  `executionGraph` must be a valid VkPipeline handle

- VUID-vkCmdInitializeGraphScratchMemoryAMDX-scratch-parameter
  `scratch` must be a valid VkDeviceAddress value

- VUID-vkCmdInitializeGraphScratchMemoryAMDX-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdInitializeGraphScratchMemoryAMDX-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, or VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdInitializeGraphScratchMemoryAMDX-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdInitializeGraphScratchMemoryAMDX-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdInitializeGraphScratchMemoryAMDX-bufferlevel
  `commandBuffer` must be a primary `VkCommandBuffer`

- VUID-vkCmdInitializeGraphScratchMemoryAMDX-commonparent
  Both of `commandBuffer`, and `executionGraph` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary | Both | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT | Action

Conditional Rendering

vkCmdInitializeGraphScratchMemoryAMDX is not affected by conditional rendering

### 51.3. Dispatching a Graph

Initial dispatch of an execution graph is done from the host in the same way as any other command, and can be used in a similar way to compute dispatch commands, with indirect variants available.

To record an execution graph dispatch, call:

    // Provided by VK_AMDX_shader_enqueue
    void vkCmdDispatchGraphAMDX(
        VkCommandBuffer                             commandBuffer,
        VkDeviceAddress                             scratch,
        VkDeviceSize                                scratchSize,
        const VkDispatchGraphCountInfoAMDX*         pCountInfo);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `scratch` is the address of scratch memory to be used.

- `scratchSize` is a range in bytes of scratch memory to be used.

- `pCountInfo` is a host pointer to a VkDispatchGraphCountInfoAMDX structure defining the nodes which will be initially executed.

When this command is executed, the nodes specified in `pCountInfo` are executed. Nodes executed as part of this command are not implicitly synchronized in any way against each other once they are dispatched. There are no rasterization order guarantees between separately dispatched graphics nodes, though individual primitives within a single dispatch do adhere to rasterization order. Draw calls executed before or after the execution graph also execute relative to each graphics node with respect to rasterization order.

For this command, all device/host pointers in substructures are treated as host pointers and read only during host execution of this command. Once this command returns, no reference to the original pointers is retained.

Execution of this command may modify any memory locations in the range [`scratch`,`scratch` + `scratchSize`). Accesses to this memory range are performed in the VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT pipeline stage with the VK_ACCESS_2_SHADER_STORAGE_READ_BIT and VK_ACCESS_2_SHADER_STORAGE_WRITE_BIT access flags.

This command captures command buffer state for mesh nodes similarly to draw commands.

Valid Usage

- VUID-vkCmdDispatchGraphAMDX-magFilter-04553
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdDispatchGraphAMDX-magFilter-09598
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdDispatchGraphAMDX-mipmapMode-04770
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdDispatchGraphAMDX-mipmapMode-09599
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdDispatchGraphAMDX-unnormalizedCoordinates-09635
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `levelCount` and `layerCount` must be 1

- VUID-vkCmdDispatchGraphAMDX-None-08609
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `viewType` must be VK_IMAGE_VIEW_TYPE_1D or VK_IMAGE_VIEW_TYPE_2D

- VUID-vkCmdDispatchGraphAMDX-None-08610
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions with `ImplicitLod`, `Dref` or `Proj` in their name

- VUID-vkCmdDispatchGraphAMDX-None-08611
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions that includes a LOD bias or any offset values

- VUID-vkCmdDispatchGraphAMDX-None-06479
  If a VkImageView is sampled with depth comparison, the image view’s format features must contain VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT

- VUID-vkCmdDispatchGraphAMDX-None-02691
  If a VkImageView is accessed using atomic operations as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT

- VUID-vkCmdDispatchGraphAMDX-None-07888
  If a VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER descriptor is accessed using atomic operations as a result of this command, then the storage texel buffer’s format features must contain VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT

- VUID-vkCmdDispatchGraphAMDX-None-02692
  If a VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT

- VUID-vkCmdDispatchGraphAMDX-None-02693
  If the VK_EXT_filter_cubic extension is not enabled and any VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, it must not have a VkImageViewType of VK_IMAGE_VIEW_TYPE_3D, VK_IMAGE_VIEW_TYPE_CUBE, or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY

- VUID-vkCmdDispatchGraphAMDX-filterCubic-02694
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have a VkImageViewType and format that supports cubic filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubic` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdDispatchGraphAMDX-filterCubicMinmax-02695
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX as a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubicMinmax` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdDispatchGraphAMDX-cubicRangeClamp-09212
  If the `cubicRangeClamp` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must not have a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM

- VUID-vkCmdDispatchGraphAMDX-reductionMode-09213
  Any VkImageView being sampled with a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM as a result of this command must sample with VK_FILTER_CUBIC_EXT

- VUID-vkCmdDispatchGraphAMDX-selectableCubicWeights-09214
  If the `selectableCubicWeights` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have VkSamplerCubicWeightsCreateInfoQCOM::`cubicWeights` equal to VK_CUBIC_FILTER_WEIGHTS_CATMULL_ROM_QCOM

- VUID-vkCmdDispatchGraphAMDX-flags-02696
  Any VkImage created with a VkImageCreateInfo::`flags` containing VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV sampled as a result of this command must only be sampled using a VkSamplerAddressMode of VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDispatchGraphAMDX-OpTypeImage-07027
  For any VkImageView being written as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdDispatchGraphAMDX-OpTypeImage-07028
  For any VkImageView being read as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdDispatchGraphAMDX-OpTypeImage-07029
  For any VkBufferView being written as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown`, the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdDispatchGraphAMDX-OpTypeImage-07030
  Any VkBufferView being read as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown` then the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdDispatchGraphAMDX-None-08600
  If a a bound shader was created with a pipeline layout and statically uses a set n, a descriptor set must have been bound to n at the same pipeline bind point, with layouts compatible for set n with the layout(s) used to create the shader, as described in Pipeline Layout Compatibility

- VUID-vkCmdDispatchGraphAMDX-None-08601
  If a a bound shader was created with a pipeline layout or specified push constant ranges and statically uses a push constant value, that value must have been set for the same pipeline bind point, with push constant ranges that are compatible with the push constant range used to create the shader

- VUID-vkCmdDispatchGraphAMDX-None-10068
  For each array of resources that is used by a bound shader, the indices used to access members of the array must be less than the descriptor count for the identified binding in the descriptor sets used by this command

- VUID-vkCmdDispatchGraphAMDX-None-08114
  Descriptors in each bound descriptor set, specified via vkCmdBindDescriptorSets, must be valid if they are accessed as described by descriptor validity by the VkPipeline bound to the pipeline bind point used by this command and the bound VkPipeline was not created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDispatchGraphAMDX-imageLayout-00344
  If an image descriptor is accessed by a shader, the VkImageLayout must match the subresource accessible from the VkImageView as defined by the image layout matching rules

- VUID-vkCmdDispatchGraphAMDX-None-08115
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdBindDescriptorSets, the bound VkPipeline must have been created without VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDispatchGraphAMDX-None-08116
  Descriptors in bound descriptor buffers, specified via vkCmdSetDescriptorBufferOffsetsEXT, must be valid if they are dynamically accessed

- VUID-vkCmdDispatchGraphAMDX-None-08117
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdSetDescriptorBufferOffsetsEXT, the bound VkPipeline must have been created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDispatchGraphAMDX-None-08119
  If a descriptor is dynamically used with a VkPipeline created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdDispatchGraphAMDX-None-08605
  If a descriptor is dynamically used with a VkShaderEXT created with a `VkDescriptorSetLayout` that was created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdDispatchGraphAMDX-None-08606
  If the `shaderObject` feature is not enabled, a valid pipeline must be bound to the pipeline bind point used by this command

- VUID-vkCmdDispatchGraphAMDX-None-08608
  If a pipeline is bound to the pipeline bind point used by this command, there must not have been any calls to dynamic state setting commands for any state specified statically in the VkPipeline object bound to the pipeline bind point used by this command, since that pipeline was bound

- VUID-vkCmdDispatchGraphAMDX-uniformBuffers-06935
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDispatchGraphAMDX-None-08612
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDispatchGraphAMDX-storageBuffers-06936
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDispatchGraphAMDX-None-08613
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a storage buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDispatchGraphAMDX-commandBuffer-02707
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, any resource accessed by bound shaders must not be a protected resource

- VUID-vkCmdDispatchGraphAMDX-viewType-07752
  If a VkImageView is accessed as a result of this command, then the image view’s `viewType` must match the `Dim` operand of the `OpTypeImage` as described in Compatibility Between SPIR-V Image Dimensions and Vulkan ImageView Types

- VUID-vkCmdDispatchGraphAMDX-format-07753
  If a VkImageView or VkBufferView is accessed as a result of this command, then the numeric type of the view’s `format` and the `Sampled` `Type` operand of the `OpTypeImage` must match

- VUID-vkCmdDispatchGraphAMDX-OpImageWrite-08795
  If a VkImageView created with a format other than VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the image view’s format

- VUID-vkCmdDispatchGraphAMDX-OpImageWrite-08796
  If a VkImageView created with the format VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have four components

- VUID-vkCmdDispatchGraphAMDX-OpImageWrite-04469
  If a VkBufferView is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the buffer view’s format

- VUID-vkCmdDispatchGraphAMDX-SampledType-04470
  If a VkImageView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdDispatchGraphAMDX-SampledType-04471
  If a VkImageView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdDispatchGraphAMDX-SampledType-04472
  If a VkBufferView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdDispatchGraphAMDX-SampledType-04473
  If a VkBufferView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdDispatchGraphAMDX-sparseImageInt64Atomics-04474
  If the `sparseImageInt64Atomics` feature is not enabled, VkImage objects created with the VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdDispatchGraphAMDX-sparseImageInt64Atomics-04475
  If the `sparseImageInt64Atomics` feature is not enabled, VkBuffer objects created with the VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdDispatchGraphAMDX-OpImageSampleWeightedQCOM-06971
  If `OpImageSampleWeightedQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_SAMPLED_IMAGE_BIT_QCOM

- VUID-vkCmdDispatchGraphAMDX-OpImageSampleWeightedQCOM-06972
  If `OpImageSampleWeightedQCOM` uses a VkImageView as a sample weight image as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_IMAGE_BIT_QCOM

- VUID-vkCmdDispatchGraphAMDX-OpImageBoxFilterQCOM-06973
  If `OpImageBoxFilterQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BOX_FILTER_SAMPLED_BIT_QCOM

- VUID-vkCmdDispatchGraphAMDX-OpImageBlockMatchSSDQCOM-06974
  If `OpImageBlockMatchSSDQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdDispatchGraphAMDX-OpImageBlockMatchSADQCOM-12420
  If `OpImageBlockMatchSADQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdDispatchGraphAMDX-OpImageBlockMatchSADQCOM-06976
  If `OpImageBlockMatchSADQCOM` or OpImageBlockMatchSSDQCOM is used to read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdDispatchGraphAMDX-OpImageSampleWeightedQCOM-06977
  If `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdDispatchGraphAMDX-OpImageSampleWeightedQCOM-06978
  If any command other than `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must not have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdDispatchGraphAMDX-OpImageBlockMatchWindow-09215
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM

- VUID-vkCmdDispatchGraphAMDX-OpImageBlockMatchWindow-09216
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format must be a single-component format

- VUID-vkCmdDispatchGraphAMDX-OpImageBlockMatchWindow-09217
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdDispatchGraphAMDX-OpImageBlockMatchWindow-12421
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the `blockMatchExtendedClampToEdge` feature is not enabled, the input sampler must not have been created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDispatchGraphAMDX-addressModeU-12422
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the input sampler was created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, then the sampler must have been created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDispatchGraphAMDX-None-07288
  Any shader invocation executed by this command must terminate

- VUID-vkCmdDispatchGraphAMDX-None-09600
  If a descriptor with type equal to any of VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, or VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT is accessed as a result of this command, all image subresources identified by that descriptor must be in the image layout identified when the descriptor was written

- VUID-vkCmdDispatchGraphAMDX-micromap-11636
  If an acceleration structure is accessed as a result of this command through an `OpRayQueryProceedKHR` operation , the `VK_EXT_opacity_micromap` extension is not enabled, and the acceleration structure is built using geometry with a VkAccelerationStructureTrianglesOpacityMicromapKHR structure included in its `pNext` chain, the shader must have specified a `OpacityMicromapIdKHR` execution mode with its specialization constant operand equal to VK_TRUE

- VUID-vkCmdDispatchGraphAMDX-micromap-11637
  If an acceleration structure is accessed as a result of this command and the acceleration structure was constructed through deserialization, all micromap arrays referenced by the acceleration structure that were not replaced by an acceleration structure update command must have been deserialized using the serialized data of the corresponding micromaps used to originally build the acceleration structure prior to the execution of this command on the device

- VUID-vkCmdDispatchGraphAMDX-micromap-11638
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkPipeline bound to the pipeline bind point used by this command must not have been created with `flags` that includes VK_PIPELINE_CREATE_2_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_KHR

- VUID-vkCmdDispatchGraphAMDX-micromap-11639
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkShaderEXT that accessed the descriptor must not have been created with `flags` that includes VK_SHADER_CREATE_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_EXT

- VUID-vkCmdDispatchGraphAMDX-commandBuffer-10746
  The `VkDeviceMemory` object allocated from a `VkMemoryHeap` with the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property that is bound to a resource accessed as a result of this command must be the active bound tile memory object in `commandBuffer`

- VUID-vkCmdDispatchGraphAMDX-None-10678
  If this command is recorded inside a tile shading render pass instance, the stages corresponding to the pipeline bind point used by this command must only include VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_FRAGMENT_BIT, and/or VK_SHADER_STAGE_COMPUTE_BIT

- VUID-vkCmdDispatchGraphAMDX-None-10679
  If this command is recorded where per-tile execution model is enabled, there must be no access to any image while the image was be transitioned to the VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT layout

- VUID-vkCmdDispatchGraphAMDX-pDescription-09900
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the underlying VkTensorARM object must have been created with the VK_TENSOR_USAGE_SHADER_BIT_ARM usage flag set

- VUID-vkCmdDispatchGraphAMDX-dimensionCount-09905
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the `Rank` of the `OpTypeTensorARM` of the tensor resource variable must be equal to the `dimensionCount` provided via VkTensorCreateInfoARM::`pDescription` when creating the underlying VkTensorARM object

- VUID-vkCmdDispatchGraphAMDX-OpTypeTensorARM-09906
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the element type of the `OpTypeTensorARM` of the tensor resource variable must be compatible with the VkFormat of the VkTensorViewARM used for the access

- VUID-vkCmdDispatchGraphAMDX-OpTensorReadARM-12462
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, using `OpTensorReadARM` or `OpTensorWriteARM`, and the underlying VkTensorARM object was created with a VK_TENSOR_TILING_BRICK_16_WIDE_ARM, VK_TENSOR_TILING_BRICK_8_WIDE_ARM, VK_TENSOR_TILING_BRICK_4_WIDE_ARM, VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_ARM, or VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_64K_ARM VkTensorTilingARM, and the object read or written is an array, then the innermost coordinate provided to `OpTensorReadARM` or `OpTensorWriteARM` via the `Coordinates` operand must be a multiple of the largest power of 2 that is less than or equal to the number of components of the array

- VUID-vkCmdDispatchGraphAMDX-pNext-12463
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command and the corresponding VkTensorARM object was created with a VkTensorRollingBackingCreateInfoARM structure in the `pNext` chain of VkTensorCreateInfoARM, then the number of elements accessed with one `OpTensorReadARM` or `OpTensorWriteARM`, must be less than or equal to the number of elements available from the starting coordinate in the rolling backing along the innermost dimension, defined as `wraps`[`dimensionCount` - 1] - InnermostCoordinate % `wraps`[`dimensionCount` - 1] where InnermostCoordinate is the last component of the coordinates array provided via the `Coordinates` operand

- VUID-vkCmdDispatchGraphAMDX-None-12472
  Descriptors dynamically accessed in bound descriptor heaps must be valid

- VUID-vkCmdDispatchGraphAMDX-None-11297
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a `OpTypeStruct` decorated with `Block` or `BufferBlock` using that mapping, the calculated offset for the resource heap must be a multiple of `bufferDescriptorAlignment`

- VUID-vkCmdDispatchGraphAMDX-None-11298
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeImage` or `OpTypeSampledImage` using that mapping, the calculated offset for the resource heap must be a multiple of `imageDescriptorAlignment`

- VUID-vkCmdDispatchGraphAMDX-None-11299
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeSampler` or `OpTypeSampledImage` using that mapping, the calculated offset for the sampler heap must be a multiple of `samplerDescriptorAlignment`

- VUID-vkCmdDispatchGraphAMDX-None-11397
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeTensorARM` using that mapping, the calculated offset for the resource heap must be a multiple of `tensorDescriptorAlignment`

- VUID-vkCmdDispatchGraphAMDX-None-11300
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 4

- VUID-vkCmdDispatchGraphAMDX-None-11301
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdDispatchGraphAMDX-None-11302
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress

- VUID-vkCmdDispatchGraphAMDX-None-11304
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 8

- VUID-vkCmdDispatchGraphAMDX-None-11305
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdDispatchGraphAMDX-None-11306
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address pointed to by the address in push data must be a valid VkDeviceAddress

- VUID-vkCmdDispatchGraphAMDX-None-11308
  For each descriptor heap that is statically used by a bound shader, either directly or via a descriptor mapping, a valid descriptor heap must be bound

- VUID-vkCmdDispatchGraphAMDX-None-11309
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, execution of this command must not result in any descriptor read accessing data outside of the user range of the respective heap bound by `vkCmdBind*HeapEXT` commands

- VUID-vkCmdDispatchGraphAMDX-None-11372
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer or uniform texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified via VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDispatchGraphAMDX-None-11373
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer or storage texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDispatchGraphAMDX-None-11374
  If the `robustBufferAccess2` feature is not enabled, the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, uniform texel buffer, storage buffer, or storage texel buffer, that shader must not access values outside of the range of the buffer as specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDispatchGraphAMDX-pBindInfo-11375
  If any bound shader uses an embedded sampler via a descriptor mapping, the value of `pBindInfo->reservedRangeSize` set for vkCmdBindSamplerHeapEXT must be greater than or equal to `minSamplerHeapReservedRangeWithEmbedded`

- VUID-vkCmdDispatchGraphAMDX-None-11376
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, and that shader statically uses a push constant value, that value must have been set by vkCmdPushDataEXT

- VUID-vkCmdDispatchGraphAMDX-None-11398
  If a bound shader was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the access must not be out of bounds

- VUID-vkCmdDispatchGraphAMDX-None-11437
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the buffer from which the address in push data was queried must have been created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdDispatchGraphAMDX-None-11438
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdDispatchGraphAMDX-None-11441
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must be aligned to `minUniformBufferOffsetAlignment`

- VUID-vkCmdDispatchGraphAMDX-None-11439
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_STORAGE_BUFFER_BIT usage flag set

- VUID-vkCmdDispatchGraphAMDX-None-11442
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must be aligned to `minStorageBufferOffsetAlignment`

- VUID-vkCmdDispatchGraphAMDX-None-11485
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses an acceleration structure using that mapping, the address that the acceleration structure is mapped to must be an acceleration structure address retrieved from a VkAccelerationStructureKHR object via vkGetAccelerationStructureDeviceAddressKHR or handle retrieved from a VkAccelerationStructureNV object via vkGetAccelerationStructureHandleNV

- VUID-vkCmdDispatchGraphAMDX-index-11450
  If a shader uses a sampler descriptor to sample an image as a result of this command, and that sampler descriptor uses a custom border color with an index defined by VkSamplerCustomBorderColorIndexCreateInfoEXT, the value of VkSamplerCustomBorderColorIndexCreateInfoEXT::`index` must have been registered before this command was recorded, and still be registered during the sampling operation, with an identically defined color

- VUID-vkCmdDispatchGraphAMDX-protectedNoFault-11455
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, the address that the resource is mapped to must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdDispatchGraphAMDX-protectedNoFault-11456
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, the address of the indirect memory must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdDispatchGraphAMDX-commandBuffer-09181
  `commandBuffer` must not be a protected command buffer

- VUID-vkCmdDispatchGraphAMDX-commandBuffer-09182
  `commandBuffer` must be a primary command buffer

- VUID-vkCmdDispatchGraphAMDX-scratch-10192
  `scratch` must be the device address of an allocated memory range at least as large as `scratchSize`

- VUID-vkCmdDispatchGraphAMDX-scratchSize-10193
  `scratchSize` must be greater than or equal to VkExecutionGraphPipelineScratchSizeAMDX::`minSize` returned by vkGetExecutionGraphPipelineScratchSizeAMDX for the bound execution graph pipeline

- VUID-vkCmdDispatchGraphAMDX-scratch-09184
  `scratch` must be a device address within a VkBuffer created with the VK_BUFFER_USAGE_EXECUTION_GRAPH_SCRATCH_BIT_AMDX or VK_BUFFER_USAGE_2_EXECUTION_GRAPH_SCRATCH_BIT_AMDX usage flags set

- VUID-vkCmdDispatchGraphAMDX-scratch-10194
  The device memory range [`scratch`,`scratch`
  `scratchSize`] must have been initialized with vkCmdInitializeGraphScratchMemoryAMDX using the bound execution graph pipeline, and not modified after that by anything other than another execution graph dispatch command

- VUID-vkCmdDispatchGraphAMDX-maxComputeWorkGroupCount-09186
  Execution of this command must not cause a node to be dispatched with a larger number of workgroups than that specified by either a `MaxNumWorkgroupsAMDX` decoration in the dispatched node or `maxComputeWorkGroupCount`

- VUID-vkCmdDispatchGraphAMDX-maxExecutionGraphShaderPayloadCount-09187
  Execution of this command must not cause any shader to initialize more than `maxExecutionGraphShaderPayloadCount` output payloads

- VUID-vkCmdDispatchGraphAMDX-NodeMaxPayloadsAMDX-09188
  Execution of this command must not cause any shader that declares `NodeMaxPayloadsAMDX` to initialize more output payloads than specified by the max number of payloads for that decoration. This requirement applies to each `NodeMaxPayloadsAMDX` decoration separately

- VUID-vkCmdDispatchGraphAMDX-None-10195
  If the bound execution graph pipeline includes draw nodes, this command must be called within a render pass instance that is compatible with the graphics pipeline used to create each of those nodes

- VUID-vkCmdDispatchGraphAMDX-pCountInfo-09145
  `pCountInfo->infos` must be a host pointer to a memory allocation at least as large as the product of `count` and `stride`

- VUID-vkCmdDispatchGraphAMDX-infos-09146
  Host memory locations at indexes in the range [`infos`, `infos` + (`count`*`stride`)), at a granularity of `stride` must contain valid VkDispatchGraphInfoAMDX structures in the first 24 bytes

- VUID-vkCmdDispatchGraphAMDX-pCountInfo-09147
  For each VkDispatchGraphInfoAMDX structure in `pCountInfo->infos`, `payloads` must be a host pointer to a memory allocation at least as large as the product of `payloadCount` and `payloadStride`

- VUID-vkCmdDispatchGraphAMDX-pCountInfo-09148
  For each VkDispatchGraphInfoAMDX structure in `pCountInfo->infos`, `nodeIndex` must be a valid node index in the bound execution graph pipeline, as returned by vkGetExecutionGraphPipelineNodeIndexAMDX

- VUID-vkCmdDispatchGraphAMDX-pCountInfo-09149
  For each VkDispatchGraphInfoAMDX structure in `pCountInfo->infos`, host memory locations at indexes in the range [`payloads`, `payloads` + (`payloadCount` * `payloadStride`)), at a granularity of `payloadStride` must contain a payload matching the size of the input payload expected by the node in `nodeIndex` in the first bytes

Valid Usage (Implicit)

- VUID-vkCmdDispatchGraphAMDX-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdDispatchGraphAMDX-scratch-parameter
  `scratch` must be a valid VkDeviceAddress value

- VUID-vkCmdDispatchGraphAMDX-pCountInfo-parameter
  `pCountInfo` must be a valid pointer to a valid VkDispatchGraphCountInfoAMDX structure

- VUID-vkCmdDispatchGraphAMDX-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdDispatchGraphAMDX-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, or VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdDispatchGraphAMDX-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdDispatchGraphAMDX-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdDispatchGraphAMDX-bufferlevel
  `commandBuffer` must be a primary `VkCommandBuffer`

Host Synchronization

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary | Both | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT | Action

Conditional Rendering

vkCmdDispatchGraphAMDX is affected by conditional rendering

To record an execution graph dispatch with node and payload parameters read on device, call:

    // Provided by VK_AMDX_shader_enqueue
    void vkCmdDispatchGraphIndirectAMDX(
        VkCommandBuffer                             commandBuffer,
        VkDeviceAddress                             scratch,
        VkDeviceSize                                scratchSize,
        const VkDispatchGraphCountInfoAMDX*         pCountInfo);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `scratch` is the address of scratch memory to be used.

- `scratchSize` is a range in bytes of scratch memory to be used.

- `pCountInfo` is a host pointer to a VkDispatchGraphCountInfoAMDX structure defining the nodes which will be initially executed.

When this command is executed, the nodes specified in `pCountInfo` are executed. Nodes executed as part of this command are not implicitly synchronized in any way against each other once they are dispatched. There are no rasterization order guarantees between separately dispatched graphics nodes, though individual primitives within a single dispatch do adhere to rasterization order. Draw calls executed before or after the execution graph also execute relative to each graphics node with respect to rasterization order.

For this command, all device/host pointers in substructures are treated as device pointers and read during device execution of this command. The allocation and contents of these pointers only needs to be valid during device execution. All of these addresses will be read in the VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT pipeline stage with the VK_ACCESS_2_SHADER_STORAGE_READ_BIT access flag.

Execution of this command may modify any memory locations in the range [`scratch`,`scratch` + `scratchSize`). Accesses to this memory range are performed in the VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT pipeline stage with the VK_ACCESS_2_SHADER_STORAGE_READ_BIT and VK_ACCESS_2_SHADER_STORAGE_WRITE_BIT access flags.

This command captures command buffer state for mesh nodes similarly to draw commands.

Valid Usage

- VUID-vkCmdDispatchGraphIndirectAMDX-magFilter-04553
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdDispatchGraphIndirectAMDX-magFilter-09598
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdDispatchGraphIndirectAMDX-mipmapMode-04770
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdDispatchGraphIndirectAMDX-mipmapMode-09599
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdDispatchGraphIndirectAMDX-unnormalizedCoordinates-09635
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `levelCount` and `layerCount` must be 1

- VUID-vkCmdDispatchGraphIndirectAMDX-None-08609
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `viewType` must be VK_IMAGE_VIEW_TYPE_1D or VK_IMAGE_VIEW_TYPE_2D

- VUID-vkCmdDispatchGraphIndirectAMDX-None-08610
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions with `ImplicitLod`, `Dref` or `Proj` in their name

- VUID-vkCmdDispatchGraphIndirectAMDX-None-08611
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions that includes a LOD bias or any offset values

- VUID-vkCmdDispatchGraphIndirectAMDX-None-06479
  If a VkImageView is sampled with depth comparison, the image view’s format features must contain VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT

- VUID-vkCmdDispatchGraphIndirectAMDX-None-02691
  If a VkImageView is accessed using atomic operations as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT

- VUID-vkCmdDispatchGraphIndirectAMDX-None-07888
  If a VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER descriptor is accessed using atomic operations as a result of this command, then the storage texel buffer’s format features must contain VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT

- VUID-vkCmdDispatchGraphIndirectAMDX-None-02692
  If a VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT

- VUID-vkCmdDispatchGraphIndirectAMDX-None-02693
  If the VK_EXT_filter_cubic extension is not enabled and any VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, it must not have a VkImageViewType of VK_IMAGE_VIEW_TYPE_3D, VK_IMAGE_VIEW_TYPE_CUBE, or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY

- VUID-vkCmdDispatchGraphIndirectAMDX-filterCubic-02694
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have a VkImageViewType and format that supports cubic filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubic` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdDispatchGraphIndirectAMDX-filterCubicMinmax-02695
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX as a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubicMinmax` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdDispatchGraphIndirectAMDX-cubicRangeClamp-09212
  If the `cubicRangeClamp` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must not have a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM

- VUID-vkCmdDispatchGraphIndirectAMDX-reductionMode-09213
  Any VkImageView being sampled with a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM as a result of this command must sample with VK_FILTER_CUBIC_EXT

- VUID-vkCmdDispatchGraphIndirectAMDX-selectableCubicWeights-09214
  If the `selectableCubicWeights` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have VkSamplerCubicWeightsCreateInfoQCOM::`cubicWeights` equal to VK_CUBIC_FILTER_WEIGHTS_CATMULL_ROM_QCOM

- VUID-vkCmdDispatchGraphIndirectAMDX-flags-02696
  Any VkImage created with a VkImageCreateInfo::`flags` containing VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV sampled as a result of this command must only be sampled using a VkSamplerAddressMode of VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDispatchGraphIndirectAMDX-OpTypeImage-07027
  For any VkImageView being written as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdDispatchGraphIndirectAMDX-OpTypeImage-07028
  For any VkImageView being read as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdDispatchGraphIndirectAMDX-OpTypeImage-07029
  For any VkBufferView being written as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown`, the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdDispatchGraphIndirectAMDX-OpTypeImage-07030
  Any VkBufferView being read as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown` then the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdDispatchGraphIndirectAMDX-None-08600
  If a a bound shader was created with a pipeline layout and statically uses a set n, a descriptor set must have been bound to n at the same pipeline bind point, with layouts compatible for set n with the layout(s) used to create the shader, as described in Pipeline Layout Compatibility

- VUID-vkCmdDispatchGraphIndirectAMDX-None-08601
  If a a bound shader was created with a pipeline layout or specified push constant ranges and statically uses a push constant value, that value must have been set for the same pipeline bind point, with push constant ranges that are compatible with the push constant range used to create the shader

- VUID-vkCmdDispatchGraphIndirectAMDX-None-10068
  For each array of resources that is used by a bound shader, the indices used to access members of the array must be less than the descriptor count for the identified binding in the descriptor sets used by this command

- VUID-vkCmdDispatchGraphIndirectAMDX-None-08114
  Descriptors in each bound descriptor set, specified via vkCmdBindDescriptorSets, must be valid if they are accessed as described by descriptor validity by the VkPipeline bound to the pipeline bind point used by this command and the bound VkPipeline was not created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDispatchGraphIndirectAMDX-imageLayout-00344
  If an image descriptor is accessed by a shader, the VkImageLayout must match the subresource accessible from the VkImageView as defined by the image layout matching rules

- VUID-vkCmdDispatchGraphIndirectAMDX-None-08115
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdBindDescriptorSets, the bound VkPipeline must have been created without VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDispatchGraphIndirectAMDX-None-08116
  Descriptors in bound descriptor buffers, specified via vkCmdSetDescriptorBufferOffsetsEXT, must be valid if they are dynamically accessed

- VUID-vkCmdDispatchGraphIndirectAMDX-None-08117
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdSetDescriptorBufferOffsetsEXT, the bound VkPipeline must have been created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDispatchGraphIndirectAMDX-None-08119
  If a descriptor is dynamically used with a VkPipeline created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdDispatchGraphIndirectAMDX-None-08605
  If a descriptor is dynamically used with a VkShaderEXT created with a `VkDescriptorSetLayout` that was created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdDispatchGraphIndirectAMDX-None-08606
  If the `shaderObject` feature is not enabled, a valid pipeline must be bound to the pipeline bind point used by this command

- VUID-vkCmdDispatchGraphIndirectAMDX-None-08608
  If a pipeline is bound to the pipeline bind point used by this command, there must not have been any calls to dynamic state setting commands for any state specified statically in the VkPipeline object bound to the pipeline bind point used by this command, since that pipeline was bound

- VUID-vkCmdDispatchGraphIndirectAMDX-uniformBuffers-06935
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDispatchGraphIndirectAMDX-None-08612
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDispatchGraphIndirectAMDX-storageBuffers-06936
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDispatchGraphIndirectAMDX-None-08613
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a storage buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDispatchGraphIndirectAMDX-commandBuffer-02707
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, any resource accessed by bound shaders must not be a protected resource

- VUID-vkCmdDispatchGraphIndirectAMDX-viewType-07752
  If a VkImageView is accessed as a result of this command, then the image view’s `viewType` must match the `Dim` operand of the `OpTypeImage` as described in Compatibility Between SPIR-V Image Dimensions and Vulkan ImageView Types

- VUID-vkCmdDispatchGraphIndirectAMDX-format-07753
  If a VkImageView or VkBufferView is accessed as a result of this command, then the numeric type of the view’s `format` and the `Sampled` `Type` operand of the `OpTypeImage` must match

- VUID-vkCmdDispatchGraphIndirectAMDX-OpImageWrite-08795
  If a VkImageView created with a format other than VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the image view’s format

- VUID-vkCmdDispatchGraphIndirectAMDX-OpImageWrite-08796
  If a VkImageView created with the format VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have four components

- VUID-vkCmdDispatchGraphIndirectAMDX-OpImageWrite-04469
  If a VkBufferView is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the buffer view’s format

- VUID-vkCmdDispatchGraphIndirectAMDX-SampledType-04470
  If a VkImageView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdDispatchGraphIndirectAMDX-SampledType-04471
  If a VkImageView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdDispatchGraphIndirectAMDX-SampledType-04472
  If a VkBufferView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdDispatchGraphIndirectAMDX-SampledType-04473
  If a VkBufferView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdDispatchGraphIndirectAMDX-sparseImageInt64Atomics-04474
  If the `sparseImageInt64Atomics` feature is not enabled, VkImage objects created with the VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdDispatchGraphIndirectAMDX-sparseImageInt64Atomics-04475
  If the `sparseImageInt64Atomics` feature is not enabled, VkBuffer objects created with the VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdDispatchGraphIndirectAMDX-OpImageSampleWeightedQCOM-06971
  If `OpImageSampleWeightedQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_SAMPLED_IMAGE_BIT_QCOM

- VUID-vkCmdDispatchGraphIndirectAMDX-OpImageSampleWeightedQCOM-06972
  If `OpImageSampleWeightedQCOM` uses a VkImageView as a sample weight image as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_IMAGE_BIT_QCOM

- VUID-vkCmdDispatchGraphIndirectAMDX-OpImageBoxFilterQCOM-06973
  If `OpImageBoxFilterQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BOX_FILTER_SAMPLED_BIT_QCOM

- VUID-vkCmdDispatchGraphIndirectAMDX-OpImageBlockMatchSSDQCOM-06974
  If `OpImageBlockMatchSSDQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdDispatchGraphIndirectAMDX-OpImageBlockMatchSADQCOM-12420
  If `OpImageBlockMatchSADQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdDispatchGraphIndirectAMDX-OpImageBlockMatchSADQCOM-06976
  If `OpImageBlockMatchSADQCOM` or OpImageBlockMatchSSDQCOM is used to read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdDispatchGraphIndirectAMDX-OpImageSampleWeightedQCOM-06977
  If `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdDispatchGraphIndirectAMDX-OpImageSampleWeightedQCOM-06978
  If any command other than `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must not have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdDispatchGraphIndirectAMDX-OpImageBlockMatchWindow-09215
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM

- VUID-vkCmdDispatchGraphIndirectAMDX-OpImageBlockMatchWindow-09216
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format must be a single-component format

- VUID-vkCmdDispatchGraphIndirectAMDX-OpImageBlockMatchWindow-09217
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdDispatchGraphIndirectAMDX-OpImageBlockMatchWindow-12421
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the `blockMatchExtendedClampToEdge` feature is not enabled, the input sampler must not have been created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDispatchGraphIndirectAMDX-addressModeU-12422
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the input sampler was created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, then the sampler must have been created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDispatchGraphIndirectAMDX-None-07288
  Any shader invocation executed by this command must terminate

- VUID-vkCmdDispatchGraphIndirectAMDX-None-09600
  If a descriptor with type equal to any of VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, or VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT is accessed as a result of this command, all image subresources identified by that descriptor must be in the image layout identified when the descriptor was written

- VUID-vkCmdDispatchGraphIndirectAMDX-micromap-11636
  If an acceleration structure is accessed as a result of this command through an `OpRayQueryProceedKHR` operation , the `VK_EXT_opacity_micromap` extension is not enabled, and the acceleration structure is built using geometry with a VkAccelerationStructureTrianglesOpacityMicromapKHR structure included in its `pNext` chain, the shader must have specified a `OpacityMicromapIdKHR` execution mode with its specialization constant operand equal to VK_TRUE

- VUID-vkCmdDispatchGraphIndirectAMDX-micromap-11637
  If an acceleration structure is accessed as a result of this command and the acceleration structure was constructed through deserialization, all micromap arrays referenced by the acceleration structure that were not replaced by an acceleration structure update command must have been deserialized using the serialized data of the corresponding micromaps used to originally build the acceleration structure prior to the execution of this command on the device

- VUID-vkCmdDispatchGraphIndirectAMDX-micromap-11638
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkPipeline bound to the pipeline bind point used by this command must not have been created with `flags` that includes VK_PIPELINE_CREATE_2_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_KHR

- VUID-vkCmdDispatchGraphIndirectAMDX-micromap-11639
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkShaderEXT that accessed the descriptor must not have been created with `flags` that includes VK_SHADER_CREATE_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_EXT

- VUID-vkCmdDispatchGraphIndirectAMDX-commandBuffer-10746
  The `VkDeviceMemory` object allocated from a `VkMemoryHeap` with the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property that is bound to a resource accessed as a result of this command must be the active bound tile memory object in `commandBuffer`

- VUID-vkCmdDispatchGraphIndirectAMDX-None-10678
  If this command is recorded inside a tile shading render pass instance, the stages corresponding to the pipeline bind point used by this command must only include VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_FRAGMENT_BIT, and/or VK_SHADER_STAGE_COMPUTE_BIT

- VUID-vkCmdDispatchGraphIndirectAMDX-None-10679
  If this command is recorded where per-tile execution model is enabled, there must be no access to any image while the image was be transitioned to the VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT layout

- VUID-vkCmdDispatchGraphIndirectAMDX-pDescription-09900
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the underlying VkTensorARM object must have been created with the VK_TENSOR_USAGE_SHADER_BIT_ARM usage flag set

- VUID-vkCmdDispatchGraphIndirectAMDX-dimensionCount-09905
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the `Rank` of the `OpTypeTensorARM` of the tensor resource variable must be equal to the `dimensionCount` provided via VkTensorCreateInfoARM::`pDescription` when creating the underlying VkTensorARM object

- VUID-vkCmdDispatchGraphIndirectAMDX-OpTypeTensorARM-09906
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the element type of the `OpTypeTensorARM` of the tensor resource variable must be compatible with the VkFormat of the VkTensorViewARM used for the access

- VUID-vkCmdDispatchGraphIndirectAMDX-OpTensorReadARM-12462
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, using `OpTensorReadARM` or `OpTensorWriteARM`, and the underlying VkTensorARM object was created with a VK_TENSOR_TILING_BRICK_16_WIDE_ARM, VK_TENSOR_TILING_BRICK_8_WIDE_ARM, VK_TENSOR_TILING_BRICK_4_WIDE_ARM, VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_ARM, or VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_64K_ARM VkTensorTilingARM, and the object read or written is an array, then the innermost coordinate provided to `OpTensorReadARM` or `OpTensorWriteARM` via the `Coordinates` operand must be a multiple of the largest power of 2 that is less than or equal to the number of components of the array

- VUID-vkCmdDispatchGraphIndirectAMDX-pNext-12463
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command and the corresponding VkTensorARM object was created with a VkTensorRollingBackingCreateInfoARM structure in the `pNext` chain of VkTensorCreateInfoARM, then the number of elements accessed with one `OpTensorReadARM` or `OpTensorWriteARM`, must be less than or equal to the number of elements available from the starting coordinate in the rolling backing along the innermost dimension, defined as `wraps`[`dimensionCount` - 1] - InnermostCoordinate % `wraps`[`dimensionCount` - 1] where InnermostCoordinate is the last component of the coordinates array provided via the `Coordinates` operand

- VUID-vkCmdDispatchGraphIndirectAMDX-None-12472
  Descriptors dynamically accessed in bound descriptor heaps must be valid

- VUID-vkCmdDispatchGraphIndirectAMDX-None-11297
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a `OpTypeStruct` decorated with `Block` or `BufferBlock` using that mapping, the calculated offset for the resource heap must be a multiple of `bufferDescriptorAlignment`

- VUID-vkCmdDispatchGraphIndirectAMDX-None-11298
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeImage` or `OpTypeSampledImage` using that mapping, the calculated offset for the resource heap must be a multiple of `imageDescriptorAlignment`

- VUID-vkCmdDispatchGraphIndirectAMDX-None-11299
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeSampler` or `OpTypeSampledImage` using that mapping, the calculated offset for the sampler heap must be a multiple of `samplerDescriptorAlignment`

- VUID-vkCmdDispatchGraphIndirectAMDX-None-11397
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeTensorARM` using that mapping, the calculated offset for the resource heap must be a multiple of `tensorDescriptorAlignment`

- VUID-vkCmdDispatchGraphIndirectAMDX-None-11300
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 4

- VUID-vkCmdDispatchGraphIndirectAMDX-None-11301
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdDispatchGraphIndirectAMDX-None-11302
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress

- VUID-vkCmdDispatchGraphIndirectAMDX-None-11304
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 8

- VUID-vkCmdDispatchGraphIndirectAMDX-None-11305
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdDispatchGraphIndirectAMDX-None-11306
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address pointed to by the address in push data must be a valid VkDeviceAddress

- VUID-vkCmdDispatchGraphIndirectAMDX-None-11308
  For each descriptor heap that is statically used by a bound shader, either directly or via a descriptor mapping, a valid descriptor heap must be bound

- VUID-vkCmdDispatchGraphIndirectAMDX-None-11309
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, execution of this command must not result in any descriptor read accessing data outside of the user range of the respective heap bound by `vkCmdBind*HeapEXT` commands

- VUID-vkCmdDispatchGraphIndirectAMDX-None-11372
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer or uniform texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified via VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDispatchGraphIndirectAMDX-None-11373
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer or storage texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDispatchGraphIndirectAMDX-None-11374
  If the `robustBufferAccess2` feature is not enabled, the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, uniform texel buffer, storage buffer, or storage texel buffer, that shader must not access values outside of the range of the buffer as specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDispatchGraphIndirectAMDX-pBindInfo-11375
  If any bound shader uses an embedded sampler via a descriptor mapping, the value of `pBindInfo->reservedRangeSize` set for vkCmdBindSamplerHeapEXT must be greater than or equal to `minSamplerHeapReservedRangeWithEmbedded`

- VUID-vkCmdDispatchGraphIndirectAMDX-None-11376
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, and that shader statically uses a push constant value, that value must have been set by vkCmdPushDataEXT

- VUID-vkCmdDispatchGraphIndirectAMDX-None-11398
  If a bound shader was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the access must not be out of bounds

- VUID-vkCmdDispatchGraphIndirectAMDX-None-11437
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the buffer from which the address in push data was queried must have been created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdDispatchGraphIndirectAMDX-None-11438
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdDispatchGraphIndirectAMDX-None-11441
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must be aligned to `minUniformBufferOffsetAlignment`

- VUID-vkCmdDispatchGraphIndirectAMDX-None-11439
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_STORAGE_BUFFER_BIT usage flag set

- VUID-vkCmdDispatchGraphIndirectAMDX-None-11442
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must be aligned to `minStorageBufferOffsetAlignment`

- VUID-vkCmdDispatchGraphIndirectAMDX-None-11485
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses an acceleration structure using that mapping, the address that the acceleration structure is mapped to must be an acceleration structure address retrieved from a VkAccelerationStructureKHR object via vkGetAccelerationStructureDeviceAddressKHR or handle retrieved from a VkAccelerationStructureNV object via vkGetAccelerationStructureHandleNV

- VUID-vkCmdDispatchGraphIndirectAMDX-index-11450
  If a shader uses a sampler descriptor to sample an image as a result of this command, and that sampler descriptor uses a custom border color with an index defined by VkSamplerCustomBorderColorIndexCreateInfoEXT, the value of VkSamplerCustomBorderColorIndexCreateInfoEXT::`index` must have been registered before this command was recorded, and still be registered during the sampling operation, with an identically defined color

- VUID-vkCmdDispatchGraphIndirectAMDX-protectedNoFault-11455
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, the address that the resource is mapped to must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdDispatchGraphIndirectAMDX-protectedNoFault-11456
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, the address of the indirect memory must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdDispatchGraphIndirectAMDX-commandBuffer-09181
  `commandBuffer` must not be a protected command buffer

- VUID-vkCmdDispatchGraphIndirectAMDX-commandBuffer-09182
  `commandBuffer` must be a primary command buffer

- VUID-vkCmdDispatchGraphIndirectAMDX-scratch-10192
  `scratch` must be the device address of an allocated memory range at least as large as `scratchSize`

- VUID-vkCmdDispatchGraphIndirectAMDX-scratchSize-10193
  `scratchSize` must be greater than or equal to VkExecutionGraphPipelineScratchSizeAMDX::`minSize` returned by vkGetExecutionGraphPipelineScratchSizeAMDX for the bound execution graph pipeline

- VUID-vkCmdDispatchGraphIndirectAMDX-scratch-09184
  `scratch` must be a device address within a VkBuffer created with the VK_BUFFER_USAGE_EXECUTION_GRAPH_SCRATCH_BIT_AMDX or VK_BUFFER_USAGE_2_EXECUTION_GRAPH_SCRATCH_BIT_AMDX usage flags set

- VUID-vkCmdDispatchGraphIndirectAMDX-scratch-10194
  The device memory range [`scratch`,`scratch`
  `scratchSize`] must have been initialized with vkCmdInitializeGraphScratchMemoryAMDX using the bound execution graph pipeline, and not modified after that by anything other than another execution graph dispatch command

- VUID-vkCmdDispatchGraphIndirectAMDX-maxComputeWorkGroupCount-09186
  Execution of this command must not cause a node to be dispatched with a larger number of workgroups than that specified by either a `MaxNumWorkgroupsAMDX` decoration in the dispatched node or `maxComputeWorkGroupCount`

- VUID-vkCmdDispatchGraphIndirectAMDX-maxExecutionGraphShaderPayloadCount-09187
  Execution of this command must not cause any shader to initialize more than `maxExecutionGraphShaderPayloadCount` output payloads

- VUID-vkCmdDispatchGraphIndirectAMDX-NodeMaxPayloadsAMDX-09188
  Execution of this command must not cause any shader that declares `NodeMaxPayloadsAMDX` to initialize more output payloads than specified by the max number of payloads for that decoration. This requirement applies to each `NodeMaxPayloadsAMDX` decoration separately

- VUID-vkCmdDispatchGraphIndirectAMDX-None-10195
  If the bound execution graph pipeline includes draw nodes, this command must be called within a render pass instance that is compatible with the graphics pipeline used to create each of those nodes

- VUID-vkCmdDispatchGraphIndirectAMDX-pCountInfo-09150
  `pCountInfo->infos` must be a device pointer to a memory allocation at least as large as the product of `count` and `stride` when this command is executed on the device

- VUID-vkCmdDispatchGraphIndirectAMDX-pCountInfo-09151
  `pCountInfo->infos` must be a device address within a VkBuffer created with the VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT usage flag set

- VUID-vkCmdDispatchGraphIndirectAMDX-pCountInfo-09152
  `pCountInfo->infos` must be a multiple of `executionGraphDispatchAddressAlignment`

- VUID-vkCmdDispatchGraphIndirectAMDX-infos-09153
  Device memory locations at indexes in the range [`infos`, `infos` + (`count`*`stride`)), at a granularity of `stride` must contain valid VkDispatchGraphInfoAMDX structures in the first 24 bytes when this command is executed on the device

- VUID-vkCmdDispatchGraphIndirectAMDX-pCountInfo-09154
  For each VkDispatchGraphInfoAMDX structure in `pCountInfo->infos`, `payloads` must be a device pointer to a memory allocation at least as large as the product of `payloadCount` and `payloadStride` when this command is executed on the device

- VUID-vkCmdDispatchGraphIndirectAMDX-pCountInfo-09155
  For each VkDispatchGraphInfoAMDX structure in `pCountInfo->infos`, `payloads` must be a device address within a VkBuffer created with the VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT usage flag set

- VUID-vkCmdDispatchGraphIndirectAMDX-pCountInfo-09156
  For each VkDispatchGraphInfoAMDX structure in `pCountInfo->infos`, `payloads` must be a multiple of `executionGraphDispatchAddressAlignment`

- VUID-vkCmdDispatchGraphIndirectAMDX-pCountInfo-09157
  For each VkDispatchGraphInfoAMDX structure in `pCountInfo->infos`, `nodeIndex` must be a valid node index in the bound execution graph pipeline, as returned by vkGetExecutionGraphPipelineNodeIndexAMDX when this command is executed on the device

- VUID-vkCmdDispatchGraphIndirectAMDX-pCountInfo-09158
  For each VkDispatchGraphInfoAMDX structure in `pCountInfo->infos`, device memory locations at indexes in the range [`payloads`, `payloads` + (`payloadCount` * `payloadStride`)), at a granularity of `payloadStride` must contain a payload matching the size of the input payload expected by the node in `nodeIndex` in the first bytes when this command is executed on the device

Valid Usage (Implicit)

- VUID-vkCmdDispatchGraphIndirectAMDX-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdDispatchGraphIndirectAMDX-scratch-parameter
  `scratch` must be a valid VkDeviceAddress value

- VUID-vkCmdDispatchGraphIndirectAMDX-pCountInfo-parameter
  `pCountInfo` must be a valid pointer to a valid VkDispatchGraphCountInfoAMDX structure

- VUID-vkCmdDispatchGraphIndirectAMDX-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdDispatchGraphIndirectAMDX-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, or VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdDispatchGraphIndirectAMDX-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdDispatchGraphIndirectAMDX-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdDispatchGraphIndirectAMDX-bufferlevel
  `commandBuffer` must be a primary `VkCommandBuffer`

Host Synchronization

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary | Both | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT | Action

Conditional Rendering

vkCmdDispatchGraphIndirectAMDX is affected by conditional rendering

To record an execution graph dispatch with all parameters read on device, call:

    // Provided by VK_AMDX_shader_enqueue
    void vkCmdDispatchGraphIndirectCountAMDX(
        VkCommandBuffer                             commandBuffer,
        VkDeviceAddress                             scratch,
        VkDeviceSize                                scratchSize,
        VkDeviceAddress                             countInfo);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `scratch` is the address of scratch memory to be used.

- `scratchSize` is a range in bytes of scratch memory to be used.

- `countInfo` is a device address of a VkDispatchGraphCountInfoAMDX structure defining the nodes which will be initially executed.

When this command is executed, the nodes specified in `countInfo` are executed. Nodes executed as part of this command are not implicitly synchronized in any way against each other once they are dispatched.

For this command, all pointers in substructures are treated as device pointers and read during device execution of this command. The allocation and contents of these pointers only needs to be valid during device execution. All of these addresses will be read in the VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT pipeline stage with the VK_ACCESS_2_SHADER_STORAGE_READ_BIT access flag.

Execution of this command may modify any memory locations in the range [`scratch`,`scratch` + `scratchSize`). Accesses to this memory range are performed in the VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT pipeline stage with the VK_ACCESS_2_SHADER_STORAGE_READ_BIT and VK_ACCESS_2_SHADER_STORAGE_WRITE_BIT access flags.

Valid Usage

- VUID-vkCmdDispatchGraphIndirectCountAMDX-magFilter-04553
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdDispatchGraphIndirectCountAMDX-magFilter-09598
  If a VkSampler created with `magFilter` or `minFilter` equal to VK_FILTER_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdDispatchGraphIndirectCountAMDX-mipmapMode-04770
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR, `reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, and `compareEnable` equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- VUID-vkCmdDispatchGraphIndirectCountAMDX-mipmapMode-09599
  If a VkSampler created with `mipmapMode` equal to VK_SAMPLER_MIPMAP_MODE_LINEAR and `reductionMode` equal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT

- VUID-vkCmdDispatchGraphIndirectCountAMDX-unnormalizedCoordinates-09635
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `levelCount` and `layerCount` must be 1

- VUID-vkCmdDispatchGraphIndirectCountAMDX-None-08609
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’s `viewType` must be VK_IMAGE_VIEW_TYPE_1D or VK_IMAGE_VIEW_TYPE_2D

- VUID-vkCmdDispatchGraphIndirectCountAMDX-None-08610
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions with `ImplicitLod`, `Dref` or `Proj` in their name

- VUID-vkCmdDispatchGraphIndirectCountAMDX-None-08611
  If a VkSampler created with `unnormalizedCoordinates` equal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions that includes a LOD bias or any offset values

- VUID-vkCmdDispatchGraphIndirectCountAMDX-None-06479
  If a VkImageView is sampled with depth comparison, the image view’s format features must contain VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT

- VUID-vkCmdDispatchGraphIndirectCountAMDX-None-02691
  If a VkImageView is accessed using atomic operations as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT

- VUID-vkCmdDispatchGraphIndirectCountAMDX-None-07888
  If a VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER descriptor is accessed using atomic operations as a result of this command, then the storage texel buffer’s format features must contain VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT

- VUID-vkCmdDispatchGraphIndirectCountAMDX-None-02692
  If a VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT

- VUID-vkCmdDispatchGraphIndirectCountAMDX-None-02693
  If the VK_EXT_filter_cubic extension is not enabled and any VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, it must not have a VkImageViewType of VK_IMAGE_VIEW_TYPE_3D, VK_IMAGE_VIEW_TYPE_CUBE, or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY

- VUID-vkCmdDispatchGraphIndirectCountAMDX-filterCubic-02694
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have a VkImageViewType and format that supports cubic filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubic` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdDispatchGraphIndirectCountAMDX-filterCubicMinmax-02695
  Any VkImageView being sampled with VK_FILTER_CUBIC_EXT with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX as a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::`filterCubicMinmax` returned by vkGetPhysicalDeviceImageFormatProperties2

- VUID-vkCmdDispatchGraphIndirectCountAMDX-cubicRangeClamp-09212
  If the `cubicRangeClamp` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must not have a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM

- VUID-vkCmdDispatchGraphIndirectCountAMDX-reductionMode-09213
  Any VkImageView being sampled with a VkSamplerReductionModeCreateInfo::`reductionMode` equal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM as a result of this command must sample with VK_FILTER_CUBIC_EXT

- VUID-vkCmdDispatchGraphIndirectCountAMDX-selectableCubicWeights-09214
  If the `selectableCubicWeights` feature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have VkSamplerCubicWeightsCreateInfoQCOM::`cubicWeights` equal to VK_CUBIC_FILTER_WEIGHTS_CATMULL_ROM_QCOM

- VUID-vkCmdDispatchGraphIndirectCountAMDX-flags-02696
  Any VkImage created with a VkImageCreateInfo::`flags` containing VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV sampled as a result of this command must only be sampled using a VkSamplerAddressMode of VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDispatchGraphIndirectCountAMDX-OpTypeImage-07027
  For any VkImageView being written as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdDispatchGraphIndirectCountAMDX-OpTypeImage-07028
  For any VkImageView being read as a storage image where the image format field of the `OpTypeImage` is `Unknown`, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdDispatchGraphIndirectCountAMDX-OpTypeImage-07029
  For any VkBufferView being written as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown`, the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT

- VUID-vkCmdDispatchGraphIndirectCountAMDX-OpTypeImage-07030
  Any VkBufferView being read as a storage texel buffer where the image format field of the `OpTypeImage` is `Unknown` then the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT

- VUID-vkCmdDispatchGraphIndirectCountAMDX-None-08600
  If a a bound shader was created with a pipeline layout and statically uses a set n, a descriptor set must have been bound to n at the same pipeline bind point, with layouts compatible for set n with the layout(s) used to create the shader, as described in Pipeline Layout Compatibility

- VUID-vkCmdDispatchGraphIndirectCountAMDX-None-08601
  If a a bound shader was created with a pipeline layout or specified push constant ranges and statically uses a push constant value, that value must have been set for the same pipeline bind point, with push constant ranges that are compatible with the push constant range used to create the shader

- VUID-vkCmdDispatchGraphIndirectCountAMDX-None-10068
  For each array of resources that is used by a bound shader, the indices used to access members of the array must be less than the descriptor count for the identified binding in the descriptor sets used by this command

- VUID-vkCmdDispatchGraphIndirectCountAMDX-None-08114
  Descriptors in each bound descriptor set, specified via vkCmdBindDescriptorSets, must be valid if they are accessed as described by descriptor validity by the VkPipeline bound to the pipeline bind point used by this command and the bound VkPipeline was not created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDispatchGraphIndirectCountAMDX-imageLayout-00344
  If an image descriptor is accessed by a shader, the VkImageLayout must match the subresource accessible from the VkImageView as defined by the image layout matching rules

- VUID-vkCmdDispatchGraphIndirectCountAMDX-None-08115
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdBindDescriptorSets, the bound VkPipeline must have been created without VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDispatchGraphIndirectCountAMDX-None-08116
  Descriptors in bound descriptor buffers, specified via vkCmdSetDescriptorBufferOffsetsEXT, must be valid if they are dynamically accessed

- VUID-vkCmdDispatchGraphIndirectCountAMDX-None-08117
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdSetDescriptorBufferOffsetsEXT, the bound VkPipeline must have been created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDispatchGraphIndirectCountAMDX-None-08119
  If a descriptor is dynamically used with a VkPipeline created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdDispatchGraphIndirectCountAMDX-None-08605
  If a descriptor is dynamically used with a VkShaderEXT created with a `VkDescriptorSetLayout` that was created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdDispatchGraphIndirectCountAMDX-None-08606
  If the `shaderObject` feature is not enabled, a valid pipeline must be bound to the pipeline bind point used by this command

- VUID-vkCmdDispatchGraphIndirectCountAMDX-None-08608
  If a pipeline is bound to the pipeline bind point used by this command, there must not have been any calls to dynamic state setting commands for any state specified statically in the VkPipeline object bound to the pipeline bind point used by this command, since that pipeline was bound

- VUID-vkCmdDispatchGraphIndirectCountAMDX-uniformBuffers-06935
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDispatchGraphIndirectCountAMDX-None-08612
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDispatchGraphIndirectCountAMDX-storageBuffers-06936
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDispatchGraphIndirectCountAMDX-None-08613
  If the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a storage buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point

- VUID-vkCmdDispatchGraphIndirectCountAMDX-commandBuffer-02707
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, any resource accessed by bound shaders must not be a protected resource

- VUID-vkCmdDispatchGraphIndirectCountAMDX-viewType-07752
  If a VkImageView is accessed as a result of this command, then the image view’s `viewType` must match the `Dim` operand of the `OpTypeImage` as described in Compatibility Between SPIR-V Image Dimensions and Vulkan ImageView Types

- VUID-vkCmdDispatchGraphIndirectCountAMDX-format-07753
  If a VkImageView or VkBufferView is accessed as a result of this command, then the numeric type of the view’s `format` and the `Sampled` `Type` operand of the `OpTypeImage` must match

- VUID-vkCmdDispatchGraphIndirectCountAMDX-OpImageWrite-08795
  If a VkImageView created with a format other than VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the image view’s format

- VUID-vkCmdDispatchGraphIndirectCountAMDX-OpImageWrite-08796
  If a VkImageView created with the format VK_FORMAT_A8_UNORM is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have four components

- VUID-vkCmdDispatchGraphIndirectCountAMDX-OpImageWrite-04469
  If a VkBufferView is accessed using `OpImageWrite` as a result of this command, then the `Type` of the `Texel` operand of that instruction must have at least as many components as the buffer view’s format

- VUID-vkCmdDispatchGraphIndirectCountAMDX-SampledType-04470
  If a VkImageView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdDispatchGraphIndirectCountAMDX-SampledType-04471
  If a VkImageView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdDispatchGraphIndirectCountAMDX-SampledType-04472
  If a VkBufferView with a VkFormat that has a 64-bit component width is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 64

- VUID-vkCmdDispatchGraphIndirectCountAMDX-SampledType-04473
  If a VkBufferView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, the `SampledType` of the `OpTypeImage` operand of that instruction must have a `Width` of 32

- VUID-vkCmdDispatchGraphIndirectCountAMDX-sparseImageInt64Atomics-04474
  If the `sparseImageInt64Atomics` feature is not enabled, VkImage objects created with the VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdDispatchGraphIndirectCountAMDX-sparseImageInt64Atomics-04475
  If the `sparseImageInt64Atomics` feature is not enabled, VkBuffer objects created with the VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an `OpTypeImage` with a `SampledType` with a `Width` of 64 by this command

- VUID-vkCmdDispatchGraphIndirectCountAMDX-OpImageSampleWeightedQCOM-06971
  If `OpImageSampleWeightedQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_SAMPLED_IMAGE_BIT_QCOM

- VUID-vkCmdDispatchGraphIndirectCountAMDX-OpImageSampleWeightedQCOM-06972
  If `OpImageSampleWeightedQCOM` uses a VkImageView as a sample weight image as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_IMAGE_BIT_QCOM

- VUID-vkCmdDispatchGraphIndirectCountAMDX-OpImageBoxFilterQCOM-06973
  If `OpImageBoxFilterQCOM` is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BOX_FILTER_SAMPLED_BIT_QCOM

- VUID-vkCmdDispatchGraphIndirectCountAMDX-OpImageBlockMatchSSDQCOM-06974
  If `OpImageBlockMatchSSDQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdDispatchGraphIndirectCountAMDX-OpImageBlockMatchSADQCOM-12420
  If `OpImageBlockMatchSADQCOM` is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM or VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM

- VUID-vkCmdDispatchGraphIndirectCountAMDX-OpImageBlockMatchSADQCOM-06976
  If `OpImageBlockMatchSADQCOM` or OpImageBlockMatchSSDQCOM is used to read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdDispatchGraphIndirectCountAMDX-OpImageSampleWeightedQCOM-06977
  If `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdDispatchGraphIndirectCountAMDX-OpImageSampleWeightedQCOM-06978
  If any command other than `OpImageSampleWeightedQCOM`, `OpImageBoxFilterQCOM`, `OpImageBlockMatchWindowSSDQCOM`, `OpImageBlockMatchWindowSADQCOM`, `OpImageBlockMatchGatherSSDQCOM`, `OpImageBlockMatchGatherSADQCOM`, `OpImageBlockMatchSSDQCOM`, or `OpImageBlockMatchSADQCOM` uses a VkSampler as a result of this command, then the sampler must not have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM

- VUID-vkCmdDispatchGraphIndirectCountAMDX-OpImageBlockMatchWindow-09215
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM

- VUID-vkCmdDispatchGraphIndirectCountAMDX-OpImageBlockMatchWindow-09216
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction is used to read from an VkImageView as a result of this command, then the image view’s format must be a single-component format

- VUID-vkCmdDispatchGraphIndirectCountAMDX-OpImageBlockMatchWindow-09217
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` read from a reference image as result of this command, and the blockMatchExtendedClampToEdge feature is not enabled or the input sampler was not created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE then the specified reference coordinates must not fail integer texel coordinate validation

- VUID-vkCmdDispatchGraphIndirectCountAMDX-OpImageBlockMatchWindow-12421
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the `blockMatchExtendedClampToEdge` feature is not enabled, the input sampler must not have been created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDispatchGraphIndirectCountAMDX-addressModeU-12422
  If a `OpImageBlockMatchWindow*QCOM` or `OpImageBlockMatchGather*QCOM` instruction uses a VkSampler as a result of this command, and the input sampler was created with either `addressModeU` or `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, then the sampler must have been created with both `addressModeU` and `addressModeV` equal to VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

- VUID-vkCmdDispatchGraphIndirectCountAMDX-None-07288
  Any shader invocation executed by this command must terminate

- VUID-vkCmdDispatchGraphIndirectCountAMDX-None-09600
  If a descriptor with type equal to any of VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, or VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT is accessed as a result of this command, all image subresources identified by that descriptor must be in the image layout identified when the descriptor was written

- VUID-vkCmdDispatchGraphIndirectCountAMDX-micromap-11636
  If an acceleration structure is accessed as a result of this command through an `OpRayQueryProceedKHR` operation , the `VK_EXT_opacity_micromap` extension is not enabled, and the acceleration structure is built using geometry with a VkAccelerationStructureTrianglesOpacityMicromapKHR structure included in its `pNext` chain, the shader must have specified a `OpacityMicromapIdKHR` execution mode with its specialization constant operand equal to VK_TRUE

- VUID-vkCmdDispatchGraphIndirectCountAMDX-micromap-11637
  If an acceleration structure is accessed as a result of this command and the acceleration structure was constructed through deserialization, all micromap arrays referenced by the acceleration structure that were not replaced by an acceleration structure update command must have been deserialized using the serialized data of the corresponding micromaps used to originally build the acceleration structure prior to the execution of this command on the device

- VUID-vkCmdDispatchGraphIndirectCountAMDX-micromap-11638
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkPipeline bound to the pipeline bind point used by this command must not have been created with `flags` that includes VK_PIPELINE_CREATE_2_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_KHR

- VUID-vkCmdDispatchGraphIndirectCountAMDX-micromap-11639
  If an acceleration structure is accessed as a result of this command and the acceleration structure is built using geometry with an `indexBuffer` containing both VkOpacityMicromapSpecialIndexKHR values and indices into an associated micromap array, any VkShaderEXT that accessed the descriptor must not have been created with `flags` that includes VK_SHADER_CREATE_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_EXT

- VUID-vkCmdDispatchGraphIndirectCountAMDX-commandBuffer-10746
  The `VkDeviceMemory` object allocated from a `VkMemoryHeap` with the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property that is bound to a resource accessed as a result of this command must be the active bound tile memory object in `commandBuffer`

- VUID-vkCmdDispatchGraphIndirectCountAMDX-None-10678
  If this command is recorded inside a tile shading render pass instance, the stages corresponding to the pipeline bind point used by this command must only include VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_FRAGMENT_BIT, and/or VK_SHADER_STAGE_COMPUTE_BIT

- VUID-vkCmdDispatchGraphIndirectCountAMDX-None-10679
  If this command is recorded where per-tile execution model is enabled, there must be no access to any image while the image was be transitioned to the VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT layout

- VUID-vkCmdDispatchGraphIndirectCountAMDX-pDescription-09900
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the underlying VkTensorARM object must have been created with the VK_TENSOR_USAGE_SHADER_BIT_ARM usage flag set

- VUID-vkCmdDispatchGraphIndirectCountAMDX-dimensionCount-09905
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the `Rank` of the `OpTypeTensorARM` of the tensor resource variable must be equal to the `dimensionCount` provided via VkTensorCreateInfoARM::`pDescription` when creating the underlying VkTensorARM object

- VUID-vkCmdDispatchGraphIndirectCountAMDX-OpTypeTensorARM-09906
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the element type of the `OpTypeTensorARM` of the tensor resource variable must be compatible with the VkFormat of the VkTensorViewARM used for the access

- VUID-vkCmdDispatchGraphIndirectCountAMDX-OpTensorReadARM-12462
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, using `OpTensorReadARM` or `OpTensorWriteARM`, and the underlying VkTensorARM object was created with a VK_TENSOR_TILING_BRICK_16_WIDE_ARM, VK_TENSOR_TILING_BRICK_8_WIDE_ARM, VK_TENSOR_TILING_BRICK_4_WIDE_ARM, VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_ARM, or VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_64K_ARM VkTensorTilingARM, and the object read or written is an array, then the innermost coordinate provided to `OpTensorReadARM` or `OpTensorWriteARM` via the `Coordinates` operand must be a multiple of the largest power of 2 that is less than or equal to the number of components of the array

- VUID-vkCmdDispatchGraphIndirectCountAMDX-pNext-12463
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command and the corresponding VkTensorARM object was created with a VkTensorRollingBackingCreateInfoARM structure in the `pNext` chain of VkTensorCreateInfoARM, then the number of elements accessed with one `OpTensorReadARM` or `OpTensorWriteARM`, must be less than or equal to the number of elements available from the starting coordinate in the rolling backing along the innermost dimension, defined as `wraps`[`dimensionCount` - 1] - InnermostCoordinate % `wraps`[`dimensionCount` - 1] where InnermostCoordinate is the last component of the coordinates array provided via the `Coordinates` operand

- VUID-vkCmdDispatchGraphIndirectCountAMDX-None-12472
  Descriptors dynamically accessed in bound descriptor heaps must be valid

- VUID-vkCmdDispatchGraphIndirectCountAMDX-None-11297
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a `OpTypeStruct` decorated with `Block` or `BufferBlock` using that mapping, the calculated offset for the resource heap must be a multiple of `bufferDescriptorAlignment`

- VUID-vkCmdDispatchGraphIndirectCountAMDX-None-11298
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeImage` or `OpTypeSampledImage` using that mapping, the calculated offset for the resource heap must be a multiple of `imageDescriptorAlignment`

- VUID-vkCmdDispatchGraphIndirectCountAMDX-None-11299
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeSampler` or `OpTypeSampledImage` using that mapping, the calculated offset for the sampler heap must be a multiple of `samplerDescriptorAlignment`

- VUID-vkCmdDispatchGraphIndirectCountAMDX-None-11397
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses an `OpTypeTensorARM` using that mapping, the calculated offset for the resource heap must be a multiple of `tensorDescriptorAlignment`

- VUID-vkCmdDispatchGraphIndirectCountAMDX-None-11300
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 4

- VUID-vkCmdDispatchGraphIndirectCountAMDX-None-11301
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdDispatchGraphIndirectCountAMDX-None-11302
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress

- VUID-vkCmdDispatchGraphIndirectCountAMDX-None-11304
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 8

- VUID-vkCmdDispatchGraphIndirectCountAMDX-None-11305
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a valid VkDeviceAddress backed by physical memory at every offset specified by each mapping

- VUID-vkCmdDispatchGraphIndirectCountAMDX-None-11306
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address pointed to by the address in push data must be a valid VkDeviceAddress

- VUID-vkCmdDispatchGraphIndirectCountAMDX-None-11308
  For each descriptor heap that is statically used by a bound shader, either directly or via a descriptor mapping, a valid descriptor heap must be bound

- VUID-vkCmdDispatchGraphIndirectCountAMDX-None-11309
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, execution of this command must not result in any descriptor read accessing data outside of the user range of the respective heap bound by `vkCmdBind*HeapEXT` commands

- VUID-vkCmdDispatchGraphIndirectCountAMDX-None-11372
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer or uniform texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `uniformBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified via VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDispatchGraphIndirectCountAMDX-None-11373
  If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer or storage texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 for `storageBuffers`, the `robustBufferAccess2` feature is not enabled, and the `robustBufferAccess` feature is not enabled, that stage must not access values outside of the range of the descriptor specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDispatchGraphIndirectCountAMDX-None-11374
  If the `robustBufferAccess2` feature is not enabled, the `robustBufferAccess` feature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, uniform texel buffer, storage buffer, or storage texel buffer, that shader must not access values outside of the range of the buffer as specified by VkDeviceAddressRangeKHR when the descriptor was written

- VUID-vkCmdDispatchGraphIndirectCountAMDX-pBindInfo-11375
  If any bound shader uses an embedded sampler via a descriptor mapping, the value of `pBindInfo->reservedRangeSize` set for vkCmdBindSamplerHeapEXT must be greater than or equal to `minSamplerHeapReservedRangeWithEmbedded`

- VUID-vkCmdDispatchGraphIndirectCountAMDX-None-11376
  If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, and that shader statically uses a push constant value, that value must have been set by vkCmdPushDataEXT

- VUID-vkCmdDispatchGraphIndirectCountAMDX-None-11398
  If a bound shader was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the access must not be out of bounds

- VUID-vkCmdDispatchGraphIndirectCountAMDX-None-11437
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the buffer from which the address in push data was queried must have been created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdDispatchGraphIndirectCountAMDX-None-11438
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set

- VUID-vkCmdDispatchGraphIndirectCountAMDX-None-11441
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must be aligned to `minUniformBufferOffsetAlignment`

- VUID-vkCmdDispatchGraphIndirectCountAMDX-None-11439
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_STORAGE_BUFFER_BIT usage flag set

- VUID-vkCmdDispatchGraphIndirectCountAMDX-None-11442
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must be aligned to `minStorageBufferOffsetAlignment`

- VUID-vkCmdDispatchGraphIndirectCountAMDX-None-11485
  If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses an acceleration structure using that mapping, the address that the acceleration structure is mapped to must be an acceleration structure address retrieved from a VkAccelerationStructureKHR object via vkGetAccelerationStructureDeviceAddressKHR or handle retrieved from a VkAccelerationStructureNV object via vkGetAccelerationStructureHandleNV

- VUID-vkCmdDispatchGraphIndirectCountAMDX-index-11450
  If a shader uses a sampler descriptor to sample an image as a result of this command, and that sampler descriptor uses a custom border color with an index defined by VkSamplerCustomBorderColorIndexCreateInfoEXT, the value of VkSamplerCustomBorderColorIndexCreateInfoEXT::`index` must have been registered before this command was recorded, and still be registered during the sampling operation, with an identically defined color

- VUID-vkCmdDispatchGraphIndirectCountAMDX-protectedNoFault-11455
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, the address that the resource is mapped to must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdDispatchGraphIndirectCountAMDX-protectedNoFault-11456
  If `protectedNoFault` is not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, the address of the indirect memory must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set

- VUID-vkCmdDispatchGraphIndirectCountAMDX-commandBuffer-09181
  `commandBuffer` must not be a protected command buffer

- VUID-vkCmdDispatchGraphIndirectCountAMDX-commandBuffer-09182
  `commandBuffer` must be a primary command buffer

- VUID-vkCmdDispatchGraphIndirectCountAMDX-scratch-10192
  `scratch` must be the device address of an allocated memory range at least as large as `scratchSize`

- VUID-vkCmdDispatchGraphIndirectCountAMDX-scratchSize-10193
  `scratchSize` must be greater than or equal to VkExecutionGraphPipelineScratchSizeAMDX::`minSize` returned by vkGetExecutionGraphPipelineScratchSizeAMDX for the bound execution graph pipeline

- VUID-vkCmdDispatchGraphIndirectCountAMDX-scratch-09184
  `scratch` must be a device address within a VkBuffer created with the VK_BUFFER_USAGE_EXECUTION_GRAPH_SCRATCH_BIT_AMDX or VK_BUFFER_USAGE_2_EXECUTION_GRAPH_SCRATCH_BIT_AMDX usage flags set

- VUID-vkCmdDispatchGraphIndirectCountAMDX-scratch-10194
  The device memory range [`scratch`,`scratch`
  `scratchSize`] must have been initialized with vkCmdInitializeGraphScratchMemoryAMDX using the bound execution graph pipeline, and not modified after that by anything other than another execution graph dispatch command

- VUID-vkCmdDispatchGraphIndirectCountAMDX-maxComputeWorkGroupCount-09186
  Execution of this command must not cause a node to be dispatched with a larger number of workgroups than that specified by either a `MaxNumWorkgroupsAMDX` decoration in the dispatched node or `maxComputeWorkGroupCount`

- VUID-vkCmdDispatchGraphIndirectCountAMDX-maxExecutionGraphShaderPayloadCount-09187
  Execution of this command must not cause any shader to initialize more than `maxExecutionGraphShaderPayloadCount` output payloads

- VUID-vkCmdDispatchGraphIndirectCountAMDX-NodeMaxPayloadsAMDX-09188
  Execution of this command must not cause any shader that declares `NodeMaxPayloadsAMDX` to initialize more output payloads than specified by the max number of payloads for that decoration. This requirement applies to each `NodeMaxPayloadsAMDX` decoration separately

- VUID-vkCmdDispatchGraphIndirectCountAMDX-None-10195
  If the bound execution graph pipeline includes draw nodes, this command must be called within a render pass instance that is compatible with the graphics pipeline used to create each of those nodes

- VUID-vkCmdDispatchGraphIndirectCountAMDX-countInfo-09159
  `countInfo` must be a device pointer to a memory allocation containing a valid VkDispatchGraphCountInfoAMDX structure when this command is executed on the device

- VUID-vkCmdDispatchGraphIndirectCountAMDX-countInfo-09160
  `countInfo` must be a device address within a VkBuffer created with the VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT usage flag set

- VUID-vkCmdDispatchGraphIndirectCountAMDX-countInfo-09161
  `countInfo` must be a multiple of `executionGraphDispatchAddressAlignment`

- VUID-vkCmdDispatchGraphIndirectCountAMDX-countInfo-09162
  `countInfo->infos` must be a device pointer to a memory allocation at least as large as the product of `count` and `stride` when this command is executed on the device

- VUID-vkCmdDispatchGraphIndirectCountAMDX-countInfo-09163
  `countInfo->infos` must be a device address within a VkBuffer created with the VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT usage flag set

- VUID-vkCmdDispatchGraphIndirectCountAMDX-countInfo-09164
  `countInfo->infos` must be a multiple of `executionGraphDispatchAddressAlignment`

- VUID-vkCmdDispatchGraphIndirectCountAMDX-infos-09165
  Device memory locations at indexes in the range [`infos`, `infos` + (`count`*`stride`)), at a granularity of `stride` must contain valid VkDispatchGraphInfoAMDX structures in the first 24 bytes when this command is executed on the device

- VUID-vkCmdDispatchGraphIndirectCountAMDX-countInfo-09166
  For each VkDispatchGraphInfoAMDX structure in `countInfo->infos`, `payloads` must be a device pointer to a memory allocation at least as large as the product of `payloadCount` and `payloadStride` when this command is executed on the device

- VUID-vkCmdDispatchGraphIndirectCountAMDX-countInfo-09167
  For each VkDispatchGraphInfoAMDX structure in `countInfo->infos`, `payloads` must be a device address within a VkBuffer created with the VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT usage flag set

- VUID-vkCmdDispatchGraphIndirectCountAMDX-countInfo-09168
  For each VkDispatchGraphInfoAMDX structure in `countInfo->infos`, `payloads` must be a multiple of `executionGraphDispatchAddressAlignment`

- VUID-vkCmdDispatchGraphIndirectCountAMDX-countInfo-09169
  For each VkDispatchGraphInfoAMDX structure in `countInfo->infos`, `nodeIndex` must be a valid node index in the bound execution graph pipeline, as returned by vkGetExecutionGraphPipelineNodeIndexAMDX when this command is executed on the device

- VUID-vkCmdDispatchGraphIndirectCountAMDX-countInfo-09170
  For each VkDispatchGraphInfoAMDX structure in `countInfo->infos`, device memory locations at indexes in the range [`payloads`, `payloads` + (`payloadCount` * `payloadStride`)), at a granularity of `payloadStride` must contain a payload matching the size of the input payload expected by the node in `nodeIndex` in the first bytes when this command is executed on the device

Valid Usage (Implicit)

- VUID-vkCmdDispatchGraphIndirectCountAMDX-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdDispatchGraphIndirectCountAMDX-scratch-parameter
  `scratch` must be a valid VkDeviceAddress value

- VUID-vkCmdDispatchGraphIndirectCountAMDX-countInfo-parameter
  `countInfo` must be a valid VkDeviceAddress value

- VUID-vkCmdDispatchGraphIndirectCountAMDX-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdDispatchGraphIndirectCountAMDX-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, or VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdDispatchGraphIndirectCountAMDX-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdDispatchGraphIndirectCountAMDX-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdDispatchGraphIndirectCountAMDX-bufferlevel
  `commandBuffer` must be a primary `VkCommandBuffer`

Host Synchronization

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary | Both | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT | Action

Conditional Rendering

vkCmdDispatchGraphIndirectCountAMDX is affected by conditional rendering

The `VkDeviceOrHostAddressConstAMDX` union is defined as:

    // Provided by VK_AMDX_shader_enqueue
    typedef union VkDeviceOrHostAddressConstAMDX {
        VkDeviceAddress    deviceAddress;
        const void*        hostAddress;
    } VkDeviceOrHostAddressConstAMDX;

- `deviceAddress` is a buffer device address as returned by the vkGetBufferDeviceAddressKHR command.

- `hostAddress` is a const host memory address.

The `VkDispatchGraphCountInfoAMDX` structure is defined as:

    // Provided by VK_AMDX_shader_enqueue
    typedef struct VkDispatchGraphCountInfoAMDX {
        uint32_t                          count;
        VkDeviceOrHostAddressConstAMDX    infos;
        uint64_t                          stride;
    } VkDispatchGraphCountInfoAMDX;

- `count` is the number of dispatches to perform.

- `infos` is the device or host address of a flat array of VkDispatchGraphInfoAMDX structures

- `stride` is the byte stride between successive VkDispatchGraphInfoAMDX structures in `infos`

Whether `infos` is consumed as a device or host pointer is defined by the command this structure is used in.

The `VkDispatchGraphInfoAMDX` structure is defined as:

    // Provided by VK_AMDX_shader_enqueue
    typedef struct VkDispatchGraphInfoAMDX {
        uint32_t                          nodeIndex;
        uint32_t                          payloadCount;
        VkDeviceOrHostAddressConstAMDX    payloads;
        uint64_t                          payloadStride;
    } VkDispatchGraphInfoAMDX;

- `nodeIndex` is the index of a node in an execution graph to be dispatched.

- `payloadCount` is the number of payloads to dispatch for the specified node.

- `payloads` is a device or host address pointer to a flat array of payloads with size equal to the product of `payloadCount` and `payloadStride`

- `payloadStride` is the byte stride between successive payloads in `payloads`

Whether `payloads` is consumed as a device or host pointer is defined by the command this structure is used in.

Valid Usage

- VUID-VkDispatchGraphInfoAMDX-payloadCount-09171
  `payloadCount` must be no greater than `maxExecutionGraphShaderPayloadCount`

### 51.4. Shader Enqueue

Compute shaders in an execution graph can use the `OpInitializeNodePayloadsAMDX` to initialize nodes for dispatch. Any node payload initialized in this way will be enqueued for dispatch once the shader is done writing to the payload. As compilers may be conservative when making this determination, shaders can further call `OpFinalizeNodePayloadsAMDX` to guarantee that the payload is no longer being written.

The `Node` `Name` operand of the `PayloadNodeNameAMDX` decoration on a payload identifies the shader name of the node to be enqueued, and the `Shader` `Index` operand of `OpInitializeNodePayloadsAMDX` identifies the shader index. A node identified in this way is dispatched as described in the following sections.

#### 51.4.1. Compute Nodes

Compute shaders added as nodes to an execution graph are executed differently based on the presence or absence of the `StaticNumWorkgroupsAMDX` or `CoalescingAMDX` execution modes.

Dispatching a compute shader node that does not declare either the `StaticNumWorkgroupsAMDX` or `CoalescingAMDX` execution mode will execute a number of workgroups in each dimension specified by the first 12 bytes of the payload, interpreted as a VkDispatchIndirectCommand. The same payload will be broadcast to each workgroup in the same dispatch. Additional values in the payload are have no effect on execution.

Dispatching a compute shader node with the `StaticNumWorkgroupsAMDX` execution mode will execute workgroups in each dimension according to the `x`, `y`, and `z` `size` operands to the `StaticNumWorkgroupsAMDX` execution mode. The same payload will be broadcast to each workgroup in the same dispatch. Any values in the payload have no effect on execution.

Dispatching a compute shader node with the `CoalescingAMDX` execution mode will enqueue a single invocation for execution. Implementations may combine multiple such dispatches into the same workgroup, up to the size of the workgroup. The number of invocations coalesced into a given workgroup in this way can be queried via the `CoalescedInputCountAMDX` built-in. Any values in the payload have no effect on execution.

#### 51.4.2. Mesh Nodes

Graphics pipelines added as nodes to an execution graph are executed in a manner similar to a vkCmdDrawMeshTasksIndirectEXT, using the same payloads as compute shaders, but capturing some state from the command buffer.

When an execution graph dispatch is recorded into a command buffer, it captures the following dynamic state for use with draw nodes:

- VK_DYNAMIC_STATE_VIEWPORT

- VK_DYNAMIC_STATE_SCISSOR

- VK_DYNAMIC_STATE_LINE_WIDTH

- VK_DYNAMIC_STATE_DEPTH_BIAS

- VK_DYNAMIC_STATE_BLEND_CONSTANTS

- VK_DYNAMIC_STATE_DEPTH_BOUNDS

- VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT

- VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT

- VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR

Other state is not captured, and graphics pipelines must not be created with other dynamic states when used as a library in an execution graph pipeline.

## 52. External Compute Queues

External compute queues are used to join compatible external APIs to a `VkDevice`, allowing workloads submitted through these external APIs to be executed simultaneously to workloads submitted through Vulkan.

External compute queues are represented by `VkExternalComputeQueueNV` handles:

    // Provided by VK_NV_external_compute_queue
    VK_DEFINE_HANDLE(VkExternalComputeQueueNV)

To create an external compute queue for use by compatible external APIs call:

    // Provided by VK_NV_external_compute_queue
    VkResult vkCreateExternalComputeQueueNV(
        VkDevice                                    device,
        const VkExternalComputeQueueCreateInfoNV*   pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkExternalComputeQueueNV*                   pExternalQueue);

- `device` is the VkDevice that the external queue will be a part of.

- `pCreateInfo` is a pointer to a VkExternalComputeQueueCreateInfoNV structure specifying configuration info for creating the external queue.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

- `pExternalQueue` is a pointer to a VkExternalComputeQueueNV object that will be filled with the handle for the created external queue.

Valid Usage (Implicit)

- VUID-vkCreateExternalComputeQueueNV-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkCreateExternalComputeQueueNV-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkExternalComputeQueueCreateInfoNV structure

- VUID-vkCreateExternalComputeQueueNV-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateExternalComputeQueueNV-pExternalQueue-parameter
  `pExternalQueue` must be a valid pointer to a VkExternalComputeQueueNV handle

- VUID-vkCreateExternalComputeQueueNV-device-queuecount
  The device must have been created with at least `1` queue

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_TOO_MANY_OBJECTS

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

To destroy a previously created external compute queue call:

    // Provided by VK_NV_external_compute_queue
    void vkDestroyExternalComputeQueueNV(
        VkDevice                                    device,
        VkExternalComputeQueueNV                    externalQueue,
        const VkAllocationCallbacks*                pAllocator);

- `device` is the logical device that destroys the external queue.

- `externalQueue` is the VkExternalComputeQueueNV to destroy.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

Valid Usage (Implicit)

- VUID-vkDestroyExternalComputeQueueNV-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkDestroyExternalComputeQueueNV-externalQueue-parameter
  `externalQueue` must be a valid VkExternalComputeQueueNV handle

- VUID-vkDestroyExternalComputeQueueNV-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkDestroyExternalComputeQueueNV-externalQueue-parent
  `externalQueue` must have been created, allocated, or retrieved from `device`

To query the implementation-specific data that must be passed to compatible external APIs during their initialization process call:

    // Provided by VK_NV_external_compute_queue
    void vkGetExternalComputeQueueDataNV(
        VkExternalComputeQueueNV                    externalQueue,
        VkExternalComputeQueueDataParamsNV*         params,
        void*                                       pData);

- `externalQueue` is the VkExternalComputeQueueNV to query the data for.

- `params` is a pointer to a VkExternalComputeQueueDataParamsNV structure specifying parameters required for retrieval of the implementation-specific data.

- `pData` is a pointer to application-allocated memory in which the requested data will be returned.

Valid Usage

- VUID-vkGetExternalComputeQueueDataNV-pData-08134
  `pData` must be at least the size specified by the externalDataSize field in the VkPhysicalDeviceExternalComputeQueuePropertiesNV structure

Valid Usage (Implicit)

- VUID-vkGetExternalComputeQueueDataNV-externalQueue-parameter
  `externalQueue` must be a valid VkExternalComputeQueueNV handle

- VUID-vkGetExternalComputeQueueDataNV-params-parameter
  `params` must be a valid pointer to a VkExternalComputeQueueDataParamsNV structure

- VUID-vkGetExternalComputeQueueDataNV-pData-parameter
  `pData` must be a pointer value

The `VkExternalComputeQueueDeviceCreateInfoNV` structure is defined as:

    // Provided by VK_NV_external_compute_queue
    typedef struct VkExternalComputeQueueDeviceCreateInfoNV {
        VkStructureType    sType;
        const void*        pNext;
        uint32_t           reservedExternalQueues;
    } VkExternalComputeQueueDeviceCreateInfoNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `reservedExternalQueues` is the maximum number of external queues an application can create at once. This must be less than or equal to the `maxExternalQueues` value reported by VkPhysicalDeviceExternalComputeQueuePropertiesNV

Valid Usage (Implicit)

- VUID-VkExternalComputeQueueDeviceCreateInfoNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_EXTERNAL_COMPUTE_QUEUE_DEVICE_CREATE_INFO_NV

Structure Chaining

Extends the structure

  - VkDeviceCreateInfo

The `VkExternalComputeQueueCreateInfoNV` structure is defined as:

    // Provided by VK_NV_external_compute_queue
    typedef struct VkExternalComputeQueueCreateInfoNV {
        VkStructureType    sType;
        const void*        pNext;
        VkQueue            preferredQueue;
    } VkExternalComputeQueueCreateInfoNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `preferredQueue` is a `VkQueue` supporting graphics commands.

When creating a `VkExternalComputeQueueNV`, the `preferredQueue` field is a strong scheduling hint as to which `VkQueue` Vulkan graphics workloads will be submitted to with the expectation that execution will overlap with execution of work submitted by the external API.

Valid Usage (Implicit)

- VUID-VkExternalComputeQueueCreateInfoNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_EXTERNAL_COMPUTE_QUEUE_CREATE_INFO_NV

- VUID-VkExternalComputeQueueCreateInfoNV-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkExternalComputeQueueCreateInfoNV-preferredQueue-parameter
  `preferredQueue` must be a valid VkQueue handle

The `VkExternalComputeQueueDataParamsNV` structure is defined as:

    // Provided by VK_NV_external_compute_queue
    typedef struct VkExternalComputeQueueDataParamsNV {
        VkStructureType    sType;
        const void*        pNext;
        uint32_t           deviceIndex;
    } VkExternalComputeQueueDataParamsNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `deviceIndex` is the index of the device within a device group that the data is being queried for. This is ignored if device groups are not utilized.

Valid Usage (Implicit)

- VUID-VkExternalComputeQueueDataParamsNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_EXTERNAL_COMPUTE_QUEUE_DATA_PARAMS_NV

- VUID-VkExternalComputeQueueDataParamsNV-pNext-pNext
  `pNext` must be `NULL`

The `VkPhysicalDeviceExternalComputeQueuePropertiesNV` structure is defined as:

    // Provided by VK_NV_external_compute_queue
    typedef struct VkPhysicalDeviceExternalComputeQueuePropertiesNV {
        VkStructureType    sType;
        void*              pNext;
        uint32_t           externalDataSize;
        uint32_t           maxExternalQueues;
    } VkPhysicalDeviceExternalComputeQueuePropertiesNV;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `externalDataSize` is the minimum size of the memory allocation that applications can pass to vkGetExternalComputeQueueDataNV.

- `maxExternalQueues` is the maximum number of external queues that an application can create.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceExternalComputeQueuePropertiesNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_COMPUTE_QUEUE_PROPERTIES_NV

Structure Chaining

Extends the structure

  - VkPhysicalDeviceProperties2

## 53. Data graphs

Data graph pipelines encapsulate computational graphs that operate on whole resources (e.g. tensors). The graph operations that form these computational graphs are executed by graph processing engines.

### 53.1. Pipeline Creation

To create data graph pipelines, call:

    // Provided by VK_ARM_data_graph
    VkResult vkCreateDataGraphPipelinesARM(
        VkDevice                                    device,
        VkDeferredOperationKHR                      deferredOperation,
        VkPipelineCache                             pipelineCache,
        uint32_t                                    createInfoCount,
        const VkDataGraphPipelineCreateInfoARM*     pCreateInfos,
        const VkAllocationCallbacks*                pAllocator,
        VkPipeline*                                 pPipelines);

- `device` is the logical device that creates the data graph pipelines.

- `deferredOperation` is VK_NULL_HANDLE or the handle of a valid VkDeferredOperationKHR request deferral object for this command.

- `pipelineCache` is either VK_NULL_HANDLE, indicating that pipeline caching is disabled; or the handle of a valid pipeline cache object, in which case use of that cache is enabled for the duration of the command.

- `createInfoCount` is the length of the `pCreateInfos` and `pPipelines` arrays.

- `pCreateInfos` is a pointer to an array of VkDataGraphPipelineCreateInfoARM structures.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

- `pPipelines` is a pointer to an array of VkPipeline handles in which the resulting data graph pipelines objects are returned.

The implementation will create a pipeline in each element of `pPipelines` from the corresponding element of `pCreateInfos`. If the creation of any pipeline fails, that pipeline will be set to VK_NULL_HANDLE.

Valid Usage

- VUID-vkCreateDataGraphPipelinesARM-dataGraph-09760
  The `dataGraph` feature must be enabled

- VUID-vkCreateDataGraphPipelinesARM-device-09927
  `device` must support at least one queue family with the VK_QUEUE_DATA_GRAPH_BIT_ARM capability

- VUID-vkCreateDataGraphPipelinesARM-deferredOperation-09761
  `deferredOperation` must be VK_NULL_HANDLE

- VUID-vkCreateDataGraphPipelinesARM-deferredOperation-09916
  If `deferredOperation` is not VK_NULL_HANDLE, the `flags` member of elements of `pCreateInfos` must not include VK_PIPELINE_CREATE_EARLY_RETURN_ON_FAILURE_BIT

- VUID-vkCreateDataGraphPipelinesARM-pNext-09928
  If at least one of the VkDataGraphPipelineCreateInfoARM includes a VkDataGraphPipelineIdentifierCreateInfoARM structure in its `pNext` chain then `pipelineCache` must not be VK_NULL_HANDLE

- VUID-vkCreateDataGraphPipelinesARM-pipelineCache-09762
  If `pipelineCache` was created with VK_PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT, host access to `pipelineCache` must be externally synchronized

Valid Usage (Implicit)

- VUID-vkCreateDataGraphPipelinesARM-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkCreateDataGraphPipelinesARM-deferredOperation-parameter
  If `deferredOperation` is not VK_NULL_HANDLE, `deferredOperation` must be a valid VkDeferredOperationKHR handle

- VUID-vkCreateDataGraphPipelinesARM-pipelineCache-parameter
  If `pipelineCache` is not VK_NULL_HANDLE, `pipelineCache` must be a valid VkPipelineCache handle

- VUID-vkCreateDataGraphPipelinesARM-pCreateInfos-parameter
  `pCreateInfos` must be a valid pointer to an array of `createInfoCount` valid VkDataGraphPipelineCreateInfoARM structures

- VUID-vkCreateDataGraphPipelinesARM-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateDataGraphPipelinesARM-pPipelines-parameter
  `pPipelines` must be a valid pointer to an array of `createInfoCount` VkPipeline handles

- VUID-vkCreateDataGraphPipelinesARM-device-queuecount
  The device must have been created with at least `1` queue

- VUID-vkCreateDataGraphPipelinesARM-createInfoCount-arraylength
  `createInfoCount` must be greater than `0`

- VUID-vkCreateDataGraphPipelinesARM-deferredOperation-parent
  If `deferredOperation` is a valid handle, it must have been created, allocated, or retrieved from `device`

- VUID-vkCreateDataGraphPipelinesARM-pipelineCache-parent
  If `pipelineCache` is a valid handle, it must have been created, allocated, or retrieved from `device`

Return Codes

Success

  - VK_PIPELINE_COMPILE_REQUIRED_EXT

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkDataGraphPipelineCreateInfoARM` structure is defined as:

    // Provided by VK_ARM_data_graph
    typedef struct VkDataGraphPipelineCreateInfoARM {
        VkStructureType                              sType;
        const void*                                  pNext;
        VkPipelineCreateFlags2                       flags;
        VkPipelineLayout                             layout;
        uint32_t                                     resourceInfoCount;
        const VkDataGraphPipelineResourceInfoARM*    pResourceInfos;
    } VkDataGraphPipelineCreateInfoARM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask of VkPipelineCreateFlagBits2KHR specifying how the pipeline will be generated.

- `layout` is the description of binding locations used by both the pipeline and descriptor sets used with the pipeline.

- `resourceInfoCount` is the length of the `pResourceInfos` array.

- `pResourceInfos` is a pointer to an array of VkDataGraphPipelineResourceInfoARM structures.

Applications can create a data graph pipeline entirely from data present in a pipeline cache. This is done by including a VkDataGraphPipelineIdentifierCreateInfoARM structure in the `pNext` chain. If the required data is not found in the pipeline cache, creating the data graph pipeline is not possible and the implementation must fail as specified by VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT.

Applications can create a data graph pipeline without providing a pipeline cache or shader module by invoking one of the models provided by the implementation. This is done by including VkDataGraphPipelineBuiltinModelCreateInfoQCOM in the `pNext` chain.

When an identifier or built-in model is used to create a data graph pipeline, implementations may fail pipeline creation with VK_PIPELINE_COMPILE_REQUIRED for any reason.

The data graph engines for this pipeline can be selected by including a VkDataGraphProcessingEngineCreateInfoARM to the `pNext` chain of this structure. Otherwise, VK_PHYSICAL_DEVICE_DATA_GRAPH_PROCESSING_ENGINE_TYPE_DEFAULT_ARM will be used as the sole data graph engine.

The data graph operations that this pipeline uses must be supported for the data graph engines selected for this pipeline as retrieved by vkGetPhysicalDeviceQueueFamilyDataGraphPropertiesARM.

Valid Usage

- VUID-VkDataGraphPipelineCreateInfoARM-pNext-09977
  One and only one of the following structures must be included in the `pNext` chain:

  - VkDataGraphPipelineShaderModuleCreateInfoARM

  - VkDataGraphPipelineIdentifierCreateInfoARM

  - VkDataGraphPipelineBuiltinModelCreateInfoQCOM

  - VkDataGraphPipelineSingleNodeCreateInfoARM

- VUID-VkDataGraphPipelineCreateInfoARM-flags-09764
  `flags` may only contain VK_PIPELINE_CREATE_2_NO_PROTECTED_ACCESS_BIT_EXT, VK_PIPELINE_CREATE_2_PROTECTED_ACCESS_ONLY_BIT_EXT, VK_PIPELINE_CREATE_2_DISABLE_OPTIMIZATION_BIT, VK_PIPELINE_CREATE_2_DESCRIPTOR_BUFFER_BIT_EXT, VK_PIPELINE_CREATE_2_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT_KHR or VK_PIPELINE_CREATE_2_EARLY_RETURN_ON_FAILURE_BIT_KHR

- VUID-VkDataGraphPipelineCreateInfoARM-flags-09848
  If `flags` contains VK_PIPELINE_CREATE_2_PROTECTED_ACCESS_ONLY_BIT_EXT then a VkDataGraphPipelineNeuralStatisticsCreateInfoARM structure must not be included in the `pNext` chain.

- VUID-VkDataGraphPipelineCreateInfoARM-layout-09767
  `layout` must have been created with `pushConstantRangeCount` equal to 0 and `pPushConstantRanges` equal to `NULL`

- VUID-VkDataGraphPipelineCreateInfoARM-dataGraphUpdateAfterBind-09768
  If the `dataGraphUpdateAfterBind` feature is not enabled, `layout` must not use any VkDescriptorSetLayout object created with the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set

- VUID-VkDataGraphPipelineCreateInfoARM-dataGraphDescriptorBuffer-09885
  If the `dataGraphDescriptorBuffer` feature is not enabled, `flags` must not contain VK_PIPELINE_CREATE_2_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-VkDataGraphPipelineCreateInfoARM-layout-09769
  If a VkDataGraphPipelineShaderModuleCreateInfoARM structure is included in the `pNext` chain and a resource variable is declared in the shader module, the corresponding descriptor binding used to create `layout` must have a `descriptorType` that corresponds to the type of the resource variable

- VUID-VkDataGraphPipelineCreateInfoARM-None-11840
  If a VkDataGraphPipelineIdentifierCreateInfoARM or a VkDataGraphPipelineBuiltinModelCreateInfoQCOM structure is included in the `pNext` chain, then `flags` must contain VK_PIPELINE_CREATE_2_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT

- VUID-VkDataGraphPipelineCreateInfoARM-None-12363
  If a VkDataGraphPipelineIdentifierCreateInfoARM or a VkDataGraphPipelineBuiltinModelCreateInfoQCOM structure is included in the `pNext` chain, then `resourceInfoCount` must be 0

- VUID-VkDataGraphPipelineCreateInfoARM-resourceInfoCount-12364
  If `resourceInfoCount` is equal to 0, then `pResourceInfos` must equal `NULL`

- VUID-VkDataGraphPipelineCreateInfoARM-None-12365
  If neither a VkDataGraphPipelineIdentifierCreateInfoARM nor a VkDataGraphPipelineBuiltinModelCreateInfoQCOM structure are included in the `pNext` chain, then `resourceInfoCount` must be greater than 0

- VUID-VkDataGraphPipelineCreateInfoARM-dataGraphShaderModule-09886
  If the `dataGraphShaderModule` feature is not enabled, a VkDataGraphPipelineShaderModuleCreateInfoARM structure must not be included in the `pNext` chain

- VUID-VkDataGraphPipelineCreateInfoARM-layout-09934
  If a VkDataGraphPipelineShaderModuleCreateInfoARM structure is included in the `pNext` chain and an array resource variable is declared in the shader module, the corresponding descriptor binding used to create `layout` must have a `descriptorCount` that is greater than or equal to the length of the array

- VUID-VkDataGraphPipelineCreateInfoARM-pipelineCreationCacheControl-09871
  If the `pipelineCreationCacheControl` feature is not enabled, `flags` must not include VK_PIPELINE_CREATE_2_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT_KHR or VK_PIPELINE_CREATE_2_EARLY_RETURN_ON_FAILURE_BIT_KHR

- VUID-VkDataGraphPipelineCreateInfoARM-pSetLayouts-09770
  The descriptor set layouts in VkPipelineLayoutCreateInfo::`pSetLayouts` used to create `layout` must not include any VkDescriptorSetLayoutBinding whose descriptor type is VK_DESCRIPTOR_TYPE_MUTABLE_EXT

- VUID-VkDataGraphPipelineCreateInfoARM-pipelineProtectedAccess-09772
  If the `pipelineProtectedAccess` feature is not enabled, `flags` must not include VK_PIPELINE_CREATE_2_NO_PROTECTED_ACCESS_BIT_EXT or VK_PIPELINE_CREATE_2_PROTECTED_ACCESS_ONLY_BIT_EXT

- VUID-VkDataGraphPipelineCreateInfoARM-flags-09773
  `flags` must not include both VK_PIPELINE_CREATE_2_NO_PROTECTED_ACCESS_BIT_EXT and VK_PIPELINE_CREATE_2_PROTECTED_ACCESS_ONLY_BIT_EXT

- VUID-VkDataGraphPipelineCreateInfoARM-pNext-09804
  If the `pNext` chain includes an VkPipelineCreationFeedbackCreateInfo structure, then its `pipelineStageCreationFeedbackCount` must be 0

- VUID-VkDataGraphPipelineCreateInfoARM-pNext-09948
  If a VkDataGraphProcessingEngineCreateInfoARM structure is included in the `pNext` chain, each member of `pProcessingEngines` must be identical to an VkQueueFamilyDataGraphPropertiesARM::`engine` retrieved from vkGetPhysicalDeviceQueueFamilyDataGraphPropertiesARM with the `physicalDevice` that was used to create `device`

- VUID-VkDataGraphPipelineCreateInfoARM-pNext-09949
  If a VkDataGraphProcessingEngineCreateInfoARM structure is not included in the `pNext` chain, VK_PHYSICAL_DEVICE_DATA_GRAPH_PROCESSING_ENGINE_TYPE_DEFAULT_ARM must be set in an VkQueueFamilyDataGraphPropertiesARM::`engine` retrieved from vkGetPhysicalDeviceQueueFamilyDataGraphPropertiesARM with the `physicalDevice` that was used to create `device`

Valid Usage (Implicit)

- VUID-VkDataGraphPipelineCreateInfoARM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_CREATE_INFO_ARM

- VUID-VkDataGraphPipelineCreateInfoARM-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkDataGraphPipelineBuiltinModelCreateInfoQCOM, VkDataGraphPipelineCompilerControlCreateInfoARM, VkDataGraphPipelineIdentifierCreateInfoARM, VkDataGraphPipelineNeuralStatisticsCreateInfoARM, VkDataGraphPipelineOpticalFlowCreateInfoARM, VkDataGraphPipelineShaderModuleCreateInfoARM, VkDataGraphPipelineSingleNodeCreateInfoARM, VkDataGraphProcessingEngineCreateInfoARM, VkPipelineCreationFeedbackCreateInfo, or VkShaderModuleCreateInfo

- VUID-VkDataGraphPipelineCreateInfoARM-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkDataGraphPipelineCreateInfoARM-flags-parameter
  `flags` must be a valid combination of VkPipelineCreateFlagBits2 values

- VUID-VkDataGraphPipelineCreateInfoARM-layout-parameter
  `layout` must be a valid VkPipelineLayout handle

- VUID-VkDataGraphPipelineCreateInfoARM-pResourceInfos-parameter
  If `resourceInfoCount` is not `0`, `pResourceInfos` must be a valid pointer to an array of `resourceInfoCount` valid VkDataGraphPipelineResourceInfoARM structures

The `VkDataGraphPipelineShaderModuleCreateInfoARM` structure is defined as:

    // Provided by VK_ARM_data_graph
    typedef struct VkDataGraphPipelineShaderModuleCreateInfoARM {
        VkStructureType                          sType;
        const void*                              pNext;
        VkShaderModule                           module;
        const char*                              pName;
        const VkSpecializationInfo*              pSpecializationInfo;
        uint32_t                                 constantCount;
        const VkDataGraphPipelineConstantARM*    pConstants;
    } VkDataGraphPipelineShaderModuleCreateInfoARM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `module` is optionally a VkShaderModule object containing the description of the graph.

- `pName` is a pointer to a null-terminated UTF-8 string specifying the graph entry point name for this pipeline.

- `pSpecializationInfo` is a pointer to a VkSpecializationInfo structure as described in Specialization Constants, or `NULL`.

- `constantCount` is the length of the `pConstants` array.

- `pConstants` is a pointer to an array of VkDataGraphPipelineConstantARM structures.

If `module` is not VK_NULL_HANDLE, the pipeline’s graph is defined by `module`. If `module` is VK_NULL_HANDLE, the pipeline’s graph is defined by the chained VkShaderModuleCreateInfo.

Valid Usage

- VUID-VkDataGraphPipelineShaderModuleCreateInfoARM-dataGraphSpecializationConstants-09849
  If the `dataGraphSpecializationConstants` feature is not enabled then `pSpecializationInfo` must be `NULL` and `module` must not contain any `OpSpec*` instructions

- VUID-VkDataGraphPipelineShaderModuleCreateInfoARM-pName-09872
  `pName` must be the name of an `OpGraphEntryPointARM` in `module`

- VUID-VkDataGraphPipelineShaderModuleCreateInfoARM-pNext-09873
  If the `pNext` chain includes a VkShaderModuleCreateInfo structure, then `module` must be VK_NULL_HANDLE

- VUID-VkDataGraphPipelineShaderModuleCreateInfoARM-pNext-09874
  If the `pNext` chain does not include a VkShaderModuleCreateInfo structure, then `module` must be a valid VkShaderModule

Valid Usage (Implicit)

- VUID-VkDataGraphPipelineShaderModuleCreateInfoARM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_SHADER_MODULE_CREATE_INFO_ARM

- VUID-VkDataGraphPipelineShaderModuleCreateInfoARM-module-parameter
  If `module` is not VK_NULL_HANDLE, `module` must be a valid VkShaderModule handle

- VUID-VkDataGraphPipelineShaderModuleCreateInfoARM-pName-parameter
  `pName` must be a null-terminated UTF-8 string

- VUID-VkDataGraphPipelineShaderModuleCreateInfoARM-pSpecializationInfo-parameter
  If `pSpecializationInfo` is not `NULL`, `pSpecializationInfo` must be a valid pointer to a valid VkSpecializationInfo structure

- VUID-VkDataGraphPipelineShaderModuleCreateInfoARM-pConstants-parameter
  If `constantCount` is not `0`, and `pConstants` is not `NULL`, `pConstants` must be a valid pointer to an array of `constantCount` valid VkDataGraphPipelineConstantARM structures

Structure Chaining

Extends the structure

  - VkDataGraphPipelineCreateInfoARM

The `VkDataGraphPipelineIdentifierCreateInfoARM` structure is defined as:

    // Provided by VK_ARM_data_graph
    typedef struct VkDataGraphPipelineIdentifierCreateInfoARM {
        VkStructureType    sType;
        const void*        pNext;
        uint32_t           identifierSize;
        const uint8_t*     pIdentifier;
    } VkDataGraphPipelineIdentifierCreateInfoARM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `identifierSize` is the size in bytes of the identifier data accessible via `pIdentifier`.

- `pIdentifier` is a pointer to `identifierSize` bytes of data that describe the pipeline being created.

The `pIdentifier` can be retrieved from the device by calling vkGetDataGraphPipelinePropertiesARM and searching the results for a VkDataGraphPipelinePropertyQueryResultARM structure with `property` set to VK_DATA_GRAPH_PIPELINE_PROPERTY_IDENTIFIER_ARM.

Valid Usage (Implicit)

- VUID-VkDataGraphPipelineIdentifierCreateInfoARM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_IDENTIFIER_CREATE_INFO_ARM

- VUID-VkDataGraphPipelineIdentifierCreateInfoARM-pIdentifier-parameter
  `pIdentifier` must be a valid pointer to an array of `identifierSize` `uint8_t` values

- VUID-VkDataGraphPipelineIdentifierCreateInfoARM-identifierSize-arraylength
  `identifierSize` must be greater than `0`

Structure Chaining

Extends the structure

  - VkDataGraphPipelineCreateInfoARM

The `VkDataGraphPipelineBuiltinModelCreateInfoQCOM` structure is defined as:

    // Provided by VK_QCOM_data_graph_model
    typedef struct VkDataGraphPipelineBuiltinModelCreateInfoQCOM {
        VkStructureType                                        sType;
        const void*                                            pNext;
        const VkPhysicalDeviceDataGraphOperationSupportARM*    pOperation;
    } VkDataGraphPipelineBuiltinModelCreateInfoQCOM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `pOperation` is a VkPhysicalDeviceDataGraphOperationSupportARM specifying the built-in operation.

The `pipelineCache` is ignored for the creation of this pipeline.

Applications can specify arguments to the built-in operation named in `pOperation` with VkDataGraphPipelineCompilerControlCreateInfoARM.

Applications should verify that the `pVendorOptions`, `layout`, and other state included with this pipeline creation are compatible with the `pOperation`. Implementations may fail if any state is not compatible and return VK_PIPELINE_COMPILE_REQUIRED.

Note | Built-in models are defined by the provider of the model, therefore Vulkan does not define model compatibility. The application should refer to the provider of the built-in model for guidance on compatibility.

Valid Usage

- VUID-VkDataGraphPipelineBuiltinModelCreateInfoQCOM-pOperation-11842
  All members of `pOperation` must be identical to a VkQueueFamilyDataGraphPropertiesARM::`operation` retrieved from vkGetPhysicalDeviceQueueFamilyDataGraphPropertiesARM with the `physicalDevice` that was used to create `device` and paired in the retrieved results with a VkQueueFamilyDataGraphPropertiesARM::`engine` identical to an element of VkDataGraphProcessingEngineCreateInfoARM::`pProcessingEngines` provided in the `pNext` chain

Valid Usage (Implicit)

- VUID-VkDataGraphPipelineBuiltinModelCreateInfoQCOM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_BUILTIN_MODEL_CREATE_INFO_QCOM

- VUID-VkDataGraphPipelineBuiltinModelCreateInfoQCOM-pOperation-parameter
  `pOperation` must be a valid pointer to a valid VkPhysicalDeviceDataGraphOperationSupportARM structure

Structure Chaining

Extends the structure

  - VkDataGraphPipelineCreateInfoARM

The `VkDataGraphPipelineCompilerControlCreateInfoARM` structure is defined as:

    // Provided by VK_ARM_data_graph
    typedef struct VkDataGraphPipelineCompilerControlCreateInfoARM {
        VkStructureType    sType;
        const void*        pNext;
        const char*        pVendorOptions;
    } VkDataGraphPipelineCompilerControlCreateInfoARM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `pVendorOptions` is a null-terminated UTF-8 string specifying implementation-specific options that affect the creation of a data graph pipeline.

Valid Usage (Implicit)

- VUID-VkDataGraphPipelineCompilerControlCreateInfoARM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_COMPILER_CONTROL_CREATE_INFO_ARM

- VUID-VkDataGraphPipelineCompilerControlCreateInfoARM-pVendorOptions-parameter
  `pVendorOptions` must be a null-terminated UTF-8 string

Structure Chaining

Extends the structure

  - VkDataGraphPipelineCreateInfoARM

The `VkDataGraphPipelineConstantARM` structure is defined as:

    // Provided by VK_ARM_data_graph
    typedef struct VkDataGraphPipelineConstantARM {
        VkStructureType    sType;
        const void*        pNext;
        uint32_t           id;
        const void*        pConstantData;
    } VkDataGraphPipelineConstantARM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is a pointer to a structure extending this structure.

- `id` is the unique identifier of the graph constant this structure describes.

- `pConstantData` is a pointer to the data for this graph constant.

The size and layout of the data pointed to by `pConstantData` is specified by a specific structure in the `pNext` chain for each type of graph constant.

For graph constants of tensor type, the layout of the data is specified by a VkTensorDescriptionARM structure. The data must be laid out according to the following members of this structure:

- VkTensorDescriptionARM::`tiling`

- VkTensorDescriptionARM::`format`

- VkTensorDescriptionARM::`dimensionCount`

- VkTensorDescriptionARM::`pDimensions`

- VkTensorDescriptionARM::`pStrides`

The presence of a VkDataGraphPipelineConstantTensorSemiStructuredSparsityInfoARM structure in the `pNext` chain has no impact on the expected layout of the data pointed to by `pConstantData`.

Valid Usage

- VUID-VkDataGraphPipelineConstantARM-pNext-09775
  If the `pNext` chain of this structure includes one or more VkDataGraphPipelineConstantTensorSemiStructuredSparsityInfoARM structures then it must also include a VkTensorDescriptionARM structure

- VUID-VkDataGraphPipelineConstantARM-pNext-09776
  If the `pNext` chain of this structure includes one or more VkDataGraphPipelineConstantTensorSemiStructuredSparsityInfoARM structures then, for each structure, VkDataGraphPipelineConstantTensorSemiStructuredSparsityInfoARM::`dimension` must be less than VkTensorDescriptionARM::`dimensionCount`

- VUID-VkDataGraphPipelineConstantARM-pNext-09777
  If the `pNext` chain of this structure includes a VkDataGraphPipelineConstantTensorSemiStructuredSparsityInfoARM structure then, for each structure, VkTensorDescriptionARM::`pDimensions`[VkDataGraphPipelineConstantTensorSemiStructuredSparsityInfoARM::`dimension`] must be a multiple of VkDataGraphPipelineConstantTensorSemiStructuredSparsityInfoARM::`groupSize`

- VUID-VkDataGraphPipelineConstantARM-pNext-09870
  If the `pNext` chain of this structure includes multiple VkDataGraphPipelineConstantTensorSemiStructuredSparsityInfoARM structures then no two structures may have their VkDataGraphPipelineConstantTensorSemiStructuredSparsityInfoARM::`dimension` member set to the same value

- VUID-VkDataGraphPipelineConstantARM-id-09850
  If the `pNext` chain of this structure includes a VkTensorDescriptionARM structure, then its `usage` member must contain VK_TENSOR_USAGE_DATA_GRAPH_BIT_ARM

- VUID-VkDataGraphPipelineConstantARM-pNext-09917
  If the `pNext` chain of this structure includes a VkTensorDescriptionARM structure, then its `tiling` member must be VK_TENSOR_TILING_LINEAR_ARM

Valid Usage (Implicit)

- VUID-VkDataGraphPipelineConstantARM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_CONSTANT_ARM

- VUID-VkDataGraphPipelineConstantARM-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkDataGraphPipelineConstantTensorSemiStructuredSparsityInfoARM or VkTensorDescriptionARM

- VUID-VkDataGraphPipelineConstantARM-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique, with the exception of structures of type VkDataGraphPipelineConstantTensorSemiStructuredSparsityInfoARM

- VUID-VkDataGraphPipelineConstantARM-pConstantData-parameter
  `pConstantData` must be a pointer value

The `VkDataGraphPipelineConstantTensorSemiStructuredSparsityInfoARM` structure is defined as:

    // Provided by VK_ARM_data_graph with VK_ARM_tensors
    typedef struct VkDataGraphPipelineConstantTensorSemiStructuredSparsityInfoARM {
        VkStructureType    sType;
        const void*        pNext;
        uint32_t           dimension;
        uint32_t           zeroCount;
        uint32_t           groupSize;
    } VkDataGraphPipelineConstantTensorSemiStructuredSparsityInfoARM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `dimension` is the dimension of the tensor along which its data is sparse.

- `zeroCount` is the number of tensor elements that must be zero in every group of `groupSize` elements.

- `groupSize` is the number of tensor elements in a group.

Note | This extension does not provide applications with a way of knowing which combinations of `dimension`, `zeroCount`, and `groupSize` an implementation can take advantage of. Providing sparsity information for a graph constant is always valid and recommended, regardless of the specific combinations an implementation can take advantage of. When they can not take advantage of the sparsity information, implementations will ignore it and treat the data as dense.

Valid Usage (Implicit)

- VUID-VkDataGraphPipelineConstantTensorSemiStructuredSparsityInfoARM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_CONSTANT_TENSOR_SEMI_STRUCTURED_SPARSITY_INFO_ARM

Structure Chaining

Extends the structure

  - VkDataGraphPipelineConstantARM

The `VkDataGraphPipelineResourceInfoARM` structure is defined as:

    // Provided by VK_ARM_data_graph
    typedef struct VkDataGraphPipelineResourceInfoARM {
        VkStructureType    sType;
        const void*        pNext;
        uint32_t           descriptorSet;
        uint32_t           binding;
        uint32_t           arrayElement;
    } VkDataGraphPipelineResourceInfoARM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `descriptorSet` is the descriptor set number of the resource being described.

- `binding` is the binding number of the resource being described.

- `arrayElement` is the element in the resource array if `descriptorSet` and `binding` identifies an array of resources or `0` otherwise.

Valid Usage

- VUID-VkDataGraphPipelineResourceInfoARM-descriptorSet-09851
  If the `pNext` chain of this structure includes a VkTensorDescriptionARM structure, then its `usage` must contain VK_TENSOR_USAGE_DATA_GRAPH_BIT_ARM

- VUID-VkDataGraphPipelineResourceInfoARM-descriptorSet-09962
  If `descriptorSet` and `binding` identify an image resource or an array of image resources, then a VkDataGraphPipelineResourceInfoImageLayoutARM structure must be included in the `pNext` chain , unless the `unifiedImageLayouts` feature is enabled

Valid Usage (Implicit)

- VUID-VkDataGraphPipelineResourceInfoARM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_RESOURCE_INFO_ARM

- VUID-VkDataGraphPipelineResourceInfoARM-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkDataGraphPipelineResourceInfoImageLayoutARM or VkTensorDescriptionARM

- VUID-VkDataGraphPipelineResourceInfoARM-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

The `VkDataGraphPipelineResourceInfoImageLayoutARM` structure is defined as:

    // Provided by VK_ARM_data_graph_optical_flow
    typedef struct VkDataGraphPipelineResourceInfoImageLayoutARM {
        VkStructureType    sType;
        const void*        pNext;
        VkImageLayout      layout;
    } VkDataGraphPipelineResourceInfoImageLayoutARM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `layout` specifies the layout that the image subresource accessible from the view provided as a graph pipeline resource must be in at the time where the graph pipeline being created is dispatched.

Valid Usage (Implicit)

- VUID-VkDataGraphPipelineResourceInfoImageLayoutARM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_RESOURCE_INFO_IMAGE_LAYOUT_ARM

- VUID-VkDataGraphPipelineResourceInfoImageLayoutARM-layout-parameter
  `layout` must be a valid VkImageLayout value

Structure Chaining

Extends the structure

  - VkDataGraphPipelineResourceInfoARM

The `VkDataGraphPipelineSingleNodeCreateInfoARM` structure is defined as:

    // Provided by VK_ARM_data_graph_optical_flow
    typedef struct VkDataGraphPipelineSingleNodeCreateInfoARM {
        VkStructureType                                      sType;
        void*                                                pNext;
        VkDataGraphPipelineNodeTypeARM                       nodeType;
        uint32_t                                             connectionCount;
        const VkDataGraphPipelineSingleNodeConnectionARM*    pConnections;
    } VkDataGraphPipelineSingleNodeCreateInfoARM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `nodeType` is a VkDataGraphPipelineNodeTypeARM describing the type of this node.

- `connectionCount` is the length of the `pConnections` array.

- `pConnections` is a pointer to an array of `connectionCount` VkDataGraphPipelineSingleNodeConnectionARM structures.

Valid Usage

- VUID-VkDataGraphPipelineSingleNodeCreateInfoARM-nodeType-09963
  If `nodeType` is VK_DATA_GRAPH_PIPELINE_NODE_TYPE_OPTICAL_FLOW_ARM, then a VkDataGraphPipelineOpticalFlowCreateInfoARM structure must be included in the `pNext` chain of this structure

- VUID-VkDataGraphPipelineSingleNodeCreateInfoARM-nodeType-09978
  If `nodeType` is VK_DATA_GRAPH_PIPELINE_NODE_TYPE_OPTICAL_FLOW_ARM, then one and only VkDataGraphPipelineSingleNodeConnectionARM structure must be present in the `pConnections` array for each of the following values of its `connection` member:

  - VK_DATA_GRAPH_PIPELINE_NODE_CONNECTION_TYPE_OPTICAL_FLOW_INPUT_ARM

  - VK_DATA_GRAPH_PIPELINE_NODE_CONNECTION_TYPE_OPTICAL_FLOW_REFERENCE_ARM

  - VK_DATA_GRAPH_PIPELINE_NODE_CONNECTION_TYPE_OPTICAL_FLOW_FLOW_VECTOR_ARM

- VUID-VkDataGraphPipelineSingleNodeCreateInfoARM-nodeType-09979
  If `nodeType` is VK_DATA_GRAPH_PIPELINE_NODE_TYPE_OPTICAL_FLOW_ARM and VkDataGraphPipelineOpticalFlowCreateInfoARM::`hintGridSize` is not 0, then one and only VkDataGraphPipelineSingleNodeConnectionARM structure whose `connection` member is VK_DATA_GRAPH_PIPELINE_NODE_CONNECTION_TYPE_OPTICAL_FLOW_HINT_ARM must be present in the `pConnections` array

Valid Usage (Implicit)

- VUID-VkDataGraphPipelineSingleNodeCreateInfoARM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_SINGLE_NODE_CREATE_INFO_ARM

- VUID-VkDataGraphPipelineSingleNodeCreateInfoARM-nodeType-parameter
  `nodeType` must be a valid VkDataGraphPipelineNodeTypeARM value

- VUID-VkDataGraphPipelineSingleNodeCreateInfoARM-pConnections-parameter
  `pConnections` must be a valid pointer to an array of `connectionCount` valid VkDataGraphPipelineSingleNodeConnectionARM structures

- VUID-VkDataGraphPipelineSingleNodeCreateInfoARM-connectionCount-arraylength
  `connectionCount` must be greater than `0`

Structure Chaining

Extends the structure

  - VkDataGraphPipelineCreateInfoARM

Possible values of VkDataGraphPipelineNodeTypeARM, specifying the type of a data graph pipeline node, are:

    // Provided by VK_ARM_data_graph_optical_flow
    typedef enum VkDataGraphPipelineNodeTypeARM {
      // Provided by VK_ARM_data_graph_optical_flow
        VK_DATA_GRAPH_PIPELINE_NODE_TYPE_OPTICAL_FLOW_ARM = 1000631000,
    } VkDataGraphPipelineNodeTypeARM;

- VK_DATA_GRAPH_PIPELINE_NODE_TYPE_OPTICAL_FLOW_ARM corresponds to an optical flow node.

The `VkDataGraphPipelineSingleNodeConnectionARM` structure is defined as:

    // Provided by VK_ARM_data_graph_optical_flow
    typedef struct VkDataGraphPipelineSingleNodeConnectionARM {
        VkStructureType                             sType;
        void*                                       pNext;
        uint32_t                                    set;
        uint32_t                                    binding;
        VkDataGraphPipelineNodeConnectionTypeARM    connection;
    } VkDataGraphPipelineSingleNodeConnectionARM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `set` is the descriptor set number of the graph pipeline layout resource to be connected to this connection point.

- `binding` is the binding number of the graph pipeline layout resource to be connected to this connection point.

- `connection` is a VkDataGraphPipelineNodeConnectionTypeARM specifying the connection point to link to a graph pipeline layout resource.

Valid Usage (Implicit)

- VUID-VkDataGraphPipelineSingleNodeConnectionARM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_SINGLE_NODE_CONNECTION_ARM

- VUID-VkDataGraphPipelineSingleNodeConnectionARM-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkDataGraphPipelineSingleNodeConnectionARM-connection-parameter
  `connection` must be a valid VkDataGraphPipelineNodeConnectionTypeARM value

Possible values of VkDataGraphPipelineNodeConnectionTypeARM, specifying the connection points of a data graph pipeline node, are:

    // Provided by VK_ARM_data_graph_optical_flow
    typedef enum VkDataGraphPipelineNodeConnectionTypeARM {
      // Provided by VK_ARM_data_graph_optical_flow
        VK_DATA_GRAPH_PIPELINE_NODE_CONNECTION_TYPE_OPTICAL_FLOW_INPUT_ARM = 1000631000,
      // Provided by VK_ARM_data_graph_optical_flow
        VK_DATA_GRAPH_PIPELINE_NODE_CONNECTION_TYPE_OPTICAL_FLOW_REFERENCE_ARM = 1000631001,
      // Provided by VK_ARM_data_graph_optical_flow
        VK_DATA_GRAPH_PIPELINE_NODE_CONNECTION_TYPE_OPTICAL_FLOW_HINT_ARM = 1000631002,
      // Provided by VK_ARM_data_graph_optical_flow
        VK_DATA_GRAPH_PIPELINE_NODE_CONNECTION_TYPE_OPTICAL_FLOW_FLOW_VECTOR_ARM = 1000631003,
      // Provided by VK_ARM_data_graph_optical_flow
        VK_DATA_GRAPH_PIPELINE_NODE_CONNECTION_TYPE_OPTICAL_FLOW_COST_ARM = 1000631004,
    } VkDataGraphPipelineNodeConnectionTypeARM;

- VK_DATA_GRAPH_PIPELINE_NODE_CONNECTION_TYPE_OPTICAL_FLOW_INPUT_ARM specifies the connection point for the input image of an optical flow node.

- VK_DATA_GRAPH_PIPELINE_NODE_CONNECTION_TYPE_OPTICAL_FLOW_REFERENCE_ARM specifies the connection point for the input reference image of an optical flow node.

- VK_DATA_GRAPH_PIPELINE_NODE_CONNECTION_TYPE_OPTICAL_FLOW_HINT_ARM specifies the connection point for the optional external hint flow vector map of an optical flow node.

- VK_DATA_GRAPH_PIPELINE_NODE_CONNECTION_TYPE_OPTICAL_FLOW_FLOW_VECTOR_ARM specifies the connection point for the output flow vector map of an optical flow node.

- VK_DATA_GRAPH_PIPELINE_NODE_CONNECTION_TYPE_OPTICAL_FLOW_COST_ARM specifies the connection point for the optional output cost map of an optical flow node.

The `VkDataGraphPipelineNeuralStatisticsCreateInfoARM` structure is defined as:

    // Provided by VK_ARM_data_graph_neural_accelerator_statistics
    typedef struct VkDataGraphPipelineNeuralStatisticsCreateInfoARM {
        VkStructureType    sType;
        const void*        pNext;
        VkBool32           allowNeuralStatistics;
    } VkDataGraphPipelineNeuralStatisticsCreateInfoARM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `allowNeuralStatistics` specifies whether sessions for the newly created pipeline may enable neural statistics reporting.

Valid Usage (Implicit)

- VUID-VkDataGraphPipelineNeuralStatisticsCreateInfoARM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_NEURAL_STATISTICS_CREATE_INFO_ARM

Structure Chaining

Extends the structure

  - VkDataGraphPipelineCreateInfoARM

### 53.2. Sessions

Graph pipelines execute within data graph pipeline sessions that provide a context for their execution as well as binding points for the memory they need (e.g. transient storage).

Graph pipeline sessions are represented by `VkDataGraphPipelineSessionARM` handles:

    // Provided by VK_ARM_data_graph
    VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDataGraphPipelineSessionARM)

To create a data graph pipeline session, call

    // Provided by VK_ARM_data_graph
    VkResult vkCreateDataGraphPipelineSessionARM(
        VkDevice                                    device,
        const VkDataGraphPipelineSessionCreateInfoARM* pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkDataGraphPipelineSessionARM*              pSession);

- `device` is the logical device that creates the data graph pipeline session.

- `pCreateInfo` is a pointer to a VkDataGraphPipelineSessionCreateInfoARM structure.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

- `pSession` is a pointer to a VkDataGraphPipelineSessionARM handle in which the resulting data graph pipeline session object is returned.

Valid Usage (Implicit)

- VUID-vkCreateDataGraphPipelineSessionARM-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkCreateDataGraphPipelineSessionARM-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkDataGraphPipelineSessionCreateInfoARM structure

- VUID-vkCreateDataGraphPipelineSessionARM-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateDataGraphPipelineSessionARM-pSession-parameter
  `pSession` must be a valid pointer to a VkDataGraphPipelineSessionARM handle

- VUID-vkCreateDataGraphPipelineSessionARM-device-queuecount
  The device must have been created with at least `1` queue

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkDataGraphPipelineSessionCreateInfoARM` structure is defined as:

    // Provided by VK_ARM_data_graph
    typedef struct VkDataGraphPipelineSessionCreateInfoARM {
        VkStructureType                             sType;
        const void*                                 pNext;
        VkDataGraphPipelineSessionCreateFlagsARM    flags;
        VkPipeline                                  dataGraphPipeline;
    } VkDataGraphPipelineSessionCreateInfoARM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask of VkDataGraphPipelineSessionCreateFlagBitsARM describing additional parameters of the session.

- `dataGraphPipeline` is the VkPipeline handle of the data graph pipeline for which a session is being created.

Valid Usage

- VUID-VkDataGraphPipelineSessionCreateInfoARM-dataGraphPipeline-09781
  `dataGraphPipeline` must have been obtained via a call to vkCreateDataGraphPipelinesARM

- VUID-VkDataGraphPipelineSessionCreateInfoARM-protectedMemory-09782
  If the `protectedMemory` feature is not enabled, `flags` must not contain VK_DATA_GRAPH_PIPELINE_SESSION_CREATE_PROTECTED_BIT_ARM

- VUID-VkDataGraphPipelineSessionCreateInfoARM-pNext-09852
  A VkDataGraphPipelineSessionNeuralStatisticsCreateInfoARM structure may only be included in the `pNext` chain if and only if a VkDataGraphPipelineNeuralStatisticsCreateInfoARM structure whose `allowNeuralStatistics` member was VK_TRUE was included in the `pNext` chain of the VkDataGraphPipelineCreateInfoARM structure used to create `dataGraphPipeline`

- VUID-VkDataGraphPipelineSessionCreateInfoARM-flags-09853
  If `flags` contains VK_DATA_GRAPH_PIPELINE_SESSION_CREATE_PROTECTED_BIT_ARM then a VkDataGraphPipelineNeuralStatisticsCreateInfoARM structure must not be included in the `pNext` chain

Valid Usage (Implicit)

- VUID-VkDataGraphPipelineSessionCreateInfoARM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_SESSION_CREATE_INFO_ARM

- VUID-VkDataGraphPipelineSessionCreateInfoARM-pNext-pNext
  `pNext` must be `NULL` or a pointer to a valid instance of VkDataGraphPipelineSessionNeuralStatisticsCreateInfoARM

- VUID-VkDataGraphPipelineSessionCreateInfoARM-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkDataGraphPipelineSessionCreateInfoARM-flags-parameter
  `flags` must be a valid combination of VkDataGraphPipelineSessionCreateFlagBitsARM values

- VUID-VkDataGraphPipelineSessionCreateInfoARM-dataGraphPipeline-parameter
  `dataGraphPipeline` must be a valid VkPipeline handle

Bits which can be set in VkDataGraphPipelineSessionCreateInfoARM::`flags`, specifying additional parameters of a data graph pipeline session, are:

    // Provided by VK_ARM_data_graph
    // Flag bits for VkDataGraphPipelineSessionCreateFlagBitsARM
    typedef VkFlags64 VkDataGraphPipelineSessionCreateFlagBitsARM;
    static const VkDataGraphPipelineSessionCreateFlagBitsARM VK_DATA_GRAPH_PIPELINE_SESSION_CREATE_PROTECTED_BIT_ARM = 0x00000001ULL;
    // Provided by VK_ARM_data_graph_optical_flow
    static const VkDataGraphPipelineSessionCreateFlagBitsARM VK_DATA_GRAPH_PIPELINE_SESSION_CREATE_OPTICAL_FLOW_CACHE_BIT_ARM = 0x00000002ULL;

- VK_DATA_GRAPH_PIPELINE_SESSION_CREATE_PROTECTED_BIT_ARM specifies that the data graph pipeline session is backed by protected memory.

- VK_DATA_GRAPH_PIPELINE_SESSION_CREATE_OPTICAL_FLOW_CACHE_BIT_ARM specifies that the data graph pipeline session has a cache for optical flow operations. Enabling the cache is required for the implementation to use temporal hints.

    // Provided by VK_ARM_data_graph
    typedef VkFlags64 VkDataGraphPipelineSessionCreateFlagsARM;

`VkDataGraphPipelineSessionCreateFlagsARM` is a bitmask type for setting a mask of zero or more VkDataGraphPipelineSessionCreateFlagBitsARM.

    // Provided by VK_ARM_data_graph_neural_accelerator_statistics
    typedef struct VkDataGraphPipelineSessionNeuralStatisticsCreateInfoARM {
        VkStructureType                         sType;
        const void*                             pNext;
        VkNeuralAcceleratorStatisticsModeARM    mode;
    } VkDataGraphPipelineSessionNeuralStatisticsCreateInfoARM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `mode` is a VkNeuralAcceleratorStatisticsModeARM specifying the neural statistics mode for the session being created.

Valid Usage (Implicit)

- VUID-VkDataGraphPipelineSessionNeuralStatisticsCreateInfoARM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_SESSION_NEURAL_STATISTICS_CREATE_INFO_ARM

- VUID-VkDataGraphPipelineSessionNeuralStatisticsCreateInfoARM-mode-parameter
  `mode` must be a valid VkNeuralAcceleratorStatisticsModeARM value

Structure Chaining

Extends the structure

  - VkDataGraphPipelineSessionCreateInfoARM

The available values for VkNeuralAcceleratorStatisticsModeARM are:

    // Provided by VK_ARM_data_graph_neural_accelerator_statistics
    typedef enum VkNeuralAcceleratorStatisticsModeARM {
        VK_NEURAL_ACCELERATOR_STATISTICS_MODE_DISABLED_ARM = 0,
        VK_NEURAL_ACCELERATOR_STATISTICS_MODE_STATISTICS0_ARM = 1,
        VK_NEURAL_ACCELERATOR_STATISTICS_MODE_STATISTICS1_ARM = 2,
    } VkNeuralAcceleratorStatisticsModeARM;

- VK_NEURAL_ACCELERATOR_STATISTICS_MODE_DISABLED_ARM specifies that neural accelerator statistics are disabled.

- VK_NEURAL_ACCELERATOR_STATISTICS_MODE_STATISTICS0_ARM specifies the `statistics0` mode of operation.

- VK_NEURAL_ACCELERATOR_STATISTICS_MODE_STATISTICS1_ARM specifies the `statistics1` mode of operation.

To determine the bind point requirements for a data graph pipeline session, call:

    // Provided by VK_ARM_data_graph
    VkResult vkGetDataGraphPipelineSessionBindPointRequirementsARM(
        VkDevice                                    device,
        const VkDataGraphPipelineSessionBindPointRequirementsInfoARM* pInfo,
        uint32_t*                                   pBindPointRequirementCount,
        VkDataGraphPipelineSessionBindPointRequirementARM* pBindPointRequirements);

- `device` is the logical device that owns the data graph pipeline session.

- `pInfo` is a pointer to a VkDataGraphPipelineSessionBindPointRequirementsInfoARM structure containing parameters for the bind point requirements query.

- `pBindPointRequirementCount` is a pointer to an integer related to the number of bind point available or queried, as described below.

- `pBindPointRequirements` is either `NULL` or a pointer to an array of VkDataGraphPipelineSessionBindPointRequirementARM structures.

If `pBindPointRequirements` is `NULL`, then the number of bind points associated with the data graph pipeline session is returned in `pBindPointRequirementCount`. Otherwise, `pBindPointRequirementCount` must point to a variable set by the user to the number of elements in the `pBindPointRequirements` array, and on return the variable is overwritten with the number of structures actually written to `pBindPointRequirements`. If `pBindPointRequirementCount` is less than the number of bind points associated with the data graph pipeline session, at most `pBindPointRequirementCount` structures will be written, and VK_INCOMPLETE will be returned instead of VK_SUCCESS, to indicate that not all the required bind points were returned.

Valid Usage

- VUID-vkGetDataGraphPipelineSessionBindPointRequirementsARM-session-09783
  The `session` member of `pInfo` must have been created with `device`

Valid Usage (Implicit)

- VUID-vkGetDataGraphPipelineSessionBindPointRequirementsARM-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetDataGraphPipelineSessionBindPointRequirementsARM-pInfo-parameter
  `pInfo` must be a valid pointer to a valid VkDataGraphPipelineSessionBindPointRequirementsInfoARM structure

- VUID-vkGetDataGraphPipelineSessionBindPointRequirementsARM-pBindPointRequirementCount-parameter
  `pBindPointRequirementCount` must be a valid pointer to a `uint32_t` value

- VUID-vkGetDataGraphPipelineSessionBindPointRequirementsARM-pBindPointRequirements-parameter
  If the value referenced by `pBindPointRequirementCount` is not `0`, and `pBindPointRequirements` is not `NULL`, `pBindPointRequirements` must be a valid pointer to an array of `pBindPointRequirementCount` VkDataGraphPipelineSessionBindPointRequirementARM structures

Return Codes

Success

  - VK_INCOMPLETE

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

    // Provided by VK_ARM_data_graph
    typedef struct VkDataGraphPipelineSessionBindPointRequirementsInfoARM {
        VkStructureType                  sType;
        const void*                      pNext;
        VkDataGraphPipelineSessionARM    session;
    } VkDataGraphPipelineSessionBindPointRequirementsInfoARM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `session` is a VkDataGraphPipelineSessionARM specifying the data graph pipeline session whose bind point requirements are being queried.

Valid Usage (Implicit)

- VUID-VkDataGraphPipelineSessionBindPointRequirementsInfoARM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_SESSION_BIND_POINT_REQUIREMENTS_INFO_ARM

- VUID-VkDataGraphPipelineSessionBindPointRequirementsInfoARM-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkDataGraphPipelineSessionBindPointRequirementsInfoARM-session-parameter
  `session` must be a valid VkDataGraphPipelineSessionARM handle

    // Provided by VK_ARM_data_graph
    typedef struct VkDataGraphPipelineSessionBindPointRequirementARM {
        VkStructureType                               sType;
        void*                                         pNext;
        VkDataGraphPipelineSessionBindPointARM        bindPoint;
        VkDataGraphPipelineSessionBindPointTypeARM    bindPointType;
        uint32_t                                      numObjects;
    } VkDataGraphPipelineSessionBindPointRequirementARM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `bindPoint` is a VkDataGraphPipelineSessionBindPointARM specifying the data graph pipeline session bind point being required.

- `bindPointType` is a VkDataGraphPipelineSessionBindPointTypeARM specifying the type of object required for `bindPoint`.

- `numObjects` is the number of objects required for `bindPoint`.

Implementations must always return 1 for `numObjects` if `bindPoint` is one of the following bind points:

- VK_DATA_GRAPH_PIPELINE_SESSION_BIND_POINT_TRANSIENT_ARM

- VK_DATA_GRAPH_PIPELINE_SESSION_BIND_POINT_NEURAL_ACCELERATOR_STATISTICS_ARM

Valid Usage (Implicit)

- VUID-VkDataGraphPipelineSessionBindPointRequirementARM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_SESSION_BIND_POINT_REQUIREMENT_ARM

- VUID-VkDataGraphPipelineSessionBindPointRequirementARM-pNext-pNext
  `pNext` must be `NULL`

Possible values of VkDataGraphPipelineSessionBindPointARM, specifying the bind point of a data graph pipeline session, are:

    // Provided by VK_ARM_data_graph
    typedef enum VkDataGraphPipelineSessionBindPointARM {
        VK_DATA_GRAPH_PIPELINE_SESSION_BIND_POINT_TRANSIENT_ARM = 0,
      // Provided by VK_ARM_data_graph_optical_flow
        VK_DATA_GRAPH_PIPELINE_SESSION_BIND_POINT_OPTICAL_FLOW_CACHE_ARM = 1000631001,
      // Provided by VK_ARM_data_graph_neural_accelerator_statistics
        VK_DATA_GRAPH_PIPELINE_SESSION_BIND_POINT_NEURAL_ACCELERATOR_STATISTICS_ARM = 1000676000,
    } VkDataGraphPipelineSessionBindPointARM;

- VK_DATA_GRAPH_PIPELINE_SESSION_BIND_POINT_TRANSIENT_ARM corresponds to the transient data produced and consumed during one dispatch of a data graph pipeline in a data graph pipeline session. This transient data is never reused by subsequent dispatches and can safely be clobbered once a vkCmdDispatchDataGraphARM command completes execution.

- VK_DATA_GRAPH_PIPELINE_SESSION_BIND_POINT_OPTICAL_FLOW_CACHE_ARM corresponds to the cache for optical flow operations.

- VK_DATA_GRAPH_PIPELINE_SESSION_BIND_POINT_NEURAL_ACCELERATOR_STATISTICS_ARM corresponds to neural statistics data produced during one dispatch of a data graph pipeline in a data graph pipeline session.

Possible values of VkDataGraphPipelineSessionBindPointTypeARM, specifying the type of a bind point of a data graph pipeline session, are:

    // Provided by VK_ARM_data_graph
    typedef enum VkDataGraphPipelineSessionBindPointTypeARM {
        VK_DATA_GRAPH_PIPELINE_SESSION_BIND_POINT_TYPE_MEMORY_ARM = 0,
    } VkDataGraphPipelineSessionBindPointTypeARM;

- VK_DATA_GRAPH_PIPELINE_SESSION_BIND_POINT_TYPE_MEMORY_ARM corresponds to a memory allocation.

To determine the memory requirements for a data graph pipeline session, call:

    // Provided by VK_ARM_data_graph
    void vkGetDataGraphPipelineSessionMemoryRequirementsARM(
        VkDevice                                    device,
        const VkDataGraphPipelineSessionMemoryRequirementsInfoARM* pInfo,
        VkMemoryRequirements2*                      pMemoryRequirements);

- `device` is the logical device that owns the data graph pipeline session.

- `pInfo` is a pointer to a VkDataGraphPipelineSessionMemoryRequirementsInfoARM structure containing parameters for the memory requirements query.

- `pMemoryRequirements` is a pointer to a VkMemoryRequirements2 structure in which the memory requirements of the data graph pipeline session object are returned.

Valid Usage

- VUID-vkGetDataGraphPipelineSessionMemoryRequirementsARM-session-09950
  The `session` member of `pInfo` must have been created with `device`

- VUID-vkGetDataGraphPipelineSessionMemoryRequirementsARM-bindPoint-09784
  The `bindPoint` member of `pInfo` must have been returned as part of a VkDataGraphPipelineSessionBindPointRequirementARM whose `bindPointType` member is VK_DATA_GRAPH_PIPELINE_SESSION_BIND_POINT_TYPE_MEMORY_ARM by a prior call to vkGetDataGraphPipelineSessionBindPointRequirementsARM for the `session` member of `pInfo`

Valid Usage (Implicit)

- VUID-vkGetDataGraphPipelineSessionMemoryRequirementsARM-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetDataGraphPipelineSessionMemoryRequirementsARM-pInfo-parameter
  `pInfo` must be a valid pointer to a valid VkDataGraphPipelineSessionMemoryRequirementsInfoARM structure

- VUID-vkGetDataGraphPipelineSessionMemoryRequirementsARM-pMemoryRequirements-parameter
  `pMemoryRequirements` must be a valid pointer to a VkMemoryRequirements2 structure

The `VkDataGraphPipelineSessionMemoryRequirementsInfoARM` structure is defined as:

    // Provided by VK_ARM_data_graph
    typedef struct VkDataGraphPipelineSessionMemoryRequirementsInfoARM {
        VkStructureType                           sType;
        const void*                               pNext;
        VkDataGraphPipelineSessionARM             session;
        VkDataGraphPipelineSessionBindPointARM    bindPoint;
        uint32_t                                  objectIndex;
    } VkDataGraphPipelineSessionMemoryRequirementsInfoARM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `session` is the data graph pipeline session to query.

- `bindPoint` is the bind point of a data graph pipeline session for which memory requirements are being queried.

- `objectIndex` is the index of the object whose memory requirements are being queried.

Valid Usage

- VUID-VkDataGraphPipelineSessionMemoryRequirementsInfoARM-objectIndex-09855
  `objectIndex` must be less than the number of objects returned by vkGetDataGraphPipelineSessionBindPointRequirementsARM via VkDataGraphPipelineSessionBindPointRequirementARM::`numObjects` with VkDataGraphPipelineSessionMemoryRequirementsInfoARM::`bindPoint` equal to `bindPoint`

Valid Usage (Implicit)

- VUID-VkDataGraphPipelineSessionMemoryRequirementsInfoARM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_SESSION_MEMORY_REQUIREMENTS_INFO_ARM

- VUID-VkDataGraphPipelineSessionMemoryRequirementsInfoARM-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkDataGraphPipelineSessionMemoryRequirementsInfoARM-session-parameter
  `session` must be a valid VkDataGraphPipelineSessionARM handle

- VUID-VkDataGraphPipelineSessionMemoryRequirementsInfoARM-bindPoint-parameter
  `bindPoint` must be a valid VkDataGraphPipelineSessionBindPointARM value

To attach memory to a data graph pipeline session object, call:

    // Provided by VK_ARM_data_graph
    VkResult vkBindDataGraphPipelineSessionMemoryARM(
        VkDevice                                    device,
        uint32_t                                    bindInfoCount,
        const VkBindDataGraphPipelineSessionMemoryInfoARM* pBindInfos);

- `device` is the logical device that owns the data graph pipeline session and memory.

- `bindInfoCount` is the length of the `pBindInfos` array.

- `pBindInfos` is a pointer to an array of VkBindDataGraphPipelineSessionMemoryInfoARM structures describing graph pipeline sessions and memory to bind.

Valid Usage (Implicit)

- VUID-vkBindDataGraphPipelineSessionMemoryARM-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkBindDataGraphPipelineSessionMemoryARM-pBindInfos-parameter
  `pBindInfos` must be a valid pointer to an array of `bindInfoCount` valid VkBindDataGraphPipelineSessionMemoryInfoARM structures

- VUID-vkBindDataGraphPipelineSessionMemoryARM-bindInfoCount-arraylength
  `bindInfoCount` must be greater than `0`

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkBindDataGraphPipelineSessionMemoryInfoARM` structure is defined as:

    // Provided by VK_ARM_data_graph
    typedef struct VkBindDataGraphPipelineSessionMemoryInfoARM {
        VkStructureType                           sType;
        const void*                               pNext;
        VkDataGraphPipelineSessionARM             session;
        VkDataGraphPipelineSessionBindPointARM    bindPoint;
        uint32_t                                  objectIndex;
        VkDeviceMemory                            memory;
        VkDeviceSize                              memoryOffset;
    } VkBindDataGraphPipelineSessionMemoryInfoARM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `session` is the data graph pipeline session to be attached to memory.

- `bindPoint` is the data graph pipeline session bind point to which `memory` is to be attached.

- `objectIndex` is the index of the object for `bindPoint` at which `memory` is to be attached.

- `memory` is a VkDeviceMemory object describing the device memory to attach.

- `memoryOffset` is the start offset of the resion of `memory` which is to be bound to the data graph pipeline session.

Valid Usage

- VUID-VkBindDataGraphPipelineSessionMemoryInfoARM-session-09785
  `session` must not have been bound to a memory object for `bindPoint`

- VUID-VkBindDataGraphPipelineSessionMemoryInfoARM-bindPoint-09786
  `bindPoint` must have been returned as part of a VkDataGraphPipelineSessionBindPointRequirementARM whose `bindPointType` member is VK_DATA_GRAPH_PIPELINE_SESSION_BIND_POINT_TYPE_MEMORY_ARM by a prior call to vkGetDataGraphPipelineSessionMemoryRequirementsARM for `session`

- VUID-VkBindDataGraphPipelineSessionMemoryInfoARM-memoryOffset-09787
  `memoryOffset` must be less than the size of `memory`

- VUID-VkBindDataGraphPipelineSessionMemoryInfoARM-memory-09788
  `memory` must have been allocated using one of the memory types allowed in the `memoryTypeBits` member of the VkMemoryRequirements structure returned from a call to vkGetDataGraphPipelineSessionMemoryRequirementsARM with `session`

- VUID-VkBindDataGraphPipelineSessionMemoryInfoARM-memoryOffset-09789
  `memoryOffset` must be an integer multiple of the `alignment` member of the VkMemoryRequirements structure returned from a call to vkGetDataGraphPipelineSessionMemoryRequirementsARM with `session`

- VUID-VkBindDataGraphPipelineSessionMemoryInfoARM-size-09790
  The `size` member of the VkMemoryRequirements structure returned from a call to vkGetDataGraphPipelineSessionMemoryRequirementsARM with `session` must be less than or equal to the size of `memory` minus `memoryOffset`

- VUID-VkBindDataGraphPipelineSessionMemoryInfoARM-session-09791
  If `session` was created with the VK_DATA_GRAPH_PIPELINE_SESSION_CREATE_PROTECTED_BIT_ARM bit set, the session must be bound to a memory object allocated with a memory type that reports VK_MEMORY_PROPERTY_PROTECTED_BIT

- VUID-VkBindDataGraphPipelineSessionMemoryInfoARM-session-09792
  If `session` was created with the VK_DATA_GRAPH_PIPELINE_SESSION_CREATE_PROTECTED_BIT_ARM bit not set, the session must not be bound to a memory object allocated with a memory type that reports VK_MEMORY_PROPERTY_PROTECTED_BIT

- VUID-VkBindDataGraphPipelineSessionMemoryInfoARM-objectIndex-09805
  `objectIndex` must be less than the value of `numObjects` returned by vkGetDataGraphPipelineSessionBindPointRequirementsARM for `bindPoint`

Valid Usage (Implicit)

- VUID-VkBindDataGraphPipelineSessionMemoryInfoARM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_BIND_DATA_GRAPH_PIPELINE_SESSION_MEMORY_INFO_ARM

- VUID-VkBindDataGraphPipelineSessionMemoryInfoARM-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkBindDataGraphPipelineSessionMemoryInfoARM-session-parameter
  `session` must be a valid VkDataGraphPipelineSessionARM handle

- VUID-VkBindDataGraphPipelineSessionMemoryInfoARM-bindPoint-parameter
  `bindPoint` must be a valid VkDataGraphPipelineSessionBindPointARM value

- VUID-VkBindDataGraphPipelineSessionMemoryInfoARM-memory-parameter
  `memory` must be a valid VkDeviceMemory handle

- VUID-VkBindDataGraphPipelineSessionMemoryInfoARM-commonparent
  Both of `memory`, and `session` must have been created, allocated, or retrieved from the same VkDevice

To destroy a data graph pipeline session, call:

    // Provided by VK_ARM_data_graph
    void vkDestroyDataGraphPipelineSessionARM(
        VkDevice                                    device,
        VkDataGraphPipelineSessionARM               session,
        const VkAllocationCallbacks*                pAllocator);

- `device` is the logical device that destroys the data graph pipeline session.

- `session` is the handle of the data graph pipeline session to destroy.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

Valid Usage

- VUID-vkDestroyDataGraphPipelineSessionARM-session-09793
  All submitted commands that refer to `session` must have completed execution

- VUID-vkDestroyDataGraphPipelineSessionARM-session-09794
  If `VkAllocationCallbacks` were provided when `session` was created, a compatible set of callbacks must be provided here

- VUID-vkDestroyDataGraphPipelineSessionARM-session-09795
  If no `VkAllocationCallbacks` were provided when `session` was created, `pAllocator` must be `NULL`

Valid Usage (Implicit)

- VUID-vkDestroyDataGraphPipelineSessionARM-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkDestroyDataGraphPipelineSessionARM-session-parameter
  `session` must be a valid VkDataGraphPipelineSessionARM handle

- VUID-vkDestroyDataGraphPipelineSessionARM-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkDestroyDataGraphPipelineSessionARM-session-parent
  `session` must have been created, allocated, or retrieved from `device`

Host Synchronization

- Host access to `session` must be externally synchronized

### 53.3. Dispatch

To record a data graph pipeline dispatch, call:

    // Provided by VK_ARM_data_graph
    void vkCmdDispatchDataGraphARM(
        VkCommandBuffer                             commandBuffer,
        VkDataGraphPipelineSessionARM               session,
        const VkDataGraphPipelineDispatchInfoARM*   pInfo);

- `commandBuffer` is the command buffer into which the command will be recorded.

- `session` is the VkDataGraphPipelineSessionARM that data graph pipeline being dispatched will use.

- `pInfo` is `NULL` or a pointer to a VkDataGraphPipelineDispatchInfoARM structure.

Valid Usage

- VUID-vkCmdDispatchDataGraphARM-session-09796
  For each of the session bind point requirements returned by vkGetDataGraphPipelineSessionBindPointRequirementsARM for `session`, VkDataGraphPipelineSessionBindPointRequirementARM::`numObjects` objects must have been bound to `session`

- VUID-vkCmdDispatchDataGraphARM-dataGraphPipeline-09951
  The VkPipeline bound to the pipeline bind point used by this command must be identical to the `dataGraphPipeline` used to create `session`

- VUID-vkCmdDispatchDataGraphARM-None-09797
  For each set n that is statically used by a bound data graph pipeline, a descriptor set must have been bound to n at the same pipeline bind point, with a VkPipelineLayout that is compatible for set n, with the VkPipelineLayout used to create the current VkPipeline, as described in Pipeline Layout Compatibility

- VUID-vkCmdDispatchDataGraphARM-None-09935
  Descriptors in each bound descriptor set, specified via vkCmdBindDescriptorSets, must be valid as described by descriptor validity if they are statically used by the VkPipeline bound to the pipeline bind point used by this command and the bound VkPipeline was not created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDispatchDataGraphARM-None-09936
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdBindDescriptorSets, the bound VkPipeline must have been created without VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDispatchDataGraphARM-None-09937
  Descriptors in bound descriptor buffers, specified via vkCmdSetDescriptorBufferOffsetsEXT, must be valid if they are dynamically used by the VkPipeline bound to the pipeline bind point used by this command and the bound VkPipeline was created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDispatchDataGraphARM-None-09938
  If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdSetDescriptorBufferOffsetsEXT, the bound VkPipeline must have been created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

- VUID-vkCmdDispatchDataGraphARM-None-09939
  If a descriptor is dynamically used with a VkPipeline created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident

- VUID-vkCmdDispatchDataGraphARM-None-09799
  A valid data graph pipeline must be bound to the VK_PIPELINE_BIND_POINT_DATA_GRAPH_ARM pipeline bind point used by this command

- VUID-vkCmdDispatchDataGraphARM-pDescription-09930
  If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the underlying VkTensorARM object must have been created with a VkTensorCreateInfoARM::`pDescription` whose `usage` member contained VK_TENSOR_USAGE_DATA_GRAPH_BIT_ARM

- VUID-vkCmdDispatchDataGraphARM-pipeline-09940
  If the VkPipeline bound to the pipeline bind point used by this command was created with a VkDataGraphProcessingEngineCreateInfoARM structure in the `pNext` chain of VkDataGraphPipelineCreateInfoARM that included a foreign data graph processing engine in its `pProcessingEngines` member, then all VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptors accessed as a result of this command must be VkTensorARM objects that have been bound to memory allocated with VkExportMemoryAllocateInfo::`handleTypes` with set bits that are a subset of the bits in VkQueueFamilyDataGraphProcessingEnginePropertiesARM::`foreignMemoryHandleTypes` structure queried via vkGetPhysicalDeviceQueueFamilyDataGraphProcessingEnginePropertiesARM with a `queueFamilyIndex` matching the one the command pool used to create `commandBuffer` was created for and an identical `engineType`, for all the foreign data graph processing engines that were part of the VkDataGraphProcessingEngineCreateInfoARM used to create the VkPipeline

- VUID-vkCmdDispatchDataGraphARM-pNext-09952
  If the VkPipeline bound to the pipeline bind point used by this command was created with a VkDataGraphProcessingEngineCreateInfoARM structure in the `pNext` chain of VkDataGraphPipelineCreateInfoARM that included a foreign data graph processing engine in its `pProcessingEngines` member, then all `session` bound memory must have been allocated with VkExportMemoryAllocateInfo::`handleTypes` with set bits that are a subset of the bits in VkQueueFamilyDataGraphProcessingEnginePropertiesARM::`foreignMemoryHandleTypes` structure queried via vkGetPhysicalDeviceQueueFamilyDataGraphProcessingEnginePropertiesARM with a `queueFamilyIndex` matching the one the command pool used to create `commandBuffer` was created for and an identical `engineType`, for all the foreign data graph processing engines that were part of the VkDataGraphProcessingEngineCreateInfoARM used to create the VkPipeline

- VUID-vkCmdDispatchDataGraphARM-commandBuffer-09800
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, any resource accessed by bound data graph pipelines must not be a protected resource

- VUID-vkCmdDispatchDataGraphARM-commandBuffer-09801
  If `commandBuffer` is a protected command buffer and `protectedNoFault` is not supported, any resource written to by the `VkPipeline` object bound to the bind point used by this command must not be an unprotected resource

- VUID-vkCmdDispatchDataGraphARM-commandBuffer-09941
  All the operations used by the bound data graph pipeline must be supported on the queue family for which the command pool out of which `commandBuffer` was allocated, as reported by vkGetPhysicalDeviceQueueFamilyDataGraphPropertiesARM

- VUID-vkCmdDispatchDataGraphARM-pInfo-09964
  If `pInfo` is not `NULL` and its `pNext` chain includes a VkDataGraphPipelineOpticalFlowDispatchInfoARM structure, then the `flags` member of that latter structure must not contain VK_DATA_GRAPH_OPTICAL_FLOW_EXECUTE_INPUT_UNCHANGED_BIT_ARM, VK_DATA_GRAPH_OPTICAL_FLOW_EXECUTE_REFERENCE_UNCHANGED_BIT_ARM, VK_DATA_GRAPH_OPTICAL_FLOW_EXECUTE_INPUT_IS_PREVIOUS_REFERENCE_BIT_ARM, or VK_DATA_GRAPH_OPTICAL_FLOW_EXECUTE_REFERENCE_IS_PREVIOUS_INPUT_BIT_ARM if `session` was not created with VK_DATA_GRAPH_PIPELINE_SESSION_CREATE_OPTICAL_FLOW_CACHE_BIT_ARM

- VUID-vkCmdDispatchDataGraphARM-nodeType-09980
  If the VkPipeline bound to the VK_PIPELINE_BIND_POINT_DATA_GRAPH_ARM pipeline bind point was not created with a VkDataGraphPipelineSingleNodeCreateInfoARM structure whose `nodeType` member is VK_DATA_GRAPH_PIPELINE_NODE_TYPE_OPTICAL_FLOW_ARM included in the `pNext` chain of VkDataGraphPipelineCreateInfoARM, then a VkDataGraphPipelineOpticalFlowDispatchInfoARM structure must not be included in the `pNext` chain of `pInfo`

- VUID-vkCmdDispatchDataGraphARM-nodeType-09981
  If the VkPipeline bound to the VK_PIPELINE_BIND_POINT_DATA_GRAPH_ARM pipeline bind point was created with a VkDataGraphPipelineSingleNodeCreateInfoARM structure whose `nodeType` member is VK_DATA_GRAPH_PIPELINE_NODE_TYPE_OPTICAL_FLOW_ARM included in the `pNext` chain of VkDataGraphPipelineCreateInfoARM, then all image subresources that are accessed via a connection point in VkDataGraphPipelineSingleNodeCreateInfoARM::`pConnections` must be in the layout specified by the `layout` member of the VkDataGraphPipelineResourceInfoImageLayoutARM that extends the VkDataGraphPipelineResourceInfoARM structure whose `descriptorSet` and `binding` members match the `set` and `binding` members of the VkDataGraphPipelineSingleNodeConnectionARM structure for the connection point , unless the `unifiedImageLayouts` feature is enabled, in which case they may be in the VK_IMAGE_LAYOUT_GENERAL layout

Valid Usage (Implicit)

- VUID-vkCmdDispatchDataGraphARM-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdDispatchDataGraphARM-session-parameter
  `session` must be a valid VkDataGraphPipelineSessionARM handle

- VUID-vkCmdDispatchDataGraphARM-pInfo-parameter
  If `pInfo` is not `NULL`, `pInfo` must be a valid pointer to a valid VkDataGraphPipelineDispatchInfoARM structure

- VUID-vkCmdDispatchDataGraphARM-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdDispatchDataGraphARM-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_DATA_GRAPH_BIT_ARM operations

- VUID-vkCmdDispatchDataGraphARM-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdDispatchDataGraphARM-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdDispatchDataGraphARM-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdDispatchDataGraphARM-commonparent
  Both of `commandBuffer`, and `session` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Outside | VK_QUEUE_DATA_GRAPH_BIT_ARM | Action

Conditional Rendering

vkCmdDispatchDataGraphARM is affected by conditional rendering

The VkDataGraphPipelineDispatchInfoARM structure is defined as:

    // Provided by VK_ARM_data_graph
    typedef struct VkDataGraphPipelineDispatchInfoARM {
        VkStructureType                        sType;
        void*                                  pNext;
        VkDataGraphPipelineDispatchFlagsARM    flags;
    } VkDataGraphPipelineDispatchInfoARM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask of VkDataGraphPipelineDispatchFlagBitsARM describing additional parameters of the dispatch.

Valid Usage (Implicit)

- VUID-VkDataGraphPipelineDispatchInfoARM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_DISPATCH_INFO_ARM

- VUID-VkDataGraphPipelineDispatchInfoARM-pNext-pNext
  `pNext` must be `NULL` or a pointer to a valid instance of VkDataGraphPipelineOpticalFlowDispatchInfoARM

- VUID-VkDataGraphPipelineDispatchInfoARM-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkDataGraphPipelineDispatchInfoARM-flags-zerobitmask
  `flags` must be `0`

Bits which can be set in VkDataGraphPipelineDispatchInfoARM::`flags`, specifying additional parameters of a data graph pipeline dispatch, are:

    // Provided by VK_ARM_data_graph
    // Flag bits for VkDataGraphPipelineDispatchFlagBitsARM
    typedef VkFlags64 VkDataGraphPipelineDispatchFlagBitsARM;

    // Provided by VK_ARM_data_graph
    typedef VkFlags64 VkDataGraphPipelineDispatchFlagsARM;

`VkDataGraphPipelineDispatchFlagsARM` is a bitmask type for setting a mask of zero or more VkDataGraphPipelineDispatchFlagBitsARM.

### 53.4. Properties

To query the properties of a data graph pipeline that can be obtained, call:

    // Provided by VK_ARM_data_graph
    VkResult vkGetDataGraphPipelineAvailablePropertiesARM(
        VkDevice                                    device,
        const VkDataGraphPipelineInfoARM*           pPipelineInfo,
        uint32_t*                                   pPropertiesCount,
        VkDataGraphPipelinePropertyARM*             pProperties);

- `device` is the logical device that created the data graph pipeline.

- `pPipelineInfo` is a VkDataGraphPipelineInfoARM that describes the VkPipeline being queried.

- `pPropertiesCount` is a pointer to an integer related to the number of properties available or queried, as described below.

- `pProperties` is either `NULL` or a pointer to an array of VkDataGraphPipelinePropertyARM enums.

If `pProperties` is `NULL`, then the number of properties associated with the data graph pipeline is returned in `pPropertiesCount`. Otherwise, `pPropertiesCount` must point to a variable set by the user to the number of elements in the `pProperties` array, and on return the variable is overwritten with the number of enums actually written to `pProperties`. If `pPropertiesCount` is less than the number of properties associated with the data graph pipeline, at most `pPropertiesCount` structures will be written, and VK_INCOMPLETE will be returned instead of VK_SUCCESS, to indicate that not all the available properties were returned.

Valid Usage

- VUID-vkGetDataGraphPipelineAvailablePropertiesARM-dataGraphPipeline-09888
  The `dataGraphPipeline` member of `pPipelineInfo` must have been created with `device`

Valid Usage (Implicit)

- VUID-vkGetDataGraphPipelineAvailablePropertiesARM-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetDataGraphPipelineAvailablePropertiesARM-pPipelineInfo-parameter
  `pPipelineInfo` must be a valid pointer to a valid VkDataGraphPipelineInfoARM structure

- VUID-vkGetDataGraphPipelineAvailablePropertiesARM-pPropertiesCount-parameter
  `pPropertiesCount` must be a valid pointer to a `uint32_t` value

- VUID-vkGetDataGraphPipelineAvailablePropertiesARM-pProperties-parameter
  If the value referenced by `pPropertiesCount` is not `0`, and `pProperties` is not `NULL`, `pProperties` must be a valid pointer to an array of `pPropertiesCount` VkDataGraphPipelinePropertyARM values

Return Codes

Success

  - VK_INCOMPLETE

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

To query properties of a data graph pipeline, call:

    // Provided by VK_ARM_data_graph
    VkResult vkGetDataGraphPipelinePropertiesARM(
        VkDevice                                    device,
        const VkDataGraphPipelineInfoARM*           pPipelineInfo,
        uint32_t                                    propertiesCount,
        VkDataGraphPipelinePropertyQueryResultARM*  pProperties);

- `device` is the logical device that created the data graph pipeline.

- `pPipelineInfo` is a VkDataGraphPipelineInfoARM that describes the VkPipeline being queried.

- `propertiesCount` is the length of the `pProperties` array.

- `pProperties` is a pointer to an array of VkDataGraphPipelinePropertyQueryResultARM structures.

Valid Usage

- VUID-vkGetDataGraphPipelinePropertiesARM-dataGraphPipeline-09802
  The `dataGraphPipeline` member of `pPipelineInfo` must have been created with `device`

- VUID-vkGetDataGraphPipelinePropertiesARM-pProperties-09889
  There must not be two or more structures in the `pProperties` array with the same VkDataGraphPipelinePropertyQueryResultARM::`property`

- VUID-vkGetDataGraphPipelinePropertiesARM-pProperties-09856
  If `pProperties` includes a VkDataGraphPipelinePropertyQueryResultARM whose `property` member is VK_DATA_GRAPH_PIPELINE_PROPERTY_NEURAL_ACCELERATOR_STATISTICS_INFO_ARM then `dataGraphPipeline` must have been created with a VkDataGraphPipelineNeuralStatisticsCreateInfoARM whose `allowNeuralStatistics` member was VK_TRUE included in the `pNext` chain of VkDataGraphPipelineCreateInfoARM.

Valid Usage (Implicit)

- VUID-vkGetDataGraphPipelinePropertiesARM-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetDataGraphPipelinePropertiesARM-pPipelineInfo-parameter
  `pPipelineInfo` must be a valid pointer to a valid VkDataGraphPipelineInfoARM structure

- VUID-vkGetDataGraphPipelinePropertiesARM-pProperties-parameter
  `pProperties` must be a valid pointer to an array of `propertiesCount` VkDataGraphPipelinePropertyQueryResultARM structures

- VUID-vkGetDataGraphPipelinePropertiesARM-propertiesCount-arraylength
  `propertiesCount` must be greater than `0`

Return Codes

Success

  - VK_INCOMPLETE

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkDataGraphPipelineInfoARM` structure is defined as:

    // Provided by VK_ARM_data_graph
    typedef struct VkDataGraphPipelineInfoARM {
        VkStructureType    sType;
        const void*        pNext;
        VkPipeline         dataGraphPipeline;
    } VkDataGraphPipelineInfoARM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `dataGraphPipeline` is a VkPipeline handle.

Valid Usage

- VUID-VkDataGraphPipelineInfoARM-dataGraphPipeline-09803
  `dataGraphPipeline` must have been created with vkCreateDataGraphPipelinesARM

Valid Usage (Implicit)

- VUID-VkDataGraphPipelineInfoARM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_INFO_ARM

- VUID-VkDataGraphPipelineInfoARM-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkDataGraphPipelineInfoARM-dataGraphPipeline-parameter
  `dataGraphPipeline` must be a valid VkPipeline handle

The `VkDataGraphPipelinePropertyQueryResultARM` structure is defined as:

    // Provided by VK_ARM_data_graph
    typedef struct VkDataGraphPipelinePropertyQueryResultARM {
        VkStructureType                   sType;
        void*                             pNext;
        VkDataGraphPipelinePropertyARM    property;
        VkBool32                          isText;
        size_t                            dataSize;
        void*                             pData;
    } VkDataGraphPipelinePropertyQueryResultARM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `property` is a VkDataGraphPipelinePropertyARM specifying the property of the data graph pipeline being queried.

- `isText` specifies whether the returned data is text or opaque data. If `isText` is VK_TRUE then the data returned in `pData` is text and guaranteed to be a null-terminated UTF-8 string.

- `dataSize` is an integer related to the size, in bytes, of the data, as described below.

- `pData` is either `NULL` or a pointer to a block of memory into which the implementation will return the property data.

If `pData` is `NULL`, then the size, in bytes, of the property data is returned in `dataSize`. Otherwise, `dataSize` must be the size of the buffer, in bytes, pointed to by `pData` and on return `dataSize` is overwritten with the number of bytes of data actually written to `pData` including any trailing NUL character. If `dataSize` is less than the size, in bytes, of the property data, at most `dataSize` bytes of data will be written to `pData`, and VK_INCOMPLETE will be returned by vkGetDataGraphPipelinePropertiesARM instead of VK_SUCCESS, to indicate that not all the available property data was returned. If `isText` is VK_TRUE and `pData` is not `NULL` and `dataSize` is not zero, the last byte written to `pData` will be a NUL character.

Valid Usage (Implicit)

- VUID-VkDataGraphPipelinePropertyQueryResultARM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_PROPERTY_QUERY_RESULT_ARM

- VUID-VkDataGraphPipelinePropertyQueryResultARM-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkDataGraphPipelinePropertyQueryResultARM-property-parameter
  `property` must be a valid VkDataGraphPipelinePropertyARM value

- VUID-VkDataGraphPipelinePropertyQueryResultARM-pData-parameter
  If `dataSize` is not `0`, and `pData` is not `NULL`, `pData` must be a valid pointer to an array of `dataSize` bytes

Possible values of VkDataGraphPipelinePropertyQueryResultARM::`property`, specifying the property of the data graph pipeline being queried, are:

    // Provided by VK_ARM_data_graph
    typedef enum VkDataGraphPipelinePropertyARM {
        VK_DATA_GRAPH_PIPELINE_PROPERTY_CREATION_LOG_ARM = 0,
        VK_DATA_GRAPH_PIPELINE_PROPERTY_IDENTIFIER_ARM = 1,
      // Provided by VK_ARM_data_graph_neural_accelerator_statistics
        VK_DATA_GRAPH_PIPELINE_PROPERTY_NEURAL_ACCELERATOR_DEBUG_DATABASE_ARM = 1000676000,
      // Provided by VK_ARM_data_graph_neural_accelerator_statistics
        VK_DATA_GRAPH_PIPELINE_PROPERTY_NEURAL_ACCELERATOR_STATISTICS_INFO_ARM = 1000676001,
    } VkDataGraphPipelinePropertyARM;

- VK_DATA_GRAPH_PIPELINE_PROPERTY_CREATION_LOG_ARM corresponds to a human-readable log produced during the creation of a data graph pipeline. It may contain information about errors encountered during the creation or other information generally useful for debugging. This property can be queried for any data graph pipeline.

- VK_DATA_GRAPH_PIPELINE_PROPERTY_IDENTIFIER_ARM corresponds to an opaque identifier for the data graph pipeline. It can be used to create a graph pipeline from a pipeline cache without the need to provide any creation data beyond the identifier, using a VkDataGraphPipelineIdentifierCreateInfoARM structure.

- VK_DATA_GRAPH_PIPELINE_PROPERTY_NEURAL_ACCELERATOR_DEBUG_DATABASE_ARM corresponds to opaque debug information that can be queried for any data graph pipeline.

- VK_DATA_GRAPH_PIPELINE_PROPERTY_NEURAL_ACCELERATOR_STATISTICS_INFO_ARM corresponds to opaque information about neural statistics that can be queried for any data graph pipeline that was created with a VkDataGraphPipelineSessionNeuralStatisticsCreateInfoARM structure whose `allowNeuralStatistics` was VK_TRUE included in the `pNext` chain of VkDataGraphPipelineCreateInfoARM.

### 53.5. Processing Engines

Data graph pipelines execute on one or more data graph processing engines. Each queue family of a VkPhysicalDevice that supports VK_QUEUE_DATA_GRAPH_BIT_ARM may provide access to processing engines. Processing engines may be foreign. Foreign processing engines require the use of external memory and semaphores to exchange data and synchronize with data graph pipelines that target them. Each processing engine may support a selection of graph operations. There exists a default processing engine that enables implementations to support some operations without tying support to specific processing engines. This allows implementations to avoid being specific about the processing engines that they use internally or to remove the necessity for applications to choose the specific processing engine used to execute a given set of operations.

To query the properties of a data graph processing engine for a specific queue family of a physical device, call:

    // Provided by VK_ARM_data_graph
    void vkGetPhysicalDeviceQueueFamilyDataGraphProcessingEnginePropertiesARM(
        VkPhysicalDevice                            physicalDevice,
        const VkPhysicalDeviceQueueFamilyDataGraphProcessingEngineInfoARM* pQueueFamilyDataGraphProcessingEngineInfo,
        VkQueueFamilyDataGraphProcessingEnginePropertiesARM* pQueueFamilyDataGraphProcessingEngineProperties);

- `physicalDevice` is the physical device to query.

- `pQueueFamilyDataGraphProcessingEngineInfo` is a pointer to a VkPhysicalDeviceQueueFamilyDataGraphProcessingEngineInfoARM structure that specifies the data graph processing engine and queue family to query.

- `pQueueFamilyDataGraphProcessingEngineProperties` is a pointer to a VkQueueFamilyDataGraphProcessingEnginePropertiesARM structure in which the queries properties are returned.

Valid Usage (Implicit)

- VUID-vkGetPhysicalDeviceQueueFamilyDataGraphProcessingEnginePropertiesARM-physicalDevice-parameter
  `physicalDevice` must be a valid VkPhysicalDevice handle

- VUID-vkGetPhysicalDeviceQueueFamilyDataGraphProcessingEnginePropertiesARM-pQueueFamilyDataGraphProcessingEngineInfo-parameter
  `pQueueFamilyDataGraphProcessingEngineInfo` must be a valid pointer to a valid VkPhysicalDeviceQueueFamilyDataGraphProcessingEngineInfoARM structure

- VUID-vkGetPhysicalDeviceQueueFamilyDataGraphProcessingEnginePropertiesARM-pQueueFamilyDataGraphProcessingEngineProperties-parameter
  `pQueueFamilyDataGraphProcessingEngineProperties` must be a valid pointer to a VkQueueFamilyDataGraphProcessingEnginePropertiesARM structure

The `VkPhysicalDeviceQueueFamilyDataGraphProcessingEngineInfoARM` structure is defined as:

    // Provided by VK_ARM_data_graph
    typedef struct VkPhysicalDeviceQueueFamilyDataGraphProcessingEngineInfoARM {
        VkStructureType                                     sType;
        const void*                                         pNext;
        uint32_t                                            queueFamilyIndex;
        VkPhysicalDeviceDataGraphProcessingEngineTypeARM    engineType;
    } VkPhysicalDeviceQueueFamilyDataGraphProcessingEngineInfoARM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `queueFamilyIndex` specifies the queue family being queried.

- `engineType` is a VkPhysicalDeviceDataGraphProcessingEngineTypeARM specifying the engine type whose properties are being queried.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceQueueFamilyDataGraphProcessingEngineInfoARM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_QUEUE_FAMILY_DATA_GRAPH_PROCESSING_ENGINE_INFO_ARM

- VUID-VkPhysicalDeviceQueueFamilyDataGraphProcessingEngineInfoARM-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkPhysicalDeviceQueueFamilyDataGraphProcessingEngineInfoARM-engineType-parameter
  `engineType` must be a valid VkPhysicalDeviceDataGraphProcessingEngineTypeARM value

The `VkQueueFamilyDataGraphProcessingEnginePropertiesARM` structure is defined as:

    // Provided by VK_ARM_data_graph
    typedef struct VkQueueFamilyDataGraphProcessingEnginePropertiesARM {
        VkStructureType                       sType;
        void*                                 pNext;
        VkExternalSemaphoreHandleTypeFlags    foreignSemaphoreHandleTypes;
        VkExternalMemoryHandleTypeFlags       foreignMemoryHandleTypes;
    } VkQueueFamilyDataGraphProcessingEnginePropertiesARM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `foreignSemaphoreHandleTypes` is a VkExternalSemaphoreHandleTypeFlags that describes the external semaphore handle types supported by a foreign data graph processing engine.

- `foreignMemoryHandleTypes` is a VkExternalMemoryHandleTypeFlags that describes the external memory handle types supported by a foreign data graph processing engine.

Valid Usage (Implicit)

- VUID-VkQueueFamilyDataGraphProcessingEnginePropertiesARM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_QUEUE_FAMILY_DATA_GRAPH_PROCESSING_ENGINE_PROPERTIES_ARM

- VUID-VkQueueFamilyDataGraphProcessingEnginePropertiesARM-pNext-pNext
  `pNext` must be `NULL`

The `VkPhysicalDeviceDataGraphProcessingEngineARM` structure is defined as:

    // Provided by VK_ARM_data_graph
    typedef struct VkPhysicalDeviceDataGraphProcessingEngineARM {
        VkPhysicalDeviceDataGraphProcessingEngineTypeARM    type;
        VkBool32                                            isForeign;
    } VkPhysicalDeviceDataGraphProcessingEngineARM;

- `type` is a VkPhysicalDeviceDataGraphProcessingEngineTypeARM that specifies the type of the processing engine.

- `isForeign` specifies whether the processing engine is foreign.

The defined data graph processing engines are:

    // Provided by VK_ARM_data_graph
    typedef enum VkPhysicalDeviceDataGraphProcessingEngineTypeARM {
        VK_PHYSICAL_DEVICE_DATA_GRAPH_PROCESSING_ENGINE_TYPE_DEFAULT_ARM = 0,
      // Provided by VK_QCOM_data_graph_model
        VK_PHYSICAL_DEVICE_DATA_GRAPH_PROCESSING_ENGINE_TYPE_NEURAL_QCOM = 1000629000,
      // Provided by VK_QCOM_data_graph_model
        VK_PHYSICAL_DEVICE_DATA_GRAPH_PROCESSING_ENGINE_TYPE_COMPUTE_QCOM = 1000629001,
    } VkPhysicalDeviceDataGraphProcessingEngineTypeARM;

- VK_PHYSICAL_DEVICE_DATA_GRAPH_PROCESSING_ENGINE_TYPE_DEFAULT_ARM corresponds to the default data graph processing engine.

- VK_PHYSICAL_DEVICE_DATA_GRAPH_PROCESSING_ENGINE_TYPE_NEURAL_QCOM specifies an engine that specializes in neural processing.

- VK_PHYSICAL_DEVICE_DATA_GRAPH_PROCESSING_ENGINE_TYPE_COMPUTE_QCOM specifies an engine that uses compute processing to execute data graphs.

The `VkDataGraphProcessingEngineCreateInfoARM` structure is defined as:

    // Provided by VK_ARM_data_graph
    typedef struct VkDataGraphProcessingEngineCreateInfoARM {
        VkStructureType                                  sType;
        const void*                                      pNext;
        uint32_t                                         processingEngineCount;
        VkPhysicalDeviceDataGraphProcessingEngineARM*    pProcessingEngines;
    } VkDataGraphProcessingEngineCreateInfoARM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `processingEngineCount` is the number of elements in `pProcessingEngines`.

- `pProcessingEngines` is a pointer to an array of `processingEngineCount` VkPhysicalDeviceDataGraphProcessingEngineARM structures.

Valid Usage

- VUID-VkDataGraphProcessingEngineCreateInfoARM-dataGraph-09953
  The `dataGraph` feature must be enabled

- VUID-VkDataGraphProcessingEngineCreateInfoARM-pProcessingEngines-09918
  `pProcessingEngines` must not contain identical VkPhysicalDeviceDataGraphProcessingEngineARM structures

- VUID-VkDataGraphProcessingEngineCreateInfoARM-pProcessingEngines-09956
  For each element of `pProcessingEngines`, its `type` member must be a valid VkPhysicalDeviceDataGraphProcessingEngineTypeARM value

- VUID-VkDataGraphProcessingEngineCreateInfoARM-pProcessingEngines-11843
  If any element of `pProcessingEngines` has a `type` of VK_PHYSICAL_DEVICE_DATA_GRAPH_PROCESSING_ENGINE_TYPE_NEURAL_QCOM or VK_PHYSICAL_DEVICE_DATA_GRAPH_PROCESSING_ENGINE_TYPE_COMPUTE_QCOM and `isForeign` set to VK_TRUE, `processingEngineCount` must equal `1`

- VUID-VkDataGraphProcessingEngineCreateInfoARM-pProcessingEngines-11844
  If any element of `pProcessingEngines` has a `type` of VK_PHYSICAL_DEVICE_DATA_GRAPH_PROCESSING_ENGINE_TYPE_NEURAL_QCOM or VK_PHYSICAL_DEVICE_DATA_GRAPH_PROCESSING_ENGINE_TYPE_COMPUTE_QCOM, the dataGraphModel feature must be enabled

Valid Usage (Implicit)

- VUID-VkDataGraphProcessingEngineCreateInfoARM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DATA_GRAPH_PROCESSING_ENGINE_CREATE_INFO_ARM

- VUID-VkDataGraphProcessingEngineCreateInfoARM-pProcessingEngines-parameter
  `pProcessingEngines` must be a valid pointer to an array of `processingEngineCount` VkPhysicalDeviceDataGraphProcessingEngineARM structures

- VUID-VkDataGraphProcessingEngineCreateInfoARM-processingEngineCount-arraylength
  `processingEngineCount` must be greater than `0`

Structure Chaining

Extends the structures

  - VkCommandPoolCreateInfo

  - VkDataGraphPipelineCreateInfoARM

  - VkDescriptorPoolCreateInfo

### 53.6. Operations

Data graph processing engines execute data graph operations. Operations may be of a fixed-function nature, configurable or not, or may , for example, be provided as part of a SPIR-V extended instruction set.

To query the data graph processing engines and operations they support for a specific queue family of a physical device, call:

    // Provided by VK_ARM_data_graph
    VkResult vkGetPhysicalDeviceQueueFamilyDataGraphPropertiesARM(
        VkPhysicalDevice                            physicalDevice,
        uint32_t                                    queueFamilyIndex,
        uint32_t*                                   pQueueFamilyDataGraphPropertyCount,
        VkQueueFamilyDataGraphPropertiesARM*        pQueueFamilyDataGraphProperties);

- `physicalDevice` is the physical device to query.

- `queueFamilyIndex` is the index of the queue family being queried.

- `pQueueFamilyDataGraphPropertyCount` is a pointer to an integer related to the number of properties available or queried.

- `pQueueFamilyDataGraphProperties` is either `NULL` or a pointer to an array of VkQueueFamilyDataGraphPropertiesARM structures.

If `pQueueFamilyDataGraphProperties` is `NULL`, then the number of properties available is returned in `pQueueFamilyDataGraphPropertyCount`. Otherwise, `pQueueFamilyDataGraphPropertyCount` must point to a variable set by the application to the number of elements in the `pQueueFamilyDataGraphProperties` array, and on return the variable is overwritten with the number of structures actually written to `pQueueFamilyDataGraphProperties`. If `pQueueFamilyDataGraphPropertyCount` is less than the number of properties available, at most `pQueueFamilyDataGraphPropertyCount` structures will be written, and VK_INCOMPLETE will be returned instead of VK_SUCCESS, to indicate that not all the available properties were returned.

If the dataGraphModel feature is supported, the implementation must return at least one property with engine type VK_PHYSICAL_DEVICE_DATA_GRAPH_PROCESSING_ENGINE_TYPE_NEURAL_QCOM or VK_PHYSICAL_DEVICE_DATA_GRAPH_PROCESSING_ENGINE_TYPE_COMPUTE_QCOM.

Valid Usage (Implicit)

- VUID-vkGetPhysicalDeviceQueueFamilyDataGraphPropertiesARM-physicalDevice-parameter
  `physicalDevice` must be a valid VkPhysicalDevice handle

- VUID-vkGetPhysicalDeviceQueueFamilyDataGraphPropertiesARM-pQueueFamilyDataGraphPropertyCount-parameter
  `pQueueFamilyDataGraphPropertyCount` must be a valid pointer to a `uint32_t` value

- VUID-vkGetPhysicalDeviceQueueFamilyDataGraphPropertiesARM-pQueueFamilyDataGraphProperties-parameter
  If the value referenced by `pQueueFamilyDataGraphPropertyCount` is not `0`, and `pQueueFamilyDataGraphProperties` is not `NULL`, `pQueueFamilyDataGraphProperties` must be a valid pointer to an array of `pQueueFamilyDataGraphPropertyCount` VkQueueFamilyDataGraphPropertiesARM structures

Return Codes

Success

  - VK_INCOMPLETE

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkQueueFamilyDataGraphPropertiesARM` structure is defined as:

    // Provided by VK_ARM_data_graph
    typedef struct VkQueueFamilyDataGraphPropertiesARM {
        VkStructureType                                 sType;
        void*                                           pNext;
        VkPhysicalDeviceDataGraphProcessingEngineARM    engine;
        VkPhysicalDeviceDataGraphOperationSupportARM    operation;
    } VkQueueFamilyDataGraphPropertiesARM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `engine` is a VkPhysicalDeviceDataGraphProcessingEngineARM structure describing a data graph processing engine.

- `operation` is a VkPhysicalDeviceDataGraphOperationSupportARM structure describing one or more operations supported by a data graph processing engine.

Valid Usage (Implicit)

- VUID-VkQueueFamilyDataGraphPropertiesARM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_QUEUE_FAMILY_DATA_GRAPH_PROPERTIES_ARM

- VUID-VkQueueFamilyDataGraphPropertiesARM-pNext-pNext
  `pNext` must be `NULL`

The `VkPhysicalDeviceDataGraphOperationSupportARM` structure is defined as:

    // Provided by VK_ARM_data_graph
    typedef struct VkPhysicalDeviceDataGraphOperationSupportARM {
        VkPhysicalDeviceDataGraphOperationTypeARM    operationType;
        char                                         name[VK_MAX_PHYSICAL_DEVICE_DATA_GRAPH_OPERATION_SET_NAME_SIZE_ARM];
        uint32_t                                     version;
    } VkPhysicalDeviceDataGraphOperationSupportARM;

- `operationType` is a VkPhysicalDeviceDataGraphOperationTypeARM enum specifying the type of the operation whose support is being described.

- `name` is a pointer to a null-terminated UTF-8 string specifying the name of the operation whose support is being described.

- `version` is an integer specifying the version of the operation whose support is being described.

VK_MAX_PHYSICAL_DEVICE_DATA_GRAPH_OPERATION_SET_NAME_SIZE_ARM is the length in `char` values of an array containing the name of a data graph operation, as returned in VkPhysicalDeviceDataGraphOperationSupportARM::`name`.

    #define VK_MAX_PHYSICAL_DEVICE_DATA_GRAPH_OPERATION_SET_NAME_SIZE_ARM 128U

The defined data graph operations are:

    // Provided by VK_ARM_data_graph
    typedef enum VkPhysicalDeviceDataGraphOperationTypeARM {
        VK_PHYSICAL_DEVICE_DATA_GRAPH_OPERATION_TYPE_SPIRV_EXTENDED_INSTRUCTION_SET_ARM = 0,
      // Provided by VK_QCOM_data_graph_model
        VK_PHYSICAL_DEVICE_DATA_GRAPH_OPERATION_TYPE_NEURAL_MODEL_QCOM = 1000629000,
      // Provided by VK_QCOM_data_graph_model
        VK_PHYSICAL_DEVICE_DATA_GRAPH_OPERATION_TYPE_BUILTIN_MODEL_QCOM = 1000629001,
      // Provided by VK_ARM_data_graph_optical_flow
        VK_PHYSICAL_DEVICE_DATA_GRAPH_OPERATION_TYPE_OPTICAL_FLOW_ARM = 1000631000,
    } VkPhysicalDeviceDataGraphOperationTypeARM;

- VK_PHYSICAL_DEVICE_DATA_GRAPH_OPERATION_TYPE_SPIRV_EXTENDED_INSTRUCTION_SET_ARM corresponds to operations provided by a SPIR-V extended instruction set.

- VK_PHYSICAL_DEVICE_DATA_GRAPH_OPERATION_TYPE_NEURAL_MODEL_QCOM specifies an operation that executes neural models provided by the application.

- VK_PHYSICAL_DEVICE_DATA_GRAPH_OPERATION_TYPE_BUILTIN_MODEL_QCOM specifies an operation that executes specialized built-in models provided by the implementation.

- VK_PHYSICAL_DEVICE_DATA_GRAPH_OPERATION_TYPE_OPTICAL_FLOW_ARM corresponds to fixed-function optical flow as defined by `VK_ARM_data_graph_optical_flow`.

To query the properties of a data graph processing engine and operation set combination for a specific queue family of a physical device, call:

    // Provided by VK_ARM_data_graph_instruction_set_tosa, VK_ARM_data_graph_optical_flow
    VkResult vkGetPhysicalDeviceQueueFamilyDataGraphEngineOperationPropertiesARM(
        VkPhysicalDevice                            physicalDevice,
        uint32_t                                    queueFamilyIndex,
        const VkQueueFamilyDataGraphPropertiesARM*  pQueueFamilyDataGraphProperties,
        VkBaseOutStructure*                         pProperties);

- `physicalDevice` is the physical device to query.

- `queueFamilyIndex` is the index of the queue family being queried.

- `pQueueFamilyDataGraphProperties` is a pointer to a VkQueueFamilyDataGraphPropertiesARM structure that selects the processing engine and operation set for which the properties are queried.

- `pProperties` is a pointer to a structure in which the properties are returned.

Valid property queries for specific engines and operations

Engine | Operation Type | Operation Name | Operation Version | Property structure
--- | --- | --- | --- | ---
Any | Any | `TOSA.XXXXXX.X` where `X` is a digit between 0 and 9 | Any | VkQueueFamilyDataGraphTOSAPropertiesARM
Any | Any | `OpticalFlow` | Any | VkQueueFamilyDataGraphOpticalFlowPropertiesARM

Valid Usage

- VUID-vkGetPhysicalDeviceQueueFamilyDataGraphEngineOperationPropertiesARM-pQueueFamilyDataGraphProperties-09957
  The VkQueueFamilyDataGraphPropertiesARM structure pointed to by `pQueueFamilyDataGraphProperties` must have been obtained by a prior call to vkGetPhysicalDeviceQueueFamilyDataGraphPropertiesARM with the same `physicalDevice` and `queueFamilyIndex`

- VUID-vkGetPhysicalDeviceQueueFamilyDataGraphEngineOperationPropertiesARM-pProperties-09958
  `pProperties` must be a valid structure of the appropriate type as defined in Valid property queries for specific engines and operations

Valid Usage (Implicit)

- VUID-vkGetPhysicalDeviceQueueFamilyDataGraphEngineOperationPropertiesARM-physicalDevice-parameter
  `physicalDevice` must be a valid VkPhysicalDevice handle

- VUID-vkGetPhysicalDeviceQueueFamilyDataGraphEngineOperationPropertiesARM-pQueueFamilyDataGraphProperties-parameter
  `pQueueFamilyDataGraphProperties` must be a valid pointer to a valid VkQueueFamilyDataGraphPropertiesARM structure

Return Codes

Success

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

#### 53.6.1. Data Graph Operations Requirements

Physical devices that support the `dataGraphShaderModule` feature must support an operation whose VkPhysicalDeviceDataGraphOperationSupportARM::`operationType` is VK_PHYSICAL_DEVICE_DATA_GRAPH_OPERATION_TYPE_SPIRV_EXTENDED_INSTRUCTION_SET_ARM and `name` and `version` are as described in the following table for at least one processing engine in at least one queue family when specific extensions are supported at a specific version:

Extension | Extension specification version | Operation name | Operation version
--- | --- | --- | ---
VK_ARM_data_graph_instruction_set_tosa | 1 | `TOSA.001000.1` | 0

Physical devices that support VK_ARM_data_graph_optical_flow must support the following VkPhysicalDeviceDataGraphOperationSupportARM for at least one processing engine in at least one queue family:

- `operationType`: VK_PHYSICAL_DEVICE_DATA_GRAPH_OPERATION_TYPE_OPTICAL_FLOW_ARM

- `name`: `OpticalFlow`

- `version`: `1`

#### 53.6.2. TOSA

The `VkQueueFamilyDataGraphTOSAPropertiesARM` structure is defined as:

    // Provided by VK_ARM_data_graph_instruction_set_tosa
    typedef struct VkQueueFamilyDataGraphTOSAPropertiesARM {
        VkStructureType                         sType;
        void*                                   pNext;
        uint32_t                                profileCount;
        const VkDataGraphTOSANameQualityARM*    pProfiles;
        uint32_t                                extensionCount;
        const VkDataGraphTOSANameQualityARM*    pExtensions;
        VkDataGraphTOSALevelARM                 level;
    } VkQueueFamilyDataGraphTOSAPropertiesARM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `profileCount` is the length of the `pProfiles` array.

- `pProfiles` is a pointer to an array of VkDataGraphTOSANameQualityARM structures describing the TOSA profiles supported.

- `extensionCount` is the length of the `pExtensions` array.

- `pExtensions` is a pointer to an array of VkDataGraphTOSANameQualityARM structures describing the TOSA extensions supported.

- `level` is a VkDataGraphTOSALevelARM describing the TOSA level supported.

Valid Usage (Implicit)

- VUID-VkQueueFamilyDataGraphTOSAPropertiesARM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_QUEUE_FAMILY_DATA_GRAPH_TOSA_PROPERTIES_ARM

- VUID-VkQueueFamilyDataGraphTOSAPropertiesARM-pNext-pNext
  `pNext` must be `NULL`

The `VkDataGraphTOSANameQualityARM` structure is defined as:

    // Provided by VK_ARM_data_graph_instruction_set_tosa
    typedef struct VkDataGraphTOSANameQualityARM {
        char                              name[VK_MAX_DATA_GRAPH_TOSA_NAME_SIZE_ARM];
        VkDataGraphTOSAQualityFlagsARM    qualityFlags;
    } VkDataGraphTOSANameQualityARM;

- `name` is a pointer to a null-terminated UTF-8 string specifying the name of the TOSA profile or extension.

- `qualityLevel` is a VkDataGraphTOSAQualityFlagsARM describing the quality of the support for the TOSA profile or extension.

VK_MAX_DATA_GRAPH_TOSA_NAME_SIZE_ARM is the length in `char` values of an array containing the name of a data graph TOSA profile or extension, as returned in VkDataGraphTOSANameQualityARM::`name`.

    #define VK_MAX_DATA_GRAPH_TOSA_NAME_SIZE_ARM 128U

Bits which can be set in VkDataGraphTOSANameQualityARM::`qualityLevel`, describing the quality of a TOSA profile or extension, are:

    // Provided by VK_ARM_data_graph_instruction_set_tosa
    typedef enum VkDataGraphTOSAQualityFlagBitsARM {
        VK_DATA_GRAPH_TOSA_QUALITY_ACCELERATED_ARM = 0x00000001,
        VK_DATA_GRAPH_TOSA_QUALITY_CONFORMANT_ARM = 0x00000002,
        VK_DATA_GRAPH_TOSA_QUALITY_EXPERIMENTAL_ARM = 0x00000004,
        VK_DATA_GRAPH_TOSA_QUALITY_DEPRECATED_ARM = 0x00000008,
    } VkDataGraphTOSAQualityFlagBitsARM;

- VK_DATA_GRAPH_TOSA_QUALITY_ACCELERATED_ARM specifies that the implementation of the TOSA profile or extension is accelerated.

- VK_DATA_GRAPH_TOSA_QUALITY_CONFORMANT_ARM specifies that the implementation of the TOSA profile or extension is conformant.

- VK_DATA_GRAPH_TOSA_QUALITY_EXPERIMENTAL_ARM specifies that the TOSA profile or extension is experimental.

- VK_DATA_GRAPH_TOSA_QUALITY_DEPRECATED_ARM specifies that the TOSA profile or extension is deprecated.

    // Provided by VK_ARM_data_graph_instruction_set_tosa
    typedef VkFlags   VkDataGraphTOSAQualityFlagsARM;

`VkDataGraphTOSAQualityFlagsARM` is a bitmask type for setting a mask of zero or more VkDataGraphTOSAQualityFlagBitsARM.

The defined data graph TOSA levels are:

    // Provided by VK_ARM_data_graph_instruction_set_tosa
    typedef enum VkDataGraphTOSALevelARM {
        VK_DATA_GRAPH_TOSA_LEVEL_NONE_ARM = 0,
        VK_DATA_GRAPH_TOSA_LEVEL_8K_ARM = 1,
    } VkDataGraphTOSALevelARM;

- VK_DATA_GRAPH_TOSA_LEVEL_NONE_ARM corresponds to the none TOSA level, as described in the TOSA specification.

- VK_DATA_GRAPH_TOSA_LEVEL_8K_ARM corresponds to the 8K TOSA level, as described in the TOSA specification.

#### 53.6.3. Optical flow

An optical flow fixed-function node in a graph calculates the forward optical flow between an input image and a reference image. An output flow vector (Vx, Vy) means that current pixel (x, y) of the input image can be found at location (x+Vx, y+Vy) in the reference image.

An optical flow fixed function nodes have the following graph node connection points:

- VK_DATA_GRAPH_PIPELINE_NODE_CONNECTION_TYPE_OPTICAL_FLOW_INPUT_ARM

- VK_DATA_GRAPH_PIPELINE_NODE_CONNECTION_TYPE_OPTICAL_FLOW_REFERENCE_ARM

- VK_DATA_GRAPH_PIPELINE_NODE_CONNECTION_TYPE_OPTICAL_FLOW_HINT_ARM

- VK_DATA_GRAPH_PIPELINE_NODE_CONNECTION_TYPE_OPTICAL_FLOW_FLOW_VECTOR_ARM

- VK_DATA_GRAPH_PIPELINE_NODE_CONNECTION_TYPE_OPTICAL_FLOW_COST_ARM

The `VkQueueFamilyDataGraphOpticalFlowPropertiesARM` structure is defined as:

    // Provided by VK_ARM_data_graph_optical_flow
    typedef struct VkQueueFamilyDataGraphOpticalFlowPropertiesARM {
        VkStructureType                           sType;
        void*                                     pNext;
        VkDataGraphOpticalFlowGridSizeFlagsARM    supportedOutputGridSizes;
        VkDataGraphOpticalFlowGridSizeFlagsARM    supportedHintGridSizes;
        VkBool32                                  hintSupported;
        VkBool32                                  costSupported;
        uint32_t                                  minWidth;
        uint32_t                                  minHeight;
        uint32_t                                  maxWidth;
        uint32_t                                  maxHeight;
    } VkQueueFamilyDataGraphOpticalFlowPropertiesARM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `supportedOutputGridSizes` are the supported VkDataGraphOpticalFlowGridSizeFlagsARM which can be specified in `VkDataGraphPipelineOpticalFlowCreateInfoARM`::`outputGridSize`.

- `supportedHintGridSizes` are the supported VkDataGraphOpticalFlowGridSizeFlagsARM which can be specified in `VkDataGraphPipelineOpticalFlowCreateInfoARM`::`hintGridSize`.

- `hintSupported` is a boolean describing whether using hint flow vector map is supported in an optical flow graph pipeline.

- `costSupported` is a boolean describing whether cost map generation is supported in an optical flow graph pipeline.

- `minWidth` is the minimum width in pixels for images used in an optical flow graph pipeline.

- `minHeight` is the minimum height in pixels for images used in an optical flow graph pipeline.

- `maxWidth` is the maximum width in pixels for images used in an optical flow graph pipeline.

- `maxHeight` is the maximum height in pixels for images used in an optical flow graph pipeline.

Valid Usage (Implicit)

- VUID-VkQueueFamilyDataGraphOpticalFlowPropertiesARM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_QUEUE_FAMILY_DATA_GRAPH_OPTICAL_FLOW_PROPERTIES_ARM

- VUID-VkQueueFamilyDataGraphOpticalFlowPropertiesARM-pNext-pNext
  `pNext` must be `NULL`

##### Image formats

To enumerate the supported image formats for a specific data graph optical flow usage, call:

    // Provided by VK_ARM_data_graph_optical_flow
    VkResult vkGetPhysicalDeviceQueueFamilyDataGraphOpticalFlowImageFormatsARM(
        VkPhysicalDevice                            physicalDevice,
        uint32_t                                    queueFamilyIndex,
        const VkQueueFamilyDataGraphPropertiesARM*  pQueueFamilyDataGraphProperties,
        const VkDataGraphOpticalFlowImageFormatInfoARM* pOpticalFlowImageFormatInfo,
        uint32_t*                                   pFormatCount,
        VkDataGraphOpticalFlowImageFormatPropertiesARM* pImageFormatProperties);

- `physicalDevice` is the physical device being queried.

- `queueFamilyIndex` is the index of the queue family being queried.

- `pQueueFamilyDataGraphProperties` is a pointer to a VkQueueFamilyDataGraphPropertiesARM structure that selects the processing engine and operation set for which the properties are queried.

- `pOpticalFlowImageFormatInfo` is a pointer to a VkDataGraphOpticalFlowImageFormatInfoARM structure specifying the optical flow usage for which information is returned.

- `pFormatCount` is a pointer to an integer related to the number of optical flow properties available or queried, as described below.

- `pImageFormatProperties` is a pointer to an array of VkDataGraphOpticalFlowImageFormatPropertiesARM structures in which supported formats and image parameters are returned.

If `pImageFormatProperties` is `NULL`, then the number of optical flow properties supported for the given `physicalDevice` is returned in `pFormatCount`. Otherwise, `pFormatCount` must point to a variable set by the user to the number of elements in the `pImageFormatProperties` array, and on return the variable is overwritten with the number of values actually written to `pImageFormatProperties`. If the value of `pFormatCount` is less than the number of optical flow properties supported, at most `pFormatCount` values will be written to `pImageFormatProperties`, and VK_INCOMPLETE will be returned instead of VK_SUCCESS, to indicate that not all the available values were returned. Before creating an image to be used as a optical flow image, obtain the supported image creation parameters by querying with vkGetPhysicalDeviceFormatProperties2 and vkGetPhysicalDeviceImageFormatProperties2 using one of the reported formats and adding VkDataGraphOpticalFlowImageFormatInfoARM to the `pNext` chain of VkPhysicalDeviceImageFormatInfo2. When querying the parameters with vkGetPhysicalDeviceImageFormatProperties2 for images used for optical flow operations, the VkDataGraphOpticalFlowImageFormatInfoARM::`usage` field should contain one or more of the bits defined in VkDataGraphOpticalFlowImageUsageFlagBitsARM.

Valid Usage

- VUID-vkGetPhysicalDeviceQueueFamilyDataGraphOpticalFlowImageFormatsARM-pQueueFamilyDataGraphProperties-09965
  `pQueueFamilyDataGraphProperties` must point to a structure whose `operation` member has its `name` member equal to `OpticalFlow`

Valid Usage (Implicit)

- VUID-vkGetPhysicalDeviceQueueFamilyDataGraphOpticalFlowImageFormatsARM-physicalDevice-parameter
  `physicalDevice` must be a valid VkPhysicalDevice handle

- VUID-vkGetPhysicalDeviceQueueFamilyDataGraphOpticalFlowImageFormatsARM-pQueueFamilyDataGraphProperties-parameter
  `pQueueFamilyDataGraphProperties` must be a valid pointer to a valid VkQueueFamilyDataGraphPropertiesARM structure

- VUID-vkGetPhysicalDeviceQueueFamilyDataGraphOpticalFlowImageFormatsARM-pOpticalFlowImageFormatInfo-parameter
  `pOpticalFlowImageFormatInfo` must be a valid pointer to a valid VkDataGraphOpticalFlowImageFormatInfoARM structure

- VUID-vkGetPhysicalDeviceQueueFamilyDataGraphOpticalFlowImageFormatsARM-pFormatCount-parameter
  `pFormatCount` must be a valid pointer to a `uint32_t` value

- VUID-vkGetPhysicalDeviceQueueFamilyDataGraphOpticalFlowImageFormatsARM-pImageFormatProperties-parameter
  If the value referenced by `pFormatCount` is not `0`, and `pImageFormatProperties` is not `NULL`, `pImageFormatProperties` must be a valid pointer to an array of `pFormatCount` VkDataGraphOpticalFlowImageFormatPropertiesARM structures

Return Codes

Success

  - VK_INCOMPLETE

  - VK_SUCCESS

Failure

  - VK_ERROR_EXTENSION_NOT_PRESENT

  - VK_ERROR_FORMAT_NOT_SUPPORTED

  - VK_ERROR_INITIALIZATION_FAILED

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

Note | VK_FORMAT_B8G8R8A8_UNORM, VK_FORMAT_R8G8B8A8_UNORM, VK_FORMAT_R8G8B8_UNORM, VK_FORMAT_B8G8R8_UNORM, VK_FORMAT_R8_UNORM, and VK_FORMAT_B10G11R11_UFLOAT_PACK32 are initially supported for images with optical flow usage VK_DATA_GRAPH_OPTICAL_FLOW_IMAGE_USAGE_INPUT_BIT_ARM. VK_FORMAT_R16G16_SFLOAT is initially supported for images with optical flow usage VK_DATA_GRAPH_OPTICAL_FLOW_IMAGE_USAGE_OUTPUT_BIT_ARM and VK_DATA_GRAPH_OPTICAL_FLOW_IMAGE_USAGE_HINT_BIT_ARM. VK_FORMAT_R16_UINT is initially supported for images with optical flow usage VK_DATA_GRAPH_OPTICAL_FLOW_IMAGE_USAGE_COST_BIT_ARM.

The VkDataGraphOpticalFlowImageFormatInfoARM structure is defined as:

    // Provided by VK_ARM_data_graph_optical_flow
    typedef struct VkDataGraphOpticalFlowImageFormatInfoARM {
        VkStructureType                             sType;
        const void*                                 pNext;
        VkDataGraphOpticalFlowImageUsageFlagsARM    usage;
    } VkDataGraphOpticalFlowImageFormatInfoARM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `usage` is a bitmask of VkDataGraphOpticalFlowImageUsageFlagBitsARM describing the intended optical flow usage of the image.

Valid Usage (Implicit)

- VUID-VkDataGraphOpticalFlowImageFormatInfoARM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DATA_GRAPH_OPTICAL_FLOW_IMAGE_FORMAT_INFO_ARM

- VUID-VkDataGraphOpticalFlowImageFormatInfoARM-usage-parameter
  `usage` must be a valid combination of VkDataGraphOpticalFlowImageUsageFlagBitsARM values

- VUID-VkDataGraphOpticalFlowImageFormatInfoARM-usage-requiredbitmask
  `usage` must not be `0`

Structure Chaining

Extends the structures

  - VkImageCreateInfo

  - VkPhysicalDeviceImageFormatInfo2

Bits which can be set in VkDataGraphOpticalFlowImageFormatInfoARM::`usage`, controlling optical flow usage, are:

    // Provided by VK_ARM_data_graph_optical_flow
    typedef enum VkDataGraphOpticalFlowImageUsageFlagBitsARM {
        VK_DATA_GRAPH_OPTICAL_FLOW_IMAGE_USAGE_UNKNOWN_ARM = 0,
        VK_DATA_GRAPH_OPTICAL_FLOW_IMAGE_USAGE_INPUT_BIT_ARM = 0x00000001,
        VK_DATA_GRAPH_OPTICAL_FLOW_IMAGE_USAGE_OUTPUT_BIT_ARM = 0x00000002,
        VK_DATA_GRAPH_OPTICAL_FLOW_IMAGE_USAGE_HINT_BIT_ARM = 0x00000004,
        VK_DATA_GRAPH_OPTICAL_FLOW_IMAGE_USAGE_COST_BIT_ARM = 0x00000008,
    } VkDataGraphOpticalFlowImageUsageFlagBitsARM;

- VK_DATA_GRAPH_OPTICAL_FLOW_IMAGE_USAGE_INPUT_BIT_ARM specifies that the image can be used as input or reference image for an optical flow operation.

- VK_DATA_GRAPH_OPTICAL_FLOW_IMAGE_USAGE_OUTPUT_BIT_ARM specifies that the image can be used as output flow vector map for an optical flow operation.

- VK_DATA_GRAPH_OPTICAL_FLOW_IMAGE_USAGE_HINT_BIT_ARM specifies that the image can be used as hint flow vector map for an optical flow operation.

- VK_DATA_GRAPH_OPTICAL_FLOW_IMAGE_USAGE_COST_BIT_ARM specifies that the image can be used as output cost map for an optical flow operation.

    // Provided by VK_ARM_data_graph_optical_flow
    typedef VkFlags   VkDataGraphOpticalFlowImageUsageFlagsARM;

`VkDataGraphOpticalFlowImageUsageFlagsARM` is a bitmask type for setting a mask of zero or more VkDataGraphOpticalFlowImageUsageFlagBitsARM.

The VkDataGraphOpticalFlowImageFormatPropertiesARM structure is defined as:

    // Provided by VK_ARM_data_graph_optical_flow
    typedef struct VkDataGraphOpticalFlowImageFormatPropertiesARM {
        VkStructureType    sType;
        void*              pNext;
        VkFormat           format;
    } VkDataGraphOpticalFlowImageFormatPropertiesARM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `format` is a VkFormat that specifies the format that can be used with the specified optical flow image usages.

Valid Usage (Implicit)

- VUID-VkDataGraphOpticalFlowImageFormatPropertiesARM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DATA_GRAPH_OPTICAL_FLOW_IMAGE_FORMAT_PROPERTIES_ARM

- VUID-VkDataGraphOpticalFlowImageFormatPropertiesARM-pNext-pNext
  `pNext` must be `NULL`

##### Pipeline creation

The `VkDataGraphPipelineOpticalFlowCreateInfoARM` structure is defined as:

    // Provided by VK_ARM_data_graph_optical_flow
    typedef struct VkDataGraphPipelineOpticalFlowCreateInfoARM {
        VkStructureType                              sType;
        void*                                        pNext;
        uint32_t                                     width;
        uint32_t                                     height;
        VkFormat                                     imageFormat;
        VkFormat                                     flowVectorFormat;
        VkFormat                                     costFormat;
        VkDataGraphOpticalFlowGridSizeFlagsARM       outputGridSize;
        VkDataGraphOpticalFlowGridSizeFlagsARM       hintGridSize;
        VkDataGraphOpticalFlowPerformanceLevelARM    performanceLevel;
        VkDataGraphOpticalFlowCreateFlagsARM         flags;
    } VkDataGraphPipelineOpticalFlowCreateInfoARM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `width` is the width in pixels of the input or reference image to be bound to this optical flow pipeline.

- `height` is the height in pixels of the input or reference image to be bound to this optical flow pipeline.

- `imageFormat` is the VkFormat of the input and reference image to be bound to this optical flow pipeline.

- `flowVectorFormat` is the VkFormat of the flow vector maps (output or hint) to be bound to this optical flow pipeline.

- `costFormat` is the VkFormat of the cost maps to be bound to this optical flow pipeline.

- `outputGridSize` is exactly one bit of VkDataGraphOpticalFlowGridSizeFlagsARM specifying the grid size of the output flow and cost maps to be bound to this optical flow pipeline. The size of the output flow and cost maps is a function of the input image dimensions and `outputGridSize` and is calculated as follows:
  OutputWidth = ⌈ `width` / OutputGridWidth ⌉
  OutputHeight = ⌈ `height` / OutputGridHeight ⌉
  where OutputGridWidth and OutputGridHeight are determined by `outputGridSize`.

- `hintGridSize` is one exactly bit of VkDataGraphOpticalFlowGridSizeFlagsARM specifying the grid size of the hint flow vector map to be bound to this optical flow pipeline. The size of the hint maps is a function of the input image dimensions and `hintGridSize` and is calculated as follows:
  HintWidth = ⌈ `width` / HintGridWidth ⌉
  HintHeight = ⌈ `height` / HintGridHeight ⌉
  where HintGridWidth and HintGridHeight are determined by `hintGridSize`.

- `performanceLevel` is the VkDataGraphOpticalFlowPerformanceLevelARM used for this optical flow pipeline.

- `flags` are the VkDataGraphOpticalFlowCreateFlagsARM used for this optical flow pipeline.

Valid Usage

- VUID-VkDataGraphPipelineOpticalFlowCreateInfoARM-width-09966
  `width` must be greater than or equal to `VkQueueFamilyDataGraphOpticalFlowPropertiesARM`::`minWidth` and less than or equal to `VkQueueFamilyDataGraphOpticalFlowPropertiesARM`::`maxWidth`

- VUID-VkDataGraphPipelineOpticalFlowCreateInfoARM-height-09967
  `height` must be greater than or equal to `VkQueueFamilyDataGraphOpticalFlowPropertiesARM`::`minHeight` and less than or equal to `VkQueueFamilyDataGraphOpticalFlowPropertiesARM`::`maxHeight`

- VUID-VkDataGraphPipelineOpticalFlowCreateInfoARM-imageFormat-09968
  `imageFormat` must be one of the formats returned by vkGetPhysicalDeviceQueueFamilyDataGraphOpticalFlowImageFormatsARM for VK_DATA_GRAPH_OPTICAL_FLOW_IMAGE_USAGE_INPUT_BIT_ARM

- VUID-VkDataGraphPipelineOpticalFlowCreateInfoARM-flowVectorFormat-09969
  `flowVectorFormat` must be one of the formats returned by vkGetPhysicalDeviceQueueFamilyDataGraphOpticalFlowImageFormatsARM for VK_DATA_GRAPH_OPTICAL_FLOW_IMAGE_USAGE_OUTPUT_BIT_ARM

- VUID-VkDataGraphPipelineOpticalFlowCreateInfoARM-costFormat-09970
  `costFormat` must be one of the formats returned by vkGetPhysicalDeviceQueueFamilyDataGraphOpticalFlowImageFormatsARM for VK_DATA_GRAPH_OPTICAL_FLOW_IMAGE_USAGE_COST_BIT_ARM if VK_DATA_GRAPH_OPTICAL_FLOW_CREATE_ENABLE_COST_BIT_ARM is set in `flags`

- VUID-VkDataGraphPipelineOpticalFlowCreateInfoARM-outputGridSize-09971
  `outputGridSize` must be exactly one of the bits reported in `VkQueueFamilyDataGraphOpticalFlowPropertiesARM`::`supportedOutputGridSizes`

- VUID-VkDataGraphPipelineOpticalFlowCreateInfoARM-hintGridSize-09972
  `hintGridSize` must be 0 or exactly one of the bits reported in `VkQueueFamilyDataGraphOpticalFlowPropertiesARM`::`supportedHintGridSizes` if VK_DATA_GRAPH_OPTICAL_FLOW_CREATE_ENABLE_HINT_BIT_ARM is set in `flags`

- VUID-VkDataGraphPipelineOpticalFlowCreateInfoARM-hintGridSize-09973
  `hintGridSize` must be the same as `outputGridSize` if `hintGridSize` is not 0

- VUID-VkDataGraphPipelineOpticalFlowCreateInfoARM-flags-09974
  VK_DATA_GRAPH_OPTICAL_FLOW_CREATE_ENABLE_HINT_BIT_ARM must not be set in `flags` if `VkQueueFamilyDataGraphOpticalFlowPropertiesARM`::`hintSupported` is VK_FALSE

- VUID-VkDataGraphPipelineOpticalFlowCreateInfoARM-flags-09975
  VK_DATA_GRAPH_OPTICAL_FLOW_CREATE_ENABLE_COST_BIT_ARM must not be set in `flags` if `VkQueueFamilyDataGraphOpticalFlowPropertiesARM`::`costSupported` is VK_FALSE

Valid Usage (Implicit)

- VUID-VkDataGraphPipelineOpticalFlowCreateInfoARM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_OPTICAL_FLOW_CREATE_INFO_ARM

- VUID-VkDataGraphPipelineOpticalFlowCreateInfoARM-imageFormat-parameter
  `imageFormat` must be a valid VkFormat value

- VUID-VkDataGraphPipelineOpticalFlowCreateInfoARM-flowVectorFormat-parameter
  `flowVectorFormat` must be a valid VkFormat value

- VUID-VkDataGraphPipelineOpticalFlowCreateInfoARM-costFormat-parameter
  If `costFormat` is not `0`, `costFormat` must be a valid VkFormat value

- VUID-VkDataGraphPipelineOpticalFlowCreateInfoARM-performanceLevel-parameter
  If `performanceLevel` is not `0`, `performanceLevel` must be a valid VkDataGraphOpticalFlowPerformanceLevelARM value

- VUID-VkDataGraphPipelineOpticalFlowCreateInfoARM-flags-parameter
  `flags` must be a valid combination of VkDataGraphOpticalFlowCreateFlagBitsARM values

Structure Chaining

Extends the structure

  - VkDataGraphPipelineCreateInfoARM

Optical flow vectors are generated block-wise, one vector for each block of NxN pixels (referred to as grid). Bits which can be set in VkDataGraphPipelineOpticalFlowCreateInfoARM::`outputGridSize` and VkDataGraphPipelineOpticalFlowCreateInfoARM::`hintGridSize`, or which are returned in VkQueueFamilyDataGraphOpticalFlowPropertiesARM::`supportedOutputGridSizes` and VkQueueFamilyDataGraphOpticalFlowPropertiesARM::`supportedHintGridSizes` controlling optical flow grid sizes, are:

    // Provided by VK_ARM_data_graph_optical_flow
    typedef enum VkDataGraphOpticalFlowGridSizeFlagBitsARM {
        VK_DATA_GRAPH_OPTICAL_FLOW_GRID_SIZE_UNKNOWN_ARM = 0,
        VK_DATA_GRAPH_OPTICAL_FLOW_GRID_SIZE_1X1_BIT_ARM = 0x00000001,
        VK_DATA_GRAPH_OPTICAL_FLOW_GRID_SIZE_2X2_BIT_ARM = 0x00000002,
        VK_DATA_GRAPH_OPTICAL_FLOW_GRID_SIZE_4X4_BIT_ARM = 0x00000004,
        VK_DATA_GRAPH_OPTICAL_FLOW_GRID_SIZE_8X8_BIT_ARM = 0x00000008,
    } VkDataGraphOpticalFlowGridSizeFlagBitsARM;

- VK_DATA_GRAPH_OPTICAL_FLOW_GRID_SIZE_1X1_BIT_ARM specifies that grid is 1x1 pixel.

- VK_DATA_GRAPH_OPTICAL_FLOW_GRID_SIZE_2X2_BIT_ARM specifies that grid is 2x2 pixel.

- VK_DATA_GRAPH_OPTICAL_FLOW_GRID_SIZE_4X4_BIT_ARM specifies that grid is 4x4 pixel.

- VK_DATA_GRAPH_OPTICAL_FLOW_GRID_SIZE_8X8_BIT_ARM specifies that grid is 8x8 pixel.

    // Provided by VK_ARM_data_graph_optical_flow
    typedef VkFlags   VkDataGraphOpticalFlowGridSizeFlagsARM;

`VkDataGraphOpticalFlowGridSizeFlagsARM` is a bitmask type for setting a mask of zero or more VkDataGraphOpticalFlowGridSizeFlagBitsARM.

Optical flow exposes performance levels which the user can choose based on the desired performance and quality requirement. The optical flow performance level types are defined with the following:

    // Provided by VK_ARM_data_graph_optical_flow
    typedef enum VkDataGraphOpticalFlowPerformanceLevelARM {
        VK_DATA_GRAPH_OPTICAL_FLOW_PERFORMANCE_LEVEL_UNKNOWN_ARM = 0,
        VK_DATA_GRAPH_OPTICAL_FLOW_PERFORMANCE_LEVEL_SLOW_ARM = 1,
        VK_DATA_GRAPH_OPTICAL_FLOW_PERFORMANCE_LEVEL_MEDIUM_ARM = 2,
        VK_DATA_GRAPH_OPTICAL_FLOW_PERFORMANCE_LEVEL_FAST_ARM = 3,
    } VkDataGraphOpticalFlowPerformanceLevelARM;

- VK_DATA_GRAPH_OPTICAL_FLOW_PERFORMANCE_LEVEL_SLOW_ARM is a level with slower performance but higher quality.

- VK_DATA_GRAPH_OPTICAL_FLOW_PERFORMANCE_LEVEL_MEDIUM_ARM is a level with medium performance and medium quality.

- VK_DATA_GRAPH_OPTICAL_FLOW_PERFORMANCE_LEVEL_FAST_ARM is a preset with higher performance but lower quality.

Bits which can be set in VkDataGraphPipelineOpticalFlowCreateInfoARM::`flags`, controlling optical flow pipeline operations, are:

    // Provided by VK_ARM_data_graph_optical_flow
    typedef enum VkDataGraphOpticalFlowCreateFlagBitsARM {
        VK_DATA_GRAPH_OPTICAL_FLOW_CREATE_ENABLE_HINT_BIT_ARM = 0x00000001,
        VK_DATA_GRAPH_OPTICAL_FLOW_CREATE_ENABLE_COST_BIT_ARM = 0x00000002,
        VK_DATA_GRAPH_OPTICAL_FLOW_CREATE_RESERVED_30_BIT_ARM = 0x40000000,
    } VkDataGraphOpticalFlowCreateFlagBitsARM;

- VK_DATA_GRAPH_OPTICAL_FLOW_CREATE_ENABLE_HINT_BIT_ARM specifies that a VkImageView with external flow vector map will be used as hints in performing the motion search and must be connected to VK_DATA_GRAPH_PIPELINE_NODE_CONNECTION_TYPE_OPTICAL_FLOW_HINT_ARM.

- VK_DATA_GRAPH_OPTICAL_FLOW_CREATE_ENABLE_COST_BIT_ARM specifies that the cost for the forward flow is generated in a VkImageView which must be connected to VK_DATA_GRAPH_PIPELINE_NODE_CONNECTION_TYPE_OPTICAL_FLOW_COST_ARM. The cost is the confidence level of the flow vector for each grid in the image. The cost implies how (in)accurate the flow vector is. Higher cost value implies the flow vector to be less accurate and vice-versa.

`VkDataGraphOpticalFlowCreateFlagsARM` is a bitmask type for setting a mask of zero or more VkDataGraphOpticalFlowCreateFlagBitsARM.

    // Provided by VK_ARM_data_graph_optical_flow
    typedef VkFlags   VkDataGraphOpticalFlowCreateFlagsARM;

##### Pipeline dispatch

The VkDataGraphPipelineOpticalFlowDispatchInfoARM structure is defined as:

    // Provided by VK_ARM_data_graph_optical_flow
    typedef struct VkDataGraphPipelineOpticalFlowDispatchInfoARM {
        VkStructureType                          sType;
        void*                                    pNext;
        VkDataGraphOpticalFlowExecuteFlagsARM    flags;
        uint32_t                                 meanFlowL1NormHint;
    } VkDataGraphPipelineOpticalFlowDispatchInfoARM;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` are the VkDataGraphOpticalFlowExecuteFlagsARM used for this command.

- `meanFlowL1NormHint` is an integer used to hint to the implementation that the mean L1 norm of flow vectors is expected to be centered around this value (in number of pixels of the input image). The implementation may use this value to influence how flow vectors are computed. Different values may result in different flow vectors and will affect the cost of computing the flow vectors. A value of 0 means that the application does not wish to provide a hint.

Valid Usage

- VUID-VkDataGraphPipelineOpticalFlowDispatchInfoARM-meanFlowL1NormHint-09976
  `meanFlowL1NormHint`, when different from 0, must be less than or equal to the maximum of the width or height of the input image provided at pipeline creation time via VkDataGraphPipelineOpticalFlowCreateInfoARM::`width` or VkDataGraphPipelineOpticalFlowCreateInfoARM::`height`, respectively

Valid Usage (Implicit)

- VUID-VkDataGraphPipelineOpticalFlowDispatchInfoARM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_OPTICAL_FLOW_DISPATCH_INFO_ARM

- VUID-VkDataGraphPipelineOpticalFlowDispatchInfoARM-flags-parameter
  `flags` must be a valid combination of VkDataGraphOpticalFlowExecuteFlagBitsARM values

Structure Chaining

Extends the structure

  - VkDataGraphPipelineDispatchInfoARM

Bits which can be set in VkDataGraphPipelineOpticalFlowDispatchInfoARM::`flags`, controlling optical flow execution, are:

    // Provided by VK_ARM_data_graph_optical_flow
    typedef enum VkDataGraphOpticalFlowExecuteFlagBitsARM {
        VK_DATA_GRAPH_OPTICAL_FLOW_EXECUTE_DISABLE_TEMPORAL_HINTS_BIT_ARM = 0x00000001,
        VK_DATA_GRAPH_OPTICAL_FLOW_EXECUTE_INPUT_UNCHANGED_BIT_ARM = 0x00000002,
        VK_DATA_GRAPH_OPTICAL_FLOW_EXECUTE_REFERENCE_UNCHANGED_BIT_ARM = 0x00000004,
        VK_DATA_GRAPH_OPTICAL_FLOW_EXECUTE_INPUT_IS_PREVIOUS_REFERENCE_BIT_ARM = 0x00000008,
        VK_DATA_GRAPH_OPTICAL_FLOW_EXECUTE_REFERENCE_IS_PREVIOUS_INPUT_BIT_ARM = 0x00000010,
    } VkDataGraphOpticalFlowExecuteFlagBitsARM;

- VK_DATA_GRAPH_OPTICAL_FLOW_EXECUTE_DISABLE_TEMPORAL_HINTS_BIT_ARM specifies that temporal hints from previously generated flow vector map are not used. If temporal hints are enabled, the optical flow vector map from previous vkCmdDispatchDataGraphARM calls in the same graph pipeline session may be automatically used as hints for the current vkCmdDispatchDataGraphARM call, to take advantage of temporal correlation in a video sequence. Temporal hints should be disabled if there is a-priori knowledge of no temporal correlation (e.g. a scene change, independent successive image pairs).

- VK_DATA_GRAPH_OPTICAL_FLOW_EXECUTE_INPUT_UNCHANGED_BIT_ARM specifies that the contents of the input image are the same as in the previously executed vkCmdDispatchDataGraphARM call in the same graph pipeline session.

- VK_DATA_GRAPH_OPTICAL_FLOW_EXECUTE_REFERENCE_UNCHANGED_BIT_ARM specifies that the contents of the reference image are the same as in the previously executed vkCmdDispatchDataGraphARM call in the same graph pipeline session.

- VK_DATA_GRAPH_OPTICAL_FLOW_EXECUTE_INPUT_IS_PREVIOUS_REFERENCE_BIT_ARM specifies that the contents of the input image are the same as the contents of the reference image in the previously executed vkCmdDispatchDataGraphARM call in the same graph pipeline session.

- VK_DATA_GRAPH_OPTICAL_FLOW_EXECUTE_REFERENCE_IS_PREVIOUS_INPUT_BIT_ARM specifies that the contents of the reference image are the same as the contents of the input image in the previously executed vkCmdDispatchDataGraphARM call in the same graph pipeline session.

`VkDataGraphOpticalFlowExecuteFlagsARM` is a bitmask type for setting a mask of zero or more VkDataGraphOpticalFlowExecuteFlagBitsARM.

    // Provided by VK_ARM_data_graph_optical_flow
    typedef VkFlags   VkDataGraphOpticalFlowExecuteFlagsARM;

## 54. Extending Vulkan

New functionality may be added to Vulkan via either new extensions or new versions of the core, or new versions of an extension in some cases.

This chapter describes how Vulkan is versioned, how compatibility is affected between different versions, and compatibility rules that are followed by the Vulkan Working Group.

### 54.1. Functionality Levels

Functionality in Vulkan is divided into several different levels; global, instance-level, physical-device-level, and device-level.

- VkInstance and any objects created from a VkInstance other than VkPhysicalDevice are instance-level.

- VkPhysicalDevice is the only physical-device-level object.

- VkDevice and any objects created from a VkDevice are device-level.

The level of a command is the same as the level of its first parameter - if the first parameter is not a dispatchable handle, it is a global command. Different levels of functionality may be advertised in different ways.

### 54.2. Instance and Device Versions

Starting with Vulkan 1.1, there are separate versions advertised for the Vulkan instance, and for each device supported on the system. This allows a system with multiple devices to advertise all devices at their full capabilities, even if those devices do not support the same version of Vulkan.

The instance version indicates which global and instance-level functionality is supported, while each device version indicates the physical-device-level and device-level functionality supported.

The instance version can be queried by calling vkEnumerateInstanceVersion. Querying for this function via vkGetInstanceProcAddr will return `NULL` on implementations that only support Vulkan 1.0 functionality.

The device version can be queried by calling vkGetPhysicalDeviceProperties or vkGetPhysicalDeviceProperties2, and is returned in VkPhysicalDeviceProperties::`apiVersion`, encoded as described in Version Numbers.

### 54.3. Core Versions

The Vulkan Specification is regularly updated with bug fixes and clarifications. Occasionally new functionality is added to the core and at some point it is expected that there will be a desire to perform a large, breaking change to the API. In order to indicate to developers how and when these changes are made to the specification, and to provide a way to identify each set of changes, the Vulkan API maintains a version number.

#### 54.3.1. Version Numbers

The Vulkan version number comprises four parts indicating the variant, major, minor and patch version of the Vulkan API Specification.

The variant indicates the variant of the Vulkan API supported by the implementation. This is always 0 for the Vulkan API.

Note | A non-zero variant indicates the API is a variant of the Vulkan API and applications will typically need to be modified to run against it. The variant field was a later addition to the version number, added in version 1.2.175 of the Specification. As Vulkan uses variant 0, this change is fully backwards compatible with the previous version number format for Vulkan implementations. New version number macros have been added for this change and the old macros marked as legacy. For existing applications using the older format and macros, an implementation with non-zero variant will decode as a very high Vulkan version. The high version number should be detectable by applications performing suitable version checking.

The major version indicates a significant change in the API, which will encompass a wholly new version of the specification.

The minor version indicates the incorporation of new functionality into the core specification.

The patch version indicates bug fixes, clarifications, and language improvements have been incorporated into the specification.

Compatibility guarantees made about versions of the API sharing any of the same version numbers are documented in Core Versions

The version number is used in several places in the API. In each such use, the version numbers are packed into a 32-bit integer as follows:

- The variant is a 3-bit integer packed into bits 31-29.

- The major version is a 7-bit integer packed into bits 28-22.

- The minor version number is a 10-bit integer packed into bits 21-12.

- The patch version number is a 12-bit integer packed into bits 11-0.

`VK_API_VERSION_VARIANT` extracts the API variant number from a packed version number:

    // Provided by VK_VERSION_1_0
    #define VK_API_VERSION_VARIANT(version) ((uint32_t)(version) >> 29U)

`VK_API_VERSION_MAJOR` extracts the API major version number from a packed version number:

    // Provided by VK_VERSION_1_0
    #define VK_API_VERSION_MAJOR(version) (((uint32_t)(version) >> 22U) & 0x7FU)

`VK_VERSION_MAJOR` extracts the API major version number from a packed version number:

Warning | This functionality is superseded by Vulkan Version 1.0. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_0
    #define VK_VERSION_MAJOR(version) ((uint32_t)(version) >> 22U)

`VK_API_VERSION_MINOR` extracts the API minor version number from a packed version number:

    // Provided by VK_VERSION_1_0
    #define VK_API_VERSION_MINOR(version) (((uint32_t)(version) >> 12U) & 0x3FFU)

`VK_VERSION_MINOR` extracts the API minor version number from a packed version number:

Warning | This functionality is superseded by Vulkan Version 1.0. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_0
    #define VK_VERSION_MINOR(version) (((uint32_t)(version) >> 12U) & 0x3FFU)

`VK_API_VERSION_PATCH` extracts the API patch version number from a packed version number:

    // Provided by VK_VERSION_1_0
    #define VK_API_VERSION_PATCH(version) ((uint32_t)(version) & 0xFFFU)

`VK_VERSION_PATCH` extracts the API patch version number from a packed version number:

Warning | This functionality is superseded by Vulkan Version 1.0. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_0
    #define VK_VERSION_PATCH(version) ((uint32_t)(version) & 0xFFFU)

`VK_MAKE_API_VERSION` constructs an API version number.

    // Provided by VK_VERSION_1_0
    #define VK_MAKE_API_VERSION(variant, major, minor, patch) \
        ((((uint32_t)(variant)) << 29U) | (((uint32_t)(major)) << 22U) | (((uint32_t)(minor)) << 12U) | ((uint32_t)(patch)))

- `variant` is the variant number.

- `major` is the major version number.

- `minor` is the minor version number.

- `patch` is the patch version number.

`VK_MAKE_VERSION` constructs an API version number.

Warning | This functionality is superseded by Vulkan Version 1.0. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_0
    #define VK_MAKE_VERSION(major, minor, patch) \
        ((((uint32_t)(major)) << 22U) | (((uint32_t)(minor)) << 12U) | ((uint32_t)(patch)))

- `major` is the major version number.

- `minor` is the minor version number.

- `patch` is the patch version number.

`VK_API_VERSION_1_0` returns the API version number for Vulkan 1.0.0.

    // Provided by VK_VERSION_1_0
    // Vulkan 1.0 version number
    #define VK_API_VERSION_1_0 VK_MAKE_API_VERSION(0, 1, 0, 0)// Patch version should always be set to 0

`VK_API_VERSION_1_1` returns the API version number for Vulkan 1.1.0.

    // Provided by VK_VERSION_1_1
    // Vulkan 1.1 version number
    #define VK_API_VERSION_1_1 VK_MAKE_API_VERSION(0, 1, 1, 0)// Patch version should always be set to 0

`VK_API_VERSION_1_2` returns the API version number for Vulkan 1.2.0.

    // Provided by VK_VERSION_1_2
    // Vulkan 1.2 version number
    #define VK_API_VERSION_1_2 VK_MAKE_API_VERSION(0, 1, 2, 0)// Patch version should always be set to 0

`VK_API_VERSION_1_3` returns the API version number for Vulkan 1.3.0.

    // Provided by VK_VERSION_1_3
    // Vulkan 1.3 version number
    #define VK_API_VERSION_1_3 VK_MAKE_API_VERSION(0, 1, 3, 0)// Patch version should always be set to 0

`VK_API_VERSION_1_4` returns the API version number for Vulkan 1.4.0.

    // Provided by VK_VERSION_1_4
    // Vulkan 1.4 version number
    #define VK_API_VERSION_1_4 VK_MAKE_API_VERSION(0, 1, 4, 0)// Patch version should always be set to 0

### 54.4. Layers

When a layer is enabled, it inserts itself into the call chain for Vulkan commands the layer is interested in. Layers can be used for a variety of tasks that extend the base behavior of Vulkan beyond what is required by the specification - such as call logging, tracing, validation, or providing additional extensions.

Note | For example, an implementation is not expected to check that the value of enums used by the application fall within allowed ranges. Instead, a validation layer would do those checks and flag issues. This avoids a performance penalty during production use of the application because those layers would not be enabled in production.

Note | Vulkan layers may wrap object handles (i.e. return a different handle value to the application than that generated by the implementation). This is generally discouraged, as it increases the probability of incompatibilities with new extensions. The validation layers wrap handles in order to track the proper use and destruction of each object. See the “Architecture of the Vulkan Loader Interfaces” document for additional information.

To query the available layers, call:

    // Provided by VK_VERSION_1_0
    VkResult vkEnumerateInstanceLayerProperties(
        uint32_t*                                   pPropertyCount,
        VkLayerProperties*                          pProperties);

- `pPropertyCount` is a pointer to an integer related to the number of layer properties available or queried, as described below.

- `pProperties` is either `NULL` or a pointer to an array of VkLayerProperties structures.

If `pProperties` is `NULL`, then the number of layer properties available is returned in `pPropertyCount`. Otherwise, `pPropertyCount` must point to a variable set by the application to the number of elements in the `pProperties` array, and on return the variable is overwritten with the number of structures actually written to `pProperties`. If `pPropertyCount` is less than the number of layer properties available, at most `pPropertyCount` structures will be written, and VK_INCOMPLETE will be returned instead of VK_SUCCESS, to indicate that not all the available properties were returned.

The list of available layers may change at any time due to actions outside of the Vulkan implementation, so two calls to `vkEnumerateInstanceLayerProperties` with the same parameters may return different results, or retrieve different `pPropertyCount` values or `pProperties` contents. Once an instance has been created, the layers enabled for that instance will continue to be enabled and valid for the lifetime of that instance, even if some of them become unavailable for future instances.

Valid Usage (Implicit)

- VUID-vkEnumerateInstanceLayerProperties-pPropertyCount-parameter
  `pPropertyCount` must be a valid pointer to a `uint32_t` value

- VUID-vkEnumerateInstanceLayerProperties-pProperties-parameter
  If the value referenced by `pPropertyCount` is not `0`, and `pProperties` is not `NULL`, `pProperties` must be a valid pointer to an array of `pPropertyCount` VkLayerProperties structures

Return Codes

Success

  - VK_INCOMPLETE

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkLayerProperties` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkLayerProperties {
        char        layerName[VK_MAX_EXTENSION_NAME_SIZE];
        uint32_t    specVersion;
        uint32_t    implementationVersion;
        char        description[VK_MAX_DESCRIPTION_SIZE];
    } VkLayerProperties;

- `layerName` is an array of VK_MAX_EXTENSION_NAME_SIZE `char` containing a null-terminated UTF-8 string which is the name of the layer. Use this name in the `ppEnabledLayerNames` array passed in the VkInstanceCreateInfo structure to enable this layer for an instance.

- `specVersion` is the Vulkan version the layer was written to, encoded as described in Version Numbers.

- `implementationVersion` is the version of this layer. It is an integer, increasing with backward compatible changes.

- `description` is an array of VK_MAX_DESCRIPTION_SIZE `char` containing a null-terminated UTF-8 string which provides additional details that can be used by the application to identify the layer.

VK_MAX_EXTENSION_NAME_SIZE is the length in `char` values of an array containing a layer or extension name string, as returned in VkLayerProperties::`layerName`, VkExtensionProperties::`extensionName`, and other queries.

    #define VK_MAX_EXTENSION_NAME_SIZE        256U

VK_MAX_DESCRIPTION_SIZE is the length in `char` values of an array containing a string with additional descriptive information about a query, as returned in VkLayerProperties::`description` and other queries.

    #define VK_MAX_DESCRIPTION_SIZE           256U

To enable a layer, the name of the layer should be added to the `ppEnabledLayerNames` member of VkInstanceCreateInfo when creating a `VkInstance`.

Loader implementations may provide mechanisms outside the Vulkan API for enabling specific layers. Layers enabled through such a mechanism are implicitly enabled, while layers enabled by including the layer name in the `ppEnabledLayerNames` member of VkInstanceCreateInfo are explicitly enabled. Implicitly enabled layers are loaded before explicitly enabled layers, such that implicitly enabled layers are closer to the application, and explicitly enabled layers are closer to the driver. Except where otherwise specified, implicitly enabled and explicitly enabled layers differ only in the way they are enabled, and the order in which they are loaded. Explicitly enabling a layer that is implicitly enabled results in this layer being loaded as an implicitly enabled layer; it has no additional effect.

To enumerate device layers, call:

Warning | This functionality is superseded by Vulkan Version 1.0. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_0
    VkResult vkEnumerateDeviceLayerProperties(
        VkPhysicalDevice                            physicalDevice,
        uint32_t*                                   pPropertyCount,
        VkLayerProperties*                          pProperties);

- `physicalDevice` is the physical device that will be queried.

- `pPropertyCount` is a pointer to an integer related to the number of layer properties available or queried.

- `pProperties` is either `NULL` or a pointer to an array of VkLayerProperties structures.

If `pProperties` is `NULL`, then the number of layer properties available is returned in `pPropertyCount`. Otherwise, `pPropertyCount` must point to a variable set by the application to the number of elements in the `pProperties` array, and on return the variable is overwritten with the number of structures actually written to `pProperties`. If `pPropertyCount` is less than the number of layer properties available, at most `pPropertyCount` structures will be written, and VK_INCOMPLETE will be returned instead of VK_SUCCESS, to indicate that not all the available properties were returned.

The list of layers enumerated by `vkEnumerateDeviceLayerProperties` must be exactly the sequence of layers enabled for the instance. The members of `VkLayerProperties` for each enumerated layer must be the same as the properties when the layer was enumerated by `vkEnumerateInstanceLayerProperties`.

Note | Due to platform details on Android, `vkEnumerateDeviceLayerProperties` may be called with `physicalDevice` equal to `NULL` during layer discovery. This behavior will only be observed by layer implementations, and not the underlying Vulkan driver.

Valid Usage (Implicit)

- VUID-vkEnumerateDeviceLayerProperties-physicalDevice-parameter
  `physicalDevice` must be a valid VkPhysicalDevice handle

- VUID-vkEnumerateDeviceLayerProperties-pPropertyCount-parameter
  `pPropertyCount` must be a valid pointer to a `uint32_t` value

- VUID-vkEnumerateDeviceLayerProperties-pProperties-parameter
  If the value referenced by `pPropertyCount` is not `0`, and `pProperties` is not `NULL`, `pProperties` must be a valid pointer to an array of `pPropertyCount` VkLayerProperties structures

Return Codes

Success

  - VK_INCOMPLETE

  - VK_SUCCESS

Failure

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `ppEnabledLayerNames` and `enabledLayerCount` members of VkDeviceCreateInfo are legacy and their values must be ignored by implementations. However, for compatibility, only an empty list of layers or a list that exactly matches the sequence enabled at instance creation time are valid, and validation layers should issue diagnostics for other cases.

Regardless of the enabled layer list provided in VkDeviceCreateInfo, the sequence of layers active for a device will be exactly the sequence of layers enabled when the parent instance was created.

### 54.5. Extensions

Extensions may define new Vulkan commands, structures, and enumerants. For compilation purposes, the interfaces defined by registered extensions, including new structures and enumerants as well as function pointer types for new commands, are defined in the Khronos-supplied `vulkan_core.h` together with the core API. However, commands defined by extensions may not be available for static linking - in which case function pointers to these commands should be queried at runtime as described in Command Function Pointers. Extensions may be provided by layers as well as by a Vulkan implementation.

Because extensions may extend or change the behavior of the Vulkan API, extension authors should add support for their extensions to the Khronos validation layers. This is especially important for new commands whose parameters have been wrapped by the validation layers. See the “Architecture of the Vulkan Loader Interfaces” document for additional information.

Note | To enable an instance extension, the name of the extension can be added to the `ppEnabledExtensionNames` member of VkInstanceCreateInfo when creating a `VkInstance`. To enable a device extension, the name of the extension can be added to the `ppEnabledExtensionNames` member of VkDeviceCreateInfo when creating a `VkDevice`. Physical-Device-Level functionality does not have any enabling mechanism and can be used as long as the VkPhysicalDevice supports the device extension as determined by vkEnumerateDeviceExtensionProperties. Enabling an extension (with no further use of that extension) does not change the behavior of functionality exposed by the core Vulkan API or any other extension, other than making valid the use of the commands, enums and structures defined by that extension. Valid Usage sections for individual commands and structures do not currently contain which extensions have to be enabled in order to make their use valid, although they might do so in the future. It is defined only in the Valid Usage for Extensions section.

#### 54.5.1. Instance Extensions

Instance extensions add new global or instance-level functionality to the API, outside of the core specification. Instance extensions may also add physical-device-level functionality.

To query the available instance extensions, call:

    // Provided by VK_VERSION_1_0
    VkResult vkEnumerateInstanceExtensionProperties(
        const char*                                 pLayerName,
        uint32_t*                                   pPropertyCount,
        VkExtensionProperties*                      pProperties);

- `pLayerName` is either `NULL` or a pointer to a null-terminated UTF-8 string naming the layer to retrieve extensions from.

- `pPropertyCount` is a pointer to an integer related to the number of extension properties available or queried, as described below.

- `pProperties` is either `NULL` or a pointer to an array of VkExtensionProperties structures.

When `pLayerName` parameter is `NULL`, only extensions provided by the Vulkan implementation or by implicitly enabled layers are returned. When `pLayerName` is the name of a layer, the instance extensions provided by that layer are returned.

If `pProperties` is `NULL`, then the number of extensions properties available is returned in `pPropertyCount`. Otherwise, `pPropertyCount` must point to a variable set by the application to the number of elements in the `pProperties` array, and on return the variable is overwritten with the number of structures actually written to `pProperties`. If `pPropertyCount` is less than the number of extension properties available, at most `pPropertyCount` structures will be written, and VK_INCOMPLETE will be returned instead of VK_SUCCESS, to indicate that not all the available properties were returned.

Because the list of available layers may change externally between calls to vkEnumerateInstanceExtensionProperties, two calls may retrieve different results if a `pLayerName` is available in one call but not in another. The extensions supported by a layer may also change between two calls, e.g. if the layer implementation is replaced by a different version between those calls.

Implementations must not advertise any pair of extensions that cannot be enabled together due to behavioral differences, or any extension that cannot be enabled against the advertised version.

Valid Usage (Implicit)

- VUID-vkEnumerateInstanceExtensionProperties-pLayerName-parameter
  If `pLayerName` is not `NULL`, `pLayerName` must be a null-terminated UTF-8 string

- VUID-vkEnumerateInstanceExtensionProperties-pPropertyCount-parameter
  `pPropertyCount` must be a valid pointer to a `uint32_t` value

- VUID-vkEnumerateInstanceExtensionProperties-pProperties-parameter
  If the value referenced by `pPropertyCount` is not `0`, and `pProperties` is not `NULL`, `pProperties` must be a valid pointer to an array of `pPropertyCount` VkExtensionProperties structures

Return Codes

Success

  - VK_INCOMPLETE

  - VK_SUCCESS

Failure

  - VK_ERROR_LAYER_NOT_PRESENT

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

#### 54.5.2. Device Extensions

Device extensions add new device-level functionality to the API, outside of the core specification. If Vulkan 1.1 or VK_KHR_get_physical_device_properties2 is required by the extension, it may also add new physical-device-level functionality.

To query the extensions available to a given physical device, call:

    // Provided by VK_VERSION_1_0
    VkResult vkEnumerateDeviceExtensionProperties(
        VkPhysicalDevice                            physicalDevice,
        const char*                                 pLayerName,
        uint32_t*                                   pPropertyCount,
        VkExtensionProperties*                      pProperties);

- `physicalDevice` is the physical device that will be queried.

- `pLayerName` is either `NULL` or a pointer to a null-terminated UTF-8 string naming the layer to retrieve extensions from.

- `pPropertyCount` is a pointer to an integer related to the number of extension properties available or queried, and is treated in the same fashion as the vkEnumerateInstanceExtensionProperties::`pPropertyCount` parameter.

- `pProperties` is either `NULL` or a pointer to an array of VkExtensionProperties structures.

When `pLayerName` parameter is `NULL`, only extensions provided by the Vulkan implementation or by implicitly enabled layers are returned. When `pLayerName` is the name of a layer, the device extensions provided by that layer are returned.

Implementations must not advertise any pair of extensions that cannot be enabled together due to behavioral differences, or any extension that cannot be enabled against the advertised version.

If the `VK_KHR_ray_tracing_pipeline` extension is advertised as supported by this query, the `VK_KHR_pipeline_library` extension must also be supported.

If the `VK_EXT_descriptor_heap` extension is advertised as supported by this query, the `VK_KHR_shader_untyped_pointers` extension must also be supported.

Note | Due to platform details on Android, `vkEnumerateDeviceExtensionProperties` may be called with `physicalDevice` equal to `NULL` during layer discovery. This behavior will only be observed by layer implementations, and not the underlying Vulkan driver.

Valid Usage (Implicit)

- VUID-vkEnumerateDeviceExtensionProperties-physicalDevice-parameter
  `physicalDevice` must be a valid VkPhysicalDevice handle

- VUID-vkEnumerateDeviceExtensionProperties-pLayerName-parameter
  If `pLayerName` is not `NULL`, `pLayerName` must be a null-terminated UTF-8 string

- VUID-vkEnumerateDeviceExtensionProperties-pPropertyCount-parameter
  `pPropertyCount` must be a valid pointer to a `uint32_t` value

- VUID-vkEnumerateDeviceExtensionProperties-pProperties-parameter
  If the value referenced by `pPropertyCount` is not `0`, and `pProperties` is not `NULL`, `pProperties` must be a valid pointer to an array of `pPropertyCount` VkExtensionProperties structures

Return Codes

Success

  - VK_INCOMPLETE

  - VK_SUCCESS

Failure

  - VK_ERROR_LAYER_NOT_PRESENT

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

The `VkExtensionProperties` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkExtensionProperties {
        char        extensionName[VK_MAX_EXTENSION_NAME_SIZE];
        uint32_t    specVersion;
    } VkExtensionProperties;

- `extensionName` is an array of VK_MAX_EXTENSION_NAME_SIZE `char` containing a null-terminated UTF-8 string which is the name of the extension.

- `specVersion` is the version of this extension. It is an integer, incremented with backward compatible changes.

### 54.6. Extension Dependencies

Some extensions are dependent on other extensions, or on specific core API versions, to function. To enable extensions with dependencies, any required extensions must also be enabled through the same API mechanisms when creating an instance with vkCreateInstance or a device with vkCreateDevice. Each extension which has such dependencies documents them in the appendix summarizing that extension.

If an extension is supported (as queried by vkEnumerateInstanceExtensionProperties or vkEnumerateDeviceExtensionProperties), then required extensions of that extension must also be supported for the same instance or physical device.

Any device extension that has an instance extension dependency that is not enabled by vkCreateInstance is considered to be unsupported, hence it must not be returned by vkEnumerateDeviceExtensionProperties for any VkPhysicalDevice child of the instance. Instance extensions do not have dependencies on device extensions.

If a required extension has been promoted to another extension or to a core API version, then as a general rule, the dependency is also satisfied by the promoted extension or core version. This will be true so long as any features required by the original extension are also required or enabled by the promoted extension or core version. However, in some cases an extension is promoted while making some of its features optional in the promoted extension or core version. In this case, the dependency may not be satisfied. The only way to be certain is to look at the descriptions of the original dependency and the promoted version in the Layers & Extensions and Core Revisions appendices.

Note | There is metadata in `vk.xml` describing some aspects of promotion, especially `requires`, `promotedto` and `deprecatedby` attributes of `<extension>` tags. However, the metadata does not yet fully describe this scenario. In the future, we may extend the XML schema to describe the full set of extensions and versions satisfying a dependency. As discussed in more detail for Promotion below, when an extension is promoted it does not mean that a mechanical substitution of an extension API by the corresponding promoted API will work in exactly the same fashion; be supported at runtime; or even exist.

### 54.7. Compatibility Guarantees (Informative)

This section is marked as informal as there is no binding responsibility on implementations of the Vulkan API - these guarantees are however a contract between the Vulkan Working Group and developers using this Specification.

#### 54.7.1. Core Versions

Each of the major, minor, and patch versions of the Vulkan specification provide different compatibility guarantees.

##### Patch Versions

A difference in the patch version indicates that a set of bug fixes or clarifications have been made to the Specification. Informative enums returned by Vulkan commands that will not affect the runtime behavior of a valid application may be added in a patch version (e.g. VkVendorId).

The specification’s patch version is strictly increasing for a given major version of the specification; any change to a specification as described above will result in the patch version being increased by 1. Patch versions are applied to all minor versions, even if a given minor version is not affected by the provoking change.

Specifications with different patch versions but the same major and minor version are fully compatible with each other - such that a valid application written against one will work with an implementation of another.

Note | If a patch version includes a bug fix or clarification that could have a significant impact on developer expectations, these will be highlighted in the change log. Generally the Vulkan Working Group tries to avoid these kinds of changes, instead fixing them in either an extension or core version.

##### Minor Versions

Changes in the minor version of the specification indicate that new functionality has been added to the core specification. This will usually include new interfaces in the header, and may also include behavior changes and bug fixes. Core functionality may be marked as legacy in a minor version, but will not be obsoleted or removed.

The specification’s minor version is strictly increasing for a given major version of the specification; any change to a specification as described above will result in the minor version being increased by 1. Changes that can be accommodated in a patch version will not increase the minor version.

Specifications with a lower minor version are backwards compatible with an implementation of a specification with a higher minor version for core functionality and extensions issued with the KHR vendor tag. Vendor and multi-vendor extensions are not guaranteed to remain functional across minor versions, though in general they are with few exceptions - see Obsoletion for more information.

##### Major Versions

A difference in the major version of specifications indicates a large set of changes which will likely include interface changes, behavioral changes, removal of legacy functionality, and the modification, addition, or replacement of other functionality.

The specification’s major version is monotonically increasing; any change to the specification as described above will result in the major version being increased. Changes that can be accommodated in a patch or minor version will not increase the major version.

The Vulkan Working Group intends to only issue a new major version of the Specification in order to realize significant improvements to the Vulkan API that will necessarily require breaking compatibility.

A new major version will likely include a wholly new version of the specification to be issued - which could include an overhaul of the versioning semantics for the minor and patch versions. The patch and minor versions of a specification are therefore not meaningful across major versions. If a major version of the specification includes similar versioning semantics, it is expected that the patch and the minor version will be reset to 0 for that major version.

#### 54.7.2. Extensions

A KHR extension must be able to be enabled alongside any other KHR extension, and for any minor or patch version of the core Specification beyond the minimum version it requires. A multi-vendor extension should be able to be enabled alongside any KHR extension or other multi-vendor extension, and for any minor or patch version of the core Specification beyond the minimum version it requires. A vendor extension should be able to be enabled alongside any KHR extension, multi-vendor extension, or other vendor extension from the same vendor, and for any minor or patch version of the core Specification beyond the minimum version it requires. A vendor extension may be able to be enabled alongside vendor extensions from another vendor.

The one other exception to this is if a vendor or multi-vendor extension is made obsolete by either a core version or another extension, which will be highlighted in the extension appendix.

##### Promotion

Extensions, or features of an extension, may be promoted to a new core version of the API, or a newer extension which an equal or greater number of implementors are in favor of.

Note | Structure and enumerated types defined in extensions that were promoted to core in a later version of Vulkan are defined in terms of the equivalent Vulkan core interfaces in that version and its successors. This affects the Vulkan Specification, the Vulkan header files, and the corresponding XML Registry.

When extension functionality is promoted, minor changes may be introduced, limited to the following:

- Naming

- Non-intrusive parameter changes

- Feature advertisement/enablement

- Combining structure parameters into larger structures

- Author ID suffixes changed or removed

Note | If extension functionality is promoted, there is no guarantee of direct compatibility, however it should require little effort to port code from the original feature to the promoted one. The Vulkan Working Group endeavors to ensure that larger changes are marked as either deprecated or obsoleted as appropriate, and can do so retroactively if necessary.

Extensions that are promoted are listed as being promoted in their extension appendices, with reference to where they were promoted to.

When an extension is promoted, any backwards compatibility aliases which exist in the extension will not be promoted.

Note | As a hypothetical example, if the `VK_KHR_surface` extension were promoted to part of a future core version, the `VK_COLOR_SPACE_SRGB_NONLINEAR_KHR` token defined by that extension would be promoted to `VK_COLOR_SPACE_SRGB_NONLINEAR`. However, the `VK_COLORSPACE_SRGB_NONLINEAR_KHR` token aliases `VK_COLOR_SPACE_SRGB_NONLINEAR_KHR`. The `VK_COLORSPACE_SRGB_NONLINEAR_KHR` would not be promoted, because it is a backwards compatibility alias that exists only due to a naming mistake when the extension was initially published.

##### Deprecation

Extensions may be marked as deprecated when they are no longer intended to be used by applications under certain conditions. Generally, a new feature will become available to solve the use case in another extension or core version of the API, but it is not guaranteed.

Note | Features that are intended to replace deprecated functionality have no guarantees of compatibility, and applications may require drastic modification in order to make use of the new features.

Extensions that are deprecated are listed as being deprecated in their extension appendices, with an explanation of the deprecation and any related features that are relevant.

##### Obsoletion

Occasionally, an extension will be marked as obsolete if a new version of the core API or a new extension is fundamentally incompatible with it. An obsoleted extension must not be used with the extension or core version that obsoleted it.

Extensions that are obsoleted are listed as being obsoleted in their extension appendices, with reference to what they were obsoleted by.

##### Aliases

When an extension is promoted or deprecated by a newer feature, some or all of its functionality may be replicated into the newer feature. Rather than duplication of all the documentation and definitions, the specification instead identifies the identical commands and types as aliases of one another. Each alias is mentioned together with the definition it aliases, with the older aliases marked as “equivalents”. Each alias of the same command has identical behavior, and each alias of the same type has identical meaning - they can be used interchangeably in an application with no compatibility issues.

Note | For promoted types, the aliased extension type is semantically identical to the new core type. The C99 headers simply `typedef` the older aliases to the promoted types. For promoted command aliases, however, there are two separate command definitions, due to the fact that the C99 ABI has no way to alias command definitions without resorting to macros. Calling either command will produce identical behavior within the bounds of the specification, and should still invoke the same path in the implementation. Debug tools may use separate commands with different debug behavior; to write the appropriate command name to an output log, for instance.

##### Special Use Extensions

Some extensions exist only to support a specific purpose or specific class of application. These are referred to as “special use extensions”. Use of these extensions in applications not meeting the special use criteria is not recommended.

Special use cases are restricted, and only those defined below are used to describe extensions:

Table 71. Extension Special Use Cases
Special Use | XML Tag | Full Description
--- | --- | ---
CAD support | cadsupport | Extension is intended to support specialized functionality used by CAD/CAM applications.
D3D support | d3demulation | Extension is intended to support D3D emulation layers, and applications ported from D3D, by adding functionality specific to D3D.
Developer tools | devtools | Extension is intended to support developer tools such as capture-replay libraries.
Debugging tools | debugging | Extension is intended for use by applications when debugging.
OpenGL / ES support | glemulation | Extension is intended to support OpenGL and/or OpenGL ES emulation layers, and applications ported from those APIs, by adding functionality specific to those APIs.

Special use extensions are identified in the metadata for each such extension in the Layers & Extensions appendix, using the name in the “Special Use” column above.

Special use extensions are also identified in `vk.xml` with the short name in “XML Tag” column above, as described in the “API Extensions (`extension` tag)” section of the registry schema documentation.

## 55. Features

Features advertise additional functionality which can be enabled in the API. If a feature is supported by a physical device, it must be enabled when creating a VkDevice in order to use its associated functionality with that VkDevice. If a feature is unsupported, that functionality cannot be used with that VkDevice.

Note | Features are reported via the extensible structure `VkPhysicalDeviceFeatures2`, which was added in the `VK_KHR_get_physical_device_properties2` extension and included in Vulkan 1.1. When new features are added in future Vulkan versions or extensions, each extension should introduce one new feature structure, if needed. This structure can be added to the `pNext` chain of the `VkPhysicalDeviceFeatures2` structure.

For convenience, new core versions of Vulkan may introduce new unified feature structures for features promoted from extensions. At the same time, the extension’s original feature structure (if any) is also promoted to the core API, and is an alias of the extension’s structure. This results in multiple names for the same feature: in the original extension’s feature structure and the promoted structure alias, in the unified feature structure. When a feature was implicitly supported and enabled in the extension, but an explicit name was added during promotion, then the extension itself acts as an alias for the feature as listed in the table below.

All aliases of the same feature in the core API must be reported consistently: either all must be reported as supported, or none of them. When a promoted extension is available, any corresponding feature aliases must be supported.

Table 72. Extension Feature Aliases
Extension | Feature(s)
--- | ---
`VK_KHR_shader_draw_parameters` | `shaderDrawParameters`
`VK_KHR_draw_indirect_count` | `drawIndirectCount`
`VK_KHR_sampler_mirror_clamp_to_edge` | `samplerMirrorClampToEdge`
`VK_EXT_descriptor_indexing` | `descriptorIndexing`
`VK_EXT_sampler_filter_minmax` | `samplerFilterMinmax`
`VK_EXT_shader_viewport_index_layer` | `shaderOutputViewportIndex`, `shaderOutputLayer`
`VK_KHR_push_descriptor` | `pushDescriptor`

To query supported features, call:

Warning | This functionality is superseded by vkGetPhysicalDeviceFeatures2. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_0
    void vkGetPhysicalDeviceFeatures(
        VkPhysicalDevice                            physicalDevice,
        VkPhysicalDeviceFeatures*                   pFeatures);

- `physicalDevice` is the physical device from which to query the supported features.

- `pFeatures` is a pointer to a VkPhysicalDeviceFeatures structure in which the physical device features are returned. For each feature, a value of VK_TRUE specifies that the feature is supported on this physical device, and VK_FALSE specifies that the feature is not supported.

Valid Usage (Implicit)

- VUID-vkGetPhysicalDeviceFeatures-physicalDevice-parameter
  `physicalDevice` must be a valid VkPhysicalDevice handle

- VUID-vkGetPhysicalDeviceFeatures-pFeatures-parameter
  `pFeatures` must be a valid pointer to a VkPhysicalDeviceFeatures structure

Fine-grained features used by a logical device must be enabled at `VkDevice` creation time. If a feature is enabled that the physical device does not support, `VkDevice` creation will fail and return VK_ERROR_FEATURE_NOT_PRESENT.

The fine-grained features are enabled by passing a pointer to the `VkPhysicalDeviceFeatures` structure via the `pEnabledFeatures` member of the VkDeviceCreateInfo structure that is passed into the `vkCreateDevice` call. If a member of `pEnabledFeatures` is VK_TRUE or VK_FALSE, then the device will be created with the indicated feature enabled or disabled, respectively. Features can also be enabled by using the VkPhysicalDeviceFeatures2 structure.

If an application wishes to enable all features supported by a device, it can simply pass in the `VkPhysicalDeviceFeatures` structure that was previously returned by `vkGetPhysicalDeviceFeatures`. To disable an individual feature, the application can set the desired member to VK_FALSE in the same structure. Setting `pEnabledFeatures` to `NULL` and not including a VkPhysicalDeviceFeatures2 in the `pNext` chain of VkDeviceCreateInfo is equivalent to setting all members of the structure to VK_FALSE.

Note | Some features, such as `robustBufferAccess`, may incur a runtime performance cost. Application writers should carefully consider the implications of enabling all supported features.

To query supported features defined by the core or extensions, call:

    // Provided by VK_VERSION_1_1
    void vkGetPhysicalDeviceFeatures2(
        VkPhysicalDevice                            physicalDevice,
        VkPhysicalDeviceFeatures2*                  pFeatures);

    // Provided by VK_KHR_get_physical_device_properties2
    // Equivalent to vkGetPhysicalDeviceFeatures2
    void vkGetPhysicalDeviceFeatures2KHR(
        VkPhysicalDevice                            physicalDevice,
        VkPhysicalDeviceFeatures2*                  pFeatures);

- `physicalDevice` is the physical device from which to query the supported features.

- `pFeatures` is a pointer to a VkPhysicalDeviceFeatures2 structure in which the physical device features are returned.

Each structure in `pFeatures` and its `pNext` chain contains members corresponding to fine-grained features. Each structure in `pFeatures` and its `pNext` chain contains VkBool32 members corresponding to fine-grained features. Each such member is returned with a VK_TRUE value indicating that feature is supported on this physical device, or a VK_FALSE value indicating it is unsupported.

Valid Usage (Implicit)

- VUID-vkGetPhysicalDeviceFeatures2-physicalDevice-parameter
  `physicalDevice` must be a valid VkPhysicalDevice handle

- VUID-vkGetPhysicalDeviceFeatures2-pFeatures-parameter
  `pFeatures` must be a valid pointer to a VkPhysicalDeviceFeatures2 structure

The `VkPhysicalDeviceFeatures2` structure is defined as:

    // Provided by VK_VERSION_1_1
    typedef struct VkPhysicalDeviceFeatures2 {
        VkStructureType             sType;
        void*                       pNext;
        VkPhysicalDeviceFeatures    features;
    } VkPhysicalDeviceFeatures2;

    // Provided by VK_KHR_get_physical_device_properties2
    // Equivalent to VkPhysicalDeviceFeatures2
    typedef VkPhysicalDeviceFeatures2 VkPhysicalDeviceFeatures2KHR;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `features` is a VkPhysicalDeviceFeatures structure describing the fine-grained features of the Vulkan 1.0 API.

The `pNext` chain of this structure is used to extend the structure with features defined by extensions. This structure can be used in vkGetPhysicalDeviceFeatures2 or can be included in the `pNext` chain of a VkDeviceCreateInfo structure, in which case it controls which features are enabled in lieu of `pEnabledFeatures`.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceFeatures2-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2

Structure Chaining

Extends the structure

  - VkDeviceCreateInfo

The `VkPhysicalDeviceFeatures` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkPhysicalDeviceFeatures {
        VkBool32    robustBufferAccess;
        VkBool32    fullDrawIndexUint32;
        VkBool32    imageCubeArray;
        VkBool32    independentBlend;
        VkBool32    geometryShader;
        VkBool32    tessellationShader;
        VkBool32    sampleRateShading;
        VkBool32    dualSrcBlend;
        VkBool32    logicOp;
        VkBool32    multiDrawIndirect;
        VkBool32    drawIndirectFirstInstance;
        VkBool32    depthClamp;
        VkBool32    depthBiasClamp;
        VkBool32    fillModeNonSolid;
        VkBool32    depthBounds;
        VkBool32    wideLines;
        VkBool32    largePoints;
        VkBool32    alphaToOne;
        VkBool32    multiViewport;
        VkBool32    samplerAnisotropy;
        VkBool32    textureCompressionETC2;
        VkBool32    textureCompressionASTC_LDR;
        VkBool32    textureCompressionBC;
        VkBool32    occlusionQueryPrecise;
        VkBool32    pipelineStatisticsQuery;
        VkBool32    vertexPipelineStoresAndAtomics;
        VkBool32    fragmentStoresAndAtomics;
        VkBool32    shaderTessellationAndGeometryPointSize;
        VkBool32    shaderImageGatherExtended;
        VkBool32    shaderStorageImageExtendedFormats;
        VkBool32    shaderStorageImageMultisample;
        VkBool32    shaderStorageImageReadWithoutFormat;
        VkBool32    shaderStorageImageWriteWithoutFormat;
        VkBool32    shaderUniformBufferArrayDynamicIndexing;
        VkBool32    shaderSampledImageArrayDynamicIndexing;
        VkBool32    shaderStorageBufferArrayDynamicIndexing;
        VkBool32    shaderStorageImageArrayDynamicIndexing;
        VkBool32    shaderClipDistance;
        VkBool32    shaderCullDistance;
        VkBool32    shaderFloat64;
        VkBool32    shaderInt64;
        VkBool32    shaderInt16;
        VkBool32    shaderResourceResidency;
        VkBool32    shaderResourceMinLod;
        VkBool32    sparseBinding;
        VkBool32    sparseResidencyBuffer;
        VkBool32    sparseResidencyImage2D;
        VkBool32    sparseResidencyImage3D;
        VkBool32    sparseResidency2Samples;
        VkBool32    sparseResidency4Samples;
        VkBool32    sparseResidency8Samples;
        VkBool32    sparseResidency16Samples;
        VkBool32    sparseResidencyAliased;
        VkBool32    variableMultisampleRate;
        VkBool32    inheritedQueries;
    } VkPhysicalDeviceFeatures;

This structure describes the following features:

- `robustBufferAccess` enables Robust Buffer Access guarantees for shader buffer accesses.

- `fullDrawIndexUint32` specifies the full 32-bit range of indices is supported for indexed draw calls when using a VkIndexType of VK_INDEX_TYPE_UINT32. `maxDrawIndexedIndexValue` is the maximum index value that may be used (aside from the primitive restart index, which is always 232-1 when the VkIndexType is VK_INDEX_TYPE_UINT32). If this feature is supported, `maxDrawIndexedIndexValue` must be 232-1; otherwise it must be no smaller than 224-1. See `maxDrawIndexedIndexValue`.

- `imageCubeArray` specifies whether image views with a VkImageViewType of VK_IMAGE_VIEW_TYPE_CUBE_ARRAY can be created, and that the corresponding `SampledCubeArray` and `ImageCubeArray` SPIR-V capabilities can be used in shader code.

- `independentBlend` specifies whether the `VkPipelineColorBlendAttachmentState` settings are controlled independently per-attachment. If this feature is not enabled, the `VkPipelineColorBlendAttachmentState` settings for all color attachments must be identical. Otherwise, a different `VkPipelineColorBlendAttachmentState` can be provided for each bound color attachment.

- `geometryShader` specifies whether geometry shaders are supported. If this feature is not enabled, the VK_SHADER_STAGE_GEOMETRY_BIT and VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT enum values must not be used. This also specifies whether shader modules can declare the `Geometry` capability.

- `tessellationShader` specifies whether tessellation control and evaluation shaders are supported. If this feature is not enabled, the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT, VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT, VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT, and VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO enum values must not be used. This also specifies whether shader modules can declare the `Tessellation` capability.

- `sampleRateShading` specifies whether Sample Shading and multisample interpolation are supported. If this feature is not enabled, the `sampleShadingEnable` member of the VkPipelineMultisampleStateCreateInfo structure must be VK_FALSE and the `minSampleShading` member is ignored. This also specifies whether shader modules can declare the `SampleRateShading` capability.

- `dualSrcBlend` specifies whether blend operations which take two sources are supported. If this feature is not enabled, the VK_BLEND_FACTOR_SRC1_COLOR, VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR, VK_BLEND_FACTOR_SRC1_ALPHA, and VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA enum values must not be used as source or destination blending factors. See Dual-Source Blending.

- `logicOp` specifies whether logic operations are supported. If this feature is not enabled, the `logicOpEnable` member of the VkPipelineColorBlendStateCreateInfo structure must be VK_FALSE, and the `logicOp` member is ignored.

- `multiDrawIndirect` specifies whether multiple draw indirect is supported. If this feature is not enabled, the `drawCount` parameter to the vkCmdDrawIndirect and vkCmdDrawIndexedIndirect commands must be 0 or 1. The `maxDrawIndirectCount` member of the `VkPhysicalDeviceLimits` structure must also be 1 if this feature is not supported. See `maxDrawIndirectCount`.

- `drawIndirectFirstInstance` specifies whether indirect drawing calls support the `firstInstance` parameter. If this feature is not enabled, the `firstInstance` member of all `VkDrawIndirectCommand` and `VkDrawIndexedIndirectCommand` structures that are provided to the vkCmdDrawIndirect and vkCmdDrawIndexedIndirect commands must be 0.

- `depthClamp` specifies whether depth clamping is supported. If this feature is not enabled, the `depthClampEnable` member of the VkPipelineRasterizationStateCreateInfo structure must be VK_FALSE. Otherwise, setting `depthClampEnable` to VK_TRUE will enable depth clamping.

- `depthBiasClamp` specifies whether depth bias clamping is supported. If this feature is not enabled, the `depthBiasClamp` member of the VkPipelineRasterizationStateCreateInfo structure must be 0.0 unless the VK_DYNAMIC_STATE_DEPTH_BIAS dynamic state is enabled, in which case the `depthBiasClamp` parameter to vkCmdSetDepthBias must be 0.0.

- `fillModeNonSolid` specifies whether point and wireframe fill modes are supported. If this feature is not enabled, the VK_POLYGON_MODE_POINT and VK_POLYGON_MODE_LINE enum values must not be used.

- `depthBounds` specifies whether depth bounds tests are supported. If this feature is not enabled, the `depthBoundsTestEnable` member of the VkPipelineDepthStencilStateCreateInfo structure must be VK_FALSE unless the VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE dynamic state is enabled, in which case the `depthBoundsTestEnable` parameter to vkCmdSetDepthBoundsTestEnable must be VK_FALSE. When `depthBoundsTestEnable` is VK_FALSE, the `minDepthBounds` and `maxDepthBounds` members of the VkPipelineDepthStencilStateCreateInfo structure are ignored.

- `wideLines` specifies whether lines with width other than 1.0 are supported. If this feature is not enabled, the `lineWidth` member of the VkPipelineRasterizationStateCreateInfo structure must be 1.0 unless the VK_DYNAMIC_STATE_LINE_WIDTH dynamic state is enabled, in which case the `lineWidth` parameter to vkCmdSetLineWidth must be 1.0. When this feature is supported, the range and granularity of supported line widths are indicated by the `lineWidthRange` and `lineWidthGranularity` members of the `VkPhysicalDeviceLimits` structure, respectively.

- `largePoints` specifies whether points with size greater than 1.0 are supported. If this feature is not enabled, only a point size of 1.0 written by a shader is supported. The range and granularity of supported point sizes are indicated by the `pointSizeRange` and `pointSizeGranularity` members of the `VkPhysicalDeviceLimits` structure, respectively.

- `alphaToOne` specifies whether the implementation is able to replace the alpha value of the fragment shader color output in the Multisample Coverage fragment operation. If this feature is not enabled, then the `alphaToOneEnable` member of the VkPipelineMultisampleStateCreateInfo structure must be VK_FALSE. Otherwise setting `alphaToOneEnable` to VK_TRUE will enable alpha-to-one behavior.

- `multiViewport` specifies whether more than one viewport is supported. If this feature is not enabled:

  - The `viewportCount` and `scissorCount` members of the VkPipelineViewportStateCreateInfo structure must be 1.

  - The `firstViewport` and `viewportCount` parameters to the vkCmdSetViewport command must be 0 and 1, respectively.

  - The `firstScissor` and `scissorCount` parameters to the vkCmdSetScissor command must be 0 and 1, respectively.

  - The `exclusiveScissorCount` member of the VkPipelineViewportExclusiveScissorStateCreateInfoNV structure must be 0 or 1.

  - The `firstExclusiveScissor` and `exclusiveScissorCount` parameters to the vkCmdSetExclusiveScissorNV command must be 0 and 1, respectively.

- `samplerAnisotropy` specifies whether anisotropic filtering is supported. If this feature is not enabled, the `anisotropyEnable` member of the VkSamplerCreateInfo structure must be VK_FALSE.

- `textureCompressionETC2` specifies whether all of the ETC2 and EAC compressed texture formats are supported. If this feature is enabled, then the VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT, VK_FORMAT_FEATURE_BLIT_SRC_BIT and VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT features must be supported in `optimalTilingFeatures` for the following formats:

  - VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK

  - VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK

  - VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK

  - VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK

  - VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK

  - VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK

  - VK_FORMAT_EAC_R11_UNORM_BLOCK

  - VK_FORMAT_EAC_R11_SNORM_BLOCK

  - VK_FORMAT_EAC_R11G11_UNORM_BLOCK

  - VK_FORMAT_EAC_R11G11_SNORM_BLOCK

    To query for additional properties, or if the feature is not enabled, vkGetPhysicalDeviceFormatProperties and vkGetPhysicalDeviceImageFormatProperties can be used to check for supported properties of individual formats as normal.

- `textureCompressionASTC_LDR` specifies whether all of the ASTC LDR compressed texture formats are supported. If this feature is enabled, then the VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT, VK_FORMAT_FEATURE_BLIT_SRC_BIT and VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT features must be supported in `optimalTilingFeatures` for the following formats:

  - VK_FORMAT_ASTC_4x4_UNORM_BLOCK

  - VK_FORMAT_ASTC_4x4_SRGB_BLOCK

  - VK_FORMAT_ASTC_5x4_UNORM_BLOCK

  - VK_FORMAT_ASTC_5x4_SRGB_BLOCK

  - VK_FORMAT_ASTC_5x5_UNORM_BLOCK

  - VK_FORMAT_ASTC_5x5_SRGB_BLOCK

  - VK_FORMAT_ASTC_6x5_UNORM_BLOCK

  - VK_FORMAT_ASTC_6x5_SRGB_BLOCK

  - VK_FORMAT_ASTC_6x6_UNORM_BLOCK

  - VK_FORMAT_ASTC_6x6_SRGB_BLOCK

  - VK_FORMAT_ASTC_8x5_UNORM_BLOCK

  - VK_FORMAT_ASTC_8x5_SRGB_BLOCK

  - VK_FORMAT_ASTC_8x6_UNORM_BLOCK

  - VK_FORMAT_ASTC_8x6_SRGB_BLOCK

  - VK_FORMAT_ASTC_8x8_UNORM_BLOCK

  - VK_FORMAT_ASTC_8x8_SRGB_BLOCK

  - VK_FORMAT_ASTC_10x5_UNORM_BLOCK

  - VK_FORMAT_ASTC_10x5_SRGB_BLOCK

  - VK_FORMAT_ASTC_10x6_UNORM_BLOCK

  - VK_FORMAT_ASTC_10x6_SRGB_BLOCK

  - VK_FORMAT_ASTC_10x8_UNORM_BLOCK

  - VK_FORMAT_ASTC_10x8_SRGB_BLOCK

  - VK_FORMAT_ASTC_10x10_UNORM_BLOCK

  - VK_FORMAT_ASTC_10x10_SRGB_BLOCK

  - VK_FORMAT_ASTC_12x10_UNORM_BLOCK

  - VK_FORMAT_ASTC_12x10_SRGB_BLOCK

  - VK_FORMAT_ASTC_12x12_UNORM_BLOCK

  - VK_FORMAT_ASTC_12x12_SRGB_BLOCK

    To query for additional properties, or if the feature is not enabled, vkGetPhysicalDeviceFormatProperties and vkGetPhysicalDeviceImageFormatProperties can be used to check for supported properties of individual formats as normal.

- `textureCompressionBC` specifies whether all of the BC compressed texture formats are supported. If this feature is enabled, then the VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT, VK_FORMAT_FEATURE_BLIT_SRC_BIT and VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT features must be supported in `optimalTilingFeatures` for the following formats:

  - VK_FORMAT_BC1_RGB_UNORM_BLOCK

  - VK_FORMAT_BC1_RGB_SRGB_BLOCK

  - VK_FORMAT_BC1_RGBA_UNORM_BLOCK

  - VK_FORMAT_BC1_RGBA_SRGB_BLOCK

  - VK_FORMAT_BC2_UNORM_BLOCK

  - VK_FORMAT_BC2_SRGB_BLOCK

  - VK_FORMAT_BC3_UNORM_BLOCK

  - VK_FORMAT_BC3_SRGB_BLOCK

  - VK_FORMAT_BC4_UNORM_BLOCK

  - VK_FORMAT_BC4_SNORM_BLOCK

  - VK_FORMAT_BC5_UNORM_BLOCK

  - VK_FORMAT_BC5_SNORM_BLOCK

  - VK_FORMAT_BC6H_UFLOAT_BLOCK

  - VK_FORMAT_BC6H_SFLOAT_BLOCK

  - VK_FORMAT_BC7_UNORM_BLOCK

  - VK_FORMAT_BC7_SRGB_BLOCK

    To query for additional properties, or if the feature is not enabled, vkGetPhysicalDeviceFormatProperties and vkGetPhysicalDeviceImageFormatProperties can be used to check for supported properties of individual formats as normal.

- `occlusionQueryPrecise` specifies whether occlusion queries returning actual sample counts are supported. Occlusion queries are created in a `VkQueryPool` by specifying the `queryType` of VK_QUERY_TYPE_OCCLUSION in the VkQueryPoolCreateInfo structure which is passed to vkCreateQueryPool. If this feature is enabled, queries of this type can enable VK_QUERY_CONTROL_PRECISE_BIT in the `flags` parameter to vkCmdBeginQuery. If this feature is not supported, the implementation supports only boolean occlusion queries. When any samples are passed, boolean queries will return a non-zero result value, otherwise a result value of zero is returned. When this feature is enabled and VK_QUERY_CONTROL_PRECISE_BIT is set, occlusion queries will report the actual number of samples passed.

- `pipelineStatisticsQuery` specifies whether the pipeline statistics queries are supported. If this feature is not enabled, queries of type VK_QUERY_TYPE_PIPELINE_STATISTICS cannot be created, and none of the VkQueryPipelineStatisticFlagBits bits can be set in the `pipelineStatistics` member of the VkQueryPoolCreateInfo structure.

- `vertexPipelineStoresAndAtomics` specifies whether storage buffers and images support stores and atomic operations in the vertex, tessellation, and geometry shader stages. If this feature is not enabled, all storage image, storage texel buffer, and storage buffer variables used by these stages in shader modules must be decorated with the `NonWritable` decoration (or the `readonly` memory qualifier in GLSL).

- `fragmentStoresAndAtomics` specifies whether storage buffers and images support stores and atomic operations in the fragment shader stage. If this feature is not enabled, all storage image, storage texel buffer, and storage buffer variables used by the fragment stage in shader modules must be decorated with the `NonWritable` decoration (or the `readonly` memory qualifier in GLSL).

- `shaderTessellationAndGeometryPointSize` specifies whether the `PointSize` built-in decoration is available in the tessellation control, tessellation evaluation, and geometry shader stages. If this feature is not enabled, members decorated with the `PointSize` built-in decoration must not be read from or written to and all points written from a tessellation or geometry shader will have a size of 1.0. This also specifies whether shader modules can declare the `TessellationPointSize` capability for tessellation control and evaluation shaders, or if the shader modules can declare the `GeometryPointSize` capability for geometry shaders. An implementation supporting this feature must also support one or both of the `tessellationShader` or `geometryShader` features.

- `shaderImageGatherExtended` specifies whether the extended set of image gather instructions are available in shader code. If this feature is not enabled, the `OpImage*Gather` and `OpImageGatherQCOM` instructions do not support the `Offset` and `ConstOffsets` operands. The `OpImageGatherQCOM` instruction does not support the `ConstOffsets` operand regardless of the value of this feature. This also specifies whether shader modules can declare the `ImageGatherExtended` capability.

- `shaderStorageImageExtendedFormats` specifies whether all the “storage image extended formats” below are supported; if this feature is supported, then the VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT must be supported in `optimalTilingFeatures` for the following formats:

  - VK_FORMAT_R16G16_SFLOAT

  - VK_FORMAT_B10G11R11_UFLOAT_PACK32

  - VK_FORMAT_R16_SFLOAT

  - VK_FORMAT_R16G16B16A16_UNORM

  - VK_FORMAT_A2B10G10R10_UNORM_PACK32

  - VK_FORMAT_R16G16_UNORM

  - VK_FORMAT_R8G8_UNORM

  - VK_FORMAT_R16_UNORM

  - VK_FORMAT_R8_UNORM

  - VK_FORMAT_R16G16B16A16_SNORM

  - VK_FORMAT_R16G16_SNORM

  - VK_FORMAT_R8G8_SNORM

  - VK_FORMAT_R16_SNORM

  - VK_FORMAT_R8_SNORM

  - VK_FORMAT_R16G16_SINT

  - VK_FORMAT_R8G8_SINT

  - VK_FORMAT_R16_SINT

  - VK_FORMAT_R8_SINT

  - VK_FORMAT_A2B10G10R10_UINT_PACK32

  - VK_FORMAT_R16G16_UINT

  - VK_FORMAT_R8G8_UINT

  - VK_FORMAT_R16_UINT

  - VK_FORMAT_R8_UINT

    Note | `shaderStorageImageExtendedFormats` feature only adds a guarantee of format support, which is specified for the whole physical device. Therefore enabling or disabling the feature via vkCreateDevice has no practical effect. To query for additional properties, or if the feature is not supported, vkGetPhysicalDeviceFormatProperties and vkGetPhysicalDeviceImageFormatProperties can be used to check for supported properties of individual formats, as usual rules allow. VK_FORMAT_R32G32_UINT, VK_FORMAT_R32G32_SINT, and VK_FORMAT_R32G32_SFLOAT from `StorageImageExtendedFormats` SPIR-V capability, are already covered by core Vulkan mandatory format support.

- `shaderStorageImageMultisample` specifies whether multisampled storage images are supported. If this feature is not enabled, images that are created with the VK_IMAGE_USAGE_STORAGE_BIT usage flag set must be created with `samples` equal to VK_SAMPLE_COUNT_1_BIT. This also specifies whether shader modules can declare the `StorageImageMultisample` and `ImageMSArray` capabilities.

- `shaderStorageImageReadWithoutFormat` specifies whether storage images and storage texel buffers require a format qualifier to be specified when reading. `shaderStorageImageReadWithoutFormat` applies only to formats listed in the storage without format list.

- `shaderStorageImageWriteWithoutFormat` specifies whether storage images and storage texel buffers require a format qualifier to be specified when writing. `shaderStorageImageWriteWithoutFormat` applies only to formats listed in the storage without format list.

- `shaderUniformBufferArrayDynamicIndexing` specifies whether arrays of uniform buffers can be indexed by integer expressions that are dynamically uniform within either the subgroup or the invocation group in shader code. If this feature is not enabled, resources with a descriptor type of VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER or VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC must be indexed only by constant integral expressions when aggregated into arrays in shader code. This also specifies whether shader modules can declare the `UniformBufferArrayDynamicIndexing` capability.

- `shaderSampledImageArrayDynamicIndexing` specifies whether arrays of samplers or sampled images can be indexed by integer expressions that are dynamically uniform within either the subgroup or the invocation group in shader code. If this feature is not enabled, resources with a descriptor type of VK_DESCRIPTOR_TYPE_SAMPLER, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, or VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE must be indexed only by constant integral expressions when aggregated into arrays in shader code. This also specifies whether shader modules can declare the `SampledImageArrayDynamicIndexing` capability.

- `shaderStorageBufferArrayDynamicIndexing` specifies whether arrays of storage buffers can be indexed by integer expressions that are dynamically uniform within either the subgroup or the invocation group in shader code. If this feature is not enabled, resources with a descriptor type of VK_DESCRIPTOR_TYPE_STORAGE_BUFFER or VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC must be indexed only by constant integral expressions when aggregated into arrays in shader code. This also specifies whether shader modules can declare the `StorageBufferArrayDynamicIndexing` capability.

- `shaderStorageImageArrayDynamicIndexing` specifies whether arrays of storage images can be indexed by integer expressions that are dynamically uniform within either the subgroup or the invocation group in shader code. If this feature is not enabled, resources with a descriptor type of VK_DESCRIPTOR_TYPE_STORAGE_IMAGE must be indexed only by constant integral expressions when aggregated into arrays in shader code. This also specifies whether shader modules can declare the `StorageImageArrayDynamicIndexing` capability.

- `shaderClipDistance` specifies whether clip distances are supported in shader code. If this feature is not enabled, any members decorated with the `ClipDistance` built-in decoration must not be read from or written to in shader modules. This also specifies whether shader modules can declare the `ClipDistance` capability.

- `shaderCullDistance` specifies whether cull distances are supported in shader code. If this feature is not enabled, any members decorated with the `CullDistance` built-in decoration must not be read from or written to in shader modules. This also specifies whether shader modules can declare the `CullDistance` capability.

- `shaderFloat64` specifies whether 64-bit floats (doubles) are supported in shader code. If this feature is not enabled, 64-bit floating-point types must not be used in shader code. This also specifies whether shader modules can declare the `Float64` capability. Declaring and using 64-bit floats is enabled for all storage classes that SPIR-V allows with the `Float64` capability.

- `shaderInt64` specifies whether 64-bit integers (signed and unsigned) are supported in shader code. If this feature is not enabled, 64-bit integer types must not be used in shader code. This also specifies whether shader modules can declare the `Int64` capability. Declaring and using 64-bit integers is enabled for all storage classes that SPIR-V allows with the `Int64` capability.

- `shaderInt16` specifies whether 16-bit integers (signed and unsigned) are supported in shader code. If this feature is not enabled, 16-bit integer types must not be used in shader code. This also specifies whether shader modules can declare the `Int16` capability. However, this only enables a subset of the storage classes that SPIR-V allows for the `Int16` SPIR-V capability: Declaring and using 16-bit integers in the `Private`, `Workgroup` (for non-Block variables), and `Function` storage classes is enabled, while declaring them in the interface storage classes (e.g., `UniformConstant`, `Uniform`, `StorageBuffer`, `Input`, `Output`, and `PushConstant`) is not enabled.

- `shaderResourceResidency` specifies whether image operations that return resource residency information are supported in shader code. If this feature is not enabled, the `OpImageSparse*` instructions must not be used in shader code. This also specifies whether shader modules can declare the `SparseResidency` capability. The feature requires at least one of the `sparseResidency*` features to be supported.

- `shaderResourceMinLod` specifies whether image operations specifying the minimum resource LOD are supported in shader code. If this feature is not enabled, the `MinLod` image operand must not be used in shader code. This also specifies whether shader modules can declare the `MinLod` capability.

- `sparseBinding` specifies whether resource memory can be managed at opaque sparse block level instead of at the object level. If this feature is not enabled, resource memory must be bound only on a per-object basis using the vkBindBufferMemory and vkBindImageMemory commands. In this case, buffers and images must not be created with VK_BUFFER_CREATE_SPARSE_BINDING_BIT and VK_IMAGE_CREATE_SPARSE_BINDING_BIT set in the `flags` member of the VkBufferCreateInfo and VkImageCreateInfo structures, respectively. Otherwise resource memory can be managed as described in Sparse Resource Features.

- `sparseResidencyBuffer` specifies whether the device can access partially resident buffers. If this feature is not enabled, buffers must not be created with VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT set in the `flags` member of the VkBufferCreateInfo structure.

- `sparseResidencyImage2D` specifies whether the device can access partially resident 2D images with 1 sample per pixel. If this feature is not enabled, images with an `imageType` of VK_IMAGE_TYPE_2D and `samples` set to VK_SAMPLE_COUNT_1_BIT must not be created with VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT set in the `flags` member of the VkImageCreateInfo structure.

- `sparseResidencyImage3D` specifies whether the device can access partially resident 3D images. If this feature is not enabled, images with an `imageType` of VK_IMAGE_TYPE_3D must not be created with VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT set in the `flags` member of the VkImageCreateInfo structure.

- `sparseResidency2Samples` specifies whether the physical device can access partially resident 2D images with 2 samples per pixel. If this feature is not enabled, images with an `imageType` of VK_IMAGE_TYPE_2D and `samples` set to VK_SAMPLE_COUNT_2_BIT must not be created with VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT set in the `flags` member of the VkImageCreateInfo structure.

- `sparseResidency4Samples` specifies whether the physical device can access partially resident 2D images with 4 samples per pixel. If this feature is not enabled, images with an `imageType` of VK_IMAGE_TYPE_2D and `samples` set to VK_SAMPLE_COUNT_4_BIT must not be created with VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT set in the `flags` member of the VkImageCreateInfo structure.

- `sparseResidency8Samples` specifies whether the physical device can access partially resident 2D images with 8 samples per pixel. If this feature is not enabled, images with an `imageType` of VK_IMAGE_TYPE_2D and `samples` set to VK_SAMPLE_COUNT_8_BIT must not be created with VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT set in the `flags` member of the VkImageCreateInfo structure.

- `sparseResidency16Samples` specifies whether the physical device can access partially resident 2D images with 16 samples per pixel. If this feature is not enabled, images with an `imageType` of VK_IMAGE_TYPE_2D and `samples` set to VK_SAMPLE_COUNT_16_BIT must not be created with VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT set in the `flags` member of the VkImageCreateInfo structure.

- `sparseResidencyAliased` specifies whether the physical device can correctly access data aliased into multiple locations. If this feature is not enabled, the VK_BUFFER_CREATE_SPARSE_ALIASED_BIT and VK_IMAGE_CREATE_SPARSE_ALIASED_BIT enum values must not be used in `flags` members of the VkBufferCreateInfo and VkImageCreateInfo structures, respectively.

- `variableMultisampleRate` specifies whether all pipelines that will be bound to a command buffer during a subpass which uses no attachments must have the same value for VkPipelineMultisampleStateCreateInfo::`rasterizationSamples`. If set to VK_TRUE, the implementation supports variable multisample rates in a subpass which uses no attachments. If set to VK_FALSE, then all pipelines bound in such a subpass must have the same multisample rate. This has no effect in situations where a subpass uses any attachments.

- `inheritedQueries` specifies whether a secondary command buffer may be executed while a query is active.

The `VkPhysicalDeviceVulkan11Features` structure is defined as:

    // Provided by VK_VERSION_1_2
    typedef struct VkPhysicalDeviceVulkan11Features {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           storageBuffer16BitAccess;
        VkBool32           uniformAndStorageBuffer16BitAccess;
        VkBool32           storagePushConstant16;
        VkBool32           storageInputOutput16;
        VkBool32           multiview;
        VkBool32           multiviewGeometryShader;
        VkBool32           multiviewTessellationShader;
        VkBool32           variablePointersStorageBuffer;
        VkBool32           variablePointers;
        VkBool32           protectedMemory;
        VkBool32           samplerYcbcrConversion;
        VkBool32           shaderDrawParameters;
    } VkPhysicalDeviceVulkan11Features;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `storageBuffer16BitAccess` specifies whether objects in the `StorageBuffer`, `ShaderRecordBufferKHR`, or `PhysicalStorageBuffer` storage class with the `Block` decoration can have 16-bit integer and 16-bit floating-point members. If this feature is not enabled, 16-bit integer or 16-bit floating-point members must not be used in such objects unless the `storageBuffer8BitAccess` or `uniformAndStorageBuffer8BitAccess` features are enabled or they are accessed in 32-bit multiples if the `shaderUntypedPointers` feature is enabled. This also specifies whether shader modules can declare the `StorageBuffer16BitAccess` capability.

- `uniformAndStorageBuffer16BitAccess` specifies whether objects in the `Uniform` storage class with the `Block` decoration can have 16-bit integer and 16-bit floating-point members. If this feature is not enabled, 16-bit integer or 16-bit floating-point members must not be used in such objects unless the `uniformAndStorageBuffer8BitAccess` are enabled or they are accessed in 32-bit multiples if the `shaderUntypedPointers` feature is enabled. This also specifies whether shader modules can declare the `UniformAndStorageBuffer16BitAccess` capability.

- `storagePushConstant16` specifies whether objects in the `PushConstant` storage class can have 16-bit integer and 16-bit floating-point members. If this feature is not enabled, 16-bit integer or floating-point members must not be used in such objects unless the `storagePushConstant8` feature is enabled or they are accessed in 32-bit multiples if the `shaderUntypedPointers` feature is enabled. This also specifies whether shader modules can declare the `StoragePushConstant16` capability.

- `storageInputOutput16` specifies whether objects in the `Input` and `Output` storage classes can have 16-bit integer and 16-bit floating-point members. If this feature is not enabled, 16-bit integer or 16-bit floating-point members must not be used in such objects. This also specifies whether shader modules can declare the `StorageInputOutput16` capability.

- `multiview` specifies whether the implementation supports multiview rendering within a render pass. If this feature is not enabled, the view mask of each subpass must always be zero.

- `multiviewGeometryShader` specifies whether the implementation supports multiview rendering within a render pass, with geometry shaders. If this feature is not enabled, then a pipeline compiled against a subpass with a non-zero view mask must not include a geometry shader.

- `multiviewTessellationShader` specifies whether the implementation supports multiview rendering within a render pass, with tessellation shaders. If this feature is not enabled, then a pipeline compiled against a subpass with a non-zero view mask must not include any tessellation shaders.

- `variablePointersStorageBuffer` specifies whether the implementation supports the SPIR-V `VariablePointersStorageBuffer` capability. When this feature is not enabled, shader modules must not declare the `SPV_KHR_variable_pointers` extension or the `VariablePointersStorageBuffer` capability.

- `variablePointers` specifies whether the implementation supports the SPIR-V `VariablePointers` capability. When this feature is not enabled, shader modules must not declare the `VariablePointers` capability.

- `protectedMemory` specifies whether protected memory is supported.

- `samplerYcbcrConversion` specifies whether the implementation supports sampler Y′CBCR conversion. If `samplerYcbcrConversion` is VK_FALSE, sampler Y′CBCR conversion is not supported, and samplers using sampler Y′CBCR conversion must not be used.

- `shaderDrawParameters` specifies whether the implementation supports the SPIR-V `DrawParameters` capability. When this feature is not enabled, shader modules must not declare the `SPV_KHR_shader_draw_parameters` extension or the `DrawParameters` capability.

If the `VkPhysicalDeviceVulkan11Features` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceVulkan11Features`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceVulkan11Features-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_FEATURES

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceVulkan12Features` structure is defined as:

    // Provided by VK_VERSION_1_2
    typedef struct VkPhysicalDeviceVulkan12Features {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           samplerMirrorClampToEdge;
        VkBool32           drawIndirectCount;
        VkBool32           storageBuffer8BitAccess;
        VkBool32           uniformAndStorageBuffer8BitAccess;
        VkBool32           storagePushConstant8;
        VkBool32           shaderBufferInt64Atomics;
        VkBool32           shaderSharedInt64Atomics;
        VkBool32           shaderFloat16;
        VkBool32           shaderInt8;
        VkBool32           descriptorIndexing;
        VkBool32           shaderInputAttachmentArrayDynamicIndexing;
        VkBool32           shaderUniformTexelBufferArrayDynamicIndexing;
        VkBool32           shaderStorageTexelBufferArrayDynamicIndexing;
        VkBool32           shaderUniformBufferArrayNonUniformIndexing;
        VkBool32           shaderSampledImageArrayNonUniformIndexing;
        VkBool32           shaderStorageBufferArrayNonUniformIndexing;
        VkBool32           shaderStorageImageArrayNonUniformIndexing;
        VkBool32           shaderInputAttachmentArrayNonUniformIndexing;
        VkBool32           shaderUniformTexelBufferArrayNonUniformIndexing;
        VkBool32           shaderStorageTexelBufferArrayNonUniformIndexing;
        VkBool32           descriptorBindingUniformBufferUpdateAfterBind;
        VkBool32           descriptorBindingSampledImageUpdateAfterBind;
        VkBool32           descriptorBindingStorageImageUpdateAfterBind;
        VkBool32           descriptorBindingStorageBufferUpdateAfterBind;
        VkBool32           descriptorBindingUniformTexelBufferUpdateAfterBind;
        VkBool32           descriptorBindingStorageTexelBufferUpdateAfterBind;
        VkBool32           descriptorBindingUpdateUnusedWhilePending;
        VkBool32           descriptorBindingPartiallyBound;
        VkBool32           descriptorBindingVariableDescriptorCount;
        VkBool32           runtimeDescriptorArray;
        VkBool32           samplerFilterMinmax;
        VkBool32           scalarBlockLayout;
        VkBool32           imagelessFramebuffer;
        VkBool32           uniformBufferStandardLayout;
        VkBool32           shaderSubgroupExtendedTypes;
        VkBool32           separateDepthStencilLayouts;
        VkBool32           hostQueryReset;
        VkBool32           timelineSemaphore;
        VkBool32           bufferDeviceAddress;
        VkBool32           bufferDeviceAddressCaptureReplay;
        VkBool32           bufferDeviceAddressMultiDevice;
        VkBool32           vulkanMemoryModel;
        VkBool32           vulkanMemoryModelDeviceScope;
        VkBool32           vulkanMemoryModelAvailabilityVisibilityChains;
        VkBool32           shaderOutputViewportIndex;
        VkBool32           shaderOutputLayer;
        VkBool32           subgroupBroadcastDynamicId;
    } VkPhysicalDeviceVulkan12Features;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `samplerMirrorClampToEdge` indicates whether the implementation supports the VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE sampler address mode. If this feature is not enabled, the VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE sampler address mode must not be used.

- `drawIndirectCount` indicates whether the implementation supports the vkCmdDrawIndirectCount and vkCmdDrawIndexedIndirectCount functions. If this feature is not enabled, these functions must not be used.

- `storageBuffer8BitAccess` indicates whether objects in the `StorageBuffer`, `ShaderRecordBufferKHR`, or `PhysicalStorageBuffer` storage class with the `Block` decoration can have 8-bit integer members. If this feature is not enabled, 8-bit integer members must not be used in such objects unless the `shaderUntypedPointer` feature is enabled and they are accessed in 32-bit multiples or 16-bit multiples if the `storageBuffer16BitAccess` feature is enabled. This also indicates whether shader modules can declare the `StorageBuffer8BitAccess` capability.

- `uniformAndStorageBuffer8BitAccess` indicates whether objects in the `Uniform` storage class with the `Block` decoration can have 8-bit integer members. If this feature is not enabled, 8-bit integer members must not be used in such objects unless the `shaderUntypedPointers` feature is enabled and they are accessed in 32-bit multiples or 16-bit multiples if the `uniformAndStorageBuffer16BitAccess` feature is enabled. This also indicates whether shader modules can declare the `UniformAndStorageBuffer8BitAccess` capability.

- `storagePushConstant8` indicates whether objects in the `PushConstant` storage class can have 8-bit integer members. If this feature is not enabled, 8-bit integer members must not be used in such objects unless the `shaderUntypedPointers` feature is enabled and they are accessed in 32-bit multiples or 16-bit multiples if the `storagePushConstant16` feature is enabled. This also indicates whether shader modules can declare the `StoragePushConstant8` capability.

- `shaderBufferInt64Atomics` indicates whether shaders can perform 64-bit unsigned and signed integer atomic operations on buffers.

- `shaderSharedInt64Atomics` indicates whether shaders can perform 64-bit unsigned and signed integer atomic operations on shared and payload memory.

- `shaderFloat16` indicates whether 16-bit floats (halfs) are supported in shader code. This also indicates whether shader modules can declare the `Float16` capability. However, this only enables a subset of the storage classes that SPIR-V allows for the `Float16` SPIR-V capability: Declaring and using 16-bit floats in the `Private`, `Workgroup` (for non-Block variables), and `Function` storage classes is enabled, while declaring them in the interface storage classes (e.g., `UniformConstant`, `Uniform`, `StorageBuffer`, `Input`, `Output`, and `PushConstant`) is not enabled.

- `shaderInt8` indicates whether 8-bit integers (signed and unsigned) are supported in shader code. This also indicates whether shader modules can declare the `Int8` capability. However, this only enables a subset of the storage classes that SPIR-V allows for the `Int8` SPIR-V capability: Declaring and using 8-bit integers in the `Private`, `Workgroup` (for non-Block variables), and `Function` storage classes is enabled, while declaring them in the interface storage classes (e.g., `UniformConstant`, `Uniform`, `StorageBuffer`, `Input`, `Output`, and `PushConstant`) is not enabled.

- `descriptorIndexing` indicates whether the implementation supports the minimum set of descriptor indexing features as described in the Feature Requirements section. Enabling this feature when vkCreateDevice is called does not imply the other minimum descriptor indexing features are also enabled. Those other descriptor indexing features must be enabled individually as needed by the application.

- `shaderInputAttachmentArrayDynamicIndexing` indicates whether arrays of input attachments can be indexed by integer expressions that are dynamically uniform within either the subgroup or the invocation group in shader code. If this feature is not enabled, resources with a descriptor type of VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT must be indexed only by constant integral expressions when aggregated into arrays in shader code. This also indicates whether shader modules can declare the `InputAttachmentArrayDynamicIndexing` capability.

- `shaderUniformTexelBufferArrayDynamicIndexing` indicates whether arrays of uniform texel buffers can be indexed by integer expressions that are dynamically uniform within either the subgroup or the invocation group in shader code. If this feature is not enabled, resources with a descriptor type of VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER must be indexed only by constant integral expressions when aggregated into arrays in shader code. This also indicates whether shader modules can declare the `UniformTexelBufferArrayDynamicIndexing` capability.

- `shaderStorageTexelBufferArrayDynamicIndexing` indicates whether arrays of storage texel buffers can be indexed by integer expressions that are dynamically uniform within either the subgroup or the invocation group in shader code. If this feature is not enabled, resources with a descriptor type of VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER must be indexed only by constant integral expressions when aggregated into arrays in shader code. This also indicates whether shader modules can declare the `StorageTexelBufferArrayDynamicIndexing` capability.

- `shaderUniformBufferArrayNonUniformIndexing` indicates whether arrays of uniform buffers can be indexed by non-uniform integer expressions in shader code. If this feature is not enabled, resources with a descriptor type of VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER or VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC must not be indexed by non-uniform integer expressions when aggregated into arrays in shader code. This also indicates whether shader modules can declare the `UniformBufferArrayNonUniformIndexing` capability.

- `shaderSampledImageArrayNonUniformIndexing` indicates whether arrays of samplers or sampled images can be indexed by non-uniform integer expressions in shader code. If this feature is not enabled, resources with a descriptor type of VK_DESCRIPTOR_TYPE_SAMPLER, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, or VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE must not be indexed by non-uniform integer expressions when aggregated into arrays in shader code. This also indicates whether shader modules can declare the `SampledImageArrayNonUniformIndexing` capability.

- `shaderStorageBufferArrayNonUniformIndexing` indicates whether arrays of storage buffers can be indexed by non-uniform integer expressions in shader code. If this feature is not enabled, resources with a descriptor type of VK_DESCRIPTOR_TYPE_STORAGE_BUFFER or VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC must not be indexed by non-uniform integer expressions when aggregated into arrays in shader code. This also indicates whether shader modules can declare the `StorageBufferArrayNonUniformIndexing` capability.

- `shaderStorageImageArrayNonUniformIndexing` indicates whether arrays of storage images can be indexed by non-uniform integer expressions in shader code. If this feature is not enabled, resources with a descriptor type of VK_DESCRIPTOR_TYPE_STORAGE_IMAGE must not be indexed by non-uniform integer expressions when aggregated into arrays in shader code. This also indicates whether shader modules can declare the `StorageImageArrayNonUniformIndexing` capability.

- `shaderInputAttachmentArrayNonUniformIndexing` indicates whether arrays of input attachments can be indexed by non-uniform integer expressions in shader code. If this feature is not enabled, resources with a descriptor type of VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT must not be indexed by non-uniform integer expressions when aggregated into arrays in shader code. This also indicates whether shader modules can declare the `InputAttachmentArrayNonUniformIndexing` capability.

- `shaderUniformTexelBufferArrayNonUniformIndexing` indicates whether arrays of uniform texel buffers can be indexed by non-uniform integer expressions in shader code. If this feature is not enabled, resources with a descriptor type of VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER must not be indexed by non-uniform integer expressions when aggregated into arrays in shader code. This also indicates whether shader modules can declare the `UniformTexelBufferArrayNonUniformIndexing` capability.

- `shaderStorageTexelBufferArrayNonUniformIndexing` indicates whether arrays of storage texel buffers can be indexed by non-uniform integer expressions in shader code. If this feature is not enabled, resources with a descriptor type of VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER must not be indexed by non-uniform integer expressions when aggregated into arrays in shader code. This also indicates whether shader modules can declare the `StorageTexelBufferArrayNonUniformIndexing` capability.

- `descriptorBindingUniformBufferUpdateAfterBind` indicates whether the implementation supports updating uniform buffer descriptors after a set is bound. If this feature is not enabled, VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT must not be used with VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER.

- `descriptorBindingSampledImageUpdateAfterBind` indicates whether the implementation supports updating sampled image descriptors after a set is bound. If this feature is not enabled, VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT must not be used with VK_DESCRIPTOR_TYPE_SAMPLER, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, or VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE.

- `descriptorBindingStorageImageUpdateAfterBind` indicates whether the implementation supports updating storage image descriptors after a set is bound. If this feature is not enabled, VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT must not be used with VK_DESCRIPTOR_TYPE_STORAGE_IMAGE.

- `descriptorBindingStorageBufferUpdateAfterBind` indicates whether the implementation supports updating storage buffer descriptors after a set is bound. If this feature is not enabled, VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT must not be used with VK_DESCRIPTOR_TYPE_STORAGE_BUFFER.

- `descriptorBindingUniformTexelBufferUpdateAfterBind` indicates whether the implementation supports updating uniform texel buffer descriptors after a set is bound. If this feature is not enabled, VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT must not be used with VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER.

- `descriptorBindingStorageTexelBufferUpdateAfterBind` indicates whether the implementation supports updating storage texel buffer descriptors after a set is bound. If this feature is not enabled, VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT must not be used with VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER.

- `descriptorBindingUpdateUnusedWhilePending` indicates whether the implementation supports updating descriptors while the set is in use. If this feature is not enabled, VK_DESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT must not be used.

- `descriptorBindingPartiallyBound` indicates whether the implementation supports statically using a descriptor set binding in which some descriptors are not valid. If this feature is not enabled, VK_DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT must not be used.

- `descriptorBindingVariableDescriptorCount` indicates whether the implementation supports descriptor sets with a variable-sized last binding. If this feature is not enabled, VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT must not be used.

- `runtimeDescriptorArray` indicates whether the implementation supports the SPIR-V `RuntimeDescriptorArray` capability. If this feature is not enabled, descriptors must not be declared in runtime arrays.

- `samplerFilterMinmax` indicates whether the implementation supports a minimum set of required formats supporting min/max filtering as defined by the `filterMinmaxSingleComponentFormats` property minimum requirements. If this feature is not enabled, then VkSamplerReductionModeCreateInfo must only use VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE.

- `scalarBlockLayout` indicates that the implementation supports the layout of resource blocks in shaders using scalar alignment.

- `imagelessFramebuffer` indicates that the implementation supports specifying the image view for attachments at render pass begin time via VkRenderPassAttachmentBeginInfo.

- `uniformBufferStandardLayout` indicates that the implementation supports the same layouts for uniform buffers as for storage and other kinds of buffers. See Standard Buffer Layout.

- `shaderSubgroupExtendedTypes` is a boolean specifying whether subgroup operations can use 8-bit integer, 16-bit integer, 64-bit integer, 16-bit floating-point, and vectors of these types in group operations with subgroup scope, if the implementation supports the types.

- `separateDepthStencilLayouts` indicates whether the implementation supports a `VkImageMemoryBarrier` for a depth/stencil image with only one of VK_IMAGE_ASPECT_DEPTH_BIT or VK_IMAGE_ASPECT_STENCIL_BIT set, and whether VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL, VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL, or VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL can be used.

- `hostQueryReset` indicates that the implementation supports resetting queries from the host with vkResetQueryPool.

- `timelineSemaphore` indicates whether semaphores created with a VkSemaphoreType of VK_SEMAPHORE_TYPE_TIMELINE are supported.

- `bufferDeviceAddress` indicates that the implementation supports accessing buffer memory in shaders as storage buffers via an address queried from vkGetBufferDeviceAddress.

- `bufferDeviceAddressCaptureReplay` indicates that the implementation supports saving and reusing buffer and device addresses, e.g. for trace capture and replay.

- `bufferDeviceAddressMultiDevice` indicates that the implementation supports the `bufferDeviceAddress` , `rayTracingPipeline` and `rayQuery` features for logical devices created with multiple physical devices. If this feature is not supported, buffer and acceleration structure addresses must not be queried on a logical device created with more than one physical device.

- `vulkanMemoryModel` indicates whether shader modules can declare the `VulkanMemoryModel` capability.

- `vulkanMemoryModelDeviceScope` indicates whether the Vulkan Memory Model can use `Device` scope synchronization. This also indicates whether shader modules can declare the `VulkanMemoryModelDeviceScope` capability.

- `vulkanMemoryModelAvailabilityVisibilityChains` indicates whether the Vulkan Memory Model can use availability and visibility chains with more than one element.

- `shaderOutputViewportIndex` indicates whether the implementation supports the `ShaderViewportIndex` SPIR-V capability enabling variables decorated with the `ViewportIndex` built-in to be exported from mesh, vertex or tessellation evaluation shaders. If this feature is not enabled, the `ViewportIndex` built-in decoration must not be used on outputs in mesh, vertex or tessellation evaluation shaders.

- `shaderOutputLayer` indicates whether the implementation supports the `ShaderLayer` SPIR-V capability enabling variables decorated with the `Layer` built-in to be exported from mesh, vertex or tessellation evaluation shaders. If this feature is not enabled, the `Layer` built-in decoration must not be used on outputs in mesh, vertex or tessellation evaluation shaders.

- If `subgroupBroadcastDynamicId` is VK_TRUE, the “Id” operand of `OpGroupNonUniformBroadcast` can be dynamically uniform within a subgroup, and the “Index” operand of `OpGroupNonUniformQuadBroadcast` can be dynamically uniform within the derivative group. If it is VK_FALSE, these operands must be constants.

If the `VkPhysicalDeviceVulkan12Features` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceVulkan12Features`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceVulkan12Features-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceVulkan13Features` structure is defined as:

    // Provided by VK_VERSION_1_3
    typedef struct VkPhysicalDeviceVulkan13Features {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           robustImageAccess;
        VkBool32           inlineUniformBlock;
        VkBool32           descriptorBindingInlineUniformBlockUpdateAfterBind;
        VkBool32           pipelineCreationCacheControl;
        VkBool32           privateData;
        VkBool32           shaderDemoteToHelperInvocation;
        VkBool32           shaderTerminateInvocation;
        VkBool32           subgroupSizeControl;
        VkBool32           computeFullSubgroups;
        VkBool32           synchronization2;
        VkBool32           textureCompressionASTC_HDR;
        VkBool32           shaderZeroInitializeWorkgroupMemory;
        VkBool32           dynamicRendering;
        VkBool32           shaderIntegerDotProduct;
        VkBool32           maintenance4;
    } VkPhysicalDeviceVulkan13Features;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `robustImageAccess` enables Robust Image Access guarantees for shader image accesses.

- `inlineUniformBlock` indicates whether the implementation supports inline uniform block descriptors. If this feature is not enabled, VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK must not be used.

- `descriptorBindingInlineUniformBlockUpdateAfterBind` indicates whether the implementation supports updating inline uniform block descriptors after a set is bound. If this feature is not enabled, VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT must not be used with VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK.

- `pipelineCreationCacheControl` indicates that the implementation supports:

  - The following can be used in `Vk*PipelineCreateInfo`::`flags`:

    - VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT

    - VK_PIPELINE_CREATE_EARLY_RETURN_ON_FAILURE_BIT

  - The following can be used in VkPipelineCacheCreateInfo::`flags`:

    - VK_PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT

- `privateData` indicates whether the implementation supports private data. See Private Data.

- `shaderDemoteToHelperInvocation` indicates whether the implementation supports the SPIR-V `DemoteToHelperInvocationEXT` capability.

- `shaderTerminateInvocation` specifies whether the implementation supports SPIR-V modules that use the `SPV_KHR_terminate_invocation` extension.

- `subgroupSizeControl` indicates whether the implementation supports controlling shader subgroup sizes via the VK_PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT flag and the VkPipelineShaderStageRequiredSubgroupSizeCreateInfo structure.

- `computeFullSubgroups` indicates whether the implementation supports requiring full subgroups in compute , mesh, or task shaders via the VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT flag.

- `synchronization2` indicates whether the implementation supports the new set of synchronization commands introduced in `VK_KHR_synchronization2`.

- `textureCompressionASTC_HDR` indicates whether all of the ASTC HDR compressed texture formats are supported. If this feature is enabled, then the VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT, VK_FORMAT_FEATURE_BLIT_SRC_BIT and VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT features must be supported in `optimalTilingFeatures` for the following formats:

  - VK_FORMAT_ASTC_4x4_SFLOAT_BLOCK

  - VK_FORMAT_ASTC_5x4_SFLOAT_BLOCK

  - VK_FORMAT_ASTC_5x5_SFLOAT_BLOCK

  - VK_FORMAT_ASTC_6x5_SFLOAT_BLOCK

  - VK_FORMAT_ASTC_6x6_SFLOAT_BLOCK

  - VK_FORMAT_ASTC_8x5_SFLOAT_BLOCK

  - VK_FORMAT_ASTC_8x6_SFLOAT_BLOCK

  - VK_FORMAT_ASTC_8x8_SFLOAT_BLOCK

  - VK_FORMAT_ASTC_10x5_SFLOAT_BLOCK

  - VK_FORMAT_ASTC_10x6_SFLOAT_BLOCK

  - VK_FORMAT_ASTC_10x8_SFLOAT_BLOCK

  - VK_FORMAT_ASTC_10x10_SFLOAT_BLOCK

  - VK_FORMAT_ASTC_12x10_SFLOAT_BLOCK

  - VK_FORMAT_ASTC_12x12_SFLOAT_BLOCK

    To query for additional properties, or if the feature is not enabled, vkGetPhysicalDeviceFormatProperties and vkGetPhysicalDeviceImageFormatProperties can be used to check for supported properties of individual formats as normal.

- `shaderZeroInitializeWorkgroupMemory` specifies whether the implementation supports initializing a variable in Workgroup storage class.

- `dynamicRendering` specifies that the implementation supports dynamic render pass instances using the vkCmdBeginRendering command.

- `shaderIntegerDotProduct` specifies whether shader modules can declare the `DotProductInputAllKHR`, `DotProductInput4x8BitKHR`, `DotProductInput4x8BitPackedKHR` and `DotProductKHR` capabilities.

- `maintenance4` indicates that the implementation supports the following:

  - The application may destroy a VkPipelineLayout object immediately after using it to create another object.

  - `LocalSizeId` can be used as an alternative to `LocalSize` to specify the local workgroup size with specialization constants.

  - Images created with identical creation parameters will always have the same alignment requirements.

  - The size memory requirement of a buffer or image is never greater than that of another buffer or image created with a greater or equal size.

  - Push constants do not have to be initialized before they are dynamically accessed.

  - The interface matching rules allow a larger output vector to match with a smaller input vector, with additional values being discarded.

If the `VkPhysicalDeviceVulkan13Features` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceVulkan13Features`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceVulkan13Features-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_FEATURES

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceVulkan14Features` structure is defined as:

    // Provided by VK_VERSION_1_4
    typedef struct VkPhysicalDeviceVulkan14Features {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           globalPriorityQuery;
        VkBool32           shaderSubgroupRotate;
        VkBool32           shaderSubgroupRotateClustered;
        VkBool32           shaderFloatControls2;
        VkBool32           shaderExpectAssume;
        VkBool32           rectangularLines;
        VkBool32           bresenhamLines;
        VkBool32           smoothLines;
        VkBool32           stippledRectangularLines;
        VkBool32           stippledBresenhamLines;
        VkBool32           stippledSmoothLines;
        VkBool32           vertexAttributeInstanceRateDivisor;
        VkBool32           vertexAttributeInstanceRateZeroDivisor;
        VkBool32           indexTypeUint8;
        VkBool32           dynamicRenderingLocalRead;
        VkBool32           maintenance5;
        VkBool32           maintenance6;
        VkBool32           pipelineProtectedAccess;
        VkBool32           pipelineRobustness;
        VkBool32           hostImageCopy;
        VkBool32           pushDescriptor;
    } VkPhysicalDeviceVulkan14Features;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `globalPriorityQuery` indicates whether the implementation supports the ability to query global queue priorities.

- `shaderSubgroupRotate` specifies whether shader modules can declare the `GroupNonUniformRotateKHR` capability.

- `shaderSubgroupRotateClustered` specifies whether shader modules can use the `ClusterSize` operand to `OpGroupNonUniformRotateKHR`.

- `shaderFloatControls2` specifies whether shader modules can declare the `FloatControls2` capability.

- `shaderExpectAssume` specifies whether shader modules can declare the `ExpectAssumeKHR` capability.

- `rectangularLines` indicates whether the implementation supports rectangular line rasterization.

- `bresenhamLines` indicates whether the implementation supports Bresenham-style line rasterization.

- `smoothLines` indicates whether the implementation supports smooth line rasterization.

- `stippledRectangularLines` indicates whether the implementation supports stippled line rasterization with VK_LINE_RASTERIZATION_MODE_RECTANGULAR lines.

- `stippledBresenhamLines` indicates whether the implementation supports stippled line rasterization with VK_LINE_RASTERIZATION_MODE_BRESENHAM lines.

- `stippledSmoothLines` indicates whether the implementation supports stippled line rasterization with VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH lines.

- `vertexAttributeInstanceRateDivisor` specifies whether vertex attribute fetching may be repeated in the case of instanced rendering.

- `vertexAttributeInstanceRateZeroDivisor` specifies whether a zero value for VkVertexInputBindingDivisorDescription::`divisor` is supported.

- `indexTypeUint8` indicates that VK_INDEX_TYPE_UINT8 can be used with vkCmdBindIndexBuffer2 and vkCmdBindIndexBuffer.

- `dynamicRenderingLocalRead` specifies that the implementation supports local reads inside dynamic render pass instances using the vkCmdBeginRendering command.

- `maintenance5` indicates that the implementation supports the following:

  - The ability to expose support for the optional format VK_FORMAT_A1B5G5R5_UNORM_PACK16.

  - The ability to expose support for the optional format VK_FORMAT_A8_UNORM.

  - A property to indicate that multisample coverage operations are performed after sample counting in EarlyFragmentTests mode.

  - Creating a `VkBufferView` with a subset of the associated `VkBuffer` usage using VkBufferUsageFlags2CreateInfo.

  - A new function vkCmdBindIndexBuffer2, allowing a range of memory to be bound as an index buffer.

  - vkGetDeviceProcAddr will return `NULL` for function pointers of core functions for versions higher than the version requested by the application.

  - vkCmdBindVertexBuffers2 supports using VK_WHOLE_SIZE in the `pSizes` parameter.

  - If `PointSize` is not written, a default value of `1.0` is used for the size of points.

  - VkShaderModuleCreateInfo can be added as a chained structure to pipeline creation via VkPipelineShaderStageCreateInfo, rather than having to create a shader module.

  - A function vkGetRenderingAreaGranularity to query the optimal render area for a dynamic rendering instance.

  - A property to indicate that depth/stencil texturing operations with VK_COMPONENT_SWIZZLE_ONE have defined behavior.

  - vkGetDeviceImageSubresourceLayout allows an application to perform a vkGetImageSubresourceLayout query without having to create an image.

  - VK_REMAINING_ARRAY_LAYERS as the `layerCount` member of VkImageSubresourceLayers.

  - A property to indicate whether `PointSize` controls the final rasterization of polygons if polygon mode is VK_POLYGON_MODE_POINT.

  - Two properties to indicate the non-strict line rasterization algorithm used.

  - Two new flags words VkPipelineCreateFlagBits2 and VkBufferUsageFlagBits2.

  - Physical-device-level functions can now be called with any value in the valid range for a type beyond the defined enumerants, such that applications can avoid checking individual features, extensions, or versions before querying supported properties of a particular enumerant.

  - Copies between images of any type are allowed, with 1D images treated as 2D images with a height of `1`.

- `maintenance6` indicates that the implementation supports the following:

  - VK_NULL_HANDLE can be used when binding an index buffer

  - VkBindMemoryStatus can be included in the `pNext` chain of the VkBindBufferMemoryInfo and VkBindImageMemoryInfo structures, enabling applications to retrieve VkResult values for individual memory binding operations.

  - VkPhysicalDeviceMaintenance6Properties::`blockTexelViewCompatibleMultipleLayers` property to indicate that the implementation supports creating image views with VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT where the `layerCount` member of `subresourceRange` is greater than `1`.

  - VkPhysicalDeviceMaintenance6Properties::`maxCombinedImageSamplerDescriptorCount` property which indicates the maximum descriptor size required for any format that requires a sampler Y′CBCR conversion supported by the implementation.

  - A VkPhysicalDeviceMaintenance6Properties::`fragmentShadingRateClampCombinerInputs` property which indicates whether the implementation clamps the inputs to fragment shading rate combiner operations.

- `pipelineProtectedAccess` indicates whether the implementation supports specifying protected access on individual pipelines.

- `pipelineRobustness` indicates that robustness can be requested on a per-pipeline-stage granularity.

- `hostImageCopy` indicates that the implementation supports copying from host memory to images using the vkCopyMemoryToImage command, copying from images to host memory using the vkCopyImageToMemory command, and copying between images using the vkCopyImageToImage command.

- `pushDescriptor` indicates that the implementation supports push descriptors.

If the `VkPhysicalDeviceVulkan14Features` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceVulkan14Features`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceVulkan14Features-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_4_FEATURES

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceVariablePointersFeatures` structure is defined as:

    // Provided by VK_VERSION_1_1
    typedef struct VkPhysicalDeviceVariablePointersFeatures {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           variablePointersStorageBuffer;
        VkBool32           variablePointers;
    } VkPhysicalDeviceVariablePointersFeatures;

    // Provided by VK_VERSION_1_1
    // Equivalent to VkPhysicalDeviceVariablePointersFeatures
    typedef VkPhysicalDeviceVariablePointersFeatures VkPhysicalDeviceVariablePointerFeatures;

    // Provided by VK_KHR_variable_pointers
    // Equivalent to VkPhysicalDeviceVariablePointersFeatures
    typedef VkPhysicalDeviceVariablePointersFeatures VkPhysicalDeviceVariablePointersFeaturesKHR;

    // Provided by VK_KHR_variable_pointers
    // Equivalent to VkPhysicalDeviceVariablePointersFeatures
    typedef VkPhysicalDeviceVariablePointersFeatures VkPhysicalDeviceVariablePointerFeaturesKHR;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `variablePointersStorageBuffer` specifies whether the implementation supports the SPIR-V `VariablePointersStorageBuffer` capability. When this feature is not enabled, shader modules must not declare the `SPV_KHR_variable_pointers` extension or the `VariablePointersStorageBuffer` capability.

- `variablePointers` specifies whether the implementation supports the SPIR-V `VariablePointers` capability. When this feature is not enabled, shader modules must not declare the `VariablePointers` capability.

If the `VkPhysicalDeviceVariablePointersFeatures` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceVariablePointersFeatures`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage

- VUID-VkPhysicalDeviceVariablePointersFeatures-variablePointers-01431
  If `variablePointers` is enabled then `variablePointersStorageBuffer` must also be enabled

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceVariablePointersFeatures-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceMultiviewFeatures` structure is defined as:

    // Provided by VK_VERSION_1_1
    typedef struct VkPhysicalDeviceMultiviewFeatures {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           multiview;
        VkBool32           multiviewGeometryShader;
        VkBool32           multiviewTessellationShader;
    } VkPhysicalDeviceMultiviewFeatures;

    // Provided by VK_KHR_multiview
    // Equivalent to VkPhysicalDeviceMultiviewFeatures
    typedef VkPhysicalDeviceMultiviewFeatures VkPhysicalDeviceMultiviewFeaturesKHR;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `multiview` specifies whether the implementation supports multiview rendering within a render pass. If this feature is not enabled, the view mask of each subpass must always be zero.

- `multiviewGeometryShader` specifies whether the implementation supports multiview rendering within a render pass, with geometry shaders. If this feature is not enabled, then a pipeline compiled against a subpass with a non-zero view mask must not include a geometry shader.

- `multiviewTessellationShader` specifies whether the implementation supports multiview rendering within a render pass, with tessellation shaders. If this feature is not enabled, then a pipeline compiled against a subpass with a non-zero view mask must not include any tessellation shaders.

If the `VkPhysicalDeviceMultiviewFeatures` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceMultiviewFeatures`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage

- VUID-VkPhysicalDeviceMultiviewFeatures-multiviewGeometryShader-00580
  If `multiviewGeometryShader` is enabled then `multiview` must also be enabled

- VUID-VkPhysicalDeviceMultiviewFeatures-multiviewTessellationShader-00581
  If `multiviewTessellationShader` is enabled then `multiview` must also be enabled

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceMultiviewFeatures-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The VkPhysicalDeviceShaderAtomicFloatFeaturesEXT structure is defined as:

    // Provided by VK_EXT_shader_atomic_float
    typedef struct VkPhysicalDeviceShaderAtomicFloatFeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           shaderBufferFloat32Atomics;
        VkBool32           shaderBufferFloat32AtomicAdd;
        VkBool32           shaderBufferFloat64Atomics;
        VkBool32           shaderBufferFloat64AtomicAdd;
        VkBool32           shaderSharedFloat32Atomics;
        VkBool32           shaderSharedFloat32AtomicAdd;
        VkBool32           shaderSharedFloat64Atomics;
        VkBool32           shaderSharedFloat64AtomicAdd;
        VkBool32           shaderImageFloat32Atomics;
        VkBool32           shaderImageFloat32AtomicAdd;
        VkBool32           sparseImageFloat32Atomics;
        VkBool32           sparseImageFloat32AtomicAdd;
    } VkPhysicalDeviceShaderAtomicFloatFeaturesEXT;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `shaderBufferFloat32Atomics` indicates whether shaders can perform 32-bit floating-point load, store, and exchange atomic operations on storage buffers.

- `shaderBufferFloat32AtomicAdd` indicates whether shaders can perform 32-bit floating-point add atomic operations on storage buffers.

- `shaderBufferFloat64Atomics` indicates whether shaders can perform 64-bit floating-point load, store, and exchange atomic operations on storage buffers.

- `shaderBufferFloat64AtomicAdd` indicates whether shaders can perform 64-bit floating-point add atomic operations on storage buffers.

- `shaderSharedFloat32Atomics` indicates whether shaders can perform 32-bit floating-point load, store, and exchange atomic operations on shared and payload memory.

- `shaderSharedFloat32AtomicAdd` indicates whether shaders can perform 32-bit floating-point add atomic operations on shared and payload memory.

- `shaderSharedFloat64Atomics` indicates whether shaders can perform 64-bit floating-point load, store, and exchange atomic operations on shared and payload memory.

- `shaderSharedFloat64AtomicAdd` indicates whether shaders can perform 64-bit floating-point add atomic operations on shared and payload memory.

- `shaderImageFloat32Atomics` indicates whether shaders can perform 32-bit floating-point load, store, and exchange atomic image operations.

- `shaderImageFloat32AtomicAdd` indicates whether shaders can perform 32-bit floating-point add atomic image operations.

- `sparseImageFloat32Atomics` indicates whether 32-bit floating-point load, store, and exchange atomic operations can be used on sparse images.

- `sparseImageFloat32AtomicAdd` indicates whether 32-bit floating-point add atomic operations can be used on sparse images.

If the `VkPhysicalDeviceShaderAtomicFloatFeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceShaderAtomicFloatFeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceShaderAtomicFloatFeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT structure is defined as:

    // Provided by VK_EXT_shader_atomic_float2
    typedef struct VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           shaderBufferFloat16Atomics;
        VkBool32           shaderBufferFloat16AtomicAdd;
        VkBool32           shaderBufferFloat16AtomicMinMax;
        VkBool32           shaderBufferFloat32AtomicMinMax;
        VkBool32           shaderBufferFloat64AtomicMinMax;
        VkBool32           shaderSharedFloat16Atomics;
        VkBool32           shaderSharedFloat16AtomicAdd;
        VkBool32           shaderSharedFloat16AtomicMinMax;
        VkBool32           shaderSharedFloat32AtomicMinMax;
        VkBool32           shaderSharedFloat64AtomicMinMax;
        VkBool32           shaderImageFloat32AtomicMinMax;
        VkBool32           sparseImageFloat32AtomicMinMax;
    } VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `shaderBufferFloat16Atomics` indicates whether shaders can perform 16-bit floating-point load, store, and exchange atomic operations on storage buffers.

- `shaderBufferFloat16AtomicAdd` indicates whether shaders can perform 16-bit floating-point add atomic operations on storage buffers.

- `shaderBufferFloat16AtomicMinMax` indicates whether shaders can perform 16-bit floating-point min and max atomic operations on storage buffers.

- `shaderBufferFloat32AtomicMinMax` indicates whether shaders can perform 32-bit floating-point min and max atomic operations on storage buffers.

- `shaderBufferFloat64AtomicMinMax` indicates whether shaders can perform 64-bit floating-point min and max atomic operations on storage buffers.

- `shaderSharedFloat16Atomics` indicates whether shaders can perform 16-bit floating-point load, store, and exchange atomic operations on shared and payload memory.

- `shaderSharedFloat16AtomicAdd` indicates whether shaders can perform 16-bit floating-point add atomic operations on shared and payload memory.

- `shaderSharedFloat16AtomicMinMax` indicates whether shaders can perform 16-bit floating-point min and max atomic operations on shared and payload memory.

- `shaderSharedFloat32AtomicMinMax` indicates whether shaders can perform 32-bit floating-point min and max atomic operations on shared and payload memory.

- `shaderSharedFloat64AtomicMinMax` indicates whether shaders can perform 64-bit floating-point min and max atomic operations on shared and payload memory.

- `shaderImageFloat32AtomicMinMax` indicates whether shaders can perform 32-bit floating-point min and max atomic image operations.

- `sparseImageFloat32AtomicMinMax` indicates whether 32-bit floating-point min and max atomic operations can be used on sparse images.

If the `VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_2_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The VkPhysicalDeviceShaderAtomicInt64Features structure is defined as:

    // Provided by VK_VERSION_1_2
    typedef struct VkPhysicalDeviceShaderAtomicInt64Features {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           shaderBufferInt64Atomics;
        VkBool32           shaderSharedInt64Atomics;
    } VkPhysicalDeviceShaderAtomicInt64Features;

    // Provided by VK_KHR_shader_atomic_int64
    // Equivalent to VkPhysicalDeviceShaderAtomicInt64Features
    typedef VkPhysicalDeviceShaderAtomicInt64Features VkPhysicalDeviceShaderAtomicInt64FeaturesKHR;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `shaderBufferInt64Atomics` indicates whether shaders can perform 64-bit unsigned and signed integer atomic operations on buffers.

- `shaderSharedInt64Atomics` indicates whether shaders can perform 64-bit unsigned and signed integer atomic operations on shared and payload memory.

If the `VkPhysicalDeviceShaderAtomicInt64Features` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceShaderAtomicInt64Features`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceShaderAtomicInt64Features-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT structure is defined as:

    // Provided by VK_EXT_shader_image_atomic_int64
    typedef struct VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           shaderImageInt64Atomics;
        VkBool32           sparseImageInt64Atomics;
    } VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `shaderImageInt64Atomics` indicates whether shaders can support 64-bit unsigned and signed integer atomic operations on images.

- `sparseImageInt64Atomics` indicates whether 64-bit integer atomics can be used on sparse images.

If the `VkPhysicalDeviceShaderAtomicInt64FeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceShaderAtomicInt64FeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_IMAGE_ATOMIC_INT64_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The VkPhysicalDevice8BitStorageFeatures structure is defined as:

    // Provided by VK_VERSION_1_2
    typedef struct VkPhysicalDevice8BitStorageFeatures {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           storageBuffer8BitAccess;
        VkBool32           uniformAndStorageBuffer8BitAccess;
        VkBool32           storagePushConstant8;
    } VkPhysicalDevice8BitStorageFeatures;

    // Provided by VK_KHR_8bit_storage
    // Equivalent to VkPhysicalDevice8BitStorageFeatures
    typedef VkPhysicalDevice8BitStorageFeatures VkPhysicalDevice8BitStorageFeaturesKHR;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `storageBuffer8BitAccess` indicates whether objects in the `StorageBuffer`, `ShaderRecordBufferKHR`, or `PhysicalStorageBuffer` storage class with the `Block` decoration can have 8-bit integer members. If this feature is not enabled, 8-bit integer members must not be used in such objects unless the `shaderUntypedPointer` feature is enabled and they are accessed in 32-bit multiples or 16-bit multiples if the `storageBuffer16BitAccess` feature is enabled. This also indicates whether shader modules can declare the `StorageBuffer8BitAccess` capability.

- `uniformAndStorageBuffer8BitAccess` indicates whether objects in the `Uniform` storage class with the `Block` decoration can have 8-bit integer members. If this feature is not enabled, 8-bit integer members must not be used in such objects unless the `shaderUntypedPointers` feature is enabled and they are accessed in 32-bit multiples or 16-bit multiples if the `uniformAndStorageBuffer16BitAccess` feature is enabled. This also indicates whether shader modules can declare the `UniformAndStorageBuffer8BitAccess` capability.

- `storagePushConstant8` indicates whether objects in the `PushConstant` storage class can have 8-bit integer members. If this feature is not enabled, 8-bit integer members must not be used in such objects unless the `shaderUntypedPointers` feature is enabled and they are accessed in 32-bit multiples or 16-bit multiples if the `storagePushConstant16` feature is enabled. This also indicates whether shader modules can declare the `StoragePushConstant8` capability.

If the `VkPhysicalDevice8BitStorageFeatures` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDevice8BitStorageFeatures`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDevice8BitStorageFeatures-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The VkPhysicalDevice16BitStorageFeatures structure is defined as:

    // Provided by VK_VERSION_1_1
    typedef struct VkPhysicalDevice16BitStorageFeatures {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           storageBuffer16BitAccess;
        VkBool32           uniformAndStorageBuffer16BitAccess;
        VkBool32           storagePushConstant16;
        VkBool32           storageInputOutput16;
    } VkPhysicalDevice16BitStorageFeatures;

    // Provided by VK_KHR_16bit_storage
    // Equivalent to VkPhysicalDevice16BitStorageFeatures
    typedef VkPhysicalDevice16BitStorageFeatures VkPhysicalDevice16BitStorageFeaturesKHR;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `storageBuffer16BitAccess` specifies whether objects in the `StorageBuffer`, `ShaderRecordBufferKHR`, or `PhysicalStorageBuffer` storage class with the `Block` decoration can have 16-bit integer and 16-bit floating-point members. If this feature is not enabled, 16-bit integer or 16-bit floating-point members must not be used in such objects unless the `storageBuffer8BitAccess` or `uniformAndStorageBuffer8BitAccess` features are enabled or they are accessed in 32-bit multiples if the `shaderUntypedPointers` feature is enabled. This also specifies whether shader modules can declare the `StorageBuffer16BitAccess` capability.

- `uniformAndStorageBuffer16BitAccess` specifies whether objects in the `Uniform` storage class with the `Block` decoration can have 16-bit integer and 16-bit floating-point members. If this feature is not enabled, 16-bit integer or 16-bit floating-point members must not be used in such objects unless the `uniformAndStorageBuffer8BitAccess` are enabled or they are accessed in 32-bit multiples if the `shaderUntypedPointers` feature is enabled. This also specifies whether shader modules can declare the `UniformAndStorageBuffer16BitAccess` capability.

- `storagePushConstant16` specifies whether objects in the `PushConstant` storage class can have 16-bit integer and 16-bit floating-point members. If this feature is not enabled, 16-bit integer or floating-point members must not be used in such objects unless the `storagePushConstant8` feature is enabled or they are accessed in 32-bit multiples if the `shaderUntypedPointers` feature is enabled. This also specifies whether shader modules can declare the `StoragePushConstant16` capability.

- `storageInputOutput16` specifies whether objects in the `Input` and `Output` storage classes can have 16-bit integer and 16-bit floating-point members. If this feature is not enabled, 16-bit integer or 16-bit floating-point members must not be used in such objects. This also specifies whether shader modules can declare the `StorageInputOutput16` capability.

If the `VkPhysicalDevice16BitStorageFeatures` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDevice16BitStorageFeatures`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDevice16BitStorageFeatures-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceShaderFloat16Int8Features` structure is defined as:

    // Provided by VK_VERSION_1_2
    typedef struct VkPhysicalDeviceShaderFloat16Int8Features {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           shaderFloat16;
        VkBool32           shaderInt8;
    } VkPhysicalDeviceShaderFloat16Int8Features;

    // Provided by VK_KHR_shader_float16_int8
    // Equivalent to VkPhysicalDeviceShaderFloat16Int8Features
    typedef VkPhysicalDeviceShaderFloat16Int8Features VkPhysicalDeviceShaderFloat16Int8FeaturesKHR;

    // Provided by VK_KHR_shader_float16_int8
    // Equivalent to VkPhysicalDeviceShaderFloat16Int8Features
    typedef VkPhysicalDeviceShaderFloat16Int8Features VkPhysicalDeviceFloat16Int8FeaturesKHR;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `shaderFloat16` indicates whether 16-bit floats (halfs) are supported in shader code. This also indicates whether shader modules can declare the `Float16` capability. However, this only enables a subset of the storage classes that SPIR-V allows for the `Float16` SPIR-V capability: Declaring and using 16-bit floats in the `Private`, `Workgroup` (for non-Block variables), and `Function` storage classes is enabled, while declaring them in the interface storage classes (e.g., `UniformConstant`, `Uniform`, `StorageBuffer`, `Input`, `Output`, and `PushConstant`) is not enabled.

- `shaderInt8` indicates whether 8-bit integers (signed and unsigned) are supported in shader code. This also indicates whether shader modules can declare the `Int8` capability. However, this only enables a subset of the storage classes that SPIR-V allows for the `Int8` SPIR-V capability: Declaring and using 8-bit integers in the `Private`, `Workgroup` (for non-Block variables), and `Function` storage classes is enabled, while declaring them in the interface storage classes (e.g., `UniformConstant`, `Uniform`, `StorageBuffer`, `Input`, `Output`, and `PushConstant`) is not enabled.

If the `VkPhysicalDeviceShaderFloat16Int8Features` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceShaderFloat16Int8Features`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceShaderFloat16Int8Features-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The VkPhysicalDeviceShaderClockFeaturesKHR structure is defined as:

    // Provided by VK_KHR_shader_clock
    typedef struct VkPhysicalDeviceShaderClockFeaturesKHR {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           shaderSubgroupClock;
        VkBool32           shaderDeviceClock;
    } VkPhysicalDeviceShaderClockFeaturesKHR;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `shaderSubgroupClock` indicates whether shaders can perform `Subgroup` scoped clock reads.

- `shaderDeviceClock` indicates whether shaders can perform `Device` scoped clock reads.

If the `VkPhysicalDeviceShaderClockFeaturesKHR` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceShaderClockFeaturesKHR`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceShaderClockFeaturesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CLOCK_FEATURES_KHR

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceSamplerYcbcrConversionFeatures` structure is defined as:

    // Provided by VK_VERSION_1_1
    typedef struct VkPhysicalDeviceSamplerYcbcrConversionFeatures {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           samplerYcbcrConversion;
    } VkPhysicalDeviceSamplerYcbcrConversionFeatures;

    // Provided by VK_KHR_sampler_ycbcr_conversion
    // Equivalent to VkPhysicalDeviceSamplerYcbcrConversionFeatures
    typedef VkPhysicalDeviceSamplerYcbcrConversionFeatures VkPhysicalDeviceSamplerYcbcrConversionFeaturesKHR;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `samplerYcbcrConversion` specifies whether the implementation supports sampler Y′CBCR conversion. If `samplerYcbcrConversion` is VK_FALSE, sampler Y′CBCR conversion is not supported, and samplers using sampler Y′CBCR conversion must not be used.

If the `VkPhysicalDeviceSamplerYcbcrConversionFeatures` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceSamplerYcbcrConversionFeatures`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceSamplerYcbcrConversionFeatures-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceProtectedMemoryFeatures` structure is defined as:

    // Provided by VK_VERSION_1_1
    typedef struct VkPhysicalDeviceProtectedMemoryFeatures {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           protectedMemory;
    } VkPhysicalDeviceProtectedMemoryFeatures;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `protectedMemory` specifies whether protected memory is supported.

If the `VkPhysicalDeviceProtectedMemoryFeatures` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceProtectedMemoryFeatures`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceProtectedMemoryFeatures-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT` structure is defined as:

    // Provided by VK_EXT_blend_operation_advanced
    typedef struct VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           advancedBlendCoherentOperations;
    } VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `advancedBlendCoherentOperations` specifies whether blending using advanced blend operations is guaranteed to execute atomically and in primitive order. If this is VK_TRUE, VK_ACCESS_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT is treated the same as VK_ACCESS_COLOR_ATTACHMENT_READ_BIT, and advanced blending needs no additional synchronization over basic blending. If this is VK_FALSE, then memory dependencies are required to guarantee order between two advanced blending operations that occur on the same sample.

If the `VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceConditionalRenderingFeaturesEXT` structure is defined as:

    // Provided by VK_EXT_conditional_rendering
    typedef struct VkPhysicalDeviceConditionalRenderingFeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           conditionalRendering;
        VkBool32           inheritedConditionalRendering;
    } VkPhysicalDeviceConditionalRenderingFeaturesEXT;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `conditionalRendering` specifies whether conditional rendering is supported.

- `inheritedConditionalRendering` specifies whether a secondary command buffer can be executed while conditional rendering is active in the primary command buffer.

If the `VkPhysicalDeviceConditionalRenderingFeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceConditionalRenderingFeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceConditionalRenderingFeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceShaderDrawParametersFeatures` structure is defined as:

    // Provided by VK_VERSION_1_1
    typedef struct VkPhysicalDeviceShaderDrawParametersFeatures {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           shaderDrawParameters;
    } VkPhysicalDeviceShaderDrawParametersFeatures;

    // Provided by VK_VERSION_1_1
    // Equivalent to VkPhysicalDeviceShaderDrawParametersFeatures
    typedef VkPhysicalDeviceShaderDrawParametersFeatures VkPhysicalDeviceShaderDrawParameterFeatures;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `shaderDrawParameters` specifies whether the implementation supports the SPIR-V `DrawParameters` capability. When this feature is not enabled, shader modules must not declare the `SPV_KHR_shader_draw_parameters` extension or the `DrawParameters` capability.

If the `VkPhysicalDeviceShaderDrawParametersFeatures` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceShaderDrawParametersFeatures`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceShaderDrawParametersFeatures-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceMeshShaderFeaturesNV` structure is defined as:

    // Provided by VK_NV_mesh_shader
    typedef struct VkPhysicalDeviceMeshShaderFeaturesNV {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           taskShader;
        VkBool32           meshShader;
    } VkPhysicalDeviceMeshShaderFeaturesNV;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `taskShader` specifies whether task shaders are supported. If this feature is not enabled, the VK_SHADER_STAGE_TASK_BIT_NV and VK_PIPELINE_STAGE_TASK_SHADER_BIT_NV enum values must not be used.

- `meshShader` specifies whether mesh shaders are supported. If this feature is not enabled, the VK_SHADER_STAGE_MESH_BIT_NV and VK_PIPELINE_STAGE_MESH_SHADER_BIT_NV enum values must not be used.

If the `VkPhysicalDeviceMeshShaderFeaturesNV` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceMeshShaderFeaturesNV`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceMeshShaderFeaturesNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_NV

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceMeshShaderFeaturesEXT` structure is defined as:

    // Provided by VK_EXT_mesh_shader
    typedef struct VkPhysicalDeviceMeshShaderFeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           taskShader;
        VkBool32           meshShader;
        VkBool32           multiviewMeshShader;
        VkBool32           primitiveFragmentShadingRateMeshShader;
        VkBool32           meshShaderQueries;
    } VkPhysicalDeviceMeshShaderFeaturesEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `taskShader` specifies whether task shaders are supported. If this feature is not enabled, the VK_SHADER_STAGE_TASK_BIT_EXT and VK_PIPELINE_STAGE_TASK_SHADER_BIT_EXT enum values must not be used.

- `meshShader` specifies whether mesh shaders are supported. If this feature is not enabled, the VK_SHADER_STAGE_MESH_BIT_EXT and VK_PIPELINE_STAGE_MESH_SHADER_BIT_EXT enum values must not be used.

- `multiviewMeshShader` specifies whether the implementation supports `multiview` rendering within a render pass, with mesh shaders. If this feature is not enabled, then a pipeline compiled against a subpass with a non-zero view mask must not include a mesh shader.

- `primitiveFragmentShadingRateMeshShader` indicates that the implementation supports the primitive fragment shading rate in mesh shaders.

- `meshShaderQueries` indicates that the implementation supports creating query pools using the VK_QUERY_TYPE_MESH_PRIMITIVES_GENERATED_EXT query type and statistic queries containing the VK_QUERY_PIPELINE_STATISTIC_TASK_SHADER_INVOCATIONS_BIT_EXT and VK_QUERY_PIPELINE_STATISTIC_MESH_SHADER_INVOCATIONS_BIT_EXT flags

If the `VkPhysicalDeviceMeshShaderFeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceMeshShaderFeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

The corresponding features of the `VkPhysicalDeviceMeshShaderFeaturesNV` structure must match those in `VkPhysicalDeviceMeshShaderFeaturesEXT`.

Valid Usage

- VUID-VkPhysicalDeviceMeshShaderFeaturesEXT-multiviewMeshShader-07032
  If `multiviewMeshShader` is enabled then `VkPhysicalDeviceMultiviewFeaturesKHR`::`multiview` must also be enabled

- VUID-VkPhysicalDeviceMeshShaderFeaturesEXT-primitiveFragmentShadingRateMeshShader-07033
  If `primitiveFragmentShadingRateMeshShader` is enabled then `VkPhysicalDeviceFragmentShadingRateFeaturesKHR`::`primitiveFragmentShadingRate` must also be enabled

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceMeshShaderFeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceMemoryDecompressionFeaturesEXT` structure is defined as:

    // Provided by VK_EXT_memory_decompression
    typedef struct VkPhysicalDeviceMemoryDecompressionFeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           memoryDecompression;
    } VkPhysicalDeviceMemoryDecompressionFeaturesEXT;

    // Provided by VK_NV_memory_decompression
    // Equivalent to VkPhysicalDeviceMemoryDecompressionFeaturesEXT
    typedef VkPhysicalDeviceMemoryDecompressionFeaturesEXT VkPhysicalDeviceMemoryDecompressionFeaturesNV;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `memoryDecompression` indicates whether memory decompression is supported.

If the `VkPhysicalDeviceMemoryDecompressionFeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceMemoryDecompressionFeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceMemoryDecompressionFeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_DECOMPRESSION_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceDescriptorIndexingFeatures` structure is defined as:

    // Provided by VK_VERSION_1_2
    typedef struct VkPhysicalDeviceDescriptorIndexingFeatures {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           shaderInputAttachmentArrayDynamicIndexing;
        VkBool32           shaderUniformTexelBufferArrayDynamicIndexing;
        VkBool32           shaderStorageTexelBufferArrayDynamicIndexing;
        VkBool32           shaderUniformBufferArrayNonUniformIndexing;
        VkBool32           shaderSampledImageArrayNonUniformIndexing;
        VkBool32           shaderStorageBufferArrayNonUniformIndexing;
        VkBool32           shaderStorageImageArrayNonUniformIndexing;
        VkBool32           shaderInputAttachmentArrayNonUniformIndexing;
        VkBool32           shaderUniformTexelBufferArrayNonUniformIndexing;
        VkBool32           shaderStorageTexelBufferArrayNonUniformIndexing;
        VkBool32           descriptorBindingUniformBufferUpdateAfterBind;
        VkBool32           descriptorBindingSampledImageUpdateAfterBind;
        VkBool32           descriptorBindingStorageImageUpdateAfterBind;
        VkBool32           descriptorBindingStorageBufferUpdateAfterBind;
        VkBool32           descriptorBindingUniformTexelBufferUpdateAfterBind;
        VkBool32           descriptorBindingStorageTexelBufferUpdateAfterBind;
        VkBool32           descriptorBindingUpdateUnusedWhilePending;
        VkBool32           descriptorBindingPartiallyBound;
        VkBool32           descriptorBindingVariableDescriptorCount;
        VkBool32           runtimeDescriptorArray;
    } VkPhysicalDeviceDescriptorIndexingFeatures;

    // Provided by VK_EXT_descriptor_indexing
    // Equivalent to VkPhysicalDeviceDescriptorIndexingFeatures
    typedef VkPhysicalDeviceDescriptorIndexingFeatures VkPhysicalDeviceDescriptorIndexingFeaturesEXT;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `shaderInputAttachmentArrayDynamicIndexing` indicates whether arrays of input attachments can be indexed by integer expressions that are dynamically uniform within either the subgroup or the invocation group in shader code. If this feature is not enabled, resources with a descriptor type of VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT must be indexed only by constant integral expressions when aggregated into arrays in shader code. This also indicates whether shader modules can declare the `InputAttachmentArrayDynamicIndexing` capability.

- `shaderUniformTexelBufferArrayDynamicIndexing` indicates whether arrays of uniform texel buffers can be indexed by integer expressions that are dynamically uniform within either the subgroup or the invocation group in shader code. If this feature is not enabled, resources with a descriptor type of VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER must be indexed only by constant integral expressions when aggregated into arrays in shader code. This also indicates whether shader modules can declare the `UniformTexelBufferArrayDynamicIndexing` capability.

- `shaderStorageTexelBufferArrayDynamicIndexing` indicates whether arrays of storage texel buffers can be indexed by integer expressions that are dynamically uniform within either the subgroup or the invocation group in shader code. If this feature is not enabled, resources with a descriptor type of VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER must be indexed only by constant integral expressions when aggregated into arrays in shader code. This also indicates whether shader modules can declare the `StorageTexelBufferArrayDynamicIndexing` capability.

- `shaderUniformBufferArrayNonUniformIndexing` indicates whether arrays of uniform buffers can be indexed by non-uniform integer expressions in shader code. If this feature is not enabled, resources with a descriptor type of VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER or VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC must not be indexed by non-uniform integer expressions when aggregated into arrays in shader code. This also indicates whether shader modules can declare the `UniformBufferArrayNonUniformIndexing` capability.

- `shaderSampledImageArrayNonUniformIndexing` indicates whether arrays of samplers or sampled images can be indexed by non-uniform integer expressions in shader code. If this feature is not enabled, resources with a descriptor type of VK_DESCRIPTOR_TYPE_SAMPLER, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, or VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE must not be indexed by non-uniform integer expressions when aggregated into arrays in shader code. This also indicates whether shader modules can declare the `SampledImageArrayNonUniformIndexing` capability.

- `shaderStorageBufferArrayNonUniformIndexing` indicates whether arrays of storage buffers can be indexed by non-uniform integer expressions in shader code. If this feature is not enabled, resources with a descriptor type of VK_DESCRIPTOR_TYPE_STORAGE_BUFFER or VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC must not be indexed by non-uniform integer expressions when aggregated into arrays in shader code. This also indicates whether shader modules can declare the `StorageBufferArrayNonUniformIndexing` capability.

- `shaderStorageImageArrayNonUniformIndexing` indicates whether arrays of storage images can be indexed by non-uniform integer expressions in shader code. If this feature is not enabled, resources with a descriptor type of VK_DESCRIPTOR_TYPE_STORAGE_IMAGE must not be indexed by non-uniform integer expressions when aggregated into arrays in shader code. This also indicates whether shader modules can declare the `StorageImageArrayNonUniformIndexing` capability.

- `shaderInputAttachmentArrayNonUniformIndexing` indicates whether arrays of input attachments can be indexed by non-uniform integer expressions in shader code. If this feature is not enabled, resources with a descriptor type of VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT must not be indexed by non-uniform integer expressions when aggregated into arrays in shader code. This also indicates whether shader modules can declare the `InputAttachmentArrayNonUniformIndexing` capability.

- `shaderUniformTexelBufferArrayNonUniformIndexing` indicates whether arrays of uniform texel buffers can be indexed by non-uniform integer expressions in shader code. If this feature is not enabled, resources with a descriptor type of VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER must not be indexed by non-uniform integer expressions when aggregated into arrays in shader code. This also indicates whether shader modules can declare the `UniformTexelBufferArrayNonUniformIndexing` capability.

- `shaderStorageTexelBufferArrayNonUniformIndexing` indicates whether arrays of storage texel buffers can be indexed by non-uniform integer expressions in shader code. If this feature is not enabled, resources with a descriptor type of VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER must not be indexed by non-uniform integer expressions when aggregated into arrays in shader code. This also indicates whether shader modules can declare the `StorageTexelBufferArrayNonUniformIndexing` capability.

- `descriptorBindingUniformBufferUpdateAfterBind` indicates whether the implementation supports updating uniform buffer descriptors after a set is bound. If this feature is not enabled, VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT must not be used with VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER.

- `descriptorBindingSampledImageUpdateAfterBind` indicates whether the implementation supports updating sampled image descriptors after a set is bound. If this feature is not enabled, VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT must not be used with VK_DESCRIPTOR_TYPE_SAMPLER, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, or VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE.

- `descriptorBindingStorageImageUpdateAfterBind` indicates whether the implementation supports updating storage image descriptors after a set is bound. If this feature is not enabled, VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT must not be used with VK_DESCRIPTOR_TYPE_STORAGE_IMAGE.

- `descriptorBindingStorageBufferUpdateAfterBind` indicates whether the implementation supports updating storage buffer descriptors after a set is bound. If this feature is not enabled, VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT must not be used with VK_DESCRIPTOR_TYPE_STORAGE_BUFFER.

- `descriptorBindingUniformTexelBufferUpdateAfterBind` indicates whether the implementation supports updating uniform texel buffer descriptors after a set is bound. If this feature is not enabled, VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT must not be used with VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER.

- `descriptorBindingStorageTexelBufferUpdateAfterBind` indicates whether the implementation supports updating storage texel buffer descriptors after a set is bound. If this feature is not enabled, VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT must not be used with VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER.

- `descriptorBindingUpdateUnusedWhilePending` indicates whether the implementation supports updating descriptors while the set is in use. If this feature is not enabled, VK_DESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT must not be used.

- `descriptorBindingPartiallyBound` indicates whether the implementation supports statically using a descriptor set binding in which some descriptors are not valid. If this feature is not enabled, VK_DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT must not be used.

- `descriptorBindingVariableDescriptorCount` indicates whether the implementation supports descriptor sets with a variable-sized last binding. If this feature is not enabled, VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT must not be used.

- `runtimeDescriptorArray` indicates whether the implementation supports the SPIR-V `RuntimeDescriptorArray` capability. If this feature is not enabled, descriptors must not be declared in runtime arrays.

If the `VkPhysicalDeviceDescriptorIndexingFeatures` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceDescriptorIndexingFeatures`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceDescriptorIndexingFeatures-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceCopyMemoryIndirectFeaturesNV` structure is defined as:

    // Provided by VK_NV_copy_memory_indirect
    typedef struct VkPhysicalDeviceCopyMemoryIndirectFeaturesNV {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           indirectCopy;
    } VkPhysicalDeviceCopyMemoryIndirectFeaturesNV;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `indirectCopy` indicates whether indirect memory to memory or, memory to image copies are supported.

If the `VkPhysicalDeviceCopyMemoryIndirectFeaturesNV` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceCopyMemoryIndirectFeaturesNV`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceCopyMemoryIndirectFeaturesNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COPY_MEMORY_INDIRECT_FEATURES_NV

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceCopyMemoryIndirectFeaturesKHR` structure is defined as:

    // Provided by VK_KHR_copy_memory_indirect
    typedef struct VkPhysicalDeviceCopyMemoryIndirectFeaturesKHR {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           indirectMemoryCopy;
        VkBool32           indirectMemoryToImageCopy;
    } VkPhysicalDeviceCopyMemoryIndirectFeaturesKHR;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `indirectMemoryCopy` indicates whether indirect memory to memory copies are supported.

- `indirectMemoryToImageCopy` indicates whether indirect memory to image copies are supported.

If the `VkPhysicalDeviceCopyMemoryIndirectFeaturesKHR` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceCopyMemoryIndirectFeaturesKHR`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceCopyMemoryIndirectFeaturesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COPY_MEMORY_INDIRECT_FEATURES_KHR

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceVertexAttributeDivisorFeatures` structure is defined as:

    // Provided by VK_VERSION_1_4
    typedef struct VkPhysicalDeviceVertexAttributeDivisorFeatures {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           vertexAttributeInstanceRateDivisor;
        VkBool32           vertexAttributeInstanceRateZeroDivisor;
    } VkPhysicalDeviceVertexAttributeDivisorFeatures;

    // Provided by VK_KHR_vertex_attribute_divisor
    // Equivalent to VkPhysicalDeviceVertexAttributeDivisorFeatures
    typedef VkPhysicalDeviceVertexAttributeDivisorFeatures VkPhysicalDeviceVertexAttributeDivisorFeaturesKHR;

    // Provided by VK_EXT_vertex_attribute_divisor
    // Equivalent to VkPhysicalDeviceVertexAttributeDivisorFeatures
    typedef VkPhysicalDeviceVertexAttributeDivisorFeatures VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `vertexAttributeInstanceRateDivisor` specifies whether vertex attribute fetching may be repeated in the case of instanced rendering.

- `vertexAttributeInstanceRateZeroDivisor` specifies whether a zero value for VkVertexInputBindingDivisorDescription::`divisor` is supported.

If the `VkPhysicalDeviceVertexAttributeDivisorFeatures` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceVertexAttributeDivisorFeatures`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceVertexAttributeDivisorFeatures-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceASTCDecodeFeaturesEXT` structure is defined as:

    // Provided by VK_EXT_astc_decode_mode
    typedef struct VkPhysicalDeviceASTCDecodeFeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           decodeModeSharedExponent;
    } VkPhysicalDeviceASTCDecodeFeaturesEXT;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `decodeModeSharedExponent` indicates whether the implementation supports decoding ASTC compressed formats to VK_FORMAT_E5B9G9R9_UFLOAT_PACK32 internal precision.

If the `VkPhysicalDeviceASTCDecodeFeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceASTCDecodeFeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceASTCDecodeFeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ASTC_DECODE_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceTransformFeedbackFeaturesEXT` structure is defined as:

    // Provided by VK_EXT_transform_feedback
    typedef struct VkPhysicalDeviceTransformFeedbackFeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           transformFeedback;
        VkBool32           geometryStreams;
    } VkPhysicalDeviceTransformFeedbackFeaturesEXT;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `transformFeedback` indicates whether the implementation supports transform feedback and shader modules can declare the `TransformFeedback` capability.

- `geometryStreams` indicates whether the implementation supports the `GeometryStreams` SPIR-V capability.

If the `VkPhysicalDeviceTransformFeedbackFeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceTransformFeedbackFeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceTransformFeedbackFeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceVulkanMemoryModelFeatures` structure is defined as:

    // Provided by VK_VERSION_1_2
    typedef struct VkPhysicalDeviceVulkanMemoryModelFeatures {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           vulkanMemoryModel;
        VkBool32           vulkanMemoryModelDeviceScope;
        VkBool32           vulkanMemoryModelAvailabilityVisibilityChains;
    } VkPhysicalDeviceVulkanMemoryModelFeatures;

    // Provided by VK_KHR_vulkan_memory_model
    // Equivalent to VkPhysicalDeviceVulkanMemoryModelFeatures
    typedef VkPhysicalDeviceVulkanMemoryModelFeatures VkPhysicalDeviceVulkanMemoryModelFeaturesKHR;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `vulkanMemoryModel` indicates whether shader modules can declare the `VulkanMemoryModel` capability.

- `vulkanMemoryModelDeviceScope` indicates whether the Vulkan Memory Model can use `Device` scope synchronization. This also indicates whether shader modules can declare the `VulkanMemoryModelDeviceScope` capability.

- `vulkanMemoryModelAvailabilityVisibilityChains` indicates whether the Vulkan Memory Model can use availability and visibility chains with more than one element.

If the `VkPhysicalDeviceVulkanMemoryModelFeaturesKHR` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceVulkanMemoryModelFeaturesKHR`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceVulkanMemoryModelFeatures-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceInlineUniformBlockFeatures` structure is defined as:

    // Provided by VK_VERSION_1_3
    typedef struct VkPhysicalDeviceInlineUniformBlockFeatures {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           inlineUniformBlock;
        VkBool32           descriptorBindingInlineUniformBlockUpdateAfterBind;
    } VkPhysicalDeviceInlineUniformBlockFeatures;

    // Provided by VK_EXT_inline_uniform_block
    // Equivalent to VkPhysicalDeviceInlineUniformBlockFeatures
    typedef VkPhysicalDeviceInlineUniformBlockFeatures VkPhysicalDeviceInlineUniformBlockFeaturesEXT;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `inlineUniformBlock` indicates whether the implementation supports inline uniform block descriptors. If this feature is not enabled, VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK must not be used.

- `descriptorBindingInlineUniformBlockUpdateAfterBind` indicates whether the implementation supports updating inline uniform block descriptors after a set is bound. If this feature is not enabled, VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT must not be used with VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK.

If the `VkPhysicalDeviceInlineUniformBlockFeatures` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceInlineUniformBlockFeatures`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceInlineUniformBlockFeatures-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV` structure is defined as:

    // Provided by VK_NV_representative_fragment_test
    typedef struct VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           representativeFragmentTest;
    } VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `representativeFragmentTest` indicates whether the implementation supports the representative fragment test. See Representative Fragment Test.

If the `VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_REPRESENTATIVE_FRAGMENT_TEST_FEATURES_NV

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceExclusiveScissorFeaturesNV` structure is defined as:

    // Provided by VK_NV_scissor_exclusive
    typedef struct VkPhysicalDeviceExclusiveScissorFeaturesNV {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           exclusiveScissor;
    } VkPhysicalDeviceExclusiveScissorFeaturesNV;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `exclusiveScissor` indicates that the implementation supports the exclusive scissor test.

See Exclusive Scissor Test for more information.

If the `VkPhysicalDeviceExclusiveScissorFeaturesNV` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceExclusiveScissorFeaturesNV`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceExclusiveScissorFeaturesNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXCLUSIVE_SCISSOR_FEATURES_NV

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceCornerSampledImageFeaturesNV` structure is defined as:

    // Provided by VK_NV_corner_sampled_image
    typedef struct VkPhysicalDeviceCornerSampledImageFeaturesNV {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           cornerSampledImage;
    } VkPhysicalDeviceCornerSampledImageFeaturesNV;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `cornerSampledImage` specifies whether images can be created with a VkImageCreateInfo::`flags` containing VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV. See Corner-Sampled Images.

If the `VkPhysicalDeviceCornerSampledImageFeaturesNV` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceCornerSampledImageFeaturesNV`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceCornerSampledImageFeaturesNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CORNER_SAMPLED_IMAGE_FEATURES_NV

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR` structure is defined as:

    // Provided by VK_KHR_compute_shader_derivatives
    typedef struct VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           computeDerivativeGroupQuads;
        VkBool32           computeDerivativeGroupLinear;
    } VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR;

    // Provided by VK_NV_compute_shader_derivatives
    // Equivalent to VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR
    typedef VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR VkPhysicalDeviceComputeShaderDerivativesFeaturesNV;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `computeDerivativeGroupQuads` indicates that the implementation supports the `ComputeDerivativeGroupQuadsKHR` SPIR-V capability.

- `computeDerivativeGroupLinear` indicates that the implementation supports the `ComputeDerivativeGroupLinearKHR` SPIR-V capability.

See Quad shader scope for more information.

If the `VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR`. structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR`., it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_KHR

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR` structure is defined as:

    // Provided by VK_KHR_fragment_shader_barycentric
    typedef struct VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           fragmentShaderBarycentric;
    } VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR;

    // Provided by VK_NV_fragment_shader_barycentric
    // Equivalent to VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR
    typedef VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR VkPhysicalDeviceFragmentShaderBarycentricFeaturesNV;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `fragmentShaderBarycentric` indicates that the implementation supports the `BaryCoordKHR` and `BaryCoordNoPerspKHR` SPIR-V fragment shader built-ins and supports the `PerVertexKHR` SPIR-V decoration on fragment shader input variables.

See Barycentric Interpolation for more information.

If the `VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_KHR

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceShaderImageFootprintFeaturesNV` structure is defined as:

    // Provided by VK_NV_shader_image_footprint
    typedef struct VkPhysicalDeviceShaderImageFootprintFeaturesNV {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           imageFootprint;
    } VkPhysicalDeviceShaderImageFootprintFeaturesNV;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `imageFootprint` specifies whether the implementation supports the `ImageFootprintNV` SPIR-V capability.

See Texel Footprint Evaluation for more information.

If the `VkPhysicalDeviceShaderImageFootprintFeaturesNV` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceShaderImageFootprintFeaturesNV`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceShaderImageFootprintFeaturesNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_IMAGE_FOOTPRINT_FEATURES_NV

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceShadingRateImageFeaturesNV` structure is defined as:

    // Provided by VK_NV_shading_rate_image
    typedef struct VkPhysicalDeviceShadingRateImageFeaturesNV {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           shadingRateImage;
        VkBool32           shadingRateCoarseSampleOrder;
    } VkPhysicalDeviceShadingRateImageFeaturesNV;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `shadingRateImage` indicates that the implementation supports the use of a shading rate image to derive an effective shading rate for fragment processing. It also indicates that the implementation supports the `ShadingRateNV` SPIR-V execution mode.

- `shadingRateCoarseSampleOrder` indicates that the implementation supports an application-configurable ordering of coverage samples in fragments larger than one pixel.

See Shading Rate Image for more information.

If the `VkPhysicalDeviceShadingRateImageFeaturesNV` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceShadingRateImageFeaturesNV`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceShadingRateImageFeaturesNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADING_RATE_IMAGE_FEATURES_NV

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceFragmentDensityMapFeaturesEXT` structure is defined as:

    // Provided by VK_EXT_fragment_density_map
    typedef struct VkPhysicalDeviceFragmentDensityMapFeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           fragmentDensityMap;
        VkBool32           fragmentDensityMapDynamic;
        VkBool32           fragmentDensityMapNonSubsampledImages;
    } VkPhysicalDeviceFragmentDensityMapFeaturesEXT;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `fragmentDensityMap` specifies whether the implementation supports render passes with a fragment density map attachment. If this feature is not enabled and the `pNext` chain of VkRenderPassCreateInfo includes a VkRenderPassFragmentDensityMapCreateInfoEXT structure, `fragmentDensityMapAttachment` must be VK_ATTACHMENT_UNUSED.

- `fragmentDensityMapDynamic` specifies whether the implementation supports dynamic fragment density map image views. If this feature is not enabled, VK_IMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DYNAMIC_BIT_EXT must not be included in VkImageViewCreateInfo::`flags`.

- `fragmentDensityMapNonSubsampledImages` specifies whether the implementation supports regular non-subsampled image attachments with fragment density map render passes. If this feature is not enabled, render passes with a fragment density map attachment must only have subsampled attachments bound.

If the `VkPhysicalDeviceFragmentDensityMapFeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceFragmentDensityMapFeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceFragmentDensityMapFeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceFragmentDensityMap2FeaturesEXT` structure is defined as:

    // Provided by VK_EXT_fragment_density_map2
    typedef struct VkPhysicalDeviceFragmentDensityMap2FeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           fragmentDensityMapDeferred;
    } VkPhysicalDeviceFragmentDensityMap2FeaturesEXT;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `fragmentDensityMapDeferred` specifies whether the implementation supports deferred reads of fragment density map image views. If this feature is not enabled, VK_IMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DEFERRED_BIT_EXT must not be included in `VkImageViewCreateInfo`::`flags`.

If the `VkPhysicalDeviceFragmentDensityMap2FeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceFragmentDensityMap2FeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceFragmentDensityMap2FeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_2_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceFragmentDensityMapOffsetFeaturesEXT` structure is defined as:

    // Provided by VK_EXT_fragment_density_map_offset
    typedef struct VkPhysicalDeviceFragmentDensityMapOffsetFeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           fragmentDensityMapOffset;
    } VkPhysicalDeviceFragmentDensityMapOffsetFeaturesEXT;

    // Provided by VK_QCOM_fragment_density_map_offset
    // Equivalent to VkPhysicalDeviceFragmentDensityMapOffsetFeaturesEXT
    typedef VkPhysicalDeviceFragmentDensityMapOffsetFeaturesEXT VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `fragmentDensityMapOffset` specifies whether the implementation supports fragment density map offsets

If the `VkPhysicalDeviceFragmentDensityMapOffsetFeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceFragmentDensityMapOffsetFeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceFragmentDensityMapOffsetFeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_OFFSET_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE` structure is defined as:

    // Provided by VK_VALVE_fragment_density_map_layered
    typedef struct VkPhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           fragmentDensityMapLayered;
    } VkPhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `fragmentDensityMapLayered` specifies whether the implementation supports layered fragment density maps.

If the `VkPhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_LAYERED_FEATURES_VALVE

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceInvocationMaskFeaturesHUAWEI` structure is defined as:

    // Provided by VK_HUAWEI_invocation_mask
    typedef struct VkPhysicalDeviceInvocationMaskFeaturesHUAWEI {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           invocationMask;
    } VkPhysicalDeviceInvocationMaskFeaturesHUAWEI;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `invocationMask` indicates that the implementation supports the use of an invocation mask image to optimize the ray dispatch.

If the `VkPhysicalDeviceInvocationMaskFeaturesHUAWEI` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceInvocationMaskFeaturesHUAWEI`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceInvocationMaskFeaturesHUAWEI-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INVOCATION_MASK_FEATURES_HUAWEI

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceScalarBlockLayoutFeatures` structure is defined as:

    // Provided by VK_VERSION_1_2
    typedef struct VkPhysicalDeviceScalarBlockLayoutFeatures {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           scalarBlockLayout;
    } VkPhysicalDeviceScalarBlockLayoutFeatures;

    // Provided by VK_EXT_scalar_block_layout
    // Equivalent to VkPhysicalDeviceScalarBlockLayoutFeatures
    typedef VkPhysicalDeviceScalarBlockLayoutFeatures VkPhysicalDeviceScalarBlockLayoutFeaturesEXT;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `scalarBlockLayout` indicates that the implementation supports the layout of resource blocks in shaders using scalar alignment.

If the `VkPhysicalDeviceScalarBlockLayoutFeatures` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceScalarBlockLayoutFeatures`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceScalarBlockLayoutFeatures-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceUniformBufferStandardLayoutFeatures` structure is defined as:

    // Provided by VK_VERSION_1_2
    typedef struct VkPhysicalDeviceUniformBufferStandardLayoutFeatures {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           uniformBufferStandardLayout;
    } VkPhysicalDeviceUniformBufferStandardLayoutFeatures;

    // Provided by VK_KHR_uniform_buffer_standard_layout
    // Equivalent to VkPhysicalDeviceUniformBufferStandardLayoutFeatures
    typedef VkPhysicalDeviceUniformBufferStandardLayoutFeatures VkPhysicalDeviceUniformBufferStandardLayoutFeaturesKHR;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `uniformBufferStandardLayout` indicates that the implementation supports the same layouts for uniform buffers as for storage and other kinds of buffers. See Standard Buffer Layout.

If the `VkPhysicalDeviceUniformBufferStandardLayoutFeatures` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceUniformBufferStandardLayoutFeatures`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceUniformBufferStandardLayoutFeatures-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceDepthClipEnableFeaturesEXT` structure is defined as:

    // Provided by VK_EXT_depth_clip_enable
    typedef struct VkPhysicalDeviceDepthClipEnableFeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           depthClipEnable;
    } VkPhysicalDeviceDepthClipEnableFeaturesEXT;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `depthClipEnable` indicates that the implementation supports setting the depth clipping operation explicitly via the VkPipelineRasterizationDepthClipStateCreateInfoEXT pipeline state. Otherwise depth clipping is only enabled when VkPipelineRasterizationStateCreateInfo::`depthClampEnable` is VK_FALSE.

If the `VkPhysicalDeviceDepthClipEnableFeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceDepthClipEnableFeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceDepthClipEnableFeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_ENABLE_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceMemoryPriorityFeaturesEXT` structure is defined as:

    // Provided by VK_EXT_memory_priority
    typedef struct VkPhysicalDeviceMemoryPriorityFeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           memoryPriority;
    } VkPhysicalDeviceMemoryPriorityFeaturesEXT;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `memoryPriority` indicates that the implementation supports memory priorities specified at memory allocation time via VkMemoryPriorityAllocateInfoEXT.

If the `VkPhysicalDeviceMemoryPriorityFeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceMemoryPriorityFeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceMemoryPriorityFeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PRIORITY_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceBufferDeviceAddressFeatures` structure is defined as:

    // Provided by VK_VERSION_1_2
    typedef struct VkPhysicalDeviceBufferDeviceAddressFeatures {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           bufferDeviceAddress;
        VkBool32           bufferDeviceAddressCaptureReplay;
        VkBool32           bufferDeviceAddressMultiDevice;
    } VkPhysicalDeviceBufferDeviceAddressFeatures;

    // Provided by VK_KHR_buffer_device_address
    // Equivalent to VkPhysicalDeviceBufferDeviceAddressFeatures
    typedef VkPhysicalDeviceBufferDeviceAddressFeatures VkPhysicalDeviceBufferDeviceAddressFeaturesKHR;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `bufferDeviceAddress` indicates that the implementation supports accessing buffer memory in shaders as storage buffers via an address queried from vkGetBufferDeviceAddress.

- `bufferDeviceAddressCaptureReplay` indicates that the implementation supports saving and reusing buffer and device addresses, e.g. for trace capture and replay.

- `bufferDeviceAddressMultiDevice` indicates that the implementation supports the `bufferDeviceAddress` , `rayTracingPipeline` and `rayQuery` features for logical devices created with multiple physical devices. If this feature is not supported, buffer and acceleration structure addresses must not be queried on a logical device created with more than one physical device.

Note | `bufferDeviceAddressMultiDevice` exists to allow certain legacy platforms to be able to support `bufferDeviceAddress` without needing to support shared GPU virtual addresses for multi-device configurations.

See vkGetBufferDeviceAddress for more information.

If the `VkPhysicalDeviceBufferDeviceAddressFeatures` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceBufferDeviceAddressFeatures`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceBufferDeviceAddressFeatures-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceBufferDeviceAddressFeaturesEXT` structure is defined as:

    // Provided by VK_EXT_buffer_device_address
    typedef struct VkPhysicalDeviceBufferDeviceAddressFeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           bufferDeviceAddress;
        VkBool32           bufferDeviceAddressCaptureReplay;
        VkBool32           bufferDeviceAddressMultiDevice;
    } VkPhysicalDeviceBufferDeviceAddressFeaturesEXT;

    // Provided by VK_EXT_buffer_device_address
    // Equivalent to VkPhysicalDeviceBufferDeviceAddressFeaturesEXT
    typedef VkPhysicalDeviceBufferDeviceAddressFeaturesEXT VkPhysicalDeviceBufferAddressFeaturesEXT;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `bufferDeviceAddress` indicates that the implementation supports accessing buffer memory in shaders as storage buffers via an address queried from vkGetBufferDeviceAddressEXT.

- `bufferDeviceAddressCaptureReplay` indicates that the implementation supports saving and reusing buffer addresses, e.g. for trace capture and replay.

- `bufferDeviceAddressMultiDevice` indicates that the implementation supports the `bufferDeviceAddress` feature for logical devices created with multiple physical devices. If this feature is not supported, buffer addresses must not be queried on a logical device created with more than one physical device.

If the `VkPhysicalDeviceBufferDeviceAddressFeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceBufferDeviceAddressFeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Note | The `VkPhysicalDeviceBufferDeviceAddressFeaturesEXT` structure has the same members as the `VkPhysicalDeviceBufferDeviceAddressFeatures` structure, but the functionality indicated by the members is expressed differently. The features indicated by the `VkPhysicalDeviceBufferDeviceAddressFeatures` structure requires additional flags to be passed at memory allocation time, and the capture and replay mechanism is built around opaque capture addresses for buffer and memory objects.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceBufferDeviceAddressFeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV` structure is defined as:

    // Provided by VK_NV_dedicated_allocation_image_aliasing
    typedef struct VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           dedicatedAllocationImageAliasing;
    } VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `dedicatedAllocationImageAliasing` indicates that the implementation supports aliasing of compatible image objects on a dedicated allocation.

If the `VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEDICATED_ALLOCATION_IMAGE_ALIASING_FEATURES_NV

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceElapsedTimerQueryFeaturesQCOM` structure is defined as:

    // Provided by VK_QCOM_elapsed_timer_query
    typedef struct VkPhysicalDeviceElapsedTimerQueryFeaturesQCOM {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           elapsedTimerQuery;
    } VkPhysicalDeviceElapsedTimerQueryFeaturesQCOM;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `elapsedTimerQuery` indicates that the implementation supports VK_QUERY_TYPE_TIME_ELAPSED_QCOM queries.

If the `VkPhysicalDeviceElapsedTimerQueryFeaturesQCOM` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceElapsedTimerQueryFeaturesQCOM`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceElapsedTimerQueryFeaturesQCOM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ELAPSED_TIMER_QUERY_FEATURES_QCOM

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceImagelessFramebufferFeatures` structure is defined as:

    // Provided by VK_VERSION_1_2
    typedef struct VkPhysicalDeviceImagelessFramebufferFeatures {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           imagelessFramebuffer;
    } VkPhysicalDeviceImagelessFramebufferFeatures;

    // Provided by VK_KHR_imageless_framebuffer
    // Equivalent to VkPhysicalDeviceImagelessFramebufferFeatures
    typedef VkPhysicalDeviceImagelessFramebufferFeatures VkPhysicalDeviceImagelessFramebufferFeaturesKHR;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `imagelessFramebuffer` indicates that the implementation supports specifying the image view for attachments at render pass begin time via VkRenderPassAttachmentBeginInfo.

If the `VkPhysicalDeviceImagelessFramebufferFeatures` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceImagelessFramebufferFeatures`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceImagelessFramebufferFeatures-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGELESS_FRAMEBUFFER_FEATURES

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT` structure is defined as:

    // Provided by VK_EXT_fragment_shader_interlock
    typedef struct VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           fragmentShaderSampleInterlock;
        VkBool32           fragmentShaderPixelInterlock;
        VkBool32           fragmentShaderShadingRateInterlock;
    } VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `fragmentShaderSampleInterlock` indicates that the implementation supports the `FragmentShaderSampleInterlockEXT` SPIR-V capability.

- `fragmentShaderPixelInterlock` indicates that the implementation supports the `FragmentShaderPixelInterlockEXT` SPIR-V capability.

- `fragmentShaderShadingRateInterlock` indicates that the implementation supports the `FragmentShaderShadingRateInterlockEXT` SPIR-V capability.

If the `VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_INTERLOCK_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceCooperativeMatrixFeaturesNV` structure is defined as:

    // Provided by VK_NV_cooperative_matrix
    typedef struct VkPhysicalDeviceCooperativeMatrixFeaturesNV {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           cooperativeMatrix;
        VkBool32           cooperativeMatrixRobustBufferAccess;
    } VkPhysicalDeviceCooperativeMatrixFeaturesNV;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `cooperativeMatrix` indicates that the implementation supports the `CooperativeMatrixNV` SPIR-V capability.

- `cooperativeMatrixRobustBufferAccess` indicates that the implementation supports implementation supports robust buffer access for SPIR-V `OpCooperativeMatrixLoadNV` and `OpCooperativeMatrixStoreNV` instructions.

If the `VkPhysicalDeviceCooperativeMatrixFeaturesNV` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceCooperativeMatrixFeaturesNV`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceCooperativeMatrixFeaturesNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_NV

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceCooperativeMatrixFeaturesKHR` structure is defined as:

    // Provided by VK_KHR_cooperative_matrix
    typedef struct VkPhysicalDeviceCooperativeMatrixFeaturesKHR {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           cooperativeMatrix;
        VkBool32           cooperativeMatrixRobustBufferAccess;
    } VkPhysicalDeviceCooperativeMatrixFeaturesKHR;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `cooperativeMatrix` indicates that the implementation supports the `CooperativeMatrixKHR` SPIR-V capability.

- `cooperativeMatrixRobustBufferAccess` indicates that the implementation supports robust buffer access for SPIR-V `OpCooperativeMatrixLoadKHR` and `OpCooperativeMatrixStoreKHR` instructions.

If the `VkPhysicalDeviceCooperativeMatrixFeaturesKHR` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceCooperativeMatrixFeaturesKHR`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceCooperativeMatrixFeaturesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_KHR

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceCooperativeMatrixConversionFeaturesQCOM` structure is defined as:

    // Provided by VK_QCOM_cooperative_matrix_conversion
    typedef struct VkPhysicalDeviceCooperativeMatrixConversionFeaturesQCOM {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           cooperativeMatrixConversion;
    } VkPhysicalDeviceCooperativeMatrixConversionFeaturesQCOM;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `cooperativeMatrixConversion` indicates that the implementation supports the `CooperativeMatrixConversionQCOM` SPIR-V capability.

If the `VkPhysicalDeviceCooperativeMatrixConversionFeaturesQCOM` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceCooperativeMatrixConversionFeaturesQCOM`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceCooperativeMatrixConversionFeaturesQCOM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_CONVERSION_FEATURES_QCOM

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceCooperativeMatrix2FeaturesNV` structure is defined as:

    // Provided by VK_NV_cooperative_matrix2
    typedef struct VkPhysicalDeviceCooperativeMatrix2FeaturesNV {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           cooperativeMatrixWorkgroupScope;
        VkBool32           cooperativeMatrixFlexibleDimensions;
        VkBool32           cooperativeMatrixReductions;
        VkBool32           cooperativeMatrixConversions;
        VkBool32           cooperativeMatrixPerElementOperations;
        VkBool32           cooperativeMatrixTensorAddressing;
        VkBool32           cooperativeMatrixBlockLoads;
    } VkPhysicalDeviceCooperativeMatrix2FeaturesNV;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `cooperativeMatrixWorkgroupScope` indicates that the implementation supports workgroup scope cooperative matrices.

- `cooperativeMatrixFlexibleDimensions` indicates that the implementation supports cooperative matrix sizes that are a multiple of the granularity advertised in VkCooperativeMatrixFlexibleDimensionsPropertiesNV.

- `cooperativeMatrixReductions` indicates that the implementation supports the `CooperativeMatrixReductionsNV` SPIR-V capability. This allows performing (row, column, 2x2, or all element) reductions on matrices.

- `cooperativeMatrixConversions` indicates that the implementation supports the `CooperativeMatrixConversionsNV` SPIR-V capability. This allows converting accumulator matrices to A or B matrices.

- `cooperativeMatrixPerElementOperations` indicates that the implementation supports the `CooperativeMatrixPerElementOperationsNV` SPIR-V capability. This allows performing element-wise operations on matrix elements using a callback function.

- `cooperativeMatrixTensorAddressing` indicates that the implementation supports the `TensorAddressingNV` and `CooperativeMatrixTensorAddressingNV` SPIR-V capabilities. This allows using tensor layout and tensor view types for matrix loads and stores.

- `cooperativeMatrixBlockLoads` indicates that the implementation supports the `CooperativeMatrixBlockLoadsNV` SPIR-V capability. This allows setting block size for loads and using a callback function to decode block elements.

If the `VkPhysicalDeviceCooperativeMatrix2FeaturesNV` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceCooperativeMatrix2FeaturesNV`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceCooperativeMatrix2FeaturesNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_2_FEATURES_NV

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceCooperativeMatrixDecodeVectorFeaturesNV` structure is defined as:

    // Provided by VK_NV_cooperative_matrix_decode_vector
    typedef struct VkPhysicalDeviceCooperativeMatrixDecodeVectorFeaturesNV {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           cooperativeMatrixDecodeVector;
    } VkPhysicalDeviceCooperativeMatrixDecodeVectorFeaturesNV;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `cooperativeMatrixDecodeVector` indicates that the implementation supports the `CooperativeMatrixDecodeVectorNV` SPIR-V capability. This allows `OpCooperativeMatrixLoadTensorNV` to use an optional DecodeVectorFunc operand to decode multiple block-adjacent elements per callback, as defined in `SPV_NV_cooperative_matrix_decode_vector`.

If the `VkPhysicalDeviceCooperativeMatrixDecodeVectorFeaturesNV` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceCooperativeMatrixDecodeVectorFeaturesNV`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceCooperativeMatrixDecodeVectorFeaturesNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_DECODE_VECTOR_FEATURES_NV

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceCooperativeVectorFeaturesNV` structure is defined as:

    // Provided by VK_NV_cooperative_vector
    typedef struct VkPhysicalDeviceCooperativeVectorFeaturesNV {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           cooperativeVector;
        VkBool32           cooperativeVectorTraining;
    } VkPhysicalDeviceCooperativeVectorFeaturesNV;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `cooperativeVector` indicates that the implementation supports the `CooperativeVectorNV` SPIR-V capability.

- `cooperativeVectorTraining` indicates that the implementation supports the `CooperativeVectorTrainingNV` SPIR-V capability.

If the `VkPhysicalDeviceCooperativeVectorFeaturesNV` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceCooperativeVectorFeaturesNV`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceCooperativeVectorFeaturesNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_VECTOR_FEATURES_NV

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceShaderLongVectorFeaturesEXT` structure is defined as:

    // Provided by VK_EXT_shader_long_vector
    typedef struct VkPhysicalDeviceShaderLongVectorFeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           longVector;
    } VkPhysicalDeviceShaderLongVectorFeaturesEXT;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `longVector` indicates that the implementation supports the `LongVectorEXT` SPIR-V capability.

If the `VkPhysicalDeviceShaderLongVectorFeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceShaderLongVectorFeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceShaderLongVectorFeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_LONG_VECTOR_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceYcbcrImageArraysFeaturesEXT` structure is defined as:

    // Provided by VK_EXT_ycbcr_image_arrays
    typedef struct VkPhysicalDeviceYcbcrImageArraysFeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           ycbcrImageArrays;
    } VkPhysicalDeviceYcbcrImageArraysFeaturesEXT;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `ycbcrImageArrays` indicates that the implementation supports creating images with a format that requires Y′CBCR conversion and has multiple array layers.

If the `VkPhysicalDeviceYcbcrImageArraysFeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceYcbcrImageArraysFeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceYcbcrImageArraysFeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_IMAGE_ARRAYS_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures` structure is defined as:

    // Provided by VK_VERSION_1_2
    typedef struct VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           shaderSubgroupExtendedTypes;
    } VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures;

    // Provided by VK_KHR_shader_subgroup_extended_types
    // Equivalent to VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures
    typedef VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures VkPhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `shaderSubgroupExtendedTypes` is a boolean specifying whether subgroup operations can use 8-bit integer, 16-bit integer, 64-bit integer, 16-bit floating-point, and vectors of these types in group operations with subgroup scope, if the implementation supports the types.

If the `VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceHostQueryResetFeatures` structure is defined as:

    // Provided by VK_VERSION_1_2
    typedef struct VkPhysicalDeviceHostQueryResetFeatures {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           hostQueryReset;
    } VkPhysicalDeviceHostQueryResetFeatures;

    // Provided by VK_EXT_host_query_reset
    // Equivalent to VkPhysicalDeviceHostQueryResetFeatures
    typedef VkPhysicalDeviceHostQueryResetFeatures VkPhysicalDeviceHostQueryResetFeaturesEXT;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `hostQueryReset` indicates that the implementation supports resetting queries from the host with vkResetQueryPool.

If the `VkPhysicalDeviceHostQueryResetFeatures` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceHostQueryResetFeatures`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceHostQueryResetFeatures-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL` structure is defined as:

    // Provided by VK_INTEL_shader_integer_functions2
    typedef struct VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           shaderIntegerFunctions2;
    } VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `shaderIntegerFunctions2` indicates that the implementation supports the `IntegerFunctions2INTEL` SPIR-V capability.

If the `VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTELfeatures`. structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTELfeatures`., it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_FUNCTIONS_2_FEATURES_INTEL

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceCoverageReductionModeFeaturesNV` structure is defined as:

    // Provided by VK_NV_coverage_reduction_mode
    typedef struct VkPhysicalDeviceCoverageReductionModeFeaturesNV {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           coverageReductionMode;
    } VkPhysicalDeviceCoverageReductionModeFeaturesNV;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `coverageReductionMode` indicates whether the implementation supports coverage reduction modes. See Coverage Reduction.

If the `VkPhysicalDeviceCoverageReductionModeFeaturesNV` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceCoverageReductionModeFeaturesNV`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceCoverageReductionModeFeaturesNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COVERAGE_REDUCTION_MODE_FEATURES_NV

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceTimelineSemaphoreFeatures` structure is defined as:

    // Provided by VK_VERSION_1_2
    typedef struct VkPhysicalDeviceTimelineSemaphoreFeatures {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           timelineSemaphore;
    } VkPhysicalDeviceTimelineSemaphoreFeatures;

    // Provided by VK_KHR_timeline_semaphore
    // Equivalent to VkPhysicalDeviceTimelineSemaphoreFeatures
    typedef VkPhysicalDeviceTimelineSemaphoreFeatures VkPhysicalDeviceTimelineSemaphoreFeaturesKHR;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `timelineSemaphore` indicates whether semaphores created with a VkSemaphoreType of VK_SEMAPHORE_TYPE_TIMELINE are supported.

If the `VkPhysicalDeviceTimelineSemaphoreFeatures` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceTimelineSemaphoreFeatures`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceTimelineSemaphoreFeatures-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceInternallySynchronizedQueuesFeaturesKHR` structure is defined as:

    // Provided by VK_KHR_internally_synchronized_queues
    typedef struct VkPhysicalDeviceInternallySynchronizedQueuesFeaturesKHR {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           internallySynchronizedQueues;
    } VkPhysicalDeviceInternallySynchronizedQueuesFeaturesKHR;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `internallySynchronizedQueues` indicates that VK_DEVICE_QUEUE_CREATE_INTERNALLY_SYNCHRONIZED_BIT_KHR can be used to make queues internally synchronized.

If the `VkPhysicalDeviceInternallySynchronizedQueuesFeaturesKHR` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceInternallySynchronizedQueuesFeaturesKHR`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceInternallySynchronizedQueuesFeaturesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INTERNALLY_SYNCHRONIZED_QUEUES_FEATURES_KHR

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX` structure is defined as:

    // Provided by VK_QNX_external_memory_screen_buffer
    typedef struct VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           screenBufferImport;
    } VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX;

The members of the `VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX` structure describe the following features:

- `screenBufferImport` indicates whether QNX Screen buffer import functionality is supported. If `screenBufferImport` is VK_TRUE, VkDeviceMemory supports importing `_screen_buffer` from applications. In this case, the application is responsible for the resource management of the `_screen_buffer`.

Table 73. Functionality Supported for QNX Screen Buffer Features
Features | Functionality
`screenBufferImport` | VkImportScreenBufferInfoQNX
Always supported1 | vkGetScreenBufferPropertiesQNX, VkScreenBufferPropertiesQNX, VkScreenBufferFormatPropertiesQNX, VkExternalFormatQNX

1

  Functionality in this row is always available.

The Functionality supported for QNX Screen buffer features table summarizes the functionality enabled by the `VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX` structure. Each entry in the body of the table summarizes the functionality that can be used when the given features are supported and enabled. This summarizes Valid Usage statements that are added elsewhere in this specification.

If the `VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_SCREEN_BUFFER_FEATURES_QNX

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceIndexTypeUint8Features` structure is defined as:

    // Provided by VK_VERSION_1_4
    typedef struct VkPhysicalDeviceIndexTypeUint8Features {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           indexTypeUint8;
    } VkPhysicalDeviceIndexTypeUint8Features;

    // Provided by VK_KHR_index_type_uint8
    // Equivalent to VkPhysicalDeviceIndexTypeUint8Features
    typedef VkPhysicalDeviceIndexTypeUint8Features VkPhysicalDeviceIndexTypeUint8FeaturesKHR;

    // Provided by VK_EXT_index_type_uint8
    // Equivalent to VkPhysicalDeviceIndexTypeUint8Features
    typedef VkPhysicalDeviceIndexTypeUint8Features VkPhysicalDeviceIndexTypeUint8FeaturesEXT;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `indexTypeUint8` indicates that VK_INDEX_TYPE_UINT8 can be used with vkCmdBindIndexBuffer2 and vkCmdBindIndexBuffer.

If the `VkPhysicalDeviceIndexTypeUint8Features` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceIndexTypeUint8Features`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceIndexTypeUint8Features-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT` structure is defined as:

    // Provided by VK_EXT_primitive_topology_list_restart
    typedef struct VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           primitiveTopologyListRestart;
        VkBool32           primitiveTopologyPatchListRestart;
    } VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `primitiveTopologyListRestart` indicates that list type primitives, VK_PRIMITIVE_TOPOLOGY_POINT_LIST, VK_PRIMITIVE_TOPOLOGY_LINE_LIST, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY and VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY, can use the primitive restart index value in index buffers.

- `primitiveTopologyPatchListRestart` indicates that the VK_PRIMITIVE_TOPOLOGY_PATCH_LIST topology can use the primitive restart index value in index buffers.

If the `VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIMITIVE_TOPOLOGY_LIST_RESTART_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceShaderSMBuiltinsFeaturesNV` structure is defined as:

    // Provided by VK_NV_shader_sm_builtins
    typedef struct VkPhysicalDeviceShaderSMBuiltinsFeaturesNV {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           shaderSMBuiltins;
    } VkPhysicalDeviceShaderSMBuiltinsFeaturesNV;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `shaderSMBuiltins` indicates whether the implementation supports the SPIR-V `ShaderSMBuiltinsNV` capability.

If the `VkPhysicalDeviceShaderSMBuiltinsFeaturesNV` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceShaderSMBuiltinsFeaturesNV`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceShaderSMBuiltinsFeaturesNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SM_BUILTINS_FEATURES_NV

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures` structure is defined as:

    // Provided by VK_VERSION_1_2
    typedef struct VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           separateDepthStencilLayouts;
    } VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures;

    // Provided by VK_KHR_separate_depth_stencil_layouts
    // Equivalent to VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures
    typedef VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures VkPhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `separateDepthStencilLayouts` indicates whether the implementation supports a `VkImageMemoryBarrier` for a depth/stencil image with only one of VK_IMAGE_ASPECT_DEPTH_BIT or VK_IMAGE_ASPECT_STENCIL_BIT set, and whether VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL, VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL, or VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL can be used.

If the `VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR` structure is defined as:

    // Provided by VK_KHR_pipeline_executable_properties
    typedef struct VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           pipelineExecutableInfo;
    } VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `pipelineExecutableInfo` indicates that the implementation supports reporting properties and statistics about the pipeline executables associated with a compiled pipeline.

If the `VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_EXECUTABLE_PROPERTIES_FEATURES_KHR

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures` structure is defined as:

    // Provided by VK_VERSION_1_3
    typedef struct VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           shaderDemoteToHelperInvocation;
    } VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures;

    // Provided by VK_EXT_shader_demote_to_helper_invocation
    // Equivalent to VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures
    typedef VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures VkPhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `shaderDemoteToHelperInvocation` indicates whether the implementation supports the SPIR-V `DemoteToHelperInvocationEXT` capability.

If the `VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT` structure is defined as:

    // Provided by VK_EXT_texel_buffer_alignment
    typedef struct VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           texelBufferAlignment;
    } VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `texelBufferAlignment` indicates whether the implementation uses more specific alignment requirements advertised in VkPhysicalDeviceTexelBufferAlignmentProperties rather than VkPhysicalDeviceLimits::`minTexelBufferOffsetAlignment`.

If the `VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT` structure is defined as:

    // Provided by VK_EXT_attachment_feedback_loop_dynamic_state
    typedef struct VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           attachmentFeedbackLoopDynamicState;
    } VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `attachmentFeedbackLoopDynamicState` specifies whether dynamic feedback loops are supported.

If the `VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ATTACHMENT_FEEDBACK_LOOP_DYNAMIC_STATE_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT` structure is defined as:

    // Provided by VK_EXT_legacy_vertex_attributes
    typedef struct VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           legacyVertexAttributes;
    } VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `legacyVertexAttributes` specifies whether compatibility features for vertex attributes are supported when using dynamic vertex input state.

If the `VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LEGACY_VERTEX_ATTRIBUTES_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceTextureCompressionASTCHDRFeatures` structure is defined as:

    // Provided by VK_VERSION_1_3
    typedef struct VkPhysicalDeviceTextureCompressionASTCHDRFeatures {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           textureCompressionASTC_HDR;
    } VkPhysicalDeviceTextureCompressionASTCHDRFeatures;

    // Provided by VK_EXT_texture_compression_astc_hdr
    // Equivalent to VkPhysicalDeviceTextureCompressionASTCHDRFeatures
    typedef VkPhysicalDeviceTextureCompressionASTCHDRFeatures VkPhysicalDeviceTextureCompressionASTCHDRFeaturesEXT;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `textureCompressionASTC_HDR` indicates whether all of the ASTC HDR compressed texture formats are supported. If this feature is enabled, then the VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT, VK_FORMAT_FEATURE_BLIT_SRC_BIT and VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT features must be supported in `optimalTilingFeatures` for the following formats:

  - VK_FORMAT_ASTC_4x4_SFLOAT_BLOCK

  - VK_FORMAT_ASTC_5x4_SFLOAT_BLOCK

  - VK_FORMAT_ASTC_5x5_SFLOAT_BLOCK

  - VK_FORMAT_ASTC_6x5_SFLOAT_BLOCK

  - VK_FORMAT_ASTC_6x6_SFLOAT_BLOCK

  - VK_FORMAT_ASTC_8x5_SFLOAT_BLOCK

  - VK_FORMAT_ASTC_8x6_SFLOAT_BLOCK

  - VK_FORMAT_ASTC_8x8_SFLOAT_BLOCK

  - VK_FORMAT_ASTC_10x5_SFLOAT_BLOCK

  - VK_FORMAT_ASTC_10x6_SFLOAT_BLOCK

  - VK_FORMAT_ASTC_10x8_SFLOAT_BLOCK

  - VK_FORMAT_ASTC_10x10_SFLOAT_BLOCK

  - VK_FORMAT_ASTC_12x10_SFLOAT_BLOCK

  - VK_FORMAT_ASTC_12x12_SFLOAT_BLOCK

    To query for additional properties, or if the feature is not enabled, vkGetPhysicalDeviceFormatProperties and vkGetPhysicalDeviceImageFormatProperties can be used to check for supported properties of individual formats as normal.

If the `VkPhysicalDeviceTextureCompressionASTCHDRFeatures` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceTextureCompressionASTCHDRFeatures`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceTextureCompressionASTCHDRFeatures-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_HDR_FEATURES

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceTextureCompressionASTC3DFeaturesEXT` structure is defined as:

    // Provided by VK_EXT_texture_compression_astc_3d
    typedef struct VkPhysicalDeviceTextureCompressionASTC3DFeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           textureCompressionASTC_3D;
    } VkPhysicalDeviceTextureCompressionASTC3DFeaturesEXT;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `textureCompressionASTC_3D` indicates whether all of the ASTC 3D compressed texture formats are supported. If this feature is enabled, then the VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT, VK_FORMAT_FEATURE_BLIT_SRC_BIT and VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT features must be supported in `optimalTilingFeatures` for the following formats:

  - VK_FORMAT_ASTC_3x3x3_UNORM_BLOCK_EXT

  - VK_FORMAT_ASTC_3x3x3_SRGB_BLOCK_EXT

  - VK_FORMAT_ASTC_3x3x3_SFLOAT_BLOCK_EXT

  - VK_FORMAT_ASTC_4x3x3_UNORM_BLOCK_EXT

  - VK_FORMAT_ASTC_4x3x3_SRGB_BLOCK_EXT

  - VK_FORMAT_ASTC_4x3x3_SFLOAT_BLOCK_EXT

  - VK_FORMAT_ASTC_4x4x3_UNORM_BLOCK_EXT

  - VK_FORMAT_ASTC_4x4x3_SRGB_BLOCK_EXT

  - VK_FORMAT_ASTC_4x4x3_SFLOAT_BLOCK_EXT

  - VK_FORMAT_ASTC_4x4x4_UNORM_BLOCK_EXT

  - VK_FORMAT_ASTC_4x4x4_SRGB_BLOCK_EXT

  - VK_FORMAT_ASTC_4x4x4_SFLOAT_BLOCK_EXT

  - VK_FORMAT_ASTC_5x4x4_UNORM_BLOCK_EXT

  - VK_FORMAT_ASTC_5x4x4_SRGB_BLOCK_EXT

  - VK_FORMAT_ASTC_5x4x4_SFLOAT_BLOCK_EXT

  - VK_FORMAT_ASTC_5x5x4_UNORM_BLOCK_EXT

  - VK_FORMAT_ASTC_5x5x4_SRGB_BLOCK_EXT

  - VK_FORMAT_ASTC_5x5x4_SFLOAT_BLOCK_EXT

  - VK_FORMAT_ASTC_5x5x5_UNORM_BLOCK_EXT

  - VK_FORMAT_ASTC_5x5x5_SRGB_BLOCK_EXT

  - VK_FORMAT_ASTC_5x5x5_SFLOAT_BLOCK_EXT

  - VK_FORMAT_ASTC_6x5x5_UNORM_BLOCK_EXT

  - VK_FORMAT_ASTC_6x5x5_SRGB_BLOCK_EXT

  - VK_FORMAT_ASTC_6x5x5_SFLOAT_BLOCK_EXT

  - VK_FORMAT_ASTC_6x6x5_UNORM_BLOCK_EXT

  - VK_FORMAT_ASTC_6x6x5_SRGB_BLOCK_EXT

  - VK_FORMAT_ASTC_6x6x5_SFLOAT_BLOCK_EXT

  - VK_FORMAT_ASTC_6x6x6_UNORM_BLOCK_EXT

  - VK_FORMAT_ASTC_6x6x6_SRGB_BLOCK_EXT

  - VK_FORMAT_ASTC_6x6x6_SFLOAT_BLOCK_EXT

If the `VkPhysicalDeviceTextureCompressionASTC3DFeatures` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceTextureCompressionASTC3DFeatures`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceTextureCompressionASTC3DFeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_3D_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceLineRasterizationFeatures` structure is defined as:

    // Provided by VK_VERSION_1_4
    typedef struct VkPhysicalDeviceLineRasterizationFeatures {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           rectangularLines;
        VkBool32           bresenhamLines;
        VkBool32           smoothLines;
        VkBool32           stippledRectangularLines;
        VkBool32           stippledBresenhamLines;
        VkBool32           stippledSmoothLines;
    } VkPhysicalDeviceLineRasterizationFeatures;

    // Provided by VK_KHR_line_rasterization
    // Equivalent to VkPhysicalDeviceLineRasterizationFeatures
    typedef VkPhysicalDeviceLineRasterizationFeatures VkPhysicalDeviceLineRasterizationFeaturesKHR;

    // Provided by VK_EXT_line_rasterization
    // Equivalent to VkPhysicalDeviceLineRasterizationFeatures
    typedef VkPhysicalDeviceLineRasterizationFeatures VkPhysicalDeviceLineRasterizationFeaturesEXT;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `rectangularLines` indicates whether the implementation supports rectangular line rasterization.

- `bresenhamLines` indicates whether the implementation supports Bresenham-style line rasterization.

- `smoothLines` indicates whether the implementation supports smooth line rasterization.

- `stippledRectangularLines` indicates whether the implementation supports stippled line rasterization with VK_LINE_RASTERIZATION_MODE_RECTANGULAR lines.

- `stippledBresenhamLines` indicates whether the implementation supports stippled line rasterization with VK_LINE_RASTERIZATION_MODE_BRESENHAM lines.

- `stippledSmoothLines` indicates whether the implementation supports stippled line rasterization with VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH lines.

If the `VkPhysicalDeviceLineRasterizationFeatures` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceLineRasterizationFeatures`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceLineRasterizationFeatures-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceSubgroupSizeControlFeatures` structure is defined as:

    // Provided by VK_VERSION_1_3
    typedef struct VkPhysicalDeviceSubgroupSizeControlFeatures {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           subgroupSizeControl;
        VkBool32           computeFullSubgroups;
    } VkPhysicalDeviceSubgroupSizeControlFeatures;

    // Provided by VK_EXT_subgroup_size_control
    // Equivalent to VkPhysicalDeviceSubgroupSizeControlFeatures
    typedef VkPhysicalDeviceSubgroupSizeControlFeatures VkPhysicalDeviceSubgroupSizeControlFeaturesEXT;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `subgroupSizeControl` indicates whether the implementation supports controlling shader subgroup sizes via the VK_PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT flag and the VkPipelineShaderStageRequiredSubgroupSizeCreateInfo structure.

- `computeFullSubgroups` indicates whether the implementation supports requiring full subgroups in compute , mesh, or task shaders via the VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT flag.

If the `VkPhysicalDeviceSubgroupSizeControlFeatures` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceSubgroupSizeControlFeatures`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Note | The `VkPhysicalDeviceSubgroupSizeControlFeaturesEXT` structure was added in version 2 of the `VK_EXT_subgroup_size_control` extension. Version 1 implementations of this extension will not fill out the features structure but applications may assume that both `subgroupSizeControl` and `computeFullSubgroups` are supported if the extension is supported. (See also the Feature Requirements section.) Applications are advised to add a `VkPhysicalDeviceSubgroupSizeControlFeaturesEXT` structure to the `pNext` chain of VkDeviceCreateInfo to enable the features regardless of the version of the extension supported by the implementation. If the implementation only supports version 1, it will safely ignore the `VkPhysicalDeviceSubgroupSizeControlFeaturesEXT` structure. Vulkan 1.3 implementations always support the features structure.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceSubgroupSizeControlFeatures-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceCoherentMemoryFeaturesAMD` structure is defined as:

    // Provided by VK_AMD_device_coherent_memory
    typedef struct VkPhysicalDeviceCoherentMemoryFeaturesAMD {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           deviceCoherentMemory;
    } VkPhysicalDeviceCoherentMemoryFeaturesAMD;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `deviceCoherentMemory` indicates that the implementation supports device coherent memory.

If the `VkPhysicalDeviceCoherentMemoryFeaturesAMD` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceCoherentMemoryFeaturesAMD`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceCoherentMemoryFeaturesAMD-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COHERENT_MEMORY_FEATURES_AMD

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceAccelerationStructureFeaturesKHR` structure is defined as:

    // Provided by VK_KHR_acceleration_structure
    typedef struct VkPhysicalDeviceAccelerationStructureFeaturesKHR {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           accelerationStructure;
        VkBool32           accelerationStructureCaptureReplay;
        VkBool32           accelerationStructureIndirectBuild;
        // accelerationStructureHostCommands is legacy, but no reason was given in the API XML
        VkBool32           accelerationStructureHostCommands;
        VkBool32           descriptorBindingAccelerationStructureUpdateAfterBind;
    } VkPhysicalDeviceAccelerationStructureFeaturesKHR;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `accelerationStructure` indicates whether the implementation supports the acceleration structure functionality. See Acceleration Structures.

- `accelerationStructureCaptureReplay` indicates whether the implementation supports saving and reusing acceleration structure device addresses, e.g. for trace capture and replay.

- `accelerationStructureIndirectBuild` indicates whether the implementation supports indirect acceleration structure build commands, e.g. vkCmdBuildAccelerationStructuresIndirectKHR.

- `accelerationStructureHostCommands` indicates whether the implementation supports host side acceleration structure commands, e.g. vkBuildAccelerationStructuresKHR, vkCopyAccelerationStructureKHR, vkCopyAccelerationStructureToMemoryKHR, vkCopyMemoryToAccelerationStructureKHR, vkWriteAccelerationStructuresPropertiesKHR.

- `descriptorBindingAccelerationStructureUpdateAfterBind` indicates whether the implementation supports updating acceleration structure descriptors after a set is bound. If this feature is not enabled, VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT must not be used with VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR.

If the `VkPhysicalDeviceAccelerationStructureFeaturesKHR` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceAccelerationStructureFeaturesKHR`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceAccelerationStructureFeaturesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_FEATURES_KHR

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceRayTracingPipelineFeaturesKHR` structure is defined as:

    // Provided by VK_KHR_ray_tracing_pipeline
    typedef struct VkPhysicalDeviceRayTracingPipelineFeaturesKHR {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           rayTracingPipeline;
        VkBool32           rayTracingPipelineShaderGroupHandleCaptureReplay;
        VkBool32           rayTracingPipelineShaderGroupHandleCaptureReplayMixed;
        VkBool32           rayTracingPipelineTraceRaysIndirect;
        VkBool32           rayTraversalPrimitiveCulling;
    } VkPhysicalDeviceRayTracingPipelineFeaturesKHR;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `rayTracingPipeline` indicates whether the implementation supports the ray tracing pipeline functionality. See Ray Tracing.

- `rayTracingPipelineShaderGroupHandleCaptureReplay` indicates whether the implementation supports saving and reusing shader group handles, e.g. for trace capture and replay.

- `rayTracingPipelineShaderGroupHandleCaptureReplayMixed` indicates whether the implementation supports reuse of shader group handles being arbitrarily mixed with creation of non-reused shader group handles. If this is VK_FALSE, all reused shader group handles must be specified before any non-reused handles may be created.

- `rayTracingPipelineTraceRaysIndirect` indicates whether the implementation supports indirect ray tracing commands, e.g. vkCmdTraceRaysIndirectKHR.

- `rayTraversalPrimitiveCulling` indicates whether the implementation supports primitive culling during ray traversal.

If the `VkPhysicalDeviceRayTracingPipelineFeaturesKHR` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceRayTracingPipelineFeaturesKHR`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage

- VUID-VkPhysicalDeviceRayTracingPipelineFeaturesKHR-rayTracingPipelineShaderGroupHandleCaptureReplayMixed-03575
  If `rayTracingPipelineShaderGroupHandleCaptureReplayMixed` is VK_TRUE, `rayTracingPipelineShaderGroupHandleCaptureReplay` must also be VK_TRUE

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceRayTracingPipelineFeaturesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_FEATURES_KHR

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceRayQueryFeaturesKHR` structure is defined as:

    // Provided by VK_KHR_ray_query
    typedef struct VkPhysicalDeviceRayQueryFeaturesKHR {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           rayQuery;
    } VkPhysicalDeviceRayQueryFeaturesKHR;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `rayQuery` indicates whether the implementation supports ray query (`OpRayQueryProceedKHR`) functionality.

If the `VkPhysicalDeviceRayQueryFeaturesKHR` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceRayQueryFeaturesKHR`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceRayQueryFeaturesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_QUERY_FEATURES_KHR

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR` structure is defined as:

    // Provided by VK_KHR_ray_tracing_maintenance1
    typedef struct VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           rayTracingMaintenance1;
        VkBool32           rayTracingPipelineTraceRaysIndirect2;
    } VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `rayTracingMaintenance1` indicates that the implementation supports the following:

  - The `CullMaskKHR` SPIR-V builtin using the `SPV_KHR_ray_cull_mask` SPIR-V extension.

  - Additional acceleration structure property queries: VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_BOTTOM_LEVEL_POINTERS_KHR and VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SIZE_KHR.

  - A new access flag VK_ACCESS_2_SHADER_BINDING_TABLE_READ_BIT_KHR.

  - A new pipeline stage flag bit VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR

- `rayTracingPipelineTraceRaysIndirect2` indicates whether the implementation supports the extended indirect ray tracing command vkCmdTraceRaysIndirect2KHR.

If the `VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_MAINTENANCE_1_FEATURES_KHR

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceVideoEncodeFeedback2FeaturesKHR` structure is defined as:

    // Provided by VK_KHR_video_encode_feedback2
    typedef struct VkPhysicalDeviceVideoEncodeFeedback2FeaturesKHR {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           videoEncodeFeedback2;
    } VkPhysicalDeviceVideoEncodeFeedback2FeaturesKHR;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `videoEncodeFeedback2` specifies that the implementation supports per picture partition feedback and the following additional video encode feedback flags, as reported in VkVideoEncodeFeedback2CapabilitiesKHR and/or VkVideoEncodeCapabilitiesKHR::`supportedEncodeFeedbackFlags`, respectively:

  - VK_VIDEO_ENCODE_FEEDBACK_AVERAGE_QUANTIZATION_BIT_KHR.

  - VK_VIDEO_ENCODE_FEEDBACK_MIN_QUANTIZATION_BIT_KHR.

  - VK_VIDEO_ENCODE_FEEDBACK_MAX_QUANTIZATION_BIT_KHR.

  - VK_VIDEO_ENCODE_FEEDBACK_INTRA_PIXELS_BIT_KHR.

  - VK_VIDEO_ENCODE_FEEDBACK_INTER_PIXELS_BIT_KHR.

  - VK_VIDEO_ENCODE_FEEDBACK_SKIPPED_PIXELS_BIT_KHR.

  - VK_VIDEO_ENCODE_FEEDBACK_PICTURE_PARTITION_COUNT_BIT_KHR.

    Note | Support for `videoEncodeFeedback2` does not indicate that all video encode profiles support per picture partition feedback and the new video encode feedback flags. Support for individual video encode profiles is subject to video-profile-specific capabilities.

If the `VkPhysicalDeviceVideoEncodeFeedback2FeaturesKHR` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceVideoEncodeFeedback2FeaturesKHR`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceVideoEncodeFeedback2FeaturesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_ENCODE_FEEDBACK_2_FEATURES_KHR

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR` structure is defined as:

    // Provided by VK_KHR_video_encode_quantization_map
    typedef struct VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           videoEncodeQuantizationMap;
    } VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `videoEncodeQuantizationMap` indicates that the implementation supports video encode quantization maps.

  Note | Support for `videoEncodeQuantizationMap` does not indicate that all video encode profiles support quantization maps. Support for quantization maps for any specific video encode profile is subject to video-profile-specific capabilities.

If the `VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_ENCODE_QUANTIZATION_MAP_FEATURES_KHR

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceVideoEncodeIntraRefreshFeaturesKHR` structure is defined as:

    // Provided by VK_KHR_video_encode_intra_refresh
    typedef struct VkPhysicalDeviceVideoEncodeIntraRefreshFeaturesKHR {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           videoEncodeIntraRefresh;
    } VkPhysicalDeviceVideoEncodeIntraRefreshFeaturesKHR;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `videoEncodeIntraRefresh` specifies that the implementation supports video encode intra refresh.

  Note | Support for `videoEncodeIntraRefresh` does not indicate that all video encode profiles support intra refresh. Support for intra refresh for any specific video encode profile is subject to video-profile-specific capabilities.

If the `VkPhysicalDeviceVideoEncodeIntraRefreshFeaturesKHR` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceVideoEncodeIntraRefreshFeaturesKHR`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceVideoEncodeIntraRefreshFeaturesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_ENCODE_INTRA_REFRESH_FEATURES_KHR

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceVideoEncodeRgbConversionFeaturesVALVE` structure is defined as:

    // Provided by VK_VALVE_video_encode_rgb_conversion
    typedef struct VkPhysicalDeviceVideoEncodeRgbConversionFeaturesVALVE {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           videoEncodeRgbConversion;
    } VkPhysicalDeviceVideoEncodeRgbConversionFeaturesVALVE;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `videoEncodeRgbConversion` specifies that the implementation supports video encode RGB conversion.

  If the `VkPhysicalDeviceVideoEncodeRgbConversionFeaturesVALVE` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceVideoEncodeRgbConversionFeaturesVALVE`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceVideoEncodeRgbConversionFeaturesVALVE-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_ENCODE_RGB_CONVERSION_FEATURES_VALVE

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceVideoMaintenance1FeaturesKHR` structure is defined as:

    // Provided by VK_KHR_video_maintenance1
    typedef struct VkPhysicalDeviceVideoMaintenance1FeaturesKHR {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           videoMaintenance1;
    } VkPhysicalDeviceVideoMaintenance1FeaturesKHR;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `videoMaintenance1` indicates that the implementation supports the following:

  - The new buffer creation flag VK_BUFFER_CREATE_VIDEO_PROFILE_INDEPENDENT_BIT_KHR.

  - The new image creation flag VK_IMAGE_CREATE_VIDEO_PROFILE_INDEPENDENT_BIT_KHR.

  - The new video session creation flag VK_VIDEO_SESSION_CREATE_INLINE_QUERIES_BIT_KHR.

If the `VkPhysicalDeviceVideoMaintenance1FeaturesKHR` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceVideoMaintenance1FeaturesKHR`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceVideoMaintenance1FeaturesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_MAINTENANCE_1_FEATURES_KHR

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceVideoMaintenance2FeaturesKHR` structure is defined as:

    // Provided by VK_KHR_video_maintenance2
    typedef struct VkPhysicalDeviceVideoMaintenance2FeaturesKHR {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           videoMaintenance2;
    } VkPhysicalDeviceVideoMaintenance2FeaturesKHR;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `videoMaintenance2` specifies that the implementation supports the following:

  - Support for issuing video coding control commands against video decode sessions without a bound video session parameters object.

  - The new video session creation flag VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR for video decode sessions.

  - Required support for the rate control mode VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR for the following video encode profiles:

    - H.264 encode profiles;

    - H.265 encode profiles;

    - AV1 encode profiles.

  - Additional guarantees on Video Std parameters used with video encode profiles that the implementations support without the need to override them.

If the `VkPhysicalDeviceVideoMaintenance2FeaturesKHR` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceVideoMaintenance2FeaturesKHR`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceVideoMaintenance2FeaturesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_MAINTENANCE_2_FEATURES_KHR

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceVideoEncodeAV1FeaturesKHR` structure is defined as:

    // Provided by VK_KHR_video_encode_av1
    typedef struct VkPhysicalDeviceVideoEncodeAV1FeaturesKHR {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           videoEncodeAV1;
    } VkPhysicalDeviceVideoEncodeAV1FeaturesKHR;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `videoEncodeAV1` indicates that the implementation supports AV1 encode operations.

If the `VkPhysicalDeviceVideoEncodeAV1FeaturesKHR` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceVideoEncodeAV1FeaturesKHR`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceVideoEncodeAV1FeaturesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_ENCODE_AV1_FEATURES_KHR

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceVideoDecodeVP9FeaturesKHR` structure is defined as:

    // Provided by VK_KHR_video_decode_vp9
    typedef struct VkPhysicalDeviceVideoDecodeVP9FeaturesKHR {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           videoDecodeVP9;
    } VkPhysicalDeviceVideoDecodeVP9FeaturesKHR;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `videoDecodeVP9` specifies that the implementation supports VP9 decode operations.

If the `VkPhysicalDeviceVideoDecodeVP9FeaturesKHR` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceVideoDecodeVP9FeaturesKHR`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceVideoDecodeVP9FeaturesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_DECODE_VP9_FEATURES_KHR

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceExtendedDynamicStateFeaturesEXT` structure is defined as:

    // Provided by VK_EXT_extended_dynamic_state
    typedef struct VkPhysicalDeviceExtendedDynamicStateFeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           extendedDynamicState;
    } VkPhysicalDeviceExtendedDynamicStateFeaturesEXT;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `extendedDynamicState` indicates that the implementation supports the following dynamic states:

  - VK_DYNAMIC_STATE_CULL_MODE

  - VK_DYNAMIC_STATE_FRONT_FACE

  - VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY

  - VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT

  - VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT

  - VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE

  - VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE

  - VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE

  - VK_DYNAMIC_STATE_DEPTH_COMPARE_OP

  - VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE

  - VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE

  - VK_DYNAMIC_STATE_STENCIL_OP

If the `VkPhysicalDeviceExtendedDynamicStateFeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceExtendedDynamicStateFeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceExtendedDynamicStateFeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceExtendedDynamicState2FeaturesEXT` structure is defined as:

    // Provided by VK_EXT_extended_dynamic_state2
    typedef struct VkPhysicalDeviceExtendedDynamicState2FeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           extendedDynamicState2;
        VkBool32           extendedDynamicState2LogicOp;
        VkBool32           extendedDynamicState2PatchControlPoints;
    } VkPhysicalDeviceExtendedDynamicState2FeaturesEXT;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `extendedDynamicState2` indicates that the implementation supports the following dynamic states:

  - VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE

  - VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE

  - VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE

- `extendedDynamicState2LogicOp` indicates that the implementation supports the following dynamic state:

  - VK_DYNAMIC_STATE_LOGIC_OP_EXT

- `extendedDynamicState2PatchControlPoints` indicates that the implementation supports the following dynamic state:

  - VK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT

If the `VkPhysicalDeviceExtendedDynamicState2FeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceExtendedDynamicState2FeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceExtendedDynamicState2FeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_2_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceExtendedDynamicState3FeaturesEXT` structure is defined as:

    // Provided by VK_EXT_extended_dynamic_state3
    typedef struct VkPhysicalDeviceExtendedDynamicState3FeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           extendedDynamicState3TessellationDomainOrigin;
        VkBool32           extendedDynamicState3DepthClampEnable;
        VkBool32           extendedDynamicState3PolygonMode;
        VkBool32           extendedDynamicState3RasterizationSamples;
        VkBool32           extendedDynamicState3SampleMask;
        VkBool32           extendedDynamicState3AlphaToCoverageEnable;
        VkBool32           extendedDynamicState3AlphaToOneEnable;
        VkBool32           extendedDynamicState3LogicOpEnable;
        VkBool32           extendedDynamicState3ColorBlendEnable;
        VkBool32           extendedDynamicState3ColorBlendEquation;
        VkBool32           extendedDynamicState3ColorWriteMask;
        VkBool32           extendedDynamicState3RasterizationStream;
        VkBool32           extendedDynamicState3ConservativeRasterizationMode;
        VkBool32           extendedDynamicState3ExtraPrimitiveOverestimationSize;
        VkBool32           extendedDynamicState3DepthClipEnable;
        VkBool32           extendedDynamicState3SampleLocationsEnable;
        VkBool32           extendedDynamicState3ColorBlendAdvanced;
        VkBool32           extendedDynamicState3ProvokingVertexMode;
        VkBool32           extendedDynamicState3LineRasterizationMode;
        VkBool32           extendedDynamicState3LineStippleEnable;
        VkBool32           extendedDynamicState3DepthClipNegativeOneToOne;
        VkBool32           extendedDynamicState3ViewportWScalingEnable;
        VkBool32           extendedDynamicState3ViewportSwizzle;
        VkBool32           extendedDynamicState3CoverageToColorEnable;
        VkBool32           extendedDynamicState3CoverageToColorLocation;
        VkBool32           extendedDynamicState3CoverageModulationMode;
        VkBool32           extendedDynamicState3CoverageModulationTableEnable;
        VkBool32           extendedDynamicState3CoverageModulationTable;
        VkBool32           extendedDynamicState3CoverageReductionMode;
        VkBool32           extendedDynamicState3RepresentativeFragmentTestEnable;
        VkBool32           extendedDynamicState3ShadingRateImageEnable;
    } VkPhysicalDeviceExtendedDynamicState3FeaturesEXT;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `extendedDynamicState3TessellationDomainOrigin` indicates that the implementation supports the following dynamic state:

  - VK_DYNAMIC_STATE_TESSELLATION_DOMAIN_ORIGIN_EXT

- `extendedDynamicState3DepthClampEnable` indicates that the implementation supports the following dynamic state:

  - VK_DYNAMIC_STATE_DEPTH_CLAMP_ENABLE_EXT

- `extendedDynamicState3PolygonMode` indicates that the implementation supports the following dynamic state:

  - VK_DYNAMIC_STATE_POLYGON_MODE_EXT

- `extendedDynamicState3RasterizationSamples` indicates that the implementation supports the following dynamic state:

  - VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT

- `extendedDynamicState3SampleMask` indicates that the implementation supports the following dynamic state:

  - VK_DYNAMIC_STATE_SAMPLE_MASK_EXT

- `extendedDynamicState3AlphaToCoverageEnable` indicates that the implementation supports the following dynamic state:

  - VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT

- `extendedDynamicState3AlphaToOneEnable` indicates that the implementation supports the following dynamic state:

  - VK_DYNAMIC_STATE_ALPHA_TO_ONE_ENABLE_EXT

- `extendedDynamicState3LogicOpEnable` indicates that the implementation supports the following dynamic state:

  - VK_DYNAMIC_STATE_LOGIC_OP_ENABLE_EXT

- `extendedDynamicState3ColorBlendEnable` indicates that the implementation supports the following dynamic state:

  - VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT

- `extendedDynamicState3ColorBlendEquation` indicates that the implementation supports the following dynamic state:

  - VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT

- `extendedDynamicState3ColorWriteMask` indicates that the implementation supports the following dynamic state:

  - VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT

- `extendedDynamicState3RasterizationStream` indicates that the implementation supports the following dynamic state:

  - VK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXT

- `extendedDynamicState3ConservativeRasterizationMode` indicates that the implementation supports the following dynamic state:

  - VK_DYNAMIC_STATE_CONSERVATIVE_RASTERIZATION_MODE_EXT

- `extendedDynamicState3ExtraPrimitiveOverestimationSize` indicates that the implementation supports the following dynamic state:

  - VK_DYNAMIC_STATE_EXTRA_PRIMITIVE_OVERESTIMATION_SIZE_EXT

- `extendedDynamicState3DepthClipEnable` indicates that the implementation supports the following dynamic state:

  - VK_DYNAMIC_STATE_DEPTH_CLIP_ENABLE_EXT

- `extendedDynamicState3SampleLocationsEnable` indicates that the implementation supports the following dynamic state:

  - VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT

- `extendedDynamicState3ColorBlendAdvanced` indicates that the implementation supports the following dynamic state:

  - VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT

- `extendedDynamicState3ProvokingVertexMode` indicates that the implementation supports the following dynamic state:

  - VK_DYNAMIC_STATE_PROVOKING_VERTEX_MODE_EXT

- `extendedDynamicState3LineRasterizationMode` indicates that the implementation supports the following dynamic state:

  - VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT

- `extendedDynamicState3LineStippleEnable` indicates that the implementation supports the following dynamic state:

  - VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT

- `extendedDynamicState3DepthClipNegativeOneToOne` indicates that the implementation supports the following dynamic state:

  - VK_DYNAMIC_STATE_DEPTH_CLIP_NEGATIVE_ONE_TO_ONE_EXT

- `extendedDynamicState3ViewportWScalingEnable` indicates that the implementation supports the following dynamic state:

  - VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_ENABLE_NV

- `extendedDynamicState3ViewportSwizzle` indicates that the implementation supports the following dynamic state:

  - VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV

- `extendedDynamicState3CoverageToColorEnable` indicates that the implementation supports the following dynamic state:

  - VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV

- `extendedDynamicState3CoverageToColorLocation` indicates that the implementation supports the following dynamic state:

  - VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_LOCATION_NV

- `extendedDynamicState3CoverageModulationMode` indicates that the implementation supports the following dynamic state:

  - VK_DYNAMIC_STATE_COVERAGE_MODULATION_MODE_NV

- `extendedDynamicState3CoverageModulationTableEnable` indicates that the implementation supports the following dynamic state:

  - VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NV

- `extendedDynamicState3CoverageModulationTable` indicates that the implementation supports the following dynamic state:

  - VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_NV

- `extendedDynamicState3CoverageReductionMode` indicates that the implementation supports the following dynamic state:

  - VK_DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV

- `extendedDynamicState3RepresentativeFragmentTestEnable` indicates that the implementation supports the following dynamic state:

  - VK_DYNAMIC_STATE_REPRESENTATIVE_FRAGMENT_TEST_ENABLE_NV

- `extendedDynamicState3ShadingRateImageEnable` indicates that the implementation supports the following dynamic state:

  - VK_DYNAMIC_STATE_SHADING_RATE_IMAGE_ENABLE_NV

If the `VkPhysicalDeviceExtendedDynamicState3FeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceExtendedDynamicState3FeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceExtendedDynamicState3FeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_3_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceExtendedFlagsFeaturesKHR` structure is defined as:

    // Provided by VK_KHR_extended_flags
    typedef struct VkPhysicalDeviceExtendedFlagsFeaturesKHR {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           extendedFlags;
    } VkPhysicalDeviceExtendedFlagsFeaturesKHR;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `extendedFlags` indicates that the implementation supports the following:

- VkFormatProperties4KHR, extending VkFormatProperties2, and corresponding VkFormatFeatureFlagBits4KHR and VkFormatFeatureFlags4KHR types providing up to 64 new format feature flags.

- VkImageCreateFlags2CreateInfoKHR, extending structures passed to image create and query functions, and corresponding VkImageCreateFlagBits2KHR and VkImageCreateFlags2KHR types providing up to 32 new image create flags.

- VkImageUsageFlags2CreateInfoKHR, extending structures passed to image create and query functions, and corresponding VkImageUsageFlagBits2KHR and VkImageUsageFlags2KHR types providing up to 32 new image usage flags.

- The VkPipelineCreateFlags2CreateInfoKHR, VkPipelineCreateFlags2KHR, VkPipelineCreateFlagBits2KHR, VkBufferUsageFlags2CreateInfoKHR, VkBufferUsageFlags2KHR, and VkBufferUsageFlagBits2KHR types originally introduced by VK_KHR_maintenance5.

If the `VkPhysicalDeviceExtendedFlagsFeaturesKHR` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceExtendedFlagsFeaturesKHR`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceExtendedFlagsFeaturesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_FLAGS_FEATURES_KHR

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV` structure is defined as:

    // Provided by VK_NV_device_generated_commands
    typedef struct VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           deviceGeneratedCommands;
    } VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `deviceGeneratedCommands` indicates whether the implementation supports functionality to generate commands on the device. See Device-Generated Commands.

If the `VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_FEATURES_NV

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV` structure is defined as:

    // Provided by VK_NV_device_generated_commands_compute
    typedef struct VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           deviceGeneratedCompute;
        VkBool32           deviceGeneratedComputePipelines;
        VkBool32           deviceGeneratedComputeCaptureReplay;
    } VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `deviceGeneratedCompute` indicates whether the implementation supports functionality to generate dispatch commands and push constants for the compute pipeline on the device. See Device-Generated Commands.

- `deviceGeneratedComputePipelines` indicates whether the implementation supports functionality to generate commands to bind compute pipelines on the device. See Device-Generated Commands.

- `deviceGeneratedComputeCaptureReplay` indicates whether the implementation supports functionality to capture compute pipeline address and reuse later for replay in Device-Generated Commands.

If the `VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_COMPUTE_FEATURES_NV

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT` structure is defined as:

    // Provided by VK_EXT_device_generated_commands
    typedef struct VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           deviceGeneratedCommands;
        VkBool32           dynamicGeneratedPipelineLayout;
    } VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `deviceGeneratedCommands` indicates whether the implementation supports functionality to generate commands on the device.

- `dynamicGeneratedPipelineLayout` indicates the implementation allows the `pipelineLayout` member of VkIndirectCommandsLayoutCreateInfoEXT to be VK_NULL_HANDLE and VkPipelineLayoutCreateInfo can be chained off those structures' `pNext` instead.

If the `VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceDiagnosticsConfigFeaturesNV` structure is defined as:

    // Provided by VK_NV_device_diagnostics_config
    typedef struct VkPhysicalDeviceDiagnosticsConfigFeaturesNV {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           diagnosticsConfig;
    } VkPhysicalDeviceDiagnosticsConfigFeaturesNV;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `diagnosticsConfig` indicates whether the implementation supports the ability to configure diagnostic tools.

If the `VkPhysicalDeviceDiagnosticsConfigFeaturesNV` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceDiagnosticsConfigFeaturesNV`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceDiagnosticsConfigFeaturesNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DIAGNOSTICS_CONFIG_FEATURES_NV

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceClusterAccelerationStructureFeaturesNV` structure is defined as:

    // Provided by VK_NV_cluster_acceleration_structure
    typedef struct VkPhysicalDeviceClusterAccelerationStructureFeaturesNV {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           clusterAccelerationStructure;
    } VkPhysicalDeviceClusterAccelerationStructureFeaturesNV;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `clusterAccelerationStructure` indicates whether the implementation supports the ability to generate and trace cluster acceleration structures.

If the `VkPhysicalDeviceClusterAccelerationStructureFeaturesNV` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceClusterAccelerationStructureFeaturesNV`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceClusterAccelerationStructureFeaturesNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CLUSTER_ACCELERATION_STRUCTURE_FEATURES_NV

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDevicePartitionedAccelerationStructureFeaturesNV` structure is defined as:

    // Provided by VK_NV_partitioned_acceleration_structure
    typedef struct VkPhysicalDevicePartitionedAccelerationStructureFeaturesNV {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           partitionedAccelerationStructure;
    } VkPhysicalDevicePartitionedAccelerationStructureFeaturesNV;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `partitionedAccelerationStructure` indicates whether the implementation supports the ability to generate top level partitioned acceleration structures.

If the `VkPhysicalDevicePartitionedAccelerationStructureFeaturesNV` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDevicePartitionedAccelerationStructureFeaturesNV`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDevicePartitionedAccelerationStructureFeaturesNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PARTITIONED_ACCELERATION_STRUCTURE_FEATURES_NV

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceDeviceMemoryReportFeaturesEXT` structure is defined as:

    // Provided by VK_EXT_device_memory_report
    typedef struct VkPhysicalDeviceDeviceMemoryReportFeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           deviceMemoryReport;
    } VkPhysicalDeviceDeviceMemoryReportFeaturesEXT;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `deviceMemoryReport` indicates whether the implementation supports the ability to register device memory report callbacks.

If the `VkPhysicalDeviceDeviceMemoryReportFeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceDeviceMemoryReportFeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceDeviceMemoryReportFeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_MEMORY_REPORT_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceGlobalPriorityQueryFeatures` structure is defined as:

    // Provided by VK_VERSION_1_4
    typedef struct VkPhysicalDeviceGlobalPriorityQueryFeatures {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           globalPriorityQuery;
    } VkPhysicalDeviceGlobalPriorityQueryFeatures;

    // Provided by VK_KHR_global_priority
    // Equivalent to VkPhysicalDeviceGlobalPriorityQueryFeatures
    typedef VkPhysicalDeviceGlobalPriorityQueryFeatures VkPhysicalDeviceGlobalPriorityQueryFeaturesKHR;

    // Provided by VK_EXT_global_priority_query
    // Equivalent to VkPhysicalDeviceGlobalPriorityQueryFeatures
    typedef VkPhysicalDeviceGlobalPriorityQueryFeatures VkPhysicalDeviceGlobalPriorityQueryFeaturesEXT;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `globalPriorityQuery` indicates whether the implementation supports the ability to query global queue priorities.

If the `VkPhysicalDeviceGlobalPriorityQueryFeatures` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceGlobalPriorityQueryFeatures`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceGlobalPriorityQueryFeatures-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDevicePipelineCreationCacheControlFeatures` structure is defined as:

    // Provided by VK_VERSION_1_3
    typedef struct VkPhysicalDevicePipelineCreationCacheControlFeatures {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           pipelineCreationCacheControl;
    } VkPhysicalDevicePipelineCreationCacheControlFeatures;

    // Provided by VK_EXT_pipeline_creation_cache_control
    // Equivalent to VkPhysicalDevicePipelineCreationCacheControlFeatures
    typedef VkPhysicalDevicePipelineCreationCacheControlFeatures VkPhysicalDevicePipelineCreationCacheControlFeaturesEXT;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `pipelineCreationCacheControl` indicates that the implementation supports:

  - The following can be used in `Vk*PipelineCreateInfo`::`flags`:

    - VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT

    - VK_PIPELINE_CREATE_EARLY_RETURN_ON_FAILURE_BIT

  - The following can be used in VkPipelineCacheCreateInfo::`flags`:

    - VK_PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT

If the `VkPhysicalDevicePipelineCreationCacheControlFeatures` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDevicePipelineCreationCacheControlFeatures`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDevicePipelineCreationCacheControlFeatures-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures` structure is defined as:

    // Provided by VK_VERSION_1_3
    typedef struct VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           shaderZeroInitializeWorkgroupMemory;
    } VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures;

    // Provided by VK_KHR_zero_initialize_workgroup_memory
    // Equivalent to VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures
    typedef VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeaturesKHR;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `shaderZeroInitializeWorkgroupMemory` specifies whether the implementation supports initializing a variable in Workgroup storage class.

If the `VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ZERO_INITIALIZE_WORKGROUP_MEMORY_FEATURES

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDevicePrivateDataFeatures` structure is defined as:

    // Provided by VK_VERSION_1_3
    typedef struct VkPhysicalDevicePrivateDataFeatures {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           privateData;
    } VkPhysicalDevicePrivateDataFeatures;

    // Provided by VK_EXT_private_data
    // Equivalent to VkPhysicalDevicePrivateDataFeatures
    typedef VkPhysicalDevicePrivateDataFeatures VkPhysicalDevicePrivateDataFeaturesEXT;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `privateData` indicates whether the implementation supports private data. See Private Data.

If the `VkPhysicalDevicePrivateDataFeatures` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDevicePrivateDataFeatures`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDevicePrivateDataFeatures-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR` structure is defined as:

    // Provided by VK_KHR_shader_subgroup_uniform_control_flow
    typedef struct VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           shaderSubgroupUniformControlFlow;
    } VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `shaderSubgroupUniformControlFlow` specifies whether the implementation supports the shader execution mode `SubgroupUniformControlFlowKHR`

If the `VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_UNIFORM_CONTROL_FLOW_FEATURES_KHR

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceRobustness2FeaturesKHR` structure is defined as:

    // Provided by VK_KHR_robustness2
    typedef struct VkPhysicalDeviceRobustness2FeaturesKHR {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           robustBufferAccess2;
        VkBool32           robustImageAccess2;
        VkBool32           nullDescriptor;
    } VkPhysicalDeviceRobustness2FeaturesKHR;

    // Provided by VK_EXT_robustness2
    // Equivalent to VkPhysicalDeviceRobustness2FeaturesKHR
    typedef VkPhysicalDeviceRobustness2FeaturesKHR VkPhysicalDeviceRobustness2FeaturesEXT;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `robustBufferAccess2` enables Robust Buffer Access 2 guarantees for shader buffer accesses.

- `robustImageAccess2` enables Robust Image Access 2 guarantees for shader image accesses.

- `nullDescriptor` indicates whether descriptors can be written with a VK_NULL_HANDLE resource or view, which are considered valid to access and act as if the descriptor were bound to nothing.

If the `VkPhysicalDeviceRobustness2FeaturesKHR` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceRobustness2FeaturesKHR`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage

- VUID-VkPhysicalDeviceRobustness2FeaturesKHR-robustBufferAccess2-04000
  If `robustBufferAccess2` is enabled then `robustBufferAccess` must also be enabled

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceRobustness2FeaturesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_FEATURES_KHR

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceImageRobustnessFeatures` structure is defined as:

    // Provided by VK_VERSION_1_3
    typedef struct VkPhysicalDeviceImageRobustnessFeatures {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           robustImageAccess;
    } VkPhysicalDeviceImageRobustnessFeatures;

    // Provided by VK_EXT_image_robustness
    // Equivalent to VkPhysicalDeviceImageRobustnessFeatures
    typedef VkPhysicalDeviceImageRobustnessFeatures VkPhysicalDeviceImageRobustnessFeaturesEXT;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `robustImageAccess` enables Robust Image Access guarantees for shader image accesses.

If the `VkPhysicalDeviceImageRobustnessFeatures` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceImageRobustnessFeatures`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceImageRobustnessFeatures-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_ROBUSTNESS_FEATURES

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceShaderTerminateInvocationFeatures` structure is defined as:

    // Provided by VK_VERSION_1_3
    typedef struct VkPhysicalDeviceShaderTerminateInvocationFeatures {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           shaderTerminateInvocation;
    } VkPhysicalDeviceShaderTerminateInvocationFeatures;

    // Provided by VK_KHR_shader_terminate_invocation
    // Equivalent to VkPhysicalDeviceShaderTerminateInvocationFeatures
    typedef VkPhysicalDeviceShaderTerminateInvocationFeatures VkPhysicalDeviceShaderTerminateInvocationFeaturesKHR;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `shaderTerminateInvocation` specifies whether the implementation supports SPIR-V modules that use the `SPV_KHR_terminate_invocation` extension.

If the `VkPhysicalDeviceShaderTerminateInvocationFeatures` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceShaderTerminateInvocationFeatures`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceShaderTerminateInvocationFeatures-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TERMINATE_INVOCATION_FEATURES

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceCustomBorderColorFeaturesEXT` structure is defined as:

    // Provided by VK_EXT_custom_border_color
    typedef struct VkPhysicalDeviceCustomBorderColorFeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           customBorderColors;
        VkBool32           customBorderColorWithoutFormat;
    } VkPhysicalDeviceCustomBorderColorFeaturesEXT;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `customBorderColors` indicates that the implementation supports providing a `borderColor` value with one of the following values at sampler creation time:

  - VK_BORDER_COLOR_FLOAT_CUSTOM_EXT

  - VK_BORDER_COLOR_INT_CUSTOM_EXT

- `customBorderColorWithoutFormat` indicates that explicit formats are not required for custom border colors and the value of the `format` member of the VkSamplerCustomBorderColorCreateInfoEXT structure may be VK_FORMAT_UNDEFINED. If this feature bit is not set, applications must provide the VkFormat of the image view(s) being sampled by this sampler in the `format` member of the VkSamplerCustomBorderColorCreateInfoEXT structure.

If the `VkPhysicalDeviceCustomBorderColorFeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceCustomBorderColorFeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceCustomBorderColorFeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceBorderColorSwizzleFeaturesEXT` structure is defined as:

    // Provided by VK_EXT_border_color_swizzle
    typedef struct VkPhysicalDeviceBorderColorSwizzleFeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           borderColorSwizzle;
        VkBool32           borderColorSwizzleFromImage;
    } VkPhysicalDeviceBorderColorSwizzleFeaturesEXT;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `borderColorSwizzle` indicates that defined values are returned by sampled image operations when used with a sampler that uses a VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK, VK_BORDER_COLOR_INT_OPAQUE_BLACK, VK_BORDER_COLOR_FLOAT_CUSTOM_EXT, or VK_BORDER_COLOR_INT_CUSTOM_EXT `borderColor` and an image view that uses a non-identity component mapping, when either `borderColorSwizzleFromImage` is enabled or the VkSamplerBorderColorComponentMappingCreateInfoEXT is specified.

- `borderColorSwizzleFromImage` indicates that the implementation will return the correct border color values from sampled image operations under the conditions expressed above, without the application having to specify the border color component mapping when creating the sampler object. If this feature bit is not set, applications can chain a VkSamplerBorderColorComponentMappingCreateInfoEXT structure when creating samplers for use with image views that do not have an identity swizzle and, when those samplers are combined with image views using the same component mapping, sampled image operations that use opaque black or custom border colors will return the correct border color values.

If the `VkPhysicalDeviceBorderColorSwizzleFeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceBorderColorSwizzleFeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceBorderColorSwizzleFeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BORDER_COLOR_SWIZZLE_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDevicePortabilitySubsetFeaturesKHR` structure is defined as:

    // Provided by VK_KHR_portability_subset
    typedef struct VkPhysicalDevicePortabilitySubsetFeaturesKHR {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           constantAlphaColorBlendFactors;
        VkBool32           events;
        VkBool32           imageViewFormatReinterpretation;
        VkBool32           imageViewFormatSwizzle;
        VkBool32           imageView2DOn3DImage;
        VkBool32           multisampleArrayImage;
        VkBool32           mutableComparisonSamplers;
        VkBool32           pointPolygons;
        VkBool32           samplerMipLodBias;
        VkBool32           separateStencilMaskRef;
        VkBool32           shaderSampleRateInterpolationFunctions;
        VkBool32           tessellationIsolines;
        VkBool32           tessellationPointMode;
        VkBool32           triangleFans;
        VkBool32           vertexAttributeAccessBeyondStride;
    } VkPhysicalDevicePortabilitySubsetFeaturesKHR;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `constantAlphaColorBlendFactors` indicates whether this implementation supports constant alpha Blend Factors used as source or destination color Blending.

- `events` indicates whether this implementation supports synchronization using Events.

- `imageViewFormatReinterpretation` indicates whether this implementation supports a `VkImageView` being created with a texel format containing a different number of components, or a different number of bits in each component, than the texel format of the underlying `VkImage`.

- `imageViewFormatSwizzle` indicates whether this implementation supports remapping format components using VkImageViewCreateInfo::`components`.

- `imageView2DOn3DImage` indicates whether this implementation supports a `VkImage` being created with the VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT flag set, permitting a 2D or 2D array image view to be created on a 3D `VkImage`.

- `multisampleArrayImage` indicates whether this implementation supports a `VkImage` being created as a 2D array with multiple samples per texel.

- `mutableComparisonSamplers` indicates whether this implementation allows descriptors with comparison samplers to be updated.

- `pointPolygons` indicates whether this implementation supports Rasterization using a point Polygon Mode.

- `samplerMipLodBias` indicates whether this implementation supports setting a mipmap LOD bias value when creating a sampler.

- `separateStencilMaskRef` indicates whether this implementation supports separate front and back Stencil Test reference values.

- `shaderSampleRateInterpolationFunctions` indicates whether this implementation supports fragment shaders which use the `InterpolationFunction` capability and the extended instructions `InterpolateAtCentroid`, `InterpolateAtOffset`, and `InterpolateAtSample` from the `GLSL.std.450` extended instruction set. This member is only meaningful if the `sampleRateShading` feature is supported.

- `tessellationIsolines` indicates whether this implementation supports isoline output from the Tessellation stage of a graphics pipeline. This member is only meaningful if the `tessellationShader` feature is supported.

- `tessellationPointMode` indicates whether this implementation supports point output from the Tessellation stage of a graphics pipeline. This member is only meaningful if the `tessellationShader` feature is supported.

- `triangleFans` indicates whether this implementation supports Triangle Fans primitive topology.

- `vertexAttributeAccessBeyondStride` indicates whether this implementation supports accessing a vertex input attribute beyond the stride of the corresponding vertex input binding.

If the `VkPhysicalDevicePortabilitySubsetFeaturesKHR` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDevicePortabilitySubsetFeaturesKHR`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDevicePortabilitySubsetFeaturesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PORTABILITY_SUBSET_FEATURES_KHR

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDevicePerformanceQueryFeaturesKHR` structure is defined as:

    // Provided by VK_KHR_performance_query
    typedef struct VkPhysicalDevicePerformanceQueryFeaturesKHR {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           performanceCounterQueryPools;
        VkBool32           performanceCounterMultipleQueryPools;
    } VkPhysicalDevicePerformanceQueryFeaturesKHR;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `performanceCounterQueryPools` indicates whether the implementation supports performance counter query pools.

- `performanceCounterMultipleQueryPools` indicates whether the implementation supports using multiple performance query pools in a primary command buffer and secondary command buffers executed within it.

If the `VkPhysicalDevicePerformanceQueryFeaturesKHR` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDevicePerformanceQueryFeaturesKHR`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDevicePerformanceQueryFeaturesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PERFORMANCE_QUERY_FEATURES_KHR

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDevice4444FormatsFeaturesEXT` structure is defined as:

    // Provided by VK_EXT_4444_formats
    typedef struct VkPhysicalDevice4444FormatsFeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           formatA4R4G4B4;
        VkBool32           formatA4B4G4R4;
    } VkPhysicalDevice4444FormatsFeaturesEXT;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `formatA4R4G4B4` indicates that the implementation must support using a VkFormat of VK_FORMAT_A4R4G4B4_UNORM_PACK16_EXT with at least the following VkFormatFeatureFlagBits:

  - VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT

  - VK_FORMAT_FEATURE_BLIT_SRC_BIT

  - VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

- `formatA4B4G4R4` indicates that the implementation must support using a VkFormat of VK_FORMAT_A4B4G4R4_UNORM_PACK16_EXT with at least the following VkFormatFeatureFlagBits:

  - VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT

  - VK_FORMAT_FEATURE_BLIT_SRC_BIT

  - VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

If the `VkPhysicalDevice4444FormatsFeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDevice4444FormatsFeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDevice4444FormatsFeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_4444_FORMATS_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

Note | Although the formats defined by the `VK_EXT_4444_formats` extension were promoted to Vulkan 1.3 as optional formats, the VkPhysicalDevice4444FormatsFeaturesEXT structure was not promoted to Vulkan 1.3.

The `VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT` structure is defined as:

Warning | This functionality is superseded by VK_EXT_descriptor_heap. See Legacy Functionality for more information.

    // Provided by VK_EXT_mutable_descriptor_type
    typedef struct VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           mutableDescriptorType;
    } VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT;

    // Provided by VK_VALVE_mutable_descriptor_type
    // Equivalent to VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT
    typedef VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT VkPhysicalDeviceMutableDescriptorTypeFeaturesVALVE;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `mutableDescriptorType` indicates that the implementation must support using the VkDescriptorType of VK_DESCRIPTOR_TYPE_MUTABLE_EXT with at least the following descriptor types, where any combination of the types must be supported:

  - VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE

  - VK_DESCRIPTOR_TYPE_STORAGE_IMAGE

  - VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER

  - VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER

  - VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER

  - VK_DESCRIPTOR_TYPE_STORAGE_BUFFER

- Additionally, `mutableDescriptorType` indicates that:

  - Non-uniform descriptor indexing must be supported if all descriptor types in a VkMutableDescriptorTypeListEXT for VK_DESCRIPTOR_TYPE_MUTABLE_EXT have the corresponding non-uniform indexing features enabled in VkPhysicalDeviceDescriptorIndexingFeatures.

  - VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT with `descriptorType` of VK_DESCRIPTOR_TYPE_MUTABLE_EXT relaxes the list of required descriptor types to the descriptor types which have the corresponding update-after-bind feature enabled in VkPhysicalDeviceDescriptorIndexingFeatures.

  - Dynamically uniform descriptor indexing must be supported if all descriptor types in a VkMutableDescriptorTypeListEXT for VK_DESCRIPTOR_TYPE_MUTABLE_EXT have the corresponding dynamic indexing features enabled.

  - VK_DESCRIPTOR_SET_LAYOUT_CREATE_HOST_ONLY_POOL_BIT_EXT must be supported.

  - VK_DESCRIPTOR_POOL_CREATE_HOST_ONLY_BIT_EXT must be supported.

If the `VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceDepthClipControlFeaturesEXT` structure is defined as:

    // Provided by VK_EXT_depth_clip_control
    typedef struct VkPhysicalDeviceDepthClipControlFeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           depthClipControl;
    } VkPhysicalDeviceDepthClipControlFeaturesEXT;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `depthClipControl` indicates that the implementation supports setting VkPipelineViewportDepthClipControlCreateInfoEXT::`negativeOneToOne` to VK_TRUE.

If the `VkPhysicalDeviceDepthClipControlFeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceDepthClipControlFeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceDepthClipControlFeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_CONTROL_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceDepthClampControlFeaturesEXT` structure is defined as:

    // Provided by VK_EXT_depth_clamp_control
    typedef struct VkPhysicalDeviceDepthClampControlFeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           depthClampControl;
    } VkPhysicalDeviceDepthClampControlFeaturesEXT;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `depthClampControl` indicates that the implementation supports setting VkPipelineViewportDepthClampControlCreateInfoEXT::`depthClampMode` to VK_DEPTH_CLAMP_MODE_USER_DEFINED_RANGE_EXT.

If the `VkPhysicalDeviceDepthClampControlFeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceDepthClampControlFeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceDepthClampControlFeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLAMP_CONTROL_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR` structure is defined as:

    // Provided by VK_KHR_workgroup_memory_explicit_layout
    typedef struct VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           workgroupMemoryExplicitLayout;
        VkBool32           workgroupMemoryExplicitLayoutScalarBlockLayout;
        VkBool32           workgroupMemoryExplicitLayout8BitAccess;
        VkBool32           workgroupMemoryExplicitLayout16BitAccess;
    } VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `workgroupMemoryExplicitLayout` indicates whether the implementation supports the SPIR-V `WorkgroupMemoryExplicitLayoutKHR` capability.

- `workgroupMemoryExplicitLayoutScalarBlockLayout` indicates whether the implementation supports scalar alignment for laying out Workgroup Blocks.

- `workgroupMemoryExplicitLayout8BitAccess` indicates whether objects in the `Workgroup` storage class with the `Block` decoration can have 8-bit integer members. If this feature is not enabled, 8-bit integer members must not be used in such objects. This also indicates whether shader modules can declare the `WorkgroupMemoryExplicitLayout8BitAccessKHR` capability.

- `workgroupMemoryExplicitLayout16BitAccess` indicates whether objects in the `Workgroup` storage class with the `Block` decoration can have 16-bit integer and 16-bit floating-point members. If this feature is not enabled, 16-bit integer or 16-bit floating-point members must not be used in such objects. This also indicates whether shader modules can declare the `WorkgroupMemoryExplicitLayout16BitAccessKHR` capability.

If the `VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_WORKGROUP_MEMORY_EXPLICIT_LAYOUT_FEATURES_KHR

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceSynchronization2Features` structure is defined as:

    // Provided by VK_VERSION_1_3
    typedef struct VkPhysicalDeviceSynchronization2Features {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           synchronization2;
    } VkPhysicalDeviceSynchronization2Features;

    // Provided by VK_KHR_synchronization2
    // Equivalent to VkPhysicalDeviceSynchronization2Features
    typedef VkPhysicalDeviceSynchronization2Features VkPhysicalDeviceSynchronization2FeaturesKHR;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `synchronization2` indicates whether the implementation supports the new set of synchronization commands introduced in `VK_KHR_synchronization2`.

If the `VkPhysicalDeviceSynchronization2Features` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceSynchronization2Features`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceSynchronization2Features-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT` structure is defined as:

    // Provided by VK_EXT_vertex_input_dynamic_state
    typedef struct VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           vertexInputDynamicState;
    } VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `vertexInputDynamicState` indicates that the implementation supports the following dynamic states:

  - VK_DYNAMIC_STATE_VERTEX_INPUT_EXT

If the `VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_INPUT_DYNAMIC_STATE_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT` structure is defined as:

    // Provided by VK_EXT_primitives_generated_query
    typedef struct VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           primitivesGeneratedQuery;
        VkBool32           primitivesGeneratedQueryWithRasterizerDiscard;
        VkBool32           primitivesGeneratedQueryWithNonZeroStreams;
    } VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `primitivesGeneratedQuery` indicates whether the implementation supports the VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT query type.

- `primitivesGeneratedQueryWithRasterizerDiscard` indicates whether the implementation supports this query when rasterization discard is enabled.

- `primitivesGeneratedQueryWithNonZeroStreams` indicates whether the implementation supports this query with a non-zero index in vkCmdBeginQueryIndexedEXT.

If the `VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIMITIVES_GENERATED_QUERY_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceFragmentShadingRateFeaturesKHR` structure is defined as:

    // Provided by VK_KHR_fragment_shading_rate
    typedef struct VkPhysicalDeviceFragmentShadingRateFeaturesKHR {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           pipelineFragmentShadingRate;
        VkBool32           primitiveFragmentShadingRate;
        VkBool32           attachmentFragmentShadingRate;
    } VkPhysicalDeviceFragmentShadingRateFeaturesKHR;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `pipelineFragmentShadingRate` indicates that the implementation supports the pipeline fragment shading rate.

- `primitiveFragmentShadingRate` indicates that the implementation supports the primitive fragment shading rate.

- `attachmentFragmentShadingRate` indicates that the implementation supports the attachment fragment shading rate.

If the `VkPhysicalDeviceFragmentShadingRateFeaturesKHR` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceFragmentShadingRateFeaturesKHR`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceFragmentShadingRateFeaturesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_FEATURES_KHR

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceLegacyDitheringFeaturesEXT` structure is defined as:

    // Provided by VK_EXT_legacy_dithering
    typedef struct VkPhysicalDeviceLegacyDitheringFeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           legacyDithering;
    } VkPhysicalDeviceLegacyDitheringFeaturesEXT;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `legacyDithering` indicates whether the implementation supports Legacy Dithering.

If the `VkPhysicalDeviceLegacyDitheringFeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceLegacyDitheringFeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceLegacyDitheringFeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LEGACY_DITHERING_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV` structure is defined as:

    // Provided by VK_NV_fragment_shading_rate_enums
    typedef struct VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           fragmentShadingRateEnums;
        VkBool32           supersampleFragmentShadingRates;
        VkBool32           noInvocationFragmentShadingRates;
    } VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `fragmentShadingRateEnums` indicates that the implementation supports specifying fragment shading rates using the VkFragmentShadingRateNV enumerated type.

- `supersampleFragmentShadingRates` indicates that the implementation supports fragment shading rate enum values indicating more than one invocation per fragment.

- `noInvocationFragmentShadingRates` indicates that the implementation supports a fragment shading rate enum value indicating that no fragment shaders should be invoked when that shading rate is used.

If the `VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_ENUMS_FEATURES_NV

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceShaderUntypedPointersFeaturesKHR` structure is defined as:

    // Provided by VK_KHR_shader_untyped_pointers
    typedef struct VkPhysicalDeviceShaderUntypedPointersFeaturesKHR {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           shaderUntypedPointers;
    } VkPhysicalDeviceShaderUntypedPointersFeaturesKHR;

The members of `VkPhysicalDeviceShaderUntypedPointersFeaturesKHR` describe the following features:

- `shaderUntypedPointers` specifies whether shader modules can declare the `UntypedPointersKHR` capability and untyped pointers in any explicitly laid out storage class.

If the `VkPhysicalDeviceShaderUntypedPointersFeaturesKHR` structure is included in the `pNext` chain of VkPhysicalDeviceFeatures2, it is filled with values indicating whether the features are supported. `VkPhysicalDeviceShaderUntypedPointersFeaturesKHR` can also be included in the `pNext` chain of VkDeviceCreateInfo to enable the features.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceShaderUntypedPointersFeaturesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_UNTYPED_POINTERS_FEATURES_KHR

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceInheritedViewportScissorFeaturesNV` structure is defined as:

    // Provided by VK_NV_inherited_viewport_scissor
    typedef struct VkPhysicalDeviceInheritedViewportScissorFeaturesNV {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           inheritedViewportScissor2D;
    } VkPhysicalDeviceInheritedViewportScissorFeaturesNV;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `inheritedViewportScissor2D` indicates whether secondary command buffers can inherit most of the dynamic state affected by VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT, VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT, VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT, VK_DYNAMIC_STATE_DISCARD_RECTANGLE_ENABLE_EXT, VK_DYNAMIC_STATE_DISCARD_RECTANGLE_MODE_EXT, VK_DYNAMIC_STATE_VIEWPORT or VK_DYNAMIC_STATE_SCISSOR, from a primary command buffer.

If the `VkPhysicalDeviceInheritedViewportScissorFeaturesNV` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceInheritedViewportScissorFeaturesNV`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceInheritedViewportScissorFeaturesNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INHERITED_VIEWPORT_SCISSOR_FEATURES_NV

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDevicePipelineProtectedAccessFeatures` structure is defined as:

    // Provided by VK_VERSION_1_4
    typedef struct VkPhysicalDevicePipelineProtectedAccessFeatures {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           pipelineProtectedAccess;
    } VkPhysicalDevicePipelineProtectedAccessFeatures;

    // Provided by VK_EXT_pipeline_protected_access
    // Equivalent to VkPhysicalDevicePipelineProtectedAccessFeatures
    typedef VkPhysicalDevicePipelineProtectedAccessFeatures VkPhysicalDevicePipelineProtectedAccessFeaturesEXT;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `pipelineProtectedAccess` indicates whether the implementation supports specifying protected access on individual pipelines.

If the `VkPhysicalDevicePipelineProtectedAccessFeatures` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDevicePipelineProtectedAccessFeatures`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDevicePipelineProtectedAccessFeatures-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_PROTECTED_ACCESS_FEATURES

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT` structure is defined as:

    // Provided by VK_EXT_ycbcr_2plane_444_formats
    typedef struct VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           ycbcr2plane444Formats;
    } VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `ycbcr2plane444Formats` indicates that the implementation supports querying format features for, and using, the following 2-plane 444 Y′CBCR formats:

  - VK_FORMAT_G8_B8R8_2PLANE_444_UNORM

  - VK_FORMAT_G10X6_B10X6R10X6_2PLANE_444_UNORM_3PACK16

  - VK_FORMAT_G12X4_B12X4R12X4_2PLANE_444_UNORM_3PACK16

  - VK_FORMAT_G16_B16R16_2PLANE_444_UNORM

If the `VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_2_PLANE_444_FORMATS_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

Note | Although the formats defined by the `VK_EXT_ycbcr_2plane_444_formats` were promoted to Vulkan 1.3 as optional formats, the VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT structure was not promoted to Vulkan 1.3.

The `VkPhysicalDeviceColorWriteEnableFeaturesEXT` structure is defined as:

    // Provided by VK_EXT_color_write_enable
    typedef struct VkPhysicalDeviceColorWriteEnableFeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           colorWriteEnable;
    } VkPhysicalDeviceColorWriteEnableFeaturesEXT;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `colorWriteEnable` indicates that the implementation supports the dynamic state VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT.

If the `VkPhysicalDeviceColorWriteEnableFeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceColorWriteEnableFeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceColorWriteEnableFeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COLOR_WRITE_ENABLE_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDevicePipelinePropertiesFeaturesEXT` structure is defined as:

    // Provided by VK_EXT_pipeline_properties
    typedef struct VkPhysicalDevicePipelinePropertiesFeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           pipelinePropertiesIdentifier;
    } VkPhysicalDevicePipelinePropertiesFeaturesEXT;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `pipelinePropertiesIdentifier` indicates that the implementation supports querying a unique pipeline identifier.

If the `VkPhysicalDevicePipelinePropertiesFeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDevicePipelinePropertiesFeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDevicePipelinePropertiesFeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_PROPERTIES_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceProvokingVertexFeaturesEXT` structure is defined as:

    // Provided by VK_EXT_provoking_vertex
    typedef struct VkPhysicalDeviceProvokingVertexFeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           provokingVertexLast;
        VkBool32           transformFeedbackPreservesProvokingVertex;
    } VkPhysicalDeviceProvokingVertexFeaturesEXT;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `provokingVertexLast` indicates whether the implementation supports the VK_PROVOKING_VERTEX_MODE_LAST_VERTEX_EXT provoking vertex mode for flat shading.

- `transformFeedbackPreservesProvokingVertex` indicates that the order of vertices within each primitive written by transform feedback will preserve the provoking vertex. This does not apply to triangle fan primitives when `transformFeedbackPreservesTriangleFanProvokingVertex` is VK_FALSE. `transformFeedbackPreservesProvokingVertex` must be VK_FALSE when the `VK_EXT_transform_feedback` extension is not supported.

If the `VkPhysicalDeviceProvokingVertexFeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceProvokingVertexFeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

When `VkPhysicalDeviceProvokingVertexFeaturesEXT` is in the `pNext` chain of VkDeviceCreateInfo but the `transformFeedback` feature is not enabled, the value of `transformFeedbackPreservesProvokingVertex` is ignored.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceProvokingVertexFeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROVOKING_VERTEX_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceDescriptorBufferFeaturesEXT` structure is defined as:

Warning | This functionality is superseded by VK_EXT_descriptor_heap. See Legacy Functionality for more information.

    // Provided by VK_EXT_descriptor_buffer
    typedef struct VkPhysicalDeviceDescriptorBufferFeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           descriptorBuffer;
        VkBool32           descriptorBufferCaptureReplay;
        VkBool32           descriptorBufferImageLayoutIgnored;
        VkBool32           descriptorBufferPushDescriptors;
    } VkPhysicalDeviceDescriptorBufferFeaturesEXT;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `descriptorBuffer` indicates that the implementation supports putting shader-accessible descriptors directly in memory.

- `descriptorBufferCaptureReplay` indicates that the implementation supports capture and replay when using descriptor buffers. If this is VK_TRUE, all resources created with VK_BUFFER_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT, VK_IMAGE_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT, VK_IMAGE_VIEW_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT, VK_TENSOR_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_ARM, VK_TENSOR_VIEW_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_ARM, VK_SAMPLER_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT, or VK_ACCELERATION_STRUCTURE_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT must be created before resources of the same types without those flags.

- `descriptorBufferImageLayoutIgnored` indicates that the implementation will ignore `imageLayout` in `VkDescriptorImageInfo` when calling vkGetDescriptorEXT.

- `descriptorBufferPushDescriptors` indicates that the implementation supports using push descriptors with descriptor buffers.

If the `VkPhysicalDeviceDescriptorBufferFeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceDescriptorBufferFeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceDescriptorBufferFeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceDescriptorBufferTensorFeaturesARM` structure is defined as:

    // Provided by VK_EXT_descriptor_buffer with VK_ARM_tensors
    typedef struct VkPhysicalDeviceDescriptorBufferTensorFeaturesARM {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           descriptorBufferTensorDescriptors;
    } VkPhysicalDeviceDescriptorBufferTensorFeaturesARM;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `descriptorBufferTensorDescriptors` indicates that the implementation supports putthing shader-accessible tensor descriptors directly in memory.

If the `VkPhysicalDeviceDescriptorBufferTensorFeaturesARM` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceDescriptorBufferTensorFeaturesARM`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceDescriptorBufferTensorFeaturesARM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_TENSOR_FEATURES_ARM

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT` structure is defined as:

    // Provided by VK_EXT_pageable_device_local_memory
    typedef struct VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           pageableDeviceLocalMemory;
    } VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `pageableDeviceLocalMemory` indicates that the implementation supports pageable device-local memory and may transparently move device-local memory allocations to host-local memory to better share device-local memory with other applications.

If the `VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PAGEABLE_DEVICE_LOCAL_MEMORY_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceMultiDrawFeaturesEXT` structure is defined as:

    // Provided by VK_EXT_multi_draw
    typedef struct VkPhysicalDeviceMultiDrawFeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           multiDraw;
    } VkPhysicalDeviceMultiDrawFeaturesEXT;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `multiDraw` indicates that the implementation supports vkCmdDrawMultiEXT and vkCmdDrawMultiIndexedEXT.

If the `VkPhysicalDeviceMultiDrawFeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceMultiDrawFeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceMultiDrawFeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTI_DRAW_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceRayTracingMotionBlurFeaturesNV` structure is defined as:

    // Provided by VK_NV_ray_tracing_motion_blur
    typedef struct VkPhysicalDeviceRayTracingMotionBlurFeaturesNV {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           rayTracingMotionBlur;
        VkBool32           rayTracingMotionBlurPipelineTraceRaysIndirect;
    } VkPhysicalDeviceRayTracingMotionBlurFeaturesNV;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `rayTracingMotionBlur` indicates whether the implementation supports the motion blur feature.

- `rayTracingMotionBlurPipelineTraceRaysIndirect` indicates whether the implementation supports indirect ray tracing commands with the motion blur feature enabled.

If the `VkPhysicalDeviceRayTracingMotionBlurFeaturesNV` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceRayTracingMotionBlurFeaturesNV`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceRayTracingMotionBlurFeaturesNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_MOTION_BLUR_FEATURES_NV

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceRayTracingLinearSweptSpheresFeaturesNV` structure is defined as:

    // Provided by VK_NV_ray_tracing_linear_swept_spheres
    typedef struct VkPhysicalDeviceRayTracingLinearSweptSpheresFeaturesNV {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           spheres;
        VkBool32           linearSweptSpheres;
    } VkPhysicalDeviceRayTracingLinearSweptSpheresFeaturesNV;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `spheres` indicates whether the implementation supports sphere primitives in ray tracing.

- `linearSweptSpheres` indicates whether the implementation supports linear swept sphere primitives in ray tracing.

If the `VkPhysicalDeviceRayTracingLinearSweptSpheresFeaturesNV` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceRayTracingLinearSweptSpheresFeaturesNV`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceRayTracingLinearSweptSpheresFeaturesNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_LINEAR_SWEPT_SPHERES_FEATURES_NV

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceOpacityMicromapFeaturesKHR` structure is defined as:

    // Provided by VK_KHR_opacity_micromap
    typedef struct VkPhysicalDeviceOpacityMicromapFeaturesKHR {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           micromap;
    } VkPhysicalDeviceOpacityMicromapFeaturesKHR;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `micromap` indicates whether the implementation supports the micromap array feature.

If the `VkPhysicalDeviceOpacityMicromapFeaturesKHR` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceOpacityMicromapFeaturesKHR`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceOpacityMicromapFeaturesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_OPACITY_MICROMAP_FEATURES_KHR

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceOpacityMicromapFeaturesEXT` structure is defined as:

    // Provided by VK_EXT_opacity_micromap
    typedef struct VkPhysicalDeviceOpacityMicromapFeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           micromap;
        VkBool32           micromapCaptureReplay;
        // micromapHostCommands is legacy, but no reason was given in the API XML
        VkBool32           micromapHostCommands;
    } VkPhysicalDeviceOpacityMicromapFeaturesEXT;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `micromap` indicates whether the implementation supports the micromap array feature.

- `micromapCaptureReplay` indicates whether the implementation supports capture and replay of addresses for micromap arrays.

- `micromapHostCommands` indicates whether the implementation supports host side micromap array commands.

If the `VkPhysicalDeviceOpacityMicromapFeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceOpacityMicromapFeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceOpacityMicromapFeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_OPACITY_MICROMAP_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceDisplacementMicromapFeaturesNV` structure is defined as:

    // Provided by VK_NV_displacement_micromap
    typedef struct VkPhysicalDeviceDisplacementMicromapFeaturesNV {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           displacementMicromap;
    } VkPhysicalDeviceDisplacementMicromapFeaturesNV;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `displacementMicromap` indicates whether the implementation supports the displacement micromap feature.

If the `VkPhysicalDeviceDisplacementMicromapFeaturesNV` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceDisplacementMicromapFeaturesNV`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceDisplacementMicromapFeaturesNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISPLACEMENT_MICROMAP_FEATURES_NV

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceRayTracingValidationFeaturesNV` structure is defined as:

    // Provided by VK_NV_ray_tracing_validation
    typedef struct VkPhysicalDeviceRayTracingValidationFeaturesNV {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           rayTracingValidation;
    } VkPhysicalDeviceRayTracingValidationFeaturesNV;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `rayTracingValidation` indicates whether the implementation supports the ray tracing validation feature.

If the `VkPhysicalDeviceRayTracingValidationFeaturesNV` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceRayTracingValidationFeaturesNV`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceRayTracingValidationFeaturesNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_VALIDATION_FEATURES_NV

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceZeroInitializeDeviceMemoryFeaturesEXT` structure is defined as:

    // Provided by VK_EXT_zero_initialize_device_memory
    typedef struct VkPhysicalDeviceZeroInitializeDeviceMemoryFeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           zeroInitializeDeviceMemory;
    } VkPhysicalDeviceZeroInitializeDeviceMemoryFeaturesEXT;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `zeroInitializeDeviceMemory` indicates that the implementation supports zeroing memory allocations using a user-specified flag.

If the `VkPhysicalDeviceZeroInitializeDeviceMemoryFeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceZeroInitializeDeviceMemoryFeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceZeroInitializeDeviceMemoryFeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ZERO_INITIALIZE_DEVICE_MEMORY_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceSubpassShadingFeaturesHUAWEI` structure is defined as:

    // Provided by VK_HUAWEI_subpass_shading
    typedef struct VkPhysicalDeviceSubpassShadingFeaturesHUAWEI {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           subpassShading;
    } VkPhysicalDeviceSubpassShadingFeaturesHUAWEI;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `subpassShading` specifies whether subpass shading is supported.

If the `VkPhysicalDeviceSubpassShadingFeaturesHUAWEI` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceSubpassShadingFeaturesHUAWEI`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceSubpassShadingFeaturesHUAWEI-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBPASS_SHADING_FEATURES_HUAWEI

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceExternalMemoryRDMAFeaturesNV` structure is defined as:

    // Provided by VK_NV_external_memory_rdma
    typedef struct VkPhysicalDeviceExternalMemoryRDMAFeaturesNV {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           externalMemoryRDMA;
    } VkPhysicalDeviceExternalMemoryRDMAFeaturesNV;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `externalMemoryRDMA` indicates whether the implementation has support for the VK_MEMORY_PROPERTY_RDMA_CAPABLE_BIT_NV memory property and the VK_EXTERNAL_MEMORY_HANDLE_TYPE_RDMA_ADDRESS_BIT_NV external memory handle type.

If the `VkPhysicalDeviceExternalMemoryRDMAFeaturesNV` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceExternalMemoryRDMAFeaturesNV`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceExternalMemoryRDMAFeaturesNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_RDMA_FEATURES_NV

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDevicePresentIdFeaturesKHR` structure is defined as:

    // Provided by VK_KHR_present_id
    typedef struct VkPhysicalDevicePresentIdFeaturesKHR {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           presentId;
    } VkPhysicalDevicePresentIdFeaturesKHR;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `presentId` indicates that the implementation supports specifying present ID values in the `VkPresentIdKHR` extension to the `VkPresentInfoKHR` struct.

If the `VkPhysicalDevicePresentIdFeaturesKHR` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDevicePresentIdFeaturesKHR`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDevicePresentIdFeaturesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_ID_FEATURES_KHR

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDevicePresentId2FeaturesKHR` structure is defined as:

    // Provided by VK_KHR_present_id2
    typedef struct VkPhysicalDevicePresentId2FeaturesKHR {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           presentId2;
    } VkPhysicalDevicePresentId2FeaturesKHR;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `presentId2` indicates that the implementation supports specifying present ID values in the `VkPresentId2KHR` extension to the `VkPresentInfoKHR` struct.

If the `VkPhysicalDevicePresentId2FeaturesKHR` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDevicePresentId2FeaturesKHR`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDevicePresentId2FeaturesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_ID_2_FEATURES_KHR

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDevicePresentWaitFeaturesKHR` structure is defined as:

    // Provided by VK_KHR_present_wait
    typedef struct VkPhysicalDevicePresentWaitFeaturesKHR {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           presentWait;
    } VkPhysicalDevicePresentWaitFeaturesKHR;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `presentWait` indicates that the implementation supports `vkWaitForPresentKHR`.

If the `VkPhysicalDevicePresentWaitFeaturesKHR` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDevicePresentWaitFeaturesKHR`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDevicePresentWaitFeaturesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_WAIT_FEATURES_KHR

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDevicePresentWait2FeaturesKHR` structure is defined as:

    // Provided by VK_KHR_present_wait2
    typedef struct VkPhysicalDevicePresentWait2FeaturesKHR {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           presentWait2;
    } VkPhysicalDevicePresentWait2FeaturesKHR;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `presentWait2` indicates that the implementation supports `vkWaitForPresent2KHR`.

If the `VkPhysicalDevicePresentWait2FeaturesKHR` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDevicePresentWait2FeaturesKHR`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDevicePresentWait2FeaturesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_WAIT_2_FEATURES_KHR

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceUnifiedImageLayoutsFeaturesKHR` structure is defined as:

    // Provided by VK_KHR_unified_image_layouts
    typedef struct VkPhysicalDeviceUnifiedImageLayoutsFeaturesKHR {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           unifiedImageLayouts;
        VkBool32           unifiedImageLayoutsVideo;
    } VkPhysicalDeviceUnifiedImageLayoutsFeaturesKHR;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `unifiedImageLayouts` specifies whether usage of VK_IMAGE_LAYOUT_GENERAL, where valid, incurs no loss in efficiency. Additionally, it indicates whether it can be used in place of VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT.

- `unifiedImageLayoutsVideo` specifies whether VK_IMAGE_LAYOUT_GENERAL can be used in place of any of the following image layouts with no loss in efficiency.

  - VK_IMAGE_LAYOUT_VIDEO_DECODE_DST_KHR

  - VK_IMAGE_LAYOUT_VIDEO_DECODE_SRC_KHR

  - VK_IMAGE_LAYOUT_VIDEO_DECODE_DPB_KHR

  - VK_IMAGE_LAYOUT_VIDEO_ENCODE_DST_KHR

  - VK_IMAGE_LAYOUT_VIDEO_ENCODE_SRC_KHR

  - VK_IMAGE_LAYOUT_VIDEO_ENCODE_DPB_KHR

  - VK_IMAGE_LAYOUT_VIDEO_ENCODE_QUANTIZATION_MAP_KHR

If the `VkPhysicalDeviceUnifiedImageLayoutsFeaturesKHR` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceUnifiedImageLayoutsFeaturesKHR`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceUnifiedImageLayoutsFeaturesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_UNIFIED_IMAGE_LAYOUTS_FEATURES_KHR

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceHostImageCopyFeatures` structure is defined as:

    // Provided by VK_VERSION_1_4
    typedef struct VkPhysicalDeviceHostImageCopyFeatures {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           hostImageCopy;
    } VkPhysicalDeviceHostImageCopyFeatures;

    // Provided by VK_EXT_host_image_copy
    // Equivalent to VkPhysicalDeviceHostImageCopyFeatures
    typedef VkPhysicalDeviceHostImageCopyFeatures VkPhysicalDeviceHostImageCopyFeaturesEXT;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `hostImageCopy` indicates that the implementation supports copying from host memory to images using the vkCopyMemoryToImage command, copying from images to host memory using the vkCopyImageToMemory command, and copying between images using the vkCopyImageToImage command.

If the `VkPhysicalDeviceHostImageCopyFeatures` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceHostImageCopyFeatures`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceHostImageCopyFeatures-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_FEATURES

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDevicePresentTimingFeaturesEXT` structure is defined as:

    // Provided by VK_EXT_present_timing
    typedef struct VkPhysicalDevicePresentTimingFeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           presentTiming;
        VkBool32           presentAtAbsoluteTime;
        VkBool32           presentAtRelativeTime;
    } VkPhysicalDevicePresentTimingFeaturesEXT;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `presentTiming` indicates that the implementation supports `vkGetPastPresentationTimingEXT`.

- `presentAtAbsoluteTime` indicates that the implementation supports specifying absolute target present times.

- `presentAtRelativeTime` indicates that the implementation supports specifying relative target present times.

If the `VkPhysicalDevicePresentTimingFeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDevicePresentTimingFeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDevicePresentTimingFeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_TIMING_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDevicePresentBarrierFeaturesNV` structure is defined as:

    // Provided by VK_NV_present_barrier
    typedef struct VkPhysicalDevicePresentBarrierFeaturesNV {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           presentBarrier;
    } VkPhysicalDevicePresentBarrierFeaturesNV;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `presentBarrier` indicates that the implementation supports the present barrier feature.

If the `VkPhysicalDevicePresentBarrierFeaturesNV` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDevicePresentBarrierFeaturesNV`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDevicePresentBarrierFeaturesNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_BARRIER_FEATURES_NV

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceShaderFmaFeaturesKHR` structure is defined as:

    // Provided by VK_KHR_shader_fma
    typedef struct VkPhysicalDeviceShaderFmaFeaturesKHR {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           shaderFmaFloat16;
        VkBool32           shaderFmaFloat32;
        VkBool32           shaderFmaFloat64;
    } VkPhysicalDeviceShaderFmaFeaturesKHR;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `shaderFmaFloat16` indicates whether the implementation supports `OpFmaKHR` for Float16 types in shaders.

- `shaderFmaFloat32` indicates whether the implementation supports `OpFmaKHR` for Float32 types in shaders.

- `shaderFmaFloat64` indicates whether the implementation supports `OpFmaKHR` for Float64 types in shaders.

If the `VkPhysicalDeviceShaderFmaFeaturesKHR` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceShaderFmaFeaturesKHR`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceShaderFmaFeaturesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FMA_FEATURES_KHR

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceShaderIntegerDotProductFeatures` structure is defined as:

    // Provided by VK_VERSION_1_3
    typedef struct VkPhysicalDeviceShaderIntegerDotProductFeatures {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           shaderIntegerDotProduct;
    } VkPhysicalDeviceShaderIntegerDotProductFeatures;

    // Provided by VK_KHR_shader_integer_dot_product
    // Equivalent to VkPhysicalDeviceShaderIntegerDotProductFeatures
    typedef VkPhysicalDeviceShaderIntegerDotProductFeatures VkPhysicalDeviceShaderIntegerDotProductFeaturesKHR;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `shaderIntegerDotProduct` specifies whether shader modules can declare the `DotProductInputAllKHR`, `DotProductInput4x8BitKHR`, `DotProductInput4x8BitPackedKHR` and `DotProductKHR` capabilities.

If the `VkPhysicalDeviceShaderIntegerDotProductFeatures` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceShaderIntegerDotProductFeatures`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceShaderIntegerDotProductFeatures-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_FEATURES

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceMaintenance4Features` structure is defined as:

    // Provided by VK_VERSION_1_3
    typedef struct VkPhysicalDeviceMaintenance4Features {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           maintenance4;
    } VkPhysicalDeviceMaintenance4Features;

    // Provided by VK_KHR_maintenance4
    // Equivalent to VkPhysicalDeviceMaintenance4Features
    typedef VkPhysicalDeviceMaintenance4Features VkPhysicalDeviceMaintenance4FeaturesKHR;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `maintenance4` indicates that the implementation supports the following:

  - The application may destroy a VkPipelineLayout object immediately after using it to create another object.

  - `LocalSizeId` can be used as an alternative to `LocalSize` to specify the local workgroup size with specialization constants.

  - Images created with identical creation parameters will always have the same alignment requirements.

  - The size memory requirement of a buffer or image is never greater than that of another buffer or image created with a greater or equal size.

  - Push constants do not have to be initialized before they are dynamically accessed.

  - The interface matching rules allow a larger output vector to match with a smaller input vector, with additional values being discarded.

If the `VkPhysicalDeviceMaintenance4Features` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceMaintenance4Features`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceMaintenance4Features-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_FEATURES

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceMaintenance5Features` structure is defined as:

    // Provided by VK_VERSION_1_4
    typedef struct VkPhysicalDeviceMaintenance5Features {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           maintenance5;
    } VkPhysicalDeviceMaintenance5Features;

    // Provided by VK_KHR_maintenance5
    // Equivalent to VkPhysicalDeviceMaintenance5Features
    typedef VkPhysicalDeviceMaintenance5Features VkPhysicalDeviceMaintenance5FeaturesKHR;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `maintenance5` indicates that the implementation supports the following:

  - The ability to expose support for the optional format VK_FORMAT_A1B5G5R5_UNORM_PACK16.

  - The ability to expose support for the optional format VK_FORMAT_A8_UNORM.

  - A property to indicate that multisample coverage operations are performed after sample counting in EarlyFragmentTests mode.

  - Creating a `VkBufferView` with a subset of the associated `VkBuffer` usage using VkBufferUsageFlags2CreateInfo.

  - A new function vkCmdBindIndexBuffer2, allowing a range of memory to be bound as an index buffer.

  - vkGetDeviceProcAddr will return `NULL` for function pointers of core functions for versions higher than the version requested by the application.

  - vkCmdBindVertexBuffers2 supports using VK_WHOLE_SIZE in the `pSizes` parameter.

  - If `PointSize` is not written, a default value of `1.0` is used for the size of points.

  - VkShaderModuleCreateInfo can be added as a chained structure to pipeline creation via VkPipelineShaderStageCreateInfo, rather than having to create a shader module.

  - A function vkGetRenderingAreaGranularity to query the optimal render area for a dynamic rendering instance.

  - A property to indicate that depth/stencil texturing operations with VK_COMPONENT_SWIZZLE_ONE have defined behavior.

  - vkGetDeviceImageSubresourceLayout allows an application to perform a vkGetImageSubresourceLayout query without having to create an image.

  - VK_REMAINING_ARRAY_LAYERS as the `layerCount` member of VkImageSubresourceLayers.

  - A property to indicate whether `PointSize` controls the final rasterization of polygons if polygon mode is VK_POLYGON_MODE_POINT.

  - Two properties to indicate the non-strict line rasterization algorithm used.

  - Two new flags words VkPipelineCreateFlagBits2 and VkBufferUsageFlagBits2.

  - Physical-device-level functions can now be called with any value in the valid range for a type beyond the defined enumerants, such that applications can avoid checking individual features, extensions, or versions before querying supported properties of a particular enumerant.

  - Copies between images of any type are allowed, with 1D images treated as 2D images with a height of `1`.

If the `VkPhysicalDeviceMaintenance5Features` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceMaintenance5Features`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceMaintenance5Features-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_FEATURES

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceMaintenance6Features` structure is defined as:

    // Provided by VK_VERSION_1_4
    typedef struct VkPhysicalDeviceMaintenance6Features {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           maintenance6;
    } VkPhysicalDeviceMaintenance6Features;

    // Provided by VK_KHR_maintenance6
    // Equivalent to VkPhysicalDeviceMaintenance6Features
    typedef VkPhysicalDeviceMaintenance6Features VkPhysicalDeviceMaintenance6FeaturesKHR;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `maintenance6` indicates that the implementation supports the following:

  - VK_NULL_HANDLE can be used when binding an index buffer

  - VkBindMemoryStatus can be included in the `pNext` chain of the VkBindBufferMemoryInfo and VkBindImageMemoryInfo structures, enabling applications to retrieve VkResult values for individual memory binding operations.

  - VkPhysicalDeviceMaintenance6Properties::`blockTexelViewCompatibleMultipleLayers` property to indicate that the implementation supports creating image views with VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT where the `layerCount` member of `subresourceRange` is greater than `1`.

  - VkPhysicalDeviceMaintenance6Properties::`maxCombinedImageSamplerDescriptorCount` property which indicates the maximum descriptor size required for any format that requires a sampler Y′CBCR conversion supported by the implementation.

  - A VkPhysicalDeviceMaintenance6Properties::`fragmentShadingRateClampCombinerInputs` property which indicates whether the implementation clamps the inputs to fragment shading rate combiner operations.

If the `VkPhysicalDeviceMaintenance6Features` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceMaintenance6Features`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceMaintenance6Features-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_FEATURES

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceMaintenance7FeaturesKHR` structure is defined as:

    // Provided by VK_KHR_maintenance7
    typedef struct VkPhysicalDeviceMaintenance7FeaturesKHR {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           maintenance7;
    } VkPhysicalDeviceMaintenance7FeaturesKHR;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `maintenance7` indicates that the implementation supports the following:

  - The VK_RENDERING_CONTENTS_INLINE_BIT_KHR and VK_SUBPASS_CONTENTS_INLINE_AND_SECONDARY_COMMAND_BUFFERS_KHR flags can be used to record commands in render pass instances both inline and in secondary command buffers executed with vkCmdExecuteCommands for dynamic rendering and legacy render passes respectively.

  - Querying information regarding the underlying devices in environments where the Vulkan implementation is provided through layered implementations. This is done by chaining VkPhysicalDeviceLayeredApiPropertiesListKHR to VkPhysicalDeviceProperties2.

  - New limits which indicate the maximum total count of dynamic uniform buffers and dynamic storage buffers that can be included in a pipeline layout.

  - 32-bit timestamp queries must wrap on overflow

  - A property that indicates whether a fragment shading rate attachment can have a size that is too small to cover a specified render area.

  - A property that indicates support for writing to one aspect of a depth/stencil attachment without performing a read-modify-write operation on the other aspect

If the `VkPhysicalDeviceMaintenance7FeaturesKHR` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceMaintenance7FeaturesKHR`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceMaintenance7FeaturesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_7_FEATURES_KHR

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceMaintenance8FeaturesKHR` structure is defined as:

    // Provided by VK_KHR_maintenance8
    typedef struct VkPhysicalDeviceMaintenance8FeaturesKHR {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           maintenance8;
    } VkPhysicalDeviceMaintenance8FeaturesKHR;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `maintenance8` indicates that the implementation supports the following:

  - Allow copies between depth/stencil and “matching” color attachments

  - Allow `dstCache` in vkMergePipelineCaches to be implicitly synchronized.

  - Require src/dst sync scopes to work when doing queue family ownership transfers

  - Support `Offset` (as an alternative to `ConstOffset`) image operand in texture sampling and fetch operations

  - Use the SPIR-V definition of `OpSRem` and `OpSMod`, making these operations produce well-defined results for negative operands

  - Loosen layer restrictions when blitting from 3D images to other image types

  - Add space for an additional 64 access flags for use with VkMemoryBarrier2, VkBufferMemoryBarrier2, and VkImageMemoryBarrier2

If the `VkPhysicalDeviceMaintenance8FeaturesKHR` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceMaintenance8FeaturesKHR`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceMaintenance8FeaturesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_8_FEATURES_KHR

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceMaintenance9FeaturesKHR` structure is defined as:

    // Provided by VK_KHR_maintenance9
    typedef struct VkPhysicalDeviceMaintenance9FeaturesKHR {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           maintenance9;
    } VkPhysicalDeviceMaintenance9FeaturesKHR;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `maintenance9` indicates that the implementation supports the following:

  - The restriction that certain bitfield SPIR-V instructions only operate on 32-bit integers is relaxed.

  - The value returned when a vertex shader reads an unbound vertex attribute is defined by way of the `defaultVertexAttributeValue` property.

  - A new VkQueryPoolCreateFlagBits::VK_QUERY_POOL_CREATE_RESET_BIT_KHR flag can be used to initialize all queries in query pool to the reset state on creation.

  - vkCmdSetEvent2 may not provide a dependency other than the event src stage mask.

  - The effects of image memory barriers and image layout transitions on 3D images created with VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT are limited to only those slices specified in `VkImageSubresourceRange`

  - A device can be created with no queues. This can be used for compiling pipelines or shaders for the purpose of filling pipeline caches.

  - Queue family ownership transfers are no longer required for buffers and linear images. For optimally tiled images, a new physical device query is added to check if resources created with VK_SHARING_MODE_EXCLUSIVE can automatically transfer ownership between two queue families.

  - `image2DViewOf3DSparse` enables 2D views of 3D sparse images.

If the `VkPhysicalDeviceMaintenance9FeaturesKHR` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceMaintenance9FeaturesKHR`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceMaintenance9FeaturesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_9_FEATURES_KHR

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceMaintenance10FeaturesKHR` structure is defined as:

    // Provided by VK_KHR_maintenance10
    typedef struct VkPhysicalDeviceMaintenance10FeaturesKHR {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           maintenance10;
    } VkPhysicalDeviceMaintenance10FeaturesKHR;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `maintenance10` indicates that the implementation supports the following:

  - New image format feature bits that indicate support for copying depth or stencil aspects using non-graphics queue families

  - If vkCmdSetSampleMaskEXT is called with `pSampleMask` set to `NULL`, it is treated as if the mask has all bits set to `1`.

  - Add vkCmdEndRendering2KHR as an extensible version of vkCmdEndRendering

  - Add input attachment information to dynamic rendering

  - Require that vertex inputs follow sRGB encoding when those formats are used, instead of being underspecified.

  - Add a query to determine if sRGB images are resolved in nonlinear or linear space by default

  - Add an optional feature to allow applications to override the default sRGB resolve behavior

  - Add resolve mode and depth-stencil resolve support to vkCmdResolveImage2 to bring it in-line with render pass attachment resolves

If the `VkPhysicalDeviceMaintenance10FeaturesKHR` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceMaintenance10FeaturesKHR`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceMaintenance10FeaturesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_10_FEATURES_KHR

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceMaintenance11FeaturesKHR` structure is defined as:

    // Provided by VK_KHR_maintenance11
    typedef struct VkPhysicalDeviceMaintenance11FeaturesKHR {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           maintenance11;
    } VkPhysicalDeviceMaintenance11FeaturesKHR;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `maintenance11` indicates that the implementation supports the following:

  - VK_IMAGE_CREATE_ALIAS_SINGLE_LAYER_DESCRIPTOR_BIT_KHR

  - The depth clipping state of the pipeline is well defined when the pipeline is created without VK_DYNAMIC_STATE_DEPTH_CLIP_ENABLE_EXT being set and the VkPipelineRasterizationDepthClipStateCreateInfoEXT structure is not present

  - VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR

  - Allow `queueFamilyIndexCount` of 1 in VkBufferCreateInfo, VkImageCreateInfo, VkPhysicalDeviceImageDrmFormatModifierInfoEXT, VkTensorCreateInfoARM when `sharingMode` is VK_SHARING_MODE_CONCURRENT

  - Require `minImageTransferGranularity` to be (1,1,1) even on transfer-only queues and add `optimalImageTransferGranularity` queue family property to communicate the performance bump for copies not aligned to the optimal granularity

  - When copying between a buffer and an image on a transfer-only queue, do not require `bufferOffset` to be a multiple of 4

If the `VkPhysicalDeviceMaintenance11FeaturesKHR` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceMaintenance11FeaturesKHR`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceMaintenance11FeaturesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_11_FEATURES_KHR

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceDynamicRenderingFeatures` structure is defined as:

    // Provided by VK_VERSION_1_3
    typedef struct VkPhysicalDeviceDynamicRenderingFeatures {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           dynamicRendering;
    } VkPhysicalDeviceDynamicRenderingFeatures;

    // Provided by VK_KHR_dynamic_rendering
    // Equivalent to VkPhysicalDeviceDynamicRenderingFeatures
    typedef VkPhysicalDeviceDynamicRenderingFeatures VkPhysicalDeviceDynamicRenderingFeaturesKHR;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `dynamicRendering` specifies that the implementation supports dynamic render pass instances using the vkCmdBeginRendering command.

If the `VkPhysicalDeviceDynamicRenderingFeatures` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceDynamicRenderingFeatures`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceDynamicRenderingFeatures-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_FEATURES

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceCustomResolveFeaturesEXT` structure is defined as:

    // Provided by VK_EXT_custom_resolve
    typedef struct VkPhysicalDeviceCustomResolveFeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           customResolve;
    } VkPhysicalDeviceCustomResolveFeaturesEXT;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `customResolve` specifies that the implementation supports render pass resolves using shaders.

If the `VkPhysicalDeviceCustomResolveFeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceCustomResolveFeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceCustomResolveFeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_RESOLVE_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT` structure is defined as:

    // Provided by VK_EXT_rgba10x6_formats
    typedef struct VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           formatRgba10x6WithoutYCbCrSampler;
    } VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `formatRgba10x6WithoutYCbCrSampler` indicates that VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16 can be used with a `VkImageView` with `subresourceRange.aspectMask` equal to VK_IMAGE_ASPECT_COLOR_BIT without a sampler Y′CBCR conversion enabled.

If the `VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RGBA10X6_FORMATS_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDevicePipelineRobustnessFeatures` structure is defined as:

    // Provided by VK_VERSION_1_4
    typedef struct VkPhysicalDevicePipelineRobustnessFeatures {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           pipelineRobustness;
    } VkPhysicalDevicePipelineRobustnessFeatures;

    // Provided by VK_EXT_pipeline_robustness
    // Equivalent to VkPhysicalDevicePipelineRobustnessFeatures
    typedef VkPhysicalDevicePipelineRobustnessFeatures VkPhysicalDevicePipelineRobustnessFeaturesEXT;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `pipelineRobustness` indicates that robustness can be requested on a per-pipeline-stage granularity.

Note | Enabling the `pipelineRobustness` feature may, on some platforms, incur a minor performance cost when the `robustBufferAccess` feature is not enabled, even for pipelines which do not make use of any robustness features. If robustness is not needed, the `pipelineRobustness` feature should not be enabled by an application.

If the `VkPhysicalDevicePipelineRobustnessFeatures` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDevicePipelineRobustnessFeatures`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDevicePipelineRobustnessFeatures-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_FEATURES

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceImageViewMinLodFeaturesEXT` structure is defined as:

    // Provided by VK_EXT_image_view_min_lod
    typedef struct VkPhysicalDeviceImageViewMinLodFeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           minLod;
    } VkPhysicalDeviceImageViewMinLodFeaturesEXT;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `minLod` indicates whether the implementation supports clamping the minimum LOD value during Image Level(s) Selection, Texel Gathering and Integer Texel Coordinate Operations with a given VkImageView by VkImageViewMinLodCreateInfoEXT::`minLod`.

If the `VkPhysicalDeviceImageViewMinLodFeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceImageViewMinLodFeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceImageViewMinLodFeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_VIEW_MIN_LOD_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT` structure is defined as:

    // Provided by VK_EXT_rasterization_order_attachment_access
    typedef struct VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           rasterizationOrderColorAttachmentAccess;
        VkBool32           rasterizationOrderDepthAttachmentAccess;
        VkBool32           rasterizationOrderStencilAttachmentAccess;
    } VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT;

    // Provided by VK_ARM_rasterization_order_attachment_access
    // Equivalent to VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT
    typedef VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesARM;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `rasterizationOrderColorAttachmentAccess` indicates that rasterization order access to color and input attachments is supported by the implementation.

- `rasterizationOrderDepthAttachmentAccess` indicates that rasterization order access to the depth aspect of depth/stencil and input attachments is supported by the implementation.

- `rasterizationOrderStencilAttachmentAccess` indicates that rasterization order access to the stencil aspect of depth/stencil and input attachments is supported by the implementation.

If the `VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT` structure is defined as:

    // Provided by VK_EXT_subpass_merge_feedback
    typedef struct VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           subpassMergeFeedback;
    } VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `subpassMergeFeedback` indicates whether the implementation supports feedback of subpass merging.

If the `VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBPASS_MERGE_FEEDBACK_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceLinearColorAttachmentFeaturesNV` structure is defined as:

    // Provided by VK_NV_linear_color_attachment
    typedef struct VkPhysicalDeviceLinearColorAttachmentFeaturesNV {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           linearColorAttachment;
    } VkPhysicalDeviceLinearColorAttachmentFeaturesNV;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `linearColorAttachment` indicates whether the implementation supports renderable Linear Color Attachment

If the `VkPhysicalDeviceLinearColorAttachmentFeaturesNV` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceLinearColorAttachmentFeaturesNV`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceLinearColorAttachmentFeaturesNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINEAR_COLOR_ATTACHMENT_FEATURES_NV

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT` structure is defined as:

    // Provided by VK_EXT_attachment_feedback_loop_layout
    typedef struct VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           attachmentFeedbackLoopLayout;
    } VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `attachmentFeedbackLoopLayout` indicates whether the implementation supports using VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT image layout for images created with the VK_IMAGE_USAGE_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT usage flag set.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ATTACHMENT_FEEDBACK_LOOP_LAYOUT_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceNestedCommandBufferFeaturesEXT` structure is defined as:

    // Provided by VK_EXT_nested_command_buffer
    typedef struct VkPhysicalDeviceNestedCommandBufferFeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           nestedCommandBuffer;
        VkBool32           nestedCommandBufferRendering;
        VkBool32           nestedCommandBufferSimultaneousUse;
    } VkPhysicalDeviceNestedCommandBufferFeaturesEXT;

This structure describes the following features:

- `nestedCommandBuffer` indicates the implementation supports nested command buffers, which allows Secondary Command Buffers to execute other Secondary Command Buffers.

- `nestedCommandBufferRendering` indicates that it is valid to call vkCmdExecuteCommands inside a Secondary Command Buffer recorded with VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT.

- `nestedCommandBufferSimultaneousUse` indicates that the implementation supports nested command buffers with command buffers that are recorded with VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT.

If the `VkPhysicalDeviceNestedCommandBufferFeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceNestedCommandBufferFeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceNestedCommandBufferFeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_NESTED_COMMAND_BUFFER_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT` structure is defined as:

    // Provided by VK_EXT_graphics_pipeline_library
    typedef struct VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           graphicsPipelineLibrary;
    } VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `graphicsPipelineLibrary` indicates that the implementation supports graphics pipeline libraries.

If the `VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDevicePipelineBinaryFeaturesKHR` structure is defined as:

    // Provided by VK_KHR_pipeline_binary
    typedef struct VkPhysicalDevicePipelineBinaryFeaturesKHR {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           pipelineBinaries;
    } VkPhysicalDevicePipelineBinaryFeaturesKHR;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `pipelineBinaries` indicates that the implementation supports Pipeline Binaries.

If the `VkPhysicalDevicePipelineBinaryFeaturesKHR` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDevicePipelineBinaryFeaturesKHR`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDevicePipelineBinaryFeaturesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_BINARY_FEATURES_KHR

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT` structure is defined as:

    // Provided by VK_EXT_multisampled_render_to_single_sampled
    typedef struct VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           multisampledRenderToSingleSampled;
    } VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `multisampledRenderToSingleSampled` indicates that the implementation supports multisampled rendering to single-sampled render pass attachments.

If the `VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceMultisampledRenderToSwapchainFeaturesEXT` structure is defined as:

    // Provided by VK_EXT_multisampled_render_to_swapchain
    typedef struct VkPhysicalDeviceMultisampledRenderToSwapchainFeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           multisampledRenderToSwapchain;
    } VkPhysicalDeviceMultisampledRenderToSwapchainFeaturesEXT;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `multisampledRenderToSwapchain` indicates that the implementation supports multisampled rendering to single-sampled render pass attachments referencing swapchain images.

If the `VkPhysicalDeviceMultisampledRenderToSwapchainFeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceMultisampledRenderToSwapchainFeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceMultisampledRenderToSwapchainFeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTISAMPLED_RENDER_TO_SWAPCHAIN_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceImage2DViewOf3DFeaturesEXT` structure is defined as:

    // Provided by VK_EXT_image_2d_view_of_3d
    typedef struct VkPhysicalDeviceImage2DViewOf3DFeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           image2DViewOf3D;
        VkBool32           sampler2DViewOf3D;
    } VkPhysicalDeviceImage2DViewOf3DFeaturesEXT;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `image2DViewOf3D` indicates that the implementation supports using a 2D view of a 3D image in a descriptor of type VK_DESCRIPTOR_TYPE_STORAGE_IMAGE if the image is created using VK_IMAGE_CREATE_2D_VIEW_COMPATIBLE_BIT_EXT.

- `sampler2DViewOf3D` indicates that the implementation supports using a 2D view of a 3D image in a descriptor of type VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE or VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER if the image is created using VK_IMAGE_CREATE_2D_VIEW_COMPATIBLE_BIT_EXT.

If the `VkPhysicalDeviceImage2DViewOf3DFeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceImage2DViewOf3DFeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceImage2DViewOf3DFeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_2D_VIEW_OF_3D_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT` structure is defined as:

    // Provided by VK_EXT_image_sliced_view_of_3d
    typedef struct VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           imageSlicedViewOf3D;
    } VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT;

The members of the `VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT` structure describe the following features:

- `imageSlicedViewOf3D` indicates that the implementation supports using a sliced view of a 3D image in a descriptor of type VK_DESCRIPTOR_TYPE_STORAGE_IMAGE by using a VkImageViewSlicedCreateInfoEXT structure when creating the view.

If the `VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_SLICED_VIEW_OF_3D_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceImageCompressionControlFeaturesEXT` structure is defined as:

    // Provided by VK_EXT_image_compression_control
    typedef struct VkPhysicalDeviceImageCompressionControlFeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           imageCompressionControl;
    } VkPhysicalDeviceImageCompressionControlFeaturesEXT;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `imageCompressionControl` indicates that the implementation supports providing controls for image compression at image creation time.

If the `VkPhysicalDeviceImageCompressionControlFeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceImageCompressionControlFeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceImageCompressionControlFeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_COMPRESSION_CONTROL_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT` structure is defined as:

    // Provided by VK_EXT_image_compression_control_swapchain
    typedef struct VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           imageCompressionControlSwapchain;
    } VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `imageCompressionControlSwapchain` indicates that the implementation supports controlling image controls per swapchain and querying image compression properties per surface.

If the `VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_COMPRESSION_CONTROL_SWAPCHAIN_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR` structure is defined as:

    // Provided by VK_KHR_ray_tracing_position_fetch
    typedef struct VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           rayTracingPositionFetch;
    } VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `rayTracingPositionFetch` indicates that the implementation supports fetching the object space vertex positions of a hit triangle.

If the `VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_POSITION_FETCH_FEATURES_KHR

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceShaderFloatControls2Features` structure is defined as:

    // Provided by VK_VERSION_1_4
    typedef struct VkPhysicalDeviceShaderFloatControls2Features {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           shaderFloatControls2;
    } VkPhysicalDeviceShaderFloatControls2Features;

    // Provided by VK_KHR_shader_float_controls2
    // Equivalent to VkPhysicalDeviceShaderFloatControls2Features
    typedef VkPhysicalDeviceShaderFloatControls2Features VkPhysicalDeviceShaderFloatControls2FeaturesKHR;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `shaderFloatControls2` specifies whether shader modules can declare the `FloatControls2` capability.

If the `VkPhysicalDeviceShaderFloatControls2Features` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceShaderFloatControls2Features`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceShaderFloatControls2Features-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT_CONTROLS_2_FEATURES

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD` structure is defined as:

    // Provided by VK_AMD_shader_early_and_late_fragment_tests
    typedef struct VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           shaderEarlyAndLateFragmentTests;
    } VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `shaderEarlyAndLateFragmentTests` indicates whether the implementation supports the `EarlyAndLateFragmentTestsAMD` `Execution` `Mode`.

If the `VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_EARLY_AND_LATE_FRAGMENT_TESTS_FEATURES_AMD

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceAntiLagFeaturesAMD` structure is defined as:

    // Provided by VK_AMD_anti_lag
    typedef struct VkPhysicalDeviceAntiLagFeaturesAMD {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           antiLag;
    } VkPhysicalDeviceAntiLagFeaturesAMD;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `antiLag` indicates whether the implementation supports AMD Radeon™ Anti-Lag functionality. The `antiLag` feature only supports a single GPU and must not be enabled if VkDeviceGroupDeviceCreateInfo::`physicalDeviceCount` is greater than 1.

If the `VkPhysicalDeviceAntiLagFeaturesAMD` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceAntiLagFeaturesAMD`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceAntiLagFeaturesAMD-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ANTI_LAG_FEATURES_AMD

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT` structure is defined as:

    // Provided by VK_EXT_non_seamless_cube_map
    typedef struct VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           nonSeamlessCubeMap;
    } VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `nonSeamlessCubeMap` indicates that the implementation supports VK_SAMPLER_CREATE_NON_SEAMLESS_CUBE_MAP_BIT_EXT.

If the `VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_NON_SEAMLESS_CUBE_MAP_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT` structure is defined as:

    // Provided by VK_EXT_shader_module_identifier
    typedef struct VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           shaderModuleIdentifier;
    } VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `shaderModuleIdentifier` indicates whether the implementation supports querying an identifier of a VkShaderModule or VkShaderModuleCreateInfo structure, and creating pipelines from identifiers only.

If the `VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_MODULE_IDENTIFIER_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceTilePropertiesFeaturesQCOM` structure is defined as:

    // Provided by VK_QCOM_tile_properties
    typedef struct VkPhysicalDeviceTilePropertiesFeaturesQCOM {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           tileProperties;
    } VkPhysicalDeviceTilePropertiesFeaturesQCOM;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `tileProperties` indicates that the implementation supports queries for returning tile properties.

If the `VkPhysicalDeviceTilePropertiesFeaturesQCOM` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceTilePropertiesFeaturesQCOM`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceTilePropertiesFeaturesQCOM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TILE_PROPERTIES_FEATURES_QCOM

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceImageProcessingFeaturesQCOM` structure is defined as:

    // Provided by VK_QCOM_image_processing
    typedef struct VkPhysicalDeviceImageProcessingFeaturesQCOM {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           textureSampleWeighted;
        VkBool32           textureBoxFilter;
        VkBool32           textureBlockMatch;
    } VkPhysicalDeviceImageProcessingFeaturesQCOM;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `textureSampleWeighted` indicates that the implementation supports shader modules that declare the `TextureSampleWeightedQCOM` capability.

- `textureBoxFilter` indicates that the implementation supports shader modules that declare the `TextureBoxFilterQCOM` capability.

- `textureBlockMatch` indicates that the implementation supports shader modules that declare the `TextureBlockMatchQCOM` capability.

If the `VkPhysicalDeviceImageProcessingFeaturesQCOM` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceImageProcessingFeaturesQCOM`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceImageProcessingFeaturesQCOM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_PROCESSING_FEATURES_QCOM

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceImageProcessing2FeaturesQCOM` structure is defined as:

    // Provided by VK_QCOM_image_processing2
    typedef struct VkPhysicalDeviceImageProcessing2FeaturesQCOM {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           textureBlockMatch2;
    } VkPhysicalDeviceImageProcessing2FeaturesQCOM;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `textureBlockMatch2` indicates that the implementation supports shader modules that declare the `TextureBlockMatch2QCOM` capability.

If the `VkPhysicalDeviceImageProcessing2FeaturesQCOM` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceImageProcessing2FeaturesQCOM`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceImageProcessing2FeaturesQCOM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_PROCESSING_2_FEATURES_QCOM

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceImageProcessing3FeaturesQCOM` structure is defined as:

    // Provided by VK_QCOM_image_processing3
    typedef struct VkPhysicalDeviceImageProcessing3FeaturesQCOM {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           imageGatherLinear;
        VkBool32           imageGatherExtendedModes;
        VkBool32           blockMatchExtendedClampToEdge;
    } VkPhysicalDeviceImageProcessing3FeaturesQCOM;

This structure describes the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `imageGatherLinear` indicates that the implementation supports shader modules that declare the `ImageGatherLinearQCOM` capability.

- `imageGatherExtendedModes` indicates that the implementation supports shader modules that declare the `ImageGatherExtendedModesQCOM` capability.

- `blockMatchExtendedClampToEdge` indicates that the implementation extends support for VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE to both input images of all block matching operations.

If the `VkPhysicalDeviceImageProcessing3FeaturesQCOM` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceImageProcessing3FeaturesQCOM`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceImageProcessing3FeaturesQCOM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_PROCESSING_3_FEATURES_QCOM

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceDepthClampZeroOneFeaturesKHR` structure is defined as:

    // Provided by VK_KHR_depth_clamp_zero_one
    typedef struct VkPhysicalDeviceDepthClampZeroOneFeaturesKHR {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           depthClampZeroOne;
    } VkPhysicalDeviceDepthClampZeroOneFeaturesKHR;

    // Provided by VK_EXT_depth_clamp_zero_one
    // Equivalent to VkPhysicalDeviceDepthClampZeroOneFeaturesKHR
    typedef VkPhysicalDeviceDepthClampZeroOneFeaturesKHR VkPhysicalDeviceDepthClampZeroOneFeaturesEXT;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `depthClampZeroOne` indicates that the implementation supports clamping the depth to a range of `0` to `1`.

If the `VkPhysicalDeviceDepthClampZeroOneFeaturesKHR` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceDepthClampZeroOneFeaturesKHR`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceDepthClampZeroOneFeaturesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLAMP_ZERO_ONE_FEATURES_KHR

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceShaderTileImageFeaturesEXT` structure is defined as:

    // Provided by VK_EXT_shader_tile_image
    typedef struct VkPhysicalDeviceShaderTileImageFeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           shaderTileImageColorReadAccess;
        VkBool32           shaderTileImageDepthReadAccess;
        VkBool32           shaderTileImageStencilReadAccess;
    } VkPhysicalDeviceShaderTileImageFeaturesEXT;

The members of the `VkPhysicalDeviceShaderTileImageFeaturesEXT` structure describe the following features:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `shaderTileImageColorReadAccess` indicates that the implementation supports the `TileImageColorReadAccessEXT` SPIR-V capability.

- `shaderTileImageDepthReadAccess` indicates that the implementation supports the `TileImageDepthReadAccessEXT` SPIR-V capability.

- `shaderTileImageStencilReadAccess` indicates that the implementation supports the `TileImageStencilReadAccessEXT` SPIR-V capability.

If the `VkPhysicalDeviceShaderTileImageFeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceShaderTileImageFeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceShaderTileImageFeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TILE_IMAGE_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceDepthBiasControlFeaturesEXT` structure is defined as:

    // Provided by VK_EXT_depth_bias_control
    typedef struct VkPhysicalDeviceDepthBiasControlFeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           depthBiasControl;
        VkBool32           leastRepresentableValueForceUnormRepresentation;
        VkBool32           floatRepresentation;
        VkBool32           depthBiasExact;
    } VkPhysicalDeviceDepthBiasControlFeaturesEXT;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `depthBiasControl` indicates whether the implementation supports the `vkCmdSetDepthBias2EXT` command and the `VkDepthBiasRepresentationInfoEXT` structure.

- `leastRepresentableValueForceUnormRepresentation` indicates whether the implementation supports using the VK_DEPTH_BIAS_REPRESENTATION_LEAST_REPRESENTABLE_VALUE_FORCE_UNORM_EXT depth bias representation.

- `floatRepresentation` indicates whether the implementation supports using the VK_DEPTH_BIAS_REPRESENTATION_FLOAT_EXT depth bias representation.

- `depthBiasExact` indicates whether the implementation supports forcing depth bias to not be scaled to ensure a minimum resolvable difference using `VkDepthBiasRepresentationInfoEXT`::`depthBiasExact`.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceDepthBiasControlFeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_BIAS_CONTROL_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceAddressBindingReportFeaturesEXT` structure is defined as:

    // Provided by VK_EXT_device_address_binding_report
    typedef struct VkPhysicalDeviceAddressBindingReportFeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           reportAddressBinding;
    } VkPhysicalDeviceAddressBindingReportFeaturesEXT;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `reportAddressBinding` indicates whether this implementation supports reporting the binding of GPU virtual address ranges to Vulkan objects.

If the `VkPhysicalDeviceAddressBindingReportFeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceAddressBindingReportFeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceAddressBindingReportFeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ADDRESS_BINDING_REPORT_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceOpticalFlowFeaturesNV` structure is defined as:

    // Provided by VK_NV_optical_flow
    typedef struct VkPhysicalDeviceOpticalFlowFeaturesNV {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           opticalFlow;
    } VkPhysicalDeviceOpticalFlowFeaturesNV;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `opticalFlow` indicates whether the implementation supports optical flow.

If the `VkPhysicalDeviceOpticalFlowFeaturesNV` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceOpticalFlowFeaturesNV`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceOpticalFlowFeaturesNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_OPTICAL_FLOW_FEATURES_NV

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceFaultFeaturesEXT` structure is defined as:

    // Provided by VK_EXT_device_fault
    typedef struct VkPhysicalDeviceFaultFeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           deviceFault;
        VkBool32           deviceFaultVendorBinary;
    } VkPhysicalDeviceFaultFeaturesEXT;

This structure describes the following features:

- `deviceFault` indicates that the implementation supports the reporting of device fault information.

- `deviceFaultVendorBinary` indicates that the implementation supports the generation of vendor-specific binary crash dumps. These may provide additional information when imported into vendor-specific external tools.

If the `VkPhysicalDeviceFaultFeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceFaultFeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceFaultFeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FAULT_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceFaultFeaturesKHR` structure is defined as:

    // Provided by VK_KHR_device_fault
    typedef struct VkPhysicalDeviceFaultFeaturesKHR {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           deviceFault;
        VkBool32           deviceFaultVendorBinary;
        VkBool32           deviceFaultReportMasked;
        VkBool32           deviceFaultDeviceLostOnMasked;
    } VkPhysicalDeviceFaultFeaturesKHR;

This structure describes the following features:

- `deviceFault` indicates that the implementation supports the reporting of device fault information.

- `deviceFaultVendorBinary` indicates that the implementation supports the generation of vendor-specific binary crash dumps. These may provide additional information when imported into vendor-specific external tools.

- `deviceFaultReportMasked` indicates that the implementation supports masked faults in normal operation (ie. automatically recovered by the driver internally without the application receiving a VK_ERROR_DEVICE_LOST error) which may be reported via this extension even if they did not result in a VK_ERROR_DEVICE_LOST condition being returned to the application.

- `deviceFaultDeviceLostOnMasked` indicates that the implementation supports returning VK_ERROR_DEVICE_LOST for faults that would be normally be masked.

In exceptional circumstances, some implementations may mask faults and attempt to recover from an error. In such circumstances, the device is not lost and further work can be submitted to the device. When such faults occur, the contents of all resources being written to at the time of the fault are undefined.

If the `VkPhysicalDeviceFaultFeaturesKHR` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceFaultFeaturesKHR`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceFaultFeaturesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FAULT_FEATURES_KHR

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT` structure is defined as:

    // Provided by VK_EXT_pipeline_library_group_handles
    typedef struct VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           pipelineLibraryGroupHandles;
    } VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT;

This structure describes the following features:

- `pipelineLibraryGroupHandles` indicates whether the implementation supports querying group handles directly from a ray tracing pipeline library, and guarantees bitwise identical group handles for such libraries when linked into other pipelines.

If the `VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_LIBRARY_GROUP_HANDLES_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceShaderObjectFeaturesEXT` structure is defined as:

    // Provided by VK_EXT_shader_object
    typedef struct VkPhysicalDeviceShaderObjectFeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           shaderObject;
    } VkPhysicalDeviceShaderObjectFeaturesEXT;

This structure describes the following feature:

- `shaderObject` indicates whether the implementation supports shader objects.

If the `VkPhysicalDeviceShaderObjectFeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceShaderObjectFeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceShaderObjectFeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_OBJECT_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceTensorFeaturesARM` structure is defined as:

    // Provided by VK_ARM_tensors
    typedef struct VkPhysicalDeviceTensorFeaturesARM {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           tensorNonPacked;
        VkBool32           shaderTensorAccess;
        VkBool32           shaderStorageTensorArrayDynamicIndexing;
        VkBool32           shaderStorageTensorArrayNonUniformIndexing;
        VkBool32           descriptorBindingStorageTensorUpdateAfterBind;
        VkBool32           tensors;
    } VkPhysicalDeviceTensorFeaturesARM;

The members of the `VkPhysicalDeviceTensorFeaturesARM` structure describe the following features:

- `tensorNonPacked` indicates whether the implementation supports the creation of tensors that are not packed tensors.

- `shaderTensorAccess` indicates whether shader modules can declare the `TensorsARM` capability.

- `shaderStorageBufferArrayDynamicIndexing` indicates whether arrays of storage tensors can be indexed by dynamically uniform integer expressions in shader code. If this feature is not enabled, resources with a descriptor type of VK_DESCRIPTOR_TYPE_TENSOR_ARM must be indexed only by constant integral expressions when aggregated into arrays in shader code. This also indicates whether shader modules can declare the `StorageTensorArrayDynamicIndexingARM` capability.

- `shaderStorageTensorArrayNonUniformIndexing` indicates whether arrays of storage tensors can be indexed by non-uniform integer expressions in shader code. If this feature is not enabled, resources with a descriptor type of VK_DESCRIPTOR_TYPE_TENSOR_ARM must not be indexed by non-uniform integer expressions when aggregated into arrays in shader code. This also indicates whether shader modules can declare the `StorageTensorArrayNonUniformIndexingARM` capability.

- `descriptorBindingStorageTensorUpdateAfterBind` indicates whether the implementation supports updating storage tensor descriptors after a set is bound. If this feature is not enabled, VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT must not be used with VK_DESCRIPTOR_TYPE_TENSOR_ARM.

- `tensors` indicates whether the implementation supports tensor resources.

If the `VkPhysicalDeviceTensorFeaturesARM` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceTensorFeaturesARM`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceTensorFeaturesARM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TENSOR_FEATURES_ARM

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM` structure is defined as:

    // Provided by VK_ARM_shader_core_builtins
    typedef struct VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           shaderCoreBuiltins;
    } VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `shaderCoreBuiltins` indicates whether the implementation supports the SPIR-V `CoreBuiltinsARM` capability.

If the `VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_BUILTINS_FEATURES_ARM

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceFrameBoundaryFeaturesEXT` structure is defined as:

    // Provided by VK_EXT_frame_boundary
    typedef struct VkPhysicalDeviceFrameBoundaryFeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           frameBoundary;
    } VkPhysicalDeviceFrameBoundaryFeaturesEXT;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `frameBoundary` indicates whether the implementation supports frame boundary information.

If the `VkPhysicalDeviceFrameBoundaryFeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceFrameBoundaryFeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceFrameBoundaryFeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAME_BOUNDARY_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceSwapchainMaintenance1FeaturesKHR` structure is defined as:

    // Provided by VK_KHR_swapchain_maintenance1
    typedef struct VkPhysicalDeviceSwapchainMaintenance1FeaturesKHR {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           swapchainMaintenance1;
    } VkPhysicalDeviceSwapchainMaintenance1FeaturesKHR;

    // Provided by VK_EXT_swapchain_maintenance1
    // Equivalent to VkPhysicalDeviceSwapchainMaintenance1FeaturesKHR
    typedef VkPhysicalDeviceSwapchainMaintenance1FeaturesKHR VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `swapchainMaintenance1` indicates that the implementation supports the following:

  - VkSwapchainPresentFenceInfoKHR, specifying a fence that is signaled when the resources associated with a present operation can be safely destroyed.

  - VkSwapchainPresentModesCreateInfoKHR and VkSwapchainPresentModeInfoKHR, allowing the swapchain to switch present modes without a need for recreation.

  - VkSwapchainPresentScalingCreateInfoKHR, specifying the scaling behavior of the swapchain in presence of window resizing.

  - The VK_SWAPCHAIN_CREATE_DEFERRED_MEMORY_ALLOCATION_BIT_KHR flag, allowing the implementation to defer the allocation of swapchain image memory until first acquisition.

  - vkReleaseSwapchainImagesKHR, allowing acquired swapchain images to be released without presenting them.

If the `VkPhysicalDeviceSwapchainMaintenance1FeaturesKHR` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceSwapchainMaintenance1FeaturesKHR`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceSwapchainMaintenance1FeaturesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SWAPCHAIN_MAINTENANCE_1_FEATURES_KHR

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDevicePresentModeFifoLatestReadyFeaturesKHR` structure is defined as:

    // Provided by VK_KHR_present_mode_fifo_latest_ready
    typedef struct VkPhysicalDevicePresentModeFifoLatestReadyFeaturesKHR {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           presentModeFifoLatestReady;
    } VkPhysicalDevicePresentModeFifoLatestReadyFeaturesKHR;

    // Provided by VK_EXT_present_mode_fifo_latest_ready
    // Equivalent to VkPhysicalDevicePresentModeFifoLatestReadyFeaturesKHR
    typedef VkPhysicalDevicePresentModeFifoLatestReadyFeaturesKHR VkPhysicalDevicePresentModeFifoLatestReadyFeaturesEXT;

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `presentModeFifoLatestReady` specifies whether the implementation supports the VK_PRESENT_MODE_FIFO_LATEST_READY_KHR present mode.

If the `VkPhysicalDevicePresentModeFifoLatestReadyFeaturesKHR` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDevicePresentModeFifoLatestReadyFeaturesKHR`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDevicePresentModeFifoLatestReadyFeaturesKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_MODE_FIFO_LATEST_READY_FEATURES_KHR

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT` structure is defined as:

    // Provided by VK_EXT_dynamic_rendering_unused_attachments
    typedef struct VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           dynamicRenderingUnusedAttachments;
    } VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `dynamicRenderingUnusedAttachments` indicates that the implementation supports binding graphics pipelines within a render pass instance where any pipeline VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` element with a format other than VK_FORMAT_UNDEFINED is allowed with a corresponding VkRenderingInfo::`pColorAttachments` element with an `imageView` equal to VK_NULL_HANDLE, or any pipeline VkPipelineRenderingCreateInfo::`pColorAttachmentFormats` element with a VK_FORMAT_UNDEFINED format is allowed with a corresponding VkRenderingInfo::`pColorAttachments` element with a non-VK_NULL_HANDLE `imageView`. Also a VkPipelineRenderingCreateInfo::`depthAttachmentFormat` other than VK_FORMAT_UNDEFINED is allowed with a VK_NULL_HANDLE VkRenderingInfo::`pDepthAttachment`, or a VkPipelineRenderingCreateInfo::`depthAttachmentFormat` of VK_FORMAT_UNDEFINED is allowed with a non-VK_NULL_HANDLE VkRenderingInfo::`pDepthAttachment`. Also a VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` other than VK_FORMAT_UNDEFINED is allowed with a VK_NULL_HANDLE VkRenderingInfo::`pStencilAttachment`, or a VkPipelineRenderingCreateInfo::`stencilAttachmentFormat` of VK_FORMAT_UNDEFINED is allowed with a non-VK_NULL_HANDLE VkRenderingInfo::`pStencilAttachment`. Any writes to a VkRenderingInfo::`pColorAttachments`, VkRenderingInfo::`pDepthAttachment`, or VkRenderingInfo::`pStencilAttachment` with VK_NULL_HANDLE are discarded.

If the `VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_UNUSED_ATTACHMENTS_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceRayTracingInvocationReorderFeaturesEXT` structure is defined as:

    // Provided by VK_EXT_ray_tracing_invocation_reorder
    typedef struct VkPhysicalDeviceRayTracingInvocationReorderFeaturesEXT {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           rayTracingInvocationReorder;
    } VkPhysicalDeviceRayTracingInvocationReorderFeaturesEXT;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `rayTracingInvocationReorder` indicates that the implementation supports `SPV_EXT_shader_invocation_reorder`.

If the `VkPhysicalDeviceRayTracingInvocationReorderFeaturesEXT` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceRayTracingInvocationReorderFeaturesEXT`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceRayTracingInvocationReorderFeaturesEXT-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_INVOCATION_REORDER_FEATURES_EXT

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV` structure is defined as:

    // Provided by VK_NV_ray_tracing_invocation_reorder
    typedef struct VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           rayTracingInvocationReorder;
    } VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `rayTracingInvocationReorder` indicates that the implementation supports `SPV_NV_shader_invocation_reorder`.

If the `VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.

Valid Usage (Implicit)

- VUID-VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_INVOCATION_REORDER_FEATURES_NV

Structure Chaining

Extends the structures

  - VkDeviceCreateInfo

  - VkPhysicalDeviceFeatures2

The `VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV` structure is defined as:

    // Provided by VK_NV_extended_sparse_address_space
    typedef struct VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV {
        VkStructureType    sType;
        void*              pNext;
        VkBool32           extendedSparseAddressSpace;
    } VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV;

This structure describes the following feature:

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `extendedSparseAddressSpace` indicates that the implementation supports allowing certain usages of sparse memory resources to exceed `VkPhysicalDeviceLimits`::`sparseAddressSpaceSize`. See VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV.

If the `VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV` structure is included in the `pNext` chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a VkDevice with any features described by `VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV`, it must add an instance of the structure, with the desired feature members set to VK_TRUE, to the `pNext` chain of VkDeviceCreateInfo when creating the VkDevice.
[member cut: first 33554432 bytes kept]
